@skybridge/devtools 0.0.0-dev.abf1d36 → 0.0.0-dev.ac0362b

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":c=w.includes("\0")?void 0:w;break;case"retry":/^\d+$/.test(w)?r(parseInt(w,10)):n(new EM(`Invalid \`retry\` value: "${w}"`,{type:"invalid-retry",value:w,line:T}));break;default:n(new EM(`Unknown field "${x.length>20?`${x.slice(0,20)}…`:x}"`,{type:"unknown-field",field:x,value:w,line:T}));break}}function b(){u.length>0&&t({id:c,event:f||void 0,data:u.endsWith(`
57
57
  `)?u.slice(0,-1):u}),c=void 0,u="",f=""}function y(x={}){i&&x.consume&&p(i),a=!0,c=void 0,u="",f="",i=""}return{feed:h,reset:y}}function yne(e){const t=[];let n="",r=0;for(;r<e.length;){const o=e.indexOf("\r",r),i=e.indexOf(`
58
58
  `,r);let a=-1;if(o!==-1&&i!==-1?a=Math.min(o,i):o!==-1?o===e.length-1?a=-1:a=o:i!==-1&&(a=i),a===-1){n=e.slice(r);break}else{const c=e.slice(r,a);t.push(c),r=a+1,e[r-1]==="\r"&&e[r]===`
59
- `&&r++}}return[t,n]}class vne extends TransformStream{constructor({onError:t,onRetry:n,onComment:r}={}){let o;super({start(i){o=gne({onEvent:a=>{i.enqueue(a)},onError(a){t==="terminate"?i.error(a):typeof t=="function"&&t(a)},onRetry:n,onComment:r})},transform(i){o.feed(i)}})}}const bne={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2};class gu extends Error{constructor(t,n){super(`Streamable HTTP error: ${n}`),this.code=t}}class Sne{constructor(t,n){this._hasCompletedAuthFlow=!1,this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=Nte(n?.fetch,n?.requestInit),this._sessionId=n?.sessionId,this._reconnectionOptions=n?.reconnectionOptions??bne}async _authThenStart(){if(!this._authProvider)throw new mu("No auth provider");let t;try{t=await jg(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(t!=="AUTHORIZED")throw new mu;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){const t={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(t.Authorization=`Bearer ${r.access_token}`)}this._sessionId&&(t["mcp-session-id"]=this._sessionId),this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const n=xw(this._requestInit?.headers);return new Headers({...t,...n})}async _startOrAuthSse(t){const{resumptionToken:n}=t;try{const r=await this._commonHeaders();r.set("Accept","text/event-stream"),n&&r.set("last-event-id",n);const o=await(this._fetch??fetch)(this._url,{method:"GET",headers:r,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 gu(o.status,`Failed to open SSE stream: ${o.statusText}`)}this._handleSseStream(o.body,t,!0)}catch(r){throw this.onerror?.(r),r}}_getNextReconnectionDelay(t){if(this._serverRetryMs!==void 0)return this._serverRetryMs;const n=this._reconnectionOptions.initialReconnectionDelay,r=this._reconnectionOptions.reconnectionDelayGrowFactor,o=this._reconnectionOptions.maxReconnectionDelay;return Math.min(n*Math.pow(r,t),o)}_scheduleReconnection(t,n=0){const r=this._reconnectionOptions.maxRetries;if(n>=r){this.onerror?.(new Error(`Maximum reconnection attempts (${r}) exceeded.`));return}const o=this._getNextReconnectionDelay(n);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(t).catch(i=>{this.onerror?.(new Error(`Failed to reconnect SSE stream: ${i instanceof Error?i.message:String(i)}`)),this._scheduleReconnection(t,n+1)})},o)}_handleSseStream(t,n,r){if(!t)return;const{onresumptiontoken:o,replayMessageId:i}=n;let a,c=!1,u=!1;(async()=>{try{const h=t.pipeThrough(new TextDecoderStream).pipeThrough(new vne({onRetry:b=>{this._serverRetryMs=b}})).getReader();for(;;){const{value:b,done:y}=await h.read();if(y)break;if(b.id&&(a=b.id,c=!0,o?.(b.id)),!!b.data&&(!b.event||b.event==="message"))try{const x=S1.parse(JSON.parse(b.data));Xd(x)&&(u=!0,i!==void 0&&(x.id=i)),this.onmessage?.(x)}catch(x){this.onerror?.(x)}}(r||c)&&!u&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:a,onresumptiontoken:o,replayMessageId:i},0)}catch(h){if(this.onerror?.(new Error(`SSE stream disconnected: ${h}`)),(r||c)&&!u&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:a,onresumptiontoken:o,replayMessageId:i},0)}catch(b){this.onerror?.(new Error(`Failed to reconnect: ${b instanceof Error?b.message:String(b)}`))}}})()}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 mu("No auth provider");if(await jg(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new mu("Failed to authorize")}async close(){this._reconnectionTimeout&&(clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=void 0),this._abortController?.abort(),this.onclose?.()}async send(t,n){try{const{resumptionToken:r,onresumptiontoken:o}=n||{};if(r){this._startOrAuthSse({resumptionToken:r,replayMessageId:ww(t)?t.id:void 0}).catch(g=>this.onerror?.(g));return}const i=await this._commonHeaders();i.set("content-type","application/json"),i.set("accept","application/json, text/event-stream");const a={...this._requestInit,method:"POST",headers:i,body:JSON.stringify(t),signal:this._abortController?.signal},c=await(this._fetch??fetch)(this._url,a),u=c.headers.get("mcp-session-id");if(u&&(this._sessionId=u),!c.ok){const g=await c.text().catch(()=>null);if(c.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new gu(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl:b,scope:y}=wM(c);if(this._resourceMetadataUrl=b,this._scope=y,await jg(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new mu;return this._hasCompletedAuthFlow=!0,this.send(t)}if(c.status===403&&this._authProvider){const{resourceMetadataUrl:b,scope:y,error:x}=wM(c);if(x==="insufficient_scope"){const w=c.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===w)throw new gu(403,"Server returned 403 after trying upscoping");if(y&&(this._scope=y),b&&(this._resourceMetadataUrl=b),this._lastUpscopingHeader=w??void 0,await jg(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new mu;return this.send(t)}}throw new gu(c.status,`Error POSTing to endpoint: ${g}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,c.status===202){await c.body?.cancel(),QQ(t)&&this._startOrAuthSse({resumptionToken:void 0}).catch(g=>this.onerror?.(g));return}const h=(Array.isArray(t)?t:[t]).filter(g=>"method"in g&&"id"in g&&g.id!==void 0).length>0,p=c.headers.get("content-type");if(h)if(p?.includes("text/event-stream"))this._handleSseStream(c.body,{onresumptiontoken:o},!1);else if(p?.includes("application/json")){const g=await c.json(),b=Array.isArray(g)?g.map(y=>S1.parse(y)):[S1.parse(g)];for(const y of b)this.onmessage?.(y)}else throw await c.body?.cancel(),new gu(-1,`Unexpected content type: ${p}`);else await c.body?.cancel()}catch(r){throw this.onerror?.(r),r}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{const t=await this._commonHeaders(),n={...this._requestInit,method:"DELETE",headers:t,signal:this._abortController?.signal},r=await(this._fetch??fetch)(this._url,n);if(await r.body?.cancel(),!r.ok&&r.status!==405)throw new gu(r.status,`Failed to terminate session: ${r.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,n){await this._startOrAuthSse({resumptionToken:t,onresumptiontoken:n?.onresumptiontoken})}}class wne{client=null;transport=null;async connect(t){const n=typeof t=="string"?new URL(t):t;this.transport=new Sne(n),this.client=new Pte({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,n){if(!this.client)throw new Error("Client not connected. Call connect() first.");const r=await this.client.callTool({name:t,arguments:n??{}}),{_meta:o,...i}=r;return{...i,meta:o}}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,n){if(!this.client)throw new Error("Client not connected. Call connect() first.");return await this.client.getPrompt({name:t,...n&&{arguments:n}})}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 Af=new wne;Af.connect("http://localhost:3000/mcp").then(()=>{console.info("Connected to MCP server")});const xne={theme:"light",userAgent:{device:{type:"desktop"},capabilities:{hover:!0,touch:!1}},locale:"en-US",maxHeight:void 0,displayMode:"inline",safeArea:{insets:{top:0,bottom:0,left:0,right:0}},toolInput:{},toolOutput:null,toolResponseMetadata:null,view:{mode:"inline"},widgetState:null},mD=()=>{const{data:e}=R3({queryKey:["list-tools"],queryFn:()=>Af.listTools()});return e},Ene=()=>Af.getServerInfo(),_ne=()=>{const{setToolData:e}=Cf();return Y7({mutationFn:async({toolName:t,args:n})=>{e(t,{input:n??{},response:void 0,openaiRef:null,openaiLogs:[],openaiObject:null});const r=await Af.callTool(t,n);return e(t,{input:n??{},response:r,openaiRef:null,openaiLogs:[],openaiObject:{...xne,toolInput:n??{},toolOutput:r.structuredContent,toolResponseMetadata:r.meta??null,widgetState:null}}),r}})},t_=()=>{const[e]=xE();return mD().find(n=>n.name===e)??null},ll=()=>{const e=t_();if(!e)throw new Error("No tool is currently selected");return e},Cne=e=>R3({queryKey:["resource",e],queryFn:async()=>{if(!e)throw new Error("Resource URI is required");return await Af.readResource(e)}});const Tne=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Rne=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),_M=e=>{const t=Rne(e);return t.charAt(0).toUpperCase()+t.slice(1)},gD=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),One=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Ane={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 kne=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...c},u)=>A.createElement("svg",{ref:u,...Ane,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:gD("lucide",o),...!i&&!One(c)&&{"aria-hidden":"true"},...c},[...a.map(([f,h])=>A.createElement(f,h)),...Array.isArray(i)?i:[i]]));const Oo=(e,t)=>{const n=A.forwardRef(({className:r,...o},i)=>A.createElement(kne,{ref:i,iconNode:t,className:gD(`lucide-${Tne(_M(e))}`,`lucide-${e}`,r),...o}));return n.displayName=_M(e),n};const Mne=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],n_=Oo("check",Mne);const jne=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],yD=Oo("chevron-down",jne);const Pne=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Nne=Oo("chevron-up",Pne);const Dne=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],$ne=Oo("chevrons-up-down",Dne);const Ine=[["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"}]],zne=Oo("circle-alert",Ine);const Lne=[["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"}]],Fne=Oo("external-link",Lne);const Une=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Vne=Oo("info",Une);const qne=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Bne=Oo("loader-circle",qne);const Hne=[["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"}]],Kne=Oo("moon",Hne);const Gne=[["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"}]],Zne=Oo("play",Gne);const Wne=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Yne=Oo("search",Wne);const Xne=[["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"}]],Qne=Oo("sun",Xne);const Jne=[["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"}]],ere=Oo("trash",Jne);const tre=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],nre=Oo("x",tre);function M0(){return typeof window<"u"}function cl(e){return r_(e)?(e.nodeName||"").toLowerCase():"#document"}function Er(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function li(e){var t;return(t=(r_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function r_(e){return M0()?e instanceof Node||e instanceof Er(e).Node:!1}function Cn(e){return M0()?e instanceof Element||e instanceof Er(e).Element:!1}function Wn(e){return M0()?e instanceof HTMLElement||e instanceof Er(e).HTMLElement:!1}function Dw(e){return!M0()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Er(e).ShadowRoot}const rre=new Set(["inline","contents"]);function Cc(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Co(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!rre.has(o)}const ore=new Set(["table","td","th"]);function sre(e){return ore.has(cl(e))}const ire=[":popover-open",":modal"];function j0(e){return ire.some(t=>{try{return e.matches(t)}catch{return!1}})}const are=["transform","translate","scale","rotate","perspective"],lre=["transform","translate","scale","rotate","perspective","filter"],cre=["paint","layout","strict","content"];function o_(e){const t=P0(),n=Cn(e)?Co(e):e;return are.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||lre.some(r=>(n.willChange||"").includes(r))||cre.some(r=>(n.contain||"").includes(r))}function ure(e){let t=Fi(e);for(;Wn(t)&&!Ii(t);){if(o_(t))return t;if(j0(t))return null;t=Fi(t)}return null}function P0(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const fre=new Set(["html","body","#document"]);function Ii(e){return fre.has(cl(e))}function Co(e){return Er(e).getComputedStyle(e)}function N0(e){return Cn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fi(e){if(cl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Dw(e)&&e.host||li(e);return Dw(t)?t.host:t}function vD(e){const t=Fi(e);return Ii(t)?e.ownerDocument?e.ownerDocument.body:e.body:Wn(t)&&Cc(t)?t:vD(t)}function Ia(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=vD(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Er(o);if(i){const c=$w(a);return t.concat(a,a.visualViewport||[],Cc(o)?o:[],c&&n?Ia(c):[])}return t.concat(o,Ia(o,[],n))}function $w(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const CM={};function To(e,t){const n=A.useRef(CM);return n.current===CM&&(n.current=e(t)),n}const z1=Zh[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],dre=z1&&z1!==A.useLayoutEffect?z1:e=>e();function Ze(e){const t=To(hre).current;return t.next=e,dre(t.effect),t.trampoline}function hre(){const e={next:void 0,callback:pre,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function pre(){}const mre=()=>{},Xe=typeof document<"u"?A.useLayoutEffect:mre;function Iw(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const ch={};function fp(e,t,n,r,o){let i={...zw(e,ch)};return t&&(i=Qd(i,t)),n&&(i=Qd(i,n)),r&&(i=Qd(i,r)),o&&(i=Qd(i,o)),i}function gre(e){if(e.length===0)return ch;if(e.length===1)return zw(e[0],ch);let t={...zw(e[0],ch)};for(let n=1;n<e.length;n+=1)t=Qd(t,e[n]);return t}function Qd(e,t){return bD(t)?t(e):yre(e,t)}function yre(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Iw(e.style,r);break}case"className":{e[n]=SD(e.className,r);break}default:vre(n,r)?e[n]=bre(e[n],r):e[n]=r}}return e}function vre(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function bD(e){return typeof e=="function"}function zw(e,t){return bD(e)?e(t):e??ch}function bre(e,t){return t?e?n=>{if(Sre(n)){const o=n;Lw(o);const i=t(o);return o.baseUIHandlerPrevented||e?.(o),i}const r=t(n);return e?.(n),r}:t:e}function Lw(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function SD(e,t){return t?e?t+" "+e:t:e}function Sre(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Jr(e,...t){const n=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}const wD=A.createContext(void 0);function xD(e=!1){const t=A.useContext(wD);if(t===void 0&&!e)throw new Error(Jr(16));return t}function wre(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:i}=e,a=r&&t!==!1,c=r&&t===!1;return{props:A.useMemo(()=>{const f={onKeyDown(h){n&&t&&h.key!=="Tab"&&h.preventDefault()}};return r||(f.tabIndex=o,!i&&n&&(f.tabIndex=t?o:-1)),(i&&(t||a)||!i&&n)&&(f["aria-disabled"]=n),i&&(!t||c)&&(f.disabled=n),f},[r,n,t,a,c,i,o])}}function Tc(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,i=A.useRef(null),a=xD(!0)!==void 0,c=Ze(()=>{const g=i.current;return!!(g?.tagName==="A"&&g?.href)}),{props:u}=wre({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:o}),f=A.useCallback(()=>{const g=i.current;xre(g)&&a&&t&&u.disabled===void 0&&g.disabled&&(g.disabled=!1)},[t,u.disabled,a]);Xe(f,[f]);const h=A.useCallback((g={})=>{const{onClick:b,onMouseDown:y,onKeyUp:x,onKeyDown:w,onPointerDown:T,...v}=g;return fp({type:o?"button":void 0,onClick(S){if(t){S.preventDefault();return}b?.(S)},onMouseDown(S){t||y?.(S)},onKeyDown(S){if(t||(Lw(S),w?.(S)),S.baseUIHandlerPrevented)return;const C=S.target===S.currentTarget&&!o&&!c()&&!t,E=S.key==="Enter",O=S.key===" ";C&&((O||E)&&S.preventDefault(),E&&b?.(S))},onKeyUp(S){t||(Lw(S),x?.(S)),!S.baseUIHandlerPrevented&&S.target===S.currentTarget&&!o&&!t&&S.key===" "&&b?.(S)},onPointerDown(S){if(t){S.preventDefault();return}T?.(S)}},o?void 0:{role:"button"},u,v)},[t,u,o,c]),p=Ze(g=>{i.current=g,f()});return{getButtonProps:h,buttonRef:p}}function xre(e){return Wn(e)&&e.tagName==="BUTTON"}function Ui(e,t,n,r){const o=To(ED).current;return _re(o,e,t,n,r)&&_D(o,[e,t,n,r]),o.callback}function Ere(e){const t=To(ED).current;return Cre(t,e)&&_D(t,e),t.callback}function ED(){return{callback:null,cleanup:null,refs:[]}}function _re(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function Cre(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function _D(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const a=i(n);typeof a=="function"&&(r[o]=a);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const a=r[o];typeof a=="function"?a():i(null);break}case"object":{i.current=null;break}}}}}}}const Tre=parseInt(A.version,10);function s_(e){return Tre>=e}function TM(e){if(!A.isValidElement(e))return null;const t=e,n=t.props;return(s_(19)?n?.ref:t.ref)??null}function Rre(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const i=t[r](o);i!=null&&Object.assign(n,i);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function Ore(e,t){return typeof e=="function"?e(t):e}function Are(e,t){return typeof e=="function"?e(t):e}function Uo(){}const af=Object.freeze([]),$r=Object.freeze({}),kre=500,Mre={style:{transition:"none"}},CD="data-base-ui-click-trigger",jre={fallbackAxisSide:"none"},Pre={fallbackAxisSide:"end"},Nre={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function Mn(e,t,n={}){const r=t.render,o=Dre(t,n);if(n.enabled===!1)return null;const i=n.state??$r;return $re(e,r,o,i)}function Dre(e,t={}){const{className:n,style:r,render:o}=e,{state:i=$r,ref:a,props:c,stateAttributesMapping:u,enabled:f=!0}=t,h=f?Ore(n,i):void 0,p=f?Are(r,i):void 0,g=f?Rre(i,u):$r,b=f?Iw(g,Array.isArray(c)?gre(c):c)??$r:$r;return typeof document<"u"&&(f?Array.isArray(a)?b.ref=Ere([b.ref,TM(o),...a]):b.ref=Ui(b.ref,TM(o),a):Ui(null,null)),f?(h!==void 0&&(b.className=SD(b.className,h)),p!==void 0&&(b.style=Iw(b.style,p)),b):$r}function $re(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=fp(n,t.props);return o.ref=n.ref,A.cloneElement(t,o)}if(e&&typeof e=="string")return Ire(e,n);throw new Error(Jr(8))}function Ire(e,t){return e==="button"?A.createElement("button",{type:"button",...t,key:t.key}):e==="img"?A.createElement("img",{alt:"",...t,key:t.key}):A.createElement(e,t)}const zre=A.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:c=!0,...u}=t,f=!!i,{getButtonProps:h,buttonRef:p}=Tc({disabled:f,focusableWhenDisabled:a,native:c}),g=A.useMemo(()=>({disabled:f}),[f]);return Mn("button",t,{state:g,ref:[n,p],props:[u,h]})});function TD(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=TD(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function i_(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=TD(e))&&(r&&(r+=" "),r+=t);return r}const RM=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,OM=i_,Wi=(e,t)=>n=>{var r;if(t?.variants==null)return OM(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(f=>{const h=n?.[f],p=i?.[f];if(h===null)return null;const g=RM(h)||RM(p);return o[f][g]}),c=n&&Object.entries(n).reduce((f,h)=>{let[p,g]=h;return g===void 0||(f[p]=g),f},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,h)=>{let{class:p,className:g,...b}=h;return Object.entries(b).every(y=>{let[x,w]=y;return Array.isArray(w)?w.includes({...i,...c}[x]):{...i,...c}[x]===w})?[...f,p,g]:f},[]);return OM(e,a,u,n?.class,n?.className)},Lre=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Fre=(e,t)=>({classGroupId:e,validator:t}),RD=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Uy="-",AM=[],Ure="arbitrary..",Vre=e=>{const t=Bre(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return qre(a);const c=a.split(Uy),u=c[0]===""&&c.length>1?1:0;return OD(c,u,t)},getConflictingClassGroupIds:(a,c)=>{if(c){const u=r[a],f=n[a];return u?f?Lre(f,u):u:f||AM}return n[a]||AM}}},OD=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const f=OD(e,t+1,i);if(f)return f}const a=n.validators;if(a===null)return;const c=t===0?e.join(Uy):e.slice(t).join(Uy),u=a.length;for(let f=0;f<u;f++){const h=a[f];if(h.validator(c))return h.classGroupId}},qre=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Ure+r:void 0})(),Bre=e=>{const{theme:t,classGroups:n}=e;return Hre(n,t)},Hre=(e,t)=>{const n=RD();for(const r in e){const o=e[r];a_(o,n,r,t)}return n},a_=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const a=e[i];Kre(a,t,n,r)}},Kre=(e,t,n,r)=>{if(typeof e=="string"){Gre(e,t,n);return}if(typeof e=="function"){Zre(e,t,n,r);return}Wre(e,t,n,r)},Gre=(e,t,n)=>{const r=e===""?t:AD(t,e);r.classGroupId=n},Zre=(e,t,n,r)=>{if(Yre(e)){a_(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Fre(n,e))},Wre=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let a=0;a<i;a++){const[c,u]=o[a];a_(u,AD(t,c),n,r)}},AD=(e,t)=>{let n=e;const r=t.split(Uy),o=r.length;for(let i=0;i<o;i++){const a=r[i];let c=n.nextPart.get(a);c||(c=RD(),n.nextPart.set(a,c)),n=c}return n},Yre=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Xre=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let a=n[i];if(a!==void 0)return a;if((a=r[i])!==void 0)return o(i,a),a},set(i,a){i in n?n[i]=a:o(i,a)}}},Fw="!",kM=":",Qre=[],MM=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Jre=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,c=0,u=0,f;const h=o.length;for(let x=0;x<h;x++){const w=o[x];if(a===0&&c===0){if(w===kM){i.push(o.slice(u,x)),u=x+1;continue}if(w==="/"){f=x;continue}}w==="["?a++:w==="]"?a--:w==="("?c++:w===")"&&c--}const p=i.length===0?o:o.slice(u);let g=p,b=!1;p.endsWith(Fw)?(g=p.slice(0,-1),b=!0):p.startsWith(Fw)&&(g=p.slice(1),b=!0);const y=f&&f>u?f-u:void 0;return MM(i,b,g,y)};if(t){const o=t+kM,i=r;r=a=>a.startsWith(o)?i(a.slice(o.length)):MM(Qre,!1,a,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},eoe=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const a=n[i],c=a[0]==="[",u=t.has(a);c||u?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(a)):o.push(a)}return o.length>0&&(o.sort(),r.push(...o)),r}},toe=e=>({cache:Xre(e.cacheSize),parseClassName:Jre(e),sortModifiers:eoe(e),...Vre(e)}),noe=/\s+/,roe=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],c=e.trim().split(noe);let u="";for(let f=c.length-1;f>=0;f-=1){const h=c[f],{isExternal:p,modifiers:g,hasImportantModifier:b,baseClassName:y,maybePostfixModifierPosition:x}=n(h);if(p){u=h+(u.length>0?" "+u:u);continue}let w=!!x,T=r(w?y.substring(0,x):y);if(!T){if(!w){u=h+(u.length>0?" "+u:u);continue}if(T=r(y),!T){u=h+(u.length>0?" "+u:u);continue}w=!1}const v=g.length===0?"":g.length===1?g[0]:i(g).join(":"),_=b?v+Fw:v,S=_+T;if(a.indexOf(S)>-1)continue;a.push(S);const C=o(T,w);for(let E=0;E<C.length;++E){const O=C[E];a.push(_+O)}u=h+(u.length>0?" "+u:u)}return u},ooe=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=kD(n))&&(o&&(o+=" "),o+=r);return o},kD=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=kD(e[r]))&&(n&&(n+=" "),n+=t);return n},soe=(e,...t)=>{let n,r,o,i;const a=u=>{const f=t.reduce((h,p)=>p(h),e());return n=toe(f),r=n.cache.get,o=n.cache.set,i=c,c(u)},c=u=>{const f=r(u);if(f)return f;const h=roe(u,n);return o(u,h),h};return i=a,(...u)=>i(ooe(...u))},ioe=[],Rr=e=>{const t=n=>n[e]||ioe;return t.isThemeGetter=!0,t},MD=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,jD=/^\((?:(\w[\w-]*):)?(.+)\)$/i,aoe=/^\d+\/\d+$/,loe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,coe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,uoe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,foe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,doe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,yu=e=>aoe.test(e),jt=e=>!!e&&!Number.isNaN(Number(e)),Ca=e=>!!e&&Number.isInteger(Number(e)),L1=e=>e.endsWith("%")&&jt(e.slice(0,-1)),Ni=e=>loe.test(e),hoe=()=>!0,poe=e=>coe.test(e)&&!uoe.test(e),PD=()=>!1,moe=e=>foe.test(e),goe=e=>doe.test(e),yoe=e=>!tt(e)&&!nt(e),voe=e=>kf(e,$D,PD),tt=e=>MD.test(e),Ll=e=>kf(e,ID,poe),F1=e=>kf(e,Eoe,jt),jM=e=>kf(e,ND,PD),boe=e=>kf(e,DD,goe),Pg=e=>kf(e,zD,moe),nt=e=>jD.test(e),Vd=e=>Mf(e,ID),Soe=e=>Mf(e,_oe),PM=e=>Mf(e,ND),woe=e=>Mf(e,$D),xoe=e=>Mf(e,DD),Ng=e=>Mf(e,zD,!0),kf=(e,t,n)=>{const r=MD.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Mf=(e,t,n=!1)=>{const r=jD.exec(e);return r?r[1]?t(r[1]):n:!1},ND=e=>e==="position"||e==="percentage",DD=e=>e==="image"||e==="url",$D=e=>e==="length"||e==="size"||e==="bg-size",ID=e=>e==="length",Eoe=e=>e==="number",_oe=e=>e==="family-name",zD=e=>e==="shadow",Coe=()=>{const e=Rr("color"),t=Rr("font"),n=Rr("text"),r=Rr("font-weight"),o=Rr("tracking"),i=Rr("leading"),a=Rr("breakpoint"),c=Rr("container"),u=Rr("spacing"),f=Rr("radius"),h=Rr("shadow"),p=Rr("inset-shadow"),g=Rr("text-shadow"),b=Rr("drop-shadow"),y=Rr("blur"),x=Rr("perspective"),w=Rr("aspect"),T=Rr("ease"),v=Rr("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...S(),nt,tt],E=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],j=()=>[nt,tt,u],P=()=>[yu,"full","auto",...j()],N=()=>[Ca,"none","subgrid",nt,tt],D=()=>["auto",{span:["full",Ca,nt,tt]},Ca,nt,tt],L=()=>[Ca,"auto",nt,tt],U=()=>["auto","min","max","fr",nt,tt],X=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],Z=()=>["auto",...j()],q=()=>[yu,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],G=()=>[e,nt,tt],oe=()=>[...S(),PM,jM,{position:[nt,tt]}],ne=()=>["no-repeat",{repeat:["","x","y","space","round"]}],$=()=>["auto","cover","contain",woe,voe,{size:[nt,tt]}],F=()=>[L1,Vd,Ll],V=()=>["","none","full",f,nt,tt],I=()=>["",jt,Vd,Ll],K=()=>["solid","dashed","dotted","double"],te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],re=()=>[jt,L1,PM,jM],ie=()=>["","none",y,nt,tt],me=()=>["none",jt,nt,tt],Ce=()=>["none",jt,nt,tt],ee=()=>[jt,nt,tt],se=()=>[yu,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ni],breakpoint:[Ni],color:[hoe],container:[Ni],"drop-shadow":[Ni],ease:["in","out","in-out"],font:[yoe],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ni],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ni],shadow:[Ni],spacing:["px",jt],text:[Ni],"text-shadow":[Ni],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",yu,tt,nt,w]}],container:["container"],columns:[{columns:[jt,tt,nt,c]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[Ca,"auto",nt,tt]}],basis:[{basis:[yu,"full","auto",c,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[jt,yu,"auto","initial","none",tt]}],grow:[{grow:["",jt,nt,tt]}],shrink:[{shrink:["",jt,nt,tt]}],order:[{order:[Ca,"first","last","none",nt,tt]}],"grid-cols":[{"grid-cols":N()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":N()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...X(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...X()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":X()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:Z()}],mx:[{mx:Z()}],my:[{my:Z()}],ms:[{ms:Z()}],me:[{me:Z()}],mt:[{mt:Z()}],mr:[{mr:Z()}],mb:[{mb:Z()}],ml:[{ml:Z()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],w:[{w:[c,"screen",...q()]}],"min-w":[{"min-w":[c,"screen","none",...q()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[a]},...q()]}],h:[{h:["screen","lh",...q()]}],"min-h":[{"min-h":["screen","lh","none",...q()]}],"max-h":[{"max-h":["screen","lh",...q()]}],"font-size":[{text:["base",n,Vd,Ll]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,nt,F1]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",L1,tt]}],"font-family":[{font:[Soe,tt,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,nt,tt]}],"line-clamp":[{"line-clamp":[jt,"none",nt,F1]}],leading:[{leading:[i,...j()]}],"list-image":[{"list-image":["none",nt,tt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",nt,tt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:G()}],"text-color":[{text:G()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:[jt,"from-font","auto",nt,Ll]}],"text-decoration-color":[{decoration:G()}],"underline-offset":[{"underline-offset":[jt,"auto",nt,tt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",nt,tt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",nt,tt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:oe()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:$()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ca,nt,tt],radial:["",nt,tt],conic:[Ca,nt,tt]},xoe,boe]}],"bg-color":[{bg:G()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:G()}],"gradient-via":[{via:G()}],"gradient-to":[{to:G()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"border-w":[{border:I()}],"border-w-x":[{"border-x":I()}],"border-w-y":[{"border-y":I()}],"border-w-s":[{"border-s":I()}],"border-w-e":[{"border-e":I()}],"border-w-t":[{"border-t":I()}],"border-w-r":[{"border-r":I()}],"border-w-b":[{"border-b":I()}],"border-w-l":[{"border-l":I()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":I()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...K(),"hidden","none"]}],"divide-style":[{divide:[...K(),"hidden","none"]}],"border-color":[{border:G()}],"border-color-x":[{"border-x":G()}],"border-color-y":[{"border-y":G()}],"border-color-s":[{"border-s":G()}],"border-color-e":[{"border-e":G()}],"border-color-t":[{"border-t":G()}],"border-color-r":[{"border-r":G()}],"border-color-b":[{"border-b":G()}],"border-color-l":[{"border-l":G()}],"divide-color":[{divide:G()}],"outline-style":[{outline:[...K(),"none","hidden"]}],"outline-offset":[{"outline-offset":[jt,nt,tt]}],"outline-w":[{outline:["",jt,Vd,Ll]}],"outline-color":[{outline:G()}],shadow:[{shadow:["","none",h,Ng,Pg]}],"shadow-color":[{shadow:G()}],"inset-shadow":[{"inset-shadow":["none",p,Ng,Pg]}],"inset-shadow-color":[{"inset-shadow":G()}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:G()}],"ring-offset-w":[{"ring-offset":[jt,Ll]}],"ring-offset-color":[{"ring-offset":G()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":G()}],"text-shadow":[{"text-shadow":["none",g,Ng,Pg]}],"text-shadow-color":[{"text-shadow":G()}],opacity:[{opacity:[jt,nt,tt]}],"mix-blend":[{"mix-blend":[...te(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":te()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[jt]}],"mask-image-linear-from-pos":[{"mask-linear-from":re()}],"mask-image-linear-to-pos":[{"mask-linear-to":re()}],"mask-image-linear-from-color":[{"mask-linear-from":G()}],"mask-image-linear-to-color":[{"mask-linear-to":G()}],"mask-image-t-from-pos":[{"mask-t-from":re()}],"mask-image-t-to-pos":[{"mask-t-to":re()}],"mask-image-t-from-color":[{"mask-t-from":G()}],"mask-image-t-to-color":[{"mask-t-to":G()}],"mask-image-r-from-pos":[{"mask-r-from":re()}],"mask-image-r-to-pos":[{"mask-r-to":re()}],"mask-image-r-from-color":[{"mask-r-from":G()}],"mask-image-r-to-color":[{"mask-r-to":G()}],"mask-image-b-from-pos":[{"mask-b-from":re()}],"mask-image-b-to-pos":[{"mask-b-to":re()}],"mask-image-b-from-color":[{"mask-b-from":G()}],"mask-image-b-to-color":[{"mask-b-to":G()}],"mask-image-l-from-pos":[{"mask-l-from":re()}],"mask-image-l-to-pos":[{"mask-l-to":re()}],"mask-image-l-from-color":[{"mask-l-from":G()}],"mask-image-l-to-color":[{"mask-l-to":G()}],"mask-image-x-from-pos":[{"mask-x-from":re()}],"mask-image-x-to-pos":[{"mask-x-to":re()}],"mask-image-x-from-color":[{"mask-x-from":G()}],"mask-image-x-to-color":[{"mask-x-to":G()}],"mask-image-y-from-pos":[{"mask-y-from":re()}],"mask-image-y-to-pos":[{"mask-y-to":re()}],"mask-image-y-from-color":[{"mask-y-from":G()}],"mask-image-y-to-color":[{"mask-y-to":G()}],"mask-image-radial":[{"mask-radial":[nt,tt]}],"mask-image-radial-from-pos":[{"mask-radial-from":re()}],"mask-image-radial-to-pos":[{"mask-radial-to":re()}],"mask-image-radial-from-color":[{"mask-radial-from":G()}],"mask-image-radial-to-color":[{"mask-radial-to":G()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[jt]}],"mask-image-conic-from-pos":[{"mask-conic-from":re()}],"mask-image-conic-to-pos":[{"mask-conic-to":re()}],"mask-image-conic-from-color":[{"mask-conic-from":G()}],"mask-image-conic-to-color":[{"mask-conic-to":G()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:oe()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:$()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",nt,tt]}],filter:[{filter:["","none",nt,tt]}],blur:[{blur:ie()}],brightness:[{brightness:[jt,nt,tt]}],contrast:[{contrast:[jt,nt,tt]}],"drop-shadow":[{"drop-shadow":["","none",b,Ng,Pg]}],"drop-shadow-color":[{"drop-shadow":G()}],grayscale:[{grayscale:["",jt,nt,tt]}],"hue-rotate":[{"hue-rotate":[jt,nt,tt]}],invert:[{invert:["",jt,nt,tt]}],saturate:[{saturate:[jt,nt,tt]}],sepia:[{sepia:["",jt,nt,tt]}],"backdrop-filter":[{"backdrop-filter":["","none",nt,tt]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[jt,nt,tt]}],"backdrop-contrast":[{"backdrop-contrast":[jt,nt,tt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",jt,nt,tt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[jt,nt,tt]}],"backdrop-invert":[{"backdrop-invert":["",jt,nt,tt]}],"backdrop-opacity":[{"backdrop-opacity":[jt,nt,tt]}],"backdrop-saturate":[{"backdrop-saturate":[jt,nt,tt]}],"backdrop-sepia":[{"backdrop-sepia":["",jt,nt,tt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",nt,tt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[jt,"initial",nt,tt]}],ease:[{ease:["linear","initial",T,nt,tt]}],delay:[{delay:[jt,nt,tt]}],animate:[{animate:["none",v,nt,tt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,nt,tt]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:Ce()}],"scale-x":[{"scale-x":Ce()}],"scale-y":[{"scale-y":Ce()}],"scale-z":[{"scale-z":Ce()}],"scale-3d":["scale-3d"],skew:[{skew:ee()}],"skew-x":[{"skew-x":ee()}],"skew-y":[{"skew-y":ee()}],transform:[{transform:[nt,tt,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:se()}],"translate-x":[{"translate-x":se()}],"translate-y":[{"translate-y":se()}],"translate-z":[{"translate-z":se()}],"translate-none":["translate-none"],accent:[{accent:G()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:G()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",nt,tt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",nt,tt]}],fill:[{fill:["none",...G()]}],"stroke-w":[{stroke:[jt,Vd,Ll,F1]}],stroke:[{stroke:["none",...G()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},LD=soe(Coe);function Et(...e){return LD(i_(e))}const Toe=Wi("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 Ya({className:e,variant:t="default",size:n="default",...r}){return M.jsx(zre,{"data-slot":"button",className:Et(Toe({variant:t,size:n,className:e})),...r})}const Roe=()=>{const e=Ene(),t=e?.name,n=e?.version,[,r]=xE();return M.jsx("div",{className:"flex flex-col border-b border-border bg-background",children:M.jsxs("div",{className:"flex h-14 items-center justify-between px-4",children:[M.jsxs("div",{className:"flex items-center gap-4",children:[M.jsx("button",{type:"button",className:"font-semibold cursor-pointer",onClick:()=>{r(null)},children:"Skybridge"}),M.jsx("span",{className:"h-4 w-px bg-border","aria-hidden":"true"}),M.jsxs("div",{className:"flex items-center gap-4 rounded-md border border-border bg-muted px-2 py-1",children:[M.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t}),M.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",n]})]}),M.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:[M.jsx("span",{className:"h-2 w-2 rounded-full bg-green-500 mr-1 inline-block"}),"Connected"]})]}),M.jsx("div",{className:"flex items-center gap-2",children:M.jsx(Ya,{variant:"ghost",size:"sm",className:"h-8 gap-2",children:M.jsxs("a",{href:"https://docs.skybridge.tech/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:["Learn more about Skybridge",M.jsx(Fne,{className:"h-3.5 w-3.5"})]})})})]})})},FD=A.createContext({});function Ooe(e){const t=A.useRef(null);return t.current===null&&(t.current=e()),t.current}const UD=typeof window<"u",Aoe=UD?A.useLayoutEffect:A.useEffect,l_=A.createContext(null);function c_(e,t){e.indexOf(t)===-1&&e.push(t)}function u_(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ri=(e,t,n)=>n>t?t:n<e?e:n;let f_=()=>{};const Vi={},VD=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function qD(e){return typeof e=="object"&&e!==null}const BD=e=>/^0[^.\s]+$/u.test(e);function d_(e){let t;return()=>(t===void 0&&(t=e()),t)}const ds=e=>e,koe=(e,t)=>n=>t(e(n)),dp=(...e)=>e.reduce(koe),Ah=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class h_{constructor(){this.subscriptions=[]}add(t){return c_(this.subscriptions,t),()=>u_(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const a=this.subscriptions[i];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const zi=e=>e*1e3,cs=e=>e/1e3;function HD(e,t){return t?e*(1e3/t):0}const KD=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Moe=1e-7,joe=12;function Poe(e,t,n,r,o){let i,a,c=0;do a=t+(n-t)/2,i=KD(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>Moe&&++c<joe);return a}function hp(e,t,n,r){if(e===t&&n===r)return ds;const o=i=>Poe(i,0,1,e,n);return i=>i===0||i===1?i:KD(o(i),t,r)}const GD=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ZD=e=>t=>1-e(1-t),WD=hp(.33,1.53,.69,.99),p_=ZD(WD),YD=GD(p_),XD=e=>(e*=2)<1?.5*p_(e):.5*(2-Math.pow(2,-10*(e-1))),m_=e=>1-Math.sin(Math.acos(e)),QD=ZD(m_),JD=GD(m_),Noe=hp(.42,0,1,1),Doe=hp(0,0,.58,1),e$=hp(.42,0,.58,1),$oe=e=>Array.isArray(e)&&typeof e[0]!="number",t$=e=>Array.isArray(e)&&typeof e[0]=="number",Ioe={linear:ds,easeIn:Noe,easeInOut:e$,easeOut:Doe,circIn:m_,circInOut:JD,circOut:QD,backIn:p_,backInOut:YD,backOut:WD,anticipate:XD},zoe=e=>typeof e=="string",NM=e=>{if(t$(e)){f_(e.length===4);const[t,n,r,o]=e;return hp(t,n,r,o)}else if(zoe(e))return Ioe[e];return e},Dg=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Loe(e,t){let n=new Set,r=new Set,o=!1,i=!1;const a=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1};function u(h){a.has(h)&&(f.schedule(h),e()),h(c)}const f={schedule:(h,p=!1,g=!1)=>{const y=g&&o?n:r;return p&&a.add(h),y.has(h)||y.add(h),h},cancel:h=>{r.delete(h),a.delete(h)},process:h=>{if(c=h,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(u),n.clear(),o=!1,i&&(i=!1,f.process(h))}};return f}const Foe=40;function n$(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Dg.reduce((_,S)=>(_[S]=Loe(i),_),{}),{setup:c,read:u,resolveKeyframes:f,preUpdate:h,update:p,preRender:g,render:b,postRender:y}=a,x=()=>{const _=Vi.useManualTiming?o.timestamp:performance.now();n=!1,Vi.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(_-o.timestamp,Foe),1)),o.timestamp=_,o.isProcessing=!0,c.process(o),u.process(o),f.process(o),h.process(o),p.process(o),g.process(o),b.process(o),y.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(x))},w=()=>{n=!0,r=!0,o.isProcessing||e(x)};return{schedule:Dg.reduce((_,S)=>{const C=a[S];return _[S]=(E,O=!1,j=!1)=>(n||w(),C.schedule(E,O,j)),_},{}),cancel:_=>{for(let S=0;S<Dg.length;S++)a[Dg[S]].cancel(_)},state:o,steps:a}}const{schedule:Ln,cancel:Xa,state:Hr,steps:U1}=n$(typeof requestAnimationFrame<"u"?requestAnimationFrame:ds,!0);let ay;function Uoe(){ay=void 0}const po={now:()=>(ay===void 0&&po.set(Hr.isProcessing||Vi.useManualTiming?Hr.timestamp:performance.now()),ay),set:e=>{ay=e,queueMicrotask(Uoe)}},r$=e=>t=>typeof t=="string"&&t.startsWith(e),o$=r$("--"),Voe=r$("var(--"),g_=e=>Voe(e)?qoe.test(e.split("/*")[0].trim()):!1,qoe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function DM(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const jf={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},kh={...jf,transform:e=>ri(0,1,e)},$g={...jf,default:1},uh=e=>Math.round(e*1e5)/1e5,y_=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Boe(e){return e==null}const Hoe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,v_=(e,t)=>n=>!!(typeof n=="string"&&Hoe.test(n)&&n.startsWith(e)||t&&!Boe(n)&&Object.prototype.hasOwnProperty.call(n,t)),s$=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,c]=r.match(y_);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:c!==void 0?parseFloat(c):1}},Koe=e=>ri(0,255,e),V1={...jf,transform:e=>Math.round(Koe(e))},Yl={test:v_("rgb","red"),parse:s$("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+V1.transform(e)+", "+V1.transform(t)+", "+V1.transform(n)+", "+uh(kh.transform(r))+")"};function Goe(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Uw={test:v_("#"),parse:Goe,transform:Yl.transform},pp=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ra=pp("deg"),ei=pp("%"),Qe=pp("px"),Zoe=pp("vh"),Woe=pp("vw"),$M={...ei,parse:e=>ei.parse(e)/100,transform:e=>ei.transform(e*100)},Nu={test:v_("hsl","hue"),parse:s$("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ei.transform(uh(t))+", "+ei.transform(uh(n))+", "+uh(kh.transform(r))+")"},vr={test:e=>Yl.test(e)||Uw.test(e)||Nu.test(e),parse:e=>Yl.test(e)?Yl.parse(e):Nu.test(e)?Nu.parse(e):Uw.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Yl.transform(e):Nu.transform(e),getAnimatableNone:e=>{const t=vr.parse(e);return t.alpha=0,vr.transform(t)}},Yoe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Xoe(e){return isNaN(e)&&typeof e=="string"&&(e.match(y_)?.length||0)+(e.match(Yoe)?.length||0)>0}const i$="number",a$="color",Qoe="var",Joe="var(",IM="${}",ese=/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 Mh(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const c=t.replace(ese,u=>(vr.test(u)?(r.color.push(i),o.push(a$),n.push(vr.parse(u))):u.startsWith(Joe)?(r.var.push(i),o.push(Qoe),n.push(u)):(r.number.push(i),o.push(i$),n.push(parseFloat(u))),++i,IM)).split(IM);return{values:n,split:c,indexes:r,types:o}}function l$(e){return Mh(e).values}function c$(e){const{split:t,types:n}=Mh(e),r=t.length;return o=>{let i="";for(let a=0;a<r;a++)if(i+=t[a],o[a]!==void 0){const c=n[a];c===i$?i+=uh(o[a]):c===a$?i+=vr.transform(o[a]):i+=o[a]}return i}}const tse=e=>typeof e=="number"?0:vr.test(e)?vr.getAnimatableNone(e):e;function nse(e){const t=l$(e);return c$(e)(t.map(tse))}const Qa={test:Xoe,parse:l$,createTransformer:c$,getAnimatableNone:nse};function q1(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function rse({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,a=0;if(!t)o=i=a=n;else{const c=n<.5?n*(1+t):n+t-n*t,u=2*n-c;o=q1(u,c,e+1/3),i=q1(u,c,e),a=q1(u,c,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function Vy(e,t){return n=>n>0?t:e}const Xn=(e,t,n)=>e+(t-e)*n,B1=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},ose=[Uw,Yl,Nu],sse=e=>ose.find(t=>t.test(e));function zM(e){const t=sse(e);if(!t)return!1;let n=t.parse(e);return t===Nu&&(n=rse(n)),n}const LM=(e,t)=>{const n=zM(e),r=zM(t);if(!n||!r)return Vy(e,t);const o={...n};return i=>(o.red=B1(n.red,r.red,i),o.green=B1(n.green,r.green,i),o.blue=B1(n.blue,r.blue,i),o.alpha=Xn(n.alpha,r.alpha,i),Yl.transform(o))},Vw=new Set(["none","hidden"]);function ise(e,t){return Vw.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function ase(e,t){return n=>Xn(e,t,n)}function b_(e){return typeof e=="number"?ase:typeof e=="string"?g_(e)?Vy:vr.test(e)?LM:use:Array.isArray(e)?u$:typeof e=="object"?vr.test(e)?LM:lse:Vy}function u$(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>b_(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function lse(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=b_(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function cse(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],a=e.indexes[i][r[i]],c=e.values[a]??0;n[o]=c,r[i]++}return n}const use=(e,t)=>{const n=Qa.createTransformer(t),r=Mh(e),o=Mh(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Vw.has(e)&&!o.values.length||Vw.has(t)&&!r.values.length?ise(e,t):dp(u$(cse(r,o),o.values),n):Vy(e,t)};function f$(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Xn(e,t,n):b_(e)(e,t)}const fse=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Ln.update(t,n),stop:()=>Xa(t),now:()=>Hr.isProcessing?Hr.timestamp:po.now()}},d$=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=Math.round(e(i/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},qy=2e4;function S_(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<qy;)t+=n,r=e.next(t);return t>=qy?1/0:t}function dse(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(S_(r),qy);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:cs(o)}}const hse=5;function h$(e,t,n){const r=Math.max(t-hse,0);return HD(n-e(r),t-r)}const or={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},H1=.001;function pse({duration:e=or.duration,bounce:t=or.bounce,velocity:n=or.velocity,mass:r=or.mass}){let o,i,a=1-t;a=ri(or.minDamping,or.maxDamping,a),e=ri(or.minDuration,or.maxDuration,cs(e)),a<1?(o=f=>{const h=f*a,p=h*e,g=h-n,b=qw(f,a),y=Math.exp(-p);return H1-g/b*y},i=f=>{const p=f*a*e,g=p*n+n,b=Math.pow(a,2)*Math.pow(f,2)*e,y=Math.exp(-p),x=qw(Math.pow(f,2),a);return(-o(f)+H1>0?-1:1)*((g-b)*y)/x}):(o=f=>{const h=Math.exp(-f*e),p=(f-n)*e+1;return-H1+h*p},i=f=>{const h=Math.exp(-f*e),p=(n-f)*(e*e);return h*p});const c=5/e,u=gse(o,i,c);if(e=zi(e),isNaN(u))return{stiffness:or.stiffness,damping:or.damping,duration:e};{const f=Math.pow(u,2)*r;return{stiffness:f,damping:a*2*Math.sqrt(r*f),duration:e}}}const mse=12;function gse(e,t,n){let r=n;for(let o=1;o<mse;o++)r=r-e(r)/t(r);return r}function qw(e,t){return e*Math.sqrt(1-t*t)}const yse=["duration","bounce"],vse=["stiffness","damping","mass"];function FM(e,t){return t.some(n=>e[n]!==void 0)}function bse(e){let t={velocity:or.velocity,stiffness:or.stiffness,damping:or.damping,mass:or.mass,isResolvedFromDuration:!1,...e};if(!FM(e,vse)&&FM(e,yse))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*ri(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:or.mass,stiffness:o,damping:i}}else{const n=pse(e);t={...t,...n,mass:or.mass},t.isResolvedFromDuration=!0}return t}function By(e=or.visualDuration,t=or.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],c={done:!1,value:i},{stiffness:u,damping:f,mass:h,duration:p,velocity:g,isResolvedFromDuration:b}=bse({...n,velocity:-cs(n.velocity||0)}),y=g||0,x=f/(2*Math.sqrt(u*h)),w=a-i,T=cs(Math.sqrt(u/h)),v=Math.abs(w)<5;r||(r=v?or.restSpeed.granular:or.restSpeed.default),o||(o=v?or.restDelta.granular:or.restDelta.default);let _;if(x<1){const C=qw(T,x);_=E=>{const O=Math.exp(-x*T*E);return a-O*((y+x*T*w)/C*Math.sin(C*E)+w*Math.cos(C*E))}}else if(x===1)_=C=>a-Math.exp(-T*C)*(w+(y+T*w)*C);else{const C=T*Math.sqrt(x*x-1);_=E=>{const O=Math.exp(-x*T*E),j=Math.min(C*E,300);return a-O*((y+x*T*w)*Math.sinh(j)+C*w*Math.cosh(j))/C}}const S={calculatedDuration:b&&p||null,next:C=>{const E=_(C);if(b)c.done=C>=p;else{let O=C===0?y:0;x<1&&(O=C===0?zi(y):h$(_,C,E));const j=Math.abs(O)<=r,P=Math.abs(a-E)<=o;c.done=j&&P}return c.value=c.done?a:E,c},toString:()=>{const C=Math.min(S_(S),qy),E=d$(O=>S.next(C*O).value,C,30);return C+"ms "+E},toTransition:()=>{}};return S}By.applyToOptions=e=>{const t=dse(e,100,By);return e.ease=t.ease,e.duration=zi(t.duration),e.type="keyframes",e};function Bw({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:c,max:u,restDelta:f=.5,restSpeed:h}){const p=e[0],g={done:!1,value:p},b=j=>c!==void 0&&j<c||u!==void 0&&j>u,y=j=>c===void 0?u:u===void 0||Math.abs(c-j)<Math.abs(u-j)?c:u;let x=n*t;const w=p+x,T=a===void 0?w:a(w);T!==w&&(x=T-p);const v=j=>-x*Math.exp(-j/r),_=j=>T+v(j),S=j=>{const P=v(j),N=_(j);g.done=Math.abs(P)<=f,g.value=g.done?T:N};let C,E;const O=j=>{b(g.value)&&(C=j,E=By({keyframes:[g.value,y(g.value)],velocity:h$(_,j,g.value),damping:o,stiffness:i,restDelta:f,restSpeed:h}))};return O(0),{calculatedDuration:null,next:j=>{let P=!1;return!E&&C===void 0&&(P=!0,S(j),O(j)),C!==void 0&&j>=C?E.next(j-C):(!P&&S(j),g)}}}function Sse(e,t,n){const r=[],o=n||Vi.mix||f$,i=e.length-1;for(let a=0;a<i;a++){let c=o(e[a],e[a+1]);if(t){const u=Array.isArray(t)?t[a]||ds:t;c=dp(u,c)}r.push(c)}return r}function wse(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(f_(i===t.length),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const c=Sse(t,r,o),u=c.length,f=h=>{if(a&&h<e[0])return t[0];let p=0;if(u>1)for(;p<e.length-2&&!(h<e[p+1]);p++);const g=Ah(e[p],e[p+1],h);return c[p](g)};return n?h=>f(ri(e[0],e[i-1],h)):f}function xse(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Ah(0,t,r);e.push(Xn(n,1,o))}}function Ese(e){const t=[0];return xse(t,e.length-1),t}function _se(e,t){return e.map(n=>n*t)}function Cse(e,t){return e.map(()=>t||e$).splice(0,e.length-1)}function fh({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=$oe(r)?r.map(NM):NM(r),i={done:!1,value:t[0]},a=_se(n&&n.length===t.length?n:Ese(t),e),c=wse(a,t,{ease:Array.isArray(o)?o:Cse(t,o)});return{calculatedDuration:e,next:u=>(i.value=c(u),i.done=u>=e,i)}}const Tse=e=>e!==null;function w_(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(Tse),c=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!c||r===void 0?i[c]:r}const Rse={decay:Bw,inertia:Bw,tween:fh,keyframes:fh,spring:By};function p$(e){typeof e.type=="string"&&(e.type=Rse[e.type])}class x_{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const Ose=e=>e/100;class E_ extends x_{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:n}=this.options;n&&n.updatedAt!==po.now()&&this.tick(po.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;p$(t);const{type:n=fh,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=t;let{keyframes:c}=t;const u=n||fh;u!==fh&&typeof c[0]!="number"&&(this.mixKeyframes=dp(Ose,f$(c[0],c[1])),c=[0,100]);const f=u({...t,keyframes:c});i==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...c].reverse(),velocity:-a})),f.calculatedDuration===null&&(f.calculatedDuration=S_(f));const{calculatedDuration:h}=f;this.calculatedDuration=h,this.resolvedDuration=h+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=f}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:c,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);const{delay:f=0,keyframes:h,repeat:p,repeatType:g,repeatDelay:b,type:y,onUpdate:x,finalKeyframe:w}=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)),n?this.currentTime=t:this.updateTime(t);const T=this.currentTime-f*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?T<0:T>o;this.currentTime=Math.max(T,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let _=this.currentTime,S=r;if(p){const j=Math.min(this.currentTime,o)/c;let P=Math.floor(j),N=j%1;!N&&j>=1&&(N=1),N===1&&P--,P=Math.min(P,p+1),P%2&&(g==="reverse"?(N=1-N,b&&(N-=b/c)):g==="mirror"&&(S=a)),_=ri(0,1,N)*c}const C=v?{done:!1,value:h[0]}:S.next(_);i&&(C.value=i(C.value));let{done:E}=C;!v&&u!==null&&(E=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return O&&y!==Bw&&(C.value=w_(h,this.options,w,this.speed)),x&&x(C.value),O&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return cs(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+cs(t)}get time(){return cs(this.currentTime)}set time(t){t=zi(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(po.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=cs(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=fse,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(po.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 Ase(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Xl=e=>e*180/Math.PI,Hw=e=>{const t=Xl(Math.atan2(e[1],e[0]));return Kw(t)},kse={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Hw,rotateZ:Hw,skewX:e=>Xl(Math.atan(e[1])),skewY:e=>Xl(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Kw=e=>(e=e%360,e<0&&(e+=360),e),UM=Hw,VM=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),qM=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Mse={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:VM,scaleY:qM,scale:e=>(VM(e)+qM(e))/2,rotateX:e=>Kw(Xl(Math.atan2(e[6],e[5]))),rotateY:e=>Kw(Xl(Math.atan2(-e[2],e[0]))),rotateZ:UM,rotate:UM,skewX:e=>Xl(Math.atan(e[4])),skewY:e=>Xl(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Gw(e){return e.includes("scale")?1:0}function Zw(e,t){if(!e||e==="none")return Gw(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=Mse,o=n;else{const c=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=kse,o=c}if(!o)return Gw(t);const i=r[t],a=o[1].split(",").map(Pse);return typeof i=="function"?i(a):a[i]}const jse=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Zw(n,t)};function Pse(e){return parseFloat(e.trim())}const Pf=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Nf=new Set(Pf),BM=e=>e===jf||e===Qe,Nse=new Set(["x","y","z"]),Dse=Pf.filter(e=>!Nse.has(e));function $se(e){const t=[];return Dse.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ja={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Zw(t,"x"),y:(e,{transform:t})=>Zw(t,"y")};ja.translateX=ja.x;ja.translateY=ja.y;const tc=new Set;let Ww=!1,Yw=!1,Xw=!1;function m$(){if(Yw){const e=Array.from(tc).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=$se(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,a])=>{r.getValue(i)?.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Yw=!1,Ww=!1,tc.forEach(e=>e.complete(Xw)),tc.clear()}function g$(){tc.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Yw=!0)})}function Ise(){Xw=!0,g$(),m$(),Xw=!1}class __{constructor(t,n,r,o,i,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(tc.add(this),Ww||(Ww=!0,Ln.read(g$),Ln.resolveKeyframes(m$))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const i=o?.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const c=r.readValue(n,a);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}Ase(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),tc.delete(this)}cancel(){this.state==="scheduled"&&(tc.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const zse=e=>e.startsWith("--");function Lse(e,t,n){zse(t)?e.style.setProperty(t,n):e.style[t]=n}const Fse=d_(()=>window.ScrollTimeline!==void 0),Use={};function Vse(e,t){const n=d_(e);return()=>Use[t]??n()}const y$=Vse(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Jd=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,HM={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Jd([0,.65,.55,1]),circOut:Jd([.55,0,1,.45]),backIn:Jd([.31,.01,.66,-.59]),backOut:Jd([.33,1.53,.69,.99])};function v$(e,t){if(e)return typeof e=="function"?y$()?d$(e,t):"ease-out":t$(e)?Jd(e):Array.isArray(e)?e.map(n=>v$(n,t)||HM.easeOut):HM[e]}function qse(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:c="easeOut",times:u}={},f=void 0){const h={[t]:n};u&&(h.offset=u);const p=v$(c,o);Array.isArray(p)&&(h.easing=p);const g={delay:r,duration:o,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"};return f&&(g.pseudoElement=f),e.animate(h,g)}function b$(e){return typeof e=="function"&&"applyToOptions"in e}function Bse({type:e,...t}){return b$(e)&&y$()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Hse extends x_{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:c,onComplete:u}=t;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=t,f_(typeof t.type!="string");const f=Bse(t);this.animation=qse(n,r,o,f,i),f.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const h=w_(o,this.options,c,this.speed);this.updateMotionValue?this.updateMotionValue(h):Lse(n,r,h),this.animation.cancel()}u?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state: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 cs(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+cs(t)}get time(){return cs(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=zi(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 this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Fse()?(this.animation.timeline=t,ds):n(this)}}const S$={anticipate:XD,backInOut:YD,circInOut:JD};function Kse(e){return e in S$}function Gse(e){typeof e.ease=="string"&&Kse(e.ease)&&(e.ease=S$[e.ease])}const K1=10;class Zse extends Hse{constructor(t){Gse(t),p$(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:i,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const c=new E_({...a,autoplay:!1}),u=Math.max(K1,po.now()-this.startTime),f=ri(0,K1,u-K1);n.setWithVelocity(c.sample(Math.max(0,u-f)).value,c.sample(u).value,f),c.stop()}}const KM=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Qa.test(e)||e==="0")&&!e.startsWith("url("));function Wse(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Yse(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],a=KM(o,t),c=KM(i,t);return!a||!c?!1:Wse(e)||(n==="spring"||b$(n))&&r}function Qw(e){e.duration=0,e.type="keyframes"}const Xse=new Set(["opacity","clipPath","filter","transform"]),Qse=d_(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Jse(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:f}=t.owner.getProps();return Qse()&&n&&Xse.has(n)&&(n!=="transform"||!f)&&!u&&!r&&o!=="mirror"&&i!==0&&a!=="inertia"}const eie=40;class tie extends x_{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",keyframes:c,name:u,motionValue:f,element:h,...p}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=po.now();const g={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,name:u,motionValue:f,element:h,...p},b=h?.KeyframeResolver||__;this.keyframeResolver=new b(c,(y,x,w)=>this.onKeyframesResolved(y,x,g,!w),u,f,h),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:i,type:a,velocity:c,delay:u,isHandoff:f,onUpdate:h}=r;this.resolvedAt=po.now(),Yse(t,i,a,c)||((Vi.instantAnimations||!u)&&h?.(w_(t,r,n)),t[0]=t[t.length-1],Qw(r),r.repeat=0);const g={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>eie?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},b=!f&&Jse(g)?new Zse({...g,element:g.motionValue.owner.current}):new E_(g);b.finished.then(()=>this.notifyFinished()).catch(ds),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ise()),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 nie=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function rie(e){const t=nie.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}function w$(e,t,n=1){const[r,o]=rie(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return VD(a)?parseFloat(a):a}return g_(o)?w$(o,t,n+1):o}function C_(e,t){return e?.[t]??e?.default??e}const oie={type:"spring",stiffness:500,damping:25,restSpeed:10},sie=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),iie={type:"keyframes",duration:.8},aie={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},lie=(e,{keyframes:t})=>t.length>2?iie:Nf.has(e)?e.startsWith("scale")?sie(t[1]):oie:aie;function cie({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:c,from:u,elapsed:f,...h}){return!!Object.keys(h).length}const uie=e=>e!==null;function fie(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(uie),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}function x$(e,t,n,r=0,o=1){const i=Array.from(e).sort((f,h)=>f.sortNodePosition(h)).indexOf(t),a=e.size,c=(a-1)*r;return typeof n=="function"?n(i,a):o===1?i*r:c-i*r}const T_=(e,t,n,r={},o,i)=>a=>{const c=C_(r,e)||{},u=c.delay||r.delay||0;let{elapsed:f=0}=r;f=f-zi(u);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-f,onUpdate:g=>{t.set(g),c.onUpdate&&c.onUpdate(g)},onComplete:()=>{a(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:i?void 0:o};cie(c)||Object.assign(h,lie(e,h)),h.duration&&(h.duration=zi(h.duration)),h.repeatDelay&&(h.repeatDelay=zi(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let p=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(Qw(h),h.delay===0&&(p=!0)),(Vi.instantAnimations||Vi.skipAnimations)&&(p=!0,Qw(h),h.delay=0),h.allowFlatten=!c.type&&!c.ease,p&&!i&&t.get()!==void 0){const g=fie(h.keyframes,c);if(g!==void 0){Ln.update(()=>{h.onUpdate(g),h.onComplete()});return}}return c.isSync?new E_(h):new tie(h)},E$=new Set(["width","height","top","left","right","bottom",...Pf]),GM=30,die=e=>!isNaN(parseFloat(e));class hie{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=po.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=po.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=die(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new h_);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ln.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){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=po.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>GM)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,GM);return HD(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function lf(e,t){return new hie(e,t)}function ZM(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function R_(e,t,n,r){if(typeof t=="function"){const[o,i]=ZM(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=ZM(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function qu(e,t,n){const r=e.getProps();return R_(r,t,n!==void 0?n:r.custom,e)}const Jw=e=>Array.isArray(e);function pie(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,lf(n))}function mie(e){return Jw(e)?e[e.length-1]||0:e}function gie(e,t){const n=qu(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const c=mie(i[a]);pie(e,a,c)}}const no=e=>!!(e&&e.getVelocity);function yie(e){return!!(no(e)&&e.add)}function ex(e,t){const n=e.getValue("willChange");if(yie(n))return n.add(t);if(!n&&Vi.WillChange){const r=new Vi.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function O_(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const vie="framerAppearId",_$="data-"+O_(vie);function C$(e){return e.props[_$]}function bie({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function T$(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:a,...c}=t;r&&(i=r);const u=[],f=o&&e.animationState&&e.animationState.getState()[o];for(const h in c){const p=e.getValue(h,e.latestValues[h]??null),g=c[h];if(g===void 0||f&&bie(f,h))continue;const b={delay:n,...C_(i||{},h)},y=p.get();if(y!==void 0&&!p.isAnimating&&!Array.isArray(g)&&g===y&&!b.velocity)continue;let x=!1;if(window.MotionHandoffAnimation){const T=C$(e);if(T){const v=window.MotionHandoffAnimation(T,h,Ln);v!==null&&(b.startTime=v,x=!0)}}ex(e,h),p.start(T_(h,p,g,e.shouldReduceMotion&&E$.has(h)?{type:!1}:b,e,x));const w=p.animation;w&&u.push(w)}return a&&Promise.all(u).then(()=>{Ln.update(()=>{a&&gie(e,a)})}),u}function tx(e,t,n={}){const r=qu(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(T$(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:f=0,staggerChildren:h,staggerDirection:p}=o;return Sie(e,t,u,f,h,p,n)}:()=>Promise.resolve(),{when:c}=o;if(c){const[u,f]=c==="beforeChildren"?[i,a]:[a,i];return u().then(()=>f())}else return Promise.all([i(),a(n.delay)])}function Sie(e,t,n=0,r=0,o=0,i=1,a){const c=[];for(const u of e.variantChildren)u.notify("AnimationStart",t),c.push(tx(u,t,{...a,delay:n+(typeof r=="function"?0:r)+x$(e.variantChildren,u,r,o,i)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(c)}function wie(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>tx(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=tx(e,t,n);else{const o=typeof t=="function"?qu(e,t,n.custom):t;r=Promise.all(T$(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const xie={test:e=>e==="auto",parse:e=>e},R$=e=>t=>t.test(e),O$=[jf,Qe,ei,Ra,Woe,Zoe,xie],WM=e=>O$.find(R$(e));function Eie(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||BD(e):!0}const _ie=new Set(["brightness","contrast","saturate","opacity"]);function Cie(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(y_)||[];if(!r)return e;const o=n.replace(r,"");let i=_ie.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const Tie=/\b([a-z-]*)\(.*?\)/gu,nx={...Qa,getAnimatableNone:e=>{const t=e.match(Tie);return t?t.map(Cie).join(" "):e}},YM={...jf,transform:Math.round},Rie={rotate:Ra,rotateX:Ra,rotateY:Ra,rotateZ:Ra,scale:$g,scaleX:$g,scaleY:$g,scaleZ:$g,skew:Ra,skewX:Ra,skewY:Ra,distance:Qe,translateX:Qe,translateY:Qe,translateZ:Qe,x:Qe,y:Qe,z:Qe,perspective:Qe,transformPerspective:Qe,opacity:kh,originX:$M,originY:$M,originZ:Qe},A_={borderWidth:Qe,borderTopWidth:Qe,borderRightWidth:Qe,borderBottomWidth:Qe,borderLeftWidth:Qe,borderRadius:Qe,radius:Qe,borderTopLeftRadius:Qe,borderTopRightRadius:Qe,borderBottomRightRadius:Qe,borderBottomLeftRadius:Qe,width:Qe,maxWidth:Qe,height:Qe,maxHeight:Qe,top:Qe,right:Qe,bottom:Qe,left:Qe,inset:Qe,insetBlock:Qe,insetBlockStart:Qe,insetBlockEnd:Qe,insetInline:Qe,insetInlineStart:Qe,insetInlineEnd:Qe,padding:Qe,paddingTop:Qe,paddingRight:Qe,paddingBottom:Qe,paddingLeft:Qe,paddingBlock:Qe,paddingBlockStart:Qe,paddingBlockEnd:Qe,paddingInline:Qe,paddingInlineStart:Qe,paddingInlineEnd:Qe,margin:Qe,marginTop:Qe,marginRight:Qe,marginBottom:Qe,marginLeft:Qe,marginBlock:Qe,marginBlockStart:Qe,marginBlockEnd:Qe,marginInline:Qe,marginInlineStart:Qe,marginInlineEnd:Qe,backgroundPositionX:Qe,backgroundPositionY:Qe,...Rie,zIndex:YM,fillOpacity:kh,strokeOpacity:kh,numOctaves:YM},Oie={...A_,color:vr,backgroundColor:vr,outlineColor:vr,fill:vr,stroke:vr,borderColor:vr,borderTopColor:vr,borderRightColor:vr,borderBottomColor:vr,borderLeftColor:vr,filter:nx,WebkitFilter:nx},A$=e=>Oie[e];function k$(e,t){let n=A$(e);return n!==nx&&(n=Qa),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Aie=new Set(["auto","none","0"]);function kie(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!Aie.has(i)&&Mh(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=k$(n,o)}class Mie extends __{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let h=0;h<t.length;h++){let p=t[h];if(typeof p=="string"&&(p=p.trim(),g_(p))){const g=w$(p,n.current);g!==void 0&&(t[h]=g),h===t.length-1&&(this.finalKeyframe=p)}}if(this.resolveNoneKeyframes(),!E$.has(r)||t.length!==2)return;const[o,i]=t,a=WM(o),c=WM(i),u=DM(o),f=DM(i);if(u!==f&&ja[r]){this.needsMeasurement=!0;return}if(a!==c)if(BM(a)&&BM(c))for(let h=0;h<t.length;h++){const p=t[h];typeof p=="string"&&(t[h]=parseFloat(p))}else ja[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||Eie(t[o]))&&r.push(o);r.length&&kie(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ja[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=ja[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function jie(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}const M$=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Pie(e){return qD(e)&&"offsetHeight"in e}const{schedule:k_}=n$(queueMicrotask,!1),Rs={x:!1,y:!1};function j$(){return Rs.x||Rs.y}function Nie(e){return e==="x"||e==="y"?Rs[e]?null:(Rs[e]=!0,()=>{Rs[e]=!1}):Rs.x||Rs.y?null:(Rs.x=Rs.y=!0,()=>{Rs.x=Rs.y=!1})}function P$(e,t){const n=jie(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function XM(e){return!(e.pointerType==="touch"||j$())}function Die(e,t,n={}){const[r,o,i]=P$(e,n),a=c=>{if(!XM(c))return;const{target:u}=c,f=t(u,c);if(typeof f!="function"||!u)return;const h=p=>{XM(p)&&(f(p),u.removeEventListener("pointerleave",h))};u.addEventListener("pointerleave",h,o)};return r.forEach(c=>{c.addEventListener("pointerenter",a,o)}),i}const N$=(e,t)=>t?e===t?!0:N$(e,t.parentElement):!1,M_=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,$ie=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function D$(e){return $ie.has(e.tagName)||e.isContentEditable===!0}const ly=new WeakSet;function QM(e){return t=>{t.key==="Enter"&&e(t)}}function G1(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Iie=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=QM(()=>{if(ly.has(n))return;G1(n,"down");const o=QM(()=>{G1(n,"up")}),i=()=>G1(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function JM(e){return M_(e)&&!j$()}function zie(e,t,n={}){const[r,o,i]=P$(e,n),a=c=>{const u=c.currentTarget;if(!JM(c))return;ly.add(u);const f=t(u,c),h=(b,y)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",g),ly.has(u)&&ly.delete(u),JM(b)&&typeof f=="function"&&f(b,{success:y})},p=b=>{h(b,u===window||u===document||n.useGlobalTarget||N$(u,b.target))},g=b=>{h(b,!1)};window.addEventListener("pointerup",p,o),window.addEventListener("pointercancel",g,o)};return r.forEach(c=>{(n.useGlobalTarget?window:c).addEventListener("pointerdown",a,o),Pie(c)&&(c.addEventListener("focus",f=>Iie(f,o)),!D$(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0))}),i}function $$(e){return qD(e)&&"ownerSVGElement"in e}function Lie(e){return $$(e)&&e.tagName==="svg"}const Fie=[...O$,vr,Qa],Uie=e=>Fie.find(R$(e)),e5=()=>({translate:0,scale:1,origin:0,originPoint:0}),Du=()=>({x:e5(),y:e5()}),t5=()=>({min:0,max:0}),Or=()=>({x:t5(),y:t5()}),rx={current:null},I$={current:!1},Vie=typeof window<"u";function qie(){if(I$.current=!0,!!Vie)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>rx.current=e.matches;e.addEventListener("change",t),t()}else rx.current=!1}const Bie=new WeakMap;function D0(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function jh(e){return typeof e=="string"||Array.isArray(e)}const j_=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],P_=["initial",...j_];function $0(e){return D0(e.animate)||P_.some(t=>jh(e[t]))}function z$(e){return!!($0(e)||e.variants)}function Hie(e,t,n){for(const r in t){const o=t[r],i=n[r];if(no(o))e.addValue(r,o);else if(no(i))e.addValue(r,lf(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=e.getStaticValue(r);e.addValue(r,lf(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const n5=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Hy={};function L$(e){Hy=e}function Kie(){return Hy}class Gie{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=__,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=po.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,Ln.render(this.render,!1,!0))};const{latestValues:u,renderState:f}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=f,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=c,this.blockInitialAnimation=!!i,this.isControllingVariants=$0(n),this.isVariantNode=z$(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in p){const b=p[g];u[g]!==void 0&&no(b)&&b.set(u[g])}}mount(t){this.current=t,Bie.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((n,r)=>this.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(I$.current||qie(),this.shouldReduceMotion=rx.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Xa(this.notifyUpdate),Xa(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 n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Nf.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Ln.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Hy){const n=Hy[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Or()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<n5.length;r++){const o=n5[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,a=t[i];a&&(this.propEventSubscriptions[o]=this.on(o,a))}this.prevMotionValues=Hie(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 n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=lf(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(VD(r)||BD(r))?r=parseFloat(r):!Uie(r)&&Qa.test(n)&&(r=k$(t,n)),this.setBaseTarget(t,no(r)?r.get():r)),no(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=R_(this.props,n,this.presenceContext?.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!no(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new h_),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){k_.render(this.render)}}class ul{constructor(t){this.isMounted=!1,this.node=t}update(){}}class F$ extends Gie{constructor(){super(...arguments),this.KeyframeResolver=Mie}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;no(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function U$({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Zie({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Wie(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Z1(e){return e===void 0||e===1}function ox({scale:e,scaleX:t,scaleY:n}){return!Z1(e)||!Z1(t)||!Z1(n)}function Kl(e){return ox(e)||V$(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function V$(e){return r5(e.x)||r5(e.y)}function r5(e){return e&&e!=="0%"}function Ky(e,t,n){const r=e-n,o=t*r;return n+o}function o5(e,t,n,r,o){return o!==void 0&&(e=Ky(e,o,r)),Ky(e,n,r)+t}function sx(e,t=0,n=1,r,o){e.min=o5(e.min,t,n,r,o),e.max=o5(e.max,t,n,r,o)}function q$(e,{x:t,y:n}){sx(e.x,t.translate,t.scale,t.originPoint),sx(e.y,n.translate,n.scale,n.originPoint)}const s5=.999999999999,i5=1.0000000000001;function Yie(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,a;for(let c=0;c<o;c++){i=n[c],a=i.projectionDelta;const{visualElement:u}=i.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Iu(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,q$(e,a)),r&&Kl(i.latestValues)&&Iu(e,i.latestValues))}t.x<i5&&t.x>s5&&(t.x=1),t.y<i5&&t.y>s5&&(t.y=1)}function $u(e,t){e.min=e.min+t,e.max=e.max+t}function a5(e,t,n,r,o=.5){const i=Xn(e.min,e.max,o);sx(e,t,n,i,r)}function Iu(e,t){a5(e.x,t.x,t.scaleX,t.scale,t.originX),a5(e.y,t.y,t.scaleY,t.scale,t.originY)}function B$(e,t){return U$(Wie(e.getBoundingClientRect(),t))}function Xie(e,t,n){const r=B$(e,n),{scroll:o}=t;return o&&($u(r.x,o.offset.x),$u(r.y,o.offset.y)),r}const Qie={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Jie=Pf.length;function eae(e,t,n){let r="",o=!0;for(let i=0;i<Jie;i++){const a=Pf[i],c=e[a];if(c===void 0)continue;let u=!0;if(typeof c=="number"?u=c===(a.startsWith("scale")?1:0):u=parseFloat(c)===0,!u||n){const f=M$(c,A_[a]);if(!u){o=!1;const h=Qie[a]||a;r+=`${h}(${f}) `}n&&(t[a]=f)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function N_(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=!1,c=!1;for(const u in t){const f=t[u];if(Nf.has(u)){a=!0;continue}else if(o$(u)){o[u]=f;continue}else{const h=M$(f,A_[u]);u.startsWith("origin")?(c=!0,i[u]=h):r[u]=h}}if(t.transform||(a||n?r.transform=eae(t,e.transform,n):r.transform&&(r.transform="none")),c){const{originX:u="50%",originY:f="50%",originZ:h=0}=i;r.transformOrigin=`${u} ${f} ${h}`}}function H$(e,{style:t,vars:n},r,o){const i=e.style;let a;for(a in t)i[a]=t[a];o?.applyProjectionStyles(i,r);for(a in n)i.setProperty(a,n[a])}function l5(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const qd={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Qe.test(e))e=parseFloat(e);else return e;const n=l5(e,t.target.x),r=l5(e,t.target.y);return`${n}% ${r}%`}},tae={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Qa.parse(e);if(o.length>5)return r;const i=Qa.createTransformer(e),a=typeof o[0]!="number"?1:0,c=n.x.scale*t.x,u=n.y.scale*t.y;o[0+a]/=c,o[1+a]/=u;const f=Xn(c,u,.5);return typeof o[2+a]=="number"&&(o[2+a]/=f),typeof o[3+a]=="number"&&(o[3+a]/=f),i(o)}},ix={borderRadius:{...qd,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:qd,borderTopRightRadius:qd,borderBottomLeftRadius:qd,borderBottomRightRadius:qd,boxShadow:tae};function K$(e,{layout:t,layoutId:n}){return Nf.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ix[e]||e==="opacity")}function D_(e,t,n){const r=e.style,o=t?.style,i={};if(!r)return i;for(const a in r)(no(r[a])||o&&no(o[a])||K$(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}function nae(e){return window.getComputedStyle(e)}class rae extends F${constructor(){super(...arguments),this.type="html",this.renderInstance=H$}readValueFromInstance(t,n){if(Nf.has(n))return this.projection?.isProjecting?Gw(n):jse(t,n);{const r=nae(t),o=(o$(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return B$(t,n)}build(t,n,r){N_(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return D_(t,n,r)}}const oae={offset:"stroke-dashoffset",array:"stroke-dasharray"},sae={offset:"strokeDashoffset",array:"strokeDasharray"};function iae(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?oae:sae;e[i.offset]=Qe.transform(-r);const a=Qe.transform(t),c=Qe.transform(n);e[i.array]=`${a} ${c}`}const aae=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function G$(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:a=0,...c},u,f,h){if(N_(e,c,f),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:g}=e;p.transform&&(g.transform=p.transform,delete p.transform),(g.transform||p.transformOrigin)&&(g.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),g.transform&&(g.transformBox=h?.transformBox??"fill-box",delete p.transformBox);for(const b of aae)p[b]!==void 0&&(g[b]=p[b],delete p[b]);t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),o!==void 0&&iae(p,o,i,a,!1)}const Z$=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"]),W$=e=>typeof e=="string"&&e.toLowerCase()==="svg";function lae(e,t,n,r){H$(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Z$.has(o)?o:O_(o),t.attrs[o])}function Y$(e,t,n){const r=D_(e,t,n);for(const o in e)if(no(e[o])||no(t[o])){const i=Pf.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}class cae extends F${constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Or}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Nf.has(n)){const r=A$(n);return r&&r.default||0}return n=Z$.has(n)?n:O_(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Y$(t,n,r)}build(t,n,r){G$(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){lae(t,n,r,o)}mount(t){this.isSVGTag=W$(t.tagName),super.mount(t)}}const uae=P_.length;function X$(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?X$(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<uae;n++){const r=P_[n],o=e.props[r];(jh(o)||o===!1)&&(t[r]=o)}return t}function Q$(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const fae=[...j_].reverse(),dae=j_.length;function hae(e){return t=>Promise.all(t.map(({animation:n,options:r})=>wie(e,n,r)))}function pae(e){let t=hae(e),n=c5(),r=!0;const o=u=>(f,h)=>{const p=qu(e,h,u==="exit"?e.presenceContext?.custom:void 0);if(p){const{transition:g,transitionEnd:b,...y}=p;f={...f,...y,...b}}return f};function i(u){t=u(e)}function a(u){const{props:f}=e,h=X$(e.parent)||{},p=[],g=new Set;let b={},y=1/0;for(let w=0;w<dae;w++){const T=fae[w],v=n[T],_=f[T]!==void 0?f[T]:h[T],S=jh(_),C=T===u?v.isActive:null;C===!1&&(y=w);let E=_===h[T]&&_!==f[T]&&S;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),v.protectedKeys={...b},!v.isActive&&C===null||!_&&!v.prevProp||D0(_)||typeof _=="boolean")continue;const O=mae(v.prevProp,_);let j=O||T===u&&v.isActive&&!E&&S||w>y&&S,P=!1;const N=Array.isArray(_)?_:[_];let D=N.reduce(o(T),{});C===!1&&(D={});const{prevResolvedValues:L={}}=v,U={...L,...D},X=q=>{j=!0,g.has(q)&&(P=!0,g.delete(q)),v.needsAnimating[q]=!0;const G=e.getValue(q);G&&(G.liveStyle=!1)};for(const q in U){const G=D[q],oe=L[q];if(b.hasOwnProperty(q))continue;let ne=!1;Jw(G)&&Jw(oe)?ne=!Q$(G,oe):ne=G!==oe,ne?G!=null?X(q):g.add(q):G!==void 0&&g.has(q)?X(q):v.protectedKeys[q]=!0}v.prevProp=_,v.prevResolvedValues=D,v.isActive&&(b={...b,...D}),r&&e.blockInitialAnimation&&(j=!1);const Q=E&&O;j&&(!Q||P)&&p.push(...N.map(q=>{const G={type:T};if(typeof q=="string"&&r&&!Q&&e.manuallyAnimateOnMount&&e.parent){const{parent:oe}=e,ne=qu(oe,q);if(oe.enteringChildren&&ne){const{delayChildren:$}=ne.transition||{};G.delay=x$(oe.enteringChildren,e,$)}}return{animation:q,options:G}}))}if(g.size){const w={};if(typeof f.initial!="boolean"){const T=qu(e,Array.isArray(f.initial)?f.initial[0]:f.initial);T&&T.transition&&(w.transition=T.transition)}g.forEach(T=>{const v=e.getBaseTarget(T),_=e.getValue(T);_&&(_.liveStyle=!0),w[T]=v??null}),p.push({animation:w})}let x=!!p.length;return r&&(f.initial===!1||f.initial===f.animate)&&!e.manuallyAnimateOnMount&&(x=!1),r=!1,x?t(p):Promise.resolve()}function c(u,f){if(n[u].isActive===f)return Promise.resolve();e.variantChildren?.forEach(p=>p.animationState?.setActive(u,f)),n[u].isActive=f;const h=a(u);for(const p in n)n[p].protectedKeys={};return h}return{animateChanges:a,setActive:c,setAnimateFunction:i,getState:()=>n,reset:()=>{n=c5()}}}function mae(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Q$(t,e):!1}function Fl(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function c5(){return{animate:Fl(!0),whileInView:Fl(),whileHover:Fl(),whileTap:Fl(),whileDrag:Fl(),whileFocus:Fl(),exit:Fl()}}const J$=1e-4,gae=1-J$,yae=1+J$,eI=.01,vae=0-eI,bae=0+eI;function mo(e){return e.max-e.min}function Sae(e,t,n){return Math.abs(e-t)<=n}function u5(e,t,n,r=.5){e.origin=r,e.originPoint=Xn(t.min,t.max,e.origin),e.scale=mo(n)/mo(t),e.translate=Xn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=gae&&e.scale<=yae||isNaN(e.scale))&&(e.scale=1),(e.translate>=vae&&e.translate<=bae||isNaN(e.translate))&&(e.translate=0)}function dh(e,t,n,r){u5(e.x,t.x,n.x,r?r.originX:void 0),u5(e.y,t.y,n.y,r?r.originY:void 0)}function f5(e,t,n){e.min=n.min+t.min,e.max=e.min+mo(t)}function wae(e,t,n){f5(e.x,t.x,n.x),f5(e.y,t.y,n.y)}function d5(e,t,n){e.min=t.min-n.min,e.max=e.min+mo(t)}function Gy(e,t,n){d5(e.x,t.x,n.x),d5(e.y,t.y,n.y)}function h5(e,t,n,r,o){return e-=t,e=Ky(e,1/n,r),o!==void 0&&(e=Ky(e,1/o,r)),e}function xae(e,t=0,n=1,r=.5,o,i=e,a=e){if(ei.test(t)&&(t=parseFloat(t),t=Xn(a.min,a.max,t/100)-a.min),typeof t!="number")return;let c=Xn(i.min,i.max,r);e===i&&(c-=t),e.min=h5(e.min,t,n,c,o),e.max=h5(e.max,t,n,c,o)}function p5(e,t,[n,r,o],i,a){xae(e,t[n],t[r],t[o],t.scale,i,a)}const Eae=["x","scaleX","originX"],_ae=["y","scaleY","originY"];function m5(e,t,n,r){p5(e.x,t,Eae,n?n.x:void 0,r?r.x:void 0),p5(e.y,t,_ae,n?n.y:void 0,r?r.y:void 0)}function g5(e,t){e.min=t.min,e.max=t.max}function Cs(e,t){g5(e.x,t.x),g5(e.y,t.y)}function y5(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function v5(e){return e.translate===0&&e.scale===1}function tI(e){return v5(e.x)&&v5(e.y)}function b5(e,t){return e.min===t.min&&e.max===t.max}function Cae(e,t){return b5(e.x,t.x)&&b5(e.y,t.y)}function S5(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function nI(e,t){return S5(e.x,t.x)&&S5(e.y,t.y)}function w5(e){return mo(e.x)/mo(e.y)}function x5(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function os(e){return[e("x"),e("y")]}function Tae(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=n?.z||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:f,rotate:h,rotateX:p,rotateY:g,skewX:b,skewY:y}=n;f&&(r=`perspective(${f}px) ${r}`),h&&(r+=`rotate(${h}deg) `),p&&(r+=`rotateX(${p}deg) `),g&&(r+=`rotateY(${g}deg) `),b&&(r+=`skewX(${b}deg) `),y&&(r+=`skewY(${y}deg) `)}const c=e.x.scale*t.x,u=e.y.scale*t.y;return(c!==1||u!==1)&&(r+=`scale(${c}, ${u})`),r||"none"}const rI=["TopLeft","TopRight","BottomLeft","BottomRight"],Rae=rI.length,E5=e=>typeof e=="string"?parseFloat(e):e,_5=e=>typeof e=="number"||Qe.test(e);function Oae(e,t,n,r,o,i){o?(e.opacity=Xn(0,n.opacity??1,Aae(r)),e.opacityExit=Xn(t.opacity??1,0,kae(r))):i&&(e.opacity=Xn(t.opacity??1,n.opacity??1,r));for(let a=0;a<Rae;a++){const c=`border${rI[a]}Radius`;let u=C5(t,c),f=C5(n,c);if(u===void 0&&f===void 0)continue;u||(u=0),f||(f=0),u===0||f===0||_5(u)===_5(f)?(e[c]=Math.max(Xn(E5(u),E5(f),r),0),(ei.test(f)||ei.test(u))&&(e[c]+="%")):e[c]=f}(t.rotate||n.rotate)&&(e.rotate=Xn(t.rotate||0,n.rotate||0,r))}function C5(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Aae=oI(0,.5,QD),kae=oI(.5,.95,ds);function oI(e,t,n){return r=>r<e?0:r>t?1:n(Ah(e,t,r))}function Mae(e,t){const n=po.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Xa(r),e(i-t))};return Ln.setup(r,!0),()=>Xa(r)}function Ph(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function cy(e){return no(e)?e.get():e}function jae(e,t,n){const r=no(e)?e:lf(e);return r.start(T_("",r,t,n)),r.animation}const Pae=(e,t)=>e.depth-t.depth;class Nae{constructor(){this.children=[],this.isDirty=!1}add(t){c_(this.children,t),this.isDirty=!0}remove(t){u_(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Pae),this.isDirty=!1,this.children.forEach(t)}}class Dae{constructor(){this.members=[]}add(t){c_(this.members,t),t.scheduleRender()}remove(t){if(u_(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const uy={hasAnimatedSinceResize:!0,hasEverUpdated:!1},W1=["","X","Y","Z"],$ae=1e3;let Iae=0;function Y1(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function sI(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=C$(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ln,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&sI(r)}function iI({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},c=t?.()){this.id=Iae++,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(Fae),this.nodes.forEach(Bae),this.nodes.forEach(Hae),this.nodes.forEach(Uae)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new Nae)}addEventListener(a,c){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new h_),this.eventHandlers.get(a).add(c)}notifyListeners(a,...c){const u=this.eventHandlers.get(a);u&&u.notify(...c)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=$$(a)&&!Lie(a),this.instance=a;const{layoutId:c,layout:u,visualElement:f}=this.options;if(f&&!f.current&&f.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||c)&&(this.isLayoutDirty=!0),e){let h,p=0;const g=()=>this.root.updateBlockedByResize=!1;Ln.read(()=>{p=window.innerWidth}),e(a,()=>{const b=window.innerWidth;b!==p&&(p=b,this.root.updateBlockedByResize=!0,h&&h(),h=Mae(g,250),uy.hasAnimatedSinceResize&&(uy.hasAnimatedSinceResize=!1,this.nodes.forEach(O5)))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&f&&(c||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:p,hasRelativeLayoutChanged:g,layout:b})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||f.getDefaultTransition()||Yae,{onLayoutAnimationStart:x,onLayoutAnimationComplete:w}=f.getProps(),T=!this.targetLayout||!nI(this.targetLayout,b),v=!p&&g;if(this.options.layoutRoot||this.resumeFrom||v||p&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const _={...C_(y,"layout"),onPlay:x,onComplete:w};(f.shouldReduceMotion||this.options.layoutRoot)&&(_.delay=0,_.type=!1),this.startAnimation(_),this.setAnimationOrigin(h,v)}else p||O5(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=b})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Xa(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(Kae),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&sI(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h<this.path.length;h++){const p=this.path[h];p.shouldResetTransform=!0,p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:c,layout:u}=this.options;if(c===void 0&&!u)return;const f=this.getTransformTemplate();this.prevTransformTemplateValue=f?f(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(T5);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(R5);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(qae),this.nodes.forEach(zae),this.nodes.forEach(Lae)):this.nodes.forEach(R5),this.clearAllSnapshots();const c=po.now();Hr.delta=ri(0,1e3/60,c-Hr.timestamp),Hr.timestamp=c,Hr.isProcessing=!0,U1.update.process(Hr),U1.preRender.process(Hr),U1.render.process(Hr),Hr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,k_.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Vae),this.sharedNodes.forEach(Gae)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ln.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ln.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!mo(this.snapshot.measuredBox.x)&&!mo(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 u=0;u<this.path.length;u++)this.path[u].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Or(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(c=!1),c&&this.instance){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!tI(this.projectionDelta),u=this.getTransformTemplate(),f=u?u(this.latestValues,""):void 0,h=f!==this.prevTransformTemplateValue;a&&this.instance&&(c||Kl(this.latestValues)||h)&&(o(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const c=this.measurePageBox();let u=this.removeElementScroll(c);return a&&(u=this.removeTransform(u)),Xae(u),{animationId:this.root.animationId,measuredBox:c,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return Or();const c=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Qae))){const{scroll:f}=this.root;f&&($u(c.x,f.offset.x),$u(c.y,f.offset.y))}return c}removeElementScroll(a){const c=Or();if(Cs(c,a),this.scroll?.wasRoot)return c;for(let u=0;u<this.path.length;u++){const f=this.path[u],{scroll:h,options:p}=f;f!==this.root&&h&&p.layoutScroll&&(h.wasRoot&&Cs(c,a),$u(c.x,h.offset.x),$u(c.y,h.offset.y))}return c}applyTransform(a,c=!1){const u=Or();Cs(u,a);for(let f=0;f<this.path.length;f++){const h=this.path[f];!c&&h.options.layoutScroll&&h.scroll&&h!==h.root&&Iu(u,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),Kl(h.latestValues)&&Iu(u,h.latestValues)}return Kl(this.latestValues)&&Iu(u,this.latestValues),u}removeTransform(a){const c=Or();Cs(c,a);for(let u=0;u<this.path.length;u++){const f=this.path[u];if(!f.instance||!Kl(f.latestValues))continue;ox(f.latestValues)&&f.updateSnapshot();const h=Or(),p=f.measurePageBox();Cs(h,p),m5(c,f.latestValues,f.snapshot?f.snapshot.layoutBox:void 0,h)}return Kl(this.latestValues)&&m5(c,this.latestValues),c}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Hr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(a||u&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:p}=this.options;if(!this.layout||!(h||p))return;this.resolvedRelativeTargetAt=Hr.timestamp;const g=this.getClosestProjectingParent();g&&this.linkedParentVersion!==g.layoutVersion&&!g.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(g&&g.layout?this.createRelativeTarget(g,this.layout.layoutBox,g.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Or(),this.targetWithTransforms=Or()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),wae(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Cs(this.target,this.layout.layoutBox),q$(this.target,this.targetDelta)):Cs(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?this.createRelativeTarget(g,this.target,g.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||ox(this.parent.latestValues)||V$(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,c,u){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Or(),this.relativeTargetOrigin=Or(),Gy(this.relativeTargetOrigin,c,u),Cs(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const a=this.getLead(),c=!!this.resumingFrom||this!==a;let u=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Hr.timestamp&&(u=!1),u)return;const{layout:f,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||h))return;Cs(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,g=this.treeScale.y;Yie(this.layoutCorrected,this.treeScale,this.path,c),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Or());const{target:b}=a;if(!b){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(y5(this.prevProjectionDelta.x,this.projectionDelta.x),y5(this.prevProjectionDelta.y,this.projectionDelta.y)),dh(this.projectionDelta,this.layoutCorrected,b,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==g||!x5(this.projectionDelta.x,this.prevProjectionDelta.x)||!x5(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",b))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Du(),this.projectionDelta=Du(),this.projectionDeltaWithTransform=Du()}setAnimationOrigin(a,c=!1){const u=this.snapshot,f=u?u.latestValues:{},h={...this.latestValues},p=Du();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const g=Or(),b=u?u.source:void 0,y=this.layout?this.layout.source:void 0,x=b!==y,w=this.getStack(),T=!w||w.members.length<=1,v=!!(x&&!T&&this.options.crossfade===!0&&!this.path.some(Wae));this.animationProgress=0;let _;this.mixTargetDelta=S=>{const C=S/1e3;A5(p.x,a.x,C),A5(p.y,a.y,C),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Gy(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Zae(this.relativeTarget,this.relativeTargetOrigin,g,C),_&&Cae(this.relativeTarget,_)&&(this.isProjectionDirty=!1),_||(_=Or()),Cs(_,this.relativeTarget)),x&&(this.animationValues=h,Oae(h,f,this.latestValues,C,v,T)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Xa(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ln.update(()=>{uy.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=lf(0)),this.currentAnimation=jae(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),a.onUpdate&&a.onUpdate(c)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta($ae),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:c,target:u,layout:f,latestValues:h}=a;if(!(!c||!u||!f)){if(this!==a&&this.layout&&f&&aI(this.options.animationType,this.layout.layoutBox,f.layoutBox)){u=this.target||Or();const p=mo(this.layout.layoutBox.x);u.x.min=a.target.x.min,u.x.max=u.x.min+p;const g=mo(this.layout.layoutBox.y);u.y.min=a.target.y.min,u.y.max=u.y.min+g}Cs(c,u),Iu(c,h),dh(this.projectionDeltaWithTransform,this.layoutCorrected,c,h)}}registerSharedNode(a,c){this.sharedNodes.has(a)||this.sharedNodes.set(a,new Dae),this.sharedNodes.get(a).add(c);const f=c.options.initialPromotionConfig;c.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(c):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:c,preserveFollowOpacity:u}={}){const f=this.getStack();f&&f.promote(this,u),a&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let c=!1;const{latestValues:u}=a;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(c=!0),!c)return;const f={};u.z&&Y1("z",a,f,this.animationValues);for(let h=0;h<W1.length;h++)Y1(`rotate${W1[h]}`,a,f,this.animationValues),Y1(`skew${W1[h]}`,a,f,this.animationValues);a.render();for(const h in f)a.setStaticValue(h,f[h]),this.animationValues&&(this.animationValues[h]=f[h]);a.scheduleRender()}applyProjectionStyles(a,c){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=cy(c?.pointerEvents)||"",a.transform=u?u(this.latestValues,""):"none";return}const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=cy(c?.pointerEvents)||""),this.hasProjected&&!Kl(this.latestValues)&&(a.transform=u?u({},""):"none",this.hasProjected=!1);return}a.visibility="";const h=f.animationValues||f.latestValues;this.applyTransformsToTarget();let p=Tae(this.projectionDeltaWithTransform,this.treeScale,h);u&&(p=u(h,p)),a.transform=p;const{x:g,y:b}=this.projectionDelta;a.transformOrigin=`${g.origin*100}% ${b.origin*100}% 0`,f.animationValues?a.opacity=f===this?h.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:a.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const y in ix){if(h[y]===void 0)continue;const{correct:x,applyTo:w,isCSSVariable:T}=ix[y],v=p==="none"?h[y]:x(h[y],f);if(w){const _=w.length;for(let S=0;S<_;S++)a[w[S]]=v}else T?this.options.visualElement.renderState.vars[y]=v:a[y]=v}this.options.layoutId&&(a.pointerEvents=f===this?cy(c?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(T5),this.root.sharedNodes.clear()}}}function zae(e){e.updateLayout()}function Lae(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;o==="size"?os(h=>{const p=i?t.measuredBox[h]:t.layoutBox[h],g=mo(p);p.min=n[h].min,p.max=p.min+g}):aI(o,t.layoutBox,n)&&os(h=>{const p=i?t.measuredBox[h]:t.layoutBox[h],g=mo(n[h]);p.max=p.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+g)});const a=Du();dh(a,n,t.layoutBox);const c=Du();i?dh(c,e.applyTransform(r,!0),t.measuredBox):dh(c,n,t.layoutBox);const u=!tI(a);let f=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:p,layout:g}=h;if(p&&g){const b=Or();Gy(b,t.layoutBox,p.layoutBox);const y=Or();Gy(y,n,g.layoutBox),nI(b,y)||(f=!0),h.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=b,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:c,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:f})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function Fae(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 Uae(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Vae(e){e.clearSnapshot()}function T5(e){e.clearMeasurements()}function R5(e){e.isLayoutDirty=!1}function qae(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function O5(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Bae(e){e.resolveTargetDelta()}function Hae(e){e.calcProjection()}function Kae(e){e.resetSkewAndRotation()}function Gae(e){e.removeLeadSnapshot()}function A5(e,t,n){e.translate=Xn(t.translate,0,n),e.scale=Xn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function k5(e,t,n,r){e.min=Xn(t.min,n.min,r),e.max=Xn(t.max,n.max,r)}function Zae(e,t,n,r){k5(e.x,t.x,n.x,r),k5(e.y,t.y,n.y,r)}function Wae(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Yae={duration:.45,ease:[.4,0,.1,1]},M5=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),j5=M5("applewebkit/")&&!M5("chrome/")?Math.round:ds;function P5(e){e.min=j5(e.min),e.max=j5(e.max)}function Xae(e){P5(e.x),P5(e.y)}function aI(e,t,n){return e==="position"||e==="preserve-aspect"&&!Sae(w5(t),w5(n),.2)}function Qae(e){return e!==e.root&&e.scroll?.wasRoot}const Jae=iI({attachResizeListener:(e,t)=>Ph(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),X1={current:void 0},lI=iI({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!X1.current){const e=new Jae({});e.mount(window),e.setOptions({layoutScroll:!0}),X1.current=e}return X1.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),cI=A.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function ele(e=!0){const t=A.useContext(l_);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=A.useId();A.useEffect(()=>{if(e)return o(i)},[e]);const a=A.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const uI=A.createContext({strict:!1}),N5={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"]};let D5=!1;function tle(){if(D5)return;const e={};for(const t in N5)e[t]={isEnabled:n=>N5[t].some(r=>!!n[r])};L$(e),D5=!0}function fI(){return tle(),Kie()}function nle(e){const t=fI();for(const n in e)t[n]={...t[n],...e[n]};L$(t)}const rle=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 Zy(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||rle.has(e)}let dI=e=>!Zy(e);function ole(e){typeof e=="function"&&(dI=t=>t.startsWith("on")?!Zy(t):e(t))}try{ole(require("@emotion/is-prop-valid").default)}catch{}function sle(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(dI(o)||n===!0&&Zy(o)||!t&&!Zy(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const I0=A.createContext({});function ile(e,t){if($0(e)){const{initial:n,animate:r}=e;return{initial:n===!1||jh(n)?n:void 0,animate:jh(r)?r:void 0}}return e.inherit!==!1?t:{}}function ale(e){const{initial:t,animate:n}=ile(e,A.useContext(I0));return A.useMemo(()=>({initial:t,animate:n}),[$5(t),$5(n)])}function $5(e){return Array.isArray(e)?e.join(" "):e}const $_=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function hI(e,t,n){for(const r in t)!no(t[r])&&!K$(r,n)&&(e[r]=t[r])}function lle({transformTemplate:e},t){return A.useMemo(()=>{const n=$_();return N_(n,t,e),Object.assign({},n.vars,n.style)},[t])}function cle(e,t){const n=e.style||{},r={};return hI(r,n,e),Object.assign(r,lle(e,t)),r}function ule(e,t){const n={},r=cle(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const pI=()=>({...$_(),attrs:{}});function fle(e,t,n,r){const o=A.useMemo(()=>{const i=pI();return G$(i,t,W$(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};hI(i,e.style,e),o.style={...i,...o.style}}return o}const dle=["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 I_(e){return typeof e!="string"||e.includes("-")?!1:!!(dle.indexOf(e)>-1||/[A-Z]/u.test(e))}function hle(e,t,n,{latestValues:r},o,i=!1,a){const u=(a??I_(e)?fle:ule)(t,r,o,e),f=sle(t,typeof e=="string",i),h=e!==A.Fragment?{...f,...u,ref:n}:{},{children:p}=t,g=A.useMemo(()=>no(p)?p.get():p,[p]);return A.createElement(e,{...h,children:g})}function ple({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:mle(n,r,o,e),renderState:t()}}function mle(e,t,n,r){const o={},i=r(e,{});for(const g in i)o[g]=cy(i[g]);let{initial:a,animate:c}=e;const u=$0(e),f=z$(e);t&&f&&!u&&e.inherit!==!1&&(a===void 0&&(a=t.initial),c===void 0&&(c=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const p=h?c:a;if(p&&typeof p!="boolean"&&!D0(p)){const g=Array.isArray(p)?p:[p];for(let b=0;b<g.length;b++){const y=R_(e,g[b]);if(y){const{transitionEnd:x,transition:w,...T}=y;for(const v in T){let _=T[v];if(Array.isArray(_)){const S=h?_.length-1:0;_=_[S]}_!==null&&(o[v]=_)}for(const v in x)o[v]=x[v]}}}return o}const mI=e=>(t,n)=>{const r=A.useContext(I0),o=A.useContext(l_),i=()=>ple(e,t,r,o);return n?i():Ooe(i)},gle=mI({scrapeMotionValuesFromProps:D_,createRenderState:$_}),yle=mI({scrapeMotionValuesFromProps:Y$,createRenderState:pI}),vle=Symbol.for("motionComponentSymbol");function ble(e,t,n){const r=A.useRef(n);A.useInsertionEffect(()=>{r.current=n});const o=A.useRef(null);return A.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const a=r.current;if(typeof a=="function")if(i){const c=a(i);typeof c=="function"&&(o.current=c)}else o.current?(o.current(),o.current=null):a(i);else a&&(a.current=i)},[t])}const gI=A.createContext({});function eh(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Sle(e,t,n,r,o,i){const{visualElement:a}=A.useContext(I0),c=A.useContext(uI),u=A.useContext(l_),f=A.useContext(cI).reducedMotion,h=A.useRef(null);r=r||c.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:a,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:f,isSVG:i}));const p=h.current,g=A.useContext(gI);p&&!p.projection&&o&&(p.type==="html"||p.type==="svg")&&wle(h.current,n,o,g);const b=A.useRef(!1);A.useInsertionEffect(()=>{p&&b.current&&p.update(n,u)});const y=n[_$],x=A.useRef(!!y&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return Aoe(()=>{p&&(b.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),x.current&&p.animationState&&p.animationState.animateChanges())}),A.useEffect(()=>{p&&(!x.current&&p.animationState&&p.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),x.current=!1),p.enteringChildren=void 0)}),p}function wle(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:c,layoutScroll:u,layoutRoot:f,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:yI(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||c&&eh(c),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:u,layoutRoot:f})}function yI(e){if(e)return e.options.allowProjection!==!1?e.projection:yI(e.parent)}function Q1(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&nle(r);const i=n?n==="svg":I_(e),a=i?yle:gle;function c(f,h){let p;const g={...A.useContext(cI),...f,layoutId:xle(f)},{isStatic:b}=g,y=ale(f),x=a(f,b);if(!b&&UD){Ele();const w=_le(g);p=w.MeasureLayout,y.visualElement=Sle(e,x,g,o,w.ProjectionNode,i)}return M.jsxs(I0.Provider,{value:y,children:[p&&y.visualElement?M.jsx(p,{visualElement:y.visualElement,...g}):null,hle(e,f,ble(x,y.visualElement,h),x,b,t,i)]})}c.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const u=A.forwardRef(c);return u[vle]=e,u}function xle({layoutId:e}){const t=A.useContext(FD).id;return t&&e!==void 0?t+"-"+e:e}function Ele(e,t){A.useContext(uI).strict}function _le(e){const t=fI(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function Cle(e,t){if(typeof Proxy>"u")return Q1;const n=new Map,r=(i,a)=>Q1(i,a,e,t),o=(i,a)=>r(i,a);return new Proxy(o,{get:(i,a)=>a==="create"?r:(n.has(a)||n.set(a,Q1(a,void 0,e,t)),n.get(a))})}const Tle=(e,t)=>t.isSVG??I_(e)?new cae(t):new rae(t,{allowProjection:e!==A.Fragment});class Rle extends ul{constructor(t){super(t),t.animationState||(t.animationState=pae(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();D0(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let Ole=0;class Ale extends ul{constructor(){super(...arguments),this.id=Ole++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const kle={animation:{Feature:Rle},exit:{Feature:Ale}};function mp(e){return{point:{x:e.pageX,y:e.pageY}}}const Mle=e=>t=>M_(t)&&e(t,mp(t));function hh(e,t,n,r){return Ph(e,t,Mle(n),r)}const vI=({current:e})=>e?e.ownerDocument.defaultView:null,I5=(e,t)=>Math.abs(e-t);function jle(e,t){const n=I5(e.x,t.x),r=I5(e.y,t.y);return Math.sqrt(n**2+r**2)}const z5=new Set(["auto","scroll"]);class bI{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:c}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=b=>{this.handleScroll(b.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=eS(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,x=jle(b.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!x)return;const{point:w}=b,{timestamp:T}=Hr;this.history.push({...w,timestamp:T});const{onStart:v,onMove:_}=this.handlers;y||(v&&v(this.lastMoveEvent,b),this.startEvent=this.lastMoveEvent),_&&_(this.lastMoveEvent,b)},this.handlePointerMove=(b,y)=>{this.lastMoveEvent=b,this.lastMoveEventInfo=J1(y,this.transformPagePoint),Ln.update(this.updatePoint,!0)},this.handlePointerUp=(b,y)=>{this.end();const{onEnd:x,onSessionEnd:w,resumeAnimation:T}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&T&&T(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=eS(b.type==="pointercancel"?this.lastMoveEventInfo:J1(y,this.transformPagePoint),this.history);this.startEvent&&x&&x(b,v),w&&w(b,v)},!M_(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=o||window;const u=mp(t),f=J1(u,this.transformPagePoint),{point:h}=f,{timestamp:p}=Hr;this.history=[{...h,timestamp:p}];const{onSessionStart:g}=n;g&&g(t,eS(f,this.history)),this.removeListeners=dp(hh(this.contextWindow,"pointermove",this.handlePointerMove),hh(this.contextWindow,"pointerup",this.handlePointerUp),hh(this.contextWindow,"pointercancel",this.handlePointerUp)),c&&this.startScrollTracking(c)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(z5.has(r.overflowX)||z5.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:o.x-n.x,y:o.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,o),Ln.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Xa(this.updatePoint)}}function J1(e,t){return t?{point:t(e.point)}:e}function L5(e,t){return{x:e.x-t.x,y:e.y-t.y}}function eS({point:e},t){return{point:e,delta:L5(e,SI(t)),offset:L5(e,Ple(t)),velocity:Nle(t,.1)}}function Ple(e){return e[0]}function SI(e){return e[e.length-1]}function Nle(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=SI(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>zi(t)));)n--;if(!r)return{x:0,y:0};const i=cs(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Dle(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Xn(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Xn(n,e,r.max):Math.min(e,n)),e}function F5(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function $le(e,{top:t,left:n,bottom:r,right:o}){return{x:F5(e.x,n,o),y:F5(e.y,t,r)}}function U5(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Ile(e,t){return{x:U5(e.x,t.x),y:U5(e.y,t.y)}}function zle(e,t){let n=.5;const r=mo(e),o=mo(t);return o>r?n=Ah(t.min,t.max-r,e.min):r>o&&(n=Ah(e.min,e.max-o,t.min)),ri(0,1,n)}function Lle(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const ax=.35;function Fle(e=ax){return e===!1?e=0:e===!0&&(e=ax),{x:V5(e,"left","right"),y:V5(e,"top","bottom")}}function V5(e,t,n){return{min:q5(e,t),max:q5(e,n)}}function q5(e,t){return typeof e=="number"?e:e[t]||0}const Ule=new WeakMap;class Vle{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=Or(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const i=p=>{n?(this.stopAnimation(),this.snapToCursor(mp(p).point)):this.pauseAnimation()},a=(p,g)=>{this.stopAnimation();const{drag:b,dragPropagation:y,onDragStart:x}=this.getProps();if(b&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Nie(b),!this.openDragLock))return;this.latestPointerEvent=p,this.latestPanInfo=g,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),os(T=>{let v=this.getAxisMotionValue(T).get()||0;if(ei.test(v)){const{projection:_}=this.visualElement;if(_&&_.layout){const S=_.layout.layoutBox[T];S&&(v=mo(S)*(parseFloat(v)/100))}}this.originPoint[T]=v}),x&&Ln.postRender(()=>x(p,g)),ex(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},c=(p,g)=>{this.latestPointerEvent=p,this.latestPanInfo=g;const{dragPropagation:b,dragDirectionLock:y,onDirectionLock:x,onDrag:w}=this.getProps();if(!b&&!this.openDragLock)return;const{offset:T}=g;if(y&&this.currentDirection===null){this.currentDirection=qle(T),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",g.point,T),this.updateAxis("y",g.point,T),this.visualElement.render(),w&&w(p,g)},u=(p,g)=>{this.latestPointerEvent=p,this.latestPanInfo=g,this.stop(p,g),this.latestPointerEvent=null,this.latestPanInfo=null},f=()=>os(p=>this.getAnimationState(p)==="paused"&&this.getAxisMotionValue(p).animation?.play()),{dragSnapToOrigin:h}=this.getProps();this.panSession=new bI(t,{onSessionStart:i,onStart:a,onMove:c,onSessionEnd:u,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:h,distanceThreshold:r,contextWindow:vI(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!o||!r)return;const{velocity:a}=o;this.startAnimation(a);const{onDragEnd:c}=this.getProps();c&&Ln.postRender(()=>c(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Ig(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Dle(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&eh(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=$le(r.layoutBox,t):this.constraints=!1,this.elastic=Fle(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&os(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=Lle(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!eh(t))return!1;const r=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=Xie(r,o.root,this.visualElement.getTransformPagePoint());let a=Ile(o.layout.layoutBox,i);if(n){const c=n(Zie(a));this.hasMutatedConstraints=!!c,c&&(a=U$(c))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:c}=this.getProps(),u=this.constraints||{},f=os(h=>{if(!Ig(h,n,this.currentDirection))return;let p=u&&u[h]||{};a&&(p={min:0,max:0});const g=o?200:1e6,b=o?40:1e7,y={type:"inertia",velocity:r?t[h]:0,bounceStiffness:g,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...i,...p};return this.startAxisValueAnimation(h,y)});return Promise.all(f).then(c)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return ex(this.visualElement,t),r.start(T_(t,r,0,n,this.visualElement,!1))}stopAnimation(){os(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){os(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){os(n=>{const{drag:r}=this.getProps();if(!Ig(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:c}=o.layout.layoutBox[n],u=i.get()||0;i.set(t[n]-Xn(a,c,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!eh(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};os(a=>{const c=this.getAxisMotionValue(a);if(c&&this.constraints!==!1){const u=c.get();o[a]=zle({min:u,max:u},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),os(a=>{if(!Ig(a,t,null))return;const c=this.getAxisMotionValue(a),{min:u,max:f}=this.constraints[a];c.set(Xn(u,f,o[a]))})}addListeners(){if(!this.visualElement.current)return;Ule.set(this.visualElement,this);const t=this.visualElement.current,n=hh(t,"pointerdown",u=>{const{drag:f,dragListener:h=!0}=this.getProps();f&&h&&!D$(u.target)&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();eh(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Ln.read(r);const a=Ph(window,"resize",()=>this.scalePositionWithinConstraints()),c=o.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:f})=>{this.isDragging&&f&&(os(h=>{const p=this.getAxisMotionValue(h);p&&(this.originPoint[h]+=u[h].translate,p.set(p.get()+u[h].translate))}),this.visualElement.render())}));return()=>{a(),n(),i(),c&&c()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:a=ax,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:c}}}function Ig(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function qle(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Ble extends ul{constructor(t){super(t),this.removeGroupControls=ds,this.removeListeners=ds,this.controls=new Vle(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ds}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const B5=e=>(t,n)=>{e&&Ln.postRender(()=>e(t,n))};class Hle extends ul{constructor(){super(...arguments),this.removePointerDownListener=ds}onPointerDown(t){this.session=new bI(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:vI(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:B5(t),onStart:B5(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&Ln.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=hh(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let tS=!1;class Kle extends A.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),tS&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),uy.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:a}=r;return a&&(a.isPresent=i,tS=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||Ln.postRender(()=>{const c=a.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),k_.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;tS=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function wI(e){const[t,n]=ele(),r=A.useContext(FD);return M.jsx(Kle,{...e,layoutGroup:r,switchLayoutGroup:A.useContext(gI),isPresent:t,safeToRemove:n})}const Gle={pan:{Feature:Hle},drag:{Feature:Ble,ProjectionNode:lI,MeasureLayout:wI}};function H5(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&Ln.postRender(()=>i(t,mp(t)))}class Zle extends ul{mount(){const{current:t}=this.node;t&&(this.unmount=Die(t,(n,r)=>(H5(this.node,r,"Start"),o=>H5(this.node,o,"End"))))}unmount(){}}class Wle extends ul{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=dp(Ph(this.node.current,"focus",()=>this.onFocus()),Ph(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function K5(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&Ln.postRender(()=>i(t,mp(t)))}class Yle extends ul{mount(){const{current:t}=this.node;t&&(this.unmount=zie(t,(n,r)=>(K5(this.node,r,"Start"),(o,{success:i})=>K5(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const lx=new WeakMap,nS=new WeakMap,Xle=e=>{const t=lx.get(e.target);t&&t(e)},Qle=e=>{e.forEach(Xle)};function Jle({root:e,...t}){const n=e||document;nS.has(n)||nS.set(n,{});const r=nS.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(Qle,{root:e,...t})),r[o]}function ece(e,t,n){const r=Jle(t);return lx.set(e,n),r.observe(e),()=>{lx.delete(e),r.unobserve(e)}}const tce={some:0,all:1};class nce extends ul{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:tce[o]},c=u=>{const{isIntersecting:f}=u;if(this.isInView===f||(this.isInView=f,i&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:h,onViewportLeave:p}=this.node.getProps(),g=f?h:p;g&&g(u)};return ece(this.node.current,a,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(rce(t,n))&&this.startObserver()}unmount(){}}function rce({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const oce={inView:{Feature:nce},tap:{Feature:Yle},focus:{Feature:Wle},hover:{Feature:Zle}},sce={layout:{ProjectionNode:lI,MeasureLayout:wI}},ice={...kle,...oce,...Gle,...sce},G5=Cle(ice,Tle),xI=Lo.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 M.jsx("div",{className:Et("absolute h-full w-full inset-0 mask-size-[40px] mask-repeat-[no-repeat] flex items-center justify-center",e),children:M.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:[M.jsx("title",{children:"Background Beams"}),M.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((n,r)=>M.jsx(G5.path,{d:n,stroke:`url(#linearGradient-${r})`,strokeOpacity:"0.4",strokeWidth:"0.5"},`path-${r}`)),M.jsxs("defs",{children:[t.map((n,r)=>M.jsxs(G5.linearGradient,{id:`linearGradient-${r}`,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:[M.jsx("stop",{stopColor:"#000000",stopOpacity:"0"}),M.jsx("stop",{stopColor:"#111111"}),M.jsx("stop",{offset:"32.5%",stopColor:"#666666"}),M.jsx("stop",{offset:"100%",stopColor:"#FFFFFF",stopOpacity:"0"})]},`gradient-${r}`)),M.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:[M.jsx("stop",{offset:"0.0666667",stopColor:"var(--neutral-300)"}),M.jsx("stop",{offset:"0.243243",stopColor:"var(--neutral-300)"}),M.jsx("stop",{offset:"0.43594",stopColor:"white",stopOpacity:"0"})]})]})]})})});xI.displayName="BackgroundBeams";const ace=()=>M.jsxs(M.Fragment,{children:[M.jsx(xI,{className:"absolute inset-0"}),M.jsx("div",{className:"relative z-10 flex-1 flex items-center justify-center",children:M.jsxs("div",{className:"text-center",children:[M.jsx("h1",{className:"text-2xl font-semibold text-foreground mb-2",children:"Welcome to Skybridge"}),M.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose a tool from the sidebar to begin"})]})})]});function Wt(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 lce(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),Wt(e.additionalItems)}function Z5(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 Li="__additional_property",Wy="additionalProperties",Ja="allOf",Xt="anyOf",ms="const",z0="default",z_="dependencies",cce="enum",Zr="__errors",Tn="$id",uce="if",cf="items",fce="_$junk_option_schema_id$_",fy="$name",Pt="oneOf",cx="patternProperties",sn="properties",rS="readonly",EI="required",Yy="submitButtonOptions",Fn="$ref",th="$schema",_I="root",CI="_",dce=["discriminator","propertyName"],W5="formContext",hce="layoutGridLookupMap",L_="__rjsf_additionalProperties",TI="__rjsf_rootSchema",pce="ui:field",F_="ui:widget",za="ui:options",ux="ui:globalOptions",mce="https://json-schema.org/draft/2019-09/schema",dy="https://json-schema.org/draft/2020-12/schema";function ut(e={},t={}){return e?Object.keys(e).filter(n=>n.indexOf("ui:")===0).reduce((n,r)=>{const o=e[r];return r===F_&&Wt(o)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),n):r===za&&Wt(o)?{...n,...o}:{...n,[r.substring(3)]:o}},{...t}):{...t}}function RI(e,t={},n){if(!(e.additionalProperties||e.patternProperties))return!1;const{expandable:r=!0}=ut(t);return r===!1?r:e.maxProperties!==void 0&&n?Object.keys(n).length<e.maxProperties:!0}function fx(e){const t={[Zr]:[],addError(n){this[Zr].push(n)}};if(Array.isArray(e))return e.reduce((n,r,o)=>({...n,[o]:fx(r)}),t);if(Ka(e)){const n=e;return Object.keys(n).reduce((r,o)=>({...r,[o]:fx(n[o])}),t)}return t}function Pn(e,t){return hG(e,t,(n,r)=>{if(typeof n=="function"&&typeof r=="function")return!0})}const gce=Object.prototype;function nh(e){for(const t in e)if(gce.hasOwnProperty.call(e,t))return!1;return!0}const yce=["array","boolean","integer","null","number","object","string"];new Set(yce);const vce=["$defs","definitions","properties","patternProperties","dependencies"];new Set(vce);const bce=["items","allOf","oneOf","anyOf"];new Set(bce);const Sce=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(Sce);function hy(e){return typeof e=="object"}function Ks(e){return hy(e)?nh(e):e===!0}function zu(e,t){return e<t?-1:e>t?1:0}function oS(e,t){const n=e.length;if(n===0)return t;let r=t.length;if(r===0)return e;if(n<r){const i=e;e=t,t=i,r=n}const o=new Set(e);for(let i=0;i<r;i++)o.add(t[i]);return Array.from(o)}function wce(e,t){const n=[];if(e.length===0||t.length===0)return n;if(e.length>t.length){const o=e;e=t,t=o}const r=new Set(t);for(let o=0;o<e.length&&r.size>0;o++){const i=e[o];r.delete(i)&&n.push(i)}return n}function Y5(e){return e.length===0}function sS(e){return(t,n)=>{const r=t.length-n.length;if(r!==0)return r;for(let o=0;o<t.length;o++)if(t[o]!==n[o]){const i=e(t[o],n[o]);if(i!==0)return i}return 0}}function OI(e,{threshold:t=12}={}){return n=>{const r=n.length;if(r===0)return n;if(r<=t){const a=[];let c=0;e:for(let u=0;u<r;u++){const f=n[u];for(let h=0;h<c;h++)if(e(f,a[h])===0)continue e;c=a.push(f)}return a}const o=n.slice().sort(e);let i=0;for(let a=1;a<r;a++)e(o[i],o[a])!==0&&++i!==a&&(o[i]=o[a]);return o.length=i+1,o}}function xce(e){return(t,n)=>{const r=[];let o=t.length,i=n.length;if(o===0||i===0)return r;if(o>i){const h=t;t=n,n=h;const p=o;o=i,i=p}const a=[...t].sort(e),c=[...n].sort(e);let u=0,f=0;for(;u<o&&f<i;){const h=e(a[u],c[f]);h===0?((r.length===0||e(r[r.length-1],a[u])!==0)&&r.push(a[u]),u++,f++):h<0?u++:f++}return r}}function Ece(e,t){return n=>{if(e.has(n))return e.get(n);const r=t(n);return e.set(n,r),r}}const X5=Ece,AI=()=>0,_ce=e=>e===void 0,Cce=e=>typeof e!="object",Q5={boolean:0,number:1,string:2};function Tce(e,t){const n=typeof e,r=typeof t;return n===r?zu(e,t):Q5[n]-Q5[r]}function Rce(e,t){const n=e.length;if(n===0)return t;const r=t.length;if(r===0)return e;if(r>n){const a=e;e=t,t=a}const o=new Set(e),i=t.length;for(let a=0;a<i;a++){const c=t[a];o.has(c)||e.push(c)}return e}function L0(e,t,n=AI){return(r,o)=>e(r)?e(o)?n(r,o):-1:e(o)?1:t(r,o)}function _u(e){return L0(_ce,e)}function Oa(e,t){return L0(n=>n===void 0||e(n),t)}function iS(e,t){return L0(Array.isArray,e,t)}const yr=_u(zu),aS=Oa(e=>e===0,(e,t)=>e-t);function Oce({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){const n=X5(t,x=>Object.keys(x).sort());function r(x){return(w,T)=>{const v=n(w),_=n(T),S=Math.min(v.length,_.length);for(let C=0;C<S;C++){const E=zu(v[C],_[C]);if(E!==0)return E}if(v.length!==_.length)return v.length-_.length;for(let C=0;C<S;C++){const E=v[C],O=x(w[E],T[E]);if(O!==0)return O}return 0}}function o(x){const w=sS(x),T=X5(e,OI(x,{threshold:0}));return(v,_)=>w(T(v),T(_))}const i=o(zu);function a(x,w){if(hy(x)){if(hy(w)){const T=Object.keys(x),v=Object.keys(w),_=Rce(T,v),S=_.length;for(let C=0;C<S;C++){const E=_[C];if(x[E]===w[E])continue;const j=(y[E]??c)(x[E],w[E]);if(j!==0)return j}return 0}return w===!0&&nh(x)?0:1}return hy(w)?x===!0&&nh(w)?0:-1:zu(x,w)}const c=_u(f),u=L0(Cce,iS(r(c),sS(f)),Tce);function f(x,w){return x===null?-1:w===null?1:u(x,w)}const h=_u(a),p=Oa(nh,r(h)),g=_u(o(a)),b=Oa(Ks,a),y={$id:yr,$comment:yr,$defs:p,$ref:yr,$schema:yr,const:c,contains:h,contentEncoding:yr,contentMediaType:yr,default:c,definitions:p,description:yr,else:h,examples:c,exclusiveMaximum:yr,exclusiveMinimum:yr,format:yr,if:h,maximum:yr,maxItems:yr,maxLength:yr,maxProperties:yr,minimum:yr,multipleOf:yr,not:h,pattern:yr,propertyNames:h,readOnly:yr,then:h,title:yr,writeOnly:yr,uniqueItems:Oa(x=>x===!1,AI),minLength:aS,minItems:aS,minProperties:aS,required:Oa(Y5,i),enum:Oa(Y5,o(f)),type:_u((x,w)=>{const T=Array.isArray(x),v=Array.isArray(w);return!T&&!v?zu(x,w):i(T?x:[x],v?w:[w])}),items:Oa(x=>!Array.isArray(x)&&Ks(x),iS(a,sS(a))),anyOf:g,allOf:g,oneOf:g,properties:p,patternProperties:p,additionalProperties:b,additionalItems:b,dependencies:Oa(nh,r(_u(iS(a,i))))};return{compareSchemaValues:f,compareSchemaDefinitions:a}}function J5(e){return e}const kI=(e,t)=>e?kI(t%e,e):t,Ace=(e,t)=>Math.abs(e*t)/kI(e,t);function kce(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function*lS(e,t,n){const r=e.length,o=t.length;if(r>0&&o>0)for(let i=0;i<r;i++){const a=e[i];for(let c=0;c<o;c++)yield n(a,t[c])}}function cS(e,t){return e||t}function ej(e){return(t,n)=>{const r={...t},o=Object.keys(n),i=o.length;for(let a=0;a<i;a++){const c=o[a];r[c]=t[c]===void 0?n[c]:e(t[c],n[c])}return r}}function Mce(e){const t=new Map;for(const n of e)for(const r of n[0])t.set(r,n[1]);return t}function Ul(e,t,n){n===void 0||Ks(n)?delete e[t]:e[t]=n}const jce=["properties","patternProperties","additionalProperties"];function tj(e){const t=Object.keys(e),n=t.length,r=[];for(let o=0;o<n;o++){const i=t[o];r.push({regExp:new RegExp(i),schema:e[i]})}return[r,t]}const nj=[[],[]];function rj(e,t,n){const r=n.length;for(let o=0;o<r;o++){const i=n[o];if(!i.regExp.test(t))continue;const a=i.schema;if(a===!1)return!0;e.push(a)}return!1}const Pce=["items","additionalItems"],Nce=["if","then","else"];function oj(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 uS(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 Vl(e,t,n){return[e,t,n]}function Dce(e){const t=new Map;for(const[n,r,o]of e){const i=a=>{if(!o(a))throw new Error(`Schema keys '${n}' and '${r}' are conflicting (${n}: ${JSON.stringify(a[n])}, ${r}: ${JSON.stringify(a[r])})`)};for(const a of[[n,r],[r,n]]){let c=t.get(a[0]);c===void 0&&(c=[],t.set(a[0],c)),c.push({oppositeKey:a[1],check:i})}}return t}const $ce=[Vl("minimum","maximum",e=>e.maximum>=e.minimum),Vl("exclusiveMinimum","maximum",e=>e.maximum>e.exclusiveMinimum),Vl("minimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.minimum),Vl("exclusiveMinimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.exclusiveMinimum),Vl("minLength","maxLength",e=>e.maxLength>=e.minLength),Vl("minItems","maxItems",e=>e.maxItems>=e.minItems),Vl("minProperties","maxProperties",e=>e.maxProperties>=e.minProperties)];function Ice({mergePatterns:e=kce,isSubRegExp:t=Object.is,intersectJson:n=wce,deduplicateJsonSchemaDef:r=J5,defaultMerger:o=J5,assigners:i=[],checks:a=$ce,mergers:c}={}){function u(S){const C=S.length;let E=S[0];for(let O=1;O<C;O++){const j=T(E,S[O]);if(j===!1)return!1;Ks(j)||(E=j)}return E}function f(S,C,E,O,j,P,N){if(S.length=0,E===!1)return!1;if(S.push(E),j!==void 0){if(j===!1)return!1;S.push(j)}if(rj(S,C,P))return!1;const L=S.length<2;if(N===!1){if(L)return;if(rj(S,C,O))return!1}else L&&N!==void 0&&S.push(N);return S.length===1?S[0]:u(S)}function h(S,C,E,O,j,P){const N=E.length;if(N>0&&j!==!1)if(P)Object.assign(S,C);else for(let D=0;D<N;D++){const L=E[D];O.has(L)||(S[L]=T(C[L],j))}return S}const p=(S,{properties:C={},patternProperties:E,additionalProperties:O=!0},{properties:j={},patternProperties:P,additionalProperties:N=!0})=>{const D=Ks(O),L=Ks(N);if(D&&L)return Ul(S,"properties",v(C,j)),Ul(S,"patternProperties",E&&P?v(E,P):E??P),delete S.additionalProperties,S;const U=T(O,N);Ul(S,"additionalProperties",U);const X={},Q=Object.keys(C),Z=Q.length,[q,G]=E?tj(E):nj,[oe,ne]=P?tj(P):nj,$=[],F=new Set,V=L?void 0:N;for(let me=0;me<Z;me++){const Ce=Q[me];F.add(Ce);const ee=f($,Ce,C[Ce],q,j[Ce],oe,V);ee!==void 0&&(X[Ce]=ee)}const I=Object.keys(j),K=I.length,te=D?void 0:O;for(let me=0;me<K;me++){const Ce=I[me];if(F.has(Ce))continue;const ee=f($,Ce,j[Ce],oe,void 0,q,te);ee!==void 0&&(X[Ce]=ee)}Ul(S,"properties",X);let re={};const ie=new Set;if(G.length>0&&ne.length>0){const me=lS(G,ne,(Ce,ee)=>{t(Ce,ee)&&ie.add(Ce),t(ee,Ce)&&ie.add(ee),re[e(Ce,ee)]=T(E[Ce],P[ee])});for(;!me.next().done;);}return re=h(re,E,G,ie,N,L),re=h(re,P,ne,ie,O,D),Ul(S,"patternProperties",re),S},g=(S,{items:C=[],additionalItems:E},{items:O=[],additionalItems:j})=>{const P=Array.isArray(C),N=Array.isArray(O),D=[];if(S.items=D,P&&N){const[L,U,X]=C.length<O.length?[C.length,E,O]:[O.length,j,C];let Q=0;for(;Q<L;Q++)D.push(T(C[Q],O[Q]));if(U===!1)S.additionalItems=!1;else{const Z=U===void 0||Ks(U);for(;Q<X.length;Q++)D.push(Z?X[Q]:T(X[Q],U));Ul(S,"additionalItems",E!==void 0&&j!==void 0?T(E,j):E??j)}}else if(P||N){const[L,U,X]=P?[C,O,E]:[O,C,j];Ul(S,"additionalItems",X&&T(X,U));for(let Q=0;Q<L.length;Q++)D.push(T(L[Q],U))}else delete S.additionalItems,S.items=T(C,O);return S},b=(S,C,E)=>{oj(S,C);const O=oj({},E);return S.allOf===void 0?S.allOf=[O]:S.allOf=S.allOf.concat(O),S};function y(S,C){return r(Array.from(lS(S,C,T)))}const x=Mce([[jce,p],[Pce,g],[Nce,b],...i]),w=Dce(a);function T(S,C){if(S===!1||C===!1)return!1;if(Ks(S))return Ks(C)?!0:C;if(Ks(C))return S;let E={...S};const O=new Set,j=new Set,P=Object.keys(C),N=P.length;for(let D=0;D<N;D++){const L=P[D],U=C[L];if(U===void 0)continue;const X=w.get(L);if(X!==void 0){const G=X.length;for(let oe=0;oe<G;oe++){const ne=X[oe];S[ne.oppositeKey]!==void 0&&j.add(ne.check)}}const Q=S[L];if(Q===void 0){E[L]=U;continue}const Z=x.get(L);if(Z){O.add(Z);continue}const q=_[L]??o;E[L]=q(Q,U)}for(const D of O)E=D(E,S,C);for(const D of j)D(E);return E}const v=ej(T),_={$id:o,$ref:o,$schema:o,$comment:o,$defs:v,definitions:v,type:(S,C)=>{if(S===C)return S;const E=Array.isArray(S),O=Array.isArray(C);if(!E&&!O){const j=uS(S,C);if(j!==void 0)return j}else if(E||O){const j=new Set;if(E&&O)for(const N of lS(S,C,uS))N!==void 0&&j.add(N);else{const N=E?S:C,D=E?C:S,L=N.length;for(let U=0;U<L;U++){const X=uS(D,N[U]);X!==void 0&&j.add(X)}}const P=j.size;if(P===1)return j.values().next().value;if(P>1)return Array.from(j)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${S.toString()}, ${C.toString()}`)},default:o,description:o,title:o,const:o,format:o,contentEncoding:o,contentMediaType:o,not:(S,C)=>{const E=r([S,C]);return E.length===1?E[0]:{anyOf:E}},pattern:e,readOnly:cS,writeOnly:cS,enum:(S,C)=>{const E=n(S,C);if(E.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(S)}", "${JSON.stringify(C)}"`);return E},anyOf:y,oneOf:y,allOf:(S,C)=>r(S.concat(C)),propertyNames:T,contains:T,dependencies:ej((S,C)=>Array.isArray(S)?Array.isArray(C)?oS(S,C):T(C,{required:S}):Array.isArray(C)?T(S,{required:C}):T(S,C)),examples:(S,C)=>{if(!Array.isArray(S)||!Array.isArray(C))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(S)}" and "${JSON.stringify(C)}"`);return oS(S,C)},multipleOf:(S,C)=>{let E=1;for(;!Number.isInteger(S)||!Number.isInteger(C);)E*=10,S*=10,C*=10;return Ace(S,C)/E},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:cS,required:oS,...c};return{mergeSchemaDefinitions:T,mergeArrayOfSchemaDefinitions:u}}function zce(e){const t=[],n=[e];for(;n.length>0;){const r=n.pop();if(typeof r=="boolean"||r.allOf===void 0){t.push(r);continue}const{allOf:o,...i}=r;t.push(i);for(let a=o.length-1;a>=0;a--)n.push(o[a])}return t}function Lce(e){return t=>e(zce(t))}var Bd={},sj;function Fce(){if(sj)return Bd;sj=1;var e=/~/,t=/~[01]/g;function n(f){switch(f){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+f)}function r(f){return e.test(f)?f.replace(t,n):f}function o(f,h,p){for(var g,b,y=1,x=h.length;y<x;){if(h[y]==="constructor"||h[y]==="prototype"||h[y]==="__proto__")return f;if(g=r(h[y++]),b=x>y,typeof f[g]>"u"&&(Array.isArray(f)&&g==="-"&&(g=f.length),b&&(h[y]!==""&&h[y]<1/0||h[y]==="-"?f[g]=[]:f[g]={})),!b)break;f=f[g]}var w=f[g];return p===void 0?delete f[g]:f[g]=p,w}function i(f){if(typeof f=="string"){if(f=f.split("/"),f[0]==="")return f;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(f)){for(const h of f)if(typeof h!="string"&&typeof h!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return f}throw new Error("Invalid JSON pointer.")}function a(f,h){if(typeof f!="object")throw new Error("Invalid input object.");h=i(h);var p=h.length;if(p===1)return f;for(var g=1;g<p;){if(f=f[r(h[g++])],p===g)return f;if(typeof f!="object"||f===null)return}}function c(f,h,p){if(typeof f!="object")throw new Error("Invalid input object.");if(h=i(h),h.length===0)throw new Error("Invalid JSON pointer for set.");return o(f,h,p)}function u(f){var h=i(f);return{get:function(p){return a(p,h)},set:function(p,g){return c(p,h,g)}}}return Bd.get=a,Bd.set=c,Bd.compile=u,Bd}var Uce=Fce();const fS=ii(Uce);var Vce=aD();const U_=ii(Vce);function Xy(e,t){if(Tn in e&&U_.equal(e[Tn],t))return e;for(const n of Object.values(e))if(Array.isArray(n)){for(const r of n)if(Qt(r)){const o=Xy(r,t);if(o!==void 0)return o}}else if(Qt(n)){const r=Xy(n,t);if(r!==void 0)return r}}function dx(e,t){const n=Ie(e,Tn,t);Fn in e&&(e={...e,[Fn]:U_.resolve(n,e[Fn])});for(const[r,o]of Object.entries(e))Array.isArray(o)?e={...e,[r]:o.map(i=>Qt(i)?dx(i,n):i)}:Qt(o)&&(e={...e,[r]:dx(o,n)});return e}function V_(e,t){const n=t[e];return[Ch(t,[e]),n]}function MI(e,t={},n=[],r=Ie(t,[Tn])){const o=e||"";let i;if(o.startsWith("#")){const c=decodeURIComponent(o.substring(1));r===void 0||Tn in t&&t[Tn]===r?i=fS.get(t,c):t[th]===dy&&(i=Xy(t,r.replace(/\/$/,"")),i!==void 0&&(i=fS.get(i,c)))}else if(t[th]===dy){const c=r?U_.resolve(r,o):o,[u,...f]=c.replace(/#\/?$/,"").split("#");i=Xy(t,u.replace(/\/$/,"")),i!==void 0&&(r=i[Tn],wr(f)||(i=fS.get(i,decodeURIComponent(f.join("#")))))}if(i===void 0)throw new Error(`Could not find a definition for ${e}.`);const a=i[Fn];if(a){if(n.includes(a)){if(n.length===1)throw new Error(`Definition for ${e} is a circular reference`);const[h,...p]=n,g=[...p,o,h].join(" -> ");throw new Error(`Definition for ${h} contains a circular reference through ${g}`)}const[c,u]=V_(Fn,i),f=MI(u,t,[...n,o],r);return Object.keys(c).length>0?t[th]===mce||t[th]===dy?{[Ja]:[c,f]}:{...c,...f}:f}return i}function jI(e,t={},n=Ie(t,[Tn])){return MI(e,t,[],n)}function oi(e){let t;const n=Ie(e,dce);return Ga(n)?t=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),t}function Nh(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 Ms(e){let{type:t}=e;return!t&&e.const?Nh(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(n=>n!=="null"):t=t[0]),t)}function qi(e,t){const n=Object.assign({},e);return Object.keys(t).reduce((r,o)=>{const i=e?e[o]:{},a=t[o];return e&&o in e&&Wt(a)?r[o]=qi(i,a):e&&t&&(Ms(e)==="object"||Ms(t)==="object")&&o===EI&&Array.isArray(i)&&Array.isArray(a)?r[o]=PG(i,a):r[o]=a,r},n)}function PI(e,t,n){var r;if(e&&n){const o=Ie(e,n);if(o===void 0)return;for(let i=0;i<t.length;i++){const a=t[i],c=Ie(a,[sn,n],{});if(!(c.type==="object"||c.type==="array")&&(c.const===o||!((r=c.enum)===null||r===void 0)&&r.includes(o)))return i}}}function q_(e,t,n,r,o){if(t===void 0)return 0;const i=PI(t,n,o);if(jN(i))return i;for(let a=0;a<n.length;a++){const c=n[a];if(o&&Ht(c,[sn,o])){const u=Ie(t,o),f=Ie(c,[sn,o],{});if(e.isValid(f,u,r))return a}else if(c[sn]){const u={anyOf:Object.keys(c[sn]).map(h=>({required:[h]}))};let f;if(c.anyOf){const{...h}=c;h.allOf?h.allOf=h.allOf.slice():h.allOf=[],h.allOf.push(u),f=h}else f=Object.assign({},c,u);if(delete f.required,e.isValid(f,t,r))return a}else if(e.isValid(c,t,r))return a}return 0}function ro(e,t,n={},r,o,i=!1){return Ys(e,t,n,r,void 0,void 0,o,i)[0]}function qce(e,t,n,r,o,i,a){const{if:c,then:u,else:f,...h}=t,p=e.isValid(c,i||{},n);let g=[h],b=[];if(r)u&&typeof u!="boolean"&&(b=b.concat(Ys(e,u,n,i,r,o,a))),f&&typeof f!="boolean"&&(b=b.concat(Ys(e,f,n,i,r,o,a)));else{const y=p?u:f;y&&typeof y!="boolean"&&(b=b.concat(Ys(e,y,n,i,r,o,a)))}return b.length&&(g=b.map(y=>qi(h,y))),g.flatMap(y=>Ys(e,y,n,i,r,o,a))}function NI(e){return e.reduce((n,r)=>r.length>1?r.flatMap(o=>$N(n.length,i=>[...n[i]].concat(o))):(n.forEach(o=>o.push(r[0])),n),[[]])}function DI(e,t){return Object.keys(e.patternProperties).filter(n=>RegExp(n).test(t)).reduce((n,r)=>(pn(n,[r],e.patternProperties[r]),n),{})}function Bce(e,t,n,r,o,i,a,c){const u=$I(e,t,n,r,o,i,a,c);if(u.length>1||u[0]!==t)return u;if(z_ in t)return II(e,t,n,r,o,i,a).flatMap(h=>Ys(e,h,n,i,r,o,a));if(Ja in t&&Array.isArray(t[Ja])){const f=t.allOf.map(p=>Ys(e,p,n,i,r,o,a));return NI(f).map(p=>({...t,allOf:p}))}return[t]}function $I(e,t,n,r,o,i,a,c){const u=Bu(t,n,o,void 0,c);return u!==t?Ys(e,u,n,i,r,o,a,c):[t]}function Bu(e,t,n,r,o){if(!Wt(e))return e;let i=e;if(Fn in i){const{$ref:a,...c}=i;if(n.includes(a))return i;n.push(a),i={...jI(a,t,r),...c},Tn in i&&(r=i[Tn])}if(sn in i){const a=[],c=AG(i[sn],(u,f,h)=>{const p=[...n];u[h]=Bu(f,t,p,r,o),a.push(p)},{});mG(n,LN(YK(a))),i={...i,[sn]:c}}if(cf in i&&!Array.isArray(i.items)&&typeof i.items!="boolean"&&(i={...i,items:Bu(i.items,t,n,r,o)}),o){let a,c;Xt in e&&Array.isArray(e[Xt])?(a=Xt,c=i[Xt]):Pt in e&&Array.isArray(e[Pt])&&(a=Pt,c=i[Pt]),a&&c&&(i={...i,[a]:c.map(u=>Bu(u,t,n,r,o))})}return Pn(e,i)?e:i}function Hce(e,t,n,r,o){const i={...t,properties:{...t.properties}},a=r&&Wt(r)?r:{};return Object.keys(a).forEach(c=>{if(!(c in i.properties)){if(cx in i){const u=DI(i,c);if(!wr(u)){i.properties[c]=ro(e,{[Ja]:Object.values(u)},n,Ie(a,[c]),o),pn(i.properties,[c,Li],!0);return}}if(Wy in i&&i.additionalProperties!==!1){let u;typeof i.additionalProperties!="boolean"?Fn in i.additionalProperties?u=ro(e,{[Fn]:Ie(i.additionalProperties,[Fn])},n,a,o):"type"in i.additionalProperties?u={...i.additionalProperties}:Xt in i.additionalProperties||Pt in i.additionalProperties?u={type:"object",...i.additionalProperties}:u={type:Nh(Ie(a,[c]))}:u={type:Nh(Ie(a,[c]))},i.properties[c]=u,pn(i.properties,[c,Li],!0)}else i.properties[c]={type:"null"},pn(i.properties,[c,Li],!0)}}),i}const{compareSchemaDefinitions:Kce,compareSchemaValues:Gce}=Oce(),{mergeArrayOfSchemaDefinitions:Zce}=Ice({intersectJson:xce(Gce),deduplicateJsonSchemaDef:OI(Kce)}),Wce=Lce(Zce);function Yce(e){return Wce(e)}function Ys(e,t,n,r,o=!1,i=[],a,c){return Wt(t)?Bce(e,t,n,o,i,r,a,c).flatMap(f=>{var h;let p=f;if(uce in p)return qce(e,p,n,o,i,r,a);if(Ja in p){if(o){const{allOf:b,...y}=p;return[...b,y]}try{const b=[],y=[];(h=p.allOf)===null||h===void 0||h.forEach(x=>{typeof x=="object"&&x.contains?b.push(x):y.push(x)}),b.length&&(p={...p,allOf:y}),p=a?a(p):Yce(p),b.length&&(p.allOf=b)}catch(b){console.warn(`could not merge subschemas in allOf:
59
+ `&&r++}}return[t,n]}class vne extends TransformStream{constructor({onError:t,onRetry:n,onComment:r}={}){let o;super({start(i){o=gne({onEvent:a=>{i.enqueue(a)},onError(a){t==="terminate"?i.error(a):typeof t=="function"&&t(a)},onRetry:n,onComment:r})},transform(i){o.feed(i)}})}}const bne={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2};class gu extends Error{constructor(t,n){super(`Streamable HTTP error: ${n}`),this.code=t}}class Sne{constructor(t,n){this._hasCompletedAuthFlow=!1,this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=Nte(n?.fetch,n?.requestInit),this._sessionId=n?.sessionId,this._reconnectionOptions=n?.reconnectionOptions??bne}async _authThenStart(){if(!this._authProvider)throw new mu("No auth provider");let t;try{t=await jg(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(t!=="AUTHORIZED")throw new mu;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){const t={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(t.Authorization=`Bearer ${r.access_token}`)}this._sessionId&&(t["mcp-session-id"]=this._sessionId),this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const n=xw(this._requestInit?.headers);return new Headers({...t,...n})}async _startOrAuthSse(t){const{resumptionToken:n}=t;try{const r=await this._commonHeaders();r.set("Accept","text/event-stream"),n&&r.set("last-event-id",n);const o=await(this._fetch??fetch)(this._url,{method:"GET",headers:r,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 gu(o.status,`Failed to open SSE stream: ${o.statusText}`)}this._handleSseStream(o.body,t,!0)}catch(r){throw this.onerror?.(r),r}}_getNextReconnectionDelay(t){if(this._serverRetryMs!==void 0)return this._serverRetryMs;const n=this._reconnectionOptions.initialReconnectionDelay,r=this._reconnectionOptions.reconnectionDelayGrowFactor,o=this._reconnectionOptions.maxReconnectionDelay;return Math.min(n*Math.pow(r,t),o)}_scheduleReconnection(t,n=0){const r=this._reconnectionOptions.maxRetries;if(n>=r){this.onerror?.(new Error(`Maximum reconnection attempts (${r}) exceeded.`));return}const o=this._getNextReconnectionDelay(n);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(t).catch(i=>{this.onerror?.(new Error(`Failed to reconnect SSE stream: ${i instanceof Error?i.message:String(i)}`)),this._scheduleReconnection(t,n+1)})},o)}_handleSseStream(t,n,r){if(!t)return;const{onresumptiontoken:o,replayMessageId:i}=n;let a,c=!1,u=!1;(async()=>{try{const h=t.pipeThrough(new TextDecoderStream).pipeThrough(new vne({onRetry:b=>{this._serverRetryMs=b}})).getReader();for(;;){const{value:b,done:y}=await h.read();if(y)break;if(b.id&&(a=b.id,c=!0,o?.(b.id)),!!b.data&&(!b.event||b.event==="message"))try{const x=S1.parse(JSON.parse(b.data));Xd(x)&&(u=!0,i!==void 0&&(x.id=i)),this.onmessage?.(x)}catch(x){this.onerror?.(x)}}(r||c)&&!u&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:a,onresumptiontoken:o,replayMessageId:i},0)}catch(h){if(this.onerror?.(new Error(`SSE stream disconnected: ${h}`)),(r||c)&&!u&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:a,onresumptiontoken:o,replayMessageId:i},0)}catch(b){this.onerror?.(new Error(`Failed to reconnect: ${b instanceof Error?b.message:String(b)}`))}}})()}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 mu("No auth provider");if(await jg(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new mu("Failed to authorize")}async close(){this._reconnectionTimeout&&(clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=void 0),this._abortController?.abort(),this.onclose?.()}async send(t,n){try{const{resumptionToken:r,onresumptiontoken:o}=n||{};if(r){this._startOrAuthSse({resumptionToken:r,replayMessageId:ww(t)?t.id:void 0}).catch(g=>this.onerror?.(g));return}const i=await this._commonHeaders();i.set("content-type","application/json"),i.set("accept","application/json, text/event-stream");const a={...this._requestInit,method:"POST",headers:i,body:JSON.stringify(t),signal:this._abortController?.signal},c=await(this._fetch??fetch)(this._url,a),u=c.headers.get("mcp-session-id");if(u&&(this._sessionId=u),!c.ok){const g=await c.text().catch(()=>null);if(c.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new gu(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl:b,scope:y}=wM(c);if(this._resourceMetadataUrl=b,this._scope=y,await jg(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new mu;return this._hasCompletedAuthFlow=!0,this.send(t)}if(c.status===403&&this._authProvider){const{resourceMetadataUrl:b,scope:y,error:x}=wM(c);if(x==="insufficient_scope"){const w=c.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===w)throw new gu(403,"Server returned 403 after trying upscoping");if(y&&(this._scope=y),b&&(this._resourceMetadataUrl=b),this._lastUpscopingHeader=w??void 0,await jg(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new mu;return this.send(t)}}throw new gu(c.status,`Error POSTing to endpoint: ${g}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,c.status===202){await c.body?.cancel(),QQ(t)&&this._startOrAuthSse({resumptionToken:void 0}).catch(g=>this.onerror?.(g));return}const h=(Array.isArray(t)?t:[t]).filter(g=>"method"in g&&"id"in g&&g.id!==void 0).length>0,p=c.headers.get("content-type");if(h)if(p?.includes("text/event-stream"))this._handleSseStream(c.body,{onresumptiontoken:o},!1);else if(p?.includes("application/json")){const g=await c.json(),b=Array.isArray(g)?g.map(y=>S1.parse(y)):[S1.parse(g)];for(const y of b)this.onmessage?.(y)}else throw await c.body?.cancel(),new gu(-1,`Unexpected content type: ${p}`);else await c.body?.cancel()}catch(r){throw this.onerror?.(r),r}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{const t=await this._commonHeaders(),n={...this._requestInit,method:"DELETE",headers:t,signal:this._abortController?.signal},r=await(this._fetch??fetch)(this._url,n);if(await r.body?.cancel(),!r.ok&&r.status!==405)throw new gu(r.status,`Failed to terminate session: ${r.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,n){await this._startOrAuthSse({resumptionToken:t,onresumptiontoken:n?.onresumptiontoken})}}class wne{client=null;transport=null;async connect(t){const n=typeof t=="string"?new URL(t):t;this.transport=new Sne(n),this.client=new Pte({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.");try{return(await this.client.listTools()).tools}catch(t){if(t instanceof Error&&t.message.includes("MCP error -32601: Method not found"))return[];throw t}}async callTool(t,n){if(!this.client)throw new Error("Client not connected. Call connect() first.");const r=await this.client.callTool({name:t,arguments:n??{}}),{_meta:o,...i}=r;return{...i,meta:o}}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,n){if(!this.client)throw new Error("Client not connected. Call connect() first.");return await this.client.getPrompt({name:t,...n&&{arguments:n}})}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 Af=new wne;Af.connect("http://localhost:3000/mcp").then(()=>{console.info("Connected to MCP server")});const xne={theme:"light",userAgent:{device:{type:"desktop"},capabilities:{hover:!0,touch:!1}},locale:"en-US",maxHeight:void 0,displayMode:"inline",safeArea:{insets:{top:0,bottom:0,left:0,right:0}},toolInput:{},toolOutput:null,toolResponseMetadata:null,view:{mode:"inline"},widgetState:null},mD=()=>{const{data:e}=R3({queryKey:["list-tools"],queryFn:()=>Af.listTools()});return e},Ene=()=>Af.getServerInfo(),_ne=()=>{const{setToolData:e}=Cf();return Y7({mutationFn:async({toolName:t,args:n})=>{e(t,{input:n??{},response:void 0,openaiRef:null,openaiLogs:[],openaiObject:null});const r=await Af.callTool(t,n);return e(t,{input:n??{},response:r,openaiRef:null,openaiLogs:[],openaiObject:{...xne,toolInput:n??{},toolOutput:r.structuredContent,toolResponseMetadata:r.meta??null,widgetState:null}}),r}})},t_=()=>{const[e]=xE();return mD().find(n=>n.name===e)??null},ll=()=>{const e=t_();if(!e)throw new Error("No tool is currently selected");return e},Cne=e=>R3({queryKey:["resource",e],queryFn:async()=>{if(!e)throw new Error("Resource URI is required");return await Af.readResource(e)}});const Tne=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Rne=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),_M=e=>{const t=Rne(e);return t.charAt(0).toUpperCase()+t.slice(1)},gD=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),One=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Ane={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 kne=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...c},u)=>A.createElement("svg",{ref:u,...Ane,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:gD("lucide",o),...!i&&!One(c)&&{"aria-hidden":"true"},...c},[...a.map(([f,h])=>A.createElement(f,h)),...Array.isArray(i)?i:[i]]));const Oo=(e,t)=>{const n=A.forwardRef(({className:r,...o},i)=>A.createElement(kne,{ref:i,iconNode:t,className:gD(`lucide-${Tne(_M(e))}`,`lucide-${e}`,r),...o}));return n.displayName=_M(e),n};const Mne=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],n_=Oo("check",Mne);const jne=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],yD=Oo("chevron-down",jne);const Pne=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Nne=Oo("chevron-up",Pne);const Dne=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],$ne=Oo("chevrons-up-down",Dne);const Ine=[["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"}]],zne=Oo("circle-alert",Ine);const Lne=[["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"}]],Fne=Oo("external-link",Lne);const Une=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Vne=Oo("info",Une);const qne=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Bne=Oo("loader-circle",qne);const Hne=[["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"}]],Kne=Oo("moon",Hne);const Gne=[["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"}]],Zne=Oo("play",Gne);const Wne=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Yne=Oo("search",Wne);const Xne=[["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"}]],Qne=Oo("sun",Xne);const Jne=[["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"}]],ere=Oo("trash",Jne);const tre=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],nre=Oo("x",tre);function M0(){return typeof window<"u"}function cl(e){return r_(e)?(e.nodeName||"").toLowerCase():"#document"}function Er(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function li(e){var t;return(t=(r_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function r_(e){return M0()?e instanceof Node||e instanceof Er(e).Node:!1}function Cn(e){return M0()?e instanceof Element||e instanceof Er(e).Element:!1}function Wn(e){return M0()?e instanceof HTMLElement||e instanceof Er(e).HTMLElement:!1}function Dw(e){return!M0()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Er(e).ShadowRoot}const rre=new Set(["inline","contents"]);function Cc(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Co(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!rre.has(o)}const ore=new Set(["table","td","th"]);function sre(e){return ore.has(cl(e))}const ire=[":popover-open",":modal"];function j0(e){return ire.some(t=>{try{return e.matches(t)}catch{return!1}})}const are=["transform","translate","scale","rotate","perspective"],lre=["transform","translate","scale","rotate","perspective","filter"],cre=["paint","layout","strict","content"];function o_(e){const t=P0(),n=Cn(e)?Co(e):e;return are.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||lre.some(r=>(n.willChange||"").includes(r))||cre.some(r=>(n.contain||"").includes(r))}function ure(e){let t=Fi(e);for(;Wn(t)&&!Ii(t);){if(o_(t))return t;if(j0(t))return null;t=Fi(t)}return null}function P0(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const fre=new Set(["html","body","#document"]);function Ii(e){return fre.has(cl(e))}function Co(e){return Er(e).getComputedStyle(e)}function N0(e){return Cn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fi(e){if(cl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Dw(e)&&e.host||li(e);return Dw(t)?t.host:t}function vD(e){const t=Fi(e);return Ii(t)?e.ownerDocument?e.ownerDocument.body:e.body:Wn(t)&&Cc(t)?t:vD(t)}function Ia(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=vD(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Er(o);if(i){const c=$w(a);return t.concat(a,a.visualViewport||[],Cc(o)?o:[],c&&n?Ia(c):[])}return t.concat(o,Ia(o,[],n))}function $w(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const CM={};function To(e,t){const n=A.useRef(CM);return n.current===CM&&(n.current=e(t)),n}const z1=Zh[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],dre=z1&&z1!==A.useLayoutEffect?z1:e=>e();function Ze(e){const t=To(hre).current;return t.next=e,dre(t.effect),t.trampoline}function hre(){const e={next:void 0,callback:pre,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function pre(){}const mre=()=>{},Xe=typeof document<"u"?A.useLayoutEffect:mre;function Iw(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const ch={};function fp(e,t,n,r,o){let i={...zw(e,ch)};return t&&(i=Qd(i,t)),n&&(i=Qd(i,n)),r&&(i=Qd(i,r)),o&&(i=Qd(i,o)),i}function gre(e){if(e.length===0)return ch;if(e.length===1)return zw(e[0],ch);let t={...zw(e[0],ch)};for(let n=1;n<e.length;n+=1)t=Qd(t,e[n]);return t}function Qd(e,t){return bD(t)?t(e):yre(e,t)}function yre(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Iw(e.style,r);break}case"className":{e[n]=SD(e.className,r);break}default:vre(n,r)?e[n]=bre(e[n],r):e[n]=r}}return e}function vre(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function bD(e){return typeof e=="function"}function zw(e,t){return bD(e)?e(t):e??ch}function bre(e,t){return t?e?n=>{if(Sre(n)){const o=n;Lw(o);const i=t(o);return o.baseUIHandlerPrevented||e?.(o),i}const r=t(n);return e?.(n),r}:t:e}function Lw(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function SD(e,t){return t?e?t+" "+e:t:e}function Sre(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Jr(e,...t){const n=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}const wD=A.createContext(void 0);function xD(e=!1){const t=A.useContext(wD);if(t===void 0&&!e)throw new Error(Jr(16));return t}function wre(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:i}=e,a=r&&t!==!1,c=r&&t===!1;return{props:A.useMemo(()=>{const f={onKeyDown(h){n&&t&&h.key!=="Tab"&&h.preventDefault()}};return r||(f.tabIndex=o,!i&&n&&(f.tabIndex=t?o:-1)),(i&&(t||a)||!i&&n)&&(f["aria-disabled"]=n),i&&(!t||c)&&(f.disabled=n),f},[r,n,t,a,c,i,o])}}function Tc(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,i=A.useRef(null),a=xD(!0)!==void 0,c=Ze(()=>{const g=i.current;return!!(g?.tagName==="A"&&g?.href)}),{props:u}=wre({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:o}),f=A.useCallback(()=>{const g=i.current;xre(g)&&a&&t&&u.disabled===void 0&&g.disabled&&(g.disabled=!1)},[t,u.disabled,a]);Xe(f,[f]);const h=A.useCallback((g={})=>{const{onClick:b,onMouseDown:y,onKeyUp:x,onKeyDown:w,onPointerDown:T,...v}=g;return fp({type:o?"button":void 0,onClick(S){if(t){S.preventDefault();return}b?.(S)},onMouseDown(S){t||y?.(S)},onKeyDown(S){if(t||(Lw(S),w?.(S)),S.baseUIHandlerPrevented)return;const C=S.target===S.currentTarget&&!o&&!c()&&!t,E=S.key==="Enter",O=S.key===" ";C&&((O||E)&&S.preventDefault(),E&&b?.(S))},onKeyUp(S){t||(Lw(S),x?.(S)),!S.baseUIHandlerPrevented&&S.target===S.currentTarget&&!o&&!t&&S.key===" "&&b?.(S)},onPointerDown(S){if(t){S.preventDefault();return}T?.(S)}},o?void 0:{role:"button"},u,v)},[t,u,o,c]),p=Ze(g=>{i.current=g,f()});return{getButtonProps:h,buttonRef:p}}function xre(e){return Wn(e)&&e.tagName==="BUTTON"}function Ui(e,t,n,r){const o=To(ED).current;return _re(o,e,t,n,r)&&_D(o,[e,t,n,r]),o.callback}function Ere(e){const t=To(ED).current;return Cre(t,e)&&_D(t,e),t.callback}function ED(){return{callback:null,cleanup:null,refs:[]}}function _re(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function Cre(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function _D(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const a=i(n);typeof a=="function"&&(r[o]=a);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const a=r[o];typeof a=="function"?a():i(null);break}case"object":{i.current=null;break}}}}}}}const Tre=parseInt(A.version,10);function s_(e){return Tre>=e}function TM(e){if(!A.isValidElement(e))return null;const t=e,n=t.props;return(s_(19)?n?.ref:t.ref)??null}function Rre(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const i=t[r](o);i!=null&&Object.assign(n,i);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function Ore(e,t){return typeof e=="function"?e(t):e}function Are(e,t){return typeof e=="function"?e(t):e}function Uo(){}const af=Object.freeze([]),$r=Object.freeze({}),kre=500,Mre={style:{transition:"none"}},CD="data-base-ui-click-trigger",jre={fallbackAxisSide:"none"},Pre={fallbackAxisSide:"end"},Nre={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function Mn(e,t,n={}){const r=t.render,o=Dre(t,n);if(n.enabled===!1)return null;const i=n.state??$r;return $re(e,r,o,i)}function Dre(e,t={}){const{className:n,style:r,render:o}=e,{state:i=$r,ref:a,props:c,stateAttributesMapping:u,enabled:f=!0}=t,h=f?Ore(n,i):void 0,p=f?Are(r,i):void 0,g=f?Rre(i,u):$r,b=f?Iw(g,Array.isArray(c)?gre(c):c)??$r:$r;return typeof document<"u"&&(f?Array.isArray(a)?b.ref=Ere([b.ref,TM(o),...a]):b.ref=Ui(b.ref,TM(o),a):Ui(null,null)),f?(h!==void 0&&(b.className=SD(b.className,h)),p!==void 0&&(b.style=Iw(b.style,p)),b):$r}function $re(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=fp(n,t.props);return o.ref=n.ref,A.cloneElement(t,o)}if(e&&typeof e=="string")return Ire(e,n);throw new Error(Jr(8))}function Ire(e,t){return e==="button"?A.createElement("button",{type:"button",...t,key:t.key}):e==="img"?A.createElement("img",{alt:"",...t,key:t.key}):A.createElement(e,t)}const zre=A.forwardRef(function(t,n){const{render:r,className:o,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:c=!0,...u}=t,f=!!i,{getButtonProps:h,buttonRef:p}=Tc({disabled:f,focusableWhenDisabled:a,native:c}),g=A.useMemo(()=>({disabled:f}),[f]);return Mn("button",t,{state:g,ref:[n,p],props:[u,h]})});function TD(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=TD(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function i_(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=TD(e))&&(r&&(r+=" "),r+=t);return r}const RM=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,OM=i_,Wi=(e,t)=>n=>{var r;if(t?.variants==null)return OM(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(f=>{const h=n?.[f],p=i?.[f];if(h===null)return null;const g=RM(h)||RM(p);return o[f][g]}),c=n&&Object.entries(n).reduce((f,h)=>{let[p,g]=h;return g===void 0||(f[p]=g),f},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,h)=>{let{class:p,className:g,...b}=h;return Object.entries(b).every(y=>{let[x,w]=y;return Array.isArray(w)?w.includes({...i,...c}[x]):{...i,...c}[x]===w})?[...f,p,g]:f},[]);return OM(e,a,u,n?.class,n?.className)},Lre=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Fre=(e,t)=>({classGroupId:e,validator:t}),RD=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Uy="-",AM=[],Ure="arbitrary..",Vre=e=>{const t=Bre(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return qre(a);const c=a.split(Uy),u=c[0]===""&&c.length>1?1:0;return OD(c,u,t)},getConflictingClassGroupIds:(a,c)=>{if(c){const u=r[a],f=n[a];return u?f?Lre(f,u):u:f||AM}return n[a]||AM}}},OD=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const f=OD(e,t+1,i);if(f)return f}const a=n.validators;if(a===null)return;const c=t===0?e.join(Uy):e.slice(t).join(Uy),u=a.length;for(let f=0;f<u;f++){const h=a[f];if(h.validator(c))return h.classGroupId}},qre=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Ure+r:void 0})(),Bre=e=>{const{theme:t,classGroups:n}=e;return Hre(n,t)},Hre=(e,t)=>{const n=RD();for(const r in e){const o=e[r];a_(o,n,r,t)}return n},a_=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const a=e[i];Kre(a,t,n,r)}},Kre=(e,t,n,r)=>{if(typeof e=="string"){Gre(e,t,n);return}if(typeof e=="function"){Zre(e,t,n,r);return}Wre(e,t,n,r)},Gre=(e,t,n)=>{const r=e===""?t:AD(t,e);r.classGroupId=n},Zre=(e,t,n,r)=>{if(Yre(e)){a_(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Fre(n,e))},Wre=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let a=0;a<i;a++){const[c,u]=o[a];a_(u,AD(t,c),n,r)}},AD=(e,t)=>{let n=e;const r=t.split(Uy),o=r.length;for(let i=0;i<o;i++){const a=r[i];let c=n.nextPart.get(a);c||(c=RD(),n.nextPart.set(a,c)),n=c}return n},Yre=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Xre=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let a=n[i];if(a!==void 0)return a;if((a=r[i])!==void 0)return o(i,a),a},set(i,a){i in n?n[i]=a:o(i,a)}}},Fw="!",kM=":",Qre=[],MM=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Jre=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,c=0,u=0,f;const h=o.length;for(let x=0;x<h;x++){const w=o[x];if(a===0&&c===0){if(w===kM){i.push(o.slice(u,x)),u=x+1;continue}if(w==="/"){f=x;continue}}w==="["?a++:w==="]"?a--:w==="("?c++:w===")"&&c--}const p=i.length===0?o:o.slice(u);let g=p,b=!1;p.endsWith(Fw)?(g=p.slice(0,-1),b=!0):p.startsWith(Fw)&&(g=p.slice(1),b=!0);const y=f&&f>u?f-u:void 0;return MM(i,b,g,y)};if(t){const o=t+kM,i=r;r=a=>a.startsWith(o)?i(a.slice(o.length)):MM(Qre,!1,a,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},eoe=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const a=n[i],c=a[0]==="[",u=t.has(a);c||u?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(a)):o.push(a)}return o.length>0&&(o.sort(),r.push(...o)),r}},toe=e=>({cache:Xre(e.cacheSize),parseClassName:Jre(e),sortModifiers:eoe(e),...Vre(e)}),noe=/\s+/,roe=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],c=e.trim().split(noe);let u="";for(let f=c.length-1;f>=0;f-=1){const h=c[f],{isExternal:p,modifiers:g,hasImportantModifier:b,baseClassName:y,maybePostfixModifierPosition:x}=n(h);if(p){u=h+(u.length>0?" "+u:u);continue}let w=!!x,T=r(w?y.substring(0,x):y);if(!T){if(!w){u=h+(u.length>0?" "+u:u);continue}if(T=r(y),!T){u=h+(u.length>0?" "+u:u);continue}w=!1}const v=g.length===0?"":g.length===1?g[0]:i(g).join(":"),_=b?v+Fw:v,S=_+T;if(a.indexOf(S)>-1)continue;a.push(S);const C=o(T,w);for(let E=0;E<C.length;++E){const O=C[E];a.push(_+O)}u=h+(u.length>0?" "+u:u)}return u},ooe=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=kD(n))&&(o&&(o+=" "),o+=r);return o},kD=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=kD(e[r]))&&(n&&(n+=" "),n+=t);return n},soe=(e,...t)=>{let n,r,o,i;const a=u=>{const f=t.reduce((h,p)=>p(h),e());return n=toe(f),r=n.cache.get,o=n.cache.set,i=c,c(u)},c=u=>{const f=r(u);if(f)return f;const h=roe(u,n);return o(u,h),h};return i=a,(...u)=>i(ooe(...u))},ioe=[],Rr=e=>{const t=n=>n[e]||ioe;return t.isThemeGetter=!0,t},MD=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,jD=/^\((?:(\w[\w-]*):)?(.+)\)$/i,aoe=/^\d+\/\d+$/,loe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,coe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,uoe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,foe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,doe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,yu=e=>aoe.test(e),jt=e=>!!e&&!Number.isNaN(Number(e)),Ca=e=>!!e&&Number.isInteger(Number(e)),L1=e=>e.endsWith("%")&&jt(e.slice(0,-1)),Ni=e=>loe.test(e),hoe=()=>!0,poe=e=>coe.test(e)&&!uoe.test(e),PD=()=>!1,moe=e=>foe.test(e),goe=e=>doe.test(e),yoe=e=>!tt(e)&&!nt(e),voe=e=>kf(e,$D,PD),tt=e=>MD.test(e),Ll=e=>kf(e,ID,poe),F1=e=>kf(e,Eoe,jt),jM=e=>kf(e,ND,PD),boe=e=>kf(e,DD,goe),Pg=e=>kf(e,zD,moe),nt=e=>jD.test(e),Vd=e=>Mf(e,ID),Soe=e=>Mf(e,_oe),PM=e=>Mf(e,ND),woe=e=>Mf(e,$D),xoe=e=>Mf(e,DD),Ng=e=>Mf(e,zD,!0),kf=(e,t,n)=>{const r=MD.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Mf=(e,t,n=!1)=>{const r=jD.exec(e);return r?r[1]?t(r[1]):n:!1},ND=e=>e==="position"||e==="percentage",DD=e=>e==="image"||e==="url",$D=e=>e==="length"||e==="size"||e==="bg-size",ID=e=>e==="length",Eoe=e=>e==="number",_oe=e=>e==="family-name",zD=e=>e==="shadow",Coe=()=>{const e=Rr("color"),t=Rr("font"),n=Rr("text"),r=Rr("font-weight"),o=Rr("tracking"),i=Rr("leading"),a=Rr("breakpoint"),c=Rr("container"),u=Rr("spacing"),f=Rr("radius"),h=Rr("shadow"),p=Rr("inset-shadow"),g=Rr("text-shadow"),b=Rr("drop-shadow"),y=Rr("blur"),x=Rr("perspective"),w=Rr("aspect"),T=Rr("ease"),v=Rr("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...S(),nt,tt],E=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],j=()=>[nt,tt,u],P=()=>[yu,"full","auto",...j()],N=()=>[Ca,"none","subgrid",nt,tt],D=()=>["auto",{span:["full",Ca,nt,tt]},Ca,nt,tt],L=()=>[Ca,"auto",nt,tt],U=()=>["auto","min","max","fr",nt,tt],X=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],Z=()=>["auto",...j()],q=()=>[yu,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],G=()=>[e,nt,tt],oe=()=>[...S(),PM,jM,{position:[nt,tt]}],ne=()=>["no-repeat",{repeat:["","x","y","space","round"]}],$=()=>["auto","cover","contain",woe,voe,{size:[nt,tt]}],F=()=>[L1,Vd,Ll],V=()=>["","none","full",f,nt,tt],I=()=>["",jt,Vd,Ll],K=()=>["solid","dashed","dotted","double"],te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],re=()=>[jt,L1,PM,jM],ie=()=>["","none",y,nt,tt],me=()=>["none",jt,nt,tt],Ce=()=>["none",jt,nt,tt],ee=()=>[jt,nt,tt],se=()=>[yu,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ni],breakpoint:[Ni],color:[hoe],container:[Ni],"drop-shadow":[Ni],ease:["in","out","in-out"],font:[yoe],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ni],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ni],shadow:[Ni],spacing:["px",jt],text:[Ni],"text-shadow":[Ni],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",yu,tt,nt,w]}],container:["container"],columns:[{columns:[jt,tt,nt,c]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[Ca,"auto",nt,tt]}],basis:[{basis:[yu,"full","auto",c,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[jt,yu,"auto","initial","none",tt]}],grow:[{grow:["",jt,nt,tt]}],shrink:[{shrink:["",jt,nt,tt]}],order:[{order:[Ca,"first","last","none",nt,tt]}],"grid-cols":[{"grid-cols":N()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":N()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...X(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...X()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":X()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:Z()}],mx:[{mx:Z()}],my:[{my:Z()}],ms:[{ms:Z()}],me:[{me:Z()}],mt:[{mt:Z()}],mr:[{mr:Z()}],mb:[{mb:Z()}],ml:[{ml:Z()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],w:[{w:[c,"screen",...q()]}],"min-w":[{"min-w":[c,"screen","none",...q()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[a]},...q()]}],h:[{h:["screen","lh",...q()]}],"min-h":[{"min-h":["screen","lh","none",...q()]}],"max-h":[{"max-h":["screen","lh",...q()]}],"font-size":[{text:["base",n,Vd,Ll]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,nt,F1]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",L1,tt]}],"font-family":[{font:[Soe,tt,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,nt,tt]}],"line-clamp":[{"line-clamp":[jt,"none",nt,F1]}],leading:[{leading:[i,...j()]}],"list-image":[{"list-image":["none",nt,tt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",nt,tt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:G()}],"text-color":[{text:G()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:[jt,"from-font","auto",nt,Ll]}],"text-decoration-color":[{decoration:G()}],"underline-offset":[{"underline-offset":[jt,"auto",nt,tt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",nt,tt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",nt,tt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:oe()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:$()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ca,nt,tt],radial:["",nt,tt],conic:[Ca,nt,tt]},xoe,boe]}],"bg-color":[{bg:G()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:G()}],"gradient-via":[{via:G()}],"gradient-to":[{to:G()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"border-w":[{border:I()}],"border-w-x":[{"border-x":I()}],"border-w-y":[{"border-y":I()}],"border-w-s":[{"border-s":I()}],"border-w-e":[{"border-e":I()}],"border-w-t":[{"border-t":I()}],"border-w-r":[{"border-r":I()}],"border-w-b":[{"border-b":I()}],"border-w-l":[{"border-l":I()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":I()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...K(),"hidden","none"]}],"divide-style":[{divide:[...K(),"hidden","none"]}],"border-color":[{border:G()}],"border-color-x":[{"border-x":G()}],"border-color-y":[{"border-y":G()}],"border-color-s":[{"border-s":G()}],"border-color-e":[{"border-e":G()}],"border-color-t":[{"border-t":G()}],"border-color-r":[{"border-r":G()}],"border-color-b":[{"border-b":G()}],"border-color-l":[{"border-l":G()}],"divide-color":[{divide:G()}],"outline-style":[{outline:[...K(),"none","hidden"]}],"outline-offset":[{"outline-offset":[jt,nt,tt]}],"outline-w":[{outline:["",jt,Vd,Ll]}],"outline-color":[{outline:G()}],shadow:[{shadow:["","none",h,Ng,Pg]}],"shadow-color":[{shadow:G()}],"inset-shadow":[{"inset-shadow":["none",p,Ng,Pg]}],"inset-shadow-color":[{"inset-shadow":G()}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:G()}],"ring-offset-w":[{"ring-offset":[jt,Ll]}],"ring-offset-color":[{"ring-offset":G()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":G()}],"text-shadow":[{"text-shadow":["none",g,Ng,Pg]}],"text-shadow-color":[{"text-shadow":G()}],opacity:[{opacity:[jt,nt,tt]}],"mix-blend":[{"mix-blend":[...te(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":te()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[jt]}],"mask-image-linear-from-pos":[{"mask-linear-from":re()}],"mask-image-linear-to-pos":[{"mask-linear-to":re()}],"mask-image-linear-from-color":[{"mask-linear-from":G()}],"mask-image-linear-to-color":[{"mask-linear-to":G()}],"mask-image-t-from-pos":[{"mask-t-from":re()}],"mask-image-t-to-pos":[{"mask-t-to":re()}],"mask-image-t-from-color":[{"mask-t-from":G()}],"mask-image-t-to-color":[{"mask-t-to":G()}],"mask-image-r-from-pos":[{"mask-r-from":re()}],"mask-image-r-to-pos":[{"mask-r-to":re()}],"mask-image-r-from-color":[{"mask-r-from":G()}],"mask-image-r-to-color":[{"mask-r-to":G()}],"mask-image-b-from-pos":[{"mask-b-from":re()}],"mask-image-b-to-pos":[{"mask-b-to":re()}],"mask-image-b-from-color":[{"mask-b-from":G()}],"mask-image-b-to-color":[{"mask-b-to":G()}],"mask-image-l-from-pos":[{"mask-l-from":re()}],"mask-image-l-to-pos":[{"mask-l-to":re()}],"mask-image-l-from-color":[{"mask-l-from":G()}],"mask-image-l-to-color":[{"mask-l-to":G()}],"mask-image-x-from-pos":[{"mask-x-from":re()}],"mask-image-x-to-pos":[{"mask-x-to":re()}],"mask-image-x-from-color":[{"mask-x-from":G()}],"mask-image-x-to-color":[{"mask-x-to":G()}],"mask-image-y-from-pos":[{"mask-y-from":re()}],"mask-image-y-to-pos":[{"mask-y-to":re()}],"mask-image-y-from-color":[{"mask-y-from":G()}],"mask-image-y-to-color":[{"mask-y-to":G()}],"mask-image-radial":[{"mask-radial":[nt,tt]}],"mask-image-radial-from-pos":[{"mask-radial-from":re()}],"mask-image-radial-to-pos":[{"mask-radial-to":re()}],"mask-image-radial-from-color":[{"mask-radial-from":G()}],"mask-image-radial-to-color":[{"mask-radial-to":G()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[jt]}],"mask-image-conic-from-pos":[{"mask-conic-from":re()}],"mask-image-conic-to-pos":[{"mask-conic-to":re()}],"mask-image-conic-from-color":[{"mask-conic-from":G()}],"mask-image-conic-to-color":[{"mask-conic-to":G()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:oe()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:$()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",nt,tt]}],filter:[{filter:["","none",nt,tt]}],blur:[{blur:ie()}],brightness:[{brightness:[jt,nt,tt]}],contrast:[{contrast:[jt,nt,tt]}],"drop-shadow":[{"drop-shadow":["","none",b,Ng,Pg]}],"drop-shadow-color":[{"drop-shadow":G()}],grayscale:[{grayscale:["",jt,nt,tt]}],"hue-rotate":[{"hue-rotate":[jt,nt,tt]}],invert:[{invert:["",jt,nt,tt]}],saturate:[{saturate:[jt,nt,tt]}],sepia:[{sepia:["",jt,nt,tt]}],"backdrop-filter":[{"backdrop-filter":["","none",nt,tt]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[jt,nt,tt]}],"backdrop-contrast":[{"backdrop-contrast":[jt,nt,tt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",jt,nt,tt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[jt,nt,tt]}],"backdrop-invert":[{"backdrop-invert":["",jt,nt,tt]}],"backdrop-opacity":[{"backdrop-opacity":[jt,nt,tt]}],"backdrop-saturate":[{"backdrop-saturate":[jt,nt,tt]}],"backdrop-sepia":[{"backdrop-sepia":["",jt,nt,tt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",nt,tt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[jt,"initial",nt,tt]}],ease:[{ease:["linear","initial",T,nt,tt]}],delay:[{delay:[jt,nt,tt]}],animate:[{animate:["none",v,nt,tt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,nt,tt]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:Ce()}],"scale-x":[{"scale-x":Ce()}],"scale-y":[{"scale-y":Ce()}],"scale-z":[{"scale-z":Ce()}],"scale-3d":["scale-3d"],skew:[{skew:ee()}],"skew-x":[{"skew-x":ee()}],"skew-y":[{"skew-y":ee()}],transform:[{transform:[nt,tt,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:se()}],"translate-x":[{"translate-x":se()}],"translate-y":[{"translate-y":se()}],"translate-z":[{"translate-z":se()}],"translate-none":["translate-none"],accent:[{accent:G()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:G()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",nt,tt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",nt,tt]}],fill:[{fill:["none",...G()]}],"stroke-w":[{stroke:[jt,Vd,Ll,F1]}],stroke:[{stroke:["none",...G()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},LD=soe(Coe);function Et(...e){return LD(i_(e))}const Toe=Wi("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 Ya({className:e,variant:t="default",size:n="default",...r}){return M.jsx(zre,{"data-slot":"button",className:Et(Toe({variant:t,size:n,className:e})),...r})}const Roe=()=>{const e=Ene(),t=e?.name,n=e?.version,[,r]=xE();return M.jsx("div",{className:"flex flex-col border-b border-border bg-background",children:M.jsxs("div",{className:"flex h-14 items-center justify-between px-4",children:[M.jsxs("div",{className:"flex items-center gap-4",children:[M.jsx("button",{type:"button",className:"font-semibold cursor-pointer",onClick:()=>{r(null)},children:"Skybridge"}),M.jsx("span",{className:"h-4 w-px bg-border","aria-hidden":"true"}),M.jsxs("div",{className:"flex items-center gap-4 rounded-md border border-border bg-muted px-2 py-1",children:[M.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t}),M.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",n]})]}),M.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:[M.jsx("span",{className:"h-2 w-2 rounded-full bg-green-500 mr-1 inline-block"}),"Connected"]})]}),M.jsx("div",{className:"flex items-center gap-2",children:M.jsx(Ya,{variant:"ghost",size:"sm",className:"h-8 gap-2",children:M.jsxs("a",{href:"https://docs.skybridge.tech/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:["Learn more about Skybridge",M.jsx(Fne,{className:"h-3.5 w-3.5"})]})})})]})})},FD=A.createContext({});function Ooe(e){const t=A.useRef(null);return t.current===null&&(t.current=e()),t.current}const UD=typeof window<"u",Aoe=UD?A.useLayoutEffect:A.useEffect,l_=A.createContext(null);function c_(e,t){e.indexOf(t)===-1&&e.push(t)}function u_(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ri=(e,t,n)=>n>t?t:n<e?e:n;let f_=()=>{};const Vi={},VD=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function qD(e){return typeof e=="object"&&e!==null}const BD=e=>/^0[^.\s]+$/u.test(e);function d_(e){let t;return()=>(t===void 0&&(t=e()),t)}const ds=e=>e,koe=(e,t)=>n=>t(e(n)),dp=(...e)=>e.reduce(koe),Ah=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class h_{constructor(){this.subscriptions=[]}add(t){return c_(this.subscriptions,t),()=>u_(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const a=this.subscriptions[i];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const zi=e=>e*1e3,cs=e=>e/1e3;function HD(e,t){return t?e*(1e3/t):0}const KD=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Moe=1e-7,joe=12;function Poe(e,t,n,r,o){let i,a,c=0;do a=t+(n-t)/2,i=KD(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>Moe&&++c<joe);return a}function hp(e,t,n,r){if(e===t&&n===r)return ds;const o=i=>Poe(i,0,1,e,n);return i=>i===0||i===1?i:KD(o(i),t,r)}const GD=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ZD=e=>t=>1-e(1-t),WD=hp(.33,1.53,.69,.99),p_=ZD(WD),YD=GD(p_),XD=e=>(e*=2)<1?.5*p_(e):.5*(2-Math.pow(2,-10*(e-1))),m_=e=>1-Math.sin(Math.acos(e)),QD=ZD(m_),JD=GD(m_),Noe=hp(.42,0,1,1),Doe=hp(0,0,.58,1),e$=hp(.42,0,.58,1),$oe=e=>Array.isArray(e)&&typeof e[0]!="number",t$=e=>Array.isArray(e)&&typeof e[0]=="number",Ioe={linear:ds,easeIn:Noe,easeInOut:e$,easeOut:Doe,circIn:m_,circInOut:JD,circOut:QD,backIn:p_,backInOut:YD,backOut:WD,anticipate:XD},zoe=e=>typeof e=="string",NM=e=>{if(t$(e)){f_(e.length===4);const[t,n,r,o]=e;return hp(t,n,r,o)}else if(zoe(e))return Ioe[e];return e},Dg=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Loe(e,t){let n=new Set,r=new Set,o=!1,i=!1;const a=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1};function u(h){a.has(h)&&(f.schedule(h),e()),h(c)}const f={schedule:(h,p=!1,g=!1)=>{const y=g&&o?n:r;return p&&a.add(h),y.has(h)||y.add(h),h},cancel:h=>{r.delete(h),a.delete(h)},process:h=>{if(c=h,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(u),n.clear(),o=!1,i&&(i=!1,f.process(h))}};return f}const Foe=40;function n$(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Dg.reduce((_,S)=>(_[S]=Loe(i),_),{}),{setup:c,read:u,resolveKeyframes:f,preUpdate:h,update:p,preRender:g,render:b,postRender:y}=a,x=()=>{const _=Vi.useManualTiming?o.timestamp:performance.now();n=!1,Vi.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(_-o.timestamp,Foe),1)),o.timestamp=_,o.isProcessing=!0,c.process(o),u.process(o),f.process(o),h.process(o),p.process(o),g.process(o),b.process(o),y.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(x))},w=()=>{n=!0,r=!0,o.isProcessing||e(x)};return{schedule:Dg.reduce((_,S)=>{const C=a[S];return _[S]=(E,O=!1,j=!1)=>(n||w(),C.schedule(E,O,j)),_},{}),cancel:_=>{for(let S=0;S<Dg.length;S++)a[Dg[S]].cancel(_)},state:o,steps:a}}const{schedule:Ln,cancel:Xa,state:Hr,steps:U1}=n$(typeof requestAnimationFrame<"u"?requestAnimationFrame:ds,!0);let ay;function Uoe(){ay=void 0}const po={now:()=>(ay===void 0&&po.set(Hr.isProcessing||Vi.useManualTiming?Hr.timestamp:performance.now()),ay),set:e=>{ay=e,queueMicrotask(Uoe)}},r$=e=>t=>typeof t=="string"&&t.startsWith(e),o$=r$("--"),Voe=r$("var(--"),g_=e=>Voe(e)?qoe.test(e.split("/*")[0].trim()):!1,qoe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function DM(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const jf={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},kh={...jf,transform:e=>ri(0,1,e)},$g={...jf,default:1},uh=e=>Math.round(e*1e5)/1e5,y_=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Boe(e){return e==null}const Hoe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,v_=(e,t)=>n=>!!(typeof n=="string"&&Hoe.test(n)&&n.startsWith(e)||t&&!Boe(n)&&Object.prototype.hasOwnProperty.call(n,t)),s$=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,c]=r.match(y_);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:c!==void 0?parseFloat(c):1}},Koe=e=>ri(0,255,e),V1={...jf,transform:e=>Math.round(Koe(e))},Yl={test:v_("rgb","red"),parse:s$("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+V1.transform(e)+", "+V1.transform(t)+", "+V1.transform(n)+", "+uh(kh.transform(r))+")"};function Goe(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Uw={test:v_("#"),parse:Goe,transform:Yl.transform},pp=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ra=pp("deg"),ei=pp("%"),Qe=pp("px"),Zoe=pp("vh"),Woe=pp("vw"),$M={...ei,parse:e=>ei.parse(e)/100,transform:e=>ei.transform(e*100)},Nu={test:v_("hsl","hue"),parse:s$("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ei.transform(uh(t))+", "+ei.transform(uh(n))+", "+uh(kh.transform(r))+")"},vr={test:e=>Yl.test(e)||Uw.test(e)||Nu.test(e),parse:e=>Yl.test(e)?Yl.parse(e):Nu.test(e)?Nu.parse(e):Uw.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Yl.transform(e):Nu.transform(e),getAnimatableNone:e=>{const t=vr.parse(e);return t.alpha=0,vr.transform(t)}},Yoe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Xoe(e){return isNaN(e)&&typeof e=="string"&&(e.match(y_)?.length||0)+(e.match(Yoe)?.length||0)>0}const i$="number",a$="color",Qoe="var",Joe="var(",IM="${}",ese=/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 Mh(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const c=t.replace(ese,u=>(vr.test(u)?(r.color.push(i),o.push(a$),n.push(vr.parse(u))):u.startsWith(Joe)?(r.var.push(i),o.push(Qoe),n.push(u)):(r.number.push(i),o.push(i$),n.push(parseFloat(u))),++i,IM)).split(IM);return{values:n,split:c,indexes:r,types:o}}function l$(e){return Mh(e).values}function c$(e){const{split:t,types:n}=Mh(e),r=t.length;return o=>{let i="";for(let a=0;a<r;a++)if(i+=t[a],o[a]!==void 0){const c=n[a];c===i$?i+=uh(o[a]):c===a$?i+=vr.transform(o[a]):i+=o[a]}return i}}const tse=e=>typeof e=="number"?0:vr.test(e)?vr.getAnimatableNone(e):e;function nse(e){const t=l$(e);return c$(e)(t.map(tse))}const Qa={test:Xoe,parse:l$,createTransformer:c$,getAnimatableNone:nse};function q1(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function rse({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,a=0;if(!t)o=i=a=n;else{const c=n<.5?n*(1+t):n+t-n*t,u=2*n-c;o=q1(u,c,e+1/3),i=q1(u,c,e),a=q1(u,c,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function Vy(e,t){return n=>n>0?t:e}const Xn=(e,t,n)=>e+(t-e)*n,B1=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},ose=[Uw,Yl,Nu],sse=e=>ose.find(t=>t.test(e));function zM(e){const t=sse(e);if(!t)return!1;let n=t.parse(e);return t===Nu&&(n=rse(n)),n}const LM=(e,t)=>{const n=zM(e),r=zM(t);if(!n||!r)return Vy(e,t);const o={...n};return i=>(o.red=B1(n.red,r.red,i),o.green=B1(n.green,r.green,i),o.blue=B1(n.blue,r.blue,i),o.alpha=Xn(n.alpha,r.alpha,i),Yl.transform(o))},Vw=new Set(["none","hidden"]);function ise(e,t){return Vw.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function ase(e,t){return n=>Xn(e,t,n)}function b_(e){return typeof e=="number"?ase:typeof e=="string"?g_(e)?Vy:vr.test(e)?LM:use:Array.isArray(e)?u$:typeof e=="object"?vr.test(e)?LM:lse:Vy}function u$(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>b_(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function lse(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=b_(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function cse(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],a=e.indexes[i][r[i]],c=e.values[a]??0;n[o]=c,r[i]++}return n}const use=(e,t)=>{const n=Qa.createTransformer(t),r=Mh(e),o=Mh(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Vw.has(e)&&!o.values.length||Vw.has(t)&&!r.values.length?ise(e,t):dp(u$(cse(r,o),o.values),n):Vy(e,t)};function f$(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Xn(e,t,n):b_(e)(e,t)}const fse=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Ln.update(t,n),stop:()=>Xa(t),now:()=>Hr.isProcessing?Hr.timestamp:po.now()}},d$=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=Math.round(e(i/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},qy=2e4;function S_(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<qy;)t+=n,r=e.next(t);return t>=qy?1/0:t}function dse(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(S_(r),qy);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:cs(o)}}const hse=5;function h$(e,t,n){const r=Math.max(t-hse,0);return HD(n-e(r),t-r)}const or={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},H1=.001;function pse({duration:e=or.duration,bounce:t=or.bounce,velocity:n=or.velocity,mass:r=or.mass}){let o,i,a=1-t;a=ri(or.minDamping,or.maxDamping,a),e=ri(or.minDuration,or.maxDuration,cs(e)),a<1?(o=f=>{const h=f*a,p=h*e,g=h-n,b=qw(f,a),y=Math.exp(-p);return H1-g/b*y},i=f=>{const p=f*a*e,g=p*n+n,b=Math.pow(a,2)*Math.pow(f,2)*e,y=Math.exp(-p),x=qw(Math.pow(f,2),a);return(-o(f)+H1>0?-1:1)*((g-b)*y)/x}):(o=f=>{const h=Math.exp(-f*e),p=(f-n)*e+1;return-H1+h*p},i=f=>{const h=Math.exp(-f*e),p=(n-f)*(e*e);return h*p});const c=5/e,u=gse(o,i,c);if(e=zi(e),isNaN(u))return{stiffness:or.stiffness,damping:or.damping,duration:e};{const f=Math.pow(u,2)*r;return{stiffness:f,damping:a*2*Math.sqrt(r*f),duration:e}}}const mse=12;function gse(e,t,n){let r=n;for(let o=1;o<mse;o++)r=r-e(r)/t(r);return r}function qw(e,t){return e*Math.sqrt(1-t*t)}const yse=["duration","bounce"],vse=["stiffness","damping","mass"];function FM(e,t){return t.some(n=>e[n]!==void 0)}function bse(e){let t={velocity:or.velocity,stiffness:or.stiffness,damping:or.damping,mass:or.mass,isResolvedFromDuration:!1,...e};if(!FM(e,vse)&&FM(e,yse))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*ri(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:or.mass,stiffness:o,damping:i}}else{const n=pse(e);t={...t,...n,mass:or.mass},t.isResolvedFromDuration=!0}return t}function By(e=or.visualDuration,t=or.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],c={done:!1,value:i},{stiffness:u,damping:f,mass:h,duration:p,velocity:g,isResolvedFromDuration:b}=bse({...n,velocity:-cs(n.velocity||0)}),y=g||0,x=f/(2*Math.sqrt(u*h)),w=a-i,T=cs(Math.sqrt(u/h)),v=Math.abs(w)<5;r||(r=v?or.restSpeed.granular:or.restSpeed.default),o||(o=v?or.restDelta.granular:or.restDelta.default);let _;if(x<1){const C=qw(T,x);_=E=>{const O=Math.exp(-x*T*E);return a-O*((y+x*T*w)/C*Math.sin(C*E)+w*Math.cos(C*E))}}else if(x===1)_=C=>a-Math.exp(-T*C)*(w+(y+T*w)*C);else{const C=T*Math.sqrt(x*x-1);_=E=>{const O=Math.exp(-x*T*E),j=Math.min(C*E,300);return a-O*((y+x*T*w)*Math.sinh(j)+C*w*Math.cosh(j))/C}}const S={calculatedDuration:b&&p||null,next:C=>{const E=_(C);if(b)c.done=C>=p;else{let O=C===0?y:0;x<1&&(O=C===0?zi(y):h$(_,C,E));const j=Math.abs(O)<=r,P=Math.abs(a-E)<=o;c.done=j&&P}return c.value=c.done?a:E,c},toString:()=>{const C=Math.min(S_(S),qy),E=d$(O=>S.next(C*O).value,C,30);return C+"ms "+E},toTransition:()=>{}};return S}By.applyToOptions=e=>{const t=dse(e,100,By);return e.ease=t.ease,e.duration=zi(t.duration),e.type="keyframes",e};function Bw({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:c,max:u,restDelta:f=.5,restSpeed:h}){const p=e[0],g={done:!1,value:p},b=j=>c!==void 0&&j<c||u!==void 0&&j>u,y=j=>c===void 0?u:u===void 0||Math.abs(c-j)<Math.abs(u-j)?c:u;let x=n*t;const w=p+x,T=a===void 0?w:a(w);T!==w&&(x=T-p);const v=j=>-x*Math.exp(-j/r),_=j=>T+v(j),S=j=>{const P=v(j),N=_(j);g.done=Math.abs(P)<=f,g.value=g.done?T:N};let C,E;const O=j=>{b(g.value)&&(C=j,E=By({keyframes:[g.value,y(g.value)],velocity:h$(_,j,g.value),damping:o,stiffness:i,restDelta:f,restSpeed:h}))};return O(0),{calculatedDuration:null,next:j=>{let P=!1;return!E&&C===void 0&&(P=!0,S(j),O(j)),C!==void 0&&j>=C?E.next(j-C):(!P&&S(j),g)}}}function Sse(e,t,n){const r=[],o=n||Vi.mix||f$,i=e.length-1;for(let a=0;a<i;a++){let c=o(e[a],e[a+1]);if(t){const u=Array.isArray(t)?t[a]||ds:t;c=dp(u,c)}r.push(c)}return r}function wse(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(f_(i===t.length),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const c=Sse(t,r,o),u=c.length,f=h=>{if(a&&h<e[0])return t[0];let p=0;if(u>1)for(;p<e.length-2&&!(h<e[p+1]);p++);const g=Ah(e[p],e[p+1],h);return c[p](g)};return n?h=>f(ri(e[0],e[i-1],h)):f}function xse(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Ah(0,t,r);e.push(Xn(n,1,o))}}function Ese(e){const t=[0];return xse(t,e.length-1),t}function _se(e,t){return e.map(n=>n*t)}function Cse(e,t){return e.map(()=>t||e$).splice(0,e.length-1)}function fh({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=$oe(r)?r.map(NM):NM(r),i={done:!1,value:t[0]},a=_se(n&&n.length===t.length?n:Ese(t),e),c=wse(a,t,{ease:Array.isArray(o)?o:Cse(t,o)});return{calculatedDuration:e,next:u=>(i.value=c(u),i.done=u>=e,i)}}const Tse=e=>e!==null;function w_(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(Tse),c=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!c||r===void 0?i[c]:r}const Rse={decay:Bw,inertia:Bw,tween:fh,keyframes:fh,spring:By};function p$(e){typeof e.type=="string"&&(e.type=Rse[e.type])}class x_{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const Ose=e=>e/100;class E_ extends x_{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:n}=this.options;n&&n.updatedAt!==po.now()&&this.tick(po.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;p$(t);const{type:n=fh,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=t;let{keyframes:c}=t;const u=n||fh;u!==fh&&typeof c[0]!="number"&&(this.mixKeyframes=dp(Ose,f$(c[0],c[1])),c=[0,100]);const f=u({...t,keyframes:c});i==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...c].reverse(),velocity:-a})),f.calculatedDuration===null&&(f.calculatedDuration=S_(f));const{calculatedDuration:h}=f;this.calculatedDuration=h,this.resolvedDuration=h+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=f}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:c,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);const{delay:f=0,keyframes:h,repeat:p,repeatType:g,repeatDelay:b,type:y,onUpdate:x,finalKeyframe:w}=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)),n?this.currentTime=t:this.updateTime(t);const T=this.currentTime-f*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?T<0:T>o;this.currentTime=Math.max(T,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let _=this.currentTime,S=r;if(p){const j=Math.min(this.currentTime,o)/c;let P=Math.floor(j),N=j%1;!N&&j>=1&&(N=1),N===1&&P--,P=Math.min(P,p+1),P%2&&(g==="reverse"?(N=1-N,b&&(N-=b/c)):g==="mirror"&&(S=a)),_=ri(0,1,N)*c}const C=v?{done:!1,value:h[0]}:S.next(_);i&&(C.value=i(C.value));let{done:E}=C;!v&&u!==null&&(E=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return O&&y!==Bw&&(C.value=w_(h,this.options,w,this.speed)),x&&x(C.value),O&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return cs(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+cs(t)}get time(){return cs(this.currentTime)}set time(t){t=zi(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(po.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=cs(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=fse,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(po.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 Ase(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Xl=e=>e*180/Math.PI,Hw=e=>{const t=Xl(Math.atan2(e[1],e[0]));return Kw(t)},kse={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Hw,rotateZ:Hw,skewX:e=>Xl(Math.atan(e[1])),skewY:e=>Xl(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Kw=e=>(e=e%360,e<0&&(e+=360),e),UM=Hw,VM=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),qM=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Mse={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:VM,scaleY:qM,scale:e=>(VM(e)+qM(e))/2,rotateX:e=>Kw(Xl(Math.atan2(e[6],e[5]))),rotateY:e=>Kw(Xl(Math.atan2(-e[2],e[0]))),rotateZ:UM,rotate:UM,skewX:e=>Xl(Math.atan(e[4])),skewY:e=>Xl(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Gw(e){return e.includes("scale")?1:0}function Zw(e,t){if(!e||e==="none")return Gw(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=Mse,o=n;else{const c=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=kse,o=c}if(!o)return Gw(t);const i=r[t],a=o[1].split(",").map(Pse);return typeof i=="function"?i(a):a[i]}const jse=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Zw(n,t)};function Pse(e){return parseFloat(e.trim())}const Pf=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Nf=new Set(Pf),BM=e=>e===jf||e===Qe,Nse=new Set(["x","y","z"]),Dse=Pf.filter(e=>!Nse.has(e));function $se(e){const t=[];return Dse.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ja={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Zw(t,"x"),y:(e,{transform:t})=>Zw(t,"y")};ja.translateX=ja.x;ja.translateY=ja.y;const tc=new Set;let Ww=!1,Yw=!1,Xw=!1;function m$(){if(Yw){const e=Array.from(tc).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=$se(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,a])=>{r.getValue(i)?.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Yw=!1,Ww=!1,tc.forEach(e=>e.complete(Xw)),tc.clear()}function g$(){tc.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Yw=!0)})}function Ise(){Xw=!0,g$(),m$(),Xw=!1}class __{constructor(t,n,r,o,i,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(tc.add(this),Ww||(Ww=!0,Ln.read(g$),Ln.resolveKeyframes(m$))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const i=o?.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const c=r.readValue(n,a);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}Ase(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),tc.delete(this)}cancel(){this.state==="scheduled"&&(tc.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const zse=e=>e.startsWith("--");function Lse(e,t,n){zse(t)?e.style.setProperty(t,n):e.style[t]=n}const Fse=d_(()=>window.ScrollTimeline!==void 0),Use={};function Vse(e,t){const n=d_(e);return()=>Use[t]??n()}const y$=Vse(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Jd=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,HM={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Jd([0,.65,.55,1]),circOut:Jd([.55,0,1,.45]),backIn:Jd([.31,.01,.66,-.59]),backOut:Jd([.33,1.53,.69,.99])};function v$(e,t){if(e)return typeof e=="function"?y$()?d$(e,t):"ease-out":t$(e)?Jd(e):Array.isArray(e)?e.map(n=>v$(n,t)||HM.easeOut):HM[e]}function qse(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:c="easeOut",times:u}={},f=void 0){const h={[t]:n};u&&(h.offset=u);const p=v$(c,o);Array.isArray(p)&&(h.easing=p);const g={delay:r,duration:o,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"};return f&&(g.pseudoElement=f),e.animate(h,g)}function b$(e){return typeof e=="function"&&"applyToOptions"in e}function Bse({type:e,...t}){return b$(e)&&y$()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Hse extends x_{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:c,onComplete:u}=t;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=t,f_(typeof t.type!="string");const f=Bse(t);this.animation=qse(n,r,o,f,i),f.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const h=w_(o,this.options,c,this.speed);this.updateMotionValue?this.updateMotionValue(h):Lse(n,r,h),this.animation.cancel()}u?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state: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 cs(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+cs(t)}get time(){return cs(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=zi(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 this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Fse()?(this.animation.timeline=t,ds):n(this)}}const S$={anticipate:XD,backInOut:YD,circInOut:JD};function Kse(e){return e in S$}function Gse(e){typeof e.ease=="string"&&Kse(e.ease)&&(e.ease=S$[e.ease])}const K1=10;class Zse extends Hse{constructor(t){Gse(t),p$(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:i,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const c=new E_({...a,autoplay:!1}),u=Math.max(K1,po.now()-this.startTime),f=ri(0,K1,u-K1);n.setWithVelocity(c.sample(Math.max(0,u-f)).value,c.sample(u).value,f),c.stop()}}const KM=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Qa.test(e)||e==="0")&&!e.startsWith("url("));function Wse(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Yse(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],a=KM(o,t),c=KM(i,t);return!a||!c?!1:Wse(e)||(n==="spring"||b$(n))&&r}function Qw(e){e.duration=0,e.type="keyframes"}const Xse=new Set(["opacity","clipPath","filter","transform"]),Qse=d_(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Jse(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:f}=t.owner.getProps();return Qse()&&n&&Xse.has(n)&&(n!=="transform"||!f)&&!u&&!r&&o!=="mirror"&&i!==0&&a!=="inertia"}const eie=40;class tie extends x_{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",keyframes:c,name:u,motionValue:f,element:h,...p}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=po.now();const g={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,name:u,motionValue:f,element:h,...p},b=h?.KeyframeResolver||__;this.keyframeResolver=new b(c,(y,x,w)=>this.onKeyframesResolved(y,x,g,!w),u,f,h),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:i,type:a,velocity:c,delay:u,isHandoff:f,onUpdate:h}=r;this.resolvedAt=po.now(),Yse(t,i,a,c)||((Vi.instantAnimations||!u)&&h?.(w_(t,r,n)),t[0]=t[t.length-1],Qw(r),r.repeat=0);const g={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>eie?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},b=!f&&Jse(g)?new Zse({...g,element:g.motionValue.owner.current}):new E_(g);b.finished.then(()=>this.notifyFinished()).catch(ds),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ise()),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 nie=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function rie(e){const t=nie.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}function w$(e,t,n=1){const[r,o]=rie(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return VD(a)?parseFloat(a):a}return g_(o)?w$(o,t,n+1):o}function C_(e,t){return e?.[t]??e?.default??e}const oie={type:"spring",stiffness:500,damping:25,restSpeed:10},sie=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),iie={type:"keyframes",duration:.8},aie={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},lie=(e,{keyframes:t})=>t.length>2?iie:Nf.has(e)?e.startsWith("scale")?sie(t[1]):oie:aie;function cie({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:c,from:u,elapsed:f,...h}){return!!Object.keys(h).length}const uie=e=>e!==null;function fie(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(uie),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}function x$(e,t,n,r=0,o=1){const i=Array.from(e).sort((f,h)=>f.sortNodePosition(h)).indexOf(t),a=e.size,c=(a-1)*r;return typeof n=="function"?n(i,a):o===1?i*r:c-i*r}const T_=(e,t,n,r={},o,i)=>a=>{const c=C_(r,e)||{},u=c.delay||r.delay||0;let{elapsed:f=0}=r;f=f-zi(u);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-f,onUpdate:g=>{t.set(g),c.onUpdate&&c.onUpdate(g)},onComplete:()=>{a(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:i?void 0:o};cie(c)||Object.assign(h,lie(e,h)),h.duration&&(h.duration=zi(h.duration)),h.repeatDelay&&(h.repeatDelay=zi(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let p=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(Qw(h),h.delay===0&&(p=!0)),(Vi.instantAnimations||Vi.skipAnimations)&&(p=!0,Qw(h),h.delay=0),h.allowFlatten=!c.type&&!c.ease,p&&!i&&t.get()!==void 0){const g=fie(h.keyframes,c);if(g!==void 0){Ln.update(()=>{h.onUpdate(g),h.onComplete()});return}}return c.isSync?new E_(h):new tie(h)},E$=new Set(["width","height","top","left","right","bottom",...Pf]),GM=30,die=e=>!isNaN(parseFloat(e));class hie{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=po.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=po.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=die(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new h_);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ln.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){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=po.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>GM)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,GM);return HD(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function lf(e,t){return new hie(e,t)}function ZM(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function R_(e,t,n,r){if(typeof t=="function"){const[o,i]=ZM(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=ZM(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function qu(e,t,n){const r=e.getProps();return R_(r,t,n!==void 0?n:r.custom,e)}const Jw=e=>Array.isArray(e);function pie(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,lf(n))}function mie(e){return Jw(e)?e[e.length-1]||0:e}function gie(e,t){const n=qu(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const c=mie(i[a]);pie(e,a,c)}}const no=e=>!!(e&&e.getVelocity);function yie(e){return!!(no(e)&&e.add)}function ex(e,t){const n=e.getValue("willChange");if(yie(n))return n.add(t);if(!n&&Vi.WillChange){const r=new Vi.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function O_(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const vie="framerAppearId",_$="data-"+O_(vie);function C$(e){return e.props[_$]}function bie({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function T$(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:a,...c}=t;r&&(i=r);const u=[],f=o&&e.animationState&&e.animationState.getState()[o];for(const h in c){const p=e.getValue(h,e.latestValues[h]??null),g=c[h];if(g===void 0||f&&bie(f,h))continue;const b={delay:n,...C_(i||{},h)},y=p.get();if(y!==void 0&&!p.isAnimating&&!Array.isArray(g)&&g===y&&!b.velocity)continue;let x=!1;if(window.MotionHandoffAnimation){const T=C$(e);if(T){const v=window.MotionHandoffAnimation(T,h,Ln);v!==null&&(b.startTime=v,x=!0)}}ex(e,h),p.start(T_(h,p,g,e.shouldReduceMotion&&E$.has(h)?{type:!1}:b,e,x));const w=p.animation;w&&u.push(w)}return a&&Promise.all(u).then(()=>{Ln.update(()=>{a&&gie(e,a)})}),u}function tx(e,t,n={}){const r=qu(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(T$(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:f=0,staggerChildren:h,staggerDirection:p}=o;return Sie(e,t,u,f,h,p,n)}:()=>Promise.resolve(),{when:c}=o;if(c){const[u,f]=c==="beforeChildren"?[i,a]:[a,i];return u().then(()=>f())}else return Promise.all([i(),a(n.delay)])}function Sie(e,t,n=0,r=0,o=0,i=1,a){const c=[];for(const u of e.variantChildren)u.notify("AnimationStart",t),c.push(tx(u,t,{...a,delay:n+(typeof r=="function"?0:r)+x$(e.variantChildren,u,r,o,i)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(c)}function wie(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>tx(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=tx(e,t,n);else{const o=typeof t=="function"?qu(e,t,n.custom):t;r=Promise.all(T$(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const xie={test:e=>e==="auto",parse:e=>e},R$=e=>t=>t.test(e),O$=[jf,Qe,ei,Ra,Woe,Zoe,xie],WM=e=>O$.find(R$(e));function Eie(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||BD(e):!0}const _ie=new Set(["brightness","contrast","saturate","opacity"]);function Cie(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(y_)||[];if(!r)return e;const o=n.replace(r,"");let i=_ie.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const Tie=/\b([a-z-]*)\(.*?\)/gu,nx={...Qa,getAnimatableNone:e=>{const t=e.match(Tie);return t?t.map(Cie).join(" "):e}},YM={...jf,transform:Math.round},Rie={rotate:Ra,rotateX:Ra,rotateY:Ra,rotateZ:Ra,scale:$g,scaleX:$g,scaleY:$g,scaleZ:$g,skew:Ra,skewX:Ra,skewY:Ra,distance:Qe,translateX:Qe,translateY:Qe,translateZ:Qe,x:Qe,y:Qe,z:Qe,perspective:Qe,transformPerspective:Qe,opacity:kh,originX:$M,originY:$M,originZ:Qe},A_={borderWidth:Qe,borderTopWidth:Qe,borderRightWidth:Qe,borderBottomWidth:Qe,borderLeftWidth:Qe,borderRadius:Qe,radius:Qe,borderTopLeftRadius:Qe,borderTopRightRadius:Qe,borderBottomRightRadius:Qe,borderBottomLeftRadius:Qe,width:Qe,maxWidth:Qe,height:Qe,maxHeight:Qe,top:Qe,right:Qe,bottom:Qe,left:Qe,inset:Qe,insetBlock:Qe,insetBlockStart:Qe,insetBlockEnd:Qe,insetInline:Qe,insetInlineStart:Qe,insetInlineEnd:Qe,padding:Qe,paddingTop:Qe,paddingRight:Qe,paddingBottom:Qe,paddingLeft:Qe,paddingBlock:Qe,paddingBlockStart:Qe,paddingBlockEnd:Qe,paddingInline:Qe,paddingInlineStart:Qe,paddingInlineEnd:Qe,margin:Qe,marginTop:Qe,marginRight:Qe,marginBottom:Qe,marginLeft:Qe,marginBlock:Qe,marginBlockStart:Qe,marginBlockEnd:Qe,marginInline:Qe,marginInlineStart:Qe,marginInlineEnd:Qe,backgroundPositionX:Qe,backgroundPositionY:Qe,...Rie,zIndex:YM,fillOpacity:kh,strokeOpacity:kh,numOctaves:YM},Oie={...A_,color:vr,backgroundColor:vr,outlineColor:vr,fill:vr,stroke:vr,borderColor:vr,borderTopColor:vr,borderRightColor:vr,borderBottomColor:vr,borderLeftColor:vr,filter:nx,WebkitFilter:nx},A$=e=>Oie[e];function k$(e,t){let n=A$(e);return n!==nx&&(n=Qa),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Aie=new Set(["auto","none","0"]);function kie(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!Aie.has(i)&&Mh(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=k$(n,o)}class Mie extends __{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let h=0;h<t.length;h++){let p=t[h];if(typeof p=="string"&&(p=p.trim(),g_(p))){const g=w$(p,n.current);g!==void 0&&(t[h]=g),h===t.length-1&&(this.finalKeyframe=p)}}if(this.resolveNoneKeyframes(),!E$.has(r)||t.length!==2)return;const[o,i]=t,a=WM(o),c=WM(i),u=DM(o),f=DM(i);if(u!==f&&ja[r]){this.needsMeasurement=!0;return}if(a!==c)if(BM(a)&&BM(c))for(let h=0;h<t.length;h++){const p=t[h];typeof p=="string"&&(t[h]=parseFloat(p))}else ja[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||Eie(t[o]))&&r.push(o);r.length&&kie(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ja[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=ja[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function jie(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}const M$=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Pie(e){return qD(e)&&"offsetHeight"in e}const{schedule:k_}=n$(queueMicrotask,!1),Rs={x:!1,y:!1};function j$(){return Rs.x||Rs.y}function Nie(e){return e==="x"||e==="y"?Rs[e]?null:(Rs[e]=!0,()=>{Rs[e]=!1}):Rs.x||Rs.y?null:(Rs.x=Rs.y=!0,()=>{Rs.x=Rs.y=!1})}function P$(e,t){const n=jie(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function XM(e){return!(e.pointerType==="touch"||j$())}function Die(e,t,n={}){const[r,o,i]=P$(e,n),a=c=>{if(!XM(c))return;const{target:u}=c,f=t(u,c);if(typeof f!="function"||!u)return;const h=p=>{XM(p)&&(f(p),u.removeEventListener("pointerleave",h))};u.addEventListener("pointerleave",h,o)};return r.forEach(c=>{c.addEventListener("pointerenter",a,o)}),i}const N$=(e,t)=>t?e===t?!0:N$(e,t.parentElement):!1,M_=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,$ie=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function D$(e){return $ie.has(e.tagName)||e.isContentEditable===!0}const ly=new WeakSet;function QM(e){return t=>{t.key==="Enter"&&e(t)}}function G1(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Iie=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=QM(()=>{if(ly.has(n))return;G1(n,"down");const o=QM(()=>{G1(n,"up")}),i=()=>G1(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function JM(e){return M_(e)&&!j$()}function zie(e,t,n={}){const[r,o,i]=P$(e,n),a=c=>{const u=c.currentTarget;if(!JM(c))return;ly.add(u);const f=t(u,c),h=(b,y)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",g),ly.has(u)&&ly.delete(u),JM(b)&&typeof f=="function"&&f(b,{success:y})},p=b=>{h(b,u===window||u===document||n.useGlobalTarget||N$(u,b.target))},g=b=>{h(b,!1)};window.addEventListener("pointerup",p,o),window.addEventListener("pointercancel",g,o)};return r.forEach(c=>{(n.useGlobalTarget?window:c).addEventListener("pointerdown",a,o),Pie(c)&&(c.addEventListener("focus",f=>Iie(f,o)),!D$(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0))}),i}function $$(e){return qD(e)&&"ownerSVGElement"in e}function Lie(e){return $$(e)&&e.tagName==="svg"}const Fie=[...O$,vr,Qa],Uie=e=>Fie.find(R$(e)),e5=()=>({translate:0,scale:1,origin:0,originPoint:0}),Du=()=>({x:e5(),y:e5()}),t5=()=>({min:0,max:0}),Or=()=>({x:t5(),y:t5()}),rx={current:null},I$={current:!1},Vie=typeof window<"u";function qie(){if(I$.current=!0,!!Vie)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>rx.current=e.matches;e.addEventListener("change",t),t()}else rx.current=!1}const Bie=new WeakMap;function D0(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function jh(e){return typeof e=="string"||Array.isArray(e)}const j_=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],P_=["initial",...j_];function $0(e){return D0(e.animate)||P_.some(t=>jh(e[t]))}function z$(e){return!!($0(e)||e.variants)}function Hie(e,t,n){for(const r in t){const o=t[r],i=n[r];if(no(o))e.addValue(r,o);else if(no(i))e.addValue(r,lf(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=e.getStaticValue(r);e.addValue(r,lf(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const n5=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Hy={};function L$(e){Hy=e}function Kie(){return Hy}class Gie{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=__,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=po.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,Ln.render(this.render,!1,!0))};const{latestValues:u,renderState:f}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=f,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=c,this.blockInitialAnimation=!!i,this.isControllingVariants=$0(n),this.isVariantNode=z$(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in p){const b=p[g];u[g]!==void 0&&no(b)&&b.set(u[g])}}mount(t){this.current=t,Bie.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((n,r)=>this.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(I$.current||qie(),this.shouldReduceMotion=rx.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Xa(this.notifyUpdate),Xa(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 n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Nf.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Ln.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Hy){const n=Hy[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Or()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<n5.length;r++){const o=n5[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,a=t[i];a&&(this.propEventSubscriptions[o]=this.on(o,a))}this.prevMotionValues=Hie(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 n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=lf(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(VD(r)||BD(r))?r=parseFloat(r):!Uie(r)&&Qa.test(n)&&(r=k$(t,n)),this.setBaseTarget(t,no(r)?r.get():r)),no(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=R_(this.props,n,this.presenceContext?.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!no(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new h_),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){k_.render(this.render)}}class ul{constructor(t){this.isMounted=!1,this.node=t}update(){}}class F$ extends Gie{constructor(){super(...arguments),this.KeyframeResolver=Mie}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;no(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function U$({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Zie({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Wie(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Z1(e){return e===void 0||e===1}function ox({scale:e,scaleX:t,scaleY:n}){return!Z1(e)||!Z1(t)||!Z1(n)}function Kl(e){return ox(e)||V$(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function V$(e){return r5(e.x)||r5(e.y)}function r5(e){return e&&e!=="0%"}function Ky(e,t,n){const r=e-n,o=t*r;return n+o}function o5(e,t,n,r,o){return o!==void 0&&(e=Ky(e,o,r)),Ky(e,n,r)+t}function sx(e,t=0,n=1,r,o){e.min=o5(e.min,t,n,r,o),e.max=o5(e.max,t,n,r,o)}function q$(e,{x:t,y:n}){sx(e.x,t.translate,t.scale,t.originPoint),sx(e.y,n.translate,n.scale,n.originPoint)}const s5=.999999999999,i5=1.0000000000001;function Yie(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,a;for(let c=0;c<o;c++){i=n[c],a=i.projectionDelta;const{visualElement:u}=i.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Iu(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,q$(e,a)),r&&Kl(i.latestValues)&&Iu(e,i.latestValues))}t.x<i5&&t.x>s5&&(t.x=1),t.y<i5&&t.y>s5&&(t.y=1)}function $u(e,t){e.min=e.min+t,e.max=e.max+t}function a5(e,t,n,r,o=.5){const i=Xn(e.min,e.max,o);sx(e,t,n,i,r)}function Iu(e,t){a5(e.x,t.x,t.scaleX,t.scale,t.originX),a5(e.y,t.y,t.scaleY,t.scale,t.originY)}function B$(e,t){return U$(Wie(e.getBoundingClientRect(),t))}function Xie(e,t,n){const r=B$(e,n),{scroll:o}=t;return o&&($u(r.x,o.offset.x),$u(r.y,o.offset.y)),r}const Qie={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Jie=Pf.length;function eae(e,t,n){let r="",o=!0;for(let i=0;i<Jie;i++){const a=Pf[i],c=e[a];if(c===void 0)continue;let u=!0;if(typeof c=="number"?u=c===(a.startsWith("scale")?1:0):u=parseFloat(c)===0,!u||n){const f=M$(c,A_[a]);if(!u){o=!1;const h=Qie[a]||a;r+=`${h}(${f}) `}n&&(t[a]=f)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function N_(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=!1,c=!1;for(const u in t){const f=t[u];if(Nf.has(u)){a=!0;continue}else if(o$(u)){o[u]=f;continue}else{const h=M$(f,A_[u]);u.startsWith("origin")?(c=!0,i[u]=h):r[u]=h}}if(t.transform||(a||n?r.transform=eae(t,e.transform,n):r.transform&&(r.transform="none")),c){const{originX:u="50%",originY:f="50%",originZ:h=0}=i;r.transformOrigin=`${u} ${f} ${h}`}}function H$(e,{style:t,vars:n},r,o){const i=e.style;let a;for(a in t)i[a]=t[a];o?.applyProjectionStyles(i,r);for(a in n)i.setProperty(a,n[a])}function l5(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const qd={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Qe.test(e))e=parseFloat(e);else return e;const n=l5(e,t.target.x),r=l5(e,t.target.y);return`${n}% ${r}%`}},tae={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Qa.parse(e);if(o.length>5)return r;const i=Qa.createTransformer(e),a=typeof o[0]!="number"?1:0,c=n.x.scale*t.x,u=n.y.scale*t.y;o[0+a]/=c,o[1+a]/=u;const f=Xn(c,u,.5);return typeof o[2+a]=="number"&&(o[2+a]/=f),typeof o[3+a]=="number"&&(o[3+a]/=f),i(o)}},ix={borderRadius:{...qd,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:qd,borderTopRightRadius:qd,borderBottomLeftRadius:qd,borderBottomRightRadius:qd,boxShadow:tae};function K$(e,{layout:t,layoutId:n}){return Nf.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ix[e]||e==="opacity")}function D_(e,t,n){const r=e.style,o=t?.style,i={};if(!r)return i;for(const a in r)(no(r[a])||o&&no(o[a])||K$(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}function nae(e){return window.getComputedStyle(e)}class rae extends F${constructor(){super(...arguments),this.type="html",this.renderInstance=H$}readValueFromInstance(t,n){if(Nf.has(n))return this.projection?.isProjecting?Gw(n):jse(t,n);{const r=nae(t),o=(o$(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return B$(t,n)}build(t,n,r){N_(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return D_(t,n,r)}}const oae={offset:"stroke-dashoffset",array:"stroke-dasharray"},sae={offset:"strokeDashoffset",array:"strokeDasharray"};function iae(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?oae:sae;e[i.offset]=Qe.transform(-r);const a=Qe.transform(t),c=Qe.transform(n);e[i.array]=`${a} ${c}`}const aae=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function G$(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:a=0,...c},u,f,h){if(N_(e,c,f),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:g}=e;p.transform&&(g.transform=p.transform,delete p.transform),(g.transform||p.transformOrigin)&&(g.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),g.transform&&(g.transformBox=h?.transformBox??"fill-box",delete p.transformBox);for(const b of aae)p[b]!==void 0&&(g[b]=p[b],delete p[b]);t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),o!==void 0&&iae(p,o,i,a,!1)}const Z$=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"]),W$=e=>typeof e=="string"&&e.toLowerCase()==="svg";function lae(e,t,n,r){H$(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Z$.has(o)?o:O_(o),t.attrs[o])}function Y$(e,t,n){const r=D_(e,t,n);for(const o in e)if(no(e[o])||no(t[o])){const i=Pf.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}class cae extends F${constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Or}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Nf.has(n)){const r=A$(n);return r&&r.default||0}return n=Z$.has(n)?n:O_(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Y$(t,n,r)}build(t,n,r){G$(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){lae(t,n,r,o)}mount(t){this.isSVGTag=W$(t.tagName),super.mount(t)}}const uae=P_.length;function X$(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?X$(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<uae;n++){const r=P_[n],o=e.props[r];(jh(o)||o===!1)&&(t[r]=o)}return t}function Q$(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const fae=[...j_].reverse(),dae=j_.length;function hae(e){return t=>Promise.all(t.map(({animation:n,options:r})=>wie(e,n,r)))}function pae(e){let t=hae(e),n=c5(),r=!0;const o=u=>(f,h)=>{const p=qu(e,h,u==="exit"?e.presenceContext?.custom:void 0);if(p){const{transition:g,transitionEnd:b,...y}=p;f={...f,...y,...b}}return f};function i(u){t=u(e)}function a(u){const{props:f}=e,h=X$(e.parent)||{},p=[],g=new Set;let b={},y=1/0;for(let w=0;w<dae;w++){const T=fae[w],v=n[T],_=f[T]!==void 0?f[T]:h[T],S=jh(_),C=T===u?v.isActive:null;C===!1&&(y=w);let E=_===h[T]&&_!==f[T]&&S;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),v.protectedKeys={...b},!v.isActive&&C===null||!_&&!v.prevProp||D0(_)||typeof _=="boolean")continue;const O=mae(v.prevProp,_);let j=O||T===u&&v.isActive&&!E&&S||w>y&&S,P=!1;const N=Array.isArray(_)?_:[_];let D=N.reduce(o(T),{});C===!1&&(D={});const{prevResolvedValues:L={}}=v,U={...L,...D},X=q=>{j=!0,g.has(q)&&(P=!0,g.delete(q)),v.needsAnimating[q]=!0;const G=e.getValue(q);G&&(G.liveStyle=!1)};for(const q in U){const G=D[q],oe=L[q];if(b.hasOwnProperty(q))continue;let ne=!1;Jw(G)&&Jw(oe)?ne=!Q$(G,oe):ne=G!==oe,ne?G!=null?X(q):g.add(q):G!==void 0&&g.has(q)?X(q):v.protectedKeys[q]=!0}v.prevProp=_,v.prevResolvedValues=D,v.isActive&&(b={...b,...D}),r&&e.blockInitialAnimation&&(j=!1);const Q=E&&O;j&&(!Q||P)&&p.push(...N.map(q=>{const G={type:T};if(typeof q=="string"&&r&&!Q&&e.manuallyAnimateOnMount&&e.parent){const{parent:oe}=e,ne=qu(oe,q);if(oe.enteringChildren&&ne){const{delayChildren:$}=ne.transition||{};G.delay=x$(oe.enteringChildren,e,$)}}return{animation:q,options:G}}))}if(g.size){const w={};if(typeof f.initial!="boolean"){const T=qu(e,Array.isArray(f.initial)?f.initial[0]:f.initial);T&&T.transition&&(w.transition=T.transition)}g.forEach(T=>{const v=e.getBaseTarget(T),_=e.getValue(T);_&&(_.liveStyle=!0),w[T]=v??null}),p.push({animation:w})}let x=!!p.length;return r&&(f.initial===!1||f.initial===f.animate)&&!e.manuallyAnimateOnMount&&(x=!1),r=!1,x?t(p):Promise.resolve()}function c(u,f){if(n[u].isActive===f)return Promise.resolve();e.variantChildren?.forEach(p=>p.animationState?.setActive(u,f)),n[u].isActive=f;const h=a(u);for(const p in n)n[p].protectedKeys={};return h}return{animateChanges:a,setActive:c,setAnimateFunction:i,getState:()=>n,reset:()=>{n=c5()}}}function mae(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Q$(t,e):!1}function Fl(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function c5(){return{animate:Fl(!0),whileInView:Fl(),whileHover:Fl(),whileTap:Fl(),whileDrag:Fl(),whileFocus:Fl(),exit:Fl()}}const J$=1e-4,gae=1-J$,yae=1+J$,eI=.01,vae=0-eI,bae=0+eI;function mo(e){return e.max-e.min}function Sae(e,t,n){return Math.abs(e-t)<=n}function u5(e,t,n,r=.5){e.origin=r,e.originPoint=Xn(t.min,t.max,e.origin),e.scale=mo(n)/mo(t),e.translate=Xn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=gae&&e.scale<=yae||isNaN(e.scale))&&(e.scale=1),(e.translate>=vae&&e.translate<=bae||isNaN(e.translate))&&(e.translate=0)}function dh(e,t,n,r){u5(e.x,t.x,n.x,r?r.originX:void 0),u5(e.y,t.y,n.y,r?r.originY:void 0)}function f5(e,t,n){e.min=n.min+t.min,e.max=e.min+mo(t)}function wae(e,t,n){f5(e.x,t.x,n.x),f5(e.y,t.y,n.y)}function d5(e,t,n){e.min=t.min-n.min,e.max=e.min+mo(t)}function Gy(e,t,n){d5(e.x,t.x,n.x),d5(e.y,t.y,n.y)}function h5(e,t,n,r,o){return e-=t,e=Ky(e,1/n,r),o!==void 0&&(e=Ky(e,1/o,r)),e}function xae(e,t=0,n=1,r=.5,o,i=e,a=e){if(ei.test(t)&&(t=parseFloat(t),t=Xn(a.min,a.max,t/100)-a.min),typeof t!="number")return;let c=Xn(i.min,i.max,r);e===i&&(c-=t),e.min=h5(e.min,t,n,c,o),e.max=h5(e.max,t,n,c,o)}function p5(e,t,[n,r,o],i,a){xae(e,t[n],t[r],t[o],t.scale,i,a)}const Eae=["x","scaleX","originX"],_ae=["y","scaleY","originY"];function m5(e,t,n,r){p5(e.x,t,Eae,n?n.x:void 0,r?r.x:void 0),p5(e.y,t,_ae,n?n.y:void 0,r?r.y:void 0)}function g5(e,t){e.min=t.min,e.max=t.max}function Cs(e,t){g5(e.x,t.x),g5(e.y,t.y)}function y5(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function v5(e){return e.translate===0&&e.scale===1}function tI(e){return v5(e.x)&&v5(e.y)}function b5(e,t){return e.min===t.min&&e.max===t.max}function Cae(e,t){return b5(e.x,t.x)&&b5(e.y,t.y)}function S5(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function nI(e,t){return S5(e.x,t.x)&&S5(e.y,t.y)}function w5(e){return mo(e.x)/mo(e.y)}function x5(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function os(e){return[e("x"),e("y")]}function Tae(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=n?.z||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:f,rotate:h,rotateX:p,rotateY:g,skewX:b,skewY:y}=n;f&&(r=`perspective(${f}px) ${r}`),h&&(r+=`rotate(${h}deg) `),p&&(r+=`rotateX(${p}deg) `),g&&(r+=`rotateY(${g}deg) `),b&&(r+=`skewX(${b}deg) `),y&&(r+=`skewY(${y}deg) `)}const c=e.x.scale*t.x,u=e.y.scale*t.y;return(c!==1||u!==1)&&(r+=`scale(${c}, ${u})`),r||"none"}const rI=["TopLeft","TopRight","BottomLeft","BottomRight"],Rae=rI.length,E5=e=>typeof e=="string"?parseFloat(e):e,_5=e=>typeof e=="number"||Qe.test(e);function Oae(e,t,n,r,o,i){o?(e.opacity=Xn(0,n.opacity??1,Aae(r)),e.opacityExit=Xn(t.opacity??1,0,kae(r))):i&&(e.opacity=Xn(t.opacity??1,n.opacity??1,r));for(let a=0;a<Rae;a++){const c=`border${rI[a]}Radius`;let u=C5(t,c),f=C5(n,c);if(u===void 0&&f===void 0)continue;u||(u=0),f||(f=0),u===0||f===0||_5(u)===_5(f)?(e[c]=Math.max(Xn(E5(u),E5(f),r),0),(ei.test(f)||ei.test(u))&&(e[c]+="%")):e[c]=f}(t.rotate||n.rotate)&&(e.rotate=Xn(t.rotate||0,n.rotate||0,r))}function C5(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Aae=oI(0,.5,QD),kae=oI(.5,.95,ds);function oI(e,t,n){return r=>r<e?0:r>t?1:n(Ah(e,t,r))}function Mae(e,t){const n=po.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Xa(r),e(i-t))};return Ln.setup(r,!0),()=>Xa(r)}function Ph(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function cy(e){return no(e)?e.get():e}function jae(e,t,n){const r=no(e)?e:lf(e);return r.start(T_("",r,t,n)),r.animation}const Pae=(e,t)=>e.depth-t.depth;class Nae{constructor(){this.children=[],this.isDirty=!1}add(t){c_(this.children,t),this.isDirty=!0}remove(t){u_(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Pae),this.isDirty=!1,this.children.forEach(t)}}class Dae{constructor(){this.members=[]}add(t){c_(this.members,t),t.scheduleRender()}remove(t){if(u_(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const uy={hasAnimatedSinceResize:!0,hasEverUpdated:!1},W1=["","X","Y","Z"],$ae=1e3;let Iae=0;function Y1(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function sI(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=C$(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ln,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&sI(r)}function iI({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},c=t?.()){this.id=Iae++,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(Fae),this.nodes.forEach(Bae),this.nodes.forEach(Hae),this.nodes.forEach(Uae)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new Nae)}addEventListener(a,c){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new h_),this.eventHandlers.get(a).add(c)}notifyListeners(a,...c){const u=this.eventHandlers.get(a);u&&u.notify(...c)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=$$(a)&&!Lie(a),this.instance=a;const{layoutId:c,layout:u,visualElement:f}=this.options;if(f&&!f.current&&f.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||c)&&(this.isLayoutDirty=!0),e){let h,p=0;const g=()=>this.root.updateBlockedByResize=!1;Ln.read(()=>{p=window.innerWidth}),e(a,()=>{const b=window.innerWidth;b!==p&&(p=b,this.root.updateBlockedByResize=!0,h&&h(),h=Mae(g,250),uy.hasAnimatedSinceResize&&(uy.hasAnimatedSinceResize=!1,this.nodes.forEach(O5)))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&f&&(c||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:p,hasRelativeLayoutChanged:g,layout:b})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||f.getDefaultTransition()||Yae,{onLayoutAnimationStart:x,onLayoutAnimationComplete:w}=f.getProps(),T=!this.targetLayout||!nI(this.targetLayout,b),v=!p&&g;if(this.options.layoutRoot||this.resumeFrom||v||p&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const _={...C_(y,"layout"),onPlay:x,onComplete:w};(f.shouldReduceMotion||this.options.layoutRoot)&&(_.delay=0,_.type=!1),this.startAnimation(_),this.setAnimationOrigin(h,v)}else p||O5(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=b})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Xa(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(Kae),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&sI(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h<this.path.length;h++){const p=this.path[h];p.shouldResetTransform=!0,p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:c,layout:u}=this.options;if(c===void 0&&!u)return;const f=this.getTransformTemplate();this.prevTransformTemplateValue=f?f(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(T5);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(R5);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(qae),this.nodes.forEach(zae),this.nodes.forEach(Lae)):this.nodes.forEach(R5),this.clearAllSnapshots();const c=po.now();Hr.delta=ri(0,1e3/60,c-Hr.timestamp),Hr.timestamp=c,Hr.isProcessing=!0,U1.update.process(Hr),U1.preRender.process(Hr),U1.render.process(Hr),Hr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,k_.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Vae),this.sharedNodes.forEach(Gae)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ln.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ln.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!mo(this.snapshot.measuredBox.x)&&!mo(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 u=0;u<this.path.length;u++)this.path[u].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Or(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(c=!1),c&&this.instance){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!tI(this.projectionDelta),u=this.getTransformTemplate(),f=u?u(this.latestValues,""):void 0,h=f!==this.prevTransformTemplateValue;a&&this.instance&&(c||Kl(this.latestValues)||h)&&(o(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const c=this.measurePageBox();let u=this.removeElementScroll(c);return a&&(u=this.removeTransform(u)),Xae(u),{animationId:this.root.animationId,measuredBox:c,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return Or();const c=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Qae))){const{scroll:f}=this.root;f&&($u(c.x,f.offset.x),$u(c.y,f.offset.y))}return c}removeElementScroll(a){const c=Or();if(Cs(c,a),this.scroll?.wasRoot)return c;for(let u=0;u<this.path.length;u++){const f=this.path[u],{scroll:h,options:p}=f;f!==this.root&&h&&p.layoutScroll&&(h.wasRoot&&Cs(c,a),$u(c.x,h.offset.x),$u(c.y,h.offset.y))}return c}applyTransform(a,c=!1){const u=Or();Cs(u,a);for(let f=0;f<this.path.length;f++){const h=this.path[f];!c&&h.options.layoutScroll&&h.scroll&&h!==h.root&&Iu(u,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),Kl(h.latestValues)&&Iu(u,h.latestValues)}return Kl(this.latestValues)&&Iu(u,this.latestValues),u}removeTransform(a){const c=Or();Cs(c,a);for(let u=0;u<this.path.length;u++){const f=this.path[u];if(!f.instance||!Kl(f.latestValues))continue;ox(f.latestValues)&&f.updateSnapshot();const h=Or(),p=f.measurePageBox();Cs(h,p),m5(c,f.latestValues,f.snapshot?f.snapshot.layoutBox:void 0,h)}return Kl(this.latestValues)&&m5(c,this.latestValues),c}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Hr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(a||u&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:p}=this.options;if(!this.layout||!(h||p))return;this.resolvedRelativeTargetAt=Hr.timestamp;const g=this.getClosestProjectingParent();g&&this.linkedParentVersion!==g.layoutVersion&&!g.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(g&&g.layout?this.createRelativeTarget(g,this.layout.layoutBox,g.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Or(),this.targetWithTransforms=Or()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),wae(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Cs(this.target,this.layout.layoutBox),q$(this.target,this.targetDelta)):Cs(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?this.createRelativeTarget(g,this.target,g.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||ox(this.parent.latestValues)||V$(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,c,u){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Or(),this.relativeTargetOrigin=Or(),Gy(this.relativeTargetOrigin,c,u),Cs(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const a=this.getLead(),c=!!this.resumingFrom||this!==a;let u=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Hr.timestamp&&(u=!1),u)return;const{layout:f,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||h))return;Cs(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,g=this.treeScale.y;Yie(this.layoutCorrected,this.treeScale,this.path,c),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Or());const{target:b}=a;if(!b){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(y5(this.prevProjectionDelta.x,this.projectionDelta.x),y5(this.prevProjectionDelta.y,this.projectionDelta.y)),dh(this.projectionDelta,this.layoutCorrected,b,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==g||!x5(this.projectionDelta.x,this.prevProjectionDelta.x)||!x5(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",b))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Du(),this.projectionDelta=Du(),this.projectionDeltaWithTransform=Du()}setAnimationOrigin(a,c=!1){const u=this.snapshot,f=u?u.latestValues:{},h={...this.latestValues},p=Du();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const g=Or(),b=u?u.source:void 0,y=this.layout?this.layout.source:void 0,x=b!==y,w=this.getStack(),T=!w||w.members.length<=1,v=!!(x&&!T&&this.options.crossfade===!0&&!this.path.some(Wae));this.animationProgress=0;let _;this.mixTargetDelta=S=>{const C=S/1e3;A5(p.x,a.x,C),A5(p.y,a.y,C),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Gy(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Zae(this.relativeTarget,this.relativeTargetOrigin,g,C),_&&Cae(this.relativeTarget,_)&&(this.isProjectionDirty=!1),_||(_=Or()),Cs(_,this.relativeTarget)),x&&(this.animationValues=h,Oae(h,f,this.latestValues,C,v,T)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Xa(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ln.update(()=>{uy.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=lf(0)),this.currentAnimation=jae(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),a.onUpdate&&a.onUpdate(c)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta($ae),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:c,target:u,layout:f,latestValues:h}=a;if(!(!c||!u||!f)){if(this!==a&&this.layout&&f&&aI(this.options.animationType,this.layout.layoutBox,f.layoutBox)){u=this.target||Or();const p=mo(this.layout.layoutBox.x);u.x.min=a.target.x.min,u.x.max=u.x.min+p;const g=mo(this.layout.layoutBox.y);u.y.min=a.target.y.min,u.y.max=u.y.min+g}Cs(c,u),Iu(c,h),dh(this.projectionDeltaWithTransform,this.layoutCorrected,c,h)}}registerSharedNode(a,c){this.sharedNodes.has(a)||this.sharedNodes.set(a,new Dae),this.sharedNodes.get(a).add(c);const f=c.options.initialPromotionConfig;c.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(c):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:c,preserveFollowOpacity:u}={}){const f=this.getStack();f&&f.promote(this,u),a&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let c=!1;const{latestValues:u}=a;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(c=!0),!c)return;const f={};u.z&&Y1("z",a,f,this.animationValues);for(let h=0;h<W1.length;h++)Y1(`rotate${W1[h]}`,a,f,this.animationValues),Y1(`skew${W1[h]}`,a,f,this.animationValues);a.render();for(const h in f)a.setStaticValue(h,f[h]),this.animationValues&&(this.animationValues[h]=f[h]);a.scheduleRender()}applyProjectionStyles(a,c){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=cy(c?.pointerEvents)||"",a.transform=u?u(this.latestValues,""):"none";return}const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=cy(c?.pointerEvents)||""),this.hasProjected&&!Kl(this.latestValues)&&(a.transform=u?u({},""):"none",this.hasProjected=!1);return}a.visibility="";const h=f.animationValues||f.latestValues;this.applyTransformsToTarget();let p=Tae(this.projectionDeltaWithTransform,this.treeScale,h);u&&(p=u(h,p)),a.transform=p;const{x:g,y:b}=this.projectionDelta;a.transformOrigin=`${g.origin*100}% ${b.origin*100}% 0`,f.animationValues?a.opacity=f===this?h.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:a.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const y in ix){if(h[y]===void 0)continue;const{correct:x,applyTo:w,isCSSVariable:T}=ix[y],v=p==="none"?h[y]:x(h[y],f);if(w){const _=w.length;for(let S=0;S<_;S++)a[w[S]]=v}else T?this.options.visualElement.renderState.vars[y]=v:a[y]=v}this.options.layoutId&&(a.pointerEvents=f===this?cy(c?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(T5),this.root.sharedNodes.clear()}}}function zae(e){e.updateLayout()}function Lae(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;o==="size"?os(h=>{const p=i?t.measuredBox[h]:t.layoutBox[h],g=mo(p);p.min=n[h].min,p.max=p.min+g}):aI(o,t.layoutBox,n)&&os(h=>{const p=i?t.measuredBox[h]:t.layoutBox[h],g=mo(n[h]);p.max=p.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+g)});const a=Du();dh(a,n,t.layoutBox);const c=Du();i?dh(c,e.applyTransform(r,!0),t.measuredBox):dh(c,n,t.layoutBox);const u=!tI(a);let f=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:p,layout:g}=h;if(p&&g){const b=Or();Gy(b,t.layoutBox,p.layoutBox);const y=Or();Gy(y,n,g.layoutBox),nI(b,y)||(f=!0),h.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=b,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:c,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:f})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function Fae(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 Uae(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Vae(e){e.clearSnapshot()}function T5(e){e.clearMeasurements()}function R5(e){e.isLayoutDirty=!1}function qae(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function O5(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Bae(e){e.resolveTargetDelta()}function Hae(e){e.calcProjection()}function Kae(e){e.resetSkewAndRotation()}function Gae(e){e.removeLeadSnapshot()}function A5(e,t,n){e.translate=Xn(t.translate,0,n),e.scale=Xn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function k5(e,t,n,r){e.min=Xn(t.min,n.min,r),e.max=Xn(t.max,n.max,r)}function Zae(e,t,n,r){k5(e.x,t.x,n.x,r),k5(e.y,t.y,n.y,r)}function Wae(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Yae={duration:.45,ease:[.4,0,.1,1]},M5=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),j5=M5("applewebkit/")&&!M5("chrome/")?Math.round:ds;function P5(e){e.min=j5(e.min),e.max=j5(e.max)}function Xae(e){P5(e.x),P5(e.y)}function aI(e,t,n){return e==="position"||e==="preserve-aspect"&&!Sae(w5(t),w5(n),.2)}function Qae(e){return e!==e.root&&e.scroll?.wasRoot}const Jae=iI({attachResizeListener:(e,t)=>Ph(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),X1={current:void 0},lI=iI({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!X1.current){const e=new Jae({});e.mount(window),e.setOptions({layoutScroll:!0}),X1.current=e}return X1.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),cI=A.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function ele(e=!0){const t=A.useContext(l_);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=A.useId();A.useEffect(()=>{if(e)return o(i)},[e]);const a=A.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const uI=A.createContext({strict:!1}),N5={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"]};let D5=!1;function tle(){if(D5)return;const e={};for(const t in N5)e[t]={isEnabled:n=>N5[t].some(r=>!!n[r])};L$(e),D5=!0}function fI(){return tle(),Kie()}function nle(e){const t=fI();for(const n in e)t[n]={...t[n],...e[n]};L$(t)}const rle=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 Zy(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||rle.has(e)}let dI=e=>!Zy(e);function ole(e){typeof e=="function"&&(dI=t=>t.startsWith("on")?!Zy(t):e(t))}try{ole(require("@emotion/is-prop-valid").default)}catch{}function sle(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(dI(o)||n===!0&&Zy(o)||!t&&!Zy(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const I0=A.createContext({});function ile(e,t){if($0(e)){const{initial:n,animate:r}=e;return{initial:n===!1||jh(n)?n:void 0,animate:jh(r)?r:void 0}}return e.inherit!==!1?t:{}}function ale(e){const{initial:t,animate:n}=ile(e,A.useContext(I0));return A.useMemo(()=>({initial:t,animate:n}),[$5(t),$5(n)])}function $5(e){return Array.isArray(e)?e.join(" "):e}const $_=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function hI(e,t,n){for(const r in t)!no(t[r])&&!K$(r,n)&&(e[r]=t[r])}function lle({transformTemplate:e},t){return A.useMemo(()=>{const n=$_();return N_(n,t,e),Object.assign({},n.vars,n.style)},[t])}function cle(e,t){const n=e.style||{},r={};return hI(r,n,e),Object.assign(r,lle(e,t)),r}function ule(e,t){const n={},r=cle(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const pI=()=>({...$_(),attrs:{}});function fle(e,t,n,r){const o=A.useMemo(()=>{const i=pI();return G$(i,t,W$(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};hI(i,e.style,e),o.style={...i,...o.style}}return o}const dle=["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 I_(e){return typeof e!="string"||e.includes("-")?!1:!!(dle.indexOf(e)>-1||/[A-Z]/u.test(e))}function hle(e,t,n,{latestValues:r},o,i=!1,a){const u=(a??I_(e)?fle:ule)(t,r,o,e),f=sle(t,typeof e=="string",i),h=e!==A.Fragment?{...f,...u,ref:n}:{},{children:p}=t,g=A.useMemo(()=>no(p)?p.get():p,[p]);return A.createElement(e,{...h,children:g})}function ple({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:mle(n,r,o,e),renderState:t()}}function mle(e,t,n,r){const o={},i=r(e,{});for(const g in i)o[g]=cy(i[g]);let{initial:a,animate:c}=e;const u=$0(e),f=z$(e);t&&f&&!u&&e.inherit!==!1&&(a===void 0&&(a=t.initial),c===void 0&&(c=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const p=h?c:a;if(p&&typeof p!="boolean"&&!D0(p)){const g=Array.isArray(p)?p:[p];for(let b=0;b<g.length;b++){const y=R_(e,g[b]);if(y){const{transitionEnd:x,transition:w,...T}=y;for(const v in T){let _=T[v];if(Array.isArray(_)){const S=h?_.length-1:0;_=_[S]}_!==null&&(o[v]=_)}for(const v in x)o[v]=x[v]}}}return o}const mI=e=>(t,n)=>{const r=A.useContext(I0),o=A.useContext(l_),i=()=>ple(e,t,r,o);return n?i():Ooe(i)},gle=mI({scrapeMotionValuesFromProps:D_,createRenderState:$_}),yle=mI({scrapeMotionValuesFromProps:Y$,createRenderState:pI}),vle=Symbol.for("motionComponentSymbol");function ble(e,t,n){const r=A.useRef(n);A.useInsertionEffect(()=>{r.current=n});const o=A.useRef(null);return A.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const a=r.current;if(typeof a=="function")if(i){const c=a(i);typeof c=="function"&&(o.current=c)}else o.current?(o.current(),o.current=null):a(i);else a&&(a.current=i)},[t])}const gI=A.createContext({});function eh(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Sle(e,t,n,r,o,i){const{visualElement:a}=A.useContext(I0),c=A.useContext(uI),u=A.useContext(l_),f=A.useContext(cI).reducedMotion,h=A.useRef(null);r=r||c.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:a,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:f,isSVG:i}));const p=h.current,g=A.useContext(gI);p&&!p.projection&&o&&(p.type==="html"||p.type==="svg")&&wle(h.current,n,o,g);const b=A.useRef(!1);A.useInsertionEffect(()=>{p&&b.current&&p.update(n,u)});const y=n[_$],x=A.useRef(!!y&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return Aoe(()=>{p&&(b.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),x.current&&p.animationState&&p.animationState.animateChanges())}),A.useEffect(()=>{p&&(!x.current&&p.animationState&&p.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),x.current=!1),p.enteringChildren=void 0)}),p}function wle(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:c,layoutScroll:u,layoutRoot:f,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:yI(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||c&&eh(c),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:u,layoutRoot:f})}function yI(e){if(e)return e.options.allowProjection!==!1?e.projection:yI(e.parent)}function Q1(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&nle(r);const i=n?n==="svg":I_(e),a=i?yle:gle;function c(f,h){let p;const g={...A.useContext(cI),...f,layoutId:xle(f)},{isStatic:b}=g,y=ale(f),x=a(f,b);if(!b&&UD){Ele();const w=_le(g);p=w.MeasureLayout,y.visualElement=Sle(e,x,g,o,w.ProjectionNode,i)}return M.jsxs(I0.Provider,{value:y,children:[p&&y.visualElement?M.jsx(p,{visualElement:y.visualElement,...g}):null,hle(e,f,ble(x,y.visualElement,h),x,b,t,i)]})}c.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const u=A.forwardRef(c);return u[vle]=e,u}function xle({layoutId:e}){const t=A.useContext(FD).id;return t&&e!==void 0?t+"-"+e:e}function Ele(e,t){A.useContext(uI).strict}function _le(e){const t=fI(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function Cle(e,t){if(typeof Proxy>"u")return Q1;const n=new Map,r=(i,a)=>Q1(i,a,e,t),o=(i,a)=>r(i,a);return new Proxy(o,{get:(i,a)=>a==="create"?r:(n.has(a)||n.set(a,Q1(a,void 0,e,t)),n.get(a))})}const Tle=(e,t)=>t.isSVG??I_(e)?new cae(t):new rae(t,{allowProjection:e!==A.Fragment});class Rle extends ul{constructor(t){super(t),t.animationState||(t.animationState=pae(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();D0(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let Ole=0;class Ale extends ul{constructor(){super(...arguments),this.id=Ole++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const kle={animation:{Feature:Rle},exit:{Feature:Ale}};function mp(e){return{point:{x:e.pageX,y:e.pageY}}}const Mle=e=>t=>M_(t)&&e(t,mp(t));function hh(e,t,n,r){return Ph(e,t,Mle(n),r)}const vI=({current:e})=>e?e.ownerDocument.defaultView:null,I5=(e,t)=>Math.abs(e-t);function jle(e,t){const n=I5(e.x,t.x),r=I5(e.y,t.y);return Math.sqrt(n**2+r**2)}const z5=new Set(["auto","scroll"]);class bI{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:c}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=b=>{this.handleScroll(b.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=eS(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,x=jle(b.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!x)return;const{point:w}=b,{timestamp:T}=Hr;this.history.push({...w,timestamp:T});const{onStart:v,onMove:_}=this.handlers;y||(v&&v(this.lastMoveEvent,b),this.startEvent=this.lastMoveEvent),_&&_(this.lastMoveEvent,b)},this.handlePointerMove=(b,y)=>{this.lastMoveEvent=b,this.lastMoveEventInfo=J1(y,this.transformPagePoint),Ln.update(this.updatePoint,!0)},this.handlePointerUp=(b,y)=>{this.end();const{onEnd:x,onSessionEnd:w,resumeAnimation:T}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&T&&T(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=eS(b.type==="pointercancel"?this.lastMoveEventInfo:J1(y,this.transformPagePoint),this.history);this.startEvent&&x&&x(b,v),w&&w(b,v)},!M_(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=o||window;const u=mp(t),f=J1(u,this.transformPagePoint),{point:h}=f,{timestamp:p}=Hr;this.history=[{...h,timestamp:p}];const{onSessionStart:g}=n;g&&g(t,eS(f,this.history)),this.removeListeners=dp(hh(this.contextWindow,"pointermove",this.handlePointerMove),hh(this.contextWindow,"pointerup",this.handlePointerUp),hh(this.contextWindow,"pointercancel",this.handlePointerUp)),c&&this.startScrollTracking(c)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(z5.has(r.overflowX)||z5.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:o.x-n.x,y:o.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,o),Ln.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Xa(this.updatePoint)}}function J1(e,t){return t?{point:t(e.point)}:e}function L5(e,t){return{x:e.x-t.x,y:e.y-t.y}}function eS({point:e},t){return{point:e,delta:L5(e,SI(t)),offset:L5(e,Ple(t)),velocity:Nle(t,.1)}}function Ple(e){return e[0]}function SI(e){return e[e.length-1]}function Nle(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=SI(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>zi(t)));)n--;if(!r)return{x:0,y:0};const i=cs(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Dle(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Xn(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Xn(n,e,r.max):Math.min(e,n)),e}function F5(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function $le(e,{top:t,left:n,bottom:r,right:o}){return{x:F5(e.x,n,o),y:F5(e.y,t,r)}}function U5(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Ile(e,t){return{x:U5(e.x,t.x),y:U5(e.y,t.y)}}function zle(e,t){let n=.5;const r=mo(e),o=mo(t);return o>r?n=Ah(t.min,t.max-r,e.min):r>o&&(n=Ah(e.min,e.max-o,t.min)),ri(0,1,n)}function Lle(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const ax=.35;function Fle(e=ax){return e===!1?e=0:e===!0&&(e=ax),{x:V5(e,"left","right"),y:V5(e,"top","bottom")}}function V5(e,t,n){return{min:q5(e,t),max:q5(e,n)}}function q5(e,t){return typeof e=="number"?e:e[t]||0}const Ule=new WeakMap;class Vle{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=Or(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const i=p=>{n?(this.stopAnimation(),this.snapToCursor(mp(p).point)):this.pauseAnimation()},a=(p,g)=>{this.stopAnimation();const{drag:b,dragPropagation:y,onDragStart:x}=this.getProps();if(b&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Nie(b),!this.openDragLock))return;this.latestPointerEvent=p,this.latestPanInfo=g,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),os(T=>{let v=this.getAxisMotionValue(T).get()||0;if(ei.test(v)){const{projection:_}=this.visualElement;if(_&&_.layout){const S=_.layout.layoutBox[T];S&&(v=mo(S)*(parseFloat(v)/100))}}this.originPoint[T]=v}),x&&Ln.postRender(()=>x(p,g)),ex(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},c=(p,g)=>{this.latestPointerEvent=p,this.latestPanInfo=g;const{dragPropagation:b,dragDirectionLock:y,onDirectionLock:x,onDrag:w}=this.getProps();if(!b&&!this.openDragLock)return;const{offset:T}=g;if(y&&this.currentDirection===null){this.currentDirection=qle(T),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",g.point,T),this.updateAxis("y",g.point,T),this.visualElement.render(),w&&w(p,g)},u=(p,g)=>{this.latestPointerEvent=p,this.latestPanInfo=g,this.stop(p,g),this.latestPointerEvent=null,this.latestPanInfo=null},f=()=>os(p=>this.getAnimationState(p)==="paused"&&this.getAxisMotionValue(p).animation?.play()),{dragSnapToOrigin:h}=this.getProps();this.panSession=new bI(t,{onSessionStart:i,onStart:a,onMove:c,onSessionEnd:u,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:h,distanceThreshold:r,contextWindow:vI(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!o||!r)return;const{velocity:a}=o;this.startAnimation(a);const{onDragEnd:c}=this.getProps();c&&Ln.postRender(()=>c(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Ig(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Dle(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&eh(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=$le(r.layoutBox,t):this.constraints=!1,this.elastic=Fle(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&os(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=Lle(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!eh(t))return!1;const r=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=Xie(r,o.root,this.visualElement.getTransformPagePoint());let a=Ile(o.layout.layoutBox,i);if(n){const c=n(Zie(a));this.hasMutatedConstraints=!!c,c&&(a=U$(c))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:c}=this.getProps(),u=this.constraints||{},f=os(h=>{if(!Ig(h,n,this.currentDirection))return;let p=u&&u[h]||{};a&&(p={min:0,max:0});const g=o?200:1e6,b=o?40:1e7,y={type:"inertia",velocity:r?t[h]:0,bounceStiffness:g,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...i,...p};return this.startAxisValueAnimation(h,y)});return Promise.all(f).then(c)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return ex(this.visualElement,t),r.start(T_(t,r,0,n,this.visualElement,!1))}stopAnimation(){os(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){os(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){os(n=>{const{drag:r}=this.getProps();if(!Ig(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:c}=o.layout.layoutBox[n],u=i.get()||0;i.set(t[n]-Xn(a,c,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!eh(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};os(a=>{const c=this.getAxisMotionValue(a);if(c&&this.constraints!==!1){const u=c.get();o[a]=zle({min:u,max:u},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),os(a=>{if(!Ig(a,t,null))return;const c=this.getAxisMotionValue(a),{min:u,max:f}=this.constraints[a];c.set(Xn(u,f,o[a]))})}addListeners(){if(!this.visualElement.current)return;Ule.set(this.visualElement,this);const t=this.visualElement.current,n=hh(t,"pointerdown",u=>{const{drag:f,dragListener:h=!0}=this.getProps();f&&h&&!D$(u.target)&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();eh(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Ln.read(r);const a=Ph(window,"resize",()=>this.scalePositionWithinConstraints()),c=o.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:f})=>{this.isDragging&&f&&(os(h=>{const p=this.getAxisMotionValue(h);p&&(this.originPoint[h]+=u[h].translate,p.set(p.get()+u[h].translate))}),this.visualElement.render())}));return()=>{a(),n(),i(),c&&c()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:a=ax,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:c}}}function Ig(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function qle(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Ble extends ul{constructor(t){super(t),this.removeGroupControls=ds,this.removeListeners=ds,this.controls=new Vle(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ds}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const B5=e=>(t,n)=>{e&&Ln.postRender(()=>e(t,n))};class Hle extends ul{constructor(){super(...arguments),this.removePointerDownListener=ds}onPointerDown(t){this.session=new bI(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:vI(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:B5(t),onStart:B5(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&Ln.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=hh(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let tS=!1;class Kle extends A.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),tS&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),uy.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:a}=r;return a&&(a.isPresent=i,tS=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||Ln.postRender(()=>{const c=a.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),k_.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;tS=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function wI(e){const[t,n]=ele(),r=A.useContext(FD);return M.jsx(Kle,{...e,layoutGroup:r,switchLayoutGroup:A.useContext(gI),isPresent:t,safeToRemove:n})}const Gle={pan:{Feature:Hle},drag:{Feature:Ble,ProjectionNode:lI,MeasureLayout:wI}};function H5(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&Ln.postRender(()=>i(t,mp(t)))}class Zle extends ul{mount(){const{current:t}=this.node;t&&(this.unmount=Die(t,(n,r)=>(H5(this.node,r,"Start"),o=>H5(this.node,o,"End"))))}unmount(){}}class Wle extends ul{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=dp(Ph(this.node.current,"focus",()=>this.onFocus()),Ph(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function K5(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&Ln.postRender(()=>i(t,mp(t)))}class Yle extends ul{mount(){const{current:t}=this.node;t&&(this.unmount=zie(t,(n,r)=>(K5(this.node,r,"Start"),(o,{success:i})=>K5(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const lx=new WeakMap,nS=new WeakMap,Xle=e=>{const t=lx.get(e.target);t&&t(e)},Qle=e=>{e.forEach(Xle)};function Jle({root:e,...t}){const n=e||document;nS.has(n)||nS.set(n,{});const r=nS.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(Qle,{root:e,...t})),r[o]}function ece(e,t,n){const r=Jle(t);return lx.set(e,n),r.observe(e),()=>{lx.delete(e),r.unobserve(e)}}const tce={some:0,all:1};class nce extends ul{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:tce[o]},c=u=>{const{isIntersecting:f}=u;if(this.isInView===f||(this.isInView=f,i&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:h,onViewportLeave:p}=this.node.getProps(),g=f?h:p;g&&g(u)};return ece(this.node.current,a,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(rce(t,n))&&this.startObserver()}unmount(){}}function rce({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const oce={inView:{Feature:nce},tap:{Feature:Yle},focus:{Feature:Wle},hover:{Feature:Zle}},sce={layout:{ProjectionNode:lI,MeasureLayout:wI}},ice={...kle,...oce,...Gle,...sce},G5=Cle(ice,Tle),xI=Lo.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 M.jsx("div",{className:Et("absolute h-full w-full inset-0 mask-size-[40px] mask-repeat-[no-repeat] flex items-center justify-center",e),children:M.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:[M.jsx("title",{children:"Background Beams"}),M.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((n,r)=>M.jsx(G5.path,{d:n,stroke:`url(#linearGradient-${r})`,strokeOpacity:"0.4",strokeWidth:"0.5"},`path-${r}`)),M.jsxs("defs",{children:[t.map((n,r)=>M.jsxs(G5.linearGradient,{id:`linearGradient-${r}`,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:[M.jsx("stop",{stopColor:"#000000",stopOpacity:"0"}),M.jsx("stop",{stopColor:"#111111"}),M.jsx("stop",{offset:"32.5%",stopColor:"#666666"}),M.jsx("stop",{offset:"100%",stopColor:"#FFFFFF",stopOpacity:"0"})]},`gradient-${r}`)),M.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:[M.jsx("stop",{offset:"0.0666667",stopColor:"var(--neutral-300)"}),M.jsx("stop",{offset:"0.243243",stopColor:"var(--neutral-300)"}),M.jsx("stop",{offset:"0.43594",stopColor:"white",stopOpacity:"0"})]})]})]})})});xI.displayName="BackgroundBeams";const ace=()=>M.jsxs(M.Fragment,{children:[M.jsx(xI,{className:"absolute inset-0"}),M.jsx("div",{className:"relative z-10 flex-1 flex items-center justify-center",children:M.jsxs("div",{className:"text-center",children:[M.jsx("h1",{className:"text-2xl font-semibold text-foreground mb-2",children:"Welcome to Skybridge"}),M.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose a tool from the sidebar to begin"})]})})]});function Wt(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 lce(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),Wt(e.additionalItems)}function Z5(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 Li="__additional_property",Wy="additionalProperties",Ja="allOf",Xt="anyOf",ms="const",z0="default",z_="dependencies",cce="enum",Zr="__errors",Tn="$id",uce="if",cf="items",fce="_$junk_option_schema_id$_",fy="$name",Pt="oneOf",cx="patternProperties",sn="properties",rS="readonly",EI="required",Yy="submitButtonOptions",Fn="$ref",th="$schema",_I="root",CI="_",dce=["discriminator","propertyName"],W5="formContext",hce="layoutGridLookupMap",L_="__rjsf_additionalProperties",TI="__rjsf_rootSchema",pce="ui:field",F_="ui:widget",za="ui:options",ux="ui:globalOptions",mce="https://json-schema.org/draft/2019-09/schema",dy="https://json-schema.org/draft/2020-12/schema";function ut(e={},t={}){return e?Object.keys(e).filter(n=>n.indexOf("ui:")===0).reduce((n,r)=>{const o=e[r];return r===F_&&Wt(o)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),n):r===za&&Wt(o)?{...n,...o}:{...n,[r.substring(3)]:o}},{...t}):{...t}}function RI(e,t={},n){if(!(e.additionalProperties||e.patternProperties))return!1;const{expandable:r=!0}=ut(t);return r===!1?r:e.maxProperties!==void 0&&n?Object.keys(n).length<e.maxProperties:!0}function fx(e){const t={[Zr]:[],addError(n){this[Zr].push(n)}};if(Array.isArray(e))return e.reduce((n,r,o)=>({...n,[o]:fx(r)}),t);if(Ka(e)){const n=e;return Object.keys(n).reduce((r,o)=>({...r,[o]:fx(n[o])}),t)}return t}function Pn(e,t){return hG(e,t,(n,r)=>{if(typeof n=="function"&&typeof r=="function")return!0})}const gce=Object.prototype;function nh(e){for(const t in e)if(gce.hasOwnProperty.call(e,t))return!1;return!0}const yce=["array","boolean","integer","null","number","object","string"];new Set(yce);const vce=["$defs","definitions","properties","patternProperties","dependencies"];new Set(vce);const bce=["items","allOf","oneOf","anyOf"];new Set(bce);const Sce=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(Sce);function hy(e){return typeof e=="object"}function Ks(e){return hy(e)?nh(e):e===!0}function zu(e,t){return e<t?-1:e>t?1:0}function oS(e,t){const n=e.length;if(n===0)return t;let r=t.length;if(r===0)return e;if(n<r){const i=e;e=t,t=i,r=n}const o=new Set(e);for(let i=0;i<r;i++)o.add(t[i]);return Array.from(o)}function wce(e,t){const n=[];if(e.length===0||t.length===0)return n;if(e.length>t.length){const o=e;e=t,t=o}const r=new Set(t);for(let o=0;o<e.length&&r.size>0;o++){const i=e[o];r.delete(i)&&n.push(i)}return n}function Y5(e){return e.length===0}function sS(e){return(t,n)=>{const r=t.length-n.length;if(r!==0)return r;for(let o=0;o<t.length;o++)if(t[o]!==n[o]){const i=e(t[o],n[o]);if(i!==0)return i}return 0}}function OI(e,{threshold:t=12}={}){return n=>{const r=n.length;if(r===0)return n;if(r<=t){const a=[];let c=0;e:for(let u=0;u<r;u++){const f=n[u];for(let h=0;h<c;h++)if(e(f,a[h])===0)continue e;c=a.push(f)}return a}const o=n.slice().sort(e);let i=0;for(let a=1;a<r;a++)e(o[i],o[a])!==0&&++i!==a&&(o[i]=o[a]);return o.length=i+1,o}}function xce(e){return(t,n)=>{const r=[];let o=t.length,i=n.length;if(o===0||i===0)return r;if(o>i){const h=t;t=n,n=h;const p=o;o=i,i=p}const a=[...t].sort(e),c=[...n].sort(e);let u=0,f=0;for(;u<o&&f<i;){const h=e(a[u],c[f]);h===0?((r.length===0||e(r[r.length-1],a[u])!==0)&&r.push(a[u]),u++,f++):h<0?u++:f++}return r}}function Ece(e,t){return n=>{if(e.has(n))return e.get(n);const r=t(n);return e.set(n,r),r}}const X5=Ece,AI=()=>0,_ce=e=>e===void 0,Cce=e=>typeof e!="object",Q5={boolean:0,number:1,string:2};function Tce(e,t){const n=typeof e,r=typeof t;return n===r?zu(e,t):Q5[n]-Q5[r]}function Rce(e,t){const n=e.length;if(n===0)return t;const r=t.length;if(r===0)return e;if(r>n){const a=e;e=t,t=a}const o=new Set(e),i=t.length;for(let a=0;a<i;a++){const c=t[a];o.has(c)||e.push(c)}return e}function L0(e,t,n=AI){return(r,o)=>e(r)?e(o)?n(r,o):-1:e(o)?1:t(r,o)}function _u(e){return L0(_ce,e)}function Oa(e,t){return L0(n=>n===void 0||e(n),t)}function iS(e,t){return L0(Array.isArray,e,t)}const yr=_u(zu),aS=Oa(e=>e===0,(e,t)=>e-t);function Oce({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){const n=X5(t,x=>Object.keys(x).sort());function r(x){return(w,T)=>{const v=n(w),_=n(T),S=Math.min(v.length,_.length);for(let C=0;C<S;C++){const E=zu(v[C],_[C]);if(E!==0)return E}if(v.length!==_.length)return v.length-_.length;for(let C=0;C<S;C++){const E=v[C],O=x(w[E],T[E]);if(O!==0)return O}return 0}}function o(x){const w=sS(x),T=X5(e,OI(x,{threshold:0}));return(v,_)=>w(T(v),T(_))}const i=o(zu);function a(x,w){if(hy(x)){if(hy(w)){const T=Object.keys(x),v=Object.keys(w),_=Rce(T,v),S=_.length;for(let C=0;C<S;C++){const E=_[C];if(x[E]===w[E])continue;const j=(y[E]??c)(x[E],w[E]);if(j!==0)return j}return 0}return w===!0&&nh(x)?0:1}return hy(w)?x===!0&&nh(w)?0:-1:zu(x,w)}const c=_u(f),u=L0(Cce,iS(r(c),sS(f)),Tce);function f(x,w){return x===null?-1:w===null?1:u(x,w)}const h=_u(a),p=Oa(nh,r(h)),g=_u(o(a)),b=Oa(Ks,a),y={$id:yr,$comment:yr,$defs:p,$ref:yr,$schema:yr,const:c,contains:h,contentEncoding:yr,contentMediaType:yr,default:c,definitions:p,description:yr,else:h,examples:c,exclusiveMaximum:yr,exclusiveMinimum:yr,format:yr,if:h,maximum:yr,maxItems:yr,maxLength:yr,maxProperties:yr,minimum:yr,multipleOf:yr,not:h,pattern:yr,propertyNames:h,readOnly:yr,then:h,title:yr,writeOnly:yr,uniqueItems:Oa(x=>x===!1,AI),minLength:aS,minItems:aS,minProperties:aS,required:Oa(Y5,i),enum:Oa(Y5,o(f)),type:_u((x,w)=>{const T=Array.isArray(x),v=Array.isArray(w);return!T&&!v?zu(x,w):i(T?x:[x],v?w:[w])}),items:Oa(x=>!Array.isArray(x)&&Ks(x),iS(a,sS(a))),anyOf:g,allOf:g,oneOf:g,properties:p,patternProperties:p,additionalProperties:b,additionalItems:b,dependencies:Oa(nh,r(_u(iS(a,i))))};return{compareSchemaValues:f,compareSchemaDefinitions:a}}function J5(e){return e}const kI=(e,t)=>e?kI(t%e,e):t,Ace=(e,t)=>Math.abs(e*t)/kI(e,t);function kce(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function*lS(e,t,n){const r=e.length,o=t.length;if(r>0&&o>0)for(let i=0;i<r;i++){const a=e[i];for(let c=0;c<o;c++)yield n(a,t[c])}}function cS(e,t){return e||t}function ej(e){return(t,n)=>{const r={...t},o=Object.keys(n),i=o.length;for(let a=0;a<i;a++){const c=o[a];r[c]=t[c]===void 0?n[c]:e(t[c],n[c])}return r}}function Mce(e){const t=new Map;for(const n of e)for(const r of n[0])t.set(r,n[1]);return t}function Ul(e,t,n){n===void 0||Ks(n)?delete e[t]:e[t]=n}const jce=["properties","patternProperties","additionalProperties"];function tj(e){const t=Object.keys(e),n=t.length,r=[];for(let o=0;o<n;o++){const i=t[o];r.push({regExp:new RegExp(i),schema:e[i]})}return[r,t]}const nj=[[],[]];function rj(e,t,n){const r=n.length;for(let o=0;o<r;o++){const i=n[o];if(!i.regExp.test(t))continue;const a=i.schema;if(a===!1)return!0;e.push(a)}return!1}const Pce=["items","additionalItems"],Nce=["if","then","else"];function oj(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 uS(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 Vl(e,t,n){return[e,t,n]}function Dce(e){const t=new Map;for(const[n,r,o]of e){const i=a=>{if(!o(a))throw new Error(`Schema keys '${n}' and '${r}' are conflicting (${n}: ${JSON.stringify(a[n])}, ${r}: ${JSON.stringify(a[r])})`)};for(const a of[[n,r],[r,n]]){let c=t.get(a[0]);c===void 0&&(c=[],t.set(a[0],c)),c.push({oppositeKey:a[1],check:i})}}return t}const $ce=[Vl("minimum","maximum",e=>e.maximum>=e.minimum),Vl("exclusiveMinimum","maximum",e=>e.maximum>e.exclusiveMinimum),Vl("minimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.minimum),Vl("exclusiveMinimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.exclusiveMinimum),Vl("minLength","maxLength",e=>e.maxLength>=e.minLength),Vl("minItems","maxItems",e=>e.maxItems>=e.minItems),Vl("minProperties","maxProperties",e=>e.maxProperties>=e.minProperties)];function Ice({mergePatterns:e=kce,isSubRegExp:t=Object.is,intersectJson:n=wce,deduplicateJsonSchemaDef:r=J5,defaultMerger:o=J5,assigners:i=[],checks:a=$ce,mergers:c}={}){function u(S){const C=S.length;let E=S[0];for(let O=1;O<C;O++){const j=T(E,S[O]);if(j===!1)return!1;Ks(j)||(E=j)}return E}function f(S,C,E,O,j,P,N){if(S.length=0,E===!1)return!1;if(S.push(E),j!==void 0){if(j===!1)return!1;S.push(j)}if(rj(S,C,P))return!1;const L=S.length<2;if(N===!1){if(L)return;if(rj(S,C,O))return!1}else L&&N!==void 0&&S.push(N);return S.length===1?S[0]:u(S)}function h(S,C,E,O,j,P){const N=E.length;if(N>0&&j!==!1)if(P)Object.assign(S,C);else for(let D=0;D<N;D++){const L=E[D];O.has(L)||(S[L]=T(C[L],j))}return S}const p=(S,{properties:C={},patternProperties:E,additionalProperties:O=!0},{properties:j={},patternProperties:P,additionalProperties:N=!0})=>{const D=Ks(O),L=Ks(N);if(D&&L)return Ul(S,"properties",v(C,j)),Ul(S,"patternProperties",E&&P?v(E,P):E??P),delete S.additionalProperties,S;const U=T(O,N);Ul(S,"additionalProperties",U);const X={},Q=Object.keys(C),Z=Q.length,[q,G]=E?tj(E):nj,[oe,ne]=P?tj(P):nj,$=[],F=new Set,V=L?void 0:N;for(let me=0;me<Z;me++){const Ce=Q[me];F.add(Ce);const ee=f($,Ce,C[Ce],q,j[Ce],oe,V);ee!==void 0&&(X[Ce]=ee)}const I=Object.keys(j),K=I.length,te=D?void 0:O;for(let me=0;me<K;me++){const Ce=I[me];if(F.has(Ce))continue;const ee=f($,Ce,j[Ce],oe,void 0,q,te);ee!==void 0&&(X[Ce]=ee)}Ul(S,"properties",X);let re={};const ie=new Set;if(G.length>0&&ne.length>0){const me=lS(G,ne,(Ce,ee)=>{t(Ce,ee)&&ie.add(Ce),t(ee,Ce)&&ie.add(ee),re[e(Ce,ee)]=T(E[Ce],P[ee])});for(;!me.next().done;);}return re=h(re,E,G,ie,N,L),re=h(re,P,ne,ie,O,D),Ul(S,"patternProperties",re),S},g=(S,{items:C=[],additionalItems:E},{items:O=[],additionalItems:j})=>{const P=Array.isArray(C),N=Array.isArray(O),D=[];if(S.items=D,P&&N){const[L,U,X]=C.length<O.length?[C.length,E,O]:[O.length,j,C];let Q=0;for(;Q<L;Q++)D.push(T(C[Q],O[Q]));if(U===!1)S.additionalItems=!1;else{const Z=U===void 0||Ks(U);for(;Q<X.length;Q++)D.push(Z?X[Q]:T(X[Q],U));Ul(S,"additionalItems",E!==void 0&&j!==void 0?T(E,j):E??j)}}else if(P||N){const[L,U,X]=P?[C,O,E]:[O,C,j];Ul(S,"additionalItems",X&&T(X,U));for(let Q=0;Q<L.length;Q++)D.push(T(L[Q],U))}else delete S.additionalItems,S.items=T(C,O);return S},b=(S,C,E)=>{oj(S,C);const O=oj({},E);return S.allOf===void 0?S.allOf=[O]:S.allOf=S.allOf.concat(O),S};function y(S,C){return r(Array.from(lS(S,C,T)))}const x=Mce([[jce,p],[Pce,g],[Nce,b],...i]),w=Dce(a);function T(S,C){if(S===!1||C===!1)return!1;if(Ks(S))return Ks(C)?!0:C;if(Ks(C))return S;let E={...S};const O=new Set,j=new Set,P=Object.keys(C),N=P.length;for(let D=0;D<N;D++){const L=P[D],U=C[L];if(U===void 0)continue;const X=w.get(L);if(X!==void 0){const G=X.length;for(let oe=0;oe<G;oe++){const ne=X[oe];S[ne.oppositeKey]!==void 0&&j.add(ne.check)}}const Q=S[L];if(Q===void 0){E[L]=U;continue}const Z=x.get(L);if(Z){O.add(Z);continue}const q=_[L]??o;E[L]=q(Q,U)}for(const D of O)E=D(E,S,C);for(const D of j)D(E);return E}const v=ej(T),_={$id:o,$ref:o,$schema:o,$comment:o,$defs:v,definitions:v,type:(S,C)=>{if(S===C)return S;const E=Array.isArray(S),O=Array.isArray(C);if(!E&&!O){const j=uS(S,C);if(j!==void 0)return j}else if(E||O){const j=new Set;if(E&&O)for(const N of lS(S,C,uS))N!==void 0&&j.add(N);else{const N=E?S:C,D=E?C:S,L=N.length;for(let U=0;U<L;U++){const X=uS(D,N[U]);X!==void 0&&j.add(X)}}const P=j.size;if(P===1)return j.values().next().value;if(P>1)return Array.from(j)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${S.toString()}, ${C.toString()}`)},default:o,description:o,title:o,const:o,format:o,contentEncoding:o,contentMediaType:o,not:(S,C)=>{const E=r([S,C]);return E.length===1?E[0]:{anyOf:E}},pattern:e,readOnly:cS,writeOnly:cS,enum:(S,C)=>{const E=n(S,C);if(E.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(S)}", "${JSON.stringify(C)}"`);return E},anyOf:y,oneOf:y,allOf:(S,C)=>r(S.concat(C)),propertyNames:T,contains:T,dependencies:ej((S,C)=>Array.isArray(S)?Array.isArray(C)?oS(S,C):T(C,{required:S}):Array.isArray(C)?T(S,{required:C}):T(S,C)),examples:(S,C)=>{if(!Array.isArray(S)||!Array.isArray(C))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(S)}" and "${JSON.stringify(C)}"`);return oS(S,C)},multipleOf:(S,C)=>{let E=1;for(;!Number.isInteger(S)||!Number.isInteger(C);)E*=10,S*=10,C*=10;return Ace(S,C)/E},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:cS,required:oS,...c};return{mergeSchemaDefinitions:T,mergeArrayOfSchemaDefinitions:u}}function zce(e){const t=[],n=[e];for(;n.length>0;){const r=n.pop();if(typeof r=="boolean"||r.allOf===void 0){t.push(r);continue}const{allOf:o,...i}=r;t.push(i);for(let a=o.length-1;a>=0;a--)n.push(o[a])}return t}function Lce(e){return t=>e(zce(t))}var Bd={},sj;function Fce(){if(sj)return Bd;sj=1;var e=/~/,t=/~[01]/g;function n(f){switch(f){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+f)}function r(f){return e.test(f)?f.replace(t,n):f}function o(f,h,p){for(var g,b,y=1,x=h.length;y<x;){if(h[y]==="constructor"||h[y]==="prototype"||h[y]==="__proto__")return f;if(g=r(h[y++]),b=x>y,typeof f[g]>"u"&&(Array.isArray(f)&&g==="-"&&(g=f.length),b&&(h[y]!==""&&h[y]<1/0||h[y]==="-"?f[g]=[]:f[g]={})),!b)break;f=f[g]}var w=f[g];return p===void 0?delete f[g]:f[g]=p,w}function i(f){if(typeof f=="string"){if(f=f.split("/"),f[0]==="")return f;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(f)){for(const h of f)if(typeof h!="string"&&typeof h!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return f}throw new Error("Invalid JSON pointer.")}function a(f,h){if(typeof f!="object")throw new Error("Invalid input object.");h=i(h);var p=h.length;if(p===1)return f;for(var g=1;g<p;){if(f=f[r(h[g++])],p===g)return f;if(typeof f!="object"||f===null)return}}function c(f,h,p){if(typeof f!="object")throw new Error("Invalid input object.");if(h=i(h),h.length===0)throw new Error("Invalid JSON pointer for set.");return o(f,h,p)}function u(f){var h=i(f);return{get:function(p){return a(p,h)},set:function(p,g){return c(p,h,g)}}}return Bd.get=a,Bd.set=c,Bd.compile=u,Bd}var Uce=Fce();const fS=ii(Uce);var Vce=aD();const U_=ii(Vce);function Xy(e,t){if(Tn in e&&U_.equal(e[Tn],t))return e;for(const n of Object.values(e))if(Array.isArray(n)){for(const r of n)if(Qt(r)){const o=Xy(r,t);if(o!==void 0)return o}}else if(Qt(n)){const r=Xy(n,t);if(r!==void 0)return r}}function dx(e,t){const n=Ie(e,Tn,t);Fn in e&&(e={...e,[Fn]:U_.resolve(n,e[Fn])});for(const[r,o]of Object.entries(e))Array.isArray(o)?e={...e,[r]:o.map(i=>Qt(i)?dx(i,n):i)}:Qt(o)&&(e={...e,[r]:dx(o,n)});return e}function V_(e,t){const n=t[e];return[Ch(t,[e]),n]}function MI(e,t={},n=[],r=Ie(t,[Tn])){const o=e||"";let i;if(o.startsWith("#")){const c=decodeURIComponent(o.substring(1));r===void 0||Tn in t&&t[Tn]===r?i=fS.get(t,c):t[th]===dy&&(i=Xy(t,r.replace(/\/$/,"")),i!==void 0&&(i=fS.get(i,c)))}else if(t[th]===dy){const c=r?U_.resolve(r,o):o,[u,...f]=c.replace(/#\/?$/,"").split("#");i=Xy(t,u.replace(/\/$/,"")),i!==void 0&&(r=i[Tn],wr(f)||(i=fS.get(i,decodeURIComponent(f.join("#")))))}if(i===void 0)throw new Error(`Could not find a definition for ${e}.`);const a=i[Fn];if(a){if(n.includes(a)){if(n.length===1)throw new Error(`Definition for ${e} is a circular reference`);const[h,...p]=n,g=[...p,o,h].join(" -> ");throw new Error(`Definition for ${h} contains a circular reference through ${g}`)}const[c,u]=V_(Fn,i),f=MI(u,t,[...n,o],r);return Object.keys(c).length>0?t[th]===mce||t[th]===dy?{[Ja]:[c,f]}:{...c,...f}:f}return i}function jI(e,t={},n=Ie(t,[Tn])){return MI(e,t,[],n)}function oi(e){let t;const n=Ie(e,dce);return Ga(n)?t=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),t}function Nh(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 Ms(e){let{type:t}=e;return!t&&e.const?Nh(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(n=>n!=="null"):t=t[0]),t)}function qi(e,t){const n=Object.assign({},e);return Object.keys(t).reduce((r,o)=>{const i=e?e[o]:{},a=t[o];return e&&o in e&&Wt(a)?r[o]=qi(i,a):e&&t&&(Ms(e)==="object"||Ms(t)==="object")&&o===EI&&Array.isArray(i)&&Array.isArray(a)?r[o]=PG(i,a):r[o]=a,r},n)}function PI(e,t,n){var r;if(e&&n){const o=Ie(e,n);if(o===void 0)return;for(let i=0;i<t.length;i++){const a=t[i],c=Ie(a,[sn,n],{});if(!(c.type==="object"||c.type==="array")&&(c.const===o||!((r=c.enum)===null||r===void 0)&&r.includes(o)))return i}}}function q_(e,t,n,r,o){if(t===void 0)return 0;const i=PI(t,n,o);if(jN(i))return i;for(let a=0;a<n.length;a++){const c=n[a];if(o&&Ht(c,[sn,o])){const u=Ie(t,o),f=Ie(c,[sn,o],{});if(e.isValid(f,u,r))return a}else if(c[sn]){const u={anyOf:Object.keys(c[sn]).map(h=>({required:[h]}))};let f;if(c.anyOf){const{...h}=c;h.allOf?h.allOf=h.allOf.slice():h.allOf=[],h.allOf.push(u),f=h}else f=Object.assign({},c,u);if(delete f.required,e.isValid(f,t,r))return a}else if(e.isValid(c,t,r))return a}return 0}function ro(e,t,n={},r,o,i=!1){return Ys(e,t,n,r,void 0,void 0,o,i)[0]}function qce(e,t,n,r,o,i,a){const{if:c,then:u,else:f,...h}=t,p=e.isValid(c,i||{},n);let g=[h],b=[];if(r)u&&typeof u!="boolean"&&(b=b.concat(Ys(e,u,n,i,r,o,a))),f&&typeof f!="boolean"&&(b=b.concat(Ys(e,f,n,i,r,o,a)));else{const y=p?u:f;y&&typeof y!="boolean"&&(b=b.concat(Ys(e,y,n,i,r,o,a)))}return b.length&&(g=b.map(y=>qi(h,y))),g.flatMap(y=>Ys(e,y,n,i,r,o,a))}function NI(e){return e.reduce((n,r)=>r.length>1?r.flatMap(o=>$N(n.length,i=>[...n[i]].concat(o))):(n.forEach(o=>o.push(r[0])),n),[[]])}function DI(e,t){return Object.keys(e.patternProperties).filter(n=>RegExp(n).test(t)).reduce((n,r)=>(pn(n,[r],e.patternProperties[r]),n),{})}function Bce(e,t,n,r,o,i,a,c){const u=$I(e,t,n,r,o,i,a,c);if(u.length>1||u[0]!==t)return u;if(z_ in t)return II(e,t,n,r,o,i,a).flatMap(h=>Ys(e,h,n,i,r,o,a));if(Ja in t&&Array.isArray(t[Ja])){const f=t.allOf.map(p=>Ys(e,p,n,i,r,o,a));return NI(f).map(p=>({...t,allOf:p}))}return[t]}function $I(e,t,n,r,o,i,a,c){const u=Bu(t,n,o,void 0,c);return u!==t?Ys(e,u,n,i,r,o,a,c):[t]}function Bu(e,t,n,r,o){if(!Wt(e))return e;let i=e;if(Fn in i){const{$ref:a,...c}=i;if(n.includes(a))return i;n.push(a),i={...jI(a,t,r),...c},Tn in i&&(r=i[Tn])}if(sn in i){const a=[],c=AG(i[sn],(u,f,h)=>{const p=[...n];u[h]=Bu(f,t,p,r,o),a.push(p)},{});mG(n,LN(YK(a))),i={...i,[sn]:c}}if(cf in i&&!Array.isArray(i.items)&&typeof i.items!="boolean"&&(i={...i,items:Bu(i.items,t,n,r,o)}),o){let a,c;Xt in e&&Array.isArray(e[Xt])?(a=Xt,c=i[Xt]):Pt in e&&Array.isArray(e[Pt])&&(a=Pt,c=i[Pt]),a&&c&&(i={...i,[a]:c.map(u=>Bu(u,t,n,r,o))})}return Pn(e,i)?e:i}function Hce(e,t,n,r,o){const i={...t,properties:{...t.properties}},a=r&&Wt(r)?r:{};return Object.keys(a).forEach(c=>{if(!(c in i.properties)){if(cx in i){const u=DI(i,c);if(!wr(u)){i.properties[c]=ro(e,{[Ja]:Object.values(u)},n,Ie(a,[c]),o),pn(i.properties,[c,Li],!0);return}}if(Wy in i&&i.additionalProperties!==!1){let u;typeof i.additionalProperties!="boolean"?Fn in i.additionalProperties?u=ro(e,{[Fn]:Ie(i.additionalProperties,[Fn])},n,a,o):"type"in i.additionalProperties?u={...i.additionalProperties}:Xt in i.additionalProperties||Pt in i.additionalProperties?u={type:"object",...i.additionalProperties}:u={type:Nh(Ie(a,[c]))}:u={type:Nh(Ie(a,[c]))},i.properties[c]=u,pn(i.properties,[c,Li],!0)}else i.properties[c]={type:"null"},pn(i.properties,[c,Li],!0)}}),i}const{compareSchemaDefinitions:Kce,compareSchemaValues:Gce}=Oce(),{mergeArrayOfSchemaDefinitions:Zce}=Ice({intersectJson:xce(Gce),deduplicateJsonSchemaDef:OI(Kce)}),Wce=Lce(Zce);function Yce(e){return Wce(e)}function Ys(e,t,n,r,o=!1,i=[],a,c){return Wt(t)?Bce(e,t,n,o,i,r,a,c).flatMap(f=>{var h;let p=f;if(uce in p)return qce(e,p,n,o,i,r,a);if(Ja in p){if(o){const{allOf:b,...y}=p;return[...b,y]}try{const b=[],y=[];(h=p.allOf)===null||h===void 0||h.forEach(x=>{typeof x=="object"&&x.contains?b.push(x):y.push(x)}),b.length&&(p={...p,allOf:y}),p=a?a(p):Yce(p),b.length&&(p.allOf=b)}catch(b){console.warn(`could not merge subschemas in allOf:
60
60
  `,b);const{allOf:y,...x}=p;return x}}return sn in p&&cx in p&&(p=Object.keys(p.properties).reduce((b,y)=>{const x=DI(b,y);return wr(x)||(b.properties[y]=ro(e,{allOf:[b.properties[y],...Object.values(x)]},n,Ie(r,[y]),a)),b},{...p,properties:{...p.properties}})),cx in p||Wy in p&&p.additionalProperties!==!1?Hce(e,p,n,r,a):p}):[{}]}function Xce(e,t,n,r,o){let i;const{oneOf:a,anyOf:c,...u}=t;if(Array.isArray(a)?i=a:Array.isArray(c)&&(i=c),i){const f=o===void 0&&r?{}:o,h=oi(t);i=i.map(g=>Bu(g,n,[]));const p=q_(e,f,i,n,h);if(r)return i.map(g=>qi(u,g));t=qi(u,i[p])}return[t]}function II(e,t,n,r,o,i,a){const{dependencies:c,...u}=t;return Xce(e,u,n,r,i).flatMap(h=>zI(e,c,h,n,r,o,i,a))}function zI(e,t,n,r,o,i,a,c){let u=[n];for(const f in t){if(!o&&Ie(a,[f])===void 0||n.properties&&!(f in n.properties))continue;const[h,p]=V_(f,t);return Array.isArray(p)?u[0]=Qce(n,p):Wt(p)&&(u=Jce(e,n,r,f,p,o,i,a,c)),u.flatMap(g=>zI(e,h,g,r,o,i,a,c))}return u}function Qce(e,t){if(!t)return e;const n=Array.isArray(e.required)?Array.from(new Set([...e.required,...t])):t;return{...e,required:n}}function Jce(e,t,n,r,o,i,a,c,u){return Ys(e,o,n,c,i,a,u).flatMap(h=>{const{oneOf:p,...g}=h;if(t=qi(t,g),p===void 0)return t;const b=p.map(x=>typeof x=="boolean"||!(Fn in x)?[x]:$I(e,x,n,i,a,c));return NI(b).flatMap(x=>eue(e,t,n,r,x,i,a,c,u))})}function eue(e,t,n,r,o,i,a,c,u){const f=o.filter(h=>{if(typeof h=="boolean"||!h||!h.properties)return!1;const{[r]:p}=h.properties;if(p){const g={type:"object",properties:{[r]:p}};return e.isValid(g,c,n)||i}return!1});return!i&&f.length!==1?(console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),[t]):f.flatMap(h=>{const p=h,[g]=V_(r,p.properties),b={...p,properties:g};return Ys(e,b,n,c,i,a,u).map(x=>qi(t,x))})}function rh(e,t,n,r,o,i={},a){if(Array.isArray(n[o])){const u=oi(n)||r,f=n[o].map(p=>ro(e,p,t,i,a)),h=Ie(i,u);if(h!==void 0)return f.find(p=>$a(Ie(p,[sn,u,z0],Ie(p,[sn,u,ms])),h))}}function LI(e,t,n,r,o){let i=n;if(Ht(n,Fn)&&(i=ro(e,n,t,void 0,o)),wr(r))return i;const a=Array.isArray(r)?r:r.split("."),[c,...u]=a;if(c&&Ht(i,c))return i=Ie(i,c),LI(e,t,i,u,o)}function py(e,t,n,r,o,i){const a=LI(e,t,n,r,i);return a===void 0?o:a}const ij={title:"!@#$_UNKNOWN_$#@!"};function tue(e,t,n,r,o={},i){const a=Array.isArray(r)?[...r]:r.split(".");let c=n;const u=a.pop();a.length&&a.forEach(g=>{c=py(e,t,c,[sn,g],{},i),Ht(c,Pt)?c=rh(e,t,c,u,Pt,Ie(o,g),i):Ht(c,Xt)&&(c=rh(e,t,c,u,Xt,Ie(o,g),i))}),Ht(c,Pt)?c=rh(e,t,c,u,Pt,o,i):Ht(c,Xt)&&(c=rh(e,t,c,u,Xt,o,i));let f=py(e,t,c,[sn,u],ij,i);f===ij&&(f=void 0);const h=py(e,t,c,EI,[],i);let p;return f&&Array.isArray(h)&&(p=h.includes(u)),{field:f,isRequired:p}}const nue={type:"object",$id:fce,properties:{__not_really_there__:{type:"number"}}};function hx(e,t,n,r,o){let i=0;return n&&(Qt(n.properties)?i+=CG(n.properties,(a,c,u)=>{const f=Ie(r,u);if(typeof c=="boolean")return a;if(Ht(c,Fn)){const h=ro(e,c,t,f,o);return a+hx(e,t,h,f||{},o)}if((Ht(c,Pt)||Ht(c,Xt))&&f){const h=Ht(c,Pt)?Pt:Xt,p=oi(c);return a+Dh(e,t,f,Ie(c,h),-1,p,o)}if(c.type==="object")return Qt(f)&&(a+=1),a+hx(e,t,c,f,o);if(c.type===Nh(f)){let h=a+1;return c.default?h+=f===c.default?1:-1:c.const&&(h+=f===c.const?1:-1),h}return a},0):Ga(n.type)&&n.type===Nh(r)&&(i+=1)),i}function Dh(e,t,n,r,o=-1,i,a){const c=r.map(g=>Bu(g,t,[])),u=PI(n,r,i);if(jN(u))return u;const f=c.reduce((g,b,y)=>(q_(e,n,[nue,b],t,i)===1&&g.push(y),g),[]);if(f.length===1)return f[0];f.length||$N(c.length,g=>f.push(g));const h=new Set,{bestIndex:p}=f.reduce((g,b)=>{const{bestScore:y}=g,x=c[b],w=hx(e,t,x,n,a);return h.add(w),w>y?{bestIndex:b,bestScore:w}:g},{bestIndex:o,bestScore:0});return h.size===1&&o>=0?o:p}function B_(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every(t=>Wt(t))}function $h(e,t,n=!1,r=!1,o=!1){if(Array.isArray(t)){const i=Array.isArray(e)?e:[],a=o?i:t,c=o?t:i,u=a.map((f,h)=>c[h]!==void 0?$h(i[h],t[h],n,r,o):f);return(n||o)&&u.length<c.length&&u.push(...c.slice(u.length)),u}if(Wt(t)){const i=Object.assign({},e);return Object.keys(t).reduce((a,c)=>{var u;const f=Ie(t,c),h=Wt(e)&&c in e,p=c in t,g=(u=Ie(e,c))!==null&&u!==void 0?u:{},b=h&&Object.entries(g).some(([,w])=>Wt(w)),y=h&&Wt(Ie(e,c)),x=p&&Wt(f);return y&&x&&!b?(a[c]={...Ie(e,c),...f},a):(a[c]=$h(Ie(e,c),f,n,r,o&&(h||!p)),a)},i)}return r&&(e!==void 0&&Ay(t)||typeof t=="number"&&isNaN(t))||o&&!Ay(t)?e:t}function Ih(e,t,n=!1){return Object.keys(t).reduce((r,o)=>{const i=e?e[o]:{},a=t[o];if(e&&o in e&&Wt(a))r[o]=Ih(i,a,n);else if(n&&Array.isArray(i)&&Array.isArray(a)){let c=a;n==="preventDuplicates"&&(c=a.reduce((u,f)=>(i.includes(f)||u.push(f),u),[])),r[o]=i.concat(c)}else r[o]=a;return r},Object.assign({},e))}function FI(e){return Array.isArray(e.enum)&&e.enum.length===1||ms in e}function H_(e,t,n={},r){const o=ro(e,t,n,void 0,r),i=o.oneOf||o.anyOf;return Array.isArray(o.enum)?!0:Array.isArray(i)?i.every(a=>typeof a!="boolean"&&FI(a)):!1}function K_(e,t,n,r){return!t.uniqueItems||!t.items||typeof t.items=="boolean"?!1:H_(e,t.items,n,r)}function UI(e){const t=e[ms],n=Ms(e);return Wt(t)&&Ga(t?.$data)&&n!=="object"&&n!=="array"}function rue(e){if(cce in e&&Array.isArray(e.enum)&&e.enum.length===1)return e.enum[0];if(ms in e)return e.const;throw new Error("schema cannot be inferred as a constant")}function uf(e,t){if(e.enum){let i;if(t){const{enumNames:a}=ut(t);i=a}return e.enum.map((a,c)=>({label:i?.[c]||String(a),value:a}))}let n,r;e.anyOf?(n=e.anyOf,r=t?.anyOf):e.oneOf&&(n=e.oneOf,r=t?.oneOf);let o=oi(e);if(t){const{optionsSchemaSelector:i=o}=ut(t);o=i}return n&&n.map((i,a)=>{const{title:c}=ut(r?.[a]),u=i;let f,h=c;if(o){const p=Ie(u,[sn,o],{});f=Ie(p,z0,Ie(p,ms)),h=h||p?.title||u.title||String(f)}else f=rue(u),h=h||u.title||String(f);return{schema:u,label:h,value:f}})}const oue=["string","number","integer","boolean","null"];var ff;(function(e){e[e.Ignore=0]="Ignore",e[e.Invert=1]="Invert",e[e.Fallback=2]="Fallback"})(ff||(ff={}));function dS(e,t=ff.Ignore,n=-1){if(n>=0){if(Array.isArray(e.items)&&n<e.items.length){const r=e.items[n];if(typeof r!="boolean")return r}}else if(e.items&&!Array.isArray(e.items)&&typeof e.items!="boolean")return e.items;return t!==ff.Ignore&&Wt(e.additionalItems)?e.additionalItems:{}}function VI(e,t){const{default:n,type:r}=e;return Array.isArray(r)&&r.includes("null")&&wr(t)&&n===null?null:t}function aj(e,t,n,r,o,i=[],a={},c=!1,u=!1){const{emptyObjectFields:f="populateAllDefaults"}=a;if(r===!0||c)e[t]=n;else if(r==="excludeObjectChildren")(u&&n!==void 0||!Wt(n)||!wr(n))&&(e[t]=n);else if(f!=="skipDefaults"){const h=o===void 0?i.includes(t):o;Wt(n)?f==="skipEmptyDefaults"?wr(n)||(e[t]=n):(!wr(n)||i.includes(t))&&(h||f!=="populateRequiredDefaults")&&(e[t]=n):n!==void 0&&(f==="populateAllDefaults"||f==="skipEmptyDefaults"||h&&i.includes(t))&&(e[t]=n)}}function La(e,t,n={}){const{parentDefaults:r,rawFormData:o,rootSchema:i={},includeUndefinedValues:a=!1,_recurseList:c=[],experimental_defaultFormStateBehavior:u=void 0,experimental_customMergeAllOf:f=void 0,required:h,shouldMergeDefaultsIntoFormData:p=!1,initialDefaultsGenerated:g}=n;let b=Wt(o)?o:{};const y=Wt(t)?t:{};let x=r,w=null,T=u,v=c;if(y[ms]!==void 0&&u?.constAsDefaults!=="never"&&!UI(y))x=y[ms];else if(Wt(x)&&Wt(y.default))x=Ih(x,y.default);else if(z0 in y&&!y[Xt]&&!y[Pt]&&!y[Fn])x=y.default;else if(Fn in y){const C=y[Fn];c.includes(C)||(v=c.concat(C),w=jI(C,i)),w&&!x&&(x=y.default),p&&w&&!Wt(o)&&(b=o)}else if(z_ in y){const C={...lj(e,y,n,x),...b};w=II(e,y,i,!1,[],C,f)[0]}else if(B_(y))x=y.items.map((C,E)=>La(e,C,{rootSchema:i,includeUndefinedValues:a,_recurseList:c,experimental_defaultFormStateBehavior:u,experimental_customMergeAllOf:f,parentDefaults:Array.isArray(r)?r[E]:void 0,rawFormData:b,required:h,shouldMergeDefaultsIntoFormData:p}));else if(Pt in y){const{oneOf:C,...E}=y;if(C.length===0)return;const O=oi(y),{type:j="null"}=E;!Array.isArray(j)&&oue.includes(j)&&T?.constAsDefaults==="skipOneOf"&&(T={...T,constAsDefaults:"never"}),w=C[Dh(e,i,o??y.default,C,0,O,f)],w=qi(E,w)}else if(Xt in y){const{anyOf:C,...E}=y;if(C.length===0)return;const O=oi(y);w=C[Dh(e,i,o??y.default,C,0,O,f)],w=qi(E,w)}if(w)return La(e,w,{rootSchema:i,includeUndefinedValues:a,_recurseList:v,experimental_defaultFormStateBehavior:T,experimental_customMergeAllOf:f,parentDefaults:x,rawFormData:o??b,required:h,shouldMergeDefaultsIntoFormData:p,initialDefaultsGenerated:g});x===void 0&&(x=y.default);const _=lj(e,y,n,x);let S=_??x;if(p){const{arrayMinItems:C={}}=u||{},{mergeExtraDefaults:E}=C,O=sue(e,y,i,o,u,f);(!Wt(o)||Ja in y)&&(S=$h(S,O,E,!0))}return S}function sue(e,t,n,r,o,i){const a=!FI(t)&&H_(e,t,n,i);let c=r;if(a){const f=uf(t);c=f?.some(p=>Pn(p.value,r))?r:void 0}return t[ms]&&o?.constAsDefaults==="always"&&(c=t.const),c}function iue(e,t,{rawFormData:n,rootSchema:r={},includeUndefinedValues:o=!1,_recurseList:i=[],experimental_defaultFormStateBehavior:a=void 0,experimental_customMergeAllOf:c=void 0,required:u,shouldMergeDefaultsIntoFormData:f,initialDefaultsGenerated:h}={},p){{const g=Wt(n)?n:{},b=t,y=a?.allOf==="populateDefaults"&&Ja in b?ro(e,b,r,g,c):b,x=y[ms],w=Object.keys(y.properties||{}).reduce((T,v)=>{var _;const S=Ie(y,[sn,v],{}),C=Wt(x)&&x[v]!==void 0,E=(Wt(S)&&ms in S||C)&&a?.constAsDefaults!=="never"&&!UI(S),O=La(e,S,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:c,includeUndefinedValues:o===!0,parentDefaults:Ie(p,[v]),rawFormData:Ie(g,[v]),required:(_=y.required)===null||_===void 0?void 0:_.includes(v),shouldMergeDefaultsIntoFormData:f,initialDefaultsGenerated:h});return aj(T,v,O,o,u,y.required,a,E,S?.type==="null"),T},{});if(y.additionalProperties&&!h){const T=Wt(y.additionalProperties)?y.additionalProperties:{},v=new Set;Wt(p)&&Object.keys(p).filter(S=>!y.properties||!y.properties[S]).forEach(S=>v.add(S));const _=[];Object.keys(g).filter(S=>!y.properties||!y.properties[S]).forEach(S=>{v.add(S),_.push(S)}),v.forEach(S=>{var C;const E=La(e,T,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:c,includeUndefinedValues:o===!0,parentDefaults:Ie(p,[S]),rawFormData:Ie(g,[S]),required:(C=y.required)===null||C===void 0?void 0:C.includes(S),shouldMergeDefaultsIntoFormData:f,initialDefaultsGenerated:h});aj(w,S,E,o,u,_)})}return VI(t,w)}}function aue(e,t,{rawFormData:n,rootSchema:r={},_recurseList:o=[],experimental_defaultFormStateBehavior:i=void 0,experimental_customMergeAllOf:a=void 0,required:c,requiredAsRoot:u=!1,shouldMergeDefaultsIntoFormData:f,initialDefaultsGenerated:h}={},p){var g,b;const y=t,x=(g=i?.arrayMinItems)!==null&&g!==void 0?g:{},{populate:w,mergeExtraDefaults:T}=x,v=w==="never",_=w==="requiredOnly",S=w==="all"||!v&&!_,C=(b=x?.computeSkipPopulate)!==null&&b!==void 0?b:(()=>!1),O=i?.emptyObjectFields==="skipEmptyDefaults"?void 0:[];if(Array.isArray(p)&&(p=p.map((D,L)=>{const U=dS(y,ff.Fallback,L);return La(e,U,{rootSchema:r,_recurseList:o,experimental_defaultFormStateBehavior:i,experimental_customMergeAllOf:a,parentDefaults:D,required:c,shouldMergeDefaultsIntoFormData:f,initialDefaultsGenerated:h})})),Array.isArray(n)){const D=dS(y);if(v)p=n;else{const L=n.map((X,Q)=>La(e,D,{rootSchema:r,_recurseList:o,experimental_defaultFormStateBehavior:i,experimental_customMergeAllOf:a,rawFormData:X,parentDefaults:Ie(p,[Q]),required:c,shouldMergeDefaultsIntoFormData:f,initialDefaultsGenerated:h}));p=$h(p,L,(_&&c||S)&&T)}}if((Wt(y)&&ms in y&&i?.constAsDefaults!=="never")===!1){if(v)return p??O;if(_&&!c)return p||void 0}let P;const N=Array.isArray(p)?p.length:0;if(!y.minItems||K_(e,y,r,a)||C(e,y,r)||y.minItems<=N)P=p||!c&&!u?p:O;else{const D=p||[],L=dS(y,ff.Invert),U=L.default,X=Array.from({length:y.minItems-N},()=>La(e,L,{parentDefaults:U,rootSchema:r,_recurseList:o,experimental_defaultFormStateBehavior:i,experimental_customMergeAllOf:a,required:c,shouldMergeDefaultsIntoFormData:f}));P=D.concat(X)}return VI(t,P)}function lj(e,t,n={},r){switch(Ms(t)){case"object":return iue(e,t,n,r);case"array":return aue(e,t,n,r)}}function qI(e,t,n,r,o=!1,i,a,c){if(!Wt(t))throw new Error("Invalid schema: "+t);const u=ro(e,t,r,n,a),f=La(e,u,{rootSchema:r,includeUndefinedValues:o,experimental_defaultFormStateBehavior:i,experimental_customMergeAllOf:a,rawFormData:n,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:c,requiredAsRoot:!0});if(u.type!=="object"&&Wt(u.default))return{...f,...n};if(Wt(n)||Array.isArray(n)){const{mergeDefaultsIntoFormData:h}=i||{};return $h(f,n,!0,h==="useDefaultIfFormDataUndefined",!0)}return f}function BI(e={}){return"widget"in ut(e)&&ut(e).widget!=="hidden"}function HI(e,t,n={},r,o){if(n[F_]==="files")return!0;if(t.items){const i=ro(e,t.items,r,void 0,o);return i.type==="string"&&i.format==="data-url"}return!1}function lue(e,t,n={},r,o,i){const a=ut(n,o),{label:c=!0}=a;let u=!!c;if(u){const f=Ms(t),h=Ie(t,Li,!1);f==="array"&&(u=h||K_(e,t,r,i)||HI(e,t,n,r,i)||BI(n)),f==="object"&&(u=h),f==="boolean"&&n&&!n[F_]&&(u=!1),n&&n[pce]&&(u=!1)}return u}const vu=Symbol("no Value");function px(e,t,n,r,o={},i){let a;if(Ht(n,sn)){const c={};if(Ht(r,sn)){const h=Ie(r,sn,{});Object.keys(h).forEach(p=>{Ht(o,p)&&(c[p]=void 0)})}const u=Object.keys(Ie(n,sn,{})),f={};u.forEach(h=>{const p=Ie(o,h);let g=Ie(r,[sn,h],{}),b=Ie(n,[sn,h],{});Ht(g,Fn)&&(g=ro(e,g,t,p,i)),Ht(b,Fn)&&(b=ro(e,b,t,p,i));const y=Ie(g,"type"),x=Ie(b,"type");if(!y||y===x)if(Ht(c,h)&&delete c[h],x==="object"||x==="array"&&Array.isArray(p)){const w=px(e,t,b,g,p,i);(w!==void 0||x==="array")&&(f[h]=w)}else{const w=Ie(b,"default",vu),T=Ie(g,"default",vu);w!==vu&&w!==p&&(T===p?c[h]=w:Ie(b,"readOnly")===!0&&(c[h]=void 0));const v=Ie(b,"const",vu),_=Ie(g,"const",vu);v!==vu&&v!==p&&(c[h]=_===p?v:void 0)}}),a={...typeof o=="string"||Array.isArray(o)?void 0:o,...c,...f}}else if(Ie(r,"type")==="array"&&Ie(n,"type")==="array"&&Array.isArray(o)){let c=Ie(r,"items"),u=Ie(n,"items");if(typeof c=="object"&&typeof u=="object"&&!Array.isArray(c)&&!Array.isArray(u)){Ht(c,Fn)&&(c=ro(e,c,t,o,i)),Ht(u,Fn)&&(u=ro(e,u,t,o,i));const f=Ie(c,"type"),h=Ie(u,"type");if(!f||f===h){const p=Ie(n,"maxItems",-1);h==="object"?a=o.reduce((g,b)=>{const y=px(e,t,u,c,b,i);return y!==void 0&&(p<0||g.length<p)&&g.push(y),g},[]):a=p>0&&o.length>p?o.slice(0,p):o}}else typeof c=="boolean"&&typeof u=="boolean"&&c===u&&(a=o)}return a}function Gl(e,t,n,r,o,i=[],a){if(Fn in t||z_ in t||Ja in t){const u=ro(e,t,r,o,a);if(i.findIndex(h=>Pn(h,u))===-1)return Gl(e,u,n,r,o,i.concat(u),a)}let c={[fy]:n.replace(/^\./,"")};if(Pt in t||Xt in t){const u=Pt in t?t.oneOf:t.anyOf,f=oi(t),h=Dh(e,r,o,u,0,f,a),p=u[h];c={...c,...Gl(e,p,n,r,o,i,a)}}if(Wy in t&&t[Wy]!==!1&&pn(c,L_,!0),cf in t&&Array.isArray(o)){const{items:u,additionalItems:f}=t;Array.isArray(u)?o.forEach((h,p)=>{u[p]?c[p]=Gl(e,u[p],`${n}.${p}`,r,h,i,a):f?c[p]=Gl(e,f,`${n}.${p}`,r,h,i,a):console.warn(`Unable to generate path schema for "${n}.${p}". No schema defined for it`)}):o.forEach((h,p)=>{c[p]=Gl(e,u,`${n}.${p}`,r,h,i,a)})}else if(sn in t)for(const u in t.properties){const f=Ie(t,[sn,u],{});c[u]=Gl(e,f,`${n}.${u}`,r,Ie(o,[u]),i,a)}return c}function cue(e,t,n="",r,o,i){return Gl(e,t,n,r,o,void 0,i)}class uue{constructor(t,n,r,o){n&&n[th]===dy?this.rootSchema=dx(n,Ie(n,Tn,"#")):this.rootSchema=n,this.validator=t,this.experimental_defaultFormStateBehavior=r,this.experimental_customMergeAllOf=o}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(t,n,r={},o){return!t||!n?!1:this.validator!==t||!Pn(this.rootSchema,n)||!Pn(this.experimental_defaultFormStateBehavior,r)||this.experimental_customMergeAllOf!==o}findFieldInSchema(t,n,r){return tue(this.validator,this.rootSchema,t,n,r,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(t,n,r,o){return rh(this.validator,this.rootSchema,t,n,r,o,this.experimental_customMergeAllOf)}getDefaultFormState(t,n,r=!1,o){return qI(this.validator,t,n,this.rootSchema,r,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,o)}getDisplayLabel(t,n,r){return lue(this.validator,t,n,this.rootSchema,r,this.experimental_customMergeAllOf)}getClosestMatchingOption(t,n,r,o){return Dh(this.validator,this.rootSchema,t,n,r,o,this.experimental_customMergeAllOf)}getFirstMatchingOption(t,n,r){return q_(this.validator,t,n,this.rootSchema,r)}getFromSchema(t,n,r){return py(this.validator,this.rootSchema,t,n,r,this.experimental_customMergeAllOf)}isFilesArray(t,n){return HI(this.validator,t,n,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(t){return K_(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(t){return H_(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}retrieveSchema(t,n,r){return ro(this.validator,t,this.rootSchema,n,this.experimental_customMergeAllOf,r)}sanitizeDataForNewSchema(t,n,r){return px(this.validator,this.rootSchema,t,n,r,this.experimental_customMergeAllOf)}toPathSchema(t,n,r){return cue(this.validator,t,n,this.rootSchema,r,this.experimental_customMergeAllOf)}}function fue(e,t,n={},r){return new uue(e,t,n,r)}function due(e){var t;if(e.indexOf("data:")===-1)throw new Error("File is invalid: URI must be a dataURI");const r=e.slice(5).split(";base64,");if(r.length!==2)throw new Error("File is invalid: dataURI must be base64");const[o,i]=r,[a,...c]=o.split(";"),u=a||"",f=decodeURI(((t=c.map(h=>h.split("=")).find(([h])=>h==="name"))===null||t===void 0?void 0:t[1])||"unknown");try{const h=atob(i),p=new Array(h.length);for(let b=0;b<h.length;b++)p[b]=h.charCodeAt(b);return{blob:new window.Blob([new Uint8Array(p)],{type:u}),name:f}}catch(h){throw new Error("File is invalid: "+h.message)}}function Aa(e,t){let n=String(e);for(;n.length<t;)n="0"+n;return n}function KI(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 KI(t,e).reverse();const n=[];for(let r=e;r<=t;r++)n.push({value:r,label:Aa(r,2)});return n}function cj(e,t){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!="object"||typeof t!="object")return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++){const i=n[o];if(!Object.prototype.hasOwnProperty.call(t,i)||!Object.is(e[i],t[i]))return!1}return!0}function hue(e,t){let n=e;if(Array.isArray(t)){const r=n.split(/(%\d)/);t.forEach((o,i)=>{const a=r.findIndex(c=>c===`%${i+1}`);a>=0&&(r[a]=o)}),n=r.join("")}return n}function pue(e,t){return hue(e,t)}function kr(e,t=[],n){if(Array.isArray(e))return e.map(i=>kr(i,t)).filter(i=>i!==n);const r=e===""||e===null?-1:Number(e),o=t[r];return o?o.value:n}function GI(e,t,n=[]){const r=kr(e,n);return Array.isArray(t)?t.filter(o=>!Pn(o,r)):Pn(r,t)?void 0:t}function gp(e,t){return Array.isArray(t)?t.some(n=>Pn(n,e)):Pn(t,e)}function ZI(e,t=[],n=!1){const r=t.map((o,i)=>gp(o.value,e)?String(i):void 0).filter(o=>typeof o<"u");return n?r:r[0]}function WI(e,t,n=[]){const r=kr(e,n);if(!Ay(r)){const o=n.findIndex(c=>r===c.value),i=n.map(({value:c})=>c);return t.slice(0,o).concat(r,t.slice(o)).sort((c,u)=>+(i.indexOf(c)>i.indexOf(u)))}return t}class YI{constructor(t){this.errorSchema={},this.resetAllErrors(t)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(t){let r=Array.isArray(t)&&t.length>0||typeof t=="string"?Ie(this.errorSchema,t):this.errorSchema;return!r&&t&&(r={},TG(this.errorSchema,t,r,Object)),r}resetAllErrors(t){return this.errorSchema=t?rp(t):{},this}addErrors(t,n){const r=this.getOrCreateErrorBlock(n);let o=Ie(r,Zr);return Array.isArray(o)||(o=[],r[Zr]=o),Array.isArray(t)?pn(r,Zr,[...new Set([...o,...t])]):pn(r,Zr,[...new Set([...o,t])]),this}setErrors(t,n){const r=this.getOrCreateErrorBlock(n),o=Array.isArray(t)?[...new Set([...t])]:[t];return pn(r,Zr,o),this}clearErrors(t){const n=this.getOrCreateErrorBlock(t);return pn(n,Zr,[]),this}}function uj(e,t){const n=Ka(e),r=Ka(t);if(e===t||!n&&!r)return[];if(n&&!r)return as(e);if(!n&&r)return as(t);{const o=as(xG(e,(a,c)=>!Pn(a,Ie(t,c)))),i=GK(as(t),as(e));return[...o,...i]}}function mue(e,t,n=[1900,new Date().getFullYear()+2],r="YMD"){const{day:o,month:i,year:a,hour:c,minute:u,second:f}=e,h={type:"day",range:[1,31],value:o},p={type:"month",range:[1,12],value:i},g={type:"year",range:n,value:a},b=[];switch(r){case"MDY":b.push(p,h,g);break;case"DMY":b.push(h,p,g);break;default:b.push(g,p,h)}return t&&b.push({type:"hour",range:[0,23],value:c},{type:"minute",range:[0,59],value:u},{type:"second",range:[0,59],value:f}),b}function XI(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 QI(e,t,n={},r=!0){const o={type:t||"text",...XI(e)};return n.inputType?o.type=n.inputType:t||(e.type==="number"?(o.type="number",r&&o.step===void 0&&(o.step="any")):e.type==="integer"&&(o.type="number",o.step===void 0&&(o.step=1))),n.autocomplete&&(o.autoComplete=n.autocomplete),n.accept&&(o.accept=n.accept),o}const fj={props:{disabled:!1},submitText:"Submit",norender:!1};function JI(e={}){const t=ut(e);if(t&&t[Yy]){const n=t[Yy];return{...fj,...n}}return fj}function gt(e,t,n={}){const{templates:r}=t;if(e==="ButtonTemplates")return r[e];if(Object.hasOwn(n,e)&&typeof n[e]=="string"&&Object.hasOwn(r,n[e])){const o=n[e];return r[o]}return n[e]||r[e]}function G_(){if(typeof process>"u"||Ie(process,"env.NODE_ENV")!=="test")return{};const e=new Map;return new Proxy({},{get(t,n){return e.has(n)||e.set(n,FN("test-id-")),e.get(n)}})}var hS={exports:{}},hn={};var dj;function gue(){if(dj)return hn;dj=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),y;y=Symbol.for("react.module.reference");function x(w){if(typeof w=="object"&&w!==null){var T=w.$$typeof;switch(T){case e:switch(w=w.type,w){case n:case o:case r:case f:case h:return w;default:switch(w=w&&w.$$typeof,w){case c:case a:case u:case g:case p:case i:return w;default:return T}}case t:return T}}}return hn.ContextConsumer=a,hn.ContextProvider=i,hn.Element=e,hn.ForwardRef=u,hn.Fragment=n,hn.Lazy=g,hn.Memo=p,hn.Portal=t,hn.Profiler=o,hn.StrictMode=r,hn.Suspense=f,hn.SuspenseList=h,hn.isAsyncMode=function(){return!1},hn.isConcurrentMode=function(){return!1},hn.isContextConsumer=function(w){return x(w)===a},hn.isContextProvider=function(w){return x(w)===i},hn.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===e},hn.isForwardRef=function(w){return x(w)===u},hn.isFragment=function(w){return x(w)===n},hn.isLazy=function(w){return x(w)===g},hn.isMemo=function(w){return x(w)===p},hn.isPortal=function(w){return x(w)===t},hn.isProfiler=function(w){return x(w)===o},hn.isStrictMode=function(w){return x(w)===r},hn.isSuspense=function(w){return x(w)===f},hn.isSuspenseList=function(w){return x(w)===h},hn.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===n||w===o||w===r||w===f||w===h||w===b||typeof w=="object"&&w!==null&&(w.$$typeof===g||w.$$typeof===p||w.$$typeof===i||w.$$typeof===a||w.$$typeof===u||w.$$typeof===y||w.getModuleId!==void 0)},hn.typeOf=x,hn}var hj;function yue(){return hj||(hj=1,hS.exports=gue()),hS.exports}var vue=yue();const pj=ii(vue),pS={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=Ie(e,"MergedWidget");if(!t){const n=e.defaultProps&&e.defaultProps.options||{};t=({options:r,...o})=>M.jsx(e,{options:{...n,...r},...o}),pn(e,"MergedWidget",t)}return t}function si(e,t,n={}){const r=Ms(e);if(typeof t=="function"||t&&pj.isForwardRef(A.createElement(t))||pj.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 n){const o=n[t];return si(e,o,n)}if(typeof r=="string"){if(!(r in pS))throw new Error(`No widget for type '${r}' in schema: ${JSON.stringify(e)}`);if(t in pS[r]){const o=n[pS[r][t]];return si(e,o,n)}}throw new Error(`No widget '${t}' for type '${r}' in schema: ${JSON.stringify(e)}`)}function Sue(e){let t=0;for(let n=0;n<e.length;n+=1){const r=e.charCodeAt(n);t=(t<<5)-t+r,t=t&t}return t.toString(16)}function wue(e){const t=new Set;return JSON.stringify(e,(n,r)=>(t.add(n),r)),JSON.stringify(e,Array.from(t).sort())}function Xs(e){return Sue(wue(e))}function xue(e){return Xs(e)}function Eue(e,t,n={}){try{return si(e,t,n),!0}catch(r){const o=r;if(o.message&&(o.message.startsWith("No widget")||o.message.startsWith("Unsupported widget")))return!1;throw r}}function Rc(e,t){return`${Ga(e)?e:e[Tn]}__${t}`}function Oc(e){return Rc(e,"description")}function Z_(e){return Rc(e,"error")}function zh(e){return Rc(e,"examples")}function W_(e){return Rc(e,"help")}function F0(e){return Rc(e,"title")}function Ao(e,t=!1){const n=t?` ${zh(e)}`:"";return`${Z_(e)} ${Oc(e)} ${W_(e)}${n}`}function nc(e,t){return`${e}-${t}`}function Qs(e,t){return Rc(e,t)}function mS(e,t){return Rc(e,`optional${t}`)}function Df(e){return!Ay(e)&&(!Qt(e)||Array.isArray(e)||!wr(e))}function _ue(e,t){const{rootSchema:n,schemaUtils:r}=e;if($a(t,n))return!0;if(Fn in n){const o=r.retrieveSchema(n);return $a(t,o)}return!1}function e9(e,t,n){return t?n:e}function Cue(e){return e?new Date(e).toJSON():void 0}function Y_(e,t,n){const r=[hce];return Ht(e,W5)&&r.unshift(W5),Ie(e,[...r,t],n)}function Tue(e,t){if(!Array.isArray(t))return e;const n=h=>h.reduce((p,g)=>(p[g]=!0,p),{}),r=h=>h.length>1?`properties '${h.join("', '")}'`:`property '${h[0]}'`,o=n(e),i=t.filter(h=>h==="*"||o[h]),a=n(i),c=e.filter(h=>!a[h]),u=i.indexOf("*");if(u===-1){if(c.length)throw new Error(`uiSchema order list does not contain ${r(c)}`);return i}if(u!==i.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");const f=[...i];return f.splice(u,1,...c),f}function gS(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 n=new Date(e);if(Number.isNaN(n.getTime()))throw new Error("Unable to parse date "+e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:t?n.getUTCHours():0,minute:t?n.getUTCMinutes():0,second:t?n.getUTCSeconds():0}}function ph(e){if(e.const||e.enum&&e.enum.length===1&&e.enum[0]===!0)return!0;if(e.anyOf&&e.anyOf.length===1)return ph(e.anyOf[0]);if(e.oneOf&&e.oneOf.length===1)return ph(e.oneOf[0]);if(e.allOf){const t=n=>ph(n);return e.allOf.some(t)}return!1}function t9(e,t,n,r="customDeep"){if(r==="always")return!0;if(r==="shallow"){const{props:a,state:c}=e;return!cj(a,t)||!cj(c,n)}const{props:o,state:i}=e;return!Pn(o,t)||!Pn(i,n)}function mj(e){const t=LN(e.map(n=>Qt(n)?Ms(n):void 0).flat().filter(n=>n!==void 0));return t.length===1?t[0]:t}function yp(e,t,n,r){const{enableOptionalDataFieldForType:o=[]}=ut(r,e.globalUiOptions);let i;return Xt in t&&Array.isArray(t[Xt])?i=mj(t[Xt]):Pt in t&&Array.isArray(t[Pt])?i=mj(t[Pt]):i=Ms(t),!_ue(e,t)&&!n&&!!i&&!Array.isArray(i)&&!!o.find(a=>a===i)}function gj(e,t=!0){const{year:n,month:r,day:o,hour:i=0,minute:a=0,second:c=0}=e,u=Date.UTC(n,r-1,o,i,a,c),f=new Date(u).toJSON();return t?f:f.slice(0,10)}function X_(e,t=[]){if(!e)return[];let n=[];return Zr in e&&(n=n.concat(e[Zr].map(r=>{const o=`.${t.join(".")}`;return{property:o,message:r,stack:`${o} ${r}`}}))),Object.keys(e).reduce((r,o)=>{if(o!==Zr){const i=e[o];Ka(i)&&(r=r.concat(X_(i,[...t,o])))}return r},n)}function Rue(e){const t=new YI;return e.length&&e.forEach(n=>{const{property:r,message:o}=n,i=r==="."?[]:IN(r);i.length>0&&i[0]===""&&i.splice(0,1),o&&t.addErrors(o,i)}),t.ErrorSchema}function gs(e,t,n,r){const o=Array.isArray(n)?n:n?.path,i=e===""?[]:[e],a=o?o.concat(...i):i,c=[t.idPrefix,...a].join(t.idSeparator);let u;return t.nameGenerator&&a.length>0&&(u=t.nameGenerator(a,t.idPrefix,r)),{path:a,[Tn]:c,...u!==void 0&&{name:u}}}function n9(e){return Object.keys(e).reduce((t,n)=>{if(n==="addError")return t;{const r=e[n];return Ka(r)?{...t,[n]:n9(r)}:{...t,[n]:r}}},{})}function Oue(e){return Object.values(e).every(t=>t!==-1)}function Aue(e){const{className:t="form-control",type:n,range:r,value:o,select:i,rootId:a,name:c,disabled:u,readonly:f,autofocus:h,registry:p,onBlur:g,onFocus:b}=e,y=`${a}_${n}`,{SelectWidget:x}=p.widgets,w=A.useCallback(T=>i(n,T),[i,n]);return M.jsx(x,{schema:{type:"integer"},id:y,name:c,className:t,options:{enumOptions:KI(r[0],r[1])},placeholder:n,value:o,disabled:u,readonly:f,autofocus:h,onChange:w,onBlur:g,onFocus:b,registry:p,label:"","aria-describedby":Ao(a)})}function kue(e){const{time:t=!1,disabled:n=!1,readonly:r=!1,options:o,onChange:i,value:a}=e,[c,u]=A.useState(gS(a,t));A.useEffect(()=>{u(gS(a,t))},[t,a]);const f=A.useCallback((b,y)=>{const x={...c,[b]:typeof y>"u"?-1:y};Oue(x)?i(gj(x,t)):u(x)},[c,i,t]),h=A.useCallback(b=>{b.preventDefault(),!(n||r)&&i(void 0)},[n,r,i]),p=A.useCallback(b=>{if(b.preventDefault(),n||r)return;const y=gS(new Date().toJSON(),t);i(gj(y,t))},[n,r,t,i]);return{elements:A.useMemo(()=>mue(c,t,o.yearsRange,o.format),[c,t,o.yearsRange,o.format]),handleChange:f,handleClear:h,handleSetNow:p}}function Ac(e){const t=A.useRef(e);return $a(e,t.current)||(t.current=e),t.current}function Mue(e,t){return e.replace(";base64",`;name=${encodeURIComponent(t)};base64`)}function jue(e){const{name:t,size:n,type:r}=e;return new Promise((o,i)=>{const a=new window.FileReader;a.onerror=i,a.onload=c=>{var u;typeof((u=c.target)===null||u===void 0?void 0:u.result)=="string"?o({dataURL:Mue(c.target.result,t),name:t,size:n,type:r}):o({dataURL:null,name:t,size:n,type:r})},a.readAsDataURL(e)})}function Pue(e){return Promise.all(Array.from(e).map(jue))}function yj(e){return e.reduce((t,n)=>{if(!n)return t;try{const{blob:r,name:o}=due(n);return[...t,{dataURL:n,name:o,size:r.size,type:r.type}]}catch{return t}},[])}function Nue(e,t,n=!1){const r=A.useMemo(()=>n&&e?Array.isArray(e)?e:[e]:[],[e,n]),o=A.useMemo(()=>Array.isArray(e)?yj(e):yj([e||""]),[e]),i=A.useCallback(c=>{Pue(c).then(u=>{const f=u.map(h=>h.dataURL||null);t(n?r.concat(...f):f[0])})},[r,n,t]),a=A.useCallback(c=>{if(n){const u=r.filter((f,h)=>h!==c);t(u)}else t(void 0)},[r,n,t]);return{filesInfo:o,handleChange:i,handleRemove:a}}function Due(e){if(!e)return"";const t=new Date(e),n=Aa(t.getFullYear(),4),r=Aa(t.getMonth()+1,2),o=Aa(t.getDate(),2),i=Aa(t.getHours(),2),a=Aa(t.getMinutes(),2),c=Aa(t.getSeconds(),2),u=Aa(t.getMilliseconds(),3);return`${n}-${r}-${o}T${i}:${a}:${c}.${u}`}function my(e,t,n=!1){if(!t)return e;const{errors:r,errorSchema:o}=e;let i=X_(t),a=t;return wr(o)||(a=Ih(o,t,n?"preventDuplicates":!0),i=[...r].concat(i)),{errorSchema:a,errors:i}}function $ue(e){for(const t in e){const n=e,r=n[t];t===Fn&&typeof r=="string"&&r.startsWith("#")?n[t]=TI+r:n[t]=Q_(r)}return e}function Iue(e){for(let t=0;t<e.length;t++)e[t]=Q_(e[t]);return e}function Q_(e){return Array.isArray(e)?Iue([...e]):Qt(e)?$ue({...e}):e}var zt;(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)"})(zt||(zt={}));function mx(){return FN("rjsf-array-item-")}function vj(e){return Array.isArray(e)?e.map(t=>({key:mx(),item:t})):[]}function r9(e){return Array.isArray(e)?e.map(t=>t.item):[]}function zue(e){return Array.isArray(e.type)?!e.type.includes("null"):e.type!=="null"}function o9(e,t,n,r){let{addable:o}=ut(r,e.globalUiOptions);return o!==!1&&(t.maxItems!==void 0?o=n.length<t.maxItems:o=!0),o}function s9(e,t,n,r){if(typeof e.items=="function")try{return e.items(t,n,r)}catch(o){console.error(`Error executing dynamic uiSchema.items function for item at index ${n}:`,o);return}else return e.items}function Lue(e,t){const{schemaUtils:n,globalFormOptions:r}=e;let o=t.items;return r.useFallbackUiForUnsupportedType&&!o?o={}:B_(t)&&lce(t)&&(o=t.additionalItems),n.getDefaultFormState(o)}function Fue(e){const{schema:t,fieldPathId:n,uiSchema:r,formData:o=[],disabled:i=!1,readonly:a=!1,autofocus:c=!1,required:u=!1,placeholder:f,onBlur:h,onFocus:p,registry:g,rawErrors:b,name:y,onSelectChange:x}=e,{widgets:w,schemaUtils:T,globalFormOptions:v,globalUiOptions:_}=g,S=T.retrieveSchema(t.items,o),C=uf(S,r),{widget:E="select",title:O,...j}=ut(r,_),P=si(t,E,w),N=O??t.title??y,D=T.getDisplayLabel(t,r,_),L=Ac(gs("",v,n,!0));return M.jsx(P,{id:L[Tn],name:y,multiple:!0,onChange:x,onBlur:h,onFocus:p,options:{...j,enumOptions:C},schema:t,uiSchema:r,registry:g,value:o,disabled:i,readonly:a,required:u,label:N,hideLabel:!D,placeholder:f,autofocus:c,rawErrors:b,htmlName:L.name})}function Uue(e){const{schema:t,fieldPathId:n,uiSchema:r,disabled:o=!1,readonly:i=!1,autofocus:a=!1,required:c=!1,hideError:u,placeholder:f,onBlur:h,onFocus:p,formData:g=[],registry:b,rawErrors:y,name:x,onSelectChange:w}=e,{widgets:T,schemaUtils:v,globalFormOptions:_,globalUiOptions:S}=b,{widget:C,title:E,...O}=ut(r,S),j=si(t,C,T),P=E??t.title??x,N=v.getDisplayLabel(t,r,S),D=Ac(gs("",_,n,!0));return M.jsx(j,{id:D[Tn],name:x,multiple:!0,onChange:w,onBlur:h,onFocus:p,options:O,schema:t,uiSchema:r,registry:b,value:g,disabled:o,readonly:i,hideError:u,required:c,label:P,hideLabel:!N,placeholder:f,autofocus:a,rawErrors:y,htmlName:D.name})}function Vue(e){const{schema:t,uiSchema:n,fieldPathId:r,name:o,disabled:i=!1,readonly:a=!1,autofocus:c=!1,required:u=!1,onBlur:f,onFocus:h,registry:p,formData:g=[],rawErrors:b,onSelectChange:y}=e,{widgets:x,schemaUtils:w,globalFormOptions:T,globalUiOptions:v}=p,{widget:_="files",title:S,...C}=ut(n,v),E=si(t,_,x),O=S??t.title??o,j=w.getDisplayLabel(t,n,v),P=Ac(gs("",T,r,!0));return M.jsx(E,{options:C,id:P[Tn],name:o,multiple:!0,onChange:y,onBlur:f,onFocus:h,schema:t,uiSchema:n,value:g,disabled:i,readonly:a,required:u,registry:p,autofocus:c,rawErrors:b,label:O,hideLabel:!j,htmlName:P.name})}function i9(e){const{itemKey:t,index:n,name:r,disabled:o,hideError:i,readonly:a,registry:c,uiOptions:u,parentUiSchema:f,canAdd:h,canRemove:p=!0,canMoveUp:g,canMoveDown:b,itemSchema:y,itemData:x,itemUiSchema:w,itemFieldPathId:T,itemErrorSchema:v,autofocus:_,onBlur:S,onFocus:C,onChange:E,rawErrors:O,totalItems:j,title:P,handleAddItem:N,handleCopyItem:D,handleRemoveItem:L,handleReorderItems:U}=e,{schemaUtils:X,fields:{ArraySchemaField:Q,SchemaField:Z},globalUiOptions:q}=c,G=Ac(T),oe=Q||Z,ne=gt("ArrayFieldItemTemplate",c,u),$=X.getDisplayLabel(y,w,q),{description:F}=ut(w),V=!!F||!!y.description,{orderable:I=!0,removable:K=!0,copyable:te=!1}=u,re={moveUp:I&&g,moveDown:I&&b,copy:te&&h,remove:K&&p,toolbar:!1};re.toolbar=Object.keys(re).some(Ee=>re[Ee]);const ie=A.useCallback(Ee=>{N(Ee,n+1)},[N,n]),me=A.useCallback(Ee=>{D(Ee,n)},[D,n]),Ce=A.useCallback(Ee=>{L(Ee,n)},[L,n]),ee=A.useCallback(Ee=>{U(Ee,n,n-1)},[U,n]),se=A.useCallback(Ee=>{U(Ee,n,n+1)},[U,n]),de={children:M.jsx(oe,{name:r,title:P,index:n,schema:y,uiSchema:w,formData:x,errorSchema:v,fieldPathId:G,required:zue(y),onChange:E,onBlur:S,onFocus:C,registry:c,disabled:o,readonly:a,hideError:i,autofocus:_,rawErrors:O}),buttonsProps:{fieldPathId:G,disabled:o,readonly:a,canAdd:h,hasCopy:re.copy,hasMoveUp:re.moveUp,hasMoveDown:re.moveDown,hasRemove:re.remove,index:n,totalItems:j,onAddItem:ie,onCopyItem:me,onRemoveItem:Ce,onMoveUpItem:ee,onMoveDownItem:se,registry:c,schema:y,uiSchema:w},itemKey:t,className:"rjsf-array-item",disabled:o,hasToolbar:re.toolbar,index:n,totalItems:j,readonly:a,registry:c,schema:y,uiSchema:w,parentUiSchema:f,displayLabel:$,hasDescription:V};return M.jsx(ne,{...de})}function que(e){const{schema:t,uiSchema:n={},errorSchema:r,fieldPathId:o,formData:i,name:a,title:c,disabled:u=!1,readonly:f=!1,autofocus:h=!1,required:p=!1,hideError:g=!1,registry:b,onBlur:y,onFocus:x,rawErrors:w,onChange:T,keyedFormData:v,handleAddItem:_,handleCopyItem:S,handleRemoveItem:C,handleReorderItems:E}=e,O=t.title||c||a,{schemaUtils:j,fields:P,formContext:N,globalFormOptions:D,globalUiOptions:L}=b,{OptionalDataControlsField:U}=P,X=ut(n,L),Q=Qt(t.items)?t.items:{},Z=j.retrieveSchema(Q),q=r9(v),G=yp(b,t,p,n),oe=Df(i),ne=o9(b,t,q,n)&&(!G||oe),$=oe?v:[],F=G?" rjsf-optional-array-field":"",V=e.childFieldPathId??o,I=G?M.jsx(U,{...e,fieldPathId:V}):void 0,K={canAdd:ne,items:$.map((re,ie)=>{const{key:me,item:Ce}=re,ee=Ce,se=j.retrieveSchema(Q,ee),de=r?r[ie]:void 0,Ee=gs(ie,D,V),Re=s9(n,Ce,ie,N),we={itemKey:me,index:ie,name:a&&`${a}-${ie}`,registry:b,uiOptions:X,hideError:g,readonly:f,disabled:u,required:p,title:O?`${O}-${ie+1}`:void 0,canAdd:ne,canMoveUp:ie>0,canMoveDown:ie<q.length-1,itemSchema:se,itemFieldPathId:Ee,itemErrorSchema:de,itemData:ee,itemUiSchema:Re,autofocus:h&&ie===0,onBlur:y,onFocus:x,rawErrors:w,totalItems:v.length,handleAddItem:_,handleCopyItem:S,handleRemoveItem:C,handleReorderItems:E,onChange:T};return M.jsx(i9,{...we},me)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${Z.type}${F}`,disabled:u,fieldPathId:o,uiSchema:n,onAddClick:_,readonly:f,required:p,schema:t,title:O,formData:q,rawErrors:w,registry:b,optionalDataControl:I},te=gt("ArrayFieldTemplate",b,X);return M.jsx(te,{...K})}function Bue(e){const{schema:t,uiSchema:n={},formData:r,errorSchema:o,fieldPathId:i,name:a,title:c,disabled:u=!1,readonly:f=!1,autofocus:h=!1,required:p=!1,hideError:g=!1,registry:b,onBlur:y,onFocus:x,rawErrors:w,keyedFormData:T,onChange:v,handleAddItem:_,handleCopyItem:S,handleRemoveItem:C,handleReorderItems:E}=e;let{formData:O=[]}=e;const j=t.title||c||a,{schemaUtils:P,fields:N,formContext:D,globalFormOptions:L,globalUiOptions:U}=b,X=ut(n,U),{OptionalDataControlsField:Q}=N,Z=yp(b,t,p,n),q=Df(r),oe=(Qt(t.items)?t.items:[]).map((ie,me)=>P.retrieveSchema(ie,O[me])),ne=Qt(t.additionalItems)?P.retrieveSchema(t.additionalItems,r):null,$=e.childFieldPathId??i;O.length<oe.length&&(O=O.concat(new Array(oe.length-O.length)));const F=q?T:[],V=Z?" rjsf-optional-array-field":"",I=Z?M.jsx(Q,{...e,fieldPathId:$}):void 0,K=o9(b,t,O,n)&&!!ne&&(!Z||q),te={canAdd:K,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${V}`,disabled:u,fieldPathId:i,formData:r,items:F.map((ie,me)=>{const{key:Ce,item:ee}=ie,se=ee,de=me>=oe.length,Ee=(de&&Qt(t.additionalItems)?P.retrieveSchema(t.additionalItems,se):oe[me])||{},Re=gs(me,L,$);let we;de?we=n.additionalItems:Array.isArray(n.items)?we=n.items[me]:we=s9(n,ee,me,D);const $e=o?o[me]:void 0,We={index:me,itemKey:Ce,name:a&&`${a}-${me}`,registry:b,uiOptions:X,hideError:g,readonly:f,disabled:u,required:p,title:j?`${j}-${me+1}`:void 0,canAdd:K,canRemove:de,canMoveUp:me>=oe.length+1,canMoveDown:de&&me<O.length-1,itemSchema:Ee,itemData:se,itemUiSchema:we,itemFieldPathId:Re,itemErrorSchema:$e,autofocus:h&&me===0,onBlur:y,onFocus:x,rawErrors:w,totalItems:T.length,onChange:v,handleAddItem:_,handleCopyItem:S,handleRemoveItem:C,handleReorderItems:E};return M.jsx(i9,{...We},Ce)}),onAddClick:_,readonly:f,required:p,registry:b,schema:t,uiSchema:n,title:j,errorSchema:o,rawErrors:w,optionalDataControl:I},re=gt("ArrayFieldTemplate",b,X);return M.jsx(re,{...te})}function Hue(e=[]){const t=A.useMemo(()=>Xs(e),[e]),[n,r]=A.useState(()=>({formDataHash:t,keyedFormData:vj(e)}));let{keyedFormData:o,formDataHash:i}=n;if(t!==i){const c=Array.isArray(e)?e:[],u=o||[];o=c.length===u.length?u.map((f,h)=>({key:f.key,item:c[h]})):vj(c),i=t,r({formDataHash:i,keyedFormData:o})}const a=A.useCallback(c=>{const u=r9(c),f=Xs(u);return r({formDataHash:f,keyedFormData:c}),u},[]);return{keyedFormData:o,updateKeyedFormData:a}}function Kue(e){const{schema:t,uiSchema:n,errorSchema:r,fieldPathId:o,registry:i,formData:a,onChange:c}=e,{globalFormOptions:u,schemaUtils:f,translateString:h}=i,{keyedFormData:p,updateKeyedFormData:g}=Hue(a),b=e.childFieldPathId??o,y=A.useCallback((E,O)=>{E&&E.preventDefault();let j;if(r){j={};for(const D in r){const L=parseInt(D);O===void 0||L<O?pn(j,[L],r[D]):L>=O&&pn(j,[L+1],r[D])}}const P={key:mx(),item:Lue(i,t)},N=[...p];O!==void 0?N.splice(O,0,P):N.push(P),c(g(N),b.path,j)},[p,i,t,c,g,r,b]),x=A.useCallback((E,O)=>{E&&E.preventDefault();let j;if(r){j={};for(const D in r){const L=parseInt(D);L<=O?pn(j,[L],r[D]):L>O&&pn(j,[L+1],r[D])}}const P={key:mx(),item:rp(p[O].item)},N=[...p];O!==void 0?N.splice(O+1,0,P):N.push(P),c(g(N),b.path,j)},[p,c,g,r,b]),w=A.useCallback((E,O)=>{E&&E.preventDefault();let j;if(r){j={};for(const N in r){const D=parseInt(N);D<O?pn(j,[D],r[N]):D>O&&pn(j,[D-1],r[N])}}const P=p.filter((N,D)=>D!==O);c(g(P),b.path,j)},[p,c,g,r,b]),T=A.useCallback((E,O,j)=>{E&&(E.preventDefault(),E.currentTarget.blur());let P;if(r){P={};for(const L in r){const U=parseInt(L);U==O?pn(P,[j],r[O]):U==j?pn(P,[O],r[j]):pn(P,[L],r[U])}}function N(){const L=p.slice();return L.splice(O,1),L.splice(j,0,p[O]),L}const D=N();c(g(D),b.path,P)},[p,c,g,r,b]),v=A.useCallback((E,O,j,P)=>{c(E===void 0?null:E,O,j,P)},[c]),_=A.useCallback(E=>{c(E,b.path,void 0,b?.[Tn])},[c,b]),S={...e,formData:a,fieldPathId:b,onSelectChange:_},C={...e,handleAddItem:y,handleCopyItem:x,handleRemoveItem:w,handleReorderItems:T,keyedFormData:p,onChange:v};if(!(cf in t)){if(!u.useFallbackUiForUnsupportedType){const O=ut(n),j=gt("UnsupportedFieldTemplate",i,O);return M.jsx(j,{schema:t,fieldPathId:o,reason:h(zt.MissingItems),registry:i})}const E={...t,[cf]:{type:void 0}};S.schema=E,C.schema=E}return f.isMultiSelect(S.schema)?M.jsx(Fue,{...S}):BI(n)?M.jsx(Uue,{...S}):B_(S.schema)?M.jsx(Bue,{...C}):f.isFilesArray(S.schema,n)?M.jsx(Vue,{...S}):M.jsx(que,{...C})}function Gue(e){const{schema:t,name:n,uiSchema:r,fieldPathId:o,formData:i,registry:a,required:c,disabled:u,readonly:f,hideError:h,autofocus:p,title:g,onChange:b,onFocus:y,onBlur:x,rawErrors:w}=e,{title:T}=t,{widgets:v,translateString:_,globalUiOptions:S}=a,{widget:C="checkbox",title:E,label:O=!0,enumNames:j,...P}=ut(r,S),N=si(t,C,v),D=_(zt.YesLabel),L=_(zt.NoLabel);let U;const X=E??T??g??n;if(Array.isArray(t.oneOf))U=uf({oneOf:t.oneOf.map(Z=>{if(Qt(Z))return{...Z,title:Z.title||(Z.const===!0?D:L)}}).filter(Z=>Z)},r);else{const Z=t.enum??[!0,!1];!j&&Z.length===2&&Z.every(q=>typeof q=="boolean")?U=[{value:Z[0],label:Z[0]?D:L},{value:Z[1],label:Z[1]?D:L}]:U=uf({enum:Z},r)}const Q=A.useCallback((Z,q,G)=>b(Z,o.path,q,G),[b,o]);return M.jsx(N,{options:{...P,enumOptions:U},schema:t,uiSchema:r,id:o.$id,name:n,onChange:Q,onFocus:y,onBlur:x,label:X,hideLabel:!O,value:i,required:c,disabled:u,readonly:f,hideError:h,registry:a,autofocus:p,rawErrors:w,htmlName:o.name})}function Zue(e){return{type:"string",enum:["string","number","boolean","object","array"],default:"string",title:e}}function Wue(e){const t=typeof e;return t==="string"||t==="number"||t==="boolean"?t:t==="object"?Array.isArray(e)?"array":"object":"string"}function Yue(e,t){switch(t){case"string":return String(e);case"number":{const n=Number(e);return isNaN(n)?0:n}case"boolean":return!!e;default:return e}}function Xue(e){const{id:t,formData:n,displayLabel:r=!0,schema:o,name:i,uiSchema:a,required:c,disabled:u=!1,readonly:f=!1,onBlur:h,onFocus:p,registry:g,fieldPathId:b,onChange:y,errorSchema:x}=e,{translateString:w,fields:T,globalFormOptions:v}=g,[_,S]=A.useState(Wue(n)),C=ut(a),E=Ac(gs("__internal_type_selector",v,b)),O=w(zt.Type),j=A.useMemo(()=>Zue(O),[O]),P=L=>{L!=null&&(S(L),y(Yue(n,L),b.path,x,t))};if(!v.useFallbackUiForUnsupportedType){const{reason:L=w(zt.UnknownFieldType,[String(o.type)])}=e,U=gt("UnsupportedFieldTemplate",g,C);return M.jsx(U,{schema:o,fieldPathId:b,reason:L,registry:g})}const N=gt("FallbackFieldTemplate",g,C),{SchemaField:D}=T;return M.jsx(N,{schema:o,registry:g,typeSelector:M.jsx(D,{fieldPathId:E,name:`${i}__fallback_type`,schema:j,formData:_,onChange:P,onBlur:h,onFocus:p,registry:g,hideLabel:!r,disabled:u,readonly:f,required:c},n?Xs(n):"__empty__"),schemaField:M.jsx(D,{...e,schema:{type:_,title:w(zt.Value),..._==="object"&&{additionalProperties:!0}}})})}var Js;(function(e){e.ROW="ui:row",e.COLUMN="ui:col",e.COLUMNS="ui:columns",e.CONDITION="ui:condition"})(Js||(Js={}));var mh;(function(e){e.ALL="all",e.SOME="some",e.NONE="none"})(mh||(mh={}));const Que=/^\$lookup=(.+)/,yS="layoutGrid";function bj(e,t){return e??t}function Jue(e){return/^\d+?$/.test(e)}const Fa=G_();function efe(e,t,n,r,o){const i=Ie(n,[ux],{}),a=Ie(n,e),c={...Ie(a,[za],{}),...t,...i},u={...a};wr(c)||pn(u,[za],c),wr(i)||pn(u,[ux],i);let{readonly:f}=ut(u);return(o===!0||PN(f)&&r===!0)&&(f=!0,Ht(c,rS)?pn(u,[za,rS],!0):pn(u,`ui:${rS}`,!0)),{fieldUiSchema:u,uiReadonly:f}}function tfe(e,t,n="$0m3tH1nG Un3xP3cT3d"){const r=fw([t]).sort(),o=fw([n]).sort();switch(e){case mh.ALL:return $a(r,o);case mh.SOME:return PA(r,o).length>0;case mh.NONE:return PA(r,o).length===0;default:return!1}}function U0(e,t,n){let r={},o=e[t];if(Ka(o)){const{children:i,className:a,...c}=o;if(o=i,a){const f=a.split(" ").map(h=>Y_(n,h,h)).join(" ");r={...c,className:f}}else r=c}if(!Array.isArray(o))throw new TypeError(`Expected array for "${t}" in ${JSON.stringify(e)}`);return{children:o,gridProps:r}}function Sj(e,t,n){let r;if(Jue(n)&&e&&e?.type==="array"&&Ht(e,cf)){const o=Number(n),i=e[cf];Array.isArray(i)?o>i.length?r=kN(i):r=i[o]:r=i,t={[Tn]:t[Tn],path:[...t.path.slice(0,t.path.length-1),o]}}return{rawSchema:r,fieldPathId:t}}function nfe(e,t,n,r,o){const{schemaUtils:i,globalFormOptions:a}=e;let c=n,u=o;const f=t.split("."),h=f.pop();let p=i.retrieveSchema(c,r),g=r,b=p.readOnly;f.forEach(w=>{if(u=gs(w,a,u),Ht(p,sn))c=Ie(p,[sn,w],{});else if(p&&(Ht(p,Pt)||Ht(p,Xt))){const T=Ht(p,Pt)?Pt:Xt,v=i.findSelectedOptionInXxxOf(p,w,T,g);c=Ie(v,[sn,w],{})}else{const T=Sj(p,u,w);c=T.rawSchema??{},u=T.fieldPathId}g=Ie(g,w,{}),p=i.retrieveSchema(c,g),b=bj(p.readOnly,b)});let y,x=!1;if(wr(p)&&(p=void 0),p&&h){if(p&&(Ht(p,Pt)||Ht(p,Xt))){const T=Ht(p,Pt)?Pt:Xt;p=i.findSelectedOptionInXxxOf(p,h,T,g)}u=gs(h,a,u),x=p!==void 0&&Array.isArray(p.required)&&oG(p.required,h);const w=Sj(p,u,h);if(w.rawSchema?(p=w.rawSchema,u=w.fieldPathId):(p=Ie(p,[sn,h]),p=p&&i.retrieveSchema(p)),b=bj(p?.readOnly,b),p&&(Ht(p,Pt)||Ht(p,Xt))){const T=Ht(p,Pt)?Pt:Xt,v=oi(p);y={options:p[T],hasDiscriminator:!!v}}}return{schema:p,isRequired:x,isReadonly:b,optionsInfo:y,fieldPathId:u}}function rfe(e,t){let n=e;return Ga(n)&&(n=Y_(t,n)),Xh(n)?n:null}function ofe(e,t){let n,r=null,o={},i;if(Ga(t)||PN(t))n=t??"";else{const{name:a="",render:c,...u}=t;n=a,o=u,wr(o)||ZK(o,(f,h)=>{if(Ga(f)){const p=Que.exec(f);if(Array.isArray(p)&&p.length>1){const g=p[1];o[h]=Y_(e,g,g)}}}),r=rfe(c,e),!a&&r&&(i=M.jsx(r,{...u,"data-testid":Fa.uiComponent}))}return{name:n,UIComponent:r,uiProps:o,rendered:i}}function V0(e){const{childrenLayoutGridSchemaId:t,...n}=e,{registry:r,schema:o,formData:i}=n,{schemaUtils:a}=r,c=a.retrieveSchema(o,i);return t.map(u=>A.createElement(J_,{...n,key:`layoutGrid-${Xs(u)}`,schema:c,layoutGridSchema:u}))}function sfe(e){const{layoutGridSchema:t,...n}=e,{formData:r,registry:o}=n,{children:i,gridProps:a}=U0(t,Js.CONDITION,o),{operator:c,field:u="",value:f}=a,h=Ie(r,u,null);return tfe(c,h,f)?M.jsx(V0,{...n,childrenLayoutGridSchemaId:i}):null}function ife(e){const{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:o}=n,{children:i,gridProps:a}=U0(t,Js.COLUMN,r),c=ut(o),u=gt("GridTemplate",r,c);return M.jsx(u,{column:!0,"data-testid":Fa.col,...a,children:M.jsx(V0,{...n,childrenLayoutGridSchemaId:i})})}function afe(e){const{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:o}=n,{children:i,gridProps:a}=U0(t,Js.COLUMNS,r),c=ut(o),u=gt("GridTemplate",r,c);return i.map(f=>M.jsx(u,{column:!0,"data-testid":Fa.col,...a,children:M.jsx(V0,{...n,childrenLayoutGridSchemaId:[f]})},`column-${Xs(f)}`))}function lfe(e){const{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:o}=n,{children:i,gridProps:a}=U0(t,Js.ROW,r),c=ut(o),u=gt("GridTemplate",r,c);return M.jsx(u,{...a,"data-testid":Fa.row,children:M.jsx(V0,{...n,childrenLayoutGridSchemaId:i})})}function cfe(e){const{gridSchema:t,schema:n,uiSchema:r,errorSchema:o,fieldPathId:i,onBlur:a,onFocus:c,formData:u,readonly:f,registry:h,layoutGridSchema:p,...g}=e,{onChange:b}=g,{fields:y}=h,{SchemaField:x,LayoutMultiSchemaField:w}=y,T=ofe(h,t),{name:v,UIComponent:_,uiProps:S}=T,{schema:C,isRequired:E,isReadonly:O,optionsInfo:j,fieldPathId:P}=nfe(h,v,n,u,i),N=Ac(P);if(T.rendered)return T.rendered;if(C){const D=j?.hasDiscriminator?w:x,{fieldUiSchema:L,uiReadonly:U}=efe(v,S,r,O,f);return M.jsx(D,{"data-testid":j?.hasDiscriminator?Fa.layoutMultiSchemaField:Fa.field,...g,name:v,required:E,readonly:U,schema:C,uiSchema:L,errorSchema:Ie(o,v),fieldPathId:N,formData:Ie(u,v),onChange:b,onBlur:a,onFocus:c,options:j?.options,registry:h})}return _?M.jsx(_,{"data-testid":Fa.uiComponent,...g,name:v,required:E,formData:u,readOnly:!!O||f,errorSchema:o,uiSchema:r,schema:n,fieldPathId:i,onBlur:a,onFocus:c,registry:h,...S}):null}function J_(e){const{uiSchema:t}=e;let{layoutGridSchema:n}=e;const r=ut(t);if(!n&&yS in r&&Qt(r[yS])&&(n=r[yS]),Qt(n)){if(Js.ROW in n)return M.jsx(lfe,{...e,layoutGridSchema:n});if(Js.COLUMN in n)return M.jsx(ife,{...e,layoutGridSchema:n});if(Js.COLUMNS in n)return M.jsx(afe,{...e,layoutGridSchema:n});if(Js.CONDITION in n)return M.jsx(sfe,{...e,layoutGridSchema:n})}return M.jsx(cfe,{...e,gridSchema:n})}J_.TEST_IDS=Fa;function ufe(e){const{fieldPathId:t,title:n,schema:r,uiSchema:o,required:i,registry:a,name:c}=e,u=ut(o,a.globalUiOptions),{title:f}=u,{title:h}=r,p=f||n||h||c;if(!p)return null;const g=gt("TitleFieldTemplate",a,u);return M.jsx(g,{id:F0(t),title:p,required:i,schema:r,uiSchema:o,registry:a})}function vS(e,t,n){const r="!@#!@$@#$!@$#";return e.map(({schema:i})=>i).find(i=>{const a=Ie(i,[sn,t]);return Ie(a,z0,Ie(a,ms,r))===n})}function wj(e,t,n,r,o){const i=t.map(u=>n.retrieveSchema(u,o));let a=e;Ht(e,Pt)?a={...e,[Pt]:i}:Ht(e,Xt)&&(a={...e,[Xt]:i});const c=uf(a,r);if(!c)throw new Error(`No enumOptions were computed from the schema ${JSON.stringify(a)}`);return c}function ffe(e){const{name:t,baseType:n,disabled:r=!1,formData:o,fieldPathId:i,onBlur:a,onChange:c,options:u,onFocus:f,registry:h,uiSchema:p,schema:g,autofocus:b,readonly:y,required:x,errorSchema:w,hideError:T=!1}=e,{widgets:v,schemaUtils:_,globalUiOptions:S}=h,[C,E]=A.useState(wj(g,u,_,p,o)),O=Ie(i,Tn),j=oi(g),P=gt("FieldErrorTemplate",h,u),N=gt("FieldTemplate",h,u),D=Xs(g),L=Xs(u),U=p?Xs(p):"",X=o?Xs(o):"";A.useEffect(()=>{E(wj(g,u,_,p,o))},[D,L,_,U,X]);const{widget:Q=j?"radio":"select",title:Z="",placeholder:q="",optionsSchemaSelector:G=j,hideError:oe,...ne}=ut(p);if(!G)throw new Error("No selector field provided for the LayoutMultiSchemaField");const $=Ie(o,G);let F=Ie(C[0]?.schema,[sn,G],{});const V=vS(C,G,$);F=F?.type?F:{...F,type:V?.type||n};const I=si(F,Q,v),K=oe===void 0?T:!!oe,te=Ie(w,[Zr],[]),re=Ch(w,[Zr]),ie=_.getDisplayLabel(g,p,S),me=se=>{const de=vS(C,G,se),Ee=vS(C,G,$);let Re=_.sanitizeDataForNewSchema(de,Ee,o);Re&&de&&(Re=_.getDefaultFormState(de,Re,"excludeObjectChildren")),Re&&pn(Re,G,se),c(Re,i.path,void 0,O)},Ce={enumOptions:C,...ne},ee=!K&&te.length>0?M.jsx(P,{fieldPathId:i,schema:g,errors:te,registry:h}):void 0;return M.jsx(N,{id:O,schema:g,label:(Z||g.title)??"",disabled:r||Array.isArray(C)&&wr(C),uiSchema:p,required:x,readonly:!!y,registry:h,displayLabel:ie,errors:ee,onChange:c,onKeyRename:sy,onKeyRenameBlur:sy,onRemoveProperty:sy,children:M.jsx(I,{id:O,name:t,schema:g,label:(Z||g.title)??"",disabled:r||Array.isArray(C)&&wr(C),uiSchema:p,autofocus:b,readonly:y,required:x,registry:h,multiple:!1,rawErrors:te,hideError:K,hideLabel:!ie,errorSchema:re,placeholder:q,onChange:me,onBlur:a,onFocus:f,value:$,options:Ce,htmlName:i.name})})}class xj extends A.Component{constructor(t){super(t);const{formData:n,options:r,registry:{schemaUtils:o}}=this.props,i=r.map(a=>o.retrieveSchema(a,n));this.state={retrievedOptions:i,selectedOption:this.getMatchingOption(0,n,i)}}componentDidUpdate(t,n){const{formData:r,options:o,fieldPathId:i}=this.props,{selectedOption:a}=this.state;let c=this.state;if(!Pn(t.options,o)){const{registry:{schemaUtils:u}}=this.props,f=o.map(h=>u.retrieveSchema(h,r));c={selectedOption:a,retrievedOptions:f}}if(!Pn(r,t.formData)&&i.$id===t.fieldPathId.$id){const{retrievedOptions:u}=c,f=this.getMatchingOption(a,r,u);n&&f!==a&&(c={selectedOption:f,retrievedOptions:u})}c!==this.state&&this.setState(c)}getMatchingOption(t,n,r){const{schema:o,registry:{schemaUtils:i}}=this.props,a=oi(o);return i.getClosestMatchingOption(n,r,t,a)}onOptionChange=t=>{const{selectedOption:n,retrievedOptions:r}=this.state,{formData:o,onChange:i,registry:a,fieldPathId:c}=this.props,{schemaUtils:u}=a,f=t!==void 0?parseInt(t,10):-1;if(f===n)return;const h=f>=0?r[f]:void 0,p=n>=0?r[n]:void 0;let g=u.sanitizeDataForNewSchema(h,p,o);h&&(g=u.getDefaultFormState(h,g,"excludeObjectChildren")),this.setState({selectedOption:f},()=>{i(g,c.path,void 0,this.getFieldId())})};getFieldId(){const{fieldPathId:t,schema:n}=this.props;return`${t.$id}${n.oneOf?"__oneof_select":"__anyof_select"}`}render(){const{name:t,disabled:n=!1,errorSchema:r={},formData:o,onBlur:i,onFocus:a,readonly:c,required:u=!1,registry:f,schema:h,uiSchema:p}=this.props,{widgets:g,fields:b,translateString:y,globalUiOptions:x,schemaUtils:w}=f,{SchemaField:T}=b,v=gt("MultiSchemaFieldTemplate",f,x),_=yp(f,h,u,p),S=Df(o),{selectedOption:C,retrievedOptions:E}=this.state,{widget:O="select",placeholder:j,autofocus:P,autocomplete:N,title:D=h.title,...L}=ut(p,x),U=si({type:"number"},O,g),X=Ie(r,Zr,[]),Q=Ch(r,[Zr]),Z=w.getDisplayLabel(h,p,x),q=C>=0&&E[C]||null;let G;if(q){const{required:te}=h;G=te?qi({required:te},q):q}let oe=[];Pt in h&&p&&Pt in p?Array.isArray(p[Pt])?oe=p[Pt]:console.warn(`uiSchema.oneOf is not an array for "${D||t}"`):Xt in h&&p&&Xt in p&&(Array.isArray(p[Xt])?oe=p[Xt]:console.warn(`uiSchema.anyOf is not an array for "${D||t}"`));let ne=p;C>=0&&oe.length>C&&(ne=oe[C]);const $=D?zt.TitleOptionPrefix:zt.OptionPrefix,F=D?[D]:[],V=E.map((te,re)=>{const{title:ie=te.title}=ut(oe[re]);return{label:ie||y($,F.concat(String(re+1))),value:re}}),I=!_||S?M.jsx(U,{id:this.getFieldId(),name:`${t}${h.oneOf?"__oneof_select":"__anyof_select"}`,schema:{type:"number",default:0},onChange:this.onOptionChange,onBlur:i,onFocus:a,disabled:n||wr(V),multiple:!1,rawErrors:X,errorSchema:Q,value:C>=0?C:void 0,options:{enumOptions:V,...L},registry:f,placeholder:j,autocomplete:N,autofocus:P,label:D??t,hideLabel:!Z,readonly:c}):void 0,K=G&&G.type!=="null"&&M.jsx(T,{...this.props,schema:G,uiSchema:ne})||null;return M.jsx(v,{schema:h,registry:f,uiSchema:p,selector:I,optionSchemaField:K})}}const dfe=/\.([0-9]*0)*$/,hfe=/[0.]0*$/;function pfe(e){const{registry:t,onChange:n,formData:r,value:o}=e,[i,a]=A.useState(o),{StringField:c}=t.fields;let u=r;const f=A.useCallback((h,p,g,b)=>{a(h),`${h}`.charAt(0)==="."&&(h=`0${h}`);const y=typeof h=="string"&&h.match(dfe)?Z5(h.replace(hfe,"")):Z5(h);n(y,p,g,b)},[n]);if(typeof i=="string"&&typeof u=="number"){const h=new RegExp(`^(${String(u).replace(".","\\.")})?\\.?0*$`);i.match(h)&&(u=i)}return M.jsx(c,{...e,formData:u,onChange:f})}function Gs(){return Gs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gs.apply(null,arguments)}const zg=["strong","em","del","mark"],Ej=[["**",zg[0]],["__",zg[0]],["~~",zg[2]],["==",zg[3]],["*","em"],["_","em"]];function mfe(e,t){for(var n=1,r=t+1;r<e.length&&n>0;)e[r]!=="\\"?(e[r]==="["&&n++,e[r]==="]"&&n--,r++):r+=2;if(n===0&&r<e.length&&(e[r]==="("||e[r]==="[")){var o=e[r]==="("?")":"]",i=1;for(r++;r<e.length&&i>0;)e[r]!=="\\"?(e[r]==="("&&o===")"&&i++,e[r]===o&&i--,r++):r+=2;if(i===0)return r}return-1}function gfe(e,t){if(!t||!t.inline&&!t.simple)return null;var n=e[0];if(n!=="*"&&n!=="_"&&n!=="~"&&n!=="=")return null;for(var r="",o=0,i="",a=0;a<6;a++){var c=Ej[a][0];if(e.startsWith(c)&&e.length>=2*c.length){r=c,o=c.length,i=Ej[a][1];break}}if(!r)return null;for(var u=o,f=!1,h=!1,p="",g=0,b="",y=!1,x="";u<e.length;){var w=e[u];if(y)b+=w,y=!1,x=w,u++;else if(w!=="\\")if(w!=="`"||g!==0){if(w==="["&&!f&&g===0){var T=mfe(e,u);if(T!==-1){b+=e.slice(u,T),u=T,x=e[T-1];continue}}if(h)b+=w,p?w===p&&(p=""):w==='"'||w==="'"?p=w:w===">"&&(h=!1),x=w,u++;else if(w!=="<"||f){if(w===`
61
61
  `&&x===`
62
62
  `&&!f&&g===0)return null;if(!f&&g===0){for(var v=0;u+v<e.length&&e[u+v]===r[0];)v++;if(v>=o&&(o!==1||r!=="*"&&r!=="_"||e[u-1]!==r&&e[u+1]!==r)){var _=[e.slice(0,u+v),i,b+e.slice(u+o,u+v)];return _.index=0,_.input=e,_}}b+=w,x=w,u++}else{var S=e[u+1],C=e.indexOf(">",u);if(C!==-1){var E=e.slice(u,C+1).endsWith("/>");S==="/"?g=Math.max(0,g-1):E||g++}h=!0,b+=w,x=w,u++}}else f=!f,b+=w,x=w,u++;else b+=w,y=!0,x=w,u++}return null}const yfe=["children","options"],_j=["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"}),Cj={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},vfe=["style","script","pre"],bfe=["src","href","data","formAction","srcDoc","action"],Sfe=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,wfe=/\n{2,}$/,Tj=/^(\s*>[\s\S]*?)(?=\n\n|$)/,xfe=/^ *> ?/gm,Efe=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,_fe=/^ {2,}\n/,Cfe=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,Rj=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,Oj=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,Tfe=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,Rfe=/^(?:\n *)*\n/,Ofe=/\r\n?/g,Afe=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,kfe=/^\[\^([^\]]+)]/,Mfe=/\f/g,jfe=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,Pfe=/^\[(x|\s)\]/,Aj=/^(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,kj=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Mj=/^([^\n]+)\n *(=|-)\2{2,} *\n/,e2=/^<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>/i;function Nfe(e){const t=e2.exec(e);if(!t)return null;const n=t[1],r=n.toLowerCase(),o=r.length+1;let i=t[0].length;e[i]===`
@@ -172,4 +172,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
172
172
  ${r}
173
173
  await waitForOpenAI();
174
174
  ${n.textContent}
175
- `,t.head.innerHTML+t.body.innerHTML}const Qxe=()=>{const e=ll(),{openaiObject:t}=Tf(e.name),{data:n}=Cne(e._meta?.["openai/outputTemplate"]),{setToolData:r,pushOpenAiLog:o,updateOpenaiObject:i}=Cf(),a=A.useRef(null),c=A.useRef(null),u=A.useRef(!1),f=n.contents[0].text,h=A.useCallback(()=>{if(u.current)return;const p=a.current;!p||!p.contentWindow||!p.contentDocument||(u.current=!0,Yxe(p.contentWindow,t,(g,b,y="default")=>{o(e.name,{timestamp:Date.now(),command:g,args:b,type:y})},(g,b)=>{i(e.name,g,b)},(g,b)=>Af.callTool(g,b)),p.contentDocument.open(),p.contentDocument.write(Xxe(f)),p.contentDocument.close(),r(e.name,{openaiRef:a}))},[t,o,r,i,e.name,f]);return A.useEffect(()=>{h()},[h]),M.jsx("div",{ref:c,className:"relative overflow-auto",style:{width:"100%",height:"100%"},children:M.jsx("iframe",{ref:a,src:"about:blank",onLoad:h,style:{width:"100%",height:"100%",border:"none",display:"block"},sandbox:"allow-scripts allow-same-origin",title:"html-preview"})})},Jxe=()=>{const e=ll(),t=Tf(e.name),{defaultLayout:n,onLayoutChange:r}=Wd({id:"skybridge-devtools-input-column",storage:localStorage}),{defaultLayout:o,onLayoutChange:i}=Wd({id:"skybridge-devtools-widget-section",storage:localStorage}),{defaultLayout:a,onLayoutChange:c}=Wd({id:"skybridge-devtools-inspector-section",storage:localStorage}),{defaultLayout:u,onLayoutChange:f}=Wd({id:"skybridge-devtools-main-section",storage:localStorage}),h=!!(e._meta?.["openai/outputTemplate"]&&t?.response&&!t.response.isError);return M.jsx("div",{className:"flex-1 flex flex-col overflow-hidden relative z-10",children:M.jsxs(Au,{orientation:"vertical",className:"flex-1 overflow-hidden",defaultLayout:u,onLayoutChange:f,children:[M.jsx(Os,{id:"top-section",minSize:"30",children:M.jsxs(Au,{orientation:"horizontal",className:"flex-1 overflow-hidden",defaultLayout:n,onLayoutChange:r,children:[M.jsx(Os,{id:"input-column",minSize:"20",maxSize:"60",children:M.jsx("div",{className:"flex flex-col overflow-hidden h-full",children:M.jsx(vSe,{})})}),M.jsx(ku,{className:"w-px bg-border"}),M.jsx(Os,{id:"output-column",minSize:"30",children:M.jsx("div",{className:"flex flex-col overflow-hidden h-full",children:M.jsx(vxe,{})})})]})}),h&&M.jsxs(M.Fragment,{children:[M.jsx(ku,{className:"h-px bg-border"}),M.jsx(Os,{id:"widget-section",minSize:"20",children:M.jsxs(Au,{orientation:"horizontal",className:"flex-1 overflow-hidden bg-card",defaultLayout:a,onLayoutChange:c,children:[M.jsx(Os,{id:"widget-logs-panel",minSize:"30",children:M.jsx("div",{className:"flex flex-col h-full overflow-hidden",children:M.jsxs(Au,{orientation:"vertical",className:"flex-1 overflow-hidden",defaultLayout:o,onLayoutChange:i,children:[M.jsx(Os,{id:"widget-panel",minSize:"20",maxSize:"80",children:M.jsx("div",{className:"h-full overflow-hidden",children:M.jsx(A.Suspense,{children:M.jsx(Qxe,{})})})}),M.jsx(ku,{className:"h-px bg-border"}),M.jsx(Os,{id:"logs-panel",minSize:"20",children:M.jsx("div",{className:"p-4 flex flex-col h-full min-h-0",children:M.jsx(hxe,{})})})]})})}),M.jsx(ku,{className:"w-px bg-border"}),M.jsx(Os,{id:"inspector-panel",minSize:"20",maxSize:"50",defaultSize:30,children:M.jsx("div",{className:"flex flex-col overflow-hidden h-full min-h-0",children:M.jsx("div",{className:"overflow-auto",children:M.jsx(uxe,{})})})})]})})]})]})})};function eEe(){const e=mD(),[,t]=xE(),n=t_();return M.jsx("div",{className:"h-full border-r border-border bg-card flex flex-col",children:M.jsxs("aside",{className:"h-full flex flex-col",children:[M.jsxs("div",{className:"p-4 border-b border-border h-[72px] flex flex-col justify-center",children:[M.jsx("h2",{className:"text-sm font-semibold text-foreground mb-1",children:"Tools"}),M.jsxs("p",{className:"text-xs text-muted-foreground",children:[e?.length," ",e?.length===1?"tool":"tools"]})]}),M.jsx("div",{className:"flex-1 overflow-y-auto",children:M.jsx("div",{className:"p-2",children:e?.length===0?M.jsx("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No tools available"}):M.jsx("div",{className:"space-y-1",children:e?.map(r=>{const o=r.name===n?.name;return M.jsxs("button",{type:"button",onClick:()=>t(r.name),className:Et("w-full text-left px-3 py-3 rounded-md transition-colors cursor-pointer relative","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1",o&&"bg-accent text-accent-foreground"),children:[M.jsxs("div",{className:"pr-6 flex flex-col gap-1",children:[M.jsx("div",{className:Et("font-semibold text-sm leading-tight truncate",o&&"text-accent-foreground"),children:r.name}),r.description&&M.jsx("div",{className:Et("text-xs leading-snug text-muted-foreground","line-clamp-2",o&&"text-accent-foreground/80"),children:r.description})]}),o&&M.jsx("div",{className:"absolute top-3 right-3 w-1.5 h-1.5 rounded-full bg-primary"})]},r.name)})})})})]})})}function tEe(){const e=t_(),{defaultLayout:t,onLayoutChange:n}=Wd({id:"skybridge-devtools-tools-list",storage:localStorage});return M.jsxs("div",{className:"flex h-screen w-full flex-col overflow-hidden bg-background",children:[M.jsx(Roe,{}),M.jsxs(Au,{orientation:"horizontal",className:"flex-1 overflow-hidden",defaultLayout:t,onLayoutChange:n,children:[M.jsx(Os,{id:"tools-list",minSize:"15",maxSize:"40",children:M.jsx(eEe,{})}),M.jsx(ku,{className:"w-px bg-border"}),M.jsx(Os,{id:"main-content",minSize:"30",children:M.jsx("div",{className:"flex flex-1 flex-col overflow-hidden relative h-full",children:e?M.jsx(Jxe,{}):M.jsx(ace,{})})})]})]})}const nEe=new $7;function rEe(){return M.jsx(I7,{client:nEe,children:M.jsx(bU,{children:M.jsx(tEe,{})})})}d7.createRoot(document.getElementById("root")).render(M.jsx(A.StrictMode,{children:M.jsx(rEe,{})}))});export default oEe();
175
+ `,t.head.innerHTML+t.body.innerHTML}const Qxe=()=>{const e=ll(),{openaiObject:t}=Tf(e.name),{data:n}=Cne(e._meta?.["openai/outputTemplate"]),{setToolData:r,pushOpenAiLog:o,updateOpenaiObject:i}=Cf(),a=A.useRef(null),c=A.useRef(null),u=A.useRef(!1),f=n.contents[0].text,h=A.useCallback(()=>{if(u.current)return;const p=a.current;!p||!p.contentWindow||!p.contentDocument||(u.current=!0,Yxe(p.contentWindow,t,(g,b,y="default")=>{o(e.name,{timestamp:Date.now(),command:g,args:b,type:y})},(g,b)=>{i(e.name,g,b)},(g,b)=>Af.callTool(g,b)),p.contentDocument.open(),p.contentDocument.write(Xxe(f)),p.contentDocument.close(),r(e.name,{openaiRef:a}))},[t,o,r,i,e.name,f]);return A.useEffect(()=>{h()},[h]),M.jsx("div",{ref:c,className:"relative overflow-auto",style:{width:"100%",height:"100%"},children:M.jsx("iframe",{ref:a,src:"about:blank",onLoad:h,style:{width:"100%",height:"100%",border:"none",display:"block"},sandbox:"allow-scripts allow-same-origin",title:"html-preview"})})},Jxe=()=>{const e=ll(),t=Tf(e.name),{defaultLayout:n,onLayoutChange:r}=Wd({id:"skybridge-devtools-input-column",storage:localStorage}),{defaultLayout:o,onLayoutChange:i}=Wd({id:"skybridge-devtools-widget-section",storage:localStorage}),{defaultLayout:a,onLayoutChange:c}=Wd({id:"skybridge-devtools-inspector-section",storage:localStorage}),{defaultLayout:u,onLayoutChange:f}=Wd({id:"skybridge-devtools-main-section",storage:localStorage}),h=!!(e._meta?.["openai/outputTemplate"]&&t?.response&&!t.response.isError);return M.jsx("div",{className:"flex-1 flex flex-col overflow-hidden relative z-10",children:M.jsxs(Au,{orientation:"vertical",className:"flex-1 overflow-hidden",defaultLayout:u,onLayoutChange:f,children:[M.jsx(Os,{id:"top-section",minSize:"30",children:M.jsxs(Au,{orientation:"horizontal",className:"flex-1 overflow-hidden",defaultLayout:n,onLayoutChange:r,children:[M.jsx(Os,{id:"input-column",minSize:"20",maxSize:"60",children:M.jsx("div",{className:"flex flex-col overflow-hidden h-full",children:M.jsx(vSe,{})})}),M.jsx(ku,{className:"w-px bg-border"}),M.jsx(Os,{id:"output-column",minSize:"30",children:M.jsx("div",{className:"flex flex-col overflow-hidden h-full",children:M.jsx(vxe,{})})})]})}),h&&M.jsxs(M.Fragment,{children:[M.jsx(ku,{className:"h-px bg-border"}),M.jsx(Os,{id:"widget-section",minSize:"20",children:M.jsxs(Au,{orientation:"horizontal",className:"flex-1 overflow-hidden bg-card",defaultLayout:a,onLayoutChange:c,children:[M.jsx(Os,{id:"widget-logs-panel",minSize:"30",children:M.jsx("div",{className:"flex flex-col h-full overflow-hidden",children:M.jsxs(Au,{orientation:"vertical",className:"flex-1 overflow-hidden",defaultLayout:o,onLayoutChange:i,children:[M.jsx(Os,{id:"widget-panel",minSize:"20",maxSize:"80",children:M.jsx("div",{className:"h-full overflow-hidden",children:M.jsx(A.Suspense,{children:M.jsx(Qxe,{})})})}),M.jsx(ku,{className:"h-px bg-border"}),M.jsx(Os,{id:"logs-panel",minSize:"20",children:M.jsx("div",{className:"p-4 flex flex-col h-full min-h-0",children:M.jsx(hxe,{})})})]})})}),M.jsx(ku,{className:"w-px bg-border"}),M.jsx(Os,{id:"inspector-panel",minSize:"20",maxSize:"50",defaultSize:30,children:M.jsx("div",{className:"flex flex-col overflow-hidden h-full min-h-0",children:M.jsx("div",{className:"overflow-auto",children:M.jsx(uxe,{})})})})]})})]})]})})};function eEe(){const e=mD(),[,t]=xE(),n=t_();return M.jsx("div",{className:"h-full border-r border-border bg-card flex flex-col",children:M.jsxs("aside",{className:"h-full flex flex-col",children:[M.jsxs("div",{className:"p-4 border-b border-border h-[72px] flex flex-col justify-center",children:[M.jsx("h2",{className:"text-sm font-semibold text-foreground mb-1",children:"Tools"}),M.jsxs("p",{className:"text-xs text-muted-foreground",children:[e?.length," ",e?.length===1?"tool":"tools"]})]}),M.jsx("div",{className:"flex-1 overflow-y-auto",children:M.jsx("div",{className:"p-2",children:e?.length===0?M.jsx("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No tools registered yet."}):M.jsx("div",{className:"space-y-1",children:e?.map(r=>{const o=r.name===n?.name;return M.jsxs("button",{type:"button",onClick:()=>t(r.name),className:Et("w-full text-left px-3 py-3 rounded-md transition-colors cursor-pointer relative","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1",o&&"bg-accent text-accent-foreground"),children:[M.jsxs("div",{className:"pr-6 flex flex-col gap-1",children:[M.jsx("div",{className:Et("font-semibold text-sm leading-tight truncate",o&&"text-accent-foreground"),children:r.name}),r.description&&M.jsx("div",{className:Et("text-xs leading-snug text-muted-foreground","line-clamp-2",o&&"text-accent-foreground/80"),children:r.description})]}),o&&M.jsx("div",{className:"absolute top-3 right-3 w-1.5 h-1.5 rounded-full bg-primary"})]},r.name)})})})})]})})}function tEe(){const e=t_(),{defaultLayout:t,onLayoutChange:n}=Wd({id:"skybridge-devtools-tools-list",storage:localStorage});return M.jsxs("div",{className:"flex h-screen w-full flex-col overflow-hidden bg-background",children:[M.jsx(Roe,{}),M.jsxs(Au,{orientation:"horizontal",className:"flex-1 overflow-hidden",defaultLayout:t,onLayoutChange:n,children:[M.jsx(Os,{id:"tools-list",minSize:"15",maxSize:"40",children:M.jsx(eEe,{})}),M.jsx(ku,{className:"w-px bg-border"}),M.jsx(Os,{id:"main-content",minSize:"30",children:M.jsx("div",{className:"flex flex-1 flex-col overflow-hidden relative h-full",children:e?M.jsx(Jxe,{}):M.jsx(ace,{})})})]})]})}const nEe=new $7;function rEe(){return M.jsx(I7,{client:nEe,children:M.jsx(bU,{children:M.jsx(tEe,{})})})}d7.createRoot(document.getElementById("root")).render(M.jsx(A.StrictMode,{children:M.jsx(rEe,{})}))});export default oEe();