cognova 0.2.9 → 0.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{pHQcHl8n.js → 0NJ3PaRM.js} +1 -1
- package/.output/public/_nuxt/{CGgZuPnb.js → 0yk-pS3R.js} +2 -2
- package/.output/public/_nuxt/{C8gtQaKB.js → 10_wwHSz.js} +1 -1
- package/.output/public/_nuxt/{BaYtugUf.js → 1zUTf4AP.js} +1 -1
- package/.output/public/_nuxt/{B63LIwsW.js → 2dNDtTiv.js} +3 -3
- package/.output/public/_nuxt/{Gy6_ehml.js → 2nOqGUPr.js} +1 -1
- package/.output/public/_nuxt/{C6UTTaCP.js → 3jQMk_5H.js} +1 -1
- package/.output/public/_nuxt/{BX6vcvkp.js → 4K03TkGA.js} +1 -1
- package/.output/public/_nuxt/{DjmFlCHK.js → 6boMs_nF.js} +1 -1
- package/.output/public/_nuxt/{CybU4a95.js → 7oCGSglN.js} +1 -1
- package/.output/public/_nuxt/{CfO_d5gC.js → 8q5NepGW.js} +1 -1
- package/.output/public/_nuxt/{DdXVAzIg.js → B93pdGAW.js} +1 -1
- package/.output/public/_nuxt/{D1t0272g.js → BA_pRWwX.js} +1 -1
- package/.output/public/_nuxt/{Be5L93GM.js → BDyn4ApB.js} +3 -3
- package/.output/public/_nuxt/{DHScQdvh.js → BGgwYWjH.js} +1 -1
- package/.output/public/_nuxt/{FYOLNuMV.js → BH0QDWEm.js} +1 -1
- package/.output/public/_nuxt/{BVc_fOF1.js → BHtY0l0l.js} +1 -1
- package/.output/public/_nuxt/{C6HEirAm.js → BIXrSYwR.js} +1 -1
- package/.output/public/_nuxt/BK8S2ony.js +1 -0
- package/.output/public/_nuxt/{DTu0K_pX.js → BKXg-alD.js} +1 -1
- package/.output/public/_nuxt/{Pa936BQP.js → BLnYhy_t.js} +1 -1
- package/.output/public/_nuxt/{wgX1ldgZ.js → BR8bKz8h.js} +1 -1
- package/.output/public/_nuxt/{B-513wJW.js → BS2ZNXI1.js} +1 -1
- package/.output/public/_nuxt/{a9_LvIZ4.js → BUghTae1.js} +1 -1
- package/.output/public/_nuxt/{B8Ou5yh2.js → BXuWCWsJ.js} +1 -1
- package/.output/public/_nuxt/{D_tCgCFX.js → BYHCP8x7.js} +1 -1
- package/.output/public/_nuxt/{CY3x8iy3.js → BZrSPX0S.js} +1 -1
- package/.output/public/_nuxt/{BNBGEa-U.js → B_wilgcd.js} +1 -1
- package/.output/public/_nuxt/BaZwjF8o.js +1 -0
- package/.output/public/_nuxt/{BwdxQyyo.js → Bciqk4dX.js} +1 -1
- package/.output/public/_nuxt/{BhnONkIm.js → Beom-INj.js} +1 -1
- package/.output/public/_nuxt/{CzurfTnt.js → BfcLZ_fC.js} +1 -1
- package/.output/public/_nuxt/{DwAJIRGg.js → Bk6JUtIo.js} +1 -1
- package/.output/public/_nuxt/BkfI94R8.js +1 -0
- package/.output/public/_nuxt/{Cs_udj6A.js → BmOtR1wX.js} +1 -1
- package/.output/public/_nuxt/{D7iYVmH6.js → BmVLxnDU.js} +1 -1
- package/.output/public/_nuxt/{6lIxuL6n.js → BtHQ1T0f.js} +1 -1
- package/.output/public/_nuxt/{RRbnMIVe.js → ByYh0uRg.js} +1 -1
- package/.output/public/_nuxt/{DBuW01Fx.js → C27WoGNZ.js} +1 -1
- package/.output/public/_nuxt/{DJ4pqxg-.js → C2FxZbO_.js} +1 -1
- package/.output/public/_nuxt/{myNwwtfj.js → C2vq6Te8.js} +1 -1
- package/.output/public/_nuxt/{C3JOLqW1.js → C39dQ88F.js} +1 -1
- package/.output/public/_nuxt/{4nN41Tyd.js → C3NST0BU.js} +1 -1
- package/.output/public/_nuxt/{BltasKce.js → C4mwL7SE.js} +1 -1
- package/.output/public/_nuxt/{B1vDCixB.js → C5R5QaCA.js} +1 -1
- package/.output/public/_nuxt/{CwOUYOe5.js → C6qKcgOY.js} +1 -1
- package/.output/public/_nuxt/{DGJKfutb.js → C71_a1IX.js} +1 -1
- package/.output/public/_nuxt/{CrjNndEO.js → C9WIgRRL.js} +1 -1
- package/.output/public/_nuxt/{B5JDxHxC.js → CBTkrk2M.js} +1 -1
- package/.output/public/_nuxt/{UbZP7wjm.js → CEnSeCqn.js} +1 -1
- package/.output/public/_nuxt/{Cn83lLUb.js → CKxSHyww.js} +1 -1
- package/.output/public/_nuxt/{CbTu13wM.js → CLfF6dSn.js} +1 -1
- package/.output/public/_nuxt/{Bsdcw5gr.js → CPutXj8l.js} +1 -1
- package/.output/public/_nuxt/{CrW6y2-s.js → CQqCBrXj.js} +1 -1
- package/.output/public/_nuxt/{OrcbFmB1.js → CSKJ-Ahh.js} +1 -1
- package/.output/public/_nuxt/{XJYoLoTi.js → CTCcEJU3.js} +1 -1
- package/.output/public/_nuxt/{Bk9-HxOg.js → CVFwOzbl.js} +1 -1
- package/.output/public/_nuxt/{CqMgz85Z.js → CVdCqaby.js} +1 -1
- package/.output/public/_nuxt/{Cmj-BR0q.js → CVqlefTY.js} +1 -1
- package/.output/public/_nuxt/CWyMCJQH.js +1 -0
- package/.output/public/_nuxt/{xrh9hzzH.js → CY-QVcA5.js} +2 -2
- package/.output/public/_nuxt/{BQ1T6zWA.js → CY-cjAwJ.js} +1 -1
- package/.output/public/_nuxt/{CziltI1u.js → CYPO5o_C.js} +1 -1
- package/.output/public/_nuxt/{C1FhgWcI.js → CZRnNmU8.js} +1 -1
- package/.output/public/_nuxt/{BES6FzF5.js → CZVzFlpI.js} +1 -1
- package/.output/public/_nuxt/{CsbHYpNi.js → CZoEPC_Q.js} +3 -3
- package/.output/public/_nuxt/{DvATBMPl.js → Cc-2ziaZ.js} +1 -1
- package/.output/public/_nuxt/{D3RROe4s.js → ChcO9s3o.js} +1 -1
- package/.output/public/_nuxt/{CIUZAp6g.js → Cl-LOSDV.js} +1 -1
- package/.output/public/_nuxt/{BwJVN9k0.js → CobqYwkp.js} +1 -1
- package/.output/public/_nuxt/{Cmdr5BNz.js → CqNwHCpo.js} +1 -1
- package/.output/public/_nuxt/{HPOXd4gt.js → CuxrHsu-.js} +1 -1
- package/.output/public/_nuxt/{BYIq3eP8.js → CwPdIZ9J.js} +1 -1
- package/.output/public/_nuxt/{D-O8wAju.js → D0ifH682.js} +1 -1
- package/.output/public/_nuxt/{BwVt3BzR.js → D3AZaldL.js} +1 -1
- package/.output/public/_nuxt/{BE_OHTBv.js → D4UJwDQJ.js} +1 -1
- package/.output/public/_nuxt/{hm3ShyaF.js → D5jZq8b3.js} +1 -1
- package/.output/public/_nuxt/{pNqWPbXW.js → D5q8SnqE.js} +1 -1
- package/.output/public/_nuxt/{BgG2k-zy.js → D8M722pn.js} +1 -1
- package/.output/public/_nuxt/{B2MVZlI-.js → D8lwrAYS.js} +1 -1
- package/.output/public/_nuxt/{DYu_NYj3.js → D9nmzBAw.js} +1 -1
- package/.output/public/_nuxt/{DBKxzQ3U.js → DC4idAGt.js} +1 -1
- package/.output/public/_nuxt/{qWWnsfRV.js → DEd2xVbS.js} +1 -1
- package/.output/public/_nuxt/{nTCVPCKg.js → DH4YkDAi.js} +1 -1
- package/.output/public/_nuxt/{DmmQUhEb.js → DJTCT0bl.js} +1 -1
- package/.output/public/_nuxt/{rRYEvKFu.js → DNP5E1bC.js} +1 -1
- package/.output/public/_nuxt/{DI1FIvaM.js → DO9SFIh1.js} +1 -1
- package/.output/public/_nuxt/DPklr_tJ.js +2 -0
- package/.output/public/_nuxt/{-JdScH3W.js → DQM4eBdt.js} +1 -1
- package/.output/public/_nuxt/{5MZBbx-H.js → DQh6I9z9.js} +1 -1
- package/.output/public/_nuxt/{DLuRYg2p.js → DS2wStH1.js} +1 -1
- package/.output/public/_nuxt/{0EY9Msdx.js → DTAStixR.js} +1 -1
- package/.output/public/_nuxt/{fVkHtgGF.js → DTGenhcA.js} +1 -1
- package/.output/public/_nuxt/{4Qy4OdWt.js → DUAAXJ6Q.js} +1 -1
- package/.output/public/_nuxt/{DTrFhdRO.js → DUVzIl3o.js} +1 -1
- package/.output/public/_nuxt/{Dj2opPDu.js → DXdwpJ-I.js} +1 -1
- package/.output/public/_nuxt/{C8tXHRIo.js → DY3uK7wM.js} +1 -1
- package/.output/public/_nuxt/{D76Dw8rw.js → DYbZBZet.js} +1 -1
- package/.output/public/_nuxt/{DSgubznn.js → D_4LPm1U.js} +1 -1
- package/.output/public/_nuxt/{D8gh62A0.js → Db4KMnt8.js} +1 -1
- package/.output/public/_nuxt/{JQV21WEV.js → DcJbYLTp.js} +1 -1
- package/.output/public/_nuxt/{D5G5UL_g.js → DfF81NlA.js} +1 -1
- package/.output/public/_nuxt/{HlbU_z9a.js → DhI5cA_n.js} +1 -1
- package/.output/public/_nuxt/{CaLO8sre.js → DhuOKJda.js} +1 -1
- package/.output/public/_nuxt/{CDradKPE.js → Di-Nc75e.js} +1 -1
- package/.output/public/_nuxt/{C2DZeD9G.js → Djs0Tlpa.js} +1 -1
- package/.output/public/_nuxt/DmmdPt_5.js +1 -0
- package/.output/public/_nuxt/{DSynhNOO.js → Dn5a-guE.js} +1 -1
- package/.output/public/_nuxt/{k16puyWi.js → DtjjnHnt.js} +1 -1
- package/.output/public/_nuxt/{CEJh-OAl.js → DuvzM-P1.js} +1 -1
- package/.output/public/_nuxt/{D7WbsJsa.js → DwY7rCd_.js} +1 -1
- package/.output/public/_nuxt/{REP2-rzf.js → Dya5oK8u.js} +1 -1
- package/.output/public/_nuxt/{CIJ2MJdc.js → DzA58_Lm.js} +1 -1
- package/.output/public/_nuxt/{Bp9kHdw6.js → DzGy77Vr.js} +1 -1
- package/.output/public/_nuxt/{DfIqFkyp.js → E3rXPwU8.js} +1 -1
- package/.output/public/_nuxt/{NusIKwmA.js → EgKnQnf-.js} +1 -1
- package/.output/public/_nuxt/{Clr3MHUr.js → GtEM7xVU.js} +1 -1
- package/.output/public/_nuxt/{DQd-GXKJ.js → H6JbrRBU.js} +1 -1
- package/.output/public/_nuxt/{BzTjmQCD.js → ILEvizzp.js} +1 -1
- package/.output/public/_nuxt/{DUDbJONU.js → JX1oqJI9.js} +1 -1
- package/.output/public/_nuxt/{BsnhHCOa.js → JbHa4oXq.js} +1 -1
- package/.output/public/_nuxt/{BE4Ndhrq.js → Kw0zy3FG.js} +1 -1
- package/.output/public/_nuxt/{BOGXUgGg.js → N5XtbYVD.js} +1 -1
- package/.output/public/_nuxt/{Oy4_RPEZ.js → PP_4ebzl.js} +1 -1
- package/.output/public/_nuxt/{DkhxRAb3.js → SrncdpaW.js} +1 -1
- package/.output/public/_nuxt/{C8wa4Wh4.js → U1MWjQMi.js} +1 -1
- package/.output/public/_nuxt/{CGfVTQUF.js → Um1vPiAz.js} +1 -1
- package/.output/public/_nuxt/{CH8kNq6W.js → XCjS70z4.js} +1 -1
- package/.output/public/_nuxt/{BZqdzrSw.js → YX8avsvq.js} +2 -2
- package/.output/public/_nuxt/{1zIQX9mh.js → _cy8R3nk.js} +1 -1
- package/.output/public/_nuxt/{DJoRBCVm.js → apYB9dr5.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/def74b99-d70c-4f30-aa29-70248cbeac7d.json +1 -0
- package/.output/public/_nuxt/entry.NKPfH2kE.css +1 -0
- package/.output/public/_nuxt/{B6bnHNWY.js → fbyIeNkc.js} +1 -1
- package/.output/public/_nuxt/{BjI5wb_q.js → g5MjDvm5.js} +1 -1
- package/.output/public/_nuxt/{BfECQayu.js → gTrVszwd.js} +1 -1
- package/.output/public/_nuxt/{TGVM5w2K.js → ixlNW2So.js} +1 -1
- package/.output/public/_nuxt/{CXBOHJ2W.js → nnQqD5pb.js} +1 -1
- package/.output/public/_nuxt/{C4ScCUjy.js → rfGRTJJW.js} +1 -1
- package/.output/public/_nuxt/{DCL9gWFw.js → t8aDAkZ5.js} +1 -1
- package/.output/public/_nuxt/{BJ8jbKuq.js → vIOxcXKR.js} +1 -1
- package/.output/public/_nuxt/{DA2RowFe.js → vScW1Zgm.js} +1 -1
- package/.output/public/_nuxt/{B6wYZD_K.js → wO6z2ugJ.js} +1 -1
- package/.output/public/_nuxt/{CwKe2KkK.js → x6FRJ5ac.js} +1 -1
- package/.output/public/_nuxt/{D7DTZ0iS.js → zq-a1TeT.js} +1 -1
- package/.output/server/chunks/build/{chat-CZMiB68R.mjs → chat-CR3JIVEq.mjs} +65 -11
- package/.output/server/chunks/build/chat-CR3JIVEq.mjs.map +1 -0
- package/.output/server/chunks/build/client.precomputed.mjs +1 -1
- package/.output/server/chunks/build/server.mjs +2 -2
- package/.output/server/chunks/build/{usage-CSrBh4Or.mjs → usage-BHdQZbfI.mjs} +9 -5
- package/.output/server/chunks/build/{usage-CSrBh4Or.mjs.map → usage-BHdQZbfI.mjs.map} +1 -1
- package/.output/server/chunks/nitro/nitro.mjs +1076 -862
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/chunks/routes/_ws/chat.mjs +2 -1
- package/.output/server/chunks/routes/_ws/chat.mjs.map +1 -1
- package/.output/server/chunks/routes/api/conversations/_id_.delete.mjs +4 -1
- package/.output/server/chunks/routes/api/conversations/_id_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.get3.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get3.mjs.map +1 -1
- package/.output/server/chunks/routes/api/usage/stats.get.mjs +2 -0
- package/.output/server/chunks/routes/api/usage/stats.get.mjs.map +1 -1
- package/.output/server/package.json +1 -1
- package/app/components/chat/ConversationList.vue +7 -1
- package/app/components/chat/MessageBubble.vue +45 -1
- package/app/components/usage/UsageRecordsTable.vue +4 -2
- package/app/components/usage/UsageSourceDonut.client.vue +4 -2
- package/app/components/usage/UsageTopConsumers.vue +4 -2
- package/app/composables/useChat.ts +3 -0
- package/package.json +1 -1
- package/server/api/conversations/[id].delete.ts +9 -0
- package/server/api/conversations/index.get.ts +2 -1
- package/server/api/usage/stats.get.ts +2 -0
- package/server/bridge/responder.ts +248 -0
- package/server/bridge/router.ts +6 -4
- package/server/db/schema.ts +3 -1
- package/server/drizzle/migrations/0015_great_mephistopheles.sql +2 -0
- package/server/drizzle/migrations/meta/0015_snapshot.json +1972 -0
- package/server/drizzle/migrations/meta/_journal.json +7 -0
- package/server/routes/_ws/chat.ts +2 -1
- package/server/utils/log-token-usage.ts +1 -1
- package/shared/types/index.ts +6 -0
- package/.output/public/_nuxt/1lOC4Si0.js +0 -1
- package/.output/public/_nuxt/AUdD1uDD.js +0 -1
- package/.output/public/_nuxt/DMy2sxuC.js +0 -1
- package/.output/public/_nuxt/DlSJ4TF_.js +0 -1
- package/.output/public/_nuxt/PzQHm02e.js +0 -1
- package/.output/public/_nuxt/builds/meta/613faa5d-8ace-45e0-8274-b611cc4fd1ad.json +0 -1
- package/.output/public/_nuxt/entry.DkvuF_CR.css +0 -1
- package/.output/public/_nuxt/svWfwR0T.js +0 -2
- package/.output/server/chunks/build/chat-CZMiB68R.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aA as _o,K as Uo,f as ti,q as ei,o as Tn,c as At,a as ni,a2 as si,Q as lt,R as J,S as H,a4 as $o,V as qt,au as be,c6 as No,ca as Ko,e as ii,c8 as Wo,h as Go,az as zo,b5 as Ho,at as Xo,cb as Yo,F as oi,bM as qo,E as Zo,N as Qo,G as xn,T as z,C as j,cc as bn,a9 as Sn,U as wn,aj as Jo,am as An,cd as tr,ce as er,ac as nr,cf as sr,X as ir}from"./B63LIwsW.js";import{D as or,a as rr,b as ar}from"./D1t0272g.js";import{c as Pn,h as lr}from"./HlbU_z9a.js";import"./DlSJ4TF_.js";const Kt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ur(t,e){let n=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){o.has(u)&&(c.schedule(u),t()),u(a)}const c={schedule:(u,h=!1,d=!1)=>{const p=d&&i?n:s;return h&&o.add(u),p.has(u)||p.add(u),u},cancel:u=>{s.delete(u),o.delete(u)},process:u=>{if(a=u,i){r=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,r&&(r=!1,c.process(u))}};return c}const X={},cr=40;function ri(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Kt.reduce((v,w)=>(v[w]=ur(r),v),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:h,preRender:d,render:f,postRender:p}=o,m=()=>{const v=X.useManualTiming?i.timestamp:performance.now();n=!1,X.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(v-i.timestamp,cr),1)),i.timestamp=v,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),h.process(i),d.process(i),f.process(i),p.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(m))},g=()=>{n=!0,s=!0,i.isProcessing||t(m)};return{schedule:Kt.reduce((v,w)=>{const T=o[w];return v[w]=(A,C=!1,S=!1)=>(n||g(),T.schedule(A,C,S)),v},{}),cancel:v=>{for(let w=0;w<Kt.length;w++)o[Kt[w]].cancel(v)},state:i,steps:o}}const k=t=>t,{schedule:V,cancel:Y,state:B,steps:re}=ri(typeof requestAnimationFrame<"u"?requestAnimationFrame:k,!0);let Ht;function hr(){Ht=void 0}const F={now:()=>(Ht===void 0&&F.set(B.isProcessing||X.useManualTiming?B.timestamp:performance.now()),Ht),set:t=>{Ht=t,queueMicrotask(hr)}},U=t=>t*1e3,K=t=>t/1e3;function fr(t,e){const n=F.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(Y(s),t(r-e))};return V.setup(s,!0),()=>Y(s)}const ai=t=>e=>typeof e=="string"&&e.startsWith(t),Ue=ai("--"),dr=ai("var(--"),$e=t=>dr(t)?pr.test(t.split("/*")[0].trim()):!1,pr=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Lt={};function li(t){for(const e in t)Lt[e]=t[e],Ue(e)&&(Lt[e].isCSSVariable=!0)}function kt(t,e){const n=typeof t=="string"&&!e?`${t}Context`:e,s=Symbol(n);return[o=>{const a=_o(s,o);if(a===void 0)throw new Error(`Injection \`${s.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`);return a},o=>(Uo(s,o),o)]}const[mr,gr]=kt("Motion"),[yr]=kt("LayoutGroup");function Vn(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}class Z{constructor(e){this.state=e}beforeMount(){}mount(){}unmount(){}update(){}beforeUpdate(){}beforeUnmount(){}}function Pt(t,e,n){if(Array.isArray(t))return t.reduce((s,i)=>{const r=Pt(i,e,n);return r?{...s,...r}:s},{});if(typeof t=="object")return t;if(t&&e){const s=e[t];return typeof s=="function"?s(n):s}}function vr(t,e){return typeof t!=typeof e?!0:Array.isArray(t)&&Array.isArray(e)?!Tr(t,e):t!==e}function Tr(t,e){const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}function En(t){return t?.startsWith("--")}const xr=t=>t;function br(t){return typeof t=="number"}const Sr=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],wr=new Set(Sr);function ui(t){return wr.has(t)}class Ar{constructor(e){this.features=[];const{features:n=[],lazyMotionContext:s}=e.options,i=n.concat(s.features.value);this.features=i.map(o=>new o(e));const r=this.features;ti(s.features,o=>{o.forEach(a=>{if(!i.includes(a)){i.push(a);const l=new a(e);r.push(l),e.isMounted()&&(l.beforeMount(),l.mount())}})},{flush:"pre"})}mount(){this.features.forEach(e=>e.mount())}beforeMount(){this.features.forEach(e=>{var n;return(n=e.beforeMount)==null?void 0:n.call(e)})}unmount(){this.features.forEach(e=>e.unmount())}update(){this.features.forEach(e=>{var n;return(n=e.update)==null?void 0:n.call(e)})}beforeUpdate(){this.features.forEach(e=>e.beforeUpdate())}beforeUnmount(){this.features.forEach(e=>e.beforeUnmount())}}const ft=new WeakMap;function ae(t){const e=ft.get(t);e&&t.removeEventListener("motioncomplete",e),ft.delete(t)}const[Pr,Vr]=kt("AnimatePresenceContext");function Er(t){const e={initial:t.initial,custom:t.custom};ti(()=>t.custom,n=>{e.custom=n},{flush:"pre"}),Vr(e),ei(()=>{e.initial=void 0})}function Cr(t){return typeof t=="string"||t===!1||Array.isArray(t)}const Vt=new WeakMap;let Mr=0;class Dr{constructor(e,n){var s;this.element=null,this.isSafeToRemove=!1,this.isVShow=!1,this.children=new Set,this.activeStates={initial:!0,animate:!0},this.currentProcess=null,this._context=null,this.animateUpdates=k,this.id=`motion-state-${Mr++}`,this.options=e,this.parent=n,(s=n?.children)==null||s.add(this);const r=(e.initial===void 0&&e.variants?this.context.initial:e.initial)===!1?["initial","animate"]:["initial"];this.initTarget(r),this.featureManager=new Ar(this),this.type=ui(this.options.as)?"svg":"html"}get context(){if(!this._context){const e={get:(n,s)=>{var i;return Cr(this.options[s])?this.options[s]:(i=this.parent)==null?void 0:i.context[s]}};this._context=new Proxy({},e)}return this._context}initTarget(e){var n;const s=this.options.custom??((n=this.options.animatePresenceContext)==null?void 0:n.custom);this.baseTarget=e.reduce((i,r)=>({...i,...Pt(this.options[r]||this.context[r],this.options.variants,s)}),{}),this.target={}}updateOptions(e){var n;this.options=e,(n=this.visualElement)==null||n.update({...this.options,whileTap:this.options.whilePress},{isPresent:!ft.has(this.element)})}beforeMount(){this.featureManager.beforeMount()}mount(e,n,s=!1){var i,r;this.element=e,this.updateOptions(n),this.options.layoutId&&((i=this.visualElement.projection.getStack())==null?void 0:i.members.length)>0,this.featureManager.mount(),!s&&this.options.animate&&((r=this.startAnimation)==null||r.call(this))}clearAnimation(){var e,n;this.currentProcess&&Y(this.currentProcess),this.currentProcess=null,(n=(e=this.visualElement)==null?void 0:e.variantChildren)==null||n.forEach(s=>{s.state.clearAnimation()})}startAnimation(){this.clearAnimation(),this.currentProcess=V.render(()=>{this.currentProcess=null,this.animateUpdates()})}beforeUnmount(){this.featureManager.beforeUnmount()}unmount(e=!1){var n;const s=this.options.layoutId&&((n=this.visualElement.projection)==null?void 0:n.getStack().lead)===this.visualElement.projection&&this.visualElement.projection.isProjecting(),i=()=>{var r,o,a;e&&Array.from(this.children).reverse().forEach(this.unmountChild),(o=(r=this.parent)==null?void 0:r.children)==null||o.delete(this),Vt.delete(this.element),this.featureManager.unmount(),(a=this.visualElement)==null||a.unmount(),this.clearAnimation()};s?Promise.resolve().then(()=>{i()}):i()}unmountChild(e){e.unmount(!0)}beforeUpdate(){this.featureManager.beforeUpdate()}update(e){this.updateOptions(e),this.featureManager.update(),this.startAnimation()}setActive(e,n,s=!0){var i;!this.element||this.activeStates[e]===n||(this.activeStates[e]=n,(i=this.visualElement.variantChildren)==null||i.forEach(r=>{r.state.setActive(e,n,!1)}),s&&this.animateUpdates({isExit:e==="exit"&&this.activeStates.exit}))}isMounted(){return!!this.element}willUpdate(e){var n;(this.options.layout||this.options.layoutId)&&((n=this.visualElement.projection)==null||n.willUpdate())}}const at=new WeakMap;function Cn(t,e,n){return new CustomEvent(t,{detail:{target:e,isExit:n}})}const Mn={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>`${t}deg`},Rr={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>`${t}px`},rotate:Mn,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:xr},skew:Mn},Lr=["translate","scale","rotate","skew"],Br=["","X","Y","Z"],Ne=new Map,Zt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"];Lr.forEach(t=>{Br.forEach(e=>{Zt.push(t+e),Ne.set(t+e,Rr[t])})});const jr=new Set(Zt),Fr=t=>jr.has(t),Dn={x:"translateX",y:"translateY",z:"translateZ"};function kr([t],[e]){return Zt.indexOf(t)-Zt.indexOf(e)}function Or(t,[e,n]){return`${t} ${e}(${n})`}function Ir(t){return t.sort(kr).reduce(Or,"").trim()}const Rn={translate:[0,0],rotate:0,scale:1,skew:0,x:0,y:0,z:0},Ot=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),tt=Ot("deg"),W=Ot("%"),x=Ot("px"),_r=Ot("vh"),Ur=Ot("vw"),Ln={...W,parse:t=>W.parse(t)/100,transform:t=>W.transform(t*100)},L=t=>!!(t&&t.getVelocity),$r={get:(t,e)=>{let n=En(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!n&&n!=="0"){const s=Ne.get(e);s&&(n=s.initialValue)}return n},set:(t,e,n)=>{En(e)?t.style.setProperty(e,n):t.style[e]=n}};function Nr(t){var e;const n={},s=[];for(let i in t){let r=t[i];r=L(r)?r.get():r,Fr(i)&&i in Dn&&(i=Dn[i]);let o=Array.isArray(r)?r[0]:r;const a=Ne.get(i);a?(o=br(r)?(e=a.toDefaultUnit)==null?void 0:e.call(a,r):r,s.push([i,o])):n[i]=o}return s.length&&(n.transform=Ir(s)),Object.keys(n).length===0?null:n}const Kr={fill:!0,stroke:!0,opacity:!0,"stroke-width":!0,"fill-opacity":!0,"stroke-opacity":!0,"stroke-linecap":!0,"stroke-linejoin":!0,"stroke-dasharray":!0,"stroke-dashoffset":!0,cx:!0,cy:!0,r:!0,d:!0,x1:!0,y1:!0,x2:!0,y2:!0,points:!0,"path-length":!0,viewBox:!0,width:!0,height:!0,"preserve-aspect-ratio":!0,"clip-path":!0,filter:!0,mask:!0,"stop-color":!0,"stop-opacity":!0,"gradient-transform":!0,"gradient-units":!0,"spread-method":!0,"marker-end":!0,"marker-mid":!0,"marker-start":!0,"text-anchor":!0,"dominant-baseline":!0,"font-family":!0,"font-size":!0,"font-weight":!0,"letter-spacing":!0,"vector-effect":!0};function Wr(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Gr(t,e,n=1,s=0){t.pathLength=1,delete t["path-length"],t["stroke-dashoffset"]=x.transform(-s);const i=x.transform(e),r=x.transform(n);t["stroke-dasharray"]=`${i} ${r}`}function zr(t){const e={},n={};for(const s in t){const i=Wr(s);if(i in Kr){const r=t[s];e[i]=L(r)?r.get():r}else n[s]=t[s]}return e["path-length"]!==void 0&&Gr(e,e["path-length"],e["path-spacing"],e["path-offset"]),{attrs:e,style:n}}function Hr({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Xr(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Yr(t,e){return Hr(Xr(t.getBoundingClientRect(),e))}const Bn={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"]},Se={};for(const t in Bn)Se[t]={isEnabled:e=>Bn[t].some(n=>!!e[n])};const jn=()=>({translate:0,scale:1,origin:0,originPoint:0}),ut=()=>({x:jn(),y:jn()}),Fn=()=>({min:0,max:0}),D=()=>({x:Fn(),y:Fn()}),qr=typeof window<"u",Qt={current:null},ci={current:!1};function Zr(){if(ci.current=!0,!!qr)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Qt.current=t.matches;t.addEventListener("change",e),e()}else Qt.current=!1}function Qr(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Jr(t){return typeof t=="string"||Array.isArray(t)}const ta=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ea=["initial",...ta];function hi(t){return Qr(t.animate)||ea.some(e=>Jr(t[e]))}function na(t){return!!(hi(t)||t.variants)}function Ke(t,e){t.indexOf(e)===-1&&t.push(e)}function ie(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class We{constructor(){this.subscriptions=[]}add(e){return Ke(this.subscriptions,e),()=>ie(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function fi(t,e){return e?t*(1e3/e):0}const kn=30,sa=t=>!isNaN(parseFloat(t));class ia{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var i;const r=F.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=F.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=sa(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new We);const s=this.events[e].add(n);return e==="change"?()=>{s(),V.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=F.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>kn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,kn);return fi(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function dt(t,e){return new ia(t,e)}function oa(t,e,n){for(const s in e){const i=e[s],r=n[s];if(L(i))t.addValue(s,i);else if(L(r))t.addValue(s,dt(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,dt(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}function On(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function di(t,e,n,s){if(typeof e=="function"){const[i,r]=On(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=On(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function ra(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const st=t=>t*180/Math.PI,we=t=>{const e=st(Math.atan2(t[1],t[0]));return Ae(e)},aa={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:we,rotateZ:we,skewX:t=>st(Math.atan(t[1])),skewY:t=>st(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Ae=t=>(t=t%360,t<0&&(t+=360),t),In=we,_n=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Un=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),la={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:_n,scaleY:Un,scale:t=>(_n(t)+Un(t))/2,rotateX:t=>Ae(st(Math.atan2(t[6],t[5]))),rotateY:t=>Ae(st(Math.atan2(-t[2],t[0]))),rotateZ:In,rotate:In,skewX:t=>st(Math.atan(t[4])),skewY:t=>st(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Pe(t){return t.includes("scale")?1:0}function Ve(t,e){if(!t||t==="none")return Pe(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=la,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=aa,i=a}if(!i)return Pe(e);const r=s[e],o=i[1].split(",").map(ca);return typeof r=="function"?r(o):o[r]}const ua=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Ve(n,e)};function ca(t){return parseFloat(t.trim())}const mt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],gt=new Set(mt),q=(t,e,n)=>n>e?e:n<t?t:n,yt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Bt={...yt,transform:t=>q(0,1,t)},Wt={...yt,default:1},$n=t=>t===yt||t===x,ha=new Set(["x","y","z"]),fa=mt.filter(t=>!ha.has(t));function da(t){const e=[];return fa.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const ot={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),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})=>Ve(e,"x"),y:(t,{transform:e})=>Ve(e,"y")};ot.translateX=ot.x;ot.translateY=ot.y;const rt=new Set;let Ee=!1,Ce=!1,Me=!1;function pi(){if(Ce){const t=Array.from(rt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=da(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{var a;(a=s.getValue(r))==null||a.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Ce=!1,Ee=!1,rt.forEach(t=>t.complete(Me)),rt.clear()}function mi(){rt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ce=!0)})}function pa(){Me=!0,mi(),pi(),Me=!1}class Ge{constructor(e,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(rt.add(this),Ee||(Ee=!0,V.read(mi),V.resolveKeyframes(pi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i?.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&r===void 0&&i.set(e[0])}ra(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),rt.delete(this)}cancel(){this.state==="scheduled"&&(rt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const gi=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),yi=t=>/^0[^.\s]+$/u.test(t),Et=t=>Math.round(t*1e5)/1e5,ze=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ma(t){return t==null}const ga=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,He=(t,e)=>n=>!!(typeof n=="string"&&ga.test(n)&&n.startsWith(t)||e&&!ma(n)&&Object.prototype.hasOwnProperty.call(n,e)),vi=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(ze);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},ya=t=>q(0,255,t),le={...yt,transform:t=>Math.round(ya(t))},it={test:He("rgb","red"),parse:vi("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+le.transform(t)+", "+le.transform(e)+", "+le.transform(n)+", "+Et(Bt.transform(s))+")"};function va(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const De={test:He("#"),parse:va,transform:it.transform},ct={test:He("hsl","hue"),parse:vi("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+W.transform(Et(e))+", "+W.transform(Et(n))+", "+Et(Bt.transform(s))+")"},R={test:t=>it.test(t)||De.test(t)||ct.test(t),parse:t=>it.test(t)?it.parse(t):ct.test(t)?ct.parse(t):De.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?it.transform(t):ct.transform(t),getAnimatableNone:t=>{const e=R.parse(t);return e.alpha=0,R.transform(e)}},Ta=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function xa(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(ze))==null?void 0:e.length)||0)+(((n=t.match(Ta))==null?void 0:n.length)||0)>0}const Ti="number",xi="color",ba="var",Sa="var(",Nn="${}",wa=/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 jt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(wa,l=>(R.test(l)?(s.color.push(r),i.push(xi),n.push(R.parse(l))):l.startsWith(Sa)?(s.var.push(r),i.push(ba),n.push(l)):(s.number.push(r),i.push(Ti),n.push(parseFloat(l))),++r,Nn)).split(Nn);return{values:n,split:a,indexes:s,types:i}}function bi(t){return jt(t).values}function Si(t){const{split:e,types:n}=jt(t),s=e.length;return i=>{let r="";for(let o=0;o<s;o++)if(r+=e[o],i[o]!==void 0){const a=n[o];a===Ti?r+=Et(i[o]):a===xi?r+=R.transform(i[o]):r+=i[o]}return r}}const Aa=t=>typeof t=="number"?0:R.test(t)?R.getAnimatableNone(t):t;function Pa(t){const e=bi(t);return Si(t)(e.map(Aa))}const et={test:xa,parse:bi,createTransformer:Si,getAnimatableNone:Pa},Va={test:t=>t==="auto",parse:t=>t},wi=t=>e=>e.test(t),Ai=[yt,x,W,tt,Ur,_r,Va],Kn=t=>Ai.find(wi(t)),Ea=[...Ai,R,et],Ca=t=>Ea.find(wi(t)),Ma=new Set(["brightness","contrast","saturate","opacity"]);function Da(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(ze)||[];if(!s)return t;const i=n.replace(s,"");let r=Ma.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Ra=/\b([a-z-]*)\(.*?\)/gu,Re={...et,getAnimatableNone:t=>{const e=t.match(Ra);return e?e.map(Da).join(" "):t}},Wn={...yt,transform:Math.round},La={rotate:tt,rotateX:tt,rotateY:tt,rotateZ:tt,scale:Wt,scaleX:Wt,scaleY:Wt,scaleZ:Wt,skew:tt,skewX:tt,skewY:tt,distance:x,translateX:x,translateY:x,translateZ:x,x,y:x,z:x,perspective:x,transformPerspective:x,opacity:Bt,originX:Ln,originY:Ln,originZ:x},Xe={borderWidth:x,borderTopWidth:x,borderRightWidth:x,borderBottomWidth:x,borderLeftWidth:x,borderRadius:x,radius:x,borderTopLeftRadius:x,borderTopRightRadius:x,borderBottomRightRadius:x,borderBottomLeftRadius:x,width:x,maxWidth:x,height:x,maxHeight:x,top:x,right:x,bottom:x,left:x,padding:x,paddingTop:x,paddingRight:x,paddingBottom:x,paddingLeft:x,margin:x,marginTop:x,marginRight:x,marginBottom:x,marginLeft:x,backgroundPositionX:x,backgroundPositionY:x,...La,zIndex:Wn,fillOpacity:Bt,strokeOpacity:Bt,numOctaves:Wn},Ba={...Xe,color:R,backgroundColor:R,outlineColor:R,fill:R,stroke:R,borderColor:R,borderTopColor:R,borderRightColor:R,borderBottomColor:R,borderLeftColor:R,filter:Re,WebkitFilter:Re},Pi=t=>Ba[t];function Vi(t,e){let n=Pi(t);return n!==Re&&(n=et),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const{schedule:Ei}=ri(queueMicrotask,!0),Gn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ci{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ge,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=F.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,V.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=hi(n),this.isVariantNode=na(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in h){const f=h[d];l[d]!==void 0&&L(f)&&f.set(l[d])}}mount(e){var n;this.current=e,at.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,i)=>this.bindToMotionValue(i,s)),ci.current||Zr(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Qt.current,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),Y(this.notifyUpdate),Y(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=gt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&V.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Se){const n=Se[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):D()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Gn.length;s++){const i=Gn[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=oa(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=dt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(gi(s)||yi(s))?s=parseFloat(s):!Ca(s)&&et.test(n)&&(s=Vi(e,n)),this.setBaseTarget(e,L(s)?s.get():s)),L(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props;let i;if(typeof s=="string"||typeof s=="object"){const o=di(this.props,s,(n=this.presenceContext)==null?void 0:n.custom);o&&(i=o[e])}if(s&&i!==void 0)return i;const r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!L(r)?r:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new We),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Ei.render(this.render)}}const Mi=new Set(["width","height","top","left","right","bottom",...mt]);let Ye=()=>{};const ja=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Fa(t){const e=ja.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Di(t,e,n=1){const[s,i]=Fa(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return gi(o)?parseFloat(o):o}return $e(i)?Di(i,e,n+1):i}function ka(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||yi(t):!0}const Oa=new Set(["auto","none","0"]);function Ia(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!Oa.has(r)&&jt(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=Vi(n,i)}class _a extends Ge{constructor(e,n,s,i,r){super(e,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let c=e[l];if(typeof c=="string"&&(c=c.trim(),$e(c))){const u=Di(c,n.current);u!==void 0&&(e[l]=u),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Mi.has(s)||e.length!==2)return;const[i,r]=e,o=Kn(i),a=Kn(r);if(o!==a)if($n(o)&&$n(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else ot[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||ka(e[i]))&&s.push(i);s.length&&Ia(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ot[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){var e;const{element:n,name:s,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const r=n.getValue(s);r&&r.jump(this.measuredOrigin,!1);const o=i.length-1,a=i[o];i[o]=ot[s](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(e=this.removedTransforms)!=null&&e.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}class Ri extends Ci{constructor(){super(...arguments),this.KeyframeResolver=_a}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;L(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}const Li=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Ua={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},$a=mt.length;function Na(t,e,n){let s="",i=!0;for(let r=0;r<$a;r++){const o=mt[r],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=Li(a,Xe[o]);if(!l){i=!1;const u=Ua[o]||o;s+=`${u}(${c}) `}n&&(e[o]=c)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Bi(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const l in e){const c=e[l];if(gt.has(l)){o=!0;continue}else if(Ue(l)){i[l]=c;continue}else{const u=Li(c,Xe[l]);l.startsWith("origin")?(a=!0,r[l]=u):s[l]=u}}if(e.transform||(o||n?s.transform=Na(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=r;s.transformOrigin=`${l} ${c} ${u}`}}function ji(t,{style:e,vars:n},s,i){const r=t.style;let o;for(o in e)r[o]=e[o];i?.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function Ka(t,{layout:e,layoutId:n}){return gt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Lt[t]||t==="opacity")}function Fi(t,e,n){var s;const{style:i}=t,r={};for(const o in i)(L(i[o])||e.style&&L(e.style[o])||Ka(o,t)||((s=n?.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(r[o]=i[o]);return r}function Wa(t){return window.getComputedStyle(t)}class ki extends Ri{constructor(){super(...arguments),this.type="html",this.renderInstance=ji}readValueFromInstance(e,n){var s;if(gt.has(n))return(s=this.projection)!=null&&s.isProjecting?Pe(n):ua(e,n);{const i=Wa(e),r=(Ue(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Yr(e,n)}build(e,n,s){Bi(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Fi(e,n,s)}}const qe=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ga={offset:"stroke-dashoffset",array:"stroke-dasharray"},za={offset:"strokeDashoffset",array:"strokeDasharray"};function Ha(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?Ga:za;t[r.offset]=x.transform(-s);const o=x.transform(e),a=x.transform(n);t[r.array]=`${o} ${a}`}function Xa(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},l,c,u){if(Bi(t,a,c),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;h.transform&&(d.transform=h.transform,delete h.transform),(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete h.transformBox),e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&Ha(h,i,r,o,!1)}const Oi=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"]),Ya=t=>typeof t=="string"&&t.toLowerCase()==="svg";function qa(t,e,n,s){ji(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Oi.has(i)?i:qe(i),e.attrs[i])}function Za(t,e,n){const s=Fi(t,e,n);for(const i in t)if(L(t[i])||L(e[i])){const r=mt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}class Ii extends Ri{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=D}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(gt.has(n)){const s=Pi(n);return s&&s.default||0}return n=Oi.has(n)?n:qe(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Za(e,n,s)}build(e,n,s){Xa(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){qa(e,n,s,i)}mount(e){this.isSVGTag=Ya(e.tagName),super.mount(e)}}function Qa(t,e){return ui(t)?new Ii(e):new ki(e)}function Ja(t,e,n,s=0,i=1){const r=Array.from(t),o=r.indexOf(e),a=t.size,l=(a-1)*s,c=typeof n=="function";return o===r.length-1&&(e.parent.enteringChildren=void 0),c?n(o,a):i===1?o*s:l-o*s}function Ze(t){return typeof t=="object"&&!Array.isArray(t)}function Qe(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}function _i(t,e,n,s){return typeof t=="string"&&Ze(e)?Qe(t,n,s):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function tl(t,e,n){return t*(e+1)}function zn(t,e,n,s){return typeof e=="number"?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):e==="<"?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):s.get(e)??t}const E=(t,e,n)=>t+(e-t)*n,el=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t},Ui=t=>Array.isArray(t)&&typeof t[0]!="number";function $i(t,e){return Ui(t)?t[el(0,t.length,e)]:t}function nl(t,e,n){for(let s=0;s<t.length;s++){const i=t[s];i.at>e&&i.at<n&&(ie(t,i),s--)}}function sl(t,e,n,s,i,r){nl(t,i,r);for(let o=0;o<e.length;o++)t.push({value:e[o],at:E(i,r,s[o]),easing:$i(n,o)})}function il(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function ol(t,e){return t.at===e.at?t.value===null?1:e.value===null?-1:0:t.at-e.at}const pt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};function Ni(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=pt(0,e,s);t.push(E(n,1,i))}}function Ki(t){const e=[0];return Ni(e,t.length-1),e}const Jt=2e4;function Je(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Jt;)e+=n,s=t.next(e);return e>=Jt?1/0:e}function Wi(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(Je(s),Jt);return{type:"keyframes",ease:r=>s.next(i*r).value/e,duration:K(i)}}function tn(t){return typeof t=="function"&&"applyToOptions"in t}const rl="easeInOut";function al(t,{defaultTransition:e={},...n}={},s,i){const r=e.duration||.3,o=new Map,a=new Map,l={},c=new Map;let u=0,h=0,d=0;for(let f=0;f<t.length;f++){const p=t[f];if(typeof p=="string"){c.set(p,h);continue}else if(!Array.isArray(p)){c.set(p.name,zn(h,p.at,u,c));continue}let[m,g,y={}]=p;y.at!==void 0&&(h=zn(h,y.at,u,c));let b=0;const v=(w,T,A,C=0,S=0)=>{const P=ll(w),{delay:O=0,times:$=Ki(P),type:oe="keyframes",repeat:Ut,repeatType:Mh,repeatDelay:Dh=0,...Io}=T;let{ease:Q=e.ease||"easeOut",duration:G}=T;const dn=typeof O=="function"?O(C,S):O,pn=P.length,mn=tn(oe)?oe:i?.[oe||"keyframes"];if(pn<=2&&mn){let vt=100;if(pn===2&&hl(P)){const Tt=P[1]-P[0];vt=Math.abs(Tt)}const $t={...Io};G!==void 0&&($t.duration=U(G));const Nt=Wi($t,vt,mn);Q=Nt.ease,G=Nt.duration}G??(G=r);const gn=h+dn;$.length===1&&$[0]===0&&($[1]=1);const yn=$.length-P.length;if(yn>0&&Ni($,yn),P.length===1&&P.unshift(null),Ut){G=tl(G,Ut);const vt=[...P],$t=[...$];Q=Array.isArray(Q)?[...Q]:[Q];const Nt=[...Q];for(let Tt=0;Tt<Ut;Tt++){P.push(...vt);for(let xt=0;xt<vt.length;xt++)$.push($t[xt]+(Tt+1)),Q.push(xt===0?"linear":$i(Nt,xt-1))}il($,Ut)}const vn=gn+G;sl(A,P,Q,$,gn,vn),b=Math.max(dn+G,b),d=Math.max(vn,d)};if(L(m)){const w=Hn(m,a);v(g,y,Xn("default",w))}else{const w=_i(m,g,s,l),T=w.length;for(let A=0;A<T;A++){g=g,y=y;const C=w[A],S=Hn(C,a);for(const P in g)v(g[P],ul(y,P),Xn(P,S),A,T)}}u=h,h+=b}return a.forEach((f,p)=>{for(const m in f){const g=f[m];g.sort(ol);const y=[],b=[],v=[];for(let T=0;T<g.length;T++){const{at:A,value:C,easing:S}=g[T];y.push(C),b.push(pt(0,d,A)),v.push(S||"easeOut")}b[0]!==0&&(b.unshift(0),y.unshift(y[0]),v.unshift(rl)),b[b.length-1]!==1&&(b.push(1),y.push(null)),o.has(p)||o.set(p,{keyframes:{},transition:{}});const w=o.get(p);w.keyframes[m]=y,w.transition[m]={...e,duration:d,ease:v,times:b,...n}}}),o}function Hn(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Xn(t,e){return e[t]||(e[t]=[]),e[t]}function ll(t){return Array.isArray(t)?t:[t]}function ul(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const cl=t=>typeof t=="number",hl=t=>t.every(cl),fl=t=>Array.isArray(t);function dl(t,e,n){const s=t.getProps();return di(s,e,s.custom,t)}function pl(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,dt(n))}function ml(t){return fl(t)?t[t.length-1]||0:t}function gl(t,e){const n=dl(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=ml(r[o]);pl(t,o,a)}}function yl(t){return!!(L(t)&&t.add)}function vl(t,e){const n=t.getValue("willChange");if(yl(n))return n.add(e);if(!n&&X.WillChange){const s=new X.WillChange("auto");t.addValue("willChange",s),s.add(e)}}const Tl="framerAppearId",xl="data-"+qe(Tl);function Gi(t){return t.props[xl]}const bl=t=>t!==null;function Sl(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(bl),r=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[r]}const wl={type:"spring",stiffness:500,damping:25,restSpeed:10},Al=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Pl={type:"keyframes",duration:.8},Vl={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},El=(t,{keyframes:e})=>e.length>2?Pl:gt.has(t)?t.startsWith("scale")?Al(e[1]):wl:Vl;function Cl({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function en(t,e){return t?.[e]??t?.default??t}function Le(t){t.duration=0,t.type}function ue(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Ml({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=ue(l,a,t+1/3),r=ue(l,a,t),o=ue(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function te(t,e){return n=>n>0?e:t}const ce=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Dl=[De,it,ct],Rl=t=>Dl.find(e=>e.test(t));function Yn(t){const e=Rl(t);if(!e)return!1;let n=e.parse(t);return e===ct&&(n=Ml(n)),n}const qn=(t,e)=>{const n=Yn(t),s=Yn(e);if(!n||!s)return te(t,e);const i={...n};return r=>(i.red=ce(n.red,s.red,r),i.green=ce(n.green,s.green,r),i.blue=ce(n.blue,s.blue,r),i.alpha=E(n.alpha,s.alpha,r),it.transform(i))},Be=new Set(["none","hidden"]);function Ll(t,e){return Be.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}const Bl=(t,e)=>n=>e(t(n)),It=(...t)=>t.reduce(Bl);function jl(t,e){return n=>E(t,e,n)}function nn(t){return typeof t=="number"?jl:typeof t=="string"?$e(t)?te:R.test(t)?qn:Ol:Array.isArray(t)?zi:typeof t=="object"?R.test(t)?qn:Fl:te}function zi(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>nn(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function Fl(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=nn(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function kl(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const r=e.types[i],o=t.indexes[r][s[r]],a=t.values[o]??0;n[i]=a,s[r]++}return n}const Ol=(t,e)=>{const n=et.createTransformer(e),s=jt(t),i=jt(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Be.has(t)&&!i.values.length||Be.has(e)&&!s.values.length?Ll(t,e):It(zi(kl(s,i),i.values),n):te(t,e)};function Hi(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?E(t,e,n):nn(t)(t,e)}const Il=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>V.update(e,n),stop:()=>Y(e),now:()=>B.isProcessing?B.timestamp:F.now()}},Xi=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=Math.round(t(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},_l=5;function Yi(t,e,n){const s=Math.max(e-_l,0);return fi(n-t(s),e-s)}const M={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},he=.001;function Ul({duration:t=M.duration,bounce:e=M.bounce,velocity:n=M.velocity,mass:s=M.mass}){let i,r,o=1-e;o=q(M.minDamping,M.maxDamping,o),t=q(M.minDuration,M.maxDuration,K(t)),o<1?(i=c=>{const u=c*o,h=u*t,d=u-n,f=je(c,o),p=Math.exp(-h);return he-d/f*p},r=c=>{const h=c*o*t,d=h*n+n,f=Math.pow(o,2)*Math.pow(c,2)*t,p=Math.exp(-h),m=je(Math.pow(c,2),o);return(-i(c)+he>0?-1:1)*((d-f)*p)/m}):(i=c=>{const u=Math.exp(-c*t),h=(c-n)*t+1;return-he+u*h},r=c=>{const u=Math.exp(-c*t),h=(n-c)*(t*t);return u*h});const a=5/t,l=Nl(i,r,a);if(t=U(t),isNaN(l))return{stiffness:M.stiffness,damping:M.damping,duration:t};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:o*2*Math.sqrt(s*c),duration:t}}}const $l=12;function Nl(t,e,n){let s=n;for(let i=1;i<$l;i++)s=s-t(s)/e(s);return s}function je(t,e){return t*Math.sqrt(1-e*e)}const Kl=["duration","bounce"],Wl=["stiffness","damping","mass"];function Zn(t,e){return e.some(n=>t[n]!==void 0)}function Gl(t){let e={velocity:M.velocity,stiffness:M.stiffness,damping:M.damping,mass:M.mass,isResolvedFromDuration:!1,...t};if(!Zn(t,Wl)&&Zn(t,Kl))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*q(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:M.mass,stiffness:i,damping:r}}else{const n=Ul(t);e={...e,...n,mass:M.mass},e.isResolvedFromDuration=!0}return e}function Ft(t=M.visualDuration,e=M.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:c,mass:u,duration:h,velocity:d,isResolvedFromDuration:f}=Gl({...n,velocity:-K(n.velocity||0)}),p=d||0,m=c/(2*Math.sqrt(l*u)),g=o-r,y=K(Math.sqrt(l/u)),b=Math.abs(g)<5;s||(s=b?M.restSpeed.granular:M.restSpeed.default),i||(i=b?M.restDelta.granular:M.restDelta.default);let v;if(m<1){const T=je(y,m);v=A=>{const C=Math.exp(-m*y*A);return o-C*((p+m*y*g)/T*Math.sin(T*A)+g*Math.cos(T*A))}}else if(m===1)v=T=>o-Math.exp(-y*T)*(g+(p+y*g)*T);else{const T=y*Math.sqrt(m*m-1);v=A=>{const C=Math.exp(-m*y*A),S=Math.min(T*A,300);return o-C*((p+m*y*g)*Math.sinh(S)+T*g*Math.cosh(S))/T}}const w={calculatedDuration:f&&h||null,next:T=>{const A=v(T);if(f)a.done=T>=h;else{let C=T===0?p:0;m<1&&(C=T===0?U(p):Yi(v,T,A));const S=Math.abs(C)<=s,P=Math.abs(o-A)<=i;a.done=S&&P}return a.value=a.done?o:A,a},toString:()=>{const T=Math.min(Je(w),Jt),A=Xi(C=>w.next(T*C).value,T,30);return T+"ms "+A},toTransition:()=>{}};return w}Ft.applyToOptions=t=>{const e=Wi(t,100,Ft);return t.ease=e.ease,t.duration=U(e.duration),t.type="keyframes",t};function Fe({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},f=S=>a!==void 0&&S<a||l!==void 0&&S>l,p=S=>a===void 0?l:l===void 0||Math.abs(a-S)<Math.abs(l-S)?a:l;let m=n*e;const g=h+m,y=o===void 0?g:o(g);y!==g&&(m=y-h);const b=S=>-m*Math.exp(-S/s),v=S=>y+b(S),w=S=>{const P=b(S),O=v(S);d.done=Math.abs(P)<=c,d.value=d.done?y:O};let T,A;const C=S=>{f(d.value)&&(T=S,A=Ft({keyframes:[d.value,p(d.value)],velocity:Yi(v,S,d.value),damping:i,stiffness:r,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:S=>{let P=!1;return!A&&T===void 0&&(P=!0,w(S),C(S)),T!==void 0&&S>=T?A.next(S-T):(!P&&w(S),d)}}}function zl(t,e,n){const s=[],i=n||X.mix||Hi,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||k:e;a=It(l,a)}s.push(a)}return s}function Hl(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(Ye(r===e.length),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=zl(e,s,i),l=a.length,c=u=>{if(o&&u<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(u<t[h+1]);h++);const d=pt(t[h],t[h+1],u);return a[h](d)};return n?u=>c(q(t[0],t[r-1],u)):c}function Xl(t,e){return t.map(n=>n*e)}const qi=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Yl=1e-7,ql=12;function Zl(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=qi(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>Yl&&++a<ql);return o}function _t(t,e,n,s){if(t===e&&n===s)return k;const i=r=>Zl(r,0,1,t,n);return r=>r===0||r===1?r:qi(i(r),e,s)}const Ql=_t(.42,0,1,1),Jl=_t(0,0,.58,1),Zi=_t(.42,0,.58,1),Qi=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Ji=t=>e=>1-t(1-e),to=_t(.33,1.53,.69,.99),sn=Ji(to),eo=Qi(sn),no=t=>(t*=2)<1?.5*sn(t):.5*(2-Math.pow(2,-10*(t-1))),on=t=>1-Math.sin(Math.acos(t)),so=Ji(on),io=Qi(on),oo=t=>Array.isArray(t)&&typeof t[0]=="number",tu={linear:k,easeIn:Ql,easeInOut:Zi,easeOut:Jl,circIn:on,circInOut:io,circOut:so,backIn:sn,backInOut:eo,backOut:to,anticipate:no},eu=t=>typeof t=="string",Qn=t=>{if(oo(t)){Ye(t.length===4);const[e,n,s,i]=t;return _t(e,n,s,i)}else if(eu(t))return tu[t];return t};function nu(t,e){return t.map(()=>e||Zi).splice(0,t.length-1)}function Ct({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Ui(s)?s.map(Qn):Qn(s),r={done:!1,value:e[0]},o=Xl(n&&n.length===e.length?n:Ki(e),t),a=Hl(o,e,{ease:Array.isArray(i)?i:nu(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const su=t=>t!==null;function rn(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(su),a=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const iu={decay:Fe,inertia:Fe,tween:Ct,keyframes:Ct,spring:Ft};function ro(t){typeof t.type=="string"&&(t.type=iu[t.type])}class an{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const ou=t=>t/100;class ln extends an{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var n,s;const{motionValue:i}=this.options;i&&i.updatedAt!==F.now()&&this.tick(F.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(n=this.options).onStop)==null||s.call(n))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;ro(e);const{type:n=Ct,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const l=n||Ct;l!==Ct&&typeof a[0]!="number"&&(this.mixKeyframes=It(ou,Hi(a[0],a[1])),a=[0,100]);const c=l({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=Je(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=c}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:c=0,keyframes:u,repeat:h,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,w=s;if(h){const S=Math.min(this.currentTime,i)/a;let P=Math.floor(S),O=S%1;!O&&S>=1&&(O=1),O===1&&P--,P=Math.min(P,h+1),P%2&&(d==="reverse"?(O=1-O,f&&(O-=f/a)):d==="mirror"&&(w=o)),v=q(0,1,O)*a}const T=b?{done:!1,value:u[0]}:w.next(v);r&&(T.value=r(T.value));let{done:A}=T;!b&&l!==null&&(A=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return C&&p!==Fe&&(T.value=rn(u,this.options,g,this.speed)),m&&m(T.value),C&&this.finish(),T}then(e,n){return this.finished.then(e,n)}get duration(){return K(this.calculatedDuration)}get time(){return K(this.currentTime)}set time(e){var n;e=U(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(F.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=K(this.currentTime))}play(){var e,n;if(this.isStopped)return;const{driver:s=Il,startTime:i}=this.options;this.driver||(this.driver=s(o=>this.tick(o))),(n=(e=this.options).onPlay)==null||n.call(e);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=i??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(F.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}const ru=t=>t.startsWith("--");function au(t,e,n){ru(e)?t.style.setProperty(e,n):t.style[e]=n}function un(t){let e;return()=>(e===void 0&&(e=t()),e)}const lu=un(()=>window.ScrollTimeline!==void 0),uu={};function cu(t,e){const n=un(t);return()=>uu[e]??n()}const ao=cu(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),St=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Jn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:St([0,.65,.55,1]),circOut:St([.55,0,1,.45]),backIn:St([.31,.01,.66,-.59]),backOut:St([.33,1.53,.69,.99])};function lo(t,e){if(t)return typeof t=="function"?ao()?Xi(t,e):"ease-out":oo(t)?St(t):Array.isArray(t)?t.map(n=>lo(n,e)||Jn.easeOut):Jn[t]}function hu(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=lo(a,i);Array.isArray(h)&&(u.easing=h);const d={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return c&&(d.pseudoElement=c),t.animate(u,d)}function fu({type:t,...e}){return tn(t)&&ao()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class du extends an{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,Ye(typeof e.type!="string");const c=fu(e);this.animation=hu(n,s,i,c,r),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const u=rn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):au(n,s,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,n;this.isPseudoElement||(n=(e=this.animation).commitStyles)==null||n.call(e)}get duration(){var e,n;const s=((n=(e=this.animation.effect)==null?void 0:e.getComputedTiming)==null?void 0:n.call(e).duration)||0;return K(Number(s))}get time(){return K(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=U(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&lu()?(this.animation.timeline=e,k):n(this)}}const uo={anticipate:no,backInOut:eo,circInOut:io};function pu(t){return t in uo}function mu(t){typeof t.ease=="string"&&pu(t.ease)&&(t.ease=uo[t.ease])}const ts=10;class gu extends du{constructor(e){mu(e),ro(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new ln({...o,autoplay:!1}),l=U(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-ts).value,a.sample(l).value,ts),a.stop()}}const es=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(et.test(t)||t==="0")&&!t.startsWith("url("));function yu(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function vu(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=es(i,e),a=es(r,e);return!o||!a?!1:yu(t)||(n==="spring"||tn(n))&&s}const Tu=new Set(["opacity","clipPath","filter","transform"]),xu=un(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function bu(t){var e;const{motionValue:n,name:s,repeatDelay:i,repeatType:r,damping:o,type:a}=t;if(!(((e=n?.owner)==null?void 0:e.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=n.owner.getProps();return xu()&&s&&Tu.has(s)&&(s!=="transform"||!u)&&!c&&!i&&r!=="mirror"&&o!==0&&a!=="inertia"}const Su=40;class wu extends an{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:c,element:u,...h}){var d;super(),this.stop=()=>{var m,g;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(g=this.keyframeResolver)==null||g.cancel()},this.createdAt=F.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:l,motionValue:c,element:u,...h},p=u?.KeyframeResolver||Ge;this.keyframeResolver=new p(a,(m,g,y)=>this.onKeyframesResolved(m,g,f,!y),l,c,u),(d=this.keyframeResolver)==null||d.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:u}=s;this.resolvedAt=F.now(),vu(e,r,o,a)||((X.instantAnimations||!l)&&u?.(rn(e,s,n)),e[0]=e[e.length-1],Le(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Su?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},f=!c&&bu(d)?new gu({...d,element:d.motionValue.owner.current}):new ln(d);f.finished.then(()=>this.notifyFinished()).catch(k),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),pa()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}const cn=(t,e,n,s={},i,r)=>o=>{const a=en(s,t)||{},l=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-U(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:d=>{e.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};Cl(a)||Object.assign(u,El(t,u)),u.duration&&(u.duration=U(u.duration)),u.repeatDelay&&(u.repeatDelay=U(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Le(u),u.delay===0&&(h=!0)),(X.instantAnimations||X.skipAnimations)&&(h=!0,Le(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const d=Sl(u.keyframes,a);if(d!==void 0){V.update(()=>{u.onUpdate(d),u.onComplete()});return}}return a.isSync?new ln(u):new wu(u)};function Au({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Pu(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r=t.getDefaultTransition(),transitionEnd:o,...a}=e;s&&(r=s);const l=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const u in a){const h=t.getValue(u,t.latestValues[u]??null),d=a[u];if(d===void 0||c&&Au(c,u))continue;const f={delay:n,...en(r||{},u)},p=h.get();if(p!==void 0&&!h.isAnimating&&!Array.isArray(d)&&d===p&&!f.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){const y=Gi(t);if(y){const b=window.MotionHandoffAnimation(y,u,V);b!==null&&(f.startTime=b,m=!0)}}vl(t,u),h.start(cn(u,h,d,t.shouldReduceMotion&&Mi.has(u)?{type:!1}:f,t,m));const g=h.animation;g&&l.push(g)}return o&&Promise.all(l).then(()=>{V.update(()=>{o&&gl(t,o)})}),l}function Vu(t,e){return t in e}class Eu extends Ci{constructor(){super(...arguments),this.type="object"}readValueFromInstance(e,n){if(Vu(n,e)){const s=e[n];if(typeof s=="string"||typeof s=="number")return s}}getBaseTargetFromProps(){}removeValueFromRenderState(e,n){delete n.output[e]}measureInstanceViewportBox(){return D()}build(e,n){Object.assign(e.output,n)}renderInstance(e,{output:n}){Object.assign(e,n)}sortInstanceNodePosition(){return 0}}function co(t){return typeof t=="object"&&t!==null}function hn(t){return co(t)&&"ownerSVGElement"in t}function ho(t){return hn(t)&&t.tagName==="svg"}function Cu(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=hn(t)&&!ho(t)?new Ii(e):new ki(e);n.mount(t),at.set(t,n)}function Mu(t){const e={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new Eu(e);n.mount(t),at.set(t,n)}function fo(t,e,n){const s=L(t)?t:dt(t);return s.start(cn("",s,e,n)),s.animation}function Du(t,e){return L(t)||typeof t=="number"||typeof t=="string"&&!Ze(e)}function po(t,e,n,s){const i=[];if(Du(t,e))i.push(fo(t,Ze(e)&&e.default||e,n&&(n.default||n)));else{const r=_i(t,e,s),o=r.length;for(let a=0;a<o;a++){const l=r[a],c=l instanceof Element?Cu:Mu;at.has(l)||c(l);const u=at.get(l),h={...n};"delay"in h&&typeof h.delay=="function"&&(h.delay=h.delay(a,o)),i.push(...Pu(u,{...e,transition:h},{}))}}return i}function Ru(t,e,n){const s=[];return al(t,e,n,{spring:Ft}).forEach(({keyframes:r,transition:o},a)=>{s.push(...po(a,r,o))}),s}class Lu{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,n){for(let s=0;s<this.animations.length;s++)this.animations[s][e]=n}attachTimeline(e){const n=this.animations.map(s=>s.attachTimeline(e));return()=>{n.forEach((s,i)=>{s&&s(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Bu extends Lu{then(e,n){return this.finished.finally(e).then(()=>{})}}function ju(t){return Array.isArray(t)&&t.some(Array.isArray)}function Fu(t){function e(n,s,i){let r=[];return ju(n)?r=Ru(n,s,t):r=po(n,s,i,t),new Bu(r)}return e}const ku=Fu(),Ou=["initial","animate","whileInView","whileHover","whilePress","whileDrag","whileFocus","exit"];class Iu extends Z{constructor(e){var n,s;super(e),this.animateUpdates=({controlActiveState:i,directAnimate:r,directTransition:o,controlDelay:a=0,isExit:l}={})=>{const{reducedMotion:c}=this.state.options.motionConfig;this.state.visualElement.shouldReduceMotion=c==="always"||c==="user"&&!!Qt.current;const u=this.state.target;this.state.target={...this.state.baseTarget};let h={};h=this.resolveStateAnimation({controlActiveState:i,directAnimate:r,directTransition:o}),this.state.finalTransition=h;const d=this.createAnimationFactories(u,h,a),{getChildAnimations:f}=this.setupChildAnimations(h,this.state.activeStates);return this.executeAnimations({factories:d,getChildAnimations:f,transition:h,controlActiveState:i,isExit:l})},this.state.visualElement=Qa(this.state.options.as,{presenceContext:null,parent:(n=this.state.parent)==null?void 0:n.visualElement,props:{...this.state.options,whileTap:this.state.options.whilePress},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{...this.state.baseTarget}},reducedMotionConfig:this.state.options.motionConfig.reducedMotion}),(s=this.state.visualElement.parent)==null||s.addChild(this.state.visualElement),this.state.animateUpdates=this.animateUpdates,this.state.isMounted()&&this.state.startAnimation()}updateAnimationControlsSubscription(){const{animate:e}=this.state.options;Vn(e)&&(this.unmountControls=e.subscribe(this.state))}executeAnimations({factories:e,getChildAnimations:n,transition:s,controlActiveState:i,isExit:r=!1}){const o=()=>Promise.all(e.map(h=>h()).filter(Boolean)),a={...this.state.target},l=this.state.element,c=h=>{var d,f;l.dispatchEvent(Cn("motionstart",a)),(f=(d=this.state.options).onAnimationStart)==null||f.call(d,a),h.then(()=>{var p,m;l.dispatchEvent(Cn("motioncomplete",a,r)),(m=(p=this.state.options).onAnimationComplete)==null||m.call(p,a)}).catch(k)},u=()=>{const h=s?.when?(s.when==="beforeChildren"?o():n()).then(()=>s.when==="beforeChildren"?n():o()):Promise.all([o(),n()]);return c(h),h};return i?u:u()}setupChildAnimations(e,n){var s;const i=this.state.visualElement;if(!((s=i.variantChildren)!=null&&s.size)||!n)return{getChildAnimations:()=>Promise.resolve()};const{staggerChildren:r=0,staggerDirection:o=1,delayChildren:a=0}=e||{},l=i.variantChildren.size,c=(l-1)*r,u=typeof a=="function",h=u?f=>a(f,l):o===1?(f=0)=>f*r:(f=0)=>c-f*r,d=Array.from(i.variantChildren).map((f,p)=>f.state.animateUpdates({controlActiveState:n,controlDelay:(u?0:a)+h(p)}));return{getChildAnimations:()=>Promise.all(d.map(f=>f()))}}createAnimationFactories(e,n,s){const i=[];return Object.keys(this.state.target).forEach(r=>{var o;if(!vr(e[r],this.state.target[r]))return;(o=this.state.baseTarget)[r]??(o[r]=$r.get(this.state.element,r));const a=this.state.target[r]==="none"&&Tn(Rn[r])?Rn[r]:this.state.target[r];i.push(()=>{var l;return ku(this.state.element,{[r]:a},{...n?.[r]||n,delay:(((l=n?.[r])==null?void 0:l.delay)||n?.delay||0)+s})})}),i}resolveStateAnimation({controlActiveState:e,directAnimate:n,directTransition:s}){let i=this.state.options.transition,r={};const{variants:o,custom:a,transition:l,animatePresenceContext:c}=this.state.options,u=a??c?.custom;return this.state.activeStates={...this.state.activeStates,...e},Ou.forEach(h=>{if(!this.state.activeStates[h]||Vn(this.state.options[h]))return;const d=this.state.options[h];let f=Tn(d)?Pt(d,o,u):void 0;if(this.state.visualElement.isVariantNode){const p=Pt(this.state.context[h],o,u);f=Object.assign(p?p||{}:r,f)}f&&(h!=="initial"&&(i=f.transition||this.state.options.transition||{}),r=Object.assign(r,f))}),n&&(r=Pt(n,o,u),i=r.transition||s||l),Object.entries(r).forEach(([h,d])=>{h!=="transition"&&(this.state.target[h]=d)}),i}mount(){var e,n;const{element:s}=this.state;Vt.set(s,this.state),at.get(s)||(this.state.visualElement.mount(s),at.set(s,this.state.visualElement)),this.state.visualElement.state=this.state,this.updateAnimationControlsSubscription();const i=this.state.visualElement,r=i.parent;if(i.enteringChildren=void 0,(e=this.state.parent)!=null&&e.isMounted()&&!i.isControllingVariants&&((n=r?.enteringChildren)!=null&&n.has(i))){const{delayChildren:o}=this.state.parent.finalTransition||{};this.animateUpdates({controlActiveState:this.state.parent.activeStates,controlDelay:Ja(r.enteringChildren,i,o)})()}}update(){const{animate:e}=this.state.options,{animate:n}=this.state.visualElement.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;(e=this.unmountControls)==null||e.call(this)}}function _u(t){return co(t)&&"offsetHeight"in t}const Uu={y:!1};function $u(){return Uu.y}const mo=(t,e)=>e?t===e?!0:mo(t,e.parentElement):!1,Nu=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function go(t,e){const n=Qe(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}const Ku=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Wu(t){return Ku.has(t.tagName)||t.tabIndex!==-1}const Xt=new WeakSet;function ns(t){return e=>{e.key==="Enter"&&t(e)}}function fe(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Gu=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=ns(()=>{if(Xt.has(n))return;fe(n,"down");const i=ns(()=>{fe(n,"up")}),r=()=>fe(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function ss(t){return Nu(t)&&!0}function zu(t,e,n={}){const[s,i,r]=go(t,n),o=a=>{const l=a.currentTarget;if(!ss(a))return;Xt.add(l);const c=e(l,a),u=(f,p)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",d),Xt.has(l)&&Xt.delete(l),ss(f)&&typeof c=="function"&&c(f,{success:p})},h=f=>{u(f,l===window||l===document||n.useGlobalTarget||mo(l,f.target))},d=f=>{u(f,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",d,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),_u(a)&&(a.addEventListener("focus",c=>Gu(c,i)),!Wu(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function yo(t){return{point:{x:t.pageX,y:t.pageY}}}function is(t,e,n){const s=t.options;s.whilePress&&t.setActive("whilePress",n==="Start");const i=`onPress${n==="End"?"":n}`,r=s[i];r&&V.postRender(()=>r(e,yo(e)))}class Hu extends Z{isActive(){const{whilePress:e,onPress:n,onPressCancel:s,onPressStart:i}=this.state.options;return!!(e||n||s||i)}constructor(e){super(e)}mount(){this.register()}update(){const{whilePress:e,onPress:n,onPressCancel:s,onPressStart:i}=this.state.options;e||n||s||i||this.register()}register(){const e=this.state.element;!e||!this.isActive()||(this.unmount(),this.unmount=zu(e,(n,s)=>(is(this.state,s,"Start"),(i,{success:r})=>is(this.state,i,r?"End":"Cancel")),{useGlobalTarget:this.state.options.globalPressTarget}))}}function os(t){return!(t.pointerType==="touch"||$u())}function Xu(t,e,n={}){const[s,i,r]=go(t,n),o=a=>{if(!os(a))return;const{target:l}=a,c=e(l,a);if(typeof c!="function"||!l)return;const u=h=>{os(h)&&(c(h),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,i)};return s.forEach(a=>{a.addEventListener("pointerenter",o,i)}),r}function rs(t,e,n){const s=t.options;s.whileHover&&t.setActive("whileHover",n==="Start");const i=`onHover${n}`,r=s[i];r&&V.postRender(()=>r(e,yo(e)))}class Yu extends Z{isActive(){const{whileHover:e,onHoverStart:n,onHoverEnd:s}=this.state.options;return!!(e||n||s)}constructor(e){super(e)}mount(){this.register()}update(){const{whileHover:e,onHoverStart:n,onHoverEnd:s}=this.state.visualElement.prevProps;e||n||s||this.register()}register(){const e=this.state.element;!e||!this.isActive()||(this.unmount(),this.unmount=Xu(e,(n,s)=>(rs(this.state,s,"Start"),i=>{rs(this.state,i,"End")})))}}const qu={some:0,all:1};function Zu(t,e,{root:n,margin:s,amount:i="some"}={}){const r=Qe(t),o=new WeakMap,a=c=>{c.forEach(u=>{const h=o.get(u.target);if(u.isIntersecting!==!!h)if(u.isIntersecting){const d=e(u.target,u);typeof d=="function"?o.set(u.target,d):l.unobserve(u.target)}else typeof h=="function"&&(h(u),o.delete(u.target))})},l=new IntersectionObserver(a,{root:n,rootMargin:s,threshold:typeof i=="number"?i:qu[i]});return r.forEach(c=>l.observe(c)),()=>l.disconnect()}function as(t,e,n){const s=t.options;s.whileInView&&t.setActive("whileInView",n==="Enter");const i=`onViewport${n}`,r=s[i];r&&V.postRender(()=>r(e))}class Qu extends Z{isActive(){const{whileInView:e,onViewportEnter:n,onViewportLeave:s}=this.state.options;return!!(e||n||s)}constructor(e){super(e)}startObserver(){const e=this.state.element;if(!e||!this.isActive())return;this.unmount();const{once:n,...s}=this.state.options.inViewOptions||{};this.unmount=Zu(e,(i,r)=>{if(as(this.state,r,"Enter"),!n)return o=>{as(this.state,r,"Leave")}},s)}mount(){this.startObserver()}update(){const{props:e,prevProps:n}=this.state.visualElement;["amount","margin","root"].some(Ju(e,n))&&this.startObserver()}}function Ju({inViewOptions:t={}},{inViewOptions:e={}}={}){return n=>t[n]!==e[n]}function ee(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}class tc extends Z{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.state.element.matches(":focus-visible")}catch{e=!0}e&&(this.state.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&(this.state.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=It(ee(this.state.element,"focus",()=>this.onFocus()),ee(this.state.element,"blur",()=>this.onBlur()))}}const ec=(t,e)=>t.depth-e.depth;class nc{constructor(){this.children=[],this.isDirty=!1}add(e){Ke(this.children,e),this.isDirty=!0}remove(e){ie(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ec),this.isDirty=!1,this.children.forEach(e)}}function de(t){return L(t)?t.get():t}const vo=["TopLeft","TopRight","BottomLeft","BottomRight"],sc=vo.length,ls=t=>typeof t=="string"?parseFloat(t):t,us=t=>typeof t=="number"||x.test(t);function ic(t,e,n,s,i,r){i?(t.opacity=E(0,n.opacity??1,oc(s)),t.opacityExit=E(e.opacity??1,0,rc(s))):r&&(t.opacity=E(e.opacity??1,n.opacity??1,s));for(let o=0;o<sc;o++){const a=`border${vo[o]}Radius`;let l=cs(e,a),c=cs(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||us(l)===us(c)?(t[a]=Math.max(E(ls(l),ls(c),s),0),(W.test(c)||W.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=E(e.rotate||0,n.rotate||0,s))}function cs(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const oc=To(0,.5,so),rc=To(.5,.95,k);function To(t,e,n){return s=>s<t?0:s>e?1:n(pt(t,e,s))}function hs(t,e){t.min=e.min,t.max=e.max}function I(t,e){hs(t.x,e.x),hs(t.y,e.y)}function fs(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function pe(t){return t===void 0||t===1}function ke({scale:t,scaleX:e,scaleY:n}){return!pe(t)||!pe(e)||!pe(n)}function nt(t){return ke(t)||xo(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function xo(t){return ds(t.x)||ds(t.y)}function ds(t){return t&&t!=="0%"}function ne(t,e,n){const s=t-n,i=e*s;return n+i}function ps(t,e,n,s,i){return i!==void 0&&(t=ne(t,i,s)),ne(t,n,s)+e}function Oe(t,e=0,n=1,s,i){t.min=ps(t.min,e,n,s,i),t.max=ps(t.max,e,n,s,i)}function bo(t,{x:e,y:n}){Oe(t.x,e.translate,e.scale,e.originPoint),Oe(t.y,n.translate,n.scale,n.originPoint)}const ms=.999999999999,gs=1.0000000000001;function ac(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const{visualElement:l}=r.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&ht(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,bo(t,o)),s&&nt(r.latestValues)&&ht(t,r.latestValues))}e.x<gs&&e.x>ms&&(e.x=1),e.y<gs&&e.y>ms&&(e.y=1)}function Gt(t,e){t.min=t.min+e,t.max=t.max+e}function ys(t,e,n,s,i=.5){const r=E(t.min,t.max,i);Oe(t,e,n,r,s)}function ht(t,e){ys(t.x,e.x,e.scaleX,e.scale,e.originX),ys(t.y,e.y,e.scaleY,e.scale,e.originY)}const So=1e-4,lc=1-So,uc=1+So,wo=.01,cc=0-wo,hc=0+wo;function _(t){return t.max-t.min}function fc(t,e,n){return Math.abs(t-e)<=n}function vs(t,e,n,s=.5){t.origin=s,t.originPoint=E(e.min,e.max,t.origin),t.scale=_(n)/_(e),t.translate=E(n.min,n.max,t.origin)-t.originPoint,(t.scale>=lc&&t.scale<=uc||isNaN(t.scale))&&(t.scale=1),(t.translate>=cc&&t.translate<=hc||isNaN(t.translate))&&(t.translate=0)}function Mt(t,e,n,s){vs(t.x,e.x,n.x,s?s.originX:void 0),vs(t.y,e.y,n.y,s?s.originY:void 0)}function Ts(t,e,n){t.min=n.min+e.min,t.max=t.min+_(e)}function dc(t,e,n){Ts(t.x,e.x,n.x),Ts(t.y,e.y,n.y)}function xs(t,e,n){t.min=e.min-n.min,t.max=t.min+_(e)}function Dt(t,e,n){xs(t.x,e.x,n.x),xs(t.y,e.y,n.y)}function bs(t,e,n,s,i){return t-=e,t=ne(t,1/n,s),i!==void 0&&(t=ne(t,1/i,s)),t}function pc(t,e=0,n=1,s=.5,i,r=t,o=t){if(W.test(e)&&(e=parseFloat(e),e=E(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=E(r.min,r.max,s);t===r&&(a-=e),t.min=bs(t.min,e,n,a,i),t.max=bs(t.max,e,n,a,i)}function Ss(t,e,[n,s,i],r,o){pc(t,e[n],e[s],e[i],e.scale,r,o)}const mc=["x","scaleX","originX"],gc=["y","scaleY","originY"];function ws(t,e,n,s){Ss(t.x,e,mc,n?n.x:void 0,s?s.x:void 0),Ss(t.y,e,gc,n?n.y:void 0,s?s.y:void 0)}function As(t){return t.translate===0&&t.scale===1}function Ao(t){return As(t.x)&&As(t.y)}function Ps(t,e){return t.min===e.min&&t.max===e.max}function yc(t,e){return Ps(t.x,e.x)&&Ps(t.y,e.y)}function Vs(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Po(t,e){return Vs(t.x,e.x)&&Vs(t.y,e.y)}function Es(t){return _(t.x)/_(t.y)}function Cs(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class vc{constructor(){this.members=[]}add(e){Ke(this.members,e),e.scheduleRender()}remove(e){if(ie(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const r=this.members[i];if(r.isPresent!==!1){s=r;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Tc(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=n?.z||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:h,rotateY:d,skewX:f,skewY:p}=n;c&&(s=`perspective(${c}px) ${s}`),u&&(s+=`rotate(${u}deg) `),h&&(s+=`rotateX(${h}deg) `),d&&(s+=`rotateY(${d}deg) `),f&&(s+=`skewX(${f}deg) `),p&&(s+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}function Ms(t){return[t("x"),t("y")]}const Yt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},me=["","X","Y","Z"],xc=1e3;let bc=0;function ge(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Vo(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Gi(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",V,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&Vo(s)}function Eo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e?.()){this.id=bc++,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.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(Ac),this.nodes.forEach(Cc),this.nodes.forEach(Mc),this.nodes.forEach(Pc)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new nc)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new We),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=hn(o)&&!ho(o),this.instance=o;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let u,h=0;const d=()=>this.root.updateBlockedByResize=!1;V.read(()=>{h=window.innerWidth}),t(o,()=>{const f=window.innerWidth;f!==h&&(h=f,this.root.updateBlockedByResize=!0,u&&u(),u=fr(d,250),Yt.hasAnimatedSinceResize&&(Yt.hasAnimatedSinceResize=!1,this.nodes.forEach(Ls)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:d,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||c.getDefaultTransition()||jc,{onLayoutAnimationStart:m,onLayoutAnimationComplete:g}=c.getProps(),y=!this.targetLayout||!Po(this.targetLayout,f),b=!h&&d;if(this.options.layoutRoot||this.resumeFrom||b||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...en(p,"layout"),onPlay:m,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(u,b)}else h||Ls(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Y(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Dc),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Vo(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ds);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Rs);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ec),this.nodes.forEach(Sc),this.nodes.forEach(wc)):this.nodes.forEach(Rs),this.clearAllSnapshots();const a=F.now();B.delta=q(0,1e3/60,a-B.timestamp),B.timestamp=a,B.isProcessing=!0,re.update.process(B),re.preRender.process(B),re.render.process(B),B.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ei.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Vc),this.sharedNodes.forEach(Rc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,V.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){V.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!_(this.snapshot.measuredBox.x)&&!_(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 l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=D(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Ao(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||nt(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),Fc(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:a}=this.options;if(!a)return D();const l=a.measureViewportBox();if(!(((o=this.scroll)==null?void 0:o.wasRoot)||this.path.some(kc))){const{scroll:u}=this.root;u&&(Gt(l.x,u.offset.x),Gt(l.y,u.offset.y))}return l}removeElementScroll(o){var a;const l=D();if(I(l,o),(a=this.scroll)!=null&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:h,options:d}=u;u!==this.root&&h&&d.layoutScroll&&(h.wasRoot&&I(l,o),Gt(l.x,h.offset.x),Gt(l.y,h.offset.y))}return l}applyTransform(o,a=!1){const l=D();I(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&ht(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),nt(u.latestValues)&&ht(l,u.latestValues)}return nt(this.latestValues)&&ht(l,this.latestValues),l}removeTransform(o){const a=D();I(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!nt(c.latestValues))continue;ke(c.latestValues)&&c.updateSnapshot();const u=D(),h=c.measurePageBox();I(u,h),ws(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return nt(this.latestValues)&&ws(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==B.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(a=this.parent)!=null&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:d}=this.options;if(!(!this.layout||!(h||d))){if(this.resolvedRelativeTargetAt=B.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=D(),this.relativeTargetOrigin=D(),Dt(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),I(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=D(),this.targetWithTransforms=D()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),dc(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):I(this.target,this.layout.layoutBox),bo(this.target,this.targetDelta)):I(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=D(),this.relativeTargetOrigin=D(),Dt(this.relativeTargetOrigin,this.target,f.target),I(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||ke(this.parent.latestValues)||xo(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||(o=this.parent)!=null&&o.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===B.timestamp&&(c=!1),c)return;const{layout:u,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||h))return;I(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;ac(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=D());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(fs(this.prevProjectionDelta.x,this.projectionDelta.x),fs(this.prevProjectionDelta.y,this.projectionDelta.y)),Mt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!Cs(this.projectionDelta.x,this.prevProjectionDelta.x)||!Cs(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ut(),this.projectionDelta=ut(),this.projectionDeltaWithTransform=ut()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},h=ut();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=D(),f=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=f!==p,g=this.getStack(),y=!g||g.members.length<=1,b=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(Bc));this.animationProgress=0;let v;this.mixTargetDelta=w=>{const T=w/1e3;Bs(h.x,o.x,T),Bs(h.y,o.y,T),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Dt(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Lc(this.relativeTarget,this.relativeTargetOrigin,d,T),v&&yc(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=D()),I(v,this.relativeTarget)),m&&(this.animationValues=u,ic(u,c,this.latestValues,T,b,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(Y(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=V.update(()=>{Yt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=dt(0)),this.currentAnimation=fo(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),o.onUpdate&&o.onUpdate(u)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(xc),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&Co(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||D();const h=_(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const d=_(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}I(a,l),ht(a,u),Mt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new vc),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())==null?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())==null?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&ge("z",o,c,this.animationValues);for(let u=0;u<me.length;u++)ge(`rotate${me[u]}`,o,c,this.animationValues),ge(`skew${me[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=de(a?.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=de(a?.pointerEvents)||""),this.hasProjected&&!nt(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let h=Tc(this.projectionDeltaWithTransform,this.treeScale,u);l&&(h=l(u,h)),o.transform=h;const{x:d,y:f}=this.projectionDelta;o.transformOrigin=`${d.origin*100}% ${f.origin*100}% 0`,c.animationValues?o.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const p in Lt){if(u[p]===void 0)continue;const{correct:m,applyTo:g,isCSSVariable:y}=Lt[p],b=h==="none"?u[p]:m(u[p],c);if(g){const v=g.length;for(let w=0;w<v;w++)o[g[w]]=b}else y?this.options.visualElement.renderState.vars[p]=b:o[p]=b}this.options.layoutId&&(o.pointerEvents=c===this?de(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Ds),this.root.sharedNodes.clear()}}}function Sc(t){t.updateLayout()}function wc(t){var e;const n=((e=t.resumeFrom)==null?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:r}=t.options,o=n.source!==t.layout.source;r==="size"?Ms(h=>{const d=o?n.measuredBox[h]:n.layoutBox[h],f=_(d);d.min=s[h].min,d.max=d.min+f}):Co(r,n.layoutBox,s)&&Ms(h=>{const d=o?n.measuredBox[h]:n.layoutBox[h],f=_(s[h]);d.max=d.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+f)});const a=ut();Mt(a,s,n.layoutBox);const l=ut();o?Mt(l,t.applyTransform(i,!0),n.measuredBox):Mt(l,s,n.layoutBox);const c=!Ao(a);let u=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:d,layout:f}=h;if(d&&f){const p=D();Dt(p,n.layoutBox,d.layoutBox);const m=D();Dt(m,s,f.layoutBox),Po(p,m)||(u=!0),h.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function Ac(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Pc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Vc(t){t.clearSnapshot()}function Ds(t){t.clearMeasurements()}function Rs(t){t.isLayoutDirty=!1}function Ec(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ls(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Cc(t){t.resolveTargetDelta()}function Mc(t){t.calcProjection()}function Dc(t){t.resetSkewAndRotation()}function Rc(t){t.removeLeadSnapshot()}function Bs(t,e,n){t.translate=E(e.translate,0,n),t.scale=E(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function js(t,e,n,s){t.min=E(e.min,n.min,s),t.max=E(e.max,n.max,s)}function Lc(t,e,n,s){js(t.x,e.x,n.x,s),js(t.y,e.y,n.y,s)}function Bc(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const jc={duration:.45,ease:[.4,0,.1,1]},Fs=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ks=Fs("applewebkit/")&&!Fs("chrome/")?Math.round:k;function Os(t){t.min=ks(t.min),t.max=ks(t.max)}function Fc(t){Os(t.x),Os(t.y)}function Co(t,e,n){return t==="position"||t==="preserve-aspect"&&!fc(Es(e),Es(n),.2)}function kc(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}function Oc(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const Ic=Eo({attachResizeListener:(t,e)=>Oc(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ye={current:void 0},_c=Eo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ye.current){const t=new Ic({});t.mount(window),t.setOptions({layoutScroll:!0}),ye.current=t}return ye.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"});function Mo(t){if(t)return t.options.allowProjection!==!1?t.projection:Mo(t.parent)}function Is(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const bt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(x.test(t))t=parseFloat(t);else return t;const n=Is(t,e.target.x),s=Is(t,e.target.y);return`${n}% ${s}%`}},Uc={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=et.parse(t);if(i.length>5)return s;const r=et.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const c=E(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),r(i)}},Do={borderRadius:{...bt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:bt,borderTopRightRadius:bt,borderBottomLeftRadius:bt,borderBottomRightRadius:bt,boxShadow:Uc};function wt(t){return typeof t=="object"&&t!==null&&"nodeType"in t}class $c extends Z{constructor(e){super(e),li(Do)}initProjection(){const e=this.state.options;this.state.visualElement.projection=new _c(this.state.visualElement.latestValues,e["data-framer-portal-id"]?void 0:Mo(this.state.visualElement.parent)),this.state.visualElement.projection.isPresent=!0,this.setOptions()}beforeMount(){this.initProjection()}setOptions(){const e=this.state.options;this.state.visualElement.projection.setOptions({layout:e.layout,layoutId:e.layoutId,alwaysMeasureLayout:!!e.drag||e.dragConstraints&&wt(e.dragConstraints),visualElement:this.state.visualElement,animationType:typeof e.layout=="string"?e.layout:"both",layoutRoot:e.layoutRoot,layoutScroll:e.layoutScroll,crossfade:e.crossfade,onExitComplete:()=>{var n;if(!((n=this.state.visualElement.projection)!=null&&n.isPresent)){const s=ft.get(this.state.element);this.state.isSafeToRemove=!0,s&&s({detail:{isExit:!0}},!0)}}})}update(){this.setOptions()}mount(){var e;(e=this.state.visualElement.projection)==null||e.mount(this.state.element)}}function Ro(t){return t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1}function fn(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}function Nc(t){return e=>Ro(e)&&t(e,fn(e))}function Rt(t,e,n,s){return ee(t,e,Nc(n),s)}function Lo(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const _s=Lo("dragHorizontal"),Us=Lo("dragVertical");function Kc(t){let e=!1;if(t==="y")e=Us();else if(t==="x")e=_s();else{const n=_s(),s=Us();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function Ie(t){return t.max-t.min}function Wc(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?E(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?E(n,t,s.max):Math.min(t,n)),t}const _e=.35;function Gc(t,{top:e,left:n,bottom:s,right:i}){return{x:$s(t.x,n,i),y:$s(t.y,e,s)}}function $s(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function zc(t=_e){return t===!1?t=0:t===!0&&(t=_e),{x:Ns(t,"left","right"),y:Ns(t,"top","bottom")}}function Ns(t,e,n){return{min:Ks(t,e),max:Ks(t,n)}}function Ks(t,e){return typeof t=="number"?t:t[e]||0}function Hc(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}function Xc(t,e){return{x:Ws(t.x,e.x),y:Ws(t.y,e.y)}}function Ws(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function Yc(t,e){let n=.5;const s=Ie(t),i=Ie(e);return i>s?n=pt(e.min,e.max-s,t.min):s>i&&(n=pt(t.min,t.max-i,e.min)),q(0,1,n)}const Gs=(t,e)=>Math.abs(t-e);function qc(t,e){const n=Gs(t.x,e.x),s=Gs(t.y,e.y);return Math.sqrt(n**2+s**2)}class Bo{constructor(e,n,{transformPagePoint:s,contextWindow:i,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=Te(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,f=qc(h.offset,{x:0,y:0})>=3;if(!d&&!f)return;const{point:p}=h,{timestamp:m}=B;this.history.push({...p,timestamp:m});const{onStart:g,onMove:y}=this.handlers;d||(g&&g(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,h)},this.handlePointerMove=(h,d)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=ve(d,this.transformPagePoint),V.update(this.updatePoint,!0)},this.handlePointerUp=(h,d)=>{this.end();const{onEnd:f,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=Te(h.type==="pointercancel"?this.lastMoveEventInfo:ve(d,this.transformPagePoint),this.history);this.startEvent&&f&&f(h,g),p&&p(h,g)},!Ro(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const o=fn(e),a=ve(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=B;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,Te(a,this.history)),this.removeListeners=It(Rt(this.contextWindow,"pointermove",this.handlePointerMove),Rt(this.contextWindow,"pointerup",this.handlePointerUp),Rt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Y(this.updatePoint)}}function ve(t,e){return e?{point:e(t.point)}:t}function zs(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Te({point:t},e){return{point:t,delta:zs(t,jo(e)),offset:zs(t,Zc(e)),velocity:Qc(e,.1)}}function Zc(t){return t[0]}function jo(t){return t[t.length-1]}function Qc(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=jo(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>U(e)));)n--;if(!s)return{x:0,y:0};const r=K(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const Hs=()=>({min:0,max:0});function Jc(){return{x:Hs(),y:Hs()}}function N(t){return[t("x"),t("y")]}function th(t){return!!(L(t)&&t.add)}function Xs(t,e){const n=t.getValue("willChange");if(th(n))return n.add(e)}function Fo({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function eh(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function nh({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Ys(t,e){t.min=t.min+e,t.max=t.max+e}function sh(t,e){return Fo(eh(t.getBoundingClientRect(),e))}function ih(t,e,n){const s=sh(t,n),{scroll:i}=e;return i&&(Ys(s.x,i.offset.x),Ys(s.y,i.offset.y)),s}function qs(t){return!ft.has(t.current)}function ko({current:t}){return t?t.ownerDocument.defaultView:null}const oh=new WeakMap;class rh{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Jc(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){if(!qs(this.visualElement))return;const s=c=>{const{dragSnapToOrigin:u}=this.getProps();u?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(fn(c,"page").point)},i=(c,u)=>{const{drag:h,dragPropagation:d,onDragStart:f}=this.getProps();if(h&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Kc(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),N(m=>{let g=this.getAxisMotionValue(m).get()||0;if(W.test(g)){const{projection:y}=this.visualElement;if(y&&y.layout){const b=y.layout.layoutBox[m];b&&(g=Ie(b)*(parseFloat(g)/100))}}this.originPoint[m]=g}),f&&V.postRender(()=>f(c,u)),Xs(this.visualElement,"transform"),this.visualElement.state.setActive("whileDrag",!0)},r=(c,u)=>{const{dragPropagation:h,dragDirectionLock:d,onDirectionLock:f,onDrag:p}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:m}=u;if(d&&this.currentDirection===null){this.currentDirection=ah(m),this.currentDirection!==null&&f&&f(this.currentDirection);return}this.updateAxis("x",u.point,m),this.updateAxis("y",u.point,m),this.visualElement.render(),p&&p(c,u)},o=(c,u)=>this.stop(c,u),a=()=>N(c=>{var u;return this.getAnimationState(c)==="paused"&&((u=this.getAxisMotionValue(c).animation)==null?void 0:u.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new Bo(e,{onSessionStart:s,onStart:i,onMove:r,onSessionEnd:o,resumeAnimation:a},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:ko(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:r}=this.getProps();r&&V.postRender(()=>r(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),this.visualElement.state.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!zt(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=Wc(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)==null?void 0:e.layout,r=this.constraints;n&&wt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=Gc(i.layoutBox,n):this.constraints=!1,this.elastic=zc(s),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&N(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Hc(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!wt(e))return!1;const s=e,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=ih(s,i.root,this.visualElement.getTransformPagePoint());let o=Xc(i.layout.layoutBox,r);if(n){const a=n(nh(o));this.hasMutatedConstraints=!!a,a&&(o=Fo(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=N(u=>{if(!zt(u,n,this.currentDirection))return;let h=l&&l[u]||{};o&&(h={min:0,max:0});const d=i?200:1e6,f=i?40:1e7,p={type:"inertia",velocity:s?e[u]:0,bounceStiffness:d,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return Xs(this.visualElement,e),s.start(cn(e,s,0,n,this.visualElement,!1))}stopAnimation(){qs(this.visualElement)&&N(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){N(e=>{var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps();return s[n]||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){N(n=>{const{drag:s}=this.getProps();if(!zt(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];r.set(e[n]-E(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!wt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};N(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=Yc({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),N(o=>{if(!zt(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(E(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;oh.set(this.visualElement,this);const e=this.visualElement.current,n=Rt(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();wt(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,r=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),V.read(s);const o=ee(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(N(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=l[u].translate,h.set(h.get()+l[u].translate))}),this.visualElement.render())});return()=>{o(),n(),r(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=_e,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function zt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function ah(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class lh extends Z{constructor(e){super(e),this.removeGroupControls=k,this.removeListeners=k,this.controls=new rh(e.visualElement)}mount(){const{dragControls:e}=this.state.options;e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||k}unmount(){this.removeGroupControls(),this.removeListeners()}}class uh extends Z{constructor(e){super(e),li(Do)}beforeUpdate(){this.state.willUpdate("beforeUpdate")}update(){this.didUpdate()}didUpdate(){var e,n;(this.state.options.layout||this.state.options.layoutId||this.state.options.drag)&&((n=(e=this.state.visualElement.projection)==null?void 0:e.root)==null||n.didUpdate())}mount(){var e;const n=this.state.options,s=this.state.options.layoutGroup;if(n.layout||n.layoutId){const i=this.state.visualElement.projection;i&&(i.promote(),(e=s?.group)==null||e.add(i)),Yt.hasEverUpdated=!0}this.didUpdate()}beforeUnmount(){const e=this.state.visualElement.projection;e&&(this.state.willUpdate("beforeUnmount"),this.state.options.layoutId?(e.isPresent=!1,e.relegate()):this.state.options.layout&&(this.state.isSafeToRemove=!0))}unmount(){const e=this.state.options.layoutGroup,n=this.state.visualElement.projection;n&&(e?.group&&(this.state.options.layout||this.state.options.layoutId)&&e.group.remove(n),this.didUpdate())}}function Zs(t){return(e,n)=>{t&&V.postRender(()=>t(e,n))}}class ch extends Z{constructor(){super(...arguments),this.removePointerDownListener=k}onPointerDown(e){this.session=new Bo(e,this.createPanHandlers(),{transformPagePoint:this.state.visualElement.getTransformPagePoint(),contextWindow:ko(this.state.visualElement)})}createPanHandlers(){return{onSessionStart:Zs((e,n)=>{const{onPanSessionStart:s}=this.state.options;s&&s(e,n)}),onStart:Zs((e,n)=>{const{onPanStart:s}=this.state.options;s&&s(e,n)}),onMove:(e,n)=>{const{onPan:s}=this.state.options;s&&s(e,n)},onEnd:(e,n)=>{const{onPanEnd:s}=this.state.options;delete this.session,s&&V.postRender(()=>s(e,n))}}}mount(){this.removePointerDownListener=Rt(this.state.element,"pointerdown",this.onPointerDown.bind(this))}update(){}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const hh=[Iu,Hu,Yu,Qu,tc,$c,ch,lh,uh],fh={reducedMotion:"never",transition:void 0,nonce:void 0},[dh]=kt("MotionConfig");function Oo(){return dh(At(()=>fh))}function ph(t){const e=new WeakMap,n=Oo();function s(r){if(t.mode!=="popLayout")return;const o=r.element,a=o.offsetParent,l=a instanceof HTMLElement&&a.offsetWidth||0,c={height:o.offsetHeight||0,width:o.offsetWidth||0,top:o.offsetTop,left:o.offsetLeft,right:0};c.right=l-c.width-c.left;const u=t.anchorX==="left"?`left: ${c.left}`:`right: ${c.right}`;r.element.dataset.motionPopId=r.id;const h=document.createElement("style");n.value.nonce&&(h.nonce=n.value.nonce),e.set(r,h),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`
|
|
1
|
+
import{aA as _o,K as Uo,f as ti,q as ei,o as Tn,c as At,a as ni,a2 as si,Q as lt,R as J,S as H,a4 as $o,V as qt,au as be,c6 as No,ca as Ko,e as ii,c8 as Wo,h as Go,az as zo,b5 as Ho,at as Xo,cb as Yo,F as oi,bM as qo,E as Zo,N as Qo,G as xn,T as z,C as j,cc as bn,a9 as Sn,U as wn,aj as Jo,am as An,cd as tr,ce as er,ac as nr,cf as sr,X as ir}from"./2dNDtTiv.js";import{D as or,a as rr,b as ar}from"./BA_pRWwX.js";import{c as Pn,h as lr}from"./DhI5cA_n.js";import"./CWyMCJQH.js";const Kt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ur(t,e){let n=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){o.has(u)&&(c.schedule(u),t()),u(a)}const c={schedule:(u,h=!1,d=!1)=>{const p=d&&i?n:s;return h&&o.add(u),p.has(u)||p.add(u),u},cancel:u=>{s.delete(u),o.delete(u)},process:u=>{if(a=u,i){r=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,r&&(r=!1,c.process(u))}};return c}const X={},cr=40;function ri(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Kt.reduce((v,w)=>(v[w]=ur(r),v),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:h,preRender:d,render:f,postRender:p}=o,m=()=>{const v=X.useManualTiming?i.timestamp:performance.now();n=!1,X.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(v-i.timestamp,cr),1)),i.timestamp=v,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),h.process(i),d.process(i),f.process(i),p.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(m))},g=()=>{n=!0,s=!0,i.isProcessing||t(m)};return{schedule:Kt.reduce((v,w)=>{const T=o[w];return v[w]=(A,C=!1,S=!1)=>(n||g(),T.schedule(A,C,S)),v},{}),cancel:v=>{for(let w=0;w<Kt.length;w++)o[Kt[w]].cancel(v)},state:i,steps:o}}const k=t=>t,{schedule:V,cancel:Y,state:B,steps:re}=ri(typeof requestAnimationFrame<"u"?requestAnimationFrame:k,!0);let Ht;function hr(){Ht=void 0}const F={now:()=>(Ht===void 0&&F.set(B.isProcessing||X.useManualTiming?B.timestamp:performance.now()),Ht),set:t=>{Ht=t,queueMicrotask(hr)}},U=t=>t*1e3,K=t=>t/1e3;function fr(t,e){const n=F.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(Y(s),t(r-e))};return V.setup(s,!0),()=>Y(s)}const ai=t=>e=>typeof e=="string"&&e.startsWith(t),Ue=ai("--"),dr=ai("var(--"),$e=t=>dr(t)?pr.test(t.split("/*")[0].trim()):!1,pr=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Lt={};function li(t){for(const e in t)Lt[e]=t[e],Ue(e)&&(Lt[e].isCSSVariable=!0)}function kt(t,e){const n=typeof t=="string"&&!e?`${t}Context`:e,s=Symbol(n);return[o=>{const a=_o(s,o);if(a===void 0)throw new Error(`Injection \`${s.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`);return a},o=>(Uo(s,o),o)]}const[mr,gr]=kt("Motion"),[yr]=kt("LayoutGroup");function Vn(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}class Z{constructor(e){this.state=e}beforeMount(){}mount(){}unmount(){}update(){}beforeUpdate(){}beforeUnmount(){}}function Pt(t,e,n){if(Array.isArray(t))return t.reduce((s,i)=>{const r=Pt(i,e,n);return r?{...s,...r}:s},{});if(typeof t=="object")return t;if(t&&e){const s=e[t];return typeof s=="function"?s(n):s}}function vr(t,e){return typeof t!=typeof e?!0:Array.isArray(t)&&Array.isArray(e)?!Tr(t,e):t!==e}function Tr(t,e){const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}function En(t){return t?.startsWith("--")}const xr=t=>t;function br(t){return typeof t=="number"}const Sr=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],wr=new Set(Sr);function ui(t){return wr.has(t)}class Ar{constructor(e){this.features=[];const{features:n=[],lazyMotionContext:s}=e.options,i=n.concat(s.features.value);this.features=i.map(o=>new o(e));const r=this.features;ti(s.features,o=>{o.forEach(a=>{if(!i.includes(a)){i.push(a);const l=new a(e);r.push(l),e.isMounted()&&(l.beforeMount(),l.mount())}})},{flush:"pre"})}mount(){this.features.forEach(e=>e.mount())}beforeMount(){this.features.forEach(e=>{var n;return(n=e.beforeMount)==null?void 0:n.call(e)})}unmount(){this.features.forEach(e=>e.unmount())}update(){this.features.forEach(e=>{var n;return(n=e.update)==null?void 0:n.call(e)})}beforeUpdate(){this.features.forEach(e=>e.beforeUpdate())}beforeUnmount(){this.features.forEach(e=>e.beforeUnmount())}}const ft=new WeakMap;function ae(t){const e=ft.get(t);e&&t.removeEventListener("motioncomplete",e),ft.delete(t)}const[Pr,Vr]=kt("AnimatePresenceContext");function Er(t){const e={initial:t.initial,custom:t.custom};ti(()=>t.custom,n=>{e.custom=n},{flush:"pre"}),Vr(e),ei(()=>{e.initial=void 0})}function Cr(t){return typeof t=="string"||t===!1||Array.isArray(t)}const Vt=new WeakMap;let Mr=0;class Dr{constructor(e,n){var s;this.element=null,this.isSafeToRemove=!1,this.isVShow=!1,this.children=new Set,this.activeStates={initial:!0,animate:!0},this.currentProcess=null,this._context=null,this.animateUpdates=k,this.id=`motion-state-${Mr++}`,this.options=e,this.parent=n,(s=n?.children)==null||s.add(this);const r=(e.initial===void 0&&e.variants?this.context.initial:e.initial)===!1?["initial","animate"]:["initial"];this.initTarget(r),this.featureManager=new Ar(this),this.type=ui(this.options.as)?"svg":"html"}get context(){if(!this._context){const e={get:(n,s)=>{var i;return Cr(this.options[s])?this.options[s]:(i=this.parent)==null?void 0:i.context[s]}};this._context=new Proxy({},e)}return this._context}initTarget(e){var n;const s=this.options.custom??((n=this.options.animatePresenceContext)==null?void 0:n.custom);this.baseTarget=e.reduce((i,r)=>({...i,...Pt(this.options[r]||this.context[r],this.options.variants,s)}),{}),this.target={}}updateOptions(e){var n;this.options=e,(n=this.visualElement)==null||n.update({...this.options,whileTap:this.options.whilePress},{isPresent:!ft.has(this.element)})}beforeMount(){this.featureManager.beforeMount()}mount(e,n,s=!1){var i,r;this.element=e,this.updateOptions(n),this.options.layoutId&&((i=this.visualElement.projection.getStack())==null?void 0:i.members.length)>0,this.featureManager.mount(),!s&&this.options.animate&&((r=this.startAnimation)==null||r.call(this))}clearAnimation(){var e,n;this.currentProcess&&Y(this.currentProcess),this.currentProcess=null,(n=(e=this.visualElement)==null?void 0:e.variantChildren)==null||n.forEach(s=>{s.state.clearAnimation()})}startAnimation(){this.clearAnimation(),this.currentProcess=V.render(()=>{this.currentProcess=null,this.animateUpdates()})}beforeUnmount(){this.featureManager.beforeUnmount()}unmount(e=!1){var n;const s=this.options.layoutId&&((n=this.visualElement.projection)==null?void 0:n.getStack().lead)===this.visualElement.projection&&this.visualElement.projection.isProjecting(),i=()=>{var r,o,a;e&&Array.from(this.children).reverse().forEach(this.unmountChild),(o=(r=this.parent)==null?void 0:r.children)==null||o.delete(this),Vt.delete(this.element),this.featureManager.unmount(),(a=this.visualElement)==null||a.unmount(),this.clearAnimation()};s?Promise.resolve().then(()=>{i()}):i()}unmountChild(e){e.unmount(!0)}beforeUpdate(){this.featureManager.beforeUpdate()}update(e){this.updateOptions(e),this.featureManager.update(),this.startAnimation()}setActive(e,n,s=!0){var i;!this.element||this.activeStates[e]===n||(this.activeStates[e]=n,(i=this.visualElement.variantChildren)==null||i.forEach(r=>{r.state.setActive(e,n,!1)}),s&&this.animateUpdates({isExit:e==="exit"&&this.activeStates.exit}))}isMounted(){return!!this.element}willUpdate(e){var n;(this.options.layout||this.options.layoutId)&&((n=this.visualElement.projection)==null||n.willUpdate())}}const at=new WeakMap;function Cn(t,e,n){return new CustomEvent(t,{detail:{target:e,isExit:n}})}const Mn={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>`${t}deg`},Rr={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>`${t}px`},rotate:Mn,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:xr},skew:Mn},Lr=["translate","scale","rotate","skew"],Br=["","X","Y","Z"],Ne=new Map,Zt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"];Lr.forEach(t=>{Br.forEach(e=>{Zt.push(t+e),Ne.set(t+e,Rr[t])})});const jr=new Set(Zt),Fr=t=>jr.has(t),Dn={x:"translateX",y:"translateY",z:"translateZ"};function kr([t],[e]){return Zt.indexOf(t)-Zt.indexOf(e)}function Or(t,[e,n]){return`${t} ${e}(${n})`}function Ir(t){return t.sort(kr).reduce(Or,"").trim()}const Rn={translate:[0,0],rotate:0,scale:1,skew:0,x:0,y:0,z:0},Ot=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),tt=Ot("deg"),W=Ot("%"),x=Ot("px"),_r=Ot("vh"),Ur=Ot("vw"),Ln={...W,parse:t=>W.parse(t)/100,transform:t=>W.transform(t*100)},L=t=>!!(t&&t.getVelocity),$r={get:(t,e)=>{let n=En(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!n&&n!=="0"){const s=Ne.get(e);s&&(n=s.initialValue)}return n},set:(t,e,n)=>{En(e)?t.style.setProperty(e,n):t.style[e]=n}};function Nr(t){var e;const n={},s=[];for(let i in t){let r=t[i];r=L(r)?r.get():r,Fr(i)&&i in Dn&&(i=Dn[i]);let o=Array.isArray(r)?r[0]:r;const a=Ne.get(i);a?(o=br(r)?(e=a.toDefaultUnit)==null?void 0:e.call(a,r):r,s.push([i,o])):n[i]=o}return s.length&&(n.transform=Ir(s)),Object.keys(n).length===0?null:n}const Kr={fill:!0,stroke:!0,opacity:!0,"stroke-width":!0,"fill-opacity":!0,"stroke-opacity":!0,"stroke-linecap":!0,"stroke-linejoin":!0,"stroke-dasharray":!0,"stroke-dashoffset":!0,cx:!0,cy:!0,r:!0,d:!0,x1:!0,y1:!0,x2:!0,y2:!0,points:!0,"path-length":!0,viewBox:!0,width:!0,height:!0,"preserve-aspect-ratio":!0,"clip-path":!0,filter:!0,mask:!0,"stop-color":!0,"stop-opacity":!0,"gradient-transform":!0,"gradient-units":!0,"spread-method":!0,"marker-end":!0,"marker-mid":!0,"marker-start":!0,"text-anchor":!0,"dominant-baseline":!0,"font-family":!0,"font-size":!0,"font-weight":!0,"letter-spacing":!0,"vector-effect":!0};function Wr(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Gr(t,e,n=1,s=0){t.pathLength=1,delete t["path-length"],t["stroke-dashoffset"]=x.transform(-s);const i=x.transform(e),r=x.transform(n);t["stroke-dasharray"]=`${i} ${r}`}function zr(t){const e={},n={};for(const s in t){const i=Wr(s);if(i in Kr){const r=t[s];e[i]=L(r)?r.get():r}else n[s]=t[s]}return e["path-length"]!==void 0&&Gr(e,e["path-length"],e["path-spacing"],e["path-offset"]),{attrs:e,style:n}}function Hr({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Xr(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Yr(t,e){return Hr(Xr(t.getBoundingClientRect(),e))}const Bn={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"]},Se={};for(const t in Bn)Se[t]={isEnabled:e=>Bn[t].some(n=>!!e[n])};const jn=()=>({translate:0,scale:1,origin:0,originPoint:0}),ut=()=>({x:jn(),y:jn()}),Fn=()=>({min:0,max:0}),D=()=>({x:Fn(),y:Fn()}),qr=typeof window<"u",Qt={current:null},ci={current:!1};function Zr(){if(ci.current=!0,!!qr)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Qt.current=t.matches;t.addEventListener("change",e),e()}else Qt.current=!1}function Qr(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Jr(t){return typeof t=="string"||Array.isArray(t)}const ta=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ea=["initial",...ta];function hi(t){return Qr(t.animate)||ea.some(e=>Jr(t[e]))}function na(t){return!!(hi(t)||t.variants)}function Ke(t,e){t.indexOf(e)===-1&&t.push(e)}function ie(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class We{constructor(){this.subscriptions=[]}add(e){return Ke(this.subscriptions,e),()=>ie(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function fi(t,e){return e?t*(1e3/e):0}const kn=30,sa=t=>!isNaN(parseFloat(t));class ia{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var i;const r=F.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=F.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=sa(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new We);const s=this.events[e].add(n);return e==="change"?()=>{s(),V.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=F.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>kn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,kn);return fi(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function dt(t,e){return new ia(t,e)}function oa(t,e,n){for(const s in e){const i=e[s],r=n[s];if(L(i))t.addValue(s,i);else if(L(r))t.addValue(s,dt(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,dt(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}function On(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function di(t,e,n,s){if(typeof e=="function"){const[i,r]=On(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=On(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function ra(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const st=t=>t*180/Math.PI,we=t=>{const e=st(Math.atan2(t[1],t[0]));return Ae(e)},aa={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:we,rotateZ:we,skewX:t=>st(Math.atan(t[1])),skewY:t=>st(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Ae=t=>(t=t%360,t<0&&(t+=360),t),In=we,_n=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Un=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),la={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:_n,scaleY:Un,scale:t=>(_n(t)+Un(t))/2,rotateX:t=>Ae(st(Math.atan2(t[6],t[5]))),rotateY:t=>Ae(st(Math.atan2(-t[2],t[0]))),rotateZ:In,rotate:In,skewX:t=>st(Math.atan(t[4])),skewY:t=>st(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Pe(t){return t.includes("scale")?1:0}function Ve(t,e){if(!t||t==="none")return Pe(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=la,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=aa,i=a}if(!i)return Pe(e);const r=s[e],o=i[1].split(",").map(ca);return typeof r=="function"?r(o):o[r]}const ua=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Ve(n,e)};function ca(t){return parseFloat(t.trim())}const mt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],gt=new Set(mt),q=(t,e,n)=>n>e?e:n<t?t:n,yt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Bt={...yt,transform:t=>q(0,1,t)},Wt={...yt,default:1},$n=t=>t===yt||t===x,ha=new Set(["x","y","z"]),fa=mt.filter(t=>!ha.has(t));function da(t){const e=[];return fa.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const ot={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),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})=>Ve(e,"x"),y:(t,{transform:e})=>Ve(e,"y")};ot.translateX=ot.x;ot.translateY=ot.y;const rt=new Set;let Ee=!1,Ce=!1,Me=!1;function pi(){if(Ce){const t=Array.from(rt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=da(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{var a;(a=s.getValue(r))==null||a.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Ce=!1,Ee=!1,rt.forEach(t=>t.complete(Me)),rt.clear()}function mi(){rt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ce=!0)})}function pa(){Me=!0,mi(),pi(),Me=!1}class Ge{constructor(e,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(rt.add(this),Ee||(Ee=!0,V.read(mi),V.resolveKeyframes(pi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i?.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&r===void 0&&i.set(e[0])}ra(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),rt.delete(this)}cancel(){this.state==="scheduled"&&(rt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const gi=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),yi=t=>/^0[^.\s]+$/u.test(t),Et=t=>Math.round(t*1e5)/1e5,ze=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ma(t){return t==null}const ga=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,He=(t,e)=>n=>!!(typeof n=="string"&&ga.test(n)&&n.startsWith(t)||e&&!ma(n)&&Object.prototype.hasOwnProperty.call(n,e)),vi=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(ze);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},ya=t=>q(0,255,t),le={...yt,transform:t=>Math.round(ya(t))},it={test:He("rgb","red"),parse:vi("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+le.transform(t)+", "+le.transform(e)+", "+le.transform(n)+", "+Et(Bt.transform(s))+")"};function va(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const De={test:He("#"),parse:va,transform:it.transform},ct={test:He("hsl","hue"),parse:vi("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+W.transform(Et(e))+", "+W.transform(Et(n))+", "+Et(Bt.transform(s))+")"},R={test:t=>it.test(t)||De.test(t)||ct.test(t),parse:t=>it.test(t)?it.parse(t):ct.test(t)?ct.parse(t):De.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?it.transform(t):ct.transform(t),getAnimatableNone:t=>{const e=R.parse(t);return e.alpha=0,R.transform(e)}},Ta=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function xa(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(ze))==null?void 0:e.length)||0)+(((n=t.match(Ta))==null?void 0:n.length)||0)>0}const Ti="number",xi="color",ba="var",Sa="var(",Nn="${}",wa=/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 jt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(wa,l=>(R.test(l)?(s.color.push(r),i.push(xi),n.push(R.parse(l))):l.startsWith(Sa)?(s.var.push(r),i.push(ba),n.push(l)):(s.number.push(r),i.push(Ti),n.push(parseFloat(l))),++r,Nn)).split(Nn);return{values:n,split:a,indexes:s,types:i}}function bi(t){return jt(t).values}function Si(t){const{split:e,types:n}=jt(t),s=e.length;return i=>{let r="";for(let o=0;o<s;o++)if(r+=e[o],i[o]!==void 0){const a=n[o];a===Ti?r+=Et(i[o]):a===xi?r+=R.transform(i[o]):r+=i[o]}return r}}const Aa=t=>typeof t=="number"?0:R.test(t)?R.getAnimatableNone(t):t;function Pa(t){const e=bi(t);return Si(t)(e.map(Aa))}const et={test:xa,parse:bi,createTransformer:Si,getAnimatableNone:Pa},Va={test:t=>t==="auto",parse:t=>t},wi=t=>e=>e.test(t),Ai=[yt,x,W,tt,Ur,_r,Va],Kn=t=>Ai.find(wi(t)),Ea=[...Ai,R,et],Ca=t=>Ea.find(wi(t)),Ma=new Set(["brightness","contrast","saturate","opacity"]);function Da(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(ze)||[];if(!s)return t;const i=n.replace(s,"");let r=Ma.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Ra=/\b([a-z-]*)\(.*?\)/gu,Re={...et,getAnimatableNone:t=>{const e=t.match(Ra);return e?e.map(Da).join(" "):t}},Wn={...yt,transform:Math.round},La={rotate:tt,rotateX:tt,rotateY:tt,rotateZ:tt,scale:Wt,scaleX:Wt,scaleY:Wt,scaleZ:Wt,skew:tt,skewX:tt,skewY:tt,distance:x,translateX:x,translateY:x,translateZ:x,x,y:x,z:x,perspective:x,transformPerspective:x,opacity:Bt,originX:Ln,originY:Ln,originZ:x},Xe={borderWidth:x,borderTopWidth:x,borderRightWidth:x,borderBottomWidth:x,borderLeftWidth:x,borderRadius:x,radius:x,borderTopLeftRadius:x,borderTopRightRadius:x,borderBottomRightRadius:x,borderBottomLeftRadius:x,width:x,maxWidth:x,height:x,maxHeight:x,top:x,right:x,bottom:x,left:x,padding:x,paddingTop:x,paddingRight:x,paddingBottom:x,paddingLeft:x,margin:x,marginTop:x,marginRight:x,marginBottom:x,marginLeft:x,backgroundPositionX:x,backgroundPositionY:x,...La,zIndex:Wn,fillOpacity:Bt,strokeOpacity:Bt,numOctaves:Wn},Ba={...Xe,color:R,backgroundColor:R,outlineColor:R,fill:R,stroke:R,borderColor:R,borderTopColor:R,borderRightColor:R,borderBottomColor:R,borderLeftColor:R,filter:Re,WebkitFilter:Re},Pi=t=>Ba[t];function Vi(t,e){let n=Pi(t);return n!==Re&&(n=et),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const{schedule:Ei}=ri(queueMicrotask,!0),Gn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ci{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ge,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=F.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,V.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=hi(n),this.isVariantNode=na(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in h){const f=h[d];l[d]!==void 0&&L(f)&&f.set(l[d])}}mount(e){var n;this.current=e,at.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,i)=>this.bindToMotionValue(i,s)),ci.current||Zr(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Qt.current,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),Y(this.notifyUpdate),Y(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=gt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&V.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Se){const n=Se[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):D()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Gn.length;s++){const i=Gn[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=oa(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=dt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(gi(s)||yi(s))?s=parseFloat(s):!Ca(s)&&et.test(n)&&(s=Vi(e,n)),this.setBaseTarget(e,L(s)?s.get():s)),L(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props;let i;if(typeof s=="string"||typeof s=="object"){const o=di(this.props,s,(n=this.presenceContext)==null?void 0:n.custom);o&&(i=o[e])}if(s&&i!==void 0)return i;const r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!L(r)?r:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new We),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Ei.render(this.render)}}const Mi=new Set(["width","height","top","left","right","bottom",...mt]);let Ye=()=>{};const ja=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Fa(t){const e=ja.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Di(t,e,n=1){const[s,i]=Fa(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return gi(o)?parseFloat(o):o}return $e(i)?Di(i,e,n+1):i}function ka(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||yi(t):!0}const Oa=new Set(["auto","none","0"]);function Ia(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!Oa.has(r)&&jt(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=Vi(n,i)}class _a extends Ge{constructor(e,n,s,i,r){super(e,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let c=e[l];if(typeof c=="string"&&(c=c.trim(),$e(c))){const u=Di(c,n.current);u!==void 0&&(e[l]=u),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Mi.has(s)||e.length!==2)return;const[i,r]=e,o=Kn(i),a=Kn(r);if(o!==a)if($n(o)&&$n(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else ot[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||ka(e[i]))&&s.push(i);s.length&&Ia(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ot[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){var e;const{element:n,name:s,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const r=n.getValue(s);r&&r.jump(this.measuredOrigin,!1);const o=i.length-1,a=i[o];i[o]=ot[s](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(e=this.removedTransforms)!=null&&e.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}class Ri extends Ci{constructor(){super(...arguments),this.KeyframeResolver=_a}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;L(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}const Li=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Ua={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},$a=mt.length;function Na(t,e,n){let s="",i=!0;for(let r=0;r<$a;r++){const o=mt[r],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=Li(a,Xe[o]);if(!l){i=!1;const u=Ua[o]||o;s+=`${u}(${c}) `}n&&(e[o]=c)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Bi(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const l in e){const c=e[l];if(gt.has(l)){o=!0;continue}else if(Ue(l)){i[l]=c;continue}else{const u=Li(c,Xe[l]);l.startsWith("origin")?(a=!0,r[l]=u):s[l]=u}}if(e.transform||(o||n?s.transform=Na(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=r;s.transformOrigin=`${l} ${c} ${u}`}}function ji(t,{style:e,vars:n},s,i){const r=t.style;let o;for(o in e)r[o]=e[o];i?.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function Ka(t,{layout:e,layoutId:n}){return gt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Lt[t]||t==="opacity")}function Fi(t,e,n){var s;const{style:i}=t,r={};for(const o in i)(L(i[o])||e.style&&L(e.style[o])||Ka(o,t)||((s=n?.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(r[o]=i[o]);return r}function Wa(t){return window.getComputedStyle(t)}class ki extends Ri{constructor(){super(...arguments),this.type="html",this.renderInstance=ji}readValueFromInstance(e,n){var s;if(gt.has(n))return(s=this.projection)!=null&&s.isProjecting?Pe(n):ua(e,n);{const i=Wa(e),r=(Ue(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Yr(e,n)}build(e,n,s){Bi(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Fi(e,n,s)}}const qe=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ga={offset:"stroke-dashoffset",array:"stroke-dasharray"},za={offset:"strokeDashoffset",array:"strokeDasharray"};function Ha(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?Ga:za;t[r.offset]=x.transform(-s);const o=x.transform(e),a=x.transform(n);t[r.array]=`${o} ${a}`}function Xa(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},l,c,u){if(Bi(t,a,c),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;h.transform&&(d.transform=h.transform,delete h.transform),(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete h.transformBox),e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&Ha(h,i,r,o,!1)}const Oi=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"]),Ya=t=>typeof t=="string"&&t.toLowerCase()==="svg";function qa(t,e,n,s){ji(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Oi.has(i)?i:qe(i),e.attrs[i])}function Za(t,e,n){const s=Fi(t,e,n);for(const i in t)if(L(t[i])||L(e[i])){const r=mt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}class Ii extends Ri{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=D}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(gt.has(n)){const s=Pi(n);return s&&s.default||0}return n=Oi.has(n)?n:qe(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Za(e,n,s)}build(e,n,s){Xa(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){qa(e,n,s,i)}mount(e){this.isSVGTag=Ya(e.tagName),super.mount(e)}}function Qa(t,e){return ui(t)?new Ii(e):new ki(e)}function Ja(t,e,n,s=0,i=1){const r=Array.from(t),o=r.indexOf(e),a=t.size,l=(a-1)*s,c=typeof n=="function";return o===r.length-1&&(e.parent.enteringChildren=void 0),c?n(o,a):i===1?o*s:l-o*s}function Ze(t){return typeof t=="object"&&!Array.isArray(t)}function Qe(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}function _i(t,e,n,s){return typeof t=="string"&&Ze(e)?Qe(t,n,s):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function tl(t,e,n){return t*(e+1)}function zn(t,e,n,s){return typeof e=="number"?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):e==="<"?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):s.get(e)??t}const E=(t,e,n)=>t+(e-t)*n,el=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t},Ui=t=>Array.isArray(t)&&typeof t[0]!="number";function $i(t,e){return Ui(t)?t[el(0,t.length,e)]:t}function nl(t,e,n){for(let s=0;s<t.length;s++){const i=t[s];i.at>e&&i.at<n&&(ie(t,i),s--)}}function sl(t,e,n,s,i,r){nl(t,i,r);for(let o=0;o<e.length;o++)t.push({value:e[o],at:E(i,r,s[o]),easing:$i(n,o)})}function il(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function ol(t,e){return t.at===e.at?t.value===null?1:e.value===null?-1:0:t.at-e.at}const pt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};function Ni(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=pt(0,e,s);t.push(E(n,1,i))}}function Ki(t){const e=[0];return Ni(e,t.length-1),e}const Jt=2e4;function Je(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Jt;)e+=n,s=t.next(e);return e>=Jt?1/0:e}function Wi(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(Je(s),Jt);return{type:"keyframes",ease:r=>s.next(i*r).value/e,duration:K(i)}}function tn(t){return typeof t=="function"&&"applyToOptions"in t}const rl="easeInOut";function al(t,{defaultTransition:e={},...n}={},s,i){const r=e.duration||.3,o=new Map,a=new Map,l={},c=new Map;let u=0,h=0,d=0;for(let f=0;f<t.length;f++){const p=t[f];if(typeof p=="string"){c.set(p,h);continue}else if(!Array.isArray(p)){c.set(p.name,zn(h,p.at,u,c));continue}let[m,g,y={}]=p;y.at!==void 0&&(h=zn(h,y.at,u,c));let b=0;const v=(w,T,A,C=0,S=0)=>{const P=ll(w),{delay:O=0,times:$=Ki(P),type:oe="keyframes",repeat:Ut,repeatType:Mh,repeatDelay:Dh=0,...Io}=T;let{ease:Q=e.ease||"easeOut",duration:G}=T;const dn=typeof O=="function"?O(C,S):O,pn=P.length,mn=tn(oe)?oe:i?.[oe||"keyframes"];if(pn<=2&&mn){let vt=100;if(pn===2&&hl(P)){const Tt=P[1]-P[0];vt=Math.abs(Tt)}const $t={...Io};G!==void 0&&($t.duration=U(G));const Nt=Wi($t,vt,mn);Q=Nt.ease,G=Nt.duration}G??(G=r);const gn=h+dn;$.length===1&&$[0]===0&&($[1]=1);const yn=$.length-P.length;if(yn>0&&Ni($,yn),P.length===1&&P.unshift(null),Ut){G=tl(G,Ut);const vt=[...P],$t=[...$];Q=Array.isArray(Q)?[...Q]:[Q];const Nt=[...Q];for(let Tt=0;Tt<Ut;Tt++){P.push(...vt);for(let xt=0;xt<vt.length;xt++)$.push($t[xt]+(Tt+1)),Q.push(xt===0?"linear":$i(Nt,xt-1))}il($,Ut)}const vn=gn+G;sl(A,P,Q,$,gn,vn),b=Math.max(dn+G,b),d=Math.max(vn,d)};if(L(m)){const w=Hn(m,a);v(g,y,Xn("default",w))}else{const w=_i(m,g,s,l),T=w.length;for(let A=0;A<T;A++){g=g,y=y;const C=w[A],S=Hn(C,a);for(const P in g)v(g[P],ul(y,P),Xn(P,S),A,T)}}u=h,h+=b}return a.forEach((f,p)=>{for(const m in f){const g=f[m];g.sort(ol);const y=[],b=[],v=[];for(let T=0;T<g.length;T++){const{at:A,value:C,easing:S}=g[T];y.push(C),b.push(pt(0,d,A)),v.push(S||"easeOut")}b[0]!==0&&(b.unshift(0),y.unshift(y[0]),v.unshift(rl)),b[b.length-1]!==1&&(b.push(1),y.push(null)),o.has(p)||o.set(p,{keyframes:{},transition:{}});const w=o.get(p);w.keyframes[m]=y,w.transition[m]={...e,duration:d,ease:v,times:b,...n}}}),o}function Hn(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Xn(t,e){return e[t]||(e[t]=[]),e[t]}function ll(t){return Array.isArray(t)?t:[t]}function ul(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const cl=t=>typeof t=="number",hl=t=>t.every(cl),fl=t=>Array.isArray(t);function dl(t,e,n){const s=t.getProps();return di(s,e,s.custom,t)}function pl(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,dt(n))}function ml(t){return fl(t)?t[t.length-1]||0:t}function gl(t,e){const n=dl(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=ml(r[o]);pl(t,o,a)}}function yl(t){return!!(L(t)&&t.add)}function vl(t,e){const n=t.getValue("willChange");if(yl(n))return n.add(e);if(!n&&X.WillChange){const s=new X.WillChange("auto");t.addValue("willChange",s),s.add(e)}}const Tl="framerAppearId",xl="data-"+qe(Tl);function Gi(t){return t.props[xl]}const bl=t=>t!==null;function Sl(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(bl),r=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[r]}const wl={type:"spring",stiffness:500,damping:25,restSpeed:10},Al=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Pl={type:"keyframes",duration:.8},Vl={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},El=(t,{keyframes:e})=>e.length>2?Pl:gt.has(t)?t.startsWith("scale")?Al(e[1]):wl:Vl;function Cl({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function en(t,e){return t?.[e]??t?.default??t}function Le(t){t.duration=0,t.type}function ue(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Ml({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=ue(l,a,t+1/3),r=ue(l,a,t),o=ue(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function te(t,e){return n=>n>0?e:t}const ce=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Dl=[De,it,ct],Rl=t=>Dl.find(e=>e.test(t));function Yn(t){const e=Rl(t);if(!e)return!1;let n=e.parse(t);return e===ct&&(n=Ml(n)),n}const qn=(t,e)=>{const n=Yn(t),s=Yn(e);if(!n||!s)return te(t,e);const i={...n};return r=>(i.red=ce(n.red,s.red,r),i.green=ce(n.green,s.green,r),i.blue=ce(n.blue,s.blue,r),i.alpha=E(n.alpha,s.alpha,r),it.transform(i))},Be=new Set(["none","hidden"]);function Ll(t,e){return Be.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}const Bl=(t,e)=>n=>e(t(n)),It=(...t)=>t.reduce(Bl);function jl(t,e){return n=>E(t,e,n)}function nn(t){return typeof t=="number"?jl:typeof t=="string"?$e(t)?te:R.test(t)?qn:Ol:Array.isArray(t)?zi:typeof t=="object"?R.test(t)?qn:Fl:te}function zi(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>nn(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function Fl(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=nn(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function kl(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const r=e.types[i],o=t.indexes[r][s[r]],a=t.values[o]??0;n[i]=a,s[r]++}return n}const Ol=(t,e)=>{const n=et.createTransformer(e),s=jt(t),i=jt(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Be.has(t)&&!i.values.length||Be.has(e)&&!s.values.length?Ll(t,e):It(zi(kl(s,i),i.values),n):te(t,e)};function Hi(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?E(t,e,n):nn(t)(t,e)}const Il=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>V.update(e,n),stop:()=>Y(e),now:()=>B.isProcessing?B.timestamp:F.now()}},Xi=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=Math.round(t(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},_l=5;function Yi(t,e,n){const s=Math.max(e-_l,0);return fi(n-t(s),e-s)}const M={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},he=.001;function Ul({duration:t=M.duration,bounce:e=M.bounce,velocity:n=M.velocity,mass:s=M.mass}){let i,r,o=1-e;o=q(M.minDamping,M.maxDamping,o),t=q(M.minDuration,M.maxDuration,K(t)),o<1?(i=c=>{const u=c*o,h=u*t,d=u-n,f=je(c,o),p=Math.exp(-h);return he-d/f*p},r=c=>{const h=c*o*t,d=h*n+n,f=Math.pow(o,2)*Math.pow(c,2)*t,p=Math.exp(-h),m=je(Math.pow(c,2),o);return(-i(c)+he>0?-1:1)*((d-f)*p)/m}):(i=c=>{const u=Math.exp(-c*t),h=(c-n)*t+1;return-he+u*h},r=c=>{const u=Math.exp(-c*t),h=(n-c)*(t*t);return u*h});const a=5/t,l=Nl(i,r,a);if(t=U(t),isNaN(l))return{stiffness:M.stiffness,damping:M.damping,duration:t};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:o*2*Math.sqrt(s*c),duration:t}}}const $l=12;function Nl(t,e,n){let s=n;for(let i=1;i<$l;i++)s=s-t(s)/e(s);return s}function je(t,e){return t*Math.sqrt(1-e*e)}const Kl=["duration","bounce"],Wl=["stiffness","damping","mass"];function Zn(t,e){return e.some(n=>t[n]!==void 0)}function Gl(t){let e={velocity:M.velocity,stiffness:M.stiffness,damping:M.damping,mass:M.mass,isResolvedFromDuration:!1,...t};if(!Zn(t,Wl)&&Zn(t,Kl))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*q(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:M.mass,stiffness:i,damping:r}}else{const n=Ul(t);e={...e,...n,mass:M.mass},e.isResolvedFromDuration=!0}return e}function Ft(t=M.visualDuration,e=M.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:c,mass:u,duration:h,velocity:d,isResolvedFromDuration:f}=Gl({...n,velocity:-K(n.velocity||0)}),p=d||0,m=c/(2*Math.sqrt(l*u)),g=o-r,y=K(Math.sqrt(l/u)),b=Math.abs(g)<5;s||(s=b?M.restSpeed.granular:M.restSpeed.default),i||(i=b?M.restDelta.granular:M.restDelta.default);let v;if(m<1){const T=je(y,m);v=A=>{const C=Math.exp(-m*y*A);return o-C*((p+m*y*g)/T*Math.sin(T*A)+g*Math.cos(T*A))}}else if(m===1)v=T=>o-Math.exp(-y*T)*(g+(p+y*g)*T);else{const T=y*Math.sqrt(m*m-1);v=A=>{const C=Math.exp(-m*y*A),S=Math.min(T*A,300);return o-C*((p+m*y*g)*Math.sinh(S)+T*g*Math.cosh(S))/T}}const w={calculatedDuration:f&&h||null,next:T=>{const A=v(T);if(f)a.done=T>=h;else{let C=T===0?p:0;m<1&&(C=T===0?U(p):Yi(v,T,A));const S=Math.abs(C)<=s,P=Math.abs(o-A)<=i;a.done=S&&P}return a.value=a.done?o:A,a},toString:()=>{const T=Math.min(Je(w),Jt),A=Xi(C=>w.next(T*C).value,T,30);return T+"ms "+A},toTransition:()=>{}};return w}Ft.applyToOptions=t=>{const e=Wi(t,100,Ft);return t.ease=e.ease,t.duration=U(e.duration),t.type="keyframes",t};function Fe({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},f=S=>a!==void 0&&S<a||l!==void 0&&S>l,p=S=>a===void 0?l:l===void 0||Math.abs(a-S)<Math.abs(l-S)?a:l;let m=n*e;const g=h+m,y=o===void 0?g:o(g);y!==g&&(m=y-h);const b=S=>-m*Math.exp(-S/s),v=S=>y+b(S),w=S=>{const P=b(S),O=v(S);d.done=Math.abs(P)<=c,d.value=d.done?y:O};let T,A;const C=S=>{f(d.value)&&(T=S,A=Ft({keyframes:[d.value,p(d.value)],velocity:Yi(v,S,d.value),damping:i,stiffness:r,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:S=>{let P=!1;return!A&&T===void 0&&(P=!0,w(S),C(S)),T!==void 0&&S>=T?A.next(S-T):(!P&&w(S),d)}}}function zl(t,e,n){const s=[],i=n||X.mix||Hi,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||k:e;a=It(l,a)}s.push(a)}return s}function Hl(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(Ye(r===e.length),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=zl(e,s,i),l=a.length,c=u=>{if(o&&u<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(u<t[h+1]);h++);const d=pt(t[h],t[h+1],u);return a[h](d)};return n?u=>c(q(t[0],t[r-1],u)):c}function Xl(t,e){return t.map(n=>n*e)}const qi=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Yl=1e-7,ql=12;function Zl(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=qi(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>Yl&&++a<ql);return o}function _t(t,e,n,s){if(t===e&&n===s)return k;const i=r=>Zl(r,0,1,t,n);return r=>r===0||r===1?r:qi(i(r),e,s)}const Ql=_t(.42,0,1,1),Jl=_t(0,0,.58,1),Zi=_t(.42,0,.58,1),Qi=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Ji=t=>e=>1-t(1-e),to=_t(.33,1.53,.69,.99),sn=Ji(to),eo=Qi(sn),no=t=>(t*=2)<1?.5*sn(t):.5*(2-Math.pow(2,-10*(t-1))),on=t=>1-Math.sin(Math.acos(t)),so=Ji(on),io=Qi(on),oo=t=>Array.isArray(t)&&typeof t[0]=="number",tu={linear:k,easeIn:Ql,easeInOut:Zi,easeOut:Jl,circIn:on,circInOut:io,circOut:so,backIn:sn,backInOut:eo,backOut:to,anticipate:no},eu=t=>typeof t=="string",Qn=t=>{if(oo(t)){Ye(t.length===4);const[e,n,s,i]=t;return _t(e,n,s,i)}else if(eu(t))return tu[t];return t};function nu(t,e){return t.map(()=>e||Zi).splice(0,t.length-1)}function Ct({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Ui(s)?s.map(Qn):Qn(s),r={done:!1,value:e[0]},o=Xl(n&&n.length===e.length?n:Ki(e),t),a=Hl(o,e,{ease:Array.isArray(i)?i:nu(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const su=t=>t!==null;function rn(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(su),a=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const iu={decay:Fe,inertia:Fe,tween:Ct,keyframes:Ct,spring:Ft};function ro(t){typeof t.type=="string"&&(t.type=iu[t.type])}class an{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const ou=t=>t/100;class ln extends an{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var n,s;const{motionValue:i}=this.options;i&&i.updatedAt!==F.now()&&this.tick(F.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(n=this.options).onStop)==null||s.call(n))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;ro(e);const{type:n=Ct,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const l=n||Ct;l!==Ct&&typeof a[0]!="number"&&(this.mixKeyframes=It(ou,Hi(a[0],a[1])),a=[0,100]);const c=l({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=Je(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=c}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:c=0,keyframes:u,repeat:h,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,w=s;if(h){const S=Math.min(this.currentTime,i)/a;let P=Math.floor(S),O=S%1;!O&&S>=1&&(O=1),O===1&&P--,P=Math.min(P,h+1),P%2&&(d==="reverse"?(O=1-O,f&&(O-=f/a)):d==="mirror"&&(w=o)),v=q(0,1,O)*a}const T=b?{done:!1,value:u[0]}:w.next(v);r&&(T.value=r(T.value));let{done:A}=T;!b&&l!==null&&(A=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return C&&p!==Fe&&(T.value=rn(u,this.options,g,this.speed)),m&&m(T.value),C&&this.finish(),T}then(e,n){return this.finished.then(e,n)}get duration(){return K(this.calculatedDuration)}get time(){return K(this.currentTime)}set time(e){var n;e=U(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(F.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=K(this.currentTime))}play(){var e,n;if(this.isStopped)return;const{driver:s=Il,startTime:i}=this.options;this.driver||(this.driver=s(o=>this.tick(o))),(n=(e=this.options).onPlay)==null||n.call(e);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=i??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(F.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}const ru=t=>t.startsWith("--");function au(t,e,n){ru(e)?t.style.setProperty(e,n):t.style[e]=n}function un(t){let e;return()=>(e===void 0&&(e=t()),e)}const lu=un(()=>window.ScrollTimeline!==void 0),uu={};function cu(t,e){const n=un(t);return()=>uu[e]??n()}const ao=cu(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),St=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Jn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:St([0,.65,.55,1]),circOut:St([.55,0,1,.45]),backIn:St([.31,.01,.66,-.59]),backOut:St([.33,1.53,.69,.99])};function lo(t,e){if(t)return typeof t=="function"?ao()?Xi(t,e):"ease-out":oo(t)?St(t):Array.isArray(t)?t.map(n=>lo(n,e)||Jn.easeOut):Jn[t]}function hu(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=lo(a,i);Array.isArray(h)&&(u.easing=h);const d={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return c&&(d.pseudoElement=c),t.animate(u,d)}function fu({type:t,...e}){return tn(t)&&ao()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class du extends an{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,Ye(typeof e.type!="string");const c=fu(e);this.animation=hu(n,s,i,c,r),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const u=rn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):au(n,s,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,n;this.isPseudoElement||(n=(e=this.animation).commitStyles)==null||n.call(e)}get duration(){var e,n;const s=((n=(e=this.animation.effect)==null?void 0:e.getComputedTiming)==null?void 0:n.call(e).duration)||0;return K(Number(s))}get time(){return K(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=U(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&lu()?(this.animation.timeline=e,k):n(this)}}const uo={anticipate:no,backInOut:eo,circInOut:io};function pu(t){return t in uo}function mu(t){typeof t.ease=="string"&&pu(t.ease)&&(t.ease=uo[t.ease])}const ts=10;class gu extends du{constructor(e){mu(e),ro(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new ln({...o,autoplay:!1}),l=U(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-ts).value,a.sample(l).value,ts),a.stop()}}const es=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(et.test(t)||t==="0")&&!t.startsWith("url("));function yu(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function vu(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=es(i,e),a=es(r,e);return!o||!a?!1:yu(t)||(n==="spring"||tn(n))&&s}const Tu=new Set(["opacity","clipPath","filter","transform"]),xu=un(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function bu(t){var e;const{motionValue:n,name:s,repeatDelay:i,repeatType:r,damping:o,type:a}=t;if(!(((e=n?.owner)==null?void 0:e.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=n.owner.getProps();return xu()&&s&&Tu.has(s)&&(s!=="transform"||!u)&&!c&&!i&&r!=="mirror"&&o!==0&&a!=="inertia"}const Su=40;class wu extends an{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:c,element:u,...h}){var d;super(),this.stop=()=>{var m,g;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(g=this.keyframeResolver)==null||g.cancel()},this.createdAt=F.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:l,motionValue:c,element:u,...h},p=u?.KeyframeResolver||Ge;this.keyframeResolver=new p(a,(m,g,y)=>this.onKeyframesResolved(m,g,f,!y),l,c,u),(d=this.keyframeResolver)==null||d.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:u}=s;this.resolvedAt=F.now(),vu(e,r,o,a)||((X.instantAnimations||!l)&&u?.(rn(e,s,n)),e[0]=e[e.length-1],Le(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Su?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},f=!c&&bu(d)?new gu({...d,element:d.motionValue.owner.current}):new ln(d);f.finished.then(()=>this.notifyFinished()).catch(k),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),pa()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}const cn=(t,e,n,s={},i,r)=>o=>{const a=en(s,t)||{},l=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-U(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:d=>{e.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};Cl(a)||Object.assign(u,El(t,u)),u.duration&&(u.duration=U(u.duration)),u.repeatDelay&&(u.repeatDelay=U(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Le(u),u.delay===0&&(h=!0)),(X.instantAnimations||X.skipAnimations)&&(h=!0,Le(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const d=Sl(u.keyframes,a);if(d!==void 0){V.update(()=>{u.onUpdate(d),u.onComplete()});return}}return a.isSync?new ln(u):new wu(u)};function Au({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Pu(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r=t.getDefaultTransition(),transitionEnd:o,...a}=e;s&&(r=s);const l=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const u in a){const h=t.getValue(u,t.latestValues[u]??null),d=a[u];if(d===void 0||c&&Au(c,u))continue;const f={delay:n,...en(r||{},u)},p=h.get();if(p!==void 0&&!h.isAnimating&&!Array.isArray(d)&&d===p&&!f.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){const y=Gi(t);if(y){const b=window.MotionHandoffAnimation(y,u,V);b!==null&&(f.startTime=b,m=!0)}}vl(t,u),h.start(cn(u,h,d,t.shouldReduceMotion&&Mi.has(u)?{type:!1}:f,t,m));const g=h.animation;g&&l.push(g)}return o&&Promise.all(l).then(()=>{V.update(()=>{o&&gl(t,o)})}),l}function Vu(t,e){return t in e}class Eu extends Ci{constructor(){super(...arguments),this.type="object"}readValueFromInstance(e,n){if(Vu(n,e)){const s=e[n];if(typeof s=="string"||typeof s=="number")return s}}getBaseTargetFromProps(){}removeValueFromRenderState(e,n){delete n.output[e]}measureInstanceViewportBox(){return D()}build(e,n){Object.assign(e.output,n)}renderInstance(e,{output:n}){Object.assign(e,n)}sortInstanceNodePosition(){return 0}}function co(t){return typeof t=="object"&&t!==null}function hn(t){return co(t)&&"ownerSVGElement"in t}function ho(t){return hn(t)&&t.tagName==="svg"}function Cu(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=hn(t)&&!ho(t)?new Ii(e):new ki(e);n.mount(t),at.set(t,n)}function Mu(t){const e={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new Eu(e);n.mount(t),at.set(t,n)}function fo(t,e,n){const s=L(t)?t:dt(t);return s.start(cn("",s,e,n)),s.animation}function Du(t,e){return L(t)||typeof t=="number"||typeof t=="string"&&!Ze(e)}function po(t,e,n,s){const i=[];if(Du(t,e))i.push(fo(t,Ze(e)&&e.default||e,n&&(n.default||n)));else{const r=_i(t,e,s),o=r.length;for(let a=0;a<o;a++){const l=r[a],c=l instanceof Element?Cu:Mu;at.has(l)||c(l);const u=at.get(l),h={...n};"delay"in h&&typeof h.delay=="function"&&(h.delay=h.delay(a,o)),i.push(...Pu(u,{...e,transition:h},{}))}}return i}function Ru(t,e,n){const s=[];return al(t,e,n,{spring:Ft}).forEach(({keyframes:r,transition:o},a)=>{s.push(...po(a,r,o))}),s}class Lu{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,n){for(let s=0;s<this.animations.length;s++)this.animations[s][e]=n}attachTimeline(e){const n=this.animations.map(s=>s.attachTimeline(e));return()=>{n.forEach((s,i)=>{s&&s(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Bu extends Lu{then(e,n){return this.finished.finally(e).then(()=>{})}}function ju(t){return Array.isArray(t)&&t.some(Array.isArray)}function Fu(t){function e(n,s,i){let r=[];return ju(n)?r=Ru(n,s,t):r=po(n,s,i,t),new Bu(r)}return e}const ku=Fu(),Ou=["initial","animate","whileInView","whileHover","whilePress","whileDrag","whileFocus","exit"];class Iu extends Z{constructor(e){var n,s;super(e),this.animateUpdates=({controlActiveState:i,directAnimate:r,directTransition:o,controlDelay:a=0,isExit:l}={})=>{const{reducedMotion:c}=this.state.options.motionConfig;this.state.visualElement.shouldReduceMotion=c==="always"||c==="user"&&!!Qt.current;const u=this.state.target;this.state.target={...this.state.baseTarget};let h={};h=this.resolveStateAnimation({controlActiveState:i,directAnimate:r,directTransition:o}),this.state.finalTransition=h;const d=this.createAnimationFactories(u,h,a),{getChildAnimations:f}=this.setupChildAnimations(h,this.state.activeStates);return this.executeAnimations({factories:d,getChildAnimations:f,transition:h,controlActiveState:i,isExit:l})},this.state.visualElement=Qa(this.state.options.as,{presenceContext:null,parent:(n=this.state.parent)==null?void 0:n.visualElement,props:{...this.state.options,whileTap:this.state.options.whilePress},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{...this.state.baseTarget}},reducedMotionConfig:this.state.options.motionConfig.reducedMotion}),(s=this.state.visualElement.parent)==null||s.addChild(this.state.visualElement),this.state.animateUpdates=this.animateUpdates,this.state.isMounted()&&this.state.startAnimation()}updateAnimationControlsSubscription(){const{animate:e}=this.state.options;Vn(e)&&(this.unmountControls=e.subscribe(this.state))}executeAnimations({factories:e,getChildAnimations:n,transition:s,controlActiveState:i,isExit:r=!1}){const o=()=>Promise.all(e.map(h=>h()).filter(Boolean)),a={...this.state.target},l=this.state.element,c=h=>{var d,f;l.dispatchEvent(Cn("motionstart",a)),(f=(d=this.state.options).onAnimationStart)==null||f.call(d,a),h.then(()=>{var p,m;l.dispatchEvent(Cn("motioncomplete",a,r)),(m=(p=this.state.options).onAnimationComplete)==null||m.call(p,a)}).catch(k)},u=()=>{const h=s?.when?(s.when==="beforeChildren"?o():n()).then(()=>s.when==="beforeChildren"?n():o()):Promise.all([o(),n()]);return c(h),h};return i?u:u()}setupChildAnimations(e,n){var s;const i=this.state.visualElement;if(!((s=i.variantChildren)!=null&&s.size)||!n)return{getChildAnimations:()=>Promise.resolve()};const{staggerChildren:r=0,staggerDirection:o=1,delayChildren:a=0}=e||{},l=i.variantChildren.size,c=(l-1)*r,u=typeof a=="function",h=u?f=>a(f,l):o===1?(f=0)=>f*r:(f=0)=>c-f*r,d=Array.from(i.variantChildren).map((f,p)=>f.state.animateUpdates({controlActiveState:n,controlDelay:(u?0:a)+h(p)}));return{getChildAnimations:()=>Promise.all(d.map(f=>f()))}}createAnimationFactories(e,n,s){const i=[];return Object.keys(this.state.target).forEach(r=>{var o;if(!vr(e[r],this.state.target[r]))return;(o=this.state.baseTarget)[r]??(o[r]=$r.get(this.state.element,r));const a=this.state.target[r]==="none"&&Tn(Rn[r])?Rn[r]:this.state.target[r];i.push(()=>{var l;return ku(this.state.element,{[r]:a},{...n?.[r]||n,delay:(((l=n?.[r])==null?void 0:l.delay)||n?.delay||0)+s})})}),i}resolveStateAnimation({controlActiveState:e,directAnimate:n,directTransition:s}){let i=this.state.options.transition,r={};const{variants:o,custom:a,transition:l,animatePresenceContext:c}=this.state.options,u=a??c?.custom;return this.state.activeStates={...this.state.activeStates,...e},Ou.forEach(h=>{if(!this.state.activeStates[h]||Vn(this.state.options[h]))return;const d=this.state.options[h];let f=Tn(d)?Pt(d,o,u):void 0;if(this.state.visualElement.isVariantNode){const p=Pt(this.state.context[h],o,u);f=Object.assign(p?p||{}:r,f)}f&&(h!=="initial"&&(i=f.transition||this.state.options.transition||{}),r=Object.assign(r,f))}),n&&(r=Pt(n,o,u),i=r.transition||s||l),Object.entries(r).forEach(([h,d])=>{h!=="transition"&&(this.state.target[h]=d)}),i}mount(){var e,n;const{element:s}=this.state;Vt.set(s,this.state),at.get(s)||(this.state.visualElement.mount(s),at.set(s,this.state.visualElement)),this.state.visualElement.state=this.state,this.updateAnimationControlsSubscription();const i=this.state.visualElement,r=i.parent;if(i.enteringChildren=void 0,(e=this.state.parent)!=null&&e.isMounted()&&!i.isControllingVariants&&((n=r?.enteringChildren)!=null&&n.has(i))){const{delayChildren:o}=this.state.parent.finalTransition||{};this.animateUpdates({controlActiveState:this.state.parent.activeStates,controlDelay:Ja(r.enteringChildren,i,o)})()}}update(){const{animate:e}=this.state.options,{animate:n}=this.state.visualElement.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;(e=this.unmountControls)==null||e.call(this)}}function _u(t){return co(t)&&"offsetHeight"in t}const Uu={y:!1};function $u(){return Uu.y}const mo=(t,e)=>e?t===e?!0:mo(t,e.parentElement):!1,Nu=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function go(t,e){const n=Qe(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}const Ku=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Wu(t){return Ku.has(t.tagName)||t.tabIndex!==-1}const Xt=new WeakSet;function ns(t){return e=>{e.key==="Enter"&&t(e)}}function fe(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Gu=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=ns(()=>{if(Xt.has(n))return;fe(n,"down");const i=ns(()=>{fe(n,"up")}),r=()=>fe(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function ss(t){return Nu(t)&&!0}function zu(t,e,n={}){const[s,i,r]=go(t,n),o=a=>{const l=a.currentTarget;if(!ss(a))return;Xt.add(l);const c=e(l,a),u=(f,p)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",d),Xt.has(l)&&Xt.delete(l),ss(f)&&typeof c=="function"&&c(f,{success:p})},h=f=>{u(f,l===window||l===document||n.useGlobalTarget||mo(l,f.target))},d=f=>{u(f,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",d,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),_u(a)&&(a.addEventListener("focus",c=>Gu(c,i)),!Wu(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function yo(t){return{point:{x:t.pageX,y:t.pageY}}}function is(t,e,n){const s=t.options;s.whilePress&&t.setActive("whilePress",n==="Start");const i=`onPress${n==="End"?"":n}`,r=s[i];r&&V.postRender(()=>r(e,yo(e)))}class Hu extends Z{isActive(){const{whilePress:e,onPress:n,onPressCancel:s,onPressStart:i}=this.state.options;return!!(e||n||s||i)}constructor(e){super(e)}mount(){this.register()}update(){const{whilePress:e,onPress:n,onPressCancel:s,onPressStart:i}=this.state.options;e||n||s||i||this.register()}register(){const e=this.state.element;!e||!this.isActive()||(this.unmount(),this.unmount=zu(e,(n,s)=>(is(this.state,s,"Start"),(i,{success:r})=>is(this.state,i,r?"End":"Cancel")),{useGlobalTarget:this.state.options.globalPressTarget}))}}function os(t){return!(t.pointerType==="touch"||$u())}function Xu(t,e,n={}){const[s,i,r]=go(t,n),o=a=>{if(!os(a))return;const{target:l}=a,c=e(l,a);if(typeof c!="function"||!l)return;const u=h=>{os(h)&&(c(h),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,i)};return s.forEach(a=>{a.addEventListener("pointerenter",o,i)}),r}function rs(t,e,n){const s=t.options;s.whileHover&&t.setActive("whileHover",n==="Start");const i=`onHover${n}`,r=s[i];r&&V.postRender(()=>r(e,yo(e)))}class Yu extends Z{isActive(){const{whileHover:e,onHoverStart:n,onHoverEnd:s}=this.state.options;return!!(e||n||s)}constructor(e){super(e)}mount(){this.register()}update(){const{whileHover:e,onHoverStart:n,onHoverEnd:s}=this.state.visualElement.prevProps;e||n||s||this.register()}register(){const e=this.state.element;!e||!this.isActive()||(this.unmount(),this.unmount=Xu(e,(n,s)=>(rs(this.state,s,"Start"),i=>{rs(this.state,i,"End")})))}}const qu={some:0,all:1};function Zu(t,e,{root:n,margin:s,amount:i="some"}={}){const r=Qe(t),o=new WeakMap,a=c=>{c.forEach(u=>{const h=o.get(u.target);if(u.isIntersecting!==!!h)if(u.isIntersecting){const d=e(u.target,u);typeof d=="function"?o.set(u.target,d):l.unobserve(u.target)}else typeof h=="function"&&(h(u),o.delete(u.target))})},l=new IntersectionObserver(a,{root:n,rootMargin:s,threshold:typeof i=="number"?i:qu[i]});return r.forEach(c=>l.observe(c)),()=>l.disconnect()}function as(t,e,n){const s=t.options;s.whileInView&&t.setActive("whileInView",n==="Enter");const i=`onViewport${n}`,r=s[i];r&&V.postRender(()=>r(e))}class Qu extends Z{isActive(){const{whileInView:e,onViewportEnter:n,onViewportLeave:s}=this.state.options;return!!(e||n||s)}constructor(e){super(e)}startObserver(){const e=this.state.element;if(!e||!this.isActive())return;this.unmount();const{once:n,...s}=this.state.options.inViewOptions||{};this.unmount=Zu(e,(i,r)=>{if(as(this.state,r,"Enter"),!n)return o=>{as(this.state,r,"Leave")}},s)}mount(){this.startObserver()}update(){const{props:e,prevProps:n}=this.state.visualElement;["amount","margin","root"].some(Ju(e,n))&&this.startObserver()}}function Ju({inViewOptions:t={}},{inViewOptions:e={}}={}){return n=>t[n]!==e[n]}function ee(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}class tc extends Z{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.state.element.matches(":focus-visible")}catch{e=!0}e&&(this.state.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&(this.state.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=It(ee(this.state.element,"focus",()=>this.onFocus()),ee(this.state.element,"blur",()=>this.onBlur()))}}const ec=(t,e)=>t.depth-e.depth;class nc{constructor(){this.children=[],this.isDirty=!1}add(e){Ke(this.children,e),this.isDirty=!0}remove(e){ie(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ec),this.isDirty=!1,this.children.forEach(e)}}function de(t){return L(t)?t.get():t}const vo=["TopLeft","TopRight","BottomLeft","BottomRight"],sc=vo.length,ls=t=>typeof t=="string"?parseFloat(t):t,us=t=>typeof t=="number"||x.test(t);function ic(t,e,n,s,i,r){i?(t.opacity=E(0,n.opacity??1,oc(s)),t.opacityExit=E(e.opacity??1,0,rc(s))):r&&(t.opacity=E(e.opacity??1,n.opacity??1,s));for(let o=0;o<sc;o++){const a=`border${vo[o]}Radius`;let l=cs(e,a),c=cs(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||us(l)===us(c)?(t[a]=Math.max(E(ls(l),ls(c),s),0),(W.test(c)||W.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=E(e.rotate||0,n.rotate||0,s))}function cs(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const oc=To(0,.5,so),rc=To(.5,.95,k);function To(t,e,n){return s=>s<t?0:s>e?1:n(pt(t,e,s))}function hs(t,e){t.min=e.min,t.max=e.max}function I(t,e){hs(t.x,e.x),hs(t.y,e.y)}function fs(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function pe(t){return t===void 0||t===1}function ke({scale:t,scaleX:e,scaleY:n}){return!pe(t)||!pe(e)||!pe(n)}function nt(t){return ke(t)||xo(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function xo(t){return ds(t.x)||ds(t.y)}function ds(t){return t&&t!=="0%"}function ne(t,e,n){const s=t-n,i=e*s;return n+i}function ps(t,e,n,s,i){return i!==void 0&&(t=ne(t,i,s)),ne(t,n,s)+e}function Oe(t,e=0,n=1,s,i){t.min=ps(t.min,e,n,s,i),t.max=ps(t.max,e,n,s,i)}function bo(t,{x:e,y:n}){Oe(t.x,e.translate,e.scale,e.originPoint),Oe(t.y,n.translate,n.scale,n.originPoint)}const ms=.999999999999,gs=1.0000000000001;function ac(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const{visualElement:l}=r.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&ht(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,bo(t,o)),s&&nt(r.latestValues)&&ht(t,r.latestValues))}e.x<gs&&e.x>ms&&(e.x=1),e.y<gs&&e.y>ms&&(e.y=1)}function Gt(t,e){t.min=t.min+e,t.max=t.max+e}function ys(t,e,n,s,i=.5){const r=E(t.min,t.max,i);Oe(t,e,n,r,s)}function ht(t,e){ys(t.x,e.x,e.scaleX,e.scale,e.originX),ys(t.y,e.y,e.scaleY,e.scale,e.originY)}const So=1e-4,lc=1-So,uc=1+So,wo=.01,cc=0-wo,hc=0+wo;function _(t){return t.max-t.min}function fc(t,e,n){return Math.abs(t-e)<=n}function vs(t,e,n,s=.5){t.origin=s,t.originPoint=E(e.min,e.max,t.origin),t.scale=_(n)/_(e),t.translate=E(n.min,n.max,t.origin)-t.originPoint,(t.scale>=lc&&t.scale<=uc||isNaN(t.scale))&&(t.scale=1),(t.translate>=cc&&t.translate<=hc||isNaN(t.translate))&&(t.translate=0)}function Mt(t,e,n,s){vs(t.x,e.x,n.x,s?s.originX:void 0),vs(t.y,e.y,n.y,s?s.originY:void 0)}function Ts(t,e,n){t.min=n.min+e.min,t.max=t.min+_(e)}function dc(t,e,n){Ts(t.x,e.x,n.x),Ts(t.y,e.y,n.y)}function xs(t,e,n){t.min=e.min-n.min,t.max=t.min+_(e)}function Dt(t,e,n){xs(t.x,e.x,n.x),xs(t.y,e.y,n.y)}function bs(t,e,n,s,i){return t-=e,t=ne(t,1/n,s),i!==void 0&&(t=ne(t,1/i,s)),t}function pc(t,e=0,n=1,s=.5,i,r=t,o=t){if(W.test(e)&&(e=parseFloat(e),e=E(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=E(r.min,r.max,s);t===r&&(a-=e),t.min=bs(t.min,e,n,a,i),t.max=bs(t.max,e,n,a,i)}function Ss(t,e,[n,s,i],r,o){pc(t,e[n],e[s],e[i],e.scale,r,o)}const mc=["x","scaleX","originX"],gc=["y","scaleY","originY"];function ws(t,e,n,s){Ss(t.x,e,mc,n?n.x:void 0,s?s.x:void 0),Ss(t.y,e,gc,n?n.y:void 0,s?s.y:void 0)}function As(t){return t.translate===0&&t.scale===1}function Ao(t){return As(t.x)&&As(t.y)}function Ps(t,e){return t.min===e.min&&t.max===e.max}function yc(t,e){return Ps(t.x,e.x)&&Ps(t.y,e.y)}function Vs(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Po(t,e){return Vs(t.x,e.x)&&Vs(t.y,e.y)}function Es(t){return _(t.x)/_(t.y)}function Cs(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class vc{constructor(){this.members=[]}add(e){Ke(this.members,e),e.scheduleRender()}remove(e){if(ie(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const r=this.members[i];if(r.isPresent!==!1){s=r;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Tc(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=n?.z||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:h,rotateY:d,skewX:f,skewY:p}=n;c&&(s=`perspective(${c}px) ${s}`),u&&(s+=`rotate(${u}deg) `),h&&(s+=`rotateX(${h}deg) `),d&&(s+=`rotateY(${d}deg) `),f&&(s+=`skewX(${f}deg) `),p&&(s+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}function Ms(t){return[t("x"),t("y")]}const Yt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},me=["","X","Y","Z"],xc=1e3;let bc=0;function ge(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Vo(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Gi(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",V,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&Vo(s)}function Eo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e?.()){this.id=bc++,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.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(Ac),this.nodes.forEach(Cc),this.nodes.forEach(Mc),this.nodes.forEach(Pc)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new nc)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new We),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=hn(o)&&!ho(o),this.instance=o;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let u,h=0;const d=()=>this.root.updateBlockedByResize=!1;V.read(()=>{h=window.innerWidth}),t(o,()=>{const f=window.innerWidth;f!==h&&(h=f,this.root.updateBlockedByResize=!0,u&&u(),u=fr(d,250),Yt.hasAnimatedSinceResize&&(Yt.hasAnimatedSinceResize=!1,this.nodes.forEach(Ls)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:d,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||c.getDefaultTransition()||jc,{onLayoutAnimationStart:m,onLayoutAnimationComplete:g}=c.getProps(),y=!this.targetLayout||!Po(this.targetLayout,f),b=!h&&d;if(this.options.layoutRoot||this.resumeFrom||b||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...en(p,"layout"),onPlay:m,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(u,b)}else h||Ls(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Y(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Dc),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Vo(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ds);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Rs);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ec),this.nodes.forEach(Sc),this.nodes.forEach(wc)):this.nodes.forEach(Rs),this.clearAllSnapshots();const a=F.now();B.delta=q(0,1e3/60,a-B.timestamp),B.timestamp=a,B.isProcessing=!0,re.update.process(B),re.preRender.process(B),re.render.process(B),B.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ei.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Vc),this.sharedNodes.forEach(Rc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,V.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){V.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!_(this.snapshot.measuredBox.x)&&!_(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 l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=D(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Ao(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||nt(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),Fc(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:a}=this.options;if(!a)return D();const l=a.measureViewportBox();if(!(((o=this.scroll)==null?void 0:o.wasRoot)||this.path.some(kc))){const{scroll:u}=this.root;u&&(Gt(l.x,u.offset.x),Gt(l.y,u.offset.y))}return l}removeElementScroll(o){var a;const l=D();if(I(l,o),(a=this.scroll)!=null&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:h,options:d}=u;u!==this.root&&h&&d.layoutScroll&&(h.wasRoot&&I(l,o),Gt(l.x,h.offset.x),Gt(l.y,h.offset.y))}return l}applyTransform(o,a=!1){const l=D();I(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&ht(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),nt(u.latestValues)&&ht(l,u.latestValues)}return nt(this.latestValues)&&ht(l,this.latestValues),l}removeTransform(o){const a=D();I(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!nt(c.latestValues))continue;ke(c.latestValues)&&c.updateSnapshot();const u=D(),h=c.measurePageBox();I(u,h),ws(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return nt(this.latestValues)&&ws(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==B.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(a=this.parent)!=null&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:d}=this.options;if(!(!this.layout||!(h||d))){if(this.resolvedRelativeTargetAt=B.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=D(),this.relativeTargetOrigin=D(),Dt(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),I(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=D(),this.targetWithTransforms=D()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),dc(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):I(this.target,this.layout.layoutBox),bo(this.target,this.targetDelta)):I(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=D(),this.relativeTargetOrigin=D(),Dt(this.relativeTargetOrigin,this.target,f.target),I(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||ke(this.parent.latestValues)||xo(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||(o=this.parent)!=null&&o.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===B.timestamp&&(c=!1),c)return;const{layout:u,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||h))return;I(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;ac(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=D());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(fs(this.prevProjectionDelta.x,this.projectionDelta.x),fs(this.prevProjectionDelta.y,this.projectionDelta.y)),Mt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!Cs(this.projectionDelta.x,this.prevProjectionDelta.x)||!Cs(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ut(),this.projectionDelta=ut(),this.projectionDeltaWithTransform=ut()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},h=ut();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=D(),f=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=f!==p,g=this.getStack(),y=!g||g.members.length<=1,b=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(Bc));this.animationProgress=0;let v;this.mixTargetDelta=w=>{const T=w/1e3;Bs(h.x,o.x,T),Bs(h.y,o.y,T),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Dt(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Lc(this.relativeTarget,this.relativeTargetOrigin,d,T),v&&yc(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=D()),I(v,this.relativeTarget)),m&&(this.animationValues=u,ic(u,c,this.latestValues,T,b,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(Y(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=V.update(()=>{Yt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=dt(0)),this.currentAnimation=fo(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),o.onUpdate&&o.onUpdate(u)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(xc),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&Co(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||D();const h=_(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const d=_(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}I(a,l),ht(a,u),Mt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new vc),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())==null?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())==null?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&ge("z",o,c,this.animationValues);for(let u=0;u<me.length;u++)ge(`rotate${me[u]}`,o,c,this.animationValues),ge(`skew${me[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=de(a?.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=de(a?.pointerEvents)||""),this.hasProjected&&!nt(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let h=Tc(this.projectionDeltaWithTransform,this.treeScale,u);l&&(h=l(u,h)),o.transform=h;const{x:d,y:f}=this.projectionDelta;o.transformOrigin=`${d.origin*100}% ${f.origin*100}% 0`,c.animationValues?o.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const p in Lt){if(u[p]===void 0)continue;const{correct:m,applyTo:g,isCSSVariable:y}=Lt[p],b=h==="none"?u[p]:m(u[p],c);if(g){const v=g.length;for(let w=0;w<v;w++)o[g[w]]=b}else y?this.options.visualElement.renderState.vars[p]=b:o[p]=b}this.options.layoutId&&(o.pointerEvents=c===this?de(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Ds),this.root.sharedNodes.clear()}}}function Sc(t){t.updateLayout()}function wc(t){var e;const n=((e=t.resumeFrom)==null?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:r}=t.options,o=n.source!==t.layout.source;r==="size"?Ms(h=>{const d=o?n.measuredBox[h]:n.layoutBox[h],f=_(d);d.min=s[h].min,d.max=d.min+f}):Co(r,n.layoutBox,s)&&Ms(h=>{const d=o?n.measuredBox[h]:n.layoutBox[h],f=_(s[h]);d.max=d.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+f)});const a=ut();Mt(a,s,n.layoutBox);const l=ut();o?Mt(l,t.applyTransform(i,!0),n.measuredBox):Mt(l,s,n.layoutBox);const c=!Ao(a);let u=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:d,layout:f}=h;if(d&&f){const p=D();Dt(p,n.layoutBox,d.layoutBox);const m=D();Dt(m,s,f.layoutBox),Po(p,m)||(u=!0),h.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function Ac(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Pc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Vc(t){t.clearSnapshot()}function Ds(t){t.clearMeasurements()}function Rs(t){t.isLayoutDirty=!1}function Ec(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ls(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Cc(t){t.resolveTargetDelta()}function Mc(t){t.calcProjection()}function Dc(t){t.resetSkewAndRotation()}function Rc(t){t.removeLeadSnapshot()}function Bs(t,e,n){t.translate=E(e.translate,0,n),t.scale=E(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function js(t,e,n,s){t.min=E(e.min,n.min,s),t.max=E(e.max,n.max,s)}function Lc(t,e,n,s){js(t.x,e.x,n.x,s),js(t.y,e.y,n.y,s)}function Bc(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const jc={duration:.45,ease:[.4,0,.1,1]},Fs=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ks=Fs("applewebkit/")&&!Fs("chrome/")?Math.round:k;function Os(t){t.min=ks(t.min),t.max=ks(t.max)}function Fc(t){Os(t.x),Os(t.y)}function Co(t,e,n){return t==="position"||t==="preserve-aspect"&&!fc(Es(e),Es(n),.2)}function kc(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}function Oc(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const Ic=Eo({attachResizeListener:(t,e)=>Oc(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ye={current:void 0},_c=Eo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ye.current){const t=new Ic({});t.mount(window),t.setOptions({layoutScroll:!0}),ye.current=t}return ye.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"});function Mo(t){if(t)return t.options.allowProjection!==!1?t.projection:Mo(t.parent)}function Is(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const bt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(x.test(t))t=parseFloat(t);else return t;const n=Is(t,e.target.x),s=Is(t,e.target.y);return`${n}% ${s}%`}},Uc={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=et.parse(t);if(i.length>5)return s;const r=et.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const c=E(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),r(i)}},Do={borderRadius:{...bt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:bt,borderTopRightRadius:bt,borderBottomLeftRadius:bt,borderBottomRightRadius:bt,boxShadow:Uc};function wt(t){return typeof t=="object"&&t!==null&&"nodeType"in t}class $c extends Z{constructor(e){super(e),li(Do)}initProjection(){const e=this.state.options;this.state.visualElement.projection=new _c(this.state.visualElement.latestValues,e["data-framer-portal-id"]?void 0:Mo(this.state.visualElement.parent)),this.state.visualElement.projection.isPresent=!0,this.setOptions()}beforeMount(){this.initProjection()}setOptions(){const e=this.state.options;this.state.visualElement.projection.setOptions({layout:e.layout,layoutId:e.layoutId,alwaysMeasureLayout:!!e.drag||e.dragConstraints&&wt(e.dragConstraints),visualElement:this.state.visualElement,animationType:typeof e.layout=="string"?e.layout:"both",layoutRoot:e.layoutRoot,layoutScroll:e.layoutScroll,crossfade:e.crossfade,onExitComplete:()=>{var n;if(!((n=this.state.visualElement.projection)!=null&&n.isPresent)){const s=ft.get(this.state.element);this.state.isSafeToRemove=!0,s&&s({detail:{isExit:!0}},!0)}}})}update(){this.setOptions()}mount(){var e;(e=this.state.visualElement.projection)==null||e.mount(this.state.element)}}function Ro(t){return t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1}function fn(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}function Nc(t){return e=>Ro(e)&&t(e,fn(e))}function Rt(t,e,n,s){return ee(t,e,Nc(n),s)}function Lo(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const _s=Lo("dragHorizontal"),Us=Lo("dragVertical");function Kc(t){let e=!1;if(t==="y")e=Us();else if(t==="x")e=_s();else{const n=_s(),s=Us();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function Ie(t){return t.max-t.min}function Wc(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?E(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?E(n,t,s.max):Math.min(t,n)),t}const _e=.35;function Gc(t,{top:e,left:n,bottom:s,right:i}){return{x:$s(t.x,n,i),y:$s(t.y,e,s)}}function $s(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function zc(t=_e){return t===!1?t=0:t===!0&&(t=_e),{x:Ns(t,"left","right"),y:Ns(t,"top","bottom")}}function Ns(t,e,n){return{min:Ks(t,e),max:Ks(t,n)}}function Ks(t,e){return typeof t=="number"?t:t[e]||0}function Hc(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}function Xc(t,e){return{x:Ws(t.x,e.x),y:Ws(t.y,e.y)}}function Ws(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function Yc(t,e){let n=.5;const s=Ie(t),i=Ie(e);return i>s?n=pt(e.min,e.max-s,t.min):s>i&&(n=pt(t.min,t.max-i,e.min)),q(0,1,n)}const Gs=(t,e)=>Math.abs(t-e);function qc(t,e){const n=Gs(t.x,e.x),s=Gs(t.y,e.y);return Math.sqrt(n**2+s**2)}class Bo{constructor(e,n,{transformPagePoint:s,contextWindow:i,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=Te(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,f=qc(h.offset,{x:0,y:0})>=3;if(!d&&!f)return;const{point:p}=h,{timestamp:m}=B;this.history.push({...p,timestamp:m});const{onStart:g,onMove:y}=this.handlers;d||(g&&g(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,h)},this.handlePointerMove=(h,d)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=ve(d,this.transformPagePoint),V.update(this.updatePoint,!0)},this.handlePointerUp=(h,d)=>{this.end();const{onEnd:f,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=Te(h.type==="pointercancel"?this.lastMoveEventInfo:ve(d,this.transformPagePoint),this.history);this.startEvent&&f&&f(h,g),p&&p(h,g)},!Ro(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const o=fn(e),a=ve(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=B;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,Te(a,this.history)),this.removeListeners=It(Rt(this.contextWindow,"pointermove",this.handlePointerMove),Rt(this.contextWindow,"pointerup",this.handlePointerUp),Rt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Y(this.updatePoint)}}function ve(t,e){return e?{point:e(t.point)}:t}function zs(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Te({point:t},e){return{point:t,delta:zs(t,jo(e)),offset:zs(t,Zc(e)),velocity:Qc(e,.1)}}function Zc(t){return t[0]}function jo(t){return t[t.length-1]}function Qc(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=jo(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>U(e)));)n--;if(!s)return{x:0,y:0};const r=K(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const Hs=()=>({min:0,max:0});function Jc(){return{x:Hs(),y:Hs()}}function N(t){return[t("x"),t("y")]}function th(t){return!!(L(t)&&t.add)}function Xs(t,e){const n=t.getValue("willChange");if(th(n))return n.add(e)}function Fo({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function eh(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function nh({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Ys(t,e){t.min=t.min+e,t.max=t.max+e}function sh(t,e){return Fo(eh(t.getBoundingClientRect(),e))}function ih(t,e,n){const s=sh(t,n),{scroll:i}=e;return i&&(Ys(s.x,i.offset.x),Ys(s.y,i.offset.y)),s}function qs(t){return!ft.has(t.current)}function ko({current:t}){return t?t.ownerDocument.defaultView:null}const oh=new WeakMap;class rh{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Jc(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){if(!qs(this.visualElement))return;const s=c=>{const{dragSnapToOrigin:u}=this.getProps();u?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(fn(c,"page").point)},i=(c,u)=>{const{drag:h,dragPropagation:d,onDragStart:f}=this.getProps();if(h&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Kc(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),N(m=>{let g=this.getAxisMotionValue(m).get()||0;if(W.test(g)){const{projection:y}=this.visualElement;if(y&&y.layout){const b=y.layout.layoutBox[m];b&&(g=Ie(b)*(parseFloat(g)/100))}}this.originPoint[m]=g}),f&&V.postRender(()=>f(c,u)),Xs(this.visualElement,"transform"),this.visualElement.state.setActive("whileDrag",!0)},r=(c,u)=>{const{dragPropagation:h,dragDirectionLock:d,onDirectionLock:f,onDrag:p}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:m}=u;if(d&&this.currentDirection===null){this.currentDirection=ah(m),this.currentDirection!==null&&f&&f(this.currentDirection);return}this.updateAxis("x",u.point,m),this.updateAxis("y",u.point,m),this.visualElement.render(),p&&p(c,u)},o=(c,u)=>this.stop(c,u),a=()=>N(c=>{var u;return this.getAnimationState(c)==="paused"&&((u=this.getAxisMotionValue(c).animation)==null?void 0:u.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new Bo(e,{onSessionStart:s,onStart:i,onMove:r,onSessionEnd:o,resumeAnimation:a},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:ko(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:r}=this.getProps();r&&V.postRender(()=>r(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),this.visualElement.state.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!zt(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=Wc(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)==null?void 0:e.layout,r=this.constraints;n&&wt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=Gc(i.layoutBox,n):this.constraints=!1,this.elastic=zc(s),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&N(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Hc(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!wt(e))return!1;const s=e,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=ih(s,i.root,this.visualElement.getTransformPagePoint());let o=Xc(i.layout.layoutBox,r);if(n){const a=n(nh(o));this.hasMutatedConstraints=!!a,a&&(o=Fo(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=N(u=>{if(!zt(u,n,this.currentDirection))return;let h=l&&l[u]||{};o&&(h={min:0,max:0});const d=i?200:1e6,f=i?40:1e7,p={type:"inertia",velocity:s?e[u]:0,bounceStiffness:d,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return Xs(this.visualElement,e),s.start(cn(e,s,0,n,this.visualElement,!1))}stopAnimation(){qs(this.visualElement)&&N(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){N(e=>{var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps();return s[n]||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){N(n=>{const{drag:s}=this.getProps();if(!zt(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];r.set(e[n]-E(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!wt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};N(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=Yc({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),N(o=>{if(!zt(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(E(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;oh.set(this.visualElement,this);const e=this.visualElement.current,n=Rt(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();wt(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,r=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),V.read(s);const o=ee(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(N(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=l[u].translate,h.set(h.get()+l[u].translate))}),this.visualElement.render())});return()=>{o(),n(),r(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=_e,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function zt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function ah(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class lh extends Z{constructor(e){super(e),this.removeGroupControls=k,this.removeListeners=k,this.controls=new rh(e.visualElement)}mount(){const{dragControls:e}=this.state.options;e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||k}unmount(){this.removeGroupControls(),this.removeListeners()}}class uh extends Z{constructor(e){super(e),li(Do)}beforeUpdate(){this.state.willUpdate("beforeUpdate")}update(){this.didUpdate()}didUpdate(){var e,n;(this.state.options.layout||this.state.options.layoutId||this.state.options.drag)&&((n=(e=this.state.visualElement.projection)==null?void 0:e.root)==null||n.didUpdate())}mount(){var e;const n=this.state.options,s=this.state.options.layoutGroup;if(n.layout||n.layoutId){const i=this.state.visualElement.projection;i&&(i.promote(),(e=s?.group)==null||e.add(i)),Yt.hasEverUpdated=!0}this.didUpdate()}beforeUnmount(){const e=this.state.visualElement.projection;e&&(this.state.willUpdate("beforeUnmount"),this.state.options.layoutId?(e.isPresent=!1,e.relegate()):this.state.options.layout&&(this.state.isSafeToRemove=!0))}unmount(){const e=this.state.options.layoutGroup,n=this.state.visualElement.projection;n&&(e?.group&&(this.state.options.layout||this.state.options.layoutId)&&e.group.remove(n),this.didUpdate())}}function Zs(t){return(e,n)=>{t&&V.postRender(()=>t(e,n))}}class ch extends Z{constructor(){super(...arguments),this.removePointerDownListener=k}onPointerDown(e){this.session=new Bo(e,this.createPanHandlers(),{transformPagePoint:this.state.visualElement.getTransformPagePoint(),contextWindow:ko(this.state.visualElement)})}createPanHandlers(){return{onSessionStart:Zs((e,n)=>{const{onPanSessionStart:s}=this.state.options;s&&s(e,n)}),onStart:Zs((e,n)=>{const{onPanStart:s}=this.state.options;s&&s(e,n)}),onMove:(e,n)=>{const{onPan:s}=this.state.options;s&&s(e,n)},onEnd:(e,n)=>{const{onPanEnd:s}=this.state.options;delete this.session,s&&V.postRender(()=>s(e,n))}}}mount(){this.removePointerDownListener=Rt(this.state.element,"pointerdown",this.onPointerDown.bind(this))}update(){}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const hh=[Iu,Hu,Yu,Qu,tc,$c,ch,lh,uh],fh={reducedMotion:"never",transition:void 0,nonce:void 0},[dh]=kt("MotionConfig");function Oo(){return dh(At(()=>fh))}function ph(t){const e=new WeakMap,n=Oo();function s(r){if(t.mode!=="popLayout")return;const o=r.element,a=o.offsetParent,l=a instanceof HTMLElement&&a.offsetWidth||0,c={height:o.offsetHeight||0,width:o.offsetWidth||0,top:o.offsetTop,left:o.offsetLeft,right:0};c.right=l-c.width-c.left;const u=t.anchorX==="left"?`left: ${c.left}`:`right: ${c.right}`;r.element.dataset.motionPopId=r.id;const h=document.createElement("style");n.value.nonce&&(h.nonce=n.value.nonce),e.set(r,h),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`
|
|
2
2
|
[data-motion-pop-id="${r.id}"] {
|
|
3
3
|
position: absolute !important;
|
|
4
4
|
width: ${c.width}px !important;
|