diff --git a/v3/internal/setupwizard/frontend/dist/assets/index-5h4Dv4JW.css b/v3/internal/setupwizard/frontend/dist/assets/index-5h4Dv4JW.css deleted file mode 100644 index 7d19d4038..000000000 --- a/v3/internal/setupwizard/frontend/dist/assets/index-5h4Dv4JW.css +++ /dev/null @@ -1 +0,0 @@ -*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.z-10{z-index:10}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-6{margin-top:1.5rem}.flex{display:flex}.h-2{height:.5rem}.h-3{height:.75rem}.h-5{height:1.25rem}.min-h-screen{min-height:100vh}.w-2{width:.5rem}.w-3{width:.75rem}.w-5{width:1.25rem}.w-full{width:100%}.min-w-0{min-width:0px}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-2{gap:.5rem}.gap-4{gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1))}.border-gray-700\/50{border-color:#37415180}.border-green-500\/30{border-color:#22c55e4d}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-yellow-500\/30{border-color:#eab3084d}.border-t-transparent{border-top-color:transparent}.bg-\[\#0f0f0f\]{--tw-bg-opacity: 1;background-color:rgb(15 15 15 / var(--tw-bg-opacity, 1))}.bg-gray-800\/50{background-color:#1f293780}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-500\/10{background-color:#22c55e1a}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-500\/20{background-color:#ef444433}.bg-red-500\/50{background-color:#ef444480}.bg-yellow-500\/10{background-color:#eab3081a}.object-contain{-o-object-fit:contain;object-fit:contain}.p-4{padding:1rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.uppercase{text-transform:uppercase}.tracking-wider{letter-spacing:.05em}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:root{--wails-red: #ef4444;--wails-red-dark: #dc2626;--wails-red-light: #f87171;--bg-primary: #0f0f0f;--bg-secondary: #1f2937;--bg-tertiary: #374151}*{box-sizing:border-box}html,body,#root{margin:0;padding:0;min-height:100vh;background:var(--bg-primary);color:#fff;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.gradient-text{background:linear-gradient(135deg,#fff,#ef4444);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.glass-card{background:#1f2937cc;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid rgba(55,65,81,.5)}.grid-bg{background-image:linear-gradient(rgba(239,68,68,.03) 1px,transparent 1px),linear-gradient(90deg,rgba(239,68,68,.03) 1px,transparent 1px);background-size:40px 40px}.radial-glow{background:radial-gradient(ellipse at center,rgba(239,68,68,.1) 0%,transparent 70%)}::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{background:var(--bg-primary)}::-webkit-scrollbar-thumb{background:var(--bg-tertiary);border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#4b5563}.btn-primary{border-radius:.75rem;background-image:linear-gradient(to right,var(--tw-gradient-stops));--tw-gradient-from: #ef4444 var(--tw-gradient-from-position);--tw-gradient-to: rgb(239 68 68 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #dc2626 var(--tw-gradient-to-position);padding:.75rem 2rem;font-weight:600;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.btn-primary:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);--tw-shadow-color: rgb(239 68 68 / .3);--tw-shadow: var(--tw-shadow-colored)}.btn-primary:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.btn-secondary{border-radius:.75rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1));background-color:transparent;padding:.75rem 2rem;font-weight:500;--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1));transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.btn-secondary:hover{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1));background-color:#1f293780;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}@keyframes spin{to{transform:rotate(360deg)}}.spinner{animation:spin 1s linear infinite}.check-path{stroke-dasharray:100;stroke-dashoffset:100;animation:drawCheck .5s ease-out forwards}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}} diff --git a/v3/internal/setupwizard/frontend/dist/assets/index-BYm8n1Ze.js b/v3/internal/setupwizard/frontend/dist/assets/index-BYm8n1Ze.js deleted file mode 100644 index 251e50410..000000000 --- a/v3/internal/setupwizard/frontend/dist/assets/index-BYm8n1Ze.js +++ /dev/null @@ -1,48 +0,0 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function Nm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Wf={exports:{}},xs={},$f={exports:{}},j={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Xr=Symbol.for("react.element"),_m=Symbol.for("react.portal"),jm=Symbol.for("react.fragment"),Fm=Symbol.for("react.strict_mode"),Im=Symbol.for("react.profiler"),Om=Symbol.for("react.provider"),zm=Symbol.for("react.context"),Bm=Symbol.for("react.forward_ref"),Um=Symbol.for("react.suspense"),Wm=Symbol.for("react.memo"),$m=Symbol.for("react.lazy"),vu=Symbol.iterator;function Hm(e){return e===null||typeof e!="object"?null:(e=vu&&e[vu]||e["@@iterator"],typeof e=="function"?e:null)}var Hf={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Kf=Object.assign,Gf={};function Gn(e,t,n){this.props=e,this.context=t,this.refs=Gf,this.updater=n||Hf}Gn.prototype.isReactComponent={};Gn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Gn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Qf(){}Qf.prototype=Gn.prototype;function Hl(e,t,n){this.props=e,this.context=t,this.refs=Gf,this.updater=n||Hf}var Kl=Hl.prototype=new Qf;Kl.constructor=Hl;Kf(Kl,Gn.prototype);Kl.isPureReactComponent=!0;var wu=Array.isArray,Yf=Object.prototype.hasOwnProperty,Gl={current:null},Xf={key:!0,ref:!0,__self:!0,__source:!0};function Zf(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)Yf.call(t,r)&&!Xf.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1>>1,ie=E[$];if(0>>1;$i(Us,N))Hti(li,Us)?(E[$]=li,E[Ht]=N,$=Ht):(E[$]=Us,E[$t]=N,$=$t);else if(Hti(li,N))E[$]=li,E[Ht]=N,$=Ht;else break e}}return R}function i(E,R){var N=E.sortIndex-R.sortIndex;return N!==0?N:E.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var a=[],u=[],c=1,f=null,d=3,y=!1,g=!1,v=!1,k=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(E){for(var R=n(u);R!==null;){if(R.callback===null)r(u);else if(R.startTime<=E)r(u),R.sortIndex=R.expirationTime,t(a,R);else break;R=n(u)}}function w(E){if(v=!1,m(E),!g)if(n(a)!==null)g=!0,si(S);else{var R=n(u);R!==null&&Z(w,R.startTime-E)}}function S(E,R){g=!1,v&&(v=!1,p(x),x=-1),y=!0;var N=d;try{for(m(R),f=n(a);f!==null&&(!(f.expirationTime>R)||E&&!J());){var $=f.callback;if(typeof $=="function"){f.callback=null,d=f.priorityLevel;var ie=$(f.expirationTime<=R);R=e.unstable_now(),typeof ie=="function"?f.callback=ie:f===n(a)&&r(a),m(R)}else r(a);f=n(a)}if(f!==null)var oi=!0;else{var $t=n(u);$t!==null&&Z(w,$t.startTime-R),oi=!1}return oi}finally{f=null,d=N,y=!1}}var T=!1,C=null,x=-1,_=5,V=-1;function J(){return!(e.unstable_now()-V<_)}function gt(){if(C!==null){var E=e.unstable_now();V=E;var R=!0;try{R=C(!0,E)}finally{R?Wt():(T=!1,C=null)}}else T=!1}var Wt;if(typeof h=="function")Wt=function(){h(gt)};else if(typeof MessageChannel<"u"){var Jn=new MessageChannel,ii=Jn.port2;Jn.port1.onmessage=gt,Wt=function(){ii.postMessage(null)}}else Wt=function(){k(gt,0)};function si(E){C=E,T||(T=!0,Wt())}function Z(E,R){x=k(function(){E(e.unstable_now())},R)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(E){E.callback=null},e.unstable_continueExecution=function(){g||y||(g=!0,si(S))},e.unstable_forceFrameRate=function(E){0>E||125$?(E.sortIndex=N,t(u,E),n(a)===null&&E===n(u)&&(v?(p(x),x=-1):v=!0,Z(w,N-$))):(E.sortIndex=ie,t(a,E),g||y||(g=!0,si(S))),E},e.unstable_shouldYield=J,e.unstable_wrapCallback=function(E){var R=d;return function(){var N=d;d=R;try{return E.apply(this,arguments)}finally{d=N}}}})(td);ed.exports=td;var ny=ed.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var ry=M,Re=ny;function P(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ro=Object.prototype.hasOwnProperty,iy=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,xu={},Tu={};function sy(e){return Ro.call(Tu,e)?!0:Ro.call(xu,e)?!1:iy.test(e)?Tu[e]=!0:(xu[e]=!0,!1)}function oy(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function ly(e,t,n,r){if(t===null||typeof t>"u"||oy(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function xe(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var fe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){fe[e]=new xe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];fe[t]=new xe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){fe[e]=new xe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){fe[e]=new xe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){fe[e]=new xe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){fe[e]=new xe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){fe[e]=new xe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){fe[e]=new xe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){fe[e]=new xe(e,5,!1,e.toLowerCase(),null,!1,!1)});var Yl=/[\-:]([a-z])/g;function Xl(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Yl,Xl);fe[t]=new xe(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Yl,Xl);fe[t]=new xe(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Yl,Xl);fe[t]=new xe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){fe[e]=new xe(e,1,!1,e.toLowerCase(),null,!1,!1)});fe.xlinkHref=new xe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){fe[e]=new xe(e,1,!1,e.toLowerCase(),null,!0,!0)});function Zl(e,t,n,r){var i=fe.hasOwnProperty(t)?fe[t]:null;(i!==null?i.type!==0:r||!(2l||i[o]!==s[l]){var a=` -`+i[o].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=o&&0<=l);break}}}finally{Hs=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ar(e):""}function ay(e){switch(e.tag){case 5:return ar(e.type);case 16:return ar("Lazy");case 13:return ar("Suspense");case 19:return ar("SuspenseList");case 0:case 2:case 15:return e=Ks(e.type,!1),e;case 11:return e=Ks(e.type.render,!1),e;case 1:return e=Ks(e.type,!0),e;default:return""}}function jo(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case pn:return"Fragment";case hn:return"Portal";case Lo:return"Profiler";case ql:return"StrictMode";case No:return"Suspense";case _o:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case id:return(e.displayName||"Context")+".Consumer";case rd:return(e._context.displayName||"Context")+".Provider";case Jl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case bl:return t=e.displayName||null,t!==null?t:jo(e.type)||"Memo";case St:t=e._payload,e=e._init;try{return jo(e(t))}catch{}}return null}function uy(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return jo(t);case 8:return t===ql?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function _t(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function od(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function cy(e){var t=od(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ci(e){e._valueTracker||(e._valueTracker=cy(e))}function ld(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=od(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ki(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Fo(e,t){var n=t.checked;return Q({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Pu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=_t(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ad(e,t){t=t.checked,t!=null&&Zl(e,"checked",t,!1)}function Io(e,t){ad(e,t);var n=_t(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Oo(e,t.type,n):t.hasOwnProperty("defaultValue")&&Oo(e,t.type,_t(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Cu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Oo(e,t,n){(t!=="number"||Ki(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ur=Array.isArray;function Vn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=fi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Mr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var hr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},fy=["Webkit","ms","Moz","O"];Object.keys(hr).forEach(function(e){fy.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),hr[t]=hr[e]})});function dd(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||hr.hasOwnProperty(e)&&hr[e]?(""+t).trim():t+"px"}function hd(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=dd(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var dy=Q({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Uo(e,t){if(t){if(dy[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(P(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(P(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(P(61))}if(t.style!=null&&typeof t.style!="object")throw Error(P(62))}}function Wo(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var $o=null;function ea(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ho=null,Rn=null,Ln=null;function Du(e){if(e=Jr(e)){if(typeof Ho!="function")throw Error(P(280));var t=e.stateNode;t&&(t=Es(t),Ho(e.stateNode,e.type,t))}}function pd(e){Rn?Ln?Ln.push(e):Ln=[e]:Rn=e}function md(){if(Rn){var e=Rn,t=Ln;if(Ln=Rn=null,Du(e),t)for(e=0;e>>=0,e===0?32:31-(ky(e)/Py|0)|0}var di=64,hi=4194304;function cr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Xi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var l=o&~i;l!==0?r=cr(l):(s&=o,s!==0&&(r=cr(s)))}else o=n&~i,o!==0?r=cr(o):s!==0&&(r=cr(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Zr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Xe(t),e[t]=n}function Dy(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=mr),Iu=" ",Ou=!1;function jd(e,t){switch(e){case"keyup":return ng.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var mn=!1;function ig(e,t){switch(e){case"compositionend":return Fd(t);case"keypress":return t.which!==32?null:(Ou=!0,Iu);case"textInput":return e=t.data,e===Iu&&Ou?null:e;default:return null}}function sg(e,t){if(mn)return e==="compositionend"||!aa&&jd(e,t)?(e=Nd(),Li=sa=Pt=null,mn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Wu(n)}}function Bd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Bd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ud(){for(var e=window,t=Ki();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ki(e.document)}return t}function ua(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function pg(e){var t=Ud(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Bd(n.ownerDocument.documentElement,n)){if(r!==null&&ua(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=$u(n,s);var o=$u(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,yn=null,Zo=null,gr=null,qo=!1;function Hu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;qo||yn==null||yn!==Ki(r)||(r=yn,"selectionStart"in r&&ua(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),gr&&Nr(gr,r)||(gr=r,r=Ji(Zo,"onSelect"),0wn||(e.current=rl[wn],rl[wn]=null,wn--)}function O(e,t){wn++,rl[wn]=e.current,e.current=t}var jt={},ye=zt(jt),Ce=zt(!1),sn=jt;function On(e,t){var n=e.type.contextTypes;if(!n)return jt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ee(e){return e=e.childContextTypes,e!=null}function es(){B(Ce),B(ye)}function qu(e,t,n){if(ye.current!==jt)throw Error(P(168));O(ye,t),O(Ce,n)}function Zd(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(P(108,uy(e)||"Unknown",i));return Q({},n,r)}function ts(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||jt,sn=ye.current,O(ye,e),O(Ce,Ce.current),!0}function Ju(e,t,n){var r=e.stateNode;if(!r)throw Error(P(169));n?(e=Zd(e,t,sn),r.__reactInternalMemoizedMergedChildContext=e,B(Ce),B(ye),O(ye,e)):B(Ce),O(Ce,n)}var ot=null,Ms=!1,so=!1;function qd(e){ot===null?ot=[e]:ot.push(e)}function Eg(e){Ms=!0,qd(e)}function Bt(){if(!so&&ot!==null){so=!0;var e=0,t=I;try{var n=ot;for(I=1;e>=o,i-=o,lt=1<<32-Xe(t)+i|n<x?(_=C,C=null):_=C.sibling;var V=d(p,C,m[x],w);if(V===null){C===null&&(C=_);break}e&&C&&V.alternate===null&&t(p,C),h=s(V,h,x),T===null?S=V:T.sibling=V,T=V,C=_}if(x===m.length)return n(p,C),U&&Gt(p,x),S;if(C===null){for(;xx?(_=C,C=null):_=C.sibling;var J=d(p,C,V.value,w);if(J===null){C===null&&(C=_);break}e&&C&&J.alternate===null&&t(p,C),h=s(J,h,x),T===null?S=J:T.sibling=J,T=J,C=_}if(V.done)return n(p,C),U&&Gt(p,x),S;if(C===null){for(;!V.done;x++,V=m.next())V=f(p,V.value,w),V!==null&&(h=s(V,h,x),T===null?S=V:T.sibling=V,T=V);return U&&Gt(p,x),S}for(C=r(p,C);!V.done;x++,V=m.next())V=y(C,p,x,V.value,w),V!==null&&(e&&V.alternate!==null&&C.delete(V.key===null?x:V.key),h=s(V,h,x),T===null?S=V:T.sibling=V,T=V);return e&&C.forEach(function(gt){return t(p,gt)}),U&&Gt(p,x),S}function k(p,h,m,w){if(typeof m=="object"&&m!==null&&m.type===pn&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case ui:e:{for(var S=m.key,T=h;T!==null;){if(T.key===S){if(S=m.type,S===pn){if(T.tag===7){n(p,T.sibling),h=i(T,m.props.children),h.return=p,p=h;break e}}else if(T.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===St&&tc(S)===T.type){n(p,T.sibling),h=i(T,m.props),h.ref=ir(p,T,m),h.return=p,p=h;break e}n(p,T);break}else t(p,T);T=T.sibling}m.type===pn?(h=tn(m.props.children,p.mode,w,m.key),h.return=p,p=h):(w=Bi(m.type,m.key,m.props,null,p.mode,w),w.ref=ir(p,h,m),w.return=p,p=w)}return o(p);case hn:e:{for(T=m.key;h!==null;){if(h.key===T)if(h.tag===4&&h.stateNode.containerInfo===m.containerInfo&&h.stateNode.implementation===m.implementation){n(p,h.sibling),h=i(h,m.children||[]),h.return=p,p=h;break e}else{n(p,h);break}else t(p,h);h=h.sibling}h=po(m,p.mode,w),h.return=p,p=h}return o(p);case St:return T=m._init,k(p,h,T(m._payload),w)}if(ur(m))return g(p,h,m,w);if(bn(m))return v(p,h,m,w);Si(p,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,h!==null&&h.tag===6?(n(p,h.sibling),h=i(h,m),h.return=p,p=h):(n(p,h),h=ho(m,p.mode,w),h.return=p,p=h),o(p)):n(p,h)}return k}var Bn=th(!0),nh=th(!1),is=zt(null),ss=null,Tn=null,ha=null;function pa(){ha=Tn=ss=null}function ma(e){var t=is.current;B(is),e._currentValue=t}function ol(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function _n(e,t){ss=e,ha=Tn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ke=!0),e.firstContext=null)}function Ue(e){var t=e._currentValue;if(ha!==e)if(e={context:e,memoizedValue:t,next:null},Tn===null){if(ss===null)throw Error(P(308));Tn=e,ss.dependencies={lanes:0,firstContext:e}}else Tn=Tn.next=e;return t}var Zt=null;function ya(e){Zt===null?Zt=[e]:Zt.push(e)}function rh(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,ya(t)):(n.next=i.next,i.next=n),t.interleaved=n,dt(e,r)}function dt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var xt=!1;function ga(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ih(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ut(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Vt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,F&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,dt(e,n)}return i=r.interleaved,i===null?(t.next=t,ya(r)):(t.next=i.next,i.next=t),r.interleaved=t,dt(e,n)}function _i(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,na(e,n)}}function nc(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function os(e,t,n,r){var i=e.updateQueue;xt=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var a=l,u=a.next;a.next=null,o===null?s=u:o.next=u,o=a;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==o&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=a))}if(s!==null){var f=i.baseState;o=0,c=u=a=null,l=s;do{var d=l.lane,y=l.eventTime;if((r&d)===d){c!==null&&(c=c.next={eventTime:y,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var g=e,v=l;switch(d=t,y=n,v.tag){case 1:if(g=v.payload,typeof g=="function"){f=g.call(y,f,d);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=v.payload,d=typeof g=="function"?g.call(y,f,d):g,d==null)break e;f=Q({},f,d);break e;case 2:xt=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[l]:d.push(l))}else y={eventTime:y,lane:d,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=y,a=f):c=c.next=y,o|=d;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;d=l,l=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(c===null&&(a=f),i.baseState=a,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);an|=o,e.lanes=o,e.memoizedState=f}}function rc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=lo.transition;lo.transition={};try{e(!1),t()}finally{I=n,lo.transition=r}}function xh(){return We().memoizedState}function Vg(e,t,n){var r=Lt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Th(e))kh(t,n);else if(n=rh(e,t,n,r),n!==null){var i=we();Ze(n,e,r,i),Ph(n,t,r)}}function Rg(e,t,n){var r=Lt(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Th(e))kh(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,l=s(o,n);if(i.hasEagerState=!0,i.eagerState=l,qe(l,o)){var a=t.interleaved;a===null?(i.next=i,ya(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=rh(e,t,i,r),n!==null&&(i=we(),Ze(n,e,r,i),Ph(n,t,r))}}function Th(e){var t=e.alternate;return e===G||t!==null&&t===G}function kh(e,t){vr=as=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ph(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,na(e,n)}}var us={readContext:Ue,useCallback:de,useContext:de,useEffect:de,useImperativeHandle:de,useInsertionEffect:de,useLayoutEffect:de,useMemo:de,useReducer:de,useRef:de,useState:de,useDebugValue:de,useDeferredValue:de,useTransition:de,useMutableSource:de,useSyncExternalStore:de,useId:de,unstable_isNewReconciler:!1},Lg={readContext:Ue,useCallback:function(e,t){return be().memoizedState=[e,t===void 0?null:t],e},useContext:Ue,useEffect:sc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Fi(4194308,4,yh.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Fi(4,2,e,t)},useMemo:function(e,t){var n=be();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=be();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Vg.bind(null,G,e),[r.memoizedState,e]},useRef:function(e){var t=be();return e={current:e},t.memoizedState=e},useState:ic,useDebugValue:Ca,useDeferredValue:function(e){return be().memoizedState=e},useTransition:function(){var e=ic(!1),t=e[0];return e=Ag.bind(null,e[1]),be().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=G,i=be();if(U){if(n===void 0)throw Error(P(407));n=n()}else{if(n=t(),le===null)throw Error(P(349));ln&30||ah(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,sc(ch.bind(null,r,s,e),[e]),r.flags|=2048,Ur(9,uh.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=be(),t=le.identifierPrefix;if(U){var n=at,r=lt;n=(r&~(1<<32-Xe(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=zr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[et]=t,e[Fr]=r,_h(e,t,!1,!1),t.stateNode=e;e:{switch(o=Wo(n,r),n){case"dialog":z("cancel",e),z("close",e),i=r;break;case"iframe":case"object":case"embed":z("load",e),i=r;break;case"video":case"audio":for(i=0;i$n&&(t.flags|=128,r=!0,sr(s,!1),t.lanes=4194304)}else{if(!r)if(e=ls(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),sr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!U)return he(t),null}else 2*q()-s.renderingStartTime>$n&&n!==1073741824&&(t.flags|=128,r=!0,sr(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=q(),t.sibling=null,n=H.current,O(H,r?n&1|2:n&1),t):(he(t),null);case 22:case 23:return Ra(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?De&1073741824&&(he(t),t.subtreeFlags&6&&(t.flags|=8192)):he(t),null;case 24:return null;case 25:return null}throw Error(P(156,t.tag))}function Bg(e,t){switch(fa(t),t.tag){case 1:return Ee(t.type)&&es(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Un(),B(Ce),B(ye),Sa(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return wa(t),null;case 13:if(B(H),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(P(340));zn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(H),null;case 4:return Un(),null;case 10:return ma(t.type._context),null;case 22:case 23:return Ra(),null;case 24:return null;default:return null}}var Ti=!1,pe=!1,Ug=typeof WeakSet=="function"?WeakSet:Set,D=null;function kn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){X(e,t,r)}else n.current=null}function ml(e,t,n){try{n()}catch(r){X(e,t,r)}}var yc=!1;function Wg(e,t){if(Jo=Zi,e=Ud(),ua(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,l=-1,a=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var y;f!==n||i!==0&&f.nodeType!==3||(l=o+i),f!==s||r!==0&&f.nodeType!==3||(a=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(y=f.firstChild)!==null;)d=f,f=y;for(;;){if(f===e)break t;if(d===n&&++u===i&&(l=o),d===s&&++c===r&&(a=o),(y=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=y}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(bo={focusedElem:e,selectionRange:n},Zi=!1,D=t;D!==null;)if(t=D,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,D=e;else for(;D!==null;){t=D;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var v=g.memoizedProps,k=g.memoizedState,p=t.stateNode,h=p.getSnapshotBeforeUpdate(t.elementType===t.type?v:Ge(t.type,v),k);p.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(P(163))}}catch(w){X(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,D=e;break}D=t.return}return g=yc,yc=!1,g}function wr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&ml(t,n,s)}i=i.next}while(i!==r)}}function Vs(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function yl(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Ih(e){var t=e.alternate;t!==null&&(e.alternate=null,Ih(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[et],delete t[Fr],delete t[nl],delete t[Pg],delete t[Cg])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Oh(e){return e.tag===5||e.tag===3||e.tag===4}function gc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Oh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function gl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=bi));else if(r!==4&&(e=e.child,e!==null))for(gl(e,t,n),e=e.sibling;e!==null;)gl(e,t,n),e=e.sibling}function vl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(vl(e,t,n),e=e.sibling;e!==null;)vl(e,t,n),e=e.sibling}var ae=null,Qe=!1;function vt(e,t,n){for(n=n.child;n!==null;)zh(e,t,n),n=n.sibling}function zh(e,t,n){if(tt&&typeof tt.onCommitFiberUnmount=="function")try{tt.onCommitFiberUnmount(Ts,n)}catch{}switch(n.tag){case 5:pe||kn(n,t);case 6:var r=ae,i=Qe;ae=null,vt(e,t,n),ae=r,Qe=i,ae!==null&&(Qe?(e=ae,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ae.removeChild(n.stateNode));break;case 18:ae!==null&&(Qe?(e=ae,n=n.stateNode,e.nodeType===8?io(e.parentNode,n):e.nodeType===1&&io(e,n),Rr(e)):io(ae,n.stateNode));break;case 4:r=ae,i=Qe,ae=n.stateNode.containerInfo,Qe=!0,vt(e,t,n),ae=r,Qe=i;break;case 0:case 11:case 14:case 15:if(!pe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&ml(n,t,o),i=i.next}while(i!==r)}vt(e,t,n);break;case 1:if(!pe&&(kn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){X(n,t,l)}vt(e,t,n);break;case 21:vt(e,t,n);break;case 22:n.mode&1?(pe=(r=pe)||n.memoizedState!==null,vt(e,t,n),pe=r):vt(e,t,n);break;default:vt(e,t,n)}}function vc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Ug),t.forEach(function(r){var i=qg.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function $e(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=o),r&=~s}if(r=i,r=q()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Hg(r/1960))-r,10e?16:e,Ct===null)var r=!1;else{if(e=Ct,Ct=null,ds=0,F&6)throw Error(P(331));var i=F;for(F|=4,D=e.current;D!==null;){var s=D,o=s.child;if(D.flags&16){var l=s.deletions;if(l!==null){for(var a=0;aq()-Aa?en(e,0):Da|=n),Me(e,t)}function Qh(e,t){t===0&&(e.mode&1?(t=hi,hi<<=1,!(hi&130023424)&&(hi=4194304)):t=1);var n=we();e=dt(e,t),e!==null&&(Zr(e,t,n),Me(e,n))}function Zg(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Qh(e,n)}function qg(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(P(314))}r!==null&&r.delete(t),Qh(e,n)}var Yh;Yh=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ce.current)ke=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ke=!1,Og(e,t,n);ke=!!(e.flags&131072)}else ke=!1,U&&t.flags&1048576&&Jd(t,rs,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ii(e,t),e=t.pendingProps;var i=On(t,ye.current);_n(t,n),i=Ta(null,t,r,e,i,n);var s=ka();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ee(r)?(s=!0,ts(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ga(t),i.updater=As,t.stateNode=i,i._reactInternals=t,al(t,r,e,n),t=fl(null,t,r,!0,s,n)):(t.tag=0,U&&s&&ca(t),ge(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ii(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=bg(r),e=Ge(r,e),i){case 0:t=cl(null,t,r,e,n);break e;case 1:t=hc(null,t,r,e,n);break e;case 11:t=fc(null,t,r,e,n);break e;case 14:t=dc(null,t,r,Ge(r.type,e),n);break e}throw Error(P(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ge(r,i),cl(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ge(r,i),hc(e,t,r,i,n);case 3:e:{if(Rh(t),e===null)throw Error(P(387));r=t.pendingProps,s=t.memoizedState,i=s.element,ih(e,t),os(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Wn(Error(P(423)),t),t=pc(e,t,r,n,i);break e}else if(r!==i){i=Wn(Error(P(424)),t),t=pc(e,t,r,n,i);break e}else for(Ae=At(t.stateNode.containerInfo.firstChild),Ve=t,U=!0,Ye=null,n=nh(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(zn(),r===i){t=ht(e,t,n);break e}ge(e,t,r,n)}t=t.child}return t;case 5:return sh(t),e===null&&sl(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,el(r,i)?o=null:s!==null&&el(r,s)&&(t.flags|=32),Vh(e,t),ge(e,t,o,n),t.child;case 6:return e===null&&sl(t),null;case 13:return Lh(e,t,n);case 4:return va(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Bn(t,null,r,n):ge(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ge(r,i),fc(e,t,r,i,n);case 7:return ge(e,t,t.pendingProps,n),t.child;case 8:return ge(e,t,t.pendingProps.children,n),t.child;case 12:return ge(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,O(is,r._currentValue),r._currentValue=o,s!==null)if(qe(s.value,o)){if(s.children===i.children&&!Ce.current){t=ht(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var l=s.dependencies;if(l!==null){o=s.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(s.tag===1){a=ut(-1,n&-n),a.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),ol(s.return,n,t),l.lanes|=n;break}a=a.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(P(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),ol(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}ge(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,_n(t,n),i=Ue(i),r=r(i),t.flags|=1,ge(e,t,r,n),t.child;case 14:return r=t.type,i=Ge(r,t.pendingProps),i=Ge(r.type,i),dc(e,t,r,i,n);case 15:return Dh(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ge(r,i),Ii(e,t),t.tag=1,Ee(r)?(e=!0,ts(t)):e=!1,_n(t,n),Ch(t,r,i),al(t,r,i,n),fl(null,t,r,!0,e,n);case 19:return Nh(e,t,n);case 22:return Ah(e,t,n)}throw Error(P(156,t.tag))};function Xh(e,t){return Td(e,t)}function Jg(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ie(e,t,n,r){return new Jg(e,t,n,r)}function Na(e){return e=e.prototype,!(!e||!e.isReactComponent)}function bg(e){if(typeof e=="function")return Na(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Jl)return 11;if(e===bl)return 14}return 2}function Nt(e,t){var n=e.alternate;return n===null?(n=Ie(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Bi(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")Na(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case pn:return tn(n.children,i,s,t);case ql:o=8,i|=8;break;case Lo:return e=Ie(12,n,t,i|2),e.elementType=Lo,e.lanes=s,e;case No:return e=Ie(13,n,t,i),e.elementType=No,e.lanes=s,e;case _o:return e=Ie(19,n,t,i),e.elementType=_o,e.lanes=s,e;case sd:return Ls(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case rd:o=10;break e;case id:o=9;break e;case Jl:o=11;break e;case bl:o=14;break e;case St:o=16,r=null;break e}throw Error(P(130,e==null?e:typeof e,""))}return t=Ie(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function tn(e,t,n,r){return e=Ie(7,e,r,t),e.lanes=n,e}function Ls(e,t,n,r){return e=Ie(22,e,r,t),e.elementType=sd,e.lanes=n,e.stateNode={isHidden:!1},e}function ho(e,t,n){return e=Ie(6,e,null,t),e.lanes=n,e}function po(e,t,n){return t=Ie(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ev(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Qs(0),this.expirationTimes=Qs(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qs(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function _a(e,t,n,r,i,s,o,l,a){return e=new ev(e,t,n,l,a),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Ie(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ga(s),e}function tv(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(bh)}catch(e){console.error(e)}}bh(),bf.exports=Le;var ov=bf.exports,Ec=ov;Vo.createRoot=Ec.createRoot,Vo.hydrateRoot=Ec.hydrateRoot;const Oa=M.createContext({});function za(e){const t=M.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ba=typeof window<"u",ep=Ba?M.useLayoutEffect:M.useEffect,Is=M.createContext(null);function Ua(e,t){e.indexOf(t)===-1&&e.push(t)}function Wa(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const pt=(e,t,n)=>n>t?t:n{};const mt={},tp=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function np(e){return typeof e=="object"&&e!==null}const rp=e=>/^0[^.\s]+$/u.test(e);function Ha(e){let t;return()=>(t===void 0&&(t=e()),t)}const Be=e=>e,lv=(e,t)=>n=>t(e(n)),ei=(...e)=>e.reduce(lv),$r=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Ka{constructor(){this.subscriptions=[]}add(t){return Ua(this.subscriptions,t),()=>Wa(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;se*1e3,Oe=e=>e/1e3;function ip(e,t){return t?e*(1e3/t):0}const sp=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,av=1e-7,uv=12;function cv(e,t,n,r,i){let s,o,l=0;do o=t+(n-t)/2,s=sp(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>av&&++lcv(s,0,1,e,n);return s=>s===0||s===1?s:sp(i(s),t,r)}const op=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,lp=e=>t=>1-e(1-t),ap=ti(.33,1.53,.69,.99),Ga=lp(ap),up=op(Ga),cp=e=>(e*=2)<1?.5*Ga(e):.5*(2-Math.pow(2,-10*(e-1))),Qa=e=>1-Math.sin(Math.acos(e)),fp=lp(Qa),dp=op(Qa),fv=ti(.42,0,1,1),dv=ti(0,0,.58,1),hp=ti(.42,0,.58,1),hv=e=>Array.isArray(e)&&typeof e[0]!="number",pp=e=>Array.isArray(e)&&typeof e[0]=="number",pv={linear:Be,easeIn:fv,easeInOut:hp,easeOut:dv,circIn:Qa,circInOut:dp,circOut:fp,backIn:Ga,backInOut:up,backOut:ap,anticipate:cp},mv=e=>typeof e=="string",Mc=e=>{if(pp(e)){$a(e.length===4);const[t,n,r,i]=e;return ti(t,n,r,i)}else if(mv(e))return pv[e];return e},Ci=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function yv(e,t){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1};function a(c){o.has(c)&&(u.schedule(c),e()),c(l)}const u={schedule:(c,f=!1,d=!1)=>{const g=d&&i?n:r;return f&&o.add(c),g.has(c)||g.add(c),c},cancel:c=>{r.delete(c),o.delete(c)},process:c=>{if(l=c,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(a),n.clear(),i=!1,s&&(s=!1,u.process(c))}};return u}const gv=40;function mp(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Ci.reduce((m,w)=>(m[w]=yv(s),m),{}),{setup:l,read:a,resolveKeyframes:u,preUpdate:c,update:f,preRender:d,render:y,postRender:g}=o,v=()=>{const m=mt.useManualTiming?i.timestamp:performance.now();n=!1,mt.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(m-i.timestamp,gv),1)),i.timestamp=m,i.isProcessing=!0,l.process(i),a.process(i),u.process(i),c.process(i),f.process(i),d.process(i),y.process(i),g.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(v))},k=()=>{n=!0,r=!0,i.isProcessing||e(v)};return{schedule:Ci.reduce((m,w)=>{const S=o[w];return m[w]=(T,C=!1,x=!1)=>(n||k(),S.schedule(T,C,x)),m},{}),cancel:m=>{for(let w=0;w(Ui===void 0&&Pe.set(ue.isProcessing||mt.useManualTiming?ue.timestamp:performance.now()),Ui),set:e=>{Ui=e,queueMicrotask(vv)}},yp=e=>t=>typeof t=="string"&&t.startsWith(e),Ya=yp("--"),wv=yp("var(--"),Xa=e=>wv(e)?Sv.test(e.split("/*")[0].trim()):!1,Sv=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Xn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Hr={...Xn,transform:e=>pt(0,1,e)},Ei={...Xn,default:1},Tr=e=>Math.round(e*1e5)/1e5,Za=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function xv(e){return e==null}const Tv=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,qa=(e,t)=>n=>!!(typeof n=="string"&&Tv.test(n)&&n.startsWith(e)||t&&!xv(n)&&Object.prototype.hasOwnProperty.call(n,t)),gp=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,l]=r.match(Za);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},kv=e=>pt(0,255,e),yo={...Xn,transform:e=>Math.round(kv(e))},Jt={test:qa("rgb","red"),parse:gp("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+yo.transform(e)+", "+yo.transform(t)+", "+yo.transform(n)+", "+Tr(Hr.transform(r))+")"};function Pv(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const kl={test:qa("#"),parse:Pv,transform:Jt.transform},ni=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),wt=ni("deg"),it=ni("%"),L=ni("px"),Cv=ni("vh"),Ev=ni("vw"),Dc={...it,parse:e=>it.parse(e)/100,transform:e=>it.transform(e*100)},Cn={test:qa("hsl","hue"),parse:gp("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+it.transform(Tr(t))+", "+it.transform(Tr(n))+", "+Tr(Hr.transform(r))+")"},b={test:e=>Jt.test(e)||kl.test(e)||Cn.test(e),parse:e=>Jt.test(e)?Jt.parse(e):Cn.test(e)?Cn.parse(e):kl.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Jt.transform(e):Cn.transform(e),getAnimatableNone:e=>{const t=b.parse(e);return t.alpha=0,b.transform(t)}},Mv=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Dv(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Za))==null?void 0:t.length)||0)+(((n=e.match(Mv))==null?void 0:n.length)||0)>0}const vp="number",wp="color",Av="var",Vv="var(",Ac="${}",Rv=/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 Kr(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const l=t.replace(Rv,a=>(b.test(a)?(r.color.push(s),i.push(wp),n.push(b.parse(a))):a.startsWith(Vv)?(r.var.push(s),i.push(Av),n.push(a)):(r.number.push(s),i.push(vp),n.push(parseFloat(a))),++s,Ac)).split(Ac);return{values:n,split:l,indexes:r,types:i}}function Sp(e){return Kr(e).values}function xp(e){const{split:t,types:n}=Kr(e),r=t.length;return i=>{let s="";for(let o=0;otypeof e=="number"?0:b.test(e)?b.getAnimatableNone(e):e;function Nv(e){const t=Sp(e);return xp(e)(t.map(Lv))}const It={test:Dv,parse:Sp,createTransformer:xp,getAnimatableNone:Nv};function go(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function _v({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const l=n<.5?n*(1+t):n+t-n*t,a=2*n-l;i=go(a,l,e+1/3),s=go(a,l,e),o=go(a,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function ms(e,t){return n=>n>0?t:e}const K=(e,t,n)=>e+(t-e)*n,vo=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},jv=[kl,Jt,Cn],Fv=e=>jv.find(t=>t.test(e));function Vc(e){const t=Fv(e);if(!t)return!1;let n=t.parse(e);return t===Cn&&(n=_v(n)),n}const Rc=(e,t)=>{const n=Vc(e),r=Vc(t);if(!n||!r)return ms(e,t);const i={...n};return s=>(i.red=vo(n.red,r.red,s),i.green=vo(n.green,r.green,s),i.blue=vo(n.blue,r.blue,s),i.alpha=K(n.alpha,r.alpha,s),Jt.transform(i))},Pl=new Set(["none","hidden"]);function Iv(e,t){return Pl.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Ov(e,t){return n=>K(e,t,n)}function Ja(e){return typeof e=="number"?Ov:typeof e=="string"?Xa(e)?ms:b.test(e)?Rc:Uv:Array.isArray(e)?Tp:typeof e=="object"?b.test(e)?Rc:zv:ms}function Tp(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>Ja(s)(s,t[o]));return s=>{for(let o=0;o{for(const s in r)n[s]=r[s](i);return n}}function Bv(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i{const n=It.createTransformer(t),r=Kr(e),i=Kr(t);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?Pl.has(e)&&!i.values.length||Pl.has(t)&&!r.values.length?Iv(e,t):ei(Tp(Bv(r,i),i.values),n):ms(e,t)};function kp(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?K(e,t,n):Ja(e)(e,t)}const Wv=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>W.update(t,n),stop:()=>Ft(t),now:()=>ue.isProcessing?ue.timestamp:Pe.now()}},Pp=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s=ys?1/0:t}function $v(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(ba(r),ys);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:Oe(i)}}const Hv=5;function Cp(e,t,n){const r=Math.max(t-Hv,0);return ip(n-e(r),t-r)}const Y={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},wo=.001;function Kv({duration:e=Y.duration,bounce:t=Y.bounce,velocity:n=Y.velocity,mass:r=Y.mass}){let i,s,o=1-t;o=pt(Y.minDamping,Y.maxDamping,o),e=pt(Y.minDuration,Y.maxDuration,Oe(e)),o<1?(i=u=>{const c=u*o,f=c*e,d=c-n,y=Cl(u,o),g=Math.exp(-f);return wo-d/y*g},s=u=>{const f=u*o*e,d=f*n+n,y=Math.pow(o,2)*Math.pow(u,2)*e,g=Math.exp(-f),v=Cl(Math.pow(u,2),o);return(-i(u)+wo>0?-1:1)*((d-y)*g)/v}):(i=u=>{const c=Math.exp(-u*e),f=(u-n)*e+1;return-wo+c*f},s=u=>{const c=Math.exp(-u*e),f=(n-u)*(e*e);return c*f});const l=5/e,a=Qv(i,s,l);if(e=rt(e),isNaN(a))return{stiffness:Y.stiffness,damping:Y.damping,duration:e};{const u=Math.pow(a,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const Gv=12;function Qv(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function Zv(e){let t={velocity:Y.velocity,stiffness:Y.stiffness,damping:Y.damping,mass:Y.mass,isResolvedFromDuration:!1,...e};if(!Lc(e,Xv)&&Lc(e,Yv))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*pt(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Y.mass,stiffness:i,damping:s}}else{const n=Kv(e);t={...t,...n,mass:Y.mass},t.isResolvedFromDuration=!0}return t}function gs(e=Y.visualDuration,t=Y.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],l={done:!1,value:s},{stiffness:a,damping:u,mass:c,duration:f,velocity:d,isResolvedFromDuration:y}=Zv({...n,velocity:-Oe(n.velocity||0)}),g=d||0,v=u/(2*Math.sqrt(a*c)),k=o-s,p=Oe(Math.sqrt(a/c)),h=Math.abs(k)<5;r||(r=h?Y.restSpeed.granular:Y.restSpeed.default),i||(i=h?Y.restDelta.granular:Y.restDelta.default);let m;if(v<1){const S=Cl(p,v);m=T=>{const C=Math.exp(-v*p*T);return o-C*((g+v*p*k)/S*Math.sin(S*T)+k*Math.cos(S*T))}}else if(v===1)m=S=>o-Math.exp(-p*S)*(k+(g+p*k)*S);else{const S=p*Math.sqrt(v*v-1);m=T=>{const C=Math.exp(-v*p*T),x=Math.min(S*T,300);return o-C*((g+v*p*k)*Math.sinh(x)+S*k*Math.cosh(x))/S}}const w={calculatedDuration:y&&f||null,next:S=>{const T=m(S);if(y)l.done=S>=f;else{let C=S===0?g:0;v<1&&(C=S===0?rt(g):Cp(m,S,T));const x=Math.abs(C)<=r,_=Math.abs(o-T)<=i;l.done=x&&_}return l.value=l.done?o:T,l},toString:()=>{const S=Math.min(ba(w),ys),T=Pp(C=>w.next(S*C).value,S,30);return S+"ms "+T},toTransition:()=>{}};return w}gs.applyToOptions=e=>{const t=$v(e,100,gs);return e.ease=t.ease,e.duration=rt(t.duration),e.type="keyframes",e};function El({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:l,max:a,restDelta:u=.5,restSpeed:c}){const f=e[0],d={done:!1,value:f},y=x=>l!==void 0&&xa,g=x=>l===void 0?a:a===void 0||Math.abs(l-x)-v*Math.exp(-x/r),m=x=>p+h(x),w=x=>{const _=h(x),V=m(x);d.done=Math.abs(_)<=u,d.value=d.done?p:V};let S,T;const C=x=>{y(d.value)&&(S=x,T=gs({keyframes:[d.value,g(d.value)],velocity:Cp(m,x,d.value),damping:i,stiffness:s,restDelta:u,restSpeed:c}))};return C(0),{calculatedDuration:null,next:x=>{let _=!1;return!T&&S===void 0&&(_=!0,w(x),C(x)),S!==void 0&&x>=S?T.next(x-S):(!_&&w(x),d)}}}function qv(e,t,n){const r=[],i=n||mt.mix||kp,s=e.length-1;for(let o=0;ot[0];if(s===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=qv(t,r,i),a=l.length,u=c=>{if(o&&c1)for(;fu(pt(e[0],e[s-1],c)):u}function bv(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=$r(0,t,r);e.push(K(n,1,i))}}function e0(e){const t=[0];return bv(t,e.length-1),t}function t0(e,t){return e.map(n=>n*t)}function n0(e,t){return e.map(()=>t||hp).splice(0,e.length-1)}function kr({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=hv(r)?r.map(Mc):Mc(r),s={done:!1,value:t[0]},o=t0(n&&n.length===t.length?n:e0(t),e),l=Jv(o,t,{ease:Array.isArray(i)?i:n0(t,i)});return{calculatedDuration:e,next:a=>(s.value=l(a),s.done=a>=e,s)}}const r0=e=>e!==null;function eu(e,{repeat:t,repeatType:n="loop"},r,i=1){const s=e.filter(r0),l=i<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!l||r===void 0?s[l]:r}const i0={decay:El,inertia:El,tween:kr,keyframes:kr,spring:gs};function Ep(e){typeof e.type=="string"&&(e.type=i0[e.type])}class tu{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const s0=e=>e/100;class nu extends tu{constructor(t){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!==Pe.now()&&this.tick(Pe.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Ep(t);const{type:n=kr,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:l}=t;const a=n||kr;a!==kr&&typeof l[0]!="number"&&(this.mixKeyframes=ei(s0,kp(l[0],l[1])),l=[0,100]);const u=a({...t,keyframes:l});s==="mirror"&&(this.mirroredGenerator=a({...t,keyframes:[...l].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=ba(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:l,calculatedDuration:a}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:c,repeat:f,repeatType:d,repeatDelay:y,type:g,onUpdate:v,finalKeyframe:k}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const p=this.currentTime-u*(this.playbackSpeed>=0?1:-1),h=this.playbackSpeed>=0?p<0:p>i;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let m=this.currentTime,w=r;if(f){const x=Math.min(this.currentTime,i)/l;let _=Math.floor(x),V=x%1;!V&&x>=1&&(V=1),V===1&&_--,_=Math.min(_,f+1),!!(_%2)&&(d==="reverse"?(V=1-V,y&&(V-=y/l)):d==="mirror"&&(w=o)),m=pt(0,1,V)*l}const S=h?{done:!1,value:c[0]}:w.next(m);s&&(S.value=s(S.value));let{done:T}=S;!h&&a!==null&&(T=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return C&&g!==El&&(S.value=eu(c,this.options,k,this.speed)),v&&v(S.value),C&&this.finish(),S}then(t,n){return this.finished.then(t,n)}get duration(){return Oe(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Oe(t)}get time(){return Oe(this.currentTime)}set time(t){var n;t=rt(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Pe.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Oe(this.currentTime))}play(){var i,s;if(this.isStopped)return;const{driver:t=Wv,startTime:n}=this.options;this.driver||(this.driver=t(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??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(Pe.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function o0(e){for(let t=1;te*180/Math.PI,Ml=e=>{const t=bt(Math.atan2(e[1],e[0]));return Dl(t)},l0={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ml,rotateZ:Ml,skewX:e=>bt(Math.atan(e[1])),skewY:e=>bt(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Dl=e=>(e=e%360,e<0&&(e+=360),e),Nc=Ml,_c=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),jc=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),a0={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:_c,scaleY:jc,scale:e=>(_c(e)+jc(e))/2,rotateX:e=>Dl(bt(Math.atan2(e[6],e[5]))),rotateY:e=>Dl(bt(Math.atan2(-e[2],e[0]))),rotateZ:Nc,rotate:Nc,skewX:e=>bt(Math.atan(e[4])),skewY:e=>bt(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Al(e){return e.includes("scale")?1:0}function Vl(e,t){if(!e||e==="none")return Al(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=a0,i=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=l0,i=l}if(!i)return Al(t);const s=r[t],o=i[1].split(",").map(c0);return typeof s=="function"?s(o):o[s]}const u0=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Vl(n,t)};function c0(e){return parseFloat(e.trim())}const Zn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],qn=new Set(Zn),Fc=e=>e===Xn||e===L,f0=new Set(["x","y","z"]),d0=Zn.filter(e=>!f0.has(e));function h0(e){const t=[];return d0.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const nn={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Vl(t,"x"),y:(e,{transform:t})=>Vl(t,"y")};nn.translateX=nn.x;nn.translateY=nn.y;const rn=new Set;let Rl=!1,Ll=!1,Nl=!1;function Mp(){if(Ll){const e=Array.from(rn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=h0(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var l;(l=r.getValue(s))==null||l.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Ll=!1,Rl=!1,rn.forEach(e=>e.complete(Nl)),rn.clear()}function Dp(){rn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ll=!0)})}function p0(){Nl=!0,Dp(),Mp(),Nl=!1}class ru{constructor(t,n,r,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(rn.add(this),Rl||(Rl=!0,W.read(Dp),W.resolveKeyframes(Mp))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const s=i==null?void 0:i.get(),o=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const l=r.readValue(n,o);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=o),i&&s===void 0&&i.set(t[0])}o0(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),rn.delete(this)}cancel(){this.state==="scheduled"&&(rn.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const m0=e=>e.startsWith("--");function y0(e,t,n){m0(t)?e.style.setProperty(t,n):e.style[t]=n}const g0=Ha(()=>window.ScrollTimeline!==void 0),v0={};function w0(e,t){const n=Ha(e);return()=>v0[t]??n()}const Ap=w0(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),dr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Ic={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:dr([0,.65,.55,1]),circOut:dr([.55,0,1,.45]),backIn:dr([.31,.01,.66,-.59]),backOut:dr([.33,1.53,.69,.99])};function Vp(e,t){if(e)return typeof e=="function"?Ap()?Pp(e,t):"ease-out":pp(e)?dr(e):Array.isArray(e)?e.map(n=>Vp(n,t)||Ic.easeOut):Ic[e]}function S0(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:l="easeOut",times:a}={},u=void 0){const c={[t]:n};a&&(c.offset=a);const f=Vp(l,i);Array.isArray(f)&&(c.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 u&&(d.pseudoElement=u),e.animate(c,d)}function Rp(e){return typeof e=="function"&&"applyToOptions"in e}function x0({type:e,...t}){return Rp(e)&&Ap()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class T0 extends tu{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:l,onComplete:a}=t;this.isPseudoElement=!!s,this.allowFlatten=o,this.options=t,$a(typeof t.type!="string");const u=x0(t);this.animation=S0(n,r,i,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const c=eu(i,this.options,l,this.speed);this.updateMotionValue?this.updateMotionValue(c):y0(n,r,c),this.animation.cancel()}a==null||a(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Oe(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Oe(t)}get time(){return Oe(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=rt(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&g0()?(this.animation.timeline=t,Be):n(this)}}const Lp={anticipate:cp,backInOut:up,circInOut:dp};function k0(e){return e in Lp}function P0(e){typeof e.ease=="string"&&k0(e.ease)&&(e.ease=Lp[e.ease])}const Oc=10;class C0 extends T0{constructor(t){P0(t),Ep(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:s,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new nu({...o,autoplay:!1}),a=rt(this.finishedTime??this.time);n.setWithVelocity(l.sample(a-Oc).value,l.sample(a).value,Oc),l.stop()}}const zc=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(It.test(e)||e==="0")&&!e.startsWith("url("));function E0(e){const t=e[0];if(e.length===1)return!0;for(let n=0;nObject.hasOwnProperty.call(Element.prototype,"animate"));function V0(e){var c;const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:s,type:o}=e;if(!(((c=t==null?void 0:t.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:u}=t.owner.getProps();return A0()&&n&&D0.has(n)&&(n!=="transform"||!u)&&!a&&!r&&i!=="mirror"&&s!==0&&o!=="inertia"}const R0=40;class L0 extends tu{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:l,name:a,motionValue:u,element:c,...f}){var g;super(),this.stop=()=>{var v,k;this._animation&&(this._animation.stop(),(v=this.stopTimeline)==null||v.call(this)),(k=this.keyframeResolver)==null||k.cancel()},this.createdAt=Pe.now();const d={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,name:a,motionValue:u,element:c,...f},y=(c==null?void 0:c.KeyframeResolver)||ru;this.keyframeResolver=new y(l,(v,k,p)=>this.onKeyframesResolved(v,k,d,!p),a,u,c),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,r,i){this.keyframeResolver=void 0;const{name:s,type:o,velocity:l,delay:a,isHandoff:u,onUpdate:c}=r;this.resolvedAt=Pe.now(),M0(t,s,o,l)||((mt.instantAnimations||!a)&&(c==null||c(eu(t,r,n))),t[0]=t[t.length-1],_l(r),r.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>R0?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},y=!u&&V0(d)?new C0({...d,element:d.motionValue.owner.current}):new nu(d);y.finished.then(()=>this.notifyFinished()).catch(Be),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),p0()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const N0=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function _0(e){const t=N0.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function Np(e,t,n=1){const[r,i]=_0(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return tp(o)?parseFloat(o):o}return Xa(i)?Np(i,t,n+1):i}function iu(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const _p=new Set(["width","height","top","left","right","bottom",...Zn]),j0={test:e=>e==="auto",parse:e=>e},jp=e=>t=>t.test(e),Fp=[Xn,L,it,wt,Ev,Cv,j0],Bc=e=>Fp.find(jp(e));function F0(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||rp(e):!0}const I0=new Set(["brightness","contrast","saturate","opacity"]);function O0(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Za)||[];if(!r)return e;const i=n.replace(r,"");let s=I0.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const z0=/\b([a-z-]*)\(.*?\)/gu,jl={...It,getAnimatableNone:e=>{const t=e.match(z0);return t?t.map(O0).join(" "):e}},Uc={...Xn,transform:Math.round},B0={rotate:wt,rotateX:wt,rotateY:wt,rotateZ:wt,scale:Ei,scaleX:Ei,scaleY:Ei,scaleZ:Ei,skew:wt,skewX:wt,skewY:wt,distance:L,translateX:L,translateY:L,translateZ:L,x:L,y:L,z:L,perspective:L,transformPerspective:L,opacity:Hr,originX:Dc,originY:Dc,originZ:L},su={borderWidth:L,borderTopWidth:L,borderRightWidth:L,borderBottomWidth:L,borderLeftWidth:L,borderRadius:L,radius:L,borderTopLeftRadius:L,borderTopRightRadius:L,borderBottomRightRadius:L,borderBottomLeftRadius:L,width:L,maxWidth:L,height:L,maxHeight:L,top:L,right:L,bottom:L,left:L,padding:L,paddingTop:L,paddingRight:L,paddingBottom:L,paddingLeft:L,margin:L,marginTop:L,marginRight:L,marginBottom:L,marginLeft:L,backgroundPositionX:L,backgroundPositionY:L,...B0,zIndex:Uc,fillOpacity:Hr,strokeOpacity:Hr,numOctaves:Uc},U0={...su,color:b,backgroundColor:b,outlineColor:b,fill:b,stroke:b,borderColor:b,borderTopColor:b,borderRightColor:b,borderBottomColor:b,borderLeftColor:b,filter:jl,WebkitFilter:jl},Ip=e=>U0[e];function Op(e,t){let n=Ip(e);return n!==jl&&(n=It),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const W0=new Set(["auto","none","0"]);function $0(e,t,n){let r=0,i;for(;r{t.getValue(a).set(u)}),this.resolveNoneKeyframes()}}function K0(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const i=(n==null?void 0:n[e])??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const zp=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Bp(e){return np(e)&&"offsetHeight"in e}const Wc=30,G0=e=>!isNaN(parseFloat(e));class Q0{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;const i=Pe.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(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Pe.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=G0(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Ka);const r=this.events[t].add(n);return t==="change"?()=>{r(),W.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Pe.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Wc)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Wc);return ip(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(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 t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Hn(e,t){return new Q0(e,t)}const{schedule:ou}=mp(queueMicrotask,!1),Ke={x:!1,y:!1};function Up(){return Ke.x||Ke.y}function Y0(e){return e==="x"||e==="y"?Ke[e]?null:(Ke[e]=!0,()=>{Ke[e]=!1}):Ke.x||Ke.y?null:(Ke.x=Ke.y=!0,()=>{Ke.x=Ke.y=!1})}function Wp(e,t){const n=K0(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function $c(e){return!(e.pointerType==="touch"||Up())}function X0(e,t,n={}){const[r,i,s]=Wp(e,n),o=l=>{if(!$c(l))return;const{target:a}=l,u=t(a,l);if(typeof u!="function"||!a)return;const c=f=>{$c(f)&&(u(f),a.removeEventListener("pointerleave",c))};a.addEventListener("pointerleave",c,i)};return r.forEach(l=>{l.addEventListener("pointerenter",o,i)}),s}const $p=(e,t)=>t?e===t?!0:$p(e,t.parentElement):!1,lu=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Z0=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function q0(e){return Z0.has(e.tagName)||e.tabIndex!==-1}const Wi=new WeakSet;function Hc(e){return t=>{t.key==="Enter"&&e(t)}}function So(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const J0=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Hc(()=>{if(Wi.has(n))return;So(n,"down");const i=Hc(()=>{So(n,"up")}),s=()=>So(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Kc(e){return lu(e)&&!Up()}function b0(e,t,n={}){const[r,i,s]=Wp(e,n),o=l=>{const a=l.currentTarget;if(!Kc(l))return;Wi.add(a);const u=t(a,l),c=(y,g)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),Wi.has(a)&&Wi.delete(a),Kc(y)&&typeof u=="function"&&u(y,{success:g})},f=y=>{c(y,a===window||a===document||n.useGlobalTarget||$p(a,y.target))},d=y=>{c(y,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",d,i)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",o,i),Bp(l)&&(l.addEventListener("focus",u=>J0(u,i)),!q0(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),s}function Hp(e){return np(e)&&"ownerSVGElement"in e}function e1(e){return Hp(e)&&e.tagName==="svg"}const me=e=>!!(e&&e.getVelocity),t1=[...Fp,b,It],n1=e=>t1.find(jp(e)),au=M.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Gc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function r1(...e){return t=>{let n=!1;const r=e.map(i=>{const s=Gc(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i{const{width:u,height:c,top:f,left:d,right:y}=o.current;if(t||!s.current||!u||!c)return;const g=n==="left"?`left: ${d}`:`right: ${y}`;s.current.dataset.motionPopId=i;const v=document.createElement("style");l&&(v.nonce=l);const k=r??document.head;return k.appendChild(v),v.sheet&&v.sheet.insertRule(` - [data-motion-pop-id="${i}"] { - position: absolute !important; - width: ${u}px !important; - height: ${c}px !important; - ${g}px !important; - top: ${f}px !important; - } - `),()=>{k.contains(v)&&k.removeChild(v)}},[t]),A.jsx(s1,{isPresent:t,childRef:s,sizeRef:o,children:M.cloneElement(e,{ref:a})})}const l1=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:l,root:a})=>{const u=za(a1),c=M.useId();let f=!0,d=M.useMemo(()=>(f=!1,{id:c,initial:t,isPresent:n,custom:i,onExitComplete:y=>{u.set(y,!0);for(const g of u.values())if(!g)return;r&&r()},register:y=>(u.set(y,!1),()=>u.delete(y))}),[n,u,r]);return s&&f&&(d={...d}),M.useMemo(()=>{u.forEach((y,g)=>u.set(g,!1))},[n]),M.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),o==="popLayout"&&(e=A.jsx(o1,{isPresent:n,anchorX:l,root:a,children:e})),A.jsx(Is.Provider,{value:d,children:e})};function a1(){return new Map}function Kp(e=!0){const t=M.useContext(Is);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=M.useId();M.useEffect(()=>{if(e)return i(s)},[e]);const o=M.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const Mi=e=>e.key||"";function Qc(e){const t=[];return M.Children.forEach(e,n=>{M.isValidElement(n)&&t.push(n)}),t}const Yc=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:l="left",root:a})=>{const[u,c]=Kp(o),f=M.useMemo(()=>Qc(e),[e]),d=o&&!u?[]:f.map(Mi),y=M.useRef(!0),g=M.useRef(f),v=za(()=>new Map),[k,p]=M.useState(f),[h,m]=M.useState(f);ep(()=>{y.current=!1,g.current=f;for(let T=0;T{const C=Mi(T),x=o&&!u?!1:f===h||d.includes(C),_=()=>{if(v.has(C))v.set(C,!0);else return;let V=!0;v.forEach(J=>{J||(V=!1)}),V&&(S==null||S(),m(g.current),o&&(c==null||c()),r&&r())};return A.jsx(l1,{isPresent:x,initial:!y.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,root:a,onExitComplete:x?void 0:_,anchorX:l,children:T},C)})})},Gp=M.createContext({strict:!1}),Xc={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"]},Kn={};for(const e in Xc)Kn[e]={isEnabled:t=>Xc[e].some(n=>!!t[n])};function u1(e){for(const t in e)Kn[t]={...Kn[t],...e[t]}}const c1=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 vs(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||c1.has(e)}let Qp=e=>!vs(e);function f1(e){typeof e=="function"&&(Qp=t=>t.startsWith("on")?!vs(t):e(t))}try{f1(require("@emotion/is-prop-valid").default)}catch{}function d1(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Qp(i)||n===!0&&vs(i)||!t&&!vs(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const Os=M.createContext({});function zs(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Gr(e){return typeof e=="string"||Array.isArray(e)}const uu=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],cu=["initial",...uu];function Bs(e){return zs(e.animate)||cu.some(t=>Gr(e[t]))}function Yp(e){return!!(Bs(e)||e.variants)}function h1(e,t){if(Bs(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Gr(n)?n:void 0,animate:Gr(r)?r:void 0}}return e.inherit!==!1?t:{}}function p1(e){const{initial:t,animate:n}=h1(e,M.useContext(Os));return M.useMemo(()=>({initial:t,animate:n}),[Zc(t),Zc(n)])}function Zc(e){return Array.isArray(e)?e.join(" "):e}const Qr={};function m1(e){for(const t in e)Qr[t]=e[t],Ya(t)&&(Qr[t].isCSSVariable=!0)}function Xp(e,{layout:t,layoutId:n}){return qn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Qr[e]||e==="opacity")}const y1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},g1=Zn.length;function v1(e,t,n){let r="",i=!0;for(let s=0;s({style:{},transform:{},transformOrigin:{},vars:{}});function Zp(e,t,n){for(const r in t)!me(t[r])&&!Xp(r,n)&&(e[r]=t[r])}function w1({transformTemplate:e},t){return M.useMemo(()=>{const n=du();return fu(n,t,e),Object.assign({},n.vars,n.style)},[t])}function S1(e,t){const n=e.style||{},r={};return Zp(r,n,e),Object.assign(r,w1(e,t)),r}function x1(e,t){const n={},r=S1(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const T1={offset:"stroke-dashoffset",array:"stroke-dasharray"},k1={offset:"strokeDashoffset",array:"strokeDasharray"};function P1(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?T1:k1;e[s.offset]=L.transform(-r);const o=L.transform(t),l=L.transform(n);e[s.array]=`${o} ${l}`}function qp(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:o=0,...l},a,u,c){if(fu(e,l,u),a){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:d}=e;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete f.transformBox),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&P1(f,i,s,o,!1)}const Jp=()=>({...du(),attrs:{}}),bp=e=>typeof e=="string"&&e.toLowerCase()==="svg";function C1(e,t,n,r){const i=M.useMemo(()=>{const s=Jp();return qp(s,t,bp(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Zp(s,e.style,e),i.style={...s,...i.style}}return i}const E1=["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 hu(e){return typeof e!="string"||e.includes("-")?!1:!!(E1.indexOf(e)>-1||/[A-Z]/u.test(e))}function M1(e,t,n,{latestValues:r},i,s=!1){const l=(hu(e)?C1:x1)(t,r,i,e),a=d1(t,typeof e=="string",s),u=e!==M.Fragment?{...a,...l,ref:n}:{},{children:c}=t,f=M.useMemo(()=>me(c)?c.get():c,[c]);return M.createElement(e,{...u,children:f})}function qc(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function pu(e,t,n,r){if(typeof t=="function"){const[i,s]=qc(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=qc(r);t=t(n!==void 0?n:e.custom,i,s)}return t}function $i(e){return me(e)?e.get():e}function D1({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:A1(n,r,i,e),renderState:t()}}function A1(e,t,n,r){const i={},s=r(e,{});for(const d in s)i[d]=$i(s[d]);let{initial:o,animate:l}=e;const a=Bs(e),u=Yp(e);t&&u&&!a&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const f=c?l:o;if(f&&typeof f!="boolean"&&!zs(f)){const d=Array.isArray(f)?f:[f];for(let y=0;y(t,n)=>{const r=M.useContext(Os),i=M.useContext(Is),s=()=>D1(e,t,r,i);return n?s():za(s)};function mu(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(me(r[o])||t.style&&me(t.style[o])||Xp(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const V1=em({scrapeMotionValuesFromProps:mu,createRenderState:du});function tm(e,t,n){const r=mu(e,t,n);for(const i in e)if(me(e[i])||me(t[i])){const s=Zn.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const R1=em({scrapeMotionValuesFromProps:tm,createRenderState:Jp}),L1=Symbol.for("motionComponentSymbol");function En(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function N1(e,t,n){return M.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):En(n)&&(n.current=r))},[t])}const yu=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),_1="framerAppearId",nm="data-"+yu(_1),rm=M.createContext({});function j1(e,t,n,r,i){var v,k;const{visualElement:s}=M.useContext(Os),o=M.useContext(Gp),l=M.useContext(Is),a=M.useContext(au).reducedMotion,u=M.useRef(null);r=r||o.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:a}));const c=u.current,f=M.useContext(rm);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&F1(u.current,n,i,f);const d=M.useRef(!1);M.useInsertionEffect(()=>{c&&d.current&&c.update(n,l)});const y=n[nm],g=M.useRef(!!y&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,y))&&((k=window.MotionHasOptimisedAnimation)==null?void 0:k.call(window,y)));return ep(()=>{c&&(d.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),g.current&&c.animationState&&c.animationState.animateChanges())}),M.useEffect(()=>{c&&(!g.current&&c.animationState&&c.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var p;(p=window.MotionHandoffMarkAsComplete)==null||p.call(window,y)}),g.current=!1),c.enteringChildren=void 0)}),c}function F1(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:l,layoutScroll:a,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:im(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||l&&En(l),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:a,layoutRoot:u})}function im(e){if(e)return e.options.allowProjection!==!1?e.projection:im(e.parent)}function xo(e,{forwardMotionProps:t=!1}={},n,r){n&&u1(n);const i=hu(e)?R1:V1;function s(l,a){let u;const c={...M.useContext(au),...l,layoutId:I1(l)},{isStatic:f}=c,d=p1(l),y=i(l,f);if(!f&&Ba){O1();const g=z1(c);u=g.MeasureLayout,d.visualElement=j1(e,y,c,r,g.ProjectionNode)}return A.jsxs(Os.Provider,{value:d,children:[u&&d.visualElement?A.jsx(u,{visualElement:d.visualElement,...c}):null,M1(e,l,N1(y,d.visualElement,a),y,f,t)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const o=M.forwardRef(s);return o[L1]=e,o}function I1({layoutId:e}){const t=M.useContext(Oa).id;return t&&e!==void 0?t+"-"+e:e}function O1(e,t){M.useContext(Gp).strict}function z1(e){const{drag:t,layout:n}=Kn;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function B1(e,t){if(typeof Proxy>"u")return xo;const n=new Map,r=(s,o)=>xo(s,o,e,t),i=(s,o)=>r(s,o);return new Proxy(i,{get:(s,o)=>o==="create"?r:(n.has(o)||n.set(o,xo(o,void 0,e,t)),n.get(o))})}function sm({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function U1({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function W1(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function To(e){return e===void 0||e===1}function Fl({scale:e,scaleX:t,scaleY:n}){return!To(e)||!To(t)||!To(n)}function Yt(e){return Fl(e)||om(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function om(e){return Jc(e.x)||Jc(e.y)}function Jc(e){return e&&e!=="0%"}function ws(e,t,n){const r=e-n,i=t*r;return n+i}function bc(e,t,n,r,i){return i!==void 0&&(e=ws(e,i,r)),ws(e,n,r)+t}function Il(e,t=0,n=1,r,i){e.min=bc(e.min,t,n,r,i),e.max=bc(e.max,t,n,r,i)}function lm(e,{x:t,y:n}){Il(e.x,t.translate,t.scale,t.originPoint),Il(e.y,n.translate,n.scale,n.originPoint)}const ef=.999999999999,tf=1.0000000000001;function $1(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let l=0;lef&&(t.x=1),t.yef&&(t.y=1)}function Mn(e,t){e.min=e.min+t,e.max=e.max+t}function nf(e,t,n,r,i=.5){const s=K(e.min,e.max,i);Il(e,t,n,s,r)}function Dn(e,t){nf(e.x,t.x,t.scaleX,t.scale,t.originX),nf(e.y,t.y,t.scaleY,t.scale,t.originY)}function am(e,t){return sm(W1(e.getBoundingClientRect(),t))}function H1(e,t,n){const r=am(e,n),{scroll:i}=t;return i&&(Mn(r.x,i.offset.x),Mn(r.y,i.offset.y)),r}const rf=()=>({translate:0,scale:1,origin:0,originPoint:0}),An=()=>({x:rf(),y:rf()}),sf=()=>({min:0,max:0}),te=()=>({x:sf(),y:sf()}),Ol={current:null},um={current:!1};function K1(){if(um.current=!0,!!Ba)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ol.current=e.matches;e.addEventListener("change",t),t()}else Ol.current=!1}const G1=new WeakMap;function Q1(e,t,n){for(const r in t){const i=t[r],s=n[r];if(me(i))e.addValue(r,i);else if(me(s))e.addValue(r,Hn(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,Hn(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const of=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Y1{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ru,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=Pe.now();this.renderScheduledAtthis.bindToMotionValue(i,r)),um.current||K1(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ol.current,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),Ft(this.notifyUpdate),Ft(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.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(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=qn.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&W.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Kn){const n=Kn[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];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):te()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Hn(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(tp(r)||rp(r))?r=parseFloat(r):!n1(r)&&It.test(n)&&(r=Op(t,n)),this.setBaseTarget(t,me(r)?r.get():r)),me(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=pu(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!me(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Ka),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){ou.render(this.render)}}class cm extends Y1{constructor(){super(...arguments),this.KeyframeResolver=H0}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;me(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function fm(e,{style:t,vars:n},r,i){const s=e.style;let o;for(o in t)s[o]=t[o];i==null||i.applyProjectionStyles(s,r);for(o in n)s.setProperty(o,n[o])}function X1(e){return window.getComputedStyle(e)}class Z1 extends cm{constructor(){super(...arguments),this.type="html",this.renderInstance=fm}readValueFromInstance(t,n){var r;if(qn.has(n))return(r=this.projection)!=null&&r.isProjecting?Al(n):u0(t,n);{const i=X1(t),s=(Ya(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return am(t,n)}build(t,n,r){fu(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return mu(t,n,r)}}const dm=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 q1(e,t,n,r){fm(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(dm.has(i)?i:yu(i),t.attrs[i])}class J1 extends cm{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=te}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(qn.has(n)){const r=Ip(n);return r&&r.default||0}return n=dm.has(n)?n:yu(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return tm(t,n,r)}build(t,n,r){qp(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){q1(t,n,r,i)}mount(t){this.isSVGTag=bp(t.tagName),super.mount(t)}}const b1=(e,t)=>hu(e)?new J1(t):new Z1(t,{allowProjection:e!==M.Fragment});function Fn(e,t,n){const r=e.getProps();return pu(r,t,n!==void 0?n:r.custom,e)}const zl=e=>Array.isArray(e);function ew(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Hn(n))}function tw(e){return zl(e)?e[e.length-1]||0:e}function nw(e,t){const n=Fn(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const l=tw(s[o]);ew(e,o,l)}}function rw(e){return!!(me(e)&&e.add)}function Bl(e,t){const n=e.getValue("willChange");if(rw(n))return n.add(t);if(!n&&mt.WillChange){const r=new mt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function hm(e){return e.props[nm]}const iw=e=>e!==null;function sw(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(iw),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[s]}const ow={type:"spring",stiffness:500,damping:25,restSpeed:10},lw=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),aw={type:"keyframes",duration:.8},uw={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},cw=(e,{keyframes:t})=>t.length>2?aw:qn.has(e)?e.startsWith("scale")?lw(t[1]):ow:uw;function fw({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:l,from:a,elapsed:u,...c}){return!!Object.keys(c).length}const gu=(e,t,n,r={},i,s)=>o=>{const l=iu(r,e)||{},a=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-rt(a);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:d=>{t.set(d),l.onUpdate&&l.onUpdate(d)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:s?void 0:i};fw(l)||Object.assign(c,cw(e,c)),c.duration&&(c.duration=rt(c.duration)),c.repeatDelay&&(c.repeatDelay=rt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(_l(c),c.delay===0&&(f=!0)),(mt.instantAnimations||mt.skipAnimations)&&(f=!0,_l(c),c.delay=0),c.allowFlatten=!l.type&&!l.ease,f&&!s&&t.get()!==void 0){const d=sw(c.keyframes,l);if(d!==void 0){W.update(()=>{c.onUpdate(d),c.onComplete()});return}}return l.isSync?new nu(c):new L0(c)};function dw({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function pm(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:o,...l}=t;r&&(s=r);const a=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const c in l){const f=e.getValue(c,e.latestValues[c]??null),d=l[c];if(d===void 0||u&&dw(u,c))continue;const y={delay:n,...iu(s||{},c)},g=f.get();if(g!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===g&&!y.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const p=hm(e);if(p){const h=window.MotionHandoffAnimation(p,c,W);h!==null&&(y.startTime=h,v=!0)}}Bl(e,c),f.start(gu(c,f,d,e.shouldReduceMotion&&_p.has(c)?{type:!1}:y,e,v));const k=f.animation;k&&a.push(k)}return o&&Promise.all(a).then(()=>{W.update(()=>{o&&nw(e,o)})}),a}function mm(e,t,n,r=0,i=1){const s=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),o=e.size,l=(o-1)*r;return typeof n=="function"?n(s,o):i===1?s*r:l-s*r}function Ul(e,t,n={}){var a;const r=Fn(e,t,n.type==="exit"?(a=e.presenceContext)==null?void 0:a.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(pm(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:f,staggerDirection:d}=i;return hw(e,t,u,c,f,d,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[u,c]=l==="beforeChildren"?[s,o]:[o,s];return u().then(()=>c())}else return Promise.all([s(),o(n.delay)])}function hw(e,t,n=0,r=0,i=0,s=1,o){const l=[];for(const a of e.variantChildren)a.notify("AnimationStart",t),l.push(Ul(a,t,{...o,delay:n+(typeof r=="function"?0:r)+mm(e.variantChildren,a,r,i,s)}).then(()=>a.notify("AnimationComplete",t)));return Promise.all(l)}function pw(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Ul(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Ul(e,t,n);else{const i=typeof t=="function"?Fn(e,t,n.custom):t;r=Promise.all(pm(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function ym(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rPromise.all(t.map(({animation:n,options:r})=>pw(e,n,r)))}function ww(e){let t=vw(e),n=lf(),r=!0;const i=a=>(u,c)=>{var d;const f=Fn(e,c,a==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);if(f){const{transition:y,transitionEnd:g,...v}=f;u={...u,...v,...g}}return u};function s(a){t=a(e)}function o(a){const{props:u}=e,c=gm(e.parent)||{},f=[],d=new Set;let y={},g=1/0;for(let k=0;kg&&w,_=!1;const V=Array.isArray(m)?m:[m];let J=V.reduce(i(p),{});S===!1&&(J={});const{prevResolvedValues:gt={}}=h,Wt={...gt,...J},Jn=Z=>{x=!0,d.has(Z)&&(_=!0,d.delete(Z)),h.needsAnimating[Z]=!0;const E=e.getValue(Z);E&&(E.liveStyle=!1)};for(const Z in Wt){const E=J[Z],R=gt[Z];if(y.hasOwnProperty(Z))continue;let N=!1;zl(E)&&zl(R)?N=!ym(E,R):N=E!==R,N?E!=null?Jn(Z):d.add(Z):E!==void 0&&d.has(Z)?Jn(Z):h.protectedKeys[Z]=!0}h.prevProp=m,h.prevResolvedValues=J,h.isActive&&(y={...y,...J}),r&&e.blockInitialAnimation&&(x=!1);const ii=T&&C;x&&(!ii||_)&&f.push(...V.map(Z=>{const E={type:p};if(typeof Z=="string"&&r&&!ii&&e.manuallyAnimateOnMount&&e.parent){const{parent:R}=e,N=Fn(R,Z);if(R.enteringChildren&&N){const{delayChildren:$}=N.transition||{};E.delay=mm(R.enteringChildren,e,$)}}return{animation:Z,options:E}}))}if(d.size){const k={};if(typeof u.initial!="boolean"){const p=Fn(e,Array.isArray(u.initial)?u.initial[0]:u.initial);p&&p.transition&&(k.transition=p.transition)}d.forEach(p=>{const h=e.getBaseTarget(p),m=e.getValue(p);m&&(m.liveStyle=!0),k[p]=h??null}),f.push({animation:k})}let v=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(f):Promise.resolve()}function l(a,u){var f;if(n[a].isActive===u)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(d=>{var y;return(y=d.animationState)==null?void 0:y.setActive(a,u)}),n[a].isActive=u;const c=o(a);for(const d in n)n[d].protectedKeys={};return c}return{animateChanges:o,setActive:l,setAnimateFunction:s,getState:()=>n,reset:()=>{n=lf()}}}function Sw(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ym(t,e):!1}function Kt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function lf(){return{animate:Kt(!0),whileInView:Kt(),whileHover:Kt(),whileTap:Kt(),whileDrag:Kt(),whileFocus:Kt(),exit:Kt()}}class Ut{constructor(t){this.isMounted=!1,this.node=t}update(){}}class xw extends Ut{constructor(t){super(t),t.animationState||(t.animationState=ww(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();zs(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let Tw=0;class kw extends Ut{constructor(){super(...arguments),this.id=Tw++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Pw={animation:{Feature:xw},exit:{Feature:kw}};function Yr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function ri(e){return{point:{x:e.pageX,y:e.pageY}}}const Cw=e=>t=>lu(t)&&e(t,ri(t));function Pr(e,t,n,r){return Yr(e,t,Cw(n),r)}const vm=1e-4,Ew=1-vm,Mw=1+vm,wm=.01,Dw=0-wm,Aw=0+wm;function ve(e){return e.max-e.min}function Vw(e,t,n){return Math.abs(e-t)<=n}function af(e,t,n,r=.5){e.origin=r,e.originPoint=K(t.min,t.max,e.origin),e.scale=ve(n)/ve(t),e.translate=K(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Ew&&e.scale<=Mw||isNaN(e.scale))&&(e.scale=1),(e.translate>=Dw&&e.translate<=Aw||isNaN(e.translate))&&(e.translate=0)}function Cr(e,t,n,r){af(e.x,t.x,n.x,r?r.originX:void 0),af(e.y,t.y,n.y,r?r.originY:void 0)}function uf(e,t,n){e.min=n.min+t.min,e.max=e.min+ve(t)}function Rw(e,t,n){uf(e.x,t.x,n.x),uf(e.y,t.y,n.y)}function cf(e,t,n){e.min=t.min-n.min,e.max=e.min+ve(t)}function Ss(e,t,n){cf(e.x,t.x,n.x),cf(e.y,t.y,n.y)}function _e(e){return[e("x"),e("y")]}const Sm=({current:e})=>e?e.ownerDocument.defaultView:null,ff=(e,t)=>Math.abs(e-t);function Lw(e,t){const n=ff(e.x,t.x),r=ff(e.y,t.y);return Math.sqrt(n**2+r**2)}class xm{constructor(t,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=Po(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,g=Lw(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!g)return;const{point:v}=d,{timestamp:k}=ue;this.history.push({...v,timestamp:k});const{onStart:p,onMove:h}=this.handlers;y||(p&&p(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),h&&h(this.lastMoveEvent,d)},this.handlePointerMove=(d,y)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=ko(y,this.transformPagePoint),W.update(this.updatePoint,!0)},this.handlePointerUp=(d,y)=>{this.end();const{onEnd:g,onSessionEnd:v,resumeAnimation:k}=this.handlers;if(this.dragSnapToOrigin&&k&&k(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Po(d.type==="pointercancel"?this.lastMoveEventInfo:ko(y,this.transformPagePoint),this.history);this.startEvent&&g&&g(d,p),v&&v(d,p)},!lu(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const l=ri(t),a=ko(l,this.transformPagePoint),{point:u}=a,{timestamp:c}=ue;this.history=[{...u,timestamp:c}];const{onSessionStart:f}=n;f&&f(t,Po(a,this.history)),this.removeListeners=ei(Pr(this.contextWindow,"pointermove",this.handlePointerMove),Pr(this.contextWindow,"pointerup",this.handlePointerUp),Pr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ft(this.updatePoint)}}function ko(e,t){return t?{point:t(e.point)}:e}function df(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Po({point:e},t){return{point:e,delta:df(e,Tm(t)),offset:df(e,Nw(t)),velocity:_w(t,.1)}}function Nw(e){return e[0]}function Tm(e){return e[e.length-1]}function _w(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Tm(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>rt(t)));)n--;if(!r)return{x:0,y:0};const s=Oe(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 jw(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?K(n,e,r.max):Math.min(e,n)),e}function hf(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Fw(e,{top:t,left:n,bottom:r,right:i}){return{x:hf(e.x,n,i),y:hf(e.y,t,r)}}function pf(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=$r(t.min,t.max-r,e.min):r>i&&(n=$r(e.min,e.max-i,t.min)),pt(0,1,n)}function zw(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Wl=.35;function Bw(e=Wl){return e===!1?e=0:e===!0&&(e=Wl),{x:mf(e,"left","right"),y:mf(e,"top","bottom")}}function mf(e,t,n){return{min:yf(e,t),max:yf(e,n)}}function yf(e,t){return typeof e=="number"?e:e[t]||0}const Uw=new WeakMap;class Ww{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=te(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{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(ri(f).point)},o=(f,d)=>{const{drag:y,dragPropagation:g,onDragStart:v}=this.getProps();if(y&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Y0(y),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=d,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),_e(p=>{let h=this.getAxisMotionValue(p).get()||0;if(it.test(h)){const{projection:m}=this.visualElement;if(m&&m.layout){const w=m.layout.layoutBox[p];w&&(h=ve(w)*(parseFloat(h)/100))}}this.originPoint[p]=h}),v&&W.postRender(()=>v(f,d)),Bl(this.visualElement,"transform");const{animationState:k}=this.visualElement;k&&k.setActive("whileDrag",!0)},l=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d;const{dragPropagation:y,dragDirectionLock:g,onDirectionLock:v,onDrag:k}=this.getProps();if(!y&&!this.openDragLock)return;const{offset:p}=d;if(g&&this.currentDirection===null){this.currentDirection=$w(p),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",d.point,p),this.updateAxis("y",d.point,p),this.visualElement.render(),k&&k(f,d)},a=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d,this.stop(f,d),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>_e(f=>{var d;return this.getAnimationState(f)==="paused"&&((d=this.getAxisMotionValue(f).animation)==null?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new xm(t,{onSessionStart:s,onStart:o,onMove:l,onSessionEnd:a,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:Sm(this.visualElement)})}stop(t,n){const r=t||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:l}=this.getProps();l&&W.postRender(()=>l(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.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(t,n,r){const{drag:i}=this.getProps();if(!r||!Di(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=jw(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:t,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;t&&En(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Fw(r.layoutBox,t):this.constraints=!1,this.elastic=Bw(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&_e(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=zw(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!En(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=H1(r,i.root,this.visualElement.getTransformPagePoint());let o=Iw(i.layout.layoutBox,s);if(n){const l=n(U1(o));this.hasMutatedConstraints=!!l,l&&(o=sm(l))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),a=this.constraints||{},u=_e(c=>{if(!Di(c,n,this.currentDirection))return;let f=a&&a[c]||{};o&&(f={min:0,max:0});const d=i?200:1e6,y=i?40:1e7,g={type:"inertia",velocity:r?t[c]:0,bounceStiffness:d,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(c,g)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Bl(this.visualElement,t),r.start(gu(t,r,0,n,this.visualElement,!1))}stopAnimation(){_e(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){_e(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){_e(n=>{const{drag:r}=this.getProps();if(!Di(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:l}=i.layout.layoutBox[n];s.set(t[n]-K(o,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!En(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};_e(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const a=l.get();i[o]=Ow({min:a,max:a},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(),_e(o=>{if(!Di(o,t,null))return;const l=this.getAxisMotionValue(o),{min:a,max:u}=this.constraints[o];l.set(K(a,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;Uw.set(this.visualElement,this);const t=this.visualElement.current,n=Pr(t,"pointerdown",a=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(a)}),r=()=>{const{dragConstraints:a}=this.getProps();En(a)&&a.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),W.read(r);const o=Yr(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:a,hasLayoutChanged:u})=>{this.isDragging&&u&&(_e(c=>{const f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=a[c].translate,f.set(f.get()+a[c].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Wl,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:l}}}function Di(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function $w(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Hw extends Ut{constructor(t){super(t),this.removeGroupControls=Be,this.removeListeners=Be,this.controls=new Ww(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Be}unmount(){this.removeGroupControls(),this.removeListeners()}}const gf=e=>(t,n)=>{e&&W.postRender(()=>e(t,n))};class Kw extends Ut{constructor(){super(...arguments),this.removePointerDownListener=Be}onPointerDown(t){this.session=new xm(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Sm(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:gf(t),onStart:gf(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&W.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=Pr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Hi={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function vf(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const lr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(L.test(e))e=parseFloat(e);else return e;const n=vf(e,t.target.x),r=vf(e,t.target.y);return`${n}% ${r}%`}},Gw={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=It.parse(e);if(i.length>5)return r;const s=It.createTransformer(e),o=typeof i[0]!="number"?1:0,l=n.x.scale*t.x,a=n.y.scale*t.y;i[0+o]/=l,i[1+o]/=a;const u=K(l,a,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}};let Co=!1;class Qw extends M.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;m1(Yw),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),Co&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Hi.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,{projection:o}=r;return o&&(o.isPresent=s,Co=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||W.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),ou.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;Co=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function km(e){const[t,n]=Kp(),r=M.useContext(Oa);return A.jsx(Qw,{...e,layoutGroup:r,switchLayoutGroup:M.useContext(rm),isPresent:t,safeToRemove:n})}const Yw={borderRadius:{...lr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:lr,borderTopRightRadius:lr,borderBottomLeftRadius:lr,borderBottomRightRadius:lr,boxShadow:Gw};function Xw(e,t,n){const r=me(e)?e:Hn(e);return r.start(gu("",r,t,n)),r.animation}const Zw=(e,t)=>e.depth-t.depth;class qw{constructor(){this.children=[],this.isDirty=!1}add(t){Ua(this.children,t),this.isDirty=!0}remove(t){Wa(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Zw),this.isDirty=!1,this.children.forEach(t)}}function Jw(e,t){const n=Pe.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(Ft(r),e(s-t))};return W.setup(r,!0),()=>Ft(r)}const Pm=["TopLeft","TopRight","BottomLeft","BottomRight"],bw=Pm.length,wf=e=>typeof e=="string"?parseFloat(e):e,Sf=e=>typeof e=="number"||L.test(e);function eS(e,t,n,r,i,s){i?(e.opacity=K(0,n.opacity??1,tS(r)),e.opacityExit=K(t.opacity??1,0,nS(r))):s&&(e.opacity=K(t.opacity??1,n.opacity??1,r));for(let o=0;ort?1:n($r(e,t,r))}function Tf(e,t){e.min=t.min,e.max=t.max}function He(e,t){Tf(e.x,t.x),Tf(e.y,t.y)}function kf(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Pf(e,t,n,r,i){return e-=t,e=ws(e,1/n,r),i!==void 0&&(e=ws(e,1/i,r)),e}function rS(e,t=0,n=1,r=.5,i,s=e,o=e){if(it.test(t)&&(t=parseFloat(t),t=K(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=K(s.min,s.max,r);e===s&&(l-=t),e.min=Pf(e.min,t,n,l,i),e.max=Pf(e.max,t,n,l,i)}function Cf(e,t,[n,r,i],s,o){rS(e,t[n],t[r],t[i],t.scale,s,o)}const iS=["x","scaleX","originX"],sS=["y","scaleY","originY"];function Ef(e,t,n,r){Cf(e.x,t,iS,n?n.x:void 0,r?r.x:void 0),Cf(e.y,t,sS,n?n.y:void 0,r?r.y:void 0)}function Mf(e){return e.translate===0&&e.scale===1}function Em(e){return Mf(e.x)&&Mf(e.y)}function Df(e,t){return e.min===t.min&&e.max===t.max}function oS(e,t){return Df(e.x,t.x)&&Df(e.y,t.y)}function Af(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Mm(e,t){return Af(e.x,t.x)&&Af(e.y,t.y)}function Vf(e){return ve(e.x)/ve(e.y)}function Rf(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class lS{constructor(){this.members=[]}add(t){Ua(this.members,t),t.scheduleRender()}remove(t){if(Wa(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===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(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function aS(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:f,rotateY:d,skewX:y,skewY:g}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),f&&(r+=`rotateX(${f}deg) `),d&&(r+=`rotateY(${d}deg) `),y&&(r+=`skewX(${y}deg) `),g&&(r+=`skewY(${g}deg) `)}const l=e.x.scale*t.x,a=e.y.scale*t.y;return(l!==1||a!==1)&&(r+=`scale(${l}, ${a})`),r||"none"}const Eo=["","X","Y","Z"],uS=1e3;let cS=0;function Mo(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Dm(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=hm(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",W,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Dm(r)}function Am({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},l=t==null?void 0:t()){this.id=cS++,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(hS),this.nodes.forEach(gS),this.nodes.forEach(vS),this.nodes.forEach(pS)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let a=0;athis.root.updateBlockedByResize=!1;W.read(()=>{f=window.innerWidth}),e(o,()=>{const y=window.innerWidth;y!==f&&(f=y,this.root.updateBlockedByResize=!0,c&&c(),c=Jw(d,250),Hi.hasAnimatedSinceResize&&(Hi.hasAnimatedSinceResize=!1,this.nodes.forEach(_f)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||a)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||kS,{onLayoutAnimationStart:v,onLayoutAnimationComplete:k}=u.getProps(),p=!this.targetLayout||!Mm(this.targetLayout,y),h=!f&&d;if(this.options.layoutRoot||this.resumeFrom||h||f&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const m={...iu(g,"layout"),onPlay:v,onComplete:k};(u.shouldReduceMotion||this.options.layoutRoot)&&(m.delay=0,m.type=!1),this.startAnimation(m),this.setAnimationOrigin(c,h)}else f||_f(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ft(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(wS),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&&Dm(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ve(this.snapshot.measuredBox.x)&&!ve(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 a=0;a{const S=w/1e3;jf(f.x,o.x,S),jf(f.y,o.y,S),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ss(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),xS(this.relativeTarget,this.relativeTargetOrigin,d,S),m&&oS(this.relativeTarget,m)&&(this.isProjectionDirty=!1),m||(m=te()),He(m,this.relativeTarget)),v&&(this.animationValues=c,eS(c,u,this.latestValues,S,h,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var l,a,u;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(u=(a=this.resumingFrom)==null?void 0:a.currentAnimation)==null||u.stop(),this.pendingAnimation&&(Ft(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=W.update(()=>{Hi.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Hn(0)),this.currentAnimation=Xw(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),o.onUpdate&&o.onUpdate(c)},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(uS),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:a,layout:u,latestValues:c}=o;if(!(!l||!a||!u)){if(this!==o&&this.layout&&u&&Vm(this.options.animationType,this.layout.layoutBox,u.layoutBox)){a=this.target||te();const f=ve(this.layout.layoutBox.x);a.x.min=o.target.x.min,a.x.max=a.x.min+f;const d=ve(this.layout.layoutBox.y);a.y.min=o.target.y.min,a.y.max=a.y.min+d}He(l,a),Dn(l,c),Cr(this.projectionDeltaWithTransform,this.layoutCorrected,l,c)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new lS),this.sharedNodes.get(o).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var l;const{layoutId:o}=this.options;return o?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:o}=this.options;return o?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:l,preserveFollowOpacity:a}={}){const u=this.getStack();u&&u.promote(this,a),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:a}=o;if((a.z||a.rotate||a.rotateX||a.rotateY||a.rotateZ||a.skewX||a.skewY)&&(l=!0),!l)return;const u={};a.z&&Mo("z",o,u,this.animationValues);for(let c=0;c{var l;return(l=o.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(Lf),this.root.sharedNodes.clear()}}}function fS(e){e.updateLayout()}function dS(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;s==="size"?_e(f=>{const d=o?t.measuredBox[f]:t.layoutBox[f],y=ve(d);d.min=r[f].min,d.max=d.min+y}):Vm(s,t.layoutBox,r)&&_e(f=>{const d=o?t.measuredBox[f]:t.layoutBox[f],y=ve(r[f]);d.max=d.min+y,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+y)});const l=An();Cr(l,r,t.layoutBox);const a=An();o?Cr(a,e.applyTransform(i,!0),t.measuredBox):Cr(a,r,t.layoutBox);const u=!Em(l);let c=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:y}=f;if(d&&y){const g=te();Ss(g,t.layoutBox,d.layoutBox);const v=te();Ss(v,r,y.layoutBox),Mm(g,v)||(c=!0),f.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=g,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:a,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function hS(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function pS(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function mS(e){e.clearSnapshot()}function Lf(e){e.clearMeasurements()}function Nf(e){e.isLayoutDirty=!1}function yS(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function _f(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function gS(e){e.resolveTargetDelta()}function vS(e){e.calcProjection()}function wS(e){e.resetSkewAndRotation()}function SS(e){e.removeLeadSnapshot()}function jf(e,t,n){e.translate=K(t.translate,0,n),e.scale=K(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Ff(e,t,n,r){e.min=K(t.min,n.min,r),e.max=K(t.max,n.max,r)}function xS(e,t,n,r){Ff(e.x,t.x,n.x,r),Ff(e.y,t.y,n.y,r)}function TS(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const kS={duration:.45,ease:[.4,0,.1,1]},If=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Of=If("applewebkit/")&&!If("chrome/")?Math.round:Be;function zf(e){e.min=Of(e.min),e.max=Of(e.max)}function PS(e){zf(e.x),zf(e.y)}function Vm(e,t,n){return e==="position"||e==="preserve-aspect"&&!Vw(Vf(t),Vf(n),.2)}function CS(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const ES=Am({attachResizeListener:(e,t)=>Yr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Do={current:void 0},Rm=Am({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Do.current){const e=new ES({});e.mount(window),e.setOptions({layoutScroll:!0}),Do.current=e}return Do.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),MS={pan:{Feature:Kw},drag:{Feature:Hw,ProjectionNode:Rm,MeasureLayout:km}};function Bf(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&W.postRender(()=>s(t,ri(t)))}class DS extends Ut{mount(){const{current:t}=this.node;t&&(this.unmount=X0(t,(n,r)=>(Bf(this.node,r,"Start"),i=>Bf(this.node,i,"End"))))}unmount(){}}class AS extends Ut{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ei(Yr(this.node.current,"focus",()=>this.onFocus()),Yr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Uf(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&W.postRender(()=>s(t,ri(t)))}class VS extends Ut{mount(){const{current:t}=this.node;t&&(this.unmount=b0(t,(n,r)=>(Uf(this.node,r,"Start"),(i,{success:s})=>Uf(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const $l=new WeakMap,Ao=new WeakMap,RS=e=>{const t=$l.get(e.target);t&&t(e)},LS=e=>{e.forEach(RS)};function NS({root:e,...t}){const n=e||document;Ao.has(n)||Ao.set(n,{});const r=Ao.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(LS,{root:e,...t})),r[i]}function _S(e,t,n){const r=NS(t);return $l.set(e,n),r.observe(e),()=>{$l.delete(e),r.unobserve(e)}}const jS={some:0,all:1};class FS extends Ut{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:jS[i]},l=a=>{const{isIntersecting:u}=a;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:f}=this.node.getProps(),d=u?c:f;d&&d(a)};return _S(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(IS(t,n))&&this.startObserver()}unmount(){}}function IS({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const OS={inView:{Feature:FS},tap:{Feature:VS},focus:{Feature:AS},hover:{Feature:DS}},zS={layout:{ProjectionNode:Rm,MeasureLayout:km}},BS={...Pw,...OS,...MS,...zS},se=B1(BS,b1),Lm="/api";async function US(){return(await fetch(`${Lm}/state`)).json()}async function WS(){return(await fetch(`${Lm}/dependencies/check`)).json()}function $S({className:e="",size:t=240}){return A.jsx("img",{src:"/wails-logo.png",alt:"Wails",width:t,height:t,className:`object-contain ${e}`,style:{filter:"drop-shadow(0 0 60px rgba(239, 68, 68, 0.4))"}})}function HS(){const[e,t]=M.useState([]),[n,r]=M.useState(null),[i,s]=M.useState(!1),[o,l]=M.useState(!1);M.useEffect(()=>{US().then(f=>{r(f.system)})},[]),M.useEffect(()=>{const f=setTimeout(()=>{s(!0),a()},1500);return()=>clearTimeout(f)},[]);const a=async()=>{const d=(await WS()).map(y=>({...y,checkState:"idle"}));t(d);for(let y=0;ysetTimeout(g,300)),t(g=>g.map((v,k)=>k===y?{...v,checkState:"checking"}:v)),await new Promise(g=>setTimeout(g,400+Math.random()*300)),t(g=>g.map((v,k)=>k===y?{...v,checkState:"complete"}:v));await new Promise(y=>setTimeout(y,500)),l(!0)},u=e.length>0&&e.every(f=>f.installed||!f.required),c=f=>f.checkState==="idle"?A.jsx("div",{className:"w-5 h-5 rounded-full border-2 border-gray-600"}):f.checkState==="checking"?A.jsx(se.div,{className:"w-5 h-5 rounded-full border-2 border-red-500 border-t-transparent",animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"}}):f.installed?A.jsx(se.div,{initial:{scale:0},animate:{scale:1},className:"w-5 h-5 rounded-full bg-green-500 flex items-center justify-center",children:A.jsx(se.svg,{className:"w-3 h-3 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",initial:{pathLength:0},animate:{pathLength:1},transition:{duration:.3},children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})}):A.jsx(se.div,{initial:{scale:0},animate:{scale:1},className:"w-5 h-5 rounded-full bg-red-500 flex items-center justify-center",children:A.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:A.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M6 18L18 6M6 6l12 12"})})});return A.jsxs("div",{className:"min-h-screen bg-[#0f0f0f] grid-bg relative overflow-hidden",children:[A.jsx("div",{className:"absolute inset-0 radial-glow pointer-events-none"}),A.jsxs("div",{className:"relative z-10 min-h-screen flex flex-col items-center justify-center px-8",children:[A.jsx(se.div,{initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},transition:{duration:.6,ease:"easeOut"},children:A.jsx($S,{size:160})}),A.jsxs(se.div,{className:"mt-6 text-center",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3,duration:.5},children:[A.jsx("h1",{className:"text-3xl font-bold text-white",children:"Wails Setup"}),A.jsxs("p",{className:"text-gray-400 mt-2",children:[(n==null?void 0:n.os)&&`${n.os}/${n.arch}`,(n==null?void 0:n.wailsVersion)&&` • v${n.wailsVersion}`]})]}),A.jsxs(se.div,{className:"mt-10 w-full max-w-md",initial:{opacity:0},animate:{opacity:i?1:0},transition:{duration:.4},children:[A.jsxs(se.div,{className:"flex items-center gap-2 mb-4",initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:.2},children:[A.jsx("span",{className:"text-sm font-medium text-gray-400 uppercase tracking-wider",children:"Checking Dependencies"}),!o&&e.length>0&&A.jsxs(se.span,{className:"text-xs text-gray-500",initial:{opacity:0},animate:{opacity:1},children:["(",e.filter(f=>f.checkState==="complete").length,"/",e.length,")"]})]}),A.jsx("div",{className:"space-y-2",children:A.jsx(Yc,{mode:"popLayout",children:e.map((f,d)=>A.jsxs(se.div,{className:"flex items-center gap-4 p-4 rounded-xl bg-gray-800/50 border border-gray-700/50",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:d*.1,duration:.3,ease:"easeOut"},layout:!0,children:[A.jsx("div",{className:"flex-shrink-0",children:c(f)}),A.jsxs("div",{className:"flex-1 min-w-0",children:[A.jsxs("div",{className:"flex items-center gap-2",children:[A.jsx("span",{className:"text-white font-medium",children:f.name}),f.checkState==="complete"&&f.version&&A.jsxs(se.span,{className:"text-xs text-gray-500 font-mono",initial:{opacity:0},animate:{opacity:1},children:["v",f.version]})]}),f.checkState==="complete"&&!f.installed&&f.message&&A.jsx(se.p,{className:"text-xs text-red-400 mt-1 truncate",initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},children:f.message})]}),f.required&&f.checkState==="complete"&&!f.installed&&A.jsx(se.span,{className:"text-xs px-2 py-1 rounded bg-red-500/20 text-red-400",initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},children:"Required"})]},f.name))})}),A.jsx(Yc,{children:o&&A.jsxs(se.div,{className:"mt-6",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.2},children:[u?A.jsxs("div",{className:"text-center p-4 rounded-xl bg-green-500/10 border border-green-500/30",children:[A.jsx(se.div,{initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:200,damping:15},children:A.jsx("div",{className:"text-3xl mb-2",children:"✓"})}),A.jsx("p",{className:"text-green-400 font-medium",children:"All dependencies installed!"}),A.jsx("p",{className:"text-gray-400 text-sm mt-1",children:"You're ready to build Wails applications."})]}):A.jsxs("div",{className:"text-center p-4 rounded-xl bg-yellow-500/10 border border-yellow-500/30",children:[A.jsx("div",{className:"text-3xl mb-2",children:"⚠"}),A.jsx("p",{className:"text-yellow-400 font-medium",children:"Some dependencies are missing"}),A.jsx("p",{className:"text-gray-400 text-sm mt-1",children:"Install the missing dependencies to continue."})]}),A.jsx(se.button,{className:"mt-6 w-full btn-primary",onClick:()=>window.close(),initial:{opacity:0},animate:{opacity:1},transition:{delay:.4},whileHover:{scale:1.02},whileTap:{scale:.98},children:"Close"})]})})]}),i&&e.length===0&&A.jsx(se.div,{className:"mt-10 flex space-x-2",initial:{opacity:0},animate:{opacity:1},children:[0,1,2].map(f=>A.jsx(se.div,{className:"w-2 h-2 rounded-full bg-red-500/50",animate:{scale:[1,1.3,1],opacity:[.5,1,.5]},transition:{duration:1,repeat:1/0,delay:f*.15}},f))})]})]})}Vo.createRoot(document.getElementById("root")).render(A.jsx(Xm.StrictMode,{children:A.jsx(HS,{})})); diff --git a/v3/internal/setupwizard/frontend/dist/assets/index-ChymCpvQ.js b/v3/internal/setupwizard/frontend/dist/assets/index-ChymCpvQ.js new file mode 100644 index 000000000..bb5d941db --- /dev/null +++ b/v3/internal/setupwizard/frontend/dist/assets/index-ChymCpvQ.js @@ -0,0 +1,48 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function Om(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Yf={exports:{}},ks={},Xf={exports:{}},_={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Zr=Symbol.for("react.element"),zm=Symbol.for("react.portal"),Bm=Symbol.for("react.fragment"),Um=Symbol.for("react.strict_mode"),Wm=Symbol.for("react.profiler"),$m=Symbol.for("react.provider"),Hm=Symbol.for("react.context"),Km=Symbol.for("react.forward_ref"),Gm=Symbol.for("react.suspense"),Qm=Symbol.for("react.memo"),Ym=Symbol.for("react.lazy"),ku=Symbol.iterator;function Xm(e){return e===null||typeof e!="object"?null:(e=ku&&e[ku]||e["@@iterator"],typeof e=="function"?e:null)}var Zf={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},qf=Object.assign,Jf={};function Gn(e,t,n){this.props=e,this.context=t,this.refs=Jf,this.updater=n||Zf}Gn.prototype.isReactComponent={};Gn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Gn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function bf(){}bf.prototype=Gn.prototype;function Ql(e,t,n){this.props=e,this.context=t,this.refs=Jf,this.updater=n||Zf}var Yl=Ql.prototype=new bf;Yl.constructor=Ql;qf(Yl,Gn.prototype);Yl.isPureReactComponent=!0;var Tu=Array.isArray,ed=Object.prototype.hasOwnProperty,Xl={current:null},td={key:!0,ref:!0,__self:!0,__source:!0};function nd(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)ed.call(t,r)&&!td.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1>>1,ie=N[$];if(0>>1;$i($s,V))Hti(ai,$s)?(N[$]=ai,N[Ht]=V,$=Ht):(N[$]=$s,N[$t]=V,$=$t);else if(Hti(ai,V))N[$]=ai,N[Ht]=V,$=Ht;else break e}}return L}function i(N,L){var V=N.sortIndex-L.sortIndex;return V!==0?V:N.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var a=[],u=[],c=1,d=null,f=3,g=!1,v=!1,x=!1,P=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(N){for(var L=n(u);L!==null;){if(L.callback===null)r(u);else if(L.startTime<=N)r(u),L.sortIndex=L.expirationTime,t(a,L);else break;L=n(u)}}function w(N){if(x=!1,m(N),!v)if(n(a)!==null)v=!0,oi(S);else{var L=n(u);L!==null&&Z(w,L.startTime-N)}}function S(N,L){v=!1,x&&(x=!1,p(k),k=-1),g=!0;var V=f;try{for(m(L),d=n(a);d!==null&&(!(d.expirationTime>L)||N&&!J());){var $=d.callback;if(typeof $=="function"){d.callback=null,f=d.priorityLevel;var ie=$(d.expirationTime<=L);L=e.unstable_now(),typeof ie=="function"?d.callback=ie:d===n(a)&&r(a),m(L)}else r(a);d=n(a)}if(d!==null)var li=!0;else{var $t=n(u);$t!==null&&Z(w,$t.startTime-L),li=!1}return li}finally{d=null,f=V,g=!1}}var T=!1,E=null,k=-1,R=5,D=-1;function J(){return!(e.unstable_now()-DN||125$?(N.sortIndex=V,t(u,N),n(a)===null&&N===n(u)&&(x?(p(k),k=-1):x=!0,Z(w,V-$))):(N.sortIndex=ie,t(a,N),v||g||(v=!0,oi(S))),N},e.unstable_shouldYield=J,e.unstable_wrapCallback=function(N){var L=f;return function(){var V=f;f=L;try{return N.apply(this,arguments)}finally{f=V}}}})(ld);od.exports=ld;var lg=od.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var ag=j,De=lg;function C(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ro=Object.prototype.hasOwnProperty,ug=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Pu={},Eu={};function cg(e){return Ro.call(Eu,e)?!0:Ro.call(Pu,e)?!1:ug.test(e)?Eu[e]=!0:(Pu[e]=!0,!1)}function fg(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function dg(e,t,n,r){if(t===null||typeof t>"u"||fg(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function we(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var ce={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ce[e]=new we(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ce[t]=new we(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ce[e]=new we(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ce[e]=new we(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ce[e]=new we(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ce[e]=new we(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ce[e]=new we(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ce[e]=new we(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ce[e]=new we(e,5,!1,e.toLowerCase(),null,!1,!1)});var ql=/[\-:]([a-z])/g;function Jl(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ql,Jl);ce[t]=new we(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ql,Jl);ce[t]=new we(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ql,Jl);ce[t]=new we(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ce[e]=new we(e,1,!1,e.toLowerCase(),null,!1,!1)});ce.xlinkHref=new we("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ce[e]=new we(e,1,!1,e.toLowerCase(),null,!0,!0)});function bl(e,t,n,r){var i=ce.hasOwnProperty(t)?ce[t]:null;(i!==null?i.type!==0:r||!(2l||i[o]!==s[l]){var a=` +`+i[o].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=o&&0<=l);break}}}finally{Gs=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ur(e):""}function hg(e){switch(e.tag){case 5:return ur(e.type);case 16:return ur("Lazy");case 13:return ur("Suspense");case 19:return ur("SuspenseList");case 0:case 2:case 15:return e=Qs(e.type,!1),e;case 11:return e=Qs(e.type.render,!1),e;case 1:return e=Qs(e.type,!0),e;default:return""}}function Oo(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case pn:return"Fragment";case hn:return"Portal";case _o:return"Profiler";case ea:return"StrictMode";case Io:return"Suspense";case Fo:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case cd:return(e.displayName||"Context")+".Consumer";case ud:return(e._context.displayName||"Context")+".Provider";case ta:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case na:return t=e.displayName||null,t!==null?t:Oo(e.type)||"Memo";case xt:t=e._payload,e=e._init;try{return Oo(e(t))}catch{}}return null}function pg(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Oo(t);case 8:return t===ea?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Rt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function dd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function mg(e){var t=dd(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function fi(e){e._valueTracker||(e._valueTracker=mg(e))}function hd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=dd(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Gi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function zo(e,t){var n=t.checked;return Q({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ju(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Rt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function pd(e,t){t=t.checked,t!=null&&bl(e,"checked",t,!1)}function Bo(e,t){pd(e,t);var n=Rt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Uo(e,t.type,n):t.hasOwnProperty("defaultValue")&&Uo(e,t.type,Rt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Mu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Uo(e,t,n){(t!=="number"||Gi(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var cr=Array.isArray;function Dn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=di.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function jr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var pr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},gg=["Webkit","ms","Moz","O"];Object.keys(pr).forEach(function(e){gg.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pr[t]=pr[e]})});function vd(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||pr.hasOwnProperty(e)&&pr[e]?(""+t).trim():t+"px"}function xd(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=vd(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var yg=Q({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ho(e,t){if(t){if(yg[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(C(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(C(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(C(61))}if(t.style!=null&&typeof t.style!="object")throw Error(C(62))}}function Ko(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Go=null;function ra(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Qo=null,Ln=null,An=null;function Au(e){if(e=br(e)){if(typeof Qo!="function")throw Error(C(280));var t=e.stateNode;t&&(t=Ns(t),Qo(e.stateNode,e.type,t))}}function wd(e){Ln?An?An.push(e):An=[e]:Ln=e}function Sd(){if(Ln){var e=Ln,t=An;if(An=Ln=null,Au(e),t)for(e=0;e>>=0,e===0?32:31-(jg(e)/Mg|0)|0}var hi=64,pi=4194304;function fr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Zi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var l=o&~i;l!==0?r=fr(l):(s&=o,s!==0&&(r=fr(s)))}else o=n&~i,o!==0?r=fr(o):s!==0&&(r=fr(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function qr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ye(t),e[t]=n}function Vg(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=gr),Uu=" ",Wu=!1;function Ud(e,t){switch(e){case"keyup":return ly.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Wd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var mn=!1;function uy(e,t){switch(e){case"compositionend":return Wd(t);case"keypress":return t.which!==32?null:(Wu=!0,Uu);case"textInput":return e=t.data,e===Uu&&Wu?null:e;default:return null}}function cy(e,t){if(mn)return e==="compositionend"||!fa&&Ud(e,t)?(e=zd(),Vi=aa=Tt=null,mn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Gu(n)}}function Gd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Gd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Qd(){for(var e=window,t=Gi();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Gi(e.document)}return t}function da(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function xy(e){var t=Qd(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Gd(n.ownerDocument.documentElement,n)){if(r!==null&&da(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=Qu(n,s);var o=Qu(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,gn=null,bo=null,vr=null,el=!1;function Yu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;el||gn==null||gn!==Gi(r)||(r=gn,"selectionStart"in r&&da(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),vr&&Rr(vr,r)||(vr=r,r=bi(bo,"onSelect"),0xn||(e.current=ol[xn],ol[xn]=null,xn--)}function O(e,t){xn++,ol[xn]=e.current,e.current=t}var _t={},me=zt(_t),Ce=zt(!1),sn=_t;function On(e,t){var n=e.type.contextTypes;if(!n)return _t;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Pe(e){return e=e.childContextTypes,e!=null}function ts(){B(Ce),B(me)}function tc(e,t,n){if(me.current!==_t)throw Error(C(168));O(me,t),O(Ce,n)}function nh(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(C(108,pg(e)||"Unknown",i));return Q({},n,r)}function ns(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||_t,sn=me.current,O(me,e),O(Ce,Ce.current),!0}function nc(e,t,n){var r=e.stateNode;if(!r)throw Error(C(169));n?(e=nh(e,t,sn),r.__reactInternalMemoizedMergedChildContext=e,B(Ce),B(me),O(me,e)):B(Ce),O(Ce,n)}var st=null,js=!1,lo=!1;function rh(e){st===null?st=[e]:st.push(e)}function Ly(e){js=!0,rh(e)}function Bt(){if(!lo&&st!==null){lo=!0;var e=0,t=F;try{var n=st;for(F=1;e>=o,i-=o,ot=1<<32-Ye(t)+i|n<k?(R=E,E=null):R=E.sibling;var D=f(p,E,m[k],w);if(D===null){E===null&&(E=R);break}e&&E&&D.alternate===null&&t(p,E),h=s(D,h,k),T===null?S=D:T.sibling=D,T=D,E=R}if(k===m.length)return n(p,E),U&&Gt(p,k),S;if(E===null){for(;kk?(R=E,E=null):R=E.sibling;var J=f(p,E,D.value,w);if(J===null){E===null&&(E=R);break}e&&E&&J.alternate===null&&t(p,E),h=s(J,h,k),T===null?S=J:T.sibling=J,T=J,E=R}if(D.done)return n(p,E),U&&Gt(p,k),S;if(E===null){for(;!D.done;k++,D=m.next())D=d(p,D.value,w),D!==null&&(h=s(D,h,k),T===null?S=D:T.sibling=D,T=D);return U&&Gt(p,k),S}for(E=r(p,E);!D.done;k++,D=m.next())D=g(E,p,k,D.value,w),D!==null&&(e&&D.alternate!==null&&E.delete(D.key===null?k:D.key),h=s(D,h,k),T===null?S=D:T.sibling=D,T=D);return e&&E.forEach(function(gt){return t(p,gt)}),U&&Gt(p,k),S}function P(p,h,m,w){if(typeof m=="object"&&m!==null&&m.type===pn&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case ci:e:{for(var S=m.key,T=h;T!==null;){if(T.key===S){if(S=m.type,S===pn){if(T.tag===7){n(p,T.sibling),h=i(T,m.props.children),h.return=p,p=h;break e}}else if(T.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===xt&&sc(S)===T.type){n(p,T.sibling),h=i(T,m.props),h.ref=sr(p,T,m),h.return=p,p=h;break e}n(p,T);break}else t(p,T);T=T.sibling}m.type===pn?(h=tn(m.props.children,p.mode,w,m.key),h.return=p,p=h):(w=Ui(m.type,m.key,m.props,null,p.mode,w),w.ref=sr(p,h,m),w.return=p,p=w)}return o(p);case hn:e:{for(T=m.key;h!==null;){if(h.key===T)if(h.tag===4&&h.stateNode.containerInfo===m.containerInfo&&h.stateNode.implementation===m.implementation){n(p,h.sibling),h=i(h,m.children||[]),h.return=p,p=h;break e}else{n(p,h);break}else t(p,h);h=h.sibling}h=go(m,p.mode,w),h.return=p,p=h}return o(p);case xt:return T=m._init,P(p,h,T(m._payload),w)}if(cr(m))return v(p,h,m,w);if(er(m))return x(p,h,m,w);Si(p,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,h!==null&&h.tag===6?(n(p,h.sibling),h=i(h,m),h.return=p,p=h):(n(p,h),h=mo(m,p.mode,w),h.return=p,p=h),o(p)):n(p,h)}return P}var Bn=lh(!0),ah=lh(!1),ss=zt(null),os=null,kn=null,ga=null;function ya(){ga=kn=os=null}function va(e){var t=ss.current;B(ss),e._currentValue=t}function ul(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Rn(e,t){os=e,ga=kn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ke=!0),e.firstContext=null)}function Be(e){var t=e._currentValue;if(ga!==e)if(e={context:e,memoizedValue:t,next:null},kn===null){if(os===null)throw Error(C(308));kn=e,os.dependencies={lanes:0,firstContext:e}}else kn=kn.next=e;return t}var Zt=null;function xa(e){Zt===null?Zt=[e]:Zt.push(e)}function uh(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,xa(t)):(n.next=i.next,i.next=n),t.interleaved=n,ft(e,r)}function ft(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var wt=!1;function wa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ch(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function at(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Mt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,I&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,ft(e,n)}return i=r.interleaved,i===null?(t.next=t,xa(r)):(t.next=i.next,i.next=t),r.interleaved=t,ft(e,n)}function _i(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,sa(e,n)}}function oc(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ls(e,t,n,r){var i=e.updateQueue;wt=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var a=l,u=a.next;a.next=null,o===null?s=u:o.next=u,o=a;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==o&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=a))}if(s!==null){var d=i.baseState;o=0,c=u=a=null,l=s;do{var f=l.lane,g=l.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:g,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var v=e,x=l;switch(f=t,g=n,x.tag){case 1:if(v=x.payload,typeof v=="function"){d=v.call(g,d,f);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=x.payload,f=typeof v=="function"?v.call(g,d,f):v,f==null)break e;d=Q({},d,f);break e;case 2:wt=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[l]:f.push(l))}else g={eventTime:g,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=g,a=d):c=c.next=g,o|=f;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;f=l,l=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(a=d),i.baseState=a,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);an|=o,e.lanes=o,e.memoizedState=d}}function lc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=uo.transition;uo.transition={};try{e(!1),t()}finally{F=n,uo.transition=r}}function Nh(){return Ue().memoizedState}function _y(e,t,n){var r=Lt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},jh(e))Mh(t,n);else if(n=uh(e,t,n,r),n!==null){var i=ve();Xe(n,e,r,i),Dh(n,t,r)}}function Iy(e,t,n){var r=Lt(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(jh(e))Mh(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,l=s(o,n);if(i.hasEagerState=!0,i.eagerState=l,Ze(l,o)){var a=t.interleaved;a===null?(i.next=i,xa(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=uh(e,t,i,r),n!==null&&(i=ve(),Xe(n,e,r,i),Dh(n,t,r))}}function jh(e){var t=e.alternate;return e===G||t!==null&&t===G}function Mh(e,t){xr=us=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Dh(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,sa(e,n)}}var cs={readContext:Be,useCallback:fe,useContext:fe,useEffect:fe,useImperativeHandle:fe,useInsertionEffect:fe,useLayoutEffect:fe,useMemo:fe,useReducer:fe,useRef:fe,useState:fe,useDebugValue:fe,useDeferredValue:fe,useTransition:fe,useMutableSource:fe,useSyncExternalStore:fe,useId:fe,unstable_isNewReconciler:!1},Fy={readContext:Be,useCallback:function(e,t){return Je().memoizedState=[e,t===void 0?null:t],e},useContext:Be,useEffect:uc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Fi(4194308,4,kh.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Fi(4,2,e,t)},useMemo:function(e,t){var n=Je();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Je();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=_y.bind(null,G,e),[r.memoizedState,e]},useRef:function(e){var t=Je();return e={current:e},t.memoizedState=e},useState:ac,useDebugValue:ja,useDeferredValue:function(e){return Je().memoizedState=e},useTransition:function(){var e=ac(!1),t=e[0];return e=Ry.bind(null,e[1]),Je().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=G,i=Je();if(U){if(n===void 0)throw Error(C(407));n=n()}else{if(n=t(),oe===null)throw Error(C(349));ln&30||ph(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,uc(gh.bind(null,r,s,e),[e]),r.flags|=2048,Wr(9,mh.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Je(),t=oe.identifierPrefix;if(U){var n=lt,r=ot;n=(r&~(1<<32-Ye(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Br++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[be]=t,e[Fr]=r,Bh(e,t,!1,!1),t.stateNode=e;e:{switch(o=Ko(n,r),n){case"dialog":z("cancel",e),z("close",e),i=r;break;case"iframe":case"object":case"embed":z("load",e),i=r;break;case"video":case"audio":for(i=0;i$n&&(t.flags|=128,r=!0,or(s,!1),t.lanes=4194304)}else{if(!r)if(e=as(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),or(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!U)return de(t),null}else 2*q()-s.renderingStartTime>$n&&n!==1073741824&&(t.flags|=128,r=!0,or(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=q(),t.sibling=null,n=H.current,O(H,r?n&1|2:n&1),t):(de(t),null);case 22:case 23:return Ra(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ne&1073741824&&(de(t),t.subtreeFlags&6&&(t.flags|=8192)):de(t),null;case 24:return null;case 25:return null}throw Error(C(156,t.tag))}function Ky(e,t){switch(pa(t),t.tag){case 1:return Pe(t.type)&&ts(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Un(),B(Ce),B(me),Ta(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ka(t),null;case 13:if(B(H),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(C(340));zn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(H),null;case 4:return Un(),null;case 10:return va(t.type._context),null;case 22:case 23:return Ra(),null;case 24:return null;default:return null}}var Ti=!1,he=!1,Gy=typeof WeakSet=="function"?WeakSet:Set,M=null;function Tn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){X(e,t,r)}else n.current=null}function vl(e,t,n){try{n()}catch(r){X(e,t,r)}}var wc=!1;function Qy(e,t){if(tl=qi,e=Qd(),da(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,l=-1,a=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var g;d!==n||i!==0&&d.nodeType!==3||(l=o+i),d!==s||r!==0&&d.nodeType!==3||(a=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(g=d.firstChild)!==null;)f=d,d=g;for(;;){if(d===e)break t;if(f===n&&++u===i&&(l=o),f===s&&++c===r&&(a=o),(g=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=g}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(nl={focusedElem:e,selectionRange:n},qi=!1,M=t;M!==null;)if(t=M,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,M=e;else for(;M!==null;){t=M;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var x=v.memoizedProps,P=v.memoizedState,p=t.stateNode,h=p.getSnapshotBeforeUpdate(t.elementType===t.type?x:Ke(t.type,x),P);p.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(C(163))}}catch(w){X(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,M=e;break}M=t.return}return v=wc,wc=!1,v}function wr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&vl(t,n,s)}i=i.next}while(i!==r)}}function Ls(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function xl(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function $h(e){var t=e.alternate;t!==null&&(e.alternate=null,$h(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[be],delete t[Fr],delete t[sl],delete t[My],delete t[Dy])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Hh(e){return e.tag===5||e.tag===3||e.tag===4}function Sc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Hh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function wl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=es));else if(r!==4&&(e=e.child,e!==null))for(wl(e,t,n),e=e.sibling;e!==null;)wl(e,t,n),e=e.sibling}function Sl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Sl(e,t,n),e=e.sibling;e!==null;)Sl(e,t,n),e=e.sibling}var le=null,Ge=!1;function yt(e,t,n){for(n=n.child;n!==null;)Kh(e,t,n),n=n.sibling}function Kh(e,t,n){if(et&&typeof et.onCommitFiberUnmount=="function")try{et.onCommitFiberUnmount(Ts,n)}catch{}switch(n.tag){case 5:he||Tn(n,t);case 6:var r=le,i=Ge;le=null,yt(e,t,n),le=r,Ge=i,le!==null&&(Ge?(e=le,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):le.removeChild(n.stateNode));break;case 18:le!==null&&(Ge?(e=le,n=n.stateNode,e.nodeType===8?oo(e.parentNode,n):e.nodeType===1&&oo(e,n),Ar(e)):oo(le,n.stateNode));break;case 4:r=le,i=Ge,le=n.stateNode.containerInfo,Ge=!0,yt(e,t,n),le=r,Ge=i;break;case 0:case 11:case 14:case 15:if(!he&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&vl(n,t,o),i=i.next}while(i!==r)}yt(e,t,n);break;case 1:if(!he&&(Tn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){X(n,t,l)}yt(e,t,n);break;case 21:yt(e,t,n);break;case 22:n.mode&1?(he=(r=he)||n.memoizedState!==null,yt(e,t,n),he=r):yt(e,t,n);break;default:yt(e,t,n)}}function kc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Gy),t.forEach(function(r){var i=n0.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function We(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=o),r&=~s}if(r=i,r=q()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Xy(r/1960))-r,10e?16:e,Ct===null)var r=!1;else{if(e=Ct,Ct=null,hs=0,I&6)throw Error(C(331));var i=I;for(I|=4,M=e.current;M!==null;){var s=M,o=s.child;if(M.flags&16){var l=s.deletions;if(l!==null){for(var a=0;aq()-Aa?en(e,0):La|=n),Ee(e,t)}function bh(e,t){t===0&&(e.mode&1?(t=pi,pi<<=1,!(pi&130023424)&&(pi=4194304)):t=1);var n=ve();e=ft(e,t),e!==null&&(qr(e,t,n),Ee(e,n))}function t0(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),bh(e,n)}function n0(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(C(314))}r!==null&&r.delete(t),bh(e,n)}var ep;ep=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ce.current)ke=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ke=!1,$y(e,t,n);ke=!!(e.flags&131072)}else ke=!1,U&&t.flags&1048576&&ih(t,is,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Oi(e,t),e=t.pendingProps;var i=On(t,me.current);Rn(t,n),i=Pa(null,t,r,e,i,n);var s=Ea();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Pe(r)?(s=!0,ns(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,wa(t),i.updater=Ds,t.stateNode=i,i._reactInternals=t,fl(t,r,e,n),t=pl(null,t,r,!0,s,n)):(t.tag=0,U&&s&&ha(t),ge(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Oi(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=i0(r),e=Ke(r,e),i){case 0:t=hl(null,t,r,e,n);break e;case 1:t=yc(null,t,r,e,n);break e;case 11:t=mc(null,t,r,e,n);break e;case 14:t=gc(null,t,r,Ke(r.type,e),n);break e}throw Error(C(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ke(r,i),hl(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ke(r,i),yc(e,t,r,i,n);case 3:e:{if(Fh(t),e===null)throw Error(C(387));r=t.pendingProps,s=t.memoizedState,i=s.element,ch(e,t),ls(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Wn(Error(C(423)),t),t=vc(e,t,r,n,i);break e}else if(r!==i){i=Wn(Error(C(424)),t),t=vc(e,t,r,n,i);break e}else for(je=jt(t.stateNode.containerInfo.firstChild),Me=t,U=!0,Qe=null,n=ah(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(zn(),r===i){t=dt(e,t,n);break e}ge(e,t,r,n)}t=t.child}return t;case 5:return fh(t),e===null&&al(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,rl(r,i)?o=null:s!==null&&rl(r,s)&&(t.flags|=32),Ih(e,t),ge(e,t,o,n),t.child;case 6:return e===null&&al(t),null;case 13:return Oh(e,t,n);case 4:return Sa(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Bn(t,null,r,n):ge(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ke(r,i),mc(e,t,r,i,n);case 7:return ge(e,t,t.pendingProps,n),t.child;case 8:return ge(e,t,t.pendingProps.children,n),t.child;case 12:return ge(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,O(ss,r._currentValue),r._currentValue=o,s!==null)if(Ze(s.value,o)){if(s.children===i.children&&!Ce.current){t=dt(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var l=s.dependencies;if(l!==null){o=s.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(s.tag===1){a=at(-1,n&-n),a.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),ul(s.return,n,t),l.lanes|=n;break}a=a.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(C(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),ul(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}ge(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Rn(t,n),i=Be(i),r=r(i),t.flags|=1,ge(e,t,r,n),t.child;case 14:return r=t.type,i=Ke(r,t.pendingProps),i=Ke(r.type,i),gc(e,t,r,i,n);case 15:return Rh(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ke(r,i),Oi(e,t),t.tag=1,Pe(r)?(e=!0,ns(t)):e=!1,Rn(t,n),Lh(t,r,i),fl(t,r,i,n),pl(null,t,r,!0,e,n);case 19:return zh(e,t,n);case 22:return _h(e,t,n)}throw Error(C(156,t.tag))};function tp(e,t){return jd(e,t)}function r0(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ie(e,t,n,r){return new r0(e,t,n,r)}function Ia(e){return e=e.prototype,!(!e||!e.isReactComponent)}function i0(e){if(typeof e=="function")return Ia(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ta)return 11;if(e===na)return 14}return 2}function At(e,t){var n=e.alternate;return n===null?(n=Ie(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ui(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")Ia(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case pn:return tn(n.children,i,s,t);case ea:o=8,i|=8;break;case _o:return e=Ie(12,n,t,i|2),e.elementType=_o,e.lanes=s,e;case Io:return e=Ie(13,n,t,i),e.elementType=Io,e.lanes=s,e;case Fo:return e=Ie(19,n,t,i),e.elementType=Fo,e.lanes=s,e;case fd:return Vs(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ud:o=10;break e;case cd:o=9;break e;case ta:o=11;break e;case na:o=14;break e;case xt:o=16,r=null;break e}throw Error(C(130,e==null?e:typeof e,""))}return t=Ie(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function tn(e,t,n,r){return e=Ie(7,e,r,t),e.lanes=n,e}function Vs(e,t,n,r){return e=Ie(22,e,r,t),e.elementType=fd,e.lanes=n,e.stateNode={isHidden:!1},e}function mo(e,t,n){return e=Ie(6,e,null,t),e.lanes=n,e}function go(e,t,n){return t=Ie(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function s0(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Xs(0),this.expirationTimes=Xs(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xs(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Fa(e,t,n,r,i,s,o,l,a){return e=new s0(e,t,n,l,a),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Ie(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},wa(s),e}function o0(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(sp)}catch(e){console.error(e)}}sp(),sd.exports=Le;var f0=sd.exports,Dc=f0;Vo.createRoot=Dc.createRoot,Vo.hydrateRoot=Dc.hydrateRoot;const Ua=j.createContext({});function Wa(e){const t=j.useRef(null);return t.current===null&&(t.current=e()),t.current}const $a=typeof window<"u",op=$a?j.useLayoutEffect:j.useEffect,Os=j.createContext(null);function Ha(e,t){e.indexOf(t)===-1&&e.push(t)}function Ka(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ht=(e,t,n)=>n>t?t:n{};const pt={},lp=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function ap(e){return typeof e=="object"&&e!==null}const up=e=>/^0[^.\s]+$/u.test(e);function Qa(e){let t;return()=>(t===void 0&&(t=e()),t)}const ze=e=>e,d0=(e,t)=>n=>t(e(n)),ti=(...e)=>e.reduce(d0),Hr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Ya{constructor(){this.subscriptions=[]}add(t){return Ha(this.subscriptions,t),()=>Ka(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;se*1e3,Fe=e=>e/1e3;function cp(e,t){return t?e*(1e3/t):0}const fp=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,h0=1e-7,p0=12;function m0(e,t,n,r,i){let s,o,l=0;do o=t+(n-t)/2,s=fp(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>h0&&++lm0(s,0,1,e,n);return s=>s===0||s===1?s:fp(i(s),t,r)}const dp=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,hp=e=>t=>1-e(1-t),pp=ni(.33,1.53,.69,.99),Xa=hp(pp),mp=dp(Xa),gp=e=>(e*=2)<1?.5*Xa(e):.5*(2-Math.pow(2,-10*(e-1))),Za=e=>1-Math.sin(Math.acos(e)),yp=hp(Za),vp=dp(Za),g0=ni(.42,0,1,1),y0=ni(0,0,.58,1),xp=ni(.42,0,.58,1),v0=e=>Array.isArray(e)&&typeof e[0]!="number",wp=e=>Array.isArray(e)&&typeof e[0]=="number",x0={linear:ze,easeIn:g0,easeInOut:xp,easeOut:y0,circIn:Za,circInOut:vp,circOut:yp,backIn:Xa,backInOut:mp,backOut:pp,anticipate:gp},w0=e=>typeof e=="string",Lc=e=>{if(wp(e)){Ga(e.length===4);const[t,n,r,i]=e;return ni(t,n,r,i)}else if(w0(e))return x0[e];return e},Ei=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function S0(e,t){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1};function a(c){o.has(c)&&(u.schedule(c),e()),c(l)}const u={schedule:(c,d=!1,f=!1)=>{const v=f&&i?n:r;return d&&o.add(c),v.has(c)||v.add(c),c},cancel:c=>{r.delete(c),o.delete(c)},process:c=>{if(l=c,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(a),n.clear(),i=!1,s&&(s=!1,u.process(c))}};return u}const k0=40;function Sp(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Ei.reduce((m,w)=>(m[w]=S0(s),m),{}),{setup:l,read:a,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:g,postRender:v}=o,x=()=>{const m=pt.useManualTiming?i.timestamp:performance.now();n=!1,pt.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(m-i.timestamp,k0),1)),i.timestamp=m,i.isProcessing=!0,l.process(i),a.process(i),u.process(i),c.process(i),d.process(i),f.process(i),g.process(i),v.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(x))},P=()=>{n=!0,r=!0,i.isProcessing||e(x)};return{schedule:Ei.reduce((m,w)=>{const S=o[w];return m[w]=(T,E=!1,k=!1)=>(n||P(),S.schedule(T,E,k)),m},{}),cancel:m=>{for(let w=0;w(Wi===void 0&&Te.set(ae.isProcessing||pt.useManualTiming?ae.timestamp:performance.now()),Wi),set:e=>{Wi=e,queueMicrotask(T0)}},kp=e=>t=>typeof t=="string"&&t.startsWith(e),qa=kp("--"),C0=kp("var(--"),Ja=e=>C0(e)?P0.test(e.split("/*")[0].trim()):!1,P0=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Xn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Kr={...Xn,transform:e=>ht(0,1,e)},Ni={...Xn,default:1},Tr=e=>Math.round(e*1e5)/1e5,ba=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function E0(e){return e==null}const N0=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,eu=(e,t)=>n=>!!(typeof n=="string"&&N0.test(n)&&n.startsWith(e)||t&&!E0(n)&&Object.prototype.hasOwnProperty.call(n,t)),Tp=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,l]=r.match(ba);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},j0=e=>ht(0,255,e),vo={...Xn,transform:e=>Math.round(j0(e))},Jt={test:eu("rgb","red"),parse:Tp("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+vo.transform(e)+", "+vo.transform(t)+", "+vo.transform(n)+", "+Tr(Kr.transform(r))+")"};function M0(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const El={test:eu("#"),parse:M0,transform:Jt.transform},ri=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),vt=ri("deg"),rt=ri("%"),A=ri("px"),D0=ri("vh"),L0=ri("vw"),Ac={...rt,parse:e=>rt.parse(e)/100,transform:e=>rt.transform(e*100)},Pn={test:eu("hsl","hue"),parse:Tp("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+rt.transform(Tr(t))+", "+rt.transform(Tr(n))+", "+Tr(Kr.transform(r))+")"},b={test:e=>Jt.test(e)||El.test(e)||Pn.test(e),parse:e=>Jt.test(e)?Jt.parse(e):Pn.test(e)?Pn.parse(e):El.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Jt.transform(e):Pn.transform(e),getAnimatableNone:e=>{const t=b.parse(e);return t.alpha=0,b.transform(t)}},A0=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function V0(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(ba))==null?void 0:t.length)||0)+(((n=e.match(A0))==null?void 0:n.length)||0)>0}const Cp="number",Pp="color",R0="var",_0="var(",Vc="${}",I0=/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 Gr(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const l=t.replace(I0,a=>(b.test(a)?(r.color.push(s),i.push(Pp),n.push(b.parse(a))):a.startsWith(_0)?(r.var.push(s),i.push(R0),n.push(a)):(r.number.push(s),i.push(Cp),n.push(parseFloat(a))),++s,Vc)).split(Vc);return{values:n,split:l,indexes:r,types:i}}function Ep(e){return Gr(e).values}function Np(e){const{split:t,types:n}=Gr(e),r=t.length;return i=>{let s="";for(let o=0;otypeof e=="number"?0:b.test(e)?b.getAnimatableNone(e):e;function O0(e){const t=Ep(e);return Np(e)(t.map(F0))}const Ft={test:V0,parse:Ep,createTransformer:Np,getAnimatableNone:O0};function xo(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function z0({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const l=n<.5?n*(1+t):n+t-n*t,a=2*n-l;i=xo(a,l,e+1/3),s=xo(a,l,e),o=xo(a,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function gs(e,t){return n=>n>0?t:e}const K=(e,t,n)=>e+(t-e)*n,wo=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},B0=[El,Jt,Pn],U0=e=>B0.find(t=>t.test(e));function Rc(e){const t=U0(e);if(!t)return!1;let n=t.parse(e);return t===Pn&&(n=z0(n)),n}const _c=(e,t)=>{const n=Rc(e),r=Rc(t);if(!n||!r)return gs(e,t);const i={...n};return s=>(i.red=wo(n.red,r.red,s),i.green=wo(n.green,r.green,s),i.blue=wo(n.blue,r.blue,s),i.alpha=K(n.alpha,r.alpha,s),Jt.transform(i))},Nl=new Set(["none","hidden"]);function W0(e,t){return Nl.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function $0(e,t){return n=>K(e,t,n)}function tu(e){return typeof e=="number"?$0:typeof e=="string"?Ja(e)?gs:b.test(e)?_c:G0:Array.isArray(e)?jp:typeof e=="object"?b.test(e)?_c:H0:gs}function jp(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>tu(s)(s,t[o]));return s=>{for(let o=0;o{for(const s in r)n[s]=r[s](i);return n}}function K0(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i{const n=Ft.createTransformer(t),r=Gr(e),i=Gr(t);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?Nl.has(e)&&!i.values.length||Nl.has(t)&&!r.values.length?W0(e,t):ti(jp(K0(r,i),i.values),n):gs(e,t)};function Mp(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?K(e,t,n):tu(e)(e,t)}const Q0=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>W.update(t,n),stop:()=>It(t),now:()=>ae.isProcessing?ae.timestamp:Te.now()}},Dp=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s=ys?1/0:t}function Y0(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(nu(r),ys);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:Fe(i)}}const X0=5;function Lp(e,t,n){const r=Math.max(t-X0,0);return cp(n-e(r),t-r)}const Y={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},So=.001;function Z0({duration:e=Y.duration,bounce:t=Y.bounce,velocity:n=Y.velocity,mass:r=Y.mass}){let i,s,o=1-t;o=ht(Y.minDamping,Y.maxDamping,o),e=ht(Y.minDuration,Y.maxDuration,Fe(e)),o<1?(i=u=>{const c=u*o,d=c*e,f=c-n,g=jl(u,o),v=Math.exp(-d);return So-f/g*v},s=u=>{const d=u*o*e,f=d*n+n,g=Math.pow(o,2)*Math.pow(u,2)*e,v=Math.exp(-d),x=jl(Math.pow(u,2),o);return(-i(u)+So>0?-1:1)*((f-g)*v)/x}):(i=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-So+c*d},s=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const l=5/e,a=J0(i,s,l);if(e=nt(e),isNaN(a))return{stiffness:Y.stiffness,damping:Y.damping,duration:e};{const u=Math.pow(a,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const q0=12;function J0(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function tv(e){let t={velocity:Y.velocity,stiffness:Y.stiffness,damping:Y.damping,mass:Y.mass,isResolvedFromDuration:!1,...e};if(!Ic(e,ev)&&Ic(e,b0))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*ht(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Y.mass,stiffness:i,damping:s}}else{const n=Z0(e);t={...t,...n,mass:Y.mass},t.isResolvedFromDuration=!0}return t}function vs(e=Y.visualDuration,t=Y.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],l={done:!1,value:s},{stiffness:a,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:g}=tv({...n,velocity:-Fe(n.velocity||0)}),v=f||0,x=u/(2*Math.sqrt(a*c)),P=o-s,p=Fe(Math.sqrt(a/c)),h=Math.abs(P)<5;r||(r=h?Y.restSpeed.granular:Y.restSpeed.default),i||(i=h?Y.restDelta.granular:Y.restDelta.default);let m;if(x<1){const S=jl(p,x);m=T=>{const E=Math.exp(-x*p*T);return o-E*((v+x*p*P)/S*Math.sin(S*T)+P*Math.cos(S*T))}}else if(x===1)m=S=>o-Math.exp(-p*S)*(P+(v+p*P)*S);else{const S=p*Math.sqrt(x*x-1);m=T=>{const E=Math.exp(-x*p*T),k=Math.min(S*T,300);return o-E*((v+x*p*P)*Math.sinh(k)+S*P*Math.cosh(k))/S}}const w={calculatedDuration:g&&d||null,next:S=>{const T=m(S);if(g)l.done=S>=d;else{let E=S===0?v:0;x<1&&(E=S===0?nt(v):Lp(m,S,T));const k=Math.abs(E)<=r,R=Math.abs(o-T)<=i;l.done=k&&R}return l.value=l.done?o:T,l},toString:()=>{const S=Math.min(nu(w),ys),T=Dp(E=>w.next(S*E).value,S,30);return S+"ms "+T},toTransition:()=>{}};return w}vs.applyToOptions=e=>{const t=Y0(e,100,vs);return e.ease=t.ease,e.duration=nt(t.duration),e.type="keyframes",e};function Ml({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:l,max:a,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},g=k=>l!==void 0&&ka,v=k=>l===void 0?a:a===void 0||Math.abs(l-k)-x*Math.exp(-k/r),m=k=>p+h(k),w=k=>{const R=h(k),D=m(k);f.done=Math.abs(R)<=u,f.value=f.done?p:D};let S,T;const E=k=>{g(f.value)&&(S=k,T=vs({keyframes:[f.value,v(f.value)],velocity:Lp(m,k,f.value),damping:i,stiffness:s,restDelta:u,restSpeed:c}))};return E(0),{calculatedDuration:null,next:k=>{let R=!1;return!T&&S===void 0&&(R=!0,w(k),E(k)),S!==void 0&&k>=S?T.next(k-S):(!R&&w(k),f)}}}function nv(e,t,n){const r=[],i=n||pt.mix||Mp,s=e.length-1;for(let o=0;ot[0];if(s===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=nv(t,r,i),a=l.length,u=c=>{if(o&&c1)for(;du(ht(e[0],e[s-1],c)):u}function iv(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Hr(0,t,r);e.push(K(n,1,i))}}function sv(e){const t=[0];return iv(t,e.length-1),t}function ov(e,t){return e.map(n=>n*t)}function lv(e,t){return e.map(()=>t||xp).splice(0,e.length-1)}function Cr({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=v0(r)?r.map(Lc):Lc(r),s={done:!1,value:t[0]},o=ov(n&&n.length===t.length?n:sv(t),e),l=rv(o,t,{ease:Array.isArray(i)?i:lv(t,i)});return{calculatedDuration:e,next:a=>(s.value=l(a),s.done=a>=e,s)}}const av=e=>e!==null;function ru(e,{repeat:t,repeatType:n="loop"},r,i=1){const s=e.filter(av),l=i<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!l||r===void 0?s[l]:r}const uv={decay:Ml,inertia:Ml,tween:Cr,keyframes:Cr,spring:vs};function Ap(e){typeof e.type=="string"&&(e.type=uv[e.type])}class iu{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const cv=e=>e/100;class su extends iu{constructor(t){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!==Te.now()&&this.tick(Te.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Ap(t);const{type:n=Cr,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:l}=t;const a=n||Cr;a!==Cr&&typeof l[0]!="number"&&(this.mixKeyframes=ti(cv,Mp(l[0],l[1])),l=[0,100]);const u=a({...t,keyframes:l});s==="mirror"&&(this.mirroredGenerator=a({...t,keyframes:[...l].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=nu(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:l,calculatedDuration:a}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:g,type:v,onUpdate:x,finalKeyframe:P}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const p=this.currentTime-u*(this.playbackSpeed>=0?1:-1),h=this.playbackSpeed>=0?p<0:p>i;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let m=this.currentTime,w=r;if(d){const k=Math.min(this.currentTime,i)/l;let R=Math.floor(k),D=k%1;!D&&k>=1&&(D=1),D===1&&R--,R=Math.min(R,d+1),!!(R%2)&&(f==="reverse"?(D=1-D,g&&(D-=g/l)):f==="mirror"&&(w=o)),m=ht(0,1,D)*l}const S=h?{done:!1,value:c[0]}:w.next(m);s&&(S.value=s(S.value));let{done:T}=S;!h&&a!==null&&(T=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return E&&v!==Ml&&(S.value=ru(c,this.options,P,this.speed)),x&&x(S.value),E&&this.finish(),S}then(t,n){return this.finished.then(t,n)}get duration(){return Fe(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Fe(t)}get time(){return Fe(this.currentTime)}set time(t){var n;t=nt(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Te.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Fe(this.currentTime))}play(){var i,s;if(this.isStopped)return;const{driver:t=Q0,startTime:n}=this.options;this.driver||(this.driver=t(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??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(Te.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function fv(e){for(let t=1;te*180/Math.PI,Dl=e=>{const t=bt(Math.atan2(e[1],e[0]));return Ll(t)},dv={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Dl,rotateZ:Dl,skewX:e=>bt(Math.atan(e[1])),skewY:e=>bt(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Ll=e=>(e=e%360,e<0&&(e+=360),e),Fc=Dl,Oc=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),zc=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),hv={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Oc,scaleY:zc,scale:e=>(Oc(e)+zc(e))/2,rotateX:e=>Ll(bt(Math.atan2(e[6],e[5]))),rotateY:e=>Ll(bt(Math.atan2(-e[2],e[0]))),rotateZ:Fc,rotate:Fc,skewX:e=>bt(Math.atan(e[4])),skewY:e=>bt(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Al(e){return e.includes("scale")?1:0}function Vl(e,t){if(!e||e==="none")return Al(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=hv,i=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=dv,i=l}if(!i)return Al(t);const s=r[t],o=i[1].split(",").map(mv);return typeof s=="function"?s(o):o[s]}const pv=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Vl(n,t)};function mv(e){return parseFloat(e.trim())}const Zn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],qn=new Set(Zn),Bc=e=>e===Xn||e===A,gv=new Set(["x","y","z"]),yv=Zn.filter(e=>!gv.has(e));function vv(e){const t=[];return yv.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const nn={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Vl(t,"x"),y:(e,{transform:t})=>Vl(t,"y")};nn.translateX=nn.x;nn.translateY=nn.y;const rn=new Set;let Rl=!1,_l=!1,Il=!1;function Vp(){if(_l){const e=Array.from(rn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=vv(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var l;(l=r.getValue(s))==null||l.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}_l=!1,Rl=!1,rn.forEach(e=>e.complete(Il)),rn.clear()}function Rp(){rn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(_l=!0)})}function xv(){Il=!0,Rp(),Vp(),Il=!1}class ou{constructor(t,n,r,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(rn.add(this),Rl||(Rl=!0,W.read(Rp),W.resolveKeyframes(Vp))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const s=i==null?void 0:i.get(),o=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const l=r.readValue(n,o);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=o),i&&s===void 0&&i.set(t[0])}fv(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),rn.delete(this)}cancel(){this.state==="scheduled"&&(rn.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const wv=e=>e.startsWith("--");function Sv(e,t,n){wv(t)?e.style.setProperty(t,n):e.style[t]=n}const kv=Qa(()=>window.ScrollTimeline!==void 0),Tv={};function Cv(e,t){const n=Qa(e);return()=>Tv[t]??n()}const _p=Cv(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),hr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Uc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:hr([0,.65,.55,1]),circOut:hr([.55,0,1,.45]),backIn:hr([.31,.01,.66,-.59]),backOut:hr([.33,1.53,.69,.99])};function Ip(e,t){if(e)return typeof e=="function"?_p()?Dp(e,t):"ease-out":wp(e)?hr(e):Array.isArray(e)?e.map(n=>Ip(n,t)||Uc.easeOut):Uc[e]}function Pv(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:l="easeOut",times:a}={},u=void 0){const c={[t]:n};a&&(c.offset=a);const d=Ip(l,i);Array.isArray(d)&&(c.easing=d);const f={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(c,f)}function Fp(e){return typeof e=="function"&&"applyToOptions"in e}function Ev({type:e,...t}){return Fp(e)&&_p()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Nv extends iu{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:l,onComplete:a}=t;this.isPseudoElement=!!s,this.allowFlatten=o,this.options=t,Ga(typeof t.type!="string");const u=Ev(t);this.animation=Pv(n,r,i,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const c=ru(i,this.options,l,this.speed);this.updateMotionValue?this.updateMotionValue(c):Sv(n,r,c),this.animation.cancel()}a==null||a(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Fe(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Fe(t)}get time(){return Fe(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=nt(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&kv()?(this.animation.timeline=t,ze):n(this)}}const Op={anticipate:gp,backInOut:mp,circInOut:vp};function jv(e){return e in Op}function Mv(e){typeof e.ease=="string"&&jv(e.ease)&&(e.ease=Op[e.ease])}const Wc=10;class Dv extends Nv{constructor(t){Mv(t),Ap(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:s,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new su({...o,autoplay:!1}),a=nt(this.finishedTime??this.time);n.setWithVelocity(l.sample(a-Wc).value,l.sample(a).value,Wc),l.stop()}}const $c=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ft.test(e)||e==="0")&&!e.startsWith("url("));function Lv(e){const t=e[0];if(e.length===1)return!0;for(let n=0;nObject.hasOwnProperty.call(Element.prototype,"animate"));function _v(e){var c;const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:s,type:o}=e;if(!(((c=t==null?void 0:t.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:u}=t.owner.getProps();return Rv()&&n&&Vv.has(n)&&(n!=="transform"||!u)&&!a&&!r&&i!=="mirror"&&s!==0&&o!=="inertia"}const Iv=40;class Fv extends iu{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:l,name:a,motionValue:u,element:c,...d}){var v;super(),this.stop=()=>{var x,P;this._animation&&(this._animation.stop(),(x=this.stopTimeline)==null||x.call(this)),(P=this.keyframeResolver)==null||P.cancel()},this.createdAt=Te.now();const f={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,name:a,motionValue:u,element:c,...d},g=(c==null?void 0:c.KeyframeResolver)||ou;this.keyframeResolver=new g(l,(x,P,p)=>this.onKeyframesResolved(x,P,f,!p),a,u,c),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(t,n,r,i){this.keyframeResolver=void 0;const{name:s,type:o,velocity:l,delay:a,isHandoff:u,onUpdate:c}=r;this.resolvedAt=Te.now(),Av(t,s,o,l)||((pt.instantAnimations||!a)&&(c==null||c(ru(t,r,n))),t[0]=t[t.length-1],Fl(r),r.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Iv?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},g=!u&&_v(f)?new Dv({...f,element:f.motionValue.owner.current}):new su(f);g.finished.then(()=>this.notifyFinished()).catch(ze),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),xv()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const Ov=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function zv(e){const t=Ov.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function zp(e,t,n=1){const[r,i]=zv(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return lp(o)?parseFloat(o):o}return Ja(i)?zp(i,t,n+1):i}function lu(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Bp=new Set(["width","height","top","left","right","bottom",...Zn]),Bv={test:e=>e==="auto",parse:e=>e},Up=e=>t=>t.test(e),Wp=[Xn,A,rt,vt,L0,D0,Bv],Hc=e=>Wp.find(Up(e));function Uv(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||up(e):!0}const Wv=new Set(["brightness","contrast","saturate","opacity"]);function $v(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ba)||[];if(!r)return e;const i=n.replace(r,"");let s=Wv.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const Hv=/\b([a-z-]*)\(.*?\)/gu,Ol={...Ft,getAnimatableNone:e=>{const t=e.match(Hv);return t?t.map($v).join(" "):e}},Kc={...Xn,transform:Math.round},Kv={rotate:vt,rotateX:vt,rotateY:vt,rotateZ:vt,scale:Ni,scaleX:Ni,scaleY:Ni,scaleZ:Ni,skew:vt,skewX:vt,skewY:vt,distance:A,translateX:A,translateY:A,translateZ:A,x:A,y:A,z:A,perspective:A,transformPerspective:A,opacity:Kr,originX:Ac,originY:Ac,originZ:A},au={borderWidth:A,borderTopWidth:A,borderRightWidth:A,borderBottomWidth:A,borderLeftWidth:A,borderRadius:A,radius:A,borderTopLeftRadius:A,borderTopRightRadius:A,borderBottomRightRadius:A,borderBottomLeftRadius:A,width:A,maxWidth:A,height:A,maxHeight:A,top:A,right:A,bottom:A,left:A,padding:A,paddingTop:A,paddingRight:A,paddingBottom:A,paddingLeft:A,margin:A,marginTop:A,marginRight:A,marginBottom:A,marginLeft:A,backgroundPositionX:A,backgroundPositionY:A,...Kv,zIndex:Kc,fillOpacity:Kr,strokeOpacity:Kr,numOctaves:Kc},Gv={...au,color:b,backgroundColor:b,outlineColor:b,fill:b,stroke:b,borderColor:b,borderTopColor:b,borderRightColor:b,borderBottomColor:b,borderLeftColor:b,filter:Ol,WebkitFilter:Ol},$p=e=>Gv[e];function Hp(e,t){let n=$p(e);return n!==Ol&&(n=Ft),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Qv=new Set(["auto","none","0"]);function Yv(e,t,n){let r=0,i;for(;r{t.getValue(a).set(u)}),this.resolveNoneKeyframes()}}function Zv(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const i=(n==null?void 0:n[e])??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const Kp=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Gp(e){return ap(e)&&"offsetHeight"in e}const Gc=30,qv=e=>!isNaN(parseFloat(e));class Jv{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;const i=Te.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(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Te.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=qv(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Ya);const r=this.events[t].add(n);return t==="change"?()=>{r(),W.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Te.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Gc)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Gc);return cp(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(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 t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Hn(e,t){return new Jv(e,t)}const{schedule:uu}=Sp(queueMicrotask,!1),He={x:!1,y:!1};function Qp(){return He.x||He.y}function bv(e){return e==="x"||e==="y"?He[e]?null:(He[e]=!0,()=>{He[e]=!1}):He.x||He.y?null:(He.x=He.y=!0,()=>{He.x=He.y=!1})}function Yp(e,t){const n=Zv(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function Qc(e){return!(e.pointerType==="touch"||Qp())}function e1(e,t,n={}){const[r,i,s]=Yp(e,n),o=l=>{if(!Qc(l))return;const{target:a}=l,u=t(a,l);if(typeof u!="function"||!a)return;const c=d=>{Qc(d)&&(u(d),a.removeEventListener("pointerleave",c))};a.addEventListener("pointerleave",c,i)};return r.forEach(l=>{l.addEventListener("pointerenter",o,i)}),s}const Xp=(e,t)=>t?e===t?!0:Xp(e,t.parentElement):!1,cu=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,t1=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function n1(e){return t1.has(e.tagName)||e.tabIndex!==-1}const $i=new WeakSet;function Yc(e){return t=>{t.key==="Enter"&&e(t)}}function ko(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const r1=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Yc(()=>{if($i.has(n))return;ko(n,"down");const i=Yc(()=>{ko(n,"up")}),s=()=>ko(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Xc(e){return cu(e)&&!Qp()}function i1(e,t,n={}){const[r,i,s]=Yp(e,n),o=l=>{const a=l.currentTarget;if(!Xc(l))return;$i.add(a);const u=t(a,l),c=(g,v)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),$i.has(a)&&$i.delete(a),Xc(g)&&typeof u=="function"&&u(g,{success:v})},d=g=>{c(g,a===window||a===document||n.useGlobalTarget||Xp(a,g.target))},f=g=>{c(g,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",f,i)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",o,i),Gp(l)&&(l.addEventListener("focus",u=>r1(u,i)),!n1(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),s}function Zp(e){return ap(e)&&"ownerSVGElement"in e}function s1(e){return Zp(e)&&e.tagName==="svg"}const pe=e=>!!(e&&e.getVelocity),o1=[...Wp,b,Ft],l1=e=>o1.find(Up(e)),fu=j.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Zc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function a1(...e){return t=>{let n=!1;const r=e.map(i=>{const s=Zc(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i{const{width:u,height:c,top:d,left:f,right:g}=o.current;if(t||!s.current||!u||!c)return;const v=n==="left"?`left: ${f}`:`right: ${g}`;s.current.dataset.motionPopId=i;const x=document.createElement("style");l&&(x.nonce=l);const P=r??document.head;return P.appendChild(x),x.sheet&&x.sheet.insertRule(` + [data-motion-pop-id="${i}"] { + position: absolute !important; + width: ${u}px !important; + height: ${c}px !important; + ${v}px !important; + top: ${d}px !important; + } + `),()=>{P.contains(x)&&P.removeChild(x)}},[t]),y.jsx(c1,{isPresent:t,childRef:s,sizeRef:o,children:j.cloneElement(e,{ref:a})})}const d1=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:l,root:a})=>{const u=Wa(h1),c=j.useId();let d=!0,f=j.useMemo(()=>(d=!1,{id:c,initial:t,isPresent:n,custom:i,onExitComplete:g=>{u.set(g,!0);for(const v of u.values())if(!v)return;r&&r()},register:g=>(u.set(g,!1),()=>u.delete(g))}),[n,u,r]);return s&&d&&(f={...f}),j.useMemo(()=>{u.forEach((g,v)=>u.set(v,!1))},[n]),j.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),o==="popLayout"&&(e=y.jsx(f1,{isPresent:n,anchorX:l,root:a,children:e})),y.jsx(Os.Provider,{value:f,children:e})};function h1(){return new Map}function qp(e=!0){const t=j.useContext(Os);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=j.useId();j.useEffect(()=>{if(e)return i(s)},[e]);const o=j.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const ji=e=>e.key||"";function qc(e){const t=[];return j.Children.forEach(e,n=>{j.isValidElement(n)&&t.push(n)}),t}const p1=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:l="left",root:a})=>{const[u,c]=qp(o),d=j.useMemo(()=>qc(e),[e]),f=o&&!u?[]:d.map(ji),g=j.useRef(!0),v=j.useRef(d),x=Wa(()=>new Map),[P,p]=j.useState(d),[h,m]=j.useState(d);op(()=>{g.current=!1,v.current=d;for(let T=0;T{const E=ji(T),k=o&&!u?!1:d===h||f.includes(E),R=()=>{if(x.has(E))x.set(E,!0);else return;let D=!0;x.forEach(J=>{J||(D=!1)}),D&&(S==null||S(),m(v.current),o&&(c==null||c()),r&&r())};return y.jsx(d1,{isPresent:k,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,root:a,onExitComplete:k?void 0:R,anchorX:l,children:T},E)})})},Jp=j.createContext({strict:!1}),Jc={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"]},Kn={};for(const e in Jc)Kn[e]={isEnabled:t=>Jc[e].some(n=>!!t[n])};function m1(e){for(const t in e)Kn[t]={...Kn[t],...e[t]}}const g1=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 xs(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||g1.has(e)}let bp=e=>!xs(e);function y1(e){typeof e=="function"&&(bp=t=>t.startsWith("on")?!xs(t):e(t))}try{y1(require("@emotion/is-prop-valid").default)}catch{}function v1(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(bp(i)||n===!0&&xs(i)||!t&&!xs(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const zs=j.createContext({});function Bs(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Qr(e){return typeof e=="string"||Array.isArray(e)}const du=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],hu=["initial",...du];function Us(e){return Bs(e.animate)||hu.some(t=>Qr(e[t]))}function em(e){return!!(Us(e)||e.variants)}function x1(e,t){if(Us(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Qr(n)?n:void 0,animate:Qr(r)?r:void 0}}return e.inherit!==!1?t:{}}function w1(e){const{initial:t,animate:n}=x1(e,j.useContext(zs));return j.useMemo(()=>({initial:t,animate:n}),[bc(t),bc(n)])}function bc(e){return Array.isArray(e)?e.join(" "):e}const Yr={};function S1(e){for(const t in e)Yr[t]=e[t],qa(t)&&(Yr[t].isCSSVariable=!0)}function tm(e,{layout:t,layoutId:n}){return qn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Yr[e]||e==="opacity")}const k1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},T1=Zn.length;function C1(e,t,n){let r="",i=!0;for(let s=0;s({style:{},transform:{},transformOrigin:{},vars:{}});function nm(e,t,n){for(const r in t)!pe(t[r])&&!tm(r,n)&&(e[r]=t[r])}function P1({transformTemplate:e},t){return j.useMemo(()=>{const n=mu();return pu(n,t,e),Object.assign({},n.vars,n.style)},[t])}function E1(e,t){const n=e.style||{},r={};return nm(r,n,e),Object.assign(r,P1(e,t)),r}function N1(e,t){const n={},r=E1(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const j1={offset:"stroke-dashoffset",array:"stroke-dasharray"},M1={offset:"strokeDashoffset",array:"strokeDasharray"};function D1(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?j1:M1;e[s.offset]=A.transform(-r);const o=A.transform(t),l=A.transform(n);e[s.array]=`${o} ${l}`}function rm(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:o=0,...l},a,u,c){if(pu(e,l,u),a){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&D1(d,i,s,o,!1)}const im=()=>({...mu(),attrs:{}}),sm=e=>typeof e=="string"&&e.toLowerCase()==="svg";function L1(e,t,n,r){const i=j.useMemo(()=>{const s=im();return rm(s,t,sm(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};nm(s,e.style,e),i.style={...s,...i.style}}return i}const A1=["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 gu(e){return typeof e!="string"||e.includes("-")?!1:!!(A1.indexOf(e)>-1||/[A-Z]/u.test(e))}function V1(e,t,n,{latestValues:r},i,s=!1){const l=(gu(e)?L1:N1)(t,r,i,e),a=v1(t,typeof e=="string",s),u=e!==j.Fragment?{...a,...l,ref:n}:{},{children:c}=t,d=j.useMemo(()=>pe(c)?c.get():c,[c]);return j.createElement(e,{...u,children:d})}function ef(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function yu(e,t,n,r){if(typeof t=="function"){const[i,s]=ef(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=ef(r);t=t(n!==void 0?n:e.custom,i,s)}return t}function Hi(e){return pe(e)?e.get():e}function R1({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:_1(n,r,i,e),renderState:t()}}function _1(e,t,n,r){const i={},s=r(e,{});for(const f in s)i[f]=Hi(s[f]);let{initial:o,animate:l}=e;const a=Us(e),u=em(e);t&&u&&!a&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const d=c?l:o;if(d&&typeof d!="boolean"&&!Bs(d)){const f=Array.isArray(d)?d:[d];for(let g=0;g(t,n)=>{const r=j.useContext(zs),i=j.useContext(Os),s=()=>R1(e,t,r,i);return n?s():Wa(s)};function vu(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(pe(r[o])||t.style&&pe(t.style[o])||tm(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const I1=om({scrapeMotionValuesFromProps:vu,createRenderState:mu});function lm(e,t,n){const r=vu(e,t,n);for(const i in e)if(pe(e[i])||pe(t[i])){const s=Zn.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const F1=om({scrapeMotionValuesFromProps:lm,createRenderState:im}),O1=Symbol.for("motionComponentSymbol");function En(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function z1(e,t,n){return j.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):En(n)&&(n.current=r))},[t])}const xu=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),B1="framerAppearId",am="data-"+xu(B1),um=j.createContext({});function U1(e,t,n,r,i){var x,P;const{visualElement:s}=j.useContext(zs),o=j.useContext(Jp),l=j.useContext(Os),a=j.useContext(fu).reducedMotion,u=j.useRef(null);r=r||o.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:a}));const c=u.current,d=j.useContext(um);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&W1(u.current,n,i,d);const f=j.useRef(!1);j.useInsertionEffect(()=>{c&&f.current&&c.update(n,l)});const g=n[am],v=j.useRef(!!g&&!((x=window.MotionHandoffIsComplete)!=null&&x.call(window,g))&&((P=window.MotionHasOptimisedAnimation)==null?void 0:P.call(window,g)));return op(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),v.current&&c.animationState&&c.animationState.animateChanges())}),j.useEffect(()=>{c&&(!v.current&&c.animationState&&c.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var p;(p=window.MotionHandoffMarkAsComplete)==null||p.call(window,g)}),v.current=!1),c.enteringChildren=void 0)}),c}function W1(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:l,layoutScroll:a,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:cm(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||l&&En(l),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:a,layoutRoot:u})}function cm(e){if(e)return e.options.allowProjection!==!1?e.projection:cm(e.parent)}function To(e,{forwardMotionProps:t=!1}={},n,r){n&&m1(n);const i=gu(e)?F1:I1;function s(l,a){let u;const c={...j.useContext(fu),...l,layoutId:$1(l)},{isStatic:d}=c,f=w1(l),g=i(l,d);if(!d&&$a){H1();const v=K1(c);u=v.MeasureLayout,f.visualElement=U1(e,g,c,r,v.ProjectionNode)}return y.jsxs(zs.Provider,{value:f,children:[u&&f.visualElement?y.jsx(u,{visualElement:f.visualElement,...c}):null,V1(e,l,z1(g,f.visualElement,a),g,d,t)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const o=j.forwardRef(s);return o[O1]=e,o}function $1({layoutId:e}){const t=j.useContext(Ua).id;return t&&e!==void 0?t+"-"+e:e}function H1(e,t){j.useContext(Jp).strict}function K1(e){const{drag:t,layout:n}=Kn;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function G1(e,t){if(typeof Proxy>"u")return To;const n=new Map,r=(s,o)=>To(s,o,e,t),i=(s,o)=>r(s,o);return new Proxy(i,{get:(s,o)=>o==="create"?r:(n.has(o)||n.set(o,To(o,void 0,e,t)),n.get(o))})}function fm({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Q1({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Y1(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Co(e){return e===void 0||e===1}function zl({scale:e,scaleX:t,scaleY:n}){return!Co(e)||!Co(t)||!Co(n)}function Yt(e){return zl(e)||dm(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function dm(e){return tf(e.x)||tf(e.y)}function tf(e){return e&&e!=="0%"}function ws(e,t,n){const r=e-n,i=t*r;return n+i}function nf(e,t,n,r,i){return i!==void 0&&(e=ws(e,i,r)),ws(e,n,r)+t}function Bl(e,t=0,n=1,r,i){e.min=nf(e.min,t,n,r,i),e.max=nf(e.max,t,n,r,i)}function hm(e,{x:t,y:n}){Bl(e.x,t.translate,t.scale,t.originPoint),Bl(e.y,n.translate,n.scale,n.originPoint)}const rf=.999999999999,sf=1.0000000000001;function X1(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let l=0;lrf&&(t.x=1),t.yrf&&(t.y=1)}function Nn(e,t){e.min=e.min+t,e.max=e.max+t}function of(e,t,n,r,i=.5){const s=K(e.min,e.max,i);Bl(e,t,n,s,r)}function jn(e,t){of(e.x,t.x,t.scaleX,t.scale,t.originX),of(e.y,t.y,t.scaleY,t.scale,t.originY)}function pm(e,t){return fm(Y1(e.getBoundingClientRect(),t))}function Z1(e,t,n){const r=pm(e,n),{scroll:i}=t;return i&&(Nn(r.x,i.offset.x),Nn(r.y,i.offset.y)),r}const lf=()=>({translate:0,scale:1,origin:0,originPoint:0}),Mn=()=>({x:lf(),y:lf()}),af=()=>({min:0,max:0}),te=()=>({x:af(),y:af()}),Ul={current:null},mm={current:!1};function q1(){if(mm.current=!0,!!$a)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ul.current=e.matches;e.addEventListener("change",t),t()}else Ul.current=!1}const J1=new WeakMap;function b1(e,t,n){for(const r in t){const i=t[r],s=n[r];if(pe(i))e.addValue(r,i);else if(pe(s))e.addValue(r,Hn(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,Hn(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const uf=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ex{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ou,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 f=Te.now();this.renderScheduledAtthis.bindToMotionValue(i,r)),mm.current||q1(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ul.current,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),It(this.notifyUpdate),It(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.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(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=qn.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&W.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Kn){const n=Kn[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];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):te()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Hn(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(lp(r)||up(r))?r=parseFloat(r):!l1(r)&&Ft.test(n)&&(r=Hp(t,n)),this.setBaseTarget(t,pe(r)?r.get():r)),pe(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=yu(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!pe(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Ya),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){uu.render(this.render)}}class gm extends ex{constructor(){super(...arguments),this.KeyframeResolver=Xv}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;pe(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function ym(e,{style:t,vars:n},r,i){const s=e.style;let o;for(o in t)s[o]=t[o];i==null||i.applyProjectionStyles(s,r);for(o in n)s.setProperty(o,n[o])}function tx(e){return window.getComputedStyle(e)}class nx extends gm{constructor(){super(...arguments),this.type="html",this.renderInstance=ym}readValueFromInstance(t,n){var r;if(qn.has(n))return(r=this.projection)!=null&&r.isProjecting?Al(n):pv(t,n);{const i=tx(t),s=(qa(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return pm(t,n)}build(t,n,r){pu(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return vu(t,n,r)}}const vm=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 rx(e,t,n,r){ym(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(vm.has(i)?i:xu(i),t.attrs[i])}class ix extends gm{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=te}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(qn.has(n)){const r=$p(n);return r&&r.default||0}return n=vm.has(n)?n:xu(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return lm(t,n,r)}build(t,n,r){rm(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){rx(t,n,r,i)}mount(t){this.isSVGTag=sm(t.tagName),super.mount(t)}}const sx=(e,t)=>gu(e)?new ix(t):new nx(t,{allowProjection:e!==j.Fragment});function In(e,t,n){const r=e.getProps();return yu(r,t,n!==void 0?n:r.custom,e)}const Wl=e=>Array.isArray(e);function ox(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Hn(n))}function lx(e){return Wl(e)?e[e.length-1]||0:e}function ax(e,t){const n=In(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const l=lx(s[o]);ox(e,o,l)}}function ux(e){return!!(pe(e)&&e.add)}function $l(e,t){const n=e.getValue("willChange");if(ux(n))return n.add(t);if(!n&&pt.WillChange){const r=new pt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function xm(e){return e.props[am]}const cx=e=>e!==null;function fx(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(cx),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[s]}const dx={type:"spring",stiffness:500,damping:25,restSpeed:10},hx=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),px={type:"keyframes",duration:.8},mx={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},gx=(e,{keyframes:t})=>t.length>2?px:qn.has(e)?e.startsWith("scale")?hx(t[1]):dx:mx;function yx({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:l,from:a,elapsed:u,...c}){return!!Object.keys(c).length}const wu=(e,t,n,r={},i,s)=>o=>{const l=lu(r,e)||{},a=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-nt(a);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:f=>{t.set(f),l.onUpdate&&l.onUpdate(f)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:s?void 0:i};yx(l)||Object.assign(c,gx(e,c)),c.duration&&(c.duration=nt(c.duration)),c.repeatDelay&&(c.repeatDelay=nt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Fl(c),c.delay===0&&(d=!0)),(pt.instantAnimations||pt.skipAnimations)&&(d=!0,Fl(c),c.delay=0),c.allowFlatten=!l.type&&!l.ease,d&&!s&&t.get()!==void 0){const f=fx(c.keyframes,l);if(f!==void 0){W.update(()=>{c.onUpdate(f),c.onComplete()});return}}return l.isSync?new su(c):new Fv(c)};function vx({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function wm(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:o,...l}=t;r&&(s=r);const a=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const c in l){const d=e.getValue(c,e.latestValues[c]??null),f=l[c];if(f===void 0||u&&vx(u,c))continue;const g={delay:n,...lu(s||{},c)},v=d.get();if(v!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===v&&!g.velocity)continue;let x=!1;if(window.MotionHandoffAnimation){const p=xm(e);if(p){const h=window.MotionHandoffAnimation(p,c,W);h!==null&&(g.startTime=h,x=!0)}}$l(e,c),d.start(wu(c,d,f,e.shouldReduceMotion&&Bp.has(c)?{type:!1}:g,e,x));const P=d.animation;P&&a.push(P)}return o&&Promise.all(a).then(()=>{W.update(()=>{o&&ax(e,o)})}),a}function Sm(e,t,n,r=0,i=1){const s=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),o=e.size,l=(o-1)*r;return typeof n=="function"?n(s,o):i===1?s*r:l-s*r}function Hl(e,t,n={}){var a;const r=In(e,t,n.type==="exit"?(a=e.presenceContext)==null?void 0:a.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(wm(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=i;return xx(e,t,u,c,d,f,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[u,c]=l==="beforeChildren"?[s,o]:[o,s];return u().then(()=>c())}else return Promise.all([s(),o(n.delay)])}function xx(e,t,n=0,r=0,i=0,s=1,o){const l=[];for(const a of e.variantChildren)a.notify("AnimationStart",t),l.push(Hl(a,t,{...o,delay:n+(typeof r=="function"?0:r)+Sm(e.variantChildren,a,r,i,s)}).then(()=>a.notify("AnimationComplete",t)));return Promise.all(l)}function wx(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Hl(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Hl(e,t,n);else{const i=typeof t=="function"?In(e,t,n.custom):t;r=Promise.all(wm(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function km(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rPromise.all(t.map(({animation:n,options:r})=>wx(e,n,r)))}function Px(e){let t=Cx(e),n=cf(),r=!0;const i=a=>(u,c)=>{var f;const d=In(e,c,a==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:g,transitionEnd:v,...x}=d;u={...u,...x,...v}}return u};function s(a){t=a(e)}function o(a){const{props:u}=e,c=Tm(e.parent)||{},d=[],f=new Set;let g={},v=1/0;for(let P=0;Pv&&w,R=!1;const D=Array.isArray(m)?m:[m];let J=D.reduce(i(p),{});S===!1&&(J={});const{prevResolvedValues:gt={}}=h,Wt={...gt,...J},bn=Z=>{k=!0,f.has(Z)&&(R=!0,f.delete(Z)),h.needsAnimating[Z]=!0;const N=e.getValue(Z);N&&(N.liveStyle=!1)};for(const Z in Wt){const N=J[Z],L=gt[Z];if(g.hasOwnProperty(Z))continue;let V=!1;Wl(N)&&Wl(L)?V=!km(N,L):V=N!==L,V?N!=null?bn(Z):f.add(Z):N!==void 0&&f.has(Z)?bn(Z):h.protectedKeys[Z]=!0}h.prevProp=m,h.prevResolvedValues=J,h.isActive&&(g={...g,...J}),r&&e.blockInitialAnimation&&(k=!1);const si=T&&E;k&&(!si||R)&&d.push(...D.map(Z=>{const N={type:p};if(typeof Z=="string"&&r&&!si&&e.manuallyAnimateOnMount&&e.parent){const{parent:L}=e,V=In(L,Z);if(L.enteringChildren&&V){const{delayChildren:$}=V.transition||{};N.delay=Sm(L.enteringChildren,e,$)}}return{animation:Z,options:N}}))}if(f.size){const P={};if(typeof u.initial!="boolean"){const p=In(e,Array.isArray(u.initial)?u.initial[0]:u.initial);p&&p.transition&&(P.transition=p.transition)}f.forEach(p=>{const h=e.getBaseTarget(p),m=e.getValue(p);m&&(m.liveStyle=!0),P[p]=h??null}),d.push({animation:P})}let x=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(x=!1),r=!1,x?t(d):Promise.resolve()}function l(a,u){var d;if(n[a].isActive===u)return Promise.resolve();(d=e.variantChildren)==null||d.forEach(f=>{var g;return(g=f.animationState)==null?void 0:g.setActive(a,u)}),n[a].isActive=u;const c=o(a);for(const f in n)n[f].protectedKeys={};return c}return{animateChanges:o,setActive:l,setAnimateFunction:s,getState:()=>n,reset:()=>{n=cf()}}}function Ex(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!km(t,e):!1}function Kt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function cf(){return{animate:Kt(!0),whileInView:Kt(),whileHover:Kt(),whileTap:Kt(),whileDrag:Kt(),whileFocus:Kt(),exit:Kt()}}class Ut{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Nx extends Ut{constructor(t){super(t),t.animationState||(t.animationState=Px(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Bs(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let jx=0;class Mx extends Ut{constructor(){super(...arguments),this.id=jx++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Dx={animation:{Feature:Nx},exit:{Feature:Mx}};function Xr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function ii(e){return{point:{x:e.pageX,y:e.pageY}}}const Lx=e=>t=>cu(t)&&e(t,ii(t));function Pr(e,t,n,r){return Xr(e,t,Lx(n),r)}const Cm=1e-4,Ax=1-Cm,Vx=1+Cm,Pm=.01,Rx=0-Pm,_x=0+Pm;function ye(e){return e.max-e.min}function Ix(e,t,n){return Math.abs(e-t)<=n}function ff(e,t,n,r=.5){e.origin=r,e.originPoint=K(t.min,t.max,e.origin),e.scale=ye(n)/ye(t),e.translate=K(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Ax&&e.scale<=Vx||isNaN(e.scale))&&(e.scale=1),(e.translate>=Rx&&e.translate<=_x||isNaN(e.translate))&&(e.translate=0)}function Er(e,t,n,r){ff(e.x,t.x,n.x,r?r.originX:void 0),ff(e.y,t.y,n.y,r?r.originY:void 0)}function df(e,t,n){e.min=n.min+t.min,e.max=e.min+ye(t)}function Fx(e,t,n){df(e.x,t.x,n.x),df(e.y,t.y,n.y)}function hf(e,t,n){e.min=t.min-n.min,e.max=e.min+ye(t)}function Ss(e,t,n){hf(e.x,t.x,n.x),hf(e.y,t.y,n.y)}function Ve(e){return[e("x"),e("y")]}const Em=({current:e})=>e?e.ownerDocument.defaultView:null,pf=(e,t)=>Math.abs(e-t);function Ox(e,t){const n=pf(e.x,t.x),r=pf(e.y,t.y);return Math.sqrt(n**2+r**2)}class Nm{constructor(t,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 f=Eo(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,v=Ox(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!v)return;const{point:x}=f,{timestamp:P}=ae;this.history.push({...x,timestamp:P});const{onStart:p,onMove:h}=this.handlers;g||(p&&p(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),h&&h(this.lastMoveEvent,f)},this.handlePointerMove=(f,g)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Po(g,this.transformPagePoint),W.update(this.updatePoint,!0)},this.handlePointerUp=(f,g)=>{this.end();const{onEnd:v,onSessionEnd:x,resumeAnimation:P}=this.handlers;if(this.dragSnapToOrigin&&P&&P(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Eo(f.type==="pointercancel"?this.lastMoveEventInfo:Po(g,this.transformPagePoint),this.history);this.startEvent&&v&&v(f,p),x&&x(f,p)},!cu(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const l=ii(t),a=Po(l,this.transformPagePoint),{point:u}=a,{timestamp:c}=ae;this.history=[{...u,timestamp:c}];const{onSessionStart:d}=n;d&&d(t,Eo(a,this.history)),this.removeListeners=ti(Pr(this.contextWindow,"pointermove",this.handlePointerMove),Pr(this.contextWindow,"pointerup",this.handlePointerUp),Pr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),It(this.updatePoint)}}function Po(e,t){return t?{point:t(e.point)}:e}function mf(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Eo({point:e},t){return{point:e,delta:mf(e,jm(t)),offset:mf(e,zx(t)),velocity:Bx(t,.1)}}function zx(e){return e[0]}function jm(e){return e[e.length-1]}function Bx(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=jm(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>nt(t)));)n--;if(!r)return{x:0,y:0};const s=Fe(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 Ux(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?K(n,e,r.max):Math.min(e,n)),e}function gf(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Wx(e,{top:t,left:n,bottom:r,right:i}){return{x:gf(e.x,n,i),y:gf(e.y,t,r)}}function yf(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Hr(t.min,t.max-r,e.min):r>i&&(n=Hr(e.min,e.max-i,t.min)),ht(0,1,n)}function Kx(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Kl=.35;function Gx(e=Kl){return e===!1?e=0:e===!0&&(e=Kl),{x:vf(e,"left","right"),y:vf(e,"top","bottom")}}function vf(e,t,n){return{min:xf(e,t),max:xf(e,n)}}function xf(e,t){return typeof e=="number"?e:e[t]||0}const Qx=new WeakMap;class Yx{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=te(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const s=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ii(d).point)},o=(d,f)=>{const{drag:g,dragPropagation:v,onDragStart:x}=this.getProps();if(g&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=bv(g),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ve(p=>{let h=this.getAxisMotionValue(p).get()||0;if(rt.test(h)){const{projection:m}=this.visualElement;if(m&&m.layout){const w=m.layout.layoutBox[p];w&&(h=ye(w)*(parseFloat(h)/100))}}this.originPoint[p]=h}),x&&W.postRender(()=>x(d,f)),$l(this.visualElement,"transform");const{animationState:P}=this.visualElement;P&&P.setActive("whileDrag",!0)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:g,dragDirectionLock:v,onDirectionLock:x,onDrag:P}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:p}=f;if(v&&this.currentDirection===null){this.currentDirection=Xx(p),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",f.point,p),this.updateAxis("y",f.point,p),this.visualElement.render(),P&&P(d,f)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>Ve(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)==null?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Nm(t,{onSessionStart:s,onStart:o,onMove:l,onSessionEnd:a,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:Em(this.visualElement)})}stop(t,n){const r=t||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:l}=this.getProps();l&&W.postRender(()=>l(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.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(t,n,r){const{drag:i}=this.getProps();if(!r||!Mi(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=Ux(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:t,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;t&&En(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Wx(r.layoutBox,t):this.constraints=!1,this.elastic=Gx(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ve(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Kx(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!En(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=Z1(r,i.root,this.visualElement.getTransformPagePoint());let o=$x(i.layout.layoutBox,s);if(n){const l=n(Q1(o));this.hasMutatedConstraints=!!l,l&&(o=fm(l))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),a=this.constraints||{},u=Ve(c=>{if(!Mi(c,n,this.currentDirection))return;let d=a&&a[c]||{};o&&(d={min:0,max:0});const f=i?200:1e6,g=i?40:1e7,v={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(c,v)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return $l(this.visualElement,t),r.start(wu(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ve(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ve(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ve(n=>{const{drag:r}=this.getProps();if(!Mi(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:l}=i.layout.layoutBox[n];s.set(t[n]-K(o,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!En(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ve(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const a=l.get();i[o]=Hx({min:a,max:a},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(),Ve(o=>{if(!Mi(o,t,null))return;const l=this.getAxisMotionValue(o),{min:a,max:u}=this.constraints[o];l.set(K(a,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;Qx.set(this.visualElement,this);const t=this.visualElement.current,n=Pr(t,"pointerdown",a=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(a)}),r=()=>{const{dragConstraints:a}=this.getProps();En(a)&&a.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),W.read(r);const o=Xr(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:a,hasLayoutChanged:u})=>{this.isDragging&&u&&(Ve(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=a[c].translate,d.set(d.get()+a[c].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Kl,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:l}}}function Mi(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Xx(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Zx extends Ut{constructor(t){super(t),this.removeGroupControls=ze,this.removeListeners=ze,this.controls=new Yx(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ze}unmount(){this.removeGroupControls(),this.removeListeners()}}const wf=e=>(t,n)=>{e&&W.postRender(()=>e(t,n))};class qx extends Ut{constructor(){super(...arguments),this.removePointerDownListener=ze}onPointerDown(t){this.session=new Nm(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Em(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:wf(t),onStart:wf(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&W.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=Pr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Ki={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Sf(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ar={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(A.test(e))e=parseFloat(e);else return e;const n=Sf(e,t.target.x),r=Sf(e,t.target.y);return`${n}% ${r}%`}},Jx={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Ft.parse(e);if(i.length>5)return r;const s=Ft.createTransformer(e),o=typeof i[0]!="number"?1:0,l=n.x.scale*t.x,a=n.y.scale*t.y;i[0+o]/=l,i[1+o]/=a;const u=K(l,a,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}};let No=!1;class bx extends j.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;S1(ew),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),No&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Ki.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,{projection:o}=r;return o&&(o.isPresent=s,No=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||W.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),uu.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;No=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Mm(e){const[t,n]=qp(),r=j.useContext(Ua);return y.jsx(bx,{...e,layoutGroup:r,switchLayoutGroup:j.useContext(um),isPresent:t,safeToRemove:n})}const ew={borderRadius:{...ar,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ar,borderTopRightRadius:ar,borderBottomLeftRadius:ar,borderBottomRightRadius:ar,boxShadow:Jx};function tw(e,t,n){const r=pe(e)?e:Hn(e);return r.start(wu("",r,t,n)),r.animation}const nw=(e,t)=>e.depth-t.depth;class rw{constructor(){this.children=[],this.isDirty=!1}add(t){Ha(this.children,t),this.isDirty=!0}remove(t){Ka(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(nw),this.isDirty=!1,this.children.forEach(t)}}function iw(e,t){const n=Te.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(It(r),e(s-t))};return W.setup(r,!0),()=>It(r)}const Dm=["TopLeft","TopRight","BottomLeft","BottomRight"],sw=Dm.length,kf=e=>typeof e=="string"?parseFloat(e):e,Tf=e=>typeof e=="number"||A.test(e);function ow(e,t,n,r,i,s){i?(e.opacity=K(0,n.opacity??1,lw(r)),e.opacityExit=K(t.opacity??1,0,aw(r))):s&&(e.opacity=K(t.opacity??1,n.opacity??1,r));for(let o=0;ort?1:n(Hr(e,t,r))}function Pf(e,t){e.min=t.min,e.max=t.max}function $e(e,t){Pf(e.x,t.x),Pf(e.y,t.y)}function Ef(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Nf(e,t,n,r,i){return e-=t,e=ws(e,1/n,r),i!==void 0&&(e=ws(e,1/i,r)),e}function uw(e,t=0,n=1,r=.5,i,s=e,o=e){if(rt.test(t)&&(t=parseFloat(t),t=K(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=K(s.min,s.max,r);e===s&&(l-=t),e.min=Nf(e.min,t,n,l,i),e.max=Nf(e.max,t,n,l,i)}function jf(e,t,[n,r,i],s,o){uw(e,t[n],t[r],t[i],t.scale,s,o)}const cw=["x","scaleX","originX"],fw=["y","scaleY","originY"];function Mf(e,t,n,r){jf(e.x,t,cw,n?n.x:void 0,r?r.x:void 0),jf(e.y,t,fw,n?n.y:void 0,r?r.y:void 0)}function Df(e){return e.translate===0&&e.scale===1}function Am(e){return Df(e.x)&&Df(e.y)}function Lf(e,t){return e.min===t.min&&e.max===t.max}function dw(e,t){return Lf(e.x,t.x)&&Lf(e.y,t.y)}function Af(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Vm(e,t){return Af(e.x,t.x)&&Af(e.y,t.y)}function Vf(e){return ye(e.x)/ye(e.y)}function Rf(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class hw{constructor(){this.members=[]}add(t){Ha(this.members,t),t.scheduleRender()}remove(t){if(Ka(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===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(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function pw(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:g,skewY:v}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),g&&(r+=`skewX(${g}deg) `),v&&(r+=`skewY(${v}deg) `)}const l=e.x.scale*t.x,a=e.y.scale*t.y;return(l!==1||a!==1)&&(r+=`scale(${l}, ${a})`),r||"none"}const jo=["","X","Y","Z"],mw=1e3;let gw=0;function Mo(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Rm(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=xm(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",W,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Rm(r)}function _m({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},l=t==null?void 0:t()){this.id=gw++,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(xw),this.nodes.forEach(Tw),this.nodes.forEach(Cw),this.nodes.forEach(ww)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let a=0;athis.root.updateBlockedByResize=!1;W.read(()=>{d=window.innerWidth}),e(o,()=>{const g=window.innerWidth;g!==d&&(d=g,this.root.updateBlockedByResize=!0,c&&c(),c=iw(f,250),Ki.hasAnimatedSinceResize&&(Ki.hasAnimatedSinceResize=!1,this.nodes.forEach(Ff)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||a)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||u.getDefaultTransition()||Mw,{onLayoutAnimationStart:x,onLayoutAnimationComplete:P}=u.getProps(),p=!this.targetLayout||!Vm(this.targetLayout,g),h=!d&&f;if(this.options.layoutRoot||this.resumeFrom||h||d&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const m={...lu(v,"layout"),onPlay:x,onComplete:P};(u.shouldReduceMotion||this.options.layoutRoot)&&(m.delay=0,m.type=!1),this.startAnimation(m),this.setAnimationOrigin(c,h)}else d||Ff(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}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(),It(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(Pw),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&&Rm(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ye(this.snapshot.measuredBox.x)&&!ye(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 a=0;a{const S=w/1e3;Of(d.x,o.x,S),Of(d.y,o.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ss(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Nw(this.relativeTarget,this.relativeTargetOrigin,f,S),m&&dw(this.relativeTarget,m)&&(this.isProjectionDirty=!1),m||(m=te()),$e(m,this.relativeTarget)),x&&(this.animationValues=c,ow(c,u,this.latestValues,S,h,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var l,a,u;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(u=(a=this.resumingFrom)==null?void 0:a.currentAnimation)==null||u.stop(),this.pendingAnimation&&(It(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=W.update(()=>{Ki.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Hn(0)),this.currentAnimation=tw(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),o.onUpdate&&o.onUpdate(c)},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(mw),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:a,layout:u,latestValues:c}=o;if(!(!l||!a||!u)){if(this!==o&&this.layout&&u&&Im(this.options.animationType,this.layout.layoutBox,u.layoutBox)){a=this.target||te();const d=ye(this.layout.layoutBox.x);a.x.min=o.target.x.min,a.x.max=a.x.min+d;const f=ye(this.layout.layoutBox.y);a.y.min=o.target.y.min,a.y.max=a.y.min+f}$e(l,a),jn(l,c),Er(this.projectionDeltaWithTransform,this.layoutCorrected,l,c)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new hw),this.sharedNodes.get(o).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var l;const{layoutId:o}=this.options;return o?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:o}=this.options;return o?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:l,preserveFollowOpacity:a}={}){const u=this.getStack();u&&u.promote(this,a),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:a}=o;if((a.z||a.rotate||a.rotateX||a.rotateY||a.rotateZ||a.skewX||a.skewY)&&(l=!0),!l)return;const u={};a.z&&Mo("z",o,u,this.animationValues);for(let c=0;c{var l;return(l=o.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(_f),this.root.sharedNodes.clear()}}}function yw(e){e.updateLayout()}function vw(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;s==="size"?Ve(d=>{const f=o?t.measuredBox[d]:t.layoutBox[d],g=ye(f);f.min=r[d].min,f.max=f.min+g}):Im(s,t.layoutBox,r)&&Ve(d=>{const f=o?t.measuredBox[d]:t.layoutBox[d],g=ye(r[d]);f.max=f.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+g)});const l=Mn();Er(l,r,t.layoutBox);const a=Mn();o?Er(a,e.applyTransform(i,!0),t.measuredBox):Er(a,r,t.layoutBox);const u=!Am(l);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:g}=d;if(f&&g){const v=te();Ss(v,t.layoutBox,f.layoutBox);const x=te();Ss(x,r,g.layoutBox),Vm(v,x)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=v,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:a,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function xw(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function ww(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Sw(e){e.clearSnapshot()}function _f(e){e.clearMeasurements()}function If(e){e.isLayoutDirty=!1}function kw(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ff(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Tw(e){e.resolveTargetDelta()}function Cw(e){e.calcProjection()}function Pw(e){e.resetSkewAndRotation()}function Ew(e){e.removeLeadSnapshot()}function Of(e,t,n){e.translate=K(t.translate,0,n),e.scale=K(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function zf(e,t,n,r){e.min=K(t.min,n.min,r),e.max=K(t.max,n.max,r)}function Nw(e,t,n,r){zf(e.x,t.x,n.x,r),zf(e.y,t.y,n.y,r)}function jw(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Mw={duration:.45,ease:[.4,0,.1,1]},Bf=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Uf=Bf("applewebkit/")&&!Bf("chrome/")?Math.round:ze;function Wf(e){e.min=Uf(e.min),e.max=Uf(e.max)}function Dw(e){Wf(e.x),Wf(e.y)}function Im(e,t,n){return e==="position"||e==="preserve-aspect"&&!Ix(Vf(t),Vf(n),.2)}function Lw(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Aw=_m({attachResizeListener:(e,t)=>Xr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Do={current:void 0},Fm=_m({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Do.current){const e=new Aw({});e.mount(window),e.setOptions({layoutScroll:!0}),Do.current=e}return Do.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Vw={pan:{Feature:qx},drag:{Feature:Zx,ProjectionNode:Fm,MeasureLayout:Mm}};function $f(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&W.postRender(()=>s(t,ii(t)))}class Rw extends Ut{mount(){const{current:t}=this.node;t&&(this.unmount=e1(t,(n,r)=>($f(this.node,r,"Start"),i=>$f(this.node,i,"End"))))}unmount(){}}class _w extends Ut{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ti(Xr(this.node.current,"focus",()=>this.onFocus()),Xr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Hf(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&W.postRender(()=>s(t,ii(t)))}class Iw extends Ut{mount(){const{current:t}=this.node;t&&(this.unmount=i1(t,(n,r)=>(Hf(this.node,r,"Start"),(i,{success:s})=>Hf(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Gl=new WeakMap,Lo=new WeakMap,Fw=e=>{const t=Gl.get(e.target);t&&t(e)},Ow=e=>{e.forEach(Fw)};function zw({root:e,...t}){const n=e||document;Lo.has(n)||Lo.set(n,{});const r=Lo.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Ow,{root:e,...t})),r[i]}function Bw(e,t,n){const r=zw(t);return Gl.set(e,n),r.observe(e),()=>{Gl.delete(e),r.unobserve(e)}}const Uw={some:0,all:1};class Ww extends Ut{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:Uw[i]},l=a=>{const{isIntersecting:u}=a;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(a)};return Bw(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some($w(t,n))&&this.startObserver()}unmount(){}}function $w({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Hw={inView:{Feature:Ww},tap:{Feature:Iw},focus:{Feature:_w},hover:{Feature:Rw}},Kw={layout:{ProjectionNode:Fm,MeasureLayout:Mm}},Gw={...Dx,...Hw,...Vw,...Kw},Vt=G1(Gw,sx),Jn="/api";async function Qw(){return(await fetch(`${Jn}/state`)).json()}async function Kf(){return(await fetch(`${Jn}/dependencies/check`)).json()}async function Gf(){return(await fetch(`${Jn}/docker/status`)).json()}async function Yw(){return(await fetch(`${Jn}/docker/build`,{method:"POST"})).json()}async function Xw(){await fetch(`${Jn}/close`)}async function Zw(e){return(await fetch(`${Jn}/dependencies/install`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:e})})).json()}function qw({className:e="",size:t=240}){return y.jsx("img",{src:"/wails-logo.png",alt:"Wails",width:t,height:t,className:`object-contain ${e}`,style:{filter:"drop-shadow(0 0 60px rgba(239, 68, 68, 0.4))"}})}const Ws={initial:{opacity:0,x:50},animate:{opacity:1,x:0},exit:{opacity:0,x:-50}};function Jw({steps:e,currentStep:t}){const n=e.findIndex(r=>r.id===t);return y.jsx("div",{className:"flex items-center justify-center gap-1 text-xs text-gray-500 mb-6",children:e.map((r,i)=>y.jsxs("div",{className:"flex items-center",children:[y.jsx("span",{className:i<=n?"text-white":"text-gray-600",children:r.label}),i{e.installCommand&&(navigator.clipboard.writeText(e.installCommand),i(!0),setTimeout(()=>i(!1),2e3))},o=(l=e.installCommand)==null?void 0:l.startsWith("sudo ");return y.jsxs("div",{className:"flex items-start gap-3 py-3 border-b border-gray-800/50 last:border-0",children:[y.jsx("div",{className:"mt-0.5",children:e.installed?y.jsx("div",{className:"w-5 h-5 rounded-full bg-green-500/20 flex items-center justify-center",children:y.jsx("svg",{className:"w-3 h-3 text-green-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})}):e.required?y.jsx("div",{className:"w-5 h-5 rounded-full bg-red-500/20 flex items-center justify-center",children:y.jsx("svg",{className:"w-3 h-3 text-red-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M6 18L18 6M6 6l12 12"})})}):y.jsx("div",{className:"w-5 h-5 rounded-full bg-gray-600/20 flex items-center justify-center",children:y.jsx("div",{className:"w-2 h-2 rounded-full bg-gray-500"})})}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:`font-medium ${e.installed?"text-white":e.required?"text-red-300":"text-gray-400"}`,children:e.name}),e.version&&y.jsx("span",{className:"text-xs text-gray-500 font-mono",children:e.version}),e.required&&!e.installed&&y.jsx("span",{className:"text-xs text-red-400 bg-red-500/10 px-1.5 py-0.5 rounded",children:"Required"})]}),e.message&&y.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:e.message}),!e.installed&&e.installCommand&&y.jsx("div",{className:"mt-2",children:e.helpUrl?y.jsxs("a",{href:e.helpUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-blue-400 hover:text-blue-300",children:[e.installCommand,y.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]}):y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("code",{className:"text-xs bg-gray-900 text-gray-300 px-2 py-1 rounded font-mono",children:e.installCommand}),y.jsx("button",{onClick:s,className:"text-xs text-gray-500 hover:text-gray-300 transition-colors",title:"Copy command",children:r?y.jsx("svg",{className:"w-4 h-4 text-green-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}):y.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})}),o&&t&&y.jsx("button",{onClick:()=>t(e.installCommand),disabled:n,className:"text-xs px-2 py-1 rounded bg-blue-500/20 text-blue-400 hover:bg-blue-500/30 transition-colors disabled:opacity-50",children:n?"Installing...":"Install"})]})})]})]})}function eS({dependencies:e,onNext:t,onBack:n,onCancel:r,onRefresh:i}){const[s,o]=j.useState(!1),l=e.filter(f=>f.required),a=e.filter(f=>!f.required),u=l.filter(f=>!f.installed),c=u.length===0,d=async f=>{o(!0);try{const g=await Zw(f);g.success?i():alert(`Installation failed: ${g.error||g.output}`)}catch{alert("Failed to run install command")}o(!1)};return y.jsxs(Vt.div,{variants:Ws,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.2},children:[y.jsxs("div",{className:"mb-6",children:[y.jsx("h2",{className:"text-xl font-bold mb-1",children:"System Dependencies"}),y.jsx("p",{className:"text-sm text-gray-400",children:"The following dependencies are needed to build Wails applications."})]}),y.jsxs("div",{className:"mb-6",children:[y.jsxs("div",{className:"flex items-center justify-between mb-2",children:[y.jsx("h3",{className:"text-sm font-medium text-gray-400",children:"Required"}),!c&&y.jsxs("span",{className:"text-xs text-red-400",children:[u.length," missing"]})]}),y.jsx("div",{className:"bg-gray-900/50 rounded-lg px-4",children:l.map(f=>y.jsx(Qf,{dep:f,onInstall:d,installing:s},f.name))})]}),a.length>0&&y.jsxs("div",{className:"mb-6",children:[y.jsx("h3",{className:"text-sm font-medium text-gray-400 mb-2",children:"Optional"}),y.jsx("div",{className:"bg-gray-900/50 rounded-lg px-4",children:a.map(f=>y.jsx(Qf,{dep:f,onInstall:d,installing:s},f.name))})]}),y.jsx("div",{className:`rounded-lg p-3 ${c?"bg-green-500/10 border border-green-500/20":"bg-yellow-500/10 border border-yellow-500/20"}`,children:c?y.jsxs("div",{className:"flex items-center gap-2 text-green-400 text-sm",children:[y.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),"All required dependencies are installed. You can proceed."]}):y.jsxs("div",{className:"flex items-center gap-2 text-yellow-400 text-sm",children:[y.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),"Install missing dependencies before continuing, or proceed anyway."]})}),y.jsx(Su,{onBack:n,onNext:t,onCancel:r,nextLabel:c?"Next":"Continue Anyway"})]})}function tS({dockerStatus:e,buildingImage:t,onBuildImage:n,onNext:r,onBack:i,onCancel:s}){return y.jsxs(Vt.div,{variants:Ws,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.2},children:[y.jsxs("div",{className:"mb-6",children:[y.jsx("h2",{className:"text-xl font-bold mb-1",children:"Cross-Platform Builds"}),y.jsx("p",{className:"text-sm text-gray-400",children:"Docker enables building for macOS, Windows, and Linux from any platform."})]}),y.jsx("div",{className:"bg-gray-900/50 rounded-lg p-4 mb-6",children:y.jsxs("div",{className:"flex items-start gap-4",children:[y.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-500/20 flex items-center justify-center flex-shrink-0",children:y.jsx("svg",{className:"w-6 h-6 text-blue-400",fill:"currentColor",viewBox:"0 0 24 24",children:y.jsx("path",{d:"M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.186.186 0 00-.185.186v1.887c0 .102.083.185.185.185zm-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.186.186 0 00-.185.185v1.888c0 .102.082.185.185.186zm0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.186.186 0 00-.185.185v1.888c0 .102.082.185.185.186zm-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.186.186 0 00-.185-.185H8.1a.186.186 0 00-.185.185v1.888c0 .102.083.185.185.186zm-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.186.186 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.888c0 .102.084.185.186.186zm5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.186.186 0 00-.185.186v1.887c0 .102.082.185.185.185zm-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.186v1.887c0 .102.083.185.185.185zm-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.185-.186h-2.12a.185.185 0 00-.184.186v1.887c0 .102.083.185.185.185zm-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.185.186v1.887c0 .102.084.185.185.185z"})})}),y.jsxs("div",{className:"flex-1",children:[y.jsx("h3",{className:"font-medium text-white mb-1",children:"Docker Status"}),e?e.installed?e.running?e.imageBuilt?y.jsxs("div",{children:[y.jsxs("div",{className:"flex items-center gap-2 text-green-400 text-sm mb-2",children:[y.jsx("span",{className:"w-2 h-2 rounded-full bg-green-500"}),"Ready for cross-platform builds"]}),y.jsxs("p",{className:"text-xs text-gray-500",children:["Docker ",e.version," • wails-cross image installed"]})]}):t?y.jsxs("div",{children:[y.jsxs("div",{className:"flex items-center gap-2 text-blue-400 text-sm mb-2",children:[y.jsx(Vt.span,{className:"w-3 h-3 border-2 border-blue-400 border-t-transparent rounded-full",animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"}}),"Building wails-cross image... ",e.pullProgress,"%"]}),y.jsx("div",{className:"h-1.5 bg-gray-700 rounded-full overflow-hidden",children:y.jsx(Vt.div,{className:"h-full bg-blue-500",animate:{width:`${e.pullProgress}%`}})})]}):y.jsxs("div",{children:[y.jsxs("div",{className:"flex items-center gap-2 text-gray-400 text-sm mb-2",children:[y.jsx("span",{className:"w-2 h-2 rounded-full bg-gray-500"}),"Cross-compilation image not installed"]}),y.jsxs("p",{className:"text-xs text-gray-500 mb-3",children:["Docker ",e.version," is running. Build the wails-cross image to enable cross-platform builds."]}),y.jsx("button",{onClick:n,className:"text-sm px-4 py-2 rounded-lg bg-blue-500/20 text-blue-400 hover:bg-blue-500/30 transition-colors border border-blue-500/30",children:"Build Cross-Compilation Image"})]}):y.jsxs("div",{children:[y.jsxs("div",{className:"flex items-center gap-2 text-yellow-400 text-sm mb-2",children:[y.jsx("span",{className:"w-2 h-2 rounded-full bg-yellow-500"}),"Installed but not running"]}),y.jsx("p",{className:"text-xs text-gray-500",children:"Start Docker Desktop to enable cross-platform builds."})]}):y.jsxs("div",{children:[y.jsxs("div",{className:"flex items-center gap-2 text-yellow-400 text-sm mb-2",children:[y.jsx("span",{className:"w-2 h-2 rounded-full bg-yellow-500"}),"Not installed"]}),y.jsx("p",{className:"text-xs text-gray-500 mb-2",children:"Docker is optional but required for cross-platform builds."}),y.jsxs("a",{href:"https://docs.docker.com/get-docker/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-blue-400 hover:text-blue-300",children:["Install Docker Desktop",y.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]})]}):y.jsx("div",{className:"text-sm text-gray-400",children:"Checking Docker..."})]})]})}),y.jsxs("div",{className:"bg-gray-900/50 rounded-lg p-4",children:[y.jsx("h3",{className:"text-sm font-medium text-gray-400 mb-2",children:"What you can build:"}),y.jsxs("div",{className:"grid grid-cols-3 gap-4 text-center text-sm",children:[y.jsxs("div",{className:"py-2",children:[y.jsx("div",{className:"text-lg mb-1",children:"🍎"}),y.jsx("div",{className:"text-gray-300",children:"macOS"}),y.jsx("div",{className:"text-xs text-gray-500",children:".app / .dmg"})]}),y.jsxs("div",{className:"py-2",children:[y.jsx("div",{className:"text-lg mb-1",children:"🪟"}),y.jsx("div",{className:"text-gray-300",children:"Windows"}),y.jsx("div",{className:"text-xs text-gray-500",children:".exe / .msi"})]}),y.jsxs("div",{className:"py-2",children:[y.jsx("div",{className:"text-lg mb-1",children:"🐧"}),y.jsx("div",{className:"text-gray-300",children:"Linux"}),y.jsx("div",{className:"text-xs text-gray-500",children:".deb / .rpm / AppImage"})]})]})]}),y.jsx(Su,{onBack:i,onNext:r,onCancel:s,nextLabel:"Finish"})]})}function Ao({command:e,label:t}){const[n,r]=j.useState(!1),i=()=>{navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),2e3)};return y.jsxs("div",{children:[y.jsx("p",{className:"text-gray-500 mb-1",children:t}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("code",{className:"flex-1 text-green-400 font-mono text-xs bg-gray-900 px-2 py-1 rounded",children:e}),y.jsx("button",{onClick:i,className:"text-gray-500 hover:text-gray-300 transition-colors p-1",title:"Copy command",children:n?y.jsx("svg",{className:"w-4 h-4 text-green-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}):y.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})})]})]})}function nS({onClose:e}){return y.jsxs(Vt.div,{variants:Ws,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.2},className:"text-center py-8",children:[y.jsx(Vt.div,{initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:200,damping:15},className:"w-16 h-16 rounded-full bg-green-500/20 flex items-center justify-center mx-auto mb-6",children:y.jsx("svg",{className:"w-8 h-8 text-green-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),y.jsx("h2",{className:"text-2xl font-bold mb-2",children:"Setup Complete"}),y.jsx("p",{className:"text-gray-400 mb-8",children:"Your development environment is ready to use."}),y.jsxs("div",{className:"bg-gray-900/50 rounded-lg p-4 text-left mb-6 max-w-sm mx-auto",children:[y.jsx("h3",{className:"text-sm font-medium text-gray-400 mb-3",children:"Next Steps"}),y.jsxs("div",{className:"space-y-3 text-sm",children:[y.jsx(Ao,{command:"wails3 init -n myapp",label:"Create a new project:"}),y.jsx(Ao,{command:"wails3 dev",label:"Start development server:"}),y.jsx(Ao,{command:"wails3 build",label:"Build for production:"})]})]}),y.jsx("button",{onClick:e,className:"px-6 py-2.5 rounded-lg bg-red-600 text-white font-medium hover:bg-red-500 transition-colors",children:"Close"})]})}function rS(){const[e,t]=j.useState("welcome"),[n,r]=j.useState([]),[i,s]=j.useState(null),[o,l]=j.useState(null),[a,u]=j.useState(!1),c=[{id:"welcome",label:"Welcome"},{id:"dependencies",label:"Dependencies"},{id:"docker",label:"Docker"},{id:"complete",label:"Complete"}];j.useEffect(()=>{d()},[]);const d=async()=>{const h=await Qw();s(h.system)},f=async()=>{const h=await Kf();r(h)},g=async()=>{if(e==="welcome"){const h=await Kf();r(h),t("dependencies")}else if(e==="dependencies"){const h=n.find(m=>m.name==="docker");if(h!=null&&h.installed){const m=await Gf();l(m)}t("docker")}else e==="docker"&&t("complete")},v=()=>{e==="dependencies"?t("welcome"):e==="docker"&&t("dependencies")},x=async()=>{u(!0),await Yw();const h=async()=>{const m=await Gf();l(m),m.pullStatus==="pulling"?setTimeout(h,1e3):u(!1)};h()},P=async()=>{await Xw(),window.close()},p=P;return y.jsx("div",{className:"min-h-screen bg-[#0f0f0f] flex items-center justify-center p-4",children:y.jsxs("div",{className:"w-full max-w-lg",children:[y.jsxs("div",{className:"bg-gray-900/80 border border-gray-800 rounded-xl p-6 shadow-2xl",children:[y.jsx(Jw,{steps:c,currentStep:e}),y.jsxs(p1,{mode:"wait",children:[e==="welcome"&&y.jsx(bw,{system:i,onNext:g,onCancel:p},"welcome"),e==="dependencies"&&y.jsx(eS,{dependencies:n,onNext:g,onBack:v,onCancel:p,onRefresh:f},"dependencies"),e==="docker"&&y.jsx(tS,{dockerStatus:o,buildingImage:a,onBuildImage:x,onNext:g,onBack:v,onCancel:p},"docker"),e==="complete"&&y.jsx(nS,{onClose:P},"complete")]})]}),y.jsx("div",{className:"text-center mt-4 text-xs text-gray-600",children:"Wails • Build cross-platform apps with Go"})]})})}Vo.createRoot(document.getElementById("root")).render(y.jsx(eg.StrictMode,{children:y.jsx(rS,{})})); diff --git a/v3/internal/setupwizard/frontend/dist/assets/index-D_hwfYDk.css b/v3/internal/setupwizard/frontend/dist/assets/index-D_hwfYDk.css new file mode 100644 index 000000000..1a4bae36c --- /dev/null +++ b/v3/internal/setupwizard/frontend/dist/assets/index-D_hwfYDk.css @@ -0,0 +1 @@ +*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mt-0\.5{margin-top:.125rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.h-1\.5{height:.375rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-full{height:100%}.min-h-screen{min-height:100vh}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-3{width:.75rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-full{width:100%}.min-w-0{min-width:0px}.max-w-lg{max-width:32rem}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.cursor-not-allowed{cursor:not-allowed}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-y-2{row-gap:.5rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-blue-400{--tw-border-opacity: 1;border-color:rgb(96 165 250 / var(--tw-border-opacity, 1))}.border-blue-500\/30{border-color:#3b82f64d}.border-gray-800{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity, 1))}.border-gray-800\/50{border-color:#1f293780}.border-green-500\/20{border-color:#22c55e33}.border-yellow-500\/20{border-color:#eab30833}.border-t-transparent{border-top-color:transparent}.bg-\[\#0f0f0f\]{--tw-bg-opacity: 1;background-color:rgb(15 15 15 / var(--tw-bg-opacity, 1))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-blue-500\/20{background-color:#3b82f633}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity, 1))}.bg-gray-600\/20{background-color:#4b556333}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-gray-900\/50{background-color:#11182780}.bg-gray-900\/80{background-color:#111827cc}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-500\/10{background-color:#22c55e1a}.bg-green-500\/20{background-color:#22c55e33}.bg-red-500\/10{background-color:#ef44441a}.bg-red-500\/20{background-color:#ef444433}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/10{background-color:#eab3081a}.object-contain{-o-object-fit:contain;object-fit:contain}.p-1{padding:.25rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:root{--wails-red: #ef4444;--wails-red-dark: #dc2626;--wails-red-light: #f87171;--bg-primary: #0f0f0f;--bg-secondary: #1f2937;--bg-tertiary: #374151}*{box-sizing:border-box}html,body,#root{margin:0;padding:0;min-height:100vh;background:var(--bg-primary);color:#fff;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.gradient-text{background:linear-gradient(135deg,#fff,#ef4444);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.glass-card{background:#1f2937cc;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid rgba(55,65,81,.5)}.grid-bg{background-image:linear-gradient(rgba(239,68,68,.03) 1px,transparent 1px),linear-gradient(90deg,rgba(239,68,68,.03) 1px,transparent 1px);background-size:40px 40px}.radial-glow{background:radial-gradient(ellipse at center,rgba(239,68,68,.1) 0%,transparent 70%)}::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{background:var(--bg-primary)}::-webkit-scrollbar-thumb{background:var(--bg-tertiary);border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#4b5563}.btn-primary{border-radius:.75rem;background-image:linear-gradient(to right,var(--tw-gradient-stops));--tw-gradient-from: #ef4444 var(--tw-gradient-from-position);--tw-gradient-to: rgb(239 68 68 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #dc2626 var(--tw-gradient-to-position);padding:.75rem 2rem;font-weight:600;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.btn-primary:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);--tw-shadow-color: rgb(239 68 68 / .3);--tw-shadow: var(--tw-shadow-colored)}.btn-primary:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.btn-secondary{border-radius:.75rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1));background-color:transparent;padding:.75rem 2rem;font-weight:500;--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1));transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.btn-secondary:hover{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1));background-color:#1f293780;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}@keyframes spin{to{transform:rotate(360deg)}}.spinner{animation:spin 1s linear infinite}.check-path{stroke-dasharray:100;stroke-dashoffset:100;animation:drawCheck .5s ease-out forwards}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}.last\:border-0:last-child{border-width:0px}.hover\:bg-blue-500\/30:hover{background-color:#3b82f64d}.hover\:bg-gray-700:hover{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.hover\:bg-red-500:hover{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.hover\:text-blue-300:hover{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.hover\:text-gray-300:hover{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.disabled\:opacity-50:disabled{opacity:.5} diff --git a/v3/internal/setupwizard/frontend/dist/index.html b/v3/internal/setupwizard/frontend/dist/index.html index 52e737151..464428175 100644 --- a/v3/internal/setupwizard/frontend/dist/index.html +++ b/v3/internal/setupwizard/frontend/dist/index.html @@ -7,8 +7,8 @@ - - + +
diff --git a/v3/internal/setupwizard/frontend/src/App.tsx b/v3/internal/setupwizard/frontend/src/App.tsx index d2e34a4d2..62613213a 100644 --- a/v3/internal/setupwizard/frontend/src/App.tsx +++ b/v3/internal/setupwizard/frontend/src/App.tsx @@ -1,327 +1,754 @@ import { useState, useEffect } from 'react'; import { motion, AnimatePresence } from 'framer-motion'; -import type { DependencyStatus, SystemInfo } from './types'; -import { checkDependencies, getState } from './api'; +import type { DependencyStatus, SystemInfo, DockerStatus } from './types'; +import { checkDependencies, getState, getDockerStatus, buildDockerImage, close, installDependency } from './api'; import WailsLogo from './components/WailsLogo'; -type CheckState = 'idle' | 'checking' | 'complete'; +type Step = 'welcome' | 'dependencies' | 'docker' | 'complete'; -interface DependencyWithState extends DependencyStatus { - checkState: CheckState; -} +// Classic wizard page slide animation +const pageVariants = { + initial: { opacity: 0, x: 50 }, + animate: { opacity: 1, x: 0 }, + exit: { opacity: 0, x: -50 } +}; -export default function App() { - const [dependencies, setDependencies] = useState([]); - const [system, setSystem] = useState(null); - const [started, setStarted] = useState(false); - const [allComplete, setAllComplete] = useState(false); - - // Load system info on mount - useEffect(() => { - getState().then((s) => { - setSystem(s.system); - }); - }, []); - - // Start checking after logo animation - useEffect(() => { - const timer = setTimeout(() => { - setStarted(true); - startDependencyCheck(); - }, 1500); - return () => clearTimeout(timer); - }, []); - - const startDependencyCheck = async () => { - // First get the list of dependencies - const deps = await checkDependencies(); - - // Initialize all as 'idle' - const depsWithState: DependencyWithState[] = deps.map(d => ({ - ...d, - checkState: 'idle' - })); - setDependencies(depsWithState); - - // Animate each dependency check one by one with staggered timing - for (let i = 0; i < depsWithState.length; i++) { - await new Promise(resolve => setTimeout(resolve, 300)); - - setDependencies(prev => prev.map((d, idx) => - idx === i ? { ...d, checkState: 'checking' } : d - )); - - // Simulate check time (the actual check is already done) - await new Promise(resolve => setTimeout(resolve, 400 + Math.random() * 300)); - - setDependencies(prev => prev.map((d, idx) => - idx === i ? { ...d, checkState: 'complete' } : d - )); - } - - // All complete - await new Promise(resolve => setTimeout(resolve, 500)); - setAllComplete(true); - }; - - const allInstalled = dependencies.length > 0 && - dependencies.every(d => d.installed || !d.required); - - const getStatusIcon = (dep: DependencyWithState) => { - if (dep.checkState === 'idle') { - return ( -
- ); - } - - if (dep.checkState === 'checking') { - return ( - - ); - } - - // Complete - if (dep.installed) { - return ( - - - - - - ); - } else { - return ( - - - - - - ); - } - }; +// Wizard step indicator +function StepIndicator({ steps, currentStep }: { steps: { id: Step; label: string }[]; currentStep: Step }) { + const currentIndex = steps.findIndex(s => s.id === currentStep); return ( -
- {/* Radial glow background */} -
+
+ {steps.map((step, i) => ( +
+ + {step.label} + + {i < steps.length - 1 && ( + + )} +
+ ))} +
+ ); +} - {/* Main content */} -
- {/* Logo */} +// Wizard footer with navigation buttons +function WizardFooter({ + onBack, + onNext, + onCancel, + nextLabel = 'Next', + backLabel = 'Back', + showBack = true, + nextDisabled = false +}: { + onBack?: () => void; + onNext: () => void; + onCancel?: () => void; + nextLabel?: string; + backLabel?: string; + showBack?: boolean; + nextDisabled?: boolean; +}) { + return ( +
+
+ {onCancel && ( + + )} +
+
+ {showBack && onBack && ( + + )} + +
+
+ ); +} + +// Welcome Page +function WelcomePage({ system, onNext, onCancel }: { system: SystemInfo | null; onNext: () => void; onCancel: () => void }) { + return ( + +
- + +

