@w3payments/react 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,25 @@
1
+ "use strict";require('./assets/main.css');var al=Object.defineProperty,cl=Object.defineProperties;var ll=Object.getOwnPropertyDescriptors;var _e=Object.getOwnPropertySymbols;var Vi=Object.prototype.hasOwnProperty,ki=Object.prototype.propertyIsEnumerable;var Oe=Math.pow,Mi=(t,e,n)=>e in t?al(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,p=(t,e)=>{for(var n in e||(e={}))Vi.call(e,n)&&Mi(t,n,e[n]);if(_e)for(var n of _e(e))ki.call(e,n)&&Mi(t,n,e[n]);return t},j=(t,e)=>cl(t,ll(e));var z=(t,e)=>{var n={};for(var r in t)Vi.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&_e)for(var r of _e(t))e.indexOf(r)<0&&ki.call(t,r)&&(n[r]=t[r]);return n};var $t=(t,e,n)=>new Promise((r,i)=>{var s=c=>{try{a(n.next(c))}catch(l){i(l)}},o=c=>{try{a(n.throw(c))}catch(l){i(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(s,o);a((n=n.apply(t,e)).next())});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const E=require("react"),ul=require("react-dom");function fl(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const ln=fl(E);function dl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ue={exports:{}},ye={};var Di;function hl(){if(Di)return ye;Di=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(r,i,s){var o=null;if(s!==void 0&&(o=""+s),i.key!==void 0&&(o=""+i.key),"key"in i){s={};for(var a in i)a!=="key"&&(s[a]=i[a])}else s=i;return i=s.ref,{$$typeof:t,type:r,key:o,ref:i!==void 0?i:null,props:s}}return ye.Fragment=e,ye.jsx=n,ye.jsxs=n,ye}var ve={};var ji;function ml(){return ji||(ji=1,process.env.NODE_ENV!=="production"&&(function(){function t(C){if(C==null)return null;if(typeof C=="function")return C.$$typeof===D?null:C.displayName||C.name||null;if(typeof C=="string")return C;switch(C){case v:return"Fragment";case x:return"Profiler";case y:return"StrictMode";case P:return"Suspense";case A:return"SuspenseList";case k:return"Activity"}if(typeof C=="object")switch(typeof C.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),C.$$typeof){case g:return"Portal";case S:return C.displayName||"Context";case b:return(C._context.displayName||"Context")+".Consumer";case R:var $=C.render;return C=C.displayName,C||(C=$.displayName||$.name||"",C=C!==""?"ForwardRef("+C+")":"ForwardRef"),C;case T:return $=C.displayName||null,$!==null?$:t(C.type)||"Memo";case M:$=C._payload,C=C._init;try{return t(C($))}catch(_){}}return null}function e(C){return""+C}function n(C){try{e(C);var $=!1}catch(J){$=!0}if($){$=console;var _=$.error,H=typeof Symbol=="function"&&Symbol.toStringTag&&C[Symbol.toStringTag]||C.constructor.name||"Object";return _.call($,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",H),e(C)}}function r(C){if(C===v)return"<>";if(typeof C=="object"&&C!==null&&C.$$typeof===M)return"<...>";try{var $=t(C);return $?"<"+$+">":"<...>"}catch(_){return"<...>"}}function i(){var C=N.A;return C===null?null:C.getOwner()}function s(){return Error("react-stack-top-frame")}function o(C){if(L.call(C,"key")){var $=Object.getOwnPropertyDescriptor(C,"key").get;if($&&$.isReactWarning)return!1}return C.key!==void 0}function a(C,$){function _(){at||(at=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",$))}_.isReactWarning=!0,Object.defineProperty(C,"key",{get:_,configurable:!0})}function c(){var C=t(this.type);return G[C]||(G[C]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),C=this.props.ref,C!==void 0?C:null}function l(C,$,_,H,J,et){var U=_.ref;return C={$$typeof:m,type:C,key:$,props:_,_owner:H},(U!==void 0?U:null)!==null?Object.defineProperty(C,"ref",{enumerable:!1,get:c}):Object.defineProperty(C,"ref",{enumerable:!1,value:null}),C._store={},Object.defineProperty(C._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(C,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(C,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:J}),Object.defineProperty(C,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:et}),Object.freeze&&(Object.freeze(C.props),Object.freeze(C)),C}function u(C,$,_,H,J,et){var U=$.children;if(U!==void 0)if(H)if(B(U)){for(H=0;H<U.length;H++)f(U[H]);Object.freeze&&Object.freeze(U)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else f(U);if(L.call($,"key")){U=t(C);var Q=Object.keys($).filter(function(Lt){return Lt!=="key"});H=0<Q.length?"{key: someKey, "+Q.join(": ..., ")+": ...}":"{key: someKey}",O[U+H]||(Q=0<Q.length?"{"+Q.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
+ let props = %s;
3
+ <%s {...props} />
4
+ React keys must be passed directly to JSX without using spread:
5
+ let props = %s;
6
+ <%s key={someKey} {...props} />`,H,U,Q,U),O[U+H]=!0)}if(U=null,_!==void 0&&(n(_),U=""+_),o($)&&(n($.key),U=""+$.key),"key"in $){_={};for(var ct in $)ct!=="key"&&(_[ct]=$[ct])}else _=$;return U&&a(_,typeof C=="function"?C.displayName||C.name||"Unknown":C),l(C,U,_,i(),J,et)}function f(C){d(C)?C._store&&(C._store.validated=1):typeof C=="object"&&C!==null&&C.$$typeof===M&&(C._payload.status==="fulfilled"?d(C._payload.value)&&C._payload.value._store&&(C._payload.value._store.validated=1):C._store&&(C._store.validated=1))}function d(C){return typeof C=="object"&&C!==null&&C.$$typeof===m}var h=E,m=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),S=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),D=Symbol.for("react.client.reference"),N=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=Object.prototype.hasOwnProperty,B=Array.isArray,Z=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(C){return C()}};var at,G={},Y=h.react_stack_bottom_frame.bind(h,s)(),I=Z(r(s)),O={};ve.Fragment=v,ve.jsx=function(C,$,_){var H=1e4>N.recentlyCreatedOwnerStacks++;return u(C,$,_,!1,H?Error("react-stack-top-frame"):Y,H?Z(r(C)):I)},ve.jsxs=function(C,$,_){var H=1e4>N.recentlyCreatedOwnerStacks++;return u(C,$,_,!0,H?Error("react-stack-top-frame"):Y,H?Z(r(C)):I)}})()),ve}var Ni;function pl(){return Ni||(Ni=1,process.env.NODE_ENV==="production"?Ue.exports=hl():Ue.exports=ml()),Ue.exports}var w=pl();function Ct(t){return Object.keys(t)}function gn(t){return t&&typeof t=="object"&&!Array.isArray(t)}function Lr(t,e){const n=p({},t),r=e;return gn(t)&&gn(e)&&Object.keys(e).forEach(i=>{gn(r[i])&&i in t?n[i]=Lr(n[i],r[i]):n[i]=r[i]}),n}function gl(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function yl(t){var e;return typeof t!="string"||!t.includes("var(--mantine-scale)")?t:(e=t.match(/^calc\((.*?)\)$/))==null?void 0:e[1].split("*")[0].trim()}function vl(t){const e=yl(t);return typeof e=="number"?e:typeof e=="string"?e.includes("calc")||e.includes("var")?e:e.includes("px")?Number(e.replace("px","")):e.includes("rem")?Number(e.replace("rem",""))*16:e.includes("em")?Number(e.replace("em",""))*16:Number(e):NaN}function Li(t){return t==="0rem"?"0rem":`calc(${t} * var(--mantine-scale))`}function _o(t,{shouldScale:e=!1}={}){function n(r){if(r===0||r==="0")return`0${t}`;if(typeof r=="number"){const i=`${r/16}${t}`;return e?Li(i):i}if(typeof r=="string"){if(r===""||r.startsWith("calc(")||r.startsWith("clamp(")||r.includes("rgba("))return r;if(r.includes(","))return r.split(",").map(s=>n(s)).join(",");if(r.includes(" "))return r.split(" ").map(s=>n(s)).join(" ");const i=r.replace("px","");if(!Number.isNaN(Number(i))){const s=`${Number(i)/16}${t}`;return e?Li(s):s}}return r}return n}const V=_o("rem",{shouldScale:!0}),$i=_o("em");function $r(t){return Object.keys(t).reduce((e,n)=>(t[n]!==void 0&&(e[n]=t[n]),e),{})}function Oo(t){if(typeof t=="number")return!0;if(typeof t=="string"){if(t.startsWith("calc(")||t.startsWith("var(")||t.includes(" ")&&t.trim()!=="")return!0;const e=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return t.trim().split(/\s+/).every(r=>e.test(r))}return!1}function St(t,e="size",n=!0){if(t!==void 0)return Oo(t)?n?V(t):t:`var(--${e}-${t})`}function un(t){return St(t,"mantine-spacing")}function Ne(t){return t===void 0?"var(--mantine-radius-default)":St(t,"mantine-radius")}function Uo(t){return St(t,"mantine-font-size")}function bl(t){return St(t,"mantine-line-height",!1)}function wl(t){if(t)return St(t,"mantine-shadow",!1)}function xl(t,e){try{return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}catch(n){return t.addListener(e),()=>t.removeListener(e)}}function Cl(t,e){return typeof window!="undefined"&&"matchMedia"in window?window.matchMedia(t).matches:!1}function Tl(t,e,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){const[r,i]=E.useState(n?e:Cl(t));return E.useEffect(()=>{try{const s=window.matchMedia(t);return i(s.matches),xl(s,o=>i(o.matches))}catch(s){return}},[t]),r||!1}const zo=typeof document!="undefined"?E.useLayoutEffect:E.useEffect;function Sl(t,e){const n=E.useRef(!1);E.useEffect(()=>()=>{n.current=!1},[]),E.useEffect(()=>{if(n.current)return t();n.current=!0},e)}function Pl(t,e){return Tl("(prefers-reduced-motion: reduce)",t,e)}function Wo(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=Wo(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Ht(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Wo(t))&&(r&&(r+=" "),r+=e);return r}const Al={};function El(t){const e={};return t.forEach(n=>{Object.entries(n).forEach(([r,i])=>{e[r]?e[r]=Ht(e[r],i):e[r]=i})}),e}function Ir({theme:t,classNames:e,props:n,stylesCtx:r}){const s=(Array.isArray(e)?e:[e]).map(o=>typeof o=="function"?o(t,n,r):o||Al);return El(s)}function ar({theme:t,styles:e,props:n,stylesCtx:r}){return(Array.isArray(e)?e:[e]).reduce((s,o)=>typeof o=="function"?p(p({},s),o(t,n,r)):p(p({},s),o),{})}const Ho=E.createContext(null);function jt(){const t=E.useContext(Ho);if(!t)throw new Error("[@mantine/core] MantineProvider was not found in tree");return t}function Rl(){return jt().cssVariablesResolver}function Ml(){return jt().classNamesPrefix}function Br(){return jt().getStyleNonce}function Vl(){return jt().withStaticClasses}function kl(){return jt().headless}function Dl(){var t;return(t=jt().stylesTransform)==null?void 0:t.sx}function jl(){var t;return(t=jt().stylesTransform)==null?void 0:t.styles}function Nl(){return jt().env||"default"}function Ll(t){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(t)}function $l(t){let e=t.replace("#","");if(e.length===3){const o=e.split("");e=[o[0],o[0],o[1],o[1],o[2],o[2]].join("")}if(e.length===8){const o=parseInt(e.slice(6,8),16)/255;return{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:o}}const n=parseInt(e,16),r=n>>16&255,i=n>>8&255,s=n&255;return{r,g:i,b:s,a:1}}function Il(t){const[e,n,r,i]=t.replace(/[^0-9,./]/g,"").split(/[/,]/).map(Number);return{r:e,g:n,b:r,a:i===void 0?1:i}}function Bl(t){const e=/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i,n=t.match(e);if(!n)return{r:0,g:0,b:0,a:1};const r=parseInt(n[1],10),i=parseInt(n[2],10)/100,s=parseInt(n[3],10)/100,o=n[5]?parseFloat(n[5]):void 0,a=(1-Math.abs(2*s-1))*i,c=r/60,l=a*(1-Math.abs(c%2-1)),u=s-a/2;let f,d,h;return c>=0&&c<1?(f=a,d=l,h=0):c>=1&&c<2?(f=l,d=a,h=0):c>=2&&c<3?(f=0,d=a,h=l):c>=3&&c<4?(f=0,d=l,h=a):c>=4&&c<5?(f=l,d=0,h=a):(f=a,d=0,h=l),{r:Math.round((f+u)*255),g:Math.round((d+u)*255),b:Math.round((h+u)*255),a:o||1}}function Fr(t){return Ll(t)?$l(t):t.startsWith("rgb")?Il(t):t.startsWith("hsl")?Bl(t):{r:0,g:0,b:0,a:1}}function ze(t,e){if(t.startsWith("var("))return`color-mix(in srgb, ${t}, black ${e*100}%)`;const{r:n,g:r,b:i,a:s}=Fr(t),o=1-e,a=c=>Math.round(c*o);return`rgba(${a(n)}, ${a(r)}, ${a(i)}, ${s})`}function Ee(t,e){return typeof t.primaryShade=="number"?t.primaryShade:e==="dark"?t.primaryShade.dark:t.primaryShade.light}function yn(t){return t<=.03928?t/12.92:Oe((t+.055)/1.055,2.4)}function Fl(t){const e=t.match(/oklch\((.*?)%\s/);return e?parseFloat(e[1]):null}function _l(t){if(t.startsWith("oklch("))return(Fl(t)||0)/100;const{r:e,g:n,b:r}=Fr(t),i=e/255,s=n/255,o=r/255,a=yn(i),c=yn(s),l=yn(o);return .2126*a+.7152*c+.0722*l}function be(t,e=.179){return t.startsWith("var(")?!1:_l(t)>e}function Le({color:t,theme:e,colorScheme:n}){if(typeof t!="string")throw new Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof t}`);if(t==="bright")return{color:t,value:n==="dark"?e.white:e.black,shade:void 0,isThemeColor:!1,isLight:be(n==="dark"?e.white:e.black,e.luminanceThreshold),variable:"--mantine-color-bright"};if(t==="dimmed")return{color:t,value:n==="dark"?e.colors.dark[2]:e.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:be(n==="dark"?e.colors.dark[2]:e.colors.gray[6],e.luminanceThreshold),variable:"--mantine-color-dimmed"};if(t==="white"||t==="black")return{color:t,value:t==="white"?e.white:e.black,shade:void 0,isThemeColor:!1,isLight:be(t==="white"?e.white:e.black,e.luminanceThreshold),variable:`--mantine-color-${t}`};const[r,i]=t.split("."),s=i?Number(i):void 0,o=r in e.colors;if(o){const a=s!==void 0?e.colors[r][s]:e.colors[r][Ee(e,n||"light")];return{color:r,value:a,shade:s,isThemeColor:o,isLight:be(a,e.luminanceThreshold),variable:i?`--mantine-color-${r}-${s}`:`--mantine-color-${r}-filled`}}return{color:t,value:t,isThemeColor:o,isLight:be(t,e.luminanceThreshold),shade:s,variable:void 0}}function en(t,e){const n=Le({color:t||e.primaryColor,theme:e});return n.variable?`var(${n.variable})`:t}function cr(t,e){var s,o;const n={from:(t==null?void 0:t.from)||e.defaultGradient.from,to:(t==null?void 0:t.to)||e.defaultGradient.to,deg:(o=(s=t==null?void 0:t.deg)!=null?s:e.defaultGradient.deg)!=null?o:0},r=en(n.from,e),i=en(n.to,e);return`linear-gradient(${n.deg}deg, ${r} 0%, ${i} 100%)`}function Pt(t,e){if(typeof t!="string"||e>1||e<0)return"rgba(0, 0, 0, 1)";if(t.startsWith("var(")){const s=(1-e)*100;return`color-mix(in srgb, ${t}, transparent ${s}%)`}if(t.startsWith("oklch"))return t.includes("/")?t.replace(/\/\s*[\d.]+\s*\)/,`/ ${e})`):t.replace(")",` / ${e})`);const{r:n,g:r,b:i}=Fr(t);return`rgba(${n}, ${r}, ${i}, ${e})`}const Xt=Pt,Ol=({color:t,theme:e,variant:n,gradient:r,autoContrast:i})=>{const s=Le({color:t,theme:e}),o=typeof i=="boolean"?i:e.autoContrast;if(n==="none")return{background:"transparent",hover:"transparent",color:"inherit",border:"none"};if(n==="filled"){const a=o&&s.isLight?"var(--mantine-color-black)":"var(--mantine-color-white)";return s.isThemeColor?s.shade===void 0?{background:`var(--mantine-color-${t}-filled)`,hover:`var(--mantine-color-${t}-filled-hover)`,color:a,border:`${V(1)} solid transparent`}:{background:`var(--mantine-color-${s.color}-${s.shade})`,hover:`var(--mantine-color-${s.color}-${s.shade===9?8:s.shade+1})`,color:a,border:`${V(1)} solid transparent`}:{background:t,hover:ze(t,.1),color:a,border:`${V(1)} solid transparent`}}if(n==="light"){if(s.isThemeColor){if(s.shade===void 0)return{background:`var(--mantine-color-${t}-light)`,hover:`var(--mantine-color-${t}-light-hover)`,color:`var(--mantine-color-${t}-light-color)`,border:`${V(1)} solid transparent`};const a=e.colors[s.color][s.shade];return{background:Pt(a,.1),hover:Pt(a,.12),color:`var(--mantine-color-${s.color}-${Math.min(s.shade,6)})`,border:`${V(1)} solid transparent`}}return{background:Pt(t,.1),hover:Pt(t,.12),color:t,border:`${V(1)} solid transparent`}}if(n==="outline")return s.isThemeColor?s.shade===void 0?{background:"transparent",hover:`var(--mantine-color-${t}-outline-hover)`,color:`var(--mantine-color-${t}-outline)`,border:`${V(1)} solid var(--mantine-color-${t}-outline)`}:{background:"transparent",hover:Pt(e.colors[s.color][s.shade],.05),color:`var(--mantine-color-${s.color}-${s.shade})`,border:`${V(1)} solid var(--mantine-color-${s.color}-${s.shade})`}:{background:"transparent",hover:Pt(t,.05),color:t,border:`${V(1)} solid ${t}`};if(n==="subtle"){if(s.isThemeColor){if(s.shade===void 0)return{background:"transparent",hover:`var(--mantine-color-${t}-light-hover)`,color:`var(--mantine-color-${t}-light-color)`,border:`${V(1)} solid transparent`};const a=e.colors[s.color][s.shade];return{background:"transparent",hover:Pt(a,.12),color:`var(--mantine-color-${s.color}-${Math.min(s.shade,6)})`,border:`${V(1)} solid transparent`}}return{background:"transparent",hover:Pt(t,.12),color:t,border:`${V(1)} solid transparent`}}return n==="transparent"?s.isThemeColor?s.shade===void 0?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${t}-light-color)`,border:`${V(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${s.color}-${Math.min(s.shade,6)})`,border:`${V(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:t,border:`${V(1)} solid transparent`}:n==="white"?s.isThemeColor?s.shade===void 0?{background:"var(--mantine-color-white)",hover:ze(e.white,.01),color:`var(--mantine-color-${t}-filled)`,border:`${V(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:ze(e.white,.01),color:`var(--mantine-color-${s.color}-${s.shade})`,border:`${V(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:ze(e.white,.01),color:t,border:`${V(1)} solid transparent`}:n==="gradient"?{background:cr(r,e),hover:cr(r,e),color:"var(--mantine-color-white)",border:"none"}:n==="default"?{background:"var(--mantine-color-default)",hover:"var(--mantine-color-default-hover)",color:"var(--mantine-color-default-color)",border:`${V(1)} solid var(--mantine-color-default-border)`}:{}},Ul={dark:["#C9C9C9","#b8b8b8","#828282","#696969","#424242","#3b3b3b","#2e2e2e","#242424","#1f1f1f","#141414"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]},Ii="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",_r={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:Ul,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:Ol,autoContrast:!1,luminanceThreshold:.3,fontFamily:Ii,fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",respectReducedMotion:!1,cursorType:"default",defaultGradient:{from:"blue",to:"cyan",deg:45},defaultRadius:"sm",activeClassName:"mantine-active",focusClassName:"",headings:{fontFamily:Ii,fontWeight:"700",textWrap:"wrap",sizes:{h1:{fontSize:V(34),lineHeight:"1.3"},h2:{fontSize:V(26),lineHeight:"1.35"},h3:{fontSize:V(22),lineHeight:"1.4"},h4:{fontSize:V(18),lineHeight:"1.45"},h5:{fontSize:V(16),lineHeight:"1.5"},h6:{fontSize:V(14),lineHeight:"1.5"}}},fontSizes:{xs:V(12),sm:V(14),md:V(16),lg:V(18),xl:V(20)},lineHeights:{xs:"1.4",sm:"1.45",md:"1.55",lg:"1.6",xl:"1.65"},radius:{xs:V(2),sm:V(4),md:V(8),lg:V(16),xl:V(32)},spacing:{xs:V(10),sm:V(12),md:V(16),lg:V(20),xl:V(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${V(1)} ${V(3)} rgba(0, 0, 0, 0.05), 0 ${V(1)} ${V(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${V(1)} ${V(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${V(10)} ${V(15)} ${V(-5)}, rgba(0, 0, 0, 0.04) 0 ${V(7)} ${V(7)} ${V(-5)}`,md:`0 ${V(1)} ${V(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${V(20)} ${V(25)} ${V(-5)}, rgba(0, 0, 0, 0.04) 0 ${V(10)} ${V(10)} ${V(-5)}`,lg:`0 ${V(1)} ${V(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${V(28)} ${V(23)} ${V(-7)}, rgba(0, 0, 0, 0.04) 0 ${V(12)} ${V(12)} ${V(-7)}`,xl:`0 ${V(1)} ${V(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${V(36)} ${V(28)} ${V(-7)}, rgba(0, 0, 0, 0.04) 0 ${V(17)} ${V(17)} ${V(-7)}`},other:{},components:{}};function Bi(t){return t==="auto"||t==="dark"||t==="light"}function zl({key:t="mantine-color-scheme-value"}={}){let e;return{get:n=>{if(typeof window=="undefined")return n;try{const r=window.localStorage.getItem(t);return Bi(r)?r:n}catch(r){return n}},set:n=>{try{window.localStorage.setItem(t,n)}catch(r){console.warn("[@mantine/core] Local storage color scheme manager was unable to save color scheme.",r)}},subscribe:n=>{e=r=>{r.storageArea===window.localStorage&&r.key===t&&Bi(r.newValue)&&n(r.newValue)},window.addEventListener("storage",e)},unsubscribe:()=>{window.removeEventListener("storage",e)},clear:()=>{window.localStorage.removeItem(t)}}}const Wl="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color",Fi="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function vn(t){return t<0||t>9?!1:parseInt(t.toString(),10)===t}function _i(t){if(!(t.primaryColor in t.colors))throw new Error(Wl);if(typeof t.primaryShade=="object"&&(!vn(t.primaryShade.dark)||!vn(t.primaryShade.light)))throw new Error(Fi);if(typeof t.primaryShade=="number"&&!vn(t.primaryShade))throw new Error(Fi)}function Hl(t,e){var r;if(!e)return _i(t),t;const n=Lr(t,e);return e.fontFamily&&!((r=e.headings)!=null&&r.fontFamily)&&(n.headings.fontFamily=e.fontFamily),_i(n),n}const Or=E.createContext(null),Gl=()=>E.useContext(Or)||_r;function Gt(){const t=E.useContext(Or);if(!t)throw new Error("@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app");return t}function Go({theme:t,children:e,inherit:n=!0}){const r=Gl(),i=E.useMemo(()=>Hl(n?r:_r,t),[t,r,n]);return w.jsx(Or.Provider,{value:i,children:e})}Go.displayName="@mantine/core/MantineThemeProvider";function ql(){const t=Gt(),e=Br(),n=Ct(t.breakpoints).reduce((r,i)=>{const s=t.breakpoints[i].includes("px"),o=vl(t.breakpoints[i]),a=s?`${o-.1}px`:$i(o-.1),c=s?`${o}px`:$i(o);return`${r}@media (max-width: ${a}) {.mantine-visible-from-${i} {display: none !important;}}@media (min-width: ${c}) {.mantine-hidden-from-${i} {display: none !important;}}`},"");return w.jsx("style",{"data-mantine-styles":"classes",nonce:e==null?void 0:e(),dangerouslySetInnerHTML:{__html:n}})}function bn(t){return Object.entries(t).map(([e,n])=>`${e}: ${n};`).join("")}function qo(t,e){const n=e?[e]:[":root",":host"],r=bn(t.variables),i=r?`${n.join(", ")}{${r}}`:"",s=bn(t.dark),o=bn(t.light),a=u=>n.map(f=>f===":host"?`${f}([data-mantine-color-scheme="${u}"])`:`${f}[data-mantine-color-scheme="${u}"]`).join(", "),c=s?`${a("dark")}{${s}}`:"",l=o?`${a("light")}{${o}}`:"";return`${i}
7
+
8
+ ${c}
9
+
10
+ ${l}`}function Yl({color:t,theme:e,autoContrast:n}){return e.autoContrast&&Le({color:t||e.primaryColor,theme:e}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function Oi(t,e){return Yl({color:t.colors[t.primaryColor][Ee(t,e)],theme:t,autoContrast:null})}function We({theme:t,color:e,colorScheme:n,name:r=e,withColorValues:i=!0}){if(!t.colors[e])return{};if(n==="light"){const a=Ee(t,"light"),c={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-filled)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${a})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${a===9?8:a+1})`,[`--mantine-color-${r}-light`]:Xt(t.colors[e][a],.1),[`--mantine-color-${r}-light-hover`]:Xt(t.colors[e][a],.12),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-${a})`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${a})`,[`--mantine-color-${r}-outline-hover`]:Xt(t.colors[e][a],.05)};return i?p({[`--mantine-color-${r}-0`]:t.colors[e][0],[`--mantine-color-${r}-1`]:t.colors[e][1],[`--mantine-color-${r}-2`]:t.colors[e][2],[`--mantine-color-${r}-3`]:t.colors[e][3],[`--mantine-color-${r}-4`]:t.colors[e][4],[`--mantine-color-${r}-5`]:t.colors[e][5],[`--mantine-color-${r}-6`]:t.colors[e][6],[`--mantine-color-${r}-7`]:t.colors[e][7],[`--mantine-color-${r}-8`]:t.colors[e][8],[`--mantine-color-${r}-9`]:t.colors[e][9]},c):c}const s=Ee(t,"dark"),o={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-4)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${s})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${s===9?8:s+1})`,[`--mantine-color-${r}-light`]:Xt(t.colors[e][Math.max(0,s-2)],.15),[`--mantine-color-${r}-light-hover`]:Xt(t.colors[e][Math.max(0,s-2)],.2),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-${Math.max(s-5,0)})`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${Math.max(s-4,0)})`,[`--mantine-color-${r}-outline-hover`]:Xt(t.colors[e][Math.max(s-4,0)],.05)};return i?p({[`--mantine-color-${r}-0`]:t.colors[e][0],[`--mantine-color-${r}-1`]:t.colors[e][1],[`--mantine-color-${r}-2`]:t.colors[e][2],[`--mantine-color-${r}-3`]:t.colors[e][3],[`--mantine-color-${r}-4`]:t.colors[e][4],[`--mantine-color-${r}-5`]:t.colors[e][5],[`--mantine-color-${r}-6`]:t.colors[e][6],[`--mantine-color-${r}-7`]:t.colors[e][7],[`--mantine-color-${r}-8`]:t.colors[e][8],[`--mantine-color-${r}-9`]:t.colors[e][9]},o):o}function Kl(t){return!!t&&typeof t=="object"&&"mantine-virtual-color"in t}function Zt(t,e,n){Ct(e).forEach(r=>Object.assign(t,{[`--mantine-${n}-${r}`]:e[r]}))}const Yo=t=>{const e=Ee(t,"light"),n=t.defaultRadius in t.radius?t.radius[t.defaultRadius]:V(t.defaultRadius),r={variables:{"--mantine-z-index-app":"100","--mantine-z-index-modal":"200","--mantine-z-index-popover":"300","--mantine-z-index-overlay":"400","--mantine-z-index-max":"9999","--mantine-scale":t.scale.toString(),"--mantine-cursor-type":t.cursorType,"--mantine-webkit-font-smoothing":t.fontSmoothing?"antialiased":"unset","--mantine-moz-font-smoothing":t.fontSmoothing?"grayscale":"unset","--mantine-color-white":t.white,"--mantine-color-black":t.black,"--mantine-line-height":t.lineHeights.md,"--mantine-font-family":t.fontFamily,"--mantine-font-family-monospace":t.fontFamilyMonospace,"--mantine-font-family-headings":t.headings.fontFamily,"--mantine-heading-font-weight":t.headings.fontWeight,"--mantine-heading-text-wrap":t.headings.textWrap,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${t.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${t.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${t.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${t.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${t.primaryColor}-light-color)`},light:{"--mantine-color-scheme":"light","--mantine-primary-color-contrast":Oi(t,"light"),"--mantine-color-bright":"var(--mantine-color-black)","--mantine-color-text":t.black,"--mantine-color-body":t.white,"--mantine-color-error":"var(--mantine-color-red-6)","--mantine-color-placeholder":"var(--mantine-color-gray-5)","--mantine-color-anchor":`var(--mantine-color-${t.primaryColor}-${e})`,"--mantine-color-default":"var(--mantine-color-white)","--mantine-color-default-hover":"var(--mantine-color-gray-0)","--mantine-color-default-color":"var(--mantine-color-black)","--mantine-color-default-border":"var(--mantine-color-gray-4)","--mantine-color-dimmed":"var(--mantine-color-gray-6)","--mantine-color-disabled":"var(--mantine-color-gray-2)","--mantine-color-disabled-color":"var(--mantine-color-gray-5)","--mantine-color-disabled-border":"var(--mantine-color-gray-3)"},dark:{"--mantine-color-scheme":"dark","--mantine-primary-color-contrast":Oi(t,"dark"),"--mantine-color-bright":"var(--mantine-color-white)","--mantine-color-text":"var(--mantine-color-dark-0)","--mantine-color-body":"var(--mantine-color-dark-7)","--mantine-color-error":"var(--mantine-color-red-8)","--mantine-color-placeholder":"var(--mantine-color-dark-3)","--mantine-color-anchor":`var(--mantine-color-${t.primaryColor}-4)`,"--mantine-color-default":"var(--mantine-color-dark-6)","--mantine-color-default-hover":"var(--mantine-color-dark-5)","--mantine-color-default-color":"var(--mantine-color-white)","--mantine-color-default-border":"var(--mantine-color-dark-4)","--mantine-color-dimmed":"var(--mantine-color-dark-2)","--mantine-color-disabled":"var(--mantine-color-dark-6)","--mantine-color-disabled-color":"var(--mantine-color-dark-3)","--mantine-color-disabled-border":"var(--mantine-color-dark-4)"}};Zt(r.variables,t.breakpoints,"breakpoint"),Zt(r.variables,t.spacing,"spacing"),Zt(r.variables,t.fontSizes,"font-size"),Zt(r.variables,t.lineHeights,"line-height"),Zt(r.variables,t.shadows,"shadow"),Zt(r.variables,t.radius,"radius"),t.colors[t.primaryColor].forEach((s,o)=>{r.variables[`--mantine-primary-color-${o}`]=`var(--mantine-color-${t.primaryColor}-${o})`}),Ct(t.colors).forEach(s=>{const o=t.colors[s];if(Kl(o)){Object.assign(r.light,We({theme:t,name:o.name,color:o.light,colorScheme:"light",withColorValues:!0})),Object.assign(r.dark,We({theme:t,name:o.name,color:o.dark,colorScheme:"dark",withColorValues:!0}));return}o.forEach((a,c)=>{r.variables[`--mantine-color-${s}-${c}`]=a}),Object.assign(r.light,We({theme:t,color:s,colorScheme:"light",withColorValues:!1})),Object.assign(r.dark,We({theme:t,color:s,colorScheme:"dark",withColorValues:!1}))});const i=t.headings.sizes;return Ct(i).forEach(s=>{r.variables[`--mantine-${s}-font-size`]=i[s].fontSize,r.variables[`--mantine-${s}-line-height`]=i[s].lineHeight,r.variables[`--mantine-${s}-font-weight`]=i[s].fontWeight||t.headings.fontWeight}),r};function Xl({theme:t,generator:e}){const n=Yo(t),r=e==null?void 0:e(t);return r?Lr(n,r):n}const wn=Yo(_r);function Zl(t){const e={variables:{},light:{},dark:{}};return Ct(t.variables).forEach(n=>{wn.variables[n]!==t.variables[n]&&(e.variables[n]=t.variables[n])}),Ct(t.light).forEach(n=>{wn.light[n]!==t.light[n]&&(e.light[n]=t.light[n])}),Ct(t.dark).forEach(n=>{wn.dark[n]!==t.dark[n]&&(e.dark[n]=t.dark[n])}),e}function Jl(t){return qo({variables:{},dark:{"--mantine-color-scheme":"dark"},light:{"--mantine-color-scheme":"light"}},t)}function Ko({cssVariablesSelector:t,deduplicateCssVariables:e}){const n=Gt(),r=Br(),i=Rl(),s=Xl({theme:n,generator:i}),o=(t===void 0||t===":root"||t===":host")&&e,a=o?Zl(s):s,c=qo(a,t);return c?w.jsx("style",{"data-mantine-styles":!0,nonce:r==null?void 0:r(),dangerouslySetInnerHTML:{__html:`${c}${o?"":Jl(t)}`}}):null}Ko.displayName="@mantine/CssVariables";function Jt(t,e){var i,s;const n=typeof window!="undefined"&&"matchMedia"in window&&((i=window.matchMedia("(prefers-color-scheme: dark)"))==null?void 0:i.matches),r=t!=="auto"?t:n?"dark":"light";(s=e())==null||s.setAttribute("data-mantine-color-scheme",r)}function Ql({manager:t,defaultColorScheme:e,getRootElement:n,forceColorScheme:r}){const i=E.useRef(null),[s,o]=E.useState(()=>t.get(e)),a=r||s,c=E.useCallback(u=>{r||(Jt(u,n),o(u),t.set(u))},[t.set,a,r]),l=E.useCallback(()=>{o(e),Jt(e,n),t.clear()},[t.clear,e]);return E.useEffect(()=>(t.subscribe(c),t.unsubscribe),[t.subscribe,t.unsubscribe]),zo(()=>{Jt(t.get(e),n)},[]),E.useEffect(()=>{var f;if(r)return Jt(r,n),()=>{};r===void 0&&Jt(s,n),typeof window!="undefined"&&"matchMedia"in window&&(i.current=window.matchMedia("(prefers-color-scheme: dark)"));const u=d=>{s==="auto"&&Jt(d.matches?"dark":"light",n)};return(f=i.current)==null||f.addEventListener("change",u),()=>{var d;return(d=i.current)==null?void 0:d.removeEventListener("change",u)}},[s,r]),{colorScheme:a,setColorScheme:c,clearColorScheme:l}}function tu({respectReducedMotion:t,getRootElement:e}){zo(()=>{var n;t&&((n=e())==null||n.setAttribute("data-respect-reduced-motion","true"))},[t])}function lr({theme:t,children:e,getStyleNonce:n,withStaticClasses:r=!0,withGlobalClasses:i=!0,deduplicateCssVariables:s=!0,withCssVariables:o=!0,cssVariablesSelector:a,classNamesPrefix:c="mantine",colorSchemeManager:l=zl(),defaultColorScheme:u="light",getRootElement:f=()=>document.documentElement,cssVariablesResolver:d,forceColorScheme:h,stylesTransform:m,env:g}){const{colorScheme:v,setColorScheme:y,clearColorScheme:x}=Ql({defaultColorScheme:u,forceColorScheme:h,manager:l,getRootElement:f});return tu({respectReducedMotion:(t==null?void 0:t.respectReducedMotion)||!1,getRootElement:f}),w.jsx(Ho.Provider,{value:{colorScheme:v,setColorScheme:y,clearColorScheme:x,getRootElement:f,classNamesPrefix:c,getStyleNonce:n,cssVariablesResolver:d,cssVariablesSelector:a!=null?a:":root",withStaticClasses:r,stylesTransform:m,env:g},children:w.jsxs(Go,{theme:t,children:[o&&w.jsx(Ko,{cssVariablesSelector:a,deduplicateCssVariables:s}),i&&w.jsx(ql,{}),e]})})}lr.displayName="@mantine/core/MantineProvider";const eu={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function nu({theme:t,options:e,unstyled:n}){return Ht((e==null?void 0:e.focusable)&&!n&&(t.focusClassName||eu[t.focusRing]),(e==null?void 0:e.active)&&!n&&t.activeClassName)}function ru({selector:t,stylesCtx:e,options:n,props:r,theme:i}){return Ir({theme:i,classNames:n==null?void 0:n.classNames,props:(n==null?void 0:n.props)||r,stylesCtx:e})[t]}function Ui({selector:t,stylesCtx:e,theme:n,classNames:r,props:i}){return Ir({theme:n,classNames:r,props:i,stylesCtx:e})[t]}function iu({rootSelector:t,selector:e,className:n}){return t===e?n:void 0}function su({selector:t,classes:e,unstyled:n}){return n?void 0:e[t]}function ou({themeName:t,classNamesPrefix:e,selector:n,withStaticClass:r}){return r===!1?[]:t.map(i=>`${e}-${i}-${n}`)}function au({themeName:t,theme:e,selector:n,props:r,stylesCtx:i}){return t.map(s=>{var o,a;return(a=Ir({theme:e,classNames:(o=e.components[s])==null?void 0:o.classNames,props:r,stylesCtx:i}))==null?void 0:a[n]})}function cu({options:t,classes:e,selector:n,unstyled:r}){return t!=null&&t.variant&&!r?e[`${n}--${t.variant}`]:void 0}function lu({theme:t,options:e,themeName:n,selector:r,classNamesPrefix:i,classNames:s,classes:o,unstyled:a,className:c,rootSelector:l,props:u,stylesCtx:f,withStaticClasses:d,headless:h,transformedStyles:m}){return Ht(nu({theme:t,options:e,unstyled:a||h}),au({theme:t,themeName:n,selector:r,props:u,stylesCtx:f}),cu({options:e,classes:o,selector:r,unstyled:a}),Ui({selector:r,stylesCtx:f,theme:t,classNames:s,props:u}),Ui({selector:r,stylesCtx:f,theme:t,classNames:m,props:u}),ru({selector:r,stylesCtx:f,options:e,props:u,theme:t}),iu({rootSelector:l,selector:r,className:c}),su({selector:r,classes:o,unstyled:a||h}),d&&!h&&ou({themeName:n,classNamesPrefix:i,selector:r,withStaticClass:e==null?void 0:e.withStaticClass}),e==null?void 0:e.className)}function uu({theme:t,themeName:e,props:n,stylesCtx:r,selector:i}){return e.map(s=>{var o;return ar({theme:t,styles:(o=t.components[s])==null?void 0:o.styles,props:n,stylesCtx:r})[i]}).reduce((s,o)=>p(p({},s),o),{})}function ur({style:t,theme:e}){return Array.isArray(t)?[...t].reduce((n,r)=>p(p({},n),ur({style:r,theme:e})),{}):typeof t=="function"?t(e):t==null?{}:t}function fu(t){return t.reduce((e,n)=>(n&&Object.keys(n).forEach(r=>{e[r]=p(p({},e[r]),$r(n[r]))}),e),{})}function du({vars:t,varsResolver:e,theme:n,props:r,stylesCtx:i,selector:s,themeName:o,headless:a}){var c;return(c=fu([a?{}:e==null?void 0:e(n,r,i),...o.map(l=>{var u,f,d;return(d=(f=(u=n.components)==null?void 0:u[l])==null?void 0:f.vars)==null?void 0:d.call(f,n,r,i)}),t==null?void 0:t(n,r,i)]))==null?void 0:c[s]}function hu({theme:t,themeName:e,selector:n,options:r,props:i,stylesCtx:s,rootSelector:o,styles:a,style:c,vars:l,varsResolver:u,headless:f,withStylesTransform:d}){return p(p(p(p(p(p({},!d&&uu({theme:t,themeName:e,props:i,stylesCtx:s,selector:n})),!d&&ar({theme:t,styles:a,props:i,stylesCtx:s})[n]),!d&&ar({theme:t,styles:r==null?void 0:r.styles,props:(r==null?void 0:r.props)||i,stylesCtx:s})[n]),du({theme:t,props:i,stylesCtx:s,vars:l,varsResolver:u,selector:n,themeName:e,headless:f})),o===n?ur({style:c,theme:t}):null),ur({style:r==null?void 0:r.style,theme:t}))}function mu({props:t,stylesCtx:e,themeName:n}){var o;const r=Gt(),i=(o=jl())==null?void 0:o();return{getTransformedStyles:a=>i?[...a.map(l=>i(l,{props:t,theme:r,ctx:e})),...n.map(l=>{var u;return i((u=r.components[l])==null?void 0:u.styles,{props:t,theme:r,ctx:e})})].filter(Boolean):[],withStylesTransform:!!i}}function dt({name:t,classes:e,props:n,stylesCtx:r,className:i,style:s,rootSelector:o="root",unstyled:a,classNames:c,styles:l,vars:u,varsResolver:f,attributes:d}){const h=Gt(),m=Ml(),g=Vl(),v=kl(),y=(Array.isArray(t)?t:[t]).filter(S=>S),{withStylesTransform:x,getTransformedStyles:b}=mu({props:n,stylesCtx:r,themeName:y});return(S,R)=>p({className:lu({theme:h,options:R,themeName:y,selector:S,classNamesPrefix:m,classNames:c,classes:e,unstyled:a,className:i,rootSelector:o,props:n,stylesCtx:r,withStaticClasses:g,headless:v,transformedStyles:b([R==null?void 0:R.styles,l])}),style:hu({theme:h,themeName:y,selector:S,options:R,props:n,stylesCtx:r,rootSelector:o,styles:l,style:s,vars:u,varsResolver:f,headless:v,withStylesTransform:x})},d==null?void 0:d[S])}function ut(t,e,n){var o;const r=Gt(),i=(o=r.components[t])==null?void 0:o.defaultProps,s=typeof i=="function"?i(r):i;return p(p(p({},e),s),$r(n))}function xn(t){return Ct(t).reduce((e,n)=>t[n]!==void 0?`${e}${gl(n)}:${t[n]};`:e,"").trim()}function pu({selector:t,styles:e,media:n,container:r}){const i=e?xn(e):"",s=Array.isArray(n)?n.map(a=>`@media${a.query}{${t}{${xn(a.styles)}}}`):[],o=Array.isArray(r)?r.map(a=>`@container ${a.query}{${t}{${xn(a.styles)}}}`):[];return`${i?`${t}{${i}}`:""}${s.join("")}${o.join("")}`.trim()}function gu(t){const e=Br();return w.jsx("style",{"data-mantine-styles":"inline",nonce:e==null?void 0:e(),dangerouslySetInnerHTML:{__html:pu(t)}})}function yu(t){const Ri=t,{m:e,mx:n,my:r,mt:i,mb:s,ml:o,mr:a,me:c,ms:l,p:u,px:f,py:d,pt:h,pb:m,pl:g,pr:v,pe:y,ps:x,bd:b,bdrs:S,bg:R,c:P,opacity:A,ff:T,fz:M,fw:k,lts:D,ta:N,lh:L,fs:B,tt:Z,td:at,w:G,miw:Y,maw:I,h:O,mih:C,mah:$,bgsz:_,bgp:H,bgr:J,bga:et,pos:U,top:Q,left:ct,bottom:Lt,right:Zc,inset:Jc,display:Qc,flex:tl,hiddenFrom:el,visibleFrom:nl,lightHidden:rl,darkHidden:il,sx:sl}=Ri,ol=z(Ri,["m","mx","my","mt","mb","ml","mr","me","ms","p","px","py","pt","pb","pl","pr","pe","ps","bd","bdrs","bg","c","opacity","ff","fz","fw","lts","ta","lh","fs","tt","td","w","miw","maw","h","mih","mah","bgsz","bgp","bgr","bga","pos","top","left","bottom","right","inset","display","flex","hiddenFrom","visibleFrom","lightHidden","darkHidden","sx"]);return{styleProps:$r({m:e,mx:n,my:r,mt:i,mb:s,ml:o,mr:a,me:c,ms:l,p:u,px:f,py:d,pt:h,pb:m,pl:g,pr:v,pe:y,ps:x,bd:b,bg:R,c:P,opacity:A,ff:T,fz:M,fw:k,lts:D,ta:N,lh:L,fs:B,tt:Z,td:at,w:G,miw:Y,maw:I,h:O,mih:C,mah:$,bgsz:_,bgp:H,bgr:J,bga:et,pos:U,top:Q,left:ct,bottom:Lt,right:Zc,inset:Jc,display:Qc,flex:tl,bdrs:S,hiddenFrom:el,visibleFrom:nl,lightHidden:rl,darkHidden:il,sx:sl}),rest:ol}}const vu={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},ms:{type:"spacing",property:"marginInlineStart"},me:{type:"spacing",property:"marginInlineEnd"},mx:{type:"spacing",property:"marginInline"},my:{type:"spacing",property:"marginBlock"},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},ps:{type:"spacing",property:"paddingInlineStart"},pe:{type:"spacing",property:"paddingInlineEnd"},px:{type:"spacing",property:"paddingInline"},py:{type:"spacing",property:"paddingBlock"},bd:{type:"border",property:"border"},bdrs:{type:"radius",property:"borderRadius"},bg:{type:"color",property:"background"},c:{type:"textColor",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"fontFamily",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"lineHeight",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"size",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"},flex:{type:"identity",property:"flex"}};function Ur(t,e){const n=Le({color:t,theme:e});return n.color==="dimmed"?"var(--mantine-color-dimmed)":n.color==="bright"?"var(--mantine-color-bright)":n.variable?`var(${n.variable})`:n.color}function bu(t,e){const n=Le({color:t,theme:e});return n.isThemeColor&&n.shade===void 0?`var(--mantine-color-${n.color}-text)`:Ur(t,e)}function wu(t,e){if(typeof t=="number")return V(t);if(typeof t=="string"){const[n,r,...i]=t.split(" ").filter(o=>o.trim()!=="");let s=`${V(n)}`;return r&&(s+=` ${r}`),i.length>0&&(s+=` ${Ur(i.join(" "),e)}`),s.trim()}return t}const zi={text:"var(--mantine-font-family)",mono:"var(--mantine-font-family-monospace)",monospace:"var(--mantine-font-family-monospace)",heading:"var(--mantine-font-family-headings)",headings:"var(--mantine-font-family-headings)"};function xu(t){return typeof t=="string"&&t in zi?zi[t]:t}const Cu=["h1","h2","h3","h4","h5","h6"];function Tu(t,e){return typeof t=="string"&&t in e.fontSizes?`var(--mantine-font-size-${t})`:typeof t=="string"&&Cu.includes(t)?`var(--mantine-${t}-font-size)`:typeof t=="number"||typeof t=="string"?V(t):t}function Su(t){return t}const Pu=["h1","h2","h3","h4","h5","h6"];function Au(t,e){return typeof t=="string"&&t in e.lineHeights?`var(--mantine-line-height-${t})`:typeof t=="string"&&Pu.includes(t)?`var(--mantine-${t}-line-height)`:t}function Eu(t,e){return typeof t=="string"&&t in e.radius?`var(--mantine-radius-${t})`:typeof t=="number"||typeof t=="string"?V(t):t}function Ru(t){return typeof t=="number"?V(t):t}function Mu(t,e){if(typeof t=="number")return V(t);if(typeof t=="string"){const n=t.replace("-","");if(!(n in e.spacing))return V(t);const r=`--mantine-spacing-${n}`;return t.startsWith("-")?`calc(var(${r}) * -1)`:`var(${r})`}return t}const Cn={color:Ur,textColor:bu,fontSize:Tu,spacing:Mu,radius:Eu,identity:Su,size:Ru,lineHeight:Au,fontFamily:xu,border:wu};function Wi(t){return t.replace("(min-width: ","").replace("em)","")}function Vu(n){var r=n,{media:t}=r,e=z(r,["media"]);const s=Object.keys(t).sort((o,a)=>Number(Wi(o))-Number(Wi(a))).map(o=>({query:o,styles:t[o]}));return j(p({},e),{media:s})}function ku(t){if(typeof t!="object"||t===null)return!1;const e=Object.keys(t);return!(e.length===1&&e[0]==="base")}function Du(t){return typeof t=="object"&&t!==null?"base"in t?t.base:void 0:t}function ju(t){return typeof t=="object"&&t!==null?Ct(t).filter(e=>e!=="base"):[]}function Nu(t,e){return typeof t=="object"&&t!==null&&e in t?t[e]:t}function Lu({styleProps:t,data:e,theme:n}){return Vu(Ct(t).reduce((r,i)=>{if(i==="hiddenFrom"||i==="visibleFrom"||i==="sx")return r;const s=e[i],o=Array.isArray(s.property)?s.property:[s.property],a=Du(t[i]);if(!ku(t[i]))return o.forEach(l=>{r.inlineStyles[l]=Cn[s.type](a,n)}),r;r.hasResponsiveStyles=!0;const c=ju(t[i]);return o.forEach(l=>{a!=null&&(r.styles[l]=Cn[s.type](a,n)),c.forEach(u=>{const f=`(min-width: ${n.breakpoints[u]})`;r.media[f]=j(p({},r.media[f]),{[l]:Cn[s.type](Nu(t[i],u),n)})})}),r},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function $u(){return`__m__-${E.useId().replace(/[:«»]/g,"")}`}function Xo(t){return t.startsWith("data-")?t:`data-${t}`}function Iu(t){return Object.keys(t).reduce((e,n)=>{const r=t[n];return r===void 0||r===""||r===!1||r===null||(e[Xo(n)]=t[n]),e},{})}function Zo(t){return t?typeof t=="string"?{[Xo(t)]:!0}:Array.isArray(t)?[...t].reduce((e,n)=>p(p({},e),Zo(n)),{}):Iu(t):null}function fr(t,e){return Array.isArray(t)?[...t].reduce((n,r)=>p(p({},n),fr(r,e)),{}):typeof t=="function"?t(e):t==null?{}:t}function Bu({theme:t,style:e,vars:n,styleProps:r}){const i=fr(e,t),s=fr(n,t);return p(p(p({},i),s),r)}const Jo=E.forwardRef((g,m)=>{var v=g,{component:t,style:e,__vars:n,className:r,variant:i,mod:s,size:o,hiddenFrom:a,visibleFrom:c,lightHidden:l,darkHidden:u,renderRoot:f,__size:d}=v,h=z(v,["component","style","__vars","className","variant","mod","size","hiddenFrom","visibleFrom","lightHidden","darkHidden","renderRoot","__size"]);var k;const y=Gt(),x=t||"div",{styleProps:b,rest:S}=yu(h),R=Dl(),P=(k=R==null?void 0:R())==null?void 0:k(b.sx),A=$u(),T=Lu({styleProps:b,theme:y,data:vu}),M=p(p({ref:m,style:Bu({theme:y,style:e,vars:n,styleProps:T.inlineStyles}),className:Ht(r,P,{[A]:T.hasResponsiveStyles,"mantine-light-hidden":l,"mantine-dark-hidden":u,[`mantine-hidden-from-${a}`]:a,[`mantine-visible-from-${c}`]:c}),"data-variant":i,"data-size":Oo(o)?void 0:o||void 0,size:d},Zo(s)),S);return w.jsxs(w.Fragment,{children:[T.hasResponsiveStyles&&w.jsx(gu,{selector:`.${A}`,styles:T.styles,media:T.media}),typeof f=="function"?f(M):w.jsx(x,p({},M))]})});Jo.displayName="@mantine/core/Box";const W=Jo;function Qo(t){return t}function fe(t){const e=E.forwardRef(t);return e.extend=Qo,e.withProps=n=>{const r=E.forwardRef((i,s)=>w.jsx(e,j(p(p({},n),i),{ref:s})));return r.extend=e.extend,r.displayName=`WithProps(${e.displayName})`,r},e}function qt(t){const e=E.forwardRef(t);return e.withProps=n=>{const r=E.forwardRef((i,s)=>w.jsx(e,j(p(p({},n),i),{ref:s})));return r.extend=e.extend,r.displayName=`WithProps(${e.displayName})`,r},e.extend=Qo,e}var ta={root:"m_87cf2631"};const Fu={__staticSelector:"UnstyledButton"},zr=qt((t,e)=>{const n=ut("UnstyledButton",Fu,t),h=n,{className:r,component:i="button",__staticSelector:s,unstyled:o,classNames:a,styles:c,style:l,attributes:u}=h,f=z(h,["className","component","__staticSelector","unstyled","classNames","styles","style","attributes"]),d=dt({name:s,props:n,classes:ta,className:r,style:l,classNames:a,styles:c,unstyled:o,attributes:u});return w.jsx(W,p(j(p({},d("root",{focusable:!0})),{component:i,ref:e,type:i==="button"?"button":void 0}),f))});zr.classes=ta;zr.displayName="@mantine/core/UnstyledButton";var ea={root:"m_1b7284a3"};const _u=(t,{radius:e,shadow:n})=>({root:{"--paper-radius":e===void 0?void 0:Ne(e),"--paper-shadow":wl(n)}}),te=qt((t,e)=>{const n=ut("Paper",null,t),y=n,{classNames:r,className:i,style:s,styles:o,unstyled:a,withBorder:c,vars:l,radius:u,shadow:f,variant:d,mod:h,attributes:m}=y,g=z(y,["classNames","className","style","styles","unstyled","withBorder","vars","radius","shadow","variant","mod","attributes"]),v=dt({name:"Paper",props:n,classes:ea,className:i,style:s,classNames:r,styles:o,unstyled:a,attributes:m,vars:l,varsResolver:_u});return w.jsx(W,p(j(p({ref:e,mod:[{"data-with-border":c},h]},v("root")),{variant:d}),g))});te.classes=ea;te.displayName="@mantine/core/Paper";const we=t=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${t==="bottom"?10:-10}px)`},transitionProperty:"transform, opacity"}),He={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},"fade-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(30px)"},transitionProperty:"opacity, transform"},"fade-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-30px)"},transitionProperty:"opacity, transform"},"fade-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(30px)"},transitionProperty:"opacity, transform"},"fade-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-30px)"},transitionProperty:"opacity, transform"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(-20px) skew(-10deg, -5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(20px) skew(-10deg, -5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(-5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:j(p({},we("bottom")),{common:{transformOrigin:"center center"}}),"pop-bottom-left":j(p({},we("bottom")),{common:{transformOrigin:"bottom left"}}),"pop-bottom-right":j(p({},we("bottom")),{common:{transformOrigin:"bottom right"}}),"pop-top-left":j(p({},we("top")),{common:{transformOrigin:"top left"}}),"pop-top-right":j(p({},we("top")),{common:{transformOrigin:"top right"}})},Hi={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function Ou({transition:t,state:e,duration:n,timingFunction:r}){const i={WebkitBackfaceVisibility:"hidden",transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof t=="string"?t in He?p(p(p({transitionProperty:He[t].transitionProperty},i),He[t].common),He[t][Hi[e]]):{}:p(p(p({transitionProperty:t.transitionProperty},i),t.common),t[Hi[e]])}function Uu({duration:t,exitDuration:e,timingFunction:n,mounted:r,onEnter:i,onExit:s,onEntered:o,onExited:a,enterDelay:c,exitDelay:l}){const u=Gt(),f=Pl(),d=u.respectReducedMotion?f:!1,[h,m]=E.useState(d?0:t),[g,v]=E.useState(r?"entered":"exited"),y=E.useRef(-1),x=E.useRef(-1),b=E.useRef(-1);function S(){window.clearTimeout(y.current),window.clearTimeout(x.current),cancelAnimationFrame(b.current)}const R=A=>{S();const T=A?i:s,M=A?o:a,k=d?0:A?t:e;m(k),k===0?(typeof T=="function"&&T(),typeof M=="function"&&M(),v(A?"entered":"exited")):b.current=requestAnimationFrame(()=>{ul.flushSync(()=>{v(A?"pre-entering":"pre-exiting")}),b.current=requestAnimationFrame(()=>{typeof T=="function"&&T(),v(A?"entering":"exiting"),y.current=window.setTimeout(()=>{typeof M=="function"&&M(),v(A?"entered":"exited")},k)})})},P=A=>{if(S(),typeof(A?c:l)!="number"){R(A);return}x.current=window.setTimeout(()=>{R(A)},A?c:l)};return Sl(()=>{P(r)},[r]),E.useEffect(()=>()=>{S()},[]),{transitionDuration:h,transitionStatus:g,transitionTimingFunction:n||"ease"}}function na({keepMounted:t,transition:e="fade",duration:n=250,exitDuration:r=n,mounted:i,children:s,timingFunction:o="ease",onExit:a,onEntered:c,onEnter:l,onExited:u,enterDelay:f,exitDelay:d}){const h=Nl(),{transitionDuration:m,transitionStatus:g,transitionTimingFunction:v}=Uu({mounted:i,exitDuration:r,duration:n,timingFunction:o,onExit:a,onEntered:c,onEnter:l,onExited:u,enterDelay:f,exitDelay:d});return m===0||h==="test"?i?w.jsx(w.Fragment,{children:s({})}):t?s({display:"none"}):null:g==="exited"?t?s({display:"none"}):null:w.jsx(w.Fragment,{children:s(Ou({transition:e,duration:m,state:g,timingFunction:v}))})}na.displayName="@mantine/core/Transition";var vt={root:"m_5ae2e3c",barsLoader:"m_7a2bd4cd",bar:"m_870bb79","bars-loader-animation":"m_5d2b3b9d",dotsLoader:"m_4e3f22d7",dot:"m_870c4af","loader-dots-animation":"m_aac34a1",ovalLoader:"m_b34414df","oval-loader-animation":"m_f8e89c4b"};const ra=E.forwardRef((r,n)=>{var i=r,{className:t}=i,e=z(i,["className"]);return w.jsxs(W,j(p({component:"span",className:Ht(vt.barsLoader,t)},e),{ref:n,children:[w.jsx("span",{className:vt.bar}),w.jsx("span",{className:vt.bar}),w.jsx("span",{className:vt.bar})]}))});ra.displayName="@mantine/core/Bars";const ia=E.forwardRef((r,n)=>{var i=r,{className:t}=i,e=z(i,["className"]);return w.jsxs(W,j(p({component:"span",className:Ht(vt.dotsLoader,t)},e),{ref:n,children:[w.jsx("span",{className:vt.dot}),w.jsx("span",{className:vt.dot}),w.jsx("span",{className:vt.dot})]}))});ia.displayName="@mantine/core/Dots";const sa=E.forwardRef((r,n)=>{var i=r,{className:t}=i,e=z(i,["className"]);return w.jsx(W,j(p({component:"span",className:Ht(vt.ovalLoader,t)},e),{ref:n}))});sa.displayName="@mantine/core/Oval";const oa={bars:ra,oval:sa,dots:ia},zu={loaders:oa,type:"oval"},Wu=(t,{size:e,color:n})=>({root:{"--loader-size":St(e,"loader-size"),"--loader-color":n?en(n,t):void 0}}),ce=fe((t,e)=>{const n=ut("Loader",zu,t),x=n,{size:r,color:i,type:s,vars:o,className:a,style:c,classNames:l,styles:u,unstyled:f,loaders:d,variant:h,children:m,attributes:g}=x,v=z(x,["size","color","type","vars","className","style","classNames","styles","unstyled","loaders","variant","children","attributes"]),y=dt({name:"Loader",props:n,classes:vt,className:a,style:c,classNames:l,styles:u,unstyled:f,attributes:g,vars:o,varsResolver:Wu});return m?w.jsx(W,j(p(j(p({},y("root")),{ref:e}),v),{children:m})):w.jsx(W,p(j(p({},y("root")),{ref:e,component:d[s],variant:h,size:r}),v))});ce.defaultLoaders=oa;ce.classes=vt;ce.displayName="@mantine/core/Loader";var de={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21",groupSection:"m_437b6484"};const Gi={orientation:"horizontal"},Hu=(t,{borderWidth:e})=>({group:{"--ai-border-width":V(e)}}),Wr=fe((t,e)=>{const n=ut("ActionIconGroup",Gi,t),v=ut("ActionIconGroup",Gi,t),{className:r,style:i,classNames:s,styles:o,unstyled:a,orientation:c,vars:l,borderWidth:u,variant:f,mod:d,attributes:h}=v,m=z(v,["className","style","classNames","styles","unstyled","orientation","vars","borderWidth","variant","mod","attributes"]),g=dt({name:"ActionIconGroup",props:n,classes:de,className:r,style:i,classNames:s,styles:o,unstyled:a,attributes:h,vars:l,varsResolver:Hu,rootSelector:"group"});return w.jsx(W,p(j(p({},g("group")),{ref:e,variant:f,mod:[{"data-orientation":c},d],role:"group"}),m))});Wr.classes=de;Wr.displayName="@mantine/core/ActionIconGroup";const Gu=(t,{radius:e,color:n,gradient:r,variant:i,autoContrast:s,size:o})=>{const a=t.variantColorResolver({color:n||t.primaryColor,theme:t,gradient:r,variant:i||"filled",autoContrast:s});return{groupSection:{"--section-height":St(o,"section-height"),"--section-padding-x":St(o,"section-padding-x"),"--section-fz":Uo(o),"--section-radius":e===void 0?void 0:Ne(e),"--section-bg":n||i?a.background:void 0,"--section-color":a.color,"--section-bd":n||i?a.border:void 0}}},Hr=fe((t,e)=>{const n=ut("ActionIconGroupSection",null,t),v=n,{className:r,style:i,classNames:s,styles:o,unstyled:a,vars:c,variant:l,gradient:u,radius:f,autoContrast:d,attributes:h}=v,m=z(v,["className","style","classNames","styles","unstyled","vars","variant","gradient","radius","autoContrast","attributes"]),g=dt({name:"ActionIconGroupSection",props:n,classes:de,className:r,style:i,classNames:s,styles:o,unstyled:a,attributes:h,vars:c,varsResolver:Gu,rootSelector:"groupSection"});return w.jsx(W,p(j(p({},g("groupSection")),{ref:e,variant:l}),m))});Hr.classes=de;Hr.displayName="@mantine/core/ActionIconGroupSection";const qu=(t,{size:e,radius:n,variant:r,gradient:i,color:s,autoContrast:o})=>{const a=t.variantColorResolver({color:s||t.primaryColor,theme:t,gradient:i,variant:r||"filled",autoContrast:o});return{root:{"--ai-size":St(e,"ai-size"),"--ai-radius":n===void 0?void 0:Ne(n),"--ai-bg":s||r?a.background:void 0,"--ai-hover":s||r?a.hover:void 0,"--ai-hover-color":s||r?a.hoverColor:void 0,"--ai-color":a.color,"--ai-bd":s||r?a.border:void 0}}},Wt=qt((t,e)=>{const n=ut("ActionIcon",null,t),M=n,{className:r,unstyled:i,variant:s,classNames:o,styles:a,style:c,loading:l,loaderProps:u,size:f,color:d,radius:h,__staticSelector:m,gradient:g,vars:v,children:y,disabled:x,"data-disabled":b,autoContrast:S,mod:R,attributes:P}=M,A=z(M,["className","unstyled","variant","classNames","styles","style","loading","loaderProps","size","color","radius","__staticSelector","gradient","vars","children","disabled","data-disabled","autoContrast","mod","attributes"]),T=dt({name:["ActionIcon",m],props:n,className:r,style:c,classes:de,classNames:o,styles:a,unstyled:i,attributes:P,vars:v,varsResolver:qu});return w.jsxs(zr,j(p(p({},T("root",{active:!x&&!l&&!b})),A),{unstyled:i,variant:s,size:f,disabled:x||l,ref:e,mod:[{loading:l,disabled:x||b},R],children:[typeof l=="boolean"&&w.jsx(na,{mounted:l,transition:"slide-down",duration:150,children:k=>w.jsx(W,j(p({component:"span"},T("loader",{style:k})),{"aria-hidden":!0,children:w.jsx(ce,p({color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)"},u))}))}),w.jsx(W,j(p({component:"span",mod:{loading:l}},T("icon")),{children:y}))]}))});Wt.classes=de;Wt.displayName="@mantine/core/ActionIcon";Wt.Group=Wr;Wt.GroupSection=Hr;function Yu(t){return E.Children.toArray(t).filter(Boolean)}var aa={root:"m_4081bf90"};const Ku={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},Xu=(t,{grow:e,preventGrowOverflow:n,gap:r,align:i,justify:s,wrap:o},{childWidth:a})=>({root:{"--group-child-width":e&&n?a:void 0,"--group-gap":un(r),"--group-align":i,"--group-justify":s,"--group-wrap":o}}),ft=fe((t,e)=>{const n=ut("Group",Ku,t),D=n,{classNames:r,className:i,style:s,styles:o,unstyled:a,children:c,gap:l,align:u,justify:f,wrap:d,grow:h,preventGrowOverflow:m,vars:g,variant:v,__size:y,mod:x,attributes:b}=D,S=z(D,["classNames","className","style","styles","unstyled","children","gap","align","justify","wrap","grow","preventGrowOverflow","vars","variant","__size","mod","attributes"]),R=Yu(c),P=R.length,A=un(l!=null?l:"md"),M={childWidth:`calc(${100/P}% - (${A} - ${A} / ${P}))`},k=dt({name:"Group",props:n,stylesCtx:M,className:i,style:s,classes:aa,classNames:r,styles:o,unstyled:a,attributes:b,vars:g,varsResolver:Xu});return w.jsx(W,j(p(j(p({},k("root")),{ref:e,variant:v,mod:[{grow:h},x],size:y}),S),{children:R}))});ft.classes=aa;ft.displayName="@mantine/core/Group";var ca={root:"m_b6d8b162"};function Zu(t){if(t==="start")return"start";if(t==="end"||t)return"end"}const Ju={inherit:!1},Qu=(t,{variant:e,lineClamp:n,gradient:r,size:i,color:s})=>({root:{"--text-fz":Uo(i),"--text-lh":bl(i),"--text-gradient":e==="gradient"?cr(r,t):void 0,"--text-line-clamp":typeof n=="number"?n.toString():void 0,"--text-color":s?en(s,t):void 0}}),rt=qt((t,e)=>{const n=ut("Text",Ju,t),P=n,{lineClamp:r,truncate:i,inline:s,inherit:o,gradient:a,span:c,__staticSelector:l,vars:u,className:f,style:d,classNames:h,styles:m,unstyled:g,variant:v,mod:y,size:x,attributes:b}=P,S=z(P,["lineClamp","truncate","inline","inherit","gradient","span","__staticSelector","vars","className","style","classNames","styles","unstyled","variant","mod","size","attributes"]),R=dt({name:["Text",l],props:n,classes:ca,className:f,style:d,classNames:h,styles:m,unstyled:g,attributes:b,vars:u,varsResolver:Qu});return w.jsx(W,p(j(p({},R("root",{focusable:!0})),{ref:e,component:c?"span":"p",variant:v,mod:[{"data-truncate":Zu(i),"data-line-clamp":typeof r=="number","data-inline":s,"data-inherit":o},y],size:x}),S))});rt.classes=ca;rt.displayName="@mantine/core/Text";const la=E.createContext(null),tf=la.Provider;function ef(){return{withinGroup:!!E.useContext(la)}}var fn={group:"m_11def92b",root:"m_f85678b6",image:"m_11f8ac07",placeholder:"m_104cd71f"};const nf=(t,{spacing:e})=>({group:{"--ag-spacing":un(e)}}),Gr=fe((t,e)=>{const n=ut("AvatarGroup",null,t),h=n,{classNames:r,className:i,style:s,styles:o,unstyled:a,vars:c,spacing:l,attributes:u}=h,f=z(h,["classNames","className","style","styles","unstyled","vars","spacing","attributes"]),d=dt({name:"AvatarGroup",classes:fn,props:n,className:i,style:s,classNames:r,styles:o,unstyled:a,attributes:u,vars:c,varsResolver:nf,rootSelector:"group"});return w.jsx(tf,{value:!0,children:w.jsx(W,p(p({ref:e},d("group")),f))})});Gr.classes=fn;Gr.displayName="@mantine/core/AvatarGroup";function rf(t){return w.jsx("svg",j(p({},t),{"data-avatar-placeholder-icon":!0,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}))}function sf(t){let e=0;for(let n=0;n<t.length;n+=1){const r=t.charCodeAt(n);e=(e<<5)-e+r,e|=0}return e}const of=["blue","cyan","grape","green","indigo","lime","orange","pink","red","teal","violet"];function af(t,e=of){const n=sf(t),r=Math.abs(n)%e.length;return e[r]}function cf(t,e=2){const n=t.split(" ");return n.length===1?t.slice(0,e).toUpperCase():n.map(r=>r[0]).slice(0,e).join("").toUpperCase()}const lf=(t,{size:e,radius:n,variant:r,gradient:i,color:s,autoContrast:o,name:a,allowedInitialsColors:c})=>{const l=s==="initials"&&typeof a=="string"?af(a,c):s,u=t.variantColorResolver({color:l||"gray",theme:t,gradient:i,variant:r||"light",autoContrast:o});return{root:{"--avatar-size":St(e,"avatar-size"),"--avatar-radius":n===void 0?void 0:Ne(n),"--avatar-bg":l||r?u.background:void 0,"--avatar-color":l||r?u.color:void 0,"--avatar-bd":l||r?u.border:void 0}}},Re=qt((t,e)=>{const n=ut("Avatar",null,t),k=n,{classNames:r,className:i,style:s,styles:o,unstyled:a,vars:c,src:l,alt:u,radius:f,color:d,gradient:h,imageProps:m,children:g,autoContrast:v,mod:y,name:x,allowedInitialsColors:b,attributes:S}=k,R=z(k,["classNames","className","style","styles","unstyled","vars","src","alt","radius","color","gradient","imageProps","children","autoContrast","mod","name","allowedInitialsColors","attributes"]),P=ef(),[A,T]=E.useState(!l),M=dt({name:"Avatar",props:n,classes:fn,className:i,style:s,classNames:r,styles:o,unstyled:a,attributes:S,vars:c,varsResolver:lf});return E.useEffect(()=>T(!l),[l]),w.jsx(W,j(p(j(p({},M("root")),{mod:[{"within-group":P.withinGroup},y],ref:e}),R),{children:A||!l?w.jsx("span",j(p({},M("placeholder")),{title:u,children:g||typeof x=="string"&&cf(x)||w.jsx(rf,{})})):w.jsx("img",j(p(p({},m),M("image")),{src:l,alt:u,onError:D=>{var N;T(!0),(N=m==null?void 0:m.onError)==null||N.call(m,D)}}))}))});Re.classes=fn;Re.displayName="@mantine/core/Avatar";Re.Group=Gr;var ua={root:"m_4451eb3a"};const qr=qt((t,e)=>{const n=ut("Center",null,t),m=n,{classNames:r,className:i,style:s,styles:o,unstyled:a,vars:c,inline:l,mod:u,attributes:f}=m,d=z(m,["classNames","className","style","styles","unstyled","vars","inline","mod","attributes"]),h=dt({name:"Center",props:n,classes:ua,className:i,style:s,classNames:r,styles:o,unstyled:a,attributes:f,vars:c});return w.jsx(W,p(p({ref:e,mod:[{inline:l},u]},h("root")),d))});qr.classes=ua;qr.displayName="@mantine/core/Center";var fa={root:"m_9e117634"};const uf=(t,{radius:e,fit:n})=>({root:{"--image-radius":e===void 0?void 0:Ne(e),"--image-object-fit":n}}),Ot=qt((t,e)=>{const n=ut("Image",null,t),S=n,{classNames:r,className:i,style:s,styles:o,unstyled:a,vars:c,onError:l,src:u,radius:f,fit:d,fallbackSrc:h,mod:m,attributes:g}=S,v=z(S,["classNames","className","style","styles","unstyled","vars","onError","src","radius","fit","fallbackSrc","mod","attributes"]),[y,x]=E.useState(!u);E.useEffect(()=>x(!u),[u]);const b=dt({name:"Image",classes:fa,props:n,className:i,style:s,classNames:r,styles:o,unstyled:a,attributes:g,vars:c,varsResolver:uf});return y&&h?w.jsx(W,p(j(p({component:"img",ref:e,src:h},b("root")),{onError:l,mod:["fallback",m]}),v)):w.jsx(W,p(j(p({component:"img",ref:e},b("root")),{src:u,onError:R=>{l==null||l(R),x(!0)},mod:m}),v))});Ot.classes=fa;Ot.displayName="@mantine/core/Image";var da={root:"m_6d731127"};const ff={gap:"md",align:"stretch",justify:"flex-start"},df=(t,{gap:e,align:n,justify:r})=>({root:{"--stack-gap":un(e),"--stack-align":n,"--stack-justify":r}}),xt=fe((t,e)=>{const n=ut("Stack",ff,t),v=n,{classNames:r,className:i,style:s,styles:o,unstyled:a,vars:c,align:l,justify:u,gap:f,variant:d,attributes:h}=v,m=z(v,["classNames","className","style","styles","unstyled","vars","align","justify","gap","variant","attributes"]),g=dt({name:"Stack",props:n,classes:da,className:i,style:s,classNames:r,styles:o,unstyled:a,attributes:h,vars:c,varsResolver:df});return w.jsx(W,p(j(p({ref:e},g("root")),{variant:d}),m))});xt.classes=da;xt.displayName="@mantine/core/Stack";const Yr=E.createContext({});function Kr(t){const e=E.useRef(null);return e.current===null&&(e.current=t()),e.current}const Xr=typeof window!="undefined",ha=Xr?E.useLayoutEffect:E.useEffect,dn=E.createContext(null);function Zr(t,e){t.indexOf(e)===-1&&t.push(e)}function Jr(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const At=(t,e,n)=>n>e?e:n<t?t:n;function dr(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let he=()=>{},Et=()=>{};process.env.NODE_ENV!=="production"&&(he=(t,e,n)=>{!t&&typeof console!="undefined"&&console.warn(dr(e,n))},Et=(t,e,n)=>{if(!t)throw new Error(dr(e,n))});const Rt={},ma=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function pa(t){return typeof t=="object"&&t!==null}const ga=t=>/^0[^.\s]+$/u.test(t);function Qr(t){let e;return()=>(e===void 0&&(e=t()),e)}const pt=t=>t,hf=(t,e)=>n=>e(t(n)),$e=(...t)=>t.reduce(hf),Me=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r};class ti{constructor(){this.subscriptions=[]}add(e){return Zr(this.subscriptions,e),()=>Jr(this.subscriptions,e)}notify(e,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,r);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const bt=t=>t*1e3,mt=t=>t/1e3;function ya(t,e){return e?t*(1e3/e):0}const qi=new Set;function ei(t,e,n){t||qi.has(e)||(console.warn(dr(e,n)),qi.add(e))}const va=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,mf=1e-7,pf=12;function gf(t,e,n,r,i){let s,o,a=0;do o=e+(n-e)/2,s=va(o,r,i)-t,s>0?n=o:e=o;while(Math.abs(s)>mf&&++a<pf);return o}function Ie(t,e,n,r){if(t===e&&n===r)return pt;const i=s=>gf(s,0,1,t,n);return s=>s===0||s===1?s:va(i(s),e,r)}const ba=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,wa=t=>e=>1-t(1-e),xa=Ie(.33,1.53,.69,.99),ni=wa(xa),Ca=ba(ni),Ta=t=>(t*=2)<1?.5*ni(t):.5*(2-Math.pow(2,-10*(t-1))),ri=t=>1-Math.sin(Math.acos(t)),Sa=wa(ri),Pa=ba(ri),yf=Ie(.42,0,1,1),vf=Ie(0,0,.58,1),Aa=Ie(.42,0,.58,1),bf=t=>Array.isArray(t)&&typeof t[0]!="number",Ea=t=>Array.isArray(t)&&typeof t[0]=="number",Yi={linear:pt,easeIn:yf,easeInOut:Aa,easeOut:vf,circIn:ri,circInOut:Pa,circOut:Sa,backIn:ni,backInOut:Ca,backOut:xa,anticipate:Ta},wf=t=>typeof t=="string",Ki=t=>{if(Ea(t)){Et(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,r,i]=t;return Ie(e,n,r,i)}else if(wf(t))return Et(Yi[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),Yi[t];return t},Ge=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function xf(t,e){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(u){o.has(u)&&(l.schedule(u),t()),u(a)}const l={schedule:(u,f=!1,d=!1)=>{const m=d&&i?n:r;return f&&o.add(u),m.has(u)||m.add(u),u},cancel:u=>{r.delete(u),o.delete(u)},process:u=>{if(a=u,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(c),n.clear(),i=!1,s&&(s=!1,l.process(u))}};return l}const Cf=40;function Ra(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Ge.reduce((b,S)=>(b[S]=xf(s),b),{}),{setup:a,read:c,resolveKeyframes:l,preUpdate:u,update:f,preRender:d,render:h,postRender:m}=o,g=()=>{const b=Rt.useManualTiming?i.timestamp:performance.now();n=!1,Rt.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(b-i.timestamp,Cf),1)),i.timestamp=b,i.isProcessing=!0,a.process(i),c.process(i),l.process(i),u.process(i),f.process(i),d.process(i),h.process(i),m.process(i),i.isProcessing=!1,n&&e&&(r=!1,t(g))},v=()=>{n=!0,r=!0,i.isProcessing||t(g)};return{schedule:Ge.reduce((b,S)=>{const R=o[S];return b[S]=(P,A=!1,T=!1)=>(n||v(),R.schedule(P,A,T)),b},{}),cancel:b=>{for(let S=0;S<Ge.length;S++)o[Ge[S]].cancel(b)},state:i,steps:o}}const{schedule:q,cancel:kt,state:it,steps:Tn}=Ra(typeof requestAnimationFrame!="undefined"?requestAnimationFrame:pt,!0);let Ze;function Tf(){Ze=void 0}const lt={now:()=>(Ze===void 0&&lt.set(it.isProcessing||Rt.useManualTiming?it.timestamp:performance.now()),Ze),set:t=>{Ze=t,queueMicrotask(Tf)}},Ma=t=>e=>typeof e=="string"&&e.startsWith(t),Va=Ma("--"),Sf=Ma("var(--"),ii=t=>Sf(t)?Pf.test(t.split("/*")[0].trim()):!1,Pf=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,me={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Ve=j(p({},me),{transform:t=>At(0,1,t)}),qe=j(p({},me),{default:1}),Se=t=>Math.round(t*1e5)/1e5,si=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Af(t){return t==null}const Ef=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,oi=(t,e)=>n=>!!(typeof n=="string"&&Ef.test(n)&&n.startsWith(t)||e&&!Af(n)&&Object.prototype.hasOwnProperty.call(n,e)),ka=(t,e,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(si);return{[t]:parseFloat(i),[e]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Rf=t=>At(0,255,t),Sn=j(p({},me),{transform:t=>Math.round(Rf(t))}),Ft={test:oi("rgb","red"),parse:ka("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Sn.transform(t)+", "+Sn.transform(e)+", "+Sn.transform(n)+", "+Se(Ve.transform(r))+")"};function Mf(t){let e="",n="",r="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const hr={test:oi("#"),parse:Mf,transform:Ft.transform},Be=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Vt=Be("deg"),Tt=Be("%"),F=Be("px"),Vf=Be("vh"),kf=Be("vw"),Xi=j(p({},Tt),{parse:t=>Tt.parse(t)/100,transform:t=>Tt.transform(t*100)}),ee={test:oi("hsl","hue"),parse:ka("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+Tt.transform(Se(e))+", "+Tt.transform(Se(n))+", "+Se(Ve.transform(r))+")"},tt={test:t=>Ft.test(t)||hr.test(t)||ee.test(t),parse:t=>Ft.test(t)?Ft.parse(t):ee.test(t)?ee.parse(t):hr.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Ft.transform(t):ee.transform(t),getAnimatableNone:t=>{const e=tt.parse(t);return e.alpha=0,tt.transform(e)}},Df=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function jf(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(si))==null?void 0:e.length)||0)+(((n=t.match(Df))==null?void 0:n.length)||0)>0}const Da="number",ja="color",Nf="var",Lf="var(",Zi="${}",$f=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ke(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=e.replace($f,c=>(tt.test(c)?(r.color.push(s),i.push(ja),n.push(tt.parse(c))):c.startsWith(Lf)?(r.var.push(s),i.push(Nf),n.push(c)):(r.number.push(s),i.push(Da),n.push(parseFloat(c))),++s,Zi)).split(Zi);return{values:n,split:a,indexes:r,types:i}}function Na(t){return ke(t).values}function La(t){const{split:e,types:n}=ke(t),r=e.length;return i=>{let s="";for(let o=0;o<r;o++)if(s+=e[o],i[o]!==void 0){const a=n[o];a===Da?s+=Se(i[o]):a===ja?s+=tt.transform(i[o]):s+=i[o]}return s}}const If=t=>typeof t=="number"?0:tt.test(t)?tt.getAnimatableNone(t):t;function Bf(t){const e=Na(t);return La(t)(e.map(If))}const Dt={test:jf,parse:Na,createTransformer:La,getAnimatableNone:Bf};function Pn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Ff({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let i=0,s=0,o=0;if(!e)i=s=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,c=2*n-a;i=Pn(c,a,t+1/3),s=Pn(c,a,t),o=Pn(c,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function nn(t,e){return n=>n>0?e:t}const X=(t,e,n)=>t+(e-t)*n,An=(t,e,n)=>{const r=t*t,i=n*(e*e-r)+r;return i<0?0:Math.sqrt(i)},_f=[hr,Ft,ee],Of=t=>_f.find(e=>e.test(t));function Ji(t){const e=Of(t);if(he(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===ee&&(n=Ff(n)),n}const Qi=(t,e)=>{const n=Ji(t),r=Ji(e);if(!n||!r)return nn(t,e);const i=p({},n);return s=>(i.red=An(n.red,r.red,s),i.green=An(n.green,r.green,s),i.blue=An(n.blue,r.blue,s),i.alpha=X(n.alpha,r.alpha,s),Ft.transform(i))},mr=new Set(["none","hidden"]);function Uf(t,e){return mr.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function zf(t,e){return n=>X(t,e,n)}function ai(t){return typeof t=="number"?zf:typeof t=="string"?ii(t)?nn:tt.test(t)?Qi:Gf:Array.isArray(t)?$a:typeof t=="object"?tt.test(t)?Qi:Wf:nn}function $a(t,e){const n=[...t],r=n.length,i=t.map((s,o)=>ai(s)(s,e[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function Wf(t,e){const n=p(p({},t),e),r={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(r[i]=ai(t[i])(t[i],e[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function Hf(t,e){var i;const n=[],r={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],a=t.indexes[o][r[o]],c=(i=t.values[a])!=null?i:0;n[s]=c,r[o]++}return n}const Gf=(t,e)=>{const n=Dt.createTransformer(e),r=ke(t),i=ke(e);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?mr.has(t)&&!i.values.length||mr.has(e)&&!r.values.length?Uf(t,e):$e($a(Hf(r,i),i.values),n):(he(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),nn(t,e))};function Ia(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?X(t,e,n):ai(t)(t,e)}const qf=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>q.update(e,n),stop:()=>kt(e),now:()=>it.isProcessing?it.timestamp:lt.now()}},Ba=(t,e,n=10)=>{let r="";const i=Math.max(Math.round(e/n),2);for(let s=0;s<i;s++)r+=Math.round(t(s/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},rn=2e4;function ci(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<rn;)e+=n,r=t.next(e);return e>=rn?1/0:e}function Yf(t,e=100,n){const r=n(j(p({},t),{keyframes:[0,e]})),i=Math.min(ci(r),rn);return{type:"keyframes",ease:s=>r.next(i*s).value/e,duration:mt(i)}}const Kf=5;function Fa(t,e,n){const r=Math.max(e-Kf,0);return ya(n-t(r),e-r)}const K={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},En=.001;function Xf({duration:t=K.duration,bounce:e=K.bounce,velocity:n=K.velocity,mass:r=K.mass}){let i,s;he(t<=bt(K.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-e;o=At(K.minDamping,K.maxDamping,o),t=At(K.minDuration,K.maxDuration,mt(t)),o<1?(i=l=>{const u=l*o,f=u*t,d=u-n,h=pr(l,o),m=Math.exp(-f);return En-d/h*m},s=l=>{const f=l*o*t,d=f*n+n,h=Math.pow(o,2)*Math.pow(l,2)*t,m=Math.exp(-f),g=pr(Math.pow(l,2),o);return(-i(l)+En>0?-1:1)*((d-h)*m)/g}):(i=l=>{const u=Math.exp(-l*t),f=(l-n)*t+1;return-En+u*f},s=l=>{const u=Math.exp(-l*t),f=(n-l)*(t*t);return u*f});const a=5/t,c=Jf(i,s,a);if(t=bt(t),isNaN(c))return{stiffness:K.stiffness,damping:K.damping,duration:t};{const l=Math.pow(c,2)*r;return{stiffness:l,damping:o*2*Math.sqrt(r*l),duration:t}}}const Zf=12;function Jf(t,e,n){let r=n;for(let i=1;i<Zf;i++)r=r-t(r)/e(r);return r}function pr(t,e){return t*Math.sqrt(1-e*e)}const Qf=["duration","bounce"],td=["stiffness","damping","mass"];function ts(t,e){return e.some(n=>t[n]!==void 0)}function ed(t){let e=p({velocity:K.velocity,stiffness:K.stiffness,damping:K.damping,mass:K.mass,isResolvedFromDuration:!1},t);if(!ts(t,td)&&ts(t,Qf))if(t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*At(.05,1,1-(t.bounce||0))*Math.sqrt(i);e=j(p({},e),{mass:K.mass,stiffness:i,damping:s})}else{const n=Xf(t);e=j(p(p({},e),n),{mass:K.mass}),e.isResolvedFromDuration=!0}return e}function sn(t=K.visualDuration,e=K.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:c,damping:l,mass:u,duration:f,velocity:d,isResolvedFromDuration:h}=ed(j(p({},n),{velocity:-mt(n.velocity||0)})),m=d||0,g=l/(2*Math.sqrt(c*u)),v=o-s,y=mt(Math.sqrt(c/u)),x=Math.abs(v)<5;r||(r=x?K.restSpeed.granular:K.restSpeed.default),i||(i=x?K.restDelta.granular:K.restDelta.default);let b;if(g<1){const R=pr(y,g);b=P=>{const A=Math.exp(-g*y*P);return o-A*((m+g*y*v)/R*Math.sin(R*P)+v*Math.cos(R*P))}}else if(g===1)b=R=>o-Math.exp(-y*R)*(v+(m+y*v)*R);else{const R=y*Math.sqrt(g*g-1);b=P=>{const A=Math.exp(-g*y*P),T=Math.min(R*P,300);return o-A*((m+g*y*v)*Math.sinh(T)+R*v*Math.cosh(T))/R}}const S={calculatedDuration:h&&f||null,next:R=>{const P=b(R);if(h)a.done=R>=f;else{let A=R===0?m:0;g<1&&(A=R===0?bt(m):Fa(b,R,P));const T=Math.abs(A)<=r,M=Math.abs(o-P)<=i;a.done=T&&M}return a.value=a.done?o:P,a},toString:()=>{const R=Math.min(ci(S),rn),P=Ba(A=>S.next(R*A).value,R,30);return R+"ms "+P},toTransition:()=>{}};return S}sn.applyToOptions=t=>{const e=Yf(t,100,sn);return t.ease=e.ease,t.duration=bt(e.duration),t.type="keyframes",t};function gr({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:c,restDelta:l=.5,restSpeed:u}){const f=t[0],d={done:!1,value:f},h=T=>a!==void 0&&T<a||c!==void 0&&T>c,m=T=>a===void 0?c:c===void 0||Math.abs(a-T)<Math.abs(c-T)?a:c;let g=n*e;const v=f+g,y=o===void 0?v:o(v);y!==v&&(g=y-f);const x=T=>-g*Math.exp(-T/r),b=T=>y+x(T),S=T=>{const M=x(T),k=b(T);d.done=Math.abs(M)<=l,d.value=d.done?y:k};let R,P;const A=T=>{h(d.value)&&(R=T,P=sn({keyframes:[d.value,m(d.value)],velocity:Fa(b,T,d.value),damping:i,stiffness:s,restDelta:l,restSpeed:u}))};return A(0),{calculatedDuration:null,next:T=>{let M=!1;return!P&&R===void 0&&(M=!0,S(T),A(T)),R!==void 0&&T>=R?P.next(T-R):(!M&&S(T),d)}}}function nd(t,e,n){const r=[],i=n||Rt.mix||Ia,s=t.length-1;for(let o=0;o<s;o++){let a=i(t[o],t[o+1]);if(e){const c=Array.isArray(e)?e[o]||pt:e;a=$e(c,a)}r.push(a)}return r}function rd(t,e,{clamp:n=!0,ease:r,mixer:i}={}){const s=t.length;if(Et(s===e.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>e[0];if(s===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=nd(e,r,i),c=a.length,l=u=>{if(o&&u<t[0])return e[0];let f=0;if(c>1)for(;f<t.length-2&&!(u<t[f+1]);f++);const d=Me(t[f],t[f+1],u);return a[f](d)};return n?u=>l(At(t[0],t[s-1],u)):l}function id(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=Me(0,e,r);t.push(X(n,1,i))}}function sd(t){const e=[0];return id(e,t.length-1),e}function od(t,e){return t.map(n=>n*e)}function ad(t,e){return t.map(()=>e||Aa).splice(0,t.length-1)}function ne({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const i=bf(r)?r.map(Ki):Ki(r),s={done:!1,value:e[0]},o=od(n&&n.length===e.length?n:sd(e),t),a=rd(o,e,{ease:Array.isArray(i)?i:ad(e,i)});return{calculatedDuration:t,next:c=>(s.value=a(c),s.done=c>=t,s)}}const cd=t=>t!==null;function li(t,{repeat:e,repeatType:n="loop"},r,i=1){const s=t.filter(cd),a=i<0||e&&n!=="loop"&&e%2===1?0:s.length-1;return!a||r===void 0?s[a]:r}const ld={decay:gr,inertia:gr,tween:ne,keyframes:ne,spring:sn};function _a(t){typeof t.type=="string"&&(t.type=ld[t.type])}class ui{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const ud=t=>t/100;class fi extends ui{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,i;const{motionValue:n}=this.options;n&&n.updatedAt!==lt.now()&&this.tick(lt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;_a(e);const{type:n=ne,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=e;let{keyframes:a}=e;const c=n||ne;process.env.NODE_ENV!=="production"&&c!==ne&&Et(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==ne&&typeof a[0]!="number"&&(this.mixKeyframes=$e(ud,Ia(a[0],a[1])),a=[0,100]);const l=c(j(p({},e),{keyframes:a}));s==="mirror"&&(this.mirroredGenerator=c(j(p({},e),{keyframes:[...a].reverse(),velocity:-o}))),l.calculatedDuration===null&&(l.calculatedDuration=ci(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=l}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:r,totalDuration:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:l=0,keyframes:u,repeat:f,repeatType:d,repeatDelay:h,type:m,onUpdate:g,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const y=this.currentTime-l*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let b=this.currentTime,S=r;if(f){const T=Math.min(this.currentTime,i)/a;let M=Math.floor(T),k=T%1;!k&&T>=1&&(k=1),k===1&&M--,M=Math.min(M,f+1),!!(M%2)&&(d==="reverse"?(k=1-k,h&&(k-=h/a)):d==="mirror"&&(S=o)),b=At(0,1,k)*a}const R=x?{done:!1,value:u[0]}:S.next(b);s&&(R.value=s(R.value));let{done:P}=R;!x&&c!==null&&(P=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return A&&m!==gr&&(R.value=li(u,this.options,v,this.speed)),g&&g(R.value),A&&this.finish(),R}then(e,n){return this.finished.then(e,n)}get duration(){return mt(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+mt(e)}get time(){return mt(this.currentTime)}set time(e){var n;e=bt(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(lt.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=mt(this.currentTime))}play(){var i,s;if(this.isStopped)return;const{driver:e=qf,startTime:n}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),(s=(i=this.options).onPlay)==null||s.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n!=null?n:r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(lt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function fd(t){var e;for(let n=1;n<t.length;n++)(e=t[n])!=null||(t[n]=t[n-1])}const _t=t=>t*180/Math.PI,yr=t=>{const e=_t(Math.atan2(t[1],t[0]));return vr(e)},dd={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:yr,rotateZ:yr,skewX:t=>_t(Math.atan(t[1])),skewY:t=>_t(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},vr=t=>(t=t%360,t<0&&(t+=360),t),es=yr,ns=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),rs=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),hd={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ns,scaleY:rs,scale:t=>(ns(t)+rs(t))/2,rotateX:t=>vr(_t(Math.atan2(t[6],t[5]))),rotateY:t=>vr(_t(Math.atan2(-t[2],t[0]))),rotateZ:es,rotate:es,skewX:t=>_t(Math.atan(t[4])),skewY:t=>_t(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function br(t){return t.includes("scale")?1:0}function wr(t,e){if(!t||t==="none")return br(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=hd,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=dd,i=a}if(!i)return br(e);const s=r[e],o=i[1].split(",").map(pd);return typeof s=="function"?s(o):o[s]}const md=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return wr(n,e)};function pd(t){return parseFloat(t.trim())}const pe=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ge=new Set(pe),is=t=>t===me||t===F,gd=new Set(["x","y","z"]),yd=pe.filter(t=>!gd.has(t));function vd(t){const e=[];return yd.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const Ut={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>wr(e,"x"),y:(t,{transform:e})=>wr(e,"y")};Ut.translateX=Ut.x;Ut.translateY=Ut.y;const zt=new Set;let xr=!1,Cr=!1,Tr=!1;function Oa(){if(Cr){const t=Array.from(zt).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const i=vd(r);i.length&&(n.set(r,i),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))==null||a.set(o)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Cr=!1,xr=!1,zt.forEach(t=>t.complete(Tr)),zt.clear()}function Ua(){zt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Cr=!0)})}function bd(){Tr=!0,Ua(),Oa(),Tr=!1}class di{constructor(e,n,r,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(zt.add(this),xr||(xr=!0,q.read(Ua),q.resolveKeyframes(Oa))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:i}=this;if(e[0]===null){const s=i==null?void 0:i.get(),o=e[e.length-1];if(s!==void 0)e[0]=s;else if(r&&n){const a=r.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&s===void 0&&i.set(e[0])}fd(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),zt.delete(this)}cancel(){this.state==="scheduled"&&(zt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const wd=t=>t.startsWith("--");function xd(t,e,n){wd(e)?t.style.setProperty(e,n):t.style[e]=n}const Cd=Qr(()=>window.ScrollTimeline!==void 0),Td={};function Sd(t,e){const n=Qr(t);return()=>{var r;return(r=Td[e])!=null?r:n()}}const za=Sd(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Te=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,ss={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Te([0,.65,.55,1]),circOut:Te([.55,0,1,.45]),backIn:Te([.31,.01,.66,-.59]),backOut:Te([.33,1.53,.69,.99])};function Wa(t,e){if(t)return typeof t=="function"?za()?Ba(t,e):"ease-out":Ea(t)?Te(t):Array.isArray(t)?t.map(n=>Wa(n,e)||ss.easeOut):ss[t]}function Pd(t,e,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeOut",times:c}={},l=void 0){const u={[e]:n};c&&(u.offset=c);const f=Wa(a,i);Array.isArray(f)&&(u.easing=f);const d={delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"};return l&&(d.pseudoElement=l),t.animate(u,d)}function Ha(t){return typeof t=="function"&&"applyToOptions"in t}function Ad(n){var r=n,{type:t}=r,e=z(r,["type"]);var i,s;return Ha(t)&&za()?t.applyToOptions(e):((i=e.duration)!=null||(e.duration=300),(s=e.ease)!=null||(e.ease="easeOut"),e)}class Ed extends ui{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:r,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:a,onComplete:c}=e;this.isPseudoElement=!!s,this.allowFlatten=o,this.options=e,Et(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const l=Ad(e);this.animation=Pd(n,r,i,l,s),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const u=li(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):xd(n,r,u),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,n;this.isPseudoElement||(n=(e=this.animation).commitStyles)==null||n.call(e)}get duration(){var n,r;const e=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return mt(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+mt(e)}get time(){return mt(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=bt(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&Cd()?(this.animation.timeline=e,pt):n(this)}}const Ga={anticipate:Ta,backInOut:Ca,circInOut:Pa};function Rd(t){return t in Ga}function Md(t){typeof t.ease=="string"&&Rd(t.ease)&&(t.ease=Ga[t.ease])}const os=10;class Vd extends Ed{constructor(e){Md(e),_a(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){var u;const l=this.options,{motionValue:n,onUpdate:r,onComplete:i,element:s}=l,o=z(l,["motionValue","onUpdate","onComplete","element"]);if(!n)return;if(e!==void 0){n.set(e);return}const a=new fi(j(p({},o),{autoplay:!1})),c=bt((u=this.finishedTime)!=null?u:this.time);n.setWithVelocity(a.sample(c-os).value,a.sample(c).value,os),a.stop()}}const as=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Dt.test(t)||t==="0")&&!t.startsWith("url("));function kd(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Dd(t,e,n,r){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const s=t[t.length-1],o=as(i,e),a=as(s,e);return he(o===a,`You are trying to animate ${e} from "${i}" to "${s}". "${o?s:i}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:kd(t)||(n==="spring"||Ha(n))&&r}function Sr(t){t.duration=0,t.type="keyframes"}const jd=new Set(["opacity","clipPath","filter","transform"]),Nd=Qr(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Ld(t){var u;const{motionValue:e,name:n,repeatDelay:r,repeatType:i,damping:s,type:o}=t;if(!(((u=e==null?void 0:e.owner)==null?void 0:u.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=e.owner.getProps();return Nd()&&n&&jd.has(n)&&(n!=="transform"||!l)&&!c&&!r&&i!=="mirror"&&s!==0&&o!=="inertia"}const $d=40;class Id extends ui{constructor(d){var h=d,{autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:a,name:c,motionValue:l,element:u}=h,f=z(h,["autoplay","delay","type","repeat","repeatDelay","repeatType","keyframes","name","motionValue","element"]);var v;super(),this.stop=()=>{var y,x;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=lt.now();const m=p({autoplay:e,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,name:c,motionValue:l,element:u},f),g=(u==null?void 0:u.KeyframeResolver)||di;this.keyframeResolver=new g(a,(y,x,b)=>this.onKeyframesResolved(y,x,m,!b),c,l,u),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(e,n,r,i){this.keyframeResolver=void 0;const{name:s,type:o,velocity:a,delay:c,isHandoff:l,onUpdate:u}=r;this.resolvedAt=lt.now(),Dd(e,s,o,a)||((Rt.instantAnimations||!c)&&(u==null||u(li(e,r,n))),e[0]=e[e.length-1],Sr(r),r.repeat=0);const f=i?this.resolvedAt?this.resolvedAt-this.createdAt>$d?this.resolvedAt:this.createdAt:this.createdAt:void 0,d=j(p({startTime:f,finalKeyframe:n},r),{keyframes:e}),h=!l&&Ld(d)?new Vd(j(p({},d),{element:d.motionValue.owner.current})):new fi(d);h.finished.then(()=>this.notifyFinished()).catch(pt),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),bd()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}const Bd=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Fd(t){const e=Bd.exec(t);if(!e)return[,];const[,n,r,i]=e;return[`--${n!=null?n:r}`,i]}const _d=4;function qa(t,e,n=1){Et(n<=_d,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,i]=Fd(t);if(!r)return;const s=window.getComputedStyle(e).getPropertyValue(r);if(s){const o=s.trim();return ma(o)?parseFloat(o):o}return ii(i)?qa(i,e,n+1):i}function hi(t,e){var n,r;return(r=(n=t==null?void 0:t[e])!=null?n:t==null?void 0:t.default)!=null?r:t}const Ya=new Set(["width","height","top","left","right","bottom",...pe]),Od={test:t=>t==="auto",parse:t=>t},Ka=t=>e=>e.test(t),Xa=[me,F,Tt,Vt,kf,Vf,Od],cs=t=>Xa.find(Ka(t));function Ud(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||ga(t):!0}const zd=new Set(["brightness","contrast","saturate","opacity"]);function Wd(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(si)||[];if(!r)return t;const i=n.replace(r,"");let s=zd.has(e)?1:0;return r!==n&&(s*=100),e+"("+s+i+")"}const Hd=/\b([a-z-]*)\(.*?\)/gu,Pr=j(p({},Dt),{getAnimatableNone:t=>{const e=t.match(Hd);return e?e.map(Wd).join(" "):t}}),ls=j(p({},me),{transform:Math.round}),Gd={rotate:Vt,rotateX:Vt,rotateY:Vt,rotateZ:Vt,scale:qe,scaleX:qe,scaleY:qe,scaleZ:qe,skew:Vt,skewX:Vt,skewY:Vt,distance:F,translateX:F,translateY:F,translateZ:F,x:F,y:F,z:F,perspective:F,transformPerspective:F,opacity:Ve,originX:Xi,originY:Xi,originZ:F},mi=j(p({borderWidth:F,borderTopWidth:F,borderRightWidth:F,borderBottomWidth:F,borderLeftWidth:F,borderRadius:F,radius:F,borderTopLeftRadius:F,borderTopRightRadius:F,borderBottomRightRadius:F,borderBottomLeftRadius:F,width:F,maxWidth:F,height:F,maxHeight:F,top:F,right:F,bottom:F,left:F,padding:F,paddingTop:F,paddingRight:F,paddingBottom:F,paddingLeft:F,margin:F,marginTop:F,marginRight:F,marginBottom:F,marginLeft:F,backgroundPositionX:F,backgroundPositionY:F},Gd),{zIndex:ls,fillOpacity:Ve,strokeOpacity:Ve,numOctaves:ls}),qd=j(p({},mi),{color:tt,backgroundColor:tt,outlineColor:tt,fill:tt,stroke:tt,borderColor:tt,borderTopColor:tt,borderRightColor:tt,borderBottomColor:tt,borderLeftColor:tt,filter:Pr,WebkitFilter:Pr}),Za=t=>qd[t];function Ja(t,e){let n=Za(t);return n!==Pr&&(n=Dt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Yd=new Set(["auto","none","0"]);function Kd(t,e,n){let r=0,i;for(;r<t.length&&!i;){const s=t[r];typeof s=="string"&&!Yd.has(s)&&ke(s).values.length&&(i=t[r]),r++}if(i&&n)for(const s of e)t[s]=Ja(n,i)}class Xd extends di{constructor(e,n,r,i,s){super(e,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<e.length;c++){let l=e[c];if(typeof l=="string"&&(l=l.trim(),ii(l))){const u=qa(l,n.current);u!==void 0&&(e[c]=u),c===e.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!Ya.has(r)||e.length!==2)return;const[i,s]=e,o=cs(i),a=cs(s);if(o!==a)if(is(o)&&is(a))for(let c=0;c<e.length;c++){const l=e[c];typeof l=="string"&&(e[c]=parseFloat(l))}else Ut[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let i=0;i<e.length;i++)(e[i]===null||Ud(e[i]))&&r.push(i);r.length&&Kd(e,r,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ut[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(r,i).jump(i,!1)}measureEndState(){var a;const{element:e,name:n,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const s=r.length-1,o=r[s];r[s]=Ut[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([c,l])=>{e.getValue(c).set(l)}),this.resolveNoneKeyframes()}}function Zd(t,e,n){var r;if(t instanceof EventTarget)return[t];if(typeof t=="string"){let i=document;const s=(r=n==null?void 0:n[t])!=null?r:i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t)}const Qa=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function tc(t){return pa(t)&&"offsetHeight"in t}const us=30,Jd=t=>!isNaN(parseFloat(t));class Qd{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;const i=lt.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=lt.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Jd(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&ei(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new ti);const r=this.events[e].add(n);return e==="change"?()=>{r(),q.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=lt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>us)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,us);return ya(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function le(t,e){return new Qd(t,e)}const{schedule:pi}=Ra(queueMicrotask,!1),yt={x:!1,y:!1};function ec(){return yt.x||yt.y}function th(t){return t==="x"||t==="y"?yt[t]?null:(yt[t]=!0,()=>{yt[t]=!1}):yt.x||yt.y?null:(yt.x=yt.y=!0,()=>{yt.x=yt.y=!1})}function nc(t,e){const n=Zd(t),r=new AbortController,i=j(p({passive:!0},e),{signal:r.signal});return[n,i,()=>r.abort()]}function fs(t){return!(t.pointerType==="touch"||ec())}function eh(t,e,n={}){const[r,i,s]=nc(t,n),o=a=>{if(!fs(a))return;const{target:c}=a,l=e(c,a);if(typeof l!="function"||!c)return;const u=f=>{fs(f)&&(l(f),c.removeEventListener("pointerleave",u))};c.addEventListener("pointerleave",u,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const rc=(t,e)=>e?t===e?!0:rc(t,e.parentElement):!1,gi=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,nh=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function rh(t){return nh.has(t.tagName)||t.tabIndex!==-1}const Je=new WeakSet;function ds(t){return e=>{e.key==="Enter"&&t(e)}}function Rn(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const ih=(t,e)=>{const n=t.currentTarget;if(!n)return;const r=ds(()=>{if(Je.has(n))return;Rn(n,"down");const i=ds(()=>{Rn(n,"up")}),s=()=>Rn(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",s,e)});n.addEventListener("keydown",r,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),e)};function hs(t){return gi(t)&&!ec()}function sh(t,e,n={}){const[r,i,s]=nc(t,n),o=a=>{const c=a.currentTarget;if(!hs(a))return;Je.add(c);const l=e(c,a),u=(h,m)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),Je.has(c)&&Je.delete(c),hs(h)&&typeof l=="function"&&l(h,{success:m})},f=h=>{u(h,c===window||c===document||n.useGlobalTarget||rc(c,h.target))},d=h=>{u(h,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",d,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),tc(a)&&(a.addEventListener("focus",l=>ih(l,i)),!rh(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function ic(t){return pa(t)&&"ownerSVGElement"in t}function oh(t){return ic(t)&&t.tagName==="svg"}const st=t=>!!(t&&t.getVelocity),ah=[...Xa,tt,Dt],ch=t=>ah.find(Ka(t)),yi=E.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function ms(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function lh(...t){return e=>{let n=!1;const r=t.map(i=>{const s=ms(i,e);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():ms(t[i],null)}}}}function uh(...t){return ln.useCallback(lh(...t),t)}class fh extends ln.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=tc(r)&&r.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=i-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function dh({children:t,isPresent:e,anchorX:n,root:r}){const i=E.useId(),s=E.useRef(null),o=E.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=E.useContext(yi),c=uh(s,t==null?void 0:t.ref);return E.useInsertionEffect(()=>{const{width:l,height:u,top:f,left:d,right:h}=o.current;if(e||!s.current||!l||!u)return;const m=n==="left"?`left: ${d}`:`right: ${h}`;s.current.dataset.motionPopId=i;const g=document.createElement("style");a&&(g.nonce=a);const v=r!=null?r:document.head;return v.appendChild(g),g.sheet&&g.sheet.insertRule(`
11
+ [data-motion-pop-id="${i}"] {
12
+ position: absolute !important;
13
+ width: ${l}px !important;
14
+ height: ${u}px !important;
15
+ ${m}px !important;
16
+ top: ${f}px !important;
17
+ }
18
+ `),()=>{v.contains(g)&&v.removeChild(g)}},[e]),w.jsx(fh,{isPresent:e,childRef:s,sizeRef:o,children:ln.cloneElement(t,{ref:c})})}const hh=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a,root:c})=>{const l=Kr(mh),u=E.useId();let f=!0,d=E.useMemo(()=>(f=!1,{id:u,initial:e,isPresent:n,custom:i,onExitComplete:h=>{l.set(h,!0);for(const m of l.values())if(!m)return;r&&r()},register:h=>(l.set(h,!1),()=>l.delete(h))}),[n,l,r]);return s&&f&&(d=p({},d)),E.useMemo(()=>{l.forEach((h,m)=>l.set(m,!1))},[n]),ln.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(t=w.jsx(dh,{isPresent:n,anchorX:a,root:c,children:t})),w.jsx(dn.Provider,{value:d,children:t})};function mh(){return new Map}function sc(t=!0){const e=E.useContext(dn);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=e,s=E.useId();E.useEffect(()=>{if(t)return i(s)},[t]);const o=E.useCallback(()=>t&&r&&r(s),[s,r,t]);return!n&&r?[!1,o]:[!0]}const Ye=t=>t.key||"";function ps(t){const e=[];return E.Children.forEach(t,n=>{E.isValidElement(n)&&e.push(n)}),e}const ph=({children:t,custom:e,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left",root:c})=>{const[l,u]=sc(o),f=E.useMemo(()=>ps(t),[t]),d=o&&!l?[]:f.map(Ye),h=E.useRef(!0),m=E.useRef(f),g=Kr(()=>new Map),[v,y]=E.useState(f),[x,b]=E.useState(f);ha(()=>{h.current=!1,m.current=f;for(let P=0;P<x.length;P++){const A=Ye(x[P]);d.includes(A)?g.delete(A):g.get(A)!==!0&&g.set(A,!1)}},[x,d.length,d.join("-")]);const S=[];if(f!==v){let P=[...f];for(let A=0;A<x.length;A++){const T=x[A],M=Ye(T);d.includes(M)||(P.splice(A,0,T),S.push(T))}return s==="wait"&&S.length&&(P=S),b(ps(P)),y(f),null}process.env.NODE_ENV!=="production"&&s==="wait"&&x.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:R}=E.useContext(Yr);return w.jsx(w.Fragment,{children:x.map(P=>{const A=Ye(P),T=o&&!l?!1:f===x||d.includes(A),M=()=>{if(g.has(A))g.set(A,!0);else return;let k=!0;g.forEach(D=>{D||(k=!1)}),k&&(R==null||R(),b(m.current),o&&(u==null||u()),r&&r())};return w.jsx(hh,{isPresent:T,initial:!h.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:s,root:c,onExitComplete:T?void 0:M,anchorX:a,children:P},A)})})},oc=E.createContext({strict:!1}),gs={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"]},ue={};for(const t in gs)ue[t]={isEnabled:e=>gs[t].some(n=>!!e[n])};function gh(t){for(const e in t)ue[e]=p(p({},ue[e]),t[e])}const yh=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 on(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||yh.has(t)}let ac=t=>!on(t);function vh(t){typeof t=="function"&&(ac=e=>e.startsWith("on")?!on(e):t(e))}try{vh(require("@emotion/is-prop-valid").default)}catch(t){}function bh(t,e,n){const r={};for(const i in t)i==="values"&&typeof t.values=="object"||(ac(i)||n===!0&&on(i)||!e&&!on(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}const hn=E.createContext({});function mn(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function De(t){return typeof t=="string"||Array.isArray(t)}const vi=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],bi=["initial",...vi];function pn(t){return mn(t.animate)||bi.some(e=>De(t[e]))}function cc(t){return!!(pn(t)||t.variants)}function wh(t,e){if(pn(t)){const{initial:n,animate:r}=t;return{initial:n===!1||De(n)?n:void 0,animate:De(r)?r:void 0}}return t.inherit!==!1?e:{}}function xh(t){const{initial:e,animate:n}=wh(t,E.useContext(hn));return E.useMemo(()=>({initial:e,animate:n}),[ys(e),ys(n)])}function ys(t){return Array.isArray(t)?t.join(" "):t}function vs(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const xe={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(F.test(t))t=parseFloat(t);else return t;const n=vs(t,e.target.x),r=vs(t,e.target.y);return`${n}% ${r}%`}},Ch={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,i=Dt.parse(t);if(i.length>5)return r;const s=Dt.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,c=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=c;const l=X(a,c,.5);return typeof i[2+o]=="number"&&(i[2+o]/=l),typeof i[3+o]=="number"&&(i[3+o]/=l),s(i)}},Ar={borderRadius:j(p({},xe),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:xe,borderTopRightRadius:xe,borderBottomLeftRadius:xe,borderBottomRightRadius:xe,boxShadow:Ch};function lc(t,{layout:e,layoutId:n}){return ge.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Ar[t]||t==="opacity")}const Th={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Sh=pe.length;function Ph(t,e,n){let r="",i=!0;for(let s=0;s<Sh;s++){const o=pe[s],a=t[o];if(a===void 0)continue;let c=!0;if(typeof a=="number"?c=a===(o.startsWith("scale")?1:0):c=parseFloat(a)===0,!c||n){const l=Qa(a,mi[o]);if(!c){i=!1;const u=Th[o]||o;r+=`${u}(${l}) `}n&&(e[o]=l)}}return r=r.trim(),n?r=n(e,i?"":r):i&&(r="none"),r}function wi(t,e,n){const{style:r,vars:i,transformOrigin:s}=t;let o=!1,a=!1;for(const c in e){const l=e[c];if(ge.has(c)){o=!0;continue}else if(Va(c)){i[c]=l;continue}else{const u=Qa(l,mi[c]);c.startsWith("origin")?(a=!0,s[c]=u):r[c]=u}}if(e.transform||(o||n?r.transform=Ph(e,t.transform,n):r.transform&&(r.transform="none")),a){const{originX:c="50%",originY:l="50%",originZ:u=0}=s;r.transformOrigin=`${c} ${l} ${u}`}}const xi=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function uc(t,e,n){for(const r in e)!st(e[r])&&!lc(r,n)&&(t[r]=e[r])}function Ah({transformTemplate:t},e){return E.useMemo(()=>{const n=xi();return wi(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Eh(t,e){const n=t.style||{},r={};return uc(r,n,t),Object.assign(r,Ah(t,e)),r}function Rh(t,e){const n={},r=Eh(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.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=r,n}const Mh={offset:"stroke-dashoffset",array:"stroke-dasharray"},Vh={offset:"strokeDashoffset",array:"strokeDasharray"};function kh(t,e,n=1,r=0,i=!0){t.pathLength=1;const s=i?Mh:Vh;t[s.offset]=F.transform(-r);const o=F.transform(e),a=F.transform(n);t[s.array]=`${o} ${a}`}function fc(t,f,c,l,u){var d=f,{attrX:e,attrY:n,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:o=0}=d,a=z(d,["attrX","attrY","attrScale","pathLength","pathSpacing","pathOffset"]);var g,v;if(wi(t,a,l),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:m}=t;h.transform&&(m.transform=h.transform,delete h.transform),(m.transform||h.transformOrigin)&&(m.transformOrigin=(g=h.transformOrigin)!=null?g:"50% 50%",delete h.transformOrigin),m.transform&&(m.transformBox=(v=u==null?void 0:u.transformBox)!=null?v:"fill-box",delete h.transformBox),e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),i!==void 0&&kh(h,i,s,o,!1)}const dc=()=>j(p({},xi()),{attrs:{}}),hc=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Dh(t,e,n,r){const i=E.useMemo(()=>{const s=dc();return fc(s,e,hc(r),t.transformTemplate,t.style),j(p({},s.attrs),{style:p({},s.style)})},[e]);if(t.style){const s={};uc(s,t.style,t),i.style=p(p({},s),i.style)}return i}const jh=["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 Ci(t){return typeof t!="string"||t.includes("-")?!1:!!(jh.indexOf(t)>-1||/[A-Z]/u.test(t))}function Nh(t,e,n,{latestValues:r},i,s=!1){const a=(Ci(t)?Dh:Rh)(e,r,i,t),c=bh(e,typeof t=="string",s),l=t!==E.Fragment?j(p(p({},c),a),{ref:n}):{},{children:u}=e,f=E.useMemo(()=>st(u)?u.get():u,[u]);return E.createElement(t,j(p({},l),{children:f}))}function bs(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function Ti(t,e,n,r){if(typeof e=="function"){const[i,s]=bs(r);e=e(n!==void 0?n:t.custom,i,s)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,s]=bs(r);e=e(n!==void 0?n:t.custom,i,s)}return e}function Qe(t){return st(t)?t.get():t}function Lh({scrapeMotionValuesFromProps:t,createRenderState:e},n,r,i){return{latestValues:$h(n,r,i,t),renderState:e()}}function $h(t,e,n,r){const i={},s=r(t,{});for(const h in s)i[h]=Qe(s[h]);let{initial:o,animate:a}=t;const c=pn(t),l=cc(t);e&&l&&!c&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const f=u?a:o;if(f&&typeof f!="boolean"&&!mn(f)){const h=Array.isArray(f)?f:[f];for(let m=0;m<h.length;m++){const g=Ti(t,h[m]);if(g){const d=g,{transitionEnd:v,transition:y}=d,x=z(d,["transitionEnd","transition"]);for(const b in x){let S=x[b];if(Array.isArray(S)){const R=u?S.length-1:0;S=S[R]}S!==null&&(i[b]=S)}for(const b in v)i[b]=v[b]}}}return i}const mc=t=>(e,n)=>{const r=E.useContext(hn),i=E.useContext(dn),s=()=>Lh(t,e,r,i);return n?s():Kr(s)};function Si(t,e,n){var s;const{style:r}=t,i={};for(const o in r)(st(r[o])||e.style&&st(e.style[o])||lc(o,t)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const Ih=mc({scrapeMotionValuesFromProps:Si,createRenderState:xi});function pc(t,e,n){const r=Si(t,e,n);for(const i in t)if(st(t[i])||st(e[i])){const s=pe.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=t[i]}return r}const Bh=mc({scrapeMotionValuesFromProps:pc,createRenderState:dc}),Fh=Symbol.for("motionComponentSymbol");function re(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function _h(t,e,n){return E.useCallback(r=>{r&&t.onMount&&t.onMount(r),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):re(n)&&(n.current=r))},[e])}const Pi=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Oh="framerAppearId",gc="data-"+Pi(Oh),yc=E.createContext({});function Uh(t,e,n,r,i){var g,v;const{visualElement:s}=E.useContext(hn),o=E.useContext(oc),a=E.useContext(dn),c=E.useContext(yi).reducedMotion,l=E.useRef(null);r=r||o.renderer,!l.current&&r&&(l.current=r(t,{visualState:e,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:c}));const u=l.current,f=E.useContext(yc);u&&!u.projection&&i&&(u.type==="html"||u.type==="svg")&&zh(l.current,n,i,f);const d=E.useRef(!1);E.useInsertionEffect(()=>{u&&d.current&&u.update(n,a)});const h=n[gc],m=E.useRef(!!h&&!((g=window.MotionHandoffIsComplete)!=null&&g.call(window,h))&&((v=window.MotionHasOptimisedAnimation)==null?void 0:v.call(window,h)));return ha(()=>{u&&(d.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),m.current&&u.animationState&&u.animationState.animateChanges())}),E.useEffect(()=>{u&&(!m.current&&u.animationState&&u.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)==null||y.call(window,h)}),m.current=!1),u.enteringChildren=void 0)}),u}function zh(t,e,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:c,layoutRoot:l,layoutCrossfade:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:vc(t.parent)),t.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&re(a),visualElement:t,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:c,layoutRoot:l})}function vc(t){if(t)return t.options.allowProjection!==!1?t.projection:vc(t.parent)}function Mn(t,{forwardMotionProps:e=!1}={},n,r){var a,c;n&&gh(n);const i=Ci(t)?Bh:Ih;function s(l,u){let f;const d=j(p(p({},E.useContext(yi)),l),{layoutId:Wh(l)}),{isStatic:h}=d,m=xh(l),g=i(l,h);if(!h&&Xr){Hh(d,n);const v=Gh(d);f=v.MeasureLayout,m.visualElement=Uh(t,g,d,r,v.ProjectionNode)}return w.jsxs(hn.Provider,{value:m,children:[f&&m.visualElement?w.jsx(f,p({visualElement:m.visualElement},d)):null,Nh(t,l,_h(g,m.visualElement,u),g,h,e)]})}s.displayName=`motion.${typeof t=="string"?t:`create(${(c=(a=t.displayName)!=null?a:t.name)!=null?c:""})`}`;const o=E.forwardRef(s);return o[Fh]=t,o}function Wh({layoutId:t}){const e=E.useContext(Yr).id;return e&&t!==void 0?e+"-"+t:t}function Hh(t,e){const n=E.useContext(oc).strict;if(process.env.NODE_ENV!=="production"&&e&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?he(!1,r,"lazy-strict-mode"):Et(!1,r,"lazy-strict-mode")}}function Gh(t){const{drag:e,layout:n}=ue;if(!e&&!n)return{};const r=p(p({},e),n);return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function qh(t,e){if(typeof Proxy=="undefined")return Mn;const n=new Map,r=(s,o)=>Mn(s,o,t,e),i=(s,o)=>(process.env.NODE_ENV!=="production"&&ei(!1,"motion() is deprecated. Use motion.create() instead."),r(s,o));return new Proxy(i,{get:(s,o)=>o==="create"?r:(n.has(o)||n.set(o,Mn(o,void 0,t,e)),n.get(o))})}function bc({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function Yh({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Kh(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Vn(t){return t===void 0||t===1}function Er({scale:t,scaleX:e,scaleY:n}){return!Vn(t)||!Vn(e)||!Vn(n)}function Bt(t){return Er(t)||wc(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function wc(t){return ws(t.x)||ws(t.y)}function ws(t){return t&&t!=="0%"}function an(t,e,n){const r=t-n,i=e*r;return n+i}function xs(t,e,n,r,i){return i!==void 0&&(t=an(t,i,r)),an(t,n,r)+e}function Rr(t,e=0,n=1,r,i){t.min=xs(t.min,e,n,r,i),t.max=xs(t.max,e,n,r,i)}function xc(t,{x:e,y:n}){Rr(t.x,e.translate,e.scale,e.originPoint),Rr(t.y,n.translate,n.scale,n.originPoint)}const Cs=.999999999999,Ts=1.0000000000001;function Xh(t,e,n,r=!1){const i=n.length;if(!i)return;e.x=e.y=1;let s,o;for(let a=0;a<i;a++){s=n[a],o=s.projectionDelta;const{visualElement:c}=s.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&se(t,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,xc(t,o)),r&&Bt(s.latestValues)&&se(t,s.latestValues))}e.x<Ts&&e.x>Cs&&(e.x=1),e.y<Ts&&e.y>Cs&&(e.y=1)}function ie(t,e){t.min=t.min+e,t.max=t.max+e}function Ss(t,e,n,r,i=.5){const s=X(t.min,t.max,i);Rr(t,e,n,s,r)}function se(t,e){Ss(t.x,e.x,e.scaleX,e.scale,e.originX),Ss(t.y,e.y,e.scaleY,e.scale,e.originY)}function Cc(t,e){return bc(Kh(t.getBoundingClientRect(),e))}function Zh(t,e,n){const r=Cc(t,n),{scroll:i}=e;return i&&(ie(r.x,i.offset.x),ie(r.y,i.offset.y)),r}const Ps=()=>({translate:0,scale:1,origin:0,originPoint:0}),oe=()=>({x:Ps(),y:Ps()}),As=()=>({min:0,max:0}),nt=()=>({x:As(),y:As()}),Mr={current:null},Tc={current:!1};function Jh(){if(Tc.current=!0,!!Xr)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Mr.current=t.matches;t.addEventListener("change",e),e()}else Mr.current=!1}const Qh=new WeakMap;function tm(t,e,n){for(const r in e){const i=e[r],s=n[r];if(st(i))t.addValue(r,i);else if(st(s))t.addValue(r,le(i,{owner:t}));else if(s!==i)if(t.hasValue(r)){const o=t.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(r);t.addValue(r,le(o!==void 0?o:i,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const Es=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class em{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=di,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 h=lt.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,q.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget=p({},c),this.initialValues=n.initial?p({},c):{},this.renderState=l,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=pn(n),this.isVariantNode=cc(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const d=this.scrapeMotionValuesFromProps(n,{},this),{willChange:u}=d,f=z(d,["willChange"]);for(const h in f){const m=f[h];c[h]!==void 0&&st(m)&&m.set(c[h])}}mount(e){var n;this.current=e,Qh.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((r,i)=>this.bindToMotionValue(i,r)),Tc.current||Jh(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Mr.current,process.env.NODE_ENV!=="production"&&ei(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),kt(this.notifyUpdate),kt(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(e){var n;this.children.add(e),(n=this.enteringChildren)!=null||(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 r=ge.has(e);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&q.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),s&&s(),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 ue){const n=ue[e];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[e]&&i&&r(this.props)&&(this.features[e]=new i(this)),this.features[e]){const s=this.features[e];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):nt()}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 r=0;r<Es.length;r++){const i=Es[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=e[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=tm(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 r=this.values.get(e);n!==r&&(r&&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 r=this.values.get(e);return r===void 0&&n!==void 0&&(r=le(n===null?void 0:n,{owner:this}),this.addValue(e,r)),r}readValue(e,n){var i;let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(i=this.getBaseTargetFromProps(this.props,e))!=null?i:this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(ma(r)||ga(r))?r=parseFloat(r):!ch(r)&&Dt.test(n)&&(r=Ja(e,n)),this.setBaseTarget(e,st(r)?r.get():r)),st(r)?r.get():r}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=Ti(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);o&&(r=o[e])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!st(i)?i:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new ti),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){pi.render(this.render)}}class Sc extends em{constructor(){super(...arguments),this.KeyframeResolver=Xd}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:r}){delete n[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;st(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Pc(t,{style:e,vars:n},r,i){const s=t.style;let o;for(o in e)s[o]=e[o];i==null||i.applyProjectionStyles(s,r);for(o in n)s.setProperty(o,n[o])}function nm(t){return window.getComputedStyle(t)}class rm extends Sc{constructor(){super(...arguments),this.type="html",this.renderInstance=Pc}readValueFromInstance(e,n){var r;if(ge.has(n))return(r=this.projection)!=null&&r.isProjecting?br(n):md(e,n);{const i=nm(e),s=(Va(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Cc(e,n)}build(e,n,r){wi(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return Si(e,n,r)}}const Ac=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 im(t,e,n,r){Pc(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(Ac.has(i)?i:Pi(i),e.attrs[i])}class sm extends Sc{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=nt}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(ge.has(n)){const r=Za(n);return r&&r.default||0}return n=Ac.has(n)?n:Pi(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,r){return pc(e,n,r)}build(e,n,r){fc(e,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,n,r,i){im(e,n,r,i)}mount(e){this.isSVGTag=hc(e.tagName),super.mount(e)}}const om=(t,e)=>Ci(t)?new sm(e):new rm(e,{allowProjection:t!==E.Fragment});function ae(t,e,n){const r=t.getProps();return Ti(r,e,n!==void 0?n:r.custom,t)}const Vr=t=>Array.isArray(t);function am(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,le(n))}function cm(t){return Vr(t)?t[t.length-1]||0:t}function lm(t,e){let o=ae(t,e)||{},{transitionEnd:r={},transition:i={}}=o,s=z(o,["transitionEnd","transition"]);s=p(p({},s),r);for(const a in s){const c=cm(s[a]);am(t,a,c)}}function um(t){return!!(st(t)&&t.add)}function kr(t,e){const n=t.getValue("willChange");if(um(n))return n.add(e);if(!n&&Rt.WillChange){const r=new Rt.WillChange("auto");t.addValue("willChange",r),r.add(e)}}function Ec(t){return t.props[gc]}const fm=t=>t!==null;function dm(t,{repeat:e,repeatType:n="loop"},r){const i=t.filter(fm),s=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[s]}const hm={type:"spring",stiffness:500,damping:25,restSpeed:10},mm=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),pm={type:"keyframes",duration:.8},gm={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ym=(t,{keyframes:e})=>e.length>2?pm:ge.has(t)?t.startsWith("scale")?mm(e[1]):hm:gm;function vm(f){var d=f,{when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:c,elapsed:l}=d,u=z(d,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);return!!Object.keys(u).length}const Ai=(t,e,n,r={},i,s)=>o=>{const a=hi(r,t)||{},c=a.delay||r.delay||0;let{elapsed:l=0}=r;l=l-bt(c);const u=j(p({keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity()},a),{delay:-l,onUpdate:d=>{e.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:s?void 0:i});vm(a)||Object.assign(u,ym(t,u)),u.duration&&(u.duration=bt(u.duration)),u.repeatDelay&&(u.repeatDelay=bt(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Sr(u),u.delay===0&&(f=!0)),(Rt.instantAnimations||Rt.skipAnimations)&&(f=!0,Sr(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,f&&!s&&e.get()!==void 0){const d=dm(u.keyframes,a);if(d!==void 0){q.update(()=>{u.onUpdate(d),u.onComplete()});return}}return a.isSync?new fi(u):new Id(u)};function bm({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function Rc(t,e,{delay:n=0,transitionOverride:r,type:i}={}){var f;let u=e,{transition:s=t.getDefaultTransition(),transitionEnd:o}=u,a=z(u,["transition","transitionEnd"]);r&&(s=r);const c=[],l=i&&t.animationState&&t.animationState.getState()[i];for(const d in a){const h=t.getValue(d,(f=t.latestValues[d])!=null?f:null),m=a[d];if(m===void 0||l&&bm(l,d))continue;const g=p({delay:n},hi(s||{},d)),v=h.get();if(v!==void 0&&!h.isAnimating&&!Array.isArray(m)&&m===v&&!g.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const b=Ec(t);if(b){const S=window.MotionHandoffAnimation(b,d,q);S!==null&&(g.startTime=S,y=!0)}}kr(t,d),h.start(Ai(d,h,m,t.shouldReduceMotion&&Ya.has(d)?{type:!1}:g,t,y));const x=h.animation;x&&c.push(x)}return o&&Promise.all(c).then(()=>{q.update(()=>{o&&lm(t,o)})}),c}function Mc(t,e,n,r=0,i=1){const s=Array.from(t).sort((l,u)=>l.sortNodePosition(u)).indexOf(e),o=t.size,a=(o-1)*r;return typeof n=="function"?n(s,o):i===1?s*r:a-s*r}function Dr(t,e,n={}){var c;const r=ae(t,e,n.type==="exit"?(c=t.presenceContext)==null?void 0:c.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(Rc(t,r,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:d}=i;return wm(t,e,l,u,f,d,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[s,o]:[o,s];return l().then(()=>u())}else return Promise.all([s(),o(n.delay)])}function wm(t,e,n=0,r=0,i=0,s=1,o){const a=[];for(const c of t.variantChildren)c.notify("AnimationStart",e),a.push(Dr(c,e,j(p({},o),{delay:n+(typeof r=="function"?0:r)+Mc(t.variantChildren,c,r,i,s)})).then(()=>c.notify("AnimationComplete",e)));return Promise.all(a)}function xm(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const i=e.map(s=>Dr(t,s,n));r=Promise.all(i)}else if(typeof e=="string")r=Dr(t,e,n);else{const i=typeof e=="function"?ae(t,e,n.custom):e;r=Promise.all(Rc(t,i,n))}return r.then(()=>{t.notify("AnimationComplete",e)})}function Vc(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}const Cm=bi.length;function kc(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?kc(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Cm;n++){const r=bi[n],i=t.props[r];(De(i)||i===!1)&&(e[r]=i)}return e}const Tm=[...vi].reverse(),Sm=vi.length;function Pm(t){return e=>Promise.all(e.map(({animation:n,options:r})=>xm(t,n,r)))}function Am(t){let e=Pm(t),n=Rs(),r=!0;const i=c=>(l,u)=>{var d;const f=ae(t,u,c==="exit"?(d=t.presenceContext)==null?void 0:d.custom:void 0);if(f){const h=f,{transition:m,transitionEnd:g}=h,v=z(h,["transition","transitionEnd"]);l=p(p(p({},l),v),g)}return l};function s(c){e=c(t)}function o(c){const{props:l}=t,u=kc(t.parent)||{},f=[],d=new Set;let h={},m=1/0;for(let v=0;v<Sm;v++){const y=Tm[v],x=n[y],b=l[y]!==void 0?l[y]:u[y],S=De(b),R=y===c?x.isActive:null;R===!1&&(m=v);let P=b===u[y]&&b!==l[y]&&S;if(P&&r&&t.manuallyAnimateOnMount&&(P=!1),x.protectedKeys=p({},h),!x.isActive&&R===null||!b&&!x.prevProp||mn(b)||typeof b=="boolean")continue;const A=Em(x.prevProp,b);let T=A||y===c&&x.isActive&&!P&&S||v>m&&S,M=!1;const k=Array.isArray(b)?b:[b];let D=k.reduce(i(y),{});R===!1&&(D={});const{prevResolvedValues:N={}}=x,L=p(p({},N),D),B=G=>{T=!0,d.has(G)&&(M=!0,d.delete(G)),x.needsAnimating[G]=!0;const Y=t.getValue(G);Y&&(Y.liveStyle=!1)};for(const G in L){const Y=D[G],I=N[G];if(h.hasOwnProperty(G))continue;let O=!1;Vr(Y)&&Vr(I)?O=!Vc(Y,I):O=Y!==I,O?Y!=null?B(G):d.add(G):Y!==void 0&&d.has(G)?B(G):x.protectedKeys[G]=!0}x.prevProp=b,x.prevResolvedValues=D,x.isActive&&(h=p(p({},h),D)),r&&t.blockInitialAnimation&&(T=!1);const Z=P&&A;T&&(!Z||M)&&f.push(...k.map(G=>{const Y={type:y};if(typeof G=="string"&&r&&!Z&&t.manuallyAnimateOnMount&&t.parent){const{parent:I}=t,O=ae(I,G);if(I.enteringChildren&&O){const{delayChildren:C}=O.transition||{};Y.delay=Mc(I.enteringChildren,t,C)}}return{animation:G,options:Y}}))}if(d.size){const v={};if(typeof l.initial!="boolean"){const y=ae(t,Array.isArray(l.initial)?l.initial[0]:l.initial);y&&y.transition&&(v.transition=y.transition)}d.forEach(y=>{const x=t.getBaseTarget(y),b=t.getValue(y);b&&(b.liveStyle=!0),v[y]=x!=null?x:null}),f.push({animation:v})}let g=!!f.length;return r&&(l.initial===!1||l.initial===l.animate)&&!t.manuallyAnimateOnMount&&(g=!1),r=!1,g?e(f):Promise.resolve()}function a(c,l){var f;if(n[c].isActive===l)return Promise.resolve();(f=t.variantChildren)==null||f.forEach(d=>{var h;return(h=d.animationState)==null?void 0:h.setActive(c,l)}),n[c].isActive=l;const u=o(c);for(const d in n)n[d].protectedKeys={};return u}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Rs()}}}function Em(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Vc(e,t):!1}function It(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Rs(){return{animate:It(!0),whileInView:It(),whileHover:It(),whileTap:It(),whileDrag:It(),whileFocus:It(),exit:It()}}class Nt{constructor(e){this.isMounted=!1,this.node=e}update(){}}class Rm extends Nt{constructor(e){super(e),e.animationState||(e.animationState=Am(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();mn(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(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let Mm=0;class Vm extends Nt{constructor(){super(...arguments),this.id=Mm++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.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 km={animation:{Feature:Rm},exit:{Feature:Vm}};function je(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}function Fe(t){return{point:{x:t.pageX,y:t.pageY}}}const Dm=t=>e=>gi(e)&&t(e,Fe(e));function Pe(t,e,n,r){return je(t,e,Dm(n),r)}const Dc=1e-4,jm=1-Dc,Nm=1+Dc,jc=.01,Lm=0-jc,$m=0+jc;function ot(t){return t.max-t.min}function Im(t,e,n){return Math.abs(t-e)<=n}function Ms(t,e,n,r=.5){t.origin=r,t.originPoint=X(e.min,e.max,t.origin),t.scale=ot(n)/ot(e),t.translate=X(n.min,n.max,t.origin)-t.originPoint,(t.scale>=jm&&t.scale<=Nm||isNaN(t.scale))&&(t.scale=1),(t.translate>=Lm&&t.translate<=$m||isNaN(t.translate))&&(t.translate=0)}function Ae(t,e,n,r){Ms(t.x,e.x,n.x,r?r.originX:void 0),Ms(t.y,e.y,n.y,r?r.originY:void 0)}function Vs(t,e,n){t.min=n.min+e.min,t.max=t.min+ot(e)}function Bm(t,e,n){Vs(t.x,e.x,n.x),Vs(t.y,e.y,n.y)}function ks(t,e,n){t.min=e.min-n.min,t.max=t.min+ot(e)}function cn(t,e,n){ks(t.x,e.x,n.x),ks(t.y,e.y,n.y)}function ht(t){return[t("x"),t("y")]}const Nc=({current:t})=>t?t.ownerDocument.defaultView:null,Ds=(t,e)=>Math.abs(t-e);function Fm(t,e){const n=Ds(t.x,e.x),r=Ds(t.y,e.y);return Math.sqrt(Oe(n,2)+Oe(r,2))}class Lc{constructor(e,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:o=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=Dn(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,m=Fm(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!m)return;const{point:g}=d,{timestamp:v}=it;this.history.push(j(p({},g),{timestamp:v}));const{onStart:y,onMove:x}=this.handlers;h||(y&&y(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=kn(h,this.transformPagePoint),q.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Dn(d.type==="pointercancel"?this.lastMoveEventInfo:kn(h,this.transformPagePoint),this.history);this.startEvent&&m&&m(d,y),g&&g(d,y)},!gi(e))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const a=Fe(e),c=kn(a,this.transformPagePoint),{point:l}=c,{timestamp:u}=it;this.history=[j(p({},l),{timestamp:u})];const{onSessionStart:f}=n;f&&f(e,Dn(c,this.history)),this.removeListeners=$e(Pe(this.contextWindow,"pointermove",this.handlePointerMove),Pe(this.contextWindow,"pointerup",this.handlePointerUp),Pe(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),kt(this.updatePoint)}}function kn(t,e){return e?{point:e(t.point)}:t}function js(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Dn({point:t},e){return{point:t,delta:js(t,$c(e)),offset:js(t,_m(e)),velocity:Om(e,.1)}}function _m(t){return t[0]}function $c(t){return t[t.length-1]}function Om(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const i=$c(t);for(;n>=0&&(r=t[n],!(i.timestamp-r.timestamp>bt(e)));)n--;if(!r)return{x:0,y:0};const s=mt(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Um(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?X(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?X(n,t,r.max):Math.min(t,n)),t}function Ns(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 zm(t,{top:e,left:n,bottom:r,right:i}){return{x:Ns(t.x,n,i),y:Ns(t.y,e,r)}}function Ls(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function Wm(t,e){return{x:Ls(t.x,e.x),y:Ls(t.y,e.y)}}function Hm(t,e){let n=.5;const r=ot(t),i=ot(e);return i>r?n=Me(e.min,e.max-r,t.min):r>i&&(n=Me(t.min,t.max-i,e.min)),At(0,1,n)}function Gm(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 jr=.35;function qm(t=jr){return t===!1?t=0:t===!0&&(t=jr),{x:$s(t,"left","right"),y:$s(t,"top","bottom")}}function $s(t,e,n){return{min:Is(t,e),max:Is(t,n)}}function Is(t,e){return typeof t=="number"?t:t[e]||0}const Ym=new WeakMap;class Km{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=nt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const s=f=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Fe(f).point)},o=(f,d)=>{const{drag:h,dragPropagation:m,onDragStart:g}=this.getProps();if(h&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=th(h),!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),ht(y=>{let x=this.getAxisMotionValue(y).get()||0;if(Tt.test(x)){const{projection:b}=this.visualElement;if(b&&b.layout){const S=b.layout.layoutBox[y];S&&(x=ot(S)*(parseFloat(x)/100))}}this.originPoint[y]=x}),g&&q.postRender(()=>g(f,d)),kr(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},a=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d;const{dragPropagation:h,dragDirectionLock:m,onDirectionLock:g,onDrag:v}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:y}=d;if(m&&this.currentDirection===null){this.currentDirection=Xm(y),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",d.point,y),this.updateAxis("y",d.point,y),this.visualElement.render(),v&&v(f,d)},c=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d,this.stop(f,d),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>ht(f=>{var d;return this.getAnimationState(f)==="paused"&&((d=this.getAxisMotionValue(f).animation)==null?void 0:d.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Lc(e,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:c,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:Nc(this.visualElement)})}stop(e,n){const r=e||this.latestPointerEvent,i=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!r)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&q.postRender(()=>a(r,i))}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:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,r){const{drag:i}=this.getProps();if(!r||!Ke(e,i,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(o=Um(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:e,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;e&&re(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=zm(r.layoutBox,e):this.constraints=!1,this.elastic=qm(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ht(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Gm(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!re(e))return!1;const r=e.current;Et(r!==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:i}=this.visualElement;if(!i||!i.layout)return!1;const s=Zh(r,i.root,this.visualElement.getTransformPagePoint());let o=Wm(i.layout.layoutBox,s);if(n){const a=n(Yh(o));this.hasMutatedConstraints=!!a,a&&(o=bc(a))}return o}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=ht(u=>{if(!Ke(u,n,this.currentDirection))return;let f=c&&c[u]||{};o&&(f={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,m=p(p({type:"inertia",velocity:r?e[u]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10},s),f);return this.startAxisValueAnimation(u,m)});return Promise.all(l).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return kr(this.visualElement,e),r.start(Ai(e,r,0,n,this.visualElement,!1))}stopAnimation(){ht(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){ht(e=>{var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){ht(n=>{const{drag:r}=this.getProps();if(!Ke(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(e[n]-X(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!re(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ht(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const c=a.get();i[o]=Hm({min:c,max:c},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ht(o=>{if(!Ke(o,e,null))return;const a=this.getAxisMotionValue(o),{min:c,max:l}=this.constraints[o];a.set(X(c,l,i[o]))})}addListeners(){if(!this.visualElement.current)return;Ym.set(this.visualElement,this);const e=this.visualElement.current,n=Pe(e,"pointerdown",c=>{const{drag:l,dragListener:u=!0}=this.getProps();l&&u&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();re(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),q.read(r);const o=je(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(ht(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=c[u].translate,f.set(f.get()+c[u].translate))}),this.visualElement.render())}));return()=>{o(),n(),s(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=jr,dragMomentum:a=!0}=e;return j(p({},e),{drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a})}}function Ke(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Xm(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Zm extends Nt{constructor(e){super(e),this.removeGroupControls=pt,this.removeListeners=pt,this.controls=new Km(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||pt}unmount(){this.removeGroupControls(),this.removeListeners()}}const Bs=t=>(e,n)=>{t&&q.postRender(()=>t(e,n))};class Jm extends Nt{constructor(){super(...arguments),this.removePointerDownListener=pt}onPointerDown(e){this.session=new Lc(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Nc(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Bs(e),onStart:Bs(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&q.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=Pe(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 tn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let jn=!1;class Qm extends E.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=e;s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),jn&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions(j(p({},s.options),{onExitComplete:()=>this.safeToRemove()}))),tn.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,{projection:o}=r;return o&&(o.isPresent=s,jn=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==s?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||q.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),pi.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=e;jn=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Ic(t){const[e,n]=sc(),r=E.useContext(Yr);return w.jsx(Qm,j(p({},t),{layoutGroup:r,switchLayoutGroup:E.useContext(yc),isPresent:e,safeToRemove:n}))}function tp(t,e,n){const r=st(t)?t:le(t);return r.start(Ai("",r,e,n)),r.animation}const ep=(t,e)=>t.depth-e.depth;class np{constructor(){this.children=[],this.isDirty=!1}add(e){Zr(this.children,e),this.isDirty=!0}remove(e){Jr(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ep),this.isDirty=!1,this.children.forEach(e)}}function rp(t,e){const n=lt.now(),r=({timestamp:i})=>{const s=i-n;s>=e&&(kt(r),t(s-e))};return q.setup(r,!0),()=>kt(r)}const Bc=["TopLeft","TopRight","BottomLeft","BottomRight"],ip=Bc.length,Fs=t=>typeof t=="string"?parseFloat(t):t,_s=t=>typeof t=="number"||F.test(t);function sp(t,e,n,r,i,s){var o,a,c,l;i?(t.opacity=X(0,(o=n.opacity)!=null?o:1,op(r)),t.opacityExit=X((a=e.opacity)!=null?a:1,0,ap(r))):s&&(t.opacity=X((c=e.opacity)!=null?c:1,(l=n.opacity)!=null?l:1,r));for(let u=0;u<ip;u++){const f=`border${Bc[u]}Radius`;let d=Os(e,f),h=Os(n,f);if(d===void 0&&h===void 0)continue;d||(d=0),h||(h=0),d===0||h===0||_s(d)===_s(h)?(t[f]=Math.max(X(Fs(d),Fs(h),r),0),(Tt.test(h)||Tt.test(d))&&(t[f]+="%")):t[f]=h}(e.rotate||n.rotate)&&(t.rotate=X(e.rotate||0,n.rotate||0,r))}function Os(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const op=Fc(0,.5,Sa),ap=Fc(.5,.95,pt);function Fc(t,e,n){return r=>r<t?0:r>e?1:n(Me(t,e,r))}function Us(t,e){t.min=e.min,t.max=e.max}function gt(t,e){Us(t.x,e.x),Us(t.y,e.y)}function zs(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Ws(t,e,n,r,i){return t-=e,t=an(t,1/n,r),i!==void 0&&(t=an(t,1/i,r)),t}function cp(t,e=0,n=1,r=.5,i,s=t,o=t){if(Tt.test(e)&&(e=parseFloat(e),e=X(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=X(s.min,s.max,r);t===s&&(a-=e),t.min=Ws(t.min,e,n,a,i),t.max=Ws(t.max,e,n,a,i)}function Hs(t,e,[n,r,i],s,o){cp(t,e[n],e[r],e[i],e.scale,s,o)}const lp=["x","scaleX","originX"],up=["y","scaleY","originY"];function Gs(t,e,n,r){Hs(t.x,e,lp,n?n.x:void 0,r?r.x:void 0),Hs(t.y,e,up,n?n.y:void 0,r?r.y:void 0)}function qs(t){return t.translate===0&&t.scale===1}function _c(t){return qs(t.x)&&qs(t.y)}function Ys(t,e){return t.min===e.min&&t.max===e.max}function fp(t,e){return Ys(t.x,e.x)&&Ys(t.y,e.y)}function Ks(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Oc(t,e){return Ks(t.x,e.x)&&Ks(t.y,e.y)}function Xs(t){return ot(t.x)/ot(t.y)}function Zs(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class dp{constructor(){this.members=[]}add(e){Zr(this.members,e),e.scheduleRender()}remove(e){if(Jr(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(i=>e===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function hp(t,e,n){let r="";const i=t.x.translate/e.x,s=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:l,rotate:u,rotateX:f,rotateY:d,skewX:h,skewY:m}=n;l&&(r=`perspective(${l}px) ${r}`),u&&(r+=`rotate(${u}deg) `),f&&(r+=`rotateX(${f}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),m&&(r+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,c=t.y.scale*e.y;return(a!==1||c!==1)&&(r+=`scale(${a}, ${c})`),r||"none"}const Nn=["","X","Y","Z"],mp=1e3;let pp=0;function Ln(t,e,n,r){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),r&&(r[t]=0))}function Uc(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Ec(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",q,!(i||s))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&Uc(r)}function zc({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=pp++,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.layoutVersion=0,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(vp),this.nodes.forEach(Cp),this.nodes.forEach(Tp),this.nodes.forEach(bp)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,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 c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new np)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new ti),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const c=this.eventHandlers.get(o);c&&c.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=ic(o)&&!oh(o),this.instance=o;const{layoutId:a,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),t){let u,f=0;const d=()=>this.root.updateBlockedByResize=!1;q.read(()=>{f=window.innerWidth}),t(o,()=>{const h=window.innerWidth;h!==f&&(f=h,this.root.updateBlockedByResize=!0,u&&u(),u=rp(d,250),tn.hasAnimatedSinceResize&&(tn.hasAnimatedSinceResize=!1,this.nodes.forEach(to)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&l&&(a||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||l.getDefaultTransition()||Rp,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=l.getProps(),y=!this.targetLayout||!Oc(this.targetLayout,h),x=!f&&d;if(this.options.layoutRoot||this.resumeFrom||x||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const b=j(p({},hi(m,"layout")),{onPlay:g,onComplete:v});(l.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b),this.setAnimationOrigin(u,x)}else f||to(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),kt(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(Sp),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Uc(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:c}=this.options;if(a===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Js);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Qs);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(xp),this.nodes.forEach(gp),this.nodes.forEach(yp)):this.nodes.forEach(Qs),this.clearAllSnapshots();const a=lt.now();it.delta=At(0,1e3/60,a-it.timestamp),it.timestamp=a,it.isProcessing=!0,Tn.update.process(it),Tn.preRender.process(it),Tn.render.process(it),it.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,pi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(wp),this.sharedNodes.forEach(Pp)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,q.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){q.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ot(this.snapshot.measuredBox.x)&&!ot(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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=nt(),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,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!_c(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,u=l!==this.prevTransformTemplateValue;o&&this.instance&&(a||Bt(this.latestValues)||u)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return o&&(c=this.removeTransform(c)),Mp(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var l;const{visualElement:o}=this.options;if(!o)return nt();const a=o.measureViewportBox();if(!(((l=this.scroll)==null?void 0:l.wasRoot)||this.path.some(Vp))){const{scroll:u}=this.root;u&&(ie(a.x,u.offset.x),ie(a.y,u.offset.y))}return a}removeElementScroll(o){var c;const a=nt();if(gt(a,o),(c=this.scroll)!=null&&c.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:f,options:d}=u;u!==this.root&&f&&d.layoutScroll&&(f.wasRoot&&gt(a,o),ie(a.x,f.offset.x),ie(a.y,f.offset.y))}return a}applyTransform(o,a=!1){const c=nt();gt(c,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&se(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Bt(u.latestValues)&&se(c,u.latestValues)}return Bt(this.latestValues)&&se(c,this.latestValues),c}removeTransform(o){const a=nt();gt(a,o);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!l.instance||!Bt(l.latestValues))continue;Er(l.latestValues)&&l.updateSnapshot();const u=nt(),f=l.measurePageBox();gt(u,f),Gs(a,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,u)}return Bt(this.latestValues)&&Gs(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options=j(p(p({},this.options),o),{crossfade:o.crossfade!==void 0?o.crossfade:!0})}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==it.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var h;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(h=this.parent)!=null&&h.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:f}=this.options;if(!this.layout||!(u||f))return;this.resolvedRelativeTargetAt=it.timestamp;const d=this.getClosestProjectingParent();d&&this.linkedParentVersion!==d.layoutVersion&&!d.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(d&&d.layout?this.createRelativeTarget(d,this.layout.layoutBox,d.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=nt(),this.targetWithTransforms=nt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Bm(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):gt(this.target,this.layout.layoutBox),xc(this.target,this.targetDelta)):gt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?this.createRelativeTarget(d,this.target,d.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Er(this.parent.latestValues)||wc(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=nt(),this.relativeTargetOrigin=nt(),cn(this.relativeTargetOrigin,a,c),gt(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var m;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===it.timestamp&&(c=!1),c)return;const{layout:l,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||!(l||u))return;gt(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;Xh(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=nt());const{target:h}=o;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(zs(this.prevProjectionDelta.x,this.projectionDelta.x),zs(this.prevProjectionDelta.y,this.projectionDelta.y)),Ae(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!Zs(this.projectionDelta.x,this.prevProjectionDelta.x)||!Zs(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=oe(),this.projectionDelta=oe(),this.projectionDeltaWithTransform=oe()}setAnimationOrigin(o,a=!1){const c=this.snapshot,l=c?c.latestValues:{},u=p({},this.latestValues),f=oe();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=nt(),h=c?c.source:void 0,m=this.layout?this.layout.source:void 0,g=h!==m,v=this.getStack(),y=!v||v.members.length<=1,x=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(Ep));this.animationProgress=0;let b;this.mixTargetDelta=S=>{const R=S/1e3;eo(f.x,o.x,R),eo(f.y,o.y,R),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(cn(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Ap(this.relativeTarget,this.relativeTargetOrigin,d,R),b&&fp(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=nt()),gt(b,this.relativeTarget)),g&&(this.animationValues=u,sp(u,l,this.latestValues,R,x,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=R},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,c,l;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(l=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||l.stop(),this.pendingAnimation&&(kt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=q.update(()=>{tn.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=le(0)),this.currentAnimation=tp(this.motionValue,[0,1e3],j(p({},o),{velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),o.onUpdate&&o.onUpdate(u)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}})),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(mp),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=o;if(!(!a||!c||!l)){if(this!==o&&this.layout&&l&&Wc(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||nt();const f=ot(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;const d=ot(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+d}gt(a,c),se(a,u),Ae(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new dp),this.sharedNodes.get(o).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const l={};c.z&&Ln("z",o,l,this.animationValues);for(let u=0;u<Nn.length;u++)Ln(`rotate${Nn[u]}`,o,l,this.animationValues),Ln(`skew${Nn[u]}`,o,l,this.animationValues);o.render();for(const u in l)o.setStaticValue(u,l[u]),this.animationValues&&(this.animationValues[u]=l[u]);o.scheduleRender()}applyProjectionStyles(o,a){var m,g;if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Qe(a==null?void 0:a.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Qe(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Bt(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=l.animationValues||l.latestValues;this.applyTransformsToTarget();let f=hp(this.projectionDeltaWithTransform,this.treeScale,u);c&&(f=c(u,f)),o.transform=f;const{x:d,y:h}=this.projectionDelta;o.transformOrigin=`${d.origin*100}% ${h.origin*100}% 0`,l.animationValues?o.opacity=l===this?(g=(m=u.opacity)!=null?m:this.latestValues.opacity)!=null?g:1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=l===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const v in Ar){if(u[v]===void 0)continue;const{correct:y,applyTo:x,isCSSVariable:b}=Ar[v],S=f==="none"?u[v]:y(u[v],l);if(x){const R=x.length;for(let P=0;P<R;P++)o[x[P]]=S}else b?this.options.visualElement.renderState.vars[v]=S:o[v]=S}this.options.layoutId&&(o.pointerEvents=l===this?Qe(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Js),this.root.sharedNodes.clear()}}}function gp(t){t.updateLayout()}function yp(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;s==="size"?ht(f=>{const d=o?e.measuredBox[f]:e.layoutBox[f],h=ot(d);d.min=r[f].min,d.max=d.min+h}):Wc(s,e.layoutBox,r)&&ht(f=>{const d=o?e.measuredBox[f]:e.layoutBox[f],h=ot(r[f]);d.max=d.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+h)});const a=oe();Ae(a,r,e.layoutBox);const c=oe();o?Ae(c,t.applyTransform(i,!0),e.measuredBox):Ae(c,r,e.layoutBox);const l=!_c(a);let u=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:h}=f;if(d&&h){const m=nt();cn(m,e.layoutBox,d.layoutBox);const g=nt();cn(g,r,h.layoutBox),Oc(m,g)||(u=!0),f.options.layoutRoot&&(t.relativeTarget=g,t.relativeTargetOrigin=m,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:e,delta:c,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function vp(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 bp(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function wp(t){t.clearSnapshot()}function Js(t){t.clearMeasurements()}function Qs(t){t.isLayoutDirty=!1}function xp(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function to(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Cp(t){t.resolveTargetDelta()}function Tp(t){t.calcProjection()}function Sp(t){t.resetSkewAndRotation()}function Pp(t){t.removeLeadSnapshot()}function eo(t,e,n){t.translate=X(e.translate,0,n),t.scale=X(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function no(t,e,n,r){t.min=X(e.min,n.min,r),t.max=X(e.max,n.max,r)}function Ap(t,e,n,r){no(t.x,e.x,n.x,r),no(t.y,e.y,n.y,r)}function Ep(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Rp={duration:.45,ease:[.4,0,.1,1]},ro=t=>typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),io=ro("applewebkit/")&&!ro("chrome/")?Math.round:pt;function so(t){t.min=io(t.min),t.max=io(t.max)}function Mp(t){so(t.x),so(t.y)}function Wc(t,e,n){return t==="position"||t==="preserve-aspect"&&!Im(Xs(e),Xs(n),.2)}function Vp(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const kp=zc({attachResizeListener:(t,e)=>je(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),$n={current:void 0},Hc=zc({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!$n.current){const t=new kp({});t.mount(window),t.setOptions({layoutScroll:!0}),$n.current=t}return $n.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Dp={pan:{Feature:Jm},drag:{Feature:Zm,ProjectionNode:Hc,MeasureLayout:Ic}};function oo(t,e,n){const{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&q.postRender(()=>s(e,Fe(e)))}class jp extends Nt{mount(){const{current:e}=this.node;e&&(this.unmount=eh(e,(n,r)=>(oo(this.node,r,"Start"),i=>oo(this.node,i,"End"))))}unmount(){}}class Np extends Nt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(n){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=$e(je(this.node.current,"focus",()=>this.onFocus()),je(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ao(t,e,n){const{props:r}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&r.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&q.postRender(()=>s(e,Fe(e)))}class Lp extends Nt{mount(){const{current:e}=this.node;e&&(this.unmount=sh(e,(n,r)=>(ao(this.node,r,"Start"),(i,{success:s})=>ao(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Nr=new WeakMap,In=new WeakMap,$p=t=>{const e=Nr.get(t.target);e&&e(t)},Ip=t=>{t.forEach($p)};function Bp(n){var r=n,{root:t}=r,e=z(r,["root"]);const i=t||document;In.has(i)||In.set(i,{});const s=In.get(i),o=JSON.stringify(e);return s[o]||(s[o]=new IntersectionObserver(Ip,p({root:t},e))),s[o]}function Fp(t,e,n){const r=Bp(e);return Nr.set(t,n),r.observe(t),()=>{Nr.delete(t),r.unobserve(t)}}const _p={some:0,all:1};class Op extends Nt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=e,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:_p[i]},a=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,s&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),d=l?u:f;d&&d(c)};return Fp(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver=="undefined")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Up(e,n))&&this.startObserver()}unmount(){}}function Up({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const zp={inView:{Feature:Op},tap:{Feature:Lp},focus:{Feature:Np},hover:{Feature:jp}},Wp={layout:{ProjectionNode:Hc,MeasureLayout:Ic}},Hp=p(p(p(p({},km),zp),Dp),Wp),Gp=qh(Hp,om),co={primary:"#2563eb",background:"#ffffff",text:"#000000",textSecondary:"#6b7280",danger:"#dc2626",success:"#16a34a",warning:"#ca8a04",border:"#e5e7eb",fontFamily:"Inter, system-ui, sans-serif",fontSizeBase:"14px",fontSizeSmall:"12px",fontSizeLarge:"32px",fontWeightNormal:"400",spacingUnit:"4px",borderRadius:"8px",buttonRadius:"6px"},lo={default:co,night:j(p({},co),{primary:"#0085FF",background:"#14171D",text:"#C9CED8",textSecondary:"#8C99AD",danger:"#F23154",border:"#2B3039"})},qp=(t="default",e)=>{const n=lo[t]||lo.default,r=p(p({},n),e==null?void 0:e.variables),i={};return Object.entries(r).forEach(([s,o])=>{i[`--w3-${s}`]=o}),i},Yp=({id:t,name:e,description:n,iconUrl:r,fallbackText:i,avatarColor:s="blue",onClick:o,disabled:a=!1})=>{const[c,l]=E.useState(!1);return w.jsxs(ft,{justify:"space-between",w:"100%",p:"md",style:{backgroundColor:"var(--w3-background)",borderBottom:"0.25px solid var(--w3-border)",cursor:a?"not-allowed":"pointer",opacity:a?.4:1,transition:"all 200ms ease",position:"relative",overflow:"hidden",color:"var(--w3-text)"},onClick:a?void 0:o,onMouseEnter:()=>!a&&l(!0),onMouseLeave:()=>l(!1),className:"payment-method-row",children:[w.jsxs(ft,{gap:"md",style:{flexShrink:0},children:[w.jsx(W,{style:{width:"40px",height:"40px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 200ms ease",transform:c?"scale(1.1)":"scale(1)"},children:r?w.jsx(Re,{size:32,src:r,radius:"lg"}):w.jsx(Re,{size:32,color:s,radius:"lg",children:i})}),w.jsxs(W,{style:{minWidth:0},children:[w.jsx(rt,{fw:700,size:"xs",tt:"capitalize",style:{letterSpacing:"-0.02em",color:"var(--w3-text)"},children:e}),w.jsx(rt,{size:"xs",fw:500,style:{letterSpacing:"-0.01em",fontSize:"11px",color:"var(--w3-textSecondary)"},children:n})]})]}),w.jsx(ft,{gap:"sm",align:"center",children:w.jsx(Wt,{variant:"subtle",size:"sm",style:{opacity:c?1:0,transform:c?"translateX(0)":"translateX(-8px)",transition:"all 200ms ease",color:"var(--mantine-color-gray-6)"},children:"→"})})]},t)},Kp="data:image/svg+xml,%3csvg%20width='24'%20height='23.5'%20viewBox='0%200%2048%2047'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M43.972%200H3.56125C1.75696%200%200.294922%201.46203%200.294922%203.26633V43.677C0.294922%2045.4813%201.75696%2046.9434%203.56125%2046.9434H43.972C45.7763%2046.9434%2047.2383%2045.4813%2047.2383%2043.677V3.26633C47.2383%201.46203%2045.7763%200%2043.972%200ZM39.7896%2030.1883C39.7896%2035.0097%2035.8685%2038.9309%2031.0471%2038.9309C28.3506%2038.9309%2025.9349%2037.7023%2024.3304%2035.7773C22.726%2037.7023%2020.3104%2038.9309%2017.6138%2038.9309C12.7924%2038.9309%208.87127%2035.0097%208.87127%2030.1883V10.0384C8.87127%208.92059%209.77737%208.0125%2010.8971%208.0125C12.0169%208.0125%2012.923%208.91861%2012.923%2010.0384V30.1903C12.923%2032.7781%2015.028%2034.8831%2017.6158%2034.8831C20.2035%2034.8831%2022.3085%2032.7781%2022.3085%2030.1903V22.1897C22.3085%2021.0719%2023.2146%2020.1638%2024.3344%2020.1638C25.4542%2020.1638%2026.3603%2021.0699%2026.3603%2022.1897V30.1903C26.3603%2032.7781%2028.4653%2034.8831%2031.053%2034.8831C33.6408%2034.8831%2035.7458%2032.7781%2035.7458%2030.1903V10.0384C35.7458%208.92059%2036.6519%208.0125%2037.7717%208.0125C38.8914%208.0125%2039.7975%208.91861%2039.7975%2010.0384V30.1903L39.7896%2030.1883Z'%20fill='white'%20class='group-hover:fill-[%23BF1B1B]'%3e%3c/path%3e%3c/svg%3e",Xp="data:image/svg+xml,%3csvg%20width='24'%20height='23.5'%20viewBox='0%200%2048%2047'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M43.9654%200H3.55466C1.75037%200%200.28833%201.46203%200.28833%203.26633V43.677C0.28833%2045.4813%201.75037%2046.9434%203.55466%2046.9434H43.9654C45.7697%2046.9434%2047.2317%2045.4813%2047.2317%2043.677V3.26633C47.2317%201.46203%2045.7697%200%2043.9654%200ZM39.785%2030.1883C39.785%2035.0097%2035.8638%2038.9309%2031.0425%2038.9309H10.8906C9.77276%2038.9309%208.86468%2038.0248%208.86468%2036.905C8.86468%2035.7852%209.77078%2034.8791%2010.8906%2034.8791H31.0425C33.6302%2034.8791%2035.7352%2032.7741%2035.7352%2030.1864C35.7352%2027.5986%2033.6302%2025.4936%2031.0425%2025.4936H23.0419C21.9241%2025.4936%2021.016%2024.5875%2021.016%2023.4677C21.016%2022.348%2021.9221%2021.4419%2023.0419%2021.4419H31.0425C33.6302%2021.4419%2035.7352%2019.3368%2035.7352%2016.7491C35.7352%2014.1614%2033.6302%2012.0563%2031.0425%2012.0563H10.8906C9.77276%2012.0563%208.86468%2011.1502%208.86468%2010.0305C8.86468%208.9107%209.77078%208.00459%2010.8906%208.00459H31.0425C35.8638%208.00459%2039.785%2011.9258%2039.785%2016.7471C39.785%2019.4437%2038.5564%2021.8593%2036.6315%2023.4638C38.5564%2025.0683%2039.785%2027.4839%2039.785%2030.1804V30.1883Z'%20fill='white'%20class='group-hover:fill-[%23FF3223]'%3e%3c/path%3e%3c/svg%3e",Zp="data:image/svg+xml,%3csvg%20width='14.5'%20height='11'%20viewBox='0%200%2029%2022'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M15.4597%205.22243C16.6803%203.79799%2016.2708%204.07496%2018.1384%202.86616C18.6825%202.60897%2018.8744%202.06096%2018.7141%201.47535C18.5539%200.889747%2017.9129%200.632558%2017.4658%200.816549C15.6714%201.691%2014.8523%202.698%2014.2608%203.44781C13.9066%203.87515%2013.7939%204.52802%2014.1144%205.00283C14.4349%205.47963%2015.0422%205.58844%2015.4597%205.22243Z'%20fill='white'%3e%3c/path%3e%3cpath%20d='M28.2084%2010.9678C28.1055%2010.3169%2027.4586%2010.123%2027.0412%2010.2694C26.6257%2010.4158%2026.3685%2010.8926%2026.3685%2011.4782C26.3685%2012.687%2026.1449%2013.969%2025.7275%2015.1759C25.0232%2017.0811%2023.5176%2019.0575%2022.4295%2019.3127C22.3979%2019.2395%2022.3346%2018.9467%2022.3346%2018.5807C22.3346%2016.8239%2023.3594%2013.4547%2025.9194%209.97664C26.2716%209.53744%2026.2083%208.84302%2025.7908%208.43943C25.407%208.03584%2024.7996%208.10904%2024.4455%208.58583C23.8401%209.41082%2023.306%2010.2398%2022.8351%2011.0588C22.8054%2011.0747%2022.7777%2011.0925%2022.748%2011.1122C15.7702%2015.9831%2012.1241%2019.2791%209.72427%2019.2791C9.72427%2019.1683%209.75592%2018.9863%209.97948%2018.3631L13.3091%209.72143C13.5327%209.17144%2013.3091%208.51263%2012.8284%208.29303C12.3476%208.03584%2011.7719%208.29303%2011.58%208.84302L8.09012%2017.8863C7.44912%2019.5343%207.99318%2021.5107%209.72229%2021.5107C12.1221%2021.5107%2015.3706%2018.9506%2021.0862%2014.8969C20.6391%2016.2442%2020.4096%2017.4985%2020.4096%2018.5827C20.4096%2019.9003%2020.9536%2021.5127%2022.3623%2021.5127C24.1863%2021.5127%2026.5228%2018.8042%2027.516%2015.9831C27.7395%2015.3242%2028.0126%2014.1708%2028.0759%2013.6782C28.1392%2013.1856%2028.3054%2011.6207%2028.2025%2010.9698L28.2084%2010.9678Z'%20fill='white'%3e%3c/path%3e%3cpath%20d='M1.16597%2019.376C0.576406%2019.376%200.0996094%2019.8528%200.0996094%2020.4423C0.0996094%2021.0319%200.576406%2021.5087%201.16597%2021.5087C1.75553%2021.5087%202.23232%2021.0319%202.23232%2020.4423C2.23232%2019.8528%201.75553%2019.376%201.16597%2019.376Z'%20fill='white'%3e%3c/path%3e%3c/svg%3e",Jp=({style:t})=>w.jsx(ft,{justify:"flex-end",py:"lg",px:"md",style:p({backgroundColor:"var(--w3-background)",borderTop:"0.25px solid var(--w3-border)",borderBottomLeftRadius:"var(--mantine-radius-xl)",borderBottomRightRadius:"var(--mantine-radius-xl)",flexShrink:0,height:"80px",minHeight:"80px"},t),children:w.jsxs(ft,{gap:"xs",align:"center",style:{opacity:.5,cursor:"pointer",transition:"opacity 200ms ease"},onClick:()=>window.open("https://w3.io","_blank"),onMouseEnter:e=>e.currentTarget.style.opacity="0.8",onMouseLeave:e=>e.currentTarget.style.opacity="0.5",children:[w.jsxs(ft,{gap:"1px",align:"center",wrap:"nowrap",children:[w.jsx(Ot,{src:Kp,alt:"W",w:12,h:12,style:{display:"block",filter:"brightness(0) saturate(100%) invert(13%) sepia(100%) saturate(7463%) hue-rotate(3deg) brightness(80%)"}}),w.jsx(Ot,{src:Xp,alt:"3",w:12,h:12,style:{display:"block",filter:"brightness(0) saturate(100%) invert(13%) sepia(100%) saturate(7463%) hue-rotate(3deg) brightness(80%)"}}),w.jsx(Ot,{src:Zp,alt:"io",w:12,h:12,style:{display:"block",filter:"brightness(0) saturate(100%) invert(13%) sepia(100%) saturate(7463%) hue-rotate(3deg) brightness(80%)"}})]}),w.jsx(rt,{size:"xs",fw:700,style:{color:"var(--w3-textSecondary)"},children:"Payments"})]})});var Qt={},Bn,uo;function Qp(){return uo||(uo=1,Bn=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Bn}var Fn={},Mt={},fo;function Yt(){if(fo)return Mt;fo=1;let t;const e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return Mt.getSymbolSize=function(r){if(!r)throw new Error('"version" cannot be null or undefined');if(r<1||r>40)throw new Error('"version" should be in range from 1 to 40');return r*4+17},Mt.getSymbolTotalCodewords=function(r){return e[r]},Mt.getBCHDigit=function(n){let r=0;for(;n!==0;)r++,n>>>=1;return r},Mt.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');t=r},Mt.isKanjiModeEnabled=function(){return typeof t!="undefined"},Mt.toSJIS=function(r){return t(r)},Mt}var _n={},ho;function Ei(){return ho||(ho=1,(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+n)}}t.isValid=function(r){return r&&typeof r.bit!="undefined"&&r.bit>=0&&r.bit<4},t.from=function(r,i){if(t.isValid(r))return r;try{return e(r)}catch(s){return i}}})(_n)),_n}var On,mo;function t0(){if(mo)return On;mo=1;function t(){this.buffer=[],this.length=0}return t.prototype={get:function(e){const n=Math.floor(e/8);return(this.buffer[n]>>>7-e%8&1)===1},put:function(e,n){for(let r=0;r<n;r++)this.putBit((e>>>n-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),e&&(this.buffer[n]|=128>>>this.length%8),this.length++}},On=t,On}var Un,po;function e0(){if(po)return Un;po=1;function t(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return t.prototype.set=function(e,n,r,i){const s=e*this.size+n;this.data[s]=r,i&&(this.reservedBit[s]=!0)},t.prototype.get=function(e,n){return this.data[e*this.size+n]},t.prototype.xor=function(e,n,r){this.data[e*this.size+n]^=r},t.prototype.isReserved=function(e,n){return this.reservedBit[e*this.size+n]},Un=t,Un}var zn={},go;function n0(){return go||(go=1,(function(t){const e=Yt().getSymbolSize;t.getRowColCoords=function(r){if(r===1)return[];const i=Math.floor(r/7)+2,s=e(r),o=s===145?26:Math.ceil((s-13)/(2*i-2))*2,a=[s-7];for(let c=1;c<i-1;c++)a[c]=a[c-1]-o;return a.push(6),a.reverse()},t.getPositions=function(r){const i=[],s=t.getRowColCoords(r),o=s.length;for(let a=0;a<o;a++)for(let c=0;c<o;c++)a===0&&c===0||a===0&&c===o-1||a===o-1&&c===0||i.push([s[a],s[c]]);return i}})(zn)),zn}var Wn={},yo;function r0(){if(yo)return Wn;yo=1;const t=Yt().getSymbolSize,e=7;return Wn.getPositions=function(r){const i=t(r);return[[0,0],[i-e,0],[0,i-e]]},Wn}var Hn={},vo;function i0(){return vo||(vo=1,(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(i){return i!=null&&i!==""&&!isNaN(i)&&i>=0&&i<=7},t.from=function(i){return t.isValid(i)?parseInt(i,10):void 0},t.getPenaltyN1=function(i){const s=i.size;let o=0,a=0,c=0,l=null,u=null;for(let f=0;f<s;f++){a=c=0,l=u=null;for(let d=0;d<s;d++){let h=i.get(f,d);h===l?a++:(a>=5&&(o+=e.N1+(a-5)),l=h,a=1),h=i.get(d,f),h===u?c++:(c>=5&&(o+=e.N1+(c-5)),u=h,c=1)}a>=5&&(o+=e.N1+(a-5)),c>=5&&(o+=e.N1+(c-5))}return o},t.getPenaltyN2=function(i){const s=i.size;let o=0;for(let a=0;a<s-1;a++)for(let c=0;c<s-1;c++){const l=i.get(a,c)+i.get(a,c+1)+i.get(a+1,c)+i.get(a+1,c+1);(l===4||l===0)&&o++}return o*e.N2},t.getPenaltyN3=function(i){const s=i.size;let o=0,a=0,c=0;for(let l=0;l<s;l++){a=c=0;for(let u=0;u<s;u++)a=a<<1&2047|i.get(l,u),u>=10&&(a===1488||a===93)&&o++,c=c<<1&2047|i.get(u,l),u>=10&&(c===1488||c===93)&&o++}return o*e.N3},t.getPenaltyN4=function(i){let s=0;const o=i.data.length;for(let c=0;c<o;c++)s+=i.data[c];return Math.abs(Math.ceil(s*100/o/5)-10)*e.N4};function n(r,i,s){switch(r){case t.Patterns.PATTERN000:return(i+s)%2===0;case t.Patterns.PATTERN001:return i%2===0;case t.Patterns.PATTERN010:return s%3===0;case t.Patterns.PATTERN011:return(i+s)%3===0;case t.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(s/3))%2===0;case t.Patterns.PATTERN101:return i*s%2+i*s%3===0;case t.Patterns.PATTERN110:return(i*s%2+i*s%3)%2===0;case t.Patterns.PATTERN111:return(i*s%3+(i+s)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}t.applyMask=function(i,s){const o=s.size;for(let a=0;a<o;a++)for(let c=0;c<o;c++)s.isReserved(c,a)||s.xor(c,a,n(i,c,a))},t.getBestMask=function(i,s){const o=Object.keys(t.Patterns).length;let a=0,c=1/0;for(let l=0;l<o;l++){s(l),t.applyMask(l,i);const u=t.getPenaltyN1(i)+t.getPenaltyN2(i)+t.getPenaltyN3(i)+t.getPenaltyN4(i);t.applyMask(l,i),u<c&&(c=u,a=l)}return a}})(Hn)),Hn}var Xe={},bo;function Gc(){if(bo)return Xe;bo=1;const t=Ei(),e=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return Xe.getBlocksCount=function(i,s){switch(s){case t.L:return e[(i-1)*4+0];case t.M:return e[(i-1)*4+1];case t.Q:return e[(i-1)*4+2];case t.H:return e[(i-1)*4+3];default:return}},Xe.getTotalCodewordsCount=function(i,s){switch(s){case t.L:return n[(i-1)*4+0];case t.M:return n[(i-1)*4+1];case t.Q:return n[(i-1)*4+2];case t.H:return n[(i-1)*4+3];default:return}},Xe}var Gn={},Ce={},wo;function s0(){if(wo)return Ce;wo=1;const t=new Uint8Array(512),e=new Uint8Array(256);return(function(){let r=1;for(let i=0;i<255;i++)t[i]=r,e[r]=i,r<<=1,r&256&&(r^=285);for(let i=255;i<512;i++)t[i]=t[i-255]})(),Ce.log=function(r){if(r<1)throw new Error("log("+r+")");return e[r]},Ce.exp=function(r){return t[r]},Ce.mul=function(r,i){return r===0||i===0?0:t[e[r]+e[i]]},Ce}var xo;function o0(){return xo||(xo=1,(function(t){const e=s0();t.mul=function(r,i){const s=new Uint8Array(r.length+i.length-1);for(let o=0;o<r.length;o++)for(let a=0;a<i.length;a++)s[o+a]^=e.mul(r[o],i[a]);return s},t.mod=function(r,i){let s=new Uint8Array(r);for(;s.length-i.length>=0;){const o=s[0];for(let c=0;c<i.length;c++)s[c]^=e.mul(i[c],o);let a=0;for(;a<s.length&&s[a]===0;)a++;s=s.slice(a)}return s},t.generateECPolynomial=function(r){let i=new Uint8Array([1]);for(let s=0;s<r;s++)i=t.mul(i,new Uint8Array([1,e.exp(s)]));return i}})(Gn)),Gn}var qn,Co;function a0(){if(Co)return qn;Co=1;const t=o0();function e(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}return e.prototype.initialize=function(r){this.degree=r,this.genPoly=t.generateECPolynomial(this.degree)},e.prototype.encode=function(r){if(!this.genPoly)throw new Error("Encoder not initialized");const i=new Uint8Array(r.length+this.degree);i.set(r);const s=t.mod(i,this.genPoly),o=this.degree-s.length;if(o>0){const a=new Uint8Array(this.degree);return a.set(s,o),a}return s},qn=e,qn}var Yn={},Kn={},Xn={},To;function qc(){return To||(To=1,Xn.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),Xn}var wt={},So;function Yc(){if(So)return wt;So=1;const t="[0-9]+",e="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r
19
+ ]))+`;wt.KANJI=new RegExp(n,"g"),wt.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),wt.BYTE=new RegExp(r,"g"),wt.NUMERIC=new RegExp(t,"g"),wt.ALPHANUMERIC=new RegExp(e,"g");const i=new RegExp("^"+n+"$"),s=new RegExp("^"+t+"$"),o=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return wt.testKanji=function(c){return i.test(c)},wt.testNumeric=function(c){return s.test(c)},wt.testAlphanumeric=function(c){return o.test(c)},wt}var Po;function Kt(){return Po||(Po=1,(function(t){const e=qc(),n=Yc();t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(s,o){if(!s.ccBits)throw new Error("Invalid mode: "+s);if(!e.isValid(o))throw new Error("Invalid version: "+o);return o>=1&&o<10?s.ccBits[0]:o<27?s.ccBits[1]:s.ccBits[2]},t.getBestModeForData=function(s){return n.testNumeric(s)?t.NUMERIC:n.testAlphanumeric(s)?t.ALPHANUMERIC:n.testKanji(s)?t.KANJI:t.BYTE},t.toString=function(s){if(s&&s.id)return s.id;throw new Error("Invalid mode")},t.isValid=function(s){return s&&s.bit&&s.ccBits};function r(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+i)}}t.from=function(s,o){if(t.isValid(s))return s;try{return r(s)}catch(a){return o}}})(Kn)),Kn}var Ao;function c0(){return Ao||(Ao=1,(function(t){const e=Yt(),n=Gc(),r=Ei(),i=Kt(),s=qc(),o=7973,a=e.getBCHDigit(o);function c(d,h,m){for(let g=1;g<=40;g++)if(h<=t.getCapacity(g,m,d))return g}function l(d,h){return i.getCharCountIndicator(d,h)+4}function u(d,h){let m=0;return d.forEach(function(g){const v=l(g.mode,h);m+=v+g.getBitsLength()}),m}function f(d,h){for(let m=1;m<=40;m++)if(u(d,m)<=t.getCapacity(m,h,i.MIXED))return m}t.from=function(h,m){return s.isValid(h)?parseInt(h,10):m},t.getCapacity=function(h,m,g){if(!s.isValid(h))throw new Error("Invalid QR Code version");typeof g=="undefined"&&(g=i.BYTE);const v=e.getSymbolTotalCodewords(h),y=n.getTotalCodewordsCount(h,m),x=(v-y)*8;if(g===i.MIXED)return x;const b=x-l(g,h);switch(g){case i.NUMERIC:return Math.floor(b/10*3);case i.ALPHANUMERIC:return Math.floor(b/11*2);case i.KANJI:return Math.floor(b/13);case i.BYTE:default:return Math.floor(b/8)}},t.getBestVersionForData=function(h,m){let g;const v=r.from(m,r.M);if(Array.isArray(h)){if(h.length>1)return f(h,v);if(h.length===0)return 1;g=h[0]}else g=h;return c(g.mode,g.getLength(),v)},t.getEncodedBits=function(h){if(!s.isValid(h)||h<7)throw new Error("Invalid QR Code version");let m=h<<12;for(;e.getBCHDigit(m)-a>=0;)m^=o<<e.getBCHDigit(m)-a;return h<<12|m}})(Yn)),Yn}var Zn={},Eo;function l0(){if(Eo)return Zn;Eo=1;const t=Yt(),e=1335,n=21522,r=t.getBCHDigit(e);return Zn.getEncodedBits=function(s,o){const a=s.bit<<3|o;let c=a<<10;for(;t.getBCHDigit(c)-r>=0;)c^=e<<t.getBCHDigit(c)-r;return(a<<10|c)^n},Zn}var Jn={},Qn,Ro;function u0(){if(Ro)return Qn;Ro=1;const t=Kt();function e(n){this.mode=t.NUMERIC,this.data=n.toString()}return e.getBitsLength=function(r){return 10*Math.floor(r/3)+(r%3?r%3*3+1:0)},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(r){let i,s,o;for(i=0;i+3<=this.data.length;i+=3)s=this.data.substr(i,3),o=parseInt(s,10),r.put(o,10);const a=this.data.length-i;a>0&&(s=this.data.substr(i),o=parseInt(s,10),r.put(o,a*3+1))},Qn=e,Qn}var tr,Mo;function f0(){if(Mo)return tr;Mo=1;const t=Kt(),e=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(r){this.mode=t.ALPHANUMERIC,this.data=r}return n.getBitsLength=function(i){return 11*Math.floor(i/2)+6*(i%2)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(i){let s;for(s=0;s+2<=this.data.length;s+=2){let o=e.indexOf(this.data[s])*45;o+=e.indexOf(this.data[s+1]),i.put(o,11)}this.data.length%2&&i.put(e.indexOf(this.data[s]),6)},tr=n,tr}var er,Vo;function d0(){if(Vo)return er;Vo=1;const t=Kt();function e(n){this.mode=t.BYTE,typeof n=="string"?this.data=new TextEncoder().encode(n):this.data=new Uint8Array(n)}return e.getBitsLength=function(r){return r*8},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(n){for(let r=0,i=this.data.length;r<i;r++)n.put(this.data[r],8)},er=e,er}var nr,ko;function h0(){if(ko)return nr;ko=1;const t=Kt(),e=Yt();function n(r){this.mode=t.KANJI,this.data=r}return n.getBitsLength=function(i){return i*13},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(r){let i;for(i=0;i<this.data.length;i++){let s=e.toSJIS(this.data[i]);if(s>=33088&&s<=40956)s-=33088;else if(s>=57408&&s<=60351)s-=49472;else throw new Error("Invalid SJIS character: "+this.data[i]+`
20
+ Make sure your charset is UTF-8`);s=(s>>>8&255)*192+(s&255),r.put(s,13)}},nr=n,nr}var rr={exports:{}},Do;function m0(){return Do||(Do=1,(function(t){var e={single_source_shortest_paths:function(n,r,i){var s={},o={};o[r]=0;var a=e.PriorityQueue.make();a.push(r,0);for(var c,l,u,f,d,h,m,g,v;!a.empty();){c=a.pop(),l=c.value,f=c.cost,d=n[l]||{};for(u in d)d.hasOwnProperty(u)&&(h=d[u],m=f+h,g=o[u],v=typeof o[u]=="undefined",(v||g>m)&&(o[u]=m,a.push(u,m),s[u]=l))}if(typeof i!="undefined"&&typeof o[i]=="undefined"){var y=["Could not find a path from ",r," to ",i,"."].join("");throw new Error(y)}return s},extract_shortest_path_from_predecessor_list:function(n,r){for(var i=[],s=r;s;)i.push(s),n[s],s=n[s];return i.reverse(),i},find_path:function(n,r,i){var s=e.single_source_shortest_paths(n,r,i);return e.extract_shortest_path_from_predecessor_list(s,i)},PriorityQueue:{make:function(n){var r=e.PriorityQueue,i={},s;n=n||{};for(s in r)r.hasOwnProperty(s)&&(i[s]=r[s]);return i.queue=[],i.sorter=n.sorter||r.default_sorter,i},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var i={value:n,cost:r};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e})(rr)),rr.exports}var jo;function p0(){return jo||(jo=1,(function(t){const e=Kt(),n=u0(),r=f0(),i=d0(),s=h0(),o=Yc(),a=Yt(),c=m0();function l(y){return unescape(encodeURIComponent(y)).length}function u(y,x,b){const S=[];let R;for(;(R=y.exec(b))!==null;)S.push({data:R[0],index:R.index,mode:x,length:R[0].length});return S}function f(y){const x=u(o.NUMERIC,e.NUMERIC,y),b=u(o.ALPHANUMERIC,e.ALPHANUMERIC,y);let S,R;return a.isKanjiModeEnabled()?(S=u(o.BYTE,e.BYTE,y),R=u(o.KANJI,e.KANJI,y)):(S=u(o.BYTE_KANJI,e.BYTE,y),R=[]),x.concat(b,S,R).sort(function(A,T){return A.index-T.index}).map(function(A){return{data:A.data,mode:A.mode,length:A.length}})}function d(y,x){switch(x){case e.NUMERIC:return n.getBitsLength(y);case e.ALPHANUMERIC:return r.getBitsLength(y);case e.KANJI:return s.getBitsLength(y);case e.BYTE:return i.getBitsLength(y)}}function h(y){return y.reduce(function(x,b){const S=x.length-1>=0?x[x.length-1]:null;return S&&S.mode===b.mode?(x[x.length-1].data+=b.data,x):(x.push(b),x)},[])}function m(y){const x=[];for(let b=0;b<y.length;b++){const S=y[b];switch(S.mode){case e.NUMERIC:x.push([S,{data:S.data,mode:e.ALPHANUMERIC,length:S.length},{data:S.data,mode:e.BYTE,length:S.length}]);break;case e.ALPHANUMERIC:x.push([S,{data:S.data,mode:e.BYTE,length:S.length}]);break;case e.KANJI:x.push([S,{data:S.data,mode:e.BYTE,length:l(S.data)}]);break;case e.BYTE:x.push([{data:S.data,mode:e.BYTE,length:l(S.data)}])}}return x}function g(y,x){const b={},S={start:{}};let R=["start"];for(let P=0;P<y.length;P++){const A=y[P],T=[];for(let M=0;M<A.length;M++){const k=A[M],D=""+P+M;T.push(D),b[D]={node:k,lastCount:0},S[D]={};for(let N=0;N<R.length;N++){const L=R[N];b[L]&&b[L].node.mode===k.mode?(S[L][D]=d(b[L].lastCount+k.length,k.mode)-d(b[L].lastCount,k.mode),b[L].lastCount+=k.length):(b[L]&&(b[L].lastCount=k.length),S[L][D]=d(k.length,k.mode)+4+e.getCharCountIndicator(k.mode,x))}}R=T}for(let P=0;P<R.length;P++)S[R[P]].end=0;return{map:S,table:b}}function v(y,x){let b;const S=e.getBestModeForData(y);if(b=e.from(x,S),b!==e.BYTE&&b.bit<S.bit)throw new Error('"'+y+'" cannot be encoded with mode '+e.toString(b)+`.
21
+ Suggested mode is: `+e.toString(S));switch(b===e.KANJI&&!a.isKanjiModeEnabled()&&(b=e.BYTE),b){case e.NUMERIC:return new n(y);case e.ALPHANUMERIC:return new r(y);case e.KANJI:return new s(y);case e.BYTE:return new i(y)}}t.fromArray=function(x){return x.reduce(function(b,S){return typeof S=="string"?b.push(v(S,null)):S.data&&b.push(v(S.data,S.mode)),b},[])},t.fromString=function(x,b){const S=f(x,a.isKanjiModeEnabled()),R=m(S),P=g(R,b),A=c.find_path(P.map,"start","end"),T=[];for(let M=1;M<A.length-1;M++)T.push(P.table[A[M]].node);return t.fromArray(h(T))},t.rawSplit=function(x){return t.fromArray(f(x,a.isKanjiModeEnabled()))}})(Jn)),Jn}var No;function g0(){if(No)return Fn;No=1;const t=Yt(),e=Ei(),n=t0(),r=e0(),i=n0(),s=r0(),o=i0(),a=Gc(),c=a0(),l=c0(),u=l0(),f=Kt(),d=p0();function h(P,A){const T=P.size,M=s.getPositions(A);for(let k=0;k<M.length;k++){const D=M[k][0],N=M[k][1];for(let L=-1;L<=7;L++)if(!(D+L<=-1||T<=D+L))for(let B=-1;B<=7;B++)N+B<=-1||T<=N+B||(L>=0&&L<=6&&(B===0||B===6)||B>=0&&B<=6&&(L===0||L===6)||L>=2&&L<=4&&B>=2&&B<=4?P.set(D+L,N+B,!0,!0):P.set(D+L,N+B,!1,!0))}}function m(P){const A=P.size;for(let T=8;T<A-8;T++){const M=T%2===0;P.set(T,6,M,!0),P.set(6,T,M,!0)}}function g(P,A){const T=i.getPositions(A);for(let M=0;M<T.length;M++){const k=T[M][0],D=T[M][1];for(let N=-2;N<=2;N++)for(let L=-2;L<=2;L++)N===-2||N===2||L===-2||L===2||N===0&&L===0?P.set(k+N,D+L,!0,!0):P.set(k+N,D+L,!1,!0)}}function v(P,A){const T=P.size,M=l.getEncodedBits(A);let k,D,N;for(let L=0;L<18;L++)k=Math.floor(L/3),D=L%3+T-8-3,N=(M>>L&1)===1,P.set(k,D,N,!0),P.set(D,k,N,!0)}function y(P,A,T){const M=P.size,k=u.getEncodedBits(A,T);let D,N;for(D=0;D<15;D++)N=(k>>D&1)===1,D<6?P.set(D,8,N,!0):D<8?P.set(D+1,8,N,!0):P.set(M-15+D,8,N,!0),D<8?P.set(8,M-D-1,N,!0):D<9?P.set(8,15-D-1+1,N,!0):P.set(8,15-D-1,N,!0);P.set(M-8,8,1,!0)}function x(P,A){const T=P.size;let M=-1,k=T-1,D=7,N=0;for(let L=T-1;L>0;L-=2)for(L===6&&L--;;){for(let B=0;B<2;B++)if(!P.isReserved(k,L-B)){let Z=!1;N<A.length&&(Z=(A[N]>>>D&1)===1),P.set(k,L-B,Z),D--,D===-1&&(N++,D=7)}if(k+=M,k<0||T<=k){k-=M,M=-M;break}}}function b(P,A,T){const M=new n;T.forEach(function(B){M.put(B.mode.bit,4),M.put(B.getLength(),f.getCharCountIndicator(B.mode,P)),B.write(M)});const k=t.getSymbolTotalCodewords(P),D=a.getTotalCodewordsCount(P,A),N=(k-D)*8;for(M.getLengthInBits()+4<=N&&M.put(0,4);M.getLengthInBits()%8!==0;)M.putBit(0);const L=(N-M.getLengthInBits())/8;for(let B=0;B<L;B++)M.put(B%2?17:236,8);return S(M,P,A)}function S(P,A,T){const M=t.getSymbolTotalCodewords(A),k=a.getTotalCodewordsCount(A,T),D=M-k,N=a.getBlocksCount(A,T),L=M%N,B=N-L,Z=Math.floor(M/N),at=Math.floor(D/N),G=at+1,Y=Z-at,I=new c(Y);let O=0;const C=new Array(N),$=new Array(N);let _=0;const H=new Uint8Array(P.buffer);for(let ct=0;ct<N;ct++){const Lt=ct<B?at:G;C[ct]=H.slice(O,O+Lt),$[ct]=I.encode(C[ct]),O+=Lt,_=Math.max(_,Lt)}const J=new Uint8Array(M);let et=0,U,Q;for(U=0;U<_;U++)for(Q=0;Q<N;Q++)U<C[Q].length&&(J[et++]=C[Q][U]);for(U=0;U<Y;U++)for(Q=0;Q<N;Q++)J[et++]=$[Q][U];return J}function R(P,A,T,M){let k;if(Array.isArray(P))k=d.fromArray(P);else if(typeof P=="string"){let Z=A;if(!Z){const at=d.rawSplit(P);Z=l.getBestVersionForData(at,T)}k=d.fromString(P,Z||40)}else throw new Error("Invalid data");const D=l.getBestVersionForData(k,T);if(!D)throw new Error("The amount of data is too big to be stored in a QR Code");if(!A)A=D;else if(A<D)throw new Error(`
22
+ The chosen QR Code version cannot contain this amount of data.
23
+ Minimum version required to store current data is: `+D+`.
24
+ `);const N=b(A,T,k),L=t.getSymbolSize(A),B=new r(L);return h(B,A),m(B),g(B,A),y(B,T,0),A>=7&&v(B,A),x(B,N),isNaN(M)&&(M=o.getBestMask(B,y.bind(null,B,T))),o.applyMask(M,B),y(B,T,M),{modules:B,version:A,errorCorrectionLevel:T,maskPattern:M,segments:k}}return Fn.create=function(A,T){if(typeof A=="undefined"||A==="")throw new Error("No input text");let M=e.M,k,D;return typeof T!="undefined"&&(M=e.from(T.errorCorrectionLevel,e.M),k=l.from(T.version),D=o.from(T.maskPattern),T.toSJISFunc&&t.setToSJISFunction(T.toSJISFunc)),R(A,k,M,D)},Fn}var ir={},sr={},Lo;function Kc(){return Lo||(Lo=1,(function(t){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(s){return[s,s]}))),r.length===6&&r.push("F","F");const i=parseInt(r.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:i&255,hex:"#"+r.slice(0,6).join("")}}t.getOptions=function(r){r||(r={}),r.color||(r.color={});const i=typeof r.margin=="undefined"||r.margin===null||r.margin<0?4:r.margin,s=r.width&&r.width>=21?r.width:void 0,o=r.scale||4;return{width:s,scale:s?4:o,margin:i,color:{dark:e(r.color.dark||"#000000ff"),light:e(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},t.getScale=function(r,i){return i.width&&i.width>=r+i.margin*2?i.width/(r+i.margin*2):i.scale},t.getImageWidth=function(r,i){const s=t.getScale(r,i);return Math.floor((r+i.margin*2)*s)},t.qrToImageData=function(r,i,s){const o=i.modules.size,a=i.modules.data,c=t.getScale(o,s),l=Math.floor((o+s.margin*2)*c),u=s.margin*c,f=[s.color.light,s.color.dark];for(let d=0;d<l;d++)for(let h=0;h<l;h++){let m=(d*l+h)*4,g=s.color.light;if(d>=u&&h>=u&&d<l-u&&h<l-u){const v=Math.floor((d-u)/c),y=Math.floor((h-u)/c);g=f[a[v*o+y]?1:0]}r[m++]=g.r,r[m++]=g.g,r[m++]=g.b,r[m]=g.a}}})(sr)),sr}var $o;function y0(){return $o||($o=1,(function(t){const e=Kc();function n(i,s,o){i.clearRect(0,0,s.width,s.height),s.style||(s.style={}),s.height=o,s.width=o,s.style.height=o+"px",s.style.width=o+"px"}function r(){try{return document.createElement("canvas")}catch(i){throw new Error("You need to specify a canvas element")}}t.render=function(s,o,a){let c=a,l=o;typeof c=="undefined"&&(!o||!o.getContext)&&(c=o,o=void 0),o||(l=r()),c=e.getOptions(c);const u=e.getImageWidth(s.modules.size,c),f=l.getContext("2d"),d=f.createImageData(u,u);return e.qrToImageData(d.data,s,c),n(f,l,u),f.putImageData(d,0,0),l},t.renderToDataURL=function(s,o,a){let c=a;typeof c=="undefined"&&(!o||!o.getContext)&&(c=o,o=void 0),c||(c={});const l=t.render(s,o,c),u=c.type||"image/png",f=c.rendererOpts||{};return l.toDataURL(u,f.quality)}})(ir)),ir}var or={},Io;function v0(){if(Io)return or;Io=1;const t=Kc();function e(i,s){const o=i.a/255,a=s+'="'+i.hex+'"';return o<1?a+" "+s+'-opacity="'+o.toFixed(2).slice(1)+'"':a}function n(i,s,o){let a=i+s;return typeof o!="undefined"&&(a+=" "+o),a}function r(i,s,o){let a="",c=0,l=!1,u=0;for(let f=0;f<i.length;f++){const d=Math.floor(f%s),h=Math.floor(f/s);!d&&!l&&(l=!0),i[f]?(u++,f>0&&d>0&&i[f-1]||(a+=l?n("M",d+o,.5+h+o):n("m",c,0),c=0,l=!1),d+1<s&&i[f+1]||(a+=n("h",u),u=0)):c++}return a}return or.render=function(s,o,a){const c=t.getOptions(o),l=s.modules.size,u=s.modules.data,f=l+c.margin*2,d=c.color.light.a?"<path "+e(c.color.light,"fill")+' d="M0 0h'+f+"v"+f+'H0z"/>':"",h="<path "+e(c.color.dark,"stroke")+' d="'+r(u,l,c.margin)+'"/>',m='viewBox="0 0 '+f+" "+f+'"',v='<svg xmlns="http://www.w3.org/2000/svg" '+(c.width?'width="'+c.width+'" height="'+c.width+'" ':"")+m+' shape-rendering="crispEdges">'+d+h+`</svg>
25
+ `;return typeof a=="function"&&a(null,v),v},or}var Bo;function b0(){if(Bo)return Qt;Bo=1;const t=Qp(),e=g0(),n=y0(),r=v0();function i(s,o,a,c,l){const u=[].slice.call(arguments,1),f=u.length,d=typeof u[f-1]=="function";if(!d&&!t())throw new Error("Callback required as last argument");if(d){if(f<2)throw new Error("Too few arguments provided");f===2?(l=a,a=o,o=c=void 0):f===3&&(o.getContext&&typeof l=="undefined"?(l=c,c=void 0):(l=c,c=a,a=o,o=void 0))}else{if(f<1)throw new Error("Too few arguments provided");return f===1?(a=o,o=c=void 0):f===2&&!o.getContext&&(c=a,a=o,o=void 0),new Promise(function(h,m){try{const g=e.create(a,c);h(s(g,o,c))}catch(g){m(g)}})}try{const h=e.create(a,c);l(null,s(h,o,c))}catch(h){l(h)}}return Qt.create=e.create,Qt.toCanvas=i.bind(null,n.render),Qt.toDataURL=i.bind(null,n.renderToDataURL),Qt.toString=i.bind(null,function(s,o,a){return r.render(s,a)}),Qt}var w0=b0();const x0=dl(w0);function C0(i,s,o){return $t(this,arguments,function*(t,e,n,r={}){var a,c;try{let l=t;e&&n&&(l=`${e.toLowerCase()}:${t}?amount=${n}`);const u={errorCorrectionLevel:r.errorCorrectionLevel||"M",type:r.type||"image/png",quality:r.quality||.92,margin:r.margin||2,color:{dark:((a=r.color)==null?void 0:a.dark)||"#000000",light:((c=r.color)==null?void 0:c.light)||"#FFFFFF"},width:r.width||256};return yield x0.toDataURL(l,u)}catch(l){throw new Error(`Failed to generate QR code: ${l instanceof Error?l.message:"Unknown error"}`)}})}function T0(t){return $t(this,null,function*(){try{if(navigator.clipboard&&window.isSecureContext)return yield navigator.clipboard.writeText(t),!0;{const e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.left="-999999px",e.style.top="-999999px",document.body.appendChild(e),e.focus(),e.select();const n=document.execCommand("copy");return document.body.removeChild(e),n}}catch(e){return!1}})}const S0="_widget_1rwnu_3",Fo={widget:S0},P0=({endpoint:t,currency:e,network:n,destinations:r,amount:i="",title:s="🔥 Add Your Brand Here",subtitle:o="CHOOSE A PAYMENT METHOD",logo:a,theme:c="default",enableDirect:l=!0,transactionId:u,customerId:f,idempotencyKey:d,callbackUrl:h,onInitiate:m,onComplete:g,onError:v})=>{var Y;const y=qp(c),[x]=E.useState(i),[b,S]=E.useState([]),[R,P]=E.useState(!0),[A,T]=E.useState(null),[M,k]=E.useState(!1),[D,N]=E.useState(""),[L,B]=E.useState(""),[Z,at]=E.useState(!1);E.useEffect(()=>{$t(null,null,function*(){var O;try{const C=new URLSearchParams({currency:e,network:n}),H=((O=(yield(yield window.fetch(`${t}/payment-methods?${C}`)).json()).methods)==null?void 0:O.filter(et=>et.to===e&&et.network===n))||[],J=[];l&&J.push({vendor:"direct",source:"wallet",from:e,to:e,network:n,name:"Direct Payment"}),J.push(...H),S(J)}catch(C){console.error("Failed to fetch payment methods:",C),v==null||v(new Error("Failed to load payment methods"))}finally{P(!1)}})},[t,e,n,l,v]),E.useEffect(()=>{M?$t(null,null,function*(){try{const O=r.find($=>$.currency===e&&$.network===n);if(!O){B("No destination address found");return}const C=yield C0(O.address,n,x,{width:176,margin:1});N(C),B("")}catch(O){B("Failed to generate QR code"),console.error("QR generation error:",O)}}):(N(""),B(""))},[M,e,n,x,r]);const G=I=>$t(null,null,function*(){var C,$;if(A)return;const O=b.find(_=>(_.exchange?`${_.vendor}-${_.source}-${_.exchange}-${_.from}-${_.to}`:`${_.vendor}-${_.source}-${_.from}-${_.to}`)===I);if(O){T(I);try{const _=r.find(J=>J.currency===e&&J.network===n);if(!_)throw new Error(`No destination address found for ${e} on ${n}`);const H={amount:parseFloat(x),currency:O.from,customerId:f,address:_.address,transactionId:u,idempotencyKey:d,callbackUrl:h};if(yield m==null?void 0:m(H),O.vendor==="direct"){k(!0);return}else{const J=yield window.fetch(`${t}/payments`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({intent:H,method:O})}),et=yield J.json();if(J.ok)if((C=et.session)!=null&&C.id&&(($=et.session)!=null&&$.vendor))try{const U=window.atob(et.session.id),Q=(window.screen.width-500)/2,ct=(window.screen.height-700)/2;window.open(U,`${O.vendor}-checkout`,`width=500,height=700,left=${Q},top=${ct}`),g==null||g(et)}catch(U){console.error("Failed to decode checkout URL:",U),g==null||g(et)}else g==null||g(et);else throw new Error(et.message||"Payment failed")}}catch(_){v==null||v(_ instanceof Error?_:new Error("Payment failed"))}finally{T(null)}}});return R?w.jsx(lr,{children:w.jsx(te,{className:Fo.widget,style:y,children:w.jsxs(xt,{align:"center",justify:"center",h:"600px",children:[w.jsx(ce,{}),w.jsx(rt,{children:"Loading..."})]})})}):w.jsx(lr,{children:w.jsx(te,{shadow:"md",radius:"xl",p:0,className:Fo.widget,style:p({height:"600px"},y),"data-w3-payment-widget":!0,children:w.jsxs(W,{style:{position:"relative",overflow:"hidden",height:"100%",display:"flex",flexDirection:"column"},children:[w.jsx(W,{style:{flex:1,position:"relative",overflow:"hidden"},children:w.jsx(ph,{mode:"wait",children:M?w.jsx(Gp.div,{initial:{opacity:0,x:100},animate:{opacity:1,x:0},exit:{opacity:0,x:100},transition:{duration:.3,ease:"easeOut"},style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backgroundColor:"var(--w3-background)",borderTopLeftRadius:"var(--mantine-radius-xl)",borderTopRightRadius:"var(--mantine-radius-xl)",zIndex:10,overflow:"auto"},children:w.jsxs(W,{style:{height:"100%",display:"flex",flexDirection:"column",backgroundColor:"var(--w3-background)"},children:[w.jsxs(ft,{justify:"space-between",px:"xs",pt:"md",pb:"sm",style:{flexShrink:0},children:[w.jsx(W,{style:{width:"40px"}}),w.jsxs(rt,{fw:700,size:"sm",style:{textAlign:"center",flex:1,color:"var(--w3-text)"},children:["Send ",e," to Complete Payment"]}),w.jsx(Wt,{variant:"subtle",onClick:()=>k(!1),style:{width:"40px",height:"40px",color:"var(--w3-text)"},children:"→"})]}),w.jsx(W,{style:{flex:1,overflow:"auto",backgroundColor:"var(--w3-background)"},children:w.jsxs(xt,{px:"xl",pb:"md",align:"center",gap:"sm",children:[w.jsx(xt,{align:"center",gap:0,children:w.jsxs(rt,{style:{fontSize:"var(--w3-fontSizeLarge)",fontWeight:"bold",letterSpacing:"-0.02em",textAlign:"center",color:"var(--w3-text)"},children:[x," ",e]})}),w.jsx(te,{radius:"xl",p:"sm",style:{width:"176px",height:"176px",backgroundColor:"var(--w3-background)",border:"2px solid var(--mantine-color-gray-2)"},children:w.jsx(qr,{style:{width:"100%",height:"100%"},children:L?w.jsx(rt,{size:"xs",style:{color:"var(--w3-danger)"},children:"Error"}):D?w.jsx(Ot,{src:D,alt:"Payment QR Code",style:{width:"100%",height:"100%"}}):w.jsx(ce,{})})}),w.jsxs(xt,{w:"100%",gap:4,children:[w.jsxs(rt,{fw:700,tt:"uppercase",style:{letterSpacing:"0.05em",fontSize:"10px",color:"var(--w3-textSecondary)"},children:[e," Address"]}),w.jsx(W,{px:"xs",py:4,style:{backgroundColor:"var(--w3-border)",borderRadius:"var(--mantine-radius-lg)",border:"1px solid var(--w3-border)"},children:w.jsxs(ft,{gap:"xs",children:[w.jsx(rt,{style:{flex:1,fontFamily:"monospace",fontSize:"10px",color:"var(--w3-text)"},children:(Y=r.find(I=>I.currency===e&&I.network===n))==null?void 0:Y.address}),w.jsx(Wt,{variant:"outline",radius:"lg",size:"lg",style:{backgroundColor:"var(--w3-background)",borderColor:Z?"var(--w3-success)":"var(--w3-border)",color:Z?"var(--w3-success)":"var(--w3-text)"},onClick:()=>$t(null,null,function*(){const I=r.find(O=>O.currency===e&&O.network===n);I!=null&&I.address&&(yield T0(I.address))&&(at(!0),setTimeout(()=>at(!1),2e3))}),children:Z?w.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:w.jsx("polyline",{points:"20,6 9,17 4,12"})}):w.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[w.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),w.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2 2v1"})]})})]})})]}),w.jsx(W,{p:"md",style:{backgroundColor:"var(--w3-border)",borderRadius:"var(--mantine-radius-md)",width:"100%"},children:w.jsxs(ft,{gap:"md",align:"flex-start",children:[w.jsx("div",{style:{width:"20px",height:"20px",borderRadius:"50%",backgroundColor:"#dbeafe",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:w.jsx(rt,{size:"xs",style:{color:"var(--w3-textSecondary)"},children:"ℹ"})}),w.jsxs(rt,{size:"xs",style:{lineHeight:1.5,flex:1,color:"var(--w3-textSecondary)"},children:["Send exactly"," ",w.jsxs(rt,{component:"span",fw:700,style:{color:"var(--w3-text)"},children:[x," ",e]})," ","to complete your payment. The transaction will be confirmed automatically."]})]})})]})})]})},"qr-screen"):w.jsxs(W,{style:{height:"100%",display:"flex",flexDirection:"column",zIndex:1},children:[w.jsxs(xt,{align:"center",gap:"xl",pt:40,pb:32,px:"xl",style:{background:"var(--w3-background)",borderTopLeftRadius:"var(--mantine-radius-xl)",borderTopRightRadius:"var(--mantine-radius-xl)",borderBottom:"0.25px solid var(--w3-border)",flexShrink:0},children:[w.jsxs(ft,{gap:"xs",children:[a?w.jsx(Ot,{src:a,alt:"Logo",w:"28px",h:"28px",style:{borderRadius:"50%"}}):w.jsx("div",{style:{width:"28px",height:"28px",borderRadius:"50%",backgroundColor:"var(--mantine-color-w3Accent-5)",display:"flex",alignItems:"center",justifyContent:"center",color:"white",fontWeight:"bold",fontSize:"var(--w3-fontSizeBase)"},children:"🔥"}),w.jsx(rt,{size:"xs",fw:700,style:{letterSpacing:"-0.02em",color:"var(--w3-text)"},children:s})]}),w.jsx(xt,{align:"center",gap:"xs",children:w.jsxs(ft,{gap:"xs",align:"baseline",children:[w.jsx(rt,{style:{fontSize:"var(--w3-fontSizeLarge)",fontWeight:"bold",letterSpacing:"-0.02em",lineHeight:1,color:"var(--w3-text)"},children:x||"0"}),w.jsx(rt,{size:"lg",fw:500,style:{letterSpacing:"-0.01em",color:"var(--w3-textSecondary)"},children:e})]})})]}),w.jsx(W,{style:{flex:1,overflow:"auto",backgroundColor:"var(--w3-background)"},children:w.jsxs(xt,{gap:"xs",px:"lg",py:"xs",children:[w.jsx(rt,{size:"xs",fw:700,tt:"uppercase",px:"xs",style:{letterSpacing:"0.1em",fontSize:"var(--w3-fontSizeSmall)",color:"var(--w3-textSecondary)"},children:o}),w.jsx(te,{radius:"lg",p:0,shadow:"none",style:{backgroundColor:"var(--w3-background)",border:"0.25px solid var(--w3-border)",overflow:"hidden"},children:w.jsx(xt,{gap:0,children:b.map(I=>{const O=I.exchange?`${I.vendor}-${I.source}-${I.exchange}-${I.from}-${I.to}`:`${I.vendor}-${I.source}-${I.from}-${I.to}`;let C="",$="";return I.vendor==="direct"?(C="Direct Payment",$=`Send ${I.from} directly`):I.exchange?(C=`${I.name||I.exchange} (${I.vendor})`,$=`${I.from} → ${I.to} on ${I.network}`):(C=`${I.name||I.source} (${I.vendor})`,$=`${I.from} → ${I.to} on ${I.network}`),w.jsx(Yp,{id:O,name:C,description:$,fallbackText:C.substring(0,2).toUpperCase(),avatarColor:I.vendor==="direct"?"green":"blue",disabled:A===O,onClick:()=>G(O)},O)})})})]})})]},"payment-form")})}),w.jsx(Jp,{})]})})})},Xc="1.0.0",A0={W3_PAYMENTS_REACT_VERSION:Xc};exports.W3PaymentWidget=P0;exports.W3_PAYMENTS_REACT_VERSION=Xc;exports.default=A0;