@joy-ride/game 0.27.1 → 0.29.0

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.
Files changed (84) hide show
  1. package/README.md +2 -1
  2. package/THIRD_PARTY_NOTICES.md +3 -3
  3. package/bookmarklet.d.ts +1 -1
  4. package/bookmarklet.js +1 -1
  5. package/embed-assets/subaru-wrx-top-DszueAbm.webp +0 -0
  6. package/embed-assets/toyota-gr-corolla-top-dNitaLHl.webp +0 -0
  7. package/embed-chunks/{CodeBlock-CJRe6lHv.js → CodeBlock-C-uqwCCE.js} +1 -1
  8. package/embed-chunks/{Documentation-DULnk8tf.js → Documentation-CCpuHmnH.js} +3 -3
  9. package/embed-chunks/EmbedPanel-CltTMTEZ.js +1 -0
  10. package/embed-chunks/JoyRideView-dbTrQ6zf.js +1 -0
  11. package/embed-chunks/X.es-BZV6GJho.js +1 -0
  12. package/embed-chunks/{configuration~index~embed-ynFxJP_I.js → configuration~index~embed-E9p3ySKG.js} +1 -1
  13. package/embed-chunks/configuration~index~embed~bookmarklet-5ym-TX_u.js +1 -0
  14. package/embed-chunks/configuration~index~embed~bookmarklet~vehicle-popover~EmbedPanel~Documentation~JoyRideView~~n76yhyet-C39ouO-X.js +1 -0
  15. package/embed-chunks/{configuration~index~embed~bookmarklet~vehicle-popover~EmbedPanel~JoyRideView~browser-sessio~iaaa3ndj-DLfKTakR.js → configuration~index~embed~bookmarklet~vehicle-popover~EmbedPanel~JoyRideView~browser-sessio~iaaa3ndj-DF2q8EGO.js} +1 -1
  16. package/embed-chunks/controls~index~embed-x6xN6BFw.js +1 -0
  17. package/embed-chunks/controls~index~embed~vehicle-popover~JoyRideView~browser-session-core~renderer-Cnf30Q_A.js +1 -0
  18. package/embed-chunks/react-vendor~index~embed-Blb-qyUP.js +9 -0
  19. package/embed-chunks/react-vendor~index~embed~vehicle-popover~EmbedPanel~Documentation~JoyRideView-DSe2UFlv.js +1 -0
  20. package/embed-chunks/{runtime~JoyRideView~browser-session-core-D5ZWMVDY.js → runtime~JoyRideView~browser-session-core-hIS-xQed.js} +1 -1
  21. package/embed-chunks/runtime~browser-session-core-DfamcX9U.js +1 -0
  22. package/embed-chunks/runtime~index~embed-Bm1M0iiY.js +210 -0
  23. package/embed-chunks/runtime~index~embed~vehicle-popover~browser-session-core~renderer-iEgK-2uE.js +1 -0
  24. package/embed-chunks/{runtime~vehicle-popover-DRMddEZO.js → runtime~vehicle-popover-CA1iUObq.js} +1 -1
  25. package/embed-chunks/{runtime~vehicle-popover~browser-session-core-Duk0oqZL.js → runtime~vehicle-popover~browser-session-core-B5JA0YNt.js} +1 -1
  26. package/embed-chunks/{runtime~vehicle-popover~browser-session-core~renderer-Cf4rBrLo.js → runtime~vehicle-popover~browser-session-core~renderer-FYzuLkAN.js} +1 -1
  27. package/embed-chunks/runtime~vehicle-popover~renderer-B44auM3E.js +849 -0
  28. package/embed-chunks/{src-Dz21SH_d.js → src-sen5Yp2R.js} +2 -2
  29. package/embed-chunks/{vehicle-catalog~index~embed-Dpqr1rYZ.js → vehicle-catalog~index~embed-CKTjozQr.js} +1 -1
  30. package/embed-chunks/vehicle-popover-RZXv8RjT.js +1 -0
  31. package/embed.js +1 -1
  32. package/{index-At4NsLPU.d.ts → index-DztYDfpU.d.ts} +4 -3
  33. package/index.d.ts +2 -2
  34. package/index.js +1 -1
  35. package/npm-chunks/{Documentation-B_Eb81Ol.js → Documentation-DjEkQvvy.js} +3 -3
  36. package/npm-chunks/{EmbedPanel-Cu4-LaxN.js → EmbedPanel-DBoR1Dci.js} +1 -1
  37. package/npm-chunks/JoyRideView-CqVA2IWS.js +1 -0
  38. package/npm-chunks/VehicleHint-BaLJr7O5.js +1 -0
  39. package/npm-chunks/{configuration~react-CPx5MlF4.js → configuration~react-Wr_iMhZB.js} +1 -1
  40. package/npm-chunks/configuration~react~vehicle-popover~EmbedPanel~Documentation~JoyRideView~browser-session-co~fvauaeow-C39ouO-X.js +1 -0
  41. package/npm-chunks/{configuration~react~vehicle-popover~EmbedPanel~JoyRideView~browser-session-core-rFMaxKZs.js → configuration~react~vehicle-popover~EmbedPanel~JoyRideView~browser-session-core-BLdLriTd.js} +1 -1
  42. package/npm-chunks/{configuration~react~vehicle-popover~EmbedPanel~JoyRideView~browser-session-core~renderer-Bo9KSudc.js → configuration~react~vehicle-popover~EmbedPanel~JoyRideView~browser-session-core~renderer-D5v3L-_1.js} +1 -1
  43. package/npm-chunks/configuration~react~vehicle-popover~JoyRideView~browser-session-core~renderer-BwD100vD.js +1 -0
  44. package/npm-chunks/controls~react~vehicle-popover~Documentation~JoyRideView~browser-session-core-QxIfuAPb.js +1 -0
  45. package/npm-chunks/{runtime~JoyRideView~browser-session-core-DkTKYWMV.js → runtime~JoyRideView~browser-session-core-Del73NUd.js} +1 -1
  46. package/npm-chunks/{runtime~browser-session-core-AEIWcEJB.js → runtime~browser-session-core-Cicrs9mu.js} +1 -1
  47. package/npm-chunks/{runtime~react-C9tzIsBm.js → runtime~react-De_WENZT.js} +1 -1
  48. package/npm-chunks/{runtime~react~browser-session-core-B9a1rLNB.js → runtime~react~browser-session-core-DPWW9TnO.js} +1 -1
  49. package/npm-chunks/{runtime~react~vehicle-popover~browser-session-core-CdrNmP2l.js → runtime~react~vehicle-popover~browser-session-core-2aPQOOXj.js} +2 -2
  50. package/npm-chunks/runtime~react~vehicle-popover~browser-session-core~renderer-DKpExYhH.js +1 -0
  51. package/npm-chunks/{runtime~vehicle-popover-VyqXHkfB.js → runtime~vehicle-popover-QsSxwpN_.js} +1 -1
  52. package/npm-chunks/{runtime~vehicle-popover~browser-session-core-D0thHU3T.js → runtime~vehicle-popover~browser-session-core-CrZME-1Y.js} +1 -1
  53. package/npm-chunks/{runtime~vehicle-popover~browser-session-core~renderer-EswVyRVp.js → runtime~vehicle-popover~browser-session-core~renderer-L2_7uaz1.js} +1 -1
  54. package/npm-chunks/{runtime~vehicle-popover~renderer-4RpQDOHk.js → runtime~vehicle-popover~renderer-CTrAfI2e.js} +1 -1
  55. package/npm-chunks/{sync-shadow-theme-DieEPOi7.js → sync-shadow-theme-CTVN45GY.js} +1 -1
  56. package/npm-chunks/{theme-CjrpDpKE.js → theme-CyUONXaD.js} +1 -1
  57. package/npm-chunks/{vehicle-catalog~react~browser-session-core-D5_CJzRM.js → vehicle-catalog~react~browser-session-core-Ck9lXSBn.js} +1 -1
  58. package/npm-chunks/vehicle-catalog~react~vehicle-popover~browser-session-core-Dz1vucc8.js +1 -0
  59. package/npm-chunks/vehicle-popover-CAG797YN.js +1 -0
  60. package/package.json +1 -1
  61. package/{playground-BcoLBJrj.d.ts → playground-B7tHL_J3.d.ts} +12 -0
  62. package/react.d.ts +7 -3
  63. package/react.js +7 -7
  64. package/embed-assets/subaru-wrx-top-dLvMFYDs.webp +0 -0
  65. package/embed-assets/toyota-gr-corolla-top-B0NnJP3L.webp +0 -0
  66. package/embed-chunks/EmbedPanel-D6NV8mze.js +0 -1
  67. package/embed-chunks/JoyRideView-Ob58zdVp.js +0 -1
  68. package/embed-chunks/X.es-d7B7rOGv.js +0 -1
  69. package/embed-chunks/configuration~index~embed~bookmarklet-BGiS_NuJ.js +0 -1
  70. package/embed-chunks/configuration~index~embed~bookmarklet~vehicle-popover~EmbedPanel~Documentation~JoyRideView~~n76yhyet-mgPW9A8j.js +0 -1
  71. package/embed-chunks/controls~index~embed-CFqR-DAK.js +0 -1
  72. package/embed-chunks/react-vendor~index~embed-BNCMh3YF.js +0 -9
  73. package/embed-chunks/runtime~browser-session-core-BAKqCyId.js +0 -1
  74. package/embed-chunks/runtime~index~embed-OYVxs2-3.js +0 -210
  75. package/embed-chunks/runtime~index~embed~vehicle-popover~browser-session-core~renderer-ZRVlax1L.js +0 -1
  76. package/embed-chunks/runtime~vehicle-popover~renderer-JCHjG7Oa.js +0 -849
  77. package/embed-chunks/vehicle-popover-uy2DwcVy.js +0 -1
  78. package/npm-chunks/JoyRideView-DHvlq6T7.js +0 -1
  79. package/npm-chunks/configuration~react~vehicle-popover~EmbedPanel~Documentation~JoyRideView~browser-session-co~fvauaeow-mgPW9A8j.js +0 -1
  80. package/npm-chunks/configuration~react~vehicle-popover~JoyRideView~browser-session-core~renderer-CPZkP_Db.js +0 -1
  81. package/npm-chunks/controls~react~vehicle-popover~Documentation~JoyRideView~browser-session-core-CoAcght5.js +0 -1
  82. package/npm-chunks/runtime~react~vehicle-popover~browser-session-core~renderer-Dmgs7E8f.js +0 -1
  83. package/npm-chunks/vehicle-catalog~react~vehicle-popover~browser-session-core-B042f61I.js +0 -1
  84. package/npm-chunks/vehicle-popover-DErhsXB9.js +0 -1