Welcome to Wails Setup

+

+ This wizard will help you set up your development environment. +

+
- {/* Title */} - -

- Wails Setup -

-

- {system?.os && `${system.os}/${system.arch}`} - {system?.wailsVersion && ` • v${system.wailsVersion}`} -

-
- - {/* Dependencies section */} - - {/* Header */} - - - Checking Dependencies - - {!allComplete && dependencies.length > 0 && ( - - ({dependencies.filter(d => d.checkState === 'complete').length}/{dependencies.length}) - - )} - - - {/* Dependency list */} -
- - {dependencies.map((dep, index) => ( - - {/* Status icon */} -
- {getStatusIcon(dep)} -
- - {/* Name and version */} -
-
- {dep.name} - {dep.checkState === 'complete' && dep.version && ( - - v{dep.version} - - )} -
- - {/* Message for missing deps */} - {dep.checkState === 'complete' && !dep.installed && dep.message && ( - - {dep.message} - - )} -
- - {/* Required badge */} - {dep.required && dep.checkState === 'complete' && !dep.installed && ( - - Required - - )} -
- ))} -
+ {system && ( +
+

System Information

+
+ Operating System + {system.osName || system.os} ({system.arch}) + Wails Version + v{system.wailsVersion} + Go Version + {system.goVersion}
+
+ )} - {/* Summary */} - - {allComplete && ( - +

Setup will check:

+
    +
  • + + Required build dependencies (GTK, WebKit, GCC) +
  • +
  • + + Optional tools (npm, Docker) +
  • +
  • + + Cross-compilation capabilities +
  • +
+
+ + +
+ ); +} + +// Dependency row component +function DependencyRow({ + dep, + onInstall, + installing +}: { + dep: DependencyStatus; + onInstall?: (cmd: string) => void; + installing: boolean; +}) { + const [copied, setCopied] = useState(false); + + const copyCommand = () => { + if (dep.installCommand) { + navigator.clipboard.writeText(dep.installCommand); + setCopied(true); + setTimeout(() => setCopied(false), 2000); + } + }; + + const isSystemCommand = dep.installCommand?.startsWith('sudo '); + + return ( +
+ {/* Status icon */} +
+ {dep.installed ? ( +
+ + + +
+ ) : dep.required ? ( +
+ + + +
+ ) : ( +
+
+
+ )} +
+ + {/* Info */} +
+
+ + {dep.name} + + {dep.version && ( + {dep.version} + )} + {dep.required && !dep.installed && ( + Required + )} +
+ {dep.message && ( +

{dep.message}

+ )} + + {/* Install command */} + {!dep.installed && dep.installCommand && ( +
+ {dep.helpUrl ? ( + - {allInstalled ? ( -
- -
-
-

- All dependencies installed! -

-

- You're ready to build Wails applications. -

-
- ) : ( -
-
-

- Some dependencies are missing -

-

- Install the missing dependencies to continue. -

-
- )} - - {/* Close button */} - window.close()} - initial={{ opacity: 0 }} - animate={{ opacity: 1 }} - transition={{ delay: 0.4 }} - whileHover={{ scale: 1.02 }} - whileTap={{ scale: 0.98 }} + {dep.installCommand} + + + +
+ ) : ( +
+ + {dep.installCommand} + + + {isSystemCommand && onInstall && ( + + )} +
)} - - - - {/* Loading dots while fetching deps */} - {started && dependencies.length === 0 && ( - - {[0, 1, 2].map((i) => ( - - ))} - +
)}
); } + +// Dependencies Page +function DependenciesPage({ + dependencies, + onNext, + onBack, + onCancel, + onRefresh +}: { + dependencies: DependencyStatus[]; + onNext: () => void; + onBack: () => void; + onCancel: () => void; + onRefresh: () => void; +}) { + const [installing, setInstalling] = useState(false); + + const required = dependencies.filter(d => d.required); + const optional = dependencies.filter(d => !d.required); + const missingRequired = required.filter(d => !d.installed); + const allRequiredInstalled = missingRequired.length === 0; + + const handleInstall = async (command: string) => { + setInstalling(true); + try { + const result = await installDependency(command); + if (result.success) { + // Refresh dependencies after install + onRefresh(); + } else { + alert(`Installation failed: ${result.error || result.output}`); + } + } catch { + alert('Failed to run install command'); + } + setInstalling(false); + }; + + return ( + +
+

