@joy-ride/game 0.26.0 → 0.27.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.
- package/README.md +5 -4
- package/THIRD_PARTY_NOTICES.md +35 -0
- package/bookmarklet.d.ts +1 -1
- package/bookmarklet.js +1 -1
- package/embed-assets/boost-2QB6phrp.opus +0 -0
- package/embed-assets/chevrolet-corvette-c8-z06-top-DTz9k7Fu.webp +0 -0
- package/embed-assets/collision-r7KCgXfr.opus +0 -0
- package/embed-assets/crush-CN-lxC7x.opus +0 -0
- package/embed-assets/explosion-DyvbNXFI.opus +0 -0
- package/embed-assets/ferrari-812-superfast-top-C3DkIkN7.webp +0 -0
- package/embed-assets/fire-BYgTEP5X.opus +0 -0
- package/embed-assets/gunfire-DUWyQGGm.opus +0 -0
- package/embed-assets/mazda-mx5-nd-top-CLqHp7ox.webp +0 -0
- package/embed-assets/mazda-rx7-fd-top-C3bZMAQw.webp +0 -0
- package/embed-assets/mclaren-720s-top-8TdR01SB.webp +0 -0
- package/embed-assets/nissan-gtr-r35-top-DSpGgr3L.webp +0 -0
- package/embed-assets/ram-2500-top-B653eJDL.webp +0 -0
- package/embed-assets/ricochet-BTW-Iqeu.opus +0 -0
- package/embed-assets/tires-B_97_Y5P.opus +0 -0
- package/embed-assets/toyota-gr-corolla-top-B0NnJP3L.webp +0 -0
- package/embed-assets/toyota-supra-a80-top-BjqFr9TR.webp +0 -0
- package/embed-chunks/{CodeBlock-QLZWgPoe.js → CodeBlock-CpSBaaOX.js} +1 -1
- package/embed-chunks/{Documentation-BJMN2wVe.js → Documentation-8cbCUZ0p.js} +2 -2
- package/embed-chunks/{EmbedPanel-sqS3N8pg.js → EmbedPanel-DCPAjVqp.js} +1 -1
- package/embed-chunks/JoyRideView-CgMxrhvT.js +1 -0
- package/embed-chunks/{configuration~index~embed-0luxl74s.js → configuration~index~embed-ynFxJP_I.js} +1 -1
- package/embed-chunks/configuration~index~embed~bookmarklet-BGiS_NuJ.js +1 -0
- package/embed-chunks/{controls~index~embed-B_C92tUz.js → controls~index~embed-CFqR-DAK.js} +1 -1
- package/embed-chunks/{definitions~index~embed-CDMM_m1T.js → definitions~index~embed-CnmHo4Z4.js} +1 -1
- package/embed-chunks/definitions~index~embed~bookmarklet-CfH2mYuH.js +1 -0
- package/embed-chunks/definitions~index~embed~bookmarklet~vehicle-popover~Documentation~JoyRideView~browser-sessi~fklztn3g-BG7sJuWo.js +1 -0
- package/embed-chunks/runtime~JoyRideView~browser-session-core-D5ZWMVDY.js +1 -0
- package/embed-chunks/runtime~browser-session-core-CDPI_Sw8.js +1 -0
- package/embed-chunks/runtime~index~embed-BdtYsSkV.js +210 -0
- package/embed-chunks/{runtime~index~embed~vehicle-popover~browser-session-core~renderer-YuWj6rHi.js → runtime~index~embed~vehicle-popover~browser-session-core~renderer-ZRVlax1L.js} +1 -1
- package/embed-chunks/{runtime~vehicle-popover-vmgt62ll.js → runtime~vehicle-popover-DRMddEZO.js} +1 -1
- package/embed-chunks/runtime~vehicle-popover~browser-session-core-0GDQdij8.js +1 -0
- package/embed-chunks/runtime~vehicle-popover~browser-session-core~renderer-Cf4rBrLo.js +4 -0
- package/embed-chunks/runtime~vehicle-popover~renderer-JCHjG7Oa.js +849 -0
- package/embed-chunks/src-BJ7McU4o.js +2 -0
- package/embed-chunks/vehicle-catalog~index~embed-DVqfWMzi.js +1 -0
- package/embed-chunks/vehicle-popover-zFwrdc1h.js +1 -0
- package/embed.js +1 -1
- package/{index-BqJy85Tu.d.ts → index-epZszWQ8.d.ts} +15 -117
- package/index.d.ts +2 -2
- package/index.js +1 -1
- package/npm-chunks/{Documentation-Nc7GWFnR.js → Documentation-Cc_tsq8d.js} +2 -2
- package/npm-chunks/{EmbedPanel-DRQcCEA1.js → EmbedPanel-ByMHNOc2.js} +1 -1
- package/npm-chunks/JoyRideView-DHvlq6T7.js +1 -0
- package/npm-chunks/{configuration~react-CgNlw0cC.js → configuration~react-CPx5MlF4.js} +1 -1
- package/npm-chunks/{configuration~react~browser-session-core-CyXr42pk.js → configuration~react~browser-session-core-Ca4_fO4n.js} +1 -1
- package/npm-chunks/configuration~react~vehicle-popover~JoyRideView~browser-session-core~renderer-CPZkP_Db.js +1 -0
- package/npm-chunks/{controls~react~vehicle-popover~Documentation~JoyRideView~browser-session-core-CLDwfJ48.js → controls~react~vehicle-popover~Documentation~JoyRideView~browser-session-core-CoAcght5.js} +1 -1
- package/npm-chunks/{definitions~react~browser-session-core-acRq5AYt.js → definitions~react~browser-session-core-Bc5BhqaX.js} +1 -1
- package/npm-chunks/definitions~react~vehicle-popover~Documentation~JoyRideView~browser-session-core-DcDccU8O.js +1 -0
- package/npm-chunks/definitions~react~vehicle-popover~Documentation~JoyRideView~browser-session-core~renderer-BG7sJuWo.js +1 -0
- package/npm-chunks/runtime~JoyRideView~browser-session-core-DkTKYWMV.js +1 -0
- package/npm-chunks/runtime~browser-session-core-CuS-sVVB.js +1 -0
- package/npm-chunks/{runtime~react-Jmjjtxii.js → runtime~react-DQ3peDbc.js} +1 -1
- package/npm-chunks/runtime~react~browser-session-core-B9a1rLNB.js +1 -0
- package/npm-chunks/runtime~react~vehicle-popover~browser-session-core-CLFQjhrw.js +210 -0
- package/npm-chunks/{runtime~react~vehicle-popover~browser-session-core~renderer-Be8cIaU4.js → runtime~react~vehicle-popover~browser-session-core~renderer-Dmgs7E8f.js} +1 -1
- package/npm-chunks/{runtime~vehicle-popover-PLJOXbUU.js → runtime~vehicle-popover-VyqXHkfB.js} +1 -1
- package/npm-chunks/runtime~vehicle-popover~browser-session-core-DCZajgun.js +1 -0
- package/npm-chunks/runtime~vehicle-popover~browser-session-core~renderer-EswVyRVp.js +4 -0
- package/npm-chunks/runtime~vehicle-popover~renderer-4RpQDOHk.js +849 -0
- package/npm-chunks/theme-CjrpDpKE.js +2 -0
- package/npm-chunks/vehicle-catalog~react~browser-session-core-D5_CJzRM.js +1 -0
- package/npm-chunks/vehicle-catalog~react~vehicle-popover~browser-session-core-sqHgtPeO.js +1 -0
- package/npm-chunks/vehicle-popover-PaJpv-M-.js +1 -0
- package/package.json +1 -1
- package/{playground-DrT_x51v.d.ts → playground-BcoLBJrj.d.ts} +13 -70
- package/react.d.ts +2 -2
- package/react.js +2 -2
- package/embed-assets/attractor-B0xCt_Fj.mp3 +0 -0
- package/embed-assets/boost-BLJDRtPH.mp3 +0 -0
- package/embed-assets/bullet-ricochet-1-BKWD_WRI.mp3 +0 -0
- package/embed-assets/bullet-ricochet-2-CmbSTqg5.mp3 +0 -0
- package/embed-assets/bullet-ricochet-3-DV3Th6nn.mp3 +0 -0
- package/embed-assets/burning-fire--0zItqR0.mp3 +0 -0
- package/embed-assets/collision-hard-b_eauD-v.mp3 +0 -0
- package/embed-assets/collision-medium-Bhw86k_p.mp3 +0 -0
- package/embed-assets/collision-soft-DIwEkPCV.mp3 +0 -0
- package/embed-assets/collision-soft-fVT-mQmJ.mp3 +0 -0
- package/embed-assets/combustible-explosion-XvpDzpm9.mp3 +0 -0
- package/embed-assets/crush-BZKARh2Y.mp3 +0 -0
- package/embed-assets/electric-bolt-Cg9Fmi6S.mp3 +0 -0
- package/embed-assets/electric-charge-zw1IjLo4.mp3 +0 -0
- package/embed-assets/electric-gt-top-DTcvEjMR.webp +0 -0
- package/embed-assets/flamethrower-B5pUrS5p.mp3 +0 -0
- package/embed-assets/ghost-mode-B33_bxYX.mp3 +0 -0
- package/embed-assets/machine-gun-C4ag4X6T.mp3 +0 -0
- package/embed-assets/rocket-explosion-DKnN7_wY.mp3 +0 -0
- package/embed-assets/rocket-launch-C-Yvbb7P.mp3 +0 -0
- package/embed-assets/tire-screech-DEsAg1CH.mp3 +0 -0
- package/embed-chunks/JoyRideView-DaI5oip_.js +0 -1
- package/embed-chunks/configuration~index~embed~bookmarklet-BH7GyoGh.js +0 -1
- package/embed-chunks/definitions~index~embed~bookmarklet-BfjknPZN.js +0 -1
- package/embed-chunks/definitions~index~embed~bookmarklet~vehicle-popover~Documentation~JoyRideView~browser-sessi~fklztn3g-Dt96jol6.js +0 -1
- package/embed-chunks/runtime~JoyRideView~browser-session-core-Bkk9BE6P.js +0 -1
- package/embed-chunks/runtime~browser-session-core-COeP2p6D.js +0 -1
- package/embed-chunks/runtime~index~embed-cWNM8Fsj.js +0 -210
- package/embed-chunks/runtime~vehicle-popover~browser-session-core-CjXpkmYi.js +0 -1
- package/embed-chunks/runtime~vehicle-popover~browser-session-core~renderer-CLLM7CAb.js +0 -4
- package/embed-chunks/runtime~vehicle-popover~renderer-Cx3wjyMH.js +0 -1077
- package/embed-chunks/src-rpwqYZr-.js +0 -2
- package/embed-chunks/vehicle-catalog~index~embed-CZzI6C0M.js +0 -1
- package/embed-chunks/vehicle-popover-C34y-W5W.js +0 -1
- package/npm-chunks/JoyRideView-B3g_Yxhd.js +0 -1
- package/npm-chunks/configuration~react~vehicle-popover~JoyRideView~browser-session-core~renderer-B70Mpi9X.js +0 -1
- package/npm-chunks/definitions~react~vehicle-popover~Documentation~JoyRideView~browser-session-core-BZJqthWX.js +0 -1
- package/npm-chunks/definitions~react~vehicle-popover~Documentation~JoyRideView~browser-session-core~renderer-Dt96jol6.js +0 -1
- package/npm-chunks/runtime~JoyRideView~browser-session-core-CBQyAv9f.js +0 -1
- package/npm-chunks/runtime~browser-session-core-CuLU4VUg.js +0 -1
- package/npm-chunks/runtime~react~browser-session-core-n5P8q7G8.js +0 -1
- package/npm-chunks/runtime~react~vehicle-popover~browser-session-core-BzXBN4rK.js +0 -210
- package/npm-chunks/runtime~vehicle-popover~browser-session-core-Ce3U7qky.js +0 -1
- package/npm-chunks/runtime~vehicle-popover~browser-session-core~renderer-jVG7K050.js +0 -4
- package/npm-chunks/runtime~vehicle-popover~renderer-Dmf1M43y.js +0 -1077
- package/npm-chunks/theme-C4ZE2-nQ.js +0 -2
- package/npm-chunks/vehicle-catalog~react~browser-session-core-BzB5J-Lm.js +0 -1
- package/npm-chunks/vehicle-catalog~react~vehicle-popover~browser-session-core-CX066OIY.js +0 -1
- package/npm-chunks/vehicle-popover-DAESh8qQ.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./rolldown-runtime-XKyaHtl9.js";import{o as r}from"./controls~index~embed-B_C92tUz.js";import{n as i,t as a}from"./configuration~index~embed~bookmarklet~vehicle-popover~EmbedPanel~Documentation~JoyRideView~~n76yhyet-mgPW9A8j.js";import{i as o,r as s,t as c}from"./react-vendor~index~embed-BNCMh3YF.js";import{a as l,i as u,o as d,t as f}from"./X.es-d7B7rOGv.js";import{t as p}from"./CodeBlock-QLZWgPoe.js";import{D as m,d as h,f as g,u as _}from"./vehicle-popover-C34y-W5W.js";var v=t(o(),1),y=new Map([[`bold`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128ZM40,76H216a12,12,0,0,0,0-24H40a12,12,0,0,0,0,24ZM216,180H40a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24Z`}))],[`duotone`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M216,64V192H40V64Z`,opacity:`0.2`}),v.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM40,72H216a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16ZM216,184H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z`}))],[`fill`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM192,184H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Z`}))],[`light`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128ZM40,70H216a6,6,0,0,0,0-12H40a6,6,0,0,0,0,12ZM216,186H40a6,6,0,0,0,0,12H216a6,6,0,0,0,0-12Z`}))],[`regular`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM40,72H216a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16ZM216,184H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z`}))],[`thin`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128ZM40,68H216a4,4,0,0,0,0-8H40a4,4,0,0,0,0,8ZM216,188H40a4,4,0,0,0,0,8H216a4,4,0,0,0,0-8Z`}))]]),b=new Map([[`bold`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z`}))],[`duotone`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z`,opacity:`0.2`}),v.createElement(`path`,{d:`M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`fill`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z`}))],[`light`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z`}))],[`regular`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`thin`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z`}))]]),x=v.forwardRef((e,t)=>v.createElement(u,{ref:t,...e,weights:y}));x.displayName=`ListIcon`;var S=v.forwardRef((e,t)=>v.createElement(u,{ref:t,...e,weights:b}));S.displayName=`MagnifyingGlassIcon`;function C(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var w=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,T=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,E={};function D(e,t){return((t||E).jsx?T:w).test(e)}var O=/[ \t\n\f\r]/g;function k(e){return typeof e==`object`?e.type===`text`&&ee(e.value):ee(e)}function ee(e){return e.replace(O,``)===``}var te=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};te.prototype.normal={},te.prototype.property={},te.prototype.space=void 0;function A(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new te(n,r,t)}function j(e){return e.toLowerCase()}var M=class{constructor(e,t){this.attribute=t,this.property=e}};M.prototype.attribute=``,M.prototype.booleanish=!1,M.prototype.boolean=!1,M.prototype.commaOrSpaceSeparated=!1,M.prototype.commaSeparated=!1,M.prototype.defined=!1,M.prototype.mustUseProperty=!1,M.prototype.number=!1,M.prototype.overloadedBoolean=!1,M.prototype.property=``,M.prototype.spaceSeparated=!1,M.prototype.space=void 0;var ne=e({boolean:()=>P,booleanish:()=>F,commaOrSpaceSeparated:()=>R,commaSeparated:()=>ie,number:()=>I,overloadedBoolean:()=>re,spaceSeparated:()=>L}),N=0,P=ae(),F=ae(),re=ae(),I=ae(),L=ae(),ie=ae(),R=ae();function ae(){return 2**++N}var oe=Object.keys(ne),se=class extends M{constructor(e,t,n,r){let i=-1;if(super(e,t),ce(this,`space`,r),typeof n==`number`)for(;++i<oe.length;){let e=oe[i];ce(this,oe[i],(n&ne[e])===ne[e])}}};se.prototype.defined=!0;function ce(e,t,n){n&&(e[t]=n)}function le(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new se(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[j(r)]=r,n[j(a.attribute)]=r}return new te(t,n,e.space)}var ue=le({properties:{ariaActiveDescendant:null,ariaAtomic:F,ariaAutoComplete:null,ariaBusy:F,ariaChecked:F,ariaColCount:I,ariaColIndex:I,ariaColSpan:I,ariaControls:L,ariaCurrent:null,ariaDescribedBy:L,ariaDetails:null,ariaDisabled:F,ariaDropEffect:L,ariaErrorMessage:null,ariaExpanded:F,ariaFlowTo:L,ariaGrabbed:F,ariaHasPopup:null,ariaHidden:F,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:L,ariaLevel:I,ariaLive:null,ariaModal:F,ariaMultiLine:F,ariaMultiSelectable:F,ariaOrientation:null,ariaOwns:L,ariaPlaceholder:null,ariaPosInSet:I,ariaPressed:F,ariaReadOnly:F,ariaRelevant:null,ariaRequired:F,ariaRoleDescription:L,ariaRowCount:I,ariaRowIndex:I,ariaRowSpan:I,ariaSelected:F,ariaSetSize:I,ariaSort:null,ariaValueMax:I,ariaValueMin:I,ariaValueNow:I,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function de(e,t){return t in e?e[t]:t}function fe(e,t){return de(e,t.toLowerCase())}var pe=le({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:ie,acceptCharset:L,accessKey:L,action:null,allow:null,allowFullScreen:P,allowPaymentRequest:P,allowUserMedia:P,alpha:P,alt:null,as:null,async:P,autoCapitalize:null,autoComplete:L,autoFocus:P,autoPlay:P,blocking:L,capture:null,charSet:null,checked:P,cite:null,className:L,closedBy:null,colorSpace:null,cols:I,colSpan:I,command:null,commandFor:null,content:null,contentEditable:F,controls:P,controlsList:L,coords:I|ie,crossOrigin:null,data:null,dateTime:null,decoding:null,default:P,defer:P,dir:null,dirName:null,disabled:P,download:re,draggable:F,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:P,formTarget:null,headers:L,height:I,hidden:re,high:I,href:null,hrefLang:null,htmlFor:L,httpEquiv:L,id:null,imageSizes:null,imageSrcSet:null,inert:P,inputMode:null,integrity:null,is:null,isMap:P,itemId:null,itemProp:L,itemRef:L,itemScope:P,itemType:L,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:P,low:I,manifest:null,max:null,maxLength:I,media:null,method:null,min:null,minLength:I,multiple:P,muted:P,name:null,nonce:null,noModule:P,noValidate:P,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:P,optimum:I,pattern:null,ping:L,placeholder:null,playsInline:P,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:P,referrerPolicy:null,rel:L,required:P,reversed:P,rows:I,rowSpan:I,sandbox:L,scope:null,scoped:P,seamless:P,selected:P,shadowRootClonable:P,shadowRootCustomElementRegistry:P,shadowRootDelegatesFocus:P,shadowRootMode:null,shadowRootSerializable:P,shape:null,size:I,sizes:null,slot:null,span:I,spellCheck:F,src:null,srcDoc:null,srcLang:null,srcSet:null,start:I,step:null,style:null,tabIndex:I,target:null,title:null,translate:null,type:null,typeMustMatch:P,useMap:null,value:F,width:I,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:L,axis:null,background:null,bgColor:null,border:I,borderColor:null,bottomMargin:I,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:P,declare:P,event:null,face:null,frame:null,frameBorder:null,hSpace:I,leftMargin:I,link:null,longDesc:null,lowSrc:null,marginHeight:I,marginWidth:I,noResize:P,noHref:P,noShade:P,noWrap:P,object:null,profile:null,prompt:null,rev:null,rightMargin:I,rules:null,scheme:null,scrolling:F,standby:null,summary:null,text:null,topMargin:I,valueType:null,version:null,vAlign:null,vLink:null,vSpace:I,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:P,disablePictureInPicture:P,disableRemotePlayback:P,exportParts:ie,part:L,prefix:null,property:null,results:I,security:null,unselectable:null},space:`html`,transform:fe}),me=le({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:R,accentHeight:I,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:I,amplitude:I,arabicForm:null,ascent:I,attributeName:null,attributeType:null,azimuth:I,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:I,by:null,calcMode:null,capHeight:I,className:L,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:I,diffuseConstant:I,direction:null,display:null,dur:null,divisor:I,dominantBaseline:null,download:P,dx:null,dy:null,edgeMode:null,editable:null,elevation:I,enableBackground:null,end:null,event:null,exponent:I,externalResourcesRequired:null,fill:null,fillOpacity:I,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ie,g2:ie,glyphName:ie,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:I,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:I,horizOriginX:I,horizOriginY:I,id:null,ideographic:I,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:I,k:I,k1:I,k2:I,k3:I,k4:I,kernelMatrix:R,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:I,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:I,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:I,overlineThickness:I,paintOrder:null,panose1:null,path:null,pathLength:I,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:L,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:I,pointsAtY:I,pointsAtZ:I,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:R,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:R,rev:R,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:R,requiredFeatures:R,requiredFonts:R,requiredFormats:R,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:I,specularExponent:I,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:I,strikethroughThickness:I,string:null,stroke:null,strokeDashArray:R,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:I,strokeOpacity:I,strokeWidth:null,style:null,surfaceScale:I,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:R,tabIndex:I,tableValues:null,target:null,targetX:I,targetY:I,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:R,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:I,underlineThickness:I,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:I,values:null,vAlphabetic:I,vMathematical:I,vectorEffect:null,vHanging:I,vIdeographic:I,version:null,vertAdvY:I,vertOriginX:I,vertOriginY:I,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:I,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:de}),he=le({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),ge=le({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:fe}),_e=le({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),ve={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},ye=/[A-Z]/g,be=/-[a-z]/g,xe=/^data[-\w.:]+$/i;function Se(e,t){let n=j(t),r=t,i=M;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&xe.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(be,we);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!be.test(e)){let n=e.replace(ye,Ce);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=se}return new i(r,t)}function Ce(e){return`-`+e.toLowerCase()}function we(e){return e.charAt(1).toUpperCase()}var Te=A([ue,pe,he,ge,_e],`html`),Ee=A([ue,me,he,ge,_e],`svg`);function De(e){return e.join(` `).trim()}var Oe=/\/\*(?:[^*]|\*(?!\/))*\*\//g,ke=/\n/g,Ae=/^\s*/,je=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Me=/^:\s*/,Ne=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,Pe=/^[;\s]*/,Fe=`
|
|
1
|
+
import{n as e,r as t,t as n}from"./rolldown-runtime-XKyaHtl9.js";import{o as r}from"./controls~index~embed-CFqR-DAK.js";import{n as i,t as a}from"./configuration~index~embed~bookmarklet~vehicle-popover~EmbedPanel~Documentation~JoyRideView~~n76yhyet-mgPW9A8j.js";import{i as o,r as s,t as c}from"./react-vendor~index~embed-BNCMh3YF.js";import{a as l,i as u,o as d,t as f}from"./X.es-d7B7rOGv.js";import{t as p}from"./CodeBlock-CpSBaaOX.js";import{D as m,d as h,f as g,u as _}from"./vehicle-popover-zFwrdc1h.js";var v=t(o(),1),y=new Map([[`bold`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128ZM40,76H216a12,12,0,0,0,0-24H40a12,12,0,0,0,0,24ZM216,180H40a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24Z`}))],[`duotone`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M216,64V192H40V64Z`,opacity:`0.2`}),v.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM40,72H216a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16ZM216,184H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z`}))],[`fill`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM192,184H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Z`}))],[`light`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128ZM40,70H216a6,6,0,0,0,0-12H40a6,6,0,0,0,0,12ZM216,186H40a6,6,0,0,0,0,12H216a6,6,0,0,0,0-12Z`}))],[`regular`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM40,72H216a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16ZM216,184H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z`}))],[`thin`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128ZM40,68H216a4,4,0,0,0,0-8H40a4,4,0,0,0,0,8ZM216,188H40a4,4,0,0,0,0,8H216a4,4,0,0,0,0-8Z`}))]]),b=new Map([[`bold`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z`}))],[`duotone`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z`,opacity:`0.2`}),v.createElement(`path`,{d:`M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`fill`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z`}))],[`light`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z`}))],[`regular`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`thin`,v.createElement(v.Fragment,null,v.createElement(`path`,{d:`M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z`}))]]),x=v.forwardRef((e,t)=>v.createElement(u,{ref:t,...e,weights:y}));x.displayName=`ListIcon`;var S=v.forwardRef((e,t)=>v.createElement(u,{ref:t,...e,weights:b}));S.displayName=`MagnifyingGlassIcon`;function C(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var w=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,T=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,E={};function D(e,t){return((t||E).jsx?T:w).test(e)}var O=/[ \t\n\f\r]/g;function k(e){return typeof e==`object`?e.type===`text`&&ee(e.value):ee(e)}function ee(e){return e.replace(O,``)===``}var te=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};te.prototype.normal={},te.prototype.property={},te.prototype.space=void 0;function A(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new te(n,r,t)}function j(e){return e.toLowerCase()}var M=class{constructor(e,t){this.attribute=t,this.property=e}};M.prototype.attribute=``,M.prototype.booleanish=!1,M.prototype.boolean=!1,M.prototype.commaOrSpaceSeparated=!1,M.prototype.commaSeparated=!1,M.prototype.defined=!1,M.prototype.mustUseProperty=!1,M.prototype.number=!1,M.prototype.overloadedBoolean=!1,M.prototype.property=``,M.prototype.spaceSeparated=!1,M.prototype.space=void 0;var ne=e({boolean:()=>P,booleanish:()=>F,commaOrSpaceSeparated:()=>R,commaSeparated:()=>ie,number:()=>I,overloadedBoolean:()=>re,spaceSeparated:()=>L}),N=0,P=ae(),F=ae(),re=ae(),I=ae(),L=ae(),ie=ae(),R=ae();function ae(){return 2**++N}var oe=Object.keys(ne),se=class extends M{constructor(e,t,n,r){let i=-1;if(super(e,t),ce(this,`space`,r),typeof n==`number`)for(;++i<oe.length;){let e=oe[i];ce(this,oe[i],(n&ne[e])===ne[e])}}};se.prototype.defined=!0;function ce(e,t,n){n&&(e[t]=n)}function le(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new se(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[j(r)]=r,n[j(a.attribute)]=r}return new te(t,n,e.space)}var ue=le({properties:{ariaActiveDescendant:null,ariaAtomic:F,ariaAutoComplete:null,ariaBusy:F,ariaChecked:F,ariaColCount:I,ariaColIndex:I,ariaColSpan:I,ariaControls:L,ariaCurrent:null,ariaDescribedBy:L,ariaDetails:null,ariaDisabled:F,ariaDropEffect:L,ariaErrorMessage:null,ariaExpanded:F,ariaFlowTo:L,ariaGrabbed:F,ariaHasPopup:null,ariaHidden:F,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:L,ariaLevel:I,ariaLive:null,ariaModal:F,ariaMultiLine:F,ariaMultiSelectable:F,ariaOrientation:null,ariaOwns:L,ariaPlaceholder:null,ariaPosInSet:I,ariaPressed:F,ariaReadOnly:F,ariaRelevant:null,ariaRequired:F,ariaRoleDescription:L,ariaRowCount:I,ariaRowIndex:I,ariaRowSpan:I,ariaSelected:F,ariaSetSize:I,ariaSort:null,ariaValueMax:I,ariaValueMin:I,ariaValueNow:I,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function de(e,t){return t in e?e[t]:t}function fe(e,t){return de(e,t.toLowerCase())}var pe=le({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:ie,acceptCharset:L,accessKey:L,action:null,allow:null,allowFullScreen:P,allowPaymentRequest:P,allowUserMedia:P,alpha:P,alt:null,as:null,async:P,autoCapitalize:null,autoComplete:L,autoFocus:P,autoPlay:P,blocking:L,capture:null,charSet:null,checked:P,cite:null,className:L,closedBy:null,colorSpace:null,cols:I,colSpan:I,command:null,commandFor:null,content:null,contentEditable:F,controls:P,controlsList:L,coords:I|ie,crossOrigin:null,data:null,dateTime:null,decoding:null,default:P,defer:P,dir:null,dirName:null,disabled:P,download:re,draggable:F,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:P,formTarget:null,headers:L,height:I,hidden:re,high:I,href:null,hrefLang:null,htmlFor:L,httpEquiv:L,id:null,imageSizes:null,imageSrcSet:null,inert:P,inputMode:null,integrity:null,is:null,isMap:P,itemId:null,itemProp:L,itemRef:L,itemScope:P,itemType:L,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:P,low:I,manifest:null,max:null,maxLength:I,media:null,method:null,min:null,minLength:I,multiple:P,muted:P,name:null,nonce:null,noModule:P,noValidate:P,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:P,optimum:I,pattern:null,ping:L,placeholder:null,playsInline:P,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:P,referrerPolicy:null,rel:L,required:P,reversed:P,rows:I,rowSpan:I,sandbox:L,scope:null,scoped:P,seamless:P,selected:P,shadowRootClonable:P,shadowRootCustomElementRegistry:P,shadowRootDelegatesFocus:P,shadowRootMode:null,shadowRootSerializable:P,shape:null,size:I,sizes:null,slot:null,span:I,spellCheck:F,src:null,srcDoc:null,srcLang:null,srcSet:null,start:I,step:null,style:null,tabIndex:I,target:null,title:null,translate:null,type:null,typeMustMatch:P,useMap:null,value:F,width:I,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:L,axis:null,background:null,bgColor:null,border:I,borderColor:null,bottomMargin:I,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:P,declare:P,event:null,face:null,frame:null,frameBorder:null,hSpace:I,leftMargin:I,link:null,longDesc:null,lowSrc:null,marginHeight:I,marginWidth:I,noResize:P,noHref:P,noShade:P,noWrap:P,object:null,profile:null,prompt:null,rev:null,rightMargin:I,rules:null,scheme:null,scrolling:F,standby:null,summary:null,text:null,topMargin:I,valueType:null,version:null,vAlign:null,vLink:null,vSpace:I,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:P,disablePictureInPicture:P,disableRemotePlayback:P,exportParts:ie,part:L,prefix:null,property:null,results:I,security:null,unselectable:null},space:`html`,transform:fe}),me=le({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:R,accentHeight:I,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:I,amplitude:I,arabicForm:null,ascent:I,attributeName:null,attributeType:null,azimuth:I,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:I,by:null,calcMode:null,capHeight:I,className:L,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:I,diffuseConstant:I,direction:null,display:null,dur:null,divisor:I,dominantBaseline:null,download:P,dx:null,dy:null,edgeMode:null,editable:null,elevation:I,enableBackground:null,end:null,event:null,exponent:I,externalResourcesRequired:null,fill:null,fillOpacity:I,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ie,g2:ie,glyphName:ie,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:I,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:I,horizOriginX:I,horizOriginY:I,id:null,ideographic:I,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:I,k:I,k1:I,k2:I,k3:I,k4:I,kernelMatrix:R,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:I,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:I,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:I,overlineThickness:I,paintOrder:null,panose1:null,path:null,pathLength:I,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:L,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:I,pointsAtY:I,pointsAtZ:I,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:R,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:R,rev:R,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:R,requiredFeatures:R,requiredFonts:R,requiredFormats:R,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:I,specularExponent:I,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:I,strikethroughThickness:I,string:null,stroke:null,strokeDashArray:R,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:I,strokeOpacity:I,strokeWidth:null,style:null,surfaceScale:I,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:R,tabIndex:I,tableValues:null,target:null,targetX:I,targetY:I,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:R,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:I,underlineThickness:I,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:I,values:null,vAlphabetic:I,vMathematical:I,vectorEffect:null,vHanging:I,vIdeographic:I,version:null,vertAdvY:I,vertOriginX:I,vertOriginY:I,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:I,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:de}),he=le({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),ge=le({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:fe}),_e=le({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),ve={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},ye=/[A-Z]/g,be=/-[a-z]/g,xe=/^data[-\w.:]+$/i;function Se(e,t){let n=j(t),r=t,i=M;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&xe.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(be,we);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!be.test(e)){let n=e.replace(ye,Ce);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=se}return new i(r,t)}function Ce(e){return`-`+e.toLowerCase()}function we(e){return e.charAt(1).toUpperCase()}var Te=A([ue,pe,he,ge,_e],`html`),Ee=A([ue,me,he,ge,_e],`svg`);function De(e){return e.join(` `).trim()}var Oe=/\/\*(?:[^*]|\*(?!\/))*\*\//g,ke=/\n/g,Ae=/^\s*/,je=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Me=/^:\s*/,Ne=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,Pe=/^[;\s]*/,Fe=`
|
|
2
2
|
`,Ie=`/`,Le=`*`,Re=``,ze=`comment`,Be=`declaration`;function Ve(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var n=1,r=1;function i(e){var t=e.match(ke);t&&(n+=t.length);var i=e.lastIndexOf(Fe);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(Ae)}function u(e){for(var t;t=d();)e.push(t);return e}function d(){var t=a();if(Ie==e.charAt(0)&&Le==e.charAt(1)){for(var n=2;Re!=e.charAt(n)&&(Le!=e.charAt(n)||Ie!=e.charAt(n+1));)++n;if(n+=2,Re===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:ze,comment:o})}}function f(){var e=a(),t=c(je);if(t){if(d(),!c(Me))return s(`property missing ':'`);var n=c(Ne),r=e({type:Be,property:t[0].replace(Oe,Re).trim(),value:n?n[0].replace(Oe,Re).trim():Re});return c(Pe),r}}function p(){var e=[];u(e);for(var t;t=f();)e.push(t),u(e);return e}return l(),p()}function He(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=Ve(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n??={},n[r]=a)}),n}var Ue=Ge(`end`),We=Ge(`start`);function Ge(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Ke(e){let t=We(e),n=Ue(e);if(t&&n)return{start:t,end:n}}function qe(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Ye(e.position):`start`in e||`end`in e?Ye(e):`line`in e||`column`in e?Je(e):``}function Je(e){return Xe(e&&e.line)+`:`+Xe(e&&e.column)}function Ye(e){return Je(e&&e.start)+`-`+Je(e&&e.end)}function Xe(e){return e&&typeof e==`number`?e:1}var z=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=qe(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};z.prototype.file=``,z.prototype.name=``,z.prototype.reason=``,z.prototype.message=``,z.prototype.stack=``,z.prototype.column=void 0,z.prototype.line=void 0,z.prototype.ancestors=void 0,z.prototype.cause=void 0,z.prototype.fatal=void 0,z.prototype.place=void 0,z.prototype.ruleId=void 0,z.prototype.source=void 0;var Ze={}.hasOwnProperty,Qe=new Map,$e=/[A-Z]/g,et=/-([a-z])/g,tt=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),nt=new Set([`td`,`th`]),rt=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function it(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=ht(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=mt(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?Ee:Te,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=at(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function at(e,t,n){if(t.type===`element`)return ot(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return st(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return lt(e,t,n);if(t.type===`mdxjsEsm`)return ct(e,t);if(t.type===`root`)return ut(e,t,n);if(t.type===`text`)return dt(e,t)}function ot(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Ee,e.schema=i),e.ancestors.push(t);let a=xt(e,t.tagName,!1),o=gt(e,t),s=vt(e,t);return tt.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!k(e)})),ft(e,o,a,t),pt(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function st(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}St(e,t.position)}function ct(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);St(e,t.position)}function lt(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Ee,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:xt(e,t.name,!0),o=_t(e,t),s=vt(e,t);return ft(e,o,a,t),pt(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function ut(e,t,n){let r={};return pt(r,vt(e,t)),e.create(t,e.Fragment,r,n)}function dt(e,t){return t.value}function ft(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function pt(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function mt(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function ht(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=We(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function gt(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Ze.call(t.properties,i)){let a=yt(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&nt.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function _t(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else St(e,t.position)}else{let{name:i}=r,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else St(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function vt(e,t){let n=[],r=-1,i=e.passKeys?new Map:Qe;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=at(e,a,o);s!==void 0&&n.push(s)}return n}function yt(e,t,n){if(n==null||typeof n==`number`&&Number.isNaN(n))return;let r=Se(e.schema,t);return Array.isArray(n)&&(n=r.commaSeparated?C(n):De(n)),r.property===`style`?[`style`,typeof n==`object`?e.stylePropertyNameCase===`dom`?n:Ct(n):bt(e,String(n))]:[e.elementAttributeNameCase===`react`&&r.space?ve[r.property]||r.property:r.attribute,n]}function bt(e,t){let n={};try{He(t,function(t,r){if(t&&r){let i=t;i.slice(0,2)!==`--`&&(i=i.toLowerCase(),e.stylePropertyNameCase===`dom`&&(i.slice(0,4)===`-ms-`&&(i=i.slice(1)),i=i.replace(et,Et))),n[i]=r}})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new z("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=rt+`#cannot-parse-style-attribute`,r}return n}function xt(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=D(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=D(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Ze.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);St(e)}function St(e,t){let n=new z("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=rt+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Ct(e){let t={},n;for(n in e)Ze.call(e,n)&&(t[wt(n)]=e[n]);return t}function wt(e){if(e.slice(0,2)===`--`)return e;let t=e.replace($e,Tt);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Tt(e){return`-`+e.toLowerCase()}function Et(e,t){return t.toUpperCase()}var Dt={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},Ot={};function kt(e,t){let n=t||Ot;return At(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function At(e,t,n){if(Mt(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return jt(e.children,t,n)}return Array.isArray(e)?jt(e,t,n):``}function jt(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=At(e[i],t,n);return r.join(``)}function Mt(e){return!!(e&&typeof e==`object`)}var Nt=document.createElement(`i`);function Pt(e){let t=`&`+e+`;`;Nt.innerHTML=t;let n=Nt.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function B(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function V(e,t){return e.length>0?(B(e,e.length,0,t),e):t}var Ft={}.hasOwnProperty;function It(e){let t={},n=-1;for(;++n<e.length;)Lt(t,e[n]);return t}function Lt(e,t){let n;for(n in t){let r=(Ft.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Ft.call(r,a)||(r[a]=[]);let e=i[a];Rt(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Rt(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);B(e,0,0,r)}function zt(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function H(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var U=qt(/[A-Za-z]/),W=qt(/[\dA-Za-z]/),Bt=qt(/[#-'*+\--9=?A-Z^-~]/);function Vt(e){return e!==null&&(e<32||e===127)}var Ht=qt(/\d/),Ut=qt(/[\dA-Fa-f]/),Wt=qt(/[!-/:-@[-`{-~]/);function G(e){return e!==null&&e<-2}function K(e){return e!==null&&(e<0||e===32)}function q(e){return e===-2||e===-1||e===32}var Gt=qt(/\p{P}|\p{S}/u),Kt=qt(/\s/);function qt(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Jt(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&W(e.charCodeAt(n+1))&&W(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function J(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return q(r)?(e.enter(n),s(r)):t(r)}function s(r){return q(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function Yt(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&q(t)?(e.enter(r),c(t)):l(t)}function c(t){return q(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var Xt={tokenize:Zt};function Zt(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),J(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return G(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Qt=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){$t(this,e,t,n,!1)}addBefore(e,t,n){$t(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function $t(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var en={tokenize:nn},tn={tokenize:rn};function nn(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;let c=new Qt;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(tn,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(tn,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return G(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;let l=new Qt;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function rn(e,t,n){return J(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function an(e){if(e===null||K(e)||Kt(e))return 1;if(Gt(e))return 2}function on(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var sn={name:`attention`,resolveAll:cn,tokenize:ln};function cn(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};un(o,-a),un(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=V(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=V(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=V(r,on(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=V(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=V(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),B(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function ln(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=an(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=an(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function un(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var dn={name:`autolink`,tokenize:fn};function fn(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return U(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||W(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||W(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Vt(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Bt(t)?(e.consume(t),l):n(t)}function u(e){return W(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||W(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var pn={partial:!0,tokenize:mn};function mn(e,t,n){return r;function r(t){return q(t)?J(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||G(e)?t(e):n(e)}}var hn={continuation:{tokenize:_n},exit:vn,name:`blockQuote`,tokenize:gn};function gn(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return q(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function _n(e,t,n){let r=this;return i;function i(t){return q(t)?J(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(hn,t,n)(r)}}function vn(e){e.exit(`blockQuote`)}var yn={name:`characterEscape`,tokenize:bn};function bn(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Wt(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var xn={name:`characterReference`,tokenize:Sn};function Sn(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=W,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Ut,u):(e.enter(`characterReferenceValue`),a=7,o=Ht,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===W&&!Pt(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var Cn={partial:!0,tokenize:wn};function wn(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Tn={concrete:!0,name:`codeFenced`,tokenize:En};function En(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),q(t)?J(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||G(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Cn,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||G(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),J(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||G(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||G(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&q(t)?J(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||G(t)?e.check(Cn,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||G(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),q(t)?J(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),q(t)?J(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||G(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var Dn={name:`codeIndented`,tokenize:kn},On={partial:!0,tokenize:An};function kn(e,t,n){return r;function r(t){return e.enter(`codeIndented`),Yt(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):G(t)?e.attempt(On,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||G(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function An(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):G(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):Yt(e,t,a,`linePrefix`,4,4)(o)}function a(e){return G(e)?i(e):n(e)}}var jn={name:`codeText`,previous:Nn,resolve:Mn,tokenize:Pn};function Mn(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Nn(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Pn(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):G(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||G(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var Fn=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&In(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),In(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),In(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);In(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);In(this.left,t.reverse())}}}};function In(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Ln(e){let t={},n=-1,r,i,a,o,s,c,l,u=new Fn(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Rn(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return B(e,0,1/0,u.slice(0)),!l}function Rn(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var zn={resolve:Vn,tokenize:Hn},Bn={partial:!0,tokenize:Un};function Vn(e){return Ln(e),e}function Hn(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):G(t)?e.check(Bn,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Un(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),J(e,a,`linePrefix`)}function a(i){if(i===null||G(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Wn(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Vt(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||G(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||K(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Vt(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function Gn(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):G(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||G(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!q(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Kn(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):G(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),J(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||G(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function qn(e,t){let n;return r;function r(i){return G(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):q(i)?J(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Jn={name:`definition`,tokenize:Xn},Yn={partial:!0,tokenize:Zn};function Xn(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Gn.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=H(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return K(t)?qn(e,l)(t):l(t)}function l(t){return Wn(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Yn,d,d)(t)}function d(t){return q(t)?J(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||G(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Zn(e,t,n){return r;function r(t){return K(t)?qn(e,i)(t):n(t)}function i(t){return Kn(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return q(t)?J(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||G(e)?t(e):n(e)}}var Qn={name:`hardBreakEscape`,tokenize:$n};function $n(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return G(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var er={name:`headingAtx`,resolve:tr,tokenize:nr};function tr(e,t){let n=e.length-2,r=3;if(e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};B(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function nr(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||K(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||G(n)?(e.exit(`atxHeading`),t(n)):q(n)?J(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||K(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var rr=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),ir=[`pre`,`script`,`style`,`textarea`],ar={concrete:!0,name:`htmlFlow`,resolveTo:sr,tokenize:cr},or={partial:!0,tokenize:lr};function sr(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function cr(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:N):U(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):U(a)?(e.consume(a),i=4,r.interrupt?t:N):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:N):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return U(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||K(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&ir.includes(l)?(i=1,r.interrupt?t(s):O(s)):rr.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||W(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return q(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||U(t)?(e.consume(t),b):q(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||W(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):q(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):q(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||G(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||K(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||q(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||G(t)?O(t):q(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),A):t===60&&i===1?(e.consume(t),j):t===62&&i===4?(e.consume(t),P):t===63&&i===3?(e.consume(t),N):t===93&&i===5?(e.consume(t),ne):G(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(or,F,k)(t)):t===null||G(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Cn,ee,F)(t)}function ee(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),te}function te(t){return t===null||G(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function A(t){return t===45?(e.consume(t),N):O(t)}function j(t){return t===47?(e.consume(t),o=``,M):O(t)}function M(t){if(t===62){let n=o.toLowerCase();return ir.includes(n)?(e.consume(t),P):O(t)}return U(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),M):O(t)}function ne(t){return t===93?(e.consume(t),N):O(t)}function N(t){return t===62?(e.consume(t),P):t===45&&i===2?(e.consume(t),N):O(t)}function P(t){return t===null||G(t)?(e.exit(`htmlFlowData`),F(t)):(e.consume(t),P)}function F(n){return e.exit(`htmlFlow`),t(n)}}function lr(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(pn,t,n)}}var ur={name:`htmlText`,tokenize:dr};function dr(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):U(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):U(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):G(t)?(o=d,j(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?A(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):G(t)?(o=h,j(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?A(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?A(t):G(t)?(o=v,j(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):G(t)?(o=y,j(t)):(e.consume(t),y)}function b(e){return e===62?A(e):y(e)}function x(t){return U(t)?(e.consume(t),S):n(t)}function S(t){return t===45||W(t)?(e.consume(t),S):C(t)}function C(t){return G(t)?(o=C,j(t)):q(t)?(e.consume(t),C):A(t)}function w(t){return t===45||W(t)?(e.consume(t),w):t===47||t===62||K(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),A):t===58||t===95||U(t)?(e.consume(t),E):G(t)?(o=T,j(t)):q(t)?(e.consume(t),T):A(t)}function E(t){return t===45||t===46||t===58||t===95||W(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):G(t)?(o=D,j(t)):q(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):G(t)?(o=O,j(t)):q(t)?(e.consume(t),O):(e.consume(t),ee)}function k(t){return t===i?(e.consume(t),i=void 0,te):t===null?n(t):G(t)?(o=k,j(t)):(e.consume(t),k)}function ee(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||K(t)?T(t):(e.consume(t),ee)}function te(e){return e===47||e===62||K(e)?T(e):n(e)}function A(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function j(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),M}function M(t){return q(t)?J(e,ne,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ne(t)}function ne(t){return e.enter(`htmlTextData`),o(t)}}var fr={name:`labelEnd`,resolveAll:gr,resolveTo:_r,tokenize:vr},pr={tokenize:yr},mr={tokenize:br},hr={tokenize:xr};function gr(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&B(e,0,e.length,n),e}function _r(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=V(o,e.slice(i+1,i+r+3)),o=V(o,[[`enter`,l,t]]),o=V(o,on(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=V(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=V(o,e.slice(a+1)),o=V(o,[[`exit`,s,t]]),B(e,i,e.length,o),e}function vr(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(H(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(pr,u,o?u:d)(t):t===91?e.attempt(mr,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(hr,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function yr(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return K(t)?qn(e,a)(t):a(t)}function a(t){return t===41?u(t):Wn(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return K(t)?qn(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Kn(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return K(t)?qn(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function br(e,t,n){let r=this;return i;function i(t){return Gn.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(H(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function xr(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var Sr={name:`labelStartImage`,resolveAll:fr.resolveAll,tokenize:Cr};function Cr(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var wr={name:`labelStartLink`,resolveAll:fr.resolveAll,tokenize:Tr};function Tr(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var Er={name:`lineEnding`,tokenize:Dr};function Dr(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),J(e,t,`linePrefix`)}}var Or={name:`thematicBreak`,tokenize:kr};function kr(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||G(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),q(t)?J(e,s,`whitespace`)(t):s(t))}}var Y={continuation:{tokenize:Nr},exit:Fr,name:`list`,tokenize:Mr},Ar={partial:!0,tokenize:Ir},jr={partial:!0,tokenize:Pr};function Mr(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Ht(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(Or,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Ht(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(pn,r.interrupt?n:u,e.attempt(Ar,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return q(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Nr(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(pn,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,J(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!q(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(jr,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,J(e,e.attempt(Y,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Pr(e,t,n){let r=this;return J(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Fr(e){e.exit(this.containerState.type)}function Ir(e,t,n){let r=this;return J(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!q(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Lr={name:`setextUnderline`,resolveTo:Rr,tokenize:zr};function Rr(e,t){let n=new Qt,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function zr(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),q(t)?J(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||G(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Br={tokenize:Vr};function Vr(e){let t=this,n=e.attempt(pn,r,e.attempt(this.parser.constructs.flowInitial,i,J(e,e.attempt(this.parser.constructs.flow,i,e.attempt(zn,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Hr={resolveAll:Kr()},Ur=Gr(`string`),Wr=Gr(`text`);function Gr(e){return{resolveAll:Kr(e===`text`?qr:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Kr(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):t[r]&&t[r][1].type===`data`||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function qr(e,t){let n=new Qt,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var Jr=e({attentionMarkers:()=>ni,contentInitial:()=>Xr,disable:()=>ri,document:()=>Yr,flow:()=>Qr,flowInitial:()=>Zr,insideSpan:()=>ti,string:()=>$r,text:()=>ei}),Yr={42:Y,43:Y,45:Y,48:Y,49:Y,50:Y,51:Y,52:Y,53:Y,54:Y,55:Y,56:Y,57:Y,62:hn},Xr={91:Jn},Zr={[-2]:Dn,[-1]:Dn,32:Dn},Qr={35:er,42:Or,45:[Lr,Or],60:ar,61:Lr,95:Or,96:Tn,126:Tn},$r={38:xn,92:yn},ei={[-5]:Er,[-4]:Er,[-3]:Er,33:Sr,38:xn,42:sn,60:[dn,ur],91:wr,92:[Qn,yn],93:fr,95:sn,96:jn},ti={null:[sn,Hr]},ni={null:[42,95]},ri={null:[]};function ii(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=V(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=on(a,l.events,l),l.events):[]}function f(e,t){return oi(p(e),t)}function p(e){return ai(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){G(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&B(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ai(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function oi(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
3
3
|
`;break;case-3:o=`\r
|
|
4
4
|
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function si(e){let t={constructs:It([Jr,...(e||{}).extensions||[]]),content:n(Xt),defined:[],document:n(en),flow:n(Br),lazy:{},string:n(Ur),text:n(Wr)};return t;function n(e){return n;function n(n){return ii(t,e,n)}}}function ci(e){for(;!Ln(e););return e}var li=/[\0\t\n\r]/g;function ui(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){li.lastIndex=c;let n=li.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var di=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function fi(e){return e.replace(di,pi)}function pi(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return zt(n.slice(t?2:1),t?16:10)}return Pt(n)||e}var mi={}.hasOwnProperty;function hi(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),gi(n)(ci(si(n).document().write(ui()(e,t,!0))))}function gi(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(_e),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(pe),blockQuote:o(ce),characterEscape:E,characterReference:E,codeFenced:o(le),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(le,s),codeText:o(ue,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(de),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(fe),hardBreakEscape:o(me),hardBreakTrailing:o(me),htmlFlow:o(he,s),htmlFlowData:E,htmlText:o(he,s),htmlTextData:E,image:o(ge),label:s,link:o(_e),listItem:o(ye),listItemValue:p,listOrdered:o(ve,f),listUnordered:o(ve),paragraph:o(be),reference:I,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(pe),strong:o(xe),thematicBreak:o(Ce)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:se,autolinkProtocol:oe,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:ie,characterReferenceMarkerNumeric:ie,characterReferenceValue:R,characterReference:ae,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:D,codeIndented:l(v),codeText:l(A),codeTextData:D,data:D,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(k),hardBreakTrailing:l(k),htmlFlow:l(ee),htmlFlowData:D,htmlText:l(te),htmlTextData:D,image:l(M),label:N,labelText:ne,lineEnding:O,link:l(j),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:L,resourceDestinationString:P,resourceTitleString:F,resource:re,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};vi(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[],position:void 0},o={stack:[r],tokenStack:[],config:t,enter:c,exit:u,buffer:s,resume:d,data:n},l=[],f=[],p=-1;for(;++p<e.length;)f.push(e[p]),(e[p][1].type===`listOrdered`||e[p][1].type===`listUnordered`)&&(e[p][0]===`enter`?l.push(f.length-1):a(f,l.pop()));for(e=f,p=-1;++p<e.length;){let n=t[e[p][0]];e[p][0]===`enter`&&t.beforeEnter.length>0&&i(t.beforeEnter,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),mi.call(n,e[p][1].type)&&n[e[p][1].type].call({...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),e[p][0]===`exit`&&t.afterExit.length>0&&i(t.afterExit,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||bi).call(o,void 0,e[0])}for(r.position={start:_i(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:_i(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)r=t.transforms[p](r)||r;return r}function i(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function a(e,t){let n=e.length-1,r=t-1,i=-1,a=!1,o,s,c,l,u=[];for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let n=r;for(s=void 0;n--;){let t=e[n];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=n}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),u.push({at:s||r,event:[`exit`,o,t[2]]})}if(t[1].type===`listItemPrefix`){let e={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=e,u.push({at:r,event:[`enter`,e,t[2]]}),c=void 0,l=!0}}}let d=e.splice(t),f=0;for(r=-1;++r<d.length;){for(;f<u.length&&u[f].at===t+r;)e.push(u[f++].event);e.push(d[r])}e[t][1]._spread=a}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:_i(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw Error("Cannot close `"+e.type+"` ("+qe({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||bi).call(this,e,r[0])),n.position.end=_i(e.end)}function d(){return kt(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=H(this.sliceSerialize(e)).toLowerCase()}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function S(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function C(){this.data.setextHeadingSlurpLineEnding=!0}function w(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&n.type===`text`||(n=Se(),n.position={start:_i(e.start),end:void 0},t.push(n)),this.stack.push(n)}function D(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=_i(e.end)}function O(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=_i(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.call(this,e),D.call(this,e))}function k(){this.data.atHardBreak=!0}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ne(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=fi(t),n.identifier=H(t).toLowerCase()}function N(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function P(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function re(){this.data.inReference=void 0}function I(){this.data.referenceType=`collapsed`}function L(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=H(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ie(e){this.data.characterReferenceType=e.type}function R(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=zt(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Pt(t);let i=this.stack[this.stack.length-1];i.value+=r}function ae(e){let t=this.stack.pop();t.position.end=_i(e.end)}function oe(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function se(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ce(){return{type:`blockquote`,children:[],position:void 0}}function le(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function ue(){return{type:`inlineCode`,value:``,position:void 0}}function de(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function fe(){return{type:`emphasis`,children:[],position:void 0}}function pe(){return{type:`heading`,depth:0,children:[],position:void 0}}function me(){return{type:`break`,position:void 0}}function he(){return{type:`html`,value:``,position:void 0}}function ge(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function _e(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function ve(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function ye(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function be(){return{type:`paragraph`,children:[],position:void 0}}function xe(){return{type:`strong`,children:[],position:void 0}}function Se(){return{type:`text`,value:``,position:void 0}}function Ce(){return{type:`thematicBreak`,position:void 0}}}function _i(e){return{line:e.line,column:e.column,offset:e.offset}}function vi(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?vi(e,r):yi(e,r)}}function yi(e,t){let n;for(n in t)if(mi.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`afterExit`:case`beforeEnter`:{let r=t[n];r&&e[n].push(r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function bi(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+qe({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+qe({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+qe({start:t.start,end:t.end})+`) is still open`)}function xi(e){let t=this;t.parser=n;function n(n){return hi(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Si(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Ci(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
@@ -29,5 +29,5 @@ import{n as e,r as t,t as n}from"./rolldown-runtime-XKyaHtl9.js";import{o as r}f
|
|
|
29
29
|
`,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=Ws(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}lc.peek=uc;function lc(e){return e.value||``}function uc(){return`<`}dc.peek=fc;function dc(e,t,n,r){let i=zs(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function fc(){return`!`}pc.peek=mc;function pc(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function mc(){return`!`}hc.peek=gc;function hc(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function gc(){return"`"}function _c(e,t){let n=kt(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][+\-.a-z]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}vc.peek=yc;function vc(e,t,n,r){let i=zs(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(_c(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`),u=n.containerPhrasing(e,{before:l,after:`](`,...o.current()});l+=o.move(u),c(),l+=o.move(`](`);let d=/[\0- \u007F]/.test(e.url),f=r.before.charAt(r.before.length-1),p=e.title||void 0;if(!p&&!d&&(f===`
|
|
30
30
|
`||f===`\r`)){let e=0;for(;e<u.length&&u.charCodeAt(e)!==93;)e+=u.charCodeAt(e)===92?2:1;u.charCodeAt(e+1)===58&&(p=``)}return!e.url&&typeof p==`string`||d?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:typeof p==`string`?` `:`)`,...o.current()}))),c(),typeof p==`string`&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(p,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function yc(e,t,n){return _c(e,n)?`<`:`[`}bc.peek=xc;function bc(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function xc(){return`[`}function Sc(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Cc(e){let t=Sc(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function wc(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Tc(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Ec(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?wc(n):Sc(n),s=e.ordered?o===`.`?`)`:`.`:Cc(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if(o!==`*`&&o!==`-`||!t||t.children&&t.children[0]||n.stack[n.stack.length-1]!==`list`||n.stack[n.stack.length-2]!==`listItem`||n.stack[n.stack.length-3]!==`list`||n.stack[n.stack.length-4]!==`listItem`||n.indexStack[n.indexStack.length-1]!==0||n.indexStack[n.indexStack.length-2]!==0||n.indexStack[n.indexStack.length-3]!==0||(c=!0),Tc(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function Dc(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Oc(e,t,n,r){let i=Dc(n),a=n.bulletCurrent||Sc(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function kc(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function Ac(e,t,n,r){if(!e.children.some(function(e){return Os(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function jc(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Mc.attention=Nc,Mc.peek=Pc;function Mc(e,t,n,r){let i=n.enter(`phrasing`),a=rc([tc(e,Nc,n,n.createTracker(r))],r.before,r.after);return i(),a}function Nc(e,t){return{construct:`strong`,markers:jc(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function Pc(e,t,n){return n.options.strong||`*`}function Fc(e,t,n,r){let i=t?t.children:[],a=n.indexStack[n.indexStack.length-1];return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})}function Ic(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Lc(e,t,n){let r=(Tc(n)+(n.options.ruleSpaces?` `:``)).repeat(Ic(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Rc={blockquote:ks,break:Ns,code:Ls,definition:Bs,emphasis:ic,hardBreak:Ns,heading:cc,html:lc,image:dc,imageReference:pc,inlineCode:hc,link:vc,linkReference:bc,list:Ec,listItem:Oc,paragraph:kc,root:Ac,strong:Mc,text:Fc,thematicBreak:Lc};function zc(){return{enter:{table:Bc,tableData:Wc,tableHeader:Wc,tableRow:Hc},exit:{codeText:Gc,table:Vc,tableData:Uc,tableHeader:Uc,tableRow:Uc}}}function Bc(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[],position:void 0},e),this.data.inTable=!0}function Vc(e){this.exit(e),this.data.inTable=void 0}function Hc(e){this.enter({type:`tableRow`,children:[],position:void 0},e)}function Uc(e){this.exit(e)}function Wc(e){this.enter({type:`tableCell`,children:[],position:void 0},e)}function Gc(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Kc));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Kc(e,t){return t===`|`?t:e}function qc(e){let{tableCellPadding:t,tablePipeAlign:n,stringLength:r}=e||{},i=t?` `:`|`;return{handlers:{inlineCode:d,table:a,tableCell:s,tableRow:o},join:[Jc],unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
31
31
|
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}]};function a(e,t,n,r){let i=l(e,n,r),a=i[0];if(a){let t=e.align?e.align.length:0,n=-1;if(!t)for(;++n<i.length;)i[n].length>t&&(t=i[n].length);for(;a.length<t;)a.push(``)}return c(i,e.align)}function o(e,t,n,r){let i=c([u(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
32
|
-
`))}function s(e,t,n,r){let a=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:i,after:i});return o(),a(),s}function c(e,i){return Ts(e,{align:i,alignDelimiters:n,fillRows:!1,padding:t,stringLength:r})}function l(e,t,n){let{children:r}=e,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=u(r[i],t,n);return o(),a}function u(e,t,n){let{children:r}=e,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=s(r[i],e,t,n);return o(),a}function d(e,t,n){let r=Rc.inlineCode(e,t,n);if(!n.stack.includes(`tableCell`))return r;let i=[],a=0,o=r.indexOf(`|`);for(;o!==-1;){let e=o;for(;e>a&&r.charCodeAt(e-1)===92;)e--;i.push(r.slice(a,o)),(o-e)%2==0&&i.push(`\\`),a=o,o=r.indexOf(`|`,o+1)}return i.push(r.slice(a)),i.join(``)}}function Jc(e,t,n,r){if(e.type===`table`&&n.type===`listItem`&&n.spread===!1&&(t.type===`definition`||t.type===`heading`&&Yc(t,r)||t.type===`paragraph`||t.type===`table`))return 1}function Yc(e,t){let n=!1;return ka(e,function(e){if(e.type===`break`||`value`in e&&/\r?\n|\r/.test(e.value))return n=!0,!1}),!!((!e.depth||e.depth<3)&&kt(e)&&(t.options.setext||n))}function Xc(){return{exit:{taskListCheckValueChecked:Qc,taskListCheckValueUnchecked:Qc,paragraph:$c}}}function Zc(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:el}}}function Qc(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function $c(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function el(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Rc.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function tl(){return[Ho(),fs(),_s(),zc(),Xc()]}function nl(e){return{extensions:[Uo(),ps(e),vs(),qc(e),Zc()]}}var rl={tokenize:gl,partial:!0},il={tokenize:_l,partial:!0},al={tokenize:vl,partial:!0},ol={tokenize:yl,partial:!0},sl={tokenize:bl,partial:!0},cl={name:`wwwAutolink`,tokenize:ml,previous:xl},ll={name:`protocolAutolink`,tokenize:hl,previous:Sl},ul={name:`emailAutolink`,tokenize:pl,previous:Cl},Q={};function dl(){return{text:Q}}for(var fl=48;fl<123;)Q[fl]=ul,fl++,fl===58?fl=65:fl===91&&(fl=97);Q[43]=ul,Q[45]=ul,Q[46]=ul,Q[95]=ul,Q[72]=[ul,ll],Q[104]=[ul,ll],Q[87]=[ul,cl],Q[119]=[ul,cl];function pl(e,t,n){let r=this,i,a;return o;function o(t){return!wl(t)||!Cl.call(r,r.previous)||Tl(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return wl(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(sl,u,l)(t):t===45||t===95||W(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&U(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function ml(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!xl.call(r,r.previous)||Tl(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(rl,e.attempt(il,e.attempt(al,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function hl(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Sl.call(r,r.previous)&&!Tl(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(U(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Vt(t)||K(t)||Kt(t)||Gt(t)?n(t):e.attempt(il,e.attempt(al,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function gl(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function _l(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(ol,c,s)(t):t===null||K(t)||Kt(t)||t!==45&&Gt(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function vl(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(ol,t,a)(o):o===null||K(o)||Kt(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function yl(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||K(o)||Kt(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||K(e)||Kt(e)?t(e):r(e)}function a(e){return U(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):U(t)?(e.consume(t),o):n(t)}}function bl(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return W(e)?n(e):t(e)}}function xl(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||K(e)}function Sl(e){return!U(e)}function Cl(e){return!(e===47||wl(e))}function wl(e){return e===43||e===45||e===46||e===95||W(e)}function Tl(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var El={tokenize:Pl,partial:!0};function Dl(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:jl,continuation:{tokenize:Ml},exit:Nl}},text:{91:{name:`gfmFootnoteCall`,tokenize:Al},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Ol,resolveTo:kl}}}}function Ol(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=H(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function kl(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Al(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||K(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(H(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return K(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function jl(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||K(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=H(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return K(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),J(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Ml(e,t,n){return e.check(pn,t,e.attempt(El,t,n))}function Nl(e){e.exit(`gfmFootnoteDefinition`)}function Pl(e,t,n){let r=this;return J(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Fl(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&B(o,o.length,0,on(s,e.slice(r+1,n),t)),B(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),B(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=an(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=an(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Il=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){Ll(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Ll(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function Rl(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function zl(){return{flow:{null:{name:`table`,tokenize:Bl,resolveAll:Vl}}}}function Bl(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):G(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):q(t)?J(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||K(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,q(t)?J(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return q(t)?J(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||G(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return q(t)?J(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||G(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||G(n)?(e.exit(`tableRow`),t(n)):q(n)?J(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||K(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Vl(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Il;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Ul(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Hl(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Hl(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Hl(f,t,o,i,n,d)):(o[0]=o[1],d=Hl(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Ul(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Rl(t.events,n))}return e}function Hl(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Wl(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Wl(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=Wl(t.events,n[2]),a=Wl(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Wl(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Ul(e,t,n,r,i){let a=[],o=Wl(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Wl(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Gl={name:`tasklistCheck`,tokenize:ql};function Kl(){return{text:{91:Gl}}}function ql(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return K(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return G(r)?t(r):q(r)?e.check({tokenize:Jl},t,n)(r):n(r)}}function Jl(e,t,n){return J(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Yl(e){return It([dl(),Dl(),Fl(e),zl(),Kl()])}var Xl={};function Zl(e){let t=this,n=e||Xl,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Yl(n)),a.push(tl()),o.push(nl(n))}var Ql=t(s(),1);function $l({className:e,...t}){return(0,Z.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:d(`group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input bg-transparent outline-none transition-colors dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[aria-invalid=true]]:border-destructive has-[[aria-invalid=true]]:ring-destructive/20`,e),...t})}function eu({className:e,align:t=`inline-start`,...n}){return(0,Z.jsx)(`div`,{"data-slot":`input-group-addon`,"data-align":t,className:d(`flex shrink-0 cursor-text items-center justify-center gap-1.5 text-muted-foreground select-none [&>svg]:size-3.5`,t===`inline-start`?`order-first pl-2.5`:`order-last pr-2`,e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}function tu({className:e,...t}){return(0,Z.jsx)(g,{"data-slot":`input-group-control`,className:d(`min-w-0 flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent`,e),...t})}var nu="## Get started\n\nAdd a drivable car to your page, then choose which elements it can interact with. Start with a script or npm, and mark existing elements with `data-jr-*` attributes.\n\n### Installation\n\nChoose CDN, JavaScript, or React. All three accept the same authored configuration\nand expose the same ride controller.\n\n| Integration | Entry | React runtime | Startup |\n| ----------- | ---------------------- | ------------------------------------------- | --------------------------------------------------- |\n| CDN | `embed.js` | Included | A script with `data-jr-mount` starts automatically. |\n| JavaScript | `@joy-ride/game` | Included | Call `mount()` explicitly. |\n| React | `@joy-ride/game/react` | The application's React 19 and React DOM 19 | Render `JoyRide`; the component owns cleanup. |\n\nChoose one integration per page. The root import, `@joy-ride/game`, bundles React\nand starts only when you call `mount()`. The `/embed` entry adds globals and\ndeclarative script startup; `/react` shares the application's React runtime.\nReact and React DOM are optional package peers; the JavaScript and CDN entries do\nnot need an installed React runtime.\n\n#### CDN\n\nPaste this into an HTML page:\n\n```html\n<h1\n data-jr-breakable\n>\n Drive through this headline\n</h1>\n\n<script\n type=\"module\"\n src=\"https://unpkg.com/@joy-ride/game@latest/embed.js\"\n data-jr-mount\n><\/script>\n```\n\n`data-jr-mount` starts Joy Ride when the document is ready. Drive with **WASD** or the arrow keys; click the car to change vehicles. See [Script tag options](#jr-doc-script-tag-options) for presets, saved preferences, routing, and arrival targets.\n\n#### npm, pnpm, or Yarn\n\n```sh\nnpm install @joy-ride/game\n```\n\nUse `pnpm add` or `yarn add` instead if those manage your project. Mount after the\npage elements exist. This entry includes React and React DOM internally; no\nframework installation is needed.\n\n```ts\nimport { mount } from '@joy-ride/game';\n\nconst ride = mount();\n\nawait ride.ready;\n\n// Call ride.dispose() when the host view is removed.\n```\n\nThe package import does not mount automatically. It is safe to import during\nserver rendering, but call `mount()` only in the browser after page content exists.\n\n#### React\n\nIn an application using React 19 and React DOM 19, import the React entry so Joy\nRide shares the application's runtime. It does not include another copy of React.\n\n```tsx\n'use client';\n\nimport { JoyRide } from '@joy-ride/game/react';\n\nexport const JoyRideExperience = () => (\n <JoyRide\n initialOptions={{\n player: { vehicle: 'porsche-911-997' },\n game: { quality: 'high', masterVolume: 0 },\n }}\n />\n);\n```\n\n`JoyRide` mounts after the component reaches the browser and disposes the ride on\nunmount. It renders its controls through the host React tree, supports Strict Mode,\nand does not create a separate React root. The initial options accept the same\n`MountOptions` or saved `PlaygroundConfiguration` as `mount()`.\n\n| Prop | Meaning |\n| ---------------- | ------------------------------------------------------------------------------------------------- |\n| `preset` | Named defaults, currently `\"sfw\"`. Applied once at mount; explicit initial options override them. |\n| `initialOptions` | Initial authored configuration. Read when mounting; use a new component `key` to replace it. |\n| `settings` | Live `RuntimeOptionsPatch` for `game` and `dialog`, applied without remounting. |\n| `ref` | A React ref to `RideController` or `null`; commands that need the world still await `ride.ready`. |\n| `onReady` | Receives the initialized `RideController`. |\n| `onError` | Receives an initialization, presentation, or live settings error. |\n\nThe entry also exports the same imperative API and types for integrations that\nneed to call `mount()` in their own lifecycle. A default import remains the\nimperative API; the `JoyRide` component is a named export. Use `/react` rather than\nwrapping the root JavaScript API in a React component, which would load an additional bundled React.\n\n#### Lazy loading React with a preset\n\nThe component resolves its preset after it loads, so the host only imports the\nReact entry inside `lazy()`:\n\n```tsx\n'use client';\n\nimport { lazy, Suspense } from 'react';\n\nconst JoyRideGame = lazy(() =>\n import('@joy-ride/game/react').then(({ JoyRide }) => ({ default: JoyRide })),\n);\n\nexport const JoyRideExperience = () => (\n <Suspense fallback={null}>\n <JoyRideGame\n preset=\"sfw\"\n initialOptions={{ player: { vehicle: 'porsche-911-997' } }}\n />\n </Suspense>\n);\n```\n\n`preset` and `initialOptions` are read once when mounting. The preset supplies\n`game` and `dialog` defaults; explicit initial options win within each group.\nSaved playground configurations remain supported and their authored settings win.\nUse a new component `key` to apply a different preset or initial configuration;\n`settings` continues to apply live updates without remounting. Unknown preset\nnames report an initialization error through `onError`.\n\n### A playground in HTML\n\n```html\n<main>\n <h1\n data-jr-breakable\n data-jr-burnable\n >\n Make a mess.\n </h1>\n <div style=\"background: #fafbfc\">Your own layout</div>\n <div\n data-jr-liquid=\"paint\"\n data-jr-liquid-color=\"#5271ff\"\n >\n Blue paint\n </div>\n <button\n data-jr-trigger=\"click\"\n >\n Drive over me\n </button>\n <output\n data-jr-hud=\"speed\"\n >\n 0\n </output> mph\n</main>\n```\n\nThe script from [Installation](#jr-doc-installation) starts the ride. The module import needs an explicit `JoyRide.mount()` call.\n\nAn empty capability attribute or `true` enables it; `false` disables it. Values use the units in their names, such as seconds, metres, or CSS pixels.\n\n### A playground in JavaScript\n\n```ts\nimport JoyRide from '@joy-ride/game';\n\nconst ride = JoyRide.mount({\n game: { masterVolume: 0 },\n});\n\nconst titles = ride.bind('.playful-title', {\n breakable: { health: 80 },\n burnable: { burnSeconds: 12 },\n});\n\nawait ride.ready;\nride.player?.update({ appearance: 'auto' });\n```\n\nSelectors, attributes, and exact-element bindings share the same schema and validation. A selector binding includes future matches. An exact-element binding overrides that element's attributes.\n\nJoy Ride finds authored objects throughout the page. Add a behavior to any existing element; no playground wrapper is needed.\n\n### Lifecycle and readiness\n\n`JoyRide.mount()` returns a controller immediately. You can register bindings and listeners while it loads. Await `ride.ready` before world commands such as spawning vehicles or pouring liquid. `ride.player` and `ride.state` are `null` until ready; tours wait automatically.\n\nOnly one ride can be mounted on a page. `JoyRide.active` returns its controller, or `undefined`. Call `ride.dispose()` before mounting another; repeated disposal is safe. Disposal restores the page and releases listeners and resources. Initialization errors reject `ride.ready` and clean up. Commands fail after disposal; `ride.player` and `ride.state` return `null`.\n\nSound starts muted until a browser user gesture permits it. `ride.startAudio()` explicitly requests audio startup; browser autoplay rules still apply.\n\n### Coordinate conventions\n\nBrowser placement, vehicle snapshots, and public event positions use CSS **document pixels**, X right and Y down. `angleDeg` is clockwise. Vehicle speed is `speedMps`. A supplied element places a vehicle or pour at its centre. Vehicle state is deeply readonly.\n\nCanvas level definitions and low-level simulation positions use **metres**, X right and Y up. Do coordinate conversion at the browser/canvas boundary.\n\n## Page objects\n\nMake existing page elements block the car, move, break, burn, or crush. Use HTML attributes for simple setups and `ride.bind()` for JavaScript control.\n\n### Object capabilities\n\n`ObjectSpec` describes an existing page element. Each capability accepts a boolean or its option object, except `solid`/`pushable` which are booleans.\n\n| Property | Options / meaning |\n| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |\n| `id` | Stable scene ID; unique across registered objects. Otherwise generated. |\n| `object` | Named object recipe from `definitions.objects`. |\n| `enabled` | `false` suspends the resolved object's capabilities. |\n| `solid` | Blocking element bounds. |\n| `pushable` | Pushable lettering; not an arbitrary DOM rigid body. |\n| `breakable` | `true` or `{ health?: positive number }`. |\n| `burnable` | `true` or `{ burnSeconds?, ignitionSeconds?, spreadSeconds? }`; durations in seconds. Burn duration is positive; ignition/spread may be zero. |\n| `combustible` | Fuel lifecycle: `true` or `{ health?, burnSeconds?, blastRadiusPx? }`. Positive values. |\n| `crushable` | `true` or `{ scale?, opacity? }`, each between 0 and 1. |\n| `points` | Optional nonnegative points awarded when the object is destroyed, a pickup is collected, or a parking/stop zone qualifies. |\n| `liquid` | Liquid recipe and options; see Liquids in HTML. |\n| `pickupEffectColor` | Optional pickup ripple color: six-digit hex or RGB tuple. |\n| `trigger` | Zone preset/options; see Objectives and points. |\n| `hud` | One readout `{ field, unit?, precision? }`, or `false`. |\n| `meta` | JSON-compatible application metadata; available on object snapshots/events. |\n\nBreakable artwork supports text and root SVG elements. Liquid paint supports HTML and filled SVG shapes (`rect`, `circle`, `ellipse`, `path`, and polygons). Triggers, crushing, combustible fuel, and pushable text require HTML elements. Solidity and HUD readouts support more target types. Unsupported targets report a diagnostic.\n\n### Compatibility rules\n\n- `breakable` and `burnable` can be used independently or together.\n- `combustible` excludes `breakable`; `burnable` can set its fire profile.\n- `crushable` excludes `breakable` and explicit `solid: true`; crushing combustible fuel is allowed.\n- HUD readouts exclude breakable/burnable/pushable artwork and paint on the same node. Artwork traversal skips HUD-owned descendant text. Use separate sibling targets for independent content.\n- Vehicles have their own JS configuration and are never created through `ride.bind` or HTML.\n\nTypeScript catches incompatible literal configurations. Runtime validation checks complete merged results, including future DOM edits and JavaScript callers.\n\n### Composition and precedence\n\nFrom lowest to highest precedence: engine defaults, named recipe, selector registrations in registration order, explicit attributes, exact-element registrations in registration order, then internal object overrides.\n\nNested options merge, arrays replace, and `undefined` never erases a lower value. `false` disables a capability. Changing a slot action replaces incompatible old action options.\n\n```ts\nconst binding = ride.bind('.timber', {\n breakable: true,\n burnable: { burnSeconds: 10 },\n});\n\nbinding.update({ burnable: { ignitionSeconds: 0.2 } });\nbinding.replace({ breakable: true }); // this layer stops adding burning\nbinding.dispose(); // reveal attributes / lower bindings\n```\n\n### Binding handles and inspection\n\n`PlaygroundBinding` exposes `objects`, `update(patch)`, `replace(spec)`, `refresh()`, and `dispose()`.\n\n`objects` lists matching readonly snapshots: `{ id, target, spec, revision }`. Use `update` to merge this binding’s options, `replace` to replace them, and `dispose` to remove the binding. Bindings have no separate readiness promise.\n\nSelector bindings automatically track structural/attribute changes and input/change/focus events. Call `binding.refresh()` after programmatic state changes that do not produce those events, or for transient selectors such as `:hover`/`:active`. Exact-element/iterable bindings have an explicit fixed target set.\n\nInvalid JS edits throw before committing the affected configuration. Invalid DOM edits retain the last valid configuration and emit `joyride:diagnostic`.\n\n### Object HTML attributes\n\n| Attribute | Meaning |\n| ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |\n| `data-jr-id` | Stable object ID. |\n| `data-jr-object` | Named object recipe. |\n| `data-jr-enabled` | Boolean suspension. |\n| `data-jr-solid` | Block the vehicle. |\n| `data-jr-pushable` | Allow the vehicle to push the element. |\n| `data-jr-points` | Optional nonnegative points for destruction, pickup collection, or a qualified parking/stop zone. |\n| `data-jr-breakable` | Enable fragmentation. |\n| `data-jr-breakable-health` | Fragmentation toughness. |\n| `data-jr-burnable` | Independent artwork burning. |\n| `data-jr-burnable-burn-seconds` | Burning duration. |\n| `data-jr-burnable-ignition-seconds` | Flame exposure before ignition. |\n| `data-jr-burnable-spread-seconds` | Artwork fire-spread duration. |\n| `data-jr-combustible` | Enable the fuel lifecycle. |\n| `data-jr-combustible-health` | Fuel health. |\n| `data-jr-combustible-burn-seconds` | Fuel burn duration. |\n| `data-jr-combustible-blast-radius-px` | Explosion radius in CSS pixels. |\n| `data-jr-crushable` | Enable crushing. |\n| `data-jr-crushable-scale` | Scale after crushing. |\n| `data-jr-crushable-opacity` | Opacity after crushing. |\n| `data-jr-meta-*` | String metadata; kebab names become camelCase metadata keys. |\n| `data-jr-ui` | Mark host controls as UI so driving input does not steal their interactions. Explicit HUD readouts can live inside UI. |\n\nUse `data-jr-foreground` on host UI that should stay above the vehicle and effects overlay. `data-jr-camera=\"fixed\"` or `data-jr-camera=\"follow\"` changes camera behavior while the car overlaps that region; `data-jr-camera-zoom` sets its zoom. `data-jr-auto-paint=\"false\"` excludes an element subtree from automatic paint. These page attributes are separate from the object capability attributes above.\n\n### Crush appearance and paint\n\nAdd `data-jr-crushable` to an HTML element. It crushes when the visible vehicle covers at least half its area, including CSS rotation and scale. Use `data-jr-crushable-crushed-class` to style the result; otherwise it squashes and fades. Add `data-jr-crushable-crushed-paint-color` for a paint spill sized to the element. Colors accept six-digit hex or JavaScript RGB tuples.\n\n```html\n<div\n data-jr-crushable\n data-jr-crushable-crushed-class=\"is-crushed\"\n data-jr-crushable-crushed-paint-color=\"#8caa27\"\n>\n Your element\n</div>\n```\n\nThe JavaScript equivalent is `ride.bind(element, { crushable: { crushedClass: 'is-crushed', crushedPaintColor: '#8caa27' } })`. Both options are optional. Reset restores the original appearance and removes engine-added classes. The ant artwork on the homepage is an example, not a built-in object type.\n\n### Debris\n\nScatter paper and leaves that react to passing cars. Paper lifts and folds; leaves skid and spin. Set a seed for a repeatable starting arrangement.\n\n```html\n<div\n data-jr-debris\n data-jr-debris-anchor=\"bottom\"\n data-jr-debris-amount=\"35\"\n data-jr-debris-kinds=\"paper leaf\"\n data-jr-debris-seed=\"42\"\n>\n Your ordinary element\n</div>\n```\n\n```js\nawait ride.ready;\nconst litter = ride.debris('.track', {\n anchor: 'center',\n amount: 40,\n // Omit kinds to include both materials.\n kinds: ['paper', 'leaf'],\n spread: 120,\n seed: 42,\n wind: { x: 7, y: -2 },\n});\nlitter.gust({ x: 300, y: -65 });\nlitter.reset();\n// litter.dispose();\n```\n\n`ride.debris(target, options?)` accepts a selector, Element, or iterable of elements. Each match gets its own collection. Selectors include future matches; removing an element removes its debris. You can also use `ride.bind('.track', { debris: { amount: 35, anchor: 'bottom' } })` or HTML attributes. HTML attributes take effect once a ride is mounted.\n\n| Option | HTML attribute | Meaning |\n| -------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `amount` | `data-jr-debris-amount` | Integer 0–600 per source, default 30; scene cap 3,000. |\n| `kinds` | `data-jr-debris-kinds` | `paper` or `leaf`; space/comma separated in HTML. Omit for both. |\n| `anchor` | `data-jr-debris-anchor` | `center`, `top`, `top-right`, `right`, `bottom-right`, `bottom`, `bottom-left`, `left`, `top-left`, or `fill` across the element. Default `center`. |\n| `spread` | `data-jr-debris-spread` | Scatter radius in scene pixels, default based on element size. `fill` uses the full bounds. |\n| `seed` | `data-jr-debris-seed` | Repeatable initial arrangement, default 31. |\n| `color` | `data-jr-debris-color` | Optional 3/6-digit hex tint for paper or leaves. |\n| `wind.x` | `data-jr-debris-wind-x` | Horizontal ambient wind in scene pixels/second; default `7`. |\n| `wind.y` | `data-jr-debris-wind-y` | Vertical ambient wind in scene pixels/second; default `-2`. Set both axes in HTML. |\n\n`reset()` restores the starting arrangement, `gust({x,y})` adds wind, and `dispose()` removes the collection. Scene reset restores authored debris; checkpoints preserve its motion. Resting pieces outside the viewport sleep to save work.\n\nDebris is explicit. Background styling never scatters physical debris. Add `data-jr-debris`, a `debris` definition, or call `ride.debris()` wherever you want a source.\n\nFor custom canvas hosts, import `Debris` from `@joy-ride/engine/debris`. Use `scatter({x,y,width,height}, options)` and `step(seconds, vehicles, viewport, walls)` with scene-pixel geometry. The normal game loop already updates `world.renderer.debris`. Custom renderers can call `drawDebris(context, particles, viewport, dark, layer)`: draw `ground` before vehicles and `air` after.\n\n## Vehicles and tools\n\nChoose a vehicle, assign its tools, or define your own preset.\n\n### Create and configure a vehicle\n\n```ts\nconst kit = JoyRide.define({\n liquids: { ink: { base: 'paint', color: '#5271ff' } },\n vehicles: {\n artist: {\n base: 'electric-gt',\n slots: { 1: { action: 'eject', liquid: 'ink' } },\n },\n },\n});\n\nconst ride = JoyRide.mount({ definitions: kit, player: { vehicle: 'artist' } });\nawait ride.ready;\nconst parkedCar = ride.spawnVehicle({\n vehicle: 'artist',\n at: { xPx: 300, yPx: 500 },\n angleDeg: 90,\n});\n```\n\n`VehicleSpawnOptions` extends `VehicleConfiguration` with `at?: PageTarget` and `angleDeg?: number`. `PageTarget` is an Element, CSS selector, or `{ xPx, yPx }` point in document CSS pixels. The same target shape is used by `ride.pour` and `ride.enterAt`. `vehicle` is a built-in or named recipe. `id?` supplies a unique ID. Spawned vehicles are parked; the mounted player remains the only drivable car. Initial `mount.player` only accepts `vehicle`, `appearance`, and `slots`.\n\nBuilt-in vehicle IDs: `porsche-911-997`, `ford-mustang-gt-2024`, `bmw-m4-2024`, `jeep-wrangler-2026`, `subaru-wrx-2024`, `audi-rs3-2024`, `lamborghini-huracan-evo-2023`, and `electric-gt`. Use `JoyRide.listVehicleOptions()` to discover the available picker IDs and labels. In the Vehicle tab, the grid button immediately before **Next** shows all vehicles. Selecting one returns to its preview; `dialog.showVehicleNames` controls labels in both views.\n\n### Vehicle handles and snapshots\n\n| Member | Meaning |\n| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |\n| `handle.id` | Stable vehicle identity. |\n| `handle.state` | Deeply readonly `{ id, vehicle, position, speedMps, health, maxHealth, appearance, slots }`. Materials use authored names. |\n| `handle.update(patch)` | Validate the whole candidate before changing it. Recipe switches rebase appearance/slots; option-only patches retain the current vehicle. |\n| `handle.pickupEffect(input)` | Play a contact-centered optical pickup pulse; see Pickup refraction. |\n| `handle.useSlot(number)` | Pulse an assigned slot; returns whether input was accepted. |\n| `handle.startSlot(number)` | Hold an assigned slot; returns whether input was accepted. |\n| `handle.stopSlot(number)` | Release it. |\n| `handle.dispose()` | Remove the vehicle and release held actions; idempotent. |\n\n`VehiclePatch` can edit existing slot options without repeating their action. Supplying a new action requires its complete configuration. Updating a live ID to a different ID is rejected. Handles continue to identify the same vehicle across same-world checkpoint restoration.\n\n### Appearance and automatic contrast\n\n`appearance` is `'auto'`, `'light'`, or `'dark'`. Auto samples the actual ground beneath each car, including translucent layers; explicit values override it. This is independent of the page/UI theme, background styling, and individual light switches. An explicitly disabled headlight stays disabled.\n\n### Slot assignments\n\nSlots are numbered 1–9. The default assignments are oil emission, machine gun, flamethrower, rocket, ghost, attractor, and lightning in slots 1–7. Slots 8–9 are unassigned. `false` disables an assignment. Available assignments keep their authored order, but their keyboard and `useSlot` numbers close gaps when a slot or tool is disabled. A key already held when assignments change must be released before it can activate its new tool. `handle.state.slots` retains the authored assignments.\n\n```ts\nride.player?.update({\n slots: { 1: { action: 'eject', liquid: 'mud', activation: 'hold', rate: 6, amount: 0.65 } },\n});\nride.player?.update({ slots: { 1: { rate: 3 } } });\nride.player?.useSlot(1);\n```\n\n| Field | Values |\n| ------------ | ------------------------------------------------------------------------------------------------------------ |\n| `action` | `'eject'`, `'machineGun'`, `'flamethrower'`, `'rocket'`, `'ghost'`, `'attractor'`, `'lightning'`, `'boost'`. |\n| `activation` | `'tap'` or `'hold'`; default hold. |\n| `liquid` | Required for eject; forbidden for other actions. |\n| `rate` | Eject dose per second while held; positive; default 6. |\n| `amount` | Eject pulse dose; positive; default 0.65. |\n\nLiquid doses are engine units, not litres. The `toolsEnabled` switch and ghost rules apply to player and JS-created vehicles. Tool use and liquid emission are unlimited. Direct `ride.pour` places liquid in the scene. There are no HTML vehicle/weapon-slot attributes.\n\n### Lightning and electrical fields\n\nHold **7** to charge lightning; it fires after 1.1 seconds. Releasing early cancels it. Targets include nearby breakable, burnable, or pushable objects and vehicles, with a preference for targets ahead. The default range is one third of the viewport width; set `lightning.rangeM` for a fixed range or `forwardBias: 0` to target only by distance. Hold to repeat; each discharge keeps its charge time.\n\nA hit halves a vehicle’s current speed and its speed/drive-force limits for four seconds. Another hit refreshes the duration. The shooter and ghost vehicles are excluded, and shocks do not damage vehicle health. Reset and checkpoints include this status.\n\nConfigure a vehicle's optional `lightning` profile in code:\n\n```ts\nconst definitions = JoyRide.define({\n vehicles: {\n electric: {\n base: 'porsche-911-997',\n lightning: {\n rangeM: 10,\n forwardBias: 1.5,\n chargeSeconds: 1.1,\n statusSeconds: 4,\n speedFactor: 0.5,\n impactRadiusM: 1.6,\n damage: 75,\n impulse: 1,\n ignite: true,\n },\n },\n },\n});\n```\n\n`lightningDefaults`, `lightningProfile`, and `LightningProfile` are available from `@joy-ride/engine/vehicles`. Lightning pushes movable targets and respects their damage and burning capabilities. Advanced hosts can import `AreaImpact`, `rocketAreaImpact`, and `rocketImpactDefaults` from `@joy-ride/engine/physics`, and apply them through `SceneGeometry.applyAreaImpact`. Debug view shows the lightning range.\n\nConductive liquid carries lightning to connected objects and vehicles, even beyond the initial range. Dry gaps and nonconductive material stop it. Set `conductive: true` or `false` in a liquid definition to override its base material.\n\nHold **6** to attract loose pieces. A soft electrical field follows its pull radius; existing channels stay in place as the car moves.\n\nA connected strike flashes along its path and fades over 1.5 seconds. Camera shake respects `screenShake`; customize the `lightning` entry in `screenShakeProfiles` to change it.\n\n### Vehicle definition fields\n\nA `VehicleDefinition` is a deep partial of `VehiclePreset` without its engine ID, plus required `base`, optional `appearance`, and `slots`. Inherit a built-in and override only what you need. For image and physics tuning, run `pnpm run vehicle-editor` from the Joy Ride repository. The editor opens separately from the runtime dialog.\n\n| Group | Fields |\n| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Identity | `name`, `description`, `make`, `model`, `year`. |\n| Mass and health | `massKg`, `health`, `frontWeightFraction`. |\n| Geometry | `lengthM`, `widthM`, `wheelbaseM`, `frontAxleXM`, `rearAxleXM`, `trackWidthM`, `frontTrackWidthM`, `rearTrackWidthM`, `tireLengthM`, `tireWidthM`. |\n| Driving | `engineForceN`, `reversePowerRatio`, `maxReverseSpeedMps`, `rollingResistance`, `coastDecelerationMps2`, `handbrakeDecelerationMps2`, `serviceBrakeDecelerationMps2`, `lateralResistance`, `corneringAccelerationMps2`, `maxSteerAngleRad`, `handbrakeStrength`. |\n| `drift` | `entrySpeedMps`, `slipAngleRad`. |\n| `launch` | `minRpm`, `boostMps`, `boostedBoostMps`, `assistDurationSeconds`, `burnoutRampSeconds`, `chargedSpinSeconds`, `fireLifetimeSeconds`. |\n| `driveBoost` | `gainMps`, `durationSeconds`. |\n| `exhaust` / `lights` | Exhaust layout and `headlights`/`taillights` positions `{xM,yM}`. |\n| `roofRocket` | `xM`, `yM`, `sizeM`, `panelColor`. |\n| `machineGuns` | `xM`, `revealM`, `roundsPerSecond`, `bulletSpeedMps`, `bulletLifetimeSeconds`. |\n| `flamethrower` | `rangeM`, `ignitionSeconds`, `spreadSeconds`, `spreadRadiusPx`, `burnSeconds`, `smokePerSecond`, `jetWidthM`, `flowRate`. |\n| `rockets` | `roundsPerSecond`, `launchSpeedMps`, `accelerationMps2`, `maxSpeedMps`, `lifetimeSeconds`, `smokePerSecond`. |\n| `sound` | `engineId`, `vehicleId`, `engineLabel`, `turbo`, `horn`, and electric pedestrian/motor fade ranges. |\n| `visual` | Fallback `color` and shape: `coupe`, `sedan`, `suv`, or `supercar`. |\n| `image` | `src`, normalized `crop`, `scale`, `wheelVisualScale`, `wheelEdgeHalfWidthM`. Nose points right. |\n\n`sound.horn` has `lowHz`, `highHz`, `tone` (`disc`, `trumpet`, `electronic`), and `level`. Electric sound fade fields are `fadeStartMps`, `fadeEndMps`, `motorFadeStartMps`, and `motorFadeEndMps`. Image `crop` has `x`, `y`, `width`, `height` in normalized coordinates; `wheelVisualScale` has `length`, `width`; `wheelEdgeHalfWidthM` has `front`, `rear`. Exhaust layout is `left`, `right`, `center`, or `left-right`. Lamps use mirrored `{xM,yM}` positions.\n\n## Fire and liquids\n\nSet artwork alight, leave a liquid trail, or let the tires pick up and mix paint.\n\n### Fire and explosions\n\nHold **3** to ignite burnable artwork or liquid. Fire spreads to nearby burnable surfaces. Add `combustible` when an element should also have health and explode:\n\n```html\n<h2\n data-jr-burnable\n data-jr-burnable-burn-seconds=\"12\"\n>\n Light this up\n</h2>\n<div\n data-jr-combustible\n>\n Fuel\n</div>\n```\n\nUse `burnable` for text, SVG artwork, or colored HTML surfaces. Use `combustible` for an HTML fuel object. See [Object capabilities](#jr-doc-object-capabilities) for durations, health, and compatibility rules.\n\n### Liquids in HTML\n\n```html\n<div\n data-jr-liquid=\"paint\"\n style=\"background: #5271ff\"\n>\n Take some blue\n</div>\n<div\n data-jr-liquid=\"oil\"\n></div>\n<svg viewBox=\"0 0 100 100\" width=\"100\" height=\"100\">\n <circle\n data-jr-liquid=\"paint\"\n cx=\"50\"\n cy=\"50\"\n r=\"42\"\n fill=\"#e03139\"\n />\n</svg>\n```\n\n```ts\nride.bind('.paint-pad', { liquid: { kind: 'paint', color: '#5271ff', distanceM: 30 } });\n```\n\n| JS option | HTML attribute | Meaning |\n| ------------- | ---------------------------- | ----------------------------------------------------------------------------- |\n| `kind` | `data-jr-liquid` | Any built-in or defined liquid recipe, such as `oil`, `water`, or `paint`. |\n| `color` | `data-jr-liquid-color` | Six-digit hex, JS RGB tuple, or `'auto'`; defaults to the CSS fill or recipe. |\n| `distanceM` | `data-jr-liquid-distance-m` | Nonnegative tire carry distance. |\n| `opacity` | `data-jr-liquid-opacity` | 0…1, multiplied by the recipe's opacity. |\n| `deformation` | `data-jr-liquid-deformation` | 0…4. |\n\nLiquids inherit their recipe’s handling, fire, and electrical properties. HTML liquids follow the element’s border, rounded corners, and transforms; SVG liquids follow the filled shape and supported clip paths. Tire contact can deform either without adding volume. Text and other HTML content stay above the liquid.\n\nWith `game.autoPaint: true`, eligible colored HTML backgrounds and SVG fills become paint. Named colors, HSL, OKLCH, and Display P3 are supported. Neutral colors, pale tints, and nearly black backgrounds stay unchanged. Use `data-jr-auto-paint=\"false\"` on an element or ancestor to exclude it. Unsupported SVG masks and clips remain ordinary artwork. Paint mixes with tire pigment. Use `ride.pour` or an emitter for liquid placed independently of an element.\n\n### Liquid definitions\n\nBuilt-ins include `oil`, `water`, `mud`, `paint`, `iridescent-oil`, `clear-water`, `wet-clay`, and experimental `concept-water`, `concept-oil`, `concept-syrup`, `concept-clay`, `concept-lava`, `concept-acid`, and `concept-paint`.\n\n| Field | Meaning |\n| --------------- | ----------------------------------------------------------------------------------------- |\n| `base` | Existing built-in or catalog liquid name. |\n| `color` | Six-digit hex or RGB tuple, 0…255 channels. |\n| `thickness` | Material thickness, 0…1. |\n| `deformation` | Tire-driven outline deformation, 0…4. |\n| `opacity` | Material opacity, 0…1. |\n| `burnLifetime` | Positive seconds of fuel at an ignited location. |\n| `conductive` | Boolean; inherit the base material. Water conducts; oil, paint and mud do not by default. |\n| `burnable` | Boolean; inherit the base material. Oil burns; water, paint and mud do not by default. |\n| `fireSpreadMps` | Positive connected-surface fire-front speed. |\n| `effect` | Optional status-effect definition refreshed on wheel contact. |\n\n`burnable` and `conductive` are independent and inherit from the base liquid. For example, `{ base: 'paint', burnable: true, conductive: true, burnLifetime: 8 }` both burns and carries electricity; `{ base: 'oil', burnable: false }` keeps oil's handling without catching fire. Flames, explosions, lightning heat, and connected fire spread all respect `burnable`. Newly burnable materials default to 12 seconds of fuel and 3.2 metres/second of fire spread unless overridden.\n\nBurning text, SVG artwork, painted HTML boxes, combustible objects, and burnable liquid can ignite nearby materials. Text and SVG spread through neighboring ink, liquids spread through connected wet cells, and combustible objects follow their health and explosion lifecycle. Heat crosses between those materials at nearby burning points; the same scene-fire renderer draws their flames and smoke. A colored element with `data-jr-burnable` burns as a surface; add `data-jr-combustible` when it should also have health and an explosion.\n\nAn effect specifies `lifetime` and `modifiers`, with optional `additiveModifiers` and `intensity: 'linear' | 'pulse' | 'constant'`. Lifetime uses `{ unit: 'seconds' | 'distanceM', amount }`; modifiers are factors such as grip, speed, or drive force. Additive modifiers apply finite stat changes. `StatusEffectDefinition` is exported from `@joy-ride/engine`.\n\n### Pouring liquid\n\n```ts\nride.pour('ink', { at: document.querySelector('#paint-zone')!, amount: 24 });\nride.pour('water', { at: { xPx: 300, yPx: 500 }, amount: 12 });\n```\n\n`ride.pour(liquid, {at, amount?, color?})` resolves a catalog liquid, converts document placement, and deposits it. `at` accepts the same `PageTarget` as vehicle spawning and entry. Amount must be finite and positive, default 24. `color` is an optional pigment override. Slots can emit the same liquid by its authored name. No HTML liquid fixture is required.\n\n## Objectives and points\n\nObjectives describe what to accomplish. Zones define where pickups, parking, checkpoints, and page interactions happen. Use either on its own, or combine zones into an objective.\n\n### Trigger presets\n\n```html\n<button\n data-jr-trigger=\"click\"\n>\n Click on arrival\n</button>\n<input\n type=\"checkbox\"\n data-jr-trigger=\"check\"\n/>\n<span\n data-jr-trigger=\"pickup\"\n data-jr-trigger-event=\"pickup-collected\"\n>\n ●\n</span>\n<div\n data-jr-trigger=\"parking\"\n data-jr-trigger-dwell-seconds=\"0.6\"\n>\n Park here\n</div>\n```\n\nAn empty trigger emits arrival events. `click` invokes native activation; `check` checks a checkbox/switch; `toggle` toggles it. `pickup` consumes once per scene. `parking` requires stopping for 0.45 seconds at at most 0.25 m/s with centre containment. Any ordinary HTML element can be the zone; the action target can be separate. Disabled targets are respected.\n\n### Pickup refraction\n\nAdd a color to make a pickup send a brief ripple through the car. Add `points` for a score reward; either option works on its own.\n\n```html\n<span\n data-jr-trigger=\"pickup\"\n data-jr-points=\"25\"\n data-jr-pickup-effect-color=\"#349dff\"\n>\n ✦\n</span>\n```\n\nThe JavaScript binding is `{ trigger: 'pickup', points: 25, pickupEffectColor: '#349dff' }`. Colors accept any six-digit hex or a JavaScript RGB tuple. Show the shared score with a HUD readout:\n\n```html\n<output\n data-jr-hud=\"points\"\n>\n 0\n</output>\n```\n\nRewards follow pickup repeat/consumption rules; reset restores pickups and clears points.\n\nThe ripple begins where the pickup touches the vehicle’s painted body. Its direction and speed account for driving, drifting, rotation, and moving pickups. It fades in 0.28–0.38 seconds and leaves a short trail of small colored particles. This is a visual effect; handling, health, and weapons stay unchanged.\n\nYou can also trigger it directly:\n\n```ts\nride.player?.pickupEffect({\n color: '#349dff',\n origin: { x: 0.45, y: 0.1 },\n angle: Math.PI,\n velocity: 22,\n});\n```\n\n| Input | Meaning |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `color` | Six-digit hex or RGB tuple. |\n| `origin` | Optional contact in body coordinates: each axis spans −0.5 to 0.5; +X is the nose and +Y is left. Omit to derive entry from the path. |\n| `angle` | Pickup travel direction through the body in radians: 0 toward the nose, π/2 left, π rearward. A stationary pickup moves rearward relative to a car driving forward. |\n| `velocity` | Relative contact speed in metres per second. |\n\nEach pickup gets a slightly different distortion pattern. Up to three colors can overlap. Reset and vehicle replacement clear the effect; checkpoints restore it and its particles. The effect requires WebGL2; the normal car still draws without it. Custom images need same-origin or CORS-enabled access.\n\n### Trigger options and attributes\n\nThe JS shape is `{ trigger: true | false | preset | options }`.\n\n| JS option | HTML attribute | Values / default |\n| -------------- | -------------------------------- | ------------------------------------------------------------------- |\n| `preset` | `data-jr-trigger-preset` | `click`, `check`, `toggle`, `pickup`, or `parking`. |\n| `when` | `data-jr-trigger-when` | `'enter'` (default) or `'stop'`. |\n| `dwellSeconds` | `data-jr-trigger-dwell-seconds` | Nonnegative stopped dwell. |\n| `maxSpeedMps` | `data-jr-trigger-max-speed-mps` | Nonnegative speed threshold. |\n| `action` | `data-jr-trigger-action` | `'event'` (default), `'click'`, `'check'`, `'uncheck'`, `'toggle'`. |\n| `event` | `data-jr-trigger-event` | Additional application event name. |\n| `repeat` | `data-jr-trigger-repeat` | `'visit'` (default), `'vehicle'`, `'scene'`. |\n| `vehicles` | `data-jr-trigger-vehicles` | `'player'` (default) or `'all'`. |\n| `target` | `data-jr-trigger-target` | Selector resolving exactly one action target in the document. |\n| `consume` | `data-jr-trigger-consume` | Boolean; hide after qualification and restore on reset. |\n| `exitMarginPx` | `data-jr-trigger-exit-margin-px` | Nonnegative rearm margin. |\n| `containment` | `data-jr-trigger-containment` | `'overlap'`, `'center'`, `'full'`. |\n| `requireExit` | `data-jr-trigger-require-exit` | Boolean; require departure before qualification. |\n| `suspended` | `data-jr-trigger-suspended` | Boolean; suspend progression. |\n| `reveal` | `data-jr-trigger-reveal` | `'departed'`; reveal after departure. |\n\nThe root `data-jr-trigger` attribute accepts the same preset names.\n\nStyle a zone’s entered, waiting, and completed states with optional CSS classes. The same options work in HTML or JavaScript:\n\n```html\n<div\n data-jr-trigger=\"parking\"\n data-jr-trigger-entered-class=\"is-entered\"\n data-jr-trigger-dwelling-class=\"is-dwelling\"\n data-jr-trigger-success-class=\"is-success\"\n>\n Park here\n</div>\n```\n\n```ts\nride.bind('.parking-spot', {\n trigger: {\n preset: 'parking',\n enteredClass: 'is-entered',\n dwellingClass: 'is-dwelling',\n successClass: 'is-success',\n },\n});\n```\n\n| JS option | HTML attribute | Values / default |\n| --------------- | -------------------------------- | --------------------------------------------------------------------------- |\n| `enteredClass` | `data-jr-trigger-entered-class` | Optional class tokens while inside, before qualification. |\n| `dwellingClass` | `data-jr-trigger-dwelling-class` | Optional class tokens while accumulating stopped dwell. |\n| `successClass` | `data-jr-trigger-success-class` | Optional class tokens after an accepted action or completed objective step. |\n\n`TriggerPhase` is `idle`, `entered`, `dwelling`, or `success`. Parking follows entered → dwelling → success. Moving interrupts the wait; paused time does not count toward it. Pass-through zones skip dwelling. Blocked objective steps and disabled targets cannot succeed.\n\nOnly classes for the current phase are applied. No classes are added by default; an empty string clears an option. Other classes are preserved. Reset, unbind, disable, and disposal restore the original classes. Restoring a checkpoint restores appearance without repeating actions.\n\nSuccess stays visible after leaving. A repeat-per-visit trigger rearms on the next visit; completed steps and once-per-vehicle/scene triggers stay complete until reset. With several vehicles, success takes display priority over dwelling, then entered. Events report each vehicle’s own phase.\n\nRead-only presentation markers `data-jr-trigger-state` (`idle`, `entered`, `dwelling`, `success`) and `data-jr-trigger-departed` expose interaction state for host styling. They are engine outputs, not configuration layers. `joyride:trigger:change` includes `state.phase`; `trigger:enter` reports entered and `trigger:qualify` reports success.\n\n### Parking and stop points\n\nAdd `points` / `data-jr-points` to award points after parking or a `when: 'stop'` trigger succeeds. Speed, containment, dwell, step order, and action acceptance still apply. Arriving or staying parked earns no extra points. Omit the option or use `0` for an unscored zone.\n\n```html\n<div\n data-jr-trigger=\"parking\"\n data-jr-points=\"50\"\n>\n Park here\n</div>\n<div\n data-jr-trigger\n data-jr-trigger-when=\"stop\"\n data-jr-trigger-dwell-seconds=\"1\"\n data-jr-points=\"25\"\n>\n Stop here\n</div>\n```\n\n```ts\nride.bind('.parking-spot', { trigger: 'parking', points: 50 });\nride.bind('.stop-zone', { trigger: { when: 'stop', dwellSeconds: 1 }, points: 25 });\n```\n\nThe repeat rule controls rewards: `visit` allows another after leaving and returning; `vehicle` and `scene` limit them until reset. Checkpoints restore the score without repeating rewards. Entry, click, check, and toggle triggers do not award points.\n\n### Objectives\n\nAn objective tracks a goal and reports progress until it completes. It observes gameplay; points come from pickups, destruction, or stop zones.\n\n| Goal | JavaScript | Complete when |\n| ------------------- | ------------------------------------- | ---------------------------------------------------------------------- |\n| Collect pickups | `{ type: 'collect', count: 3 }` | Three distinct pickups are collected. |\n| Crush targets | `{ type: 'crush', count: 3 }` | Three distinct objects are crushed. |\n| Break targets | `{ type: 'break', count: 3 }` | Three distinct objects break. Burning out does not count as breaking. |\n| Ignite targets | `{ type: 'ignite', count: 3 }` | Three distinct objects ignite. |\n| Reach a score | `{ type: 'score', points: 100 }` | The shared score reaches 100. Here `points` is the goal, not a reward. |\n| Complete zone steps | `{ steps: ['checkpoint', 'garage'] }` | The named zones qualify in the chosen order. |\n\n```ts\nconst supplies = ride.objective('supplies', { type: 'collect', count: 3 });\nride.objective('clear-the-road', { type: 'crush', count: 2 });\nride.objective('break-the-signs', {\n type: 'break',\n count: 2,\n targets: ['sign-a', 'sign-b'],\n});\nride.objective('light-the-targets', { type: 'ignite', count: 3 });\nride.objective('high-score', { type: 'score', points: 100 });\n\nride.on('objective:progress', ({ objective }) => {\n console.log(objective.id, objective.current, objective.target);\n});\nride.on('objective:complete', ({ objective }) => celebrate(objective.id));\n\nconsole.log(supplies.state);\nsupplies.reset();\nsupplies.dispose();\n```\n\n`count` is a positive whole number. Each object counts once, and disabled objects are ignored. Use `targets` to limit a goal to stable object IDs; omit it to accept any matching object. The count cannot exceed the number of listed targets.\n\n`progress` defaults to `scene`, sharing progress across vehicles. Use `progress: 'vehicle'` for separate pickup/target counters or zone steps per vehicle; events without a vehicle do not advance vehicle-specific counters. Score goals always use the shared scene score. Optional `event` names an additional completion event.\n\n`ObjectiveHandle` provides `id`, readonly `state` rows `{ vehicleId, current, target, complete }`, `reset()`, and `dispose()`. Shared progress uses `vehicleId: 'scene'`. Completion lasts until reset. `ride.reset()` resets every objective; checkpoints restore progress without repeating events. `dispose()` removes the objective.\n\n### Objectives in HTML\n\n```html\n<section\n data-jr-objective=\"supplies\"\n data-jr-objective-type=\"collect\"\n data-jr-objective-count=\"3\"\n>\n Collect three pickups\n</section>\n<section\n data-jr-objective=\"high-score\"\n data-jr-objective-type=\"score\"\n data-jr-objective-points=\"100\"\n>\n Reach 100 points\n</section>\n```\n\nThe element supplies the objective's name and goal. Style it yourself; use `objective:progress` to update your progress display. Definitions and portable configuration also accept an `objectives` map containing the same specs.\n\n| Attribute | Meaning |\n| ---------------------------- | ---------------------------------------------------------------------------------- |\n| `data-jr-objective` | Unique objective ID. |\n| `data-jr-objective-type` | `collect`, `crush`, `break`, `ignite`, or `score`. Omit for a group of zone steps. |\n| `data-jr-objective-count` | Number of distinct pickups or targets required. |\n| `data-jr-objective-points` | Shared score required by a score goal. |\n| `data-jr-objective-targets` | Optional space-separated object IDs for a pickup/target goal. |\n| `data-jr-objective-order` | `ordered` (default) or `any`, for zone steps. |\n| `data-jr-objective-progress` | `scene` (default) or `vehicle`; score goals use `scene`. |\n| `data-jr-objective-event` | Optional additional completion event name. |\n\n### Zone steps\n\nGroup checkpoints, parking spots, pickups, or page interactions when they form one objective:\n\n```html\n<section\n data-jr-objective=\"delivery\"\n data-jr-objective-order=\"ordered\"\n>\n <div\n data-jr-id=\"collect\"\n data-jr-trigger=\"parking\"\n >\n Collect\n </div>\n <div\n data-jr-id=\"deliver\"\n data-jr-trigger=\"parking\"\n >\n Deliver\n </div>\n</section>\n```\n\nWithout an objective type, descendant triggers become the steps, excluding nested objectives. Ordered steps qualify in sequence; `any` allows any order and requires every distinct step. A standalone zone works without an objective wrapper.\n\n```ts\nconst delivery = ride.objective('delivery', {\n order: 'ordered',\n steps: ['collect', { target: 'deliver', when: 'stop', dwellSeconds: 0.6 }],\n});\n```\n\nEach step is an object ID or `{ target, when?, dwellSeconds?, maxSpeedMps? }`. Conditions default to the zone's own configuration. Missing or disabled steps pause progress. Active objectives retain their step membership until reset or reconfiguration. Paused/hidden time does not contribute stopped dwell.\n\n### Zone sequences\n\nUse an objective with `steps` to group zone visits into a goal. For a standalone named sequence, `ride.route(id, spec)` accepts `RouteSpec` and returns a `PlaygroundRouteHandle`. Sequences can also be defined with `definitions.routes`, mount `routes`, or `data-jr-route` with `data-jr-route-order`, `data-jr-route-progress`, and `data-jr-route-event`. They emit `route:progress`, `route:complete`, and the corresponding objective events.\n\n## Settings\n\nPass `game` and `dialog` directly to `JoyRide.mount()`: `game` controls the toy, including visuals, sound, and performance; `dialog` controls its interface.\n\n### Updating options\n\n```ts\nride.updateSettings({\n game: { masterVolume: 0.5, quality: 'medium', headlights: true, viewportWalls: false },\n});\nconsole.log(ride.settings.game.masterVolume);\n```\n\nUse the same two sections directly under `mount({ game: { ... }, dialog: { ... } })`: `game` for behavior, visuals, and performance, and `dialog` for the embedded UI. Updates merge by group and validate before commit. Definitions, initial bindings, and player creation do not belong in mutable runtime settings.\n\n### Quality and appearance\n\nQuality defaults to `high`. Changing `game.quality` updates smoke, ghost vapor, fire, and liquids, including active effects.\n\n`game.surfaceTone` controls tire-mark contrast; each vehicle's `appearance` controls its body contrast. Both can adapt automatically to the page beneath the car. Smoke uses its natural color, and ghost mode uses the phantom appearance.\n\n### Tools\n\n`game.toolsEnabled` enables or disables vehicle tools. Boost stays available, including in the `sfw` preset. Tool use is unlimited. Tool IDs are `eject`, `machineGun`, `flamethrower`, `rocket`, `ghost`, `attractor`, `lightning`, and `boost`. See [Slot assignments](#jr-doc-slot-assignments) to assign them to a vehicle.\n\n### Accent and dialog font\n\nSet the dialog accent and font independently of the vehicle glow:\n\n```ts\nJoyRide.mount({\n dialog: { accentColor: '#e8c344', dialogFontFamily: 'inherit' },\n game: { underglow: '#66e6ff' },\n});\n```\n\n`dialogFontFamily: 'inherit'` uses the page body's computed font. You can also supply a CSS `font-family` value such as `'\"My Font\", sans-serif'`, or set it without JavaScript:\n\n```css\n:root {\n --jr-dialog-font-family: 'My Font', sans-serif;\n}\n```\n\nThe font must already be loaded on the page. An explicit `dialogFontFamily` overrides the CSS variable. Script attributes override mount JSON. `accentColor` styles the dialog. Set `game.underglow` independently for the vehicle glow.\n\n### Settings access\n\nThe vehicle dialog has one Settings tab for visuals, sound, performance, and rules. To hide it:\n\n```ts\nJoyRide.mount({\n dialog: { showGameSettings: false },\n});\n```\n\nVehicle switching, reset, driving, and enabled tools remain available. Host code can still update game settings with `ride.updateSettings()`.\n\nThe embed editor has a separate **Dialog** section for branding, theme, visible tabs, and settings access. The following reference is generated from the shared option catalog.\n\n<!-- options:start -->\n\n### All options\n\nEvery shared setting is shown below with its default. Omit settings you do not need. Click a property name to jump to its reference. `undefined` leaves optional styling unset; `hint: false` keeps the hint off.\n\n```js\nJoyRide.mount({\n // Game settings.\n game: {\n // Set the master audio volume.\n masterVolume: 1,\n\n // Play engine audio while the vehicle is idle.\n idleSound: true,\n\n // Choose the rendering quality for smoke, fire, and liquids.\n quality: \"high\",\n\n // Show smoke from the tires.\n tireSmoke: true,\n\n // Draw shadows beneath vehicles.\n vehicleShadows: true,\n\n // Show sparks when vehicles collide.\n sparks: true,\n\n // Visual body deformation from collisions.\n deform: true,\n\n // Shake the view during impacts and tool effects.\n screenShake: true,\n\n // Adapt tire marks to light or dark page backgrounds.\n surfaceTone: \"auto\",\n\n // Show renderer diagnostics.\n debug: false,\n\n // Show vehicle health bars.\n showHealthBars: true,\n\n // Point toward vehicles outside the view.\n showVehicleMarkers: true,\n\n // Set a six-digit hex glow color, or leave unset to disable it.\n underglow: undefined,\n\n // Set the strength of the underglow.\n underglowOpacity: 0.6,\n\n // Enable the front lights.\n headlights: true,\n\n // Enable the rear lights.\n taillights: true,\n\n // Brighten the rear lights while braking.\n brakeLights: true,\n\n // Allow vehicles to take damage.\n vehicleDestructible: true,\n\n // Enable or disable vehicle tools. Boost stays available.\n toolsEnabled: true,\n\n // Keep vehicles inside the visible screen.\n viewportWalls: true,\n\n // Turn small colored page elements into paint.\n autoPaint: false,\n\n // Show quick controls when hovering over the vehicle.\n showToolbar: true,\n\n // Show a hint after arrival, or false to keep it hidden.\n hint: false,\n\n },\n\n // Dialog settings.\n dialog: {\n // Show the driving controls on touch devices.\n showTouchControls: true,\n\n // Match the page theme or choose light or dark.\n dialogTheme: \"auto\",\n\n // Show the settings tab. Vehicle switching, driving, and reset stay available when off.\n showGameSettings: true,\n\n // Choose which tabs appear in the vehicle dialog.\n vehicleTabs: [\"vehicle\",\"objects\",\"weapons\",\"controls\",\"settings\",\"embed\",\"documentation\"],\n\n // Show the Joy Ride logo in the dialog.\n showLogo: true,\n\n // Show the GitHub link in the dialog.\n showGithub: true,\n\n // Set the dialog accent using six-digit hex.\n accentColor: undefined,\n\n // Set a CSS font family; inherit uses the page font.\n dialogFontFamily: undefined,\n\n // Show vehicle names in the dialog.\n showVehicleNames: true,\n\n },\n\n});\n```\n\n### Game settings\n\n| Option | Default | Meaning |\n| --------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------- |\n| [`game.masterVolume`](#jr-doc-option-game-mastervolume) | `1` | Set the master audio volume. 0–1. |\n| [`game.idleSound`](#jr-doc-option-game-idlesound) | `true` | Play engine audio while the vehicle is idle. |\n| [`game.quality`](#jr-doc-option-game-quality) | `\"high\"` | Choose the rendering quality for smoke, fire, and liquids. `high`, `medium`, `low`. |\n| [`game.tireSmoke`](#jr-doc-option-game-tiresmoke) | `true` | Show smoke from the tires. |\n| [`game.vehicleShadows`](#jr-doc-option-game-vehicleshadows) | `true` | Draw shadows beneath vehicles. |\n| [`game.sparks`](#jr-doc-option-game-sparks) | `true` | Show sparks when vehicles collide. |\n| [`game.deform`](#jr-doc-option-game-deform) | `true` | Visual body deformation from collisions. |\n| [`game.screenShake`](#jr-doc-option-game-screenshake) | `true` | Shake the view during impacts and tool effects. |\n| [`game.surfaceTone`](#jr-doc-option-game-surfacetone) | `\"auto\"` | Adapt tire marks to light or dark page backgrounds. `auto`, `light`, `dark`. |\n| [`game.debug`](#jr-doc-option-game-debug) | `false` | Show renderer diagnostics. |\n| [`game.showHealthBars`](#jr-doc-option-game-showhealthbars) | `true` | Show vehicle health bars. |\n| [`game.showVehicleMarkers`](#jr-doc-option-game-showvehiclemarkers) | `true` | Point toward vehicles outside the view. |\n| [`game.underglow`](#jr-doc-option-game-underglow) | Unset | Set a six-digit hex glow color, or leave unset to disable it. |\n| [`game.underglowOpacity`](#jr-doc-option-game-underglowopacity) | `0.6` | Set the strength of the underglow. 0–1. |\n| [`game.headlights`](#jr-doc-option-game-headlights) | `true` | Enable the front lights. |\n| [`game.taillights`](#jr-doc-option-game-taillights) | `true` | Enable the rear lights. |\n| [`game.brakeLights`](#jr-doc-option-game-brakelights) | `true` | Brighten the rear lights while braking. |\n| [`game.vehicleDestructible`](#jr-doc-option-game-vehicledestructible) | `true` | Allow vehicles to take damage. |\n| [`game.toolsEnabled`](#jr-doc-option-game-toolsenabled) | `true` | Enable or disable vehicle tools. Boost stays available. |\n| [`game.viewportWalls`](#jr-doc-option-game-viewportwalls) | `true` | Keep vehicles inside the visible screen. |\n| [`game.autoPaint`](#jr-doc-option-game-autopaint) | `false` | Turn small colored page elements into paint. |\n| [`game.showToolbar`](#jr-doc-option-game-showtoolbar) | `true` | Show quick controls when hovering over the vehicle. |\n| [`game.hint`](#jr-doc-option-game-hint) | `false` | Show a hint after arrival, or false to keep it hidden. |\n\n### Dialog settings\n\n| Option | Default | Meaning |\n| --------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------- |\n| [`dialog.showTouchControls`](#jr-doc-option-dialog-showtouchcontrols) | `true` | Show the driving controls on touch devices. |\n| [`dialog.dialogTheme`](#jr-doc-option-dialog-dialogtheme) | `\"auto\"` | Match the page theme or choose light or dark. `auto`, `light`, `dark`. |\n| [`dialog.showGameSettings`](#jr-doc-option-dialog-showgamesettings) | `true` | Show the settings tab. Vehicle switching, driving, and reset stay available when off. |\n| [`dialog.vehicleTabs`](#jr-doc-option-dialog-vehicletabs) | All tabs | Choose which tabs appear in the vehicle dialog. |\n| [`dialog.showLogo`](#jr-doc-option-dialog-showlogo) | `true` | Show the Joy Ride logo in the dialog. |\n| [`dialog.showGithub`](#jr-doc-option-dialog-showgithub) | `true` | Show the GitHub link in the dialog. |\n| [`dialog.accentColor`](#jr-doc-option-dialog-accentcolor) | Unset | Set the dialog accent using six-digit hex. |\n| [`dialog.dialogFontFamily`](#jr-doc-option-dialog-dialogfontfamily) | Unset | Set a CSS font family; inherit uses the page font. |\n| [`dialog.showVehicleNames`](#jr-doc-option-dialog-showvehiclenames) | `true` | Show vehicle names in the dialog. |\n\n<!-- options:end -->\n\n### Safe-for-work preset and dialog tabs\n\n```ts\nconst ride = JoyRide.mount(\n JoyRide.getMountPreset('sfw', {\n game: { autoPaint: true },\n player: { vehicle: 'electric-gt' },\n }),\n);\n```\n\nThe preset keeps Vehicle and Controls visible, hides Settings, branding, and vehicle names, and disables vehicle destruction, tools, deformation, and sparks. Driving and slow motion remain available. It returns mount options; your `game` and `dialog` values override its defaults.\n\nUse `dialog.vehicleTabs` to choose dialog tabs: `vehicle`, `objects`, `weapons`, `controls`, `settings`, `embed`, and `documentation`. The Tools tab uses `weapons`; Settings uses `settings`. `dialog.showGameSettings: false` hides Settings even when it is listed.\n\n## Everything else\n\nThe smaller details: keyboard controls, lights, sound, slow motion, and the hint beside the vehicle.\n\n### Keyboard controls\n\nThese are the default bindings. Number keys 1–9 activate assigned tools. `JoyRide.keyboardControls` supplies the labels and physical key codes for host-owned controls help.\n\n### Lights and sound\n\nUse `game.headlights`, `game.taillights`, and `game.brakeLights` to control the lamps. Set `game.underglow` to a six-digit hex color, or leave it `undefined` to disable the glow; `game.underglowOpacity` sets its strength from 0 to 1.\n\nPress **H** to honk. `game.masterVolume` sets the volume from 0 to 1; `game.idleSound` controls engine sound while parked. Browsers require a user gesture before audio can start. See [Settings](#jr-doc-settings) for all defaults.\n\n### Slow motion\n\nHold **V** for slow motion and release to return to normal speed. Defaults are half speed, a 300 ms transition, and no extra zoom. Sounds slow down with the action; input remains responsive.\n\nFrom the browser controller:\n\n```ts\nawait ride.setSlowMo(true, {\n speedFactor: 0.5,\n rampMs: 300,\n zoomFactor: 1.1,\n curve: 'ease-in-out',\n});\nawait ride.setSlowMo(false);\n```\n\nReact refs, browser session handles, and `CanvasWorld` also expose `setSlowMo(active, options)`. Custom engine hosts can use `world.slowMo.start()` / `stop()` and advance time through `world.advanceTime()`.\n\n`speedFactor` is greater than 0 and at most 1; `rampMs` is nonnegative; `zoomFactor` is 0–4, with 0 disabling extra zoom. Curves are `linear`, `ease-in`, `ease-out`, and `ease-in-out`. Options persist. Changes begin a new transition from the current speed and zoom. Pausing freezes it; losing focus releases the keyboard action.\n\n### Vehicle hint\n\nThe vehicle hint is off by default. To show one after arrival, configure it under `game`:\n\n```ts\nJoyRide.mount({\n game: {\n hint: {\n // Text shown beside the vehicle.\n text: 'Drive with WASD',\n // Wait this many milliseconds after arrival.\n showAfter: 1500,\n // Place the hint above, below, left, or right.\n placement: 'top',\n // Hide the hint on click or when the vehicle moves.\n dismiss: 'click',\n },\n },\n});\n```\n\n`placement` accepts `top`, `bottom`, `left`, or `right`. `dismiss` accepts `move` or `click` (the car click). `showAfter` is milliseconds after arrival; the default is `1000` when a hint is enabled. The hint is DOM text with no pointer events, so it scrolls with the page and does not block controls.\n\n## JavaScript API\n\nMount a ride, bind page elements, and control it from your application. Use `await ride.ready` before sending world commands.\n\nThe root and `/react` entries expose the same named imperative functions and\ntypes. `mount`, `define`, `getMountPreset`, `listVehiclePresets`, `listVehicleOptions`,\n`getVehiclePreset`, `availableVehicleTools`, `keyboardControls`, `overlayLayers`,\nand `overlayZIndex` can be imported directly. `vehicleTools` and the\n`publicDataAttributes`, `publicDataAttributeNames`, and `publicDataAttributePrefixes`\ncatalogs are also named exports. `getActive()` returns the same value as the\ndefault API's `JoyRide.active` getter. Prefer named utility imports when the\nmounting runtime is not needed; they let the consuming bundler omit unused code.\n\nThe examples below use the default `JoyRide` API object where several operations\nare needed. Named functions and the default object share one runtime within the\nchosen integration.\n\n### Mount options\n\n`JoyRide.mount(options?: MountOptions | PlaygroundConfiguration): RideController` starts the browser host. It also accepts a parsed, versioned configuration returned by `ride.exportConfiguration()`.\n\n| Option | Meaning |\n| ------------- | ----------------------------------------------------------------------------------------------------------------------------------- |\n| `audioSet` | Audio sample folder; missing effects fall back to the default set. |\n| `persist` | `{ vehicle?: boolean, audio?: boolean }`; both default to `true`. Saved preferences take precedence over configured initial values. |\n| `definitions` | Optional catalog of `objects`, `liquids`, `vehicles`, and `objectives`. |\n| `player` | Initial `{ vehicle, appearance?, slots? }`. Player identity is managed by the runtime. |\n| `bindings` | Initial array of `{ target: selector, spec: ObjectPatch }`. |\n| `objectives` | Objective ID → `ObjectiveSpec` map, in addition to definitions or HTML objectives. IDs must be unique. |\n| `routes` | Optional named sequences of zone stops. Prefer `objectives` for gameplay goals. |\n| `game` | Toy behavior, visuals, sound, performance, lights, and hint. See [Settings](#jr-doc-settings). |\n| `dialog` | Interface theme, labels, tabs, touch controls, and settings access. |\n| `entry` | Initial player entrance with `target: PageTarget`; overrides a `data-jr-entry` marker. |\n| `host` | Host presentation overrides listed below. |\n\n`host.foregroundSelector` keeps matching host UI above the effects overlay. `host.screenShakeProfiles` overrides shake behavior. `host.canPlaceManually` enables placement and dragging. `host.shadowDom` defaults to `true`.\n\n`game`, `dialog`, and an entry with a selector or `{xPx,yPx}` target are portable. `host` presentation overrides and DOM element entry targets cause a strict export error; see Saving and sharing. Unknown mount properties fail rather than being ignored.\n\n### Script tag options\n\nThe CDN embed registers `window.JoyRide`. The `data-jr-mount` attribute mounts it automatically and accepts JSON options, for example `data-jr-mount='{\"game\":{\"autoPaint\":true}}'`. Use `data-jr-mount=\"false\"` to load the API without mounting.\n\n- **Preset:** `data-jr-mount-preset=\"sfw\"` applies safe-for-work defaults. It needs `data-jr-mount`; JSON options override the preset.\n- **Appearance:** `data-jr-dialog-theme=\"light\"` or `\"dark\"`, `data-jr-accent-color=\"#e8c344\"`, and `data-jr-dialog-font-family=\"inherit\"` override the same options in JSON.\n- **Saved preferences:** The selected vehicle and user-changed audio settings persist on this origin. Set `data-jr-persist-vehicle=\"false\"` or `data-jr-persist-audio=\"false\"` to disable either. The equivalent mount option is `persist: { vehicle: false, audio: false }`. Script attributes take precedence.\n- **Client-side routing:** `data-jr-unmount=\"route remove\"` disposes on URL changes and script removal. Use either word alone for one behavior. A newly inserted script mounts again; an empty attribute enables both behaviors.\n- **Arrival target:** The first `data-jr-entry` element becomes the initial destination. Add `data-jr-entry-delay-ms=\"1000\"` to wait before the skid. `mount({ entry: { target: '#parking' } })` takes precedence. Without a target, the car enters near the viewport center.\n\nThe entry marker also accepts `data-jr-entry-angle-rad`, `data-jr-entry-distance-px`, `data-jr-entry-fade-fraction`, `data-jr-entry-steer`, and `data-jr-entry-speed-mps`. Leave these out to use the vehicle's calculated entrance. After arriving, the untouched car follows the marker if page layout moves it; driving or clicking the car ends this attachment. A hidden or offscreen marker falls back to the center entrance; call `ride.enterAt(...)` later to enter somewhere else.\n\n### Controller properties\n\n| Property | Value |\n| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| `ride.ready` | `Promise<RideController>` resolving after player configuration and initial setup. |\n| `ride.player` | The player `VehicleHandle`, or `null` before readiness, after player removal, or after disposal. |\n| `ride.state` | Readonly `{ playerId, focusVehicleId, player, points }`, or `null` before readiness/after disposal. Focus and player ownership are separate. |\n| `ride.settings` | Deeply readonly grouped `RuntimeOptions` snapshot. |\n\nUse `ride.getVehicle(id)` for a specific vehicle; it returns a handle or `null`. The player handle remains separate from other spawned vehicles.\n\n### Controller methods\n\n| Method | Return and behaviour |\n| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `ride.bind(target, spec)` | A `PlaygroundBinding`; target is a selector, Element, or iterable of Elements. Page objects only. |\n| `ride.inspect(element)` | A readonly object snapshot or `null` for an Element. |\n| `ride.inspectById(id)` | A readonly object snapshot or `null` for a stable `data-jr-id`. |\n| `ride.on(event, listener)` | An unsubscribe function. Events and custom typing are covered in Events and HUD. |\n| `ride.spawnVehicle(options)` | A new `VehicleHandle`; see Vehicles and tools. |\n| `ride.pour(liquid, options)` | Deposit simulated liquid; see Fire and liquids. |\n| `ride.objective(id, spec)` | An `ObjectiveHandle`; see Objectives and points. |\n| `ride.updateSettings(patch)` | Validate and merge grouped runtime options. Invalid updates leave working options intact. |\n| `ride.reset()` | Restore artwork, paint, pickups, trigger classes, native controls and vehicle health; clear effects/points and objective progress. Retains vehicle placement and authored configuration. Emits `reset` for application-owned state. |\n| `ride.exportConfiguration()` | A readonly portable configuration, or a typed dependency error. |\n| `ride.openConfigure()` | Open the settings dialog; returns whether an anchor was available. |\n| `ride.startAudio()` | `Promise<void>` requesting audio startup. |\n| `ride.getCarAnchor()` | Painted car bounds `{ x, y, width, height }` in document pixels, or `null`. |\n| `ride.enterAt(options)` | `Promise<'completed' \\| 'interrupted' \\| 'unavailable'>`; fade in an already moving player car and handbrake near an element or document point. See the arrival example below. |\n| `ride.dispose()` | Release the mounted host; safe to call repeatedly. |\n\n### Global helpers\n\nThe default module export and `window.JoyRide` expose the same object.\n\n| Helper | Purpose |\n| -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| `JoyRide.define(definitions)` | Validate and deeply freeze an optional catalog without mounting a game. References are resolved in its mounted catalog. |\n| `JoyRide.active` | Currently mounted controller or `undefined`. |\n| `JoyRide.listVehiclePresets()` | Built-in and browser-saved vehicle presets. |\n| `JoyRide.listVehicleOptions()` | Labels/IDs for preset pickers. |\n| `JoyRide.getVehiclePreset(id)` | A vehicle catalog preset or `undefined`; includes browser overrides. |\n| `JoyRide.getMountPreset(id, overrides?)` | Return ordinary mount options for a named preset such as `sfw`; supplied options override it. |\n| `JoyRide.vehicleTools` | Tool metadata for building controls. |\n| `JoyRide.availableVehicleTools(slots?, toolsEnabled?)` | Return available tools with their current consecutive keyboard shortcuts. |\n| `JoyRide.keyboardControls` | Labels, key names, and physical key codes for host-owned controls help. |\n| `JoyRide.overlayLayers` / `JoyRide.overlayZIndex(layer)` | Shared overlay-layer ordering and its z-index helper. |\n\n### Reusable definitions\n\n`JoyRide.define({ objects?, liquids?, vehicles?, objectives? })` returns deeply readonly definitions. Each map uses application-chosen names. Resolve names inside a mounted catalog; equal names in different mounts get independent material identities. Cycles, missing references, and incompatible capabilities fail validation.\n\n```ts\nconst kit = JoyRide.define({\n objects: { wood: { breakable: { health: 80 }, burnable: { burnSeconds: 12 } } },\n liquids: { ink: { base: 'paint', color: '#5271ff', thickness: 0.8 } },\n vehicles: { artist: { base: 'electric-gt', name: 'The artist' } },\n objectives: { delivery: { steps: ['collect', 'deliver'], order: 'ordered' } },\n});\n```\n\nObject recipes can reference another through `object`. Vehicle and liquid recipes require `base`. Vehicles inherit shipped physics/sound/image settings without silently applying saved browser overrides.\n\n### Layering with host menus and dialogs\n\nJoy Ride's overlay uses a small stack by default: world `1`, foreground content `2`, and\nits own backdrop and controls `3`–`4`. Host dropdowns and dialogs with a higher\nlayer in the same stacking context appear above the car and painted content. Joy Ride\npreserves an explicit z-index on elements selected by `foregroundSelector`.\n\nSet `--joy-ride-z-index` on the document root to move the whole stack for a host's\nlayer scale. The four layers use that value and the next three integers:\n\n```css\n:root {\n --joy-ride-z-index: 20;\n}\n```\n\nThis CSS variable is a host layering choice, so it applies to the canvas, auxiliary\neffects, and native painted content together, including when the embed UI uses a shadow\nroot. A z-index cannot lift a dialog out of a lower parent stacking context; use a\nportal into the document root or a native modal dialog for that case. Native modal\ndialogs and popovers use the browser's top layer and appear above ordinary z-index\nstacks.\n\n## Events and HUD\n\nConnect the toy to your page with live readouts and gameplay events.\n\n### Declarative HUD\n\n```html\n<output\n data-jr-hud=\"speed\"\n data-jr-hud-unit=\"kmh\"\n data-jr-hud-precision=\"1\"\n>\n 0\n</output>\n<output\n data-jr-hud=\"fps\"\n>\n 0\n</output>\n<output\n data-jr-hud=\"rpm\"\n>\n 0\n</output>\n<output\n data-jr-hud=\"gear\"\n>\n N\n</output>\n<output\n data-jr-hud=\"health\"\n>\n 0\n</output>\n<output\n data-jr-hud=\"points\"\n>\n 0\n</output>\n```\n\nChoose one metric per element and style it yourself. The JS equivalent is `{hud:{field:'speed',unit:'kmh',precision:1}}`. Fields are `speed`, `fps`, `rpm`, `gear`, `health`, and `points`. Only speed accepts units: `mph` (default), `kmh`, or `mps`. Precision is an integer 0…4, default 0. `hud:false` disables a lower layer.\n\nThe runtime writes changed values only and restores owned original children on cleanup. Keep HUD targets separate from fragmentation/paint targets. Place readouts inside `data-jr-ui` controls when appropriate.\n\n### Events and subscriptions\n\n```ts\nconst unsubscribe = ride.on('objective:complete', ({ objective, vehicle }) => {\n celebrate(objective.id, vehicle?.id);\n});\nride.on('object:break', ({ object }) => console.log(object.id, object.spec.meta));\nride.on('reset', () => {\n setCollectedPickups([]);\n setButtonPresses(0);\n});\nunsubscribe();\n```\n\nTargets dispatch bubbling `CustomEvent`s prefixed with `joyride:`. The JS subscription omits that prefix. Subscribe on the document or use `ride.on`. Listeners run outside simulation work and are isolated from host exceptions. Unsubscribe before discarding an integration; disposal removes subscriptions.\n\n| Event name | Detail |\n| ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |\n| `object:hit`, `object:ignite`, `object:break`, `object:burnout`, `object:explode`, `object:crush` | `{ object, vehicle?, point? }`, with points on applicable events. |\n| `trigger:enter`, `trigger:leave`, `trigger:qualify`, `trigger:change`, `trigger:stop` | `{object, vehicle:{id}, position, speedMps, state:{inside,departed,stopped,phase}}`. |\n| `objective:progress`, `objective:complete` | `{objective:{id,type,current,target,complete}, vehicle?}` and trigger context when available. |\n| `vehicle:change` | `{vehicle}` containing the readonly vehicle snapshot. |\n| `state:change` | The readonly `PlaygroundState` snapshot. |\n| `diagnostic` | `{code,message,target?}` describing rejected configuration or host errors. |\n| `reset` | No detail; scene objects and interactions have been restored. |\n| `dispose` | No detail; lifecycle notification during cleanup. |\n\n`ride.reset()`, the dialog reset, and **C / Reset screen** restore objects, pickups, zones, objectives, and native checkbox values without repeating click handlers. A car inside a zone must leave and return to trigger it again. Configuration and vehicle placement stay unchanged.\n\nListen for `joyride:reset` on the document, or `ride.on('reset', …)`, to clear your own counters and controlled inputs. `session.handle.clearEffects()` only fades visual effects.\n\n### Custom event typing\n\n```ts\ndeclare module '@joy-ride/game' {\n interface PlaygroundEventMap {\n 'pickup-collected': { object: { id: string } };\n }\n}\nride.on('pickup-collected', ({ object }) => collect(object.id));\n```\n\nConfigure `trigger.event` or an objective’s `event` with an application event name. Trigger events carry trigger details; objective completion events carry objective progress. Host code can also dispatch its own bubbling `CustomEvent('joyride:pickup-collected', {detail, bubbles:true})`. Augment `PlaygroundEventMap` to type its payload accurately.\n\n## Saving and sharing\n\n### Portable configuration\n\n```ts\nconst configuration = ride.exportConfiguration();\nconst json = JSON.stringify(configuration, null, 2);\nride.dispose();\n\nconst restored = JoyRide.mount(JSON.parse(json));\nawait restored.ready;\n```\n\nThe `joy-ride-playground` format (version 3) stores definitions, player configuration, selector bindings, objectives, initial entry, and settings. It keeps authored names rather than internal IDs. HTML and application state stay with your page. This saves setup, not a running-world checkpoint.\n\nExact-element bindings, internal object overrides, and unsupported host-only options cannot be exported. They cause `NonSerializableDependencyError` with code `JR_NON_SERIALIZABLE_DEPENDENCY`; `dependencies` lists each `{ path, reason }`.\n\n### Browser module without npm\n\nLoad the browser module when your application needs it, then mount manually:\n\n```ts\nconst { default: JoyRide } = await import('https://unpkg.com/@joy-ride/game@latest/index.js');\nconst ride = JoyRide.mount();\nawait ride.ready;\n// Call ride.dispose() when the host view is removed.\n```\n\nUse this in a browser module; install the npm package for a bundled application. This does not create a `window.JoyRide` global. The separate `/embed.js` script does. The CDN loads adjacent styles and assets; replace `@latest` with a version to pin a build.\n\n### Embed and bookmarklet helpers\n\n```ts\nimport {\n fullEmbedCode,\n asyncEmbedCode,\n npmEmbedCode,\n reactEmbedCode,\n bookmarkletUrl,\n} from '@joy-ride/game/bookmarklet';\n\nconst configuration = ride.exportConfiguration();\nconst html = fullEmbedCode(configuration);\nconst asyncCdn = asyncEmbedCode(configuration);\nconst npm = npmEmbedCode(configuration);\nconst react = reactEmbedCode(configuration);\nconst bookmark = bookmarkletUrl(configuration);\n```\n\nAll helpers use the same portable configuration. The HTML helper returns an auto-mounting module script. The CDN helper loads the runtime on demand without a package dependency; the NPM helper imports the package root, and the React helper renders the component from `/react`. The bookmarklet toggles a mounted runtime. Importing helpers does not mount the toy.\n\nThe lower-level `@joy-ride/engine/playground` entry exports `createPlaygroundConfiguration`, `parsePlaygroundConfiguration`, `NonSerializableDependencyError`, and portable configuration types. Use the factory/parser when validating stored/imported JSON.\n\n### Validation and diagnostics\n\nUnknown fields, invalid values, missing recipes, duplicate IDs, unsupported targets, and incompatible capabilities fail validation. `PlaygroundConfigurationError` has code `JR_INVALID_CONFIGURATION` and a property `path`. JavaScript updates throw before commit; invalid DOM edits retain the last valid spec and emit `joyride:diagnostic` with `{code,message,target?}`.\n\nUse `ride.ready.catch(...)` for startup errors and `ride.on('diagnostic', ...)` for integration errors. Listener failures are reported while play continues; internal simulation failures stop the clock.\n\n### Public TypeScript contracts\n\n`@joy-ride/game` exports types for `MountOptions`, `RideController`, `PlaygroundEventMap`, `PlaygroundState`, `ObjectSpec`, `ObjectPatch`, `ObjectiveSpec`, `ObjectiveHandle`, `ObjectiveType`, `ObjectiveProgress`, `ObjectiveEventDetail`, `PickupEffectInput`, `PlayerConfiguration`, `VehicleConfiguration`, `VehiclePatch`, `VehicleHandle`, `VehicleSpawnOptions`, `RuntimeOptions`, `RuntimeOptionsPatch`, `PlaygroundConfiguration`, `Appearance`, `SlotNumber`, and `DeepReadonly`.\n\nThe game schema entry additionally provides catalog, trigger, objective, HUD, paint, and capability types plus validation/merge helpers. Prefer authored input types for configuration and readonly snapshot types for observation; runtime references and saved configuration have different ownership.\n\n## Advanced integrations\n\nFor custom React interfaces, browser hosts, and canvas scenes inside the Joy Ride repository. Ordinary websites should use the public `@joy-ride/game` or `@joy-ride/game/react` entry. The workspace packages below are not subpaths of the published game package.\n\n### React browser host\n\nUse `@joy-ride/game/react` for ordinary React website setup. The following workspace packages are internal building blocks for custom hosts in this repository.\n\n`JoyRide` from `@joy-ride/ui` connects a canvas and controls to a browser session. `onReady(world, registry)` and `JoyRideHandle.getPlayground()` expose the runtime.\n\nReact hosts using `@joy-ride/browser` can call `entryFromMarker(element)` and pass its result to `session.handle.enterAt(...)` for the same arrival behavior as a `data-jr-entry` script marker.\n\nFor an Objects tab in a custom dialog, pass `objects={joyrideRef.current?.getPlayground()?.objects}` to `VehiclePopover`. The embed handles this automatically. The inspector lets users search, preview, reveal, drive to, reset, or disable objects. Pass `onDriveToObject` to enable driving to a target. Revealing an object closes the dialog and stops camera following; resetting it leaves shared trails and particles intact.\n\n`SceneObjectInspector` provides `getSnapshot()`, `subscribe(listener)`, `getTarget(id)`, `reveal(id)`, `reset(id)`, and `remove(id)`. The page runtime also has `resetObject(id)` and `removeObject(id)`. Removal disables the object without deleting its HTML. Scene reset restores removed objects; checkpoints preserve their state. Types `SceneObject`, `SceneObjectPreview`, and `SceneObjectInspector` come from `@joy-ride/browser`.\n\n`VehiclePopover` supplies the dialog, `initialTab`, and host callbacks. For embeds, `dialog.vehicleTabs` chooses the visible tabs. These React building blocks configure presentation rather than portable JSON:\n\n| Export | Purpose |\n| --------------------------- | ------------------------------------------------------------------------------ |\n| `JoyRide` | React canvas/controls adapter for a browser session; forwards `JoyRideHandle`. |\n| `VehicleHint` | DOM hint anchored to the car in document coordinates. |\n| `CanvasDrive` | Canvas-owned level host. |\n| `VehiclePopover` | Configurable dialog, tabs, and garage callbacks. |\n| `VehicleShowcase` | Vehicle picker with drive-through selection and host-owned presets. |\n| `VehiclePreview` | Inspect a preset, sprite geometry, and mounted tools. |\n| `JoyRideLogo` | Optional branded logo presentation. |\n| `joyRideLogo` | Shared SVG artwork data for host-owned logo treatments. |\n| `CodeBlock` | Escaped, copyable code examples using shadcn primitives. |\n| `Toolbar` / `ToolbarButton` | Shared host controls. |\n| `TouchControls` | Touch input overlay producing normal vehicle controls. |\n\nShared shadcn controls are available from `@joy-ride/ui/controls`. Theme helpers are in `@joy-ride/ui/theme`, with CSS at `@joy-ride/ui/theme.css`. Engine configuration and catalogs are imported from their owning `@joy-ride/engine` entrypoints rather than re-exported from UI.\n\n### Browser sessions without React\n\n```ts\nimport { BrowserSession } from '@joy-ride/browser';\n\nconst session = new BrowserSession(canvas, {\n overlay: true,\n masterVolume: 0,\n onReady(world, registry) {\n registry.bind('.playful', { breakable: true });\n },\n});\nsession.update({ paused: true });\nsession.handle.startAudio();\n// Later:\nsession.dispose();\n```\n\n`BrowserSession(canvas, options?, presentation?)` manages the world, clock, input, and browser resources without React. `handle` provides engine commands; `touchChange(controls)` supplies host input. Use `update(patch)` for live options and `dispose()` for cleanup. Overlay sessions call `onReady(world, registry)` unless disposed first.\n\n`BrowserSessionOptions` lists all settings, bindings, definitions, startup state, and callbacks. Fields excluded from `BrowserSessionUpdate` require a new session. Optional presentation hooks supply a toolbar, `onPresent(time, world, sound)`, and a safe camera frame. The session owns the frame clock.\n\n`session.handle` exposes lighting (`setLighting`, `getLighting`, `toggleLight`), audio (`startAudio`), vehicle access (`getVehicle`, `getPresetId`, `setPreset`), geometry (`getCarAnchor`, `getPose`, `getPathView`), effects (`clearEffects`, `reset`, `addLiquid`, `ejectLiquid`), distance (`getDistance`, `resetDistance`, `cycleDistanceDpi`), placement (`resetTo`, `parkAt`, `enterAt`), checkpoints (`saveState`, `restoreState`), and `getPlayground` for advanced registry/world access. These engine commands use the same units and return conventions as the corresponding browser facade commands. Placement uses `{xPx,yPx,angleRad?}`; `parkAt` requires an angle. Distance readouts include their calibrated display unit. `vehicleReadout` produces shared HUD data without owning a clock.\n\n`ride.enterAt(...)` and `session.handle.enterAt(...)` fade in a moving car and skid it to an element or document point. `delayMs` waits before arrival. The approach predicts speed from skid distance unless `initialSpeedMps` is supplied, and adds service braking when needed. `fadeFraction` controls how much of the entrance fades in. Input or disposal cancels a pending entrance. The result is `completed`, `interrupted`, or `unavailable`.\n\n```ts\nawait ride.enterAt({\n target: document.querySelector('#example')!,\n delayMs: 1000,\n approach: {\n angleRad: 0,\n distancePx: 240,\n fadeFraction: 0.5,\n },\n handbrake: { steer: 0.08 },\n});\n```\n\nThe React `JoyRide` component creates this session and forwards `JoyRideHandle` to `session.handle`. React owns the canvas and controls; it does not own physics or browser input state.\n\nThe vehicle hover toolbar provides mute and quit controls for the player.\n\n### Canvas-owned worlds\n\n```ts\nimport { CanvasWorld } from '@joy-ride/engine';\n\nconst world = new CanvasWorld(canvas, level, { muted: true, quality: 'medium' });\nworld.focus();\nworld.setPaused(false);\n// Later:\nworld.dispose();\n```\n\n`new CanvasWorld(canvas, level, options?)` hosts a canvas-owned scene. Levels use metres/Y-up and explicit shape geometry, with whole-object breakage. They share damage-capability constraints; unsupported DOM-only capabilities reject.\n\nOptions include `preset`, `quality`, `lighting`, `muted`, `paused`, `viewScale`, `safeArea`, `cameraLock`, `cameraSmoothing`, `pauseShortcut`, shared display and game settings, `drawGround`, `drawForeground`, `filterControls`, `onStep`, `onPauseChange`, `onHorn`, and `onPresent`.\n\n| CanvasWorld methods | Purpose |\n| ------------------------------------------------ | --------------------------------------------------------------- |\n| `setLevel`, `getLevel`, `reset` | Replace/inspect the level or restore its checkpoint. |\n| `setPaused`, `setMuted`, `focus`, `dispose` | Host lifecycle and input focus. |\n| `setLighting`, `getLighting`, `toggleLight` | Lamp configuration. |\n| `setViewScale`, `setSafeArea`, `getSafeViewport` | Canvas presentation and host UI insets. |\n| `setCameraSmoothing`, `setCameraLock` | Camera behaviour. |\n| `setInputEnabled`, `setAction`, `setControls` | Host input/assist. Pass `null` controls to resume normal input. |\n| `addObject`, `removeObject` | Runtime level objects. |\n| `addLiquid`, `isTouchingLiquid`, `pour` | Canvas-world liquid authoring/contact. |\n\n### Engine package boundaries\n\n`@joy-ride/engine` keeps its default entry small: `Simulation`, `GameWorld`, `CanvasWorld`, `definePlayground`, `createPlaygroundConfiguration`, and `parsePlaygroundConfiguration`, with their core configuration types. For a site playground, use `@joy-ride/game`; the internal `@joy-ride/browser` package owns the framework-independent browser session, and `@joy-ride/ui` supplies optional React presentation.\n\nAdvanced hosts import deliberate extension entries:\n\n| Entry | Responsibility |\n| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| `@joy-ride/engine/engine` | World/clock/checkpoint ownership, canvas levels/scenes, geometry conversions, and host event helpers. |\n| `@joy-ride/engine/simulation` | Simulation state, controls, vector math, and driving geometry. |\n| `@joy-ride/engine/vehicles` | Vehicle presets/catalog, entities, slots, tools, stats, sprite geometry, and status effects. |\n| `@joy-ride/engine/playground` | Authored contracts, canonical validation/composition/attribute parsing, registries, zones, HUD, runtime options, and portable configuration. |\n| `@joy-ride/engine/rendering` | Renderer host integration, lighting, overlay layers, and presentation option types. |\n| `@joy-ride/engine/physics` | DOM contacts, liquid definitions, collision-mask queries, and combustible lifecycle configuration. |\n| `@joy-ride/engine/audio` | Engine audio integration. |\n| `@joy-ride/engine/input` | Keyboard controls and input bindings. |\n| `@joy-ride/engine/intro` | Opening entrance path and driver. |\n| `@joy-ride/engine/tutorial` | Optional tutorial orchestration, canvas tutorials, and callout contracts. |\n\nEngine objects hold live simulation state. Shaders, caches, source-file paths, and vendor modules are internal. Use portable configuration to save a playground.\n\n`GameWorld.configureVehicle` updates a live vehicle. `saveState()` returns a same-world `GameCheckpoint` with `restore()`, `available`, and `dispose()`. Checkpoints hold engine resources and cannot be saved as JSON; dispose them when finished. `GameLoop` updates physics at 120 Hz and presents once per frame.\n\nUse the browser API for declarative playgrounds, the React/canvas hosts for custom presentation, and the engine modules for implementing your own host. Keep host functions and DOM references outside serialized definitions.\n";function ru(e){let t=ho().use(xi).use(Zl).parse(e),n=new Map,r=t.children.filter(e=>e.type===`heading`).map(e=>{let t=kt(e),r=t.toLowerCase().replace(/[^\p{L}\p{N}]+/gu,`-`).replace(/^-|-$/g,``)||`section`,i=n.get(r)??0;return n.set(r,i+1),{node:e,id:`jr-doc-${r}${i?`-${i+1}`:``}`,title:t}}),i=r.filter(({node:e})=>e.depth===2);return i.map((t,n)=>{let a=t.node.position.start.offset,o=i[n+1]?.node.position.start.offset??e.length,s=t.node.position.start.line;return Object.freeze({id:t.id,title:t.title,markdown:e.slice(a,o).trimEnd(),headings:Object.freeze(r.filter(({node:e})=>e.position.start.offset>=a&&e.position.start.offset<o).map(({node:e,id:t,title:n})=>Object.freeze({id:t,title:n,depth:e.depth,line:e.position.start.line-s+1})))})})}var $=ru(nu),iu=$.flatMap(e=>{let t=e.markdown.split(`
|
|
32
|
+
`))}function s(e,t,n,r){let a=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:i,after:i});return o(),a(),s}function c(e,i){return Ts(e,{align:i,alignDelimiters:n,fillRows:!1,padding:t,stringLength:r})}function l(e,t,n){let{children:r}=e,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=u(r[i],t,n);return o(),a}function u(e,t,n){let{children:r}=e,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=s(r[i],e,t,n);return o(),a}function d(e,t,n){let r=Rc.inlineCode(e,t,n);if(!n.stack.includes(`tableCell`))return r;let i=[],a=0,o=r.indexOf(`|`);for(;o!==-1;){let e=o;for(;e>a&&r.charCodeAt(e-1)===92;)e--;i.push(r.slice(a,o)),(o-e)%2==0&&i.push(`\\`),a=o,o=r.indexOf(`|`,o+1)}return i.push(r.slice(a)),i.join(``)}}function Jc(e,t,n,r){if(e.type===`table`&&n.type===`listItem`&&n.spread===!1&&(t.type===`definition`||t.type===`heading`&&Yc(t,r)||t.type===`paragraph`||t.type===`table`))return 1}function Yc(e,t){let n=!1;return ka(e,function(e){if(e.type===`break`||`value`in e&&/\r?\n|\r/.test(e.value))return n=!0,!1}),!!((!e.depth||e.depth<3)&&kt(e)&&(t.options.setext||n))}function Xc(){return{exit:{taskListCheckValueChecked:Qc,taskListCheckValueUnchecked:Qc,paragraph:$c}}}function Zc(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:el}}}function Qc(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function $c(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function el(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Rc.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function tl(){return[Ho(),fs(),_s(),zc(),Xc()]}function nl(e){return{extensions:[Uo(),ps(e),vs(),qc(e),Zc()]}}var rl={tokenize:gl,partial:!0},il={tokenize:_l,partial:!0},al={tokenize:vl,partial:!0},ol={tokenize:yl,partial:!0},sl={tokenize:bl,partial:!0},cl={name:`wwwAutolink`,tokenize:ml,previous:xl},ll={name:`protocolAutolink`,tokenize:hl,previous:Sl},ul={name:`emailAutolink`,tokenize:pl,previous:Cl},Q={};function dl(){return{text:Q}}for(var fl=48;fl<123;)Q[fl]=ul,fl++,fl===58?fl=65:fl===91&&(fl=97);Q[43]=ul,Q[45]=ul,Q[46]=ul,Q[95]=ul,Q[72]=[ul,ll],Q[104]=[ul,ll],Q[87]=[ul,cl],Q[119]=[ul,cl];function pl(e,t,n){let r=this,i,a;return o;function o(t){return!wl(t)||!Cl.call(r,r.previous)||Tl(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return wl(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(sl,u,l)(t):t===45||t===95||W(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&U(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function ml(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!xl.call(r,r.previous)||Tl(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(rl,e.attempt(il,e.attempt(al,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function hl(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Sl.call(r,r.previous)&&!Tl(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(U(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Vt(t)||K(t)||Kt(t)||Gt(t)?n(t):e.attempt(il,e.attempt(al,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function gl(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function _l(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(ol,c,s)(t):t===null||K(t)||Kt(t)||t!==45&&Gt(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function vl(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(ol,t,a)(o):o===null||K(o)||Kt(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function yl(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||K(o)||Kt(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||K(e)||Kt(e)?t(e):r(e)}function a(e){return U(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):U(t)?(e.consume(t),o):n(t)}}function bl(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return W(e)?n(e):t(e)}}function xl(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||K(e)}function Sl(e){return!U(e)}function Cl(e){return!(e===47||wl(e))}function wl(e){return e===43||e===45||e===46||e===95||W(e)}function Tl(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var El={tokenize:Pl,partial:!0};function Dl(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:jl,continuation:{tokenize:Ml},exit:Nl}},text:{91:{name:`gfmFootnoteCall`,tokenize:Al},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Ol,resolveTo:kl}}}}function Ol(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=H(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function kl(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Al(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||K(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(H(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return K(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function jl(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||K(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=H(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return K(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),J(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Ml(e,t,n){return e.check(pn,t,e.attempt(El,t,n))}function Nl(e){e.exit(`gfmFootnoteDefinition`)}function Pl(e,t,n){let r=this;return J(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Fl(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&B(o,o.length,0,on(s,e.slice(r+1,n),t)),B(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),B(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=an(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=an(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Il=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){Ll(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Ll(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function Rl(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function zl(){return{flow:{null:{name:`table`,tokenize:Bl,resolveAll:Vl}}}}function Bl(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):G(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):q(t)?J(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||K(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,q(t)?J(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return q(t)?J(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||G(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return q(t)?J(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||G(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||G(n)?(e.exit(`tableRow`),t(n)):q(n)?J(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||K(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Vl(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Il;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Ul(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Hl(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Hl(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Hl(f,t,o,i,n,d)):(o[0]=o[1],d=Hl(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Ul(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Rl(t.events,n))}return e}function Hl(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Wl(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Wl(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=Wl(t.events,n[2]),a=Wl(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Wl(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Ul(e,t,n,r,i){let a=[],o=Wl(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Wl(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Gl={name:`tasklistCheck`,tokenize:ql};function Kl(){return{text:{91:Gl}}}function ql(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return K(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return G(r)?t(r):q(r)?e.check({tokenize:Jl},t,n)(r):n(r)}}function Jl(e,t,n){return J(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Yl(e){return It([dl(),Dl(),Fl(e),zl(),Kl()])}var Xl={};function Zl(e){let t=this,n=e||Xl,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Yl(n)),a.push(tl()),o.push(nl(n))}var Ql=t(s(),1);function $l({className:e,...t}){return(0,Z.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:d(`group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input bg-transparent outline-none transition-colors dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[aria-invalid=true]]:border-destructive has-[[aria-invalid=true]]:ring-destructive/20`,e),...t})}function eu({className:e,align:t=`inline-start`,...n}){return(0,Z.jsx)(`div`,{"data-slot":`input-group-addon`,"data-align":t,className:d(`flex shrink-0 cursor-text items-center justify-center gap-1.5 text-muted-foreground select-none [&>svg]:size-3.5`,t===`inline-start`?`order-first pl-2.5`:`order-last pr-2`,e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}function tu({className:e,...t}){return(0,Z.jsx)(g,{"data-slot":`input-group-control`,className:d(`min-w-0 flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent`,e),...t})}var nu="## Get started\n\nAdd a drivable car to your page, then choose which elements it can interact with. Start with a script or npm, and mark existing elements with `data-jr-*` attributes.\n\n### Installation\n\nChoose CDN, JavaScript, or React. All three accept the same authored configuration\nand expose the same ride controller.\n\n| Integration | Entry | React runtime | Startup |\n| ----------- | ---------------------- | ------------------------------------------- | --------------------------------------------------- |\n| CDN | `embed.js` | Included | A script with `data-jr-mount` starts automatically. |\n| JavaScript | `@joy-ride/game` | Included | Call `mount()` explicitly. |\n| React | `@joy-ride/game/react` | The application's React 19 and React DOM 19 | Render `JoyRide`; the component owns cleanup. |\n\nChoose one integration per page. The root import, `@joy-ride/game`, bundles React\nand starts only when you call `mount()`. The `/embed` entry adds globals and\ndeclarative script startup; `/react` shares the application's React runtime.\nReact and React DOM are optional package peers; the JavaScript and CDN entries do\nnot need an installed React runtime.\n\n#### CDN\n\nPaste this into an HTML page:\n\n```html\n<h1\n data-jr-breakable\n>\n Drive through this headline\n</h1>\n\n<script\n type=\"module\"\n src=\"https://unpkg.com/@joy-ride/game@latest/embed.js\"\n data-jr-mount\n><\/script>\n```\n\n`data-jr-mount` starts Joy Ride when the document is ready. Drive with **WASD** or the arrow keys; click the car to change vehicles. See [Script tag options](#jr-doc-script-tag-options) for presets, saved preferences, routing, and arrival targets.\n\n#### npm, pnpm, or Yarn\n\n```sh\nnpm install @joy-ride/game\n```\n\nUse `pnpm add` or `yarn add` instead if those manage your project. Mount after the\npage elements exist. This entry includes React and React DOM internally; no\nframework installation is needed.\n\n```ts\nimport { mount } from '@joy-ride/game';\n\nconst ride = mount();\n\nawait ride.ready;\n\n// Call ride.dispose() when the host view is removed.\n```\n\nThe package import does not mount automatically. It is safe to import during\nserver rendering, but call `mount()` only in the browser after page content exists.\n\n#### React\n\nIn an application using React 19 and React DOM 19, import the React entry so Joy\nRide shares the application's runtime. It does not include another copy of React.\n\n```tsx\n'use client';\n\nimport { JoyRide } from '@joy-ride/game/react';\n\nexport const JoyRideExperience = () => (\n <JoyRide\n initialOptions={{\n player: { vehicle: 'porsche-911-997' },\n game: { quality: 'high', masterVolume: 0 },\n }}\n />\n);\n```\n\n`JoyRide` mounts after the component reaches the browser and disposes the ride on\nunmount. It renders its controls through the host React tree, supports Strict Mode,\nand does not create a separate React root. The initial options accept the same\n`MountOptions` or saved `PlaygroundConfiguration` as `mount()`.\n\n| Prop | Meaning |\n| ---------------- | ------------------------------------------------------------------------------------------------- |\n| `preset` | Named defaults, currently `\"sfw\"`. Applied once at mount; explicit initial options override them. |\n| `initialOptions` | Initial authored configuration. Read when mounting; use a new component `key` to replace it. |\n| `settings` | Live `RuntimeOptionsPatch` for `game` and `dialog`, applied without remounting. |\n| `ref` | A React ref to `RideController` or `null`; commands that need the world still await `ride.ready`. |\n| `onReady` | Receives the initialized `RideController`. |\n| `onError` | Receives an initialization, presentation, or live settings error. |\n\nThe entry also exports the same imperative API and types for integrations that\nneed to call `mount()` in their own lifecycle. A default import remains the\nimperative API; the `JoyRide` component is a named export. Use `/react` rather than\nwrapping the root JavaScript API in a React component, which would load an additional bundled React.\n\n#### Lazy loading React with a preset\n\nThe component resolves its preset after it loads, so the host only imports the\nReact entry inside `lazy()`:\n\n```tsx\n'use client';\n\nimport { lazy, Suspense } from 'react';\n\nconst JoyRideGame = lazy(() =>\n import('@joy-ride/game/react').then(({ JoyRide }) => ({ default: JoyRide })),\n);\n\nexport const JoyRideExperience = () => (\n <Suspense fallback={null}>\n <JoyRideGame\n preset=\"sfw\"\n initialOptions={{ player: { vehicle: 'porsche-911-997' } }}\n />\n </Suspense>\n);\n```\n\n`preset` and `initialOptions` are read once when mounting. The preset supplies\n`game` and `dialog` defaults; explicit initial options win within each group.\nSaved playground configurations remain supported and their authored settings win.\nUse a new component `key` to apply a different preset or initial configuration;\n`settings` continues to apply live updates without remounting. Unknown preset\nnames report an initialization error through `onError`.\n\n### A playground in HTML\n\n```html\n<main>\n <h1\n data-jr-breakable\n data-jr-burnable\n >\n Make a mess.\n </h1>\n <div style=\"background: #fafbfc\">Your own layout</div>\n <div\n data-jr-liquid=\"paint\"\n data-jr-liquid-color=\"#5271ff\"\n >\n Blue paint\n </div>\n <button\n data-jr-trigger=\"click\"\n >\n Drive over me\n </button>\n <output\n data-jr-hud=\"speed\"\n >\n 0\n </output> mph\n</main>\n```\n\nThe script from [Installation](#jr-doc-installation) starts the ride. The module import needs an explicit `JoyRide.mount()` call.\n\nAn empty capability attribute or `true` enables it; `false` disables it. Values use the units in their names, such as seconds, metres, or CSS pixels.\n\n### A playground in JavaScript\n\n```ts\nimport JoyRide from '@joy-ride/game';\n\nconst ride = JoyRide.mount({\n game: { masterVolume: 0 },\n});\n\nconst titles = ride.bind('.playful-title', {\n breakable: { health: 80 },\n burnable: { burnSeconds: 12 },\n});\n\nawait ride.ready;\nride.player?.update({ appearance: 'auto' });\n```\n\nSelectors, attributes, and exact-element bindings share the same schema and validation. A selector binding includes future matches. An exact-element binding overrides that element's attributes.\n\nJoy Ride finds authored objects throughout the page. Add a behavior to any existing element; no playground wrapper is needed.\n\n### Lifecycle and readiness\n\n`JoyRide.mount()` returns a controller immediately. You can register bindings and listeners while it loads. Await `ride.ready` before world commands such as spawning vehicles or pouring liquid. `ride.player` and `ride.state` are `null` until ready; tours wait automatically.\n\nOnly one ride can be mounted on a page. `JoyRide.active` returns its controller, or `undefined`. Call `ride.dispose()` before mounting another; repeated disposal is safe. Disposal restores the page and releases listeners and resources. Initialization errors reject `ride.ready` and clean up. Commands fail after disposal; `ride.player` and `ride.state` return `null`.\n\nSound starts muted until a browser user gesture permits it. `ride.startAudio()` explicitly requests audio startup; browser autoplay rules still apply.\n\n### Coordinate conventions\n\nBrowser placement, vehicle snapshots, and public event positions use CSS **document pixels**, X right and Y down. `angleDeg` is clockwise. Vehicle speed is `speedMps`. A supplied element places a vehicle or pour at its centre. Vehicle state is deeply readonly.\n\nCanvas level definitions and low-level simulation positions use **metres**, X right and Y up. Do coordinate conversion at the browser/canvas boundary.\n\n## Page objects\n\nMake existing page elements block the car, move, break, burn, or crush. Use HTML attributes for simple setups and `ride.bind()` for JavaScript control.\n\n### Object capabilities\n\n`ObjectSpec` describes an existing page element. Each capability accepts a boolean or its option object, except `solid`/`pushable` which are booleans.\n\n| Property | Options / meaning |\n| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |\n| `id` | Stable scene ID; unique across registered objects. Otherwise generated. |\n| `object` | Named object recipe from `definitions.objects`. |\n| `enabled` | `false` suspends the resolved object's capabilities. |\n| `solid` | Blocking element bounds. |\n| `pushable` | Pushable lettering; not an arbitrary DOM rigid body. |\n| `breakable` | `true` or `{ health?: positive number }`. |\n| `burnable` | `true` or `{ burnSeconds?, ignitionSeconds?, spreadSeconds? }`; durations in seconds. Burn duration is positive; ignition/spread may be zero. |\n| `combustible` | Fuel lifecycle: `true` or `{ health?, burnSeconds?, blastRadiusPx? }`. Positive values. |\n| `crushable` | `true` or `{ scale?, opacity? }`, each between 0 and 1. |\n| `points` | Optional nonnegative points awarded when the object is destroyed, a pickup is collected, or a parking/stop zone qualifies. |\n| `liquid` | Liquid recipe and options; see Liquids in HTML. |\n| `pickupEffectColor` | Optional pickup ripple color: six-digit hex or RGB tuple. |\n| `trigger` | Zone preset/options; see Objectives and points. |\n| `hud` | One readout `{ field, unit?, precision? }`, or `false`. |\n| `meta` | JSON-compatible application metadata; available on object snapshots/events. |\n\nBreakable artwork supports text and root SVG elements. Liquid paint supports HTML and filled SVG shapes (`rect`, `circle`, `ellipse`, `path`, and polygons). Triggers, crushing, combustible fuel, and pushable text require HTML elements. Solidity and HUD readouts support more target types. Unsupported targets report a diagnostic.\n\n### Compatibility rules\n\n- `breakable` and `burnable` can be used independently or together.\n- `combustible` excludes `breakable`; `burnable` can set its fire profile.\n- `crushable` excludes `breakable` and explicit `solid: true`; crushing combustible fuel is allowed.\n- HUD readouts exclude breakable/burnable/pushable artwork and paint on the same node. Artwork traversal skips HUD-owned descendant text. Use separate sibling targets for independent content.\n- Vehicles have their own JS configuration and are never created through `ride.bind` or HTML.\n\nTypeScript catches incompatible literal configurations. Runtime validation checks complete merged results, including future DOM edits and JavaScript callers.\n\n### Composition and precedence\n\nFrom lowest to highest precedence: engine defaults, named recipe, selector registrations in registration order, explicit attributes, exact-element registrations in registration order, then internal object overrides.\n\nNested options merge, arrays replace, and `undefined` never erases a lower value. `false` disables a capability. Changing a slot action replaces incompatible old action options.\n\n```ts\nconst binding = ride.bind('.timber', {\n breakable: true,\n burnable: { burnSeconds: 10 },\n});\n\nbinding.update({ burnable: { ignitionSeconds: 0.2 } });\nbinding.replace({ breakable: true }); // this layer stops adding burning\nbinding.dispose(); // reveal attributes / lower bindings\n```\n\n### Binding handles and inspection\n\n`PlaygroundBinding` exposes `objects`, `update(patch)`, `replace(spec)`, `refresh()`, and `dispose()`.\n\n`objects` lists matching readonly snapshots: `{ id, target, spec, revision }`. Use `update` to merge this binding’s options, `replace` to replace them, and `dispose` to remove the binding. Bindings have no separate readiness promise.\n\nSelector bindings automatically track structural/attribute changes and input/change/focus events. Call `binding.refresh()` after programmatic state changes that do not produce those events, or for transient selectors such as `:hover`/`:active`. Exact-element/iterable bindings have an explicit fixed target set.\n\nInvalid JS edits throw before committing the affected configuration. Invalid DOM edits retain the last valid configuration and emit `joyride:diagnostic`.\n\n### Object HTML attributes\n\n| Attribute | Meaning |\n| ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |\n| `data-jr-id` | Stable object ID. |\n| `data-jr-object` | Named object recipe. |\n| `data-jr-enabled` | Boolean suspension. |\n| `data-jr-solid` | Block the vehicle. |\n| `data-jr-pushable` | Allow the vehicle to push the element. |\n| `data-jr-points` | Optional nonnegative points for destruction, pickup collection, or a qualified parking/stop zone. |\n| `data-jr-breakable` | Enable fragmentation. |\n| `data-jr-breakable-health` | Fragmentation toughness. |\n| `data-jr-burnable` | Independent artwork burning. |\n| `data-jr-burnable-burn-seconds` | Burning duration. |\n| `data-jr-burnable-ignition-seconds` | Flame exposure before ignition. |\n| `data-jr-burnable-spread-seconds` | Artwork fire-spread duration. |\n| `data-jr-combustible` | Enable the fuel lifecycle. |\n| `data-jr-combustible-health` | Fuel health. |\n| `data-jr-combustible-burn-seconds` | Fuel burn duration. |\n| `data-jr-combustible-blast-radius-px` | Explosion radius in CSS pixels. |\n| `data-jr-crushable` | Enable crushing. |\n| `data-jr-crushable-scale` | Scale after crushing. |\n| `data-jr-crushable-opacity` | Opacity after crushing. |\n| `data-jr-meta-*` | String metadata; kebab names become camelCase metadata keys. |\n| `data-jr-ui` | Mark host controls as UI so driving input does not steal their interactions. Explicit HUD readouts can live inside UI. |\n\nUse `data-jr-foreground` on host UI that should stay above the vehicle and effects overlay. `data-jr-camera=\"fixed\"` or `data-jr-camera=\"follow\"` changes camera behavior while the car overlaps that region; `data-jr-camera-zoom` sets its zoom. `data-jr-auto-paint=\"false\"` excludes an element subtree from automatic paint. These page attributes are separate from the object capability attributes above.\n\n### Crush appearance and paint\n\nAdd `data-jr-crushable` to an HTML element. It crushes when the visible vehicle covers at least half its area, including CSS rotation and scale. Use `data-jr-crushable-crushed-class` to style the result; otherwise it squashes and fades. Add `data-jr-crushable-crushed-paint-color` for a paint spill sized to the element. Colors accept six-digit hex or JavaScript RGB tuples.\n\n```html\n<div\n data-jr-crushable\n data-jr-crushable-crushed-class=\"is-crushed\"\n data-jr-crushable-crushed-paint-color=\"#8caa27\"\n>\n Your element\n</div>\n```\n\nThe JavaScript equivalent is `ride.bind(element, { crushable: { crushedClass: 'is-crushed', crushedPaintColor: '#8caa27' } })`. Both options are optional. Reset restores the original appearance and removes engine-added classes. The ant artwork on the homepage is an example, not a built-in object type.\n\n### Debris\n\nScatter paper and leaves that react to passing cars. Paper lifts and folds; leaves skid and spin. Set a seed for a repeatable starting arrangement.\n\n```html\n<div\n data-jr-debris\n data-jr-debris-anchor=\"bottom\"\n data-jr-debris-amount=\"35\"\n data-jr-debris-kinds=\"paper leaf\"\n data-jr-debris-seed=\"42\"\n>\n Your ordinary element\n</div>\n```\n\n```js\nawait ride.ready;\nconst litter = ride.debris('.track', {\n anchor: 'center',\n amount: 40,\n // Omit kinds to include both materials.\n kinds: ['paper', 'leaf'],\n spread: 120,\n seed: 42,\n wind: { x: 7, y: -2 },\n});\nlitter.gust({ x: 300, y: -65 });\nlitter.reset();\n// litter.dispose();\n```\n\n`ride.debris(target, options?)` accepts a selector, Element, or iterable of elements. Each match gets its own collection. Selectors include future matches; removing an element removes its debris. You can also use `ride.bind('.track', { debris: { amount: 35, anchor: 'bottom' } })` or HTML attributes. HTML attributes take effect once a ride is mounted.\n\n| Option | HTML attribute | Meaning |\n| -------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `amount` | `data-jr-debris-amount` | Integer 0–600 per source, default 30; scene cap 3,000. |\n| `kinds` | `data-jr-debris-kinds` | `paper` or `leaf`; space/comma separated in HTML. Omit for both. |\n| `anchor` | `data-jr-debris-anchor` | `center`, `top`, `top-right`, `right`, `bottom-right`, `bottom`, `bottom-left`, `left`, `top-left`, or `fill` across the element. Default `center`. |\n| `spread` | `data-jr-debris-spread` | Scatter radius in scene pixels, default based on element size. `fill` uses the full bounds. |\n| `seed` | `data-jr-debris-seed` | Repeatable initial arrangement, default 31. |\n| `color` | `data-jr-debris-color` | Optional 3/6-digit hex tint for paper or leaves. |\n| `wind.x` | `data-jr-debris-wind-x` | Horizontal ambient wind in scene pixels/second; default `7`. |\n| `wind.y` | `data-jr-debris-wind-y` | Vertical ambient wind in scene pixels/second; default `-2`. Set both axes in HTML. |\n\n`reset()` restores the starting arrangement, `gust({x,y})` adds wind, and `dispose()` removes the collection. Scene reset restores authored debris; checkpoints preserve its motion. Resting pieces outside the viewport sleep to save work.\n\nDebris is explicit. Background styling never scatters physical debris. Add `data-jr-debris`, a `debris` definition, or call `ride.debris()` wherever you want a source.\n\nFor custom canvas hosts, import `Debris` from `@joy-ride/engine/debris`. Use `scatter({x,y,width,height}, options)` and `step(seconds, vehicles, viewport, walls)` with scene-pixel geometry. The normal game loop already updates `world.renderer.debris`. Custom renderers can call `drawDebris(context, particles, viewport, dark, layer)`: draw `ground` before vehicles and `air` after.\n\n## Vehicles and tools\n\nChoose a vehicle, assign its tools, or define your own preset.\n\n### Create and configure a vehicle\n\n```ts\nconst kit = JoyRide.define({\n liquids: { ink: { base: 'paint', color: '#5271ff' } },\n vehicles: {\n artist: {\n base: 'mazda-mx5-nd-2019',\n slots: { 1: { action: 'eject', liquid: 'ink' } },\n },\n },\n});\n\nconst ride = JoyRide.mount({ definitions: kit, player: { vehicle: 'artist' } });\nawait ride.ready;\nconst parkedCar = ride.spawnVehicle({\n vehicle: 'artist',\n at: { xPx: 300, yPx: 500 },\n angleDeg: 90,\n});\n```\n\n`VehicleSpawnOptions` extends `VehicleConfiguration` with `at?: PageTarget` and `angleDeg?: number`. `PageTarget` is an Element, CSS selector, or `{ xPx, yPx }` point in document CSS pixels. The same target shape is used by `ride.pour` and `ride.enterAt`. `vehicle` is a built-in or named recipe. `id?` supplies a unique ID. Spawned vehicles are parked; the mounted player remains the only drivable car. Initial `mount.player` only accepts `vehicle`, `appearance`, and `slots`.\n\nBuilt-in vehicles are grouped as **Classics** (`porsche-911-997`, `toyota-supra-a80-1993`, `mazda-rx7-fd-1999`), **Sports cars** (`ford-mustang-gt-2024`, `bmw-m4-2024`, `subaru-wrx-2024`, `audi-rs3-2024`, `toyota-gr-corolla-2026`, `mazda-mx5-nd-2019`, `nissan-gtr-r35-2007`), **Trucks & off-road** (`jeep-wrangler-2026`, `ram-2500-cummins-2026`), and **Supercars** (`lamborghini-huracan-evo-2023`, `mclaren-720s-2017`, `chevrolet-corvette-c8-z06-2023`, `ferrari-812-superfast-2017`). Use `JoyRide.listVehicleOptions()` to discover picker IDs, labels, and categories. The Vehicle tab's grid button groups the selection by category; `dialog.showVehicleNames` controls labels in both views. Custom presets may set `category`; when omitted, they appear under Sports cars.\n\n### Vehicle handles and snapshots\n\n| Member | Meaning |\n| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |\n| `handle.id` | Stable vehicle identity. |\n| `handle.state` | Deeply readonly `{ id, vehicle, position, speedMps, health, maxHealth, appearance, slots }`. Materials use authored names. |\n| `handle.update(patch)` | Validate the whole candidate before changing it. Recipe switches rebase appearance/slots; option-only patches retain the current vehicle. |\n| `handle.pickupEffect(input)` | Play a contact-centered optical pickup pulse; see Pickup refraction. |\n| `handle.useSlot(number)` | Pulse an assigned slot; returns whether input was accepted. |\n| `handle.startSlot(number)` | Hold an assigned slot; returns whether input was accepted. |\n| `handle.stopSlot(number)` | Release it. |\n| `handle.dispose()` | Remove the vehicle and release held actions; idempotent. |\n\n`VehiclePatch` can edit existing slot options without repeating their action. Supplying a new action requires its complete configuration. Updating a live ID to a different ID is rejected. Handles continue to identify the same vehicle across same-world checkpoint restoration.\n\n### Appearance and automatic contrast\n\n`appearance` is `'auto'`, `'light'`, or `'dark'`. Auto samples the actual ground beneath each car, including translucent layers; explicit values override it. This is independent of the page/UI theme, background styling, and individual light switches. An explicitly disabled headlight stays disabled.\n\n### Slot assignments\n\nSlots are numbered 1–9. The default assignments are oil emission, machine gun, flamethrower, rocket, and ghost in slots 1–5. Slots 6–9 are unassigned. `false` disables an assignment. Available assignments keep their authored order, but their keyboard and `useSlot` numbers close gaps when a slot or tool is disabled. A key already held when assignments change must be released before it can activate its new tool. `handle.state.slots` retains the authored assignments.\n\n```ts\nride.player?.update({\n slots: { 1: { action: 'eject', liquid: 'mud', activation: 'hold', rate: 6, amount: 0.65 } },\n});\nride.player?.update({ slots: { 1: { rate: 3 } } });\nride.player?.useSlot(1);\n```\n\n| Field | Values |\n| ------------ | ------------------------------------------------------------------------------ |\n| `action` | `'eject'`, `'machineGun'`, `'flamethrower'`, `'rocket'`, `'ghost'`, `'boost'`. |\n| `activation` | `'tap'` or `'hold'`; default hold. |\n| `liquid` | Required for eject; forbidden for other actions. |\n| `rate` | Eject dose per second while held; positive; default 6. |\n| `amount` | Eject pulse dose; positive; default 0.65. |\n\nLiquid doses are engine units, not litres. The `toolsEnabled` switch and ghost rules apply to player and JS-created vehicles. Tool use and liquid emission are unlimited. Direct `ride.pour` places liquid in the scene. There are no HTML vehicle/weapon-slot attributes.\n\n### Vehicle definition fields\n\nA `VehicleDefinition` is a deep partial of `VehiclePreset` without its engine ID, plus required `base`, optional `appearance`, and `slots`. Inherit a built-in and override only what you need. For image and physics tuning, run `pnpm run vehicle-editor` from the Joy Ride repository. The editor opens separately from the runtime dialog.\n\n| Group | Fields |\n| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Identity | `name`, `description`, `make`, `model`, `year`. |\n| Mass and health | `massKg`, `health`, `frontWeightFraction`. |\n| Geometry | `lengthM`, `widthM`, `wheelbaseM`, `frontAxleXM`, `rearAxleXM`, `trackWidthM`, `frontTrackWidthM`, `rearTrackWidthM`, `tireLengthM`, `tireWidthM`. |\n| Driving | `engineForceN`, `reversePowerRatio`, `maxReverseSpeedMps`, `rollingResistance`, `coastDecelerationMps2`, `handbrakeDecelerationMps2`, `serviceBrakeDecelerationMps2`, `lateralResistance`, `corneringAccelerationMps2`, `maxSteerAngleRad`, `handbrakeStrength`. |\n| `drift` | `entrySpeedMps`, `slipAngleRad`. |\n| `launch` | `minRpm`, `boostMps`, `boostedBoostMps`, `assistDurationSeconds`, `burnoutRampSeconds`, `chargedSpinSeconds`, `fireLifetimeSeconds`. |\n| `driveBoost` | `gainMps`, `durationSeconds`. |\n| `exhaust` / `lights` | Exhaust `layout`, optional individual `outlets: [{xM,yM}, ...]`, and mirrored `headlights`/`taillights` positions `{xM,yM}`. |\n| `roofRocket` | `xM`, `yM`, `sizeM`, `panelColor`. |\n| `machineGuns` | `xM`, `revealM`, `roundsPerSecond`, `bulletSpeedMps`, `bulletLifetimeSeconds`. |\n| `flamethrower` | `rangeM`, `ignitionSeconds`, `spreadSeconds`, `spreadRadiusPx`, `burnSeconds`, `smokePerSecond`, `jetWidthM`, `flowRate`. |\n| `rockets` | `roundsPerSecond`, `launchSpeedMps`, `accelerationMps2`, `maxSpeedMps`, `lifetimeSeconds`, `smokePerSecond`. |\n| `sound` | `engineId`, `vehicleId`, `engineLabel`, `turbo`, `horn`, and electric pedestrian/motor fade ranges. |\n| `visual` | Fallback `color` and shape: `coupe`, `sedan`, `suv`, or `supercar`. |\n| `image` | `src`, normalized `crop`, `bodyWidthRatio`, optional uniform `scale`, and `wheelVisualScale`. Nose points right. |\n\n`sound.horn` has `lowHz`, `highHz`, `tone` (`disc`, `trumpet`, `electronic`), and `level`. Electric sound fade fields are `fadeStartMps`, `fadeEndMps`, `motorFadeStartMps`, and `motorFadeEndMps`.\n\nImage `crop` has normalized `x`, `y`, `width`, and `height`. `bodyWidthRatio` is the painted body span as a fraction of that crop's height, excluding mirrors. Body width comes from `geometry.widthM`; length follows the cropped artwork's aspect ratio with one uniform scale. Authored `geometry.lengthM` should match that painted length. `vehicleSpriteMetrics`, `vehicleFromSpriteAlpha`, and `vehicleImageFootprint` from `@joy-ride/engine/vehicles` share this analysis and transform across imports, rendering, collision masks, and previews. `wheelVisualScale` optionally adjusts tire `length` and `width` without changing their contact positions.\n\nMounts use body-local metres: positive X points toward the nose and positive Y toward the driver's side. Lamps use mirrored `{xM,yM}` positions. Exhaust `outlets` are independent points used by pipe mouths and effects, so a side exit or asymmetric pair need not mirror; `[]` disables the outlets. Without explicit points, `layout` selects `left`, `right`, `center`, or `left-right`. In the vehicle editor's **Place vehicle points**, choose **Exhaust outlets**, select an outlet, and click its position. Outlets can be added or removed; changing the layout resets custom positions.\n\n## Fire and liquids\n\nSet artwork alight, leave a liquid trail, or let the tires pick up and mix paint.\n\n### Fire and explosions\n\nHold **3** to ignite burnable artwork or liquid. Fire spreads to nearby burnable surfaces. Add `combustible` when an element should also have health and explode:\n\n```html\n<h2\n data-jr-burnable\n data-jr-burnable-burn-seconds=\"12\"\n>\n Light this up\n</h2>\n<div\n data-jr-combustible\n>\n Fuel\n</div>\n```\n\nUse `burnable` for text, SVG artwork, or colored HTML surfaces. Use `combustible` for an HTML fuel object. See [Object capabilities](#jr-doc-object-capabilities) for durations, health, and compatibility rules.\n\n### Liquids in HTML\n\n```html\n<div\n data-jr-liquid=\"paint\"\n style=\"background: #5271ff\"\n>\n Take some blue\n</div>\n<div\n data-jr-liquid=\"oil\"\n></div>\n<svg viewBox=\"0 0 100 100\" width=\"100\" height=\"100\">\n <circle\n data-jr-liquid=\"paint\"\n cx=\"50\"\n cy=\"50\"\n r=\"42\"\n fill=\"#e03139\"\n />\n</svg>\n```\n\n```ts\nride.bind('.paint-pad', { liquid: { kind: 'paint', color: '#5271ff', distanceM: 30 } });\n```\n\n| JS option | HTML attribute | Meaning |\n| ------------- | ---------------------------- | ----------------------------------------------------------------------------- |\n| `kind` | `data-jr-liquid` | Any built-in or defined liquid recipe, such as `oil`, `water`, or `paint`. |\n| `color` | `data-jr-liquid-color` | Six-digit hex, JS RGB tuple, or `'auto'`; defaults to the CSS fill or recipe. |\n| `distanceM` | `data-jr-liquid-distance-m` | Nonnegative tire carry distance. |\n| `opacity` | `data-jr-liquid-opacity` | 0…1, multiplied by the recipe's opacity. |\n| `deformation` | `data-jr-liquid-deformation` | 0…4. |\n\nLiquids inherit their recipe’s handling and fire properties. HTML liquids follow the element’s border, rounded corners, and transforms; SVG liquids follow the filled shape and supported clip paths. Tire contact can deform either without adding volume. Text and other HTML content stay above the liquid.\n\nWith `game.autoPaint: true`, eligible colored HTML backgrounds and SVG fills become paint. Named colors, HSL, OKLCH, and Display P3 are supported. Neutral colors, pale tints, and nearly black backgrounds stay unchanged. Use `data-jr-auto-paint=\"false\"` on an element or ancestor to exclude it. Unsupported SVG masks and clips remain ordinary artwork. Paint mixes with tire pigment. Use `ride.pour` or an emitter for liquid placed independently of an element.\n\n### Liquid definitions\n\nBuilt-ins include `oil`, `water`, `mud`, `paint`, `iridescent-oil`, `clear-water`, `wet-clay`, and experimental `concept-water`, `concept-oil`, `concept-syrup`, `concept-clay`, `concept-lava`, `concept-acid`, and `concept-paint`.\n\n| Field | Meaning |\n| --------------- | -------------------------------------------------------------------------------------- |\n| `base` | Existing built-in or catalog liquid name. |\n| `color` | Six-digit hex or RGB tuple, 0…255 channels. |\n| `thickness` | Material thickness, 0…1. |\n| `deformation` | Tire-driven outline deformation, 0…4. |\n| `opacity` | Material opacity, 0…1. |\n| `burnLifetime` | Positive seconds of fuel at an ignited location. |\n| `burnable` | Boolean; inherit the base material. Oil burns; water, paint and mud do not by default. |\n| `fireSpreadMps` | Positive connected-surface fire-front speed. |\n| `effect` | Optional status-effect definition refreshed on wheel contact. |\n\n`burnable` inherits from the base liquid. For example, `{ base: 'paint', burnable: true, burnLifetime: 8 }` makes paint flammable; `{ base: 'oil', burnable: false }` keeps oil's handling without catching fire. Flames, explosions, and connected fire spread all respect `burnable`. Newly burnable materials default to 12 seconds of fuel and 3.2 metres/second of fire spread unless overridden.\n\nBurning text, SVG artwork, painted HTML boxes, combustible objects, and burnable liquid can ignite nearby materials. Text and SVG spread through neighboring ink, liquids spread through connected wet cells, and combustible objects follow their health and explosion lifecycle. Heat crosses between those materials at nearby burning points; the same scene-fire renderer draws their flames and smoke. A colored element with `data-jr-burnable` burns as a surface; add `data-jr-combustible` when it should also have health and an explosion.\n\nAn effect specifies `lifetime` and `modifiers`, with optional `additiveModifiers` and `intensity: 'linear' | 'pulse' | 'constant'`. Lifetime uses `{ unit: 'seconds' | 'distanceM', amount }`; modifiers are factors such as grip, speed, or drive force. Additive modifiers apply finite stat changes. `StatusEffectDefinition` is exported from `@joy-ride/engine`.\n\n### Pouring liquid\n\n```ts\nride.pour('ink', { at: document.querySelector('#paint-zone')!, amount: 24 });\nride.pour('water', { at: { xPx: 300, yPx: 500 }, amount: 12 });\n```\n\n`ride.pour(liquid, {at, amount?, color?})` resolves a catalog liquid, converts document placement, and deposits it. `at` accepts the same `PageTarget` as vehicle spawning and entry. Amount must be finite and positive, default 24. `color` is an optional pigment override. Slots can emit the same liquid by its authored name. No HTML liquid fixture is required.\n\n## Objectives and points\n\nObjectives describe what to accomplish. Zones define where pickups, parking, checkpoints, and page interactions happen. Use either on its own, or combine zones into an objective.\n\n### Trigger presets\n\n```html\n<button\n data-jr-trigger=\"click\"\n>\n Click on arrival\n</button>\n<input\n type=\"checkbox\"\n data-jr-trigger=\"check\"\n/>\n<span\n data-jr-trigger=\"pickup\"\n data-jr-trigger-event=\"pickup-collected\"\n>\n ●\n</span>\n<div\n data-jr-trigger=\"parking\"\n data-jr-trigger-dwell-seconds=\"0.6\"\n>\n Park here\n</div>\n```\n\nAn empty trigger emits arrival events. `click` invokes native activation; `check` checks a checkbox/switch; `toggle` toggles it. `pickup` consumes once per scene. `parking` requires stopping for 0.45 seconds at at most 0.25 m/s with centre containment. Any ordinary HTML element can be the zone; the action target can be separate. Disabled targets are respected.\n\n### Pickup refraction\n\nAdd a color to make a pickup send a brief ripple through the car. Add `points` for a score reward; either option works on its own.\n\n```html\n<span\n data-jr-trigger=\"pickup\"\n data-jr-points=\"25\"\n data-jr-pickup-effect-color=\"#349dff\"\n>\n ✦\n</span>\n```\n\nThe JavaScript binding is `{ trigger: 'pickup', points: 25, pickupEffectColor: '#349dff' }`. Colors accept any six-digit hex or a JavaScript RGB tuple. Show the shared score with a HUD readout:\n\n```html\n<output\n data-jr-hud=\"points\"\n>\n 0\n</output>\n```\n\nRewards follow pickup repeat/consumption rules; reset restores pickups and clears points.\n\nThe ripple begins where the pickup touches the vehicle’s painted body. Its direction and speed account for driving, drifting, rotation, and moving pickups. It fades in 0.28–0.38 seconds and leaves a short trail of small colored particles. This is a visual effect; handling, health, and weapons stay unchanged.\n\nYou can also trigger it directly:\n\n```ts\nride.player?.pickupEffect({\n color: '#349dff',\n origin: { x: 0.45, y: 0.1 },\n angle: Math.PI,\n velocity: 22,\n});\n```\n\n| Input | Meaning |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `color` | Six-digit hex or RGB tuple. |\n| `origin` | Optional contact in body coordinates: each axis spans −0.5 to 0.5; +X is the nose and +Y is left. Omit to derive entry from the path. |\n| `angle` | Pickup travel direction through the body in radians: 0 toward the nose, π/2 left, π rearward. A stationary pickup moves rearward relative to a car driving forward. |\n| `velocity` | Relative contact speed in metres per second. |\n\nEach pickup gets a slightly different distortion pattern. Up to three colors can overlap. Reset and vehicle replacement clear the effect; checkpoints restore it and its particles. The effect requires WebGL2; the normal car still draws without it. Custom images need same-origin or CORS-enabled access.\n\n### Trigger options and attributes\n\nThe JS shape is `{ trigger: true | false | preset | options }`.\n\n| JS option | HTML attribute | Values / default |\n| -------------- | -------------------------------- | ------------------------------------------------------------------- |\n| `preset` | `data-jr-trigger-preset` | `click`, `check`, `toggle`, `pickup`, or `parking`. |\n| `when` | `data-jr-trigger-when` | `'enter'` (default) or `'stop'`. |\n| `dwellSeconds` | `data-jr-trigger-dwell-seconds` | Nonnegative stopped dwell. |\n| `maxSpeedMps` | `data-jr-trigger-max-speed-mps` | Nonnegative speed threshold. |\n| `action` | `data-jr-trigger-action` | `'event'` (default), `'click'`, `'check'`, `'uncheck'`, `'toggle'`. |\n| `event` | `data-jr-trigger-event` | Additional application event name. |\n| `repeat` | `data-jr-trigger-repeat` | `'visit'` (default), `'vehicle'`, `'scene'`. |\n| `vehicles` | `data-jr-trigger-vehicles` | `'player'` (default) or `'all'`. |\n| `target` | `data-jr-trigger-target` | Selector resolving exactly one action target in the document. |\n| `consume` | `data-jr-trigger-consume` | Boolean; hide after qualification and restore on reset. |\n| `exitMarginPx` | `data-jr-trigger-exit-margin-px` | Nonnegative rearm margin. |\n| `containment` | `data-jr-trigger-containment` | `'overlap'`, `'center'`, `'full'`. |\n| `requireExit` | `data-jr-trigger-require-exit` | Boolean; require departure before qualification. |\n| `suspended` | `data-jr-trigger-suspended` | Boolean; suspend progression. |\n| `reveal` | `data-jr-trigger-reveal` | `'departed'`; reveal after departure. |\n\nThe root `data-jr-trigger` attribute accepts the same preset names.\n\nStyle a zone’s entered, waiting, and completed states with optional CSS classes. The same options work in HTML or JavaScript:\n\n```html\n<div\n data-jr-trigger=\"parking\"\n data-jr-trigger-entered-class=\"is-entered\"\n data-jr-trigger-dwelling-class=\"is-dwelling\"\n data-jr-trigger-success-class=\"is-success\"\n>\n Park here\n</div>\n```\n\n```ts\nride.bind('.parking-spot', {\n trigger: {\n preset: 'parking',\n enteredClass: 'is-entered',\n dwellingClass: 'is-dwelling',\n successClass: 'is-success',\n },\n});\n```\n\n| JS option | HTML attribute | Values / default |\n| --------------- | -------------------------------- | --------------------------------------------------------------------------- |\n| `enteredClass` | `data-jr-trigger-entered-class` | Optional class tokens while inside, before qualification. |\n| `dwellingClass` | `data-jr-trigger-dwelling-class` | Optional class tokens while accumulating stopped dwell. |\n| `successClass` | `data-jr-trigger-success-class` | Optional class tokens after an accepted action or completed objective step. |\n\n`TriggerPhase` is `idle`, `entered`, `dwelling`, or `success`. Parking follows entered → dwelling → success. Moving interrupts the wait; paused time does not count toward it. Pass-through zones skip dwelling. Blocked objective steps and disabled targets cannot succeed.\n\nOnly classes for the current phase are applied. No classes are added by default; an empty string clears an option. Other classes are preserved. Reset, unbind, disable, and disposal restore the original classes. Restoring a checkpoint restores appearance without repeating actions.\n\nSuccess stays visible after leaving. A repeat-per-visit trigger rearms on the next visit; completed steps and once-per-vehicle/scene triggers stay complete until reset. With several vehicles, success takes display priority over dwelling, then entered. Events report each vehicle’s own phase.\n\nRead-only presentation markers `data-jr-trigger-state` (`idle`, `entered`, `dwelling`, `success`) and `data-jr-trigger-departed` expose interaction state for host styling. They are engine outputs, not configuration layers. `joyride:trigger:change` includes `state.phase`; `trigger:enter` reports entered and `trigger:qualify` reports success.\n\n### Parking and stop points\n\nAdd `points` / `data-jr-points` to award points after parking or a `when: 'stop'` trigger succeeds. Speed, containment, dwell, step order, and action acceptance still apply. Arriving or staying parked earns no extra points. Omit the option or use `0` for an unscored zone.\n\n```html\n<div\n data-jr-trigger=\"parking\"\n data-jr-points=\"50\"\n>\n Park here\n</div>\n<div\n data-jr-trigger\n data-jr-trigger-when=\"stop\"\n data-jr-trigger-dwell-seconds=\"1\"\n data-jr-points=\"25\"\n>\n Stop here\n</div>\n```\n\n```ts\nride.bind('.parking-spot', { trigger: 'parking', points: 50 });\nride.bind('.stop-zone', { trigger: { when: 'stop', dwellSeconds: 1 }, points: 25 });\n```\n\nThe repeat rule controls rewards: `visit` allows another after leaving and returning; `vehicle` and `scene` limit them until reset. Checkpoints restore the score without repeating rewards. Entry, click, check, and toggle triggers do not award points.\n\n### Objectives\n\nAn objective tracks a goal and reports progress until it completes. It observes gameplay; points come from pickups, destruction, or stop zones.\n\n| Goal | JavaScript | Complete when |\n| ------------------- | ------------------------------------- | ---------------------------------------------------------------------- |\n| Collect pickups | `{ type: 'collect', count: 3 }` | Three distinct pickups are collected. |\n| Crush targets | `{ type: 'crush', count: 3 }` | Three distinct objects are crushed. |\n| Break targets | `{ type: 'break', count: 3 }` | Three distinct objects break. Burning out does not count as breaking. |\n| Ignite targets | `{ type: 'ignite', count: 3 }` | Three distinct objects ignite. |\n| Reach a score | `{ type: 'score', points: 100 }` | The shared score reaches 100. Here `points` is the goal, not a reward. |\n| Complete zone steps | `{ steps: ['checkpoint', 'garage'] }` | The named zones qualify in the chosen order. |\n\n```ts\nconst supplies = ride.objective('supplies', { type: 'collect', count: 3 });\nride.objective('clear-the-road', { type: 'crush', count: 2 });\nride.objective('break-the-signs', {\n type: 'break',\n count: 2,\n targets: ['sign-a', 'sign-b'],\n});\nride.objective('light-the-targets', { type: 'ignite', count: 3 });\nride.objective('high-score', { type: 'score', points: 100 });\n\nride.on('objective:progress', ({ objective }) => {\n console.log(objective.id, objective.current, objective.target);\n});\nride.on('objective:complete', ({ objective }) => celebrate(objective.id));\n\nconsole.log(supplies.state);\nsupplies.reset();\nsupplies.dispose();\n```\n\n`count` is a positive whole number. Each object counts once, and disabled objects are ignored. Use `targets` to limit a goal to stable object IDs; omit it to accept any matching object. The count cannot exceed the number of listed targets.\n\n`progress` defaults to `scene`, sharing progress across vehicles. Use `progress: 'vehicle'` for separate pickup/target counters or zone steps per vehicle; events without a vehicle do not advance vehicle-specific counters. Score goals always use the shared scene score. Optional `event` names an additional completion event.\n\n`ObjectiveHandle` provides `id`, readonly `state` rows `{ vehicleId, current, target, complete }`, `reset()`, and `dispose()`. Shared progress uses `vehicleId: 'scene'`. Completion lasts until reset. `ride.reset()` resets every objective; checkpoints restore progress without repeating events. `dispose()` removes the objective.\n\n### Objectives in HTML\n\n```html\n<section\n data-jr-objective=\"supplies\"\n data-jr-objective-type=\"collect\"\n data-jr-objective-count=\"3\"\n>\n Collect three pickups\n</section>\n<section\n data-jr-objective=\"high-score\"\n data-jr-objective-type=\"score\"\n data-jr-objective-points=\"100\"\n>\n Reach 100 points\n</section>\n```\n\nThe element supplies the objective's name and goal. Style it yourself; use `objective:progress` to update your progress display. Definitions and portable configuration also accept an `objectives` map containing the same specs.\n\n| Attribute | Meaning |\n| ---------------------------- | ---------------------------------------------------------------------------------- |\n| `data-jr-objective` | Unique objective ID. |\n| `data-jr-objective-type` | `collect`, `crush`, `break`, `ignite`, or `score`. Omit for a group of zone steps. |\n| `data-jr-objective-count` | Number of distinct pickups or targets required. |\n| `data-jr-objective-points` | Shared score required by a score goal. |\n| `data-jr-objective-targets` | Optional space-separated object IDs for a pickup/target goal. |\n| `data-jr-objective-order` | `ordered` (default) or `any`, for zone steps. |\n| `data-jr-objective-progress` | `scene` (default) or `vehicle`; score goals use `scene`. |\n| `data-jr-objective-event` | Optional additional completion event name. |\n\n### Zone steps\n\nGroup checkpoints, parking spots, pickups, or page interactions when they form one objective:\n\n```html\n<section\n data-jr-objective=\"delivery\"\n data-jr-objective-order=\"ordered\"\n>\n <div\n data-jr-id=\"collect\"\n data-jr-trigger=\"parking\"\n >\n Collect\n </div>\n <div\n data-jr-id=\"deliver\"\n data-jr-trigger=\"parking\"\n >\n Deliver\n </div>\n</section>\n```\n\nWithout an objective type, descendant triggers become the steps, excluding nested objectives. Ordered steps qualify in sequence; `any` allows any order and requires every distinct step. A standalone zone works without an objective wrapper.\n\n```ts\nconst delivery = ride.objective('delivery', {\n order: 'ordered',\n steps: ['collect', { target: 'deliver', when: 'stop', dwellSeconds: 0.6 }],\n});\n```\n\nEach step is an object ID or `{ target, when?, dwellSeconds?, maxSpeedMps? }`. Conditions default to the zone's own configuration. Missing or disabled steps pause progress. Active objectives retain their step membership until reset or reconfiguration. Paused/hidden time does not contribute stopped dwell.\n\n### Zone sequences\n\nUse an objective with `steps` to group zone visits into a goal. For a standalone named sequence, `ride.route(id, spec)` accepts `RouteSpec` and returns a `PlaygroundRouteHandle`. Sequences can also be defined with `definitions.routes`, mount `routes`, or `data-jr-route` with `data-jr-route-order`, `data-jr-route-progress`, and `data-jr-route-event`. They emit `route:progress`, `route:complete`, and the corresponding objective events.\n\n## Settings\n\nPass `game` and `dialog` directly to `JoyRide.mount()`: `game` controls the toy, including visuals, sound, and performance; `dialog` controls its interface.\n\n### Updating options\n\n```ts\nride.updateSettings({\n game: { masterVolume: 0.5, quality: 'medium', headlights: true, viewportWalls: false },\n});\nconsole.log(ride.settings.game.masterVolume);\n```\n\nUse the same two sections directly under `mount({ game: { ... }, dialog: { ... } })`: `game` for behavior, visuals, and performance, and `dialog` for the embedded UI. Updates merge by group and validate before commit. Definitions, initial bindings, and player creation do not belong in mutable runtime settings.\n\n### Quality and appearance\n\nQuality defaults to `high`. Changing `game.quality` updates smoke, ghost vapor, fire, and liquids, including active effects.\n\n`game.surfaceTone` controls tire-mark contrast; each vehicle's `appearance` controls its body contrast. Both can adapt automatically to the page beneath the car. Smoke uses its natural color, and ghost mode uses the phantom appearance.\n\n### Tools\n\n`game.toolsEnabled` enables or disables vehicle tools. Boost stays available, including in the `sfw` preset. Tool use is unlimited. Tool IDs are `eject`, `machineGun`, `flamethrower`, `rocket`, `ghost`, and `boost`. See [Slot assignments](#jr-doc-slot-assignments) to assign them to a vehicle.\n\n### Accent and dialog font\n\nSet the dialog accent and font independently of the vehicle glow:\n\n```ts\nJoyRide.mount({\n dialog: { accentColor: '#e8c344', dialogFontFamily: 'inherit' },\n game: { underglow: '#66e6ff' },\n});\n```\n\n`dialogFontFamily: 'inherit'` uses the page body's computed font. You can also supply a CSS `font-family` value such as `'\"My Font\", sans-serif'`, or set it without JavaScript:\n\n```css\n:root {\n --jr-dialog-font-family: 'My Font', sans-serif;\n}\n```\n\nThe font must already be loaded on the page. An explicit `dialogFontFamily` overrides the CSS variable. Script attributes override mount JSON. `accentColor` styles the dialog. Set `game.underglow` independently for the vehicle glow.\n\n### Settings access\n\nThe vehicle dialog has one Settings tab for visuals, sound, performance, and rules. To hide it:\n\n```ts\nJoyRide.mount({\n dialog: { showGameSettings: false },\n});\n```\n\nVehicle switching, reset, driving, and enabled tools remain available. Host code can still update game settings with `ride.updateSettings()`.\n\nThe embed editor has a separate **Dialog** section for branding, theme, visible tabs, and settings access. The following reference is generated from the shared option catalog.\n\n<!-- options:start -->\n\n### All options\n\nEvery shared setting is shown below with its default. Omit settings you do not need. Click a property name to jump to its reference. `undefined` leaves optional styling unset; `hint: false` keeps the hint off.\n\n```js\nJoyRide.mount({\n // Game settings.\n game: {\n // Set the master audio volume.\n masterVolume: 1,\n\n // Play engine audio while the vehicle is idle.\n idleSound: true,\n\n // Choose the rendering quality for smoke, fire, and liquids.\n quality: \"high\",\n\n // Show smoke from the tires.\n tireSmoke: true,\n\n // Draw shadows beneath vehicles.\n vehicleShadows: true,\n\n // Show sparks when vehicles collide.\n sparks: true,\n\n // Visual body deformation from collisions.\n deform: true,\n\n // Shake the view during impacts and tool effects.\n screenShake: true,\n\n // Adapt tire marks to light or dark page backgrounds.\n surfaceTone: \"auto\",\n\n // Show renderer diagnostics.\n debug: false,\n\n // Show vehicle health bars.\n showHealthBars: true,\n\n // Point toward vehicles outside the view.\n showVehicleMarkers: true,\n\n // Set a six-digit hex glow color, or leave unset to disable it.\n underglow: undefined,\n\n // Set the strength of the underglow.\n underglowOpacity: 0.6,\n\n // Enable the front lights.\n headlights: true,\n\n // Enable the rear lights.\n taillights: true,\n\n // Brighten the rear lights while braking.\n brakeLights: true,\n\n // Allow vehicles to take damage.\n vehicleDestructible: true,\n\n // Enable or disable vehicle tools. Boost stays available.\n toolsEnabled: true,\n\n // Keep vehicles inside the visible screen.\n viewportWalls: true,\n\n // Turn small colored page elements into paint.\n autoPaint: false,\n\n // Show quick controls when hovering over the vehicle.\n showToolbar: true,\n\n // Show a hint after arrival, or false to keep it hidden.\n hint: false,\n\n },\n\n // Dialog settings.\n dialog: {\n // Show the driving controls on touch devices.\n showTouchControls: true,\n\n // Match the page theme or choose light or dark.\n dialogTheme: \"auto\",\n\n // Show the settings tab. Vehicle switching, driving, and reset stay available when off.\n showGameSettings: true,\n\n // Choose which tabs appear in the vehicle dialog.\n vehicleTabs: [\"vehicle\",\"objects\",\"weapons\",\"controls\",\"settings\",\"embed\",\"documentation\"],\n\n // Show the Joy Ride logo in the dialog.\n showLogo: true,\n\n // Show the GitHub link in the dialog.\n showGithub: true,\n\n // Set the dialog accent using six-digit hex.\n accentColor: undefined,\n\n // Set a CSS font family; inherit uses the page font.\n dialogFontFamily: undefined,\n\n // Show vehicle names in the dialog.\n showVehicleNames: true,\n\n },\n\n});\n```\n\n### Game settings\n\n| Option | Default | Meaning |\n| --------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------- |\n| [`game.masterVolume`](#jr-doc-option-game-mastervolume) | `1` | Set the master audio volume. 0–1. |\n| [`game.idleSound`](#jr-doc-option-game-idlesound) | `true` | Play engine audio while the vehicle is idle. |\n| [`game.quality`](#jr-doc-option-game-quality) | `\"high\"` | Choose the rendering quality for smoke, fire, and liquids. `high`, `medium`, `low`. |\n| [`game.tireSmoke`](#jr-doc-option-game-tiresmoke) | `true` | Show smoke from the tires. |\n| [`game.vehicleShadows`](#jr-doc-option-game-vehicleshadows) | `true` | Draw shadows beneath vehicles. |\n| [`game.sparks`](#jr-doc-option-game-sparks) | `true` | Show sparks when vehicles collide. |\n| [`game.deform`](#jr-doc-option-game-deform) | `true` | Visual body deformation from collisions. |\n| [`game.screenShake`](#jr-doc-option-game-screenshake) | `true` | Shake the view during impacts and tool effects. |\n| [`game.surfaceTone`](#jr-doc-option-game-surfacetone) | `\"auto\"` | Adapt tire marks to light or dark page backgrounds. `auto`, `light`, `dark`. |\n| [`game.debug`](#jr-doc-option-game-debug) | `false` | Show renderer diagnostics. |\n| [`game.showHealthBars`](#jr-doc-option-game-showhealthbars) | `true` | Show vehicle health bars. |\n| [`game.showVehicleMarkers`](#jr-doc-option-game-showvehiclemarkers) | `true` | Point toward vehicles outside the view. |\n| [`game.underglow`](#jr-doc-option-game-underglow) | Unset | Set a six-digit hex glow color, or leave unset to disable it. |\n| [`game.underglowOpacity`](#jr-doc-option-game-underglowopacity) | `0.6` | Set the strength of the underglow. 0–1. |\n| [`game.headlights`](#jr-doc-option-game-headlights) | `true` | Enable the front lights. |\n| [`game.taillights`](#jr-doc-option-game-taillights) | `true` | Enable the rear lights. |\n| [`game.brakeLights`](#jr-doc-option-game-brakelights) | `true` | Brighten the rear lights while braking. |\n| [`game.vehicleDestructible`](#jr-doc-option-game-vehicledestructible) | `true` | Allow vehicles to take damage. |\n| [`game.toolsEnabled`](#jr-doc-option-game-toolsenabled) | `true` | Enable or disable vehicle tools. Boost stays available. |\n| [`game.viewportWalls`](#jr-doc-option-game-viewportwalls) | `true` | Keep vehicles inside the visible screen. |\n| [`game.autoPaint`](#jr-doc-option-game-autopaint) | `false` | Turn small colored page elements into paint. |\n| [`game.showToolbar`](#jr-doc-option-game-showtoolbar) | `true` | Show quick controls when hovering over the vehicle. |\n| [`game.hint`](#jr-doc-option-game-hint) | `false` | Show a hint after arrival, or false to keep it hidden. |\n\n### Dialog settings\n\n| Option | Default | Meaning |\n| --------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------- |\n| [`dialog.showTouchControls`](#jr-doc-option-dialog-showtouchcontrols) | `true` | Show the driving controls on touch devices. |\n| [`dialog.dialogTheme`](#jr-doc-option-dialog-dialogtheme) | `\"auto\"` | Match the page theme or choose light or dark. `auto`, `light`, `dark`. |\n| [`dialog.showGameSettings`](#jr-doc-option-dialog-showgamesettings) | `true` | Show the settings tab. Vehicle switching, driving, and reset stay available when off. |\n| [`dialog.vehicleTabs`](#jr-doc-option-dialog-vehicletabs) | All tabs | Choose which tabs appear in the vehicle dialog. |\n| [`dialog.showLogo`](#jr-doc-option-dialog-showlogo) | `true` | Show the Joy Ride logo in the dialog. |\n| [`dialog.showGithub`](#jr-doc-option-dialog-showgithub) | `true` | Show the GitHub link in the dialog. |\n| [`dialog.accentColor`](#jr-doc-option-dialog-accentcolor) | Unset | Set the dialog accent using six-digit hex. |\n| [`dialog.dialogFontFamily`](#jr-doc-option-dialog-dialogfontfamily) | Unset | Set a CSS font family; inherit uses the page font. |\n| [`dialog.showVehicleNames`](#jr-doc-option-dialog-showvehiclenames) | `true` | Show vehicle names in the dialog. |\n\n<!-- options:end -->\n\n### Safe-for-work preset and dialog tabs\n\n```ts\nconst ride = JoyRide.mount(\n JoyRide.getMountPreset('sfw', {\n game: { autoPaint: true },\n player: { vehicle: 'mazda-mx5-nd-2019' },\n }),\n);\n```\n\nThe preset keeps Vehicle and Controls visible, hides Settings, branding, and vehicle names, and disables vehicle destruction, tools, deformation, and sparks. Driving and slow motion remain available. It returns mount options; your `game` and `dialog` values override its defaults.\n\nUse `dialog.vehicleTabs` to choose dialog tabs: `vehicle`, `objects`, `weapons`, `controls`, `settings`, `embed`, and `documentation`. The Tools tab uses `weapons`; Settings uses `settings`. `dialog.showGameSettings: false` hides Settings even when it is listed.\n\n## Everything else\n\nThe smaller details: keyboard controls, lights, sound, slow motion, and the hint beside the vehicle.\n\n### Keyboard controls\n\nThese are the default bindings. Number keys 1–9 activate assigned tools. `JoyRide.keyboardControls` supplies the labels and physical key codes for host-owned controls help.\n\n### Lights and sound\n\nUse `game.headlights`, `game.taillights`, and `game.brakeLights` to control the lamps. Set `game.underglow` to a six-digit hex color, or leave it `undefined` to disable the glow; `game.underglowOpacity` sets its strength from 0 to 1.\n\nPress **H** to honk. `game.masterVolume` sets the volume from 0 to 1; `game.idleSound` controls engine sound while parked. Browsers require a user gesture before audio can start. See [Settings](#jr-doc-settings) for all defaults.\n\n### Slow motion\n\nHold **V** for slow motion and release to return to normal speed. Defaults are half speed, a 300 ms transition, and no extra zoom. Sounds slow down with the action; input remains responsive.\n\nFrom the browser controller:\n\n```ts\nawait ride.setSlowMo(true, {\n speedFactor: 0.5,\n rampMs: 300,\n zoomFactor: 1.1,\n curve: 'ease-in-out',\n});\nawait ride.setSlowMo(false);\n```\n\nReact refs, browser session handles, and `CanvasWorld` also expose `setSlowMo(active, options)`. Custom engine hosts can use `world.slowMo.start()` / `stop()` and advance time through `world.advanceTime()`.\n\n`speedFactor` is greater than 0 and at most 1; `rampMs` is nonnegative; `zoomFactor` is 0–4, with 0 disabling extra zoom. Curves are `linear`, `ease-in`, `ease-out`, and `ease-in-out`. Options persist. Changes begin a new transition from the current speed and zoom. Pausing freezes it; losing focus releases the keyboard action.\n\n### Vehicle hint\n\nThe vehicle hint is off by default. To show one after arrival, configure it under `game`:\n\n```ts\nJoyRide.mount({\n game: {\n hint: {\n // Text shown beside the vehicle.\n text: 'Drive with WASD',\n // Wait this many milliseconds after arrival.\n showAfter: 1500,\n // Place the hint above, below, left, or right.\n placement: 'top',\n // Hide the hint on click or when the vehicle moves.\n dismiss: 'click',\n },\n },\n});\n```\n\n`placement` accepts `top`, `bottom`, `left`, or `right`. `dismiss` accepts `move` or `click` (the car click). `showAfter` is milliseconds after arrival; the default is `1000` when a hint is enabled. The hint is DOM text with no pointer events, so it scrolls with the page and does not block controls.\n\n## JavaScript API\n\nMount a ride, bind page elements, and control it from your application. Use `await ride.ready` before sending world commands.\n\nThe root and `/react` entries expose the same named imperative functions and\ntypes. `mount`, `define`, `getMountPreset`, `listVehiclePresets`, `listVehicleOptions`,\n`getVehiclePreset`, `availableVehicleTools`, `keyboardControls`, `overlayLayers`,\nand `overlayZIndex` can be imported directly. `vehicleTools` and the\n`publicDataAttributes`, `publicDataAttributeNames`, and `publicDataAttributePrefixes`\ncatalogs are also named exports. `getActive()` returns the same value as the\ndefault API's `JoyRide.active` getter. Prefer named utility imports when the\nmounting runtime is not needed; they let the consuming bundler omit unused code.\n\nThe examples below use the default `JoyRide` API object where several operations\nare needed. Named functions and the default object share one runtime within the\nchosen integration.\n\n### Mount options\n\n`JoyRide.mount(options?: MountOptions | PlaygroundConfiguration): RideController` starts the browser host. It also accepts a parsed, versioned configuration returned by `ride.exportConfiguration()`.\n\n| Option | Meaning |\n| ------------- | ----------------------------------------------------------------------------------------------------------------------------------- |\n| `audioSet` | Audio sample folder; missing effects fall back to the default set. |\n| `persist` | `{ vehicle?: boolean, audio?: boolean }`; both default to `true`. Saved preferences take precedence over configured initial values. |\n| `definitions` | Optional catalog of `objects`, `liquids`, `vehicles`, and `objectives`. |\n| `player` | Initial `{ vehicle, appearance?, slots? }`. Player identity is managed by the runtime. |\n| `bindings` | Initial array of `{ target: selector, spec: ObjectPatch }`. |\n| `objectives` | Objective ID → `ObjectiveSpec` map, in addition to definitions or HTML objectives. IDs must be unique. |\n| `routes` | Optional named sequences of zone stops. Prefer `objectives` for gameplay goals. |\n| `game` | Toy behavior, visuals, sound, performance, lights, and hint. See [Settings](#jr-doc-settings). |\n| `dialog` | Interface theme, labels, tabs, touch controls, and settings access. |\n| `entry` | Initial player entrance with `target: PageTarget`; overrides a `data-jr-entry` marker. |\n| `host` | Host presentation overrides listed below. |\n\n`host.foregroundSelector` keeps matching host UI above the effects overlay. `host.screenShakeProfiles` overrides shake behavior. `host.canPlaceManually` enables placement and dragging. `host.shadowDom` defaults to `true`.\n\n`game`, `dialog`, and an entry with a selector or `{xPx,yPx}` target are portable. `host` presentation overrides and DOM element entry targets cause a strict export error; see Saving and sharing. Unknown mount properties fail rather than being ignored.\n\n### Script tag options\n\nThe CDN embed registers `window.JoyRide`. The `data-jr-mount` attribute mounts it automatically and accepts JSON options, for example `data-jr-mount='{\"game\":{\"autoPaint\":true}}'`. Use `data-jr-mount=\"false\"` to load the API without mounting.\n\n- **Preset:** `data-jr-mount-preset=\"sfw\"` applies safe-for-work defaults. It needs `data-jr-mount`; JSON options override the preset.\n- **Appearance:** `data-jr-dialog-theme=\"light\"` or `\"dark\"`, `data-jr-accent-color=\"#e8c344\"`, and `data-jr-dialog-font-family=\"inherit\"` override the same options in JSON.\n- **Saved preferences:** The selected vehicle and user-changed audio settings persist on this origin. Set `data-jr-persist-vehicle=\"false\"` or `data-jr-persist-audio=\"false\"` to disable either. The equivalent mount option is `persist: { vehicle: false, audio: false }`. Script attributes take precedence.\n- **Client-side routing:** `data-jr-unmount=\"route remove\"` disposes on URL changes and script removal. Use either word alone for one behavior. A newly inserted script mounts again; an empty attribute enables both behaviors.\n- **Arrival target:** The first `data-jr-entry` element becomes the initial destination. Add `data-jr-entry-delay-ms=\"1000\"` to wait before the skid. `mount({ entry: { target: '#parking' } })` takes precedence. Without a target, the car enters near the viewport center.\n\nThe entry marker also accepts `data-jr-entry-angle-rad`, `data-jr-entry-distance-px`, `data-jr-entry-fade-fraction`, `data-jr-entry-steer`, and `data-jr-entry-speed-mps`. Leave these out to use the vehicle's calculated entrance. After arriving, the untouched car follows the marker if page layout moves it; driving or clicking the car ends this attachment. A hidden or offscreen marker falls back to the center entrance; call `ride.enterAt(...)` later to enter somewhere else.\n\n### Controller properties\n\n| Property | Value |\n| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| `ride.ready` | `Promise<RideController>` resolving after player configuration and initial setup. |\n| `ride.player` | The player `VehicleHandle`, or `null` before readiness, after player removal, or after disposal. |\n| `ride.state` | Readonly `{ playerId, focusVehicleId, player, points }`, or `null` before readiness/after disposal. Focus and player ownership are separate. |\n| `ride.settings` | Deeply readonly grouped `RuntimeOptions` snapshot. |\n\nUse `ride.getVehicle(id)` for a specific vehicle; it returns a handle or `null`. The player handle remains separate from other spawned vehicles.\n\n### Controller methods\n\n| Method | Return and behaviour |\n| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `ride.bind(target, spec)` | A `PlaygroundBinding`; target is a selector, Element, or iterable of Elements. Page objects only. |\n| `ride.inspect(element)` | A readonly object snapshot or `null` for an Element. |\n| `ride.inspectById(id)` | A readonly object snapshot or `null` for a stable `data-jr-id`. |\n| `ride.on(event, listener)` | An unsubscribe function. Events and custom typing are covered in Events and HUD. |\n| `ride.spawnVehicle(options)` | A new `VehicleHandle`; see Vehicles and tools. |\n| `ride.pour(liquid, options)` | Deposit simulated liquid; see Fire and liquids. |\n| `ride.objective(id, spec)` | An `ObjectiveHandle`; see Objectives and points. |\n| `ride.updateSettings(patch)` | Validate and merge grouped runtime options. Invalid updates leave working options intact. |\n| `ride.reset()` | Restore artwork, paint, pickups, trigger classes, native controls and vehicle health; clear effects/points and objective progress. Retains vehicle placement and authored configuration. Emits `reset` for application-owned state. |\n| `ride.exportConfiguration()` | A readonly portable configuration, or a typed dependency error. |\n| `ride.openConfigure()` | Open the settings dialog; returns whether an anchor was available. |\n| `ride.startAudio()` | `Promise<void>` requesting audio startup. |\n| `ride.getCarAnchor()` | Painted car bounds `{ x, y, width, height }` in document pixels, or `null`. |\n| `ride.enterAt(options)` | `Promise<'completed' \\| 'interrupted' \\| 'unavailable'>`; fade in an already moving player car and handbrake near an element or document point. See the arrival example below. |\n| `ride.dispose()` | Release the mounted host; safe to call repeatedly. |\n\n### Global helpers\n\nThe default module export and `window.JoyRide` expose the same object.\n\n| Helper | Purpose |\n| -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |\n| `JoyRide.define(definitions)` | Validate and deeply freeze an optional catalog without mounting a game. References are resolved in its mounted catalog. |\n| `JoyRide.active` | Currently mounted controller or `undefined`. |\n| `JoyRide.listVehiclePresets()` | Built-in and browser-saved vehicle presets. |\n| `JoyRide.listVehicleOptions()` | Labels/IDs for preset pickers. |\n| `JoyRide.getVehiclePreset(id)` | A vehicle catalog preset or `undefined`; includes browser overrides. |\n| `JoyRide.getMountPreset(id, overrides?)` | Return ordinary mount options for a named preset such as `sfw`; supplied options override it. |\n| `JoyRide.vehicleTools` | Tool metadata for building controls. |\n| `JoyRide.availableVehicleTools(slots?, toolsEnabled?)` | Return available tools with their current consecutive keyboard shortcuts. |\n| `JoyRide.keyboardControls` | Labels, key names, and physical key codes for host-owned controls help. |\n| `JoyRide.overlayLayers` / `JoyRide.overlayZIndex(layer)` | Shared overlay-layer ordering and its z-index helper. |\n\n### Reusable definitions\n\n`JoyRide.define({ objects?, liquids?, vehicles?, objectives? })` returns deeply readonly definitions. Each map uses application-chosen names. Resolve names inside a mounted catalog; equal names in different mounts get independent material identities. Cycles, missing references, and incompatible capabilities fail validation.\n\n```ts\nconst kit = JoyRide.define({\n objects: { wood: { breakable: { health: 80 }, burnable: { burnSeconds: 12 } } },\n liquids: { ink: { base: 'paint', color: '#5271ff', thickness: 0.8 } },\n vehicles: { artist: { base: 'mazda-mx5-nd-2019', name: 'The artist' } },\n objectives: { delivery: { steps: ['collect', 'deliver'], order: 'ordered' } },\n});\n```\n\nObject recipes can reference another through `object`. Vehicle and liquid recipes require `base`. Vehicles inherit shipped physics/sound/image settings without silently applying saved browser overrides.\n\n### Layering with host menus and dialogs\n\nJoy Ride's overlay uses a small stack by default: world `1`, foreground content `2`, and\nits own backdrop and controls `3`–`4`. Host dropdowns and dialogs with a higher\nlayer in the same stacking context appear above the car and painted content. Joy Ride\npreserves an explicit z-index on elements selected by `foregroundSelector`.\n\nSet `--joy-ride-z-index` on the document root to move the whole stack for a host's\nlayer scale. The four layers use that value and the next three integers:\n\n```css\n:root {\n --joy-ride-z-index: 20;\n}\n```\n\nThis CSS variable is a host layering choice, so it applies to the canvas, auxiliary\neffects, and native painted content together, including when the embed UI uses a shadow\nroot. A z-index cannot lift a dialog out of a lower parent stacking context; use a\nportal into the document root or a native modal dialog for that case. Native modal\ndialogs and popovers use the browser's top layer and appear above ordinary z-index\nstacks.\n\n## Events and HUD\n\nConnect the toy to your page with live readouts and gameplay events.\n\n### Declarative HUD\n\n```html\n<output\n data-jr-hud=\"speed\"\n data-jr-hud-unit=\"kmh\"\n data-jr-hud-precision=\"1\"\n>\n 0\n</output>\n<output\n data-jr-hud=\"fps\"\n>\n 0\n</output>\n<output\n data-jr-hud=\"rpm\"\n>\n 0\n</output>\n<output\n data-jr-hud=\"gear\"\n>\n N\n</output>\n<output\n data-jr-hud=\"health\"\n>\n 0\n</output>\n<output\n data-jr-hud=\"points\"\n>\n 0\n</output>\n```\n\nChoose one metric per element and style it yourself. The JS equivalent is `{hud:{field:'speed',unit:'kmh',precision:1}}`. Fields are `speed`, `fps`, `rpm`, `gear`, `health`, and `points`. Only speed accepts units: `mph` (default), `kmh`, or `mps`. Precision is an integer 0…4, default 0. `hud:false` disables a lower layer.\n\nThe runtime writes changed values only and restores owned original children on cleanup. Keep HUD targets separate from fragmentation/paint targets. Place readouts inside `data-jr-ui` controls when appropriate.\n\n### Events and subscriptions\n\n```ts\nconst unsubscribe = ride.on('objective:complete', ({ objective, vehicle }) => {\n celebrate(objective.id, vehicle?.id);\n});\nride.on('object:break', ({ object }) => console.log(object.id, object.spec.meta));\nride.on('reset', () => {\n setCollectedPickups([]);\n setButtonPresses(0);\n});\nunsubscribe();\n```\n\nTargets dispatch bubbling `CustomEvent`s prefixed with `joyride:`. The JS subscription omits that prefix. Subscribe on the document or use `ride.on`. Listeners run outside simulation work and are isolated from host exceptions. Unsubscribe before discarding an integration; disposal removes subscriptions.\n\n| Event name | Detail |\n| ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |\n| `object:hit`, `object:ignite`, `object:break`, `object:burnout`, `object:explode`, `object:crush` | `{ object, vehicle?, point? }`, with points on applicable events. |\n| `trigger:enter`, `trigger:leave`, `trigger:qualify`, `trigger:change`, `trigger:stop` | `{object, vehicle:{id}, position, speedMps, state:{inside,departed,stopped,phase}}`. |\n| `objective:progress`, `objective:complete` | `{objective:{id,type,current,target,complete}, vehicle?}` and trigger context when available. |\n| `vehicle:change` | `{vehicle}` containing the readonly vehicle snapshot. |\n| `state:change` | The readonly `PlaygroundState` snapshot. |\n| `diagnostic` | `{code,message,target?}` describing rejected configuration or host errors. |\n| `reset` | No detail; scene objects and interactions have been restored. |\n| `dispose` | No detail; lifecycle notification during cleanup. |\n\n`ride.reset()`, the dialog reset, and **C / Reset screen** restore objects, pickups, zones, objectives, and native checkbox values without repeating click handlers. A car inside a zone must leave and return to trigger it again. Configuration and vehicle placement stay unchanged.\n\nListen for `joyride:reset` on the document, or `ride.on('reset', …)`, to clear your own counters and controlled inputs. `session.handle.clearEffects()` only fades visual effects.\n\n### Custom event typing\n\n```ts\ndeclare module '@joy-ride/game' {\n interface PlaygroundEventMap {\n 'pickup-collected': { object: { id: string } };\n }\n}\nride.on('pickup-collected', ({ object }) => collect(object.id));\n```\n\nConfigure `trigger.event` or an objective’s `event` with an application event name. Trigger events carry trigger details; objective completion events carry objective progress. Host code can also dispatch its own bubbling `CustomEvent('joyride:pickup-collected', {detail, bubbles:true})`. Augment `PlaygroundEventMap` to type its payload accurately.\n\n## Saving and sharing\n\n### Portable configuration\n\n```ts\nconst configuration = ride.exportConfiguration();\nconst json = JSON.stringify(configuration, null, 2);\nride.dispose();\n\nconst restored = JoyRide.mount(JSON.parse(json));\nawait restored.ready;\n```\n\nThe `joy-ride-playground` format (version 3) stores definitions, player configuration, selector bindings, objectives, initial entry, and settings. It keeps authored names rather than internal IDs. HTML and application state stay with your page. This saves setup, not a running-world checkpoint.\n\nExact-element bindings, internal object overrides, and unsupported host-only options cannot be exported. They cause `NonSerializableDependencyError` with code `JR_NON_SERIALIZABLE_DEPENDENCY`; `dependencies` lists each `{ path, reason }`.\n\n### Browser module without npm\n\nLoad the browser module when your application needs it, then mount manually:\n\n```ts\nconst { default: JoyRide } = await import('https://unpkg.com/@joy-ride/game@latest/index.js');\nconst ride = JoyRide.mount();\nawait ride.ready;\n// Call ride.dispose() when the host view is removed.\n```\n\nUse this in a browser module; install the npm package for a bundled application. This does not create a `window.JoyRide` global. The separate `/embed.js` script does. The CDN loads adjacent styles and assets; replace `@latest` with a version to pin a build.\n\n### Embed and bookmarklet helpers\n\n```ts\nimport {\n fullEmbedCode,\n asyncEmbedCode,\n npmEmbedCode,\n reactEmbedCode,\n bookmarkletUrl,\n} from '@joy-ride/game/bookmarklet';\n\nconst configuration = ride.exportConfiguration();\nconst html = fullEmbedCode(configuration);\nconst asyncCdn = asyncEmbedCode(configuration);\nconst npm = npmEmbedCode(configuration);\nconst react = reactEmbedCode(configuration);\nconst bookmark = bookmarkletUrl(configuration);\n```\n\nAll helpers use the same portable configuration. The HTML helper returns an auto-mounting module script. The CDN helper loads the runtime on demand without a package dependency; the NPM helper imports the package root, and the React helper renders the component from `/react`. The bookmarklet toggles a mounted runtime. Importing helpers does not mount the toy.\n\nThe lower-level `@joy-ride/engine/playground` entry exports `createPlaygroundConfiguration`, `parsePlaygroundConfiguration`, `NonSerializableDependencyError`, and portable configuration types. Use the factory/parser when validating stored/imported JSON.\n\n### Validation and diagnostics\n\nUnknown fields, invalid values, missing recipes, duplicate IDs, unsupported targets, and incompatible capabilities fail validation. `PlaygroundConfigurationError` has code `JR_INVALID_CONFIGURATION` and a property `path`. JavaScript updates throw before commit; invalid DOM edits retain the last valid spec and emit `joyride:diagnostic` with `{code,message,target?}`.\n\nUse `ride.ready.catch(...)` for startup errors and `ride.on('diagnostic', ...)` for integration errors. Listener failures are reported while play continues; internal simulation failures stop the clock.\n\n### Public TypeScript contracts\n\n`@joy-ride/game` exports types for `MountOptions`, `RideController`, `PlaygroundEventMap`, `PlaygroundState`, `ObjectSpec`, `ObjectPatch`, `ObjectiveSpec`, `ObjectiveHandle`, `ObjectiveType`, `ObjectiveProgress`, `ObjectiveEventDetail`, `PickupEffectInput`, `PlayerConfiguration`, `VehicleConfiguration`, `VehiclePatch`, `VehicleHandle`, `VehicleSpawnOptions`, `RuntimeOptions`, `RuntimeOptionsPatch`, `PlaygroundConfiguration`, `Appearance`, `SlotNumber`, and `DeepReadonly`.\n\nThe game schema entry additionally provides catalog, trigger, objective, HUD, paint, and capability types plus validation/merge helpers. Prefer authored input types for configuration and readonly snapshot types for observation; runtime references and saved configuration have different ownership.\n\n## Advanced integrations\n\nFor custom React interfaces, browser hosts, and canvas scenes inside the Joy Ride repository. Ordinary websites should use the public `@joy-ride/game` or `@joy-ride/game/react` entry. The workspace packages below are not subpaths of the published game package.\n\n### React browser host\n\nUse `@joy-ride/game/react` for ordinary React website setup. The following workspace packages are internal building blocks for custom hosts in this repository.\n\n`JoyRide` from `@joy-ride/ui` connects a canvas and controls to a browser session. `onReady(world, registry)` and `JoyRideHandle.getPlayground()` expose the runtime.\n\nReact hosts using `@joy-ride/browser` can call `entryFromMarker(element)` and pass its result to `session.handle.enterAt(...)` for the same arrival behavior as a `data-jr-entry` script marker.\n\nFor an Objects tab in a custom dialog, pass `objects={joyrideRef.current?.getPlayground()?.objects}` to `VehiclePopover`. The embed handles this automatically. The inspector lets users search, preview, reveal, drive to, reset, or disable objects. Pass `onDriveToObject` to enable driving to a target. Revealing an object closes the dialog and stops camera following; resetting it leaves shared trails and particles intact.\n\n`SceneObjectInspector` provides `getSnapshot()`, `subscribe(listener)`, `getTarget(id)`, `reveal(id)`, `reset(id)`, and `remove(id)`. The page runtime also has `resetObject(id)` and `removeObject(id)`. Removal disables the object without deleting its HTML. Scene reset restores removed objects; checkpoints preserve their state. Types `SceneObject`, `SceneObjectPreview`, and `SceneObjectInspector` come from `@joy-ride/browser`.\n\n`VehiclePopover` supplies the dialog, `initialTab`, and host callbacks. For embeds, `dialog.vehicleTabs` chooses the visible tabs. These React building blocks configure presentation rather than portable JSON:\n\n| Export | Purpose |\n| --------------------------- | ------------------------------------------------------------------------------ |\n| `JoyRide` | React canvas/controls adapter for a browser session; forwards `JoyRideHandle`. |\n| `VehicleHint` | DOM hint anchored to the car in document coordinates. |\n| `CanvasDrive` | Canvas-owned level host. |\n| `VehiclePopover` | Configurable dialog, tabs, and garage callbacks. |\n| `VehicleShowcase` | Vehicle picker with drive-through selection and host-owned presets. |\n| `VehiclePreview` | Inspect a preset, sprite geometry, and mounted tools. |\n| `JoyRideLogo` | Optional branded logo presentation. |\n| `joyRideLogo` | Shared SVG artwork data for host-owned logo treatments. |\n| `CodeBlock` | Escaped, copyable code examples using shadcn primitives. |\n| `Toolbar` / `ToolbarButton` | Shared host controls. |\n| `TouchControls` | Touch input overlay producing normal vehicle controls. |\n\nShared shadcn controls are available from `@joy-ride/ui/controls`. Theme helpers are in `@joy-ride/ui/theme`, with CSS at `@joy-ride/ui/theme.css`. Engine configuration and catalogs are imported from their owning `@joy-ride/engine` entrypoints rather than re-exported from UI.\n\n### Browser sessions without React\n\n```ts\nimport { BrowserSession } from '@joy-ride/browser';\n\nconst session = new BrowserSession(canvas, {\n overlay: true,\n masterVolume: 0,\n onReady(world, registry) {\n registry.bind('.playful', { breakable: true });\n },\n});\nsession.update({ paused: true });\nsession.handle.startAudio();\n// Later:\nsession.dispose();\n```\n\n`BrowserSession(canvas, options?, presentation?)` manages the world, clock, input, and browser resources without React. `handle` provides engine commands; `touchChange(controls)` supplies host input. Use `update(patch)` for live options and `dispose()` for cleanup. Overlay sessions call `onReady(world, registry)` unless disposed first.\n\n`BrowserSessionOptions` lists all settings, bindings, definitions, startup state, and callbacks. Fields excluded from `BrowserSessionUpdate` require a new session. Optional presentation hooks supply a toolbar, `onPresent(time, world, sound)`, and a safe camera frame. The session owns the frame clock.\n\n`session.handle` exposes lighting (`setLighting`, `getLighting`, `toggleLight`), audio (`startAudio`), vehicle access (`getVehicle`, `getPresetId`, `setPreset`), geometry (`getCarAnchor`, `getPose`, `getPathView`), effects (`clearEffects`, `reset`, `addLiquid`, `ejectLiquid`), distance (`getDistance`, `resetDistance`, `cycleDistanceDpi`), placement (`resetTo`, `parkAt`, `enterAt`), checkpoints (`saveState`, `restoreState`), and `getPlayground` for advanced registry/world access. These engine commands use the same units and return conventions as the corresponding browser facade commands. Placement uses `{xPx,yPx,angleRad?}`; `parkAt` requires an angle. Distance readouts include their calibrated display unit. `vehicleReadout` produces shared HUD data without owning a clock.\n\n`ride.enterAt(...)` and `session.handle.enterAt(...)` fade in a moving car and skid it to an element or document point. `delayMs` waits before arrival. The approach predicts speed from skid distance unless `initialSpeedMps` is supplied, and adds service braking when needed. `fadeFraction` controls how much of the entrance fades in. Input or disposal cancels a pending entrance. The result is `completed`, `interrupted`, or `unavailable`.\n\n```ts\nawait ride.enterAt({\n target: document.querySelector('#example')!,\n delayMs: 1000,\n approach: {\n angleRad: 0,\n distancePx: 240,\n fadeFraction: 0.5,\n },\n handbrake: { steer: 0.08 },\n});\n```\n\nThe React `JoyRide` component creates this session and forwards `JoyRideHandle` to `session.handle`. React owns the canvas and controls; it does not own physics or browser input state.\n\nThe vehicle hover toolbar provides mute and quit controls for the player.\n\n### Canvas-owned worlds\n\n```ts\nimport { CanvasWorld } from '@joy-ride/engine';\n\nconst world = new CanvasWorld(canvas, level, { muted: true, quality: 'medium' });\nworld.focus();\nworld.setPaused(false);\n// Later:\nworld.dispose();\n```\n\n`new CanvasWorld(canvas, level, options?)` hosts a canvas-owned scene. Levels use metres/Y-up and explicit shape geometry, with whole-object breakage. They share damage-capability constraints; unsupported DOM-only capabilities reject.\n\nOptions include `preset`, `quality`, `lighting`, `muted`, `paused`, `viewScale`, `safeArea`, `cameraLock`, `cameraSmoothing`, `pauseShortcut`, shared display and game settings, `drawGround`, `drawForeground`, `filterControls`, `onStep`, `onPauseChange`, `onHorn`, and `onPresent`.\n\n| CanvasWorld methods | Purpose |\n| ------------------------------------------------ | --------------------------------------------------------------- |\n| `setLevel`, `getLevel`, `reset` | Replace/inspect the level or restore its checkpoint. |\n| `setPaused`, `setMuted`, `focus`, `dispose` | Host lifecycle and input focus. |\n| `setLighting`, `getLighting`, `toggleLight` | Lamp configuration. |\n| `setViewScale`, `setSafeArea`, `getSafeViewport` | Canvas presentation and host UI insets. |\n| `setCameraSmoothing`, `setCameraLock` | Camera behaviour. |\n| `setInputEnabled`, `setAction`, `setControls` | Host input/assist. Pass `null` controls to resume normal input. |\n| `addObject`, `removeObject` | Runtime level objects. |\n| `addLiquid`, `isTouchingLiquid`, `pour` | Canvas-world liquid authoring/contact. |\n\n### Engine package boundaries\n\n`@joy-ride/engine` keeps its default entry small: `Simulation`, `GameWorld`, `CanvasWorld`, `definePlayground`, `createPlaygroundConfiguration`, and `parsePlaygroundConfiguration`, with their core configuration types. For a site playground, use `@joy-ride/game`; the internal `@joy-ride/browser` package owns the framework-independent browser session, and `@joy-ride/ui` supplies optional React presentation.\n\nAdvanced hosts import deliberate extension entries:\n\n| Entry | Responsibility |\n| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| `@joy-ride/engine/engine` | World/clock/checkpoint ownership, canvas levels/scenes, geometry conversions, and host event helpers. |\n| `@joy-ride/engine/simulation` | Simulation state, controls, vector math, and driving geometry. |\n| `@joy-ride/engine/vehicles` | Vehicle presets/catalog, entities, slots, tools, stats, sprite geometry, and status effects. |\n| `@joy-ride/engine/playground` | Authored contracts, canonical validation/composition/attribute parsing, registries, zones, HUD, runtime options, and portable configuration. |\n| `@joy-ride/engine/rendering` | Renderer host integration, lighting, overlay layers, and presentation option types. |\n| `@joy-ride/engine/physics` | DOM contacts, liquid definitions, collision-mask queries, and combustible lifecycle configuration. |\n| `@joy-ride/engine/audio` | Engine audio integration. |\n| `@joy-ride/engine/input` | Keyboard controls and input bindings. |\n\nEngine objects hold live simulation state. Shaders, caches, source-file paths, and vendor modules are internal. Use portable configuration to save a playground.\n\n`GameWorld.configureVehicle` updates a live vehicle. `saveState()` returns a same-world `GameCheckpoint` with `restore()`, `available`, and `dispose()`. Checkpoints hold engine resources and cannot be saved as JSON; dispose them when finished. `GameLoop` updates physics at 120 Hz and presents once per frame.\n\nUse the browser API for declarative playgrounds, the React/canvas hosts for custom presentation, and the engine modules for implementing your own host. Keep host functions and DOM references outside serialized definitions.\n";function ru(e){let t=ho().use(xi).use(Zl).parse(e),n=new Map,r=t.children.filter(e=>e.type===`heading`).map(e=>{let t=kt(e),r=t.toLowerCase().replace(/[^\p{L}\p{N}]+/gu,`-`).replace(/^-|-$/g,``)||`section`,i=n.get(r)??0;return n.set(r,i+1),{node:e,id:`jr-doc-${r}${i?`-${i+1}`:``}`,title:t}}),i=r.filter(({node:e})=>e.depth===2);return i.map((t,n)=>{let a=t.node.position.start.offset,o=i[n+1]?.node.position.start.offset??e.length,s=t.node.position.start.line;return Object.freeze({id:t.id,title:t.title,markdown:e.slice(a,o).trimEnd(),headings:Object.freeze(r.filter(({node:e})=>e.position.start.offset>=a&&e.position.start.offset<o).map(({node:e,id:t,title:n})=>Object.freeze({id:t,title:n,depth:e.depth,line:e.position.start.line-s+1})))})})}var $=ru(nu),iu=$.flatMap(e=>{let t=e.markdown.split(`
|
|
33
33
|
`);return e.headings.map((n,r)=>{let i=e.headings[r+1],a=t.slice(n.line,i?i.line-1:void 0).join(` `).replace(/\[([^\]]+)\]\([^)]+\)/g,`$1`).replace(/<[^>]+>/g,` `).replace(/[`*_#|>]/g,` `).replace(/\s+/g,` `).trim();return{chapter:e,heading:n,body:a,haystack:`${n.title} ${a}`.toLowerCase()}})});function au(e){let t=e.trim().toLowerCase().split(/\s+/).filter(Boolean);return t.length?iu.filter(e=>t.every(t=>e.haystack.includes(t))).map(e=>{let n=e.heading.title.toLowerCase(),r=t.reduce((e,t)=>e+(n.includes(t)?2:0),0),i=t.every(e=>n.includes(e))?0:e.body.toLowerCase().indexOf(t[0]),a=Math.max(0,i-28),o=a?e.body.indexOf(` `,a):0,s=o<0?a:o?o+1:0,c=e.body.slice(s,s+110).trim();return{score:r,chapter:e.chapter.id,anchor:e.heading.id,title:e.heading.title,chapterTitle:e.chapter.title,excerpt:`${s?`…`:``}${c}${s+110<e.body.length?`…`:``}`}}).sort((e,t)=>t.score-e.score).slice(0,10).map(({score:e,...t})=>t):[]}var ou=[Zl],su=Object.fromEntries(a.map(e=>[e.key,`#jr-doc-option-${e.category}-${e.key.toLowerCase()}`])),cu={...su,...Object.fromEntries(Object.keys(i).map(e=>[e,`#jr-doc-vehicle-hint`]))},lu={ts:`typescript`,js:`javascript`,sh:`shell`,bash:`shell`},uu=new Set([`javascript`,`typescript`,`jsx`,`tsx`,`html`,`css`,`json`,`shell`,`text`]);function du(){return(0,Z.jsxs)(`div`,{className:`joy-docs-shortcuts my-3 mb-[18px] grid grid-cols-[repeat(auto-fit,minmax(220px,1fr))] gap-x-5 gap-y-1`,"aria-label":`Default keyboard controls`,children:[r.filter(e=>!e.id.startsWith(`slot`)).map(e=>(0,Z.jsxs)(`div`,{className:`joy-docs-shortcut flex min-w-0 items-center justify-between gap-3 border-b border-border py-[5px] [&>[data-slot=kbd-group]]:shrink-0`,children:[(0,Z.jsx)(`span`,{children:e.label}),(0,Z.jsx)(h,{children:e.keys.map((e,t)=>(0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[t>0&&(0,Z.jsx)(`span`,{"aria-hidden":`true`,children:`/`}),(0,Z.jsx)(_,{children:e})]},e))})]},e.id)),(0,Z.jsxs)(`div`,{className:`joy-docs-shortcut flex min-w-0 items-center justify-between gap-3 border-b border-border py-[5px] [&>[data-slot=kbd-group]]:shrink-0`,children:[(0,Z.jsx)(`span`,{children:`Assigned tools`}),(0,Z.jsxs)(h,{children:[(0,Z.jsx)(_,{children:`1`}),`–`,(0,Z.jsx)(_,{children:`9`})]})]})]})}var fu=(0,v.memo)(function({chapter:e,onLocalLink:t}){let n=(0,v.useMemo)(()=>{let n=({node:t,children:n,...r})=>{let i=e.headings.find(e=>e.line===t?.position?.start.line),a=`h${i?.depth??2}`;return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(a,{...r,id:i?.id,tabIndex:-1,children:n}),i?.id===`jr-doc-keyboard-controls`&&(0,Z.jsx)(du,{})]})};return{h2:n,h3:n,h4:n,pre({children:e}){let n=v.Children.toArray(e).find(v.isValidElement);if(!n)return(0,Z.jsx)(`pre`,{children:e});let r=n.props,i=r.className?.replace(`language-`,``)??`text`,a=lu[i]??i;return typeof r.children==`string`?(0,Z.jsx)(p,{code:r.children.replace(/\n$/,``),language:uu.has(a)?a:`text`,compact:!0,maxHeight:320,propertyLinks:/\bhint:\s*\{/.test(r.children)?cu:su,onLocalLink:t}):(0,Z.jsx)(`pre`,{children:e})},table({children:e}){return(0,Z.jsx)(`div`,{className:`joy-docs-table my-[18px] overflow-x-auto rounded-lg border border-border [&_table]:w-full [&_table]:border-collapse [&_table]:text-xs [&_table]:leading-relaxed [&_:is(th,td)]:border-b [&_:is(th,td)]:border-border [&_:is(th,td)]:px-3 [&_:is(th,td)]:py-2.5 [&_:is(th,td)]:text-left [&_:is(th,td)]:align-top [&_th]:whitespace-nowrap [&_th]:bg-muted [&_th]:font-semibold [&_th]:text-foreground [&_tr:last-child_td]:border-b-0`,tabIndex:0,role:`region`,"aria-label":`API reference table`,children:(0,Z.jsx)(`table`,{children:e})})},a({href:e,children:n,node:r,...i}){let a=e?.startsWith(`https://`);return(0,Z.jsx)(`a`,{...i,id:e?.startsWith(`#jr-doc-option-`)?e.slice(1):void 0,href:e,target:a?`_blank`:void 0,rel:a?`noreferrer`:void 0,onClick:n=>{e?.startsWith(`#jr-doc-`)&&t&&(n.preventDefault(),t(e.slice(1)))},children:n})}}},[e,t]);return(0,Z.jsx)(`div`,{className:`joy-docs-prose prose text-base leading-[1.7] text-muted-foreground [overflow-wrap:anywhere]`,children:(0,Z.jsx)(ko,{remarkPlugins:ou,components:n,skipHtml:!0,children:e.markdown})})}),pu=(0,v.memo)(function({location:e,onNavigate:t,scrollMode:n=`panel`,searchTarget:r}){let i=$.find(t=>t.id===e.chapter)??$[0],a=(0,v.useRef)(null),o=(0,v.useRef)(null),s=(0,v.useRef)(null),[c,u]=(0,v.useState)(!1),[d,p]=(0,v.useState)(``),[h,g]=(0,v.useState)(!1),_=(0,v.useMemo)(()=>au(d),[d]),y=(0,v.useRef)(!1),b=(e,n)=>{y.current=!0,u(!1),g(!1),p(``),t({chapter:e,anchor:n})};(0,v.useLayoutEffect)(()=>{let t=a.current,r=t?.querySelector(`#${e.anchor||i.id}`);if(t&&r){if(n===`page`){if(!e.chapter)return;let t=document.querySelector(`.home-header`)?.getBoundingClientRect().height??0,n=o.current?.getBoundingClientRect().height??0;window.scrollTo({top:Math.max(0,window.scrollY+r.getBoundingClientRect().top-t-n-20)})}else t.scrollTop+=r.getBoundingClientRect().top-t.getBoundingClientRect().top-20;y.current&&r.focus({preventScroll:!0}),y.current=!1}},[e,i.id,n]);let C=(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`div`,{className:`joy-docs-search relative ml-auto w-[min(100%,280px)] shrink-0 max-[800px]:w-auto max-[800px]:flex-1`,onBlur:e=>{e.relatedTarget&&e.currentTarget.contains(e.relatedTarget)||g(!1)},children:[(0,Z.jsxs)($l,{children:[(0,Z.jsx)(eu,{children:(0,Z.jsx)(S,{"aria-hidden":`true`})}),(0,Z.jsx)(tu,{className:`[&::-webkit-search-cancel-button]:hidden`,type:`search`,"aria-label":`Search documentation`,placeholder:`Search documentation`,value:d,onChange:e=>{p(e.target.value),g(!0)},onFocus:()=>g(!0),onKeyDown:e=>{e.key===`Escape`&&d?(e.preventDefault(),e.stopPropagation(),p(``),g(!1)):e.key===`Enter`&&_[0]?(e.preventDefault(),b(_[0].chapter,_[0].anchor)):e.key===`ArrowDown`&&_.length&&(e.preventDefault(),e.currentTarget.closest(`.joy-docs-search`)?.querySelector(`.joy-docs-result`)?.focus())}}),d&&(0,Z.jsx)(eu,{align:`inline-end`,children:(0,Z.jsx)(l,{type:`button`,variant:`ghost`,size:`icon-xs`,className:`size-5 rounded-sm`,"aria-label":`Clear documentation search`,onClick:()=>{p(``),g(!1)},children:(0,Z.jsx)(f,{"aria-hidden":`true`})})})]}),d.trim()&&(0,Z.jsxs)(`p`,{className:`sr-only`,role:`status`,children:[_.length,` documentation results`]}),h&&d.trim()&&(0,Z.jsx)(`div`,{className:`joy-docs-results absolute top-[calc(100%+6px)] right-0 z-[5] max-h-[min(420px,55vh)] w-[min(420px,calc(100vw-32px))] overflow-auto rounded-lg border border-border bg-popover p-[5px] shadow-lg`,"aria-label":`Documentation search results`,children:_.length?_.map(e=>(0,Z.jsxs)(`button`,{type:`button`,className:`joy-docs-result grid w-full cursor-pointer gap-0.5 overflow-hidden rounded-sm px-2.5 py-2 text-left text-foreground hover:bg-muted focus-visible:bg-muted [&_small]:truncate [&_small]:text-[11px] [&_small]:leading-[1.4] [&_small]:text-muted-foreground [&_span]:text-[11px] [&_span]:leading-[1.4] [&_span]:text-muted-foreground [&_strong]:text-xs [&_strong]:font-semibold`,onClick:()=>b(e.chapter,e.anchor),children:[(0,Z.jsx)(`span`,{children:e.chapterTitle}),(0,Z.jsx)(`strong`,{children:e.title}),e.excerpt&&(0,Z.jsx)(`small`,{children:e.excerpt})]},e.anchor)):(0,Z.jsx)(`p`,{className:`m-0 p-3 text-xs text-muted-foreground`,children:`No matching sections.`})})]}),(0,Z.jsxs)(l,{ref:s,variant:`outline`,size:`sm`,className:`joy-docs-browse hidden w-fit max-[800px]:flex`,"aria-expanded":c,"aria-controls":`jr-docs-navigation`,onClick:()=>u(e=>!e),children:[(0,Z.jsx)(x,{}),` Browse `,(0,Z.jsx)(m,{})]})]});return(0,Z.jsxs)(`div`,{className:`joy-docs relative grid h-full min-h-0 grid-cols-[190px_minmax(0,1fr)] ${r?`grid-rows-[minmax(0,1fr)]`:`grid-rows-[auto_minmax(0,1fr)]`} overflow-clip max-[800px]:grid-cols-[minmax(0,1fr)]`,"data-scroll-mode":n,onKeyDown:e=>{e.key===`Escape`&&c&&(e.preventDefault(),e.stopPropagation(),u(!1),s.current?.focus())},children:[r?(0,Ql.createPortal)(C,r):(0,Z.jsx)(`div`,{className:`joy-docs-toolbar z-[3] col-span-full row-start-1 flex min-w-0 items-center justify-between gap-3 border-b border-border bg-background py-3 pr-[var(--pause-inset,20px)] max-[800px]:flex-wrap max-[800px]:gap-2 max-[800px]:py-2 max-[800px]:pr-4`,ref:o,children:C}),(0,Z.jsxs)(`nav`,{id:`jr-docs-navigation`,className:`joy-docs-navigation col-start-1 ${r?`row-start-1 max-[800px]:row-start-1`:`row-start-2 max-[800px]:row-start-2`} min-w-0 overflow-auto px-[var(--pause-inset,20px)] pt-4 pb-6 text-xs max-[800px]:relative max-[800px]:z-[2] max-[800px]:col-start-1 max-[800px]:m-[6px_16px_0] max-[800px]:hidden max-[800px]:max-h-[min(360px,65%)] max-[800px]:self-start max-[800px]:rounded-lg max-[800px]:border max-[800px]:border-border max-[800px]:bg-popover max-[800px]:p-3 max-[800px]:shadow-lg max-[800px]:data-[open=true]:block`,"aria-label":`API documentation`,"data-open":c,children:[(0,Z.jsx)(`p`,{className:`joy-docs-nav-label mb-3.5 text-[11px] font-medium text-muted-foreground`,children:`Reference`}),(0,Z.jsx)(`ul`,{className:`joy-docs-chapters m-0 list-none space-y-[3px] p-0`,children:$.map(e=>(0,Z.jsx)(`li`,{children:(0,Z.jsx)(`a`,{className:`joy-docs-chapter relative block py-1.5 leading-normal text-muted-foreground no-underline transition-colors hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring aria-[current=page]:font-semibold aria-[current=page]:text-foreground`,href:`#${e.id}`,"aria-current":i.id===e.id?`page`:void 0,onClick:t=>{t.preventDefault(),b(e.id,e.id)},children:e.title})},e.id))})]}),(0,Z.jsxs)(`article`,{ref:a,className:`joy-docs-article col-start-2 ${r?`row-start-1 max-[800px]:row-start-1`:`row-start-2 max-[800px]:row-start-2`} min-h-0 min-w-0 overflow-auto px-6 pt-4 pb-6 overscroll-contain max-[800px]:col-start-1 max-[800px]:px-4`,"aria-label":i.title,children:[(0,Z.jsx)(fu,{chapter:i,onLocalLink:e=>{let t=$.find(t=>t.headings.some(t=>t.id===e)||e.startsWith(`jr-doc-option-`)&&t.id===`jr-doc-settings`);t?b(t.id,e):a.current?.querySelector(`#${CSS.escape(e)}`)&&b(i.id,e)}}),(0,Z.jsx)(`p`,{className:`joy-docs-next mt-7 border-t border-border pt-5`,children:$[$.indexOf(i)+1]&&(0,Z.jsxs)(l,{variant:`outline`,onClick:()=>{let e=$[$.indexOf(i)+1];b(e.id,e.id)},children:[`Next: `,$[$.indexOf(i)+1].title,` →`]})})]})]})});export{pu as Documentation};
|