@@ -1 +1 @@
1
- import{t as e}from"./configuration~react~vehicle-popover~EmbedPanel~Documentation~JoyRideView~browser-session-co~fvauaeow-mgPW9A8j.js";import{a as t,i as n,r,t as i}from"./configuration~react~vehicle-popover~EmbedPanel~JoyRideView~browser-session-core-rFMaxKZs.js";import{N as a,S as o,a as s,c,h as l,l as u,m as d,o as f,u as p,x as m,y as h}from"./X.es-VqSWeM6N.js";import{A as g,L as _,T as v,b as y,m as b,v as x}from"./input-DHpsGB-l.js";import{t as S}from"./CodeBlock-35k1cnjA.js";import{a as C,c as w,f as T,g as E,h as D,i as O,l as k,m as A,n as j,o as M,p as N,r as P,s as F,t as I,v as L,y as R}from"./vehicle-popover-DErhsXB9.js";import*as z from"react";import{useState as B}from"react";import{Fragment as ee,jsx as V,jsxs as H}from"react/jsx-runtime";var U=z.createContext(void 0);function W(){let e=z.useContext(U);if(e===void 0)throw Error(h(10));return e}var G={value:()=>null},te=z.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,hiddenUntilFound:a,keepMounted:s,loopFocus:l,onValueChange:u,multiple:d=!1,orientation:f=`vertical`,value:m,defaultValue:h,style:g,..._}=e,v=h??p,y=z.useRef([]),[b,x]=k({controlled:m,default:v,name:`Accordion`,state:`value`}),S=o((e,t,n)=>{let r;r=d?t?[...b,e]:b.filter(t=>t!==e):b[0]===e?[]:[e],u?.(r,n),!n.isCanceled&&x(r)}),C=z.useMemo(()=>({value:b,disabled:i,orientation:f}),[b,i,f]),T=z.useMemo(()=>({disabled:i,handleValueChange:S,hiddenUntilFound:a??!1,keepMounted:s??!1,state:C,value:b}),[i,S,a,s,C,b]),E=c(`div`,e,{state:C,ref:t,props:_,stateAttributesMapping:G});return V(U.Provider,{value:T,children:V(w,{elementsRef:y,children:E})})});function ne(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,disabled:i}=e,[a,s]=k({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:c,setMounted:l,transitionStatus:u}=T(a,!0,!0),d=g(),[f,p]=z.useState(),m=f===null?void 0:f??d,h=o(e=>{let t=!a,n=y(x,e.nativeEvent);r(t,n),!n.isCanceled&&s(t)});return z.useMemo(()=>({defaultPanelId:d,disabled:i,handleTrigger:h,mounted:c,open:a,panelId:m,setMounted:l,setOpen:s,setPanelIdState:p,transitionStatus:u}),[d,i,h,c,a,m,l,s,p,u])}var re=z.createContext(void 0);function ie(){let e=z.useContext(re);if(e===void 0)throw Error(h(15));return e}var K=z.createContext(void 0);function q(){let e=z.useContext(K);if(e===void 0)throw Error(h(9));return e}var ae=`data-open`,oe=`data-closed`,J=L,se=`data-panel-open`,ce={[ae]:``},le={[oe]:``},ue={open(e){return e?{[se]:``}:null}},de={open(e){return e?ce:le}},fe=`data-index`,Y={...de,index:e=>({[fe]:String(e)}),...E,value:()=>null},pe=z.forwardRef(function(e,t){let{className:n,disabled:r=!1,onOpenChange:i,render:a,value:s,style:l,...u}=e,{ref:d,index:f}=F(),{disabled:p,handleValueChange:m,state:h,value:_}=W(),v=g(),y=s??v,b=r||p,x=_.includes(y),S=o((e,t)=>{i?.(e,t),!t.isCanceled&&m(y,e,t)}),C=ne({open:x,onOpenChange:S,disabled:b}),w=z.useMemo(()=>({...C,onOpenChange:S,state:{open:C.open,disabled:C.disabled,transitionStatus:C.transitionStatus}}),[C,S]),T=z.useMemo(()=>({...h,hidden:!x&&!C.mounted,index:f,disabled:b,open:x}),[C.mounted,b,f,x,h]),E=g(),[D,O]=z.useState(),k=D===null?void 0:D??E,A=z.useMemo(()=>({defaultTriggerId:E,open:x,state:T,setTriggerId:O,triggerId:k}),[E,x,T,O,k]),j=c(`div`,e,{state:T,ref:[t,d],props:u,stateAttributesMapping:Y});return V(re.Provider,{value:w,children:V(K.Provider,{value:A,children:j})})}),me=z.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=q();return c(`h3`,e,{state:o,ref:t,props:a,stateAttributesMapping:Y})}),he={...Y,...ue},ge=z.forwardRef(function(e,t){let{disabled:n,className:r,id:i,render:a,nativeButton:o=!0,style:s,...u}=e,{panelId:d,open:f,handleTrigger:p,disabled:h}=ie(),{getButtonProps:g,buttonRef:_}=l({disabled:n||h,native:o}),{defaultTriggerId:v,state:y,setTriggerId:b}=q(),x=i||void 0,S=x??v;return m(()=>(b(e=>x??(e===null?void 0:e)),()=>{b(e=>e===x?null:e)}),[x,b]),c(`button`,e,{state:y,ref:[t,_],props:[{"aria-controls":f?d:void 0,"aria-expanded":f,id:S,onClick:p},u,g],stateAttributesMapping:he})}),X={height:void 0,width:void 0};function _e(e){let{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:i,mounted:a,onOpenChange:s,open:c,setMounted:l,setOpen:u,transitionStatus:f}=e,p=z.useRef(null),h=z.useRef(null),[g,_]=z.useState(X),x=z.useRef(X),S=z.useRef(!1),w=z.useRef(c),T=z.useRef(!1),[E,O]=z.useState(!1),k=z.useRef(null),j=d(t,p),P=C(c),F=A(p),I=!c&&!a,L=E?`idle`:f,R=c&&(w.current||T.current),B=!c&&a&&h.current===`css-animation`&&g.height===void 0&&g.width===void 0?x.current:g,ee=n&&I&&h.current!==`css-animation`,V=o((e,t=!0)=>{t&&(x.current=e),_(e)}),H=o(()=>{k.current?.(),k.current=null}),U=o(e=>{H(),k.current=()=>{k.current=null,e()}}),W=o(()=>{c&&a&&h.current===`css-animation`&&(T.current=!0)});m(()=>{E&&f!==`starting`&&O(!1)},[E,f]),z.useEffect(()=>()=>{W(),H()},[W,H]),m(()=>{c||(w.current=!1,T.current=!1);let e=p.current;if(!e)return;!c&&k.current&&H();let t=ve(e,R);if(h.current=t,c&&f===`idle`&&w.current&&t===`css-animation`){x.current=Z(e);return}if(c&&f===`starting`){let n=S.current;if(S.current=!1,t===`none`){V(Z(e)),O(!0);return}if(t===`css-transition`){let t=be(e);if(V(Z(e)),!n)return t;let r=Q(e,`transition-duration`,`0s`);return U(r),O(!0),t}V(Z(e));let r=Q(e,`animation-name`,`none`);if(!n){r();return}let i=Q(e,`animation-duration`,`0s`);r(),U(i),O(!0);return}if(!c&&a&&(f===`idle`||f===`starting`)){if(t===`none`){V(X,!1),l(!1);return}V(Z(e));return}if(f!==`ending`)return;if(t===`none`){l(!1);return}let n=Z(e);n.height>0||n.width>0?(V(n),t===`css-animation`&&Q(e,`animation-name`,`none`)()):l(!1)},[a,c,H,V,l,U,R,f]),N({enabled:c&&a&&L===`idle`,open:!0,ref:p,onComplete(){c&&V(X,!1)}}),z.useEffect(()=>{if(c||!a||L!==`ending`)return;if(!p.current){l(!1),V(X,!1);return}let e=new AbortController,t=-1;function n(){P.current||(l(!1),V(X,!1))}return t=D.request(()=>{F(n,e.signal)}),()=>{D.cancel(t),e.abort()}},[P,a,c,L,F,V,l]),m(()=>{let e=p.current;e&&n&&I&&e.setAttribute(`hidden`,`until-found`)},[I,n]),z.useEffect(function(){let e=p.current;if(!e)return;let t=v.create(),n=-1,r=(r,i)=>{t.start(0,()=>{P.current||(n=D.request(()=>{P.current||(r&&(S.current=!1),i&&e.setAttribute(J,``),e.setAttribute(`hidden`,`until-found`))}))})},i=M(e,`beforematch`,t=>{let n=y(b,t);if(s(!0,n),n.isCanceled){r(!1,!1);return}S.current=!0;let i=e.hasAttribute(J);e.removeAttribute(J),u(!0),r(!0,i)});return()=>{t.clear(),D.cancel(n),i()}},[P,s,u]);let G=i||n||a||c;return{height:B.height,props:{...ee?{[J]:``}:void 0,hidden:I,id:r},ref:j,shouldPreventOpenAnimation:R,shouldRender:G,transitionStatus:L,width:B.width}}function Z(e){return{height:e.scrollHeight,width:e.scrollWidth}}function ve(e,t){let n=a(e).getComputedStyle(e),r=(n.animationName.split(`,`).map(e=>e.trim()).some(e=>e!==``&&e!==`none`)||t)&&ye(n.animationDuration),i=ye(n.transitionDuration);return r&&i||i?`css-transition`:r?`css-animation`:`none`}function ye(e){return e.split(`,`).map(e=>e.trim()).some(e=>e!==``&&Number.parseFloat(e)>0)}function Q(e,t,n){let r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{r===``?e.style.removeProperty(t):e.style.setProperty(t,r,i)}}function be(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)});function n(){Object.entries(t).forEach(([t,n])=>{n===``?e.style.removeProperty(t):e.style.setProperty(t,n)})}let r=D.request(n);return()=>{D.cancel(r),n()}}var xe=`--accordion-panel-height`,Se=`--accordion-panel-width`,Ce=z.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,id:a,render:o,style:s,...l}=e,{hiddenUntilFound:d,keepMounted:f}=W(),{defaultPanelId:p,mounted:h,onOpenChange:g,open:_,setMounted:v,setOpen:y,setPanelIdState:b,transitionStatus:x}=ie(),S=r??d,C=i??f,w=a||void 0,T=a??p;m(()=>(b(e=>w??(e===null?void 0:e)),()=>{b(e=>e===w?null:e)}),[w,b]);let{height:E,props:D,ref:O,shouldPreventOpenAnimation:k,shouldRender:A,transitionStatus:j,width:M}=_e({externalRef:t,hiddenUntilFound:S,id:T,keepMounted:C,mounted:h,onOpenChange:g,open:_,setMounted:v,setOpen:y,transitionStatus:x}),{state:N,triggerId:P}=q(),F={...N,transitionStatus:j},I=u(s,F),L=c(`div`,{...e,style:void 0},{state:F,ref:O,props:[D,{"aria-labelledby":P,role:`region`,style:{[xe]:E===void 0?`auto`:`${E}px`,[Se]:M===void 0?`auto`:`${M}px`}},l,I?{style:I}:void 0,k?{style:{animationName:`none`}}:void 0],stateAttributesMapping:Y});return A?L:null});function we({className:e,...t}){return V(te,{"data-slot":`accordion`,className:f(`flex w-full flex-col`,e),...t})}function Te({className:e,...t}){return V(pe,{"data-slot":`accordion-item`,className:f(`not-last:border-b`,e),...t})}function Ee({className:e,children:t,...n}){return V(me,{className:`flex`,children:H(ge,{"data-slot":`accordion-trigger`,className:f(`group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground`,e),...n,children:[t,V(_,{"aria-hidden":`true`,"data-slot":`accordion-trigger-icon`,className:`pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden`}),V(R,{"aria-hidden":`true`,"data-slot":`accordion-trigger-icon`,className:`pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline`})]})})}function De({className:e,children:t,...n}){return V(Ce,{"data-slot":`accordion-content`,className:`overflow-hidden text-sm data-open:animate-accordion-down data-closed:animate-accordion-up`,...n,children:V(`div`,{className:f(`h-(--accordion-panel-height) pt-0 pb-2.5 data-ending-style:h-0 data-starting-style:h-0 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4`,e),children:t})})}function Oe({className:e,size:t=`default`,...n}){return V(`div`,{"data-slot":`card`,"data-size":t,className:f(`group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,e),...n})}function ke({className:e,...t}){return V(`div`,{"data-slot":`card-header`,className:f(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)`,e),...t})}function Ae({className:e,...t}){return V(`div`,{"data-slot":`card-title`,className:f(`font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,e),...t})}function je({className:e,...t}){return V(`div`,{"data-slot":`card-description`,className:f(`text-sm text-muted-foreground`,e),...t})}function Me({className:e,...t}){return V(`div`,{"data-slot":`card-action`,className:f(`col-start-2 row-span-2 row-start-1 self-start justify-self-end`,e),...t})}var $={game:{title:`Game`,description:`Visuals, sound, performance, tools, and rules`},dialog:{title:`Dialog`,description:`Appearance, visible tabs, and visitor settings access`}};function Ne({value:a,onChange:o}){let[c,l]=B(),u=r(t(i,a)),d=(e,t,n)=>o({...a,[e]:{...a[e],[t]:n}});return H(`section`,{"aria-label":`Embed options`,className:`space-y-3 py-2 text-xs`,ref:e=>{let t=e?.getRootNode();t instanceof ShadowRoot&&t!==c&&l(t)},children:[V(Oe,{size:`sm`,className:`gap-0 bg-muted/30`,children:H(ke,{className:`grid-cols-[minmax(0,1fr)_auto] items-center gap-x-3`,children:[V(Ae,{children:`Configure your embed`}),V(je,{children:`Choose the experience and what visitors can change.`}),V(Me,{children:V(s,{variant:`outline`,size:`sm`,onClick:()=>{let e={...a};for(let t of Object.keys(n))Object.assign(e,{[t]:{...e[t],...n[t]}});o(e)},children:`Use SFW defaults`})})]})}),V(we,{defaultValue:[],className:`gap-2`,children:Object.keys($).map(t=>H(Te,{value:t,className:`rounded-lg border bg-card/40 px-3`,children:[V(Ee,{className:`py-3 hover:no-underline`,children:H(`span`,{className:`grid gap-1`,children:[V(`span`,{children:$[t].title}),V(`span`,{className:`text-[11px] font-normal text-muted-foreground`,children:$[t].description})]})}),V(De,{children:V(`div`,{className:`divide-y border-t`,children:e.filter(e=>e.category===t).map(e=>{let t=`embed-${e.category}-${e.key}`,n=u[e.category][e.key],r=[`hint`,`tabs`].includes(e.control);return H(`div`,{className:r?`grid gap-3 py-3`:`flex items-center justify-between gap-4 py-3`,children:[H(`label`,{htmlFor:t,className:`grid min-w-0 gap-1 font-medium`,children:[V(`span`,{children:e.label}),e.help&&V(`span`,{className:`max-w-72 font-normal text-muted-foreground`,children:e.help})]}),V(O,{id:t,entry:e,value:n,container:c,onChange:t=>d(e.category,e.key,t)})]},e.key)})})})]},t))})]})}function Pe({embed:e}){let[t,n]=B(`html`),r={html:{code:e.html,language:`html`,title:`HTML embed`},async:{code:e.async,language:`javascript`,title:`CDN`},npm:{code:e.npm,language:`javascript`,title:`JavaScript`},react:{code:e.react??``,language:`tsx`,title:`React`},bookmarklet:{code:e.bookmarklet,language:`javascript`,title:`Bookmarklet URL`}}[t];return H(`section`,{className:`min-h-full px-3 py-2.5 text-sm`,children:[e.error?V(`p`,{role:`alert`,children:e.error}):H(ee,{children:[V(I,{value:t,onValueChange:e=>n(e),className:`my-2.5 gap-0`,children:H(j,{className:`w-full`,"aria-label":`Embed format`,children:[V(P,{value:`html`,className:`text-sm`,children:`HTML`}),V(P,{value:`async`,className:`text-sm`,children:`CDN`}),V(P,{value:`npm`,className:`text-sm`,children:`JavaScript`}),V(P,{value:`react`,className:`text-sm`,disabled:!e.react,children:`React`}),V(P,{value:`bookmarklet`,className:`text-sm`,children:`Bookmarklet`})]})}),(t===`npm`||t===`react`)&&V(`div`,{className:`mb-3`,children:V(S,{code:`npm install @joy-ride/game`,language:`shell`,title:`Install the package`,compact:!0})}),V(S,{code:r.code,language:r.language,title:r.title,compact:!0,maxHeight:210,wrap:t===`html`||t===`bookmarklet`})]}),e.configuration&&e.onConfigure&&V(Ne,{value:e.configuration,onChange:e.onConfigure})]})}export{Pe as EmbedPanel};
1
+ import{t as e}from"./configuration~react~vehicle-popover~EmbedPanel~Documentation~JoyRideView~browser-session-co~fvauaeow-C39ouO-X.js";import{a as t,i as n,r,t as i}from"./configuration~react~vehicle-popover~EmbedPanel~JoyRideView~browser-session-core-BLdLriTd.js";import{N as a,S as o,a as s,c,h as l,l as u,m as d,o as f,u as p,x as m,y as h}from"./X.es-VqSWeM6N.js";import{A as g,L as _,T as v,b as y,m as b,v as x}from"./input-DHpsGB-l.js";import{t as S}from"./CodeBlock-35k1cnjA.js";import{a as C,c as w,f as T,g as E,h as D,i as O,l as k,m as A,n as j,o as M,p as N,r as P,s as F,t as I,v as L,y as R}from"./vehicle-popover-CAG797YN.js";import*as z from"react";import{useState as B}from"react";import{Fragment as ee,jsx as V,jsxs as H}from"react/jsx-runtime";var U=z.createContext(void 0);function W(){let e=z.useContext(U);if(e===void 0)throw Error(h(10));return e}var G={value:()=>null},te=z.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,hiddenUntilFound:a,keepMounted:s,loopFocus:l,onValueChange:u,multiple:d=!1,orientation:f=`vertical`,value:m,defaultValue:h,style:g,..._}=e,v=h??p,y=z.useRef([]),[b,x]=k({controlled:m,default:v,name:`Accordion`,state:`value`}),S=o((e,t,n)=>{let r;r=d?t?[...b,e]:b.filter(t=>t!==e):b[0]===e?[]:[e],u?.(r,n),!n.isCanceled&&x(r)}),C=z.useMemo(()=>({value:b,disabled:i,orientation:f}),[b,i,f]),T=z.useMemo(()=>({disabled:i,handleValueChange:S,hiddenUntilFound:a??!1,keepMounted:s??!1,state:C,value:b}),[i,S,a,s,C,b]),E=c(`div`,e,{state:C,ref:t,props:_,stateAttributesMapping:G});return V(U.Provider,{value:T,children:V(w,{elementsRef:y,children:E})})});function ne(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,disabled:i}=e,[a,s]=k({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:c,setMounted:l,transitionStatus:u}=T(a,!0,!0),d=g(),[f,p]=z.useState(),m=f===null?void 0:f??d,h=o(e=>{let t=!a,n=y(x,e.nativeEvent);r(t,n),!n.isCanceled&&s(t)});return z.useMemo(()=>({defaultPanelId:d,disabled:i,handleTrigger:h,mounted:c,open:a,panelId:m,setMounted:l,setOpen:s,setPanelIdState:p,transitionStatus:u}),[d,i,h,c,a,m,l,s,p,u])}var re=z.createContext(void 0);function ie(){let e=z.useContext(re);if(e===void 0)throw Error(h(15));return e}var K=z.createContext(void 0);function q(){let e=z.useContext(K);if(e===void 0)throw Error(h(9));return e}var ae=`data-open`,oe=`data-closed`,J=L,se=`data-panel-open`,ce={[ae]:``},le={[oe]:``},ue={open(e){return e?{[se]:``}:null}},de={open(e){return e?ce:le}},fe=`data-index`,Y={...de,index:e=>({[fe]:String(e)}),...E,value:()=>null},pe=z.forwardRef(function(e,t){let{className:n,disabled:r=!1,onOpenChange:i,render:a,value:s,style:l,...u}=e,{ref:d,index:f}=F(),{disabled:p,handleValueChange:m,state:h,value:_}=W(),v=g(),y=s??v,b=r||p,x=_.includes(y),S=o((e,t)=>{i?.(e,t),!t.isCanceled&&m(y,e,t)}),C=ne({open:x,onOpenChange:S,disabled:b}),w=z.useMemo(()=>({...C,onOpenChange:S,state:{open:C.open,disabled:C.disabled,transitionStatus:C.transitionStatus}}),[C,S]),T=z.useMemo(()=>({...h,hidden:!x&&!C.mounted,index:f,disabled:b,open:x}),[C.mounted,b,f,x,h]),E=g(),[D,O]=z.useState(),k=D===null?void 0:D??E,A=z.useMemo(()=>({defaultTriggerId:E,open:x,state:T,setTriggerId:O,triggerId:k}),[E,x,T,O,k]),j=c(`div`,e,{state:T,ref:[t,d],props:u,stateAttributesMapping:Y});return V(re.Provider,{value:w,children:V(K.Provider,{value:A,children:j})})}),me=z.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=q();return c(`h3`,e,{state:o,ref:t,props:a,stateAttributesMapping:Y})}),he={...Y,...ue},ge=z.forwardRef(function(e,t){let{disabled:n,className:r,id:i,render:a,nativeButton:o=!0,style:s,...u}=e,{panelId:d,open:f,handleTrigger:p,disabled:h}=ie(),{getButtonProps:g,buttonRef:_}=l({disabled:n||h,native:o}),{defaultTriggerId:v,state:y,setTriggerId:b}=q(),x=i||void 0,S=x??v;return m(()=>(b(e=>x??(e===null?void 0:e)),()=>{b(e=>e===x?null:e)}),[x,b]),c(`button`,e,{state:y,ref:[t,_],props:[{"aria-controls":f?d:void 0,"aria-expanded":f,id:S,onClick:p},u,g],stateAttributesMapping:he})}),X={height:void 0,width:void 0};function _e(e){let{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:i,mounted:a,onOpenChange:s,open:c,setMounted:l,setOpen:u,transitionStatus:f}=e,p=z.useRef(null),h=z.useRef(null),[g,_]=z.useState(X),x=z.useRef(X),S=z.useRef(!1),w=z.useRef(c),T=z.useRef(!1),[E,O]=z.useState(!1),k=z.useRef(null),j=d(t,p),P=C(c),F=A(p),I=!c&&!a,L=E?`idle`:f,R=c&&(w.current||T.current),B=!c&&a&&h.current===`css-animation`&&g.height===void 0&&g.width===void 0?x.current:g,ee=n&&I&&h.current!==`css-animation`,V=o((e,t=!0)=>{t&&(x.current=e),_(e)}),H=o(()=>{k.current?.(),k.current=null}),U=o(e=>{H(),k.current=()=>{k.current=null,e()}}),W=o(()=>{c&&a&&h.current===`css-animation`&&(T.current=!0)});m(()=>{E&&f!==`starting`&&O(!1)},[E,f]),z.useEffect(()=>()=>{W(),H()},[W,H]),m(()=>{c||(w.current=!1,T.current=!1);let e=p.current;if(!e)return;!c&&k.current&&H();let t=ve(e,R);if(h.current=t,c&&f===`idle`&&w.current&&t===`css-animation`){x.current=Z(e);return}if(c&&f===`starting`){let n=S.current;if(S.current=!1,t===`none`){V(Z(e)),O(!0);return}if(t===`css-transition`){let t=be(e);if(V(Z(e)),!n)return t;let r=Q(e,`transition-duration`,`0s`);return U(r),O(!0),t}V(Z(e));let r=Q(e,`animation-name`,`none`);if(!n){r();return}let i=Q(e,`animation-duration`,`0s`);r(),U(i),O(!0);return}if(!c&&a&&(f===`idle`||f===`starting`)){if(t===`none`){V(X,!1),l(!1);return}V(Z(e));return}if(f!==`ending`)return;if(t===`none`){l(!1);return}let n=Z(e);n.height>0||n.width>0?(V(n),t===`css-animation`&&Q(e,`animation-name`,`none`)()):l(!1)},[a,c,H,V,l,U,R,f]),N({enabled:c&&a&&L===`idle`,open:!0,ref:p,onComplete(){c&&V(X,!1)}}),z.useEffect(()=>{if(c||!a||L!==`ending`)return;if(!p.current){l(!1),V(X,!1);return}let e=new AbortController,t=-1;function n(){P.current||(l(!1),V(X,!1))}return t=D.request(()=>{F(n,e.signal)}),()=>{D.cancel(t),e.abort()}},[P,a,c,L,F,V,l]),m(()=>{let e=p.current;e&&n&&I&&e.setAttribute(`hidden`,`until-found`)},[I,n]),z.useEffect(function(){let e=p.current;if(!e)return;let t=v.create(),n=-1,r=(r,i)=>{t.start(0,()=>{P.current||(n=D.request(()=>{P.current||(r&&(S.current=!1),i&&e.setAttribute(J,``),e.setAttribute(`hidden`,`until-found`))}))})},i=M(e,`beforematch`,t=>{let n=y(b,t);if(s(!0,n),n.isCanceled){r(!1,!1);return}S.current=!0;let i=e.hasAttribute(J);e.removeAttribute(J),u(!0),r(!0,i)});return()=>{t.clear(),D.cancel(n),i()}},[P,s,u]);let G=i||n||a||c;return{height:B.height,props:{...ee?{[J]:``}:void 0,hidden:I,id:r},ref:j,shouldPreventOpenAnimation:R,shouldRender:G,transitionStatus:L,width:B.width}}function Z(e){return{height:e.scrollHeight,width:e.scrollWidth}}function ve(e,t){let n=a(e).getComputedStyle(e),r=(n.animationName.split(`,`).map(e=>e.trim()).some(e=>e!==``&&e!==`none`)||t)&&ye(n.animationDuration),i=ye(n.transitionDuration);return r&&i||i?`css-transition`:r?`css-animation`:`none`}function ye(e){return e.split(`,`).map(e=>e.trim()).some(e=>e!==``&&Number.parseFloat(e)>0)}function Q(e,t,n){let r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{r===``?e.style.removeProperty(t):e.style.setProperty(t,r,i)}}function be(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)});function n(){Object.entries(t).forEach(([t,n])=>{n===``?e.style.removeProperty(t):e.style.setProperty(t,n)})}let r=D.request(n);return()=>{D.cancel(r),n()}}var xe=`--accordion-panel-height`,Se=`--accordion-panel-width`,Ce=z.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,id:a,render:o,style:s,...l}=e,{hiddenUntilFound:d,keepMounted:f}=W(),{defaultPanelId:p,mounted:h,onOpenChange:g,open:_,setMounted:v,setOpen:y,setPanelIdState:b,transitionStatus:x}=ie(),S=r??d,C=i??f,w=a||void 0,T=a??p;m(()=>(b(e=>w??(e===null?void 0:e)),()=>{b(e=>e===w?null:e)}),[w,b]);let{height:E,props:D,ref:O,shouldPreventOpenAnimation:k,shouldRender:A,transitionStatus:j,width:M}=_e({externalRef:t,hiddenUntilFound:S,id:T,keepMounted:C,mounted:h,onOpenChange:g,open:_,setMounted:v,setOpen:y,transitionStatus:x}),{state:N,triggerId:P}=q(),F={...N,transitionStatus:j},I=u(s,F),L=c(`div`,{...e,style:void 0},{state:F,ref:O,props:[D,{"aria-labelledby":P,role:`region`,style:{[xe]:E===void 0?`auto`:`${E}px`,[Se]:M===void 0?`auto`:`${M}px`}},l,I?{style:I}:void 0,k?{style:{animationName:`none`}}:void 0],stateAttributesMapping:Y});return A?L:null});function we({className:e,...t}){return V(te,{"data-slot":`accordion`,className:f(`flex w-full flex-col`,e),...t})}function Te({className:e,...t}){return V(pe,{"data-slot":`accordion-item`,className:f(`not-last:border-b`,e),...t})}function Ee({className:e,children:t,...n}){return V(me,{className:`flex`,children:H(ge,{"data-slot":`accordion-trigger`,className:f(`group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground`,e),...n,children:[t,V(_,{"aria-hidden":`true`,"data-slot":`accordion-trigger-icon`,className:`pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden`}),V(R,{"aria-hidden":`true`,"data-slot":`accordion-trigger-icon`,className:`pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline`})]})})}function De({className:e,children:t,...n}){return V(Ce,{"data-slot":`accordion-content`,className:`overflow-hidden text-sm data-open:animate-accordion-down data-closed:animate-accordion-up`,...n,children:V(`div`,{className:f(`h-(--accordion-panel-height) pt-0 pb-2.5 data-ending-style:h-0 data-starting-style:h-0 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4`,e),children:t})})}function Oe({className:e,size:t=`default`,...n}){return V(`div`,{"data-slot":`card`,"data-size":t,className:f(`group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,e),...n})}function ke({className:e,...t}){return V(`div`,{"data-slot":`card-header`,className:f(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)`,e),...t})}function Ae({className:e,...t}){return V(`div`,{"data-slot":`card-title`,className:f(`font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,e),...t})}function je({className:e,...t}){return V(`div`,{"data-slot":`card-description`,className:f(`text-sm text-muted-foreground`,e),...t})}function Me({className:e,...t}){return V(`div`,{"data-slot":`card-action`,className:f(`col-start-2 row-span-2 row-start-1 self-start justify-self-end`,e),...t})}var $={game:{title:`Game`,description:`Visuals, sound, performance, tools, and rules`},dialog:{title:`Dialog`,description:`Appearance, visible tabs, and visitor settings access`}};function Ne({value:a,onChange:o}){let[c,l]=B(),u=r(t(i,a)),d=(e,t,n)=>o({...a,[e]:{...a[e],[t]:n}});return H(`section`,{"aria-label":`Embed options`,className:`space-y-3 py-2 text-xs`,ref:e=>{let t=e?.getRootNode();t instanceof ShadowRoot&&t!==c&&l(t)},children:[V(Oe,{size:`sm`,className:`gap-0 bg-muted/30`,children:H(ke,{className:`grid-cols-[minmax(0,1fr)_auto] items-center gap-x-3`,children:[V(Ae,{children:`Configure your embed`}),V(je,{children:`Choose the experience and what visitors can change.`}),V(Me,{children:V(s,{variant:`outline`,size:`sm`,onClick:()=>{let e={...a};for(let t of Object.keys(n))Object.assign(e,{[t]:{...e[t],...n[t]}});o(e)},children:`Use SFW defaults`})})]})}),V(we,{defaultValue:[],className:`gap-2`,children:Object.keys($).map(t=>H(Te,{value:t,className:`rounded-lg border bg-card/40 px-3`,children:[V(Ee,{className:`py-3 hover:no-underline`,children:H(`span`,{className:`grid gap-1`,children:[V(`span`,{children:$[t].title}),V(`span`,{className:`text-[11px] font-normal text-muted-foreground`,children:$[t].description})]})}),V(De,{children:V(`div`,{className:`divide-y border-t`,children:e.filter(e=>e.category===t).map(e=>{let t=`embed-${e.category}-${e.key}`,n=u[e.category][e.key],r=[`hint`,`tabs`].includes(e.control);return H(`div`,{className:r?`grid gap-3 py-3`:`flex items-center justify-between gap-4 py-3`,children:[H(`label`,{htmlFor:t,className:`grid min-w-0 gap-1 font-medium`,children:[V(`span`,{children:e.label}),e.help&&V(`span`,{className:`max-w-72 font-normal text-muted-foreground`,children:e.help})]}),V(O,{id:t,entry:e,value:n,container:c,onChange:t=>d(e.category,e.key,t)})]},e.key)})})})]},t))})]})}function Pe({embed:e}){let[t,n]=B(`html`),r={html:{code:e.html,language:`html`,title:`HTML embed`},async:{code:e.async,language:`javascript`,title:`CDN`},npm:{code:e.npm,language:`javascript`,title:`JavaScript`},react:{code:e.react??``,language:`tsx`,title:`React`},bookmarklet:{code:e.bookmarklet,language:`javascript`,title:`Bookmarklet URL`}}[t];return H(`section`,{className:`min-h-full px-3 py-2.5 text-sm`,children:[e.error?V(`p`,{role:`alert`,children:e.error}):H(ee,{children:[V(I,{value:t,onValueChange:e=>n(e),className:`my-2.5 gap-0`,children:H(j,{className:`w-full`,"aria-label":`Embed format`,children:[V(P,{value:`html`,className:`text-sm`,children:`HTML`}),V(P,{value:`async`,className:`text-sm`,children:`CDN`}),V(P,{value:`npm`,className:`text-sm`,children:`JavaScript`}),V(P,{value:`react`,className:`text-sm`,disabled:!e.react,children:`React`}),V(P,{value:`bookmarklet`,className:`text-sm`,children:`Bookmarklet`})]})}),(t===`npm`||t===`react`)&&V(`div`,{className:`mb-3`,children:V(S,{code:`npm install @joy-ride/game`,language:`shell`,title:`Install the package`,compact:!0})}),V(S,{code:r.code,language:r.language,title:r.title,compact:!0,maxHeight:210,wrap:t===`html`||t===`bookmarklet`})]}),e.configuration&&e.onConfigure&&V(Ne,{value:e.configuration,onChange:e.onConfigure})]})}export{Pe as EmbedPanel};
@@ -0,0 +1 @@
1
+ import{n as e}from"./configuration~react~vehicle-popover~EmbedPanel~Documentation~JoyRideView~browser-session-co~fvauaeow-C39ouO-X.js";import{t}from"./runtime~react~JoyRideView~browser-session-core-BRSYGakW.js";import{r as n}from"./controls~react~vehicle-popover~JoyRideView~browser-session-core~renderer-Cnf30Q_A.js";import{t as r}from"./controls~react~vehicle-popover~Documentation~JoyRideView~browser-session-core-QxIfuAPb.js";import{n as i}from"./runtime~JoyRideView~browser-session-core-Del73NUd.js";import{t as a}from"./VehicleHint-BaLJr7O5.js";import{n as o,t as s}from"./theme-CyUONXaD.js";import{a as c,i as l,n as u,r as d,t as f}from"./X.es-VqSWeM6N.js";import*as p from"react";import{forwardRef as m,useEffect as h,useImperativeHandle as g,useLayoutEffect as _,useMemo as v,useRef as y,useState as b}from"react";import{createPortal as x}from"react-dom";import{Fragment as S,jsx as C,jsxs as w}from"react/jsx-runtime";var T={steer:0,gas:!1,brake:!1,boost:!1,handbrake:!1},E={position:`fixed`,bottom:`calc(var(--joy-ride-controls-bottom, 0px) + max(18px, env(safe-area-inset-bottom)))`,zIndex:n(`controls`),touchAction:`none`,userSelect:`none`,WebkitUserSelect:`none`,color:`#f4f4f0`,fontFamily:`Arial, sans-serif`},D={border:`1px solid rgba(255,255,255,.38)`,background:`rgba(24,26,29,.84)`,color:`inherit`,boxShadow:`0 4px 16px #0005`,touchAction:`none`,cursor:`pointer`};function O({onChange:e}){let[t,n]=b(!1),[i,a]=b(T),o=y(T),s=y(null),l=y(e);l.current=e,h(()=>{let e=window.matchMedia(`(pointer: coarse) and (max-width: 850px)`),t=()=>n(e.matches);return t(),e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]);let u=e=>{let t={...o.current,...e};o.current=t,a(t),l.current({...r(t.gas,t.brake),steer:t.steer,action:t.handbrake,boost:t.boost})};if(h(()=>{let e=()=>{s.current=null,o.current=T,a(T),l.current({throttle:0,steer:0,action:!1,boost:!1})};return window.addEventListener(`blur`,e),()=>{window.removeEventListener(`blur`,e),e()}},[]),!t)return null;let d=e=>{let t=e.currentTarget.getBoundingClientRect(),n=t.width/2;u({steer:Math.max(-1,Math.min(1,(n-(e.clientX-t.left))/(n*.72)))})},f=(e,t,n,r)=>C(c,{type:`button`,"aria-label":t,"aria-pressed":i[e],onPointerDown:t=>{t.preventDefault(),t.currentTarget.setPointerCapture(t.pointerId),u({[e]:!0})},onPointerUp:t=>{t.preventDefault(),u({[e]:!1})},onPointerCancel:()=>u({[e]:!1}),onLostPointerCapture:()=>u({[e]:!1}),style:{...D,gridArea:r,width:62,height:62,borderRadius:16,background:i[e]?`rgba(90,94,98,.96)`:D.background,display:`grid`,placeItems:`center`,lineHeight:1,fontSize:10,fontWeight:700,letterSpacing:`.08em`,textTransform:`uppercase`},children:w(`span`,{style:{display:`grid`,gap:3,justifyItems:`center`},children:[C(`span`,{"aria-hidden":`true`,style:{fontSize:20,lineHeight:1},children:n}),t]})});return w(`div`,{"data-jr-touch-controls":``,"aria-label":`Touch driving controls`,children:[C(`div`,{style:{...E,left:`max(16px, env(safe-area-inset-left))`},children:w(`div`,{role:`slider`,"aria-label":`Steering`,"aria-valuemin":-100,"aria-valuemax":100,"aria-valuenow":Math.round(-i.steer*100),tabIndex:0,onKeyDown:e=>{e.key===`ArrowLeft`&&(e.preventDefault(),u({steer:1})),e.key===`ArrowRight`&&(e.preventDefault(),u({steer:-1}))},onKeyUp:e=>{(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&u({steer:0})},onPointerDown:e=>{e.preventDefault(),s.current=e.pointerId,e.currentTarget.setPointerCapture(e.pointerId),d(e)},onPointerMove:e=>{s.current===e.pointerId&&d(e)},onPointerUp:e=>{s.current===e.pointerId&&(s.current=null,u({steer:0}))},onPointerCancel:()=>{s.current=null,u({steer:0})},style:{...D,width:116,height:116,borderRadius:`50%`,position:`relative`,display:`grid`,placeItems:`center`},children:[C(`span`,{"aria-hidden":`true`,style:{position:`absolute`,top:14,fontSize:10,fontWeight:700,letterSpacing:`.1em`,opacity:.8},children:`STEER`}),C(`span`,{"aria-hidden":`true`,style:{width:48,height:48,borderRadius:`50%`,background:`#d1d3d2`,boxShadow:`0 2px 8px #0008`,transform:`translateX(${-i.steer*27}px)`,pointerEvents:`none`}})]})}),w(`div`,{style:{...E,right:`max(16px, env(safe-area-inset-right))`,display:`grid`,gridTemplateAreas:`"boost gas" "handbrake brake"`,gap:8},children:[f(`boost`,`Boost`,C(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,children:C(`path`,{d:`M13.7 2 5 13h6l-.7 9L19 10h-6l.7-8Z`})}),`boost`),f(`gas`,`Gas`,`↑`,`gas`),f(`handbrake`,`Drift`,`↺`,`handbrake`),f(`brake`,`Brake`,`↓`,`brake`)]})]})}var k=new Map([[`bold`,p.createElement(p.Fragment,null,p.createElement(`path`,{d:`M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z`}))],[`duotone`,p.createElement(p.Fragment,null,p.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),p.createElement(`path`,{d:`M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z`}))],[`fill`,p.createElement(p.Fragment,null,p.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z`}))],[`light`,p.createElement(p.Fragment,null,p.createElement(`path`,{d:`M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z`}))],[`regular`,p.createElement(p.Fragment,null,p.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z`}))],[`thin`,p.createElement(p.Fragment,null,p.createElement(`path`,{d:`M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z`}))]]),A=p.forwardRef((e,t)=>p.createElement(l,{ref:t,...e,weights:k}));A.displayName=`InfoIcon`;var j=m(function({visible:e=!0,className:t=``,children:n,...r},i){return C(`div`,{ref:i,role:`toolbar`,"data-jr-toolbar":``,"data-visible":e,className:`inline-flex items-center gap-0.5 transition-opacity duration-150 ease-out data-[visible=false]:pointer-events-none data-[visible=false]:opacity-0 ${t}`,...r,children:n})});function M({iconOnly:e=!1,className:t=``,children:n,...r}){return C(c,{type:`button`,variant:`ghost`,size:e?`icon-xs`:`xs`,className:`h-[25px] min-h-[25px] rounded-sm border-0 bg-[#202326] px-2 text-[10px] font-semibold text-white shadow-[0_3px_10px_#0004] hover:bg-[#34383b] hover:text-white focus-visible:ring-white/40 [&_svg]:size-[13px] ${e?`w-[25px] p-0`:``} ${t}`,...r,children:n})}var N=o(s);function P(e,r){let i=y(e);i.current=e;let a=y(null),[o,s]=b(null),c=!!e.onExit,l=!!e.overlay&&(c||!!e.onToggleMute||!!e.onControlsHelp);h(()=>{if(!l)return;let e=document.createElement(`joy-ride-vehicle-toolbar`);e.dataset.jrUi=``,e.style.cssText=`position:fixed;left:0;top:0;z-index:${n(`controls`)};pointer-events:none`;let t=e.attachShadow({mode:`open`}),r=document.createElement(`style`);return r.textContent=N,t.append(r),document.body.append(e),s(t),()=>{e.remove(),s(null)}},[l]);let p=e=>t(e=>{let t=r.current?.handle.getPlayground()?.registry;t?t.report(e):console.error(`JoyRide host callback failed`,e)},e);return{adapter:v(()=>({toolbar:()=>a.current,cameraFrame(){let e=Array.from(document.querySelectorAll(`[data-jr-touch-controls] > div`)),t=e.length?Math.min(...e.map(e=>e.getBoundingClientRect().top))-16:window.innerHeight;return e.length?{x:0,y:0,width:window.innerWidth,height:Math.max(160,t)}:null}}),[]),toolbar:e.overlay&&o&&(c||e.onToggleMute||e.onControlsHelp)?x(w(j,{ref:a,"data-jr-ui":``,"aria-label":`Vehicle controls`,visible:!1,inert:!0,className:`fixed pointer-events-auto`,style:{zIndex:n(`controls`)},children:[e.onToggleMute&&C(M,{iconOnly:!0,"aria-label":(e.masterVolume??1)>0?`Mute audio`:`Unmute audio`,onClick:()=>p(i.current.onToggleMute),children:(e.masterVolume??1)>0?C(d,{size:14}):C(u,{size:14})}),e.onControlsHelp&&C(M,{iconOnly:!0,"aria-label":`Open controls help`,title:`Controls help`,onClick:()=>p(i.current.onControlsHelp),children:C(A,{size:14})}),c&&C(M,{iconOnly:!0,"aria-label":`Quit simulation`,onClick:()=>p(i.current.onExit),children:C(f,{size:14})})]}),o):null}}function F({ref:e,overlayRoot:t,className:n,style:r,onControlsHelp:i,...a}){return a}var I=t=>r=>{let o=r,[s,c]=b(!1),[l,u]=b(!1),d={...F(r),...r.requireFocus?{onDriveInput:()=>{r.hint&&(r.hint.dismiss??`move`)===`move`&&u(!0),r.onDriveInput?.()},onCarClick:e=>{r.hint&&r.hint.dismiss===`click`&&u(!0),r.onCarClick?.(e)}}:{},onFocusChange:e=>{c(e),e&&u(!1),r.onFocusChange?.(e)}},{ref:f,overlay:p=i.overlay,overlayRoot:m,className:h,style:v,mode:T,initialMode:E=i.initialMode,paused:D=i.paused,showTouchControls:k=i.showTouchControls}=o,A=y(null),j=y(null),M=y(d);M.current=d;let N=P(o,j);_(()=>{if(!A.current)return;let e=t(A.current,M.current,N.adapter);return j.current=e,()=>{e.dispose(),j.current=null}},[N.adapter]),g(f,()=>j.current.handle,[]),_(()=>{j.current?.update(d)});let I=typeof o.requireFocus==`object`&&{...e,...o.requireFocus},L=s?o.hint:I,R=o.requireFocus&&L&&C(a,{hint:L,active:!s||!l,getAnchor:()=>{if(p)return j.current?.handle.getCarAnchor()??null;let e=A.current?.getBoundingClientRect();return e?{x:e.x+window.scrollX,y:e.y+window.scrollY,width:e.width,height:e.height}:null},overlayRoot:m},s?`focused`:`unfocused`),z=!!o.requireFocus||!!o.autoFocus,B=C(`canvas`,{ref:A,className:h,style:{display:`block`,width:p?void 0:`100%`,height:p?void 0:`100%`,outline:`none`,touchAction:`none`,...v,...p?{position:`absolute`,zIndex:n(`world`),pointerEvents:`none`}:{}},"data-jr-overlay":p?``:void 0,"data-jr-play-area":z?``:void 0,tabIndex:p&&!z?-1:0,"aria-label":z?`Joy Ride driving area. Use arrow keys or WASD to drive. Tab returns to the page.`:`Joy Ride vehicle simulation`});return p&&typeof document<`u`?w(S,{children:[x(w(S,{children:[B,k&&!D&&(T??E)===`car`&&C(O,{onChange:e=>j.current?.touchChange(e)})]}),m??document.body),N.toolbar,R]}):w(S,{children:[B,R]})};export{I as createJoyRide};
@@ -0,0 +1 @@
1
+ import{r as e}from"./configuration~react~vehicle-popover~EmbedPanel~Documentation~JoyRideView~browser-session-co~fvauaeow-C39ouO-X.js";import{r as t}from"./controls~react~vehicle-popover~JoyRideView~browser-session-core~renderer-Cnf30Q_A.js";import{useEffect as n,useRef as r,useState as i}from"react";import{createPortal as a}from"react-dom";import{jsx as o}from"react/jsx-runtime";function s({hint:s,active:c,getAnchor:l,overlayRoot:u}){let[d,f]=i(!1),[p,m]=i(null),h=r(l),g=r(null);h.current=l;let _=s!==!1,v=s?s.showAfter:void 0,y=s?s.placement??e.placement:`bottom`;if(n(()=>{if(!c||!_){f(!1);return}g.current=h.current(),m(g.current),f(!1);let t=v??e.showAfter,n=window.setTimeout(()=>f(!0),t);return()=>window.clearTimeout(n)},[c,_,v]),n(()=>{if(!d)return;let e=0,t=()=>{let n=h.current(),r=g.current;(r?.x!==n?.x||r?.y!==n?.y||r?.width!==n?.width||r?.height!==n?.height)&&(g.current=n,m(n)),e=requestAnimationFrame(t)};return e=requestAnimationFrame(t),()=>{cancelAnimationFrame(e)}},[d]),!s||!p||typeof document>`u`)return null;let b=p.x,x=p.y,S=b+p.width/2,C=x+p.height/2,w=y===`top`?{left:S,top:x-24}:y===`left`?{left:b-24,top:C}:y===`right`?{left:b+p.width+24,top:C}:{left:S,top:x+p.height+24};return a(o(`p`,{className:`jr-vehicle-hint`,"data-placement":y,"data-visible":d&&c?``:void 0,"data-jr-ui":``,role:`note`,"aria-hidden":!d||!c,"aria-label":s.text??`Use the arrow keys to drive`,style:{...w,zIndex:t(`controls`)},children:s.text??e.text}),u??document.body)}export{s as t};
@@ -1 +1 @@
1
- import{a as e}from"./configuration~react~vehicle-popover~EmbedPanel~Documentation~JoyRideView~browser-session-co~fvauaeow-mgPW9A8j.js";import{l as t}from"./configuration~react~vehicle-popover~JoyRideView~browser-session-core~renderer-CPZkP_Db.js";import{t as n}from"./definitions~react~vehicle-popover~Documentation~JoyRideView~browser-session-core-DcDccU8O.js";import{i as r,r as i,t as a}from"./configuration~react~vehicle-popover~EmbedPanel~JoyRideView~browser-session-core-rFMaxKZs.js";import{r as o}from"./definitions~react~browser-session-core-Bc5BhqaX.js";import{t as s}from"./configuration~react~browser-session-core-Ca4_fO4n.js";var c=e=>!!e&&typeof e==`object`&&!Array.isArray(e);function l(e,t){if(Object.is(e,t))return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((e,n)=>l(e,t[n]));if(!c(e)||!c(t))return!1;let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>l(e[n],t[n]))}var u=e=>Object.fromEntries(Object.entries(e).filter(([e])=>e!==`id`&&e!==`base`));function d(e,t){if(l(e,t))return;if(!c(e)||!c(t))return e;let n=Object.fromEntries(Object.entries(e).map(([e,n])=>[e,d(n,t[e])]).filter(([,e])=>e!==void 0));return Object.keys(n).length?n:void 0}function f(e){let n=Object.values(t),r=n.find(t=>t.id===e.base);if(!r)return e;let i=o(r,e),a=e;for(let e of n){let t=Object.fromEntries(Object.entries(i).filter(([t,n])=>t!==`id`&&t!==`base`&&!l(n,e[t]))),n={base:e.id,...t};l(u(o(e,n)),u(i))&&JSON.stringify(n).length<JSON.stringify(a).length&&(a=n)}return a}function p(e,t){let r=[],i=new Set,a=e;for(;t?.vehicles?.[a]&&!i.has(a);){i.add(a);let e=t.vehicles[a];r.unshift(e),a=e.base}return o({slots:n},...r.map(e=>({slots:e.slots}))).slots}function m(e){let t=i(a),n=d({game:e.game,dialog:e.dialog},t),r=e.definitions?{...Object.fromEntries(Object.entries(e.definitions).filter(([,e])=>Object.keys(e??{}).length)),...e.definitions.vehicles?{vehicles:Object.fromEntries(Object.entries(e.definitions.vehicles).map(([e,t])=>[e,f(t)]))}:{}}:void 0,o=e.player?p(e.player.vehicle,r):void 0,s=e.player?{vehicle:e.player.vehicle,...e.player.appearance&&e.player.appearance!==`auto`?{appearance:e.player.appearance}:{},...e.player.slots?{slots:Object.fromEntries(Object.entries(e.player.slots).filter(([e,t])=>!l(t,o?.[e])))}:{}}:void 0;return s?.slots&&!Object.keys(s.slots).length&&delete s.slots,{...e.audioSet&&e.audioSet!=="default"?{audioSet:e.audioSet}:{},...e.persist&&(e.persist.vehicle===!1||e.persist.audio===!1)?{persist:e.persist}:{},...r&&Object.values(r).some(e=>Object.keys(e??{}).length)?{definitions:r}:{},...s?{player:s}:{},...e.bindings?.length?{bindings:e.bindings}:{},...e.objectives&&Object.keys(e.objectives).length?{objectives:e.objectives}:{},...e.routes&&Object.keys(e.routes).length?{routes:e.routes}:{},...e.entry?{entry:e.entry}:{},...n}}var h={sfw:r};function g(t,n={}){let r=h[t];if(!r)throw RangeError(`Unknown Joy Ride preset: ${t}`);let i={...r,...n};for(let t of e)(r[t]||n[t])&&Object.assign(i,{[t]:{...r[t],...n[t]}});return i}var _=Object.freeze({object:Object.freeze([...s]),entry:Object.freeze([`data-jr-entry`,`data-jr-entry-angle-rad`,`data-jr-entry-distance-px`,`data-jr-entry-fade-fraction`,`data-jr-entry-steer`,`data-jr-entry-delay-ms`,`data-jr-entry-speed-mps`]),script:Object.freeze([`data-jr-mount`,`data-jr-mount-preset`,`data-jr-dialog-theme`,`data-jr-accent-color`,`data-jr-dialog-font-family`,`data-jr-persist-vehicle`,`data-jr-persist-audio`,`data-jr-unmount`]),objective:Object.freeze([`data-jr-objective`,`data-jr-objective-type`,`data-jr-objective-count`,`data-jr-objective-points`,`data-jr-objective-targets`,`data-jr-objective-order`,`data-jr-objective-progress`,`data-jr-objective-event`]),route:Object.freeze([`data-jr-route`,`data-jr-route-order`,`data-jr-route-progress`,`data-jr-route-event`]),presentation:Object.freeze([`data-jr-ui`,`data-jr-foreground`,`data-jr-camera`,`data-jr-camera-zoom`,`data-jr-auto-paint`])}),v=Object.freeze(Object.values(_).flat()),y=Object.freeze([`data-jr-meta-`]);export{m as a,g as i,y as n,_ as r,v as t};
1
+ import{o as e}from"./configuration~react~vehicle-popover~EmbedPanel~Documentation~JoyRideView~browser-session-co~fvauaeow-C39ouO-X.js";import{l as t}from"./configuration~react~vehicle-popover~JoyRideView~browser-session-core~renderer-BwD100vD.js";import{t as n}from"./definitions~react~vehicle-popover~Documentation~JoyRideView~browser-session-core-DcDccU8O.js";import{i as r,r as i,t as a}from"./configuration~react~vehicle-popover~EmbedPanel~JoyRideView~browser-session-core-BLdLriTd.js";import{r as o}from"./definitions~react~browser-session-core-Bc5BhqaX.js";import{t as s}from"./configuration~react~browser-session-core-Ca4_fO4n.js";var c=e=>!!e&&typeof e==`object`&&!Array.isArray(e);function l(e,t){if(Object.is(e,t))return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((e,n)=>l(e,t[n]));if(!c(e)||!c(t))return!1;let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>l(e[n],t[n]))}var u=e=>Object.fromEntries(Object.entries(e).filter(([e])=>e!==`id`&&e!==`base`));function d(e,t){if(l(e,t))return;if(!c(e)||!c(t))return e;let n=Object.fromEntries(Object.entries(e).map(([e,n])=>[e,d(n,t[e])]).filter(([,e])=>e!==void 0));return Object.keys(n).length?n:void 0}function f(e){let n=Object.values(t),r=n.find(t=>t.id===e.base);if(!r)return e;let i=o(r,e),a=e;for(let e of n){let t=Object.fromEntries(Object.entries(i).filter(([t,n])=>t!==`id`&&t!==`base`&&!l(n,e[t]))),n={base:e.id,...t};l(u(o(e,n)),u(i))&&JSON.stringify(n).length<JSON.stringify(a).length&&(a=n)}return a}function p(e,t){let r=[],i=new Set,a=e;for(;t?.vehicles?.[a]&&!i.has(a);){i.add(a);let e=t.vehicles[a];r.unshift(e),a=e.base}return o({slots:n},...r.map(e=>({slots:e.slots}))).slots}function m(e){let t=i(a),n=d({game:e.game,dialog:e.dialog},t),r=e.definitions?{...Object.fromEntries(Object.entries(e.definitions).filter(([,e])=>Object.keys(e??{}).length)),...e.definitions.vehicles?{vehicles:Object.fromEntries(Object.entries(e.definitions.vehicles).map(([e,t])=>[e,f(t)]))}:{}}:void 0,o=e.player?p(e.player.vehicle,r):void 0,s=e.player?{vehicle:e.player.vehicle,...e.player.appearance&&e.player.appearance!==`auto`?{appearance:e.player.appearance}:{},...e.player.slots?{slots:Object.fromEntries(Object.entries(e.player.slots).filter(([e,t])=>!l(t,o?.[e])))}:{}}:void 0;return s?.slots&&!Object.keys(s.slots).length&&delete s.slots,{...e.audioSet&&e.audioSet!=="default"?{audioSet:e.audioSet}:{},...e.persist&&(e.persist.vehicle===!1||e.persist.audio===!1)?{persist:e.persist}:{},...r&&Object.values(r).some(e=>Object.keys(e??{}).length)?{definitions:r}:{},...s?{player:s}:{},...e.bindings?.length?{bindings:e.bindings}:{},...e.objectives&&Object.keys(e.objectives).length?{objectives:e.objectives}:{},...e.routes&&Object.keys(e.routes).length?{routes:e.routes}:{},...e.entry?{entry:e.entry}:{},...n}}var h={sfw:r};function g(t,n={}){let r=h[t];if(!r)throw RangeError(`Unknown Joy Ride preset: ${t}`);let i={...r,...n};for(let t of e)(r[t]||n[t])&&Object.assign(i,{[t]:{...r[t],...n[t]}});return i}var _=Object.freeze({object:Object.freeze([...s]),entry:Object.freeze([`data-jr-entry`,`data-jr-entry-angle-rad`,`data-jr-entry-distance-px`,`data-jr-entry-fade-fraction`,`data-jr-entry-steer`,`data-jr-entry-delay-ms`,`data-jr-entry-speed-mps`]),script:Object.freeze([`data-jr-mount`,`data-jr-mount-preset`,`data-jr-dialog-theme`,`data-jr-accent-color`,`data-jr-dialog-font-family`,`data-jr-persist-vehicle`,`data-jr-persist-audio`,`data-jr-unmount`]),objective:Object.freeze([`data-jr-objective`,`data-jr-objective-type`,`data-jr-objective-count`,`data-jr-objective-points`,`data-jr-objective-targets`,`data-jr-objective-order`,`data-jr-objective-progress`,`data-jr-objective-event`]),route:Object.freeze([`data-jr-route`,`data-jr-route-order`,`data-jr-route-progress`,`data-jr-route-event`]),presentation:Object.freeze([`data-jr-ui`,`data-jr-foreground`,`data-jr-camera`,`data-jr-camera-zoom`,`data-jr-auto-paint`])}),v=Object.freeze(Object.values(_).flat()),y=Object.freeze([`data-jr-meta-`]);export{m as a,g as i,y as n,_ as r,v as t};
@@ -0,0 +1 @@
1
+ function e(t){if(t&&typeof t==`object`&&!(typeof Node<`u`&&t instanceof Node)){for(let n of Object.values(t))e(n);Object.freeze(t)}return t}var t=[`vehicle`,`objects`,`weapons`,`controls`,`settings`,`embed`,`documentation`],n=[`bottom`,`top`,`left`,`right`],r=[`move`,`click`],i=Object.freeze({showAfter:1e3,placement:`bottom`,text:`↑ ← ↓ →`,dismiss:`move`}),a=Object.freeze({...i,showAfter:0,text:`Click or Tab to the vehicle to drive`,dismiss:`click`}),o=[`game`,`dialog`];function s(e,t,n){return{storage:e,default:t,control:`toggle`,valid:e=>typeof e==`boolean`,...n}}function c(e,t,n,r){return{storage:e,default:t,choices:n,control:`select`,valid:e=>typeof e==`string`&&n.includes(e),...r}}function l(e,t,n,r,i,a){return{storage:e,default:t,min:n,max:r,step:i,control:`number`,valid:e=>typeof e==`number`&&Number.isFinite(e)&&e>=n&&e<=r,...a}}function u(e,t,n,r=!1){return{storage:e,default:t,control:r?`color`:`text`,valid:e=>typeof e==`string`&&(r?/^#[\da-f]{6}$/i.test(e):!!e.trim()),...n}}function d(e,t,n=!1){return{...u(e,``,t,n),default:void 0,valid:e=>e===void 0||typeof e==`string`&&(n?/^#[\da-f]{6}$/i.test(e):!!e.trim())}}function f(e,t,n,r){return{storage:e,default:t,choices:t,control:n,valid:e=>Array.isArray(e)&&e.every(e=>typeof e==`string`&&t.includes(e)),...r}}function p(e){if(e===!1)return!0;if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;return Object.keys(t).every(e=>[`showAfter`,`placement`,`text`,`dismiss`].includes(e))&&(t.showAfter===void 0||typeof t.showAfter==`number`&&Number.isFinite(t.showAfter)&&t.showAfter>=0)&&(t.placement===void 0||n.includes(t.placement))&&(t.text===void 0||typeof t.text==`string`)&&(t.dismiss===void 0||r.includes(t.dismiss))}var m={game:{masterVolume:l(`field`,1,0,1,.05,{label:`Volume`,description:`Set the master audio volume.`}),idleSound:s(`field`,!0,{label:`Idle sound`,description:`Play engine audio while the vehicle is idle.`}),quality:c(`field`,`high`,[`high`,`medium`,`low`],{label:`Quality`,description:`Choose the rendering quality for smoke, fire, and liquids.`}),tireSmoke:s(`field`,!0,{label:`Tire smoke`,description:`Show smoke from the tires.`}),vehicleShadows:s(`field`,!0,{label:`Vehicle shadows`,description:`Draw shadows beneath vehicles.`}),sparks:s(`field`,!0,{label:`Collision sparks`,description:`Show sparks when vehicles collide.`}),deform:s(`field`,!0,{label:`Vehicle deformation`,help:`Visual body deformation from collisions.`}),screenShake:s(`field`,!0,{label:`Screen shake`,description:`Shake the view during impacts and tool effects.`}),surfaceTone:c(`field`,`auto`,[`auto`,`light`,`dark`],{label:`Surface contrast`,description:`Adapt tire marks to light or dark page backgrounds.`}),debug:s(`field`,!1,{label:`Diagnostics`,description:`Show renderer diagnostics.`}),showHealthBars:s(`field`,!0,{label:`Health bars`,description:`Show vehicle health bars.`}),showVehicleMarkers:s(`field`,!0,{label:`Offscreen vehicle pointers`,description:`Point toward vehicles outside the view.`}),underglow:d(`lighting`,{label:`Underglow`,description:`Set a six-digit hex glow color, or leave unset to disable it.`},!0),underglowOpacity:l(`lighting`,.6,0,1,.05,{label:`Glow opacity`,description:`Set the strength of the underglow.`}),headlights:s(`lighting`,!0,{label:`Headlights`,description:`Enable the front lights.`}),taillights:s(`lighting`,!0,{label:`Taillights`,description:`Enable the rear lights.`}),brakeLights:s(`lighting`,!0,{label:`Brake lights`,description:`Brighten the rear lights while braking.`}),vehicleDestructible:s(`field`,!0,{label:`Vehicle damage`,description:`Allow vehicles to take damage.`}),toolsEnabled:s(`field`,!0,{label:`Tools`,description:`Enable or disable vehicle tools. Boost stays available.`}),viewportWalls:s(`field`,!0,{label:`Viewport walls`,help:`Keep vehicles inside the visible screen.`}),autoPaint:s(`field`,!1,{label:`Automatic paint`,help:`Turn small colored page elements into paint.`}),showToolbar:s(`field`,!0,{label:`Vehicle hover toolbar`,description:`Show quick controls when hovering over the vehicle.`,visitor:!1}),requireFocus:{storage:`field`,default:!1,control:`hint`,label:`Require focus`,description:`Drive only while focused. Use true without a hint, or a hint object to show guidance while unfocused.`,visitor:!1,valid:e=>typeof e==`boolean`||p(e)},autoFocus:s(`field`,!1,{label:`Autofocus`,description:`Focus the driving area once on mount without scrolling. Later updates do not reclaim focus.`,visitor:!1}),hint:{storage:`field`,default:!1,control:`hint`,label:`Vehicle hint`,description:`Show a hint after arrival, or false to keep it hidden.`,visitor:!1,valid:p}},dialog:{showTouchControls:s(`field`,!0,{label:`Touch controls`,description:`Show the driving controls on touch devices.`,visitor:!1}),dialogTheme:c(`field`,`auto`,[`auto`,`light`,`dark`],{label:`Theme`,description:`Match the page theme or choose light or dark.`,visitor:!1}),showGameSettings:s(`field`,!0,{label:`Show game settings`,help:`Show the settings tab. Vehicle switching, driving, and reset stay available when off.`,visitor:!1}),vehicleTabs:f(`field`,t,`tabs`,{label:`Visible tabs`,description:`Choose which tabs appear in the vehicle dialog.`,visitor:!1}),showLogo:s(`field`,!0,{label:`Joy Ride logo`,description:`Show the Joy Ride logo in the dialog.`,visitor:!1}),showGithub:s(`field`,!0,{label:`GitHub link`,description:`Show the GitHub link in the dialog.`,visitor:!1}),accentColor:d(`field`,{label:`Accent color`,description:`Set the dialog accent using six-digit hex.`,visitor:!1},!0),dialogFontFamily:d(`field`,{label:`Dialog font`,description:`Set a CSS font family; inherit uses the page font.`,visitor:!1}),showVehicleNames:s(`field`,!0,{label:`Vehicle names`,description:`Show vehicle names in the dialog.`,visitor:!1})}},h=Object.entries(m).flatMap(([e,t])=>Object.entries(t).map(([t,n])=>({...n,key:t,category:e}))),g=e(Object.fromEntries(o.map(e=>[e,Object.fromEntries(h.filter(t=>t.category===e).map(e=>[e.key,structuredClone(e.default)]))])));e(m),e(h);export{g as a,n as c,t as i,e as l,a as n,o,i as r,r as s,h as t};
@@ -1 +1 @@
1
- import{a as e,c as t,t as n}from"./configuration~react~vehicle-popover~EmbedPanel~Documentation~JoyRideView~browser-session-co~fvauaeow-mgPW9A8j.js";import{n as r}from"./configuration~react~vehicle-popover~EmbedPanel~JoyRideView~browser-session-core~renderer-Bo9KSudc.js";var i={lighting:{}};for(let e of n){let t=e.storage===`lighting`?i.lighting:i;t[e.key]=structuredClone(e.default)}var a=t(i),o={game:{vehicleDestructible:!1,toolsEnabled:!1,showHealthBars:!1,deform:!1,sparks:!1},dialog:{showVehicleNames:!1,showLogo:!1,showGithub:!1,showGameSettings:!1,vehicleTabs:[`vehicle`,`controls`],accentColor:`#000000`}};function s(i){let a=Object.fromEntries(e.map(e=>[e,{}])),o=r(i.lighting);for(let e of n)a[e.category][e.key]=e.storage===`lighting`?o[e.key]:i[e.key];return t(structuredClone(a))}function c(t,i){if(!i||typeof i!=`object`||Array.isArray(i))throw TypeError(`Runtime options must be an object`);let a={...structuredClone(t),lighting:r(t.lighting)};for(let[t,r]of Object.entries(i)){if(!e.includes(t))throw TypeError(`Unknown runtime option: ${t}`);if(r!==void 0){if(!r||typeof r!=`object`||Array.isArray(r))throw TypeError(`options.${t} must be an object`);for(let[e,i]of Object.entries(r)){let r=n.find(n=>n.category===t&&n.key===e);if(!r)throw TypeError(`Unknown option: ${t}.${e}`);if(i!==void 0||r.default===void 0){if(!r.valid(i))throw TypeError(`Invalid ${e===`dialogTheme`?`dialog theme`:r.label}: ${t}.${e}`);r.storage===`lighting`?a.lighting[e]=i:a[e]=structuredClone(i)}}}}return a}function l(e={}){let t={};for(let r of n){if(r.storage===`lighting`)continue;let n=e[r.key];n!==void 0&&((t[r.category]??={})[r.key]=n)}if(e.lighting!==void 0){if(!e.lighting||typeof e.lighting!=`object`||Array.isArray(e.lighting))throw TypeError(`lighting must be an object`);for(let[r,i]of Object.entries(e.lighting)){let e=n.find(e=>e.storage===`lighting`&&e.key===r);if(!e)throw TypeError(`Unknown lighting option: ${r}`);(t[e.category]??={})[r]=i}}let i=c(a,t);return{...i,lighting:r(i.lighting)}}function u(e,t){let i={};for(let a of n)if(!(a.visitor===!1||a.category===`game`&&!e.showGameSettings)){if(a.storage===`lighting`){let n=t.lighting?.[a.key];Object.hasOwn(t.lighting??{},a.key)&&a.valid(n)&&(i.lighting??=r(e.lighting),i.lighting[a.key]=n)}else{let e=t[a.key];e!==void 0&&a.valid(e)&&(i[a.key]=structuredClone(e))}}return i}export{c as a,o as i,l as n,u as o,s as r,a as t};
1
+ import{l as e,o as t,t as n}from"./configuration~react~vehicle-popover~EmbedPanel~Documentation~JoyRideView~browser-session-co~fvauaeow-C39ouO-X.js";import{n as r}from"./configuration~react~vehicle-popover~EmbedPanel~JoyRideView~browser-session-core~renderer-D5v3L-_1.js";var i={lighting:{}};for(let e of n){let t=e.storage===`lighting`?i.lighting:i;t[e.key]=structuredClone(e.default)}var a=e(i),o={game:{vehicleDestructible:!1,toolsEnabled:!1,showHealthBars:!1,deform:!1,sparks:!1},dialog:{showVehicleNames:!1,showLogo:!1,showGithub:!1,showGameSettings:!1,vehicleTabs:[`vehicle`,`controls`],accentColor:`#000000`}};function s(i){let a=Object.fromEntries(t.map(e=>[e,{}])),o=r(i.lighting);for(let e of n)a[e.category][e.key]=e.storage===`lighting`?o[e.key]:i[e.key];return e(structuredClone(a))}function c(e,i){if(!i||typeof i!=`object`||Array.isArray(i))throw TypeError(`Runtime options must be an object`);let a={...structuredClone(e),lighting:r(e.lighting)};for(let[e,r]of Object.entries(i)){if(!t.includes(e))throw TypeError(`Unknown runtime option: ${e}`);if(r!==void 0){if(!r||typeof r!=`object`||Array.isArray(r))throw TypeError(`options.${e} must be an object`);for(let[t,i]of Object.entries(r)){let r=n.find(n=>n.category===e&&n.key===t);if(!r)throw TypeError(`Unknown option: ${e}.${t}`);if(i!==void 0||r.default===void 0){if(!r.valid(i))throw TypeError(`Invalid ${t===`dialogTheme`?`dialog theme`:r.label}: ${e}.${t}`);r.storage===`lighting`?a.lighting[t]=i:a[t]=structuredClone(i)}}}}return a}function l(e={}){let t={};for(let r of n){if(r.storage===`lighting`)continue;let n=e[r.key];n!==void 0&&((t[r.category]??={})[r.key]=n)}if(e.lighting!==void 0){if(!e.lighting||typeof e.lighting!=`object`||Array.isArray(e.lighting))throw TypeError(`lighting must be an object`);for(let[r,i]of Object.entries(e.lighting)){let e=n.find(e=>e.storage===`lighting`&&e.key===r);if(!e)throw TypeError(`Unknown lighting option: ${r}`);(t[e.category]??={})[r]=i}}let i=c(a,t);return{...i,lighting:r(i.lighting)}}function u(e,t){let i={};for(let a of n)if(!(a.visitor===!1||a.category===`game`&&!e.showGameSettings)){if(a.storage===`lighting`){let n=t.lighting?.[a.key];Object.hasOwn(t.lighting??{},a.key)&&a.valid(n)&&(i.lighting??=r(e.lighting),i.lighting[a.key]=n)}else{let e=t[a.key];e!==void 0&&a.valid(e)&&(i[a.key]=structuredClone(e))}}return i}export{c as a,o as i,l as n,u as o,s as r,a as t};
@@ -1 +1 @@
1
- import{t as e}from"./configuration~react~vehicle-popover~EmbedPanel~Documentation~JoyRideView~browser-session-co~fvauaeow-mgPW9A8j.js";var t=e.filter(e=>e.storage===`lighting`),n=Object.freeze(Object.fromEntries(t.map(e=>[e.key,e.default])));function r(e={}){let n={};for(let r of t){let t=e[r.key];n[r.key]=r.control===`number`&&typeof t==`number`&&Number.isFinite(t)?Math.max(r.min,Math.min(r.max,t)):r.valid(t)?t:r.default}return n}export{r as n,n as t};
1
+ import{t as e}from"./configuration~react~vehicle-popover~EmbedPanel~Documentation~JoyRideView~browser-session-co~fvauaeow-C39ouO-X.js";var t=e.filter(e=>e.storage===`lighting`),n=Object.freeze(Object.fromEntries(t.map(e=>[e.key,e.default])));function r(e={}){let n={};for(let r of t){let t=e[r.key];n[r.key]=r.control===`number`&&typeof t==`number`&&Number.isFinite(t)?Math.max(r.min,Math.min(r.max,t)):r.valid(t)?t:r.default}return n}export{r as n,n as t};
@@ -0,0 +1 @@
1
+ var e=new URL(`../embed-assets/porsche-911-997-top-BE6uRNL4.webp`,import.meta.url).href,t=new URL(`../embed-assets/ford-mustang-gt-top-DVzZTm7G.webp`,import.meta.url).href,n=new URL(`../embed-assets/bmw-m4-top-GKSf0h28.webp`,import.meta.url).href,r=new URL(`../embed-assets/jeep-wrangler-top-Dr43LU9c.webp`,import.meta.url).href,i=new URL(`../embed-assets/subaru-wrx-top-DszueAbm.webp`,import.meta.url).href,a=new URL(`../embed-assets/audi-rs3-top-Zwm7ZQ20.webp`,import.meta.url).href,o=new URL(`../embed-assets/lamborghini-huracan-evo-top-BCJJwrTj.webp`,import.meta.url).href,s=new URL(`../embed-assets/toyota-supra-a80-top-BjqFr9TR.webp`,import.meta.url).href,c=new URL(`../embed-assets/mazda-rx7-fd-top-C3bZMAQw.webp`,import.meta.url).href,l=new URL(`../embed-assets/toyota-gr-corolla-top-dNitaLHl.webp`,import.meta.url).href,u=new URL(`../embed-assets/mazda-mx5-nd-top-CLqHp7ox.webp`,import.meta.url).href,d=new URL(`../embed-assets/ram-2500-top-B653eJDL.webp`,import.meta.url).href,f=new URL(`../embed-assets/nissan-gtr-r35-top-DSpGgr3L.webp`,import.meta.url).href,p=new URL(`../embed-assets/mclaren-720s-top-8TdR01SB.webp`,import.meta.url).href,m=new URL(`../embed-assets/chevrolet-corvette-c8-z06-top-DTz9k7Fu.webp`,import.meta.url).href,h=new URL(`../embed-assets/ferrari-812-superfast-top-C3DkIkN7.webp`,import.meta.url).href,g={xM:-.22,revealM:.36,roundsPerSecond:11,bulletSpeedMps:72,bulletLifetimeSeconds:1.35};function _(e){let t={...g,...e.machineGuns},n=(e,t,n,r)=>Number.isFinite(e)?Math.max(n,Math.min(r,e)):t;return{xM:n(t.xM,g.xM,-e.geometry.lengthM/2+.5,e.geometry.lengthM/2-.5),revealM:n(t.revealM,g.revealM,.12,.5),roundsPerSecond:n(t.roundsPerSecond,g.roundsPerSecond,2,20),bulletSpeedMps:n(t.bulletSpeedMps,g.bulletSpeedMps,20,150),bulletLifetimeSeconds:n(t.bulletLifetimeSeconds,g.bulletLifetimeSeconds,.25,3)}}var v={rangeM:6.5,ignitionSeconds:.45,spreadSeconds:2.2,spreadRadiusPx:24,burnSeconds:4,smokePerSecond:13,jetWidthM:.5,flowRate:1};function y(e){let t={...v,...e.flamethrower},n=(e,t,n,r)=>Number.isFinite(e)?Math.max(n,Math.min(r,e)):t;return{rangeM:n(t.rangeM,v.rangeM,1,12),ignitionSeconds:n(t.ignitionSeconds,v.ignitionSeconds,.1,10),spreadSeconds:n(t.spreadSeconds,v.spreadSeconds,.5,30),spreadRadiusPx:n(t.spreadRadiusPx,v.spreadRadiusPx,0,96),burnSeconds:n(t.burnSeconds,v.burnSeconds,.5,30),smokePerSecond:n(t.smokePerSecond,v.smokePerSecond,0,50),jetWidthM:n(t.jetWidthM,v.jetWidthM,.2,.9),flowRate:n(t.flowRate,v.flowRate,.2,2)}}var b={roundsPerSecond:1.25,launchSpeedMps:18,accelerationMps2:24,maxSpeedMps:44,lifetimeSeconds:3.1,smokePerSecond:22};function x(e){let t={...b,...e.rockets},n=(e,t,n,r)=>Number.isFinite(e)?Math.max(n,Math.min(r,e)):t;return{roundsPerSecond:n(t.roundsPerSecond,b.roundsPerSecond,.25,5),launchSpeedMps:n(t.launchSpeedMps,b.launchSpeedMps,5,60),accelerationMps2:n(t.accelerationMps2,b.accelerationMps2,0,100),maxSpeedMps:n(t.maxSpeedMps,b.maxSpeedMps,10,100),lifetimeSeconds:n(t.lifetimeSeconds,b.lifetimeSeconds,.5,8),smokePerSecond:n(t.smokePerSecond,b.smokePerSecond,0,60)}}var S=[`Classics`,`Sports cars`,`Trucks & off-road`,`Supercars`];function C(e){return{headlights:{xM:e.geometry.lengthM*.4,yM:e.geometry.widthM*.3,...e.lights?.headlights},taillights:{xM:-e.geometry.lengthM*.43,yM:e.geometry.widthM*.3,...e.lights?.taillights}}}var w=12;function T(e){return e.serviceBrakeDecelerationMps2??w}var E={porsche911997:{id:`porsche-911-997`,name:`Porsche 911 (997)`,category:`Classics`,description:`A quick, responsive rear-engine 911 with a naturally aspirated flat-six sound profile.`,make:`Porsche`,model:`911 (997)`,year:`2004–2012`,massKg:1380,frontWeightFraction:.4,sound:{engineId:`flat6`,vehicleId:`sports`,engineLabel:`Simulated flat-six · 3.8 L`,horn:{lowHz:335,highHz:400,tone:`disc`,level:.88}},geometry:{lengthM:5.0695,widthM:2.03,wheelbaseM:2.9627,trackWidthM:1.7518,frontTrackWidthM:1.6641,rearTrackWidthM:1.8396,tireLengthM:.67,tireWidthM:.29,frontAxleXM:1.5252,rearAxleXM:-1.4375},exhaust:{layout:`left-right`,outlets:[{xM:-2.4826,yM:.5684},{xM:-2.5046,yM:-.5684}]},lights:{headlights:{xM:1.9367,yM:.6666},taillights:{xM:-2.2056,yM:.5843}},roofRocket:{xM:-.1756,yM:0,sizeM:.76,panelColor:`#a8b0b3`},machineGuns:{xM:-.22},engineForceN:18500,reversePowerRatio:.72,rollingResistance:39,coastDecelerationMps2:4,handbrakeDecelerationMps2:10.5,lateralResistance:1750,corneringAccelerationMps2:40,maxSteerAngleRad:.67,handbrakeStrength:.68,drift:{entrySpeedMps:4.5,slipAngleRad:.3},launch:{minRpm:2200,boostMps:.6,boostedBoostMps:1.8,assistDurationSeconds:.7,burnoutRampSeconds:1.05,chargedSpinSeconds:1.35,fireLifetimeSeconds:5.3},driveBoost:{gainMps:5.2,durationSeconds:2.6},image:{src:e,crop:{x:53/1024,y:33/512,width:924/1024,height:423/512},bodyWidthRatio:370/423}},fordMustangGt:{id:`ford-mustang-gt-2024`,name:`Ford Mustang GT`,category:`Sports cars`,description:`A burbling V8 muscle car with strong acceleration and a willing rear axle.`,make:`Ford`,model:`Mustang GT`,year:`2024`,massKg:1730,frontWeightFraction:.54,sound:{engineId:`v8cross`,vehicleId:`muscle`,engineLabel:`Simulated cross-plane V8 · 5.0 L`,horn:{lowHz:330,highHz:430,tone:`trumpet`,level:1}},visual:{color:`#cc6249`,shape:`coupe`},geometry:{lengthM:4.8273,widthM:1.92,wheelbaseM:2.9767,trackWidthM:1.6742,tireLengthM:.72,tireWidthM:.3,frontAxleXM:1.5057,rearAxleXM:-1.471,frontTrackWidthM:1.6742,rearTrackWidthM:1.6742},machineGuns:{xM:-.0322},exhaust:{layout:`left-right`,outlets:[{xM:-2.3417,yM:.5376},{xM:-2.3467,yM:-.5376}]},lights:{headlights:{xM:1.9026,yM:.6425},taillights:{xM:-2.235,yM:.5433}},roofRocket:{xM:-.3299,yM:0,sizeM:.82,panelColor:`#777d80`},engineForceN:19500,reversePowerRatio:.7,rollingResistance:42,coastDecelerationMps2:3.7,handbrakeDecelerationMps2:9.2,lateralResistance:1580,corneringAccelerationMps2:35,maxSteerAngleRad:.6,handbrakeStrength:.72,drift:{entrySpeedMps:4,slipAngleRad:.3},launch:{minRpm:2600,boostMps:.5,boostedBoostMps:1.6,assistDurationSeconds:.75,burnoutRampSeconds:1.2,chargedSpinSeconds:1.5,fireLifetimeSeconds:5.6},driveBoost:{gainMps:4.3,durationSeconds:2.8},image:{src:t,crop:{x:24/1024,y:32/512,width:973/1024,height:435/512},bodyWidthRatio:387/435}},bmwM4:{id:`bmw-m4-2024`,name:`BMW M4`,category:`Sports cars`,description:`A quick turbo straight-six coupe that rotates cleanly and rewards precise countersteer.`,make:`BMW`,model:`M4`,year:`2024`,massKg:1750,frontWeightFraction:.52,sound:{engineId:`i6`,vehicleId:`sports`,engineLabel:`Simulated turbo inline-six · 3.0 L`,turbo:!0,horn:{lowHz:345,highHz:415,tone:`disc`,level:.86}},visual:{color:`#587d9a`,shape:`coupe`},geometry:{lengthM:4.9081,widthM:1.89,wheelbaseM:2.8326,trackWidthM:1.6624,tireLengthM:.71,tireWidthM:.29,frontAxleXM:1.4529,rearAxleXM:-1.3797,frontTrackWidthM:1.6478,rearTrackWidthM:1.6771},machineGuns:{xM:.0122},exhaust:{layout:`left-right`,outlets:[{xM:-2.3393,yM:.567},{xM:-2.3881,yM:.4347},{xM:-2.3881,yM:-.4347},{xM:-2.3442,yM:-.567}]},lights:{headlights:{xM:1.8192,yM:.6202},taillights:{xM:-2.1366,yM:.5714}},roofRocket:{xM:-.3541,yM:0,sizeM:.8,panelColor:`#6c7d88`},engineForceN:22500,reversePowerRatio:.72,rollingResistance:42,coastDecelerationMps2:4.2,handbrakeDecelerationMps2:10,lateralResistance:1900,corneringAccelerationMps2:39,maxSteerAngleRad:.64,handbrakeStrength:.65,drift:{entrySpeedMps:4.5,slipAngleRad:.3},launch:{minRpm:2300,boostMps:.7,boostedBoostMps:1.8,assistDurationSeconds:.7,burnoutRampSeconds:1.1,chargedSpinSeconds:1.35,fireLifetimeSeconds:5.1},driveBoost:{gainMps:4.8,durationSeconds:2.6},image:{src:n,crop:{x:10/1024,y:28/512,width:1005/1024,height:454/512},bodyWidthRatio:387/454}},jeepWrangler:{id:`jeep-wrangler-2026`,name:`Jeep Wrangler`,category:`Trucks & off-road`,description:`A tall, heavy four-door SUV with deliberate steering and a wide, steady slide.`,make:`Jeep`,model:`Wrangler`,year:`2026`,massKg:2050,frontWeightFraction:.53,sound:{engineId:`v6`,vehicleId:`truck`,engineLabel:`Simulated V6 · 3.6 L`,horn:{lowHz:300,highHz:400,tone:`trumpet`,level:1}},visual:{color:`#7d8060`,shape:`suv`},geometry:{lengthM:4.4099,widthM:1.88,wheelbaseM:2.8548,trackWidthM:1.6237,tireLengthM:.76,tireWidthM:.32,frontAxleXM:1.5783,rearAxleXM:-1.2765,frontTrackWidthM:1.6144,rearTrackWidthM:1.633},machineGuns:{xM:.116},exhaust:{layout:`right`,outlets:[{xM:-2.1748,yM:-.5264}]},lights:{headlights:{xM:2.0657,yM:.636},taillights:{xM:-1.9496,yM:.636}},roofRocket:{xM:-.1857,yM:0,sizeM:.9,panelColor:`#777a65`},engineForceN:12500,reversePowerRatio:.73,rollingResistance:58,coastDecelerationMps2:4.8,handbrakeDecelerationMps2:11.5,lateralResistance:1850,corneringAccelerationMps2:28,maxSteerAngleRad:.53,handbrakeStrength:.64,drift:{entrySpeedMps:4.2,slipAngleRad:.3},launch:{minRpm:2200,boostMps:0,boostedBoostMps:.8,assistDurationSeconds:.8,burnoutRampSeconds:1.35,chargedSpinSeconds:1.65,fireLifetimeSeconds:5.8},driveBoost:{gainMps:2.8,durationSeconds:3},image:{src:r,crop:{x:52/1024,y:31/512,width:950/1024,height:444/512},bodyWidthRatio:405/444}},subaruWrx:{id:`subaru-wrx-2024`,name:`Subaru WRX`,category:`Sports cars`,description:`A compact turbo boxer sedan with brisk turn-in and a playful handbrake slide.`,make:`Subaru`,model:`WRX`,year:`2024`,massKg:1550,frontWeightFraction:.54,sound:{engineId:`boxer4`,vehicleId:`sports`,engineLabel:`Simulated turbo flat-four · 2.4 L`,turbo:!0,horn:{lowHz:370,highHz:450,tone:`disc`,level:.88}},visual:{color:`#547aaf`,shape:`sedan`},geometry:{lengthM:4.8262,widthM:1.83,wheelbaseM:2.7749,trackWidthM:1.6,tireLengthM:.69,tireWidthM:.27,frontAxleXM:1.4502,rearAxleXM:-1.3247,frontTrackWidthM:1.59,rearTrackWidthM:1.61},machineGuns:{xM:.1405},exhaust:{layout:`left-right`,outlets:[{xM:-2.3473,yM:.4964},{xM:-2.3832,yM:.3648},{xM:-2.3832,yM:-.3648},{xM:-2.3473,yM:-.4964}]},lights:{headlights:{xM:2.1619,yM:.6758},taillights:{xM:-2.1081,yM:.6758}},roofRocket:{xM:-.32,yM:0,sizeM:.78,panelColor:`#60758d`},engineForceN:16600,reversePowerRatio:.73,rollingResistance:39,coastDecelerationMps2:4,handbrakeDecelerationMps2:10,lateralResistance:1740,corneringAccelerationMps2:38,maxSteerAngleRad:.65,handbrakeStrength:.69,drift:{entrySpeedMps:4,slipAngleRad:.3},launch:{minRpm:2400,boostMps:.4,boostedBoostMps:1.3,assistDurationSeconds:.7,burnoutRampSeconds:1.1,chargedSpinSeconds:1.25,fireLifetimeSeconds:4.8},driveBoost:{gainMps:3.8,durationSeconds:2.8},image:{src:i,crop:{x:38/887,y:42/444,width:807/887,height:358/444},bodyWidthRatio:306/358}},audiRs3:{id:`audi-rs3-2024`,name:`Audi RS 3`,category:`Sports cars`,description:`A sharp five-cylinder sport sedan with punchy acceleration and fast grip recovery.`,make:`Audi`,model:`RS 3`,year:`2024`,massKg:1580,frontWeightFraction:.57,sound:{engineId:`i5`,vehicleId:`sports`,engineLabel:`Simulated turbo inline-five · 2.5 L`,turbo:!0,horn:{lowHz:400,highHz:500,tone:`disc`,level:.91}},visual:{color:`#5e7275`,shape:`sedan`},geometry:{lengthM:4.3522,widthM:1.85,wheelbaseM:2.4845,trackWidthM:1.6094,tireLengthM:.7,tireWidthM:.28,frontAxleXM:1.2844,rearAxleXM:-1.2001,frontTrackWidthM:1.596,rearTrackWidthM:1.6227},machineGuns:{xM:.0421},exhaust:{layout:`left-right`,outlets:[{xM:-2.1339,yM:.518},{xM:-2.1339,yM:-.518}]},lights:{headlights:{xM:1.728,yM:.5878},taillights:{xM:-1.9321,yM:.5878}},roofRocket:{xM:-.2684,yM:0,sizeM:.76,panelColor:`#667377`},engineForceN:21e3,reversePowerRatio:.72,rollingResistance:40,coastDecelerationMps2:4.4,handbrakeDecelerationMps2:10.4,lateralResistance:1950,corneringAccelerationMps2:40,maxSteerAngleRad:.63,handbrakeStrength:.66,drift:{entrySpeedMps:4.5,slipAngleRad:.3},launch:{minRpm:2200,boostMps:.6,boostedBoostMps:1.7,assistDurationSeconds:.7,burnoutRampSeconds:1.05,chargedSpinSeconds:1.35,fireLifetimeSeconds:5.1},driveBoost:{gainMps:4.3,durationSeconds:2.7},image:{src:a,crop:{x:22/1024,y:14/512,width:981/1024,height:465/512},bodyWidthRatio:417/465}},lamborghiniHuracanEvo:{id:`lamborghini-huracan-evo-2023`,name:`Lamborghini Huracán EVO`,category:`Supercars`,description:`A low V10 supercar with fierce acceleration, quick response, and a high-revving voice.`,make:`Lamborghini`,model:`Huracán EVO`,year:`2023`,massKg:1450,frontWeightFraction:.43,sound:{engineId:`v10`,vehicleId:`supercar`,engineLabel:`Simulated V10 · 5.2 L`,horn:{lowHz:405,highHz:515,tone:`trumpet`,level:.92}},visual:{color:`#e0a84b`,shape:`supercar`},geometry:{lengthM:4.4818,widthM:1.93,wheelbaseM:2.5565,trackWidthM:1.7132,frontTrackWidthM:1.681,rearTrackWidthM:1.7455,tireLengthM:.69,tireWidthM:.3,frontAxleXM:1.3289,rearAxleXM:-1.2276},machineGuns:{xM:.1543},exhaust:{layout:`center`,outlets:[{xM:-2.2248,yM:.3088},{xM:-2.2248,yM:-.3088}]},lights:{headlights:{xM:1.6974,yM:.5574},taillights:{xM:-2.0336,yM:.5574}},roofRocket:{xM:-.0299,yM:0,sizeM:.7,panelColor:`#b79c57`},engineForceN:26500,reversePowerRatio:.68,rollingResistance:43,coastDecelerationMps2:4.7,handbrakeDecelerationMps2:11,lateralResistance:2250,corneringAccelerationMps2:44,maxSteerAngleRad:.63,handbrakeStrength:.7,drift:{entrySpeedMps:5,slipAngleRad:.3},launch:{minRpm:2800,boostMps:.9,boostedBoostMps:2.1,assistDurationSeconds:.65,burnoutRampSeconds:.95,chargedSpinSeconds:1.5,fireLifetimeSeconds:5.6},driveBoost:{gainMps:5.7,durationSeconds:2.5},image:{src:o,crop:{x:27/1024,y:7/512,width:973/1024,height:492/512},bodyWidthRatio:419/492}}},D={...E,toyotaSupraA80:{...E.bmwM4,id:`toyota-supra-a80-1993`,name:`Toyota Supra A80 Twin Turbo`,description:`2JZ twin turbos and rear-drive balance.`,category:`Classics`,make:`Toyota`,model:`Supra RZ`,year:`1993`,massKg:1490,frontWeightFraction:.53,machineGuns:{xM:-.0818},exhaust:{layout:`right`,outlets:[{xM:-2.1652,yM:-.5068}]},visual:{color:`#bfc3c8`,shape:`coupe`},sound:{engineId:`i6tt`,vehicleId:`sports`,engineLabel:`Simulated 2JZ-GTE inline-six · 3.0 L`,turbo:!0,horn:{lowHz:350,highHz:430,tone:`disc`,level:.9}},geometry:{lengthM:4.5053,widthM:1.81,wheelbaseM:2.6784,trackWidthM:1.564,tireLengthM:.7,tireWidthM:.29,frontAxleXM:1.4125,rearAxleXM:-1.2659,frontTrackWidthM:1.5527,rearTrackWidthM:1.5753},lights:{headlights:{xM:1.8636,yM:.53},taillights:{xM:-1.8297,yM:.5977}},roofRocket:{xM:-.3355,yM:0,sizeM:.8,panelColor:`#6c7d88`},engineForceN:22e3,image:{src:s,crop:{x:42/887,y:36/444,width:799/887,height:372/444},bodyWidthRatio:321/372}},mazdaRx7Fd:{...E.porsche911997,id:`mazda-rx7-fd-1999`,name:`Mazda RX-7 FD Type R`,description:`A light, sharp twin-turbo rotary coupe.`,category:`Classics`,make:`Mazda`,model:`RX-7 FD Type R`,year:`1999`,massKg:1270,frontWeightFraction:.5,machineGuns:{xM:-.019},exhaust:{layout:`right`,outlets:[{xM:-1.9936,yM:-.4928}]},visual:{color:`#b8202b`,shape:`coupe`},sound:{engineId:`rotary2`,vehicleId:`sports`,engineLabel:`Simulated 13B-REW twin-rotor · 1.3 L`,turbo:!0,horn:{lowHz:360,highHz:440,tone:`disc`,level:.86}},geometry:{lengthM:4.1664,widthM:1.76,wheelbaseM:2.4445,trackWidthM:1.4744,tireLengthM:.67,tireWidthM:.28,frontAxleXM:1.3119,rearAxleXM:-1.1326,frontTrackWidthM:1.4744,rearTrackWidthM:1.4744},lights:{headlights:{xM:1.6649,yM:.5432},taillights:{xM:-1.7573,yM:.5867}},roofRocket:{xM:-.2906,yM:0,sizeM:.76,panelColor:`#a8b0b3`},engineForceN:18800,image:{src:c,crop:{x:60/887,y:33/444,width:767/887,height:366/444},bodyWidthRatio:324/366}},toyotaGrCorolla:{...E.subaruWrx,id:`toyota-gr-corolla-2026`,name:`Toyota GR Corolla`,description:`A turbo three with all-wheel-drive grip.`,category:`Sports cars`,make:`Toyota`,model:`GR Corolla`,year:`2026`,massKg:1475,frontWeightFraction:.59,machineGuns:{xM:.1249},exhaust:{layout:`left-right`,outlets:[{xM:-2.1025,yM:.4519},{xM:-2.145,yM:0},{xM:-2.1025,yM:-.4519}]},visual:{color:`#eceeef`,shape:`sedan`},sound:{engineId:`i3`,vehicleId:`hatch`,engineLabel:`Simulated turbo inline-three · 1.6 L`,turbo:!0,horn:{lowHz:375,highHz:455,tone:`disc`,level:.87}},geometry:{lengthM:4.3326,widthM:1.85,wheelbaseM:2.6421,trackWidthM:1.605,tireLengthM:.67,tireWidthM:.28,frontAxleXM:1.4008,rearAxleXM:-1.2413,frontTrackWidthM:1.6,rearTrackWidthM:1.61},lights:{headlights:{xM:1.9058,yM:.622},taillights:{xM:-1.8686,yM:.6379}},roofRocket:{xM:-.1143,yM:0,sizeM:.78,panelColor:`#60758d`},engineForceN:18700,image:{src:l,crop:{x:34/887,y:17/444,width:815/887,height:410/444},bodyWidthRatio:348/410}},mazdaMx5Nd:{...E.porsche911997,id:`mazda-mx5-nd-2019`,name:`Mazda MX-5 ND`,description:`A light roadster with a free-revving four.`,category:`Sports cars`,make:`Mazda`,model:`MX-5 ND 2.0`,year:`2019`,massKg:1080,frontWeightFraction:.52,machineGuns:{xM:-.0498},exhaust:{layout:`left`,outlets:[{xM:-1.8081,yM:-.4176},{xM:-1.7505,yM:-.5394}]},visual:{color:`#b71125`,shape:`coupe`},sound:{engineId:`i4`,vehicleId:`sports`,engineLabel:`Simulated inline-four · 2.0 L`,horn:{lowHz:365,highHz:445,tone:`disc`,level:.84}},geometry:{lengthM:3.7683,widthM:1.74,wheelbaseM:2.3585,trackWidthM:1.5206,tireLengthM:.63,tireWidthM:.26,frontAxleXM:1.2605,rearAxleXM:-1.098,frontTrackWidthM:1.5154,rearTrackWidthM:1.5258},lights:{headlights:{xM:1.5225,yM:.566},taillights:{xM:-1.5697,yM:.4088}},roofRocket:{xM:-.3118,yM:0,sizeM:.76,panelColor:`#a8b0b3`},engineForceN:15500,image:{src:u,crop:{x:84/887,y:26/444,width:719/887,height:386/444},bodyWidthRatio:332/386}},ram2500:{...E.jeepWrangler,id:`ram-2500-cummins-2026`,name:`Ram 2500 Cummins`,description:`A heavy-duty diesel with huge low-end torque.`,category:`Trucks & off-road`,make:`Ram`,model:`2500 Cummins`,year:`2026`,massKg:3400,frontWeightFraction:.57,machineGuns:{xM:.6795},exhaust:{layout:`right`,outlets:[{xM:-2.1706,yM:-.9843}]},visual:{color:`#1e4173`,shape:`suv`},sound:{engineId:`i6diesel`,vehicleId:`truck`,engineLabel:`Simulated turbo diesel inline-six · 6.7 L`,turbo:!0,horn:{lowHz:290,highHz:370,tone:`trumpet`,level:1}},geometry:{lengthM:6.2804,widthM:2.02,wheelbaseM:3.9666,trackWidthM:1.6951,tireLengthM:.87,tireWidthM:.34,frontAxleXM:2.0751,rearAxleXM:-1.8915,frontTrackWidthM:1.6951,rearTrackWidthM:1.6951},lights:{headlights:{xM:2.8831,yM:.5803},taillights:{xM:-2.9859,yM:.617}},roofRocket:{xM:.2755,yM:0,sizeM:.9,panelColor:`#777a65`},engineForceN:26e3,rollingResistance:92,corneringAccelerationMps2:24,image:{src:d,crop:{x:16/887,y:42/444,width:855/887,height:368/444},bodyWidthRatio:275/368}},nissanGtrR35:{...E.bmwM4,id:`nissan-gtr-r35-2007`,name:`Nissan GT-R R35`,description:`A twin-turbo V6 with tenacious all-wheel grip.`,category:`Sports cars`,make:`Nissan`,model:`GT-R R35`,year:`2007`,massKg:1740,frontWeightFraction:.54,machineGuns:{xM:.0286},exhaust:{layout:`left-right`,outlets:[{xM:-2.2863,yM:.532},{xM:-2.2863,yM:-.532}]},visual:{color:`#dde0e2`,shape:`coupe`},sound:{engineId:`v6tt`,vehicleId:`sports`,engineLabel:`Simulated VR38 twin-turbo V6 · 3.8 L`,turbo:!0,horn:{lowHz:340,highHz:420,tone:`disc`,level:.9}},geometry:{lengthM:4.75,widthM:1.9,wheelbaseM:2.8901,trackWidthM:1.674,tireLengthM:.72,tireWidthM:.3,frontAxleXM:1.5452,rearAxleXM:-1.3449,frontTrackWidthM:1.6683,rearTrackWidthM:1.6797},lights:{headlights:{xM:2.003,yM:.5408},taillights:{xM:-2.1175,yM:.5122}},roofRocket:{xM:-.2861,yM:0,sizeM:.8,panelColor:`#6c7d88`},engineForceN:24900,image:{src:f,crop:{x:26/887,y:33/444,width:830/887,height:379/444},bodyWidthRatio:332/379}},mclaren720s:{...E.lamborghiniHuracanEvo,id:`mclaren-720s-2017`,name:`McLaren 720S`,description:`A light mid-engine supercar with a turbo V8.`,category:`Supercars`,make:`McLaren`,model:`720S`,year:`2017`,massKg:1419,frontWeightFraction:.42,machineGuns:{xM:.1303},exhaust:{layout:`center`,outlets:[{xM:-2.3071,yM:.2316},{xM:-2.3071,yM:-.2316}]},visual:{color:`#e9790a`,shape:`supercar`},sound:{engineId:`v8tt`,vehicleId:`supercar`,engineLabel:`Simulated twin-turbo V8 · 4.0 L`,turbo:!0,horn:{lowHz:390,highHz:480,tone:`trumpet`,level:.9}},geometry:{lengthM:4.6753,widthM:1.93,wheelbaseM:2.7176,trackWidthM:1.6985,tireLengthM:.7,tireWidthM:.3,frontAxleXM:1.4614,rearAxleXM:-1.2562,frontTrackWidthM:1.7151,rearTrackWidthM:1.6818},lights:{headlights:{xM:1.8496,yM:.5601},taillights:{xM:-1.9882,yM:.6267}},roofRocket:{xM:-.1747,yM:0,sizeM:.7,panelColor:`#b79c57`},engineForceN:26e3,image:{src:p,crop:{x:23/887,y:44/444,width:843/887,height:356/444},bodyWidthRatio:348/356}},chevroletCorvetteC8Z06:{...E.lamborghiniHuracanEvo,id:`chevrolet-corvette-c8-z06-2023`,name:`Corvette C8 Z06`,description:`A wide mid-engine chassis and a flat-plane V8.`,category:`Supercars`,make:`Chevrolet`,model:`Corvette C8 Z06`,year:`2023`,massKg:1665,frontWeightFraction:.4,machineGuns:{xM:.1873},exhaust:{layout:`center`,outlets:[{xM:-2.3488,yM:.2436},{xM:-2.3544,yM:.0812},{xM:-2.3544,yM:-.0812},{xM:-2.3488,yM:-.2436}]},visual:{color:`#346db0`,shape:`supercar`},sound:{engineId:`v8flat`,vehicleId:`supercar`,engineLabel:`Simulated LT6 flat-plane V8 · 5.5 L`,horn:{lowHz:385,highHz:475,tone:`trumpet`,level:.94}},geometry:{lengthM:4.7702,widthM:2.03,wheelbaseM:2.7961,trackWidthM:1.7988,tireLengthM:.74,tireWidthM:.32,frontAxleXM:1.5015,rearAxleXM:-1.2946,frontTrackWidthM:1.7764,rearTrackWidthM:1.8212},lights:{headlights:{xM:1.921,yM:.6459},taillights:{xM:-1.9377,yM:.7018}},roofRocket:{xM:-.0084,yM:0,sizeM:.7,panelColor:`#b79c57`},engineForceN:29600,image:{src:m,crop:{x:19/887,y:14/444,width:853/887,height:411/444},bodyWidthRatio:363/411}},ferrari812Superfast:{...E.lamborghiniHuracanEvo,id:`ferrari-812-superfast-2017`,name:`Ferrari 812 Superfast`,description:`A long-hood V12 grand tourer.`,category:`Supercars`,make:`Ferrari`,model:`812 Superfast`,year:`2017`,massKg:1630,frontWeightFraction:.47,machineGuns:{xM:.0141},exhaust:{layout:`left-right`,outlets:[{xM:-2.2739,yM:.591},{xM:-2.3246,yM:.4531},{xM:-2.319,yM:-.4531},{xM:-2.2683,yM:-.591}]},visual:{color:`#c70d20`,shape:`supercar`},sound:{engineId:`v12`,vehicleId:`supercar`,engineLabel:`Simulated V12 · 6.5 L`,horn:{lowHz:400,highHz:500,tone:`trumpet`,level:.93}},geometry:{lengthM:4.7561,widthM:1.97,wheelbaseM:2.8705,trackWidthM:1.747,tireLengthM:.73,tireWidthM:.31,frontAxleXM:1.5056,rearAxleXM:-1.3649,frontTrackWidthM:1.7302,rearTrackWidthM:1.7639},lights:{headlights:{xM:1.8996,yM:.6051},taillights:{xM:-2.0235,yM:.5319}},roofRocket:{xM:-.3236,yM:0,sizeM:.7,panelColor:`#b79c57`},engineForceN:30500,image:{src:h,crop:{x:20/887,y:19/444,width:845/887,height:405/444},bodyWidthRatio:350/405}}};function O(e){return e.geometry.wheelbaseM/Math.tan(e.maxSteerAngleRad)}export{x as a,C as c,O as i,D as l,y as n,T as o,_ as r,S as s,v as t};
@@ -0,0 +1 @@
1
+ import{i as e}from"./definitions~react~vehicle-popover~Documentation~JoyRideView~browser-session-core-DcDccU8O.js";var t=e.map(e=>`Digit${e}`),n=[{id:`accelerate`,label:`Accelerate`,keys:[`W`,`↑`],codes:[`KeyW`,`ArrowUp`]},{id:`reverse`,label:`Reverse / brake with gas`,keys:[`S`,`↓`],codes:[`KeyS`,`ArrowDown`]},{id:`left`,label:`Steer left`,keys:[`A`,`←`],codes:[`KeyA`,`ArrowLeft`]},{id:`right`,label:`Steer right`,keys:[`D`,`→`],codes:[`KeyD`,`ArrowRight`]},{id:`handbrake`,label:`Handbrake`,keys:[`Space`],codes:[`Space`]},{id:`boost`,label:`Boost / charge burnout launch`,keys:[`Shift`],codes:[`ShiftLeft`,`ShiftRight`]},...e.map(e=>({id:`slot${e}`,label:`Activate slot ${e}`,keys:[String(e)],codes:[`Digit${e}`]})),{id:`slowMo`,label:`Hold slow-mo`,keys:[`V`],codes:[`KeyV`]},{id:`underglow`,label:`Toggle underglow`,keys:[`U`],codes:[`KeyU`]},{id:`horn`,label:`Horn`,keys:[`H`],codes:[`KeyH`]},{id:`clean`,label:`Reset screen`,keys:[`C`],codes:[`KeyC`]},{id:`targets`,label:`Flash destroyable objects`,keys:[`F`],codes:[`KeyF`]},{id:`pause`,label:`Pause`,keys:[`P`],codes:[`KeyP`]},{id:`exit`,label:`Exit`,keys:[`Esc`],codes:[`Escape`]}],r=new Set([`KeyW`,`KeyA`,`KeyS`,`KeyD`,`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Space`,`ShiftLeft`,`ShiftRight`,...t]),i=new Set([`KeyU`,`KeyC`,`KeyF`,`KeyV`,`KeyP`,`KeyB`,`KeyG`,`KeyZ`,`KeyX`,`Escape`]);function a(e){return(e instanceof Event?e.composedPath():[e]).some(e=>e instanceof Element&&!!e.closest(`input, textarea, select, [contenteditable="true"]`))}function o(e,t){return{throttle:e?1:-Number(t),brake:Number(e&&t)}}function s(t){return{...o(t.has(`KeyW`)||t.has(`ArrowUp`),t.has(`KeyS`)||t.has(`ArrowDown`)),steer:Number(t.has(`KeyA`)||t.has(`ArrowLeft`))-Number(t.has(`KeyD`)||t.has(`ArrowRight`)),action:t.has(`Space`),boost:t.has(`ShiftLeft`)||t.has(`ShiftRight`),slots:e.filter(e=>t.has(`Digit${e}`))}}export{s as a,r as i,a as n,i as o,n as r,o as t};
@@ -1 +1 @@
1
- import{l as e}from"./configuration~react~vehicle-popover~JoyRideView~browser-session-core~renderer-CPZkP_Db.js";import{t}from"./configuration~react~vehicle-popover~EmbedPanel~JoyRideView~browser-session-core-rFMaxKZs.js";var n={...Object.fromEntries(Object.entries(t).map(([e,t])=>[e,{phase:`live`,default:t}])),overlay:{phase:`mount`,default:!1},playground:{phase:`mount`},definitions:{phase:`mount`},audioEngine:{phase:`mount`},initialMode:{phase:`mount`,default:`car`},initialAngle:{phase:`mount`},spawnTarget:{phase:`mount`},initialPuddles:{phase:`mount`},initialGroundMarks:{phase:`mount`},initialArrivalPending:{phase:`mount`,default:!1},mode:{phase:`live`},onLightingChange:{phase:`live`},preset:{phase:`live`,default:e.porsche911997},showVehicle:{phase:`live`,default:!0},paused:{phase:`live`,default:!1},audioEnabled:{phase:`live`,default:!0},screenShakeProfiles:{phase:`live`},automatedInput:{phase:`live`,default:null},bindings:{phase:`live`},onReady:{phase:`live`},foregroundSelector:{phase:`live`},destructibleBurnSeconds:{phase:`live`},canPlaceManually:{phase:`live`,default:!0},onStateChange:{phase:`live`},onExit:{phase:`live`},onToggleMute:{phase:`live`},onAudioInteraction:{phase:`live`},onDriveInput:{phase:`live`},onStartRequest:{phase:`live`},onCarClick:{phase:`live`}},r=Object.freeze(Object.fromEntries(Object.entries(n).filter(([,e])=>`default`in e).map(([e,t])=>[e,`default`in t?t.default:void 0]))),i=Object.freeze(Object.entries(n).filter(([,e])=>e.phase===`mount`).map(([e])=>e));export{r as n,n as r,i as t};
1
+ import{l as e}from"./configuration~react~vehicle-popover~JoyRideView~browser-session-core~renderer-BwD100vD.js";import{t}from"./configuration~react~vehicle-popover~EmbedPanel~JoyRideView~browser-session-core-BLdLriTd.js";var n={...Object.fromEntries(Object.entries(t).map(([e,t])=>[e,{phase:`live`,default:t}])),overlay:{phase:`mount`,default:!1},playground:{phase:`mount`},definitions:{phase:`mount`},audioEngine:{phase:`mount`},initialMode:{phase:`mount`,default:`car`},initialAngle:{phase:`mount`},spawnTarget:{phase:`mount`},initialPuddles:{phase:`mount`},initialGroundMarks:{phase:`mount`},initialArrivalPending:{phase:`mount`,default:!1},mode:{phase:`live`},onLightingChange:{phase:`live`},preset:{phase:`live`,default:e.porsche911997},showVehicle:{phase:`live`,default:!0},paused:{phase:`live`,default:!1},audioEnabled:{phase:`live`,default:!0},screenShakeProfiles:{phase:`live`},automatedInput:{phase:`live`,default:null},bindings:{phase:`live`},onReady:{phase:`live`},foregroundSelector:{phase:`live`},destructibleBurnSeconds:{phase:`live`},canPlaceManually:{phase:`live`,default:!0},onStateChange:{phase:`live`},onExit:{phase:`live`},onToggleMute:{phase:`live`},onAudioInteraction:{phase:`live`},onDriveInput:{phase:`live`},onStartRequest:{phase:`live`},onFocusChange:{phase:`live`},onCarClick:{phase:`live`}},r=Object.freeze(Object.fromEntries(Object.entries(n).filter(([,e])=>`default`in e).map(([e,t])=>[e,`default`in t?t.default:void 0]))),i=Object.freeze(Object.entries(n).filter(([,e])=>e.phase===`mount`).map(([e])=>e));export{r as n,n as r,i as t};