System Dependencies

+

+ The following dependencies are needed to build Wails applications. +

+
+ + {/* Required Dependencies */} +
+
+

Required

+ {!allRequiredInstalled && ( + + {missingRequired.length} missing + + )} +
+
+ {required.map(dep => ( + + ))} +
+
+ + {/* Optional Dependencies */} + {optional.length > 0 && ( +
+

Optional

+
+ {optional.map(dep => ( + + ))} +
+
+ )} + + {/* Status Summary */} +
+ {allRequiredInstalled ? ( +
+ + + + All required dependencies are installed. You can proceed. +
+ ) : ( +
+ + + + Install missing dependencies before continuing, or proceed anyway. +
+ )} +
+ + +
+ ); +} + +// Docker Page +function DockerPage({ + dockerStatus, + buildingImage, + onBuildImage, + onNext, + onBack, + onCancel +}: { + dockerStatus: DockerStatus | null; + buildingImage: boolean; + onBuildImage: () => void; + onNext: () => void; + onBack: () => void; + onCancel: () => void; +}) { + return ( + +
+

Cross-Platform Builds

+

+ Docker enables building for macOS, Windows, and Linux from any platform. +

+
+ +
+
+
+ + + +
+ +
+

Docker Status

+ + {!dockerStatus ? ( +
Checking Docker...
+ ) : !dockerStatus.installed ? ( +
+
+ + Not installed +
+

+ Docker is optional but required for cross-platform builds. +

+ + Install Docker Desktop + + + + +
+ ) : !dockerStatus.running ? ( +
+
+ + Installed but not running +
+

+ Start Docker Desktop to enable cross-platform builds. +

+
+ ) : dockerStatus.imageBuilt ? ( +
+
+ + Ready for cross-platform builds +
+

+ Docker {dockerStatus.version} • wails-cross image installed +

+
+ ) : buildingImage ? ( +
+
+ + Building wails-cross image... {dockerStatus.pullProgress}% +
+
+ +
+
+ ) : ( +
+
+ + Cross-compilation image not installed +
+

+ Docker {dockerStatus.version} is running. Build the wails-cross image to enable cross-platform builds. +

+ +
+ )} +
+
+
+ +
+

