@skybridge/devtools 0.0.0-dev.fb825da → 0.0.0-dev.fbd2c17

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.
@@ -56,7 +56,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
56
56
  `;break;case"id":f=x.includes("\0")?void 0:x;break;case"retry":/^\d+$/.test(x)?i(parseInt(x,10)):r(new d4(`Invalid \`retry\` value: "${x}"`,{type:"invalid-retry",value:x,line:_}));break;default:r(new d4(`Unknown field "${C.length>20?`${C.slice(0,20)}…`:C}"`,{type:"unknown-field",field:C,value:x,line:_}));break}}function w(){d.length>0&&t({id:f,event:h||void 0,data:d.endsWith(`
57
57
  `)?d.slice(0,-1):d}),f=void 0,d="",h=""}function b(C={}){l&&C.consume&&y(l),c=!0,f=void 0,d="",h="",l=""}return{feed:m,reset:b}}function Ine(e){const t=[];let r="",i=0;for(;i<e.length;){const o=e.indexOf("\r",i),l=e.indexOf(`
58
58
  `,i);let c=-1;if(o!==-1&&l!==-1?c=Math.min(o,l):o!==-1?o===e.length-1?c=-1:c=o:l!==-1&&(c=l),c===-1){r=e.slice(i);break}else{const f=e.slice(i,c);t.push(f),i=c+1,e[i-1]==="\r"&&e[i]===`
59
- `&&i++}}return[t,r]}class Une extends TransformStream{constructor({onError:t,onRetry:r,onComment:i}={}){let o;super({start(l){o=Pne({onEvent:c=>{l.enqueue(c)},onError(c){t==="terminate"?l.error(c):typeof t=="function"&&t(c)},onRetry:r,onComment:i})},transform(l){o.feed(l)}})}}const Lne={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2};class np extends Error{constructor(t,r){super(`Streamable HTTP error: ${r}`),this.code=t}}class qne{constructor(t,r){this._hasCompletedAuthFlow=!1,this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=r?.requestInit,this._authProvider=r?.authProvider,this._fetch=r?.fetch,this._fetchWithInit=tne(r?.fetch,r?.requestInit),this._sessionId=r?.sessionId,this._reconnectionOptions=r?.reconnectionOptions??Lne}async _authThenStart(){if(!this._authProvider)throw new tp("No auth provider");let t;try{t=await z1(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(r){throw this.onerror?.(r),r}if(t!=="AUTHORIZED")throw new tp;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){const t={};if(this._authProvider){const i=await this._authProvider.tokens();i&&(t.Authorization=`Bearer ${i.access_token}`)}this._sessionId&&(t["mcp-session-id"]=this._sessionId),this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const r=QT(this._requestInit?.headers);return new Headers({...t,...r})}async _startOrAuthSse(t){const{resumptionToken:r}=t;try{const i=await this._commonHeaders();i.set("Accept","text/event-stream"),r&&i.set("last-event-id",r);const o=await(this._fetch??fetch)(this._url,{method:"GET",headers:i,signal:this._abortController?.signal});if(!o.ok){if(await o.body?.cancel(),o.status===401&&this._authProvider)return await this._authThenStart();if(o.status===405)return;throw new np(o.status,`Failed to open SSE stream: ${o.statusText}`)}this._handleSseStream(o.body,t,!0)}catch(i){throw this.onerror?.(i),i}}_getNextReconnectionDelay(t){if(this._serverRetryMs!==void 0)return this._serverRetryMs;const r=this._reconnectionOptions.initialReconnectionDelay,i=this._reconnectionOptions.reconnectionDelayGrowFactor,o=this._reconnectionOptions.maxReconnectionDelay;return Math.min(r*Math.pow(i,t),o)}_scheduleReconnection(t,r=0){const i=this._reconnectionOptions.maxRetries;if(r>=i){this.onerror?.(new Error(`Maximum reconnection attempts (${i}) exceeded.`));return}const o=this._getNextReconnectionDelay(r);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(t).catch(l=>{this.onerror?.(new Error(`Failed to reconnect SSE stream: ${l instanceof Error?l.message:String(l)}`)),this._scheduleReconnection(t,r+1)})},o)}_handleSseStream(t,r,i){if(!t)return;const{onresumptiontoken:o,replayMessageId:l}=r;let c,f=!1,d=!1;(async()=>{try{const m=t.pipeThrough(new TextDecoderStream).pipeThrough(new Une({onRetry:w=>{this._serverRetryMs=w}})).getReader();for(;;){const{value:w,done:b}=await m.read();if(b)break;if(w.id&&(c=w.id,f=!0,o?.(w.id)),!!w.data&&(!w.event||w.event==="message"))try{const C=G_.parse(JSON.parse(w.data));hv(C)&&(d=!0,l!==void 0&&(C.id=l)),this.onmessage?.(C)}catch(C){this.onerror?.(C)}}(i||f)&&!d&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:c,onresumptiontoken:o,replayMessageId:l},0)}catch(m){if(this.onerror?.(new Error(`SSE stream disconnected: ${m}`)),(i||f)&&!d&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:c,onresumptiontoken:o,replayMessageId:l},0)}catch(w){this.onerror?.(new Error(`Failed to reconnect: ${w instanceof Error?w.message:String(w)}`))}}})()}async start(){if(this._abortController)throw new Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(t){if(!this._authProvider)throw new tp("No auth provider");if(await z1(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new tp("Failed to authorize")}async close(){this._reconnectionTimeout&&(clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=void 0),this._abortController?.abort(),this.onclose?.()}async send(t,r){try{const{resumptionToken:i,onresumptiontoken:o}=r||{};if(i){this._startOrAuthSse({resumptionToken:i,replayMessageId:XT(t)?t.id:void 0}).catch(v=>this.onerror?.(v));return}const l=await this._commonHeaders();l.set("content-type","application/json"),l.set("accept","application/json, text/event-stream");const c={...this._requestInit,method:"POST",headers:l,body:JSON.stringify(t),signal:this._abortController?.signal},f=await(this._fetch??fetch)(this._url,c),d=f.headers.get("mcp-session-id");if(d&&(this._sessionId=d),!f.ok){const v=await f.text().catch(()=>null);if(f.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new np(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl:w,scope:b}=c4(f);if(this._resourceMetadataUrl=w,this._scope=b,await z1(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new tp;return this._hasCompletedAuthFlow=!0,this.send(t)}if(f.status===403&&this._authProvider){const{resourceMetadataUrl:w,scope:b,error:C}=c4(f);if(C==="insufficient_scope"){const x=f.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===x)throw new np(403,"Server returned 403 after trying upscoping");if(b&&(this._scope=b),w&&(this._resourceMetadataUrl=w),this._lastUpscopingHeader=x??void 0,await z1(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new tp;return this.send(t)}}throw new np(f.status,`Error POSTing to endpoint: ${v}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,f.status===202){await f.body?.cancel(),bJ(t)&&this._startOrAuthSse({resumptionToken:void 0}).catch(v=>this.onerror?.(v));return}const m=(Array.isArray(t)?t:[t]).filter(v=>"method"in v&&"id"in v&&v.id!==void 0).length>0,y=f.headers.get("content-type");if(m)if(y?.includes("text/event-stream"))this._handleSseStream(f.body,{onresumptiontoken:o},!1);else if(y?.includes("application/json")){const v=await f.json(),w=Array.isArray(v)?v.map(b=>G_.parse(b)):[G_.parse(v)];for(const b of w)this.onmessage?.(b)}else throw await f.body?.cancel(),new np(-1,`Unexpected content type: ${y}`);else await f.body?.cancel()}catch(i){throw this.onerror?.(i),i}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{const t=await this._commonHeaders(),r={...this._requestInit,method:"DELETE",headers:t,signal:this._abortController?.signal},i=await(this._fetch??fetch)(this._url,r);if(await i.body?.cancel(),!i.ok&&i.status!==405)throw new np(i.status,`Failed to terminate session: ${i.statusText}`);this._sessionId=void 0}catch(t){throw this.onerror?.(t),t}}setProtocolVersion(t){this._protocolVersion=t}get protocolVersion(){return this._protocolVersion}async resumeStream(t,r){await this._startOrAuthSse({resumptionToken:t,onresumptiontoken:r?.onresumptiontoken})}}class Vne{client=null;transport=null;async connect(t){const r=typeof t=="string"?new URL(t):t;this.transport=new qne(r),this.client=new ene({name:"mcp-client",version:"1.0.0"},{capabilities:{experimental:{tools:{},resources:{},prompts:{}}}}),await this.client.connect(this.transport)}async listTools(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return(await this.client.listTools()).tools}async callTool(t,r){if(!this.client)throw new Error("Client not connected. Call connect() first.");return await this.client.callTool({name:t,arguments:r??{}})}async listResources(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return(await this.client.listResources()).resources}async readResource(t){if(!this.client)throw new Error("Client not connected. Call connect() first.");return await this.client.readResource({uri:t})}async listPrompts(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return(await this.client.listPrompts()).prompts}async getPrompt(t,r){if(!this.client)throw new Error("Client not connected. Call connect() first.");return await this.client.getPrompt({name:t,...r&&{arguments:r}})}getServerInfo(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return this.client._serverVersion}async close(){this.client&&(await this.client.close(),this.client=null),this.transport&&(this.transport=null)}}const Tb=new Vne;Tb.connect("http://localhost:3000/mcp").then(()=>{console.info("Connected to MCP server")});const Bne={theme:"light",userAgent:{device:{type:"desktop"},capabilities:{hover:!0,touch:!1}},locale:"en-US",maxHeight:600,displayMode:"inline",safeArea:{insets:{top:0,bottom:0,left:0,right:0}},toolInput:{},toolOutput:null,toolResponseMetadata:null,view:{mode:"inline"},widgetState:null},E9=()=>{const{data:e}=ak({queryKey:["list-tools"],queryFn:()=>Tb.listTools()});return e},Fne=()=>Tb.getServerInfo(),Hne=()=>{const{setToolData:e}=fm();return hL({mutationFn:async({toolName:t,args:r})=>{e(t,{input:r??{},response:void 0,openaiRef:null,openaiLogs:[],openaiObject:null});const i=await Tb.callTool(t,r);return e(t,{input:r??{},response:i,openaiRef:null,openaiLogs:[],openaiObject:{...Bne,toolInput:r??{},toolOutput:i.structuredContent,toolResponseMetadata:i.meta,widgetState:null}}),i}})},AO=()=>{const[e]=YA();return E9().find(r=>r.name===e)??null},Vh=()=>{const e=AO();if(!e)throw new Error("No tool is currently selected");return e},Gne=e=>ak({queryKey:["resource",e],queryFn:async()=>{if(!e)throw new Error("Resource URI is required");return await Tb.readResource(e)}});const Kne=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Yne=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,i)=>i?i.toUpperCase():r.toLowerCase()),h4=e=>{const t=Yne(e);return t.charAt(0).toUpperCase()+t.slice(1)},_9=(...e)=>e.filter((t,r,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===r).join(" ").trim(),Zne=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Xne={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Qne=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:o="",children:l,iconNode:c,...f},d)=>j.createElement("svg",{ref:d,...Xne,width:t,height:t,stroke:e,strokeWidth:i?Number(r)*24/Number(t):r,className:_9("lucide",o),...!l&&!Zne(f)&&{"aria-hidden":"true"},...f},[...c.map(([h,m])=>j.createElement(h,m)),...Array.isArray(l)?l:[l]]));const Nl=(e,t)=>{const r=j.forwardRef(({className:i,...o},l)=>j.createElement(Qne,{ref:l,iconNode:t,className:_9(`lucide-${Kne(h4(e))}`,`lucide-${e}`,i),...o}));return r.displayName=h4(e),r};const Wne=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Jne=Nl("check",Wne);const ere=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],x9=Nl("chevron-down",ere);const tre=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],nre=Nl("chevron-up",tre);const rre=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],are=Nl("circle-alert",rre);const ire=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],sre=Nl("external-link",ire);const ore=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],lre=Nl("loader-circle",ore);const ure=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],cre=Nl("moon",ure);const fre=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],dre=Nl("play",fre);const hre=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],pre=Nl("sun",hre);const mre=[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],gre=Nl("trash",mre);function G2(){return typeof window<"u"}function Qc(e){return OO(e)?(e.nodeName||"").toLowerCase():"#document"}function ja(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kl(e){var t;return(t=(OO(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function OO(e){return G2()?e instanceof Node||e instanceof ja(e).Node:!1}function Ir(e){return G2()?e instanceof Element||e instanceof ja(e).Element:!1}function Jr(e){return G2()?e instanceof HTMLElement||e instanceof ja(e).HTMLElement:!1}function cC(e){return!G2()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ja(e).ShadowRoot}const yre=new Set(["inline","contents"]);function Bh(e){const{overflow:t,overflowX:r,overflowY:i,display:o}=Bs(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+r)&&!yre.has(o)}const vre=new Set(["table","td","th"]);function bre(e){return vre.has(Qc(e))}const Sre=[":popover-open",":modal"];function K2(e){return Sre.some(t=>{try{return e.matches(t)}catch{return!1}})}const wre=["transform","translate","scale","rotate","perspective"],Ere=["transform","translate","scale","rotate","perspective","filter"],_re=["paint","layout","strict","content"];function RO(e){const t=Y2(),r=Ir(e)?Bs(e):e;return wre.some(i=>r[i]?r[i]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||Ere.some(i=>(r.willChange||"").includes(i))||_re.some(i=>(r.contain||"").includes(i))}function xre(e){let t=tc(e);for(;Jr(t)&&!Ju(t);){if(RO(t))return t;if(K2(t))return null;t=tc(t)}return null}function Y2(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Tre=new Set(["html","body","#document"]);function Ju(e){return Tre.has(Qc(e))}function Bs(e){return ja(e).getComputedStyle(e)}function Z2(e){return Ir(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tc(e){if(Qc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||cC(e)&&e.host||kl(e);return cC(t)?t.host:t}function T9(e){const t=tc(e);return Ju(t)?e.ownerDocument?e.ownerDocument.body:e.body:Jr(t)&&Bh(t)?t:T9(t)}function Oc(e,t,r){var i;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=T9(e),l=o===((i=e.ownerDocument)==null?void 0:i.body),c=ja(o);if(l){const f=fC(c);return t.concat(c,c.visualViewport||[],Bh(o)?o:[],f&&r?Oc(f):[])}return t.concat(o,Oc(o,[],r))}function fC(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const p4={};function Al(e,t){const r=j.useRef(p4);return r.current===p4&&(r.current=e(t)),r}const cx=im[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Cre=cx&&cx!==j.useLayoutEffect?cx:e=>e();function Ct(e){const t=Al(Are).current;return t.next=e,Cre(t.effect),t.trampoline}function Are(){const e={next:void 0,callback:Ore,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Ore(){}const Rre=()=>{},St=typeof document<"u"?j.useLayoutEffect:Rre;function dC(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const _v={};function X2(e,t,r,i,o){let l={...hC(e,_v)};return t&&(l=pv(l,t)),r&&(l=pv(l,r)),i&&(l=pv(l,i)),o&&(l=pv(l,o)),l}function Mre(e){if(e.length===0)return _v;if(e.length===1)return hC(e[0],_v);let t={...hC(e[0],_v)};for(let r=1;r<e.length;r+=1)t=pv(t,e[r]);return t}function pv(e,t){return C9(t)?t(e):jre(e,t)}function jre(e,t){if(!t)return e;for(const r in t){const i=t[r];switch(r){case"style":{e[r]=dC(e.style,i);break}case"className":{e[r]=A9(e.className,i);break}default:Dre(r,i)?e[r]=Nre(e[r],i):e[r]=i}}return e}function Dre(e,t){const r=e.charCodeAt(0),i=e.charCodeAt(1),o=e.charCodeAt(2);return r===111&&i===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function C9(e){return typeof e=="function"}function hC(e,t){return C9(e)?e(t):e??_v}function Nre(e,t){return t?e?r=>{if(kre(r)){const o=r;pC(o);const l=t(o);return o.baseUIHandlerPrevented||e?.(o),l}const i=t(r);return e?.(r),i}:t:e}function pC(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function A9(e,t){return t?e?t+" "+e:t:e}function kre(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function zl(e,...t){const r=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(i=>r.searchParams.append("args[]",i)),`Base UI error #${e}; visit ${r} for the full message.`}const O9=j.createContext(void 0);function R9(e=!1){const t=j.useContext(O9);if(t===void 0&&!e)throw new Error(zl(16));return t}function zre(e){const{focusableWhenDisabled:t,disabled:r,composite:i=!1,tabIndex:o=0,isNativeButton:l}=e,c=i&&t!==!1,f=i&&t===!1;return{props:j.useMemo(()=>{const h={onKeyDown(m){r&&t&&m.key!=="Tab"&&m.preventDefault()}};return i||(h.tabIndex=o,!l&&r&&(h.tabIndex=t?o:-1)),(l&&(t||c)||!l&&r)&&(h["aria-disabled"]=r),l&&(!t||f)&&(h.disabled=r),h},[i,r,t,c,f,l,o])}}function Q2(e={}){const{disabled:t=!1,focusableWhenDisabled:r,tabIndex:i=0,native:o=!0}=e,l=j.useRef(null),c=R9(!0)!==void 0,f=Ct(()=>{const v=l.current;return!!(v?.tagName==="A"&&v?.href)}),{props:d}=zre({focusableWhenDisabled:r,disabled:t,composite:c,tabIndex:i,isNativeButton:o}),h=j.useCallback(()=>{const v=l.current;$re(v)&&c&&t&&d.disabled===void 0&&v.disabled&&(v.disabled=!1)},[t,d.disabled,c]);St(h,[h]);const m=j.useCallback((v={})=>{const{onClick:w,onMouseDown:b,onKeyUp:C,onKeyDown:x,onPointerDown:_,...S}=v;return X2({type:o?"button":void 0,onClick(E){if(t){E.preventDefault();return}w?.(E)},onMouseDown(E){t||b?.(E)},onKeyDown(E){if(t||(pC(E),x?.(E)),E.baseUIHandlerPrevented)return;const O=E.target===E.currentTarget&&!o&&!f()&&!t,T=E.key==="Enter",M=E.key===" ";O&&((M||T)&&E.preventDefault(),T&&w?.(E))},onKeyUp(E){t||(pC(E),C?.(E)),!E.baseUIHandlerPrevented&&E.target===E.currentTarget&&!o&&!t&&E.key===" "&&w?.(E)},onPointerDown(E){if(t){E.preventDefault();return}_?.(E)}},o?void 0:{role:"button"},d,S)},[t,d,o,f]),y=Ct(v=>{l.current=v,h()});return{getButtonProps:m,buttonRef:y}}function $re(e){return Jr(e)&&e.tagName==="BUTTON"}function Lc(e,t,r,i){const o=Al(M9).current;return Ire(o,e,t,r,i)&&j9(o,[e,t,r,i]),o.callback}function Pre(e){const t=Al(M9).current;return Ure(t,e)&&j9(t,e),t.callback}function M9(){return{callback:null,cleanup:null,refs:[]}}function Ire(e,t,r,i,o){return e.refs[0]!==t||e.refs[1]!==r||e.refs[2]!==i||e.refs[3]!==o}function Ure(e,t){return e.refs.length!==t.length||e.refs.some((r,i)=>r!==t[i])}function j9(e,t){if(e.refs=t,t.every(r=>r==null)){e.callback=null;return}e.callback=r=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),r!=null){const i=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const l=t[o];if(l!=null)switch(typeof l){case"function":{const c=l(r);typeof c=="function"&&(i[o]=c);break}case"object":{l.current=r;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const l=t[o];if(l!=null)switch(typeof l){case"function":{const c=i[o];typeof c=="function"?c():l(null);break}case"object":{l.current=null;break}}}}}}}const Lre=parseInt(j.version,10);function MO(e){return Lre>=e}function m4(e){if(!j.isValidElement(e))return null;const t=e,r=t.props;return(MO(19)?r?.ref:t.ref)??null}function qre(e,t){const r={};for(const i in e){const o=e[i];if(t?.hasOwnProperty(i)){const l=t[i](o);l!=null&&Object.assign(r,l);continue}o===!0?r[`data-${i.toLowerCase()}`]="":o&&(r[`data-${i.toLowerCase()}`]=o.toString())}return r}function Vre(e,t){return typeof e=="function"?e(t):e}function Bre(e,t){return typeof e=="function"?e(t):e}function Ps(){}const Fp=Object.freeze([]),Is=Object.freeze({}),Fre={style:{transition:"none"}},Hre="data-base-ui-click-trigger",Gre={fallbackAxisSide:"none"},Kre={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function $a(e,t,r={}){const i=t.render,o=Yre(t,r);if(r.enabled===!1)return null;const l=r.state??Is;return Zre(e,i,o,l)}function Yre(e,t={}){const{className:r,style:i,render:o}=e,{state:l=Is,ref:c,props:f,stateAttributesMapping:d,enabled:h=!0}=t,m=h?Vre(r,l):void 0,y=h?Bre(i,l):void 0,v=h?qre(l,d):Is,w=h?dC(v,Array.isArray(f)?Mre(f):f)??Is:Is;return typeof document<"u"&&(h?Array.isArray(c)?w.ref=Pre([w.ref,m4(o),...c]):w.ref=Lc(w.ref,m4(o),c):Lc(null,null)),h?(m!==void 0&&(w.className=A9(w.className,m)),y!==void 0&&(w.style=dC(w.style,y)),w):Is}function Zre(e,t,r,i){if(t){if(typeof t=="function")return t(r,i);const o=X2(r,t.props);return o.ref=r.ref,j.cloneElement(t,o)}if(e&&typeof e=="string")return Xre(e,r);throw new Error(zl(8))}function Xre(e,t){return e==="button"?j.createElement("button",{type:"button",...t,key:t.key}):e==="img"?j.createElement("img",{alt:"",...t,key:t.key}):j.createElement(e,t)}const Qre=j.forwardRef(function(t,r){const{render:i,className:o,disabled:l=!1,focusableWhenDisabled:c=!1,nativeButton:f=!0,...d}=t,h=!!l,{getButtonProps:m,buttonRef:y}=Q2({disabled:h,focusableWhenDisabled:c,native:f}),v=j.useMemo(()=>({disabled:h}),[h]);return $a("button",t,{state:v,ref:[r,y],props:[d,m]})}),g4=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,y4=AA,Wc=(e,t)=>r=>{var i;if(t?.variants==null)return y4(e,r?.class,r?.className);const{variants:o,defaultVariants:l}=t,c=Object.keys(o).map(h=>{const m=r?.[h],y=l?.[h];if(m===null)return null;const v=g4(m)||g4(y);return o[h][v]}),f=r&&Object.entries(r).reduce((h,m)=>{let[y,v]=m;return v===void 0||(h[y]=v),h},{}),d=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((h,m)=>{let{class:y,className:v,...w}=m;return Object.entries(w).every(b=>{let[C,x]=b;return Array.isArray(x)?x.includes({...l,...f}[C]):{...l,...f}[C]===x})?[...h,y,v]:h},[]);return y4(e,c,d,r?.class,r?.className)},Wre=Wc("focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-none border border-transparent bg-clip-padding text-xs font-medium focus-visible:ring-1 aria-invalid:ring-1 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",destructive:"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-none px-2 text-xs has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-none px-2.5 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-8","icon-xs":"size-6 rounded-none [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-none","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Hv({className:e,variant:t="default",size:r="default",...i}){return N.jsx(Qre,{"data-slot":"button",className:Vn(Wre({variant:t,size:r,className:e})),...i})}const Jre=()=>{const e=Fne(),t=e?.name,r=e?.version,[,i]=YA();return N.jsx("div",{className:"flex flex-col border-b border-border bg-background",children:N.jsxs("div",{className:"flex h-14 items-center justify-between px-4",children:[N.jsxs("div",{className:"flex items-center gap-4",children:[N.jsx("button",{type:"button",className:"font-semibold cursor-pointer",onClick:()=>{i(null)},children:"Skybridge"}),N.jsx("span",{className:"h-4 w-px bg-border","aria-hidden":"true"}),N.jsxs("div",{className:"flex items-center gap-4 rounded-md border border-border bg-muted px-2 py-1",children:[N.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t}),N.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",r]})]}),N.jsxs("span",{className:"flex items-center gap-1 rounded-full bg-green-100 px-2 py-0.5 text-xs font-semibold text-green-800",children:[N.jsx("span",{className:"h-2 w-2 rounded-full bg-green-500 mr-1 inline-block"}),"Connected"]})]}),N.jsx("div",{className:"flex items-center gap-2",children:N.jsx(Hv,{variant:"ghost",size:"sm",className:"h-8 gap-2",children:N.jsxs("a",{href:"https://www.skybridge.tech/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:["Learn more about Skybridge",N.jsx(sre,{className:"h-3.5 w-3.5"})]})})})]})})},D9=j.createContext({});function eae(e){const t=j.useRef(null);return t.current===null&&(t.current=e()),t.current}const jO=typeof window<"u",tae=jO?j.useLayoutEffect:j.useEffect,DO=j.createContext(null);function NO(e,t){e.indexOf(t)===-1&&e.push(t)}function kO(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}const nc=(e,t,r)=>r>t?t:r<e?e:r;let zO=()=>{};const rc={},N9=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function k9(e){return typeof e=="object"&&e!==null}const z9=e=>/^0[^.\s]+$/u.test(e);function $O(e){let t;return()=>(t===void 0&&(t=e()),t)}const ro=e=>e,nae=(e,t)=>r=>t(e(r)),Cb=(...e)=>e.reduce(nae),Gv=(e,t,r)=>{const i=t-e;return i===0?1:(r-e)/i};class PO{constructor(){this.subscriptions=[]}add(t){return NO(this.subscriptions,t),()=>kO(this.subscriptions,t)}notify(t,r,i){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,r,i);else for(let l=0;l<o;l++){const c=this.subscriptions[l];c&&c(t,r,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const _l=e=>e*1e3,to=e=>e/1e3;function $9(e,t){return t?e*(1e3/t):0}const P9=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,rae=1e-7,aae=12;function iae(e,t,r,i,o){let l,c,f=0;do c=t+(r-t)/2,l=P9(c,i,o)-e,l>0?r=c:t=c;while(Math.abs(l)>rae&&++f<aae);return c}function Ab(e,t,r,i){if(e===t&&r===i)return ro;const o=l=>iae(l,0,1,e,r);return l=>l===0||l===1?l:P9(o(l),t,i)}const I9=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,U9=e=>t=>1-e(1-t),L9=Ab(.33,1.53,.69,.99),IO=U9(L9),q9=I9(IO),V9=e=>(e*=2)<1?.5*IO(e):.5*(2-Math.pow(2,-10*(e-1))),UO=e=>1-Math.sin(Math.acos(e)),B9=U9(UO),F9=I9(UO),sae=Ab(.42,0,1,1),oae=Ab(0,0,.58,1),H9=Ab(.42,0,.58,1),lae=e=>Array.isArray(e)&&typeof e[0]!="number",G9=e=>Array.isArray(e)&&typeof e[0]=="number",uae={linear:ro,easeIn:sae,easeInOut:H9,easeOut:oae,circIn:UO,circInOut:F9,circOut:B9,backIn:IO,backInOut:q9,backOut:L9,anticipate:V9},cae=e=>typeof e=="string",v4=e=>{if(G9(e)){zO(e.length===4);const[t,r,i,o]=e;return Ab(t,r,i,o)}else if(cae(e))return uae[e];return e},$1=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function fae(e,t){let r=new Set,i=new Set,o=!1,l=!1;const c=new WeakSet;let f={delta:0,timestamp:0,isProcessing:!1};function d(m){c.has(m)&&(h.schedule(m),e()),m(f)}const h={schedule:(m,y=!1,v=!1)=>{const b=v&&o?r:i;return y&&c.add(m),b.has(m)||b.add(m),m},cancel:m=>{i.delete(m),c.delete(m)},process:m=>{if(f=m,o){l=!0;return}o=!0,[r,i]=[i,r],r.forEach(d),r.clear(),o=!1,l&&(l=!1,h.process(m))}};return h}const dae=40;function K9(e,t){let r=!1,i=!0;const o={delta:0,timestamp:0,isProcessing:!1},l=()=>r=!0,c=$1.reduce((A,E)=>(A[E]=fae(l),A),{}),{setup:f,read:d,resolveKeyframes:h,preUpdate:m,update:y,preRender:v,render:w,postRender:b}=c,C=()=>{const A=rc.useManualTiming?o.timestamp:performance.now();r=!1,rc.useManualTiming||(o.delta=i?1e3/60:Math.max(Math.min(A-o.timestamp,dae),1)),o.timestamp=A,o.isProcessing=!0,f.process(o),d.process(o),h.process(o),m.process(o),y.process(o),v.process(o),w.process(o),b.process(o),o.isProcessing=!1,r&&t&&(i=!1,e(C))},x=()=>{r=!0,i=!0,o.isProcessing||e(C)};return{schedule:$1.reduce((A,E)=>{const O=c[E];return A[E]=(T,M=!1,D=!1)=>(r||x(),O.schedule(T,M,D)),A},{}),cancel:A=>{for(let E=0;E<$1.length;E++)c[$1[E]].cancel(A)},state:o,steps:c}}const{schedule:Ur,cancel:qc,state:li,steps:fx}=K9(typeof requestAnimationFrame<"u"?requestAnimationFrame:ro,!0);let uS;function hae(){uS=void 0}const Wi={now:()=>(uS===void 0&&Wi.set(li.isProcessing||rc.useManualTiming?li.timestamp:performance.now()),uS),set:e=>{uS=e,queueMicrotask(hae)}},Y9=e=>t=>typeof t=="string"&&t.startsWith(e),Z9=Y9("--"),pae=Y9("var(--"),LO=e=>pae(e)?mae.test(e.split("/*")[0].trim()):!1,mae=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,mm={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Kv={...mm,transform:e=>nc(0,1,e)},P1={...mm,default:1},xv=e=>Math.round(e*1e5)/1e5,qO=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function gae(e){return e==null}const yae=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,VO=(e,t)=>r=>!!(typeof r=="string"&&yae.test(r)&&r.startsWith(e)||t&&!gae(r)&&Object.prototype.hasOwnProperty.call(r,t)),X9=(e,t,r)=>i=>{if(typeof i!="string")return i;const[o,l,c,f]=i.match(qO);return{[e]:parseFloat(o),[t]:parseFloat(l),[r]:parseFloat(c),alpha:f!==void 0?parseFloat(f):1}},vae=e=>nc(0,255,e),dx={...mm,transform:e=>Math.round(vae(e))},bh={test:VO("rgb","red"),parse:X9("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:i=1})=>"rgba("+dx.transform(e)+", "+dx.transform(t)+", "+dx.transform(r)+", "+xv(Kv.transform(i))+")"};function bae(e){let t="",r="",i="",o="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),i=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),i=e.substring(3,4),o=e.substring(4,5),t+=t,r+=r,i+=i,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(i,16),alpha:o?parseInt(o,16)/255:1}}const mC={test:VO("#"),parse:bae,transform:bh.transform},Ob=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),yc=Ob("deg"),xl=Ob("%"),lt=Ob("px"),Sae=Ob("vh"),wae=Ob("vw"),b4={...xl,parse:e=>xl.parse(e)/100,transform:e=>xl.transform(e*100)},yp={test:VO("hsl","hue"),parse:X9("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:i=1})=>"hsla("+Math.round(e)+", "+xl.transform(xv(t))+", "+xl.transform(xv(r))+", "+xv(Kv.transform(i))+")"},oa={test:e=>bh.test(e)||mC.test(e)||yp.test(e),parse:e=>bh.test(e)?bh.parse(e):yp.test(e)?yp.parse(e):mC.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?bh.transform(e):yp.transform(e),getAnimatableNone:e=>{const t=oa.parse(e);return t.alpha=0,oa.transform(t)}},Eae=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function _ae(e){return isNaN(e)&&typeof e=="string"&&(e.match(qO)?.length||0)+(e.match(Eae)?.length||0)>0}const Q9="number",W9="color",xae="var",Tae="var(",S4="${}",Cae=/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 Yv(e){const t=e.toString(),r=[],i={color:[],number:[],var:[]},o=[];let l=0;const f=t.replace(Cae,d=>(oa.test(d)?(i.color.push(l),o.push(W9),r.push(oa.parse(d))):d.startsWith(Tae)?(i.var.push(l),o.push(xae),r.push(d)):(i.number.push(l),o.push(Q9),r.push(parseFloat(d))),++l,S4)).split(S4);return{values:r,split:f,indexes:i,types:o}}function J9(e){return Yv(e).values}function e8(e){const{split:t,types:r}=Yv(e),i=t.length;return o=>{let l="";for(let c=0;c<i;c++)if(l+=t[c],o[c]!==void 0){const f=r[c];f===Q9?l+=xv(o[c]):f===W9?l+=oa.transform(o[c]):l+=o[c]}return l}}const Aae=e=>typeof e=="number"?0:oa.test(e)?oa.getAnimatableNone(e):e;function Oae(e){const t=J9(e);return e8(e)(t.map(Aae))}const Vc={test:_ae,parse:J9,createTransformer:e8,getAnimatableNone:Oae};function hx(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Rae({hue:e,saturation:t,lightness:r,alpha:i}){e/=360,t/=100,r/=100;let o=0,l=0,c=0;if(!t)o=l=c=r;else{const f=r<.5?r*(1+t):r+t-r*t,d=2*r-f;o=hx(d,f,e+1/3),l=hx(d,f,e),c=hx(d,f,e-1/3)}return{red:Math.round(o*255),green:Math.round(l*255),blue:Math.round(c*255),alpha:i}}function YS(e,t){return r=>r>0?t:e}const Hr=(e,t,r)=>e+(t-e)*r,px=(e,t,r)=>{const i=e*e,o=r*(t*t-i)+i;return o<0?0:Math.sqrt(o)},Mae=[mC,bh,yp],jae=e=>Mae.find(t=>t.test(e));function w4(e){const t=jae(e);if(!t)return!1;let r=t.parse(e);return t===yp&&(r=Rae(r)),r}const E4=(e,t)=>{const r=w4(e),i=w4(t);if(!r||!i)return YS(e,t);const o={...r};return l=>(o.red=px(r.red,i.red,l),o.green=px(r.green,i.green,l),o.blue=px(r.blue,i.blue,l),o.alpha=Hr(r.alpha,i.alpha,l),bh.transform(o))},gC=new Set(["none","hidden"]);function Dae(e,t){return gC.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function Nae(e,t){return r=>Hr(e,t,r)}function BO(e){return typeof e=="number"?Nae:typeof e=="string"?LO(e)?YS:oa.test(e)?E4:$ae:Array.isArray(e)?t8:typeof e=="object"?oa.test(e)?E4:kae:YS}function t8(e,t){const r=[...e],i=r.length,o=e.map((l,c)=>BO(l)(l,t[c]));return l=>{for(let c=0;c<i;c++)r[c]=o[c](l);return r}}function kae(e,t){const r={...e,...t},i={};for(const o in r)e[o]!==void 0&&t[o]!==void 0&&(i[o]=BO(e[o])(e[o],t[o]));return o=>{for(const l in i)r[l]=i[l](o);return r}}function zae(e,t){const r=[],i={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const l=t.types[o],c=e.indexes[l][i[l]],f=e.values[c]??0;r[o]=f,i[l]++}return r}const $ae=(e,t)=>{const r=Vc.createTransformer(t),i=Yv(e),o=Yv(t);return i.indexes.var.length===o.indexes.var.length&&i.indexes.color.length===o.indexes.color.length&&i.indexes.number.length>=o.indexes.number.length?gC.has(e)&&!o.values.length||gC.has(t)&&!i.values.length?Dae(e,t):Cb(t8(zae(i,o),o.values),r):YS(e,t)};function n8(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?Hr(e,t,r):BO(e)(e,t)}const Pae=e=>{const t=({timestamp:r})=>e(r);return{start:(r=!0)=>Ur.update(t,r),stop:()=>qc(t),now:()=>li.isProcessing?li.timestamp:Wi.now()}},r8=(e,t,r=10)=>{let i="";const o=Math.max(Math.round(t/r),2);for(let l=0;l<o;l++)i+=Math.round(e(l/(o-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},ZS=2e4;function FO(e){let t=0;const r=50;let i=e.next(t);for(;!i.done&&t<ZS;)t+=r,i=e.next(t);return t>=ZS?1/0:t}function Iae(e,t=100,r){const i=r({...e,keyframes:[0,t]}),o=Math.min(FO(i),ZS);return{type:"keyframes",ease:l=>i.next(o*l).value/t,duration:to(o)}}const Uae=5;function a8(e,t,r){const i=Math.max(t-Uae,0);return $9(r-e(i),t-i)}const Qr={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},mx=.001;function Lae({duration:e=Qr.duration,bounce:t=Qr.bounce,velocity:r=Qr.velocity,mass:i=Qr.mass}){let o,l,c=1-t;c=nc(Qr.minDamping,Qr.maxDamping,c),e=nc(Qr.minDuration,Qr.maxDuration,to(e)),c<1?(o=h=>{const m=h*c,y=m*e,v=m-r,w=yC(h,c),b=Math.exp(-y);return mx-v/w*b},l=h=>{const y=h*c*e,v=y*r+r,w=Math.pow(c,2)*Math.pow(h,2)*e,b=Math.exp(-y),C=yC(Math.pow(h,2),c);return(-o(h)+mx>0?-1:1)*((v-w)*b)/C}):(o=h=>{const m=Math.exp(-h*e),y=(h-r)*e+1;return-mx+m*y},l=h=>{const m=Math.exp(-h*e),y=(r-h)*(e*e);return m*y});const f=5/e,d=Vae(o,l,f);if(e=_l(e),isNaN(d))return{stiffness:Qr.stiffness,damping:Qr.damping,duration:e};{const h=Math.pow(d,2)*i;return{stiffness:h,damping:c*2*Math.sqrt(i*h),duration:e}}}const qae=12;function Vae(e,t,r){let i=r;for(let o=1;o<qae;o++)i=i-e(i)/t(i);return i}function yC(e,t){return e*Math.sqrt(1-t*t)}const Bae=["duration","bounce"],Fae=["stiffness","damping","mass"];function _4(e,t){return t.some(r=>e[r]!==void 0)}function Hae(e){let t={velocity:Qr.velocity,stiffness:Qr.stiffness,damping:Qr.damping,mass:Qr.mass,isResolvedFromDuration:!1,...e};if(!_4(e,Fae)&&_4(e,Bae))if(e.visualDuration){const r=e.visualDuration,i=2*Math.PI/(r*1.2),o=i*i,l=2*nc(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Qr.mass,stiffness:o,damping:l}}else{const r=Lae(e);t={...t,...r,mass:Qr.mass},t.isResolvedFromDuration=!0}return t}function XS(e=Qr.visualDuration,t=Qr.bounce){const r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:o}=r;const l=r.keyframes[0],c=r.keyframes[r.keyframes.length-1],f={done:!1,value:l},{stiffness:d,damping:h,mass:m,duration:y,velocity:v,isResolvedFromDuration:w}=Hae({...r,velocity:-to(r.velocity||0)}),b=v||0,C=h/(2*Math.sqrt(d*m)),x=c-l,_=to(Math.sqrt(d/m)),S=Math.abs(x)<5;i||(i=S?Qr.restSpeed.granular:Qr.restSpeed.default),o||(o=S?Qr.restDelta.granular:Qr.restDelta.default);let A;if(C<1){const O=yC(_,C);A=T=>{const M=Math.exp(-C*_*T);return c-M*((b+C*_*x)/O*Math.sin(O*T)+x*Math.cos(O*T))}}else if(C===1)A=O=>c-Math.exp(-_*O)*(x+(b+_*x)*O);else{const O=_*Math.sqrt(C*C-1);A=T=>{const M=Math.exp(-C*_*T),D=Math.min(O*T,300);return c-M*((b+C*_*x)*Math.sinh(D)+O*x*Math.cosh(D))/O}}const E={calculatedDuration:w&&y||null,next:O=>{const T=A(O);if(w)f.done=O>=y;else{let M=O===0?b:0;C<1&&(M=O===0?_l(b):a8(A,O,T));const D=Math.abs(M)<=i,P=Math.abs(c-T)<=o;f.done=D&&P}return f.value=f.done?c:T,f},toString:()=>{const O=Math.min(FO(E),ZS),T=r8(M=>E.next(O*M).value,O,30);return O+"ms "+T},toTransition:()=>{}};return E}XS.applyToOptions=e=>{const t=Iae(e,100,XS);return e.ease=t.ease,e.duration=_l(t.duration),e.type="keyframes",e};function vC({keyframes:e,velocity:t=0,power:r=.8,timeConstant:i=325,bounceDamping:o=10,bounceStiffness:l=500,modifyTarget:c,min:f,max:d,restDelta:h=.5,restSpeed:m}){const y=e[0],v={done:!1,value:y},w=D=>f!==void 0&&D<f||d!==void 0&&D>d,b=D=>f===void 0?d:d===void 0||Math.abs(f-D)<Math.abs(d-D)?f:d;let C=r*t;const x=y+C,_=c===void 0?x:c(x);_!==x&&(C=_-y);const S=D=>-C*Math.exp(-D/i),A=D=>_+S(D),E=D=>{const P=S(D),V=A(D);v.done=Math.abs(P)<=h,v.value=v.done?_:V};let O,T;const M=D=>{w(v.value)&&(O=D,T=XS({keyframes:[v.value,b(v.value)],velocity:a8(A,D,v.value),damping:o,stiffness:l,restDelta:h,restSpeed:m}))};return M(0),{calculatedDuration:null,next:D=>{let P=!1;return!T&&O===void 0&&(P=!0,E(D),M(D)),O!==void 0&&D>=O?T.next(D-O):(!P&&E(D),v)}}}function Gae(e,t,r){const i=[],o=r||rc.mix||n8,l=e.length-1;for(let c=0;c<l;c++){let f=o(e[c],e[c+1]);if(t){const d=Array.isArray(t)?t[c]||ro:t;f=Cb(d,f)}i.push(f)}return i}function Kae(e,t,{clamp:r=!0,ease:i,mixer:o}={}){const l=e.length;if(zO(l===t.length),l===1)return()=>t[0];if(l===2&&t[0]===t[1])return()=>t[1];const c=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),t=[...t].reverse());const f=Gae(t,i,o),d=f.length,h=m=>{if(c&&m<e[0])return t[0];let y=0;if(d>1)for(;y<e.length-2&&!(m<e[y+1]);y++);const v=Gv(e[y],e[y+1],m);return f[y](v)};return r?m=>h(nc(e[0],e[l-1],m)):h}function Yae(e,t){const r=e[e.length-1];for(let i=1;i<=t;i++){const o=Gv(0,t,i);e.push(Hr(r,1,o))}}function Zae(e){const t=[0];return Yae(t,e.length-1),t}function Xae(e,t){return e.map(r=>r*t)}function Qae(e,t){return e.map(()=>t||H9).splice(0,e.length-1)}function Tv({duration:e=300,keyframes:t,times:r,ease:i="easeInOut"}){const o=lae(i)?i.map(v4):v4(i),l={done:!1,value:t[0]},c=Xae(r&&r.length===t.length?r:Zae(t),e),f=Kae(c,t,{ease:Array.isArray(o)?o:Qae(t,o)});return{calculatedDuration:e,next:d=>(l.value=f(d),l.done=d>=e,l)}}const Wae=e=>e!==null;function HO(e,{repeat:t,repeatType:r="loop"},i,o=1){const l=e.filter(Wae),f=o<0||t&&r!=="loop"&&t%2===1?0:l.length-1;return!f||i===void 0?l[f]:i}const Jae={decay:vC,inertia:vC,tween:Tv,keyframes:Tv,spring:XS};function i8(e){typeof e.type=="string"&&(e.type=Jae[e.type])}class GO{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}}const eie=e=>e/100;class KO extends GO{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:r}=this.options;r&&r.updatedAt!==Wi.now()&&this.tick(Wi.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;i8(t);const{type:r=Tv,repeat:i=0,repeatDelay:o=0,repeatType:l,velocity:c=0}=t;let{keyframes:f}=t;const d=r||Tv;d!==Tv&&typeof f[0]!="number"&&(this.mixKeyframes=Cb(eie,n8(f[0],f[1])),f=[0,100]);const h=d({...t,keyframes:f});l==="mirror"&&(this.mirroredGenerator=d({...t,keyframes:[...f].reverse(),velocity:-c})),h.calculatedDuration===null&&(h.calculatedDuration=FO(h));const{calculatedDuration:m}=h;this.calculatedDuration=m,this.resolvedDuration=m+o,this.totalDuration=this.resolvedDuration*(i+1)-o,this.generator=h}updateTime(t){const r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){const{generator:i,totalDuration:o,mixKeyframes:l,mirroredGenerator:c,resolvedDuration:f,calculatedDuration:d}=this;if(this.startTime===null)return i.next(0);const{delay:h=0,keyframes:m,repeat:y,repeatType:v,repeatDelay:w,type:b,onUpdate:C,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);const _=this.currentTime-h*(this.playbackSpeed>=0?1:-1),S=this.playbackSpeed>=0?_<0:_>o;this.currentTime=Math.max(_,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let A=this.currentTime,E=i;if(y){const D=Math.min(this.currentTime,o)/f;let P=Math.floor(D),V=D%1;!V&&D>=1&&(V=1),V===1&&P--,P=Math.min(P,y+1),P%2&&(v==="reverse"?(V=1-V,w&&(V-=w/f)):v==="mirror"&&(E=c)),A=nc(0,1,V)*f}const O=S?{done:!1,value:m[0]}:E.next(A);l&&(O.value=l(O.value));let{done:T}=O;!S&&d!==null&&(T=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return M&&b!==vC&&(O.value=HO(m,this.options,x,this.speed)),C&&C(O.value),M&&this.finish(),O}then(t,r){return this.finished.then(t,r)}get duration(){return to(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+to(t)}get time(){return to(this.currentTime)}set time(t){t=_l(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Wi.now());const r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=to(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Pae,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=r??i),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(Wi.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(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function tie(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Sh=e=>e*180/Math.PI,bC=e=>{const t=Sh(Math.atan2(e[1],e[0]));return SC(t)},nie={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:bC,rotateZ:bC,skewX:e=>Sh(Math.atan(e[1])),skewY:e=>Sh(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},SC=e=>(e=e%360,e<0&&(e+=360),e),x4=bC,T4=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),C4=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),rie={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:T4,scaleY:C4,scale:e=>(T4(e)+C4(e))/2,rotateX:e=>SC(Sh(Math.atan2(e[6],e[5]))),rotateY:e=>SC(Sh(Math.atan2(-e[2],e[0]))),rotateZ:x4,rotate:x4,skewX:e=>Sh(Math.atan(e[4])),skewY:e=>Sh(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function wC(e){return e.includes("scale")?1:0}function EC(e,t){if(!e||e==="none")return wC(t);const r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,o;if(r)i=rie,o=r;else{const f=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=nie,o=f}if(!o)return wC(t);const l=i[t],c=o[1].split(",").map(iie);return typeof l=="function"?l(c):c[l]}const aie=(e,t)=>{const{transform:r="none"}=getComputedStyle(e);return EC(r,t)};function iie(e){return parseFloat(e.trim())}const gm=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ym=new Set(gm),A4=e=>e===mm||e===lt,sie=new Set(["x","y","z"]),oie=gm.filter(e=>!sie.has(e));function lie(e){const t=[];return oie.forEach(r=>{const i=e.getValue(r);i!==void 0&&(t.push([r,i.get()]),i.set(r.startsWith("scale")?1:0))}),t}const _h={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>EC(t,"x"),y:(e,{transform:t})=>EC(t,"y")};_h.translateX=_h.x;_h.translateY=_h.y;const xh=new Set;let _C=!1,xC=!1,TC=!1;function s8(){if(xC){const e=Array.from(xh).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),r=new Map;t.forEach(i=>{const o=lie(i);o.length&&(r.set(i,o),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const o=r.get(i);o&&o.forEach(([l,c])=>{i.getValue(l)?.set(c)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}xC=!1,_C=!1,xh.forEach(e=>e.complete(TC)),xh.clear()}function o8(){xh.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(xC=!0)})}function uie(){TC=!0,o8(),s8(),TC=!1}class YO{constructor(t,r,i,o,l,c=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=i,this.motionValue=o,this.element=l,this.isAsync=c}scheduleResolve(){this.state="scheduled",this.isAsync?(xh.add(this),_C||(_C=!0,Ur.read(o8),Ur.resolveKeyframes(s8))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:r,element:i,motionValue:o}=this;if(t[0]===null){const l=o?.get(),c=t[t.length-1];if(l!==void 0)t[0]=l;else if(i&&r){const f=i.readValue(r,c);f!=null&&(t[0]=f)}t[0]===void 0&&(t[0]=c),o&&l===void 0&&o.set(t[0])}tie(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),xh.delete(this)}cancel(){this.state==="scheduled"&&(xh.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const cie=e=>e.startsWith("--");function fie(e,t,r){cie(t)?e.style.setProperty(t,r):e.style[t]=r}const die=$O(()=>window.ScrollTimeline!==void 0),hie={};function pie(e,t){const r=$O(e);return()=>hie[t]??r()}const l8=pie(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),mv=([e,t,r,i])=>`cubic-bezier(${e}, ${t}, ${r}, ${i})`,O4={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:mv([0,.65,.55,1]),circOut:mv([.55,0,1,.45]),backIn:mv([.31,.01,.66,-.59]),backOut:mv([.33,1.53,.69,.99])};function u8(e,t){if(e)return typeof e=="function"?l8()?r8(e,t):"ease-out":G9(e)?mv(e):Array.isArray(e)?e.map(r=>u8(r,t)||O4.easeOut):O4[e]}function mie(e,t,r,{delay:i=0,duration:o=300,repeat:l=0,repeatType:c="loop",ease:f="easeOut",times:d}={},h=void 0){const m={[t]:r};d&&(m.offset=d);const y=u8(f,o);Array.isArray(y)&&(m.easing=y);const v={delay:i,duration:o,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:l+1,direction:c==="reverse"?"alternate":"normal"};return h&&(v.pseudoElement=h),e.animate(m,v)}function c8(e){return typeof e=="function"&&"applyToOptions"in e}function gie({type:e,...t}){return c8(e)&&l8()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class yie extends GO{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:r,name:i,keyframes:o,pseudoElement:l,allowFlatten:c=!1,finalKeyframe:f,onComplete:d}=t;this.isPseudoElement=!!l,this.allowFlatten=c,this.options=t,zO(typeof t.type!="string");const h=gie(t);this.animation=mie(r,i,o,h,l),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const m=HO(o,this.options,f,this.speed);this.updateMotionValue?this.updateMotionValue(m):fie(r,i,m),this.animation.cancel()}d?.(),this.notifyFinished()}}play(){this.isStopped||(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:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return to(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+to(t)}get time(){return to(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=_l(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&die()?(this.animation.timeline=t,ro):r(this)}}const f8={anticipate:V9,backInOut:q9,circInOut:F9};function vie(e){return e in f8}function bie(e){typeof e.ease=="string"&&vie(e.ease)&&(e.ease=f8[e.ease])}const R4=10;class Sie extends yie{constructor(t){bie(t),i8(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:r,onUpdate:i,onComplete:o,element:l,...c}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}const f=new KO({...c,autoplay:!1}),d=_l(this.finishedTime??this.time);r.setWithVelocity(f.sample(d-R4).value,f.sample(d).value,R4),f.stop()}}const M4=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Vc.test(e)||e==="0")&&!e.startsWith("url("));function wie(e){const t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function Eie(e,t,r,i){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const l=e[e.length-1],c=M4(o,t),f=M4(l,t);return!c||!f?!1:wie(e)||(r==="spring"||c8(r))&&i}function CC(e){e.duration=0,e.type="keyframes"}const _ie=new Set(["opacity","clipPath","filter","transform"]),xie=$O(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Tie(e){const{motionValue:t,name:r,repeatDelay:i,repeatType:o,damping:l,type:c}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:h}=t.owner.getProps();return xie()&&r&&_ie.has(r)&&(r!=="transform"||!h)&&!d&&!i&&o!=="mirror"&&l!==0&&c!=="inertia"}const Cie=40;class Aie extends GO{constructor({autoplay:t=!0,delay:r=0,type:i="keyframes",repeat:o=0,repeatDelay:l=0,repeatType:c="loop",keyframes:f,name:d,motionValue:h,element:m,...y}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Wi.now();const v={autoplay:t,delay:r,type:i,repeat:o,repeatDelay:l,repeatType:c,name:d,motionValue:h,element:m,...y},w=m?.KeyframeResolver||YO;this.keyframeResolver=new w(f,(b,C,x)=>this.onKeyframesResolved(b,C,v,!x),d,h,m),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,r,i,o){this.keyframeResolver=void 0;const{name:l,type:c,velocity:f,delay:d,isHandoff:h,onUpdate:m}=i;this.resolvedAt=Wi.now(),Eie(t,l,c,f)||((rc.instantAnimations||!d)&&m?.(HO(t,i,r)),t[0]=t[t.length-1],CC(i),i.repeat=0);const v={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>Cie?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...i,keyframes:t},w=!h&&Tie(v)?new Sie({...v,element:v.motionValue.owner.current}):new KO(v);w.finished.then(()=>this.notifyFinished()).catch(ro),this.pendingTimeline&&(this.stopTimeline=w.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=w}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),uie()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Oie=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Rie(e){const t=Oie.exec(e);if(!t)return[,];const[,r,i,o]=t;return[`--${r??i}`,o]}function d8(e,t,r=1){const[i,o]=Rie(e);if(!i)return;const l=window.getComputedStyle(t).getPropertyValue(i);if(l){const c=l.trim();return N9(c)?parseFloat(c):c}return LO(o)?d8(o,t,r+1):o}function ZO(e,t){return e?.[t]??e?.default??e}const h8=new Set(["width","height","top","left","right","bottom",...gm]),Mie={test:e=>e==="auto",parse:e=>e},p8=e=>t=>t.test(e),m8=[mm,lt,xl,yc,wae,Sae,Mie],j4=e=>m8.find(p8(e));function jie(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||z9(e):!0}const Die=new Set(["brightness","contrast","saturate","opacity"]);function Nie(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=r.match(qO)||[];if(!i)return e;const o=r.replace(i,"");let l=Die.has(t)?1:0;return i!==r&&(l*=100),t+"("+l+o+")"}const kie=/\b([a-z-]*)\(.*?\)/gu,AC={...Vc,getAnimatableNone:e=>{const t=e.match(kie);return t?t.map(Nie).join(" "):e}},D4={...mm,transform:Math.round},zie={rotate:yc,rotateX:yc,rotateY:yc,rotateZ:yc,scale:P1,scaleX:P1,scaleY:P1,scaleZ:P1,skew:yc,skewX:yc,skewY:yc,distance:lt,translateX:lt,translateY:lt,translateZ:lt,x:lt,y:lt,z:lt,perspective:lt,transformPerspective:lt,opacity:Kv,originX:b4,originY:b4,originZ:lt},XO={borderWidth:lt,borderTopWidth:lt,borderRightWidth:lt,borderBottomWidth:lt,borderLeftWidth:lt,borderRadius:lt,radius:lt,borderTopLeftRadius:lt,borderTopRightRadius:lt,borderBottomRightRadius:lt,borderBottomLeftRadius:lt,width:lt,maxWidth:lt,height:lt,maxHeight:lt,top:lt,right:lt,bottom:lt,left:lt,inset:lt,insetBlock:lt,insetBlockStart:lt,insetBlockEnd:lt,insetInline:lt,insetInlineStart:lt,insetInlineEnd:lt,padding:lt,paddingTop:lt,paddingRight:lt,paddingBottom:lt,paddingLeft:lt,paddingBlock:lt,paddingBlockStart:lt,paddingBlockEnd:lt,paddingInline:lt,paddingInlineStart:lt,paddingInlineEnd:lt,margin:lt,marginTop:lt,marginRight:lt,marginBottom:lt,marginLeft:lt,marginBlock:lt,marginBlockStart:lt,marginBlockEnd:lt,marginInline:lt,marginInlineStart:lt,marginInlineEnd:lt,backgroundPositionX:lt,backgroundPositionY:lt,...zie,zIndex:D4,fillOpacity:Kv,strokeOpacity:Kv,numOctaves:D4},$ie={...XO,color:oa,backgroundColor:oa,outlineColor:oa,fill:oa,stroke:oa,borderColor:oa,borderTopColor:oa,borderRightColor:oa,borderBottomColor:oa,borderLeftColor:oa,filter:AC,WebkitFilter:AC},g8=e=>$ie[e];function y8(e,t){let r=g8(e);return r!==AC&&(r=Vc),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const Pie=new Set(["auto","none","0"]);function Iie(e,t,r){let i=0,o;for(;i<e.length&&!o;){const l=e[i];typeof l=="string"&&!Pie.has(l)&&Yv(l).values.length&&(o=e[i]),i++}if(o&&r)for(const l of t)e[l]=y8(r,o)}class Uie extends YO{constructor(t,r,i,o,l){super(t,r,i,o,l,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:r,name:i}=this;if(!r||!r.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let h=t[d];if(typeof h=="string"&&(h=h.trim(),LO(h))){const m=d8(h,r.current);m!==void 0&&(t[d]=m),d===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!h8.has(i)||t.length!==2)return;const[o,l]=t,c=j4(o),f=j4(l);if(c!==f)if(A4(c)&&A4(f))for(let d=0;d<t.length;d++){const h=t[d];typeof h=="string"&&(t[d]=parseFloat(h))}else _h[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:r}=this,i=[];for(let o=0;o<t.length;o++)(t[o]===null||jie(t[o]))&&i.push(o);i.length&&Iie(t,i,r)}measureInitialState(){const{element:t,unresolvedKeyframes:r,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=_h[i](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;const o=r[r.length-1];o!==void 0&&t.getValue(i,o).jump(o,!1)}measureEndState(){const{element:t,name:r,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const o=t.getValue(r);o&&o.jump(this.measuredOrigin,!1);const l=i.length-1,c=i[l];i[l]=_h[r](t.measureViewportBox(),window.getComputedStyle(t.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),this.removedTransforms?.length&&this.removedTransforms.forEach(([f,d])=>{t.getValue(f).set(d)}),this.resolveNoneKeyframes()}}function Lie(e,t,r){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const o=r?.[e]??i.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}const v8=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function qie(e){return k9(e)&&"offsetHeight"in e}const N4=30,Vie=e=>!isNaN(parseFloat(e));class Bie{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const o=Wi.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=Wi.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Vie(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new PO);const i=this.events[t].add(r);return t==="change"?()=>{i(),Ur.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,i){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Wi.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>N4)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,N4);return $9(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),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 Hp(e,t){return new Bie(e,t)}const{schedule:QO}=K9(queueMicrotask,!1),rl={x:!1,y:!1};function b8(){return rl.x||rl.y}function Fie(e){return e==="x"||e==="y"?rl[e]?null:(rl[e]=!0,()=>{rl[e]=!1}):rl.x||rl.y?null:(rl.x=rl.y=!0,()=>{rl.x=rl.y=!1})}function S8(e,t){const r=Lie(e),i=new AbortController,o={passive:!0,...t,signal:i.signal};return[r,o,()=>i.abort()]}function k4(e){return!(e.pointerType==="touch"||b8())}function Hie(e,t,r={}){const[i,o,l]=S8(e,r),c=f=>{if(!k4(f))return;const{target:d}=f,h=t(d,f);if(typeof h!="function"||!d)return;const m=y=>{k4(y)&&(h(y),d.removeEventListener("pointerleave",m))};d.addEventListener("pointerleave",m,o)};return i.forEach(f=>{f.addEventListener("pointerenter",c,o)}),l}const w8=(e,t)=>t?e===t?!0:w8(e,t.parentElement):!1,WO=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Gie=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Kie(e){return Gie.has(e.tagName)||e.tabIndex!==-1}const cS=new WeakSet;function z4(e){return t=>{t.key==="Enter"&&e(t)}}function gx(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Yie=(e,t)=>{const r=e.currentTarget;if(!r)return;const i=z4(()=>{if(cS.has(r))return;gx(r,"down");const o=z4(()=>{gx(r,"up")}),l=()=>gx(r,"cancel");r.addEventListener("keyup",o,t),r.addEventListener("blur",l,t)});r.addEventListener("keydown",i,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",i),t)};function $4(e){return WO(e)&&!b8()}function Zie(e,t,r={}){const[i,o,l]=S8(e,r),c=f=>{const d=f.currentTarget;if(!$4(f))return;cS.add(d);const h=t(d,f),m=(w,b)=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",v),cS.has(d)&&cS.delete(d),$4(w)&&typeof h=="function"&&h(w,{success:b})},y=w=>{m(w,d===window||d===document||r.useGlobalTarget||w8(d,w.target))},v=w=>{m(w,!1)};window.addEventListener("pointerup",y,o),window.addEventListener("pointercancel",v,o)};return i.forEach(f=>{(r.useGlobalTarget?window:f).addEventListener("pointerdown",c,o),qie(f)&&(f.addEventListener("focus",h=>Yie(h,o)),!Kie(f)&&!f.hasAttribute("tabindex")&&(f.tabIndex=0))}),l}function E8(e){return k9(e)&&"ownerSVGElement"in e}function Xie(e){return E8(e)&&e.tagName==="svg"}const xi=e=>!!(e&&e.getVelocity),Qie=[...m8,oa,Vc],Wie=e=>Qie.find(p8(e)),_8=j.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Jie(e=!0){const t=j.useContext(DO);if(t===null)return[!0,null];const{isPresent:r,onExitComplete:i,register:o}=t,l=j.useId();j.useEffect(()=>{if(e)return o(l)},[e]);const c=j.useCallback(()=>e&&i&&i(l),[l,i,e]);return!r&&i?[!1,c]:[!0]}const x8=j.createContext({strict:!1}),P4={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Gp={};for(const e in P4)Gp[e]={isEnabled:t=>P4[e].some(r=>!!t[r])};function ese(e){for(const t in e)Gp[t]={...Gp[t],...e[t]}}const tse=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function QS(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||tse.has(e)}let T8=e=>!QS(e);function nse(e){typeof e=="function"&&(T8=t=>t.startsWith("on")?!QS(t):e(t))}try{nse(require("@emotion/is-prop-valid").default)}catch{}function rse(e,t,r){const i={};for(const o in e)o==="values"&&typeof e.values=="object"||(T8(o)||r===!0&&QS(o)||!t&&!QS(o)||e.draggable&&o.startsWith("onDrag"))&&(i[o]=e[o]);return i}const W2=j.createContext({});function J2(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Zv(e){return typeof e=="string"||Array.isArray(e)}const JO=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],eR=["initial",...JO];function ew(e){return J2(e.animate)||eR.some(t=>Zv(e[t]))}function C8(e){return!!(ew(e)||e.variants)}function ase(e,t){if(ew(e)){const{initial:r,animate:i}=e;return{initial:r===!1||Zv(r)?r:void 0,animate:Zv(i)?i:void 0}}return e.inherit!==!1?t:{}}function ise(e){const{initial:t,animate:r}=ase(e,j.useContext(W2));return j.useMemo(()=>({initial:t,animate:r}),[I4(t),I4(r)])}function I4(e){return Array.isArray(e)?e.join(" "):e}function U4(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const rv={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(lt.test(e))e=parseFloat(e);else return e;const r=U4(e,t.target.x),i=U4(e,t.target.y);return`${r}% ${i}%`}},sse={correct:(e,{treeScale:t,projectionDelta:r})=>{const i=e,o=Vc.parse(e);if(o.length>5)return i;const l=Vc.createTransformer(e),c=typeof o[0]!="number"?1:0,f=r.x.scale*t.x,d=r.y.scale*t.y;o[0+c]/=f,o[1+c]/=d;const h=Hr(f,d,.5);return typeof o[2+c]=="number"&&(o[2+c]/=h),typeof o[3+c]=="number"&&(o[3+c]/=h),l(o)}},OC={borderRadius:{...rv,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:rv,borderTopRightRadius:rv,borderBottomLeftRadius:rv,borderBottomRightRadius:rv,boxShadow:sse};function A8(e,{layout:t,layoutId:r}){return ym.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!OC[e]||e==="opacity")}const ose={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},lse=gm.length;function use(e,t,r){let i="",o=!0;for(let l=0;l<lse;l++){const c=gm[l],f=e[c];if(f===void 0)continue;let d=!0;if(typeof f=="number"?d=f===(c.startsWith("scale")?1:0):d=parseFloat(f)===0,!d||r){const h=v8(f,XO[c]);if(!d){o=!1;const m=ose[c]||c;i+=`${m}(${h}) `}r&&(t[c]=h)}}return i=i.trim(),r?i=r(t,o?"":i):o&&(i="none"),i}function tR(e,t,r){const{style:i,vars:o,transformOrigin:l}=e;let c=!1,f=!1;for(const d in t){const h=t[d];if(ym.has(d)){c=!0;continue}else if(Z9(d)){o[d]=h;continue}else{const m=v8(h,XO[d]);d.startsWith("origin")?(f=!0,l[d]=m):i[d]=m}}if(t.transform||(c||r?i.transform=use(t,e.transform,r):i.transform&&(i.transform="none")),f){const{originX:d="50%",originY:h="50%",originZ:m=0}=l;i.transformOrigin=`${d} ${h} ${m}`}}const nR=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function O8(e,t,r){for(const i in t)!xi(t[i])&&!A8(i,r)&&(e[i]=t[i])}function cse({transformTemplate:e},t){return j.useMemo(()=>{const r=nR();return tR(r,t,e),Object.assign({},r.vars,r.style)},[t])}function fse(e,t){const r=e.style||{},i={};return O8(i,r,e),Object.assign(i,cse(e,t)),i}function dse(e,t){const r={},i=fse(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const hse={offset:"stroke-dashoffset",array:"stroke-dasharray"},pse={offset:"strokeDashoffset",array:"strokeDasharray"};function mse(e,t,r=1,i=0,o=!0){e.pathLength=1;const l=o?hse:pse;e[l.offset]=lt.transform(-i);const c=lt.transform(t),f=lt.transform(r);e[l.array]=`${c} ${f}`}const gse=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function R8(e,{attrX:t,attrY:r,attrScale:i,pathLength:o,pathSpacing:l=1,pathOffset:c=0,...f},d,h,m){if(tR(e,f,h),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:y,style:v}=e;y.transform&&(v.transform=y.transform,delete y.transform),(v.transform||y.transformOrigin)&&(v.transformOrigin=y.transformOrigin??"50% 50%",delete y.transformOrigin),v.transform&&(v.transformBox=m?.transformBox??"fill-box",delete y.transformBox);for(const w of gse)y[w]!==void 0&&(v[w]=y[w],delete y[w]);t!==void 0&&(y.x=t),r!==void 0&&(y.y=r),i!==void 0&&(y.scale=i),o!==void 0&&mse(y,o,l,c,!1)}const M8=()=>({...nR(),attrs:{}}),j8=e=>typeof e=="string"&&e.toLowerCase()==="svg";function yse(e,t,r,i){const o=j.useMemo(()=>{const l=M8();return R8(l,t,j8(i),e.transformTemplate,e.style),{...l.attrs,style:{...l.style}}},[t]);if(e.style){const l={};O8(l,e.style,e),o.style={...l,...o.style}}return o}const vse=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function rR(e){return typeof e!="string"||e.includes("-")?!1:!!(vse.indexOf(e)>-1||/[A-Z]/u.test(e))}function bse(e,t,r,{latestValues:i},o,l=!1,c){const d=(c??rR(e)?yse:dse)(t,i,o,e),h=rse(t,typeof e=="string",l),m=e!==j.Fragment?{...h,...d,ref:r}:{},{children:y}=t,v=j.useMemo(()=>xi(y)?y.get():y,[y]);return j.createElement(e,{...m,children:v})}function L4(e){const t=[{},{}];return e?.values.forEach((r,i)=>{t[0][i]=r.get(),t[1][i]=r.getVelocity()}),t}function aR(e,t,r,i){if(typeof t=="function"){const[o,l]=L4(i);t=t(r!==void 0?r:e.custom,o,l)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,l]=L4(i);t=t(r!==void 0?r:e.custom,o,l)}return t}function fS(e){return xi(e)?e.get():e}function Sse({scrapeMotionValuesFromProps:e,createRenderState:t},r,i,o){return{latestValues:wse(r,i,o,e),renderState:t()}}function wse(e,t,r,i){const o={},l=i(e,{});for(const v in l)o[v]=fS(l[v]);let{initial:c,animate:f}=e;const d=ew(e),h=C8(e);t&&h&&!d&&e.inherit!==!1&&(c===void 0&&(c=t.initial),f===void 0&&(f=t.animate));let m=r?r.initial===!1:!1;m=m||c===!1;const y=m?f:c;if(y&&typeof y!="boolean"&&!J2(y)){const v=Array.isArray(y)?y:[y];for(let w=0;w<v.length;w++){const b=aR(e,v[w]);if(b){const{transitionEnd:C,transition:x,..._}=b;for(const S in _){let A=_[S];if(Array.isArray(A)){const E=m?A.length-1:0;A=A[E]}A!==null&&(o[S]=A)}for(const S in C)o[S]=C[S]}}}return o}const D8=e=>(t,r)=>{const i=j.useContext(W2),o=j.useContext(DO),l=()=>Sse(e,t,i,o);return r?l():eae(l)};function iR(e,t,r){const{style:i}=e,o={};for(const l in i)(xi(i[l])||t.style&&xi(t.style[l])||A8(l,e)||r?.getValue(l)?.liveStyle!==void 0)&&(o[l]=i[l]);return o}const Ese=D8({scrapeMotionValuesFromProps:iR,createRenderState:nR});function N8(e,t,r){const i=iR(e,t,r);for(const o in e)if(xi(e[o])||xi(t[o])){const l=gm.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;i[l]=e[o]}return i}const _se=D8({scrapeMotionValuesFromProps:N8,createRenderState:M8}),xse=Symbol.for("motionComponentSymbol");function vp(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function q4(e,t){if(typeof e=="function")return e(t);vp(e)&&(e.current=t)}function Tse(e,t,r){const i=j.useRef(null);return j.useCallback(o=>{if(o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),r)if(o){const l=q4(r,o);typeof l=="function"&&(i.current=l)}else i.current?(i.current(),i.current=null):q4(r,o)},[t,e,r])}const sR=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Cse="framerAppearId",k8="data-"+sR(Cse),z8=j.createContext({});function Ase(e,t,r,i,o,l){const{visualElement:c}=j.useContext(W2),f=j.useContext(x8),d=j.useContext(DO),h=j.useContext(_8).reducedMotion,m=j.useRef(null);i=i||f.renderer,!m.current&&i&&(m.current=i(e,{visualState:t,parent:c,props:r,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:h,isSVG:l}));const y=m.current,v=j.useContext(z8);y&&!y.projection&&o&&(y.type==="html"||y.type==="svg")&&Ose(m.current,r,o,v);const w=j.useRef(!1);j.useInsertionEffect(()=>{y&&w.current&&y.update(r,d)});const b=r[k8],C=j.useRef(!!b&&!window.MotionHandoffIsComplete?.(b)&&window.MotionHasOptimisedAnimation?.(b));return tae(()=>{y&&(w.current=!0,window.MotionIsMounted=!0,y.updateFeatures(),y.scheduleRenderMicrotask(),C.current&&y.animationState&&y.animationState.animateChanges())}),j.useEffect(()=>{y&&(!C.current&&y.animationState&&y.animationState.animateChanges(),C.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(b)}),C.current=!1),y.enteringChildren=void 0)}),y}function Ose(e,t,r,i){const{layoutId:o,layout:l,drag:c,dragConstraints:f,layoutScroll:d,layoutRoot:h,layoutCrossfade:m}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:$8(e.parent)),e.projection.setOptions({layoutId:o,layout:l,alwaysMeasureLayout:!!c||f&&vp(f),visualElement:e,animationType:typeof l=="string"?l:"both",initialPromotionConfig:i,crossfade:m,layoutScroll:d,layoutRoot:h})}function $8(e){if(e)return e.options.allowProjection!==!1?e.projection:$8(e.parent)}function yx(e,{forwardMotionProps:t=!1,type:r}={},i,o){i&&ese(i);const l=r?r==="svg":rR(e),c=l?_se:Ese;function f(h,m){let y;const v={...j.useContext(_8),...h,layoutId:Rse(h)},{isStatic:w}=v,b=ise(h),C=c(h,w);if(!w&&jO){Mse();const x=jse(v);y=x.MeasureLayout,b.visualElement=Ase(e,C,v,o,x.ProjectionNode,l)}return N.jsxs(W2.Provider,{value:b,children:[y&&b.visualElement?N.jsx(y,{visualElement:b.visualElement,...v}):null,bse(e,h,Tse(C,b.visualElement,m),C,w,t,l)]})}f.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const d=j.forwardRef(f);return d[xse]=e,d}function Rse({layoutId:e}){const t=j.useContext(D9).id;return t&&e!==void 0?t+"-"+e:e}function Mse(e,t){j.useContext(x8).strict}function jse(e){const{drag:t,layout:r}=Gp;if(!t&&!r)return{};const i={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Dse(e,t){if(typeof Proxy>"u")return yx;const r=new Map,i=(l,c)=>yx(l,c,e,t),o=(l,c)=>i(l,c);return new Proxy(o,{get:(l,c)=>c==="create"?i:(r.has(c)||r.set(c,yx(c,void 0,e,t)),r.get(c))})}function P8({top:e,left:t,right:r,bottom:i}){return{x:{min:t,max:r},y:{min:e,max:i}}}function Nse({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function kse(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:i.y,right:i.x}}function vx(e){return e===void 0||e===1}function RC({scale:e,scaleX:t,scaleY:r}){return!vx(e)||!vx(t)||!vx(r)}function mh(e){return RC(e)||I8(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function I8(e){return V4(e.x)||V4(e.y)}function V4(e){return e&&e!=="0%"}function WS(e,t,r){const i=e-r,o=t*i;return r+o}function B4(e,t,r,i,o){return o!==void 0&&(e=WS(e,o,i)),WS(e,r,i)+t}function MC(e,t=0,r=1,i,o){e.min=B4(e.min,t,r,i,o),e.max=B4(e.max,t,r,i,o)}function U8(e,{x:t,y:r}){MC(e.x,t.translate,t.scale,t.originPoint),MC(e.y,r.translate,r.scale,r.originPoint)}const F4=.999999999999,H4=1.0000000000001;function zse(e,t,r,i=!1){const o=r.length;if(!o)return;t.x=t.y=1;let l,c;for(let f=0;f<o;f++){l=r[f],c=l.projectionDelta;const{visualElement:d}=l.options;d&&d.props.style&&d.props.style.display==="contents"||(i&&l.options.layoutScroll&&l.scroll&&l!==l.root&&Sp(e,{x:-l.scroll.offset.x,y:-l.scroll.offset.y}),c&&(t.x*=c.x.scale,t.y*=c.y.scale,U8(e,c)),i&&mh(l.latestValues)&&Sp(e,l.latestValues))}t.x<H4&&t.x>F4&&(t.x=1),t.y<H4&&t.y>F4&&(t.y=1)}function bp(e,t){e.min=e.min+t,e.max=e.max+t}function G4(e,t,r,i,o=.5){const l=Hr(e.min,e.max,o);MC(e,t,r,l,i)}function Sp(e,t){G4(e.x,t.x,t.scaleX,t.scale,t.originX),G4(e.y,t.y,t.scaleY,t.scale,t.originY)}function L8(e,t){return P8(kse(e.getBoundingClientRect(),t))}function $se(e,t,r){const i=L8(e,r),{scroll:o}=t;return o&&(bp(i.x,o.offset.x),bp(i.y,o.offset.y)),i}const K4=()=>({translate:0,scale:1,origin:0,originPoint:0}),wp=()=>({x:K4(),y:K4()}),Y4=()=>({min:0,max:0}),Oa=()=>({x:Y4(),y:Y4()}),jC={current:null},q8={current:!1};function Pse(){if(q8.current=!0,!!jO)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>jC.current=e.matches;e.addEventListener("change",t),t()}else jC.current=!1}const Ise=new WeakMap;function Use(e,t,r){for(const i in t){const o=t[i],l=r[i];if(xi(o))e.addValue(i,o);else if(xi(l))e.addValue(i,Hp(o,{owner:e}));else if(l!==o)if(e.hasValue(i)){const c=e.getValue(i);c.liveStyle===!0?c.jump(o):c.hasAnimated||c.set(o)}else{const c=e.getStaticValue(i);e.addValue(i,Hp(c!==void 0?c:o,{owner:e}))}}for(const i in r)t[i]===void 0&&e.removeValue(i);return t}const Z4=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Lse{scrapeMotionValuesFromProps(t,r,i){return{}}constructor({parent:t,props:r,presenceContext:i,reducedMotionConfig:o,blockInitialAnimation:l,visualState:c},f={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=YO,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const v=Wi.now();this.renderScheduledAt<v&&(this.renderScheduledAt=v,Ur.render(this.render,!1,!0))};const{latestValues:d,renderState:h}=c;this.latestValues=d,this.baseTarget={...d},this.initialValues=r.initial?{...d}:{},this.renderState=h,this.parent=t,this.props=r,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=f,this.blockInitialAnimation=!!l,this.isControllingVariants=ew(r),this.isVariantNode=C8(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:m,...y}=this.scrapeMotionValuesFromProps(r,{},this);for(const v in y){const w=y[v];d[v]!==void 0&&xi(w)&&w.set(d[v])}}mount(t){this.current=t,Ise.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),q8.current||Pse(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:jC.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),qc(this.notifyUpdate),qc(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const r=this.features[t];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const i=ym.has(t);i&&this.onBindTransform&&this.onBindTransform();const o=r.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&Ur.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let l;window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{o(),l&&l(),r.owner&&r.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Gp){const r=Gp[t];if(!r)continue;const{isEnabled:i,Feature:o}=r;if(!this.features[t]&&o&&i(this.props)&&(this.features[t]=new o(this)),this.features[t]){const l=this.features[t];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Oa()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let i=0;i<Z4.length;i++){const o=Z4[i];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const l="on"+o,c=t[l];c&&(this.propEventSubscriptions[o]=this.on(o,c))}this.prevMotionValues=Use(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]: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(t){const r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){const i=this.values.get(t);r!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return i===void 0&&r!==void 0&&(i=Hp(r===null?void 0:r,{owner:this}),this.addValue(t,i)),i}readValue(t,r){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(N9(i)||z9(i))?i=parseFloat(i):!Wie(i)&&Vc.test(r)&&(i=y8(t,r)),this.setBaseTarget(t,xi(i)?i.get():i)),xi(i)?i.get():i}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const l=aR(this.props,r,this.presenceContext?.custom);l&&(i=l[t])}if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!xi(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new PO),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){QO.render(this.render)}}class V8 extends Lse{constructor(){super(...arguments),this.KeyframeResolver=Uie}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:i}){delete r[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;xi(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}function B8(e,{style:t,vars:r},i,o){const l=e.style;let c;for(c in t)l[c]=t[c];o?.applyProjectionStyles(l,i);for(c in r)l.setProperty(c,r[c])}function qse(e){return window.getComputedStyle(e)}class Vse extends V8{constructor(){super(...arguments),this.type="html",this.renderInstance=B8}readValueFromInstance(t,r){if(ym.has(r))return this.projection?.isProjecting?wC(r):aie(t,r);{const i=qse(t),o=(Z9(r)?i.getPropertyValue(r):i[r])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:r}){return L8(t,r)}build(t,r,i){tR(t,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,r,i){return iR(t,r,i)}}const F8=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Bse(e,t,r,i){B8(e,t,void 0,i);for(const o in t.attrs)e.setAttribute(F8.has(o)?o:sR(o),t.attrs[o])}class Fse extends V8{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Oa}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(ym.has(r)){const i=g8(r);return i&&i.default||0}return r=F8.has(r)?r:sR(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,i){return N8(t,r,i)}build(t,r,i){R8(t,r,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,r,i,o){Bse(t,r,i,o)}mount(t){this.isSVGTag=j8(t.tagName),super.mount(t)}}const Hse=(e,t)=>t.isSVG??rR(e)?new Fse(t):new Vse(t,{allowProjection:e!==j.Fragment});function Op(e,t,r){const i=e.getProps();return aR(i,t,r!==void 0?r:i.custom,e)}const DC=e=>Array.isArray(e);function Gse(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,Hp(r))}function Kse(e){return DC(e)?e[e.length-1]||0:e}function Yse(e,t){const r=Op(e,t);let{transitionEnd:i={},transition:o={},...l}=r||{};l={...l,...i};for(const c in l){const f=Kse(l[c]);Gse(e,c,f)}}function Zse(e){return!!(xi(e)&&e.add)}function NC(e,t){const r=e.getValue("willChange");if(Zse(r))return r.add(t);if(!r&&rc.WillChange){const i=new rc.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function H8(e){return e.props[k8]}const Xse=e=>e!==null;function Qse(e,{repeat:t,repeatType:r="loop"},i){const o=e.filter(Xse),l=t&&r!=="loop"&&t%2===1?0:o.length-1;return o[l]}const Wse={type:"spring",stiffness:500,damping:25,restSpeed:10},Jse=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),eoe={type:"keyframes",duration:.8},toe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},noe=(e,{keyframes:t})=>t.length>2?eoe:ym.has(e)?e.startsWith("scale")?Jse(t[1]):Wse:toe;function roe({when:e,delay:t,delayChildren:r,staggerChildren:i,staggerDirection:o,repeat:l,repeatType:c,repeatDelay:f,from:d,elapsed:h,...m}){return!!Object.keys(m).length}const oR=(e,t,r,i={},o,l)=>c=>{const f=ZO(i,e)||{},d=f.delay||i.delay||0;let{elapsed:h=0}=i;h=h-_l(d);const m={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...f,delay:-h,onUpdate:v=>{t.set(v),f.onUpdate&&f.onUpdate(v)},onComplete:()=>{c(),f.onComplete&&f.onComplete()},name:e,motionValue:t,element:l?void 0:o};roe(f)||Object.assign(m,noe(e,m)),m.duration&&(m.duration=_l(m.duration)),m.repeatDelay&&(m.repeatDelay=_l(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let y=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(CC(m),m.delay===0&&(y=!0)),(rc.instantAnimations||rc.skipAnimations)&&(y=!0,CC(m),m.delay=0),m.allowFlatten=!f.type&&!f.ease,y&&!l&&t.get()!==void 0){const v=Qse(m.keyframes,f);if(v!==void 0){Ur.update(()=>{m.onUpdate(v),m.onComplete()});return}}return f.isSync?new KO(m):new Aie(m)};function aoe({protectedKeys:e,needsAnimating:t},r){const i=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,i}function G8(e,t,{delay:r=0,transitionOverride:i,type:o}={}){let{transition:l=e.getDefaultTransition(),transitionEnd:c,...f}=t;i&&(l=i);const d=[],h=o&&e.animationState&&e.animationState.getState()[o];for(const m in f){const y=e.getValue(m,e.latestValues[m]??null),v=f[m];if(v===void 0||h&&aoe(h,m))continue;const w={delay:r,...ZO(l||{},m)},b=y.get();if(b!==void 0&&!y.isAnimating&&!Array.isArray(v)&&v===b&&!w.velocity)continue;let C=!1;if(window.MotionHandoffAnimation){const _=H8(e);if(_){const S=window.MotionHandoffAnimation(_,m,Ur);S!==null&&(w.startTime=S,C=!0)}}NC(e,m),y.start(oR(m,y,v,e.shouldReduceMotion&&h8.has(m)?{type:!1}:w,e,C));const x=y.animation;x&&d.push(x)}return c&&Promise.all(d).then(()=>{Ur.update(()=>{c&&Yse(e,c)})}),d}function K8(e,t,r,i=0,o=1){const l=Array.from(e).sort((h,m)=>h.sortNodePosition(m)).indexOf(t),c=e.size,f=(c-1)*i;return typeof r=="function"?r(l,c):o===1?l*i:f-l*i}function kC(e,t,r={}){const i=Op(e,t,r.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};r.transitionOverride&&(o=r.transitionOverride);const l=i?()=>Promise.all(G8(e,i,r)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:h=0,staggerChildren:m,staggerDirection:y}=o;return ioe(e,t,d,h,m,y,r)}:()=>Promise.resolve(),{when:f}=o;if(f){const[d,h]=f==="beforeChildren"?[l,c]:[c,l];return d().then(()=>h())}else return Promise.all([l(),c(r.delay)])}function ioe(e,t,r=0,i=0,o=0,l=1,c){const f=[];for(const d of e.variantChildren)d.notify("AnimationStart",t),f.push(kC(d,t,{...c,delay:r+(typeof i=="function"?0:i)+K8(e.variantChildren,d,i,o,l)}).then(()=>d.notify("AnimationComplete",t)));return Promise.all(f)}function soe(e,t,r={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const o=t.map(l=>kC(e,l,r));i=Promise.all(o)}else if(typeof t=="string")i=kC(e,t,r);else{const o=typeof t=="function"?Op(e,t,r.custom):t;i=Promise.all(G8(e,o,r))}return i.then(()=>{e.notify("AnimationComplete",t)})}function Y8(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let i=0;i<r;i++)if(t[i]!==e[i])return!1;return!0}const ooe=eR.length;function Z8(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?Z8(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const t={};for(let r=0;r<ooe;r++){const i=eR[r],o=e.props[i];(Zv(o)||o===!1)&&(t[i]=o)}return t}const loe=[...JO].reverse(),uoe=JO.length;function coe(e){return t=>Promise.all(t.map(({animation:r,options:i})=>soe(e,r,i)))}function foe(e){let t=coe(e),r=X4(),i=!0;const o=d=>(h,m)=>{const y=Op(e,m,d==="exit"?e.presenceContext?.custom:void 0);if(y){const{transition:v,transitionEnd:w,...b}=y;h={...h,...b,...w}}return h};function l(d){t=d(e)}function c(d){const{props:h}=e,m=Z8(e.parent)||{},y=[],v=new Set;let w={},b=1/0;for(let x=0;x<uoe;x++){const _=loe[x],S=r[_],A=h[_]!==void 0?h[_]:m[_],E=Zv(A),O=_===d?S.isActive:null;O===!1&&(b=x);let T=A===m[_]&&A!==h[_]&&E;if(T&&i&&e.manuallyAnimateOnMount&&(T=!1),S.protectedKeys={...w},!S.isActive&&O===null||!A&&!S.prevProp||J2(A)||typeof A=="boolean")continue;const M=doe(S.prevProp,A);let D=M||_===d&&S.isActive&&!T&&E||x>b&&E,P=!1;const V=Array.isArray(A)?A:[A];let q=V.reduce(o(_),{});O===!1&&(q={});const{prevResolvedValues:Y={}}=S,W={...Y,...q},ie=G=>{D=!0,v.has(G)&&(P=!0,v.delete(G)),S.needsAnimating[G]=!0;const J=e.getValue(G);J&&(J.liveStyle=!1)};for(const G in W){const J=q[G],he=Y[G];if(w.hasOwnProperty(G))continue;let ue=!1;DC(J)&&DC(he)?ue=!Y8(J,he):ue=J!==he,ue?J!=null?ie(G):v.add(G):J!==void 0&&v.has(G)?ie(G):S.protectedKeys[G]=!0}S.prevProp=A,S.prevResolvedValues=q,S.isActive&&(w={...w,...q}),i&&e.blockInitialAnimation&&(D=!1);const ae=T&&M;D&&(!ae||P)&&y.push(...V.map(G=>{const J={type:_};if(typeof G=="string"&&i&&!ae&&e.manuallyAnimateOnMount&&e.parent){const{parent:he}=e,ue=Op(he,G);if(he.enteringChildren&&ue){const{delayChildren:z}=ue.transition||{};J.delay=K8(he.enteringChildren,e,z)}}return{animation:G,options:J}}))}if(v.size){const x={};if(typeof h.initial!="boolean"){const _=Op(e,Array.isArray(h.initial)?h.initial[0]:h.initial);_&&_.transition&&(x.transition=_.transition)}v.forEach(_=>{const S=e.getBaseTarget(_),A=e.getValue(_);A&&(A.liveStyle=!0),x[_]=S??null}),y.push({animation:x})}let C=!!y.length;return i&&(h.initial===!1||h.initial===h.animate)&&!e.manuallyAnimateOnMount&&(C=!1),i=!1,C?t(y):Promise.resolve()}function f(d,h){if(r[d].isActive===h)return Promise.resolve();e.variantChildren?.forEach(y=>y.animationState?.setActive(d,h)),r[d].isActive=h;const m=c(d);for(const y in r)r[y].protectedKeys={};return m}return{animateChanges:c,setActive:f,setAnimateFunction:l,getState:()=>r,reset:()=>{r=X4()}}}function doe(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Y8(t,e):!1}function fh(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function X4(){return{animate:fh(!0),whileInView:fh(),whileHover:fh(),whileTap:fh(),whileDrag:fh(),whileFocus:fh(),exit:fh()}}class Jc{constructor(t){this.isMounted=!1,this.node=t}update(){}}class hoe extends Jc{constructor(t){super(t),t.animationState||(t.animationState=foe(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();J2(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let poe=0;class moe extends Jc{constructor(){super(...arguments),this.id=poe++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const o=this.node.animationState.setActive("exit",!t);r&&!t&&o.then(()=>{r(this.id)})}mount(){const{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const goe={animation:{Feature:hoe},exit:{Feature:moe}};function Xv(e,t,r,i={passive:!0}){return e.addEventListener(t,r,i),()=>e.removeEventListener(t,r)}function Rb(e){return{point:{x:e.pageX,y:e.pageY}}}const yoe=e=>t=>WO(t)&&e(t,Rb(t));function Cv(e,t,r,i){return Xv(e,t,yoe(r),i)}const X8=1e-4,voe=1-X8,boe=1+X8,Q8=.01,Soe=0-Q8,woe=0+Q8;function Qi(e){return e.max-e.min}function Eoe(e,t,r){return Math.abs(e-t)<=r}function Q4(e,t,r,i=.5){e.origin=i,e.originPoint=Hr(t.min,t.max,e.origin),e.scale=Qi(r)/Qi(t),e.translate=Hr(r.min,r.max,e.origin)-e.originPoint,(e.scale>=voe&&e.scale<=boe||isNaN(e.scale))&&(e.scale=1),(e.translate>=Soe&&e.translate<=woe||isNaN(e.translate))&&(e.translate=0)}function Av(e,t,r,i){Q4(e.x,t.x,r.x,i?i.originX:void 0),Q4(e.y,t.y,r.y,i?i.originY:void 0)}function W4(e,t,r){e.min=r.min+t.min,e.max=e.min+Qi(t)}function _oe(e,t,r){W4(e.x,t.x,r.x),W4(e.y,t.y,r.y)}function J4(e,t,r){e.min=t.min-r.min,e.max=e.min+Qi(t)}function JS(e,t,r){J4(e.x,t.x,r.x),J4(e.y,t.y,r.y)}function Qs(e){return[e("x"),e("y")]}const W8=({current:e})=>e?e.ownerDocument.defaultView:null,ej=(e,t)=>Math.abs(e-t);function xoe(e,t){const r=ej(e.x,t.x),i=ej(e.y,t.y);return Math.sqrt(r**2+i**2)}class J8{constructor(t,r,{transformPagePoint:i,contextWindow:o=window,dragSnapToOrigin:l=!1,distanceThreshold:c=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Sx(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,b=xoe(v.offset,{x:0,y:0})>=this.distanceThreshold;if(!w&&!b)return;const{point:C}=v,{timestamp:x}=li;this.history.push({...C,timestamp:x});const{onStart:_,onMove:S}=this.handlers;w||(_&&_(this.lastMoveEvent,v),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,v)},this.handlePointerMove=(v,w)=>{this.lastMoveEvent=v,this.lastMoveEventInfo=bx(w,this.transformPagePoint),Ur.update(this.updatePoint,!0)},this.handlePointerUp=(v,w)=>{this.end();const{onEnd:b,onSessionEnd:C,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const _=Sx(v.type==="pointercancel"?this.lastMoveEventInfo:bx(w,this.transformPagePoint),this.history);this.startEvent&&b&&b(v,_),C&&C(v,_)},!WO(t))return;this.dragSnapToOrigin=l,this.handlers=r,this.transformPagePoint=i,this.distanceThreshold=c,this.contextWindow=o||window;const f=Rb(t),d=bx(f,this.transformPagePoint),{point:h}=d,{timestamp:m}=li;this.history=[{...h,timestamp:m}];const{onSessionStart:y}=r;y&&y(t,Sx(d,this.history)),this.removeListeners=Cb(Cv(this.contextWindow,"pointermove",this.handlePointerMove),Cv(this.contextWindow,"pointerup",this.handlePointerUp),Cv(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),qc(this.updatePoint)}}function bx(e,t){return t?{point:t(e.point)}:e}function tj(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Sx({point:e},t){return{point:e,delta:tj(e,e$(t)),offset:tj(e,Toe(t)),velocity:Coe(t,.1)}}function Toe(e){return e[0]}function e$(e){return e[e.length-1]}function Coe(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,i=null;const o=e$(e);for(;r>=0&&(i=e[r],!(o.timestamp-i.timestamp>_l(t)));)r--;if(!i)return{x:0,y:0};const l=to(o.timestamp-i.timestamp);if(l===0)return{x:0,y:0};const c={x:(o.x-i.x)/l,y:(o.y-i.y)/l};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function Aoe(e,{min:t,max:r},i){return t!==void 0&&e<t?e=i?Hr(t,e,i.min):Math.max(e,t):r!==void 0&&e>r&&(e=i?Hr(r,e,i.max):Math.min(e,r)),e}function nj(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function Ooe(e,{top:t,left:r,bottom:i,right:o}){return{x:nj(e.x,r,o),y:nj(e.y,t,i)}}function rj(e,t){let r=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,i]=[i,r]),{min:r,max:i}}function Roe(e,t){return{x:rj(e.x,t.x),y:rj(e.y,t.y)}}function Moe(e,t){let r=.5;const i=Qi(e),o=Qi(t);return o>i?r=Gv(t.min,t.max-i,e.min):i>o&&(r=Gv(e.min,e.max-o,t.min)),nc(0,1,r)}function joe(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const zC=.35;function Doe(e=zC){return e===!1?e=0:e===!0&&(e=zC),{x:aj(e,"left","right"),y:aj(e,"top","bottom")}}function aj(e,t,r){return{min:ij(e,t),max:ij(e,r)}}function ij(e,t){return typeof e=="number"?e:e[t]||0}const Noe=new WeakMap;class koe{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Oa(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:i}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const l=y=>{const{dragSnapToOrigin:v}=this.getProps();v?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(Rb(y).point)},c=(y,v)=>{const{drag:w,dragPropagation:b,onDragStart:C}=this.getProps();if(w&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Fie(w),!this.openDragLock))return;this.latestPointerEvent=y,this.latestPanInfo=v,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Qs(_=>{let S=this.getAxisMotionValue(_).get()||0;if(xl.test(S)){const{projection:A}=this.visualElement;if(A&&A.layout){const E=A.layout.layoutBox[_];E&&(S=Qi(E)*(parseFloat(S)/100))}}this.originPoint[_]=S}),C&&Ur.postRender(()=>C(y,v)),NC(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},f=(y,v)=>{this.latestPointerEvent=y,this.latestPanInfo=v;const{dragPropagation:w,dragDirectionLock:b,onDirectionLock:C,onDrag:x}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:_}=v;if(b&&this.currentDirection===null){this.currentDirection=zoe(_),this.currentDirection!==null&&C&&C(this.currentDirection);return}this.updateAxis("x",v.point,_),this.updateAxis("y",v.point,_),this.visualElement.render(),x&&x(y,v)},d=(y,v)=>{this.latestPointerEvent=y,this.latestPanInfo=v,this.stop(y,v),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>Qs(y=>this.getAnimationState(y)==="paused"&&this.getAxisMotionValue(y).animation?.play()),{dragSnapToOrigin:m}=this.getProps();this.panSession=new J8(t,{onSessionStart:l,onStart:c,onMove:f,onSessionEnd:d,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:i,contextWindow:W8(this.visualElement)})}stop(t,r){const i=t||this.latestPointerEvent,o=r||this.latestPanInfo,l=this.isDragging;if(this.cancel(),!l||!o||!i)return;const{velocity:c}=o;this.startAnimation(c);const{onDragEnd:f}=this.getProps();f&&Ur.postRender(()=>f(i,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,i){const{drag:o}=this.getProps();if(!i||!I1(t,o,this.currentDirection))return;const l=this.getAxisMotionValue(t);let c=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(c=Aoe(c,this.constraints[t],this.elastic[t])),l.set(c)}resolveConstraints(){const{dragConstraints:t,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&vp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=Ooe(i.layoutBox,t):this.constraints=!1,this.elastic=Doe(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Qs(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=joe(i.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!vp(t))return!1;const i=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const l=$se(i,o.root,this.visualElement.getTransformPagePoint());let c=Roe(o.layout.layoutBox,l);if(r){const f=r(Nse(c));this.hasMutatedConstraints=!!f,f&&(c=P8(f))}return c}startAnimation(t){const{drag:r,dragMomentum:i,dragElastic:o,dragTransition:l,dragSnapToOrigin:c,onDragTransitionEnd:f}=this.getProps(),d=this.constraints||{},h=Qs(m=>{if(!I1(m,r,this.currentDirection))return;let y=d&&d[m]||{};c&&(y={min:0,max:0});const v=o?200:1e6,w=o?40:1e7,b={type:"inertia",velocity:i?t[m]:0,bounceStiffness:v,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...l,...y};return this.startAxisValueAnimation(m,b)});return Promise.all(h).then(f)}startAxisValueAnimation(t,r){const i=this.getAxisMotionValue(t);return NC(this.visualElement,t),i.start(oR(t,i,0,r,this.visualElement,!1))}stopAnimation(){Qs(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Qs(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const r=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),o=i[r];return o||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){Qs(r=>{const{drag:i}=this.getProps();if(!I1(r,i,this.currentDirection))return;const{projection:o}=this.visualElement,l=this.getAxisMotionValue(r);if(o&&o.layout){const{min:c,max:f}=o.layout.layoutBox[r],d=l.get()||0;l.set(t[r]-Hr(c,f,.5)+d)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!vp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Qs(c=>{const f=this.getAxisMotionValue(c);if(f&&this.constraints!==!1){const d=f.get();o[c]=Moe({min:d,max:d},this.constraints[c])}});const{transformTemplate:l}=this.visualElement.getProps();this.visualElement.current.style.transform=l?l({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),Qs(c=>{if(!I1(c,t,null))return;const f=this.getAxisMotionValue(c),{min:d,max:h}=this.constraints[c];f.set(Hr(d,h,o[c]))})}addListeners(){if(!this.visualElement.current)return;Noe.set(this.visualElement,this);const t=this.visualElement.current,r=Cv(t,"pointerdown",d=>{const{drag:h,dragListener:m=!0}=this.getProps();h&&m&&this.start(d)}),i=()=>{const{dragConstraints:d}=this.getProps();vp(d)&&d.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,l=o.addEventListener("measure",i);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Ur.read(i);const c=Xv(window,"resize",()=>this.scalePositionWithinConstraints()),f=o.addEventListener("didUpdate",(({delta:d,hasLayoutChanged:h})=>{this.isDragging&&h&&(Qs(m=>{const y=this.getAxisMotionValue(m);y&&(this.originPoint[m]+=d[m].translate,y.set(y.get()+d[m].translate))}),this.visualElement.render())}));return()=>{c(),r(),l(),f&&f()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:i=!1,dragPropagation:o=!1,dragConstraints:l=!1,dragElastic:c=zC,dragMomentum:f=!0}=t;return{...t,drag:r,dragDirectionLock:i,dragPropagation:o,dragConstraints:l,dragElastic:c,dragMomentum:f}}}function I1(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function zoe(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class $oe extends Jc{constructor(t){super(t),this.removeGroupControls=ro,this.removeListeners=ro,this.controls=new koe(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ro}update(){const{dragControls:t}=this.node.getProps(),{dragControls:r}=this.node.prevProps||{};t!==r&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const sj=e=>(t,r)=>{e&&Ur.postRender(()=>e(t,r))};class Poe extends Jc{constructor(){super(...arguments),this.removePointerDownListener=ro}onPointerDown(t){this.session=new J8(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:W8(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:i,onPanEnd:o}=this.node.getProps();return{onSessionStart:sj(t),onStart:sj(r),onMove:i,onEnd:(l,c)=>{delete this.session,o&&Ur.postRender(()=>o(l,c))}}}mount(){this.removePointerDownListener=Cv(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const dS={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let wx=!1;class Ioe extends j.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:i,layoutId:o}=this.props,{projection:l}=t;l&&(r.group&&r.group.add(l),i&&i.register&&o&&i.register(l),wx&&l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,onExitComplete:()=>this.safeToRemove()})),dS.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:i,drag:o,isPresent:l}=this.props,{projection:c}=i;return c&&(c.isPresent=l,wx=!0,o||t.layoutDependency!==r||r===void 0||t.isPresent!==l?c.willUpdate():this.safeToRemove(),t.isPresent!==l&&(l?c.promote():c.relegate()||Ur.postRender(()=>{const f=c.getStack();(!f||!f.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),QO.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:i}=this.props,{projection:o}=t;wx=!0,o&&(o.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(o),i&&i.deregister&&i.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function t$(e){const[t,r]=Jie(),i=j.useContext(D9);return N.jsx(Ioe,{...e,layoutGroup:i,switchLayoutGroup:j.useContext(z8),isPresent:t,safeToRemove:r})}function Uoe(e,t,r){const i=xi(e)?e:Hp(e);return i.start(oR("",i,t,r)),i.animation}const Loe=(e,t)=>e.depth-t.depth;class qoe{constructor(){this.children=[],this.isDirty=!1}add(t){NO(this.children,t),this.isDirty=!0}remove(t){kO(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Loe),this.isDirty=!1,this.children.forEach(t)}}function Voe(e,t){const r=Wi.now(),i=({timestamp:o})=>{const l=o-r;l>=t&&(qc(i),e(l-t))};return Ur.setup(i,!0),()=>qc(i)}const n$=["TopLeft","TopRight","BottomLeft","BottomRight"],Boe=n$.length,oj=e=>typeof e=="string"?parseFloat(e):e,lj=e=>typeof e=="number"||lt.test(e);function Foe(e,t,r,i,o,l){o?(e.opacity=Hr(0,r.opacity??1,Hoe(i)),e.opacityExit=Hr(t.opacity??1,0,Goe(i))):l&&(e.opacity=Hr(t.opacity??1,r.opacity??1,i));for(let c=0;c<Boe;c++){const f=`border${n$[c]}Radius`;let d=uj(t,f),h=uj(r,f);if(d===void 0&&h===void 0)continue;d||(d=0),h||(h=0),d===0||h===0||lj(d)===lj(h)?(e[f]=Math.max(Hr(oj(d),oj(h),i),0),(xl.test(h)||xl.test(d))&&(e[f]+="%")):e[f]=h}(t.rotate||r.rotate)&&(e.rotate=Hr(t.rotate||0,r.rotate||0,i))}function uj(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Hoe=r$(0,.5,B9),Goe=r$(.5,.95,ro);function r$(e,t,r){return i=>i<e?0:i>t?1:r(Gv(e,t,i))}function cj(e,t){e.min=t.min,e.max=t.max}function tl(e,t){cj(e.x,t.x),cj(e.y,t.y)}function fj(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function dj(e,t,r,i,o){return e-=t,e=WS(e,1/r,i),o!==void 0&&(e=WS(e,1/o,i)),e}function Koe(e,t=0,r=1,i=.5,o,l=e,c=e){if(xl.test(t)&&(t=parseFloat(t),t=Hr(c.min,c.max,t/100)-c.min),typeof t!="number")return;let f=Hr(l.min,l.max,i);e===l&&(f-=t),e.min=dj(e.min,t,r,f,o),e.max=dj(e.max,t,r,f,o)}function hj(e,t,[r,i,o],l,c){Koe(e,t[r],t[i],t[o],t.scale,l,c)}const Yoe=["x","scaleX","originX"],Zoe=["y","scaleY","originY"];function pj(e,t,r,i){hj(e.x,t,Yoe,r?r.x:void 0,i?i.x:void 0),hj(e.y,t,Zoe,r?r.y:void 0,i?i.y:void 0)}function mj(e){return e.translate===0&&e.scale===1}function a$(e){return mj(e.x)&&mj(e.y)}function gj(e,t){return e.min===t.min&&e.max===t.max}function Xoe(e,t){return gj(e.x,t.x)&&gj(e.y,t.y)}function yj(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function i$(e,t){return yj(e.x,t.x)&&yj(e.y,t.y)}function vj(e){return Qi(e.x)/Qi(e.y)}function bj(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Qoe{constructor(){this.members=[]}add(t){NO(this.members,t),t.scheduleRender()}remove(t){if(kO(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){const r=this.members.findIndex(o=>t===o);if(r===0)return!1;let i;for(let o=r;o>=0;o--){const l=this.members[o];if(l.isPresent!==!1){i=l;break}}return i?(this.promote(i),!0):!1}promote(t,r){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,r&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:r,resumingFrom:i}=t;r.onExitComplete&&r.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Woe(e,t,r){let i="";const o=e.x.translate/t.x,l=e.y.translate/t.y,c=r?.z||0;if((o||l||c)&&(i=`translate3d(${o}px, ${l}px, ${c}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:h,rotate:m,rotateX:y,rotateY:v,skewX:w,skewY:b}=r;h&&(i=`perspective(${h}px) ${i}`),m&&(i+=`rotate(${m}deg) `),y&&(i+=`rotateX(${y}deg) `),v&&(i+=`rotateY(${v}deg) `),w&&(i+=`skewX(${w}deg) `),b&&(i+=`skewY(${b}deg) `)}const f=e.x.scale*t.x,d=e.y.scale*t.y;return(f!==1||d!==1)&&(i+=`scale(${f}, ${d})`),i||"none"}const Ex=["","X","Y","Z"],Joe=1e3;let ele=0;function _x(e,t,r,i){const{latestValues:o}=t;o[e]&&(r[e]=o[e],t.setStaticValue(e,0),i&&(i[e]=0))}function s$(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=H8(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:o,layoutId:l}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",Ur,!(o||l))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&s$(i)}function o$({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:i,resetTransform:o}){return class{constructor(c={},f=t?.()){this.id=ele++,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(rle),this.nodes.forEach(ole),this.nodes.forEach(lle),this.nodes.forEach(ale)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=c,this.root=f?f.root||f:this,this.path=f?[...f.path,f]:[],this.parent=f,this.depth=f?f.depth+1:0;for(let d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new qoe)}addEventListener(c,f){return this.eventHandlers.has(c)||this.eventHandlers.set(c,new PO),this.eventHandlers.get(c).add(f)}notifyListeners(c,...f){const d=this.eventHandlers.get(c);d&&d.notify(...f)}hasListeners(c){return this.eventHandlers.has(c)}mount(c){if(this.instance)return;this.isSVG=E8(c)&&!Xie(c),this.instance=c;const{layoutId:f,layout:d,visualElement:h}=this.options;if(h&&!h.current&&h.mount(c),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(d||f)&&(this.isLayoutDirty=!0),e){let m,y=0;const v=()=>this.root.updateBlockedByResize=!1;Ur.read(()=>{y=window.innerWidth}),e(c,()=>{const w=window.innerWidth;w!==y&&(y=w,this.root.updateBlockedByResize=!0,m&&m(),m=Voe(v,250),dS.hasAnimatedSinceResize&&(dS.hasAnimatedSinceResize=!1,this.nodes.forEach(Ej)))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&h&&(f||d)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:y,hasRelativeLayoutChanged:v,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||h.getDefaultTransition()||hle,{onLayoutAnimationStart:C,onLayoutAnimationComplete:x}=h.getProps(),_=!this.targetLayout||!i$(this.targetLayout,w),S=!y&&v;if(this.options.layoutRoot||this.resumeFrom||S||y&&(_||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const A={...ZO(b,"layout"),onPlay:C,onComplete:x};(h.shouldReduceMotion||this.options.layoutRoot)&&(A.delay=0,A.type=!1),this.startAnimation(A),this.setAnimationOrigin(m,S)}else y||Ej(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const c=this.getStack();c&&c.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),qc(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(ule),this.animationId++)}getTransformTemplate(){const{visualElement:c}=this.options;return c&&c.getProps().transformTemplate}willUpdate(c=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&s$(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){const y=this.path[m];y.shouldResetTransform=!0,y.updateScroll("snapshot"),y.options.layoutRoot&&y.willUpdate(!1)}const{layoutId:f,layout:d}=this.options;if(f===void 0&&!d)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),c&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Sj);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(wj);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(sle),this.nodes.forEach(tle),this.nodes.forEach(nle)):this.nodes.forEach(wj),this.clearAllSnapshots();const f=Wi.now();li.delta=nc(0,1e3/60,f-li.timestamp),li.timestamp=f,li.isProcessing=!0,fx.update.process(li),fx.preRender.process(li),fx.render.process(li),li.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,QO.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ile),this.sharedNodes.forEach(cle)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ur.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ur.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Qi(this.snapshot.measuredBox.x)&&!Qi(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 d=0;d<this.path.length;d++)this.path[d].updateScroll();const c=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Oa(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:f}=this.options;f&&f.notify("LayoutMeasure",this.layout.layoutBox,c?c.layoutBox:void 0)}updateScroll(c="measure"){let f=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===c&&(f=!1),f&&this.instance){const d=i(this.instance);this.scroll={animationId:this.root.animationId,phase:c,isRoot:d,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:d}}}resetTransform(){if(!o)return;const c=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,f=this.projectionDelta&&!a$(this.projectionDelta),d=this.getTransformTemplate(),h=d?d(this.latestValues,""):void 0,m=h!==this.prevTransformTemplateValue;c&&this.instance&&(f||mh(this.latestValues)||m)&&(o(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(c=!0){const f=this.measurePageBox();let d=this.removeElementScroll(f);return c&&(d=this.removeTransform(d)),ple(d),{animationId:this.root.animationId,measuredBox:f,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:c}=this.options;if(!c)return Oa();const f=c.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(mle))){const{scroll:h}=this.root;h&&(bp(f.x,h.offset.x),bp(f.y,h.offset.y))}return f}removeElementScroll(c){const f=Oa();if(tl(f,c),this.scroll?.wasRoot)return f;for(let d=0;d<this.path.length;d++){const h=this.path[d],{scroll:m,options:y}=h;h!==this.root&&m&&y.layoutScroll&&(m.wasRoot&&tl(f,c),bp(f.x,m.offset.x),bp(f.y,m.offset.y))}return f}applyTransform(c,f=!1){const d=Oa();tl(d,c);for(let h=0;h<this.path.length;h++){const m=this.path[h];!f&&m.options.layoutScroll&&m.scroll&&m!==m.root&&Sp(d,{x:-m.scroll.offset.x,y:-m.scroll.offset.y}),mh(m.latestValues)&&Sp(d,m.latestValues)}return mh(this.latestValues)&&Sp(d,this.latestValues),d}removeTransform(c){const f=Oa();tl(f,c);for(let d=0;d<this.path.length;d++){const h=this.path[d];if(!h.instance||!mh(h.latestValues))continue;RC(h.latestValues)&&h.updateSnapshot();const m=Oa(),y=h.measurePageBox();tl(m,y),pj(f,h.latestValues,h.snapshot?h.snapshot.layoutBox:void 0,m)}return mh(this.latestValues)&&pj(f,this.latestValues),f}setTargetDelta(c){this.targetDelta=c,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(c){this.options={...this.options,...c,crossfade:c.crossfade!==void 0?c.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!==li.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(c=!1){const f=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=f.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=f.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=f.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==f;if(!(c||d&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:m,layoutId:y}=this.options;if(!this.layout||!(m||y))return;this.resolvedRelativeTargetAt=li.timestamp;const v=this.getClosestProjectingParent();v&&this.linkedParentVersion!==v.layoutVersion&&!v.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(v&&v.layout?this.createRelativeTarget(v,this.layout.layoutBox,v.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Oa(),this.targetWithTransforms=Oa()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),_oe(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):tl(this.target,this.layout.layoutBox),U8(this.target,this.targetDelta)):tl(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,v&&!!v.resumingFrom==!!this.resumingFrom&&!v.options.layoutScroll&&v.target&&this.animationProgress!==1?this.createRelativeTarget(v,this.target,v.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||RC(this.parent.latestValues)||I8(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(c,f,d){this.relativeParent=c,this.linkedParentVersion=c.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Oa(),this.relativeTargetOrigin=Oa(),JS(this.relativeTargetOrigin,f,d),tl(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const c=this.getLead(),f=!!this.resumingFrom||this!==c;let d=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(d=!1),f&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===li.timestamp&&(d=!1),d)return;const{layout:h,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||m))return;tl(this.layoutCorrected,this.layout.layoutBox);const y=this.treeScale.x,v=this.treeScale.y;zse(this.layoutCorrected,this.treeScale,this.path,f),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=Oa());const{target:w}=c;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(fj(this.prevProjectionDelta.x,this.projectionDelta.x),fj(this.prevProjectionDelta.y,this.projectionDelta.y)),Av(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==y||this.treeScale.y!==v||!bj(this.projectionDelta.x,this.prevProjectionDelta.x)||!bj(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(c=!0){if(this.options.visualElement?.scheduleRender(),c){const f=this.getStack();f&&f.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=wp(),this.projectionDelta=wp(),this.projectionDeltaWithTransform=wp()}setAnimationOrigin(c,f=!1){const d=this.snapshot,h=d?d.latestValues:{},m={...this.latestValues},y=wp();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!f;const v=Oa(),w=d?d.source:void 0,b=this.layout?this.layout.source:void 0,C=w!==b,x=this.getStack(),_=!x||x.members.length<=1,S=!!(C&&!_&&this.options.crossfade===!0&&!this.path.some(dle));this.animationProgress=0;let A;this.mixTargetDelta=E=>{const O=E/1e3;_j(y.x,c.x,O),_j(y.y,c.y,O),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(JS(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox),fle(this.relativeTarget,this.relativeTargetOrigin,v,O),A&&Xoe(this.relativeTarget,A)&&(this.isProjectionDirty=!1),A||(A=Oa()),tl(A,this.relativeTarget)),C&&(this.animationValues=m,Foe(m,h,this.latestValues,O,S,_)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=O},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(c){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(qc(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ur.update(()=>{dS.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Hp(0)),this.currentAnimation=Uoe(this.motionValue,[0,1e3],{...c,velocity:0,isSync:!0,onUpdate:f=>{this.mixTargetDelta(f),c.onUpdate&&c.onUpdate(f)},onStop:()=>{},onComplete:()=>{c.onComplete&&c.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 c=this.getStack();c&&c.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Joe),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const c=this.getLead();let{targetWithTransforms:f,target:d,layout:h,latestValues:m}=c;if(!(!f||!d||!h)){if(this!==c&&this.layout&&h&&l$(this.options.animationType,this.layout.layoutBox,h.layoutBox)){d=this.target||Oa();const y=Qi(this.layout.layoutBox.x);d.x.min=c.target.x.min,d.x.max=d.x.min+y;const v=Qi(this.layout.layoutBox.y);d.y.min=c.target.y.min,d.y.max=d.y.min+v}tl(f,d),Sp(f,m),Av(this.projectionDeltaWithTransform,this.layoutCorrected,f,m)}}registerSharedNode(c,f){this.sharedNodes.has(c)||this.sharedNodes.set(c,new Qoe),this.sharedNodes.get(c).add(f);const h=f.options.initialPromotionConfig;f.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(f):void 0})}isLead(){const c=this.getStack();return c?c.lead===this:!0}getLead(){const{layoutId:c}=this.options;return c?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:c}=this.options;return c?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:c}=this.options;if(c)return this.root.sharedNodes.get(c)}promote({needsReset:c,transition:f,preserveFollowOpacity:d}={}){const h=this.getStack();h&&h.promote(this,d),c&&(this.projectionDelta=void 0,this.needsReset=!0),f&&this.setOptions({transition:f})}relegate(){const c=this.getStack();return c?c.relegate(this):!1}resetSkewAndRotation(){const{visualElement:c}=this.options;if(!c)return;let f=!1;const{latestValues:d}=c;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(f=!0),!f)return;const h={};d.z&&_x("z",c,h,this.animationValues);for(let m=0;m<Ex.length;m++)_x(`rotate${Ex[m]}`,c,h,this.animationValues),_x(`skew${Ex[m]}`,c,h,this.animationValues);c.render();for(const m in h)c.setStaticValue(m,h[m]),this.animationValues&&(this.animationValues[m]=h[m]);c.scheduleRender()}applyProjectionStyles(c,f){if(!this.instance||this.isSVG)return;if(!this.isVisible){c.visibility="hidden";return}const d=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,c.visibility="",c.opacity="",c.pointerEvents=fS(f?.pointerEvents)||"",c.transform=d?d(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(c.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,c.pointerEvents=fS(f?.pointerEvents)||""),this.hasProjected&&!mh(this.latestValues)&&(c.transform=d?d({},""):"none",this.hasProjected=!1);return}c.visibility="";const m=h.animationValues||h.latestValues;this.applyTransformsToTarget();let y=Woe(this.projectionDeltaWithTransform,this.treeScale,m);d&&(y=d(m,y)),c.transform=y;const{x:v,y:w}=this.projectionDelta;c.transformOrigin=`${v.origin*100}% ${w.origin*100}% 0`,h.animationValues?c.opacity=h===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:c.opacity=h===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const b in OC){if(m[b]===void 0)continue;const{correct:C,applyTo:x,isCSSVariable:_}=OC[b],S=y==="none"?m[b]:C(m[b],h);if(x){const A=x.length;for(let E=0;E<A;E++)c[x[E]]=S}else _?this.options.visualElement.renderState.vars[b]=S:c[b]=S}this.options.layoutId&&(c.pointerEvents=h===this?fS(f?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(c=>c.currentAnimation?.stop()),this.root.nodes.forEach(Sj),this.root.sharedNodes.clear()}}}function tle(e){e.updateLayout()}function nle(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,l=t.source!==e.layout.source;o==="size"?Qs(m=>{const y=l?t.measuredBox[m]:t.layoutBox[m],v=Qi(y);y.min=r[m].min,y.max=y.min+v}):l$(o,t.layoutBox,r)&&Qs(m=>{const y=l?t.measuredBox[m]:t.layoutBox[m],v=Qi(r[m]);y.max=y.min+v,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[m].max=e.relativeTarget[m].min+v)});const c=wp();Av(c,r,t.layoutBox);const f=wp();l?Av(f,e.applyTransform(i,!0),t.measuredBox):Av(f,r,t.layoutBox);const d=!a$(c);let h=!1;if(!e.resumeFrom){const m=e.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:y,layout:v}=m;if(y&&v){const w=Oa();JS(w,t.layoutBox,y.layoutBox);const b=Oa();JS(b,r,v.layoutBox),i$(w,b)||(h=!0),m.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=w,e.relativeParent=m)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:f,layoutDelta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function rle(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 ale(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ile(e){e.clearSnapshot()}function Sj(e){e.clearMeasurements()}function wj(e){e.isLayoutDirty=!1}function sle(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ej(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ole(e){e.resolveTargetDelta()}function lle(e){e.calcProjection()}function ule(e){e.resetSkewAndRotation()}function cle(e){e.removeLeadSnapshot()}function _j(e,t,r){e.translate=Hr(t.translate,0,r),e.scale=Hr(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function xj(e,t,r,i){e.min=Hr(t.min,r.min,i),e.max=Hr(t.max,r.max,i)}function fle(e,t,r,i){xj(e.x,t.x,r.x,i),xj(e.y,t.y,r.y,i)}function dle(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const hle={duration:.45,ease:[.4,0,.1,1]},Tj=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Cj=Tj("applewebkit/")&&!Tj("chrome/")?Math.round:ro;function Aj(e){e.min=Cj(e.min),e.max=Cj(e.max)}function ple(e){Aj(e.x),Aj(e.y)}function l$(e,t,r){return e==="position"||e==="preserve-aspect"&&!Eoe(vj(t),vj(r),.2)}function mle(e){return e!==e.root&&e.scroll?.wasRoot}const gle=o$({attachResizeListener:(e,t)=>Xv(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),xx={current:void 0},u$=o$({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!xx.current){const e=new gle({});e.mount(window),e.setOptions({layoutScroll:!0}),xx.current=e}return xx.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),yle={pan:{Feature:Poe},drag:{Feature:$oe,ProjectionNode:u$,MeasureLayout:t$}};function Oj(e,t,r){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",r==="Start");const o="onHover"+r,l=i[o];l&&Ur.postRender(()=>l(t,Rb(t)))}class vle extends Jc{mount(){const{current:t}=this.node;t&&(this.unmount=Hie(t,(r,i)=>(Oj(this.node,i,"Start"),o=>Oj(this.node,o,"End"))))}unmount(){}}class ble extends Jc{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Cb(Xv(this.node.current,"focus",()=>this.onFocus()),Xv(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Rj(e,t,r){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",r==="Start");const o="onTap"+(r==="End"?"":r),l=i[o];l&&Ur.postRender(()=>l(t,Rb(t)))}class Sle extends Jc{mount(){const{current:t}=this.node;t&&(this.unmount=Zie(t,(r,i)=>(Rj(this.node,i,"Start"),(o,{success:l})=>Rj(this.node,o,l?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const $C=new WeakMap,Tx=new WeakMap,wle=e=>{const t=$C.get(e.target);t&&t(e)},Ele=e=>{e.forEach(wle)};function _le({root:e,...t}){const r=e||document;Tx.has(r)||Tx.set(r,{});const i=Tx.get(r),o=JSON.stringify(t);return i[o]||(i[o]=new IntersectionObserver(Ele,{root:e,...t})),i[o]}function xle(e,t,r){const i=_le(t);return $C.set(e,r),i.observe(e),()=>{$C.delete(e),i.unobserve(e)}}const Tle={some:0,all:1};class Cle extends Jc{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:i,amount:o="some",once:l}=t,c={root:r?r.current:void 0,rootMargin:i,threshold:typeof o=="number"?o:Tle[o]},f=d=>{const{isIntersecting:h}=d;if(this.isInView===h||(this.isInView=h,l&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:m,onViewportLeave:y}=this.node.getProps(),v=h?m:y;v&&v(d)};return xle(this.node.current,c,f)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(Ale(t,r))&&this.startObserver()}unmount(){}}function Ale({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const Ole={inView:{Feature:Cle},tap:{Feature:Sle},focus:{Feature:ble},hover:{Feature:vle}},Rle={layout:{ProjectionNode:u$,MeasureLayout:t$}},Mle={...goe,...Ole,...yle,...Rle},Mj=Dse(Mle,Hse),c$=zs.memo(({className:e})=>{const t=["M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875","M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867","M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859","M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851","M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843","M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835","M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827","M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819","M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811","M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803","M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795","M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787","M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779","M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771","M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763","M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755","M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747","M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739","M-254 -333C-254 -333 -186 72 278 199C742 326 810 731 810 731","M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723","M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715","M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707","M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699","M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691","M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683","M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675","M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667","M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659","M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651","M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643","M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635","M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627","M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619","M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611","M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603","M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595","M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587","M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579","M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571","M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563","M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555","M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547","M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539","M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531","M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523","M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515","M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507","M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499","M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491","M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483"];return N.jsx("div",{className:Vn("absolute h-full w-full inset-0 mask-size-[40px] mask-repeat-[no-repeat] flex items-center justify-center",e),children:N.jsxs("svg",{className:"z-0 h-full w-full pointer-events-none absolute",width:"100%",height:"100%",viewBox:"0 0 696 316",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[N.jsx("title",{children:"Background Beams"}),N.jsx("path",{d:"M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739M-254 -333C-254 -333 -186 72 278 199C742 326 810 731 810 731M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483M-30 -589C-30 -589 38 -184 502 -57C966 70 1034 475 1034 475M-23 -597C-23 -597 45 -192 509 -65C973 62 1041 467 1041 467M-16 -605C-16 -605 52 -200 516 -73C980 54 1048 459 1048 459M-9 -613C-9 -613 59 -208 523 -81C987 46 1055 451 1055 451M-2 -621C-2 -621 66 -216 530 -89C994 38 1062 443 1062 443M5 -629C5 -629 73 -224 537 -97C1001 30 1069 435 1069 435M12 -637C12 -637 80 -232 544 -105C1008 22 1076 427 1076 427M19 -645C19 -645 87 -240 551 -113C1015 14 1083 419 1083 419",stroke:"url(#paint0_radial_242_278)",strokeOpacity:"0.05",strokeWidth:"0.5"}),t.map((r,i)=>N.jsx(Mj.path,{d:r,stroke:`url(#linearGradient-${i})`,strokeOpacity:"0.4",strokeWidth:"0.5"},`path-${i}`)),N.jsxs("defs",{children:[t.map((r,i)=>N.jsxs(Mj.linearGradient,{id:`linearGradient-${i}`,initial:{x1:"0%",x2:"0%",y1:"0%",y2:"0%"},animate:{x1:["0%","100%"],x2:["0%","95%"],y1:["0%","100%"],y2:["0%",`${93+Math.random()*8}%`]},transition:{duration:Math.random()*10+10,ease:"easeInOut",repeat:1/0,delay:0},children:[N.jsx("stop",{stopColor:"#000000",stopOpacity:"0"}),N.jsx("stop",{stopColor:"#111111"}),N.jsx("stop",{offset:"32.5%",stopColor:"#666666"}),N.jsx("stop",{offset:"100%",stopColor:"#FFFFFF",stopOpacity:"0"})]},`gradient-${i}`)),N.jsxs("radialGradient",{id:"paint0_radial_242_278",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(352 34) rotate(90) scale(555 1560.62)",children:[N.jsx("stop",{offset:"0.0666667",stopColor:"var(--neutral-300)"}),N.jsx("stop",{offset:"0.243243",stopColor:"var(--neutral-300)"}),N.jsx("stop",{offset:"0.43594",stopColor:"white",stopOpacity:"0"})]})]})]})})});c$.displayName="BackgroundBeams";const jle=()=>N.jsxs(N.Fragment,{children:[N.jsx(c$,{className:"absolute inset-0"}),N.jsx("div",{className:"relative z-10 flex-1 flex items-center justify-center",children:N.jsxs("div",{className:"text-center",children:[N.jsx("h1",{className:"text-2xl font-semibold text-foreground mb-2",children:"Welcome to Skybridge"}),N.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose a tool from the sidebar to begin"})]})})]});function Mn(e){return typeof e!="object"||e===null||typeof e.lastModified=="number"&&typeof File<"u"&&e instanceof File||typeof e.getMonth=="function"&&typeof Date<"u"&&e instanceof Date?!1:!Array.isArray(e)}function Dle(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),Mn(e.additionalItems)}function jj(e){if(e==="")return;if(e===null)return null;if(/\.$/.test(e)||/\.0$/.test(e)||/\.\d*0$/.test(e))return e;const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)?t:e}const ec="__additional_property",e2="additionalProperties",Bc="allOf",Dn="anyOf",so="const",tw="default",lR="dependencies",Nle="enum",fi="__errors",nr="$id",kle="if",Kp="items",zle="_$junk_option_schema_id$_",hS="$name",gn="oneOf",PC="patternProperties",In="properties",Cx="readonly",f$="required",t2="submitButtonOptions",Or="$ref",gv="$schema",d$="root",h$="_",$le=["discriminator","propertyName"],Dj="formContext",Ple="layoutGridLookupMap",uR="__rjsf_additionalProperties",p$="__rjsf_rootSchema",Ile="ui:field",cR="ui:widget",Rc="ui:options",IC="ui:globalOptions",Ule="https://json-schema.org/draft/2019-09/schema",pS="https://json-schema.org/draft/2020-12/schema";function Ot(e={},t={}){return e?Object.keys(e).filter(r=>r.indexOf("ui:")===0).reduce((r,i)=>{const o=e[i];return i===cR&&Mn(o)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),r):i===Rc&&Mn(o)?{...r,...o}:{...r,[i.substring(3)]:o}},{...t}):{...t}}function m$(e,t={},r){if(!(e.additionalProperties||e.patternProperties))return!1;const{expandable:i=!0}=Ot(t);return i===!1?i:e.maxProperties!==void 0&&r?Object.keys(r).length<e.maxProperties:!0}function UC(e){const t={[fi]:[],addError(r){this[fi].push(r)}};if(Array.isArray(e))return e.reduce((r,i,o)=>({...r,[o]:UC(i)}),t);if($c(e)){const r=e;return Object.keys(r).reduce((i,o)=>({...i,[o]:UC(r[o])}),t)}return t}function pr(e,t){return kK(e,t,(r,i)=>{if(typeof r=="function"&&typeof i=="function")return!0})}const Lle=Object.prototype;function yv(e){for(const t in e)if(Lle.hasOwnProperty.call(e,t))return!1;return!0}const qle=["array","boolean","integer","null","number","object","string"];new Set(qle);const Vle=["$defs","definitions","properties","patternProperties","dependencies"];new Set(Vle);const Ble=["items","allOf","oneOf","anyOf"];new Set(Ble);const Fle=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(Fle);function mS(e){return typeof e=="object"}function ml(e){return mS(e)?yv(e):e===!0}function Ep(e,t){return e<t?-1:e>t?1:0}function Ax(e,t){const r=e.length;if(r===0)return t;let i=t.length;if(i===0)return e;if(r<i){const l=e;e=t,t=l,i=r}const o=new Set(e);for(let l=0;l<i;l++)o.add(t[l]);return Array.from(o)}function Hle(e,t){const r=[];if(e.length===0||t.length===0)return r;if(e.length>t.length){const o=e;e=t,t=o}const i=new Set(t);for(let o=0;o<e.length&&i.size>0;o++){const l=e[o];i.delete(l)&&r.push(l)}return r}function Nj(e){return e.length===0}function Ox(e){return(t,r)=>{const i=t.length-r.length;if(i!==0)return i;for(let o=0;o<t.length;o++)if(t[o]!==r[o]){const l=e(t[o],r[o]);if(l!==0)return l}return 0}}function g$(e,{threshold:t=12}={}){return r=>{const i=r.length;if(i===0)return r;if(i<=t){const c=[];let f=0;e:for(let d=0;d<i;d++){const h=r[d];for(let m=0;m<f;m++)if(e(h,c[m])===0)continue e;f=c.push(h)}return c}const o=r.slice().sort(e);let l=0;for(let c=1;c<i;c++)e(o[l],o[c])!==0&&++l!==c&&(o[l]=o[c]);return o.length=l+1,o}}function Gle(e){return(t,r)=>{const i=[];let o=t.length,l=r.length;if(o===0||l===0)return i;if(o>l){const m=t;t=r,r=m;const y=o;o=l,l=y}const c=[...t].sort(e),f=[...r].sort(e);let d=0,h=0;for(;d<o&&h<l;){const m=e(c[d],f[h]);m===0?((i.length===0||e(i[i.length-1],c[d])!==0)&&i.push(c[d]),d++,h++):m<0?d++:h++}return i}}function Kle(e,t){return r=>{if(e.has(r))return e.get(r);const i=t(r);return e.set(r,i),i}}const kj=Kle,y$=()=>0,Yle=e=>e===void 0,Zle=e=>typeof e!="object",zj={boolean:0,number:1,string:2};function Xle(e,t){const r=typeof e,i=typeof t;return r===i?Ep(e,t):zj[r]-zj[i]}function Qle(e,t){const r=e.length;if(r===0)return t;const i=t.length;if(i===0)return e;if(i>r){const c=e;e=t,t=c}const o=new Set(e),l=t.length;for(let c=0;c<l;c++){const f=t[c];o.has(f)||e.push(f)}return e}function nw(e,t,r=y$){return(i,o)=>e(i)?e(o)?r(i,o):-1:e(o)?1:t(i,o)}function up(e){return nw(Yle,e)}function vc(e,t){return nw(r=>r===void 0||e(r),t)}function Rx(e,t){return nw(Array.isArray,e,t)}const sa=up(Ep),Mx=vc(e=>e===0,(e,t)=>e-t);function Wle({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){const r=kj(t,C=>Object.keys(C).sort());function i(C){return(x,_)=>{const S=r(x),A=r(_),E=Math.min(S.length,A.length);for(let O=0;O<E;O++){const T=Ep(S[O],A[O]);if(T!==0)return T}if(S.length!==A.length)return S.length-A.length;for(let O=0;O<E;O++){const T=S[O],M=C(x[T],_[T]);if(M!==0)return M}return 0}}function o(C){const x=Ox(C),_=kj(e,g$(C,{threshold:0}));return(S,A)=>x(_(S),_(A))}const l=o(Ep);function c(C,x){if(mS(C)){if(mS(x)){const _=Object.keys(C),S=Object.keys(x),A=Qle(_,S),E=A.length;for(let O=0;O<E;O++){const T=A[O];if(C[T]===x[T])continue;const D=(b[T]??f)(C[T],x[T]);if(D!==0)return D}return 0}return x===!0&&yv(C)?0:1}return mS(x)?C===!0&&yv(x)?0:-1:Ep(C,x)}const f=up(h),d=nw(Zle,Rx(i(f),Ox(h)),Xle);function h(C,x){return C===null?-1:x===null?1:d(C,x)}const m=up(c),y=vc(yv,i(m)),v=up(o(c)),w=vc(ml,c),b={$id:sa,$comment:sa,$defs:y,$ref:sa,$schema:sa,const:f,contains:m,contentEncoding:sa,contentMediaType:sa,default:f,definitions:y,description:sa,else:m,examples:f,exclusiveMaximum:sa,exclusiveMinimum:sa,format:sa,if:m,maximum:sa,maxItems:sa,maxLength:sa,maxProperties:sa,minimum:sa,multipleOf:sa,not:m,pattern:sa,propertyNames:m,readOnly:sa,then:m,title:sa,writeOnly:sa,uniqueItems:vc(C=>C===!1,y$),minLength:Mx,minItems:Mx,minProperties:Mx,required:vc(Nj,l),enum:vc(Nj,o(h)),type:up((C,x)=>{const _=Array.isArray(C),S=Array.isArray(x);return!_&&!S?Ep(C,x):l(_?C:[C],S?x:[x])}),items:vc(C=>!Array.isArray(C)&&ml(C),Rx(c,Ox(c))),anyOf:v,allOf:v,oneOf:v,properties:y,patternProperties:y,additionalProperties:w,additionalItems:w,dependencies:vc(yv,i(up(Rx(c,l))))};return{compareSchemaValues:h,compareSchemaDefinitions:c}}function $j(e){return e}const v$=(e,t)=>e?v$(t%e,e):t,Jle=(e,t)=>Math.abs(e*t)/v$(e,t);function eue(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function*jx(e,t,r){const i=e.length,o=t.length;if(i>0&&o>0)for(let l=0;l<i;l++){const c=e[l];for(let f=0;f<o;f++)yield r(c,t[f])}}function Dx(e,t){return e||t}function Pj(e){return(t,r)=>{const i={...t},o=Object.keys(r),l=o.length;for(let c=0;c<l;c++){const f=o[c];i[f]=t[f]===void 0?r[f]:e(t[f],r[f])}return i}}function tue(e){const t=new Map;for(const r of e)for(const i of r[0])t.set(i,r[1]);return t}function dh(e,t,r){r===void 0||ml(r)?delete e[t]:e[t]=r}const nue=["properties","patternProperties","additionalProperties"];function Ij(e){const t=Object.keys(e),r=t.length,i=[];for(let o=0;o<r;o++){const l=t[o];i.push({regExp:new RegExp(l),schema:e[l]})}return[i,t]}const Uj=[[],[]];function Lj(e,t,r){const i=r.length;for(let o=0;o<i;o++){const l=r[o];if(!l.regExp.test(t))continue;const c=l.schema;if(c===!1)return!0;e.push(c)}return!1}const rue=["items","additionalItems"],aue=["if","then","else"];function qj(e,t){return t.if!==void 0&&(e.if=t.if),t.then!==void 0&&(e.then=t.then),t.else!==void 0&&(e.else=t.else),e}function Nx(e,t){if(e===t)return e;switch(e){case"number":if(t==="integer")return"integer";case"integer":if(t==="number")return"integer";default:return}}function hh(e,t,r){return[e,t,r]}function iue(e){const t=new Map;for(const[r,i,o]of e){const l=c=>{if(!o(c))throw new Error(`Schema keys '${r}' and '${i}' are conflicting (${r}: ${JSON.stringify(c[r])}, ${i}: ${JSON.stringify(c[i])})`)};for(const c of[[r,i],[i,r]]){let f=t.get(c[0]);f===void 0&&(f=[],t.set(c[0],f)),f.push({oppositeKey:c[1],check:l})}}return t}const sue=[hh("minimum","maximum",e=>e.maximum>=e.minimum),hh("exclusiveMinimum","maximum",e=>e.maximum>e.exclusiveMinimum),hh("minimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.minimum),hh("exclusiveMinimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.exclusiveMinimum),hh("minLength","maxLength",e=>e.maxLength>=e.minLength),hh("minItems","maxItems",e=>e.maxItems>=e.minItems),hh("minProperties","maxProperties",e=>e.maxProperties>=e.minProperties)];function oue({mergePatterns:e=eue,isSubRegExp:t=Object.is,intersectJson:r=Hle,deduplicateJsonSchemaDef:i=$j,defaultMerger:o=$j,assigners:l=[],checks:c=sue,mergers:f}={}){function d(E){const O=E.length;let T=E[0];for(let M=1;M<O;M++){const D=_(T,E[M]);if(D===!1)return!1;ml(D)||(T=D)}return T}function h(E,O,T,M,D,P,V){if(E.length=0,T===!1)return!1;if(E.push(T),D!==void 0){if(D===!1)return!1;E.push(D)}if(Lj(E,O,P))return!1;const Y=E.length<2;if(V===!1){if(Y)return;if(Lj(E,O,M))return!1}else Y&&V!==void 0&&E.push(V);return E.length===1?E[0]:d(E)}function m(E,O,T,M,D,P){const V=T.length;if(V>0&&D!==!1)if(P)Object.assign(E,O);else for(let q=0;q<V;q++){const Y=T[q];M.has(Y)||(E[Y]=_(O[Y],D))}return E}const y=(E,{properties:O={},patternProperties:T,additionalProperties:M=!0},{properties:D={},patternProperties:P,additionalProperties:V=!0})=>{const q=ml(M),Y=ml(V);if(q&&Y)return dh(E,"properties",S(O,D)),dh(E,"patternProperties",T&&P?S(T,P):T??P),delete E.additionalProperties,E;const W=_(M,V);dh(E,"additionalProperties",W);const ie={},ae=Object.keys(O),H=ae.length,[G,J]=T?Ij(T):Uj,[he,ue]=P?Ij(P):Uj,z=[],U=new Set,I=Y?void 0:V;for(let Se=0;Se<H;Se++){const Oe=ae[Se];U.add(Oe);const re=h(z,Oe,O[Oe],G,D[Oe],he,I);re!==void 0&&(ie[Oe]=re)}const $=Object.keys(D),L=$.length,Q=q?void 0:M;for(let Se=0;Se<L;Se++){const Oe=$[Se];if(U.has(Oe))continue;const re=h(z,Oe,D[Oe],he,void 0,G,Q);re!==void 0&&(ie[Oe]=re)}dh(E,"properties",ie);let te={};const fe=new Set;if(J.length>0&&ue.length>0){const Se=jx(J,ue,(Oe,re)=>{t(Oe,re)&&fe.add(Oe),t(re,Oe)&&fe.add(re),te[e(Oe,re)]=_(T[Oe],P[re])});for(;!Se.next().done;);}return te=m(te,T,J,fe,V,Y),te=m(te,P,ue,fe,M,q),dh(E,"patternProperties",te),E},v=(E,{items:O=[],additionalItems:T},{items:M=[],additionalItems:D})=>{const P=Array.isArray(O),V=Array.isArray(M),q=[];if(E.items=q,P&&V){const[Y,W,ie]=O.length<M.length?[O.length,T,M]:[M.length,D,O];let ae=0;for(;ae<Y;ae++)q.push(_(O[ae],M[ae]));if(W===!1)E.additionalItems=!1;else{const H=W===void 0||ml(W);for(;ae<ie.length;ae++)q.push(H?ie[ae]:_(ie[ae],W));dh(E,"additionalItems",T!==void 0&&D!==void 0?_(T,D):T??D)}}else if(P||V){const[Y,W,ie]=P?[O,M,T]:[M,O,D];dh(E,"additionalItems",ie&&_(ie,W));for(let ae=0;ae<Y.length;ae++)q.push(_(Y[ae],W))}else delete E.additionalItems,E.items=_(O,M);return E},w=(E,O,T)=>{qj(E,O);const M=qj({},T);return E.allOf===void 0?E.allOf=[M]:E.allOf=E.allOf.concat(M),E};function b(E,O){return i(Array.from(jx(E,O,_)))}const C=tue([[nue,y],[rue,v],[aue,w],...l]),x=iue(c);function _(E,O){if(E===!1||O===!1)return!1;if(ml(E))return ml(O)?!0:O;if(ml(O))return E;let T={...E};const M=new Set,D=new Set,P=Object.keys(O),V=P.length;for(let q=0;q<V;q++){const Y=P[q],W=O[Y];if(W===void 0)continue;const ie=x.get(Y);if(ie!==void 0){const J=ie.length;for(let he=0;he<J;he++){const ue=ie[he];E[ue.oppositeKey]!==void 0&&D.add(ue.check)}}const ae=E[Y];if(ae===void 0){T[Y]=W;continue}const H=C.get(Y);if(H){M.add(H);continue}const G=A[Y]??o;T[Y]=G(ae,W)}for(const q of M)T=q(T,E,O);for(const q of D)q(T);return T}const S=Pj(_),A={$id:o,$ref:o,$schema:o,$comment:o,$defs:S,definitions:S,type:(E,O)=>{if(E===O)return E;const T=Array.isArray(E),M=Array.isArray(O);if(!T&&!M){const D=Nx(E,O);if(D!==void 0)return D}else if(T||M){const D=new Set;if(T&&M)for(const V of jx(E,O,Nx))V!==void 0&&D.add(V);else{const V=T?E:O,q=T?O:E,Y=V.length;for(let W=0;W<Y;W++){const ie=Nx(q,V[W]);ie!==void 0&&D.add(ie)}}const P=D.size;if(P===1)return D.values().next().value;if(P>1)return Array.from(D)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${E.toString()}, ${O.toString()}`)},default:o,description:o,title:o,const:o,format:o,contentEncoding:o,contentMediaType:o,not:(E,O)=>{const T=i([E,O]);return T.length===1?T[0]:{anyOf:T}},pattern:e,readOnly:Dx,writeOnly:Dx,enum:(E,O)=>{const T=r(E,O);if(T.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(E)}", "${JSON.stringify(O)}"`);return T},anyOf:b,oneOf:b,allOf:(E,O)=>i(E.concat(O)),propertyNames:_,contains:_,dependencies:Pj((E,O)=>Array.isArray(E)?Array.isArray(O)?Ax(E,O):_(O,{required:E}):Array.isArray(O)?_(E,{required:O}):_(E,O)),examples:(E,O)=>{if(!Array.isArray(E)||!Array.isArray(O))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(E)}" and "${JSON.stringify(O)}"`);return Ax(E,O)},multipleOf:(E,O)=>{let T=1;for(;!Number.isInteger(E)||!Number.isInteger(O);)T*=10,E*=10,O*=10;return Jle(E,O)/T},exclusiveMaximum:Math.min,maximum:Math.min,maxItems:Math.min,maxLength:Math.min,maxProperties:Math.min,exclusiveMinimum:Math.max,minimum:Math.max,minItems:Math.max,minLength:Math.max,minProperties:Math.max,uniqueItems:Dx,required:Ax,...f};return{mergeSchemaDefinitions:_,mergeArrayOfSchemaDefinitions:d}}function lue(e){const t=[],r=[e];for(;r.length>0;){const i=r.pop();if(typeof i=="boolean"||i.allOf===void 0){t.push(i);continue}const{allOf:o,...l}=i;t.push(l);for(let c=o.length-1;c>=0;c--)r.push(o[c])}return t}function uue(e){return t=>e(lue(t))}var av={},Vj;function cue(){if(Vj)return av;Vj=1;var e=/~/,t=/~[01]/g;function r(h){switch(h){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+h)}function i(h){return e.test(h)?h.replace(t,r):h}function o(h,m,y){for(var v,w,b=1,C=m.length;b<C;){if(m[b]==="constructor"||m[b]==="prototype"||m[b]==="__proto__")return h;if(v=i(m[b++]),w=C>b,typeof h[v]>"u"&&(Array.isArray(h)&&v==="-"&&(v=h.length),w&&(m[b]!==""&&m[b]<1/0||m[b]==="-"?h[v]=[]:h[v]={})),!w)break;h=h[v]}var x=h[v];return y===void 0?delete h[v]:h[v]=y,x}function l(h){if(typeof h=="string"){if(h=h.split("/"),h[0]==="")return h;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(h)){for(const m of h)if(typeof m!="string"&&typeof m!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return h}throw new Error("Invalid JSON pointer.")}function c(h,m){if(typeof h!="object")throw new Error("Invalid input object.");m=l(m);var y=m.length;if(y===1)return h;for(var v=1;v<y;){if(h=h[i(m[v++])],y===v)return h;if(typeof h!="object"||h===null)return}}function f(h,m,y){if(typeof h!="object")throw new Error("Invalid input object.");if(m=l(m),m.length===0)throw new Error("Invalid JSON pointer for set.");return o(h,m,y)}function d(h){var m=l(h);return{get:function(y){return c(y,m)},set:function(y,v){return f(y,m,v)}}}return av.get=c,av.set=f,av.compile=d,av}var fue=cue();const kx=jl(fue);var due=p9();const fR=jl(due);function n2(e,t){if(nr in e&&fR.equal(e[nr],t))return e;for(const r of Object.values(e))if(Array.isArray(r)){for(const i of r)if(Nn(i)){const o=n2(i,t);if(o!==void 0)return o}}else if(Nn(r)){const i=n2(r,t);if(i!==void 0)return i}}function LC(e,t){const r=Be(e,nr,t);Or in e&&(e={...e,[Or]:fR.resolve(r,e[Or])});for(const[i,o]of Object.entries(e))Array.isArray(o)?e={...e,[i]:o.map(l=>Nn(l)?LC(l,r):l)}:Nn(o)&&(e={...e,[i]:LC(o,r)});return e}function dR(e,t){const r=t[e];return[qv(t,[e]),r]}function b$(e,t={},r=[],i=Be(t,[nr])){const o=e||"";let l;if(o.startsWith("#")){const f=decodeURIComponent(o.substring(1));i===void 0||nr in t&&t[nr]===i?l=kx.get(t,f):t[gv]===pS&&(l=n2(t,i.replace(/\/$/,"")),l!==void 0&&(l=kx.get(l,f)))}else if(t[gv]===pS){const f=i?fR.resolve(i,o):o,[d,...h]=f.replace(/#\/?$/,"").split("#");l=n2(t,d.replace(/\/$/,"")),l!==void 0&&(i=l[nr],la(h)||(l=kx.get(l,decodeURIComponent(h.join("#")))))}if(l===void 0)throw new Error(`Could not find a definition for ${e}.`);const c=l[Or];if(c){if(r.includes(c)){if(r.length===1)throw new Error(`Definition for ${e} is a circular reference`);const[m,...y]=r,v=[...y,o,m].join(" -> ");throw new Error(`Definition for ${m} contains a circular reference through ${v}`)}const[f,d]=dR(Or,l),h=b$(d,t,[...r,o],i);return Object.keys(f).length>0?t[gv]===Ule||t[gv]===pS?{[Bc]:[f,h]}:{...f,...h}:h}return l}function S$(e,t={},r=Be(t,[nr])){return b$(e,t,[],r)}function Ol(e){let t;const r=Be(e,$le);return Pc(r)?t=r:r!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof r}" instead`),t}function Qv(e){return Array.isArray(e)?"array":typeof e=="string"?"string":e==null?"null":typeof e=="boolean"?"boolean":isNaN(e)?typeof e=="object"?"object":"string":"number"}function ol(e){let{type:t}=e;return!t&&e.const?Qv(e.const):!t&&e.enum?"string":!t&&(e.properties||e.additionalProperties||e.patternProperties)?"object":(Array.isArray(t)&&(t.length===2&&t.includes("null")?t=t.find(r=>r!=="null"):t=t[0]),t)}function ac(e,t){const r=Object.assign({},e);return Object.keys(t).reduce((i,o)=>{const l=e?e[o]:{},c=t[o];return e&&o in e&&Mn(c)?i[o]=ac(l,c):e&&t&&(ol(e)==="object"||ol(t)==="object")&&o===f$&&Array.isArray(l)&&Array.isArray(c)?i[o]=eY(l,c):i[o]=c,i},r)}function w$(e,t,r){var i;if(e&&r){const o=Be(e,r);if(o===void 0)return;for(let l=0;l<t.length;l++){const c=t[l],f=Be(c,[In,r],{});if(!(f.type==="object"||f.type==="array")&&(f.const===o||!((i=f.enum)===null||i===void 0)&&i.includes(o)))return l}}}function hR(e,t,r,i,o){if(t===void 0)return 0;const l=w$(t,r,o);if(Uz(l))return l;for(let c=0;c<r.length;c++){const f=r[c];if(o&&_n(f,[In,o])){const d=Be(t,o),h=Be(f,[In,o],{});if(e.isValid(h,d,i))return c}else if(f[In]){const d={anyOf:Object.keys(f[In]).map(m=>({required:[m]}))};let h;if(f.anyOf){const{...m}=f;m.allOf?m.allOf=m.allOf.slice():m.allOf=[],m.allOf.push(d),h=m}else h=Object.assign({},f,d);if(delete h.required,e.isValid(h,t,i))return c}else if(e.isValid(f,t,i))return c}return 0}function Ti(e,t,r={},i,o,l=!1){return bl(e,t,r,i,void 0,void 0,o,l)[0]}function hue(e,t,r,i,o,l,c){const{if:f,then:d,else:h,...m}=t,y=e.isValid(f,l||{},r);let v=[m],w=[];if(i)d&&typeof d!="boolean"&&(w=w.concat(bl(e,d,r,l,i,o,c))),h&&typeof h!="boolean"&&(w=w.concat(bl(e,h,r,l,i,o,c)));else{const b=y?d:h;b&&typeof b!="boolean"&&(w=w.concat(bl(e,b,r,l,i,o,c)))}return w.length&&(v=w.map(b=>ac(m,b))),v.flatMap(b=>bl(e,b,r,l,i,o,c))}function E$(e){return e.reduce((r,i)=>i.length>1?i.flatMap(o=>Bz(r.length,l=>[...r[l]].concat(o))):(r.forEach(o=>o.push(i[0])),r),[[]])}function _$(e,t){return Object.keys(e.patternProperties).filter(r=>RegExp(r).test(t)).reduce((r,i)=>(Fn(r,[i],e.patternProperties[i]),r),{})}function pue(e,t,r,i,o,l,c,f){const d=x$(e,t,r,i,o,l,c,f);if(d.length>1||d[0]!==t)return d;if(lR in t)return T$(e,t,r,i,o,l,c).flatMap(m=>bl(e,m,r,l,i,o,c));if(Bc in t&&Array.isArray(t[Bc])){const h=t.allOf.map(y=>bl(e,y,r,l,i,o,c));return E$(h).map(y=>({...t,allOf:y}))}return[t]}function x$(e,t,r,i,o,l,c,f){const d=Rp(t,r,o,void 0,f);return d!==t?bl(e,d,r,l,i,o,c,f):[t]}function Rp(e,t,r,i,o){if(!Mn(e))return e;let l=e;if(Or in l){const{$ref:c,...f}=l;if(r.includes(c))return l;r.push(c),l={...S$(c,t,i),...f},nr in l&&(i=l[nr])}if(In in l){const c=[],f=XK(l[In],(d,h,m)=>{const y=[...r];d[m]=Rp(h,t,y,i,o),c.push(y)},{});$K(r,Gz(yK(c))),l={...l,[In]:f}}if(Kp in l&&!Array.isArray(l.items)&&typeof l.items!="boolean"&&(l={...l,items:Rp(l.items,t,r,i,o)}),o){let c,f;Dn in e&&Array.isArray(e[Dn])?(c=Dn,f=l[Dn]):gn in e&&Array.isArray(e[gn])&&(c=gn,f=l[gn]),c&&f&&(l={...l,[c]:f.map(d=>Rp(d,t,r,i,o))})}return pr(e,l)?e:l}function mue(e,t,r,i,o){const l={...t,properties:{...t.properties}},c=i&&Mn(i)?i:{};return Object.keys(c).forEach(f=>{if(!(f in l.properties)){if(PC in l){const d=_$(l,f);if(!la(d)){l.properties[f]=Ti(e,{[Bc]:Object.values(d)},r,Be(c,[f]),o),Fn(l.properties,[f,ec],!0);return}}if(e2 in l&&l.additionalProperties!==!1){let d;typeof l.additionalProperties!="boolean"?Or in l.additionalProperties?d=Ti(e,{[Or]:Be(l.additionalProperties,[Or])},r,c,o):"type"in l.additionalProperties?d={...l.additionalProperties}:Dn in l.additionalProperties||gn in l.additionalProperties?d={type:"object",...l.additionalProperties}:d={type:Qv(Be(c,[f]))}:d={type:Qv(Be(c,[f]))},l.properties[f]=d,Fn(l.properties,[f,ec],!0)}else l.properties[f]={type:"null"},Fn(l.properties,[f,ec],!0)}}),l}const{compareSchemaDefinitions:gue,compareSchemaValues:yue}=Wle(),{mergeArrayOfSchemaDefinitions:vue}=oue({intersectJson:Gle(yue),deduplicateJsonSchemaDef:g$(gue)}),bue=uue(vue);function Sue(e){return bue(e)}function bl(e,t,r,i,o=!1,l=[],c,f){return Mn(t)?pue(e,t,r,o,l,i,c,f).flatMap(h=>{var m;let y=h;if(kle in y)return hue(e,y,r,o,l,i,c);if(Bc in y){if(o){const{allOf:w,...b}=y;return[...w,b]}try{const w=[],b=[];(m=y.allOf)===null||m===void 0||m.forEach(C=>{typeof C=="object"&&C.contains?w.push(C):b.push(C)}),w.length&&(y={...y,allOf:b}),y=c?c(y):Sue(y),w.length&&(y.allOf=w)}catch(w){console.warn(`could not merge subschemas in allOf:
59
+ `&&i++}}return[t,r]}class Une extends TransformStream{constructor({onError:t,onRetry:r,onComment:i}={}){let o;super({start(l){o=Pne({onEvent:c=>{l.enqueue(c)},onError(c){t==="terminate"?l.error(c):typeof t=="function"&&t(c)},onRetry:r,onComment:i})},transform(l){o.feed(l)}})}}const Lne={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2};class np extends Error{constructor(t,r){super(`Streamable HTTP error: ${r}`),this.code=t}}class qne{constructor(t,r){this._hasCompletedAuthFlow=!1,this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=r?.requestInit,this._authProvider=r?.authProvider,this._fetch=r?.fetch,this._fetchWithInit=tne(r?.fetch,r?.requestInit),this._sessionId=r?.sessionId,this._reconnectionOptions=r?.reconnectionOptions??Lne}async _authThenStart(){if(!this._authProvider)throw new tp("No auth provider");let t;try{t=await z1(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(r){throw this.onerror?.(r),r}if(t!=="AUTHORIZED")throw new tp;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){const t={};if(this._authProvider){const i=await this._authProvider.tokens();i&&(t.Authorization=`Bearer ${i.access_token}`)}this._sessionId&&(t["mcp-session-id"]=this._sessionId),this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const r=QT(this._requestInit?.headers);return new Headers({...t,...r})}async _startOrAuthSse(t){const{resumptionToken:r}=t;try{const i=await this._commonHeaders();i.set("Accept","text/event-stream"),r&&i.set("last-event-id",r);const o=await(this._fetch??fetch)(this._url,{method:"GET",headers:i,signal:this._abortController?.signal});if(!o.ok){if(await o.body?.cancel(),o.status===401&&this._authProvider)return await this._authThenStart();if(o.status===405)return;throw new np(o.status,`Failed to open SSE stream: ${o.statusText}`)}this._handleSseStream(o.body,t,!0)}catch(i){throw this.onerror?.(i),i}}_getNextReconnectionDelay(t){if(this._serverRetryMs!==void 0)return this._serverRetryMs;const r=this._reconnectionOptions.initialReconnectionDelay,i=this._reconnectionOptions.reconnectionDelayGrowFactor,o=this._reconnectionOptions.maxReconnectionDelay;return Math.min(r*Math.pow(i,t),o)}_scheduleReconnection(t,r=0){const i=this._reconnectionOptions.maxRetries;if(r>=i){this.onerror?.(new Error(`Maximum reconnection attempts (${i}) exceeded.`));return}const o=this._getNextReconnectionDelay(r);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(t).catch(l=>{this.onerror?.(new Error(`Failed to reconnect SSE stream: ${l instanceof Error?l.message:String(l)}`)),this._scheduleReconnection(t,r+1)})},o)}_handleSseStream(t,r,i){if(!t)return;const{onresumptiontoken:o,replayMessageId:l}=r;let c,f=!1,d=!1;(async()=>{try{const m=t.pipeThrough(new TextDecoderStream).pipeThrough(new Une({onRetry:w=>{this._serverRetryMs=w}})).getReader();for(;;){const{value:w,done:b}=await m.read();if(b)break;if(w.id&&(c=w.id,f=!0,o?.(w.id)),!!w.data&&(!w.event||w.event==="message"))try{const C=G_.parse(JSON.parse(w.data));hv(C)&&(d=!0,l!==void 0&&(C.id=l)),this.onmessage?.(C)}catch(C){this.onerror?.(C)}}(i||f)&&!d&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:c,onresumptiontoken:o,replayMessageId:l},0)}catch(m){if(this.onerror?.(new Error(`SSE stream disconnected: ${m}`)),(i||f)&&!d&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:c,onresumptiontoken:o,replayMessageId:l},0)}catch(w){this.onerror?.(new Error(`Failed to reconnect: ${w instanceof Error?w.message:String(w)}`))}}})()}async start(){if(this._abortController)throw new Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(t){if(!this._authProvider)throw new tp("No auth provider");if(await z1(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new tp("Failed to authorize")}async close(){this._reconnectionTimeout&&(clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=void 0),this._abortController?.abort(),this.onclose?.()}async send(t,r){try{const{resumptionToken:i,onresumptiontoken:o}=r||{};if(i){this._startOrAuthSse({resumptionToken:i,replayMessageId:XT(t)?t.id:void 0}).catch(v=>this.onerror?.(v));return}const l=await this._commonHeaders();l.set("content-type","application/json"),l.set("accept","application/json, text/event-stream");const c={...this._requestInit,method:"POST",headers:l,body:JSON.stringify(t),signal:this._abortController?.signal},f=await(this._fetch??fetch)(this._url,c),d=f.headers.get("mcp-session-id");if(d&&(this._sessionId=d),!f.ok){const v=await f.text().catch(()=>null);if(f.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new np(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl:w,scope:b}=c4(f);if(this._resourceMetadataUrl=w,this._scope=b,await z1(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new tp;return this._hasCompletedAuthFlow=!0,this.send(t)}if(f.status===403&&this._authProvider){const{resourceMetadataUrl:w,scope:b,error:C}=c4(f);if(C==="insufficient_scope"){const x=f.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===x)throw new np(403,"Server returned 403 after trying upscoping");if(b&&(this._scope=b),w&&(this._resourceMetadataUrl=w),this._lastUpscopingHeader=x??void 0,await z1(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new tp;return this.send(t)}}throw new np(f.status,`Error POSTing to endpoint: ${v}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,f.status===202){await f.body?.cancel(),bJ(t)&&this._startOrAuthSse({resumptionToken:void 0}).catch(v=>this.onerror?.(v));return}const m=(Array.isArray(t)?t:[t]).filter(v=>"method"in v&&"id"in v&&v.id!==void 0).length>0,y=f.headers.get("content-type");if(m)if(y?.includes("text/event-stream"))this._handleSseStream(f.body,{onresumptiontoken:o},!1);else if(y?.includes("application/json")){const v=await f.json(),w=Array.isArray(v)?v.map(b=>G_.parse(b)):[G_.parse(v)];for(const b of w)this.onmessage?.(b)}else throw await f.body?.cancel(),new np(-1,`Unexpected content type: ${y}`);else await f.body?.cancel()}catch(i){throw this.onerror?.(i),i}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{const t=await this._commonHeaders(),r={...this._requestInit,method:"DELETE",headers:t,signal:this._abortController?.signal},i=await(this._fetch??fetch)(this._url,r);if(await i.body?.cancel(),!i.ok&&i.status!==405)throw new np(i.status,`Failed to terminate session: ${i.statusText}`);this._sessionId=void 0}catch(t){throw this.onerror?.(t),t}}setProtocolVersion(t){this._protocolVersion=t}get protocolVersion(){return this._protocolVersion}async resumeStream(t,r){await this._startOrAuthSse({resumptionToken:t,onresumptiontoken:r?.onresumptiontoken})}}class Vne{client=null;transport=null;async connect(t){const r=typeof t=="string"?new URL(t):t;this.transport=new qne(r),this.client=new ene({name:"mcp-client",version:"1.0.0"},{capabilities:{experimental:{tools:{},resources:{},prompts:{}}}}),await this.client.connect(this.transport)}async listTools(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return(await this.client.listTools()).tools}async callTool(t,r){if(!this.client)throw new Error("Client not connected. Call connect() first.");return await this.client.callTool({name:t,arguments:r??{}})}async listResources(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return(await this.client.listResources()).resources}async readResource(t){if(!this.client)throw new Error("Client not connected. Call connect() first.");return await this.client.readResource({uri:t})}async listPrompts(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return(await this.client.listPrompts()).prompts}async getPrompt(t,r){if(!this.client)throw new Error("Client not connected. Call connect() first.");return await this.client.getPrompt({name:t,...r&&{arguments:r}})}getServerInfo(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return this.client._serverVersion}async close(){this.client&&(await this.client.close(),this.client=null),this.transport&&(this.transport=null)}}const Tb=new Vne;Tb.connect("http://localhost:3000/mcp").then(()=>{console.info("Connected to MCP server")});const Bne={theme:"light",userAgent:{device:{type:"desktop"},capabilities:{hover:!0,touch:!1}},locale:"en-US",maxHeight:600,displayMode:"inline",safeArea:{insets:{top:0,bottom:0,left:0,right:0}},toolInput:{},toolOutput:null,toolResponseMetadata:null,view:{mode:"inline"},widgetState:null},E9=()=>{const{data:e}=ak({queryKey:["list-tools"],queryFn:()=>Tb.listTools()});return e},Fne=()=>Tb.getServerInfo(),Hne=()=>{const{setToolData:e}=fm();return hL({mutationFn:async({toolName:t,args:r})=>{e(t,{input:r??{},response:void 0,openaiRef:null,openaiLogs:[],openaiObject:null});const i=await Tb.callTool(t,r);return e(t,{input:r??{},response:i,openaiRef:null,openaiLogs:[],openaiObject:{...Bne,toolInput:r??{},toolOutput:i.structuredContent,toolResponseMetadata:i.meta,widgetState:null}}),i}})},AO=()=>{const[e]=YA();return E9().find(r=>r.name===e)??null},Vh=()=>{const e=AO();if(!e)throw new Error("No tool is currently selected");return e},Gne=e=>ak({queryKey:["resource",e],queryFn:async()=>{if(!e)throw new Error("Resource URI is required");return await Tb.readResource(e)}});const Kne=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Yne=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,i)=>i?i.toUpperCase():r.toLowerCase()),h4=e=>{const t=Yne(e);return t.charAt(0).toUpperCase()+t.slice(1)},_9=(...e)=>e.filter((t,r,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===r).join(" ").trim(),Zne=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Xne={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Qne=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:o="",children:l,iconNode:c,...f},d)=>j.createElement("svg",{ref:d,...Xne,width:t,height:t,stroke:e,strokeWidth:i?Number(r)*24/Number(t):r,className:_9("lucide",o),...!l&&!Zne(f)&&{"aria-hidden":"true"},...f},[...c.map(([h,m])=>j.createElement(h,m)),...Array.isArray(l)?l:[l]]));const Nl=(e,t)=>{const r=j.forwardRef(({className:i,...o},l)=>j.createElement(Qne,{ref:l,iconNode:t,className:_9(`lucide-${Kne(h4(e))}`,`lucide-${e}`,i),...o}));return r.displayName=h4(e),r};const Wne=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Jne=Nl("check",Wne);const ere=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],x9=Nl("chevron-down",ere);const tre=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],nre=Nl("chevron-up",tre);const rre=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],are=Nl("circle-alert",rre);const ire=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],sre=Nl("external-link",ire);const ore=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],lre=Nl("loader-circle",ore);const ure=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],cre=Nl("moon",ure);const fre=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],dre=Nl("play",fre);const hre=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],pre=Nl("sun",hre);const mre=[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],gre=Nl("trash",mre);function G2(){return typeof window<"u"}function Qc(e){return OO(e)?(e.nodeName||"").toLowerCase():"#document"}function ja(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kl(e){var t;return(t=(OO(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function OO(e){return G2()?e instanceof Node||e instanceof ja(e).Node:!1}function Ir(e){return G2()?e instanceof Element||e instanceof ja(e).Element:!1}function Jr(e){return G2()?e instanceof HTMLElement||e instanceof ja(e).HTMLElement:!1}function cC(e){return!G2()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ja(e).ShadowRoot}const yre=new Set(["inline","contents"]);function Bh(e){const{overflow:t,overflowX:r,overflowY:i,display:o}=Bs(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+r)&&!yre.has(o)}const vre=new Set(["table","td","th"]);function bre(e){return vre.has(Qc(e))}const Sre=[":popover-open",":modal"];function K2(e){return Sre.some(t=>{try{return e.matches(t)}catch{return!1}})}const wre=["transform","translate","scale","rotate","perspective"],Ere=["transform","translate","scale","rotate","perspective","filter"],_re=["paint","layout","strict","content"];function RO(e){const t=Y2(),r=Ir(e)?Bs(e):e;return wre.some(i=>r[i]?r[i]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||Ere.some(i=>(r.willChange||"").includes(i))||_re.some(i=>(r.contain||"").includes(i))}function xre(e){let t=tc(e);for(;Jr(t)&&!Ju(t);){if(RO(t))return t;if(K2(t))return null;t=tc(t)}return null}function Y2(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Tre=new Set(["html","body","#document"]);function Ju(e){return Tre.has(Qc(e))}function Bs(e){return ja(e).getComputedStyle(e)}function Z2(e){return Ir(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tc(e){if(Qc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||cC(e)&&e.host||kl(e);return cC(t)?t.host:t}function T9(e){const t=tc(e);return Ju(t)?e.ownerDocument?e.ownerDocument.body:e.body:Jr(t)&&Bh(t)?t:T9(t)}function Oc(e,t,r){var i;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=T9(e),l=o===((i=e.ownerDocument)==null?void 0:i.body),c=ja(o);if(l){const f=fC(c);return t.concat(c,c.visualViewport||[],Bh(o)?o:[],f&&r?Oc(f):[])}return t.concat(o,Oc(o,[],r))}function fC(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const p4={};function Al(e,t){const r=j.useRef(p4);return r.current===p4&&(r.current=e(t)),r}const cx=im[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Cre=cx&&cx!==j.useLayoutEffect?cx:e=>e();function Ct(e){const t=Al(Are).current;return t.next=e,Cre(t.effect),t.trampoline}function Are(){const e={next:void 0,callback:Ore,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Ore(){}const Rre=()=>{},St=typeof document<"u"?j.useLayoutEffect:Rre;function dC(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const _v={};function X2(e,t,r,i,o){let l={...hC(e,_v)};return t&&(l=pv(l,t)),r&&(l=pv(l,r)),i&&(l=pv(l,i)),o&&(l=pv(l,o)),l}function Mre(e){if(e.length===0)return _v;if(e.length===1)return hC(e[0],_v);let t={...hC(e[0],_v)};for(let r=1;r<e.length;r+=1)t=pv(t,e[r]);return t}function pv(e,t){return C9(t)?t(e):jre(e,t)}function jre(e,t){if(!t)return e;for(const r in t){const i=t[r];switch(r){case"style":{e[r]=dC(e.style,i);break}case"className":{e[r]=A9(e.className,i);break}default:Dre(r,i)?e[r]=Nre(e[r],i):e[r]=i}}return e}function Dre(e,t){const r=e.charCodeAt(0),i=e.charCodeAt(1),o=e.charCodeAt(2);return r===111&&i===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function C9(e){return typeof e=="function"}function hC(e,t){return C9(e)?e(t):e??_v}function Nre(e,t){return t?e?r=>{if(kre(r)){const o=r;pC(o);const l=t(o);return o.baseUIHandlerPrevented||e?.(o),l}const i=t(r);return e?.(r),i}:t:e}function pC(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function A9(e,t){return t?e?t+" "+e:t:e}function kre(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function zl(e,...t){const r=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(i=>r.searchParams.append("args[]",i)),`Base UI error #${e}; visit ${r} for the full message.`}const O9=j.createContext(void 0);function R9(e=!1){const t=j.useContext(O9);if(t===void 0&&!e)throw new Error(zl(16));return t}function zre(e){const{focusableWhenDisabled:t,disabled:r,composite:i=!1,tabIndex:o=0,isNativeButton:l}=e,c=i&&t!==!1,f=i&&t===!1;return{props:j.useMemo(()=>{const h={onKeyDown(m){r&&t&&m.key!=="Tab"&&m.preventDefault()}};return i||(h.tabIndex=o,!l&&r&&(h.tabIndex=t?o:-1)),(l&&(t||c)||!l&&r)&&(h["aria-disabled"]=r),l&&(!t||f)&&(h.disabled=r),h},[i,r,t,c,f,l,o])}}function Q2(e={}){const{disabled:t=!1,focusableWhenDisabled:r,tabIndex:i=0,native:o=!0}=e,l=j.useRef(null),c=R9(!0)!==void 0,f=Ct(()=>{const v=l.current;return!!(v?.tagName==="A"&&v?.href)}),{props:d}=zre({focusableWhenDisabled:r,disabled:t,composite:c,tabIndex:i,isNativeButton:o}),h=j.useCallback(()=>{const v=l.current;$re(v)&&c&&t&&d.disabled===void 0&&v.disabled&&(v.disabled=!1)},[t,d.disabled,c]);St(h,[h]);const m=j.useCallback((v={})=>{const{onClick:w,onMouseDown:b,onKeyUp:C,onKeyDown:x,onPointerDown:_,...S}=v;return X2({type:o?"button":void 0,onClick(E){if(t){E.preventDefault();return}w?.(E)},onMouseDown(E){t||b?.(E)},onKeyDown(E){if(t||(pC(E),x?.(E)),E.baseUIHandlerPrevented)return;const O=E.target===E.currentTarget&&!o&&!f()&&!t,T=E.key==="Enter",M=E.key===" ";O&&((M||T)&&E.preventDefault(),T&&w?.(E))},onKeyUp(E){t||(pC(E),C?.(E)),!E.baseUIHandlerPrevented&&E.target===E.currentTarget&&!o&&!t&&E.key===" "&&w?.(E)},onPointerDown(E){if(t){E.preventDefault();return}_?.(E)}},o?void 0:{role:"button"},d,S)},[t,d,o,f]),y=Ct(v=>{l.current=v,h()});return{getButtonProps:m,buttonRef:y}}function $re(e){return Jr(e)&&e.tagName==="BUTTON"}function Lc(e,t,r,i){const o=Al(M9).current;return Ire(o,e,t,r,i)&&j9(o,[e,t,r,i]),o.callback}function Pre(e){const t=Al(M9).current;return Ure(t,e)&&j9(t,e),t.callback}function M9(){return{callback:null,cleanup:null,refs:[]}}function Ire(e,t,r,i,o){return e.refs[0]!==t||e.refs[1]!==r||e.refs[2]!==i||e.refs[3]!==o}function Ure(e,t){return e.refs.length!==t.length||e.refs.some((r,i)=>r!==t[i])}function j9(e,t){if(e.refs=t,t.every(r=>r==null)){e.callback=null;return}e.callback=r=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),r!=null){const i=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const l=t[o];if(l!=null)switch(typeof l){case"function":{const c=l(r);typeof c=="function"&&(i[o]=c);break}case"object":{l.current=r;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const l=t[o];if(l!=null)switch(typeof l){case"function":{const c=i[o];typeof c=="function"?c():l(null);break}case"object":{l.current=null;break}}}}}}}const Lre=parseInt(j.version,10);function MO(e){return Lre>=e}function m4(e){if(!j.isValidElement(e))return null;const t=e,r=t.props;return(MO(19)?r?.ref:t.ref)??null}function qre(e,t){const r={};for(const i in e){const o=e[i];if(t?.hasOwnProperty(i)){const l=t[i](o);l!=null&&Object.assign(r,l);continue}o===!0?r[`data-${i.toLowerCase()}`]="":o&&(r[`data-${i.toLowerCase()}`]=o.toString())}return r}function Vre(e,t){return typeof e=="function"?e(t):e}function Bre(e,t){return typeof e=="function"?e(t):e}function Ps(){}const Fp=Object.freeze([]),Is=Object.freeze({}),Fre={style:{transition:"none"}},Hre="data-base-ui-click-trigger",Gre={fallbackAxisSide:"none"},Kre={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function $a(e,t,r={}){const i=t.render,o=Yre(t,r);if(r.enabled===!1)return null;const l=r.state??Is;return Zre(e,i,o,l)}function Yre(e,t={}){const{className:r,style:i,render:o}=e,{state:l=Is,ref:c,props:f,stateAttributesMapping:d,enabled:h=!0}=t,m=h?Vre(r,l):void 0,y=h?Bre(i,l):void 0,v=h?qre(l,d):Is,w=h?dC(v,Array.isArray(f)?Mre(f):f)??Is:Is;return typeof document<"u"&&(h?Array.isArray(c)?w.ref=Pre([w.ref,m4(o),...c]):w.ref=Lc(w.ref,m4(o),c):Lc(null,null)),h?(m!==void 0&&(w.className=A9(w.className,m)),y!==void 0&&(w.style=dC(w.style,y)),w):Is}function Zre(e,t,r,i){if(t){if(typeof t=="function")return t(r,i);const o=X2(r,t.props);return o.ref=r.ref,j.cloneElement(t,o)}if(e&&typeof e=="string")return Xre(e,r);throw new Error(zl(8))}function Xre(e,t){return e==="button"?j.createElement("button",{type:"button",...t,key:t.key}):e==="img"?j.createElement("img",{alt:"",...t,key:t.key}):j.createElement(e,t)}const Qre=j.forwardRef(function(t,r){const{render:i,className:o,disabled:l=!1,focusableWhenDisabled:c=!1,nativeButton:f=!0,...d}=t,h=!!l,{getButtonProps:m,buttonRef:y}=Q2({disabled:h,focusableWhenDisabled:c,native:f}),v=j.useMemo(()=>({disabled:h}),[h]);return $a("button",t,{state:v,ref:[r,y],props:[d,m]})}),g4=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,y4=AA,Wc=(e,t)=>r=>{var i;if(t?.variants==null)return y4(e,r?.class,r?.className);const{variants:o,defaultVariants:l}=t,c=Object.keys(o).map(h=>{const m=r?.[h],y=l?.[h];if(m===null)return null;const v=g4(m)||g4(y);return o[h][v]}),f=r&&Object.entries(r).reduce((h,m)=>{let[y,v]=m;return v===void 0||(h[y]=v),h},{}),d=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((h,m)=>{let{class:y,className:v,...w}=m;return Object.entries(w).every(b=>{let[C,x]=b;return Array.isArray(x)?x.includes({...l,...f}[C]):{...l,...f}[C]===x})?[...h,y,v]:h},[]);return y4(e,c,d,r?.class,r?.className)},Wre=Wc("focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-none border border-transparent bg-clip-padding text-xs font-medium focus-visible:ring-1 aria-invalid:ring-1 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",destructive:"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-none px-2 text-xs has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-none px-2.5 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-8","icon-xs":"size-6 rounded-none [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-none","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Hv({className:e,variant:t="default",size:r="default",...i}){return N.jsx(Qre,{"data-slot":"button",className:Vn(Wre({variant:t,size:r,className:e})),...i})}const Jre=()=>{const e=Fne(),t=e?.name,r=e?.version,[,i]=YA();return N.jsx("div",{className:"flex flex-col border-b border-border bg-background",children:N.jsxs("div",{className:"flex h-14 items-center justify-between px-4",children:[N.jsxs("div",{className:"flex items-center gap-4",children:[N.jsx("button",{type:"button",className:"font-semibold cursor-pointer",onClick:()=>{i(null)},children:"Skybridge"}),N.jsx("span",{className:"h-4 w-px bg-border","aria-hidden":"true"}),N.jsxs("div",{className:"flex items-center gap-4 rounded-md border border-border bg-muted px-2 py-1",children:[N.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t}),N.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",r]})]}),N.jsxs("span",{className:"flex items-center gap-1 rounded-full bg-green-100 px-2 py-0.5 text-xs font-semibold text-green-800",children:[N.jsx("span",{className:"h-2 w-2 rounded-full bg-green-500 mr-1 inline-block"}),"Connected"]})]}),N.jsx("div",{className:"flex items-center gap-2",children:N.jsx(Hv,{variant:"ghost",size:"sm",className:"h-8 gap-2",children:N.jsxs("a",{href:"https://www.skybridge.tech/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:["Learn more about Skybridge",N.jsx(sre,{className:"h-3.5 w-3.5"})]})})})]})})},D9=j.createContext({});function eae(e){const t=j.useRef(null);return t.current===null&&(t.current=e()),t.current}const jO=typeof window<"u",tae=jO?j.useLayoutEffect:j.useEffect,DO=j.createContext(null);function NO(e,t){e.indexOf(t)===-1&&e.push(t)}function kO(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}const nc=(e,t,r)=>r>t?t:r<e?e:r;let zO=()=>{};const rc={},N9=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function k9(e){return typeof e=="object"&&e!==null}const z9=e=>/^0[^.\s]+$/u.test(e);function $O(e){let t;return()=>(t===void 0&&(t=e()),t)}const ro=e=>e,nae=(e,t)=>r=>t(e(r)),Cb=(...e)=>e.reduce(nae),Gv=(e,t,r)=>{const i=t-e;return i===0?1:(r-e)/i};class PO{constructor(){this.subscriptions=[]}add(t){return NO(this.subscriptions,t),()=>kO(this.subscriptions,t)}notify(t,r,i){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,r,i);else for(let l=0;l<o;l++){const c=this.subscriptions[l];c&&c(t,r,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const _l=e=>e*1e3,to=e=>e/1e3;function $9(e,t){return t?e*(1e3/t):0}const P9=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,rae=1e-7,aae=12;function iae(e,t,r,i,o){let l,c,f=0;do c=t+(r-t)/2,l=P9(c,i,o)-e,l>0?r=c:t=c;while(Math.abs(l)>rae&&++f<aae);return c}function Ab(e,t,r,i){if(e===t&&r===i)return ro;const o=l=>iae(l,0,1,e,r);return l=>l===0||l===1?l:P9(o(l),t,i)}const I9=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,U9=e=>t=>1-e(1-t),L9=Ab(.33,1.53,.69,.99),IO=U9(L9),q9=I9(IO),V9=e=>(e*=2)<1?.5*IO(e):.5*(2-Math.pow(2,-10*(e-1))),UO=e=>1-Math.sin(Math.acos(e)),B9=U9(UO),F9=I9(UO),sae=Ab(.42,0,1,1),oae=Ab(0,0,.58,1),H9=Ab(.42,0,.58,1),lae=e=>Array.isArray(e)&&typeof e[0]!="number",G9=e=>Array.isArray(e)&&typeof e[0]=="number",uae={linear:ro,easeIn:sae,easeInOut:H9,easeOut:oae,circIn:UO,circInOut:F9,circOut:B9,backIn:IO,backInOut:q9,backOut:L9,anticipate:V9},cae=e=>typeof e=="string",v4=e=>{if(G9(e)){zO(e.length===4);const[t,r,i,o]=e;return Ab(t,r,i,o)}else if(cae(e))return uae[e];return e},$1=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function fae(e,t){let r=new Set,i=new Set,o=!1,l=!1;const c=new WeakSet;let f={delta:0,timestamp:0,isProcessing:!1};function d(m){c.has(m)&&(h.schedule(m),e()),m(f)}const h={schedule:(m,y=!1,v=!1)=>{const b=v&&o?r:i;return y&&c.add(m),b.has(m)||b.add(m),m},cancel:m=>{i.delete(m),c.delete(m)},process:m=>{if(f=m,o){l=!0;return}o=!0,[r,i]=[i,r],r.forEach(d),r.clear(),o=!1,l&&(l=!1,h.process(m))}};return h}const dae=40;function K9(e,t){let r=!1,i=!0;const o={delta:0,timestamp:0,isProcessing:!1},l=()=>r=!0,c=$1.reduce((A,E)=>(A[E]=fae(l),A),{}),{setup:f,read:d,resolveKeyframes:h,preUpdate:m,update:y,preRender:v,render:w,postRender:b}=c,C=()=>{const A=rc.useManualTiming?o.timestamp:performance.now();r=!1,rc.useManualTiming||(o.delta=i?1e3/60:Math.max(Math.min(A-o.timestamp,dae),1)),o.timestamp=A,o.isProcessing=!0,f.process(o),d.process(o),h.process(o),m.process(o),y.process(o),v.process(o),w.process(o),b.process(o),o.isProcessing=!1,r&&t&&(i=!1,e(C))},x=()=>{r=!0,i=!0,o.isProcessing||e(C)};return{schedule:$1.reduce((A,E)=>{const O=c[E];return A[E]=(T,M=!1,D=!1)=>(r||x(),O.schedule(T,M,D)),A},{}),cancel:A=>{for(let E=0;E<$1.length;E++)c[$1[E]].cancel(A)},state:o,steps:c}}const{schedule:Ur,cancel:qc,state:li,steps:fx}=K9(typeof requestAnimationFrame<"u"?requestAnimationFrame:ro,!0);let uS;function hae(){uS=void 0}const Wi={now:()=>(uS===void 0&&Wi.set(li.isProcessing||rc.useManualTiming?li.timestamp:performance.now()),uS),set:e=>{uS=e,queueMicrotask(hae)}},Y9=e=>t=>typeof t=="string"&&t.startsWith(e),Z9=Y9("--"),pae=Y9("var(--"),LO=e=>pae(e)?mae.test(e.split("/*")[0].trim()):!1,mae=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,mm={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Kv={...mm,transform:e=>nc(0,1,e)},P1={...mm,default:1},xv=e=>Math.round(e*1e5)/1e5,qO=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function gae(e){return e==null}const yae=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,VO=(e,t)=>r=>!!(typeof r=="string"&&yae.test(r)&&r.startsWith(e)||t&&!gae(r)&&Object.prototype.hasOwnProperty.call(r,t)),X9=(e,t,r)=>i=>{if(typeof i!="string")return i;const[o,l,c,f]=i.match(qO);return{[e]:parseFloat(o),[t]:parseFloat(l),[r]:parseFloat(c),alpha:f!==void 0?parseFloat(f):1}},vae=e=>nc(0,255,e),dx={...mm,transform:e=>Math.round(vae(e))},bh={test:VO("rgb","red"),parse:X9("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:i=1})=>"rgba("+dx.transform(e)+", "+dx.transform(t)+", "+dx.transform(r)+", "+xv(Kv.transform(i))+")"};function bae(e){let t="",r="",i="",o="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),i=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),i=e.substring(3,4),o=e.substring(4,5),t+=t,r+=r,i+=i,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(i,16),alpha:o?parseInt(o,16)/255:1}}const mC={test:VO("#"),parse:bae,transform:bh.transform},Ob=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),yc=Ob("deg"),xl=Ob("%"),lt=Ob("px"),Sae=Ob("vh"),wae=Ob("vw"),b4={...xl,parse:e=>xl.parse(e)/100,transform:e=>xl.transform(e*100)},yp={test:VO("hsl","hue"),parse:X9("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:i=1})=>"hsla("+Math.round(e)+", "+xl.transform(xv(t))+", "+xl.transform(xv(r))+", "+xv(Kv.transform(i))+")"},oa={test:e=>bh.test(e)||mC.test(e)||yp.test(e),parse:e=>bh.test(e)?bh.parse(e):yp.test(e)?yp.parse(e):mC.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?bh.transform(e):yp.transform(e),getAnimatableNone:e=>{const t=oa.parse(e);return t.alpha=0,oa.transform(t)}},Eae=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function _ae(e){return isNaN(e)&&typeof e=="string"&&(e.match(qO)?.length||0)+(e.match(Eae)?.length||0)>0}const Q9="number",W9="color",xae="var",Tae="var(",S4="${}",Cae=/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 Yv(e){const t=e.toString(),r=[],i={color:[],number:[],var:[]},o=[];let l=0;const f=t.replace(Cae,d=>(oa.test(d)?(i.color.push(l),o.push(W9),r.push(oa.parse(d))):d.startsWith(Tae)?(i.var.push(l),o.push(xae),r.push(d)):(i.number.push(l),o.push(Q9),r.push(parseFloat(d))),++l,S4)).split(S4);return{values:r,split:f,indexes:i,types:o}}function J9(e){return Yv(e).values}function e8(e){const{split:t,types:r}=Yv(e),i=t.length;return o=>{let l="";for(let c=0;c<i;c++)if(l+=t[c],o[c]!==void 0){const f=r[c];f===Q9?l+=xv(o[c]):f===W9?l+=oa.transform(o[c]):l+=o[c]}return l}}const Aae=e=>typeof e=="number"?0:oa.test(e)?oa.getAnimatableNone(e):e;function Oae(e){const t=J9(e);return e8(e)(t.map(Aae))}const Vc={test:_ae,parse:J9,createTransformer:e8,getAnimatableNone:Oae};function hx(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Rae({hue:e,saturation:t,lightness:r,alpha:i}){e/=360,t/=100,r/=100;let o=0,l=0,c=0;if(!t)o=l=c=r;else{const f=r<.5?r*(1+t):r+t-r*t,d=2*r-f;o=hx(d,f,e+1/3),l=hx(d,f,e),c=hx(d,f,e-1/3)}return{red:Math.round(o*255),green:Math.round(l*255),blue:Math.round(c*255),alpha:i}}function YS(e,t){return r=>r>0?t:e}const Hr=(e,t,r)=>e+(t-e)*r,px=(e,t,r)=>{const i=e*e,o=r*(t*t-i)+i;return o<0?0:Math.sqrt(o)},Mae=[mC,bh,yp],jae=e=>Mae.find(t=>t.test(e));function w4(e){const t=jae(e);if(!t)return!1;let r=t.parse(e);return t===yp&&(r=Rae(r)),r}const E4=(e,t)=>{const r=w4(e),i=w4(t);if(!r||!i)return YS(e,t);const o={...r};return l=>(o.red=px(r.red,i.red,l),o.green=px(r.green,i.green,l),o.blue=px(r.blue,i.blue,l),o.alpha=Hr(r.alpha,i.alpha,l),bh.transform(o))},gC=new Set(["none","hidden"]);function Dae(e,t){return gC.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function Nae(e,t){return r=>Hr(e,t,r)}function BO(e){return typeof e=="number"?Nae:typeof e=="string"?LO(e)?YS:oa.test(e)?E4:$ae:Array.isArray(e)?t8:typeof e=="object"?oa.test(e)?E4:kae:YS}function t8(e,t){const r=[...e],i=r.length,o=e.map((l,c)=>BO(l)(l,t[c]));return l=>{for(let c=0;c<i;c++)r[c]=o[c](l);return r}}function kae(e,t){const r={...e,...t},i={};for(const o in r)e[o]!==void 0&&t[o]!==void 0&&(i[o]=BO(e[o])(e[o],t[o]));return o=>{for(const l in i)r[l]=i[l](o);return r}}function zae(e,t){const r=[],i={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const l=t.types[o],c=e.indexes[l][i[l]],f=e.values[c]??0;r[o]=f,i[l]++}return r}const $ae=(e,t)=>{const r=Vc.createTransformer(t),i=Yv(e),o=Yv(t);return i.indexes.var.length===o.indexes.var.length&&i.indexes.color.length===o.indexes.color.length&&i.indexes.number.length>=o.indexes.number.length?gC.has(e)&&!o.values.length||gC.has(t)&&!i.values.length?Dae(e,t):Cb(t8(zae(i,o),o.values),r):YS(e,t)};function n8(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?Hr(e,t,r):BO(e)(e,t)}const Pae=e=>{const t=({timestamp:r})=>e(r);return{start:(r=!0)=>Ur.update(t,r),stop:()=>qc(t),now:()=>li.isProcessing?li.timestamp:Wi.now()}},r8=(e,t,r=10)=>{let i="";const o=Math.max(Math.round(t/r),2);for(let l=0;l<o;l++)i+=Math.round(e(l/(o-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},ZS=2e4;function FO(e){let t=0;const r=50;let i=e.next(t);for(;!i.done&&t<ZS;)t+=r,i=e.next(t);return t>=ZS?1/0:t}function Iae(e,t=100,r){const i=r({...e,keyframes:[0,t]}),o=Math.min(FO(i),ZS);return{type:"keyframes",ease:l=>i.next(o*l).value/t,duration:to(o)}}const Uae=5;function a8(e,t,r){const i=Math.max(t-Uae,0);return $9(r-e(i),t-i)}const Qr={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},mx=.001;function Lae({duration:e=Qr.duration,bounce:t=Qr.bounce,velocity:r=Qr.velocity,mass:i=Qr.mass}){let o,l,c=1-t;c=nc(Qr.minDamping,Qr.maxDamping,c),e=nc(Qr.minDuration,Qr.maxDuration,to(e)),c<1?(o=h=>{const m=h*c,y=m*e,v=m-r,w=yC(h,c),b=Math.exp(-y);return mx-v/w*b},l=h=>{const y=h*c*e,v=y*r+r,w=Math.pow(c,2)*Math.pow(h,2)*e,b=Math.exp(-y),C=yC(Math.pow(h,2),c);return(-o(h)+mx>0?-1:1)*((v-w)*b)/C}):(o=h=>{const m=Math.exp(-h*e),y=(h-r)*e+1;return-mx+m*y},l=h=>{const m=Math.exp(-h*e),y=(r-h)*(e*e);return m*y});const f=5/e,d=Vae(o,l,f);if(e=_l(e),isNaN(d))return{stiffness:Qr.stiffness,damping:Qr.damping,duration:e};{const h=Math.pow(d,2)*i;return{stiffness:h,damping:c*2*Math.sqrt(i*h),duration:e}}}const qae=12;function Vae(e,t,r){let i=r;for(let o=1;o<qae;o++)i=i-e(i)/t(i);return i}function yC(e,t){return e*Math.sqrt(1-t*t)}const Bae=["duration","bounce"],Fae=["stiffness","damping","mass"];function _4(e,t){return t.some(r=>e[r]!==void 0)}function Hae(e){let t={velocity:Qr.velocity,stiffness:Qr.stiffness,damping:Qr.damping,mass:Qr.mass,isResolvedFromDuration:!1,...e};if(!_4(e,Fae)&&_4(e,Bae))if(e.visualDuration){const r=e.visualDuration,i=2*Math.PI/(r*1.2),o=i*i,l=2*nc(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Qr.mass,stiffness:o,damping:l}}else{const r=Lae(e);t={...t,...r,mass:Qr.mass},t.isResolvedFromDuration=!0}return t}function XS(e=Qr.visualDuration,t=Qr.bounce){const r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:o}=r;const l=r.keyframes[0],c=r.keyframes[r.keyframes.length-1],f={done:!1,value:l},{stiffness:d,damping:h,mass:m,duration:y,velocity:v,isResolvedFromDuration:w}=Hae({...r,velocity:-to(r.velocity||0)}),b=v||0,C=h/(2*Math.sqrt(d*m)),x=c-l,_=to(Math.sqrt(d/m)),S=Math.abs(x)<5;i||(i=S?Qr.restSpeed.granular:Qr.restSpeed.default),o||(o=S?Qr.restDelta.granular:Qr.restDelta.default);let A;if(C<1){const O=yC(_,C);A=T=>{const M=Math.exp(-C*_*T);return c-M*((b+C*_*x)/O*Math.sin(O*T)+x*Math.cos(O*T))}}else if(C===1)A=O=>c-Math.exp(-_*O)*(x+(b+_*x)*O);else{const O=_*Math.sqrt(C*C-1);A=T=>{const M=Math.exp(-C*_*T),D=Math.min(O*T,300);return c-M*((b+C*_*x)*Math.sinh(D)+O*x*Math.cosh(D))/O}}const E={calculatedDuration:w&&y||null,next:O=>{const T=A(O);if(w)f.done=O>=y;else{let M=O===0?b:0;C<1&&(M=O===0?_l(b):a8(A,O,T));const D=Math.abs(M)<=i,P=Math.abs(c-T)<=o;f.done=D&&P}return f.value=f.done?c:T,f},toString:()=>{const O=Math.min(FO(E),ZS),T=r8(M=>E.next(O*M).value,O,30);return O+"ms "+T},toTransition:()=>{}};return E}XS.applyToOptions=e=>{const t=Iae(e,100,XS);return e.ease=t.ease,e.duration=_l(t.duration),e.type="keyframes",e};function vC({keyframes:e,velocity:t=0,power:r=.8,timeConstant:i=325,bounceDamping:o=10,bounceStiffness:l=500,modifyTarget:c,min:f,max:d,restDelta:h=.5,restSpeed:m}){const y=e[0],v={done:!1,value:y},w=D=>f!==void 0&&D<f||d!==void 0&&D>d,b=D=>f===void 0?d:d===void 0||Math.abs(f-D)<Math.abs(d-D)?f:d;let C=r*t;const x=y+C,_=c===void 0?x:c(x);_!==x&&(C=_-y);const S=D=>-C*Math.exp(-D/i),A=D=>_+S(D),E=D=>{const P=S(D),V=A(D);v.done=Math.abs(P)<=h,v.value=v.done?_:V};let O,T;const M=D=>{w(v.value)&&(O=D,T=XS({keyframes:[v.value,b(v.value)],velocity:a8(A,D,v.value),damping:o,stiffness:l,restDelta:h,restSpeed:m}))};return M(0),{calculatedDuration:null,next:D=>{let P=!1;return!T&&O===void 0&&(P=!0,E(D),M(D)),O!==void 0&&D>=O?T.next(D-O):(!P&&E(D),v)}}}function Gae(e,t,r){const i=[],o=r||rc.mix||n8,l=e.length-1;for(let c=0;c<l;c++){let f=o(e[c],e[c+1]);if(t){const d=Array.isArray(t)?t[c]||ro:t;f=Cb(d,f)}i.push(f)}return i}function Kae(e,t,{clamp:r=!0,ease:i,mixer:o}={}){const l=e.length;if(zO(l===t.length),l===1)return()=>t[0];if(l===2&&t[0]===t[1])return()=>t[1];const c=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),t=[...t].reverse());const f=Gae(t,i,o),d=f.length,h=m=>{if(c&&m<e[0])return t[0];let y=0;if(d>1)for(;y<e.length-2&&!(m<e[y+1]);y++);const v=Gv(e[y],e[y+1],m);return f[y](v)};return r?m=>h(nc(e[0],e[l-1],m)):h}function Yae(e,t){const r=e[e.length-1];for(let i=1;i<=t;i++){const o=Gv(0,t,i);e.push(Hr(r,1,o))}}function Zae(e){const t=[0];return Yae(t,e.length-1),t}function Xae(e,t){return e.map(r=>r*t)}function Qae(e,t){return e.map(()=>t||H9).splice(0,e.length-1)}function Tv({duration:e=300,keyframes:t,times:r,ease:i="easeInOut"}){const o=lae(i)?i.map(v4):v4(i),l={done:!1,value:t[0]},c=Xae(r&&r.length===t.length?r:Zae(t),e),f=Kae(c,t,{ease:Array.isArray(o)?o:Qae(t,o)});return{calculatedDuration:e,next:d=>(l.value=f(d),l.done=d>=e,l)}}const Wae=e=>e!==null;function HO(e,{repeat:t,repeatType:r="loop"},i,o=1){const l=e.filter(Wae),f=o<0||t&&r!=="loop"&&t%2===1?0:l.length-1;return!f||i===void 0?l[f]:i}const Jae={decay:vC,inertia:vC,tween:Tv,keyframes:Tv,spring:XS};function i8(e){typeof e.type=="string"&&(e.type=Jae[e.type])}class GO{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}}const eie=e=>e/100;class KO extends GO{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:r}=this.options;r&&r.updatedAt!==Wi.now()&&this.tick(Wi.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;i8(t);const{type:r=Tv,repeat:i=0,repeatDelay:o=0,repeatType:l,velocity:c=0}=t;let{keyframes:f}=t;const d=r||Tv;d!==Tv&&typeof f[0]!="number"&&(this.mixKeyframes=Cb(eie,n8(f[0],f[1])),f=[0,100]);const h=d({...t,keyframes:f});l==="mirror"&&(this.mirroredGenerator=d({...t,keyframes:[...f].reverse(),velocity:-c})),h.calculatedDuration===null&&(h.calculatedDuration=FO(h));const{calculatedDuration:m}=h;this.calculatedDuration=m,this.resolvedDuration=m+o,this.totalDuration=this.resolvedDuration*(i+1)-o,this.generator=h}updateTime(t){const r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){const{generator:i,totalDuration:o,mixKeyframes:l,mirroredGenerator:c,resolvedDuration:f,calculatedDuration:d}=this;if(this.startTime===null)return i.next(0);const{delay:h=0,keyframes:m,repeat:y,repeatType:v,repeatDelay:w,type:b,onUpdate:C,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);const _=this.currentTime-h*(this.playbackSpeed>=0?1:-1),S=this.playbackSpeed>=0?_<0:_>o;this.currentTime=Math.max(_,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let A=this.currentTime,E=i;if(y){const D=Math.min(this.currentTime,o)/f;let P=Math.floor(D),V=D%1;!V&&D>=1&&(V=1),V===1&&P--,P=Math.min(P,y+1),P%2&&(v==="reverse"?(V=1-V,w&&(V-=w/f)):v==="mirror"&&(E=c)),A=nc(0,1,V)*f}const O=S?{done:!1,value:m[0]}:E.next(A);l&&(O.value=l(O.value));let{done:T}=O;!S&&d!==null&&(T=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return M&&b!==vC&&(O.value=HO(m,this.options,x,this.speed)),C&&C(O.value),M&&this.finish(),O}then(t,r){return this.finished.then(t,r)}get duration(){return to(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+to(t)}get time(){return to(this.currentTime)}set time(t){t=_l(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Wi.now());const r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=to(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Pae,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=r??i),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(Wi.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(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function tie(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Sh=e=>e*180/Math.PI,bC=e=>{const t=Sh(Math.atan2(e[1],e[0]));return SC(t)},nie={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:bC,rotateZ:bC,skewX:e=>Sh(Math.atan(e[1])),skewY:e=>Sh(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},SC=e=>(e=e%360,e<0&&(e+=360),e),x4=bC,T4=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),C4=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),rie={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:T4,scaleY:C4,scale:e=>(T4(e)+C4(e))/2,rotateX:e=>SC(Sh(Math.atan2(e[6],e[5]))),rotateY:e=>SC(Sh(Math.atan2(-e[2],e[0]))),rotateZ:x4,rotate:x4,skewX:e=>Sh(Math.atan(e[4])),skewY:e=>Sh(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function wC(e){return e.includes("scale")?1:0}function EC(e,t){if(!e||e==="none")return wC(t);const r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,o;if(r)i=rie,o=r;else{const f=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=nie,o=f}if(!o)return wC(t);const l=i[t],c=o[1].split(",").map(iie);return typeof l=="function"?l(c):c[l]}const aie=(e,t)=>{const{transform:r="none"}=getComputedStyle(e);return EC(r,t)};function iie(e){return parseFloat(e.trim())}const gm=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ym=new Set(gm),A4=e=>e===mm||e===lt,sie=new Set(["x","y","z"]),oie=gm.filter(e=>!sie.has(e));function lie(e){const t=[];return oie.forEach(r=>{const i=e.getValue(r);i!==void 0&&(t.push([r,i.get()]),i.set(r.startsWith("scale")?1:0))}),t}const _h={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>EC(t,"x"),y:(e,{transform:t})=>EC(t,"y")};_h.translateX=_h.x;_h.translateY=_h.y;const xh=new Set;let _C=!1,xC=!1,TC=!1;function s8(){if(xC){const e=Array.from(xh).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),r=new Map;t.forEach(i=>{const o=lie(i);o.length&&(r.set(i,o),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const o=r.get(i);o&&o.forEach(([l,c])=>{i.getValue(l)?.set(c)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}xC=!1,_C=!1,xh.forEach(e=>e.complete(TC)),xh.clear()}function o8(){xh.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(xC=!0)})}function uie(){TC=!0,o8(),s8(),TC=!1}class YO{constructor(t,r,i,o,l,c=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=i,this.motionValue=o,this.element=l,this.isAsync=c}scheduleResolve(){this.state="scheduled",this.isAsync?(xh.add(this),_C||(_C=!0,Ur.read(o8),Ur.resolveKeyframes(s8))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:r,element:i,motionValue:o}=this;if(t[0]===null){const l=o?.get(),c=t[t.length-1];if(l!==void 0)t[0]=l;else if(i&&r){const f=i.readValue(r,c);f!=null&&(t[0]=f)}t[0]===void 0&&(t[0]=c),o&&l===void 0&&o.set(t[0])}tie(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),xh.delete(this)}cancel(){this.state==="scheduled"&&(xh.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const cie=e=>e.startsWith("--");function fie(e,t,r){cie(t)?e.style.setProperty(t,r):e.style[t]=r}const die=$O(()=>window.ScrollTimeline!==void 0),hie={};function pie(e,t){const r=$O(e);return()=>hie[t]??r()}const l8=pie(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),mv=([e,t,r,i])=>`cubic-bezier(${e}, ${t}, ${r}, ${i})`,O4={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:mv([0,.65,.55,1]),circOut:mv([.55,0,1,.45]),backIn:mv([.31,.01,.66,-.59]),backOut:mv([.33,1.53,.69,.99])};function u8(e,t){if(e)return typeof e=="function"?l8()?r8(e,t):"ease-out":G9(e)?mv(e):Array.isArray(e)?e.map(r=>u8(r,t)||O4.easeOut):O4[e]}function mie(e,t,r,{delay:i=0,duration:o=300,repeat:l=0,repeatType:c="loop",ease:f="easeOut",times:d}={},h=void 0){const m={[t]:r};d&&(m.offset=d);const y=u8(f,o);Array.isArray(y)&&(m.easing=y);const v={delay:i,duration:o,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:l+1,direction:c==="reverse"?"alternate":"normal"};return h&&(v.pseudoElement=h),e.animate(m,v)}function c8(e){return typeof e=="function"&&"applyToOptions"in e}function gie({type:e,...t}){return c8(e)&&l8()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class yie extends GO{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:r,name:i,keyframes:o,pseudoElement:l,allowFlatten:c=!1,finalKeyframe:f,onComplete:d}=t;this.isPseudoElement=!!l,this.allowFlatten=c,this.options=t,zO(typeof t.type!="string");const h=gie(t);this.animation=mie(r,i,o,h,l),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const m=HO(o,this.options,f,this.speed);this.updateMotionValue?this.updateMotionValue(m):fie(r,i,m),this.animation.cancel()}d?.(),this.notifyFinished()}}play(){this.isStopped||(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:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return to(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+to(t)}get time(){return to(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=_l(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&die()?(this.animation.timeline=t,ro):r(this)}}const f8={anticipate:V9,backInOut:q9,circInOut:F9};function vie(e){return e in f8}function bie(e){typeof e.ease=="string"&&vie(e.ease)&&(e.ease=f8[e.ease])}const R4=10;class Sie extends yie{constructor(t){bie(t),i8(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:r,onUpdate:i,onComplete:o,element:l,...c}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}const f=new KO({...c,autoplay:!1}),d=_l(this.finishedTime??this.time);r.setWithVelocity(f.sample(d-R4).value,f.sample(d).value,R4),f.stop()}}const M4=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Vc.test(e)||e==="0")&&!e.startsWith("url("));function wie(e){const t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function Eie(e,t,r,i){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const l=e[e.length-1],c=M4(o,t),f=M4(l,t);return!c||!f?!1:wie(e)||(r==="spring"||c8(r))&&i}function CC(e){e.duration=0,e.type="keyframes"}const _ie=new Set(["opacity","clipPath","filter","transform"]),xie=$O(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Tie(e){const{motionValue:t,name:r,repeatDelay:i,repeatType:o,damping:l,type:c}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:h}=t.owner.getProps();return xie()&&r&&_ie.has(r)&&(r!=="transform"||!h)&&!d&&!i&&o!=="mirror"&&l!==0&&c!=="inertia"}const Cie=40;class Aie extends GO{constructor({autoplay:t=!0,delay:r=0,type:i="keyframes",repeat:o=0,repeatDelay:l=0,repeatType:c="loop",keyframes:f,name:d,motionValue:h,element:m,...y}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Wi.now();const v={autoplay:t,delay:r,type:i,repeat:o,repeatDelay:l,repeatType:c,name:d,motionValue:h,element:m,...y},w=m?.KeyframeResolver||YO;this.keyframeResolver=new w(f,(b,C,x)=>this.onKeyframesResolved(b,C,v,!x),d,h,m),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,r,i,o){this.keyframeResolver=void 0;const{name:l,type:c,velocity:f,delay:d,isHandoff:h,onUpdate:m}=i;this.resolvedAt=Wi.now(),Eie(t,l,c,f)||((rc.instantAnimations||!d)&&m?.(HO(t,i,r)),t[0]=t[t.length-1],CC(i),i.repeat=0);const v={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>Cie?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...i,keyframes:t},w=!h&&Tie(v)?new Sie({...v,element:v.motionValue.owner.current}):new KO(v);w.finished.then(()=>this.notifyFinished()).catch(ro),this.pendingTimeline&&(this.stopTimeline=w.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=w}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),uie()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Oie=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Rie(e){const t=Oie.exec(e);if(!t)return[,];const[,r,i,o]=t;return[`--${r??i}`,o]}function d8(e,t,r=1){const[i,o]=Rie(e);if(!i)return;const l=window.getComputedStyle(t).getPropertyValue(i);if(l){const c=l.trim();return N9(c)?parseFloat(c):c}return LO(o)?d8(o,t,r+1):o}function ZO(e,t){return e?.[t]??e?.default??e}const h8=new Set(["width","height","top","left","right","bottom",...gm]),Mie={test:e=>e==="auto",parse:e=>e},p8=e=>t=>t.test(e),m8=[mm,lt,xl,yc,wae,Sae,Mie],j4=e=>m8.find(p8(e));function jie(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||z9(e):!0}const Die=new Set(["brightness","contrast","saturate","opacity"]);function Nie(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=r.match(qO)||[];if(!i)return e;const o=r.replace(i,"");let l=Die.has(t)?1:0;return i!==r&&(l*=100),t+"("+l+o+")"}const kie=/\b([a-z-]*)\(.*?\)/gu,AC={...Vc,getAnimatableNone:e=>{const t=e.match(kie);return t?t.map(Nie).join(" "):e}},D4={...mm,transform:Math.round},zie={rotate:yc,rotateX:yc,rotateY:yc,rotateZ:yc,scale:P1,scaleX:P1,scaleY:P1,scaleZ:P1,skew:yc,skewX:yc,skewY:yc,distance:lt,translateX:lt,translateY:lt,translateZ:lt,x:lt,y:lt,z:lt,perspective:lt,transformPerspective:lt,opacity:Kv,originX:b4,originY:b4,originZ:lt},XO={borderWidth:lt,borderTopWidth:lt,borderRightWidth:lt,borderBottomWidth:lt,borderLeftWidth:lt,borderRadius:lt,radius:lt,borderTopLeftRadius:lt,borderTopRightRadius:lt,borderBottomRightRadius:lt,borderBottomLeftRadius:lt,width:lt,maxWidth:lt,height:lt,maxHeight:lt,top:lt,right:lt,bottom:lt,left:lt,inset:lt,insetBlock:lt,insetBlockStart:lt,insetBlockEnd:lt,insetInline:lt,insetInlineStart:lt,insetInlineEnd:lt,padding:lt,paddingTop:lt,paddingRight:lt,paddingBottom:lt,paddingLeft:lt,paddingBlock:lt,paddingBlockStart:lt,paddingBlockEnd:lt,paddingInline:lt,paddingInlineStart:lt,paddingInlineEnd:lt,margin:lt,marginTop:lt,marginRight:lt,marginBottom:lt,marginLeft:lt,marginBlock:lt,marginBlockStart:lt,marginBlockEnd:lt,marginInline:lt,marginInlineStart:lt,marginInlineEnd:lt,backgroundPositionX:lt,backgroundPositionY:lt,...zie,zIndex:D4,fillOpacity:Kv,strokeOpacity:Kv,numOctaves:D4},$ie={...XO,color:oa,backgroundColor:oa,outlineColor:oa,fill:oa,stroke:oa,borderColor:oa,borderTopColor:oa,borderRightColor:oa,borderBottomColor:oa,borderLeftColor:oa,filter:AC,WebkitFilter:AC},g8=e=>$ie[e];function y8(e,t){let r=g8(e);return r!==AC&&(r=Vc),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const Pie=new Set(["auto","none","0"]);function Iie(e,t,r){let i=0,o;for(;i<e.length&&!o;){const l=e[i];typeof l=="string"&&!Pie.has(l)&&Yv(l).values.length&&(o=e[i]),i++}if(o&&r)for(const l of t)e[l]=y8(r,o)}class Uie extends YO{constructor(t,r,i,o,l){super(t,r,i,o,l,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:r,name:i}=this;if(!r||!r.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let h=t[d];if(typeof h=="string"&&(h=h.trim(),LO(h))){const m=d8(h,r.current);m!==void 0&&(t[d]=m),d===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!h8.has(i)||t.length!==2)return;const[o,l]=t,c=j4(o),f=j4(l);if(c!==f)if(A4(c)&&A4(f))for(let d=0;d<t.length;d++){const h=t[d];typeof h=="string"&&(t[d]=parseFloat(h))}else _h[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:r}=this,i=[];for(let o=0;o<t.length;o++)(t[o]===null||jie(t[o]))&&i.push(o);i.length&&Iie(t,i,r)}measureInitialState(){const{element:t,unresolvedKeyframes:r,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=_h[i](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;const o=r[r.length-1];o!==void 0&&t.getValue(i,o).jump(o,!1)}measureEndState(){const{element:t,name:r,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const o=t.getValue(r);o&&o.jump(this.measuredOrigin,!1);const l=i.length-1,c=i[l];i[l]=_h[r](t.measureViewportBox(),window.getComputedStyle(t.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),this.removedTransforms?.length&&this.removedTransforms.forEach(([f,d])=>{t.getValue(f).set(d)}),this.resolveNoneKeyframes()}}function Lie(e,t,r){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const o=r?.[e]??i.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}const v8=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function qie(e){return k9(e)&&"offsetHeight"in e}const N4=30,Vie=e=>!isNaN(parseFloat(e));class Bie{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const o=Wi.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=Wi.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Vie(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new PO);const i=this.events[t].add(r);return t==="change"?()=>{i(),Ur.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,i){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Wi.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>N4)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,N4);return $9(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),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 Hp(e,t){return new Bie(e,t)}const{schedule:QO}=K9(queueMicrotask,!1),rl={x:!1,y:!1};function b8(){return rl.x||rl.y}function Fie(e){return e==="x"||e==="y"?rl[e]?null:(rl[e]=!0,()=>{rl[e]=!1}):rl.x||rl.y?null:(rl.x=rl.y=!0,()=>{rl.x=rl.y=!1})}function S8(e,t){const r=Lie(e),i=new AbortController,o={passive:!0,...t,signal:i.signal};return[r,o,()=>i.abort()]}function k4(e){return!(e.pointerType==="touch"||b8())}function Hie(e,t,r={}){const[i,o,l]=S8(e,r),c=f=>{if(!k4(f))return;const{target:d}=f,h=t(d,f);if(typeof h!="function"||!d)return;const m=y=>{k4(y)&&(h(y),d.removeEventListener("pointerleave",m))};d.addEventListener("pointerleave",m,o)};return i.forEach(f=>{f.addEventListener("pointerenter",c,o)}),l}const w8=(e,t)=>t?e===t?!0:w8(e,t.parentElement):!1,WO=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Gie=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Kie(e){return Gie.has(e.tagName)||e.tabIndex!==-1}const cS=new WeakSet;function z4(e){return t=>{t.key==="Enter"&&e(t)}}function gx(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Yie=(e,t)=>{const r=e.currentTarget;if(!r)return;const i=z4(()=>{if(cS.has(r))return;gx(r,"down");const o=z4(()=>{gx(r,"up")}),l=()=>gx(r,"cancel");r.addEventListener("keyup",o,t),r.addEventListener("blur",l,t)});r.addEventListener("keydown",i,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",i),t)};function $4(e){return WO(e)&&!b8()}function Zie(e,t,r={}){const[i,o,l]=S8(e,r),c=f=>{const d=f.currentTarget;if(!$4(f))return;cS.add(d);const h=t(d,f),m=(w,b)=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",v),cS.has(d)&&cS.delete(d),$4(w)&&typeof h=="function"&&h(w,{success:b})},y=w=>{m(w,d===window||d===document||r.useGlobalTarget||w8(d,w.target))},v=w=>{m(w,!1)};window.addEventListener("pointerup",y,o),window.addEventListener("pointercancel",v,o)};return i.forEach(f=>{(r.useGlobalTarget?window:f).addEventListener("pointerdown",c,o),qie(f)&&(f.addEventListener("focus",h=>Yie(h,o)),!Kie(f)&&!f.hasAttribute("tabindex")&&(f.tabIndex=0))}),l}function E8(e){return k9(e)&&"ownerSVGElement"in e}function Xie(e){return E8(e)&&e.tagName==="svg"}const xi=e=>!!(e&&e.getVelocity),Qie=[...m8,oa,Vc],Wie=e=>Qie.find(p8(e)),_8=j.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Jie(e=!0){const t=j.useContext(DO);if(t===null)return[!0,null];const{isPresent:r,onExitComplete:i,register:o}=t,l=j.useId();j.useEffect(()=>{if(e)return o(l)},[e]);const c=j.useCallback(()=>e&&i&&i(l),[l,i,e]);return!r&&i?[!1,c]:[!0]}const x8=j.createContext({strict:!1}),P4={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Gp={};for(const e in P4)Gp[e]={isEnabled:t=>P4[e].some(r=>!!t[r])};function ese(e){for(const t in e)Gp[t]={...Gp[t],...e[t]}}const tse=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function QS(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||tse.has(e)}let T8=e=>!QS(e);function nse(e){typeof e=="function"&&(T8=t=>t.startsWith("on")?!QS(t):e(t))}try{nse(require("@emotion/is-prop-valid").default)}catch{}function rse(e,t,r){const i={};for(const o in e)o==="values"&&typeof e.values=="object"||(T8(o)||r===!0&&QS(o)||!t&&!QS(o)||e.draggable&&o.startsWith("onDrag"))&&(i[o]=e[o]);return i}const W2=j.createContext({});function J2(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Zv(e){return typeof e=="string"||Array.isArray(e)}const JO=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],eR=["initial",...JO];function ew(e){return J2(e.animate)||eR.some(t=>Zv(e[t]))}function C8(e){return!!(ew(e)||e.variants)}function ase(e,t){if(ew(e)){const{initial:r,animate:i}=e;return{initial:r===!1||Zv(r)?r:void 0,animate:Zv(i)?i:void 0}}return e.inherit!==!1?t:{}}function ise(e){const{initial:t,animate:r}=ase(e,j.useContext(W2));return j.useMemo(()=>({initial:t,animate:r}),[I4(t),I4(r)])}function I4(e){return Array.isArray(e)?e.join(" "):e}function U4(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const rv={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(lt.test(e))e=parseFloat(e);else return e;const r=U4(e,t.target.x),i=U4(e,t.target.y);return`${r}% ${i}%`}},sse={correct:(e,{treeScale:t,projectionDelta:r})=>{const i=e,o=Vc.parse(e);if(o.length>5)return i;const l=Vc.createTransformer(e),c=typeof o[0]!="number"?1:0,f=r.x.scale*t.x,d=r.y.scale*t.y;o[0+c]/=f,o[1+c]/=d;const h=Hr(f,d,.5);return typeof o[2+c]=="number"&&(o[2+c]/=h),typeof o[3+c]=="number"&&(o[3+c]/=h),l(o)}},OC={borderRadius:{...rv,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:rv,borderTopRightRadius:rv,borderBottomLeftRadius:rv,borderBottomRightRadius:rv,boxShadow:sse};function A8(e,{layout:t,layoutId:r}){return ym.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!OC[e]||e==="opacity")}const ose={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},lse=gm.length;function use(e,t,r){let i="",o=!0;for(let l=0;l<lse;l++){const c=gm[l],f=e[c];if(f===void 0)continue;let d=!0;if(typeof f=="number"?d=f===(c.startsWith("scale")?1:0):d=parseFloat(f)===0,!d||r){const h=v8(f,XO[c]);if(!d){o=!1;const m=ose[c]||c;i+=`${m}(${h}) `}r&&(t[c]=h)}}return i=i.trim(),r?i=r(t,o?"":i):o&&(i="none"),i}function tR(e,t,r){const{style:i,vars:o,transformOrigin:l}=e;let c=!1,f=!1;for(const d in t){const h=t[d];if(ym.has(d)){c=!0;continue}else if(Z9(d)){o[d]=h;continue}else{const m=v8(h,XO[d]);d.startsWith("origin")?(f=!0,l[d]=m):i[d]=m}}if(t.transform||(c||r?i.transform=use(t,e.transform,r):i.transform&&(i.transform="none")),f){const{originX:d="50%",originY:h="50%",originZ:m=0}=l;i.transformOrigin=`${d} ${h} ${m}`}}const nR=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function O8(e,t,r){for(const i in t)!xi(t[i])&&!A8(i,r)&&(e[i]=t[i])}function cse({transformTemplate:e},t){return j.useMemo(()=>{const r=nR();return tR(r,t,e),Object.assign({},r.vars,r.style)},[t])}function fse(e,t){const r=e.style||{},i={};return O8(i,r,e),Object.assign(i,cse(e,t)),i}function dse(e,t){const r={},i=fse(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const hse={offset:"stroke-dashoffset",array:"stroke-dasharray"},pse={offset:"strokeDashoffset",array:"strokeDasharray"};function mse(e,t,r=1,i=0,o=!0){e.pathLength=1;const l=o?hse:pse;e[l.offset]=lt.transform(-i);const c=lt.transform(t),f=lt.transform(r);e[l.array]=`${c} ${f}`}const gse=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function R8(e,{attrX:t,attrY:r,attrScale:i,pathLength:o,pathSpacing:l=1,pathOffset:c=0,...f},d,h,m){if(tR(e,f,h),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:y,style:v}=e;y.transform&&(v.transform=y.transform,delete y.transform),(v.transform||y.transformOrigin)&&(v.transformOrigin=y.transformOrigin??"50% 50%",delete y.transformOrigin),v.transform&&(v.transformBox=m?.transformBox??"fill-box",delete y.transformBox);for(const w of gse)y[w]!==void 0&&(v[w]=y[w],delete y[w]);t!==void 0&&(y.x=t),r!==void 0&&(y.y=r),i!==void 0&&(y.scale=i),o!==void 0&&mse(y,o,l,c,!1)}const M8=()=>({...nR(),attrs:{}}),j8=e=>typeof e=="string"&&e.toLowerCase()==="svg";function yse(e,t,r,i){const o=j.useMemo(()=>{const l=M8();return R8(l,t,j8(i),e.transformTemplate,e.style),{...l.attrs,style:{...l.style}}},[t]);if(e.style){const l={};O8(l,e.style,e),o.style={...l,...o.style}}return o}const vse=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function rR(e){return typeof e!="string"||e.includes("-")?!1:!!(vse.indexOf(e)>-1||/[A-Z]/u.test(e))}function bse(e,t,r,{latestValues:i},o,l=!1,c){const d=(c??rR(e)?yse:dse)(t,i,o,e),h=rse(t,typeof e=="string",l),m=e!==j.Fragment?{...h,...d,ref:r}:{},{children:y}=t,v=j.useMemo(()=>xi(y)?y.get():y,[y]);return j.createElement(e,{...m,children:v})}function L4(e){const t=[{},{}];return e?.values.forEach((r,i)=>{t[0][i]=r.get(),t[1][i]=r.getVelocity()}),t}function aR(e,t,r,i){if(typeof t=="function"){const[o,l]=L4(i);t=t(r!==void 0?r:e.custom,o,l)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,l]=L4(i);t=t(r!==void 0?r:e.custom,o,l)}return t}function fS(e){return xi(e)?e.get():e}function Sse({scrapeMotionValuesFromProps:e,createRenderState:t},r,i,o){return{latestValues:wse(r,i,o,e),renderState:t()}}function wse(e,t,r,i){const o={},l=i(e,{});for(const v in l)o[v]=fS(l[v]);let{initial:c,animate:f}=e;const d=ew(e),h=C8(e);t&&h&&!d&&e.inherit!==!1&&(c===void 0&&(c=t.initial),f===void 0&&(f=t.animate));let m=r?r.initial===!1:!1;m=m||c===!1;const y=m?f:c;if(y&&typeof y!="boolean"&&!J2(y)){const v=Array.isArray(y)?y:[y];for(let w=0;w<v.length;w++){const b=aR(e,v[w]);if(b){const{transitionEnd:C,transition:x,..._}=b;for(const S in _){let A=_[S];if(Array.isArray(A)){const E=m?A.length-1:0;A=A[E]}A!==null&&(o[S]=A)}for(const S in C)o[S]=C[S]}}}return o}const D8=e=>(t,r)=>{const i=j.useContext(W2),o=j.useContext(DO),l=()=>Sse(e,t,i,o);return r?l():eae(l)};function iR(e,t,r){const{style:i}=e,o={};for(const l in i)(xi(i[l])||t.style&&xi(t.style[l])||A8(l,e)||r?.getValue(l)?.liveStyle!==void 0)&&(o[l]=i[l]);return o}const Ese=D8({scrapeMotionValuesFromProps:iR,createRenderState:nR});function N8(e,t,r){const i=iR(e,t,r);for(const o in e)if(xi(e[o])||xi(t[o])){const l=gm.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;i[l]=e[o]}return i}const _se=D8({scrapeMotionValuesFromProps:N8,createRenderState:M8}),xse=Symbol.for("motionComponentSymbol");function vp(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function q4(e,t){if(typeof e=="function")return e(t);vp(e)&&(e.current=t)}function Tse(e,t,r){const i=j.useRef(null);return j.useCallback(o=>{if(o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),r)if(o){const l=q4(r,o);typeof l=="function"&&(i.current=l)}else i.current?(i.current(),i.current=null):q4(r,o)},[t,e,r])}const sR=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Cse="framerAppearId",k8="data-"+sR(Cse),z8=j.createContext({});function Ase(e,t,r,i,o,l){const{visualElement:c}=j.useContext(W2),f=j.useContext(x8),d=j.useContext(DO),h=j.useContext(_8).reducedMotion,m=j.useRef(null);i=i||f.renderer,!m.current&&i&&(m.current=i(e,{visualState:t,parent:c,props:r,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:h,isSVG:l}));const y=m.current,v=j.useContext(z8);y&&!y.projection&&o&&(y.type==="html"||y.type==="svg")&&Ose(m.current,r,o,v);const w=j.useRef(!1);j.useInsertionEffect(()=>{y&&w.current&&y.update(r,d)});const b=r[k8],C=j.useRef(!!b&&!window.MotionHandoffIsComplete?.(b)&&window.MotionHasOptimisedAnimation?.(b));return tae(()=>{y&&(w.current=!0,window.MotionIsMounted=!0,y.updateFeatures(),y.scheduleRenderMicrotask(),C.current&&y.animationState&&y.animationState.animateChanges())}),j.useEffect(()=>{y&&(!C.current&&y.animationState&&y.animationState.animateChanges(),C.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(b)}),C.current=!1),y.enteringChildren=void 0)}),y}function Ose(e,t,r,i){const{layoutId:o,layout:l,drag:c,dragConstraints:f,layoutScroll:d,layoutRoot:h,layoutCrossfade:m}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:$8(e.parent)),e.projection.setOptions({layoutId:o,layout:l,alwaysMeasureLayout:!!c||f&&vp(f),visualElement:e,animationType:typeof l=="string"?l:"both",initialPromotionConfig:i,crossfade:m,layoutScroll:d,layoutRoot:h})}function $8(e){if(e)return e.options.allowProjection!==!1?e.projection:$8(e.parent)}function yx(e,{forwardMotionProps:t=!1,type:r}={},i,o){i&&ese(i);const l=r?r==="svg":rR(e),c=l?_se:Ese;function f(h,m){let y;const v={...j.useContext(_8),...h,layoutId:Rse(h)},{isStatic:w}=v,b=ise(h),C=c(h,w);if(!w&&jO){Mse();const x=jse(v);y=x.MeasureLayout,b.visualElement=Ase(e,C,v,o,x.ProjectionNode,l)}return N.jsxs(W2.Provider,{value:b,children:[y&&b.visualElement?N.jsx(y,{visualElement:b.visualElement,...v}):null,bse(e,h,Tse(C,b.visualElement,m),C,w,t,l)]})}f.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const d=j.forwardRef(f);return d[xse]=e,d}function Rse({layoutId:e}){const t=j.useContext(D9).id;return t&&e!==void 0?t+"-"+e:e}function Mse(e,t){j.useContext(x8).strict}function jse(e){const{drag:t,layout:r}=Gp;if(!t&&!r)return{};const i={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Dse(e,t){if(typeof Proxy>"u")return yx;const r=new Map,i=(l,c)=>yx(l,c,e,t),o=(l,c)=>i(l,c);return new Proxy(o,{get:(l,c)=>c==="create"?i:(r.has(c)||r.set(c,yx(c,void 0,e,t)),r.get(c))})}function P8({top:e,left:t,right:r,bottom:i}){return{x:{min:t,max:r},y:{min:e,max:i}}}function Nse({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function kse(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:i.y,right:i.x}}function vx(e){return e===void 0||e===1}function RC({scale:e,scaleX:t,scaleY:r}){return!vx(e)||!vx(t)||!vx(r)}function mh(e){return RC(e)||I8(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function I8(e){return V4(e.x)||V4(e.y)}function V4(e){return e&&e!=="0%"}function WS(e,t,r){const i=e-r,o=t*i;return r+o}function B4(e,t,r,i,o){return o!==void 0&&(e=WS(e,o,i)),WS(e,r,i)+t}function MC(e,t=0,r=1,i,o){e.min=B4(e.min,t,r,i,o),e.max=B4(e.max,t,r,i,o)}function U8(e,{x:t,y:r}){MC(e.x,t.translate,t.scale,t.originPoint),MC(e.y,r.translate,r.scale,r.originPoint)}const F4=.999999999999,H4=1.0000000000001;function zse(e,t,r,i=!1){const o=r.length;if(!o)return;t.x=t.y=1;let l,c;for(let f=0;f<o;f++){l=r[f],c=l.projectionDelta;const{visualElement:d}=l.options;d&&d.props.style&&d.props.style.display==="contents"||(i&&l.options.layoutScroll&&l.scroll&&l!==l.root&&Sp(e,{x:-l.scroll.offset.x,y:-l.scroll.offset.y}),c&&(t.x*=c.x.scale,t.y*=c.y.scale,U8(e,c)),i&&mh(l.latestValues)&&Sp(e,l.latestValues))}t.x<H4&&t.x>F4&&(t.x=1),t.y<H4&&t.y>F4&&(t.y=1)}function bp(e,t){e.min=e.min+t,e.max=e.max+t}function G4(e,t,r,i,o=.5){const l=Hr(e.min,e.max,o);MC(e,t,r,l,i)}function Sp(e,t){G4(e.x,t.x,t.scaleX,t.scale,t.originX),G4(e.y,t.y,t.scaleY,t.scale,t.originY)}function L8(e,t){return P8(kse(e.getBoundingClientRect(),t))}function $se(e,t,r){const i=L8(e,r),{scroll:o}=t;return o&&(bp(i.x,o.offset.x),bp(i.y,o.offset.y)),i}const K4=()=>({translate:0,scale:1,origin:0,originPoint:0}),wp=()=>({x:K4(),y:K4()}),Y4=()=>({min:0,max:0}),Oa=()=>({x:Y4(),y:Y4()}),jC={current:null},q8={current:!1};function Pse(){if(q8.current=!0,!!jO)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>jC.current=e.matches;e.addEventListener("change",t),t()}else jC.current=!1}const Ise=new WeakMap;function Use(e,t,r){for(const i in t){const o=t[i],l=r[i];if(xi(o))e.addValue(i,o);else if(xi(l))e.addValue(i,Hp(o,{owner:e}));else if(l!==o)if(e.hasValue(i)){const c=e.getValue(i);c.liveStyle===!0?c.jump(o):c.hasAnimated||c.set(o)}else{const c=e.getStaticValue(i);e.addValue(i,Hp(c!==void 0?c:o,{owner:e}))}}for(const i in r)t[i]===void 0&&e.removeValue(i);return t}const Z4=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Lse{scrapeMotionValuesFromProps(t,r,i){return{}}constructor({parent:t,props:r,presenceContext:i,reducedMotionConfig:o,blockInitialAnimation:l,visualState:c},f={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=YO,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const v=Wi.now();this.renderScheduledAt<v&&(this.renderScheduledAt=v,Ur.render(this.render,!1,!0))};const{latestValues:d,renderState:h}=c;this.latestValues=d,this.baseTarget={...d},this.initialValues=r.initial?{...d}:{},this.renderState=h,this.parent=t,this.props=r,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=f,this.blockInitialAnimation=!!l,this.isControllingVariants=ew(r),this.isVariantNode=C8(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:m,...y}=this.scrapeMotionValuesFromProps(r,{},this);for(const v in y){const w=y[v];d[v]!==void 0&&xi(w)&&w.set(d[v])}}mount(t){this.current=t,Ise.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(q8.current||Pse(),this.shouldReduceMotion=jC.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),qc(this.notifyUpdate),qc(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const r=this.features[t];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const i=ym.has(t);i&&this.onBindTransform&&this.onBindTransform();const o=r.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&Ur.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let l;window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{o(),l&&l(),r.owner&&r.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Gp){const r=Gp[t];if(!r)continue;const{isEnabled:i,Feature:o}=r;if(!this.features[t]&&o&&i(this.props)&&(this.features[t]=new o(this)),this.features[t]){const l=this.features[t];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Oa()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let i=0;i<Z4.length;i++){const o=Z4[i];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const l="on"+o,c=t[l];c&&(this.propEventSubscriptions[o]=this.on(o,c))}this.prevMotionValues=Use(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]: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(t){const r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){const i=this.values.get(t);r!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return i===void 0&&r!==void 0&&(i=Hp(r===null?void 0:r,{owner:this}),this.addValue(t,i)),i}readValue(t,r){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(N9(i)||z9(i))?i=parseFloat(i):!Wie(i)&&Vc.test(r)&&(i=y8(t,r)),this.setBaseTarget(t,xi(i)?i.get():i)),xi(i)?i.get():i}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const l=aR(this.props,r,this.presenceContext?.custom);l&&(i=l[t])}if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!xi(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new PO),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){QO.render(this.render)}}class V8 extends Lse{constructor(){super(...arguments),this.KeyframeResolver=Uie}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:i}){delete r[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;xi(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}function B8(e,{style:t,vars:r},i,o){const l=e.style;let c;for(c in t)l[c]=t[c];o?.applyProjectionStyles(l,i);for(c in r)l.setProperty(c,r[c])}function qse(e){return window.getComputedStyle(e)}class Vse extends V8{constructor(){super(...arguments),this.type="html",this.renderInstance=B8}readValueFromInstance(t,r){if(ym.has(r))return this.projection?.isProjecting?wC(r):aie(t,r);{const i=qse(t),o=(Z9(r)?i.getPropertyValue(r):i[r])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:r}){return L8(t,r)}build(t,r,i){tR(t,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,r,i){return iR(t,r,i)}}const F8=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Bse(e,t,r,i){B8(e,t,void 0,i);for(const o in t.attrs)e.setAttribute(F8.has(o)?o:sR(o),t.attrs[o])}class Fse extends V8{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Oa}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(ym.has(r)){const i=g8(r);return i&&i.default||0}return r=F8.has(r)?r:sR(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,i){return N8(t,r,i)}build(t,r,i){R8(t,r,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,r,i,o){Bse(t,r,i,o)}mount(t){this.isSVGTag=j8(t.tagName),super.mount(t)}}const Hse=(e,t)=>t.isSVG??rR(e)?new Fse(t):new Vse(t,{allowProjection:e!==j.Fragment});function Op(e,t,r){const i=e.getProps();return aR(i,t,r!==void 0?r:i.custom,e)}const DC=e=>Array.isArray(e);function Gse(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,Hp(r))}function Kse(e){return DC(e)?e[e.length-1]||0:e}function Yse(e,t){const r=Op(e,t);let{transitionEnd:i={},transition:o={},...l}=r||{};l={...l,...i};for(const c in l){const f=Kse(l[c]);Gse(e,c,f)}}function Zse(e){return!!(xi(e)&&e.add)}function NC(e,t){const r=e.getValue("willChange");if(Zse(r))return r.add(t);if(!r&&rc.WillChange){const i=new rc.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function H8(e){return e.props[k8]}const Xse=e=>e!==null;function Qse(e,{repeat:t,repeatType:r="loop"},i){const o=e.filter(Xse),l=t&&r!=="loop"&&t%2===1?0:o.length-1;return o[l]}const Wse={type:"spring",stiffness:500,damping:25,restSpeed:10},Jse=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),eoe={type:"keyframes",duration:.8},toe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},noe=(e,{keyframes:t})=>t.length>2?eoe:ym.has(e)?e.startsWith("scale")?Jse(t[1]):Wse:toe;function roe({when:e,delay:t,delayChildren:r,staggerChildren:i,staggerDirection:o,repeat:l,repeatType:c,repeatDelay:f,from:d,elapsed:h,...m}){return!!Object.keys(m).length}const oR=(e,t,r,i={},o,l)=>c=>{const f=ZO(i,e)||{},d=f.delay||i.delay||0;let{elapsed:h=0}=i;h=h-_l(d);const m={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...f,delay:-h,onUpdate:v=>{t.set(v),f.onUpdate&&f.onUpdate(v)},onComplete:()=>{c(),f.onComplete&&f.onComplete()},name:e,motionValue:t,element:l?void 0:o};roe(f)||Object.assign(m,noe(e,m)),m.duration&&(m.duration=_l(m.duration)),m.repeatDelay&&(m.repeatDelay=_l(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let y=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(CC(m),m.delay===0&&(y=!0)),(rc.instantAnimations||rc.skipAnimations)&&(y=!0,CC(m),m.delay=0),m.allowFlatten=!f.type&&!f.ease,y&&!l&&t.get()!==void 0){const v=Qse(m.keyframes,f);if(v!==void 0){Ur.update(()=>{m.onUpdate(v),m.onComplete()});return}}return f.isSync?new KO(m):new Aie(m)};function aoe({protectedKeys:e,needsAnimating:t},r){const i=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,i}function G8(e,t,{delay:r=0,transitionOverride:i,type:o}={}){let{transition:l=e.getDefaultTransition(),transitionEnd:c,...f}=t;i&&(l=i);const d=[],h=o&&e.animationState&&e.animationState.getState()[o];for(const m in f){const y=e.getValue(m,e.latestValues[m]??null),v=f[m];if(v===void 0||h&&aoe(h,m))continue;const w={delay:r,...ZO(l||{},m)},b=y.get();if(b!==void 0&&!y.isAnimating&&!Array.isArray(v)&&v===b&&!w.velocity)continue;let C=!1;if(window.MotionHandoffAnimation){const _=H8(e);if(_){const S=window.MotionHandoffAnimation(_,m,Ur);S!==null&&(w.startTime=S,C=!0)}}NC(e,m),y.start(oR(m,y,v,e.shouldReduceMotion&&h8.has(m)?{type:!1}:w,e,C));const x=y.animation;x&&d.push(x)}return c&&Promise.all(d).then(()=>{Ur.update(()=>{c&&Yse(e,c)})}),d}function K8(e,t,r,i=0,o=1){const l=Array.from(e).sort((h,m)=>h.sortNodePosition(m)).indexOf(t),c=e.size,f=(c-1)*i;return typeof r=="function"?r(l,c):o===1?l*i:f-l*i}function kC(e,t,r={}){const i=Op(e,t,r.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};r.transitionOverride&&(o=r.transitionOverride);const l=i?()=>Promise.all(G8(e,i,r)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:h=0,staggerChildren:m,staggerDirection:y}=o;return ioe(e,t,d,h,m,y,r)}:()=>Promise.resolve(),{when:f}=o;if(f){const[d,h]=f==="beforeChildren"?[l,c]:[c,l];return d().then(()=>h())}else return Promise.all([l(),c(r.delay)])}function ioe(e,t,r=0,i=0,o=0,l=1,c){const f=[];for(const d of e.variantChildren)d.notify("AnimationStart",t),f.push(kC(d,t,{...c,delay:r+(typeof i=="function"?0:i)+K8(e.variantChildren,d,i,o,l)}).then(()=>d.notify("AnimationComplete",t)));return Promise.all(f)}function soe(e,t,r={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const o=t.map(l=>kC(e,l,r));i=Promise.all(o)}else if(typeof t=="string")i=kC(e,t,r);else{const o=typeof t=="function"?Op(e,t,r.custom):t;i=Promise.all(G8(e,o,r))}return i.then(()=>{e.notify("AnimationComplete",t)})}function Y8(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let i=0;i<r;i++)if(t[i]!==e[i])return!1;return!0}const ooe=eR.length;function Z8(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?Z8(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const t={};for(let r=0;r<ooe;r++){const i=eR[r],o=e.props[i];(Zv(o)||o===!1)&&(t[i]=o)}return t}const loe=[...JO].reverse(),uoe=JO.length;function coe(e){return t=>Promise.all(t.map(({animation:r,options:i})=>soe(e,r,i)))}function foe(e){let t=coe(e),r=X4(),i=!0;const o=d=>(h,m)=>{const y=Op(e,m,d==="exit"?e.presenceContext?.custom:void 0);if(y){const{transition:v,transitionEnd:w,...b}=y;h={...h,...b,...w}}return h};function l(d){t=d(e)}function c(d){const{props:h}=e,m=Z8(e.parent)||{},y=[],v=new Set;let w={},b=1/0;for(let x=0;x<uoe;x++){const _=loe[x],S=r[_],A=h[_]!==void 0?h[_]:m[_],E=Zv(A),O=_===d?S.isActive:null;O===!1&&(b=x);let T=A===m[_]&&A!==h[_]&&E;if(T&&i&&e.manuallyAnimateOnMount&&(T=!1),S.protectedKeys={...w},!S.isActive&&O===null||!A&&!S.prevProp||J2(A)||typeof A=="boolean")continue;const M=doe(S.prevProp,A);let D=M||_===d&&S.isActive&&!T&&E||x>b&&E,P=!1;const V=Array.isArray(A)?A:[A];let q=V.reduce(o(_),{});O===!1&&(q={});const{prevResolvedValues:Y={}}=S,W={...Y,...q},ie=G=>{D=!0,v.has(G)&&(P=!0,v.delete(G)),S.needsAnimating[G]=!0;const J=e.getValue(G);J&&(J.liveStyle=!1)};for(const G in W){const J=q[G],he=Y[G];if(w.hasOwnProperty(G))continue;let ue=!1;DC(J)&&DC(he)?ue=!Y8(J,he):ue=J!==he,ue?J!=null?ie(G):v.add(G):J!==void 0&&v.has(G)?ie(G):S.protectedKeys[G]=!0}S.prevProp=A,S.prevResolvedValues=q,S.isActive&&(w={...w,...q}),i&&e.blockInitialAnimation&&(D=!1);const ae=T&&M;D&&(!ae||P)&&y.push(...V.map(G=>{const J={type:_};if(typeof G=="string"&&i&&!ae&&e.manuallyAnimateOnMount&&e.parent){const{parent:he}=e,ue=Op(he,G);if(he.enteringChildren&&ue){const{delayChildren:z}=ue.transition||{};J.delay=K8(he.enteringChildren,e,z)}}return{animation:G,options:J}}))}if(v.size){const x={};if(typeof h.initial!="boolean"){const _=Op(e,Array.isArray(h.initial)?h.initial[0]:h.initial);_&&_.transition&&(x.transition=_.transition)}v.forEach(_=>{const S=e.getBaseTarget(_),A=e.getValue(_);A&&(A.liveStyle=!0),x[_]=S??null}),y.push({animation:x})}let C=!!y.length;return i&&(h.initial===!1||h.initial===h.animate)&&!e.manuallyAnimateOnMount&&(C=!1),i=!1,C?t(y):Promise.resolve()}function f(d,h){if(r[d].isActive===h)return Promise.resolve();e.variantChildren?.forEach(y=>y.animationState?.setActive(d,h)),r[d].isActive=h;const m=c(d);for(const y in r)r[y].protectedKeys={};return m}return{animateChanges:c,setActive:f,setAnimateFunction:l,getState:()=>r,reset:()=>{r=X4()}}}function doe(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Y8(t,e):!1}function fh(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function X4(){return{animate:fh(!0),whileInView:fh(),whileHover:fh(),whileTap:fh(),whileDrag:fh(),whileFocus:fh(),exit:fh()}}class Jc{constructor(t){this.isMounted=!1,this.node=t}update(){}}class hoe extends Jc{constructor(t){super(t),t.animationState||(t.animationState=foe(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();J2(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let poe=0;class moe extends Jc{constructor(){super(...arguments),this.id=poe++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const o=this.node.animationState.setActive("exit",!t);r&&!t&&o.then(()=>{r(this.id)})}mount(){const{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const goe={animation:{Feature:hoe},exit:{Feature:moe}};function Xv(e,t,r,i={passive:!0}){return e.addEventListener(t,r,i),()=>e.removeEventListener(t,r)}function Rb(e){return{point:{x:e.pageX,y:e.pageY}}}const yoe=e=>t=>WO(t)&&e(t,Rb(t));function Cv(e,t,r,i){return Xv(e,t,yoe(r),i)}const X8=1e-4,voe=1-X8,boe=1+X8,Q8=.01,Soe=0-Q8,woe=0+Q8;function Qi(e){return e.max-e.min}function Eoe(e,t,r){return Math.abs(e-t)<=r}function Q4(e,t,r,i=.5){e.origin=i,e.originPoint=Hr(t.min,t.max,e.origin),e.scale=Qi(r)/Qi(t),e.translate=Hr(r.min,r.max,e.origin)-e.originPoint,(e.scale>=voe&&e.scale<=boe||isNaN(e.scale))&&(e.scale=1),(e.translate>=Soe&&e.translate<=woe||isNaN(e.translate))&&(e.translate=0)}function Av(e,t,r,i){Q4(e.x,t.x,r.x,i?i.originX:void 0),Q4(e.y,t.y,r.y,i?i.originY:void 0)}function W4(e,t,r){e.min=r.min+t.min,e.max=e.min+Qi(t)}function _oe(e,t,r){W4(e.x,t.x,r.x),W4(e.y,t.y,r.y)}function J4(e,t,r){e.min=t.min-r.min,e.max=e.min+Qi(t)}function JS(e,t,r){J4(e.x,t.x,r.x),J4(e.y,t.y,r.y)}function Qs(e){return[e("x"),e("y")]}const W8=({current:e})=>e?e.ownerDocument.defaultView:null,ej=(e,t)=>Math.abs(e-t);function xoe(e,t){const r=ej(e.x,t.x),i=ej(e.y,t.y);return Math.sqrt(r**2+i**2)}class J8{constructor(t,r,{transformPagePoint:i,contextWindow:o=window,dragSnapToOrigin:l=!1,distanceThreshold:c=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Sx(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,b=xoe(v.offset,{x:0,y:0})>=this.distanceThreshold;if(!w&&!b)return;const{point:C}=v,{timestamp:x}=li;this.history.push({...C,timestamp:x});const{onStart:_,onMove:S}=this.handlers;w||(_&&_(this.lastMoveEvent,v),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,v)},this.handlePointerMove=(v,w)=>{this.lastMoveEvent=v,this.lastMoveEventInfo=bx(w,this.transformPagePoint),Ur.update(this.updatePoint,!0)},this.handlePointerUp=(v,w)=>{this.end();const{onEnd:b,onSessionEnd:C,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const _=Sx(v.type==="pointercancel"?this.lastMoveEventInfo:bx(w,this.transformPagePoint),this.history);this.startEvent&&b&&b(v,_),C&&C(v,_)},!WO(t))return;this.dragSnapToOrigin=l,this.handlers=r,this.transformPagePoint=i,this.distanceThreshold=c,this.contextWindow=o||window;const f=Rb(t),d=bx(f,this.transformPagePoint),{point:h}=d,{timestamp:m}=li;this.history=[{...h,timestamp:m}];const{onSessionStart:y}=r;y&&y(t,Sx(d,this.history)),this.removeListeners=Cb(Cv(this.contextWindow,"pointermove",this.handlePointerMove),Cv(this.contextWindow,"pointerup",this.handlePointerUp),Cv(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),qc(this.updatePoint)}}function bx(e,t){return t?{point:t(e.point)}:e}function tj(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Sx({point:e},t){return{point:e,delta:tj(e,e$(t)),offset:tj(e,Toe(t)),velocity:Coe(t,.1)}}function Toe(e){return e[0]}function e$(e){return e[e.length-1]}function Coe(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,i=null;const o=e$(e);for(;r>=0&&(i=e[r],!(o.timestamp-i.timestamp>_l(t)));)r--;if(!i)return{x:0,y:0};const l=to(o.timestamp-i.timestamp);if(l===0)return{x:0,y:0};const c={x:(o.x-i.x)/l,y:(o.y-i.y)/l};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function Aoe(e,{min:t,max:r},i){return t!==void 0&&e<t?e=i?Hr(t,e,i.min):Math.max(e,t):r!==void 0&&e>r&&(e=i?Hr(r,e,i.max):Math.min(e,r)),e}function nj(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function Ooe(e,{top:t,left:r,bottom:i,right:o}){return{x:nj(e.x,r,o),y:nj(e.y,t,i)}}function rj(e,t){let r=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,i]=[i,r]),{min:r,max:i}}function Roe(e,t){return{x:rj(e.x,t.x),y:rj(e.y,t.y)}}function Moe(e,t){let r=.5;const i=Qi(e),o=Qi(t);return o>i?r=Gv(t.min,t.max-i,e.min):i>o&&(r=Gv(e.min,e.max-o,t.min)),nc(0,1,r)}function joe(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const zC=.35;function Doe(e=zC){return e===!1?e=0:e===!0&&(e=zC),{x:aj(e,"left","right"),y:aj(e,"top","bottom")}}function aj(e,t,r){return{min:ij(e,t),max:ij(e,r)}}function ij(e,t){return typeof e=="number"?e:e[t]||0}const Noe=new WeakMap;class koe{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Oa(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:i}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const l=y=>{const{dragSnapToOrigin:v}=this.getProps();v?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(Rb(y).point)},c=(y,v)=>{const{drag:w,dragPropagation:b,onDragStart:C}=this.getProps();if(w&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Fie(w),!this.openDragLock))return;this.latestPointerEvent=y,this.latestPanInfo=v,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Qs(_=>{let S=this.getAxisMotionValue(_).get()||0;if(xl.test(S)){const{projection:A}=this.visualElement;if(A&&A.layout){const E=A.layout.layoutBox[_];E&&(S=Qi(E)*(parseFloat(S)/100))}}this.originPoint[_]=S}),C&&Ur.postRender(()=>C(y,v)),NC(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},f=(y,v)=>{this.latestPointerEvent=y,this.latestPanInfo=v;const{dragPropagation:w,dragDirectionLock:b,onDirectionLock:C,onDrag:x}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:_}=v;if(b&&this.currentDirection===null){this.currentDirection=zoe(_),this.currentDirection!==null&&C&&C(this.currentDirection);return}this.updateAxis("x",v.point,_),this.updateAxis("y",v.point,_),this.visualElement.render(),x&&x(y,v)},d=(y,v)=>{this.latestPointerEvent=y,this.latestPanInfo=v,this.stop(y,v),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>Qs(y=>this.getAnimationState(y)==="paused"&&this.getAxisMotionValue(y).animation?.play()),{dragSnapToOrigin:m}=this.getProps();this.panSession=new J8(t,{onSessionStart:l,onStart:c,onMove:f,onSessionEnd:d,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:i,contextWindow:W8(this.visualElement)})}stop(t,r){const i=t||this.latestPointerEvent,o=r||this.latestPanInfo,l=this.isDragging;if(this.cancel(),!l||!o||!i)return;const{velocity:c}=o;this.startAnimation(c);const{onDragEnd:f}=this.getProps();f&&Ur.postRender(()=>f(i,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,i){const{drag:o}=this.getProps();if(!i||!I1(t,o,this.currentDirection))return;const l=this.getAxisMotionValue(t);let c=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(c=Aoe(c,this.constraints[t],this.elastic[t])),l.set(c)}resolveConstraints(){const{dragConstraints:t,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&vp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=Ooe(i.layoutBox,t):this.constraints=!1,this.elastic=Doe(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Qs(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=joe(i.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!vp(t))return!1;const i=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const l=$se(i,o.root,this.visualElement.getTransformPagePoint());let c=Roe(o.layout.layoutBox,l);if(r){const f=r(Nse(c));this.hasMutatedConstraints=!!f,f&&(c=P8(f))}return c}startAnimation(t){const{drag:r,dragMomentum:i,dragElastic:o,dragTransition:l,dragSnapToOrigin:c,onDragTransitionEnd:f}=this.getProps(),d=this.constraints||{},h=Qs(m=>{if(!I1(m,r,this.currentDirection))return;let y=d&&d[m]||{};c&&(y={min:0,max:0});const v=o?200:1e6,w=o?40:1e7,b={type:"inertia",velocity:i?t[m]:0,bounceStiffness:v,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...l,...y};return this.startAxisValueAnimation(m,b)});return Promise.all(h).then(f)}startAxisValueAnimation(t,r){const i=this.getAxisMotionValue(t);return NC(this.visualElement,t),i.start(oR(t,i,0,r,this.visualElement,!1))}stopAnimation(){Qs(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Qs(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const r=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),o=i[r];return o||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){Qs(r=>{const{drag:i}=this.getProps();if(!I1(r,i,this.currentDirection))return;const{projection:o}=this.visualElement,l=this.getAxisMotionValue(r);if(o&&o.layout){const{min:c,max:f}=o.layout.layoutBox[r],d=l.get()||0;l.set(t[r]-Hr(c,f,.5)+d)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!vp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Qs(c=>{const f=this.getAxisMotionValue(c);if(f&&this.constraints!==!1){const d=f.get();o[c]=Moe({min:d,max:d},this.constraints[c])}});const{transformTemplate:l}=this.visualElement.getProps();this.visualElement.current.style.transform=l?l({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),Qs(c=>{if(!I1(c,t,null))return;const f=this.getAxisMotionValue(c),{min:d,max:h}=this.constraints[c];f.set(Hr(d,h,o[c]))})}addListeners(){if(!this.visualElement.current)return;Noe.set(this.visualElement,this);const t=this.visualElement.current,r=Cv(t,"pointerdown",d=>{const{drag:h,dragListener:m=!0}=this.getProps();h&&m&&this.start(d)}),i=()=>{const{dragConstraints:d}=this.getProps();vp(d)&&d.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,l=o.addEventListener("measure",i);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Ur.read(i);const c=Xv(window,"resize",()=>this.scalePositionWithinConstraints()),f=o.addEventListener("didUpdate",(({delta:d,hasLayoutChanged:h})=>{this.isDragging&&h&&(Qs(m=>{const y=this.getAxisMotionValue(m);y&&(this.originPoint[m]+=d[m].translate,y.set(y.get()+d[m].translate))}),this.visualElement.render())}));return()=>{c(),r(),l(),f&&f()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:i=!1,dragPropagation:o=!1,dragConstraints:l=!1,dragElastic:c=zC,dragMomentum:f=!0}=t;return{...t,drag:r,dragDirectionLock:i,dragPropagation:o,dragConstraints:l,dragElastic:c,dragMomentum:f}}}function I1(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function zoe(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class $oe extends Jc{constructor(t){super(t),this.removeGroupControls=ro,this.removeListeners=ro,this.controls=new koe(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ro}update(){const{dragControls:t}=this.node.getProps(),{dragControls:r}=this.node.prevProps||{};t!==r&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const sj=e=>(t,r)=>{e&&Ur.postRender(()=>e(t,r))};class Poe extends Jc{constructor(){super(...arguments),this.removePointerDownListener=ro}onPointerDown(t){this.session=new J8(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:W8(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:i,onPanEnd:o}=this.node.getProps();return{onSessionStart:sj(t),onStart:sj(r),onMove:i,onEnd:(l,c)=>{delete this.session,o&&Ur.postRender(()=>o(l,c))}}}mount(){this.removePointerDownListener=Cv(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const dS={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let wx=!1;class Ioe extends j.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:i,layoutId:o}=this.props,{projection:l}=t;l&&(r.group&&r.group.add(l),i&&i.register&&o&&i.register(l),wx&&l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,onExitComplete:()=>this.safeToRemove()})),dS.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:i,drag:o,isPresent:l}=this.props,{projection:c}=i;return c&&(c.isPresent=l,wx=!0,o||t.layoutDependency!==r||r===void 0||t.isPresent!==l?c.willUpdate():this.safeToRemove(),t.isPresent!==l&&(l?c.promote():c.relegate()||Ur.postRender(()=>{const f=c.getStack();(!f||!f.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),QO.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:i}=this.props,{projection:o}=t;wx=!0,o&&(o.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(o),i&&i.deregister&&i.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function t$(e){const[t,r]=Jie(),i=j.useContext(D9);return N.jsx(Ioe,{...e,layoutGroup:i,switchLayoutGroup:j.useContext(z8),isPresent:t,safeToRemove:r})}function Uoe(e,t,r){const i=xi(e)?e:Hp(e);return i.start(oR("",i,t,r)),i.animation}const Loe=(e,t)=>e.depth-t.depth;class qoe{constructor(){this.children=[],this.isDirty=!1}add(t){NO(this.children,t),this.isDirty=!0}remove(t){kO(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Loe),this.isDirty=!1,this.children.forEach(t)}}function Voe(e,t){const r=Wi.now(),i=({timestamp:o})=>{const l=o-r;l>=t&&(qc(i),e(l-t))};return Ur.setup(i,!0),()=>qc(i)}const n$=["TopLeft","TopRight","BottomLeft","BottomRight"],Boe=n$.length,oj=e=>typeof e=="string"?parseFloat(e):e,lj=e=>typeof e=="number"||lt.test(e);function Foe(e,t,r,i,o,l){o?(e.opacity=Hr(0,r.opacity??1,Hoe(i)),e.opacityExit=Hr(t.opacity??1,0,Goe(i))):l&&(e.opacity=Hr(t.opacity??1,r.opacity??1,i));for(let c=0;c<Boe;c++){const f=`border${n$[c]}Radius`;let d=uj(t,f),h=uj(r,f);if(d===void 0&&h===void 0)continue;d||(d=0),h||(h=0),d===0||h===0||lj(d)===lj(h)?(e[f]=Math.max(Hr(oj(d),oj(h),i),0),(xl.test(h)||xl.test(d))&&(e[f]+="%")):e[f]=h}(t.rotate||r.rotate)&&(e.rotate=Hr(t.rotate||0,r.rotate||0,i))}function uj(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Hoe=r$(0,.5,B9),Goe=r$(.5,.95,ro);function r$(e,t,r){return i=>i<e?0:i>t?1:r(Gv(e,t,i))}function cj(e,t){e.min=t.min,e.max=t.max}function tl(e,t){cj(e.x,t.x),cj(e.y,t.y)}function fj(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function dj(e,t,r,i,o){return e-=t,e=WS(e,1/r,i),o!==void 0&&(e=WS(e,1/o,i)),e}function Koe(e,t=0,r=1,i=.5,o,l=e,c=e){if(xl.test(t)&&(t=parseFloat(t),t=Hr(c.min,c.max,t/100)-c.min),typeof t!="number")return;let f=Hr(l.min,l.max,i);e===l&&(f-=t),e.min=dj(e.min,t,r,f,o),e.max=dj(e.max,t,r,f,o)}function hj(e,t,[r,i,o],l,c){Koe(e,t[r],t[i],t[o],t.scale,l,c)}const Yoe=["x","scaleX","originX"],Zoe=["y","scaleY","originY"];function pj(e,t,r,i){hj(e.x,t,Yoe,r?r.x:void 0,i?i.x:void 0),hj(e.y,t,Zoe,r?r.y:void 0,i?i.y:void 0)}function mj(e){return e.translate===0&&e.scale===1}function a$(e){return mj(e.x)&&mj(e.y)}function gj(e,t){return e.min===t.min&&e.max===t.max}function Xoe(e,t){return gj(e.x,t.x)&&gj(e.y,t.y)}function yj(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function i$(e,t){return yj(e.x,t.x)&&yj(e.y,t.y)}function vj(e){return Qi(e.x)/Qi(e.y)}function bj(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Qoe{constructor(){this.members=[]}add(t){NO(this.members,t),t.scheduleRender()}remove(t){if(kO(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){const r=this.members.findIndex(o=>t===o);if(r===0)return!1;let i;for(let o=r;o>=0;o--){const l=this.members[o];if(l.isPresent!==!1){i=l;break}}return i?(this.promote(i),!0):!1}promote(t,r){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,r&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:r,resumingFrom:i}=t;r.onExitComplete&&r.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Woe(e,t,r){let i="";const o=e.x.translate/t.x,l=e.y.translate/t.y,c=r?.z||0;if((o||l||c)&&(i=`translate3d(${o}px, ${l}px, ${c}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:h,rotate:m,rotateX:y,rotateY:v,skewX:w,skewY:b}=r;h&&(i=`perspective(${h}px) ${i}`),m&&(i+=`rotate(${m}deg) `),y&&(i+=`rotateX(${y}deg) `),v&&(i+=`rotateY(${v}deg) `),w&&(i+=`skewX(${w}deg) `),b&&(i+=`skewY(${b}deg) `)}const f=e.x.scale*t.x,d=e.y.scale*t.y;return(f!==1||d!==1)&&(i+=`scale(${f}, ${d})`),i||"none"}const Ex=["","X","Y","Z"],Joe=1e3;let ele=0;function _x(e,t,r,i){const{latestValues:o}=t;o[e]&&(r[e]=o[e],t.setStaticValue(e,0),i&&(i[e]=0))}function s$(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=H8(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:o,layoutId:l}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",Ur,!(o||l))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&s$(i)}function o$({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:i,resetTransform:o}){return class{constructor(c={},f=t?.()){this.id=ele++,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(rle),this.nodes.forEach(ole),this.nodes.forEach(lle),this.nodes.forEach(ale)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=c,this.root=f?f.root||f:this,this.path=f?[...f.path,f]:[],this.parent=f,this.depth=f?f.depth+1:0;for(let d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new qoe)}addEventListener(c,f){return this.eventHandlers.has(c)||this.eventHandlers.set(c,new PO),this.eventHandlers.get(c).add(f)}notifyListeners(c,...f){const d=this.eventHandlers.get(c);d&&d.notify(...f)}hasListeners(c){return this.eventHandlers.has(c)}mount(c){if(this.instance)return;this.isSVG=E8(c)&&!Xie(c),this.instance=c;const{layoutId:f,layout:d,visualElement:h}=this.options;if(h&&!h.current&&h.mount(c),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(d||f)&&(this.isLayoutDirty=!0),e){let m,y=0;const v=()=>this.root.updateBlockedByResize=!1;Ur.read(()=>{y=window.innerWidth}),e(c,()=>{const w=window.innerWidth;w!==y&&(y=w,this.root.updateBlockedByResize=!0,m&&m(),m=Voe(v,250),dS.hasAnimatedSinceResize&&(dS.hasAnimatedSinceResize=!1,this.nodes.forEach(Ej)))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&h&&(f||d)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:y,hasRelativeLayoutChanged:v,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||h.getDefaultTransition()||hle,{onLayoutAnimationStart:C,onLayoutAnimationComplete:x}=h.getProps(),_=!this.targetLayout||!i$(this.targetLayout,w),S=!y&&v;if(this.options.layoutRoot||this.resumeFrom||S||y&&(_||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const A={...ZO(b,"layout"),onPlay:C,onComplete:x};(h.shouldReduceMotion||this.options.layoutRoot)&&(A.delay=0,A.type=!1),this.startAnimation(A),this.setAnimationOrigin(m,S)}else y||Ej(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const c=this.getStack();c&&c.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),qc(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(ule),this.animationId++)}getTransformTemplate(){const{visualElement:c}=this.options;return c&&c.getProps().transformTemplate}willUpdate(c=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&s$(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){const y=this.path[m];y.shouldResetTransform=!0,y.updateScroll("snapshot"),y.options.layoutRoot&&y.willUpdate(!1)}const{layoutId:f,layout:d}=this.options;if(f===void 0&&!d)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),c&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Sj);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(wj);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(sle),this.nodes.forEach(tle),this.nodes.forEach(nle)):this.nodes.forEach(wj),this.clearAllSnapshots();const f=Wi.now();li.delta=nc(0,1e3/60,f-li.timestamp),li.timestamp=f,li.isProcessing=!0,fx.update.process(li),fx.preRender.process(li),fx.render.process(li),li.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,QO.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ile),this.sharedNodes.forEach(cle)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ur.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ur.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Qi(this.snapshot.measuredBox.x)&&!Qi(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 d=0;d<this.path.length;d++)this.path[d].updateScroll();const c=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Oa(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:f}=this.options;f&&f.notify("LayoutMeasure",this.layout.layoutBox,c?c.layoutBox:void 0)}updateScroll(c="measure"){let f=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===c&&(f=!1),f&&this.instance){const d=i(this.instance);this.scroll={animationId:this.root.animationId,phase:c,isRoot:d,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:d}}}resetTransform(){if(!o)return;const c=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,f=this.projectionDelta&&!a$(this.projectionDelta),d=this.getTransformTemplate(),h=d?d(this.latestValues,""):void 0,m=h!==this.prevTransformTemplateValue;c&&this.instance&&(f||mh(this.latestValues)||m)&&(o(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(c=!0){const f=this.measurePageBox();let d=this.removeElementScroll(f);return c&&(d=this.removeTransform(d)),ple(d),{animationId:this.root.animationId,measuredBox:f,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:c}=this.options;if(!c)return Oa();const f=c.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(mle))){const{scroll:h}=this.root;h&&(bp(f.x,h.offset.x),bp(f.y,h.offset.y))}return f}removeElementScroll(c){const f=Oa();if(tl(f,c),this.scroll?.wasRoot)return f;for(let d=0;d<this.path.length;d++){const h=this.path[d],{scroll:m,options:y}=h;h!==this.root&&m&&y.layoutScroll&&(m.wasRoot&&tl(f,c),bp(f.x,m.offset.x),bp(f.y,m.offset.y))}return f}applyTransform(c,f=!1){const d=Oa();tl(d,c);for(let h=0;h<this.path.length;h++){const m=this.path[h];!f&&m.options.layoutScroll&&m.scroll&&m!==m.root&&Sp(d,{x:-m.scroll.offset.x,y:-m.scroll.offset.y}),mh(m.latestValues)&&Sp(d,m.latestValues)}return mh(this.latestValues)&&Sp(d,this.latestValues),d}removeTransform(c){const f=Oa();tl(f,c);for(let d=0;d<this.path.length;d++){const h=this.path[d];if(!h.instance||!mh(h.latestValues))continue;RC(h.latestValues)&&h.updateSnapshot();const m=Oa(),y=h.measurePageBox();tl(m,y),pj(f,h.latestValues,h.snapshot?h.snapshot.layoutBox:void 0,m)}return mh(this.latestValues)&&pj(f,this.latestValues),f}setTargetDelta(c){this.targetDelta=c,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(c){this.options={...this.options,...c,crossfade:c.crossfade!==void 0?c.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!==li.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(c=!1){const f=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=f.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=f.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=f.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==f;if(!(c||d&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:m,layoutId:y}=this.options;if(!this.layout||!(m||y))return;this.resolvedRelativeTargetAt=li.timestamp;const v=this.getClosestProjectingParent();v&&this.linkedParentVersion!==v.layoutVersion&&!v.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(v&&v.layout?this.createRelativeTarget(v,this.layout.layoutBox,v.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Oa(),this.targetWithTransforms=Oa()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),_oe(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):tl(this.target,this.layout.layoutBox),U8(this.target,this.targetDelta)):tl(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,v&&!!v.resumingFrom==!!this.resumingFrom&&!v.options.layoutScroll&&v.target&&this.animationProgress!==1?this.createRelativeTarget(v,this.target,v.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||RC(this.parent.latestValues)||I8(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(c,f,d){this.relativeParent=c,this.linkedParentVersion=c.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Oa(),this.relativeTargetOrigin=Oa(),JS(this.relativeTargetOrigin,f,d),tl(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const c=this.getLead(),f=!!this.resumingFrom||this!==c;let d=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(d=!1),f&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===li.timestamp&&(d=!1),d)return;const{layout:h,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||m))return;tl(this.layoutCorrected,this.layout.layoutBox);const y=this.treeScale.x,v=this.treeScale.y;zse(this.layoutCorrected,this.treeScale,this.path,f),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=Oa());const{target:w}=c;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(fj(this.prevProjectionDelta.x,this.projectionDelta.x),fj(this.prevProjectionDelta.y,this.projectionDelta.y)),Av(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==y||this.treeScale.y!==v||!bj(this.projectionDelta.x,this.prevProjectionDelta.x)||!bj(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(c=!0){if(this.options.visualElement?.scheduleRender(),c){const f=this.getStack();f&&f.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=wp(),this.projectionDelta=wp(),this.projectionDeltaWithTransform=wp()}setAnimationOrigin(c,f=!1){const d=this.snapshot,h=d?d.latestValues:{},m={...this.latestValues},y=wp();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!f;const v=Oa(),w=d?d.source:void 0,b=this.layout?this.layout.source:void 0,C=w!==b,x=this.getStack(),_=!x||x.members.length<=1,S=!!(C&&!_&&this.options.crossfade===!0&&!this.path.some(dle));this.animationProgress=0;let A;this.mixTargetDelta=E=>{const O=E/1e3;_j(y.x,c.x,O),_j(y.y,c.y,O),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(JS(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox),fle(this.relativeTarget,this.relativeTargetOrigin,v,O),A&&Xoe(this.relativeTarget,A)&&(this.isProjectionDirty=!1),A||(A=Oa()),tl(A,this.relativeTarget)),C&&(this.animationValues=m,Foe(m,h,this.latestValues,O,S,_)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=O},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(c){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(qc(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ur.update(()=>{dS.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Hp(0)),this.currentAnimation=Uoe(this.motionValue,[0,1e3],{...c,velocity:0,isSync:!0,onUpdate:f=>{this.mixTargetDelta(f),c.onUpdate&&c.onUpdate(f)},onStop:()=>{},onComplete:()=>{c.onComplete&&c.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 c=this.getStack();c&&c.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Joe),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const c=this.getLead();let{targetWithTransforms:f,target:d,layout:h,latestValues:m}=c;if(!(!f||!d||!h)){if(this!==c&&this.layout&&h&&l$(this.options.animationType,this.layout.layoutBox,h.layoutBox)){d=this.target||Oa();const y=Qi(this.layout.layoutBox.x);d.x.min=c.target.x.min,d.x.max=d.x.min+y;const v=Qi(this.layout.layoutBox.y);d.y.min=c.target.y.min,d.y.max=d.y.min+v}tl(f,d),Sp(f,m),Av(this.projectionDeltaWithTransform,this.layoutCorrected,f,m)}}registerSharedNode(c,f){this.sharedNodes.has(c)||this.sharedNodes.set(c,new Qoe),this.sharedNodes.get(c).add(f);const h=f.options.initialPromotionConfig;f.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(f):void 0})}isLead(){const c=this.getStack();return c?c.lead===this:!0}getLead(){const{layoutId:c}=this.options;return c?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:c}=this.options;return c?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:c}=this.options;if(c)return this.root.sharedNodes.get(c)}promote({needsReset:c,transition:f,preserveFollowOpacity:d}={}){const h=this.getStack();h&&h.promote(this,d),c&&(this.projectionDelta=void 0,this.needsReset=!0),f&&this.setOptions({transition:f})}relegate(){const c=this.getStack();return c?c.relegate(this):!1}resetSkewAndRotation(){const{visualElement:c}=this.options;if(!c)return;let f=!1;const{latestValues:d}=c;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(f=!0),!f)return;const h={};d.z&&_x("z",c,h,this.animationValues);for(let m=0;m<Ex.length;m++)_x(`rotate${Ex[m]}`,c,h,this.animationValues),_x(`skew${Ex[m]}`,c,h,this.animationValues);c.render();for(const m in h)c.setStaticValue(m,h[m]),this.animationValues&&(this.animationValues[m]=h[m]);c.scheduleRender()}applyProjectionStyles(c,f){if(!this.instance||this.isSVG)return;if(!this.isVisible){c.visibility="hidden";return}const d=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,c.visibility="",c.opacity="",c.pointerEvents=fS(f?.pointerEvents)||"",c.transform=d?d(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(c.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,c.pointerEvents=fS(f?.pointerEvents)||""),this.hasProjected&&!mh(this.latestValues)&&(c.transform=d?d({},""):"none",this.hasProjected=!1);return}c.visibility="";const m=h.animationValues||h.latestValues;this.applyTransformsToTarget();let y=Woe(this.projectionDeltaWithTransform,this.treeScale,m);d&&(y=d(m,y)),c.transform=y;const{x:v,y:w}=this.projectionDelta;c.transformOrigin=`${v.origin*100}% ${w.origin*100}% 0`,h.animationValues?c.opacity=h===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:c.opacity=h===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const b in OC){if(m[b]===void 0)continue;const{correct:C,applyTo:x,isCSSVariable:_}=OC[b],S=y==="none"?m[b]:C(m[b],h);if(x){const A=x.length;for(let E=0;E<A;E++)c[x[E]]=S}else _?this.options.visualElement.renderState.vars[b]=S:c[b]=S}this.options.layoutId&&(c.pointerEvents=h===this?fS(f?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(c=>c.currentAnimation?.stop()),this.root.nodes.forEach(Sj),this.root.sharedNodes.clear()}}}function tle(e){e.updateLayout()}function nle(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,l=t.source!==e.layout.source;o==="size"?Qs(m=>{const y=l?t.measuredBox[m]:t.layoutBox[m],v=Qi(y);y.min=r[m].min,y.max=y.min+v}):l$(o,t.layoutBox,r)&&Qs(m=>{const y=l?t.measuredBox[m]:t.layoutBox[m],v=Qi(r[m]);y.max=y.min+v,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[m].max=e.relativeTarget[m].min+v)});const c=wp();Av(c,r,t.layoutBox);const f=wp();l?Av(f,e.applyTransform(i,!0),t.measuredBox):Av(f,r,t.layoutBox);const d=!a$(c);let h=!1;if(!e.resumeFrom){const m=e.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:y,layout:v}=m;if(y&&v){const w=Oa();JS(w,t.layoutBox,y.layoutBox);const b=Oa();JS(b,r,v.layoutBox),i$(w,b)||(h=!0),m.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=w,e.relativeParent=m)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:f,layoutDelta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function rle(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 ale(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ile(e){e.clearSnapshot()}function Sj(e){e.clearMeasurements()}function wj(e){e.isLayoutDirty=!1}function sle(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ej(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ole(e){e.resolveTargetDelta()}function lle(e){e.calcProjection()}function ule(e){e.resetSkewAndRotation()}function cle(e){e.removeLeadSnapshot()}function _j(e,t,r){e.translate=Hr(t.translate,0,r),e.scale=Hr(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function xj(e,t,r,i){e.min=Hr(t.min,r.min,i),e.max=Hr(t.max,r.max,i)}function fle(e,t,r,i){xj(e.x,t.x,r.x,i),xj(e.y,t.y,r.y,i)}function dle(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const hle={duration:.45,ease:[.4,0,.1,1]},Tj=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Cj=Tj("applewebkit/")&&!Tj("chrome/")?Math.round:ro;function Aj(e){e.min=Cj(e.min),e.max=Cj(e.max)}function ple(e){Aj(e.x),Aj(e.y)}function l$(e,t,r){return e==="position"||e==="preserve-aspect"&&!Eoe(vj(t),vj(r),.2)}function mle(e){return e!==e.root&&e.scroll?.wasRoot}const gle=o$({attachResizeListener:(e,t)=>Xv(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),xx={current:void 0},u$=o$({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!xx.current){const e=new gle({});e.mount(window),e.setOptions({layoutScroll:!0}),xx.current=e}return xx.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),yle={pan:{Feature:Poe},drag:{Feature:$oe,ProjectionNode:u$,MeasureLayout:t$}};function Oj(e,t,r){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",r==="Start");const o="onHover"+r,l=i[o];l&&Ur.postRender(()=>l(t,Rb(t)))}class vle extends Jc{mount(){const{current:t}=this.node;t&&(this.unmount=Hie(t,(r,i)=>(Oj(this.node,i,"Start"),o=>Oj(this.node,o,"End"))))}unmount(){}}class ble extends Jc{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Cb(Xv(this.node.current,"focus",()=>this.onFocus()),Xv(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Rj(e,t,r){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",r==="Start");const o="onTap"+(r==="End"?"":r),l=i[o];l&&Ur.postRender(()=>l(t,Rb(t)))}class Sle extends Jc{mount(){const{current:t}=this.node;t&&(this.unmount=Zie(t,(r,i)=>(Rj(this.node,i,"Start"),(o,{success:l})=>Rj(this.node,o,l?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const $C=new WeakMap,Tx=new WeakMap,wle=e=>{const t=$C.get(e.target);t&&t(e)},Ele=e=>{e.forEach(wle)};function _le({root:e,...t}){const r=e||document;Tx.has(r)||Tx.set(r,{});const i=Tx.get(r),o=JSON.stringify(t);return i[o]||(i[o]=new IntersectionObserver(Ele,{root:e,...t})),i[o]}function xle(e,t,r){const i=_le(t);return $C.set(e,r),i.observe(e),()=>{$C.delete(e),i.unobserve(e)}}const Tle={some:0,all:1};class Cle extends Jc{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:i,amount:o="some",once:l}=t,c={root:r?r.current:void 0,rootMargin:i,threshold:typeof o=="number"?o:Tle[o]},f=d=>{const{isIntersecting:h}=d;if(this.isInView===h||(this.isInView=h,l&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:m,onViewportLeave:y}=this.node.getProps(),v=h?m:y;v&&v(d)};return xle(this.node.current,c,f)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(Ale(t,r))&&this.startObserver()}unmount(){}}function Ale({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const Ole={inView:{Feature:Cle},tap:{Feature:Sle},focus:{Feature:ble},hover:{Feature:vle}},Rle={layout:{ProjectionNode:u$,MeasureLayout:t$}},Mle={...goe,...Ole,...yle,...Rle},Mj=Dse(Mle,Hse),c$=zs.memo(({className:e})=>{const t=["M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875","M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867","M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859","M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851","M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843","M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835","M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827","M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819","M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811","M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803","M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795","M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787","M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779","M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771","M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763","M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755","M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747","M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739","M-254 -333C-254 -333 -186 72 278 199C742 326 810 731 810 731","M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723","M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715","M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707","M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699","M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691","M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683","M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675","M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667","M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659","M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651","M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643","M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635","M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627","M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619","M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611","M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603","M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595","M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587","M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579","M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571","M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563","M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555","M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547","M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539","M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531","M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523","M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515","M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507","M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499","M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491","M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483"];return N.jsx("div",{className:Vn("absolute h-full w-full inset-0 mask-size-[40px] mask-repeat-[no-repeat] flex items-center justify-center",e),children:N.jsxs("svg",{className:"z-0 h-full w-full pointer-events-none absolute",width:"100%",height:"100%",viewBox:"0 0 696 316",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[N.jsx("title",{children:"Background Beams"}),N.jsx("path",{d:"M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739M-254 -333C-254 -333 -186 72 278 199C742 326 810 731 810 731M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483M-30 -589C-30 -589 38 -184 502 -57C966 70 1034 475 1034 475M-23 -597C-23 -597 45 -192 509 -65C973 62 1041 467 1041 467M-16 -605C-16 -605 52 -200 516 -73C980 54 1048 459 1048 459M-9 -613C-9 -613 59 -208 523 -81C987 46 1055 451 1055 451M-2 -621C-2 -621 66 -216 530 -89C994 38 1062 443 1062 443M5 -629C5 -629 73 -224 537 -97C1001 30 1069 435 1069 435M12 -637C12 -637 80 -232 544 -105C1008 22 1076 427 1076 427M19 -645C19 -645 87 -240 551 -113C1015 14 1083 419 1083 419",stroke:"url(#paint0_radial_242_278)",strokeOpacity:"0.05",strokeWidth:"0.5"}),t.map((r,i)=>N.jsx(Mj.path,{d:r,stroke:`url(#linearGradient-${i})`,strokeOpacity:"0.4",strokeWidth:"0.5"},`path-${i}`)),N.jsxs("defs",{children:[t.map((r,i)=>N.jsxs(Mj.linearGradient,{id:`linearGradient-${i}`,initial:{x1:"0%",x2:"0%",y1:"0%",y2:"0%"},animate:{x1:["0%","100%"],x2:["0%","95%"],y1:["0%","100%"],y2:["0%",`${93+Math.random()*8}%`]},transition:{duration:Math.random()*10+10,ease:"easeInOut",repeat:1/0,delay:0},children:[N.jsx("stop",{stopColor:"#000000",stopOpacity:"0"}),N.jsx("stop",{stopColor:"#111111"}),N.jsx("stop",{offset:"32.5%",stopColor:"#666666"}),N.jsx("stop",{offset:"100%",stopColor:"#FFFFFF",stopOpacity:"0"})]},`gradient-${i}`)),N.jsxs("radialGradient",{id:"paint0_radial_242_278",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(352 34) rotate(90) scale(555 1560.62)",children:[N.jsx("stop",{offset:"0.0666667",stopColor:"var(--neutral-300)"}),N.jsx("stop",{offset:"0.243243",stopColor:"var(--neutral-300)"}),N.jsx("stop",{offset:"0.43594",stopColor:"white",stopOpacity:"0"})]})]})]})})});c$.displayName="BackgroundBeams";const jle=()=>N.jsxs(N.Fragment,{children:[N.jsx(c$,{className:"absolute inset-0"}),N.jsx("div",{className:"relative z-10 flex-1 flex items-center justify-center",children:N.jsxs("div",{className:"text-center",children:[N.jsx("h1",{className:"text-2xl font-semibold text-foreground mb-2",children:"Welcome to Skybridge"}),N.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose a tool from the sidebar to begin"})]})})]});function Mn(e){return typeof e!="object"||e===null||typeof e.lastModified=="number"&&typeof File<"u"&&e instanceof File||typeof e.getMonth=="function"&&typeof Date<"u"&&e instanceof Date?!1:!Array.isArray(e)}function Dle(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),Mn(e.additionalItems)}function jj(e){if(e==="")return;if(e===null)return null;if(/\.$/.test(e)||/\.0$/.test(e)||/\.\d*0$/.test(e))return e;const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)?t:e}const ec="__additional_property",e2="additionalProperties",Bc="allOf",Dn="anyOf",so="const",tw="default",lR="dependencies",Nle="enum",fi="__errors",nr="$id",kle="if",Kp="items",zle="_$junk_option_schema_id$_",hS="$name",gn="oneOf",PC="patternProperties",In="properties",Cx="readonly",f$="required",t2="submitButtonOptions",Or="$ref",gv="$schema",d$="root",h$="_",$le=["discriminator","propertyName"],Dj="formContext",Ple="layoutGridLookupMap",uR="__rjsf_additionalProperties",p$="__rjsf_rootSchema",Ile="ui:field",cR="ui:widget",Rc="ui:options",IC="ui:globalOptions",Ule="https://json-schema.org/draft/2019-09/schema",pS="https://json-schema.org/draft/2020-12/schema";function Ot(e={},t={}){return e?Object.keys(e).filter(r=>r.indexOf("ui:")===0).reduce((r,i)=>{const o=e[i];return i===cR&&Mn(o)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),r):i===Rc&&Mn(o)?{...r,...o}:{...r,[i.substring(3)]:o}},{...t}):{...t}}function m$(e,t={},r){if(!(e.additionalProperties||e.patternProperties))return!1;const{expandable:i=!0}=Ot(t);return i===!1?i:e.maxProperties!==void 0&&r?Object.keys(r).length<e.maxProperties:!0}function UC(e){const t={[fi]:[],addError(r){this[fi].push(r)}};if(Array.isArray(e))return e.reduce((r,i,o)=>({...r,[o]:UC(i)}),t);if($c(e)){const r=e;return Object.keys(r).reduce((i,o)=>({...i,[o]:UC(r[o])}),t)}return t}function pr(e,t){return kK(e,t,(r,i)=>{if(typeof r=="function"&&typeof i=="function")return!0})}const Lle=Object.prototype;function yv(e){for(const t in e)if(Lle.hasOwnProperty.call(e,t))return!1;return!0}const qle=["array","boolean","integer","null","number","object","string"];new Set(qle);const Vle=["$defs","definitions","properties","patternProperties","dependencies"];new Set(Vle);const Ble=["items","allOf","oneOf","anyOf"];new Set(Ble);const Fle=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(Fle);function mS(e){return typeof e=="object"}function ml(e){return mS(e)?yv(e):e===!0}function Ep(e,t){return e<t?-1:e>t?1:0}function Ax(e,t){const r=e.length;if(r===0)return t;let i=t.length;if(i===0)return e;if(r<i){const l=e;e=t,t=l,i=r}const o=new Set(e);for(let l=0;l<i;l++)o.add(t[l]);return Array.from(o)}function Hle(e,t){const r=[];if(e.length===0||t.length===0)return r;if(e.length>t.length){const o=e;e=t,t=o}const i=new Set(t);for(let o=0;o<e.length&&i.size>0;o++){const l=e[o];i.delete(l)&&r.push(l)}return r}function Nj(e){return e.length===0}function Ox(e){return(t,r)=>{const i=t.length-r.length;if(i!==0)return i;for(let o=0;o<t.length;o++)if(t[o]!==r[o]){const l=e(t[o],r[o]);if(l!==0)return l}return 0}}function g$(e,{threshold:t=12}={}){return r=>{const i=r.length;if(i===0)return r;if(i<=t){const c=[];let f=0;e:for(let d=0;d<i;d++){const h=r[d];for(let m=0;m<f;m++)if(e(h,c[m])===0)continue e;f=c.push(h)}return c}const o=r.slice().sort(e);let l=0;for(let c=1;c<i;c++)e(o[l],o[c])!==0&&++l!==c&&(o[l]=o[c]);return o.length=l+1,o}}function Gle(e){return(t,r)=>{const i=[];let o=t.length,l=r.length;if(o===0||l===0)return i;if(o>l){const m=t;t=r,r=m;const y=o;o=l,l=y}const c=[...t].sort(e),f=[...r].sort(e);let d=0,h=0;for(;d<o&&h<l;){const m=e(c[d],f[h]);m===0?((i.length===0||e(i[i.length-1],c[d])!==0)&&i.push(c[d]),d++,h++):m<0?d++:h++}return i}}function Kle(e,t){return r=>{if(e.has(r))return e.get(r);const i=t(r);return e.set(r,i),i}}const kj=Kle,y$=()=>0,Yle=e=>e===void 0,Zle=e=>typeof e!="object",zj={boolean:0,number:1,string:2};function Xle(e,t){const r=typeof e,i=typeof t;return r===i?Ep(e,t):zj[r]-zj[i]}function Qle(e,t){const r=e.length;if(r===0)return t;const i=t.length;if(i===0)return e;if(i>r){const c=e;e=t,t=c}const o=new Set(e),l=t.length;for(let c=0;c<l;c++){const f=t[c];o.has(f)||e.push(f)}return e}function nw(e,t,r=y$){return(i,o)=>e(i)?e(o)?r(i,o):-1:e(o)?1:t(i,o)}function up(e){return nw(Yle,e)}function vc(e,t){return nw(r=>r===void 0||e(r),t)}function Rx(e,t){return nw(Array.isArray,e,t)}const sa=up(Ep),Mx=vc(e=>e===0,(e,t)=>e-t);function Wle({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){const r=kj(t,C=>Object.keys(C).sort());function i(C){return(x,_)=>{const S=r(x),A=r(_),E=Math.min(S.length,A.length);for(let O=0;O<E;O++){const T=Ep(S[O],A[O]);if(T!==0)return T}if(S.length!==A.length)return S.length-A.length;for(let O=0;O<E;O++){const T=S[O],M=C(x[T],_[T]);if(M!==0)return M}return 0}}function o(C){const x=Ox(C),_=kj(e,g$(C,{threshold:0}));return(S,A)=>x(_(S),_(A))}const l=o(Ep);function c(C,x){if(mS(C)){if(mS(x)){const _=Object.keys(C),S=Object.keys(x),A=Qle(_,S),E=A.length;for(let O=0;O<E;O++){const T=A[O];if(C[T]===x[T])continue;const D=(b[T]??f)(C[T],x[T]);if(D!==0)return D}return 0}return x===!0&&yv(C)?0:1}return mS(x)?C===!0&&yv(x)?0:-1:Ep(C,x)}const f=up(h),d=nw(Zle,Rx(i(f),Ox(h)),Xle);function h(C,x){return C===null?-1:x===null?1:d(C,x)}const m=up(c),y=vc(yv,i(m)),v=up(o(c)),w=vc(ml,c),b={$id:sa,$comment:sa,$defs:y,$ref:sa,$schema:sa,const:f,contains:m,contentEncoding:sa,contentMediaType:sa,default:f,definitions:y,description:sa,else:m,examples:f,exclusiveMaximum:sa,exclusiveMinimum:sa,format:sa,if:m,maximum:sa,maxItems:sa,maxLength:sa,maxProperties:sa,minimum:sa,multipleOf:sa,not:m,pattern:sa,propertyNames:m,readOnly:sa,then:m,title:sa,writeOnly:sa,uniqueItems:vc(C=>C===!1,y$),minLength:Mx,minItems:Mx,minProperties:Mx,required:vc(Nj,l),enum:vc(Nj,o(h)),type:up((C,x)=>{const _=Array.isArray(C),S=Array.isArray(x);return!_&&!S?Ep(C,x):l(_?C:[C],S?x:[x])}),items:vc(C=>!Array.isArray(C)&&ml(C),Rx(c,Ox(c))),anyOf:v,allOf:v,oneOf:v,properties:y,patternProperties:y,additionalProperties:w,additionalItems:w,dependencies:vc(yv,i(up(Rx(c,l))))};return{compareSchemaValues:h,compareSchemaDefinitions:c}}function $j(e){return e}const v$=(e,t)=>e?v$(t%e,e):t,Jle=(e,t)=>Math.abs(e*t)/v$(e,t);function eue(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function*jx(e,t,r){const i=e.length,o=t.length;if(i>0&&o>0)for(let l=0;l<i;l++){const c=e[l];for(let f=0;f<o;f++)yield r(c,t[f])}}function Dx(e,t){return e||t}function Pj(e){return(t,r)=>{const i={...t},o=Object.keys(r),l=o.length;for(let c=0;c<l;c++){const f=o[c];i[f]=t[f]===void 0?r[f]:e(t[f],r[f])}return i}}function tue(e){const t=new Map;for(const r of e)for(const i of r[0])t.set(i,r[1]);return t}function dh(e,t,r){r===void 0||ml(r)?delete e[t]:e[t]=r}const nue=["properties","patternProperties","additionalProperties"];function Ij(e){const t=Object.keys(e),r=t.length,i=[];for(let o=0;o<r;o++){const l=t[o];i.push({regExp:new RegExp(l),schema:e[l]})}return[i,t]}const Uj=[[],[]];function Lj(e,t,r){const i=r.length;for(let o=0;o<i;o++){const l=r[o];if(!l.regExp.test(t))continue;const c=l.schema;if(c===!1)return!0;e.push(c)}return!1}const rue=["items","additionalItems"],aue=["if","then","else"];function qj(e,t){return t.if!==void 0&&(e.if=t.if),t.then!==void 0&&(e.then=t.then),t.else!==void 0&&(e.else=t.else),e}function Nx(e,t){if(e===t)return e;switch(e){case"number":if(t==="integer")return"integer";case"integer":if(t==="number")return"integer";default:return}}function hh(e,t,r){return[e,t,r]}function iue(e){const t=new Map;for(const[r,i,o]of e){const l=c=>{if(!o(c))throw new Error(`Schema keys '${r}' and '${i}' are conflicting (${r}: ${JSON.stringify(c[r])}, ${i}: ${JSON.stringify(c[i])})`)};for(const c of[[r,i],[i,r]]){let f=t.get(c[0]);f===void 0&&(f=[],t.set(c[0],f)),f.push({oppositeKey:c[1],check:l})}}return t}const sue=[hh("minimum","maximum",e=>e.maximum>=e.minimum),hh("exclusiveMinimum","maximum",e=>e.maximum>e.exclusiveMinimum),hh("minimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.minimum),hh("exclusiveMinimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.exclusiveMinimum),hh("minLength","maxLength",e=>e.maxLength>=e.minLength),hh("minItems","maxItems",e=>e.maxItems>=e.minItems),hh("minProperties","maxProperties",e=>e.maxProperties>=e.minProperties)];function oue({mergePatterns:e=eue,isSubRegExp:t=Object.is,intersectJson:r=Hle,deduplicateJsonSchemaDef:i=$j,defaultMerger:o=$j,assigners:l=[],checks:c=sue,mergers:f}={}){function d(E){const O=E.length;let T=E[0];for(let M=1;M<O;M++){const D=_(T,E[M]);if(D===!1)return!1;ml(D)||(T=D)}return T}function h(E,O,T,M,D,P,V){if(E.length=0,T===!1)return!1;if(E.push(T),D!==void 0){if(D===!1)return!1;E.push(D)}if(Lj(E,O,P))return!1;const Y=E.length<2;if(V===!1){if(Y)return;if(Lj(E,O,M))return!1}else Y&&V!==void 0&&E.push(V);return E.length===1?E[0]:d(E)}function m(E,O,T,M,D,P){const V=T.length;if(V>0&&D!==!1)if(P)Object.assign(E,O);else for(let q=0;q<V;q++){const Y=T[q];M.has(Y)||(E[Y]=_(O[Y],D))}return E}const y=(E,{properties:O={},patternProperties:T,additionalProperties:M=!0},{properties:D={},patternProperties:P,additionalProperties:V=!0})=>{const q=ml(M),Y=ml(V);if(q&&Y)return dh(E,"properties",S(O,D)),dh(E,"patternProperties",T&&P?S(T,P):T??P),delete E.additionalProperties,E;const W=_(M,V);dh(E,"additionalProperties",W);const ie={},ae=Object.keys(O),H=ae.length,[G,J]=T?Ij(T):Uj,[he,ue]=P?Ij(P):Uj,z=[],U=new Set,I=Y?void 0:V;for(let Se=0;Se<H;Se++){const Oe=ae[Se];U.add(Oe);const re=h(z,Oe,O[Oe],G,D[Oe],he,I);re!==void 0&&(ie[Oe]=re)}const $=Object.keys(D),L=$.length,Q=q?void 0:M;for(let Se=0;Se<L;Se++){const Oe=$[Se];if(U.has(Oe))continue;const re=h(z,Oe,D[Oe],he,void 0,G,Q);re!==void 0&&(ie[Oe]=re)}dh(E,"properties",ie);let te={};const fe=new Set;if(J.length>0&&ue.length>0){const Se=jx(J,ue,(Oe,re)=>{t(Oe,re)&&fe.add(Oe),t(re,Oe)&&fe.add(re),te[e(Oe,re)]=_(T[Oe],P[re])});for(;!Se.next().done;);}return te=m(te,T,J,fe,V,Y),te=m(te,P,ue,fe,M,q),dh(E,"patternProperties",te),E},v=(E,{items:O=[],additionalItems:T},{items:M=[],additionalItems:D})=>{const P=Array.isArray(O),V=Array.isArray(M),q=[];if(E.items=q,P&&V){const[Y,W,ie]=O.length<M.length?[O.length,T,M]:[M.length,D,O];let ae=0;for(;ae<Y;ae++)q.push(_(O[ae],M[ae]));if(W===!1)E.additionalItems=!1;else{const H=W===void 0||ml(W);for(;ae<ie.length;ae++)q.push(H?ie[ae]:_(ie[ae],W));dh(E,"additionalItems",T!==void 0&&D!==void 0?_(T,D):T??D)}}else if(P||V){const[Y,W,ie]=P?[O,M,T]:[M,O,D];dh(E,"additionalItems",ie&&_(ie,W));for(let ae=0;ae<Y.length;ae++)q.push(_(Y[ae],W))}else delete E.additionalItems,E.items=_(O,M);return E},w=(E,O,T)=>{qj(E,O);const M=qj({},T);return E.allOf===void 0?E.allOf=[M]:E.allOf=E.allOf.concat(M),E};function b(E,O){return i(Array.from(jx(E,O,_)))}const C=tue([[nue,y],[rue,v],[aue,w],...l]),x=iue(c);function _(E,O){if(E===!1||O===!1)return!1;if(ml(E))return ml(O)?!0:O;if(ml(O))return E;let T={...E};const M=new Set,D=new Set,P=Object.keys(O),V=P.length;for(let q=0;q<V;q++){const Y=P[q],W=O[Y];if(W===void 0)continue;const ie=x.get(Y);if(ie!==void 0){const J=ie.length;for(let he=0;he<J;he++){const ue=ie[he];E[ue.oppositeKey]!==void 0&&D.add(ue.check)}}const ae=E[Y];if(ae===void 0){T[Y]=W;continue}const H=C.get(Y);if(H){M.add(H);continue}const G=A[Y]??o;T[Y]=G(ae,W)}for(const q of M)T=q(T,E,O);for(const q of D)q(T);return T}const S=Pj(_),A={$id:o,$ref:o,$schema:o,$comment:o,$defs:S,definitions:S,type:(E,O)=>{if(E===O)return E;const T=Array.isArray(E),M=Array.isArray(O);if(!T&&!M){const D=Nx(E,O);if(D!==void 0)return D}else if(T||M){const D=new Set;if(T&&M)for(const V of jx(E,O,Nx))V!==void 0&&D.add(V);else{const V=T?E:O,q=T?O:E,Y=V.length;for(let W=0;W<Y;W++){const ie=Nx(q,V[W]);ie!==void 0&&D.add(ie)}}const P=D.size;if(P===1)return D.values().next().value;if(P>1)return Array.from(D)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${E.toString()}, ${O.toString()}`)},default:o,description:o,title:o,const:o,format:o,contentEncoding:o,contentMediaType:o,not:(E,O)=>{const T=i([E,O]);return T.length===1?T[0]:{anyOf:T}},pattern:e,readOnly:Dx,writeOnly:Dx,enum:(E,O)=>{const T=r(E,O);if(T.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(E)}", "${JSON.stringify(O)}"`);return T},anyOf:b,oneOf:b,allOf:(E,O)=>i(E.concat(O)),propertyNames:_,contains:_,dependencies:Pj((E,O)=>Array.isArray(E)?Array.isArray(O)?Ax(E,O):_(O,{required:E}):Array.isArray(O)?_(E,{required:O}):_(E,O)),examples:(E,O)=>{if(!Array.isArray(E)||!Array.isArray(O))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(E)}" and "${JSON.stringify(O)}"`);return Ax(E,O)},multipleOf:(E,O)=>{let T=1;for(;!Number.isInteger(E)||!Number.isInteger(O);)T*=10,E*=10,O*=10;return Jle(E,O)/T},exclusiveMaximum:Math.min,maximum:Math.min,maxItems:Math.min,maxLength:Math.min,maxProperties:Math.min,exclusiveMinimum:Math.max,minimum:Math.max,minItems:Math.max,minLength:Math.max,minProperties:Math.max,uniqueItems:Dx,required:Ax,...f};return{mergeSchemaDefinitions:_,mergeArrayOfSchemaDefinitions:d}}function lue(e){const t=[],r=[e];for(;r.length>0;){const i=r.pop();if(typeof i=="boolean"||i.allOf===void 0){t.push(i);continue}const{allOf:o,...l}=i;t.push(l);for(let c=o.length-1;c>=0;c--)r.push(o[c])}return t}function uue(e){return t=>e(lue(t))}var av={},Vj;function cue(){if(Vj)return av;Vj=1;var e=/~/,t=/~[01]/g;function r(h){switch(h){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+h)}function i(h){return e.test(h)?h.replace(t,r):h}function o(h,m,y){for(var v,w,b=1,C=m.length;b<C;){if(m[b]==="constructor"||m[b]==="prototype"||m[b]==="__proto__")return h;if(v=i(m[b++]),w=C>b,typeof h[v]>"u"&&(Array.isArray(h)&&v==="-"&&(v=h.length),w&&(m[b]!==""&&m[b]<1/0||m[b]==="-"?h[v]=[]:h[v]={})),!w)break;h=h[v]}var x=h[v];return y===void 0?delete h[v]:h[v]=y,x}function l(h){if(typeof h=="string"){if(h=h.split("/"),h[0]==="")return h;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(h)){for(const m of h)if(typeof m!="string"&&typeof m!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return h}throw new Error("Invalid JSON pointer.")}function c(h,m){if(typeof h!="object")throw new Error("Invalid input object.");m=l(m);var y=m.length;if(y===1)return h;for(var v=1;v<y;){if(h=h[i(m[v++])],y===v)return h;if(typeof h!="object"||h===null)return}}function f(h,m,y){if(typeof h!="object")throw new Error("Invalid input object.");if(m=l(m),m.length===0)throw new Error("Invalid JSON pointer for set.");return o(h,m,y)}function d(h){var m=l(h);return{get:function(y){return c(y,m)},set:function(y,v){return f(y,m,v)}}}return av.get=c,av.set=f,av.compile=d,av}var fue=cue();const kx=jl(fue);var due=p9();const fR=jl(due);function n2(e,t){if(nr in e&&fR.equal(e[nr],t))return e;for(const r of Object.values(e))if(Array.isArray(r)){for(const i of r)if(Nn(i)){const o=n2(i,t);if(o!==void 0)return o}}else if(Nn(r)){const i=n2(r,t);if(i!==void 0)return i}}function LC(e,t){const r=Be(e,nr,t);Or in e&&(e={...e,[Or]:fR.resolve(r,e[Or])});for(const[i,o]of Object.entries(e))Array.isArray(o)?e={...e,[i]:o.map(l=>Nn(l)?LC(l,r):l)}:Nn(o)&&(e={...e,[i]:LC(o,r)});return e}function dR(e,t){const r=t[e];return[qv(t,[e]),r]}function b$(e,t={},r=[],i=Be(t,[nr])){const o=e||"";let l;if(o.startsWith("#")){const f=decodeURIComponent(o.substring(1));i===void 0||nr in t&&t[nr]===i?l=kx.get(t,f):t[gv]===pS&&(l=n2(t,i.replace(/\/$/,"")),l!==void 0&&(l=kx.get(l,f)))}else if(t[gv]===pS){const f=i?fR.resolve(i,o):o,[d,...h]=f.replace(/#\/?$/,"").split("#");l=n2(t,d.replace(/\/$/,"")),l!==void 0&&(i=l[nr],la(h)||(l=kx.get(l,decodeURIComponent(h.join("#")))))}if(l===void 0)throw new Error(`Could not find a definition for ${e}.`);const c=l[Or];if(c){if(r.includes(c)){if(r.length===1)throw new Error(`Definition for ${e} is a circular reference`);const[m,...y]=r,v=[...y,o,m].join(" -> ");throw new Error(`Definition for ${m} contains a circular reference through ${v}`)}const[f,d]=dR(Or,l),h=b$(d,t,[...r,o],i);return Object.keys(f).length>0?t[gv]===Ule||t[gv]===pS?{[Bc]:[f,h]}:{...f,...h}:h}return l}function S$(e,t={},r=Be(t,[nr])){return b$(e,t,[],r)}function Ol(e){let t;const r=Be(e,$le);return Pc(r)?t=r:r!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof r}" instead`),t}function Qv(e){return Array.isArray(e)?"array":typeof e=="string"?"string":e==null?"null":typeof e=="boolean"?"boolean":isNaN(e)?typeof e=="object"?"object":"string":"number"}function ol(e){let{type:t}=e;return!t&&e.const?Qv(e.const):!t&&e.enum?"string":!t&&(e.properties||e.additionalProperties||e.patternProperties)?"object":(Array.isArray(t)&&(t.length===2&&t.includes("null")?t=t.find(r=>r!=="null"):t=t[0]),t)}function ac(e,t){const r=Object.assign({},e);return Object.keys(t).reduce((i,o)=>{const l=e?e[o]:{},c=t[o];return e&&o in e&&Mn(c)?i[o]=ac(l,c):e&&t&&(ol(e)==="object"||ol(t)==="object")&&o===f$&&Array.isArray(l)&&Array.isArray(c)?i[o]=eY(l,c):i[o]=c,i},r)}function w$(e,t,r){var i;if(e&&r){const o=Be(e,r);if(o===void 0)return;for(let l=0;l<t.length;l++){const c=t[l],f=Be(c,[In,r],{});if(!(f.type==="object"||f.type==="array")&&(f.const===o||!((i=f.enum)===null||i===void 0)&&i.includes(o)))return l}}}function hR(e,t,r,i,o){if(t===void 0)return 0;const l=w$(t,r,o);if(Uz(l))return l;for(let c=0;c<r.length;c++){const f=r[c];if(o&&_n(f,[In,o])){const d=Be(t,o),h=Be(f,[In,o],{});if(e.isValid(h,d,i))return c}else if(f[In]){const d={anyOf:Object.keys(f[In]).map(m=>({required:[m]}))};let h;if(f.anyOf){const{...m}=f;m.allOf?m.allOf=m.allOf.slice():m.allOf=[],m.allOf.push(d),h=m}else h=Object.assign({},f,d);if(delete h.required,e.isValid(h,t,i))return c}else if(e.isValid(f,t,i))return c}return 0}function Ti(e,t,r={},i,o,l=!1){return bl(e,t,r,i,void 0,void 0,o,l)[0]}function hue(e,t,r,i,o,l,c){const{if:f,then:d,else:h,...m}=t,y=e.isValid(f,l||{},r);let v=[m],w=[];if(i)d&&typeof d!="boolean"&&(w=w.concat(bl(e,d,r,l,i,o,c))),h&&typeof h!="boolean"&&(w=w.concat(bl(e,h,r,l,i,o,c)));else{const b=y?d:h;b&&typeof b!="boolean"&&(w=w.concat(bl(e,b,r,l,i,o,c)))}return w.length&&(v=w.map(b=>ac(m,b))),v.flatMap(b=>bl(e,b,r,l,i,o,c))}function E$(e){return e.reduce((r,i)=>i.length>1?i.flatMap(o=>Bz(r.length,l=>[...r[l]].concat(o))):(r.forEach(o=>o.push(i[0])),r),[[]])}function _$(e,t){return Object.keys(e.patternProperties).filter(r=>RegExp(r).test(t)).reduce((r,i)=>(Fn(r,[i],e.patternProperties[i]),r),{})}function pue(e,t,r,i,o,l,c,f){const d=x$(e,t,r,i,o,l,c,f);if(d.length>1||d[0]!==t)return d;if(lR in t)return T$(e,t,r,i,o,l,c).flatMap(m=>bl(e,m,r,l,i,o,c));if(Bc in t&&Array.isArray(t[Bc])){const h=t.allOf.map(y=>bl(e,y,r,l,i,o,c));return E$(h).map(y=>({...t,allOf:y}))}return[t]}function x$(e,t,r,i,o,l,c,f){const d=Rp(t,r,o,void 0,f);return d!==t?bl(e,d,r,l,i,o,c,f):[t]}function Rp(e,t,r,i,o){if(!Mn(e))return e;let l=e;if(Or in l){const{$ref:c,...f}=l;if(r.includes(c))return l;r.push(c),l={...S$(c,t,i),...f},nr in l&&(i=l[nr])}if(In in l){const c=[],f=XK(l[In],(d,h,m)=>{const y=[...r];d[m]=Rp(h,t,y,i,o),c.push(y)},{});$K(r,Gz(yK(c))),l={...l,[In]:f}}if(Kp in l&&!Array.isArray(l.items)&&typeof l.items!="boolean"&&(l={...l,items:Rp(l.items,t,r,i,o)}),o){let c,f;Dn in e&&Array.isArray(e[Dn])?(c=Dn,f=l[Dn]):gn in e&&Array.isArray(e[gn])&&(c=gn,f=l[gn]),c&&f&&(l={...l,[c]:f.map(d=>Rp(d,t,r,i,o))})}return pr(e,l)?e:l}function mue(e,t,r,i,o){const l={...t,properties:{...t.properties}},c=i&&Mn(i)?i:{};return Object.keys(c).forEach(f=>{if(!(f in l.properties)){if(PC in l){const d=_$(l,f);if(!la(d)){l.properties[f]=Ti(e,{[Bc]:Object.values(d)},r,Be(c,[f]),o),Fn(l.properties,[f,ec],!0);return}}if(e2 in l&&l.additionalProperties!==!1){let d;typeof l.additionalProperties!="boolean"?Or in l.additionalProperties?d=Ti(e,{[Or]:Be(l.additionalProperties,[Or])},r,c,o):"type"in l.additionalProperties?d={...l.additionalProperties}:Dn in l.additionalProperties||gn in l.additionalProperties?d={type:"object",...l.additionalProperties}:d={type:Qv(Be(c,[f]))}:d={type:Qv(Be(c,[f]))},l.properties[f]=d,Fn(l.properties,[f,ec],!0)}else l.properties[f]={type:"null"},Fn(l.properties,[f,ec],!0)}}),l}const{compareSchemaDefinitions:gue,compareSchemaValues:yue}=Wle(),{mergeArrayOfSchemaDefinitions:vue}=oue({intersectJson:Gle(yue),deduplicateJsonSchemaDef:g$(gue)}),bue=uue(vue);function Sue(e){return bue(e)}function bl(e,t,r,i,o=!1,l=[],c,f){return Mn(t)?pue(e,t,r,o,l,i,c,f).flatMap(h=>{var m;let y=h;if(kle in y)return hue(e,y,r,o,l,i,c);if(Bc in y){if(o){const{allOf:w,...b}=y;return[...w,b]}try{const w=[],b=[];(m=y.allOf)===null||m===void 0||m.forEach(C=>{typeof C=="object"&&C.contains?w.push(C):b.push(C)}),w.length&&(y={...y,allOf:b}),y=c?c(y):Sue(y),w.length&&(y.allOf=w)}catch(w){console.warn(`could not merge subschemas in allOf:
60
60
  `,w);const{allOf:b,...C}=y;return C}}return In in y&&PC in y&&(y=Object.keys(y.properties).reduce((w,b)=>{const C=_$(w,b);return la(C)||(w.properties[b]=Ti(e,{allOf:[w.properties[b],...Object.values(C)]},r,Be(i,[b]),c)),w},{...y,properties:{...y.properties}})),PC in y||e2 in y&&y.additionalProperties!==!1?mue(e,y,r,i,c):y}):[{}]}function wue(e,t,r,i,o){let l;const{oneOf:c,anyOf:f,...d}=t;if(Array.isArray(c)?l=c:Array.isArray(f)&&(l=f),l){const h=o===void 0&&i?{}:o,m=Ol(t);l=l.map(v=>Rp(v,r,[]));const y=hR(e,h,l,r,m);if(i)return l.map(v=>ac(d,v));t=ac(d,l[y])}return[t]}function T$(e,t,r,i,o,l,c){const{dependencies:f,...d}=t;return wue(e,d,r,i,l).flatMap(m=>C$(e,f,m,r,i,o,l,c))}function C$(e,t,r,i,o,l,c,f){let d=[r];for(const h in t){if(!o&&Be(c,[h])===void 0||r.properties&&!(h in r.properties))continue;const[m,y]=dR(h,t);return Array.isArray(y)?d[0]=Eue(r,y):Mn(y)&&(d=_ue(e,r,i,h,y,o,l,c,f)),d.flatMap(v=>C$(e,m,v,i,o,l,c,f))}return d}function Eue(e,t){if(!t)return e;const r=Array.isArray(e.required)?Array.from(new Set([...e.required,...t])):t;return{...e,required:r}}function _ue(e,t,r,i,o,l,c,f,d){return bl(e,o,r,f,l,c,d).flatMap(m=>{const{oneOf:y,...v}=m;if(t=ac(t,v),y===void 0)return t;const w=y.map(C=>typeof C=="boolean"||!(Or in C)?[C]:x$(e,C,r,l,c,f));return E$(w).flatMap(C=>xue(e,t,r,i,C,l,c,f,d))})}function xue(e,t,r,i,o,l,c,f,d){const h=o.filter(m=>{if(typeof m=="boolean"||!m||!m.properties)return!1;const{[i]:y}=m.properties;if(y){const v={type:"object",properties:{[i]:y}};return e.isValid(v,f,r)||l}return!1});return!l&&h.length!==1?(console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),[t]):h.flatMap(m=>{const y=m,[v]=dR(i,y.properties),w={...y,properties:v};return bl(e,w,r,f,l,c,d).map(C=>ac(t,C))})}function vv(e,t,r,i,o,l={},c){if(Array.isArray(r[o])){const d=Ol(r)||i,h=r[o].map(y=>Ti(e,y,t,l,c)),m=Be(l,d);if(m!==void 0)return h.find(y=>Ac(Be(y,[In,d,tw],Be(y,[In,d,so])),m))}}function A$(e,t,r,i,o){let l=r;if(_n(r,Or)&&(l=Ti(e,r,t,void 0,o)),la(i))return l;const c=Array.isArray(i)?i:i.split("."),[f,...d]=c;if(f&&_n(l,f))return l=Be(l,f),A$(e,t,l,d,o)}function gS(e,t,r,i,o,l){const c=A$(e,t,r,i,l);return c===void 0?o:c}const Bj={title:"!@#$_UNKNOWN_$#@!"};function Tue(e,t,r,i,o={},l){const c=Array.isArray(i)?[...i]:i.split(".");let f=r;const d=c.pop();c.length&&c.forEach(v=>{f=gS(e,t,f,[In,v],{},l),_n(f,gn)?f=vv(e,t,f,d,gn,Be(o,v),l):_n(f,Dn)&&(f=vv(e,t,f,d,Dn,Be(o,v),l))}),_n(f,gn)?f=vv(e,t,f,d,gn,o,l):_n(f,Dn)&&(f=vv(e,t,f,d,Dn,o,l));let h=gS(e,t,f,[In,d],Bj,l);h===Bj&&(h=void 0);const m=gS(e,t,f,f$,[],l);let y;return h&&Array.isArray(m)&&(y=m.includes(d)),{field:h,isRequired:y}}const Cue={type:"object",$id:zle,properties:{__not_really_there__:{type:"number"}}};function qC(e,t,r,i,o){let l=0;return r&&(Nn(r.properties)?l+=GK(r.properties,(c,f,d)=>{const h=Be(i,d);if(typeof f=="boolean")return c;if(_n(f,Or)){const m=Ti(e,f,t,h,o);return c+qC(e,t,m,h||{},o)}if((_n(f,gn)||_n(f,Dn))&&h){const m=_n(f,gn)?gn:Dn,y=Ol(f);return c+Wv(e,t,h,Be(f,m),-1,y,o)}if(f.type==="object")return Nn(h)&&(c+=1),c+qC(e,t,f,h,o);if(f.type===Qv(h)){let m=c+1;return f.default?m+=h===f.default?1:-1:f.const&&(m+=h===f.const?1:-1),m}return c},0):Pc(r.type)&&r.type===Qv(i)&&(l+=1)),l}function Wv(e,t,r,i,o=-1,l,c){const f=i.map(v=>Rp(v,t,[])),d=w$(r,i,l);if(Uz(d))return d;const h=f.reduce((v,w,b)=>(hR(e,r,[Cue,w],t,l)===1&&v.push(b),v),[]);if(h.length===1)return h[0];h.length||Bz(f.length,v=>h.push(v));const m=new Set,{bestIndex:y}=h.reduce((v,w)=>{const{bestScore:b}=v,C=f[w],x=qC(e,t,C,r,c);return m.add(x),x>b?{bestIndex:w,bestScore:x}:v},{bestIndex:o,bestScore:0});return m.size===1&&o>=0?o:y}function pR(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every(t=>Mn(t))}function Jv(e,t,r=!1,i=!1,o=!1){if(Array.isArray(t)){const l=Array.isArray(e)?e:[],c=o?l:t,f=o?t:l,d=c.map((h,m)=>f[m]!==void 0?Jv(l[m],t[m],r,i,o):h);return(r||o)&&d.length<f.length&&d.push(...f.slice(d.length)),d}if(Mn(t)){const l=Object.assign({},e);return Object.keys(t).reduce((c,f)=>{var d;const h=Be(t,f),m=Mn(e)&&f in e,y=f in t,v=(d=Be(e,f))!==null&&d!==void 0?d:{},w=m&&Object.entries(v).some(([,x])=>Mn(x)),b=m&&Mn(Be(e,f)),C=y&&Mn(h);return b&&C&&!w?(c[f]={...Be(e,f),...h},c):(c[f]=Jv(Be(e,f),h,r,i,o&&(m||!y)),c)},l)}return i&&(e!==void 0&&$S(t)||typeof t=="number"&&isNaN(t))||o&&!$S(t)?e:t}function eb(e,t,r=!1){return Object.keys(t).reduce((i,o)=>{const l=e?e[o]:{},c=t[o];if(e&&o in e&&Mn(c))i[o]=eb(l,c,r);else if(r&&Array.isArray(l)&&Array.isArray(c)){let f=c;r==="preventDuplicates"&&(f=c.reduce((d,h)=>(l.includes(h)||d.push(h),d),[])),i[o]=l.concat(f)}else i[o]=c;return i},Object.assign({},e))}function O$(e){return Array.isArray(e.enum)&&e.enum.length===1||so in e}function mR(e,t,r={},i){const o=Ti(e,t,r,void 0,i),l=o.oneOf||o.anyOf;return Array.isArray(o.enum)?!0:Array.isArray(l)?l.every(c=>typeof c!="boolean"&&O$(c)):!1}function gR(e,t,r,i){return!t.uniqueItems||!t.items||typeof t.items=="boolean"?!1:mR(e,t.items,r,i)}function R$(e){const t=e[so],r=ol(e);return Mn(t)&&Pc(t?.$data)&&r!=="object"&&r!=="array"}function Aue(e){if(Nle in e&&Array.isArray(e.enum)&&e.enum.length===1)return e.enum[0];if(so in e)return e.const;throw new Error("schema cannot be inferred as a constant")}function Yp(e,t){if(e.enum){let l;if(t){const{enumNames:c}=Ot(t);l=c}return e.enum.map((c,f)=>({label:l?.[f]||String(c),value:c}))}let r,i;e.anyOf?(r=e.anyOf,i=t?.anyOf):e.oneOf&&(r=e.oneOf,i=t?.oneOf);let o=Ol(e);if(t){const{optionsSchemaSelector:l=o}=Ot(t);o=l}return r&&r.map((l,c)=>{const{title:f}=Ot(i?.[c]),d=l;let h,m=f;if(o){const y=Be(d,[In,o],{});h=Be(y,tw,Be(y,so)),m=m||y?.title||d.title||String(h)}else h=Aue(d),m=m||d.title||String(h);return{schema:d,label:m,value:h}})}const Oue=["string","number","integer","boolean","null"];var Zp;(function(e){e[e.Ignore=0]="Ignore",e[e.Invert=1]="Invert",e[e.Fallback=2]="Fallback"})(Zp||(Zp={}));function zx(e,t=Zp.Ignore,r=-1){if(r>=0){if(Array.isArray(e.items)&&r<e.items.length){const i=e.items[r];if(typeof i!="boolean")return i}}else if(e.items&&!Array.isArray(e.items)&&typeof e.items!="boolean")return e.items;return t!==Zp.Ignore&&Mn(e.additionalItems)?e.additionalItems:{}}function M$(e,t){const{default:r,type:i}=e;return Array.isArray(i)&&i.includes("null")&&la(t)&&r===null?null:t}function Fj(e,t,r,i,o,l=[],c={},f=!1,d=!1){const{emptyObjectFields:h="populateAllDefaults"}=c;if(i===!0||f)e[t]=r;else if(i==="excludeObjectChildren")(d&&r!==void 0||!Mn(r)||!la(r))&&(e[t]=r);else if(h!=="skipDefaults"){const m=o===void 0?l.includes(t):o;Mn(r)?h==="skipEmptyDefaults"?la(r)||(e[t]=r):(!la(r)||l.includes(t))&&(m||h!=="populateRequiredDefaults")&&(e[t]=r):r!==void 0&&(h==="populateAllDefaults"||h==="skipEmptyDefaults"||m&&l.includes(t))&&(e[t]=r)}}function Mc(e,t,r={}){const{parentDefaults:i,rawFormData:o,rootSchema:l={},includeUndefinedValues:c=!1,_recurseList:f=[],experimental_defaultFormStateBehavior:d=void 0,experimental_customMergeAllOf:h=void 0,required:m,shouldMergeDefaultsIntoFormData:y=!1,initialDefaultsGenerated:v}=r;let w=Mn(o)?o:{};const b=Mn(t)?t:{};let C=i,x=null,_=d,S=f;if(b[so]!==void 0&&d?.constAsDefaults!=="never"&&!R$(b))C=b[so];else if(Mn(C)&&Mn(b.default))C=eb(C,b.default);else if(tw in b&&!b[Dn]&&!b[gn]&&!b[Or])C=b.default;else if(Or in b){const O=b[Or];f.includes(O)||(S=f.concat(O),x=S$(O,l)),x&&!C&&(C=b.default),y&&x&&!Mn(o)&&(w=o)}else if(lR in b){const O={...Hj(e,b,r,C),...w};x=T$(e,b,l,!1,[],O,h)[0]}else if(pR(b))C=b.items.map((O,T)=>Mc(e,O,{rootSchema:l,includeUndefinedValues:c,_recurseList:f,experimental_defaultFormStateBehavior:d,experimental_customMergeAllOf:h,parentDefaults:Array.isArray(i)?i[T]:void 0,rawFormData:w,required:m,shouldMergeDefaultsIntoFormData:y}));else if(gn in b){const{oneOf:O,...T}=b;if(O.length===0)return;const M=Ol(b),{type:D="null"}=T;!Array.isArray(D)&&Oue.includes(D)&&_?.constAsDefaults==="skipOneOf"&&(_={..._,constAsDefaults:"never"}),x=O[Wv(e,l,o??b.default,O,0,M,h)],x=ac(T,x)}else if(Dn in b){const{anyOf:O,...T}=b;if(O.length===0)return;const M=Ol(b);x=O[Wv(e,l,o??b.default,O,0,M,h)],x=ac(T,x)}if(x)return Mc(e,x,{rootSchema:l,includeUndefinedValues:c,_recurseList:S,experimental_defaultFormStateBehavior:_,experimental_customMergeAllOf:h,parentDefaults:C,rawFormData:o??w,required:m,shouldMergeDefaultsIntoFormData:y,initialDefaultsGenerated:v});C===void 0&&(C=b.default);const A=Hj(e,b,r,C);let E=A??C;if(y){const{arrayMinItems:O={}}=d||{},{mergeExtraDefaults:T}=O,M=Rue(e,b,l,o,d,h);(!Mn(o)||Bc in b)&&(E=Jv(E,M,T,!0))}return E}function Rue(e,t,r,i,o,l){const c=!O$(t)&&mR(e,t,r,l);let f=i;if(c){const h=Yp(t);f=h?.some(y=>pr(y.value,i))?i:void 0}return t[so]&&o?.constAsDefaults==="always"&&(f=t.const),f}function Mue(e,t,{rawFormData:r,rootSchema:i={},includeUndefinedValues:o=!1,_recurseList:l=[],experimental_defaultFormStateBehavior:c=void 0,experimental_customMergeAllOf:f=void 0,required:d,shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m}={},y){{const v=Mn(r)?r:{},w=t,b=c?.allOf==="populateDefaults"&&Bc in w?Ti(e,w,i,v,f):w,C=b[so],x=Object.keys(b.properties||{}).reduce((_,S)=>{var A;const E=Be(b,[In,S],{}),O=Mn(C)&&C[S]!==void 0,T=(Mn(E)&&so in E||O)&&c?.constAsDefaults!=="never"&&!R$(E),M=Mc(e,E,{rootSchema:i,_recurseList:l,experimental_defaultFormStateBehavior:c,experimental_customMergeAllOf:f,includeUndefinedValues:o===!0,parentDefaults:Be(y,[S]),rawFormData:Be(v,[S]),required:(A=b.required)===null||A===void 0?void 0:A.includes(S),shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m});return Fj(_,S,M,o,d,b.required,c,T,E?.type==="null"),_},{});if(b.additionalProperties&&!m){const _=Mn(b.additionalProperties)?b.additionalProperties:{},S=new Set;Mn(y)&&Object.keys(y).filter(E=>!b.properties||!b.properties[E]).forEach(E=>S.add(E));const A=[];Object.keys(v).filter(E=>!b.properties||!b.properties[E]).forEach(E=>{S.add(E),A.push(E)}),S.forEach(E=>{var O;const T=Mc(e,_,{rootSchema:i,_recurseList:l,experimental_defaultFormStateBehavior:c,experimental_customMergeAllOf:f,includeUndefinedValues:o===!0,parentDefaults:Be(y,[E]),rawFormData:Be(v,[E]),required:(O=b.required)===null||O===void 0?void 0:O.includes(E),shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m});Fj(x,E,T,o,d,A)})}return M$(t,x)}}function jue(e,t,{rawFormData:r,rootSchema:i={},_recurseList:o=[],experimental_defaultFormStateBehavior:l=void 0,experimental_customMergeAllOf:c=void 0,required:f,requiredAsRoot:d=!1,shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m}={},y){var v,w;const b=t,C=(v=l?.arrayMinItems)!==null&&v!==void 0?v:{},{populate:x,mergeExtraDefaults:_}=C,S=x==="never",A=x==="requiredOnly",E=x==="all"||!S&&!A,O=(w=C?.computeSkipPopulate)!==null&&w!==void 0?w:(()=>!1),M=l?.emptyObjectFields==="skipEmptyDefaults"?void 0:[];if(Array.isArray(y)&&(y=y.map((q,Y)=>{const W=zx(b,Zp.Fallback,Y);return Mc(e,W,{rootSchema:i,_recurseList:o,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,parentDefaults:q,required:f,shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m})})),Array.isArray(r)){const q=zx(b);if(S)y=r;else{const Y=r.map((ie,ae)=>Mc(e,q,{rootSchema:i,_recurseList:o,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,rawFormData:ie,parentDefaults:Be(y,[ae]),required:f,shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m}));y=Jv(y,Y,(A&&f||E)&&_)}}if((Mn(b)&&so in b&&l?.constAsDefaults!=="never")===!1){if(S)return y??M;if(A&&!f)return y||void 0}let P;const V=Array.isArray(y)?y.length:0;if(!b.minItems||gR(e,b,i,c)||O(e,b,i)||b.minItems<=V)P=y||!f&&!d?y:M;else{const q=y||[],Y=zx(b,Zp.Invert),W=Y.default,ie=Array.from({length:b.minItems-V},()=>Mc(e,Y,{parentDefaults:W,rootSchema:i,_recurseList:o,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,required:f,shouldMergeDefaultsIntoFormData:h}));P=q.concat(ie)}return M$(t,P)}function Hj(e,t,r={},i){switch(ol(t)){case"object":return Mue(e,t,r,i);case"array":return jue(e,t,r,i)}}function j$(e,t,r,i,o=!1,l,c,f){if(!Mn(t))throw new Error("Invalid schema: "+t);const d=Ti(e,t,i,r,c),h=Mc(e,d,{rootSchema:i,includeUndefinedValues:o,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,rawFormData:r,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:f,requiredAsRoot:!0});if(d.type!=="object"&&Mn(d.default))return{...h,...r};if(Mn(r)||Array.isArray(r)){const{mergeDefaultsIntoFormData:m}=l||{};return Jv(h,r,!0,m==="useDefaultIfFormDataUndefined",!0)}return h}function D$(e={}){return"widget"in Ot(e)&&Ot(e).widget!=="hidden"}function N$(e,t,r={},i,o){if(r[cR]==="files")return!0;if(t.items){const l=Ti(e,t.items,i,void 0,o);return l.type==="string"&&l.format==="data-url"}return!1}function Due(e,t,r={},i,o,l){const c=Ot(r,o),{label:f=!0}=c;let d=!!f;if(d){const h=ol(t),m=Be(t,ec,!1);h==="array"&&(d=m||gR(e,t,i,l)||N$(e,t,r,i,l)||D$(r)),h==="object"&&(d=m),h==="boolean"&&r&&!r[cR]&&(d=!1),r&&r[Ile]&&(d=!1)}return d}const rp=Symbol("no Value");function VC(e,t,r,i,o={},l){let c;if(_n(r,In)){const f={};if(_n(i,In)){const m=Be(i,In,{});Object.keys(m).forEach(y=>{_n(o,y)&&(f[y]=void 0)})}const d=Object.keys(Be(r,In,{})),h={};d.forEach(m=>{const y=Be(o,m);let v=Be(i,[In,m],{}),w=Be(r,[In,m],{});_n(v,Or)&&(v=Ti(e,v,t,y,l)),_n(w,Or)&&(w=Ti(e,w,t,y,l));const b=Be(v,"type"),C=Be(w,"type");if(!b||b===C)if(_n(f,m)&&delete f[m],C==="object"||C==="array"&&Array.isArray(y)){const x=VC(e,t,w,v,y,l);(x!==void 0||C==="array")&&(h[m]=x)}else{const x=Be(w,"default",rp),_=Be(v,"default",rp);x!==rp&&x!==y&&(_===y?f[m]=x:Be(w,"readOnly")===!0&&(f[m]=void 0));const S=Be(w,"const",rp),A=Be(v,"const",rp);S!==rp&&S!==y&&(f[m]=A===y?S:void 0)}}),c={...typeof o=="string"||Array.isArray(o)?void 0:o,...f,...h}}else if(Be(i,"type")==="array"&&Be(r,"type")==="array"&&Array.isArray(o)){let f=Be(i,"items"),d=Be(r,"items");if(typeof f=="object"&&typeof d=="object"&&!Array.isArray(f)&&!Array.isArray(d)){_n(f,Or)&&(f=Ti(e,f,t,o,l)),_n(d,Or)&&(d=Ti(e,d,t,o,l));const h=Be(f,"type"),m=Be(d,"type");if(!h||h===m){const y=Be(r,"maxItems",-1);m==="object"?c=o.reduce((v,w)=>{const b=VC(e,t,d,f,w,l);return b!==void 0&&(y<0||v.length<y)&&v.push(b),v},[]):c=y>0&&o.length>y?o.slice(0,y):o}}else typeof f=="boolean"&&typeof d=="boolean"&&f===d&&(c=o)}return c}function gh(e,t,r,i,o,l=[],c){if(Or in t||lR in t||Bc in t){const d=Ti(e,t,i,o,c);if(l.findIndex(m=>pr(m,d))===-1)return gh(e,d,r,i,o,l.concat(d),c)}let f={[hS]:r.replace(/^\./,"")};if(gn in t||Dn in t){const d=gn in t?t.oneOf:t.anyOf,h=Ol(t),m=Wv(e,i,o,d,0,h,c),y=d[m];f={...f,...gh(e,y,r,i,o,l,c)}}if(e2 in t&&t[e2]!==!1&&Fn(f,uR,!0),Kp in t&&Array.isArray(o)){const{items:d,additionalItems:h}=t;Array.isArray(d)?o.forEach((m,y)=>{d[y]?f[y]=gh(e,d[y],`${r}.${y}`,i,m,l,c):h?f[y]=gh(e,h,`${r}.${y}`,i,m,l,c):console.warn(`Unable to generate path schema for "${r}.${y}". No schema defined for it`)}):o.forEach((m,y)=>{f[y]=gh(e,d,`${r}.${y}`,i,m,l,c)})}else if(In in t)for(const d in t.properties){const h=Be(t,[In,d],{});f[d]=gh(e,h,`${r}.${d}`,i,Be(o,[d]),l,c)}return f}function Nue(e,t,r="",i,o,l){return gh(e,t,r,i,o,void 0,l)}class kue{constructor(t,r,i,o){r&&r[gv]===pS?this.rootSchema=LC(r,Be(r,nr,"#")):this.rootSchema=r,this.validator=t,this.experimental_defaultFormStateBehavior=i,this.experimental_customMergeAllOf=o}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(t,r,i={},o){return!t||!r?!1:this.validator!==t||!pr(this.rootSchema,r)||!pr(this.experimental_defaultFormStateBehavior,i)||this.experimental_customMergeAllOf!==o}findFieldInSchema(t,r,i){return Tue(this.validator,this.rootSchema,t,r,i,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(t,r,i,o){return vv(this.validator,this.rootSchema,t,r,i,o,this.experimental_customMergeAllOf)}getDefaultFormState(t,r,i=!1,o){return j$(this.validator,t,r,this.rootSchema,i,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,o)}getDisplayLabel(t,r,i){return Due(this.validator,t,r,this.rootSchema,i,this.experimental_customMergeAllOf)}getClosestMatchingOption(t,r,i,o){return Wv(this.validator,this.rootSchema,t,r,i,o,this.experimental_customMergeAllOf)}getFirstMatchingOption(t,r,i){return hR(this.validator,t,r,this.rootSchema,i)}getFromSchema(t,r,i){return gS(this.validator,this.rootSchema,t,r,i,this.experimental_customMergeAllOf)}isFilesArray(t,r){return N$(this.validator,t,r,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(t){return gR(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(t){return mR(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}retrieveSchema(t,r,i){return Ti(this.validator,t,this.rootSchema,r,this.experimental_customMergeAllOf,i)}sanitizeDataForNewSchema(t,r,i){return VC(this.validator,this.rootSchema,t,r,i,this.experimental_customMergeAllOf)}toPathSchema(t,r,i){return Nue(this.validator,t,r,this.rootSchema,i,this.experimental_customMergeAllOf)}}function zue(e,t,r={},i){return new kue(e,t,r,i)}function $ue(e){var t;if(e.indexOf("data:")===-1)throw new Error("File is invalid: URI must be a dataURI");const i=e.slice(5).split(";base64,");if(i.length!==2)throw new Error("File is invalid: dataURI must be base64");const[o,l]=i,[c,...f]=o.split(";"),d=c||"",h=decodeURI(((t=f.map(m=>m.split("=")).find(([m])=>m==="name"))===null||t===void 0?void 0:t[1])||"unknown");try{const m=atob(l),y=new Array(m.length);for(let w=0;w<m.length;w++)y[w]=m.charCodeAt(w);return{blob:new window.Blob([new Uint8Array(y)],{type:d}),name:h}}catch(m){throw new Error("File is invalid: "+m.message)}}function bc(e,t){let r=String(e);for(;r.length<t;)r="0"+r;return r}function k$(e,t){if(e<=0&&t<=0)e=new Date().getFullYear()+e,t=new Date().getFullYear()+t;else if(e<0||t<0)throw new Error(`Both start (${e}) and stop (${t}) must both be <= 0 or > 0, got one of each`);if(e>t)return k$(t,e).reverse();const r=[];for(let i=e;i<=t;i++)r.push({value:i,label:bc(i,2)});return r}function Gj(e,t){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!="object"||typeof t!="object")return!1;const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(let o=0;o<r.length;o++){const l=r[o];if(!Object.prototype.hasOwnProperty.call(t,l)||!Object.is(e[l],t[l]))return!1}return!0}function Pue(e,t){let r=e;if(Array.isArray(t)){const i=r.split(/(%\d)/);t.forEach((o,l)=>{const c=i.findIndex(f=>f===`%${l+1}`);c>=0&&(i[c]=o)}),r=i.join("")}return r}function Iue(e,t){return Pue(e,t)}function Ma(e,t=[],r){if(Array.isArray(e))return e.map(l=>Ma(l,t)).filter(l=>l!==r);const i=e===""||e===null?-1:Number(e),o=t[i];return o?o.value:r}function z$(e,t,r=[]){const i=Ma(e,r);return Array.isArray(t)?t.filter(o=>!pr(o,i)):pr(i,t)?void 0:t}function Mb(e,t){return Array.isArray(t)?t.some(r=>pr(r,e)):pr(t,e)}function $$(e,t=[],r=!1){const i=t.map((o,l)=>Mb(o.value,e)?String(l):void 0).filter(o=>typeof o<"u");return r?i:i[0]}function P$(e,t,r=[]){const i=Ma(e,r);if(!$S(i)){const o=r.findIndex(f=>i===f.value),l=r.map(({value:f})=>f);return t.slice(0,o).concat(i,t.slice(o)).sort((f,d)=>+(l.indexOf(f)>l.indexOf(d)))}return t}class I${constructor(t){this.errorSchema={},this.resetAllErrors(t)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(t){let i=Array.isArray(t)&&t.length>0||typeof t=="string"?Be(this.errorSchema,t):this.errorSchema;return!i&&t&&(i={},KK(this.errorSchema,t,i,Object)),i}resetAllErrors(t){return this.errorSchema=t?yb(t):{},this}addErrors(t,r){const i=this.getOrCreateErrorBlock(r);let o=Be(i,fi);return Array.isArray(o)||(o=[],i[fi]=o),Array.isArray(t)?Fn(i,fi,[...new Set([...o,...t])]):Fn(i,fi,[...new Set([...o,t])]),this}setErrors(t,r){const i=this.getOrCreateErrorBlock(r),o=Array.isArray(t)?[...new Set([...t])]:[t];return Fn(i,fi,o),this}clearErrors(t){const r=this.getOrCreateErrorBlock(t);return Fn(r,fi,[]),this}}function Kj(e,t){const r=$c(e),i=$c(t);if(e===t||!r&&!i)return[];if(r&&!i)return eo(e);if(!r&&i)return eo(t);{const o=eo(BK(e,(c,f)=>!pr(c,Be(t,f)))),l=pK(eo(t),eo(e));return[...o,...l]}}function Uue(e,t,r=[1900,new Date().getFullYear()+2],i="YMD"){const{day:o,month:l,year:c,hour:f,minute:d,second:h}=e,m={type:"day",range:[1,31],value:o},y={type:"month",range:[1,12],value:l},v={type:"year",range:r,value:c},w=[];switch(i){case"MDY":w.push(y,m,v);break;case"DMY":w.push(m,y,v);break;default:w.push(v,y,m)}return t&&w.push({type:"hour",range:[0,23],value:f},{type:"minute",range:[0,59],value:d},{type:"second",range:[0,59],value:h}),w}function U$(e){const t={};return e.multipleOf&&(t.step=e.multipleOf),(e.minimum||e.minimum===0)&&(t.min=e.minimum),(e.maximum||e.maximum===0)&&(t.max=e.maximum),t}function L$(e,t,r={},i=!0){const o={type:t||"text",...U$(e)};return r.inputType?o.type=r.inputType:t||(e.type==="number"?(o.type="number",i&&o.step===void 0&&(o.step="any")):e.type==="integer"&&(o.type="number",o.step===void 0&&(o.step=1))),r.autocomplete&&(o.autoComplete=r.autocomplete),r.accept&&(o.accept=r.accept),o}const Yj={props:{disabled:!1},submitText:"Submit",norender:!1};function q$(e={}){const t=Ot(e);if(t&&t[t2]){const r=t[t2];return{...Yj,...r}}return Yj}function It(e,t,r={}){const{templates:i}=t;if(e==="ButtonTemplates")return i[e];if(Object.hasOwn(r,e)&&typeof r[e]=="string"&&Object.hasOwn(i,r[e])){const o=r[e];return i[o]}return r[e]||i[e]}function yR(){if(typeof process>"u"||Be(process,"env.NODE_ENV")!=="test")return{};const e=new Map;return new Proxy({},{get(t,r){return e.has(r)||e.set(r,Kz("test-id-")),e.get(r)}})}var $x={exports:{}},Bn={};var Zj;function Lue(){if(Zj)return Bn;Zj=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),f=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),w=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function C(x){if(typeof x=="object"&&x!==null){var _=x.$$typeof;switch(_){case e:switch(x=x.type,x){case r:case o:case i:case h:case m:return x;default:switch(x=x&&x.$$typeof,x){case f:case c:case d:case v:case y:case l:return x;default:return _}}case t:return _}}}return Bn.ContextConsumer=c,Bn.ContextProvider=l,Bn.Element=e,Bn.ForwardRef=d,Bn.Fragment=r,Bn.Lazy=v,Bn.Memo=y,Bn.Portal=t,Bn.Profiler=o,Bn.StrictMode=i,Bn.Suspense=h,Bn.SuspenseList=m,Bn.isAsyncMode=function(){return!1},Bn.isConcurrentMode=function(){return!1},Bn.isContextConsumer=function(x){return C(x)===c},Bn.isContextProvider=function(x){return C(x)===l},Bn.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===e},Bn.isForwardRef=function(x){return C(x)===d},Bn.isFragment=function(x){return C(x)===r},Bn.isLazy=function(x){return C(x)===v},Bn.isMemo=function(x){return C(x)===y},Bn.isPortal=function(x){return C(x)===t},Bn.isProfiler=function(x){return C(x)===o},Bn.isStrictMode=function(x){return C(x)===i},Bn.isSuspense=function(x){return C(x)===h},Bn.isSuspenseList=function(x){return C(x)===m},Bn.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===r||x===o||x===i||x===h||x===m||x===w||typeof x=="object"&&x!==null&&(x.$$typeof===v||x.$$typeof===y||x.$$typeof===l||x.$$typeof===c||x.$$typeof===d||x.$$typeof===b||x.getModuleId!==void 0)},Bn.typeOf=C,Bn}var Xj;function que(){return Xj||(Xj=1,$x.exports=Lue()),$x.exports}var Vue=que();const Qj=jl(Vue),Px={boolean:{checkbox:"CheckboxWidget",radio:"RadioWidget",select:"SelectWidget",hidden:"HiddenWidget"},string:{text:"TextWidget",password:"PasswordWidget",email:"EmailWidget",hostname:"TextWidget",ipv4:"TextWidget",ipv6:"TextWidget",uri:"URLWidget","data-url":"FileWidget",radio:"RadioWidget",select:"SelectWidget",textarea:"TextareaWidget",hidden:"HiddenWidget",date:"DateWidget",datetime:"DateTimeWidget","date-time":"DateTimeWidget","alt-date":"AltDateWidget","alt-datetime":"AltDateTimeWidget",time:"TimeWidget",color:"ColorWidget",file:"FileWidget"},number:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},integer:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},array:{select:"SelectWidget",checkboxes:"CheckboxesWidget",files:"FileWidget",hidden:"HiddenWidget"}};function Bue(e){let t=Be(e,"MergedWidget");if(!t){const r=e.defaultProps&&e.defaultProps.options||{};t=({options:i,...o})=>N.jsx(e,{options:{...r,...i},...o}),Fn(e,"MergedWidget",t)}return t}function Rl(e,t,r={}){const i=ol(e);if(typeof t=="function"||t&&Qj.isForwardRef(j.createElement(t))||Qj.isMemo(t))return Bue(t);if(typeof t!="string")throw new Error(`Unsupported widget definition: ${typeof t} in schema: ${JSON.stringify(e)}`);if(t in r){const o=r[t];return Rl(e,o,r)}if(typeof i=="string"){if(!(i in Px))throw new Error(`No widget for type '${i}' in schema: ${JSON.stringify(e)}`);if(t in Px[i]){const o=r[Px[i][t]];return Rl(e,o,r)}}throw new Error(`No widget '${t}' for type '${i}' in schema: ${JSON.stringify(e)}`)}function Fue(e){let t=0;for(let r=0;r<e.length;r+=1){const i=e.charCodeAt(r);t=(t<<5)-t+i,t=t&t}return t.toString(16)}function Hue(e){const t=new Set;return JSON.stringify(e,(r,i)=>(t.add(r),i)),JSON.stringify(e,Array.from(t).sort())}function Sl(e){return Fue(Hue(e))}function Gue(e){return Sl(e)}function Kue(e,t,r={}){try{return Rl(e,t,r),!0}catch(i){const o=i;if(o.message&&(o.message.startsWith("No widget")||o.message.startsWith("Unsupported widget")))return!1;throw i}}function Fh(e,t){return`${Pc(e)?e:e[nr]}__${t}`}function Hh(e){return Fh(e,"description")}function vR(e){return Fh(e,"error")}function tb(e){return Fh(e,"examples")}function bR(e){return Fh(e,"help")}function rw(e){return Fh(e,"title")}function es(e,t=!1){const r=t?` ${tb(e)}`:"";return`${vR(e)} ${Hh(e)} ${bR(e)}${r}`}function Th(e,t){return`${e}-${t}`}function wl(e,t){return Fh(e,t)}function Ix(e,t){return Fh(e,`optional${t}`)}function vm(e){return!$S(e)&&(!Nn(e)||Array.isArray(e)||!la(e))}function Yue(e,t){const{rootSchema:r,schemaUtils:i}=e;if(Ac(t,r))return!0;if(Or in r){const o=i.retrieveSchema(r);return Ac(t,o)}return!1}function V$(e,t,r){return t?r:e}function Zue(e){return e?new Date(e).toJSON():void 0}function SR(e,t,r){const i=[Ple];return _n(e,Dj)&&i.unshift(Dj),Be(e,[...i,t],r)}function Xue(e,t){if(!Array.isArray(t))return e;const r=m=>m.reduce((y,v)=>(y[v]=!0,y),{}),i=m=>m.length>1?`properties '${m.join("', '")}'`:`property '${m[0]}'`,o=r(e),l=t.filter(m=>m==="*"||o[m]),c=r(l),f=e.filter(m=>!c[m]),d=l.indexOf("*");if(d===-1){if(f.length)throw new Error(`uiSchema order list does not contain ${i(f)}`);return l}if(d!==l.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");const h=[...l];return h.splice(d,1,...f),h}function Ux(e,t=!0){if(!e)return{year:-1,month:-1,day:-1,hour:t?-1:0,minute:t?-1:0,second:t?-1:0};const r=new Date(e);if(Number.isNaN(r.getTime()))throw new Error("Unable to parse date "+e);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:t?r.getUTCHours():0,minute:t?r.getUTCMinutes():0,second:t?r.getUTCSeconds():0}}function Ov(e){if(e.const||e.enum&&e.enum.length===1&&e.enum[0]===!0)return!0;if(e.anyOf&&e.anyOf.length===1)return Ov(e.anyOf[0]);if(e.oneOf&&e.oneOf.length===1)return Ov(e.oneOf[0]);if(e.allOf){const t=r=>Ov(r);return e.allOf.some(t)}return!1}function B$(e,t,r,i="customDeep"){if(i==="always")return!0;if(i==="shallow"){const{props:c,state:f}=e;return!Gj(c,t)||!Gj(f,r)}const{props:o,state:l}=e;return!pr(o,t)||!pr(l,r)}function Wj(e){const t=Gz(e.map(r=>Nn(r)?ol(r):void 0).flat().filter(r=>r!==void 0));return t.length===1?t[0]:t}function jb(e,t,r,i){const{enableOptionalDataFieldForType:o=[]}=Ot(i,e.globalUiOptions);let l;return Dn in t&&Array.isArray(t[Dn])?l=Wj(t[Dn]):gn in t&&Array.isArray(t[gn])?l=Wj(t[gn]):l=ol(t),!Yue(e,t)&&!r&&!!l&&!Array.isArray(l)&&!!o.find(c=>c===l)}function Jj(e,t=!0){const{year:r,month:i,day:o,hour:l=0,minute:c=0,second:f=0}=e,d=Date.UTC(r,i-1,o,l,c,f),h=new Date(d).toJSON();return t?h:h.slice(0,10)}function wR(e,t=[]){if(!e)return[];let r=[];return fi in e&&(r=r.concat(e[fi].map(i=>{const o=`.${t.join(".")}`;return{property:o,message:i,stack:`${o} ${i}`}}))),Object.keys(e).reduce((i,o)=>{if(o!==fi){const l=e[o];$c(l)&&(i=i.concat(wR(l,[...t,o])))}return i},r)}function Que(e){const t=new I$;return e.length&&e.forEach(r=>{const{property:i,message:o}=r,l=i==="."?[]:Fz(i);l.length>0&&l[0]===""&&l.splice(0,1),o&&t.addErrors(o,l)}),t.ErrorSchema}function oo(e,t,r,i){const o=Array.isArray(r)?r:r?.path,l=e===""?[]:[e],c=o?o.concat(...l):l,f=[t.idPrefix,...c].join(t.idSeparator);let d;return t.nameGenerator&&c.length>0&&(d=t.nameGenerator(c,t.idPrefix,i)),{path:c,[nr]:f,...d!==void 0&&{name:d}}}function F$(e){return Object.keys(e).reduce((t,r)=>{if(r==="addError")return t;{const i=e[r];return $c(i)?{...t,[r]:F$(i)}:{...t,[r]:i}}},{})}function Wue(e){return Object.values(e).every(t=>t!==-1)}function Jue(e){const{className:t="form-control",type:r,range:i,value:o,select:l,rootId:c,name:f,disabled:d,readonly:h,autofocus:m,registry:y,onBlur:v,onFocus:w}=e,b=`${c}_${r}`,{SelectWidget:C}=y.widgets,x=j.useCallback(_=>l(r,_),[l,r]);return N.jsx(C,{schema:{type:"integer"},id:b,name:f,className:t,options:{enumOptions:k$(i[0],i[1])},placeholder:r,value:o,disabled:d,readonly:h,autofocus:m,onChange:x,onBlur:v,onFocus:w,registry:y,label:"","aria-describedby":es(c)})}function ece(e){const{time:t=!1,disabled:r=!1,readonly:i=!1,options:o,onChange:l,value:c}=e,[f,d]=j.useState(Ux(c,t));j.useEffect(()=>{d(Ux(c,t))},[t,c]);const h=j.useCallback((w,b)=>{const C={...f,[w]:typeof b>"u"?-1:b};Wue(C)?l(Jj(C,t)):d(C)},[f,l,t]),m=j.useCallback(w=>{w.preventDefault(),!(r||i)&&l(void 0)},[r,i,l]),y=j.useCallback(w=>{if(w.preventDefault(),r||i)return;const b=Ux(new Date().toJSON(),t);l(Jj(b,t))},[r,i,t,l]);return{elements:j.useMemo(()=>Uue(f,t,o.yearsRange,o.format),[f,t,o.yearsRange,o.format]),handleChange:h,handleClear:m,handleSetNow:y}}function Gh(e){const t=j.useRef(e);return Ac(e,t.current)||(t.current=e),t.current}function tce(e,t){return e.replace(";base64",`;name=${encodeURIComponent(t)};base64`)}function nce(e){const{name:t,size:r,type:i}=e;return new Promise((o,l)=>{const c=new window.FileReader;c.onerror=l,c.onload=f=>{var d;typeof((d=f.target)===null||d===void 0?void 0:d.result)=="string"?o({dataURL:tce(f.target.result,t),name:t,size:r,type:i}):o({dataURL:null,name:t,size:r,type:i})},c.readAsDataURL(e)})}function rce(e){return Promise.all(Array.from(e).map(nce))}function eD(e){return e.reduce((t,r)=>{if(!r)return t;try{const{blob:i,name:o}=$ue(r);return[...t,{dataURL:r,name:o,size:i.size,type:i.type}]}catch{return t}},[])}function ace(e,t,r=!1){const i=j.useMemo(()=>r&&e?Array.isArray(e)?e:[e]:[],[e,r]),o=j.useMemo(()=>Array.isArray(e)?eD(e):eD([e||""]),[e]),l=j.useCallback(f=>{rce(f).then(d=>{const h=d.map(m=>m.dataURL||null);t(r?i.concat(...h):h[0])})},[i,r,t]),c=j.useCallback(f=>{if(r){const d=i.filter((h,m)=>m!==f);t(d)}else t(void 0)},[i,r,t]);return{filesInfo:o,handleChange:l,handleRemove:c}}function ice(e){if(!e)return"";const t=new Date(e),r=bc(t.getFullYear(),4),i=bc(t.getMonth()+1,2),o=bc(t.getDate(),2),l=bc(t.getHours(),2),c=bc(t.getMinutes(),2),f=bc(t.getSeconds(),2),d=bc(t.getMilliseconds(),3);return`${r}-${i}-${o}T${l}:${c}:${f}.${d}`}function yS(e,t,r=!1){if(!t)return e;const{errors:i,errorSchema:o}=e;let l=wR(t),c=t;return la(o)||(c=eb(o,t,r?"preventDuplicates":!0),l=[...i].concat(l)),{errorSchema:c,errors:l}}function sce(e){for(const t in e){const r=e,i=r[t];t===Or&&typeof i=="string"&&i.startsWith("#")?r[t]=p$+i:r[t]=ER(i)}return e}function oce(e){for(let t=0;t<e.length;t++)e[t]=ER(e[t]);return e}function ER(e){return Array.isArray(e)?oce([...e]):Nn(e)?sce({...e}):e}var vn;(function(e){e.ArrayItemTitle="Item",e.MissingItems="Missing items definition",e.EmptyArray="No items yet. Use the button below to add some.",e.YesLabel="Yes",e.NoLabel="No",e.CloseLabel="Close",e.ErrorsLabel="Errors",e.NewStringDefault="New Value",e.AddButton="Add",e.AddItemButton="Add Item",e.CopyButton="Copy",e.MoveDownButton="Move down",e.MoveUpButton="Move up",e.RemoveButton="Remove",e.NowLabel="Now",e.ClearLabel="Clear",e.AriaDateLabel="Select a date",e.PreviewLabel="Preview",e.DecrementAriaLabel="Decrease value by 1",e.IncrementAriaLabel="Increase value by 1",e.OptionalObjectAdd="Add data for optional field",e.OptionalObjectRemove="Remove data for optional field",e.OptionalObjectEmptyMsg="No data for optional field",e.Type="Type",e.Value="Value",e.UnknownFieldType="Unknown field type %1",e.OptionPrefix="Option %1",e.TitleOptionPrefix="%1 option %2",e.KeyLabel="%1 Key",e.InvalidObjectField='Invalid "%1" object field configuration: _%2_.',e.UnsupportedField="Unsupported field schema.",e.UnsupportedFieldWithId="Unsupported field schema for field `%1`.",e.UnsupportedFieldWithReason="Unsupported field schema: _%1_.",e.UnsupportedFieldWithIdAndReason="Unsupported field schema for field `%1`: _%2_.",e.FilesInfo="**%1** (%2, %3 bytes)"})(vn||(vn={}));function BC(){return Kz("rjsf-array-item-")}function tD(e){return Array.isArray(e)?e.map(t=>({key:BC(),item:t})):[]}function H$(e){return Array.isArray(e)?e.map(t=>t.item):[]}function lce(e){return Array.isArray(e.type)?!e.type.includes("null"):e.type!=="null"}function G$(e,t,r,i){let{addable:o}=Ot(i,e.globalUiOptions);return o!==!1&&(t.maxItems!==void 0?o=r.length<t.maxItems:o=!0),o}function K$(e,t,r,i){if(typeof e.items=="function")try{return e.items(t,r,i)}catch(o){console.error(`Error executing dynamic uiSchema.items function for item at index ${r}:`,o);return}else return e.items}function uce(e,t){const{schemaUtils:r,globalFormOptions:i}=e;let o=t.items;return i.useFallbackUiForUnsupportedType&&!o?o={}:pR(t)&&Dle(t)&&(o=t.additionalItems),r.getDefaultFormState(o)}function cce(e){const{schema:t,fieldPathId:r,uiSchema:i,formData:o=[],disabled:l=!1,readonly:c=!1,autofocus:f=!1,required:d=!1,placeholder:h,onBlur:m,onFocus:y,registry:v,rawErrors:w,name:b,onSelectChange:C}=e,{widgets:x,schemaUtils:_,globalFormOptions:S,globalUiOptions:A}=v,E=_.retrieveSchema(t.items,o),O=Yp(E,i),{widget:T="select",title:M,...D}=Ot(i,A),P=Rl(t,T,x),V=M??t.title??b,q=_.getDisplayLabel(t,i,A),Y=Gh(oo("",S,r,!0));return N.jsx(P,{id:Y[nr],name:b,multiple:!0,onChange:C,onBlur:m,onFocus:y,options:{...D,enumOptions:O},schema:t,uiSchema:i,registry:v,value:o,disabled:l,readonly:c,required:d,label:V,hideLabel:!q,placeholder:h,autofocus:f,rawErrors:w,htmlName:Y.name})}function fce(e){const{schema:t,fieldPathId:r,uiSchema:i,disabled:o=!1,readonly:l=!1,autofocus:c=!1,required:f=!1,hideError:d,placeholder:h,onBlur:m,onFocus:y,formData:v=[],registry:w,rawErrors:b,name:C,onSelectChange:x}=e,{widgets:_,schemaUtils:S,globalFormOptions:A,globalUiOptions:E}=w,{widget:O,title:T,...M}=Ot(i,E),D=Rl(t,O,_),P=T??t.title??C,V=S.getDisplayLabel(t,i,E),q=Gh(oo("",A,r,!0));return N.jsx(D,{id:q[nr],name:C,multiple:!0,onChange:x,onBlur:m,onFocus:y,options:M,schema:t,uiSchema:i,registry:w,value:v,disabled:o,readonly:l,hideError:d,required:f,label:P,hideLabel:!V,placeholder:h,autofocus:c,rawErrors:b,htmlName:q.name})}function dce(e){const{schema:t,uiSchema:r,fieldPathId:i,name:o,disabled:l=!1,readonly:c=!1,autofocus:f=!1,required:d=!1,onBlur:h,onFocus:m,registry:y,formData:v=[],rawErrors:w,onSelectChange:b}=e,{widgets:C,schemaUtils:x,globalFormOptions:_,globalUiOptions:S}=y,{widget:A="files",title:E,...O}=Ot(r,S),T=Rl(t,A,C),M=E??t.title??o,D=x.getDisplayLabel(t,r,S),P=Gh(oo("",_,i,!0));return N.jsx(T,{options:O,id:P[nr],name:o,multiple:!0,onChange:b,onBlur:h,onFocus:m,schema:t,uiSchema:r,value:v,disabled:l,readonly:c,required:d,registry:y,autofocus:f,rawErrors:w,label:M,hideLabel:!D,htmlName:P.name})}function Y$(e){const{itemKey:t,index:r,name:i,disabled:o,hideError:l,readonly:c,registry:f,uiOptions:d,parentUiSchema:h,canAdd:m,canRemove:y=!0,canMoveUp:v,canMoveDown:w,itemSchema:b,itemData:C,itemUiSchema:x,itemFieldPathId:_,itemErrorSchema:S,autofocus:A,onBlur:E,onFocus:O,onChange:T,rawErrors:M,totalItems:D,title:P,handleAddItem:V,handleCopyItem:q,handleRemoveItem:Y,handleReorderItems:W}=e,{schemaUtils:ie,fields:{ArraySchemaField:ae,SchemaField:H},globalUiOptions:G}=f,J=Gh(_),he=ae||H,ue=It("ArrayFieldItemTemplate",f,d),z=ie.getDisplayLabel(b,x,G),{description:U}=Ot(x),I=!!U||!!b.description,{orderable:$=!0,removable:L=!0,copyable:Q=!1}=d,te={moveUp:$&&v,moveDown:$&&w,copy:Q&&m,remove:L&&y,toolbar:!1};te.toolbar=Object.keys(te).some(Te=>te[Te]);const fe=j.useCallback(Te=>{V(Te,r+1)},[V,r]),Se=j.useCallback(Te=>{q(Te,r)},[q,r]),Oe=j.useCallback(Te=>{Y(Te,r)},[Y,r]),re=j.useCallback(Te=>{W(Te,r,r-1)},[W,r]),de=j.useCallback(Te=>{W(Te,r,r+1)},[W,r]),ve={children:N.jsx(he,{name:i,title:P,index:r,schema:b,uiSchema:x,formData:C,errorSchema:S,fieldPathId:J,required:lce(b),onChange:T,onBlur:E,onFocus:O,registry:f,disabled:o,readonly:c,hideError:l,autofocus:A,rawErrors:M}),buttonsProps:{fieldPathId:J,disabled:o,readonly:c,canAdd:m,hasCopy:te.copy,hasMoveUp:te.moveUp,hasMoveDown:te.moveDown,hasRemove:te.remove,index:r,totalItems:D,onAddItem:fe,onCopyItem:Se,onRemoveItem:Oe,onMoveUpItem:re,onMoveDownItem:de,registry:f,schema:b,uiSchema:x},itemKey:t,className:"rjsf-array-item",disabled:o,hasToolbar:te.toolbar,index:r,totalItems:D,readonly:c,registry:f,schema:b,uiSchema:x,parentUiSchema:h,displayLabel:z,hasDescription:I};return N.jsx(ue,{...ve})}function hce(e){const{schema:t,uiSchema:r={},errorSchema:i,fieldPathId:o,formData:l,name:c,title:f,disabled:d=!1,readonly:h=!1,autofocus:m=!1,required:y=!1,hideError:v=!1,registry:w,onBlur:b,onFocus:C,rawErrors:x,onChange:_,keyedFormData:S,handleAddItem:A,handleCopyItem:E,handleRemoveItem:O,handleReorderItems:T}=e,M=t.title||f||c,{schemaUtils:D,fields:P,formContext:V,globalFormOptions:q,globalUiOptions:Y}=w,{OptionalDataControlsField:W}=P,ie=Ot(r,Y),ae=Nn(t.items)?t.items:{},H=D.retrieveSchema(ae),G=H$(S),J=jb(w,t,y,r),he=vm(l),ue=G$(w,t,G,r)&&(!J||he),z=he?S:[],U=J?" rjsf-optional-array-field":"",I=e.childFieldPathId??o,$=J?N.jsx(W,{...e,fieldPathId:I}):void 0,L={canAdd:ue,items:z.map((te,fe)=>{const{key:Se,item:Oe}=te,re=Oe,de=D.retrieveSchema(ae,re),ve=i?i[fe]:void 0,Te=oo(fe,q,I),Re=K$(r,Oe,fe,V),Ce={itemKey:Se,index:fe,name:c&&`${c}-${fe}`,registry:w,uiOptions:ie,hideError:v,readonly:h,disabled:d,required:y,title:M?`${M}-${fe+1}`:void 0,canAdd:ue,canMoveUp:fe>0,canMoveDown:fe<G.length-1,itemSchema:de,itemFieldPathId:Te,itemErrorSchema:ve,itemData:re,itemUiSchema:Re,autofocus:m&&fe===0,onBlur:b,onFocus:C,rawErrors:x,totalItems:S.length,handleAddItem:A,handleCopyItem:E,handleRemoveItem:O,handleReorderItems:T,onChange:_};return N.jsx(Y$,{...Ce},Se)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${H.type}${U}`,disabled:d,fieldPathId:o,uiSchema:r,onAddClick:A,readonly:h,required:y,schema:t,title:M,formData:G,rawErrors:x,registry:w,optionalDataControl:$},Q=It("ArrayFieldTemplate",w,ie);return N.jsx(Q,{...L})}function pce(e){const{schema:t,uiSchema:r={},formData:i,errorSchema:o,fieldPathId:l,name:c,title:f,disabled:d=!1,readonly:h=!1,autofocus:m=!1,required:y=!1,hideError:v=!1,registry:w,onBlur:b,onFocus:C,rawErrors:x,keyedFormData:_,onChange:S,handleAddItem:A,handleCopyItem:E,handleRemoveItem:O,handleReorderItems:T}=e;let{formData:M=[]}=e;const D=t.title||f||c,{schemaUtils:P,fields:V,formContext:q,globalFormOptions:Y,globalUiOptions:W}=w,ie=Ot(r,W),{OptionalDataControlsField:ae}=V,H=jb(w,t,y,r),G=vm(i),he=(Nn(t.items)?t.items:[]).map((fe,Se)=>P.retrieveSchema(fe,M[Se])),ue=Nn(t.additionalItems)?P.retrieveSchema(t.additionalItems,i):null,z=e.childFieldPathId??l;M.length<he.length&&(M=M.concat(new Array(he.length-M.length)));const U=G?_:[],I=H?" rjsf-optional-array-field":"",$=H?N.jsx(ae,{...e,fieldPathId:z}):void 0,L=G$(w,t,M,r)&&!!ue&&(!H||G),Q={canAdd:L,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${I}`,disabled:d,fieldPathId:l,formData:i,items:U.map((fe,Se)=>{const{key:Oe,item:re}=fe,de=re,ve=Se>=he.length,Te=(ve&&Nn(t.additionalItems)?P.retrieveSchema(t.additionalItems,de):he[Se])||{},Re=oo(Se,Y,z);let Ce;ve?Ce=r.additionalItems:Array.isArray(r.items)?Ce=r.items[Se]:Ce=K$(r,re,Se,q);const Ue=o?o[Se]:void 0,Ke={index:Se,itemKey:Oe,name:c&&`${c}-${Se}`,registry:w,uiOptions:ie,hideError:v,readonly:h,disabled:d,required:y,title:D?`${D}-${Se+1}`:void 0,canAdd:L,canRemove:ve,canMoveUp:Se>=he.length+1,canMoveDown:ve&&Se<M.length-1,itemSchema:Te,itemData:de,itemUiSchema:Ce,itemFieldPathId:Re,itemErrorSchema:Ue,autofocus:m&&Se===0,onBlur:b,onFocus:C,rawErrors:x,totalItems:_.length,onChange:S,handleAddItem:A,handleCopyItem:E,handleRemoveItem:O,handleReorderItems:T};return N.jsx(Y$,{...Ke},Oe)}),onAddClick:A,readonly:h,required:y,registry:w,schema:t,uiSchema:r,title:D,errorSchema:o,rawErrors:x,optionalDataControl:$},te=It("ArrayFieldTemplate",w,ie);return N.jsx(te,{...Q})}function mce(e=[]){const t=j.useMemo(()=>Sl(e),[e]),[r,i]=j.useState(()=>({formDataHash:t,keyedFormData:tD(e)}));let{keyedFormData:o,formDataHash:l}=r;if(t!==l){const f=Array.isArray(e)?e:[],d=o||[];o=f.length===d.length?d.map((h,m)=>({key:h.key,item:f[m]})):tD(f),l=t,i({formDataHash:l,keyedFormData:o})}const c=j.useCallback(f=>{const d=H$(f),h=Sl(d);return i({formDataHash:h,keyedFormData:f}),d},[]);return{keyedFormData:o,updateKeyedFormData:c}}function gce(e){const{schema:t,uiSchema:r,errorSchema:i,fieldPathId:o,registry:l,formData:c,onChange:f}=e,{globalFormOptions:d,schemaUtils:h,translateString:m}=l,{keyedFormData:y,updateKeyedFormData:v}=mce(c),w=e.childFieldPathId??o,b=j.useCallback((T,M)=>{T&&T.preventDefault();let D;if(i){D={};for(const q in i){const Y=parseInt(q);M===void 0||Y<M?Fn(D,[Y],i[q]):Y>=M&&Fn(D,[Y+1],i[q])}}const P={key:BC(),item:uce(l,t)},V=[...y];M!==void 0?V.splice(M,0,P):V.push(P),f(v(V),w.path,D)},[y,l,t,f,v,i,w]),C=j.useCallback((T,M)=>{T&&T.preventDefault();let D;if(i){D={};for(const q in i){const Y=parseInt(q);Y<=M?Fn(D,[Y],i[q]):Y>M&&Fn(D,[Y+1],i[q])}}const P={key:BC(),item:yb(y[M].item)},V=[...y];M!==void 0?V.splice(M+1,0,P):V.push(P),f(v(V),w.path,D)},[y,f,v,i,w]),x=j.useCallback((T,M)=>{T&&T.preventDefault();let D;if(i){D={};for(const V in i){const q=parseInt(V);q<M?Fn(D,[q],i[V]):q>M&&Fn(D,[q-1],i[V])}}const P=y.filter((V,q)=>q!==M);f(v(P),w.path,D)},[y,f,v,i,w]),_=j.useCallback((T,M,D)=>{T&&(T.preventDefault(),T.currentTarget.blur());let P;if(i){P={};for(const Y in i){const W=parseInt(Y);W==M?Fn(P,[D],i[M]):W==D?Fn(P,[M],i[D]):Fn(P,[Y],i[W])}}function V(){const Y=y.slice();return Y.splice(M,1),Y.splice(D,0,y[M]),Y}const q=V();f(v(q),w.path,P)},[y,f,v,i,w]),S=j.useCallback((T,M,D,P)=>{f(T===void 0?null:T,M,D,P)},[f]),A=j.useCallback(T=>{f(T,w.path,void 0,w?.[nr])},[f,w]),E={...e,formData:c,fieldPathId:w,onSelectChange:A},O={...e,handleAddItem:b,handleCopyItem:C,handleRemoveItem:x,handleReorderItems:_,keyedFormData:y,onChange:S};if(!(Kp in t)){if(!d.useFallbackUiForUnsupportedType){const M=Ot(r),D=It("UnsupportedFieldTemplate",l,M);return N.jsx(D,{schema:t,fieldPathId:o,reason:m(vn.MissingItems),registry:l})}const T={...t,[Kp]:{type:void 0}};E.schema=T,O.schema=T}return h.isMultiSelect(E.schema)?N.jsx(cce,{...E}):D$(r)?N.jsx(fce,{...E}):pR(E.schema)?N.jsx(pce,{...O}):h.isFilesArray(E.schema,r)?N.jsx(dce,{...E}):N.jsx(hce,{...O})}function yce(e){const{schema:t,name:r,uiSchema:i,fieldPathId:o,formData:l,registry:c,required:f,disabled:d,readonly:h,hideError:m,autofocus:y,title:v,onChange:w,onFocus:b,onBlur:C,rawErrors:x}=e,{title:_}=t,{widgets:S,translateString:A,globalUiOptions:E}=c,{widget:O="checkbox",title:T,label:M=!0,enumNames:D,...P}=Ot(i,E),V=Rl(t,O,S),q=A(vn.YesLabel),Y=A(vn.NoLabel);let W;const ie=T??_??v??r;if(Array.isArray(t.oneOf))W=Yp({oneOf:t.oneOf.map(H=>{if(Nn(H))return{...H,title:H.title||(H.const===!0?q:Y)}}).filter(H=>H)},i);else{const H=t.enum??[!0,!1];!D&&H.length===2&&H.every(G=>typeof G=="boolean")?W=[{value:H[0],label:H[0]?q:Y},{value:H[1],label:H[1]?q:Y}]:W=Yp({enum:H},i)}const ae=j.useCallback((H,G,J)=>w(H,o.path,G,J),[w,o]);return N.jsx(V,{options:{...P,enumOptions:W},schema:t,uiSchema:i,id:o.$id,name:r,onChange:ae,onFocus:b,onBlur:C,label:ie,hideLabel:!M,value:l,required:f,disabled:d,readonly:h,hideError:m,registry:c,autofocus:y,rawErrors:x,htmlName:o.name})}function vce(e){return{type:"string",enum:["string","number","boolean","object","array"],default:"string",title:e}}function bce(e){const t=typeof e;return t==="string"||t==="number"||t==="boolean"?t:t==="object"?Array.isArray(e)?"array":"object":"string"}function Sce(e,t){switch(t){case"string":return String(e);case"number":{const r=Number(e);return isNaN(r)?0:r}case"boolean":return!!e;default:return e}}function wce(e){const{id:t,formData:r,displayLabel:i=!0,schema:o,name:l,uiSchema:c,required:f,disabled:d=!1,readonly:h=!1,onBlur:m,onFocus:y,registry:v,fieldPathId:w,onChange:b,errorSchema:C}=e,{translateString:x,fields:_,globalFormOptions:S}=v,[A,E]=j.useState(bce(r)),O=Ot(c),T=Gh(oo("__internal_type_selector",S,w)),M=x(vn.Type),D=j.useMemo(()=>vce(M),[M]),P=Y=>{Y!=null&&(E(Y),b(Sce(r,Y),w.path,C,t))};if(!S.useFallbackUiForUnsupportedType){const{reason:Y=x(vn.UnknownFieldType,[String(o.type)])}=e,W=It("UnsupportedFieldTemplate",v,O);return N.jsx(W,{schema:o,fieldPathId:w,reason:Y,registry:v})}const V=It("FallbackFieldTemplate",v,O),{SchemaField:q}=_;return N.jsx(V,{schema:o,registry:v,typeSelector:N.jsx(q,{fieldPathId:T,name:`${l}__fallback_type`,schema:D,formData:A,onChange:P,onBlur:m,onFocus:y,registry:v,hideLabel:!i,disabled:d,readonly:h,required:f},r?Sl(r):"__empty__"),schemaField:N.jsx(q,{...e,schema:{type:A,title:x(vn.Value),...A==="object"&&{additionalProperties:!0}}})})}var El;(function(e){e.ROW="ui:row",e.COLUMN="ui:col",e.COLUMNS="ui:columns",e.CONDITION="ui:condition"})(El||(El={}));var Rv;(function(e){e.ALL="all",e.SOME="some",e.NONE="none"})(Rv||(Rv={}));const Ece=/^\$lookup=(.+)/,Lx="layoutGrid";function nD(e,t){return e??t}function _ce(e){return/^\d+?$/.test(e)}const jc=yR();function xce(e,t,r,i,o){const l=Be(r,[IC],{}),c=Be(r,e),f={...Be(c,[Rc],{}),...t,...l},d={...c};la(f)||Fn(d,[Rc],f),la(l)||Fn(d,[IC],l);let{readonly:h}=Ot(d);return(o===!0||Lz(h)&&i===!0)&&(h=!0,_n(f,Cx)?Fn(d,[Rc,Cx],!0):Fn(d,`ui:${Cx}`,!0)),{fieldUiSchema:d,uiReadonly:h}}function Tce(e,t,r="$0m3tH1nG Un3xP3cT3d"){const i=LT([t]).sort(),o=LT([r]).sort();switch(e){case Rv.ALL:return Ac(i,o);case Rv.SOME:return E3(i,o).length>0;case Rv.NONE:return E3(i,o).length===0;default:return!1}}function aw(e,t,r){let i={},o=e[t];if($c(o)){const{children:l,className:c,...f}=o;if(o=l,c){const h=c.split(" ").map(m=>SR(r,m,m)).join(" ");i={...f,className:h}}else i=f}if(!Array.isArray(o))throw new TypeError(`Expected array for "${t}" in ${JSON.stringify(e)}`);return{children:o,gridProps:i}}function rD(e,t,r){let i;if(_ce(r)&&e&&e?.type==="array"&&_n(e,Kp)){const o=Number(r),l=e[Kp];Array.isArray(l)?o>l.length?i=Pz(l):i=l[o]:i=l,t={[nr]:t[nr],path:[...t.path.slice(0,t.path.length-1),o]}}return{rawSchema:i,fieldPathId:t}}function Cce(e,t,r,i,o){const{schemaUtils:l,globalFormOptions:c}=e;let f=r,d=o;const h=t.split("."),m=h.pop();let y=l.retrieveSchema(f,i),v=i,w=y.readOnly;h.forEach(x=>{if(d=oo(x,c,d),_n(y,In))f=Be(y,[In,x],{});else if(y&&(_n(y,gn)||_n(y,Dn))){const _=_n(y,gn)?gn:Dn,S=l.findSelectedOptionInXxxOf(y,x,_,v);f=Be(S,[In,x],{})}else{const _=rD(y,d,x);f=_.rawSchema??{},d=_.fieldPathId}v=Be(v,x,{}),y=l.retrieveSchema(f,v),w=nD(y.readOnly,w)});let b,C=!1;if(la(y)&&(y=void 0),y&&m){if(y&&(_n(y,gn)||_n(y,Dn))){const _=_n(y,gn)?gn:Dn;y=l.findSelectedOptionInXxxOf(y,m,_,v)}d=oo(m,c,d),C=y!==void 0&&Array.isArray(y.required)&&TK(y.required,m);const x=rD(y,d,m);if(x.rawSchema?(y=x.rawSchema,d=x.fieldPathId):(y=Be(y,[In,m]),y=y&&l.retrieveSchema(y)),w=nD(y?.readOnly,w),y&&(_n(y,gn)||_n(y,Dn))){const _=_n(y,gn)?gn:Dn,S=Ol(y);b={options:y[_],hasDiscriminator:!!S}}}return{schema:y,isRequired:C,isReadonly:w,optionsInfo:b,fieldPathId:d}}function Ace(e,t){let r=e;return Pc(r)&&(r=SR(t,r)),fb(r)?r:null}function Oce(e,t){let r,i=null,o={},l;if(Pc(t)||Lz(t))r=t??"";else{const{name:c="",render:f,...d}=t;r=c,o=d,la(o)||mK(o,(h,m)=>{if(Pc(h)){const y=Ece.exec(h);if(Array.isArray(y)&&y.length>1){const v=y[1];o[m]=SR(e,v,v)}}}),i=Ace(f,e),!c&&i&&(l=N.jsx(i,{...d,"data-testid":jc.uiComponent}))}return{name:r,UIComponent:i,uiProps:o,rendered:l}}function iw(e){const{childrenLayoutGridSchemaId:t,...r}=e,{registry:i,schema:o,formData:l}=r,{schemaUtils:c}=i,f=c.retrieveSchema(o,l);return t.map(d=>j.createElement(_R,{...r,key:`layoutGrid-${Sl(d)}`,schema:f,layoutGridSchema:d}))}function Rce(e){const{layoutGridSchema:t,...r}=e,{formData:i,registry:o}=r,{children:l,gridProps:c}=aw(t,El.CONDITION,o),{operator:f,field:d="",value:h}=c,m=Be(i,d,null);return Tce(f,m,h)?N.jsx(iw,{...r,childrenLayoutGridSchemaId:l}):null}function Mce(e){const{layoutGridSchema:t,...r}=e,{registry:i,uiSchema:o}=r,{children:l,gridProps:c}=aw(t,El.COLUMN,i),f=Ot(o),d=It("GridTemplate",i,f);return N.jsx(d,{column:!0,"data-testid":jc.col,...c,children:N.jsx(iw,{...r,childrenLayoutGridSchemaId:l})})}function jce(e){const{layoutGridSchema:t,...r}=e,{registry:i,uiSchema:o}=r,{children:l,gridProps:c}=aw(t,El.COLUMNS,i),f=Ot(o),d=It("GridTemplate",i,f);return l.map(h=>N.jsx(d,{column:!0,"data-testid":jc.col,...c,children:N.jsx(iw,{...r,childrenLayoutGridSchemaId:[h]})},`column-${Sl(h)}`))}function Dce(e){const{layoutGridSchema:t,...r}=e,{registry:i,uiSchema:o}=r,{children:l,gridProps:c}=aw(t,El.ROW,i),f=Ot(o),d=It("GridTemplate",i,f);return N.jsx(d,{...c,"data-testid":jc.row,children:N.jsx(iw,{...r,childrenLayoutGridSchemaId:l})})}function Nce(e){const{gridSchema:t,schema:r,uiSchema:i,errorSchema:o,fieldPathId:l,onBlur:c,onFocus:f,formData:d,readonly:h,registry:m,layoutGridSchema:y,...v}=e,{onChange:w}=v,{fields:b}=m,{SchemaField:C,LayoutMultiSchemaField:x}=b,_=Oce(m,t),{name:S,UIComponent:A,uiProps:E}=_,{schema:O,isRequired:T,isReadonly:M,optionsInfo:D,fieldPathId:P}=Cce(m,S,r,d,l),V=Gh(P);if(_.rendered)return _.rendered;if(O){const q=D?.hasDiscriminator?x:C,{fieldUiSchema:Y,uiReadonly:W}=xce(S,E,i,M,h);return N.jsx(q,{"data-testid":D?.hasDiscriminator?jc.layoutMultiSchemaField:jc.field,...v,name:S,required:T,readonly:W,schema:O,uiSchema:Y,errorSchema:Be(o,S),fieldPathId:V,formData:Be(d,S),onChange:w,onBlur:c,onFocus:f,options:D?.options,registry:m})}return A?N.jsx(A,{"data-testid":jc.uiComponent,...v,name:S,required:T,formData:d,readOnly:!!M||h,errorSchema:o,uiSchema:i,schema:r,fieldPathId:l,onBlur:c,onFocus:f,registry:m,...E}):null}function _R(e){const{uiSchema:t}=e;let{layoutGridSchema:r}=e;const i=Ot(t);if(!r&&Lx in i&&Nn(i[Lx])&&(r=i[Lx]),Nn(r)){if(El.ROW in r)return N.jsx(Dce,{...e,layoutGridSchema:r});if(El.COLUMN in r)return N.jsx(Mce,{...e,layoutGridSchema:r});if(El.COLUMNS in r)return N.jsx(jce,{...e,layoutGridSchema:r});if(El.CONDITION in r)return N.jsx(Rce,{...e,layoutGridSchema:r})}return N.jsx(Nce,{...e,gridSchema:r})}_R.TEST_IDS=jc;function kce(e){const{fieldPathId:t,title:r,schema:i,uiSchema:o,required:l,registry:c,name:f}=e,d=Ot(o,c.globalUiOptions),{title:h}=d,{title:m}=i,y=h||r||m||f;if(!y)return null;const v=It("TitleFieldTemplate",c,d);return N.jsx(v,{id:rw(t),title:y,required:l,schema:i,uiSchema:o,registry:c})}function qx(e,t,r){const i="!@#!@$@#$!@$#";return e.map(({schema:l})=>l).find(l=>{const c=Be(l,[In,t]);return Be(c,tw,Be(c,so,i))===r})}function aD(e,t,r,i,o){const l=t.map(d=>r.retrieveSchema(d,o));let c=e;_n(e,gn)?c={...e,[gn]:l}:_n(e,Dn)&&(c={...e,[Dn]:l});const f=Yp(c,i);if(!f)throw new Error(`No enumOptions were computed from the schema ${JSON.stringify(c)}`);return f}function zce(e){const{name:t,baseType:r,disabled:i=!1,formData:o,fieldPathId:l,onBlur:c,onChange:f,options:d,onFocus:h,registry:m,uiSchema:y,schema:v,autofocus:w,readonly:b,required:C,errorSchema:x,hideError:_=!1}=e,{widgets:S,schemaUtils:A,globalUiOptions:E}=m,[O,T]=j.useState(aD(v,d,A,y,o)),M=Be(l,nr),D=Ol(v),P=It("FieldErrorTemplate",m,d),V=It("FieldTemplate",m,d),q=Sl(v),Y=Sl(d),W=y?Sl(y):"",ie=o?Sl(o):"";j.useEffect(()=>{T(aD(v,d,A,y,o))},[q,Y,A,W,ie]);const{widget:ae=D?"radio":"select",title:H="",placeholder:G="",optionsSchemaSelector:J=D,hideError:he,...ue}=Ot(y);if(!J)throw new Error("No selector field provided for the LayoutMultiSchemaField");const z=Be(o,J);let U=Be(O[0]?.schema,[In,J],{});const I=qx(O,J,z);U=U?.type?U:{...U,type:I?.type||r};const $=Rl(U,ae,S),L=he===void 0?_:!!he,Q=Be(x,[fi],[]),te=qv(x,[fi]),fe=A.getDisplayLabel(v,y,E),Se=de=>{const ve=qx(O,J,de),Te=qx(O,J,z);let Re=A.sanitizeDataForNewSchema(ve,Te,o);Re&&ve&&(Re=A.getDefaultFormState(ve,Re,"excludeObjectChildren")),Re&&Fn(Re,J,de),f(Re,l.path,void 0,M)},Oe={enumOptions:O,...ue},re=!L&&Q.length>0?N.jsx(P,{fieldPathId:l,schema:v,errors:Q,registry:m}):void 0;return N.jsx(V,{id:M,schema:v,label:(H||v.title)??"",disabled:i||Array.isArray(O)&&la(O),uiSchema:y,required:C,readonly:!!b,registry:m,displayLabel:fe,errors:re,onChange:f,onKeyRename:oS,onKeyRenameBlur:oS,onRemoveProperty:oS,children:N.jsx($,{id:M,name:t,schema:v,label:(H||v.title)??"",disabled:i||Array.isArray(O)&&la(O),uiSchema:y,autofocus:w,readonly:b,required:C,registry:m,multiple:!1,rawErrors:Q,hideError:L,hideLabel:!fe,errorSchema:te,placeholder:G,onChange:Se,onBlur:c,onFocus:h,value:z,options:Oe,htmlName:l.name})})}class iD extends j.Component{constructor(t){super(t);const{formData:r,options:i,registry:{schemaUtils:o}}=this.props,l=i.map(c=>o.retrieveSchema(c,r));this.state={retrievedOptions:l,selectedOption:this.getMatchingOption(0,r,l)}}componentDidUpdate(t,r){const{formData:i,options:o,fieldPathId:l}=this.props,{selectedOption:c}=this.state;let f=this.state;if(!pr(t.options,o)){const{registry:{schemaUtils:d}}=this.props,h=o.map(m=>d.retrieveSchema(m,i));f={selectedOption:c,retrievedOptions:h}}if(!pr(i,t.formData)&&l.$id===t.fieldPathId.$id){const{retrievedOptions:d}=f,h=this.getMatchingOption(c,i,d);r&&h!==c&&(f={selectedOption:h,retrievedOptions:d})}f!==this.state&&this.setState(f)}getMatchingOption(t,r,i){const{schema:o,registry:{schemaUtils:l}}=this.props,c=Ol(o);return l.getClosestMatchingOption(r,i,t,c)}onOptionChange=t=>{const{selectedOption:r,retrievedOptions:i}=this.state,{formData:o,onChange:l,registry:c,fieldPathId:f}=this.props,{schemaUtils:d}=c,h=t!==void 0?parseInt(t,10):-1;if(h===r)return;const m=h>=0?i[h]:void 0,y=r>=0?i[r]:void 0;let v=d.sanitizeDataForNewSchema(m,y,o);m&&(v=d.getDefaultFormState(m,v,"excludeObjectChildren")),this.setState({selectedOption:h},()=>{l(v,f.path,void 0,this.getFieldId())})};getFieldId(){const{fieldPathId:t,schema:r}=this.props;return`${t.$id}${r.oneOf?"__oneof_select":"__anyof_select"}`}render(){const{name:t,disabled:r=!1,errorSchema:i={},formData:o,onBlur:l,onFocus:c,readonly:f,required:d=!1,registry:h,schema:m,uiSchema:y}=this.props,{widgets:v,fields:w,translateString:b,globalUiOptions:C,schemaUtils:x}=h,{SchemaField:_}=w,S=It("MultiSchemaFieldTemplate",h,C),A=jb(h,m,d,y),E=vm(o),{selectedOption:O,retrievedOptions:T}=this.state,{widget:M="select",placeholder:D,autofocus:P,autocomplete:V,title:q=m.title,...Y}=Ot(y,C),W=Rl({type:"number"},M,v),ie=Be(i,fi,[]),ae=qv(i,[fi]),H=x.getDisplayLabel(m,y,C),G=O>=0&&T[O]||null;let J;if(G){const{required:Q}=m;J=Q?ac({required:Q},G):G}let he=[];gn in m&&y&&gn in y?Array.isArray(y[gn])?he=y[gn]:console.warn(`uiSchema.oneOf is not an array for "${q||t}"`):Dn in m&&y&&Dn in y&&(Array.isArray(y[Dn])?he=y[Dn]:console.warn(`uiSchema.anyOf is not an array for "${q||t}"`));let ue=y;O>=0&&he.length>O&&(ue=he[O]);const z=q?vn.TitleOptionPrefix:vn.OptionPrefix,U=q?[q]:[],I=T.map((Q,te)=>{const{title:fe=Q.title}=Ot(he[te]);return{label:fe||b(z,U.concat(String(te+1))),value:te}}),$=!A||E?N.jsx(W,{id:this.getFieldId(),name:`${t}${m.oneOf?"__oneof_select":"__anyof_select"}`,schema:{type:"number",default:0},onChange:this.onOptionChange,onBlur:l,onFocus:c,disabled:r||la(I),multiple:!1,rawErrors:ie,errorSchema:ae,value:O>=0?O:void 0,options:{enumOptions:I,...Y},registry:h,placeholder:D,autocomplete:V,autofocus:P,label:q??t,hideLabel:!H,readonly:f}):void 0,L=J&&J.type!=="null"&&N.jsx(_,{...this.props,schema:J,uiSchema:ue})||null;return N.jsx(S,{schema:m,registry:h,uiSchema:y,selector:$,optionSchemaField:L})}}const $ce=/\.([0-9]*0)*$/,Pce=/[0.]0*$/;function Ice(e){const{registry:t,onChange:r,formData:i,value:o}=e,[l,c]=j.useState(o),{StringField:f}=t.fields;let d=i;const h=j.useCallback((m,y,v,w)=>{c(m),`${m}`.charAt(0)==="."&&(m=`0${m}`);const b=typeof m=="string"&&m.match($ce)?jj(m.replace(Pce,"")):jj(m);r(b,y,v,w)},[r]);if(typeof l=="string"&&typeof d=="number"){const m=new RegExp(`^(${String(d).replace(".","\\.")})?\\.?0*$`);l.match(m)&&(d=l)}return N.jsx(f,{...e,formData:d,onChange:h})}function gl(){return gl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},gl.apply(null,arguments)}const U1=["strong","em","del","mark"],sD=[["**",U1[0]],["__",U1[0]],["~~",U1[2]],["==",U1[3]],["*","em"],["_","em"]];function Uce(e,t){for(var r=1,i=t+1;i<e.length&&r>0;)e[i]!=="\\"?(e[i]==="["&&r++,e[i]==="]"&&r--,i++):i+=2;if(r===0&&i<e.length&&(e[i]==="("||e[i]==="[")){var o=e[i]==="("?")":"]",l=1;for(i++;i<e.length&&l>0;)e[i]!=="\\"?(e[i]==="("&&o===")"&&l++,e[i]===o&&l--,i++):i+=2;if(l===0)return i}return-1}function Lce(e,t){if(!t||!t.inline&&!t.simple)return null;var r=e[0];if(r!=="*"&&r!=="_"&&r!=="~"&&r!=="=")return null;for(var i="",o=0,l="",c=0;c<6;c++){var f=sD[c][0];if(e.startsWith(f)&&e.length>=2*f.length){i=f,o=f.length,l=sD[c][1];break}}if(!i)return null;for(var d=o,h=!1,m=!1,y="",v=0,w="",b=!1,C="";d<e.length;){var x=e[d];if(b)w+=x,b=!1,C=x,d++;else if(x!=="\\")if(x!=="`"||v!==0){if(x==="["&&!h&&v===0){var _=Uce(e,d);if(_!==-1){w+=e.slice(d,_),d=_,C=e[_-1];continue}}if(m)w+=x,y?x===y&&(y=""):x==='"'||x==="'"?y=x:x===">"&&(m=!1),C=x,d++;else if(x!=="<"||h){if(x===`
61
61
  `&&C===`
62
62
  `&&!h&&v===0)return null;if(!h&&v===0){for(var S=0;d+S<e.length&&e[d+S]===i[0];)S++;if(S>=o&&(o!==1||i!=="*"&&i!=="_"||e[d-1]!==i&&e[d+1]!==i)){var A=[e.slice(0,d+S),l,w+e.slice(d+o,d+S)];return A.index=0,A.input=e,A}}w+=x,C=x,d++}else{var E=e[d+1],O=e.indexOf(">",d);if(O!==-1){var T=e.slice(d,O+1).endsWith("/>");E==="/"?v=Math.max(0,v-1):T||v++}m=!0,w+=x,C=x,d++}}else h=!h,w+=x,C=x,d++;else w+=x,b=!0,C=x,d++}return null}const qce=["children","options"],oD=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:"className",for:"htmlFor"}),lD={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},Vce=["style","script","pre"],Bce=["src","href","data","formAction","srcDoc","action"],Fce=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,Hce=/\n{2,}$/,uD=/^(\s*>[\s\S]*?)(?=\n\n|$)/,Gce=/^ *> ?/gm,Kce=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,Yce=/^ {2,}\n/,Zce=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,cD=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,fD=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,Xce=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,Qce=/^(?:\n *)*\n/,Wce=/\r\n?/g,Jce=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,efe=/^\[\^([^\]]+)]/,tfe=/\f/g,nfe=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,rfe=/^\[(x|\s)\]/,dD=/^(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,hD=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,pD=/^([^\n]+)\n *(=|-)\2{2,} *\n/,xR=/^<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>/i;function afe(e){const t=xR.exec(e);if(!t)return null;const r=t[1],i=r.toLowerCase(),o=i.length+1;let l=t[0].length;e[l]===`
package/dist/index.html CHANGED
@@ -5,7 +5,7 @@
5
5
  <link rel="icon" type="image/svg+xml" href="/favicon.ico" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>Skybridge MCP devtools</title>
8
- <script type="module" crossorigin src="/assets/index-J2qIIuJb.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-mLyAO85K.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-BcsOcRML.css">
10
10
  </head>
11
11
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skybridge/devtools",
3
- "version": "0.0.0-dev.fb825da",
3
+ "version": "0.0.0-dev.fbd2c17",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,10 +22,10 @@
22
22
  "ahooks": "^3.9.6",
23
23
  "class-variance-authority": "^0.7.1",
24
24
  "clsx": "^2.1.1",
25
- "framer-motion": "^12.24.3",
25
+ "framer-motion": "^12.24.7",
26
26
  "lodash-es": "^4.17.22",
27
27
  "lucide-react": "^0.562.0",
28
- "motion": "^12.24.4",
28
+ "motion": "^12.24.7",
29
29
  "nuqs": "^2.8.6",
30
30
  "react": "^19.2.3",
31
31
  "react-dom": "^19.2.3",
@@ -37,7 +37,7 @@
37
37
  "tailwindcss-animate": "^1.0.7",
38
38
  "tw-animate-css": "^1.4.0",
39
39
  "zustand": "^5.0.9",
40
- "skybridge": "0.0.0-dev.fb825da"
40
+ "skybridge": "0.0.0-dev.fbd2c17"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@eslint/js": "^9.39.2",