@useorgx/openclaw-plugin 0.7.11 → 0.7.16
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/README.md +94 -122
- package/dashboard/dist/assets/8pbG6uLK.js +1 -0
- package/dashboard/dist/assets/8pbG6uLK.js.br +0 -0
- package/dashboard/dist/assets/8pbG6uLK.js.gz +0 -0
- package/dashboard/dist/assets/B1LENRC8.js +212 -0
- package/dashboard/dist/assets/B1LENRC8.js.br +0 -0
- package/dashboard/dist/assets/B1LENRC8.js.gz +0 -0
- package/dashboard/dist/assets/{tcEHYcbW.js → BCudUvwg.js} +1 -1
- package/dashboard/dist/assets/BCudUvwg.js.br +0 -0
- package/dashboard/dist/assets/BCudUvwg.js.gz +0 -0
- package/dashboard/dist/assets/{Du1wfrXa.js → BM75sh1f.js} +2 -2
- package/dashboard/dist/assets/BM75sh1f.js.br +0 -0
- package/dashboard/dist/assets/BM75sh1f.js.gz +0 -0
- package/dashboard/dist/assets/BV0BcV1u.js +53 -0
- package/dashboard/dist/assets/BV0BcV1u.js.br +0 -0
- package/dashboard/dist/assets/BV0BcV1u.js.gz +0 -0
- package/dashboard/dist/assets/BYVYH9CH.js +1 -0
- package/dashboard/dist/assets/BYVYH9CH.js.br +0 -0
- package/dashboard/dist/assets/BYVYH9CH.js.gz +0 -0
- package/dashboard/dist/assets/BjK42gtU.js +1 -0
- package/dashboard/dist/assets/BjK42gtU.js.br +0 -0
- package/dashboard/dist/assets/BjK42gtU.js.gz +0 -0
- package/dashboard/dist/assets/BkMrrjAv.js +1 -0
- package/dashboard/dist/assets/BkMrrjAv.js.br +0 -0
- package/dashboard/dist/assets/BkMrrjAv.js.gz +0 -0
- package/dashboard/dist/assets/BpF7v1Dk.js +1 -0
- package/dashboard/dist/assets/BpF7v1Dk.js.br +0 -0
- package/dashboard/dist/assets/BpF7v1Dk.js.gz +0 -0
- package/dashboard/dist/assets/{AqVoI3SF.js → Bv_86bUY.js} +1 -1
- package/dashboard/dist/assets/Bv_86bUY.js.br +0 -0
- package/dashboard/dist/assets/Bv_86bUY.js.gz +0 -0
- package/dashboard/dist/assets/C-MOJWHs.js +1 -0
- package/dashboard/dist/assets/C-MOJWHs.js.br +0 -0
- package/dashboard/dist/assets/C-MOJWHs.js.gz +0 -0
- package/dashboard/dist/assets/C3PrI8L7.js +1 -0
- package/dashboard/dist/assets/C3PrI8L7.js.br +0 -0
- package/dashboard/dist/assets/C3PrI8L7.js.gz +0 -0
- package/dashboard/dist/assets/{CD-q5mdP.js → C6AqbA9J.js} +1 -1
- package/dashboard/dist/assets/C6AqbA9J.js.br +0 -0
- package/dashboard/dist/assets/C6AqbA9J.js.gz +0 -0
- package/dashboard/dist/assets/CSlBSRyv.js +1 -0
- package/dashboard/dist/assets/CSlBSRyv.js.br +0 -0
- package/dashboard/dist/assets/CSlBSRyv.js.gz +0 -0
- package/dashboard/dist/assets/{beHYBbh6.js → CUXb_4F3.js} +2 -2
- package/dashboard/dist/assets/CUXb_4F3.js.br +0 -0
- package/dashboard/dist/assets/CUXb_4F3.js.gz +0 -0
- package/dashboard/dist/assets/Cn8sRTkO.js +1 -0
- package/dashboard/dist/assets/Cn8sRTkO.js.br +0 -0
- package/dashboard/dist/assets/Cn8sRTkO.js.gz +0 -0
- package/dashboard/dist/assets/D5IgXoTj.js +1 -0
- package/dashboard/dist/assets/D5IgXoTj.js.br +0 -0
- package/dashboard/dist/assets/D5IgXoTj.js.gz +0 -0
- package/dashboard/dist/assets/DMKyYAtD.js +1 -0
- package/dashboard/dist/assets/DMKyYAtD.js.br +0 -0
- package/dashboard/dist/assets/DMKyYAtD.js.gz +0 -0
- package/dashboard/dist/assets/{DCP-C7fn.js → DXzpQUC0.js} +1 -1
- package/dashboard/dist/assets/DXzpQUC0.js.br +0 -0
- package/dashboard/dist/assets/DXzpQUC0.js.gz +0 -0
- package/dashboard/dist/assets/Dj2k1r16.js +8 -0
- package/dashboard/dist/assets/Dj2k1r16.js.br +0 -0
- package/dashboard/dist/assets/Dj2k1r16.js.gz +0 -0
- package/dashboard/dist/assets/JDPvhd68.js +1 -0
- package/dashboard/dist/assets/JDPvhd68.js.br +0 -0
- package/dashboard/dist/assets/JDPvhd68.js.gz +0 -0
- package/dashboard/dist/assets/R6N_VVqm.js +1 -0
- package/dashboard/dist/assets/R6N_VVqm.js.br +0 -0
- package/dashboard/dist/assets/R6N_VVqm.js.gz +0 -0
- package/dashboard/dist/assets/cEP7N1dn.js +1 -0
- package/dashboard/dist/assets/cEP7N1dn.js.br +0 -0
- package/dashboard/dist/assets/cEP7N1dn.js.gz +0 -0
- package/dashboard/dist/assets/cX2e-TLi.js +1 -0
- package/dashboard/dist/assets/cX2e-TLi.js.br +0 -0
- package/dashboard/dist/assets/cX2e-TLi.js.gz +0 -0
- package/dashboard/dist/assets/eeHXe_OQ.js +9 -0
- package/dashboard/dist/assets/eeHXe_OQ.js.br +0 -0
- package/dashboard/dist/assets/eeHXe_OQ.js.gz +0 -0
- package/dashboard/dist/assets/iLnvdWmW.css +1 -0
- package/dashboard/dist/assets/iLnvdWmW.css.br +0 -0
- package/dashboard/dist/assets/iLnvdWmW.css.gz +0 -0
- package/dashboard/dist/assets/konqMbVI.js +1 -0
- package/dashboard/dist/assets/konqMbVI.js.br +0 -0
- package/dashboard/dist/assets/konqMbVI.js.gz +0 -0
- package/dashboard/dist/assets/wc6cgXzV.js +1 -0
- package/dashboard/dist/assets/wc6cgXzV.js.br +0 -0
- package/dashboard/dist/assets/wc6cgXzV.js.gz +0 -0
- package/dashboard/dist/brand/control-tower.png +0 -0
- package/dashboard/dist/brand/design-codex.png +0 -0
- package/dashboard/dist/brand/engineering-autopilot.png +0 -0
- package/dashboard/dist/brand/launch-captain.png +0 -0
- package/dashboard/dist/brand/orgx-logo.png +0 -0
- package/dashboard/dist/brand/pipeline-intelligence.png +0 -0
- package/dashboard/dist/brand/product-orchestrator.png +0 -0
- package/dashboard/dist/brand/xandy-orchestrator.png +0 -0
- package/dashboard/dist/index.html +8 -6
- package/dashboard/dist/index.html.br +0 -0
- package/dashboard/dist/index.html.gz +0 -0
- package/dist/hash-utils.d.ts +1 -0
- package/dist/hash-utils.js +4 -0
- package/dist/http/helpers/auto-continue-engine.d.ts +15 -0
- package/dist/http/helpers/auto-continue-engine.js +289 -67
- package/dist/http/helpers/autopilot-slice-utils.js +112 -66
- package/dist/http/helpers/hash-utils.d.ts +1 -1
- package/dist/http/helpers/hash-utils.js +1 -1
- package/dist/http/helpers/mission-control.d.ts +3 -0
- package/dist/http/helpers/mission-control.js +43 -9
- package/dist/http/helpers/queue-constants.d.ts +37 -0
- package/dist/http/helpers/queue-constants.js +34 -0
- package/dist/http/helpers/slice-experience-v2.js +2 -5
- package/dist/http/helpers/slice-run-projections.js +2 -5
- package/dist/http/helpers/value-utils.d.ts +1 -1
- package/dist/http/helpers/value-utils.js +5 -2
- package/dist/http/helpers/workspace-scope.js +4 -3
- package/dist/http/index.js +104 -61
- package/dist/http/routes/chat.d.ts +1 -1
- package/dist/http/routes/chat.js +3 -23
- package/dist/http/routes/entities.js +60 -2
- package/dist/http/routes/entity-dynamic.js +49 -9
- package/dist/http/routes/live-snapshot.d.ts +10 -1
- package/dist/http/routes/live-snapshot.js +15 -26
- package/dist/http/routes/mission-control-actions.d.ts +6 -0
- package/dist/http/routes/mission-control-actions.js +35 -18
- package/dist/http/routes/mission-control-read.js +4 -107
- package/dist/lib/type-coercion.d.ts +10 -0
- package/dist/lib/type-coercion.js +82 -0
- package/dist/mcp-http-handler.js +14 -2
- package/dist/openclaw.plugin.json +1 -1
- package/dist/services/experiment-randomization.js +9 -2
- package/openclaw.plugin.json +1 -1
- package/package.json +3 -2
- package/dashboard/dist/assets/AqVoI3SF.js.br +0 -0
- package/dashboard/dist/assets/AqVoI3SF.js.gz +0 -0
- package/dashboard/dist/assets/BC4WvnHJ.js +0 -1
- package/dashboard/dist/assets/BC4WvnHJ.js.br +0 -0
- package/dashboard/dist/assets/BC4WvnHJ.js.gz +0 -0
- package/dashboard/dist/assets/BG5mwTkg.js +0 -1
- package/dashboard/dist/assets/BG5mwTkg.js.br +0 -0
- package/dashboard/dist/assets/BG5mwTkg.js.gz +0 -0
- package/dashboard/dist/assets/BJgZIVUQ.js +0 -53
- package/dashboard/dist/assets/BJgZIVUQ.js.br +0 -0
- package/dashboard/dist/assets/BJgZIVUQ.js.gz +0 -0
- package/dashboard/dist/assets/BNh-XYPV.js +0 -1
- package/dashboard/dist/assets/BNh-XYPV.js.br +0 -0
- package/dashboard/dist/assets/BNh-XYPV.js.gz +0 -0
- package/dashboard/dist/assets/BTAEErUY.js +0 -1
- package/dashboard/dist/assets/BTAEErUY.js.br +0 -0
- package/dashboard/dist/assets/BTAEErUY.js.gz +0 -0
- package/dashboard/dist/assets/BepW_590.js +0 -1
- package/dashboard/dist/assets/BepW_590.js.br +0 -0
- package/dashboard/dist/assets/BepW_590.js.gz +0 -0
- package/dashboard/dist/assets/BerAfzjq.js +0 -1
- package/dashboard/dist/assets/BerAfzjq.js.br +0 -0
- package/dashboard/dist/assets/BerAfzjq.js.gz +0 -0
- package/dashboard/dist/assets/Bp3N-QL5.js +0 -212
- package/dashboard/dist/assets/Bp3N-QL5.js.br +0 -0
- package/dashboard/dist/assets/Bp3N-QL5.js.gz +0 -0
- package/dashboard/dist/assets/C-KIc3Wc.js +0 -1
- package/dashboard/dist/assets/C-KIc3Wc.js.br +0 -0
- package/dashboard/dist/assets/C-KIc3Wc.js.gz +0 -0
- package/dashboard/dist/assets/C3dZRz9P.css +0 -1
- package/dashboard/dist/assets/C3dZRz9P.css.br +0 -0
- package/dashboard/dist/assets/C3dZRz9P.css.gz +0 -0
- package/dashboard/dist/assets/CD-q5mdP.js.br +0 -0
- package/dashboard/dist/assets/CD-q5mdP.js.gz +0 -0
- package/dashboard/dist/assets/CL_wXqR7.js +0 -1
- package/dashboard/dist/assets/CL_wXqR7.js.br +0 -0
- package/dashboard/dist/assets/CL_wXqR7.js.gz +0 -0
- package/dashboard/dist/assets/CdvjC9G9.js +0 -1
- package/dashboard/dist/assets/CdvjC9G9.js.br +0 -0
- package/dashboard/dist/assets/CdvjC9G9.js.gz +0 -0
- package/dashboard/dist/assets/Ck2agw-s.js +0 -1
- package/dashboard/dist/assets/Ck2agw-s.js.br +0 -0
- package/dashboard/dist/assets/Ck2agw-s.js.gz +0 -0
- package/dashboard/dist/assets/CxQ08qFN.js +0 -9
- package/dashboard/dist/assets/CxQ08qFN.js.br +0 -0
- package/dashboard/dist/assets/CxQ08qFN.js.gz +0 -0
- package/dashboard/dist/assets/D2CH1H6k.js +0 -1
- package/dashboard/dist/assets/D2CH1H6k.js.br +0 -0
- package/dashboard/dist/assets/D2CH1H6k.js.gz +0 -0
- package/dashboard/dist/assets/D9esz7jd.js +0 -1
- package/dashboard/dist/assets/D9esz7jd.js.br +0 -0
- package/dashboard/dist/assets/D9esz7jd.js.gz +0 -0
- package/dashboard/dist/assets/DCP-C7fn.js.br +0 -0
- package/dashboard/dist/assets/DCP-C7fn.js.gz +0 -0
- package/dashboard/dist/assets/DJASCd69.js +0 -1
- package/dashboard/dist/assets/DJASCd69.js.br +0 -0
- package/dashboard/dist/assets/DJASCd69.js.gz +0 -0
- package/dashboard/dist/assets/Dm9AybAp.js +0 -1
- package/dashboard/dist/assets/Dm9AybAp.js.br +0 -0
- package/dashboard/dist/assets/Dm9AybAp.js.gz +0 -0
- package/dashboard/dist/assets/Du1wfrXa.js.br +0 -0
- package/dashboard/dist/assets/Du1wfrXa.js.gz +0 -0
- package/dashboard/dist/assets/beHYBbh6.js.br +0 -0
- package/dashboard/dist/assets/beHYBbh6.js.gz +0 -0
- package/dashboard/dist/assets/cNrhgGc1.js +0 -8
- package/dashboard/dist/assets/cNrhgGc1.js.br +0 -0
- package/dashboard/dist/assets/cNrhgGc1.js.gz +0 -0
- package/dashboard/dist/assets/tcEHYcbW.js.br +0 -0
- package/dashboard/dist/assets/tcEHYcbW.js.gz +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as t}from"./B1LENRC8.js";const e={QUEUED:"queued",RUNNING:"running",BLOCKED:"blocked",IDLE:"idle",COMPLETED:"completed"};function n(r){switch(r){case e.RUNNING:return"border-teal-300/35 bg-teal-400/[0.12] text-teal-100";case e.BLOCKED:return"border-amber-300/35 bg-amber-400/[0.12] text-amber-100";case e.IDLE:return"border-strong bg-white/[0.05] text-secondary";default:return"border-[#BFFF00]/30 bg-[#BFFF00]/12 text-[#E1FFB2]"}}function c(r){switch(r){case e.RUNNING:return"Running";case e.BLOCKED:return"Needs input";case e.IDLE:return"Idle";case e.COMPLETED:return"Completed";case e.QUEUED:return"Queued";default:return r.replace(/_/g," ")}}function o(r){switch(r){case e.QUEUED:case e.IDLE:return 0;case e.BLOCKED:return 1;case e.RUNNING:return 2;case e.COMPLETED:return 3;default:return 4}}function i(r){switch(r){case e.RUNNING:return"from-teal-300/0 via-teal-300/60 to-teal-300/0";case e.BLOCKED:return"from-amber-300/0 via-amber-300/55 to-amber-300/0";case e.IDLE:return"from-white/0 via-white/35 to-white/0";default:return"from-[#BFFF00]/0 via-[#BFFF00]/70 to-[#BFFF00]/0"}}function s(r){switch(r){case e.RUNNING:return"Current";case e.BLOCKED:return"Blocked on";default:return"Next"}}function E(r){switch(r){case e.RUNNING:return t.lime;case e.BLOCKED:return t.red;case e.IDLE:return t.iris;case e.QUEUED:return t.teal;default:return t.amber}}function d(r){switch(r){case e.RUNNING:return{background:`linear-gradient(to right, ${t.lime}, ${t.teal})`};case e.BLOCKED:return{background:`linear-gradient(to right, ${t.red}, ${t.amber})`};case e.IDLE:return{background:`linear-gradient(to right, ${t.iris}99, transparent)`};default:return{background:`linear-gradient(to right, ${t.lime}B3, ${t.teal}66)`}}}function l(r,a){if(a)return"Scope Under Review";switch(r){case e.COMPLETED:return"Completed Scope";case e.RUNNING:return"Current Work";case e.BLOCKED:return"Blocked Work";default:return"Next Work"}}function N(r){return r.some(a=>a.queueState===e.RUNNING)?e.RUNNING:r.some(a=>a.queueState===e.BLOCKED)?e.BLOCKED:r.some(a=>a.queueState===e.QUEUED)?e.QUEUED:r.some(a=>a.queueState===e.IDLE)?e.IDLE:e.COMPLETED}export{e as Q,c as a,n as b,i as c,N as d,s as e,d as f,E as g,o as q,l as w};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as c}from"./Dj2k1r16.js";import{c as m}from"./DMKyYAtD.js";import{b as g,h as n}from"./B1LENRC8.js";function h({authToken:s=null,embedMode:o=!1,enabled:i=!0}={}){var a;const u=c.useMemo(()=>["usage-control-plane",{authToken:s,embedMode:o}],[s,o]),e=m({queryKey:u,enabled:i,queryFn:async()=>{const t=await fetch("/orgx/api/usage/control-plane/summary",{headers:g({authToken:s,embedMode:o})}),r=await t.json().catch(()=>null);if(!t.ok){const l=(r&&typeof r=="object"&&"error"in r&&typeof r.error=="string"?r.error:null)??(r&&typeof r=="object"&&"message"in r&&typeof r.message=="string"?r.message:null)??`Failed to load usage summary (${t.status})`;throw new Error(n(l))}if(!r||typeof r!="object"||!("generatedAt"in r))throw new Error(n("Usage summary response is missing required fields."));return r},refetchInterval:6e4});return{summary:e.data??null,isLoading:e.isLoading,isFetching:e.isFetching,error:((a=e.error)==null?void 0:a.message)??null,refetch:e.refetch}}export{h as u};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var Ae=Object.defineProperty;var je=(t,n,e)=>n in t?Ae(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e;var u=(t,n,e)=>je(t,typeof n!="symbol"?n+"":n,e);const Me=Symbol.for("constructDateFrom");function ie(t,n){return typeof t=="function"?t(n):t&&typeof t=="object"&&Me in t?t[Me](n):t instanceof Date?new t.constructor(n):new Date(n)}function E(t,n){return ie(t,t)}let Be={};function Se(){return Be}function De(t){const n=E(t),e=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return e.setUTCFullYear(n.getFullYear()),+t-+e}function ue(t,...n){const e=ie.bind(null,t||n.find(r=>typeof r=="object"));return n.map(e)}function V(t,n){const e=+E(t)-+E(n);return e<0?-1:e>0?1:e}function Ge(t){return ie(t,Date.now())}function Ve(t,n,e){const[r,a]=ue(e==null?void 0:e.in,t,n),s=r.getFullYear()-a.getFullYear(),o=r.getMonth()-a.getMonth();return s*12+o}function ze(t){return n=>{const r=(t?Math[t]:Math.trunc)(n);return r===0?0:r}}function Ue(t,n){return+E(t)-+E(n)}function Je(t,n){const e=E(t);return e.setHours(23,59,59,999),e}function Ze(t,n){const e=E(t),r=e.getMonth();return e.setFullYear(e.getFullYear(),r+1,0),e.setHours(23,59,59,999),e}function Ke(t,n){const e=E(t);return+Je(e)==+Ze(e)}function et(t,n,e){const[r,a,s]=ue(e==null?void 0:e.in,t,t,n),o=V(a,s),i=Math.abs(Ve(a,s));if(i<1)return 0;a.getMonth()===1&&a.getDate()>27&&a.setDate(30),a.setMonth(a.getMonth()-o*i);let d=V(a,s)===-o;Ke(r)&&i===1&&V(r,s)===1&&(d=!1);const l=o*(i-+d);return l===0?0:l}function tt(t,n,e){const r=Ue(t,n)/1e3;return ze(e==null?void 0:e.roundingMethod)(r)}const nt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},rt=(t,n,e)=>{let r;const a=nt[t];return typeof a=="string"?r=a:n===1?r=a.one:r=a.other.replace("{{count}}",n.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+r:r+" ago":r};function ne(t){return(n={})=>{const e=n.width?String(n.width):t.defaultWidth;return t.formats[e]||t.formats[t.defaultWidth]}}const at={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},st={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ot={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},it={date:ne({formats:at,defaultWidth:"full"}),time:ne({formats:st,defaultWidth:"full"}),dateTime:ne({formats:ot,defaultWidth:"full"})},ut={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ct=(t,n,e,r)=>ut[t];function X(t){return(n,e)=>{const r=e!=null&&e.context?String(e.context):"standalone";let a;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,i=e!=null&&e.width?String(e.width):o;a=t.formattingValues[i]||t.formattingValues[o]}else{const o=t.defaultWidth,i=e!=null&&e.width?String(e.width):t.defaultWidth;a=t.values[i]||t.values[o]}const s=t.argumentCallback?t.argumentCallback(n):n;return a[s]}}const dt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},lt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ft={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ht={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},mt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},wt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},gt=(t,n)=>{const e=Number(t),r=e%100;if(r>20||r<10)switch(r%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},yt={ordinalNumber:gt,era:X({values:dt,defaultWidth:"wide"}),quarter:X({values:lt,defaultWidth:"wide",argumentCallback:t=>t-1}),month:X({values:ft,defaultWidth:"wide"}),day:X({values:ht,defaultWidth:"wide"}),dayPeriod:X({values:mt,defaultWidth:"wide",formattingValues:wt,defaultFormattingWidth:"wide"})};function A(t){return(n,e={})=>{const r=e.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],s=n.match(a);if(!s)return null;const o=s[0],i=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],d=Array.isArray(i)?Mt(i,M=>M.test(o)):bt(i,M=>M.test(o));let l;l=t.valueCallback?t.valueCallback(d):d,l=e.valueCallback?e.valueCallback(l):l;const g=n.slice(o.length);return{value:l,rest:g}}}function bt(t,n){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&n(t[e]))return e}function Mt(t,n){for(let e=0;e<t.length;e++)if(n(t[e]))return e}function Dt(t){return(n,e={})=>{const r=n.match(t.matchPattern);if(!r)return null;const a=r[0],s=n.match(t.parsePattern);if(!s)return null;let o=t.valueCallback?t.valueCallback(s[0]):s[0];o=e.valueCallback?e.valueCallback(o):o;const i=n.slice(a.length);return{value:o,rest:i}}}const xt=/^(\d+)(th|st|nd|rd)?/i,Pt=/\d+/i,Tt={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},pt={any:[/^b/i,/^(a|c)/i]},kt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ot={any:[/1/i,/2/i,/3/i,/4/i]},Yt={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},vt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},_t={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Nt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Wt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ft={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Et={ordinalNumber:Dt({matchPattern:xt,parsePattern:Pt,valueCallback:t=>parseInt(t,10)}),era:A({matchPatterns:Tt,defaultMatchWidth:"wide",parsePatterns:pt,defaultParseWidth:"any"}),quarter:A({matchPatterns:kt,defaultMatchWidth:"wide",parsePatterns:Ot,defaultParseWidth:"any",valueCallback:t=>t+1}),month:A({matchPatterns:Yt,defaultMatchWidth:"wide",parsePatterns:vt,defaultParseWidth:"any"}),day:A({matchPatterns:_t,defaultMatchWidth:"wide",parsePatterns:Nt,defaultParseWidth:"any"}),dayPeriod:A({matchPatterns:Wt,defaultMatchWidth:"any",parsePatterns:Ft,defaultParseWidth:"any"})},Ht={code:"en-US",formatDistance:rt,formatLong:it,formatRelative:ct,localize:yt,match:Et,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Ct(t,n,e){const r=Se(),a=(e==null?void 0:e.locale)??r.locale??Ht,s=2520,o=V(t,n);if(isNaN(o))throw new RangeError("Invalid time value");const i=Object.assign({},e,{addSuffix:e==null?void 0:e.addSuffix,comparison:o}),[d,l]=ue(e==null?void 0:e.in,...o>0?[n,t]:[t,n]),g=tt(l,d),M=(De(l)-De(d))/1e3,y=Math.round((g-M)/60);let D;if(y<2)return e!=null&&e.includeSeconds?g<5?a.formatDistance("lessThanXSeconds",5,i):g<10?a.formatDistance("lessThanXSeconds",10,i):g<20?a.formatDistance("lessThanXSeconds",20,i):g<40?a.formatDistance("halfAMinute",0,i):g<60?a.formatDistance("lessThanXMinutes",1,i):a.formatDistance("xMinutes",1,i):y===0?a.formatDistance("lessThanXMinutes",1,i):a.formatDistance("xMinutes",y,i);if(y<45)return a.formatDistance("xMinutes",y,i);if(y<90)return a.formatDistance("aboutXHours",1,i);if(y<1440){const k=Math.round(y/60);return a.formatDistance("aboutXHours",k,i)}else{if(y<s)return a.formatDistance("xDays",1,i);if(y<43200){const k=Math.round(y/1440);return a.formatDistance("xDays",k,i)}else if(y<43200*2)return D=Math.round(y/43200),a.formatDistance("aboutXMonths",D,i)}if(D=et(l,d),D<12){const k=Math.round(y/43200);return a.formatDistance("xMonths",k,i)}else{const k=D%12,W=Math.trunc(D/12);return k<3?a.formatDistance("aboutXYears",W,i):k<9?a.formatDistance("overXYears",W,i):a.formatDistance("almostXYears",W+1,i)}}function Jr(t,n){return Ct(t,Ge(t),n)}function c(t){const n=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&n==="[object Date]"?new t.constructor(+t):typeof t=="number"||n==="[object Number]"||typeof t=="string"||n==="[object String]"?new Date(t):new Date(NaN)}function w(t,n){return t instanceof Date?new t.constructor(n):new Date(n)}function Z(t,n){const e=c(t);return isNaN(n)?w(t,NaN):(n&&e.setDate(e.getDate()+n),e)}function ce(t,n){const e=c(t);if(isNaN(n))return w(t,NaN);if(!n)return e;const r=e.getDate(),a=w(t,e.getTime());a.setMonth(e.getMonth()+n+1,0);const s=a.getDate();return r>=s?a:(e.setFullYear(a.getFullYear(),a.getMonth(),r),e)}function de(t,n){const e=+c(t);return w(t,e+n)}const ve=6048e5,qt=864e5,K=6e4,ee=36e5,It=1e3;function Zr(t,n){return de(t,n*ee)}let Lt={};function q(){return Lt}function H(t,n){var i,d,l,g;const e=q(),r=(n==null?void 0:n.weekStartsOn)??((d=(i=n==null?void 0:n.locale)==null?void 0:i.options)==null?void 0:d.weekStartsOn)??e.weekStartsOn??((g=(l=e.locale)==null?void 0:l.options)==null?void 0:g.weekStartsOn)??0,a=c(t),s=a.getDay(),o=(s<r?7:0)+s-r;return a.setDate(a.getDate()-o),a.setHours(0,0,0,0),a}function Q(t){return H(t,{weekStartsOn:1})}function _e(t){const n=c(t),e=n.getFullYear(),r=w(t,0);r.setFullYear(e+1,0,4),r.setHours(0,0,0,0);const a=Q(r),s=w(t,0);s.setFullYear(e,0,4),s.setHours(0,0,0,0);const o=Q(s);return n.getTime()>=a.getTime()?e+1:n.getTime()>=o.getTime()?e:e-1}function z(t){const n=c(t);return n.setHours(0,0,0,0),n}function U(t){const n=c(t),e=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return e.setUTCFullYear(n.getFullYear()),+t-+e}function Ne(t,n){const e=z(t),r=z(n),a=+e-U(e),s=+r-U(r);return Math.round((a-s)/qt)}function Qt(t){const n=_e(t),e=w(t,0);return e.setFullYear(n,0,4),e.setHours(0,0,0,0),Q(e)}function Kr(t,n){return de(t,n*K)}function $t(t,n){const e=n*3;return ce(t,e)}function ea(t,n){return de(t,n*1e3)}function Rt(t,n){const e=n*7;return Z(t,e)}function Xt(t,n){return ce(t,n*12)}function ta(t){let n;return t.forEach(function(e){const r=c(e);(n===void 0||n<r||isNaN(Number(r)))&&(n=r)}),n||new Date(NaN)}function na(t){let n;return t.forEach(e=>{const r=c(e);(!n||n>r||isNaN(+r))&&(n=r)}),n||new Date(NaN)}function ra(t,n){const e=z(t),r=z(n);return+e==+r}function At(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function jt(t){if(!At(t)&&typeof t!="number")return!1;const n=c(t);return!isNaN(Number(n))}function aa(t,n){const e=c(t),r=c(n),a=e.getFullYear()-r.getFullYear(),s=e.getMonth()-r.getMonth();return a*12+s}function xe(t){const n=c(t);return Math.trunc(n.getMonth()/3)+1}function sa(t,n){const e=c(t),r=c(n),a=e.getFullYear()-r.getFullYear(),s=xe(e)-xe(r);return a*4+s}function oa(t,n){const e=c(t),r=c(n);return e.getFullYear()-r.getFullYear()}function ia(t,n){const e=c(t),r=c(n),a=Pe(e,r),s=Math.abs(Ne(e,r));e.setDate(e.getDate()-a*s);const o=+(Pe(e,r)===-a),i=a*(s-o);return i===0?0:i}function Pe(t,n){const e=t.getFullYear()-n.getFullYear()||t.getMonth()-n.getMonth()||t.getDate()-n.getDate()||t.getHours()-n.getHours()||t.getMinutes()-n.getMinutes()||t.getSeconds()-n.getSeconds()||t.getMilliseconds()-n.getMilliseconds();return e<0?-1:e>0?1:e}function ua(t){const n=c(t);return n.setHours(23,59,59,999),n}function ca(t){const n=c(t),e=n.getMonth();return n.setFullYear(n.getFullYear(),e+1,0),n.setHours(23,59,59,999),n}function Te(t){const n=c(t),e=n.getMonth(),r=e-e%3;return n.setMonth(r,1),n.setHours(0,0,0,0),n}function da(t){const n=c(t);return n.setDate(1),n.setHours(0,0,0,0),n}function la(t){const n=c(t),e=n.getFullYear();return n.setFullYear(e+1,0,0),n.setHours(23,59,59,999),n}function Bt(t){const n=c(t),e=w(t,0);return e.setFullYear(n.getFullYear(),0,1),e.setHours(0,0,0,0),e}function fa(t,n){var i,d;const e=q(),r=e.weekStartsOn??((d=(i=e.locale)==null?void 0:i.options)==null?void 0:d.weekStartsOn)??0,a=c(t),s=a.getDay(),o=(s<r?-7:0)+6-(s-r);return a.setDate(a.getDate()+o),a.setHours(23,59,59,999),a}const St={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Gt=(t,n,e)=>{let r;const a=St[t];return typeof a=="string"?r=a:n===1?r=a.one:r=a.other.replace("{{count}}",n.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+r:r+" ago":r};function re(t){return(n={})=>{const e=n.width?String(n.width):t.defaultWidth;return t.formats[e]||t.formats[t.defaultWidth]}}const Vt={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},zt={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ut={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Jt={date:re({formats:Vt,defaultWidth:"full"}),time:re({formats:zt,defaultWidth:"full"}),dateTime:re({formats:Ut,defaultWidth:"full"})},Zt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Kt=(t,n,e,r)=>Zt[t];function j(t){return(n,e)=>{const r=e!=null&&e.context?String(e.context):"standalone";let a;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,i=e!=null&&e.width?String(e.width):o;a=t.formattingValues[i]||t.formattingValues[o]}else{const o=t.defaultWidth,i=e!=null&&e.width?String(e.width):t.defaultWidth;a=t.values[i]||t.values[o]}const s=t.argumentCallback?t.argumentCallback(n):n;return a[s]}}const en={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},tn={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},nn={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},rn={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},an={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},sn={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},on=(t,n)=>{const e=Number(t),r=e%100;if(r>20||r<10)switch(r%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},un={ordinalNumber:on,era:j({values:en,defaultWidth:"wide"}),quarter:j({values:tn,defaultWidth:"wide",argumentCallback:t=>t-1}),month:j({values:nn,defaultWidth:"wide"}),day:j({values:rn,defaultWidth:"wide"}),dayPeriod:j({values:an,defaultWidth:"wide",formattingValues:sn,defaultFormattingWidth:"wide"})};function B(t){return(n,e={})=>{const r=e.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],s=n.match(a);if(!s)return null;const o=s[0],i=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],d=Array.isArray(i)?dn(i,M=>M.test(o)):cn(i,M=>M.test(o));let l;l=t.valueCallback?t.valueCallback(d):d,l=e.valueCallback?e.valueCallback(l):l;const g=n.slice(o.length);return{value:l,rest:g}}}function cn(t,n){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&n(t[e]))return e}function dn(t,n){for(let e=0;e<t.length;e++)if(n(t[e]))return e}function ln(t){return(n,e={})=>{const r=n.match(t.matchPattern);if(!r)return null;const a=r[0],s=n.match(t.parsePattern);if(!s)return null;let o=t.valueCallback?t.valueCallback(s[0]):s[0];o=e.valueCallback?e.valueCallback(o):o;const i=n.slice(a.length);return{value:o,rest:i}}}const fn=/^(\d+)(th|st|nd|rd)?/i,hn=/\d+/i,mn={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},wn={any:[/^b/i,/^(a|c)/i]},gn={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},yn={any:[/1/i,/2/i,/3/i,/4/i]},bn={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Mn={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Dn={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},xn={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Pn={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Tn={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},pn={ordinalNumber:ln({matchPattern:fn,parsePattern:hn,valueCallback:t=>parseInt(t,10)}),era:B({matchPatterns:mn,defaultMatchWidth:"wide",parsePatterns:wn,defaultParseWidth:"any"}),quarter:B({matchPatterns:gn,defaultMatchWidth:"wide",parsePatterns:yn,defaultParseWidth:"any",valueCallback:t=>t+1}),month:B({matchPatterns:bn,defaultMatchWidth:"wide",parsePatterns:Mn,defaultParseWidth:"any"}),day:B({matchPatterns:Dn,defaultMatchWidth:"wide",parsePatterns:xn,defaultParseWidth:"any"}),dayPeriod:B({matchPatterns:Pn,defaultMatchWidth:"any",parsePatterns:Tn,defaultParseWidth:"any"})},We={code:"en-US",formatDistance:Gt,formatLong:Jt,formatRelative:Kt,localize:un,match:pn,options:{weekStartsOn:0,firstWeekContainsDate:1}};function kn(t){const n=c(t);return Ne(n,Bt(n))+1}function Fe(t){const n=c(t),e=+Q(n)-+Qt(n);return Math.round(e/ve)+1}function le(t,n){var g,M,y,D;const e=c(t),r=e.getFullYear(),a=q(),s=(n==null?void 0:n.firstWeekContainsDate)??((M=(g=n==null?void 0:n.locale)==null?void 0:g.options)==null?void 0:M.firstWeekContainsDate)??a.firstWeekContainsDate??((D=(y=a.locale)==null?void 0:y.options)==null?void 0:D.firstWeekContainsDate)??1,o=w(t,0);o.setFullYear(r+1,0,s),o.setHours(0,0,0,0);const i=H(o,n),d=w(t,0);d.setFullYear(r,0,s),d.setHours(0,0,0,0);const l=H(d,n);return e.getTime()>=i.getTime()?r+1:e.getTime()>=l.getTime()?r:r-1}function On(t,n){var i,d,l,g;const e=q(),r=(n==null?void 0:n.firstWeekContainsDate)??((d=(i=n==null?void 0:n.locale)==null?void 0:i.options)==null?void 0:d.firstWeekContainsDate)??e.firstWeekContainsDate??((g=(l=e.locale)==null?void 0:l.options)==null?void 0:g.firstWeekContainsDate)??1,a=le(t,n),s=w(t,0);return s.setFullYear(a,0,r),s.setHours(0,0,0,0),H(s,n)}function Ee(t,n){const e=c(t),r=+H(e,n)-+On(e,n);return Math.round(r/ve)+1}function m(t,n){const e=t<0?"-":"",r=Math.abs(t).toString().padStart(n,"0");return e+r}const F={y(t,n){const e=t.getFullYear(),r=e>0?e:1-e;return m(n==="yy"?r%100:r,n.length)},M(t,n){const e=t.getMonth();return n==="M"?String(e+1):m(e+1,2)},d(t,n){return m(t.getDate(),n.length)},a(t,n){const e=t.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(t,n){return m(t.getHours()%12||12,n.length)},H(t,n){return m(t.getHours(),n.length)},m(t,n){return m(t.getMinutes(),n.length)},s(t,n){return m(t.getSeconds(),n.length)},S(t,n){const e=n.length,r=t.getMilliseconds(),a=Math.trunc(r*Math.pow(10,e-3));return m(a,n.length)}},L={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},pe={G:function(t,n,e){const r=t.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"});case"GGGGG":return e.era(r,{width:"narrow"});case"GGGG":default:return e.era(r,{width:"wide"})}},y:function(t,n,e){if(n==="yo"){const r=t.getFullYear(),a=r>0?r:1-r;return e.ordinalNumber(a,{unit:"year"})}return F.y(t,n)},Y:function(t,n,e,r){const a=le(t,r),s=a>0?a:1-a;if(n==="YY"){const o=s%100;return m(o,2)}return n==="Yo"?e.ordinalNumber(s,{unit:"year"}):m(s,n.length)},R:function(t,n){const e=_e(t);return m(e,n.length)},u:function(t,n){const e=t.getFullYear();return m(e,n.length)},Q:function(t,n,e){const r=Math.ceil((t.getMonth()+1)/3);switch(n){case"Q":return String(r);case"QQ":return m(r,2);case"Qo":return e.ordinalNumber(r,{unit:"quarter"});case"QQQ":return e.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,n,e){const r=Math.ceil((t.getMonth()+1)/3);switch(n){case"q":return String(r);case"qq":return m(r,2);case"qo":return e.ordinalNumber(r,{unit:"quarter"});case"qqq":return e.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,n,e){const r=t.getMonth();switch(n){case"M":case"MM":return F.M(t,n);case"Mo":return e.ordinalNumber(r+1,{unit:"month"});case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(r,{width:"wide",context:"formatting"})}},L:function(t,n,e){const r=t.getMonth();switch(n){case"L":return String(r+1);case"LL":return m(r+1,2);case"Lo":return e.ordinalNumber(r+1,{unit:"month"});case"LLL":return e.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(r,{width:"wide",context:"standalone"})}},w:function(t,n,e,r){const a=Ee(t,r);return n==="wo"?e.ordinalNumber(a,{unit:"week"}):m(a,n.length)},I:function(t,n,e){const r=Fe(t);return n==="Io"?e.ordinalNumber(r,{unit:"week"}):m(r,n.length)},d:function(t,n,e){return n==="do"?e.ordinalNumber(t.getDate(),{unit:"date"}):F.d(t,n)},D:function(t,n,e){const r=kn(t);return n==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):m(r,n.length)},E:function(t,n,e){const r=t.getDay();switch(n){case"E":case"EE":case"EEE":return e.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(r,{width:"short",context:"formatting"});case"EEEE":default:return e.day(r,{width:"wide",context:"formatting"})}},e:function(t,n,e,r){const a=t.getDay(),s=(a-r.weekStartsOn+8)%7||7;switch(n){case"e":return String(s);case"ee":return m(s,2);case"eo":return e.ordinalNumber(s,{unit:"day"});case"eee":return e.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(a,{width:"short",context:"formatting"});case"eeee":default:return e.day(a,{width:"wide",context:"formatting"})}},c:function(t,n,e,r){const a=t.getDay(),s=(a-r.weekStartsOn+8)%7||7;switch(n){case"c":return String(s);case"cc":return m(s,n.length);case"co":return e.ordinalNumber(s,{unit:"day"});case"ccc":return e.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(a,{width:"narrow",context:"standalone"});case"cccccc":return e.day(a,{width:"short",context:"standalone"});case"cccc":default:return e.day(a,{width:"wide",context:"standalone"})}},i:function(t,n,e){const r=t.getDay(),a=r===0?7:r;switch(n){case"i":return String(a);case"ii":return m(a,n.length);case"io":return e.ordinalNumber(a,{unit:"day"});case"iii":return e.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(r,{width:"short",context:"formatting"});case"iiii":default:return e.day(r,{width:"wide",context:"formatting"})}},a:function(t,n,e){const a=t.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,n,e){const r=t.getHours();let a;switch(r===12?a=L.noon:r===0?a=L.midnight:a=r/12>=1?"pm":"am",n){case"b":case"bb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,n,e){const r=t.getHours();let a;switch(r>=17?a=L.evening:r>=12?a=L.afternoon:r>=4?a=L.morning:a=L.night,n){case"B":case"BB":case"BBB":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,n,e){if(n==="ho"){let r=t.getHours()%12;return r===0&&(r=12),e.ordinalNumber(r,{unit:"hour"})}return F.h(t,n)},H:function(t,n,e){return n==="Ho"?e.ordinalNumber(t.getHours(),{unit:"hour"}):F.H(t,n)},K:function(t,n,e){const r=t.getHours()%12;return n==="Ko"?e.ordinalNumber(r,{unit:"hour"}):m(r,n.length)},k:function(t,n,e){let r=t.getHours();return r===0&&(r=24),n==="ko"?e.ordinalNumber(r,{unit:"hour"}):m(r,n.length)},m:function(t,n,e){return n==="mo"?e.ordinalNumber(t.getMinutes(),{unit:"minute"}):F.m(t,n)},s:function(t,n,e){return n==="so"?e.ordinalNumber(t.getSeconds(),{unit:"second"}):F.s(t,n)},S:function(t,n){return F.S(t,n)},X:function(t,n,e){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(n){case"X":return Oe(r);case"XXXX":case"XX":return C(r);case"XXXXX":case"XXX":default:return C(r,":")}},x:function(t,n,e){const r=t.getTimezoneOffset();switch(n){case"x":return Oe(r);case"xxxx":case"xx":return C(r);case"xxxxx":case"xxx":default:return C(r,":")}},O:function(t,n,e){const r=t.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+ke(r,":");case"OOOO":default:return"GMT"+C(r,":")}},z:function(t,n,e){const r=t.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+ke(r,":");case"zzzz":default:return"GMT"+C(r,":")}},t:function(t,n,e){const r=Math.trunc(t.getTime()/1e3);return m(r,n.length)},T:function(t,n,e){const r=t.getTime();return m(r,n.length)}};function ke(t,n=""){const e=t>0?"-":"+",r=Math.abs(t),a=Math.trunc(r/60),s=r%60;return s===0?e+String(a):e+String(a)+n+m(s,2)}function Oe(t,n){return t%60===0?(t>0?"-":"+")+m(Math.abs(t)/60,2):C(t,n)}function C(t,n=""){const e=t>0?"-":"+",r=Math.abs(t),a=m(Math.trunc(r/60),2),s=m(r%60,2);return e+a+n+s}const Ye=(t,n)=>{switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},He=(t,n)=>{switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},Yn=(t,n)=>{const e=t.match(/(P+)(p+)?/)||[],r=e[1],a=e[2];if(!a)return Ye(t,n);let s;switch(r){case"P":s=n.dateTime({width:"short"});break;case"PP":s=n.dateTime({width:"medium"});break;case"PPP":s=n.dateTime({width:"long"});break;case"PPPP":default:s=n.dateTime({width:"full"});break}return s.replace("{{date}}",Ye(r,n)).replace("{{time}}",He(a,n))},se={p:He,P:Yn},vn=/^D+$/,_n=/^Y+$/,Nn=["D","DD","YY","YYYY"];function Ce(t){return vn.test(t)}function qe(t){return _n.test(t)}function oe(t,n,e){const r=Wn(t,n,e);if(Nn.includes(t))throw new RangeError(r)}function Wn(t,n,e){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${n}\`) for formatting ${r} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Fn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,En=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Hn=/^'([^]*?)'?$/,Cn=/''/g,qn=/[a-zA-Z]/;function ha(t,n,e){var g,M,y,D,k,W,$,R;const r=q(),a=(e==null?void 0:e.locale)??r.locale??We,s=(e==null?void 0:e.firstWeekContainsDate)??((M=(g=e==null?void 0:e.locale)==null?void 0:g.options)==null?void 0:M.firstWeekContainsDate)??r.firstWeekContainsDate??((D=(y=r.locale)==null?void 0:y.options)==null?void 0:D.firstWeekContainsDate)??1,o=(e==null?void 0:e.weekStartsOn)??((W=(k=e==null?void 0:e.locale)==null?void 0:k.options)==null?void 0:W.weekStartsOn)??r.weekStartsOn??((R=($=r.locale)==null?void 0:$.options)==null?void 0:R.weekStartsOn)??0,i=c(t);if(!jt(i))throw new RangeError("Invalid time value");let d=n.match(En).map(Y=>{const O=Y[0];if(O==="p"||O==="P"){const I=se[O];return I(Y,a.formatLong)}return Y}).join("").match(Fn).map(Y=>{if(Y==="''")return{isToken:!1,value:"'"};const O=Y[0];if(O==="'")return{isToken:!1,value:In(Y)};if(pe[O])return{isToken:!0,value:Y};if(O.match(qn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+O+"`");return{isToken:!1,value:Y}});a.localize.preprocessor&&(d=a.localize.preprocessor(i,d));const l={firstWeekContainsDate:s,weekStartsOn:o,locale:a};return d.map(Y=>{if(!Y.isToken)return Y.value;const O=Y.value;(!(e!=null&&e.useAdditionalWeekYearTokens)&&qe(O)||!(e!=null&&e.useAdditionalDayOfYearTokens)&&Ce(O))&&oe(O,n,String(t));const I=pe[O[0]];return I(i,O,a.localize,l)}).join("")}function In(t){const n=t.match(Hn);return n?n[1].replace(Cn,"'"):t}function ma(t){return c(t).getDate()}function wa(t){return c(t).getDay()}function Ln(t){const n=c(t),e=n.getFullYear(),r=n.getMonth(),a=w(t,0);return a.setFullYear(e,r+1,0),a.setHours(0,0,0,0),a.getDate()}function Qn(){return Object.assign({},q())}function ga(t){return c(t).getHours()}function $n(t){let e=c(t).getDay();return e===0&&(e=7),e}function ya(t){return c(t).getMinutes()}function ba(t){return c(t).getMonth()}function Ma(t){return c(t).getSeconds()}function Da(t){return c(t).getTime()}function xa(t){return c(t).getFullYear()}function Pa(t,n){const e=c(t),r=c(n);return e.getTime()>r.getTime()}function Ta(t,n){const e=c(t),r=c(n);return+e<+r}function pa(t,n){const e=c(t),r=c(n);return+e==+r}function Rn(t,n){const e=n instanceof Date?w(n,0):new n(0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),e}const Xn=10;class Ie{constructor(){u(this,"subPriority",0)}validate(n,e){return!0}}class An extends Ie{constructor(n,e,r,a,s){super(),this.value=n,this.validateValue=e,this.setValue=r,this.priority=a,s&&(this.subPriority=s)}validate(n,e){return this.validateValue(n,this.value,e)}set(n,e,r){return this.setValue(n,e,this.value,r)}}class jn extends Ie{constructor(){super(...arguments);u(this,"priority",Xn);u(this,"subPriority",-1)}set(e,r){return r.timestampIsSet?e:w(e,Rn(e,Date))}}class h{run(n,e,r,a){const s=this.parse(n,e,r,a);return s?{setter:new An(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(n,e,r){return!0}}class Bn extends h{constructor(){super(...arguments);u(this,"priority",140);u(this,"incompatibleTokens",["R","u","t","T"])}parse(e,r,a){switch(r){case"G":case"GG":case"GGG":return a.era(e,{width:"abbreviated"})||a.era(e,{width:"narrow"});case"GGGGG":return a.era(e,{width:"narrow"});case"GGGG":default:return a.era(e,{width:"wide"})||a.era(e,{width:"abbreviated"})||a.era(e,{width:"narrow"})}}set(e,r,a){return r.era=a,e.setFullYear(a,0,1),e.setHours(0,0,0,0),e}}const T={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},_={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function p(t,n){return t&&{value:n(t.value),rest:t.rest}}function b(t,n){const e=n.match(t);return e?{value:parseInt(e[0],10),rest:n.slice(e[0].length)}:null}function N(t,n){const e=n.match(t);if(!e)return null;if(e[0]==="Z")return{value:0,rest:n.slice(1)};const r=e[1]==="+"?1:-1,a=e[2]?parseInt(e[2],10):0,s=e[3]?parseInt(e[3],10):0,o=e[5]?parseInt(e[5],10):0;return{value:r*(a*ee+s*K+o*It),rest:n.slice(e[0].length)}}function Le(t){return b(T.anyDigitsSigned,t)}function P(t,n){switch(t){case 1:return b(T.singleDigit,n);case 2:return b(T.twoDigits,n);case 3:return b(T.threeDigits,n);case 4:return b(T.fourDigits,n);default:return b(new RegExp("^\\d{1,"+t+"}"),n)}}function J(t,n){switch(t){case 1:return b(T.singleDigitSigned,n);case 2:return b(T.twoDigitsSigned,n);case 3:return b(T.threeDigitsSigned,n);case 4:return b(T.fourDigitsSigned,n);default:return b(new RegExp("^-?\\d{1,"+t+"}"),n)}}function fe(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Qe(t,n){const e=n>0,r=e?n:1-n;let a;if(r<=50)a=t||100;else{const s=r+50,o=Math.trunc(s/100)*100,i=t>=s%100;a=t+o-(i?100:0)}return e?a:1-a}function $e(t){return t%400===0||t%4===0&&t%100!==0}class Sn extends h{constructor(){super(...arguments);u(this,"priority",130);u(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(e,r,a){const s=o=>({year:o,isTwoDigitYear:r==="yy"});switch(r){case"y":return p(P(4,e),s);case"yo":return p(a.ordinalNumber(e,{unit:"year"}),s);default:return p(P(r.length,e),s)}}validate(e,r){return r.isTwoDigitYear||r.year>0}set(e,r,a){const s=e.getFullYear();if(a.isTwoDigitYear){const i=Qe(a.year,s);return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}const o=!("era"in r)||r.era===1?a.year:1-a.year;return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}}class Gn extends h{constructor(){super(...arguments);u(this,"priority",130);u(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(e,r,a){const s=o=>({year:o,isTwoDigitYear:r==="YY"});switch(r){case"Y":return p(P(4,e),s);case"Yo":return p(a.ordinalNumber(e,{unit:"year"}),s);default:return p(P(r.length,e),s)}}validate(e,r){return r.isTwoDigitYear||r.year>0}set(e,r,a,s){const o=le(e,s);if(a.isTwoDigitYear){const d=Qe(a.year,o);return e.setFullYear(d,0,s.firstWeekContainsDate),e.setHours(0,0,0,0),H(e,s)}const i=!("era"in r)||r.era===1?a.year:1-a.year;return e.setFullYear(i,0,s.firstWeekContainsDate),e.setHours(0,0,0,0),H(e,s)}}class Vn extends h{constructor(){super(...arguments);u(this,"priority",130);u(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(e,r){return J(r==="R"?4:r.length,e)}set(e,r,a){const s=w(e,0);return s.setFullYear(a,0,4),s.setHours(0,0,0,0),Q(s)}}class zn extends h{constructor(){super(...arguments);u(this,"priority",130);u(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(e,r){return J(r==="u"?4:r.length,e)}set(e,r,a){return e.setFullYear(a,0,1),e.setHours(0,0,0,0),e}}class Un extends h{constructor(){super(...arguments);u(this,"priority",120);u(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,r,a){switch(r){case"Q":case"QQ":return P(r.length,e);case"Qo":return a.ordinalNumber(e,{unit:"quarter"});case"QQQ":return a.quarter(e,{width:"abbreviated",context:"formatting"})||a.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return a.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(e,{width:"wide",context:"formatting"})||a.quarter(e,{width:"abbreviated",context:"formatting"})||a.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=1&&r<=4}set(e,r,a){return e.setMonth((a-1)*3,1),e.setHours(0,0,0,0),e}}class Jn extends h{constructor(){super(...arguments);u(this,"priority",120);u(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,r,a){switch(r){case"q":case"qq":return P(r.length,e);case"qo":return a.ordinalNumber(e,{unit:"quarter"});case"qqq":return a.quarter(e,{width:"abbreviated",context:"standalone"})||a.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return a.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(e,{width:"wide",context:"standalone"})||a.quarter(e,{width:"abbreviated",context:"standalone"})||a.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,r){return r>=1&&r<=4}set(e,r,a){return e.setMonth((a-1)*3,1),e.setHours(0,0,0,0),e}}class Zn extends h{constructor(){super(...arguments);u(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);u(this,"priority",110)}parse(e,r,a){const s=o=>o-1;switch(r){case"M":return p(b(T.month,e),s);case"MM":return p(P(2,e),s);case"Mo":return p(a.ordinalNumber(e,{unit:"month"}),s);case"MMM":return a.month(e,{width:"abbreviated",context:"formatting"})||a.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return a.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(e,{width:"wide",context:"formatting"})||a.month(e,{width:"abbreviated",context:"formatting"})||a.month(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=0&&r<=11}set(e,r,a){return e.setMonth(a,1),e.setHours(0,0,0,0),e}}class Kn extends h{constructor(){super(...arguments);u(this,"priority",110);u(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(e,r,a){const s=o=>o-1;switch(r){case"L":return p(b(T.month,e),s);case"LL":return p(P(2,e),s);case"Lo":return p(a.ordinalNumber(e,{unit:"month"}),s);case"LLL":return a.month(e,{width:"abbreviated",context:"standalone"})||a.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return a.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(e,{width:"wide",context:"standalone"})||a.month(e,{width:"abbreviated",context:"standalone"})||a.month(e,{width:"narrow",context:"standalone"})}}validate(e,r){return r>=0&&r<=11}set(e,r,a){return e.setMonth(a,1),e.setHours(0,0,0,0),e}}function er(t,n,e){const r=c(t),a=Ee(r,e)-n;return r.setDate(r.getDate()-a*7),r}class tr extends h{constructor(){super(...arguments);u(this,"priority",100);u(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(e,r,a){switch(r){case"w":return b(T.week,e);case"wo":return a.ordinalNumber(e,{unit:"week"});default:return P(r.length,e)}}validate(e,r){return r>=1&&r<=53}set(e,r,a,s){return H(er(e,a,s),s)}}function nr(t,n){const e=c(t),r=Fe(e)-n;return e.setDate(e.getDate()-r*7),e}class rr extends h{constructor(){super(...arguments);u(this,"priority",100);u(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(e,r,a){switch(r){case"I":return b(T.week,e);case"Io":return a.ordinalNumber(e,{unit:"week"});default:return P(r.length,e)}}validate(e,r){return r>=1&&r<=53}set(e,r,a){return Q(nr(e,a))}}const ar=[31,28,31,30,31,30,31,31,30,31,30,31],sr=[31,29,31,30,31,30,31,31,30,31,30,31];class or extends h{constructor(){super(...arguments);u(this,"priority",90);u(this,"subPriority",1);u(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(e,r,a){switch(r){case"d":return b(T.date,e);case"do":return a.ordinalNumber(e,{unit:"date"});default:return P(r.length,e)}}validate(e,r){const a=e.getFullYear(),s=$e(a),o=e.getMonth();return s?r>=1&&r<=sr[o]:r>=1&&r<=ar[o]}set(e,r,a){return e.setDate(a),e.setHours(0,0,0,0),e}}class ir extends h{constructor(){super(...arguments);u(this,"priority",90);u(this,"subpriority",1);u(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(e,r,a){switch(r){case"D":case"DD":return b(T.dayOfYear,e);case"Do":return a.ordinalNumber(e,{unit:"date"});default:return P(r.length,e)}}validate(e,r){const a=e.getFullYear();return $e(a)?r>=1&&r<=366:r>=1&&r<=365}set(e,r,a){return e.setMonth(0,a),e.setHours(0,0,0,0),e}}function he(t,n,e){var M,y,D,k;const r=q(),a=(e==null?void 0:e.weekStartsOn)??((y=(M=e==null?void 0:e.locale)==null?void 0:M.options)==null?void 0:y.weekStartsOn)??r.weekStartsOn??((k=(D=r.locale)==null?void 0:D.options)==null?void 0:k.weekStartsOn)??0,s=c(t),o=s.getDay(),d=(n%7+7)%7,l=7-a,g=n<0||n>6?n-(o+l)%7:(d+l)%7-(o+l)%7;return Z(s,g)}class ur extends h{constructor(){super(...arguments);u(this,"priority",90);u(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(e,r,a){switch(r){case"E":case"EE":case"EEE":return a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return a.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return a.day(e,{width:"wide",context:"formatting"})||a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=0&&r<=6}set(e,r,a,s){return e=he(e,a,s),e.setHours(0,0,0,0),e}}class cr extends h{constructor(){super(...arguments);u(this,"priority",90);u(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(e,r,a,s){const o=i=>{const d=Math.floor((i-1)/7)*7;return(i+s.weekStartsOn+6)%7+d};switch(r){case"e":case"ee":return p(P(r.length,e),o);case"eo":return p(a.ordinalNumber(e,{unit:"day"}),o);case"eee":return a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"});case"eeeee":return a.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return a.day(e,{width:"wide",context:"formatting"})||a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=0&&r<=6}set(e,r,a,s){return e=he(e,a,s),e.setHours(0,0,0,0),e}}class dr extends h{constructor(){super(...arguments);u(this,"priority",90);u(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(e,r,a,s){const o=i=>{const d=Math.floor((i-1)/7)*7;return(i+s.weekStartsOn+6)%7+d};switch(r){case"c":case"cc":return p(P(r.length,e),o);case"co":return p(a.ordinalNumber(e,{unit:"day"}),o);case"ccc":return a.day(e,{width:"abbreviated",context:"standalone"})||a.day(e,{width:"short",context:"standalone"})||a.day(e,{width:"narrow",context:"standalone"});case"ccccc":return a.day(e,{width:"narrow",context:"standalone"});case"cccccc":return a.day(e,{width:"short",context:"standalone"})||a.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return a.day(e,{width:"wide",context:"standalone"})||a.day(e,{width:"abbreviated",context:"standalone"})||a.day(e,{width:"short",context:"standalone"})||a.day(e,{width:"narrow",context:"standalone"})}}validate(e,r){return r>=0&&r<=6}set(e,r,a,s){return e=he(e,a,s),e.setHours(0,0,0,0),e}}function lr(t,n){const e=c(t),r=$n(e),a=n-r;return Z(e,a)}class fr extends h{constructor(){super(...arguments);u(this,"priority",90);u(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(e,r,a){const s=o=>o===0?7:o;switch(r){case"i":case"ii":return P(r.length,e);case"io":return a.ordinalNumber(e,{unit:"day"});case"iii":return p(a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"}),s);case"iiiii":return p(a.day(e,{width:"narrow",context:"formatting"}),s);case"iiiiii":return p(a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"}),s);case"iiii":default:return p(a.day(e,{width:"wide",context:"formatting"})||a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"}),s)}}validate(e,r){return r>=1&&r<=7}set(e,r,a){return e=lr(e,a),e.setHours(0,0,0,0),e}}class hr extends h{constructor(){super(...arguments);u(this,"priority",80);u(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(e,r,a){switch(r){case"a":case"aa":case"aaa":return a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return a.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(e,{width:"wide",context:"formatting"})||a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,r,a){return e.setHours(fe(a),0,0,0),e}}class mr extends h{constructor(){super(...arguments);u(this,"priority",80);u(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(e,r,a){switch(r){case"b":case"bb":case"bbb":return a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return a.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(e,{width:"wide",context:"formatting"})||a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,r,a){return e.setHours(fe(a),0,0,0),e}}class wr extends h{constructor(){super(...arguments);u(this,"priority",80);u(this,"incompatibleTokens",["a","b","t","T"])}parse(e,r,a){switch(r){case"B":case"BB":case"BBB":return a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return a.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(e,{width:"wide",context:"formatting"})||a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,r,a){return e.setHours(fe(a),0,0,0),e}}class gr extends h{constructor(){super(...arguments);u(this,"priority",70);u(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,r,a){switch(r){case"h":return b(T.hour12h,e);case"ho":return a.ordinalNumber(e,{unit:"hour"});default:return P(r.length,e)}}validate(e,r){return r>=1&&r<=12}set(e,r,a){const s=e.getHours()>=12;return s&&a<12?e.setHours(a+12,0,0,0):!s&&a===12?e.setHours(0,0,0,0):e.setHours(a,0,0,0),e}}class yr extends h{constructor(){super(...arguments);u(this,"priority",70);u(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(e,r,a){switch(r){case"H":return b(T.hour23h,e);case"Ho":return a.ordinalNumber(e,{unit:"hour"});default:return P(r.length,e)}}validate(e,r){return r>=0&&r<=23}set(e,r,a){return e.setHours(a,0,0,0),e}}class br extends h{constructor(){super(...arguments);u(this,"priority",70);u(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,r,a){switch(r){case"K":return b(T.hour11h,e);case"Ko":return a.ordinalNumber(e,{unit:"hour"});default:return P(r.length,e)}}validate(e,r){return r>=0&&r<=11}set(e,r,a){return e.getHours()>=12&&a<12?e.setHours(a+12,0,0,0):e.setHours(a,0,0,0),e}}class Mr extends h{constructor(){super(...arguments);u(this,"priority",70);u(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(e,r,a){switch(r){case"k":return b(T.hour24h,e);case"ko":return a.ordinalNumber(e,{unit:"hour"});default:return P(r.length,e)}}validate(e,r){return r>=1&&r<=24}set(e,r,a){const s=a<=24?a%24:a;return e.setHours(s,0,0,0),e}}class Dr extends h{constructor(){super(...arguments);u(this,"priority",60);u(this,"incompatibleTokens",["t","T"])}parse(e,r,a){switch(r){case"m":return b(T.minute,e);case"mo":return a.ordinalNumber(e,{unit:"minute"});default:return P(r.length,e)}}validate(e,r){return r>=0&&r<=59}set(e,r,a){return e.setMinutes(a,0,0),e}}class xr extends h{constructor(){super(...arguments);u(this,"priority",50);u(this,"incompatibleTokens",["t","T"])}parse(e,r,a){switch(r){case"s":return b(T.second,e);case"so":return a.ordinalNumber(e,{unit:"second"});default:return P(r.length,e)}}validate(e,r){return r>=0&&r<=59}set(e,r,a){return e.setSeconds(a,0),e}}class Pr extends h{constructor(){super(...arguments);u(this,"priority",30);u(this,"incompatibleTokens",["t","T"])}parse(e,r){const a=s=>Math.trunc(s*Math.pow(10,-r.length+3));return p(P(r.length,e),a)}set(e,r,a){return e.setMilliseconds(a),e}}class Tr extends h{constructor(){super(...arguments);u(this,"priority",10);u(this,"incompatibleTokens",["t","T","x"])}parse(e,r){switch(r){case"X":return N(_.basicOptionalMinutes,e);case"XX":return N(_.basic,e);case"XXXX":return N(_.basicOptionalSeconds,e);case"XXXXX":return N(_.extendedOptionalSeconds,e);case"XXX":default:return N(_.extended,e)}}set(e,r,a){return r.timestampIsSet?e:w(e,e.getTime()-U(e)-a)}}class pr extends h{constructor(){super(...arguments);u(this,"priority",10);u(this,"incompatibleTokens",["t","T","X"])}parse(e,r){switch(r){case"x":return N(_.basicOptionalMinutes,e);case"xx":return N(_.basic,e);case"xxxx":return N(_.basicOptionalSeconds,e);case"xxxxx":return N(_.extendedOptionalSeconds,e);case"xxx":default:return N(_.extended,e)}}set(e,r,a){return r.timestampIsSet?e:w(e,e.getTime()-U(e)-a)}}class kr extends h{constructor(){super(...arguments);u(this,"priority",40);u(this,"incompatibleTokens","*")}parse(e){return Le(e)}set(e,r,a){return[w(e,a*1e3),{timestampIsSet:!0}]}}class Or extends h{constructor(){super(...arguments);u(this,"priority",20);u(this,"incompatibleTokens","*")}parse(e){return Le(e)}set(e,r,a){return[w(e,a),{timestampIsSet:!0}]}}const Yr={G:new Bn,y:new Sn,Y:new Gn,R:new Vn,u:new zn,Q:new Un,q:new Jn,M:new Zn,L:new Kn,w:new tr,I:new rr,d:new or,D:new ir,E:new ur,e:new cr,c:new dr,i:new fr,a:new hr,b:new mr,B:new wr,h:new gr,H:new yr,K:new br,k:new Mr,m:new Dr,s:new xr,S:new Pr,X:new Tr,x:new pr,t:new kr,T:new Or},vr=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,_r=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Nr=/^'([^]*?)'?$/,Wr=/''/g,Fr=/\S/,Er=/[a-zA-Z]/;function ka(t,n,e,r){var W,$,R,Y,O,I,me,we;const a=Qn(),s=(r==null?void 0:r.locale)??a.locale??We,o=(r==null?void 0:r.firstWeekContainsDate)??(($=(W=r==null?void 0:r.locale)==null?void 0:W.options)==null?void 0:$.firstWeekContainsDate)??a.firstWeekContainsDate??((Y=(R=a.locale)==null?void 0:R.options)==null?void 0:Y.firstWeekContainsDate)??1,i=(r==null?void 0:r.weekStartsOn)??((I=(O=r==null?void 0:r.locale)==null?void 0:O.options)==null?void 0:I.weekStartsOn)??a.weekStartsOn??((we=(me=a.locale)==null?void 0:me.options)==null?void 0:we.weekStartsOn)??0;if(n==="")return t===""?c(e):w(e,NaN);const d={firstWeekContainsDate:o,weekStartsOn:i,locale:s},l=[new jn],g=n.match(_r).map(f=>{const x=f[0];if(x in se){const v=se[x];return v(f,s.formatLong)}return f}).join("").match(vr),M=[];for(let f of g){!(r!=null&&r.useAdditionalWeekYearTokens)&&qe(f)&&oe(f,n,t),!(r!=null&&r.useAdditionalDayOfYearTokens)&&Ce(f)&&oe(f,n,t);const x=f[0],v=Yr[x];if(v){const{incompatibleTokens:ge}=v;if(Array.isArray(ge)){const ye=M.find(be=>ge.includes(be.token)||be.token===x);if(ye)throw new RangeError(`The format string mustn't contain \`${ye.fullToken}\` and \`${f}\` at the same time`)}else if(v.incompatibleTokens==="*"&&M.length>0)throw new RangeError(`The format string mustn't contain \`${f}\` and any other token at the same time`);M.push({token:x,fullToken:f});const te=v.run(t,f,s.match,d);if(!te)return w(e,NaN);l.push(te.setter),t=te.rest}else{if(x.match(Er))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");if(f==="''"?f="'":x==="'"&&(f=Hr(f)),t.indexOf(f)===0)t=t.slice(f.length);else return w(e,NaN)}}if(t.length>0&&Fr.test(t))return w(e,NaN);const y=l.map(f=>f.priority).sort((f,x)=>x-f).filter((f,x,v)=>v.indexOf(f)===x).map(f=>l.filter(x=>x.priority===f).sort((x,v)=>v.subPriority-x.subPriority)).map(f=>f[0]);let D=c(e);if(isNaN(D.getTime()))return w(e,NaN);const k={};for(const f of y){if(!f.validate(D,d))return w(e,NaN);const x=f.set(D,k,d);Array.isArray(x)?(D=x[0],Object.assign(k,x[1])):D=x}return w(e,D)}function Hr(t){return t.match(Nr)[1].replace(Wr,"'")}function Oa(t,n){const e=c(t),r=c(n);return e.getFullYear()===r.getFullYear()&&e.getMonth()===r.getMonth()}function Ya(t,n){const e=Te(t),r=Te(n);return+e==+r}function va(t,n){const e=c(t),r=c(n);return e.getFullYear()===r.getFullYear()}function _a(t,n){const e=+c(t),[r,a]=[+c(n.start),+c(n.end)].sort((s,o)=>s-o);return e>=r&&e<=a}function Na(t,n){return Z(t,-1)}function Wa(t,n){const r=Lr(t);let a;if(r.date){const d=Qr(r.date,2);a=$r(d.restDateString,d.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);const s=a.getTime();let o=0,i;if(r.time&&(o=Rr(r.time),isNaN(o)))return new Date(NaN);if(r.timezone){if(i=Xr(r.timezone),isNaN(i))return new Date(NaN)}else{const d=new Date(s+o),l=new Date(0);return l.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),l.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),l}return new Date(s+o+i)}const G={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Cr=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,qr=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Ir=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Lr(t){const n={},e=t.split(G.dateTimeDelimiter);let r;if(e.length>2)return n;if(/:/.test(e[0])?r=e[0]:(n.date=e[0],r=e[1],G.timeZoneDelimiter.test(n.date)&&(n.date=t.split(G.timeZoneDelimiter)[0],r=t.substr(n.date.length,t.length))),r){const a=G.timezone.exec(r);a?(n.time=r.replace(a[1],""),n.timezone=a[1]):n.time=r}return n}function Qr(t,n){const e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+n)+"})|(\\d{2}|[+-]\\d{"+(2+n)+"})$)"),r=t.match(e);if(!r)return{year:NaN,restDateString:""};const a=r[1]?parseInt(r[1]):null,s=r[2]?parseInt(r[2]):null;return{year:s===null?a:s*100,restDateString:t.slice((r[1]||r[2]).length)}}function $r(t,n){if(n===null)return new Date(NaN);const e=t.match(Cr);if(!e)return new Date(NaN);const r=!!e[4],a=S(e[1]),s=S(e[2])-1,o=S(e[3]),i=S(e[4]),d=S(e[5])-1;if(r)return Gr(n,i,d)?Ar(n,i,d):new Date(NaN);{const l=new Date(0);return!Br(n,s,o)||!Sr(n,a)?new Date(NaN):(l.setUTCFullYear(n,s,Math.max(a,o)),l)}}function S(t){return t?parseInt(t):1}function Rr(t){const n=t.match(qr);if(!n)return NaN;const e=ae(n[1]),r=ae(n[2]),a=ae(n[3]);return Vr(e,r,a)?e*ee+r*K+a*1e3:NaN}function ae(t){return t&&parseFloat(t.replace(",","."))||0}function Xr(t){if(t==="Z")return 0;const n=t.match(Ir);if(!n)return 0;const e=n[1]==="+"?-1:1,r=parseInt(n[2]),a=n[3]&&parseInt(n[3])||0;return zr(r,a)?e*(r*ee+a*K):NaN}function Ar(t,n,e){const r=new Date(0);r.setUTCFullYear(t,0,4);const a=r.getUTCDay()||7,s=(n-1)*7+e+1-a;return r.setUTCDate(r.getUTCDate()+s),r}const jr=[31,null,31,30,31,30,31,31,30,31,30,31];function Re(t){return t%400===0||t%4===0&&t%100!==0}function Br(t,n,e){return n>=0&&n<=11&&e>=1&&e<=(jr[n]||(Re(t)?29:28))}function Sr(t,n){return n>=1&&n<=(Re(t)?366:365)}function Gr(t,n,e){return n>=1&&n<=53&&e>=0&&e<=6}function Vr(t,n,e){return t===24?n===0&&e===0:e>=0&&e<60&&n>=0&&n<60&&t>=0&&t<25}function zr(t,n){return n>=0&&n<=59}function Xe(t,n){const e=c(t),r=e.getFullYear(),a=e.getDate(),s=w(t,0);s.setFullYear(r,n,15),s.setHours(0,0,0,0);const o=Ln(s);return e.setMonth(n,Math.min(a,o)),e}function Fa(t,n){let e=c(t);return isNaN(+e)?w(t,NaN):(n.year!=null&&e.setFullYear(n.year),n.month!=null&&(e=Xe(e,n.month)),n.date!=null&&e.setDate(n.date),n.hours!=null&&e.setHours(n.hours),n.minutes!=null&&e.setMinutes(n.minutes),n.seconds!=null&&e.setSeconds(n.seconds),n.milliseconds!=null&&e.setMilliseconds(n.milliseconds),e)}function Ea(t,n){const e=c(t);return e.setHours(n),e}function Ha(t,n){const e=c(t);return e.setMinutes(n),e}function Ca(t,n){const e=c(t),r=Math.trunc(e.getMonth()/3)+1,a=n-r;return Xe(e,e.getMonth()+a*3)}function qa(t,n){const e=c(t);return e.setSeconds(n),e}function Ia(t,n){const e=c(t);return isNaN(+e)?w(t,NaN):(e.setFullYear(n),e)}function La(t,n){return ce(t,-n)}function Qa(t,n){return $t(t,-1)}function $a(t,n){return Rt(t,-1)}function Ra(t,n){return Xt(t,-n)}export{Ya as $,Ha as A,qa as B,ce as C,La as D,Ia as E,ia as F,Z as G,Xe as H,Ra as I,Xt as J,ha as K,va as L,Oa as M,Rt as N,$a as O,Na as P,H as Q,aa as R,Qa as S,sa as T,oa as U,$t as V,Da as W,Ca as X,xe as Y,Kr as Z,fa as _,Pa as a,Te as a0,Zr as a1,ea as a2,Fe as a3,wa as a4,ma as a5,se as a6,Jr as a7,At as b,ya as c,ga as d,xa as e,ba as f,Ma as g,pa as h,Ta as i,jt as j,Ne as k,ta as l,na as m,z as n,ua as o,Wa as p,ka as q,_a as r,Fa as s,c as t,ra as u,la as v,Bt as w,ca as x,da as y,Ea as z};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{r as g,j as I}from"./Dj2k1r16.js";const Vt=g.createContext({});function J(t){const e=g.useRef(null);return e.current===null&&(e.current=t()),e.current}const Zt=g.createContext(null),Jt=g.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class go extends g.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function yo({children:t,isPresent:e}){const n=g.useId(),s=g.useRef(null),i=g.useRef({width:0,height:0,top:0,left:0}),{nonce:r}=g.useContext(Jt);return g.useInsertionEffect(()=>{const{width:o,height:a,top:l,left:u}=i.current;if(e||!s.current||!o||!a)return;s.current.dataset.motionPopId=n;const c=document.createElement("style");return r&&(c.nonce=r),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`
|
|
2
|
+
[data-motion-pop-id="${n}"] {
|
|
3
|
+
position: absolute !important;
|
|
4
|
+
width: ${o}px !important;
|
|
5
|
+
height: ${a}px !important;
|
|
6
|
+
top: ${l}px !important;
|
|
7
|
+
left: ${u}px !important;
|
|
8
|
+
}
|
|
9
|
+
`),()=>{document.head.removeChild(c)}},[e]),I.jsx(go,{isPresent:e,childRef:s,sizeRef:i,children:g.cloneElement(t,{ref:s})})}const vo=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:r,mode:o})=>{const a=J(xo),l=g.useId(),u=g.useCallback(h=>{a.set(h,!0);for(const f of a.values())if(!f)return;s&&s()},[a,s]),c=g.useMemo(()=>({id:l,initial:e,isPresent:n,custom:i,onExitComplete:u,register:h=>(a.set(h,!1),()=>a.delete(h))}),r?[Math.random(),u]:[n,u]);return g.useMemo(()=>{a.forEach((h,f)=>a.set(f,!1))},[n]),g.useEffect(()=>{!n&&!a.size&&s&&s()},[n]),o==="popLayout"&&(t=I.jsx(yo,{isPresent:n,children:t})),I.jsx(Zt.Provider,{value:c,children:t})};function xo(){return new Map}function ks(t=!0){const e=g.useContext(Zt);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,r=g.useId();g.useEffect(()=>{t&&i(r)},[t]);const o=g.useCallback(()=>t&&s&&s(r),[r,s,t]);return!n&&s?[!1,o]:[!0]}const It=t=>t.key||"";function gn(t){const e=[];return g.Children.forEach(t,n=>{g.isValidElement(n)&&e.push(n)}),e}const Be=typeof window<"u",Qt=Be?g.useLayoutEffect:g.useEffect,ac=({children:t,custom:e,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:r="sync",propagate:o=!1})=>{const[a,l]=ks(o),u=g.useMemo(()=>gn(t),[t]),c=o&&!a?[]:u.map(It),h=g.useRef(!0),f=g.useRef(u),d=J(()=>new Map),[p,m]=g.useState(u),[y,v]=g.useState(u);Qt(()=>{h.current=!1,f.current=u;for(let b=0;b<y.length;b++){const x=It(y[b]);c.includes(x)?d.delete(x):d.get(x)!==!0&&d.set(x,!1)}},[y,c.length,c.join("-")]);const T=[];if(u!==p){let b=[...u];for(let x=0;x<y.length;x++){const w=y[x],M=It(w);c.includes(M)||(b.splice(x,0,w),T.push(w))}r==="wait"&&T.length&&(b=T),v(gn(b)),m(u);return}const{forceRender:P}=g.useContext(Vt);return I.jsx(I.Fragment,{children:y.map(b=>{const x=It(b),w=o&&!a?!1:u===y||c.includes(x),M=()=>{if(d.has(x))d.set(x,!0);else return;let A=!0;d.forEach(F=>{F||(A=!1)}),A&&(P==null||P(),v(f.current),o&&(l==null||l()),s&&s())};return I.jsx(vo,{isPresent:w,initial:!h.current||n?void 0:!1,custom:w?void 0:e,presenceAffectsLayout:i,mode:r,onExitComplete:w?void 0:M,children:b},x)})})},To=g.createContext(null);function Po(){const t=g.useRef(!1);return Qt(()=>(t.current=!0,()=>{t.current=!1}),[]),t}const j=t=>t;let Bs=j;function Ie(t){let e;return()=>(e===void 0&&(e=t()),e)}const ft=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},z=t=>t*1e3,H=t=>t/1e3,So={useManualTiming:!1};function Ao(t){let e=new Set,n=new Set,s=!1,i=!1;const r=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(u){r.has(u)&&(l.schedule(u),t()),u(o)}const l={schedule:(u,c=!1,h=!1)=>{const d=h&&s?e:n;return c&&r.add(u),d.has(u)||d.add(u),u},cancel:u=>{n.delete(u),r.delete(u)},process:u=>{if(o=u,s){i=!0;return}s=!0,[e,n]=[n,e],e.forEach(a),e.clear(),s=!1,i&&(i=!1,l.process(u))}};return l}const jt=["read","resolveKeyframes","update","preRender","render","postRender"],bo=40;function Is(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=jt.reduce((v,T)=>(v[T]=Ao(r),v),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:h,postRender:f}=o,d=()=>{const v=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(v-i.timestamp,bo),1),i.timestamp=v,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),f.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(d))},p=()=>{n=!0,s=!0,i.isProcessing||t(d)};return{schedule:jt.reduce((v,T)=>{const P=o[T];return v[T]=(b,x=!1,w=!1)=>(n||p(),P.schedule(b,x,w)),v},{}),cancel:v=>{for(let T=0;T<jt.length;T++)o[jt[T]].cancel(v)},state:i,steps:o}}const{schedule:C,cancel:X,state:E,steps:ae}=Is(typeof requestAnimationFrame<"u"?requestAnimationFrame:j,!0);function wo(){const t=Po(),[e,n]=g.useState(0),s=g.useCallback(()=>{t.current&&n(e+1)},[e]);return[g.useCallback(()=>C.postRender(s),[s]),e]}const Co=t=>!t.isLayoutDirty&&t.willUpdate(!1);function yn(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Co);return{add:s=>{t.add(s),e.set(s,s.addEventListener("willUpdate",n))},remove:s=>{t.delete(s);const i=e.get(s);i&&(i(),e.delete(s)),n()},dirty:n}}const js=t=>t===!0,Vo=t=>js(t===!0)||t==="id",lc=({children:t,id:e,inherit:n=!0})=>{const s=g.useContext(Vt),i=g.useContext(To),[r,o]=wo(),a=g.useRef(null),l=s.id||i;a.current===null&&(Vo(n)&&l&&(e=e?l+"-"+e:l),a.current={id:e,group:js(n)&&s.group||yn()});const u=g.useMemo(()=>({...a.current,forceRender:r}),[o]);return I.jsx(Vt.Provider,{value:u,children:t})},Os=g.createContext({strict:!1}),vn={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"]},dt={};for(const t in vn)dt[t]={isEnabled:e=>vn[t].some(n=>!!e[n])};function Do(t){for(const e in t)dt[e]={...dt[e],...t[e]}}const Mo=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Wt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Mo.has(t)}let Ns=t=>!Wt(t);function Ro(t){t&&(Ns=e=>e.startsWith("on")?!Wt(e):t(e))}try{Ro(require("@emotion/is-prop-valid").default)}catch{}function Eo(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(Ns(i)||n===!0&&Wt(i)||!e&&!Wt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function Lo(t){if(typeof Proxy>"u")return t;const e=new Map,n=(...s)=>t(...s);return new Proxy(n,{get:(s,i)=>i==="create"?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}const te=g.createContext({});function Dt(t){return typeof t=="string"||Array.isArray(t)}function ee(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const je=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Oe=["initial",...je];function ne(t){return ee(t.animate)||Oe.some(e=>Dt(t[e]))}function Us(t){return!!(ne(t)||t.variants)}function Fo(t,e){if(ne(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Dt(n)?n:void 0,animate:Dt(s)?s:void 0}}return t.inherit!==!1?e:{}}function ko(t){const{initial:e,animate:n}=Fo(t,g.useContext(te));return g.useMemo(()=>({initial:e,animate:n}),[xn(e),xn(n)])}function xn(t){return Array.isArray(t)?t.join(" "):t}const Bo=Symbol.for("motionComponentSymbol");function at(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Io(t,e,n){return g.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):at(n)&&(n.current=s))},[e])}const Ne=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),jo="framerAppearId",_s="data-"+Ne(jo),{schedule:Ue}=Is(queueMicrotask,!1),Ks=g.createContext({});function Oo(t,e,n,s,i){var r,o;const{visualElement:a}=g.useContext(te),l=g.useContext(Os),u=g.useContext(Zt),c=g.useContext(Jt).reducedMotion,h=g.useRef(null);s=s||l.renderer,!h.current&&s&&(h.current=s(t,{visualState:e,parent:a,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:c}));const f=h.current,d=g.useContext(Ks);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&No(h.current,n,i,d);const p=g.useRef(!1);g.useInsertionEffect(()=>{f&&p.current&&f.update(n,u)});const m=n[_s],y=g.useRef(!!m&&!(!((r=window.MotionHandoffIsComplete)===null||r===void 0)&&r.call(window,m))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,m)));return Qt(()=>{f&&(p.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Ue.render(f.render),y.current&&f.animationState&&f.animationState.animateChanges())}),g.useEffect(()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,m)}),y.current=!1))}),f}function No(t,e,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Ws(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&at(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,layoutScroll:l,layoutRoot:u})}function Ws(t){if(t)return t.options.allowProjection!==!1?t.projection:Ws(t.parent)}function Uo({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){var r,o;t&&Do(t);function a(u,c){let h;const f={...g.useContext(Jt),...u,layoutId:_o(u)},{isStatic:d}=f,p=ko(u),m=s(u,d);if(!d&&Be){Ko();const y=Wo(f);h=y.MeasureLayout,p.visualElement=Oo(i,m,f,e,y.ProjectionNode)}return I.jsxs(te.Provider,{value:p,children:[h&&p.visualElement?I.jsx(h,{visualElement:p.visualElement,...f}):null,n(i,u,Io(m,p.visualElement,c),m,d,p.visualElement)]})}a.displayName=`motion.${typeof i=="string"?i:`create(${(o=(r=i.displayName)!==null&&r!==void 0?r:i.name)!==null&&o!==void 0?o:""})`}`;const l=g.forwardRef(a);return l[Bo]=i,l}function _o({layoutId:t}){const e=g.useContext(Vt).id;return e&&t!==void 0?e+"-"+t:t}function Ko(t,e){g.useContext(Os).strict}function Wo(t){const{drag:e,layout:n}=dt;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}const Go=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function _e(t){return typeof t!="string"||t.includes("-")?!1:!!(Go.indexOf(t)>-1||/[A-Z]/u.test(t))}function Tn(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Ke(t,e,n,s){if(typeof e=="function"){const[i,r]=Tn(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]=Tn(s);e=e(n!==void 0?n:t.custom,i,r)}return e}const Te=t=>Array.isArray(t),$o=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),zo=t=>Te(t)?t[t.length-1]||0:t,L=t=>!!(t&&t.getVelocity);function Ut(t){const e=L(t)?t.get():t;return $o(e)?e.toValue():e}function Ho({scrapeMotionValuesFromProps:t,createRenderState:e,onUpdate:n},s,i,r){const o={latestValues:Xo(s,i,r,t),renderState:e()};return n&&(o.onMount=a=>n({props:s,current:a,...o}),o.onUpdate=a=>n(a)),o}const Gs=t=>(e,n)=>{const s=g.useContext(te),i=g.useContext(Zt),r=()=>Ho(t,e,s,i);return n?r():J(r)};function Xo(t,e,n,s){const i={},r=s(t,{});for(const f in r)i[f]=Ut(r[f]);let{initial:o,animate:a}=t;const l=ne(t),u=Us(t);e&&u&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const h=c?a:o;if(h&&typeof h!="boolean"&&!ee(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d<f.length;d++){const p=Ke(t,f[d]);if(p){const{transitionEnd:m,transition:y,...v}=p;for(const T in v){let P=v[T];if(Array.isArray(P)){const b=c?P.length-1:0;P=P[b]}P!==null&&(i[T]=P)}for(const T in m)i[T]=m[T]}}}return i}const gt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ot=new Set(gt),$s=t=>e=>typeof e=="string"&&e.startsWith(t),zs=$s("--"),Yo=$s("var(--"),We=t=>Yo(t)?qo.test(t.split("/*")[0].trim()):!1,qo=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Hs=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Y=(t,e,n)=>n>e?e:n<t?t:n,yt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Mt={...yt,transform:t=>Y(0,1,t)},Ot={...yt,default:1},Lt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),q=Lt("deg"),W=Lt("%"),S=Lt("px"),Zo=Lt("vh"),Jo=Lt("vw"),Pn={...W,parse:t=>W.parse(t)/100,transform:t=>W.transform(t*100)},Qo={borderWidth:S,borderTopWidth:S,borderRightWidth:S,borderBottomWidth:S,borderLeftWidth:S,borderRadius:S,radius:S,borderTopLeftRadius:S,borderTopRightRadius:S,borderBottomRightRadius:S,borderBottomLeftRadius:S,width:S,maxWidth:S,height:S,maxHeight:S,top:S,right:S,bottom:S,left:S,padding:S,paddingTop:S,paddingRight:S,paddingBottom:S,paddingLeft:S,margin:S,marginTop:S,marginRight:S,marginBottom:S,marginLeft:S,backgroundPositionX:S,backgroundPositionY:S},tr={rotate:q,rotateX:q,rotateY:q,rotateZ:q,scale:Ot,scaleX:Ot,scaleY:Ot,scaleZ:Ot,skew:q,skewX:q,skewY:q,distance:S,translateX:S,translateY:S,translateZ:S,x:S,y:S,z:S,perspective:S,transformPerspective:S,opacity:Mt,originX:Pn,originY:Pn,originZ:S},Sn={...yt,transform:Math.round},Ge={...Qo,...tr,zIndex:Sn,size:S,fillOpacity:Mt,strokeOpacity:Mt,numOctaves:Sn},er={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},nr=gt.length;function sr(t,e,n){let s="",i=!0;for(let r=0;r<nr;r++){const o=gt[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 u=Hs(a,Ge[o]);if(!l){i=!1;const c=er[o]||o;s+=`${c}(${u}) `}n&&(e[o]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function $e(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const l in e){const u=e[l];if(ot.has(l)){o=!0;continue}else if(zs(l)){i[l]=u;continue}else{const c=Hs(u,Ge[l]);l.startsWith("origin")?(a=!0,r[l]=c):s[l]=c}}if(e.transform||(o||n?s.transform=sr(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=r;s.transformOrigin=`${l} ${u} ${c}`}}const ir={offset:"stroke-dashoffset",array:"stroke-dasharray"},or={offset:"strokeDashoffset",array:"strokeDasharray"};function rr(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?ir:or;t[r.offset]=S.transform(-s);const o=S.transform(e),a=S.transform(n);t[r.array]=`${o} ${a}`}function An(t,e,n){return typeof t=="string"?t:S.transform(e+n*t)}function ar(t,e,n){const s=An(e,t.x,t.width),i=An(n,t.y,t.height);return`${s} ${i}`}function ze(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:r,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if($e(t,u,h),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:d,dimensions:p}=t;f.transform&&(p&&(d.transform=f.transform),delete f.transform),p&&(i!==void 0||r!==void 0||d.transform)&&(d.transformOrigin=ar(p,i!==void 0?i:.5,r!==void 0?r:.5)),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),o!==void 0&&rr(f,o,a,l,!1)}const He=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Xs=()=>({...He(),attrs:{}}),Xe=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Ys(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const r in n)t.style.setProperty(r,n[r])}const qs=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 Zs(t,e,n,s){Ys(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(qs.has(i)?i:Ne(i),e.attrs[i])}const Gt={};function lr(t){Object.assign(Gt,t)}function Js(t,{layout:e,layoutId:n}){return ot.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Gt[t]||t==="opacity")}function Ye(t,e,n){var s;const{style:i}=t,r={};for(const o in i)(L(i[o])||e.style&&L(e.style[o])||Js(o,t)||((s=n==null?void 0:n.getValue(o))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(r[o]=i[o]);return r}function Qs(t,e,n){const s=Ye(t,e,n);for(const i in t)if(L(t[i])||L(e[i])){const r=gt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}function ur(t,e){try{e.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{e.dimensions={x:0,y:0,width:0,height:0}}}const bn=["x","y","width","height","cx","cy","r"],cr={useVisualState:Gs({scrapeMotionValuesFromProps:Qs,createRenderState:Xs,onUpdate:({props:t,prevProps:e,current:n,renderState:s,latestValues:i})=>{if(!n)return;let r=!!t.drag;if(!r){for(const a in i)if(ot.has(a)){r=!0;break}}if(!r)return;let o=!e;if(e)for(let a=0;a<bn.length;a++){const l=bn[a];t[l]!==e[l]&&(o=!0)}o&&C.read(()=>{ur(n,s),C.render(()=>{ze(s,i,Xe(n.tagName),t.transformTemplate),Zs(n,s)})})}})},hr={useVisualState:Gs({scrapeMotionValuesFromProps:Ye,createRenderState:He})};function ti(t,e,n){for(const s in e)!L(e[s])&&!Js(s,n)&&(t[s]=e[s])}function fr({transformTemplate:t},e){return g.useMemo(()=>{const n=He();return $e(n,e,t),Object.assign({},n.vars,n.style)},[e])}function dr(t,e){const n=t.style||{},s={};return ti(s,n,t),Object.assign(s,fr(t,e)),s}function pr(t,e){const n={},s=dr(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}function mr(t,e,n,s){const i=g.useMemo(()=>{const r=Xs();return ze(r,e,Xe(s),t.transformTemplate),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};ti(r,t.style,t),i.style={...r,...i.style}}return i}function gr(t=!1){return(n,s,i,{latestValues:r},o)=>{const l=(_e(n)?mr:pr)(s,r,o,n),u=Eo(s,typeof n=="string",t),c=n!==g.Fragment?{...u,...l,ref:i}:{},{children:h}=s,f=g.useMemo(()=>L(h)?h.get():h,[h]);return g.createElement(n,{...c,children:f})}}function yr(t,e){return function(s,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={..._e(s)?cr:hr,preloadedFeatures:t,useRender:gr(i),createVisualElement:e,Component:s};return Uo(o)}}function ei(t,e){if(!Array.isArray(e))return!1;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 se(t,e,n){const s=t.getProps();return Ke(s,e,n!==void 0?n:s.custom,t)}const vr=Ie(()=>window.ScrollTimeline!==void 0);class xr{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>"finished"in e?e.finished:e))}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,n){const s=this.animations.map(i=>{if(vr()&&i.attachTimeline)return i.attachTimeline(e);if(typeof n=="function")return n(i)});return()=>{s.forEach((i,r)=>{i&&i(),this.animations[r].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 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]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Tr extends xr{then(e,n){return Promise.all(this.animations).then(e).catch(n)}}function qe(t,e){return t?t[e]||t.default||t:void 0}const Pe=2e4;function ni(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Pe;)e+=n,s=t.next(e);return e>=Pe?1/0:e}function Ze(t){return typeof t=="function"}function wn(t,e){t.timeline=e,t.onfinish=null}const Je=t=>Array.isArray(t)&&typeof t[0]=="number",Pr={linearEasing:void 0};function Sr(t,e){const n=Ie(t);return()=>{var s;return(s=Pr[e])!==null&&s!==void 0?s:n()}}const $t=Sr(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),si=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=t(ft(0,i-1,r))+", ";return`linear(${s.substring(0,s.length-2)})`};function ii(t){return!!(typeof t=="function"&&$t()||!t||typeof t=="string"&&(t in Se||$t())||Je(t)||Array.isArray(t)&&t.every(ii))}const xt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Se={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:xt([0,.65,.55,1]),circOut:xt([.55,0,1,.45]),backIn:xt([.31,.01,.66,-.59]),backOut:xt([.33,1.53,.69,.99])};function oi(t,e){if(t)return typeof t=="function"&&$t()?si(t,e):Je(t)?xt(t):Array.isArray(t)?t.map(n=>oi(n,e)||Se.easeOut):Se[t]}const K={x:!1,y:!1};function ri(){return K.x||K.y}function Ar(t,e,n){var s;if(t instanceof Element)return[t];if(typeof t=="string"){let i=document;const r=(s=void 0)!==null&&s!==void 0?s:i.querySelectorAll(t);return r?Array.from(r):[]}return Array.from(t)}function ai(t,e){const n=Ar(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Cn(t){return e=>{e.pointerType==="touch"||ri()||t(e)}}function br(t,e,n={}){const[s,i,r]=ai(t,n),o=Cn(a=>{const{target:l}=a,u=e(a);if(typeof u!="function"||!l)return;const c=Cn(h=>{u(h),l.removeEventListener("pointerleave",c)});l.addEventListener("pointerleave",c,i)});return s.forEach(a=>{a.addEventListener("pointerenter",o,i)}),r}const li=(t,e)=>e?t===e?!0:li(t,e.parentElement):!1,Qe=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,wr=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Cr(t){return wr.has(t.tagName)||t.tabIndex!==-1}const Tt=new WeakSet;function Vn(t){return e=>{e.key==="Enter"&&t(e)}}function le(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Vr=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Vn(()=>{if(Tt.has(n))return;le(n,"down");const i=Vn(()=>{le(n,"up")}),r=()=>le(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 Dn(t){return Qe(t)&&!ri()}function Dr(t,e,n={}){const[s,i,r]=ai(t,n),o=a=>{const l=a.currentTarget;if(!Dn(a)||Tt.has(l))return;Tt.add(l);const u=e(a),c=(d,p)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),!(!Dn(d)||!Tt.has(l))&&(Tt.delete(l),typeof u=="function"&&u(d,{success:p}))},h=d=>{c(d,n.useGlobalTarget||li(l,d.target))},f=d=>{c(d,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{!Cr(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0),(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),a.addEventListener("focus",u=>Vr(u,i),i)}),r}function Mr(t){return t==="x"||t==="y"?K[t]?null:(K[t]=!0,()=>{K[t]=!1}):K.x||K.y?null:(K.x=K.y=!0,()=>{K.x=K.y=!1})}const ui=new Set(["width","height","top","left","right","bottom",...gt]);let _t;function Rr(){_t=void 0}const G={now:()=>(_t===void 0&&G.set(E.isProcessing||So.useManualTiming?E.timestamp:performance.now()),_t),set:t=>{_t=t,queueMicrotask(Rr)}};function tn(t,e){t.indexOf(e)===-1&&t.push(e)}function en(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function Er([...t],e,n){const s=e<0?t.length+e:e;if(s>=0&&s<t.length){const i=n<0?t.length+n:n,[r]=t.splice(e,1);t.splice(i,0,r)}return t}class nn{constructor(){this.subscriptions=[]}add(e){return tn(this.subscriptions,e),()=>en(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 ci(t,e){return e?t*(1e3/e):0}const Mn=30,Lr=t=>!isNaN(parseFloat(t)),St={current:void 0};class Fr{constructor(e,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,i=!0)=>{const r=G.now();this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=G.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Lr(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 nn);const s=this.events[e].add(n);return e==="change"?()=>{s(),C.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,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}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()}get(){return St.current&&St.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=G.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Mn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Mn);return ci(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(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function pt(t,e){return new Fr(t,e)}function kr(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,pt(n))}function Br(t,e){const n=se(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=zo(r[o]);kr(t,o,a)}}function Ir(t){return!!(L(t)&&t.add)}function Ae(t,e){const n=t.getValue("willChange");if(Ir(n))return n.add(e)}function hi(t){return t.props[_s]}const fi=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,jr=1e-7,Or=12;function Nr(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=fi(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>jr&&++a<Or);return o}function Ft(t,e,n,s){if(t===e&&n===s)return j;const i=r=>Nr(r,0,1,t,n);return r=>r===0||r===1?r:fi(i(r),e,s)}const di=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,pi=t=>e=>1-t(1-e),mi=Ft(.33,1.53,.69,.99),sn=pi(mi),gi=di(sn),yi=t=>(t*=2)<1?.5*sn(t):.5*(2-Math.pow(2,-10*(t-1))),on=t=>1-Math.sin(Math.acos(t)),vi=pi(on),xi=di(on),Ti=t=>/^0[^.\s]+$/u.test(t);function Ur(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Ti(t):!0}const At=t=>Math.round(t*1e5)/1e5,rn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function _r(t){return t==null}const Kr=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,an=(t,e)=>n=>!!(typeof n=="string"&&Kr.test(n)&&n.startsWith(t)||e&&!_r(n)&&Object.prototype.hasOwnProperty.call(n,e)),Pi=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(rn);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Wr=t=>Y(0,255,t),ue={...yt,transform:t=>Math.round(Wr(t))},st={test:an("rgb","red"),parse:Pi("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+ue.transform(t)+", "+ue.transform(e)+", "+ue.transform(n)+", "+At(Mt.transform(s))+")"};function Gr(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 be={test:an("#"),parse:Gr,transform:st.transform},lt={test:an("hsl","hue"),parse:Pi("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+W.transform(At(e))+", "+W.transform(At(n))+", "+At(Mt.transform(s))+")"},k={test:t=>st.test(t)||be.test(t)||lt.test(t),parse:t=>st.test(t)?st.parse(t):lt.test(t)?lt.parse(t):be.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?st.transform(t):lt.transform(t)},$r=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function zr(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(rn))===null||e===void 0?void 0:e.length)||0)+(((n=t.match($r))===null||n===void 0?void 0:n.length)||0)>0}const Si="number",Ai="color",Hr="var",Xr="var(",Rn="${}",Yr=/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 Rt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(Yr,l=>(k.test(l)?(s.color.push(r),i.push(Ai),n.push(k.parse(l))):l.startsWith(Xr)?(s.var.push(r),i.push(Hr),n.push(l)):(s.number.push(r),i.push(Si),n.push(parseFloat(l))),++r,Rn)).split(Rn);return{values:n,split:a,indexes:s,types:i}}function bi(t){return Rt(t).values}function wi(t){const{split:e,types:n}=Rt(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===Si?r+=At(i[o]):a===Ai?r+=k.transform(i[o]):r+=i[o]}return r}}const qr=t=>typeof t=="number"?0:t;function Zr(t){const e=bi(t);return wi(t)(e.map(qr))}const Z={test:zr,parse:bi,createTransformer:wi,getAnimatableNone:Zr},Jr=new Set(["brightness","contrast","saturate","opacity"]);function Qr(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(rn)||[];if(!s)return t;const i=n.replace(s,"");let r=Jr.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const ta=/\b([a-z-]*)\(.*?\)/gu,we={...Z,getAnimatableNone:t=>{const e=t.match(ta);return e?e.map(Qr).join(" "):t}},ea={...Ge,color:k,backgroundColor:k,outlineColor:k,fill:k,stroke:k,borderColor:k,borderTopColor:k,borderRightColor:k,borderBottomColor:k,borderLeftColor:k,filter:we,WebkitFilter:we},ln=t=>ea[t];function Ci(t,e){let n=ln(t);return n!==we&&(n=Z),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const na=new Set(["auto","none","0"]);function sa(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!na.has(r)&&Rt(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=Ci(n,i)}const En=t=>t===yt||t===S,Ln=(t,e)=>parseFloat(t.split(", ")[e]),Fn=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return Ln(i[1],e);{const r=s.match(/^matrix\((.+)\)$/u);return r?Ln(r[1],t):0}},ia=new Set(["x","y","z"]),oa=gt.filter(t=>!ia.has(t));function ra(t){const e=[];return oa.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const mt={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:Fn(4,13),y:Fn(5,14)};mt.translateX=mt.x;mt.translateY=mt.y;const it=new Set;let Ce=!1,Ve=!1;function Vi(){if(Ve){const t=Array.from(it).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=ra(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===void 0||a.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Ve=!1,Ce=!1,it.forEach(t=>t.complete()),it.clear()}function Di(){it.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ve=!0)})}function aa(){Di(),Vi()}class un{constructor(e,n,s,i,r,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(it.add(this),Ce||(Ce=!0,C.read(Di),C.resolveKeyframes(Vi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;for(let r=0;r<e.length;r++)if(e[r]===null)if(r===0){const o=i==null?void 0:i.get(),a=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const l=s.readValue(n,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),i&&o===void 0&&i.set(e[0])}else e[r]=e[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),it.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,it.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Mi=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),la=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ua(t){const e=la.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Ri(t,e,n=1){const[s,i]=ua(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return Mi(o)?parseFloat(o):o}return We(i)?Ri(i,e,n+1):i}const Ei=t=>e=>e.test(t),ca={test:t=>t==="auto",parse:t=>t},Li=[yt,S,W,q,Jo,Zo,ca],kn=t=>Li.find(Ei(t));class Fi extends un{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 u=e[l];if(typeof u=="string"&&(u=u.trim(),We(u))){const c=Ri(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!ui.has(s)||e.length!==2)return;const[i,r]=e,o=kn(i),a=kn(r);if(o!==a)if(En(o)&&En(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)Ur(e[i])&&s.push(i);s.length&&sa(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=mt[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]=mt[s](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEach(([l,u])=>{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const Bn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Z.test(t)||t==="0")&&!t.startsWith("url("));function ha(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 fa(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=Bn(i,e),a=Bn(r,e);return!o||!a?!1:ha(t)||(n==="spring"||Ze(n))&&s}const da=t=>t!==null;function ie(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(da),r=e&&n!=="loop"&&e%2===1?0:i.length-1;return!r||s===void 0?i[r]:s}const pa=40;class ki{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=G.now(),this.options={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>pa?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&aa(),this._resolved}onKeyframesResolved(e,n){this.resolvedAt=G.now(),this.hasAttemptedResolve=!0;const{name:s,type:i,velocity:r,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!fa(e,s,i,r))if(o)this.options.duration=0;else{l&&l(ie(e,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const c=this.initPlayback(e,n);c!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}const V=(t,e,n)=>t+(e-t)*n;function ce(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 ma({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=ce(l,a,t+1/3),r=ce(l,a,t),o=ce(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function zt(t,e){return n=>n>0?e:t}const he=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},ga=[be,st,lt],ya=t=>ga.find(e=>e.test(t));function In(t){const e=ya(t);if(!e)return!1;let n=e.parse(t);return e===lt&&(n=ma(n)),n}const jn=(t,e)=>{const n=In(t),s=In(e);if(!n||!s)return zt(t,e);const i={...n};return r=>(i.red=he(n.red,s.red,r),i.green=he(n.green,s.green,r),i.blue=he(n.blue,s.blue,r),i.alpha=V(n.alpha,s.alpha,r),st.transform(i))},va=(t,e)=>n=>e(t(n)),kt=(...t)=>t.reduce(va),De=new Set(["none","hidden"]);function xa(t,e){return De.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Ta(t,e){return n=>V(t,e,n)}function cn(t){return typeof t=="number"?Ta:typeof t=="string"?We(t)?zt:k.test(t)?jn:Aa:Array.isArray(t)?Bi:typeof t=="object"?k.test(t)?jn:Pa:zt}function Bi(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>cn(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function Pa(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=cn(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function Sa(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const o=e.types[r],a=t.indexes[o][i[o]],l=(n=t.values[a])!==null&&n!==void 0?n:0;s[r]=l,i[o]++}return s}const Aa=(t,e)=>{const n=Z.createTransformer(e),s=Rt(t),i=Rt(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?De.has(t)&&!i.values.length||De.has(e)&&!s.values.length?xa(t,e):kt(Bi(Sa(s,i),i.values),n):zt(t,e)};function Ii(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?V(t,e,n):cn(t)(t,e)}const ba=5;function ji(t,e,n){const s=Math.max(e-ba,0);return ci(n-t(s),e-s)}const D={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},fe=.001;function wa({duration:t=D.duration,bounce:e=D.bounce,velocity:n=D.velocity,mass:s=D.mass}){let i,r,o=1-e;o=Y(D.minDamping,D.maxDamping,o),t=Y(D.minDuration,D.maxDuration,H(t)),o<1?(i=u=>{const c=u*o,h=c*t,f=c-n,d=Me(u,o),p=Math.exp(-h);return fe-f/d*p},r=u=>{const h=u*o*t,f=h*n+n,d=Math.pow(o,2)*Math.pow(u,2)*t,p=Math.exp(-h),m=Me(Math.pow(u,2),o);return(-i(u)+fe>0?-1:1)*((f-d)*p)/m}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-fe+c*h},r=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=Va(i,r,a);if(t=z(t),isNaN(l))return{stiffness:D.stiffness,damping:D.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:o*2*Math.sqrt(s*u),duration:t}}}const Ca=12;function Va(t,e,n){let s=n;for(let i=1;i<Ca;i++)s=s-t(s)/e(s);return s}function Me(t,e){return t*Math.sqrt(1-e*e)}const Da=["duration","bounce"],Ma=["stiffness","damping","mass"];function On(t,e){return e.some(n=>t[n]!==void 0)}function Ra(t){let e={velocity:D.velocity,stiffness:D.stiffness,damping:D.damping,mass:D.mass,isResolvedFromDuration:!1,...t};if(!On(t,Ma)&&On(t,Da))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*Y(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:D.mass,stiffness:i,damping:r}}else{const n=wa(t);e={...e,...n,mass:D.mass},e.isResolvedFromDuration=!0}return e}function Oi(t=D.visualDuration,e=D.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:u,mass:c,duration:h,velocity:f,isResolvedFromDuration:d}=Ra({...n,velocity:-H(n.velocity||0)}),p=f||0,m=u/(2*Math.sqrt(l*c)),y=o-r,v=H(Math.sqrt(l/c)),T=Math.abs(y)<5;s||(s=T?D.restSpeed.granular:D.restSpeed.default),i||(i=T?D.restDelta.granular:D.restDelta.default);let P;if(m<1){const x=Me(v,m);P=w=>{const M=Math.exp(-m*v*w);return o-M*((p+m*v*y)/x*Math.sin(x*w)+y*Math.cos(x*w))}}else if(m===1)P=x=>o-Math.exp(-v*x)*(y+(p+v*y)*x);else{const x=v*Math.sqrt(m*m-1);P=w=>{const M=Math.exp(-m*v*w),A=Math.min(x*w,300);return o-M*((p+m*v*y)*Math.sinh(A)+x*y*Math.cosh(A))/x}}const b={calculatedDuration:d&&h||null,next:x=>{const w=P(x);if(d)a.done=x>=h;else{let M=0;m<1&&(M=x===0?z(p):ji(P,x,w));const A=Math.abs(M)<=s,F=Math.abs(o-w)<=i;a.done=A&&F}return a.value=a.done?o:w,a},toString:()=>{const x=Math.min(ni(b),Pe),w=si(M=>b.next(x*M).value,x,30);return x+"ms "+w}};return b}function Nn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],f={done:!1,value:h},d=A=>a!==void 0&&A<a||l!==void 0&&A>l,p=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let m=n*e;const y=h+m,v=o===void 0?y:o(y);v!==y&&(m=v-h);const T=A=>-m*Math.exp(-A/s),P=A=>v+T(A),b=A=>{const F=T(A),N=P(A);f.done=Math.abs(F)<=u,f.value=f.done?v:N};let x,w;const M=A=>{d(f.value)&&(x=A,w=Oi({keyframes:[f.value,p(f.value)],velocity:ji(P,A,f.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return M(0),{calculatedDuration:null,next:A=>{let F=!1;return!w&&x===void 0&&(F=!0,b(A),M(A)),x!==void 0&&A>=x?w.next(A-x):(!F&&b(A),f)}}}const Ea=Ft(.42,0,1,1),La=Ft(0,0,.58,1),Ni=Ft(.42,0,.58,1),Fa=t=>Array.isArray(t)&&typeof t[0]!="number",ka={linear:j,easeIn:Ea,easeInOut:Ni,easeOut:La,circIn:on,circInOut:xi,circOut:vi,backIn:sn,backInOut:gi,backOut:mi,anticipate:yi},Un=t=>{if(Je(t)){Bs(t.length===4);const[e,n,s,i]=t;return Ft(e,n,s,i)}else if(typeof t=="string")return ka[t];return t};function Ba(t,e,n){const s=[],i=n||Ii,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]||j:e;a=kt(l,a)}s.push(a)}return s}function Ui(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(Bs(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=Ba(e,s,i),l=a.length,u=c=>{if(o&&c<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(c<t[h+1]);h++);const f=ft(t[h],t[h+1],c);return a[h](f)};return n?c=>u(Y(t[0],t[r-1],c)):u}function Ia(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=ft(0,e,s);t.push(V(n,1,i))}}function ja(t){const e=[0];return Ia(e,t.length-1),e}function Oa(t,e){return t.map(n=>n*e)}function Na(t,e){return t.map(()=>e||Ni).splice(0,t.length-1)}function Ht({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Fa(s)?s.map(Un):Un(s),r={done:!1,value:e[0]},o=Oa(n&&n.length===e.length?n:ja(e),t),a=Ui(o,e,{ease:Array.isArray(i)?i:Na(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const Ua=t=>{const e=({timestamp:n})=>t(n);return{start:()=>C.update(e,!0),stop:()=>X(e),now:()=>E.isProcessing?E.timestamp:G.now()}},_a={decay:Nn,inertia:Nn,tween:Ht,keyframes:Ht,spring:Oi},Ka=t=>t/100;class hn extends ki{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:s,element:i,keyframes:r}=this.options,o=(i==null?void 0:i.KeyframeResolver)||un,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new o(r,a,n,s,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=this.options,a=Ze(n)?n:_a[n]||Ht;let l,u;a!==Ht&&typeof e[0]!="number"&&(l=kt(Ka,Ii(e[0],e[1])),e=[0,100]);const c=a({...this.options,keyframes:e});r==="mirror"&&(u=a({...this.options,keyframes:[...e].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=ni(c));const{calculatedDuration:h}=c,f=h+i,d=f*(s+1)-i;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:h,resolvedDuration:f,totalDuration:d}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:s}=this;if(!s){const{keyframes:A}=this.options;return{done:!0,value:A[A.length-1]}}const{finalKeyframe:i,generator:r,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:h}=s;if(this.startTime===null)return r.next(0);const{delay:f,repeat:d,repeatType:p,repeatDelay:m,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const v=this.currentTime-f*(this.speed>=0?1:-1),T=this.speed>=0?v<0:v>c;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let P=this.currentTime,b=r;if(d){const A=Math.min(this.currentTime,c)/h;let F=Math.floor(A),N=A%1;!N&&A>=1&&(N=1),N===1&&F--,F=Math.min(F,d+1),!!(F%2)&&(p==="reverse"?(N=1-N,m&&(N-=m/h)):p==="mirror"&&(b=o)),P=Y(0,1,N)*h}const x=T?{done:!1,value:l[0]}:b.next(P);a&&(x.value=a(x.value));let{done:w}=x;!T&&u!==null&&(w=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&w);return M&&i!==void 0&&(x.value=ie(l,this.options,i)),y&&y(x.value),M&&this.finish(),x}get duration(){const{resolved:e}=this;return e?H(e.calculatedDuration):0}get time(){return H(this.currentTime)}set time(e){e=z(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=H(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=Ua,onPlay:n,startTime:s}=this.options;this.driver||(this.driver=e(r=>this.tick(r))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=s??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const Wa=new Set(["opacity","clipPath","filter","transform"]);function Ga(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeInOut",times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=oi(a,i);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:s,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"})}const $a=Ie(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Xt=10,za=2e4;function Ha(t){return Ze(t.type)||t.type==="spring"||!ii(t.ease)}function Xa(t,e){const n=new hn({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let r=0;for(;!s.done&&r<za;)s=n.sample(r),i.push(s.value),r+=Xt;return{times:void 0,keyframes:i,duration:r-Xt,ease:"linear"}}const _i={anticipate:yi,backInOut:gi,circInOut:xi};function Ya(t){return t in _i}class _n extends ki{constructor(e){super(e);const{name:n,motionValue:s,element:i,keyframes:r}=this.options;this.resolver=new Fi(r,(o,a)=>this.onKeyframesResolved(o,a),n,s,i),this.resolver.scheduleResolve()}initPlayback(e,n){let{duration:s=300,times:i,ease:r,type:o,motionValue:a,name:l,startTime:u}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof r=="string"&&$t()&&Ya(r)&&(r=_i[r]),Ha(this.options)){const{onComplete:h,onUpdate:f,motionValue:d,element:p,...m}=this.options,y=Xa(e,m);e=y.keyframes,e.length===1&&(e[1]=e[0]),s=y.duration,i=y.times,r=y.ease,o="keyframes"}const c=Ga(a.owner.current,l,e,{...this.options,duration:s,times:i,ease:r});return c.startTime=u??this.calcStartTime(),this.pendingTimeline?(wn(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:h}=this.options;a.set(ie(e,this.options,n)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:s,times:i,type:o,ease:r,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return H(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return H(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=z(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:n}=e;return n.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return j;const{animation:s}=n;wn(s,e)}return j}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:s,duration:i,type:r,ease:o,times:a}=e;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:c,onComplete:h,element:f,...d}=this.options,p=new hn({...d,keyframes:s,duration:i,type:r,ease:o,times:a,isGenerator:!0}),m=z(this.time);u.setWithVelocity(p.sample(m-Xt).value,p.sample(m).value,Xt)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:s,repeatDelay:i,repeatType:r,damping:o,type:a}=e;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=n.owner.getProps();return $a()&&s&&Wa.has(s)&&!l&&!u&&!i&&r!=="mirror"&&o!==0&&a!=="inertia"}}const qa={type:"spring",stiffness:500,damping:25,restSpeed:10},Za=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Ja={type:"keyframes",duration:.8},Qa={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},tl=(t,{keyframes:e})=>e.length>2?Ja:ot.has(t)?t.startsWith("scale")?Za(e[1]):qa:Qa;function el({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const fn=(t,e,n,s={},i,r)=>o=>{const a=qe(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-z(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};el(a)||(c={...c,...tl(t,c)}),c.duration&&(c.duration=z(c.duration)),c.repeatDelay&&(c.repeatDelay=z(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(h=!0)),h&&!r&&e.get()!==void 0){const f=ie(c.keyframes,a);if(f!==void 0)return C.update(()=>{c.onUpdate(f),c.onComplete()}),new Tr([])}return!r&&_n.supports(c)?new _n(c):new hn(c)};function nl({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Ki(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var r;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=e;s&&(o=s);const u=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const h in l){const f=t.getValue(h,(r=t.latestValues[h])!==null&&r!==void 0?r:null),d=l[h];if(d===void 0||c&&nl(c,h))continue;const p={delay:n,...qe(o||{},h)};let m=!1;if(window.MotionHandoffAnimation){const v=hi(t);if(v){const T=window.MotionHandoffAnimation(v,h,C);T!==null&&(p.startTime=T,m=!0)}}Ae(t,h),f.start(fn(h,f,d,t.shouldReduceMotion&&ui.has(h)?{type:!1}:p,t,m));const y=f.animation;y&&u.push(y)}return a&&Promise.all(u).then(()=>{C.update(()=>{a&&Br(t,a)})}),u}function Re(t,e,n={}){var s;const i=se(t,e,n.type==="exit"?(s=t.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:r=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);const o=i?()=>Promise.all(Ki(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:f}=r;return sl(t,e,c+u,h,f,n)}:()=>Promise.resolve(),{when:l}=r;if(l){const[u,c]=l==="beforeChildren"?[o,a]:[a,o];return u().then(()=>c())}else return Promise.all([o(),a(n.delay)])}function sl(t,e,n=0,s=0,i=1,r){const o=[],a=(t.variantChildren.size-1)*s,l=i===1?(u=0)=>u*s:(u=0)=>a-u*s;return Array.from(t.variantChildren).sort(il).forEach((u,c)=>{u.notify("AnimationStart",e),o.push(Re(u,e,{...r,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(o)}function il(t,e){return t.sortNodePosition(e)}function ol(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>Re(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=Re(t,e,n);else{const i=typeof e=="function"?se(t,e,n.custom):e;s=Promise.all(Ki(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const rl=Oe.length;function Wi(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Wi(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<rl;n++){const s=Oe[n],i=t.props[s];(Dt(i)||i===!1)&&(e[s]=i)}return e}const al=[...je].reverse(),ll=je.length;function ul(t){return e=>Promise.all(e.map(({animation:n,options:s})=>ol(t,n,s)))}function cl(t){let e=ul(t),n=Kn(),s=!0;const i=l=>(u,c)=>{var h;const f=se(t,c,l==="exit"?(h=t.presenceContext)===null||h===void 0?void 0:h.custom:void 0);if(f){const{transition:d,transitionEnd:p,...m}=f;u={...u,...m,...p}}return u};function r(l){e=l(t)}function o(l){const{props:u}=t,c=Wi(t.parent)||{},h=[],f=new Set;let d={},p=1/0;for(let y=0;y<ll;y++){const v=al[y],T=n[v],P=u[v]!==void 0?u[v]:c[v],b=Dt(P),x=v===l?T.isActive:null;x===!1&&(p=y);let w=P===c[v]&&P!==u[v]&&b;if(w&&s&&t.manuallyAnimateOnMount&&(w=!1),T.protectedKeys={...d},!T.isActive&&x===null||!P&&!T.prevProp||ee(P)||typeof P=="boolean")continue;const M=hl(T.prevProp,P);let A=M||v===l&&T.isActive&&!w&&b||y>p&&b,F=!1;const N=Array.isArray(P)?P:[P];let rt=N.reduce(i(v),{});x===!1&&(rt={});const{prevResolvedValues:pn={}}=T,mo={...pn,...rt},mn=B=>{A=!0,f.has(B)&&(F=!0,f.delete(B)),T.needsAnimating[B]=!0;const $=t.getValue(B);$&&($.liveStyle=!1)};for(const B in mo){const $=rt[B],oe=pn[B];if(d.hasOwnProperty(B))continue;let re=!1;Te($)&&Te(oe)?re=!ei($,oe):re=$!==oe,re?$!=null?mn(B):f.add(B):$!==void 0&&f.has(B)?mn(B):T.protectedKeys[B]=!0}T.prevProp=P,T.prevResolvedValues=rt,T.isActive&&(d={...d,...rt}),s&&t.blockInitialAnimation&&(A=!1),A&&(!(w&&M)||F)&&h.push(...N.map(B=>({animation:B,options:{type:v}})))}if(f.size){const y={};f.forEach(v=>{const T=t.getBaseTarget(v),P=t.getValue(v);P&&(P.liveStyle=!0),y[v]=T??null}),h.push({animation:y})}let m=!!h.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(m=!1),s=!1,m?e(h):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=t.variantChildren)===null||c===void 0||c.forEach(f=>{var d;return(d=f.animationState)===null||d===void 0?void 0:d.setActive(l,u)}),n[l].isActive=u;const h=o(l);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:o,setActive:a,setAnimateFunction:r,getState:()=>n,reset:()=>{n=Kn(),s=!0}}}function hl(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!ei(e,t):!1}function tt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Kn(){return{animate:tt(!0),whileInView:tt(),whileHover:tt(),whileTap:tt(),whileDrag:tt(),whileFocus:tt(),exit:tt()}}class Q{constructor(e){this.isMounted=!1,this.node=e}update(){}}class fl extends Q{constructor(e){super(e),e.animationState||(e.animationState=cl(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();ee(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let dl=0;class pl extends Q{constructor(){super(...arguments),this.id=dl++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const ml={animation:{Feature:fl},exit:{Feature:pl}};function Et(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function Bt(t){return{point:{x:t.pageX,y:t.pageY}}}const gl=t=>e=>Qe(e)&&t(e,Bt(e));function bt(t,e,n,s){return Et(t,e,gl(n),s)}const Wn=(t,e)=>Math.abs(t-e);function yl(t,e){const n=Wn(t.x,e.x),s=Wn(t.y,e.y);return Math.sqrt(n**2+s**2)}class Gi{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=pe(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,d=yl(h.offset,{x:0,y:0})>=3;if(!f&&!d)return;const{point:p}=h,{timestamp:m}=E;this.history.push({...p,timestamp:m});const{onStart:y,onMove:v}=this.handlers;f||(y&&y(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=de(f,this.transformPagePoint),C.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:d,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=pe(h.type==="pointercancel"?this.lastMoveEventInfo:de(f,this.transformPagePoint),this.history);this.startEvent&&d&&d(h,y),p&&p(h,y)},!Qe(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const o=Bt(e),a=de(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=E;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=n;c&&c(e,pe(a,this.history)),this.removeListeners=kt(bt(this.contextWindow,"pointermove",this.handlePointerMove),bt(this.contextWindow,"pointerup",this.handlePointerUp),bt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),X(this.updatePoint)}}function de(t,e){return e?{point:e(t.point)}:t}function Gn(t,e){return{x:t.x-e.x,y:t.y-e.y}}function pe({point:t},e){return{point:t,delta:Gn(t,$i(e)),offset:Gn(t,vl(e)),velocity:xl(e,.1)}}function vl(t){return t[0]}function $i(t){return t[t.length-1]}function xl(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=$i(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>z(e)));)n--;if(!s)return{x:0,y:0};const r=H(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 zi=1e-4,Tl=1-zi,Pl=1+zi,Hi=.01,Sl=0-Hi,Al=0+Hi;function O(t){return t.max-t.min}function bl(t,e,n){return Math.abs(t-e)<=n}function $n(t,e,n,s=.5){t.origin=s,t.originPoint=V(e.min,e.max,t.origin),t.scale=O(n)/O(e),t.translate=V(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Tl&&t.scale<=Pl||isNaN(t.scale))&&(t.scale=1),(t.translate>=Sl&&t.translate<=Al||isNaN(t.translate))&&(t.translate=0)}function wt(t,e,n,s){$n(t.x,e.x,n.x,s?s.originX:void 0),$n(t.y,e.y,n.y,s?s.originY:void 0)}function zn(t,e,n){t.min=n.min+e.min,t.max=t.min+O(e)}function wl(t,e,n){zn(t.x,e.x,n.x),zn(t.y,e.y,n.y)}function Hn(t,e,n){t.min=e.min-n.min,t.max=t.min+O(e)}function Ct(t,e,n){Hn(t.x,e.x,n.x),Hn(t.y,e.y,n.y)}function Cl(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?V(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?V(n,t,s.max):Math.min(t,n)),t}function Xn(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 Vl(t,{top:e,left:n,bottom:s,right:i}){return{x:Xn(t.x,n,i),y:Xn(t.y,e,s)}}function Yn(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 Dl(t,e){return{x:Yn(t.x,e.x),y:Yn(t.y,e.y)}}function Ml(t,e){let n=.5;const s=O(t),i=O(e);return i>s?n=ft(e.min,e.max-s,t.min):s>i&&(n=ft(t.min,t.max-i,e.min)),Y(0,1,n)}function Rl(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}const Ee=.35;function El(t=Ee){return t===!1?t=0:t===!0&&(t=Ee),{x:qn(t,"left","right"),y:qn(t,"top","bottom")}}function qn(t,e,n){return{min:Zn(t,e),max:Zn(t,n)}}function Zn(t,e){return typeof t=="number"?t:t[e]||0}const Jn=()=>({translate:0,scale:1,origin:0,originPoint:0}),ut=()=>({x:Jn(),y:Jn()}),Qn=()=>({min:0,max:0}),R=()=>({x:Qn(),y:Qn()});function _(t){return[t("x"),t("y")]}function Xi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Ll({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Fl(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 me(t){return t===void 0||t===1}function Le({scale:t,scaleX:e,scaleY:n}){return!me(t)||!me(e)||!me(n)}function et(t){return Le(t)||Yi(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Yi(t){return ts(t.x)||ts(t.y)}function ts(t){return t&&t!=="0%"}function Yt(t,e,n){const s=t-n,i=e*s;return n+i}function es(t,e,n,s,i){return i!==void 0&&(t=Yt(t,i,s)),Yt(t,n,s)+e}function Fe(t,e=0,n=1,s,i){t.min=es(t.min,e,n,s,i),t.max=es(t.max,e,n,s,i)}function qi(t,{x:e,y:n}){Fe(t.x,e.translate,e.scale,e.originPoint),Fe(t.y,n.translate,n.scale,n.originPoint)}const ns=.999999999999,ss=1.0000000000001;function kl(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,qi(t,o)),s&&et(r.latestValues)&&ht(t,r.latestValues))}e.x<ss&&e.x>ns&&(e.x=1),e.y<ss&&e.y>ns&&(e.y=1)}function ct(t,e){t.min=t.min+e,t.max=t.max+e}function is(t,e,n,s,i=.5){const r=V(t.min,t.max,i);Fe(t,e,n,r,s)}function ht(t,e){is(t.x,e.x,e.scaleX,e.scale,e.originX),is(t.y,e.y,e.scaleY,e.scale,e.originY)}function Zi(t,e){return Xi(Fl(t.getBoundingClientRect(),e))}function Bl(t,e,n){const s=Zi(t,n),{scroll:i}=e;return i&&(ct(s.x,i.offset.x),ct(s.y,i.offset.y)),s}const Ji=({current:t})=>t?t.ownerDocument.defaultView:null,Il=new WeakMap;class jl{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=R(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Bt(c).point)},r=(c,h)=>{const{drag:f,dragPropagation:d,onDragStart:p}=this.getProps();if(f&&!d&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Mr(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),_(y=>{let v=this.getAxisMotionValue(y).get()||0;if(W.test(v)){const{projection:T}=this.visualElement;if(T&&T.layout){const P=T.layout.layoutBox[y];P&&(v=O(P)*(parseFloat(v)/100))}}this.originPoint[y]=v}),p&&C.postRender(()=>p(c,h)),Ae(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},o=(c,h)=>{const{dragPropagation:f,dragDirectionLock:d,onDirectionLock:p,onDrag:m}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:y}=h;if(d&&this.currentDirection===null){this.currentDirection=Ol(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",h.point,y),this.updateAxis("y",h.point,y),this.visualElement.render(),m&&m(c,h)},a=(c,h)=>this.stop(c,h),l=()=>_(c=>{var h;return this.getAnimationState(c)==="paused"&&((h=this.getAxisMotionValue(c).animation)===null||h===void 0?void 0:h.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Gi(e,{onSessionStart:i,onStart:r,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Ji(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&&C.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.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Nt(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=Cl(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||e===void 0?void 0:e.layout,r=this.constraints;n&&at(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=Vl(i.layoutBox,n):this.constraints=!1,this.elastic=El(s),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&_(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Rl(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!at(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=Bl(s,i.root,this.visualElement.getTransformPagePoint());let o=Dl(i.layout.layoutBox,r);if(n){const a=n(Ll(o));this.hasMutatedConstraints=!!a,a&&(o=Xi(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=_(c=>{if(!Nt(c,n,this.currentDirection))return;let h=l&&l[c]||{};o&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,p={type:"inertia",velocity:s?e[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return Ae(this.visualElement,e),s.start(fn(e,s,0,n,this.visualElement,!1))}stopAnimation(){_(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){_(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){_(n=>{const{drag:s}=this.getProps();if(!Nt(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]-V(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!at(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};_(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=Ml({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(),_(o=>{if(!Nt(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(V(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;Il.set(this.visualElement,this);const e=this.visualElement.current,n=bt(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();at(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,r=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),C.read(s);const o=Et(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(_(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=l[c].translate,h.set(h.get()+l[c].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=Ee,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function Nt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Ol(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Nl extends Q{constructor(e){super(e),this.removeGroupControls=j,this.removeListeners=j,this.controls=new jl(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||j}unmount(){this.removeGroupControls(),this.removeListeners()}}const os=t=>(e,n)=>{t&&C.postRender(()=>t(e,n))};class Ul extends Q{constructor(){super(...arguments),this.removePointerDownListener=j}onPointerDown(e){this.session=new Gi(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ji(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:os(e),onStart:os(n),onMove:s,onEnd:(r,o)=>{delete this.session,i&&C.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=bt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Kt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function rs(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const vt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(S.test(t))t=parseFloat(t);else return t;const n=rs(t,e.target.x),s=rs(t,e.target.y);return`${n}% ${s}%`}},_l={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=Z.parse(t);if(i.length>5)return s;const r=Z.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 u=V(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),r(i)}};class Kl extends g.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;lr(Wl),r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),Kt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,o=s.projection;return o&&(o.isPresent=r,i||e.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||C.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Ue.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Qi(t){const[e,n]=ks(),s=g.useContext(Vt);return I.jsx(Kl,{...t,layoutGroup:s,switchLayoutGroup:g.useContext(Ks),isPresent:e,safeToRemove:n})}const Wl={borderRadius:{...vt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:vt,borderTopRightRadius:vt,borderBottomLeftRadius:vt,borderBottomRightRadius:vt,boxShadow:_l};function Gl(t,e,n){const s=L(t)?t:pt(t);return s.start(fn("",s,e,n)),s.animation}function $l(t){return t instanceof SVGElement&&t.tagName!=="svg"}const zl=(t,e)=>t.depth-e.depth;class Hl{constructor(){this.children=[],this.isDirty=!1}add(e){tn(this.children,e),this.isDirty=!0}remove(e){en(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(zl),this.isDirty=!1,this.children.forEach(e)}}function Xl(t,e){const n=G.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(X(s),t(r-e))};return C.read(s,!0),()=>X(s)}const to=["TopLeft","TopRight","BottomLeft","BottomRight"],Yl=to.length,as=t=>typeof t=="string"?parseFloat(t):t,ls=t=>typeof t=="number"||S.test(t);function ql(t,e,n,s,i,r){i?(t.opacity=V(0,n.opacity!==void 0?n.opacity:1,Zl(s)),t.opacityExit=V(e.opacity!==void 0?e.opacity:1,0,Jl(s))):r&&(t.opacity=V(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let o=0;o<Yl;o++){const a=`border${to[o]}Radius`;let l=us(e,a),u=us(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||ls(l)===ls(u)?(t[a]=Math.max(V(as(l),as(u),s),0),(W.test(u)||W.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=V(e.rotate||0,n.rotate||0,s))}function us(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Zl=eo(0,.5,vi),Jl=eo(.5,.95,j);function eo(t,e,n){return s=>s<t?0:s>e?1:n(ft(t,e,s))}function cs(t,e){t.min=e.min,t.max=e.max}function U(t,e){cs(t.x,e.x),cs(t.y,e.y)}function hs(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function fs(t,e,n,s,i){return t-=e,t=Yt(t,1/n,s),i!==void 0&&(t=Yt(t,1/i,s)),t}function Ql(t,e=0,n=1,s=.5,i,r=t,o=t){if(W.test(e)&&(e=parseFloat(e),e=V(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=V(r.min,r.max,s);t===r&&(a-=e),t.min=fs(t.min,e,n,a,i),t.max=fs(t.max,e,n,a,i)}function ds(t,e,[n,s,i],r,o){Ql(t,e[n],e[s],e[i],e.scale,r,o)}const tu=["x","scaleX","originX"],eu=["y","scaleY","originY"];function ps(t,e,n,s){ds(t.x,e,tu,n?n.x:void 0,s?s.x:void 0),ds(t.y,e,eu,n?n.y:void 0,s?s.y:void 0)}function ms(t){return t.translate===0&&t.scale===1}function no(t){return ms(t.x)&&ms(t.y)}function gs(t,e){return t.min===e.min&&t.max===e.max}function nu(t,e){return gs(t.x,e.x)&&gs(t.y,e.y)}function ys(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function so(t,e){return ys(t.x,e.x)&&ys(t.y,e.y)}function vs(t){return O(t.x)/O(t.y)}function xs(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class su{constructor(){this.members=[]}add(e){tn(this.members,e),e.scheduleRender()}remove(e){if(en(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 iu(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=(n==null?void 0: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:u,rotate:c,rotateX:h,rotateY:f,skewX:d,skewY:p}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),d&&(s+=`skewX(${d}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"}const nt={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Pt=typeof window<"u"&&window.MotionDebug!==void 0,ge=["","X","Y","Z"],ou={visibility:"hidden"},Ts=1e3;let ru=0;function ye(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function io(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=hi(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",C,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&io(s)}function oo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=ru++,this.animationId=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,Pt&&(nt.totalNodes=nt.resolvedTargetDeltas=nt.recalculatedProjection=0),this.nodes.forEach(uu),this.nodes.forEach(pu),this.nodes.forEach(mu),this.nodes.forEach(cu),Pt&&window.MotionDebug.record(nt)},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 Hl)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new nn),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,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=$l(o),this.instance=o;const{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),t){let h;const f=()=>this.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=Xl(f,250),Kt.hasAnimatedSinceResize&&(Kt.hasAnimatedSinceResize=!1,this.nodes.forEach(Ss))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeTargetChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||Tu,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=c.getProps(),T=!this.targetLayout||!so(this.targetLayout,p)||d,P=!f&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||P||f&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,P);const b={...qe(m,"layout"),onPlay:y,onComplete:v};(c.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b)}else f||Ss(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}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,X(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(gu),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&&io(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];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 u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ps);return}this.isUpdating||this.nodes.forEach(fu),this.isUpdating=!1,this.nodes.forEach(du),this.nodes.forEach(au),this.nodes.forEach(lu),this.clearAllSnapshots();const a=G.now();E.delta=Y(0,1e3/60,a-E.timestamp),E.timestamp=a,E.isProcessing=!0,ae.update.process(E),ae.preRender.process(E),ae.render.process(E),E.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ue.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(hu),this.sharedNodes.forEach(yu)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,C.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){C.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}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=R(),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){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&&!no(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&(a||et(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),Pu(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:a}=this.options;if(!a)return R();const l=a.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(Su))){const{scroll:c}=this.root;c&&(ct(l.x,c.offset.x),ct(l.y,c.offset.y))}return l}removeElementScroll(o){var a;const l=R();if(U(l,o),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:h,options:f}=c;c!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&U(l,o),ct(l.x,h.offset.x),ct(l.y,h.offset.y))}return l}applyTransform(o,a=!1){const l=R();U(l,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&ht(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),et(c.latestValues)&&ht(l,c.latestValues)}return et(this.latestValues)&&ht(l,this.latestValues),l}removeTransform(o){const a=R();U(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!et(u.latestValues))continue;Le(u.latestValues)&&u.updateSnapshot();const c=R(),h=u.measurePageBox();U(c,h),ps(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return et(this.latestValues)&&ps(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!==E.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 u=!!this.resumingFrom||this!==l;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:f}=this.options;if(!(!this.layout||!(h||f))){if(this.resolvedRelativeTargetAt=E.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=R(),this.relativeTargetOrigin=R(),Ct(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),U(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=R(),this.targetWithTransforms=R()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),wl(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):U(this.target,this.layout.layoutBox),qi(this.target,this.targetDelta)):U(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=R(),this.relativeTargetOrigin=R(),Ct(this.relativeTargetOrigin,this.target,d.target),U(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Pt&&nt.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Le(this.parent.latestValues)||Yi(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 u=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===E.timestamp&&(u=!1),u)return;const{layout:c,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||!(c||h))return;U(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;kl(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=R());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(hs(this.prevProjectionDelta.x,this.projectionDelta.x),hs(this.prevProjectionDelta.y,this.projectionDelta.y)),wt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!xs(this.projectionDelta.x,this.prevProjectionDelta.x)||!xs(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),Pt&&nt.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)===null||a===void 0||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,u=l?l.latestValues:{},c={...this.latestValues},h=ut();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=R(),d=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=d!==p,y=this.getStack(),v=!y||y.members.length<=1,T=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(xu));this.animationProgress=0;let P;this.mixTargetDelta=b=>{const x=b/1e3;As(h.x,o.x,x),As(h.y,o.y,x),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ct(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),vu(this.relativeTarget,this.relativeTargetOrigin,f,x),P&&nu(this.relativeTarget,P)&&(this.isProjectionDirty=!1),P||(P=R()),U(P,this.relativeTarget)),m&&(this.animationValues=c,ql(c,u,this.latestValues,x,T,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=x},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(X(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=C.update(()=>{Kt.hasAnimatedSinceResize=!0,this.currentAnimation=Gl(0,Ts,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},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(Ts),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&ro(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||R();const h=O(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const f=O(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}U(a,l),ht(a,c),wt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new su),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.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||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?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 u=this.getStack();u&&u.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 u={};l.z&&ye("z",o,u,this.animationValues);for(let c=0;c<ge.length;c++)ye(`rotate${ge[c]}`,o,u,this.animationValues),ye(`skew${ge[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}getProjectionStyles(o){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return ou;const u={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=Ut(o==null?void 0:o.pointerEvents)||"",u.transform=c?c(this.latestValues,""):"none",u;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=Ut(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!et(this.latestValues)&&(m.transform=c?c({},""):"none",this.hasProjected=!1),m}const f=h.animationValues||h.latestValues;this.applyTransformsToTarget(),u.transform=iu(this.projectionDeltaWithTransform,this.treeScale,f),c&&(u.transform=c(f,u.transform));const{x:d,y:p}=this.projectionDelta;u.transformOrigin=`${d.origin*100}% ${p.origin*100}% 0`,h.animationValues?u.opacity=h===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:u.opacity=h===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const m in Gt){if(f[m]===void 0)continue;const{correct:y,applyTo:v}=Gt[m],T=u.transform==="none"?f[m]:y(f[m],h);if(v){const P=v.length;for(let b=0;b<P;b++)u[v[b]]=T}else u[m]=T}return this.options.layoutId&&(u.pointerEvents=h===this?Ut(o==null?void 0:o.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Ps),this.root.sharedNodes.clear()}}}function au(t){t.updateLayout()}function lu(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?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"?_(h=>{const f=o?n.measuredBox[h]:n.layoutBox[h],d=O(f);f.min=s[h].min,f.max=f.min+d}):ro(r,n.layoutBox,s)&&_(h=>{const f=o?n.measuredBox[h]:n.layoutBox[h],d=O(s[h]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+d)});const a=ut();wt(a,s,n.layoutBox);const l=ut();o?wt(l,t.applyTransform(i,!0),n.measuredBox):wt(l,s,n.layoutBox);const u=!no(a);let c=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const p=R();Ct(p,n.layoutBox,f.layoutBox);const m=R();Ct(m,s,d.layoutBox),so(p,m)||(c=!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:u,hasRelativeTargetChanged:c})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function uu(t){Pt&&nt.totalNodes++,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 cu(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function hu(t){t.clearSnapshot()}function Ps(t){t.clearMeasurements()}function fu(t){t.isLayoutDirty=!1}function du(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ss(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function pu(t){t.resolveTargetDelta()}function mu(t){t.calcProjection()}function gu(t){t.resetSkewAndRotation()}function yu(t){t.removeLeadSnapshot()}function As(t,e,n){t.translate=V(e.translate,0,n),t.scale=V(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function bs(t,e,n,s){t.min=V(e.min,n.min,s),t.max=V(e.max,n.max,s)}function vu(t,e,n,s){bs(t.x,e.x,n.x,s),bs(t.y,e.y,n.y,s)}function xu(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Tu={duration:.45,ease:[.4,0,.1,1]},ws=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Cs=ws("applewebkit/")&&!ws("chrome/")?Math.round:j;function Vs(t){t.min=Cs(t.min),t.max=Cs(t.max)}function Pu(t){Vs(t.x),Vs(t.y)}function ro(t,e,n){return t==="position"||t==="preserve-aspect"&&!bl(vs(e),vs(n),.2)}function Su(t){var e;return t!==t.root&&((e=t.scroll)===null||e===void 0?void 0:e.wasRoot)}const Au=oo({attachResizeListener:(t,e)=>Et(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ve={current:void 0},ao=oo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ve.current){const t=new Au({});t.mount(window),t.setOptions({layoutScroll:!0}),ve.current=t}return ve.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),bu={pan:{Feature:Ul},drag:{Feature:Nl,ProjectionNode:ao,MeasureLayout:Qi}};function Ds(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,r=s[i];r&&C.postRender(()=>r(e,Bt(e)))}class wu extends Q{mount(){const{current:e}=this.node;e&&(this.unmount=br(e,n=>(Ds(this.node,n,"Start"),s=>Ds(this.node,s,"End"))))}unmount(){}}class Cu extends Q{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=kt(Et(this.node.current,"focus",()=>this.onFocus()),Et(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ms(t,e,n){const{props:s}=t;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),r=s[i];r&&C.postRender(()=>r(e,Bt(e)))}class Vu extends Q{mount(){const{current:e}=this.node;e&&(this.unmount=Dr(e,n=>(Ms(this.node,n,"Start"),(s,{success:i})=>Ms(this.node,s,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ke=new WeakMap,xe=new WeakMap,Du=t=>{const e=ke.get(t.target);e&&e(t)},Mu=t=>{t.forEach(Du)};function Ru({root:t,...e}){const n=t||document;xe.has(n)||xe.set(n,{});const s=xe.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Mu,{root:t,...e})),s[i]}function Eu(t,e,n){const s=Ru(e);return ke.set(t,n),s.observe(t),()=>{ke.delete(t),s.unobserve(t)}}const Lu={some:0,all:1};class Fu extends Q{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r}=e,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:Lu[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,r&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),f=u?c:h;f&&f(l)};return Eu(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(ku(e,n))&&this.startObserver()}unmount(){}}function ku({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Bu={inView:{Feature:Fu},tap:{Feature:Vu},focus:{Feature:Cu},hover:{Feature:wu}},Iu={layout:{ProjectionNode:ao,MeasureLayout:Qi}},qt={current:null},dn={current:!1};function lo(){if(dn.current=!0,!!Be)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>qt.current=t.matches;t.addListener(e),e()}else qt.current=!1}const ju=[...Li,k,Z],Ou=t=>ju.find(Ei(t)),Rs=new WeakMap;function Nu(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,pt(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,pt(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const Es=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Uu{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=un,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=G.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,C.render(this.render,!1,!0))};const{latestValues:l,renderState:u,onUpdate:c}=o;this.onUpdate=c,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,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=ne(n),this.isVariantNode=Us(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const p=f[d];l[d]!==void 0&&L(p)&&p.set(l[d],!1)}}mount(e){this.current=e,Rs.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((n,s)=>this.bindToMotionValue(s,n)),dn.current||lo(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:qt.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Rs.delete(this.current),this.projection&&this.projection.unmount(),X(this.notifyUpdate),X(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=ot.has(e),i=n.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&C.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),r=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r(),o&&o(),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 dt){const n=dt[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):R()}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<Es.length;s++){const i=Es[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=Nu(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}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=pt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){var s;let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(s=this.getBaseTargetFromProps(this.props,e))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(Mi(i)||Ti(i))?i=parseFloat(i):!Ou(i)&&Z.test(n)&&(i=Ci(e,n)),this.setBaseTarget(e,L(i)?i.get():i)),L(i)?i.get():i}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=Ke(this.props,s,(n=this.presenceContext)===null||n===void 0?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 nn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class uo extends Uu{constructor(){super(...arguments),this.KeyframeResolver=Fi}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}`)}))}}function _u(t){return window.getComputedStyle(t)}class Ku extends uo{constructor(){super(...arguments),this.type="html",this.renderInstance=Ys}readValueFromInstance(e,n){if(ot.has(n)){const s=ln(n);return s&&s.default||0}else{const s=_u(e),i=(zs(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Zi(e,n)}build(e,n,s){$e(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Ye(e,n,s)}}class Wu extends uo{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=R}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(ot.has(n)){const s=ln(n);return s&&s.default||0}return n=qs.has(n)?n:Ne(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Qs(e,n,s)}build(e,n,s){ze(e,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,n,s,i){Zs(e,n,s,i)}mount(e){this.isSVGTag=Xe(e.tagName),super.mount(e)}}const Gu=(t,e)=>_e(t)?new Wu(e):new Ku(e,{allowProjection:t!==g.Fragment}),$u=yr({...ml,...Bu,...bu,...Iu},Gu),co=Lo($u);function ho(t){const e=J(()=>pt(t)),{isStatic:n}=g.useContext(Jt);if(n){const[,s]=g.useState(t);g.useEffect(()=>e.on("change",s),[])}return e}function fo(t,e){const n=ho(e()),s=()=>n.set(e());return s(),Qt(()=>{const i=()=>C.preRender(s,!1,!0),r=t.map(o=>o.on("change",i));return()=>{r.forEach(o=>o()),X(s)}}),n}const zu=t=>t&&typeof t=="object"&&t.mix,Hu=t=>zu(t)?t.mix:void 0;function Xu(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=t[1+n],r=t[2+n],o=t[3+n],a=Ui(i,r,{mixer:Hu(r[0]),...o});return e?a(s):a}function Yu(t){St.current=[],t();const e=fo(St.current,t);return St.current=void 0,e}function qu(t,e,n,s){if(typeof t=="function")return Yu(t);const i=typeof e=="function"?e:Xu(e,n,s);return Array.isArray(t)?Ls(t,i):Ls([t],([r])=>i(r))}function Ls(t,e){const n=J(()=>[]);return fo(t,()=>{n.length=0;const s=t.length;for(let i=0;i<s;i++)n[i]=t[i].get();return e(n)})}function cc(){!dn.current&&lo();const[t]=g.useState(qt.current);return t}class Zu{constructor(){this.componentControls=new Set}subscribe(e){return this.componentControls.add(e),()=>this.componentControls.delete(e)}start(e,n){this.componentControls.forEach(s=>{s.start(e.nativeEvent||e,n)})}}const Ju=()=>new Zu;function hc(){return J(Ju)}const po=g.createContext(null);function Qu(t,e,n,s){if(!s)return t;const i=t.findIndex(c=>c.value===e);if(i===-1)return t;const r=s>0?1:-1,o=t[i+r];if(!o)return t;const a=t[i],l=o.layout,u=V(l.min,l.max,.5);return r===1&&a.layout.max+n>u||r===-1&&a.layout.min+n<u?Er(t,i,i+r):t}function tc({children:t,as:e="ul",axis:n="y",onReorder:s,values:i,...r},o){const a=J(()=>co[e]),l=[],u=g.useRef(!1),c={axis:n,registerItem:(h,f)=>{const d=l.findIndex(p=>h===p.value);d!==-1?l[d].layout=f[n]:l.push({value:h,layout:f[n]}),l.sort(nc)},updateOrder:(h,f,d)=>{if(u.current)return;const p=Qu(l,h,f,d);l!==p&&(u.current=!0,s(p.map(ec).filter(m=>i.indexOf(m)!==-1)))}};return g.useEffect(()=>{u.current=!1}),I.jsx(a,{...r,ref:o,ignoreStrict:!0,children:I.jsx(po.Provider,{value:c,children:t})})}const fc=g.forwardRef(tc);function ec(t){return t.value}function nc(t,e){return t.layout.min-e.layout.min}function Fs(t,e=0){return L(t)?t:ho(e)}function sc({children:t,style:e={},value:n,as:s="li",onDrag:i,layout:r=!0,...o},a){const l=J(()=>co[s]),u=g.useContext(po),c={x:Fs(e.x),y:Fs(e.y)},h=qu([c.x,c.y],([m,y])=>m||y?1:"unset"),{axis:f,registerItem:d,updateOrder:p}=u;return I.jsx(l,{drag:f,...o,dragSnapToOrigin:!0,style:{...e,x:c.x,y:c.y,zIndex:h},layout:r,onDrag:(m,y)=>{const{velocity:v}=y;v[f]&&p(n,c[f].get(),v[f]),i&&i(m,y)},onLayoutMeasure:m=>d(n,m),ref:a,ignoreStrict:!0,children:t})}const dc=g.forwardRef(sc);export{ac as A,lc as L,fc as R,dc as a,hc as b,co as m,cc as u};
|
|
Binary file
|
|
Binary file
|