ryugi-artifacts 1.103.1 → 1.103.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +5 -5
- package/dist/document-host.cjs +1 -1
- package/dist/runtime/deck/{embed-CcbYYWxd.js → embed-DRPOUKsk.js} +1 -1
- package/dist/runtime/deck/{open-yuM77vw2.js → open-CoGdPanV.js} +9 -0
- package/dist/runtime/ryugi-deck.js +33 -23
- package/dist/server.cjs +55 -55
- package/dist/viewer/{SlidesLayout-BKPSVM9Q.js → SlidesLayout-B1JTgUF3.js} +2 -2
- package/dist/viewer/WhiteboardLayout-BXSq3hNU.css +1 -0
- package/dist/viewer/WhiteboardLayout-Dnahdu0L.js +4 -0
- package/dist/viewer/index.js +2 -2
- package/package.json +1 -1
- package/dist/viewer/WhiteboardLayout-B6E-yN7C.js +0 -4
package/dist/viewer/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./AgentStatusPill-DAWtJa6j.js","./rolldown-runtime-XKyaHtl9.js","./route-B6Gy6qbG.js","./bem-vbke-3KC.js","./react-DlmbjZJV.js","./jsx-runtime-LKYXHABd.js","./types-DAs-xbqr.js","./index2.css","./PhoneSheet-Dw5FZaWB.js","./labels-CzulV_px.js","./url-D_8ADw-d.js","./mergeRefs-BoWyGCK7.js","./MotionConfigContext-B3czw3wn.js","./useLayerZIndex-DtrqDMJQ.js","./is-html-element-DvgHo_1h.js","./arrow-up-kdcWAnXX.js","./stable-D2Sem6Uq.js","./icons-C1X6qzJA.js","./Center-BYaMwBHF.js","./index5.css","./BottomSheet-DVLNZy5T.js","./motion-Cy65kd7X.js","./tokens.stylex-BC4Dqomt.js","./read-resolutions-BjoBXBzQ.js","./useMedia-CFebB4XU.js","./titlePrefix-DBqLIMmC.js","./DaemonDock-DxvtHALU.js","./arrow-up-right-DsiCnDly.js","./minus-DceUlv_8.js","./auto-publish-BGoEgSGM.js","./cloud-upload-DClbwO_k.js","./useCloudStatus-xw4KCWoj.js","./api-D1I2xerd.js","./settings-Bro-1ju5.js","./Avatar-giPMMmND.js","./isElementDisabled-DWHaZxJe.js","./maximize-2-BEWXAYRs.js","./Segmented-DFRuZpmD.js","./CompositeItem-StolddT2.js","./CloudLegalNotice-B5qaVKhN.js","./preference-oNdcNeml.js","./urls-QTt_JckQ.js","./ArtboardLayout-C3GCvPqI.js","./view-BWqPE5uB.js","./rounds-BLj-tfMG.js","./sliders-horizontal-BD0nAOF2.js","./Canvas-PYYIhPGi.js","./cssVar.stylex-CGbpAC1Y.js","./WritingCursor-BKFBNgii.js","./PlaybackIcon-CRhSd8TP.js","./elements-Coqr6-Yv.js","./snap-DsYxYv3g.js","./Popover-CJ0gdqcV.js","./parseTrigger-DZ1BZooT.js","./Select-DpNyeTVM.js","./SelectScrollUpArrow-fWLS3TrK.js","./stringifyLocale-Dx2d4AZJ.js","./Input-BtshT4F-.js","./PhoneArtboardBar-KfL9gZmt.js","./DropdownMenu-RmsRgmip.js","./MenuTrigger-CehTuNUM.js","./crop-encode-B2y3y2Tu.js","./ActionIcon-DG4GtZnA.js","./ellipsis-BN0LovOQ.js","./ThreadView-DkD9riIW.js","./type-DA3yqyzM.js","./folder-DAgV-D-C.js","./PublishMenu-DhM6f1OB.js","./lock-BT0nNVMN.js","./globe-IX-8l1m2.js","./link-2-CdvyBGG6.js","./usePageQuery-h2vHVMBa.js","./ruler-C-6kncvn.js","./image-DSbKs3OG.js","./mouse-pointer-2-FWjclmSy.js","./play-BT1pPvq4.js","./useTypeFavicon-yXOsFZBx.js","./type-icons-CxYXZlMj.js","./ActionBar-C1NZNCed.js","./CommentPopover-Bknl07N5.js","./file-text-CBItcVAp.js","./GroupVerdict-_SSrXi_d.js","./artifact-list-jCg51-uV.js","./film-DVL7eEoM.js","./chevron-left-BwjnhkoQ.js","./selection-BWCQd_Fn.js","./useArtifactFeed-CybMPkiU.js","./ArtboardLayout-DLyi-yDq.css","./ArtifactList-DwIi9u0A.js","./search-ClR54veT.js","./plus-DOEIgzPd.js","./RyugiMark-BEeVxWmj.js","./WarningsBadge-C-GtoU_2.js","./DocumentLayout-BdqPj5rB.js","./StoryboardLayout-B64w5_fa.js","./useStoryboardData-DTrVGTKZ.js","./useSandboxFrame-CJmSnwgG.js","./clapperboard-BOY4Zk3L.js","./video-AtRALBjj.js","./message-square-D1ap_NhC.js","./upload-Prmd81Mo.js","./DraggablePanel-Dzau7cJ9.js","./trash-BZS14NA2.js","./zoom-out-DsqNailP.js","./StoryboardRender-D--GwVc5.js","./PreviewArtifactLayout-5vJjhU_q.js","./monitor-Clr3Uc8A.js","./rotate-cw-Cj00Ku5M.js","./SideDrawer-CcVLCyxN.js","./ReportLayout-DsbF0IvL.js","./rotate-ccw-clock-CzXnXfrp.js","./HtmlLayout-D__lgqX6.js","./SlidesLayout-
|
|
2
|
-
import{n as e,r as t}from"./rolldown-runtime-XKyaHtl9.js";import{C as n,_ as r,g as i,h as a,m as o,n as s,o as c,p as l,t as u,v as d,y as f}from"./route-B6Gy6qbG.js";/* empty css */import{$ as p,An as m,Ar as h,At as g,Bt as _,Cr as v,Ct as y,D as b,Dn as x,Dt as S,Et as C,Fn as w,Ft as T,Gn as E,Gt as D,H as O,Ht as k,It as A,Jn as j,Kt as M,Ln as ee,Lt as te,Mt as N,Nn as ne,Nt as re,Ot as ie,Pn as ae,Pt as oe,Q as se,Rn as ce,S as le,Sr as ue,St as de,T as fe,Tr as pe,Tt as me,U as he,Ut as P,Vt as ge,W as _e,Wn as ve,Wt as ye,_t as be,at as F,bn as xe,bt as Se,dt as Ce,et as we,ft as Te,gt as Ee,h as De,ht as Oe,ir as ke,it as Ae,jn as je,jt as Me,kt as Ne,l as Pe,m as Fe,mt as Ie,nt as Le,on as Re,ot as I,pt as ze,qn as Be,r as Ve,rt as He,st as Ue,tt as We,vn as Ge,vt as Ke,wr as qe,wt as Je,x as Ye,xn as Xe,xr as Ze,xt as Qe,yn as $e,yt as et,zt as tt}from"./url-D_8ADw-d.js";import{$ as nt,K as rt,Q as it,U as at,at as L,c as ot,ct as st,it as ct,l as lt,o as ut,ot as R,r as dt,rt as ft,s as pt,u as mt}from"./mergeRefs-BoWyGCK7.js";import{n as ht,r as z,t as gt}from"./bem-vbke-3KC.js";import{t as _t}from"./react-DlmbjZJV.js";import{Dn as vt,Ft as yt,J as bt,Jn as xt,Mt as St,Nt as Ct,Q as wt,Rn as Tt,Tn as Et,Vt as Dt,an as Ot,b as kt,bn as At,g as jt,in as Mt,n as Nt,on as Pt,rn as Ft,t as It,wn as Lt,x as Rt}from"./useLayerZIndex-DtrqDMJQ.js";import{t as zt}from"./jsx-runtime-LKYXHABd.js";import{$ as Bt,B as Vt,Ct as Ht,G as Ut,I as Wt,J as Gt,M as Kt,N as qt,P as Jt,St as Yt,Tt as Xt,U as B,W as V,_t as Zt,a as Qt,bt as $t,c as en,ct as tn,d as nn,dt as H,et as rn,gt as an,h as on,ht as sn,i as cn,l as ln,m as un,mt as dn,o as fn,p as pn,r as mn,s as hn,st as gn,t as _n,u as vn,ut as yn,wt as bn,xt as xn}from"./MotionConfigContext-B3czw3wn.js";import{$ as Sn,$n as Cn,$t as wn,A as Tn,An as En,At as Dn,B as On,Bn as kn,Bt as An,C as jn,Cn as Mn,Cr as Nn,Ct as Pn,D as Fn,Dn as In,Dt as Ln,E as Rn,En as zn,Et as Bn,F as Vn,Fn as Hn,Ft as Un,G as Wn,Gn,Gt as Kn,H as qn,Hn as Jn,Ht as Yn,I as Xn,In as Zn,It as Qn,J as $n,Jn as er,Jt as tr,K as nr,Kn as rr,Kt as ir,L as ar,Ln as or,Lt as sr,M as cr,Mn as lr,Mt as ur,N as dr,Nn as fr,Nt as pr,O as mr,On as hr,Ot as gr,P as _r,Pn as vr,Pt as yr,Q as br,Qn as xr,Qt as Sr,R as Cr,Rn as wr,Rt as Tr,S as Er,Sn as Dr,Sr as Or,St as kr,T as Ar,Tn as jr,Tr as Mr,Tt as Nr,U as Pr,Un as Fr,Ut as Ir,V as Lr,Vn as Rr,Vt as zr,W as Br,Wn as Vr,Wt as Hr,X as Ur,Xn as Wr,Xt as Gr,Y as Kr,Yn as qr,Yt as Jr,Z as Yr,Zn as Xr,Zt as Zr,_ as Qr,_n as $r,_r as ei,_t as ti,a as ni,an as ri,ar as ii,at as ai,b as oi,bn as si,br as U,bt as ci,c as li,cn as ui,cr as di,ct as fi,d as pi,dn as mi,dr as hi,dt as gi,en as _i,er as vi,et as yi,f as bi,fn as xi,fr as Si,ft as Ci,g as wi,gn as Ti,gr as Ei,gt as Di,h as Oi,hn as ki,ht as Ai,i as ji,in as Mi,ir as Ni,it as Pi,j as Fi,jn as Ii,jt as Li,k as Ri,kn as zi,kt as Bi,l as Vi,ln as Hi,lr as Ui,lt as Wi,m as Gi,mn as Ki,mt as qi,n as Ji,nn as Yi,nr as Xi,nt as Zi,o as Qi,on as $i,or as ea,ot as ta,p as na,pn as ra,pt as ia,q as aa,qn as oa,qt as sa,r as ca,rn as la,rr as ua,rt as da,s as fa,sn as pa,sr as ma,st as ha,t as ga,tn as _a,tr as va,tt as ya,u as ba,un as xa,ur as Sa,ut as Ca,v as wa,vn as Ta,vr as Ea,vt as Da,w as Oa,wn as ka,wr as Aa,wt as ja,x as Ma,xn as Na,xr as Pa,xt as Fa,y as Ia,yn as La,yr as Ra,yt as za,z as Ba,zn as Va,zt as Ha}from"./elements-Coqr6-Yv.js";import{t as Ua}from"./is-html-element-DvgHo_1h.js";var Wa={name:`circle-check-big`,size:24,node:[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]],aliases:[`check-circle`]};Wa.node;var Ga=Xt(Wa),Ka={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};Ka.node;var qa=Xt(Ka);function Ja(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}function Ya(e,t,n){return Mr(e.getProps(),t,n,e)}var Xa=(e,t)=>t===`exit`?e.presenceContext?.custom:void 0,Za=e=>Array.isArray(e);function Qa(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,un(n))}function $a(e){return Za(e)?e[e.length-1]||0:e}function eo(e,t){let{transitionEnd:n={},transition:r={},...i}=Ya(e,t)||{};i={...i,...n};for(let t in i)Qa(e,t,$a(i[t]))}function to(e){return!!(nn(e)&&e.add)}function no(e,t){let n=e.getValue(`willChange`);if(to(n))return n.add(t);if(!n&&$t.WillChange){let n=new $t.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function ro(e){return e.props[Aa]}var io=typeof window<`u`;function ao({protectedKeys:e,needsAnimating:t},n){let r=n in e&&!t[n];return t[n]=!1,r}function oo(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?te(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState?.getState()[i],p=a?.path;p&&(p.animateValues?p.animateValues(t=>e.getValue(t,e.latestValues[t]??0),s,a,n,d):p.animateVisualElement?.(e,s,a,n,d));for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&ao(f,t))continue;let o={delay:n,...A(f?.out[t]||a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){V.update(()=>r.set(i));continue}let p=!1;if(io&&window.MotionHandoffAnimation){let n=ro(e);if(n){let e=window.MotionHandoffAnimation(n,t,V);e!==null&&(o.startTime=e,p=!0)}}no(e,t);let m=l??e.shouldReduceMotion;r.run(T(t,r,i,m&&re.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>V.update(()=>{o&&eo(e,o)});d.length?Promise.all(d).then(t):t()}return d}function so(e,t,n={}){let r=Ya(e,t,Xa(e,n.type)),i=n.transitionOverride||(r?.transition??(e.getDefaultTransition()||{})),a=()=>Promise.all(r?oo(e,r,n):[]),o=(r=0)=>{let{variantChildren:a}=e,{delayChildren:o=0,staggerChildren:s,staggerDirection:c}=i,l=[];return a?.forEach(e=>{e.notify(`AnimationStart`,t),l.push(so(e,t,{...n,delay:r+(typeof o==`function`?0:o)+Ja(a,e,o,s,c)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(l)},{when:s}=i;return s?s===`beforeChildren`?a().then(()=>o()):o().then(a):Promise.all([a(),o(n.delay)])}function co(e,t,n={}){return e.notify(`AnimationStart`,t),(Array.isArray(t)?Promise.all(t.map(t=>so(e,t,n))):typeof t==`string`?so(e,t,n):Promise.all(oo(e,Ya(e,t,n.custom),n))).then(()=>{e.notify(`AnimationComplete`,t)})}var lo=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`],uo={value:null,addProjectionMetrics:null,countProjection:void 0};function fo(e,t){let n=yn.now();e=g(e);let r=({timestamp:i})=>{let a=i-n;a>=t&&(B(r),e(a-t))};return V.setup(r,!0),Ne(()=>B(r))}function po(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function mo(e){return Me(e)&&e.tagName===`svg`}var ho=e=>typeof e==`number`?e:parseFloat(e),go=lo.length,_o=e=>typeof e==`number`||rn.test(e);function vo(e,t,n,r,i,a){i?(e.opacity=P(0,n.opacity??1,bo(r)),e.opacityExit=P(t.opacity??1,0,xo(r))):a&&(e.opacity=P(t.opacity??1,n.opacity??1,r));for(let i=0;i<go;i++){let a=lo[i],o=yo(t,a),s=yo(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||_o(o)===_o(s)?(e[a]=Math.max(P(ho(o),ho(s),r),0),(Bt.test(s)||Bt.test(o))&&(e[a]+=`%`)):e[a]=s)}for(let i=0;i<Se.length;i++){let a=Se[i];(t[a]||n[a])&&(e[a]=P(t[a]||0,n[a]||0,r))}}function yo(e,t){return e[t]===void 0?e.borderRadius:e[t]}var bo=So(0,.5,ye),xo=So(.5,.95,Zt);function So(e,t,n){return r=>r<e?0:r>t?1:n(D(e,t,r))}var Co=(e,t,{x:n,y:r})=>{let i=e*e+t*t;return i<1?0:-1e3*(n*e+r*t)/i},wo=(e,t=300)=>{let n=xn(.25,2,t/300),{stiffness:r,damping:i}=_({...e,duration:e.duration&&sn(e.duration)});return{...e,stiffness:r,damping:i*Math.sqrt(n),mass:n}};function To(e,t){e.min=t.min,e.max=t.max}function W(e,t){To(e.x,t.x),To(e.y,t.y)}function Eo(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Do=.9999,Oo=1.0001,ko=-.01,Ao=.01;function G(e){return e.max-e.min}function jo(e,t,n){return Math.abs(e-t)<=n}function Mo(e,t,n,r=.5){e.origin=r,e.originPoint=P(t.min,t.max,e.origin),e.scale=G(n)/G(t),e.translate=P(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Do&&e.scale<=Oo||isNaN(e.scale))&&(e.scale=1),(e.translate>=ko&&e.translate<=Ao||isNaN(e.translate))&&(e.translate=0)}function No(e,t,n,r){Mo(e.x,t.x,n.x,r?.originX),Mo(e.y,t.y,n.y,r?.originY)}function Po(e,t,n,r=0){e.min=(r?P(n.min,n.max,r):n.min)+t.min,e.max=e.min+G(t)}function Fo(e,t,n,r){Po(e.x,t.x,n.x,r?.x),Po(e.y,t.y,n.y,r?.y)}function Io(e,t,n,r=0){let i=r?P(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+G(t)}function Lo(e,t,n,r){Io(e.x,t.x,n.x,r?.x),Io(e.y,t.y,n.y,r?.y)}function Ro(e,t,n,r,i){return e-=t,e=be(e,1/n,r),i!==void 0&&(e=be(e,1/i,r)),e}function zo(e,t=0,n=1,r=.5,i,a=e,o=e){if(Bt.test(t)&&(t=parseFloat(t),t=P(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=P(a.min,a.max,r);e===a&&(s-=t),e.min=Ro(e.min,t,n,s,i),e.max=Ro(e.max,t,n,s,i)}function Bo(e,t,[n,r,i],a,o){zo(e,t[n],t[r],t[i],t.scale,a,o)}var Vo=[`x`,`scaleX`,`originX`],Ho=[`y`,`scaleY`,`originY`];function Uo(e,t,n,r){Bo(e.x,t,Vo,n?.x,r?.x),Bo(e.y,t,Ho,n?.y,r?.y)}var Wo=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Go=Wo(`applewebkit/`)&&!Wo(`chrome/`)?Math.round:Zt;function Ko(e){e.min=Go(e.min),e.max=Go(e.max)}function qo(e){Ko(e.x),Ko(e.y)}function Jo(e){return e.translate===0&&e.scale===1}function Yo(e){return Jo(e.x)&&Jo(e.y)}function Xo(e,t){return e.min===t.min&&e.max===t.max}function Zo(e,t){return Xo(e.x,t.x)&&Xo(e.y,t.y)}function Qo(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function $o(e,t){return Qo(e.x,t.x)&&Qo(e.y,t.y)}function es(e){return G(e.x)/G(e.y)}function ts(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var ns=class{constructor(){this.members=[]}add(e){Yt(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;r&&r.isConnected!==!1||n.snapshot||(bn(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(bn(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}};function rs(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var is={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(rn.test(e))e=parseFloat(e);else return e}return`${rs(e,t.target.x)}% ${rs(e,t.target.y)}%`}},as={borderRadius:Object.assign({},is,{applyTo:lo.slice()}),borderTopLeftRadius:is,borderTopRightRadius:is,borderBottomLeftRadius:is,borderBottomRightRadius:is,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=Gt.parse(e);if(i.length>5)return r;let a=Gt.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=P(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}}};function os(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;(i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `);let s=``;if(n){let{transformPerspective:e}=n;e&&(r=`perspective(${e}px) ${r}`);for(let e=0;e<Se.length;e++){let t=Se[e],r=n[t];r&&(s+=`${t}(${r}deg) `),!e&&n.pathRotation&&(s+=`rotate(${n.pathRotation}deg) `)}}if(s){(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),r+=s;let n=e.x.scale*t.x,i=e.y.scale*t.y;(n!==1||i!==1)&&(r+=`scale(${n}, ${i})`)}else e.x.scale!==1||e.y.scale!==1?r+=`scale(${e.x.scale}, ${e.y.scale})`:r||t.x===1&&t.y===1||(r=`scale(1, 1)`);return r||`none`}function K(e){return[e(`x`),e(`y`)]}var ss=(e,t)=>e.depth-t.depth,cs=class{constructor(){this.children=[],this.isDirty=!1}add(e){Yt(this.children,e),this.isDirty=!0}remove(e){bn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ss),this.isDirty=!1,this.children.forEach(e)}},ls={hasAnimatedSinceResize:!0,hasEverUpdated:!1},us=[`z`,`skew`,`skewZ`],ds=1e3,fs=0;function ps(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}var ms=e=>e.instance&&on.get(e.instance)?.demote()&&e.resetSkewAndRotation();function hs(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=ro(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,V,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&hs(r)}function gs(e){if(e)return e.options.allowProjection===!1?gs(e.parent):e.projection}function _s({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return Object.assign(Nn,{...as,...Nn}),class{static create(e,t,n){let{layoutId:r,layout:i,drag:a,dragConstraints:o,layoutScroll:s,layoutRoot:c,layoutAnchor:l,layoutCrossfade:u}=t,d=e.projection=new this(e.latestValues,t[`data-framer-portal-id`]?void 0:gs(e.parent));d.setOptions({layoutId:r,layout:i,alwaysMeasureLayout:!!a||o&&po(o),visualElement:e,animationType:typeof i==`string`?i:`both`,initialPromotionConfig:n,crossfade:u,layoutScroll:s,layoutRoot:c,layoutAnchor:l});let f=d.getStack()?.lead;f&&!d.root.isUpdateBlocked()&&(f.willUpdate(),f.scheduleCheckAfterUnmount())}constructor(e={},n=t?.()){this.id=fs++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(bs),this.nodes.forEach(js),this.nodes.forEach(Ms),this.nodes.forEach(xs),uo.countProjection?.()},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new cs)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new an),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){this.eventHandlers.get(e)?.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=Me(t)&&!mo(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent?.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;V.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n?.(),n=fo(i,250),ls.hasAnimatedSinceResize&&(ls.hasAnimatedSinceResize=!1,this.nodes.forEach(As)))})}n&&this.root.registerSharedNode(n,this),this.addLayoutListener()}addLayoutListener(){let{layoutId:e,layout:t,visualElement:n,animate:r}=this.options;this.instance&&!this.hasLayoutListener&&r!==!1&&n&&(e||t)&&(this.hasLayoutListener=!0,this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:r,layout:i})=>{if(this.isAnimationBlocked){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||n.getDefaultTransition()||zs,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=n.getProps(),c=!this.targetLayout||!$o(this.targetLayout,i),l=!t&&r;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...A(a,`layout`),onPlay:o,onComplete:s};(n.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||As(this),this.isLead()&&this.options.onExitComplete?.();this.targetLayout=i}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),this.getStack()?.remove(this),this.parent?.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),this.hasLayoutListener=!1,B(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes?.forEach(Ns),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete?.();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&hs(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;ms(this),this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,ms(t),(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1),t.isAnimationBlocked&&(t.dragSnapshot||=t.measure(),this.dragAncestor=t)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(ws),this.nodes.forEach(Cs);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ts);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ds),this.nodes.forEach(Os),this.nodes.forEach(ks),this.nodes.forEach(vs),this.nodes.forEach(ys)):this.nodes.forEach(Ts),this.clearAllSnapshots();let e=yn.now();H.delta=xn(0,1e3/60,e-H.timestamp),H.timestamp=e,H.isProcessing=!0,Ut.update.process(H),Ut.preRender.process(H),Ut.render.process(H),H.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,hn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ss),this.sharedNodes.forEach((e,t)=>e.members.length?e.removeLeadSnapshot():this.sharedNodes.delete(t))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,V.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){V.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!G(this.snapshot.measuredBox.x)&&!G(this.snapshot.measuredBox.y)&&(this.snapshot=void 0),this.snapshot)){let{visualElement:e}=this.options,t=this.currentAnimation?.state===`running`,n=t&&this.animationEdges;t&&this.relativeTarget&&(this.snapshot.relativeVelocity=this.relativeVelocity?.slice()||[]);let r=n&&this.motionValue?.getVelocity()||0,i=[0,1,2,3,4,5].map(t=>(t<4?n&&(this.edgeValues?this.edgeVelocity(t):-n[t]*r/1e3):e?.getValue(t<5?`x`:`y`)?.getVelocity())||0);i.some(Boolean)&&(this.snapshot.velocity=i)}}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected||=U(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t?.notify(`LayoutMeasure`,this.layout.layoutBox,e?.layoutBox)}updateScroll(e=`measure`){let{scroll:t,instance:i}=this,{animationId:a}=this.root;if(this.options.layoutScroll&&i&&!(t&&t.animationId===a&&t.phase===e)){let o=r(i);this.scroll={animationId:a,phase:e,isRoot:o,offset:n(i),wasRoot:t?t.isRoot:o}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout;e&&ms(this);let t=this.projectionDelta&&!Yo(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Je(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),qo(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return U();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Hs))){let{scroll:e}=this.root;e&&(et(t.x,e.offset.x),et(t.y,e.offset.y))}return t}removeElementScroll(e){let t=U();if(W(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&W(t,e),et(t.x,i.offset.x),et(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n,r,i=0){let a=n||U();W(a,e);for(let e=i;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(et(a.x,-n.scroll.offset.x),et(a.y,-n.scroll.offset.y)),Je(n.latestValues)&&Ke(a,n.latestValues,n.layout?.layoutBox)}return!r&&Je(this.latestValues)&&Ke(a,this.latestValues,this.layout?.layoutBox),a}removeTransform(e){let t=U();W(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!Je(n.latestValues))continue;let r;n.instance&&(y(n.latestValues)&&n.updateSnapshot(),r=U(),W(r,n.measurePageBox())),Uo(t,n.latestValues,n.snapshot?.layoutBox,r)}return Je(this.latestValues)&&Uo(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade},this.addLayoutListener()}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==H.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=H.timestamp;let a=this.getClosestProjectingParent();!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=U(),this.targetWithTransforms=U()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Fo(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target,!0):W(this.target,this.layout.layoutBox),Oe(this.target,this.targetDelta)):W(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&(!a.resumingFrom==!this.resumingFrom||a.options.layoutRoot&&!a.resumingFrom)&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),uo.countProjection?.(1))}getClosestProjectingParent(){if(!(!this.parent||y(this.parent.latestValues)||Qe(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=U(),this.relativeTargetOrigin=U(),Lo(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),W(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===H.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent?.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;W(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Ee(this.layoutCorrected,this.treeScale,this.path,t&&(e.relativeTarget&&!e.relativeParent.resumingFrom?e.relativeParent:!0)),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=U());let{target:s}=e;s?(!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Eo(this.prevProjectionDelta.x,this.projectionDelta.x),Eo(this.prevProjectionDelta.y,this.projectionDelta.y)),No(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===a&&this.treeScale.y===o&&ts(this.projectionDelta.x,this.prevProjectionDelta.x)&&ts(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),uo.countProjection?.(2)):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){this.options.visualElement?.scheduleRender(),e&&this.getStack()?.scheduleRender(),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Pa(),this.projectionDelta=Pa(),this.projectionDeltaWithTransform=Pa()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=Pa();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=U(),c=r?.source!==this.layout?.source,l=this.getStack(),u=!l||l.members.length<=1,d=!(!c||u||this.options.crossfade!==!0||this.path.some(Rs));this.animationProgress=0;let f,p=n?.interpolateProjection(e),m=this.layout?.layoutBox,h=m&&[m.x.min,m.x.max,m.y.min,m.y.max].map((t,n)=>{let{translate:r,scale:i,originPoint:a}=e[n<2?`x`:`y`];return(t-a)*(i-1)+r});h?.every(isFinite)||(h=void 0),this.animationEdges=h,this.edgeValues=this.startVelocity=this.impulse=this.relativeVelocity=this.relativeStart=void 0;let g=r?.velocity,_=r?.relativeVelocity||g;if(_?.slice(0,4).some(Boolean)&&this.getClosestProjectingParent()&&(this.relativeStart=_),g&&h){let t=g.slice(0,4).map((e,t)=>e+(c?g[4+(t>>1)]:0));t.some(Boolean)&&(this.startVelocity=p?Co(e.x.translate,e.y.translate,{x:(t[0]+t[1])/2,y:(t[2]+t[3])/2}):t)}this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n),l=this.edgeValues;for(let t=0;t<2;t++){let r=t?`y`:`x`;l?Ps(o[r],e[r],this.layout.layoutBox[r],l[t*2],l[t*2+1]):Fs(o[r],e[r],n)}if(r&&(o.x.translate=r.x,o.y.translate=r.y),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){Lo(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0);let e=this.relativeTargetOrigin,t=s;if(Ls(this.relativeTarget,e,t,n),this.isSpringLayout){let e=this.relativeTarget,t=this.impulse||0,n=this.relativeStart,r=yn.now(),i=(r-this.relativeTime)/1e3;this.relativeTime=r;let a=this.relativeVelocity||=[0,0,0,0];for(let r=0;r<4;r++){let o=r<2?`x`:`y`,s=r&1?`max`:`min`;n&&(e[o][s]+=n[r]*t),f&&i>0&&(a[r]=(e[o][s]-f[o][s])/i)}}f&&Zo(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=U(),W(f,this.relativeTarget)}c&&(this.animationValues=a,vo(a,i,this.latestValues,n,d,u)),r?.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`);let t=this.isSpringLayout=e.type===`spring`;this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.resumingFrom&&(this.resumingFrom.edgeValues=void 0),this.pendingAnimation&&=(B(this.pendingAnimation),void 0),this.pendingAnimation=V.update(()=>{ls.hasAnimatedSinceResize=!0,this.motionValue||=un(0),this.motionValue.jump(0,!1);let n=this.startVelocity;this.startVelocity=void 0;let r=e,i=0;if(t){if(e.mass===`auto`){let t=this.layout?.layoutBox;r=wo(e,t&&Math.sqrt(G(t.x)*G(t.y)))}let t=this.relativeStart;if((n||t)&&!e.repeat){if(typeof n==`number`)i=n;else{let e=n&&this.animationEdges;r={...r,type:r=>{let i=[r.velocity,...n||[]].map((t,n)=>ge({...r,keyframes:n?[e[n-1],0]:r.keyframes,velocity:t})),a=i.length;t&&i.push(ge({...r,keyframes:[0,0],velocity:1e3,restDelta:.5,restSpeed:5}));let o=0,s=[],c={calculatedDuration:null,next:t=>{o=t;let n=i[0].next(t),r=n.done;for(let e=1;e<i.length;e++){let{value:n,done:o}=i[e].next(t);e<a?s[e-1]=n:this.impulse=n/1e3,r&&=o}return e&&(this.edgeValues=s),n.done=r,n}};return c.calculatedDuration=k(c),c.next(0),this.edgeVelocity=e=>i[e+1].velocity(o),c}}}}}let a=Ce(this.motionValue,[0,1e3],{...r,velocity:i,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}});this.currentAnimation=a,Vt(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=this.edgeValues=this.edgeVelocity=this.impulse=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.edgeValues=this.impulse=void 0,this.mixTargetDelta?.(ds),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,layout:n,latestValues:r}=e,{target:i}=e;if(t&&i&&n){if(this!==e&&this.layout&&n&&Vs(this.options.animationType,this.layout.layoutBox,n.layoutBox)){let{layoutBox:e}=this.layout,t=i;i=this.target||U(),Bs(i.x,t.x,e.x),Bs(i.y,t.y,e.y)}W(t,i),Ke(t,r),No(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new ns),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?.transition,preserveFollowOpacity:n?.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){this.getStack()?.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){return this.getStack()?.relegate(this)||!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let{latestValues:t}=e;if(!de(t))return;let n={};for(let t=0;t<us.length;t++)ps(us[t],e,n,this.animationValues);for(let t=0;t<Se.length;t++)ps(Se[t],e,n,this.animationValues);e.render();for(let t in n)e.setStaticValue(t,n[t]),this.animationValues&&(this.animationValues[t]=n[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;let n=this.getLead();if(!this.isVisible&&n!==this){e.visibility=`hidden`;return}let r=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=Or(t?.pointerEvents)||``,e.transform=r?r(this.latestValues,``):`none`;return}if(!this.projectionDelta||!this.layout||!n.target){(this.options.layoutId||this.needsShow)&&(this.needsShow=!1,e.visibility=``,e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=Or(t?.pointerEvents)||``),this.hasProjected&&!Je(this.latestValues)&&(e.transform=r?r({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=n.animationValues||n.latestValues;this.applyTransformsToTarget();let a=os(this.projectionDeltaWithTransform,this.treeScale,i);r&&(a=r(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=n.animationValues?n===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:n===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in Nn){if(i[t]===void 0)continue;let{correct:r,applyTo:o,isCSSVariable:s}=Nn[t],c=a===`none`?i[t]:r(i[t],n);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=n===this?Or(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=this.dragSnapshot=this.dragAncestor=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Cs),this.root.sharedNodes.clear()}}}function vs(e){e.updateLayout(),Es(e)}function ys(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source,o=(r,a)=>{if(i===`size`)K(e=>{let t=G(r[e]);r[e].min=a[e].min,r[e].max=r[e].min+t});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;To(r[e],a[e])}else Vs(i,t.layoutBox,n)&&K(t=>{let n=G(a[t]);r[t].max=r[t].min+n,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[t].max=e.relativeTarget[t].min+n)})},s=a?t.measuredBox:t.layoutBox;o(s,n);let c=Pa();No(c,n,t.layoutBox);let l=Pa();No(l,a?e.applyTransform(r,!0):n,s);let u=!Yo(c),d=!1,f=e.getClosestProjectingParent();if((!a||f?.options.layoutRoot&&e.resumeFrom?.path.includes(f))&&f&&!f.resumeFrom){let{snapshot:r,layout:i}=f;if(r&&i){let s=e.options.layoutAnchor||void 0,c=U();Lo(c,a?e.resumeFrom.applyTransform(t.layoutBox,!0,void 0,!0,f.depth+1):t.layoutBox,r.layoutBox,s);let l=U();Lo(l,n,i.layoutBox,s),a&&o(c,l),$o(c,l)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=c,e.relativeParent=f)}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:l,layoutDelta:c,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else e.isLead()&&e.options.onExitComplete?.();e.options.transition=void 0}function bs(e){uo.countProjection?.(0),e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function xs(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Ss(e){e.clearSnapshot()}function Cs(e){e.clearMeasurements()}function ws(e){e.isLayoutDirty=!0,e.updateLayout()}function Ts(e){e.isLayoutDirty=!1}function Es(e){let{snapshot:t,dragAncestor:n}=e,r=n?.isAnimationBlocked&&n.layout;if(!t||!r||e.resumeFrom||e.isAnimationBlocked)return;let i=n.dragSnapshot;K(e=>et(t.layoutBox[e],r.layoutBox[e].min-i.layoutBox[e].min))}function Ds(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.dragSnapshot||e.layout,e.isLayoutDirty=!0)}function Os(e){e.relativeTarget&&e.relativeParent?.isLayoutDirty&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function ks(e){let{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function As(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function js(e){e.resolveTargetDelta()}function Ms(e){e.calcProjection()}function Ns(e){e.resetSkewAndRotation()}function Ps(e,t,n,r,i){let a=n.max-n.min,o=a?Math.max(0,(a+i-r)/a):1,s=e.originPoint=t.originPoint;e.origin=t.origin,e.scale=o,e.translate=n.min+r-(s+(n.min-s)*o)}function Fs(e,t,n){e.translate=P(t.translate,0,n),e.scale=P(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Is(e,t,n,r){e.min=P(t.min,n.min,r),e.max=P(t.max,n.max,r)}function Ls(e,t,n,r){Is(e.x,t.x,n.x,r),Is(e.y,t.y,n.y,r)}function Rs(e){return e.animationValues?.opacityExit!==void 0}var zs={duration:.45,ease:[.4,0,.1,1]};function Bs(e,t,n){e.max=G(n)+(e.min=t.min)}function Vs(e,t,n){return e===`position`||e===`preserve-aspect`&&!jo(es(t),es(n),.2)}function Hs(e){return e!==e.root&&e.scroll?.wasRoot}function Us(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var Ws=_s({attachResizeListener:(e,t)=>Us(e,`resize`,t),measureScroll:Te,checkIsScrollRoot:()=>!0}),Gs=_s({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ra.current){let e=new Ws({});e.mount(window),e.setOptions({layoutScroll:!0}),Ra.current=e}return Ra.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),Ks=class extends Si{constructor(){super(...arguments),this.KeyframeResolver=N}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;nn(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function qs(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function Js(e){return window.getComputedStyle(e)}var Ys=class extends Ks{constructor(){super(...arguments),this.type=`html`,this.renderInstance=qs}mount(e){super.mount(e)}readValueFromInstance(e,t){if(Kt.has(t))return this.projection?.isProjecting?qt(t):Jt(e,t);{let n=Js(e),r=(gn(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Ie(e,t)}build(e,t,n){vn(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return hi(e,t,n)}},Xs=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1;function Zs(e){return{point:{x:e.pageX,y:e.pageY}}}var Qs=e=>t=>Xs(t)&&e(t,Zs(t));function $s(e,t,n,r){return Us(e,t,Qs(n),r)}var ec=new WeakMap,tc,nc=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:Me(r)&&`getBBox`in r?r.getBBox()[t]:r[n],rc=nc(`inline`,`width`,`offsetWidth`),ic=nc(`block`,`height`,`offsetHeight`);function ac({target:e,borderBoxSize:t}){ec.get(e)?.forEach(n=>{n(e,{get width(){return rc(e,t)},get height(){return ic(e,t)}})})}function oc(e){e.forEach(ac)}function sc(){typeof ResizeObserver<`u`&&(tc=new ResizeObserver(oc))}function cc(e,t){tc||sc();let n=ie(e);return n.forEach(e=>{let n=ec.get(e);n||(n=new Set,ec.set(e,n)),n.add(t),tc?.observe(e)}),()=>{n.forEach(e=>{let n=ec.get(e);n?.delete(t),n?.size||tc?.unobserve(e)})}}var lc=new Set,uc;function dc(){uc=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};lc.forEach(t=>t(e))},window.addEventListener(`resize`,uc)}function fc(e){return lc.add(e),uc||dc(),()=>{lc.delete(e),!lc.size&&typeof uc==`function`&&(window.removeEventListener(`resize`,uc),uc=void 0)}}function pc(e,t){return Ne(typeof e==`function`?fc(e):cc(e,t))}var mc=(e,t)=>Math.abs(e-t);function hc(e,t){let n=mc(e.x,t.x),r=mc(e.y,t.y);return Math.sqrt(n**2+r**2)}var gc=new Set([`auto`,`scroll`]),_c=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o,immediate:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=yc(this.lastRawMoveEventInfo,this.transformPagePoint));let e=xc(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=hc(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e;this.history.push({...r,timestamp:yn.now()});let{onStart:i,onMove:a}=this.handlers;t||(i?.(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a?.(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.handleScroll(window),this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=yc(t,this.transformPagePoint),this.hasPendingMove=!0,V.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.hasPendingMove&&this.updatePoint(),this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i?.(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=xc(e.type===`pointercancel`?this.lastMoveEventInfo:yc(t,this.transformPagePoint),this.history);this.startEvent&&n?.(e,a),r?.(e,a)},!Xs(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=s?0:a,this.contextWindow=r||window;let c=Zs(e),l=yc(c,this.transformPagePoint),{point:u}=l;this.history=[{...u,timestamp:yn.now()}];let{onSessionStart:d}=t;d&&d(e,xc(l,this.history));let f={passive:!0,capture:!0};this.removeListeners=M($s(this.contextWindow,`pointermove`,this.handlePointerMove,f),$s(this.contextWindow,`pointerup`,this.handlePointerUp,f),$s(this.contextWindow,`pointercancel`,this.handlePointerUp,f)),o&&this.startScrollTracking(o),s&&(this.handlePointerMove(e,c),this.updatePoint())}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(gc.has(e.overflowX)||gc.has(e.overflowY))&&this.scrollPositions.set(t,vc(t)),t=t.parentElement}this.scrollPositions.set(window,vc(window)),this.removeScrollListeners=M(Us(window,`scroll`,this.onElementScroll,{capture:!0}),Us(window,`scroll`,this.onWindowScroll,{}))}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=vc(e),i={x:r.x-t.x,y:r.y-t.y};(i.x!==0||i.y!==0)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),V.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners?.(),this.removeScrollListeners?.(),this.scrollPositions.clear(),B(this.updatePoint)}},vc=e=>e===window?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop};function yc(e,t){return t?{point:t(e.point)}:e}function bc(e,t){return{x:e.x-t.x,y:e.y-t.y}}function xc({point:e},t){return{point:e,delta:bc(e,Cc(t)),offset:bc(e,Sc(t)),velocity:wc(t,.1)}}function Sc(e){return e[0]}function Cc(e){return e[e.length-1]}function wc(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=Cc(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>sn(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>sn(t)*2&&(r=e[1]);let a=dn(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let 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}var Tc=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function Ec(e){return Tc.has(e.tagName)||e.isContentEditable===!0}var Dc=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function Oc(e){return Dc.has(e.tagName)||e.isContentEditable===!0}var q={x:!1,y:!1};function kc(){return q.x||q.y}function Ac(e){return e===`x`||e===`y`?q[e]?null:(q[e]=!0,()=>{q[e]=!1}):q.x||q.y?null:(q.x=q.y=!0,()=>{q.x=q.y=!1})}function jc(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?P(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?P(n,e,r.max):Math.min(e,n)),e}function Mc(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Nc(e,{top:t,left:n,bottom:r,right:i}){return{x:Mc(e.x,n,i),y:Mc(e.y,t,r)}}function Pc(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Fc(e,t){return{x:Pc(e.x,t.x),y:Pc(e.y,t.y)}}function Ic(e,t){let n=.5,r=G(e),i=G(t);return i>r?n=D(t.min,t.max-r,e.min):r>i&&(n=D(e.min,e.max-i,t.min)),xn(0,1,n)}function Lc(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var Rc=.35;function zc(e=Rc){return e===!1?e=0:e===!0&&(e=Rc),{x:Bc(e,`left`,`right`),y:Bc(e,`top`,`bottom`)}}function Bc(e,t,n){return{min:Vc(e,t),max:Vc(e,n)}}function Vc(e,t){return typeof e==`number`?e:e[t]||0}function Hc(e){let t=``;for(let n of e.path){n.scroll=void 0,n.updateScroll();let{scroll:r}=n;n!==e.root&&r&&(t+=r.offset.x+`,`+r.offset.y+`,`)}return t}var Uc=new WeakMap,Wc=class{constructor(e,t=()=>e.getProps()){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=U(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e,this.readProps=t}start(e,t={}){if(this.visualElement.presenceContext?.isPresent===!1)return;let n=e=>{t.snapToCursor&&this.snapToCursor(e),this.stopAnimation()},r=(e,t)=>{let{drag:n,dragConstraints:r,dragPropagation:i,onDragStart:a}=this.getProps();if(n&&!i&&(this.openDragLock?.(),this.openDragLock=Ac(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints();let{projection:o}=this.visualElement;o&&(o.isAnimationBlocked=!0,o.target=void 0),K(e=>{let t=this.getAxisMotionValue(e).get()||0;if(tn(t)&&(t=oe(t,this.visualElement.current)||0),rn.test(t))t=parseFloat(t);else if(Bt.test(t)){let n=o?.layout?.layoutBox[e];n&&(t=G(n)*(parseFloat(t)/100))}this.originPoint[e]=t}),this.point=typeof r==`function`&&r(this),a&&V.update(()=>a(e,t),!1,!0),no(this.visualElement,`transform`),this.visualElement.animationState?.setActive(`whileDrag`,!0)},i=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){if(this.currentDirection=Xc(o),this.currentDirection===null)return;i&&i(this.currentDirection)}this.updateAxis(`x`,o),this.updateAxis(`y`,o),this.point&&this.point.move(),this.visualElement.render(),a&&V.update(()=>a(e,t),!1,!0)},a=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},o=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints||this.point)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:s}=this.getProps();this.panSession=new _c(e,{onSessionStart:n,onStart:r,onMove:i,onSessionEnd:a,resumeAnimation:o},{...t,transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:s,contextWindow:this.visualElement.current?.ownerDocument.defaultView,element:this.visualElement.current})}stop(e,t,n){let r=e||this.latestPointerEvent,i=t||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!i||!r)return;let{velocity:o}=i;this.startAnimation(o,n);let{onDragEnd:s}=this.getProps();s&&V.postRender(()=>s(r,i))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession(),!this.getProps().dragPropagation&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t?.setActive(`whileDrag`,!1)}endPanSession(){this.panSession?.end(),this.panSession=void 0}updateAxis(e,t){let{drag:n}=this.readProps();if(!t||!Yc(e,n,this.currentDirection))return;let r=this.getAxisMotionValue(e),i=this.originPoint[e]+t[e],a=this.constraints&&this.constraints[e];a&&(i=jc(i,a,this.elastic[e])),this.point?this.point[e]=i:r.set(i)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),{projection:n}=this.visualElement,r=n&&(n.layout||n.measure(!1)),i=this.constraints;Gc(e)?this.constraints&&this.scroll===Hc(n)||(this.constraints=this.resolveRefConstraints()):this.constraints=e&&r&&typeof e==`object`?Nc(r.layoutBox,e):!1,this.elastic=zc(t),i!==this.constraints&&!Gc(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&K(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Lc(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!Gc(e))return!1;let n=Kc(e),{projection:r}=this.visualElement;if(!r||!r.layout)return!1;this.scroll=Hc(r);let i=ze(n,r.root,this.visualElement.getTransformPagePoint()),a=Fc(r.layout.layoutBox,r.removeElementScroll(i));if(t){let e=t(C(a));this.hasMutatedConstraints=!!e,e&&(a=me(e))}return a}startAnimation(e,t){let{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),c={bounceStiffness:i?200:1e6,bounceDamping:i?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...a},l=i=>r&&!(this.point&&o)&&Yc(i,t||n,this.currentDirection)?e[i]:0;if(this.point&&!o)return this.point.release({x:l(`x`),y:l(`y`)},c).then(s);let u=this.constraints||{},d=K(e=>{if(!Yc(e,t||n,this.currentDirection))return;let r=u[e]||{};(o===!0||o===e)&&(r={min:0,max:0});let i={type:`inertia`,velocity:l(e),...c,...r};return this.startAxisValueAnimation(e,i)});return Promise.all(d).then(s)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return no(this.visualElement,e),n.start(T(e,n,0,t,this.visualElement,!1))}stopAnimation(){K(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.readProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor({clientX:e,clientY:t}){let{drag:n}=this.getProps(),r={x:e,y:t},i=this.visualElement.getTransformPagePoint()?.(r)||r,a=this.visualElement.measureViewportBox();K(e=>{if(!Yc(e,n,this.currentDirection))return;let t=this.getAxisMotionValue(e),{min:r,max:o}=a[e];t.set((t.get()||0)+i[e]-P(r,o,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Gc(t)||!n||!this.constraints)return;this.stopAnimation();let r=this.constraints,i={x:0,y:0};K(e=>{let t=this.getAxisMotionValue(e).get();i[e]=Ic({min:t,max:t},r[e])});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},``):`none`,n.root?.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),K(t=>{let n=this.getAxisMotionValue(t);if(!Yc(t,e,null)||!n.get())return;let{min:r,max:a}=this.constraints[t];n.set(P(r,a,i[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Uc.set(this.visualElement,this);let e=this.visualElement.current,t=$s(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&Oc(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps(),r=Gc(t)&&Kc(t);r&&(this.constraints=this.resolveRefConstraints(),n||=Jc(e,r,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i.layout||(i.root?.updateScroll(),i.updateLayout()),V.read(r);let o=Us(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(K(t=>{if(!Yc(t,this.getProps().drag,this.currentDirection))return;let n=this.getAxisMotionValue(t);this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate)}),this.visualElement.render())}));return()=>{o(),t(),a(),s(),n?.()}}getProps(){let e=this.readProps(),{dragElastic:t=Rc,dragMomentum:n=!0}=e;return{...e,dragElastic:t,dragMomentum:n}}};function Gc(e){return!!e&&typeof e==`object`&&(`current`in e||`nodeType`in e)}var Kc=e=>`current`in e?e.current:e;function qc(e){let t=!0;return()=>{t?t=!1:e()}}function Jc(e,t,n){let r=pc(e,qc(n)),i=pc(t,qc(n));return()=>{r(),i()}}function Yc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Xc(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}function Zc(e,t){let n=ie(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},Ne(()=>r.abort())]}function Qc(e){return!(e.pointerType===`touch`||kc())}function $c(e,t,n={}){t=g(t);let[r,i,a]=Zc(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{e.pointerType!==`touch`&&(n?r=!0:s(e))};e.addEventListener(`pointerenter`,n=>{if(!Qc(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var el=(e,t)=>t?e===t||el(e,t.parentElement):!1,tl=new WeakSet;function nl(e){return t=>{t.key===`Enter`&&e(t)}}function rl(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var il=(e,t)=>{let n=!1,r=nl(()=>{n||tl.has(e)||(n=!0,rl(e,`down`))}),i=nl(()=>{n&&(n=!1,rl(e,`up`))});e.addEventListener(`keydown`,r,t),e.addEventListener(`keyup`,i,t),e.addEventListener(`blur`,()=>{e.removeEventListener(`keydown`,r),e.removeEventListener(`keyup`,i),n&&rl(e,`cancel`)},{...t,once:!0})};function al(e){return Xs(e)&&!kc()}var ol=new WeakSet,sl=100,cl=8,ll=(e,t,n)=>Math.hypot(e.clientX-t.clientX,e.clientY-t.clientY)>n,ul=e=>e.preventDefault();function dl(e,t,n={}){t=g(t);let[r,i,a]=Zc(e,n),o=new WeakMap,s=e=>{let r=e.currentTarget;if(!al(e)||ol.has(e))return;n.stopPropagation&&ol.add(e);let{count:a=1,countTimeout:s=.3,hold:c=0,repeat:l}=n,u=yn.now(),d=sn(c),f=sn(s),p=o.get(r);p?.expire(ll(p.event,e,sl))?p=void 0:p&&(B(p.expire),o.delete(r));let m=p?p.count+1:1,h=m>=a,g=h&&(c||l),_=!c,v=0,y;if(tl.add(r),p)y=p.handlers;else{let n=t(r,e);y=typeof n==`function`?{onComplete:n}:n||{}}h&&_&&y.onActive?.();let b=sn(l),x=d||b,S=u+x,C=!0,w=()=>{if(i.signal.aborted)return B(w);let e=Math.min(1-(S-yn.now())/x,1);C&&e<1&&(e=0),C=!1,y.onHold?.(e),e<1||(_?y.onRepeat?.(++v):(_=!0,y.onActive?.()),l?(C=!0,S+=x=b):B(w))},T={...i,capture:!0},E=(t,n)=>{if(Xs(t)){if(window.removeEventListener(`pointerup`,D,T),window.removeEventListener(`pointercancel`,O,T),window.removeEventListener(`pointermove`,k,T),r.removeEventListener(`contextmenu`,ul),B(w),tl.delete(r),kc()&&(n=!1),n&&!h){let n=yn.now(),a=e=>{let s=i.signal.aborted;if(s||e===!0||yn.now()-n>f)return B(a),o.delete(r),s||y.onComplete?.(t,{success:!1}),!0};o.set(r,{count:m,event:e,handlers:y,expire:a}),V.update(a,!0)}else y.onComplete?.(t,{success:n&&_})}},D=e=>{E(e,r===window||r===document||n.useGlobalTarget||el(r,e.target))},O=e=>{E(e,!1)},k=t=>{Xs(t)&&((l||!_)&&ll(e,t,cl)||a>1&&kc())&&O(t)};window.addEventListener(`pointerup`,D,T),window.addEventListener(`pointercancel`,O,T),(g||a>1)&&window.addEventListener(`pointermove`,k,T),g&&(V.update(w,!0),r.addEventListener(`contextmenu`,ul,{...i,passive:!1}))};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,s,i),Ua(e)&&(e.addEventListener(`focus`,()=>il(e,i),i),!Ec(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function fl(...e){let 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=tt(i,a,o);return t?s(r):s}var pl=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},ml=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 hl(e,t,n,r){qs(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(ml.has(n)?n:S(n),t.attrs[n])}var gl=class extends Ks{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=U}getBaseTargetFromProps(e,t){return Kt.has(t)?super.getBaseTargetFromProps(e,t)??qt(t):e[t]}getDefaultValue(e){return Kt.has(e)?this.latestValues[e]??qt(e):void 0}readValueFromInstance(e,t){if(Kt.has(t)){let e=Wt(t);return e&&e.default||0}if(ln.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=ml.has(t)?t:S(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Ui(e,t,n)}build(e,t,n){en(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){hl(e,t,n,r)}mount(e){this.isSVGTag=Sa(e.tagName),super.mount(e)}};function _l(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var vl=[...Ei].reverse(),yl=e=>e?.out===!0?e:e?.out;function bl(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>co(e,t,n))),n=Sl(),r=!0,i=!1;function a(a){let{props:o,parent:s,manuallyAnimateOnMount:c}=e,{initial:l}=o,u=r||i,d=[],f=(t=l)=>typeof t!=`boolean`&&Ya(e,Array.isArray(t)?t[0]:t,e.presenceContext?.custom)||void 0,p=new Map,m={},h=1/0,g=e;do g=g.props.inherit!==!1&&g.parent;while(g&&!g.isControllingVariants);let _=u&&yl(f(l??(g&&g.props.initial))?.transition);if(vl.forEach((t,r)=>{let i=n[t],l=o[t],f=g&&g.props[t],v=l===void 0?ei(f)||f===!1?f:void 0:l,y=ei(v),b=t===a?i.isActive:null,x=y&&l===void 0&&!(u&&c);if(i.protectedKeys={...m},!i.isActive&&b===null||!v&&!i.prevProp||Ea(v)||typeof v==`boolean`)return;if(b===!1&&(h=r),t===`exit`&&i.isActive&&b!==!0){m={...m,...i.prevResolvedValues};return}let S=xl(i.prevProp,v),C=S||y&&(b&&!x||r>h),w=!1,T=Array.isArray(v)?v:[v],E={},D;if(b!==!1)for(let n of T){let{transition:r,transitionEnd:i,...a}=Ya(e,n,Xa(e,t))||{};E={...E,...a,...i},D=yl(r)||D}let{prevResolvedValues:O}=i;for(let t in{...O,...E}){if(t in m)continue;let n=E[t],r=O[t],a=Array.isArray(n)&&Array.isArray(r)?!_l(n,r)||S:n!==r,o;if(a&&n==null)p.has(t)||p.set(t,i.prevOut);else if(a||n!==void 0&&p.has(t)){C=!0,o=p.get(t)||_,p.delete(t)&&(w=!0),i.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)}else i.protectedKeys[t]=!0;i.out[t]=o}if(i.prevProp=v,i.prevResolvedValues=E,i.prevOut=D,i.isActive&&(m={...m,...E}),C&&(!(x&&S)||w))for(let n of T){let r={type:t};if(typeof n==`string`&&u&&c&&s?.enteringChildren){let t=Ya(s,n)?.transition?.delayChildren;r.delay=Ja(s.enteringChildren,e,t)}d.push({animation:n,options:r})}}),p.size){let t={},n=f(),r=n?.transition;p.forEach((i,a)=>{i&&(r={...r||e.getDefaultTransition(),[a]:i});let s=e.getValue(a);s&&(s.liveStyle=!0);let c=n&&!Array.isArray(l)?n[a]:void 0,u=e.getBaseTargetFromProps(o,a);t[a]=(c===void 0?u!==void 0&&!nn(u)?u:e.initialValues[a]===void 0?e.baseTarget[a]:void 0:c)??null}),r&&(t.transition=r),d.push({animation:t})}let v=u&&e.blockInitialAnimation||r&&!c&&(o.initial===!1||o.initial===o.animate);return r=i=!1,!v&&d.length?t(d):Promise.resolve()}function o(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=a(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:a,setActive:o,setAnimateFunction:n=>{t=n(e)},getState:()=>n,reset:()=>{n=Sl(),i=!0}}}function xl(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!_l(t,e):!1}function Sl(){let e={};for(let t of Ei)e[t]={isActive:t===`animate`,protectedKeys:{},needsAnimating:{},prevResolvedValues:{},out:{}};return e}var J=zt(),Y=t(_t(),1);function Cl({children:e,features:t,strict:n=!1}){let[,r]=(0,Y.useState)(!wl(t)),i=(0,Y.useRef)(void 0);if(!wl(t)){let{renderer:e,...n}=t;i.current=e,ma(n)}return(0,Y.useEffect)(()=>{wl(t)&&t().then(({renderer:e,...t})=>{ma(t),i.current=e,r(!0)})},[]),(0,J.jsx)(di.Provider,{value:{renderer:i.current,strict:n},children:e})}function wl(e){return typeof e==`function`}function Tl(e,t){if(typeof Proxy>`u`)return Ni;let n=new Map,r=(n,r)=>Ni(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,Ni(a,void 0,e,t)),n.get(a))})}var El=Tl(),Dl=(e,t)=>t.isSVG??ea(e)?new gl(t):new Ys(t,{allowProjection:e!==Y.Fragment}),Ol=class extends pl{constructor(e){super(e),e.animationState||=bl(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Ea(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){this.node.getProps().animate!==this.node.prevProps?.animate&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},kl=0,Al={animation:{Feature:Ol},exit:{Feature:class extends pl{constructor(){super(...arguments),this.id=kl++}update(){let{presenceContext:e,animationState:t}=this.node;if(!e||!t)return;let{isPresent:n,onExitComplete:r}=e;if(n===!this.exit)return;if(n){if(this.exit===!0){let{initial:e}=this.node.getProps();if(e&&!Array.isArray(e)){let{transition:t,transitionEnd:n,...r}=Ya(this.node,e)||{};for(let e in r)this.node.getValue(e)?.jump(r[e])}this.node.blockInitialAnimation=!1,t.reset(),t.animateChanges()}else t.setActive(`exit`,!1);this.exit=void 0;return}let i=this.exit=t.setActive(`exit`,!0);r&&i.then(()=>{this.exit===i&&(this.exit=!0,r(this.id))})}mount(){let{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id,this.node)),this.update()}unmount(){}}}},jl=class extends pl{constructor(e){super(e),this.removeGroupControls=Zt,this.removeListeners=Zt,this.controls=new Wc(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Zt}update(){let{dragControls:e,drag:t}=this.node.getProps(),{dragControls:n,drag:r}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls))),r&&!t&&this.controls.stop(void 0,void 0,r)}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},Ml=e=>(t,n)=>{e&&V.update(()=>e(t,n),!1,!0)},Nl=class extends pl{constructor(){super(...arguments),this.removePointerDownListener=Zt}onPointerDown(e){this.session=new _c(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:this.node.current?.ownerDocument.defaultView})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Ml(e),onStart:Ml(t),onMove:Ml(n),onEnd:(e,t)=>{delete this.session,r&&V.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=$s(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session?.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session?.end()}},Pl=!1,Fl=({layout:e,layoutDependency:t,layoutAnchor:n})=>({layout:e,layoutDependency:t,layoutAnchor:n,animationType:typeof e==`string`?e:`both`}),Il=(e,t)=>{let{snapshot:n}=e,r=e.getStack();r?.remove(e);let i=r?.lead;if(r?.prevLead===e&&i.resumeFrom===e&&(i.resumeFrom=i.currentAnimation=e.resumingFrom=void 0),e.options.layoutId=t,!t)e.needsShow=!0;else return e.root.registerSharedNode(t,e),()=>{let{resumeFrom:t}=e;t?.isPresent!==!1&&e.getStack().members.includes(t)&&(t.hide(),e.resumeFrom=void 0,e.snapshot=n)}},Ll=class extends Y.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group?.add(i),r&&n?.register?.(i),Pl&&i.root.didUpdate(),i.options.layoutId!==r&&Il(i,r)?.(),i.addEventListener(`animationComplete`,()=>this.safeToRemove()),i.setOptions({...i.options,...Fl(this.props),onExitComplete:()=>this.safeToRemove()})),ls.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,layoutId:n,visualElement:r,drag:i,isPresent:a}=this.props,{projection:o}=r;return o&&(o.isPresent=a,this.takeOver=e.layoutId===n?void 0:(o.willUpdate(),Il(o,n)),o.setOptions({...o.options,...Fl(this.props)}),Pl=!0,i||e.layoutDependency!==t||t===void 0||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||V.postRender(()=>{o.getStack()?.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(this.takeOver?.(),e.root.didUpdate(),hn.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Pl=!0,r&&(r.scheduleCheckAfterUnmount(),t.group?.remove(r),n?.deregister?.(r))}safeToRemove(){this.props.safeToRemove?.()}render(){return null}};function Rl(e){let[t,n]=_e(),r=(0,Y.useContext)(Qt);return(0,J.jsx)(Ll,{...e,layoutGroup:r,switchLayoutGroup:(0,Y.useContext)(ii),isPresent:t,safeToRemove:n})}var zl={pan:{Feature:Nl},drag:{Feature:jl,ProjectionNode:Gs,MeasureLayout:Rl}};function Bl(e,t,n,r,i){let{props:a}=e,o=`while`+n;!i&&e.animationState&&a[o]&&e.animationState.setActive(o,r===`Start`);let s=a[`on`+n+r];s&&V.postRender(()=>s(t,Zs(t)))}var Vl=class extends pl{mount(){let{current:e}=this.node;e&&(this.unmount=$c(e,(e,t)=>(Bl(this.node,t,`Hover`,`Start`),e=>Bl(this.node,e,`Hover`,`End`))))}unmount(){}},Hl=class extends pl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}e&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=M(Us(this.node.current,`focus`,()=>this.onFocus()),Us(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Ul(e,t,n,r){e.current instanceof HTMLButtonElement&&e.current.disabled||Bl(e,t,`Tap`,n,r)}var Wl=class extends pl{constructor(){super(...arguments),this.options={}}mount(){let{current:e}=this.node;e&&(this.update(),this.unmount=dl(e,(e,t)=>(Ul(this.node,t,`Start`),{onComplete:(e,{success:t})=>Ul(this.node,e,t?``:`Cancel`),onRepeat:()=>Ul(this.node,t,``,!0)}),this.options))}update(){let{options:e,node:t}=this,{globalTapTarget:n,propagate:r,tap:i}=t.props;for(let t in e)delete e[t];Object.assign(e,i,{useGlobalTarget:n,stopPropagation:r?.tap===!1})}unmount(){}},Gl=new WeakMap,Kl=new WeakMap,ql=e=>{let t=Gl.get(e.target);t&&t(e)},Jl=e=>{e.forEach(ql)};function Yl({root:e,...t}){let n=e||document;Kl.has(n)||Kl.set(n,{});let r=Kl.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Jl,{root:e,...t})),r[i]}function Xl(e,t,n){let r=Yl(t);return Gl.set(e,n),r.observe(e),()=>{Gl.delete(e),r.unobserve(e)}}var Zl={some:0,all:1},Ql=class extends pl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:Zl[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=Xl(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some($l(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function $l({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var eu=Object.assign({},Object.assign({renderer:Dl},Al,{inView:{Feature:Ql},tap:{Feature:Wl},focus:{Feature:Hl},hover:{Feature:Vl}}),zl,{layout:{ProjectionNode:Gs,MeasureLayout:Rl}});function tu(e){let t=cn(()=>un(e)),{isStatic:n}=(0,Y.useContext)(_n);if(n){let[,n]=(0,Y.useState)(e);(0,Y.useEffect)(()=>t.on(`change`,n),[])}return t}function nu(e,t){let n=tu(t()),r=()=>n.set(t());return r(),mn(()=>{let t=()=>V.preRender(r,!1,!0),n=e.map(e=>e.on(`change`,t));return r(),()=>{n.forEach(e=>e()),B(r)}}),n}function ru(e){pn.current=[],e();let t=nu(pn.current,e);return pn.current=void 0,t}function iu(e,t,n,r){if(typeof e==`function`)return ru(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!=`function`)return ou(e,t,n,r);let i=typeof t==`function`?t:fl(t,n,r),a=Array.isArray(e)?au(e,i):au([e],([e])=>i(e)),o=Array.isArray(e)?void 0:e.accelerate;if(o&&!o.isTransformed&&typeof t!=`function`&&Array.isArray(n)&&r?.clamp!==!1&&!r?.mixer){let e=r?.ease;a.accelerate={...o,times:[0,...t,1],keyframes:[n[0],...n,n[n.length-1]],isTransformed:!0,...e?{ease:Array.isArray(e)?[e[0],...e]:e}:{}}}return a}function au(e,t){let n=cn(()=>[]);return nu(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}function ou(e,t,n,r){let i=cn(()=>Object.keys(n)),a=cn(()=>({}));for(let o of i)a[o]=iu(e,t,n[o],r);return a}var su=(0,Y.createContext)(null),cu=(0,Y.createContext)(null);function lu(e,t,n,r,i,a=`ltr`){let o=e.findIndex(e=>e.value===t);if(o===-1)return e;if(i===`xy`){let{layout:t}=e[o],r={x:du(t.x)+n.x,y:du(t.y)+n.y},i=fu(e),s=i.find(t=>t.items.includes(e[o])),c=i.reduce((e,t)=>pu(r.y,t)<pu(r.y,e)?t:e);if(c!==s)return mu(e,o,r.x,c,a);let l=hu(r,t),u=-1,d=l;return e.forEach((e,t)=>{if(t===o)return;let n=hu(r,e.layout);n<d&&(u=t,d=n)}),u===-1?e:Ht(e,o,o+Math.sign(u-o))}if(!r[i])return e;let s=r[i]>0?1:-1,c=e[o+s];if(!c)return e;let l=e[o].layout[i],u=c.layout[i],d=du(u);return s===1&&l.max+n[i]>d||s===-1&&l.min+n[i]<d?Ht(e,o,o+s):e}function uu(e,t,n,r,i){let a=n>1==!!(n%2&&i)?-1:1,o=n>3?(n-4)*(e.length-1):t+a;if(r===`xy`&&n<4&&!(n%2)&&t>-1){let n=fu(e).sort((e,t)=>e.min-t.min),r=n[n.findIndex(({items:n})=>n.includes(e[t]))+a],i=n=>Math.abs(du(n.layout.x)-du(e[t].layout.x));o=r?e.indexOf(r.items.reduce((e,t)=>i(t)<i(e)?t:e)):-1}return t>-1&&o!==t&&e[o]?o:-1}var du=({min:e,max:t})=>P(e,t,.5);function fu(e){let t=[];return e.forEach(e=>{let{min:n,max:r}=e.layout.y,i=t[t.length-1];!i||n>=i.max||r<=i.min?t.push({items:[e],min:n,max:r}):(i.items.push(e),i.min=Math.min(i.min,n),i.max=Math.max(i.max,r))}),t}function pu(e,t){return e<t.min?t.min-e:e>t.max?e-t.max:0}function mu(e,t,n,r,i){let a=e.filter((e,n)=>n!==t),o=r.items.find(e=>{let t=du(e.layout.x);return i===`ltr`?n<t:n>t}),s=o?a.indexOf(o):a.indexOf(r.items[r.items.length-1])+1,c=[...a];return c.splice(s,0,e[t]),c.every((t,n)=>t===e[n])?e:c}function hu(e,t){let n=Math.max(t.x.min-e.x,0,e.x-t.x.max),r=Math.max(t.y.min-e.y,0,e.y-t.y.max);return n*n+r*r}var gu=(e,t)=>e.max<=t.min||t.max<=e.min;function _u(e){let t=!1,n=!1;for(let r=0;r<e.length;r++)for(let i=r+1;i<e.length;i++)if(t||=gu(e[r].x,e[i].x),n||=gu(e[r].y,e[i].y),t&&n)return`xy`;return t?`x`:`y`}var vu=(e,t)=>n=>{e.current=n;let r=typeof t==`function`?t(n):t&&(t.current=n);if(typeof r==`function`)return()=>{e.current=null,r()}};function yu({children:e,as:t=`ul`,axis:n,onReorder:r,values:i,onPointerDownCapture:a,onClickCapture:o,...s},c,l){let u=cn(()=>l[t]),d=(0,Y.useContext)(su),f=(0,Y.useRef)(new Map),p=(0,Y.useRef)(new Map),[m,h]=(0,Y.useState)(),[g,_]=(0,Y.useState)(`y`),v=(0,Y.useRef)(!1),y=(0,Y.useRef)(!1),b=(0,Y.useRef)(null),x=n||g,S=new Set(i);for(let e of[f.current,p.current])e.forEach((t,n)=>S.has(n)||e.delete(n));let C=S.has(m)?m:i[0],w=e=>p.current.get(e)?.current?.isConnected,T=e=>S.has(e)&&h(e),E=()=>{w(C)||T(i.find(w))};(0,Y.useEffect)(E);let D=()=>i.flatMap(e=>f.current.get(e)||[]),O=()=>b.current?.ownerDocument.defaultView?.getComputedStyle(b.current).direction===`rtl`,k=(e,t)=>{let n=0,a=i.map(t=>f.current.has(t)?e[n++].value:t);a.some((e,t)=>e!==i[t])&&r(a,t)},A={axis:x,proxy:l,groupRef:b,hasReordered:y,values:i,onReorder:r,getOrder:D,isTabStop:e=>e===C||!S.has(e),setActive:T,checkTabStop:E,elements:p.current,onKeyDown:(e,t,n,r)=>{let{key:a,currentTarget:o}=e;if(e.defaultPrevented||e.target!==o||e.altKey||e.ctrlKey||e.metaKey)return;let s=D(),c=[`ArrowUp`,`ArrowLeft`,`ArrowDown`,`ArrowRight`,`Home`,`End`].indexOf(a),l=c%2;if(a===` `)e.repeat||r(o,n?void 0:i);else if(c<0&&!(a===`Escape`&&n))return;else if(!d?.isMoving(o)){if(a===`Escape`&&n){if(r(o),!d?.restore(A,t,o,n)){let e=n.flatMap(e=>s.filter(t=>t.value===e));k(s.map(t=>n.includes(t.value)?e.shift():t),t)}}else{let e=c>3||x===`xy`||x===(l?`x`:`y`),r=n?s:s.filter(({value:e})=>w(e)),i=r.findIndex(({value:e})=>e===t),a=e?uu(r,i,c,x,!!l&&O()):-1;if(a>-1)n?k(Ht(s,i,a),t):p.current.get(r[a].value)?.current?.focus();else if(!(n&&c<4&&d?.key(A,t,c,o,n))&&!e)return}}e.preventDefault()},registerItem:(e,t,r)=>{if(f.current.set(e,{value:e,layout:t,ref:r}),!n){let e=_u(D().map(e=>e.layout));e!==g&&_(e)}},updateOrder:(e,t,n)=>{if(v.current)return;let r=D(),i=lu(r,e,t,n,x,O()?`rtl`:`ltr`);r!==i&&(v.current=!0,y.current=!0,k(i,e))}};(0,Y.useEffect)(()=>{v.current=!1},[i]),mn(()=>d?.add(A));let j={overflowAnchor:`none`,...s.style};return(0,J.jsx)(u,{...s,style:j,ref:vu(b,c),onPointerDownCapture:e=>{y.current=!1,a?.(e)},onClickCapture:e=>{y.current&&e.detail&&(y.current=!1,e.stopPropagation(),e.preventDefault()),o?.(e)},ignoreStrict:!0,children:(0,J.jsx)(cu.Provider,{value:A,children:e})})}var bu=e=>(0,Y.forwardRef)((t,n)=>yu(t,n,e)),xu=50,Su=1.5,Cu=new Set([`auto`,`scroll`]),wu={x:new Map,y:new Map};function Tu(){wu.x.clear(),wu.y.clear()}function Eu(e,t){let n=getComputedStyle(e),r=t===`x`?n.overflowX:n.overflowY;return e===document.body||e===document.documentElement||Cu.has(r)&&(t===`x`?e.scrollWidth>e.clientWidth:e.scrollHeight>e.clientHeight)}function Du(e,t){let n=e?.parentElement;for(;n;){if(Eu(n,t))return n;n=n.parentElement}return null}function Ou(e){let t=Math.min(1,1-e/xu);return Su*t*t*H.delta}function ku(e,t,n){let r=t.getBoundingClientRect(),i=n===`x`?Math.max(0,r.left):Math.max(0,r.top),a=n===`x`?Math.min(window.innerWidth,r.right):Math.min(window.innerHeight,r.bottom),o=e-i,s=a-e;return o<xu?{amount:-Ou(o),edge:`start`}:s<xu?{amount:Ou(s),edge:`end`}:{amount:0,edge:null}}function Au(e,t,n,r){if(!e)return;let i=Du(e,n);if(!i)return;let{amount:a,edge:o}=ku(t-(n===`x`?window.scrollX:window.scrollY),i,n),s=wu[n];if(o===null){s.delete(i);return}let c=s.get(i),l=i===document.body||i===document.documentElement;if(c?.edge!==o){if(!(o===`start`&&r<0||o===`end`&&r>0))return;c={edge:o,limit:n===`x`?i.scrollWidth-(l?window.innerWidth:i.clientWidth):i.scrollHeight-(l?window.innerHeight:i.clientHeight)},s.set(i,c)}a>0&&(n===`x`?l?window.scrollX:i.scrollLeft:l?window.scrollY:i.scrollTop)>=c.limit||(n===`x`?l?window.scrollBy({left:a}):i.scrollLeft+=a:l?window.scrollBy({top:a}):i.scrollTop+=a)}function ju(e,t=0){return nn(e)?e:tu(t)}function Mu({children:e,style:t={},value:n,as:r=`li`,onDragStart:i,onDrag:a,onDragEnd:o,onKeyDown:s,onFocus:c,onBlur:l,layout:u=!0,...d},f){let p=(0,Y.useContext)(cu),m=(0,Y.useContext)(su),h=(0,Y.useRef)(null),g=cn(()=>p.proxy[r]),_=(0,Y.useRef)(),v={x:ju(t.x),y:ju(t.y)},y=iu([v.x,v.y],([e,t])=>e||t?1:`unset`),{axis:b,registerItem:x,updateOrder:S,groupRef:C,hasReordered:w,isTabStop:T,setActive:E,checkTabStop:D,elements:O,onKeyDown:k}=p,A=b===`xy`||m?!0:b;O.set(n,h),(0,Y.useEffect)(()=>D);let j=(e,t)=>{_.current=t,t||m?.end(n),fn.get(e)?.animationState?.setActive(`whileDrag`,!!t)},M=(0,Y.useRef)(!1);return mn(()=>{m?.receive(p,n,h.current,j)&&(M.current=!0)},[]),(0,J.jsx)(g,{drag:A,tabIndex:T(n)?0:-1,...d,dragSnapToOrigin:!0,style:{...t,x:v.x,y:v.y,zIndex:y},layout:u,onDragStart:(e,t)=>{M.current?M.current=!1:i?.(e,t)},onDrag:(e,t)=>{let{velocity:r,point:i}=t,o={x:v.x.get(),y:v.y.get()};m?.drag(p,n,h.current,e)||S(n,o,r);let s=m?[`x`,`y`]:[b===`xy`?Math.abs(r.x)>Math.abs(r.y)?`x`:`y`:b];for(let e of s)Au(m&&!b.includes(e)?m.column(p):C.current,i[e],e,r[e]);a&&a(e,t)},onDragEnd:(e,t)=>{w.current=!1,Tu(),m?.end(n),o&&o(e,t)},onKeyDown:e=>{s?.(e),k(e,n,_.current,j)},onFocus:e=>{c?.(e),E(n)},onBlur:e=>{l?.(e),_.current&&j(e.currentTarget)},onLayoutMeasure:e=>{x(n,e,h)},ref:vu(h,f),ignoreStrict:!0,children:e})}var Nu=(0,Y.forwardRef)(Mu),Pu=e=>{let{left:t,top:n,width:r,height:i}=e.getBoundingClientRect();return{x:t+r/2,y:n+i/2}},Fu=e=>{let{x:t,y:n}=Pu(e),{scrollX:r,scrollY:i}=e.ownerDocument.defaultView;return{x:t+r,y:n+i}};function Iu(e,t,n,r){let{left:i,right:a,top:o,bottom:s}=t.getBoundingClientRect(),c=r?e.x>(i+a)/2:e.x<=(i+a)/2,l=e.y<=(o+s)/2;return n===`x`?c:n===`y`?l:e.y<o||e.y<s&&c}var Lu=(e,t)=>{let n=e.groupRef.current,r=t.groupRef.current;return n.contains(r)||r.contains(n)};function Ru(e){let t=new Set,n,r=(t,n,r)=>!Lu(t,n)&&e.current.canMove?.(r,t.values,n.values)!==!1,i,a=(e,t,r,i,a,o)=>{let s=Pu(i),{values:c}=t;if(o===void 0){let e=t.getOrder().filter(e=>e.ref?.current?.isConnected),n=getComputedStyle(t.groupRef.current).direction===`rtl`,r=e.find(e=>Iu(s,e.ref.current,t.axis,n)),i=e[e.length-1];o=r?c.indexOf(r.value):i?c.indexOf(i.value)+1:c.length}n={value:r,to:t.groupRef,element:i,centre:Fu(i),...a},t.hasReordered.current=!0,e.onReorder(e.values.filter(e=>e!==r),r),t.onReorder([...c.slice(0,o),r,...c.slice(o)],r)};return{add:e=>(t.add(e),()=>t.delete(e)),drag:(e,i,o,s)=>{if(!o?.isConnected)return!1;if(n?.controls?.isDragging)return n.value===i&&(n.centre=Fu(o),n.event=s),!0;let c=Pu(o),l;for(let e of o.ownerDocument.elementsFromPoint(c.x,c.y))if(!o.contains(e)){for(let n of t)n.groupRef.current===e&&(l=n);if(l)break}if(!l||!r(e,l,i))return!1;let u=fn.get(o);return a(e,l,i,o,{controls:u&&Uc.get(u),event:s}),!0},key:(e,n,o,s,c)=>{let l=Pu(s),u=o%2?`x`:`y`,d=o>1?1:-1,f,p=1/0;for(let i of t){let t=i.groupRef.current;if(!t)continue;let{left:a,right:s,top:c,bottom:m,width:h,height:g}=t.getBoundingClientRect();if(!h&&!g||([m,s,c,a][o]-l[u])*d<=0)continue;let _=Math.max(a-l.x,0,l.x-s),v=Math.max(c-l.y,0,l.y-m);_*_+v*v<p&&r(e,i,n)&&(p=_*_+v*v,f=i)}return f?(i?.from!==c&&(i={group:e.groupRef,from:c}),a(e,f,n,s,{keys:!0,from:c}),!0):!1},restore:(e,n,r,o)=>{let s=i?.from===o&&[...t].find(e=>e.groupRef===i.group);if(!s||s.groupRef===e.groupRef)return!1;let c=o.slice(o.indexOf(n)+1),l=s.values.findIndex(e=>c.includes(e));return i=void 0,a(e,s,n,r,{keys:!0},l<0?s.values.length:l),!0},end:e=>{n?.value===e&&(n=void 0)},isMoving:e=>n?.element===e,receive:(e,t,r,i)=>{let a=fn.get(r),o=a&&Uc.get(a);o?.isDragging&&a.animationState?.setActive(`whileDrag`,!0);let s=n;if(!s||s.value!==t||s.to!==e.groupRef)return!1;let{keys:c,from:l,controls:u}=s,d=!s.element.isConnected;if(c){n=void 0;let{activeElement:e,body:t}=r.ownerDocument;return d&&(!e||e===t)&&(r.focus(),i(r,l)),!1}return!o||!u?.isDragging?!1:(hn.read(()=>{if(n!==s)return;n=void 0,fn.get(s.element)?.values.forEach((e,t)=>{let n=e.get();a.getValue(t,a.readValue(t,n))?.set(n)});let e=a.getTransformPagePoint()||(e=>e),t=e(s.centre),i=e(Fu(r));a.getValue(`x`).set(t.x-i.x),a.getValue(`y`).set(t.y-i.y),a.render(),d?u.cancel():u.stop(),o.start(s.event,{immediate:!0})}),d)},column:({groupRef:e})=>{let n=e.current,r=n=>[...t].some(t=>t.groupRef!==e&&n.contains(t.groupRef.current));for(;n?.parentElement?.parentElement&&!r(n.parentElement);)n=n.parentElement;return n}}}function zu({children:e,...t}){let n=(0,Y.useRef)(t);return mn(()=>{n.current=t}),(0,J.jsx)(su.Provider,{value:cn(()=>Ru(n)),children:e})}var Bu=e=>{e.stopPropagation()},Vu=e=>{e.preventDefault(),e.stopPropagation(),e.preventBaseUIHandler?.()},Hu={anchor:null,iconSpaceMode:`global`,items:[],open:!1,triggerId:null},Uu=Hu,Wu=new Set,Gu={ready:!1,triggerId:null,x:0,y:0},Ku=()=>{Wu.forEach(e=>e())},qu=e=>(Wu.add(e),()=>Wu.delete(e)),Ju=()=>Uu,Yu=()=>Hu,Xu=e=>{Gu.x=e.clientX,Gu.y=e.clientY,Gu.ready=!0,Gu.triggerId=e.target instanceof Element?e.target.closest(`[data-contextmenu-trigger]`)?.dataset.contextmenuTrigger??null:null},Zu=e=>({contextElement:typeof document>`u`?void 0:document.body,getBoundingClientRect:()=>({bottom:e.y,height:0,left:e.x,right:e.x,toJSON:()=>void 0,top:e.y,width:0,x:e.x,y:e.y})}),Qu=e=>{Uu={...Uu,...e},Ku()},$u=null,ed=(e,t)=>{let n={x:window.innerWidth/2,y:window.innerHeight/2};Qu({anchor:Zu(Gu.ready?{x:Gu.x,y:Gu.y}:n),footer:t?.footer,header:t?.header,iconAlign:t?.iconAlign,iconSpaceMode:t?.iconSpaceMode??`global`,items:e,listItemHeight:t?.listItemHeight,open:!0,triggerId:Gu.triggerId??null,virtual:t?.virtual})},td=(e,t)=>{typeof window<`u`&&($u?.show?$u.show(e,t,()=>ed(e,t)):ed(e,t))},nd=()=>{Qu({anchor:null,footer:void 0,header:void 0,iconSpaceMode:`global`,items:[],listItemHeight:void 0,open:!1,triggerId:null,virtual:void 0})},rd=()=>{$u?.close?$u.close(nd):nd()};function id(e){let[t,n]=Y.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),r=Y.useRef(null),i=Y.useRef(null),a=Y.useRef(null),o=Y.useRef(null),s=Y.useRef(!0),c=Y.useRef(null),l=at(),u=Y.useMemo(()=>({anchor:t,setAnchor:n,actionsRef:a,backdropRef:r,internalBackdropRef:i,positionerRef:o,allowMouseUpTriggerRef:s,initialCursorPointRef:c,rootId:l}),[t,l]);return(0,J.jsx)(ve.Provider,{value:u,children:(0,J.jsx)(E.Provider,{value:void 0,children:(0,J.jsx)(Xe,{...e})})})}var ad=x,X=gt({block:`context-menu`,elements:[`trigger`,`positioner`,`header`,`viewport`,`footer`,`item`,`item-content`,`icon`,`label-group`,`label`,`desc`,`extra`,`submenu-arrow`,`checkbox-indicator`,`switch`,`separator`,`group`,`group-label`]}),od=(0,Y.memo)(({collisionPadding:e,style:t,...n})=>{let r=typeof t!=`function`&&t?.zIndex!=null&&typeof t.zIndex==`number`?t.zIndex:void 0,{zIndex:i,ref:a}=It(`floating`,r),o=typeof t==`function`?e=>({zIndex:i,...t(e)}):{zIndex:i,...t};return(0,J.jsx)(ad,{...n,className:z(F.positioner,X(`positioner`)),collisionPadding:e??Be(),ref:a,style:o})});od.displayName=`ContextMenuSubmenuPositioner`;var sd=(0,Y.memo)(()=>{let{t:e}=he(O);return(0,J.jsx)(ne,{disabled:!0,className:z(R(I.item,I.empty).className,X(`item`)),children:(0,J.jsx)(`div`,{className:z(F.itemContent,X(`item-content`)),children:(0,J.jsx)(`span`,{className:z(F.label,X(`label`)),children:e(`common.empty`)})})})});sd.displayName=`EmptyMenuItem`;var cd=({checked:e,children:t,closeOnClick:n=!1,danger:r,defaultChecked:i,disabled:a,label:o,onCheckedChange:s})=>{let[c,l]=(0,Y.useState)(i??!1),u=e!==void 0,d=u?e:c,f=(0,Y.useCallback)(e=>{u||l(e),s?.(e)},[u,s]);return(0,J.jsxs)(ne,{closeOnClick:n,disabled:a,label:o,className:z(R(I.item,r&&I.danger).className,X(`item`)),onClick:e=>{e.preventDefault(),a||f(!d)},children:[t,(0,J.jsx)(`span`,{className:z(F.switchWrap,X(`switch`)),onFocus:e=>e.stopPropagation(),children:(0,J.jsx)(Ue,{checked:d,disabled:a,size:`small`,tabIndex:-1,onChange:f,onClick:(e,t)=>t.stopPropagation()})})]})},ld=(e,t,n)=>{let r=we(e),i=`desc`in e?e.desc:void 0,a=`extra`in e?e.extra:void 0,o=t?.indicatorOnRight,s=!!i&&t?.iconAlign===`start`,c=n!==void 0&&!o,l=c?!!n:!!e.icon,u=c?!!(t?.reserveIconSpace||n):!!(l||t?.reserveIconSpace),d=i?(0,J.jsxs)(`div`,{className:z(F.labelGroup,X(`label-group`)),children:[(0,J.jsx)(`span`,{className:z(F.label,X(`label`)),children:r}),(0,J.jsx)(`span`,{className:z(F.desc,X(`desc`)),children:i})]}):(0,J.jsx)(`span`,{className:z(F.label,X(`label`)),children:r});return(0,J.jsxs)(`div`,{className:z(R(I.itemContent,s&&I.itemContentAlignStart).className,X(`item-content`)),children:[u?(0,J.jsx)(`span`,{"aria-hidden":!l,className:z(R(I.icon,s&&I.iconAlignStart).className,Ae.icon,X(`icon`)),children:c?n:l?He(e.icon,`small`):null}):null,d,a?(0,J.jsx)(`span`,{className:z(F.extra,X(`extra`)),children:a}):null,o&&n?n:null,t?.submenu?(0,J.jsx)(`span`,{className:z(F.submenuArrow,X(`submenu-arrow`)),children:(0,J.jsx)(se,{})}):null]})},ud=(e,t,n)=>{if(!e.onClick)return;let r=e.key??t.at(-1)??``,i={domEvent:n,item:n.currentTarget,key:String(r),keyPath:t};e.onClick(i)},dd=(e,t=[],n)=>{let r=n?.iconAlign,i=n?.iconSpaceMode??`global`,a=n?.reserveIconSpace??We(e,i===`global`),o=n?.indicatorOnRight??Le(e);return e.map((e,n)=>{if(!e)return null;let s=`${t.join(`-`)||`root`}-${n}`,c=p(e,s),l=[...t,String(c)];if(e.type===`checkbox`){let t=e,n=we(t),i=typeof n==`string`?n:void 0,s=!!t.danger,l=(0,J.jsx)(ee,{className:X(`checkbox-indicator`),children:(0,J.jsx)(dt,{icon:pe,size:`small`})});return(0,J.jsx)(ce,{checked:t.checked,closeOnClick:t.closeOnClick,defaultChecked:t.defaultChecked,disabled:t.disabled,label:i,className:z(R(I.item,s&&I.danger).className,X(`item`)),onCheckedChange:e=>t.onCheckedChange?.(e),children:ld(t,{iconAlign:r,indicatorOnRight:o,reserveIconSpace:a},l)},c)}if(e.type===`switch`){let t=e,n=we(t),i=typeof n==`string`?n:void 0,o=!!t.danger;return(0,J.jsx)(cd,{checked:t.checked,closeOnClick:t.closeOnClick,danger:o,defaultChecked:t.defaultChecked,disabled:t.disabled,label:i,onCheckedChange:t.onCheckedChange,children:ld(t,{iconAlign:r,reserveIconSpace:a})},c)}if(e.type===`divider`)return(0,J.jsx)($e,{className:z(F.separator,X(`separator`))},c);if(e.type===`group`){let t=e,n=i===`group`?t.children?We(t.children):!1:a,o=t.children?Le(t.children):!1;return(0,J.jsxs)(w,{className:X(`group`),children:[t.label?(0,J.jsx)(ae,{className:z(F.groupLabel,X(`group-label`)),children:t.label}):null,t.children?dd(t.children,l,{iconAlign:r,iconSpaceMode:i,indicatorOnRight:o,reserveIconSpace:n}):null]},c)}if(e.type===`submenu`||`children`in e&&e.children){let t=e,n=we(t),o=typeof n==`string`?n:void 0,s=`danger`in t&&!!t.danger,u=t.header!=null||t.footer!=null,d=t.children&&t.children.length>0?dd(t.children,l,{iconAlign:r,iconSpaceMode:i}):(0,J.jsx)(sd,{});return(0,J.jsxs)(xe,{defaultOpen:t.defaultOpen,open:t.open,onOpenChange:t.onOpenChange,children:[(0,J.jsx)(Ge,{...t.triggerProps,closeDelay:t.closeDelay,delay:t.delay,disabled:t.disabled,label:o,openOnHover:t.openOnHover,className:z(R(I.item,s&&I.danger).className,X(`item`)),onClick:t.onClick,children:ld(t,{iconAlign:r,reserveIconSpace:a,submenu:!0})}),(0,J.jsx)(m,{children:(0,J.jsx)(od,{alignOffset:-4,"data-submenu":``,sideOffset:-1,onContextMenu:Vu,children:(0,J.jsxs)(je,{className:z(R(I.popup,u&&I.popupWithSlots).className,Ae.popup,X()),children:[t.header==null?null:(0,J.jsx)(`div`,{className:z(F.header,X(`header`)),children:t.header}),u?(0,J.jsx)(`div`,{className:z(F.slotViewport,X(`viewport`)),children:d}):d,t.footer==null?null:(0,J.jsx)(`div`,{className:z(F.footer,X(`footer`)),children:t.footer})]})})})]},c)}let u=e,d=we(u),f=typeof d==`string`?d:void 0,h=`danger`in u&&!!u.danger;return(0,J.jsx)(ne,{closeOnClick:u.closeOnClick,disabled:u.disabled,label:f,className:z(R(I.item,h&&I.danger).className,X(`item`)),onClick:e=>ud(u,l,e),children:ld(u,{iconAlign:r,reserveIconSpace:a})},c)})},fd={"--lobe-dropdown-animation-duration":`0ms`},pd=(0,Y.memo)(()=>{let e=j(),t=st(),n=(0,Y.useSyncExternalStore)(qu,Ju,Yu);(0,Y.useEffect)(()=>{},[e]),(0,Y.useEffect)(()=>{let e=e=>Xu(e);return window.addEventListener(`pointerdown`,e,!0),window.addEventListener(`contextmenu`,e,!0),()=>{window.removeEventListener(`pointerdown`,e,!0),window.removeEventListener(`contextmenu`,e,!0)}},[]);let r=(0,Y.useMemo)(()=>dd(n.items,[],{iconAlign:n.iconAlign,iconSpaceMode:n.iconSpaceMode}),[n.items,n.iconAlign,n.iconSpaceMode]),{zIndex:i,ref:a}=It(`floating`),o=n.header!=null||n.footer!=null;return!e||!n.open&&n.items.length===0?null:(0,J.jsx)(id,{open:n.open,onOpenChange:e=>{e?Qu({open:e}):rd()},children:(0,J.jsx)(m,{container:t,children:(0,J.jsx)(ad,{anchor:n.anchor??void 0,className:z(F.positioner,X(`positioner`)),collisionPadding:Be(),ref:a,sideOffset:6,style:{...fd,zIndex:i},children:(0,J.jsxs)(je,{"data-has-footer":n.footer==null?void 0:``,"data-has-header":n.header==null?void 0:``,className:z(R(I.popup,o&&I.popupWithSlots).className,Ae.popup,X()),onContextMenu:Vu,children:[n.header==null?null:(0,J.jsx)(`div`,{className:z(F.header,X(`header`)),children:n.header}),n.virtual?(0,J.jsx)(Re,{className:X(`viewport`),itemSize:n.listItemHeight,children:r}):o?(0,J.jsx)(`div`,{className:z(F.slotViewport,X(`viewport`)),children:r}):r,n.footer==null?null:(0,J.jsx)(`div`,{className:z(F.footer,X(`footer`)),children:n.footer})]})})})})});pd.displayName=`ContextMenuHost`;function md(e,t){let n=(t??Tt(e).getComputedStyle(e)).transform,r=0,i=0,a=1;if(n&&n!==`none`){let e=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(e){let t=e[1].split(`, `).map(parseFloat);t.length===6?(r=t[4],i=t[5],a=Math.sqrt(t[0]*t[0]+t[1]*t[1])):t.length===16&&(r=t[12],i=t[13],a=t[0])}}return{x:r,y:i,scale:a}}var hd=Y.createContext(void 0);function gd(){let e=Y.useContext(hd);if(!e)throw Error(it(73));return e}var _d=0;function vd(e){return _d+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${_d}`}function yd(e,t){if(typeof e==`string`)return{description:e};if(typeof e==`function`){let n=e(t);return typeof n==`string`?{description:n}:n}return e}function bd(e){let t=new Map,n=0,r=0;return e.forEach((e,i)=>{let a=e.transitionStatus===`ending`;t.set(e.id,{value:e,domIndex:i,visibleIndex:a?-1:n,offsetY:r}),r+=e.height||0,a||(n+=1)}),t}function xd(e,t){let n=0;return e.map(e=>{if(e.transitionStatus===`ending`)return e;let r=n>=t;return n+=1,e.limited===r?e:{...e,limited:r}})}var Z={toasts:e=>e.toasts,isEmpty:e=>e.toasts.length===0,toast:(e,t)=>e.toastMetadata.get(t)?.value,toastIndex:(e,t)=>e.toastMetadata.get(t)?.domIndex??-1,toastOffsetY:(e,t)=>e.toastMetadata.get(t)?.offsetY??0,toastVisibleIndex:(e,t)=>e.toastMetadata.get(t)?.visibleIndex??-1,focused:e=>e.focused,expanded:e=>e.hovering||e.focused,expandedOrOutOfFocus:e=>e.hovering||e.focused||!e.isWindowFocused,prevFocusElement:e=>e.prevFocusElement},Sd=class extends kt{timers=new Map;areTimersPaused=!1;constructor(e){super({...e,toastMetadata:bd(e.toasts)},{},Z)}setViewport=e=>{this.set(`viewport`,e)};syncProviderProps(e,t){let n=this.state.limit!==t;if(this.state.timeout===e&&!n)return;let r={timeout:e,limit:t};if(n){let e=xd(this.state.toasts,t);r.toasts=e,r.toastMetadata=bd(e)}this.update(r)}disposeEffect=()=>()=>{this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear()};removeToast(e,t=!1){let n=Z.toastIndex(this.state,e);if(n===-1)return;let r=this.state.toasts[n];t||r?.onRemove?.();let i=[...this.state.toasts];i.splice(n,1),this.setToasts(i)}addToast=e=>{let{timeout:t,limit:n}=this.state,r=e.id||vd(`toast`);if(e.id){let t=Z.toast(this.state,e.id);if(t){if(t.transitionStatus===`ending`)this.removeToast(e.id,!0);else{let{id:t,transitionStatus:n,...r}=e;return this.updateToastInternal(e.id,r,!0,!0),e.id}}}let i={...e,id:r,updateKey:0,transitionStatus:`starting`},a=[i,...this.state.toasts];this.setToasts(xd(a,n));let o=i.timeout??t;return i.type!==`loading`&&o>0&&this.scheduleTimer(r,o,()=>this.closeToast(r)),Z.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),r};updateToast=(e,t)=>{let n=Z.toast(this.state,e);n&&n.transitionStatus!==`ending`&&this.updateToastInternal(e,typeof t==`function`?t(n):t,!1,!0)};updateToastInternal=(e,t,n=!1,r=!1)=>{let{timeout:i,toasts:a}=this.state,o=Z.toast(this.state,e);if(!o||o.transitionStatus===`ending`)return;let s={...o,...t,...r&&{updateKey:o.updateKey+1}};this.setToasts(a.map(t=>t.id===e?s:t));let c=s.timeout??i,l=o.timeout??i,u=Object.hasOwn(t,`timeout`),d=s.transitionStatus!==`ending`&&s.type!==`loading`&&c>0,f=this.timers.has(e),p=l!==c,m=o.type===`loading`;!d&&f?this.clearTimer(e):d&&(!f||p||u||m||n)&&(this.clearTimer(e),this.scheduleTimer(e,c,()=>this.closeToast(e)),Z.expandedOrOutOfFocus(this.state)&&this.pauseTimers())};closeToast=e=>{let t=e===void 0,{limit:n,toasts:r}=this.state,i;if(t)i=r,this.clearTimers();else{let t=Z.toast(this.state,e);if(!t)return;i=[t],this.clearTimer(e)}let a=xd(r.map(n=>t||n.id===e?{...n,transitionStatus:`ending`,height:0}:n),n);this.setToasts(a,!a.some(e=>e.transitionStatus!==`ending`)),i.forEach(e=>{e.transitionStatus!==`ending`&&e.onClose?.()}),this.handleFocusManagement(e)};promiseToast=(e,t)=>{let n=yd(t.loading),r=this.addToast({...n,type:`loading`}),i=e.then(e=>{let n=yd(t.success,e);return this.updateToast(r,{...n,type:`success`,timeout:n.timeout}),e}).catch(e=>{let n=yd(t.error,e);return this.updateToast(r,{...n,type:`error`,timeout:n.timeout}),Promise.reject(e)});return{}.hasOwnProperty.call(t,`setPromise`)&&t.setPromise(i),i};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(e=>{e.timeout&&(e.timeout.clear(),e.remaining=Math.max(e.remaining-(Date.now()-e.start),0))}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((e,t)=>{e.remaining=e.remaining>0?e.remaining:e.delay,e.timeout??=ot.create(),e.timeout.start(e.remaining,()=>{this.handleTimerFired(t),e.callback()}),e.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=e=>{if(e.pointerType!==`touch`)return;let t=Pt(e);Ot(this.state.viewport,t)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(e,t,n){let r=Date.now(),i=Z.expandedOrOutOfFocus(this.state)?void 0:ot.create();i?.start(t,()=>{this.handleTimerFired(e),n()}),this.timers.set(e,{timeout:i,start:r,delay:t,remaining:t,callback:n})}clearTimers(){this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear(),this.areTimersPaused=!1}clearTimer(e){this.timers.get(e)?.timeout?.clear(),this.timers.delete(e),this.resetPausedStateIfNoTimersRemain()}handleTimerFired(e){this.timers.delete(e),this.resetPausedStateIfNoTimersRemain()}resetPausedStateIfNoTimersRemain(){this.timers.size===0&&(this.areTimersPaused=!1)}setToasts(e,t=e.length===0){let n={toasts:e,toastMetadata:bd(e)};t&&(n.hovering=!1,n.focused=!1),this.update(n)}handleFocusManagement(e){let t=Ft(vt(this.state.viewport));if(!this.state.viewport||!Ot(this.state.viewport,t)||!Dt(t))return;if(e===void 0){this.restoreFocusToPrevElement();return}let n=Z.toasts(this.state),r=Z.toastIndex(this.state,e),i=(e,t)=>{for(let r=e;r>=0&&r<n.length;r+=t)if(n[r].transitionStatus!==`ending`)return n[r];return null},a=i(r+1,1)??i(r-1,-1);a?a.ref?.current?.focus():this.restoreFocusToPrevElement()}},Cd=function(e){let{children:t,timeout:n=5e3,limit:r=3,toastManager:i}=e,a=ct(()=>new Sd({timeout:n,limit:r,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return mt(a.disposeEffect),Y.useEffect(function(){if(i)return i[` subscribe`](({action:e,options:t})=>{let n=t.id;e===`promise`&&t.promise?a.promiseToast(t.promise,t):e===`update`&&n?a.updateToast(n,t.updates):e===`close`?a.closeToast(n):a.addToast(t)})},[a,i]),(0,J.jsxs)(hd.Provider,{value:a,children:[(0,J.jsx)(wd,{store:a,timeout:n,limit:r}),t]})};function wd(e){let{store:t,timeout:n,limit:r}=e;return nt(()=>{t.syncProviderProps(n,r)},[t,n,r]),null}var Td=`--toast-frontmost-height`,Ed=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,s=gd(),c=lt(),l=Y.useRef(!1),u=Y.useRef(!1),d=Y.useRef(!1),f=s.useState(`isEmpty`),p=s.useState(`toasts`),m=s.useState(`focused`),h=s.useState(`expanded`),g=s.useState(`prevFocusElement`),_=p[0]?.height,v=p.some(e=>e.transitionStatus===`ending`),y=p.filter(e=>e.priority===`high`);Y.useEffect(()=>{let e=s.state.viewport;if(!e||f)return;let t=Tt(e),n=vt(e);function r(t){t.key===`F6`&&Pt(t)!==e&&(t.preventDefault(),s.set(`prevFocusElement`,Ft(n)),e?.focus({preventScroll:!0}),s.pauseTimers(),s.set(`focused`,!0))}function i(e){Pt(e)===t&&(s.set(`isWindowFocused`,!1),s.pauseTimers())}function a(n){if(n.relatedTarget)return;let r=Pt(n),i=Ft(vt(e));r!==t&&Ot(e,r)&&Dt(i)||s.resumeTimers(),c.start(0,()=>s.set(`isWindowFocused`,!0))}return yt(Lt(t,`keydown`,r),Lt(t,`blur`,i,!0),Lt(t,`focus`,a,!0),Lt(n,`pointerdown`,s.handleDocumentPointerDown,!0))},[s,c,f]);function b(e){l.current=!0;let t=e.relatedTarget===s.state.viewport?p.find(e=>e.transitionStatus!==`ending`&&!e.limited):void 0;t?t.ref?.current?.focus():s.restoreFocusToPrevElement()}function x(e){e.key===`Tab`&&e.shiftKey&&Pt(e.nativeEvent)===s.state.viewport&&(e.preventDefault(),s.restoreFocusToPrevElement())}function S(){s.state.toasts.some(e=>e.transitionStatus===`ending`)||d.current||!u.current||(s.set(`hovering`,!1),s.select(`expandedOrOutOfFocus`)||s.resumeTimers(),u.current=!1)}Y.useEffect(S,[v,s]);function C(){s.pauseTimers(),s.set(`hovering`,!0),u.current=!1}function w(){u.current=!0,S()}function T(e){e.pointerType===`touch`&&(d.current=!0)}function E(e){e.pointerType===`touch`&&(d.current=!1,S())}function D(){l.current?l.current=!1:m||Dt(Ft(vt(s.state.viewport)))&&(s.set(`focused`,!0),s.pauseTimers())}function O(e){m&&!Ot(s.state.viewport,e.relatedTarget)&&(s.set(`focused`,!1),s.select(`expandedOrOutOfFocus`)||s.resumeTimers())}let k={tabIndex:-1,role:`region`,"aria-live":`polite`,"aria-atomic":!1,"aria-relevant":`additions text`,"aria-label":`Notifications`,onMouseEnter:C,onMouseMove:C,onMouseLeave:w,onFocus:D,onBlur:O,onKeyDown:x,onClick:D,onPointerDown:T,onPointerUp:E,onPointerCancel:E,style:{[Td]:_?`${_}px`:void 0}},A={expanded:h},j=!f&&g&&(0,J.jsx)(St,{onFocus:b}),M=rt(`div`,e,{ref:[t,s.setViewport],state:A,props:[k,o,{children:(0,J.jsxs)(Y.Fragment,{children:[j,a,j]})}]});return(0,J.jsxs)(Y.Fragment,{children:[j,M,!m&&y.length>0&&(0,J.jsx)(`div`,{style:Ct,children:y.map(e=>(0,J.jsxs)(`div`,{role:`alert`,"aria-atomic":!0,children:[(0,J.jsx)(`div`,{children:e.title}),(0,J.jsx)(`div`,{children:e.description})]},e.id))})]})}),Dd=Y.createContext(void 0);function Od(){let e=Y.useContext(Dd);if(!e)throw Error(it(66));return e}function kd(e,t,n){switch(e){case`up`:return-n;case`down`:return n;case`left`:return-t;case`right`:return t;default:return 0}}var Ad=`--toast-index`,jd=`--toast-offset-y`,Md=`--toast-height`,Nd=`--toast-swipe-movement-x`,Pd=`--toast-swipe-movement-y`,Fd=`data-swipe-direction`,Id=t(n(),1),Ld={...xt,swipeDirection(e){return e?{[Fd]:e}:null}},Rd=40,zd=10,Bd=.5,Vd=1,Hd=`${bt},${wt}`,Ud=Y.forwardRef(function(e,t){let{toast:n,render:r,className:i,swipeDirection:a=[`down`,`right`],style:o,...s}=e,c=n.positionerProps?.anchor!==void 0,l=[];c||(l=Array.isArray(a)?a:[a]);let u=l.length>0,d=gd(),[f,p]=Y.useState(void 0),[m,h]=Y.useState(!1),[g,_]=Y.useState(!1),[v,y]=Y.useState({x:0,y:0}),[b,x]=Y.useState({x:0,y:0,scale:1}),[S,C]=Y.useState(),[w,T]=Y.useState(),[E,D]=Y.useState(null),O=Y.useRef(null),k=Y.useRef(void 0),A=Y.useRef({x:0,y:0}),j=Y.useRef({x:0,y:0,scale:1}),M=Y.useRef(void 0),ee=Y.useRef(0),te=Y.useRef(!1),N=Y.useRef({x:0,y:0}),ne=Y.useRef(!1),re=Y.useRef({x:0,y:0}),ie=Y.useRef(null),ae=Y.useRef(null),oe=d.useState(`toastIndex`,n.id),se=d.useState(`toastVisibleIndex`,n.id),ce=d.useState(`toastOffsetY`,n.id),le=d.useState(`focused`),ue=d.useState(`expanded`);At({open:n.transitionStatus!==`ending`,ref:O,onComplete(){n.transitionStatus===`ending`&&d.removeToast(n.id)}});let de=ft((e=!1)=>{let t=O.current;if(!t)return;let r=t.style.height;t.style.height=`auto`;let i=t.offsetHeight;t.style.height=r;function a(){d.updateToastInternal(n.id,{ref:O,height:i,transitionStatus:void 0})}e?Id.flushSync(a):a()});nt(()=>{let e=k.current;(n.transitionStatus===`starting`||e!==n.id)&&(e!==void 0&&(p(void 0),x({x:0,y:0,scale:1}),fe({x:0,y:0})),k.current=n.id,de())},[de,n.id,n.transitionStatus]);function fe(e){re.current=e,y(e)}nt(()=>()=>{ae.current?.abort()},[]);function pe(e,t){let n=e=>e>0?e**Bd:-(Math.abs(e)**Bd),r=e>0&&!l.includes(`right`)||e<0&&!l.includes(`left`),i=t>0&&!l.includes(`down`)||t<0&&!l.includes(`up`);return{x:r?n(e):e,y:i?n(t):t}}let me=ft(e=>{if(e.pointerId!==ie.current)return;ie.current=null,ae.current?.abort(),ae.current=null,h(!1),_(!1),D(null);let t=j.current;if(e.type===`pointercancel`||te.current){fe({x:t.x,y:t.y}),p(void 0);return}let r=re.current,i=r.x-t.x,a=r.y-t.y,o;for(let e of l)if(kd(e,i,a)>Rd){o=e;break}o?(p(o),d.closeToast(n.id)):(fe({x:t.x,y:t.y}),p(void 0))});function he(e){if(e.button!==0)return;e.pointerType===`touch`&&d.pauseTimers();let t=Pt(e.nativeEvent);if(Mt(t,`button,a,input,textarea,[role="button"],${Hd}`))return;te.current=!1,M.current=void 0,ee.current=0,ie.current=e.pointerId,A.current={x:e.clientX,y:e.clientY},N.current=A.current;let n=e.currentTarget,r=md(n);j.current=r,x(r),fe({x:r.x,y:r.y}),d.set(`hovering`,!0),h(!0),_(!1),D(null),ne.current=!0,ae.current?.abort();let i=new AbortController;ae.current=i;let a=vt(n);a.addEventListener(`pointerup`,me,{signal:i.signal}),a.addEventListener(`pointercancel`,me,{signal:i.signal}),n.setPointerCapture?.(e.pointerId)}function P(e){if(e.pointerId!==ie.current)return;e.preventDefault(),ne.current&&=(A.current={x:e.clientX,y:e.clientY},!1);let{clientY:t,clientX:n,movementX:r,movementY:i}=e;(i<0&&t>N.current.y||i>0&&t<N.current.y)&&(N.current={x:N.current.x,y:t}),(r<0&&n>N.current.x||r>0&&n<N.current.x)&&(N.current={x:n,y:N.current.y});let a=n-A.current.x,o=t-A.current.y,s=t-N.current.y,c=n-N.current.x,u=E;if(!g&&Math.sqrt(a*a+o*o)>=Vd){_(!0);let e=l.includes(`left`)||l.includes(`right`),t=l.includes(`up`)||l.includes(`down`);e&&t&&(u=Math.abs(a)>Math.abs(o)?`horizontal`:`vertical`,D(u))}let d;if(!M.current)u===`vertical`?o>0?d=`down`:o<0&&(d=`up`):u===`horizontal`?a>0?d=`right`:a<0&&(d=`left`):d=Math.abs(a)>=Math.abs(o)?a>0?`right`:`left`:o>0?`down`:`up`,d&&l.includes(d)&&(M.current=d,ee.current=kd(d,a,o),p(d));else{let e=M.current,t=kd(e,c,s);t>Rd?(te.current=!1,p(e)):!(l.includes(`left`)&&l.includes(`right`))&&!(l.includes(`up`)&&l.includes(`down`))&&ee.current-t>=zd&&(te.current=!0)}let f=pe(a,o),m=j.current.x,h=j.current.y,v=l.includes(`left`)||l.includes(`right`),y=l.includes(`up`)||l.includes(`down`);u!==`vertical`&&v&&(m+=f.x),u!==`horizontal`&&y&&(h+=f.y),fe({x:m,y:h})}function ge(e){if(e.key===`Escape`){if(!O.current||!Ot(O.current,Ft(vt(O.current))))return;d.closeToast(n.id)}}Y.useEffect(()=>{let e=O.current;if(!u||!e)return;function t(t){ie.current!==null&&Ot(e,Pt(t))&&t.preventDefault()}return Lt(e,`touchmove`,t,{passive:!1})},[u]);function _e(){let e=v.x-b.x,t=v.y-b.y;return{transition:m?`none`:void 0,transform:m?`translateX(${v.x}px) translateY(${v.y}px) scale(${b.scale})`:void 0,[Nd]:`${e}px`,[Pd]:`${t}px`}}let ve=n.priority===`high`,ye={role:ve?`alertdialog`:`dialog`,tabIndex:0,"aria-modal":!1,"aria-labelledby":S,"aria-describedby":w,"aria-hidden":ve&&!le?!0:void 0,onPointerDown:u?he:void 0,onPointerMove:u?P:void 0,onPointerUp:u?me:void 0,onPointerCancel:u?me:void 0,onKeyDown:ge,inert:jt(n.limited),style:{..._e(),[Ad]:n.transitionStatus===`ending`?oe:se,[jd]:`${ce}px`,[Md]:n.height?`${n.height}px`:void 0}},be=Y.useMemo(()=>({toast:n,setTitleId:C,setDescriptionId:T,recalculateHeight:de,visibleIndex:se,expanded:ue}),[n,C,T,de,se,ue]),F={transitionStatus:n.transitionStatus,expanded:ue,limited:n.limited||!1,type:n.type,swiping:m,swipeDirection:f},xe=rt(`div`,e,{ref:[t,O],state:F,stateAttributesMapping:Ld,props:[ye,s]});return(0,J.jsx)(Dd.Provider,{value:be,children:xe})}),Wd=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{visibleIndex:o,expanded:s,recalculateHeight:c}=Od(),l=Y.useRef(null);return nt(()=>{c();let e=l.current;if(!e||typeof ResizeObserver!=`function`||typeof MutationObserver!=`function`)return;let t=new ResizeObserver(()=>c(!0)),n=new MutationObserver(()=>c(!0));return t.observe(e),n.observe(e,{childList:!0,subtree:!0,characterData:!0}),()=>{t.disconnect(),n.disconnect()}},[c]),rt(`div`,e,{ref:[t,l],state:{expanded:s,behind:o>0},props:a})});function Gd(e){return e==null||typeof e==`boolean`||e===``?!1:!Array.isArray(e)||e.some(Gd)}function Kd(e){return Y.isValidElement(e)&&Gd(e.props.children)}function qd(e,t,n){let{toast:r,setTitleId:i,setDescriptionId:a}=Od(),o=n===`title`?i:a,s=t??(n===`title`?r.title:r.description);return{id:at(e),children:s,type:r.type,setId:o}}function Jd(e,t,n){let r=Kd(e);return nt(()=>{if(r)return n(t),()=>{n(e=>e===t?void 0:e)}},[r,t,n]),r?e:null}var Yd=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{id:c,children:l,type:u,setId:d}=qd(a,o,`description`);return Jd(rt(`p`,e,{ref:t,state:{type:u},props:{...s,id:c,children:l}}),c,d)}),Xd=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{id:c,children:l,type:u,setId:d}=qd(a,o,`title`);return Jd(rt(`h2`,e,{ref:t,state:{type:u},props:{...s,id:c,children:l}}),c,d)}),Zd=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...s}=e,c=gd(),{toast:l,expanded:u}=Od(),[d,f]=Y.useState(!1),{getButtonProps:p,buttonRef:m}=Et({disabled:a,native:o}),h={type:l.type};return rt(`button`,e,{ref:[t,m],state:h,props:[{"aria-hidden":!u&&!d,onClick(){c.closeToast(l.id)},onFocus(){f(!0)},onBlur(){f(!1)}},s,p]})}),Qd=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...s}=e,{toast:c}=Od(),l=c.actionProps?.children??s.children,{getButtonProps:u,buttonRef:d}=Et({disabled:a,native:o}),f={type:c.type},p=rt(`button`,e,{ref:[t,d],state:f,props:[s,c.actionProps,u,{children:l}]});return Kd(p)?p:null}),$d=Y.forwardRef(function(e,t){return(0,J.jsx)(ke,{ref:t,...e})});function ef(){let e=gd(),t=e.useState(`toasts`);return Y.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}function tf(){let e=new Set;function t(t){e.forEach(e=>e(t))}return{" subscribe":function(t){return e.add(t),()=>{e.delete(t)}},add(e){let n=e.id||vd(`toast`);return t({action:`add`,options:{...e,id:n,transitionStatus:`starting`}}),n},close(e){t({action:`close`,options:{id:e}})},update(e,n){t({action:`update`,options:{id:e,updates:n}})},promise(e,n){let r=e;return t({action:`promise`,options:{...n,promise:e,setPromise(e){r=e}}}),r}}}var nf=(0,Y.createContext)({position:`bottom-right`,swipeDirection:[`down`,`right`]}),rf=()=>(0,Y.useContext)(nf),af=[],of=new Set,sf=()=>{for(let e of of)e()},cf=e=>(af.push(e),sf(),()=>{let t=af.indexOf(e);t!==-1&&af.splice(t,1),sf()}),lf=e=>af[0]===e,uf=e=>(of.add(e),()=>{of.delete(e)}),df=20,ff=5e3,pf=!1,mf=[],hf=e=>{pf?e():(mf.length>=df&&mf.shift(),mf.push({queuedAt:Date.now(),run:e}))},gf=()=>{pf=!0;let e=mf;mf=[];let t=Date.now();for(let n of e)t-n.queuedAt<=ff&&n.run()},_f=()=>{pf=!1},Q=gt({block:`toast`,dataAttributes:[`type`,`position`],elements:[`viewport`,`content`,`body`,`icon`,`main`,`title-row`,`title`,`close`,`description`,`actions`,`action`]}),$={action:{kVAM5u:`lb181nr7w`,kaIpWk:`lb1vihcfj`,ksu8eU:`lbng3xce`,kMzoRj:`lbfn42iu`,kg3NbH:`lbaope02`,kmkexE:`lb1cd9vmy`,kGNEyG:`lb6s0dn4`,kkrTdU:`lb1ypdohk`,k1xSpc:`lb3nfvp2`,kmuXW:`lb2lah0s`,kGuDYH:`lbfifm61`,k63SB2:`lbk50ysn`,kjj79g:`lbl56j7k`,kLWn49:`lbo5v014`,kZKoxP:`lb1fgtraw`,$$css:!0},actionDanger:{"--lobe-focus-ring-color":`lb2hswdp`,kWkggS:`lbixdnzb lb1ca5mm0 lb4c98my`,kMwMTN:`lb15g0kca`,kjBf7l:`lbiep9q5 lb1y5du2d`,$$css:!0},actionGhost:{kVAM5u:`lbqnr5ac lb1ahehej lbuhn3al`,ksu8eU:`lb1y0btm7`,kMzoRj:`lbmkeg23`,kWkggS:`lbjbqb8w`,kMwMTN:`lb66ogz0 lb1l4wxl8 lb1nelral`,$$css:!0},actionPrimary:{kWkggS:`lb1hsafae lblxzpop lb1gwghft`,kMwMTN:`lb15g0kca`,$$css:!0},actionSecondary:{kWkggS:`lbjjy28o lbswrfa9 lb147z954`,kMwMTN:`lb66ogz0`,$$css:!0},actionText:{kWkggS:`lbjbqb8w lbswrfa9 lb1cpyog9`,kMwMTN:`lb16owwnm`,$$css:!0},actions:{kOIVth:`lb167g77z`,kGNEyG:`lb6s0dn4`,kSGwAc:`lbpvyfi4`,k1xSpc:`lb78zum5`,kzQI83:`lb1iyjqo2`,kmuXW:`lb2lah0s`,kjj79g:`lb13a6bvl`,keoZOQ:`lb1xmf6yo`,$$css:!0},close:{kmVPX3:`lb1717udv`,kVAM5u:`lb181nr7w`,kaIpWk:`lb1vihcfj`,ksu8eU:`lbng3xce`,kMzoRj:`lbfn42iu`,kmkexE:`lb1ng1d19`,kGNEyG:`lb6s0dn4`,kWkggS:`lbjbqb8w lb1ri6zej`,kMwMTN:`lbc77et8 lb1bxu9lh`,kkrTdU:`lb1ypdohk`,k1xSpc:`lb78zum5`,kmuXW:`lb2lah0s`,kjj79g:`lbl56j7k`,keTefX:`lbvc5jky`,kZKoxP:`lb1qx5ct2`,kzqmXN:`lbw4jnvo`,$$css:!0},content:{kVQacm:`lbb3r6kr`,kmkexE:`lb1hzt7jf`,kSiTet:`lb1g256cz lbcbbmyo`,kfzvcC:`lbp78wxm lb1cicrrk`,$$css:!0},contentArea:{kUk6DE:`lb98rzlu`,k1xSpc:`lb78zum5`,kXwgrk:`lbdt5ytf`,k7Eaqz:`lbeuugli`,$$css:!0},description:{kogj98:`lb1ghz6dp`,kMwMTN:`lbc77et8`,kGuDYH:`lb4z9k3i`,kLWn49:`lb1evy7pa`,$$css:!0},descriptionWithTitle:{keoZOQ:`lb1gslohp`,$$css:!0},descriptionStandalone:{kMwMTN:`lb66ogz0`,$$css:!0},icon:{kGNEyG:`lb6s0dn4`,k1xSpc:`lb78zum5`,kmuXW:`lb2lah0s`,kjj79g:`lbl56j7k`,$$css:!0},root:{"--toast-collapsed-height":`lb1o8nl8n`,"--toast-gap":`lbr9sdi6`,"--toast-peek":`lb1wxzbih`,"--toast-scale":`lb1vhpo3u`,"--toast-shrink":`lb1c223hw`,kaIpWk:`lb159sbz3`,kkqhue:`lb17y0mx6`,k8WAf4:`lb10dr8xq`,kg3NbH:`lb1hr3lfm`,kHypHr:`lbx83zyx`,kWkggS:`lb1w937bt`,kGVxlE:`lbj07k4p`,kB7OPa:`lb9f619`,kMwMTN:`lb66ogz0`,kkrTdU:`lbt0e3qv`,kSiTet:`lb4ki41r`,kVAEAm:`lb10l6tqk`,kIyJzY:`lb1ssesjg lbm69ghq`,k1ekBW:`lb19ix5ol lbo3tt7b`,kAMwcw:`lb1477tyf lb7cr0y4`,kfSwDN:`lb87ps6o`,kY2c9j:`lb1l48cz2`,kZKoxP:`lb677f43 lbnbj6on`,kzqmXN:`lbh8yej3`,$$css:!0},rootBottom:{kYYq5F:`lb1fclj7r`,k3aq6I:`lb1qsqgls lbz09l4w lb1ce1yp4`,k3nNDw:`lb18ouj0k`,kcktkL:`lbb7ltuz`,k5JduY:`lb100rkj9`,k3foIR:`lb1srwf7z`,kwXMNM:`lb1j6awrg`,k4zj60:`lb1jflgyd`,$$css:!0},rootTop:{kYYq5F:`lbdwv5cp`,k3aq6I:`lb1jkqqlh lb7ly47h lbjeddtc`,k3nNDw:`lb1dp6rp6`,kcktkL:`lbb7ltuz`,k5JduY:`lb100rkj9`,k8Iv0R:`lb1wpe5ba`,kwXMNM:`lb1j6awrg`,k4zj60:`lb1jflgyd`,$$css:!0},title:{kogj98:`lb1ghz6dp`,kMwMTN:`lb66ogz0`,kGuDYH:`lbif65rj`,k63SB2:`lbk50ysn`,kLWn49:`lb1evy7pa`,$$css:!0},titleRow:{kOIVth:`lb167g77z`,kGNEyG:`lb1cy8zhl`,k1xSpc:`lb78zum5`,$$css:!0},toastBody:{kOIVth:`lb1v2ro7d`,kGNEyG:`lb1cy8zhl`,k1xSpc:`lb78zum5`,$$css:!0},viewport:{kI3sdo:`lb1b6ykf0`,kVAEAm:`lbixxii4`,kY2c9j:`lb979qle`,ks0D6T:`lbg5xlue`,kzqmXN:`lb1fzdfyu lbm1mc0`,$$css:!0},viewportBottom:{krVfgx:`lbo7r6ss`,kLqNvP:`lbbudbmw`,k3aq6I:`lbuuh30`,$$css:!0},viewportBottomLeft:{krVfgx:`lbo7r6ss`,kLqNvP:`lb10vz1dz`,$$css:!0},viewportBottomRight:{krVfgx:`lbo7r6ss`,kt4wiu:`lb1cj2eds`,k3aq6I:`lb18zyp77`,kIyJzY:`lb1x2t6jx lb12w9bfk`,k1ekBW:`lb11xpdln lb4wkmsb`,kAMwcw:`lbsygjwy lb7v8fk2`,$$css:!0},viewportTop:{k87sOh:`lb1kd19f1`,kLqNvP:`lbbudbmw`,k3aq6I:`lbuuh30`,$$css:!0},viewportTopLeft:{k87sOh:`lb1kd19f1`,kLqNvP:`lb10vz1dz`,$$css:!0},viewportTopRight:{k87sOh:`lb1kd19f1`,kt4wiu:`lb1cj2eds`,$$css:!0}},vf={bottom:$.viewportBottom,"bottom-left":$.viewportBottomLeft,"bottom-right":$.viewportBottomRight,top:$.viewportTop,"top-left":$.viewportTopLeft,"top-right":$.viewportTopRight},yf={bottom:$.rootBottom,"bottom-left":$.rootBottom,"bottom-right":$.rootBottom,top:$.rootTop,"top-left":$.rootTop,"top-right":$.rootTop},bf={danger:$.actionDanger,ghost:$.actionGhost,primary:$.actionPrimary,secondary:$.actionSecondary,text:$.actionText},xf={default:qe,error:qa,info:qe,loading:v,success:Ga,warning:ue},Sf={default:Ze.colorText,error:Ze.colorError,info:Ze.colorInfo,loading:Ze.colorPrimary,success:Ze.colorSuccess,warning:Ze.colorWarning},Cf=(0,Y.memo)(({toast:e,classNames:t,styles:n})=>{let{position:r,swipeDirection:i}=rf(),a=e.data,o=a?.type??`default`,s=a?.closable??!0,c=a?.hideCloseButton??!1,l=s&&!c,u=a?.icon,d=e.title??a?.title,f=e.description??a?.description,p=e.actionProps??a?.actionProps,m=a?.actions,h=Sf[o],g=u??xf[o],_=o===`loading`,v=()=>g?(0,J.jsx)(`div`,{...L($.icon,z(Q(`icon`),t?.icon),n?.icon),children:(0,J.jsx)(dt,{color:h,icon:g,size:18,spin:_})}):null,y=()=>m&&m.length>0?(0,J.jsx)(`div`,{...L($.actions,z(Q(`actions`),t?.actions),n?.actions),children:m.map((e,r)=>(0,J.jsx)(Qd,{...L([$.action,ut.info,bf[e.variant??`primary`]],z(Q(`action`),t?.action),n?.action),onClick:e.onClick,...e.props,children:e.label},r))}):p?(0,J.jsx)(Qd,{...L([$.action,ut.info,$.actionPrimary],z(Q(`action`),t?.action),n?.action),...p}):null;return(0,J.jsx)(Ud,{swipeDirection:i,toast:e,...ht({position:r,type:o}),...L([$.root,yf[r]],z(Q(),t?.root),{...n?.root,...a?.style}),children:(0,J.jsx)(Wd,{...L($.content,z(Q(`content`),t?.content),n?.content),children:(0,J.jsxs)(`div`,{...L($.toastBody,Q(`body`)),children:[v(),(0,J.jsxs)(`div`,{...L($.contentArea,Q(`main`)),children:[d?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`div`,{...L($.titleRow,Q(`title-row`)),children:[(0,J.jsx)(Xd,{...L($.title,z(Q(`title`),t?.title),n?.title),children:d}),l&&(0,J.jsx)(Zd,{"aria-label":`Close`,...L($.close,z(Q(`close`),t?.close),n?.close),children:(0,J.jsx)(pt,{size:14})})]}),f&&(0,J.jsx)(Yd,{...L([$.description,$.descriptionWithTitle],z(Q(`description`),t?.description),n?.description),children:f})]}):f&&(0,J.jsxs)(`div`,{...L($.titleRow,Q(`title-row`)),children:[(0,J.jsx)(Yd,{...L([$.description,$.descriptionStandalone],z(Q(`description`),t?.description),n?.description),children:f}),l&&(0,J.jsx)(Zd,{"aria-label":`Close`,...L($.close,z(Q(`close`),t?.close),n?.close),children:(0,J.jsx)(pt,{size:14})})]}),y()]})]})})})});Cf.displayName=`ToastItem`;var wf=[`top`,`top-left`,`top-right`,`bottom`,`bottom-left`,`bottom-right`],Tf={duration:5e3,limit:5,position:`bottom-right`,swipeDirection:[`down`,`right`]},Ef={bottom:tf(),"bottom-left":tf(),"bottom-right":tf(),top:tf(),"top-left":tf(),"top-right":tf()},Df={bottom:new Map,"bottom-left":new Map,"bottom-right":new Map,top:new Map,"top-left":new Map,"top-right":new Map},Of=e=>Ef[e],kf=0,Af=()=>`toast-${Date.now().toString(36)}-${(kf++).toString(36)}`,jf=e=>wf.find(t=>Df[t].has(e)),Mf=(e,t)=>Array.from(Df[e].keys()).at(-1)===t,Nf=(e,t)=>typeof e==`string`?{description:e,type:t}:{...e,type:t},Pf=(e,t)=>({close:()=>hf(()=>Of(t).close(e)),id:e,update:n=>{hf(()=>Of(t).update(e,{data:n,description:n.description,title:n.title}))}}),Ff=e=>{let t=e.placement??Tf.position,n=Of(t),{id:r,onClose:i,onRemove:a}=e;if(r){let e=jf(r);e&&!(e===t&&Mf(t,r))&&(Df[e].get(r).superseded=!0,Df[e].delete(r),hf(()=>Of(e).close(r)))}let o=r??Af(),s={superseded:!1};return Df[t].set(o,s),hf(()=>{n.add({id:o,data:e,description:e.description,onClose:()=>{s.superseded||i?.()},onRemove:()=>{s.superseded||(Df[t].delete(o),a?.())},timeout:e.duration??Tf.duration,title:e.title})}),Pf(o,t)},If=e=>{if(e)for(let[t,n]of Object.entries(Ef))Df[t].delete(e),hf(()=>n.close(e));else for(let[e,t]of Object.entries(Ef)){let n=Array.from(Df[e].keys());Df[e].clear(),hf(()=>{for(let e of n)t.close(e)})}},Lf=e=>Ff(Nf(e,`success`)),Rf=e=>Ff(Nf(e,`error`)),zf=e=>Ff(Nf(e,`info`)),Bf=e=>Ff(Nf(e,`warning`)),Vf=e=>Ff({duration:0,...Nf(e,`loading`)});async function Hf(e,t){let n=Ff({closable:!1,duration:0,type:`loading`,...typeof t.loading==`string`?{description:t.loading}:t.loading});try{let r=await e;return n.close(),Ff({type:`success`,...typeof t.success==`string`?{description:t.success}:typeof t.success==`function`?{description:t.success(r)}:t.success}),r}catch(e){throw n.close(),Ff({type:`error`,...typeof t.error==`string`?{description:t.error}:typeof t.error==`function`?{description:t.error(e)}:t.error}),e}}var Uf=Object.assign(e=>Ff({type:`default`,...e}),{dismiss:If,error:Rf,info:zf,loading:Vf,promise:Hf,success:Lf,warning:Bf}),Wf=(0,Y.memo)(()=>{let{toasts:e}=ef();return e.map(e=>(0,J.jsx)(Cf,{toast:e},e.id))});Wf.displayName=`ToastList`;var Gf=(0,Y.memo)(({root:e,className:t,duration:n=5e3,limit:r=5,position:i=`bottom-right`,swipeDirection:a=[`down`,`right`]})=>{let o=j(),s=st(),[c,l]=(0,Y.useState)(void 0),u=(0,Y.useId)();(0,Y.useEffect)(()=>cf(u),[u]);let d=(0,Y.useSyncExternalStore)(uf,()=>lf(u),()=>!1);if((0,Y.useEffect)(()=>{d&&(Tf={duration:n,limit:r,position:i,swipeDirection:a})},[n,r,i,a,d]),(0,Y.useEffect)(()=>{d&&l(Nt(`toast`))},[d]),(0,Y.useEffect)(()=>{if(d&&o)return gf(),()=>{_f()}},[d,o]),!o||!d)return null;let f=e??s??document.body;return wf.map(e=>(0,J.jsx)(nf,{value:{position:e,swipeDirection:a},children:(0,J.jsx)(Cd,{limit:r,timeout:n,toastManager:Of(e),children:(0,J.jsx)($d,{container:f,children:(0,J.jsx)(Ed,{"data-position":e,...L([$.viewport,vf[e]],z(Q(`viewport`),t),c===void 0?void 0:{zIndex:c}),children:(0,J.jsx)(Wf,{})})})})},e))});Gf.displayName=`ToastHost`;var Kf=e({Board:()=>zu,Group:()=>qf,Item:()=>Nu}),qf=bu(El),Jf=e({Reorder:()=>Kf,a:()=>ga,abbr:()=>Ji,address:()=>ca,animate:()=>ji,area:()=>ni,article:()=>Qi,aside:()=>fa,audio:()=>li,b:()=>Vi,base:()=>ba,bdi:()=>pi,bdo:()=>bi,big:()=>na,blockquote:()=>Gi,body:()=>Oi,button:()=>wi,canvas:()=>Qr,caption:()=>wa,circle:()=>Ia,cite:()=>oi,clipPath:()=>Ma,code:()=>Er,col:()=>jn,colgroup:()=>Oa,create:()=>ua,data:()=>Ar,datalist:()=>Rn,dd:()=>Fn,defs:()=>mr,del:()=>Ri,desc:()=>Tn,details:()=>Fi,dfn:()=>cr,dialog:()=>dr,div:()=>_r,dl:()=>Vn,dt:()=>Xn,ellipse:()=>ar,em:()=>Cr,embed:()=>Ba,feBlend:()=>On,feColorMatrix:()=>Lr,feComponentTransfer:()=>qn,feComposite:()=>Pr,feConvolveMatrix:()=>Br,feDiffuseLighting:()=>Wn,feDisplacementMap:()=>nr,feDistantLight:()=>aa,feDropShadow:()=>$n,feFlood:()=>Kr,feFuncA:()=>Ur,feFuncB:()=>Yr,feFuncG:()=>br,feFuncR:()=>Sn,feGaussianBlur:()=>yi,feImage:()=>ya,feMerge:()=>Zi,feMergeNode:()=>da,feMorphology:()=>Pi,feOffset:()=>ai,fePointLight:()=>ta,feSpecularLighting:()=>ha,feSpotLight:()=>fi,feTile:()=>Wi,feTurbulence:()=>Ca,fieldset:()=>gi,figcaption:()=>Ci,figure:()=>ia,filter:()=>qi,footer:()=>Ai,foreignObject:()=>Di,form:()=>ti,g:()=>Da,h1:()=>za,h2:()=>ci,h3:()=>Fa,h4:()=>kr,h5:()=>Pn,h6:()=>ja,head:()=>Nr,header:()=>Bn,hgroup:()=>Ln,hr:()=>gr,html:()=>Bi,i:()=>Dn,iframe:()=>Li,image:()=>ur,img:()=>pr,input:()=>yr,ins:()=>Un,kbd:()=>Qn,keygen:()=>sr,label:()=>Tr,legend:()=>Ha,li:()=>An,line:()=>zr,linearGradient:()=>Yn,link:()=>Ir,main:()=>Hr,map:()=>Kn,mark:()=>ir,marker:()=>sa,mask:()=>tr,menu:()=>Jr,menuitem:()=>Gr,metadata:()=>Zr,meter:()=>Sr,nav:()=>wn,object:()=>_i,ol:()=>_a,optgroup:()=>Yi,option:()=>la,output:()=>Mi,p:()=>ri,param:()=>$i,path:()=>pa,pattern:()=>ui,picture:()=>Hi,polygon:()=>xa,polyline:()=>mi,pre:()=>xi,progress:()=>ra,q:()=>Ki,radialGradient:()=>ki,rect:()=>Ti,rp:()=>$r,rt:()=>Ta,ruby:()=>La,s:()=>si,samp:()=>Na,script:()=>Dr,section:()=>Mn,select:()=>ka,small:()=>jr,source:()=>zn,span:()=>In,stop:()=>hr,strong:()=>zi,style:()=>En,sub:()=>Ii,summary:()=>lr,sup:()=>fr,svg:()=>vr,symbol:()=>Hn,table:()=>Zn,tbody:()=>or,td:()=>wr,text:()=>Va,textPath:()=>kn,textarea:()=>Rr,tfoot:()=>Jn,th:()=>Fr,thead:()=>Vr,time:()=>Gn,title:()=>rr,tr:()=>oa,track:()=>er,tspan:()=>qr,u:()=>Wr,ul:()=>Xr,use:()=>xr,video:()=>Cn,view:()=>vi,wbr:()=>va,webview:()=>Xi}),Yf=r();function Xf(e,t){if(e instanceof RegExp)return{keys:!1,pattern:e};var n,r,i,a,o=[],s=``,c=e.split(`/`);for(c[0]||c.shift();i=c.shift();)n=i[0],n===`*`?(o.push(n),s+=i[1]===`?`?`(?:/(.*))?`:`/(.*)`):n===`:`?(r=i.indexOf(`?`,1),a=i.indexOf(`.`,1),o.push(i.substring(1,~r?r:~a?a:i.length)),s+=~r&&!~a?`(?:/([^/]+?))?`:`/([^/]+?)`,~a&&(s+=(~r?`?`:``)+`\\`+i.substring(a))):s+=`/`+i;return{keys:o,pattern:RegExp(`^`+s+(t?`(?=$|/)`:`/?$`),`i`)}}var Zf=Rt(),Qf=Y.useInsertionEffect,$f=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0?Y.useLayoutEffect:Y.useEffect,ep=Qf||$f,tp=e=>{let t=Y.useRef([e,(...e)=>t[0](...e)]).current;return ep(()=>{t[0]=e}),t[1]},np=[`popstate`,`pushState`,`replaceState`,`hashchange`],rp=[],ip=()=>rp.forEach(e=>e()),ap=e=>(rp.push(e)===1&&np.forEach(e=>addEventListener(e,ip)),()=>{rp=rp.filter(t=>t!==e),rp.length||np.forEach(e=>removeEventListener(e,ip))}),op=(e,t)=>(0,Zf.useSyncExternalStore)(ap,e,t),sp=()=>location.search,cp=({ssrSearch:e}={})=>op(sp,e==null?sp:()=>e),lp=()=>location.pathname,up=({ssrPath:e}={})=>op(lp,e==null?lp:()=>e),dp=(e,{replace:t=!1,state:n=null}={})=>history[t?`replaceState`:`pushState`](n,``,e),fp=e=>[up(e),dp],pp=Symbol.for(`wouter_v3`);if(typeof history<`u`&&window[pp]===void 0){for(let e of[`pushState`,`replaceState`]){let t=history[e];history[e]=function(){let n=t.apply(this,arguments),r=new Event(e);return r.arguments=arguments,dispatchEvent(r),n}}Object.defineProperty(window,pp,{value:!0})}var mp=(e=``)=>e===`/`?``:e,hp=(e,t)=>e[0]===`~`?e.slice(1):mp(t)+e,gp=(e,t)=>(e=_p(mp(e)),t=_p(t),!e||(t.toLowerCase()+`/`).startsWith(e.toLowerCase()+`/`)?t.slice(e.length)||`/`:`~`+t),_p=e=>{try{return e.includes(`%`)?decodeURI(e):e}catch{return e}},vp={hook:fp,searchHook:cp,parser:Xf,base:``,ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:e=>e,aroundNav:(e,t,n)=>e(t,n)},yp=(0,Y.createContext)(vp),bp=()=>(0,Y.useContext)(yp);(0,Y.createContext)({});var xp=e=>{let[t,n]=e.hook(e);return[gp(e.base,t),tp((t,r)=>e.aroundNav(n,hp(t,e.base),r))]},Sp=()=>xp(bp());(0,Y.forwardRef)((e,t)=>{let n=bp(),[r,i]=xp(n),{to:a=``,href:o=a,onClick:s,asChild:c,children:l,className:u,replace:d,state:f,transition:p,...m}=e;return m.onClick=tp(t=>{t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||t.button!==0||(s?.(t),t.defaultPrevented||(t.preventDefault(),i(o,e)))}),m.href=n.hrefs(o[0]===`~`?o.slice(1):n.base+o,n),u!==void 0&&(m.className=u?.call?u(r===o):u),t&&(m.ref=t),c&&(0,Y.isValidElement)(l)?(0,Y.cloneElement)(l,m):(0,Y.createElement)(`a`,m,l)});function Cp(e=window){try{let t=e.parent,n=new URLSearchParams(e.location.search).get(`at`);if(t!==e&&t.location.origin===e.location.origin&&/^\/whiteboard\/[^/]+\/?$/.test(t.location.pathname)&&t.location.pathname===n)return t}catch{}return e}var wp=0,Tp=0,Ep=new Set;function Dp(){Tp||wp>0||Ep.size===0||(Tp=requestAnimationFrame(()=>{if(Tp=0,wp>0)return;let e=[...Ep];Ep.clear();for(let t of e)t()}))}function Op(){return wp+=1,()=>{--wp,Dp()}}function kp({label:e}){return(0,Y.useEffect)(Op,[]),(0,J.jsx)(c,{stack:!0,label:e,size:32})}var Ap={claude:`Claude Code`,codex:`Codex`,antigravity:`Antigravity`},jp=e=>e.kind!==`none`&&e.kind!==`login`,Mp=e=>e.kind===`quiet`||e.kind===`command`&&e.stuck===!0,Np={"needs-approval":0,running:1,thinking:2,"your-turn":3};function Pp(e,t){let n=e.filter(e=>t!==null&&e.artifacts.includes(t));if(n.length===0)return null;let r=n.sort((e,t)=>Np[e.state]-Np[t.state]);return{sessions:r,state:r[0].state,count:r.length}}var Fp={thinking:`agentStatus.thinking`,running:`agentStatus.running`,"your-turn":`agentStatus.yourTurn`,"needs-approval":`agentStatus.needsApproval`};async function Ip(e){let t=await fetch(`/api/agent/daemon`,{method:`POST`,credentials:`same-origin`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)}),n=await t.json().catch(()=>null);if(!t.ok||!n?.ok)throw Error(n?.error??`HTTP ${t.status}`);return n.data}function Lp(e){return{screen:async()=>{let t=await Ip({artifact:e,op:`agent-screen`});return Array.isArray(t?.lines)?t.lines.filter(e=>typeof e==`string`):[]},input:async t=>{await Ip({artifact:e,op:`agent-input`,...t})}}}var Rp=e=>new URLSearchParams(e).get(`agent`)===`1`,zp=new Set;function Bp(e){return zp.add(e),()=>{zp.delete(e)}}function Vp(e){for(let t of zp)t(e)}function Hp(e){return`${e.protocol===`https:`?`wss`:`ws`}://${e.host}/ws?at=${encodeURIComponent(e.pathname)}`}function Up(e,t){let[n,r]=(0,Y.useState)(!1),i=(0,Y.useRef)({onMessage:e,onOpen:t}),a=(0,Y.useRef)(null),o=(0,Y.useRef)([]);return i.current={onMessage:e,onOpen:t},(0,Y.useEffect)(()=>{let e=null,t,n=!1,s=()=>{e=new WebSocket(Hp(location)),a.current=e,e.onopen=()=>{r(!0),le();for(let t of o.current.splice(0))e?.send(t);i.current.onOpen?.()},e.onclose=()=>{r(!1),n||(t=setTimeout(s,1e3))},e.onmessage=e=>{let t=JSON.parse(String(e.data));i.current.onMessage(t),Ye(t),Vp(t)}};return s(),()=>{n=!0,clearTimeout(t),e?.close()}},[]),{live:n,send:(0,Y.useCallback)(e=>{let t=a.current,n=JSON.stringify(e);t?.readyState===WebSocket.OPEN?t.send(n):o.current.length<50&&o.current.push(n)},[])}}function Wp(){let[e,t]=(0,Y.useState)([]),[n,r]=(0,Y.useState)([]);return(0,Y.useEffect)(()=>{let e=null,n,i=!1,a=()=>{e=new WebSocket(Hp(location)),e.onmessage=e=>{let n=JSON.parse(String(e.data));n.type===`agent-status`&&(t(n.sessions),r(n.daemon??[]))},e.onclose=()=>{t([]),r([]),i||(n=setTimeout(a,1e3))}};return a(),()=>{i=!0,clearTimeout(n),e?.close()}},[]),{sessions:e,daemon:n}}var Gp=(0,Y.lazy)(()=>f(async()=>{let{AgentStatusPill:e}=await import(`./AgentStatusPill-DAWtJa6j.js`);return{AgentStatusPill:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]),import.meta.url).then(({AgentStatusPill:e})=>({default:e}))),Kp=(0,Y.lazy)(()=>f(async()=>{let{DaemonDock:e}=await import(`./DaemonDock-DxvtHALU.js`);return{DaemonDock:e}},__vite__mapDeps([26,1,27,12,4,28,8,9,2,3,5,6,7,10,11,13,14,15,16,17,18,19,20,21,22,23,24,25]),import.meta.url).then(({DaemonDock:e})=>({default:e}))),qp={claude:Ap.claude,codex:Ap.codex};function Jp({artifact:e}){let{t}=a(),{sessions:n,daemon:r}=Wp(),i=r.find(t=>t.artifact===e),o=(0,Y.useMemo)(()=>Lp(e),[e]);if(i){let r=Pp(n,e);return(0,J.jsx)(Y.Suspense,{fallback:null,children:(0,J.jsx)(Kp,{trusted:!0,agent:qp[i.harness]??i.harness,entry:i,idleLabel:t(Fp[r?.state??`running`]),transport:o})})}return n.length===0?null:(0,J.jsx)(Y.Suspense,{fallback:null,children:(0,J.jsx)(Gp,{artifact:e,sessions:n})})}var Yp=1e3,Xp=`ryugi:embed:hello`,Zp=`ryugi:embed:heartbeat`,Qp=`ryugi:embed:painted`,$p=`ryugi:embed:position`,em=`ryugi:embed:positioned`;function tm({parentOrigin:e,onPosition:t,win:n=window}){let r=(t,r)=>n.parent.postMessage({type:t,...r},e),i=i=>{if(i.origin!==e||i.source!==n.parent)return;let a=i.data;a?.type===$p&&a.anchor&&t&&t(a.anchor).then(()=>r(em))};n.addEventListener(`message`,i),r(Xp,t?{position:!0}:void 0);let a=setInterval(()=>r(Zp),Yp),o=!1;return{painted(){o||(o=!0,r(Qp))},close(){clearInterval(a),n.removeEventListener(`message`,i)}}}function nm(e=document,t=window,n){let r=e.documentElement.dataset.ryugiEmbedParent;return r?tm({parentOrigin:r,onPosition:n,win:t}):null}var rm=()=>new Promise(e=>requestAnimationFrame(()=>requestAnimationFrame(()=>e()))),im=e=>(De(e),rm()),am=(0,Y.createContext)(()=>{});function om(){let e=(0,Y.useRef)(null),t=(0,Y.useRef)(!1);return(0,Y.useEffect)(()=>{let n=nm(document,window,im);return e.current=n,t.current&&n?.painted(),()=>{n?.close(),e.current=null}},[]),(0,Y.useCallback)(()=>{t.current=!0,e.current?.painted()},[])}function sm(e){let t=(0,Y.useContext)(am);(0,Y.useEffect)(()=>{if(!e)return;let n=0,r=requestAnimationFrame(()=>{n=requestAnimationFrame(()=>{t(),Pe()&&Fe({kind:`painted`})})});return()=>{cancelAnimationFrame(r),cancelAnimationFrame(n)}},[e,t])}var cm=(0,Y.createContext)(null);function lm({pageWindow:e,children:t}){return(0,J.jsx)(cm.Provider,{value:e??null,children:t})}var um=()=>(0,Y.useContext)(cm)??window,dm=(0,Y.lazy)(()=>f(async()=>{let{AutoPublishBar:e}=await import(`./auto-publish-BGoEgSGM.js`);return{AutoPublishBar:e}},__vite__mapDeps([29,1,30,12,4,31,32,2,3,5,6,7]),import.meta.url).then(({AutoPublishBar:e})=>({default:e}))),fm=(0,Y.lazy)(()=>f(async()=>{let{SettingsDialog:e}=await import(`./settings-Bro-1ju5.js`);return{SettingsDialog:e}},__vite__mapDeps([33,1,34,5,4,3,10,2,6,7,11,12,13,14,18,35,36,37,38,27,39,40,31,32,41,19]),import.meta.url).then(({SettingsDialog:e})=>({default:e}))),pm=(0,Y.lazy)(()=>f(async()=>{let{ArtboardLayout:e}=await import(`./ArtboardLayout-C3GCvPqI.js`);return{ArtboardLayout:e}},__vite__mapDeps([42,1,10,2,3,4,5,6,7,11,12,13,14,43,44,45,46,47,22,17,18,48,36,49,50,51,52,15,53,35,54,55,56,16,57,58,59,60,38,19,61,62,63,64,9,65,66,67,27,68,30,69,70,28,71,31,32,41,39,72,73,74,75,37,24,76,77,78,79,80,81,82,83,84,20,21,85,86,87]),import.meta.url).then(({ArtboardLayout:e})=>({default:e}))),mm=(0,Y.lazy)(()=>f(async()=>{let{ArtifactList:e}=await import(`./ArtifactList-DwIi9u0A.js`);return{ArtifactList:e}},__vite__mapDeps([88,1,10,2,3,4,5,6,7,11,12,13,14,57,16,37,38,35,54,53,55,52,15,18,89,62,90,32,91,73,65,92,19,34,59,60,69,31,41,27,66,77,82]),import.meta.url).then(({ArtifactList:e})=>({default:e}))),hm=(0,Y.lazy)(()=>f(async()=>{let{DocumentLayout:e}=await import(`./DocumentLayout-BdqPj5rB.js`);return{DocumentLayout:e}},__vite__mapDeps([93,1,4,5,2,3,6,7]),import.meta.url).then(({DocumentLayout:e})=>({default:e}))),gm=(0,Y.lazy)(()=>f(async()=>{let{StoryboardLayout:e}=await import(`./StoryboardLayout-B64w5_fa.js`);return{StoryboardLayout:e}},__vite__mapDeps([94,1,4,67,2,3,5,6,7,10,11,12,13,14,52,15,53,18,35,27,68,54,55,30,69,70,28,50,71,31,32,41,39,19,86,95,47,96,92,76,77,97,83,75,98,9,16,17,99,64,62,100,101,84,45,36,49,90,63,102,74,103]),import.meta.url).then(({StoryboardLayout:e})=>({default:e}))),_m=(0,Y.lazy)(()=>f(async()=>{let{StoryboardRenderLayout:e}=await import(`./StoryboardRender-D--GwVc5.js`);return{StoryboardRenderLayout:e}},__vite__mapDeps([104,1,95,2,3,4,5,6,7,47,96,86,32]),import.meta.url).then(({StoryboardRenderLayout:e})=>({default:e}))),vm=(0,Y.lazy)(()=>f(async()=>{let{PreviewArtifactLayout:e}=await import(`./PreviewArtifactLayout-5vJjhU_q.js`);return{PreviewArtifactLayout:e}},__vite__mapDeps([105,1,4,10,2,3,5,6,7,11,12,13,14,32,62,52,15,53,18,35,59,60,38,57,16,37,106,74,61,107,78,91,108,101,84,24,19,64,9,17,92,22]),import.meta.url).then(({PreviewArtifactLayout:e})=>({default:e}))),ym=(0,Y.lazy)(()=>f(async()=>{let{ReportLayout:e}=await import(`./ReportLayout-DsbF0IvL.js`);return{ReportLayout:e}},__vite__mapDeps([109,1,67,2,3,4,5,6,7,10,11,12,13,14,52,15,53,18,35,27,68,54,55,30,69,70,28,50,71,31,32,41,39,19,86,110,99,92,96,76,77,108,101,84,62,24,9,16,17,47,64]),import.meta.url).then(({ReportLayout:e})=>({default:e}))),bm=(0,Y.lazy)(()=>f(async()=>{let{HtmlLayout:e}=await import(`./HtmlLayout-D__lgqX6.js`);return{HtmlLayout:e}},__vite__mapDeps([111,1,4,92,52,2,3,5,6,7,10,11,12,13,14,15,53,18,35,19,96,76,77,67,27,68,54,55,30,69,70,28,50,71,31,32,41,39,86]),import.meta.url).then(({HtmlLayout:e})=>({default:e}))),xm=(0,Y.lazy)(()=>f(async()=>{let{SlidesLayout:e}=await import(`./SlidesLayout-BKPSVM9Q.js`);return{SlidesLayout:e}},__vite__mapDeps([112,1,67,2,3,4,5,6,7,10,11,12,13,14,52,15,53,18,35,27,68,54,55,30,69,70,28,50,71,31,32,41,39,19,86,113,114,115,96,76,77,47,92,24,64,62,9,16,17,51,56,57,116,99,63,117,65,59,60,38,37,102,90,36,78,21,84,80,106,74,75,118,45,119,20,79,98,101,120]),import.meta.url).then(({SlidesLayout:e})=>({default:e}))),Sm=(0,Y.lazy)(()=>f(async()=>{let{VerifyLayout:e}=await import(`./VerifyLayout-6HdIyeTC.js`);return{VerifyLayout:e}},__vite__mapDeps([121,1,67,2,3,4,5,6,7,10,11,12,13,14,52,15,53,18,35,27,68,54,55,30,69,70,28,50,71,31,32,41,39,19,122,123,124,65,63,125,116,72,73,103,36,74,56,90,102,60,38,126,127,117,80,128,99,118,64,62,9,16,17,89,45,100,98,44,22,24,20,21,96,23,40,114,129,81,82,47,130,131]),import.meta.url).then(({VerifyLayout:e})=>({default:e}))),Cm=(0,Y.lazy)(()=>f(async()=>{let{WhiteboardLayout:e}=await import(`./WhiteboardLayout-B6E-yN7C.js`);return{WhiteboardLayout:e}},__vite__mapDeps([132,1,133,124,2,3,4,5,6,7,10,11,12,13,14,52,15,53,18,35,65,68,63,125,55,116,72,73,103,36,28,74,56,90,102,60,38,126,115,24,71,32,48,17,22,9,16,19,79,64,62,40,58,59,99,134]),import.meta.url).then(({WhiteboardLayout:e})=>({default:e}))),wm=(0,Y.lazy)(()=>Promise.all([f(()=>import(`./split-lgGPI5_J.js`),__vite__mapDeps([135,1,114,10,2,3,4,5,6,7,11,12,13,14,77,127,84,97,125,128,80,118,21,119,53,59,60,38,19,136,110,137,24,130,134,138]),import.meta.url),f(()=>import(`./local-split-host-gT7PINON.js`).then(e=>e.n),__vite__mapDeps([113,1,114,10,2,3,4,5,6,7,11,12,13,14,32]),import.meta.url)]).then(([{SplitShell:e},{localSplitHost:t}])=>({default:n=>(0,J.jsx)(e,{...n,host:t})}))),Tm=(0,Y.lazy)(()=>f(async()=>{let{PreviewLayout:e}=await import(`./PreviewLayout-CLb0kSHa.js`).then(e=>e.n);return{PreviewLayout:e}},__vite__mapDeps([139,1,4,32,2,3,5,6,7,43]),import.meta.url).then(({PreviewLayout:e})=>({default:e}))),Em=(e,t)=>(0,J.jsxs)(J.Fragment,{children:[e,(0,J.jsx)(dm,{}),(0,J.jsx)(fm,{}),t&&(0,J.jsx)(Jp,{artifact:t})]});function Dm({id:e,type:t}){let n=om();return(0,J.jsxs)(am,{value:n,children:[Rp(location.search)&&(0,J.jsx)(Jp,{artifact:`${t}/${e}`}),t===`whiteboard`?(0,J.jsx)(lm,{pageWindow:Cp(),children:(0,J.jsx)(Cm,{id:e})}):t===`document`?(0,J.jsx)(hm,{id:e}):t===`verify`?(0,J.jsx)(Sm,{id:e}):t===`slides`?(0,J.jsx)(xm,{id:e}):(0,J.jsx)(pm,{id:e})]})}function Om(){let[e]=Sp(),t=s(e);if((0,Y.useEffect)(()=>{if(!document.documentElement.dataset.ryugiArtifactId)return;let e=document.querySelector(`link[rel="canonical"]`);if(!e)return;let t=new URL(location.href);t.pathname=u(t.pathname,new URL(e.href).pathname),t.href!==location.href&&history.replaceState(history.state,``,t)},[]),(0,Y.useEffect)(()=>{window.scrollTo(0,0)},[e]),t.kind===`list`)return Em((0,J.jsx)(mm,{}));if(t.kind===`unknown`)return(0,J.jsx)(`div`,{className:`x78zum5 x6s0dn4 xl56j7k x5yr21d xggk2y7 x1bo0w0s xqfszdh xif65rj`,children:`No artifact lives at this address.`});let n=document.documentElement.dataset.ryugiArtifactId??t.id;return t.kind===`preview`?(0,J.jsx)(Tm,{id:n,type:t.type}):t.kind===`dev-preview`?Em((0,J.jsx)(vm,{id:n}),`preview/${n}`):t.kind===`embed`?(0,J.jsx)(Dm,{id:n,type:t.type}):t.kind===`render`?(0,J.jsx)(_m,{id:n}):t.type===`html`?Em((0,J.jsx)(bm,{id:n}),`html/${n}`):t.type===`slides`?Em((0,J.jsx)(xm,{id:n}),`slides/${n}`):t.type===`report`?Em((0,J.jsx)(ym,{id:n}),`report/${n}`):t.type===`storyboard`?Em((0,J.jsx)(gm,{id:n}),`storyboard/${n}`):Em((0,J.jsx)(wm,{id:n,split:Ve(t,location.search)?.split??null,type:t.type}),`${t.type}/${n}`)}function km(){return(0,J.jsx)(Y.Suspense,{fallback:(0,J.jsx)(`div`,{className:`x78zum5 x6s0dn4 xl56j7k x5yr21d xggk2y7 x1bo0w0s xqfszdh xif65rj`,children:(0,J.jsx)(kp,{label:o(`common.loading`)})}),children:(0,J.jsx)(Om,{})})}fe(),document.documentElement.lang=d[l.language];function Am(){return i(),(0,J.jsx)(Cl,{features:eu,children:(0,J.jsxs)(h,{enableCustomFonts:!1,motion:Jf,children:[(0,J.jsx)(km,{}),(0,J.jsx)(b,{}),(0,J.jsx)(Gf,{}),(0,J.jsx)(pd,{})]})})}(0,Yf.createRoot)(document.getElementById(`root`)).render((0,J.jsx)(Y.StrictMode,{children:(0,J.jsx)(Am,{})}));export{Bu as _,Fp as a,jp as c,md as d,X as f,qu as g,td as h,Up as i,kp as l,Ju as m,sm as n,Pp as o,Yu as p,Bp as r,Mp as s,um as t,Uf as u,iu as v};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./AgentStatusPill-DAWtJa6j.js","./rolldown-runtime-XKyaHtl9.js","./route-B6Gy6qbG.js","./bem-vbke-3KC.js","./react-DlmbjZJV.js","./jsx-runtime-LKYXHABd.js","./types-DAs-xbqr.js","./index2.css","./PhoneSheet-Dw5FZaWB.js","./labels-CzulV_px.js","./url-D_8ADw-d.js","./mergeRefs-BoWyGCK7.js","./MotionConfigContext-B3czw3wn.js","./useLayerZIndex-DtrqDMJQ.js","./is-html-element-DvgHo_1h.js","./arrow-up-kdcWAnXX.js","./stable-D2Sem6Uq.js","./icons-C1X6qzJA.js","./Center-BYaMwBHF.js","./index5.css","./BottomSheet-DVLNZy5T.js","./motion-Cy65kd7X.js","./tokens.stylex-BC4Dqomt.js","./read-resolutions-BjoBXBzQ.js","./useMedia-CFebB4XU.js","./titlePrefix-DBqLIMmC.js","./DaemonDock-DxvtHALU.js","./arrow-up-right-DsiCnDly.js","./minus-DceUlv_8.js","./auto-publish-BGoEgSGM.js","./cloud-upload-DClbwO_k.js","./useCloudStatus-xw4KCWoj.js","./api-D1I2xerd.js","./settings-Bro-1ju5.js","./Avatar-giPMMmND.js","./isElementDisabled-DWHaZxJe.js","./maximize-2-BEWXAYRs.js","./Segmented-DFRuZpmD.js","./CompositeItem-StolddT2.js","./CloudLegalNotice-B5qaVKhN.js","./preference-oNdcNeml.js","./urls-QTt_JckQ.js","./ArtboardLayout-C3GCvPqI.js","./view-BWqPE5uB.js","./rounds-BLj-tfMG.js","./sliders-horizontal-BD0nAOF2.js","./Canvas-PYYIhPGi.js","./cssVar.stylex-CGbpAC1Y.js","./WritingCursor-BKFBNgii.js","./PlaybackIcon-CRhSd8TP.js","./elements-Coqr6-Yv.js","./snap-DsYxYv3g.js","./Popover-CJ0gdqcV.js","./parseTrigger-DZ1BZooT.js","./Select-DpNyeTVM.js","./SelectScrollUpArrow-fWLS3TrK.js","./stringifyLocale-Dx2d4AZJ.js","./Input-BtshT4F-.js","./PhoneArtboardBar-KfL9gZmt.js","./DropdownMenu-RmsRgmip.js","./MenuTrigger-CehTuNUM.js","./crop-encode-B2y3y2Tu.js","./ActionIcon-DG4GtZnA.js","./ellipsis-BN0LovOQ.js","./ThreadView-DkD9riIW.js","./type-DA3yqyzM.js","./folder-DAgV-D-C.js","./PublishMenu-DhM6f1OB.js","./lock-BT0nNVMN.js","./globe-IX-8l1m2.js","./link-2-CdvyBGG6.js","./usePageQuery-h2vHVMBa.js","./ruler-C-6kncvn.js","./image-DSbKs3OG.js","./mouse-pointer-2-FWjclmSy.js","./play-BT1pPvq4.js","./useTypeFavicon-yXOsFZBx.js","./type-icons-CxYXZlMj.js","./ActionBar-C1NZNCed.js","./CommentPopover-Bknl07N5.js","./file-text-CBItcVAp.js","./GroupVerdict-_SSrXi_d.js","./artifact-list-jCg51-uV.js","./film-DVL7eEoM.js","./chevron-left-BwjnhkoQ.js","./selection-BWCQd_Fn.js","./useArtifactFeed-CybMPkiU.js","./ArtboardLayout-DLyi-yDq.css","./ArtifactList-DwIi9u0A.js","./search-ClR54veT.js","./plus-DOEIgzPd.js","./RyugiMark-BEeVxWmj.js","./WarningsBadge-C-GtoU_2.js","./DocumentLayout-BdqPj5rB.js","./StoryboardLayout-B64w5_fa.js","./useStoryboardData-DTrVGTKZ.js","./useSandboxFrame-CJmSnwgG.js","./clapperboard-BOY4Zk3L.js","./video-AtRALBjj.js","./message-square-D1ap_NhC.js","./upload-Prmd81Mo.js","./DraggablePanel-Dzau7cJ9.js","./trash-BZS14NA2.js","./zoom-out-DsqNailP.js","./StoryboardRender-D--GwVc5.js","./PreviewArtifactLayout-5vJjhU_q.js","./monitor-Clr3Uc8A.js","./rotate-cw-Cj00Ku5M.js","./SideDrawer-CcVLCyxN.js","./ReportLayout-DsbF0IvL.js","./rotate-ccw-clock-CzXnXfrp.js","./HtmlLayout-D__lgqX6.js","./SlidesLayout-B1JTgUF3.js","./local-split-host-gT7PINON.js","./ref-Baf-n0ZY.js","./pages-DWkRbog-.js","./text-align-start-CvIfWAwj.js","./underline-D5npPcgf.js","./presentation-CrG2a4R-.js","./DocumentExportMenu-BiLgwhlP.js","./SlidesLayout-Bjds2UXz.css","./VerifyLayout-6HdIyeTC.js","./useAssetBase-4Ut9QhBI.js","./editor-8fbpiJTJ.js","./WhiteboardEditor-cZ32fLqJ-BKiZCIVm.js","./code-DZDLeByL.js","./index3.css","./pen-tool-BwPmMqqj.js","./external-link-CxwFOzUH.js","./index4.css","./fit-BLbHgoq2.js","./VerifyLayout-B9e4RHAZ.css","./WhiteboardLayout-Dnahdu0L.js","./shims-s-YVfIlz.js","./backlinks-C_k8-LL2.js","./WhiteboardLayout-BXSq3hNU.css","./split-lgGPI5_J.js","./route-messages-DUFEk5X8.js","./SplitFrame-DbmgtHiR.js","./split-C1umM5Fz.css","./PreviewLayout-CLb0kSHa.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as e,r as t}from"./rolldown-runtime-XKyaHtl9.js";import{C as n,_ as r,g as i,h as a,m as o,n as s,o as c,p as l,t as u,v as d,y as f}from"./route-B6Gy6qbG.js";/* empty css */import{$ as p,An as m,Ar as h,At as g,Bt as _,Cr as v,Ct as y,D as b,Dn as x,Dt as S,Et as C,Fn as w,Ft as T,Gn as E,Gt as D,H as O,Ht as k,It as A,Jn as j,Kt as M,Ln as ee,Lt as te,Mt as N,Nn as ne,Nt as re,Ot as ie,Pn as ae,Pt as oe,Q as se,Rn as ce,S as le,Sr as ue,St as de,T as fe,Tr as pe,Tt as me,U as he,Ut as P,Vt as ge,W as _e,Wn as ve,Wt as ye,_t as be,at as F,bn as xe,bt as Se,dt as Ce,et as we,ft as Te,gt as Ee,h as De,ht as Oe,ir as ke,it as Ae,jn as je,jt as Me,kt as Ne,l as Pe,m as Fe,mt as Ie,nt as Le,on as Re,ot as I,pt as ze,qn as Be,r as Ve,rt as He,st as Ue,tt as We,vn as Ge,vt as Ke,wr as qe,wt as Je,x as Ye,xn as Xe,xr as Ze,xt as Qe,yn as $e,yt as et,zt as tt}from"./url-D_8ADw-d.js";import{$ as nt,K as rt,Q as it,U as at,at as L,c as ot,ct as st,it as ct,l as lt,o as ut,ot as R,r as dt,rt as ft,s as pt,u as mt}from"./mergeRefs-BoWyGCK7.js";import{n as ht,r as z,t as gt}from"./bem-vbke-3KC.js";import{t as _t}from"./react-DlmbjZJV.js";import{Dn as vt,Ft as yt,J as bt,Jn as xt,Mt as St,Nt as Ct,Q as wt,Rn as Tt,Tn as Et,Vt as Dt,an as Ot,b as kt,bn as At,g as jt,in as Mt,n as Nt,on as Pt,rn as Ft,t as It,wn as Lt,x as Rt}from"./useLayerZIndex-DtrqDMJQ.js";import{t as zt}from"./jsx-runtime-LKYXHABd.js";import{$ as Bt,B as Vt,Ct as Ht,G as Ut,I as Wt,J as Gt,M as Kt,N as qt,P as Jt,St as Yt,Tt as Xt,U as B,W as V,_t as Zt,a as Qt,bt as $t,c as en,ct as tn,d as nn,dt as H,et as rn,gt as an,h as on,ht as sn,i as cn,l as ln,m as un,mt as dn,o as fn,p as pn,r as mn,s as hn,st as gn,t as _n,u as vn,ut as yn,wt as bn,xt as xn}from"./MotionConfigContext-B3czw3wn.js";import{$ as Sn,$n as Cn,$t as wn,A as Tn,An as En,At as Dn,B as On,Bn as kn,Bt as An,C as jn,Cn as Mn,Cr as Nn,Ct as Pn,D as Fn,Dn as In,Dt as Ln,E as Rn,En as zn,Et as Bn,F as Vn,Fn as Hn,Ft as Un,G as Wn,Gn,Gt as Kn,H as qn,Hn as Jn,Ht as Yn,I as Xn,In as Zn,It as Qn,J as $n,Jn as er,Jt as tr,K as nr,Kn as rr,Kt as ir,L as ar,Ln as or,Lt as sr,M as cr,Mn as lr,Mt as ur,N as dr,Nn as fr,Nt as pr,O as mr,On as hr,Ot as gr,P as _r,Pn as vr,Pt as yr,Q as br,Qn as xr,Qt as Sr,R as Cr,Rn as wr,Rt as Tr,S as Er,Sn as Dr,Sr as Or,St as kr,T as Ar,Tn as jr,Tr as Mr,Tt as Nr,U as Pr,Un as Fr,Ut as Ir,V as Lr,Vn as Rr,Vt as zr,W as Br,Wn as Vr,Wt as Hr,X as Ur,Xn as Wr,Xt as Gr,Y as Kr,Yn as qr,Yt as Jr,Z as Yr,Zn as Xr,Zt as Zr,_ as Qr,_n as $r,_r as ei,_t as ti,a as ni,an as ri,ar as ii,at as ai,b as oi,bn as si,br as U,bt as ci,c as li,cn as ui,cr as di,ct as fi,d as pi,dn as mi,dr as hi,dt as gi,en as _i,er as vi,et as yi,f as bi,fn as xi,fr as Si,ft as Ci,g as wi,gn as Ti,gr as Ei,gt as Di,h as Oi,hn as ki,ht as Ai,i as ji,in as Mi,ir as Ni,it as Pi,j as Fi,jn as Ii,jt as Li,k as Ri,kn as zi,kt as Bi,l as Vi,ln as Hi,lr as Ui,lt as Wi,m as Gi,mn as Ki,mt as qi,n as Ji,nn as Yi,nr as Xi,nt as Zi,o as Qi,on as $i,or as ea,ot as ta,p as na,pn as ra,pt as ia,q as aa,qn as oa,qt as sa,r as ca,rn as la,rr as ua,rt as da,s as fa,sn as pa,sr as ma,st as ha,t as ga,tn as _a,tr as va,tt as ya,u as ba,un as xa,ur as Sa,ut as Ca,v as wa,vn as Ta,vr as Ea,vt as Da,w as Oa,wn as ka,wr as Aa,wt as ja,x as Ma,xn as Na,xr as Pa,xt as Fa,y as Ia,yn as La,yr as Ra,yt as za,z as Ba,zn as Va,zt as Ha}from"./elements-Coqr6-Yv.js";import{t as Ua}from"./is-html-element-DvgHo_1h.js";var Wa={name:`circle-check-big`,size:24,node:[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]],aliases:[`check-circle`]};Wa.node;var Ga=Xt(Wa),Ka={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};Ka.node;var qa=Xt(Ka);function Ja(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}function Ya(e,t,n){return Mr(e.getProps(),t,n,e)}var Xa=(e,t)=>t===`exit`?e.presenceContext?.custom:void 0,Za=e=>Array.isArray(e);function Qa(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,un(n))}function $a(e){return Za(e)?e[e.length-1]||0:e}function eo(e,t){let{transitionEnd:n={},transition:r={},...i}=Ya(e,t)||{};i={...i,...n};for(let t in i)Qa(e,t,$a(i[t]))}function to(e){return!!(nn(e)&&e.add)}function no(e,t){let n=e.getValue(`willChange`);if(to(n))return n.add(t);if(!n&&$t.WillChange){let n=new $t.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function ro(e){return e.props[Aa]}var io=typeof window<`u`;function ao({protectedKeys:e,needsAnimating:t},n){let r=n in e&&!t[n];return t[n]=!1,r}function oo(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?te(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState?.getState()[i],p=a?.path;p&&(p.animateValues?p.animateValues(t=>e.getValue(t,e.latestValues[t]??0),s,a,n,d):p.animateVisualElement?.(e,s,a,n,d));for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&ao(f,t))continue;let o={delay:n,...A(f?.out[t]||a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){V.update(()=>r.set(i));continue}let p=!1;if(io&&window.MotionHandoffAnimation){let n=ro(e);if(n){let e=window.MotionHandoffAnimation(n,t,V);e!==null&&(o.startTime=e,p=!0)}}no(e,t);let m=l??e.shouldReduceMotion;r.run(T(t,r,i,m&&re.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>V.update(()=>{o&&eo(e,o)});d.length?Promise.all(d).then(t):t()}return d}function so(e,t,n={}){let r=Ya(e,t,Xa(e,n.type)),i=n.transitionOverride||(r?.transition??(e.getDefaultTransition()||{})),a=()=>Promise.all(r?oo(e,r,n):[]),o=(r=0)=>{let{variantChildren:a}=e,{delayChildren:o=0,staggerChildren:s,staggerDirection:c}=i,l=[];return a?.forEach(e=>{e.notify(`AnimationStart`,t),l.push(so(e,t,{...n,delay:r+(typeof o==`function`?0:o)+Ja(a,e,o,s,c)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(l)},{when:s}=i;return s?s===`beforeChildren`?a().then(()=>o()):o().then(a):Promise.all([a(),o(n.delay)])}function co(e,t,n={}){return e.notify(`AnimationStart`,t),(Array.isArray(t)?Promise.all(t.map(t=>so(e,t,n))):typeof t==`string`?so(e,t,n):Promise.all(oo(e,Ya(e,t,n.custom),n))).then(()=>{e.notify(`AnimationComplete`,t)})}var lo=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`],uo={value:null,addProjectionMetrics:null,countProjection:void 0};function fo(e,t){let n=yn.now();e=g(e);let r=({timestamp:i})=>{let a=i-n;a>=t&&(B(r),e(a-t))};return V.setup(r,!0),Ne(()=>B(r))}function po(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function mo(e){return Me(e)&&e.tagName===`svg`}var ho=e=>typeof e==`number`?e:parseFloat(e),go=lo.length,_o=e=>typeof e==`number`||rn.test(e);function vo(e,t,n,r,i,a){i?(e.opacity=P(0,n.opacity??1,bo(r)),e.opacityExit=P(t.opacity??1,0,xo(r))):a&&(e.opacity=P(t.opacity??1,n.opacity??1,r));for(let i=0;i<go;i++){let a=lo[i],o=yo(t,a),s=yo(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||_o(o)===_o(s)?(e[a]=Math.max(P(ho(o),ho(s),r),0),(Bt.test(s)||Bt.test(o))&&(e[a]+=`%`)):e[a]=s)}for(let i=0;i<Se.length;i++){let a=Se[i];(t[a]||n[a])&&(e[a]=P(t[a]||0,n[a]||0,r))}}function yo(e,t){return e[t]===void 0?e.borderRadius:e[t]}var bo=So(0,.5,ye),xo=So(.5,.95,Zt);function So(e,t,n){return r=>r<e?0:r>t?1:n(D(e,t,r))}var Co=(e,t,{x:n,y:r})=>{let i=e*e+t*t;return i<1?0:-1e3*(n*e+r*t)/i},wo=(e,t=300)=>{let n=xn(.25,2,t/300),{stiffness:r,damping:i}=_({...e,duration:e.duration&&sn(e.duration)});return{...e,stiffness:r,damping:i*Math.sqrt(n),mass:n}};function To(e,t){e.min=t.min,e.max=t.max}function W(e,t){To(e.x,t.x),To(e.y,t.y)}function Eo(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Do=.9999,Oo=1.0001,ko=-.01,Ao=.01;function G(e){return e.max-e.min}function jo(e,t,n){return Math.abs(e-t)<=n}function Mo(e,t,n,r=.5){e.origin=r,e.originPoint=P(t.min,t.max,e.origin),e.scale=G(n)/G(t),e.translate=P(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Do&&e.scale<=Oo||isNaN(e.scale))&&(e.scale=1),(e.translate>=ko&&e.translate<=Ao||isNaN(e.translate))&&(e.translate=0)}function No(e,t,n,r){Mo(e.x,t.x,n.x,r?.originX),Mo(e.y,t.y,n.y,r?.originY)}function Po(e,t,n,r=0){e.min=(r?P(n.min,n.max,r):n.min)+t.min,e.max=e.min+G(t)}function Fo(e,t,n,r){Po(e.x,t.x,n.x,r?.x),Po(e.y,t.y,n.y,r?.y)}function Io(e,t,n,r=0){let i=r?P(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+G(t)}function Lo(e,t,n,r){Io(e.x,t.x,n.x,r?.x),Io(e.y,t.y,n.y,r?.y)}function Ro(e,t,n,r,i){return e-=t,e=be(e,1/n,r),i!==void 0&&(e=be(e,1/i,r)),e}function zo(e,t=0,n=1,r=.5,i,a=e,o=e){if(Bt.test(t)&&(t=parseFloat(t),t=P(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=P(a.min,a.max,r);e===a&&(s-=t),e.min=Ro(e.min,t,n,s,i),e.max=Ro(e.max,t,n,s,i)}function Bo(e,t,[n,r,i],a,o){zo(e,t[n],t[r],t[i],t.scale,a,o)}var Vo=[`x`,`scaleX`,`originX`],Ho=[`y`,`scaleY`,`originY`];function Uo(e,t,n,r){Bo(e.x,t,Vo,n?.x,r?.x),Bo(e.y,t,Ho,n?.y,r?.y)}var Wo=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Go=Wo(`applewebkit/`)&&!Wo(`chrome/`)?Math.round:Zt;function Ko(e){e.min=Go(e.min),e.max=Go(e.max)}function qo(e){Ko(e.x),Ko(e.y)}function Jo(e){return e.translate===0&&e.scale===1}function Yo(e){return Jo(e.x)&&Jo(e.y)}function Xo(e,t){return e.min===t.min&&e.max===t.max}function Zo(e,t){return Xo(e.x,t.x)&&Xo(e.y,t.y)}function Qo(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function $o(e,t){return Qo(e.x,t.x)&&Qo(e.y,t.y)}function es(e){return G(e.x)/G(e.y)}function ts(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var ns=class{constructor(){this.members=[]}add(e){Yt(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;r&&r.isConnected!==!1||n.snapshot||(bn(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(bn(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}};function rs(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var is={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(rn.test(e))e=parseFloat(e);else return e}return`${rs(e,t.target.x)}% ${rs(e,t.target.y)}%`}},as={borderRadius:Object.assign({},is,{applyTo:lo.slice()}),borderTopLeftRadius:is,borderTopRightRadius:is,borderBottomLeftRadius:is,borderBottomRightRadius:is,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=Gt.parse(e);if(i.length>5)return r;let a=Gt.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=P(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}}};function os(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;(i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `);let s=``;if(n){let{transformPerspective:e}=n;e&&(r=`perspective(${e}px) ${r}`);for(let e=0;e<Se.length;e++){let t=Se[e],r=n[t];r&&(s+=`${t}(${r}deg) `),!e&&n.pathRotation&&(s+=`rotate(${n.pathRotation}deg) `)}}if(s){(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),r+=s;let n=e.x.scale*t.x,i=e.y.scale*t.y;(n!==1||i!==1)&&(r+=`scale(${n}, ${i})`)}else e.x.scale!==1||e.y.scale!==1?r+=`scale(${e.x.scale}, ${e.y.scale})`:r||t.x===1&&t.y===1||(r=`scale(1, 1)`);return r||`none`}function K(e){return[e(`x`),e(`y`)]}var ss=(e,t)=>e.depth-t.depth,cs=class{constructor(){this.children=[],this.isDirty=!1}add(e){Yt(this.children,e),this.isDirty=!0}remove(e){bn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ss),this.isDirty=!1,this.children.forEach(e)}},ls={hasAnimatedSinceResize:!0,hasEverUpdated:!1},us=[`z`,`skew`,`skewZ`],ds=1e3,fs=0;function ps(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}var ms=e=>e.instance&&on.get(e.instance)?.demote()&&e.resetSkewAndRotation();function hs(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=ro(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,V,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&hs(r)}function gs(e){if(e)return e.options.allowProjection===!1?gs(e.parent):e.projection}function _s({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return Object.assign(Nn,{...as,...Nn}),class{static create(e,t,n){let{layoutId:r,layout:i,drag:a,dragConstraints:o,layoutScroll:s,layoutRoot:c,layoutAnchor:l,layoutCrossfade:u}=t,d=e.projection=new this(e.latestValues,t[`data-framer-portal-id`]?void 0:gs(e.parent));d.setOptions({layoutId:r,layout:i,alwaysMeasureLayout:!!a||o&&po(o),visualElement:e,animationType:typeof i==`string`?i:`both`,initialPromotionConfig:n,crossfade:u,layoutScroll:s,layoutRoot:c,layoutAnchor:l});let f=d.getStack()?.lead;f&&!d.root.isUpdateBlocked()&&(f.willUpdate(),f.scheduleCheckAfterUnmount())}constructor(e={},n=t?.()){this.id=fs++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(bs),this.nodes.forEach(js),this.nodes.forEach(Ms),this.nodes.forEach(xs),uo.countProjection?.()},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new cs)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new an),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){this.eventHandlers.get(e)?.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=Me(t)&&!mo(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent?.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;V.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n?.(),n=fo(i,250),ls.hasAnimatedSinceResize&&(ls.hasAnimatedSinceResize=!1,this.nodes.forEach(As)))})}n&&this.root.registerSharedNode(n,this),this.addLayoutListener()}addLayoutListener(){let{layoutId:e,layout:t,visualElement:n,animate:r}=this.options;this.instance&&!this.hasLayoutListener&&r!==!1&&n&&(e||t)&&(this.hasLayoutListener=!0,this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:r,layout:i})=>{if(this.isAnimationBlocked){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||n.getDefaultTransition()||zs,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=n.getProps(),c=!this.targetLayout||!$o(this.targetLayout,i),l=!t&&r;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...A(a,`layout`),onPlay:o,onComplete:s};(n.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||As(this),this.isLead()&&this.options.onExitComplete?.();this.targetLayout=i}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),this.getStack()?.remove(this),this.parent?.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),this.hasLayoutListener=!1,B(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes?.forEach(Ns),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete?.();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&hs(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;ms(this),this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,ms(t),(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1),t.isAnimationBlocked&&(t.dragSnapshot||=t.measure(),this.dragAncestor=t)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(ws),this.nodes.forEach(Cs);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ts);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ds),this.nodes.forEach(Os),this.nodes.forEach(ks),this.nodes.forEach(vs),this.nodes.forEach(ys)):this.nodes.forEach(Ts),this.clearAllSnapshots();let e=yn.now();H.delta=xn(0,1e3/60,e-H.timestamp),H.timestamp=e,H.isProcessing=!0,Ut.update.process(H),Ut.preRender.process(H),Ut.render.process(H),H.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,hn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ss),this.sharedNodes.forEach((e,t)=>e.members.length?e.removeLeadSnapshot():this.sharedNodes.delete(t))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,V.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){V.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!G(this.snapshot.measuredBox.x)&&!G(this.snapshot.measuredBox.y)&&(this.snapshot=void 0),this.snapshot)){let{visualElement:e}=this.options,t=this.currentAnimation?.state===`running`,n=t&&this.animationEdges;t&&this.relativeTarget&&(this.snapshot.relativeVelocity=this.relativeVelocity?.slice()||[]);let r=n&&this.motionValue?.getVelocity()||0,i=[0,1,2,3,4,5].map(t=>(t<4?n&&(this.edgeValues?this.edgeVelocity(t):-n[t]*r/1e3):e?.getValue(t<5?`x`:`y`)?.getVelocity())||0);i.some(Boolean)&&(this.snapshot.velocity=i)}}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected||=U(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t?.notify(`LayoutMeasure`,this.layout.layoutBox,e?.layoutBox)}updateScroll(e=`measure`){let{scroll:t,instance:i}=this,{animationId:a}=this.root;if(this.options.layoutScroll&&i&&!(t&&t.animationId===a&&t.phase===e)){let o=r(i);this.scroll={animationId:a,phase:e,isRoot:o,offset:n(i),wasRoot:t?t.isRoot:o}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout;e&&ms(this);let t=this.projectionDelta&&!Yo(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Je(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),qo(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return U();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Hs))){let{scroll:e}=this.root;e&&(et(t.x,e.offset.x),et(t.y,e.offset.y))}return t}removeElementScroll(e){let t=U();if(W(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&W(t,e),et(t.x,i.offset.x),et(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n,r,i=0){let a=n||U();W(a,e);for(let e=i;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(et(a.x,-n.scroll.offset.x),et(a.y,-n.scroll.offset.y)),Je(n.latestValues)&&Ke(a,n.latestValues,n.layout?.layoutBox)}return!r&&Je(this.latestValues)&&Ke(a,this.latestValues,this.layout?.layoutBox),a}removeTransform(e){let t=U();W(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!Je(n.latestValues))continue;let r;n.instance&&(y(n.latestValues)&&n.updateSnapshot(),r=U(),W(r,n.measurePageBox())),Uo(t,n.latestValues,n.snapshot?.layoutBox,r)}return Je(this.latestValues)&&Uo(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade},this.addLayoutListener()}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==H.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=H.timestamp;let a=this.getClosestProjectingParent();!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=U(),this.targetWithTransforms=U()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Fo(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target,!0):W(this.target,this.layout.layoutBox),Oe(this.target,this.targetDelta)):W(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&(!a.resumingFrom==!this.resumingFrom||a.options.layoutRoot&&!a.resumingFrom)&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),uo.countProjection?.(1))}getClosestProjectingParent(){if(!(!this.parent||y(this.parent.latestValues)||Qe(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=U(),this.relativeTargetOrigin=U(),Lo(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),W(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===H.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent?.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;W(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Ee(this.layoutCorrected,this.treeScale,this.path,t&&(e.relativeTarget&&!e.relativeParent.resumingFrom?e.relativeParent:!0)),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=U());let{target:s}=e;s?(!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Eo(this.prevProjectionDelta.x,this.projectionDelta.x),Eo(this.prevProjectionDelta.y,this.projectionDelta.y)),No(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===a&&this.treeScale.y===o&&ts(this.projectionDelta.x,this.prevProjectionDelta.x)&&ts(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),uo.countProjection?.(2)):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){this.options.visualElement?.scheduleRender(),e&&this.getStack()?.scheduleRender(),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Pa(),this.projectionDelta=Pa(),this.projectionDeltaWithTransform=Pa()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=Pa();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=U(),c=r?.source!==this.layout?.source,l=this.getStack(),u=!l||l.members.length<=1,d=!(!c||u||this.options.crossfade!==!0||this.path.some(Rs));this.animationProgress=0;let f,p=n?.interpolateProjection(e),m=this.layout?.layoutBox,h=m&&[m.x.min,m.x.max,m.y.min,m.y.max].map((t,n)=>{let{translate:r,scale:i,originPoint:a}=e[n<2?`x`:`y`];return(t-a)*(i-1)+r});h?.every(isFinite)||(h=void 0),this.animationEdges=h,this.edgeValues=this.startVelocity=this.impulse=this.relativeVelocity=this.relativeStart=void 0;let g=r?.velocity,_=r?.relativeVelocity||g;if(_?.slice(0,4).some(Boolean)&&this.getClosestProjectingParent()&&(this.relativeStart=_),g&&h){let t=g.slice(0,4).map((e,t)=>e+(c?g[4+(t>>1)]:0));t.some(Boolean)&&(this.startVelocity=p?Co(e.x.translate,e.y.translate,{x:(t[0]+t[1])/2,y:(t[2]+t[3])/2}):t)}this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n),l=this.edgeValues;for(let t=0;t<2;t++){let r=t?`y`:`x`;l?Ps(o[r],e[r],this.layout.layoutBox[r],l[t*2],l[t*2+1]):Fs(o[r],e[r],n)}if(r&&(o.x.translate=r.x,o.y.translate=r.y),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){Lo(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0);let e=this.relativeTargetOrigin,t=s;if(Ls(this.relativeTarget,e,t,n),this.isSpringLayout){let e=this.relativeTarget,t=this.impulse||0,n=this.relativeStart,r=yn.now(),i=(r-this.relativeTime)/1e3;this.relativeTime=r;let a=this.relativeVelocity||=[0,0,0,0];for(let r=0;r<4;r++){let o=r<2?`x`:`y`,s=r&1?`max`:`min`;n&&(e[o][s]+=n[r]*t),f&&i>0&&(a[r]=(e[o][s]-f[o][s])/i)}}f&&Zo(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=U(),W(f,this.relativeTarget)}c&&(this.animationValues=a,vo(a,i,this.latestValues,n,d,u)),r?.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`);let t=this.isSpringLayout=e.type===`spring`;this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.resumingFrom&&(this.resumingFrom.edgeValues=void 0),this.pendingAnimation&&=(B(this.pendingAnimation),void 0),this.pendingAnimation=V.update(()=>{ls.hasAnimatedSinceResize=!0,this.motionValue||=un(0),this.motionValue.jump(0,!1);let n=this.startVelocity;this.startVelocity=void 0;let r=e,i=0;if(t){if(e.mass===`auto`){let t=this.layout?.layoutBox;r=wo(e,t&&Math.sqrt(G(t.x)*G(t.y)))}let t=this.relativeStart;if((n||t)&&!e.repeat){if(typeof n==`number`)i=n;else{let e=n&&this.animationEdges;r={...r,type:r=>{let i=[r.velocity,...n||[]].map((t,n)=>ge({...r,keyframes:n?[e[n-1],0]:r.keyframes,velocity:t})),a=i.length;t&&i.push(ge({...r,keyframes:[0,0],velocity:1e3,restDelta:.5,restSpeed:5}));let o=0,s=[],c={calculatedDuration:null,next:t=>{o=t;let n=i[0].next(t),r=n.done;for(let e=1;e<i.length;e++){let{value:n,done:o}=i[e].next(t);e<a?s[e-1]=n:this.impulse=n/1e3,r&&=o}return e&&(this.edgeValues=s),n.done=r,n}};return c.calculatedDuration=k(c),c.next(0),this.edgeVelocity=e=>i[e+1].velocity(o),c}}}}}let a=Ce(this.motionValue,[0,1e3],{...r,velocity:i,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}});this.currentAnimation=a,Vt(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=this.edgeValues=this.edgeVelocity=this.impulse=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.edgeValues=this.impulse=void 0,this.mixTargetDelta?.(ds),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,layout:n,latestValues:r}=e,{target:i}=e;if(t&&i&&n){if(this!==e&&this.layout&&n&&Vs(this.options.animationType,this.layout.layoutBox,n.layoutBox)){let{layoutBox:e}=this.layout,t=i;i=this.target||U(),Bs(i.x,t.x,e.x),Bs(i.y,t.y,e.y)}W(t,i),Ke(t,r),No(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new ns),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?.transition,preserveFollowOpacity:n?.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){this.getStack()?.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){return this.getStack()?.relegate(this)||!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let{latestValues:t}=e;if(!de(t))return;let n={};for(let t=0;t<us.length;t++)ps(us[t],e,n,this.animationValues);for(let t=0;t<Se.length;t++)ps(Se[t],e,n,this.animationValues);e.render();for(let t in n)e.setStaticValue(t,n[t]),this.animationValues&&(this.animationValues[t]=n[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;let n=this.getLead();if(!this.isVisible&&n!==this){e.visibility=`hidden`;return}let r=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=Or(t?.pointerEvents)||``,e.transform=r?r(this.latestValues,``):`none`;return}if(!this.projectionDelta||!this.layout||!n.target){(this.options.layoutId||this.needsShow)&&(this.needsShow=!1,e.visibility=``,e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=Or(t?.pointerEvents)||``),this.hasProjected&&!Je(this.latestValues)&&(e.transform=r?r({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=n.animationValues||n.latestValues;this.applyTransformsToTarget();let a=os(this.projectionDeltaWithTransform,this.treeScale,i);r&&(a=r(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=n.animationValues?n===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:n===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in Nn){if(i[t]===void 0)continue;let{correct:r,applyTo:o,isCSSVariable:s}=Nn[t],c=a===`none`?i[t]:r(i[t],n);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=n===this?Or(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=this.dragSnapshot=this.dragAncestor=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Cs),this.root.sharedNodes.clear()}}}function vs(e){e.updateLayout(),Es(e)}function ys(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source,o=(r,a)=>{if(i===`size`)K(e=>{let t=G(r[e]);r[e].min=a[e].min,r[e].max=r[e].min+t});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;To(r[e],a[e])}else Vs(i,t.layoutBox,n)&&K(t=>{let n=G(a[t]);r[t].max=r[t].min+n,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[t].max=e.relativeTarget[t].min+n)})},s=a?t.measuredBox:t.layoutBox;o(s,n);let c=Pa();No(c,n,t.layoutBox);let l=Pa();No(l,a?e.applyTransform(r,!0):n,s);let u=!Yo(c),d=!1,f=e.getClosestProjectingParent();if((!a||f?.options.layoutRoot&&e.resumeFrom?.path.includes(f))&&f&&!f.resumeFrom){let{snapshot:r,layout:i}=f;if(r&&i){let s=e.options.layoutAnchor||void 0,c=U();Lo(c,a?e.resumeFrom.applyTransform(t.layoutBox,!0,void 0,!0,f.depth+1):t.layoutBox,r.layoutBox,s);let l=U();Lo(l,n,i.layoutBox,s),a&&o(c,l),$o(c,l)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=c,e.relativeParent=f)}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:l,layoutDelta:c,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else e.isLead()&&e.options.onExitComplete?.();e.options.transition=void 0}function bs(e){uo.countProjection?.(0),e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function xs(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Ss(e){e.clearSnapshot()}function Cs(e){e.clearMeasurements()}function ws(e){e.isLayoutDirty=!0,e.updateLayout()}function Ts(e){e.isLayoutDirty=!1}function Es(e){let{snapshot:t,dragAncestor:n}=e,r=n?.isAnimationBlocked&&n.layout;if(!t||!r||e.resumeFrom||e.isAnimationBlocked)return;let i=n.dragSnapshot;K(e=>et(t.layoutBox[e],r.layoutBox[e].min-i.layoutBox[e].min))}function Ds(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.dragSnapshot||e.layout,e.isLayoutDirty=!0)}function Os(e){e.relativeTarget&&e.relativeParent?.isLayoutDirty&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function ks(e){let{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function As(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function js(e){e.resolveTargetDelta()}function Ms(e){e.calcProjection()}function Ns(e){e.resetSkewAndRotation()}function Ps(e,t,n,r,i){let a=n.max-n.min,o=a?Math.max(0,(a+i-r)/a):1,s=e.originPoint=t.originPoint;e.origin=t.origin,e.scale=o,e.translate=n.min+r-(s+(n.min-s)*o)}function Fs(e,t,n){e.translate=P(t.translate,0,n),e.scale=P(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Is(e,t,n,r){e.min=P(t.min,n.min,r),e.max=P(t.max,n.max,r)}function Ls(e,t,n,r){Is(e.x,t.x,n.x,r),Is(e.y,t.y,n.y,r)}function Rs(e){return e.animationValues?.opacityExit!==void 0}var zs={duration:.45,ease:[.4,0,.1,1]};function Bs(e,t,n){e.max=G(n)+(e.min=t.min)}function Vs(e,t,n){return e===`position`||e===`preserve-aspect`&&!jo(es(t),es(n),.2)}function Hs(e){return e!==e.root&&e.scroll?.wasRoot}function Us(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var Ws=_s({attachResizeListener:(e,t)=>Us(e,`resize`,t),measureScroll:Te,checkIsScrollRoot:()=>!0}),Gs=_s({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ra.current){let e=new Ws({});e.mount(window),e.setOptions({layoutScroll:!0}),Ra.current=e}return Ra.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),Ks=class extends Si{constructor(){super(...arguments),this.KeyframeResolver=N}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;nn(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function qs(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function Js(e){return window.getComputedStyle(e)}var Ys=class extends Ks{constructor(){super(...arguments),this.type=`html`,this.renderInstance=qs}mount(e){super.mount(e)}readValueFromInstance(e,t){if(Kt.has(t))return this.projection?.isProjecting?qt(t):Jt(e,t);{let n=Js(e),r=(gn(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Ie(e,t)}build(e,t,n){vn(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return hi(e,t,n)}},Xs=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1;function Zs(e){return{point:{x:e.pageX,y:e.pageY}}}var Qs=e=>t=>Xs(t)&&e(t,Zs(t));function $s(e,t,n,r){return Us(e,t,Qs(n),r)}var ec=new WeakMap,tc,nc=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:Me(r)&&`getBBox`in r?r.getBBox()[t]:r[n],rc=nc(`inline`,`width`,`offsetWidth`),ic=nc(`block`,`height`,`offsetHeight`);function ac({target:e,borderBoxSize:t}){ec.get(e)?.forEach(n=>{n(e,{get width(){return rc(e,t)},get height(){return ic(e,t)}})})}function oc(e){e.forEach(ac)}function sc(){typeof ResizeObserver<`u`&&(tc=new ResizeObserver(oc))}function cc(e,t){tc||sc();let n=ie(e);return n.forEach(e=>{let n=ec.get(e);n||(n=new Set,ec.set(e,n)),n.add(t),tc?.observe(e)}),()=>{n.forEach(e=>{let n=ec.get(e);n?.delete(t),n?.size||tc?.unobserve(e)})}}var lc=new Set,uc;function dc(){uc=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};lc.forEach(t=>t(e))},window.addEventListener(`resize`,uc)}function fc(e){return lc.add(e),uc||dc(),()=>{lc.delete(e),!lc.size&&typeof uc==`function`&&(window.removeEventListener(`resize`,uc),uc=void 0)}}function pc(e,t){return Ne(typeof e==`function`?fc(e):cc(e,t))}var mc=(e,t)=>Math.abs(e-t);function hc(e,t){let n=mc(e.x,t.x),r=mc(e.y,t.y);return Math.sqrt(n**2+r**2)}var gc=new Set([`auto`,`scroll`]),_c=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o,immediate:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=yc(this.lastRawMoveEventInfo,this.transformPagePoint));let e=xc(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=hc(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e;this.history.push({...r,timestamp:yn.now()});let{onStart:i,onMove:a}=this.handlers;t||(i?.(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a?.(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.handleScroll(window),this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=yc(t,this.transformPagePoint),this.hasPendingMove=!0,V.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.hasPendingMove&&this.updatePoint(),this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i?.(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=xc(e.type===`pointercancel`?this.lastMoveEventInfo:yc(t,this.transformPagePoint),this.history);this.startEvent&&n?.(e,a),r?.(e,a)},!Xs(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=s?0:a,this.contextWindow=r||window;let c=Zs(e),l=yc(c,this.transformPagePoint),{point:u}=l;this.history=[{...u,timestamp:yn.now()}];let{onSessionStart:d}=t;d&&d(e,xc(l,this.history));let f={passive:!0,capture:!0};this.removeListeners=M($s(this.contextWindow,`pointermove`,this.handlePointerMove,f),$s(this.contextWindow,`pointerup`,this.handlePointerUp,f),$s(this.contextWindow,`pointercancel`,this.handlePointerUp,f)),o&&this.startScrollTracking(o),s&&(this.handlePointerMove(e,c),this.updatePoint())}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(gc.has(e.overflowX)||gc.has(e.overflowY))&&this.scrollPositions.set(t,vc(t)),t=t.parentElement}this.scrollPositions.set(window,vc(window)),this.removeScrollListeners=M(Us(window,`scroll`,this.onElementScroll,{capture:!0}),Us(window,`scroll`,this.onWindowScroll,{}))}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=vc(e),i={x:r.x-t.x,y:r.y-t.y};(i.x!==0||i.y!==0)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),V.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners?.(),this.removeScrollListeners?.(),this.scrollPositions.clear(),B(this.updatePoint)}},vc=e=>e===window?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop};function yc(e,t){return t?{point:t(e.point)}:e}function bc(e,t){return{x:e.x-t.x,y:e.y-t.y}}function xc({point:e},t){return{point:e,delta:bc(e,Cc(t)),offset:bc(e,Sc(t)),velocity:wc(t,.1)}}function Sc(e){return e[0]}function Cc(e){return e[e.length-1]}function wc(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=Cc(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>sn(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>sn(t)*2&&(r=e[1]);let a=dn(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let 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}var Tc=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function Ec(e){return Tc.has(e.tagName)||e.isContentEditable===!0}var Dc=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function Oc(e){return Dc.has(e.tagName)||e.isContentEditable===!0}var q={x:!1,y:!1};function kc(){return q.x||q.y}function Ac(e){return e===`x`||e===`y`?q[e]?null:(q[e]=!0,()=>{q[e]=!1}):q.x||q.y?null:(q.x=q.y=!0,()=>{q.x=q.y=!1})}function jc(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?P(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?P(n,e,r.max):Math.min(e,n)),e}function Mc(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Nc(e,{top:t,left:n,bottom:r,right:i}){return{x:Mc(e.x,n,i),y:Mc(e.y,t,r)}}function Pc(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Fc(e,t){return{x:Pc(e.x,t.x),y:Pc(e.y,t.y)}}function Ic(e,t){let n=.5,r=G(e),i=G(t);return i>r?n=D(t.min,t.max-r,e.min):r>i&&(n=D(e.min,e.max-i,t.min)),xn(0,1,n)}function Lc(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var Rc=.35;function zc(e=Rc){return e===!1?e=0:e===!0&&(e=Rc),{x:Bc(e,`left`,`right`),y:Bc(e,`top`,`bottom`)}}function Bc(e,t,n){return{min:Vc(e,t),max:Vc(e,n)}}function Vc(e,t){return typeof e==`number`?e:e[t]||0}function Hc(e){let t=``;for(let n of e.path){n.scroll=void 0,n.updateScroll();let{scroll:r}=n;n!==e.root&&r&&(t+=r.offset.x+`,`+r.offset.y+`,`)}return t}var Uc=new WeakMap,Wc=class{constructor(e,t=()=>e.getProps()){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=U(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e,this.readProps=t}start(e,t={}){if(this.visualElement.presenceContext?.isPresent===!1)return;let n=e=>{t.snapToCursor&&this.snapToCursor(e),this.stopAnimation()},r=(e,t)=>{let{drag:n,dragConstraints:r,dragPropagation:i,onDragStart:a}=this.getProps();if(n&&!i&&(this.openDragLock?.(),this.openDragLock=Ac(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints();let{projection:o}=this.visualElement;o&&(o.isAnimationBlocked=!0,o.target=void 0),K(e=>{let t=this.getAxisMotionValue(e).get()||0;if(tn(t)&&(t=oe(t,this.visualElement.current)||0),rn.test(t))t=parseFloat(t);else if(Bt.test(t)){let n=o?.layout?.layoutBox[e];n&&(t=G(n)*(parseFloat(t)/100))}this.originPoint[e]=t}),this.point=typeof r==`function`&&r(this),a&&V.update(()=>a(e,t),!1,!0),no(this.visualElement,`transform`),this.visualElement.animationState?.setActive(`whileDrag`,!0)},i=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){if(this.currentDirection=Xc(o),this.currentDirection===null)return;i&&i(this.currentDirection)}this.updateAxis(`x`,o),this.updateAxis(`y`,o),this.point&&this.point.move(),this.visualElement.render(),a&&V.update(()=>a(e,t),!1,!0)},a=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},o=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints||this.point)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:s}=this.getProps();this.panSession=new _c(e,{onSessionStart:n,onStart:r,onMove:i,onSessionEnd:a,resumeAnimation:o},{...t,transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:s,contextWindow:this.visualElement.current?.ownerDocument.defaultView,element:this.visualElement.current})}stop(e,t,n){let r=e||this.latestPointerEvent,i=t||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!i||!r)return;let{velocity:o}=i;this.startAnimation(o,n);let{onDragEnd:s}=this.getProps();s&&V.postRender(()=>s(r,i))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession(),!this.getProps().dragPropagation&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t?.setActive(`whileDrag`,!1)}endPanSession(){this.panSession?.end(),this.panSession=void 0}updateAxis(e,t){let{drag:n}=this.readProps();if(!t||!Yc(e,n,this.currentDirection))return;let r=this.getAxisMotionValue(e),i=this.originPoint[e]+t[e],a=this.constraints&&this.constraints[e];a&&(i=jc(i,a,this.elastic[e])),this.point?this.point[e]=i:r.set(i)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),{projection:n}=this.visualElement,r=n&&(n.layout||n.measure(!1)),i=this.constraints;Gc(e)?this.constraints&&this.scroll===Hc(n)||(this.constraints=this.resolveRefConstraints()):this.constraints=e&&r&&typeof e==`object`?Nc(r.layoutBox,e):!1,this.elastic=zc(t),i!==this.constraints&&!Gc(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&K(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Lc(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!Gc(e))return!1;let n=Kc(e),{projection:r}=this.visualElement;if(!r||!r.layout)return!1;this.scroll=Hc(r);let i=ze(n,r.root,this.visualElement.getTransformPagePoint()),a=Fc(r.layout.layoutBox,r.removeElementScroll(i));if(t){let e=t(C(a));this.hasMutatedConstraints=!!e,e&&(a=me(e))}return a}startAnimation(e,t){let{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),c={bounceStiffness:i?200:1e6,bounceDamping:i?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...a},l=i=>r&&!(this.point&&o)&&Yc(i,t||n,this.currentDirection)?e[i]:0;if(this.point&&!o)return this.point.release({x:l(`x`),y:l(`y`)},c).then(s);let u=this.constraints||{},d=K(e=>{if(!Yc(e,t||n,this.currentDirection))return;let r=u[e]||{};(o===!0||o===e)&&(r={min:0,max:0});let i={type:`inertia`,velocity:l(e),...c,...r};return this.startAxisValueAnimation(e,i)});return Promise.all(d).then(s)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return no(this.visualElement,e),n.start(T(e,n,0,t,this.visualElement,!1))}stopAnimation(){K(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.readProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor({clientX:e,clientY:t}){let{drag:n}=this.getProps(),r={x:e,y:t},i=this.visualElement.getTransformPagePoint()?.(r)||r,a=this.visualElement.measureViewportBox();K(e=>{if(!Yc(e,n,this.currentDirection))return;let t=this.getAxisMotionValue(e),{min:r,max:o}=a[e];t.set((t.get()||0)+i[e]-P(r,o,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Gc(t)||!n||!this.constraints)return;this.stopAnimation();let r=this.constraints,i={x:0,y:0};K(e=>{let t=this.getAxisMotionValue(e).get();i[e]=Ic({min:t,max:t},r[e])});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},``):`none`,n.root?.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),K(t=>{let n=this.getAxisMotionValue(t);if(!Yc(t,e,null)||!n.get())return;let{min:r,max:a}=this.constraints[t];n.set(P(r,a,i[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Uc.set(this.visualElement,this);let e=this.visualElement.current,t=$s(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&Oc(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps(),r=Gc(t)&&Kc(t);r&&(this.constraints=this.resolveRefConstraints(),n||=Jc(e,r,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i.layout||(i.root?.updateScroll(),i.updateLayout()),V.read(r);let o=Us(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(K(t=>{if(!Yc(t,this.getProps().drag,this.currentDirection))return;let n=this.getAxisMotionValue(t);this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate)}),this.visualElement.render())}));return()=>{o(),t(),a(),s(),n?.()}}getProps(){let e=this.readProps(),{dragElastic:t=Rc,dragMomentum:n=!0}=e;return{...e,dragElastic:t,dragMomentum:n}}};function Gc(e){return!!e&&typeof e==`object`&&(`current`in e||`nodeType`in e)}var Kc=e=>`current`in e?e.current:e;function qc(e){let t=!0;return()=>{t?t=!1:e()}}function Jc(e,t,n){let r=pc(e,qc(n)),i=pc(t,qc(n));return()=>{r(),i()}}function Yc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Xc(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}function Zc(e,t){let n=ie(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},Ne(()=>r.abort())]}function Qc(e){return!(e.pointerType===`touch`||kc())}function $c(e,t,n={}){t=g(t);let[r,i,a]=Zc(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{e.pointerType!==`touch`&&(n?r=!0:s(e))};e.addEventListener(`pointerenter`,n=>{if(!Qc(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var el=(e,t)=>t?e===t||el(e,t.parentElement):!1,tl=new WeakSet;function nl(e){return t=>{t.key===`Enter`&&e(t)}}function rl(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var il=(e,t)=>{let n=!1,r=nl(()=>{n||tl.has(e)||(n=!0,rl(e,`down`))}),i=nl(()=>{n&&(n=!1,rl(e,`up`))});e.addEventListener(`keydown`,r,t),e.addEventListener(`keyup`,i,t),e.addEventListener(`blur`,()=>{e.removeEventListener(`keydown`,r),e.removeEventListener(`keyup`,i),n&&rl(e,`cancel`)},{...t,once:!0})};function al(e){return Xs(e)&&!kc()}var ol=new WeakSet,sl=100,cl=8,ll=(e,t,n)=>Math.hypot(e.clientX-t.clientX,e.clientY-t.clientY)>n,ul=e=>e.preventDefault();function dl(e,t,n={}){t=g(t);let[r,i,a]=Zc(e,n),o=new WeakMap,s=e=>{let r=e.currentTarget;if(!al(e)||ol.has(e))return;n.stopPropagation&&ol.add(e);let{count:a=1,countTimeout:s=.3,hold:c=0,repeat:l}=n,u=yn.now(),d=sn(c),f=sn(s),p=o.get(r);p?.expire(ll(p.event,e,sl))?p=void 0:p&&(B(p.expire),o.delete(r));let m=p?p.count+1:1,h=m>=a,g=h&&(c||l),_=!c,v=0,y;if(tl.add(r),p)y=p.handlers;else{let n=t(r,e);y=typeof n==`function`?{onComplete:n}:n||{}}h&&_&&y.onActive?.();let b=sn(l),x=d||b,S=u+x,C=!0,w=()=>{if(i.signal.aborted)return B(w);let e=Math.min(1-(S-yn.now())/x,1);C&&e<1&&(e=0),C=!1,y.onHold?.(e),e<1||(_?y.onRepeat?.(++v):(_=!0,y.onActive?.()),l?(C=!0,S+=x=b):B(w))},T={...i,capture:!0},E=(t,n)=>{if(Xs(t)){if(window.removeEventListener(`pointerup`,D,T),window.removeEventListener(`pointercancel`,O,T),window.removeEventListener(`pointermove`,k,T),r.removeEventListener(`contextmenu`,ul),B(w),tl.delete(r),kc()&&(n=!1),n&&!h){let n=yn.now(),a=e=>{let s=i.signal.aborted;if(s||e===!0||yn.now()-n>f)return B(a),o.delete(r),s||y.onComplete?.(t,{success:!1}),!0};o.set(r,{count:m,event:e,handlers:y,expire:a}),V.update(a,!0)}else y.onComplete?.(t,{success:n&&_})}},D=e=>{E(e,r===window||r===document||n.useGlobalTarget||el(r,e.target))},O=e=>{E(e,!1)},k=t=>{Xs(t)&&((l||!_)&&ll(e,t,cl)||a>1&&kc())&&O(t)};window.addEventListener(`pointerup`,D,T),window.addEventListener(`pointercancel`,O,T),(g||a>1)&&window.addEventListener(`pointermove`,k,T),g&&(V.update(w,!0),r.addEventListener(`contextmenu`,ul,{...i,passive:!1}))};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,s,i),Ua(e)&&(e.addEventListener(`focus`,()=>il(e,i),i),!Ec(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function fl(...e){let 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=tt(i,a,o);return t?s(r):s}var pl=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},ml=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 hl(e,t,n,r){qs(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(ml.has(n)?n:S(n),t.attrs[n])}var gl=class extends Ks{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=U}getBaseTargetFromProps(e,t){return Kt.has(t)?super.getBaseTargetFromProps(e,t)??qt(t):e[t]}getDefaultValue(e){return Kt.has(e)?this.latestValues[e]??qt(e):void 0}readValueFromInstance(e,t){if(Kt.has(t)){let e=Wt(t);return e&&e.default||0}if(ln.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=ml.has(t)?t:S(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Ui(e,t,n)}build(e,t,n){en(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){hl(e,t,n,r)}mount(e){this.isSVGTag=Sa(e.tagName),super.mount(e)}};function _l(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var vl=[...Ei].reverse(),yl=e=>e?.out===!0?e:e?.out;function bl(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>co(e,t,n))),n=Sl(),r=!0,i=!1;function a(a){let{props:o,parent:s,manuallyAnimateOnMount:c}=e,{initial:l}=o,u=r||i,d=[],f=(t=l)=>typeof t!=`boolean`&&Ya(e,Array.isArray(t)?t[0]:t,e.presenceContext?.custom)||void 0,p=new Map,m={},h=1/0,g=e;do g=g.props.inherit!==!1&&g.parent;while(g&&!g.isControllingVariants);let _=u&&yl(f(l??(g&&g.props.initial))?.transition);if(vl.forEach((t,r)=>{let i=n[t],l=o[t],f=g&&g.props[t],v=l===void 0?ei(f)||f===!1?f:void 0:l,y=ei(v),b=t===a?i.isActive:null,x=y&&l===void 0&&!(u&&c);if(i.protectedKeys={...m},!i.isActive&&b===null||!v&&!i.prevProp||Ea(v)||typeof v==`boolean`)return;if(b===!1&&(h=r),t===`exit`&&i.isActive&&b!==!0){m={...m,...i.prevResolvedValues};return}let S=xl(i.prevProp,v),C=S||y&&(b&&!x||r>h),w=!1,T=Array.isArray(v)?v:[v],E={},D;if(b!==!1)for(let n of T){let{transition:r,transitionEnd:i,...a}=Ya(e,n,Xa(e,t))||{};E={...E,...a,...i},D=yl(r)||D}let{prevResolvedValues:O}=i;for(let t in{...O,...E}){if(t in m)continue;let n=E[t],r=O[t],a=Array.isArray(n)&&Array.isArray(r)?!_l(n,r)||S:n!==r,o;if(a&&n==null)p.has(t)||p.set(t,i.prevOut);else if(a||n!==void 0&&p.has(t)){C=!0,o=p.get(t)||_,p.delete(t)&&(w=!0),i.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)}else i.protectedKeys[t]=!0;i.out[t]=o}if(i.prevProp=v,i.prevResolvedValues=E,i.prevOut=D,i.isActive&&(m={...m,...E}),C&&(!(x&&S)||w))for(let n of T){let r={type:t};if(typeof n==`string`&&u&&c&&s?.enteringChildren){let t=Ya(s,n)?.transition?.delayChildren;r.delay=Ja(s.enteringChildren,e,t)}d.push({animation:n,options:r})}}),p.size){let t={},n=f(),r=n?.transition;p.forEach((i,a)=>{i&&(r={...r||e.getDefaultTransition(),[a]:i});let s=e.getValue(a);s&&(s.liveStyle=!0);let c=n&&!Array.isArray(l)?n[a]:void 0,u=e.getBaseTargetFromProps(o,a);t[a]=(c===void 0?u!==void 0&&!nn(u)?u:e.initialValues[a]===void 0?e.baseTarget[a]:void 0:c)??null}),r&&(t.transition=r),d.push({animation:t})}let v=u&&e.blockInitialAnimation||r&&!c&&(o.initial===!1||o.initial===o.animate);return r=i=!1,!v&&d.length?t(d):Promise.resolve()}function o(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=a(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:a,setActive:o,setAnimateFunction:n=>{t=n(e)},getState:()=>n,reset:()=>{n=Sl(),i=!0}}}function xl(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!_l(t,e):!1}function Sl(){let e={};for(let t of Ei)e[t]={isActive:t===`animate`,protectedKeys:{},needsAnimating:{},prevResolvedValues:{},out:{}};return e}var J=zt(),Y=t(_t(),1);function Cl({children:e,features:t,strict:n=!1}){let[,r]=(0,Y.useState)(!wl(t)),i=(0,Y.useRef)(void 0);if(!wl(t)){let{renderer:e,...n}=t;i.current=e,ma(n)}return(0,Y.useEffect)(()=>{wl(t)&&t().then(({renderer:e,...t})=>{ma(t),i.current=e,r(!0)})},[]),(0,J.jsx)(di.Provider,{value:{renderer:i.current,strict:n},children:e})}function wl(e){return typeof e==`function`}function Tl(e,t){if(typeof Proxy>`u`)return Ni;let n=new Map,r=(n,r)=>Ni(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,Ni(a,void 0,e,t)),n.get(a))})}var El=Tl(),Dl=(e,t)=>t.isSVG??ea(e)?new gl(t):new Ys(t,{allowProjection:e!==Y.Fragment}),Ol=class extends pl{constructor(e){super(e),e.animationState||=bl(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Ea(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){this.node.getProps().animate!==this.node.prevProps?.animate&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},kl=0,Al={animation:{Feature:Ol},exit:{Feature:class extends pl{constructor(){super(...arguments),this.id=kl++}update(){let{presenceContext:e,animationState:t}=this.node;if(!e||!t)return;let{isPresent:n,onExitComplete:r}=e;if(n===!this.exit)return;if(n){if(this.exit===!0){let{initial:e}=this.node.getProps();if(e&&!Array.isArray(e)){let{transition:t,transitionEnd:n,...r}=Ya(this.node,e)||{};for(let e in r)this.node.getValue(e)?.jump(r[e])}this.node.blockInitialAnimation=!1,t.reset(),t.animateChanges()}else t.setActive(`exit`,!1);this.exit=void 0;return}let i=this.exit=t.setActive(`exit`,!0);r&&i.then(()=>{this.exit===i&&(this.exit=!0,r(this.id))})}mount(){let{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id,this.node)),this.update()}unmount(){}}}},jl=class extends pl{constructor(e){super(e),this.removeGroupControls=Zt,this.removeListeners=Zt,this.controls=new Wc(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Zt}update(){let{dragControls:e,drag:t}=this.node.getProps(),{dragControls:n,drag:r}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls))),r&&!t&&this.controls.stop(void 0,void 0,r)}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},Ml=e=>(t,n)=>{e&&V.update(()=>e(t,n),!1,!0)},Nl=class extends pl{constructor(){super(...arguments),this.removePointerDownListener=Zt}onPointerDown(e){this.session=new _c(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:this.node.current?.ownerDocument.defaultView})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Ml(e),onStart:Ml(t),onMove:Ml(n),onEnd:(e,t)=>{delete this.session,r&&V.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=$s(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session?.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session?.end()}},Pl=!1,Fl=({layout:e,layoutDependency:t,layoutAnchor:n})=>({layout:e,layoutDependency:t,layoutAnchor:n,animationType:typeof e==`string`?e:`both`}),Il=(e,t)=>{let{snapshot:n}=e,r=e.getStack();r?.remove(e);let i=r?.lead;if(r?.prevLead===e&&i.resumeFrom===e&&(i.resumeFrom=i.currentAnimation=e.resumingFrom=void 0),e.options.layoutId=t,!t)e.needsShow=!0;else return e.root.registerSharedNode(t,e),()=>{let{resumeFrom:t}=e;t?.isPresent!==!1&&e.getStack().members.includes(t)&&(t.hide(),e.resumeFrom=void 0,e.snapshot=n)}},Ll=class extends Y.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group?.add(i),r&&n?.register?.(i),Pl&&i.root.didUpdate(),i.options.layoutId!==r&&Il(i,r)?.(),i.addEventListener(`animationComplete`,()=>this.safeToRemove()),i.setOptions({...i.options,...Fl(this.props),onExitComplete:()=>this.safeToRemove()})),ls.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,layoutId:n,visualElement:r,drag:i,isPresent:a}=this.props,{projection:o}=r;return o&&(o.isPresent=a,this.takeOver=e.layoutId===n?void 0:(o.willUpdate(),Il(o,n)),o.setOptions({...o.options,...Fl(this.props)}),Pl=!0,i||e.layoutDependency!==t||t===void 0||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||V.postRender(()=>{o.getStack()?.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(this.takeOver?.(),e.root.didUpdate(),hn.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Pl=!0,r&&(r.scheduleCheckAfterUnmount(),t.group?.remove(r),n?.deregister?.(r))}safeToRemove(){this.props.safeToRemove?.()}render(){return null}};function Rl(e){let[t,n]=_e(),r=(0,Y.useContext)(Qt);return(0,J.jsx)(Ll,{...e,layoutGroup:r,switchLayoutGroup:(0,Y.useContext)(ii),isPresent:t,safeToRemove:n})}var zl={pan:{Feature:Nl},drag:{Feature:jl,ProjectionNode:Gs,MeasureLayout:Rl}};function Bl(e,t,n,r,i){let{props:a}=e,o=`while`+n;!i&&e.animationState&&a[o]&&e.animationState.setActive(o,r===`Start`);let s=a[`on`+n+r];s&&V.postRender(()=>s(t,Zs(t)))}var Vl=class extends pl{mount(){let{current:e}=this.node;e&&(this.unmount=$c(e,(e,t)=>(Bl(this.node,t,`Hover`,`Start`),e=>Bl(this.node,e,`Hover`,`End`))))}unmount(){}},Hl=class extends pl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}e&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=M(Us(this.node.current,`focus`,()=>this.onFocus()),Us(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Ul(e,t,n,r){e.current instanceof HTMLButtonElement&&e.current.disabled||Bl(e,t,`Tap`,n,r)}var Wl=class extends pl{constructor(){super(...arguments),this.options={}}mount(){let{current:e}=this.node;e&&(this.update(),this.unmount=dl(e,(e,t)=>(Ul(this.node,t,`Start`),{onComplete:(e,{success:t})=>Ul(this.node,e,t?``:`Cancel`),onRepeat:()=>Ul(this.node,t,``,!0)}),this.options))}update(){let{options:e,node:t}=this,{globalTapTarget:n,propagate:r,tap:i}=t.props;for(let t in e)delete e[t];Object.assign(e,i,{useGlobalTarget:n,stopPropagation:r?.tap===!1})}unmount(){}},Gl=new WeakMap,Kl=new WeakMap,ql=e=>{let t=Gl.get(e.target);t&&t(e)},Jl=e=>{e.forEach(ql)};function Yl({root:e,...t}){let n=e||document;Kl.has(n)||Kl.set(n,{});let r=Kl.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Jl,{root:e,...t})),r[i]}function Xl(e,t,n){let r=Yl(t);return Gl.set(e,n),r.observe(e),()=>{Gl.delete(e),r.unobserve(e)}}var Zl={some:0,all:1},Ql=class extends pl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:Zl[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=Xl(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some($l(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function $l({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var eu=Object.assign({},Object.assign({renderer:Dl},Al,{inView:{Feature:Ql},tap:{Feature:Wl},focus:{Feature:Hl},hover:{Feature:Vl}}),zl,{layout:{ProjectionNode:Gs,MeasureLayout:Rl}});function tu(e){let t=cn(()=>un(e)),{isStatic:n}=(0,Y.useContext)(_n);if(n){let[,n]=(0,Y.useState)(e);(0,Y.useEffect)(()=>t.on(`change`,n),[])}return t}function nu(e,t){let n=tu(t()),r=()=>n.set(t());return r(),mn(()=>{let t=()=>V.preRender(r,!1,!0),n=e.map(e=>e.on(`change`,t));return r(),()=>{n.forEach(e=>e()),B(r)}}),n}function ru(e){pn.current=[],e();let t=nu(pn.current,e);return pn.current=void 0,t}function iu(e,t,n,r){if(typeof e==`function`)return ru(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!=`function`)return ou(e,t,n,r);let i=typeof t==`function`?t:fl(t,n,r),a=Array.isArray(e)?au(e,i):au([e],([e])=>i(e)),o=Array.isArray(e)?void 0:e.accelerate;if(o&&!o.isTransformed&&typeof t!=`function`&&Array.isArray(n)&&r?.clamp!==!1&&!r?.mixer){let e=r?.ease;a.accelerate={...o,times:[0,...t,1],keyframes:[n[0],...n,n[n.length-1]],isTransformed:!0,...e?{ease:Array.isArray(e)?[e[0],...e]:e}:{}}}return a}function au(e,t){let n=cn(()=>[]);return nu(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}function ou(e,t,n,r){let i=cn(()=>Object.keys(n)),a=cn(()=>({}));for(let o of i)a[o]=iu(e,t,n[o],r);return a}var su=(0,Y.createContext)(null),cu=(0,Y.createContext)(null);function lu(e,t,n,r,i,a=`ltr`){let o=e.findIndex(e=>e.value===t);if(o===-1)return e;if(i===`xy`){let{layout:t}=e[o],r={x:du(t.x)+n.x,y:du(t.y)+n.y},i=fu(e),s=i.find(t=>t.items.includes(e[o])),c=i.reduce((e,t)=>pu(r.y,t)<pu(r.y,e)?t:e);if(c!==s)return mu(e,o,r.x,c,a);let l=hu(r,t),u=-1,d=l;return e.forEach((e,t)=>{if(t===o)return;let n=hu(r,e.layout);n<d&&(u=t,d=n)}),u===-1?e:Ht(e,o,o+Math.sign(u-o))}if(!r[i])return e;let s=r[i]>0?1:-1,c=e[o+s];if(!c)return e;let l=e[o].layout[i],u=c.layout[i],d=du(u);return s===1&&l.max+n[i]>d||s===-1&&l.min+n[i]<d?Ht(e,o,o+s):e}function uu(e,t,n,r,i){let a=n>1==!!(n%2&&i)?-1:1,o=n>3?(n-4)*(e.length-1):t+a;if(r===`xy`&&n<4&&!(n%2)&&t>-1){let n=fu(e).sort((e,t)=>e.min-t.min),r=n[n.findIndex(({items:n})=>n.includes(e[t]))+a],i=n=>Math.abs(du(n.layout.x)-du(e[t].layout.x));o=r?e.indexOf(r.items.reduce((e,t)=>i(t)<i(e)?t:e)):-1}return t>-1&&o!==t&&e[o]?o:-1}var du=({min:e,max:t})=>P(e,t,.5);function fu(e){let t=[];return e.forEach(e=>{let{min:n,max:r}=e.layout.y,i=t[t.length-1];!i||n>=i.max||r<=i.min?t.push({items:[e],min:n,max:r}):(i.items.push(e),i.min=Math.min(i.min,n),i.max=Math.max(i.max,r))}),t}function pu(e,t){return e<t.min?t.min-e:e>t.max?e-t.max:0}function mu(e,t,n,r,i){let a=e.filter((e,n)=>n!==t),o=r.items.find(e=>{let t=du(e.layout.x);return i===`ltr`?n<t:n>t}),s=o?a.indexOf(o):a.indexOf(r.items[r.items.length-1])+1,c=[...a];return c.splice(s,0,e[t]),c.every((t,n)=>t===e[n])?e:c}function hu(e,t){let n=Math.max(t.x.min-e.x,0,e.x-t.x.max),r=Math.max(t.y.min-e.y,0,e.y-t.y.max);return n*n+r*r}var gu=(e,t)=>e.max<=t.min||t.max<=e.min;function _u(e){let t=!1,n=!1;for(let r=0;r<e.length;r++)for(let i=r+1;i<e.length;i++)if(t||=gu(e[r].x,e[i].x),n||=gu(e[r].y,e[i].y),t&&n)return`xy`;return t?`x`:`y`}var vu=(e,t)=>n=>{e.current=n;let r=typeof t==`function`?t(n):t&&(t.current=n);if(typeof r==`function`)return()=>{e.current=null,r()}};function yu({children:e,as:t=`ul`,axis:n,onReorder:r,values:i,onPointerDownCapture:a,onClickCapture:o,...s},c,l){let u=cn(()=>l[t]),d=(0,Y.useContext)(su),f=(0,Y.useRef)(new Map),p=(0,Y.useRef)(new Map),[m,h]=(0,Y.useState)(),[g,_]=(0,Y.useState)(`y`),v=(0,Y.useRef)(!1),y=(0,Y.useRef)(!1),b=(0,Y.useRef)(null),x=n||g,S=new Set(i);for(let e of[f.current,p.current])e.forEach((t,n)=>S.has(n)||e.delete(n));let C=S.has(m)?m:i[0],w=e=>p.current.get(e)?.current?.isConnected,T=e=>S.has(e)&&h(e),E=()=>{w(C)||T(i.find(w))};(0,Y.useEffect)(E);let D=()=>i.flatMap(e=>f.current.get(e)||[]),O=()=>b.current?.ownerDocument.defaultView?.getComputedStyle(b.current).direction===`rtl`,k=(e,t)=>{let n=0,a=i.map(t=>f.current.has(t)?e[n++].value:t);a.some((e,t)=>e!==i[t])&&r(a,t)},A={axis:x,proxy:l,groupRef:b,hasReordered:y,values:i,onReorder:r,getOrder:D,isTabStop:e=>e===C||!S.has(e),setActive:T,checkTabStop:E,elements:p.current,onKeyDown:(e,t,n,r)=>{let{key:a,currentTarget:o}=e;if(e.defaultPrevented||e.target!==o||e.altKey||e.ctrlKey||e.metaKey)return;let s=D(),c=[`ArrowUp`,`ArrowLeft`,`ArrowDown`,`ArrowRight`,`Home`,`End`].indexOf(a),l=c%2;if(a===` `)e.repeat||r(o,n?void 0:i);else if(c<0&&!(a===`Escape`&&n))return;else if(!d?.isMoving(o)){if(a===`Escape`&&n){if(r(o),!d?.restore(A,t,o,n)){let e=n.flatMap(e=>s.filter(t=>t.value===e));k(s.map(t=>n.includes(t.value)?e.shift():t),t)}}else{let e=c>3||x===`xy`||x===(l?`x`:`y`),r=n?s:s.filter(({value:e})=>w(e)),i=r.findIndex(({value:e})=>e===t),a=e?uu(r,i,c,x,!!l&&O()):-1;if(a>-1)n?k(Ht(s,i,a),t):p.current.get(r[a].value)?.current?.focus();else if(!(n&&c<4&&d?.key(A,t,c,o,n))&&!e)return}}e.preventDefault()},registerItem:(e,t,r)=>{if(f.current.set(e,{value:e,layout:t,ref:r}),!n){let e=_u(D().map(e=>e.layout));e!==g&&_(e)}},updateOrder:(e,t,n)=>{if(v.current)return;let r=D(),i=lu(r,e,t,n,x,O()?`rtl`:`ltr`);r!==i&&(v.current=!0,y.current=!0,k(i,e))}};(0,Y.useEffect)(()=>{v.current=!1},[i]),mn(()=>d?.add(A));let j={overflowAnchor:`none`,...s.style};return(0,J.jsx)(u,{...s,style:j,ref:vu(b,c),onPointerDownCapture:e=>{y.current=!1,a?.(e)},onClickCapture:e=>{y.current&&e.detail&&(y.current=!1,e.stopPropagation(),e.preventDefault()),o?.(e)},ignoreStrict:!0,children:(0,J.jsx)(cu.Provider,{value:A,children:e})})}var bu=e=>(0,Y.forwardRef)((t,n)=>yu(t,n,e)),xu=50,Su=1.5,Cu=new Set([`auto`,`scroll`]),wu={x:new Map,y:new Map};function Tu(){wu.x.clear(),wu.y.clear()}function Eu(e,t){let n=getComputedStyle(e),r=t===`x`?n.overflowX:n.overflowY;return e===document.body||e===document.documentElement||Cu.has(r)&&(t===`x`?e.scrollWidth>e.clientWidth:e.scrollHeight>e.clientHeight)}function Du(e,t){let n=e?.parentElement;for(;n;){if(Eu(n,t))return n;n=n.parentElement}return null}function Ou(e){let t=Math.min(1,1-e/xu);return Su*t*t*H.delta}function ku(e,t,n){let r=t.getBoundingClientRect(),i=n===`x`?Math.max(0,r.left):Math.max(0,r.top),a=n===`x`?Math.min(window.innerWidth,r.right):Math.min(window.innerHeight,r.bottom),o=e-i,s=a-e;return o<xu?{amount:-Ou(o),edge:`start`}:s<xu?{amount:Ou(s),edge:`end`}:{amount:0,edge:null}}function Au(e,t,n,r){if(!e)return;let i=Du(e,n);if(!i)return;let{amount:a,edge:o}=ku(t-(n===`x`?window.scrollX:window.scrollY),i,n),s=wu[n];if(o===null){s.delete(i);return}let c=s.get(i),l=i===document.body||i===document.documentElement;if(c?.edge!==o){if(!(o===`start`&&r<0||o===`end`&&r>0))return;c={edge:o,limit:n===`x`?i.scrollWidth-(l?window.innerWidth:i.clientWidth):i.scrollHeight-(l?window.innerHeight:i.clientHeight)},s.set(i,c)}a>0&&(n===`x`?l?window.scrollX:i.scrollLeft:l?window.scrollY:i.scrollTop)>=c.limit||(n===`x`?l?window.scrollBy({left:a}):i.scrollLeft+=a:l?window.scrollBy({top:a}):i.scrollTop+=a)}function ju(e,t=0){return nn(e)?e:tu(t)}function Mu({children:e,style:t={},value:n,as:r=`li`,onDragStart:i,onDrag:a,onDragEnd:o,onKeyDown:s,onFocus:c,onBlur:l,layout:u=!0,...d},f){let p=(0,Y.useContext)(cu),m=(0,Y.useContext)(su),h=(0,Y.useRef)(null),g=cn(()=>p.proxy[r]),_=(0,Y.useRef)(),v={x:ju(t.x),y:ju(t.y)},y=iu([v.x,v.y],([e,t])=>e||t?1:`unset`),{axis:b,registerItem:x,updateOrder:S,groupRef:C,hasReordered:w,isTabStop:T,setActive:E,checkTabStop:D,elements:O,onKeyDown:k}=p,A=b===`xy`||m?!0:b;O.set(n,h),(0,Y.useEffect)(()=>D);let j=(e,t)=>{_.current=t,t||m?.end(n),fn.get(e)?.animationState?.setActive(`whileDrag`,!!t)},M=(0,Y.useRef)(!1);return mn(()=>{m?.receive(p,n,h.current,j)&&(M.current=!0)},[]),(0,J.jsx)(g,{drag:A,tabIndex:T(n)?0:-1,...d,dragSnapToOrigin:!0,style:{...t,x:v.x,y:v.y,zIndex:y},layout:u,onDragStart:(e,t)=>{M.current?M.current=!1:i?.(e,t)},onDrag:(e,t)=>{let{velocity:r,point:i}=t,o={x:v.x.get(),y:v.y.get()};m?.drag(p,n,h.current,e)||S(n,o,r);let s=m?[`x`,`y`]:[b===`xy`?Math.abs(r.x)>Math.abs(r.y)?`x`:`y`:b];for(let e of s)Au(m&&!b.includes(e)?m.column(p):C.current,i[e],e,r[e]);a&&a(e,t)},onDragEnd:(e,t)=>{w.current=!1,Tu(),m?.end(n),o&&o(e,t)},onKeyDown:e=>{s?.(e),k(e,n,_.current,j)},onFocus:e=>{c?.(e),E(n)},onBlur:e=>{l?.(e),_.current&&j(e.currentTarget)},onLayoutMeasure:e=>{x(n,e,h)},ref:vu(h,f),ignoreStrict:!0,children:e})}var Nu=(0,Y.forwardRef)(Mu),Pu=e=>{let{left:t,top:n,width:r,height:i}=e.getBoundingClientRect();return{x:t+r/2,y:n+i/2}},Fu=e=>{let{x:t,y:n}=Pu(e),{scrollX:r,scrollY:i}=e.ownerDocument.defaultView;return{x:t+r,y:n+i}};function Iu(e,t,n,r){let{left:i,right:a,top:o,bottom:s}=t.getBoundingClientRect(),c=r?e.x>(i+a)/2:e.x<=(i+a)/2,l=e.y<=(o+s)/2;return n===`x`?c:n===`y`?l:e.y<o||e.y<s&&c}var Lu=(e,t)=>{let n=e.groupRef.current,r=t.groupRef.current;return n.contains(r)||r.contains(n)};function Ru(e){let t=new Set,n,r=(t,n,r)=>!Lu(t,n)&&e.current.canMove?.(r,t.values,n.values)!==!1,i,a=(e,t,r,i,a,o)=>{let s=Pu(i),{values:c}=t;if(o===void 0){let e=t.getOrder().filter(e=>e.ref?.current?.isConnected),n=getComputedStyle(t.groupRef.current).direction===`rtl`,r=e.find(e=>Iu(s,e.ref.current,t.axis,n)),i=e[e.length-1];o=r?c.indexOf(r.value):i?c.indexOf(i.value)+1:c.length}n={value:r,to:t.groupRef,element:i,centre:Fu(i),...a},t.hasReordered.current=!0,e.onReorder(e.values.filter(e=>e!==r),r),t.onReorder([...c.slice(0,o),r,...c.slice(o)],r)};return{add:e=>(t.add(e),()=>t.delete(e)),drag:(e,i,o,s)=>{if(!o?.isConnected)return!1;if(n?.controls?.isDragging)return n.value===i&&(n.centre=Fu(o),n.event=s),!0;let c=Pu(o),l;for(let e of o.ownerDocument.elementsFromPoint(c.x,c.y))if(!o.contains(e)){for(let n of t)n.groupRef.current===e&&(l=n);if(l)break}if(!l||!r(e,l,i))return!1;let u=fn.get(o);return a(e,l,i,o,{controls:u&&Uc.get(u),event:s}),!0},key:(e,n,o,s,c)=>{let l=Pu(s),u=o%2?`x`:`y`,d=o>1?1:-1,f,p=1/0;for(let i of t){let t=i.groupRef.current;if(!t)continue;let{left:a,right:s,top:c,bottom:m,width:h,height:g}=t.getBoundingClientRect();if(!h&&!g||([m,s,c,a][o]-l[u])*d<=0)continue;let _=Math.max(a-l.x,0,l.x-s),v=Math.max(c-l.y,0,l.y-m);_*_+v*v<p&&r(e,i,n)&&(p=_*_+v*v,f=i)}return f?(i?.from!==c&&(i={group:e.groupRef,from:c}),a(e,f,n,s,{keys:!0,from:c}),!0):!1},restore:(e,n,r,o)=>{let s=i?.from===o&&[...t].find(e=>e.groupRef===i.group);if(!s||s.groupRef===e.groupRef)return!1;let c=o.slice(o.indexOf(n)+1),l=s.values.findIndex(e=>c.includes(e));return i=void 0,a(e,s,n,r,{keys:!0},l<0?s.values.length:l),!0},end:e=>{n?.value===e&&(n=void 0)},isMoving:e=>n?.element===e,receive:(e,t,r,i)=>{let a=fn.get(r),o=a&&Uc.get(a);o?.isDragging&&a.animationState?.setActive(`whileDrag`,!0);let s=n;if(!s||s.value!==t||s.to!==e.groupRef)return!1;let{keys:c,from:l,controls:u}=s,d=!s.element.isConnected;if(c){n=void 0;let{activeElement:e,body:t}=r.ownerDocument;return d&&(!e||e===t)&&(r.focus(),i(r,l)),!1}return!o||!u?.isDragging?!1:(hn.read(()=>{if(n!==s)return;n=void 0,fn.get(s.element)?.values.forEach((e,t)=>{let n=e.get();a.getValue(t,a.readValue(t,n))?.set(n)});let e=a.getTransformPagePoint()||(e=>e),t=e(s.centre),i=e(Fu(r));a.getValue(`x`).set(t.x-i.x),a.getValue(`y`).set(t.y-i.y),a.render(),d?u.cancel():u.stop(),o.start(s.event,{immediate:!0})}),d)},column:({groupRef:e})=>{let n=e.current,r=n=>[...t].some(t=>t.groupRef!==e&&n.contains(t.groupRef.current));for(;n?.parentElement?.parentElement&&!r(n.parentElement);)n=n.parentElement;return n}}}function zu({children:e,...t}){let n=(0,Y.useRef)(t);return mn(()=>{n.current=t}),(0,J.jsx)(su.Provider,{value:cn(()=>Ru(n)),children:e})}var Bu=e=>{e.stopPropagation()},Vu=e=>{e.preventDefault(),e.stopPropagation(),e.preventBaseUIHandler?.()},Hu={anchor:null,iconSpaceMode:`global`,items:[],open:!1,triggerId:null},Uu=Hu,Wu=new Set,Gu={ready:!1,triggerId:null,x:0,y:0},Ku=()=>{Wu.forEach(e=>e())},qu=e=>(Wu.add(e),()=>Wu.delete(e)),Ju=()=>Uu,Yu=()=>Hu,Xu=e=>{Gu.x=e.clientX,Gu.y=e.clientY,Gu.ready=!0,Gu.triggerId=e.target instanceof Element?e.target.closest(`[data-contextmenu-trigger]`)?.dataset.contextmenuTrigger??null:null},Zu=e=>({contextElement:typeof document>`u`?void 0:document.body,getBoundingClientRect:()=>({bottom:e.y,height:0,left:e.x,right:e.x,toJSON:()=>void 0,top:e.y,width:0,x:e.x,y:e.y})}),Qu=e=>{Uu={...Uu,...e},Ku()},$u=null,ed=(e,t)=>{let n={x:window.innerWidth/2,y:window.innerHeight/2};Qu({anchor:Zu(Gu.ready?{x:Gu.x,y:Gu.y}:n),footer:t?.footer,header:t?.header,iconAlign:t?.iconAlign,iconSpaceMode:t?.iconSpaceMode??`global`,items:e,listItemHeight:t?.listItemHeight,open:!0,triggerId:Gu.triggerId??null,virtual:t?.virtual})},td=(e,t)=>{typeof window<`u`&&($u?.show?$u.show(e,t,()=>ed(e,t)):ed(e,t))},nd=()=>{Qu({anchor:null,footer:void 0,header:void 0,iconSpaceMode:`global`,items:[],listItemHeight:void 0,open:!1,triggerId:null,virtual:void 0})},rd=()=>{$u?.close?$u.close(nd):nd()};function id(e){let[t,n]=Y.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),r=Y.useRef(null),i=Y.useRef(null),a=Y.useRef(null),o=Y.useRef(null),s=Y.useRef(!0),c=Y.useRef(null),l=at(),u=Y.useMemo(()=>({anchor:t,setAnchor:n,actionsRef:a,backdropRef:r,internalBackdropRef:i,positionerRef:o,allowMouseUpTriggerRef:s,initialCursorPointRef:c,rootId:l}),[t,l]);return(0,J.jsx)(ve.Provider,{value:u,children:(0,J.jsx)(E.Provider,{value:void 0,children:(0,J.jsx)(Xe,{...e})})})}var ad=x,X=gt({block:`context-menu`,elements:[`trigger`,`positioner`,`header`,`viewport`,`footer`,`item`,`item-content`,`icon`,`label-group`,`label`,`desc`,`extra`,`submenu-arrow`,`checkbox-indicator`,`switch`,`separator`,`group`,`group-label`]}),od=(0,Y.memo)(({collisionPadding:e,style:t,...n})=>{let r=typeof t!=`function`&&t?.zIndex!=null&&typeof t.zIndex==`number`?t.zIndex:void 0,{zIndex:i,ref:a}=It(`floating`,r),o=typeof t==`function`?e=>({zIndex:i,...t(e)}):{zIndex:i,...t};return(0,J.jsx)(ad,{...n,className:z(F.positioner,X(`positioner`)),collisionPadding:e??Be(),ref:a,style:o})});od.displayName=`ContextMenuSubmenuPositioner`;var sd=(0,Y.memo)(()=>{let{t:e}=he(O);return(0,J.jsx)(ne,{disabled:!0,className:z(R(I.item,I.empty).className,X(`item`)),children:(0,J.jsx)(`div`,{className:z(F.itemContent,X(`item-content`)),children:(0,J.jsx)(`span`,{className:z(F.label,X(`label`)),children:e(`common.empty`)})})})});sd.displayName=`EmptyMenuItem`;var cd=({checked:e,children:t,closeOnClick:n=!1,danger:r,defaultChecked:i,disabled:a,label:o,onCheckedChange:s})=>{let[c,l]=(0,Y.useState)(i??!1),u=e!==void 0,d=u?e:c,f=(0,Y.useCallback)(e=>{u||l(e),s?.(e)},[u,s]);return(0,J.jsxs)(ne,{closeOnClick:n,disabled:a,label:o,className:z(R(I.item,r&&I.danger).className,X(`item`)),onClick:e=>{e.preventDefault(),a||f(!d)},children:[t,(0,J.jsx)(`span`,{className:z(F.switchWrap,X(`switch`)),onFocus:e=>e.stopPropagation(),children:(0,J.jsx)(Ue,{checked:d,disabled:a,size:`small`,tabIndex:-1,onChange:f,onClick:(e,t)=>t.stopPropagation()})})]})},ld=(e,t,n)=>{let r=we(e),i=`desc`in e?e.desc:void 0,a=`extra`in e?e.extra:void 0,o=t?.indicatorOnRight,s=!!i&&t?.iconAlign===`start`,c=n!==void 0&&!o,l=c?!!n:!!e.icon,u=c?!!(t?.reserveIconSpace||n):!!(l||t?.reserveIconSpace),d=i?(0,J.jsxs)(`div`,{className:z(F.labelGroup,X(`label-group`)),children:[(0,J.jsx)(`span`,{className:z(F.label,X(`label`)),children:r}),(0,J.jsx)(`span`,{className:z(F.desc,X(`desc`)),children:i})]}):(0,J.jsx)(`span`,{className:z(F.label,X(`label`)),children:r});return(0,J.jsxs)(`div`,{className:z(R(I.itemContent,s&&I.itemContentAlignStart).className,X(`item-content`)),children:[u?(0,J.jsx)(`span`,{"aria-hidden":!l,className:z(R(I.icon,s&&I.iconAlignStart).className,Ae.icon,X(`icon`)),children:c?n:l?He(e.icon,`small`):null}):null,d,a?(0,J.jsx)(`span`,{className:z(F.extra,X(`extra`)),children:a}):null,o&&n?n:null,t?.submenu?(0,J.jsx)(`span`,{className:z(F.submenuArrow,X(`submenu-arrow`)),children:(0,J.jsx)(se,{})}):null]})},ud=(e,t,n)=>{if(!e.onClick)return;let r=e.key??t.at(-1)??``,i={domEvent:n,item:n.currentTarget,key:String(r),keyPath:t};e.onClick(i)},dd=(e,t=[],n)=>{let r=n?.iconAlign,i=n?.iconSpaceMode??`global`,a=n?.reserveIconSpace??We(e,i===`global`),o=n?.indicatorOnRight??Le(e);return e.map((e,n)=>{if(!e)return null;let s=`${t.join(`-`)||`root`}-${n}`,c=p(e,s),l=[...t,String(c)];if(e.type===`checkbox`){let t=e,n=we(t),i=typeof n==`string`?n:void 0,s=!!t.danger,l=(0,J.jsx)(ee,{className:X(`checkbox-indicator`),children:(0,J.jsx)(dt,{icon:pe,size:`small`})});return(0,J.jsx)(ce,{checked:t.checked,closeOnClick:t.closeOnClick,defaultChecked:t.defaultChecked,disabled:t.disabled,label:i,className:z(R(I.item,s&&I.danger).className,X(`item`)),onCheckedChange:e=>t.onCheckedChange?.(e),children:ld(t,{iconAlign:r,indicatorOnRight:o,reserveIconSpace:a},l)},c)}if(e.type===`switch`){let t=e,n=we(t),i=typeof n==`string`?n:void 0,o=!!t.danger;return(0,J.jsx)(cd,{checked:t.checked,closeOnClick:t.closeOnClick,danger:o,defaultChecked:t.defaultChecked,disabled:t.disabled,label:i,onCheckedChange:t.onCheckedChange,children:ld(t,{iconAlign:r,reserveIconSpace:a})},c)}if(e.type===`divider`)return(0,J.jsx)($e,{className:z(F.separator,X(`separator`))},c);if(e.type===`group`){let t=e,n=i===`group`?t.children?We(t.children):!1:a,o=t.children?Le(t.children):!1;return(0,J.jsxs)(w,{className:X(`group`),children:[t.label?(0,J.jsx)(ae,{className:z(F.groupLabel,X(`group-label`)),children:t.label}):null,t.children?dd(t.children,l,{iconAlign:r,iconSpaceMode:i,indicatorOnRight:o,reserveIconSpace:n}):null]},c)}if(e.type===`submenu`||`children`in e&&e.children){let t=e,n=we(t),o=typeof n==`string`?n:void 0,s=`danger`in t&&!!t.danger,u=t.header!=null||t.footer!=null,d=t.children&&t.children.length>0?dd(t.children,l,{iconAlign:r,iconSpaceMode:i}):(0,J.jsx)(sd,{});return(0,J.jsxs)(xe,{defaultOpen:t.defaultOpen,open:t.open,onOpenChange:t.onOpenChange,children:[(0,J.jsx)(Ge,{...t.triggerProps,closeDelay:t.closeDelay,delay:t.delay,disabled:t.disabled,label:o,openOnHover:t.openOnHover,className:z(R(I.item,s&&I.danger).className,X(`item`)),onClick:t.onClick,children:ld(t,{iconAlign:r,reserveIconSpace:a,submenu:!0})}),(0,J.jsx)(m,{children:(0,J.jsx)(od,{alignOffset:-4,"data-submenu":``,sideOffset:-1,onContextMenu:Vu,children:(0,J.jsxs)(je,{className:z(R(I.popup,u&&I.popupWithSlots).className,Ae.popup,X()),children:[t.header==null?null:(0,J.jsx)(`div`,{className:z(F.header,X(`header`)),children:t.header}),u?(0,J.jsx)(`div`,{className:z(F.slotViewport,X(`viewport`)),children:d}):d,t.footer==null?null:(0,J.jsx)(`div`,{className:z(F.footer,X(`footer`)),children:t.footer})]})})})]},c)}let u=e,d=we(u),f=typeof d==`string`?d:void 0,h=`danger`in u&&!!u.danger;return(0,J.jsx)(ne,{closeOnClick:u.closeOnClick,disabled:u.disabled,label:f,className:z(R(I.item,h&&I.danger).className,X(`item`)),onClick:e=>ud(u,l,e),children:ld(u,{iconAlign:r,reserveIconSpace:a})},c)})},fd={"--lobe-dropdown-animation-duration":`0ms`},pd=(0,Y.memo)(()=>{let e=j(),t=st(),n=(0,Y.useSyncExternalStore)(qu,Ju,Yu);(0,Y.useEffect)(()=>{},[e]),(0,Y.useEffect)(()=>{let e=e=>Xu(e);return window.addEventListener(`pointerdown`,e,!0),window.addEventListener(`contextmenu`,e,!0),()=>{window.removeEventListener(`pointerdown`,e,!0),window.removeEventListener(`contextmenu`,e,!0)}},[]);let r=(0,Y.useMemo)(()=>dd(n.items,[],{iconAlign:n.iconAlign,iconSpaceMode:n.iconSpaceMode}),[n.items,n.iconAlign,n.iconSpaceMode]),{zIndex:i,ref:a}=It(`floating`),o=n.header!=null||n.footer!=null;return!e||!n.open&&n.items.length===0?null:(0,J.jsx)(id,{open:n.open,onOpenChange:e=>{e?Qu({open:e}):rd()},children:(0,J.jsx)(m,{container:t,children:(0,J.jsx)(ad,{anchor:n.anchor??void 0,className:z(F.positioner,X(`positioner`)),collisionPadding:Be(),ref:a,sideOffset:6,style:{...fd,zIndex:i},children:(0,J.jsxs)(je,{"data-has-footer":n.footer==null?void 0:``,"data-has-header":n.header==null?void 0:``,className:z(R(I.popup,o&&I.popupWithSlots).className,Ae.popup,X()),onContextMenu:Vu,children:[n.header==null?null:(0,J.jsx)(`div`,{className:z(F.header,X(`header`)),children:n.header}),n.virtual?(0,J.jsx)(Re,{className:X(`viewport`),itemSize:n.listItemHeight,children:r}):o?(0,J.jsx)(`div`,{className:z(F.slotViewport,X(`viewport`)),children:r}):r,n.footer==null?null:(0,J.jsx)(`div`,{className:z(F.footer,X(`footer`)),children:n.footer})]})})})})});pd.displayName=`ContextMenuHost`;function md(e,t){let n=(t??Tt(e).getComputedStyle(e)).transform,r=0,i=0,a=1;if(n&&n!==`none`){let e=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(e){let t=e[1].split(`, `).map(parseFloat);t.length===6?(r=t[4],i=t[5],a=Math.sqrt(t[0]*t[0]+t[1]*t[1])):t.length===16&&(r=t[12],i=t[13],a=t[0])}}return{x:r,y:i,scale:a}}var hd=Y.createContext(void 0);function gd(){let e=Y.useContext(hd);if(!e)throw Error(it(73));return e}var _d=0;function vd(e){return _d+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${_d}`}function yd(e,t){if(typeof e==`string`)return{description:e};if(typeof e==`function`){let n=e(t);return typeof n==`string`?{description:n}:n}return e}function bd(e){let t=new Map,n=0,r=0;return e.forEach((e,i)=>{let a=e.transitionStatus===`ending`;t.set(e.id,{value:e,domIndex:i,visibleIndex:a?-1:n,offsetY:r}),r+=e.height||0,a||(n+=1)}),t}function xd(e,t){let n=0;return e.map(e=>{if(e.transitionStatus===`ending`)return e;let r=n>=t;return n+=1,e.limited===r?e:{...e,limited:r}})}var Z={toasts:e=>e.toasts,isEmpty:e=>e.toasts.length===0,toast:(e,t)=>e.toastMetadata.get(t)?.value,toastIndex:(e,t)=>e.toastMetadata.get(t)?.domIndex??-1,toastOffsetY:(e,t)=>e.toastMetadata.get(t)?.offsetY??0,toastVisibleIndex:(e,t)=>e.toastMetadata.get(t)?.visibleIndex??-1,focused:e=>e.focused,expanded:e=>e.hovering||e.focused,expandedOrOutOfFocus:e=>e.hovering||e.focused||!e.isWindowFocused,prevFocusElement:e=>e.prevFocusElement},Sd=class extends kt{timers=new Map;areTimersPaused=!1;constructor(e){super({...e,toastMetadata:bd(e.toasts)},{},Z)}setViewport=e=>{this.set(`viewport`,e)};syncProviderProps(e,t){let n=this.state.limit!==t;if(this.state.timeout===e&&!n)return;let r={timeout:e,limit:t};if(n){let e=xd(this.state.toasts,t);r.toasts=e,r.toastMetadata=bd(e)}this.update(r)}disposeEffect=()=>()=>{this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear()};removeToast(e,t=!1){let n=Z.toastIndex(this.state,e);if(n===-1)return;let r=this.state.toasts[n];t||r?.onRemove?.();let i=[...this.state.toasts];i.splice(n,1),this.setToasts(i)}addToast=e=>{let{timeout:t,limit:n}=this.state,r=e.id||vd(`toast`);if(e.id){let t=Z.toast(this.state,e.id);if(t){if(t.transitionStatus===`ending`)this.removeToast(e.id,!0);else{let{id:t,transitionStatus:n,...r}=e;return this.updateToastInternal(e.id,r,!0,!0),e.id}}}let i={...e,id:r,updateKey:0,transitionStatus:`starting`},a=[i,...this.state.toasts];this.setToasts(xd(a,n));let o=i.timeout??t;return i.type!==`loading`&&o>0&&this.scheduleTimer(r,o,()=>this.closeToast(r)),Z.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),r};updateToast=(e,t)=>{let n=Z.toast(this.state,e);n&&n.transitionStatus!==`ending`&&this.updateToastInternal(e,typeof t==`function`?t(n):t,!1,!0)};updateToastInternal=(e,t,n=!1,r=!1)=>{let{timeout:i,toasts:a}=this.state,o=Z.toast(this.state,e);if(!o||o.transitionStatus===`ending`)return;let s={...o,...t,...r&&{updateKey:o.updateKey+1}};this.setToasts(a.map(t=>t.id===e?s:t));let c=s.timeout??i,l=o.timeout??i,u=Object.hasOwn(t,`timeout`),d=s.transitionStatus!==`ending`&&s.type!==`loading`&&c>0,f=this.timers.has(e),p=l!==c,m=o.type===`loading`;!d&&f?this.clearTimer(e):d&&(!f||p||u||m||n)&&(this.clearTimer(e),this.scheduleTimer(e,c,()=>this.closeToast(e)),Z.expandedOrOutOfFocus(this.state)&&this.pauseTimers())};closeToast=e=>{let t=e===void 0,{limit:n,toasts:r}=this.state,i;if(t)i=r,this.clearTimers();else{let t=Z.toast(this.state,e);if(!t)return;i=[t],this.clearTimer(e)}let a=xd(r.map(n=>t||n.id===e?{...n,transitionStatus:`ending`,height:0}:n),n);this.setToasts(a,!a.some(e=>e.transitionStatus!==`ending`)),i.forEach(e=>{e.transitionStatus!==`ending`&&e.onClose?.()}),this.handleFocusManagement(e)};promiseToast=(e,t)=>{let n=yd(t.loading),r=this.addToast({...n,type:`loading`}),i=e.then(e=>{let n=yd(t.success,e);return this.updateToast(r,{...n,type:`success`,timeout:n.timeout}),e}).catch(e=>{let n=yd(t.error,e);return this.updateToast(r,{...n,type:`error`,timeout:n.timeout}),Promise.reject(e)});return{}.hasOwnProperty.call(t,`setPromise`)&&t.setPromise(i),i};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(e=>{e.timeout&&(e.timeout.clear(),e.remaining=Math.max(e.remaining-(Date.now()-e.start),0))}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((e,t)=>{e.remaining=e.remaining>0?e.remaining:e.delay,e.timeout??=ot.create(),e.timeout.start(e.remaining,()=>{this.handleTimerFired(t),e.callback()}),e.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=e=>{if(e.pointerType!==`touch`)return;let t=Pt(e);Ot(this.state.viewport,t)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(e,t,n){let r=Date.now(),i=Z.expandedOrOutOfFocus(this.state)?void 0:ot.create();i?.start(t,()=>{this.handleTimerFired(e),n()}),this.timers.set(e,{timeout:i,start:r,delay:t,remaining:t,callback:n})}clearTimers(){this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear(),this.areTimersPaused=!1}clearTimer(e){this.timers.get(e)?.timeout?.clear(),this.timers.delete(e),this.resetPausedStateIfNoTimersRemain()}handleTimerFired(e){this.timers.delete(e),this.resetPausedStateIfNoTimersRemain()}resetPausedStateIfNoTimersRemain(){this.timers.size===0&&(this.areTimersPaused=!1)}setToasts(e,t=e.length===0){let n={toasts:e,toastMetadata:bd(e)};t&&(n.hovering=!1,n.focused=!1),this.update(n)}handleFocusManagement(e){let t=Ft(vt(this.state.viewport));if(!this.state.viewport||!Ot(this.state.viewport,t)||!Dt(t))return;if(e===void 0){this.restoreFocusToPrevElement();return}let n=Z.toasts(this.state),r=Z.toastIndex(this.state,e),i=(e,t)=>{for(let r=e;r>=0&&r<n.length;r+=t)if(n[r].transitionStatus!==`ending`)return n[r];return null},a=i(r+1,1)??i(r-1,-1);a?a.ref?.current?.focus():this.restoreFocusToPrevElement()}},Cd=function(e){let{children:t,timeout:n=5e3,limit:r=3,toastManager:i}=e,a=ct(()=>new Sd({timeout:n,limit:r,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return mt(a.disposeEffect),Y.useEffect(function(){if(i)return i[` subscribe`](({action:e,options:t})=>{let n=t.id;e===`promise`&&t.promise?a.promiseToast(t.promise,t):e===`update`&&n?a.updateToast(n,t.updates):e===`close`?a.closeToast(n):a.addToast(t)})},[a,i]),(0,J.jsxs)(hd.Provider,{value:a,children:[(0,J.jsx)(wd,{store:a,timeout:n,limit:r}),t]})};function wd(e){let{store:t,timeout:n,limit:r}=e;return nt(()=>{t.syncProviderProps(n,r)},[t,n,r]),null}var Td=`--toast-frontmost-height`,Ed=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,s=gd(),c=lt(),l=Y.useRef(!1),u=Y.useRef(!1),d=Y.useRef(!1),f=s.useState(`isEmpty`),p=s.useState(`toasts`),m=s.useState(`focused`),h=s.useState(`expanded`),g=s.useState(`prevFocusElement`),_=p[0]?.height,v=p.some(e=>e.transitionStatus===`ending`),y=p.filter(e=>e.priority===`high`);Y.useEffect(()=>{let e=s.state.viewport;if(!e||f)return;let t=Tt(e),n=vt(e);function r(t){t.key===`F6`&&Pt(t)!==e&&(t.preventDefault(),s.set(`prevFocusElement`,Ft(n)),e?.focus({preventScroll:!0}),s.pauseTimers(),s.set(`focused`,!0))}function i(e){Pt(e)===t&&(s.set(`isWindowFocused`,!1),s.pauseTimers())}function a(n){if(n.relatedTarget)return;let r=Pt(n),i=Ft(vt(e));r!==t&&Ot(e,r)&&Dt(i)||s.resumeTimers(),c.start(0,()=>s.set(`isWindowFocused`,!0))}return yt(Lt(t,`keydown`,r),Lt(t,`blur`,i,!0),Lt(t,`focus`,a,!0),Lt(n,`pointerdown`,s.handleDocumentPointerDown,!0))},[s,c,f]);function b(e){l.current=!0;let t=e.relatedTarget===s.state.viewport?p.find(e=>e.transitionStatus!==`ending`&&!e.limited):void 0;t?t.ref?.current?.focus():s.restoreFocusToPrevElement()}function x(e){e.key===`Tab`&&e.shiftKey&&Pt(e.nativeEvent)===s.state.viewport&&(e.preventDefault(),s.restoreFocusToPrevElement())}function S(){s.state.toasts.some(e=>e.transitionStatus===`ending`)||d.current||!u.current||(s.set(`hovering`,!1),s.select(`expandedOrOutOfFocus`)||s.resumeTimers(),u.current=!1)}Y.useEffect(S,[v,s]);function C(){s.pauseTimers(),s.set(`hovering`,!0),u.current=!1}function w(){u.current=!0,S()}function T(e){e.pointerType===`touch`&&(d.current=!0)}function E(e){e.pointerType===`touch`&&(d.current=!1,S())}function D(){l.current?l.current=!1:m||Dt(Ft(vt(s.state.viewport)))&&(s.set(`focused`,!0),s.pauseTimers())}function O(e){m&&!Ot(s.state.viewport,e.relatedTarget)&&(s.set(`focused`,!1),s.select(`expandedOrOutOfFocus`)||s.resumeTimers())}let k={tabIndex:-1,role:`region`,"aria-live":`polite`,"aria-atomic":!1,"aria-relevant":`additions text`,"aria-label":`Notifications`,onMouseEnter:C,onMouseMove:C,onMouseLeave:w,onFocus:D,onBlur:O,onKeyDown:x,onClick:D,onPointerDown:T,onPointerUp:E,onPointerCancel:E,style:{[Td]:_?`${_}px`:void 0}},A={expanded:h},j=!f&&g&&(0,J.jsx)(St,{onFocus:b}),M=rt(`div`,e,{ref:[t,s.setViewport],state:A,props:[k,o,{children:(0,J.jsxs)(Y.Fragment,{children:[j,a,j]})}]});return(0,J.jsxs)(Y.Fragment,{children:[j,M,!m&&y.length>0&&(0,J.jsx)(`div`,{style:Ct,children:y.map(e=>(0,J.jsxs)(`div`,{role:`alert`,"aria-atomic":!0,children:[(0,J.jsx)(`div`,{children:e.title}),(0,J.jsx)(`div`,{children:e.description})]},e.id))})]})}),Dd=Y.createContext(void 0);function Od(){let e=Y.useContext(Dd);if(!e)throw Error(it(66));return e}function kd(e,t,n){switch(e){case`up`:return-n;case`down`:return n;case`left`:return-t;case`right`:return t;default:return 0}}var Ad=`--toast-index`,jd=`--toast-offset-y`,Md=`--toast-height`,Nd=`--toast-swipe-movement-x`,Pd=`--toast-swipe-movement-y`,Fd=`data-swipe-direction`,Id=t(n(),1),Ld={...xt,swipeDirection(e){return e?{[Fd]:e}:null}},Rd=40,zd=10,Bd=.5,Vd=1,Hd=`${bt},${wt}`,Ud=Y.forwardRef(function(e,t){let{toast:n,render:r,className:i,swipeDirection:a=[`down`,`right`],style:o,...s}=e,c=n.positionerProps?.anchor!==void 0,l=[];c||(l=Array.isArray(a)?a:[a]);let u=l.length>0,d=gd(),[f,p]=Y.useState(void 0),[m,h]=Y.useState(!1),[g,_]=Y.useState(!1),[v,y]=Y.useState({x:0,y:0}),[b,x]=Y.useState({x:0,y:0,scale:1}),[S,C]=Y.useState(),[w,T]=Y.useState(),[E,D]=Y.useState(null),O=Y.useRef(null),k=Y.useRef(void 0),A=Y.useRef({x:0,y:0}),j=Y.useRef({x:0,y:0,scale:1}),M=Y.useRef(void 0),ee=Y.useRef(0),te=Y.useRef(!1),N=Y.useRef({x:0,y:0}),ne=Y.useRef(!1),re=Y.useRef({x:0,y:0}),ie=Y.useRef(null),ae=Y.useRef(null),oe=d.useState(`toastIndex`,n.id),se=d.useState(`toastVisibleIndex`,n.id),ce=d.useState(`toastOffsetY`,n.id),le=d.useState(`focused`),ue=d.useState(`expanded`);At({open:n.transitionStatus!==`ending`,ref:O,onComplete(){n.transitionStatus===`ending`&&d.removeToast(n.id)}});let de=ft((e=!1)=>{let t=O.current;if(!t)return;let r=t.style.height;t.style.height=`auto`;let i=t.offsetHeight;t.style.height=r;function a(){d.updateToastInternal(n.id,{ref:O,height:i,transitionStatus:void 0})}e?Id.flushSync(a):a()});nt(()=>{let e=k.current;(n.transitionStatus===`starting`||e!==n.id)&&(e!==void 0&&(p(void 0),x({x:0,y:0,scale:1}),fe({x:0,y:0})),k.current=n.id,de())},[de,n.id,n.transitionStatus]);function fe(e){re.current=e,y(e)}nt(()=>()=>{ae.current?.abort()},[]);function pe(e,t){let n=e=>e>0?e**Bd:-(Math.abs(e)**Bd),r=e>0&&!l.includes(`right`)||e<0&&!l.includes(`left`),i=t>0&&!l.includes(`down`)||t<0&&!l.includes(`up`);return{x:r?n(e):e,y:i?n(t):t}}let me=ft(e=>{if(e.pointerId!==ie.current)return;ie.current=null,ae.current?.abort(),ae.current=null,h(!1),_(!1),D(null);let t=j.current;if(e.type===`pointercancel`||te.current){fe({x:t.x,y:t.y}),p(void 0);return}let r=re.current,i=r.x-t.x,a=r.y-t.y,o;for(let e of l)if(kd(e,i,a)>Rd){o=e;break}o?(p(o),d.closeToast(n.id)):(fe({x:t.x,y:t.y}),p(void 0))});function he(e){if(e.button!==0)return;e.pointerType===`touch`&&d.pauseTimers();let t=Pt(e.nativeEvent);if(Mt(t,`button,a,input,textarea,[role="button"],${Hd}`))return;te.current=!1,M.current=void 0,ee.current=0,ie.current=e.pointerId,A.current={x:e.clientX,y:e.clientY},N.current=A.current;let n=e.currentTarget,r=md(n);j.current=r,x(r),fe({x:r.x,y:r.y}),d.set(`hovering`,!0),h(!0),_(!1),D(null),ne.current=!0,ae.current?.abort();let i=new AbortController;ae.current=i;let a=vt(n);a.addEventListener(`pointerup`,me,{signal:i.signal}),a.addEventListener(`pointercancel`,me,{signal:i.signal}),n.setPointerCapture?.(e.pointerId)}function P(e){if(e.pointerId!==ie.current)return;e.preventDefault(),ne.current&&=(A.current={x:e.clientX,y:e.clientY},!1);let{clientY:t,clientX:n,movementX:r,movementY:i}=e;(i<0&&t>N.current.y||i>0&&t<N.current.y)&&(N.current={x:N.current.x,y:t}),(r<0&&n>N.current.x||r>0&&n<N.current.x)&&(N.current={x:n,y:N.current.y});let a=n-A.current.x,o=t-A.current.y,s=t-N.current.y,c=n-N.current.x,u=E;if(!g&&Math.sqrt(a*a+o*o)>=Vd){_(!0);let e=l.includes(`left`)||l.includes(`right`),t=l.includes(`up`)||l.includes(`down`);e&&t&&(u=Math.abs(a)>Math.abs(o)?`horizontal`:`vertical`,D(u))}let d;if(!M.current)u===`vertical`?o>0?d=`down`:o<0&&(d=`up`):u===`horizontal`?a>0?d=`right`:a<0&&(d=`left`):d=Math.abs(a)>=Math.abs(o)?a>0?`right`:`left`:o>0?`down`:`up`,d&&l.includes(d)&&(M.current=d,ee.current=kd(d,a,o),p(d));else{let e=M.current,t=kd(e,c,s);t>Rd?(te.current=!1,p(e)):!(l.includes(`left`)&&l.includes(`right`))&&!(l.includes(`up`)&&l.includes(`down`))&&ee.current-t>=zd&&(te.current=!0)}let f=pe(a,o),m=j.current.x,h=j.current.y,v=l.includes(`left`)||l.includes(`right`),y=l.includes(`up`)||l.includes(`down`);u!==`vertical`&&v&&(m+=f.x),u!==`horizontal`&&y&&(h+=f.y),fe({x:m,y:h})}function ge(e){if(e.key===`Escape`){if(!O.current||!Ot(O.current,Ft(vt(O.current))))return;d.closeToast(n.id)}}Y.useEffect(()=>{let e=O.current;if(!u||!e)return;function t(t){ie.current!==null&&Ot(e,Pt(t))&&t.preventDefault()}return Lt(e,`touchmove`,t,{passive:!1})},[u]);function _e(){let e=v.x-b.x,t=v.y-b.y;return{transition:m?`none`:void 0,transform:m?`translateX(${v.x}px) translateY(${v.y}px) scale(${b.scale})`:void 0,[Nd]:`${e}px`,[Pd]:`${t}px`}}let ve=n.priority===`high`,ye={role:ve?`alertdialog`:`dialog`,tabIndex:0,"aria-modal":!1,"aria-labelledby":S,"aria-describedby":w,"aria-hidden":ve&&!le?!0:void 0,onPointerDown:u?he:void 0,onPointerMove:u?P:void 0,onPointerUp:u?me:void 0,onPointerCancel:u?me:void 0,onKeyDown:ge,inert:jt(n.limited),style:{..._e(),[Ad]:n.transitionStatus===`ending`?oe:se,[jd]:`${ce}px`,[Md]:n.height?`${n.height}px`:void 0}},be=Y.useMemo(()=>({toast:n,setTitleId:C,setDescriptionId:T,recalculateHeight:de,visibleIndex:se,expanded:ue}),[n,C,T,de,se,ue]),F={transitionStatus:n.transitionStatus,expanded:ue,limited:n.limited||!1,type:n.type,swiping:m,swipeDirection:f},xe=rt(`div`,e,{ref:[t,O],state:F,stateAttributesMapping:Ld,props:[ye,s]});return(0,J.jsx)(Dd.Provider,{value:be,children:xe})}),Wd=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{visibleIndex:o,expanded:s,recalculateHeight:c}=Od(),l=Y.useRef(null);return nt(()=>{c();let e=l.current;if(!e||typeof ResizeObserver!=`function`||typeof MutationObserver!=`function`)return;let t=new ResizeObserver(()=>c(!0)),n=new MutationObserver(()=>c(!0));return t.observe(e),n.observe(e,{childList:!0,subtree:!0,characterData:!0}),()=>{t.disconnect(),n.disconnect()}},[c]),rt(`div`,e,{ref:[t,l],state:{expanded:s,behind:o>0},props:a})});function Gd(e){return e==null||typeof e==`boolean`||e===``?!1:!Array.isArray(e)||e.some(Gd)}function Kd(e){return Y.isValidElement(e)&&Gd(e.props.children)}function qd(e,t,n){let{toast:r,setTitleId:i,setDescriptionId:a}=Od(),o=n===`title`?i:a,s=t??(n===`title`?r.title:r.description);return{id:at(e),children:s,type:r.type,setId:o}}function Jd(e,t,n){let r=Kd(e);return nt(()=>{if(r)return n(t),()=>{n(e=>e===t?void 0:e)}},[r,t,n]),r?e:null}var Yd=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{id:c,children:l,type:u,setId:d}=qd(a,o,`description`);return Jd(rt(`p`,e,{ref:t,state:{type:u},props:{...s,id:c,children:l}}),c,d)}),Xd=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,children:o,...s}=e,{id:c,children:l,type:u,setId:d}=qd(a,o,`title`);return Jd(rt(`h2`,e,{ref:t,state:{type:u},props:{...s,id:c,children:l}}),c,d)}),Zd=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...s}=e,c=gd(),{toast:l,expanded:u}=Od(),[d,f]=Y.useState(!1),{getButtonProps:p,buttonRef:m}=Et({disabled:a,native:o}),h={type:l.type};return rt(`button`,e,{ref:[t,m],state:h,props:[{"aria-hidden":!u&&!d,onClick(){c.closeToast(l.id)},onFocus(){f(!0)},onBlur(){f(!1)}},s,p]})}),Qd=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...s}=e,{toast:c}=Od(),l=c.actionProps?.children??s.children,{getButtonProps:u,buttonRef:d}=Et({disabled:a,native:o}),f={type:c.type},p=rt(`button`,e,{ref:[t,d],state:f,props:[s,c.actionProps,u,{children:l}]});return Kd(p)?p:null}),$d=Y.forwardRef(function(e,t){return(0,J.jsx)(ke,{ref:t,...e})});function ef(){let e=gd(),t=e.useState(`toasts`);return Y.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}function tf(){let e=new Set;function t(t){e.forEach(e=>e(t))}return{" subscribe":function(t){return e.add(t),()=>{e.delete(t)}},add(e){let n=e.id||vd(`toast`);return t({action:`add`,options:{...e,id:n,transitionStatus:`starting`}}),n},close(e){t({action:`close`,options:{id:e}})},update(e,n){t({action:`update`,options:{id:e,updates:n}})},promise(e,n){let r=e;return t({action:`promise`,options:{...n,promise:e,setPromise(e){r=e}}}),r}}}var nf=(0,Y.createContext)({position:`bottom-right`,swipeDirection:[`down`,`right`]}),rf=()=>(0,Y.useContext)(nf),af=[],of=new Set,sf=()=>{for(let e of of)e()},cf=e=>(af.push(e),sf(),()=>{let t=af.indexOf(e);t!==-1&&af.splice(t,1),sf()}),lf=e=>af[0]===e,uf=e=>(of.add(e),()=>{of.delete(e)}),df=20,ff=5e3,pf=!1,mf=[],hf=e=>{pf?e():(mf.length>=df&&mf.shift(),mf.push({queuedAt:Date.now(),run:e}))},gf=()=>{pf=!0;let e=mf;mf=[];let t=Date.now();for(let n of e)t-n.queuedAt<=ff&&n.run()},_f=()=>{pf=!1},Q=gt({block:`toast`,dataAttributes:[`type`,`position`],elements:[`viewport`,`content`,`body`,`icon`,`main`,`title-row`,`title`,`close`,`description`,`actions`,`action`]}),$={action:{kVAM5u:`lb181nr7w`,kaIpWk:`lb1vihcfj`,ksu8eU:`lbng3xce`,kMzoRj:`lbfn42iu`,kg3NbH:`lbaope02`,kmkexE:`lb1cd9vmy`,kGNEyG:`lb6s0dn4`,kkrTdU:`lb1ypdohk`,k1xSpc:`lb3nfvp2`,kmuXW:`lb2lah0s`,kGuDYH:`lbfifm61`,k63SB2:`lbk50ysn`,kjj79g:`lbl56j7k`,kLWn49:`lbo5v014`,kZKoxP:`lb1fgtraw`,$$css:!0},actionDanger:{"--lobe-focus-ring-color":`lb2hswdp`,kWkggS:`lbixdnzb lb1ca5mm0 lb4c98my`,kMwMTN:`lb15g0kca`,kjBf7l:`lbiep9q5 lb1y5du2d`,$$css:!0},actionGhost:{kVAM5u:`lbqnr5ac lb1ahehej lbuhn3al`,ksu8eU:`lb1y0btm7`,kMzoRj:`lbmkeg23`,kWkggS:`lbjbqb8w`,kMwMTN:`lb66ogz0 lb1l4wxl8 lb1nelral`,$$css:!0},actionPrimary:{kWkggS:`lb1hsafae lblxzpop lb1gwghft`,kMwMTN:`lb15g0kca`,$$css:!0},actionSecondary:{kWkggS:`lbjjy28o lbswrfa9 lb147z954`,kMwMTN:`lb66ogz0`,$$css:!0},actionText:{kWkggS:`lbjbqb8w lbswrfa9 lb1cpyog9`,kMwMTN:`lb16owwnm`,$$css:!0},actions:{kOIVth:`lb167g77z`,kGNEyG:`lb6s0dn4`,kSGwAc:`lbpvyfi4`,k1xSpc:`lb78zum5`,kzQI83:`lb1iyjqo2`,kmuXW:`lb2lah0s`,kjj79g:`lb13a6bvl`,keoZOQ:`lb1xmf6yo`,$$css:!0},close:{kmVPX3:`lb1717udv`,kVAM5u:`lb181nr7w`,kaIpWk:`lb1vihcfj`,ksu8eU:`lbng3xce`,kMzoRj:`lbfn42iu`,kmkexE:`lb1ng1d19`,kGNEyG:`lb6s0dn4`,kWkggS:`lbjbqb8w lb1ri6zej`,kMwMTN:`lbc77et8 lb1bxu9lh`,kkrTdU:`lb1ypdohk`,k1xSpc:`lb78zum5`,kmuXW:`lb2lah0s`,kjj79g:`lbl56j7k`,keTefX:`lbvc5jky`,kZKoxP:`lb1qx5ct2`,kzqmXN:`lbw4jnvo`,$$css:!0},content:{kVQacm:`lbb3r6kr`,kmkexE:`lb1hzt7jf`,kSiTet:`lb1g256cz lbcbbmyo`,kfzvcC:`lbp78wxm lb1cicrrk`,$$css:!0},contentArea:{kUk6DE:`lb98rzlu`,k1xSpc:`lb78zum5`,kXwgrk:`lbdt5ytf`,k7Eaqz:`lbeuugli`,$$css:!0},description:{kogj98:`lb1ghz6dp`,kMwMTN:`lbc77et8`,kGuDYH:`lb4z9k3i`,kLWn49:`lb1evy7pa`,$$css:!0},descriptionWithTitle:{keoZOQ:`lb1gslohp`,$$css:!0},descriptionStandalone:{kMwMTN:`lb66ogz0`,$$css:!0},icon:{kGNEyG:`lb6s0dn4`,k1xSpc:`lb78zum5`,kmuXW:`lb2lah0s`,kjj79g:`lbl56j7k`,$$css:!0},root:{"--toast-collapsed-height":`lb1o8nl8n`,"--toast-gap":`lbr9sdi6`,"--toast-peek":`lb1wxzbih`,"--toast-scale":`lb1vhpo3u`,"--toast-shrink":`lb1c223hw`,kaIpWk:`lb159sbz3`,kkqhue:`lb17y0mx6`,k8WAf4:`lb10dr8xq`,kg3NbH:`lb1hr3lfm`,kHypHr:`lbx83zyx`,kWkggS:`lb1w937bt`,kGVxlE:`lbj07k4p`,kB7OPa:`lb9f619`,kMwMTN:`lb66ogz0`,kkrTdU:`lbt0e3qv`,kSiTet:`lb4ki41r`,kVAEAm:`lb10l6tqk`,kIyJzY:`lb1ssesjg lbm69ghq`,k1ekBW:`lb19ix5ol lbo3tt7b`,kAMwcw:`lb1477tyf lb7cr0y4`,kfSwDN:`lb87ps6o`,kY2c9j:`lb1l48cz2`,kZKoxP:`lb677f43 lbnbj6on`,kzqmXN:`lbh8yej3`,$$css:!0},rootBottom:{kYYq5F:`lb1fclj7r`,k3aq6I:`lb1qsqgls lbz09l4w lb1ce1yp4`,k3nNDw:`lb18ouj0k`,kcktkL:`lbb7ltuz`,k5JduY:`lb100rkj9`,k3foIR:`lb1srwf7z`,kwXMNM:`lb1j6awrg`,k4zj60:`lb1jflgyd`,$$css:!0},rootTop:{kYYq5F:`lbdwv5cp`,k3aq6I:`lb1jkqqlh lb7ly47h lbjeddtc`,k3nNDw:`lb1dp6rp6`,kcktkL:`lbb7ltuz`,k5JduY:`lb100rkj9`,k8Iv0R:`lb1wpe5ba`,kwXMNM:`lb1j6awrg`,k4zj60:`lb1jflgyd`,$$css:!0},title:{kogj98:`lb1ghz6dp`,kMwMTN:`lb66ogz0`,kGuDYH:`lbif65rj`,k63SB2:`lbk50ysn`,kLWn49:`lb1evy7pa`,$$css:!0},titleRow:{kOIVth:`lb167g77z`,kGNEyG:`lb1cy8zhl`,k1xSpc:`lb78zum5`,$$css:!0},toastBody:{kOIVth:`lb1v2ro7d`,kGNEyG:`lb1cy8zhl`,k1xSpc:`lb78zum5`,$$css:!0},viewport:{kI3sdo:`lb1b6ykf0`,kVAEAm:`lbixxii4`,kY2c9j:`lb979qle`,ks0D6T:`lbg5xlue`,kzqmXN:`lb1fzdfyu lbm1mc0`,$$css:!0},viewportBottom:{krVfgx:`lbo7r6ss`,kLqNvP:`lbbudbmw`,k3aq6I:`lbuuh30`,$$css:!0},viewportBottomLeft:{krVfgx:`lbo7r6ss`,kLqNvP:`lb10vz1dz`,$$css:!0},viewportBottomRight:{krVfgx:`lbo7r6ss`,kt4wiu:`lb1cj2eds`,k3aq6I:`lb18zyp77`,kIyJzY:`lb1x2t6jx lb12w9bfk`,k1ekBW:`lb11xpdln lb4wkmsb`,kAMwcw:`lbsygjwy lb7v8fk2`,$$css:!0},viewportTop:{k87sOh:`lb1kd19f1`,kLqNvP:`lbbudbmw`,k3aq6I:`lbuuh30`,$$css:!0},viewportTopLeft:{k87sOh:`lb1kd19f1`,kLqNvP:`lb10vz1dz`,$$css:!0},viewportTopRight:{k87sOh:`lb1kd19f1`,kt4wiu:`lb1cj2eds`,$$css:!0}},vf={bottom:$.viewportBottom,"bottom-left":$.viewportBottomLeft,"bottom-right":$.viewportBottomRight,top:$.viewportTop,"top-left":$.viewportTopLeft,"top-right":$.viewportTopRight},yf={bottom:$.rootBottom,"bottom-left":$.rootBottom,"bottom-right":$.rootBottom,top:$.rootTop,"top-left":$.rootTop,"top-right":$.rootTop},bf={danger:$.actionDanger,ghost:$.actionGhost,primary:$.actionPrimary,secondary:$.actionSecondary,text:$.actionText},xf={default:qe,error:qa,info:qe,loading:v,success:Ga,warning:ue},Sf={default:Ze.colorText,error:Ze.colorError,info:Ze.colorInfo,loading:Ze.colorPrimary,success:Ze.colorSuccess,warning:Ze.colorWarning},Cf=(0,Y.memo)(({toast:e,classNames:t,styles:n})=>{let{position:r,swipeDirection:i}=rf(),a=e.data,o=a?.type??`default`,s=a?.closable??!0,c=a?.hideCloseButton??!1,l=s&&!c,u=a?.icon,d=e.title??a?.title,f=e.description??a?.description,p=e.actionProps??a?.actionProps,m=a?.actions,h=Sf[o],g=u??xf[o],_=o===`loading`,v=()=>g?(0,J.jsx)(`div`,{...L($.icon,z(Q(`icon`),t?.icon),n?.icon),children:(0,J.jsx)(dt,{color:h,icon:g,size:18,spin:_})}):null,y=()=>m&&m.length>0?(0,J.jsx)(`div`,{...L($.actions,z(Q(`actions`),t?.actions),n?.actions),children:m.map((e,r)=>(0,J.jsx)(Qd,{...L([$.action,ut.info,bf[e.variant??`primary`]],z(Q(`action`),t?.action),n?.action),onClick:e.onClick,...e.props,children:e.label},r))}):p?(0,J.jsx)(Qd,{...L([$.action,ut.info,$.actionPrimary],z(Q(`action`),t?.action),n?.action),...p}):null;return(0,J.jsx)(Ud,{swipeDirection:i,toast:e,...ht({position:r,type:o}),...L([$.root,yf[r]],z(Q(),t?.root),{...n?.root,...a?.style}),children:(0,J.jsx)(Wd,{...L($.content,z(Q(`content`),t?.content),n?.content),children:(0,J.jsxs)(`div`,{...L($.toastBody,Q(`body`)),children:[v(),(0,J.jsxs)(`div`,{...L($.contentArea,Q(`main`)),children:[d?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`div`,{...L($.titleRow,Q(`title-row`)),children:[(0,J.jsx)(Xd,{...L($.title,z(Q(`title`),t?.title),n?.title),children:d}),l&&(0,J.jsx)(Zd,{"aria-label":`Close`,...L($.close,z(Q(`close`),t?.close),n?.close),children:(0,J.jsx)(pt,{size:14})})]}),f&&(0,J.jsx)(Yd,{...L([$.description,$.descriptionWithTitle],z(Q(`description`),t?.description),n?.description),children:f})]}):f&&(0,J.jsxs)(`div`,{...L($.titleRow,Q(`title-row`)),children:[(0,J.jsx)(Yd,{...L([$.description,$.descriptionStandalone],z(Q(`description`),t?.description),n?.description),children:f}),l&&(0,J.jsx)(Zd,{"aria-label":`Close`,...L($.close,z(Q(`close`),t?.close),n?.close),children:(0,J.jsx)(pt,{size:14})})]}),y()]})]})})})});Cf.displayName=`ToastItem`;var wf=[`top`,`top-left`,`top-right`,`bottom`,`bottom-left`,`bottom-right`],Tf={duration:5e3,limit:5,position:`bottom-right`,swipeDirection:[`down`,`right`]},Ef={bottom:tf(),"bottom-left":tf(),"bottom-right":tf(),top:tf(),"top-left":tf(),"top-right":tf()},Df={bottom:new Map,"bottom-left":new Map,"bottom-right":new Map,top:new Map,"top-left":new Map,"top-right":new Map},Of=e=>Ef[e],kf=0,Af=()=>`toast-${Date.now().toString(36)}-${(kf++).toString(36)}`,jf=e=>wf.find(t=>Df[t].has(e)),Mf=(e,t)=>Array.from(Df[e].keys()).at(-1)===t,Nf=(e,t)=>typeof e==`string`?{description:e,type:t}:{...e,type:t},Pf=(e,t)=>({close:()=>hf(()=>Of(t).close(e)),id:e,update:n=>{hf(()=>Of(t).update(e,{data:n,description:n.description,title:n.title}))}}),Ff=e=>{let t=e.placement??Tf.position,n=Of(t),{id:r,onClose:i,onRemove:a}=e;if(r){let e=jf(r);e&&!(e===t&&Mf(t,r))&&(Df[e].get(r).superseded=!0,Df[e].delete(r),hf(()=>Of(e).close(r)))}let o=r??Af(),s={superseded:!1};return Df[t].set(o,s),hf(()=>{n.add({id:o,data:e,description:e.description,onClose:()=>{s.superseded||i?.()},onRemove:()=>{s.superseded||(Df[t].delete(o),a?.())},timeout:e.duration??Tf.duration,title:e.title})}),Pf(o,t)},If=e=>{if(e)for(let[t,n]of Object.entries(Ef))Df[t].delete(e),hf(()=>n.close(e));else for(let[e,t]of Object.entries(Ef)){let n=Array.from(Df[e].keys());Df[e].clear(),hf(()=>{for(let e of n)t.close(e)})}},Lf=e=>Ff(Nf(e,`success`)),Rf=e=>Ff(Nf(e,`error`)),zf=e=>Ff(Nf(e,`info`)),Bf=e=>Ff(Nf(e,`warning`)),Vf=e=>Ff({duration:0,...Nf(e,`loading`)});async function Hf(e,t){let n=Ff({closable:!1,duration:0,type:`loading`,...typeof t.loading==`string`?{description:t.loading}:t.loading});try{let r=await e;return n.close(),Ff({type:`success`,...typeof t.success==`string`?{description:t.success}:typeof t.success==`function`?{description:t.success(r)}:t.success}),r}catch(e){throw n.close(),Ff({type:`error`,...typeof t.error==`string`?{description:t.error}:typeof t.error==`function`?{description:t.error(e)}:t.error}),e}}var Uf=Object.assign(e=>Ff({type:`default`,...e}),{dismiss:If,error:Rf,info:zf,loading:Vf,promise:Hf,success:Lf,warning:Bf}),Wf=(0,Y.memo)(()=>{let{toasts:e}=ef();return e.map(e=>(0,J.jsx)(Cf,{toast:e},e.id))});Wf.displayName=`ToastList`;var Gf=(0,Y.memo)(({root:e,className:t,duration:n=5e3,limit:r=5,position:i=`bottom-right`,swipeDirection:a=[`down`,`right`]})=>{let o=j(),s=st(),[c,l]=(0,Y.useState)(void 0),u=(0,Y.useId)();(0,Y.useEffect)(()=>cf(u),[u]);let d=(0,Y.useSyncExternalStore)(uf,()=>lf(u),()=>!1);if((0,Y.useEffect)(()=>{d&&(Tf={duration:n,limit:r,position:i,swipeDirection:a})},[n,r,i,a,d]),(0,Y.useEffect)(()=>{d&&l(Nt(`toast`))},[d]),(0,Y.useEffect)(()=>{if(d&&o)return gf(),()=>{_f()}},[d,o]),!o||!d)return null;let f=e??s??document.body;return wf.map(e=>(0,J.jsx)(nf,{value:{position:e,swipeDirection:a},children:(0,J.jsx)(Cd,{limit:r,timeout:n,toastManager:Of(e),children:(0,J.jsx)($d,{container:f,children:(0,J.jsx)(Ed,{"data-position":e,...L([$.viewport,vf[e]],z(Q(`viewport`),t),c===void 0?void 0:{zIndex:c}),children:(0,J.jsx)(Wf,{})})})})},e))});Gf.displayName=`ToastHost`;var Kf=e({Board:()=>zu,Group:()=>qf,Item:()=>Nu}),qf=bu(El),Jf=e({Reorder:()=>Kf,a:()=>ga,abbr:()=>Ji,address:()=>ca,animate:()=>ji,area:()=>ni,article:()=>Qi,aside:()=>fa,audio:()=>li,b:()=>Vi,base:()=>ba,bdi:()=>pi,bdo:()=>bi,big:()=>na,blockquote:()=>Gi,body:()=>Oi,button:()=>wi,canvas:()=>Qr,caption:()=>wa,circle:()=>Ia,cite:()=>oi,clipPath:()=>Ma,code:()=>Er,col:()=>jn,colgroup:()=>Oa,create:()=>ua,data:()=>Ar,datalist:()=>Rn,dd:()=>Fn,defs:()=>mr,del:()=>Ri,desc:()=>Tn,details:()=>Fi,dfn:()=>cr,dialog:()=>dr,div:()=>_r,dl:()=>Vn,dt:()=>Xn,ellipse:()=>ar,em:()=>Cr,embed:()=>Ba,feBlend:()=>On,feColorMatrix:()=>Lr,feComponentTransfer:()=>qn,feComposite:()=>Pr,feConvolveMatrix:()=>Br,feDiffuseLighting:()=>Wn,feDisplacementMap:()=>nr,feDistantLight:()=>aa,feDropShadow:()=>$n,feFlood:()=>Kr,feFuncA:()=>Ur,feFuncB:()=>Yr,feFuncG:()=>br,feFuncR:()=>Sn,feGaussianBlur:()=>yi,feImage:()=>ya,feMerge:()=>Zi,feMergeNode:()=>da,feMorphology:()=>Pi,feOffset:()=>ai,fePointLight:()=>ta,feSpecularLighting:()=>ha,feSpotLight:()=>fi,feTile:()=>Wi,feTurbulence:()=>Ca,fieldset:()=>gi,figcaption:()=>Ci,figure:()=>ia,filter:()=>qi,footer:()=>Ai,foreignObject:()=>Di,form:()=>ti,g:()=>Da,h1:()=>za,h2:()=>ci,h3:()=>Fa,h4:()=>kr,h5:()=>Pn,h6:()=>ja,head:()=>Nr,header:()=>Bn,hgroup:()=>Ln,hr:()=>gr,html:()=>Bi,i:()=>Dn,iframe:()=>Li,image:()=>ur,img:()=>pr,input:()=>yr,ins:()=>Un,kbd:()=>Qn,keygen:()=>sr,label:()=>Tr,legend:()=>Ha,li:()=>An,line:()=>zr,linearGradient:()=>Yn,link:()=>Ir,main:()=>Hr,map:()=>Kn,mark:()=>ir,marker:()=>sa,mask:()=>tr,menu:()=>Jr,menuitem:()=>Gr,metadata:()=>Zr,meter:()=>Sr,nav:()=>wn,object:()=>_i,ol:()=>_a,optgroup:()=>Yi,option:()=>la,output:()=>Mi,p:()=>ri,param:()=>$i,path:()=>pa,pattern:()=>ui,picture:()=>Hi,polygon:()=>xa,polyline:()=>mi,pre:()=>xi,progress:()=>ra,q:()=>Ki,radialGradient:()=>ki,rect:()=>Ti,rp:()=>$r,rt:()=>Ta,ruby:()=>La,s:()=>si,samp:()=>Na,script:()=>Dr,section:()=>Mn,select:()=>ka,small:()=>jr,source:()=>zn,span:()=>In,stop:()=>hr,strong:()=>zi,style:()=>En,sub:()=>Ii,summary:()=>lr,sup:()=>fr,svg:()=>vr,symbol:()=>Hn,table:()=>Zn,tbody:()=>or,td:()=>wr,text:()=>Va,textPath:()=>kn,textarea:()=>Rr,tfoot:()=>Jn,th:()=>Fr,thead:()=>Vr,time:()=>Gn,title:()=>rr,tr:()=>oa,track:()=>er,tspan:()=>qr,u:()=>Wr,ul:()=>Xr,use:()=>xr,video:()=>Cn,view:()=>vi,wbr:()=>va,webview:()=>Xi}),Yf=r();function Xf(e,t){if(e instanceof RegExp)return{keys:!1,pattern:e};var n,r,i,a,o=[],s=``,c=e.split(`/`);for(c[0]||c.shift();i=c.shift();)n=i[0],n===`*`?(o.push(n),s+=i[1]===`?`?`(?:/(.*))?`:`/(.*)`):n===`:`?(r=i.indexOf(`?`,1),a=i.indexOf(`.`,1),o.push(i.substring(1,~r?r:~a?a:i.length)),s+=~r&&!~a?`(?:/([^/]+?))?`:`/([^/]+?)`,~a&&(s+=(~r?`?`:``)+`\\`+i.substring(a))):s+=`/`+i;return{keys:o,pattern:RegExp(`^`+s+(t?`(?=$|/)`:`/?$`),`i`)}}var Zf=Rt(),Qf=Y.useInsertionEffect,$f=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0?Y.useLayoutEffect:Y.useEffect,ep=Qf||$f,tp=e=>{let t=Y.useRef([e,(...e)=>t[0](...e)]).current;return ep(()=>{t[0]=e}),t[1]},np=[`popstate`,`pushState`,`replaceState`,`hashchange`],rp=[],ip=()=>rp.forEach(e=>e()),ap=e=>(rp.push(e)===1&&np.forEach(e=>addEventListener(e,ip)),()=>{rp=rp.filter(t=>t!==e),rp.length||np.forEach(e=>removeEventListener(e,ip))}),op=(e,t)=>(0,Zf.useSyncExternalStore)(ap,e,t),sp=()=>location.search,cp=({ssrSearch:e}={})=>op(sp,e==null?sp:()=>e),lp=()=>location.pathname,up=({ssrPath:e}={})=>op(lp,e==null?lp:()=>e),dp=(e,{replace:t=!1,state:n=null}={})=>history[t?`replaceState`:`pushState`](n,``,e),fp=e=>[up(e),dp],pp=Symbol.for(`wouter_v3`);if(typeof history<`u`&&window[pp]===void 0){for(let e of[`pushState`,`replaceState`]){let t=history[e];history[e]=function(){let n=t.apply(this,arguments),r=new Event(e);return r.arguments=arguments,dispatchEvent(r),n}}Object.defineProperty(window,pp,{value:!0})}var mp=(e=``)=>e===`/`?``:e,hp=(e,t)=>e[0]===`~`?e.slice(1):mp(t)+e,gp=(e,t)=>(e=_p(mp(e)),t=_p(t),!e||(t.toLowerCase()+`/`).startsWith(e.toLowerCase()+`/`)?t.slice(e.length)||`/`:`~`+t),_p=e=>{try{return e.includes(`%`)?decodeURI(e):e}catch{return e}},vp={hook:fp,searchHook:cp,parser:Xf,base:``,ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:e=>e,aroundNav:(e,t,n)=>e(t,n)},yp=(0,Y.createContext)(vp),bp=()=>(0,Y.useContext)(yp);(0,Y.createContext)({});var xp=e=>{let[t,n]=e.hook(e);return[gp(e.base,t),tp((t,r)=>e.aroundNav(n,hp(t,e.base),r))]},Sp=()=>xp(bp());(0,Y.forwardRef)((e,t)=>{let n=bp(),[r,i]=xp(n),{to:a=``,href:o=a,onClick:s,asChild:c,children:l,className:u,replace:d,state:f,transition:p,...m}=e;return m.onClick=tp(t=>{t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||t.button!==0||(s?.(t),t.defaultPrevented||(t.preventDefault(),i(o,e)))}),m.href=n.hrefs(o[0]===`~`?o.slice(1):n.base+o,n),u!==void 0&&(m.className=u?.call?u(r===o):u),t&&(m.ref=t),c&&(0,Y.isValidElement)(l)?(0,Y.cloneElement)(l,m):(0,Y.createElement)(`a`,m,l)});function Cp(e=window){try{let t=e.parent,n=new URLSearchParams(e.location.search).get(`at`);if(t!==e&&t.location.origin===e.location.origin&&/^\/whiteboard\/[^/]+\/?$/.test(t.location.pathname)&&t.location.pathname===n)return t}catch{}return e}var wp=0,Tp=0,Ep=new Set;function Dp(){Tp||wp>0||Ep.size===0||(Tp=requestAnimationFrame(()=>{if(Tp=0,wp>0)return;let e=[...Ep];Ep.clear();for(let t of e)t()}))}function Op(){return wp+=1,()=>{--wp,Dp()}}function kp({label:e}){return(0,Y.useEffect)(Op,[]),(0,J.jsx)(c,{stack:!0,label:e,size:32})}var Ap={claude:`Claude Code`,codex:`Codex`,antigravity:`Antigravity`},jp=e=>e.kind!==`none`&&e.kind!==`login`,Mp=e=>e.kind===`quiet`||e.kind===`command`&&e.stuck===!0,Np={"needs-approval":0,running:1,thinking:2,"your-turn":3};function Pp(e,t){let n=e.filter(e=>t!==null&&e.artifacts.includes(t));if(n.length===0)return null;let r=n.sort((e,t)=>Np[e.state]-Np[t.state]);return{sessions:r,state:r[0].state,count:r.length}}var Fp={thinking:`agentStatus.thinking`,running:`agentStatus.running`,"your-turn":`agentStatus.yourTurn`,"needs-approval":`agentStatus.needsApproval`};async function Ip(e){let t=await fetch(`/api/agent/daemon`,{method:`POST`,credentials:`same-origin`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)}),n=await t.json().catch(()=>null);if(!t.ok||!n?.ok)throw Error(n?.error??`HTTP ${t.status}`);return n.data}function Lp(e){return{screen:async()=>{let t=await Ip({artifact:e,op:`agent-screen`});return Array.isArray(t?.lines)?t.lines.filter(e=>typeof e==`string`):[]},input:async t=>{await Ip({artifact:e,op:`agent-input`,...t})}}}var Rp=e=>new URLSearchParams(e).get(`agent`)===`1`,zp=new Set;function Bp(e){return zp.add(e),()=>{zp.delete(e)}}function Vp(e){for(let t of zp)t(e)}function Hp(e){return`${e.protocol===`https:`?`wss`:`ws`}://${e.host}/ws?at=${encodeURIComponent(e.pathname)}`}function Up(e,t){let[n,r]=(0,Y.useState)(!1),i=(0,Y.useRef)({onMessage:e,onOpen:t}),a=(0,Y.useRef)(null),o=(0,Y.useRef)([]);return i.current={onMessage:e,onOpen:t},(0,Y.useEffect)(()=>{let e=null,t,n=!1,s=()=>{e=new WebSocket(Hp(location)),a.current=e,e.onopen=()=>{r(!0),le();for(let t of o.current.splice(0))e?.send(t);i.current.onOpen?.()},e.onclose=()=>{r(!1),n||(t=setTimeout(s,1e3))},e.onmessage=e=>{let t=JSON.parse(String(e.data));i.current.onMessage(t),Ye(t),Vp(t)}};return s(),()=>{n=!0,clearTimeout(t),e?.close()}},[]),{live:n,send:(0,Y.useCallback)(e=>{let t=a.current,n=JSON.stringify(e);t?.readyState===WebSocket.OPEN?t.send(n):o.current.length<50&&o.current.push(n)},[])}}function Wp(){let[e,t]=(0,Y.useState)([]),[n,r]=(0,Y.useState)([]);return(0,Y.useEffect)(()=>{let e=null,n,i=!1,a=()=>{e=new WebSocket(Hp(location)),e.onmessage=e=>{let n=JSON.parse(String(e.data));n.type===`agent-status`&&(t(n.sessions),r(n.daemon??[]))},e.onclose=()=>{t([]),r([]),i||(n=setTimeout(a,1e3))}};return a(),()=>{i=!0,clearTimeout(n),e?.close()}},[]),{sessions:e,daemon:n}}var Gp=(0,Y.lazy)(()=>f(async()=>{let{AgentStatusPill:e}=await import(`./AgentStatusPill-DAWtJa6j.js`);return{AgentStatusPill:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]),import.meta.url).then(({AgentStatusPill:e})=>({default:e}))),Kp=(0,Y.lazy)(()=>f(async()=>{let{DaemonDock:e}=await import(`./DaemonDock-DxvtHALU.js`);return{DaemonDock:e}},__vite__mapDeps([26,1,27,12,4,28,8,9,2,3,5,6,7,10,11,13,14,15,16,17,18,19,20,21,22,23,24,25]),import.meta.url).then(({DaemonDock:e})=>({default:e}))),qp={claude:Ap.claude,codex:Ap.codex};function Jp({artifact:e}){let{t}=a(),{sessions:n,daemon:r}=Wp(),i=r.find(t=>t.artifact===e),o=(0,Y.useMemo)(()=>Lp(e),[e]);if(i){let r=Pp(n,e);return(0,J.jsx)(Y.Suspense,{fallback:null,children:(0,J.jsx)(Kp,{trusted:!0,agent:qp[i.harness]??i.harness,entry:i,idleLabel:t(Fp[r?.state??`running`]),transport:o})})}return n.length===0?null:(0,J.jsx)(Y.Suspense,{fallback:null,children:(0,J.jsx)(Gp,{artifact:e,sessions:n})})}var Yp=1e3,Xp=`ryugi:embed:hello`,Zp=`ryugi:embed:heartbeat`,Qp=`ryugi:embed:painted`,$p=`ryugi:embed:position`,em=`ryugi:embed:positioned`;function tm({parentOrigin:e,onPosition:t,win:n=window}){let r=(t,r)=>n.parent.postMessage({type:t,...r},e),i=i=>{if(i.origin!==e||i.source!==n.parent)return;let a=i.data;a?.type===$p&&a.anchor&&t&&t(a.anchor).then(()=>r(em))};n.addEventListener(`message`,i),r(Xp,t?{position:!0}:void 0);let a=setInterval(()=>r(Zp),Yp),o=!1;return{painted(){o||(o=!0,r(Qp))},close(){clearInterval(a),n.removeEventListener(`message`,i)}}}function nm(e=document,t=window,n){let r=e.documentElement.dataset.ryugiEmbedParent;return r?tm({parentOrigin:r,onPosition:n,win:t}):null}var rm=()=>new Promise(e=>requestAnimationFrame(()=>requestAnimationFrame(()=>e()))),im=e=>(De(e),rm()),am=(0,Y.createContext)(()=>{});function om(){let e=(0,Y.useRef)(null),t=(0,Y.useRef)(!1);return(0,Y.useEffect)(()=>{let n=nm(document,window,im);return e.current=n,t.current&&n?.painted(),()=>{n?.close(),e.current=null}},[]),(0,Y.useCallback)(()=>{t.current=!0,e.current?.painted()},[])}function sm(e){let t=(0,Y.useContext)(am);(0,Y.useEffect)(()=>{if(!e)return;let n=0,r=requestAnimationFrame(()=>{n=requestAnimationFrame(()=>{t(),Pe()&&Fe({kind:`painted`})})});return()=>{cancelAnimationFrame(r),cancelAnimationFrame(n)}},[e,t])}var cm=(0,Y.createContext)(null);function lm({pageWindow:e,children:t}){return(0,J.jsx)(cm.Provider,{value:e??null,children:t})}var um=()=>(0,Y.useContext)(cm)??window,dm=(0,Y.lazy)(()=>f(async()=>{let{AutoPublishBar:e}=await import(`./auto-publish-BGoEgSGM.js`);return{AutoPublishBar:e}},__vite__mapDeps([29,1,30,12,4,31,32,2,3,5,6,7]),import.meta.url).then(({AutoPublishBar:e})=>({default:e}))),fm=(0,Y.lazy)(()=>f(async()=>{let{SettingsDialog:e}=await import(`./settings-Bro-1ju5.js`);return{SettingsDialog:e}},__vite__mapDeps([33,1,34,5,4,3,10,2,6,7,11,12,13,14,18,35,36,37,38,27,39,40,31,32,41,19]),import.meta.url).then(({SettingsDialog:e})=>({default:e}))),pm=(0,Y.lazy)(()=>f(async()=>{let{ArtboardLayout:e}=await import(`./ArtboardLayout-C3GCvPqI.js`);return{ArtboardLayout:e}},__vite__mapDeps([42,1,10,2,3,4,5,6,7,11,12,13,14,43,44,45,46,47,22,17,18,48,36,49,50,51,52,15,53,35,54,55,56,16,57,58,59,60,38,19,61,62,63,64,9,65,66,67,27,68,30,69,70,28,71,31,32,41,39,72,73,74,75,37,24,76,77,78,79,80,81,82,83,84,20,21,85,86,87]),import.meta.url).then(({ArtboardLayout:e})=>({default:e}))),mm=(0,Y.lazy)(()=>f(async()=>{let{ArtifactList:e}=await import(`./ArtifactList-DwIi9u0A.js`);return{ArtifactList:e}},__vite__mapDeps([88,1,10,2,3,4,5,6,7,11,12,13,14,57,16,37,38,35,54,53,55,52,15,18,89,62,90,32,91,73,65,92,19,34,59,60,69,31,41,27,66,77,82]),import.meta.url).then(({ArtifactList:e})=>({default:e}))),hm=(0,Y.lazy)(()=>f(async()=>{let{DocumentLayout:e}=await import(`./DocumentLayout-BdqPj5rB.js`);return{DocumentLayout:e}},__vite__mapDeps([93,1,4,5,2,3,6,7]),import.meta.url).then(({DocumentLayout:e})=>({default:e}))),gm=(0,Y.lazy)(()=>f(async()=>{let{StoryboardLayout:e}=await import(`./StoryboardLayout-B64w5_fa.js`);return{StoryboardLayout:e}},__vite__mapDeps([94,1,4,67,2,3,5,6,7,10,11,12,13,14,52,15,53,18,35,27,68,54,55,30,69,70,28,50,71,31,32,41,39,19,86,95,47,96,92,76,77,97,83,75,98,9,16,17,99,64,62,100,101,84,45,36,49,90,63,102,74,103]),import.meta.url).then(({StoryboardLayout:e})=>({default:e}))),_m=(0,Y.lazy)(()=>f(async()=>{let{StoryboardRenderLayout:e}=await import(`./StoryboardRender-D--GwVc5.js`);return{StoryboardRenderLayout:e}},__vite__mapDeps([104,1,95,2,3,4,5,6,7,47,96,86,32]),import.meta.url).then(({StoryboardRenderLayout:e})=>({default:e}))),vm=(0,Y.lazy)(()=>f(async()=>{let{PreviewArtifactLayout:e}=await import(`./PreviewArtifactLayout-5vJjhU_q.js`);return{PreviewArtifactLayout:e}},__vite__mapDeps([105,1,4,10,2,3,5,6,7,11,12,13,14,32,62,52,15,53,18,35,59,60,38,57,16,37,106,74,61,107,78,91,108,101,84,24,19,64,9,17,92,22]),import.meta.url).then(({PreviewArtifactLayout:e})=>({default:e}))),ym=(0,Y.lazy)(()=>f(async()=>{let{ReportLayout:e}=await import(`./ReportLayout-DsbF0IvL.js`);return{ReportLayout:e}},__vite__mapDeps([109,1,67,2,3,4,5,6,7,10,11,12,13,14,52,15,53,18,35,27,68,54,55,30,69,70,28,50,71,31,32,41,39,19,86,110,99,92,96,76,77,108,101,84,62,24,9,16,17,47,64]),import.meta.url).then(({ReportLayout:e})=>({default:e}))),bm=(0,Y.lazy)(()=>f(async()=>{let{HtmlLayout:e}=await import(`./HtmlLayout-D__lgqX6.js`);return{HtmlLayout:e}},__vite__mapDeps([111,1,4,92,52,2,3,5,6,7,10,11,12,13,14,15,53,18,35,19,96,76,77,67,27,68,54,55,30,69,70,28,50,71,31,32,41,39,86]),import.meta.url).then(({HtmlLayout:e})=>({default:e}))),xm=(0,Y.lazy)(()=>f(async()=>{let{SlidesLayout:e}=await import(`./SlidesLayout-B1JTgUF3.js`);return{SlidesLayout:e}},__vite__mapDeps([112,1,67,2,3,4,5,6,7,10,11,12,13,14,52,15,53,18,35,27,68,54,55,30,69,70,28,50,71,31,32,41,39,19,86,113,114,115,96,76,77,47,92,24,64,62,9,16,17,51,56,57,116,99,63,117,65,59,60,38,37,102,90,36,78,21,84,80,106,74,75,118,45,119,20,79,98,101,120]),import.meta.url).then(({SlidesLayout:e})=>({default:e}))),Sm=(0,Y.lazy)(()=>f(async()=>{let{VerifyLayout:e}=await import(`./VerifyLayout-6HdIyeTC.js`);return{VerifyLayout:e}},__vite__mapDeps([121,1,67,2,3,4,5,6,7,10,11,12,13,14,52,15,53,18,35,27,68,54,55,30,69,70,28,50,71,31,32,41,39,19,122,123,124,65,63,125,116,72,73,103,36,74,56,90,102,60,38,126,127,117,80,128,99,118,64,62,9,16,17,89,45,100,98,44,22,24,20,21,96,23,40,114,129,81,82,47,130,131]),import.meta.url).then(({VerifyLayout:e})=>({default:e}))),Cm=(0,Y.lazy)(()=>f(async()=>{let{WhiteboardLayout:e}=await import(`./WhiteboardLayout-Dnahdu0L.js`);return{WhiteboardLayout:e}},__vite__mapDeps([132,1,133,124,2,3,4,5,6,7,10,11,12,13,14,52,15,53,18,35,65,68,63,125,55,116,72,73,103,36,28,74,56,90,102,60,38,126,115,24,71,32,48,17,22,9,16,19,79,64,62,40,58,59,99,134,135]),import.meta.url).then(({WhiteboardLayout:e})=>({default:e}))),wm=(0,Y.lazy)(()=>Promise.all([f(()=>import(`./split-lgGPI5_J.js`),__vite__mapDeps([136,1,114,10,2,3,4,5,6,7,11,12,13,14,77,127,84,97,125,128,80,118,21,119,53,59,60,38,19,137,110,138,24,130,134,139]),import.meta.url),f(()=>import(`./local-split-host-gT7PINON.js`).then(e=>e.n),__vite__mapDeps([113,1,114,10,2,3,4,5,6,7,11,12,13,14,32]),import.meta.url)]).then(([{SplitShell:e},{localSplitHost:t}])=>({default:n=>(0,J.jsx)(e,{...n,host:t})}))),Tm=(0,Y.lazy)(()=>f(async()=>{let{PreviewLayout:e}=await import(`./PreviewLayout-CLb0kSHa.js`).then(e=>e.n);return{PreviewLayout:e}},__vite__mapDeps([140,1,4,32,2,3,5,6,7,43]),import.meta.url).then(({PreviewLayout:e})=>({default:e}))),Em=(e,t)=>(0,J.jsxs)(J.Fragment,{children:[e,(0,J.jsx)(dm,{}),(0,J.jsx)(fm,{}),t&&(0,J.jsx)(Jp,{artifact:t})]});function Dm({id:e,type:t}){let n=om();return(0,J.jsxs)(am,{value:n,children:[Rp(location.search)&&(0,J.jsx)(Jp,{artifact:`${t}/${e}`}),t===`whiteboard`?(0,J.jsx)(lm,{pageWindow:Cp(),children:(0,J.jsx)(Cm,{id:e})}):t===`document`?(0,J.jsx)(hm,{id:e}):t===`verify`?(0,J.jsx)(Sm,{id:e}):t===`slides`?(0,J.jsx)(xm,{id:e}):(0,J.jsx)(pm,{id:e})]})}function Om(){let[e]=Sp(),t=s(e);if((0,Y.useEffect)(()=>{if(!document.documentElement.dataset.ryugiArtifactId)return;let e=document.querySelector(`link[rel="canonical"]`);if(!e)return;let t=new URL(location.href);t.pathname=u(t.pathname,new URL(e.href).pathname),t.href!==location.href&&history.replaceState(history.state,``,t)},[]),(0,Y.useEffect)(()=>{window.scrollTo(0,0)},[e]),t.kind===`list`)return Em((0,J.jsx)(mm,{}));if(t.kind===`unknown`)return(0,J.jsx)(`div`,{className:`x78zum5 x6s0dn4 xl56j7k x5yr21d xggk2y7 x1bo0w0s xqfszdh xif65rj`,children:`No artifact lives at this address.`});let n=document.documentElement.dataset.ryugiArtifactId??t.id;return t.kind===`preview`?(0,J.jsx)(Tm,{id:n,type:t.type}):t.kind===`dev-preview`?Em((0,J.jsx)(vm,{id:n}),`preview/${n}`):t.kind===`embed`?(0,J.jsx)(Dm,{id:n,type:t.type}):t.kind===`render`?(0,J.jsx)(_m,{id:n}):t.type===`html`?Em((0,J.jsx)(bm,{id:n}),`html/${n}`):t.type===`slides`?Em((0,J.jsx)(xm,{id:n}),`slides/${n}`):t.type===`report`?Em((0,J.jsx)(ym,{id:n}),`report/${n}`):t.type===`storyboard`?Em((0,J.jsx)(gm,{id:n}),`storyboard/${n}`):Em((0,J.jsx)(wm,{id:n,split:Ve(t,location.search)?.split??null,type:t.type}),`${t.type}/${n}`)}function km(){return(0,J.jsx)(Y.Suspense,{fallback:(0,J.jsx)(`div`,{className:`x78zum5 x6s0dn4 xl56j7k x5yr21d xggk2y7 x1bo0w0s xqfszdh xif65rj`,children:(0,J.jsx)(kp,{label:o(`common.loading`)})}),children:(0,J.jsx)(Om,{})})}fe(),document.documentElement.lang=d[l.language];function Am(){return i(),(0,J.jsx)(Cl,{features:eu,children:(0,J.jsxs)(h,{enableCustomFonts:!1,motion:Jf,children:[(0,J.jsx)(km,{}),(0,J.jsx)(b,{}),(0,J.jsx)(Gf,{}),(0,J.jsx)(pd,{})]})})}(0,Yf.createRoot)(document.getElementById(`root`)).render((0,J.jsx)(Y.StrictMode,{children:(0,J.jsx)(Am,{})}));export{Bu as _,Fp as a,jp as c,md as d,X as f,qu as g,td as h,Up as i,kp as l,Ju as m,sm as n,Pp as o,Yu as p,Bp as r,Mp as s,um as t,Uf as u,iu as v};
|