@epic-web/workshop-app 5.22.2 → 5.22.4
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/build/client/assets/{_-BDcQ_M2J.js → _-CHaVBRQw.js} +2 -2
- package/build/client/assets/{_-BDcQ_M2J.js.map → _-CHaVBRQw.js.map} +1 -1
- package/build/client/assets/{_exerciseNumber-CG2AFTtQ.js → _exerciseNumber-3uq8PYSd.js} +2 -2
- package/build/client/assets/{_exerciseNumber-CG2AFTtQ.js.map → _exerciseNumber-3uq8PYSd.js.map} +1 -1
- package/build/client/assets/{_exerciseNumber_._stepNumber-COWC332q.js → _exerciseNumber_._stepNumber-D5VDI7vZ.js} +2 -2
- package/build/client/assets/{_exerciseNumber_._stepNumber-COWC332q.js.map → _exerciseNumber_._stepNumber-D5VDI7vZ.js.map} +1 -1
- package/build/client/assets/{_exerciseNumber_.finished-BgGBYU74.js → _exerciseNumber_.finished-3Iv9ikNq.js} +2 -2
- package/build/client/assets/{_exerciseNumber_.finished-BgGBYU74.js.map → _exerciseNumber_.finished-3Iv9ikNq.js.map} +1 -1
- package/build/client/assets/_layout-Brb3LPqZ.js +5 -0
- package/build/client/assets/_layout-Brb3LPqZ.js.map +1 -0
- package/build/client/assets/_layout-CkabS-6c.js +9 -0
- package/build/client/assets/_layout-CkabS-6c.js.map +1 -0
- package/build/client/assets/accordion-BjQ-5Z44.js +2 -0
- package/build/client/assets/accordion-BjQ-5Z44.js.map +1 -0
- package/build/client/assets/{account-BwQvf4AS.js → account-CN4B8rm4.js} +2 -2
- package/build/client/assets/{account-BwQvf4AS.js.map → account-CN4B8rm4.js.map} +1 -1
- package/build/client/assets/app-lUkT_xku.js +2 -0
- package/build/client/assets/{app-XHqxOZfy.js.map → app-lUkT_xku.js.map} +1 -1
- package/build/client/assets/{button-DVPKzWkn.js → button-ChOzbirS.js} +2 -2
- package/build/client/assets/{button-DVPKzWkn.js.map → button-ChOzbirS.js.map} +1 -1
- package/build/client/assets/{diff-C7Zh3uuA.js → diff-CTHVtVGQ.js} +2 -2
- package/build/client/assets/{diff-C7Zh3uuA.js.map → diff-CTHVtVGQ.js.map} +1 -1
- package/build/client/assets/diff-CVrsnWqw.js +2 -0
- package/build/client/assets/{diff-DVOUmaq6.js.map → diff-CVrsnWqw.js.map} +1 -1
- package/build/client/assets/discord-Cl4hiMqz.js +2 -0
- package/build/client/assets/discord-Cl4hiMqz.js.map +1 -0
- package/build/client/assets/{discord-CoBo5eVK.js → discord-gROK6Zn6.js} +2 -2
- package/build/client/assets/{discord-CoBo5eVK.js.map → discord-gROK6Zn6.js.map} +1 -1
- package/build/client/assets/{epic-video-DRZssA4U.js → epic-video-BQtjG_Y0.js} +2 -2
- package/build/client/assets/{epic-video-DRZssA4U.js.map → epic-video-BQtjG_Y0.js.map} +1 -1
- package/build/client/assets/{error-boundary-De7jJlR5.js → error-boundary-CAu3AmhN.js} +2 -2
- package/build/client/assets/{error-boundary-De7jJlR5.js.map → error-boundary-CAu3AmhN.js.map} +1 -1
- package/build/client/assets/{finished-6JNE1a1E.js → finished-9PhQncNF.js} +2 -2
- package/build/client/assets/{finished-6JNE1a1E.js.map → finished-9PhQncNF.js.map} +1 -1
- package/build/client/assets/index-BncqUVfr.js +39 -0
- package/build/client/assets/index-BncqUVfr.js.map +1 -0
- package/build/client/assets/{index-BZWIdOoA.js → index-CMYl882D.js} +2 -2
- package/build/client/assets/{index-BZWIdOoA.js.map → index-CMYl882D.js.map} +1 -1
- package/build/client/assets/index-CSGHuBiw.js +5 -0
- package/build/client/assets/index-CSGHuBiw.js.map +1 -0
- package/build/client/assets/{index-Cnxrq9Ny.js → index-CYZfnGWa.js} +2 -2
- package/build/client/assets/{index-Cnxrq9Ny.js.map → index-CYZfnGWa.js.map} +1 -1
- package/build/client/assets/index-mZJ8sz9i.js +2 -0
- package/build/client/assets/{index-M647UyZv.js.map → index-mZJ8sz9i.js.map} +1 -1
- package/build/client/assets/{index-CyFsiCNp.js → index-qo6WmPUa.js} +2 -2
- package/build/client/assets/{index-CyFsiCNp.js.map → index-qo6WmPUa.js.map} +1 -1
- package/build/client/assets/{loading-ClL22bF9.js → loading-CPEkK5hO.js} +2 -2
- package/build/client/assets/{loading-ClL22bF9.js.map → loading-CPEkK5hO.js.map} +1 -1
- package/build/client/assets/{login-C3I5NCrj.js → login-C9JmYc0v.js} +2 -2
- package/build/client/assets/{login-C3I5NCrj.js.map → login-C9JmYc0v.js.map} +1 -1
- package/build/client/assets/{manifest-6206f67a.js → manifest-4acdd3e2.js} +1 -1
- package/build/client/assets/{mdx-Z4bEoKXn.js → mdx-CnaWQCDw.js} +2 -2
- package/build/client/assets/{mdx-Z4bEoKXn.js.map → mdx-CnaWQCDw.js.map} +1 -1
- package/build/client/assets/{misc-BK2EiKtY.js → misc-CQmANiHr.js} +2 -2
- package/build/client/assets/{misc-BK2EiKtY.js.map → misc-CQmANiHr.js.map} +1 -1
- package/build/client/assets/{nav-chevrons-DVD_0i2a.js → nav-chevrons-DCuva9-Q.js} +2 -2
- package/build/client/assets/{nav-chevrons-DVD_0i2a.js.map → nav-chevrons-DCuva9-Q.js.map} +1 -1
- package/build/client/assets/{onboarding-DjyKxkKx.js → onboarding-DzfDHJg_.js} +2 -2
- package/build/client/assets/{onboarding-DjyKxkKx.js.map → onboarding-DzfDHJg_.js.map} +1 -1
- package/build/client/assets/{online-CHlOuJG-.js → online-BsTX44az.js} +2 -2
- package/build/client/assets/{online-CHlOuJG-.js.map → online-BsTX44az.js.map} +1 -1
- package/build/client/assets/{preferences-BmwlU5EC.js → preferences-BYBJKp8k.js} +2 -2
- package/build/client/assets/{preferences-BmwlU5EC.js.map → preferences-BYBJKp8k.js.map} +1 -1
- package/build/client/assets/{presence-CPOTHCHm.js → presence-D5UF-NOM.js} +2 -2
- package/build/client/assets/{presence-CPOTHCHm.js.map → presence-D5UF-NOM.js.map} +1 -1
- package/build/client/assets/{preview-B2BxDDhi.js → preview-DaTpH6lj.js} +2 -2
- package/build/client/assets/{preview-B2BxDDhi.js.map → preview-DaTpH6lj.js.map} +1 -1
- package/build/client/assets/{product-BkDgAOLQ.js → product-BKhLQKd7.js} +2 -2
- package/build/client/assets/{product-BkDgAOLQ.js.map → product-BKhLQKd7.js.map} +1 -1
- package/build/client/assets/{progress-CnHFlUmF.js → progress-DwE8EkAa.js} +2 -2
- package/build/client/assets/{progress-CnHFlUmF.js.map → progress-DwE8EkAa.js.map} +1 -1
- package/build/client/assets/{progress-bar-Q9l2dtTg.js → progress-bar-ZCHf2Y4W.js} +2 -2
- package/build/client/assets/{progress-bar-Q9l2dtTg.js.map → progress-bar-ZCHf2Y4W.js.map} +1 -1
- package/build/client/assets/{revalidation-ws-CLolY6Iu.js → revalidation-ws-BoJZTvOQ.js} +2 -2
- package/build/client/assets/{revalidation-ws-CLolY6Iu.js.map → revalidation-ws-BoJZTvOQ.js.map} +1 -1
- package/build/client/assets/{root-B7xuuOHl.js → root-4MvCzrFd.js} +3 -3
- package/build/client/assets/root-4MvCzrFd.js.map +1 -0
- package/build/client/assets/{set-playground-ZcPraYj5.js → set-playground-IUJCGVu2.js} +2 -2
- package/build/client/assets/{set-playground-ZcPraYj5.js.map → set-playground-IUJCGVu2.js.map} +1 -1
- package/build/client/assets/test-B8jDo0X4.js +2 -0
- package/build/client/assets/{test-Bt9AuCey.js.map → test-B8jDo0X4.js.map} +1 -1
- package/build/client/assets/{tests-CmjMQrMj.js → tests-y-atkhWB.js} +2 -2
- package/build/client/assets/{tests-CmjMQrMj.js.map → tests-y-atkhWB.js.map} +1 -1
- package/build/client/assets/tooltip-Cd0yJoQb.js +2 -0
- package/build/client/assets/tooltip-Cd0yJoQb.js.map +1 -0
- package/build/server/index.js +6 -4
- package/build/server/index.js.map +1 -1
- package/package.json +3 -3
- package/build/client/assets/_layout-DKC1JUTc.js +0 -2
- package/build/client/assets/_layout-DKC1JUTc.js.map +0 -1
- package/build/client/assets/_layout-DuDUPWax.js +0 -6
- package/build/client/assets/_layout-DuDUPWax.js.map +0 -1
- package/build/client/assets/accordion-BPyhq471.js +0 -2
- package/build/client/assets/accordion-BPyhq471.js.map +0 -1
- package/build/client/assets/app-XHqxOZfy.js +0 -2
- package/build/client/assets/diff-DVOUmaq6.js +0 -2
- package/build/client/assets/discord-CFZUT74L.js +0 -2
- package/build/client/assets/discord-CFZUT74L.js.map +0 -1
- package/build/client/assets/index-6Hu4Lmzn.js +0 -2
- package/build/client/assets/index-6Hu4Lmzn.js.map +0 -1
- package/build/client/assets/index-BE3KRz8n.js +0 -42
- package/build/client/assets/index-BE3KRz8n.js.map +0 -1
- package/build/client/assets/index-M647UyZv.js +0 -2
- package/build/client/assets/root-B7xuuOHl.js.map +0 -1
- package/build/client/assets/test-Bt9AuCey.js +0 -2
- package/build/client/assets/tooltip-leWCE50J.js +0 -2
- package/build/client/assets/tooltip-leWCE50J.js.map +0 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{r as i,j as r,B as Fe,O as Tt,b as Me}from"./index-CGzylDPY.js";import{a as S,I as k,c as P,f as M,h as A}from"./misc-CQmANiHr.js";import{a as Lt}from"./pe-DXT2FOp1.js";import{L as oe}from"./product-BKhLQKd7.js";import{u as _t}from"./revalidation-ws-BoJZTvOQ.js";import{r as At,R as It,u as pe,L as j,N as L}from"./components-DrvY4pal.js";import{c as Ot,_ as Ft,u as Mt,a as V,f as Wt,z as Ut,s as $t,b as Bt,R as Vt,e as Ht,h as Yt}from"./index-BncqUVfr.js";import{S as H,T as zt,a as ye,b as we,c as Ne}from"./tooltip-Cd0yJoQb.js";import{c as J,b as Kt}from"./user-C0j04V55.js";import{u as We}from"./workshop-config-oL_FWDKq.js";import{u as Ue}from"./online-BsTX44az.js";import{u as ve}from"./presence-D5UF-NOM.js";import{b as Gt,s as $e,c as Xt,d as Zt,e as Be,m as D,u as Qt,f as qt}from"./progress-DwE8EkAa.js";import{T as Ve}from"./index-CMYl882D.js";function Jt(e){e.values.forEach(t=>t.stop())}function de(e,t){[...t].reverse().forEach(o=>{const a=e.getVariant(o);a&&$e(e,a),e.variantChildren&&e.variantChildren.forEach(s=>{de(s,t)})})}function en(e,t){if(Array.isArray(t))return de(e,t);if(typeof t=="string")return de(e,[t]);$e(e,t)}function tn(){const e=new Set,t={subscribe(n){return e.add(n),()=>void e.delete(n)},start(n,o){const a=[];return e.forEach(s=>{a.push(Gt(s,n,{transitionOverride:o}))}),Promise.all(a)},set(n){return e.forEach(o=>{en(o,n)})},stop(){e.forEach(n=>{Jt(n)})},mount(){return()=>{t.stop()}}};return t}function fe(){const e=Xt(tn);return Zt(e.mount,[]),e}function nn(e,t){function n(){return window.matchMedia(e).matches}function o(a){const s=window.matchMedia(e);return s.addEventListener("change",a),()=>{s.removeEventListener("change",a)}}return function(){return i.useSyncExternalStore(o,n,()=>t)}}function F(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function Ee(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function He(...e){return t=>{let n=!1;const o=e.map(a=>{const s=Ee(a,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let a=0;a<o.length;a++){const s=o[a];typeof s=="function"?s():Ee(e[a],null)}}}}function U(...e){return i.useCallback(He(...e),e)}function rn(e,t){const n=i.createContext(t),o=s=>{const{children:u,...l}=s,d=i.useMemo(()=>l,Object.values(l));return r.jsx(n.Provider,{value:d,children:u})};o.displayName=e+"Provider";function a(s){const u=i.useContext(n);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,a]}function on(e,t=[]){let n=[];function o(s,u){const l=i.createContext(u),d=n.length;n=[...n,u];const c=x=>{var b;const{scope:p,children:m,...y}=x,f=((b=p==null?void 0:p[e])==null?void 0:b[d])||l,v=i.useMemo(()=>y,Object.values(y));return r.jsx(f.Provider,{value:v,children:m})};c.displayName=s+"Provider";function h(x,p){var f;const m=((f=p==null?void 0:p[e])==null?void 0:f[d])||l,y=i.useContext(m);if(y)return y;if(u!==void 0)return u;throw new Error(`\`${x}\` must be used within \`${s}\``)}return[c,h]}const a=()=>{const s=n.map(u=>i.createContext(u));return function(l){const d=(l==null?void 0:l[e])||s;return i.useMemo(()=>({[`__scope${e}`]:{...l,[e]:d}}),[l,d])}};return a.scopeName=e,[o,an(a,...t)]}function an(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(s){const u=o.reduce((l,{useScope:d,scopeName:c})=>{const x=d(s)[`__scope${c}`];return{...l,...x}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return n.scopeName=t.scopeName,n}var K=globalThis!=null&&globalThis.document?i.useLayoutEffect:()=>{},sn=Fe[" useId ".trim().toString()]||(()=>{}),ln=0;function ae(e){const[t,n]=i.useState(sn());return K(()=>{e||n(o=>o??String(ln++))},[e]),e||(t?`radix-${t}`:"")}var cn=Fe[" useInsertionEffect ".trim().toString()]||K;function un({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[a,s,u]=dn({defaultProp:t,onChange:n}),l=e!==void 0,d=l?e:a;{const h=i.useRef(e!==void 0);i.useEffect(()=>{const x=h.current;x!==l&&console.warn(`${o} is changing from ${x?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=l},[l,o])}const c=i.useCallback(h=>{var x;if(l){const p=fn(h)?h(e):h;p!==e&&((x=u.current)==null||x.call(u,p))}else s(h)},[l,e,s,u]);return[d,c]}function dn({defaultProp:e,onChange:t}){const[n,o]=i.useState(e),a=i.useRef(n),s=i.useRef(t);return cn(()=>{s.current=t},[t]),i.useEffect(()=>{var u;a.current!==n&&((u=s.current)==null||u.call(s,n),a.current=n)},[n,a]),[n,o,s]}function fn(e){return typeof e=="function"}function Ye(e){const t=mn(e),n=i.forwardRef((o,a)=>{const{children:s,...u}=o,l=i.Children.toArray(s),d=l.find(pn);if(d){const c=d.props.children,h=l.map(x=>x===d?i.Children.count(c)>1?i.Children.only(null):i.isValidElement(c)?c.props.children:null:x);return r.jsx(t,{...u,ref:a,children:i.isValidElement(c)?i.cloneElement(c,void 0,h):null})}return r.jsx(t,{...u,ref:a,children:s})});return n.displayName=`${e}.Slot`,n}function mn(e){const t=i.forwardRef((n,o)=>{const{children:a,...s}=n;if(i.isValidElement(a)){const u=xn(a),l=vn(s,a.props);return a.type!==i.Fragment&&(l.ref=o?He(o,u):u),i.cloneElement(a,l)}return i.Children.count(a)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var hn=Symbol("radix.slottable");function pn(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hn}function vn(e,t){const n={...t};for(const o in t){const a=e[o],s=t[o];/^on[A-Z]/.test(o)?a&&s?n[o]=(...l)=>{const d=s(...l);return a(...l),d}:a&&(n[o]=a):o==="style"?n[o]={...a,...s}:o==="className"&&(n[o]=[a,s].filter(Boolean).join(" "))}return{...e,...n}}function xn(e){var o,a;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var gn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],I=gn.reduce((e,t)=>{const n=Ye(`Primitive.${t}`),o=i.forwardRef((a,s)=>{const{asChild:u,...l}=a,d=u?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),r.jsx(d,{...l,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function bn(e,t){e&&At.flushSync(()=>e.dispatchEvent(t))}function G(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function yn(e,t=globalThis==null?void 0:globalThis.document){const n=G(e);i.useEffect(()=>{const o=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var wn="DismissableLayer",me="dismissableLayer.update",Nn="dismissableLayer.pointerDownOutside",En="dismissableLayer.focusOutside",je,ze=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ke=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:u,onDismiss:l,...d}=e,c=i.useContext(ze),[h,x]=i.useState(null),p=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=i.useState({}),y=U(t,w=>x(w)),f=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=f.indexOf(v),g=h?f.indexOf(h):-1,E=c.layersWithOutsidePointerEventsDisabled.size>0,N=g>=b,C=Sn(w=>{const _=w.target,z=[...c.branches].some(re=>re.contains(_));!N||z||(a==null||a(w),u==null||u(w),w.defaultPrevented||l==null||l())},p),R=Pn(w=>{const _=w.target;[...c.branches].some(re=>re.contains(_))||(s==null||s(w),u==null||u(w),w.defaultPrevented||l==null||l())},p);return yn(w=>{g===c.layers.size-1&&(o==null||o(w),!w.defaultPrevented&&l&&(w.preventDefault(),l()))},p),i.useEffect(()=>{if(h)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(je=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(h)),c.layers.add(h),Ce(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=je)}},[h,p,n,c]),i.useEffect(()=>()=>{h&&(c.layers.delete(h),c.layersWithOutsidePointerEventsDisabled.delete(h),Ce())},[h,c]),i.useEffect(()=>{const w=()=>m({});return document.addEventListener(me,w),()=>document.removeEventListener(me,w)},[]),r.jsx(I.div,{...d,ref:y,style:{pointerEvents:E?N?"auto":"none":void 0,...e.style},onFocusCapture:F(e.onFocusCapture,R.onFocusCapture),onBlurCapture:F(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:F(e.onPointerDownCapture,C.onPointerDownCapture)})});Ke.displayName=wn;var jn="DismissableLayerBranch",Cn=i.forwardRef((e,t)=>{const n=i.useContext(ze),o=i.useRef(null),a=U(t,o);return i.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),r.jsx(I.div,{...e,ref:a})});Cn.displayName=jn;function Sn(e,t=globalThis==null?void 0:globalThis.document){const n=G(e),o=i.useRef(!1),a=i.useRef(()=>{});return i.useEffect(()=>{const s=l=>{if(l.target&&!o.current){let d=function(){Ge(Nn,n,c,{discrete:!0})};const c={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=d,t.addEventListener("click",a.current,{once:!0})):d()}else t.removeEventListener("click",a.current);o.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",s),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Pn(e,t=globalThis==null?void 0:globalThis.document){const n=G(e),o=i.useRef(!1);return i.useEffect(()=>{const a=s=>{s.target&&!o.current&&Ge(En,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Ce(){const e=new CustomEvent(me);document.dispatchEvent(e)}function Ge(e,t,n,{discrete:o}){const a=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),o?bn(a,s):a.dispatchEvent(s)}var se="focusScope.autoFocusOnMount",ie="focusScope.autoFocusOnUnmount",Se={bubbles:!1,cancelable:!0},Dn="FocusScope",Xe=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...u}=e,[l,d]=i.useState(null),c=G(a),h=G(s),x=i.useRef(null),p=U(t,f=>d(f)),m=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(o){let f=function(E){if(m.paused||!l)return;const N=E.target;l.contains(N)?x.current=N:O(x.current,{select:!0})},v=function(E){if(m.paused||!l)return;const N=E.relatedTarget;N!==null&&(l.contains(N)||O(x.current,{select:!0}))},b=function(E){if(document.activeElement===document.body)for(const C of E)C.removedNodes.length>0&&O(l)};document.addEventListener("focusin",f),document.addEventListener("focusout",v);const g=new MutationObserver(b);return l&&g.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",v),g.disconnect()}}},[o,l,m.paused]),i.useEffect(()=>{if(l){De.add(m);const f=document.activeElement;if(!l.contains(f)){const b=new CustomEvent(se,Se);l.addEventListener(se,c),l.dispatchEvent(b),b.defaultPrevented||(Rn(An(Ze(l)),{select:!0}),document.activeElement===f&&O(l))}return()=>{l.removeEventListener(se,c),setTimeout(()=>{const b=new CustomEvent(ie,Se);l.addEventListener(ie,h),l.dispatchEvent(b),b.defaultPrevented||O(f??document.body,{select:!0}),l.removeEventListener(ie,h),De.remove(m)},0)}}},[l,c,h,m]);const y=i.useCallback(f=>{if(!n&&!o||m.paused)return;const v=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,b=document.activeElement;if(v&&b){const g=f.currentTarget,[E,N]=kn(g);E&&N?!f.shiftKey&&b===N?(f.preventDefault(),n&&O(E,{select:!0})):f.shiftKey&&b===E&&(f.preventDefault(),n&&O(N,{select:!0})):b===g&&f.preventDefault()}},[n,o,m.paused]);return r.jsx(I.div,{tabIndex:-1,...u,ref:p,onKeyDown:y})});Xe.displayName=Dn;function Rn(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(O(o,{select:t}),document.activeElement!==n)return}function kn(e){const t=Ze(e),n=Pe(t,e),o=Pe(t.reverse(),e);return[n,o]}function Ze(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const a=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||a?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Pe(e,t){for(const n of e)if(!Tn(n,{upTo:t}))return n}function Tn(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Ln(e){return e instanceof HTMLInputElement&&"select"in e}function O(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ln(e)&&t&&e.select()}}var De=_n();function _n(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Re(e,t),e.unshift(t)},remove(t){var n;e=Re(e,t),(n=e[0])==null||n.resume()}}}function Re(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function An(e){return e.filter(t=>t.tagName!=="A")}var In="Portal",Qe=i.forwardRef((e,t)=>{var l;const{container:n,...o}=e,[a,s]=i.useState(!1);K(()=>s(!0),[]);const u=n||a&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return u?It.createPortal(r.jsx(I.div,{...o,ref:t}),u):null});Qe.displayName=In;function On(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var ee=e=>{const{present:t,children:n}=e,o=Fn(t),a=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),s=U(o.ref,Mn(a));return typeof n=="function"||o.isPresent?i.cloneElement(a,{ref:s}):null};ee.displayName="Presence";function Fn(e){const[t,n]=i.useState(),o=i.useRef(null),a=i.useRef(e),s=i.useRef("none"),u=e?"mounted":"unmounted",[l,d]=On(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const c=X(o.current);s.current=l==="mounted"?c:"none"},[l]),K(()=>{const c=o.current,h=a.current;if(h!==e){const p=s.current,m=X(c);e?d("MOUNT"):m==="none"||(c==null?void 0:c.display)==="none"?d("UNMOUNT"):d(h&&p!==m?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,d]),K(()=>{if(t){let c;const h=t.ownerDocument.defaultView??window,x=m=>{const f=X(o.current).includes(m.animationName);if(m.target===t&&f&&(d("ANIMATION_END"),!a.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",c=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=m=>{m.target===t&&(s.current=X(o.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",x),t.addEventListener("animationend",x),()=>{h.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",x),t.removeEventListener("animationend",x)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:i.useCallback(c=>{o.current=c?getComputedStyle(c):null,n(c)},[])}}function X(e){return(e==null?void 0:e.animationName)||"none"}function Mn(e){var o,a;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var le=0;function Wn(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ke()),document.body.insertAdjacentElement("beforeend",e[1]??ke()),le++,()=>{le===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),le--}},[])}function ke(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var qe=Ot(),ce=function(){},te=i.forwardRef(function(e,t){var n=i.useRef(null),o=i.useState({onScrollCapture:ce,onWheelCapture:ce,onTouchMoveCapture:ce}),a=o[0],s=o[1],u=e.forwardProps,l=e.children,d=e.className,c=e.removeScrollBar,h=e.enabled,x=e.shards,p=e.sideCar,m=e.noRelative,y=e.noIsolation,f=e.inert,v=e.allowPinchZoom,b=e.as,g=b===void 0?"div":b,E=e.gapMode,N=Ft(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=p,R=Mt([n,t]),w=V(V({},N),a);return i.createElement(i.Fragment,null,h&&i.createElement(C,{sideCar:qe,removeScrollBar:c,shards:x,noRelative:m,noIsolation:y,inert:f,setCallbacks:s,allowPinchZoom:!!v,lockRef:n,gapMode:E}),u?i.cloneElement(i.Children.only(l),V(V({},w),{ref:R})):i.createElement(g,V({},w,{className:d,ref:R}),l))});te.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};te.classNames={fullWidth:Wt,zeroRight:Ut};var he=!1;if(typeof window<"u")try{var Z=Object.defineProperty({},"passive",{get:function(){return he=!0,!0}});window.addEventListener("test",Z,Z),window.removeEventListener("test",Z,Z)}catch{he=!1}var $=he?{passive:!1}:!1,Un=function(e){return e.tagName==="TEXTAREA"},Je=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Un(e)&&n[t]==="visible")},$n=function(e){return Je(e,"overflowY")},Bn=function(e){return Je(e,"overflowX")},Te=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var a=et(e,o);if(a){var s=tt(e,o),u=s[1],l=s[2];if(u>l)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},Vn=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},Hn=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},et=function(e,t){return e==="v"?$n(t):Bn(t)},tt=function(e,t){return e==="v"?Vn(t):Hn(t)},Yn=function(e,t){return e==="h"&&t==="rtl"?-1:1},zn=function(e,t,n,o,a){var s=Yn(e,window.getComputedStyle(t).direction),u=s*o,l=n.target,d=t.contains(l),c=!1,h=u>0,x=0,p=0;do{if(!l)break;var m=tt(e,l),y=m[0],f=m[1],v=m[2],b=f-v-s*y;(y||b)&&et(e,l)&&(x+=b,p+=y);var g=l.parentNode;l=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!d&&l!==document.body||d&&(t.contains(l)||t===l));return(h&&(Math.abs(x)<1||!a)||!h&&(Math.abs(p)<1||!a))&&(c=!0),c},Q=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Le=function(e){return[e.deltaX,e.deltaY]},_e=function(e){return e&&"current"in e?e.current:e},Kn=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Gn=function(e){return`
|
|
2
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
3
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
4
|
+
`)},Xn=0,B=[];function Zn(e){var t=i.useRef([]),n=i.useRef([0,0]),o=i.useRef(),a=i.useState(Xn++)[0],s=i.useState($t)[0],u=i.useRef(e);i.useEffect(function(){u.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var f=Bt([e.lockRef.current],(e.shards||[]).map(_e),!0).filter(Boolean);return f.forEach(function(v){return v.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),f.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=i.useCallback(function(f,v){if("touches"in f&&f.touches.length===2||f.type==="wheel"&&f.ctrlKey)return!u.current.allowPinchZoom;var b=Q(f),g=n.current,E="deltaX"in f?f.deltaX:g[0]-b[0],N="deltaY"in f?f.deltaY:g[1]-b[1],C,R=f.target,w=Math.abs(E)>Math.abs(N)?"h":"v";if("touches"in f&&w==="h"&&R.type==="range")return!1;var _=Te(w,R);if(!_)return!0;if(_?C=w:(C=w==="v"?"h":"v",_=Te(w,R)),!_)return!1;if(!o.current&&"changedTouches"in f&&(E||N)&&(o.current=C),!C)return!0;var z=o.current||C;return zn(z,v,f,z==="h"?E:N,!0)},[]),d=i.useCallback(function(f){var v=f;if(!(!B.length||B[B.length-1]!==s)){var b="deltaY"in v?Le(v):Q(v),g=t.current.filter(function(C){return C.name===v.type&&(C.target===v.target||v.target===C.shadowParent)&&Kn(C.delta,b)})[0];if(g&&g.should){v.cancelable&&v.preventDefault();return}if(!g){var E=(u.current.shards||[]).map(_e).filter(Boolean).filter(function(C){return C.contains(v.target)}),N=E.length>0?l(v,E[0]):!u.current.noIsolation;N&&v.cancelable&&v.preventDefault()}}},[]),c=i.useCallback(function(f,v,b,g){var E={name:f,delta:v,target:b,should:g,shadowParent:Qn(b)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(N){return N!==E})},1)},[]),h=i.useCallback(function(f){n.current=Q(f),o.current=void 0},[]),x=i.useCallback(function(f){c(f.type,Le(f),f.target,l(f,e.lockRef.current))},[]),p=i.useCallback(function(f){c(f.type,Q(f),f.target,l(f,e.lockRef.current))},[]);i.useEffect(function(){return B.push(s),e.setCallbacks({onScrollCapture:x,onWheelCapture:x,onTouchMoveCapture:p}),document.addEventListener("wheel",d,$),document.addEventListener("touchmove",d,$),document.addEventListener("touchstart",h,$),function(){B=B.filter(function(f){return f!==s}),document.removeEventListener("wheel",d,$),document.removeEventListener("touchmove",d,$),document.removeEventListener("touchstart",h,$)}},[]);var m=e.removeScrollBar,y=e.inert;return i.createElement(i.Fragment,null,y?i.createElement(s,{styles:Gn(a)}):null,m?i.createElement(Vt,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Qn(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const qn=Ht(qe,Zn);var nt=i.forwardRef(function(e,t){return i.createElement(te,V({},e,{ref:t,sideCar:qn}))});nt.classNames=te.classNames;var ne="Dialog",[rt,Ar]=on(ne),[Jn,T]=rt(ne),ot=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:a,onOpenChange:s,modal:u=!0}=e,l=i.useRef(null),d=i.useRef(null),[c,h]=un({prop:o,defaultProp:a??!1,onChange:s,caller:ne});return r.jsx(Jn,{scope:t,triggerRef:l,contentRef:d,contentId:ae(),titleId:ae(),descriptionId:ae(),open:c,onOpenChange:h,onOpenToggle:i.useCallback(()=>h(x=>!x),[h]),modal:u,children:n})};ot.displayName=ne;var at="DialogTrigger",st=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,a=T(at,n),s=U(t,a.triggerRef);return r.jsx(I.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":be(a.open),...o,ref:s,onClick:F(e.onClick,a.onOpenToggle)})});st.displayName=at;var xe="DialogPortal",[er,it]=rt(xe,{forceMount:void 0}),lt=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:a}=e,s=T(xe,t);return r.jsx(er,{scope:t,forceMount:n,children:i.Children.map(o,u=>r.jsx(ee,{present:n||s.open,children:r.jsx(Qe,{asChild:!0,container:a,children:u})}))})};lt.displayName=xe;var q="DialogOverlay",ct=i.forwardRef((e,t)=>{const n=it(q,e.__scopeDialog),{forceMount:o=n.forceMount,...a}=e,s=T(q,e.__scopeDialog);return s.modal?r.jsx(ee,{present:o||s.open,children:r.jsx(nr,{...a,ref:t})}):null});ct.displayName=q;var tr=Ye("DialogOverlay.RemoveScroll"),nr=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,a=T(q,n);return r.jsx(nt,{as:tr,allowPinchZoom:!0,shards:[a.contentRef],children:r.jsx(I.div,{"data-state":be(a.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),W="DialogContent",ut=i.forwardRef((e,t)=>{const n=it(W,e.__scopeDialog),{forceMount:o=n.forceMount,...a}=e,s=T(W,e.__scopeDialog);return r.jsx(ee,{present:o||s.open,children:s.modal?r.jsx(rr,{...a,ref:t}):r.jsx(or,{...a,ref:t})})});ut.displayName=W;var rr=i.forwardRef((e,t)=>{const n=T(W,e.__scopeDialog),o=i.useRef(null),a=U(t,n.contentRef,o);return i.useEffect(()=>{const s=o.current;if(s)return Yt(s)},[]),r.jsx(dt,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:F(e.onCloseAutoFocus,s=>{var u;s.preventDefault(),(u=n.triggerRef.current)==null||u.focus()}),onPointerDownOutside:F(e.onPointerDownOutside,s=>{const u=s.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0;(u.button===2||l)&&s.preventDefault()}),onFocusOutside:F(e.onFocusOutside,s=>s.preventDefault())})}),or=i.forwardRef((e,t)=>{const n=T(W,e.__scopeDialog),o=i.useRef(!1),a=i.useRef(!1);return r.jsx(dt,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var u,l;(u=e.onCloseAutoFocus)==null||u.call(e,s),s.defaultPrevented||(o.current||(l=n.triggerRef.current)==null||l.focus(),s.preventDefault()),o.current=!1,a.current=!1},onInteractOutside:s=>{var d,c;(d=e.onInteractOutside)==null||d.call(e,s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const u=s.target;((c=n.triggerRef.current)==null?void 0:c.contains(u))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&a.current&&s.preventDefault()}})}),dt=i.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,...u}=e,l=T(W,n),d=i.useRef(null),c=U(t,d);return Wn(),r.jsxs(r.Fragment,{children:[r.jsx(Xe,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:s,children:r.jsx(Ke,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":be(l.open),...u,ref:c,onDismiss:()=>l.onOpenChange(!1)})}),r.jsxs(r.Fragment,{children:[r.jsx(ar,{titleId:l.titleId}),r.jsx(ir,{contentRef:d,descriptionId:l.descriptionId})]})]})}),ge="DialogTitle",ft=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,a=T(ge,n);return r.jsx(I.h2,{id:a.titleId,...o,ref:t})});ft.displayName=ge;var mt="DialogDescription",ht=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,a=T(mt,n);return r.jsx(I.p,{id:a.descriptionId,...o,ref:t})});ht.displayName=mt;var pt="DialogClose",vt=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,a=T(pt,n);return r.jsx(I.button,{type:"button",...o,ref:t,onClick:F(e.onClick,()=>a.onOpenChange(!1))})});vt.displayName=pt;function be(e){return e?"open":"closed"}var xt="DialogTitleWarning",[Ir,gt]=rn(xt,{contentName:W,titleName:ge,docsSlug:"dialog"}),ar=({titleId:e})=>{const t=gt(xt),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
5
|
+
|
|
6
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
7
|
+
|
|
8
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},sr="DialogDescriptionWarning",ir=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${gt(sr).contentName}}.`;return i.useEffect(()=>{var s;const a=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},lr=ot,cr=st,ur=lt,bt=ct,yt=ut,dr=ft,wt=ht,fr=vt;const mr=lr,hr=cr,pr=ur;function Nt({className:e,ref:t,...n}){return r.jsx(bt,{ref:t,className:S("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n})}Nt.displayName=bt.displayName;function Et({className:e,children:t,ref:n,...o}){return r.jsxs(pr,{children:[r.jsx(Nt,{}),r.jsxs(yt,{ref:n,className:S("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",e),...o,children:[t,r.jsxs(fr,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[r.jsx(k,{name:"Close"}),r.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}Et.displayName=yt.displayName;function jt({className:e,...t}){return r.jsx("div",{className:S("flex flex-col space-y-1.5 text-center sm:text-left",e),...t})}jt.displayName="DialogHeader";dr.displayName;function Ct({className:e,ref:t,...n}){return r.jsx(wt,{ref:t,className:S("text-sm text-muted-foreground",e),...n})}Ct.displayName=wt.displayName;const Ae=["opacity-70","opacity-80","opacity-90","opacity-100"],Ie=["shadow-[0_0_2px_0_rgba(0,0,0,0.3)]","shadow-[0_0_4px_0_rgba(0,0,0,0.3)]","shadow-[0_0_7px_0_rgba(0,0,0,0.3)]","shadow-[0_0_10px_0_rgba(0,0,0,0.3)]"];function Oe(e){const t=Math.round(e*Ae.length-1),n=Math.round(e*Ie.length-1);return S("shadow-purple-700 hover:opacity-100 focus:opacity-100 dark:shadow-purple-200",Ae[t]??"opacity-60",Ie[n]??"shadow-none",e===1?"animate-pulse hover:animate-none focus:animate-none":null)}function St({isMenuOpened:e}){const t=J(),{users:n}=ve(),{product:{displayNameShort:o}}=We(),a=e?17:0,s=n.length-a,u=s>(e?1:0);if(!n.length)return null;const l=e&&n.length===1?r.jsx(j,{target:"_blank",rel:"noopener noreferrer",to:"https://www.youtube.com/watch?v=w6Q3mHyzn78",children:r.jsx("img",{alt:"Tiffany Tunes",className:S("h-8 w-8 rounded-full border object-cover",Oe(1)),src:"/img/tiffany.png"})}):null,d=`${s}${e?" more ":" "}${o} Dev${s===1?"":"s"} working now`;return r.jsx("div",{className:"flex flex-wrap items-center gap-2",children:r.jsxs(zt,{children:[(u?n.slice(0,a):n).map(({user:c,score:h})=>{var b,g;const x=Oe(h),p=vr(c.location),m=c.imageUrlSmall||c.avatarUrl,y=c.hasAccess,f=(g=(b=c.location)==null?void 0:b.origin)==null?void 0:g.includes("localhost");let v;return y?v=f?"working":"referencing":v=f?"previewing":"reviewing",r.jsxs(ye,{children:[r.jsx(we,{asChild:!0,children:m?r.jsx("img",{tabIndex:0,alt:c.name||o,className:S("h-8 w-8 rounded-full border object-cover",x),src:m}):r.jsx("div",{tabIndex:0,"aria-label":c.name||`${o} Dev`,className:S("flex h-8 w-8 items-center justify-center rounded-full border",x),children:r.jsx(k,{name:"User"})})}),r.jsx(Ne,{children:r.jsxs("span",{className:"flex flex-col items-center justify-center gap-1",children:[r.jsxs("span",{children:[c.name||`${o} Dev`," ",p?` is ${v} ${h===1&&(t==null?void 0:t.id)!==c.id?"with you":""} on`:null]}),p!=null&&p.line1?r.jsx("span",{children:p.line1}):null,p!=null&&p.line2?r.jsx("span",{children:p.line2}):null]})})]},c.id)}),l,u?r.jsxs(ye,{children:[r.jsx(we,{asChild:!0,children:r.jsx("div",{tabIndex:0,"aria-label":d,className:S("flex items-center justify-center rounded-full border bg-accent text-xs text-accent-foreground",e?"h-8 w-8":"h-6 w-6"),children:r.jsx("span",{className:S("pointer-events-none overflow-hidden text-ellipsis whitespace-nowrap text-center",e?"w-8":"w-6"),children:e?`+${s}`:s})})}),r.jsx(Ne,{children:d})]}):null]})})}const Pt=nn("(min-width: 640px)",!0);function Or(){const e=pe(),t=J(),n=Pt(),o=Lt(),[a,s]=i.useState(e.isMenuOpened);_t({watchPaths:["./exercises/README.mdx"]});function u(l){s(l),document.cookie=`es_menu_open=${l.toString()}; path=/; SameSite=Lax;`}return r.jsxs("div",{className:"flex flex-col",children:[t?null:r.jsx(xr,{}),o&&n?null:r.jsx(gr,{isMenuOpened:a,onMenuOpenChange:u}),r.jsxs("div",{className:S("flex flex-grow flex-col sm:flex-row",{"h-[calc(100vh-128px-env(safe-area-inset-top)-env(safe-area-inset-bottom))] sm:h-[calc(100vh-64px-env(safe-area-inset-top)-env(safe-area-inset-bottom))]":!t,"h-[calc(100vh-64px-env(safe-area-inset-top)-env(safe-area-inset-bottom))] sm:h-[calc(100vh-env(safe-area-inset-top)-env(safe-area-inset-bottom))]":t,"h-[unset]":!n&&a}),children:[n?r.jsx(br,{isMenuOpened:a,onMenuOpenChange:u}):null,r.jsx("div",{className:S("h-full w-full max-w-full sm:max-w-[calc(100%-56px)]",a?"hidden md:block":""),children:r.jsx(Tt,{})})]})]})}function vr(e){if(!e)return null;const{exercise:t}=e,n=[t?[t.exerciseNumber,t.stepNumber].filter(Boolean).map(o=>o.toString().padStart(2,"0")).join("/"):null,t==null?void 0:t.type].filter(Boolean).join(" - ");return{line1:e.workshopTitle,line2:n}}function xr(){const e=Pt(),{product:{host:t,displayName:n}}=We(),o=Kt(),a=r.jsx("div",{children:ENV.EPICSHOP_DEPLOYED?r.jsxs("div",{children:["This is the deployed version. ",r.jsxs(r.Fragment,{children:[r.jsx(j,{className:"underline",target:"_blank",rel:"noopener noreferrer",to:ENV.EPICSHOP_GITHUB_REPO,children:"Run locally"})," for full experience."]})," "]}):o?r.jsxs("div",{children:[r.jsx(j,{to:"/login",className:"underline",children:"Login"})," ","or"," ",r.jsx("a",{href:`https://${t}/login`,className:"underline",children:"join for free"})," ","for the full experience."]}):null});return r.jsx("div",{className:"z-10 flex h-16 items-center justify-between border-b bg-gradient-to-tr from-blue-500 to-indigo-500 pl-4 text-white",children:e?r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"hidden flex-1 flex-wrap items-center gap-4 sm:flex",children:[r.jsx(oe,{size:"lg",style:"monochrome"}),r.jsxs("div",{className:"flex flex-1 flex-wrap items-center",children:[r.jsxs("p",{className:"mr-2",children:["Welcome to the"," ",r.jsx(j,{to:`https://${t}`,className:"underline",target:"_blank",children:n})," ","Workshop app!"]}),a]})]}),o?null:r.jsxs("div",{className:"hidden h-full flex-col items-center sm:flex md:flex-row",children:[r.jsxs(j,{to:`https://${t}`,target:"_blank",className:"flex h-full items-center justify-center space-x-1.5 px-5 text-sm font-semibold",children:[r.jsxs("span",{className:"drop-shadow-sm",children:["Join ",n]}),r.jsx("span",{children:"↗︎"})]}),r.jsxs(j,{to:ENV.EPICSHOP_DEPLOYED?`https://${t}/login`:"/login",className:"flex h-full items-center justify-center space-x-1.5 bg-white/20 px-5 text-sm font-semibold shadow-md transition hover:bg-white/30",children:[r.jsx(k,{name:"User",size:"lg"}),r.jsx("span",{className:"drop-shadow-sm",children:"Login"})]})]})]}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex flex-1 flex-wrap items-center gap-4 sm:hidden",children:[r.jsx("a",{href:`https://${t}`,children:r.jsx(oe,{size:"lg",style:"monochrome"})}),r.jsxs(mr,{children:[r.jsx(hr,{children:r.jsx(k,{name:"Question",size:"lg",className:"animate-pulse"})}),r.jsxs(Et,{children:[r.jsxs(jt,{children:[r.jsx(oe,{size:"lg",style:"monochrome"}),r.jsx("span",{className:"text-lg font-semibold",children:n})]}),r.jsxs(Ct,{children:["Welcome to the"," ",r.jsx(j,{to:`https://${t}`,className:"underline",children:n})," ","Workshop app!"]}),a]})]})]}),o?null:r.jsxs("div",{className:"flex h-full items-center",children:[r.jsxs(j,{to:`https://${t}`,target:"_blank",className:"flex h-full items-center justify-center space-x-1.5 px-5 text-sm font-semibold",children:[r.jsx("span",{className:"drop-shadow-sm",children:"Join"}),r.jsx("span",{children:"↗︎"})]}),r.jsxs(j,{to:ENV.EPICSHOP_DEPLOYED?`https://${t}/login`:"/login",className:"flex h-full items-center justify-center space-x-1.5 bg-white/20 px-5 text-sm font-semibold shadow-md transition hover:bg-white/30",children:[r.jsx(k,{name:"User",size:"lg"}),r.jsx("span",{className:"drop-shadow-sm",children:"Login"})]})]})]})})}const Dt={hidden:{opacity:0,x:-20},visible:{opacity:1,x:0}};function Rt({exerciseNumber:e,children:t}){const n=Qt(e);return r.jsx(D.li,{variants:Dt,className:S("py-[6px] first:pt-3 last:pb-3",n?`${n} before:border-t`:null),children:r.jsx("span",{className:"inline-block pl-2",children:t})})}function Y({children:e,...t}){const n=qt(t);return r.jsx(D.li,{variants:Dt,className:S("py-[6px] first:pt-3 last:pb-3",n?`${n} before:border-t`:null),children:r.jsx("span",{className:"inline-block pl-2",children:e})})}function gr({isMenuOpened:e,onMenuOpenChange:t}){const n=pe(),o=J(),a=Be(),s=Me(),u=Ue(),{users:l}=ve(),d={visible:{opacity:1,transition:{duration:.05,when:"beforeChildren",staggerChildren:.03}},hidden:{opacity:0}};return r.jsx("nav",{className:"flex w-full border-b sm:hidden",children:r.jsx("div",{className:"w-full",children:r.jsxs("div",{className:S("flex items-center",{"flex-col":e,"h-14":!e}),children:[r.jsx(kt,{title:n.workshopTitle,isMenuOpened:e,setMenuOpened:t}),e&&r.jsxs(D.div,{className:"flex w-full flex-grow flex-col justify-between overflow-x-auto p-6 scrollbar-thin scrollbar-thumb-scrollbar",initial:{opacity:0},animate:{opacity:1},children:[r.jsxs(D.ul,{variants:d,initial:"hidden",animate:"visible",className:"flex flex-col",children:[r.jsx("span",{children:r.jsx(L,{prefetch:"intent",to:"/",className:({isActive:c})=>P("relative whitespace-nowrap px-2 py-0.5 pr-3 text-2xl font-bold outline-none hover:underline focus:underline",'after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":c}),children:"Home"})}),n.exercises.map(({exerciseNumber:c,title:h,steps:x})=>{const p=Number(s.exerciseNumber)===c,m=!p&&n.playground.exerciseNumber===c;return r.jsxs(Rt,{exerciseNumber:c,children:[r.jsxs("span",{className:"flex items-center gap-1 text-2xl font-bold",children:[r.jsx(j,{prefetch:"intent",to:M(c),className:P("relative whitespace-nowrap px-2 py-0.5 pr-3 outline-none hover:underline focus:underline",'after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":p}),children:h}),m?r.jsx(j,{to:A(n.playground.exerciseNumber,n.playground.stepNumber,n.playground.type),prefetch:"intent",children:"🛝"}):null]}),p?r.jsxs(D.ul,{variants:d,initial:"hidden",animate:"visible",className:"ml-4 mt-2 flex flex-col",children:[r.jsx(Y,{type:"instructions",exerciseNumber:c,children:r.jsx(j,{to:M(c),prefetch:"intent",className:P('relative whitespace-nowrap px-2 py-0.5 pr-3 text-xl font-medium outline-none after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":!s.stepNumber}),children:"Intro"})},c),x.filter(Boolean).map(({stepNumber:y,title:f,problem:v,solution:b})=>r.jsx(Y,{type:"step",stepNumber:y,exerciseNumber:c,children:r.jsxs("div",{className:"flex flex-col gap-0.5",children:[r.jsxs(j,{to:A(c,y),prefetch:"intent",className:"font-semibold leading-tight",children:[y.toString().padStart(2,"0"),"."," ",f]}),r.jsxs("div",{className:"ml-3 mt-0.5 flex gap-1",children:[v&&r.jsxs(L,{to:A(c,y,"problem"),prefetch:"intent",className:({isActive:g})=>P("relative whitespace-nowrap px-2 py-0.5 pr-3 outline-none hover:underline focus:underline",'after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":g}),children:["Problem",v.name===n.playground.appName?" 🛝":""]}),b&&r.jsxs(L,{to:A(c,y,"solution"),prefetch:"intent",className:({isActive:g})=>P("relative whitespace-nowrap px-2 py-0.5 pr-3 outline-none hover:underline focus:underline",'after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":g}),children:["Solution",b.name===n.playground.appName?" 🛝":""]})]})]})},y)),r.jsx(Y,{type:"finished",exerciseNumber:c,children:r.jsx(L,{to:M(c,"finished"),prefetch:"intent",className:({isActive:y})=>P('relative whitespace-nowrap px-2 py-0.5 pr-3 text-base font-medium outline-none after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":y}),children:"📝 Elaboration"})})]}):null]},c)})]}),r.jsx("div",{className:"mt-6",children:r.jsx(L,{to:"/finished",className:({isActive:c})=>P("relative whitespace-nowrap text-lg font-bold outline-none hover:underline focus:underline",{'bg-black text-white after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""]':c}),children:"📝 Workshop Feedback"})})]}),r.jsx("div",{className:"flex-grow"}),u?null:r.jsx(H,{content:e?null:"You are offline",children:r.jsx("div",{className:S("flex h-14 animate-pulse items-center justify-start p-4",e?"w-full border-t":"border-l"),children:r.jsx(k,{name:"WifiNoConnection",className:"text-foreground-destructive",children:e?"You are offline":null})})}),r.jsx("div",{className:S("flex items-center justify-start p-4",e&&l.length>4?"min-h-14":"h-14",e?"w-full border-t":"border-l"),children:r.jsx(St,{isMenuOpened:e})}),ENV.EPICSHOP_DEPLOYED?null:o?r.jsx(H,{content:e?null:"Your account",children:r.jsxs(j,{className:S("flex h-14 flex-shrink-0 items-center justify-start space-x-3 px-4 py-4 text-center no-underline hover:underline",{"border-l":!e,"w-full border-t":e}),to:"/account",children:[o.imageUrlSmall?r.jsx("img",{alt:o.name??o.email,src:o.imageUrlSmall,className:"h-full rounded-full"}):r.jsx(k,{name:"User",className:"flex-shrink-0",size:"lg"}),e?r.jsx(D.div,{className:"flex items-center whitespace-nowrap",initial:{opacity:0},animate:{opacity:1},children:"Your Account"}):r.jsx("span",{className:"sr-only",children:"Your account"})]})}):null,ENV.EPICSHOP_DEPLOYED?null:o&&a?r.jsx(H,{content:e?null:"Continue to next lesson",children:r.jsxs(j,{to:a,prefetch:"intent",className:P("flex h-14 w-full items-center space-x-3 border-l px-4 py-4 pl-[18px] no-underline hover:underline"),state:{from:"continue next lesson button"},children:[r.jsx(k,{name:"FastForward",className:"flex-shrink-0",size:"md"}),e?r.jsx(D.div,{className:"flex items-center whitespace-nowrap",initial:{opacity:0},animate:{opacity:1},children:"Continue to next lesson"}):r.jsx("span",{className:"sr-only",children:"Continue to next lesson"})]})}):null,r.jsx("div",{className:S("flex h-14 w-14 items-center justify-center self-start p-4 sm:mb-4 sm:w-full",{"w-full border-t":e,"border-l":!e}),children:r.jsx(Ve,{})})]})})})}const ue=400;function br({isMenuOpened:e,onMenuOpenChange:t}){const n=pe(),o=J(),a=Be(),s=Me(),u=Ue(),{users:l}=ve(),d=n.exercises.find(m=>m.exerciseNumber===Number(s.exerciseNumber)),c=s.type==="solution"?d==null?void 0:d.solutions.find(m=>m.stepNumber===Number(s.stepNumber)):s.type==="problem"?d==null?void 0:d.problems.find(m=>m.stepNumber===Number(s.stepNumber)):null,h=fe(),x={close:{width:56},open:{width:ue}},p={visible:{opacity:1,transition:{duration:.05,when:"beforeChildren",staggerChildren:.03}},hidden:{opacity:0}};return r.jsx("nav",{className:"hidden border-r sm:flex",children:r.jsx(D.div,{initial:e?"open":"close",variants:x,animate:h,children:r.jsxs("div",{className:"flex h-full flex-col items-center justify-between",children:[r.jsx(kt,{title:n.workshopTitle,menuControls:h,isMenuOpened:e,setMenuOpened:t}),e&&r.jsxs(D.div,{style:{width:ue},className:"flex flex-grow flex-col justify-between overflow-y-auto p-6 scrollbar-thin scrollbar-thumb-scrollbar",initial:{opacity:0},animate:{opacity:1},children:[r.jsxs(D.ul,{variants:p,initial:"hidden",animate:"visible",className:"flex flex-col",children:[r.jsx("span",{children:r.jsx(L,{prefetch:"intent",to:"/",className:({isActive:m})=>P("relative whitespace-nowrap px-2 py-0.5 pr-3 text-2xl font-bold outline-none hover:underline focus:underline",'after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":m}),children:"Home"})}),n.exercises.map(({exerciseNumber:m,title:y,steps:f})=>{const v=Number(s.exerciseNumber)===m,b=!v&&n.playground.exerciseNumber===m;return r.jsxs(Rt,{exerciseNumber:m,children:[r.jsxs("span",{className:"flex items-center gap-1 text-2xl font-bold",children:[r.jsx(j,{prefetch:"intent",to:M(m),className:P("relative whitespace-nowrap px-2 py-0.5 pr-3 outline-none hover:underline focus:underline",'after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":v}),children:y}),b?r.jsx(j,{to:A(n.playground.exerciseNumber,n.playground.stepNumber,n.playground.type),prefetch:"intent",children:"🛝"}):null]}),v?r.jsxs(D.ul,{variants:p,initial:"hidden",animate:"visible",className:"ml-4 mt-2 flex flex-col",children:[r.jsx(Y,{type:"instructions",exerciseNumber:m,children:r.jsx(j,{to:M(m),prefetch:"intent",className:P('relative whitespace-nowrap px-2 py-0.5 pr-3 text-xl font-medium outline-none after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":!s.stepNumber}),children:"Intro"})},m),f.filter(Boolean).map(({stepNumber:g,title:E,problem:N,solution:C})=>r.jsx(Y,{type:"step",stepNumber:g,exerciseNumber:m,children:r.jsxs("div",{className:"flex flex-col gap-0.5",children:[r.jsxs(j,{to:A(m,g),prefetch:"intent",className:"font-semibold leading-tight",children:[g.toString().padStart(2,"0"),"."," ",E]}),r.jsxs("div",{className:"ml-3 mt-0.5 flex gap-1",children:[N&&r.jsxs(L,{to:A(m,g,"problem"),prefetch:"intent",className:({isActive:R})=>P("relative whitespace-nowrap px-2 py-0.5 pr-3 outline-none hover:underline focus:underline",'after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":R}),children:["Problem",N.name===n.playground.appName?" 🛝":""]}),C&&r.jsxs(L,{to:A(m,g,"solution"),prefetch:"intent",className:({isActive:R})=>P("relative whitespace-nowrap px-2 py-0.5 pr-3 outline-none hover:underline focus:underline",'after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":R}),children:["Solution",C.name===n.playground.appName?" 🛝":""]})]})]})},g)),r.jsx(Y,{type:"finished",exerciseNumber:m,children:r.jsx(L,{to:M(m,"finished"),prefetch:"intent",className:({isActive:g})=>P('relative whitespace-nowrap px-2 py-0.5 pr-3 text-base font-medium outline-none after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":g}),children:"📝 Elaboration"})})]}):null]},m)})]}),r.jsx("div",{className:"mt-6",children:r.jsx(L,{to:"/finished",className:({isActive:m})=>P("relative whitespace-nowrap text-lg font-bold outline-none hover:underline focus:underline",{'bg-black text-white after:absolute after:-bottom-2.5 after:-right-2.5 after:h-5 after:w-5 after:rotate-45 after:scale-75 after:bg-background after:content-[""]':m}),children:"📝 Workshop Feedback"})})]}),!e&&r.jsx("div",{className:"flex flex-grow flex-col justify-center",children:r.jsxs("div",{className:"orientation-sideways w-full font-mono text-sm font-medium uppercase leading-none",children:[d!=null&&d.title?r.jsx(j,{to:M(Number(s.exerciseNumber)),children:d.title}):null,d!=null&&d.title&&(c!=null&&c.title)?" — ":null,c!=null&&c.title?r.jsx(j,{to:A(Number(s.exerciseNumber),c.stepNumber),children:c.title}):null]})}),u?null:r.jsx(H,{content:e?null:"You are offline",children:r.jsx("div",{className:S("flex w-full animate-pulse items-center border-t p-4",e?"justify-start":"justify-center"),children:r.jsx(k,{name:"WifiNoConnection",className:"text-foreground-destructive",children:e?r.jsx("span",{className:"whitespace-nowrap",children:"You are offline"}):null})})}),r.jsx("div",{className:S("flex w-full items-center justify-start border-t p-4 transition-[height]",e&&l.length>4?"h-28":"h-14"),style:e?{width:ue}:{},children:r.jsx(St,{isMenuOpened:e})}),ENV.EPICSHOP_DEPLOYED?null:o?r.jsx(H,{content:e?null:"Your account",children:r.jsxs(j,{className:"flex h-14 w-full flex-shrink-0 items-center justify-start space-x-3 border-t px-4 py-4 text-center no-underline hover:underline",to:"/account",children:[o.imageUrlSmall?r.jsx("img",{alt:o.name??o.email,src:o.imageUrlSmall,className:"h-full rounded-full"}):r.jsx(k,{name:"User",className:"flex-shrink-0",size:"lg"}),e?r.jsx(D.div,{className:"flex items-center whitespace-nowrap",initial:{opacity:0},animate:{opacity:1},children:"Your Account"}):r.jsx("span",{className:"sr-only",children:"Your account"})]})}):null,ENV.EPICSHOP_DEPLOYED?null:o&&a?r.jsx(H,{content:e?null:"Continue to next lesson",children:r.jsxs(j,{to:a,prefetch:"intent",className:P("flex h-14 w-full items-center space-x-3 border-t px-4 py-4 pl-[18px] no-underline hover:underline"),state:{from:"continue next lesson button"},children:[r.jsx(k,{name:"FastForward",className:"flex-shrink-0",size:"md"}),e?r.jsx(D.div,{className:"flex items-center whitespace-nowrap",initial:{opacity:0},animate:{opacity:1},children:"Continue to next lesson"}):r.jsx("span",{className:"sr-only",children:"Continue to next lesson"})]})}):null,r.jsx("div",{className:"mb-4 w-full self-start border-t pl-3 pt-[15px]",children:r.jsx(Ve,{})})]})})})}function kt({title:e,isMenuOpened:t,setMenuOpened:n,menuControls:o}){const a=i.useRef(t),s=i.useRef(null),u={open:{d:"M3.06061 2.99999L21.0606 21"},closed:{d:"M0 9.5L24 9.5"}},l={open:{d:"M3.00006 21.0607L21 3.06064"},moving:{d:"M0 14.5L24 14.5"},closed:{d:"M0 14.5L15 14.5"}},d=fe(),c=fe();async function h(){o==null||o.start(t?"close":"open"),n(!t),t?(d.start(u.closed),await c.start(l.moving),c.start(l.closed)):(await c.start(l.moving),d.start(u.open),c.start(l.open))}return i.useEffect(()=>{if(!t)return;function x(p){var m;p.key==="Escape"&&((m=s.current)==null||m.click())}return document.addEventListener("keyup",x),()=>document.removeEventListener("keyup",x)},[t]),r.jsxs("div",{className:S("relative inline-flex h-14 flex-shrink-0 items-center justify-between overflow-hidden border-r sm:w-full sm:border-b sm:border-r-0",{"w-full":t}),children:[r.jsx("button",{ref:s,className:"flex h-14 w-14 items-center justify-center","aria-label":"Open Navigation menu",onClick:h,children:r.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",children:[r.jsx(D.path,{...u[a.current?"open":"closed"],animate:d,transition:{duration:.2},stroke:"currentColor",strokeWidth:1.5}),r.jsx(D.path,{...l[a.current?"open":"closed"],animate:c,transition:{duration:.2},stroke:"currentColor",strokeWidth:1.5})]})}),t&&r.jsx(D.p,{transition:{delay:.2},initial:{opacity:0,y:5},animate:{opacity:1,y:0},className:"absolute right-5 whitespace-nowrap font-mono text-sm uppercase",children:r.jsx(j,{to:"/",children:e})})]})}export{Or as default};
|
|
9
|
+
//# sourceMappingURL=_layout-CkabS-6c.js.map
|