What you can build:

+
+
+
🍎
+
macOS
+
.app / .dmg
+
+
+
🪟
+
Windows
+
.exe / .msi
+
+
+
🐧
+
Linux
+
.deb / .rpm / AppImage
+
+
+
+ + +
+ ); +} + +// Copyable command component +function CopyableCommand({ command, label }: { command: string; label: string }) { + const [copied, setCopied] = useState(false); + + const copyCommand = () => { + navigator.clipboard.writeText(command); + setCopied(true); + setTimeout(() => setCopied(false), 2000); + }; + + return ( +
+

{label}

+
+ + {command} + + +
+
+ ); +} + +// Complete Page +function CompletePage({ onClose }: { onClose: () => void }) { + return ( + + + + + + + +

Setup Complete

+

+ Your development environment is ready to use. +

+ +
+

Next Steps

+
+ + + +
+
+ + +
+ ); +} + +// Main App +export default function App() { + const [step, setStep] = useState('welcome'); + const [dependencies, setDependencies] = useState([]); + const [system, setSystem] = useState(null); + const [dockerStatus, setDockerStatus] = useState(null); + const [buildingImage, setBuildingImage] = useState(false); + + const steps: { id: Step; label: string }[] = [ + { id: 'welcome', label: 'Welcome' }, + { id: 'dependencies', label: 'Dependencies' }, + { id: 'docker', label: 'Docker' }, + { id: 'complete', label: 'Complete' }, + ]; + + useEffect(() => { + init(); + }, []); + + const init = async () => { + const state = await getState(); + setSystem(state.system); + }; + + const refreshDependencies = async () => { + const deps = await checkDependencies(); + setDependencies(deps); + }; + + const handleNext = async () => { + if (step === 'welcome') { + const deps = await checkDependencies(); + setDependencies(deps); + setStep('dependencies'); + } else if (step === 'dependencies') { + const dockerDep = dependencies.find(d => d.name === 'docker'); + if (dockerDep?.installed) { + const docker = await getDockerStatus(); + setDockerStatus(docker); + } + setStep('docker'); + } else if (step === 'docker') { + setStep('complete'); + } + }; + + const handleBack = () => { + if (step === 'dependencies') setStep('welcome'); + else if (step === 'docker') setStep('dependencies'); + }; + + const handleBuildImage = async () => { + setBuildingImage(true); + await buildDockerImage(); + + const poll = async () => { + const status = await getDockerStatus(); + setDockerStatus(status); + if (status.pullStatus === 'pulling') { + setTimeout(poll, 1000); + } else { + setBuildingImage(false); + } + }; + poll(); + }; + + const handleClose = async () => { + await close(); + window.close(); + }; + + const handleCancel = handleClose; + + return ( +
+
+ {/* Wizard container */} +
+ + + + {step === 'welcome' && ( + + )} + {step === 'dependencies' && ( + + )} + {step === 'docker' && ( + + )} + {step === 'complete' && ( + + )} + +
+ + {/* Footer */} +
+ Wails • Build cross-platform apps with Go +
+
+
+ ); +} diff --git a/v3/internal/setupwizard/frontend/src/api.ts b/v3/internal/setupwizard/frontend/src/api.ts index da11fe430..e36d63bc9 100644 --- a/v3/internal/setupwizard/frontend/src/api.ts +++ b/v3/internal/setupwizard/frontend/src/api.ts @@ -58,3 +58,18 @@ export async function saveWailsConfig(config: WailsConfig): Promise<{ status: st }); return response.json(); } + +export interface InstallResult { + success: boolean; + output: string; + error?: string; +} + +export async function installDependency(command: string): Promise { + const response = await fetch(`${API_BASE}/dependencies/install`, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ command }), + }); + return response.json(); +} diff --git a/v3/internal/setupwizard/frontend/src/types.ts b/v3/internal/setupwizard/frontend/src/types.ts index e8da97ba9..caec465e0 100644 --- a/v3/internal/setupwizard/frontend/src/types.ts +++ b/v3/internal/setupwizard/frontend/src/types.ts @@ -6,6 +6,8 @@ export interface DependencyStatus { status: 'installed' | 'not_installed' | 'needs_update' | 'checking'; required: boolean; message?: string; + installCommand?: string; + helpUrl?: string; } export interface DockerStatus { @@ -45,6 +47,8 @@ export interface SystemInfo { wailsVersion: string; goVersion: string; homeDir: string; + osName?: string; + osVersion?: string; gitName?: string; gitEmail?: string; } diff --git a/v3/internal/setupwizard/wizard.go b/v3/internal/setupwizard/wizard.go index 8f37843f8..b54f5f1e9 100644 --- a/v3/internal/setupwizard/wizard.go +++ b/v3/internal/setupwizard/wizard.go @@ -27,12 +27,26 @@ var frontendFS embed.FS // DependencyStatus represents the status of a dependency type DependencyStatus struct { - Name string `json:"name"` - Installed bool `json:"installed"` - Version string `json:"version,omitempty"` - Status string `json:"status"` // "installed", "not_installed", "needs_update" - Required bool `json:"required"` - Message string `json:"message,omitempty"` + Name string `json:"name"` + Installed bool `json:"installed"` + Version string `json:"version,omitempty"` + Status string `json:"status"` // "installed", "not_installed", "needs_update" + Required bool `json:"required"` + Message string `json:"message,omitempty"` + InstallCommand string `json:"installCommand,omitempty"` + HelpURL string `json:"helpUrl,omitempty"` +} + +// DockerStatus represents Docker installation and image status +type DockerStatus struct { + Installed bool `json:"installed"` + Running bool `json:"running"` + Version string `json:"version,omitempty"` + ImageBuilt bool `json:"imageBuilt"` + ImageName string `json:"imageName"` + PullProgress int `json:"pullProgress"` + PullStatus string `json:"pullStatus"` // "idle", "pulling", "complete", "error" + PullError string `json:"pullError,omitempty"` } // WailsConfigInfo represents the info section of wails.yaml @@ -71,11 +85,13 @@ type WizardState struct { // Wizard is the setup wizard server type Wizard struct { - server *http.Server - state WizardState - stateMu sync.RWMutex - done chan struct{} - shutdown chan struct{} + server *http.Server + state WizardState + stateMu sync.RWMutex + dockerStatus DockerStatus + dockerMu sync.RWMutex + done chan struct{} + shutdown chan struct{} } // New creates a new setup wizard @@ -143,6 +159,9 @@ func (w *Wizard) setupRoutes(mux *http.ServeMux) { // API routes mux.HandleFunc("/api/state", w.handleState) mux.HandleFunc("/api/dependencies/check", w.handleCheckDependencies) + mux.HandleFunc("/api/dependencies/install", w.handleInstallDependency) + mux.HandleFunc("/api/docker/status", w.handleDockerStatus) + mux.HandleFunc("/api/docker/build", w.handleDockerBuild) mux.HandleFunc("/api/wails-config", w.handleWailsConfig) mux.HandleFunc("/api/complete", w.handleComplete) mux.HandleFunc("/api/close", w.handleClose) @@ -326,3 +345,150 @@ func commandExists(name string) bool { _, err := exec.LookPath(name) return err == nil } + +func (w *Wizard) handleDockerStatus(rw http.ResponseWriter, r *http.Request) { + status := w.checkDocker() + + w.dockerMu.Lock() + w.dockerStatus = status + w.dockerMu.Unlock() + + rw.Header().Set("Content-Type", "application/json") + json.NewEncoder(rw).Encode(status) +} + +func (w *Wizard) checkDocker() DockerStatus { + status := DockerStatus{ + ImageName: "wails-cross", + PullStatus: "idle", + } + + // Check if Docker is installed + output, err := execCommand("docker", "--version") + if err != nil { + status.Installed = false + return status + } + + status.Installed = true + // Parse version from "Docker version 24.0.7, build afdd53b" + parts := strings.Split(output, ",") + if len(parts) > 0 { + status.Version = strings.TrimPrefix(strings.TrimSpace(parts[0]), "Docker version ") + } + + // Check if Docker daemon is running + if _, err := execCommand("docker", "info"); err != nil { + status.Running = false + return status + } + status.Running = true + + // Check if wails-cross image exists + imageOutput, err := execCommand("docker", "image", "inspect", "wails-cross") + status.ImageBuilt = err == nil && len(imageOutput) > 0 + + return status +} + +func (w *Wizard) handleDockerBuild(rw http.ResponseWriter, r *http.Request) { + if r.Method != http.MethodPost { + http.Error(rw, "Method not allowed", http.StatusMethodNotAllowed) + return + } + + w.dockerMu.Lock() + w.dockerStatus.PullStatus = "pulling" + w.dockerStatus.PullProgress = 0 + w.dockerMu.Unlock() + + // Build the Docker image in background + go func() { + // Run: wails3 task setup:docker + cmd := exec.Command("wails3", "task", "setup:docker") + err := cmd.Run() + + w.dockerMu.Lock() + if err != nil { + w.dockerStatus.PullStatus = "error" + w.dockerStatus.PullError = err.Error() + } else { + w.dockerStatus.PullStatus = "complete" + w.dockerStatus.ImageBuilt = true + } + w.dockerStatus.PullProgress = 100 + w.dockerMu.Unlock() + }() + + // Simulate progress updates while building + go func() { + for i := 0; i < 90; i += 5 { + time.Sleep(2 * time.Second) + w.dockerMu.Lock() + if w.dockerStatus.PullStatus != "pulling" { + w.dockerMu.Unlock() + return + } + w.dockerStatus.PullProgress = i + w.dockerMu.Unlock() + } + }() + + rw.Header().Set("Content-Type", "application/json") + json.NewEncoder(rw).Encode(map[string]string{"status": "started"}) +} + +// InstallRequest represents a request to install a dependency +type InstallRequest struct { + Command string `json:"command"` +} + +// InstallResponse represents the result of an install attempt +type InstallResponse struct { + Success bool `json:"success"` + Output string `json:"output"` + Error string `json:"error,omitempty"` +} + +func (w *Wizard) handleInstallDependency(rw http.ResponseWriter, r *http.Request) { + if r.Method != http.MethodPost { + http.Error(rw, "Method not allowed", http.StatusMethodNotAllowed) + return + } + + var req InstallRequest + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(rw, err.Error(), http.StatusBadRequest) + return + } + + rw.Header().Set("Content-Type", "application/json") + + // Execute the install command + // Split the command into parts + parts := strings.Fields(req.Command) + if len(parts) == 0 { + json.NewEncoder(rw).Encode(InstallResponse{ + Success: false, + Error: "Empty command", + }) + return + } + + cmd := exec.Command(parts[0], parts[1:]...) + output, err := cmd.CombinedOutput() + + if err != nil { + json.NewEncoder(rw).Encode(InstallResponse{ + Success: false, + Output: string(output), + Error: err.Error(), + }) + return + } + + json.NewEncoder(rw).Encode(InstallResponse{ + Success: true, + Output: string(output), + }) +} diff --git a/v3/internal/setupwizard/wizard_linux.go b/v3/internal/setupwizard/wizard_linux.go index cb9e1bd46..08c494c2c 100644 --- a/v3/internal/setupwizard/wizard_linux.go +++ b/v3/internal/setupwizard/wizard_linux.go @@ -34,8 +34,9 @@ func (w *Wizard) checkAllDependencies() []DependencyStatus { } else { status.Installed = false status.Status = "not_installed" + status.InstallCommand = dep.InstallCommand if dep.InstallCommand != "" { - status.Message = "Install with: " + dep.InstallCommand + status.Message = "Run the install command to install this dependency" } } @@ -55,14 +56,16 @@ func (w *Wizard) checkAllDependencies() []DependencyStatus { func checkNpm() DependencyStatus { dep := DependencyStatus{ Name: "npm", - Required: true, + Required: false, // Optional - not strictly required for Go-only projects } version, err := execCommand("npm", "-v") if err != nil { dep.Status = "not_installed" dep.Installed = false - dep.Message = "npm is required. Install Node.js from https://nodejs.org/" + dep.Message = "Required for frontend development" + dep.HelpURL = "https://nodejs.org/" + dep.InstallCommand = "Install Node.js from https://nodejs.org/" return dep } @@ -75,7 +78,8 @@ func checkNpm() DependencyStatus { if major < 7 { dep.Status = "needs_update" dep.Installed = true - dep.Message = "npm 7.0.0 or higher is required" + dep.Message = "npm 7.0.0 or higher recommended" + dep.HelpURL = "https://nodejs.org/" return dep } } @@ -95,7 +99,9 @@ func checkDocker() DependencyStatus { if err != nil { dep.Status = "not_installed" dep.Installed = false - dep.Message = "Optional - for cross-compilation" + dep.Message = "Enables cross-platform builds" + dep.HelpURL = "https://docs.docker.com/get-docker/" + dep.InstallCommand = "Install Docker from https://docs.docker.com/get-docker/" return dep } @@ -110,7 +116,7 @@ func checkDocker() DependencyStatus { if err != nil { dep.Installed = true dep.Status = "installed" - dep.Message = "Daemon not running" + dep.Message = "Start Docker to enable cross-compilation" return dep } @@ -119,7 +125,7 @@ func checkDocker() DependencyStatus { if imageCheck == "" || strings.Contains(imageCheck, "Error") { dep.Installed = true dep.Status = "installed" - dep.Message = "wails-cross image not built" + dep.Message = "Run 'wails3 task setup:docker' to build cross-compilation image" } else { dep.Installed = true dep.Status = "installed"