From 96eccaa5739c55e338a5745d64a9b599840ce208 Mon Sep 17 00:00:00 2001 From: Renovamen Date: Fri, 22 Sep 2023 17:37:22 +0000 Subject: [PATCH] deploy: d5c868e8eb7a261f609bcb10db28d15321fecf56 --- assets/{index-f274cd4b.js => index-6e9735b8.js} | 2 +- index.html | 2 +- markdown/about-me.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) rename assets/{index-f274cd4b.js => index-6e9735b8.js} (93%) diff --git a/assets/index-f274cd4b.js b/assets/index-6e9735b8.js similarity index 93% rename from assets/index-f274cd4b.js rename to assets/index-6e9735b8.js index f7a74c6b..142a96c8 100644 --- a/assets/index-f274cd4b.js +++ b/assets/index-6e9735b8.js @@ -415,7 +415,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `),[s,l]},X0e=(e,t)=>{const n=e.get(jc)(t);return n?n.firstChild:null},Z0e=(e,t)=>{const{globalNodes:n}=e.get(Ru.key),r=[];return t.doc.descendants(i=>{if(n.includes(i.type.name)||n.includes(i.type))return r.push(i),!1}),r},J0e=e=>e.split(` -`)[0]||"",Q0e=e=>e.childCount===1&&e.child(0).type.name==="html",Uz=(e,t)=>{try{const n=Z0e(e,t),r=W0e(t),i=Y0e(e,t,r,n),[a,o]=K0e(e,i),s=X0e(e,a);return!s||r.type!==s.type||Q0e(s)?null:(s.attrs={...r.attrs},s.descendants(l=>{var u,c,d;const p=l.marks.find(f=>f.type.name==="link");p&&(u=l.text)!=null&&u.includes(o)&&p.attrs.href.includes(o)&&(p.attrs.href=p.attrs.href.replace(o,"")),((c=l.text)!=null&&c.includes(Hx)||(d=l.text)!=null&&d.includes(Gx))&&(l.text=l.text.replaceAll(Hx,qx).replaceAll(Gx,Vx))}),{text:J0e(a),prevNode:r,nextNode:s,placeholder:o})}catch{return null}},ege=(e,t,n,r,i)=>{var a;const{placeholderConfig:o}=e.get(Ru.key),s=o.hole;let l=n.tr.setMeta(t,!0).insertText(s,n.selection.from);const u=n.apply(l),c=Uz(e,u);if(!c)return;const d=c.text.slice(0,c.text.indexOf(c.placeholder)),{$from:p}=u.selection,f=p.before(),h=p.after(),m=V0e(c.nextNode,f,c.placeholder);l=l.replaceWith(f,h,c.nextNode).setNodeMarkup(f,void 0,i).delete(m+1,m+2),l=l.setSelection(Pe.near(l.doc.resolve(m+1))),(B0e.test(d)||["*","_","~"].includes(d.at(-1)||""))&&l.selection instanceof Pe&&(((a=l.selection.$cursor)==null?void 0:a.marks())??[]).forEach(S=>{l=l.removeStoredMark(S.type)}),r(l)},$z=Fi(e=>{let t=null;const n=new fn("MILKDOWN_INLINE_SYNC");return new Rn({key:n,state:{init:()=>null,apply:(r,i,a,o)=>{var s;const l=e.get(xs);if(!((s=l.hasFocus)!=null&&s.call(l))||!l.editable||!r.docChanged||r.getMeta(n))return null;const u=Uz(e,o);if(!u)return null;t&&(cancelAnimationFrame(t),t=null);const{prevNode:c,nextNode:d,text:p}=u,{shouldSyncNode:f}=e.get(Ru.key);return f({prevNode:c,nextNode:d,ctx:e,tr:r,text:p})&&(t=requestAnimationFrame(()=>{t=null;const{dispatch:h,state:m}=e.get(xs);ege(e,n,m,h,c.attrs)})),null}}})});W($z,{displayName:"Prose",group:"Prose"});const OT=Tu("remarkAddOrderInList",()=>()=>e=>{q4(e,"list",t=>{if(t.ordered){const n=t.start??1;t.children.forEach((r,i)=>{r.label=i+n})}})});W(OT.plugin,{displayName:"Remark",group:"Remark"});W(OT.options,{displayName:"RemarkConfig",group:"Remark"});const _T=Tu("remarkLineBreak",()=>()=>e=>{const t=/[\t ]*(?:\r?\n|\r)/g;q4(e,"text",(n,r,i)=>{if(!n.value||typeof n.value!="string")return;const a=[];let o=0;t.lastIndex=0;let s=t.exec(n.value);for(;s;){const l=s.index;o!==l&&a.push({type:"text",value:n.value.slice(o,l)}),a.push({type:"break",data:{isInline:!0}}),o=l+s[0].length,s=t.exec(n.value)}if(a.length>0&&i&&typeof r=="number")return o",group:"Remark"});W(_T.options,{displayName:"RemarkConfig",group:"Remark"});const MT=Tu("remarkInlineLink",()=>N0e);W(MT.plugin,{displayName:"Remark",group:"Remark"});W(MT.options,{displayName:"RemarkConfig",group:"Remark"});const tge=e=>!!e.children,nge=e=>e.type==="html";function rge(e,t){return n(e,0,null)[0];function n(r,i,a){if(tge(r)){const o=[];for(let s=0,l=r.children.length;s()=>e=>{rge(e,(t,n,r)=>nge(t)?((r==null?void 0:r.type)==="root"&&(t.children=[{...t}],delete t.value,t.type="paragraph"),[t]):[t])});W(DT.plugin,{displayName:"Remark",group:"Remark"});W(DT.options,{displayName:"RemarkConfig",group:"Remark"});const LT=Tu("remarkMarker",()=>()=>(e,t)=>{const n=r=>t.value.charAt(r.position.start.offset);q4(e,r=>["strong","emphasis"].includes(r.type),r=>{r.marker=n(r)})});W(LT.plugin,{displayName:"Remark",group:"Remark"});W(LT.options,{displayName:"RemarkConfig",group:"Remark"});const jz=Fi(()=>{let e=!1;const t=new fn("MILKDOWN_INLINE_NODES_CURSOR"),n=new Rn({key:t,state:{init(){return!1},apply(r){if(!r.selection.empty)return!1;const i=r.selection.$from,a=i.nodeBefore,o=i.nodeAfter;return!!(a&&o&&a.isInline&&!a.isText&&o.isInline&&!o.isText)}},props:{handleDOMEvents:{compositionend:(r,i)=>e?(e=!1,requestAnimationFrame(()=>{if(n.getState(r.state)){const a=r.state.selection.from;i.preventDefault(),r.dispatch(r.state.tr.insertText(i.data||"",a))}}),!0):!1,compositionstart:r=>(n.getState(r.state)&&(e=!0),!1),beforeinput:(r,i)=>{if(n.getState(r.state)&&i instanceof InputEvent&&i.data&&!e){const a=r.state.selection.from;return i.preventDefault(),r.dispatch(r.state.tr.insertText(i.data||"",a)),!0}return!1}},decorations(r){if(n.getState(r)){const i=r.selection.$from.pos,a=document.createElement("span"),o=Sn.widget(i,a,{side:-1}),s=document.createElement("span"),l=Sn.widget(i,s);return setTimeout(()=>{a.contentEditable="true",s.contentEditable="true"}),ht.create(r.doc,[o,l])}return ht.empty}}});return n});W(jz,{displayName:"Prose",group:"Prose"});const qz=Fi(e=>new Rn({key:new fn("MILKDOWN_HARDBREAK_MARKS"),appendTransaction:(t,n,r)=>{if(!t.length)return;const[i]=t;if(!i)return;const[a]=i.steps;if(i.getMeta("hardbreak")){if(!(a instanceof Kt))return;const{from:o}=a;return r.tr.setNodeMarkup(o,ks.type(e),void 0,[])}if(a instanceof na){let o=r.tr;const{from:s,to:l}=a;return r.doc.nodesBetween(s,l,(u,c)=>{u.type===ks.type(e)&&(o=o.setNodeMarkup(c,ks.type(e),void 0,[]))}),o}}}));W(qz,{displayName:"Prose",group:"Prose"});const PT=Bi(["table","code_block"],"hardbreakFilterNodes");W(PT,{displayName:"Ctx",group:"Prose"});const Hz=Fi(e=>{const t=e.get(PT.key);return new Rn({key:new fn("MILKDOWN_HARDBREAK_FILTER"),filterTransaction:(n,r)=>{const i=n.getMeta("hardbreak"),[a]=n.steps;if(i&&a){const{from:o}=a,s=r.doc.resolve(o);let l=s.depth,u=!0;for(;l>0;)t.includes(s.node(l).type.name)&&(u=!1),l--;return u}return!0}})});W(Hz,{displayName:"Prose",group:"Prose"});const Vz=Fi(e=>{const t=new fn("MILKDOWN_HEADING_ID"),n=r=>{if(r.composing||!r.editable)return;const i=e.get(d0.key),a=r.state.tr.setMeta("addToHistory",!1);let o=!1;r.state.doc.descendants((s,l)=>{if(s.type===Vs.type(e)){if(s.textContent.trim().length===0)return;const u=s.attrs,c=i(s);u.id!==c&&(o=!0,a.setMeta(t,!0).setNodeMarkup(l,void 0,{...u,id:c}))}}),o&&r.dispatch(a)};return new Rn({key:t,view:r=>(n(r),{update:i=>{n(i)}})})});W(Vz,{displayName:"Prose",group:"Prose"});const Gz=Fi(e=>{const t=n=>{if(n.composing||!n.editable)return;const r=Nu.type(e),i=Cu.type(e),a=Ci.type(e),o=n.state,s=(c,d)=>{let p=!1;const f=`${d+1}.`;return c.label!==f&&(c.label=f,p=!0),p};let l=o.tr,u=!1;o.doc.descendants((c,d,p,f)=>{if(c.type===i){const h=c.maybeChild(0);(h==null?void 0:h.type)===a&&h.attrs.listType==="ordered"&&(u=!0,l.setNodeMarkup(d,r,{spread:"true"}),c.descendants((m,S,y,g)=>{if(m.type===a){const v={...m.attrs};s(v,g)&&(l=l.setNodeMarkup(S,void 0,v))}return!1}))}else if(c.type===a&&(p==null?void 0:p.type)===r){const h={...c.attrs};let m=!1;h.listType!=="ordered"&&(h.listType="ordered",m=!0),p!=null&&p.maybeChild(0)&&(m=s(h,f)),m&&(l=l.setNodeMarkup(d,void 0,h),u=!0)}}),u&&n.dispatch(l.setMeta("addToHistory",!1))};return new Rn({key:new fn("MILKDOWN_KEEP_LIST_ORDER"),view:n=>(t(n),{update:r=>{t(r)}})})});W(Gz,{displayName:"Prose",group:"Prose"});const ige=[Ru,$z,qz,PT,Hz,jz,OT,MT,_T,DT,LT,Vz,Gz].flat(),age=[D0e,L0e,P0e,F0e,ige].flat();var Wx,Yx;if(typeof WeakMap<"u"){let e=new WeakMap;Wx=t=>e.get(t),Yx=(t,n)=>(e.set(t,n),n)}else{const e=[];let n=0;Wx=r=>{for(let i=0;i(n==10&&(n=0),e[n++]=r,e[n++]=i)}var Ge=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t=n){(a||(a=[])).push({type:"overlong_rowspan",pos:c,n:y-v});break}const x=i+v*t;for(let A=0;Ar&&(a+=u.attrs.colspan)}}for(let o=0;o1&&(n=!0)}t==-1?t=a:t!=a&&(t=Math.max(t,a))}return t}function lge(e,t,n){e.problems||(e.problems=[]);const r={};for(let i=0;iNumber(o)):null,i=Number(e.getAttribute("colspan")||1),a={colspan:i,rowspan:Number(e.getAttribute("rowspan")||1),colwidth:r&&r.length==i?r:null};for(const o in t){const s=t[o].getFromDOM,l=s&&s(e);l!=null&&(a[o]=l)}return a}function a7(e,t){const n={};e.attrs.colspan!=1&&(n.colspan=e.attrs.colspan),e.attrs.rowspan!=1&&(n.rowspan=e.attrs.rowspan),e.attrs.colwidth&&(n["data-colwidth"]=e.attrs.colwidth.join(","));for(const r in t){const i=t[r].setDOMAttr;i&&i(e.attrs[r],n)}return n}function cge(e){const t=e.cellAttributes||{},n={colspan:{default:1},rowspan:{default:1},colwidth:{default:null}};for(const r in t)n[r]={default:t[r].default};return{table:{content:"table_row+",tableRole:"table",isolating:!0,group:e.tableGroup,parseDOM:[{tag:"table"}],toDOM(){return["table",["tbody",0]]}},table_row:{content:"(table_cell | table_header)*",tableRole:"row",parseDOM:[{tag:"tr"}],toDOM(){return["tr",0]}},table_cell:{content:e.cellContent,attrs:n,tableRole:"cell",isolating:!0,parseDOM:[{tag:"td",getAttrs:r=>i7(r,t)}],toDOM(r){return["td",a7(r,t),0]}},table_header:{content:e.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:r=>i7(r,t)}],toDOM(r){return["th",a7(r,t),0]}}}}function _r(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(const n in e.nodes){const r=e.nodes[n],i=r.spec.tableRole;i&&(t[i]=r)}}return t}var Xa=new fn("selectingCells");function Jd(e){for(let t=e.depth-1;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function Un(e){const t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function f0(e){const t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;const n=Jd(t.$head)||dge(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function dge(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){const r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){const r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function Kx(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function pge(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function FT(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function Wz(e,t,n){const r=e.node(-1),i=Ge.get(r),a=e.start(-1),o=i.nextCell(e.pos-a,t,n);return o==null?null:e.node(0).resolve(a+o)}function Ps(e,t,n=1){const r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(i=>i>0)||(r.colwidth=null)),r}function fge(e,t,n=1){const r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let i=0;iu!=t.pos-i);s.unshift(t.pos-i);const l=s.map(u=>{const c=n.nodeAt(u);if(!c)throw RangeError(`No cell with offset ${u} found`);const d=i+u+1;return new yB(o.resolve(d),o.resolve(d+c.content.size))});super(l[0].$from,l[0].$to,l),this.$anchorCell=e,this.$headCell=t}map(e,t){const n=e.resolve(t.map(this.$anchorCell.pos)),r=e.resolve(t.map(this.$headCell.pos));if(Kx(n)&&Kx(r)&&FT(n,r)){const i=this.$anchorCell.node(-1)!=n.node(-1);return i&&this.isRowSelection()?Ue.rowSelection(n,r):i&&this.isColSelection()?Ue.colSelection(n,r):new Ue(n,r)}return Pe.between(n,r)}content(){const e=this.$anchorCell.node(-1),t=Ge.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),i={},a=[];for(let s=r.top;s0||m>0){let S=f.attrs;if(h>0&&(S=Ps(S,0,h)),m>0&&(S=Ps(S,S.colspan-m,m)),p.leftr.bottom){const S={...f.attrs,rowspan:Math.min(p.bottom,r.bottom)-Math.max(p.top,r.top)};p.top0)return!1;const n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount}static colSelection(e,t=e){const n=e.node(-1),r=Ge.get(n),i=e.start(-1),a=r.findCell(e.pos-i),o=r.findCell(t.pos-i),s=e.node(0);return a.top<=o.top?(a.top>0&&(e=s.resolve(i+r.map[a.left])),o.bottom0&&(t=s.resolve(i+r.map[o.left])),a.bottom0)return!1;const a=r+this.$anchorCell.nodeAfter.attrs.colspan,o=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(a,o)==t.width}eq(e){return e instanceof Ue&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,t=e){const n=e.node(-1),r=Ge.get(n),i=e.start(-1),a=r.findCell(e.pos-i),o=r.findCell(t.pos-i),s=e.node(0);return a.left<=o.left?(a.left>0&&(e=s.resolve(i+r.map[a.top*r.width])),o.right0&&(t=s.resolve(i+r.map[o.top*r.width])),a.right{t.push(Sn.node(r,r+n.nodeSize,{class:"selectedCell"}))}),ht.create(e.doc,t)}function gge({$from:e,$to:t}){if(e.pos==t.pos||e.pos=0&&!(e.after(i+1)=0&&!(t.before(a+1)>t.start(a));a--,r--);return n==r&&/row|table/.test(e.node(i).type.spec.tableRole)}function yge({$from:e,$to:t}){let n,r;for(let i=e.depth;i>0;i--){const a=e.node(i);if(a.type.spec.tableRole==="cell"||a.type.spec.tableRole==="header_cell"){n=a;break}}for(let i=t.depth;i>0;i--){const a=t.node(i);if(a.type.spec.tableRole==="cell"||a.type.spec.tableRole==="header_cell"){r=a;break}}return n!==r&&t.parentOffset===0}function bge(e,t,n){const r=(t||e).selection,i=(t||e).doc;let a,o;if(r instanceof Ne&&(o=r.node.type.spec.tableRole)){if(o=="cell"||o=="header_cell")a=Ue.create(i,r.from);else if(o=="row"){const s=i.resolve(r.from+1);a=Ue.rowSelection(s,s)}else if(!n){const s=Ge.get(r.node),l=r.from+1,u=l+s.map[s.width*s.height-1];a=Ue.create(i,l+1,u)}}else r instanceof Pe&&gge(r)?a=Pe.create(i,r.from):r instanceof Pe&&yge(r)&&(a=Pe.create(i,r.$from.start(),r.$from.end()));return a&&(t||(t=e.tr)).setSelection(a),t}var vge=new fn("fix-tables");function Kz(e,t,n,r){const i=e.childCount,a=t.childCount;e:for(let o=0,s=0;o{i.type.spec.tableRole=="table"&&(n=wge(e,i,a,n))};return t?t.doc!=e.doc&&Kz(t.doc,e.doc,0,r):e.doc.descendants(r),n}function wge(e,t,n,r){const i=Ge.get(t);if(!i.problems)return r;r||(r=e.tr);const a=[];for(let l=0;l0){let f="cell";c.firstChild&&(f=c.firstChild.type.spec.tableRole);const h=[];for(let S=0;S0&&r>0||t.child(0).type.spec.tableRole=="table");)n--,r--,t=t.child(0).content;const i=t.child(0),a=i.type.spec.tableRole,o=i.type.schema,s=[];if(a=="row")for(let l=0;l=0;o--){const{rowspan:s,colspan:l}=a.child(o).attrs;for(let u=i;u=t.length&&t.push(J.empty),n[i]r&&(p=p.type.createChecked(Ps(p.attrs,p.attrs.colspan,c+p.attrs.colspan-r),p.content)),u.push(p),c+=p.attrs.colspan;for(let f=1;fi&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,i-d.attrs.rowspan)},d.content)),l.push(d)}a.push(J.from(l))}n=a,t=i}return{width:e,height:t,rows:n}}function Tge(e,t,n,r,i,a,o){const s=e.doc.type.schema,l=_r(s);let u,c;if(i>t.width)for(let d=0,p=0;dt.height){const d=[];for(let h=0,m=(t.height-1)*t.width;h=t.width?!1:n.nodeAt(t.map[m+h]).type==l.header_cell;d.push(S?c||(c=l.header_cell.createAndFill()):u||(u=l.cell.createAndFill()))}const p=l.row.create(null,J.from(d)),f=[];for(let h=t.height;h{if(!i)return!1;const a=n.selection;if(a instanceof Ue)return jf(n,r,Ce.near(a.$headCell,t));if(e!="horiz"&&!a.empty)return!1;const o=Xz(i,e,t);if(o==null)return!1;if(e=="horiz")return jf(n,r,Ce.near(n.doc.resolve(a.head+t),t));{const s=n.doc.resolve(o),l=Wz(s,e,t);let u;return l?u=Ce.near(l,1):t<0?u=Ce.near(n.doc.resolve(s.before(-1)),-1):u=Ce.near(n.doc.resolve(s.after(-1)),1),jf(n,r,u)}}}function jp(e,t){return(n,r,i)=>{if(!i)return!1;const a=n.selection;let o;if(a instanceof Ue)o=a;else{const l=Xz(i,e,t);if(l==null)return!1;o=new Ue(n.doc.resolve(l))}const s=Wz(o.$headCell,e,t);return s?jf(n,r,new Ue(o.$anchorCell,s)):!1}}function qp(e,t){const n=e.selection;if(!(n instanceof Ue))return!1;if(t){const r=e.tr,i=_r(e.schema).cell.createAndFill().content;n.forEachCell((a,o)=>{a.content.eq(i)||r.replace(r.mapping.map(o+1),r.mapping.map(o+a.nodeSize-1),new de(i,0,0))}),r.docChanged&&t(r)}return!0}function Cge(e,t){const n=e.state.doc,r=Jd(n.resolve(t));return r?(e.dispatch(e.state.tr.setSelection(new Ue(r))),!0):!1}function Nge(e,t,n){if(!Un(e.state))return!1;let r=Ege(n);const i=e.state.selection;if(i instanceof Ue){r||(r={width:1,height:1,rows:[J.from(Xx(_r(e.state.schema).cell,n))]});const a=i.$anchorCell.node(-1),o=i.$anchorCell.start(-1),s=Ge.get(a).rectBetween(i.$anchorCell.pos-o,i.$headCell.pos-o);return r=kge(r,s.right-s.left,s.bottom-s.top),l7(e.state,e.dispatch,o,s,r),!0}else if(r){const a=f0(e.state),o=a.start(-1);return l7(e.state,e.dispatch,o,Ge.get(a.node(-1)).findCell(a.pos-o),r),!0}else return!1}function Rge(e,t){var n;if(t.ctrlKey||t.metaKey)return;const r=u7(e,t.target);let i;if(t.shiftKey&&e.state.selection instanceof Ue)a(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&(i=Jd(e.state.selection.$anchor))!=null&&((n=vw(e,t))==null?void 0:n.pos)!=i.pos)a(i,t),t.preventDefault();else if(!r)return;function a(l,u){let c=vw(e,u);const d=Xa.getState(e.state)==null;if(!c||!FT(l,c))if(d)c=l;else return;const p=new Ue(l,c);if(d||!e.state.selection.eq(p)){const f=e.state.tr.setSelection(p);d&&f.setMeta(Xa,l.pos),e.dispatch(f)}}function o(){e.root.removeEventListener("mouseup",o),e.root.removeEventListener("dragstart",o),e.root.removeEventListener("mousemove",s),Xa.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(Xa,-1))}function s(l){const u=l,c=Xa.getState(e.state);let d;if(c!=null)d=e.state.doc.resolve(c);else if(u7(e,u.target)!=r&&(d=vw(e,t),!d))return o();d&&a(d,u)}e.root.addEventListener("mouseup",o),e.root.addEventListener("dragstart",o),e.root.addEventListener("mousemove",s)}function Xz(e,t,n){if(!(e.state.selection instanceof Pe))return null;const{$head:r}=e.state.selection;for(let i=r.depth-1;i>=0;i--){const a=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:a.childCount))return null;if(a.type.spec.tableRole=="cell"||a.type.spec.tableRole=="header_cell"){const s=r.before(i),l=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(l)?s:null}}return null}function u7(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function vw(e,t){const n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?Jd(e.state.doc.resolve(n.pos)):null}var Ige=class{constructor(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Zx(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,Zx(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function Zx(e,t,n,r,i,a){var o;let s=0,l=!0,u=t.firstChild;const c=e.firstChild;if(c){for(let d=0,p=0;dnew n(s,t,l),new qf(-1,!1)},apply(a,o){return o.apply(a)}},props:{attributes:a=>{const o=xr.getState(a);return o&&o.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(a,o)=>{_ge(a,o,e,t,r)},mouseleave:a=>{Mge(a)},mousedown:(a,o)=>{Dge(a,o,t)}},decorations:a=>{const o=xr.getState(a);if(o&&o.activeHandle>-1)return Uge(a,o.activeHandle)},nodeViews:{}}});return i}var qf=class{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(e){const t=this,n=e.getMeta(xr);if(n&&n.setHandle!=null)return new qf(n.setHandle,!1);if(n&&n.setDragging!==void 0)return new qf(t.activeHandle,n.setDragging);if(t.activeHandle>-1&&e.docChanged){let r=e.mapping.map(t.activeHandle,-1);return Kx(e.doc.resolve(r))||(r=-1),new qf(r,t.dragging)}return t}};function _ge(e,t,n,r,i){const a=xr.getState(e.state);if(a&&!a.dragging){const o=Pge(t.target);let s=-1;if(o){const{left:l,right:u}=o.getBoundingClientRect();t.clientX-l<=n?s=c7(e,t,"left",n):u-t.clientX<=n&&(s=c7(e,t,"right",n))}if(s!=a.activeHandle){if(!i&&s!==-1){const l=e.state.doc.resolve(s),u=l.node(-1),c=Ge.get(u),d=l.start(-1);if(c.colCount(l.pos-d)+l.nodeAfter.attrs.colspan-1==c.width-1)return}Zz(e,s)}}}function Mge(e){const t=xr.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&Zz(e,-1)}function Dge(e,t,n){const r=xr.getState(e.state);if(!r||r.activeHandle==-1||r.dragging)return!1;const i=e.state.doc.nodeAt(r.activeHandle),a=Lge(e,r.activeHandle,i.attrs);e.dispatch(e.state.tr.setMeta(xr,{setDragging:{startX:t.clientX,startWidth:a}}));function o(l){window.removeEventListener("mouseup",o),window.removeEventListener("mousemove",s);const u=xr.getState(e.state);u!=null&&u.dragging&&(Fge(e,u.activeHandle,d7(u.dragging,l,n)),e.dispatch(e.state.tr.setMeta(xr,{setDragging:null})))}function s(l){if(!l.which)return o(l);const u=xr.getState(e.state);if(u&&u.dragging){const c=d7(u.dragging,l,n);Bge(e,u.activeHandle,c,n)}}return window.addEventListener("mouseup",o),window.addEventListener("mousemove",s),t.preventDefault(),!0}function Lge(e,t,{colspan:n,colwidth:r}){const i=r&&r[r.length-1];if(i)return i;const a=e.domAtPos(t);let s=a.node.childNodes[a.offset].offsetWidth,l=n;if(r)for(let u=0;u0?-1:0;hge(t,r,i+a)&&(a=i==0||i==t.width?null:0);for(let o=0;o0&&i0&&t.map[s-1]==l||i0&&c==t.map[u-t.width]){const d=n.nodeAt(c).attrs;e.setNodeMarkup(e.mapping.slice(s).map(c+r),null,{...d,rowspan:d.rowspan-1}),l+=d.colspan-1}else if(i{o.attrs[e]!==t&&a.setNodeMarkup(s,null,{...o.attrs,[e]:t})}):a.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[e]:t}),r(a)}return!0}}function Yge(e){return function(t,n){if(!Un(t))return!1;if(n){const r=_r(t.schema),i=Fo(t),a=t.tr,o=i.map.cellsInRect(e=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:e=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),s=o.map(l=>i.table.nodeAt(l));for(let l=0;l{const h=f+a.tableStart,m=o.doc.nodeAt(h);m&&o.setNodeMarkup(h,p,m.attrs)}),r(o)}return!0}}BT("row",{useDeprecatedLogic:!0});BT("column",{useDeprecatedLogic:!0});BT("cell",{useDeprecatedLogic:!0});function Kge(e,t){if(t<0){const n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let r=e.index(-1)-1,i=e.before();r>=0;r--){const a=e.node(-1).child(r),o=a.lastChild;if(o)return i-1-o.nodeSize;i-=a.nodeSize}}else{if(e.index()0;r--)if(n.node(r).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function Zge({allowTableNodeSelection:e=!1}={}){return new Rn({key:Xa,state:{init(){return null},apply(t,n){const r=t.getMeta(Xa);if(r!=null)return r==-1?null:r;if(n==null||!t.docChanged)return n;const{deleted:i,pos:a}=t.mapping.mapResult(n);return i?null:a}},props:{decorations:mge,handleDOMEvents:{mousedown:Rge},createSelectionBetween(t){return Xa.getState(t.state)!=null?t.state.selection:null},handleTripleClick:Cge,handleKeyDown:Age,handlePaste:Nge},appendTransaction(t,n,r){return bge(r,Sge(r,n),e)}})}const Re=(e,t)=>(Object.assign(e,{meta:{package:"@milkdown/preset-gfm",...t}}),e),zT=Yd("strike_through");Re(zT,{displayName:"Attr",group:"Strikethrough"});const h0=Wd("strike_through",e=>({parseDOM:[{tag:"del"},{style:"text-decoration",getAttrs:t=>t==="line-through"}],toDOM:t=>["del",e.get(zT.key)(t)],parseMarkdown:{match:t=>t.type==="delete",runner:(t,n,r)=>{t.openMark(r),t.next(n.children),t.closeMark(r)}},toMarkdown:{match:t=>t.type.name==="strike_through",runner:(t,n)=>{t.withMark(n,"delete")}}}));Re(h0.mark,{displayName:"MarkSchema",group:"Strikethrough"});Re(h0.ctx,{displayName:"MarkSchemaCtx",group:"Strikethrough"});const UT=Me("ToggleStrikeThrough",e=>()=>s0(h0.type(e)));Re(UT,{displayName:"Command",group:"Strikethrough"});const $T=Hn("strikeThroughKeymap",{ToggleStrikethrough:{shortcuts:"Mod-Alt-x",command:e=>{const t=e.get(Ve);return()=>t.call(UT.key)}}});Re($T.ctx,{displayName:"KeymapCtx",group:"Strikethrough"});Re($T.shortcuts,{displayName:"Keymap",group:"Strikethrough"});const eU=(e,t=3,n=3)=>{const r=Array(n).fill(0).map(()=>tp.type(e).createAndFill()),i=Array(n).fill(0).map(()=>g0.type(e).createAndFill()),a=Array(t).fill(0).map((o,s)=>ep.type(e).create(null,s===0?i:r));return Qd.type(e).create(null,a)},Iu=e=>mme(t=>t.type.spec.tableRole==="table")(e),hl=(e,t)=>{const n=Iu(t);if(!n)return;const r=Ge.get(n.node);if(!(e<0||e>=r.width))return r.cellsInRect({left:e,right:e+1,top:0,bottom:r.height}).map(i=>{const a=n.node.nodeAt(i);if(!a)return;const o=i+n.start;return{pos:o,start:o+1,node:a}}).filter(i=>i!=null)},ml=(e,t)=>{const n=Iu(t);if(!n)return;const r=Ge.get(n.node);if(!(e<0||e>=r.height))return r.cellsInRect({left:0,right:r.width,top:e,bottom:e+1}).map(i=>{const a=n.node.nodeAt(i);if(!a)return;const o=i+n.start;return{pos:o,start:o+1,node:a}}).filter(i=>i!=null)},Jge=e=>{const t=Iu(e);if(!t)return;const n=Ge.get(t.node);return n.cellsInRect({left:0,right:n.width,top:0,bottom:n.height}).map(r=>{const i=t.node.nodeAt(r),a=r+t.start;return{pos:a,start:a+1,node:i}})},Qge=e=>{const t=Jge(e.selection);if(t&&t[0]){const n=e.doc.resolve(t[0].pos),r=t[t.length-1];if(r){const i=e.doc.resolve(r.pos);return o0(e.setSelection(new Ue(i,n)))}}return e};function tU(e,t,{map:n,tableStart:r,table:i},a){const o=Array(a).fill(0).reduce((l,u,c)=>l+i.child(c).nodeSize,r),s=Array(n.width).fill(0).map((l,u)=>{const c=i.nodeAt(n.map[u]);return tp.type(e).createAndFill({alignment:c==null?void 0:c.attrs.alignment})});return t.insert(o,ep.type(e).create(null,s)),t}const nU=e=>t=>n=>{const r=Iu(n.selection),i=e==="row";if(r){const a=Ge.get(r.node);if(t>=0&&t<(i?a.height:a.width)){const o=a.positionAt(i?t:a.height-1,i?a.width-1:t,r.node),s=n.doc.resolve(r.start+o),l=i?Ue.rowSelection:Ue.colSelection,u=a.positionAt(i?t:0,i?0:t,r.node),c=n.doc.resolve(r.start+u);return o0(n.setSelection(l(s,c)))}}return n},e1e=nU("row"),t1e=nU("col"),f7=e=>e[0].map((t,n)=>e.map(r=>r[n])),rU=(e,t)=>{const n=[],r=Ge.get(e);for(let i=0;i{const t=Ge.get(e),n=[];for(let r=0;r{const i=t[0]>n[0]?-1:1,a=e.splice(t[0],t.length),o=a.length%2===0?1:0;let s;return r===-1&&i===1?s=n[0]-1:r===1&&i===-1?s=n[n.length-1]-o+1:s=i===-1?n[0]:n[n.length-1]-o,e.splice(s,0,...a),e},n1e=(e,t,n,r)=>{let i=f7(iU(e.node));return i=aU(i,t,n,r),i=f7(i),rU(e.node,i)},r1e=(e,t,n,r)=>{let i=iU(e.node);return i=aU(i,t,n,r),rU(e.node,i)},h7=(e,t)=>{let n=e,r=e;for(let c=e;c>=0;c--){const d=hl(c,t.selection);d&&d.forEach(p=>{const f=p.node.attrs.colspan+c-1;f>=n&&(n=c),f>r&&(r=f)})}for(let c=e;c<=r;c++){const d=hl(c,t.selection);d&&d.forEach(p=>{const f=p.node.attrs.colspan+c-1;p.node.attrs.colspan>1&&f>r&&(r=f)})}const i=[];for(let c=n;c<=r;c++){const d=hl(c,t.selection);d&&d.length&&i.push(c)}n=i[0],r=i[i.length-1];const a=hl(n,t.selection),o=ml(0,t.selection),s=t.doc.resolve(a[a.length-1].pos);let l;for(let c=r;c>=n;c--){const d=hl(c,t.selection);if(d&&d.length){for(let p=o.length-1;p>=0;p--)if(o[p].pos===d[0].pos){l=d[0];break}if(l)break}}const u=t.doc.resolve(l.pos);return{$anchor:s,$head:u,indexes:i}},m7=(e,t)=>{let n=e,r=e;for(let c=e;c>=0;c--)ml(c,t.selection).forEach(d=>{const p=d.node.attrs.rowspan+c-1;p>=n&&(n=c),p>r&&(r=p)});for(let c=e;c<=r;c++)ml(c,t.selection).forEach(d=>{const p=d.node.attrs.rowspan+c-1;d.node.attrs.rowspan>1&&p>r&&(r=p)});const i=[];for(let c=n;c<=r;c++){const d=ml(c,t.selection);d&&d.length&&i.push(c)}n=i[0],r=i[i.length-1];const a=ml(n,t.selection),o=hl(0,t.selection),s=t.doc.resolve(a[a.length-1].pos);let l;for(let c=r;c>=n;c--){const d=ml(c,t.selection);if(d&&d.length){for(let p=o.length-1;p>=0;p--)if(o[p].pos===d[0].pos){l=d[0];break}if(l)break}}const u=t.doc.resolve(l.pos);return{$anchor:s,$head:u,indexes:i}};function i1e(e,t,n,r=!0){const i=Iu(e.selection);if(!i)return e;const{indexes:a}=h7(t,e),{indexes:o}=h7(n,e);if(a.includes(n))return e;const s=n1e(i,a,o,0),l=o0(e).replaceWith(i.pos,i.pos+i.node.nodeSize,s);if(!r)return l;const u=Ge.get(s),c=i.start,d=n,p=u.positionAt(u.height-1,d,s),f=l.doc.resolve(c+p),h=Ue.colSelection,m=u.positionAt(0,d,s),S=l.doc.resolve(c+m);return l.setSelection(h(f,S))}function a1e(e,t,n,r=!0){const i=Iu(e.selection);if(!i)return e;const{indexes:a}=m7(t,e),{indexes:o}=m7(n,e);if(a.includes(n))return e;const s=r1e(i,a,o,0),l=o0(e).replaceWith(i.pos,i.pos+i.node.nodeSize,s);if(!r)return l;const u=Ge.get(s),c=i.start,d=n,p=u.positionAt(d,u.width-1,s),f=l.doc.resolve(c+p),h=Ue.rowSelection,m=u.positionAt(d,0,s),S=l.doc.resolve(c+m);return l.setSelection(h(f,S))}const m0=cge({tableGroup:"block",cellContent:"paragraph",cellAttributes:{alignment:{default:"left",getFromDOM:e=>e.style.textAlign||"left",setDOMAttr:(e,t)=>{t.style=`text-align: ${e||"left"}`}}}}),Qd=Qt("table",()=>({...m0.table,parseMarkdown:{match:e=>e.type==="table",runner:(e,t,n)=>{const r=t.align,i=t.children.map((a,o)=>({...a,align:r,isHeader:o===0}));e.openNode(n),e.next(i),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="table",runner:(e,t)=>{var n;const r=(n=t.content.firstChild)==null?void 0:n.content;if(!r)return;const i=[];r.forEach(a=>{i.push(a.attrs.alignment)}),e.openNode("table",void 0,{align:i}),e.next(t.content),e.closeNode()}}}));Re(Qd.node,{displayName:"NodeSchema",group:"Table"});Re(Qd.ctx,{displayName:"NodeSchemaCtx
",group:"Table"});const ep=Qt("table_row",()=>({...m0.table_row,parseMarkdown:{match:e=>e.type==="tableRow",runner:(e,t,n)=>{const r=t.align,i=t.children.map((a,o)=>({...a,align:r[o],isHeader:t.isHeader}));e.openNode(n),e.next(i),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="table_row",runner:(e,t)=>{e.openNode("tableRow"),e.next(t.content),e.closeNode()}}}));Re(ep.node,{displayName:"NodeSchema",group:"Table"});Re(ep.ctx,{displayName:"NodeSchemaCtx",group:"Table"});const tp=Qt("table_cell",()=>({...m0.table_cell,parseMarkdown:{match:e=>e.type==="tableCell"&&!e.isHeader,runner:(e,t,n)=>{const r=t.align;e.openNode(n,{alignment:r}).openNode(e.schema.nodes.paragraph).next(t.children).closeNode().closeNode()}},toMarkdown:{match:e=>e.type.name==="table_cell",runner:(e,t)=>{e.openNode("tableCell").next(t.content).closeNode()}}}));Re(tp.node,{displayName:"NodeSchema",group:"Table"});Re(tp.ctx,{displayName:"NodeSchemaCtx",group:"Table"});const g0=Qt("table_header",()=>({...m0.table_header,parseMarkdown:{match:e=>e.type==="tableCell"&&!!e.isHeader,runner:(e,t,n)=>{const r=t.align;e.openNode(n,{alignment:r}),e.openNode(e.schema.nodes.paragraph),e.next(t.children),e.closeNode(),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="table_header",runner:(e,t)=>{e.openNode("tableCell"),e.next(t.content),e.closeNode()}}}));Re(g0.node,{displayName:"NodeSchema",group:"Table"});Re(g0.ctx,{displayName:"NodeSchemaCtx",group:"Table"});const oU=Sa(e=>new ku(/^\|(?\d+)[xX](?\d+)\|\s$/,(t,n,r,i)=>{var a,o;const s=t.doc.resolve(r);if(!s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),Qd.type(e)))return null;const l=eU(e,Number((a=n.groups)==null?void 0:a.row),Number((o=n.groups)==null?void 0:o.col)),u=t.tr.replaceRangeWith(r,i,l);return u.setSelection(Pe.create(u.doc,r+3)).scrollIntoView()}));Re(oU,{displayName:"InputRule",group:"Table"});const jT=Me("GoToPrevTableCell",()=>()=>Qz(-1));Re(jT,{displayName:"Command",group:"Table"});const qT=Me("GoToNextTableCell",()=>()=>Qz(1));Re(qT,{displayName:"Command",group:"Table"});const HT=Me("BreakTable",e=>()=>(t,n)=>{if(!Un(t))return!1;const{$head:r}=t.selection,i=r.after(),a=t.tr.replaceWith(i,i,wa.type(e).createAndFill());return a.setSelection(Ce.near(a.doc.resolve(i),1)).scrollIntoView(),n==null||n(a),!0});Re(HT,{displayName:"Command",group:"Table"});const sU=Me("InsertTable",e=>({row:t,col:n}={})=>(r,i)=>{const{selection:a,tr:o}=r,{from:s}=a,l=eU(e,t,n),u=o.replaceSelectionWith(l),c=Ce.findFrom(u.doc.resolve(s),1,!0);return c&&u.setSelection(c),i==null||i(u),!0});Re(sU,{displayName:"Command",group:"Table"});const lU=Me("MoveRow",()=>({from:e,to:t}={})=>(n,r)=>{const{tr:i}=n;return!!(r!=null&&r(a1e(i,e??0,t??0,!0)))});Re(lU,{displayName:"Command",group:"Table"});const uU=Me("MoveCol",()=>({from:e,to:t}={})=>(n,r)=>{const{tr:i}=n;return!!(r!=null&&r(i1e(i,e??0,t??0,!0)))});Re(uU,{displayName:"Command",group:"Table"});const cU=Me("SelectRow",()=>(e=0)=>(t,n)=>{const{tr:r}=t;return!!(n!=null&&n(e1e(e)(r)))});Re(cU,{displayName:"Command",group:"Table"});const dU=Me("SelectCol",()=>(e=0)=>(t,n)=>{const{tr:r}=t;return!!(n!=null&&n(t1e(e)(r)))});Re(dU,{displayName:"Command",group:"Table"});const pU=Me("SelectTable",()=>()=>(e,t)=>{const{tr:n}=e;return!!(t!=null&&t(Qge(n)))});Re(pU,{displayName:"Command",group:"Table"});const fU=Me("DeleteSelectedCells",()=>()=>(e,t)=>{const{selection:n}=e;if(!(n instanceof Ue))return!1;const r=n.isRowSelection(),i=n.isColSelection();return r&&i?Xge(e,t):i?Hge(e,t):Gge(e,t)});Re(fU,{displayName:"Command",group:"Table"});const hU=Me("AddColBefore",()=>()=>$ge);Re(hU,{displayName:"Command",group:"Table"});const mU=Me("AddColAfter",()=>()=>jge);Re(mU,{displayName:"Command",group:"Table"});const gU=Me("AddRowBefore",e=>()=>(t,n)=>{if(!Un(t))return!1;if(n){const r=Fo(t);n(tU(e,t.tr,r,r.top))}return!0});Re(gU,{displayName:"Command",group:"Table"});const yU=Me("AddRowAfter",e=>()=>(t,n)=>{if(!Un(t))return!1;if(n){const r=Fo(t);n(tU(e,t.tr,r,r.bottom))}return!0});Re(yU,{displayName:"Command",group:"Table"});const bU=Me("SetAlign",()=>(e="left")=>Wge("alignment",e));Re(bU,{displayName:"Command",group:"Table"});const VT=Hn("tableKeymap",{NextCell:{shortcuts:["Mod-]","Tab"],command:e=>{const t=e.get(Ve);return()=>t.call(qT.key)}},PrevCell:{shortcuts:["Mod-[","Shift-Tab"],command:e=>{const t=e.get(Ve);return()=>t.call(jT.key)}},ExitTable:{shortcuts:["Mod-Enter"],command:e=>{const t=e.get(Ve);return()=>t.call(HT.key)}}});Re(VT.ctx,{displayName:"KeymapCtx
",group:"Table"});Re(VT.shortcuts,{displayName:"Keymap
",group:"Table"});const Sw="footnote_definition",g7="footnoteDefinition",GT=Qt("footnote_definition",()=>({group:"block",content:"block+",defining:!0,attrs:{label:{default:""}},parseDOM:[{tag:`dl[data-type="${Sw}"]`,getAttrs:e=>{if(!(e instanceof HTMLElement))throw Pi(e);return{label:e.dataset.label}},contentElement:"dd"}],toDOM:e=>{const t=e.attrs.label;return["dl",{"data-label":t,"data-type":Sw},["dt",t],["dd",0]]},parseMarkdown:{match:({type:e})=>e===g7,runner:(e,t,n)=>{e.openNode(n,{label:t.label}).next(t.children).closeNode()}},toMarkdown:{match:e=>e.type.name===Sw,runner:(e,t)=>{e.openNode(g7,void 0,{label:t.attrs.label,identifier:t.attrs.label}).next(t.content).closeNode()}}}));Re(GT.ctx,{displayName:"NodeSchemaCtx",group:"footnote"});Re(GT.node,{displayName:"NodeSchema",group:"footnote"});const ww="footnote_reference",WT=Qt("footnote_reference",()=>({group:"inline",inline:!0,atom:!0,attrs:{label:{default:""}},parseDOM:[{tag:`sup[data-type="${ww}"]`,getAttrs:e=>{if(!(e instanceof HTMLElement))throw Pi(e);return{label:e.dataset.label}}}],toDOM:e=>{const t=e.attrs.label;return["sup",{"data-label":t,"data-type":ww},t]},parseMarkdown:{match:({type:e})=>e==="footnoteReference",runner:(e,t,n)=>{e.addNode(n,{label:t.label})}},toMarkdown:{match:e=>e.type.name===ww,runner:(e,t)=>{e.addNode("footnoteReference",void 0,void 0,{label:t.attrs.label,identifier:t.attrs.label})}}}));Re(WT.ctx,{displayName:"NodeSchemaCtx",group:"footnote"});Re(WT.node,{displayName:"NodeSchema",group:"footnote"});const vU=Ci.extendSchema(e=>t=>{const n=e(t);return{...n,attrs:{...n.attrs,checked:{default:null}},parseDOM:[{tag:'li[data-item-type="task"]',getAttrs:r=>{if(!(r instanceof HTMLElement))throw Pi(r);return{label:r.dataset.label,listType:r.dataset["list-type"],spread:r.dataset.spread,checked:r.dataset.checked?r.dataset.checked==="true":null}}},...(n==null?void 0:n.parseDOM)||[]],toDOM:r=>n.toDOM&&r.attrs.checked==null?n.toDOM(r):["li",{"data-item-type":"task","data-label":r.attrs.label,"data-list-type":r.attrs.listType,"data-spread":r.attrs.spread,"data-checked":r.attrs.checked},0],parseMarkdown:{match:({type:r})=>r==="listItem",runner:(r,i,a)=>{if(i.checked==null){n.parseMarkdown.runner(r,i,a);return}const o=i.label!=null?`${i.label}.`:"•",s=i.checked!=null?!!i.checked:null,l=i.label!=null?"ordered":"bullet",u=i.spread!=null?`${i.spread}`:"true";r.openNode(a,{label:o,listType:l,spread:u,checked:s}),r.next(i.children),r.closeNode()}},toMarkdown:{match:r=>r.type.name==="list_item",runner:(r,i)=>{if(i.attrs.checked==null){n.toMarkdown.runner(r,i);return}const a=i.attrs.label,o=i.attrs.listType,s=i.attrs.spread==="true",l=i.attrs.checked;r.openNode("listItem",void 0,{label:a,listType:o,spread:s,checked:l}),r.next(i.content),r.closeNode()}}}});Re(vU,{displayName:"NodeSchema",group:"ListItem"});const SU=Sa(()=>new ku(/^\[(?\s|x)\]\s$/,(e,t,n,r)=>{var i;const a=e.doc.resolve(n);let o=0,s=a.node(o);for(;s&&s.type.name!=="list_item";)o--,s=a.node(o);if(!s||s.attrs.checked!=null)return null;const l=((i=t.groups)==null?void 0:i.checked)==="x",u=a.before(o),c=e.tr;return c.deleteRange(n,r).setNodeMarkup(u,void 0,{...s.attrs,checked:l}),c}));Re(SU,{displayName:"InputRule",group:"ListItem"});const o1e=[$T,VT].flat(),s1e=[oU,SU],wU=Fi(e=>{const t=new fn("MILKDOWN_AUTO_INSERT_ZERO_SPACE"),n=i=>i.type===wa.type(e),r=i=>n(i)&&i.nodeSize===2;return new Rn({key:t,props:{handleDOMEvents:{compositionstart(i){const{state:a,dispatch:o}=i,{tr:s,selection:l}=a,{$from:u}=l;return Q_.safari&&Un(a)&&l.empty&&r(u.parent)&&o(s.insertText("⁠",u.start())),!1},compositionend(i){const{state:a,dispatch:o}=i,{tr:s,selection:l}=a,{$from:u}=l;return Q_.safari&&Un(a)&&l.empty&&n(u.parent)&&u.parent.textContent.startsWith("⁠")&&o(s.delete(u.start(),u.start()+1)),!1}}}})});Re(wU,{displayName:"Prose",group:"Prose"});const EU=Fi(()=>Oge({}));Re(EU,{displayName:"Prose",group:"Prose"});const xU=Fi(()=>Zge());Re(xU,{displayName:"Prose",group:"Prose"});const YT=Tu("remarkGFM",()=>I9);Re(YT.plugin,{displayName:"Remark",group:"Remark"});Re(YT.options,{displayName:"RemarkConfig",group:"Remark"});const l1e=[wU,EU,xU,YT].flat(),u1e=[vU,Qd,ep,g0,tp,GT,WT,zT,h0].flat(),c1e=[qT,jT,HT,sU,lU,uU,cU,dU,pU,fU,gU,yU,hU,mU,bU,UT],d1e=[u1e,s1e,o1e,l1e,c1e].flat();var Vh=200,qt=function(){};qt.prototype.append=function(t){return t.length?(t=qt.from(t),!this.length&&t||t.length=n?qt.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};qt.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};qt.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)};qt.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(a,o){return i.push(t(a,o))},n,r),i};qt.from=function(t){return t instanceof qt?t:t&&t.length?new kU(t):qt.empty};var kU=function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(i,a){return i==0&&a==this.length?this:new t(this.values.slice(i,a))},t.prototype.getInner=function(i){return this.values[i]},t.prototype.forEachInner=function(i,a,o,s){for(var l=a;l=o;l--)if(i(this.values[l],s+l)===!1)return!1},t.prototype.leafAppend=function(i){if(this.length+i.length<=Vh)return new t(this.values.concat(i.flatten()))},t.prototype.leafPrepend=function(i){if(this.length+i.length<=Vh)return new t(i.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(qt);qt.empty=new kU([]);var p1e=function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return rs&&this.right.forEachInner(r,Math.max(i-s,0),Math.min(this.length,a)-s,o+s)===!1)return!1},t.prototype.forEachInvertedInner=function(r,i,a,o){var s=this.left.length;if(i>s&&this.right.forEachInvertedInner(r,i-s,Math.max(a,s)-s,o+s)===!1||a=a?this.right.slice(r-a,i-a):this.left.slice(r,a).append(this.right.slice(0,i-a))},t.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new t(this.left,i)},t.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new t(i,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t}(qt);const f1e=500;class Yr{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,a;n&&(i=this.remapping(r,this.items.length),a=i.maps.length);let o=t.tr,s,l,u=[],c=[];return this.items.forEach((d,p)=>{if(!d.step){i||(i=this.remapping(r,p+1),a=i.maps.length),a--,c.push(d);return}if(i){c.push(new ui(d.map));let f=d.step.map(i.slice(a)),h;f&&o.maybeStep(f).doc&&(h=o.mapping.maps[o.mapping.maps.length-1],u.push(new ui(h,void 0,void 0,u.length+c.length))),a--,h&&i.appendMap(h,a)}else o.maybeStep(d.step);if(d.selection)return s=i?d.selection.map(i.slice(a)):d.selection,l=new Yr(this.items.slice(0,r).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:o,selection:s}}addTransform(t,n,r,i){let a=[],o=this.eventCount,s=this.items,l=!i&&s.length?s.get(s.length-1):null;for(let c=0;cm1e&&(s=h1e(s,u),o-=u),new Yr(s.append(a),o)}remapping(t,n){let r=new ql;return this.items.forEach((i,a)=>{let o=i.mirrorOffset!=null&&a-i.mirrorOffset>=t?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,o)},t,n),r}addMaps(t){return this.eventCount==0?this:new Yr(this.items.append(t.map(n=>new ui(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),a=t.mapping,o=t.steps.length,s=this.eventCount;this.items.forEach(p=>{p.selection&&s--},i);let l=n;this.items.forEach(p=>{let f=a.getMirror(--l);if(f==null)return;o=Math.min(o,f);let h=a.maps[f];if(p.step){let m=t.steps[f].invert(t.docs[f]),S=p.selection&&p.selection.map(a.slice(l+1,f));S&&s++,r.push(new ui(h,m,S))}else r.push(new ui(h))},i);let u=[];for(let p=n;pf1e&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],a=0;return this.items.forEach((o,s)=>{if(s>=t)i.push(o),o.selection&&a++;else if(o.step){let l=o.step.map(n.slice(r)),u=l&&l.getMap();if(r--,u&&n.appendMap(u,r),l){let c=o.selection&&o.selection.map(n.slice(r));c&&a++;let d=new ui(u.invert(),l,c),p,f=i.length-1;(p=i.length&&i[f].merge(d))?i[f]=p:i.push(d)}}else o.map&&r--},this.items.length,0),new Yr(qt.from(i.reverse()),a)}}Yr.empty=new Yr(qt.empty,0);function h1e(e,t){let n;return e.forEach((r,i)=>{if(r.selection&&t--==0)return n=i,!1}),e.slice(n)}class ui{constructor(t,n,r,i){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=i}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new ui(n.getMap().invert(),n,this.selection)}}}class Va{constructor(t,n,r,i,a){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=a}}const m1e=20;function g1e(e,t,n,r){let i=n.getMeta(mo),a;if(i)return i.historyState;n.getMeta(b1e)&&(e=new Va(e.done,e.undone,null,0,-1));let o=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(o&&o.getMeta(mo))return o.getMeta(mo).redo?new Va(e.done.addTransform(n,void 0,r,Hf(t)),e.undone,y7(n.mapping.maps[n.steps.length-1]),e.prevTime,e.prevComposition):new Va(e.done,e.undone.addTransform(n,void 0,r,Hf(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let s=n.getMeta("composition"),l=e.prevTime==0||!o&&e.prevComposition!=s&&(e.prevTime<(n.time||0)-r.newGroupDelay||!y1e(n,e.prevRanges)),u=o?Ew(e.prevRanges,n.mapping):y7(n.mapping.maps[n.steps.length-1]);return new Va(e.done.addTransform(n,l?t.selection.getBookmark():void 0,r,Hf(t)),Yr.empty,u,n.time,s??e.prevComposition)}else return(a=n.getMeta("rebased"))?new Va(e.done.rebased(n,a),e.undone.rebased(n,a),Ew(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new Va(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),Ew(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function y1e(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,i)=>{for(let a=0;a=t[a]&&(n=!0)}),n}function y7(e){let t=[];return e.forEach((n,r,i,a)=>t.push(i,a)),t}function Ew(e,t){if(!e)return null;let n=[];for(let r=0;r{let n=mo.getState(e);return!n||n.done.eventCount==0?!1:(t&&TU(n,e,t,!1),!0)},CU=(e,t)=>{let n=mo.getState(e);return!n||n.undone.eventCount==0?!1:(t&&TU(n,e,t,!0),!0)},Ou=(e,t)=>(Object.assign(e,{meta:{package:"@milkdown/plugin-history",...t}}),e),y0=Me("Undo",()=>()=>AU);Ou(y0,{displayName:"Command"});const NU=Me("Undo",()=>()=>CU);Ou(y0,{displayName:"Command"});const KT=Bi({},"historyProviderConfig");Ou(KT,{displayName:"Ctx"});const RU=Fi(e=>v1e(e.get(KT.key)));Ou(RU,{displayName:"Ctx"});const XT=Hn("historyKeymap",{Undo:{shortcuts:"Mod-z",command:e=>{const t=e.get(Ve);return()=>t.call(y0.key)}},Redo:{shortcuts:["Mod-y","Shift-Mod-z"],command:e=>{const t=e.get(Ve);return()=>t.call(NU.key)}}});Ou(XT.ctx,{displayName:"KeymapCtx"});Ou(XT.shortcuts,{displayName:"Keymap"});const S1e=[KT,RU,XT,y0,NU].flat();var w1e="Expected a function",v7=0/0,E1e="[object Symbol]",x1e=/^\s+|\s+$/g,k1e=/^[-+]0x[0-9a-f]+$/i,T1e=/^0b[01]+$/i,A1e=/^0o[0-7]+$/i,C1e=parseInt,N1e=typeof Kr=="object"&&Kr&&Kr.Object===Object&&Kr,R1e=typeof self=="object"&&self&&self.Object===Object&&self,I1e=N1e||R1e||Function("return this")(),O1e=Object.prototype,_1e=O1e.toString,M1e=Math.max,D1e=Math.min,kw=function(){return I1e.Date.now()};function L1e(e,t,n){var r,i,a,o,s,l,u=0,c=!1,d=!1,p=!0;if(typeof e!="function")throw new TypeError(w1e);t=S7(t)||0,Jx(n)&&(c=!!n.leading,d="maxWait"in n,a=d?M1e(S7(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p);function f(E){var N=r,_=i;return r=i=void 0,u=E,o=e.apply(_,N),o}function h(E){return u=E,s=setTimeout(y,t),c?f(E):o}function m(E){var N=E-l,_=E-u,M=t-N;return d?D1e(M,a-_):M}function S(E){var N=E-l,_=E-u;return l===void 0||N>=t||N<0||d&&_>=a}function y(){var E=kw();if(S(E))return g(E);s=setTimeout(y,m(E))}function g(E){return s=void 0,p&&r?f(E):(r=i=void 0,o)}function v(){s!==void 0&&clearTimeout(s),u=0,r=l=i=s=void 0}function x(){return s===void 0?o:g(kw())}function A(){var E=kw(),N=S(E);if(r=arguments,i=this,l=E,N){if(s===void 0)return h(l);if(d)return s=setTimeout(y,t),f(l)}return s===void 0&&(s=setTimeout(y,t)),o}return A.cancel=v,A.flush=x,A}function Jx(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function P1e(e){return!!e&&typeof e=="object"}function F1e(e){return typeof e=="symbol"||P1e(e)&&_1e.call(e)==E1e}function S7(e){if(typeof e=="number")return e;if(F1e(e))return v7;if(Jx(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Jx(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(x1e,"");var n=T1e.test(e);return n||A1e.test(e)?C1e(e.slice(2),n?2:8):k1e.test(e)?v7:+e}var B1e=L1e;const z1e=sr(B1e);class IU{constructor(){this.beforeMountedListeners=[],this.mountedListeners=[],this.updatedListeners=[],this.markdownUpdatedListeners=[],this.blurListeners=[],this.focusListeners=[],this.destroyListeners=[],this.beforeMount=t=>(this.beforeMountedListeners.push(t),this),this.mounted=t=>(this.mountedListeners.push(t),this),this.updated=t=>(this.updatedListeners.push(t),this)}get listeners(){return{beforeMount:this.beforeMountedListeners,mounted:this.mountedListeners,updated:this.updatedListeners,markdownUpdated:this.markdownUpdatedListeners,blur:this.blurListeners,focus:this.focusListeners,destroy:this.destroyListeners}}markdownUpdated(t){return this.markdownUpdatedListeners.push(t),this}blur(t){return this.blurListeners.push(t),this}focus(t){return this.focusListeners.push(t),this}destroy(t){return this.destroyListeners.push(t),this}}const Qx=He(new IU,"listener"),U1e=new fn("MILKDOWN_LISTENER"),OU=e=>(e.inject(Qx,new IU),async()=>{await e.wait(ws);const t=e.get(Qx),{listeners:n}=t;n.beforeMount.forEach(s=>s(e)),await e.wait(qc);const r=e.get(Hc);let i=null,a=null;const o=new Rn({key:U1e,view:()=>({destroy:()=>{n.destroy.forEach(s=>s(e))}}),props:{handleDOMEvents:{focus:()=>(n.focus.forEach(s=>s(e)),!1),blur:()=>(n.blur.forEach(s=>s(e)),!1)}},state:{init:()=>{},apply:s=>!s.docChanged||s.getMeta("addToHistory")===!1?void 0:z1e(()=>{const{doc:l}=s;if(n.updated.length>0&&(i==null||!i.eq(l))&&n.updated.forEach(u=>{u(e,l,i)}),n.markdownUpdated.length>0&&(i==null||!i.eq(l))){const u=r(l);n.markdownUpdated.forEach(c=>{c(e,u,a)}),a=u}i=l},200)()}});e.update(Ai,s=>s.concat(o)),await e.wait(Ff),n.mounted.forEach(s=>s(e))});OU.meta={package:"@milkdown/plugin-listener",displayName:"Listener"};const $1e=()=>{const{typoraMd:e,setTyporaMd:t}=Ht(n=>({typoraMd:n.typoraMd,setTyporaMd:n.setTyporaMd}));return e0e(n=>Xme.make().config(r=>{r.set(Vc,n),r.set(Lf,e),r.get(Qx).mounted(i=>{const a=i.get(Vc),o=a.querySelector(".editor[role='textbox']");a.onclick=()=>o==null?void 0:o.focus()}).markdownUpdated((i,a)=>t(a)),n.className="typora bg-white dark:bg-gray-800 c-text-700 h-full overflow-y-scroll"}).use(OU).use(age).use(d1e).use(S1e)),k.jsx(Jme,{})};function j1e(){return k.jsx(Qme,{children:k.jsx($1e,{})})}function q1e(){return k.jsx("iframe",{className:"h-full w-full bg-vscode",src:"https://github1s.com/Renovamen/playground-macos/blob/main/README.md",title:"VSCode"})}const Wc=[{id:"launchpad",title:"Launchpad",desktop:!1,img:"img/icons/launchpad.png"},{id:"bear",title:"Bear",desktop:!0,width:860,height:500,show:!0,y:-40,img:"img/icons/bear.png",content:k.jsx(Rde,{})},{id:"typora",title:"Typora",desktop:!0,width:600,height:580,y:-20,img:"img/icons/typora.png",content:k.jsx(j1e,{})},{id:"safari",title:"Safari",desktop:!0,width:1024,minWidth:375,minHeight:200,x:-20,img:"img/icons/safari.png",content:k.jsx(BW,{})},{id:"vscode",title:"VSCode",desktop:!0,width:900,height:600,x:80,y:-30,img:"img/icons/vscode.png",content:k.jsx(q1e,{})},{id:"facetime",title:"FaceTime",desktop:!0,img:"img/icons/facetime.png",width:500*1.7,height:500+FE,minWidth:350*1.7,minHeight:350+FE,aspectRatio:1.7,x:-80,y:20,content:k.jsx(_W,{})},{id:"terminal",title:"Terminal",desktop:!0,img:"img/icons/terminal.png",content:k.jsx(LW,{})},{id:"github",title:"Github",desktop:!1,img:"img/icons/github.png",link:"https://github.com/Renovamen/playground-macos"}],ek=[{id:"flint",title:"Flint",img:"img/icons/launchpad/flint.png",link:"https://github.com/Renovamen/flint"},{id:"oh-my-cv",title:"Oh, My CV!",img:"https://ohmycv.app/pwa-512x512.png",link:"https://ohmycv.app"},{id:"oh-vue-icons",title:"Oh, Vue Icons!",img:"img/icons/launchpad/oh-vue-icons.png",link:"https://oh-vue-icons.js.org"},{id:"gungnir",title:"Gungnir",img:"img/icons/launchpad/gungnir.png",link:"https://vuepress-theme-gungnir.vercel.app/"},{id:"what-if",title:"My Notebook",img:"img/icons/launchpad/notebook.png",link:"https://note.zxh.io"},{id:"cube",title:"Cube Solver",img:"img/icons/launchpad/cube.png",link:"https://cube.zxh.io/"},{id:"resume",title:"Résumé",img:"img/icons/launchpad/resume.png",link:"https://resume.zxh.io/"},{id:"zelda",title:"Webpage for Zelda",img:"img/icons/launchpad/zelda.png",link:"https://zelda.zxh.io/"},{id:"fishmail",title:"Fishmail",img:"img/icons/launchpad/fishmail.png",link:"https://fishmail.vercel.app/"}],Vf={title:"Sunflower",artist:"Post Malone / Swae Lee",cover:"//p1.music.126.net/z0IO1vEsowL9mD_5yzUjeA==/109951163936068098.jpg",audio:"music/sunflower.mp3"},H1e=[{id:"about",title:"about",type:"folder",children:[{id:"about-bio",title:"bio.txt",type:"file",content:k.jsx("div",{className:"py-1",children:k.jsx("div",{children:"Hi, this is Xiaohan Zou. I received my master's degree in Computer Science at Boston University and bachelor's degree in Software Engineering at Tongji University."})})},{id:"about-interests",title:"interests.txt",type:"file",content:"Machine Learning / Computer Vision / Vision-Language Learning"},{id:"about-who-cares",title:"who-cares.txt",type:"file",content:"I'm a incoming Ph.D. student lol."},{id:"about-contact",title:"contact.txt",type:"file",content:k.jsxs("ul",{className:"list-disc ml-6",children:[k.jsxs("li",{children:["Email:"," ",k.jsx("a",{className:"text-blue-300",href:"mailto:renovamenzxh@gmail.com",target:"_blank",rel:"noreferrer",children:"renovamenzxh@gmail.com"})]}),k.jsxs("li",{children:["Github:"," ",k.jsx("a",{className:"text-blue-300",href:"https://github.com/Renovamen",target:"_blank",rel:"noreferrer",children:"@Renovamen"})]}),k.jsx("li",{children:k.jsx("a",{className:"text-blue-300",href:"https://scholar.google.com/citations?user=RuW6xgMAAAAJ",target:"_blank",rel:"noreferrer",children:"Google Scholar"})}),k.jsxs("li",{children:["Linkedin:"," ",k.jsx("a",{className:"text-blue-300",href:"https://www.linkedin.com/in/xiaohan-zou",target:"_blank",rel:"noreferrer",children:"xiaohan-zou"})]}),k.jsxs("li",{children:["Personal Website:"," ",k.jsx("a",{className:"text-blue-300",href:"https://zxh.io",target:"_blank",rel:"noreferrer",children:"https://zxh.io"})]}),k.jsxs("li",{children:["知乎:"," ",k.jsx("a",{className:"text-blue-300",href:"https://www.zhihu.com/people/chao-neng-gui-su",target:"_blank",rel:"noreferrer",children:"@西伯利亚大恶龙"})]})]})}]},{id:"about-dream",title:"my-dream.cpp",type:"file",content:k.jsxs("div",{className:"py-1",children:[k.jsxs("div",{children:[k.jsx("span",{className:"text-yellow-400",children:"while"}),"(",k.jsx("span",{className:"text-blue-400",children:"sleeping"}),") ",k.jsx("span",{children:"{"})]}),k.jsxs("div",{children:[k.jsx("span",{className:"text-blue-400 ml-9",children:"money"}),k.jsx("span",{className:"text-yellow-400",children:"++"}),";"]}),k.jsx("div",{children:k.jsx("span",{children:"}"})})]})}],Tw=H1e,w7={name:"Xiaohan Zou",avatar:"img/ui/avatar.jpg",password:""},Ni={day:"img/ui/wallpaper-day.jpg",night:"img/ui/wallpaper-night.jpg"},E7={favorites:{title:"SNS Links",sites:[{id:"my-blog",title:"Website",img:"https://zxh.io/img/avatar.jpg",link:"https://zxh.io/",inner:!0},{id:"my-github",title:"Github",img:"img/sites/github.svg",link:"https://github.com/Renovamen"},{id:"my-linkedin",title:"Linkedin",img:"img/sites/linkedin.svg",link:"https://www.linkedin.com/in/xiaohan-zou"},{id:"my-google-scholar",title:"Scholar",img:"img/sites/google-scholar.svg",link:"https://scholar.google.com/citations?user=RuW6xgMAAAAJ"},{id:"my-zhihu",title:"知乎",img:"img/sites/zhihu.jpeg",link:"https://www.zhihu.com/people/chao-neng-gui-su"},{id:"my-twitter",title:"Twitter",img:"img/sites/twitter.svg",link:"https://www.twitter.com/renovamen_zxh"},{id:"my-email",title:"Email",img:"img/sites/gmail.svg",link:"mailto:renovamenzxh@gmail.com"}]},freq:{title:"Frequently Visited",sites:[{id:"github",title:"Github",img:"img/sites/github.svg",link:"https://github.com/"},{id:"arxiv",title:"arXiv",img:"img/sites/arxiv.png",link:"https://arxiv.org/"},{id:"twitter",title:"Twitter",img:"img/sites/twitter.svg",link:"https://www.twitter.com/"},{id:"dribbble",title:"Dribbble",img:"img/sites/dribbble.svg",link:"https://dribbble.com/"},{id:"pinterest",title:"Pinterest",img:"img/sites/pinterest.svg",link:"https://www.pinterest.com/"},{id:"art-station",title:"ArtStation",img:"img/sites/artstation.svg",link:"https://www.artstation.com//"},{id:"bilibili",title:"Bilibili",img:"img/sites/bilibili.svg",link:"https://www.bilibili.com/"},{id:"zhihu",title:"知乎",img:"img/sites/zhihu.jpeg",link:"https://www.zhihu.com/"},{id:"leetcode",title:"LeetCode",img:"img/sites/leetcode.svg",link:"https://leetcode.com/"},{id:"reddit",title:"Reddit",img:"img/sites/reddit.svg",link:"https://www.reddit.com/"},{id:"hacker-news",title:"Hacker News",img:"img/sites/hacker.svg",link:"https://news.ycombinator.com/"},{id:"v2ex",title:"V2EX",img:"https://www.v2ex.com/apple-touch-icon.png",link:"https://www.v2ex.com/"},{id:"aideadline",title:"AI Deadlines",img:"https://aideadlin.es/static/img/favicon.png",link:"https://aideadlin.es/",inner:!0},{id:"oh-my-cv",title:"OhMyCV",img:"https://ohmycv.app/apple-touch-icon.png",link:"https://ohmycv.app/"},{id:"steam",title:"Steam",img:"img/sites/steam.svg",link:"https://store.steampowered.com/"},{id:"nazo",title:"Nazo",link:"https://nazo.one-story.cn"},{id:"svgomg",title:"SVGOMG",img:"https://jakearchibald.github.io/svgomg/imgs/icon.png",link:"https://jakearchibald.github.io/svgomg/"},{id:"tiny-png",title:"Tiny PNG",img:"https://tinypng.com/images/panda-chewing-2x.png",link:"https://tinypng.com/"}]}},x7=({icon:e,value:t,setValue:n})=>k.jsxs("div",{className:"slider flex w-full",children:[k.jsx("div",{className:"w-7 h-7 flex-center c-bg-100 c-border-300",border:"t l b rounded-l-full",children:k.jsx("span",{className:`${e} c-text-500 text-xs`})}),k.jsx(CW,{min:1,max:100,value:t,tooltip:!1,orientation:"horizontal",onChange:r=>n(r)})]});function V1e({toggleControlCenter:e,toggleAudio:t,setBrightness:n,setVolume:r,playing:i,btnRef:a}){const o=q.useRef(null),{dark:s,wifi:l,brightness:u,bluetooth:c,airdrop:d,fullscreen:p,volume:f}=Ht(v=>({dark:v.dark,wifi:v.wifi,brightness:v.brightness,bluetooth:v.bluetooth,airdrop:v.airdrop,fullscreen:v.fullscreen,volume:v.volume})),{toggleWIFI:h,toggleBluetooth:m,toggleAirdrop:S,toggleDark:y,toggleFullScreen:g}=Ht(v=>({toggleWIFI:v.toggleWIFI,toggleBluetooth:v.toggleBluetooth,toggleAirdrop:v.toggleAirdrop,toggleDark:v.toggleDark,toggleFullScreen:v.toggleFullScreen}));return vm(o,e,[a]),k.jsxs("div",{className:"fixed grid shadow-menu w-80 h-96 max-w-full top-9.5 right-0 sm:right-1.5 p-2.5 c-text-black c-bg-100/70 border rounded-2xl menu-border",grid:"cols-4 rows-5 gap-2",ref:o,children:[k.jsxs("div",{className:"cc-grid row-span-2 col-span-2 p-2 flex flex-col justify-around",children:[k.jsxs("div",{className:"hstack space-x-2",children:[k.jsx("div",{className:`${l?"cc-btn":"cc-btn-active"}`,onClick:h,children:k.jsx("span",{className:"i-material-symbols:wifi text-base"})}),k.jsxs("div",{className:"flex flex-col pt-0.5",children:[k.jsx("span",{className:"font-medium leading-4",children:"Wi-Fi"}),k.jsx("span",{className:"cc-text",children:l?"Home":"Off"})]})]}),k.jsxs("div",{className:"hstack space-x-2",children:[k.jsx("div",{className:`${c?"cc-btn":"cc-btn-active"}`,onClick:m,children:k.jsx("span",{className:"i-charm:bluetooth text-base"})}),k.jsxs("div",{className:"flex flex-col pt-0.5",children:[k.jsx("span",{className:"font-medium leading-4",children:"Bluetooth"}),k.jsx("span",{className:"cc-text",children:c?"On":"Off"})]})]}),k.jsxs("div",{className:"hstack space-x-2",children:[k.jsx("div",{className:`${d?"cc-btn":"cc-btn-active"}`,onClick:S,children:k.jsx("span",{className:"i-material-symbols:rss-feed-rounded text-base"})}),k.jsxs("div",{className:"flex flex-col pt-0.5",children:[k.jsx("span",{className:"font-medium leading-4",children:"AirDrop"}),k.jsx("span",{className:"cc-text",children:d?"Contacts Only":"Off"})]})]})]}),k.jsxs("div",{className:"cc-grid col-span-2 p-2 hstack space-x-2",children:[k.jsx("div",{className:`${s?"cc-btn":"cc-btn-active"}`,onClick:y,children:s?k.jsx("span",{className:"i-ion:moon text-base"}):k.jsx("span",{className:"i-ion:sunny text-base"})}),k.jsx("div",{className:"flex flex-col",children:k.jsx("span",{className:"font-medium ml-1",children:s?"Dark Mode":"Light Mode"})})]}),k.jsxs("div",{className:"cc-grid p-2 flex-center flex-col text-center",children:[k.jsx("span",{className:"i-bi:brightness-alt-high text-xl"}),k.jsx("span",{className:"text-xs leading-3.5",children:"Keyboard Brightness"})]}),k.jsxs("div",{className:"cc-grid p-2 flex-center flex-col text-center cursor-default",onClick:()=>g(!p),children:[p?k.jsx("span",{className:"i-bi:fullscreen-exit text-base"}):k.jsx("span",{className:"i-bi:fullscreen text-base"}),k.jsx("span",{className:"text-xs leading-3.5 mt-1.5",children:p?"Exit Fullscreen":"Enter Fullscreen"})]}),k.jsxs("div",{className:"cc-grid col-span-4 px-2.5 py-2 space-y-1 flex flex-col justify-around",children:[k.jsx("span",{className:"font-medium ml-0.5",children:"Display"}),k.jsx(x7,{icon:"i-ion:sunny",value:u,setValue:n})]}),k.jsxs("div",{className:"cc-grid col-span-4 px-2.5 py-2 space-y-1 flex flex-col justify-around",children:[k.jsx("span",{className:"font-medium ml-0.5",children:"Sound"}),k.jsx(x7,{icon:"i-ion:volume-high",value:f,setValue:r})]}),k.jsxs("div",{className:"cc-grid col-span-4 p-2 pr-4 hstack flex-row justify-between space-x-2.5",children:[k.jsx("img",{src:Vf.cover,alt:"cover art",className:"w-12 rounded-lg"}),k.jsxs("div",{className:"flex flex-col flex-grow justify-start",children:[k.jsx("span",{className:"font-medium",children:Vf.title}),k.jsx("span",{className:"cc-text",children:Vf.artist})]}),i?k.jsx("span",{className:"i-bi:pause-fill text-2xl",onClick:()=>t(!1)}):k.jsx("span",{className:"i-bi:play-fill text-2xl",onClick:()=>t(!0)})]})]})}const Ua=q.forwardRef((e,t)=>{const n=e.hideOnMobile?"hidden sm:inline-flex":"inline-flex",r=e.forceHover?"bg-gray-100/30 dark:bg-gray-400/40":"hover:bg-gray-100/30 hover:dark:bg-gray-400/40";return k.jsx("div",{ref:t,className:`hstack space-x-1 h-6 px-1 cursor-default rounded ${n} ${r} ${e.className||""}`,onClick:e.onClick,onMouseEnter:e.onMouseEnter,children:e.children})});Ua.displayName="TopBarItem";const G1e=({size:e})=>k.jsx("svg",{viewBox:"0 0 29 29",width:e,height:e,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",children:k.jsx("path",{d:"M7.5,13h14a5.5,5.5,0,0,0,0-11H7.5a5.5,5.5,0,0,0,0,11Zm0-9h14a3.5,3.5,0,0,1,0,7H7.5a3.5,3.5,0,0,1,0-7Zm0,6A2.5,2.5,0,1,0,5,7.5,2.5,2.5,0,0,0,7.5,10Zm14,6H7.5a5.5,5.5,0,0,0,0,11h14a5.5,5.5,0,0,0,0-11Zm1.43439,8a2.5,2.5,0,1,1,2.5-2.5A2.5,2.5,0,0,1,22.93439,24Z"})}),W1e=e=>{const t=q.useRef(null),n=q.useRef(null),r=q.useRef(null),i=q.useRef(null),[a,o]=q.useState({date:new Date,showControlCenter:!1,showWifiMenu:!1,showAppleMenu:!1}),[s,l,u,c]=iG({src:Vf.audio,autoReplay:!0}),{winWidth:d,winHeight:p}=p2(),{volume:f,wifi:h}=Ht(z=>({volume:z.volume,wifi:z.wifi})),{toggleFullScreen:m,setVolume:S,setBrightness:y}=Ht(z=>({toggleFullScreen:z.toggleFullScreen,setVolume:z.setVolume,setBrightness:z.setBrightness}));sL(()=>{o({...a,date:new Date})},60*1e3),q.useEffect(()=>{e.setSpotlightBtnRef(i),u.volume(f/100)},[]),q.useEffect(()=>{const z=f2();m(z)},[d,p]);const g=z=>{S(z),u.volume(z/100)},v=z=>{y(z)},x=()=>{o({...a,showControlCenter:!a.showControlCenter})},A=()=>{o({...a,showAppleMenu:!a.showAppleMenu})},E=()=>{o({...a,showWifiMenu:!a.showWifiMenu})},N=()=>{u.pause(),e.setLogin(!1)},_=z=>{u.pause(),e.shutMac(z)},M=z=>{u.pause(),e.restartMac(z)},D=z=>{u.pause(),e.sleepMac(z)};return k.jsxs("div",{className:`w-full h-8 px-2 fixed top-0 hstack justify-between ${e.hide?"z-0":"z-20"} text-sm text-white bg-gray-700/10 backdrop-blur-2xl shadow transition`,children:[k.jsxs("div",{className:"hstack space-x-1",children:[k.jsx(Ua,{className:"px-2",forceHover:a.showAppleMenu,onClick:A,ref:t,children:k.jsx("span",{className:"i-ri:apple-fill text-base"})}),k.jsx(Ua,{className:"font-semibold px-2",onMouseEnter:()=>{a.showAppleMenu&&A()},children:e.title})]}),a.showAppleMenu&&k.jsx(cG,{logout:N,shut:_,restart:M,sleep:D,toggleAppleMenu:A,btnRef:t}),k.jsxs("div",{className:"hstack flex-row justify-end space-x-2",children:[k.jsx(Ua,{hideOnMobile:!0,children:k.jsx(jG,{})}),k.jsx(Ua,{hideOnMobile:!0,forceHover:a.showWifiMenu,onClick:E,ref:r,children:h?k.jsx("span",{className:"i-material-symbols:wifi text-lg"}):k.jsx("span",{className:"i-material-symbols:wifi-off text-lg"})}),k.jsx(Ua,{ref:i,onClick:e.toggleSpotlight,children:k.jsx("span",{className:"i-bx:search text-[17px]"})}),k.jsx(Ua,{forceHover:a.showControlCenter,onClick:x,ref:n,children:k.jsx(G1e,{size:16})}),a.showWifiMenu&&k.jsx($G,{toggleWifiMenu:E,btnRef:r}),a.showControlCenter&&k.jsx(V1e,{playing:l.playing,toggleAudio:u.toggle,setVolume:g,setBrightness:v,toggleControlCenter:x,btnRef:n}),k.jsxs(Ua,{children:[k.jsx("span",{children:wh(a.date,"eee MMM d")}),k.jsx("span",{children:wh(a.date,"h:mm aa")})]})]})]})},b0=q.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),v0=q.createContext({}),ZT=q.createContext(null),S0=typeof document<"u",JT=S0?q.useLayoutEffect:q.useEffect,_U=q.createContext({strict:!1});function Y1e(e,t,n,r){const{visualElement:i}=q.useContext(v0),a=q.useContext(_U),o=q.useContext(ZT),s=q.useContext(b0).reducedMotion,l=q.useRef();r=r||a.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;q.useInsertionEffect(()=>{u&&u.update(n,o)});const c=q.useRef(!!window.HandoffAppearAnimations);return JT(()=>{u&&(u.render(),c.current&&u.animationState&&u.animationState.animateChanges())}),q.useEffect(()=>{u&&(u.updateFeatures(),!c.current&&u.animationState&&u.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,c.current=!1)}),u}function Il(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function K1e(e,t,n){return q.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Il(n)&&(n.current=r))},[t])}function Cd(e){return typeof e=="string"||Array.isArray(e)}function w0(e){return typeof e=="object"&&typeof e.start=="function"}const QT=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],eA=["initial",...QT];function E0(e){return w0(e.animate)||eA.some(t=>Cd(e[t]))}function MU(e){return!!(E0(e)||e.variants)}function X1e(e,t){if(E0(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Cd(n)?n:void 0,animate:Cd(r)?r:void 0}}return e.inherit!==!1?t:{}}function Z1e(e){const{initial:t,animate:n}=X1e(e,q.useContext(v0));return q.useMemo(()=>({initial:t,animate:n}),[k7(t),k7(n)])}function k7(e){return Array.isArray(e)?e.join(" "):e}const T7={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"]},Nd={};for(const e in T7)Nd[e]={isEnabled:t=>T7[e].some(n=>!!t[n])};function J1e(e){for(const t in e)Nd[t]={...Nd[t],...e[t]}}const DU=q.createContext({}),LU=q.createContext({}),Q1e=Symbol.for("motionComponentSymbol");function eye({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&J1e(e);function a(s,l){let u;const c={...q.useContext(b0),...s,layoutId:tye(s)},{isStatic:d}=c,p=Z1e(s),f=r(s,d);if(!d&&S0){p.visualElement=Y1e(i,f,c,t);const h=q.useContext(LU),m=q.useContext(_U).strict;p.visualElement&&(u=p.visualElement.loadFeatures(c,m,e,h))}return q.createElement(v0.Provider,{value:p},u&&p.visualElement?q.createElement(u,{visualElement:p.visualElement,...c}):null,n(i,s,K1e(f,p.visualElement,l),f,d,p.visualElement))}const o=q.forwardRef(a);return o[Q1e]=i,o}function tye({layoutId:e}){const t=q.useContext(DU).id;return t&&e!==void 0?t+"-"+e:e}function nye(e){function t(r,i={}){return eye(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const rye=["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 tA(e){return typeof e!="string"||e.includes("-")?!1:!!(rye.indexOf(e)>-1||/[A-Z]/.test(e))}const Gh={};function iye(e){Object.assign(Gh,e)}const np=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Gs=new Set(np);function PU(e,{layout:t,layoutId:n}){return Gs.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Gh[e]||e==="opacity")}const pn=e=>!!(e&&e.getVelocity),aye={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},oye=np.length;function sye(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let a="";for(let o=0;ot=>typeof t=="string"&&t.startsWith(e),BU=FU("--"),tk=FU("var(--"),lye=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,uye=(e,t)=>t&&typeof e=="number"?t.transform(e):e,To=(e,t,n)=>Math.min(Math.max(n,e),t),Ws={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Yc={...Ws,transform:e=>To(0,1,e)},Hp={...Ws,default:1},Kc=e=>Math.round(e*1e5)/1e5,x0=/(-)?([\d]*\.?[\d])+/g,zU=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,cye=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function rp(e){return typeof e=="string"}const ip=e=>({test:t=>rp(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),$a=ip("deg"),Ei=ip("%"),we=ip("px"),dye=ip("vh"),pye=ip("vw"),A7={...Ei,parse:e=>Ei.parse(e)/100,transform:e=>Ei.transform(e*100)},C7={...Ws,transform:Math.round},UU={borderWidth:we,borderTopWidth:we,borderRightWidth:we,borderBottomWidth:we,borderLeftWidth:we,borderRadius:we,radius:we,borderTopLeftRadius:we,borderTopRightRadius:we,borderBottomRightRadius:we,borderBottomLeftRadius:we,width:we,maxWidth:we,height:we,maxHeight:we,size:we,top:we,right:we,bottom:we,left:we,padding:we,paddingTop:we,paddingRight:we,paddingBottom:we,paddingLeft:we,margin:we,marginTop:we,marginRight:we,marginBottom:we,marginLeft:we,rotate:$a,rotateX:$a,rotateY:$a,rotateZ:$a,scale:Hp,scaleX:Hp,scaleY:Hp,scaleZ:Hp,skew:$a,skewX:$a,skewY:$a,distance:we,translateX:we,translateY:we,translateZ:we,x:we,y:we,z:we,perspective:we,transformPerspective:we,opacity:Yc,originX:A7,originY:A7,originZ:we,zIndex:C7,fillOpacity:Yc,strokeOpacity:Yc,numOctaves:C7};function nA(e,t,n,r){const{style:i,vars:a,transform:o,transformOrigin:s}=e;let l=!1,u=!1,c=!0;for(const d in t){const p=t[d];if(BU(d)){a[d]=p;continue}const f=UU[d],h=uye(p,f);if(Gs.has(d)){if(l=!0,o[d]=h,!c)continue;p!==(f.default||0)&&(c=!1)}else d.startsWith("origin")?(u=!0,s[d]=h):i[d]=h}if(t.transform||(l||r?i.transform=sye(e.transform,n,c,r):i.transform&&(i.transform="none")),u){const{originX:d="50%",originY:p="50%",originZ:f=0}=s;i.transformOrigin=`${d} ${p} ${f}`}}const rA=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function $U(e,t,n){for(const r in t)!pn(t[r])&&!PU(r,n)&&(e[r]=t[r])}function fye({transformTemplate:e},t,n){return q.useMemo(()=>{const r=rA();return nA(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function hye(e,t,n){const r=e.style||{},i={};return $U(i,r,e),Object.assign(i,fye(e,t,n)),e.transformValues?e.transformValues(i):i}function mye(e,t,n){const r={},i=hye(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const gye=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function Wh(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||gye.has(e)}let jU=e=>!Wh(e);function yye(e){e&&(jU=t=>t.startsWith("on")?!Wh(t):e(t))}try{yye(require("@emotion/is-prop-valid").default)}catch{}function bye(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(jU(i)||n===!0&&Wh(i)||!t&&!Wh(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function N7(e,t,n){return typeof e=="string"?e:we.transform(t+n*e)}function vye(e,t,n){const r=N7(t,e.x,e.width),i=N7(n,e.y,e.height);return`${r} ${i}`}const Sye={offset:"stroke-dashoffset",array:"stroke-dasharray"},wye={offset:"strokeDashoffset",array:"strokeDasharray"};function Eye(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?Sye:wye;e[a.offset]=we.transform(-r);const o=we.transform(t),s=we.transform(n);e[a.array]=`${o} ${s}`}function iA(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:a,pathLength:o,pathSpacing:s=1,pathOffset:l=0,...u},c,d,p){if(nA(e,u,c,p),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h,dimensions:m}=e;f.transform&&(m&&(h.transform=f.transform),delete f.transform),m&&(i!==void 0||a!==void 0||h.transform)&&(h.transformOrigin=vye(m,i!==void 0?i:.5,a!==void 0?a:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&Eye(f,o,s,l,!1)}const qU=()=>({...rA(),attrs:{}}),aA=e=>typeof e=="string"&&e.toLowerCase()==="svg";function xye(e,t,n,r){const i=q.useMemo(()=>{const a=qU();return iA(a,t,{enableHardwareAcceleration:!1},aA(r),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};$U(a,e.style,e),i.style={...a,...i.style}}return i}function kye(e=!1){return(n,r,i,{latestValues:a},o)=>{const l=(tA(n)?xye:mye)(r,a,o,n),c={...bye(r,typeof n=="string",e),...l,ref:i},{children:d}=r,p=q.useMemo(()=>pn(d)?d.get():d,[d]);return q.createElement(n,{...c,children:p})}}const oA=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function HU(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const a in n)e.style.setProperty(a,n[a])}const VU=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 GU(e,t,n,r){HU(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(VU.has(i)?i:oA(i),t.attrs[i])}function sA(e,t){const{style:n}=e,r={};for(const i in n)(pn(n[i])||t.style&&pn(t.style[i])||PU(i,e))&&(r[i]=n[i]);return r}function WU(e,t){const n=sA(e,t);for(const r in e)if(pn(e[r])||pn(t[r])){const i=np.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}function lA(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}function uA(e){const t=q.useRef(null);return t.current===null&&(t.current=e()),t.current}const Yh=e=>Array.isArray(e),Tye=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Aye=e=>Yh(e)?e[e.length-1]||0:e;function Gf(e){const t=pn(e)?e.get():e;return Tye(t)?t.toValue():t}function Cye({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,a){const o={latestValues:Nye(r,i,a,e),renderState:t()};return n&&(o.mount=s=>n(r,s,o)),o}const YU=e=>(t,n)=>{const r=q.useContext(v0),i=q.useContext(ZT),a=()=>Cye(e,t,r,i);return n?a():uA(a)};function Nye(e,t,n,r){const i={},a=r(e,{});for(const p in a)i[p]=Gf(a[p]);let{initial:o,animate:s}=e;const l=E0(e),u=MU(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const d=c?s:o;return d&&typeof d!="boolean"&&!w0(d)&&(Array.isArray(d)?d:[d]).forEach(f=>{const h=lA(e,f);if(!h)return;const{transitionEnd:m,transition:S,...y}=h;for(const g in y){let v=y[g];if(Array.isArray(v)){const x=c?v.length-1:0;v=v[x]}v!==null&&(i[g]=v)}for(const g in m)i[g]=m[g]}),i}const Et=e=>e;class R7{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function Rye(e){let t=new R7,n=new R7,r=0,i=!1,a=!1;const o=new WeakSet,s={schedule:(l,u=!1,c=!1)=>{const d=c&&i,p=d?t:n;return u&&o.add(l),p.add(l)&&d&&i&&(r=t.order.length),l},cancel:l=>{n.remove(l),o.delete(l)},process:l=>{if(i){a=!0;return}if(i=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let u=0;u(d[p]=Rye(()=>n=!0),d),{}),o=d=>a[d].process(i),s=()=>{const d=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(d-i.timestamp,Iye),1),i.timestamp=d,i.isProcessing=!0,Vp.forEach(o),i.isProcessing=!1,n&&t&&(r=!1,e(s))},l=()=>{n=!0,r=!0,i.isProcessing||e(s)};return{schedule:Vp.reduce((d,p)=>{const f=a[p];return d[p]=(h,m=!1,S=!1)=>(n||l(),f.schedule(h,m,S)),d},{}),cancel:d=>Vp.forEach(p=>a[p].cancel(d)),state:i,steps:a}}const{schedule:rt,cancel:Ri,state:It,steps:Aw}=Oye(typeof requestAnimationFrame<"u"?requestAnimationFrame:Et,!0),_ye={useVisualState:YU({scrapeMotionValuesFromProps:WU,createRenderState:qU,onMount:(e,t,{renderState:n,latestValues:r})=>{rt.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),rt.render(()=>{iA(n,r,{enableHardwareAcceleration:!1},aA(t.tagName),e.transformTemplate),GU(t,n)})}})},Mye={useVisualState:YU({scrapeMotionValuesFromProps:sA,createRenderState:rA})};function Dye(e,{forwardMotionProps:t=!1},n,r){return{...tA(e)?_ye:Mye,preloadedFeatures:n,useRender:kye(t),createVisualElement:r,Component:e}}function ra(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const KU=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function k0(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const Lye=e=>t=>KU(t)&&e(t,k0(t));function la(e,t,n,r){return ra(e,t,Lye(n),r)}const Pye=(e,t)=>n=>t(e(n)),go=(...e)=>e.reduce(Pye);function XU(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const I7=XU("dragHorizontal"),O7=XU("dragVertical");function ZU(e){let t=!1;if(e==="y")t=O7();else if(e==="x")t=I7();else{const n=I7(),r=O7();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function JU(){const e=ZU(!0);return e?(e(),!1):!0}class Bo{constructor(t){this.isMounted=!1,this.node=t}update(){}}function _7(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(a,o)=>{if(a.type==="touch"||JU())return;const s=e.getProps();e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",t),s[r]&&rt.update(()=>s[r](a,o))};return la(e.current,n,i,{passive:!e.getProps()[r]})}class Fye extends Bo{mount(){this.unmount=go(_7(this.node,!0),_7(this.node,!1))}unmount(){}}class Bye extends Bo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=go(ra(this.node.current,"focus",()=>this.onFocus()),ra(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const QU=(e,t)=>t?e===t?!0:QU(e,t.parentElement):!1;function Cw(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,k0(n))}class zye extends Bo{constructor(){super(...arguments),this.removeStartListeners=Et,this.removeEndListeners=Et,this.removeAccessibleListeners=Et,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),a=la(window,"pointerup",(s,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c}=this.node.getProps();rt.update(()=>{QU(this.node.current,s.target)?u&&u(s,l):c&&c(s,l)})},{passive:!(r.onTap||r.onPointerUp)}),o=la(window,"pointercancel",(s,l)=>this.cancelPress(s,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=go(a,o),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=a=>{if(a.key!=="Enter"||this.isPressing)return;const o=s=>{s.key!=="Enter"||!this.checkPressEnd()||Cw("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&rt.update(()=>c(l,u))})};this.removeEndListeners(),this.removeEndListeners=ra(this.node.current,"keyup",o),Cw("down",(s,l)=>{this.startPress(s,l)})},n=ra(this.node.current,"keydown",t),r=()=>{this.isPressing&&Cw("cancel",(a,o)=>this.cancelPress(a,o))},i=ra(this.node.current,"blur",r);this.removeAccessibleListeners=go(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&rt.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!JU()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&rt.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=la(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=ra(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=go(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const nk=new WeakMap,Nw=new WeakMap,Uye=e=>{const t=nk.get(e.target);t&&t(e)},$ye=e=>{e.forEach(Uye)};function jye({root:e,...t}){const n=e||document;Nw.has(n)||Nw.set(n,{});const r=Nw.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver($ye,{root:e,...t})),r[i]}function qye(e,t,n){const r=jye(t);return nk.set(e,n),r.observe(e),()=>{nk.delete(e),r.unobserve(e)}}const Hye={some:0,all:1};class Vye extends Bo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:a}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:Hye[i]},s=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,a&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),p=u?c:d;p&&p(l)};return qye(this.node.current,o,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Gye(t,n))&&this.startObserver()}unmount(){}}function Gye({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Wye={inView:{Feature:Vye},tap:{Feature:zye},focus:{Feature:Bye},hover:{Feature:Fye}};function e$(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rt[r]=n.get()),t}function Kye(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function T0(e,t,n){const r=e.getProps();return lA(r,t,n!==void 0?n:r.custom,Yye(e),Kye(e))}const Xye="framerAppearId",Zye="data-"+oA(Xye);let Jye=Et,cA=Et;const yo=e=>e*1e3,xi=e=>e/1e3,Qye={current:!1},t$=e=>Array.isArray(e)&&typeof e[0]=="number";function n$(e){return!!(!e||typeof e=="string"&&r$[e]||t$(e)||Array.isArray(e)&&e.every(n$))}const wc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,r$={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:wc([0,.65,.55,1]),circOut:wc([.55,0,1,.45]),backIn:wc([.31,.01,.66,-.59]),backOut:wc([.33,1.53,.69,.99])};function i$(e){if(e)return t$(e)?wc(e):Array.isArray(e)?e.map(i$):r$[e]}function ebe(e,t,n,{delay:r=0,duration:i,repeat:a=0,repeatType:o="loop",ease:s,times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=i$(s);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"})}function tbe(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const a$=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,nbe=1e-7,rbe=12;function ibe(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=a$(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>nbe&&++sibe(a,0,1,e,n);return a=>a===0||a===1?a:a$(i(a),t,r)}const abe=ap(.42,0,1,1),obe=ap(0,0,.58,1),o$=ap(.42,0,.58,1),sbe=e=>Array.isArray(e)&&typeof e[0]!="number",s$=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,l$=e=>t=>1-e(1-t),u$=e=>1-Math.sin(Math.acos(e)),dA=l$(u$),lbe=s$(dA),c$=ap(.33,1.53,.69,.99),pA=l$(c$),ube=s$(pA),cbe=e=>(e*=2)<1?.5*pA(e):.5*(2-Math.pow(2,-10*(e-1))),dbe={linear:Et,easeIn:abe,easeInOut:o$,easeOut:obe,circIn:u$,circInOut:lbe,circOut:dA,backIn:pA,backInOut:ube,backOut:c$,anticipate:cbe},M7=e=>{if(Array.isArray(e)){cA(e.length===4);const[t,n,r,i]=e;return ap(t,n,r,i)}else if(typeof e=="string")return dbe[e];return e},fA=(e,t)=>n=>!!(rp(n)&&cye.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),d$=(e,t,n)=>r=>{if(!rp(r))return r;const[i,a,o,s]=r.match(x0);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s!==void 0?parseFloat(s):1}},pbe=e=>To(0,255,e),Rw={...Ws,transform:e=>Math.round(pbe(e))},hs={test:fA("rgb","red"),parse:d$("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Rw.transform(e)+", "+Rw.transform(t)+", "+Rw.transform(n)+", "+Kc(Yc.transform(r))+")"};function fbe(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const rk={test:fA("#"),parse:fbe,transform:hs.transform},Ol={test:fA("hsl","hue"),parse:d$("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Ei.transform(Kc(t))+", "+Ei.transform(Kc(n))+", "+Kc(Yc.transform(r))+")"},mn={test:e=>hs.test(e)||rk.test(e)||Ol.test(e),parse:e=>hs.test(e)?hs.parse(e):Ol.test(e)?Ol.parse(e):rk.parse(e),transform:e=>rp(e)?e:e.hasOwnProperty("red")?hs.transform(e):Ol.transform(e)},gt=(e,t,n)=>-n*e+n*t+e;function Iw(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function hbe({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=Iw(l,s,e+1/3),a=Iw(l,s,e),o=Iw(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}const Ow=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},mbe=[rk,hs,Ol],gbe=e=>mbe.find(t=>t.test(e));function D7(e){const t=gbe(e);let n=t.parse(e);return t===Ol&&(n=hbe(n)),n}const p$=(e,t)=>{const n=D7(e),r=D7(t),i={...n};return a=>(i.red=Ow(n.red,r.red,a),i.green=Ow(n.green,r.green,a),i.blue=Ow(n.blue,r.blue,a),i.alpha=gt(n.alpha,r.alpha,a),hs.transform(i))};function ybe(e){var t,n;return isNaN(e)&&rp(e)&&(((t=e.match(x0))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(zU))===null||n===void 0?void 0:n.length)||0)>0}const f$={regex:lye,countKey:"Vars",token:"${v}",parse:Et},h$={regex:zU,countKey:"Colors",token:"${c}",parse:mn.parse},m$={regex:x0,countKey:"Numbers",token:"${n}",parse:Ws.parse};function _w(e,{regex:t,countKey:n,token:r,parse:i}){const a=e.tokenised.match(t);a&&(e["num"+n]=a.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...a.map(i)))}function Kh(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&_w(n,f$),_w(n,h$),_w(n,m$),n}function g$(e){return Kh(e).values}function y$(e){const{values:t,numColors:n,numVars:r,tokenised:i}=Kh(e),a=t.length;return o=>{let s=i;for(let l=0;ltypeof e=="number"?0:e;function vbe(e){const t=g$(e);return y$(e)(t.map(bbe))}const Ao={test:ybe,parse:g$,createTransformer:y$,getAnimatableNone:vbe},b$=(e,t)=>n=>`${n>0?t:e}`;function v$(e,t){return typeof e=="number"?n=>gt(e,t,n):mn.test(e)?p$(e,t):e.startsWith("var(")?b$(e,t):w$(e,t)}const S$=(e,t)=>{const n=[...e],r=n.length,i=e.map((a,o)=>v$(a,t[o]));return a=>{for(let o=0;o{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=v$(e[i],t[i]));return i=>{for(const a in r)n[a]=r[a](i);return n}},w$=(e,t)=>{const n=Ao.createTransformer(t),r=Kh(e),i=Kh(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?go(S$(r.values,i.values),n):b$(e,t)},Rd=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},L7=(e,t)=>n=>gt(e,t,n);function wbe(e){return typeof e=="number"?L7:typeof e=="string"?mn.test(e)?p$:w$:Array.isArray(e)?S$:typeof e=="object"?Sbe:L7}function Ebe(e,t,n){const r=[],i=n||wbe(e[0]),a=e.length-1;for(let o=0;ot[0];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=Ebe(t,r,i),s=o.length,l=u=>{let c=0;if(s>1)for(;cl(To(e[0],e[a-1],u)):l}function xbe(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Rd(0,t,r);e.push(gt(n,1,i))}}function kbe(e){const t=[0];return xbe(t,e.length-1),t}function Tbe(e,t){return e.map(n=>n*t)}function Abe(e,t){return e.map(()=>t||o$).splice(0,e.length-1)}function Xh({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=sbe(r)?r.map(M7):M7(r),a={done:!1,value:t[0]},o=Tbe(n&&n.length===t.length?n:kbe(t),e),s=hA(o,t,{ease:Array.isArray(i)?i:Abe(t,i)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}function E$(e,t){return t?e*(1e3/t):0}const Cbe=5;function x$(e,t,n){const r=Math.max(t-Cbe,0);return E$(n-e(r),t-r)}const Mw=.001,Nbe=.01,P7=10,Rbe=.05,Ibe=1;function Obe({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,a;Jye(e<=yo(P7));let o=1-t;o=To(Rbe,Ibe,o),e=To(Nbe,P7,xi(e)),o<1?(i=u=>{const c=u*o,d=c*e,p=c-n,f=ik(u,o),h=Math.exp(-d);return Mw-p/f*h},a=u=>{const d=u*o*e,p=d*n+n,f=Math.pow(o,2)*Math.pow(u,2)*e,h=Math.exp(-d),m=ik(Math.pow(u,2),o);return(-i(u)+Mw>0?-1:1)*((p-f)*h)/m}):(i=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-Mw+c*d},a=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const s=5/e,l=Mbe(i,a,s);if(e=yo(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const _be=12;function Mbe(e,t,n){let r=n;for(let i=1;i<_be;i++)r=r-e(r)/t(r);return r}function ik(e,t){return e*Math.sqrt(1-t*t)}const Dbe=["duration","bounce"],Lbe=["stiffness","damping","mass"];function F7(e,t){return t.some(n=>e[n]!==void 0)}function Pbe(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!F7(e,Lbe)&&F7(e,Dbe)){const n=Obe(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function k$({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],a=e[e.length-1],o={done:!1,value:i},{stiffness:s,damping:l,mass:u,velocity:c,duration:d,isResolvedFromDuration:p}=Pbe(r),f=c?-xi(c):0,h=l/(2*Math.sqrt(s*u)),m=a-i,S=xi(Math.sqrt(s/u)),y=Math.abs(m)<5;n||(n=y?.01:2),t||(t=y?.005:.5);let g;if(h<1){const v=ik(S,h);g=x=>{const A=Math.exp(-h*S*x);return a-A*((f+h*S*m)/v*Math.sin(v*x)+m*Math.cos(v*x))}}else if(h===1)g=v=>a-Math.exp(-S*v)*(m+(f+S*m)*v);else{const v=S*Math.sqrt(h*h-1);g=x=>{const A=Math.exp(-h*S*x),E=Math.min(v*x,300);return a-A*((f+h*S*m)*Math.sinh(E)+v*m*Math.cosh(E))/v}}return{calculatedDuration:p&&d||null,next:v=>{const x=g(v);if(p)o.done=v>=d;else{let A=f;v!==0&&(h<1?A=x$(g,v,x):A=0);const E=Math.abs(A)<=n,N=Math.abs(a-x)<=t;o.done=E&&N}return o.value=o.done?a:x,o}}}function B7({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],p={done:!1,value:d},f=_=>s!==void 0&&_l,h=_=>s===void 0?l:l===void 0||Math.abs(s-_)-m*Math.exp(-_/r),v=_=>y+g(_),x=_=>{const M=g(_),D=v(_);p.done=Math.abs(M)<=u,p.value=p.done?y:D};let A,E;const N=_=>{f(p.value)&&(A=_,E=k$({keyframes:[p.value,h(p.value)],velocity:x$(v,_,p.value),damping:i,stiffness:a,restDelta:u,restSpeed:c}))};return N(0),{calculatedDuration:null,next:_=>{let M=!1;return!E&&A===void 0&&(M=!0,x(_),N(_)),A!==void 0&&_>A?E.next(_-A):(!M&&x(_),p)}}}const Fbe=e=>{const t=({timestamp:n})=>e(n);return{start:()=>rt.update(t,!0),stop:()=>Ri(t),now:()=>It.isProcessing?It.timestamp:performance.now()}},z7=2e4;function U7(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=z7?1/0:t}const Bbe={decay:B7,inertia:B7,tween:Xh,keyframes:Xh,spring:k$};function Id({autoplay:e=!0,delay:t=0,driver:n=Fbe,keyframes:r,type:i="keyframes",repeat:a=0,repeatDelay:o=0,repeatType:s="loop",onPlay:l,onStop:u,onComplete:c,onUpdate:d,...p}){let f=1,h=!1,m,S;const y=()=>{S=new Promise(H=>{m=H})};y();let g;const v=Bbe[i]||Xh;let x;v!==Xh&&typeof r[0]!="number"&&(x=hA([0,100],r,{clamp:!1}),r=[0,100]);const A=v({...p,keyframes:r});let E;s==="mirror"&&(E=v({...p,keyframes:[...r].reverse(),velocity:-(p.velocity||0)}));let N="idle",_=null,M=null,D=null;A.calculatedDuration===null&&a&&(A.calculatedDuration=U7(A));const{calculatedDuration:z}=A;let $=1/0,ee=1/0;z!==null&&($=z+o,ee=$*(a+1)-o);let te=0;const X=H=>{if(M===null)return;f>0&&(M=Math.min(M,H)),f<0&&(M=Math.min(H-ee/f,M)),_!==null?te=_:te=Math.round(H-M)*f;const F=te-t*(f>=0?1:-1),R=f>=0?F<0:F>ee;te=Math.max(F,0),N==="finished"&&_===null&&(te=ee);let G=te,Z=A;if(a){const _e=te/$;let ke=Math.floor(_e),lt=_e%1;!lt&&_e>=1&&(lt=1),lt===1&&ke--,ke=Math.min(ke,a+1);const en=!!(ke%2);en&&(s==="reverse"?(lt=1-lt,o&&(lt-=o/$)):s==="mirror"&&(Z=E));let Vt=To(0,1,lt);te>ee&&(Vt=s==="reverse"&&en?1:0),G=Vt*$}const K=R?{done:!1,value:r[0]}:Z.next(G);x&&(K.value=x(K.value));let{done:ce}=K;!R&&z!==null&&(ce=f>=0?te>=ee:te<=0);const ye=_===null&&(N==="finished"||N==="running"&&ce);return d&&d(K.value),ye&&U(),K},ue=()=>{g&&g.stop(),g=void 0},le=()=>{N="idle",ue(),m(),y(),M=D=null},U=()=>{N="finished",c&&c(),ue(),m()},Y=()=>{if(h)return;g||(g=n(X));const H=g.now();l&&l(),_!==null?M=H-_:(!M||N==="finished")&&(M=H),N==="finished"&&y(),D=M,_=null,N="running",g.start()};e&&Y();const I={then(H,F){return S.then(H,F)},get time(){return xi(te)},set time(H){H=yo(H),te=H,_!==null||!g||f===0?_=H:M=g.now()-H/f},get duration(){const H=A.calculatedDuration===null?U7(A):A.calculatedDuration;return xi(H)},get speed(){return f},set speed(H){H===f||!g||(f=H,I.time=xi(te))},get state(){return N},play:Y,pause:()=>{N="paused",_=te},stop:()=>{h=!0,N!=="idle"&&(N="idle",u&&u(),le())},cancel:()=>{D!==null&&X(D),le()},complete:()=>{N="finished"},sample:H=>(M=0,X(H))};return I}function zbe(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ube=zbe(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),$be=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Gp=10,jbe=2e4,qbe=(e,t)=>t.type==="spring"||e==="backgroundColor"||!n$(t.ease);function Hbe(e,t,{onUpdate:n,onComplete:r,...i}){if(!(Ube()&&$be.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let o=!1,s,l;const u=()=>{l=new Promise(g=>{s=g})};u();let{keyframes:c,duration:d=300,ease:p,times:f}=i;if(qbe(t,i)){const g=Id({...i,repeat:0,delay:0});let v={done:!1,value:c[0]};const x=[];let A=0;for(;!v.done&&Ah.cancel(),S=()=>{rt.update(m),s(),u()};return h.onfinish=()=>{e.set(tbe(c,i)),r&&r(),S()},{then(g,v){return l.then(g,v)},attachTimeline(g){return h.timeline=g,h.onfinish=null,Et},get time(){return xi(h.currentTime||0)},set time(g){h.currentTime=yo(g)},get speed(){return h.playbackRate},set speed(g){h.playbackRate=g},get duration(){return xi(d)},play:()=>{o||(h.play(),Ri(m))},pause:()=>h.pause(),stop:()=>{if(o=!0,h.playState==="idle")return;const{currentTime:g}=h;if(g){const v=Id({...i,autoplay:!1});e.setWithVelocity(v.sample(g-Gp).value,v.sample(g).value,Gp)}S()},complete:()=>h.finish(),cancel:S}}function Vbe({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:Et,pause:Et,stop:Et,then:a=>(a(),Promise.resolve()),cancel:Et,complete:Et});return t?Id({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const Gbe={type:"spring",stiffness:500,damping:25,restSpeed:10},Wbe=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Ybe={type:"keyframes",duration:.8},Kbe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Xbe=(e,{keyframes:t})=>t.length>2?Ybe:Gs.has(e)?e.startsWith("scale")?Wbe(t[1]):Gbe:Kbe,ak=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Ao.test(t)||t==="0")&&!t.startsWith("url(")),Zbe=new Set(["brightness","contrast","saturate","opacity"]);function Jbe(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(x0)||[];if(!r)return e;const i=n.replace(r,"");let a=Zbe.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const Qbe=/([a-z-]*)\(.*?\)/g,ok={...Ao,getAnimatableNone:e=>{const t=e.match(Qbe);return t?t.map(Jbe).join(" "):e}},eve={...UU,color:mn,backgroundColor:mn,outlineColor:mn,fill:mn,stroke:mn,borderColor:mn,borderTopColor:mn,borderRightColor:mn,borderBottomColor:mn,borderLeftColor:mn,filter:ok,WebkitFilter:ok},mA=e=>eve[e];function T$(e,t){let n=mA(e);return n!==ok&&(n=Ao),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const A$=e=>/^0[^.\s]+$/.test(e);function tve(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||A$(e)}function nve(e,t,n,r){const i=ak(t,n);let a;Array.isArray(n)?a=[...n]:a=[null,n];const o=r.from!==void 0?r.from:e.get();let s;const l=[];for(let u=0;ui=>{const a=C$(r,e)||{},o=a.delay||r.delay||0;let{elapsed:s=0}=r;s=s-yo(o);const l=nve(t,e,n,a),u=l[0],c=l[l.length-1],d=ak(e,u),p=ak(e,c);let f={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...a,delay:-s,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{i(),a.onComplete&&a.onComplete()}};if(rve(a)||(f={...f,...Xbe(e,f)}),f.duration&&(f.duration=yo(f.duration)),f.repeatDelay&&(f.repeatDelay=yo(f.repeatDelay)),!d||!p||Qye.current||a.type===!1)return Vbe(f);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const h=Hbe(t,e,f);if(h)return h}return Id(f)};function Zh(e){return!!(pn(e)&&e.add)}const N$=e=>/^\-?\d*\.?\d+$/.test(e);function yA(e,t){e.indexOf(t)===-1&&e.push(t)}function bA(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class vA{constructor(){this.subscriptions=[]}add(t){return yA(this.subscriptions,t),()=>bA(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let a=0;a!isNaN(parseFloat(e)),Xc={current:void 0};class ave{constructor(t,n={}){this.version="10.16.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:a,timestamp:o}=It;this.lastUpdated!==o&&(this.timeDelta=a,this.lastUpdated=o,rt.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>rt.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=ive(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new vA);const r=this.events[t].add(n);return t==="change"?()=>{r(),rt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Xc.current&&Xc.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?E$(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Fs(e,t){return new ave(e,t)}const R$=e=>t=>t.test(e),ove={test:e=>e==="auto",parse:e=>e},I$=[Ws,we,Ei,$a,pye,dye,ove],Ku=e=>I$.find(R$(e)),sve=[...I$,mn,Ao],lve=e=>sve.find(R$(e));function uve(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Fs(n))}function cve(e,t){const n=T0(e,t);let{transitionEnd:r={},transition:i={},...a}=n?e.makeTargetAnimatable(n,!1):{};a={...a,...r};for(const o in a){const s=Aye(a[o]);uve(e,o,s)}}function dve(e,t,n){var r,i;const a=Object.keys(t).filter(s=>!e.hasValue(s)),o=a.length;if(o)for(let s=0;sl.remove(d))),u.push(m)}return o&&Promise.all(u).then(()=>{o&&cve(e,o)}),u}function sk(e,t,n={}){const r=T0(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const a=r?()=>Promise.all(O$(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=i;return mve(e,t,u+l,c,d,n)}:()=>Promise.resolve(),{when:s}=i;if(s){const[l,u]=s==="beforeChildren"?[a,o]:[o,a];return l().then(()=>u())}else return Promise.all([a(),o(n.delay)])}function mve(e,t,n=0,r=0,i=1,a){const o=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(gve).forEach((u,c)=>{u.notify("AnimationStart",t),o.push(sk(u,t,{...a,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function gve(e,t){return e.sortNodePosition(t)}function yve(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(a=>sk(e,a,n));r=Promise.all(i)}else if(typeof t=="string")r=sk(e,t,n);else{const i=typeof t=="function"?T0(e,t,n.custom):t;r=Promise.all(O$(e,i,n))}return r.then(()=>e.notify("AnimationComplete",t))}const bve=[...QT].reverse(),vve=QT.length;function Sve(e){return t=>Promise.all(t.map(({animation:n,options:r})=>yve(e,n,r)))}function wve(e){let t=Sve(e);const n=xve();let r=!0;const i=(l,u)=>{const c=T0(e,u);if(c){const{transition:d,transitionEnd:p,...f}=c;l={...l,...f,...p}}return l};function a(l){t=l(e)}function o(l,u){const c=e.getProps(),d=e.getVariantContext(!0)||{},p=[],f=new Set;let h={},m=1/0;for(let y=0;ym&&A;const D=Array.isArray(x)?x:[x];let z=D.reduce(i,{});E===!1&&(z={});const{prevResolvedValues:$={}}=v,ee={...$,...z},te=X=>{M=!0,f.delete(X),v.needsAnimating[X]=!0};for(const X in ee){const ue=z[X],le=$[X];h.hasOwnProperty(X)||(ue!==le?Yh(ue)&&Yh(le)?!e$(ue,le)||_?te(X):v.protectedKeys[X]=!0:ue!==void 0?te(X):f.add(X):ue!==void 0&&f.has(X)?te(X):v.protectedKeys[X]=!0)}v.prevProp=x,v.prevResolvedValues=z,v.isActive&&(h={...h,...z}),r&&e.blockInitialAnimation&&(M=!1),M&&!N&&p.push(...D.map(X=>({animation:X,options:{type:g,...l}})))}if(f.size){const y={};f.forEach(g=>{const v=e.getBaseTarget(g);v!==void 0&&(y[g]=v)}),p.push({animation:y})}let S=!!p.length;return r&&c.initial===!1&&!e.manuallyAnimateOnMount&&(S=!1),r=!1,S?t(p):Promise.resolve()}function s(l,u,c){var d;if(n[l].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(f=>{var h;return(h=f.animationState)===null||h===void 0?void 0:h.setActive(l,u)}),n[l].isActive=u;const p=o(c,l);for(const f in n)n[f].protectedKeys={};return p}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n}}function Eve(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!e$(t,e):!1}function Go(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function xve(){return{animate:Go(!0),whileInView:Go(),whileHover:Go(),whileTap:Go(),whileDrag:Go(),whileFocus:Go(),exit:Go()}}class kve extends Bo{constructor(t){super(t),t.animationState||(t.animationState=wve(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),w0(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let Tve=0;class Ave extends Bo{constructor(){super(...arguments),this.id=Tve++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const a=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&a.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const Cve={animation:{Feature:kve},exit:{Feature:Ave}},$7=(e,t)=>Math.abs(e-t);function Nve(e,t){const n=$7(e.x,t.x),r=$7(e.y,t.y);return Math.sqrt(n**2+r**2)}class _${constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Lw(this.lastMoveEventInfo,this.history),c=this.startEvent!==null,d=Nve(u.offset,{x:0,y:0})>=3;if(!c&&!d)return;const{point:p}=u,{timestamp:f}=It;this.history.push({...p,timestamp:f});const{onStart:h,onMove:m}=this.handlers;c||(h&&h(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,u)},this.handlePointerMove=(u,c)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=Dw(c,this.transformPagePoint),rt.update(this.updatePoint,!0)},this.handlePointerUp=(u,c)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:d,onSessionEnd:p}=this.handlers,f=Lw(u.type==="pointercancel"?this.lastMoveEventInfo:Dw(c,this.transformPagePoint),this.history);this.startEvent&&d&&d(u,f),p&&p(u,f)},!KU(t))return;this.handlers=n,this.transformPagePoint=r;const i=k0(t),a=Dw(i,this.transformPagePoint),{point:o}=a,{timestamp:s}=It;this.history=[{...o,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,Lw(a,this.history)),this.removeListeners=go(la(window,"pointermove",this.handlePointerMove),la(window,"pointerup",this.handlePointerUp),la(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ri(this.updatePoint)}}function Dw(e,t){return t?{point:t(e.point)}:e}function j7(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Lw({point:e},t){return{point:e,delta:j7(e,M$(t)),offset:j7(e,Rve(t)),velocity:Ive(t,.1)}}function Rve(e){return e[0]}function M$(e){return e[e.length-1]}function Ive(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=M$(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>yo(t)));)n--;if(!r)return{x:0,y:0};const a=xi(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function or(e){return e.max-e.min}function lk(e,t=0,n=.01){return Math.abs(e-t)<=n}function q7(e,t,n,r=.5){e.origin=r,e.originPoint=gt(t.min,t.max,e.origin),e.scale=or(n)/or(t),(lk(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=gt(n.min,n.max,e.origin)-e.originPoint,(lk(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Zc(e,t,n,r){q7(e.x,t.x,n.x,r?r.originX:void 0),q7(e.y,t.y,n.y,r?r.originY:void 0)}function H7(e,t,n){e.min=n.min+t.min,e.max=e.min+or(t)}function Ove(e,t,n){H7(e.x,t.x,n.x),H7(e.y,t.y,n.y)}function V7(e,t,n){e.min=t.min-n.min,e.max=e.min+or(t)}function Jc(e,t,n){V7(e.x,t.x,n.x),V7(e.y,t.y,n.y)}function _ve(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?gt(n,e,r.max):Math.min(e,n)),e}function G7(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Mve(e,{top:t,left:n,bottom:r,right:i}){return{x:G7(e.x,n,i),y:G7(e.y,t,r)}}function W7(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Rd(t.min,t.max-r,e.min):r>i&&(n=Rd(e.min,e.max-i,t.min)),To(0,1,n)}function Pve(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const uk=.35;function Fve(e=uk){return e===!1?e=0:e===!0&&(e=uk),{x:Y7(e,"left","right"),y:Y7(e,"top","bottom")}}function Y7(e,t,n){return{min:K7(e,t),max:K7(e,n)}}function K7(e,t){return typeof e=="number"?e:e[t]||0}const X7=()=>({translate:0,scale:1,origin:0,originPoint:0}),_l=()=>({x:X7(),y:X7()}),Z7=()=>({min:0,max:0}),Nt=()=>({x:Z7(),y:Z7()});function ci(e){return[e("x"),e("y")]}function D$({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Bve({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function zve(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Pw(e){return e===void 0||e===1}function ck({scale:e,scaleX:t,scaleY:n}){return!Pw(e)||!Pw(t)||!Pw(n)}function ts(e){return ck(e)||L$(e)||e.z||e.rotate||e.rotateX||e.rotateY}function L$(e){return J7(e.x)||J7(e.y)}function J7(e){return e&&e!=="0%"}function Jh(e,t,n){const r=e-n,i=t*r;return n+i}function Q7(e,t,n,r,i){return i!==void 0&&(e=Jh(e,i,r)),Jh(e,n,r)+t}function dk(e,t=0,n=1,r,i){e.min=Q7(e.min,t,n,r,i),e.max=Q7(e.max,t,n,r,i)}function P$(e,{x:t,y:n}){dk(e.x,t.translate,t.scale,t.originPoint),dk(e.y,n.translate,n.scale,n.originPoint)}function Uve(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s1.0000000000001||e<.999999999999?e:1}function Ga(e,t){e.min=e.min+t,e.max=e.max+t}function tM(e,t,[n,r,i]){const a=t[i]!==void 0?t[i]:.5,o=gt(e.min,e.max,a);dk(e,t[n],t[r],o,t.scale)}const $ve=["x","scaleX","originX"],jve=["y","scaleY","originY"];function Ml(e,t){tM(e.x,t,$ve),tM(e.y,t,jve)}function F$(e,t){return D$(zve(e.getBoundingClientRect(),t))}function qve(e,t,n){const r=F$(e,n),{scroll:i}=t;return i&&(Ga(r.x,i.offset.x),Ga(r.y,i.offset.y)),r}const Hve=new WeakMap;class Vve{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Nt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=l=>{this.stopAnimation(),n&&this.snapToCursor(k0(l,"page").point)},a=(l,u)=>{const{drag:c,dragPropagation:d,onDragStart:p}=this.getProps();if(c&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=ZU(c),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ci(h=>{let m=this.getAxisMotionValue(h).get()||0;if(Ei.test(m)){const{projection:S}=this.visualElement;if(S&&S.layout){const y=S.layout.layoutBox[h];y&&(m=or(y)*(parseFloat(m)/100))}}this.originPoint[h]=m}),p&&rt.update(()=>p(l,u),!1,!0);const{animationState:f}=this.visualElement;f&&f.setActive("whileDrag",!0)},o=(l,u)=>{const{dragPropagation:c,dragDirectionLock:d,onDirectionLock:p,onDrag:f}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:h}=u;if(d&&this.currentDirection===null){this.currentDirection=Gve(h),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",u.point,h),this.updateAxis("y",u.point,h),this.visualElement.render(),f&&f(l,u)},s=(l,u)=>this.stop(l,u);this.panSession=new _$(t,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&rt.update(()=>a(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Wp(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=_ve(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&Il(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Mve(r.layoutBox,t):this.constraints=!1,this.elastic=Fve(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ci(a=>{this.getAxisMotionValue(a)&&(this.constraints[a]=Pve(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Il(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=qve(r,i.root,this.visualElement.getTransformPagePoint());let o=Dve(i.layout.layoutBox,a);if(n){const s=n(Bve(o));this.hasMutatedConstraints=!!s,s&&(o=D$(s))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=ci(c=>{if(!Wp(c,n,this.currentDirection))return;let d=l&&l[c]||{};o&&(d={min:0,max:0});const p=i?200:1e6,f=i?40:1e7,h={type:"inertia",velocity:r?t[c]:0,bounceStiffness:p,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...a,...d};return this.startAxisValueAnimation(c,h)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(gA(t,r,0,n))}stopAnimation(){ci(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n="_drag"+t.toUpperCase(),r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){ci(n=>{const{drag:r}=this.getProps();if(!Wp(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:s}=i.layout.layoutBox[n];a.set(t[n]-gt(o,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Il(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ci(o=>{const s=this.getAxisMotionValue(o);if(s){const l=s.get();i[o]=Lve({min:l,max:l},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ci(o=>{if(!Wp(o,t,null))return;const s=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];s.set(gt(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;Hve.set(this.visualElement,this);const t=this.visualElement.current,n=la(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Il(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const o=ra(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(ci(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())});return()=>{o(),n(),a(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:o=uk,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:a,dragElastic:o,dragMomentum:s}}}function Wp(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Gve(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Wve extends Bo{constructor(t){super(t),this.removeGroupControls=Et,this.removeListeners=Et,this.controls=new Vve(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Et}unmount(){this.removeGroupControls(),this.removeListeners()}}const nM=e=>(t,n)=>{e&&rt.update(()=>e(t,n))};class Yve extends Bo{constructor(){super(...arguments),this.removePointerDownListener=Et}onPointerDown(t){this.session=new _$(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:nM(t),onStart:nM(n),onMove:r,onEnd:(a,o)=>{delete this.session,i&&rt.update(()=>i(a,o))}}}mount(){this.removePointerDownListener=la(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function Kve(){const e=q.useContext(ZT);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=q.useId();return q.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}const Wf={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function rM(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Xu={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(we.test(e))e=parseFloat(e);else return e;const n=rM(e,t.target.x),r=rM(e,t.target.y);return`${n}% ${r}%`}},Xve={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Ao.parse(e);if(i.length>5)return r;const a=Ao.createTransformer(e),o=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=l;const u=gt(s,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),a(i)}};class Zve extends Ot.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=t;iye(Jve),a&&(n.group&&n.group.add(a),r&&r.register&&i&&r.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Wf.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,o=r.projection;return o&&(o.isPresent=a,i||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||rt.postRender(()=>{const s=o.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function B$(e){const[t,n]=Kve(),r=q.useContext(DU);return Ot.createElement(Zve,{...e,layoutGroup:r,switchLayoutGroup:q.useContext(LU),isPresent:t,safeToRemove:n})}const Jve={borderRadius:{...Xu,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Xu,borderTopRightRadius:Xu,borderBottomLeftRadius:Xu,borderBottomRightRadius:Xu,boxShadow:Xve},z$=["TopLeft","TopRight","BottomLeft","BottomRight"],Qve=z$.length,iM=e=>typeof e=="string"?parseFloat(e):e,aM=e=>typeof e=="number"||we.test(e);function eSe(e,t,n,r,i,a){i?(e.opacity=gt(0,n.opacity!==void 0?n.opacity:1,tSe(r)),e.opacityExit=gt(t.opacity!==void 0?t.opacity:1,0,nSe(r))):a&&(e.opacity=gt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;ort?1:n(Rd(e,t,r))}function sM(e,t){e.min=t.min,e.max=t.max}function hr(e,t){sM(e.x,t.x),sM(e.y,t.y)}function lM(e,t,n,r,i){return e-=t,e=Jh(e,1/n,r),i!==void 0&&(e=Jh(e,1/i,r)),e}function rSe(e,t=0,n=1,r=.5,i,a=e,o=e){if(Ei.test(t)&&(t=parseFloat(t),t=gt(o.min,o.max,t/100)-o.min),typeof t!="number")return;let s=gt(a.min,a.max,r);e===a&&(s-=t),e.min=lM(e.min,t,n,s,i),e.max=lM(e.max,t,n,s,i)}function uM(e,t,[n,r,i],a,o){rSe(e,t[n],t[r],t[i],t.scale,a,o)}const iSe=["x","scaleX","originX"],aSe=["y","scaleY","originY"];function cM(e,t,n,r){uM(e.x,t,iSe,n?n.x:void 0,r?r.x:void 0),uM(e.y,t,aSe,n?n.y:void 0,r?r.y:void 0)}function dM(e){return e.translate===0&&e.scale===1}function $$(e){return dM(e.x)&&dM(e.y)}function oSe(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function j$(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function pM(e){return or(e.x)/or(e.y)}class sSe{constructor(){this.members=[]}add(t){yA(this.members,t),t.scheduleRender()}remove(t){if(bA(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function fM(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y;if((i||a)&&(r=`translate3d(${i}px, ${a}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:u,rotateY:c}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),c&&(r+=`rotateY(${c}deg) `)}const o=e.x.scale*t.x,s=e.y.scale*t.y;return(o!==1||s!==1)&&(r+=`scale(${o}, ${s})`),r||"none"}const lSe=(e,t)=>e.depth-t.depth;class uSe{constructor(){this.children=[],this.isDirty=!1}add(t){yA(this.children,t),this.isDirty=!0}remove(t){bA(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(lSe),this.isDirty=!1,this.children.forEach(t)}}function cSe(e,t){const n=performance.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(Ri(r),e(a-t))};return rt.read(r,!0),()=>Ri(r)}function dSe(e){window.MotionDebug&&window.MotionDebug.record(e)}function pSe(e){return e instanceof SVGElement&&e.tagName!=="svg"}function fSe(e,t,n){const r=pn(e)?e:Fs(e);return r.start(gA("",r,t,n)),r.animation}const hM=["","X","Y","Z"],mM=1e3;let hSe=0;const ns={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function q$({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},s=t==null?void 0:t()){this.id=hSe++,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.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{ns.totalNodes=ns.resolvedTargetDeltas=ns.recalculatedProjection=0,this.nodes.forEach(ySe),this.nodes.forEach(ESe),this.nodes.forEach(xSe),this.nodes.forEach(bSe),dSe(ns)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=cSe(p,250),Wf.hasAnimatedSinceResize&&(Wf.hasAnimatedSinceResize=!1,this.nodes.forEach(yM))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeTargetChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||NSe,{onLayoutAnimationStart:S,onLayoutAnimationComplete:y}=c.getProps(),g=!this.targetLayout||!j$(this.targetLayout,h)||f,v=!p&&f;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||v||p&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,v);const x={...C$(m,"layout"),onPlay:S,onComplete:y};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x)}else p||yM(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}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,Ri(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(kSe),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(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;cthis.update()))}clearAllSnapshots(){this.nodes.forEach(vSe),this.sharedNodes.forEach(TSe)}scheduleUpdateProjection(){rt.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){rt.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{const A=x/1e3;bM(d.x,o.x,A),bM(d.y,o.y,A),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Jc(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ASe(this.relativeTarget,this.relativeTargetOrigin,p,A),v&&oSe(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=Nt()),hr(v,this.relativeTarget)),m&&(this.animationValues=c,eSe(c,u,this.latestValues,A,g,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},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&&(Ri(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=rt.update(()=>{Wf.hasAnimatedSinceResize=!0,this.currentAnimation=fSe(0,mM,{...o,onUpdate:s=>{this.mixTargetDelta(s),o.onUpdate&&o.onUpdate(s)},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(mM),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:c}=o;if(!(!s||!l||!u)){if(this!==o&&this.layout&&u&&H$(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Nt();const d=or(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const p=or(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+p}hr(s,l),Ml(s,c),Zc(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(o,s){this.sharedNodes.has(o)||this.sharedNodes.set(o,new sSe),this.sharedNodes.get(o).add(s);const u=s.options.initialPromotionConfig;s.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(s):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:s}=this.options;return s?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:s}=this.options;return s?(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:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let s=!1;const{latestValues:l}=o;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(s=!0),!s)return;const u={};for(let c=0;c{var s;return(s=o.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(gM),this.root.sharedNodes.clear()}}}function mSe(e){e.updateLayout()}function gSe(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:a}=e.options,o=n.source!==e.layout.source;a==="size"?ci(d=>{const p=o?n.measuredBox[d]:n.layoutBox[d],f=or(p);p.min=r[d].min,p.max=p.min+f}):H$(a,n.layoutBox,r)&&ci(d=>{const p=o?n.measuredBox[d]:n.layoutBox[d],f=or(r[d]);p.max=p.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+f)});const s=_l();Zc(s,r,n.layoutBox);const l=_l();o?Zc(l,e.applyTransform(i,!0),n.measuredBox):Zc(l,r,n.layoutBox);const u=!$$(s);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:f}=d;if(p&&f){const h=Nt();Jc(h,n.layoutBox,p.layoutBox);const m=Nt();Jc(m,r,f.layoutBox),j$(h,m)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=h,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:s,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function ySe(e){ns.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function bSe(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function vSe(e){e.clearSnapshot()}function gM(e){e.clearMeasurements()}function SSe(e){e.isLayoutDirty=!1}function wSe(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function yM(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ESe(e){e.resolveTargetDelta()}function xSe(e){e.calcProjection()}function kSe(e){e.resetRotation()}function TSe(e){e.removeLeadSnapshot()}function bM(e,t,n){e.translate=gt(t.translate,0,n),e.scale=gt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function vM(e,t,n,r){e.min=gt(t.min,n.min,r),e.max=gt(t.max,n.max,r)}function ASe(e,t,n,r){vM(e.x,t.x,n.x,r),vM(e.y,t.y,n.y,r)}function CSe(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const NSe={duration:.45,ease:[.4,0,.1,1]},SM=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),wM=SM("applewebkit/")&&!SM("chrome/")?Math.round:Et;function EM(e){e.min=wM(e.min),e.max=wM(e.max)}function RSe(e){EM(e.x),EM(e.y)}function H$(e,t,n){return e==="position"||e==="preserve-aspect"&&!lk(pM(t),pM(n),.2)}const ISe=q$({attachResizeListener:(e,t)=>ra(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Fw={current:void 0},V$=q$({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Fw.current){const e=new ISe({});e.mount(window),e.setOptions({layoutScroll:!0}),Fw.current=e}return Fw.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),OSe={pan:{Feature:Yve},drag:{Feature:Wve,ProjectionNode:V$,MeasureLayout:B$}},_Se=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function MSe(e){const t=_Se.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function pk(e,t,n=1){const[r,i]=MSe(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const o=a.trim();return N$(o)?parseFloat(o):o}else return tk(i)?pk(i,t,n+1):i}function DSe(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const a=i.get();if(!tk(a))return;const o=pk(a,r);o&&i.set(o)});for(const i in t){const a=t[i];if(!tk(a))continue;const o=pk(a,r);o&&(t[i]=o,n||(n={}),n[i]===void 0&&(n[i]=a))}return{target:t,transitionEnd:n}}const LSe=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),G$=e=>LSe.has(e),PSe=e=>Object.keys(e).some(G$),xM=e=>e===Ws||e===we,kM=(e,t)=>parseFloat(e.split(", ")[t]),TM=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return kM(i[1],t);{const a=r.match(/^matrix\((.+)\)$/);return a?kM(a[1],e):0}},FSe=new Set(["x","y","z"]),BSe=np.filter(e=>!FSe.has(e));function zSe(e){const t=[];return BSe.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const pu={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:TM(4,13),y:TM(5,14)};pu.translateX=pu.x;pu.translateY=pu.y;const USe=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,a=getComputedStyle(i),{display:o}=a,s={};o==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=pu[u](r,a)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const c=t.getValue(u);c&&c.jump(s[u]),e[u]=pu[u](l,a)}),e},$Se=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(G$);let a=[],o=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let c=n[l],d=Ku(c);const p=t[l];let f;if(Yh(p)){const h=p.length,m=p[0]===null?1:0;c=p[m],d=Ku(c);for(let S=m;S=0?window.pageYOffset:null,u=USe(t,e,s);return a.length&&a.forEach(([c,d])=>{e.getValue(c).set(d)}),e.render(),S0&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function jSe(e,t,n,r){return PSe(t)?$Se(e,t,n,r):{target:t,transitionEnd:r}}const qSe=(e,t,n,r)=>{const i=DSe(e,t,r);return t=i.target,r=i.transitionEnd,jSe(e,t,n,r)},fk={current:null},W$={current:!1};function HSe(){if(W$.current=!0,!!S0)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>fk.current=e.matches;e.addListener(t),t()}else fk.current=!1}function VSe(e,t,n){const{willChange:r}=t;for(const i in t){const a=t[i],o=n[i];if(pn(a))e.addValue(i,a),Zh(r)&&r.add(i);else if(pn(o))e.addValue(i,Fs(a,{owner:e})),Zh(r)&&r.remove(i);else if(o!==a)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(a)}else{const s=e.getStaticValue(i);e.addValue(i,Fs(s!==void 0?s:a,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const AM=new WeakMap,Y$=Object.keys(Nd),GSe=Y$.length,CM=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],WSe=eA.length;class YSe{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,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.scheduleRender=()=>rt.render(this.render,!1,!0);const{latestValues:s,renderState:l}=a;this.latestValues=s,this.baseTarget={...s},this.initialValues=n.initial?{...s}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.isControllingVariants=E0(n),this.isVariantNode=MU(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(n,{});for(const d in c){const p=c[d];s[d]!==void 0&&pn(p)&&(p.set(s[d],!1),Zh(u)&&u.add(d))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,AM.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),W$.current||HSe(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:fk.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){AM.delete(this.current),this.projection&&this.projection.unmount(),Ri(this.notifyUpdate),Ri(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=Gs.has(t),i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&rt.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),a=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),a()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,a){let o,s;for(let l=0;lthis.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:a,layoutScroll:p,layoutRoot:f})}return s}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Nt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Fs(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=lA(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!pn(a)?a:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new vA),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class K$ extends YSe{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},a){let o=fve(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),o&&(o=i(o))),a){dve(this,r,o);const s=qSe(this,r,o,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}}}function KSe(e){return window.getComputedStyle(e)}class XSe extends K${readValueFromInstance(t,n){if(Gs.has(n)){const r=mA(n);return r&&r.default||0}else{const r=KSe(t),i=(BU(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return F$(t,n)}build(t,n,r,i){nA(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return sA(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;pn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){HU(t,n,r,i)}}class ZSe extends K${constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Gs.has(n)){const r=mA(n);return r&&r.default||0}return n=VU.has(n)?n:oA(n),t.getAttribute(n)}measureInstanceViewportBox(){return Nt()}scrapeMotionValuesFromProps(t,n){return WU(t,n)}build(t,n,r,i){iA(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){GU(t,n,r,i)}mount(t){this.isSVGTag=aA(t.tagName),super.mount(t)}}const JSe=(e,t)=>tA(e)?new ZSe(t,{enableHardwareAcceleration:!1}):new XSe(t,{enableHardwareAcceleration:!0}),QSe={layout:{ProjectionNode:V$,MeasureLayout:B$}},ewe={...Cve,...Wye,...OSe,...QSe},NM=nye((e,t)=>Dye(e,t,ewe,JSe));function A0(e){const t=uA(()=>Fs(e)),{isStatic:n}=q.useContext(b0);if(n){const[,r]=q.useState(e);q.useEffect(()=>t.on("change",r),[])}return t}const twe=e=>typeof e=="object"&&e.mix,nwe=e=>twe(e)?e.mix:void 0;function rwe(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],a=e[2+n],o=e[3+n],s=hA(i,a,{mixer:nwe(a[0]),...o});return t?s(r):s}function X$(e,t){const n=A0(t()),r=()=>n.set(t());return r(),JT(()=>{const i=()=>rt.update(r,!1,!0),a=e.map(o=>o.on("change",i));return()=>{a.forEach(o=>o()),Ri(r)}}),n}function iwe(e){Xc.current=[],e();const t=X$(Xc.current,e);return Xc.current=void 0,t}function RM(e,t,n,r){if(typeof e=="function")return iwe(e);const i=typeof t=="function"?t:rwe(t,n,r);return Array.isArray(e)?IM(e,i):IM([e],([a])=>i(a))}function IM(e,t){const n=uA(()=>[]);return X$(e,()=>{n.length=0;const r=e.length;for(let i=0;i{r.current&&r.current.stop()};return q.useInsertionEffect(()=>i.attach((o,s)=>{if(n)return s(o);if(a(),r.current=Id({keyframes:[i.get(),o],velocity:i.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...t,onUpdate:s}),!It.isProcessing){const l=performance.now()-It.timestamp;l<30&&(r.current.time=xi(l))}return i.get()},a),[JSON.stringify(t)]),JT(()=>{if(pn(e))return e.on("change",o=>i.set(parseFloat(o)))},[i]),i}var C0={exports:{}},Ec={exports:{}};(function(){var e,t,n,r,i,a;typeof performance<"u"&&performance!==null&&performance.now?Ec.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(Ec.exports=function(){return(e()-i)/1e6},t=process.hrtime,e=function(){var o;return o=t(),o[0]*1e9+o[1]},r=e(),a=process.uptime()*1e9,i=r-a):Date.now?(Ec.exports=function(){return Date.now()-n},n=Date.now()):(Ec.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(Kr);var owe=Ec.exports,swe=owe,ua=typeof window>"u"?Kr:window,Yp=["moz","webkit"],Kl="AnimationFrame",fu=ua["request"+Kl],Od=ua["cancel"+Kl]||ua["cancelRequest"+Kl];for(var Zu=0;!fu&&Zu{n.current=e},[e]),q.useEffect(()=>{let r,i;function a(){const s=Date.now()-r;r=Date.now(),o(),n.current&&n.current(s)}function o(){i=_M(a)}if(t)return r=Date.now(),o(),()=>{_M.cancel(i)}},[t])}const dwe=(e,t,n,r)=>{const i=n*6,a=[-i,-i/(r*.65),-i/(r*.85),0,i/(r*.85),i/(r*.65),i],o=[n,n*(r*.55),n*(r*.75),n*r,n*(r*.75),n*(r*.55),n],s=i+1,l=A0(s),u=awe(RM(l,a,o),{stiffness:1700,damping:90}),c=RM(u,d=>`${d/16}rem`);return cwe(()=>{const d=t.current,p=e.get();if(d&&p!==null){const f=d.getBoundingClientRect(),h=f.left+f.width/2,m=p-h;l.set(m);return}l.set(s)},!0),{width:c,widthPX:u}};function pwe({id:e,title:t,img:n,mouseX:r,desktop:i,openApp:a,isOpen:o,link:s,dockSize:l,dockMag:u}){const c=q.useRef(null),{width:d}=dwe(r,c,l,u),{winWidth:p}=p2();return k.jsxs("li",{id:`dock-${e}`,onClick:i||e==="launchpad"?()=>a(e):()=>{},className:"hstack flex-col justify-end mb-1 transition duration-150 ease-in origin-bottom",children:[k.jsx("p",{className:"tooltip absolute px-3 py-1 rounded-md text-sm c-text-black c-bg-300/80",children:t}),s?k.jsx("a",{href:s,target:"_blank",rel:"noreferrer",children:k.jsx(NM.img,{className:"w-12",ref:c,src:n,alt:t,title:t,draggable:!1,style:p<640?{}:{width:d,willChange:"width"}})}):k.jsx(NM.img,{className:"w-12",ref:c,src:n,alt:t,title:t,draggable:!1,style:p<640?{}:{width:d,willChange:"width"}}),k.jsx("div",{className:`h-1 w-1 m-0 rounded-full c-bg-800 ${o?"":"invisible"}`})]})}function fwe({open:e,showApps:t,showLaunchpad:n,toggleLaunchpad:r,hide:i}){const{dockSize:a,dockMag:o}=Ht(u=>({dockSize:u.dockSize,dockMag:u.dockMag})),s=u=>{u==="launchpad"?r(!n):(r(!1),e(u))},l=A0(null);return k.jsx("div",{className:`dock w-full sm:w-max fixed left-0 right-0 mx-auto bottom-1 ${i?"z-0":"z-50"} overflow-x-scroll sm:overflow-x-visible`,children:k.jsx("ul",{className:"mx-auto w-max px-2 space-x-2 flex backdrop-blur-2xl c-border-400/40 c-bg-white/20",border:"1 rounded-none sm:rounded-xl",onMouseMove:u=>l.set(u.nativeEvent.x),onMouseLeave:()=>l.set(null),style:{height:`${a+15}px`},children:Wc.map(u=>k.jsx(pwe,{id:u.id,title:u.title,img:u.img,mouseX:l,desktop:u.desktop,openApp:s,isOpen:u.desktop&&t[u.id],link:u.link,dockSize:a,dockMag:o},`dock-${u.id}`))})})}const hwe="Search";function mwe({show:e,toggleLaunchpad:t}){const n=Ht(u=>u.dark),[r,i]=q.useState(""),[a,o]=q.useState(!1),s=()=>{if(r==="")return ek;const u=r.toLowerCase();return ek.filter(d=>d.title.toLowerCase().includes(u)||d.id.toLowerCase().includes(u))},l=e?"":"opacity-0 invisible transition-opacity duration-200";return k.jsx("div",{className:`${l} z-30 transform scale-110 w-full h-full fixed overflow-hidden bg-center bg-cover`,id:"launchpad",style:{backgroundImage:`url(${n?Ni.night:Ni.day})`},onClick:()=>t(!1),children:k.jsxs("div",{className:"w-full h-full absolute bg-gray-900/20 backdrop-blur-2xl",children:[k.jsxs("div",{className:"mx-auto flex h-7 w-64 mt-5 bg-gray-200/10",border:"1 rounded-md gray-200/30",onClick:u=>u.stopPropagation(),onFocus:()=>o(!0),onBlur:()=>o(!1),children:[k.jsx("div",{className:`${a?"w-6 duration-200":"w-26 delay-250"} hstack justify-end`,children:k.jsx("span",{className:"i-bx:search ml-1 text-white"})}),k.jsx("input",{className:"flex-1 min-w-0 no-outline bg-transparent px-1 text-sm text-white",placeholder:hwe,value:r,onChange:u=>i(u.target.value)})]}),k.jsx("div",{className:"max-w-[1100px] mx-auto mt-8 w-full px-4 sm:px-10",display:"grid",grid:"flow-row cols-4 sm:cols-7",children:s().map(u=>k.jsx("div",{className:"h-32 sm:h-36 w-full flex-center",children:k.jsxs("div",{className:"h-full w-full flex flex-col",children:[k.jsx("a",{className:"h-max",href:u.link,target:"_blank",rel:"noreferrer",onClick:c=>c.stopPropagation(),children:k.jsx("img",{className:"w-14 sm:w-20 mx-auto",src:u.img,alt:u.title,title:u.title})}),k.jsx("span",{className:"mt-2 mx-auto text-white text-xs sm:text-sm",children:u.title})]})},`launchpad-${u.id}`))})]})})}var N0={exports:{}},Z$={};function J$(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";var r=(e=window.document)===null||e===void 0||(t=e.documentElement)===null||t===void 0?void 0:t.style;if(!r||n in r)return"";for(var i=0;ie.childCount===1&&e.child(0).type.name==="html",Uz=(e,t)=>{try{const n=Z0e(e,t),r=W0e(t),i=Y0e(e,t,r,n),[a,o]=K0e(e,i),s=X0e(e,a);return!s||r.type!==s.type||Q0e(s)?null:(s.attrs={...r.attrs},s.descendants(l=>{var u,c,d;const p=l.marks.find(f=>f.type.name==="link");p&&(u=l.text)!=null&&u.includes(o)&&p.attrs.href.includes(o)&&(p.attrs.href=p.attrs.href.replace(o,"")),((c=l.text)!=null&&c.includes(Hx)||(d=l.text)!=null&&d.includes(Gx))&&(l.text=l.text.replaceAll(Hx,qx).replaceAll(Gx,Vx))}),{text:J0e(a),prevNode:r,nextNode:s,placeholder:o})}catch{return null}},ege=(e,t,n,r,i)=>{var a;const{placeholderConfig:o}=e.get(Ru.key),s=o.hole;let l=n.tr.setMeta(t,!0).insertText(s,n.selection.from);const u=n.apply(l),c=Uz(e,u);if(!c)return;const d=c.text.slice(0,c.text.indexOf(c.placeholder)),{$from:p}=u.selection,f=p.before(),h=p.after(),m=V0e(c.nextNode,f,c.placeholder);l=l.replaceWith(f,h,c.nextNode).setNodeMarkup(f,void 0,i).delete(m+1,m+2),l=l.setSelection(Pe.near(l.doc.resolve(m+1))),(B0e.test(d)||["*","_","~"].includes(d.at(-1)||""))&&l.selection instanceof Pe&&(((a=l.selection.$cursor)==null?void 0:a.marks())??[]).forEach(S=>{l=l.removeStoredMark(S.type)}),r(l)},$z=Fi(e=>{let t=null;const n=new fn("MILKDOWN_INLINE_SYNC");return new Rn({key:n,state:{init:()=>null,apply:(r,i,a,o)=>{var s;const l=e.get(xs);if(!((s=l.hasFocus)!=null&&s.call(l))||!l.editable||!r.docChanged||r.getMeta(n))return null;const u=Uz(e,o);if(!u)return null;t&&(cancelAnimationFrame(t),t=null);const{prevNode:c,nextNode:d,text:p}=u,{shouldSyncNode:f}=e.get(Ru.key);return f({prevNode:c,nextNode:d,ctx:e,tr:r,text:p})&&(t=requestAnimationFrame(()=>{t=null;const{dispatch:h,state:m}=e.get(xs);ege(e,n,m,h,c.attrs)})),null}}})});W($z,{displayName:"Prose",group:"Prose"});const OT=Tu("remarkAddOrderInList",()=>()=>e=>{q4(e,"list",t=>{if(t.ordered){const n=t.start??1;t.children.forEach((r,i)=>{r.label=i+n})}})});W(OT.plugin,{displayName:"Remark",group:"Remark"});W(OT.options,{displayName:"RemarkConfig",group:"Remark"});const _T=Tu("remarkLineBreak",()=>()=>e=>{const t=/[\t ]*(?:\r?\n|\r)/g;q4(e,"text",(n,r,i)=>{if(!n.value||typeof n.value!="string")return;const a=[];let o=0;t.lastIndex=0;let s=t.exec(n.value);for(;s;){const l=s.index;o!==l&&a.push({type:"text",value:n.value.slice(o,l)}),a.push({type:"break",data:{isInline:!0}}),o=l+s[0].length,s=t.exec(n.value)}if(a.length>0&&i&&typeof r=="number")return o",group:"Remark"});W(_T.options,{displayName:"RemarkConfig",group:"Remark"});const MT=Tu("remarkInlineLink",()=>N0e);W(MT.plugin,{displayName:"Remark",group:"Remark"});W(MT.options,{displayName:"RemarkConfig",group:"Remark"});const tge=e=>!!e.children,nge=e=>e.type==="html";function rge(e,t){return n(e,0,null)[0];function n(r,i,a){if(tge(r)){const o=[];for(let s=0,l=r.children.length;s()=>e=>{rge(e,(t,n,r)=>nge(t)?((r==null?void 0:r.type)==="root"&&(t.children=[{...t}],delete t.value,t.type="paragraph"),[t]):[t])});W(DT.plugin,{displayName:"Remark",group:"Remark"});W(DT.options,{displayName:"RemarkConfig",group:"Remark"});const LT=Tu("remarkMarker",()=>()=>(e,t)=>{const n=r=>t.value.charAt(r.position.start.offset);q4(e,r=>["strong","emphasis"].includes(r.type),r=>{r.marker=n(r)})});W(LT.plugin,{displayName:"Remark",group:"Remark"});W(LT.options,{displayName:"RemarkConfig",group:"Remark"});const jz=Fi(()=>{let e=!1;const t=new fn("MILKDOWN_INLINE_NODES_CURSOR"),n=new Rn({key:t,state:{init(){return!1},apply(r){if(!r.selection.empty)return!1;const i=r.selection.$from,a=i.nodeBefore,o=i.nodeAfter;return!!(a&&o&&a.isInline&&!a.isText&&o.isInline&&!o.isText)}},props:{handleDOMEvents:{compositionend:(r,i)=>e?(e=!1,requestAnimationFrame(()=>{if(n.getState(r.state)){const a=r.state.selection.from;i.preventDefault(),r.dispatch(r.state.tr.insertText(i.data||"",a))}}),!0):!1,compositionstart:r=>(n.getState(r.state)&&(e=!0),!1),beforeinput:(r,i)=>{if(n.getState(r.state)&&i instanceof InputEvent&&i.data&&!e){const a=r.state.selection.from;return i.preventDefault(),r.dispatch(r.state.tr.insertText(i.data||"",a)),!0}return!1}},decorations(r){if(n.getState(r)){const i=r.selection.$from.pos,a=document.createElement("span"),o=Sn.widget(i,a,{side:-1}),s=document.createElement("span"),l=Sn.widget(i,s);return setTimeout(()=>{a.contentEditable="true",s.contentEditable="true"}),ht.create(r.doc,[o,l])}return ht.empty}}});return n});W(jz,{displayName:"Prose",group:"Prose"});const qz=Fi(e=>new Rn({key:new fn("MILKDOWN_HARDBREAK_MARKS"),appendTransaction:(t,n,r)=>{if(!t.length)return;const[i]=t;if(!i)return;const[a]=i.steps;if(i.getMeta("hardbreak")){if(!(a instanceof Kt))return;const{from:o}=a;return r.tr.setNodeMarkup(o,ks.type(e),void 0,[])}if(a instanceof na){let o=r.tr;const{from:s,to:l}=a;return r.doc.nodesBetween(s,l,(u,c)=>{u.type===ks.type(e)&&(o=o.setNodeMarkup(c,ks.type(e),void 0,[]))}),o}}}));W(qz,{displayName:"Prose",group:"Prose"});const PT=Bi(["table","code_block"],"hardbreakFilterNodes");W(PT,{displayName:"Ctx",group:"Prose"});const Hz=Fi(e=>{const t=e.get(PT.key);return new Rn({key:new fn("MILKDOWN_HARDBREAK_FILTER"),filterTransaction:(n,r)=>{const i=n.getMeta("hardbreak"),[a]=n.steps;if(i&&a){const{from:o}=a,s=r.doc.resolve(o);let l=s.depth,u=!0;for(;l>0;)t.includes(s.node(l).type.name)&&(u=!1),l--;return u}return!0}})});W(Hz,{displayName:"Prose",group:"Prose"});const Vz=Fi(e=>{const t=new fn("MILKDOWN_HEADING_ID"),n=r=>{if(r.composing||!r.editable)return;const i=e.get(d0.key),a=r.state.tr.setMeta("addToHistory",!1);let o=!1;r.state.doc.descendants((s,l)=>{if(s.type===Vs.type(e)){if(s.textContent.trim().length===0)return;const u=s.attrs,c=i(s);u.id!==c&&(o=!0,a.setMeta(t,!0).setNodeMarkup(l,void 0,{...u,id:c}))}}),o&&r.dispatch(a)};return new Rn({key:t,view:r=>(n(r),{update:i=>{n(i)}})})});W(Vz,{displayName:"Prose",group:"Prose"});const Gz=Fi(e=>{const t=n=>{if(n.composing||!n.editable)return;const r=Nu.type(e),i=Cu.type(e),a=Ci.type(e),o=n.state,s=(c,d)=>{let p=!1;const f=`${d+1}.`;return c.label!==f&&(c.label=f,p=!0),p};let l=o.tr,u=!1;o.doc.descendants((c,d,p,f)=>{if(c.type===i){const h=c.maybeChild(0);(h==null?void 0:h.type)===a&&h.attrs.listType==="ordered"&&(u=!0,l.setNodeMarkup(d,r,{spread:"true"}),c.descendants((m,S,y,g)=>{if(m.type===a){const v={...m.attrs};s(v,g)&&(l=l.setNodeMarkup(S,void 0,v))}return!1}))}else if(c.type===a&&(p==null?void 0:p.type)===r){const h={...c.attrs};let m=!1;h.listType!=="ordered"&&(h.listType="ordered",m=!0),p!=null&&p.maybeChild(0)&&(m=s(h,f)),m&&(l=l.setNodeMarkup(d,void 0,h),u=!0)}}),u&&n.dispatch(l.setMeta("addToHistory",!1))};return new Rn({key:new fn("MILKDOWN_KEEP_LIST_ORDER"),view:n=>(t(n),{update:r=>{t(r)}})})});W(Gz,{displayName:"Prose",group:"Prose"});const ige=[Ru,$z,qz,PT,Hz,jz,OT,MT,_T,DT,LT,Vz,Gz].flat(),age=[D0e,L0e,P0e,F0e,ige].flat();var Wx,Yx;if(typeof WeakMap<"u"){let e=new WeakMap;Wx=t=>e.get(t),Yx=(t,n)=>(e.set(t,n),n)}else{const e=[];let n=0;Wx=r=>{for(let i=0;i(n==10&&(n=0),e[n++]=r,e[n++]=i)}var Ge=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t=n){(a||(a=[])).push({type:"overlong_rowspan",pos:c,n:y-v});break}const x=i+v*t;for(let A=0;Ar&&(a+=u.attrs.colspan)}}for(let o=0;o1&&(n=!0)}t==-1?t=a:t!=a&&(t=Math.max(t,a))}return t}function lge(e,t,n){e.problems||(e.problems=[]);const r={};for(let i=0;iNumber(o)):null,i=Number(e.getAttribute("colspan")||1),a={colspan:i,rowspan:Number(e.getAttribute("rowspan")||1),colwidth:r&&r.length==i?r:null};for(const o in t){const s=t[o].getFromDOM,l=s&&s(e);l!=null&&(a[o]=l)}return a}function a7(e,t){const n={};e.attrs.colspan!=1&&(n.colspan=e.attrs.colspan),e.attrs.rowspan!=1&&(n.rowspan=e.attrs.rowspan),e.attrs.colwidth&&(n["data-colwidth"]=e.attrs.colwidth.join(","));for(const r in t){const i=t[r].setDOMAttr;i&&i(e.attrs[r],n)}return n}function cge(e){const t=e.cellAttributes||{},n={colspan:{default:1},rowspan:{default:1},colwidth:{default:null}};for(const r in t)n[r]={default:t[r].default};return{table:{content:"table_row+",tableRole:"table",isolating:!0,group:e.tableGroup,parseDOM:[{tag:"table"}],toDOM(){return["table",["tbody",0]]}},table_row:{content:"(table_cell | table_header)*",tableRole:"row",parseDOM:[{tag:"tr"}],toDOM(){return["tr",0]}},table_cell:{content:e.cellContent,attrs:n,tableRole:"cell",isolating:!0,parseDOM:[{tag:"td",getAttrs:r=>i7(r,t)}],toDOM(r){return["td",a7(r,t),0]}},table_header:{content:e.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:r=>i7(r,t)}],toDOM(r){return["th",a7(r,t),0]}}}}function _r(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(const n in e.nodes){const r=e.nodes[n],i=r.spec.tableRole;i&&(t[i]=r)}}return t}var Xa=new fn("selectingCells");function Jd(e){for(let t=e.depth-1;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function Un(e){const t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function f0(e){const t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;const n=Jd(t.$head)||dge(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function dge(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){const r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){const r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function Kx(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function pge(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function FT(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function Wz(e,t,n){const r=e.node(-1),i=Ge.get(r),a=e.start(-1),o=i.nextCell(e.pos-a,t,n);return o==null?null:e.node(0).resolve(a+o)}function Ps(e,t,n=1){const r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(i=>i>0)||(r.colwidth=null)),r}function fge(e,t,n=1){const r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let i=0;iu!=t.pos-i);s.unshift(t.pos-i);const l=s.map(u=>{const c=n.nodeAt(u);if(!c)throw RangeError(`No cell with offset ${u} found`);const d=i+u+1;return new yB(o.resolve(d),o.resolve(d+c.content.size))});super(l[0].$from,l[0].$to,l),this.$anchorCell=e,this.$headCell=t}map(e,t){const n=e.resolve(t.map(this.$anchorCell.pos)),r=e.resolve(t.map(this.$headCell.pos));if(Kx(n)&&Kx(r)&&FT(n,r)){const i=this.$anchorCell.node(-1)!=n.node(-1);return i&&this.isRowSelection()?Ue.rowSelection(n,r):i&&this.isColSelection()?Ue.colSelection(n,r):new Ue(n,r)}return Pe.between(n,r)}content(){const e=this.$anchorCell.node(-1),t=Ge.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),i={},a=[];for(let s=r.top;s0||m>0){let S=f.attrs;if(h>0&&(S=Ps(S,0,h)),m>0&&(S=Ps(S,S.colspan-m,m)),p.leftr.bottom){const S={...f.attrs,rowspan:Math.min(p.bottom,r.bottom)-Math.max(p.top,r.top)};p.top0)return!1;const n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount}static colSelection(e,t=e){const n=e.node(-1),r=Ge.get(n),i=e.start(-1),a=r.findCell(e.pos-i),o=r.findCell(t.pos-i),s=e.node(0);return a.top<=o.top?(a.top>0&&(e=s.resolve(i+r.map[a.left])),o.bottom0&&(t=s.resolve(i+r.map[o.left])),a.bottom0)return!1;const a=r+this.$anchorCell.nodeAfter.attrs.colspan,o=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(a,o)==t.width}eq(e){return e instanceof Ue&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,t=e){const n=e.node(-1),r=Ge.get(n),i=e.start(-1),a=r.findCell(e.pos-i),o=r.findCell(t.pos-i),s=e.node(0);return a.left<=o.left?(a.left>0&&(e=s.resolve(i+r.map[a.top*r.width])),o.right0&&(t=s.resolve(i+r.map[o.top*r.width])),a.right{t.push(Sn.node(r,r+n.nodeSize,{class:"selectedCell"}))}),ht.create(e.doc,t)}function gge({$from:e,$to:t}){if(e.pos==t.pos||e.pos=0&&!(e.after(i+1)=0&&!(t.before(a+1)>t.start(a));a--,r--);return n==r&&/row|table/.test(e.node(i).type.spec.tableRole)}function yge({$from:e,$to:t}){let n,r;for(let i=e.depth;i>0;i--){const a=e.node(i);if(a.type.spec.tableRole==="cell"||a.type.spec.tableRole==="header_cell"){n=a;break}}for(let i=t.depth;i>0;i--){const a=t.node(i);if(a.type.spec.tableRole==="cell"||a.type.spec.tableRole==="header_cell"){r=a;break}}return n!==r&&t.parentOffset===0}function bge(e,t,n){const r=(t||e).selection,i=(t||e).doc;let a,o;if(r instanceof Ne&&(o=r.node.type.spec.tableRole)){if(o=="cell"||o=="header_cell")a=Ue.create(i,r.from);else if(o=="row"){const s=i.resolve(r.from+1);a=Ue.rowSelection(s,s)}else if(!n){const s=Ge.get(r.node),l=r.from+1,u=l+s.map[s.width*s.height-1];a=Ue.create(i,l+1,u)}}else r instanceof Pe&&gge(r)?a=Pe.create(i,r.from):r instanceof Pe&&yge(r)&&(a=Pe.create(i,r.$from.start(),r.$from.end()));return a&&(t||(t=e.tr)).setSelection(a),t}var vge=new fn("fix-tables");function Kz(e,t,n,r){const i=e.childCount,a=t.childCount;e:for(let o=0,s=0;o{i.type.spec.tableRole=="table"&&(n=wge(e,i,a,n))};return t?t.doc!=e.doc&&Kz(t.doc,e.doc,0,r):e.doc.descendants(r),n}function wge(e,t,n,r){const i=Ge.get(t);if(!i.problems)return r;r||(r=e.tr);const a=[];for(let l=0;l0){let f="cell";c.firstChild&&(f=c.firstChild.type.spec.tableRole);const h=[];for(let S=0;S0&&r>0||t.child(0).type.spec.tableRole=="table");)n--,r--,t=t.child(0).content;const i=t.child(0),a=i.type.spec.tableRole,o=i.type.schema,s=[];if(a=="row")for(let l=0;l=0;o--){const{rowspan:s,colspan:l}=a.child(o).attrs;for(let u=i;u=t.length&&t.push(J.empty),n[i]r&&(p=p.type.createChecked(Ps(p.attrs,p.attrs.colspan,c+p.attrs.colspan-r),p.content)),u.push(p),c+=p.attrs.colspan;for(let f=1;fi&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,i-d.attrs.rowspan)},d.content)),l.push(d)}a.push(J.from(l))}n=a,t=i}return{width:e,height:t,rows:n}}function Tge(e,t,n,r,i,a,o){const s=e.doc.type.schema,l=_r(s);let u,c;if(i>t.width)for(let d=0,p=0;dt.height){const d=[];for(let h=0,m=(t.height-1)*t.width;h=t.width?!1:n.nodeAt(t.map[m+h]).type==l.header_cell;d.push(S?c||(c=l.header_cell.createAndFill()):u||(u=l.cell.createAndFill()))}const p=l.row.create(null,J.from(d)),f=[];for(let h=t.height;h{if(!i)return!1;const a=n.selection;if(a instanceof Ue)return jf(n,r,Ce.near(a.$headCell,t));if(e!="horiz"&&!a.empty)return!1;const o=Xz(i,e,t);if(o==null)return!1;if(e=="horiz")return jf(n,r,Ce.near(n.doc.resolve(a.head+t),t));{const s=n.doc.resolve(o),l=Wz(s,e,t);let u;return l?u=Ce.near(l,1):t<0?u=Ce.near(n.doc.resolve(s.before(-1)),-1):u=Ce.near(n.doc.resolve(s.after(-1)),1),jf(n,r,u)}}}function jp(e,t){return(n,r,i)=>{if(!i)return!1;const a=n.selection;let o;if(a instanceof Ue)o=a;else{const l=Xz(i,e,t);if(l==null)return!1;o=new Ue(n.doc.resolve(l))}const s=Wz(o.$headCell,e,t);return s?jf(n,r,new Ue(o.$anchorCell,s)):!1}}function qp(e,t){const n=e.selection;if(!(n instanceof Ue))return!1;if(t){const r=e.tr,i=_r(e.schema).cell.createAndFill().content;n.forEachCell((a,o)=>{a.content.eq(i)||r.replace(r.mapping.map(o+1),r.mapping.map(o+a.nodeSize-1),new de(i,0,0))}),r.docChanged&&t(r)}return!0}function Cge(e,t){const n=e.state.doc,r=Jd(n.resolve(t));return r?(e.dispatch(e.state.tr.setSelection(new Ue(r))),!0):!1}function Nge(e,t,n){if(!Un(e.state))return!1;let r=Ege(n);const i=e.state.selection;if(i instanceof Ue){r||(r={width:1,height:1,rows:[J.from(Xx(_r(e.state.schema).cell,n))]});const a=i.$anchorCell.node(-1),o=i.$anchorCell.start(-1),s=Ge.get(a).rectBetween(i.$anchorCell.pos-o,i.$headCell.pos-o);return r=kge(r,s.right-s.left,s.bottom-s.top),l7(e.state,e.dispatch,o,s,r),!0}else if(r){const a=f0(e.state),o=a.start(-1);return l7(e.state,e.dispatch,o,Ge.get(a.node(-1)).findCell(a.pos-o),r),!0}else return!1}function Rge(e,t){var n;if(t.ctrlKey||t.metaKey)return;const r=u7(e,t.target);let i;if(t.shiftKey&&e.state.selection instanceof Ue)a(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&(i=Jd(e.state.selection.$anchor))!=null&&((n=vw(e,t))==null?void 0:n.pos)!=i.pos)a(i,t),t.preventDefault();else if(!r)return;function a(l,u){let c=vw(e,u);const d=Xa.getState(e.state)==null;if(!c||!FT(l,c))if(d)c=l;else return;const p=new Ue(l,c);if(d||!e.state.selection.eq(p)){const f=e.state.tr.setSelection(p);d&&f.setMeta(Xa,l.pos),e.dispatch(f)}}function o(){e.root.removeEventListener("mouseup",o),e.root.removeEventListener("dragstart",o),e.root.removeEventListener("mousemove",s),Xa.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(Xa,-1))}function s(l){const u=l,c=Xa.getState(e.state);let d;if(c!=null)d=e.state.doc.resolve(c);else if(u7(e,u.target)!=r&&(d=vw(e,t),!d))return o();d&&a(d,u)}e.root.addEventListener("mouseup",o),e.root.addEventListener("dragstart",o),e.root.addEventListener("mousemove",s)}function Xz(e,t,n){if(!(e.state.selection instanceof Pe))return null;const{$head:r}=e.state.selection;for(let i=r.depth-1;i>=0;i--){const a=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:a.childCount))return null;if(a.type.spec.tableRole=="cell"||a.type.spec.tableRole=="header_cell"){const s=r.before(i),l=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(l)?s:null}}return null}function u7(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function vw(e,t){const n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?Jd(e.state.doc.resolve(n.pos)):null}var Ige=class{constructor(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Zx(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,Zx(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function Zx(e,t,n,r,i,a){var o;let s=0,l=!0,u=t.firstChild;const c=e.firstChild;if(c){for(let d=0,p=0;dnew n(s,t,l),new qf(-1,!1)},apply(a,o){return o.apply(a)}},props:{attributes:a=>{const o=xr.getState(a);return o&&o.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(a,o)=>{_ge(a,o,e,t,r)},mouseleave:a=>{Mge(a)},mousedown:(a,o)=>{Dge(a,o,t)}},decorations:a=>{const o=xr.getState(a);if(o&&o.activeHandle>-1)return Uge(a,o.activeHandle)},nodeViews:{}}});return i}var qf=class{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(e){const t=this,n=e.getMeta(xr);if(n&&n.setHandle!=null)return new qf(n.setHandle,!1);if(n&&n.setDragging!==void 0)return new qf(t.activeHandle,n.setDragging);if(t.activeHandle>-1&&e.docChanged){let r=e.mapping.map(t.activeHandle,-1);return Kx(e.doc.resolve(r))||(r=-1),new qf(r,t.dragging)}return t}};function _ge(e,t,n,r,i){const a=xr.getState(e.state);if(a&&!a.dragging){const o=Pge(t.target);let s=-1;if(o){const{left:l,right:u}=o.getBoundingClientRect();t.clientX-l<=n?s=c7(e,t,"left",n):u-t.clientX<=n&&(s=c7(e,t,"right",n))}if(s!=a.activeHandle){if(!i&&s!==-1){const l=e.state.doc.resolve(s),u=l.node(-1),c=Ge.get(u),d=l.start(-1);if(c.colCount(l.pos-d)+l.nodeAfter.attrs.colspan-1==c.width-1)return}Zz(e,s)}}}function Mge(e){const t=xr.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&Zz(e,-1)}function Dge(e,t,n){const r=xr.getState(e.state);if(!r||r.activeHandle==-1||r.dragging)return!1;const i=e.state.doc.nodeAt(r.activeHandle),a=Lge(e,r.activeHandle,i.attrs);e.dispatch(e.state.tr.setMeta(xr,{setDragging:{startX:t.clientX,startWidth:a}}));function o(l){window.removeEventListener("mouseup",o),window.removeEventListener("mousemove",s);const u=xr.getState(e.state);u!=null&&u.dragging&&(Fge(e,u.activeHandle,d7(u.dragging,l,n)),e.dispatch(e.state.tr.setMeta(xr,{setDragging:null})))}function s(l){if(!l.which)return o(l);const u=xr.getState(e.state);if(u&&u.dragging){const c=d7(u.dragging,l,n);Bge(e,u.activeHandle,c,n)}}return window.addEventListener("mouseup",o),window.addEventListener("mousemove",s),t.preventDefault(),!0}function Lge(e,t,{colspan:n,colwidth:r}){const i=r&&r[r.length-1];if(i)return i;const a=e.domAtPos(t);let s=a.node.childNodes[a.offset].offsetWidth,l=n;if(r)for(let u=0;u0?-1:0;hge(t,r,i+a)&&(a=i==0||i==t.width?null:0);for(let o=0;o0&&i0&&t.map[s-1]==l||i0&&c==t.map[u-t.width]){const d=n.nodeAt(c).attrs;e.setNodeMarkup(e.mapping.slice(s).map(c+r),null,{...d,rowspan:d.rowspan-1}),l+=d.colspan-1}else if(i{o.attrs[e]!==t&&a.setNodeMarkup(s,null,{...o.attrs,[e]:t})}):a.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[e]:t}),r(a)}return!0}}function Yge(e){return function(t,n){if(!Un(t))return!1;if(n){const r=_r(t.schema),i=Fo(t),a=t.tr,o=i.map.cellsInRect(e=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:e=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),s=o.map(l=>i.table.nodeAt(l));for(let l=0;l{const h=f+a.tableStart,m=o.doc.nodeAt(h);m&&o.setNodeMarkup(h,p,m.attrs)}),r(o)}return!0}}BT("row",{useDeprecatedLogic:!0});BT("column",{useDeprecatedLogic:!0});BT("cell",{useDeprecatedLogic:!0});function Kge(e,t){if(t<0){const n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let r=e.index(-1)-1,i=e.before();r>=0;r--){const a=e.node(-1).child(r),o=a.lastChild;if(o)return i-1-o.nodeSize;i-=a.nodeSize}}else{if(e.index()0;r--)if(n.node(r).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function Zge({allowTableNodeSelection:e=!1}={}){return new Rn({key:Xa,state:{init(){return null},apply(t,n){const r=t.getMeta(Xa);if(r!=null)return r==-1?null:r;if(n==null||!t.docChanged)return n;const{deleted:i,pos:a}=t.mapping.mapResult(n);return i?null:a}},props:{decorations:mge,handleDOMEvents:{mousedown:Rge},createSelectionBetween(t){return Xa.getState(t.state)!=null?t.state.selection:null},handleTripleClick:Cge,handleKeyDown:Age,handlePaste:Nge},appendTransaction(t,n,r){return bge(r,Sge(r,n),e)}})}const Re=(e,t)=>(Object.assign(e,{meta:{package:"@milkdown/preset-gfm",...t}}),e),zT=Yd("strike_through");Re(zT,{displayName:"Attr",group:"Strikethrough"});const h0=Wd("strike_through",e=>({parseDOM:[{tag:"del"},{style:"text-decoration",getAttrs:t=>t==="line-through"}],toDOM:t=>["del",e.get(zT.key)(t)],parseMarkdown:{match:t=>t.type==="delete",runner:(t,n,r)=>{t.openMark(r),t.next(n.children),t.closeMark(r)}},toMarkdown:{match:t=>t.type.name==="strike_through",runner:(t,n)=>{t.withMark(n,"delete")}}}));Re(h0.mark,{displayName:"MarkSchema",group:"Strikethrough"});Re(h0.ctx,{displayName:"MarkSchemaCtx",group:"Strikethrough"});const UT=Me("ToggleStrikeThrough",e=>()=>s0(h0.type(e)));Re(UT,{displayName:"Command",group:"Strikethrough"});const $T=Hn("strikeThroughKeymap",{ToggleStrikethrough:{shortcuts:"Mod-Alt-x",command:e=>{const t=e.get(Ve);return()=>t.call(UT.key)}}});Re($T.ctx,{displayName:"KeymapCtx",group:"Strikethrough"});Re($T.shortcuts,{displayName:"Keymap",group:"Strikethrough"});const eU=(e,t=3,n=3)=>{const r=Array(n).fill(0).map(()=>tp.type(e).createAndFill()),i=Array(n).fill(0).map(()=>g0.type(e).createAndFill()),a=Array(t).fill(0).map((o,s)=>ep.type(e).create(null,s===0?i:r));return Qd.type(e).create(null,a)},Iu=e=>mme(t=>t.type.spec.tableRole==="table")(e),hl=(e,t)=>{const n=Iu(t);if(!n)return;const r=Ge.get(n.node);if(!(e<0||e>=r.width))return r.cellsInRect({left:e,right:e+1,top:0,bottom:r.height}).map(i=>{const a=n.node.nodeAt(i);if(!a)return;const o=i+n.start;return{pos:o,start:o+1,node:a}}).filter(i=>i!=null)},ml=(e,t)=>{const n=Iu(t);if(!n)return;const r=Ge.get(n.node);if(!(e<0||e>=r.height))return r.cellsInRect({left:0,right:r.width,top:e,bottom:e+1}).map(i=>{const a=n.node.nodeAt(i);if(!a)return;const o=i+n.start;return{pos:o,start:o+1,node:a}}).filter(i=>i!=null)},Jge=e=>{const t=Iu(e);if(!t)return;const n=Ge.get(t.node);return n.cellsInRect({left:0,right:n.width,top:0,bottom:n.height}).map(r=>{const i=t.node.nodeAt(r),a=r+t.start;return{pos:a,start:a+1,node:i}})},Qge=e=>{const t=Jge(e.selection);if(t&&t[0]){const n=e.doc.resolve(t[0].pos),r=t[t.length-1];if(r){const i=e.doc.resolve(r.pos);return o0(e.setSelection(new Ue(i,n)))}}return e};function tU(e,t,{map:n,tableStart:r,table:i},a){const o=Array(a).fill(0).reduce((l,u,c)=>l+i.child(c).nodeSize,r),s=Array(n.width).fill(0).map((l,u)=>{const c=i.nodeAt(n.map[u]);return tp.type(e).createAndFill({alignment:c==null?void 0:c.attrs.alignment})});return t.insert(o,ep.type(e).create(null,s)),t}const nU=e=>t=>n=>{const r=Iu(n.selection),i=e==="row";if(r){const a=Ge.get(r.node);if(t>=0&&t<(i?a.height:a.width)){const o=a.positionAt(i?t:a.height-1,i?a.width-1:t,r.node),s=n.doc.resolve(r.start+o),l=i?Ue.rowSelection:Ue.colSelection,u=a.positionAt(i?t:0,i?0:t,r.node),c=n.doc.resolve(r.start+u);return o0(n.setSelection(l(s,c)))}}return n},e1e=nU("row"),t1e=nU("col"),f7=e=>e[0].map((t,n)=>e.map(r=>r[n])),rU=(e,t)=>{const n=[],r=Ge.get(e);for(let i=0;i{const t=Ge.get(e),n=[];for(let r=0;r{const i=t[0]>n[0]?-1:1,a=e.splice(t[0],t.length),o=a.length%2===0?1:0;let s;return r===-1&&i===1?s=n[0]-1:r===1&&i===-1?s=n[n.length-1]-o+1:s=i===-1?n[0]:n[n.length-1]-o,e.splice(s,0,...a),e},n1e=(e,t,n,r)=>{let i=f7(iU(e.node));return i=aU(i,t,n,r),i=f7(i),rU(e.node,i)},r1e=(e,t,n,r)=>{let i=iU(e.node);return i=aU(i,t,n,r),rU(e.node,i)},h7=(e,t)=>{let n=e,r=e;for(let c=e;c>=0;c--){const d=hl(c,t.selection);d&&d.forEach(p=>{const f=p.node.attrs.colspan+c-1;f>=n&&(n=c),f>r&&(r=f)})}for(let c=e;c<=r;c++){const d=hl(c,t.selection);d&&d.forEach(p=>{const f=p.node.attrs.colspan+c-1;p.node.attrs.colspan>1&&f>r&&(r=f)})}const i=[];for(let c=n;c<=r;c++){const d=hl(c,t.selection);d&&d.length&&i.push(c)}n=i[0],r=i[i.length-1];const a=hl(n,t.selection),o=ml(0,t.selection),s=t.doc.resolve(a[a.length-1].pos);let l;for(let c=r;c>=n;c--){const d=hl(c,t.selection);if(d&&d.length){for(let p=o.length-1;p>=0;p--)if(o[p].pos===d[0].pos){l=d[0];break}if(l)break}}const u=t.doc.resolve(l.pos);return{$anchor:s,$head:u,indexes:i}},m7=(e,t)=>{let n=e,r=e;for(let c=e;c>=0;c--)ml(c,t.selection).forEach(d=>{const p=d.node.attrs.rowspan+c-1;p>=n&&(n=c),p>r&&(r=p)});for(let c=e;c<=r;c++)ml(c,t.selection).forEach(d=>{const p=d.node.attrs.rowspan+c-1;d.node.attrs.rowspan>1&&p>r&&(r=p)});const i=[];for(let c=n;c<=r;c++){const d=ml(c,t.selection);d&&d.length&&i.push(c)}n=i[0],r=i[i.length-1];const a=ml(n,t.selection),o=hl(0,t.selection),s=t.doc.resolve(a[a.length-1].pos);let l;for(let c=r;c>=n;c--){const d=ml(c,t.selection);if(d&&d.length){for(let p=o.length-1;p>=0;p--)if(o[p].pos===d[0].pos){l=d[0];break}if(l)break}}const u=t.doc.resolve(l.pos);return{$anchor:s,$head:u,indexes:i}};function i1e(e,t,n,r=!0){const i=Iu(e.selection);if(!i)return e;const{indexes:a}=h7(t,e),{indexes:o}=h7(n,e);if(a.includes(n))return e;const s=n1e(i,a,o,0),l=o0(e).replaceWith(i.pos,i.pos+i.node.nodeSize,s);if(!r)return l;const u=Ge.get(s),c=i.start,d=n,p=u.positionAt(u.height-1,d,s),f=l.doc.resolve(c+p),h=Ue.colSelection,m=u.positionAt(0,d,s),S=l.doc.resolve(c+m);return l.setSelection(h(f,S))}function a1e(e,t,n,r=!0){const i=Iu(e.selection);if(!i)return e;const{indexes:a}=m7(t,e),{indexes:o}=m7(n,e);if(a.includes(n))return e;const s=r1e(i,a,o,0),l=o0(e).replaceWith(i.pos,i.pos+i.node.nodeSize,s);if(!r)return l;const u=Ge.get(s),c=i.start,d=n,p=u.positionAt(d,u.width-1,s),f=l.doc.resolve(c+p),h=Ue.rowSelection,m=u.positionAt(d,0,s),S=l.doc.resolve(c+m);return l.setSelection(h(f,S))}const m0=cge({tableGroup:"block",cellContent:"paragraph",cellAttributes:{alignment:{default:"left",getFromDOM:e=>e.style.textAlign||"left",setDOMAttr:(e,t)=>{t.style=`text-align: ${e||"left"}`}}}}),Qd=Qt("table",()=>({...m0.table,parseMarkdown:{match:e=>e.type==="table",runner:(e,t,n)=>{const r=t.align,i=t.children.map((a,o)=>({...a,align:r,isHeader:o===0}));e.openNode(n),e.next(i),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="table",runner:(e,t)=>{var n;const r=(n=t.content.firstChild)==null?void 0:n.content;if(!r)return;const i=[];r.forEach(a=>{i.push(a.attrs.alignment)}),e.openNode("table",void 0,{align:i}),e.next(t.content),e.closeNode()}}}));Re(Qd.node,{displayName:"NodeSchema
",group:"Table"});Re(Qd.ctx,{displayName:"NodeSchemaCtx
",group:"Table"});const ep=Qt("table_row",()=>({...m0.table_row,parseMarkdown:{match:e=>e.type==="tableRow",runner:(e,t,n)=>{const r=t.align,i=t.children.map((a,o)=>({...a,align:r[o],isHeader:t.isHeader}));e.openNode(n),e.next(i),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="table_row",runner:(e,t)=>{e.openNode("tableRow"),e.next(t.content),e.closeNode()}}}));Re(ep.node,{displayName:"NodeSchema",group:"Table"});Re(ep.ctx,{displayName:"NodeSchemaCtx",group:"Table"});const tp=Qt("table_cell",()=>({...m0.table_cell,parseMarkdown:{match:e=>e.type==="tableCell"&&!e.isHeader,runner:(e,t,n)=>{const r=t.align;e.openNode(n,{alignment:r}).openNode(e.schema.nodes.paragraph).next(t.children).closeNode().closeNode()}},toMarkdown:{match:e=>e.type.name==="table_cell",runner:(e,t)=>{e.openNode("tableCell").next(t.content).closeNode()}}}));Re(tp.node,{displayName:"NodeSchema",group:"Table"});Re(tp.ctx,{displayName:"NodeSchemaCtx",group:"Table"});const g0=Qt("table_header",()=>({...m0.table_header,parseMarkdown:{match:e=>e.type==="tableCell"&&!!e.isHeader,runner:(e,t,n)=>{const r=t.align;e.openNode(n,{alignment:r}),e.openNode(e.schema.nodes.paragraph),e.next(t.children),e.closeNode(),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="table_header",runner:(e,t)=>{e.openNode("tableCell"),e.next(t.content),e.closeNode()}}}));Re(g0.node,{displayName:"NodeSchema",group:"Table"});Re(g0.ctx,{displayName:"NodeSchemaCtx",group:"Table"});const oU=Sa(e=>new ku(/^\|(?\d+)[xX](?\d+)\|\s$/,(t,n,r,i)=>{var a,o;const s=t.doc.resolve(r);if(!s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),Qd.type(e)))return null;const l=eU(e,Number((a=n.groups)==null?void 0:a.row),Number((o=n.groups)==null?void 0:o.col)),u=t.tr.replaceRangeWith(r,i,l);return u.setSelection(Pe.create(u.doc,r+3)).scrollIntoView()}));Re(oU,{displayName:"InputRule",group:"Table"});const jT=Me("GoToPrevTableCell",()=>()=>Qz(-1));Re(jT,{displayName:"Command",group:"Table"});const qT=Me("GoToNextTableCell",()=>()=>Qz(1));Re(qT,{displayName:"Command",group:"Table"});const HT=Me("BreakTable",e=>()=>(t,n)=>{if(!Un(t))return!1;const{$head:r}=t.selection,i=r.after(),a=t.tr.replaceWith(i,i,wa.type(e).createAndFill());return a.setSelection(Ce.near(a.doc.resolve(i),1)).scrollIntoView(),n==null||n(a),!0});Re(HT,{displayName:"Command",group:"Table"});const sU=Me("InsertTable",e=>({row:t,col:n}={})=>(r,i)=>{const{selection:a,tr:o}=r,{from:s}=a,l=eU(e,t,n),u=o.replaceSelectionWith(l),c=Ce.findFrom(u.doc.resolve(s),1,!0);return c&&u.setSelection(c),i==null||i(u),!0});Re(sU,{displayName:"Command",group:"Table"});const lU=Me("MoveRow",()=>({from:e,to:t}={})=>(n,r)=>{const{tr:i}=n;return!!(r!=null&&r(a1e(i,e??0,t??0,!0)))});Re(lU,{displayName:"Command",group:"Table"});const uU=Me("MoveCol",()=>({from:e,to:t}={})=>(n,r)=>{const{tr:i}=n;return!!(r!=null&&r(i1e(i,e??0,t??0,!0)))});Re(uU,{displayName:"Command",group:"Table"});const cU=Me("SelectRow",()=>(e=0)=>(t,n)=>{const{tr:r}=t;return!!(n!=null&&n(e1e(e)(r)))});Re(cU,{displayName:"Command",group:"Table"});const dU=Me("SelectCol",()=>(e=0)=>(t,n)=>{const{tr:r}=t;return!!(n!=null&&n(t1e(e)(r)))});Re(dU,{displayName:"Command",group:"Table"});const pU=Me("SelectTable",()=>()=>(e,t)=>{const{tr:n}=e;return!!(t!=null&&t(Qge(n)))});Re(pU,{displayName:"Command",group:"Table"});const fU=Me("DeleteSelectedCells",()=>()=>(e,t)=>{const{selection:n}=e;if(!(n instanceof Ue))return!1;const r=n.isRowSelection(),i=n.isColSelection();return r&&i?Xge(e,t):i?Hge(e,t):Gge(e,t)});Re(fU,{displayName:"Command",group:"Table"});const hU=Me("AddColBefore",()=>()=>$ge);Re(hU,{displayName:"Command",group:"Table"});const mU=Me("AddColAfter",()=>()=>jge);Re(mU,{displayName:"Command",group:"Table"});const gU=Me("AddRowBefore",e=>()=>(t,n)=>{if(!Un(t))return!1;if(n){const r=Fo(t);n(tU(e,t.tr,r,r.top))}return!0});Re(gU,{displayName:"Command",group:"Table"});const yU=Me("AddRowAfter",e=>()=>(t,n)=>{if(!Un(t))return!1;if(n){const r=Fo(t);n(tU(e,t.tr,r,r.bottom))}return!0});Re(yU,{displayName:"Command",group:"Table"});const bU=Me("SetAlign",()=>(e="left")=>Wge("alignment",e));Re(bU,{displayName:"Command",group:"Table"});const VT=Hn("tableKeymap",{NextCell:{shortcuts:["Mod-]","Tab"],command:e=>{const t=e.get(Ve);return()=>t.call(qT.key)}},PrevCell:{shortcuts:["Mod-[","Shift-Tab"],command:e=>{const t=e.get(Ve);return()=>t.call(jT.key)}},ExitTable:{shortcuts:["Mod-Enter"],command:e=>{const t=e.get(Ve);return()=>t.call(HT.key)}}});Re(VT.ctx,{displayName:"KeymapCtx
",group:"Table"});Re(VT.shortcuts,{displayName:"Keymap
",group:"Table"});const Sw="footnote_definition",g7="footnoteDefinition",GT=Qt("footnote_definition",()=>({group:"block",content:"block+",defining:!0,attrs:{label:{default:""}},parseDOM:[{tag:`dl[data-type="${Sw}"]`,getAttrs:e=>{if(!(e instanceof HTMLElement))throw Pi(e);return{label:e.dataset.label}},contentElement:"dd"}],toDOM:e=>{const t=e.attrs.label;return["dl",{"data-label":t,"data-type":Sw},["dt",t],["dd",0]]},parseMarkdown:{match:({type:e})=>e===g7,runner:(e,t,n)=>{e.openNode(n,{label:t.label}).next(t.children).closeNode()}},toMarkdown:{match:e=>e.type.name===Sw,runner:(e,t)=>{e.openNode(g7,void 0,{label:t.attrs.label,identifier:t.attrs.label}).next(t.content).closeNode()}}}));Re(GT.ctx,{displayName:"NodeSchemaCtx",group:"footnote"});Re(GT.node,{displayName:"NodeSchema",group:"footnote"});const ww="footnote_reference",WT=Qt("footnote_reference",()=>({group:"inline",inline:!0,atom:!0,attrs:{label:{default:""}},parseDOM:[{tag:`sup[data-type="${ww}"]`,getAttrs:e=>{if(!(e instanceof HTMLElement))throw Pi(e);return{label:e.dataset.label}}}],toDOM:e=>{const t=e.attrs.label;return["sup",{"data-label":t,"data-type":ww},t]},parseMarkdown:{match:({type:e})=>e==="footnoteReference",runner:(e,t,n)=>{e.addNode(n,{label:t.label})}},toMarkdown:{match:e=>e.type.name===ww,runner:(e,t)=>{e.addNode("footnoteReference",void 0,void 0,{label:t.attrs.label,identifier:t.attrs.label})}}}));Re(WT.ctx,{displayName:"NodeSchemaCtx",group:"footnote"});Re(WT.node,{displayName:"NodeSchema",group:"footnote"});const vU=Ci.extendSchema(e=>t=>{const n=e(t);return{...n,attrs:{...n.attrs,checked:{default:null}},parseDOM:[{tag:'li[data-item-type="task"]',getAttrs:r=>{if(!(r instanceof HTMLElement))throw Pi(r);return{label:r.dataset.label,listType:r.dataset["list-type"],spread:r.dataset.spread,checked:r.dataset.checked?r.dataset.checked==="true":null}}},...(n==null?void 0:n.parseDOM)||[]],toDOM:r=>n.toDOM&&r.attrs.checked==null?n.toDOM(r):["li",{"data-item-type":"task","data-label":r.attrs.label,"data-list-type":r.attrs.listType,"data-spread":r.attrs.spread,"data-checked":r.attrs.checked},0],parseMarkdown:{match:({type:r})=>r==="listItem",runner:(r,i,a)=>{if(i.checked==null){n.parseMarkdown.runner(r,i,a);return}const o=i.label!=null?`${i.label}.`:"•",s=i.checked!=null?!!i.checked:null,l=i.label!=null?"ordered":"bullet",u=i.spread!=null?`${i.spread}`:"true";r.openNode(a,{label:o,listType:l,spread:u,checked:s}),r.next(i.children),r.closeNode()}},toMarkdown:{match:r=>r.type.name==="list_item",runner:(r,i)=>{if(i.attrs.checked==null){n.toMarkdown.runner(r,i);return}const a=i.attrs.label,o=i.attrs.listType,s=i.attrs.spread==="true",l=i.attrs.checked;r.openNode("listItem",void 0,{label:a,listType:o,spread:s,checked:l}),r.next(i.content),r.closeNode()}}}});Re(vU,{displayName:"NodeSchema",group:"ListItem"});const SU=Sa(()=>new ku(/^\[(?\s|x)\]\s$/,(e,t,n,r)=>{var i;const a=e.doc.resolve(n);let o=0,s=a.node(o);for(;s&&s.type.name!=="list_item";)o--,s=a.node(o);if(!s||s.attrs.checked!=null)return null;const l=((i=t.groups)==null?void 0:i.checked)==="x",u=a.before(o),c=e.tr;return c.deleteRange(n,r).setNodeMarkup(u,void 0,{...s.attrs,checked:l}),c}));Re(SU,{displayName:"InputRule",group:"ListItem"});const o1e=[$T,VT].flat(),s1e=[oU,SU],wU=Fi(e=>{const t=new fn("MILKDOWN_AUTO_INSERT_ZERO_SPACE"),n=i=>i.type===wa.type(e),r=i=>n(i)&&i.nodeSize===2;return new Rn({key:t,props:{handleDOMEvents:{compositionstart(i){const{state:a,dispatch:o}=i,{tr:s,selection:l}=a,{$from:u}=l;return Q_.safari&&Un(a)&&l.empty&&r(u.parent)&&o(s.insertText("⁠",u.start())),!1},compositionend(i){const{state:a,dispatch:o}=i,{tr:s,selection:l}=a,{$from:u}=l;return Q_.safari&&Un(a)&&l.empty&&n(u.parent)&&u.parent.textContent.startsWith("⁠")&&o(s.delete(u.start(),u.start()+1)),!1}}}})});Re(wU,{displayName:"Prose",group:"Prose"});const EU=Fi(()=>Oge({}));Re(EU,{displayName:"Prose",group:"Prose"});const xU=Fi(()=>Zge());Re(xU,{displayName:"Prose",group:"Prose"});const YT=Tu("remarkGFM",()=>I9);Re(YT.plugin,{displayName:"Remark",group:"Remark"});Re(YT.options,{displayName:"RemarkConfig",group:"Remark"});const l1e=[wU,EU,xU,YT].flat(),u1e=[vU,Qd,ep,g0,tp,GT,WT,zT,h0].flat(),c1e=[qT,jT,HT,sU,lU,uU,cU,dU,pU,fU,gU,yU,hU,mU,bU,UT],d1e=[u1e,s1e,o1e,l1e,c1e].flat();var Vh=200,qt=function(){};qt.prototype.append=function(t){return t.length?(t=qt.from(t),!this.length&&t||t.length=n?qt.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};qt.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};qt.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)};qt.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(a,o){return i.push(t(a,o))},n,r),i};qt.from=function(t){return t instanceof qt?t:t&&t.length?new kU(t):qt.empty};var kU=function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(i,a){return i==0&&a==this.length?this:new t(this.values.slice(i,a))},t.prototype.getInner=function(i){return this.values[i]},t.prototype.forEachInner=function(i,a,o,s){for(var l=a;l=o;l--)if(i(this.values[l],s+l)===!1)return!1},t.prototype.leafAppend=function(i){if(this.length+i.length<=Vh)return new t(this.values.concat(i.flatten()))},t.prototype.leafPrepend=function(i){if(this.length+i.length<=Vh)return new t(i.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(qt);qt.empty=new kU([]);var p1e=function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return rs&&this.right.forEachInner(r,Math.max(i-s,0),Math.min(this.length,a)-s,o+s)===!1)return!1},t.prototype.forEachInvertedInner=function(r,i,a,o){var s=this.left.length;if(i>s&&this.right.forEachInvertedInner(r,i-s,Math.max(a,s)-s,o+s)===!1||a=a?this.right.slice(r-a,i-a):this.left.slice(r,a).append(this.right.slice(0,i-a))},t.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new t(this.left,i)},t.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new t(i,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t}(qt);const f1e=500;class Yr{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,a;n&&(i=this.remapping(r,this.items.length),a=i.maps.length);let o=t.tr,s,l,u=[],c=[];return this.items.forEach((d,p)=>{if(!d.step){i||(i=this.remapping(r,p+1),a=i.maps.length),a--,c.push(d);return}if(i){c.push(new ui(d.map));let f=d.step.map(i.slice(a)),h;f&&o.maybeStep(f).doc&&(h=o.mapping.maps[o.mapping.maps.length-1],u.push(new ui(h,void 0,void 0,u.length+c.length))),a--,h&&i.appendMap(h,a)}else o.maybeStep(d.step);if(d.selection)return s=i?d.selection.map(i.slice(a)):d.selection,l=new Yr(this.items.slice(0,r).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:o,selection:s}}addTransform(t,n,r,i){let a=[],o=this.eventCount,s=this.items,l=!i&&s.length?s.get(s.length-1):null;for(let c=0;cm1e&&(s=h1e(s,u),o-=u),new Yr(s.append(a),o)}remapping(t,n){let r=new ql;return this.items.forEach((i,a)=>{let o=i.mirrorOffset!=null&&a-i.mirrorOffset>=t?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,o)},t,n),r}addMaps(t){return this.eventCount==0?this:new Yr(this.items.append(t.map(n=>new ui(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),a=t.mapping,o=t.steps.length,s=this.eventCount;this.items.forEach(p=>{p.selection&&s--},i);let l=n;this.items.forEach(p=>{let f=a.getMirror(--l);if(f==null)return;o=Math.min(o,f);let h=a.maps[f];if(p.step){let m=t.steps[f].invert(t.docs[f]),S=p.selection&&p.selection.map(a.slice(l+1,f));S&&s++,r.push(new ui(h,m,S))}else r.push(new ui(h))},i);let u=[];for(let p=n;pf1e&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],a=0;return this.items.forEach((o,s)=>{if(s>=t)i.push(o),o.selection&&a++;else if(o.step){let l=o.step.map(n.slice(r)),u=l&&l.getMap();if(r--,u&&n.appendMap(u,r),l){let c=o.selection&&o.selection.map(n.slice(r));c&&a++;let d=new ui(u.invert(),l,c),p,f=i.length-1;(p=i.length&&i[f].merge(d))?i[f]=p:i.push(d)}}else o.map&&r--},this.items.length,0),new Yr(qt.from(i.reverse()),a)}}Yr.empty=new Yr(qt.empty,0);function h1e(e,t){let n;return e.forEach((r,i)=>{if(r.selection&&t--==0)return n=i,!1}),e.slice(n)}class ui{constructor(t,n,r,i){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=i}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new ui(n.getMap().invert(),n,this.selection)}}}class Va{constructor(t,n,r,i,a){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=a}}const m1e=20;function g1e(e,t,n,r){let i=n.getMeta(mo),a;if(i)return i.historyState;n.getMeta(b1e)&&(e=new Va(e.done,e.undone,null,0,-1));let o=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(o&&o.getMeta(mo))return o.getMeta(mo).redo?new Va(e.done.addTransform(n,void 0,r,Hf(t)),e.undone,y7(n.mapping.maps[n.steps.length-1]),e.prevTime,e.prevComposition):new Va(e.done,e.undone.addTransform(n,void 0,r,Hf(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let s=n.getMeta("composition"),l=e.prevTime==0||!o&&e.prevComposition!=s&&(e.prevTime<(n.time||0)-r.newGroupDelay||!y1e(n,e.prevRanges)),u=o?Ew(e.prevRanges,n.mapping):y7(n.mapping.maps[n.steps.length-1]);return new Va(e.done.addTransform(n,l?t.selection.getBookmark():void 0,r,Hf(t)),Yr.empty,u,n.time,s??e.prevComposition)}else return(a=n.getMeta("rebased"))?new Va(e.done.rebased(n,a),e.undone.rebased(n,a),Ew(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new Va(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),Ew(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function y1e(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,i)=>{for(let a=0;a=t[a]&&(n=!0)}),n}function y7(e){let t=[];return e.forEach((n,r,i,a)=>t.push(i,a)),t}function Ew(e,t){if(!e)return null;let n=[];for(let r=0;r{let n=mo.getState(e);return!n||n.done.eventCount==0?!1:(t&&TU(n,e,t,!1),!0)},CU=(e,t)=>{let n=mo.getState(e);return!n||n.undone.eventCount==0?!1:(t&&TU(n,e,t,!0),!0)},Ou=(e,t)=>(Object.assign(e,{meta:{package:"@milkdown/plugin-history",...t}}),e),y0=Me("Undo",()=>()=>AU);Ou(y0,{displayName:"Command"});const NU=Me("Undo",()=>()=>CU);Ou(y0,{displayName:"Command"});const KT=Bi({},"historyProviderConfig");Ou(KT,{displayName:"Ctx"});const RU=Fi(e=>v1e(e.get(KT.key)));Ou(RU,{displayName:"Ctx"});const XT=Hn("historyKeymap",{Undo:{shortcuts:"Mod-z",command:e=>{const t=e.get(Ve);return()=>t.call(y0.key)}},Redo:{shortcuts:["Mod-y","Shift-Mod-z"],command:e=>{const t=e.get(Ve);return()=>t.call(NU.key)}}});Ou(XT.ctx,{displayName:"KeymapCtx"});Ou(XT.shortcuts,{displayName:"Keymap"});const S1e=[KT,RU,XT,y0,NU].flat();var w1e="Expected a function",v7=0/0,E1e="[object Symbol]",x1e=/^\s+|\s+$/g,k1e=/^[-+]0x[0-9a-f]+$/i,T1e=/^0b[01]+$/i,A1e=/^0o[0-7]+$/i,C1e=parseInt,N1e=typeof Kr=="object"&&Kr&&Kr.Object===Object&&Kr,R1e=typeof self=="object"&&self&&self.Object===Object&&self,I1e=N1e||R1e||Function("return this")(),O1e=Object.prototype,_1e=O1e.toString,M1e=Math.max,D1e=Math.min,kw=function(){return I1e.Date.now()};function L1e(e,t,n){var r,i,a,o,s,l,u=0,c=!1,d=!1,p=!0;if(typeof e!="function")throw new TypeError(w1e);t=S7(t)||0,Jx(n)&&(c=!!n.leading,d="maxWait"in n,a=d?M1e(S7(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p);function f(E){var N=r,_=i;return r=i=void 0,u=E,o=e.apply(_,N),o}function h(E){return u=E,s=setTimeout(y,t),c?f(E):o}function m(E){var N=E-l,_=E-u,M=t-N;return d?D1e(M,a-_):M}function S(E){var N=E-l,_=E-u;return l===void 0||N>=t||N<0||d&&_>=a}function y(){var E=kw();if(S(E))return g(E);s=setTimeout(y,m(E))}function g(E){return s=void 0,p&&r?f(E):(r=i=void 0,o)}function v(){s!==void 0&&clearTimeout(s),u=0,r=l=i=s=void 0}function x(){return s===void 0?o:g(kw())}function A(){var E=kw(),N=S(E);if(r=arguments,i=this,l=E,N){if(s===void 0)return h(l);if(d)return s=setTimeout(y,t),f(l)}return s===void 0&&(s=setTimeout(y,t)),o}return A.cancel=v,A.flush=x,A}function Jx(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function P1e(e){return!!e&&typeof e=="object"}function F1e(e){return typeof e=="symbol"||P1e(e)&&_1e.call(e)==E1e}function S7(e){if(typeof e=="number")return e;if(F1e(e))return v7;if(Jx(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Jx(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(x1e,"");var n=T1e.test(e);return n||A1e.test(e)?C1e(e.slice(2),n?2:8):k1e.test(e)?v7:+e}var B1e=L1e;const z1e=sr(B1e);class IU{constructor(){this.beforeMountedListeners=[],this.mountedListeners=[],this.updatedListeners=[],this.markdownUpdatedListeners=[],this.blurListeners=[],this.focusListeners=[],this.destroyListeners=[],this.beforeMount=t=>(this.beforeMountedListeners.push(t),this),this.mounted=t=>(this.mountedListeners.push(t),this),this.updated=t=>(this.updatedListeners.push(t),this)}get listeners(){return{beforeMount:this.beforeMountedListeners,mounted:this.mountedListeners,updated:this.updatedListeners,markdownUpdated:this.markdownUpdatedListeners,blur:this.blurListeners,focus:this.focusListeners,destroy:this.destroyListeners}}markdownUpdated(t){return this.markdownUpdatedListeners.push(t),this}blur(t){return this.blurListeners.push(t),this}focus(t){return this.focusListeners.push(t),this}destroy(t){return this.destroyListeners.push(t),this}}const Qx=He(new IU,"listener"),U1e=new fn("MILKDOWN_LISTENER"),OU=e=>(e.inject(Qx,new IU),async()=>{await e.wait(ws);const t=e.get(Qx),{listeners:n}=t;n.beforeMount.forEach(s=>s(e)),await e.wait(qc);const r=e.get(Hc);let i=null,a=null;const o=new Rn({key:U1e,view:()=>({destroy:()=>{n.destroy.forEach(s=>s(e))}}),props:{handleDOMEvents:{focus:()=>(n.focus.forEach(s=>s(e)),!1),blur:()=>(n.blur.forEach(s=>s(e)),!1)}},state:{init:()=>{},apply:s=>!s.docChanged||s.getMeta("addToHistory")===!1?void 0:z1e(()=>{const{doc:l}=s;if(n.updated.length>0&&(i==null||!i.eq(l))&&n.updated.forEach(u=>{u(e,l,i)}),n.markdownUpdated.length>0&&(i==null||!i.eq(l))){const u=r(l);n.markdownUpdated.forEach(c=>{c(e,u,a)}),a=u}i=l},200)()}});e.update(Ai,s=>s.concat(o)),await e.wait(Ff),n.mounted.forEach(s=>s(e))});OU.meta={package:"@milkdown/plugin-listener",displayName:"Listener"};const $1e=()=>{const{typoraMd:e,setTyporaMd:t}=Ht(n=>({typoraMd:n.typoraMd,setTyporaMd:n.setTyporaMd}));return e0e(n=>Xme.make().config(r=>{r.set(Vc,n),r.set(Lf,e),r.get(Qx).mounted(i=>{const a=i.get(Vc),o=a.querySelector(".editor[role='textbox']");a.onclick=()=>o==null?void 0:o.focus()}).markdownUpdated((i,a)=>t(a)),n.className="typora bg-white dark:bg-gray-800 c-text-700 h-full overflow-y-scroll"}).use(OU).use(age).use(d1e).use(S1e)),k.jsx(Jme,{})};function j1e(){return k.jsx(Qme,{children:k.jsx($1e,{})})}function q1e(){return k.jsx("iframe",{className:"h-full w-full bg-vscode",src:"https://github1s.com/Renovamen/playground-macos/blob/main/README.md",title:"VSCode"})}const Wc=[{id:"launchpad",title:"Launchpad",desktop:!1,img:"img/icons/launchpad.png"},{id:"bear",title:"Bear",desktop:!0,width:860,height:500,show:!0,y:-40,img:"img/icons/bear.png",content:k.jsx(Rde,{})},{id:"typora",title:"Typora",desktop:!0,width:600,height:580,y:-20,img:"img/icons/typora.png",content:k.jsx(j1e,{})},{id:"safari",title:"Safari",desktop:!0,width:1024,minWidth:375,minHeight:200,x:-20,img:"img/icons/safari.png",content:k.jsx(BW,{})},{id:"vscode",title:"VSCode",desktop:!0,width:900,height:600,x:80,y:-30,img:"img/icons/vscode.png",content:k.jsx(q1e,{})},{id:"facetime",title:"FaceTime",desktop:!0,img:"img/icons/facetime.png",width:500*1.7,height:500+FE,minWidth:350*1.7,minHeight:350+FE,aspectRatio:1.7,x:-80,y:20,content:k.jsx(_W,{})},{id:"terminal",title:"Terminal",desktop:!0,img:"img/icons/terminal.png",content:k.jsx(LW,{})},{id:"github",title:"Github",desktop:!1,img:"img/icons/github.png",link:"https://github.com/Renovamen/playground-macos"}],ek=[{id:"flint",title:"Flint",img:"img/icons/launchpad/flint.png",link:"https://github.com/Renovamen/flint"},{id:"oh-my-cv",title:"Oh, My CV!",img:"https://ohmycv.app/pwa-512x512.png",link:"https://ohmycv.app"},{id:"oh-vue-icons",title:"Oh, Vue Icons!",img:"img/icons/launchpad/oh-vue-icons.png",link:"https://oh-vue-icons.js.org"},{id:"gungnir",title:"Gungnir",img:"img/icons/launchpad/gungnir.png",link:"https://vuepress-theme-gungnir.vercel.app/"},{id:"what-if",title:"My Notebook",img:"img/icons/launchpad/notebook.png",link:"https://note.zxh.io"},{id:"cube",title:"Cube Solver",img:"img/icons/launchpad/cube.png",link:"https://cube.zxh.io/"},{id:"resume",title:"Résumé",img:"img/icons/launchpad/resume.png",link:"https://resume.zxh.io/"},{id:"zelda",title:"Webpage for Zelda",img:"img/icons/launchpad/zelda.png",link:"https://zelda.zxh.io/"},{id:"fishmail",title:"Fishmail",img:"img/icons/launchpad/fishmail.png",link:"https://fishmail.vercel.app/"}],Vf={title:"Sunflower",artist:"Post Malone / Swae Lee",cover:"//p1.music.126.net/z0IO1vEsowL9mD_5yzUjeA==/109951163936068098.jpg",audio:"music/sunflower.mp3"},H1e=[{id:"about",title:"about",type:"folder",children:[{id:"about-bio",title:"bio.txt",type:"file",content:k.jsx("div",{className:"py-1",children:k.jsx("div",{children:"Hi, this is Xiaohan Zou. I am a PhD student at the Computer Science and Engineering department of Pennsylvania State University."})})},{id:"about-interests",title:"interests.txt",type:"file",content:"Machine Learning / Computer Vision / Vision-Language Learning"},{id:"about-contact",title:"contact.txt",type:"file",content:k.jsxs("ul",{className:"list-disc ml-6",children:[k.jsxs("li",{children:["Email:"," ",k.jsx("a",{className:"text-blue-300",href:"mailto:renovamenzxh@gmail.com",target:"_blank",rel:"noreferrer",children:"renovamenzxh@gmail.com"})]}),k.jsxs("li",{children:["Github:"," ",k.jsx("a",{className:"text-blue-300",href:"https://github.com/Renovamen",target:"_blank",rel:"noreferrer",children:"@Renovamen"})]}),k.jsx("li",{children:k.jsx("a",{className:"text-blue-300",href:"https://scholar.google.com/citations?user=RuW6xgMAAAAJ",target:"_blank",rel:"noreferrer",children:"Google Scholar"})}),k.jsxs("li",{children:["Linkedin:"," ",k.jsx("a",{className:"text-blue-300",href:"https://www.linkedin.com/in/xiaohan-zou",target:"_blank",rel:"noreferrer",children:"xiaohan-zou"})]}),k.jsxs("li",{children:["Personal Website:"," ",k.jsx("a",{className:"text-blue-300",href:"https://zxh.io",target:"_blank",rel:"noreferrer",children:"https://zxh.io"})]}),k.jsxs("li",{children:["知乎:"," ",k.jsx("a",{className:"text-blue-300",href:"https://www.zhihu.com/people/chao-neng-gui-su",target:"_blank",rel:"noreferrer",children:"@西伯利亚大恶龙"})]})]})}]},{id:"about-dream",title:"my-dream.cpp",type:"file",content:k.jsxs("div",{className:"py-1",children:[k.jsxs("div",{children:[k.jsx("span",{className:"text-yellow-400",children:"while"}),"(",k.jsx("span",{className:"text-blue-400",children:"sleeping"}),") ",k.jsx("span",{children:"{"})]}),k.jsxs("div",{children:[k.jsx("span",{className:"text-blue-400 ml-9",children:"money"}),k.jsx("span",{className:"text-yellow-400",children:"++"}),";"]}),k.jsx("div",{children:k.jsx("span",{children:"}"})})]})}],Tw=H1e,w7={name:"Xiaohan Zou",avatar:"img/ui/avatar.jpg",password:""},Ni={day:"img/ui/wallpaper-day.jpg",night:"img/ui/wallpaper-night.jpg"},E7={favorites:{title:"SNS Links",sites:[{id:"my-blog",title:"Website",img:"https://zxh.io/img/avatar.jpg",link:"https://zxh.io/",inner:!0},{id:"my-github",title:"Github",img:"img/sites/github.svg",link:"https://github.com/Renovamen"},{id:"my-linkedin",title:"Linkedin",img:"img/sites/linkedin.svg",link:"https://www.linkedin.com/in/xiaohan-zou"},{id:"my-google-scholar",title:"Scholar",img:"img/sites/google-scholar.svg",link:"https://scholar.google.com/citations?user=RuW6xgMAAAAJ"},{id:"my-zhihu",title:"知乎",img:"img/sites/zhihu.jpeg",link:"https://www.zhihu.com/people/chao-neng-gui-su"},{id:"my-twitter",title:"Twitter",img:"img/sites/twitter.svg",link:"https://www.twitter.com/renovamen_zxh"},{id:"my-email",title:"Email",img:"img/sites/gmail.svg",link:"mailto:renovamenzxh@gmail.com"}]},freq:{title:"Frequently Visited",sites:[{id:"github",title:"Github",img:"img/sites/github.svg",link:"https://github.com/"},{id:"arxiv",title:"arXiv",img:"img/sites/arxiv.png",link:"https://arxiv.org/"},{id:"twitter",title:"Twitter",img:"img/sites/twitter.svg",link:"https://www.twitter.com/"},{id:"dribbble",title:"Dribbble",img:"img/sites/dribbble.svg",link:"https://dribbble.com/"},{id:"pinterest",title:"Pinterest",img:"img/sites/pinterest.svg",link:"https://www.pinterest.com/"},{id:"art-station",title:"ArtStation",img:"img/sites/artstation.svg",link:"https://www.artstation.com//"},{id:"bilibili",title:"Bilibili",img:"img/sites/bilibili.svg",link:"https://www.bilibili.com/"},{id:"zhihu",title:"知乎",img:"img/sites/zhihu.jpeg",link:"https://www.zhihu.com/"},{id:"leetcode",title:"LeetCode",img:"img/sites/leetcode.svg",link:"https://leetcode.com/"},{id:"reddit",title:"Reddit",img:"img/sites/reddit.svg",link:"https://www.reddit.com/"},{id:"hacker-news",title:"Hacker News",img:"img/sites/hacker.svg",link:"https://news.ycombinator.com/"},{id:"v2ex",title:"V2EX",img:"https://www.v2ex.com/apple-touch-icon.png",link:"https://www.v2ex.com/"},{id:"aideadline",title:"AI Deadlines",img:"https://aideadlin.es/static/img/favicon.png",link:"https://aideadlin.es/",inner:!0},{id:"oh-my-cv",title:"OhMyCV",img:"https://ohmycv.app/apple-touch-icon.png",link:"https://ohmycv.app/"},{id:"steam",title:"Steam",img:"img/sites/steam.svg",link:"https://store.steampowered.com/"},{id:"nazo",title:"Nazo",link:"https://nazo.one-story.cn"},{id:"svgomg",title:"SVGOMG",img:"https://jakearchibald.github.io/svgomg/imgs/icon.png",link:"https://jakearchibald.github.io/svgomg/"},{id:"tiny-png",title:"Tiny PNG",img:"https://tinypng.com/images/panda-chewing-2x.png",link:"https://tinypng.com/"}]}},x7=({icon:e,value:t,setValue:n})=>k.jsxs("div",{className:"slider flex w-full",children:[k.jsx("div",{className:"w-7 h-7 flex-center c-bg-100 c-border-300",border:"t l b rounded-l-full",children:k.jsx("span",{className:`${e} c-text-500 text-xs`})}),k.jsx(CW,{min:1,max:100,value:t,tooltip:!1,orientation:"horizontal",onChange:r=>n(r)})]});function V1e({toggleControlCenter:e,toggleAudio:t,setBrightness:n,setVolume:r,playing:i,btnRef:a}){const o=q.useRef(null),{dark:s,wifi:l,brightness:u,bluetooth:c,airdrop:d,fullscreen:p,volume:f}=Ht(v=>({dark:v.dark,wifi:v.wifi,brightness:v.brightness,bluetooth:v.bluetooth,airdrop:v.airdrop,fullscreen:v.fullscreen,volume:v.volume})),{toggleWIFI:h,toggleBluetooth:m,toggleAirdrop:S,toggleDark:y,toggleFullScreen:g}=Ht(v=>({toggleWIFI:v.toggleWIFI,toggleBluetooth:v.toggleBluetooth,toggleAirdrop:v.toggleAirdrop,toggleDark:v.toggleDark,toggleFullScreen:v.toggleFullScreen}));return vm(o,e,[a]),k.jsxs("div",{className:"fixed grid shadow-menu w-80 h-96 max-w-full top-9.5 right-0 sm:right-1.5 p-2.5 c-text-black c-bg-100/70 border rounded-2xl menu-border",grid:"cols-4 rows-5 gap-2",ref:o,children:[k.jsxs("div",{className:"cc-grid row-span-2 col-span-2 p-2 flex flex-col justify-around",children:[k.jsxs("div",{className:"hstack space-x-2",children:[k.jsx("div",{className:`${l?"cc-btn":"cc-btn-active"}`,onClick:h,children:k.jsx("span",{className:"i-material-symbols:wifi text-base"})}),k.jsxs("div",{className:"flex flex-col pt-0.5",children:[k.jsx("span",{className:"font-medium leading-4",children:"Wi-Fi"}),k.jsx("span",{className:"cc-text",children:l?"Home":"Off"})]})]}),k.jsxs("div",{className:"hstack space-x-2",children:[k.jsx("div",{className:`${c?"cc-btn":"cc-btn-active"}`,onClick:m,children:k.jsx("span",{className:"i-charm:bluetooth text-base"})}),k.jsxs("div",{className:"flex flex-col pt-0.5",children:[k.jsx("span",{className:"font-medium leading-4",children:"Bluetooth"}),k.jsx("span",{className:"cc-text",children:c?"On":"Off"})]})]}),k.jsxs("div",{className:"hstack space-x-2",children:[k.jsx("div",{className:`${d?"cc-btn":"cc-btn-active"}`,onClick:S,children:k.jsx("span",{className:"i-material-symbols:rss-feed-rounded text-base"})}),k.jsxs("div",{className:"flex flex-col pt-0.5",children:[k.jsx("span",{className:"font-medium leading-4",children:"AirDrop"}),k.jsx("span",{className:"cc-text",children:d?"Contacts Only":"Off"})]})]})]}),k.jsxs("div",{className:"cc-grid col-span-2 p-2 hstack space-x-2",children:[k.jsx("div",{className:`${s?"cc-btn":"cc-btn-active"}`,onClick:y,children:s?k.jsx("span",{className:"i-ion:moon text-base"}):k.jsx("span",{className:"i-ion:sunny text-base"})}),k.jsx("div",{className:"flex flex-col",children:k.jsx("span",{className:"font-medium ml-1",children:s?"Dark Mode":"Light Mode"})})]}),k.jsxs("div",{className:"cc-grid p-2 flex-center flex-col text-center",children:[k.jsx("span",{className:"i-bi:brightness-alt-high text-xl"}),k.jsx("span",{className:"text-xs leading-3.5",children:"Keyboard Brightness"})]}),k.jsxs("div",{className:"cc-grid p-2 flex-center flex-col text-center cursor-default",onClick:()=>g(!p),children:[p?k.jsx("span",{className:"i-bi:fullscreen-exit text-base"}):k.jsx("span",{className:"i-bi:fullscreen text-base"}),k.jsx("span",{className:"text-xs leading-3.5 mt-1.5",children:p?"Exit Fullscreen":"Enter Fullscreen"})]}),k.jsxs("div",{className:"cc-grid col-span-4 px-2.5 py-2 space-y-1 flex flex-col justify-around",children:[k.jsx("span",{className:"font-medium ml-0.5",children:"Display"}),k.jsx(x7,{icon:"i-ion:sunny",value:u,setValue:n})]}),k.jsxs("div",{className:"cc-grid col-span-4 px-2.5 py-2 space-y-1 flex flex-col justify-around",children:[k.jsx("span",{className:"font-medium ml-0.5",children:"Sound"}),k.jsx(x7,{icon:"i-ion:volume-high",value:f,setValue:r})]}),k.jsxs("div",{className:"cc-grid col-span-4 p-2 pr-4 hstack flex-row justify-between space-x-2.5",children:[k.jsx("img",{src:Vf.cover,alt:"cover art",className:"w-12 rounded-lg"}),k.jsxs("div",{className:"flex flex-col flex-grow justify-start",children:[k.jsx("span",{className:"font-medium",children:Vf.title}),k.jsx("span",{className:"cc-text",children:Vf.artist})]}),i?k.jsx("span",{className:"i-bi:pause-fill text-2xl",onClick:()=>t(!1)}):k.jsx("span",{className:"i-bi:play-fill text-2xl",onClick:()=>t(!0)})]})]})}const Ua=q.forwardRef((e,t)=>{const n=e.hideOnMobile?"hidden sm:inline-flex":"inline-flex",r=e.forceHover?"bg-gray-100/30 dark:bg-gray-400/40":"hover:bg-gray-100/30 hover:dark:bg-gray-400/40";return k.jsx("div",{ref:t,className:`hstack space-x-1 h-6 px-1 cursor-default rounded ${n} ${r} ${e.className||""}`,onClick:e.onClick,onMouseEnter:e.onMouseEnter,children:e.children})});Ua.displayName="TopBarItem";const G1e=({size:e})=>k.jsx("svg",{viewBox:"0 0 29 29",width:e,height:e,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",children:k.jsx("path",{d:"M7.5,13h14a5.5,5.5,0,0,0,0-11H7.5a5.5,5.5,0,0,0,0,11Zm0-9h14a3.5,3.5,0,0,1,0,7H7.5a3.5,3.5,0,0,1,0-7Zm0,6A2.5,2.5,0,1,0,5,7.5,2.5,2.5,0,0,0,7.5,10Zm14,6H7.5a5.5,5.5,0,0,0,0,11h14a5.5,5.5,0,0,0,0-11Zm1.43439,8a2.5,2.5,0,1,1,2.5-2.5A2.5,2.5,0,0,1,22.93439,24Z"})}),W1e=e=>{const t=q.useRef(null),n=q.useRef(null),r=q.useRef(null),i=q.useRef(null),[a,o]=q.useState({date:new Date,showControlCenter:!1,showWifiMenu:!1,showAppleMenu:!1}),[s,l,u,c]=iG({src:Vf.audio,autoReplay:!0}),{winWidth:d,winHeight:p}=p2(),{volume:f,wifi:h}=Ht(z=>({volume:z.volume,wifi:z.wifi})),{toggleFullScreen:m,setVolume:S,setBrightness:y}=Ht(z=>({toggleFullScreen:z.toggleFullScreen,setVolume:z.setVolume,setBrightness:z.setBrightness}));sL(()=>{o({...a,date:new Date})},60*1e3),q.useEffect(()=>{e.setSpotlightBtnRef(i),u.volume(f/100)},[]),q.useEffect(()=>{const z=f2();m(z)},[d,p]);const g=z=>{S(z),u.volume(z/100)},v=z=>{y(z)},x=()=>{o({...a,showControlCenter:!a.showControlCenter})},A=()=>{o({...a,showAppleMenu:!a.showAppleMenu})},E=()=>{o({...a,showWifiMenu:!a.showWifiMenu})},N=()=>{u.pause(),e.setLogin(!1)},_=z=>{u.pause(),e.shutMac(z)},M=z=>{u.pause(),e.restartMac(z)},D=z=>{u.pause(),e.sleepMac(z)};return k.jsxs("div",{className:`w-full h-8 px-2 fixed top-0 hstack justify-between ${e.hide?"z-0":"z-20"} text-sm text-white bg-gray-700/10 backdrop-blur-2xl shadow transition`,children:[k.jsxs("div",{className:"hstack space-x-1",children:[k.jsx(Ua,{className:"px-2",forceHover:a.showAppleMenu,onClick:A,ref:t,children:k.jsx("span",{className:"i-ri:apple-fill text-base"})}),k.jsx(Ua,{className:"font-semibold px-2",onMouseEnter:()=>{a.showAppleMenu&&A()},children:e.title})]}),a.showAppleMenu&&k.jsx(cG,{logout:N,shut:_,restart:M,sleep:D,toggleAppleMenu:A,btnRef:t}),k.jsxs("div",{className:"hstack flex-row justify-end space-x-2",children:[k.jsx(Ua,{hideOnMobile:!0,children:k.jsx(jG,{})}),k.jsx(Ua,{hideOnMobile:!0,forceHover:a.showWifiMenu,onClick:E,ref:r,children:h?k.jsx("span",{className:"i-material-symbols:wifi text-lg"}):k.jsx("span",{className:"i-material-symbols:wifi-off text-lg"})}),k.jsx(Ua,{ref:i,onClick:e.toggleSpotlight,children:k.jsx("span",{className:"i-bx:search text-[17px]"})}),k.jsx(Ua,{forceHover:a.showControlCenter,onClick:x,ref:n,children:k.jsx(G1e,{size:16})}),a.showWifiMenu&&k.jsx($G,{toggleWifiMenu:E,btnRef:r}),a.showControlCenter&&k.jsx(V1e,{playing:l.playing,toggleAudio:u.toggle,setVolume:g,setBrightness:v,toggleControlCenter:x,btnRef:n}),k.jsxs(Ua,{children:[k.jsx("span",{children:wh(a.date,"eee MMM d")}),k.jsx("span",{children:wh(a.date,"h:mm aa")})]})]})]})},b0=q.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),v0=q.createContext({}),ZT=q.createContext(null),S0=typeof document<"u",JT=S0?q.useLayoutEffect:q.useEffect,_U=q.createContext({strict:!1});function Y1e(e,t,n,r){const{visualElement:i}=q.useContext(v0),a=q.useContext(_U),o=q.useContext(ZT),s=q.useContext(b0).reducedMotion,l=q.useRef();r=r||a.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;q.useInsertionEffect(()=>{u&&u.update(n,o)});const c=q.useRef(!!window.HandoffAppearAnimations);return JT(()=>{u&&(u.render(),c.current&&u.animationState&&u.animationState.animateChanges())}),q.useEffect(()=>{u&&(u.updateFeatures(),!c.current&&u.animationState&&u.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,c.current=!1)}),u}function Il(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function K1e(e,t,n){return q.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Il(n)&&(n.current=r))},[t])}function Cd(e){return typeof e=="string"||Array.isArray(e)}function w0(e){return typeof e=="object"&&typeof e.start=="function"}const QT=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],eA=["initial",...QT];function E0(e){return w0(e.animate)||eA.some(t=>Cd(e[t]))}function MU(e){return!!(E0(e)||e.variants)}function X1e(e,t){if(E0(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Cd(n)?n:void 0,animate:Cd(r)?r:void 0}}return e.inherit!==!1?t:{}}function Z1e(e){const{initial:t,animate:n}=X1e(e,q.useContext(v0));return q.useMemo(()=>({initial:t,animate:n}),[k7(t),k7(n)])}function k7(e){return Array.isArray(e)?e.join(" "):e}const T7={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"]},Nd={};for(const e in T7)Nd[e]={isEnabled:t=>T7[e].some(n=>!!t[n])};function J1e(e){for(const t in e)Nd[t]={...Nd[t],...e[t]}}const DU=q.createContext({}),LU=q.createContext({}),Q1e=Symbol.for("motionComponentSymbol");function eye({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&J1e(e);function a(s,l){let u;const c={...q.useContext(b0),...s,layoutId:tye(s)},{isStatic:d}=c,p=Z1e(s),f=r(s,d);if(!d&&S0){p.visualElement=Y1e(i,f,c,t);const h=q.useContext(LU),m=q.useContext(_U).strict;p.visualElement&&(u=p.visualElement.loadFeatures(c,m,e,h))}return q.createElement(v0.Provider,{value:p},u&&p.visualElement?q.createElement(u,{visualElement:p.visualElement,...c}):null,n(i,s,K1e(f,p.visualElement,l),f,d,p.visualElement))}const o=q.forwardRef(a);return o[Q1e]=i,o}function tye({layoutId:e}){const t=q.useContext(DU).id;return t&&e!==void 0?t+"-"+e:e}function nye(e){function t(r,i={}){return eye(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const rye=["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 tA(e){return typeof e!="string"||e.includes("-")?!1:!!(rye.indexOf(e)>-1||/[A-Z]/.test(e))}const Gh={};function iye(e){Object.assign(Gh,e)}const np=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Gs=new Set(np);function PU(e,{layout:t,layoutId:n}){return Gs.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Gh[e]||e==="opacity")}const pn=e=>!!(e&&e.getVelocity),aye={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},oye=np.length;function sye(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let a="";for(let o=0;ot=>typeof t=="string"&&t.startsWith(e),BU=FU("--"),tk=FU("var(--"),lye=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,uye=(e,t)=>t&&typeof e=="number"?t.transform(e):e,To=(e,t,n)=>Math.min(Math.max(n,e),t),Ws={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Yc={...Ws,transform:e=>To(0,1,e)},Hp={...Ws,default:1},Kc=e=>Math.round(e*1e5)/1e5,x0=/(-)?([\d]*\.?[\d])+/g,zU=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,cye=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function rp(e){return typeof e=="string"}const ip=e=>({test:t=>rp(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),$a=ip("deg"),Ei=ip("%"),we=ip("px"),dye=ip("vh"),pye=ip("vw"),A7={...Ei,parse:e=>Ei.parse(e)/100,transform:e=>Ei.transform(e*100)},C7={...Ws,transform:Math.round},UU={borderWidth:we,borderTopWidth:we,borderRightWidth:we,borderBottomWidth:we,borderLeftWidth:we,borderRadius:we,radius:we,borderTopLeftRadius:we,borderTopRightRadius:we,borderBottomRightRadius:we,borderBottomLeftRadius:we,width:we,maxWidth:we,height:we,maxHeight:we,size:we,top:we,right:we,bottom:we,left:we,padding:we,paddingTop:we,paddingRight:we,paddingBottom:we,paddingLeft:we,margin:we,marginTop:we,marginRight:we,marginBottom:we,marginLeft:we,rotate:$a,rotateX:$a,rotateY:$a,rotateZ:$a,scale:Hp,scaleX:Hp,scaleY:Hp,scaleZ:Hp,skew:$a,skewX:$a,skewY:$a,distance:we,translateX:we,translateY:we,translateZ:we,x:we,y:we,z:we,perspective:we,transformPerspective:we,opacity:Yc,originX:A7,originY:A7,originZ:we,zIndex:C7,fillOpacity:Yc,strokeOpacity:Yc,numOctaves:C7};function nA(e,t,n,r){const{style:i,vars:a,transform:o,transformOrigin:s}=e;let l=!1,u=!1,c=!0;for(const d in t){const p=t[d];if(BU(d)){a[d]=p;continue}const f=UU[d],h=uye(p,f);if(Gs.has(d)){if(l=!0,o[d]=h,!c)continue;p!==(f.default||0)&&(c=!1)}else d.startsWith("origin")?(u=!0,s[d]=h):i[d]=h}if(t.transform||(l||r?i.transform=sye(e.transform,n,c,r):i.transform&&(i.transform="none")),u){const{originX:d="50%",originY:p="50%",originZ:f=0}=s;i.transformOrigin=`${d} ${p} ${f}`}}const rA=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function $U(e,t,n){for(const r in t)!pn(t[r])&&!PU(r,n)&&(e[r]=t[r])}function fye({transformTemplate:e},t,n){return q.useMemo(()=>{const r=rA();return nA(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function hye(e,t,n){const r=e.style||{},i={};return $U(i,r,e),Object.assign(i,fye(e,t,n)),e.transformValues?e.transformValues(i):i}function mye(e,t,n){const r={},i=hye(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const gye=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function Wh(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||gye.has(e)}let jU=e=>!Wh(e);function yye(e){e&&(jU=t=>t.startsWith("on")?!Wh(t):e(t))}try{yye(require("@emotion/is-prop-valid").default)}catch{}function bye(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(jU(i)||n===!0&&Wh(i)||!t&&!Wh(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function N7(e,t,n){return typeof e=="string"?e:we.transform(t+n*e)}function vye(e,t,n){const r=N7(t,e.x,e.width),i=N7(n,e.y,e.height);return`${r} ${i}`}const Sye={offset:"stroke-dashoffset",array:"stroke-dasharray"},wye={offset:"strokeDashoffset",array:"strokeDasharray"};function Eye(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?Sye:wye;e[a.offset]=we.transform(-r);const o=we.transform(t),s=we.transform(n);e[a.array]=`${o} ${s}`}function iA(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:a,pathLength:o,pathSpacing:s=1,pathOffset:l=0,...u},c,d,p){if(nA(e,u,c,p),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h,dimensions:m}=e;f.transform&&(m&&(h.transform=f.transform),delete f.transform),m&&(i!==void 0||a!==void 0||h.transform)&&(h.transformOrigin=vye(m,i!==void 0?i:.5,a!==void 0?a:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&Eye(f,o,s,l,!1)}const qU=()=>({...rA(),attrs:{}}),aA=e=>typeof e=="string"&&e.toLowerCase()==="svg";function xye(e,t,n,r){const i=q.useMemo(()=>{const a=qU();return iA(a,t,{enableHardwareAcceleration:!1},aA(r),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};$U(a,e.style,e),i.style={...a,...i.style}}return i}function kye(e=!1){return(n,r,i,{latestValues:a},o)=>{const l=(tA(n)?xye:mye)(r,a,o,n),c={...bye(r,typeof n=="string",e),...l,ref:i},{children:d}=r,p=q.useMemo(()=>pn(d)?d.get():d,[d]);return q.createElement(n,{...c,children:p})}}const oA=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function HU(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const a in n)e.style.setProperty(a,n[a])}const VU=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 GU(e,t,n,r){HU(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(VU.has(i)?i:oA(i),t.attrs[i])}function sA(e,t){const{style:n}=e,r={};for(const i in n)(pn(n[i])||t.style&&pn(t.style[i])||PU(i,e))&&(r[i]=n[i]);return r}function WU(e,t){const n=sA(e,t);for(const r in e)if(pn(e[r])||pn(t[r])){const i=np.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}function lA(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}function uA(e){const t=q.useRef(null);return t.current===null&&(t.current=e()),t.current}const Yh=e=>Array.isArray(e),Tye=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Aye=e=>Yh(e)?e[e.length-1]||0:e;function Gf(e){const t=pn(e)?e.get():e;return Tye(t)?t.toValue():t}function Cye({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,a){const o={latestValues:Nye(r,i,a,e),renderState:t()};return n&&(o.mount=s=>n(r,s,o)),o}const YU=e=>(t,n)=>{const r=q.useContext(v0),i=q.useContext(ZT),a=()=>Cye(e,t,r,i);return n?a():uA(a)};function Nye(e,t,n,r){const i={},a=r(e,{});for(const p in a)i[p]=Gf(a[p]);let{initial:o,animate:s}=e;const l=E0(e),u=MU(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const d=c?s:o;return d&&typeof d!="boolean"&&!w0(d)&&(Array.isArray(d)?d:[d]).forEach(f=>{const h=lA(e,f);if(!h)return;const{transitionEnd:m,transition:S,...y}=h;for(const g in y){let v=y[g];if(Array.isArray(v)){const x=c?v.length-1:0;v=v[x]}v!==null&&(i[g]=v)}for(const g in m)i[g]=m[g]}),i}const Et=e=>e;class R7{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function Rye(e){let t=new R7,n=new R7,r=0,i=!1,a=!1;const o=new WeakSet,s={schedule:(l,u=!1,c=!1)=>{const d=c&&i,p=d?t:n;return u&&o.add(l),p.add(l)&&d&&i&&(r=t.order.length),l},cancel:l=>{n.remove(l),o.delete(l)},process:l=>{if(i){a=!0;return}if(i=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let u=0;u(d[p]=Rye(()=>n=!0),d),{}),o=d=>a[d].process(i),s=()=>{const d=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(d-i.timestamp,Iye),1),i.timestamp=d,i.isProcessing=!0,Vp.forEach(o),i.isProcessing=!1,n&&t&&(r=!1,e(s))},l=()=>{n=!0,r=!0,i.isProcessing||e(s)};return{schedule:Vp.reduce((d,p)=>{const f=a[p];return d[p]=(h,m=!1,S=!1)=>(n||l(),f.schedule(h,m,S)),d},{}),cancel:d=>Vp.forEach(p=>a[p].cancel(d)),state:i,steps:a}}const{schedule:rt,cancel:Ri,state:It,steps:Aw}=Oye(typeof requestAnimationFrame<"u"?requestAnimationFrame:Et,!0),_ye={useVisualState:YU({scrapeMotionValuesFromProps:WU,createRenderState:qU,onMount:(e,t,{renderState:n,latestValues:r})=>{rt.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),rt.render(()=>{iA(n,r,{enableHardwareAcceleration:!1},aA(t.tagName),e.transformTemplate),GU(t,n)})}})},Mye={useVisualState:YU({scrapeMotionValuesFromProps:sA,createRenderState:rA})};function Dye(e,{forwardMotionProps:t=!1},n,r){return{...tA(e)?_ye:Mye,preloadedFeatures:n,useRender:kye(t),createVisualElement:r,Component:e}}function ra(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const KU=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function k0(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const Lye=e=>t=>KU(t)&&e(t,k0(t));function la(e,t,n,r){return ra(e,t,Lye(n),r)}const Pye=(e,t)=>n=>t(e(n)),go=(...e)=>e.reduce(Pye);function XU(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const I7=XU("dragHorizontal"),O7=XU("dragVertical");function ZU(e){let t=!1;if(e==="y")t=O7();else if(e==="x")t=I7();else{const n=I7(),r=O7();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function JU(){const e=ZU(!0);return e?(e(),!1):!0}class Bo{constructor(t){this.isMounted=!1,this.node=t}update(){}}function _7(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(a,o)=>{if(a.type==="touch"||JU())return;const s=e.getProps();e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",t),s[r]&&rt.update(()=>s[r](a,o))};return la(e.current,n,i,{passive:!e.getProps()[r]})}class Fye extends Bo{mount(){this.unmount=go(_7(this.node,!0),_7(this.node,!1))}unmount(){}}class Bye extends Bo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=go(ra(this.node.current,"focus",()=>this.onFocus()),ra(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const QU=(e,t)=>t?e===t?!0:QU(e,t.parentElement):!1;function Cw(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,k0(n))}class zye extends Bo{constructor(){super(...arguments),this.removeStartListeners=Et,this.removeEndListeners=Et,this.removeAccessibleListeners=Et,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),a=la(window,"pointerup",(s,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c}=this.node.getProps();rt.update(()=>{QU(this.node.current,s.target)?u&&u(s,l):c&&c(s,l)})},{passive:!(r.onTap||r.onPointerUp)}),o=la(window,"pointercancel",(s,l)=>this.cancelPress(s,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=go(a,o),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=a=>{if(a.key!=="Enter"||this.isPressing)return;const o=s=>{s.key!=="Enter"||!this.checkPressEnd()||Cw("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&rt.update(()=>c(l,u))})};this.removeEndListeners(),this.removeEndListeners=ra(this.node.current,"keyup",o),Cw("down",(s,l)=>{this.startPress(s,l)})},n=ra(this.node.current,"keydown",t),r=()=>{this.isPressing&&Cw("cancel",(a,o)=>this.cancelPress(a,o))},i=ra(this.node.current,"blur",r);this.removeAccessibleListeners=go(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&rt.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!JU()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&rt.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=la(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=ra(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=go(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const nk=new WeakMap,Nw=new WeakMap,Uye=e=>{const t=nk.get(e.target);t&&t(e)},$ye=e=>{e.forEach(Uye)};function jye({root:e,...t}){const n=e||document;Nw.has(n)||Nw.set(n,{});const r=Nw.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver($ye,{root:e,...t})),r[i]}function qye(e,t,n){const r=jye(t);return nk.set(e,n),r.observe(e),()=>{nk.delete(e),r.unobserve(e)}}const Hye={some:0,all:1};class Vye extends Bo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:a}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:Hye[i]},s=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,a&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),p=u?c:d;p&&p(l)};return qye(this.node.current,o,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Gye(t,n))&&this.startObserver()}unmount(){}}function Gye({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Wye={inView:{Feature:Vye},tap:{Feature:zye},focus:{Feature:Bye},hover:{Feature:Fye}};function e$(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rt[r]=n.get()),t}function Kye(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function T0(e,t,n){const r=e.getProps();return lA(r,t,n!==void 0?n:r.custom,Yye(e),Kye(e))}const Xye="framerAppearId",Zye="data-"+oA(Xye);let Jye=Et,cA=Et;const yo=e=>e*1e3,xi=e=>e/1e3,Qye={current:!1},t$=e=>Array.isArray(e)&&typeof e[0]=="number";function n$(e){return!!(!e||typeof e=="string"&&r$[e]||t$(e)||Array.isArray(e)&&e.every(n$))}const wc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,r$={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:wc([0,.65,.55,1]),circOut:wc([.55,0,1,.45]),backIn:wc([.31,.01,.66,-.59]),backOut:wc([.33,1.53,.69,.99])};function i$(e){if(e)return t$(e)?wc(e):Array.isArray(e)?e.map(i$):r$[e]}function ebe(e,t,n,{delay:r=0,duration:i,repeat:a=0,repeatType:o="loop",ease:s,times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=i$(s);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"})}function tbe(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const a$=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,nbe=1e-7,rbe=12;function ibe(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=a$(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>nbe&&++sibe(a,0,1,e,n);return a=>a===0||a===1?a:a$(i(a),t,r)}const abe=ap(.42,0,1,1),obe=ap(0,0,.58,1),o$=ap(.42,0,.58,1),sbe=e=>Array.isArray(e)&&typeof e[0]!="number",s$=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,l$=e=>t=>1-e(1-t),u$=e=>1-Math.sin(Math.acos(e)),dA=l$(u$),lbe=s$(dA),c$=ap(.33,1.53,.69,.99),pA=l$(c$),ube=s$(pA),cbe=e=>(e*=2)<1?.5*pA(e):.5*(2-Math.pow(2,-10*(e-1))),dbe={linear:Et,easeIn:abe,easeInOut:o$,easeOut:obe,circIn:u$,circInOut:lbe,circOut:dA,backIn:pA,backInOut:ube,backOut:c$,anticipate:cbe},M7=e=>{if(Array.isArray(e)){cA(e.length===4);const[t,n,r,i]=e;return ap(t,n,r,i)}else if(typeof e=="string")return dbe[e];return e},fA=(e,t)=>n=>!!(rp(n)&&cye.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),d$=(e,t,n)=>r=>{if(!rp(r))return r;const[i,a,o,s]=r.match(x0);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s!==void 0?parseFloat(s):1}},pbe=e=>To(0,255,e),Rw={...Ws,transform:e=>Math.round(pbe(e))},hs={test:fA("rgb","red"),parse:d$("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Rw.transform(e)+", "+Rw.transform(t)+", "+Rw.transform(n)+", "+Kc(Yc.transform(r))+")"};function fbe(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const rk={test:fA("#"),parse:fbe,transform:hs.transform},Ol={test:fA("hsl","hue"),parse:d$("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Ei.transform(Kc(t))+", "+Ei.transform(Kc(n))+", "+Kc(Yc.transform(r))+")"},mn={test:e=>hs.test(e)||rk.test(e)||Ol.test(e),parse:e=>hs.test(e)?hs.parse(e):Ol.test(e)?Ol.parse(e):rk.parse(e),transform:e=>rp(e)?e:e.hasOwnProperty("red")?hs.transform(e):Ol.transform(e)},gt=(e,t,n)=>-n*e+n*t+e;function Iw(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function hbe({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=Iw(l,s,e+1/3),a=Iw(l,s,e),o=Iw(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}const Ow=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},mbe=[rk,hs,Ol],gbe=e=>mbe.find(t=>t.test(e));function D7(e){const t=gbe(e);let n=t.parse(e);return t===Ol&&(n=hbe(n)),n}const p$=(e,t)=>{const n=D7(e),r=D7(t),i={...n};return a=>(i.red=Ow(n.red,r.red,a),i.green=Ow(n.green,r.green,a),i.blue=Ow(n.blue,r.blue,a),i.alpha=gt(n.alpha,r.alpha,a),hs.transform(i))};function ybe(e){var t,n;return isNaN(e)&&rp(e)&&(((t=e.match(x0))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(zU))===null||n===void 0?void 0:n.length)||0)>0}const f$={regex:lye,countKey:"Vars",token:"${v}",parse:Et},h$={regex:zU,countKey:"Colors",token:"${c}",parse:mn.parse},m$={regex:x0,countKey:"Numbers",token:"${n}",parse:Ws.parse};function _w(e,{regex:t,countKey:n,token:r,parse:i}){const a=e.tokenised.match(t);a&&(e["num"+n]=a.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...a.map(i)))}function Kh(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&_w(n,f$),_w(n,h$),_w(n,m$),n}function g$(e){return Kh(e).values}function y$(e){const{values:t,numColors:n,numVars:r,tokenised:i}=Kh(e),a=t.length;return o=>{let s=i;for(let l=0;ltypeof e=="number"?0:e;function vbe(e){const t=g$(e);return y$(e)(t.map(bbe))}const Ao={test:ybe,parse:g$,createTransformer:y$,getAnimatableNone:vbe},b$=(e,t)=>n=>`${n>0?t:e}`;function v$(e,t){return typeof e=="number"?n=>gt(e,t,n):mn.test(e)?p$(e,t):e.startsWith("var(")?b$(e,t):w$(e,t)}const S$=(e,t)=>{const n=[...e],r=n.length,i=e.map((a,o)=>v$(a,t[o]));return a=>{for(let o=0;o{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=v$(e[i],t[i]));return i=>{for(const a in r)n[a]=r[a](i);return n}},w$=(e,t)=>{const n=Ao.createTransformer(t),r=Kh(e),i=Kh(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?go(S$(r.values,i.values),n):b$(e,t)},Rd=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},L7=(e,t)=>n=>gt(e,t,n);function wbe(e){return typeof e=="number"?L7:typeof e=="string"?mn.test(e)?p$:w$:Array.isArray(e)?S$:typeof e=="object"?Sbe:L7}function Ebe(e,t,n){const r=[],i=n||wbe(e[0]),a=e.length-1;for(let o=0;ot[0];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=Ebe(t,r,i),s=o.length,l=u=>{let c=0;if(s>1)for(;cl(To(e[0],e[a-1],u)):l}function xbe(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Rd(0,t,r);e.push(gt(n,1,i))}}function kbe(e){const t=[0];return xbe(t,e.length-1),t}function Tbe(e,t){return e.map(n=>n*t)}function Abe(e,t){return e.map(()=>t||o$).splice(0,e.length-1)}function Xh({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=sbe(r)?r.map(M7):M7(r),a={done:!1,value:t[0]},o=Tbe(n&&n.length===t.length?n:kbe(t),e),s=hA(o,t,{ease:Array.isArray(i)?i:Abe(t,i)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}function E$(e,t){return t?e*(1e3/t):0}const Cbe=5;function x$(e,t,n){const r=Math.max(t-Cbe,0);return E$(n-e(r),t-r)}const Mw=.001,Nbe=.01,P7=10,Rbe=.05,Ibe=1;function Obe({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,a;Jye(e<=yo(P7));let o=1-t;o=To(Rbe,Ibe,o),e=To(Nbe,P7,xi(e)),o<1?(i=u=>{const c=u*o,d=c*e,p=c-n,f=ik(u,o),h=Math.exp(-d);return Mw-p/f*h},a=u=>{const d=u*o*e,p=d*n+n,f=Math.pow(o,2)*Math.pow(u,2)*e,h=Math.exp(-d),m=ik(Math.pow(u,2),o);return(-i(u)+Mw>0?-1:1)*((p-f)*h)/m}):(i=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-Mw+c*d},a=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const s=5/e,l=Mbe(i,a,s);if(e=yo(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const _be=12;function Mbe(e,t,n){let r=n;for(let i=1;i<_be;i++)r=r-e(r)/t(r);return r}function ik(e,t){return e*Math.sqrt(1-t*t)}const Dbe=["duration","bounce"],Lbe=["stiffness","damping","mass"];function F7(e,t){return t.some(n=>e[n]!==void 0)}function Pbe(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!F7(e,Lbe)&&F7(e,Dbe)){const n=Obe(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function k$({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],a=e[e.length-1],o={done:!1,value:i},{stiffness:s,damping:l,mass:u,velocity:c,duration:d,isResolvedFromDuration:p}=Pbe(r),f=c?-xi(c):0,h=l/(2*Math.sqrt(s*u)),m=a-i,S=xi(Math.sqrt(s/u)),y=Math.abs(m)<5;n||(n=y?.01:2),t||(t=y?.005:.5);let g;if(h<1){const v=ik(S,h);g=x=>{const A=Math.exp(-h*S*x);return a-A*((f+h*S*m)/v*Math.sin(v*x)+m*Math.cos(v*x))}}else if(h===1)g=v=>a-Math.exp(-S*v)*(m+(f+S*m)*v);else{const v=S*Math.sqrt(h*h-1);g=x=>{const A=Math.exp(-h*S*x),E=Math.min(v*x,300);return a-A*((f+h*S*m)*Math.sinh(E)+v*m*Math.cosh(E))/v}}return{calculatedDuration:p&&d||null,next:v=>{const x=g(v);if(p)o.done=v>=d;else{let A=f;v!==0&&(h<1?A=x$(g,v,x):A=0);const E=Math.abs(A)<=n,N=Math.abs(a-x)<=t;o.done=E&&N}return o.value=o.done?a:x,o}}}function B7({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],p={done:!1,value:d},f=_=>s!==void 0&&_l,h=_=>s===void 0?l:l===void 0||Math.abs(s-_)-m*Math.exp(-_/r),v=_=>y+g(_),x=_=>{const M=g(_),D=v(_);p.done=Math.abs(M)<=u,p.value=p.done?y:D};let A,E;const N=_=>{f(p.value)&&(A=_,E=k$({keyframes:[p.value,h(p.value)],velocity:x$(v,_,p.value),damping:i,stiffness:a,restDelta:u,restSpeed:c}))};return N(0),{calculatedDuration:null,next:_=>{let M=!1;return!E&&A===void 0&&(M=!0,x(_),N(_)),A!==void 0&&_>A?E.next(_-A):(!M&&x(_),p)}}}const Fbe=e=>{const t=({timestamp:n})=>e(n);return{start:()=>rt.update(t,!0),stop:()=>Ri(t),now:()=>It.isProcessing?It.timestamp:performance.now()}},z7=2e4;function U7(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=z7?1/0:t}const Bbe={decay:B7,inertia:B7,tween:Xh,keyframes:Xh,spring:k$};function Id({autoplay:e=!0,delay:t=0,driver:n=Fbe,keyframes:r,type:i="keyframes",repeat:a=0,repeatDelay:o=0,repeatType:s="loop",onPlay:l,onStop:u,onComplete:c,onUpdate:d,...p}){let f=1,h=!1,m,S;const y=()=>{S=new Promise(H=>{m=H})};y();let g;const v=Bbe[i]||Xh;let x;v!==Xh&&typeof r[0]!="number"&&(x=hA([0,100],r,{clamp:!1}),r=[0,100]);const A=v({...p,keyframes:r});let E;s==="mirror"&&(E=v({...p,keyframes:[...r].reverse(),velocity:-(p.velocity||0)}));let N="idle",_=null,M=null,D=null;A.calculatedDuration===null&&a&&(A.calculatedDuration=U7(A));const{calculatedDuration:z}=A;let $=1/0,ee=1/0;z!==null&&($=z+o,ee=$*(a+1)-o);let te=0;const X=H=>{if(M===null)return;f>0&&(M=Math.min(M,H)),f<0&&(M=Math.min(H-ee/f,M)),_!==null?te=_:te=Math.round(H-M)*f;const F=te-t*(f>=0?1:-1),R=f>=0?F<0:F>ee;te=Math.max(F,0),N==="finished"&&_===null&&(te=ee);let G=te,Z=A;if(a){const _e=te/$;let ke=Math.floor(_e),lt=_e%1;!lt&&_e>=1&&(lt=1),lt===1&&ke--,ke=Math.min(ke,a+1);const en=!!(ke%2);en&&(s==="reverse"?(lt=1-lt,o&&(lt-=o/$)):s==="mirror"&&(Z=E));let Vt=To(0,1,lt);te>ee&&(Vt=s==="reverse"&&en?1:0),G=Vt*$}const K=R?{done:!1,value:r[0]}:Z.next(G);x&&(K.value=x(K.value));let{done:ce}=K;!R&&z!==null&&(ce=f>=0?te>=ee:te<=0);const ye=_===null&&(N==="finished"||N==="running"&&ce);return d&&d(K.value),ye&&U(),K},ue=()=>{g&&g.stop(),g=void 0},le=()=>{N="idle",ue(),m(),y(),M=D=null},U=()=>{N="finished",c&&c(),ue(),m()},Y=()=>{if(h)return;g||(g=n(X));const H=g.now();l&&l(),_!==null?M=H-_:(!M||N==="finished")&&(M=H),N==="finished"&&y(),D=M,_=null,N="running",g.start()};e&&Y();const I={then(H,F){return S.then(H,F)},get time(){return xi(te)},set time(H){H=yo(H),te=H,_!==null||!g||f===0?_=H:M=g.now()-H/f},get duration(){const H=A.calculatedDuration===null?U7(A):A.calculatedDuration;return xi(H)},get speed(){return f},set speed(H){H===f||!g||(f=H,I.time=xi(te))},get state(){return N},play:Y,pause:()=>{N="paused",_=te},stop:()=>{h=!0,N!=="idle"&&(N="idle",u&&u(),le())},cancel:()=>{D!==null&&X(D),le()},complete:()=>{N="finished"},sample:H=>(M=0,X(H))};return I}function zbe(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ube=zbe(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),$be=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Gp=10,jbe=2e4,qbe=(e,t)=>t.type==="spring"||e==="backgroundColor"||!n$(t.ease);function Hbe(e,t,{onUpdate:n,onComplete:r,...i}){if(!(Ube()&&$be.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let o=!1,s,l;const u=()=>{l=new Promise(g=>{s=g})};u();let{keyframes:c,duration:d=300,ease:p,times:f}=i;if(qbe(t,i)){const g=Id({...i,repeat:0,delay:0});let v={done:!1,value:c[0]};const x=[];let A=0;for(;!v.done&&Ah.cancel(),S=()=>{rt.update(m),s(),u()};return h.onfinish=()=>{e.set(tbe(c,i)),r&&r(),S()},{then(g,v){return l.then(g,v)},attachTimeline(g){return h.timeline=g,h.onfinish=null,Et},get time(){return xi(h.currentTime||0)},set time(g){h.currentTime=yo(g)},get speed(){return h.playbackRate},set speed(g){h.playbackRate=g},get duration(){return xi(d)},play:()=>{o||(h.play(),Ri(m))},pause:()=>h.pause(),stop:()=>{if(o=!0,h.playState==="idle")return;const{currentTime:g}=h;if(g){const v=Id({...i,autoplay:!1});e.setWithVelocity(v.sample(g-Gp).value,v.sample(g).value,Gp)}S()},complete:()=>h.finish(),cancel:S}}function Vbe({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:Et,pause:Et,stop:Et,then:a=>(a(),Promise.resolve()),cancel:Et,complete:Et});return t?Id({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const Gbe={type:"spring",stiffness:500,damping:25,restSpeed:10},Wbe=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Ybe={type:"keyframes",duration:.8},Kbe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Xbe=(e,{keyframes:t})=>t.length>2?Ybe:Gs.has(e)?e.startsWith("scale")?Wbe(t[1]):Gbe:Kbe,ak=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Ao.test(t)||t==="0")&&!t.startsWith("url(")),Zbe=new Set(["brightness","contrast","saturate","opacity"]);function Jbe(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(x0)||[];if(!r)return e;const i=n.replace(r,"");let a=Zbe.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const Qbe=/([a-z-]*)\(.*?\)/g,ok={...Ao,getAnimatableNone:e=>{const t=e.match(Qbe);return t?t.map(Jbe).join(" "):e}},eve={...UU,color:mn,backgroundColor:mn,outlineColor:mn,fill:mn,stroke:mn,borderColor:mn,borderTopColor:mn,borderRightColor:mn,borderBottomColor:mn,borderLeftColor:mn,filter:ok,WebkitFilter:ok},mA=e=>eve[e];function T$(e,t){let n=mA(e);return n!==ok&&(n=Ao),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const A$=e=>/^0[^.\s]+$/.test(e);function tve(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||A$(e)}function nve(e,t,n,r){const i=ak(t,n);let a;Array.isArray(n)?a=[...n]:a=[null,n];const o=r.from!==void 0?r.from:e.get();let s;const l=[];for(let u=0;ui=>{const a=C$(r,e)||{},o=a.delay||r.delay||0;let{elapsed:s=0}=r;s=s-yo(o);const l=nve(t,e,n,a),u=l[0],c=l[l.length-1],d=ak(e,u),p=ak(e,c);let f={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...a,delay:-s,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{i(),a.onComplete&&a.onComplete()}};if(rve(a)||(f={...f,...Xbe(e,f)}),f.duration&&(f.duration=yo(f.duration)),f.repeatDelay&&(f.repeatDelay=yo(f.repeatDelay)),!d||!p||Qye.current||a.type===!1)return Vbe(f);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const h=Hbe(t,e,f);if(h)return h}return Id(f)};function Zh(e){return!!(pn(e)&&e.add)}const N$=e=>/^\-?\d*\.?\d+$/.test(e);function yA(e,t){e.indexOf(t)===-1&&e.push(t)}function bA(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class vA{constructor(){this.subscriptions=[]}add(t){return yA(this.subscriptions,t),()=>bA(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let a=0;a!isNaN(parseFloat(e)),Xc={current:void 0};class ave{constructor(t,n={}){this.version="10.16.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:a,timestamp:o}=It;this.lastUpdated!==o&&(this.timeDelta=a,this.lastUpdated=o,rt.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>rt.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=ive(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new vA);const r=this.events[t].add(n);return t==="change"?()=>{r(),rt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Xc.current&&Xc.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?E$(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Fs(e,t){return new ave(e,t)}const R$=e=>t=>t.test(e),ove={test:e=>e==="auto",parse:e=>e},I$=[Ws,we,Ei,$a,pye,dye,ove],Ku=e=>I$.find(R$(e)),sve=[...I$,mn,Ao],lve=e=>sve.find(R$(e));function uve(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Fs(n))}function cve(e,t){const n=T0(e,t);let{transitionEnd:r={},transition:i={},...a}=n?e.makeTargetAnimatable(n,!1):{};a={...a,...r};for(const o in a){const s=Aye(a[o]);uve(e,o,s)}}function dve(e,t,n){var r,i;const a=Object.keys(t).filter(s=>!e.hasValue(s)),o=a.length;if(o)for(let s=0;sl.remove(d))),u.push(m)}return o&&Promise.all(u).then(()=>{o&&cve(e,o)}),u}function sk(e,t,n={}){const r=T0(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const a=r?()=>Promise.all(O$(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=i;return mve(e,t,u+l,c,d,n)}:()=>Promise.resolve(),{when:s}=i;if(s){const[l,u]=s==="beforeChildren"?[a,o]:[o,a];return l().then(()=>u())}else return Promise.all([a(),o(n.delay)])}function mve(e,t,n=0,r=0,i=1,a){const o=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(gve).forEach((u,c)=>{u.notify("AnimationStart",t),o.push(sk(u,t,{...a,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function gve(e,t){return e.sortNodePosition(t)}function yve(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(a=>sk(e,a,n));r=Promise.all(i)}else if(typeof t=="string")r=sk(e,t,n);else{const i=typeof t=="function"?T0(e,t,n.custom):t;r=Promise.all(O$(e,i,n))}return r.then(()=>e.notify("AnimationComplete",t))}const bve=[...QT].reverse(),vve=QT.length;function Sve(e){return t=>Promise.all(t.map(({animation:n,options:r})=>yve(e,n,r)))}function wve(e){let t=Sve(e);const n=xve();let r=!0;const i=(l,u)=>{const c=T0(e,u);if(c){const{transition:d,transitionEnd:p,...f}=c;l={...l,...f,...p}}return l};function a(l){t=l(e)}function o(l,u){const c=e.getProps(),d=e.getVariantContext(!0)||{},p=[],f=new Set;let h={},m=1/0;for(let y=0;ym&&A;const D=Array.isArray(x)?x:[x];let z=D.reduce(i,{});E===!1&&(z={});const{prevResolvedValues:$={}}=v,ee={...$,...z},te=X=>{M=!0,f.delete(X),v.needsAnimating[X]=!0};for(const X in ee){const ue=z[X],le=$[X];h.hasOwnProperty(X)||(ue!==le?Yh(ue)&&Yh(le)?!e$(ue,le)||_?te(X):v.protectedKeys[X]=!0:ue!==void 0?te(X):f.add(X):ue!==void 0&&f.has(X)?te(X):v.protectedKeys[X]=!0)}v.prevProp=x,v.prevResolvedValues=z,v.isActive&&(h={...h,...z}),r&&e.blockInitialAnimation&&(M=!1),M&&!N&&p.push(...D.map(X=>({animation:X,options:{type:g,...l}})))}if(f.size){const y={};f.forEach(g=>{const v=e.getBaseTarget(g);v!==void 0&&(y[g]=v)}),p.push({animation:y})}let S=!!p.length;return r&&c.initial===!1&&!e.manuallyAnimateOnMount&&(S=!1),r=!1,S?t(p):Promise.resolve()}function s(l,u,c){var d;if(n[l].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(f=>{var h;return(h=f.animationState)===null||h===void 0?void 0:h.setActive(l,u)}),n[l].isActive=u;const p=o(c,l);for(const f in n)n[f].protectedKeys={};return p}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n}}function Eve(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!e$(t,e):!1}function Go(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function xve(){return{animate:Go(!0),whileInView:Go(),whileHover:Go(),whileTap:Go(),whileDrag:Go(),whileFocus:Go(),exit:Go()}}class kve extends Bo{constructor(t){super(t),t.animationState||(t.animationState=wve(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),w0(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let Tve=0;class Ave extends Bo{constructor(){super(...arguments),this.id=Tve++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const a=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&a.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const Cve={animation:{Feature:kve},exit:{Feature:Ave}},$7=(e,t)=>Math.abs(e-t);function Nve(e,t){const n=$7(e.x,t.x),r=$7(e.y,t.y);return Math.sqrt(n**2+r**2)}class _${constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Lw(this.lastMoveEventInfo,this.history),c=this.startEvent!==null,d=Nve(u.offset,{x:0,y:0})>=3;if(!c&&!d)return;const{point:p}=u,{timestamp:f}=It;this.history.push({...p,timestamp:f});const{onStart:h,onMove:m}=this.handlers;c||(h&&h(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,u)},this.handlePointerMove=(u,c)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=Dw(c,this.transformPagePoint),rt.update(this.updatePoint,!0)},this.handlePointerUp=(u,c)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:d,onSessionEnd:p}=this.handlers,f=Lw(u.type==="pointercancel"?this.lastMoveEventInfo:Dw(c,this.transformPagePoint),this.history);this.startEvent&&d&&d(u,f),p&&p(u,f)},!KU(t))return;this.handlers=n,this.transformPagePoint=r;const i=k0(t),a=Dw(i,this.transformPagePoint),{point:o}=a,{timestamp:s}=It;this.history=[{...o,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,Lw(a,this.history)),this.removeListeners=go(la(window,"pointermove",this.handlePointerMove),la(window,"pointerup",this.handlePointerUp),la(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ri(this.updatePoint)}}function Dw(e,t){return t?{point:t(e.point)}:e}function j7(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Lw({point:e},t){return{point:e,delta:j7(e,M$(t)),offset:j7(e,Rve(t)),velocity:Ive(t,.1)}}function Rve(e){return e[0]}function M$(e){return e[e.length-1]}function Ive(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=M$(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>yo(t)));)n--;if(!r)return{x:0,y:0};const a=xi(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function or(e){return e.max-e.min}function lk(e,t=0,n=.01){return Math.abs(e-t)<=n}function q7(e,t,n,r=.5){e.origin=r,e.originPoint=gt(t.min,t.max,e.origin),e.scale=or(n)/or(t),(lk(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=gt(n.min,n.max,e.origin)-e.originPoint,(lk(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Zc(e,t,n,r){q7(e.x,t.x,n.x,r?r.originX:void 0),q7(e.y,t.y,n.y,r?r.originY:void 0)}function H7(e,t,n){e.min=n.min+t.min,e.max=e.min+or(t)}function Ove(e,t,n){H7(e.x,t.x,n.x),H7(e.y,t.y,n.y)}function V7(e,t,n){e.min=t.min-n.min,e.max=e.min+or(t)}function Jc(e,t,n){V7(e.x,t.x,n.x),V7(e.y,t.y,n.y)}function _ve(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?gt(n,e,r.max):Math.min(e,n)),e}function G7(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Mve(e,{top:t,left:n,bottom:r,right:i}){return{x:G7(e.x,n,i),y:G7(e.y,t,r)}}function W7(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Rd(t.min,t.max-r,e.min):r>i&&(n=Rd(e.min,e.max-i,t.min)),To(0,1,n)}function Pve(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const uk=.35;function Fve(e=uk){return e===!1?e=0:e===!0&&(e=uk),{x:Y7(e,"left","right"),y:Y7(e,"top","bottom")}}function Y7(e,t,n){return{min:K7(e,t),max:K7(e,n)}}function K7(e,t){return typeof e=="number"?e:e[t]||0}const X7=()=>({translate:0,scale:1,origin:0,originPoint:0}),_l=()=>({x:X7(),y:X7()}),Z7=()=>({min:0,max:0}),Nt=()=>({x:Z7(),y:Z7()});function ci(e){return[e("x"),e("y")]}function D$({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Bve({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function zve(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Pw(e){return e===void 0||e===1}function ck({scale:e,scaleX:t,scaleY:n}){return!Pw(e)||!Pw(t)||!Pw(n)}function ts(e){return ck(e)||L$(e)||e.z||e.rotate||e.rotateX||e.rotateY}function L$(e){return J7(e.x)||J7(e.y)}function J7(e){return e&&e!=="0%"}function Jh(e,t,n){const r=e-n,i=t*r;return n+i}function Q7(e,t,n,r,i){return i!==void 0&&(e=Jh(e,i,r)),Jh(e,n,r)+t}function dk(e,t=0,n=1,r,i){e.min=Q7(e.min,t,n,r,i),e.max=Q7(e.max,t,n,r,i)}function P$(e,{x:t,y:n}){dk(e.x,t.translate,t.scale,t.originPoint),dk(e.y,n.translate,n.scale,n.originPoint)}function Uve(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s1.0000000000001||e<.999999999999?e:1}function Ga(e,t){e.min=e.min+t,e.max=e.max+t}function tM(e,t,[n,r,i]){const a=t[i]!==void 0?t[i]:.5,o=gt(e.min,e.max,a);dk(e,t[n],t[r],o,t.scale)}const $ve=["x","scaleX","originX"],jve=["y","scaleY","originY"];function Ml(e,t){tM(e.x,t,$ve),tM(e.y,t,jve)}function F$(e,t){return D$(zve(e.getBoundingClientRect(),t))}function qve(e,t,n){const r=F$(e,n),{scroll:i}=t;return i&&(Ga(r.x,i.offset.x),Ga(r.y,i.offset.y)),r}const Hve=new WeakMap;class Vve{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Nt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=l=>{this.stopAnimation(),n&&this.snapToCursor(k0(l,"page").point)},a=(l,u)=>{const{drag:c,dragPropagation:d,onDragStart:p}=this.getProps();if(c&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=ZU(c),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ci(h=>{let m=this.getAxisMotionValue(h).get()||0;if(Ei.test(m)){const{projection:S}=this.visualElement;if(S&&S.layout){const y=S.layout.layoutBox[h];y&&(m=or(y)*(parseFloat(m)/100))}}this.originPoint[h]=m}),p&&rt.update(()=>p(l,u),!1,!0);const{animationState:f}=this.visualElement;f&&f.setActive("whileDrag",!0)},o=(l,u)=>{const{dragPropagation:c,dragDirectionLock:d,onDirectionLock:p,onDrag:f}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:h}=u;if(d&&this.currentDirection===null){this.currentDirection=Gve(h),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",u.point,h),this.updateAxis("y",u.point,h),this.visualElement.render(),f&&f(l,u)},s=(l,u)=>this.stop(l,u);this.panSession=new _$(t,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&rt.update(()=>a(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Wp(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=_ve(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&Il(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Mve(r.layoutBox,t):this.constraints=!1,this.elastic=Fve(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ci(a=>{this.getAxisMotionValue(a)&&(this.constraints[a]=Pve(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Il(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=qve(r,i.root,this.visualElement.getTransformPagePoint());let o=Dve(i.layout.layoutBox,a);if(n){const s=n(Bve(o));this.hasMutatedConstraints=!!s,s&&(o=D$(s))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=ci(c=>{if(!Wp(c,n,this.currentDirection))return;let d=l&&l[c]||{};o&&(d={min:0,max:0});const p=i?200:1e6,f=i?40:1e7,h={type:"inertia",velocity:r?t[c]:0,bounceStiffness:p,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...a,...d};return this.startAxisValueAnimation(c,h)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(gA(t,r,0,n))}stopAnimation(){ci(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n="_drag"+t.toUpperCase(),r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){ci(n=>{const{drag:r}=this.getProps();if(!Wp(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:s}=i.layout.layoutBox[n];a.set(t[n]-gt(o,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Il(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ci(o=>{const s=this.getAxisMotionValue(o);if(s){const l=s.get();i[o]=Lve({min:l,max:l},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ci(o=>{if(!Wp(o,t,null))return;const s=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];s.set(gt(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;Hve.set(this.visualElement,this);const t=this.visualElement.current,n=la(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Il(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const o=ra(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(ci(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())});return()=>{o(),n(),a(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:o=uk,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:a,dragElastic:o,dragMomentum:s}}}function Wp(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Gve(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Wve extends Bo{constructor(t){super(t),this.removeGroupControls=Et,this.removeListeners=Et,this.controls=new Vve(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Et}unmount(){this.removeGroupControls(),this.removeListeners()}}const nM=e=>(t,n)=>{e&&rt.update(()=>e(t,n))};class Yve extends Bo{constructor(){super(...arguments),this.removePointerDownListener=Et}onPointerDown(t){this.session=new _$(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:nM(t),onStart:nM(n),onMove:r,onEnd:(a,o)=>{delete this.session,i&&rt.update(()=>i(a,o))}}}mount(){this.removePointerDownListener=la(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function Kve(){const e=q.useContext(ZT);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=q.useId();return q.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}const Wf={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function rM(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Xu={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(we.test(e))e=parseFloat(e);else return e;const n=rM(e,t.target.x),r=rM(e,t.target.y);return`${n}% ${r}%`}},Xve={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Ao.parse(e);if(i.length>5)return r;const a=Ao.createTransformer(e),o=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=l;const u=gt(s,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),a(i)}};class Zve extends Ot.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=t;iye(Jve),a&&(n.group&&n.group.add(a),r&&r.register&&i&&r.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Wf.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,o=r.projection;return o&&(o.isPresent=a,i||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||rt.postRender(()=>{const s=o.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function B$(e){const[t,n]=Kve(),r=q.useContext(DU);return Ot.createElement(Zve,{...e,layoutGroup:r,switchLayoutGroup:q.useContext(LU),isPresent:t,safeToRemove:n})}const Jve={borderRadius:{...Xu,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Xu,borderTopRightRadius:Xu,borderBottomLeftRadius:Xu,borderBottomRightRadius:Xu,boxShadow:Xve},z$=["TopLeft","TopRight","BottomLeft","BottomRight"],Qve=z$.length,iM=e=>typeof e=="string"?parseFloat(e):e,aM=e=>typeof e=="number"||we.test(e);function eSe(e,t,n,r,i,a){i?(e.opacity=gt(0,n.opacity!==void 0?n.opacity:1,tSe(r)),e.opacityExit=gt(t.opacity!==void 0?t.opacity:1,0,nSe(r))):a&&(e.opacity=gt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;ort?1:n(Rd(e,t,r))}function sM(e,t){e.min=t.min,e.max=t.max}function hr(e,t){sM(e.x,t.x),sM(e.y,t.y)}function lM(e,t,n,r,i){return e-=t,e=Jh(e,1/n,r),i!==void 0&&(e=Jh(e,1/i,r)),e}function rSe(e,t=0,n=1,r=.5,i,a=e,o=e){if(Ei.test(t)&&(t=parseFloat(t),t=gt(o.min,o.max,t/100)-o.min),typeof t!="number")return;let s=gt(a.min,a.max,r);e===a&&(s-=t),e.min=lM(e.min,t,n,s,i),e.max=lM(e.max,t,n,s,i)}function uM(e,t,[n,r,i],a,o){rSe(e,t[n],t[r],t[i],t.scale,a,o)}const iSe=["x","scaleX","originX"],aSe=["y","scaleY","originY"];function cM(e,t,n,r){uM(e.x,t,iSe,n?n.x:void 0,r?r.x:void 0),uM(e.y,t,aSe,n?n.y:void 0,r?r.y:void 0)}function dM(e){return e.translate===0&&e.scale===1}function $$(e){return dM(e.x)&&dM(e.y)}function oSe(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function j$(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function pM(e){return or(e.x)/or(e.y)}class sSe{constructor(){this.members=[]}add(t){yA(this.members,t),t.scheduleRender()}remove(t){if(bA(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function fM(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y;if((i||a)&&(r=`translate3d(${i}px, ${a}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:u,rotateY:c}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),c&&(r+=`rotateY(${c}deg) `)}const o=e.x.scale*t.x,s=e.y.scale*t.y;return(o!==1||s!==1)&&(r+=`scale(${o}, ${s})`),r||"none"}const lSe=(e,t)=>e.depth-t.depth;class uSe{constructor(){this.children=[],this.isDirty=!1}add(t){yA(this.children,t),this.isDirty=!0}remove(t){bA(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(lSe),this.isDirty=!1,this.children.forEach(t)}}function cSe(e,t){const n=performance.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(Ri(r),e(a-t))};return rt.read(r,!0),()=>Ri(r)}function dSe(e){window.MotionDebug&&window.MotionDebug.record(e)}function pSe(e){return e instanceof SVGElement&&e.tagName!=="svg"}function fSe(e,t,n){const r=pn(e)?e:Fs(e);return r.start(gA("",r,t,n)),r.animation}const hM=["","X","Y","Z"],mM=1e3;let hSe=0;const ns={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function q$({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},s=t==null?void 0:t()){this.id=hSe++,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.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{ns.totalNodes=ns.resolvedTargetDeltas=ns.recalculatedProjection=0,this.nodes.forEach(ySe),this.nodes.forEach(ESe),this.nodes.forEach(xSe),this.nodes.forEach(bSe),dSe(ns)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=cSe(p,250),Wf.hasAnimatedSinceResize&&(Wf.hasAnimatedSinceResize=!1,this.nodes.forEach(yM))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeTargetChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||NSe,{onLayoutAnimationStart:S,onLayoutAnimationComplete:y}=c.getProps(),g=!this.targetLayout||!j$(this.targetLayout,h)||f,v=!p&&f;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||v||p&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,v);const x={...C$(m,"layout"),onPlay:S,onComplete:y};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x)}else p||yM(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}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,Ri(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(kSe),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(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;cthis.update()))}clearAllSnapshots(){this.nodes.forEach(vSe),this.sharedNodes.forEach(TSe)}scheduleUpdateProjection(){rt.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){rt.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{const A=x/1e3;bM(d.x,o.x,A),bM(d.y,o.y,A),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Jc(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ASe(this.relativeTarget,this.relativeTargetOrigin,p,A),v&&oSe(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=Nt()),hr(v,this.relativeTarget)),m&&(this.animationValues=c,eSe(c,u,this.latestValues,A,g,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},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&&(Ri(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=rt.update(()=>{Wf.hasAnimatedSinceResize=!0,this.currentAnimation=fSe(0,mM,{...o,onUpdate:s=>{this.mixTargetDelta(s),o.onUpdate&&o.onUpdate(s)},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(mM),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:c}=o;if(!(!s||!l||!u)){if(this!==o&&this.layout&&u&&H$(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Nt();const d=or(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const p=or(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+p}hr(s,l),Ml(s,c),Zc(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(o,s){this.sharedNodes.has(o)||this.sharedNodes.set(o,new sSe),this.sharedNodes.get(o).add(s);const u=s.options.initialPromotionConfig;s.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(s):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:s}=this.options;return s?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:s}=this.options;return s?(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:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let s=!1;const{latestValues:l}=o;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(s=!0),!s)return;const u={};for(let c=0;c{var s;return(s=o.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(gM),this.root.sharedNodes.clear()}}}function mSe(e){e.updateLayout()}function gSe(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:a}=e.options,o=n.source!==e.layout.source;a==="size"?ci(d=>{const p=o?n.measuredBox[d]:n.layoutBox[d],f=or(p);p.min=r[d].min,p.max=p.min+f}):H$(a,n.layoutBox,r)&&ci(d=>{const p=o?n.measuredBox[d]:n.layoutBox[d],f=or(r[d]);p.max=p.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+f)});const s=_l();Zc(s,r,n.layoutBox);const l=_l();o?Zc(l,e.applyTransform(i,!0),n.measuredBox):Zc(l,r,n.layoutBox);const u=!$$(s);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:f}=d;if(p&&f){const h=Nt();Jc(h,n.layoutBox,p.layoutBox);const m=Nt();Jc(m,r,f.layoutBox),j$(h,m)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=h,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:s,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function ySe(e){ns.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function bSe(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function vSe(e){e.clearSnapshot()}function gM(e){e.clearMeasurements()}function SSe(e){e.isLayoutDirty=!1}function wSe(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function yM(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ESe(e){e.resolveTargetDelta()}function xSe(e){e.calcProjection()}function kSe(e){e.resetRotation()}function TSe(e){e.removeLeadSnapshot()}function bM(e,t,n){e.translate=gt(t.translate,0,n),e.scale=gt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function vM(e,t,n,r){e.min=gt(t.min,n.min,r),e.max=gt(t.max,n.max,r)}function ASe(e,t,n,r){vM(e.x,t.x,n.x,r),vM(e.y,t.y,n.y,r)}function CSe(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const NSe={duration:.45,ease:[.4,0,.1,1]},SM=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),wM=SM("applewebkit/")&&!SM("chrome/")?Math.round:Et;function EM(e){e.min=wM(e.min),e.max=wM(e.max)}function RSe(e){EM(e.x),EM(e.y)}function H$(e,t,n){return e==="position"||e==="preserve-aspect"&&!lk(pM(t),pM(n),.2)}const ISe=q$({attachResizeListener:(e,t)=>ra(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Fw={current:void 0},V$=q$({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Fw.current){const e=new ISe({});e.mount(window),e.setOptions({layoutScroll:!0}),Fw.current=e}return Fw.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),OSe={pan:{Feature:Yve},drag:{Feature:Wve,ProjectionNode:V$,MeasureLayout:B$}},_Se=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function MSe(e){const t=_Se.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function pk(e,t,n=1){const[r,i]=MSe(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const o=a.trim();return N$(o)?parseFloat(o):o}else return tk(i)?pk(i,t,n+1):i}function DSe(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const a=i.get();if(!tk(a))return;const o=pk(a,r);o&&i.set(o)});for(const i in t){const a=t[i];if(!tk(a))continue;const o=pk(a,r);o&&(t[i]=o,n||(n={}),n[i]===void 0&&(n[i]=a))}return{target:t,transitionEnd:n}}const LSe=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),G$=e=>LSe.has(e),PSe=e=>Object.keys(e).some(G$),xM=e=>e===Ws||e===we,kM=(e,t)=>parseFloat(e.split(", ")[t]),TM=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return kM(i[1],t);{const a=r.match(/^matrix\((.+)\)$/);return a?kM(a[1],e):0}},FSe=new Set(["x","y","z"]),BSe=np.filter(e=>!FSe.has(e));function zSe(e){const t=[];return BSe.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const pu={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:TM(4,13),y:TM(5,14)};pu.translateX=pu.x;pu.translateY=pu.y;const USe=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,a=getComputedStyle(i),{display:o}=a,s={};o==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=pu[u](r,a)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const c=t.getValue(u);c&&c.jump(s[u]),e[u]=pu[u](l,a)}),e},$Se=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(G$);let a=[],o=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let c=n[l],d=Ku(c);const p=t[l];let f;if(Yh(p)){const h=p.length,m=p[0]===null?1:0;c=p[m],d=Ku(c);for(let S=m;S=0?window.pageYOffset:null,u=USe(t,e,s);return a.length&&a.forEach(([c,d])=>{e.getValue(c).set(d)}),e.render(),S0&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function jSe(e,t,n,r){return PSe(t)?$Se(e,t,n,r):{target:t,transitionEnd:r}}const qSe=(e,t,n,r)=>{const i=DSe(e,t,r);return t=i.target,r=i.transitionEnd,jSe(e,t,n,r)},fk={current:null},W$={current:!1};function HSe(){if(W$.current=!0,!!S0)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>fk.current=e.matches;e.addListener(t),t()}else fk.current=!1}function VSe(e,t,n){const{willChange:r}=t;for(const i in t){const a=t[i],o=n[i];if(pn(a))e.addValue(i,a),Zh(r)&&r.add(i);else if(pn(o))e.addValue(i,Fs(a,{owner:e})),Zh(r)&&r.remove(i);else if(o!==a)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(a)}else{const s=e.getStaticValue(i);e.addValue(i,Fs(s!==void 0?s:a,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const AM=new WeakMap,Y$=Object.keys(Nd),GSe=Y$.length,CM=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],WSe=eA.length;class YSe{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,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.scheduleRender=()=>rt.render(this.render,!1,!0);const{latestValues:s,renderState:l}=a;this.latestValues=s,this.baseTarget={...s},this.initialValues=n.initial?{...s}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.isControllingVariants=E0(n),this.isVariantNode=MU(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(n,{});for(const d in c){const p=c[d];s[d]!==void 0&&pn(p)&&(p.set(s[d],!1),Zh(u)&&u.add(d))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,AM.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),W$.current||HSe(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:fk.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){AM.delete(this.current),this.projection&&this.projection.unmount(),Ri(this.notifyUpdate),Ri(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=Gs.has(t),i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&rt.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),a=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),a()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,a){let o,s;for(let l=0;lthis.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:a,layoutScroll:p,layoutRoot:f})}return s}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Nt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Fs(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=lA(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!pn(a)?a:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new vA),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class K$ extends YSe{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},a){let o=fve(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),o&&(o=i(o))),a){dve(this,r,o);const s=qSe(this,r,o,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}}}function KSe(e){return window.getComputedStyle(e)}class XSe extends K${readValueFromInstance(t,n){if(Gs.has(n)){const r=mA(n);return r&&r.default||0}else{const r=KSe(t),i=(BU(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return F$(t,n)}build(t,n,r,i){nA(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return sA(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;pn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){HU(t,n,r,i)}}class ZSe extends K${constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Gs.has(n)){const r=mA(n);return r&&r.default||0}return n=VU.has(n)?n:oA(n),t.getAttribute(n)}measureInstanceViewportBox(){return Nt()}scrapeMotionValuesFromProps(t,n){return WU(t,n)}build(t,n,r,i){iA(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){GU(t,n,r,i)}mount(t){this.isSVGTag=aA(t.tagName),super.mount(t)}}const JSe=(e,t)=>tA(e)?new ZSe(t,{enableHardwareAcceleration:!1}):new XSe(t,{enableHardwareAcceleration:!0}),QSe={layout:{ProjectionNode:V$,MeasureLayout:B$}},ewe={...Cve,...Wye,...OSe,...QSe},NM=nye((e,t)=>Dye(e,t,ewe,JSe));function A0(e){const t=uA(()=>Fs(e)),{isStatic:n}=q.useContext(b0);if(n){const[,r]=q.useState(e);q.useEffect(()=>t.on("change",r),[])}return t}const twe=e=>typeof e=="object"&&e.mix,nwe=e=>twe(e)?e.mix:void 0;function rwe(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],a=e[2+n],o=e[3+n],s=hA(i,a,{mixer:nwe(a[0]),...o});return t?s(r):s}function X$(e,t){const n=A0(t()),r=()=>n.set(t());return r(),JT(()=>{const i=()=>rt.update(r,!1,!0),a=e.map(o=>o.on("change",i));return()=>{a.forEach(o=>o()),Ri(r)}}),n}function iwe(e){Xc.current=[],e();const t=X$(Xc.current,e);return Xc.current=void 0,t}function RM(e,t,n,r){if(typeof e=="function")return iwe(e);const i=typeof t=="function"?t:rwe(t,n,r);return Array.isArray(e)?IM(e,i):IM([e],([a])=>i(a))}function IM(e,t){const n=uA(()=>[]);return X$(e,()=>{n.length=0;const r=e.length;for(let i=0;i{r.current&&r.current.stop()};return q.useInsertionEffect(()=>i.attach((o,s)=>{if(n)return s(o);if(a(),r.current=Id({keyframes:[i.get(),o],velocity:i.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...t,onUpdate:s}),!It.isProcessing){const l=performance.now()-It.timestamp;l<30&&(r.current.time=xi(l))}return i.get()},a),[JSON.stringify(t)]),JT(()=>{if(pn(e))return e.on("change",o=>i.set(parseFloat(o)))},[i]),i}var C0={exports:{}},Ec={exports:{}};(function(){var e,t,n,r,i,a;typeof performance<"u"&&performance!==null&&performance.now?Ec.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(Ec.exports=function(){return(e()-i)/1e6},t=process.hrtime,e=function(){var o;return o=t(),o[0]*1e9+o[1]},r=e(),a=process.uptime()*1e9,i=r-a):Date.now?(Ec.exports=function(){return Date.now()-n},n=Date.now()):(Ec.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(Kr);var owe=Ec.exports,swe=owe,ua=typeof window>"u"?Kr:window,Yp=["moz","webkit"],Kl="AnimationFrame",fu=ua["request"+Kl],Od=ua["cancel"+Kl]||ua["cancelRequest"+Kl];for(var Zu=0;!fu&&Zu{n.current=e},[e]),q.useEffect(()=>{let r,i;function a(){const s=Date.now()-r;r=Date.now(),o(),n.current&&n.current(s)}function o(){i=_M(a)}if(t)return r=Date.now(),o(),()=>{_M.cancel(i)}},[t])}const dwe=(e,t,n,r)=>{const i=n*6,a=[-i,-i/(r*.65),-i/(r*.85),0,i/(r*.85),i/(r*.65),i],o=[n,n*(r*.55),n*(r*.75),n*r,n*(r*.75),n*(r*.55),n],s=i+1,l=A0(s),u=awe(RM(l,a,o),{stiffness:1700,damping:90}),c=RM(u,d=>`${d/16}rem`);return cwe(()=>{const d=t.current,p=e.get();if(d&&p!==null){const f=d.getBoundingClientRect(),h=f.left+f.width/2,m=p-h;l.set(m);return}l.set(s)},!0),{width:c,widthPX:u}};function pwe({id:e,title:t,img:n,mouseX:r,desktop:i,openApp:a,isOpen:o,link:s,dockSize:l,dockMag:u}){const c=q.useRef(null),{width:d}=dwe(r,c,l,u),{winWidth:p}=p2();return k.jsxs("li",{id:`dock-${e}`,onClick:i||e==="launchpad"?()=>a(e):()=>{},className:"hstack flex-col justify-end mb-1 transition duration-150 ease-in origin-bottom",children:[k.jsx("p",{className:"tooltip absolute px-3 py-1 rounded-md text-sm c-text-black c-bg-300/80",children:t}),s?k.jsx("a",{href:s,target:"_blank",rel:"noreferrer",children:k.jsx(NM.img,{className:"w-12",ref:c,src:n,alt:t,title:t,draggable:!1,style:p<640?{}:{width:d,willChange:"width"}})}):k.jsx(NM.img,{className:"w-12",ref:c,src:n,alt:t,title:t,draggable:!1,style:p<640?{}:{width:d,willChange:"width"}}),k.jsx("div",{className:`h-1 w-1 m-0 rounded-full c-bg-800 ${o?"":"invisible"}`})]})}function fwe({open:e,showApps:t,showLaunchpad:n,toggleLaunchpad:r,hide:i}){const{dockSize:a,dockMag:o}=Ht(u=>({dockSize:u.dockSize,dockMag:u.dockMag})),s=u=>{u==="launchpad"?r(!n):(r(!1),e(u))},l=A0(null);return k.jsx("div",{className:`dock w-full sm:w-max fixed left-0 right-0 mx-auto bottom-1 ${i?"z-0":"z-50"} overflow-x-scroll sm:overflow-x-visible`,children:k.jsx("ul",{className:"mx-auto w-max px-2 space-x-2 flex backdrop-blur-2xl c-border-400/40 c-bg-white/20",border:"1 rounded-none sm:rounded-xl",onMouseMove:u=>l.set(u.nativeEvent.x),onMouseLeave:()=>l.set(null),style:{height:`${a+15}px`},children:Wc.map(u=>k.jsx(pwe,{id:u.id,title:u.title,img:u.img,mouseX:l,desktop:u.desktop,openApp:s,isOpen:u.desktop&&t[u.id],link:u.link,dockSize:a,dockMag:o},`dock-${u.id}`))})})}const hwe="Search";function mwe({show:e,toggleLaunchpad:t}){const n=Ht(u=>u.dark),[r,i]=q.useState(""),[a,o]=q.useState(!1),s=()=>{if(r==="")return ek;const u=r.toLowerCase();return ek.filter(d=>d.title.toLowerCase().includes(u)||d.id.toLowerCase().includes(u))},l=e?"":"opacity-0 invisible transition-opacity duration-200";return k.jsx("div",{className:`${l} z-30 transform scale-110 w-full h-full fixed overflow-hidden bg-center bg-cover`,id:"launchpad",style:{backgroundImage:`url(${n?Ni.night:Ni.day})`},onClick:()=>t(!1),children:k.jsxs("div",{className:"w-full h-full absolute bg-gray-900/20 backdrop-blur-2xl",children:[k.jsxs("div",{className:"mx-auto flex h-7 w-64 mt-5 bg-gray-200/10",border:"1 rounded-md gray-200/30",onClick:u=>u.stopPropagation(),onFocus:()=>o(!0),onBlur:()=>o(!1),children:[k.jsx("div",{className:`${a?"w-6 duration-200":"w-26 delay-250"} hstack justify-end`,children:k.jsx("span",{className:"i-bx:search ml-1 text-white"})}),k.jsx("input",{className:"flex-1 min-w-0 no-outline bg-transparent px-1 text-sm text-white",placeholder:hwe,value:r,onChange:u=>i(u.target.value)})]}),k.jsx("div",{className:"max-w-[1100px] mx-auto mt-8 w-full px-4 sm:px-10",display:"grid",grid:"flow-row cols-4 sm:cols-7",children:s().map(u=>k.jsx("div",{className:"h-32 sm:h-36 w-full flex-center",children:k.jsxs("div",{className:"h-full w-full flex flex-col",children:[k.jsx("a",{className:"h-max",href:u.link,target:"_blank",rel:"noreferrer",onClick:c=>c.stopPropagation(),children:k.jsx("img",{className:"w-14 sm:w-20 mx-auto",src:u.img,alt:u.title,title:u.title})}),k.jsx("span",{className:"mt-2 mx-auto text-white text-xs sm:text-sm",children:u.title})]})},`launchpad-${u.id}`))})]})})}var N0={exports:{}},Z$={};function J$(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";var r=(e=window.document)===null||e===void 0||(t=e.documentElement)===null||t===void 0?void 0:t.style;if(!r||n in r)return"";for(var i=0;i: Unmounted during event!");return t}var R0={},I0={};Object.defineProperty(I0,"__esModule",{value:!0});I0.default=Kwe;function Kwe(){}function Qh(e){"@babel/helpers - typeof";return Qh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qh(e)}Object.defineProperty(R0,"__esModule",{value:!0});R0.default=void 0;var Uw=Zwe(q),Yn=EA(wm),Xwe=EA(d2),rn=xt,Ia=Ui,$w=zi,Ju=EA(I0);function EA(e){return e&&e.__esModule?e:{default:e}}function sj(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(sj=function(i){return i?n:t})(e)}function Zwe(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||Qh(e)!=="object"&&typeof e!="function")return{default:e};var n=sj(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}function PM(e,t){return tEe(e)||eEe(e,t)||Qwe(e,t)||Jwe()}function Jwe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qwe(e,t){if(e){if(typeof e=="string")return FM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FM(e,t)}}function FM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function em(e){return em=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},em(e)}function gr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var jr={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},Oa=jr.mouse,O0=function(e){iEe(n,e);var t=aEe(n);function n(){var r;nEe(this,n);for(var i=arguments.length,a=new Array(i),o=0;o not mounted on DragStart!");var u=l.ownerDocument;if(!(r.props.disabled||!(s.target instanceof u.defaultView.Node)||r.props.handle&&!(0,rn.matchesSelectorAndParentsTo)(s.target,r.props.handle,l)||r.props.cancel&&(0,rn.matchesSelectorAndParentsTo)(s.target,r.props.cancel,l))){s.type==="touchstart"&&s.preventDefault();var c=(0,rn.getTouchIdentifier)(s);r.setState({touchIdentifier:c});var d=(0,Ia.getControlPosition)(s,c,an(r));if(d!=null){var p=d.x,f=d.y,h=(0,Ia.createCoreData)(an(r),p,f);(0,Ju.default)("DraggableCore: handleDragStart: %j",h),(0,Ju.default)("calling",r.props.onStart);var m=r.props.onStart(s,h);m===!1||r.mounted===!1||(r.props.enableUserSelectHack&&(0,rn.addUserSelectStyles)(u),r.setState({dragging:!0,lastX:p,lastY:f}),(0,rn.addEvent)(u,Oa.move,r.handleDrag),(0,rn.addEvent)(u,Oa.stop,r.handleDragStop))}}}),gr(an(r),"handleDrag",function(s){var l=(0,Ia.getControlPosition)(s,r.state.touchIdentifier,an(r));if(l!=null){var u=l.x,c=l.y;if(Array.isArray(r.props.grid)){var d=u-r.state.lastX,p=c-r.state.lastY,f=(0,Ia.snapToGrid)(r.props.grid,d,p),h=PM(f,2);if(d=h[0],p=h[1],!d&&!p)return;u=r.state.lastX+d,c=r.state.lastY+p}var m=(0,Ia.createCoreData)(an(r),u,c);(0,Ju.default)("DraggableCore: handleDrag: %j",m);var S=r.props.onDrag(s,m);if(S===!1||r.mounted===!1){try{r.handleDragStop(new MouseEvent("mouseup"))}catch{var y=document.createEvent("MouseEvents");y.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),r.handleDragStop(y)}return}r.setState({lastX:u,lastY:c})}}),gr(an(r),"handleDragStop",function(s){if(r.state.dragging){var l=(0,Ia.getControlPosition)(s,r.state.touchIdentifier,an(r));if(l!=null){var u=l.x,c=l.y;if(Array.isArray(r.props.grid)){var d=u-r.state.lastX||0,p=c-r.state.lastY||0,f=(0,Ia.snapToGrid)(r.props.grid,d,p),h=PM(f,2);d=h[0],p=h[1],u=r.state.lastX+d,c=r.state.lastY+p}var m=(0,Ia.createCoreData)(an(r),u,c),S=r.props.onStop(s,m);if(S===!1||r.mounted===!1)return!1;var y=r.findDOMNode();y&&r.props.enableUserSelectHack&&(0,rn.removeUserSelectStyles)(y.ownerDocument),(0,Ju.default)("DraggableCore: handleDragStop: %j",m),r.setState({dragging:!1,lastX:NaN,lastY:NaN}),y&&((0,Ju.default)("DraggableCore: Removing handlers"),(0,rn.removeEvent)(y.ownerDocument,Oa.move,r.handleDrag),(0,rn.removeEvent)(y.ownerDocument,Oa.stop,r.handleDragStop))}}}),gr(an(r),"onMouseDown",function(s){return Oa=jr.mouse,r.handleDragStart(s)}),gr(an(r),"onMouseUp",function(s){return Oa=jr.mouse,r.handleDragStop(s)}),gr(an(r),"onTouchStart",function(s){return Oa=jr.touch,r.handleDragStart(s)}),gr(an(r),"onTouchEnd",function(s){return Oa=jr.touch,r.handleDragStop(s)}),r}return rEe(n,[{key:"componentDidMount",value:function(){this.mounted=!0;var i=this.findDOMNode();i&&(0,rn.addEvent)(i,jr.touch.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.findDOMNode();if(i){var a=i.ownerDocument;(0,rn.removeEvent)(a,jr.mouse.move,this.handleDrag),(0,rn.removeEvent)(a,jr.touch.move,this.handleDrag),(0,rn.removeEvent)(a,jr.mouse.stop,this.handleDragStop),(0,rn.removeEvent)(a,jr.touch.stop,this.handleDragStop),(0,rn.removeEvent)(i,jr.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,rn.removeUserSelectStyles)(a)}}},{key:"findDOMNode",value:function(){var i,a,o;return(i=this.props)!==null&&i!==void 0&&i.nodeRef?(a=this.props)===null||a===void 0||(o=a.nodeRef)===null||o===void 0?void 0:o.current:Xwe.default.findDOMNode(this)}},{key:"render",value:function(){return Uw.cloneElement(Uw.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}]),n}(Uw.Component);R0.default=O0;gr(O0,"displayName","DraggableCore");gr(O0,"propTypes",{allowAnyClick:Yn.default.bool,disabled:Yn.default.bool,enableUserSelectHack:Yn.default.bool,offsetParent:function(t,n){if(t[n]&&t[n].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:Yn.default.arrayOf(Yn.default.number),handle:Yn.default.string,cancel:Yn.default.string,nodeRef:Yn.default.object,onStart:Yn.default.func,onDrag:Yn.default.func,onStop:Yn.default.func,onMouseDown:Yn.default.func,scale:Yn.default.number,className:$w.dontSetMe,style:$w.dontSetMe,transform:$w.dontSetMe});gr(O0,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1});(function(e){function t(F){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},t(F)}Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return u.default}}),e.default=void 0;var n=h(q),r=p(wm),i=p(d2),a=p(ywe),o=xt,s=Ui,l=zi,u=p(R0),c=p(I0),d=["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"];function p(F){return F&&F.__esModule?F:{default:F}}function f(F){if(typeof WeakMap!="function")return null;var R=new WeakMap,G=new WeakMap;return(f=function(K){return K?G:R})(F)}function h(F,R){if(!R&&F&&F.__esModule)return F;if(F===null||t(F)!=="object"&&typeof F!="function")return{default:F};var G=f(R);if(G&&G.has(F))return G.get(F);var Z={},K=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var ce in F)if(ce!=="default"&&Object.prototype.hasOwnProperty.call(F,ce)){var ye=K?Object.getOwnPropertyDescriptor(F,ce):null;ye&&(ye.get||ye.set)?Object.defineProperty(Z,ce,ye):Z[ce]=F[ce]}return Z.default=F,G&&G.set(F,Z),Z}function m(){return m=Object.assign||function(F){for(var R=1;R=0)&&Object.prototype.propertyIsEnumerable.call(F,Z)&&(G[Z]=F[Z])}return G}function y(F,R){if(F==null)return{};var G={},Z=Object.keys(F),K,ce;for(ce=0;ce=0)&&(G[K]=F[K]);return G}function g(F,R){var G=Object.keys(F);if(Object.getOwnPropertySymbols){var Z=Object.getOwnPropertySymbols(F);R&&(Z=Z.filter(function(K){return Object.getOwnPropertyDescriptor(F,K).enumerable})),G.push.apply(G,Z)}return G}function v(F){for(var R=1;R Xiaohan Zou's Portfolio - + diff --git a/markdown/about-me.md b/markdown/about-me.md index 2761391b..d633da52 100644 --- a/markdown/about-me.md +++ b/markdown/about-me.md @@ -2,11 +2,11 @@ ## Biography -Hey there! I received my master's degree in [Computer Science](https://www.bu.edu/cs/) at [Boston University](https://www.bu.edu/) and bachelor's degree in [Software Engineering](http://sse.tongji.edu.cn/) at [Tongji University](https://www.tongji.edu.cn/). +Hey there! I am a PhD student at the [Computer Science and Engineering](https://www.eecs.psu.edu/) department of [Pennsylvania State University](https://www.psu.edu/). Previously, I received my master's degree in [Computer Science](https://www.bu.edu/cs/) at [Boston University](https://www.bu.edu/) and bachelor's degree in [Software Engineering](http://sse.tongji.edu.cn/) at [Tongji University](https://www.tongji.edu.cn/). I'm trying to find a balance between research and engineering. -My current research interests lie primarily in understanding and improving continuity, generalizability, efficiency and other key properties of machine learning. I'm also interested in vision-language and video models. +My current research interests lie primarily in understanding and improving continuity, generalizability, efficiency and other key properties of machine learning. I am also interested in vision-language and video models. I'm also learning web development and building machine learning softwares and systems.