@wasp.sh/wasp-cli-darwin-arm64-unknown 0.24.0 → 0.25.0-rc.1
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/data/Cli/starters/basic/main.wasp.ts +1 -1
- package/data/Cli/starters/basic/package.json +5 -5
- package/data/Cli/starters/basic/src/App.css +12 -11
- package/data/Cli/starters/basic/src/assets/wasp-logo-rounded.svg +1 -0
- package/data/Cli/starters/basic/src/shared/components/Header.tsx +3 -3
- package/data/Cli/starters/minimal/main.wasp.ts +1 -1
- package/data/Cli/starters/minimal/package.json +4 -4
- package/data/Cli/starters/minimal/src/Main.css +5 -5
- package/data/Cli/starters/minimal/src/MainPage.tsx +2 -2
- package/data/Cli/starters/minimal/src/assets/wasp-logo-rounded.svg +1 -0
- package/data/Cli/starters/skeleton/public/favicon.ico +0 -0
- package/data/Cli/starters/skeleton/tsconfig.src.json +2 -1
- package/data/Cli/starters/skeleton/tsconfig.wasp.json +3 -2
- package/data/Generator/libs/auth/wasp.sh-lib-auth-0.25.0.tgz +0 -0
- package/data/Generator/libs/vite-ssr/wasp.sh-lib-vite-ssr-0.25.0.tgz +0 -0
- package/data/Generator/templates/sdk/wasp/api/index.ts +2 -2
- package/data/Generator/templates/sdk/wasp/auth/email/actions/login.ts +1 -1
- package/data/Generator/templates/sdk/wasp/auth/email/actions/passwordReset.ts +1 -1
- package/data/Generator/templates/sdk/wasp/auth/email/actions/signup.ts +1 -1
- package/data/Generator/templates/sdk/wasp/auth/email/actions/verifyEmail.ts +1 -1
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/auth-styles.css +2 -2
- package/data/Generator/templates/sdk/wasp/auth/forms/internal/common/LoginSignupForm.tsx +1 -1
- package/data/Generator/templates/sdk/wasp/auth/helpers/_Provider.tsx +1 -1
- package/data/Generator/templates/sdk/wasp/auth/helpers/user.ts +1 -1
- package/data/Generator/templates/sdk/wasp/auth/jwt.ts +1 -1
- package/data/Generator/templates/sdk/wasp/auth/logout.ts +1 -1
- package/data/Generator/templates/sdk/wasp/auth/lucia.ts +2 -2
- package/data/Generator/templates/sdk/wasp/auth/providers/types.ts +1 -1
- package/data/Generator/templates/sdk/wasp/auth/session.ts +1 -1
- package/data/Generator/templates/sdk/wasp/auth/types.ts +1 -1
- package/data/Generator/templates/sdk/wasp/auth/useAuth.ts +5 -5
- package/data/Generator/templates/sdk/wasp/auth/username/actions/login.ts +1 -1
- package/data/Generator/templates/sdk/wasp/auth/username/actions/signup.ts +1 -1
- package/data/Generator/templates/sdk/wasp/auth/utils.ts +3 -3
- package/data/Generator/templates/sdk/wasp/auth/validation.ts +1 -1
- package/data/Generator/templates/sdk/wasp/client/app/layout.tsx +55 -46
- package/data/Generator/templates/sdk/wasp/client/app/router.tsx +2 -5
- package/data/Generator/templates/sdk/wasp/client/crud/_crud.ts +2 -2
- package/data/Generator/templates/sdk/wasp/client/operations/actions/core.ts +1 -1
- package/data/Generator/templates/sdk/wasp/client/operations/index.ts +5 -0
- package/data/Generator/templates/sdk/wasp/client/operations/internal/index.ts +3 -3
- package/data/Generator/templates/sdk/wasp/client/operations/internal/resources.js +4 -2
- package/data/Generator/templates/sdk/wasp/client/operations/queries/core.ts +2 -2
- package/data/Generator/templates/sdk/wasp/client/operations/rpc.ts +2 -2
- package/data/Generator/templates/sdk/wasp/client/test/vitest/helpers.tsx +3 -4
- package/data/Generator/templates/sdk/wasp/client/vite/plugins/validateEnv.ts +14 -8
- package/data/Generator/templates/sdk/wasp/client/vite/virtual-files/files/client-entry.tsx +31 -11
- package/data/Generator/templates/sdk/wasp/client/vite/virtual-files/files/routes.tsx +26 -20
- package/data/Generator/templates/sdk/wasp/client/vite/virtual-files/files/ssr-entry.tsx +29 -24
- package/data/Generator/templates/sdk/wasp/client/vite/virtual-files/resolver.ts +12 -5
- package/data/Generator/templates/sdk/wasp/client/webSocket/WebSocketProvider.tsx +4 -4
- package/data/Generator/templates/sdk/wasp/client/webSocket/index.ts +1 -1
- package/data/Generator/templates/sdk/wasp/core/auth.ts +3 -3
- package/data/Generator/templates/sdk/wasp/env/validation.ts +1 -1
- package/data/Generator/templates/sdk/wasp/package.json +2 -42
- package/data/Generator/templates/sdk/wasp/serialization/index.ts +11 -0
- package/data/Generator/templates/sdk/wasp/server/_types/index.ts +6 -6
- package/data/Generator/templates/sdk/wasp/server/_types/taggedEntities.ts +1 -1
- package/data/Generator/templates/sdk/wasp/server/auth/email/utils.ts +6 -6
- package/data/Generator/templates/sdk/wasp/server/crud/_operationTypes.ts +2 -2
- package/data/Generator/templates/sdk/wasp/server/email/core/index.ts +4 -0
- package/data/Generator/templates/sdk/wasp/server/email/core/providers/dummy.ts +1 -1
- package/data/Generator/templates/sdk/wasp/server/email/core/providers/resend.ts +31 -0
- package/data/Generator/templates/sdk/wasp/server/email/core/types.ts +7 -1
- package/data/Generator/templates/sdk/wasp/server/email/index.ts +6 -0
- package/data/Generator/templates/sdk/wasp/server/env.ts +5 -0
- package/data/Generator/templates/sdk/wasp/server/jobs/_job.ts +2 -2
- package/data/Generator/templates/sdk/wasp/server/jobs/core/pgBoss/pgBossJob.ts +3 -3
- package/data/Generator/templates/sdk/wasp/server/jobs/core/pgBoss/types.ts +2 -2
- package/data/Generator/templates/sdk/wasp/server/operations/actions/index.ts +1 -1
- package/data/Generator/templates/sdk/wasp/server/operations/actions/types.ts +2 -2
- package/data/Generator/templates/sdk/wasp/server/operations/queries/index.ts +1 -1
- package/data/Generator/templates/sdk/wasp/server/operations/queries/types.ts +2 -2
- package/data/Generator/templates/sdk/wasp/server/operations/wrappers.ts +1 -1
- package/data/Generator/templates/sdk/wasp/server/webSocket/index.ts +2 -3
- package/data/Generator/templates/sdk/wasp/tsconfig.json +1 -0
- package/data/Generator/templates/server/tsconfig.json +2 -1
- package/data/packages/deploy/package-lock.json +2015 -2285
- package/data/packages/deploy/package.json +7 -6
- package/data/packages/prisma/package-lock.json +1730 -2131
- package/data/packages/prisma/package.json +6 -6
- package/data/packages/spec/dist/__tests__/spec/appAnalyzer.unit.test.js +4 -4
- package/data/packages/spec/dist/__tests__/spec/mapApp.unit.test.js +161 -129
- package/data/packages/spec/dist/__tests__/spec/normalizePrerender.unit.test.d.ts +2 -0
- package/data/packages/spec/dist/__tests__/spec/normalizePrerender.unit.test.d.ts.map +1 -0
- package/data/packages/spec/dist/__tests__/spec/normalizePrerender.unit.test.js +15 -0
- package/data/packages/spec/dist/__tests__/spec/refObject.unit.test.js +2 -2
- package/data/packages/spec/dist/__tests__/spec/refObjectPath.unit.test.js +3 -3
- package/data/packages/spec/dist/__tests__/spec-pipeline/pipeline.integration.test.js +38 -7
- package/data/packages/spec/dist/__tests__/spec-pipeline/transformWaspTsSpecFile/imports.unit.test.js +5 -5
- package/data/packages/spec/dist/__tests__/spec-pipeline/transformWaspTsSpecFile/refHelper.unit.test.js +2 -2
- package/data/packages/spec/dist/src/appSpec.d.ts +2 -2
- package/data/packages/spec/dist/src/appSpec.d.ts.map +1 -1
- package/data/packages/spec/dist/src/normalizePrerender.d.ts +11 -0
- package/data/packages/spec/dist/src/normalizePrerender.d.ts.map +1 -0
- package/data/packages/spec/dist/src/normalizePrerender.js +18 -0
- package/data/packages/spec/dist/src/run.js +2 -2
- package/data/packages/spec/dist/src/spec/appAnalyzer.js +5 -5
- package/data/packages/spec/dist/src/spec/mapper/app.d.ts +17 -0
- package/data/packages/spec/dist/src/spec/mapper/app.d.ts.map +1 -0
- package/data/packages/spec/dist/src/spec/mapper/app.js +119 -0
- package/data/packages/spec/dist/src/spec/mapper/context.d.ts +19 -0
- package/data/packages/spec/dist/src/spec/mapper/context.d.ts.map +1 -0
- package/data/packages/spec/dist/src/spec/mapper/context.js +65 -0
- package/data/packages/spec/dist/src/spec/mapper/index.d.ts +7 -0
- package/data/packages/spec/dist/src/spec/mapper/index.d.ts.map +1 -0
- package/data/packages/spec/dist/src/spec/mapper/index.js +20 -0
- package/data/packages/spec/dist/src/spec/mapper/specElements.d.ts +28 -0
- package/data/packages/spec/dist/src/spec/mapper/specElements.d.ts.map +1 -0
- package/data/packages/spec/dist/src/spec/mapper/specElements.js +162 -0
- package/data/packages/spec/dist/src/spec/publicApi/constructors.d.ts +54 -13
- package/data/packages/spec/dist/src/spec/publicApi/constructors.d.ts.map +1 -1
- package/data/packages/spec/dist/src/spec/publicApi/constructors.js +10 -7
- package/data/packages/spec/dist/src/spec/publicApi/index.d.ts +2 -0
- package/data/packages/spec/dist/src/spec/publicApi/index.d.ts.map +1 -1
- package/data/packages/spec/dist/src/spec/publicApi/index.js +1 -0
- package/data/packages/spec/dist/src/spec/publicApi/waspSpec.d.ts +23 -10
- package/data/packages/spec/dist/src/spec/publicApi/waspSpec.d.ts.map +1 -1
- package/data/packages/spec/dist/src/spec/refObject.js +4 -4
- package/data/packages/spec/dist/src/spec/refObjectPath.js +2 -2
- package/data/packages/spec/dist/src/spec/waspSpecUserError.d.ts +31 -0
- package/data/packages/spec/dist/src/spec/waspSpecUserError.d.ts.map +1 -0
- package/data/packages/spec/dist/src/spec/waspSpecUserError.js +30 -0
- package/data/packages/spec/dist/src/spec-pipeline/loadWaspTsSpec.d.ts.map +1 -1
- package/data/packages/spec/dist/src/spec-pipeline/loadWaspTsSpec.js +18 -15
- package/data/packages/spec/dist/src/spec-pipeline/transformWaspTsSpecFilesPlugin/imports/apply.js +2 -2
- package/data/packages/spec/dist/src/spec-pipeline/transformWaspTsSpecFilesPlugin/imports/check.js +2 -2
- package/data/packages/spec/dist/src/spec-pipeline/transformWaspTsSpecFilesPlugin/imports/plan.js +2 -2
- package/data/packages/spec/dist/src/spec-pipeline/transformWaspTsSpecFilesPlugin/refHelper/check.js +2 -2
- package/data/packages/spec/dist/src/spec-pipeline/typecheckPlugin/index.js +2 -2
- package/data/packages/spec/package-lock.json +189 -169
- package/data/packages/spec/package.json +30 -7
- package/data/packages/studio/dist/public/assets/Flow-CyIU6UP_.js +26 -0
- package/data/packages/studio/dist/public/assets/dist-CttM53IC.js +1 -0
- package/data/packages/studio/dist/public/assets/index-Cb2AqsRv.js +20 -0
- package/data/packages/studio/dist/public/assets/index-Cq-JJ-zI.css +1 -0
- package/data/packages/studio/dist/public/index.html +2 -2
- package/data/packages/studio/package-lock.json +6 -6
- package/data/packages/studio/package.json +2 -2
- package/data/packages/ts-inspect/package-lock.json +1918 -2142
- package/data/packages/ts-inspect/package.json +6 -6
- package/package.json +1 -1
- package/wasp-bin +0 -0
- package/data/Cli/starters/basic/src/assets/logo.svg +0 -1
- package/data/Cli/starters/minimal/src/assets/logo.svg +0 -1
- package/data/Cli/starters/skeleton/public/.gitkeep +0 -0
- package/data/Generator/libs/auth/wasp.sh-lib-auth-0.24.0.tgz +0 -0
- package/data/Generator/libs/vite-ssr/wasp.sh-lib-vite-ssr-0.24.0.tgz +0 -0
- package/data/Generator/templates/sdk/wasp/client/app/hooks/useIsClient.ts +0 -16
- package/data/packages/spec/dist/__tests__/legacy/appAnalyzer.unit.test.d.ts +0 -2
- package/data/packages/spec/dist/__tests__/legacy/appAnalyzer.unit.test.d.ts.map +0 -1
- package/data/packages/spec/dist/__tests__/legacy/appAnalyzer.unit.test.js +0 -72
- package/data/packages/spec/dist/__tests__/legacy/mapTsAppSpecToAppSpecDecls.integration.test.d.ts +0 -2
- package/data/packages/spec/dist/__tests__/legacy/mapTsAppSpecToAppSpecDecls.integration.test.d.ts.map +0 -1
- package/data/packages/spec/dist/__tests__/legacy/mapTsAppSpecToAppSpecDecls.integration.test.js +0 -126
- package/data/packages/spec/dist/__tests__/legacy/mapTsAppSpecToAppSpecDecls.unit.test.d.ts +0 -2
- package/data/packages/spec/dist/__tests__/legacy/mapTsAppSpecToAppSpecDecls.unit.test.d.ts.map +0 -1
- package/data/packages/spec/dist/__tests__/legacy/mapTsAppSpecToAppSpecDecls.unit.test.js +0 -732
- package/data/packages/spec/dist/__tests__/legacy/testFixtures.d.ts +0 -224
- package/data/packages/spec/dist/__tests__/legacy/testFixtures.d.ts.map +0 -1
- package/data/packages/spec/dist/__tests__/legacy/testFixtures.js +0 -659
- package/data/packages/spec/dist/__tests__/legacy/testFixtures.test-d.d.ts +0 -2
- package/data/packages/spec/dist/__tests__/legacy/testFixtures.test-d.d.ts.map +0 -1
- package/data/packages/spec/dist/__tests__/legacy/testFixtures.test-d.js +0 -57
- package/data/packages/spec/dist/src/legacy/_private.d.ts +0 -2
- package/data/packages/spec/dist/src/legacy/_private.d.ts.map +0 -1
- package/data/packages/spec/dist/src/legacy/_private.js +0 -1
- package/data/packages/spec/dist/src/legacy/appAnalyzer.d.ts +0 -16
- package/data/packages/spec/dist/src/legacy/appAnalyzer.d.ts.map +0 -1
- package/data/packages/spec/dist/src/legacy/appAnalyzer.js +0 -34
- package/data/packages/spec/dist/src/legacy/mapTsAppSpecToAppSpecDecls.d.ts +0 -38
- package/data/packages/spec/dist/src/legacy/mapTsAppSpecToAppSpecDecls.d.ts.map +0 -1
- package/data/packages/spec/dist/src/legacy/mapTsAppSpecToAppSpecDecls.js +0 -294
- package/data/packages/spec/dist/src/legacy/publicApi/App.d.ts +0 -24
- package/data/packages/spec/dist/src/legacy/publicApi/App.d.ts.map +0 -1
- package/data/packages/spec/dist/src/legacy/publicApi/App.js +0 -75
- package/data/packages/spec/dist/src/legacy/publicApi/tsAppSpec.d.ts +0 -174
- package/data/packages/spec/dist/src/legacy/publicApi/tsAppSpec.d.ts.map +0 -1
- package/data/packages/spec/dist/src/legacy/publicApi/tsAppSpec.js +0 -1
- package/data/packages/spec/dist/src/spec/mapApp.d.ts +0 -54
- package/data/packages/spec/dist/src/spec/mapApp.d.ts.map +0 -1
- package/data/packages/spec/dist/src/spec/mapApp.js +0 -336
- package/data/packages/spec/dist/src/spec/specUserError.d.ts +0 -9
- package/data/packages/spec/dist/src/spec/specUserError.d.ts.map +0 -1
- package/data/packages/spec/dist/src/spec/specUserError.js +0 -8
- package/data/packages/studio/dist/public/assets/Flow-_d98T2dd.js +0 -26
- package/data/packages/studio/dist/public/assets/index-B6X8EdJH.js +0 -21
- package/data/packages/studio/dist/public/assets/index-CXlD_bzV.js +0 -1
- package/data/packages/studio/dist/public/assets/index-IWX3d-Jz.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,B as t,C as n,D as r,E as i,F as a,G as o,H as s,I as c,J as l,K as u,L as d,M as f,N as p,O as m,P as h,R as g,S as _,T as v,U as y,V as b,W as x,Y as S,Z as C,_ as ee,b as te,d as w,et as ne,f as re,g as ie,h as ae,j as T,k as oe,m as se,p as ce,q as E,u as le,v as ue,w as de,x as fe,y as pe,z as me}from"./index-Cb2AqsRv.js";var he=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),ge=e=>/^0[^.\s]+$/u.test(e);function _e(e){let t;return()=>(t===void 0&&(t=e()),t)}var D=e=>e,ve=(e,t)=>n=>t(e(n)),O=(...e)=>e.reduce(ve),ye=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r};function be(e,t){e.indexOf(t)===-1&&e.push(t)}function xe(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var Se=class{constructor(){this.subscriptions=[]}add(e){return be(this.subscriptions,e),()=>xe(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},k=e=>e*1e3,A=e=>e/1e3;function Ce(e,t){return t?1e3/t*e:0}var we=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Te=1e-7,Ee=12;function De(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=we(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>Te&&++s<Ee);return o}function j(e,t,n,r){if(e===t&&n===r)return D;let i=t=>De(t,0,1,e,n);return e=>e===0||e===1?e:we(i(e),t,r)}var Oe=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ke=e=>t=>1-e(1-t),Ae=j(.33,1.53,.69,.99),je=ke(Ae),Me=Oe(je),Ne=e=>(e*=2)<1?.5*je(e):.5*(2-2**(-10*(e-1))),Pe=e=>1-Math.sin(Math.acos(e)),Fe=ke(Pe),Ie=Oe(Pe),Le=j(.42,0,1,1),Re=j(0,0,.58,1),ze=j(.42,0,.58,1),Be=e=>Array.isArray(e)&&typeof e[0]==`number`,Ve=e=>Array.isArray(e)&&typeof e[0]!=`number`,He={linear:D,easeIn:Le,easeInOut:ze,easeOut:Re,circIn:Pe,circInOut:Ie,circOut:Fe,backIn:je,backInOut:Me,backOut:Ae,anticipate:Ne},Ue=e=>typeof e==`string`,We=e=>{if(Be(e)){e.length;let[t,n,r,i]=e;return j(t,n,r,i)}else if(Ue(e))return He[e],`${e}`,He[e];return e},M=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],N={value:null,addProjectionMetrics:null};function Ge(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.has(e)||s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0,[n,r]=[r,n],n.forEach(l),t&&N.value&&N.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var Ke=40;function qe(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=M.reduce((e,n)=>(e[n]=Ge(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=E.useManualTiming?i.timestamp:performance.now();n=!1,E.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,Ke),1)),i.timestamp=a,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:M.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<M.length;t++)o[M[t]].cancel(e)},state:i,steps:o}}var{schedule:P,cancel:Je,state:F,steps:Ye}=qe(typeof requestAnimationFrame<`u`?requestAnimationFrame:D,!0),I;function Xe(){I=void 0}var L={now:()=>(I===void 0&&L.set(F.isProcessing||E.useManualTiming?F.timestamp:performance.now()),I),set:e=>{I=e,queueMicrotask(Xe)}},R={layout:0,mainThread:0,waapi:0};function Ze(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Qe({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Ze(s,r,e+1/3),a=Ze(s,r,e),o=Ze(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function z(e,t){return n=>n>0?t:e}var $e=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},et=[b,s,a],tt=e=>et.find(t=>t.test(e));function nt(e){let t=tt(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===a&&(n=Qe(n)),n}var rt=(e,t)=>{let n=nt(e),r=nt(t);if(!n||!r)return z(e,t);let i={...n};return e=>(i.red=$e(n.red,r.red,e),i.green=$e(n.green,r.green,e),i.blue=$e(n.blue,r.blue,e),i.alpha=T(n.alpha,r.alpha,e),s.transform(i))},it=new Set([`none`,`hidden`]);function at(e,t){return it.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function ot(e,t){return n=>T(e,t,n)}function st(e){return typeof e==`number`?ot:typeof e==`string`?u(e)?z:h.test(e)?rt:dt:Array.isArray(e)?ct:typeof e==`object`?h.test(e)?rt:lt:z}function ct(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>st(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function lt(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=st(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function ut(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var dt=(e,t)=>{let n=p.createTransformer(t),r=f(e),i=f(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?it.has(e)&&!i.values.length||it.has(t)&&!r.values.length?at(e,t):O(ct(ut(r,i),i.values),n):(`${e}${t}`,z(e,t))};function ft(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?T(e,t,n):st(e)(e,t)}var pt=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>P.update(t,e),stop:()=>Je(t),now:()=>F.isProcessing?F.timestamp:L.now()}},mt=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},ht=2e4;function gt(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function _t(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(gt(r),ht);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:A(i)}}var vt=5;function yt(e,t,n){let r=Math.max(t-vt,0);return Ce(n-e(r),t-r)}var B={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},bt=.001;function xt({duration:e=B.duration,bounce:t=B.bounce,velocity:n=B.velocity,mass:r=B.mass}){let i,a;B.maxDuration;let o=1-t;o=l(B.minDamping,B.maxDamping,o),e=l(B.minDuration,B.maxDuration,A(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=wt(t,o),c=Math.exp(-i);return bt-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=wt(t**2,o);return(-i(t)+bt>0?-1:1)*((a-s)*c)/l}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=Ct(i,a,s);if(e=k(e),isNaN(c))return{stiffness:B.stiffness,damping:B.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var St=12;function Ct(e,t,n){let r=n;for(let n=1;n<St;n++)r-=e(r)/t(r);return r}function wt(e,t){return e*Math.sqrt(1-t*t)}var Tt=[`duration`,`bounce`],Et=[`stiffness`,`damping`,`mass`];function Dt(e,t){return t.some(t=>e[t]!==void 0)}function Ot(e){let t={velocity:B.velocity,stiffness:B.stiffness,damping:B.damping,mass:B.mass,isResolvedFromDuration:!1,...e};if(!Dt(e,Et)&&Dt(e,Tt))if(e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*l(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:B.mass,stiffness:i,damping:a}}else{let n=xt(e);t={...t,...n,mass:B.mass},t.isResolvedFromDuration=!0}return t}function V(e=B.visualDuration,t=B.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=Ot({...n,velocity:-A(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=A(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?B.restSpeed.granular:B.restSpeed.default,i||=v?B.restDelta.granular:B.restDelta.default;let y;if(h<1){let e=wt(_,h);y=t=>o-Math.exp(-h*_*t)*((m+h*_*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}else if(h===1)y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}let b={calculatedDuration:p&&d||null,next:e=>{let t=y(e);if(p)s.done=e>=d;else{let n=e===0?m:0;h<1&&(n=e===0?k(m):yt(y,e,t));let a=Math.abs(n)<=r,c=Math.abs(o-t)<=i;s.done=a&&c}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(gt(b),ht),t=mt(t=>b.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return b}V.applyToOptions=e=>{let t=_t(e,100,V);return e.ease=t.ease,e.duration=k(t.duration),e.type=`keyframes`,e};function H({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=V({keyframes:[f.value,m(f.value)],velocity:yt(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function kt(e,t,n){let r=[],i=n||E.mix||ft,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=O(Array.isArray(t)?t[n]||D:t,a)),r.push(a)}return r}function At(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=kt(t,r,i),c=s.length,u=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=ye(e[r],e[r+1],n);return s[r](i)};return n?t=>u(l(e[0],e[a-1],t)):u}function jt(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=ye(0,t,r);e.push(T(n,1,i))}}function Mt(e){let t=[0];return jt(t,e.length-1),t}function Nt(e,t){return e.map(e=>e*t)}function Pt(e,t){return e.map(()=>t||ze).splice(0,e.length-1)}function U({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=Ve(r)?r.map(We):We(r),a={done:!1,value:t[0]},o=At(Nt(n&&n.length===t.length?n:Mt(t),e),t,{ease:Array.isArray(i)?i:Pt(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var Ft=e=>e!==null;function It(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Ft),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Lt={decay:H,inertia:H,tween:U,keyframes:U,spring:V};function Rt(e){typeof e.type==`string`&&(e.type=Lt[e.type])}var zt=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},Bt=e=>e/100,Vt=class extends zt{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==L.now()&&this.tick(L.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},R.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;Rt(e);let{type:t=U,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||U;s!==U&&typeof o[0]!=`number`&&(this.mixKeyframes=O(Bt,ft(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=gt(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:p,type:m,onUpdate:h,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let _=this.currentTime-c*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?_<0:_>r;this.currentTime=Math.max(_,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let y=this.currentTime,b=n;if(d){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,d+1),t%2&&(f===`reverse`?(n=1-n,p&&(n-=p/o)):f===`mirror`&&(b=a)),y=l(0,1,n)*o}let x=v?{done:!1,value:u[0]}:b.next(y);i&&(x.value=i(x.value));let{done:S}=x;!v&&s!==null&&(S=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let C=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&S);return C&&m!==H&&(x.value=It(u,this.options,g,this.speed)),h&&h(x.value),C&&this.finish(),x}then(e,t){return this.finished.then(e,t)}get duration(){return A(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+A(e)}get time(){return A(this.currentTime)}set time(e){e=k(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),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(L.now());let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=A(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=pt,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,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(L.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,R.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function Ht(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var W=e=>e*180/Math.PI,Ut=e=>Gt(W(Math.atan2(e[1],e[0]))),Wt={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ut,rotateZ:Ut,skewX:e=>W(Math.atan(e[1])),skewY:e=>W(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Gt=e=>(e%=360,e<0&&(e+=360),e),Kt=Ut,qt=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Jt=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Yt={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:qt,scaleY:Jt,scale:e=>(qt(e)+Jt(e))/2,rotateX:e=>Gt(W(Math.atan2(e[6],e[5]))),rotateY:e=>Gt(W(Math.atan2(-e[2],e[0]))),rotateZ:Kt,rotate:Kt,skewX:e=>W(Math.atan(e[4])),skewY:e=>W(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Xt(e){return+!!e.includes(`scale`)}function Zt(e,t){if(!e||e===`none`)return Xt(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=Yt,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Wt,i=t}if(!i)return Xt(t);let a=r[t],o=i[1].split(`,`).map($t);return typeof a==`function`?a(o):o[a]}var Qt=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return Zt(n,t)};function $t(e){return parseFloat(e.trim())}var en=e=>e===x||e===g,tn=new Set([`x`,`y`,`z`]),nn=oe.filter(e=>!tn.has(e));function rn(e){let t=[];return nn.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var G={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Zt(t,`x`),y:(e,{transform:t})=>Zt(t,`y`)};G.translateX=G.x,G.translateY=G.y;var K=new Set,an=!1,on=!1,sn=!1;function cn(){if(on){let e=Array.from(K).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=rn(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}on=!1,an=!1,K.forEach(e=>e.complete(sn)),K.clear()}function ln(){K.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(on=!0)})}function un(){sn=!0,ln(),cn(),sn=!1}var dn=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(K.add(this),an||(an=!0,P.read(ln),P.resolveKeyframes(cn))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}Ht(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),K.delete(this)}cancel(){this.state===`scheduled`&&(K.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},fn=e=>e.startsWith(`--`);function pn(e,t,n){fn(t)?e.style.setProperty(t,n):e.style[t]=n}var mn=_e(()=>window.ScrollTimeline!==void 0),hn={};function gn(e,t){let n=_e(e);return()=>hn[t]??n()}var _n=gn(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),q=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,vn={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:q([0,.65,.55,1]),circOut:q([.55,0,1,.45]),backIn:q([.31,.01,.66,-.59]),backOut:q([.33,1.53,.69,.99])};function yn(e,t){if(e)return typeof e==`function`?_n()?mt(e,t):`ease-out`:Be(e)?q(e):Array.isArray(e)?e.map(e=>yn(e,t)||vn.easeOut):vn[e]}function bn(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=yn(s,i);Array.isArray(d)&&(u.easing=d),N.value&&R.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return N.value&&p.finished.finally(()=>{R.waapi--}),p}function xn(e){return typeof e==`function`&&`applyToOptions`in e}function Sn({type:e,...t}){return xn(e)&&_n()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Cn=class extends zt{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=Sn(e);this.animation=bn(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=It(r,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(e):pn(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return A(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+A(e)}get time(){return A(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=k(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?this.animation.playState:`finished`}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&mn()?(this.animation.timeline=e,D):t(this)}},wn={anticipate:Ne,backInOut:Me,circInOut:Ie};function Tn(e){return e in wn}function En(e){typeof e.ease==`string`&&Tn(e.ease)&&(e.ease=wn[e.ease])}var Dn=10,On=class extends Cn{constructor(e){En(e),Rt(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new Vt({...a,autoplay:!1}),s=k(this.finishedTime??this.time);t.setWithVelocity(o.sample(s-Dn).value,o.sample(s).value,Dn),o.stop()}},kn=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(p.test(e)||e===`0`)&&!e.startsWith(`url(`));function An(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function jn(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=kn(i,t),s=kn(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:An(e)||(n===`spring`||xn(n))&&r}function Mn(e){e.duration=0,e.type=`keyframes`}var Nn=new Set([`opacity`,`clipPath`,`filter`,`transform`]),Pn=_e(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function Fn(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:s,transformTemplate:c}=t.owner.getProps();return Pn()&&n&&Nn.has(n)&&(n!==`transform`||!c)&&!s&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var In=40,Ln=class extends zt{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=L.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||dn;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=L.now(),jn(e,i,a,o)||((E.instantAnimations||!s)&&l?.(It(e,n,t)),e[0]=e[e.length-1],Mn(n),n.repeat=0);let u={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>In?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},d=!c&&Fn(u)?new On({...u,element:u.motionValue.owner.current}):new Vt(u);d.finished.then(()=>this.notifyFinished()).catch(D),this.pendingTimeline&&=(this.stopTimeline=d.attachTimeline(this.pendingTimeline),void 0),this._animation=d}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),un()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}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(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function Rn(e,t){return e?.[t]??e?.default??e}var zn=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...oe]),Bn={test:e=>e===`auto`,parse:e=>e},Vn=e=>t=>t.test(e),Hn=[x,g,d,c,t,me,Bn],Un=e=>Hn.find(Vn(e)),Wn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Gn(e){let t=Wn.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Kn(e,t,n=1){`${e}`;let[r,i]=Gn(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return he(e)?parseFloat(e):e}return u(i)?Kn(i,t,n+1):i}function qn(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||ge(e)}var Jn=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Yn(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(y)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Jn.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Xn=/\b([a-z-]*)\(.*?\)/gu,Zn={...p,getAnimatableNone:e=>{let t=e.match(Xn);return t?t.map(Yn).join(` `):e}},Qn={...m,color:h,backgroundColor:h,outlineColor:h,fill:h,stroke:h,borderColor:h,borderTopColor:h,borderRightColor:h,borderBottomColor:h,borderLeftColor:h,filter:Zn,WebkitFilter:Zn},$n=e=>Qn[e];function er(e,t){let n=$n(e);return n!==Zn&&(n=p),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var tr=new Set([`auto`,`none`,`0`]);function nr(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!tr.has(t)&&f(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=er(n,i)}var rr=class extends dn{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),u(r))){let i=Kn(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!zn.has(n)||e.length!==2)return;let[r,i]=e,a=Un(r),o=Un(i);if(a!==o)if(en(a)&&en(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else G[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||qn(e[t]))&&n.push(t);n.length&&nr(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=G[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=G[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},{schedule:ir,cancel:ar}=qe(queueMicrotask,!1),or={x:!1,y:!1};function sr(){return or.x||or.y}function cr(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function lr(e,t){let n=cr(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function ur(e){return!(e.pointerType===`touch`||sr())}function dr(e,t,n={}){let[r,i,a]=lr(e,n),o=e=>{if(!ur(e))return;let{target:n}=e,r=t(n,e);if(typeof r!=`function`||!n)return;let a=e=>{ur(e)&&(r(e),n.removeEventListener(`pointerleave`,a))};n.addEventListener(`pointerleave`,a,i)};return r.forEach(e=>{e.addEventListener(`pointerenter`,o,i)}),a}var fr=(e,t)=>t?e===t?!0:fr(e,t.parentElement):!1,pr=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,mr=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function hr(e){return mr.has(e.tagName)||e.tabIndex!==-1}var J=new WeakSet;function gr(e){return t=>{t.key===`Enter`&&e(t)}}function _r(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var vr=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=gr(()=>{if(J.has(n))return;_r(n,`down`);let e=gr(()=>{_r(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>_r(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function yr(e){return pr(e)&&!sr()}function br(e,t,n={}){let[i,a,o]=lr(e,n),s=e=>{let r=e.currentTarget;if(!yr(e))return;J.add(r);let i=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),J.has(r)&&J.delete(r),yr(e)&&typeof i==`function`&&i(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||fr(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,a),window.addEventListener(`pointercancel`,c,a)};return i.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,s,a),r(e)&&(e.addEventListener(`focus`,e=>vr(e,a)),!hr(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),o}var xr=30,Sr=e=>!isNaN(parseFloat(e)),Cr={current:void 0},wr=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=L.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=L.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Sr(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new Se);let n=this.events[e].add(t);return e===`change`?()=>{n(),P.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Cr.current&&Cr.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=L.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>xr)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,xr);return Ce(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Y(e,t){return new wr(e,t)}var Tr=[...Hn,h,p],Er=e=>Tr.find(Vn(e));function X(e,t,n){let r=e.getProps();return se(r,t,n===void 0?r.custom:n,e)}var Z=e=>Array.isArray(e);function Dr(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Y(n))}function Or(e){return Z(e)?e[e.length-1]||0:e}function kr(e,t){let{transitionEnd:n={},transition:r={},...i}=X(e,t)||{};i={...i,...n};for(let t in i)Dr(e,t,Or(i[t]))}function Ar(e){return!!(i(e)&&e.add)}function jr(e,t){let n=e.getValue(`willChange`);if(Ar(n))return n.add(t);if(!n&&E.WillChange){let n=new E.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function Mr(e){return e.props[le]}var Nr=e=>e!==null;function Pr(e,{repeat:t,repeatType:n=`loop`},r){let i=e.filter(Nr),a=t&&n!==`loop`&&t%2==1?0:i.length-1;return!a||r===void 0?i[a]:r}var Fr={type:`spring`,stiffness:500,damping:25,restSpeed:10},Ir=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Lr={type:`keyframes`,duration:.8},Rr={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},zr=(t,{keyframes:n})=>n.length>2?Lr:e.has(t)?t.startsWith(`scale`)?Ir(n[1]):Fr:Rr;function Br({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:c,elapsed:l,...u}){return!!Object.keys(u).length}var Vr=(e,t,n,r={},i,a)=>o=>{let s=Rn(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=k(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};Br(s)||Object.assign(u,zr(e,u)),u.duration&&=k(u.duration),u.repeatDelay&&=k(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Mn(u),u.delay===0&&(d=!0)),(E.instantAnimations||E.skipAnimations)&&(d=!0,Mn(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Pr(u.keyframes,s);if(e!==void 0){P.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new Vt(u):new Ln(u)};function Hr({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Ur(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:o,...s}=t;r&&(a=r);let c=[],l=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||l&&Hr(l,t))continue;let o={delay:n,...Rn(a||{},t)},u=r.get();if(u!==void 0&&!r.isAnimating&&!Array.isArray(i)&&i===u&&!o.velocity)continue;let d=!1;if(window.MotionHandoffAnimation){let n=Mr(e);if(n){let e=window.MotionHandoffAnimation(n,t,P);e!==null&&(o.startTime=e,d=!0)}}jr(e,t),r.start(Vr(t,r,i,e.shouldReduceMotion&&zn.has(t)?{type:!1}:o,e,d));let f=r.animation;f&&c.push(f)}return o&&Promise.all(c).then(()=>{P.update(()=>{o&&kr(e,o)})}),c}function Wr(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}function Gr(e,t,n={}){let r=X(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(Ur(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Kr(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function Kr(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(Gr(c,t,{...o,delay:n+(typeof r==`function`?0:r)+Wr(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function qr(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Gr(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Gr(e,t,n);else{let i=typeof t==`function`?X(e,t,n.custom):t;r=Promise.all(Ur(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}function Jr(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var Yr=_.length;function Xr(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&Xr(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let r=0;r<Yr;r++){let i=_[r],a=e.props[i];(n(a)||a===!1)&&(t[i]=a)}return t}var Zr=[...fe].reverse(),Qr=fe.length;function $r(e){return t=>Promise.all(t.map(({animation:t,options:n})=>qr(e,t,n)))}function ei(e){let t=$r(e),r=ni(),i=!0,a=t=>(n,r)=>{let i=X(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=Xr(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<Qr;t++){let p=Zr[t],m=r[p],h=s[p]===void 0?c[p]:s[p],g=n(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&i&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||de(h)||typeof h==`boolean`)continue;let y=ti(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:ee={}}=m,te={...ee,...C},w=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in te){let t=C[e],n=ee[e];if(d.hasOwnProperty(e))continue;let r=!1;r=Z(t)&&Z(n)?!Jr(t,n):t!==n,r?t==null?u.add(e):w(e):t!==void 0&&u.has(e)?w(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),i&&e.blockInitialAnimation&&(b=!1);let ne=v&&y;b&&(!ne||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&i&&!ne&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=X(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=Wr(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=X(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return i&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),i=!1,p?t(l):Promise.resolve()}function c(t,n){if(r[t].isActive===n)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,n)),r[t].isActive=n;let i=s(t);for(let e in r)r[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>r,reset:()=>{r=ni()}}}function ti(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!Jr(t,e):!1}function Q(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ni(){return{animate:Q(!0),whileInView:Q(),whileHover:Q(),whileTap:Q(),whileDrag:Q(),whileFocus:Q(),exit:Q()}}var $=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},ri=class extends ${constructor(e){super(e),e.animationState||=ei(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();de(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},ii=0,ai={animation:{Feature:ri},exit:{Feature:class extends ${constructor(){super(...arguments),this.id=ii++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function oi(e){return{point:{x:e.pageX,y:e.pageY}}}function si(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&P.postRender(()=>i(t,oi(t)))}var ci=class extends ${mount(){let{current:e}=this.node;e&&(this.unmount=dr(e,(e,t)=>(si(this.node,t,`Start`),e=>si(this.node,e,`End`))))}unmount(){}};function li(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}var ui=class extends ${constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=O(li(this.node.current,`focus`,()=>this.onFocus()),li(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function di(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&P.postRender(()=>i(t,oi(t)))}var fi=class extends ${mount(){let{current:e}=this.node;e&&(this.unmount=br(e,(e,t)=>(di(this.node,t,`Start`),(e,{success:t})=>di(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}},pi=new WeakMap,mi=new WeakMap,hi=e=>{let t=pi.get(e.target);t&&t(e)},gi=e=>{e.forEach(hi)};function _i({root:e,...t}){let n=e||document;mi.has(n)||mi.set(n,{});let r=mi.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(gi,{root:e,...t})),r[i]}function vi(e,t,n){let r=_i(t);return pi.set(e,n),r.observe(e),()=>{pi.delete(e),r.unobserve(e)}}var yi={some:0,all:1},bi=class extends ${constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:yi[r]};return vi(this.node.current,a,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(xi(e,t))&&this.startObserver()}unmount(){}};function xi({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var Si={inView:{Feature:bi},tap:{Feature:fi},focus:{Feature:ui},hover:{Feature:ci}};function Ci({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function wi(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Ti(e,t){return Ci(wi(e.getBoundingClientRect(),t))}var Ei=()=>({min:0,max:0}),Di=()=>({x:Ei(),y:Ei()}),Oi={current:null},ki={current:!1};function Ai(){if(ki.current=!0,S)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>Oi.current=e.matches;e.addEventListener(`change`,t),t()}else Oi.current=!1}var ji=new WeakMap;function Mi(e,t,n){for(let r in t){let a=t[r],o=n[r];if(i(a))e.addValue(r,a);else if(i(o))e.addValue(r,Y(a,{owner:e}));else if(o!==a)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(a):t.hasAnimated||t.set(a)}else{let t=e.getStaticValue(r);e.addValue(r,Y(t===void 0?a:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var Ni=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],Pi=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=dn,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=()=>{let e=L.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,P.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=pe(t),this.isVariantNode=te(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&i(t)&&t.set(c[e])}}mount(e){this.current=e,ji.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((e,t)=>this.bindToMotionValue(t,e)),ki.current||Ai(),this.shouldReduceMotion=this.reducedMotionConfig===`never`?!1:this.reducedMotionConfig===`always`?!0:Oi.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Je(this.notifyUpdate),Je(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();let r=e.has(t);r&&this.onBindTransform&&this.onBindTransform();let i=n.on(`change`,e=>{this.latestValues[t]=e,this.props.onUpdate&&P.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),a&&a(),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 v){let t=v[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Di()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<Ni.length;t++){let n=Ni[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=Mi(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){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=Y(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(he(n)||ge(n))?n=parseFloat(n):!Er(n)&&p.test(t)&&(n=er(e,t)),this.setBaseTarget(e,i(n)?n.get():n)),i(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=se(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!i(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new Se),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){ir.render(this.render)}},Fi=class extends Pi{constructor(){super(...arguments),this.KeyframeResolver=rr}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;i(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function Ii(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function Li(e){return window.getComputedStyle(e)}var Ri=class extends Fi{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Ii}readValueFromInstance(t,n){if(e.has(n))return this.projection?.isProjecting?Xt(n):Qt(t,n);{let e=Li(t),r=(o(n)?e.getPropertyValue(n):e[n])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Ti(e,t)}build(e,t,n){ue(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return ce(e,t,n)}},zi=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]);function Bi(e,t,n,r){Ii(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(zi.has(n)?n:w(n),t.attrs[n])}var Vi=class extends Fi{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Di}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(t,n){if(e.has(n)){let e=$n(n);return e&&e.default||0}return n=zi.has(n)?n:w(n),t.getAttribute(n)}scrapeMotionValuesFromProps(e,t,n){return re(e,t,n)}build(e,t,n){ee(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){Bi(e,t,n,r)}mount(e){this.isSVGTag=ie(e.tagName),super.mount(e)}},Hi=ne(C(),1),Ui={renderer:(e,t)=>ae(e)?new Vi(t):new Ri(t,{allowProjection:e!==Hi.Fragment}),...ai,...Si};export{Ui as default};
|