PageSourceSearch

https://inclusivelymade.ai/_next/static/chunks/0f8vb7n192z-3.js

js inclusivelymade.ai collected 2026-10-05 12:06:13 UTC 177,083 bytes, 11 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,952443,408913,125673,280218,307203,t=>{"use strict";var e=t.i(235884);let i=(0,e.default)("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);t.s(["ArrowRight",0,i],952443);let n=(0,e.default)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);async function r(t,e){var i;let n,r,s=await fetch(`${t}/auth/me`,{credentials:"include"});if(!s.ok)throw Error(`HTTP ${s.status}`);let[a,o]=await Promise.all([fetch(`${t}/projects`,{credentials:"include"}),fetch(`${t}/orchestrators`,{credentials:"include"})]);if(!a.ok||!o.ok)throw Error(`HTTP ${a.status}/${o.status}`);let l=await a.json(),u=await o.json(),h=await s.json(),d=Array.isArray(l.projects)?l.projects:[],c=Array.isArray(u.orchestrators)?u.orchestrators:[],p=(i=l.selected_project_id,n=new Set(d.map(t=>t.project_id)),(r="string"==typeof i?i.trim():"")&&n.has(r)?r:e&&n.has(e)?e:null),m="string"==typeof u.single_agent_orchestrator_key&&u.single_agent_orchestrator_key.trim()||null;return{projects:d,orchestrators:c,selectedProjectId:p,isSuperAdmin:!!h.is_super_admin,isRbacAdmin:!!h.is_rbac_admin,autoGenerateProject:!!l.auto_generate_project,orchestratorLinkedProject:!!l.orchestrator_linked_project,personalProjects:!!l.personal_projects,superUsersOnlyCanMakeProjects:!!l.super_users_only_can_make_projects,singleAgentOrchestratorKey:m}}async function s(t,e){let i=new FormData;i.set("title",e.title),i.set("welcome_msg",e.welcomeMessage),i.set("csv_definition",e.csvFile);let n=await fetch(`${t}/orchestrators`,{method:"POST",credentials:"include",body:i});if(!n.ok){let t=null;try{t=await n.json()}catch{t=null}throw function(t){let e=t=>{let e="string"==typeof t.detail?t.detail:"Request failed",i="number"==typeof t.row?t.row:void 0,n="string"==typeof t.agent_key?t.agent_key:void 0;return{message:e,row:i,agentId:"string"==typeof t.agent_id?t.agent_id:void 0,agentKey:n}},i=t&&"object"==typeof t&&"detail"in t?t.detail:void 0;if(i&&"object"==typeof i&&!Array.isArray(i))return e(i);if("string"==typeof i)return{message:i};if(t&&"object"==typeof t&&!Array.isArray(t))return e(t);if(Array.isArray(i)){let t=i.map(t=>"string"==typeof t?t:null).find(t=>t&&t.length>0);if(t)return{message:t}}return{message:"Request failed"}}(t)}let r=(await n.json()).orchestrator;if(!r||!r.title||!Array.isArray(r.agent_list))throw{message:"Invalid create orchestrator response"};return r}t.s(["default",0,n],408913),t.s(["Copy",0,n],125673),t.s(["createOrchestrator",0,s,"fetchLandingData",0,r],280218);let a="mkc_selected_agent_id",o="mkc_selected_project_id",l="mkc_selected_project_name",u="mkc_selected_orchestrator",h="mkc_auto_generate_project",d="mkc_single_agent_orchestrator_key",c="mkc_project_switcher_hidden",p=[a,o,l,u,h,d,c],m={getItem(t){try{let e=window.sessionStorage.getItem(t);if(null!==e)return e}catch{return null}let e=null;for(let i of new Set([...p,t])){let n=null;try{n=window.localStorage.getItem(i)}catch{}if(null!==n)try{null===window.sessionStorage.getItem(i)&&window.sessionStorage.setItem(i,n)}catch{}i===t&&(e=n)}return e},setItem(t,e){try{window.sessionStorage.setItem(t,e)}catch{}try{window.localStorage.setItem(t,e)}catch{}},removeItem(t){try{window.sessionStorage.removeItem(t)}catch{}try{window.localStorage.removeItem(t)}catch{}},clearSessionPins(){for(let t of p)try{window.sessionStorage.removeItem(t)}catch{}}},f="mkc_last_user_id",g="changeProject";t.s(["AGENT_STORAGE_SYNC_EVENT",0,"tb:agent-storage-sync","AUTO_GENERATE_PROJECT_STORAGE_KEY",0,h,"LANDING_FOCUS_PROJECT_QUERY_KEY",0,g,"LANDING_FOCUS_PROJECT_QUERY_VALUE",0,"1","PROJECT_STORAGE_SYNC_EVENT",0,"tb:project-storage-sync","PROJECT_SWITCHER_HIDDEN_STORAGE_KEY",0,c,"SELECTED_AGENT_STORAGE_KEY",0,a,"SELECTED_ORCHESTRATOR_STORAGE_KEY",0,u,"SELECTED_PROJECT_NAME_STORAGE_KEY",0,l,"SELECTED_PROJECT_STORAGE_KEY",0,o,"SINGLE_AGENT_ORCHESTRATOR_KEY_STORAGE_KEY",0,d,"getAutoGenerateProjectMode",0,function(){return"true"===m.getItem(h)},"getPrimaryAgentId",0,function(t){let e=t?.orchestrator_agent_id?.trim();if(e)return e;let i=t?.agent_list?.[0];return"string"!=typeof i?null:i.trim()||null},"getProjectSwitcherHidden",0,function(){return"true"===m.getItem(c)},"getSelectedStoredProjectId",0,function(){return(m.getItem(o)??"").trim()||null},"getSingleAgentOrchestratorKey",0,function(){return(m.getItem(d)??"").trim()||null},"landingFocusProjectHref",0,function(){let t=new URLSearchParams;return t.set(g,"1"),`/?${t.toString()}`},"parseStoredOrchestrator",0,function(t){if(!t)return null;try{let e=JSON.parse(t),i="string"==typeof e.id?e.id.trim():"",n="string"==typeof e.title?e.title.trim():"",r="string"==typeof e.welcome_msg?e.welcome_msg.trim():null,
1s="string"==typeof e.bundle_colour_from?e.bundle_colour_from.trim():null,a="string"==typeof e.bundle_colour_to?e.bundle_colour_to.trim():null,o="light"===e.bundle_text_colour||"dark"===e.bundle_text_colour?e.bundle_text_colour:null,l=Array.isArray(e.agent_list)?e.agent_list.map(t=>"string"==typeof t?t.trim():"").filter(Boolean):[];if(!i||!n||0===l.length)return null;let u="string"==typeof e.orchestrator_agent_id?e.orchestrator_agent_id.trim():"",h=Array.isArray(e.agent_ids)?e.agent_ids.map(t=>"string"==typeof t?t.trim():"").filter(Boolean):[];return{...e,id:i,title:n,welcome_msg:r||null,bundle_colour_from:s||null,bundle_colour_to:a||null,bundle_text_colour:o,agent_list:l,orchestrator_agent_id:u||void 0,agent_ids:h.length>0?h:void 0,user_ids:Array.isArray(e.user_ids)?e.user_ids.map(t=>"string"==typeof t?t.trim():"").filter(Boolean):[],admin_ids:Array.isArray(e.admin_ids)?e.admin_ids.map(t=>"string"==typeof t?t.trim():"").filter(Boolean):[]}}catch{return null}},"selectionStorage",0,m,"syncPerIdentityCaches",0,function(t){if(t)try{let e=window.localStorage.getItem(f);if(e===t)return;if(null===e)return void window.localStorage.setItem(f,t);for(let t of p)m.removeItem(t);window.localStorage.setItem(f,t)}catch{}}],307203)},641327,394064,t=>{"use strict";t.s(["ThreadAgentMismatchError",0,class extends Error{threadAgentId;requestedAgentId;code;constructor(t,e,i){super(t),this.threadAgentId=e,this.requestedAgentId=i,this.code="thread_agent_mismatch",this.name="ThreadAgentMismatchError"}}],641327),t.s(["ThreadProjectMismatchError",0,class extends Error{threadProjectId;requestedProjectId;code;constructor(t,e,i){super(t),this.threadProjectId=e,this.requestedProjectId=i,this.code="thread_project_mismatch",this.name="ThreadProjectMismatchError"}}],394064)},948185,212183,531261,958600,t=>{"use strict";var e=t.i(330668),i=t.i(951662),n=t.i(307203),r=t.i(641327),s=t.i(394064);function a(t){let e={type:t.type,content:t.content};return"string"==typeof t.id&&t.id&&(e.id=t.id),"tool_calls"in t&&t.tool_calls?.length&&(e.tool_calls=t.tool_calls),"tool_call_id"in t&&null!=t.tool_call_id&&(e.tool_call_id=t.tool_call_id),"name"in t&&null!=t.name&&(e.name=t.name),e}function o(t){let e=t.content,n="string"==typeof e||Array.isArray(e)?e:"",r={id:"string"==typeof t.id?t.id:(0,i.v4)(),type:t.type??"ai",content:n};return t.tool_calls&&Array.isArray(t.tool_calls)&&(r.tool_calls=t.tool_calls),null!=t.tool_call_id&&(r.tool_call_id=t.tool_call_id),null!=t.name&&(r.name=t.name),r}t.s(["useGenerateStream",0,function(t,i,l){let[u,h]=(0,e.useState)([]),[d,c]=(0,e.useState)(!1),[p,m]=(0,e.useState)(null),[f,g]=(0,e.useState)(null),[y,v]=(0,e.useState)([]),[x,w]=(0,e.useState)(null),[b,S]=(0,e.useState)(null),E=(0,e.useRef)(null),T=(0,e.useRef)(new Map),P=(0,e.useRef)([]),A=(0,e.useRef)(null),_=(0,e.useCallback)(()=>{E.current&&(E.current.abort(),E.current=null),c(!1),S(null)},[]);(0,e.useEffect)(()=>{w(null)},[i]);let C=(0,e.useRef)(null),j=(0,e.useRef)(0),k=(0,e.useRef)(0);(0,e.useLayoutEffect)(()=>{if(j.current+=1,!i){h([]),S(null),C.current=null;return}C.current!==i&&(h([]),S(null)),C.current=i;let e=!0,n=k.current,r=j.current;return(async()=>{try{let s=await fetch(`${t}/threads/${encodeURIComponent(i)}/state`,{credentials:"include"});if(!s.ok)return;let a=await s.json();if(!e||k.current!==n||j.current!==r)return;let l=(Array.isArray(a.messages)?a.messages:[]).map(t=>o("object"==typeof t&&t&&!Array.isArray(t)?t:{content:String(t)}));h(l)}catch{}})(),()=>{e=!1}},[t,i]);let R=(0,e.useCallback)(t=>{let e=t?.id;if(!e)return{};let i=T.current.get(e);return i?{firstSeenState:{parent_checkpoint:i,values:{messages:u}}}:{}},[u]),M=(0,e.useCallback)((e,u)=>{let d;if(L.current)return!1;let p=u?.checkpoint?.messages;if(e?.messages?.length&&p?.length)d=[...p.slice(0,-1),...e.messages];else if(e?.messages?.length)d=e.messages;else{if(!p?.length)return!1;d=p}u?.optimisticValues&&h(t=>u.optimisticValues({messages:t}).messages),m(null),g(null),S(null),c(!0),P.current=d;let f=u&&"threadId"in u?u.threadId??null:i??null;A.current=f;let y=new AbortController;E.current=y;let x=f,b=j.current,_=()=>x?C.current===x:j.current===b,R={messages:d.map(a)};return(async()=>{try{let e=function(){let t=(0,n.parseStoredOrchestrator)(n.selectionStorage.getItem(n.SELECTED_ORCHESTRATOR_STORAGE_KEY)),e=(0,n.getPrimaryAgentId)(t);if(e)return e;let i=n.selectionStorage.getItem(n.SELECTED_AGENT_STORAGE_KEY);return i&&i.trim()?i.trim():null}(),i=(0,n.getSelectedStoredProjectId)();if(!i){c(!1),m(Error("Select a project on the home page before sending messages."));return}let a=new URLSearchParams;a.set("project_id",i),f&&a.set("thread_id",f),e&&a.set("agent_id",e);let u=a.toString(),d=`${t}/generate?${u}`,p=await fetch(d,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(R),signal:y.signal});if(!p.ok||!p.body){let t=await p.text();if(409===p.status)try{let e=JSON.parse(t).detail;if(e&&"object"==typeof e&&!Array.isArray(e)){if("thread_project_mismatch"===e.code&&"string"==typeof e.message)throw new s.ThreadProjectMismatchError(e.message,String(e.thread_project_id??""),String(e.requested_project_id??""));if("thread_agent_mismatch"===e.code&&"string"==typeof e.message)throw new r.ThreadAgentMismatchError(e.message,String(e.thread_agent_id??""),String(e.requested_agent_id??""))}}catch(t){if(t instanceof s.ThreadProjectMismatchError||t instanceof r.ThreadAgentMismatchError)throw t}if(403===p.status){let e=null;try{let i=JSON.parse(t).detail;
1i&&"object"==typeof i&&!Array.isArray(i)&&"scope_access_denied"===i.code&&"string"==typeof i.message&&(e=i.message)}catch{e=null}if(e)throw Error(e)}throw Error(t||`HTTP ${p.status}`)}let b=p.body.getReader(),E=new TextDecoder,A="";for(;;){let{done:t,value:e}=await b.read();if(t)break;let i=(A+=E.decode(e,{stream:!0})).split("\n");for(let t of(A=i.pop()??"",i)){let e=function(t){let e="data: ";if(!t.startsWith(e))return null;let i=t.slice(e.length).trim();if("[DONE]"===i||!i)return null;try{return JSON.parse(i)}catch{return null}}(t);if(!e)continue;let i=e.type;if("error"===i)throw Error(e.detail??"Stream error");if("thread"===i&&e.data&&"object"==typeof e.data){let t=function(t){if(!t||"object"!=typeof t||Array.isArray(t))return null;let e="string"==typeof t.thread_id?t.thread_id.trim():"";if(!e)return null;let i="string"==typeof t.title?t.title.trim():"",n=t=>"string"==typeof t&&t.trim()?t.trim():null;return{thread_id:e,title:i,project_id:n(t.project_id),agent_id:n(t.agent_id),created_at:n(t.created_at),updated_at:n(t.updated_at),last_message_at:n(t.last_message_at)}}(e.data);if(t){let e=_();x=t.thread_id,e&&!C.current&&(C.current=t.thread_id),l?.(t,e)}continue}if("auth_required"===i){g({config:String(e.config??""),provider:String(e.provider??"unknown"),message:String(e.message??"Authorization required."),authStartUrl:String(e.auth_start_url??""),reason:"string"==typeof e.reason?e.reason:void 0});continue}if("config_drift"===i){let t=function(t){let e=(0,n.getSingleAgentOrchestratorKey)(),i=Array.isArray(t)?t.map(t=>String(t)):[];return e?i.filter(t=>t.includes(e)):i}(e.details);if((0,n.getSingleAgentOrchestratorKey)()&&0===t.length)continue;let i=t.join(" | "),r=String(e.message??"Configuration drift detected in backend runtime metadata.");m(Error(i?`${r} ${i}`:r));continue}if("done"===i)break;if("status"===i){if(!_())continue;let t=String(e.text??"").trim();S(t||null);continue}if("debug"===i){let t=String(e.phase??"trace"),i=String(e.message??"Debug event"),n=e.data,r={phase:t,message:i,data:n,at:new Date().toISOString()};v(t=>[...t.slice(-49),r]),"project_context"===t&&w({at:r.at,message:i,data:n}),console.debug(`[debug:${t}] ${i}`,n);continue}if("values"===i&&e.data&&"object"==typeof e.data){if(!_())continue;let t=e.data.messages;if(Array.isArray(t)){let e=t.map(t=>o("object"==typeof t&&t&&!Array.isArray(t)?t:{content:String(t)}));if(h(e),k.current+=1,e.length>0){let t=e[e.length-1];"ai"===t.type&&t.id&&T.current.set(t.id,{messages:P.current})}}}}}}catch(t){if("AbortError"===t.name)return;m(t instanceof Error?t:Error(String(t)))}finally{E.current=null,c(!1),S(null)}})(),!0},[t,i,l]),D=(0,e.useCallback)(()=>{let t=P.current;t.length?M({messages:t},{streamMode:["values"],threadId:A.current}):m(null)},[M]),[O,V]=(0,e.useState)(!1),L=(0,e.useRef)(!1),I=(0,e.useCallback)(t=>{L.current=t,V(t)},[]),N=(0,e.useCallback)(()=>j.current,[]),B=(0,e.useCallback)(()=>{j.current+=1,C.current=null,h([]),S(null),w(null)},[]);return{messages:u,isLoading:d,error:p,submit:M,stop:_,values:{messages:u,ui:[]},getMessagesMetadata:R,interrupt:void 0,setBranch:(0,e.useCallback)(t=>{},[]),authRequired:f,clearAuthRequired:()=>g(null),clearError:(0,e.useCallback)(()=>{m(null)},[]),retryAfterProjectMismatch:D,resetView:B,newChatPending:O,setNewChatPending:I,getViewGeneration:N,debugEvents:y,latestProjectContext:x,statusText:b}}],948185),t.i(639057);var l=t.i(848277),u=t.i(417886),h=t.i(272596);let d=(0,e.createContext)(void 0);t.s(["ThreadProvider",0,function({children:t}){let i=(0,h.resolveApiUrl)("https://api.dev.inclusivelymade.ai"),[n]=(0,u.useQueryState)("apiUrl",{defaultValue:i}),r=n||i,[s,a]=(0,e.useState)([]),[o,c]=(0,e.useState)(!1),p=(0,e.useCallback)(async()=>{let t=await fetch(`${r}/threads`,{credentials:"include"});if(!t.ok)throw Error(`Failed to fetch threads (${t.status})`);let e=await t.json();return Array.isArray(e.threads)?e.threads:[]},[r]),m=(0,e.useCallback)(async t=>{let e=await fetch(`${r}/threads/${encodeURIComponent(t)}`,{method:"DELETE",credentials:"include"});if(!e.ok)throw Error(`Failed to delete thread (${e.status})`)},[r]),f=(0,e.useCallback)(async(t,e)=>{let i=await fetch(`${r}/threads/${encodeURIComponent(t)}`,{method:"PUT",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:e})});if(!i.ok)throw Error(`Failed to rename thread (${i.status})`);return(await i.json()).thread},[r]);return(0,l.jsx)(d.Provider,{value:{getThreads:p,deleteThread:m,renameThread:f,threads:s,setThreads:a,threadsLoading:o,setThreadsLoading:c},children:t})},"useThreads",0,function(){let t=(0,e.useContext)(d);if(void 0===t)throw Error("useThreads must be used within a ThreadProvider");return t},"useThreadsOptional",0,function(){let t=(0,e.useContext)(d);return void 0===t?{getThreads:async()=>[],deleteThread:async()=>void 0,renameThread:async(t,e)=>({thread_id:t,title:e}),threads:[],setThreads:()=>void 0,threadsLoading:!1,setThreadsLoading:()=>void 0}:t}],212183);var c=t.i(62304),p=t.i(235884);let m=(0,p.default)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);t.s(["ChevronDown",0,m],531261);var f=t.i(746357);let g=(0,p.default)("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var y=t.i(816506),v=t.i(41714),x=t.i(885205);t.s(["UserMenu",0,function({user:t,apiUrl:i}){let r,s,[a,o]=(0,e.useState)(!1),u=(0,e.useRef)(null);(0,e.useEffect)(()=>{let t=t=>{u.current&&(u.current.contains(t.target)||o(!1))};return window.addEventListener("mousedown",t),()=>window.removeEventListener("mousedown",t)},[]);
1let h=(s=(r=(t.name||t.email||"").trim()).split(/\s+/).filter(Boolean)).length>=2?`${s[0][0]??""}${s[1][0]??""}`.toUpperCase():r.slice(0,2).toUpperCase()||"U";return(0,l.jsxs)("div",{className:"fixed top-4 right-2 z-50",ref:u,children:[(0,l.jsxs)(x.Button,{type:"button",variant:"outline",className:"h-10 px-2 gap-2 rounded-full shadow-sm","aria-label":"Account menu","aria-expanded":a,onClick:()=>o(t=>!t),children:[(0,l.jsx)(v.Avatar,{className:"size-7",children:(0,l.jsx)(v.AvatarFallback,{className:"bg-primary text-primary-foreground text-xs font-semibold",children:h})}),(0,l.jsx)(m,{className:"size-4 text-muted-foreground"})]}),a?(0,l.jsxs)("div",{className:"absolute right-0 mt-2 w-56 rounded-md border bg-background shadow-md p-1",children:[(0,l.jsxs)("div",{className:"px-2 py-2 border-b",children:[(0,l.jsx)("p",{className:"text-sm font-medium truncate",children:t.name||"User"}),(0,l.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:t.email})]}),(0,l.jsxs)(y.default,{href:`/preferences?apiUrl=${encodeURIComponent(i)}`,className:"w-full flex items-center gap-2 text-sm px-2 py-2 rounded-sm hover:bg-muted",onClick:()=>o(!1),children:[(0,l.jsx)(g,{className:"size-4"}),"Preferences"]}),(0,l.jsxs)("button",{type:"button",className:"w-full flex items-center gap-2 text-sm px-2 py-2 rounded-sm hover:bg-muted text-left",onClick:()=>{let t;o(!1),n.selectionStorage.clearSessionPins(),t=(0,c.appUrl)("/"),window.location.href=`${i}/auth/logout?return_to=${encodeURIComponent(t)}`},children:[(0,l.jsx)(f.LogOut,{className:"size-4"}),"Logout"]})]}):null]})}],958600)},931330,(t,e,i)=>{"use strict";function n({widthInt:t,heightInt:e,blurWidth:i,blurHeight:r,blurDataURL:s,objectFit:a}){let o=i?40*i:t,l=r?40*r:e,u=o&&l?`viewBox='0 0 ${o} ${l}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${u}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${u?"none":"contain"===a?"xMidYMid":"cover"===a?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${s}'/%3E%3C/svg%3E`}Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"getImageBlurSvg",{enumerable:!0,get:function(){return n}})},804558,(t,e,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n={VALID_LOADERS:function(){return s},imageConfigDefault:function(){return a}};for(var r in n)Object.defineProperty(i,r,{enumerable:!0,get:n[r]});let s=["default","imgix","cloudinary","akamai","custom"],a={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumDiskCacheSize:void 0,maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1,customCacheHandler:!1}},760033,(t,e,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"getImgProps",{enumerable:!0,get:function(){return u}}),t.r(186051);let n=t.r(826159),r=t.r(931330),s=t.r(804558),a=["-moz-initial","fill","none","scale-down",void 0];function o(t){return void 0!==t.default}function l(t){return void 0===t?t:"number"==typeof t?Number.isFinite(t)?t:NaN:"string"==typeof t&&/^[0-9]+$/.test(t)?parseInt(t,10):NaN}function u({src:t,sizes:e,unoptimized:i=!1,priority:h=!1,preload:d=!1,loading:c,className:p,quality:m,width:f,height:g,fill:y=!1,style:v,overrideSrc:x,onLoad:w,onLoadingComplete:b,placeholder:S="empty",blurDataURL:E,fetchPriority:T,decoding:P="async",layout:A,objectFit:_,objectPosition:C,lazyBoundary:j,lazyRoot:k,...R},M){var D;let O,V,L,{imgConf:I,showAltText:N,blurComplete:B,defaultLoader:$}=M,F=I||s.imageConfigDefault;if("allSizes"in F)O=F;else{let t=[...F.deviceSizes,...F.imageSizes].sort((t,e)=>t-e),e=F.deviceSizes.sort((t,e)=>t-e),i=F.qualities?.sort((t,e)=>t-e);O={...F,allSizes:t,deviceSizes:e,qualities:i}}if(void 0===$)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,
1configurable:!0});let U=R.loader||$;delete R.loader,delete R.srcSet;let z="__next_img_default"in U;if(z){if("custom"===O.loader)throw Object.defineProperty(Error(`Image with src "${t}" is missing "loader" prop.
2Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let t=U;U=e=>{let{config:i,...n}=e;return t(n)}}if(A){"fill"===A&&(y=!0);let t={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[A];t&&(v={...v,...t});let i={responsive:"100vw",fill:"100vw"}[A];i&&!e&&(e=i)}let G="",W=l(f),Y=l(g);if((D=t)&&"object"==typeof D&&(o(D)||void 0!==D.src)){let e=o(t)?t.default:t;if(!e.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(e)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!e.height||!e.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(e)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(V=e.blurWidth,L=e.blurHeight,E=E||e.blurDataURL,G=e.src,!y)if(W||Y){if(W&&!Y){let t=W/e.width;Y=Math.round(e.height*t)}else if(!W&&Y){let t=Y/e.height;W=Math.round(e.width*t)}}else W=e.width,Y=e.height}let H=!h&&!d&&("lazy"===c||void 0===c);(!(t="string"==typeof t?t:G)||t.startsWith("data:")||t.startsWith("blob:"))&&(i=!0,H=!1),O.unoptimized&&(i=!0),z&&!O.dangerouslyAllowSVG&&t.split("?",1)[0].endsWith(".svg")&&(i=!0);let K=l(m),q=Object.assign(y?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:_,objectPosition:C}:{},N?{}:{color:"transparent"},v),X=B||"empty"===S?null:"blur"===S?`url("data:image/svg+xml;charset=utf-8,${(0,r.getImageBlurSvg)({widthInt:W,heightInt:Y,blurWidth:V,blurHeight:L,blurDataURL:E||"",objectFit:q.objectFit})}")`:`url("${S}")`,J=a.includes(q.objectFit)?"fill"===q.objectFit?"100% 100%":"cover":q.objectFit,Z=X?{backgroundSize:J,backgroundPosition:q.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:X}:{},Q=function({config:t,src:e,unoptimized:i,width:r,quality:s,sizes:a,loader:o}){if(i){if(e.startsWith("/")&&!e.startsWith("//")){let t=(0,n.getDeploymentId)();if(t){let i=e.indexOf("?");if(-1!==i){let n=new URLSearchParams(e.slice(i+1));n.get("dpl")||(n.append("dpl",t),e=e.slice(0,i)+"?"+n.toString())}else e+=`?dpl=${t}`}}return{src:e,srcSet:void 0,sizes:void 0}}let{widths:l,kind:u}=function({deviceSizes:t,allSizes:e},i,n){if(n){let i=/(^|\s)(1?\d?\d)vw/g,r=[];for(let t;t=i.exec(n);)r.push(parseInt(t[2]));if(r.length){let i=.01*Math.min(...r);return{widths:e.filter(e=>e>=t[0]*i),kind:"w"}}return{widths:e,kind:"w"}}return"number"!=typeof i?{widths:t,kind:"w"}:{widths:[...new Set([i,2*i].map(t=>e.find(e=>e>=t)||e[e.length-1]))],kind:"x"}}(t,r,a),h=l.length-1;return{sizes:a||"w"!==u?a:"100vw",srcSet:l.map((i,n)=>`${o({config:t,src:e,quality:s,width:i})} ${"w"===u?i:n+1}${u}`).join(", "),src:o({config:t,src:e,quality:s,width:l[h]})}}({config:O,src:t,unoptimized:i,width:W,quality:K,sizes:e,loader:U}),tt=H?"lazy":c;return{props:{...R,loading:tt,fetchPriority:T,width:W,height:Y,decoding:P,className:p,style:{...q,...Z},sizes:Q.sizes,srcSet:Q.srcSet,src:x||Q.src},meta:{unoptimized:i,preload:d||h,placeholder:S,fill:y}}}},498096,(t,e,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return o}});let n=t.r(330668),r="u"<typeof window,s=r?()=>{}:n.useLayoutEffect,a=r?()=>{}:n.useEffect;function o(t){let{headManager:e,reduceComponentsToState:i}=t;function o(){if(e&&e.mountedInstances){let t=n.Children.toArray(Array.from(e.mountedInstances).filter(Boolean));e.updateHead(i(t))}}return r&&(e?.mountedInstances?.add(t.children),o()),s(()=>(e?.mountedInstances?.add(t.children),()=>{e?.mountedInstances?.delete(t.children)})),s(()=>
2(e&&(e._pendingUpdate=o),()=>{e&&(e._pendingUpdate=o)})),a(()=>(e&&e._pendingUpdate&&(e._pendingUpdate(),e._pendingUpdate=null),()=>{e&&e._pendingUpdate&&(e._pendingUpdate(),e._pendingUpdate=null)})),null}},608706,(t,e,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n={default:function(){return f},defaultHead:function(){return d}};for(var r in n)Object.defineProperty(i,r,{enumerable:!0,get:n[r]});let s=t.r(35856),a=t.r(861909),o=t.r(848277),l=a._(t.r(330668)),u=s._(t.r(498096)),h=t.r(698084);function d(){return[(0,o.jsx)("meta",{charSet:"utf-8"},"charset"),(0,o.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function c(t,e){return"string"==typeof e||"number"==typeof e?t:e.type===l.default.Fragment?t.concat(l.default.Children.toArray(e.props.children).reduce((t,e)=>"string"==typeof e||"number"==typeof e?t:t.concat(e),[])):t.concat(e)}t.r(186051);let p=["name","httpEquiv","charSet","itemProp"];function m(t){let e,i,n,r;return t.reduce(c,[]).reverse().concat(d().reverse()).filter((e=new Set,i=new Set,n=new Set,r={},t=>{let s=!0,a=!1;if(t.key&&"number"!=typeof t.key&&t.key.indexOf("$")>0){a=!0;let i=t.key.slice(t.key.indexOf("$")+1);e.has(i)?s=!1:e.add(i)}switch(t.type){case"title":case"base":i.has(t.type)?s=!1:i.add(t.type);break;case"meta":for(let e=0,i=p.length;e<i;e++){let i=p[e];if(t.props.hasOwnProperty(i))if("charSet"===i)n.has(i)?s=!1:n.add(i);else{let e=t.props[i],n=r[i]||new Set;("name"!==i||!a)&&n.has(e)?s=!1:(n.add(e),r[i]=n)}}}return s})).reverse().map((t,e)=>{let i=t.key||e;return l.default.cloneElement(t,{key:i})})}let f=function({children:t}){let e=(0,l.useContext)(h.HeadManagerContext);return(0,o.jsx)(u.default,{reduceComponentsToState:m,headManager:e,children:t})};("function"==typeof i.default||"object"==typeof i.default&&null!==i.default)&&void 0===i.default.__esModule&&(Object.defineProperty(i.default,"__esModule",{value:!0}),Object.assign(i.default,i),e.exports=i.default)},509586,(t,e,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"ImageConfigContext",{enumerable:!0,get:function(){return s}});let n=t.r(35856)._(t.r(330668)),r=t.r(804558),s=n.default.createContext(r.imageConfigDefault)},734832,(t,e,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"RouterContext",{enumerable:!0,get:function(){return n}});let n=t.r(35856)._(t.r(330668)).default.createContext(null)},644606,(t,e,i)=>{"use strict";function n(t,e){let i=t||75;return e?.qualities?.length?e.qualities.reduce((t,e)=>Math.abs(e-i)<Math.abs(t-i)?e:t,e.qualities[0]):i}Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"findClosestQuality",{enumerable:!0,get:function(){return n}})},23979,(t,e,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return a}});let n=t.r(644606),r=t.r(826159);function s({config:t,src:e,width:i,quality:a}){let o=(0,r.getDeploymentId)();if(e.startsWith("/")&&!e.startsWith("//")){let t=e.indexOf("?");if(-1!==t){let i=new URLSearchParams(e.slice(t+1)),n=i.get("dpl");if(n){o=n,i.delete("dpl");let r=i.toString();e=e.slice(0,t)+(r?"?"+r:"")}}}if(e.startsWith("/")&&e.includes("?")&&t.localPatterns?.length===1&&"**"===t.localPatterns[0].pathname&&""===t.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${e}" is using a query string which is not configured in images.localPatterns.
3Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let l=(0,n.findClosestQuality)(a,t);return`${t.path}?url=${encodeURIComponent(e)}&w=${i}&q=${l}${e.startsWith("/")&&o?`&dpl=${o}`:""}`}s.__next_img_default=!0;let a=s},603417,(t,e,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"Image",{enumerable:!0,get:function(){return w}});let n=t.r(35856),r=t.r(861909),s=t.r(848277),a=r._(t.r(330668)),o=n._(t.r(769941)),l=n._(t.r(608706)),u=t.r(760033),h=t.r(804558),d=t.r(509586);t.r(186051);let c=t.r(734832),p=n._(t.r(23979)),m=t.r(340067),f={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qual
3ities:[75],path:"/_next/image/",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0};function g(t,e,i,n,r,s,a){let o=t?.src;t&&t["data-loaded-src"]!==o&&(t["data-loaded-src"]=o,("decode"in t?t.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(t.parentElement&&t.isConnected){if("empty"!==e&&r(!0),i?.current){let e=new Event("load");Object.defineProperty(e,"target",{writable:!1,value:t});let n=!1,r=!1;i.current({...e,nativeEvent:e,currentTarget:t,target:t,isDefaultPrevented:()=>n,isPropagationStopped:()=>r,persist:()=>{},preventDefault:()=>{n=!0,e.preventDefault()},stopPropagation:()=>{r=!0,e.stopPropagation()}})}n?.current&&n.current(t)}}))}function y(t){return a.use?{fetchPriority:t}:{fetchpriority:t}}"u"<typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let v=(0,a.forwardRef)(({src:t,srcSet:e,sizes:i,height:n,width:r,decoding:o,className:l,style:u,fetchPriority:h,placeholder:d,loading:c,unoptimized:p,fill:f,onLoadRef:v,onLoadingCompleteRef:x,setBlurComplete:w,setShowAltText:b,sizesInput:S,onLoad:E,onError:T,...P},A)=>{let _=(0,a.useCallback)(t=>{t&&(T&&(t.src=t.src),t.complete&&g(t,d,v,x,w,p,S))},[t,d,v,x,w,T,p,S]),C=(0,m.useMergedRef)(A,_);return(0,s.jsx)("img",{...P,...y(h),loading:c,width:r,height:n,decoding:o,"data-nimg":f?"fill":"1",className:l,style:u,sizes:i,srcSet:e,src:t,ref:C,onLoad:t=>{g(t.currentTarget,d,v,x,w,p,S)},onError:t=>{b(!0),"empty"!==d&&w(!0),T&&T(t)}})});function x({isAppRouter:t,imgAttributes:e}){let i={as:"image",imageSrcSet:e.srcSet,imageSizes:e.sizes,crossOrigin:e.crossOrigin,referrerPolicy:e.referrerPolicy,...y(e.fetchPriority)};return t&&o.default.preload?(o.default.preload(e.src,i),null):(0,s.jsx)(l.default,{children:(0,s.jsx)("link",{rel:"preload",href:e.srcSet?void 0:e.src,...i},"__nimg-"+e.src+e.srcSet+e.sizes)})}let w=(0,a.forwardRef)((t,e)=>{let i=(0,a.useContext)(c.RouterContext),n=(0,a.useContext)(d.ImageConfigContext),r=(0,a.useMemo)(()=>{let t=f||n||h.imageConfigDefault,e=[...t.deviceSizes,...t.imageSizes].sort((t,e)=>t-e),i=t.deviceSizes.sort((t,e)=>t-e),r=t.qualities?.sort((t,e)=>t-e);return{...t,allSizes:e,deviceSizes:i,qualities:r,localPatterns:"u"<typeof window?n?.localPatterns:t.localPatterns}},[n]),{onLoad:o,onLoadingComplete:l}=t,m=(0,a.useRef)(o);(0,a.useEffect)(()=>{m.current=o},[o]);let g=(0,a.useRef)(l);(0,a.useEffect)(()=>{g.current=l},[l]);let[y,w]=(0,a.useState)(!1),[b,S]=(0,a.useState)(!1),{props:E,meta:T}=(0,u.getImgProps)(t,{defaultLoader:p.default,imgConf:r,blurComplete:y,showAltText:b});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(v,{...E,unoptimized:T.unoptimized,placeholder:T.placeholder,fill:T.fill,onLoadRef:m,onLoadingCompleteRef:g,setBlurComplete:w,setShowAltText:S,sizesInput:t.sizes,ref:e}),T.preload?(0,s.jsx)(x,{isAppRouter:!i,imgAttributes:E}):null]})});("function"==typeof i.default||"object"==typeof i.default&&null!==i.default)&&void 0===i.default.__esModule&&(Object.defineProperty(i.default,"__esModule",{value:!0}),Object.assign(i.default,i),e.exports=i.default)},844449,(t,e,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n={default:function(){return h},getImageProps:function(){return u}};for(var r in n)Object.defineProperty(i,r,{enumerable:!0,get:n[r]});let s=t.r(35856),a=t.r(760033),o=t.r(603417),l=s._(t.r(23979));function u(t){let{props:e}=(0,a.getImgProps)(t,{defaultLoader:l.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image/",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[t,i]of Object.entries(e))void 0===i&&delete e[t];return{props:e}}let h=o.Image},442588,(t,e,i)=>{e.exports=t.r(844449)},935691,256298,543533,808812,150772,153899,503363,421216,t=>{"use strict";let e,i,n,r,s=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],a=new Set(s),o=(t,e,i)=>i>e?e:i<t?t:i,l={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},u={...l,transform:t=>o(0,1,t)},h={...l,default:1},d=t=>Math.round(1e5*t)/1e5,c=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,p=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,m=(t,e)=>i=>!!("string"==typeof i&&p.test(i)&&i.startsWith(t)||e&&null!=i&&Object.prototype.hasOwnProperty.call(i,e)),f=(t,e,i)=>n=>{if("string"!=typeof n)return n;let[r,s,a,o]=n.match(c);return{[t]:parseFloat(r),[e]:parseFloat(s),[i]:parseFloat(a),alpha:void 0!==o?parseFloat(o):1}},g={...l,transform:t=>Math.round(o(0,255,t))},y={test:m("rgb","red"),parse:f("red","green","blue"),transform:({red:t,green:e,blue:i,alpha:n=1})=>"rgba("+g.transform(t)+", "+g.transform(e)+", "+g.transform(i)+", "+d(u.transform(n))+")"},v={test:m("#"),parse:function(t){let e="",i="",n="",r="";return t.length>5?(e=t.substring(1,3),i=t.substring(3,5),n=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),i=t.substring(2,3),n=t.substring(3,4),r=t.substring(4,5),e+=e,i+=i,n+=n,r+=r),{red:parseInt(e,16),green:parseInt(i,16),blue:parseInt(n,16),alph
3a:r?parseInt(r,16)/255:1}},transform:y.transform},x=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),w=x("deg"),b=x("%"),S=x("px"),E=x("vh"),T=x("vw"),P={...b,parse:t=>b.parse(t)/100,transform:t=>b.transform(100*t)},A={test:m("hsl","hue"),parse:f("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:i,alpha:n=1})=>"hsla("+Math.round(t)+", "+b.transform(d(e))+", "+b.transform(d(i))+", "+d(u.transform(n))+")"},_={test:t=>y.test(t)||v.test(t)||A.test(t),parse:t=>y.test(t)?y.parse(t):A.test(t)?A.parse(t):v.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?y.transform(t):A.transform(t),getAnimatableNone:t=>{let e=_.parse(t);return e.alpha=0,_.transform(e)}},C=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,j="number",k="color",R=/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 M(t){let e=t.toString(),i=[],n={color:[],number:[],var:[]},r=[],s=0,a=e.replace(R,t=>(_.test(t)?(n.color.push(s),r.push(k),i.push(_.parse(t))):t.startsWith("var(")?(n.var.push(s),r.push("var"),i.push(t)):(n.number.push(s),r.push(j),i.push(parseFloat(t))),++s,"${}")).split("${}");return{values:i,split:a,indexes:n,types:r}}function D(t){return M(t).values}function O(t){let{split:e,types:i}=M(t),n=e.length;return t=>{let r="";for(let s=0;s<n;s++)if(r+=e[s],void 0!==t[s]){let e=i[s];e===j?r+=d(t[s]):e===k?r+=_.transform(t[s]):r+=t[s]}return r}}let V=t=>"number"==typeof t?0:_.test(t)?_.getAnimatableNone(t):t,L={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(c)?.length||0)+(t.match(C)?.length||0)>0},parse:D,createTransformer:O,getAnimatableNone:function(t){let e=D(t);return O(t)(e.map(V))}},I=new Set(["brightness","contrast","saturate","opacity"]);function N(t){let[e,i]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;let[n]=i.match(c)||[];if(!n)return t;let r=i.replace(n,""),s=+!!I.has(e);return n!==i&&(s*=100),e+"("+s+r+")"}let B=/\b([a-z-]*)\(.*?\)/gu,$={...L,getAnimatableNone:t=>{let e=t.match(B);return e?e.map(N).join(" "):t}},F={...L,getAnimatableNone:t=>{let e=L.parse(t);return L.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},U={...l,transform:Math.round},z={borderWidth:S,borderTopWidth:S,borderRightWidth:S,borderBottomWidth:S,borderLeftWidth:S,borderRadius:S,borderTopLeftRadius:S,borderTopRightRadius:S,borderBottomRightRadius:S,borderBottomLeftRadius:S,width:S,maxWidth:S,height:S,maxHeight:S,top:S,right:S,bottom:S,left:S,inset:S,insetBlock:S,insetBlockStart:S,insetBlockEnd:S,insetInline:S,insetInlineStart:S,insetInlineEnd:S,padding:S,paddingTop:S,paddingRight:S,paddingBottom:S,paddingLeft:S,paddingBlock:S,paddingBlockStart:S,paddingBlockEnd:S,paddingInline:S,paddingInlineStart:S,paddingInlineEnd:S,margin:S,marginTop:S,marginRight:S,marginBottom:S,marginLeft:S,marginBlock:S,marginBlockStart:S,marginBlockEnd:S,marginInline:S,marginInlineStart:S,marginInlineEnd:S,fontSize:S,backgroundPositionX:S,backgroundPositionY:S,rotate:w,rotateX:w,rotateY:w,rotateZ:w,scale:h,scaleX:h,scaleY:h,scaleZ:h,skew:w,skewX:w,skewY:w,distance:S,translateX:S,translateY:S,translateZ:S,x:S,y:S,z:S,perspective:S,transformPerspective:S,opacity:u,originX:P,originY:P,originZ:S,zIndex:U,fillOpacity:u,strokeOpacity:u,numOctaves:U},G={...z,color:_,backgroundColor:_,outlineColor:_,fill:_,stroke:_,borderColor:_,borderTopColor:_,borderRightColor:_,borderBottomColor:_,borderLeftColor:_,filter:$,WebkitFilter:$,mask:F,WebkitMask:F},W=t=>G[t],Y=()=>({translate:0,scale:1,origin:0,originPoint:0}),H=()=>({x:Y(),y:Y()}),K=()=>({min:0,max:0}),q=()=>({x:K(),y:K()}),X=t=>!!(t&&t.getVelocity),J=new Set(["width","height","top","left","right","bottom",...s]),Z=t=>e=>e.test(t),Q=[l,S,b,w,T,E,{test:t=>"auto"===t,parse:t=>t}],tt=t=>Q.find(Z(t));var te,ti=t.i(639057);let tn=()=>{},tr=()=>{};
3ti.default;let ts=t=>e=>"string"==typeof e&&e.startsWith(t),ta=ts("--"),to=ts("var(--"),tl=t=>!!to(t)&&tu.test(t.split("/*")[0].trim()),tu=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function th(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}let td=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,tc=t=>180*t/Math.PI,tp=t=>tf(tc(Math.atan2(t[1],t[0]))),tm={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:tp,rotateZ:tp,skewX:t=>tc(Math.atan(t[1])),skewY:t=>tc(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},tf=t=>((t%=360)<0&&(t+=360),t),tg=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),ty=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),tv={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:tg,scaleY:ty,scale:t=>(tg(t)+ty(t))/2,rotateX:t=>tf(tc(Math.atan2(t[6],t[5]))),rotateY:t=>tf(tc(Math.atan2(-t[2],t[0]))),rotateZ:tp,rotate:tp,skewX:t=>tc(Math.atan(t[4])),skewY:t=>tc(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function tx(t){return+!!t.includes("scale")}function tw(t,e){let i,n;if(!t||"none"===t)return tx(e);let r=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);if(r)i=tv,n=r;else{let e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=tm,n=e}if(!n)return tx(e);let s=i[e],a=n[1].split(",").map(tb);return"function"==typeof s?s(a):a[s]}function tb(t){return parseFloat(t.trim())}let tS=t=>t===l||t===S,tE=new Set(["x","y","z"]),tT=s.filter(t=>!tE.has(t)),tP={width:({x:t},{paddingLeft:e="0",paddingRight:i="0"})=>t.max-t.min-parseFloat(e)-parseFloat(i),height:({y:t},{paddingTop:e="0",paddingBottom:i="0"})=>t.max-t.min-parseFloat(e)-parseFloat(i),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>tw(e,"x"),y:(t,{transform:e})=>tw(e,"y")};tP.translateX=tP.x,tP.translateY=tP.y;let tA=t=>t,t_={},tC=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function tj(t,e){let i=!1,n=!0,r={delta:0,timestamp:0,isProcessing:!1},s=()=>i=!0,a=tC.reduce((t,i)=>(t[i]=function(t,e){let i=new Set,n=new Set,r=!1,s=!1,a=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1},l=0;function u(e){a.has(e)&&(h.schedule(e),t()),l++,e(o)}let h={schedule:(t,e=!1,s=!1)=>{let o=s&&r?i:n;return e&&a.add(t),o.has(t)||o.add(t),t},cancel:t=>{n.delete(t),a.delete(t)},process:t=>{if(o=t,r){s=!0;return}r=!0,[i,n]=[n,i],i.forEach(u),e,l=0,i.clear(),r=!1,s&&(s=!1,h.process(t))}};return h}(s,e?i:void 0),t),{}),{setup:o,read:l,resolveKeyframes:u,preUpdate:h,update:d,preRender:c,render:p,postRender:m}=a,f=()=>{let s=t_.useManualTiming?r.timestamp:performance.now();i=!1,t_.useManualTiming||(r.delta=n?1e3/60:Math.max(Math.min(s-r.timestamp,40),1)),r.timestamp=s,r.isProcessing=!0,o.process(r),l.process(r),u.process(r),h.process(r),d.process(r),c.process(r),p.process(r),m.process(r),r.isProcessing=!1,i&&e&&(n=!1,t(f))};return{schedule:tC.reduce((e,s)=>{let o=a[s];return e[s]=(e,s=!1,a=!1)=>(!i&&(i=!0,n=!0,r.isProcessing||t(f)),o.schedule(e,s,a)),e},{}),cancel:t=>{for(let e=0;e<tC.length;e++)a[tC[e]].cancel(t)},state:r,steps:a}}let{schedule:tk,cancel:tR,state:tM,steps:tD}=tj("u">typeof requestAnimationFrame?requestAnimationFrame:tA,!0),tO=new Set,tV=!1,tL=!1,tI=!1;function tN(){if(tL){let t=Array.from(tO).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),i=new Map;e.forEach(t=>{let e,n=(e=[],tT.forEach(i=>{let n=t.getValue(i);void 0!==n&&(e.push([i,n.get()]),n.set(+!!i.startsWith("scale")))}),e);n.length&&(i.set(t,n),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();let e=i.get(t);e&&e.forEach(([e,i])=>{t.getValue(e)?.set(i)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}tL=!1,tV=!1,tO.forEach(t=>t.complete(tI)),tO.clear()}function tB(){tO.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(tL=!0)})}class t${constructor(t,e,i,n,r,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=i,this.motionValue=n,this.element=r,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(tO.add(this),tV||(tV=!0,tk.read(tB),tk.resolveKeyframes(tN))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:e,element:i,motionValue:n}=this;if(null===t[0]){let r=n?.get(),s=t[t.length-1];if(void 0!==r)t[0]=r;else if(i&&e){let n=i.readValue(e,s);null!=n&&(t[0]=n)}void 0===t[0]&&(t[0]=s),n&&void 0===r&&n.set(t[0])}for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),tO.delete(this)}cancel(){"scheduled"===this.state&&(tO.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}let tF=new Set([$,F]);function tU(t,e){let i=W(t);return tF.has(i)||(i=L),i.getAnimatableNone?i.getAnimatableNone(e):void 0}
3let tz=new Set(["auto","none","0"]);class tG extends t${constructor(t,e,i,n,r){super(t,e,i,n,r,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:e,name:i}=this;if(!e||!e.current)return;super.readKeyframes();for(let i=0;i<t.length;i++){let n=t[i];if("string"==typeof n&&tl(n=n.trim())){let r=function t(e,i,n=1){tr(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[r,s]=function(t){let e=td.exec(t);if(!e)return[,];let[,i,n,r]=e;return[`--${i??n}`,r]}(e);if(!r)return;let a=window.getComputedStyle(i).getPropertyValue(r);if(a){let t=a.trim();return/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t)?parseFloat(t):t}return tl(s)?t(s,i,n+1):s}(n,e.current);void 0!==r&&(t[i]=r),i===t.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!J.has(i)||2!==t.length)return;let[n,r]=t,s=tt(n),a=tt(r);if(th(n)!==th(r)&&tP[i]){this.needsMeasurement=!0;return}if(s!==a)if(tS(s)&&tS(a))for(let e=0;e<t.length;e++){let i=t[e];"string"==typeof i&&(t[e]=parseFloat(i))}else tP[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:e}=this,i=[];for(let e=0;e<t.length;e++)(null===t[e]||function(t){if("number"==typeof t)return 0===t;if(null===t)return!0;return"none"===t||"0"===t||/^0[^.\s]+$/u.test(t)}(t[e]))&&i.push(e);i.length&&function(t,e,i){let n,r=0;for(;r<t.length&&!n;){let e=t[r];"string"==typeof e&&!tz.has(e)&&M(e).values.length&&(n=t[r]),r++}if(n&&i)for(let r of e)t[r]=tU(i,n)}(t,i,e)}measureInitialState(){let{element:t,unresolvedKeyframes:e,name:i}=this;if(!t||!t.current)return;"height"===i&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=tP[i](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;let n=e[e.length-1];void 0!==n&&t.getValue(i,n).jump(n,!1)}measureEndState(){let{element:t,name:e,unresolvedKeyframes:i}=this;if(!t||!t.current)return;let n=t.getValue(e);n&&n.jump(this.measuredOrigin,!1);let r=i.length-1,s=i[r];i[r]=tP[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),this.removedTransforms?.length&&this.removedTransforms.forEac
3h(([e,i])=>{t.getValue(e).set(i)}),this.resolveNoneKeyframes()}}let tW=t=>1e3*t;function tY(t,e){-1===t.indexOf(e)&&t.push(e)}function tH(t,e){let i=t.indexOf(e);i>-1&&t.splice(i,1)}class tK{constructor(){this.subscriptions=[]}add(t){return tY(this.subscriptions,t),()=>tH(this.subscriptions,t)}notify(t,e,i){let n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](t,e,i);else for(let r=0;r<n;r++){let n=this.subscriptions[r];n&&n(t,e,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function tq(t){let e;return()=>(void 0===e&&(e=t()),e)}let tX={};function tJ(t,e){let i=tq(t);return()=>tX[e]??i()}let tZ=tJ(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),tQ=t=>null!==t;function t0(t,{repeat:e,repeatType:i="loop"},n,r=1){let s=t.filter(tQ),a=r<0||e&&"loop"!==i&&e%2==1?0:s.length-1;return a&&void 0!==n?n:s[a]}class t1{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}let t2={layout:0,mainThread:0,waapi:0},t3=t=>Array.isArray(t)&&"number"==typeof t[0],t5=tJ(()=>{try{document.createElement("div").animate({opacity:0}
3,{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),t4=(t,e,i=10)=>{let n="",r=Math.max(Math.round(e/i),2);for(let e=0;e<r;e++)n+=Math.round(1e4*t(e/(r-1)))/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},t8=([t,e,i,n])=>`cubic-bezier(${t}, ${e}, ${i}, ${n})`,t6={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:t8([0,.65,.55,1]),circOut:t8([.55,0,1,.45]),backIn:t8([.31,.01,.66,-.59]),backOut:t8([.33,1.53,.69,.99])};function t9(t){return"function"==typeof t&&"applyToOptions"in t}class t7 extends t1{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:e,name:i,keyframes:n,pseudoElement:r,allowFlatten:s=!1,finalKeyframe:a,onComplete:o}=t;this.isPseudoElement=!!r,this.allowFlatten=s,this.options=t,tr("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const l=function({type:t,...e}){return t9(t)&&t5()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=function(t,e,i,{delay:n=0,duration:r=300,repeat:s=0,repeatType:a="loop",ease:o="easeOut",times:l}={},u){let h={[e]:i};l&&(h.offset=l);let d=function t(e,i){if(e)return"function"==typeof e?t5()?t4(e,i):"ease-out":t3(e)?t8(e):Array.isArray(e)?e.map(e=>t(e,i)||t6.easeOut):t6[e]}(o,r);Array.isArray(d)&&(h.easing=d);let c={delay:n,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:"reverse"===a?"alternate":"normal"};u&&(c.pseudoElement=u);let p=t.animate(h,c);return p}(e,i,n,l,r),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){let t=t0(n,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(t);i.startsWith("--")?e.style.setProperty(i,t):e.style[i]=t,this.animation.cancel()}o?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){return Number(this.animation.effect?.getComputedTiming?.().duration||0)/1e3}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+t/1e3}get time(){return(Number(this.animation.currentTime)||0)/1e3}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=tW(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"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,rangeStart:e,rangeEnd:i,observe:n}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&tZ())?(this.animation.timeline=t,e&&(this.animation.rangeStart=e),i&&(this.animation.rangeEnd=i),tA):n(this)}}let et=new Set(["opacity","clipPath","filter","transform"]),{schedule:ee}=tj(queueMicrotask,!1);function ei(){i=void 0}let en={now:()=>(void 0===i&&en.set(tM.isProcessing||t_.useManualTiming?tM.timestamp:performance.now()),i),set:t=>{i=t,queueMicrotask(ei)}};class er{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{let e=en.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=en.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=!isNaN(parseFloat(this.current)))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new tK);let i=this.events[t].add(e);return"change"===t?()=>{i(),tk.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,i){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&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 e&&e.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var t;let e=en.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;let i=Math.min(this.updatedAt-this.prevUpdatedAt,30);return t=parseFloat(this.current)-parseFloat(this.prevFrameValue),i?1e3/i*t:0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),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 es(t,e){return new er(t,e)}let ea=[...Q,_,L],eo=new WeakMap;function el(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function eu(t){return"string"==typeof t||Array.isArray(t)}let eh=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ed=["initial",...eh];function ec(t){return el(t.animate)||ed.some(e=>eu(t[e]))}function ep(t){return!!(ec(t)||t.variants)}let em={current:null},ef={current:!1},eg="u">typeof window;function ey(t){let e=[{},{}];
3return t?.values.forEach((t,i)=>{e[0][i]=t.get(),e[1][i]=t.getVelocity()}),e}function ev(t,e,i,n){if("function"==typeof e){let[r,s]=ey(n);e=e(void 0!==i?i:t.custom,r,s)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){let[r,s]=ey(n);e=e(void 0!==i?i:t.custom,r,s)}return e}let ex=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],ew={};class eb{scrapeMotionValuesFromProps(t,e,i){return{}}constructor({parent:t,props:e,presenceContext:i,reducedMotionConfig:n,skipAnimations:r,blockInitialAnimation:s,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=t$,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let t=en.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,tk.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=e.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=e,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=n,this.skipAnimationsConfig=r,this.options=o,this.blockInitialAnimation=!!s,this.isControllingVariants=ec(e),this.isVariantNode=ep(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...d}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in d){const e=d[t];void 0!==l[t]&&X(e)&&e.set(l[t])}}mount(t){if(this.hasBeenMounted)for(let t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=t,eo.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((t,e)=>this.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(ef.current||function(){if(ef.current=!0,eg)if(window.matchMedia){let t=window.matchMedia("(prefers-reduced-motion)"),e=()=>em.current=t.matches;t.addEventListener("change",e),e()}else em.current=!1}(),this.shouldReduceMotion=em.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){for(let t in this.projection&&this.projection.unmount(),tR(this.notifyUpdate),tR(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[t].clear();for(let t in this.features){let e=this.features[t];e&&(e.unmount(),e.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,e){let i;if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&et.has(t)&&this.current instanceof HTMLElement){let{factory:i,keyframes:n,times:r,ease:s,duration:a}=e.accelerate,o=new t7({element:this.current,name:t,keyframes:n,times:r,ease:s,duration:tW(a)}),l=i(o);this.valueSubscriptions.set(t,()=>{l(),o.cancel()});return}let n=a.has(t);n&&this.onBindTransform&&this.onBindTransform();let r=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&tk.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});"u">typeof window&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{r(),i&&i(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in ew){let e=ew[t];
3if(!e)continue;let{isEnabled:i,Feature:n}=e;if(!this.features[t]&&n&&i(this.props)&&(this.features[t]=new n(this)),this.features[t]){let e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):q()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<ex.length;e++){let i=ex[e];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);let n=t["on"+i];n&&(this.propEventSubscriptions[i]=this.on(i,n))}this.prevMotionValues=function(t,e,i){for(let n in e){let r=e[n],s=i[n];if(X(r))t.addValue(n,r);else if(X(s))t.addValue(n,es(r,{owner:t}));else if(s!==r)if(t.hasValue(n)){let e=t.getValue(n);!0===e.liveStyle?e.jump(r):e.hasAnimated||e.set(r)}else{let e=t.getStaticValue(n);t.addValue(n,es(void 0!==e?e:r,{owner:t}))}}for(let n in i)void 0===e[n]&&t.removeValue(n);return e}(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){let e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){let i=this.values.get(t);e!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);let e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return void 0===i&&void 0!==e&&(i=es(null===e?void 0:e,{owner:this}),this.addValue(t,i)),i}readValue(t,e){let i=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];if(null!=i){let n,r;if("string"==typeof i&&(n=i,/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n)||(r=i,/^0[^.\s]+$/u.test(r))))i=parseFloat(i);else{let n;n=i,!ea.find(Z(n))&&L.test(e)&&(i=tU(t,e))}this.setBaseTarget(t,X(i)?i.get():i)}return X(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){let e,{initial:i}=this.props;if("string"==typeof i||"object"==typeof i){let n=ev(this.props,i,this.presenceContext?.custom);n&&(e=n[t])}if(i&&void 0!==e)return e;let n=this.getBaseTargetFromProps(this.props,t);return void 0===n||X(n)?void 0!==this.initialValues[t]&&void 0===e?void 0:this.baseTarget[t]:n}on(t,e){return this.events[t]||(this.events[t]=new tK),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){ee.render(this.render)}}class eS extends eb{constructor(){super(...arguments),this.KeyframeResolver=tG}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){let i=t.style;return i?i[e]:void 0}removeValueFromRenderState(t,{vars:e,style:i}){delete e[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;X(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function eE(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}let eT=(t,e)=>e&&"number"==typeof t?e.transform(t):t,eP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},eA=s.length;function e_(t,e,i){let{style:n,vars:r,transformOrigin:o}=t,l=!1,u=!1;for(let t in e){let i=e[t];if(a.has(t)){l=!0;continue}if(ta(t)){r[t]=i;continue}{let e=eT(i,z[t]);t.startsWith("origin")?(u=!0,o[t]=e):n[t]=e}}
3if(!e.transform&&(l||i?n.transform=function(t,e,i){let n="",r=!0;for(let a=0;a<eA;a++){let o=s[a],l=t[o];if(void 0===l)continue;let u=!0;if("number"==typeof l)u=l===+!!o.startsWith("scale");else{let t=parseFloat(l);u=o.startsWith("scale")?1===t:0===t}if(!u||i){let t=eT(l,z[o]);if(!u){r=!1;let e=eP[o]||o;n+=`${e}(${t}) `}i&&(e[o]=t)}}return n=n.trim(),i?n=i(e,r?"":n):r&&(n="none"),n}(e,t.transform,i):n.transform&&(n.transform="none")),u){let{originX:t="50%",originY:e="50%",originZ:i=0}=o;n.transformOrigin=`${t} ${e} ${i}`}}let eC={offset:"stroke-dashoffset",array:"stroke-dasharray"},ej={offset:"strokeDashoffset",array:"strokeDasharray"},ek=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function eR(t,{attrX:e,attrY:i,attrScale:n,pathLength:r,pathSpacing:s=1,pathOffset:a=0,...o},l,u,h){if(e_(t,o,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};let{attrs:d,style:c}=t;for(let t of(d.transform&&(c.transform=d.transform,delete d.transform),(c.transform||d.transformOrigin)&&(c.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),c.transform&&(c.transformBox=h?.transformBox??"fill-box",delete d.transformBox),ek))void 0!==d[t]&&(c[t]=d[t],delete d[t]);void 0!==e&&(d.x=e),void 0!==i&&(d.y=i),void 0!==n&&(d.scale=n),void 0!==r&&function(t,e,i=1,n=0,r=!0){t.pathLength=1;let s=r?eC:ej;t[s.offset]=`${-n}`,t[s.array]=`${e} ${i}`}(d,r,s,a,!1)}let eM=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"]),eD=t=>"string"==typeof t&&"svg"===t.toLowerCase();function eO(t,{style:e,vars:i},n,r){let s,a=t.style;for(s in e)a[s]=e[s];for(s in r?.applyProjectionStyles(a,n),i)a.setProperty(s,i[s])}function eV(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}let eL={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t)if(!S.test(t))return t;else t=parseFloat(t);let i=eV(t,e.target.x),n=eV(t,e.target.y);return`${i}% ${n}%`}},eI=(t,e,i)=>t+(e-t)*i,eN={borderRadius:{...eL,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:eL,borderTopRightRadius:eL,borderBottomLeftRadius:eL,borderBottomRightRadius:eL,boxShadow:{correct:(t,{treeScale:e,projectionDelta:i})=>{let n=L.parse(t);if(n.length>5)return t;let r=L.createTransformer(t),s=+("number"!=typeof n[0]),a=i.x.scale*e.x,o=i.y.scale*e.y;n[0+s]/=a,n[1+s]/=o;let l=eI(a,o,.5);return"number"==typeof n[2+s]&&(n[2+s]/=l),"number"==typeof n[3+s]&&(n[3+s]/=l),r(n)}}};function eB(t,{layout:e,layoutId:i}){return a.has(t)||t.startsWith("origin")||(e||void 0!==i)&&(!!eN[t]||"opacity"===t)}function e$(t,e,i){let n=t.style,r=e?.style,s={};if(!n)return s;for(let e in n)(X(n[e])||r&&X(r[e])||eB(e,t)||i?.getValue(e)?.liveStyle!==void 0)&&(s[e]=n[e]);return s}function eF(t,e,i){let n=e$(t,e,i);for(let i in t)(X(t[i])||X(e[i]))&&(n[-1!==s.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=t[i]);return n}class eU extends eS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=q}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(a.has(e)){let t=W(e);return t&&t.default||0}return e=eM.has(e)?e:eE(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,i){return eF(t,e,i)}build(t,e,i){eR(t,e,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,e,i,n){for(let i in eO(t,e,void 0,n),e.attrs)t.setAttribute(eM.has(i)?i:eE(i),e.attrs[i])}mount(t){this.isSVGTag=eD(t.tagName),super.mount(t)}}function ez({top:t,left:e,right:i,bottom:n}){return{x:{min:e,max:i},y:{min:t,max:n}}}function eG(t){return void 0===t||1===t}function eW({scale:t,scaleX:e,scaleY:i}){return!eG(t)||!eG(e)||!eG(i)}function eY(t){return eW(t)||eH(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function eH(t){var e,i;return(e=t.x)&&"0%"!==e||(i=t.y)&&"0%"!==i}function eK(t,e,i,n,r){return void 0!==r&&(t=n+r*(t-n)),n+i*(t-n)+e}function eq(t,e=0,i=1,n,r){t.min=eK(t.min,e,i,n,r),t.max=eK(t.max,e,i,n,r)}function eX(t,{x:e,y:i}){eq(t.x,e.translate,e.scale,e.originPoint),eq(t.y,i.translate,i.scale,i.originPoint)}function eJ(t,e){t.min=t.min+e,t.max=t.max+e}function eZ(t,e,i,n,r=.5){let s=eI(t.min,t.max,r);eq(t,e,i,s,n)}function eQ(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function e0(t,e){eZ(t.x,eQ(e.x,t.x),e.scaleX,e.scale,e.originX),eZ(t.y,eQ(e.y,t.y),e.scaleY,e.scale,e.originY)}function e1(t,e){return ez(function(t,e){if(!e)return t;let i=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:i.y,left:i.x,bottom:n.y,right:n.x}}(t.getBoundingClientRect(),e))}class e2 extends eS{constructor(){super(...arguments),this.type="html",this.renderInstance=eO}readValueFromInstance(t,e){if(a.has(e))return this.projection?.isProjecting?tx(e):((t,e)=>{let{transform:i="none"}=getComputedStyle(t);return tw(i,e)})(t,e);{let i=window.getComputedStyle(t),n=(ta(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof n?n.trim():n}}measureInstanceViewportBox(t,{transformPagePoint:e}){return e1(t,e)}build(t,e,i){e_(t,e,i.transformTemplate)}
3scrapeMotionValuesFromProps(t,e,i){return e$(t,e,i)}}var e3=t.i(330668);let e5=["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 e4(t){if("string"!=typeof t||t.includes("-"));else if(e5.indexOf(t)>-1||/[A-Z]/u.test(t))return!0;return!1}var e8=t.i(848277);let e6=(0,e3.createContext)({});t.s(["LayoutGroupContext",0,e6],256298);let e9=(0,e3.createContext)({strict:!1}),e7=(0,e3.createContext)({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});t.s(["MotionConfigContext",0,e7],543533);let it=(0,e3.createContext)({});function ie(t){return Array.isArray(t)?t.join(" "):t}let ii=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ir(t,e,i){for(let n in e)X(e[n])||eB(n,i)||(t[n]=e[n])}let is=()=>({...ii(),attrs:{}}),ia=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","propagate","ignoreStrict","viewport"]);function io(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||ia.has(t)}let il=t=>!io(t);try{te=(()=>{let t=Error("Cannot find module '@emotion/is-prop-valid'");throw t.code="MODULE_NOT_FOUND",t})().default,"function"==typeof te&&(il=t=>t.startsWith("on")?!io(t):te(t))}catch{}function iu(t){return X(t)?t.get():t}let ih=(0,e3.createContext)(null);function id(t){let e=(0,e3.useRef)(null);return null===e.current&&(e.current=t()),e.current}t.s(["PresenceContext",0,ih],808812),t.s(["useConstant",0,id],150772);let ic=t=>(e,i)=>{let n=(0,e3.useContext)(it),r=(0,e3.useContext)(ih),s=()=>(function({scrapeMotionValuesFromProps:t,createRenderState:e},i,n,r){return{latestValues:function(t,e,i,n){let r={},s=n(t,{});for(let t in s)r[t]=iu(s[t]);let{initial:a,animate:o}=t,l=ec(t),u=ep(t);e&&u&&!l&&!1!==t.inherit&&(void 0===a&&(a=e.initial),void 0===o&&(o=e.animate));let h=!!i&&!1===i.initial,d=(h=h||!1===a)?o:a;if(d&&"boolean"!=typeof d&&!el(d)){let e=Array.isArray(d)?d:[d];for(let i=0;i<e.length;i++){let n=ev(t,e[i]);if(n){let{transitionEnd:t,transition:e,...i}=n;for(let t in i){let e=i[t];if(Array.isArray(e)){let t=h?e.length-1:0;e=e[t]}null!==e&&(r[t]=e)}for(let e in t)r[e]=t[e]}}}return r}(i,n,r,t),renderState:e()}})(t,e,n,r);return i?s():id(s)},ip=ic({scrapeMotionValuesFromProps:e$,createRenderState:ii}),im=ic({scrapeMotionValuesFromProps:eF,createRenderState:is}),ig={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"]},iy=!1;function iv(){return!function(){if(iy)return;let t={};for(let e in ig)t[e]={isEnabled:t=>ig[e].some(e=>!!t[e])};ew=t,iy=!0}(),ew}let ix=Symbol.for("motionComponentSymbol"),iw="data-"+eE("framerAppearId"),ib=(0,e3.createContext)({});function iS(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}let iE="u">typeof window?e3.useLayoutEffect:e3.useEffect;function iT(t,{forwardMotionProps:e=!1,type:i}={},n,r){n&&function(t){let e=iv();for(let i in t)e[i]={...e[i],...t[i]};ew=e}(n);let s=i?"svg"===i:e4(t),a=s?im:ip;function o(i,n){var o;let l,u,h,d={...(0,e3.useContext)(e7),...i,layoutId:function({layoutId:t}){let e=(0,e3.useContext)(e6).id;return e&&void 0!==t?e+"-"+t:t}(i)},{isStatic:c}=d,p=function(t){let{initial:e,animate:i}=function(t,e){if(ec(t)){let{initial:e,animate:i}=t;return{initial:!1===e||eu(e)?e:void 0,animate:eu(i)?i:void 0}}return!1!==t.inherit?e:{}}(t,(0,e3.useContext)(it));return(0,e3.useMemo)(()=>({initial:e,animate:i}),[ie(e),ie(i)])}(i),m=a(i,c);if(!c&&"u">typeof window){(0,e3.useContext)(e9).strict;let e=function(t){let{drag:e,layout:i}=iv();if(!e&&!i)return{};let n={...e,...i};return{MeasureLayout:e?.isEnabled(t)||i?.isEnabled(t)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}
3(d);l=e.MeasureLayout,p.visualElement=function(t,e,i,n,r,s){let{visualElement:a}=(0,e3.useContext)(it),o=(0,e3.useContext)(e9),l=(0,e3.useContext)(ih),u=(0,e3.useContext)(e7),h=u.reducedMotion,d=u.skipAnimations,c=(0,e3.useRef)(null),p=(0,e3.useRef)(!1);n=n||o.renderer,!c.current&&n&&(c.current=n(t,{visualState:e,parent:a,props:i,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:h,skipAnimations:d,isSVG:s}),p.current&&c.current&&(c.current.manuallyAnimateOnMount=!0));let m=c.current,f=(0,e3.useContext)(ib);m&&!m.projection&&r&&("html"===m.type||"svg"===m.type)&&function(t,e,i,n){let{layoutId:r,layout:s,drag:a,dragConstraints:o,layoutScroll:l,layoutRoot:u,layoutCrossfade:h}=e;t.projection=new i(t.latestValues,e["data-framer-portal-id"]?void 0:function t(e){if(e)return!1!==e.options.allowProjection?e.projection:t(e.parent)}(t.parent)),t.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!a||o&&iS(o),visualElement:t,animationType:"string"==typeof s?s:"both",initialPromotionConfig:n,crossfade:h,layoutScroll:l,layoutRoot:u})}(c.current,i,r,f);let g=(0,e3.useRef)(!1);(0,e3.useInsertionEffect)(()=>{m&&g.current&&m.update(i,l)});let y=i[iw],v=(0,e3.useRef)(!!y&&"u">typeof window&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return iE(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),(0,e3.useEffect)(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),v.current=!1),m.enteringChildren=void 0)}),m}(t,m,d,r,e.ProjectionNode,s)}return(0,e8.jsxs)(it.Provider,{value:p,children:[l&&p.visualElement?(0,e8.jsx)(l,{visualElement:p.visualElement,...d}):null,function(t,e,i,{latestValues:n},r,s=!1,a){let o=(a??e4(t)?function(t,e,i,n){let r=(0,e3.useMemo)(()=>{let i=is();return eR(i,e,eD(n),t.transformTemplate,t.style),{...i.attrs,style:{...i.style}}},[e]);if(t.style){let e={};ir(e,t.style,t),r.style={...e,...r.style}}return r}:function(t,e){let i,n,r={},s=(i=t.style||{},ir(n={},i,t),Object.assign(n,function({transformTemplate:t},e){return(0,e3.useMemo)(()=>{let i=ii();return e_(i,e,t),Object.assign({},i.vars,i.style)},[e])}(t,e)),n);return t.drag&&!1!==t.dragListener&&(r.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=!0===t.drag?"none":`pan-${"x"===t.drag?"y":"x"}`),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(r.tabIndex=0),r.style=s,r})(e,n,r,t),l=function(t,e,i){let n={};for(let r in t)("values"!==r||"object"!=typeof t.values)&&(il(r)||!0===i&&io(r)||!e&&!io(r)||t.draggable&&r.startsWith("onDrag"))&&(n[r]=t[r]);return n}(e,"string"==typeof t,s),u=t!==e3.Fragment?{...l,...o,ref:i}:{},{children:h}=e,d=(0,e3.useMemo)(()=>X(h)?h.get():h,[h]);return(0,e3.createElement)(t,{...u,children:d})}(t,i,(o=p.visualElement,u=(0,e3.useRef)(n),(0,e3.useInsertionEffect)(()=>{u.current=n}),h=(0,e3.useRef)(null),(0,e3.useCallback)(t=>{t&&m.onMount?.(t);let e=u.current;if("function"==typeof e)if(t){let i=e(t);"function"==typeof i&&(h.current=i)}else h.current?(h.current(),h.current=null):e(t);else e&&(e.current=t);o&&(t?o.mount(t):o.unmount())}
3,[o])),m,c,e,s)]})}o.displayName=`motion.${"string"==typeof t?t:`create(${t.displayName??t.name??""})`}`;let l=(0,e3.forwardRef)(o);return l[ix]=t,l}t.s(["useIsomorphicLayoutEffect",0,iE],153899);class iP{constructor(t){this.isMounted=!1,this.node=t}update(){}}function iA(t,e,i){let n=t.getProps();return ev(n,e,void 0!==i?i:n.custom,t)}function i_(t,e){if(t?.inherit&&e){let{inherit:i,...n}=t;return{...e,...n}}return t}function iC(t,e){let i=t?.[e]??t?.default??t;return i!==t?i_(i,t):i}let ij=t=>Array.isArray(t);function ik(t,e){let i=t.getValue("willChange");if(X(i)&&i.add)return i.add(e);if(!i&&t_.WillChange){let i=new t_.WillChange("auto");t.addValue("willChange",i),i.add(e)}}let iR=(t,e)=>i=>e(t(i)),iM=(...t)=>t.reduce(iR);function iD(t,e,i){return(i<0&&(i+=1),i>1&&(i-=1),i<1/6)?t+(e-t)*6*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function iO(t,e){return i=>i>0?e:t}let iV=(t,e,i)=>{let n=t*t,r=i*(e*e-n)+n;return r<0?0:Math.sqrt(r)},iL=[v,y,A];function iI(t){let e=iL.find(e=>e.test(t));if(tn(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let i=e.parse(t);return e===A&&(i=function({hue:t,saturation:e,lightness:i,alpha:n}){t/=360,i/=100;let r=0,s=0,a=0;if(e/=100){let n=i<.5?i*(1+e):i+e-i*e,o=2*i-n;r=iD(o,n,t+1/3),s=iD(o,n,t),a=iD(o,n,t-1/3)}else r=s=a=i;return{red:Math.round(255*r),green:Math.round(255*s),blue:Math.round(255*a),alpha:n}}(i)),i}let iN=(t,e)=>{let i=iI(t),n=iI(e);if(!i||!n)return iO(t,e);let r={...i};return t=>(r.red=iV(i.red,n.red,t),r.green=iV(i.green,n.green,t),r.blue=iV(i.blue,n.blue,t),r.alpha=eI(i.alpha,n.alpha,t),y.transform(r))},iB=new Set(["none","hidden"]);function i$(t,e){return i=>eI(t,e,i)}function iF(t){return"number"==typeof t?i$:"string"==typeof t?tl(t)?iO:_.test(t)?iN:iG:Array.isArray(t)?iU:"object"==typeof t?_.test(t)?iN:iz:iO}function iU(t,e){let i=[...t],n=i.length,r=t.map((t,i)=>iF(t)(t,e[i]));return t=>{for(let e=0;e<n;e++)i[e]=r[e](t);return i}}function iz(t,e){let i={...t,...e},n={};for(let r in i)void 0!==t[r]&&void 0!==e[r]&&(n[r]=iF(t[r])(t[r],e[r]));return t=>{for(let e in n)i[e]=n[e](t);return i}}let iG=(t,e)=>{let i=L.createTransformer(e),n=M(t),r=M(e);if(!(n.indexes.var.length===r.indexes.var.length&&n.indexes.color.length===r.indexes.color.length&&n.indexes.number.length>=r.indexes.number.length))return tn(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),iO(t,e);if(iB.has(t)&&!r.values.length||iB.has(e)&&!n.values.length)return iB.has(t)?i=>i<=0?t:e:i=>i>=1?e:t;return iM(iU(function(t,e){let i=[],n={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){let s=e.types[r],a=t.indexes[s][n[s]],o=t.values[a]??0;i[r]=o,n[s]++}return i}(n,r),r.values),i)};function iW(t,e,i){return"number"==typeof t&&"number"==typeof e&&"number"==typeof i?eI(t,e,i):iF(t)(t,e)}let iY=t=>{let e=({timestamp:e})=>t(e);return{start:(t=!0)=>tk.update(e,t),stop:()=>tR(e),now:()=>tM.isProcessing?tM.timestamp:en.now()}};function iH(t){let e=0,i=t.next(e);for(;!i.done&&e<2e4;)e+=50,i=t.next(e);return e>=2e4?1/0:e}function iK(t,e,i){var n,r;let s=Math.max(e-5,0);return n=i-t(s),(r=e-s)?1e3/r*n:0}let iq=.01,iX=2,iJ=.005,iZ=.5;function iQ(t,e){return t*Math.sqrt(1-e*e)}let i0=["duration","bounce"],i1=["stiffness","damping","mass"];function i2(t,e){return e.some(e=>void 0!==t[e])}function i3(t=.3,e=.3){let i,n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t,{restSpeed:r,restDelta:s}=n,a=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],u={done:!1,value:a},{stiffness:h,damping:d,mass:c,duration:p,velocity:m,isResolvedFromDuration:f}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!i2(t,i1)&&i2(t,i0))if(e.velocity=0,t.visualDuration){let i=2*Math.PI/(1.2*t.visualDuration),n=i*i,r=2*o(.05,1,1-(t.bounce||0))*Math.sqrt(n);e={...e,mass:1,stiffness:n,damping:r}}else{let i=function({duration:t=800,bounce:e=.3,velocity:i=0,mass:n=1}){let r,s;tn(t<=tW(10),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-e;a=o(.05,1,a),t=o(.01,10,t/1e3),a<1?(r=e=>{let n=e*a,r=n*t;return .001-(n-i)/iQ(e,a)*Math.exp(-r)},s=e=>{let n=e*a*t,s=Math.pow(a,2)*Math.pow(e,2)*t,o=Math.exp(-n),l=iQ(Math.pow(e,2),a);return(n*i+i-s)*o*(-r(e)+.001>0?-1:1)/l}):(r=e=>-.001+Math.exp(-e*t)*((e-i)*t+1),s=e=>t*t*(i-e)*Math.exp(-e*t));
3let l=function(t,e,i){let n=i;for(let i=1;i<12;i++)n-=t(n)/e(n);return n}(r,s,5/t);if(t=tW(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{let e=Math.pow(l,2)*n;return{stiffness:e,damping:2*a*Math.sqrt(n*e),duration:t}}}({...t,velocity:0});(e={...e,...i,mass:1}).isResolvedFromDuration=!0}return e}({...n,velocity:-((n.velocity||0)/1e3)}),g=m||0,y=d/(2*Math.sqrt(h*c)),v=l-a,x=Math.sqrt(h/c)/1e3,w=5>Math.abs(v);if(r||(r=w?iq:iX),s||(s=w?iJ:iZ),y<1){let t=iQ(x,y);i=e=>l-Math.exp(-y*x*e)*((g+y*x*v)/t*Math.sin(t*e)+v*Math.cos(t*e))}else if(1===y)i=t=>l-Math.exp(-x*t)*(v+(g+x*v)*t);else{let t=x*Math.sqrt(y*y-1);i=e=>{let i=Math.exp(-y*x*e),n=Math.min(t*e,300);return l-i*((g+y*x*v)*Math.sinh(n)+t*v*Math.cosh(n))/t}}let b={calculatedDuration:f&&p||null,next:t=>{let e=i(t);if(f)u.done=t>=p;else{let n=0===t?g:0;y<1&&(n=0===t?tW(g):iK(i,t,e));let a=Math.abs(l-e)<=s;u.done=Math.abs(n)<=r&&a}return u.value=u.done?l:e,u},toString:()=>{let t=Math.min(iH(b),2e4),e=t4(e=>b.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return b}function i5({keyframes:t,velocity:e=0,power:i=.8,timeConstant:n=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:a,min:o,max:l,restDelta:u=.5,restSpeed:h}){let d,c,p=t[0],m={done:!1,value:p},f=i*e,g=p+f,y=void 0===a?g:a(g);y!==g&&(f=y-p);let v=t=>-f*Math.exp(-t/n),x=t=>y+v(t),w=t=>{let e=v(t),i=x(t);m.done=Math.abs(e)<=u,m.value=m.done?y:i},b=t=>{let e;if(e=m.value,void 0!==o&&e<o||void 0!==l&&e>l){var i;d=t,c=i3({keyframes:[m.value,(i=m.value,void 0===o?l:void 0===l||Math.abs(o-i)<Math.abs(l-i)?o:l)],velocity:iK(x,t,m.value),damping:r,stiffness:s,restDelta:u,restSpeed:h})}};return b(0),{calculatedDuration:null,next:t=>{let e=!1;return(c||void 0!==d||(e=!0,w(t),b(t)),void 0!==d&&t>=d)?c.next(t-d):(e||w(t),m)}}}i3.applyToOptions=t=>{let e=function(t,e=100,i){let n=i({...t,keyframes:[0,e]}),r=Math.min(iH(n),2e4);return{type:"keyframes",ease:t=>n.next(r*t).value/e,duration:r/1e3}}(t,100,i3);return t.ease=e.ease,t.duration=tW(e.duration),t.type="keyframes",t};let i4=(t,e,i)=>(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t;function i8(t,e,i,n){return t===e&&i===n?tA:r=>0===r||1===r?r:i4(function(t,e,i,n,r){let s,a,o=0;do(s=i4(a=e+(i-e)/2,n,r)-t)>0?i=a:e=a;while(Math.abs(s)>1e-7&&++o<12)return a}(r,0,1,t,i),e,n)}let i6=i8(.42,0,1,1),i9=i8(0,0,.58,1),i7=i8(.42,0,.58,1),nt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ne=t=>e=>1-t(1-e),ni=i8(.33,1.53,.69,.99),nn=ne(ni),nr=nt(nn),ns=t=>(t*=2)<1?.5*nn(t):.5*(2-Math.pow(2,-10*(t-1))),na=t=>1-Math.sin(Math.acos(t)),no=ne(na),nl=nt(na),nu={linear:tA,easeIn:i6,easeInOut:i7,easeOut:i9,circIn:na,circInOut:nl,cir
3cOut:no,backIn:nn,backInOut:nr,backOut:ni,anticipate:ns},nh=t=>{if(t3(t)){tr(4===t.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[e,i,n,r]=t;return i8(e,i,n,r)}return"string"==typeof t?(tr(void 0!==nu[t],`Invalid easing type '${t}'`,"invalid-easing-type"),nu[t]):t},nd=(t,e,i)=>{let n=e-t;return 0===n?1:(i-t)/n};function nc({duration:t=300,keyframes:e,times:i,ease:n="easeInOut"}){var r;let s,a=Array.isArray(n)&&"number"!=typeof n[0]?n.map(nh):nh(n),l={done:!1,value:e[0]},u=function(t,e,{clamp:i=!0,ease:n,mixer:r}={}){let s=t.length;if(tr(s===e.length,"Both input and output ranges must be the same length","range-length"),1===s)return()=>e[0];if(2===s&&e[0]===e[1])return()=>e[1];let a=t[0]===t[1];t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());let l=function(t,e,i){let n=[],r=i||t_.mix||iW,s=t.length-1;for(let i=0;i<s;i++){let s=r(t[i],t[i+1]);e&&(s=iM(Array.isArray(e)?e[i]||tA:e,s)),n.push(s)}return n}(e,n,r),u=l.length,h=i=>{if(a&&i<t[0])return e[0];let n=0;if(u>1)for(;n<t.length-2&&!(i<t[n+1]);n++);let r=nd(t[n],t[n+1],i);return l[n](r)};return i?e=>h(o(t[0],t[s-1],e)):h}((r=i&&i.length===e.length?i:(!function(t,e){let i=t[t.length-1];for(let n=1;n<=e;n++){let r=nd(0,e,n);t.push(eI(i,1,r))}}(s=[0],e.length-1),s),r.map(e=>e*t)),e,{ease:Array.isArray(a)?a:e.map(()=>a||i7).splice(0,e.length-1)});return{calculatedDuration:t,next:e=>(l.value=u(e),l.done=e>=t,l)}}let np={decay:i5,inertia:i5,tween:nc,keyframes:nc,spring:i3};function nm(t){"string"==typeof t.type&&(t.type=np[t.type])}let nf=t=>t/100;class ng extends t1{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:t}=this.options;t&&t.updatedAt!==en.now()&&this.tick(en.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},t2.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){let{options:t}=this;nm(t);let{type:e=nc,repeat:i=0,repeatDelay:n=0,repeatType:r,velocity:s=0}=t,{keyframes:a}=t,o=e||nc;o!==nc&&"number"!=typeof a[0]&&(this.mixKeyframes=iM(nf,iW(a[0],a[1])),a=[0,100]);let l=o({...t,keyframes:a});"mirror"===r&&(this.mirroredGenerator=o({...t,keyframes:[...a].reverse(),velocity:-s})),null===l.calculatedDuration&&(l.calculatedDuration=iH(l));let{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+n,this.totalDuration=this.resolvedDuration*(i+1)-n,this.generator=l}updateTime(t){let e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){let{generator:i,totalDuration:n,mixKeyframes:r,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:l}=this;if(null===this.startTime)return i.next(0);let{delay:u=0,keyframes:h,repeat:d,repeatType:c,repeatDelay:p,type:m,onUpdate:f,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-n/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);let y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>n;this.currentTime=Math.max(y,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=n);let x=this.currentTime,w=i;if(d){let t=Math.min(this.currentTime,n)/a,e=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),1===i&&e--,(e=Math.min(e,d+1))%2&&("reverse"===c?(i=1-i,p&&(i-=p/a)):"mirror"===c&&(w=s)),x=o(0,1,i)*a}let b=v?{done:!1,value:h[0]}:w.next(x);r&&(b.value=r(b.value));let{done:S}=b;v||null===l||(S=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);let E=null===this.holdTime&&("finished"===this.state||"running"===this.state&&S);return E&&m!==i5&&(b.value=t0(h,this.options,g,this.speed)),f&&f(b.value),E&&this.finish(),b}then(t,e){return this.finished.then(t,e)}get duration(){return this.calculatedDuration/1e3}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+t/1e3}get time(){return this.currentTime/1e3}set time(t){t=tW(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?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(en.now());let e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=this.currentTime/1e3)}play(){if(this.isStopped)return;let{driver:t=iY,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();let i=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=i):null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime||(this.startTime=e??i),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(en.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&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,t2.mainThread--}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)}}let ny={anticipate:ns,backInOut:nr,circInOut:nl};class nv extends t7{constructor(t){!function(t){"string"==typeof t.ease&&t.ease in ny&&(t.ease=ny[t.ease])}(t),nm(t),super(t),void 0!==t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:e,onUpdate:i,onComplete:n,element:r,...s}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);let a=new ng({...s,autoplay:!1}),l=Math.max(10,en.now()-this.startTime),u=o(0,10,l-10);e.setWithVelocity(a.sample(Math.max(0,l-u)).value,a.sample(l).value,u),a.stop()}}let nx=(t,e)=>"zIndex"!==e&&!!("number"==typeof t||Array.isArray(t)||"string"==typeof t&&(L.test(t)||"0"===t)&&!t.startsWith("url("));function nw(t){t.duration=0,t.type="keyframes"}let nb=new Set(["opacity","clipPath","filter","transform"]),nS=tq(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));
3class nE extends t1{constructor({autoplay:t=!0,delay:e=0,type:i="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:s="loop",keyframes:a,name:o,motionValue:l,element:u,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=en.now();const d={autoplay:t,delay:e,type:i,repeat:n,repeatDelay:r,repeatType:s,name:o,motionValue:l,element:u,...h},c=u?.KeyframeResolver||t$;this.keyframeResolver=new c(a,(t,e,i)=>this.onKeyframesResolved(t,e,d,!i),o,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,i,n){this.keyframeResolver=void 0;let{name:r,type:s,velocity:a,delay:o,isHandoff:l,onUpdate:u}=i;this.resolvedAt=en.now(),!function(t,e,i,n){let r=t[0];if(null===r)return!1;if("display"===e||"visibility"===e)return!0;let s=t[t.length-1],a=nx(r,e),o=nx(s,e);return tn(a===o,`You are trying to animate ${e} from "${r}" to "${s}". "${a?s:r}" is not an animatable value.`,"value-not-animatable"),!!a&&!!o&&(function(t){let e=t[0];if(1===t.length)return!0;for(let i=0;i<t.length;i++)if(t[i]!==e)return!0}(t)||("spring"===i||t9(i))&&n)}(t,r,s,a)&&((t_.instantAnimations||!o)&&u?.(t0(t,i,e)),t[0]=t[t.length-1],nw(i),i.repeat=0);let h={startTime:n?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...i,keyframes:t},d=!l&&function(t){let{motionValue:e,name:i,repeatDelay:n,repeatType:r,damping:s,type:a}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:o,transformTemplate:l}=e.owner.getProps();return nS()&&i&&nb.has(i)&&("transform"!==i||!l)&&!o&&!n&&"mirror"!==r&&0!==s&&"inertia"!==a}(h),c=h.motionValue?.owner?.current,p=d?new nv({...h,element:c}):new ng(h);p.finished.then(()=>{this.notifyFinished()}).catch(tA),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),tI=!0,tB(),tN(),tI=!1),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()}}let nT={type:"spring",stiffness:500,damping:25,restSpeed:10},nP={type:"keyframes",duration:.8},nA={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},n_=t=>null!==t,nC=(t,e,i,n={},r,s)=>o=>{let l=iC(n,t)||{},u=l.delay||n.delay||0,{elapsed:h=0}=n;h-=tW(u);let d={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-h,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:t,motionValue:e,element:s?void 0:r};!function({when:t,delay:e,delayChildren:i,staggerChildren:n,staggerDirection:r,repeat:s,repeatType:a,repeatDelay:o,from:l,elapsed:u,...h}){return!!Object.keys(h).length}(l)&&Object.assign(d,((t,{keyframes:e})=>e.length>2?nP:a.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:nT:nA)(t,d)),d.duration&&(d.duration=tW(d.duration)),d.repeatDelay&&(d.repeatDelay=tW(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let c=!1;if(!1!==d.type&&(0!==d.duration||d.repeatDelay)||(nw(d),0===d.delay&&(c=!0)),(t_.instantAnimations||t_.skipAnimations||r?.shouldSkipAnimations)&&(c=!0,nw(d),d.delay=0),d.allowFlatten=!l.type&&!l.ease,c&&!s&&void 0!==e.get()){let t=function(t,{repeat:e,repeatType:i="loop"}){let n=t.filter(n_),r=e&&"loop"!==i&&e%2==1?0:n.length-1;return n[r]}(d.keyframes,l);if(void 0!==t)return void tk.update(()=>{d.onUpdate(t),d.onComplete()})}return l.isSync?new ng(d):new nE(d)};function nj(t,e,{delay:i=0,transitionOverride:n,type:r}={}){let{transition:s,transitionEnd:a,...o}=e,l=t.getDefaultTransition();s=s?i_(s,l):l;let u=s?.reduceMotion;n&&(s=n);let h=[],d=r&&t.animationState&&t.animationState.getState()[r];for(let e in o){let n=t.getValue(e,t.latestValues[e]??null),r=o[e];if(void 0===r||d&&function({protectedKeys:t,needsAnimating:e},i){let n=t.hasOwnProperty(i)&&!0!==e[i];return e[i]=!1,n}(d,e))continue;let a={delay:i,...iC(s||{},e)},l=n.get();if(void 0!==l&&!n.isAnimating&&!Array.isArray(r)&&r===l&&!a.velocity)continue;let c=!1;if(window.MotionHandoffAnimation){let i=t.props[iw];if(i){let t=window.MotionHandoffAnimation(i,e,tk);null!==t&&(a.startTime=t,c=!0)}}ik(t,e);let p=u??t.shouldReduceMotion;n.start(nC(e,n,r,p&&J.has(e)?{type:!1}:a,t,c));let m=n.animation;m&&h.push(m)}if(a){let e=()=>tk.update(()=>{a&&function(t,e){let{transitionEnd:i={},transition:n={},...r}=iA(t,e)||{};for(let e in r={...r,...i}){var s;let i=ij(s=r[e])?s[s.length-1]||0:s;t.hasValue(e)?t.getValue(e).set(i):t.addValue(e,es(i))}}(t,a)});h.length?Promise.all(h).then(e):e()}return h}function nk(t,e,i,n=0,r=1){let s=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),a=t.size,o=(a-1)*n;return"function"==typeof i?i(s,a):1===r?s*n:o-s*n}function nR(t,e,i={}){let n=iA(t,e,"exit"===i.type?t.presenceContext?.custom:void 0),{transition:r=t.getDefaultTransition()||{}}=n||{};i.transitionOverride&&(r=i.transitionOverride);let s=n?()=>Promise.all(nj(t,n,i)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(n=0)=>{let{delayChildren:s=0,staggerChildren:a,staggerDirection:o}=r;
3return function(t,e,i=0,n=0,r=0,s=1,a){let o=[];for(let l of t.variantChildren)l.notify("AnimationStart",e),o.push(nR(l,e,{...a,delay:i+("function"==typeof n?0:n)+nk(t.variantChildren,l,n,r,s)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(o)}(t,e,n,s,a,o,i)}:()=>Promise.resolve(),{when:o}=r;if(!o)return Promise.all([s(),a(i.delay)]);{let[t,e]="beforeChildren"===o?[s,a]:[a,s];return t().then(()=>e())}}let nM=ed.length;function nD(t,e){if(!Array.isArray(e))return!1;let i=e.length;if(i!==t.length)return!1;for(let n=0;n<i;n++)if(e[n]!==t[n])return!1;return!0}let nO=[...eh].reverse(),nV=eh.length;function nL(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function nI(){return{animate:nL(!0),whileInView:nL(),whileHover:nL(),whileTap:nL(),whileDrag:nL(),whileFocus:nL(),exit:nL()}}let nN=0;function nB(t){return[t("x"),t("y")]}function n$(t,e,i,n={passive:!0}){return t.addEventListener(e,i,n),()=>t.removeEventListener(e,i)}let nF={x:!1,y:!1};function nU(t){return t.max-t.min}function nz(t,e,i,n=.5){t.origin=n,t.originPoint=eI(e.min,e.max,t.origin),t.scale=nU(i)/nU(e),t.translate=eI(i.min,i.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function nG(t,e,i,n){nz(t.x,e.x,i.x,n?n.originX:void 0),nz(t.y,e.y,i.y,n?n.originY:void 0)}function nW(t,e,i){t.min=i.min+e.min,t.max=t.min+nU(e)}function nY(t,e,i){t.min=e.min-i.min,t.max=t.min+nU(e)}function nH(t,e,i){nY(t.x,e.x,i.x),nY(t.y,e.y,i.y)}function nK(t){return"object"==typeof t&&null!==t}function nq(t){return nK(t)&&"ownerSVGElement"in t}function nX(t,e,i){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let n=document;e&&(n=e.current);let r=i?.[t]??n.querySelectorAll(t);return r?Array.from(r):[]}return Array.from(t).filter(t=>null!=t)}let nJ=new WeakMap,nZ=(t,e,i)=>(n,r)=>r&&r[0]?r[0][t+"Size"]:nq(n)&&"getBBox"in n?n.getBBox()[e]:n[i],nQ=nZ("inline","width","offsetWidth"),n0=nZ("block","height","offsetHeight");function n1({target:t,borderBoxSize:e}){nJ.get(t)?.forEach(i=>{i(t,{get width(){return nQ(t,e)},get height(){return n0(t,e)}})})}function n2(t){t.forEach(n1)}let n3=new Set;function n5(t,e){let i;return"function"==typeof t?(n3.add(t),r||(r=()=>{let t={get width(){return window.innerWidth},get height(){return window.innerHeight}};n3.forEach(e=>e(t))},window.addEventListener("resize",r)),()=>{n3.delete(t),n3.size||"function"!=typeof r||(window.removeEventListener("resize",r),r=void 0)}):(!n&&"u">typeof ResizeObserver&&(n=new ResizeObserver(n2)),(i=nX(t)).forEach(t=>{let i=nJ.get(t);i||(i=new Set,nJ.set(t,i)),i.add(e),n?.observe(t)}),()=>{i.forEach(t=>{let i=nJ.get(t);i?.delete(e),i?.size||n?.unobserve(t)})})}let n4=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),n8=new Set(["INPUT","SELECT","TEXTAREA"]),n6=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function n9(t){return{point:{x:t.pageX,y:t.pageY}}}function n7(t,e,i,n){return n$(t,e,t=>n6(t)&&i(t,n9(t)),n)}let rt=({current:t})=>t?t.ownerDocument.defaultView:null,re=(t,e)=>Math.abs(t-e),ri=new Set(["auto","scroll"]);class rn{constructor(t,e,{transformPagePoint:i,contextWindow:n=window,dragSnapToOrigin:r=!1,distanceThreshold:s=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=t=>{this.handleScroll(t.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{var t,e;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let i=ra(this.lastMoveEventInfo,this.history),n=null!==this.startEvent,r=(t=i.offset,e={x:0,y:0},Math.sqrt(re(t.x,e.x)**2+re(t.y,e.y)**2)>=this.distanceThreshold);if(!n&&!r)return;let{point:s}=i,{timestamp:a}=tM;this.history.push({...s,timestamp:a});let{onStart:o,onMove:l}=this.handlers;n||(o&&o(this.lastMoveEvent,i),this.startEvent=this.lastMoveEvent),l&&l(this.lastMoveEvent,i)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=rr(e,this.transformPagePoint),tk.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();let{onEnd:i,onSessionEnd:n,resumeAnimation:r}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&r&&r(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let s=ra("pointercancel"===t.type?this.lastMoveEventInfo:rr(e,this.transformPagePoint),this.history);this.startEvent&&i&&i(t,s),n&&n(t,s)},!n6(t))return;this.dragSnapToOrigin=r,this.handlers=e,this.transformPagePoint=i,this.distanceThreshold=s,this.contextWindow=n||window;const o=rr(n9(t),this.transformPagePoint),{point:l}=o,{timestamp:u}=tM;this.history=[{...l,timestamp:u}];const{onSessionStart:h}=e;h&&h(t,ra(o,this.history)),this.removeListeners=iM(n7(this.contextWindow,"pointermove",this.handlePointerMove),n7(this.contextWindow,"pointerup",this.handlePointerUp),n7(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let e=t.parentElement;for(;e;){let t=getComputedStyle(e);(ri.has(t.overflowX)||ri.has(t.overflowY))&&this.scrollPositions.set(e,{x:e.scrollLeft,y:e.scrollTop}),e=e.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){let e=this.scrollPositions.get(t);if(!e)return;let i=t===window,n=i?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},r={x:n.x-e.x,y:n.y-e.y};(0!==r.x||0!==r.y)&&(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(t,n),tk.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),tR(this.updatePoint)}}function rr(t,e){return e?{point:e(t.point)}:t}function rs(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ra({point:t},e){return{point:t,delta:rs(t,ro(e)),offset:rs(t,e[0]),velocity:function(t){if(t.length<2)return{x:0,y:0};let e=t.length-1,i=null,n=ro(t);for(;e>=0&&(i=t[e],!(n.timestamp-i.timestamp>tW(.1)));)e--;if(!i)return{x:0,y:0};i===t[0]&&t.length>2&&n.timestamp-i.timestamp>2*tW(.1)&&(i=t[1]);let r=(n.timestamp-i.timestamp)/1e3;if(0===r)return{x:0,y:0};let s={x:(n.x-i.x)/r,y:(n.y-i.y)/r};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}(e)}}function ro(t){return t[t.length-1]}function rl(t,e,i){return{min:void 0!==e?t.min+e:void 0,max:void 0!==i?t.max+i-(t.max-t.min):void 0}}function ru(t,e){let i=e.min-t.min,n=e.max-t.max;return e.max-e.min<t.max-t.min&&([i,n]=[n,i]),{min:i,max:n}}function rh(t,e,i){return{min:rd(t,e),max:rd(t,i)}}function rd(t,e){return"number"==typeof t?t:t[e]||0}let rc=new WeakMap;class rp{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=q(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:e=!1,distanceThreshold:i}={}){let{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;let r=t=>{e&&this.snapToCursor(n9(t).point),this.stopAnimation()},s=(t,e)=>{let{drag:i,dragPropagation:n,onDragStart:r}=this.getProps();if(i&&!n&&(this.openDragLock&&this.openDragLock(),this.openDragLock=function(t){if("x"===t||"y"===t)if(nF[t])return null;else return nF[t]=!0,()=>{nF[t]=!1};return nF.x||nF.y?null:(nF.x=nF.y=!0,()=>{nF.x=nF.y=!1})}(i),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),nB(t=>{let e=this.getAxisMotionValue(t).get()||0;if(b.test(e)){let{projection:i}=this.visualElement;if(i&&i.layout){let n=i.layout.layoutBox[t];
3n&&(e=nU(n)*(parseFloat(e)/100))}}this.originPoint[t]=e}),r&&tk.update(()=>r(t,e),!1,!0),ik(this.visualElement,"transform");let{animationState:s}=this.visualElement;s&&s.setActive("whileDrag",!0)},a=(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;let{dragPropagation:i,dragDirectionLock:n,onDirectionLock:r,onDrag:s}=this.getProps();if(!i&&!this.openDragLock)return;let{offset:a}=e;if(n&&null===this.currentDirection){this.currentDirection=function(t,e=10){let i=null;return Math.abs(t.y)>e?i="y":Math.abs(t.x)>e&&(i="x"),i}(a),null!==this.currentDirection&&r&&r(this.currentDirection);return}this.updateAxis("x",e.point,a),this.updateAxis("y",e.point,a),this.visualElement.render(),s&&tk.update(()=>s(t,e),!1,!0)},o=(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>{let{dragSnapToOrigin:t}=this.getProps();(t||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new rn(t,{onSessionStart:r,onStart:s,onMove:a,onSessionEnd:o,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:i,contextWindow:rt(this.visualElement),element:this.visualElement.current})}stop(t,e){let i=t||this.latestPointerEvent,n=e||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!n||!i)return;let{velocity:s}=n;this.startAnimation(s);let{onDragEnd:a}=this.getProps();a&&tk.postRender(()=>a(i,n))}cancel(){this.isDragging=!1;let{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,e,i){let{drag:n}=this.getProps();if(!i||!rf(t,n,this.currentDirection))return;let r=this.getAxisMotionValue(t),s=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(s=function(t,{min:e,max:i},n){return void 0!==e&&t<e?t=n?eI(e,t,n.min):Math.max(t,e):void 0!==i&&t>i&&(t=n?eI(i,t,n.max):Math.min(t,i)),t}(s,this.constraints[t],this.elastic[t])),r.set(s)}resolveConstraints(){let{dragConstraints:t,dragElastic:e}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;t&&iS(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=function(t,{top:e,left:i,bottom:n,right:r}){return{x:rl(t.x,i,r),y:rl(t.y,e,n)}}(i.layoutBox,t):this.constraints=!1,this.elastic=function(t=.35){return!1===t?t=0:!0===t&&(t=.35),{x:rh(t,"left","right"),y:rh(t,"top","bottom")}}(e),n!==this.constraints&&!iS(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&nB(t=>{var e,n;let r;!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=(e=i.layoutBox[t],n=this.constraints[t],r={},void 0!==n.min&&(r.min=n.min-e.min),void 0!==n.max&&(r.max=n.max-e.min),r))})}resolveRefConstraints(){var t;let{dragConstraints:e,onMeasureDragConstraints:i}=this.getProps();if(!e||!iS(e))return!1;let n=e.current;tr(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let s=function(t,e,i){let n=e1(t,i),{scroll:r}=e;return r&&(eJ(n.x,r.offset.x),eJ(n.y,r.offset.y)),n}(n,r.root,this.visualElement.getTransformPagePoint()),a=(t=r.layout.layoutBox,{x:ru(t.x,s.x),y:ru(t.y,s.y)});if(i){let t=i(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(a));this.hasMutatedConstraints=!!t,t&&(a=ez(t))}return a}startAnimation(t){let{drag:e,dragMomentum:i,dragElastic:n,dragTransition:r,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),o=this.constraints||{};return Promise.all(nB(a=>{if(!rf(a,e,this.currentDirection))return;let l=o&&o[a]||{};s&&(l={min:0,max:0});let u={type:"inertia",velocity:i?t[a]:0,bounceStiffness:n?200:1e6,bounceDamping:n?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...r,...l};return this.startAxisValueAnimation(a,u)})).then(a)}startAxisValueAnimation(t,e){let i=this.getAxisMotionValue(t);return ik(this.visualElement,t),i.start(nC(t,i,0,e,this.visualElement,!1))}stopAnimation(){nB(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){let e=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps();return i[e]||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){nB(e=>{let{drag:i}=this.getProps();if(!rf(e,i,this.currentDirection))return;let{projection:n}=this.visualElement,r=this.getAxisMotionValue(e);if(n&&n.layout){let{min:i,max:s}=n.layout.layoutBox[e],a=r.get()||0;r.set(t[e]-eI(i,s,.5)+a)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:e}=this.getProps(),{projection:i}=this.visualElement;if(!iS(e)||!i||!this.constraints)return;this.stopAnimation();let n={x:0,y:0};nB(t=>{let e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){var i,r;let s,a,l,u=e.get();n[t]=(i={min:u,max:u},r=this.constraints[t],s=.5,a=nU(i),(l=nU(r))>a?s=nd(r.min,r.max-a,i.min):a>l&&(s=nd(i.min,i.max-l,r.min)),o(0,1,s))}});let{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),nB(e=>{if(!rf(e,t,null))return;let i=this.getAxisMotionValue(e),{min:r,max:s}=this.constraints[e];i.set(eI(r,s,n[e]))}),this.visualElement.render()}addListeners(){let t;if(!this.visualElement.current)return;rc.set(this.visualElement,this);let e=this.visualElement.current,i=n7(e,"pointerdown",t=>{let{drag:i,dragListener:n=!0}
3=this.getProps(),r=t.target,s=r!==e&&(n8.has(r.tagName)||!0===r.isContentEditable);i&&n&&!s&&this.start(t)}),n=()=>{var i,n,r;let s,a,{dragConstraints:o}=this.getProps();iS(o)&&o.current&&(this.constraints=this.resolveRefConstraints(),t||(i=e,n=o.current,s=n5(i,rm(r=()=>this.scalePositionWithinConstraints())),a=n5(n,rm(r)),t=()=>{s(),a()}))},{projection:r}=this.visualElement,s=r.addEventListener("measure",n);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),tk.read(n);let a=n$(window,"resize",()=>this.scalePositionWithinConstraints()),o=r.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(nB(e=>{let i=this.getAxisMotionValue(e);i&&(this.originPoint[e]+=t[e].translate,i.set(i.get()+t[e].translate))}),this.visualElement.render())});return()=>{a(),i(),s(),o&&o(),t&&t()}}getProps(){let t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:i=!1,dragPropagation:n=!1,dragConstraints:r=!1,dragElastic:s=.35,dragMomentum:a=!0}=t;return{...t,drag:e,dragDirectionLock:i,dragPropagation:n,dragConstraints:r,dragElastic:s,dragMomentum:a}}}function rm(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function rf(t,e,i){return(!0===e||e===t)&&(null===i||i===t)}let rg=t=>(e,i)=>{t&&tk.update(()=>t(e,i),!1,!0)},ry={hasAnimatedSinceResize:!0,hasEverUpdated:!1};var rv=e3;function rx(t=!0){let e=(0,e3.useContext)(ih);if(null===e)return[!0,null];let{isPresent:i,onExitComplete:n,register:r}=e,s=(0,e3.useId)();(0,e3.useEffect)(()=>{if(t)return r(s)},[t]);let a=(0,e3.useCallback)(()=>t&&n&&n(s),[s,n,t]);return!i&&n?[!1,a]:[!0]}t.s(["usePresence",0,rx],503363);let rw=!1;class rb extends rv.Component{componentDidMount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i,layoutId:n}=this.props,{projection:r}=t;r&&(e.group&&e.group.add(r),i&&i.register&&n&&i.register(r),rw&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ry.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:e,visualElement:i,drag:n,isPresent:r}=this.props,{projection:s}=i;return s&&(s.isPresent=r,t.layoutDependency!==e&&s.setOptions({...s.options,layoutDependency:e}),rw=!0,n||t.layoutDependency!==e||void 0===e||t.isPresent!==r?s.willUpdate():this.safeToRemove(),t.isPresent!==r&&(r?s.promote():s.relegate()||tk.postRender(()=>{let t=s.getStack();t&&t.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),ee.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i}=this.props,{projection:n}=t;rw=!0,n&&(n.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(n),i&&i.deregister&&i.deregister(n))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}}function rS(t){let[e,i]=rx(),n=(0,rv.useContext)(e6);return(0,e8.jsx)(rb,{...t,layoutGroup:n,switchLayoutGroup:(0,rv.useContext)(ib),isPresent:e,safeToRemove:i})}let rE=["TopLeft","TopRight","BottomLeft","BottomRight"],rT=rE.length,rP=t=>"string"==typeof t?parseFloat(t):t,rA=t=>"number"==typeof t||S.test(t);function r_(t,e){return void 0!==t[e]?t[e]:t.borderRadius}let rC=rk(0,.5,no),rj=rk(.5,.95,tA);function rk(t,e,i){return n=>n<t?0:n>e?1:i(nd(t,e,n))}function rR(t,e){t.min=e.min,t.max=e.max}function rM(t,e){rR(t.x,e.x),rR(t.y,e.y)}function rD(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function rO(t,e,i,n,r){return t-=e,t=n+1/i*(t-n),void 0!==r&&(t=n+1/r*(t-n)),t}function rV(t,e,[i,n,r],s,a){!function(t,e=0,i=1,n=.5,r,s=t,a=t){if(b.test(e)&&(e=parseFloat(e),e=eI(a.min,a.max,e/100)-a.min),"number"!=typeof e)return;let o=eI(s.min,s.max,n);t===s&&(o-=e),t.min=rO(t.min,e,i,o,r),t.max=rO(t.max,e,i,o,r)}(t,e[i],e[n],e[r],e.scale,s,a)}let rL=["x","scaleX","originX"],rI=["y","scaleY","originY"];function rN(t,e,i,n){rV(t.x,e,rL,i?i.x:void 0,n?n.x:void 0),rV(t.y,e,rI,i?i.y:void 0,n?n.y:void 0)}function rB(t){return 0===t.translate&&1===t.scale}function r$(t){return rB(t.x)&&rB(t.y)}function rF(t,e){return t.min===e.min&&t.max===e.max}function rU(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function rz(t,e){return rU(t.x,e.x)&&rU(t.y,e.y)}function rG(t){return nU(t.x)/nU(t.y)}function rW(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class rY{constructor(){this.members=[]}add(t){tY(this.members,t);for(let e=this.members.length-1;e>=0;e--){let i=this.members[e];if(i===t||i===this.lead||i===this.prevLead)continue;let n=i.instance;n&&!1!==n.isConnected||i.snapshot||(tH(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(tH(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let t=this.members[this.members.length-1];t&&this.promote(t)}
3}relegate(t){for(let e=this.members.indexOf(t)-1;e>=0;e--){let t=this.members[e];if(!1!==t.isPresent&&t.instance?.isConnected!==!1)return this.promote(t),!0}return!1}promote(t,e){let i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.updateSnapshot(),t.scheduleRender();let{layoutDependency:n}=i.options,{layoutDependency:r}=t.options;(void 0===n||n!==r)&&(t.resumeFrom=i,e&&(i.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),!1===t.options.crossfade&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}let rH=(t,e)=>t.depth-e.depth;class rK{constructor(){this.children=[],this.isDirty=!1}add(t){tY(this.children,t),this.isDirty=!0}remove(t){tH(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(rH),this.isDirty=!1,this.children.forEach(t)}}let rq=["","X","Y","Z"],rX=0;function rJ(t,e,i,n){let{latestValues:r}=e;r[t]&&(i[t]=r[t],e.setStaticValue(t,0),n&&(n[t]=0))}function rZ({attachResizeListener:t,defaultParent:e,measureScroll:i,checkIsScrollRoot:n,resetTransform:r}){return class{constructor(t={},i=e?.()){this.id=rX++,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(r1),this.nodes.forEach(r9),this.nodes.forEach(r7),this.nodes.forEach(r2)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new rK)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new tK),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){let i=this.eventHandlers.get(t);i&&i.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=nq(e)&&!(nq(e)&&"svg"===e.tagName),this.instance=e;let{layoutId:i,layout:n,visualElement:r}=this.options;if(r&&!r.current&&r.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(n||i)&&(this.isLayoutDirty=!0),t){let i,n=0,r=()=>this.root.updateBlockedByResize=!1;tk.read(()=>{n=window.innerWidth}),t(e,()=>{let t=window.innerWidth;if(t!==n){let e,s;n=t,this.root.updateBlockedByResize=!0,i&&i(),e=en.now(),s=({timestamp:t})=>{let i=t-e;i>=250&&(tR(s),r(i-250))},tk.setup(s,!0),i=()=>tR(s),ry.hasAnimatedSinceResize&&(ry.hasAnimatedSinceResize=!1,this.nodes.forEach(r6))}})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&r&&(i||n)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:i,layout:n})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let s=this.options.transition||r.getDefaultTransition()||ss,{onLayoutAnimationStart:a,onLayoutAnimationComplete:o}=r.getProps(),l=!this.targetLayout||!rz(this.targetLayout,n),u=!e&&i;if(this.options.layoutRoot||this.resumeFrom||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let e={...iC(s,"layout"),onPlay:a,onComplete:o};(r.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,u)}else e||r6(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=n})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),tR(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.forEac
3h(st),this.animationId++)}getTransformTemplate(){let{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function t(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:i}=e.options;if(!i)return;let n=i.props[iw];if(window.MotionHasOptimisedAnimation(n,"transform")){let{layout:t,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",tk,!(t||i))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&t(r)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){let e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}let{layoutId:e,layout:i}=this.options;if(void 0===e&&!i)return;let n=this.getTransformTemplate();this.prevTransformTemplateValue=n?n(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(r5);return}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(r4);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(r8),this.nodes.forEach(rQ),this.nodes.forEach(r0)):this.nodes.forEach(r4),this.clearAllSnapshots();let t=en.now();tM.delta=o(0,1e3/60,t-tM.timestamp),tM.timestamp=t,tM.isProcessing=!0,tD.update.process(tM),tD.preRender.process(tM),tD.render.process(tM),tM.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ee.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(r3),this.sharedNodes.forEach(se)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,tk.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){tk.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||nU(this.snapshot.measuredBox.x)||nU(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 t=0;t<this.path.length;t++)this.path[t].updateScroll();let t=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=q(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){let e=n(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!r)return;let t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!r$(this.projectionDelta),i=this.getTransformTemplate(),n=i?i(this.latestValues,""):void 0,s=n!==this.prevTransformTemplateValue;t&&this.instance&&(e||eY(this.latestValues)||s)&&(r(this.instance,n),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){var e;let i=this.measurePageBox(),n=this.removeElementScroll(i);return t&&(n=this.removeTransform(n)),sl((e=n).x),sl(e.y),{animationId:this.root.animationId,measuredBox:i,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:t}=this.options;if(!t)return q();let e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(sh))){let{scroll:t}=this.root;t&&(eJ(e.x,t.offset.x),eJ(e.y,t.offset.y))}return e}removeElementScroll(t){let e=q();if(rM(e,t),this.scroll?.wasRoot)return e;for(let i=0;i<this.path.length;i++){let n=this.path[i],{scroll:r,options:s}=n;n!==this.root&&r&&s.layoutScroll&&(r.wasRoot&&rM(e,t),eJ(e.x,r.offset.x),eJ(e.y,r.offset.y))}return e}applyTransform(t,e=!1){let i=q();rM(i,t);for(let t=0;t<this.path.length;t++){let n=this.path[t];!e&&n.options.layoutScroll&&n.scroll&&n!==n.root&&e0(i,{x:-n.scroll.offset.x,y:-n.scroll.offset.y}),eY(n.latestValues)&&e0(i,n.latestValues)}return eY(this.latestValues)&&e0(i,this.latestValues),i}removeTransform(t){let e=q();rM(e,t);for(let t=0;t<this.path.length;t++){let i=this.path[t];if(!i.instance||!eY(i.latestValues))continue;eW(i.latestValues)&&i.updateSnapshot();let n=q();rM(n,i.measurePageBox()),rN(e,i.latestValues,i.snapshot?i.snapshot.layoutBox:void 0,n)}return eY(this.latestValues)&&rN(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}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!==tM.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){let e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);let i=!!this.resumingFrom||this!==e;if(!(t||i&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:n,layoutId:r}=this.options;if(!this.layout||!(n||r))return;this.resolvedRelativeTargetAt=tM.timestamp;let s=this.getClosestProjectingParent();if(s&&this.linkedParentVersion!==s.layoutVersion&&!s.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(s&&s.layout?this.createRelativeTarget(s,this.layout.layoutBox,s.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta){if(this.target||(this.target=q(),this.targetWithTransforms=q()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target){var a,o,l;this.forceRelativeParentToResolveTarget(),a=this.target,o=this.relativeTarget,l=this.relativeParent.target,nW(a.x,o.x,l.x),nW(a.y,o.y,l.y)}else this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):rM(this.target,this.layout.layoutBox),eX(this.target,this.targetDelta)):rM(this.target,this.layout.layoutBox);this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,s&&!!s.resumingFrom==!!this.resumingFrom&&!s.options.layoutScroll&&s.target&&1!==this.animationProgress?this.createRelativeTarget(s,this.target,s.target):this.relativeParent=this.relativeTarget=void 0)}}getClosestProjectingParent(){if(!(!this.parent||eW(this.parent.latestValues)||eH(this.parent.latestValues)))if(this.parent.isProjecting())return this.parent;else return this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(t,e,i){this.relativeParent=t,this.linkedParentVersion=t.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=q(),this.relativeTargetOrigin=q(),nH(this.relativeTargetOrigin,e,i),rM(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let t=this.getLead(),e=!!this.resumingFrom||this!==t,i=!0;
3if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(i=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===tM.timestamp&&(i=!1),i)return;let{layout:n,layoutId:r}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(n||r))return;rM(this.layoutCorrected,this.layout.layoutBox);let s=this.treeScale.x,a=this.treeScale.y;!function(t,e,i,n=!1){let r,s,a=i.length;if(a){e.x=e.y=1;for(let o=0;o<a;o++){s=(r=i[o]).projectionDelta;let{visualElement:a}=r.options;(!a||!a.props.style||"contents"!==a.props.style.display)&&(n&&r.options.layoutScroll&&r.scroll&&r!==r.root&&e0(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,eX(t,s)),n&&eY(r.latestValues)&&e0(t,r.latestValues))}e.x<1.0000000000001&&e.x>.999999999999&&(e.x=1),e.y<1.0000000000001&&e.y>.999999999999&&(e.y=1)}}(this.layoutCorrected,this.treeScale,this.path,e),t.layout&&!t.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(t.target=t.layout.layoutBox,t.targetWithTransforms=q());let{target:o}=t;if(!o){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(rD(this.prevProjectionDelta.x,this.projectionDelta.x),rD(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),nG(this.projectionDelta,this.layoutCorrected,o,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&rW(this.projectionDelta.x,this.prevProjectionDelta.x)&&rW(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",o))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){let t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=H(),this.projectionDelta=H(),this.projectionDeltaWithTransform=H()}setAnimationOrigin(t,e=!1){let i,n=this.snapshot,r=n?n.latestValues:{},s={...this.latestValues},a=H();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;let o=q(),l=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),u=this.getStack(),h=!u||u.members.length<=1,d=!!(l&&!h&&!0===this.options.crossfade&&!this.path.some(sr));this.animationProgress=0,this.mixTargetDelta=e=>{let n=e/1e3;if(si(a.x,t.x,n),si(a.y,t.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var u,c,p,m,f,g;nH(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,f=o,g=n,sn(p.x,m.x,f.x,g),sn(p.y,m.y,f.y,g),i&&(u=this.relativeTarget,c=i,rF(u.x,c.x)&&rF(u.y,c.y))&&(this.isProjectionDirty=!1),i||(i=q()),rM(i,this.relativeTarget)}l&&(this.animationValues=s,function(t,e,i,n,r,s){r?(t.opacity=eI(0,i.opacity??1,rC(n)),t.opacityExit=eI(e.opacity??1,0,rj(n))):s&&(t.opacity=eI(e.opacity??1,i.opacity??1,n));for(let r=0;r<rT;r++){let s=`border${rE[r]}Radius`,a=r_(e,s),o=r_(i,s);(void 0!==a||void 0!==o)&&(a||(a=0),o||(o=0),0===a||0===o||rA(a)===rA(o)?(t[s]=Math.max(eI(rP(a),rP(o),n),0),(b.test(o)||b.test(a))&&(t[s]+="%")):t[s]=o)}(e.rotate||i.rotate)&&(t.rotate=eI(e.rotate||0,i.rotate||0,n))}(s,r,this.latestValues,n,d,h)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(1e3*!!this.options.layoutRoot)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(tR(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=tk.update(()=>{var e,i,n;let r;ry.hasAnimatedSinceResize=!0,t2.layout++,this.motionValue||(this.motionValue=es(0)),this.motionValue.jump(0,!1),this.currentAnimation=(e=this.motionValue,i=[0,1e3],n={...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{t2.layout--},onComplete:()=>{t2.layout--,t.onComplete&&t.onComplete(),this.completeAnimation()}},(r=X(e)?e:es(e)).start(nC("",r,i,n)),r.animation),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let t=this.getLead(),{targetWithTransforms:e,target:i,layout:n,latestValues:r}=t;if(e&&i&&n){if(this!==t&&this.layout&&n&&su(this.options.animationType,this.layout.layoutBox,n.layoutBox)){i=this.target||q();let e=nU(this.layout.layoutBox.x);i.x.min=t.target.x.min,i.x.max=i.x.min+e;let n=nU(this.layout.layoutBox.y);i.y.min=t.target.y.min,i.y.max=i.y.min+n}rM(e,i),e0(e,r),nG(this.projectionDeltaWithTransform,this.layoutCorrected,e,r)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new rY),this.sharedNodes.get(t).add(e);let i=e.options.initialPromotionConfig;e.promote({transition:i?i.transition:void 0,preserveFollowOpacity:i&&i.shouldPreserveFollowOpacity?i.shouldPreserveFollowOpacity(e):void 0})}isLead(){let t=this.getStack();return!t||t.lead===this}getLead(){let{layoutId:t}=this.options;
3return t&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:i}={}){let n=this.getStack();n&&n.promote(this,i),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){let t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){let{visualElement:t}=this.options;if(!t)return;let e=!1,{latestValues:i}=t;if((i.z||i.rotate||i.rotateX||i.rotateY||i.rotateZ||i.skewX||i.skewY)&&(e=!0),!e)return;let n={};i.z&&rJ("z",t,n,this.animationValues);for(let e=0;e<rq.length;e++)rJ(`rotate${rq[e]}`,t,n,this.animationValues),rJ(`skew${rq[e]}`,t,n,this.animationValues);for(let e in t.render(),n)t.setStaticValue(e,n[e]),this.animationValues&&(this.animationValues[e]=n[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;if(!this.isVisible){t.visibility="hidden";return}let i=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=iu(e?.pointerEvents)||"",t.transform=i?i(this.latestValues,""):"none";return}let n=this.getLead();if(!this.projectionDelta||!this.layout||!n.target){this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=iu(e?.pointerEvents)||""),this.hasProjected&&!eY(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1);return}t.visibility="";let r=n.animationValues||n.latestValues;this.applyTransformsToTarget();let s=function(t,e,i){let n="",r=t.x.translate/e.x,s=t.y.translate/e.y,a=i?.z||0;if((r||s||a)&&(n=`translate3d(${r}px, ${s}px, ${a}px) `),(1!==e.x||1!==e.y)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),i){let{transformPerspective:t,rotate:e,rotateX:r,rotateY:s,skewX:a,skewY:o}=i;t&&(n=`perspective(${t}px) ${n}`),e&&(n+=`rotate(${e}deg) `),r&&(n+=`rotateX(${r}deg) `),s&&(n+=`rotateY(${s}deg) `),a&&(n+=`skewX(${a}deg) `),o&&(n+=`skewY(${o}deg) `)}let o=t.x.scale*e.x,l=t.y.scale*e.y;return(1!==o||1!==l)&&(n+=`scale(${o}, ${l})`),n||"none"}(this.projectionDeltaWithTransform,this.treeScale,r);i&&(s=i(r,s)),t.transform=s;let{x:a,y:o}=this.projectionDelta;for(let e in t.transformOrigin=`${100*a.origin}% ${100*o.origin}% 0`,n.animationValues?t.opacity=n===this?r.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:r.opacityExit:t.opacity=n===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0,eN){if(void 0===r[e])continue;let{correct:i,applyTo:a,isCSSVariable:o}=eN[e],l="none"===s?r[e]:i(r[e],n);if(a){let e=a.length;for(let i=0;i<e;i++)t[a[i]]=l}else o?this.options.visualElement.renderState.vars[e]=l:t[e]=l}this.options.layoutId&&(t.pointerEvents=n===this?iu(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(r5),this.root.sharedNodes.clear()}}}function rQ(t){t.updateLayout()}function r0(t){let e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){let{layoutBox:i,measuredBox:n}=t.layout,{animationType:r}=t.options,s=e.source!==t.layout.source;"size"===r?nB(t=>{let n=s?e.measuredBox[t]:e.layoutBox[t],r=nU(n);n.min=i[t].min,n.max=n.min+r}):su(r,e.layoutBox,i)&&nB(n=>{let r=s?e.measuredBox[n]:e.layoutBox[n],a=nU(i[n]);r.max=r.min+a,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[n].max=t.relativeTarget[n].min+a)});let a=H();nG(a,i,e.layoutBox);let o=H();s?nG(o,t.applyTransform(n,!0),e.measuredBox):nG(o,i,e.layoutBox);let l=!r$(a),u=!1;if(!t.resumeFrom){let n=t.getClosestProjectingParent();if(n&&!n.resumeFrom){let{snapshot:r,layout:s}=n;if(r&&s){let a=q();nH(a,e.layoutBox,r.layoutBox);let o=q();nH(o,i,s.layoutBox),rz(a,o)||(u=!0),n.options.layoutRoot&&(t.relativeTarget=o,t.relativeTargetOrigin=a,t.relativeParent=n)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:e,delta:o,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){let{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function r1(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.
3isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function r2(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function r3(t){t.clearSnapshot()}function r5(t){t.clearMeasurements()}function r4(t){t.isLayoutDirty=!1}function r8(t){let{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function r6(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function r9(t){t.resolveTargetDelta()}function r7(t){t.calcProjection()}function st(t){t.resetSkewAndRotation()}function se(t){t.removeLeadSnapshot()}function si(t,e,i){t.translate=eI(e.translate,0,i),t.scale=eI(e.scale,1,i),t.origin=e.origin,t.originPoint=e.originPoint}function sn(t,e,i,n){t.min=eI(e.min,i.min,n),t.max=eI(e.max,i.max,n)}function sr(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}let ss={duration:.45,ease:[.4,0,.1,1]},sa=t=>"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),so=sa("applewebkit/")&&!sa("chrome/")?Math.round:tA;function sl(t){t.min=so(t.min),t.max=so(t.max)}function su(t,e,i){return"position"===t||"preserve-aspect"===t&&!(.2>=Math.abs(rG(e)-rG(i)))}function sh(t){return t!==t.root&&t.scroll?.wasRoot}let sd=rZ({attachResizeListener:(t,e)=>n$(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),sc={current:void 0},sp=rZ({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!sc.current){let t=new sd({});t.mount(window),t.setOptions({layoutScroll:!0}),sc.current=t}return sc.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>"fixed"===window.getComputedStyle(t).position});function sm(t,e){let i=nX(t),n=new AbortController;return[i,{passive:!0,...e,signal:n.signal},()=>n.abort()]}function sf(t,e,i){let{props:n}=t;t.animationState&&n.whileHover&&t.animationState.setActive("whileHover","Start"===i);let r=n["onHover"+i];r&&tk.postRender(()=>r(e,n9(e)))}function sg(t){return nK(t)&&"offsetHeight"in t}t.s(["isHTMLElement",0,sg],421216);let sy=(t,e)=>!!e&&(t===e||sy(t,e.parentElement)),sv=new WeakSet;function sx(t){return e=>{"Enter"===e.key&&t(e)}}function sw(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function sb(t){return n6(t)&&!(nF.x||nF.y)}let sS=new WeakSet;function sE(t,e,i){let{props:n}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&n.whileTap&&t.animationState.setActive("whileTap","Start"===i);let r=n["onTap"+("End"===i?"":i)];r&&tk.postRender(()=>r(e,n9(e)))}let sT=new WeakMap,sP=new WeakMap,sA=t=>{let e=sT.get(t.target);e&&e(t)},s_=t=>{t.forEach(sA)},sC={some:0,all:1},sj=function(t,e){if("u"<typeof Proxy)return iT;let i=new Map,n=(i,n)=>iT(i,n,t,e);return new Proxy((t,e)=>n(t,e),{get:(r,s)=>"create"===s?n:(i.has(s)||i.set(s,iT(s,void 0,t,e)),i.get(s))})}({animation:{Feature:class extends iP{constructor(t){super(t),t.animationState||(t.animationState=function(t){let e=e=>Promise.all(e.map(({animation:e,options:i})=>(function(t,e,i={}){let n;if(t.notify("AnimationStart",e),Array.isArray(e))n=Promise.all(e.map(e=>nR(t,e,i)));else if("string"==typeof e)n=nR(t,e,i);else{let r="function"==typeof e?iA(t,e,i.custom):e;n=Promise.all(nj(t,r,i))}return n.then(()=>{t.notify("AnimationComplete",e)})})(t,e,i))),i=nI(),n=!0,r=!1,s=e=>(i,n)=>{let r=iA(t,n,"exit"===e?t.presenceContext?.custom:void 0);if(r){let{transition:t,transitionEnd:e,...n}=r;i={...i,...n,...e}}return i};function a(a){let{props:o}=t,l=function t(e){if(!e)return;if(!e.isControllingVariants){let i=e.parent&&t(e.parent)||{};return void 0!==e.props.initial&&(i.initial=e.props.initial),i}let i={};for(let t=0;t<nM;t++){let n=ed[t],r=e.props[n];(eu(r)||!1===r)&&(i[n]=r)}return i}(t.parent)||{},u=[],h=new Set,d={},c=1/0;for(let e=0;e<nV;e++){var p,m;let f=nO[e],g=i[f],y=void 0!==o[f]?o[f]:l[f],v=eu(y),x=f===a?g.isActive:null;!1===x&&(c=e);let w=y===l[f]&&y!==o[f]&&v;if(w&&(n||r)&&t.manuallyAnimateOnMount&&(w=!1),g.protectedKeys={...d},!g.isActive&&null===x||!y&&!g.prevProp||el(y)||"boolean"==typeof y)continue;if("exit"===f&&g.isActive&&!0!==x){g.prevResolvedValues&&(d={...d,...g.prevResolvedValues});continue}let b=(p=g.prevProp,"string"==typeof(m=y)?m!==p:!!Array.isArray(m)&&!nD(m,p)),S=b||f===a&&g.isActive&&!w&&v||e>c&&v,E=!1,T=Array.isArray(y)?y:[y],P=T.reduce(s(f),{});!1===x&&(P={});let{prevResolvedValues:A={}}=g,_={...A,...P},C=e=>{S=!0,h.has(e)&&(E=!0,h.delete(e)),g.needsAnimating[e]=!0;let i=t.getValue(e);
3i&&(i.liveStyle=!1)};for(let t in _){let e=P[t],i=A[t];if(!d.hasOwnProperty(t))(ij(e)&&ij(i)?nD(e,i):e===i)?void 0!==e&&h.has(t)?C(t):g.protectedKeys[t]=!0:null!=e?C(t):h.add(t)}g.prevProp=y,g.prevResolvedValues=P,g.isActive&&(d={...d,...P}),(n||r)&&t.blockInitialAnimation&&(S=!1);let j=w&&b,k=!j||E;S&&k&&u.push(...T.map(e=>{let i={type:f};if("string"==typeof e&&(n||r)&&!j&&t.manuallyAnimateOnMount&&t.parent){let{parent:n}=t,r=iA(n,e);if(n.enteringChildren&&r){let{delayChildren:e}=r.transition||{};i.delay=nk(n.enteringChildren,t,e)}}return{animation:e,options:i}}))}if(h.size){let e={};if("boolean"!=typeof o.initial){let i=iA(t,Array.isArray(o.initial)?o.initial[0]:o.initial);i&&i.transition&&(e.transition=i.transition)}h.forEach(i=>{let n=t.getBaseTarget(i),r=t.getValue(i);r&&(r.liveStyle=!0),e[i]=n??null}),u.push({animation:e})}let f=!!u.length;return n&&(!1===o.initial||o.initial===o.animate)&&!t.manuallyAnimateOnMount&&(f=!1),n=!1,r=!1,f?e(u):Promise.resolve()}return{animateChanges:a,setActive:function(e,n){if(i[e].isActive===n)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,n)),i[e].isActive=n;let r=a(e);for(let t in i)i[t].protectedKeys={};return r},setAnimateFunction:function(i){e=i(t)},getState:()=>i,reset:()=>{i=nI(),r=!0}}}(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();el(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends iP{constructor(){super(...arguments),this.id=nN++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;let n=this.node.animationState.setActive("exit",!t);e&&!t&&n.then(()=>{e(this.id)})}mount(){let{register:t,onExitComplete:e}=this.node.presenceContext||{};
3e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}},inView:{Feature:class extends iP{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var t;let e;this.unmount();let{viewport:i={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:a}=i,o={root:n?n.current:void 0,rootMargin:r,threshold:"number"==typeof s?s:sC[s]},l=t=>{let{isIntersecting:e}=t;if(this.isInView===e||(this.isInView=e,a&&!e&&this.hasEnteredView))return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);let{onViewportEnter:i,onViewportLeave:n}=this.node.getProps(),r=e?i:n;r&&r(t)};return t=this.node.current,e=function({root:t,...e}){let i=t||document;sP.has(i)||sP.set(i,{});let n=sP.get(i),r=JSON.stringify(e);return n[r]||(n[r]=new IntersectionObserver(s_,{root:t,...e})),n[r]}(o),sT.set(t,l),e.observe(t),()=>{sT.delete(t),e.unobserve(t)}}mount(){this.startObserver()}update(){if("u"<typeof IntersectionObserver)return;let{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return i=>t[i]!==e[i]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends iP{mount(){let{current:t}=this.node;if(!t)return;let{globalTapTarget:e,propagate:i}=this.node.props;this.unmount=function(t,e,i={}){let[n,r,s]=sm(t,i),a=t=>{let n=t.currentTarget;if(!sb(t)||sS.has(t))return;sv.add(n),i.stopPropagation&&sS.add(t);let s=e(n,t),a=(t,e)=>{window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",l),sv.has(n)&&sv.delete(n),sb(t)&&"function"==typeof s&&s(t,{success:e})},o=t=>{a(t,n===window||n===document||i.useGlobalTarget||sy(n,t.target))},l=t=>{a(t,!1)};window.addEventListener("pointerup",o,r),window.addEventListener("pointercancel",l,r)};return n.forEach(t=>{((i.useGlobalTarget?window:t).addEventListener("pointerdown",a,r),sg(t))&&(t.addEventListener("focus",t=>((t,e)=>{let i=t.currentTarget;if(!i)return;let n=sx(()=>{if(sv.has(i))return;sw(i,"down");let t=sx(()=>{sw(i,"up")});i.addEventListener("keyup",t,e),i.addEventListener("blur",()=>sw(i,"cancel"),e)});i.addEventListener("keydown",n,e),i.addEventListener("blur",()=>i.removeEventListener("keydown",n),e)})(t,r)),n4.has(t.tagName)||!0===t.isContentEditable||t.hasAttribute("tabindex")||(t.tabIndex=0))}),s}(t,(t,e)=>(sE(this.node,e,"Start"),(t,{success:e})=>sE(this.node,t,e?"End":"Cancel")),{useGlobalTarget:e,stopPropagation:i?.tap===!1})}unmount(){}}},focus:{Feature:class extends iP{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){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=iM(n$(this.node.current,"focus",()=>this.onFocus()),n$(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends iP{mount(){let{current:t}=this.node;t&&(this.unmount=function(t,e,i={}){let[n,r,s]=sm(t,i);return n.forEach(t=>{let i,n=!1,s=!1,a=e=>{i&&(i(e),i=void 0),t.removeEventListener("pointerleave",l)},o=t=>{n=!1,window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",o),s&&(s=!1,a(t))},l=t=>{if("touch"!==t.pointerType){if(n){s=!0;return}a(t)}};t.addEventListener("pointerenter",n=>{if("touch"===n.pointerType||nF.x||nF.y)return;s=!1;let a=e(t,n);"function"==typeof a&&(i=a,t.addEventListener("pointerleave",l,r))},r),t.addEventListener("pointerdown",()=>{n=!0,window.addEventListener("pointerup",o,r),window.addEventListener("pointercancel",o,r)},r)}),s}(t,(t,e)=>(sf(this.node,e,"Start"),t=>sf(this.node,t,"End"))))}unmount(){}}},pan:{Feature:class extends iP{constructor(){super(...arguments),this.removePointerDownListener=tA}onPointerDown(t){this.session=new rn(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:rt(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:e,onPan:i,onPanEnd:n}=this.node.getProps();return{onSessionStart:rg(t),onStart:rg(e),onMove:rg(i),onEnd:(t,e)=>{delete this.session,n&&tk.postRender(()=>n(t,e))}}}mount(){this.removePointerDownListener=n7(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends iP{constructor(t){super(t),this.removeGroupControls=tA,this.removeListeners=tA,this.controls=new rp(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||tA}update(){let{dragControls:t}=this.node.getProps(),{dragControls:e}=this.node.prevProps||{};t!==e&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:sp,MeasureLayout:rS},layout:{ProjectionNode:sp,MeasureLayout:rS}},(t,e)=>e.isSVG??e4(t)?new eU(e):new e2(e,{allowProjection:t!==e3.Fragment}));t.s(["motion",0,sj],935691)},195032,953938,144626,957517,518074,t=>{"use strict";t.i(639057);var e=t.i(848277),i=t.i(330668),n=t.i(417886),r=t.i(696134),s=t.i(885205);t.i(165429);var a=t.i(952443),o=t.i(125673),l=t.i(54976),u=t.i(272596),h=t.i(717560),d=t.i(280218),c=t.i(948185),p=t.i(212183),m=t.i(958600),f=t.i(442588),g=t.i(696086),y=t.i(307203),v=t.i(935691),x=t.i(256298),w=t.i(150772),b=t.i(153899),S=t.i(808812),E=t.i(421216),T=i,P=t.i(543533);function A(t,e){if("function"==typeof t)return t(e);null!=t&&(t.current=e)}class _ extends T.Component{getSnapshotBeforeUpdate(t){let e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent&&!1!==this.props.pop){let t=e.offsetParent,
3i=(0,E.isHTMLElement)(t)&&t.offsetWidth||0,n=(0,E.isHTMLElement)(t)&&t.offsetHeight||0,r=this.props.sizeRef.current;r.height=e.offsetHeight||0,r.width=e.offsetWidth||0,r.top=e.offsetTop,r.left=e.offsetLeft,r.right=i-r.width-r.left,r.bottom=n-r.height-r.top}return null}componentDidUpdate(){}render(){return this.props.children}}function C({children:t,isPresent:n,anchorX:r,anchorY:s,root:a,pop:o}){let l=(0,T.useId)(),u=(0,T.useRef)(null),h=(0,T.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:d}=(0,T.useContext)(P.MotionConfigContext),c=function(...t){return i.useCallback(function(...t){return e=>{let i=!1,n=t.map(t=>{let n=A(t,e);return i||"function"!=typeof n||(i=!0),n});if(i)return()=>{for(let e=0;e<n.length;e++){let i=n[e];"function"==typeof i?i():A(t[e],null)}}}}(...t),t)}(u,t.props?.ref??t?.ref);return(0,T.useInsertionEffect)(()=>{let{width:t,height:e,top:i,left:c,right:p,bottom:m}=h.current;if(n||!1===o||!u.current||!t||!e)return;let f="left"===r?`left: ${c}`:`right: ${p}`,g="bottom"===s?`bottom: ${m}`:`top: ${i}`;u.current.dataset.motionPopId=l;let y=document.createElement("style");d&&(y.nonce=d);let v=a??document.head;return v.appendChild(y),y.sheet&&y.sheet.insertRule(`
4          [data-motion-pop-id="${l}"] {
5            position: absolute !important;
6            width: ${t}px !important;
7            height: ${e}px !important;
8            ${f}px !important;
9            ${g}px !important;
10          }
11        `),()=>{v.contains(y)&&v.removeChild(y)}},[n]),(0,e.jsx)(_,{isPresent:n,childRef:u,sizeRef:h,pop:o,children:!1===o?t:T.cloneElement(t,{ref:c})})}let j=({children:t,initial:n,isPresent:r,onExitComplete:s,custom:a,presenceAffectsLayout:o,mode:l,anchorX:u,anchorY:h,root:d})=>{let c=(0,w.useConstant)(k),p=(0,i.useId)(),m=!0,f=(0,i.useMemo)(()=>(m=!1,{id:p,initial:n,isPresent:r,custom:a,onExitComplete:t=>{for(let e of(c.set(t,!0),c.values()))if(!e)return;s&&s()},register:t=>(c.set(t,!1),()=>c.delete(t))}),[r,c,s]);return o&&m&&(f={...f}),(0,i.useMemo)(()=>{c.forEach((t,e)=>c.set(e,!1))},[r]),i.useEffect(()=>{r||c.size||!s||s()},[r]),t=(0,e.jsx)(C,{pop:"popLayout"===l,isPresent:r,anchorX:u,anchorY:h,root:d,children:t}),(0,e.jsx)(S.PresenceContext.Provider,{value:f,children:t})};function k(){return new Map}var R=t.i(503363);let M=t=>t.key||"";function D(t){let e=[];return i.Children.forEach(t,t=>{(0,i.isValidElement)(t)&&e.push(t)}),e}let O=({children:t,custom:n,initial:r=!0,onExitComplete:s,presenceAffectsLayout:a=!0,mode:o="sync",propagate:l=!1,anchorX:u="left",anchorY:h="top",root:d})=>{let[c,p]=(0,R.usePresence)(l),m=(0,i.useMemo)(()=>D(t),[t]),f=l&&!c?[]:m.map(M),g=(0,i.useRef)(!0),y=(0,i.useRef)(m),v=(0,w.useConstant)(()=>new Map),S=(0,i.useRef)(new Set),[E,T]=(0,i.useState)(m),[P,A]=(0,i.useState)(m);(0,b.useIsomorphicLayoutEffect)(()=>{g.current=!1,y.current=m;for(let t=0;t<P.length;t++){let e=M(P[t]);f.includes(e)?(v.delete(e),S.current.delete(e)):!0!==v.get(e)&&v.set(e,!1)}},[P,f.length,f.join("-")]);let _=[];if(m!==E){let t=[...m];for(let e=0;e<P.length;e++){let i=P[e],n=M(i);f.includes(n)||(t.splice(e,0,i),_.push(i))}return"wait"===o&&_.length&&(t=_),A(D(t)),T(m),null}let{forceRender:C}=(0,i.useContext)(x.LayoutGroupContext);return(0,e.jsx)(e.Fragment,{children:P.map(t=>{let i=M(t),x=(!l||!!c)&&(m===P||f.includes(i));return(0,e.jsx)(j,{isPresent:x,initial:(!g.current||!!r)&&void 0,custom:n,presenceAffectsLayout:a,mode:o,root:d,onExitComplete:x?void 0:()=>{if(S.current.has(i)||(S.current.add(i),!v.has(i)))return;v.set(i,!0);let t=!0;v.forEach(e=>{e||(t=!1)}),t&&(C?.(),A(y.current),l&&p?.(),s&&s())},anchorX:u,anchorY:h,children:t},i)})})};t.s(["AnimatePresence",0,O],953938);var V=t.i(531261),L=t.i(235884);let I=(0,L.default)("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);function N(t){return Array.isArray(t)||"object"==typeof t&&null!==t}function B({toolCalls:t}){return t&&0!==t.length?(0,e.jsx)("div",{className:"space-y-4 w-full max-w-4xl",children:t.map((t,i)=>{let n=t.args,r=Object.keys(n).length>0;return(0,e.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[(0,e.jsx)("div",{className:"bg-gray-50 px-4 py-2 border-b border-gray-200",children:(0,e.jsxs)("h3",{className:"font-medium text-gray-900",children:[t.name,t.id&&
11(0,e.jsx)("code",{className:"ml-2 text-sm bg-gray-100 px-2 py-1 rounded",children:t.id})]})}),r?(0,e.jsx)("table",{className:"min-w-full divide-y divide-gray-200",children:(0,e.jsx)("tbody",{className:"divide-y divide-gray-200",children:Object.entries(n).map(([t,i],n)=>(0,e.jsxs)("tr",{children:[(0,e.jsx)("td",{className:"px-4 py-2 text-sm font-medium text-gray-900 whitespace-nowrap",children:t}),(0,e.jsx)("td",{className:"px-4 py-2 text-sm text-gray-500",children:N(i)?(0,e.jsx)("code",{className:"bg-gray-50 rounded px-2 py-1 font-mono text-sm break-all",children:JSON.stringify(i,null,2)}):String(i)})]},n))})}):(0,e.jsx)("code",{className:"text-sm block p-3",children:"{}"})]},i)})}):null}function $({message:t}){let n,[r,s]=(0,i.useState)(!1),a=!1;try{"string"==typeof t.content&&(n=JSON.parse(t.content),a=!0)}catch{n=t.content}let o=a?JSON.stringify(n,null,2):String(t.content),l=o.split("\n"),u=l.length>4||o.length>500,h=u&&!r?o.length>500?o.slice(0,500)+"...":l.slice(0,4).join("\n")+"\n...":o;return(0,e.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:[(0,e.jsx)("div",{className:"bg-gray-50 px-4 py-2 border-b border-gray-200",children:(0,e.jsxs)("div",{className:"flex items-center justify-between gap-2 flex-wrap",children:[t.name?(0,e.jsxs)("h3",{className:"font-medium text-gray-900",children:["Tool Result:"," ",(0,e.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:t.name})]}):(0,e.jsx)("h3",{className:"font-medium text-gray-900",children:"Tool Result"}),t.tool_call_id&&(0,e.jsx)("code",{className:"ml-2 text-sm bg-gray-100 px-2 py-1 rounded",children:t.tool_call_id})]})}),(0,e.jsxs)(v.motion.div,{className:"min-w-full bg-gray-100",initial:!1,animate:{height:"auto"},transition:{duration:.3},children:[(0,e.jsx)("div",{className:"p-3",children:(0,e.jsx)(O,{mode:"wait",initial:!1,children:(0,e.jsx)(v.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.2},children:a?(0,e.jsx)("table",{className:"min-w-full divide-y divide-gray-200",children:(0,e.jsx)("tbody",{className:"divide-y divide-gray-200",children:(Array.isArray(n)?r?n:n.slice(0,5):Object.entries(n)).map((t,i)=>{let[r,s]=Array.isArray(n)?[i,t]:[t[0],t[1]];return(0,e.jsxs)("tr",{children:[(0,e.jsx)("td",{className:"px-4 py-2 text-sm font-medium text-gray-900 whitespace-nowrap",children:r}),(0,e.jsx)("td",{className:"px-4 py-2 text-sm text-gray-500",children:N(s)?(0,e.jsx)("code",{className:"bg-gray-50 rounded px-2 py-1 font-mono text-sm break-all",children:JSON.stringify(s,null,2)}):String(s)})]},i)})})}):(0,e.jsx)("code",{className:"text-sm block",children:h})},r?"expanded":"collapsed")})}),(u&&!a||a&&Array.isArray(n)&&n.length>5)&&(0,e.jsx)(v.motion.button,{onClick:()=>s(!r),className:"w-full py-2 flex items-center justify-center border-t-[1px] border-gray-200 text-gray-500 hover:text-gray-600 hover:bg-gray-50 transition-all ease-in-out duration-200 cursor-pointer",initial:{scale:1},whileHover:{scale:1.02},whileTap:{scale:.98},children:r?(0,e.jsx)(I,{}):(0,e.jsx)(V.ChevronDown,{})})]})]})}t.s(["ChevronUp",0,I],144626),t.s(["ToolCalls",0,B,"ToolResult",0,$],957517);var F=t.i(996517),U=t.i(137651),z=t.i(62304);function G(){let t=(0,z.currentEnvLicense)();return{logoSrc:t.signInLogo.src,logoAlt:t.signInLogo.alt,label:t.brandTitle,logoClassName:t.signInLogo.className??"h-8 w-auto",width:t.signInLogo.width,height:t.signInLogo.height,hasWordmark:t.heroLogo?.src===t.signInLogo.src}}function W(t){return"oidc"===t||"public"===t}function Y({data:t,hideToolCalls:i,resultIdSuffix:n=""}){if(i)return null;let r=t&&"object"==typeof t&&!Array.isArray(t)?t:null,s=r&&r.tool_call&&"object"==typeof r.tool_call&&!Array.isArray(r.tool_call)?r.tool_call:null;if(!s)return null;let a=r?.tool_result,o=s.id??"project-context";return(0,e.jsxs)("div",{className:"mt-2 space-y-2",children:[(0,e.jsx)(B,{toolCalls:[{id:s.id??"",name:s.name??"load_selected_project_context",args:s.args??{},type:"tool_call"}]}),(0,e.jsx)($,{message:{id:`${o}-result${n}`,type:"tool",name:s.name??"load_selected_project_context",tool_call_id:s.id??"",content:JSON.stringify(a??{},null,2)}})]})}function H({event:t,hideToolCalls:i}){return"project_context"===t.phase?(0,e.jsx)(Y,{data:t.data,hideToolCalls:i}):t.data?(0,e.jsx)("pre",{className:"mt-1 whitespace-pre-wrap break-words text-[11px]",children:JSON.stringify(t.data,null,2)}):null}let K=(0,i.createContext)(void 0);async function q(t){try{let e=await fetch(`${t}/info`,{credentials:"include"});if(!e.ok)return{ok:!1,configDriftDetected:!1,configDriftMessages:[]};let i=await e.json();return{ok:!0,configDriftDetected:!!i.config_drift_detected,configDriftMessages:i.config_drift_messages??[]}}catch(t){return console.error(t),{ok:!1,configDriftDetected:!1,configDriftMessages:[]}}}let X=({children:t,apiUrl:a,user:u,isSuperAdmin:h})=>{let f=(0,g.useRouter)(),v=(0,z.currentEnvLicense)(),x=v.kioskMode,w=x?v.customerId:null,[b,S]=(0,n.useQueryState)("threadId"),{getThreads:E,setThreads:T}=(0,p.useThreadsOptional)(),P=(0,c.useGenerateStream)(a,b,(t,e)=>{e&&S(t.thread_id),T(e=>{let i=e.find(e=>e.thread_id===t.thread_id);return[{thread_id:t.thread_id,title:t.title,created_at:t.created_at??i?.created_at??null,updated_at:t.updated_at??i?.updated_at??null,last_message_at:t.last_message_at??i?.last_message_at??null,project_id:t.project_id??i?.project_id??null,agent_id:t.agent_id??i?.agent_id??null,project_name:i?.project_name,agent_name:i?.agent_name},...e.filter(e=>e.thread_id!==t.thread_id)]}),E().then(T).catch(()=>{})}),A=P.authRequired,[_,C]=(0,i.useState)(!0),[j,k]=(0,i.useState)(!1),[R]=(0,n.useQueryState)("hideToolCalls",n.parseAsBoolean.withDefault(!1)),[M,D]=(0,i.useState)(null),[O,V]=(0,i.useState)(null),[L,I]=(0,i.useState)(null),[N,B]=(0,i.useState)(null),[$,G]=(0,i.useState)(null),[W,Y]=(0,i.useState)(null),[X,J]=(0,i.useState)(!1),[Z,Q]=(0,i.useState)(!1),[tt,te]=(0,i.useState)(!1),[ti,tn]=(0,i.useState)(""),[tr,ts]=(0,i.useState)(""),[ta,to]=(0,i.useState)(null),[tl,tu]=(0,i.useState)(!1),th=(0,i.useCallback)(t=>{y.selectionStorage.setItem(y.SELECTED_ORCHESTRATOR_STORAGE_KEY,JSON.stringify(t));let e=(0,y.getPrimaryAgentId)(t);e?y.selectionStorage.setItem(y.SELECTED_AGENT_STORAGE_KEY,e):y.selectionStorage.removeItem(y.SELECTED_AGENT_STORAGE_KEY),B(t),window.dispatchEvent(new Event(y.AGENT_STORAGE_SYNC_EVENT))},[]),td=(0,i.useCallback)(()=>{I((y.selectionStorage.getItem(y.SELECTED_PROJECT_NAME_STORAGE_KEY)??"").trim()||null)},[]),tc=(0,i.useCallback)(()=>{let t=(0,y.parseStoredOrchestrator)(y.selectionStorage.getItem(y.SELECTED_ORCHESTRATOR_STORAGE_KEY)),e=(0,y.getPrimaryAgentId)(t);if(t&&e){y.selectionStorage.getItem(y.SELECTED_AGENT_STORAGE_KEY)!==e&&y.selectionStorage.setItem(y.SELECTED_AGENT_STORAGE_KEY,e),B(t),D(t.title),V(t.wel
11come_msg??null);return}B(null);let i=(y.selectionStorage.getItem(y.SELECTED_AGENT_STORAGE_KEY)??"").trim();if(!i){let t=(0,y.getSingleAgentOrchestratorKey)()||w;if(t){D(t),V(null),B(null);return}window.location.href=(0,z.withBasePath)("/");return}D(i),V(null)},[w]);(0,i.useEffect)(()=>{tc()},[tc]),(0,i.useEffect)(()=>{let t=(0,y.getSingleAgentOrchestratorKey)()||w;if(G(t),!t){Y(null),J(!1),Q(!1);return}let e=!1;return J(!0),y.selectionStorage.setItem(y.SINGLE_AGENT_ORCHESTRATOR_KEY_STORAGE_KEY,t),fetch(`${a}/orchestrators`,{credentials:"include"}).then(async t=>{if(!t.ok)throw Error(`HTTP ${t.status}`);return await t.json()}).then(t=>{if(e)return;let i=t?.single_agent_orchestrator_key?.trim()||w||"";if(!i){G(""),Y(null),Q(!1),y.selectionStorage.removeItem(y.SINGLE_AGENT_ORCHESTRATOR_KEY_STORAGE_KEY);return}G(i);let n=(t?.orchestrators??[]).find(t=>Array.isArray(t.agent_list)&&t.agent_list.includes(i))??null;if(n){Y(n),Q(!1),th(n),D(n.title),V(n.welcome_msg??null);return}Y(null),Q(!0),D(i),V(null),y.selectionStorage.removeItem(y.SELECTED_ORCHESTRATOR_STORAGE_KEY),y.selectionStorage.removeItem(y.SELECTED_AGENT_STORAGE_KEY)}).catch(i=>{if(e)return;Y(null),Q(!1),D(t),V(null);let n=i instanceof Error&&i.message?i.message:"Please check your connection and try again.";l.toast.error("Unable to load agent bundle",{description:n})}).finally(()=>{e||J(!1)}),()=>{e=!0}},[a,w,th]),(0,i.useEffect)(()=>{let t=()=>tc();return window.addEventListener(y.AGENT_STORAGE_SYNC_EVENT,t),()=>window.removeEventListener(y.AGENT_STORAGE_SYNC_EVENT,t)},[tc]),(0,i.useEffect)(()=>{td();let t=()=>td();return window.addEventListener(y.PROJECT_STORAGE_SYNC_EVENT,t),()=>{window.removeEventListener(y.PROJECT_STORAGE_SYNC_EVENT,t)}},[td]),(0,i.useEffect)(()=>{q(a).then(t=>{if(!t.ok)return void l.toast.error("Failed to connect to LangGraph server",{description:()=>(0,e.jsxs)("p",{children:["Please ensure your graph is running at ",(0,e.jsx)("code",{children:a})," and your OIDC session is active."]}),duration:1e4,richColors:!0,closeButton:!0});if(t.configDriftDetected){let i=(0,y.getSingleAgentOrchestratorKey)()||w,n=function(t,e){if(!e)return t;let i=e.trim();return i?t.filter(t=>t.includes(i)):t}(t.configDriftMessages,i);if(i&&0===n.length)return;let r=n.join(" | ");l.toast.error("Configuration drift detected",{description:()=>(0,e.jsxs)("p",{children:["Agent/tool runtime configuration has drifted in backend metadata."," ",r?(0,e.jsx)("code",{children:r}):null]}),duration:2e4,richColors:!0,closeButton:!0})}})},[a,w]);let tp=(0,i.useCallback)(t=>{f.push(`/orchestrators/bundle-editor?orchestratorId=${encodeURIComponent(t.id)}`)},[f]),tm=(0,i.useCallback)(()=>{let t=W||(0,y.parseStoredOrchestrator)(y.selectionStorage.getItem(y.SELECTED_ORCHESTRATOR_STORAGE_KEY));if(t)return void tp(t);let e=$||(0,y.getSingleAgentOrchestratorKey)()||"";e?(tn(e),ts(""),to(null),te(!0)):l.toast.error("No bundle selected",{description:"Select an agent bundle before opening the bundle editor."})},[tp,W,$]),tf=(0,i.useCallback)(async()=>{let t=ti.trim();if(!t)return void l.toast.error("Title is required");if(!ta)return void l.toast.error("CSV Definition is required");tu(!0);try{let e=await (0,d.createOrchestrator)(a,{title:t,welcomeMessage:tr.trim(),csvFile:ta});th(e),Y(e),Q(!1),D(e.title),V(e.welcome_msg??null),te(!1),tp(e)}catch(n){let t=n.message??"Please check the backend and try again.",e=n.agentKey??n.agentId,i="";"number"==typeof n.row&&e?i=`Row ${n.row} (agent_key: ${e}): `:"number"==typeof n.row?i=`Row ${n.row}: `:e&&(i=`agent_key: ${e}: `),l.toast.error("Unable to create bundle",{description:`${i}${t}`})}finally{tu(!1)}},[a,ta,ti,tr,tp,th]),tg=P.latestProjectContext?function(t){if(t&&"object"==typeof t&&!Array.isArray(t)){let e=t.tool_result;if(void 0!==e)try{return JSON.stringify(e,null,2)}catch{return String(e)}}try{return JSON.stringify(t??null,null,2)}catch{return String(t??"")}}(P.latestProjectContext.data):null,ty={...P,apiUrl:a,agentLabel:M,agentWelcomeMessage:O,projectName:L,selectedOrchestrator:N,refreshProjectNameFromStorage:td,refreshAgentFromStorage:tc,isSuperAdmin:h,singleAgentOrchestratorKey:$,singleAgentOrchestrator:W,singleAgentBundleLoading:X,singleAgentBundleMissing:Z};return(0,e.jsxs)(K.Provider,{value:ty,children:[x?null:(0,e.jsx)(m.UserMenu,{user:u,apiUrl:a}),(0,e.jsx)(U.Dialog,{open:tt,onOpenChange:t=>{te(t),t||tl||(tn($??""),ts(""),to(null))},children:(0,e.jsxs)(U.DialogContent,{children:[(0,e.jsxs)(U.DialogHeader,{children:[(0,e.jsx)(U.DialogTitle,{children:"Create bundle"}),(0,e.jsx)(U.DialogDescription,{children:"Upload the CSV definition for the configured single-agent bundle."})]}),(0,e.jsxs)("div",{className:"space-y-3 py-2",children:[(0,e.jsx)(r.Input,{value:ti,onChange:t=>tn(t.target.value),placeholder:"Title",disabled:tl}),(0,e.jsx)(r.Input,{value:tr,onChange:t=>ts(t.target.value),placeholder:"Welcome Message",disabled:tl}),(0,e.jsx)(r.Input,{type:"file",accept:".csv,text/csv","aria-label":"CSV Definition",disabled:tl,onChange:t=>{to(t.currentTarget.files?.[0]??null)}})]}),(0,e.jsxs)(U.DialogFooter,{children:[(0,e.jsx)(s.Button,{type:"button",variant:"ghost",onClick:()=>{tl||te(!1)},disabled:tl,children:"Cancel"}),(0,e.jsx)(s.Button,{type:"button",onClick:()=>void tf(),disabled:tl,children:tl?"Creating...":"Create bundle"})]})]})}),A?(0,e.jsx)("div",{className:"fixed inset-x-0 top-16 z-50 mx-auto max-w-2xl rounded-md border bg-background p-4 shadow-lg",children:(0,e.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"font-medium",children:"Additional authorization required"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:A.message})]}),(0,e.jsx)(s.Button,{type:"button",onClick:()=>
11{if(!A?.authStartUrl)return;let t=A.authStartUrl.startsWith("http")?A.authStartUrl:`${a}${A.authStartUrl.startsWith("/")?"":"/"}${A.authStartUrl}`,e=window.open(t,"provider-auth","width=560,height=700");if(!e)return void l.toast.error("Popup blocked",{description:"Please allow popups and try again."});let i=window.setInterval(async()=>{try{let t=await fetch(`${a}/auth/provider/status?config=${encodeURIComponent(A.config)}`,{credentials:"include"});if(!t.ok)return;if((await t.json()).authorized){window.clearInterval(i);try{e.close()}catch{}P.clearAuthRequired(),l.toast.success("Authorization complete",{description:`You can retry your request for ${A.config}.`})}}catch{}},1500)},children:"Authorize"})]})}):null,h&&!_?(0,e.jsxs)("div",{className:"fixed bottom-3 right-3 z-50 flex items-center gap-2",children:[(0,e.jsx)(s.Button,{type:"button",variant:"outline",size:"sm",onClick:tm,children:"Edit bundle"}),(0,e.jsx)(s.Button,{type:"button",variant:"outline",size:"sm",onClick:()=>{C(!0),k(!1)},children:"Show Debug Trace"})]}):null,h&&_?(0,e.jsxs)("div",{className:"fixed bottom-3 right-3 z-50 w-[28rem] rounded-md border bg-background/95 shadow-lg p-3",children:[(0,e.jsxs)("div",{className:"mb-2 flex items-center justify-between gap-2",children:[(0,e.jsx)("p",{className:"text-xs font-semibold",children:"Debug Trace"}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)(s.Button,{type:"button",variant:"ghost",size:"sm",className:"h-6 px-2 text-xs",onClick:tm,children:"Edit bundle"}),(0,e.jsx)(s.Button,{type:"button",variant:"ghost",size:"sm",className:"h-6 px-2 text-xs",onClick:()=>k(t=>!t),children:j?"Expand":"Minimize"}),(0,e.jsx)(s.Button,{type:"button",variant:"ghost",size:"sm",className:"h-6 px-2 text-xs",onClick:()=>C(!1),children:"Close"})]})]}),j?(0,e.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:["trace: ",P.debugEvents.length," · memory:"," ",+!!P.latestProjectContext]}):(0,e.jsxs)(F.Tabs,{defaultValue:"trace",className:"w-full",children:[(0,e.jsxs)(F.TabsList,{className:"grid h-9 w-full grid-cols-2",children:[(0,e.jsx)(F.TabsTrigger,{value:"trace",className:"text-xs",children:"Tools / trace"}),(0,e.jsx)(F.TabsTrigger,{value:"memory",className:"text-xs",children:"Project memory"})]}),(0,e.jsx)(F.TabsContent,{value:"trace",forceMount:!0,className:"mt-2 max-h-72 space-y-2 overflow-auto data-[state=inactive]:hidden",children:0===P.debugEvents.length?(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"No debug events yet. Send a message while the backend has debug telemetry enabled."}):P.debugEvents.slice().reverse().map((t,i)=>(0,e.jsxs)("div",{className:"text-xs border rounded p-2",children:[(0,e.jsxs)("p",{className:"font-medium",children:[t.phase,": ",t.message]}),(0,e.jsx)("p",{className:"text-muted-foreground",children:new Date(t.at).toLocaleTimeString()}),(0,e.jsx)(H,{event:t,hideToolCalls:R??!1})]},`${t.at}-${i}`))}),(0,e.jsx)(F.TabsContent,{value:"memory",forceMount:!0,className:"mt-2 max-h-72 space-y-2 overflow-auto data-[state=inactive]:hidden",children:P.latestProjectContext?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"mb-2 flex justify-end",children:(0,e.jsxs)(s.Button,{type:"button",variant:"outline",size:"sm",className:"h-7 gap-1 px-2 text-xs",onClick:()=>{null!=tg&&navigator.clipboard.writeText(tg).then(()=>l.toast.success("Copied project memory",{description:"The JSON shown in this tab is on the clipboard."})).catch(()=>l.toast.error("Could not copy",{description:"Clipboard access may be denied in this browser."}))},children:[(0,e.jsx)(o.Copy,{className:"size-3.5","aria-hidden":!0}),"Copy"]})}),(0,e.jsx)("pre",{className:"mt-0 max-h-72 overflow-auto whitespace-pre-wrap break-words rounded border bg-muted/30 p-2 font-mono text-[11px] leading-relaxed",children:tg})]}):(0,e.jsxs)("p",{className:"text-xs text-muted-foreground",children:["No project context yet. The latest snapshot appears here when the backend emits a"," ",(0,e.jsx)("code",{className:"rounded bg-muted px-0.5",children:"project_context"})," ","debug event (requires debug telemetry and a selected project)."]})})]})]}):null,t]}
11)},J=(0,i.createContext)(null);t.s(["AuthGate",0,({children:t})=>{let n=(0,u.resolveApiUrl)("https://api.dev.inclusivelymade.ai"),r=G(),[o,d]=(0,i.useState)("loading"),[c,p]=(0,i.useState)(null),m=(0,i.useRef)(!1);return((0,i.useEffect)(()=>{(0,h.startReloginIfMarked)(n)},[n]),(0,i.useEffect)(()=>{let t=!0;return(async()=>{d("loading");try{let r=`${n}/auth/me`,s=await fetch(r,{credentials:"include"});if(!t)return;if(!s.ok){var i;p(null),d("unauthenticated"),i=s.status,401===i||m.current||(m.current=!0,l.toast.error("Unable to reach backend server",{description:(0,e.jsxs)("p",{children:["We could not contact the authentication endpoint at"," ",(0,e.jsx)("code",{children:r}),". Please verify the backend is running and reachable from your browser."]}),duration:1e4,richColors:!0,closeButton:!0}));return}let a=await s.json();a.user?.id&&(0,y.syncPerIdentityCaches)(a.user.id),p(a.user??null),d(W(a.auth_mode)?"authenticated":"unauthenticated")}catch{if(!t)return;p(null),d("unauthenticated"),m.current||(m.current=!0,l.toast.error("Unable to reach backend server",{description:(0,e.jsxs)("p",{children:["We could not contact the authentication endpoint at"," ",(0,e.jsxs)("code",{children:[n,"/auth/me"]}),". Please verify the backend is running and reachable from your browser."]}),duration:1e4,richColors:!0,closeButton:!0}))}})(),()=>{t=!1}},[n]),"loading"===o)?(0,e.jsx)("div",{className:"min-h-screen flex items-center justify-center",children:"Loading auth..."}):"authenticated"===o&&c?(0,e.jsx)(J.Provider,{value:c,children:t}):(0,e.jsx)("div",{className:"flex items-center justify-center min-h-screen w-full p-4",children:(0,e.jsxs)("div",{className:"animate-in fade-in-0 zoom-in-95 flex flex-col border bg-background shadow-lg rounded-lg max-w-xl w-full p-6 gap-6",children:[(0,e.jsxs)("div",{className:"flex items-center flex-col gap-2",children:[(0,e.jsx)(f.default,{src:r.logoSrc,alt:r.logoAlt,width:r.width,height:r.height,className:r.logoClassName}),(0,e.jsx)("h1",{className:"text-xl font-semibold tracking-tight sr-only",children:"Sign in"})]}),(0,e.jsxs)(s.Button,{type:"button",size:"lg",onClick:()=>{let t=`${window.location.origin}${window.location.pathname}${window.location.search}`;window.location.href=`${n}/auth/login?return_to=${encodeURIComponent(t)}`},children:["Sign in",(0,e.jsx)(a.ArrowRight,{className:"size-5"})]})]})})},"AuthGateUserContext",0,J,"StreamProvider",0,({children:t})=>{let r=(0,u.resolveApiUrl)("https://api.dev.inclusivelymade.ai"),[o,d]=(0,n.useQueryState)("apiUrl",{defaultValue:r}),[c,p]=(0,n.useQueryState)("assistantId",{defaultValue:"LangGraphDeployDemo"}),[m,g]=(0,i.useState)("loading"),[v,x]=(0,i.useState)(null),[w,b]=(0,i.useState)(!1),S=(0,i.useRef)(!1),E=o||r;(0,i.useEffect)(()=>{(0,h.startReloginIfMarked)(r)},[r]);let T=G();return((0,i.useEffect)(()=>{if(!E)return void g("unauthenticated");let t=!0;return(async()=>{g("loading");try{let n=`${E}/auth/me`,r=await fetch(n,{credentials:"include"});if(!t)return;if(!r.ok){var i;x(null),b(!1),g("unauthenticated"),i=r.status,401===i||S.current||(S.current=!0,l.toast.error("Unable to reach backend server",{description:(0,e.jsxs)("p",{children:["We could not contact the authentication endpoint at"," ",(0,e.jsx)("code",{children:n}),". Please verify the backend is running and reachable from your browser."]}),duration:1e4,richColors:!0,closeButton:!0}));return}let s=await r.json();s.user?.id&&(0,y.syncPerIdentityCaches)(s.user.id),x(s.user??null),b(!!s.is_super_admin),g(W(s.auth_mode)?"authenticated":"unauthenticated")}catch{if(!t)return;x(null),b(!1),g("unauthenticated"),S.current||(S.current=!0,l.toast.error("Unable to reach backend server",{description:(0,e.jsxs)("p",{children:["We could not contact the authentication endpoint at"," ",(0,e.jsxs)("code",{children:[E,"/auth/me"]}),". Please verify the backend is running and reachable from your browser."]}),duration:1e4,richColors:!0,closeButton:!0}))}})(),()=>{t=!1}},[E]),"loading"===m)?(0,e.jsx)("div",{className:"min-h-screen flex items-center justify-center",children:"Loading auth..."}):"authenticated"===m&&v?(0,e.jsx)(X,{apiUrl:E,user:v,isSuperAdmin:w,children:t}):(0,e.jsx)("div",{className:"flex items-center justify-center min-h-screen w-full p-4",children:(0,e.jsxs)("div",{className:"animate-in fade-in-0 zoom-in-95 flex flex-col border bg-background shadow-lg rounded-lg max-w-xl w-full p-6 gap-6",children:[(0,e.jsxs)("div",{className:"flex items-center flex-col gap-2",children:[(0,e.jsx)(f.default,{src:T.logoSrc,alt:T.logoAlt,width:T.width,height:T.height,className:T.logoClassName}),(0,e.jsx)("h1",{className:"text-xl font-semibold tracking-tight",children:"Sign in"})]}),(0,e.jsxs)(s.Button,{type:"button",size:"lg",onClick:()=>{let t=`${window.location.origin}${window.location.pathname}${window.location.search}`;window.location.href=`${E}/auth/login?return_to=${encodeURIComponent(t)}`},children:["Sign in",(0,e.jsx)(a.ArrowRight,{className:"size-5"})]})]})})},"useStreamContext",0,()=>{let t=(0,i.useContext)(K);if(void 0===t)throw Error("useStreamContext must be used within a StreamProvider");return t}],195032);let Z=(0,L.default)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);t.s(["default",0,Z],518074)},605474,t=>{"use strict";let e=(0,t.i(235884).default)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);t.s(["default",0,e])},800216,t=>{"use strict";var e=t.i(518074);t.s(["Check",()=>e.default])}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.