@careshiphealth/widget 3.0.0-ela → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/widget.iife.js +1 -1
- package/package.json +1 -1
package/dist/widget.iife.js
CHANGED
|
@@ -322,7 +322,7 @@ class RawAudioProcessor extends AudioWorkletProcessor {
|
|
|
322
322
|
registerProcessor("rawAudioProcessor", RawAudioProcessor);
|
|
323
323
|
`),G$=25,KM={echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0,channelCount:{ideal:1}};class UQ{context;analyser;worklet;inputStream;mediaStreamSource;permissions;onError;static async create({sampleRate:A,format:t,preferHeadphonesForIosDevices:n,inputDeviceId:s,workletPaths:r,libsampleratePath:a,onError:o,inputChunkDurationMs:c=G$}){let l=null,d=null;try{const u={sampleRate:{ideal:A},...KM};if(rh()&&n){const S=(await window.navigator.mediaDevices.enumerateDevices()).find(M=>M.kind==="audioinput"&&["airpod","headphone","earphone"].find(x=>M.label.toLowerCase().includes(x)));S&&(u.deviceId={ideal:S.deviceId})}s&&(u.deviceId=UQ.getDeviceIdConstraint(s));const f=navigator.mediaDevices.getSupportedConstraints().sampleRate;l=new window.AudioContext(f?{sampleRate:A}:{});const b=l.createAnalyser();f||await OM(l,a),await JM(l.audioWorklet,r?.rawAudioProcessor);const I={voiceIsolation:!0,...u};d=await navigator.mediaDevices.getUserMedia({audio:I});const y=l.createMediaStreamSource(d),E=new AudioWorkletNode(l,"rawAudioProcessor");E.port.postMessage({type:"setFormat",format:t,sampleRate:A,chunkDurationMs:c}),y.connect(b),b.connect(E),await l.resume();const Z=await navigator.permissions.query({name:"microphone"});return new UQ(l,b,E,d,y,Z,o)}catch(u){throw d?.getTracks().forEach(f=>{f.stop()}),l?.close(),u}}static getDeviceIdConstraint(A){if(A)return rh()?{ideal:A}:{exact:A}}muted=!1;volumeProvider;constructor(A,t,n,s,r,a,o=console.error){this.context=A,this.analyser=t,this.worklet=n,this.inputStream=s,this.mediaStreamSource=r,this.permissions=a,this.onError=o,this.permissions.addEventListener("change",this.handlePermissionsChange),this.worklet.port.start(),this.volumeProvider=ZI(t,A.sampleRate)}getAnalyser(){return this.analyser}getVolume(){return this.muted?0:this.volumeProvider.getVolume()}getByteFrequencyData(A){if(this.muted){A.fill(0);return}this.volumeProvider.getByteFrequencyData(A)}isMuted(){return this.muted}addListener(A){this.worklet.port.addEventListener("message",A)}removeListener(A){this.worklet.port.removeEventListener("message",A)}forgetInputStreamAndSource(){for(const A of this.inputStream.getTracks())A.stop();this.mediaStreamSource.disconnect()}async close(){this.forgetInputStreamAndSource(),this.permissions.removeEventListener("change",this.handlePermissionsChange),await this.context.close()}async setMuted(A){this.muted=A,this.worklet.port.postMessage({type:"setMuted",isMuted:A})}settingInput=!1;async setDevice(A){try{if(this.settingInput)throw new Error("Input device is already being set");this.settingInput=!0;const t=A?.inputDeviceId,n={...KM};t&&(n.deviceId=UQ.getDeviceIdConstraint(t));const s={voiceIsolation:!0,...n},r=await navigator.mediaDevices.getUserMedia({audio:s});this.forgetInputStreamAndSource(),this.inputStream=r,this.mediaStreamSource=this.context.createMediaStreamSource(r),this.mediaStreamSource.connect(this.analyser)}catch(t){throw this.onError("Failed to switch input device:",t),t}finally{this.settingInput=!1}}handlePermissionsChange=()=>{if(this.permissions.state==="denied")this.onError("Microphone permission denied");else if(!this.settingInput){const[A]=this.inputStream.getAudioTracks(),{deviceId:t}=A?.getSettings()??{};this.setDevice({inputDeviceId:t}).catch(n=>{this.onError("Failed to reset input device after permission change:",n)})}}}function f$(e,A){const t=n=>{const s=n.data[0];A.sendMessage({user_audio_chunk:WM(s.buffer)})};return e.addListener(t),()=>{e.removeListener(t)}}function h$(e,A){const t=n=>{A.playAudio(Jq(n.audio_base_64))};return e.addListener(t),()=>{e.removeListener(t)}}const w$={default:0,android:3e3};function jM(e,A="default"){const t=e??w$;return A==="android"?t.android??t.default:A==="ios"?t.ios??t.default:t.default}async function _M(e){e>0&&await new Promise(A=>setTimeout(A,e))}const Q$=3e4,b$=["touchstart","touchend","click"];let qu=null,$u=null,qM=!1;function C$(e){const A=e.createBuffer(1,1,22050),t=e.createBufferSource();t.buffer=A,t.connect(e.destination),t.start(0),e.resume().catch(()=>{})}function v$(){$u&&clearTimeout($u),$u=setTimeout(()=>{$u=null,O3()},Q$)}function $M(){$u&&(clearTimeout($u),$u=null)}function I$(){if(!rh()||qu)return;const e=new AudioContext;C$(e),qu=e,v$()}function p$(){if(!rh()||qM||typeof document>"u")return;qM=!0;const e=()=>{I$()};for(const A of b$)document.addEventListener(A,e,!0)}function H$(){const e=qu;return qu=null,$M(),e}function O3(){qu&&(qu.close().catch(()=>{}),qu=null,$M())}function m$(){return d$()?"android":rh()?"ios":"default"}async function AP(){if("wakeLock"in navigator)try{return await navigator.wakeLock.request("screen")}catch{}return null}async function E$(e,A,t){const[n,s]=await Promise.all([UQ.create({...A.inputFormat,preferHeadphonesForIosDevices:e.preferHeadphonesForIosDevices,inputDeviceId:e.inputDeviceId,inputChunkDurationMs:e.inputChunkDurationMs,workletPaths:e.workletPaths,libsampleratePath:e.libsampleratePath}),X3.create({...A.outputFormat,outputDeviceId:e.outputDeviceId,workletPaths:e.workletPaths,audioContext:t??void 0})]),r=f$(n,A),a=h$(A,s);return{input:n,output:s,playbackEventTarget:s,detach:async()=>{r(),a()}}}async function y$(e){const A=e.useWakeLock??!0;let t=null,n=null,s=null;try{A&&(t=await AP()),n=await navigator.mediaDevices.getUserMedia({audio:!0});const r=m$();await _M(jM(e.connectionDelay,r));const a=await LM(e);let o;try{a instanceof yI?(s=H$(),o={connection:a,...await E$(e,a,s)},s=null):(O3(),o=s$(a))}catch(d){throw await s?.close().catch(()=>{}),s=null,a.close(),d}if(n){for(const d of n.getTracks())d.stop();n=null}let c=null;t&&(c=()=>{document.visibilityState==="visible"&&t?.released&&AP().then(d=>{t=d})},document.addEventListener("visibilitychange",c));const l=o.detach;return{...o,detach:async()=>{await l(),c&&document.removeEventListener("visibilitychange",c);try{await t?.release(),t=null}catch{}}}}catch(r){if(n)for(const a of n.getTracks())a.stop();try{await t?.release(),t=null}catch{}throw O3(),r}}n$(y$);class Y${audioElements=[];inputAudioContext=null;audioCaptureContext=null;async attachRemoteTrack(A,t){const n=A.attach();if(n.autoplay=!0,n.controls=!1,t&&n.setSinkId)try{await n.setSinkId(t)}catch(s){console.warn("Failed to set output device for new audio element:",s)}n.style.display="none",document.body.appendChild(n),this.audioElements.push(n)}setupInputAnalysis(A){this.inputAudioContext&&(this.inputAudioContext.close().catch(()=>{}),this.inputAudioContext=null);const t=new AudioContext,n=t.createAnalyser();return t.createMediaStreamSource(new MediaStream([A])).connect(n),this.inputAudioContext=t,{volumeProvider:ZI(n,t.sampleRate),analyser:n}}async setupOutputAnalysis(A,t,n){this.audioCaptureContext&&(this.audioCaptureContext.close().catch(()=>{}),this.audioCaptureContext=null);const s=new AudioContext;this.audioCaptureContext=s;const r=s.createAnalyser();r.fftSize=2048,r.smoothingTimeConstant=.8;const a=new MediaStream([A.mediaStreamTrack]),o=s.createMediaStreamSource(a),c=ZI(r,s.sampleRate);await JM(s.audioWorklet);const l=new AudioWorkletNode(s,"rawAudioProcessor");return l.port.postMessage({type:"setFormat",format:t.format,sampleRate:t.sampleRate}),l.port.onmessage=d=>{const[u,f]=d.data;n(u.buffer,f)},o.connect(r),r.connect(l),{volumeProvider:c,analyser:r}}setVolume(A){for(const t of this.audioElements)t.volume=A}async setOutputDevice(A){if(!("setSinkId"in HTMLAudioElement.prototype))throw new Error("setSinkId is not supported in this browser");await Promise.all(this.audioElements.map(async t=>{try{await t.setSinkId(A)}catch(n){throw console.error("Failed to set sink ID for audio element:",n),n}}))}cleanup(){this.inputAudioContext&&(this.inputAudioContext.close().catch(A=>{console.warn("Error closing input audio context:",A)}),this.inputAudioContext=null),this.audioCaptureContext&&(this.audioCaptureContext.close().catch(A=>{console.warn("Error closing audio capture context:",A)}),this.audioCaptureContext=null);for(const A of this.audioElements)A.remove();this.audioElements=[]}}function Z$(){const e=["fetch","WebSocket","TextEncoder","TextDecoder","URL","btoa","atob"];for(const A of e)if(typeof globalThis[A]>"u")throw new Error(`${A} is not available in this environment.`)}const eP=new Uint8Array(0);class J3 extends Nv{type="text";setVolume(){throw new Error("setVolume is not supported in text conversations")}setMicMuted(){throw new Error("setMicMuted is not supported in text conversations")}getInputByteFrequencyData(){return eP}getOutputByteFrequencyData(){return eP}getInputVolume(){return 0}getOutputVolume(){return 0}static async startSession(A){const t=Nv.getFullOptions(A);t.onStatusChange&&t.onStatusChange({status:"connecting"}),t.onCanSendFeedbackChange&&t.onCanSendFeedbackChange({canSendFeedback:!1}),t.onModeChange&&t.onModeChange({mode:"listening"}),t.onCanSendFeedbackChange&&t.onCanSendFeedbackChange({canSendFeedback:!1});let n=null,s=null;try{return await _M(jM(t.connectionDelay)),n=await LM(t),s=new J3(t,n),t.onConversationCreated?.(s),s.markConnected(),t.onConnect?.({conversationId:n.conversationId}),s}catch(r){throw s?await s.endSession().catch(()=>{}):(t.onStatusChange?.({status:"disconnected"}),n?.close()),r}}}class AG extends Nv{input;output;playbackEventTarget;cleanUp;type="voice";static async startSession(A){const t=Nv.getFullOptions(A);t.onStatusChange&&t.onStatusChange({status:"connecting"}),t.onCanSendFeedbackChange&&t.onCanSendFeedbackChange({canSendFeedback:!1});let n=null,s=null;try{if(!L3)throw new Error('No voice session setup strategy registered. Import the platform-specific entry point (e.g. @elevenlabs/client via the "browser" export).');return s=await L3(t),n=new AG(t,s.connection,s.input,s.output,s.playbackEventTarget,s.detach),t.onConversationCreated?.(n),n.markConnected(),t.onConnect?.({conversationId:s.connection.conversationId}),n}catch(r){throw n?await n.endSession().catch(()=>{}):(s&&await s.detach().catch(()=>{}),t.onStatusChange?.({status:"disconnected"})),r}}inputFrequencyData;outputFrequencyData;handlePlaybackEvent=A=>{A.data.type==="process"&&this.updateMode(A.data.finished?"listening":"speaking")};constructor(A,t,n,s,r,a){super(A,t),this.input=n,this.output=s,this.playbackEventTarget=r,this.cleanUp=a,r?.addListener(this.handlePlaybackEvent)}async handleEndSession(){this.playbackEventTarget?.removeListener(this.handlePlaybackEvent),this.playbackEventTarget=null,await this.cleanUp(),await super.handleEndSession(),await this.input.close(),await this.output.close()}handleInterruption(A){super.handleInterruption(A),this.updateMode("listening"),this.output.interrupt()}handleAudio(A){super.handleAudio(A),A.audio_event.alignment&&this.options.onAudioAlignment&&this.options.onAudioAlignment(A.audio_event.alignment),this.lastInterruptTimestamp<=A.audio_event.event_id&&(A.audio_event.audio_base_64&&this.options.onAudio?.(A.audio_event.audio_base_64),this.currentEventId=A.audio_event.event_id,this.updateCanSendFeedback(),this.updateMode("speaking"))}static FREQUENCY_BIN_COUNT=1024;setMicMuted(A){this.input.setMuted(A).catch(t=>{this.options.onError?.("Failed to set input muted state",t)})}getInputByteFrequencyData(){return this.inputFrequencyData??=new Uint8Array(AG.FREQUENCY_BIN_COUNT),this.input.getByteFrequencyData(this.inputFrequencyData),this.inputFrequencyData}getOutputByteFrequencyData(){return this.outputFrequencyData??=new Uint8Array(AG.FREQUENCY_BIN_COUNT),this.output.getByteFrequencyData(this.outputFrequencyData),this.outputFrequencyData}getInputVolume(){return this.input.getVolume()}getOutputVolume(){return this.output.getVolume()}async changeInputDevice({sampleRate:A,format:t,preferHeadphonesForIosDevices:n,inputDeviceId:s}){try{await this.input.setDevice({inputDeviceId:s,sampleRate:A,format:t,preferHeadphonesForIosDevices:n})}catch(r){throw console.error("Error changing input device",r),r}}async changeOutputDevice({sampleRate:A,format:t,outputDeviceId:n}){try{await this.output.setDevice({outputDeviceId:n,sampleRate:A,format:t})}catch(s){throw console.error("Error changing output device",s),s}}setVolume=({volume:A})=>{const t=Number.isFinite(A)?Math.min(1,Math.max(0,A)):1;this.volume=t,this.output.setVolume(t)}}var tP;(function(e){e.SESSION_STARTED="session_started",e.PARTIAL_TRANSCRIPT="partial_transcript",e.COMMITTED_TRANSCRIPT="committed_transcript",e.COMMITTED_TRANSCRIPT_WITH_TIMESTAMPS="committed_transcript_with_timestamps",e.AUTH_ERROR="auth_error",e.ERROR="error",e.OPEN="open",e.CLOSE="close",e.QUOTA_EXCEEDED="quota_exceeded",e.COMMIT_THROTTLED="commit_throttled",e.TRANSCRIBER_ERROR="transcriber_error",e.UNACCEPTED_TERMS="unaccepted_terms",e.RATE_LIMITED="rate_limited",e.INPUT_ERROR="input_error",e.QUEUE_OVERFLOW="queue_overflow",e.RESOURCE_EXHAUSTED="resource_exhausted",e.SESSION_TIME_LIMIT_EXCEEDED="session_time_limit_exceeded",e.CHUNK_SIZE_EXCEEDED="chunk_size_exceeded",e.INSUFFICIENT_AUDIO_ACTIVITY="insufficient_audio_activity"})(tP||(tP={}));var nP;(function(e){e.PCM_8000="pcm_8000",e.PCM_16000="pcm_16000",e.PCM_22050="pcm_22050",e.PCM_24000="pcm_24000",e.PCM_44100="pcm_44100",e.PCM_48000="pcm_48000",e.ULAW_8000="ulaw_8000"})(nP||(nP={}));var sP;(function(e){e.MANUAL="manual",e.VAD="vad"})(sP||(sP={}));const k$={async startSession(e){return Z$(),WF(e)?J3.startSession(e):AG.startSession(e)}};p$(),_q(()=>new Y$);const ah=D.createContext(null);function rP(){return D.useContext(ah)?.conversation??null}function aP(){const e=D.useContext(ah);if(!e)throw new Error("useRawConversationRef must be used within a ConversationProvider");return e.conversationRef}function DQ(e){const A=D.useContext(ah);if(!A)throw new Error("useRegisterCallbacks must be used within a ConversationProvider");const{registerCallbacks:t}=A,n=D.useRef(e),s=Object.keys(e).filter(r=>e[r]!==void 0).sort().join("|");D.useLayoutEffect(()=>{n.current=e}),D.useLayoutEffect(()=>{const r=s===""?[]:s.split("|"),a=Object.fromEntries(r.map(o=>[o,(...c)=>{const l=n.current[o];typeof l=="function"&&l(...c)}]));return t(a)},[t,s])}const iP=new Uint8Array(0),oP=D.createContext(null);function U$({children:e}){const A=D.useContext(ah);if(!A)throw new Error("ConversationControlsProvider must be rendered inside a ConversationProvider");const{conversationRef:t}=A,n=D.useCallback(()=>{const S=t.current;if(!S)throw new Error("No active conversation. Call startSession() first.");return S},[t]),s=D.useCallback(S=>{n().sendUserMessage(S)},[n]),r=D.useCallback(S=>{n().sendMultimodalMessage(S)},[n]),a=D.useCallback(S=>n().uploadFile(S),[n]),o=D.useCallback((S,M)=>{n().sendContextualUpdate(S,M)},[n]),c=D.useCallback(()=>{n().sendUserActivity()},[n]),l=D.useCallback((S,M)=>{n().sendMCPToolApprovalResult(S,M)},[n]),d=D.useCallback(S=>{n().setVolume(S)},[n]),u=D.useCallback(async S=>{const M=n();if(M instanceof AG)return await M.changeInputDevice(S);throw new Error("Device switching is only available for voice conversations")},[n]),f=D.useCallback(async S=>{const M=n();if(M instanceof AG)return await M.changeOutputDevice(S);throw new Error("Device switching is only available for voice conversations")},[n]),b=D.useCallback(()=>t.current?.getInputByteFrequencyData()??iP,[t]),I=D.useCallback(()=>t.current?.getOutputByteFrequencyData()??iP,[t]),y=D.useCallback(()=>t.current?.getInputVolume()??0,[t]),E=D.useCallback(()=>t.current?.getOutputVolume()??0,[t]),Z=D.useCallback(()=>n().getId(),[n]),F=D.useMemo(()=>({startSession:A.startSession,endSession:A.endSession,sendUserMessage:s,sendMultimodalMessage:r,uploadFile:a,sendContextualUpdate:o,sendUserActivity:c,sendMCPToolApprovalResult:l,setVolume:d,changeInputDevice:u,changeOutputDevice:f,getInputByteFrequencyData:b,getOutputByteFrequencyData:I,getInputVolume:y,getOutputVolume:E,getId:Z}),[A.startSession,A.endSession,s,r,a,o,c,l,d,u,f,b,I,y,E,Z]);return p.jsx(oP.Provider,{value:F,children:e})}function D$(){const e=D.useContext(oP);if(!e)throw new Error("useConversationControls must be used within a ConversationProvider");return e}const BP=D.createContext(null);function F$({children:e}){const[A,t]=D.useState("disconnected"),[n,s]=D.useState(void 0);DQ({onStatusChange({status:a}){a!=="disconnecting"&&(t(a),s(void 0))},onError(a){t("error"),s(a)}});const r=D.useMemo(()=>({status:A,message:n}),[A,n]);return p.jsx(BP.Provider,{value:r,children:e})}function x$(){const e=D.useContext(BP);if(!e)throw new Error("useConversationStatus must be used within a ConversationProvider");return e}const cP=D.createContext(null);function M$({children:e,isMuted:A,onMutedChange:t}){const n=rP(),s=aP(),r=typeof A=="boolean",[a,o]=D.useState(!1),c=r?A:a;DQ({onDisconnect(){r||o(!1)}}),D.useEffect(()=>{r&&n&&n.setMicMuted(A)},[n,A,r]);const l=D.useCallback(u=>{const f=s.current;if(!f)throw new Error("No active conversation. Call startSession() first.");r||(f.setMicMuted(u),o(u)),t?.(u)},[s,r,t]),d=D.useMemo(()=>({isMuted:c,setMuted:l}),[c,l]);return p.jsx(cP.Provider,{value:d,children:e})}function P$(){const e=D.useContext(cP);if(!e)throw new Error("useConversationInput must be used within a ConversationProvider");return e}const lP=D.createContext(null);function T$({children:e}){const[A,t]=D.useState("listening");DQ({onModeChange({mode:s}){t(s)},onDisconnect(){t("listening")}});const n=D.useMemo(()=>({mode:A,isSpeaking:A==="speaking",isListening:A==="listening"}),[A]);return p.jsx(lP.Provider,{value:n,children:e})}function R$(){const e=D.useContext(lP);if(!e)throw new Error("useConversationMode must be used within a ConversationProvider");return e}const gP=D.createContext(null);function S$({children:e}){const A=aP(),[t,n]=D.useState(!1);DQ({onCanSendFeedbackChange({canSendFeedback:a}){n(a)},onDisconnect(){n(!1)}});const s=D.useCallback(a=>{A.current?.sendFeedback(a)},[A]),r=D.useMemo(()=>({canSendFeedback:t,sendFeedback:s}),[t,s]);return p.jsx(gP.Provider,{value:r,children:e})}function V$(){const e=D.useContext(gP);if(!e)throw new Error("useConversationFeedback must be used within a ConversationProvider");return e}function W$(e,A){const t={...e};for(const[n,s]of A){if(Object.hasOwn(t,n))throw new Error(`Client tool "${n}" is already provided via props/options. Remove it from props or do not register it with useConversationClientTool.`);t[n]=s}return t}const N$=D.createContext(null);function z$({children:e}){const A=D.useContext(ah);if(!A)throw new Error("ConversationClientToolsProvider must be rendered inside a ConversationProvider");const{clientToolsRegistry:t,clientToolsRef:n}=A,s=D.useCallback((r,a)=>{if(t.has(r))throw new Error(`Client tool "${r}" is already registered by another hook. Each tool name must be unique.`);return t.set(r,a),n.current[r]=a,()=>{t.get(r)===a&&t.delete(r),n.current[r]===a&&delete n.current[r]}},[t,n]);return p.jsx(N$.Provider,{value:s,children:e})}class L${listeners=new Set;add(A){return this.listeners.add(A),()=>{this.listeners.delete(A)}}invoke(...A){for(const t of this.listeners)t(...A)}get size(){return this.listeners.size}}function X$(e,A){if(typeof e!="function")throw new Error(`Expected function for key "${A}", got ${typeof e}`)}class O${sets=new Map;constructor(A){for(const t of A)this.sets.set(t,new L$)}register(A){const t=Object.entries(A).filter(([,n])=>n!==void 0).map(([n,s])=>{X$(s,n);const r=this.sets.get(n);if(!r)throw new Error(`Unknown callback key "${n}"`);return r.add(s)});return()=>{for(const n of t)n()}}compose(){return Object.fromEntries(Array.from(this.sets.entries()).filter(([,A])=>A.size>0).map(([A,t])=>[A,(...n)=>{t.invoke(...n)}]))}}function dP(e){const A=D.useRef({}),t=gQ.filter(r=>e[r]!==void 0),n=t.join("|"),s=D.useMemo(()=>Object.fromEntries(t.map(r=>[r,(...a)=>{const o=A.current[r];o?.(...a)}])),[n]);for(const r of gQ)A.current[r]=e[r];return s}const J$=[U$,F$,T$,S$,z$];function K$({children:e,isMuted:A,onMutedChange:t,...n}){const s=D.useRef(null),r=D.useRef(null),a=D.useRef(0),o=D.useRef(!1),[c]=D.useState(()=>new Map),l=D.useRef({}),d=D.useRef(n);d.current=n;const[u]=D.useState(()=>new O$(gQ)),[f,b]=D.useState(null),I=dP(n),y=D.useCallback(M=>u.register(M),[u]);D.useLayoutEffect(()=>u.register({onDisconnect:()=>{s.current=null,b(null)}}),[u]);const E=D.useCallback(M=>{if(s.current||r.current)return;o.current=!1;const x=++a.current,V=d.current,N=mK(M?.serverLocation||V?.serverLocation),z=EK(N),q=yK(N),_={...V};for(const EA of gQ)delete _[EA];const sA=HK({livekitUrl:q},_,I,u.compose(),M??{},{origin:z}),oA=W$(sA.clientTools,c);l.current=oA,sA.clientTools=oA;const CA=sA.onConversationCreated,fA=()=>x!==a.current,eA={...sA,...{onConversationCreated:EA=>{o.current||fA()||(s.current=EA,b(EA),CA?.(EA))},onConnect:EA=>{o.current||fA()||(r.current=null,sA.onConnect?.(EA))}}};r.current=k$.startSession(eA),r.current.then(EA=>{if(!fA()){if(o.current){EA.endSession(),r.current=null;return}s.current!==EA&&(s.current=EA,b(EA)),r.current=null}},EA=>{if(fA()||(s.current=null,b(null),r.current=null,o.current))return;const tA=EA instanceof Error?EA.message:"Session failed to start";sA.onError?.(tA,EA)})},[I,u,c,l]),Z=D.useCallback(()=>{o.current=!0;const M=r.current,x=s.current;s.current=null,b(null),M?M.then(V=>V.endSession(),()=>{}):x?.endSession()},[]);D.useEffect(()=>()=>{o.current=!0,r.current?r.current.then(M=>M.endSession(),()=>{}):s.current?.endSession()},[]);const F=D.useMemo(()=>({conversation:f,conversationRef:s,startSession:E,endSession:Z,registerCallbacks:y,clientToolsRegistry:c,clientToolsRef:l}),[f,s,E,Z,y,c,l]),S=J$.reduceRight((M,x)=>p.jsx(x,{children:M}),p.jsx(M$,{isMuted:A,onMutedChange:t,children:e}));return p.jsx(ah.Provider,{value:F,children:S})}function j$(e={}){const{micMuted:A,volume:t,...n}=e,s=dP(n);DQ(s);const r=D.useRef(n);r.current=n;const a=D$(),{status:o,message:c}=x$(),{isMuted:l,setMuted:d}=P$(),{mode:u,isSpeaking:f,isListening:b}=R$(),{canSendFeedback:I,sendFeedback:y}=V$(),E=D.useCallback(F=>{const S={...r.current};for(const M of gQ)delete S[M];a.startSession({...S,...F})},[a,r]),Z=rP();return D.useEffect(()=>{A!==void 0&&Z&&d(A)},[A,Z,d]),D.useEffect(()=>{t!==void 0&&Z&&Z.setVolume({volume:t})},[t,Z]),{...a,startSession:E,status:o,message:c,isMuted:A??l,setMuted:d,mode:u,isSpeaking:f,isListening:b,canSendFeedback:I,sendFeedback:y}}YK({name:"react_sdk",version:B$});function uP(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function _$(e={}){let{initialEntries:A=["/"],initialIndex:t,v5Compat:n=!1}=e,s;s=A.map((b,I)=>d(b,typeof b=="string"?null:b.state,I===0?"default":void 0,typeof b=="string"?void 0:b.mask));let r=c(t??s.length-1),a="POP",o=null;function c(b){return Math.min(Math.max(b,0),s.length-1)}function l(){return s[r]}function d(b,I=null,y,E){let Z=$$(s?l().pathname:"/",b,I,y,E);return _o(Z.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(b)}`),Z}function u(b){return typeof b=="string"?b:kI(b)}return{get index(){return r},get action(){return a},get location(){return l()},createHref:u,createURL(b){return new URL(u(b),"http://localhost")},encodeLocation(b){let I=typeof b=="string"?eG(b):b;return{pathname:I.pathname||"",search:I.search||"",hash:I.hash||""}},push(b,I){a="PUSH";let y=uP(b)?b:d(b,I);r+=1,s.splice(r,s.length,y),n&&o&&o({action:a,location:y,delta:1})},replace(b,I){a="REPLACE";let y=uP(b)?b:d(b,I);s[r]=y,n&&o&&o({action:a,location:y,delta:0})},go(b){a="POP";let I=c(r+b),y=s[I];r=I,o&&o({action:a,location:y,delta:b})},listen(b){return o=b,()=>{o=null}}}}function As(e,A){if(e===!1||e===null||typeof e>"u")throw new Error(A)}function _o(e,A){if(!e){typeof console<"u"&&console.warn(A);try{throw new Error(A)}catch{}}}function q$(){return Math.random().toString(36).substring(2,10)}function $$(e,A,t=null,n,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof A=="string"?eG(A):A,state:t,key:A&&A.key||n||q$(),mask:s}}function kI({pathname:e="/",search:A="",hash:t=""}){return A&&A!=="?"&&(e+=A.charAt(0)==="?"?A:"?"+A),t&&t!=="#"&&(e+=t.charAt(0)==="#"?t:"#"+t),e}function eG(e){let A={};if(e){let t=e.indexOf("#");t>=0&&(A.hash=e.substring(t),e=e.substring(0,t));let n=e.indexOf("?");n>=0&&(A.search=e.substring(n),e=e.substring(0,n)),e&&(A.pathname=e)}return A}function GP(e,A,t="/"){return AAA(e,A,t,!1)}function AAA(e,A,t,n,s){let r=typeof A=="string"?eG(A):A,a=Il(r.pathname||"/",t);if(a==null)return null;let o=eAA(e),c=null,l=dAA(a);for(let d=0;c==null&&d<o.length;++d)c=lAA(o[d],l,n);return c}function eAA(e){let A=fP(e);return tAA(A),A}function fP(e,A=[],t=[],n="",s=!1){let r=(a,o,c=s,l)=>{let d={relativePath:l===void 0?a.path||"":l,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};if(d.relativePath.startsWith("/")){if(!d.relativePath.startsWith(n)&&c)return;As(d.relativePath.startsWith(n),`Absolute route path "${d.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(n.length)}let u=qo([n,d.relativePath]),f=t.concat(d);a.children&&a.children.length>0&&(As(a.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),fP(a.children,A,f,u,c)),!(a.path==null&&!a.index)&&A.push({path:u,score:BAA(u,a.index),routesMeta:f})};return e.forEach((a,o)=>{if(a.path===""||!a.path?.includes("?"))r(a,o);else for(let c of hP(a.path))r(a,o,!0,c)}),A}function hP(e){let A=e.split("/");if(A.length===0)return[];let[t,...n]=A,s=t.endsWith("?"),r=t.replace(/\?$/,"");if(n.length===0)return s?[r,""]:[r];let a=hP(n.join("/")),o=[];return o.push(...a.map(c=>c===""?r:[r,c].join("/"))),s&&o.push(...a),o.map(c=>e.startsWith("/")&&c===""?"/":c)}function tAA(e){e.sort((A,t)=>A.score!==t.score?t.score-A.score:cAA(A.routesMeta.map(n=>n.childrenIndex),t.routesMeta.map(n=>n.childrenIndex)))}var nAA=/^:[\w-]+$/,sAA=3,rAA=2,aAA=1,iAA=10,oAA=-2,wP=e=>e==="*";function BAA(e,A){let t=e.split("/"),n=t.length;return t.some(wP)&&(n+=oAA),A&&(n+=rAA),t.filter(s=>!wP(s)).reduce((s,r)=>s+(nAA.test(r)?sAA:r===""?aAA:iAA),n)}function cAA(e,A){return e.length===A.length&&e.slice(0,-1).every((n,s)=>n===A[s])?e[e.length-1]-A[A.length-1]:0}function lAA(e,A,t=!1){let{routesMeta:n}=e,s={},r="/",a=[];for(let o=0;o<n.length;++o){let c=n[o],l=o===n.length-1,d=r==="/"?A:A.slice(r.length)||"/",u=UI({path:c.relativePath,caseSensitive:c.caseSensitive,end:l},d),f=c.route;if(!u&&l&&t&&!n[n.length-1].route.index&&(u=UI({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!u)return null;Object.assign(s,u.params),a.push({params:s,pathname:qo([r,u.pathname]),pathnameBase:hAA(qo([r,u.pathnameBase])),route:f}),u.pathnameBase!=="/"&&(r=qo([r,u.pathnameBase]))}return a}function UI(e,A){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[t,n]=gAA(e.path,e.caseSensitive,e.end),s=A.match(t);if(!s)return null;let r=s[0],a=r.replace(/(.)\/+$/,"$1"),o=s.slice(1);return{params:n.reduce((l,{paramName:d,isOptional:u},f)=>{if(d==="*"){let I=o[f]||"";a=r.slice(0,r.length-I.length).replace(/(.)\/+$/,"$1")}const b=o[f];return u&&!b?l[d]=void 0:l[d]=(b||"").replace(/%2F/g,"/"),l},{}),pathname:r,pathnameBase:a,pattern:e}}function gAA(e,A=!1,t=!0){_o(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,o,c,l,d)=>{if(n.push({paramName:o,isOptional:c!=null}),c){let u=d.charAt(l+a.length);return u&&u!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,A?void 0:"i"),n]}function dAA(e){try{return e.split("/").map(A=>decodeURIComponent(A).replace(/\//g,"%2F")).join("/")}catch(A){return _o(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${A}).`),e}}function Il(e,A){if(A==="/")return e;if(!e.toLowerCase().startsWith(A.toLowerCase()))return null;let t=A.endsWith("/")?A.length-1:A.length,n=e.charAt(t);return n&&n!=="/"?null:e.slice(t)||"/"}var uAA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function GAA(e,A="/"){let{pathname:t,search:n="",hash:s=""}=typeof e=="string"?eG(e):e,r;return t?(t=CP(t),t.startsWith("/")?r=QP(t.substring(1),"/"):r=QP(t,A)):r=A,{pathname:r,search:wAA(n),hash:QAA(s)}}function QP(e,A){let t=DI(A).split("/");return e.split("/").forEach(s=>{s===".."?t.length>1&&t.pop():s!=="."&&t.push(s)}),t.length>1?t.join("/"):"/"}function K3(e,A,t,n){return`Cannot include a '${e}' character in a manually specified \`to.${A}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${t}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function fAA(e){return e.filter((A,t)=>t===0||A.route.path&&A.route.path.length>0)}function bP(e){let A=fAA(e);return A.map((t,n)=>n===A.length-1?t.pathname:t.pathnameBase)}function j3(e,A,t,n=!1){let s;typeof e=="string"?s=eG(e):(s={...e},As(!s.pathname||!s.pathname.includes("?"),K3("?","pathname","search",s)),As(!s.pathname||!s.pathname.includes("#"),K3("#","pathname","hash",s)),As(!s.search||!s.search.includes("#"),K3("#","search","hash",s)));let r=e===""||s.pathname==="",a=r?"/":s.pathname,o;if(a==null)o=t;else{let u=A.length-1;if(!n&&a.startsWith("..")){let f=a.split("/");for(;f[0]==="..";)f.shift(),u-=1;s.pathname=f.join("/")}o=u>=0?A[u]:"/"}let c=GAA(s,o),l=a&&a!=="/"&&a.endsWith("/"),d=(r||a===".")&&t.endsWith("/");return!c.pathname.endsWith("/")&&(l||d)&&(c.pathname+="/"),c}var CP=e=>e.replace(/\/\/+/g,"/"),qo=e=>CP(e.join("/")),DI=e=>e.replace(/\/+$/,""),hAA=e=>DI(e).replace(/^\/*/,"/"),wAA=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,QAA=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,bAA=class{constructor(e,A,t,n=!1){this.status=e,this.statusText=A||"",this.internal=n,t instanceof Error?(this.data=t.toString(),this.error=t):this.data=t}};function CAA(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function vAA(e){let A=e.map(t=>t.route.path).filter(Boolean);return qo(A)||"/"}var vP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function IP(e,A){let t=e;if(typeof t!="string"||!uAA.test(t))return{absoluteURL:void 0,isExternal:!1,to:t};let n=t,s=!1;if(vP)try{let r=new URL(window.location.href),a=t.startsWith("//")?new URL(r.protocol+t):new URL(t),o=Il(a.pathname,A);a.origin===r.origin&&o!=null?t=o+a.search+a.hash:s=!0}catch{_o(!1,`<Link to="${t}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:s,to:t}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var pP=["POST","PUT","PATCH","DELETE"];new Set(pP);var IAA=["GET",...pP];new Set(IAA);var ih=D.createContext(null);ih.displayName="DataRouter";var FI=D.createContext(null);FI.displayName="DataRouterState";var HP=D.createContext(!1);function pAA(){return D.useContext(HP)}var mP=D.createContext({isTransitioning:!1});mP.displayName="ViewTransition";var HAA=D.createContext(new Map);HAA.displayName="Fetchers";var mAA=D.createContext(null);mAA.displayName="Await";var ro=D.createContext(null);ro.displayName="Navigation";var FQ=D.createContext(null);FQ.displayName="Location";var pl=D.createContext({outlet:null,matches:[],isDataRoute:!1});pl.displayName="Route";var _3=D.createContext(null);_3.displayName="RouteError";var EP="REACT_ROUTER_ERROR",EAA="REDIRECT",yAA="ROUTE_ERROR_RESPONSE";function YAA(e){if(e.startsWith(`${EP}:${EAA}:{`))try{let A=JSON.parse(e.slice(28));if(typeof A=="object"&&A&&typeof A.status=="number"&&typeof A.statusText=="string"&&typeof A.location=="string"&&typeof A.reloadDocument=="boolean"&&typeof A.replace=="boolean")return A}catch{}}function ZAA(e){if(e.startsWith(`${EP}:${yAA}:{`))try{let A=JSON.parse(e.slice(40));if(typeof A=="object"&&A&&typeof A.status=="number"&&typeof A.statusText=="string")return new bAA(A.status,A.statusText,A.data)}catch{}}function kAA(e,{relative:A}={}){As(xQ(),"useHref() may be used only in the context of a <Router> component.");let{basename:t,navigator:n}=D.useContext(ro),{hash:s,pathname:r,search:a}=MQ(e,{relative:A}),o=r;return t!=="/"&&(o=r==="/"?t:qo([t,r])),n.createHref({pathname:o,search:a,hash:s})}function xQ(){return D.useContext(FQ)!=null}function $o(){return As(xQ(),"useLocation() may be used only in the context of a <Router> component."),D.useContext(FQ).location}var yP="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function YP(e){D.useContext(ro).static||D.useLayoutEffect(e)}function ca(){let{isDataRoute:e}=D.useContext(pl);return e?zAA():UAA()}function UAA(){As(xQ(),"useNavigate() may be used only in the context of a <Router> component.");let e=D.useContext(ih),{basename:A,navigator:t}=D.useContext(ro),{matches:n}=D.useContext(pl),{pathname:s}=$o(),r=JSON.stringify(bP(n)),a=D.useRef(!1);return YP(()=>{a.current=!0}),D.useCallback((c,l={})=>{if(_o(a.current,yP),!a.current)return;if(typeof c=="number"){t.go(c);return}let d=j3(c,JSON.parse(r),s,l.relative==="path");e==null&&A!=="/"&&(d.pathname=d.pathname==="/"?A:qo([A,d.pathname])),(l.replace?t.replace:t.push)(d,l.state,l)},[A,t,r,s,e])}D.createContext(null);function MQ(e,{relative:A}={}){let{matches:t}=D.useContext(pl),{pathname:n}=$o(),s=JSON.stringify(bP(t));return D.useMemo(()=>j3(e,JSON.parse(s),n,A==="path"),[e,s,n,A])}function DAA(e,A){return ZP(e,A)}function ZP(e,A,t){As(xQ(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=D.useContext(ro),{matches:s}=D.useContext(pl),r=s[s.length-1],a=r?r.params:{},o=r?r.pathname:"/",c=r?r.pathnameBase:"/",l=r&&r.route;{let E=l&&l.path||"";DP(o,!l||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${o}" (under <Route path="${E}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
324
324
|
|
|
325
|
-
Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let d=$o(),u;if(A){let E=typeof A=="string"?eG(A):A;As(c==="/"||E.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${E.pathname}" was given in the \`location\` prop.`),u=E}else u=d;let f=u.pathname||"/",b=f;if(c!=="/"){let E=c.replace(/^\//,"").split("/");b="/"+f.replace(/^\//,"").split("/").slice(E.length).join("/")}let I=t&&t.state.matches.length?t.state.matches.map(E=>Object.assign(E,{route:t.manifest[E.route.id]||E.route})):GP(e,{pathname:b});_o(l||I!=null,`No routes matched location "${u.pathname}${u.search}${u.hash}" `),_o(I==null||I[I.length-1].route.element!==void 0||I[I.length-1].route.Component!==void 0||I[I.length-1].route.lazy!==void 0,`Matched leaf route at location "${u.pathname}${u.search}${u.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let y=TAA(I&&I.map(E=>Object.assign({},E,{params:Object.assign({},a,E.params),pathname:qo([c,n.encodeLocation?n.encodeLocation(E.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?c:qo([c,n.encodeLocation?n.encodeLocation(E.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),s,t);return A&&y?D.createElement(FQ.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...u},navigationType:"POP"}},y):y}function FAA(){let e=NAA(),A=CAA(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),t=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:n},r={padding:"2px 4px",backgroundColor:n},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=D.createElement(D.Fragment,null,D.createElement("p",null,"💿 Hey developer 👋"),D.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",D.createElement("code",{style:r},"ErrorBoundary")," or"," ",D.createElement("code",{style:r},"errorElement")," prop on your route.")),D.createElement(D.Fragment,null,D.createElement("h2",null,"Unexpected Application Error!"),D.createElement("h3",{style:{fontStyle:"italic"}},A),t?D.createElement("pre",{style:s},t):null,a)}var xAA=D.createElement(FAA,null),kP=class extends D.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,A){return A.location!==e.location||A.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:A.error,location:A.location,revalidation:e.revalidation||A.revalidation}}componentDidCatch(e,A){this.props.onError?this.props.onError(e,A):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const t=ZAA(e.digest);t&&(e=t)}let A=e!==void 0?D.createElement(pl.Provider,{value:this.props.routeContext},D.createElement(_3.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?D.createElement(MAA,{error:e},A):A}};kP.contextType=HP;var q3=new WeakMap;function MAA({children:e,error:A}){let{basename:t}=D.useContext(ro);if(typeof A=="object"&&A&&"digest"in A&&typeof A.digest=="string"){let n=YAA(A.digest);if(n){let s=q3.get(A);if(s)throw s;let r=IP(n.location,t);if(vP&&!q3.get(A))if(r.isExternal||n.reloadDocument)window.location.href=r.absoluteURL||r.to;else{const a=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(r.to,{replace:n.replace}));throw q3.set(A,a),a}return D.createElement("meta",{httpEquiv:"refresh",content:`0;url=${r.absoluteURL||r.to}`})}}return e}function PAA({routeContext:e,match:A,children:t}){let n=D.useContext(ih);return n&&n.static&&n.staticContext&&(A.route.errorElement||A.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=A.route.id),D.createElement(pl.Provider,{value:e},t)}function TAA(e,A=[],t){let n=t?.state;if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(A.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,r=n?.errors;if(r!=null){let d=s.findIndex(u=>u.route.id&&r?.[u.route.id]!==void 0);As(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(r).join(",")}`),s=s.slice(0,Math.min(s.length,d+1))}let a=!1,o=-1;if(t&&n){a=n.renderFallback;for(let d=0;d<s.length;d++){let u=s[d];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(o=d),u.route.id){let{loaderData:f,errors:b}=n,I=u.route.loader&&!f.hasOwnProperty(u.route.id)&&(!b||b[u.route.id]===void 0);if(u.route.lazy||I){t.isStatic&&(a=!0),o>=0?s=s.slice(0,o+1):s=[s[0]];break}}}}let c=t?.onError,l=n&&c?(d,u)=>{c(d,{location:n.location,params:n.matches?.[0]?.params??{},pattern:vAA(n.matches),errorInfo:u})}:void 0;return s.reduceRight((d,u,f)=>{let b,I=!1,y=null,E=null;n&&(b=r&&u.route.id?r[u.route.id]:void 0,y=u.route.errorElement||xAA,a&&(o<0&&f===0?(DP("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),I=!0,E=null):o===f&&(I=!0,E=u.route.hydrateFallbackElement||null)));let Z=A.concat(s.slice(0,f+1)),F=()=>{let S;return b?S=y:I?S=E:u.route.Component?S=D.createElement(u.route.Component,null):u.route.element?S=u.route.element:S=d,D.createElement(PAA,{match:u,routeContext:{outlet:d,matches:Z,isDataRoute:n!=null},children:S})};return n&&(u.route.ErrorBoundary||u.route.errorElement||f===0)?D.createElement(kP,{location:n.location,revalidation:n.revalidation,component:y,error:b,children:F(),routeContext:{outlet:null,matches:Z,isDataRoute:!0},onError:l}):F()},null)}function $3(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function RAA(e){let A=D.useContext(ih);return As(A,$3(e)),A}function SAA(e){let A=D.useContext(FI);return As(A,$3(e)),A}function VAA(e){let A=D.useContext(pl);return As(A,$3(e)),A}function Ay(e){let A=VAA(e),t=A.matches[A.matches.length-1];return As(t.route.id,`${e} can only be used on routes that contain a unique "id"`),t.route.id}function WAA(){return Ay("useRouteId")}function NAA(){let e=D.useContext(_3),A=SAA("useRouteError"),t=Ay("useRouteError");return e!==void 0?e:A.errors?.[t]}function zAA(){let{router:e}=RAA("useNavigate"),A=Ay("useNavigate"),t=D.useRef(!1);return YP(()=>{t.current=!0}),D.useCallback(async(s,r={})=>{_o(t.current,yP),t.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:A,...r}))},[e,A])}var UP={};function DP(e,A,t){!A&&!UP[e]&&(UP[e]=!0,_o(!1,t))}D.memo(LAA);function LAA({routes:e,manifest:A,future:t,state:n,isStatic:s,onError:r}){return ZP(e,void 0,{manifest:A,state:n,isStatic:s,onError:r})}function XAA({basename:e,children:A,initialEntries:t,initialIndex:n,useTransitions:s}){let r=D.useRef();r.current==null&&(r.current=_$({initialEntries:t,initialIndex:n,v5Compat:!0}));let a=r.current,[o,c]=D.useState({action:a.action,location:a.location}),l=D.useCallback(d=>{s===!1?c(d):D.startTransition(()=>c(d))},[s]);return D.useLayoutEffect(()=>a.listen(l),[a,l]),D.createElement(OAA,{basename:e,children:A,location:o.location,navigationType:o.action,navigator:a,useTransitions:s})}function rc(e){As(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function OAA({basename:e="/",children:A=null,location:t,navigationType:n="POP",navigator:s,static:r=!1,useTransitions:a}){As(!xQ(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),c=D.useMemo(()=>({basename:o,navigator:s,static:r,useTransitions:a,future:{}}),[o,s,r,a]);typeof t=="string"&&(t=eG(t));let{pathname:l="/",search:d="",hash:u="",state:f=null,key:b="default",mask:I}=t,y=D.useMemo(()=>{let E=Il(l,o);return E==null?null:{location:{pathname:E,search:d,hash:u,state:f,key:b,mask:I},navigationType:n}},[o,l,d,u,f,b,n,I]);return _o(y!=null,`<Router basename="${o}"> is not able to match the URL "${l}${d}${u}" because it does not start with the basename, so the <Router> won't render anything.`),y==null?null:D.createElement(ro.Provider,{value:c},D.createElement(FQ.Provider,{children:A,value:y}))}function JAA({children:e,location:A}){return DAA(ey(e),A)}function ey(e,A=[]){let t=[];return D.Children.forEach(e,(n,s)=>{if(!D.isValidElement(n))return;let r=[...A,s];if(n.type===D.Fragment){t.push.apply(t,ey(n.props.children,r));return}As(n.type===rc,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),As(!n.props.index||!n.props.children,"An index route cannot have child routes.");let a={id:n.props.id||r.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(a.children=ey(n.props.children,r)),t.push(a)}),t}var xI="get",MI="application/x-www-form-urlencoded";function PI(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function KAA(e){return PI(e)&&e.tagName.toLowerCase()==="button"}function jAA(e){return PI(e)&&e.tagName.toLowerCase()==="form"}function _AA(e){return PI(e)&&e.tagName.toLowerCase()==="input"}function qAA(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function $AA(e,A){return e.button===0&&(!A||A==="_self")&&!qAA(e)}var TI=null;function AeA(){if(TI===null)try{new FormData(document.createElement("form"),0),TI=!1}catch{TI=!0}return TI}var eeA=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ty(e){return e!=null&&!eeA.has(e)?(_o(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${MI}"`),null):e}function teA(e,A){let t,n,s,r,a;if(jAA(e)){let o=e.getAttribute("action");n=o?Il(o,A):null,t=e.getAttribute("method")||xI,s=ty(e.getAttribute("enctype"))||MI,r=new FormData(e)}else if(KAA(e)||_AA(e)&&(e.type==="submit"||e.type==="image")){let o=e.form;if(o==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||o.getAttribute("action");if(n=c?Il(c,A):null,t=e.getAttribute("formmethod")||o.getAttribute("method")||xI,s=ty(e.getAttribute("formenctype"))||ty(o.getAttribute("enctype"))||MI,r=new FormData(o,e),!AeA()){let{name:l,type:d,value:u}=e;if(d==="image"){let f=l?`${l}.`:"";r.append(`${f}x`,"0"),r.append(`${f}y`,"0")}else l&&r.append(l,u)}}else{if(PI(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');t=xI,n=null,s=MI,a=e}return r&&s==="text/plain"&&(a=r,r=void 0),{action:n,method:t.toLowerCase(),encType:s,formData:r,body:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ny(e,A){if(e===!1||e===null||typeof e>"u")throw new Error(A)}function FP(e,A,t,n){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return t?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${n}`:s.pathname=`${s.pathname}.${n}`:s.pathname==="/"?s.pathname=`_root.${n}`:A&&Il(s.pathname,A)==="/"?s.pathname=`${DI(A)}/_root.${n}`:s.pathname=`${DI(s.pathname)}.${n}`,s}async function neA(e,A){if(e.id in A)return A[e.id];try{let t=await import(e.module);return A[e.id]=t,t}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function seA(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function reA(e,A,t){let n=await Promise.all(e.map(async s=>{let r=A.routes[s.route.id];if(r){let a=await neA(r,t);return a.links?a.links():[]}return[]}));return BeA(n.flat(1).filter(seA).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function xP(e,A,t,n,s,r){let a=(c,l)=>t[l]?c.route.id!==t[l].route.id:!0,o=(c,l)=>t[l].pathname!==c.pathname||t[l].route.path?.endsWith("*")&&t[l].params["*"]!==c.params["*"];return r==="assets"?A.filter((c,l)=>a(c,l)||o(c,l)):r==="data"?A.filter((c,l)=>{let d=n.routes[c.route.id];if(!d||!d.hasLoader)return!1;if(a(c,l)||o(c,l))return!0;if(c.route.shouldRevalidate){let u=c.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:t[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof u=="boolean")return u}return!0}):[]}function aeA(e,A,{includeHydrateFallback:t}={}){return ieA(e.map(n=>{let s=A.routes[n.route.id];if(!s)return[];let r=[s.module];return s.clientActionModule&&(r=r.concat(s.clientActionModule)),s.clientLoaderModule&&(r=r.concat(s.clientLoaderModule)),t&&s.hydrateFallbackModule&&(r=r.concat(s.hydrateFallbackModule)),s.imports&&(r=r.concat(s.imports)),r}).flat(1))}function ieA(e){return[...new Set(e)]}function oeA(e){let A={},t=Object.keys(e).sort();for(let n of t)A[n]=e[n];return A}function BeA(e,A){let t=new Set;return new Set(A),e.reduce((n,s)=>{let r=JSON.stringify(oeA(s));return t.has(r)||(t.add(r),n.push({key:r,link:s})),n},[])}function sy(){let e=D.useContext(ih);return ny(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function ceA(){let e=D.useContext(FI);return ny(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ry=D.createContext(void 0);ry.displayName="FrameworkContext";function ay(){let e=D.useContext(ry);return ny(e,"You must render this element inside a <HydratedRouter> element"),e}function leA(e,A){let t=D.useContext(ry),[n,s]=D.useState(!1),[r,a]=D.useState(!1),{onFocus:o,onBlur:c,onMouseEnter:l,onMouseLeave:d,onTouchStart:u}=A,f=D.useRef(null);D.useEffect(()=>{if(e==="render"&&a(!0),e==="viewport"){let y=Z=>{Z.forEach(F=>{a(F.isIntersecting)})},E=new IntersectionObserver(y,{threshold:.5});return f.current&&E.observe(f.current),()=>{E.disconnect()}}},[e]),D.useEffect(()=>{if(n){let y=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(y)}}},[n]);let b=()=>{s(!0)},I=()=>{s(!1),a(!1)};return t?e!=="intent"?[r,f,{}]:[r,f,{onFocus:PQ(o,b),onBlur:PQ(c,I),onMouseEnter:PQ(l,b),onMouseLeave:PQ(d,I),onTouchStart:PQ(u,b)}]:[!1,f,{}]}function PQ(e,A){return t=>{e&&e(t),t.defaultPrevented||A(t)}}function geA({page:e,...A}){let t=pAA(),{router:n}=sy(),s=D.useMemo(()=>GP(n.routes,e,n.basename),[n.routes,e,n.basename]);return s?t?D.createElement(ueA,{page:e,matches:s,...A}):D.createElement(GeA,{page:e,matches:s,...A}):null}function deA(e){let{manifest:A,routeModules:t}=ay(),[n,s]=D.useState([]);return D.useEffect(()=>{let r=!1;return reA(e,A,t).then(a=>{r||s(a)}),()=>{r=!0}},[e,A,t]),n}function ueA({page:e,matches:A,...t}){let n=$o(),{future:s}=ay(),{basename:r}=sy(),a=D.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let o=FP(e,r,s.unstable_trailingSlashAwareDataRequests,"rsc"),c=!1,l=[];for(let d of A)typeof d.route.shouldRevalidate=="function"?c=!0:l.push(d.route.id);return c&&l.length>0&&o.searchParams.set("_routes",l.join(",")),[o.pathname+o.search]},[r,s.unstable_trailingSlashAwareDataRequests,e,n,A]);return D.createElement(D.Fragment,null,a.map(o=>D.createElement("link",{key:o,rel:"prefetch",as:"fetch",href:o,...t})))}function GeA({page:e,matches:A,...t}){let n=$o(),{future:s,manifest:r,routeModules:a}=ay(),{basename:o}=sy(),{loaderData:c,matches:l}=ceA(),d=D.useMemo(()=>xP(e,A,l,r,n,"data"),[e,A,l,r,n]),u=D.useMemo(()=>xP(e,A,l,r,n,"assets"),[e,A,l,r,n]),f=D.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let y=new Set,E=!1;if(A.forEach(F=>{let S=r.routes[F.route.id];!S||!S.hasLoader||(!d.some(M=>M.route.id===F.route.id)&&F.route.id in c&&a[F.route.id]?.shouldRevalidate||S.hasClientLoader?E=!0:y.add(F.route.id))}),y.size===0)return[];let Z=FP(e,o,s.unstable_trailingSlashAwareDataRequests,"data");return E&&y.size>0&&Z.searchParams.set("_routes",A.filter(F=>y.has(F.route.id)).map(F=>F.route.id).join(",")),[Z.pathname+Z.search]},[o,s.unstable_trailingSlashAwareDataRequests,c,n,r,d,A,e,a]),b=D.useMemo(()=>aeA(u,r),[u,r]),I=deA(u);return D.createElement(D.Fragment,null,f.map(y=>D.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...t})),b.map(y=>D.createElement("link",{key:y,rel:"modulepreload",href:y,...t})),I.map(({key:y,link:E})=>D.createElement("link",{key:y,nonce:t.nonce,...E,crossOrigin:E.crossOrigin??t.crossOrigin})))}function feA(...e){return A=>{e.forEach(t=>{typeof t=="function"?t(A):t!=null&&(t.current=A)})}}var heA=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{heA&&(window.__reactRouterVersion="7.15.1")}catch{}var MP=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,RI=D.forwardRef(function({onClick:A,discover:t="render",prefetch:n="none",relative:s,reloadDocument:r,replace:a,mask:o,state:c,target:l,to:d,preventScrollReset:u,viewTransition:f,defaultShouldRevalidate:b,...I},y){let{basename:E,navigator:Z,useTransitions:F}=D.useContext(ro),S=typeof d=="string"&&MP.test(d),M=IP(d,E);d=M.to;let x=kAA(d,{relative:s}),V=$o(),N=null;if(o){let kA=j3(o,[],V.mask?V.mask.pathname:"/",!0);E!=="/"&&(kA.pathname=kA.pathname==="/"?E:qo([E,kA.pathname])),N=Z.createHref(kA)}let[z,q,_]=leA(n,I),sA=CeA(d,{replace:a,mask:o,state:c,target:l,preventScrollReset:u,relative:s,viewTransition:f,defaultShouldRevalidate:b,useTransitions:F});function oA(kA){A&&A(kA),kA.defaultPrevented||sA(kA)}let CA=!(M.isExternal||r),fA=D.createElement("a",{...I,..._,href:(CA?N:void 0)||M.absoluteURL||x,onClick:CA?oA:A,ref:feA(y,q),target:l,"data-discover":!S&&t==="render"?"true":void 0});return z&&!S?D.createElement(D.Fragment,null,fA,D.createElement(geA,{page:x})):fA});RI.displayName="Link";var weA=D.forwardRef(function({"aria-current":A="page",caseSensitive:t=!1,className:n="",end:s=!1,style:r,to:a,viewTransition:o,children:c,...l},d){let u=MQ(a,{relative:l.relative}),f=$o(),b=D.useContext(FI),{navigator:I,basename:y}=D.useContext(ro),E=b!=null&&meA(u)&&o===!0,Z=I.encodeLocation?I.encodeLocation(u).pathname:u.pathname,F=f.pathname,S=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;t||(F=F.toLowerCase(),S=S?S.toLowerCase():null,Z=Z.toLowerCase()),S&&y&&(S=Il(S,y)||S);const M=Z!=="/"&&Z.endsWith("/")?Z.length-1:Z.length;let x=F===Z||!s&&F.startsWith(Z)&&F.charAt(M)==="/",V=S!=null&&(S===Z||!s&&S.startsWith(Z)&&S.charAt(Z.length)==="/"),N={isActive:x,isPending:V,isTransitioning:E},z=x?A:void 0,q;typeof n=="function"?q=n(N):q=[n,x?"active":null,V?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let _=typeof r=="function"?r(N):r;return D.createElement(RI,{...l,"aria-current":z,className:q,ref:d,style:_,to:a,viewTransition:o},typeof c=="function"?c(N):c)});weA.displayName="NavLink";var QeA=D.forwardRef(({discover:e="render",fetcherKey:A,navigate:t,reloadDocument:n,replace:s,state:r,method:a=xI,action:o,onSubmit:c,relative:l,preventScrollReset:d,viewTransition:u,defaultShouldRevalidate:f,...b},I)=>{let{useTransitions:y}=D.useContext(ro),E=peA(),Z=HeA(o,{relative:l}),F=a.toLowerCase()==="get"?"get":"post",S=typeof o=="string"&&MP.test(o),M=x=>{if(c&&c(x),x.defaultPrevented)return;x.preventDefault();let V=x.nativeEvent.submitter,N=V?.getAttribute("formmethod")||a,z=()=>E(V||x.currentTarget,{fetcherKey:A,method:N,navigate:t,replace:s,state:r,relative:l,preventScrollReset:d,viewTransition:u,defaultShouldRevalidate:f});y&&t!==!1?D.startTransition(()=>z()):z()};return D.createElement("form",{ref:I,method:F,action:Z,onSubmit:n?c:M,...b,"data-discover":!S&&e==="render"?"true":void 0})});QeA.displayName="Form";function beA(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function PP(e){let A=D.useContext(ih);return As(A,beA(e)),A}function CeA(e,{target:A,replace:t,mask:n,state:s,preventScrollReset:r,relative:a,viewTransition:o,defaultShouldRevalidate:c,useTransitions:l}={}){let d=ca(),u=$o(),f=MQ(e,{relative:a});return D.useCallback(b=>{if($AA(b,A)){b.preventDefault();let I=t!==void 0?t:kI(u)===kI(f),y=()=>d(e,{replace:I,mask:n,state:s,preventScrollReset:r,relative:a,viewTransition:o,defaultShouldRevalidate:c});l?D.startTransition(()=>y()):y()}},[u,d,f,t,n,s,A,e,r,a,o,c,l])}var veA=0,IeA=()=>`__${String(++veA)}__`;function peA(){let{router:e}=PP("useSubmit"),{basename:A}=D.useContext(ro),t=WAA(),n=e.fetch,s=e.navigate;return D.useCallback(async(r,a={})=>{let{action:o,method:c,encType:l,formData:d,body:u}=teA(r,A);if(a.navigate===!1){let f=a.fetcherKey||IeA();await n(f,t,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:d,body:u,formMethod:a.method||c,formEncType:a.encType||l,flushSync:a.flushSync})}else await s(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:d,body:u,formMethod:a.method||c,formEncType:a.encType||l,replace:a.replace,state:a.state,fromRouteId:t,flushSync:a.flushSync,viewTransition:a.viewTransition})},[n,s,A,t])}function HeA(e,{relative:A}={}){let{basename:t}=D.useContext(ro),n=D.useContext(pl);As(n,"useFormAction must be used inside a RouteContext");let[s]=n.matches.slice(-1),r={...MQ(e||".",{relative:A})},a=$o();if(e==null){r.search=a.search;let o=new URLSearchParams(r.search),c=o.getAll("index");if(c.some(d=>d==="")){o.delete("index"),c.filter(u=>u).forEach(u=>o.append("index",u));let d=o.toString();r.search=d?`?${d}`:""}}return(!e||e===".")&&s.route.index&&(r.search=r.search?r.search.replace(/^\?/,"?index&"):"?index"),t!=="/"&&(r.pathname=r.pathname==="/"?t:qo([t,r.pathname])),kI(r)}function meA(e,{relative:A}={}){let t=D.useContext(mP);As(t!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=PP("useViewTransitionState"),s=MQ(e,{relative:A});if(!t.isTransitioning)return!1;let r=Il(t.currentLocation.pathname,n)||t.currentLocation.pathname,a=Il(t.nextLocation.pathname,n)||t.nextLocation.pathname;return UI(s.pathname,a)!=null||UI(s.pathname,r)!=null}const TP="beta@careshiphealth.com",tG="https://ela.careshiphealth.com",SI="https://api.ela.careshiphealth.com",VI=`${SI}/rt`,iy=420,TQ=540,EeA=520,AB={FACE_LG_ICON:`${tG}/bolt/faceLg.svg`,AI_ASSISTANT_TALK_ICON:`${tG}/bolt/new/ai-assistant-talk-icon.svg`,AI_ASSISTANT_CHAT_ICON:`${tG}/bolt/new/ai-assistant-chat-icon.svg`,AI_ASSISTANT__CALL_ICON:`${tG}/bolt/new/ai-assistant-call-icon.svg`,AI_ASSISTANT_ICON_BW:`${tG}/bolt/new/ai-assistant-icon-bw.svg`,MINIMIZE_ICON:`${tG}/bolt/new/minimize-icon.svg`,MAXIMIZE_ICON:`${tG}/bolt/new/maximize-icon.svg`},oy="Ela",yeA=e=>p.jsxs("svg",{width:"34",height:"34",viewBox:"0 0 34 34",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p.jsx("path",{d:"M14.788 9.48971C14.5248 9.05746 14.1061 8.74231 13.6179 8.60892C13.1297 8.47552 12.609 8.53399 12.1625 8.77233C10.0479 9.9113 8.85588 12.1545 9.63525 14.3233C10.5054 16.7288 11.8175 18.9504 13.5041 20.8736C15.178 22.7934 17.1908 24.3887 19.4421 25.5799C21.4658 26.6469 23.8375 25.7746 25.2439 23.8137C25.5398 23.4011 25.6681 22.8917 25.603 22.3882C25.538 21.8848 25.2843 21.4247 24.8933 21.1009L23.3591 19.8338C23.0516 19.5788 22.6745 19.4221 22.2768 19.384C21.8791 19.346 21.4792 19.4283 21.1288 19.6203L18.456 21.0859L17.857 20.6704C17.1019 20.1437 16.411 19.5305 15.7985 18.8432C15.1987 18.1437 14.6865 17.3736 14.2732 16.55L13.9463 15.9052L15.7449 13.4461C15.9827 13.1198 16.1177 12.73 16.1327 12.3265C16.1477 11.923 16.042 11.5243 15.829 11.1813L14.788 9.48971ZM11.0452 6.69431C12.0219 6.171 13.1616 6.041 14.231 6.33095C15.3004 6.6209 16.2184 7.30884 16.797 8.2538L17.8352 9.94349C18.2934 10.6853 18.5203 11.5468 18.4868 12.4181C18.4533 13.2893 18.161 14.1309 17.6471 14.8353L16.7193 16.1029C16.9446 16.4768 17.2323 16.8985 17.575 17.2949C17.9164 17.6843 18.2917 18.0262 18.6269 18.299L19.9935 17.5482C20.7578 17.1299 21.63 16.9506 22.4973 17.0335C23.3646 17.1164 24.1871 17.4578 24.8582 18.0133L26.3925 19.2804C27.2451 19.9846 27.7986 20.9863 27.9411 22.0829C28.0836 23.1796 27.8044 24.2894 27.1601 25.1881C25.2861 27.8016 21.707 29.439 18.3439 27.665C15.8368 26.3392 13.5952 24.5633 11.7308 22.4261C9.84914 20.2812 8.38523 17.8032 7.41459 15.1201C6.13111 11.5432 8.22187 8.21369 11.0457 6.69662",fill:e?.color||"black"}),p.jsx("path",{d:"M25.026 11.6502L25.3027 11.0139C25.7888 9.88815 26.6795 8.9853 27.7991 8.48354L28.6541 8.10358C28.7574 8.05583 28.8449 7.97955 28.9061 7.88374C28.9674 7.78793 29 7.67659 29 7.56288C29 7.44918 28.9674 7.33784 28.9061 7.24203C28.8449 7.14622 28.7574 7.06993 28.6541 7.02218L27.8464 6.66247C26.6986 6.14642 25.7927 5.21019 25.3151 4.04664L25.0305 3.36093C24.9887 3.25454 24.9158 3.1632 24.8213 3.09882C24.7267 3.03444 24.615 3 24.5006 3C24.3862 3 24.2745 3.03444 24.18 3.09882C24.0854 3.1632 24.0125 3.25454 23.9707 3.36093L23.6861 4.04777C23.208 5.2111 22.3017 6.14692 21.1537 6.66247L20.3471 7.02106C20.2435 7.06867 20.1557 7.14497 20.0942 7.2409C20.0327 7.33684 20 7.44838 20 7.56232C20 7.67626 20.0327 7.78781 20.0942 7.88374C20.1557 7.97967 20.2435 8.05597 20.3471 8.10358L21.201 8.48466C22.3208 8.98593 23.2119 9.88837 23.6985 11.0139L23.9752 11.6502C24.0185 11.7538 24.0914 11.8423 24.1849 11.9045C24.2784 11.9668 24.3883 12 24.5006 12C24.613 12 24.7228 11.9668 24.8163 11.9045C24.9098 11.8423 24.9827 11.7538 25.026 11.6502Z",fill:e?.color||"black"})]}),By=D.createContext({});function WI(e){const A=D.useRef(null);return A.current===null&&(A.current=e()),A.current}const cy=typeof window<"u"?D.useLayoutEffect:D.useEffect,NI=D.createContext(null);function ly(e,A){e.indexOf(A)===-1&&e.push(A)}function zI(e,A){const t=e.indexOf(A);t>-1&&e.splice(t,1)}const ac=(e,A,t)=>t>A?A:t<e?e:t;let gy=()=>{};const $g={},RP=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),SP=e=>typeof e=="object"&&e!==null,VP=e=>/^0[^.\s]+$/u.test(e);function WP(e){let A;return()=>(A===void 0&&(A=e()),A)}const ao=e=>e,RQ=(...e)=>e.reduce((A,t)=>n=>t(A(n))),SQ=(e,A,t)=>{const n=A-e;return n?(t-e)/n:1};class dy{constructor(){this.subscriptions=[]}add(A){return ly(this.subscriptions,A),()=>zI(this.subscriptions,A)}notify(A,t,n){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](A,t,n);else for(let r=0;r<s;r++){const a=this.subscriptions[r];a&&a(A,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const hi=e=>e*1e3,io=e=>e/1e3,NP=(e,A)=>A?e*(1e3/A):0,zP=(e,A,t)=>(((1-3*t+3*A)*e+(3*t-6*A))*e+3*A)*e,YeA=1e-7,ZeA=12;function keA(e,A,t,n,s){let r,a,o=0;do a=A+(t-A)/2,r=zP(a,n,s)-e,r>0?t=a:A=a;while(Math.abs(r)>YeA&&++o<ZeA);return a}function VQ(e,A,t,n){if(e===A&&t===n)return ao;const s=r=>keA(r,0,1,e,t);return r=>r===0||r===1?r:zP(s(r),A,n)}const LP=e=>A=>A<=.5?e(2*A)/2:(2-e(2*(1-A)))/2,XP=e=>A=>1-e(1-A),OP=VQ(.33,1.53,.69,.99),uy=XP(OP),JP=LP(uy),KP=e=>e>=1?1:(e*=2)<1?.5*uy(e):.5*(2-Math.pow(2,-10*(e-1))),Gy=e=>1-Math.sin(Math.acos(e)),jP=XP(Gy),_P=LP(Gy),UeA=VQ(.42,0,1,1),DeA=VQ(0,0,.58,1),qP=VQ(.42,0,.58,1),FeA=e=>Array.isArray(e)&&typeof e[0]!="number",$P=e=>Array.isArray(e)&&typeof e[0]=="number",xeA={linear:ao,easeIn:UeA,easeInOut:qP,easeOut:DeA,circIn:Gy,circInOut:_P,circOut:jP,backIn:uy,backInOut:JP,backOut:OP,anticipate:KP},MeA=e=>typeof e=="string",AT=e=>{if($P(e)){gy(e.length===4);const[A,t,n,s]=e;return VQ(A,t,n,s)}else if(MeA(e))return xeA[e];return e},LI=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function PeA(e,A){let t=new Set,n=new Set,s=!1,r=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function c(d){a.has(d)&&(l.schedule(d),e()),d(o)}const l={schedule:(d,u=!1,f=!1)=>{const I=f&&s?t:n;return u&&a.add(d),I.add(d),d},cancel:d=>{n.delete(d),a.delete(d)},process:d=>{if(o=d,s){r=!0;return}s=!0;const u=t;t=n,n=u,t.forEach(c),t.clear(),s=!1,r&&(r=!1,l.process(d))}};return l}const TeA=40;function eT(e,A){let t=!1,n=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>t=!0,a=LI.reduce((S,M)=>(S[M]=PeA(r),S),{}),{setup:o,read:c,resolveKeyframes:l,preUpdate:d,update:u,preRender:f,render:b,postRender:I}=a,y=()=>{const S=$g.useManualTiming,M=S?s.timestamp:performance.now();t=!1,S||(s.delta=n?1e3/60:Math.max(Math.min(M-s.timestamp,TeA),1)),s.timestamp=M,s.isProcessing=!0,o.process(s),c.process(s),l.process(s),d.process(s),u.process(s),f.process(s),b.process(s),I.process(s),s.isProcessing=!1,t&&A&&(n=!1,e(y))},E=()=>{t=!0,n=!0,s.isProcessing||e(y)};return{schedule:LI.reduce((S,M)=>{const x=a[M];return S[M]=(V,N=!1,z=!1)=>(t||E(),x.schedule(V,N,z)),S},{}),cancel:S=>{for(let M=0;M<LI.length;M++)a[LI[M]].cancel(S)},state:s,steps:a}}const{schedule:dn,cancel:Ad,state:Zr,steps:fy}=eT(typeof requestAnimationFrame<"u"?requestAnimationFrame:ao,!0);let XI;function ReA(){XI=void 0}const la={now:()=>(XI===void 0&&la.set(Zr.isProcessing||$g.useManualTiming?Zr.timestamp:performance.now()),XI),set:e=>{XI=e,queueMicrotask(ReA)}},tT=e=>A=>typeof A=="string"&&A.startsWith(e),nT=tT("--"),SeA=tT("var(--"),hy=e=>SeA(e)?VeA.test(e.split("/*")[0].trim()):!1,VeA=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function sT(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const oh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},WQ={...oh,transform:e=>ac(0,1,e)},OI={...oh,default:1},NQ=e=>Math.round(e*1e5)/1e5,wy=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function WeA(e){return e==null}const NeA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Qy=(e,A)=>t=>!!(typeof t=="string"&&NeA.test(t)&&t.startsWith(e)||A&&!WeA(t)&&Object.prototype.hasOwnProperty.call(t,A)),rT=(e,A,t)=>n=>{if(typeof n!="string")return n;const[s,r,a,o]=n.match(wy);return{[e]:parseFloat(s),[A]:parseFloat(r),[t]:parseFloat(a),alpha:o!==void 0?parseFloat(o):1}},zeA=e=>ac(0,255,e),by={...oh,transform:e=>Math.round(zeA(e))},nG={test:Qy("rgb","red"),parse:rT("red","green","blue"),transform:({red:e,green:A,blue:t,alpha:n=1})=>"rgba("+by.transform(e)+", "+by.transform(A)+", "+by.transform(t)+", "+NQ(WQ.transform(n))+")"};function LeA(e){let A="",t="",n="",s="";return e.length>5?(A=e.substring(1,3),t=e.substring(3,5),n=e.substring(5,7),s=e.substring(7,9)):(A=e.substring(1,2),t=e.substring(2,3),n=e.substring(3,4),s=e.substring(4,5),A+=A,t+=t,n+=n,s+=s),{red:parseInt(A,16),green:parseInt(t,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}const Cy={test:Qy("#"),parse:LeA,transform:nG.transform},zQ=e=>({test:A=>typeof A=="string"&&A.endsWith(e)&&A.split(" ").length===1,parse:parseFloat,transform:A=>`${A}${e}`}),Hl=zQ("deg"),ic=zQ("%"),ge=zQ("px"),XeA=zQ("vh"),OeA=zQ("vw"),aT={...ic,parse:e=>ic.parse(e)/100,transform:e=>ic.transform(e*100)},Bh={test:Qy("hsl","hue"),parse:rT("hue","saturation","lightness"),transform:({hue:e,saturation:A,lightness:t,alpha:n=1})=>"hsla("+Math.round(e)+", "+ic.transform(NQ(A))+", "+ic.transform(NQ(t))+", "+NQ(WQ.transform(n))+")"},Ds={test:e=>nG.test(e)||Cy.test(e)||Bh.test(e),parse:e=>nG.test(e)?nG.parse(e):Bh.test(e)?Bh.parse(e):Cy.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?nG.transform(e):Bh.transform(e),getAnimatableNone:e=>{const A=Ds.parse(e);return A.alpha=0,Ds.transform(A)}},JeA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function KeA(e){return isNaN(e)&&typeof e=="string"&&(e.match(wy)?.length||0)+(e.match(JeA)?.length||0)>0}const iT="number",oT="color",jeA="var",_eA="var(",BT="${}",qeA=/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 ch(e){const A=e.toString(),t=[],n={color:[],number:[],var:[]},s=[];let r=0;const o=A.replace(qeA,c=>(Ds.test(c)?(n.color.push(r),s.push(oT),t.push(Ds.parse(c))):c.startsWith(_eA)?(n.var.push(r),s.push(jeA),t.push(c)):(n.number.push(r),s.push(iT),t.push(parseFloat(c))),++r,BT)).split(BT);return{values:t,split:o,indexes:n,types:s}}function $eA(e){return ch(e).values}function cT({split:e,types:A}){const t=e.length;return n=>{let s="";for(let r=0;r<t;r++)if(s+=e[r],n[r]!==void 0){const a=A[r];a===iT?s+=NQ(n[r]):a===oT?s+=Ds.transform(n[r]):s+=n[r]}return s}}function AtA(e){return cT(ch(e))}const etA=e=>typeof e=="number"?0:Ds.test(e)?Ds.getAnimatableNone(e):e,ttA=(e,A)=>typeof e=="number"?A?.trim().endsWith("/")?e:0:etA(e);function ntA(e){const A=ch(e);return cT(A)(A.values.map((n,s)=>ttA(n,A.split[s])))}const eB={test:KeA,parse:$eA,createTransformer:AtA,getAnimatableNone:ntA};function vy(e,A,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?e+(A-e)*6*t:t<1/2?A:t<2/3?e+(A-e)*(2/3-t)*6:e}function stA({hue:e,saturation:A,lightness:t,alpha:n}){e/=360,A/=100,t/=100;let s=0,r=0,a=0;if(!A)s=r=a=t;else{const o=t<.5?t*(1+A):t+A-t*A,c=2*t-o;s=vy(c,o,e+1/3),r=vy(c,o,e),a=vy(c,o,e-1/3)}return{red:Math.round(s*255),green:Math.round(r*255),blue:Math.round(a*255),alpha:n}}function JI(e,A){return t=>t>0?A:e}const un=(e,A,t)=>e+(A-e)*t,Iy=(e,A,t)=>{const n=e*e,s=t*(A*A-n)+n;return s<0?0:Math.sqrt(s)},rtA=[Cy,nG,Bh],atA=e=>rtA.find(A=>A.test(e));function lT(e){const A=atA(e);if(!A)return!1;let t=A.parse(e);return A===Bh&&(t=stA(t)),t}const gT=(e,A)=>{const t=lT(e),n=lT(A);if(!t||!n)return JI(e,A);const s={...t};return r=>(s.red=Iy(t.red,n.red,r),s.green=Iy(t.green,n.green,r),s.blue=Iy(t.blue,n.blue,r),s.alpha=un(t.alpha,n.alpha,r),nG.transform(s))},py=new Set(["none","hidden"]);function itA(e,A){return py.has(e)?t=>t<=0?e:A:t=>t>=1?A:e}function otA(e,A){return t=>un(e,A,t)}function Hy(e){return typeof e=="number"?otA:typeof e=="string"?hy(e)?JI:Ds.test(e)?gT:ltA:Array.isArray(e)?dT:typeof e=="object"?Ds.test(e)?gT:BtA:JI}function dT(e,A){const t=[...e],n=t.length,s=e.map((r,a)=>Hy(r)(r,A[a]));return r=>{for(let a=0;a<n;a++)t[a]=s[a](r);return t}}function BtA(e,A){const t={...e,...A},n={};for(const s in t)e[s]!==void 0&&A[s]!==void 0&&(n[s]=Hy(e[s])(e[s],A[s]));return s=>{for(const r in n)t[r]=n[r](s);return t}}function ctA(e,A){const t=[],n={color:0,var:0,number:0};for(let s=0;s<A.values.length;s++){const r=A.types[s],a=e.indexes[r][n[r]],o=e.values[a]??0;t[s]=o,n[r]++}return t}const ltA=(e,A)=>{const t=eB.createTransformer(A),n=ch(e),s=ch(A);return n.indexes.var.length===s.indexes.var.length&&n.indexes.color.length===s.indexes.color.length&&n.indexes.number.length>=s.indexes.number.length?py.has(e)&&!s.values.length||py.has(A)&&!n.values.length?itA(e,A):RQ(dT(ctA(n,s),s.values),t):JI(e,A)};function uT(e,A,t){return typeof e=="number"&&typeof A=="number"&&typeof t=="number"?un(e,A,t):Hy(e)(e,A)}const gtA=e=>{const A=({timestamp:t})=>e(t);return{start:(t=!0)=>dn.update(A,t),stop:()=>Ad(A),now:()=>Zr.isProcessing?Zr.timestamp:la.now()}},GT=(e,A,t=10)=>{let n="";const s=Math.max(Math.round(A/t),2);for(let r=0;r<s;r++)n+=Math.round(e(r/(s-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},KI=2e4;function my(e){let A=0;const t=50;let n=e.next(A);for(;!n.done&&A<KI;)A+=t,n=e.next(A);return A>=KI?1/0:A}function dtA(e,A=100,t){const n=t({...e,keyframes:[0,A]}),s=Math.min(my(n),KI);return{type:"keyframes",ease:r=>n.next(s*r).value/A,duration:io(s)}}const es={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};function Ey(e,A){return e*Math.sqrt(1-A*A)}const utA=12;function GtA(e,A,t){let n=t;for(let s=1;s<utA;s++)n=n-e(n)/A(n);return n}const yy=.001;function ftA({duration:e=es.duration,bounce:A=es.bounce,velocity:t=es.velocity,mass:n=es.mass}){let s,r,a=1-A;a=ac(es.minDamping,es.maxDamping,a),e=ac(es.minDuration,es.maxDuration,io(e)),a<1?(s=l=>{const d=l*a,u=d*e,f=d-t,b=Ey(l,a),I=Math.exp(-u);return yy-f/b*I},r=l=>{const u=l*a*e,f=u*t+t,b=Math.pow(a,2)*Math.pow(l,2)*e,I=Math.exp(-u),y=Ey(Math.pow(l,2),a);return(-s(l)+yy>0?-1:1)*((f-b)*I)/y}):(s=l=>{const d=Math.exp(-l*e),u=(l-t)*e+1;return-yy+d*u},r=l=>{const d=Math.exp(-l*e),u=(t-l)*(e*e);return d*u});const o=5/e,c=GtA(s,r,o);if(e=hi(e),isNaN(c))return{stiffness:es.stiffness,damping:es.damping,duration:e};{const l=Math.pow(c,2)*n;return{stiffness:l,damping:a*2*Math.sqrt(n*l),duration:e}}}const htA=["duration","bounce"],wtA=["stiffness","damping","mass"];function fT(e,A){return A.some(t=>e[t]!==void 0)}function QtA(e){let A={velocity:es.velocity,stiffness:es.stiffness,damping:es.damping,mass:es.mass,isResolvedFromDuration:!1,...e};if(!fT(e,wtA)&&fT(e,htA))if(A.velocity=0,e.visualDuration){const t=e.visualDuration,n=2*Math.PI/(t*1.2),s=n*n,r=2*ac(.05,1,1-(e.bounce||0))*Math.sqrt(s);A={...A,mass:es.mass,stiffness:s,damping:r}}else{const t=ftA({...e,velocity:0});A={...A,...t,mass:es.mass},A.isResolvedFromDuration=!0}return A}function jI(e=es.visualDuration,A=es.bounce){const t=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:A}:e;let{restSpeed:n,restDelta:s}=t;const r=t.keyframes[0],a=t.keyframes[t.keyframes.length-1],o={done:!1,value:r},{stiffness:c,damping:l,mass:d,duration:u,velocity:f,isResolvedFromDuration:b}=QtA({...t,velocity:-io(t.velocity||0)}),I=f||0,y=l/(2*Math.sqrt(c*d)),E=a-r,Z=io(Math.sqrt(c/d)),F=Math.abs(E)<5;n||(n=F?es.restSpeed.granular:es.restSpeed.default),s||(s=F?es.restDelta.granular:es.restDelta.default);let S,M,x,V,N,z;if(y<1)x=Ey(Z,y),V=(I+y*Z*E)/x,S=_=>{const sA=Math.exp(-y*Z*_);return a-sA*(V*Math.sin(x*_)+E*Math.cos(x*_))},N=y*Z*V+E*x,z=y*Z*E-V*x,M=_=>Math.exp(-y*Z*_)*(N*Math.sin(x*_)+z*Math.cos(x*_));else if(y===1){S=sA=>a-Math.exp(-Z*sA)*(E+(I+Z*E)*sA);const _=I+Z*E;M=sA=>Math.exp(-Z*sA)*(Z*_*sA-I)}else{const _=Z*Math.sqrt(y*y-1);S=fA=>{const kA=Math.exp(-y*Z*fA),X=Math.min(_*fA,300);return a-kA*((I+y*Z*E)*Math.sinh(X)+_*E*Math.cosh(X))/_};const sA=(I+y*Z*E)/_,oA=y*Z*sA-E*_,CA=y*Z*E-sA*_;M=fA=>{const kA=Math.exp(-y*Z*fA),X=Math.min(_*fA,300);return kA*(oA*Math.sinh(X)+CA*Math.cosh(X))}}const q={calculatedDuration:b&&u||null,velocity:_=>hi(M(_)),next:_=>{if(!b&&y<1){const oA=Math.exp(-y*Z*_),CA=Math.sin(x*_),fA=Math.cos(x*_),kA=a-oA*(V*CA+E*fA),X=hi(oA*(N*CA+z*fA));return o.done=Math.abs(X)<=n&&Math.abs(a-kA)<=s,o.value=o.done?a:kA,o}const sA=S(_);if(b)o.done=_>=u;else{const oA=hi(M(_));o.done=Math.abs(oA)<=n&&Math.abs(a-sA)<=s}return o.value=o.done?a:sA,o},toString:()=>{const _=Math.min(my(q),KI),sA=GT(oA=>q.next(_*oA).value,_,30);return _+"ms "+sA},toTransition:()=>{}};return q}jI.applyToOptions=e=>{const A=dtA(e,100,jI);return e.ease=A.ease,e.duration=hi(A.duration),e.type="keyframes",e};const btA=5;function hT(e,A,t){const n=Math.max(A-btA,0);return NP(t-e(n),A-n)}function Yy({keyframes:e,velocity:A=0,power:t=.8,timeConstant:n=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:a,min:o,max:c,restDelta:l=.5,restSpeed:d}){const u=e[0],f={done:!1,value:u},b=z=>o!==void 0&&z<o||c!==void 0&&z>c,I=z=>o===void 0?c:c===void 0||Math.abs(o-z)<Math.abs(c-z)?o:c;let y=t*A;const E=u+y,Z=a===void 0?E:a(E);Z!==E&&(y=Z-u);const F=z=>-y*Math.exp(-z/n),S=z=>Z+F(z),M=z=>{const q=F(z),_=S(z);f.done=Math.abs(q)<=l,f.value=f.done?Z:_};let x,V;const N=z=>{b(f.value)&&(x=z,V=jI({keyframes:[f.value,I(f.value)],velocity:hT(S,z,f.value),damping:s,stiffness:r,restDelta:l,restSpeed:d}))};return N(0),{calculatedDuration:null,next:z=>{let q=!1;return!V&&x===void 0&&(q=!0,M(z),N(z)),x!==void 0&&z>=x?V.next(z-x):(!q&&M(z),f)}}}function CtA(e,A,t){const n=[],s=t||$g.mix||uT,r=e.length-1;for(let a=0;a<r;a++){let o=s(e[a],e[a+1]);if(A){const c=Array.isArray(A)?A[a]||ao:A;o=RQ(c,o)}n.push(o)}return n}function vtA(e,A,{clamp:t=!0,ease:n,mixer:s}={}){const r=e.length;if(gy(r===A.length),r===1)return()=>A[0];if(r===2&&A[0]===A[1])return()=>A[1];const a=e[0]===e[1];e[0]>e[r-1]&&(e=[...e].reverse(),A=[...A].reverse());const o=CtA(A,n,s),c=o.length,l=d=>{if(a&&d<e[0])return A[0];let u=0;if(c>1)for(;u<e.length-2&&!(d<e[u+1]);u++);const f=SQ(e[u],e[u+1],d);return o[u](f)};return t?d=>l(ac(e[0],e[r-1],d)):l}function ItA(e,A){const t=e[e.length-1];for(let n=1;n<=A;n++){const s=SQ(0,A,n);e.push(un(t,1,s))}}function ptA(e){const A=[0];return ItA(A,e.length-1),A}function HtA(e,A){return e.map(t=>t*A)}function mtA(e,A){return e.map(()=>A||qP).splice(0,e.length-1)}function LQ({duration:e=300,keyframes:A,times:t,ease:n="easeInOut"}){const s=FeA(n)?n.map(AT):AT(n),r={done:!1,value:A[0]},a=HtA(t&&t.length===A.length?t:ptA(A),e),o=vtA(a,A,{ease:Array.isArray(s)?s:mtA(A,s)});return{calculatedDuration:e,next:c=>(r.value=o(c),r.done=c>=e,r)}}const EtA=e=>e!==null;function _I(e,{repeat:A,repeatType:t="loop"},n,s=1){const r=e.filter(EtA),o=s<0||A&&t!=="loop"&&A%2===1?0:r.length-1;return!o||n===void 0?r[o]:n}const ytA={decay:Yy,inertia:Yy,tween:LQ,keyframes:LQ,spring:jI};function wT(e){typeof e.type=="string"&&(e.type=ytA[e.type])}class Zy{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(A=>{this.resolve=A})}notifyFinished(){this.resolve()}then(A,t){return this.finished.then(A,t)}}const YtA=e=>e/100;class qI extends Zy{constructor(A){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==la.now()&&this.tick(la.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=A,this.initAnimation(),this.play(),A.autoplay===!1&&this.pause()}initAnimation(){const{options:A}=this;wT(A);const{type:t=LQ,repeat:n=0,repeatDelay:s=0,repeatType:r,velocity:a=0}=A;let{keyframes:o}=A;const c=t||LQ;c!==LQ&&typeof o[0]!="number"&&(this.mixKeyframes=RQ(YtA,uT(o[0],o[1])),o=[0,100]);const l=c({...A,keyframes:o});r==="mirror"&&(this.mirroredGenerator=c({...A,keyframes:[...o].reverse(),velocity:-a})),l.calculatedDuration===null&&(l.calculatedDuration=my(l));const{calculatedDuration:d}=l;this.calculatedDuration=d,this.resolvedDuration=d+s,this.totalDuration=this.resolvedDuration*(n+1)-s,this.generator=l}updateTime(A){const t=Math.round(A-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=t}tick(A,t=!1){const{generator:n,totalDuration:s,mixKeyframes:r,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);const{delay:l=0,keyframes:d,repeat:u,repeatType:f,repeatDelay:b,type:I,onUpdate:y,finalKeyframe:E}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,A):this.speed<0&&(this.startTime=Math.min(A-s/this.speed,this.startTime)),t?this.currentTime=A:this.updateTime(A);const Z=this.currentTime-l*(this.playbackSpeed>=0?1:-1),F=this.playbackSpeed>=0?Z<0:Z>s;this.currentTime=Math.max(Z,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let S=this.currentTime,M=n;if(u){const z=Math.min(this.currentTime,s)/o;let q=Math.floor(z),_=z%1;!_&&z>=1&&(_=1),_===1&&q--,q=Math.min(q,u+1),q%2&&(f==="reverse"?(_=1-_,b&&(_-=b/o)):f==="mirror"&&(M=a)),S=ac(0,1,_)*o}let x;F?(this.delayState.value=d[0],x=this.delayState):x=M.next(S),r&&!F&&(x.value=r(x.value));let{done:V}=x;!F&&c!==null&&(V=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&V);return N&&I!==Yy&&(x.value=_I(d,this.options,E,this.speed)),y&&y(x.value),N&&this.finish(),x}then(A,t){return this.finished.then(A,t)}get duration(){return io(this.calculatedDuration)}get iterationDuration(){const{delay:A=0}=this.options||{};return this.duration+io(A)}get time(){return io(this.currentTime)}set time(A){A=hi(A),this.currentTime=A,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=A:this.driver&&(this.startTime=this.driver.now()-A/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=A,this.tick(A))}getGeneratorVelocity(){const A=this.currentTime;if(A<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(A);const t=this.generator.next(A).value;return hT(n=>this.generator.next(n).value,A,t)}get speed(){return this.playbackSpeed}set speed(A){const t=this.playbackSpeed!==A;t&&this.driver&&this.updateTime(la.now()),this.playbackSpeed=A,t&&this.driver&&(this.time=io(this.currentTime))}play(){if(this.isStopped)return;const{driver:A=gtA,startTime:t}=this.options;this.driver||(this.driver=A(s=>this.tick(s))),this.options.onPlay?.();const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),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(la.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(A){return this.startTime=0,this.tick(A,!0)}attachTimeline(A){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),A.observe(this)}}function ZtA(e){for(let A=1;A<e.length;A++)e[A]??(e[A]=e[A-1])}const sG=e=>e*180/Math.PI,ky=e=>{const A=sG(Math.atan2(e[1],e[0]));return Uy(A)},ktA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ky,rotateZ:ky,skewX:e=>sG(Math.atan(e[1])),skewY:e=>sG(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Uy=e=>(e=e%360,e<0&&(e+=360),e),QT=ky,bT=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),CT=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),UtA={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:bT,scaleY:CT,scale:e=>(bT(e)+CT(e))/2,rotateX:e=>Uy(sG(Math.atan2(e[6],e[5]))),rotateY:e=>Uy(sG(Math.atan2(-e[2],e[0]))),rotateZ:QT,rotate:QT,skewX:e=>sG(Math.atan(e[4])),skewY:e=>sG(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Dy(e){return e.includes("scale")?1:0}function Fy(e,A){if(!e||e==="none")return Dy(A);const t=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,s;if(t)n=UtA,s=t;else{const o=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=ktA,s=o}if(!s)return Dy(A);const r=n[A],a=s[1].split(",").map(FtA);return typeof r=="function"?r(a):a[r]}const DtA=(e,A)=>{const{transform:t="none"}=getComputedStyle(e);return Fy(t,A)};function FtA(e){return parseFloat(e.trim())}const lh=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],gh=new Set([...lh,"pathRotation"]),vT=e=>e===oh||e===ge,xtA=new Set(["x","y","z"]),MtA=lh.filter(e=>!xtA.has(e));function PtA(e){const A=[];return MtA.forEach(t=>{const n=e.getValue(t);n!==void 0&&(A.push([t,n.get()]),n.set(t.startsWith("scale")?1:0))}),A}const ed={width:({x:e},{paddingLeft:A="0",paddingRight:t="0",boxSizing:n})=>{const s=e.max-e.min;return n==="border-box"?s:s-parseFloat(A)-parseFloat(t)},height:({y:e},{paddingTop:A="0",paddingBottom:t="0",boxSizing:n})=>{const s=e.max-e.min;return n==="border-box"?s:s-parseFloat(A)-parseFloat(t)},top:(e,{top:A})=>parseFloat(A),left:(e,{left:A})=>parseFloat(A),bottom:({y:e},{top:A})=>parseFloat(A)+(e.max-e.min),right:({x:e},{left:A})=>parseFloat(A)+(e.max-e.min),x:(e,{transform:A})=>Fy(A,"x"),y:(e,{transform:A})=>Fy(A,"y")};ed.translateX=ed.x,ed.translateY=ed.y;const rG=new Set;let xy=!1,My=!1,Py=!1;function IT(){if(My){const e=Array.from(rG).filter(n=>n.needsMeasurement),A=new Set(e.map(n=>n.element)),t=new Map;A.forEach(n=>{const s=PtA(n);s.length&&(t.set(n,s),n.render())}),e.forEach(n=>n.measureInitialState()),A.forEach(n=>{n.render();const s=t.get(n);s&&s.forEach(([r,a])=>{n.getValue(r)?.set(a)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}My=!1,xy=!1,rG.forEach(e=>e.complete(Py)),rG.clear()}function pT(){rG.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(My=!0)})}function TtA(){Py=!0,pT(),IT(),Py=!1}class Ty{constructor(A,t,n,s,r,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...A],this.onComplete=t,this.name=n,this.motionValue=s,this.element=r,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(rG.add(this),xy||(xy=!0,dn.read(pT),dn.resolveKeyframes(IT))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:A,name:t,element:n,motionValue:s}=this;if(A[0]===null){const r=s?.get(),a=A[A.length-1];if(r!==void 0)A[0]=r;else if(n&&t){const o=n.readValue(t,a);o!=null&&(A[0]=o)}A[0]===void 0&&(A[0]=a),s&&r===void 0&&s.set(A[0])}ZtA(A)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(A=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,A),rG.delete(this)}cancel(){this.state==="scheduled"&&(rG.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const RtA=e=>e.startsWith("--");function HT(e,A,t){RtA(A)?e.style.setProperty(A,t):e.style[A]=t}const StA={};function mT(e,A){const t=WP(e);return()=>StA[A]??t()}const VtA=mT(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),ET=mT(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),XQ=([e,A,t,n])=>`cubic-bezier(${e}, ${A}, ${t}, ${n})`,yT={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:XQ([0,.65,.55,1]),circOut:XQ([.55,0,1,.45]),backIn:XQ([.31,.01,.66,-.59]),backOut:XQ([.33,1.53,.69,.99])};function YT(e,A){if(e)return typeof e=="function"?ET()?GT(e,A):"ease-out":$P(e)?XQ(e):Array.isArray(e)?e.map(t=>YT(t,A)||yT.easeOut):yT[e]}function WtA(e,A,t,{delay:n=0,duration:s=300,repeat:r=0,repeatType:a="loop",ease:o="easeOut",times:c}={},l=void 0){const d={[A]:t};c&&(d.offset=c);const u=YT(o,s);Array.isArray(u)&&(d.easing=u);const f={delay:n,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:r+1,direction:a==="reverse"?"alternate":"normal"};return l&&(f.pseudoElement=l),e.animate(d,f)}function ZT(e){return typeof e=="function"&&"applyToOptions"in e}function NtA({type:e,...A}){return ZT(e)&&ET()?e.applyToOptions(A):(A.duration??(A.duration=300),A.ease??(A.ease="easeOut"),A)}class kT extends Zy{constructor(A){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!A)return;const{element:t,name:n,keyframes:s,pseudoElement:r,allowFlatten:a=!1,finalKeyframe:o,onComplete:c}=A;this.isPseudoElement=!!r,this.allowFlatten=a,this.options=A,gy(typeof A.type!="string");const l=NtA(A);this.animation=WtA(t,n,s,l,r),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const d=_I(s,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(d),HT(t,n,d),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:A}=this;A==="idle"||A==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const A=this.options?.element;!this.isPseudoElement&&A?.isConnected&&this.animation.commitStyles?.()}get duration(){const A=this.animation.effect?.getComputedTiming?.().duration||0;return io(Number(A))}get iterationDuration(){const{delay:A=0}=this.options||{};return this.duration+io(A)}get time(){return io(Number(this.animation.currentTime)||0)}set time(A){const t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=hi(A),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(A){A<0&&(this.finishedTime=null),this.animation.playbackRate=A}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(A){this.manualStartTime=this.animation.startTime=A}attachTimeline({timeline:A,rangeStart:t,rangeEnd:n,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,A&&VtA()?(this.animation.timeline=A,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),ao):s(this)}}const UT={anticipate:KP,backInOut:JP,circInOut:_P};function ztA(e){return e in UT}function LtA(e){typeof e.ease=="string"&&ztA(e.ease)&&(e.ease=UT[e.ease])}const Ry=10;class XtA extends kT{constructor(A){LtA(A),wT(A),super(A),A.startTime!==void 0&&A.autoplay!==!1&&(this.startTime=A.startTime),this.options=A}updateMotionValue(A){const{motionValue:t,onUpdate:n,onComplete:s,element:r,...a}=this.options;if(!t)return;if(A!==void 0){t.set(A);return}const o=new qI({...a,autoplay:!1}),c=Math.max(Ry,la.now()-this.startTime),l=ac(0,Ry,c-Ry),d=o.sample(c).value,{name:u}=this.options;r&&u&&HT(r,u,d),t.setWithVelocity(o.sample(Math.max(0,c-l)).value,d,l),o.stop()}}const DT=(e,A)=>A==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(eB.test(e)||e==="0")&&!e.startsWith("url("));function OtA(e){const A=e[0];if(e.length===1)return!0;for(let t=0;t<e.length;t++)if(e[t]!==A)return!0}function JtA(e,A,t,n){const s=e[0];if(s===null)return!1;if(A==="display"||A==="visibility")return!0;const r=e[e.length-1],a=DT(s,A),o=DT(r,A);return!a||!o?!1:OtA(e)||(t==="spring"||ZT(t))&&n}function Sy(e){e.duration=0,e.type="keyframes"}const FT=new Set(["opacity","clipPath","filter","transform"]),KtA=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function jtA(e){for(let A=0;A<e.length;A++)if(typeof e[A]=="string"&&KtA.test(e[A]))return!0;return!1}const _tA=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),qtA=WP(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function $tA(e){const{motionValue:A,name:t,repeatDelay:n,repeatType:s,damping:r,type:a,keyframes:o}=e;if(!(A?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:d}=A.owner.getProps();return qtA()&&t&&(FT.has(t)||_tA.has(t)&&jtA(o))&&(t!=="transform"||!d)&&!l&&!n&&s!=="mirror"&&r!==0&&a!=="inertia"}const AnA=40;class enA extends Zy{constructor({autoplay:A=!0,delay:t=0,type:n="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:a="loop",keyframes:o,name:c,motionValue:l,element:d,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=la.now();const f={autoplay:A,delay:t,type:n,repeat:s,repeatDelay:r,repeatType:a,name:c,motionValue:l,element:d,...u},b=d?.KeyframeResolver||Ty;this.keyframeResolver=new b(o,(I,y,E)=>this.onKeyframesResolved(I,y,f,!E),c,l,d),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(A,t,n,s){this.keyframeResolver=void 0;const{name:r,type:a,velocity:o,delay:c,isHandoff:l,onUpdate:d}=n;this.resolvedAt=la.now();let u=!0;JtA(A,r,a,o)||(u=!1,($g.instantAnimations||!c)&&d?.(_I(A,n,t)),A[0]=A[A.length-1],Sy(n),n.repeat=0);const b={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>AnA?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:A},I=u&&!l&&$tA(b),y=b.motionValue?.owner?.current;let E;if(I)try{E=new XtA({...b,element:y})}catch{E=new qI(b)}else E=new qI(b);E.finished.then(()=>{this.notifyFinished()}).catch(ao),this.pendingTimeline&&(this.stopTimeline=E.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=E}get finished(){return this._animation?this.animation.finished:this._finished}then(A,t){return this.finished.finally(A).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),TtA()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(A){this.animation.time=A}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(A){this.animation.speed=A}get startTime(){return this.animation.startTime}attachTimeline(A){return this._animation?this.stopTimeline=this.animation.attachTimeline(A):this.pendingTimeline=A,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function xT(e,A,t,n=0,s=1){const r=Array.from(e).sort((l,d)=>l.sortNodePosition(d)).indexOf(A),a=e.size,o=(a-1)*n;return typeof t=="function"?t(r,a):s===1?r*n:o-r*n}const MT=30,tnA=e=>!isNaN(parseFloat(e));class nnA{constructor(A,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{const s=la.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(A),this.owner=t.owner}setCurrent(A){this.current=A,this.updatedAt=la.now(),this.canTrackVelocity===null&&A!==void 0&&(this.canTrackVelocity=tnA(this.current))}setPrevFrameValue(A=this.current){this.prevFrameValue=A,this.prevUpdatedAt=this.updatedAt}onChange(A){return this.on("change",A)}on(A,t){this.events[A]||(this.events[A]=new dy);const n=this.events[A].add(t);return A==="change"?()=>{n(),dn.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const A in this.events)this.events[A].clear()}attach(A,t){this.passiveEffect=A,this.stopPassiveEffect=t}set(A){this.passiveEffect?this.passiveEffect(A,this.updateAndNotify):this.updateAndNotify(A)}setWithVelocity(A,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=A,this.prevUpdatedAt=this.updatedAt-n}jump(A,t=!0){this.updateAndNotify(A),this.prev=A,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(A){this.dependents||(this.dependents=new Set),this.dependents.add(A)}removeDependent(A){this.dependents&&this.dependents.delete(A)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const A=la.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||A-this.updatedAt>MT)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,MT);return NP(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(A){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=A(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function dh(e,A){return new nnA(e,A)}function PT(e,A){if(e?.inherit&&A){const{inherit:t,...n}=e;return{...A,...n}}return e}function Vy(e,A){const t=e?.[A]??e?.default??e;return t!==e?PT(t,e):t}const snA={type:"spring",stiffness:500,damping:25,restSpeed:10},rnA=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),anA={type:"keyframes",duration:.8},inA={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},onA=(e,{keyframes:A})=>A.length>2?anA:gh.has(e)?e.startsWith("scale")?rnA(A[1]):snA:inA,BnA=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function cnA(e){for(const A in e)if(!BnA.has(A))return!0;return!1}const Wy=(e,A,t,n={},s,r)=>a=>{const o=Vy(n,e)||{},c=o.delay||n.delay||0;let{elapsed:l=0}=n;l=l-hi(c);const d={keyframes:Array.isArray(t)?t:[null,t],ease:"easeOut",velocity:A.getVelocity(),...o,delay:-l,onUpdate:f=>{A.set(f),o.onUpdate&&o.onUpdate(f)},onComplete:()=>{a(),o.onComplete&&o.onComplete()},name:e,motionValue:A,element:r?void 0:s};cnA(o)||Object.assign(d,onA(e,d)),d.duration&&(d.duration=hi(d.duration)),d.repeatDelay&&(d.repeatDelay=hi(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let u=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(Sy(d),d.delay===0&&(u=!0)),($g.instantAnimations||$g.skipAnimations||s?.shouldSkipAnimations||o.skipAnimations)&&(u=!0,Sy(d),d.delay=0),d.allowFlatten=!o.type&&!o.ease,u&&!r&&A.get()!==void 0){const f=_I(d.keyframes,o);if(f!==void 0){dn.update(()=>{d.onUpdate(f),d.onComplete()});return}}return o.isSync?new qI(d):new enA(d)},lnA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function gnA(e){const A=lnA.exec(e);if(!A)return[,];const[,t,n,s]=A;return[`--${t??n}`,s]}function TT(e,A,t=1){const[n,s]=gnA(e);if(!n)return;const r=window.getComputedStyle(A).getPropertyValue(n);if(r){const a=r.trim();return RP(a)?parseFloat(a):a}return hy(s)?TT(s,A,t+1):s}function RT(e){const A=[{},{}];return e?.values.forEach((t,n)=>{A[0][n]=t.get(),A[1][n]=t.getVelocity()}),A}function Ny(e,A,t,n){if(typeof A=="function"){const[s,r]=RT(n);A=A(t!==void 0?t:e.custom,s,r)}if(typeof A=="string"&&(A=e.variants&&e.variants[A]),typeof A=="function"){const[s,r]=RT(n);A=A(t!==void 0?t:e.custom,s,r)}return A}function aG(e,A,t){const n=e.getProps();return Ny(n,A,t!==void 0?t:n.custom,e)}const ST=new Set(["width","height","top","left","right","bottom",...lh]),zy=e=>Array.isArray(e);function dnA(e,A,t){e.hasValue(A)?e.getValue(A).set(t):e.addValue(A,dh(t))}function unA(e){return zy(e)?e[e.length-1]||0:e}function Ly(e,A){const t=aG(e,A);let{transitionEnd:n={},transition:s={},...r}=t||{};r={...r,...n};for(const a in r){const o=unA(r[a]);dnA(e,a,o)}}const kr=e=>!!(e&&e.getVelocity);function GnA(e){return!!(kr(e)&&e.add)}function Xy(e,A){const t=e.getValue("willChange");if(GnA(t))return t.add(A);if(!t&&$g.WillChange){const n=new $g.WillChange("auto");e.addValue("willChange",n),n.add(A)}}function Oy(e){return e.replace(/([A-Z])/g,A=>`-${A.toLowerCase()}`)}const VT="data-"+Oy("framerAppearId");function WT(e){return e.props[VT]}function fnA({protectedKeys:e,needsAnimating:A},t){const n=e.hasOwnProperty(t)&&A[t]!==!0;return A[t]=!1,n}function NT(e,A,{delay:t=0,transitionOverride:n,type:s}={}){let{transition:r,transitionEnd:a,...o}=A;const c=e.getDefaultTransition();r=r?PT(r,c):c;const l=r?.reduceMotion,d=r?.skipAnimations;n&&(r=n);const u=[],f=s&&e.animationState&&e.animationState.getState()[s],b=r?.path;b&&b.animateVisualElement(e,o,r,t,u);for(const I in o){const y=e.getValue(I,e.latestValues[I]??null),E=o[I];if(E===void 0||f&&fnA(f,I))continue;const Z={delay:t,...Vy(r||{},I)};d&&(Z.skipAnimations=!0);const F=y.get();if(F!==void 0&&!y.isAnimating()&&!Array.isArray(E)&&E===F&&!Z.velocity){dn.update(()=>y.set(E));continue}let S=!1;if(window.MotionHandoffAnimation){const V=WT(e);if(V){const N=window.MotionHandoffAnimation(V,I,dn);N!==null&&(Z.startTime=N,S=!0)}}Xy(e,I);const M=l??e.shouldReduceMotion;y.start(Wy(I,y,E,M&&ST.has(I)?{type:!1}:Z,e,S));const x=y.animation;x&&u.push(x)}if(a){const I=()=>dn.update(()=>{a&&Ly(e,a)});u.length?Promise.all(u).then(I):I()}return u}function Jy(e,A,t={}){const n=aG(e,A,t.type==="exit"?e.presenceContext?.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=n||{};t.transitionOverride&&(s=t.transitionOverride);const r=n?()=>Promise.all(NT(e,n,t)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:d,staggerDirection:u}=s;return hnA(e,A,c,l,d,u,t)}:()=>Promise.resolve(),{when:o}=s;if(o){const[c,l]=o==="beforeChildren"?[r,a]:[a,r];return c().then(()=>l())}else return Promise.all([r(),a(t.delay)])}function hnA(e,A,t=0,n=0,s=0,r=1,a){const o=[];for(const c of e.variantChildren)c.notify("AnimationStart",A),o.push(Jy(c,A,{...a,delay:t+(typeof n=="function"?0:n)+xT(e.variantChildren,c,n,s,r)}).then(()=>c.notify("AnimationComplete",A)));return Promise.all(o)}function zT(e,A,t={}){e.notify("AnimationStart",A);let n;if(Array.isArray(A)){const s=A.map(r=>Jy(e,r,t));n=Promise.all(s)}else if(typeof A=="string")n=Jy(e,A,t);else{const s=typeof A=="function"?aG(e,A,t.custom):A;n=Promise.all(NT(e,s,t))}return n.then(()=>{e.notify("AnimationComplete",A)})}const wnA={test:e=>e==="auto",parse:e=>e},LT=e=>A=>A.test(e),XT=[oh,ge,ic,Hl,OeA,XeA,wnA],OT=e=>XT.find(LT(e));function QnA(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||VP(e):!0}const bnA=new Set(["brightness","contrast","saturate","opacity"]);function CnA(e){const[A,t]=e.slice(0,-1).split("(");if(A==="drop-shadow")return e;const[n]=t.match(wy)||[];if(!n)return e;const s=t.replace(n,"");let r=bnA.has(A)?1:0;return n!==t&&(r*=100),A+"("+r+s+")"}const vnA=/\b([a-z-]*)\(.*?\)/gu,Ky={...eB,getAnimatableNone:e=>{const A=e.match(vnA);return A?A.map(CnA).join(" "):e}},jy={...eB,getAnimatableNone:e=>{const A=eB.parse(e);return eB.createTransformer(e)(A.map(n=>typeof n=="number"?0:typeof n=="object"?{...n,alpha:1}:n))}},JT={...oh,transform:Math.round},$I={borderWidth:ge,borderTopWidth:ge,borderRightWidth:ge,borderBottomWidth:ge,borderLeftWidth:ge,borderRadius:ge,borderTopLeftRadius:ge,borderTopRightRadius:ge,borderBottomRightRadius:ge,borderBottomLeftRadius:ge,width:ge,maxWidth:ge,height:ge,maxHeight:ge,top:ge,right:ge,bottom:ge,left:ge,inset:ge,insetBlock:ge,insetBlockStart:ge,insetBlockEnd:ge,insetInline:ge,insetInlineStart:ge,insetInlineEnd:ge,padding:ge,paddingTop:ge,paddingRight:ge,paddingBottom:ge,paddingLeft:ge,paddingBlock:ge,paddingBlockStart:ge,paddingBlockEnd:ge,paddingInline:ge,paddingInlineStart:ge,paddingInlineEnd:ge,margin:ge,marginTop:ge,marginRight:ge,marginBottom:ge,marginLeft:ge,marginBlock:ge,marginBlockStart:ge,marginBlockEnd:ge,marginInline:ge,marginInlineStart:ge,marginInlineEnd:ge,fontSize:ge,backgroundPositionX:ge,backgroundPositionY:ge,...{rotate:Hl,pathRotation:Hl,rotateX:Hl,rotateY:Hl,rotateZ:Hl,scale:OI,scaleX:OI,scaleY:OI,scaleZ:OI,skew:Hl,skewX:Hl,skewY:Hl,distance:ge,translateX:ge,translateY:ge,translateZ:ge,x:ge,y:ge,z:ge,perspective:ge,transformPerspective:ge,opacity:WQ,originX:aT,originY:aT,originZ:ge},zIndex:JT,fillOpacity:WQ,strokeOpacity:WQ,numOctaves:JT},InA={...$I,color:Ds,backgroundColor:Ds,outlineColor:Ds,fill:Ds,stroke:Ds,borderColor:Ds,borderTopColor:Ds,borderRightColor:Ds,borderBottomColor:Ds,borderLeftColor:Ds,filter:Ky,WebkitFilter:Ky,mask:jy,WebkitMask:jy},KT=e=>InA[e],pnA=new Set([Ky,jy]);function jT(e,A){let t=KT(e);return pnA.has(t)||(t=eB),t.getAnimatableNone?t.getAnimatableNone(A):void 0}const HnA=new Set(["auto","none","0"]);function mnA(e,A,t){let n=0,s;for(;n<e.length&&!s;){const r=e[n];typeof r=="string"&&!HnA.has(r)&&ch(r).values.length&&(s=e[n]),n++}if(s&&t)for(const r of A)e[r]=jT(t,s)}class EnA extends Ty{constructor(A,t,n,s,r){super(A,t,n,s,r,!0)}readKeyframes(){const{unresolvedKeyframes:A,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let d=0;d<A.length;d++){let u=A[d];if(typeof u=="string"&&(u=u.trim(),hy(u))){const f=TT(u,t.current);f!==void 0&&(A[d]=f),d===A.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!ST.has(n)||A.length!==2)return;const[s,r]=A,a=OT(s),o=OT(r),c=sT(s),l=sT(r);if(c!==l&&ed[n]){this.needsMeasurement=!0;return}if(a!==o)if(vT(a)&&vT(o))for(let d=0;d<A.length;d++){const u=A[d];typeof u=="string"&&(A[d]=parseFloat(u))}else ed[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:A,name:t}=this,n=[];for(let s=0;s<A.length;s++)(A[s]===null||QnA(A[s]))&&n.push(s);n.length&&mnA(A,n,t)}measureInitialState(){const{element:A,unresolvedKeyframes:t,name:n}=this;if(!A||!A.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ed[n](A.measureViewportBox(),window.getComputedStyle(A.current)),t[0]=this.measuredOrigin;const s=t[t.length-1];s!==void 0&&A.getValue(n,s).jump(s,!1)}measureEndState(){const{element:A,name:t,unresolvedKeyframes:n}=this;if(!A||!A.current)return;const s=A.getValue(t);s&&s.jump(this.measuredOrigin,!1);const r=n.length-1,a=n[r];n[r]=ed[t](A.measureViewportBox(),window.getComputedStyle(A.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([o,c])=>{A.getValue(o).set(c)}),this.resolveNoneKeyframes()}}function _T(e,A,t){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let n=document;const s=t?.[e]??n.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(n=>n!=null)}const _y=(e,A)=>A&&typeof e=="number"?A.transform(e):e;function Ap(e){return SP(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:qy}=eT(queueMicrotask,!1),tB={x:!1,y:!1};function qT(){return tB.x||tB.y}function ynA(e){return e==="x"||e==="y"?tB[e]?null:(tB[e]=!0,()=>{tB[e]=!1}):tB.x||tB.y?null:(tB.x=tB.y=!0,()=>{tB.x=tB.y=!1})}function $T(e,A){const t=_T(e),n=new AbortController,s={passive:!0,...A,signal:n.signal};return[t,s,()=>n.abort()]}function YnA(e){return!(e.pointerType==="touch"||qT())}function ZnA(e,A,t={}){const[n,s,r]=$T(e,t);return n.forEach(a=>{let o=!1,c=!1,l;const d=()=>{a.removeEventListener("pointerleave",I)},u=E=>{l&&(l(E),l=void 0),d()},f=E=>{o=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),c&&(c=!1,u(E))},b=()=>{o=!0,window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",f,s)},I=E=>{if(E.pointerType!=="touch"){if(o){c=!0;return}u(E)}},y=E=>{if(!YnA(E))return;c=!1;const Z=A(a,E);typeof Z=="function"&&(l=Z,a.addEventListener("pointerleave",I,s))};a.addEventListener("pointerenter",y,s),a.addEventListener("pointerdown",b,s)}),r}const AR=(e,A)=>A?e===A?!0:AR(e,A.parentElement):!1,$y=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,knA=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function UnA(e){return knA.has(e.tagName)||e.isContentEditable===!0}const DnA=new Set(["INPUT","SELECT","TEXTAREA"]);function FnA(e){return DnA.has(e.tagName)||e.isContentEditable===!0}const ep=new WeakSet;function eR(e){return A=>{A.key==="Enter"&&e(A)}}function A9(e,A){e.dispatchEvent(new PointerEvent("pointer"+A,{isPrimary:!0,bubbles:!0}))}const xnA=(e,A)=>{const t=e.currentTarget;if(!t)return;const n=eR(()=>{if(ep.has(t))return;A9(t,"down");const s=eR(()=>{A9(t,"up")}),r=()=>A9(t,"cancel");t.addEventListener("keyup",s,A),t.addEventListener("blur",r,A)});t.addEventListener("keydown",n,A),t.addEventListener("blur",()=>t.removeEventListener("keydown",n),A)};function tR(e){return $y(e)&&!qT()}const nR=new WeakSet;function MnA(e,A,t={}){const[n,s,r]=$T(e,t),a=o=>{const c=o.currentTarget;if(!tR(o)||nR.has(o))return;ep.add(c),t.stopPropagation&&nR.add(o);const l=A(c,o),d=(b,I)=>{window.removeEventListener("pointerup",u),window.removeEventListener("pointercancel",f),ep.has(c)&&ep.delete(c),tR(b)&&typeof l=="function"&&l(b,{success:I})},u=b=>{d(b,c===window||c===document||t.useGlobalTarget||AR(c,b.target))},f=b=>{d(b,!1)};window.addEventListener("pointerup",u,s),window.addEventListener("pointercancel",f,s)};return n.forEach(o=>{(t.useGlobalTarget?window:o).addEventListener("pointerdown",a,s),Ap(o)&&(o.addEventListener("focus",l=>xnA(l,s)),!UnA(o)&&!o.hasAttribute("tabindex")&&(o.tabIndex=0))}),r}function e9(e){return SP(e)&&"ownerSVGElement"in e}const tp=new WeakMap;let np;const sR=(e,A,t)=>(n,s)=>s&&s[0]?s[0][e+"Size"]:e9(n)&&"getBBox"in n?n.getBBox()[A]:n[t],PnA=sR("inline","width","offsetWidth"),TnA=sR("block","height","offsetHeight");function RnA({target:e,borderBoxSize:A}){tp.get(e)?.forEach(t=>{t(e,{get width(){return PnA(e,A)},get height(){return TnA(e,A)}})})}function SnA(e){e.forEach(RnA)}function VnA(){typeof ResizeObserver>"u"||(np=new ResizeObserver(SnA))}function WnA(e,A){np||VnA();const t=_T(e);return t.forEach(n=>{let s=tp.get(n);s||(s=new Set,tp.set(n,s)),s.add(A),np?.observe(n)}),()=>{t.forEach(n=>{const s=tp.get(n);s?.delete(A),s?.size||np?.unobserve(n)})}}const sp=new Set;let uh;function NnA(){uh=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};sp.forEach(A=>A(e))},window.addEventListener("resize",uh)}function znA(e){return sp.add(e),uh||NnA(),()=>{sp.delete(e),!sp.size&&typeof uh=="function"&&(window.removeEventListener("resize",uh),uh=void 0)}}function rR(e,A){return typeof e=="function"?znA(e):WnA(e,A)}function LnA(e){return e9(e)&&e.tagName==="svg"}const XnA=[...XT,Ds,eB],OnA=e=>XnA.find(LT(e)),aR=()=>({translate:0,scale:1,origin:0,originPoint:0}),Gh=()=>({x:aR(),y:aR()}),iR=()=>({min:0,max:0}),js=()=>({x:iR(),y:iR()}),JnA=new WeakMap;function rp(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function OQ(e){return typeof e=="string"||Array.isArray(e)}const t9=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],n9=["initial",...t9];function ap(e){return rp(e.animate)||n9.some(A=>OQ(e[A]))}function oR(e){return!!(ap(e)||e.variants)}function KnA(e,A,t){for(const n in A){const s=A[n],r=t[n];if(kr(s))e.addValue(n,s);else if(kr(r))e.addValue(n,dh(s,{owner:e}));else if(r!==s)if(e.hasValue(n)){const a=e.getValue(n);a.liveStyle===!0?a.jump(s):a.hasAnimated||a.set(s)}else{const a=e.getStaticValue(n);e.addValue(n,dh(a!==void 0?a:s,{owner:e}))}}for(const n in t)A[n]===void 0&&e.removeValue(n);return A}const s9={current:null},BR={current:!1},jnA=typeof window<"u";function _nA(){if(BR.current=!0,!!jnA)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),A=()=>s9.current=e.matches;e.addEventListener("change",A),A()}else s9.current=!1}const cR=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ip={};function lR(e){ip=e}function qnA(){return ip}class $nA{scrapeMotionValuesFromProps(A,t,n){return{}}constructor({parent:A,props:t,presenceContext:n,reducedMotionConfig:s,skipAnimations:r,blockInitialAnimation:a,visualState:o},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Ty,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const b=la.now();this.renderScheduledAt<b&&(this.renderScheduledAt=b,dn.render(this.render,!1,!0))};const{latestValues:l,renderState:d}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=d,this.parent=A,this.props=t,this.presenceContext=n,this.depth=A?A.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=r,this.options=c,this.blockInitialAnimation=!!a,this.isControllingVariants=ap(t),this.isVariantNode=oR(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(A&&A.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(t,{},this);for(const b in f){const I=f[b];l[b]!==void 0&&kr(I)&&I.set(l[b])}}mount(A){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=A,JnA.set(A,this),this.projection&&!this.projection.instance&&this.projection.mount(A),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,n)=>this.bindToMotionValue(n,t)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(BR.current||_nA(),this.shouldReduceMotion=s9.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Ad(this.notifyUpdate),Ad(this.render),this.valueSubscriptions.forEach(A=>A()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const A in this.events)this.events[A].clear();for(const A in this.features){const t=this.features[A];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(A){this.children.add(A),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(A)}removeChild(A){this.children.delete(A),this.enteringChildren&&this.enteringChildren.delete(A)}bindToMotionValue(A,t){if(this.valueSubscriptions.has(A)&&this.valueSubscriptions.get(A)(),t.accelerate&&FT.has(A)&&this.current instanceof HTMLElement){const{factory:a,keyframes:o,times:c,ease:l,duration:d}=t.accelerate,u=new kT({element:this.current,name:A,keyframes:o,times:c,ease:l,duration:hi(d)}),f=a(u);this.valueSubscriptions.set(A,()=>{f(),u.cancel()});return}const n=gh.has(A);n&&this.onBindTransform&&this.onBindTransform();const s=t.on("change",a=>{this.latestValues[A]=a,this.props.onUpdate&&dn.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,A,t)),this.valueSubscriptions.set(A,()=>{s(),r&&r()})}sortNodePosition(A){return!this.current||!this.sortInstanceNodePosition||this.type!==A.type?0:this.sortInstanceNodePosition(this.current,A.current)}updateFeatures(){let A="animation";for(A in ip){const t=ip[A];if(!t)continue;const{isEnabled:n,Feature:s}=t;if(!this.features[A]&&s&&n(this.props)&&(this.features[A]=new s(this)),this.features[A]){const r=this.features[A];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):js()}getStaticValue(A){return this.latestValues[A]}setStaticValue(A,t){this.latestValues[A]=t}update(A,t){(A.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=A,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<cR.length;n++){const s=cR[n];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const r="on"+s,a=A[r];a&&(this.propEventSubscriptions[s]=this.on(s,a))}this.prevMotionValues=KnA(this,this.scrapeMotionValuesFromProps(A,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(A){return this.props.variants?this.props.variants[A]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(A){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(A),()=>t.variantChildren.delete(A)}addValue(A,t){const n=this.values.get(A);t!==n&&(n&&this.removeValue(A),this.bindToMotionValue(A,t),this.values.set(A,t),this.latestValues[A]=t.get())}removeValue(A){this.values.delete(A);const t=this.valueSubscriptions.get(A);t&&(t(),this.valueSubscriptions.delete(A)),delete this.latestValues[A],this.removeValueFromRenderState(A,this.renderState)}hasValue(A){return this.values.has(A)}getValue(A,t){if(this.props.values&&this.props.values[A])return this.props.values[A];let n=this.values.get(A);return n===void 0&&t!==void 0&&(n=dh(t===null?void 0:t,{owner:this}),this.addValue(A,n)),n}readValue(A,t){let n=this.latestValues[A]!==void 0||!this.current?this.latestValues[A]:this.getBaseTargetFromProps(this.props,A)??this.readValueFromInstance(this.current,A,this.options);return n!=null&&(typeof n=="string"&&(RP(n)||VP(n))?n=parseFloat(n):!OnA(n)&&eB.test(t)&&(n=jT(A,t)),this.setBaseTarget(A,kr(n)?n.get():n)),kr(n)?n.get():n}setBaseTarget(A,t){this.baseTarget[A]=t}getBaseTarget(A){const{initial:t}=this.props;let n;if(typeof t=="string"||typeof t=="object"){const r=Ny(this.props,t,this.presenceContext?.custom);r&&(n=r[A])}if(t&&n!==void 0)return n;const s=this.getBaseTargetFromProps(this.props,A);return s!==void 0&&!kr(s)?s:this.initialValues[A]!==void 0&&n===void 0?void 0:this.baseTarget[A]}on(A,t){return this.events[A]||(this.events[A]=new dy),this.events[A].add(t)}notify(A,...t){this.events[A]&&this.events[A].notify(...t)}scheduleRenderMicrotask(){qy.render(this.render)}}class gR extends $nA{constructor(){super(...arguments),this.KeyframeResolver=EnA}sortInstanceNodePosition(A,t){return A.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(A,t){const n=A.style;return n?n[t]:void 0}removeValueFromRenderState(A,{vars:t,style:n}){delete t[A],delete n[A]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:A}=this.props;kr(A)&&(this.childSubscription=A.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}class td{constructor(A){this.isMounted=!1,this.node=A}update(){}}function dR({top:e,left:A,right:t,bottom:n}){return{x:{min:A,max:t},y:{min:e,max:n}}}function AsA({x:e,y:A}){return{top:A.min,right:e.max,bottom:A.max,left:e.min}}function esA(e,A){if(!A)return e;const t=A({x:e.left,y:e.top}),n=A({x:e.right,y:e.bottom});return{top:t.y,left:t.x,bottom:n.y,right:n.x}}function r9(e){return e===void 0||e===1}function a9({scale:e,scaleX:A,scaleY:t}){return!r9(e)||!r9(A)||!r9(t)}function iG(e){return a9(e)||uR(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function uR(e){return GR(e.x)||GR(e.y)}function GR(e){return e&&e!=="0%"}function op(e,A,t){const n=e-t,s=A*n;return t+s}function fR(e,A,t,n,s){return s!==void 0&&(e=op(e,s,n)),op(e,t,n)+A}function i9(e,A=0,t=1,n,s){e.min=fR(e.min,A,t,n,s),e.max=fR(e.max,A,t,n,s)}function hR(e,{x:A,y:t}){i9(e.x,A.translate,A.scale,A.originPoint),i9(e.y,t.translate,t.scale,t.originPoint)}const wR=.999999999999,QR=1.0000000000001;function tsA(e,A,t,n=!1){const s=t.length;if(!s)return;A.x=A.y=1;let r,a;for(let o=0;o<s;o++){r=t[o],a=r.projectionDelta;const{visualElement:c}=r.options;c&&c.props.style&&c.props.style.display==="contents"||(n&&r.options.layoutScroll&&r.scroll&&r!==r.root&&(oc(e.x,-r.scroll.offset.x),oc(e.y,-r.scroll.offset.y)),a&&(A.x*=a.x.scale,A.y*=a.y.scale,hR(e,a)),n&&iG(r.latestValues)&&Bp(e,r.latestValues,r.layout?.layoutBox))}A.x<QR&&A.x>wR&&(A.x=1),A.y<QR&&A.y>wR&&(A.y=1)}function oc(e,A){e.min+=A,e.max+=A}function bR(e,A,t,n,s=.5){const r=un(e.min,e.max,s);i9(e,A,t,r,n)}function CR(e,A){return typeof e=="string"?parseFloat(e)/100*(A.max-A.min):e}function Bp(e,A,t){const n=t??e;bR(e.x,CR(A.x,n.x),A.scaleX,A.scale,A.originX),bR(e.y,CR(A.y,n.y),A.scaleY,A.scale,A.originY)}function vR(e,A){return dR(esA(e.getBoundingClientRect(),A))}function nsA(e,A,t){const n=vR(e,t),{scroll:s}=A;return s&&(oc(n.x,s.offset.x),oc(n.y,s.offset.y)),n}const ssA={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},rsA=lh.length;function asA(e,A,t){let n="",s=!0;for(let a=0;a<rsA;a++){const o=lh[a],c=e[o];if(c===void 0)continue;let l=!0;if(typeof c=="number")l=c===(o.startsWith("scale")?1:0);else{const d=parseFloat(c);l=o.startsWith("scale")?d===1:d===0}if(!l||t){const d=_y(c,$I[o]);if(!l){s=!1;const u=ssA[o]||o;n+=`${u}(${d}) `}t&&(A[o]=d)}}const r=e.pathRotation;return r&&(s=!1,n+=`rotate(${_y(r,$I.pathRotation)}) `),n=n.trim(),t?n=t(A,s?"":n):s&&(n="none"),n}function o9(e,A,t){const{style:n,vars:s,transformOrigin:r}=e;let a=!1,o=!1;for(const c in A){const l=A[c];if(gh.has(c)){a=!0;continue}else if(nT(c)){s[c]=l;continue}else{const d=_y(l,$I[c]);c.startsWith("origin")?(o=!0,r[c]=d):n[c]=d}}if(A.transform||(a||t?n.transform=asA(A,e.transform,t):n.transform&&(n.transform="none")),o){const{originX:c="50%",originY:l="50%",originZ:d=0}=r;n.transformOrigin=`${c} ${l} ${d}`}}function IR(e,{style:A,vars:t},n,s){const r=e.style;let a;for(a in A)r[a]=A[a];s?.applyProjectionStyles(r,n);for(a in t)r.setProperty(a,t[a])}function pR(e,A){return A.max===A.min?0:e/(A.max-A.min)*100}const JQ={correct:(e,A)=>{if(!A.target)return e;if(typeof e=="string")if(ge.test(e))e=parseFloat(e);else return e;const t=pR(e,A.target.x),n=pR(e,A.target.y);return`${t}% ${n}%`}},isA={correct:(e,{treeScale:A,projectionDelta:t})=>{const n=e,s=eB.parse(e);if(s.length>5)return n;const r=eB.createTransformer(e),a=typeof s[0]!="number"?1:0,o=t.x.scale*A.x,c=t.y.scale*A.y;s[0+a]/=o,s[1+a]/=c;const l=un(o,c,.5);return typeof s[2+a]=="number"&&(s[2+a]/=l),typeof s[3+a]=="number"&&(s[3+a]/=l),r(s)}},B9={borderRadius:{...JQ,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:JQ,borderTopRightRadius:JQ,borderBottomLeftRadius:JQ,borderBottomRightRadius:JQ,boxShadow:isA};function HR(e,{layout:A,layoutId:t}){return gh.has(e)||e.startsWith("origin")||(A||t!==void 0)&&(!!B9[e]||e==="opacity")}function c9(e,A,t){const n=e.style,s=A?.style,r={};if(!n)return r;for(const a in n)(kr(n[a])||s&&kr(s[a])||HR(a,e)||t?.getValue(a)?.liveStyle!==void 0)&&(r[a]=n[a]);return r}function osA(e){return window.getComputedStyle(e)}class BsA extends gR{constructor(){super(...arguments),this.type="html",this.renderInstance=IR}readValueFromInstance(A,t){if(gh.has(t))return this.projection?.isProjecting?Dy(t):DtA(A,t);{const n=osA(A),s=(nT(t)?n.getPropertyValue(t):n[t])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(A,{transformPagePoint:t}){return vR(A,t)}build(A,t,n){o9(A,t,n.transformTemplate)}scrapeMotionValuesFromProps(A,t,n){return c9(A,t,n)}}const csA={offset:"stroke-dashoffset",array:"stroke-dasharray"},lsA={offset:"strokeDashoffset",array:"strokeDasharray"};function gsA(e,A,t=1,n=0,s=!0){e.pathLength=1;const r=s?csA:lsA;e[r.offset]=`${-n}`,e[r.array]=`${A} ${t}`}const dsA=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function mR(e,{attrX:A,attrY:t,attrScale:n,pathLength:s,pathSpacing:r=1,pathOffset:a=0,...o},c,l,d){if(o9(e,o,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:u,style:f}=e;u.transform&&(f.transform=u.transform,delete u.transform),(f.transform||u.transformOrigin)&&(f.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),f.transform&&(f.transformBox=d?.transformBox??"fill-box",delete u.transformBox);for(const b of dsA)u[b]!==void 0&&(f[b]=u[b],delete u[b]);A!==void 0&&(u.x=A),t!==void 0&&(u.y=t),n!==void 0&&(u.scale=n),s!==void 0&&gsA(u,s,r,a,!1)}const ER=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"]),yR=e=>typeof e=="string"&&e.toLowerCase()==="svg";function usA(e,A,t,n){IR(e,A,void 0,n);for(const s in A.attrs)e.setAttribute(ER.has(s)?s:Oy(s),A.attrs[s])}function YR(e,A,t){const n=c9(e,A,t);for(const s in e)if(kr(e[s])||kr(A[s])){const r=lh.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;n[r]=e[s]}return n}class GsA extends gR{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=js}getBaseTargetFromProps(A,t){return A[t]}readValueFromInstance(A,t){if(gh.has(t)){const n=KT(t);return n&&n.default||0}return t=ER.has(t)?t:Oy(t),A.getAttribute(t)}scrapeMotionValuesFromProps(A,t,n){return YR(A,t,n)}build(A,t,n){mR(A,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(A,t,n,s){usA(A,t,n,s)}mount(A){this.isSVGTag=yR(A.tagName),super.mount(A)}}const fsA=n9.length;function ZR(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent?ZR(e.parent)||{}:{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}const A={};for(let t=0;t<fsA;t++){const n=n9[t],s=e.props[n];(OQ(s)||s===!1)&&(A[n]=s)}return A}function kR(e,A){if(!Array.isArray(A))return!1;const t=A.length;if(t!==e.length)return!1;for(let n=0;n<t;n++)if(A[n]!==e[n])return!1;return!0}const hsA=[...t9].reverse(),wsA=t9.length;function QsA(e){return A=>Promise.all(A.map(({animation:t,options:n})=>zT(e,t,n)))}function bsA(e){let A=QsA(e),t=UR(),n=!0,s=!1;const r=l=>(d,u)=>{const f=aG(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(f){const{transition:b,transitionEnd:I,...y}=f;d={...d,...y,...I}}return d};function a(l){A=l(e)}function o(l){const{props:d}=e,u=ZR(e.parent)||{},f=[],b=new Set;let I={},y=1/0;for(let Z=0;Z<wsA;Z++){const F=hsA[Z],S=t[F],M=d[F]!==void 0?d[F]:u[F],x=OQ(M),V=F===l?S.isActive:null;V===!1&&(y=Z);let N=M===u[F]&&M!==d[F]&&x;if(N&&(n||s)&&e.manuallyAnimateOnMount&&(N=!1),S.protectedKeys={...I},!S.isActive&&V===null||!M&&!S.prevProp||rp(M)||typeof M=="boolean")continue;if(F==="exit"&&S.isActive&&V!==!0){S.prevResolvedValues&&(I={...I,...S.prevResolvedValues});continue}const z=CsA(S.prevProp,M);let q=z||F===l&&S.isActive&&!N&&x||Z>y&&x,_=!1;const sA=Array.isArray(M)?M:[M];let oA=sA.reduce(r(F),{});V===!1&&(oA={});const{prevResolvedValues:CA={}}=S,fA={...CA,...oA},kA=eA=>{q=!0,b.has(eA)&&(_=!0,b.delete(eA)),S.needsAnimating[eA]=!0;const EA=e.getValue(eA);EA&&(EA.liveStyle=!1)};for(const eA in fA){const EA=oA[eA],tA=CA[eA];if(I.hasOwnProperty(eA))continue;let W=!1;zy(EA)&&zy(tA)?W=!kR(EA,tA)||z:W=EA!==tA,W?EA!=null?kA(eA):b.add(eA):EA!==void 0&&b.has(eA)?kA(eA):S.protectedKeys[eA]=!0}S.prevProp=M,S.prevResolvedValues=oA,S.isActive&&(I={...I,...oA}),(n||s)&&e.blockInitialAnimation&&(q=!1);const X=N&&z;q&&(!X||_)&&f.push(...sA.map(eA=>{const EA={type:F};if(typeof eA=="string"&&(n||s)&&!X&&e.manuallyAnimateOnMount&&e.parent){const{parent:tA}=e,W=aG(tA,eA);if(tA.enteringChildren&&W){const{delayChildren:uA}=W.transition||{};EA.delay=xT(tA.enteringChildren,e,uA)}}return{animation:eA,options:EA}}))}if(b.size){const Z={};if(typeof d.initial!="boolean"){const F=aG(e,Array.isArray(d.initial)?d.initial[0]:d.initial);F&&F.transition&&(Z.transition=F.transition)}b.forEach(F=>{const S=e.getBaseTarget(F),M=e.getValue(F);M&&(M.liveStyle=!0),Z[F]=S??null}),f.push({animation:Z})}let E=!!f.length;return n&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(E=!1),n=!1,s=!1,E?A(f):Promise.resolve()}function c(l,d){if(t[l].isActive===d)return Promise.resolve();e.variantChildren?.forEach(f=>f.animationState?.setActive(l,d)),t[l].isActive=d;const u=o(l);for(const f in t)t[f].protectedKeys={};return u}return{animateChanges:o,setActive:c,setAnimateFunction:a,getState:()=>t,reset:()=>{t=UR(),s=!0}}}function CsA(e,A){return typeof A=="string"?A!==e:Array.isArray(A)?!kR(A,e):!1}function oG(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function UR(){return{animate:oG(!0),whileInView:oG(),whileHover:oG(),whileTap:oG(),whileDrag:oG(),whileFocus:oG(),exit:oG()}}function l9(e,A){e.min=A.min,e.max=A.max}function nB(e,A){l9(e.x,A.x),l9(e.y,A.y)}function DR(e,A){e.translate=A.translate,e.scale=A.scale,e.originPoint=A.originPoint,e.origin=A.origin}const FR=1e-4,vsA=1-FR,IsA=1+FR,xR=.01,psA=0-xR,HsA=0+xR;function ga(e){return e.max-e.min}function msA(e,A,t){return Math.abs(e-A)<=t}function MR(e,A,t,n=.5){e.origin=n,e.originPoint=un(A.min,A.max,e.origin),e.scale=ga(t)/ga(A),e.translate=un(t.min,t.max,e.origin)-e.originPoint,(e.scale>=vsA&&e.scale<=IsA||isNaN(e.scale))&&(e.scale=1),(e.translate>=psA&&e.translate<=HsA||isNaN(e.translate))&&(e.translate=0)}function KQ(e,A,t,n){MR(e.x,A.x,t.x,n?n.originX:void 0),MR(e.y,A.y,t.y,n?n.originY:void 0)}function PR(e,A,t,n=0){const s=n?un(t.min,t.max,n):t.min;e.min=s+A.min,e.max=e.min+ga(A)}function EsA(e,A,t,n){PR(e.x,A.x,t.x,n?.x),PR(e.y,A.y,t.y,n?.y)}function TR(e,A,t,n=0){const s=n?un(t.min,t.max,n):t.min;e.min=A.min-s,e.max=e.min+ga(A)}function cp(e,A,t,n){TR(e.x,A.x,t.x,n?.x),TR(e.y,A.y,t.y,n?.y)}function RR(e,A,t,n,s){return e-=A,e=op(e,1/t,n),s!==void 0&&(e=op(e,1/s,n)),e}function ysA(e,A=0,t=1,n=.5,s,r=e,a=e){if(ic.test(A)&&(A=parseFloat(A),A=un(a.min,a.max,A/100)-a.min),typeof A!="number")return;let o=un(r.min,r.max,n);e===r&&(o-=A),e.min=RR(e.min,A,t,o,s),e.max=RR(e.max,A,t,o,s)}function SR(e,A,[t,n,s],r,a){ysA(e,A[t],A[n],A[s],A.scale,r,a)}const YsA=["x","scaleX","originX"],ZsA=["y","scaleY","originY"];function VR(e,A,t,n){SR(e.x,A,YsA,t?t.x:void 0,n?n.x:void 0),SR(e.y,A,ZsA,t?t.y:void 0,n?n.y:void 0)}function WR(e){return e.translate===0&&e.scale===1}function NR(e){return WR(e.x)&&WR(e.y)}function zR(e,A){return e.min===A.min&&e.max===A.max}function ksA(e,A){return zR(e.x,A.x)&&zR(e.y,A.y)}function LR(e,A){return Math.round(e.min)===Math.round(A.min)&&Math.round(e.max)===Math.round(A.max)}function XR(e,A){return LR(e.x,A.x)&&LR(e.y,A.y)}function OR(e){return ga(e.x)/ga(e.y)}function JR(e,A){return e.translate===A.translate&&e.scale===A.scale&&e.originPoint===A.originPoint}function Bc(e){return[e("x"),e("y")]}function UsA(e,A,t){let n="";const s=e.x.translate/A.x,r=e.y.translate/A.y,a=t?.z||0;if((s||r||a)&&(n=`translate3d(${s}px, ${r}px, ${a}px) `),(A.x!==1||A.y!==1)&&(n+=`scale(${1/A.x}, ${1/A.y}) `),t){const{transformPerspective:l,rotate:d,pathRotation:u,rotateX:f,rotateY:b,skewX:I,skewY:y}=t;l&&(n=`perspective(${l}px) ${n}`),d&&(n+=`rotate(${d}deg) `),u&&(n+=`rotate(${u}deg) `),f&&(n+=`rotateX(${f}deg) `),b&&(n+=`rotateY(${b}deg) `),I&&(n+=`skewX(${I}deg) `),y&&(n+=`skewY(${y}deg) `)}const o=e.x.scale*A.x,c=e.y.scale*A.y;return(o!==1||c!==1)&&(n+=`scale(${o}, ${c})`),n||"none"}const KR=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],DsA=KR.length,jR=e=>typeof e=="string"?parseFloat(e):e,_R=e=>typeof e=="number"||ge.test(e);function FsA(e,A,t,n,s,r){s?(e.opacity=un(0,t.opacity??1,xsA(n)),e.opacityExit=un(A.opacity??1,0,MsA(n))):r&&(e.opacity=un(A.opacity??1,t.opacity??1,n));for(let a=0;a<DsA;a++){const o=KR[a];let c=qR(A,o),l=qR(t,o);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||_R(c)===_R(l)?(e[o]=Math.max(un(jR(c),jR(l),n),0),(ic.test(l)||ic.test(c))&&(e[o]+="%")):e[o]=l}(A.rotate||t.rotate)&&(e.rotate=un(A.rotate||0,t.rotate||0,n))}function qR(e,A){return e[A]!==void 0?e[A]:e.borderRadius}const xsA=$R(0,.5,jP),MsA=$R(.5,.95,ao);function $R(e,A,t){return n=>n<e?0:n>A?1:t(SQ(e,A,n))}function PsA(e,A,t){const n=kr(e)?e:dh(e);return n.start(Wy("",n,A,t)),n.animation}function jQ(e,A,t,n={passive:!0}){return e.addEventListener(A,t,n),()=>e.removeEventListener(A,t)}const TsA=(e,A)=>e.depth-A.depth;class RsA{constructor(){this.children=[],this.isDirty=!1}add(A){ly(this.children,A),this.isDirty=!0}remove(A){zI(this.children,A),this.isDirty=!0}forEach(A){this.isDirty&&this.children.sort(TsA),this.isDirty=!1,this.children.forEach(A)}}function SsA(e,A){const t=la.now(),n=({timestamp:s})=>{const r=s-t;r>=A&&(Ad(n),e(r-A))};return dn.setup(n,!0),()=>Ad(n)}function lp(e){return kr(e)?e.get():e}class VsA{constructor(){this.members=[]}add(A){ly(this.members,A);for(let t=this.members.length-1;t>=0;t--){const n=this.members[t];if(n===A||n===this.lead||n===this.prevLead)continue;const s=n.instance;(!s||s.isConnected===!1)&&!n.snapshot&&(zI(this.members,n),n.unmount())}A.scheduleRender()}remove(A){if(zI(this.members,A),A===this.prevLead&&(this.prevLead=void 0),A===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(A){for(let t=this.members.indexOf(A)-1;t>=0;t--){const n=this.members[t];if(n.isPresent!==!1&&n.instance?.isConnected!==!1)return this.promote(n),!0}return!1}promote(A,t){const n=this.lead;if(A!==n&&(this.prevLead=n,this.lead=A,A.show(),n)){n.updateSnapshot(),A.scheduleRender();const{layoutDependency:s}=n.options,{layoutDependency:r}=A.options;(s===void 0||s!==r)&&(A.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(A.snapshot=n.snapshot,A.snapshot.latestValues=n.animationValues||n.latestValues),A.root?.isUpdating&&(A.isLayoutDirty=!0)),A.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(A=>{A.options.onExitComplete?.(),A.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(A=>A.instance&&A.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const gp={hasAnimatedSinceResize:!0,hasEverUpdated:!1},g9=["","X","Y","Z"],WsA=1e3;let NsA=0;function d9(e,A,t,n){const{latestValues:s}=A;s[e]&&(t[e]=s[e],A.setStaticValue(e,0),n&&(n[e]=0))}function A4(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:A}=e.options;if(!A)return;const t=WT(A);if(window.MotionHasOptimisedAnimation(t,"transform")){const{layout:s,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(t,"transform",dn,!(s||r))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&A4(n)}function e4({attachResizeListener:e,defaultParent:A,measureScroll:t,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(a={},o=A?.()){this.id=NsA++,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(XsA),this.nodes.forEach(qsA),this.nodes.forEach($sA),this.nodes.forEach(OsA)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new RsA)}addEventListener(a,o){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new dy),this.eventHandlers.get(a).add(o)}notifyListeners(a,...o){const c=this.eventHandlers.get(a);c&&c.notify(...o)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=e9(a)&&!LnA(a),this.instance=a;const{layoutId:o,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||o)&&(this.isLayoutDirty=!0),e){let d,u=0;const f=()=>this.root.updateBlockedByResize=!1;dn.read(()=>{u=window.innerWidth}),e(a,()=>{const b=window.innerWidth;b!==u&&(u=b,this.root.updateBlockedByResize=!0,d&&d(),d=SsA(f,250),gp.hasAnimatedSinceResize&&(gp.hasAnimatedSinceResize=!1,this.nodes.forEach(s4)))})}o&&this.root.registerSharedNode(o,this),this.options.animate!==!1&&l&&(o||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:u,hasRelativeLayoutChanged:f,layout:b})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const I=this.options.transition||l.getDefaultTransition()||srA,{onLayoutAnimationStart:y,onLayoutAnimationComplete:E}=l.getProps(),Z=!this.targetLayout||!XR(this.targetLayout,b),F=!u&&f;if(this.options.layoutRoot||this.resumeFrom||F||u&&(Z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const S={...Vy(I,"layout"),onPlay:y,onComplete:E};(l.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S),this.setAnimationOrigin(d,F,S.path)}else u||s4(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=b})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ad(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(ArA),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&A4(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const u=this.path[d];u.shouldResetTransform=!0,(typeof u.latestValues.x=="string"||typeof u.latestValues.y=="string")&&(u.isLayoutDirty=!0),u.updateScroll("snapshot"),u.options.layoutRoot&&u.willUpdate(!1)}const{layoutId:o,layout:c}=this.options;if(o===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(KsA),this.nodes.forEach(t4);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(n4);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(jsA),this.nodes.forEach(_sA),this.nodes.forEach(zsA),this.nodes.forEach(LsA)):this.nodes.forEach(n4),this.clearAllSnapshots();const o=la.now();Zr.delta=ac(0,1e3/60,o-Zr.timestamp),Zr.timestamp=o,Zr.isProcessing=!0,fy.update.process(Zr),fy.preRender.process(Zr),fy.render.process(Zr),Zr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,qy.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(JsA),this.sharedNodes.forEach(erA)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,dn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){dn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ga(this.snapshot.measuredBox.x)&&!ga(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=js()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let o=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(o=!1),o&&this.instance){const c=n(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:t(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,o=this.projectionDelta&&!NR(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,d=l!==this.prevTransformTemplateValue;a&&this.instance&&(o||iG(this.latestValues)||d)&&(s(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const o=this.measurePageBox();let c=this.removeElementScroll(o);return a&&(c=this.removeTransform(c)),rrA(c),{animationId:this.root.animationId,measuredBox:o,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return js();const o=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(arA))){const{scroll:l}=this.root;l&&(oc(o.x,l.offset.x),oc(o.y,l.offset.y))}return o}removeElementScroll(a){const o=js();if(nB(o,a),this.scroll?.wasRoot)return o;for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:d,options:u}=l;l!==this.root&&d&&u.layoutScroll&&(d.wasRoot&&nB(o,a),oc(o.x,d.offset.x),oc(o.y,d.offset.y))}return o}applyTransform(a,o=!1,c){const l=c||js();nB(l,a);for(let d=0;d<this.path.length;d++){const u=this.path[d];!o&&u.options.layoutScroll&&u.scroll&&u!==u.root&&(oc(l.x,-u.scroll.offset.x),oc(l.y,-u.scroll.offset.y)),iG(u.latestValues)&&Bp(l,u.latestValues,u.layout?.layoutBox)}return iG(this.latestValues)&&Bp(l,this.latestValues,this.layout?.layoutBox),l}removeTransform(a){const o=js();nB(o,a);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!iG(l.latestValues))continue;let d;l.instance&&(a9(l.latestValues)&&l.updateSnapshot(),d=js(),nB(d,l.measurePageBox())),VR(o,l.latestValues,l.snapshot?.layoutBox,d)}return iG(this.latestValues)&&VR(o,this.latestValues),o}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Zr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const o=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=o.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=o.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=o.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==o;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:u}=this.options;if(!this.layout||!(d||u))return;this.resolvedRelativeTargetAt=Zr.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=js(),this.targetWithTransforms=js()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),EsA(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):nB(this.target,this.layout.layoutBox),hR(this.target,this.targetDelta)):nB(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||a9(this.parent.latestValues)||uR(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,o,c){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=js(),this.relativeTargetOrigin=js(),cp(this.relativeTargetOrigin,o,c,this.options.layoutAnchor||void 0),nB(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const a=this.getLead(),o=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),o&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Zr.timestamp&&(c=!1),c)return;const{layout:l,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||d))return;nB(this.layoutCorrected,this.layout.layoutBox);const u=this.treeScale.x,f=this.treeScale.y;tsA(this.layoutCorrected,this.treeScale,this.path,o),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=js());const{target:b}=a;if(!b){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(DR(this.prevProjectionDelta.x,this.projectionDelta.x),DR(this.prevProjectionDelta.y,this.projectionDelta.y)),KQ(this.projectionDelta,this.layoutCorrected,b,this.latestValues),(this.treeScale.x!==u||this.treeScale.y!==f||!JR(this.projectionDelta.x,this.prevProjectionDelta.x)||!JR(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",b))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const o=this.getStack();o&&o.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Gh(),this.projectionDelta=Gh(),this.projectionDeltaWithTransform=Gh()}setAnimationOrigin(a,o=!1,c){const l=this.snapshot,d=l?l.latestValues:{},u={...this.latestValues},f=Gh();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const b=js(),I=l?l.source:void 0,y=this.layout?this.layout.source:void 0,E=I!==y,Z=this.getStack(),F=!Z||Z.members.length<=1,S=!!(E&&!F&&this.options.crossfade===!0&&!this.path.some(nrA));this.animationProgress=0;let M;const x=c?.interpolateProjection(a);this.mixTargetDelta=V=>{const N=V/1e3,z=x?.(N);z?(f.x.translate=z.x,f.x.scale=un(a.x.scale,1,N),f.x.origin=a.x.origin,f.x.originPoint=a.x.originPoint,f.y.translate=z.y,f.y.scale=un(a.y.scale,1,N),f.y.origin=a.y.origin,f.y.originPoint=a.y.originPoint):(r4(f.x,a.x,N),r4(f.y,a.y,N)),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(cp(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),trA(this.relativeTarget,this.relativeTargetOrigin,b,N),M&&ksA(this.relativeTarget,M)&&(this.isProjectionDirty=!1),M||(M=js()),nB(M,this.relativeTarget)),E&&(this.animationValues=u,FsA(u,d,this.latestValues,N,S,F)),z&&z.rotate!==void 0&&(this.animationValues||(this.animationValues=u),this.animationValues.pathRotation=z.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=N},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ad(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=dn.update(()=>{gp.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=dh(0)),this.motionValue.jump(0,!1),this.currentAnimation=PsA(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:o=>{this.mixTargetDelta(o),a.onUpdate&&a.onUpdate(o)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(WsA),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:o,target:c,layout:l,latestValues:d}=a;if(!(!o||!c||!l)){if(this!==a&&this.layout&&l&&c4(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||js();const u=ga(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+u;const f=ga(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+f}nB(o,c),Bp(o,d),KQ(this.projectionDeltaWithTransform,this.layoutCorrected,o,d)}}registerSharedNode(a,o){this.sharedNodes.has(a)||this.sharedNodes.set(a,new VsA),this.sharedNodes.get(a).add(o);const l=o.options.initialPromotionConfig;o.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(o):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:o,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let o=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(o=!0),!o)return;const l={};c.z&&d9("z",a,l,this.animationValues);for(let d=0;d<g9.length;d++)d9(`rotate${g9[d]}`,a,l,this.animationValues),d9(`skew${g9[d]}`,a,l,this.animationValues);a.render();for(const d in l)a.setStaticValue(d,l[d]),this.animationValues&&(this.animationValues[d]=l[d]);a.scheduleRender()}applyProjectionStyles(a,o){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=lp(o?.pointerEvents)||"",a.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=lp(o?.pointerEvents)||""),this.hasProjected&&!iG(this.latestValues)&&(a.transform=c?c({},""):"none",this.hasProjected=!1);return}a.visibility="";const d=l.animationValues||l.latestValues;this.applyTransformsToTarget();let u=UsA(this.projectionDeltaWithTransform,this.treeScale,d);c&&(u=c(d,u)),a.transform=u;const{x:f,y:b}=this.projectionDelta;a.transformOrigin=`${f.origin*100}% ${b.origin*100}% 0`,l.animationValues?a.opacity=l===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:a.opacity=l===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const I in B9){if(d[I]===void 0)continue;const{correct:y,applyTo:E,isCSSVariable:Z}=B9[I],F=u==="none"?d[I]:y(d[I],l);if(E){const S=E.length;for(let M=0;M<S;M++)a[E[M]]=F}else Z?this.options.visualElement.renderState.vars[I]=F:a[I]=F}this.options.layoutId&&(a.pointerEvents=l===this?lp(o?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(t4),this.root.sharedNodes.clear()}}}function zsA(e){e.updateLayout()}function LsA(e){const A=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&A&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:n}=e.layout,{animationType:s}=e.options,r=A.source!==e.layout.source;if(s==="size")Bc(d=>{const u=r?A.measuredBox[d]:A.layoutBox[d],f=ga(u);u.min=t[d].min,u.max=u.min+f});else if(s==="x"||s==="y"){const d=s==="x"?"y":"x";l9(r?A.measuredBox[d]:A.layoutBox[d],t[d])}else c4(s,A.layoutBox,t)&&Bc(d=>{const u=r?A.measuredBox[d]:A.layoutBox[d],f=ga(t[d]);u.max=u.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+f)});const a=Gh();KQ(a,t,A.layoutBox);const o=Gh();r?KQ(o,e.applyTransform(n,!0),A.measuredBox):KQ(o,t,A.layoutBox);const c=!NR(a);let l=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:u,layout:f}=d;if(u&&f){const b=e.options.layoutAnchor||void 0,I=js();cp(I,A.layoutBox,u.layoutBox,b);const y=js();cp(y,t,f.layoutBox,b),XR(I,y)||(l=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=I,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:A,delta:o,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function XsA(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 OsA(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function JsA(e){e.clearSnapshot()}function t4(e){e.clearMeasurements()}function KsA(e){e.isLayoutDirty=!0,e.updateLayout()}function n4(e){e.isLayoutDirty=!1}function jsA(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function _sA(e){const{visualElement:A}=e.options;A&&A.getProps().onBeforeLayoutMeasure&&A.notify("BeforeLayoutMeasure"),e.resetTransform()}function s4(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function qsA(e){e.resolveTargetDelta()}function $sA(e){e.calcProjection()}function ArA(e){e.resetSkewAndRotation()}function erA(e){e.removeLeadSnapshot()}function r4(e,A,t){e.translate=un(A.translate,0,t),e.scale=un(A.scale,1,t),e.origin=A.origin,e.originPoint=A.originPoint}function a4(e,A,t,n){e.min=un(A.min,t.min,n),e.max=un(A.max,t.max,n)}function trA(e,A,t,n){a4(e.x,A.x,t.x,n),a4(e.y,A.y,t.y,n)}function nrA(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const srA={duration:.45,ease:[.4,0,.1,1]},i4=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),o4=i4("applewebkit/")&&!i4("chrome/")?Math.round:ao;function B4(e){e.min=o4(e.min),e.max=o4(e.max)}function rrA(e){B4(e.x),B4(e.y)}function c4(e,A,t){return e==="position"||e==="preserve-aspect"&&!msA(OR(A),OR(t),.2)}function arA(e){return e!==e.root&&e.scroll?.wasRoot}const irA=e4({attachResizeListener:(e,A)=>jQ(e,"resize",A),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),u9={current:void 0},l4=e4({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!u9.current){const e=new irA({});e.mount(window),e.setOptions({layoutScroll:!0}),u9.current=e}return u9.current},resetTransform:(e,A)=>{e.style.transform=A!==void 0?A:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),G9=D.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function g4(e,A){if(typeof e=="function")return e(A);e!=null&&(e.current=A)}function orA(...e){return A=>{let t=!1;const n=e.map(s=>{const r=g4(s,A);return!t&&typeof r=="function"&&(t=!0),r});if(t)return()=>{for(let s=0;s<n.length;s++){const r=n[s];typeof r=="function"?r():g4(e[s],null)}}}}function BrA(...e){return D.useCallback(orA(...e),e)}class crA extends D.Component{getSnapshotBeforeUpdate(A){const t=this.props.childRef.current;if(Ap(t)&&A.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const n=t.offsetParent,s=Ap(n)&&n.offsetWidth||0,r=Ap(n)&&n.offsetHeight||0,a=getComputedStyle(t),o=this.props.sizeRef.current;o.height=parseFloat(a.height),o.width=parseFloat(a.width),o.top=t.offsetTop,o.left=t.offsetLeft,o.right=s-o.width-o.left,o.bottom=r-o.height-o.top,o.direction=a.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function lrA({children:e,isPresent:A,anchorX:t,anchorY:n,root:s,pop:r}){const a=D.useId(),o=D.useRef(null),c=D.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:l}=D.useContext(G9),d=e.props?.ref??e?.ref,u=BrA(o,d);return D.useInsertionEffect(()=>{const{width:f,height:b,top:I,left:y,right:E,bottom:Z,direction:F}=c.current;if(A||r===!1||!o.current||!f||!b)return;const S=F==="rtl",M=t==="left"?S?`right: ${E}`:`left: ${y}`:S?`left: ${y}`:`right: ${E}`,x=n==="bottom"?`bottom: ${Z}`:`top: ${I}`;o.current.dataset.motionPopId=a;const V=document.createElement("style");l&&(V.nonce=l);const N=s??document.head;return N.appendChild(V),V.sheet&&V.sheet.insertRule(`
|
|
325
|
+
Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let d=$o(),u;if(A){let E=typeof A=="string"?eG(A):A;As(c==="/"||E.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${E.pathname}" was given in the \`location\` prop.`),u=E}else u=d;let f=u.pathname||"/",b=f;if(c!=="/"){let E=c.replace(/^\//,"").split("/");b="/"+f.replace(/^\//,"").split("/").slice(E.length).join("/")}let I=t&&t.state.matches.length?t.state.matches.map(E=>Object.assign(E,{route:t.manifest[E.route.id]||E.route})):GP(e,{pathname:b});_o(l||I!=null,`No routes matched location "${u.pathname}${u.search}${u.hash}" `),_o(I==null||I[I.length-1].route.element!==void 0||I[I.length-1].route.Component!==void 0||I[I.length-1].route.lazy!==void 0,`Matched leaf route at location "${u.pathname}${u.search}${u.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let y=TAA(I&&I.map(E=>Object.assign({},E,{params:Object.assign({},a,E.params),pathname:qo([c,n.encodeLocation?n.encodeLocation(E.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?c:qo([c,n.encodeLocation?n.encodeLocation(E.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),s,t);return A&&y?D.createElement(FQ.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...u},navigationType:"POP"}},y):y}function FAA(){let e=NAA(),A=CAA(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),t=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:n},r={padding:"2px 4px",backgroundColor:n},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=D.createElement(D.Fragment,null,D.createElement("p",null,"💿 Hey developer 👋"),D.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",D.createElement("code",{style:r},"ErrorBoundary")," or"," ",D.createElement("code",{style:r},"errorElement")," prop on your route.")),D.createElement(D.Fragment,null,D.createElement("h2",null,"Unexpected Application Error!"),D.createElement("h3",{style:{fontStyle:"italic"}},A),t?D.createElement("pre",{style:s},t):null,a)}var xAA=D.createElement(FAA,null),kP=class extends D.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,A){return A.location!==e.location||A.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:A.error,location:A.location,revalidation:e.revalidation||A.revalidation}}componentDidCatch(e,A){this.props.onError?this.props.onError(e,A):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const t=ZAA(e.digest);t&&(e=t)}let A=e!==void 0?D.createElement(pl.Provider,{value:this.props.routeContext},D.createElement(_3.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?D.createElement(MAA,{error:e},A):A}};kP.contextType=HP;var q3=new WeakMap;function MAA({children:e,error:A}){let{basename:t}=D.useContext(ro);if(typeof A=="object"&&A&&"digest"in A&&typeof A.digest=="string"){let n=YAA(A.digest);if(n){let s=q3.get(A);if(s)throw s;let r=IP(n.location,t);if(vP&&!q3.get(A))if(r.isExternal||n.reloadDocument)window.location.href=r.absoluteURL||r.to;else{const a=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(r.to,{replace:n.replace}));throw q3.set(A,a),a}return D.createElement("meta",{httpEquiv:"refresh",content:`0;url=${r.absoluteURL||r.to}`})}}return e}function PAA({routeContext:e,match:A,children:t}){let n=D.useContext(ih);return n&&n.static&&n.staticContext&&(A.route.errorElement||A.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=A.route.id),D.createElement(pl.Provider,{value:e},t)}function TAA(e,A=[],t){let n=t?.state;if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(A.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,r=n?.errors;if(r!=null){let d=s.findIndex(u=>u.route.id&&r?.[u.route.id]!==void 0);As(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(r).join(",")}`),s=s.slice(0,Math.min(s.length,d+1))}let a=!1,o=-1;if(t&&n){a=n.renderFallback;for(let d=0;d<s.length;d++){let u=s[d];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(o=d),u.route.id){let{loaderData:f,errors:b}=n,I=u.route.loader&&!f.hasOwnProperty(u.route.id)&&(!b||b[u.route.id]===void 0);if(u.route.lazy||I){t.isStatic&&(a=!0),o>=0?s=s.slice(0,o+1):s=[s[0]];break}}}}let c=t?.onError,l=n&&c?(d,u)=>{c(d,{location:n.location,params:n.matches?.[0]?.params??{},pattern:vAA(n.matches),errorInfo:u})}:void 0;return s.reduceRight((d,u,f)=>{let b,I=!1,y=null,E=null;n&&(b=r&&u.route.id?r[u.route.id]:void 0,y=u.route.errorElement||xAA,a&&(o<0&&f===0?(DP("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),I=!0,E=null):o===f&&(I=!0,E=u.route.hydrateFallbackElement||null)));let Z=A.concat(s.slice(0,f+1)),F=()=>{let S;return b?S=y:I?S=E:u.route.Component?S=D.createElement(u.route.Component,null):u.route.element?S=u.route.element:S=d,D.createElement(PAA,{match:u,routeContext:{outlet:d,matches:Z,isDataRoute:n!=null},children:S})};return n&&(u.route.ErrorBoundary||u.route.errorElement||f===0)?D.createElement(kP,{location:n.location,revalidation:n.revalidation,component:y,error:b,children:F(),routeContext:{outlet:null,matches:Z,isDataRoute:!0},onError:l}):F()},null)}function $3(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function RAA(e){let A=D.useContext(ih);return As(A,$3(e)),A}function SAA(e){let A=D.useContext(FI);return As(A,$3(e)),A}function VAA(e){let A=D.useContext(pl);return As(A,$3(e)),A}function Ay(e){let A=VAA(e),t=A.matches[A.matches.length-1];return As(t.route.id,`${e} can only be used on routes that contain a unique "id"`),t.route.id}function WAA(){return Ay("useRouteId")}function NAA(){let e=D.useContext(_3),A=SAA("useRouteError"),t=Ay("useRouteError");return e!==void 0?e:A.errors?.[t]}function zAA(){let{router:e}=RAA("useNavigate"),A=Ay("useNavigate"),t=D.useRef(!1);return YP(()=>{t.current=!0}),D.useCallback(async(s,r={})=>{_o(t.current,yP),t.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:A,...r}))},[e,A])}var UP={};function DP(e,A,t){!A&&!UP[e]&&(UP[e]=!0,_o(!1,t))}D.memo(LAA);function LAA({routes:e,manifest:A,future:t,state:n,isStatic:s,onError:r}){return ZP(e,void 0,{manifest:A,state:n,isStatic:s,onError:r})}function XAA({basename:e,children:A,initialEntries:t,initialIndex:n,useTransitions:s}){let r=D.useRef();r.current==null&&(r.current=_$({initialEntries:t,initialIndex:n,v5Compat:!0}));let a=r.current,[o,c]=D.useState({action:a.action,location:a.location}),l=D.useCallback(d=>{s===!1?c(d):D.startTransition(()=>c(d))},[s]);return D.useLayoutEffect(()=>a.listen(l),[a,l]),D.createElement(OAA,{basename:e,children:A,location:o.location,navigationType:o.action,navigator:a,useTransitions:s})}function rc(e){As(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function OAA({basename:e="/",children:A=null,location:t,navigationType:n="POP",navigator:s,static:r=!1,useTransitions:a}){As(!xQ(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),c=D.useMemo(()=>({basename:o,navigator:s,static:r,useTransitions:a,future:{}}),[o,s,r,a]);typeof t=="string"&&(t=eG(t));let{pathname:l="/",search:d="",hash:u="",state:f=null,key:b="default",mask:I}=t,y=D.useMemo(()=>{let E=Il(l,o);return E==null?null:{location:{pathname:E,search:d,hash:u,state:f,key:b,mask:I},navigationType:n}},[o,l,d,u,f,b,n,I]);return _o(y!=null,`<Router basename="${o}"> is not able to match the URL "${l}${d}${u}" because it does not start with the basename, so the <Router> won't render anything.`),y==null?null:D.createElement(ro.Provider,{value:c},D.createElement(FQ.Provider,{children:A,value:y}))}function JAA({children:e,location:A}){return DAA(ey(e),A)}function ey(e,A=[]){let t=[];return D.Children.forEach(e,(n,s)=>{if(!D.isValidElement(n))return;let r=[...A,s];if(n.type===D.Fragment){t.push.apply(t,ey(n.props.children,r));return}As(n.type===rc,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),As(!n.props.index||!n.props.children,"An index route cannot have child routes.");let a={id:n.props.id||r.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(a.children=ey(n.props.children,r)),t.push(a)}),t}var xI="get",MI="application/x-www-form-urlencoded";function PI(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function KAA(e){return PI(e)&&e.tagName.toLowerCase()==="button"}function jAA(e){return PI(e)&&e.tagName.toLowerCase()==="form"}function _AA(e){return PI(e)&&e.tagName.toLowerCase()==="input"}function qAA(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function $AA(e,A){return e.button===0&&(!A||A==="_self")&&!qAA(e)}var TI=null;function AeA(){if(TI===null)try{new FormData(document.createElement("form"),0),TI=!1}catch{TI=!0}return TI}var eeA=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ty(e){return e!=null&&!eeA.has(e)?(_o(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${MI}"`),null):e}function teA(e,A){let t,n,s,r,a;if(jAA(e)){let o=e.getAttribute("action");n=o?Il(o,A):null,t=e.getAttribute("method")||xI,s=ty(e.getAttribute("enctype"))||MI,r=new FormData(e)}else if(KAA(e)||_AA(e)&&(e.type==="submit"||e.type==="image")){let o=e.form;if(o==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||o.getAttribute("action");if(n=c?Il(c,A):null,t=e.getAttribute("formmethod")||o.getAttribute("method")||xI,s=ty(e.getAttribute("formenctype"))||ty(o.getAttribute("enctype"))||MI,r=new FormData(o,e),!AeA()){let{name:l,type:d,value:u}=e;if(d==="image"){let f=l?`${l}.`:"";r.append(`${f}x`,"0"),r.append(`${f}y`,"0")}else l&&r.append(l,u)}}else{if(PI(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');t=xI,n=null,s=MI,a=e}return r&&s==="text/plain"&&(a=r,r=void 0),{action:n,method:t.toLowerCase(),encType:s,formData:r,body:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ny(e,A){if(e===!1||e===null||typeof e>"u")throw new Error(A)}function FP(e,A,t,n){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return t?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${n}`:s.pathname=`${s.pathname}.${n}`:s.pathname==="/"?s.pathname=`_root.${n}`:A&&Il(s.pathname,A)==="/"?s.pathname=`${DI(A)}/_root.${n}`:s.pathname=`${DI(s.pathname)}.${n}`,s}async function neA(e,A){if(e.id in A)return A[e.id];try{let t=await import(e.module);return A[e.id]=t,t}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function seA(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function reA(e,A,t){let n=await Promise.all(e.map(async s=>{let r=A.routes[s.route.id];if(r){let a=await neA(r,t);return a.links?a.links():[]}return[]}));return BeA(n.flat(1).filter(seA).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function xP(e,A,t,n,s,r){let a=(c,l)=>t[l]?c.route.id!==t[l].route.id:!0,o=(c,l)=>t[l].pathname!==c.pathname||t[l].route.path?.endsWith("*")&&t[l].params["*"]!==c.params["*"];return r==="assets"?A.filter((c,l)=>a(c,l)||o(c,l)):r==="data"?A.filter((c,l)=>{let d=n.routes[c.route.id];if(!d||!d.hasLoader)return!1;if(a(c,l)||o(c,l))return!0;if(c.route.shouldRevalidate){let u=c.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:t[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof u=="boolean")return u}return!0}):[]}function aeA(e,A,{includeHydrateFallback:t}={}){return ieA(e.map(n=>{let s=A.routes[n.route.id];if(!s)return[];let r=[s.module];return s.clientActionModule&&(r=r.concat(s.clientActionModule)),s.clientLoaderModule&&(r=r.concat(s.clientLoaderModule)),t&&s.hydrateFallbackModule&&(r=r.concat(s.hydrateFallbackModule)),s.imports&&(r=r.concat(s.imports)),r}).flat(1))}function ieA(e){return[...new Set(e)]}function oeA(e){let A={},t=Object.keys(e).sort();for(let n of t)A[n]=e[n];return A}function BeA(e,A){let t=new Set;return new Set(A),e.reduce((n,s)=>{let r=JSON.stringify(oeA(s));return t.has(r)||(t.add(r),n.push({key:r,link:s})),n},[])}function sy(){let e=D.useContext(ih);return ny(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function ceA(){let e=D.useContext(FI);return ny(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ry=D.createContext(void 0);ry.displayName="FrameworkContext";function ay(){let e=D.useContext(ry);return ny(e,"You must render this element inside a <HydratedRouter> element"),e}function leA(e,A){let t=D.useContext(ry),[n,s]=D.useState(!1),[r,a]=D.useState(!1),{onFocus:o,onBlur:c,onMouseEnter:l,onMouseLeave:d,onTouchStart:u}=A,f=D.useRef(null);D.useEffect(()=>{if(e==="render"&&a(!0),e==="viewport"){let y=Z=>{Z.forEach(F=>{a(F.isIntersecting)})},E=new IntersectionObserver(y,{threshold:.5});return f.current&&E.observe(f.current),()=>{E.disconnect()}}},[e]),D.useEffect(()=>{if(n){let y=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(y)}}},[n]);let b=()=>{s(!0)},I=()=>{s(!1),a(!1)};return t?e!=="intent"?[r,f,{}]:[r,f,{onFocus:PQ(o,b),onBlur:PQ(c,I),onMouseEnter:PQ(l,b),onMouseLeave:PQ(d,I),onTouchStart:PQ(u,b)}]:[!1,f,{}]}function PQ(e,A){return t=>{e&&e(t),t.defaultPrevented||A(t)}}function geA({page:e,...A}){let t=pAA(),{router:n}=sy(),s=D.useMemo(()=>GP(n.routes,e,n.basename),[n.routes,e,n.basename]);return s?t?D.createElement(ueA,{page:e,matches:s,...A}):D.createElement(GeA,{page:e,matches:s,...A}):null}function deA(e){let{manifest:A,routeModules:t}=ay(),[n,s]=D.useState([]);return D.useEffect(()=>{let r=!1;return reA(e,A,t).then(a=>{r||s(a)}),()=>{r=!0}},[e,A,t]),n}function ueA({page:e,matches:A,...t}){let n=$o(),{future:s}=ay(),{basename:r}=sy(),a=D.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let o=FP(e,r,s.unstable_trailingSlashAwareDataRequests,"rsc"),c=!1,l=[];for(let d of A)typeof d.route.shouldRevalidate=="function"?c=!0:l.push(d.route.id);return c&&l.length>0&&o.searchParams.set("_routes",l.join(",")),[o.pathname+o.search]},[r,s.unstable_trailingSlashAwareDataRequests,e,n,A]);return D.createElement(D.Fragment,null,a.map(o=>D.createElement("link",{key:o,rel:"prefetch",as:"fetch",href:o,...t})))}function GeA({page:e,matches:A,...t}){let n=$o(),{future:s,manifest:r,routeModules:a}=ay(),{basename:o}=sy(),{loaderData:c,matches:l}=ceA(),d=D.useMemo(()=>xP(e,A,l,r,n,"data"),[e,A,l,r,n]),u=D.useMemo(()=>xP(e,A,l,r,n,"assets"),[e,A,l,r,n]),f=D.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let y=new Set,E=!1;if(A.forEach(F=>{let S=r.routes[F.route.id];!S||!S.hasLoader||(!d.some(M=>M.route.id===F.route.id)&&F.route.id in c&&a[F.route.id]?.shouldRevalidate||S.hasClientLoader?E=!0:y.add(F.route.id))}),y.size===0)return[];let Z=FP(e,o,s.unstable_trailingSlashAwareDataRequests,"data");return E&&y.size>0&&Z.searchParams.set("_routes",A.filter(F=>y.has(F.route.id)).map(F=>F.route.id).join(",")),[Z.pathname+Z.search]},[o,s.unstable_trailingSlashAwareDataRequests,c,n,r,d,A,e,a]),b=D.useMemo(()=>aeA(u,r),[u,r]),I=deA(u);return D.createElement(D.Fragment,null,f.map(y=>D.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...t})),b.map(y=>D.createElement("link",{key:y,rel:"modulepreload",href:y,...t})),I.map(({key:y,link:E})=>D.createElement("link",{key:y,nonce:t.nonce,...E,crossOrigin:E.crossOrigin??t.crossOrigin})))}function feA(...e){return A=>{e.forEach(t=>{typeof t=="function"?t(A):t!=null&&(t.current=A)})}}var heA=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{heA&&(window.__reactRouterVersion="7.15.1")}catch{}var MP=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,RI=D.forwardRef(function({onClick:A,discover:t="render",prefetch:n="none",relative:s,reloadDocument:r,replace:a,mask:o,state:c,target:l,to:d,preventScrollReset:u,viewTransition:f,defaultShouldRevalidate:b,...I},y){let{basename:E,navigator:Z,useTransitions:F}=D.useContext(ro),S=typeof d=="string"&&MP.test(d),M=IP(d,E);d=M.to;let x=kAA(d,{relative:s}),V=$o(),N=null;if(o){let kA=j3(o,[],V.mask?V.mask.pathname:"/",!0);E!=="/"&&(kA.pathname=kA.pathname==="/"?E:qo([E,kA.pathname])),N=Z.createHref(kA)}let[z,q,_]=leA(n,I),sA=CeA(d,{replace:a,mask:o,state:c,target:l,preventScrollReset:u,relative:s,viewTransition:f,defaultShouldRevalidate:b,useTransitions:F});function oA(kA){A&&A(kA),kA.defaultPrevented||sA(kA)}let CA=!(M.isExternal||r),fA=D.createElement("a",{...I,..._,href:(CA?N:void 0)||M.absoluteURL||x,onClick:CA?oA:A,ref:feA(y,q),target:l,"data-discover":!S&&t==="render"?"true":void 0});return z&&!S?D.createElement(D.Fragment,null,fA,D.createElement(geA,{page:x})):fA});RI.displayName="Link";var weA=D.forwardRef(function({"aria-current":A="page",caseSensitive:t=!1,className:n="",end:s=!1,style:r,to:a,viewTransition:o,children:c,...l},d){let u=MQ(a,{relative:l.relative}),f=$o(),b=D.useContext(FI),{navigator:I,basename:y}=D.useContext(ro),E=b!=null&&meA(u)&&o===!0,Z=I.encodeLocation?I.encodeLocation(u).pathname:u.pathname,F=f.pathname,S=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;t||(F=F.toLowerCase(),S=S?S.toLowerCase():null,Z=Z.toLowerCase()),S&&y&&(S=Il(S,y)||S);const M=Z!=="/"&&Z.endsWith("/")?Z.length-1:Z.length;let x=F===Z||!s&&F.startsWith(Z)&&F.charAt(M)==="/",V=S!=null&&(S===Z||!s&&S.startsWith(Z)&&S.charAt(Z.length)==="/"),N={isActive:x,isPending:V,isTransitioning:E},z=x?A:void 0,q;typeof n=="function"?q=n(N):q=[n,x?"active":null,V?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let _=typeof r=="function"?r(N):r;return D.createElement(RI,{...l,"aria-current":z,className:q,ref:d,style:_,to:a,viewTransition:o},typeof c=="function"?c(N):c)});weA.displayName="NavLink";var QeA=D.forwardRef(({discover:e="render",fetcherKey:A,navigate:t,reloadDocument:n,replace:s,state:r,method:a=xI,action:o,onSubmit:c,relative:l,preventScrollReset:d,viewTransition:u,defaultShouldRevalidate:f,...b},I)=>{let{useTransitions:y}=D.useContext(ro),E=peA(),Z=HeA(o,{relative:l}),F=a.toLowerCase()==="get"?"get":"post",S=typeof o=="string"&&MP.test(o),M=x=>{if(c&&c(x),x.defaultPrevented)return;x.preventDefault();let V=x.nativeEvent.submitter,N=V?.getAttribute("formmethod")||a,z=()=>E(V||x.currentTarget,{fetcherKey:A,method:N,navigate:t,replace:s,state:r,relative:l,preventScrollReset:d,viewTransition:u,defaultShouldRevalidate:f});y&&t!==!1?D.startTransition(()=>z()):z()};return D.createElement("form",{ref:I,method:F,action:Z,onSubmit:n?c:M,...b,"data-discover":!S&&e==="render"?"true":void 0})});QeA.displayName="Form";function beA(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function PP(e){let A=D.useContext(ih);return As(A,beA(e)),A}function CeA(e,{target:A,replace:t,mask:n,state:s,preventScrollReset:r,relative:a,viewTransition:o,defaultShouldRevalidate:c,useTransitions:l}={}){let d=ca(),u=$o(),f=MQ(e,{relative:a});return D.useCallback(b=>{if($AA(b,A)){b.preventDefault();let I=t!==void 0?t:kI(u)===kI(f),y=()=>d(e,{replace:I,mask:n,state:s,preventScrollReset:r,relative:a,viewTransition:o,defaultShouldRevalidate:c});l?D.startTransition(()=>y()):y()}},[u,d,f,t,n,s,A,e,r,a,o,c,l])}var veA=0,IeA=()=>`__${String(++veA)}__`;function peA(){let{router:e}=PP("useSubmit"),{basename:A}=D.useContext(ro),t=WAA(),n=e.fetch,s=e.navigate;return D.useCallback(async(r,a={})=>{let{action:o,method:c,encType:l,formData:d,body:u}=teA(r,A);if(a.navigate===!1){let f=a.fetcherKey||IeA();await n(f,t,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:d,body:u,formMethod:a.method||c,formEncType:a.encType||l,flushSync:a.flushSync})}else await s(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:d,body:u,formMethod:a.method||c,formEncType:a.encType||l,replace:a.replace,state:a.state,fromRouteId:t,flushSync:a.flushSync,viewTransition:a.viewTransition})},[n,s,A,t])}function HeA(e,{relative:A}={}){let{basename:t}=D.useContext(ro),n=D.useContext(pl);As(n,"useFormAction must be used inside a RouteContext");let[s]=n.matches.slice(-1),r={...MQ(e||".",{relative:A})},a=$o();if(e==null){r.search=a.search;let o=new URLSearchParams(r.search),c=o.getAll("index");if(c.some(d=>d==="")){o.delete("index"),c.filter(u=>u).forEach(u=>o.append("index",u));let d=o.toString();r.search=d?`?${d}`:""}}return(!e||e===".")&&s.route.index&&(r.search=r.search?r.search.replace(/^\?/,"?index&"):"?index"),t!=="/"&&(r.pathname=r.pathname==="/"?t:qo([t,r.pathname])),kI(r)}function meA(e,{relative:A}={}){let t=D.useContext(mP);As(t!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=PP("useViewTransitionState"),s=MQ(e,{relative:A});if(!t.isTransitioning)return!1;let r=Il(t.currentLocation.pathname,n)||t.currentLocation.pathname,a=Il(t.nextLocation.pathname,n)||t.nextLocation.pathname;return UI(s.pathname,a)!=null||UI(s.pathname,r)!=null}const TP="beta@careshiphealth.com",tG="https://beta.careshiphealth.com",SI="https://api.beta.careshiphealth.com",VI=`${SI}/rt`,iy=420,TQ=540,EeA=520,AB={FACE_LG_ICON:`${tG}/bolt/faceLg.svg`,AI_ASSISTANT_TALK_ICON:`${tG}/bolt/new/ai-assistant-talk-icon.svg`,AI_ASSISTANT_CHAT_ICON:`${tG}/bolt/new/ai-assistant-chat-icon.svg`,AI_ASSISTANT__CALL_ICON:`${tG}/bolt/new/ai-assistant-call-icon.svg`,AI_ASSISTANT_ICON_BW:`${tG}/bolt/new/ai-assistant-icon-bw.svg`,MINIMIZE_ICON:`${tG}/bolt/new/minimize-icon.svg`,MAXIMIZE_ICON:`${tG}/bolt/new/maximize-icon.svg`},oy="Ela",yeA=e=>p.jsxs("svg",{width:"34",height:"34",viewBox:"0 0 34 34",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p.jsx("path",{d:"M14.788 9.48971C14.5248 9.05746 14.1061 8.74231 13.6179 8.60892C13.1297 8.47552 12.609 8.53399 12.1625 8.77233C10.0479 9.9113 8.85588 12.1545 9.63525 14.3233C10.5054 16.7288 11.8175 18.9504 13.5041 20.8736C15.178 22.7934 17.1908 24.3887 19.4421 25.5799C21.4658 26.6469 23.8375 25.7746 25.2439 23.8137C25.5398 23.4011 25.6681 22.8917 25.603 22.3882C25.538 21.8848 25.2843 21.4247 24.8933 21.1009L23.3591 19.8338C23.0516 19.5788 22.6745 19.4221 22.2768 19.384C21.8791 19.346 21.4792 19.4283 21.1288 19.6203L18.456 21.0859L17.857 20.6704C17.1019 20.1437 16.411 19.5305 15.7985 18.8432C15.1987 18.1437 14.6865 17.3736 14.2732 16.55L13.9463 15.9052L15.7449 13.4461C15.9827 13.1198 16.1177 12.73 16.1327 12.3265C16.1477 11.923 16.042 11.5243 15.829 11.1813L14.788 9.48971ZM11.0452 6.69431C12.0219 6.171 13.1616 6.041 14.231 6.33095C15.3004 6.6209 16.2184 7.30884 16.797 8.2538L17.8352 9.94349C18.2934 10.6853 18.5203 11.5468 18.4868 12.4181C18.4533 13.2893 18.161 14.1309 17.6471 14.8353L16.7193 16.1029C16.9446 16.4768 17.2323 16.8985 17.575 17.2949C17.9164 17.6843 18.2917 18.0262 18.6269 18.299L19.9935 17.5482C20.7578 17.1299 21.63 16.9506 22.4973 17.0335C23.3646 17.1164 24.1871 17.4578 24.8582 18.0133L26.3925 19.2804C27.2451 19.9846 27.7986 20.9863 27.9411 22.0829C28.0836 23.1796 27.8044 24.2894 27.1601 25.1881C25.2861 27.8016 21.707 29.439 18.3439 27.665C15.8368 26.3392 13.5952 24.5633 11.7308 22.4261C9.84914 20.2812 8.38523 17.8032 7.41459 15.1201C6.13111 11.5432 8.22187 8.21369 11.0457 6.69662",fill:e?.color||"black"}),p.jsx("path",{d:"M25.026 11.6502L25.3027 11.0139C25.7888 9.88815 26.6795 8.9853 27.7991 8.48354L28.6541 8.10358C28.7574 8.05583 28.8449 7.97955 28.9061 7.88374C28.9674 7.78793 29 7.67659 29 7.56288C29 7.44918 28.9674 7.33784 28.9061 7.24203C28.8449 7.14622 28.7574 7.06993 28.6541 7.02218L27.8464 6.66247C26.6986 6.14642 25.7927 5.21019 25.3151 4.04664L25.0305 3.36093C24.9887 3.25454 24.9158 3.1632 24.8213 3.09882C24.7267 3.03444 24.615 3 24.5006 3C24.3862 3 24.2745 3.03444 24.18 3.09882C24.0854 3.1632 24.0125 3.25454 23.9707 3.36093L23.6861 4.04777C23.208 5.2111 22.3017 6.14692 21.1537 6.66247L20.3471 7.02106C20.2435 7.06867 20.1557 7.14497 20.0942 7.2409C20.0327 7.33684 20 7.44838 20 7.56232C20 7.67626 20.0327 7.78781 20.0942 7.88374C20.1557 7.97967 20.2435 8.05597 20.3471 8.10358L21.201 8.48466C22.3208 8.98593 23.2119 9.88837 23.6985 11.0139L23.9752 11.6502C24.0185 11.7538 24.0914 11.8423 24.1849 11.9045C24.2784 11.9668 24.3883 12 24.5006 12C24.613 12 24.7228 11.9668 24.8163 11.9045C24.9098 11.8423 24.9827 11.7538 25.026 11.6502Z",fill:e?.color||"black"})]}),By=D.createContext({});function WI(e){const A=D.useRef(null);return A.current===null&&(A.current=e()),A.current}const cy=typeof window<"u"?D.useLayoutEffect:D.useEffect,NI=D.createContext(null);function ly(e,A){e.indexOf(A)===-1&&e.push(A)}function zI(e,A){const t=e.indexOf(A);t>-1&&e.splice(t,1)}const ac=(e,A,t)=>t>A?A:t<e?e:t;let gy=()=>{};const $g={},RP=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),SP=e=>typeof e=="object"&&e!==null,VP=e=>/^0[^.\s]+$/u.test(e);function WP(e){let A;return()=>(A===void 0&&(A=e()),A)}const ao=e=>e,RQ=(...e)=>e.reduce((A,t)=>n=>t(A(n))),SQ=(e,A,t)=>{const n=A-e;return n?(t-e)/n:1};class dy{constructor(){this.subscriptions=[]}add(A){return ly(this.subscriptions,A),()=>zI(this.subscriptions,A)}notify(A,t,n){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](A,t,n);else for(let r=0;r<s;r++){const a=this.subscriptions[r];a&&a(A,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const hi=e=>e*1e3,io=e=>e/1e3,NP=(e,A)=>A?e*(1e3/A):0,zP=(e,A,t)=>(((1-3*t+3*A)*e+(3*t-6*A))*e+3*A)*e,YeA=1e-7,ZeA=12;function keA(e,A,t,n,s){let r,a,o=0;do a=A+(t-A)/2,r=zP(a,n,s)-e,r>0?t=a:A=a;while(Math.abs(r)>YeA&&++o<ZeA);return a}function VQ(e,A,t,n){if(e===A&&t===n)return ao;const s=r=>keA(r,0,1,e,t);return r=>r===0||r===1?r:zP(s(r),A,n)}const LP=e=>A=>A<=.5?e(2*A)/2:(2-e(2*(1-A)))/2,XP=e=>A=>1-e(1-A),OP=VQ(.33,1.53,.69,.99),uy=XP(OP),JP=LP(uy),KP=e=>e>=1?1:(e*=2)<1?.5*uy(e):.5*(2-Math.pow(2,-10*(e-1))),Gy=e=>1-Math.sin(Math.acos(e)),jP=XP(Gy),_P=LP(Gy),UeA=VQ(.42,0,1,1),DeA=VQ(0,0,.58,1),qP=VQ(.42,0,.58,1),FeA=e=>Array.isArray(e)&&typeof e[0]!="number",$P=e=>Array.isArray(e)&&typeof e[0]=="number",xeA={linear:ao,easeIn:UeA,easeInOut:qP,easeOut:DeA,circIn:Gy,circInOut:_P,circOut:jP,backIn:uy,backInOut:JP,backOut:OP,anticipate:KP},MeA=e=>typeof e=="string",AT=e=>{if($P(e)){gy(e.length===4);const[A,t,n,s]=e;return VQ(A,t,n,s)}else if(MeA(e))return xeA[e];return e},LI=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function PeA(e,A){let t=new Set,n=new Set,s=!1,r=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function c(d){a.has(d)&&(l.schedule(d),e()),d(o)}const l={schedule:(d,u=!1,f=!1)=>{const I=f&&s?t:n;return u&&a.add(d),I.add(d),d},cancel:d=>{n.delete(d),a.delete(d)},process:d=>{if(o=d,s){r=!0;return}s=!0;const u=t;t=n,n=u,t.forEach(c),t.clear(),s=!1,r&&(r=!1,l.process(d))}};return l}const TeA=40;function eT(e,A){let t=!1,n=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>t=!0,a=LI.reduce((S,M)=>(S[M]=PeA(r),S),{}),{setup:o,read:c,resolveKeyframes:l,preUpdate:d,update:u,preRender:f,render:b,postRender:I}=a,y=()=>{const S=$g.useManualTiming,M=S?s.timestamp:performance.now();t=!1,S||(s.delta=n?1e3/60:Math.max(Math.min(M-s.timestamp,TeA),1)),s.timestamp=M,s.isProcessing=!0,o.process(s),c.process(s),l.process(s),d.process(s),u.process(s),f.process(s),b.process(s),I.process(s),s.isProcessing=!1,t&&A&&(n=!1,e(y))},E=()=>{t=!0,n=!0,s.isProcessing||e(y)};return{schedule:LI.reduce((S,M)=>{const x=a[M];return S[M]=(V,N=!1,z=!1)=>(t||E(),x.schedule(V,N,z)),S},{}),cancel:S=>{for(let M=0;M<LI.length;M++)a[LI[M]].cancel(S)},state:s,steps:a}}const{schedule:dn,cancel:Ad,state:Zr,steps:fy}=eT(typeof requestAnimationFrame<"u"?requestAnimationFrame:ao,!0);let XI;function ReA(){XI=void 0}const la={now:()=>(XI===void 0&&la.set(Zr.isProcessing||$g.useManualTiming?Zr.timestamp:performance.now()),XI),set:e=>{XI=e,queueMicrotask(ReA)}},tT=e=>A=>typeof A=="string"&&A.startsWith(e),nT=tT("--"),SeA=tT("var(--"),hy=e=>SeA(e)?VeA.test(e.split("/*")[0].trim()):!1,VeA=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function sT(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const oh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},WQ={...oh,transform:e=>ac(0,1,e)},OI={...oh,default:1},NQ=e=>Math.round(e*1e5)/1e5,wy=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function WeA(e){return e==null}const NeA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Qy=(e,A)=>t=>!!(typeof t=="string"&&NeA.test(t)&&t.startsWith(e)||A&&!WeA(t)&&Object.prototype.hasOwnProperty.call(t,A)),rT=(e,A,t)=>n=>{if(typeof n!="string")return n;const[s,r,a,o]=n.match(wy);return{[e]:parseFloat(s),[A]:parseFloat(r),[t]:parseFloat(a),alpha:o!==void 0?parseFloat(o):1}},zeA=e=>ac(0,255,e),by={...oh,transform:e=>Math.round(zeA(e))},nG={test:Qy("rgb","red"),parse:rT("red","green","blue"),transform:({red:e,green:A,blue:t,alpha:n=1})=>"rgba("+by.transform(e)+", "+by.transform(A)+", "+by.transform(t)+", "+NQ(WQ.transform(n))+")"};function LeA(e){let A="",t="",n="",s="";return e.length>5?(A=e.substring(1,3),t=e.substring(3,5),n=e.substring(5,7),s=e.substring(7,9)):(A=e.substring(1,2),t=e.substring(2,3),n=e.substring(3,4),s=e.substring(4,5),A+=A,t+=t,n+=n,s+=s),{red:parseInt(A,16),green:parseInt(t,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}const Cy={test:Qy("#"),parse:LeA,transform:nG.transform},zQ=e=>({test:A=>typeof A=="string"&&A.endsWith(e)&&A.split(" ").length===1,parse:parseFloat,transform:A=>`${A}${e}`}),Hl=zQ("deg"),ic=zQ("%"),ge=zQ("px"),XeA=zQ("vh"),OeA=zQ("vw"),aT={...ic,parse:e=>ic.parse(e)/100,transform:e=>ic.transform(e*100)},Bh={test:Qy("hsl","hue"),parse:rT("hue","saturation","lightness"),transform:({hue:e,saturation:A,lightness:t,alpha:n=1})=>"hsla("+Math.round(e)+", "+ic.transform(NQ(A))+", "+ic.transform(NQ(t))+", "+NQ(WQ.transform(n))+")"},Ds={test:e=>nG.test(e)||Cy.test(e)||Bh.test(e),parse:e=>nG.test(e)?nG.parse(e):Bh.test(e)?Bh.parse(e):Cy.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?nG.transform(e):Bh.transform(e),getAnimatableNone:e=>{const A=Ds.parse(e);return A.alpha=0,Ds.transform(A)}},JeA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function KeA(e){return isNaN(e)&&typeof e=="string"&&(e.match(wy)?.length||0)+(e.match(JeA)?.length||0)>0}const iT="number",oT="color",jeA="var",_eA="var(",BT="${}",qeA=/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 ch(e){const A=e.toString(),t=[],n={color:[],number:[],var:[]},s=[];let r=0;const o=A.replace(qeA,c=>(Ds.test(c)?(n.color.push(r),s.push(oT),t.push(Ds.parse(c))):c.startsWith(_eA)?(n.var.push(r),s.push(jeA),t.push(c)):(n.number.push(r),s.push(iT),t.push(parseFloat(c))),++r,BT)).split(BT);return{values:t,split:o,indexes:n,types:s}}function $eA(e){return ch(e).values}function cT({split:e,types:A}){const t=e.length;return n=>{let s="";for(let r=0;r<t;r++)if(s+=e[r],n[r]!==void 0){const a=A[r];a===iT?s+=NQ(n[r]):a===oT?s+=Ds.transform(n[r]):s+=n[r]}return s}}function AtA(e){return cT(ch(e))}const etA=e=>typeof e=="number"?0:Ds.test(e)?Ds.getAnimatableNone(e):e,ttA=(e,A)=>typeof e=="number"?A?.trim().endsWith("/")?e:0:etA(e);function ntA(e){const A=ch(e);return cT(A)(A.values.map((n,s)=>ttA(n,A.split[s])))}const eB={test:KeA,parse:$eA,createTransformer:AtA,getAnimatableNone:ntA};function vy(e,A,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?e+(A-e)*6*t:t<1/2?A:t<2/3?e+(A-e)*(2/3-t)*6:e}function stA({hue:e,saturation:A,lightness:t,alpha:n}){e/=360,A/=100,t/=100;let s=0,r=0,a=0;if(!A)s=r=a=t;else{const o=t<.5?t*(1+A):t+A-t*A,c=2*t-o;s=vy(c,o,e+1/3),r=vy(c,o,e),a=vy(c,o,e-1/3)}return{red:Math.round(s*255),green:Math.round(r*255),blue:Math.round(a*255),alpha:n}}function JI(e,A){return t=>t>0?A:e}const un=(e,A,t)=>e+(A-e)*t,Iy=(e,A,t)=>{const n=e*e,s=t*(A*A-n)+n;return s<0?0:Math.sqrt(s)},rtA=[Cy,nG,Bh],atA=e=>rtA.find(A=>A.test(e));function lT(e){const A=atA(e);if(!A)return!1;let t=A.parse(e);return A===Bh&&(t=stA(t)),t}const gT=(e,A)=>{const t=lT(e),n=lT(A);if(!t||!n)return JI(e,A);const s={...t};return r=>(s.red=Iy(t.red,n.red,r),s.green=Iy(t.green,n.green,r),s.blue=Iy(t.blue,n.blue,r),s.alpha=un(t.alpha,n.alpha,r),nG.transform(s))},py=new Set(["none","hidden"]);function itA(e,A){return py.has(e)?t=>t<=0?e:A:t=>t>=1?A:e}function otA(e,A){return t=>un(e,A,t)}function Hy(e){return typeof e=="number"?otA:typeof e=="string"?hy(e)?JI:Ds.test(e)?gT:ltA:Array.isArray(e)?dT:typeof e=="object"?Ds.test(e)?gT:BtA:JI}function dT(e,A){const t=[...e],n=t.length,s=e.map((r,a)=>Hy(r)(r,A[a]));return r=>{for(let a=0;a<n;a++)t[a]=s[a](r);return t}}function BtA(e,A){const t={...e,...A},n={};for(const s in t)e[s]!==void 0&&A[s]!==void 0&&(n[s]=Hy(e[s])(e[s],A[s]));return s=>{for(const r in n)t[r]=n[r](s);return t}}function ctA(e,A){const t=[],n={color:0,var:0,number:0};for(let s=0;s<A.values.length;s++){const r=A.types[s],a=e.indexes[r][n[r]],o=e.values[a]??0;t[s]=o,n[r]++}return t}const ltA=(e,A)=>{const t=eB.createTransformer(A),n=ch(e),s=ch(A);return n.indexes.var.length===s.indexes.var.length&&n.indexes.color.length===s.indexes.color.length&&n.indexes.number.length>=s.indexes.number.length?py.has(e)&&!s.values.length||py.has(A)&&!n.values.length?itA(e,A):RQ(dT(ctA(n,s),s.values),t):JI(e,A)};function uT(e,A,t){return typeof e=="number"&&typeof A=="number"&&typeof t=="number"?un(e,A,t):Hy(e)(e,A)}const gtA=e=>{const A=({timestamp:t})=>e(t);return{start:(t=!0)=>dn.update(A,t),stop:()=>Ad(A),now:()=>Zr.isProcessing?Zr.timestamp:la.now()}},GT=(e,A,t=10)=>{let n="";const s=Math.max(Math.round(A/t),2);for(let r=0;r<s;r++)n+=Math.round(e(r/(s-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},KI=2e4;function my(e){let A=0;const t=50;let n=e.next(A);for(;!n.done&&A<KI;)A+=t,n=e.next(A);return A>=KI?1/0:A}function dtA(e,A=100,t){const n=t({...e,keyframes:[0,A]}),s=Math.min(my(n),KI);return{type:"keyframes",ease:r=>n.next(s*r).value/A,duration:io(s)}}const es={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};function Ey(e,A){return e*Math.sqrt(1-A*A)}const utA=12;function GtA(e,A,t){let n=t;for(let s=1;s<utA;s++)n=n-e(n)/A(n);return n}const yy=.001;function ftA({duration:e=es.duration,bounce:A=es.bounce,velocity:t=es.velocity,mass:n=es.mass}){let s,r,a=1-A;a=ac(es.minDamping,es.maxDamping,a),e=ac(es.minDuration,es.maxDuration,io(e)),a<1?(s=l=>{const d=l*a,u=d*e,f=d-t,b=Ey(l,a),I=Math.exp(-u);return yy-f/b*I},r=l=>{const u=l*a*e,f=u*t+t,b=Math.pow(a,2)*Math.pow(l,2)*e,I=Math.exp(-u),y=Ey(Math.pow(l,2),a);return(-s(l)+yy>0?-1:1)*((f-b)*I)/y}):(s=l=>{const d=Math.exp(-l*e),u=(l-t)*e+1;return-yy+d*u},r=l=>{const d=Math.exp(-l*e),u=(t-l)*(e*e);return d*u});const o=5/e,c=GtA(s,r,o);if(e=hi(e),isNaN(c))return{stiffness:es.stiffness,damping:es.damping,duration:e};{const l=Math.pow(c,2)*n;return{stiffness:l,damping:a*2*Math.sqrt(n*l),duration:e}}}const htA=["duration","bounce"],wtA=["stiffness","damping","mass"];function fT(e,A){return A.some(t=>e[t]!==void 0)}function QtA(e){let A={velocity:es.velocity,stiffness:es.stiffness,damping:es.damping,mass:es.mass,isResolvedFromDuration:!1,...e};if(!fT(e,wtA)&&fT(e,htA))if(A.velocity=0,e.visualDuration){const t=e.visualDuration,n=2*Math.PI/(t*1.2),s=n*n,r=2*ac(.05,1,1-(e.bounce||0))*Math.sqrt(s);A={...A,mass:es.mass,stiffness:s,damping:r}}else{const t=ftA({...e,velocity:0});A={...A,...t,mass:es.mass},A.isResolvedFromDuration=!0}return A}function jI(e=es.visualDuration,A=es.bounce){const t=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:A}:e;let{restSpeed:n,restDelta:s}=t;const r=t.keyframes[0],a=t.keyframes[t.keyframes.length-1],o={done:!1,value:r},{stiffness:c,damping:l,mass:d,duration:u,velocity:f,isResolvedFromDuration:b}=QtA({...t,velocity:-io(t.velocity||0)}),I=f||0,y=l/(2*Math.sqrt(c*d)),E=a-r,Z=io(Math.sqrt(c/d)),F=Math.abs(E)<5;n||(n=F?es.restSpeed.granular:es.restSpeed.default),s||(s=F?es.restDelta.granular:es.restDelta.default);let S,M,x,V,N,z;if(y<1)x=Ey(Z,y),V=(I+y*Z*E)/x,S=_=>{const sA=Math.exp(-y*Z*_);return a-sA*(V*Math.sin(x*_)+E*Math.cos(x*_))},N=y*Z*V+E*x,z=y*Z*E-V*x,M=_=>Math.exp(-y*Z*_)*(N*Math.sin(x*_)+z*Math.cos(x*_));else if(y===1){S=sA=>a-Math.exp(-Z*sA)*(E+(I+Z*E)*sA);const _=I+Z*E;M=sA=>Math.exp(-Z*sA)*(Z*_*sA-I)}else{const _=Z*Math.sqrt(y*y-1);S=fA=>{const kA=Math.exp(-y*Z*fA),X=Math.min(_*fA,300);return a-kA*((I+y*Z*E)*Math.sinh(X)+_*E*Math.cosh(X))/_};const sA=(I+y*Z*E)/_,oA=y*Z*sA-E*_,CA=y*Z*E-sA*_;M=fA=>{const kA=Math.exp(-y*Z*fA),X=Math.min(_*fA,300);return kA*(oA*Math.sinh(X)+CA*Math.cosh(X))}}const q={calculatedDuration:b&&u||null,velocity:_=>hi(M(_)),next:_=>{if(!b&&y<1){const oA=Math.exp(-y*Z*_),CA=Math.sin(x*_),fA=Math.cos(x*_),kA=a-oA*(V*CA+E*fA),X=hi(oA*(N*CA+z*fA));return o.done=Math.abs(X)<=n&&Math.abs(a-kA)<=s,o.value=o.done?a:kA,o}const sA=S(_);if(b)o.done=_>=u;else{const oA=hi(M(_));o.done=Math.abs(oA)<=n&&Math.abs(a-sA)<=s}return o.value=o.done?a:sA,o},toString:()=>{const _=Math.min(my(q),KI),sA=GT(oA=>q.next(_*oA).value,_,30);return _+"ms "+sA},toTransition:()=>{}};return q}jI.applyToOptions=e=>{const A=dtA(e,100,jI);return e.ease=A.ease,e.duration=hi(A.duration),e.type="keyframes",e};const btA=5;function hT(e,A,t){const n=Math.max(A-btA,0);return NP(t-e(n),A-n)}function Yy({keyframes:e,velocity:A=0,power:t=.8,timeConstant:n=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:a,min:o,max:c,restDelta:l=.5,restSpeed:d}){const u=e[0],f={done:!1,value:u},b=z=>o!==void 0&&z<o||c!==void 0&&z>c,I=z=>o===void 0?c:c===void 0||Math.abs(o-z)<Math.abs(c-z)?o:c;let y=t*A;const E=u+y,Z=a===void 0?E:a(E);Z!==E&&(y=Z-u);const F=z=>-y*Math.exp(-z/n),S=z=>Z+F(z),M=z=>{const q=F(z),_=S(z);f.done=Math.abs(q)<=l,f.value=f.done?Z:_};let x,V;const N=z=>{b(f.value)&&(x=z,V=jI({keyframes:[f.value,I(f.value)],velocity:hT(S,z,f.value),damping:s,stiffness:r,restDelta:l,restSpeed:d}))};return N(0),{calculatedDuration:null,next:z=>{let q=!1;return!V&&x===void 0&&(q=!0,M(z),N(z)),x!==void 0&&z>=x?V.next(z-x):(!q&&M(z),f)}}}function CtA(e,A,t){const n=[],s=t||$g.mix||uT,r=e.length-1;for(let a=0;a<r;a++){let o=s(e[a],e[a+1]);if(A){const c=Array.isArray(A)?A[a]||ao:A;o=RQ(c,o)}n.push(o)}return n}function vtA(e,A,{clamp:t=!0,ease:n,mixer:s}={}){const r=e.length;if(gy(r===A.length),r===1)return()=>A[0];if(r===2&&A[0]===A[1])return()=>A[1];const a=e[0]===e[1];e[0]>e[r-1]&&(e=[...e].reverse(),A=[...A].reverse());const o=CtA(A,n,s),c=o.length,l=d=>{if(a&&d<e[0])return A[0];let u=0;if(c>1)for(;u<e.length-2&&!(d<e[u+1]);u++);const f=SQ(e[u],e[u+1],d);return o[u](f)};return t?d=>l(ac(e[0],e[r-1],d)):l}function ItA(e,A){const t=e[e.length-1];for(let n=1;n<=A;n++){const s=SQ(0,A,n);e.push(un(t,1,s))}}function ptA(e){const A=[0];return ItA(A,e.length-1),A}function HtA(e,A){return e.map(t=>t*A)}function mtA(e,A){return e.map(()=>A||qP).splice(0,e.length-1)}function LQ({duration:e=300,keyframes:A,times:t,ease:n="easeInOut"}){const s=FeA(n)?n.map(AT):AT(n),r={done:!1,value:A[0]},a=HtA(t&&t.length===A.length?t:ptA(A),e),o=vtA(a,A,{ease:Array.isArray(s)?s:mtA(A,s)});return{calculatedDuration:e,next:c=>(r.value=o(c),r.done=c>=e,r)}}const EtA=e=>e!==null;function _I(e,{repeat:A,repeatType:t="loop"},n,s=1){const r=e.filter(EtA),o=s<0||A&&t!=="loop"&&A%2===1?0:r.length-1;return!o||n===void 0?r[o]:n}const ytA={decay:Yy,inertia:Yy,tween:LQ,keyframes:LQ,spring:jI};function wT(e){typeof e.type=="string"&&(e.type=ytA[e.type])}class Zy{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(A=>{this.resolve=A})}notifyFinished(){this.resolve()}then(A,t){return this.finished.then(A,t)}}const YtA=e=>e/100;class qI extends Zy{constructor(A){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==la.now()&&this.tick(la.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=A,this.initAnimation(),this.play(),A.autoplay===!1&&this.pause()}initAnimation(){const{options:A}=this;wT(A);const{type:t=LQ,repeat:n=0,repeatDelay:s=0,repeatType:r,velocity:a=0}=A;let{keyframes:o}=A;const c=t||LQ;c!==LQ&&typeof o[0]!="number"&&(this.mixKeyframes=RQ(YtA,uT(o[0],o[1])),o=[0,100]);const l=c({...A,keyframes:o});r==="mirror"&&(this.mirroredGenerator=c({...A,keyframes:[...o].reverse(),velocity:-a})),l.calculatedDuration===null&&(l.calculatedDuration=my(l));const{calculatedDuration:d}=l;this.calculatedDuration=d,this.resolvedDuration=d+s,this.totalDuration=this.resolvedDuration*(n+1)-s,this.generator=l}updateTime(A){const t=Math.round(A-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=t}tick(A,t=!1){const{generator:n,totalDuration:s,mixKeyframes:r,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);const{delay:l=0,keyframes:d,repeat:u,repeatType:f,repeatDelay:b,type:I,onUpdate:y,finalKeyframe:E}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,A):this.speed<0&&(this.startTime=Math.min(A-s/this.speed,this.startTime)),t?this.currentTime=A:this.updateTime(A);const Z=this.currentTime-l*(this.playbackSpeed>=0?1:-1),F=this.playbackSpeed>=0?Z<0:Z>s;this.currentTime=Math.max(Z,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let S=this.currentTime,M=n;if(u){const z=Math.min(this.currentTime,s)/o;let q=Math.floor(z),_=z%1;!_&&z>=1&&(_=1),_===1&&q--,q=Math.min(q,u+1),q%2&&(f==="reverse"?(_=1-_,b&&(_-=b/o)):f==="mirror"&&(M=a)),S=ac(0,1,_)*o}let x;F?(this.delayState.value=d[0],x=this.delayState):x=M.next(S),r&&!F&&(x.value=r(x.value));let{done:V}=x;!F&&c!==null&&(V=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&V);return N&&I!==Yy&&(x.value=_I(d,this.options,E,this.speed)),y&&y(x.value),N&&this.finish(),x}then(A,t){return this.finished.then(A,t)}get duration(){return io(this.calculatedDuration)}get iterationDuration(){const{delay:A=0}=this.options||{};return this.duration+io(A)}get time(){return io(this.currentTime)}set time(A){A=hi(A),this.currentTime=A,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=A:this.driver&&(this.startTime=this.driver.now()-A/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=A,this.tick(A))}getGeneratorVelocity(){const A=this.currentTime;if(A<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(A);const t=this.generator.next(A).value;return hT(n=>this.generator.next(n).value,A,t)}get speed(){return this.playbackSpeed}set speed(A){const t=this.playbackSpeed!==A;t&&this.driver&&this.updateTime(la.now()),this.playbackSpeed=A,t&&this.driver&&(this.time=io(this.currentTime))}play(){if(this.isStopped)return;const{driver:A=gtA,startTime:t}=this.options;this.driver||(this.driver=A(s=>this.tick(s))),this.options.onPlay?.();const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),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(la.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(A){return this.startTime=0,this.tick(A,!0)}attachTimeline(A){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),A.observe(this)}}function ZtA(e){for(let A=1;A<e.length;A++)e[A]??(e[A]=e[A-1])}const sG=e=>e*180/Math.PI,ky=e=>{const A=sG(Math.atan2(e[1],e[0]));return Uy(A)},ktA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ky,rotateZ:ky,skewX:e=>sG(Math.atan(e[1])),skewY:e=>sG(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Uy=e=>(e=e%360,e<0&&(e+=360),e),QT=ky,bT=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),CT=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),UtA={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:bT,scaleY:CT,scale:e=>(bT(e)+CT(e))/2,rotateX:e=>Uy(sG(Math.atan2(e[6],e[5]))),rotateY:e=>Uy(sG(Math.atan2(-e[2],e[0]))),rotateZ:QT,rotate:QT,skewX:e=>sG(Math.atan(e[4])),skewY:e=>sG(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Dy(e){return e.includes("scale")?1:0}function Fy(e,A){if(!e||e==="none")return Dy(A);const t=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,s;if(t)n=UtA,s=t;else{const o=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=ktA,s=o}if(!s)return Dy(A);const r=n[A],a=s[1].split(",").map(FtA);return typeof r=="function"?r(a):a[r]}const DtA=(e,A)=>{const{transform:t="none"}=getComputedStyle(e);return Fy(t,A)};function FtA(e){return parseFloat(e.trim())}const lh=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],gh=new Set([...lh,"pathRotation"]),vT=e=>e===oh||e===ge,xtA=new Set(["x","y","z"]),MtA=lh.filter(e=>!xtA.has(e));function PtA(e){const A=[];return MtA.forEach(t=>{const n=e.getValue(t);n!==void 0&&(A.push([t,n.get()]),n.set(t.startsWith("scale")?1:0))}),A}const ed={width:({x:e},{paddingLeft:A="0",paddingRight:t="0",boxSizing:n})=>{const s=e.max-e.min;return n==="border-box"?s:s-parseFloat(A)-parseFloat(t)},height:({y:e},{paddingTop:A="0",paddingBottom:t="0",boxSizing:n})=>{const s=e.max-e.min;return n==="border-box"?s:s-parseFloat(A)-parseFloat(t)},top:(e,{top:A})=>parseFloat(A),left:(e,{left:A})=>parseFloat(A),bottom:({y:e},{top:A})=>parseFloat(A)+(e.max-e.min),right:({x:e},{left:A})=>parseFloat(A)+(e.max-e.min),x:(e,{transform:A})=>Fy(A,"x"),y:(e,{transform:A})=>Fy(A,"y")};ed.translateX=ed.x,ed.translateY=ed.y;const rG=new Set;let xy=!1,My=!1,Py=!1;function IT(){if(My){const e=Array.from(rG).filter(n=>n.needsMeasurement),A=new Set(e.map(n=>n.element)),t=new Map;A.forEach(n=>{const s=PtA(n);s.length&&(t.set(n,s),n.render())}),e.forEach(n=>n.measureInitialState()),A.forEach(n=>{n.render();const s=t.get(n);s&&s.forEach(([r,a])=>{n.getValue(r)?.set(a)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}My=!1,xy=!1,rG.forEach(e=>e.complete(Py)),rG.clear()}function pT(){rG.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(My=!0)})}function TtA(){Py=!0,pT(),IT(),Py=!1}class Ty{constructor(A,t,n,s,r,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...A],this.onComplete=t,this.name=n,this.motionValue=s,this.element=r,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(rG.add(this),xy||(xy=!0,dn.read(pT),dn.resolveKeyframes(IT))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:A,name:t,element:n,motionValue:s}=this;if(A[0]===null){const r=s?.get(),a=A[A.length-1];if(r!==void 0)A[0]=r;else if(n&&t){const o=n.readValue(t,a);o!=null&&(A[0]=o)}A[0]===void 0&&(A[0]=a),s&&r===void 0&&s.set(A[0])}ZtA(A)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(A=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,A),rG.delete(this)}cancel(){this.state==="scheduled"&&(rG.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const RtA=e=>e.startsWith("--");function HT(e,A,t){RtA(A)?e.style.setProperty(A,t):e.style[A]=t}const StA={};function mT(e,A){const t=WP(e);return()=>StA[A]??t()}const VtA=mT(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),ET=mT(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),XQ=([e,A,t,n])=>`cubic-bezier(${e}, ${A}, ${t}, ${n})`,yT={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:XQ([0,.65,.55,1]),circOut:XQ([.55,0,1,.45]),backIn:XQ([.31,.01,.66,-.59]),backOut:XQ([.33,1.53,.69,.99])};function YT(e,A){if(e)return typeof e=="function"?ET()?GT(e,A):"ease-out":$P(e)?XQ(e):Array.isArray(e)?e.map(t=>YT(t,A)||yT.easeOut):yT[e]}function WtA(e,A,t,{delay:n=0,duration:s=300,repeat:r=0,repeatType:a="loop",ease:o="easeOut",times:c}={},l=void 0){const d={[A]:t};c&&(d.offset=c);const u=YT(o,s);Array.isArray(u)&&(d.easing=u);const f={delay:n,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:r+1,direction:a==="reverse"?"alternate":"normal"};return l&&(f.pseudoElement=l),e.animate(d,f)}function ZT(e){return typeof e=="function"&&"applyToOptions"in e}function NtA({type:e,...A}){return ZT(e)&&ET()?e.applyToOptions(A):(A.duration??(A.duration=300),A.ease??(A.ease="easeOut"),A)}class kT extends Zy{constructor(A){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!A)return;const{element:t,name:n,keyframes:s,pseudoElement:r,allowFlatten:a=!1,finalKeyframe:o,onComplete:c}=A;this.isPseudoElement=!!r,this.allowFlatten=a,this.options=A,gy(typeof A.type!="string");const l=NtA(A);this.animation=WtA(t,n,s,l,r),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const d=_I(s,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(d),HT(t,n,d),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:A}=this;A==="idle"||A==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const A=this.options?.element;!this.isPseudoElement&&A?.isConnected&&this.animation.commitStyles?.()}get duration(){const A=this.animation.effect?.getComputedTiming?.().duration||0;return io(Number(A))}get iterationDuration(){const{delay:A=0}=this.options||{};return this.duration+io(A)}get time(){return io(Number(this.animation.currentTime)||0)}set time(A){const t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=hi(A),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(A){A<0&&(this.finishedTime=null),this.animation.playbackRate=A}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(A){this.manualStartTime=this.animation.startTime=A}attachTimeline({timeline:A,rangeStart:t,rangeEnd:n,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,A&&VtA()?(this.animation.timeline=A,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),ao):s(this)}}const UT={anticipate:KP,backInOut:JP,circInOut:_P};function ztA(e){return e in UT}function LtA(e){typeof e.ease=="string"&&ztA(e.ease)&&(e.ease=UT[e.ease])}const Ry=10;class XtA extends kT{constructor(A){LtA(A),wT(A),super(A),A.startTime!==void 0&&A.autoplay!==!1&&(this.startTime=A.startTime),this.options=A}updateMotionValue(A){const{motionValue:t,onUpdate:n,onComplete:s,element:r,...a}=this.options;if(!t)return;if(A!==void 0){t.set(A);return}const o=new qI({...a,autoplay:!1}),c=Math.max(Ry,la.now()-this.startTime),l=ac(0,Ry,c-Ry),d=o.sample(c).value,{name:u}=this.options;r&&u&&HT(r,u,d),t.setWithVelocity(o.sample(Math.max(0,c-l)).value,d,l),o.stop()}}const DT=(e,A)=>A==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(eB.test(e)||e==="0")&&!e.startsWith("url("));function OtA(e){const A=e[0];if(e.length===1)return!0;for(let t=0;t<e.length;t++)if(e[t]!==A)return!0}function JtA(e,A,t,n){const s=e[0];if(s===null)return!1;if(A==="display"||A==="visibility")return!0;const r=e[e.length-1],a=DT(s,A),o=DT(r,A);return!a||!o?!1:OtA(e)||(t==="spring"||ZT(t))&&n}function Sy(e){e.duration=0,e.type="keyframes"}const FT=new Set(["opacity","clipPath","filter","transform"]),KtA=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function jtA(e){for(let A=0;A<e.length;A++)if(typeof e[A]=="string"&&KtA.test(e[A]))return!0;return!1}const _tA=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),qtA=WP(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function $tA(e){const{motionValue:A,name:t,repeatDelay:n,repeatType:s,damping:r,type:a,keyframes:o}=e;if(!(A?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:d}=A.owner.getProps();return qtA()&&t&&(FT.has(t)||_tA.has(t)&&jtA(o))&&(t!=="transform"||!d)&&!l&&!n&&s!=="mirror"&&r!==0&&a!=="inertia"}const AnA=40;class enA extends Zy{constructor({autoplay:A=!0,delay:t=0,type:n="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:a="loop",keyframes:o,name:c,motionValue:l,element:d,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=la.now();const f={autoplay:A,delay:t,type:n,repeat:s,repeatDelay:r,repeatType:a,name:c,motionValue:l,element:d,...u},b=d?.KeyframeResolver||Ty;this.keyframeResolver=new b(o,(I,y,E)=>this.onKeyframesResolved(I,y,f,!E),c,l,d),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(A,t,n,s){this.keyframeResolver=void 0;const{name:r,type:a,velocity:o,delay:c,isHandoff:l,onUpdate:d}=n;this.resolvedAt=la.now();let u=!0;JtA(A,r,a,o)||(u=!1,($g.instantAnimations||!c)&&d?.(_I(A,n,t)),A[0]=A[A.length-1],Sy(n),n.repeat=0);const b={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>AnA?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:A},I=u&&!l&&$tA(b),y=b.motionValue?.owner?.current;let E;if(I)try{E=new XtA({...b,element:y})}catch{E=new qI(b)}else E=new qI(b);E.finished.then(()=>{this.notifyFinished()}).catch(ao),this.pendingTimeline&&(this.stopTimeline=E.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=E}get finished(){return this._animation?this.animation.finished:this._finished}then(A,t){return this.finished.finally(A).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),TtA()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(A){this.animation.time=A}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(A){this.animation.speed=A}get startTime(){return this.animation.startTime}attachTimeline(A){return this._animation?this.stopTimeline=this.animation.attachTimeline(A):this.pendingTimeline=A,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function xT(e,A,t,n=0,s=1){const r=Array.from(e).sort((l,d)=>l.sortNodePosition(d)).indexOf(A),a=e.size,o=(a-1)*n;return typeof t=="function"?t(r,a):s===1?r*n:o-r*n}const MT=30,tnA=e=>!isNaN(parseFloat(e));class nnA{constructor(A,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{const s=la.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(A),this.owner=t.owner}setCurrent(A){this.current=A,this.updatedAt=la.now(),this.canTrackVelocity===null&&A!==void 0&&(this.canTrackVelocity=tnA(this.current))}setPrevFrameValue(A=this.current){this.prevFrameValue=A,this.prevUpdatedAt=this.updatedAt}onChange(A){return this.on("change",A)}on(A,t){this.events[A]||(this.events[A]=new dy);const n=this.events[A].add(t);return A==="change"?()=>{n(),dn.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const A in this.events)this.events[A].clear()}attach(A,t){this.passiveEffect=A,this.stopPassiveEffect=t}set(A){this.passiveEffect?this.passiveEffect(A,this.updateAndNotify):this.updateAndNotify(A)}setWithVelocity(A,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=A,this.prevUpdatedAt=this.updatedAt-n}jump(A,t=!0){this.updateAndNotify(A),this.prev=A,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(A){this.dependents||(this.dependents=new Set),this.dependents.add(A)}removeDependent(A){this.dependents&&this.dependents.delete(A)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const A=la.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||A-this.updatedAt>MT)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,MT);return NP(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(A){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=A(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function dh(e,A){return new nnA(e,A)}function PT(e,A){if(e?.inherit&&A){const{inherit:t,...n}=e;return{...A,...n}}return e}function Vy(e,A){const t=e?.[A]??e?.default??e;return t!==e?PT(t,e):t}const snA={type:"spring",stiffness:500,damping:25,restSpeed:10},rnA=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),anA={type:"keyframes",duration:.8},inA={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},onA=(e,{keyframes:A})=>A.length>2?anA:gh.has(e)?e.startsWith("scale")?rnA(A[1]):snA:inA,BnA=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function cnA(e){for(const A in e)if(!BnA.has(A))return!0;return!1}const Wy=(e,A,t,n={},s,r)=>a=>{const o=Vy(n,e)||{},c=o.delay||n.delay||0;let{elapsed:l=0}=n;l=l-hi(c);const d={keyframes:Array.isArray(t)?t:[null,t],ease:"easeOut",velocity:A.getVelocity(),...o,delay:-l,onUpdate:f=>{A.set(f),o.onUpdate&&o.onUpdate(f)},onComplete:()=>{a(),o.onComplete&&o.onComplete()},name:e,motionValue:A,element:r?void 0:s};cnA(o)||Object.assign(d,onA(e,d)),d.duration&&(d.duration=hi(d.duration)),d.repeatDelay&&(d.repeatDelay=hi(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let u=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(Sy(d),d.delay===0&&(u=!0)),($g.instantAnimations||$g.skipAnimations||s?.shouldSkipAnimations||o.skipAnimations)&&(u=!0,Sy(d),d.delay=0),d.allowFlatten=!o.type&&!o.ease,u&&!r&&A.get()!==void 0){const f=_I(d.keyframes,o);if(f!==void 0){dn.update(()=>{d.onUpdate(f),d.onComplete()});return}}return o.isSync?new qI(d):new enA(d)},lnA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function gnA(e){const A=lnA.exec(e);if(!A)return[,];const[,t,n,s]=A;return[`--${t??n}`,s]}function TT(e,A,t=1){const[n,s]=gnA(e);if(!n)return;const r=window.getComputedStyle(A).getPropertyValue(n);if(r){const a=r.trim();return RP(a)?parseFloat(a):a}return hy(s)?TT(s,A,t+1):s}function RT(e){const A=[{},{}];return e?.values.forEach((t,n)=>{A[0][n]=t.get(),A[1][n]=t.getVelocity()}),A}function Ny(e,A,t,n){if(typeof A=="function"){const[s,r]=RT(n);A=A(t!==void 0?t:e.custom,s,r)}if(typeof A=="string"&&(A=e.variants&&e.variants[A]),typeof A=="function"){const[s,r]=RT(n);A=A(t!==void 0?t:e.custom,s,r)}return A}function aG(e,A,t){const n=e.getProps();return Ny(n,A,t!==void 0?t:n.custom,e)}const ST=new Set(["width","height","top","left","right","bottom",...lh]),zy=e=>Array.isArray(e);function dnA(e,A,t){e.hasValue(A)?e.getValue(A).set(t):e.addValue(A,dh(t))}function unA(e){return zy(e)?e[e.length-1]||0:e}function Ly(e,A){const t=aG(e,A);let{transitionEnd:n={},transition:s={},...r}=t||{};r={...r,...n};for(const a in r){const o=unA(r[a]);dnA(e,a,o)}}const kr=e=>!!(e&&e.getVelocity);function GnA(e){return!!(kr(e)&&e.add)}function Xy(e,A){const t=e.getValue("willChange");if(GnA(t))return t.add(A);if(!t&&$g.WillChange){const n=new $g.WillChange("auto");e.addValue("willChange",n),n.add(A)}}function Oy(e){return e.replace(/([A-Z])/g,A=>`-${A.toLowerCase()}`)}const VT="data-"+Oy("framerAppearId");function WT(e){return e.props[VT]}function fnA({protectedKeys:e,needsAnimating:A},t){const n=e.hasOwnProperty(t)&&A[t]!==!0;return A[t]=!1,n}function NT(e,A,{delay:t=0,transitionOverride:n,type:s}={}){let{transition:r,transitionEnd:a,...o}=A;const c=e.getDefaultTransition();r=r?PT(r,c):c;const l=r?.reduceMotion,d=r?.skipAnimations;n&&(r=n);const u=[],f=s&&e.animationState&&e.animationState.getState()[s],b=r?.path;b&&b.animateVisualElement(e,o,r,t,u);for(const I in o){const y=e.getValue(I,e.latestValues[I]??null),E=o[I];if(E===void 0||f&&fnA(f,I))continue;const Z={delay:t,...Vy(r||{},I)};d&&(Z.skipAnimations=!0);const F=y.get();if(F!==void 0&&!y.isAnimating()&&!Array.isArray(E)&&E===F&&!Z.velocity){dn.update(()=>y.set(E));continue}let S=!1;if(window.MotionHandoffAnimation){const V=WT(e);if(V){const N=window.MotionHandoffAnimation(V,I,dn);N!==null&&(Z.startTime=N,S=!0)}}Xy(e,I);const M=l??e.shouldReduceMotion;y.start(Wy(I,y,E,M&&ST.has(I)?{type:!1}:Z,e,S));const x=y.animation;x&&u.push(x)}if(a){const I=()=>dn.update(()=>{a&&Ly(e,a)});u.length?Promise.all(u).then(I):I()}return u}function Jy(e,A,t={}){const n=aG(e,A,t.type==="exit"?e.presenceContext?.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=n||{};t.transitionOverride&&(s=t.transitionOverride);const r=n?()=>Promise.all(NT(e,n,t)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:d,staggerDirection:u}=s;return hnA(e,A,c,l,d,u,t)}:()=>Promise.resolve(),{when:o}=s;if(o){const[c,l]=o==="beforeChildren"?[r,a]:[a,r];return c().then(()=>l())}else return Promise.all([r(),a(t.delay)])}function hnA(e,A,t=0,n=0,s=0,r=1,a){const o=[];for(const c of e.variantChildren)c.notify("AnimationStart",A),o.push(Jy(c,A,{...a,delay:t+(typeof n=="function"?0:n)+xT(e.variantChildren,c,n,s,r)}).then(()=>c.notify("AnimationComplete",A)));return Promise.all(o)}function zT(e,A,t={}){e.notify("AnimationStart",A);let n;if(Array.isArray(A)){const s=A.map(r=>Jy(e,r,t));n=Promise.all(s)}else if(typeof A=="string")n=Jy(e,A,t);else{const s=typeof A=="function"?aG(e,A,t.custom):A;n=Promise.all(NT(e,s,t))}return n.then(()=>{e.notify("AnimationComplete",A)})}const wnA={test:e=>e==="auto",parse:e=>e},LT=e=>A=>A.test(e),XT=[oh,ge,ic,Hl,OeA,XeA,wnA],OT=e=>XT.find(LT(e));function QnA(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||VP(e):!0}const bnA=new Set(["brightness","contrast","saturate","opacity"]);function CnA(e){const[A,t]=e.slice(0,-1).split("(");if(A==="drop-shadow")return e;const[n]=t.match(wy)||[];if(!n)return e;const s=t.replace(n,"");let r=bnA.has(A)?1:0;return n!==t&&(r*=100),A+"("+r+s+")"}const vnA=/\b([a-z-]*)\(.*?\)/gu,Ky={...eB,getAnimatableNone:e=>{const A=e.match(vnA);return A?A.map(CnA).join(" "):e}},jy={...eB,getAnimatableNone:e=>{const A=eB.parse(e);return eB.createTransformer(e)(A.map(n=>typeof n=="number"?0:typeof n=="object"?{...n,alpha:1}:n))}},JT={...oh,transform:Math.round},$I={borderWidth:ge,borderTopWidth:ge,borderRightWidth:ge,borderBottomWidth:ge,borderLeftWidth:ge,borderRadius:ge,borderTopLeftRadius:ge,borderTopRightRadius:ge,borderBottomRightRadius:ge,borderBottomLeftRadius:ge,width:ge,maxWidth:ge,height:ge,maxHeight:ge,top:ge,right:ge,bottom:ge,left:ge,inset:ge,insetBlock:ge,insetBlockStart:ge,insetBlockEnd:ge,insetInline:ge,insetInlineStart:ge,insetInlineEnd:ge,padding:ge,paddingTop:ge,paddingRight:ge,paddingBottom:ge,paddingLeft:ge,paddingBlock:ge,paddingBlockStart:ge,paddingBlockEnd:ge,paddingInline:ge,paddingInlineStart:ge,paddingInlineEnd:ge,margin:ge,marginTop:ge,marginRight:ge,marginBottom:ge,marginLeft:ge,marginBlock:ge,marginBlockStart:ge,marginBlockEnd:ge,marginInline:ge,marginInlineStart:ge,marginInlineEnd:ge,fontSize:ge,backgroundPositionX:ge,backgroundPositionY:ge,...{rotate:Hl,pathRotation:Hl,rotateX:Hl,rotateY:Hl,rotateZ:Hl,scale:OI,scaleX:OI,scaleY:OI,scaleZ:OI,skew:Hl,skewX:Hl,skewY:Hl,distance:ge,translateX:ge,translateY:ge,translateZ:ge,x:ge,y:ge,z:ge,perspective:ge,transformPerspective:ge,opacity:WQ,originX:aT,originY:aT,originZ:ge},zIndex:JT,fillOpacity:WQ,strokeOpacity:WQ,numOctaves:JT},InA={...$I,color:Ds,backgroundColor:Ds,outlineColor:Ds,fill:Ds,stroke:Ds,borderColor:Ds,borderTopColor:Ds,borderRightColor:Ds,borderBottomColor:Ds,borderLeftColor:Ds,filter:Ky,WebkitFilter:Ky,mask:jy,WebkitMask:jy},KT=e=>InA[e],pnA=new Set([Ky,jy]);function jT(e,A){let t=KT(e);return pnA.has(t)||(t=eB),t.getAnimatableNone?t.getAnimatableNone(A):void 0}const HnA=new Set(["auto","none","0"]);function mnA(e,A,t){let n=0,s;for(;n<e.length&&!s;){const r=e[n];typeof r=="string"&&!HnA.has(r)&&ch(r).values.length&&(s=e[n]),n++}if(s&&t)for(const r of A)e[r]=jT(t,s)}class EnA extends Ty{constructor(A,t,n,s,r){super(A,t,n,s,r,!0)}readKeyframes(){const{unresolvedKeyframes:A,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let d=0;d<A.length;d++){let u=A[d];if(typeof u=="string"&&(u=u.trim(),hy(u))){const f=TT(u,t.current);f!==void 0&&(A[d]=f),d===A.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!ST.has(n)||A.length!==2)return;const[s,r]=A,a=OT(s),o=OT(r),c=sT(s),l=sT(r);if(c!==l&&ed[n]){this.needsMeasurement=!0;return}if(a!==o)if(vT(a)&&vT(o))for(let d=0;d<A.length;d++){const u=A[d];typeof u=="string"&&(A[d]=parseFloat(u))}else ed[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:A,name:t}=this,n=[];for(let s=0;s<A.length;s++)(A[s]===null||QnA(A[s]))&&n.push(s);n.length&&mnA(A,n,t)}measureInitialState(){const{element:A,unresolvedKeyframes:t,name:n}=this;if(!A||!A.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ed[n](A.measureViewportBox(),window.getComputedStyle(A.current)),t[0]=this.measuredOrigin;const s=t[t.length-1];s!==void 0&&A.getValue(n,s).jump(s,!1)}measureEndState(){const{element:A,name:t,unresolvedKeyframes:n}=this;if(!A||!A.current)return;const s=A.getValue(t);s&&s.jump(this.measuredOrigin,!1);const r=n.length-1,a=n[r];n[r]=ed[t](A.measureViewportBox(),window.getComputedStyle(A.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([o,c])=>{A.getValue(o).set(c)}),this.resolveNoneKeyframes()}}function _T(e,A,t){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let n=document;const s=t?.[e]??n.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(n=>n!=null)}const _y=(e,A)=>A&&typeof e=="number"?A.transform(e):e;function Ap(e){return SP(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:qy}=eT(queueMicrotask,!1),tB={x:!1,y:!1};function qT(){return tB.x||tB.y}function ynA(e){return e==="x"||e==="y"?tB[e]?null:(tB[e]=!0,()=>{tB[e]=!1}):tB.x||tB.y?null:(tB.x=tB.y=!0,()=>{tB.x=tB.y=!1})}function $T(e,A){const t=_T(e),n=new AbortController,s={passive:!0,...A,signal:n.signal};return[t,s,()=>n.abort()]}function YnA(e){return!(e.pointerType==="touch"||qT())}function ZnA(e,A,t={}){const[n,s,r]=$T(e,t);return n.forEach(a=>{let o=!1,c=!1,l;const d=()=>{a.removeEventListener("pointerleave",I)},u=E=>{l&&(l(E),l=void 0),d()},f=E=>{o=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),c&&(c=!1,u(E))},b=()=>{o=!0,window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",f,s)},I=E=>{if(E.pointerType!=="touch"){if(o){c=!0;return}u(E)}},y=E=>{if(!YnA(E))return;c=!1;const Z=A(a,E);typeof Z=="function"&&(l=Z,a.addEventListener("pointerleave",I,s))};a.addEventListener("pointerenter",y,s),a.addEventListener("pointerdown",b,s)}),r}const AR=(e,A)=>A?e===A?!0:AR(e,A.parentElement):!1,$y=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,knA=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function UnA(e){return knA.has(e.tagName)||e.isContentEditable===!0}const DnA=new Set(["INPUT","SELECT","TEXTAREA"]);function FnA(e){return DnA.has(e.tagName)||e.isContentEditable===!0}const ep=new WeakSet;function eR(e){return A=>{A.key==="Enter"&&e(A)}}function A9(e,A){e.dispatchEvent(new PointerEvent("pointer"+A,{isPrimary:!0,bubbles:!0}))}const xnA=(e,A)=>{const t=e.currentTarget;if(!t)return;const n=eR(()=>{if(ep.has(t))return;A9(t,"down");const s=eR(()=>{A9(t,"up")}),r=()=>A9(t,"cancel");t.addEventListener("keyup",s,A),t.addEventListener("blur",r,A)});t.addEventListener("keydown",n,A),t.addEventListener("blur",()=>t.removeEventListener("keydown",n),A)};function tR(e){return $y(e)&&!qT()}const nR=new WeakSet;function MnA(e,A,t={}){const[n,s,r]=$T(e,t),a=o=>{const c=o.currentTarget;if(!tR(o)||nR.has(o))return;ep.add(c),t.stopPropagation&&nR.add(o);const l=A(c,o),d=(b,I)=>{window.removeEventListener("pointerup",u),window.removeEventListener("pointercancel",f),ep.has(c)&&ep.delete(c),tR(b)&&typeof l=="function"&&l(b,{success:I})},u=b=>{d(b,c===window||c===document||t.useGlobalTarget||AR(c,b.target))},f=b=>{d(b,!1)};window.addEventListener("pointerup",u,s),window.addEventListener("pointercancel",f,s)};return n.forEach(o=>{(t.useGlobalTarget?window:o).addEventListener("pointerdown",a,s),Ap(o)&&(o.addEventListener("focus",l=>xnA(l,s)),!UnA(o)&&!o.hasAttribute("tabindex")&&(o.tabIndex=0))}),r}function e9(e){return SP(e)&&"ownerSVGElement"in e}const tp=new WeakMap;let np;const sR=(e,A,t)=>(n,s)=>s&&s[0]?s[0][e+"Size"]:e9(n)&&"getBBox"in n?n.getBBox()[A]:n[t],PnA=sR("inline","width","offsetWidth"),TnA=sR("block","height","offsetHeight");function RnA({target:e,borderBoxSize:A}){tp.get(e)?.forEach(t=>{t(e,{get width(){return PnA(e,A)},get height(){return TnA(e,A)}})})}function SnA(e){e.forEach(RnA)}function VnA(){typeof ResizeObserver>"u"||(np=new ResizeObserver(SnA))}function WnA(e,A){np||VnA();const t=_T(e);return t.forEach(n=>{let s=tp.get(n);s||(s=new Set,tp.set(n,s)),s.add(A),np?.observe(n)}),()=>{t.forEach(n=>{const s=tp.get(n);s?.delete(A),s?.size||np?.unobserve(n)})}}const sp=new Set;let uh;function NnA(){uh=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};sp.forEach(A=>A(e))},window.addEventListener("resize",uh)}function znA(e){return sp.add(e),uh||NnA(),()=>{sp.delete(e),!sp.size&&typeof uh=="function"&&(window.removeEventListener("resize",uh),uh=void 0)}}function rR(e,A){return typeof e=="function"?znA(e):WnA(e,A)}function LnA(e){return e9(e)&&e.tagName==="svg"}const XnA=[...XT,Ds,eB],OnA=e=>XnA.find(LT(e)),aR=()=>({translate:0,scale:1,origin:0,originPoint:0}),Gh=()=>({x:aR(),y:aR()}),iR=()=>({min:0,max:0}),js=()=>({x:iR(),y:iR()}),JnA=new WeakMap;function rp(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function OQ(e){return typeof e=="string"||Array.isArray(e)}const t9=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],n9=["initial",...t9];function ap(e){return rp(e.animate)||n9.some(A=>OQ(e[A]))}function oR(e){return!!(ap(e)||e.variants)}function KnA(e,A,t){for(const n in A){const s=A[n],r=t[n];if(kr(s))e.addValue(n,s);else if(kr(r))e.addValue(n,dh(s,{owner:e}));else if(r!==s)if(e.hasValue(n)){const a=e.getValue(n);a.liveStyle===!0?a.jump(s):a.hasAnimated||a.set(s)}else{const a=e.getStaticValue(n);e.addValue(n,dh(a!==void 0?a:s,{owner:e}))}}for(const n in t)A[n]===void 0&&e.removeValue(n);return A}const s9={current:null},BR={current:!1},jnA=typeof window<"u";function _nA(){if(BR.current=!0,!!jnA)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),A=()=>s9.current=e.matches;e.addEventListener("change",A),A()}else s9.current=!1}const cR=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ip={};function lR(e){ip=e}function qnA(){return ip}class $nA{scrapeMotionValuesFromProps(A,t,n){return{}}constructor({parent:A,props:t,presenceContext:n,reducedMotionConfig:s,skipAnimations:r,blockInitialAnimation:a,visualState:o},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Ty,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const b=la.now();this.renderScheduledAt<b&&(this.renderScheduledAt=b,dn.render(this.render,!1,!0))};const{latestValues:l,renderState:d}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=d,this.parent=A,this.props=t,this.presenceContext=n,this.depth=A?A.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=r,this.options=c,this.blockInitialAnimation=!!a,this.isControllingVariants=ap(t),this.isVariantNode=oR(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(A&&A.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(t,{},this);for(const b in f){const I=f[b];l[b]!==void 0&&kr(I)&&I.set(l[b])}}mount(A){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=A,JnA.set(A,this),this.projection&&!this.projection.instance&&this.projection.mount(A),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,n)=>this.bindToMotionValue(n,t)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(BR.current||_nA(),this.shouldReduceMotion=s9.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Ad(this.notifyUpdate),Ad(this.render),this.valueSubscriptions.forEach(A=>A()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const A in this.events)this.events[A].clear();for(const A in this.features){const t=this.features[A];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(A){this.children.add(A),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(A)}removeChild(A){this.children.delete(A),this.enteringChildren&&this.enteringChildren.delete(A)}bindToMotionValue(A,t){if(this.valueSubscriptions.has(A)&&this.valueSubscriptions.get(A)(),t.accelerate&&FT.has(A)&&this.current instanceof HTMLElement){const{factory:a,keyframes:o,times:c,ease:l,duration:d}=t.accelerate,u=new kT({element:this.current,name:A,keyframes:o,times:c,ease:l,duration:hi(d)}),f=a(u);this.valueSubscriptions.set(A,()=>{f(),u.cancel()});return}const n=gh.has(A);n&&this.onBindTransform&&this.onBindTransform();const s=t.on("change",a=>{this.latestValues[A]=a,this.props.onUpdate&&dn.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,A,t)),this.valueSubscriptions.set(A,()=>{s(),r&&r()})}sortNodePosition(A){return!this.current||!this.sortInstanceNodePosition||this.type!==A.type?0:this.sortInstanceNodePosition(this.current,A.current)}updateFeatures(){let A="animation";for(A in ip){const t=ip[A];if(!t)continue;const{isEnabled:n,Feature:s}=t;if(!this.features[A]&&s&&n(this.props)&&(this.features[A]=new s(this)),this.features[A]){const r=this.features[A];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):js()}getStaticValue(A){return this.latestValues[A]}setStaticValue(A,t){this.latestValues[A]=t}update(A,t){(A.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=A,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<cR.length;n++){const s=cR[n];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const r="on"+s,a=A[r];a&&(this.propEventSubscriptions[s]=this.on(s,a))}this.prevMotionValues=KnA(this,this.scrapeMotionValuesFromProps(A,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(A){return this.props.variants?this.props.variants[A]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(A){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(A),()=>t.variantChildren.delete(A)}addValue(A,t){const n=this.values.get(A);t!==n&&(n&&this.removeValue(A),this.bindToMotionValue(A,t),this.values.set(A,t),this.latestValues[A]=t.get())}removeValue(A){this.values.delete(A);const t=this.valueSubscriptions.get(A);t&&(t(),this.valueSubscriptions.delete(A)),delete this.latestValues[A],this.removeValueFromRenderState(A,this.renderState)}hasValue(A){return this.values.has(A)}getValue(A,t){if(this.props.values&&this.props.values[A])return this.props.values[A];let n=this.values.get(A);return n===void 0&&t!==void 0&&(n=dh(t===null?void 0:t,{owner:this}),this.addValue(A,n)),n}readValue(A,t){let n=this.latestValues[A]!==void 0||!this.current?this.latestValues[A]:this.getBaseTargetFromProps(this.props,A)??this.readValueFromInstance(this.current,A,this.options);return n!=null&&(typeof n=="string"&&(RP(n)||VP(n))?n=parseFloat(n):!OnA(n)&&eB.test(t)&&(n=jT(A,t)),this.setBaseTarget(A,kr(n)?n.get():n)),kr(n)?n.get():n}setBaseTarget(A,t){this.baseTarget[A]=t}getBaseTarget(A){const{initial:t}=this.props;let n;if(typeof t=="string"||typeof t=="object"){const r=Ny(this.props,t,this.presenceContext?.custom);r&&(n=r[A])}if(t&&n!==void 0)return n;const s=this.getBaseTargetFromProps(this.props,A);return s!==void 0&&!kr(s)?s:this.initialValues[A]!==void 0&&n===void 0?void 0:this.baseTarget[A]}on(A,t){return this.events[A]||(this.events[A]=new dy),this.events[A].add(t)}notify(A,...t){this.events[A]&&this.events[A].notify(...t)}scheduleRenderMicrotask(){qy.render(this.render)}}class gR extends $nA{constructor(){super(...arguments),this.KeyframeResolver=EnA}sortInstanceNodePosition(A,t){return A.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(A,t){const n=A.style;return n?n[t]:void 0}removeValueFromRenderState(A,{vars:t,style:n}){delete t[A],delete n[A]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:A}=this.props;kr(A)&&(this.childSubscription=A.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}class td{constructor(A){this.isMounted=!1,this.node=A}update(){}}function dR({top:e,left:A,right:t,bottom:n}){return{x:{min:A,max:t},y:{min:e,max:n}}}function AsA({x:e,y:A}){return{top:A.min,right:e.max,bottom:A.max,left:e.min}}function esA(e,A){if(!A)return e;const t=A({x:e.left,y:e.top}),n=A({x:e.right,y:e.bottom});return{top:t.y,left:t.x,bottom:n.y,right:n.x}}function r9(e){return e===void 0||e===1}function a9({scale:e,scaleX:A,scaleY:t}){return!r9(e)||!r9(A)||!r9(t)}function iG(e){return a9(e)||uR(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function uR(e){return GR(e.x)||GR(e.y)}function GR(e){return e&&e!=="0%"}function op(e,A,t){const n=e-t,s=A*n;return t+s}function fR(e,A,t,n,s){return s!==void 0&&(e=op(e,s,n)),op(e,t,n)+A}function i9(e,A=0,t=1,n,s){e.min=fR(e.min,A,t,n,s),e.max=fR(e.max,A,t,n,s)}function hR(e,{x:A,y:t}){i9(e.x,A.translate,A.scale,A.originPoint),i9(e.y,t.translate,t.scale,t.originPoint)}const wR=.999999999999,QR=1.0000000000001;function tsA(e,A,t,n=!1){const s=t.length;if(!s)return;A.x=A.y=1;let r,a;for(let o=0;o<s;o++){r=t[o],a=r.projectionDelta;const{visualElement:c}=r.options;c&&c.props.style&&c.props.style.display==="contents"||(n&&r.options.layoutScroll&&r.scroll&&r!==r.root&&(oc(e.x,-r.scroll.offset.x),oc(e.y,-r.scroll.offset.y)),a&&(A.x*=a.x.scale,A.y*=a.y.scale,hR(e,a)),n&&iG(r.latestValues)&&Bp(e,r.latestValues,r.layout?.layoutBox))}A.x<QR&&A.x>wR&&(A.x=1),A.y<QR&&A.y>wR&&(A.y=1)}function oc(e,A){e.min+=A,e.max+=A}function bR(e,A,t,n,s=.5){const r=un(e.min,e.max,s);i9(e,A,t,r,n)}function CR(e,A){return typeof e=="string"?parseFloat(e)/100*(A.max-A.min):e}function Bp(e,A,t){const n=t??e;bR(e.x,CR(A.x,n.x),A.scaleX,A.scale,A.originX),bR(e.y,CR(A.y,n.y),A.scaleY,A.scale,A.originY)}function vR(e,A){return dR(esA(e.getBoundingClientRect(),A))}function nsA(e,A,t){const n=vR(e,t),{scroll:s}=A;return s&&(oc(n.x,s.offset.x),oc(n.y,s.offset.y)),n}const ssA={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},rsA=lh.length;function asA(e,A,t){let n="",s=!0;for(let a=0;a<rsA;a++){const o=lh[a],c=e[o];if(c===void 0)continue;let l=!0;if(typeof c=="number")l=c===(o.startsWith("scale")?1:0);else{const d=parseFloat(c);l=o.startsWith("scale")?d===1:d===0}if(!l||t){const d=_y(c,$I[o]);if(!l){s=!1;const u=ssA[o]||o;n+=`${u}(${d}) `}t&&(A[o]=d)}}const r=e.pathRotation;return r&&(s=!1,n+=`rotate(${_y(r,$I.pathRotation)}) `),n=n.trim(),t?n=t(A,s?"":n):s&&(n="none"),n}function o9(e,A,t){const{style:n,vars:s,transformOrigin:r}=e;let a=!1,o=!1;for(const c in A){const l=A[c];if(gh.has(c)){a=!0;continue}else if(nT(c)){s[c]=l;continue}else{const d=_y(l,$I[c]);c.startsWith("origin")?(o=!0,r[c]=d):n[c]=d}}if(A.transform||(a||t?n.transform=asA(A,e.transform,t):n.transform&&(n.transform="none")),o){const{originX:c="50%",originY:l="50%",originZ:d=0}=r;n.transformOrigin=`${c} ${l} ${d}`}}function IR(e,{style:A,vars:t},n,s){const r=e.style;let a;for(a in A)r[a]=A[a];s?.applyProjectionStyles(r,n);for(a in t)r.setProperty(a,t[a])}function pR(e,A){return A.max===A.min?0:e/(A.max-A.min)*100}const JQ={correct:(e,A)=>{if(!A.target)return e;if(typeof e=="string")if(ge.test(e))e=parseFloat(e);else return e;const t=pR(e,A.target.x),n=pR(e,A.target.y);return`${t}% ${n}%`}},isA={correct:(e,{treeScale:A,projectionDelta:t})=>{const n=e,s=eB.parse(e);if(s.length>5)return n;const r=eB.createTransformer(e),a=typeof s[0]!="number"?1:0,o=t.x.scale*A.x,c=t.y.scale*A.y;s[0+a]/=o,s[1+a]/=c;const l=un(o,c,.5);return typeof s[2+a]=="number"&&(s[2+a]/=l),typeof s[3+a]=="number"&&(s[3+a]/=l),r(s)}},B9={borderRadius:{...JQ,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:JQ,borderTopRightRadius:JQ,borderBottomLeftRadius:JQ,borderBottomRightRadius:JQ,boxShadow:isA};function HR(e,{layout:A,layoutId:t}){return gh.has(e)||e.startsWith("origin")||(A||t!==void 0)&&(!!B9[e]||e==="opacity")}function c9(e,A,t){const n=e.style,s=A?.style,r={};if(!n)return r;for(const a in n)(kr(n[a])||s&&kr(s[a])||HR(a,e)||t?.getValue(a)?.liveStyle!==void 0)&&(r[a]=n[a]);return r}function osA(e){return window.getComputedStyle(e)}class BsA extends gR{constructor(){super(...arguments),this.type="html",this.renderInstance=IR}readValueFromInstance(A,t){if(gh.has(t))return this.projection?.isProjecting?Dy(t):DtA(A,t);{const n=osA(A),s=(nT(t)?n.getPropertyValue(t):n[t])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(A,{transformPagePoint:t}){return vR(A,t)}build(A,t,n){o9(A,t,n.transformTemplate)}scrapeMotionValuesFromProps(A,t,n){return c9(A,t,n)}}const csA={offset:"stroke-dashoffset",array:"stroke-dasharray"},lsA={offset:"strokeDashoffset",array:"strokeDasharray"};function gsA(e,A,t=1,n=0,s=!0){e.pathLength=1;const r=s?csA:lsA;e[r.offset]=`${-n}`,e[r.array]=`${A} ${t}`}const dsA=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function mR(e,{attrX:A,attrY:t,attrScale:n,pathLength:s,pathSpacing:r=1,pathOffset:a=0,...o},c,l,d){if(o9(e,o,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:u,style:f}=e;u.transform&&(f.transform=u.transform,delete u.transform),(f.transform||u.transformOrigin)&&(f.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),f.transform&&(f.transformBox=d?.transformBox??"fill-box",delete u.transformBox);for(const b of dsA)u[b]!==void 0&&(f[b]=u[b],delete u[b]);A!==void 0&&(u.x=A),t!==void 0&&(u.y=t),n!==void 0&&(u.scale=n),s!==void 0&&gsA(u,s,r,a,!1)}const ER=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"]),yR=e=>typeof e=="string"&&e.toLowerCase()==="svg";function usA(e,A,t,n){IR(e,A,void 0,n);for(const s in A.attrs)e.setAttribute(ER.has(s)?s:Oy(s),A.attrs[s])}function YR(e,A,t){const n=c9(e,A,t);for(const s in e)if(kr(e[s])||kr(A[s])){const r=lh.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;n[r]=e[s]}return n}class GsA extends gR{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=js}getBaseTargetFromProps(A,t){return A[t]}readValueFromInstance(A,t){if(gh.has(t)){const n=KT(t);return n&&n.default||0}return t=ER.has(t)?t:Oy(t),A.getAttribute(t)}scrapeMotionValuesFromProps(A,t,n){return YR(A,t,n)}build(A,t,n){mR(A,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(A,t,n,s){usA(A,t,n,s)}mount(A){this.isSVGTag=yR(A.tagName),super.mount(A)}}const fsA=n9.length;function ZR(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent?ZR(e.parent)||{}:{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}const A={};for(let t=0;t<fsA;t++){const n=n9[t],s=e.props[n];(OQ(s)||s===!1)&&(A[n]=s)}return A}function kR(e,A){if(!Array.isArray(A))return!1;const t=A.length;if(t!==e.length)return!1;for(let n=0;n<t;n++)if(A[n]!==e[n])return!1;return!0}const hsA=[...t9].reverse(),wsA=t9.length;function QsA(e){return A=>Promise.all(A.map(({animation:t,options:n})=>zT(e,t,n)))}function bsA(e){let A=QsA(e),t=UR(),n=!0,s=!1;const r=l=>(d,u)=>{const f=aG(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(f){const{transition:b,transitionEnd:I,...y}=f;d={...d,...y,...I}}return d};function a(l){A=l(e)}function o(l){const{props:d}=e,u=ZR(e.parent)||{},f=[],b=new Set;let I={},y=1/0;for(let Z=0;Z<wsA;Z++){const F=hsA[Z],S=t[F],M=d[F]!==void 0?d[F]:u[F],x=OQ(M),V=F===l?S.isActive:null;V===!1&&(y=Z);let N=M===u[F]&&M!==d[F]&&x;if(N&&(n||s)&&e.manuallyAnimateOnMount&&(N=!1),S.protectedKeys={...I},!S.isActive&&V===null||!M&&!S.prevProp||rp(M)||typeof M=="boolean")continue;if(F==="exit"&&S.isActive&&V!==!0){S.prevResolvedValues&&(I={...I,...S.prevResolvedValues});continue}const z=CsA(S.prevProp,M);let q=z||F===l&&S.isActive&&!N&&x||Z>y&&x,_=!1;const sA=Array.isArray(M)?M:[M];let oA=sA.reduce(r(F),{});V===!1&&(oA={});const{prevResolvedValues:CA={}}=S,fA={...CA,...oA},kA=eA=>{q=!0,b.has(eA)&&(_=!0,b.delete(eA)),S.needsAnimating[eA]=!0;const EA=e.getValue(eA);EA&&(EA.liveStyle=!1)};for(const eA in fA){const EA=oA[eA],tA=CA[eA];if(I.hasOwnProperty(eA))continue;let W=!1;zy(EA)&&zy(tA)?W=!kR(EA,tA)||z:W=EA!==tA,W?EA!=null?kA(eA):b.add(eA):EA!==void 0&&b.has(eA)?kA(eA):S.protectedKeys[eA]=!0}S.prevProp=M,S.prevResolvedValues=oA,S.isActive&&(I={...I,...oA}),(n||s)&&e.blockInitialAnimation&&(q=!1);const X=N&&z;q&&(!X||_)&&f.push(...sA.map(eA=>{const EA={type:F};if(typeof eA=="string"&&(n||s)&&!X&&e.manuallyAnimateOnMount&&e.parent){const{parent:tA}=e,W=aG(tA,eA);if(tA.enteringChildren&&W){const{delayChildren:uA}=W.transition||{};EA.delay=xT(tA.enteringChildren,e,uA)}}return{animation:eA,options:EA}}))}if(b.size){const Z={};if(typeof d.initial!="boolean"){const F=aG(e,Array.isArray(d.initial)?d.initial[0]:d.initial);F&&F.transition&&(Z.transition=F.transition)}b.forEach(F=>{const S=e.getBaseTarget(F),M=e.getValue(F);M&&(M.liveStyle=!0),Z[F]=S??null}),f.push({animation:Z})}let E=!!f.length;return n&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(E=!1),n=!1,s=!1,E?A(f):Promise.resolve()}function c(l,d){if(t[l].isActive===d)return Promise.resolve();e.variantChildren?.forEach(f=>f.animationState?.setActive(l,d)),t[l].isActive=d;const u=o(l);for(const f in t)t[f].protectedKeys={};return u}return{animateChanges:o,setActive:c,setAnimateFunction:a,getState:()=>t,reset:()=>{t=UR(),s=!0}}}function CsA(e,A){return typeof A=="string"?A!==e:Array.isArray(A)?!kR(A,e):!1}function oG(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function UR(){return{animate:oG(!0),whileInView:oG(),whileHover:oG(),whileTap:oG(),whileDrag:oG(),whileFocus:oG(),exit:oG()}}function l9(e,A){e.min=A.min,e.max=A.max}function nB(e,A){l9(e.x,A.x),l9(e.y,A.y)}function DR(e,A){e.translate=A.translate,e.scale=A.scale,e.originPoint=A.originPoint,e.origin=A.origin}const FR=1e-4,vsA=1-FR,IsA=1+FR,xR=.01,psA=0-xR,HsA=0+xR;function ga(e){return e.max-e.min}function msA(e,A,t){return Math.abs(e-A)<=t}function MR(e,A,t,n=.5){e.origin=n,e.originPoint=un(A.min,A.max,e.origin),e.scale=ga(t)/ga(A),e.translate=un(t.min,t.max,e.origin)-e.originPoint,(e.scale>=vsA&&e.scale<=IsA||isNaN(e.scale))&&(e.scale=1),(e.translate>=psA&&e.translate<=HsA||isNaN(e.translate))&&(e.translate=0)}function KQ(e,A,t,n){MR(e.x,A.x,t.x,n?n.originX:void 0),MR(e.y,A.y,t.y,n?n.originY:void 0)}function PR(e,A,t,n=0){const s=n?un(t.min,t.max,n):t.min;e.min=s+A.min,e.max=e.min+ga(A)}function EsA(e,A,t,n){PR(e.x,A.x,t.x,n?.x),PR(e.y,A.y,t.y,n?.y)}function TR(e,A,t,n=0){const s=n?un(t.min,t.max,n):t.min;e.min=A.min-s,e.max=e.min+ga(A)}function cp(e,A,t,n){TR(e.x,A.x,t.x,n?.x),TR(e.y,A.y,t.y,n?.y)}function RR(e,A,t,n,s){return e-=A,e=op(e,1/t,n),s!==void 0&&(e=op(e,1/s,n)),e}function ysA(e,A=0,t=1,n=.5,s,r=e,a=e){if(ic.test(A)&&(A=parseFloat(A),A=un(a.min,a.max,A/100)-a.min),typeof A!="number")return;let o=un(r.min,r.max,n);e===r&&(o-=A),e.min=RR(e.min,A,t,o,s),e.max=RR(e.max,A,t,o,s)}function SR(e,A,[t,n,s],r,a){ysA(e,A[t],A[n],A[s],A.scale,r,a)}const YsA=["x","scaleX","originX"],ZsA=["y","scaleY","originY"];function VR(e,A,t,n){SR(e.x,A,YsA,t?t.x:void 0,n?n.x:void 0),SR(e.y,A,ZsA,t?t.y:void 0,n?n.y:void 0)}function WR(e){return e.translate===0&&e.scale===1}function NR(e){return WR(e.x)&&WR(e.y)}function zR(e,A){return e.min===A.min&&e.max===A.max}function ksA(e,A){return zR(e.x,A.x)&&zR(e.y,A.y)}function LR(e,A){return Math.round(e.min)===Math.round(A.min)&&Math.round(e.max)===Math.round(A.max)}function XR(e,A){return LR(e.x,A.x)&&LR(e.y,A.y)}function OR(e){return ga(e.x)/ga(e.y)}function JR(e,A){return e.translate===A.translate&&e.scale===A.scale&&e.originPoint===A.originPoint}function Bc(e){return[e("x"),e("y")]}function UsA(e,A,t){let n="";const s=e.x.translate/A.x,r=e.y.translate/A.y,a=t?.z||0;if((s||r||a)&&(n=`translate3d(${s}px, ${r}px, ${a}px) `),(A.x!==1||A.y!==1)&&(n+=`scale(${1/A.x}, ${1/A.y}) `),t){const{transformPerspective:l,rotate:d,pathRotation:u,rotateX:f,rotateY:b,skewX:I,skewY:y}=t;l&&(n=`perspective(${l}px) ${n}`),d&&(n+=`rotate(${d}deg) `),u&&(n+=`rotate(${u}deg) `),f&&(n+=`rotateX(${f}deg) `),b&&(n+=`rotateY(${b}deg) `),I&&(n+=`skewX(${I}deg) `),y&&(n+=`skewY(${y}deg) `)}const o=e.x.scale*A.x,c=e.y.scale*A.y;return(o!==1||c!==1)&&(n+=`scale(${o}, ${c})`),n||"none"}const KR=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],DsA=KR.length,jR=e=>typeof e=="string"?parseFloat(e):e,_R=e=>typeof e=="number"||ge.test(e);function FsA(e,A,t,n,s,r){s?(e.opacity=un(0,t.opacity??1,xsA(n)),e.opacityExit=un(A.opacity??1,0,MsA(n))):r&&(e.opacity=un(A.opacity??1,t.opacity??1,n));for(let a=0;a<DsA;a++){const o=KR[a];let c=qR(A,o),l=qR(t,o);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||_R(c)===_R(l)?(e[o]=Math.max(un(jR(c),jR(l),n),0),(ic.test(l)||ic.test(c))&&(e[o]+="%")):e[o]=l}(A.rotate||t.rotate)&&(e.rotate=un(A.rotate||0,t.rotate||0,n))}function qR(e,A){return e[A]!==void 0?e[A]:e.borderRadius}const xsA=$R(0,.5,jP),MsA=$R(.5,.95,ao);function $R(e,A,t){return n=>n<e?0:n>A?1:t(SQ(e,A,n))}function PsA(e,A,t){const n=kr(e)?e:dh(e);return n.start(Wy("",n,A,t)),n.animation}function jQ(e,A,t,n={passive:!0}){return e.addEventListener(A,t,n),()=>e.removeEventListener(A,t)}const TsA=(e,A)=>e.depth-A.depth;class RsA{constructor(){this.children=[],this.isDirty=!1}add(A){ly(this.children,A),this.isDirty=!0}remove(A){zI(this.children,A),this.isDirty=!0}forEach(A){this.isDirty&&this.children.sort(TsA),this.isDirty=!1,this.children.forEach(A)}}function SsA(e,A){const t=la.now(),n=({timestamp:s})=>{const r=s-t;r>=A&&(Ad(n),e(r-A))};return dn.setup(n,!0),()=>Ad(n)}function lp(e){return kr(e)?e.get():e}class VsA{constructor(){this.members=[]}add(A){ly(this.members,A);for(let t=this.members.length-1;t>=0;t--){const n=this.members[t];if(n===A||n===this.lead||n===this.prevLead)continue;const s=n.instance;(!s||s.isConnected===!1)&&!n.snapshot&&(zI(this.members,n),n.unmount())}A.scheduleRender()}remove(A){if(zI(this.members,A),A===this.prevLead&&(this.prevLead=void 0),A===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(A){for(let t=this.members.indexOf(A)-1;t>=0;t--){const n=this.members[t];if(n.isPresent!==!1&&n.instance?.isConnected!==!1)return this.promote(n),!0}return!1}promote(A,t){const n=this.lead;if(A!==n&&(this.prevLead=n,this.lead=A,A.show(),n)){n.updateSnapshot(),A.scheduleRender();const{layoutDependency:s}=n.options,{layoutDependency:r}=A.options;(s===void 0||s!==r)&&(A.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(A.snapshot=n.snapshot,A.snapshot.latestValues=n.animationValues||n.latestValues),A.root?.isUpdating&&(A.isLayoutDirty=!0)),A.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(A=>{A.options.onExitComplete?.(),A.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(A=>A.instance&&A.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const gp={hasAnimatedSinceResize:!0,hasEverUpdated:!1},g9=["","X","Y","Z"],WsA=1e3;let NsA=0;function d9(e,A,t,n){const{latestValues:s}=A;s[e]&&(t[e]=s[e],A.setStaticValue(e,0),n&&(n[e]=0))}function A4(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:A}=e.options;if(!A)return;const t=WT(A);if(window.MotionHasOptimisedAnimation(t,"transform")){const{layout:s,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(t,"transform",dn,!(s||r))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&A4(n)}function e4({attachResizeListener:e,defaultParent:A,measureScroll:t,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(a={},o=A?.()){this.id=NsA++,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(XsA),this.nodes.forEach(qsA),this.nodes.forEach($sA),this.nodes.forEach(OsA)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new RsA)}addEventListener(a,o){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new dy),this.eventHandlers.get(a).add(o)}notifyListeners(a,...o){const c=this.eventHandlers.get(a);c&&c.notify(...o)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=e9(a)&&!LnA(a),this.instance=a;const{layoutId:o,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||o)&&(this.isLayoutDirty=!0),e){let d,u=0;const f=()=>this.root.updateBlockedByResize=!1;dn.read(()=>{u=window.innerWidth}),e(a,()=>{const b=window.innerWidth;b!==u&&(u=b,this.root.updateBlockedByResize=!0,d&&d(),d=SsA(f,250),gp.hasAnimatedSinceResize&&(gp.hasAnimatedSinceResize=!1,this.nodes.forEach(s4)))})}o&&this.root.registerSharedNode(o,this),this.options.animate!==!1&&l&&(o||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:u,hasRelativeLayoutChanged:f,layout:b})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const I=this.options.transition||l.getDefaultTransition()||srA,{onLayoutAnimationStart:y,onLayoutAnimationComplete:E}=l.getProps(),Z=!this.targetLayout||!XR(this.targetLayout,b),F=!u&&f;if(this.options.layoutRoot||this.resumeFrom||F||u&&(Z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const S={...Vy(I,"layout"),onPlay:y,onComplete:E};(l.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S),this.setAnimationOrigin(d,F,S.path)}else u||s4(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=b})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ad(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(ArA),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&A4(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const u=this.path[d];u.shouldResetTransform=!0,(typeof u.latestValues.x=="string"||typeof u.latestValues.y=="string")&&(u.isLayoutDirty=!0),u.updateScroll("snapshot"),u.options.layoutRoot&&u.willUpdate(!1)}const{layoutId:o,layout:c}=this.options;if(o===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(KsA),this.nodes.forEach(t4);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(n4);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(jsA),this.nodes.forEach(_sA),this.nodes.forEach(zsA),this.nodes.forEach(LsA)):this.nodes.forEach(n4),this.clearAllSnapshots();const o=la.now();Zr.delta=ac(0,1e3/60,o-Zr.timestamp),Zr.timestamp=o,Zr.isProcessing=!0,fy.update.process(Zr),fy.preRender.process(Zr),fy.render.process(Zr),Zr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,qy.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(JsA),this.sharedNodes.forEach(erA)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,dn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){dn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ga(this.snapshot.measuredBox.x)&&!ga(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=js()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let o=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(o=!1),o&&this.instance){const c=n(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:t(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,o=this.projectionDelta&&!NR(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,d=l!==this.prevTransformTemplateValue;a&&this.instance&&(o||iG(this.latestValues)||d)&&(s(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const o=this.measurePageBox();let c=this.removeElementScroll(o);return a&&(c=this.removeTransform(c)),rrA(c),{animationId:this.root.animationId,measuredBox:o,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return js();const o=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(arA))){const{scroll:l}=this.root;l&&(oc(o.x,l.offset.x),oc(o.y,l.offset.y))}return o}removeElementScroll(a){const o=js();if(nB(o,a),this.scroll?.wasRoot)return o;for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:d,options:u}=l;l!==this.root&&d&&u.layoutScroll&&(d.wasRoot&&nB(o,a),oc(o.x,d.offset.x),oc(o.y,d.offset.y))}return o}applyTransform(a,o=!1,c){const l=c||js();nB(l,a);for(let d=0;d<this.path.length;d++){const u=this.path[d];!o&&u.options.layoutScroll&&u.scroll&&u!==u.root&&(oc(l.x,-u.scroll.offset.x),oc(l.y,-u.scroll.offset.y)),iG(u.latestValues)&&Bp(l,u.latestValues,u.layout?.layoutBox)}return iG(this.latestValues)&&Bp(l,this.latestValues,this.layout?.layoutBox),l}removeTransform(a){const o=js();nB(o,a);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!iG(l.latestValues))continue;let d;l.instance&&(a9(l.latestValues)&&l.updateSnapshot(),d=js(),nB(d,l.measurePageBox())),VR(o,l.latestValues,l.snapshot?.layoutBox,d)}return iG(this.latestValues)&&VR(o,this.latestValues),o}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Zr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const o=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=o.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=o.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=o.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==o;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:u}=this.options;if(!this.layout||!(d||u))return;this.resolvedRelativeTargetAt=Zr.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=js(),this.targetWithTransforms=js()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),EsA(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):nB(this.target,this.layout.layoutBox),hR(this.target,this.targetDelta)):nB(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||a9(this.parent.latestValues)||uR(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,o,c){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=js(),this.relativeTargetOrigin=js(),cp(this.relativeTargetOrigin,o,c,this.options.layoutAnchor||void 0),nB(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const a=this.getLead(),o=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),o&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Zr.timestamp&&(c=!1),c)return;const{layout:l,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||d))return;nB(this.layoutCorrected,this.layout.layoutBox);const u=this.treeScale.x,f=this.treeScale.y;tsA(this.layoutCorrected,this.treeScale,this.path,o),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=js());const{target:b}=a;if(!b){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(DR(this.prevProjectionDelta.x,this.projectionDelta.x),DR(this.prevProjectionDelta.y,this.projectionDelta.y)),KQ(this.projectionDelta,this.layoutCorrected,b,this.latestValues),(this.treeScale.x!==u||this.treeScale.y!==f||!JR(this.projectionDelta.x,this.prevProjectionDelta.x)||!JR(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",b))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const o=this.getStack();o&&o.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Gh(),this.projectionDelta=Gh(),this.projectionDeltaWithTransform=Gh()}setAnimationOrigin(a,o=!1,c){const l=this.snapshot,d=l?l.latestValues:{},u={...this.latestValues},f=Gh();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const b=js(),I=l?l.source:void 0,y=this.layout?this.layout.source:void 0,E=I!==y,Z=this.getStack(),F=!Z||Z.members.length<=1,S=!!(E&&!F&&this.options.crossfade===!0&&!this.path.some(nrA));this.animationProgress=0;let M;const x=c?.interpolateProjection(a);this.mixTargetDelta=V=>{const N=V/1e3,z=x?.(N);z?(f.x.translate=z.x,f.x.scale=un(a.x.scale,1,N),f.x.origin=a.x.origin,f.x.originPoint=a.x.originPoint,f.y.translate=z.y,f.y.scale=un(a.y.scale,1,N),f.y.origin=a.y.origin,f.y.originPoint=a.y.originPoint):(r4(f.x,a.x,N),r4(f.y,a.y,N)),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(cp(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),trA(this.relativeTarget,this.relativeTargetOrigin,b,N),M&&ksA(this.relativeTarget,M)&&(this.isProjectionDirty=!1),M||(M=js()),nB(M,this.relativeTarget)),E&&(this.animationValues=u,FsA(u,d,this.latestValues,N,S,F)),z&&z.rotate!==void 0&&(this.animationValues||(this.animationValues=u),this.animationValues.pathRotation=z.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=N},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ad(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=dn.update(()=>{gp.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=dh(0)),this.motionValue.jump(0,!1),this.currentAnimation=PsA(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:o=>{this.mixTargetDelta(o),a.onUpdate&&a.onUpdate(o)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(WsA),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:o,target:c,layout:l,latestValues:d}=a;if(!(!o||!c||!l)){if(this!==a&&this.layout&&l&&c4(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||js();const u=ga(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+u;const f=ga(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+f}nB(o,c),Bp(o,d),KQ(this.projectionDeltaWithTransform,this.layoutCorrected,o,d)}}registerSharedNode(a,o){this.sharedNodes.has(a)||this.sharedNodes.set(a,new VsA),this.sharedNodes.get(a).add(o);const l=o.options.initialPromotionConfig;o.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(o):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:o,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let o=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(o=!0),!o)return;const l={};c.z&&d9("z",a,l,this.animationValues);for(let d=0;d<g9.length;d++)d9(`rotate${g9[d]}`,a,l,this.animationValues),d9(`skew${g9[d]}`,a,l,this.animationValues);a.render();for(const d in l)a.setStaticValue(d,l[d]),this.animationValues&&(this.animationValues[d]=l[d]);a.scheduleRender()}applyProjectionStyles(a,o){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=lp(o?.pointerEvents)||"",a.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=lp(o?.pointerEvents)||""),this.hasProjected&&!iG(this.latestValues)&&(a.transform=c?c({},""):"none",this.hasProjected=!1);return}a.visibility="";const d=l.animationValues||l.latestValues;this.applyTransformsToTarget();let u=UsA(this.projectionDeltaWithTransform,this.treeScale,d);c&&(u=c(d,u)),a.transform=u;const{x:f,y:b}=this.projectionDelta;a.transformOrigin=`${f.origin*100}% ${b.origin*100}% 0`,l.animationValues?a.opacity=l===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:a.opacity=l===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const I in B9){if(d[I]===void 0)continue;const{correct:y,applyTo:E,isCSSVariable:Z}=B9[I],F=u==="none"?d[I]:y(d[I],l);if(E){const S=E.length;for(let M=0;M<S;M++)a[E[M]]=F}else Z?this.options.visualElement.renderState.vars[I]=F:a[I]=F}this.options.layoutId&&(a.pointerEvents=l===this?lp(o?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(t4),this.root.sharedNodes.clear()}}}function zsA(e){e.updateLayout()}function LsA(e){const A=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&A&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:n}=e.layout,{animationType:s}=e.options,r=A.source!==e.layout.source;if(s==="size")Bc(d=>{const u=r?A.measuredBox[d]:A.layoutBox[d],f=ga(u);u.min=t[d].min,u.max=u.min+f});else if(s==="x"||s==="y"){const d=s==="x"?"y":"x";l9(r?A.measuredBox[d]:A.layoutBox[d],t[d])}else c4(s,A.layoutBox,t)&&Bc(d=>{const u=r?A.measuredBox[d]:A.layoutBox[d],f=ga(t[d]);u.max=u.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+f)});const a=Gh();KQ(a,t,A.layoutBox);const o=Gh();r?KQ(o,e.applyTransform(n,!0),A.measuredBox):KQ(o,t,A.layoutBox);const c=!NR(a);let l=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:u,layout:f}=d;if(u&&f){const b=e.options.layoutAnchor||void 0,I=js();cp(I,A.layoutBox,u.layoutBox,b);const y=js();cp(y,t,f.layoutBox,b),XR(I,y)||(l=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=I,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:A,delta:o,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function XsA(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 OsA(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function JsA(e){e.clearSnapshot()}function t4(e){e.clearMeasurements()}function KsA(e){e.isLayoutDirty=!0,e.updateLayout()}function n4(e){e.isLayoutDirty=!1}function jsA(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function _sA(e){const{visualElement:A}=e.options;A&&A.getProps().onBeforeLayoutMeasure&&A.notify("BeforeLayoutMeasure"),e.resetTransform()}function s4(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function qsA(e){e.resolveTargetDelta()}function $sA(e){e.calcProjection()}function ArA(e){e.resetSkewAndRotation()}function erA(e){e.removeLeadSnapshot()}function r4(e,A,t){e.translate=un(A.translate,0,t),e.scale=un(A.scale,1,t),e.origin=A.origin,e.originPoint=A.originPoint}function a4(e,A,t,n){e.min=un(A.min,t.min,n),e.max=un(A.max,t.max,n)}function trA(e,A,t,n){a4(e.x,A.x,t.x,n),a4(e.y,A.y,t.y,n)}function nrA(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const srA={duration:.45,ease:[.4,0,.1,1]},i4=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),o4=i4("applewebkit/")&&!i4("chrome/")?Math.round:ao;function B4(e){e.min=o4(e.min),e.max=o4(e.max)}function rrA(e){B4(e.x),B4(e.y)}function c4(e,A,t){return e==="position"||e==="preserve-aspect"&&!msA(OR(A),OR(t),.2)}function arA(e){return e!==e.root&&e.scroll?.wasRoot}const irA=e4({attachResizeListener:(e,A)=>jQ(e,"resize",A),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),u9={current:void 0},l4=e4({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!u9.current){const e=new irA({});e.mount(window),e.setOptions({layoutScroll:!0}),u9.current=e}return u9.current},resetTransform:(e,A)=>{e.style.transform=A!==void 0?A:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),G9=D.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function g4(e,A){if(typeof e=="function")return e(A);e!=null&&(e.current=A)}function orA(...e){return A=>{let t=!1;const n=e.map(s=>{const r=g4(s,A);return!t&&typeof r=="function"&&(t=!0),r});if(t)return()=>{for(let s=0;s<n.length;s++){const r=n[s];typeof r=="function"?r():g4(e[s],null)}}}}function BrA(...e){return D.useCallback(orA(...e),e)}class crA extends D.Component{getSnapshotBeforeUpdate(A){const t=this.props.childRef.current;if(Ap(t)&&A.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const n=t.offsetParent,s=Ap(n)&&n.offsetWidth||0,r=Ap(n)&&n.offsetHeight||0,a=getComputedStyle(t),o=this.props.sizeRef.current;o.height=parseFloat(a.height),o.width=parseFloat(a.width),o.top=t.offsetTop,o.left=t.offsetLeft,o.right=s-o.width-o.left,o.bottom=r-o.height-o.top,o.direction=a.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function lrA({children:e,isPresent:A,anchorX:t,anchorY:n,root:s,pop:r}){const a=D.useId(),o=D.useRef(null),c=D.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:l}=D.useContext(G9),d=e.props?.ref??e?.ref,u=BrA(o,d);return D.useInsertionEffect(()=>{const{width:f,height:b,top:I,left:y,right:E,bottom:Z,direction:F}=c.current;if(A||r===!1||!o.current||!f||!b)return;const S=F==="rtl",M=t==="left"?S?`right: ${E}`:`left: ${y}`:S?`left: ${y}`:`right: ${E}`,x=n==="bottom"?`bottom: ${Z}`:`top: ${I}`;o.current.dataset.motionPopId=a;const V=document.createElement("style");l&&(V.nonce=l);const N=s??document.head;return N.appendChild(V),V.sheet&&V.sheet.insertRule(`
|
|
326
326
|
[data-motion-pop-id="${a}"] {
|
|
327
327
|
position: absolute !important;
|
|
328
328
|
width: ${f}px !important;
|