@viji-dev/sdk 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +70 -63
- package/bin/viji.js +9 -29
- package/dist/assets/artist-dts-BHUsvSI6.js +613 -0
- package/dist/assets/artist-dts-p5-Cyw8vmy_.js +736 -0
- package/dist/assets/core-CiQx3w0t.js +12 -0
- package/dist/assets/dark-plus-C3mMm8J8.js +1 -0
- package/dist/assets/docs-api-PBLtY4Ni.js +12381 -0
- package/dist/assets/engine-javascript-CXyY7cc8.js +141 -0
- package/dist/assets/essentia-wasm.web-0S-sW98u-CYV1l1zv.js +38 -0
- package/dist/assets/essentia.js-core.es-DnrJE0uR-DOSrF5_G.js +32 -0
- package/dist/assets/glsl-DMyvO4G4.js +1 -0
- package/dist/assets/index-BhFxsauQ.js +215 -0
- package/dist/assets/index-BqhVeA7U.css +1 -0
- package/dist/assets/index-T4TOjvD0.js +1 -0
- package/dist/assets/index-Wz9WqGqz.js +52 -0
- package/dist/assets/index-t24aGwla.js +1 -0
- package/dist/assets/javascript-wDzz0qaB.js +1 -0
- package/dist/assets/shader-uniforms-GdaUkQPK.js +1 -0
- package/dist/assets/typescript-BPQ3VLAy.js +1 -0
- package/dist/assets/viji.worker-CQSJ0SiO-ljtBlcNZ.js +27018 -0
- package/{index.html → dist/index.html} +2 -1
- package/package.json +31 -35
- package/src/cli/commands/build.js +50 -99
- package/src/cli/commands/create.js +49 -46
- package/src/cli/commands/dev.js +30 -97
- package/src/cli/server/dev-server.js +233 -0
- package/src/cli/server/scene-scanner.js +93 -0
- package/src/cli/server/vite-scene-plugin.d.ts +2 -0
- package/src/cli/server/vite-scene-plugin.js +134 -0
- package/src/cli/utils/cli-utils.js +29 -139
- package/src/cli/utils/scene-compiler.js +10 -17
- package/src/templates/scene-templates.js +85 -0
- package/.gitignore +0 -29
- package/eslint.config.js +0 -37
- package/postcss.config.js +0 -6
- package/scenes/audio-visualizer/main.js +0 -287
- package/scenes/core-demo/main.js +0 -532
- package/scenes/demo-scene/main.js +0 -619
- package/scenes/global.d.ts +0 -15
- package/scenes/particle-system/main.js +0 -349
- package/scenes/tsconfig.json +0 -12
- package/scenes/video-mirror/main.ts +0 -436
- package/src/App.css +0 -42
- package/src/App.tsx +0 -279
- package/src/cli/commands/init.js +0 -262
- package/src/components/SDKPage.tsx +0 -337
- package/src/components/core/CoreContainer.tsx +0 -126
- package/src/components/ui/DeviceSelectionList.tsx +0 -137
- package/src/components/ui/FPSCounter.tsx +0 -78
- package/src/components/ui/FileDropzonePanel.tsx +0 -120
- package/src/components/ui/FileListPanel.tsx +0 -285
- package/src/components/ui/InputExpansionPanel.tsx +0 -31
- package/src/components/ui/MediaPlayerControls.tsx +0 -191
- package/src/components/ui/MenuContainer.tsx +0 -71
- package/src/components/ui/ParametersMenu.tsx +0 -797
- package/src/components/ui/ProjectSwitcherMenu.tsx +0 -192
- package/src/components/ui/QuickInputControls.tsx +0 -542
- package/src/components/ui/SDKMenuSystem.tsx +0 -96
- package/src/components/ui/SettingsMenu.tsx +0 -346
- package/src/components/ui/SimpleInputControls.tsx +0 -137
- package/src/index.css +0 -68
- package/src/main.tsx +0 -10
- package/src/scenes-hmr.ts +0 -158
- package/src/services/project-filesystem.ts +0 -436
- package/src/stores/scene-player/index.ts +0 -3
- package/src/stores/scene-player/input-manager.store.ts +0 -1045
- package/src/stores/scene-player/scene-session.store.ts +0 -659
- package/src/styles/globals.css +0 -111
- package/src/templates/minimal-template.js +0 -11
- package/src/utils/debounce.js +0 -34
- package/src/vite-env.d.ts +0 -1
- package/tailwind.config.js +0 -18
- package/tsconfig.app.json +0 -27
- package/tsconfig.json +0 -27
- package/tsconfig.node.json +0 -27
- package/vite.config.ts +0 -54
- /package/{public → dist}/favicon.png +0 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-t24aGwla.js","assets/index-BhFxsauQ.js","assets/index-BqhVeA7U.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as y,c as jn,t as Ha,e as Ua,j as p,a as qa,L as Nt,_ as Je,A as Sn,m as At,g as Ga,u as En,$ as Nn,b as xi,d as Wa,f as Ya,h as be,i as se,k as Xn,o as Lt,l as ze,n as Xa,C as Qa,p as Ja,q as Ka,s as Za,v as es,w as bi,x as yi,y as wi,z as ts,B as ns,D as Qn,E as rs,F as is,G as as,H as ss,I as os,J as ls,K as Jn,M as us,N as cs,O as ds,P as ki,Q as vi,R as Ci,S as Kn,T as Zn,U as cn,V as fs,W as ji,X as ps,Y as hs,Z as ms,a0 as Si,a1 as It,a2 as yt,a3 as dn,a4 as fn,a5 as Ei,a6 as gs,a7 as Ut,a8 as qt,a9 as xs,aa as er,ab as bs,ac as ys,ad as ws,ae as ks,af as vs,ag as Cs,ah as js,ai as Ss,aj as Es,ak as Ns,al as As,am as Is,an as Ps,ao as Rs,ap as Fs,aq as Ts,ar as Ni,as as Ds,at as _s,au as Ls,av as zs,aw as Os,ax as Ms,ay as tr}from"./index-BhFxsauQ.js";import{az as Xh}from"./index-BhFxsauQ.js";import{s as An,h as $s,w as Bs,f as Vs,a as Hs,b as Us,c as nr}from"./index-T4TOjvD0.js";function qs({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"}))}const Gs=y.forwardRef(qs);function Ws({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"}))}const Ys=y.forwardRef(Ws);function Xs({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"}))}const Qs=y.forwardRef(Xs);function Js({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m3.75 13.5 10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75Z"}))}const Ks=y.forwardRef(Js);function Zs({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 0 1-.75.75H9a.75.75 0 0 1-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 0 1-2.25 2.25H6.75A2.25 2.25 0 0 1 4.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 0 1 1.927-.184"}))}const eo=y.forwardRef(Zs);function to({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5"}))}const In=y.forwardRef(to);function no({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"}))}const ro=y.forwardRef(no);function io({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"}))}const Pn=y.forwardRef(io);function ao({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}const so=y.forwardRef(ao);function oo({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18v-5.25m0 0a6.01 6.01 0 0 0 1.5-.189m-1.5.189a6.01 6.01 0 0 1-1.5-.189m3.75 7.478a12.06 12.06 0 0 1-4.5 0m3.75 2.383a14.406 14.406 0 0 1-3 0M14.25 18v-.192c0-.983.658-1.823 1.508-2.316a7.5 7.5 0 1 0-7.517 0c.85.493 1.509 1.333 1.509 2.316V18"}))}const lo=y.forwardRef(oo);function uo({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.53 16.122a3 3 0 0 0-5.78 1.128 2.25 2.25 0 0 1-2.4 2.245 4.5 4.5 0 0 0 8.4-2.245c0-.399-.078-.78-.22-1.128Zm0 0a15.998 15.998 0 0 0 3.388-1.62m-5.043-.025a15.994 15.994 0 0 1 1.622-3.395m3.42 3.42a15.995 15.995 0 0 0 4.764-4.648l3.876-5.814a1.151 1.151 0 0 0-1.597-1.597L14.146 6.32a15.996 15.996 0 0 0-4.649 4.763m3.42 3.42a6.776 6.776 0 0 0-3.42-3.42"}))}const co=y.forwardRef(uo);function fo({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"}))}const po=y.forwardRef(fo);function ho({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z"}))}const Ai=y.forwardRef(ho);function mo({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"}))}const go=y.forwardRef(mo);function xo({title:e,titleId:n,...t},r){return y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?y.createElement("title",{id:n},e):null,y.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.429 9.75 2.25 12l4.179 2.25m0-4.5 5.571 3 5.571-3m-11.142 0L2.25 7.5 12 2.25l9.75 5.25-4.179 2.25m0 0L21.75 12l-4.179 2.25m0 0 4.179 2.25L12 21.75 2.25 16.5l4.179-2.25m11.142 0-5.571 3-5.571-3"}))}const bo=y.forwardRef(xo);var[Hh,zt]=jn({name:"ProviderContext",strict:!1});function mt(e){return y.forwardRef(e)}var Ot=(e,n,t=!0)=>{if(!n)return[e,{}];const r=n.reduce((i,a)=>a in e?{...i,[a]:e[a]}:i,{});return t?[Object.keys(e).filter(a=>!n.includes(a)).reduce((a,s)=>({...a,[s]:e[s]}),{}),r]:[e,r]},yo={default:"bg-default text-default-foreground",primary:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",success:"bg-success text-success-foreground",warning:"bg-warning text-warning-foreground",danger:"bg-danger text-danger-foreground",foreground:"bg-foreground text-background"},wo={default:"shadow-lg shadow-default/50 bg-default text-default-foreground",primary:"shadow-lg shadow-primary/40 bg-primary text-primary-foreground",secondary:"shadow-lg shadow-secondary/40 bg-secondary text-secondary-foreground",success:"shadow-lg shadow-success/40 bg-success text-success-foreground",warning:"shadow-lg shadow-warning/40 bg-warning text-warning-foreground",danger:"shadow-lg shadow-danger/40 bg-danger text-danger-foreground"},ko={default:"bg-transparent border-default text-foreground",primary:"bg-transparent border-primary text-primary",secondary:"bg-transparent border-secondary text-secondary",success:"bg-transparent border-success text-success",warning:"bg-transparent border-warning text-warning",danger:"bg-transparent border-danger text-danger"},vo={default:"bg-default/40 text-default-700",primary:"bg-primary/20 text-primary-600",secondary:"bg-secondary/20 text-secondary-600",success:"bg-success/20 text-success-700 dark:text-success",warning:"bg-warning/20 text-warning-700 dark:text-warning",danger:"bg-danger/20 text-danger-600 dark:text-danger-500"},Co={default:"border-default bg-default-100 text-default-foreground",primary:"border-default bg-default-100 text-primary",secondary:"border-default bg-default-100 text-secondary",success:"border-default bg-default-100 text-success",warning:"border-default bg-default-100 text-warning",danger:"border-default bg-default-100 text-danger"},jo={default:"bg-transparent text-default-foreground",primary:"bg-transparent text-primary",secondary:"bg-transparent text-secondary",success:"bg-transparent text-success",warning:"bg-transparent text-warning",danger:"bg-transparent text-danger"},So={default:"border-default text-default-foreground",primary:"border-primary text-primary",secondary:"border-secondary text-secondary",success:"border-success text-success",warning:"border-warning text-warning",danger:"border-danger text-danger"},_={solid:yo,shadow:wo,bordered:ko,flat:vo,faded:Co,light:jo,ghost:So},wt=["small","medium","large"],rr={theme:{opacity:["disabled"],spacing:["divider"],borderWidth:wt,borderRadius:wt},classGroups:{shadow:[{shadow:wt}],"font-size":[{text:["tiny",...wt]}],"bg-image":["bg-stripe-gradient-default","bg-stripe-gradient-primary","bg-stripe-gradient-secondary","bg-stripe-gradient-success","bg-stripe-gradient-warning","bg-stripe-gradient-danger"]}},ir=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,me=e=>!e||typeof e!="object"||Object.keys(e).length===0,Eo=(e,n)=>JSON.stringify(e)===JSON.stringify(n);function Ii(e,n){e.forEach(function(t){Array.isArray(t)?Ii(t,n):n.push(t)})}function Pi(e){let n=[];return Ii(e,n),n}var Ri=(...e)=>Pi(e).filter(Boolean),Fi=(e,n)=>{let t={},r=Object.keys(e),i=Object.keys(n);for(let a of r)if(i.includes(a)){let s=e[a],o=n[a];Array.isArray(s)||Array.isArray(o)?t[a]=Ri(o,s):typeof s=="object"&&typeof o=="object"?t[a]=Fi(s,o):t[a]=o+" "+s}else t[a]=e[a];for(let a of i)r.includes(a)||(t[a]=n[a]);return t},ar=e=>!e||typeof e!="string"?e:e.replace(/\s+/g," ").trim(),No={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},Ti=e=>e||void 0,ft=(...e)=>Ti(Pi(e).filter(Boolean).join(" ")),Gt=null,Fe={},pn=!1,rt=(...e)=>n=>n.twMerge?((!Gt||pn)&&(pn=!1,Gt=me(Fe)?Ha:Ua({...Fe,extend:{theme:Fe.theme,classGroups:Fe.classGroups,conflictingClassGroupModifiers:Fe.conflictingClassGroupModifiers,conflictingClassGroups:Fe.conflictingClassGroups,...Fe.extend}})),Ti(Gt(ft(e)))):ft(e),sr=(e,n)=>{for(let t in n)e.hasOwnProperty(t)?e[t]=ft(e[t],n[t]):e[t]=n[t];return e},Ao=(e,n)=>{let{extend:t=null,slots:r={},variants:i={},compoundVariants:a=[],compoundSlots:s=[],defaultVariants:o={}}=e,u={...No,...n},l=t!=null&&t.base?ft(t.base,e?.base):e?.base,c=t!=null&&t.variants&&!me(t.variants)?Fi(i,t.variants):i,d=t!=null&&t.defaultVariants&&!me(t.defaultVariants)?{...t.defaultVariants,...o}:o;!me(u.twMergeConfig)&&!Eo(u.twMergeConfig,Fe)&&(pn=!0,Fe=u.twMergeConfig);let f=me(t?.slots),h=me(r)?{}:{base:ft(e?.base,f&&t?.base),...r},x=f?h:sr({...t?.slots},me(h)?{base:e?.base}:h),w=me(t?.compoundVariants)?a:Ri(t?.compoundVariants,a),k=C=>{if(me(c)&&me(r)&&f)return rt(l,C?.class,C?.className)(u);if(w&&!Array.isArray(w))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof w}`);if(s&&!Array.isArray(s))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof s}`);let j=(R,L,D=[],F)=>{let O=D;if(typeof L=="string")O=O.concat(ar(L).split(" ").map(H=>`${R}:${H}`));else if(Array.isArray(L))O=O.concat(L.reduce((H,Y)=>H.concat(`${R}:${Y}`),[]));else if(typeof L=="object"&&typeof F=="string"){for(let H in L)if(L.hasOwnProperty(H)&&H===F){let Y=L[H];if(Y&&typeof Y=="string"){let X=ar(Y);O[F]?O[F]=O[F].concat(X.split(" ").map(g=>`${R}:${g}`)):O[F]=X.split(" ").map(g=>`${R}:${g}`)}else Array.isArray(Y)&&Y.length>0&&(O[F]=Y.reduce((X,g)=>X.concat(`${R}:${g}`),[]))}}return O},I=(R,L=c,D=null,F=null)=>{var O;let H=L[R];if(!H||me(H))return null;let Y=(O=F?.[R])!=null?O:C?.[R];if(Y===null)return null;let X=ir(Y),g=Array.isArray(u.responsiveVariants)&&u.responsiveVariants.length>0||u.responsiveVariants===!0,ee=d?.[R],J=[];if(typeof X=="object"&&g)for(let[P,M]of Object.entries(X)){let q=H[M];if(P==="initial"){ee=M;continue}Array.isArray(u.responsiveVariants)&&!u.responsiveVariants.includes(P)||(J=j(P,q,J,D))}let m=X!=null&&typeof X!="object"?X:ir(ee),T=H[m||"false"];return typeof J=="object"&&typeof D=="string"&&J[D]?sr(J,T):J.length>0?(J.push(T),D==="base"?J.join(" "):J):T},E=()=>c?Object.keys(c).map(R=>I(R,c)):null,v=(R,L)=>{if(!c||typeof c!="object")return null;let D=new Array;for(let F in c){let O=I(F,c,R,L),H=R==="base"&&typeof O=="string"?O:O&&O[R];H&&(D[D.length]=H)}return D},B={};for(let R in C)C[R]!==void 0&&(B[R]=C[R]);let $=(R,L)=>{var D;let F=typeof C?.[R]=="object"?{[R]:(D=C[R])==null?void 0:D.initial}:{};return{...d,...B,...F,...L}},V=(R=[],L)=>{let D=[];for(let{class:F,className:O,...H}of R){let Y=!0;for(let[X,g]of Object.entries(H)){let ee=$(X,L)[X];if(Array.isArray(g)){if(!g.includes(ee)){Y=!1;break}}else{let J=m=>m==null||m===!1;if(J(g)&&J(ee))continue;if(ee!==g){Y=!1;break}}}Y&&(F&&D.push(F),O&&D.push(O))}return D},S=R=>{let L=V(w,R);if(!Array.isArray(L))return L;let D={};for(let F of L)if(typeof F=="string"&&(D.base=rt(D.base,F)(u)),typeof F=="object")for(let[O,H]of Object.entries(F))D[O]=rt(D[O],H)(u);return D},z=R=>{if(s.length<1)return null;let L={};for(let{slots:D=[],class:F,className:O,...H}of s){if(!me(H)){let Y=!0;for(let X of Object.keys(H)){let g=$(X,R)[X];if(g===void 0||(Array.isArray(H[X])?!H[X].includes(g):H[X]!==g)){Y=!1;break}}if(!Y)continue}for(let Y of D)L[Y]=L[Y]||[],L[Y].push([F,O])}return L};if(!me(r)||!f){let R={};if(typeof x=="object"&&!me(x))for(let L of Object.keys(x))R[L]=D=>{var F,O;return rt(x[L],v(L,D),((F=S(D))!=null?F:[])[L],((O=z(D))!=null?O:[])[L],D?.class,D?.className)(u)};return R}return rt(l,E(),V(w),C?.class,C?.className)(u)},b=()=>{if(!(!c||typeof c!="object"))return Object.keys(c)};return k.variantKeys=b(),k.extend=t,k.base=l,k.slots=x,k.variants=c,k.defaultVariants=d,k.compoundSlots=s,k.compoundVariants=w,k},gt=(e,n)=>{var t,r,i;return Ao(e,{...n,twMerge:(t=void 0)!=null?t:!0,twMergeConfig:{theme:{...(r=void 0)==null?void 0:r.theme,...rr.theme},classGroups:{...(i=void 0)==null?void 0:i.classGroups,...rr.classGroups}}})},or=gt({slots:{base:"relative inline-flex flex-col gap-2 items-center justify-center",wrapper:"relative flex",label:"text-foreground dark:text-foreground-dark font-regular",circle1:"absolute w-full h-full rounded-full",circle2:"absolute w-full h-full rounded-full",dots:"relative rounded-full mx-auto",spinnerBars:["absolute","animate-fade-out","rounded-full","w-[25%]","h-[8%]","left-[calc(37.5%)]","top-[calc(46%)]","spinner-bar-animation"]},variants:{size:{sm:{wrapper:"w-5 h-5",circle1:"border-2",circle2:"border-2",dots:"size-1",label:"text-small"},md:{wrapper:"w-8 h-8",circle1:"border-3",circle2:"border-3",dots:"size-1.5",label:"text-medium"},lg:{wrapper:"w-10 h-10",circle1:"border-3",circle2:"border-3",dots:"size-2",label:"text-large"}},color:{current:{circle1:"border-b-current",circle2:"border-b-current",dots:"bg-current",spinnerBars:"bg-current"},white:{circle1:"border-b-white",circle2:"border-b-white",dots:"bg-white",spinnerBars:"bg-white"},default:{circle1:"border-b-default",circle2:"border-b-default",dots:"bg-default",spinnerBars:"bg-default"},primary:{circle1:"border-b-primary",circle2:"border-b-primary",dots:"bg-primary",spinnerBars:"bg-primary"},secondary:{circle1:"border-b-secondary",circle2:"border-b-secondary",dots:"bg-secondary",spinnerBars:"bg-secondary"},success:{circle1:"border-b-success",circle2:"border-b-success",dots:"bg-success",spinnerBars:"bg-success"},warning:{circle1:"border-b-warning",circle2:"border-b-warning",dots:"bg-warning",spinnerBars:"bg-warning"},danger:{circle1:"border-b-danger",circle2:"border-b-danger",dots:"bg-danger",spinnerBars:"bg-danger"}},labelColor:{foreground:{label:"text-foreground"},primary:{label:"text-primary"},secondary:{label:"text-secondary"},success:{label:"text-success"},warning:{label:"text-warning"},danger:{label:"text-danger"}},variant:{default:{circle1:["animate-spinner-ease-spin","border-solid","border-t-transparent","border-l-transparent","border-r-transparent"],circle2:["opacity-75","animate-spinner-linear-spin","border-dotted","border-t-transparent","border-l-transparent","border-r-transparent"]},gradient:{circle1:["border-0","bg-gradient-to-b","from-transparent","via-transparent","to-primary","animate-spinner-linear-spin","[animation-duration:1s]","[-webkit-mask:radial-gradient(closest-side,rgba(0,0,0,0.0)calc(100%-3px),rgba(0,0,0,1)calc(100%-3px))]"],circle2:["hidden"]},wave:{wrapper:"translate-y-3/4",dots:["animate-sway","spinner-dot-animation"]},dots:{wrapper:"translate-y-2/4",dots:["animate-blink","spinner-dot-blink-animation"]},spinner:{},simple:{wrapper:"text-foreground h-5 w-5 animate-spin",circle1:"opacity-25",circle2:"opacity-75"}}},defaultVariants:{size:"md",color:"primary",labelColor:"foreground",variant:"default"},compoundVariants:[{variant:"gradient",color:"current",class:{circle1:"to-current"}},{variant:"gradient",color:"white",class:{circle1:"to-white"}},{variant:"gradient",color:"default",class:{circle1:"to-default"}},{variant:"gradient",color:"primary",class:{circle1:"to-primary"}},{variant:"gradient",color:"secondary",class:{circle1:"to-secondary"}},{variant:"gradient",color:"success",class:{circle1:"to-success"}},{variant:"gradient",color:"warning",class:{circle1:"to-warning"}},{variant:"gradient",color:"danger",class:{circle1:"to-danger"}},{variant:"wave",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"wave",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"wave",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"dots",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"dots",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"dots",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"simple",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"simple",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"simple",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"simple",color:"current",class:{wrapper:"text-current"}},{variant:"simple",color:"white",class:{wrapper:"text-white"}},{variant:"simple",color:"default",class:{wrapper:"text-default"}},{variant:"simple",color:"primary",class:{wrapper:"text-primary"}},{variant:"simple",color:"secondary",class:{wrapper:"text-secondary"}},{variant:"simple",color:"success",class:{wrapper:"text-success"}},{variant:"simple",color:"warning",class:{wrapper:"text-warning"}},{variant:"simple",color:"danger",class:{wrapper:"text-danger"}}]}),Di=["outline-none","data-[focus-visible=true]:z-10","data-[focus-visible=true]:outline-2","data-[focus-visible=true]:outline-focus","data-[focus-visible=true]:outline-offset-2"],Io=["outline-none","ring-2","ring-focus","ring-offset-2","ring-offset-background"],qe={default:["[&+.border-medium.border-default]:ms-[calc(theme(borderWidth.medium)*-1)]"],primary:["[&+.border-medium.border-primary]:ms-[calc(theme(borderWidth.medium)*-1)]"],secondary:["[&+.border-medium.border-secondary]:ms-[calc(theme(borderWidth.medium)*-1)]"],success:["[&+.border-medium.border-success]:ms-[calc(theme(borderWidth.medium)*-1)]"],warning:["[&+.border-medium.border-warning]:ms-[calc(theme(borderWidth.medium)*-1)]"],danger:["[&+.border-medium.border-danger]:ms-[calc(theme(borderWidth.medium)*-1)]"]},Pt=gt({slots:{base:["z-0","relative","bg-transparent","before:content-['']","before:hidden","before:z-[-1]","before:absolute","before:rotate-45","before:w-2.5","before:h-2.5","before:rounded-sm","data-[arrow=true]:before:block","data-[placement=top]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top]:before:left-1/2","data-[placement=top]:before:-translate-x-1/2","data-[placement=top-start]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top-start]:before:left-3","data-[placement=top-end]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top-end]:before:right-3","data-[placement=bottom]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom]:before:left-1/2","data-[placement=bottom]:before:-translate-x-1/2","data-[placement=bottom-start]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom-start]:before:left-3","data-[placement=bottom-end]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom-end]:before:right-3","data-[placement=left]:before:-right-[calc(theme(spacing.5)/4_-_2px)]","data-[placement=left]:before:top-1/2","data-[placement=left]:before:-translate-y-1/2","data-[placement=left-start]:before:-right-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=left-start]:before:top-1/4","data-[placement=left-end]:before:-right-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=left-end]:before:bottom-1/4","data-[placement=right]:before:-left-[calc(theme(spacing.5)/4_-_2px)]","data-[placement=right]:before:top-1/2","data-[placement=right]:before:-translate-y-1/2","data-[placement=right-start]:before:-left-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=right-start]:before:top-1/4","data-[placement=right-end]:before:-left-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=right-end]:before:bottom-1/4",...Di],content:["z-10","px-2.5","py-1","w-full","inline-flex","flex-col","items-center","justify-center","box-border","subpixel-antialiased","outline-none","box-border"],trigger:["z-10"],backdrop:["hidden"],arrow:[]},variants:{size:{sm:{content:"text-tiny"},md:{content:"text-small"},lg:{content:"text-medium"}},color:{default:{base:"before:bg-content1 before:shadow-small",content:"bg-content1"},foreground:{base:"before:bg-foreground",content:_.solid.foreground},primary:{base:"before:bg-primary",content:_.solid.primary},secondary:{base:"before:bg-secondary",content:_.solid.secondary},success:{base:"before:bg-success",content:_.solid.success},warning:{base:"before:bg-warning",content:_.solid.warning},danger:{base:"before:bg-danger",content:_.solid.danger}},radius:{none:{content:"rounded-none"},sm:{content:"rounded-small"},md:{content:"rounded-medium"},lg:{content:"rounded-large"},full:{content:"rounded-full"}},shadow:{none:{content:"shadow-none"},sm:{content:"shadow-small"},md:{content:"shadow-medium"},lg:{content:"shadow-large"}},backdrop:{transparent:{},opaque:{backdrop:"bg-overlay/50 backdrop-opacity-disabled"},blur:{backdrop:"backdrop-blur-sm backdrop-saturate-150 bg-overlay/30"}},triggerScaleOnOpen:{true:{trigger:["aria-expanded:scale-[0.97]","aria-expanded:opacity-70","subpixel-antialiased"]},false:{}},disableAnimation:{true:{base:"animate-none"}},isTriggerDisabled:{true:{trigger:"opacity-disabled pointer-events-none"},false:{}}},defaultVariants:{color:"default",radius:"lg",size:"md",shadow:"md",backdrop:"transparent",triggerScaleOnOpen:!0},compoundVariants:[{backdrop:["opaque","blur"],class:{backdrop:"block w-full h-full fixed inset-0 -z-30"}}]}),Po=gt({base:["z-0","group","relative","inline-flex","items-center","justify-center","box-border","appearance-none","outline-none","select-none","whitespace-nowrap","min-w-max","font-normal","subpixel-antialiased","overflow-hidden","tap-highlight-transparent","transform-gpu data-[pressed=true]:scale-[0.97]",...Di],variants:{variant:{solid:"",bordered:"border-medium bg-transparent",light:"bg-transparent",flat:"",faded:"border-medium",shadow:"",ghost:"border-medium bg-transparent"},size:{sm:"px-3 min-w-16 h-8 text-tiny gap-2 rounded-small",md:"px-4 min-w-20 h-10 text-small gap-2 rounded-medium",lg:"px-6 min-w-24 h-12 text-medium gap-3 rounded-large"},color:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},radius:{none:"rounded-none",sm:"rounded-small",md:"rounded-medium",lg:"rounded-large",full:"rounded-full"},fullWidth:{true:"w-full"},isDisabled:{true:"opacity-disabled pointer-events-none"},isInGroup:{true:"[&:not(:first-child):not(:last-child)]:rounded-none"},isIconOnly:{true:"px-0 !gap-0",false:"[&>svg]:max-w-[theme(spacing.8)]"},disableAnimation:{true:"!transition-none data-[pressed=true]:scale-100",false:"transition-transform-colors-opacity motion-reduce:transition-none"}},defaultVariants:{size:"md",variant:"solid",color:"default",fullWidth:!1,isDisabled:!1,isInGroup:!1},compoundVariants:[{variant:"solid",color:"default",class:_.solid.default},{variant:"solid",color:"primary",class:_.solid.primary},{variant:"solid",color:"secondary",class:_.solid.secondary},{variant:"solid",color:"success",class:_.solid.success},{variant:"solid",color:"warning",class:_.solid.warning},{variant:"solid",color:"danger",class:_.solid.danger},{variant:"shadow",color:"default",class:_.shadow.default},{variant:"shadow",color:"primary",class:_.shadow.primary},{variant:"shadow",color:"secondary",class:_.shadow.secondary},{variant:"shadow",color:"success",class:_.shadow.success},{variant:"shadow",color:"warning",class:_.shadow.warning},{variant:"shadow",color:"danger",class:_.shadow.danger},{variant:"bordered",color:"default",class:_.bordered.default},{variant:"bordered",color:"primary",class:_.bordered.primary},{variant:"bordered",color:"secondary",class:_.bordered.secondary},{variant:"bordered",color:"success",class:_.bordered.success},{variant:"bordered",color:"warning",class:_.bordered.warning},{variant:"bordered",color:"danger",class:_.bordered.danger},{variant:"flat",color:"default",class:_.flat.default},{variant:"flat",color:"primary",class:_.flat.primary},{variant:"flat",color:"secondary",class:_.flat.secondary},{variant:"flat",color:"success",class:_.flat.success},{variant:"flat",color:"warning",class:_.flat.warning},{variant:"flat",color:"danger",class:_.flat.danger},{variant:"faded",color:"default",class:_.faded.default},{variant:"faded",color:"primary",class:_.faded.primary},{variant:"faded",color:"secondary",class:_.faded.secondary},{variant:"faded",color:"success",class:_.faded.success},{variant:"faded",color:"warning",class:_.faded.warning},{variant:"faded",color:"danger",class:_.faded.danger},{variant:"light",color:"default",class:[_.light.default,"data-[hover=true]:bg-default/40"]},{variant:"light",color:"primary",class:[_.light.primary,"data-[hover=true]:bg-primary/20"]},{variant:"light",color:"secondary",class:[_.light.secondary,"data-[hover=true]:bg-secondary/20"]},{variant:"light",color:"success",class:[_.light.success,"data-[hover=true]:bg-success/20"]},{variant:"light",color:"warning",class:[_.light.warning,"data-[hover=true]:bg-warning/20"]},{variant:"light",color:"danger",class:[_.light.danger,"data-[hover=true]:bg-danger/20"]},{variant:"ghost",color:"default",class:[_.ghost.default,"data-[hover=true]:!bg-default"]},{variant:"ghost",color:"primary",class:[_.ghost.primary,"data-[hover=true]:!bg-primary data-[hover=true]:!text-primary-foreground"]},{variant:"ghost",color:"secondary",class:[_.ghost.secondary,"data-[hover=true]:!bg-secondary data-[hover=true]:!text-secondary-foreground"]},{variant:"ghost",color:"success",class:[_.ghost.success,"data-[hover=true]:!bg-success data-[hover=true]:!text-success-foreground"]},{variant:"ghost",color:"warning",class:[_.ghost.warning,"data-[hover=true]:!bg-warning data-[hover=true]:!text-warning-foreground"]},{variant:"ghost",color:"danger",class:[_.ghost.danger,"data-[hover=true]:!bg-danger data-[hover=true]:!text-danger-foreground"]},{isInGroup:!0,class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,size:"sm",class:"rounded-none first:rounded-s-small last:rounded-e-small"},{isInGroup:!0,size:"md",class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,size:"lg",class:"rounded-none first:rounded-s-large last:rounded-e-large"},{isInGroup:!0,isRounded:!0,class:"rounded-none first:rounded-s-full last:rounded-e-full"},{isInGroup:!0,radius:"none",class:"rounded-none first:rounded-s-none last:rounded-e-none"},{isInGroup:!0,radius:"sm",class:"rounded-none first:rounded-s-small last:rounded-e-small"},{isInGroup:!0,radius:"md",class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,radius:"lg",class:"rounded-none first:rounded-s-large last:rounded-e-large"},{isInGroup:!0,radius:"full",class:"rounded-none first:rounded-s-full last:rounded-e-full"},{isInGroup:!0,variant:["ghost","bordered"],color:"default",className:qe.default},{isInGroup:!0,variant:["ghost","bordered"],color:"primary",className:qe.primary},{isInGroup:!0,variant:["ghost","bordered"],color:"secondary",className:qe.secondary},{isInGroup:!0,variant:["ghost","bordered"],color:"success",className:qe.success},{isInGroup:!0,variant:["ghost","bordered"],color:"warning",className:qe.warning},{isInGroup:!0,variant:["ghost","bordered"],color:"danger",className:qe.danger},{isIconOnly:!0,size:"sm",class:"min-w-8 w-8 h-8"},{isIconOnly:!0,size:"md",class:"min-w-10 w-10 h-10"},{isIconOnly:!0,size:"lg",class:"min-w-12 w-12 h-12"},{variant:["solid","faded","flat","bordered","shadow"],class:"data-[hover=true]:opacity-hover"}]});gt({base:"inline-flex items-center justify-center h-auto",variants:{fullWidth:{true:"w-full"}},defaultVariants:{fullWidth:!1}});var lr=gt({slots:{base:["relative","max-w-fit","min-w-min","inline-flex","items-center","justify-between","box-border","whitespace-nowrap"],content:"flex-1 text-inherit font-normal",dot:["w-2","h-2","ml-1","rounded-full"],avatar:"flex-shrink-0",closeButton:["z-10","appearance-none","outline-none","select-none","transition-opacity","opacity-70","hover:opacity-100","cursor-pointer","active:opacity-disabled","tap-highlight-transparent"]},variants:{variant:{solid:{},bordered:{base:"border-medium bg-transparent"},light:{base:"bg-transparent"},flat:{},faded:{base:"border-medium"},shadow:{},dot:{base:"border-medium border-default text-foreground bg-transparent"}},color:{default:{dot:"bg-default-400"},primary:{dot:"bg-primary"},secondary:{dot:"bg-secondary"},success:{dot:"bg-success"},warning:{dot:"bg-warning"},danger:{dot:"bg-danger"}},size:{sm:{base:"px-1 h-6 text-tiny",content:"px-1",closeButton:"text-medium",avatar:"w-4 h-4"},md:{base:"px-1 h-7 text-small",content:"px-2",closeButton:"text-large",avatar:"w-5 h-5"},lg:{base:"px-2 h-8 text-medium",content:"px-2",closeButton:"text-xl",avatar:"w-6 h-6"}},radius:{none:{base:"rounded-none"},sm:{base:"rounded-small"},md:{base:"rounded-medium"},lg:{base:"rounded-large"},full:{base:"rounded-full"}},isOneChar:{true:{},false:{}},isCloseable:{true:{},false:{}},hasStartContent:{true:{}},hasEndContent:{true:{}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},isCloseButtonFocusVisible:{true:{closeButton:[...Io,"ring-1","rounded-full"]}}},defaultVariants:{variant:"solid",color:"default",size:"md",radius:"full",isDisabled:!1},compoundVariants:[{variant:"solid",color:"default",class:{base:_.solid.default}},{variant:"solid",color:"primary",class:{base:_.solid.primary}},{variant:"solid",color:"secondary",class:{base:_.solid.secondary}},{variant:"solid",color:"success",class:{base:_.solid.success}},{variant:"solid",color:"warning",class:{base:_.solid.warning}},{variant:"solid",color:"danger",class:{base:_.solid.danger}},{variant:"shadow",color:"default",class:{base:_.shadow.default}},{variant:"shadow",color:"primary",class:{base:_.shadow.primary}},{variant:"shadow",color:"secondary",class:{base:_.shadow.secondary}},{variant:"shadow",color:"success",class:{base:_.shadow.success}},{variant:"shadow",color:"warning",class:{base:_.shadow.warning}},{variant:"shadow",color:"danger",class:{base:_.shadow.danger}},{variant:"bordered",color:"default",class:{base:_.bordered.default}},{variant:"bordered",color:"primary",class:{base:_.bordered.primary}},{variant:"bordered",color:"secondary",class:{base:_.bordered.secondary}},{variant:"bordered",color:"success",class:{base:_.bordered.success}},{variant:"bordered",color:"warning",class:{base:_.bordered.warning}},{variant:"bordered",color:"danger",class:{base:_.bordered.danger}},{variant:"flat",color:"default",class:{base:_.flat.default}},{variant:"flat",color:"primary",class:{base:_.flat.primary}},{variant:"flat",color:"secondary",class:{base:_.flat.secondary}},{variant:"flat",color:"success",class:{base:_.flat.success}},{variant:"flat",color:"warning",class:{base:_.flat.warning}},{variant:"flat",color:"danger",class:{base:_.flat.danger}},{variant:"faded",color:"default",class:{base:_.faded.default}},{variant:"faded",color:"primary",class:{base:_.faded.primary}},{variant:"faded",color:"secondary",class:{base:_.faded.secondary}},{variant:"faded",color:"success",class:{base:_.faded.success}},{variant:"faded",color:"warning",class:{base:_.faded.warning}},{variant:"faded",color:"danger",class:{base:_.faded.danger}},{variant:"light",color:"default",class:{base:_.light.default}},{variant:"light",color:"primary",class:{base:_.light.primary}},{variant:"light",color:"secondary",class:{base:_.light.secondary}},{variant:"light",color:"success",class:{base:_.light.success}},{variant:"light",color:"warning",class:{base:_.light.warning}},{variant:"light",color:"danger",class:{base:_.light.danger}},{isOneChar:!0,hasStartContent:!1,hasEndContent:!1,size:"sm",class:{base:"w-5 h-5 min-w-5 min-h-5"}},{isOneChar:!0,hasStartContent:!1,hasEndContent:!1,size:"md",class:{base:"w-6 h-6 min-w-6 min-h-6"}},{isOneChar:!0,hasStartContent:!1,hasEndContent:!1,size:"lg",class:{base:"w-7 h-7 min-w-7 min-h-7"}},{isOneChar:!0,isCloseable:!1,hasStartContent:!1,hasEndContent:!1,class:{base:"px-0 justify-center",content:"px-0 flex-none"}},{isOneChar:!0,isCloseable:!0,hasStartContent:!1,hasEndContent:!1,class:{base:"w-auto"}},{isOneChar:!0,variant:"dot",class:{base:"w-auto h-7 px-1 items-center",content:"px-2"}},{hasStartContent:!0,size:"sm",class:{content:"pl-0.5"}},{hasStartContent:!0,size:["md","lg"],class:{content:"pl-1"}},{hasEndContent:!0,size:"sm",class:{content:"pr-0.5"}},{hasEndContent:!0,size:["md","lg"],class:{content:"pr-1"}}]}),ur={ease:[.36,.66,.4,1]},hn={scaleSpring:{enter:{transform:"scale(1)",opacity:1,transition:{type:"spring",bounce:0,duration:.2}},exit:{transform:"scale(0.85)",opacity:0,transition:{type:"easeOut",duration:.15}}},scaleSpringOpacity:{initial:{opacity:0,transform:"scale(0.8)"},enter:{opacity:1,transform:"scale(1)",transition:{type:"spring",bounce:0,duration:.3}},exit:{opacity:0,transform:"scale(0.96)",transition:{type:"easeOut",bounce:0,duration:.15}}},fade:{enter:{opacity:1,transition:{duration:.4,ease:ur.ease}},exit:{opacity:0,transition:{duration:.3,ease:ur.ease}}}},_i=e=>{const n={top:{originY:1},bottom:{originY:0},left:{originX:1},right:{originX:0},"top-start":{originX:0,originY:1},"top-end":{originX:1,originY:1},"bottom-start":{originX:0,originY:0},"bottom-end":{originX:1,originY:0},"right-start":{originX:0,originY:0},"right-end":{originX:0,originY:1},"left-start":{originX:1,originY:0},"left-end":{originX:1,originY:1}};return n?.[e]||{}},Li=e=>({top:"top",bottom:"bottom",left:"left",right:"right","top-start":"top start","top-end":"top end","bottom-start":"bottom start","bottom-end":"bottom end","left-start":"left top","left-end":"left bottom","right-start":"right top","right-end":"right bottom"})[e],Ro=(e,n)=>{if(n.includes("-")){const[t]=n.split("-");if(t.includes(e))return!1}return!0},Rt=(e,n)=>{if(n.includes("-")){const[,t]=n.split("-");return`${e}-${t}`}return e},it=new WeakMap,xe=[];function Fo(e,n=document.body){let t=new Set(e),r=new Set,i=u=>{for(let f of u.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))t.add(f);let l=f=>{if(t.has(f)||f.parentElement&&r.has(f.parentElement)&&f.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let h of t)if(f.contains(h))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},c=document.createTreeWalker(u,NodeFilter.SHOW_ELEMENT,{acceptNode:l}),d=l(u);if(d===NodeFilter.FILTER_ACCEPT&&a(u),d!==NodeFilter.FILTER_REJECT){let f=c.nextNode();for(;f!=null;)a(f),f=c.nextNode()}},a=u=>{var l;let c=(l=it.get(u))!=null?l:0;u.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&u.setAttribute("aria-hidden","true"),r.add(u),it.set(u,c+1))};xe.length&&xe[xe.length-1].disconnect(),i(n);let s=new MutationObserver(u=>{for(let l of u)if(!(l.type!=="childList"||l.addedNodes.length===0)&&![...t,...r].some(c=>c.contains(l.target))){for(let c of l.removedNodes)c instanceof Element&&(t.delete(c),r.delete(c));for(let c of l.addedNodes)(c instanceof HTMLElement||c instanceof SVGElement)&&(c.dataset.liveAnnouncer==="true"||c.dataset.reactAriaTopLayer==="true")?t.add(c):c instanceof Element&&i(c)}});s.observe(n,{childList:!0,subtree:!0});let o={visibleNodes:t,hiddenNodes:r,observe(){s.observe(n,{childList:!0,subtree:!0})},disconnect(){s.disconnect()}};return xe.push(o),()=>{s.disconnect();for(let u of r){let l=it.get(u);l!=null&&(l===1?(u.removeAttribute("aria-hidden"),it.delete(u)):it.set(u,l-1))}o===xe[xe.length-1]?(xe.pop(),xe.length&&xe[xe.length-1].observe()):xe.splice(xe.indexOf(o),1)}}function To(e){let n=xe[xe.length-1];if(n&&!n.visibleNodes.has(e))return n.visibleNodes.add(e),()=>{n.visibleNodes.delete(e)}}var Do=(e,n,t)=>{const r=n?.current;if(!r||!r.contains(e)){const i=document.querySelectorAll("body > span[data-focus-scope-start]");let a=[];if(i.forEach(s=>{a.push(s.nextElementSibling)}),a.length===1)return t.close(),!1}return!r||!r.contains(e)},[Uh,_o]=jn({name:"ButtonGroupContext",strict:!1}),Lo=()=>Je(()=>import("./index-t24aGwla.js"),__vite__mapDeps([0,1,2])).then(e=>e.default),zi=e=>{const{ripples:n=[],motionProps:t,color:r="currentColor",style:i,onClear:a}=e;return p.jsx(p.Fragment,{children:n.map(s=>{const o=qa(.01*s.size,.2,s.size>100?.75:.5);return p.jsx(Nt,{features:Lo,children:p.jsx(Sn,{mode:"popLayout",children:p.jsx(At.span,{animate:{transform:"scale(2)",opacity:0},className:"heroui-ripple",exit:{opacity:0},initial:{transform:"scale(0)",opacity:.35},style:{position:"absolute",backgroundColor:r,borderRadius:"100%",transformOrigin:"center",pointerEvents:"none",overflow:"hidden",inset:0,zIndex:0,top:s.y,left:s.x,width:`${s.size}px`,height:`${s.size}px`,...i},transition:{duration:o},onAnimationComplete:()=>{a(s.key)},...t})})},s.key)})})};zi.displayName="HeroUI.Ripple";var zo=zi;function Oo(e={}){const[n,t]=y.useState([]),r=y.useCallback(a=>{const s=a.target,o=Math.max(s.clientWidth,s.clientHeight);t(u=>[...u,{key:Ga(u.length.toString()),size:o,x:a.x-o/2,y:a.y-o/2}])},[]),i=y.useCallback(a=>{t(s=>s.filter(o=>o.key!==a))},[]);return{ripples:n,onClear:i,onPress:r,...e}}function Mo(e){var n,t,r,i,a,s,o,u,l;const c=_o(),d=zt(),f=!!c,{ref:h,as:x,children:w,startContent:k,endContent:b,autoFocus:C,className:j,spinner:I,isLoading:E=!1,disableRipple:v=!1,fullWidth:B=(n=c?.fullWidth)!=null?n:!1,radius:$=c?.radius,size:V=(t=c?.size)!=null?t:"md",color:S=(r=c?.color)!=null?r:"default",variant:z=(i=c?.variant)!=null?i:"solid",disableAnimation:R=(s=(a=c?.disableAnimation)!=null?a:d?.disableAnimation)!=null?s:!1,isDisabled:L=(o=c?.isDisabled)!=null?o:!1,isIconOnly:D=(u=c?.isIconOnly)!=null?u:!1,spinnerPlacement:F="start",onPress:O,onClick:H,...Y}=e,X=x||"button",g=typeof X=="string",ee=En(h),J=(l=v||d?.disableRipple)!=null?l:R,{isFocusVisible:m,isFocused:T,focusProps:P}=Nn({autoFocus:C}),M=L||E,q=y.useMemo(()=>Po({size:V,color:S,variant:z,radius:$,fullWidth:B,isDisabled:M,isInGroup:f,disableAnimation:R,isIconOnly:D,className:j}),[V,S,z,$,B,M,f,D,R,j]),{onPress:Q,onClear:K,ripples:te}=Oo(),oe=y.useCallback(we=>{J||M||R||ee.current&&Q(we)},[J,M,R,ee,Q]),{buttonProps:pe,isPressed:ae}=xi({elementType:x,isDisabled:M,onPress:Wa(O,oe),onClick:H,...Y},ee),{isHovered:je,hoverProps:le}=Ya({isDisabled:M}),ue=y.useCallback((we={})=>({"data-disabled":se(M),"data-focus":se(T),"data-pressed":se(ae),"data-focus-visible":se(m),"data-hover":se(je),"data-loading":se(E),...be(pe,P,le,Xn(Y,{enabled:g}),Xn(we)),className:q}),[E,M,T,ae,g,m,je,pe,P,le,Y,q]),he=we=>y.isValidElement(we)?y.cloneElement(we,{"aria-hidden":!0,focusable:!1}):null,Ne=he(k),ye=he(b),_e=y.useMemo(()=>({sm:"sm",md:"sm",lg:"md"})[V],[V]),Me=y.useCallback(()=>({ripples:te,onClear:K}),[te,K]);return{Component:X,children:w,domRef:ee,spinner:I,styles:q,startContent:Ne,endContent:ye,isLoading:E,spinnerPlacement:F,spinnerSize:_e,disableRipple:J,getButtonProps:ue,getRippleProps:Me,isIconOnly:D}}function $o(e){var n,t;const[r,i]=Ot(e,or.variantKeys),a=zt(),s=(t=(n=e?.variant)!=null?n:a?.spinnerVariant)!=null?t:"default",{children:o,className:u,classNames:l,label:c,...d}=r,f=y.useMemo(()=>or({...i}),[Lt(i)]),h=ze(l?.base,u),x=c||o,w=y.useMemo(()=>x&&typeof x=="string"?x:d["aria-label"]?"":"Loading",[o,x,d["aria-label"]]),k=y.useCallback(()=>({"aria-label":w,className:f.base({class:h}),...d}),[w,f,h,d]);return{label:x,slots:f,classNames:l,variant:s,getSpinnerProps:k}}var Oi=mt((e,n)=>{const{slots:t,classNames:r,label:i,variant:a,getSpinnerProps:s}=$o({...e});return a==="wave"||a==="dots"?p.jsxs("div",{ref:n,...s(),children:[p.jsx("div",{className:t.wrapper({class:r?.wrapper}),children:[...new Array(3)].map((o,u)=>p.jsx("i",{className:t.dots({class:r?.dots}),style:{"--dot-index":u}},`dot-${u}`))}),i&&p.jsx("span",{className:t.label({class:r?.label}),children:i})]}):a==="simple"?p.jsxs("div",{ref:n,...s(),children:[p.jsxs("svg",{className:t.wrapper({class:r?.wrapper}),fill:"none",viewBox:"0 0 24 24",children:[p.jsx("circle",{className:t.circle1({class:r?.circle1}),cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),p.jsx("path",{className:t.circle2({class:r?.circle2}),d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z",fill:"currentColor"})]}),i&&p.jsx("span",{className:t.label({class:r?.label}),children:i})]}):a==="spinner"?p.jsxs("div",{ref:n,...s(),children:[p.jsx("div",{className:t.wrapper({class:r?.wrapper}),children:[...new Array(12)].map((o,u)=>p.jsx("i",{className:t.spinnerBars({class:r?.spinnerBars}),style:{"--bar-index":u}},`star-${u}`))}),i&&p.jsx("span",{className:t.label({class:r?.label}),children:i})]}):p.jsxs("div",{ref:n,...s(),children:[p.jsxs("div",{className:t.wrapper({class:r?.wrapper}),children:[p.jsx("i",{className:t.circle1({class:r?.circle1})}),p.jsx("i",{className:t.circle2({class:r?.circle2})})]}),i&&p.jsx("span",{className:t.label({class:r?.label}),children:i})]})});Oi.displayName="HeroUI.Spinner";var Rn=Oi,Mi=mt((e,n)=>{const{Component:t,domRef:r,children:i,spinnerSize:a,spinner:s=p.jsx(Rn,{color:"current",size:a}),spinnerPlacement:o,startContent:u,endContent:l,isLoading:c,disableRipple:d,getButtonProps:f,getRippleProps:h,isIconOnly:x}=Mo({...e,ref:n});return p.jsxs(t,{ref:r,...f(),children:[u,c&&o==="start"&&s,c&&x?null:i,c&&o==="end"&&s,l,!d&&p.jsx(zo,{...h()})]})});Mi.displayName="HeroUI.Button";var Xe=Mi;function Bo(e){const[n,t]=Ot(e,lr.variantKeys),{ref:r,as:i,children:a,avatar:s,startContent:o,endContent:u,onClose:l,classNames:c,className:d,...f}=n,h=i||"div",x=En(r),w=ze(c?.base,d),k=!!l,b=e.variant==="dot",{focusProps:C,isFocusVisible:j}=Nn(),I=y.useMemo(()=>typeof a=="string"&&a?.length===1,[a]),E=y.useMemo(()=>!!s||!!o,[s,o]),v=y.useMemo(()=>!!u||k,[u,k]),B=y.useMemo(()=>lr({...t,hasStartContent:E,hasEndContent:v,isOneChar:I,isCloseable:k,isCloseButtonFocusVisible:j}),[Lt(t),j,E,v,I,k]),{pressProps:$}=Xa({isDisabled:!!e?.isDisabled,onPress:l}),V=()=>({ref:x,className:B.base({class:w}),...f}),S=()=>({role:"button",tabIndex:0,className:B.closeButton({class:c?.closeButton}),"aria-label":"close chip",...be($,C)}),z=L=>y.isValidElement(L)?y.cloneElement(L,{className:B.avatar({class:c?.avatar})}):null,R=L=>y.isValidElement(L)?y.cloneElement(L,{className:ze("max-h-[80%]",L.props.className)}):null;return{Component:h,children:a,slots:B,classNames:c,isDot:b,isCloseable:k,startContent:z(s)||R(o),endContent:R(u),getCloseButtonProps:S,getChipProps:V}}var $i=mt((e,n)=>{const{Component:t,children:r,slots:i,classNames:a,isDot:s,isCloseable:o,startContent:u,endContent:l,getCloseButtonProps:c,getChipProps:d}=Bo({...e,ref:n}),f=y.useMemo(()=>s&&!u?p.jsx("span",{className:i.dot({class:a?.dot})}):u,[i,u,s]),h=y.useMemo(()=>o?p.jsx("span",{...c(),children:l||p.jsx(Qa,{})}):l,[l,o,c]);return p.jsxs(t,{...d(),children:[f,p.jsx("span",{className:i.content({class:a?.content}),children:r}),h]})});$i.displayName="HeroUI.Chip";var Vo=$i;function Ho(e){var n,t;const r=zt(),[i,a]=Ot(e,Pt.variantKeys),{ref:s,as:o,isOpen:u,content:l,children:c,defaultOpen:d,onOpenChange:f,isDisabled:h,trigger:x,shouldFlip:w=!0,containerPadding:k=12,placement:b="top",delay:C=0,closeDelay:j=500,showArrow:I=!1,offset:E=7,crossOffset:v=0,isDismissable:B,shouldCloseOnBlur:$=!0,portalContainer:V,isKeyboardDismissDisabled:S=!1,updatePositionDeps:z=[],shouldCloseOnInteractOutside:R,className:L,onClose:D,motionProps:F,classNames:O,...H}=i,Y=o||"div",X=(t=(n=e?.disableAnimation)!=null?n:r?.disableAnimation)!=null?t:!1,g=Ja({delay:C,closeDelay:j,isDisabled:h,defaultOpen:d,isOpen:u,onOpenChange:ue=>{f?.(ue),ue||D?.()}}),ee=y.useRef(null),J=y.useRef(null),m=y.useId(),T=g.isOpen&&!h;y.useImperativeHandle(s,()=>Ka(J));const{triggerProps:P,tooltipProps:M}=Za({isDisabled:h,trigger:x},g,ee),{tooltipProps:q}=es({isOpen:T,...be(i,M)},g),{overlayProps:Q,placement:K,updatePosition:te}=bi({isOpen:T,targetRef:ee,placement:Li(b),overlayRef:J,offset:I?E+3:E,crossOffset:v,shouldFlip:w,containerPadding:k});yi(()=>{z.length&&te()},z);const{overlayProps:oe}=wi({isOpen:T,onClose:g.close,isDismissable:B,shouldCloseOnBlur:$,isKeyboardDismissDisabled:S,shouldCloseOnInteractOutside:R},J),pe=y.useMemo(()=>{var ue,he,Ne;return Pt({...a,disableAnimation:X,radius:(ue=e?.radius)!=null?ue:"md",size:(he=e?.size)!=null?he:"md",shadow:(Ne=e?.shadow)!=null?Ne:"sm"})},[Lt(a),X,e?.radius,e?.size,e?.shadow]),ae=y.useCallback((ue={},he=null)=>({...be(P,ue),ref:ts(he,ee),"aria-describedby":T?m:void 0}),[P,T,m,g]),je=y.useCallback(()=>({ref:J,"data-slot":"base","data-open":se(T),"data-arrow":se(I),"data-disabled":se(h),"data-placement":Rt(K||"top",b),...be(q,oe,H),style:be(Q.style,H.style,i.style),className:pe.base({class:O?.base}),id:m}),[pe,T,I,h,K,b,q,oe,H,Q,i,m]),le=y.useCallback(()=>({"data-slot":"content","data-open":se(T),"data-arrow":se(I),"data-disabled":se(h),"data-placement":Rt(K||"top",b),className:pe.content({class:ze(O?.content,L)})}),[pe,T,I,h,K,b,O]);return{Component:Y,content:l,children:c,isOpen:T,triggerRef:ee,showArrow:I,portalContainer:V,placement:b,disableAnimation:X,isDisabled:h,motionProps:F,getTooltipContentProps:le,getTriggerProps:ae,getTooltipProps:je}}var Uo=()=>Je(()=>import("./index-t24aGwla.js"),__vite__mapDeps([0,1,2])).then(e=>e.default),Bi=mt((e,n)=>{var t;const{Component:r,children:i,content:a,isOpen:s,portalContainer:o,placement:u,disableAnimation:l,motionProps:c,getTriggerProps:d,getTooltipProps:f,getTooltipContentProps:h}=Ho({...e,ref:n});let x;try{if(y.Children.count(i)!==1)throw new Error;if(!y.isValidElement(i))x=p.jsx("p",{...d(),children:i});else{const E=i,v=(t=E.props.ref)!=null?t:E.ref;x=y.cloneElement(E,d(E.props,v))}}catch{x=p.jsx("span",{}),ns("Tooltip must have only one child node. Please, check your code.")}const{ref:w,id:k,style:b,...C}=f(),j=p.jsx("div",{ref:w,id:k,style:b,children:p.jsx(At.div,{animate:"enter",exit:"exit",initial:"exit",variants:hn.scaleSpring,...be(c,C),style:{..._i(u)},children:p.jsx(r,{...h(),children:a})},`${k}-tooltip-inner`)},`${k}-tooltip-content`);return p.jsxs(p.Fragment,{children:[x,l?s&&p.jsx(Qn,{portalContainer:o,children:p.jsx("div",{ref:w,id:k,style:b,...C,children:p.jsx(r,{...h(),children:a})})}):p.jsx(Nt,{features:Uo,children:p.jsx(Sn,{children:s&&p.jsx(Qn,{portalContainer:o,children:j})})})]})});Bi.displayName="HeroUI.Tooltip";var qo=Bi;function Go(e,n){const{groupRef:t,triggerRef:r,popoverRef:i,showArrow:a,offset:s=7,crossOffset:o=0,scrollRef:u,shouldFlip:l,boundaryElement:c,isDismissable:d=!0,shouldCloseOnBlur:f=!0,shouldCloseOnScroll:h=!0,placement:x="top",containerPadding:w,shouldCloseOnInteractOutside:k,isNonModal:b,isKeyboardDismissDisabled:C,updatePositionDeps:j=[],...I}=e,E=b??!0,v=I.trigger==="SubmenuTrigger",{overlayProps:B,underlayProps:$}=wi({isOpen:n.isOpen,onClose:n.close,shouldCloseOnBlur:f,isDismissable:d||v,isKeyboardDismissDisabled:C,shouldCloseOnInteractOutside:k||(L=>Do(L,r,n))},i),{overlayProps:V,arrowProps:S,placement:z,updatePosition:R}=bi({...I,shouldFlip:l,crossOffset:o,targetRef:r,overlayRef:i,isOpen:n.isOpen,scrollRef:u,boundaryElement:c,containerPadding:w,placement:Li(x),offset:a?s+3:s,onClose:E&&!v&&h?n.close:()=>{}});return yi(()=>{j.length&&R()},j),y.useEffect(()=>{var L,D;if(n.isOpen&&i.current)return E?To((L=t?.current)!=null?L:i.current):Fo([(D=t?.current)!=null?D:i.current])},[E,n.isOpen,i,t]),{popoverProps:be(B,V),arrowProps:S,underlayProps:$,placement:z}}var Wo="top";function Yo(e){var n,t,r;const i=zt(),[a,s]=Ot(e,Pt.variantKeys),{as:o,ref:u,children:l,state:c,triggerRef:d,scrollRef:f,defaultOpen:h,onOpenChange:x,isOpen:w,isNonModal:k=!0,shouldFlip:b=!0,containerPadding:C=12,shouldBlockScroll:j=!1,isDismissable:I=!0,shouldCloseOnBlur:E,portalContainer:v,updatePositionDeps:B,dialogProps:$,placement:V=Wo,triggerType:S="dialog",showArrow:z=!1,offset:R=7,crossOffset:L=0,boundaryElement:D,isKeyboardDismissDisabled:F,shouldCloseOnInteractOutside:O,shouldCloseOnScroll:H,motionProps:Y,className:X,classNames:g,onClose:ee,...J}=a,m=o||"div",T=En(u),P=y.useRef(null),M=y.useRef(!1),q=d||P,Q=(t=(n=e.disableAnimation)!=null?n:i?.disableAnimation)!=null?t:!1,K=rs({isOpen:w,defaultOpen:h,onOpenChange:A=>{x?.(A),A||ee?.()}}),te=c||K,{popoverProps:oe,underlayProps:pe,placement:ae}=Go({triggerRef:q,isNonModal:k,popoverRef:T,placement:V,offset:R,scrollRef:f,isDismissable:I,shouldCloseOnBlur:E,boundaryElement:D,crossOffset:L,shouldFlip:b,containerPadding:C,updatePositionDeps:B,isKeyboardDismissDisabled:F,shouldCloseOnScroll:H,shouldCloseOnInteractOutside:O},te),je=y.useMemo(()=>ae?Ro(ae,V)?ae:V:null,[ae,V]),{triggerProps:le}=is({type:S},te,q),{isFocusVisible:ue,isFocused:he,focusProps:Ne}=Nn(),ye=y.useMemo(()=>Pt({...s}),[Lt(s)]),_e=ze(g?.base,X);as({isDisabled:!(j&&te.isOpen)});const Me=(A={})=>({ref:T,...be(oe,J,A),style:be(oe.style,J.style,A.style)}),we=(A={})=>({"data-slot":"base","data-open":se(te.isOpen),"data-focus":se(he),"data-arrow":se(z),"data-focus-visible":se(ue),"data-placement":ae?Rt(ae,V):void 0,...be(Ne,$,A),className:ye.base({class:ze(_e)}),style:{outline:"none"}}),Ze=y.useCallback((A={})=>({"data-slot":"content","data-open":se(te.isOpen),"data-arrow":se(z),"data-placement":ae?Rt(ae,V):void 0,className:ye.content({class:ze(g?.content,A.className)})}),[ye,te.isOpen,z,je,V,g,ae]),He=y.useCallback(A=>{var U;let W;return A.pointerType==="touch"&&(e?.backdrop==="blur"||e?.backdrop==="opaque")?W=setTimeout(()=>{M.current=!0},100):M.current=!0,(U=le.onPress)==null||U.call(le,A),()=>{clearTimeout(W)}},[le?.onPress]),et=y.useCallback((A={},U=null)=>{const{isDisabled:W,...re}=A;return{"data-slot":"trigger",...be({"aria-haspopup":"dialog"},le,re),onPress:He,isDisabled:W,className:ye.trigger({class:ze(g?.trigger,A.className),isTriggerDisabled:W}),ref:ss(U,q)}},[te,le,He,q]),N=y.useCallback((A={})=>({"data-slot":"backdrop",className:ye.backdrop({class:g?.backdrop}),onClick:U=>{if(!M.current){U.preventDefault();return}te.close(),M.current=!1},...pe,...A}),[ye,te.isOpen,g,pe]);return y.useEffect(()=>{if(te.isOpen&&T?.current)return os([T?.current])},[te.isOpen,T]),{state:te,Component:m,children:l,classNames:g,showArrow:z,triggerRef:q,placement:je,isNonModal:k,popoverRef:T,portalContainer:v,isOpen:te.isOpen,onClose:te.close,disableAnimation:Q,shouldBlockScroll:j,backdrop:(r=e.backdrop)!=null?r:"transparent",motionProps:Y,getBackdropProps:N,getPopoverProps:Me,getTriggerProps:et,getDialogProps:we,getContentProps:Ze}}var[Xo,Vi]=jn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Popover />`"}),cr=()=>Je(()=>import("./index-t24aGwla.js"),__vite__mapDeps([0,1,2])).then(e=>e.default),Hi=e=>{const{as:n,children:t,className:r,...i}=e,{Component:a,placement:s,backdrop:o,motionProps:u,disableAnimation:l,getPopoverProps:c,getDialogProps:d,getBackdropProps:f,getContentProps:h,isNonModal:x,onClose:w}=Vi(),k=y.useRef(null),{dialogProps:b,titleProps:C}=ls({},k),j=d({ref:k,...b,...i}),I=n||a||"div",E=p.jsxs(p.Fragment,{children:[!x&&p.jsx(Jn,{onDismiss:w}),p.jsx(I,{...j,children:p.jsx("div",{...h({className:r}),children:typeof t=="function"?t(C):t})}),p.jsx(Jn,{onDismiss:w})]}),v=y.useMemo(()=>o==="transparent"?null:l?p.jsx("div",{...f()}):p.jsx(Nt,{features:cr,children:p.jsx(At.div,{animate:"enter",exit:"exit",initial:"exit",variants:hn.fade,...f()})}),[o,l,f]),B=s?_i(s==="center"?"top":s):void 0,$=p.jsx(p.Fragment,{children:l?E:p.jsx(Nt,{features:cr,children:p.jsx(At.div,{animate:"enter",exit:"exit",initial:"initial",style:B,variants:hn.scaleSpringOpacity,...u,children:E})})});return p.jsxs("div",{...c(),children:[v,$]})};Hi.displayName="HeroUI.PopoverContent";var dr=Hi,Ui=e=>{var n;const{triggerRef:t,getTriggerProps:r}=Vi(),{children:i,...a}=e,s=y.useMemo(()=>typeof i=="string"?p.jsx("p",{children:i}):y.Children.only(i),[i]),o=(n=s.props.ref)!=null?n:s.ref,{onPress:u,isDisabled:l,...c}=y.useMemo(()=>r(be(a,s.props),o),[r,s.props,a,o]),[,d]=us(i,Xe),{buttonProps:f}=xi({onPress:u,isDisabled:l},t),h=y.useMemo(()=>d?.[0]!==void 0,[d]);return h||delete c.preventFocusOnPress,y.cloneElement(s,be(c,h?{onPress:u,isDisabled:l}:f))};Ui.displayName="HeroUI.PopoverTrigger";var fr=Ui,qi=mt((e,n)=>{const{children:t,...r}=e,i=Yo({...r,ref:n}),[a,s]=y.Children.toArray(t),o=p.jsx(cs,{portalContainer:i.portalContainer,children:s});return p.jsxs(Xo,{value:i,children:[a,i.disableAnimation&&i.isOpen?o:p.jsx(Sn,{children:i.isOpen?o:null})]})});qi.displayName="HeroUI.Popover";var pr=qi;const Qo={play:Ai,sparkles:go,code:In,brush:co,zap:Ks,settings:Ci,layers:bo},Jo=({navigation:e,className:n=""})=>{const t=ds(),i=ki().pathname.replace(/^\/docs\/?/,""),[a,s]=y.useState(!0),[o,u]=y.useState(new Set),[l,c]=y.useState(new Set);y.useEffect(()=>{for(const w of e)for(const k of w.pages){if(k.path===i){u(b=>new Set(b).add(w.id));return}if(k.children){for(const b of k.children)if(b.path===i){u(C=>new Set(C).add(w.id)),c(C=>new Set(C).add(k.id));return}}}},[i,e]),y.useEffect(()=>{const w=()=>{s(window.innerWidth>=1024)};return w(),window.addEventListener("resize",w),()=>window.removeEventListener("resize",w)},[]);const d=w=>{u(k=>{const b=new Set(k);return b.has(w)?b.delete(w):b.add(w),b})},f=w=>{c(k=>{const b=new Set(k);return b.has(w)?b.delete(w):b.add(w),b})},h=w=>{t(`/docs/${w}`),window.innerWidth<1024&&s(!1)},x=(w,k=0)=>{const b=!!w.path,C=!!(w.children&&w.children.length>0),j=b&&w.path===i,I=b?cn(w.id):!0,E=l.has(w.id),v=fs(w.id)?.description,B=p.jsxs("button",{onClick:()=>{b&&I?h(w.path):C&&f(w.id)},className:`
|
|
3
|
+
w-full text-left text-sm py-1.5 px-3 rounded-md transition-colors flex items-center gap-2
|
|
4
|
+
${k>0?"ml-4":""}
|
|
5
|
+
${j?"bg-white/10 text-white font-medium":I?"text-white/70 hover:text-white hover:bg-white/5":"text-white/30 cursor-default"}
|
|
6
|
+
`,children:[C&&(E?p.jsx(Kn,{className:"w-3 h-3 flex-shrink-0"}):p.jsx(Zn,{className:"w-3 h-3 flex-shrink-0"})),p.jsx("span",{className:"flex-1 truncate",children:w.title}),b&&!I&&p.jsx(Vo,{size:"sm",variant:"flat",className:"text-[10px] h-4 min-w-0 bg-white/5 text-white/30",children:"Soon"})]});return p.jsxs("div",{children:[v?p.jsx(qo,{content:v,placement:"right",delay:400,classNames:{content:"max-w-xs text-xs text-white/80 bg-neutral-900 border border-white/10 px-3 py-2"},children:B}):B,C&&E&&p.jsx("div",{className:"mt-0.5",children:w.children.map($=>x($,k+1))})]},w.id)};return p.jsxs(p.Fragment,{children:[p.jsx(Xe,{isIconOnly:!0,variant:"flat",size:"sm",className:"fixed top-4 left-4 z-50 bg-black/60 backdrop-blur-sm text-white border border-white/10",onPress:()=>s(!a),"aria-label":a?"Close navigation":"Open navigation",children:a?p.jsx(vi,{className:"w-5 h-5"}):p.jsx(Qs,{className:"w-5 h-5"})}),p.jsx("aside",{className:`
|
|
7
|
+
fixed top-0 left-0 h-full z-40 bg-black/95 backdrop-blur-md border-r border-white/10
|
|
8
|
+
transition-transform duration-300 ease-in-out w-72 pt-16
|
|
9
|
+
${a?"translate-x-0":"-translate-x-full"}
|
|
10
|
+
${n}
|
|
11
|
+
`,children:p.jsxs("div",{className:"h-full overflow-y-auto px-3 pb-8",children:[p.jsxs("div",{className:"mb-4 px-3",children:[p.jsx("h2",{className:"text-white font-semibold text-lg",children:"Viji Docs"}),p.jsx("p",{className:"text-white/40 text-xs",children:"Scene API Reference"})]}),p.jsx("nav",{className:"space-y-4",children:e.map(w=>{const k=Qo[w.icon||""]||In,b=o.has(w.id);return p.jsxs("div",{children:[p.jsxs("button",{onClick:()=>d(w.id),className:"w-full flex items-center gap-2 px-3 py-2 text-white/90 hover:text-white transition-colors",children:[p.jsx(k,{className:"w-4 h-4 text-primary-400"}),p.jsx("span",{className:"text-sm font-medium flex-1 text-left",children:w.title}),b?p.jsx(Kn,{className:"w-3.5 h-3.5 text-white/40"}):p.jsx(Zn,{className:"w-3.5 h-3.5 text-white/40"})]}),b&&p.jsx("div",{className:"mt-1 space-y-0.5",children:w.pages.map(C=>x(C))})]},w.id)})})]})}),a&&p.jsx("div",{className:"fixed inset-0 z-30 bg-black/50 lg:hidden",onClick:()=>s(!1)})]})};const Ko=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Zo=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,el={};function hr(e,n){return(el.jsx?Zo:Ko).test(e)}const tl={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"};var Ge={},Wt,mr;function nl(){if(mr)return Wt;mr=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,o=/^\s+|\s+$/g,u=`
|
|
12
|
+
`,l="/",c="*",d="",f="comment",h="declaration";function x(k,b){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];b=b||{};var C=1,j=1;function I(D){var F=D.match(n);F&&(C+=F.length);var O=D.lastIndexOf(u);j=~O?D.length-O:j+D.length}function E(){var D={line:C,column:j};return function(F){return F.position=new v(D),V(),F}}function v(D){this.start=D,this.end={line:C,column:j},this.source=b.source}v.prototype.content=k;function B(D){var F=new Error(b.source+":"+C+":"+j+": "+D);if(F.reason=D,F.filename=b.source,F.line=C,F.column=j,F.source=k,!b.silent)throw F}function $(D){var F=D.exec(k);if(F){var O=F[0];return I(O),k=k.slice(O.length),F}}function V(){$(t)}function S(D){var F;for(D=D||[];F=z();)F!==!1&&D.push(F);return D}function z(){var D=E();if(!(l!=k.charAt(0)||c!=k.charAt(1))){for(var F=2;d!=k.charAt(F)&&(c!=k.charAt(F)||l!=k.charAt(F+1));)++F;if(F+=2,d===k.charAt(F-1))return B("End of comment missing");var O=k.slice(2,F-2);return j+=2,I(O),k=k.slice(F),j+=2,D({type:f,comment:O})}}function R(){var D=E(),F=$(r);if(F){if(z(),!$(i))return B("property missing ':'");var O=$(a),H=D({type:h,property:w(F[0].replace(e,d)),value:O?w(O[0].replace(e,d)):d});return $(s),H}}function L(){var D=[];S(D);for(var F;F=R();)F!==!1&&(D.push(F),S(D));return D}return V(),L()}function w(k){return k?k.replace(o,d):d}return Wt=x,Wt}var gr;function rl(){if(gr)return Ge;gr=1;var e=Ge&&Ge.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.default=t;const n=e(nl());function t(r,i){let a=null;if(!r||typeof r!="string")return a;const s=(0,n.default)(r),o=typeof i=="function";return s.forEach(u=>{if(u.type!=="declaration")return;const{property:l,value:c}=u;o?i(l,c,u):c&&(a=a||{},a[l]=c)}),a}return Ge}var at={},xr;function il(){if(xr)return at;xr=1,Object.defineProperty(at,"__esModule",{value:!0}),at.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(l){return!l||t.test(l)||e.test(l)},s=function(l,c){return c.toUpperCase()},o=function(l,c){return"".concat(c,"-")},u=function(l,c){return c===void 0&&(c={}),a(l)?l:(l=l.toLowerCase(),c.reactCompat?l=l.replace(i,o):l=l.replace(r,o),l.replace(n,s))};return at.camelCase=u,at}var st,br;function al(){if(br)return st;br=1;var e=st&&st.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},n=e(rl()),t=il();function r(i,a){var s={};return!i||typeof i!="string"||(0,n.default)(i,function(o,u){o&&u&&(s[(0,t.camelCase)(o,a)]=u)}),s}return r.default=r,st=r,st}var sl=al();const ol=ji(sl),Gi=Wi("end"),Fn=Wi("start");function Wi(e){return n;function n(t){const r=t&&t.position&&t.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function ll(e){const n=Fn(e),t=Gi(e);if(n&&t)return{start:n,end:t}}function ut(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?yr(e.position):"start"in e||"end"in e?yr(e):"line"in e||"column"in e?mn(e):""}function mn(e){return wr(e&&e.line)+":"+wr(e&&e.column)}function yr(e){return mn(e&&e.start)+"-"+mn(e&&e.end)}function wr(e){return e&&typeof e=="number"?e:1}class de extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",a={},s=!1;if(t&&("line"in t&&"column"in t?a={place:t}:"start"in t&&"end"in t?a={place:t}:"type"in t?a={ancestors:[t],place:t.position}:a={...t}),typeof n=="string"?i=n:!a.cause&&n&&(s=!0,i=n.message,a.cause=n),!a.ruleId&&!a.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?a.ruleId=r:(a.source=r.slice(0,u),a.ruleId=r.slice(u+1))}if(!a.place&&a.ancestors&&a.ancestors){const u=a.ancestors[a.ancestors.length-1];u&&(a.place=u.position)}const o=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=o?o.line:void 0,this.name=ut(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}de.prototype.file="";de.prototype.name="";de.prototype.reason="";de.prototype.message="";de.prototype.stack="";de.prototype.column=void 0;de.prototype.line=void 0;de.prototype.ancestors=void 0;de.prototype.cause=void 0;de.prototype.fatal=void 0;de.prototype.place=void 0;de.prototype.ruleId=void 0;de.prototype.source=void 0;const Tn={}.hasOwnProperty,ul=new Map,cl=/[A-Z]/g,dl=new Set(["table","tbody","thead","tfoot","tr"]),fl=new Set(["td","th"]),Yi="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function pl(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=kl(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=wl(t,n.jsx,n.jsxs)}const i={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?An:$s,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},a=Xi(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Xi(e,n,t){if(n.type==="element")return hl(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return ml(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return xl(e,n,t);if(n.type==="mdxjsEsm")return gl(e,n);if(n.type==="root")return bl(e,n,t);if(n.type==="text")return yl(e,n)}function hl(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=An,e.schema=i),e.ancestors.push(n);const a=Ji(e,n.tagName,!1),s=vl(e,n);let o=_n(e,n);return dl.has(n.tagName)&&(o=o.filter(function(u){return typeof u=="string"?!Bs(u):!0})),Qi(e,s,a,n),Dn(s,o),e.ancestors.pop(),e.schema=r,e.create(n,a,s,t)}function ml(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}pt(e,n.position)}function gl(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);pt(e,n.position)}function xl(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=An,e.schema=i),e.ancestors.push(n);const a=n.name===null?e.Fragment:Ji(e,n.name,!0),s=Cl(e,n),o=_n(e,n);return Qi(e,s,a,n),Dn(s,o),e.ancestors.pop(),e.schema=r,e.create(n,a,s,t)}function bl(e,n,t){const r={};return Dn(r,_n(e,n)),e.create(n,e.Fragment,r,t)}function yl(e,n){return n.value}function Qi(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function Dn(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function wl(e,n,t){return r;function r(i,a,s,o){const l=Array.isArray(s.children)?t:n;return o?l(a,s,o):l(a,s)}}function kl(e,n){return t;function t(r,i,a,s){const o=Array.isArray(a.children),u=Fn(r);return n(i,a,s,o,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function vl(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&Tn.call(n.properties,i)){const a=jl(e,i,n.properties[i]);if(a){const[s,o]=a;e.tableCellAlignToStyle&&s==="align"&&typeof o=="string"&&fl.has(n.tagName)?r=o:t[s]=o}}if(r){const a=t.style||(t.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function Cl(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const s=a.expression;s.type;const o=s.properties[0];o.type,Object.assign(t,e.evaluater.evaluateExpression(o.argument))}else pt(e,n.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,a=e.evaluater.evaluateExpression(o.expression)}else pt(e,n.position);else a=r.value===null?!0:r.value;t[i]=a}return t}function _n(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:ul;for(;++r<n.children.length;){const a=n.children[r];let s;if(e.passKeys){const u=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(u){const l=i.get(u)||0;s=u+"-"+l,i.set(u,l+1)}}const o=Xi(e,a,s);o!==void 0&&t.push(o)}return t}function jl(e,n,t){const r=Vs(e.schema,n);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?Hs(t):Us(t)),r.property==="style"){let i=typeof t=="object"?t:Sl(e,String(t));return e.stylePropertyNameCase==="css"&&(i=El(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?tl[r.property]||r.property:r.attribute,t]}}function Sl(e,n){try{return ol(n,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const r=t,i=new de("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Yi+"#cannot-parse-style-attribute",i}}function Ji(e,n,t){let r;if(!t)r={type:"Literal",value:n};else if(n.includes(".")){const i=n.split(".");let a=-1,s;for(;++a<i.length;){const o=hr(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:o,computed:!!(a&&o.type==="Literal"),optional:!1}:o}r=s}else r=hr(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const i=r.value;return Tn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);pt(e)}function pt(e,n){const t=new de("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=Yi+"#cannot-handle-mdx-estrees-without-createevaluater",t}function El(e){const n={};let t;for(t in e)Tn.call(e,t)&&(n[Nl(t)]=e[t]);return n}function Nl(e){let n=e.replace(cl,Al);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function Al(e){return"-"+e.toLowerCase()}const Yt={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"]},Il={};function Ln(e,n){const t=Il,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Ki(e,r,i)}function Ki(e,n,t){if(Pl(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return kr(e.children,n,t)}return Array.isArray(e)?kr(e,n,t):""}function kr(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=Ki(e[i],n,t);return r.join("")}function Pl(e){return!!(e&&typeof e=="object")}const vr=document.createElement("i");function zn(e){const n="&"+e+";";vr.innerHTML=n;const t=vr.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function ve(e,n,t,r){const i=e.length;let a=0,s;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)s=Array.from(r),s.unshift(n,t),e.splice(...s);else for(t&&e.splice(n,t);a<r.length;)s=r.slice(a,a+1e4),s.unshift(n,0),e.splice(...s),a+=1e4,n+=1e4}function Ce(e,n){return e.length>0?(ve(e,e.length,0,n),e):n}const Cr={}.hasOwnProperty;function Zi(e){const n={};let t=-1;for(;++t<e.length;)Rl(n,e[t]);return n}function Rl(e,n){let t;for(t in n){const i=(Cr.call(e,t)?e[t]:void 0)||(e[t]={}),a=n[t];let s;if(a)for(s in a){Cr.call(i,s)||(i[s]=[]);const o=a[s];Fl(i[s],Array.isArray(o)?o:o?[o]:[])}}}function Fl(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);ve(e,0,0,r)}function ea(e,n){const t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Ee(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const fe=Oe(/[A-Za-z]/),ce=Oe(/[\dA-Za-z]/),Tl=Oe(/[#-'*+\--9=?A-Z^-~]/);function Ft(e){return e!==null&&(e<32||e===127)}const gn=Oe(/\d/),Dl=Oe(/[\dA-Fa-f]/),_l=Oe(/[!-/:-@[-`{-~]/);function G(e){return e!==null&&e<-2}function ie(e){return e!==null&&(e<0||e===32)}function Z(e){return e===-2||e===-1||e===32}const Mt=Oe(/\p{P}|\p{S}/u),Ve=Oe(/\s/);function Oe(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Ke(e){const n=[];let t=-1,r=0,i=0;for(;++t<e.length;){const a=e.charCodeAt(t);let s="";if(a===37&&ce(e.charCodeAt(t+1))&&ce(e.charCodeAt(t+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const o=e.charCodeAt(t+1);a<56320&&o>56319&&o<57344?(s=String.fromCharCode(a,o),i=1):s="�"}else s=String.fromCharCode(a);s&&(n.push(e.slice(r,t),encodeURIComponent(s)),r=t+i+1,s=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function ne(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(u){return Z(u)?(e.enter(t),o(u)):n(u)}function o(u){return Z(u)&&a++<i?(e.consume(u),o):(e.exit(t),n(u))}}const Ll={tokenize:zl};function zl(e){const n=e.attempt(this.parser.constructs.contentInitial,r,i);let t;return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),ne(e,n,"linePrefix")}function i(o){return e.enter("paragraph"),a(o)}function a(o){const u=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=u),t=u,s(o)}function s(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return G(o)?(e.consume(o),e.exit("chunkText"),a):(e.consume(o),s)}}const Ol={tokenize:Ml},jr={tokenize:$l};function Ml(e){const n=this,t=[];let r=0,i,a,s;return o;function o(j){if(r<t.length){const I=t[r];return n.containerState=I[1],e.attempt(I[0].continuation,u,l)(j)}return l(j)}function u(j){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&C();const I=n.events.length;let E=I,v;for(;E--;)if(n.events[E][0]==="exit"&&n.events[E][1].type==="chunkFlow"){v=n.events[E][1].end;break}b(r);let B=I;for(;B<n.events.length;)n.events[B][1].end={...v},B++;return ve(n.events,E+1,0,n.events.slice(I)),n.events.length=B,l(j)}return o(j)}function l(j){if(r===t.length){if(!i)return f(j);if(i.currentConstruct&&i.currentConstruct.concrete)return x(j);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(jr,c,d)(j)}function c(j){return i&&C(),b(r),f(j)}function d(j){return n.parser.lazy[n.now().line]=r!==t.length,s=n.now().offset,x(j)}function f(j){return n.containerState={},e.attempt(jr,h,x)(j)}function h(j){return r++,t.push([n.currentConstruct,n.containerState]),f(j)}function x(j){if(j===null){i&&C(),b(0),e.consume(j);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),w(j)}function w(j){if(j===null){k(e.exit("chunkFlow"),!0),b(0),e.consume(j);return}return G(j)?(e.consume(j),k(e.exit("chunkFlow")),r=0,n.interrupt=void 0,o):(e.consume(j),w)}function k(j,I){const E=n.sliceStream(j);if(I&&E.push(null),j.previous=a,a&&(a.next=j),a=j,i.defineSkip(j.start),i.write(E),n.parser.lazy[j.start.line]){let v=i.events.length;for(;v--;)if(i.events[v][1].start.offset<s&&(!i.events[v][1].end||i.events[v][1].end.offset>s))return;const B=n.events.length;let $=B,V,S;for(;$--;)if(n.events[$][0]==="exit"&&n.events[$][1].type==="chunkFlow"){if(V){S=n.events[$][1].end;break}V=!0}for(b(r),v=B;v<n.events.length;)n.events[v][1].end={...S},v++;ve(n.events,$+1,0,n.events.slice(B)),n.events.length=v}}function b(j){let I=t.length;for(;I-- >j;){const E=t[I];n.containerState=E[1],E[0].exit.call(n,e)}t.length=j}function C(){i.write([null]),a=void 0,i=void 0,n.containerState._closeFlow=void 0}}function $l(e,n,t){return ne(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Qe(e){if(e===null||ie(e)||Ve(e))return 1;if(Mt(e))return 2}function $t(e,n,t){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(n=a(n,t),r.push(a))}return n}const xn={name:"attention",resolveAll:Bl,tokenize:Vl};function Bl(e,n){let t=-1,r,i,a,s,o,u,l,c;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const d={...e[r][1].end},f={...e[t][1].start};Sr(d,-u),Sr(f,u),s={type:u>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},o={type:u>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:f},a={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:u>1?"strong":"emphasis",start:{...s.start},end:{...o.end}},e[r][1].end={...s.start},e[t][1].start={...o.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Ce(l,[["enter",e[r][1],n],["exit",e[r][1],n]])),l=Ce(l,[["enter",i,n],["enter",s,n],["exit",s,n],["enter",a,n]]),l=Ce(l,$t(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),l=Ce(l,[["exit",a,n],["enter",o,n],["exit",o,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(c=2,l=Ce(l,[["enter",e[t][1],n],["exit",e[t][1],n]])):c=0,ve(e,r-1,t-r+3,l),t=r+l.length-c-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function Vl(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Qe(r);let a;return s;function s(u){return a=u,e.enter("attentionSequence"),o(u)}function o(u){if(u===a)return e.consume(u),o;const l=e.exit("attentionSequence"),c=Qe(u),d=!c||c===2&&i||t.includes(u),f=!i||i===2&&c||t.includes(r);return l._open=!!(a===42?d:d&&(i||!f)),l._close=!!(a===42?f:f&&(c||!d)),n(u)}}function Sr(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const Hl={name:"autolink",tokenize:Ul};function Ul(e,n,t){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(h){return fe(h)?(e.consume(h),s):h===64?t(h):l(h)}function s(h){return h===43||h===45||h===46||ce(h)?(r=1,o(h)):l(h)}function o(h){return h===58?(e.consume(h),r=0,u):(h===43||h===45||h===46||ce(h))&&r++<32?(e.consume(h),o):(r=0,l(h))}function u(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),n):h===null||h===32||h===60||Ft(h)?t(h):(e.consume(h),u)}function l(h){return h===64?(e.consume(h),c):Tl(h)?(e.consume(h),l):t(h)}function c(h){return ce(h)?d(h):t(h)}function d(h){return h===46?(e.consume(h),r=0,c):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),n):f(h)}function f(h){if((h===45||ce(h))&&r++<63){const x=h===45?f:d;return e.consume(h),x}return t(h)}}const xt={partial:!0,tokenize:ql};function ql(e,n,t){return r;function r(a){return Z(a)?ne(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||G(a)?n(a):t(a)}}const ta={continuation:{tokenize:Wl},exit:Yl,name:"blockQuote",tokenize:Gl};function Gl(e,n,t){const r=this;return i;function i(s){if(s===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return t(s)}function a(s){return Z(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(s))}}function Wl(e,n,t){const r=this;return i;function i(s){return Z(s)?ne(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(ta,n,t)(s)}}function Yl(e){e.exit("blockQuote")}const na={name:"characterEscape",tokenize:Xl};function Xl(e,n,t){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return _l(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(a)}}const ra={name:"characterReference",tokenize:Ql};function Ql(e,n,t){const r=this;let i=0,a,s;return o;function o(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),u}function u(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),a=31,s=ce,c(d))}function l(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=Dl,c):(e.enter("characterReferenceValue"),a=7,s=gn,c(d))}function c(d){if(d===59&&i){const f=e.exit("characterReferenceValue");return s===ce&&!zn(r.sliceSerialize(f))?t(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return s(d)&&i++<a?(e.consume(d),c):t(d)}}const Er={partial:!0,tokenize:Kl},Nr={concrete:!0,name:"codeFenced",tokenize:Jl};function Jl(e,n,t){const r=this,i={partial:!0,tokenize:E};let a=0,s=0,o;return u;function u(v){return l(v)}function l(v){const B=r.events[r.events.length-1];return a=B&&B[1].type==="linePrefix"?B[2].sliceSerialize(B[1],!0).length:0,o=v,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(v)}function c(v){return v===o?(s++,e.consume(v),c):s<3?t(v):(e.exit("codeFencedFenceSequence"),Z(v)?ne(e,d,"whitespace")(v):d(v))}function d(v){return v===null||G(v)?(e.exit("codeFencedFence"),r.interrupt?n(v):e.check(Er,w,I)(v)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(v))}function f(v){return v===null||G(v)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(v)):Z(v)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ne(e,h,"whitespace")(v)):v===96&&v===o?t(v):(e.consume(v),f)}function h(v){return v===null||G(v)?d(v):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(v))}function x(v){return v===null||G(v)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(v)):v===96&&v===o?t(v):(e.consume(v),x)}function w(v){return e.attempt(i,I,k)(v)}function k(v){return e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),b}function b(v){return a>0&&Z(v)?ne(e,C,"linePrefix",a+1)(v):C(v)}function C(v){return v===null||G(v)?e.check(Er,w,I)(v):(e.enter("codeFlowValue"),j(v))}function j(v){return v===null||G(v)?(e.exit("codeFlowValue"),C(v)):(e.consume(v),j)}function I(v){return e.exit("codeFenced"),n(v)}function E(v,B,$){let V=0;return S;function S(F){return v.enter("lineEnding"),v.consume(F),v.exit("lineEnding"),z}function z(F){return v.enter("codeFencedFence"),Z(F)?ne(v,R,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):R(F)}function R(F){return F===o?(v.enter("codeFencedFenceSequence"),L(F)):$(F)}function L(F){return F===o?(V++,v.consume(F),L):V>=s?(v.exit("codeFencedFenceSequence"),Z(F)?ne(v,D,"whitespace")(F):D(F)):$(F)}function D(F){return F===null||G(F)?(v.exit("codeFencedFence"),B(F)):$(F)}}}function Kl(e,n,t){const r=this;return i;function i(s){return s===null?t(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return r.parser.lazy[r.now().line]?t(s):n(s)}}const Xt={name:"codeIndented",tokenize:eu},Zl={partial:!0,tokenize:tu};function eu(e,n,t){const r=this;return i;function i(l){return e.enter("codeIndented"),ne(e,a,"linePrefix",5)(l)}function a(l){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?s(l):t(l)}function s(l){return l===null?u(l):G(l)?e.attempt(Zl,s,u)(l):(e.enter("codeFlowValue"),o(l))}function o(l){return l===null||G(l)?(e.exit("codeFlowValue"),s(l)):(e.consume(l),o)}function u(l){return e.exit("codeIndented"),n(l)}}function tu(e,n,t){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?t(s):G(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):ne(e,a,"linePrefix",5)(s)}function a(s){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?n(s):G(s)?i(s):t(s)}}const nu={name:"codeText",previous:iu,resolve:ru,tokenize:au};function ru(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||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),n-=r-i-2,r=i+2),i=void 0);return e}function iu(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function au(e,n,t){let r=0,i,a;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),o(d)}function o(d){return d===96?(e.consume(d),r++,o):(e.exit("codeTextSequence"),u(d))}function u(d){return d===null?t(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),u):d===96?(a=e.enter("codeTextSequence"),i=0,c(d)):G(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("codeTextData"),l(d))}function l(d){return d===null||d===32||d===96||G(d)?(e.exit("codeTextData"),u(d)):(e.consume(d),l)}function c(d){return d===96?(e.consume(d),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(d)):(a.type="codeTextData",l(d))}}class su{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const i=t||0;this.setCursor(Math.trunc(n));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&ot(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),ot(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),ot(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const t=this.left.splice(n,Number.POSITIVE_INFINITY);ot(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);ot(this.left,t.reverse())}}}function ot(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}function ia(e){const n={};let t=-1,r,i,a,s,o,u,l;const c=new su(e);for(;++t<c.length;){for(;t in n;)t=n[t];if(r=c.get(t),t&&r[1].type==="chunkFlow"&&c.get(t-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,a=0,a<u.length&&u[a][1].type==="lineEndingBlank"&&(a+=2),a<u.length&&u[a][1].type==="content"))for(;++a<u.length&&u[a][1].type!=="content";)u[a][1].type==="chunkText"&&(u[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,ou(c,t)),t=n[t],l=!0);else if(r[1]._container){for(a=t,i=void 0;a--;)if(s=c.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},o=c.slice(i,t),o.unshift(r),c.splice(i,t-i+1,o))}}return ve(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function ou(e,n){const t=e.get(n)[1],r=e.get(n)[2];let i=n-1;const a=[];let s=t._tokenizer;s||(s=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const o=s.events,u=[],l={};let c,d,f=-1,h=t,x=0,w=0;const k=[w];for(;h;){for(;e.get(++i)[1]!==h;);a.push(i),h._tokenizer||(c=r.sliceStream(h),h.next||c.push(null),d&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=t;++f<o.length;)o[f][0]==="exit"&&o[f-1][0]==="enter"&&o[f][1].type===o[f-1][1].type&&o[f][1].start.line!==o[f][1].end.line&&(w=f+1,k.push(w),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):k.pop(),f=k.length;f--;){const b=o.slice(k[f],k[f+1]),C=a.pop();u.push([C,C+b.length-1]),e.splice(C,2,b)}for(u.reverse(),f=-1;++f<u.length;)l[x+u[f][0]]=x+u[f][1],x+=u[f][1]-u[f][0]-1;return l}const lu={resolve:cu,tokenize:du},uu={partial:!0,tokenize:fu};function cu(e){return ia(e),e}function du(e,n){let t;return r;function r(o){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?a(o):G(o)?e.check(uu,s,a)(o):(e.consume(o),i)}function a(o){return e.exit("chunkContent"),e.exit("content"),n(o)}function s(o){return e.consume(o),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function fu(e,n,t){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ne(e,a,"linePrefix")}function a(s){if(s===null||G(s))return t(s);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?n(s):e.interrupt(r.parser.constructs.flow,t,n)(s)}}function aa(e,n,t,r,i,a,s,o,u){const l=u||Number.POSITIVE_INFINITY;let c=0;return d;function d(b){return b===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(b),e.exit(a),f):b===null||b===32||b===41||Ft(b)?t(b):(e.enter(r),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),w(b))}function f(b){return b===62?(e.enter(a),e.consume(b),e.exit(a),e.exit(i),e.exit(r),n):(e.enter(o),e.enter("chunkString",{contentType:"string"}),h(b))}function h(b){return b===62?(e.exit("chunkString"),e.exit(o),f(b)):b===null||b===60||G(b)?t(b):(e.consume(b),b===92?x:h)}function x(b){return b===60||b===62||b===92?(e.consume(b),h):h(b)}function w(b){return!c&&(b===null||b===41||ie(b))?(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(r),n(b)):c<l&&b===40?(e.consume(b),c++,w):b===41?(e.consume(b),c--,w):b===null||b===32||b===40||Ft(b)?t(b):(e.consume(b),b===92?k:w)}function k(b){return b===40||b===41||b===92?(e.consume(b),w):w(b)}}function sa(e,n,t,r,i,a){const s=this;let o=0,u;return l;function l(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(a),c}function c(h){return o>999||h===null||h===91||h===93&&!u||h===94&&!o&&"_hiddenFootnoteSupport"in s.parser.constructs?t(h):h===93?(e.exit(a),e.enter(i),e.consume(h),e.exit(i),e.exit(r),n):G(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||G(h)||o++>999?(e.exit("chunkString"),c(h)):(e.consume(h),u||(u=!Z(h)),h===92?f:d)}function f(h){return h===91||h===92||h===93?(e.consume(h),o++,d):d(h)}}function oa(e,n,t,r,i,a){let s;return o;function o(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),s=f===40?41:f,u):t(f)}function u(f){return f===s?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),n):(e.enter(a),l(f))}function l(f){return f===s?(e.exit(a),u(s)):f===null?t(f):G(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),ne(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===s||f===null||G(f)?(e.exit("chunkString"),l(f)):(e.consume(f),f===92?d:c)}function d(f){return f===s||f===92?(e.consume(f),c):c(f)}}function ct(e,n){let t;return r;function r(i){return G(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):Z(i)?ne(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const pu={name:"definition",tokenize:mu},hu={partial:!0,tokenize:gu};function mu(e,n,t){const r=this;let i;return a;function a(h){return e.enter("definition"),s(h)}function s(h){return sa.call(r,e,o,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function o(h){return i=Ee(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),u):t(h)}function u(h){return ie(h)?ct(e,l)(h):l(h)}function l(h){return aa(e,c,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function c(h){return e.attempt(hu,d,d)(h)}function d(h){return Z(h)?ne(e,f,"whitespace")(h):f(h)}function f(h){return h===null||G(h)?(e.exit("definition"),r.parser.defined.push(i),n(h)):t(h)}}function gu(e,n,t){return r;function r(o){return ie(o)?ct(e,i)(o):t(o)}function i(o){return oa(e,a,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function a(o){return Z(o)?ne(e,s,"whitespace")(o):s(o)}function s(o){return o===null||G(o)?n(o):t(o)}}const xu={name:"hardBreakEscape",tokenize:bu};function bu(e,n,t){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return G(a)?(e.exit("hardBreakEscape"),n(a)):t(a)}}const yu={name:"headingAtx",resolve:wu,tokenize:ku};function wu(e,n){let t=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},a={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},ve(e,r,t-r+1,[["enter",i,n],["enter",a,n],["exit",a,n],["exit",i,n]])),e}function ku(e,n,t){let r=0;return i;function i(c){return e.enter("atxHeading"),a(c)}function a(c){return e.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&r++<6?(e.consume(c),s):c===null||ie(c)?(e.exit("atxHeadingSequence"),o(c)):t(c)}function o(c){return c===35?(e.enter("atxHeadingSequence"),u(c)):c===null||G(c)?(e.exit("atxHeading"),n(c)):Z(c)?ne(e,o,"whitespace")(c):(e.enter("atxHeadingText"),l(c))}function u(c){return c===35?(e.consume(c),u):(e.exit("atxHeadingSequence"),o(c))}function l(c){return c===null||c===35||ie(c)?(e.exit("atxHeadingText"),o(c)):(e.consume(c),l)}}const vu=["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"],Ar=["pre","script","style","textarea"],Cu={concrete:!0,name:"htmlFlow",resolveTo:Eu,tokenize:Nu},ju={partial:!0,tokenize:Iu},Su={partial:!0,tokenize:Au};function Eu(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Nu(e,n,t){const r=this;let i,a,s,o,u;return l;function l(m){return c(m)}function c(m){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(m),d}function d(m){return m===33?(e.consume(m),f):m===47?(e.consume(m),a=!0,w):m===63?(e.consume(m),i=3,r.interrupt?n:g):fe(m)?(e.consume(m),s=String.fromCharCode(m),k):t(m)}function f(m){return m===45?(e.consume(m),i=2,h):m===91?(e.consume(m),i=5,o=0,x):fe(m)?(e.consume(m),i=4,r.interrupt?n:g):t(m)}function h(m){return m===45?(e.consume(m),r.interrupt?n:g):t(m)}function x(m){const T="CDATA[";return m===T.charCodeAt(o++)?(e.consume(m),o===T.length?r.interrupt?n:R:x):t(m)}function w(m){return fe(m)?(e.consume(m),s=String.fromCharCode(m),k):t(m)}function k(m){if(m===null||m===47||m===62||ie(m)){const T=m===47,P=s.toLowerCase();return!T&&!a&&Ar.includes(P)?(i=1,r.interrupt?n(m):R(m)):vu.includes(s.toLowerCase())?(i=6,T?(e.consume(m),b):r.interrupt?n(m):R(m)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(m):a?C(m):j(m))}return m===45||ce(m)?(e.consume(m),s+=String.fromCharCode(m),k):t(m)}function b(m){return m===62?(e.consume(m),r.interrupt?n:R):t(m)}function C(m){return Z(m)?(e.consume(m),C):S(m)}function j(m){return m===47?(e.consume(m),S):m===58||m===95||fe(m)?(e.consume(m),I):Z(m)?(e.consume(m),j):S(m)}function I(m){return m===45||m===46||m===58||m===95||ce(m)?(e.consume(m),I):E(m)}function E(m){return m===61?(e.consume(m),v):Z(m)?(e.consume(m),E):j(m)}function v(m){return m===null||m===60||m===61||m===62||m===96?t(m):m===34||m===39?(e.consume(m),u=m,B):Z(m)?(e.consume(m),v):$(m)}function B(m){return m===u?(e.consume(m),u=null,V):m===null||G(m)?t(m):(e.consume(m),B)}function $(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||ie(m)?E(m):(e.consume(m),$)}function V(m){return m===47||m===62||Z(m)?j(m):t(m)}function S(m){return m===62?(e.consume(m),z):t(m)}function z(m){return m===null||G(m)?R(m):Z(m)?(e.consume(m),z):t(m)}function R(m){return m===45&&i===2?(e.consume(m),O):m===60&&i===1?(e.consume(m),H):m===62&&i===4?(e.consume(m),ee):m===63&&i===3?(e.consume(m),g):m===93&&i===5?(e.consume(m),X):G(m)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(ju,J,L)(m)):m===null||G(m)?(e.exit("htmlFlowData"),L(m)):(e.consume(m),R)}function L(m){return e.check(Su,D,J)(m)}function D(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),F}function F(m){return m===null||G(m)?L(m):(e.enter("htmlFlowData"),R(m))}function O(m){return m===45?(e.consume(m),g):R(m)}function H(m){return m===47?(e.consume(m),s="",Y):R(m)}function Y(m){if(m===62){const T=s.toLowerCase();return Ar.includes(T)?(e.consume(m),ee):R(m)}return fe(m)&&s.length<8?(e.consume(m),s+=String.fromCharCode(m),Y):R(m)}function X(m){return m===93?(e.consume(m),g):R(m)}function g(m){return m===62?(e.consume(m),ee):m===45&&i===2?(e.consume(m),g):R(m)}function ee(m){return m===null||G(m)?(e.exit("htmlFlowData"),J(m)):(e.consume(m),ee)}function J(m){return e.exit("htmlFlow"),n(m)}}function Au(e,n,t){const r=this;return i;function i(s){return G(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):t(s)}function a(s){return r.parser.lazy[r.now().line]?t(s):n(s)}}function Iu(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(xt,n,t)}}const Pu={name:"htmlText",tokenize:Ru};function Ru(e,n,t){const r=this;let i,a,s;return o;function o(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),u}function u(g){return g===33?(e.consume(g),l):g===47?(e.consume(g),E):g===63?(e.consume(g),j):fe(g)?(e.consume(g),$):t(g)}function l(g){return g===45?(e.consume(g),c):g===91?(e.consume(g),a=0,x):fe(g)?(e.consume(g),C):t(g)}function c(g){return g===45?(e.consume(g),h):t(g)}function d(g){return g===null?t(g):g===45?(e.consume(g),f):G(g)?(s=d,H(g)):(e.consume(g),d)}function f(g){return g===45?(e.consume(g),h):d(g)}function h(g){return g===62?O(g):g===45?f(g):d(g)}function x(g){const ee="CDATA[";return g===ee.charCodeAt(a++)?(e.consume(g),a===ee.length?w:x):t(g)}function w(g){return g===null?t(g):g===93?(e.consume(g),k):G(g)?(s=w,H(g)):(e.consume(g),w)}function k(g){return g===93?(e.consume(g),b):w(g)}function b(g){return g===62?O(g):g===93?(e.consume(g),b):w(g)}function C(g){return g===null||g===62?O(g):G(g)?(s=C,H(g)):(e.consume(g),C)}function j(g){return g===null?t(g):g===63?(e.consume(g),I):G(g)?(s=j,H(g)):(e.consume(g),j)}function I(g){return g===62?O(g):j(g)}function E(g){return fe(g)?(e.consume(g),v):t(g)}function v(g){return g===45||ce(g)?(e.consume(g),v):B(g)}function B(g){return G(g)?(s=B,H(g)):Z(g)?(e.consume(g),B):O(g)}function $(g){return g===45||ce(g)?(e.consume(g),$):g===47||g===62||ie(g)?V(g):t(g)}function V(g){return g===47?(e.consume(g),O):g===58||g===95||fe(g)?(e.consume(g),S):G(g)?(s=V,H(g)):Z(g)?(e.consume(g),V):O(g)}function S(g){return g===45||g===46||g===58||g===95||ce(g)?(e.consume(g),S):z(g)}function z(g){return g===61?(e.consume(g),R):G(g)?(s=z,H(g)):Z(g)?(e.consume(g),z):V(g)}function R(g){return g===null||g===60||g===61||g===62||g===96?t(g):g===34||g===39?(e.consume(g),i=g,L):G(g)?(s=R,H(g)):Z(g)?(e.consume(g),R):(e.consume(g),D)}function L(g){return g===i?(e.consume(g),i=void 0,F):g===null?t(g):G(g)?(s=L,H(g)):(e.consume(g),L)}function D(g){return g===null||g===34||g===39||g===60||g===61||g===96?t(g):g===47||g===62||ie(g)?V(g):(e.consume(g),D)}function F(g){return g===47||g===62||ie(g)?V(g):t(g)}function O(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),n):t(g)}function H(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),Y}function Y(g){return Z(g)?ne(e,X,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):X(g)}function X(g){return e.enter("htmlTextData"),s(g)}}const On={name:"labelEnd",resolveAll:_u,resolveTo:Lu,tokenize:zu},Fu={tokenize:Ou},Tu={tokenize:Mu},Du={tokenize:$u};function _u(e){let n=-1;const t=[];for(;++n<e.length;){const r=e[n][1];if(t.push(e[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",n+=i}}return e.length!==t.length&&ve(e,0,e.length,t),e}function Lu(e,n){let t=e.length,r=0,i,a,s,o;for(;t--;)if(i=e[t][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=t);const u={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[a][1].start},end:{...e[s][1].end}},c={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[s-2][1].start}};return o=[["enter",u,n],["enter",l,n]],o=Ce(o,e.slice(a+1,a+r+3)),o=Ce(o,[["enter",c,n]]),o=Ce(o,$t(n.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),n)),o=Ce(o,[["exit",c,n],e[s-2],e[s-1],["exit",l,n]]),o=Ce(o,e.slice(s+1)),o=Ce(o,[["exit",u,n]]),ve(e,a,e.length,o),e}function zu(e,n,t){const r=this;let i=r.events.length,a,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return o;function o(f){return a?a._inactive?d(f):(s=r.parser.defined.includes(Ee(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),u):t(f)}function u(f){return f===40?e.attempt(Fu,c,s?c:d)(f):f===91?e.attempt(Tu,c,s?l:d)(f):s?c(f):d(f)}function l(f){return e.attempt(Du,c,d)(f)}function c(f){return n(f)}function d(f){return a._balanced=!0,t(f)}}function Ou(e,n,t){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return ie(d)?ct(e,a)(d):a(d)}function a(d){return d===41?c(d):aa(e,s,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return ie(d)?ct(e,u)(d):c(d)}function o(d){return t(d)}function u(d){return d===34||d===39||d===40?oa(e,l,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function l(d){return ie(d)?ct(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),n):t(d)}}function Mu(e,n,t){const r=this;return i;function i(o){return sa.call(r,e,a,s,"reference","referenceMarker","referenceString")(o)}function a(o){return r.parser.defined.includes(Ee(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(o):t(o)}function s(o){return t(o)}}function $u(e,n,t){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),n):t(a)}}const Bu={name:"labelStartImage",resolveAll:On.resolveAll,tokenize:Vu};function Vu(e,n,t){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),a}function a(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),s):t(o)}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(o):n(o)}}const Hu={name:"labelStartLink",resolveAll:On.resolveAll,tokenize:Uu};function Uu(e,n,t){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(s):n(s)}}const Qt={name:"lineEnding",tokenize:qu};function qu(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ne(e,n,"linePrefix")}}const Et={name:"thematicBreak",tokenize:Gu};function Gu(e,n,t){let r=0,i;return a;function a(l){return e.enter("thematicBreak"),s(l)}function s(l){return i=l,o(l)}function o(l){return l===i?(e.enter("thematicBreakSequence"),u(l)):r>=3&&(l===null||G(l))?(e.exit("thematicBreak"),n(l)):t(l)}function u(l){return l===i?(e.consume(l),r++,u):(e.exit("thematicBreakSequence"),Z(l)?ne(e,o,"whitespace")(l):o(l))}}const ge={continuation:{tokenize:Qu},exit:Ku,name:"list",tokenize:Xu},Wu={partial:!0,tokenize:Zu},Yu={partial:!0,tokenize:Ju};function Xu(e,n,t){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return o;function o(h){const x=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:gn(h)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Et,t,l)(h):l(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(h)}return t(h)}function u(h){return gn(h)&&++s<10?(e.consume(h),u):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),l(h)):t(h)}function l(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(xt,r.interrupt?t:c,e.attempt(Wu,f,d))}function c(h){return r.containerState.initialBlankLine=!0,a++,f(h)}function d(h){return Z(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),f):t(h)}function f(h){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(h)}}function Qu(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(xt,i,a);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ne(e,n,"listItemIndent",r.containerState.size+1)(o)}function a(o){return r.containerState.furtherBlankLines||!Z(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Yu,n,s)(o))}function s(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,ne(e,e.attempt(ge,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function Ju(e,n,t){const r=this;return ne(e,i,"listItemIndent",r.containerState.size+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?n(a):t(a)}}function Ku(e){e.exit(this.containerState.type)}function Zu(e,n,t){const r=this;return ne(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!Z(a)&&s&&s[1].type==="listItemPrefixWhitespace"?n(a):t(a)}}const Ir={name:"setextUnderline",resolveTo:ec,tokenize:tc};function ec(e,n){let t=e.length,r,i,a;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!a&&e[t][1].type==="definition"&&(a=t);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,n]),e.splice(a+1,0,["exit",e[r][1],n]),e[r][1].end={...e[a][1].end}):e[r][1]=s,e.push(["exit",s,n]),e}function tc(e,n,t){const r=this;let i;return a;function a(l){let c=r.events.length,d;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){d=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=l,s(l)):t(l)}function s(l){return e.enter("setextHeadingLineSequence"),o(l)}function o(l){return l===i?(e.consume(l),o):(e.exit("setextHeadingLineSequence"),Z(l)?ne(e,u,"lineSuffix")(l):u(l))}function u(l){return l===null||G(l)?(e.exit("setextHeadingLine"),n(l)):t(l)}}const nc={tokenize:rc};function rc(e){const n=this,t=e.attempt(xt,r,e.attempt(this.parser.constructs.flowInitial,i,ne(e,e.attempt(this.parser.constructs.flow,i,e.attempt(lu,i)),"linePrefix")));return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const ic={resolveAll:ua()},ac=la("string"),sc=la("text");function la(e){return{resolveAll:ua(e==="text"?oc:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],a=t.attempt(i,s,o);return s;function s(c){return l(c)?a(c):o(c)}function o(c){if(c===null){t.consume(c);return}return t.enter("data"),t.consume(c),u}function u(c){return l(c)?(t.exit("data"),a(c)):(t.consume(c),u)}function l(c){if(c===null)return!0;const d=i[c];let f=-1;if(d)for(;++f<d.length;){const h=d[f];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function ua(e){return n;function n(t,r){let i=-1,a;for(;++i<=t.length;)a===void 0?t[i]&&t[i][1].type==="data"&&(a=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==a+2&&(t[a][1].end=t[i-1][1].end,t.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(t,r):t}}function oc(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],i=n.sliceStream(r);let a=i.length,s=-1,o=0,u;for(;a--;){const l=i[a];if(typeof l=="string"){for(s=l.length;l.charCodeAt(s-1)===32;)o++,s--;if(s)break;s=-1}else if(l===-2)u=!0,o++;else if(l!==-1){a++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(o=0),o){const l={type:t===e.length||u||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...l.start},r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(t,0,["enter",l,n],["exit",l,n]),t+=2)}t++}return e}const lc={42:ge,43:ge,45:ge,48:ge,49:ge,50:ge,51:ge,52:ge,53:ge,54:ge,55:ge,56:ge,57:ge,62:ta},uc={91:pu},cc={[-2]:Xt,[-1]:Xt,32:Xt},dc={35:yu,42:Et,45:[Ir,Et],60:Cu,61:Ir,95:Et,96:Nr,126:Nr},fc={38:ra,92:na},pc={[-5]:Qt,[-4]:Qt,[-3]:Qt,33:Bu,38:ra,42:xn,60:[Hl,Pu],91:Hu,92:[xu,na],93:On,95:xn,96:nu},hc={null:[xn,ic]},mc={null:[42,95]},gc={null:[]},xc=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:mc,contentInitial:uc,disable:gc,document:lc,flow:dc,flowInitial:cc,insideSpan:hc,string:fc,text:pc},Symbol.toStringTag,{value:"Module"}));function bc(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const i={},a=[];let s=[],o=[];const u={attempt:B(E),check:B(v),consume:C,enter:j,exit:I,interrupt:B(v,{interrupt:!0})},l={code:null,containerState:{},defineSkip:w,events:[],now:x,parser:e,previous:null,sliceSerialize:f,sliceStream:h,write:d};let c=n.tokenize.call(l,u);return n.resolveAll&&a.push(n),l;function d(z){return s=Ce(s,z),k(),s[s.length-1]!==null?[]:($(n,0),l.events=$t(a,l.events,l),l.events)}function f(z,R){return wc(h(z),R)}function h(z){return yc(s,z)}function x(){const{_bufferIndex:z,_index:R,line:L,column:D,offset:F}=r;return{_bufferIndex:z,_index:R,line:L,column:D,offset:F}}function w(z){i[z.line]=z.column,S()}function k(){let z;for(;r._index<s.length;){const R=s[r._index];if(typeof R=="string")for(z=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===z&&r._bufferIndex<R.length;)b(R.charCodeAt(r._bufferIndex));else b(R)}}function b(z){c=c(z)}function C(z){G(z)?(r.line++,r.column=1,r.offset+=z===-3?2:1,S()):z!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=z}function j(z,R){const L=R||{};return L.type=z,L.start=x(),l.events.push(["enter",L,l]),o.push(L),L}function I(z){const R=o.pop();return R.end=x(),l.events.push(["exit",R,l]),R}function E(z,R){$(z,R.from)}function v(z,R){R.restore()}function B(z,R){return L;function L(D,F,O){let H,Y,X,g;return Array.isArray(D)?J(D):"tokenize"in D?J([D]):ee(D);function ee(M){return q;function q(Q){const K=Q!==null&&M[Q],te=Q!==null&&M.null,oe=[...Array.isArray(K)?K:K?[K]:[],...Array.isArray(te)?te:te?[te]:[]];return J(oe)(Q)}}function J(M){return H=M,Y=0,M.length===0?O:m(M[Y])}function m(M){return q;function q(Q){return g=V(),X=M,M.partial||(l.currentConstruct=M),M.name&&l.parser.constructs.disable.null.includes(M.name)?P():M.tokenize.call(R?Object.assign(Object.create(l),R):l,u,T,P)(Q)}}function T(M){return z(X,g),F}function P(M){return g.restore(),++Y<H.length?m(H[Y]):O}}}function $(z,R){z.resolveAll&&!a.includes(z)&&a.push(z),z.resolve&&ve(l.events,R,l.events.length-R,z.resolve(l.events.slice(R),l)),z.resolveTo&&(l.events=z.resolveTo(l.events,l))}function V(){const z=x(),R=l.previous,L=l.currentConstruct,D=l.events.length,F=Array.from(o);return{from:D,restore:O};function O(){r=z,l.previous=R,l.currentConstruct=L,l.events.length=D,o=F,S()}}function S(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function yc(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,a=n.end._bufferIndex;let s;if(t===i)s=[e[t].slice(r,a)];else{if(s=e.slice(t,i),r>-1){const o=s[0];typeof o=="string"?s[0]=o.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function wc(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const a=e[t];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
|
|
13
|
+
`;break}case-3:{s=`\r
|
|
14
|
+
`;break}case-2:{s=n?" ":" ";break}case-1:{if(!n&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,r.push(s)}return r.join("")}function kc(e){const r={constructs:Zi([xc,...(e||{}).extensions||[]]),content:i(Ll),defined:[],document:i(Ol),flow:i(nc),lazy:{},string:i(ac),text:i(sc)};return r;function i(a){return s;function s(o){return bc(r,a,o)}}}function vc(e){for(;!ia(e););return e}const Pr=/[\0\t\n\r]/g;function Cc(){let e=1,n="",t=!0,r;return i;function i(a,s,o){const u=[];let l,c,d,f,h;for(a=n+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),d=0,n="",t&&(a.charCodeAt(0)===65279&&d++,t=void 0);d<a.length;){if(Pr.lastIndex=d,l=Pr.exec(a),f=l&&l.index!==void 0?l.index:a.length,h=a.charCodeAt(f),!l){n=a.slice(d);break}if(h===10&&d===f&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),d<f&&(u.push(a.slice(d,f)),e+=f-d),h){case 0:{u.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,u.push(-2);e++<c;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}d=f+1}return o&&(r&&u.push(-5),n&&u.push(n),u.push(null)),u}}const jc=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Sc(e){return e.replace(jc,Ec)}function Ec(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),a=i===120||i===88;return ea(t.slice(a?2:1),a?16:10)}return zn(t)||e}const ca={}.hasOwnProperty;function Nc(e,n,t){return n&&typeof n=="object"&&(t=n,n=void 0),Ac(t)(vc(kc(t).document().write(Cc()(e,n,!0))))}function Ac(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(ye),autolinkProtocol:V,autolinkEmail:V,atxHeading:a(le),blockQuote:a(te),characterEscape:V,characterReference:V,codeFenced:a(oe),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(oe,s),codeText:a(pe,s),codeTextData:V,data:V,codeFlowValue:V,definition:a(ae),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(je),hardBreakEscape:a(ue),hardBreakTrailing:a(ue),htmlFlow:a(he,s),htmlFlowData:V,htmlText:a(he,s),htmlTextData:V,image:a(Ne),label:s,link:a(ye),listItem:a(Me),listItemValue:f,listOrdered:a(_e,d),listUnordered:a(_e),paragraph:a(we),reference:m,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(le),strong:a(Ze),thematicBreak:a(et)},exit:{atxHeading:u(),atxHeadingSequence:E,autolink:u(),autolinkEmail:K,autolinkProtocol:Q,blockQuote:u(),characterEscapeValue:S,characterReferenceMarkerHexadecimal:P,characterReferenceMarkerNumeric:P,characterReferenceValue:M,characterReference:q,codeFenced:u(k),codeFencedFence:w,codeFencedFenceInfo:h,codeFencedFenceMeta:x,codeFlowValue:S,codeIndented:u(b),codeText:u(F),codeTextData:S,data:S,definition:u(),definitionDestinationString:I,definitionLabelString:C,definitionTitleString:j,emphasis:u(),hardBreakEscape:u(R),hardBreakTrailing:u(R),htmlFlow:u(L),htmlFlowData:S,htmlText:u(D),htmlTextData:S,image:u(H),label:X,labelText:Y,lineEnding:z,link:u(O),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:T,resourceDestinationString:g,resourceTitleString:ee,resource:J,setextHeading:u($),setextHeadingLineSequence:B,setextHeadingText:v,strong:u(),thematicBreak:u()}};da(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(N){let A={type:"root",children:[]};const U={stack:[A],tokenStack:[],config:n,enter:o,exit:l,buffer:s,resume:c,data:t},W=[];let re=-1;for(;++re<N.length;)if(N[re][1].type==="listOrdered"||N[re][1].type==="listUnordered")if(N[re][0]==="enter")W.push(re);else{const Se=W.pop();re=i(N,Se,re)}for(re=-1;++re<N.length;){const Se=n[N[re][0]];ca.call(Se,N[re][1].type)&&Se[N[re][1].type].call(Object.assign({sliceSerialize:N[re][2].sliceSerialize},U),N[re][1])}if(U.tokenStack.length>0){const Se=U.tokenStack[U.tokenStack.length-1];(Se[1]||Rr).call(U,void 0,Se[0])}for(A.position={start:Le(N.length>0?N[0][1].start:{line:1,column:1,offset:0}),end:Le(N.length>0?N[N.length-2][1].end:{line:1,column:1,offset:0})},re=-1;++re<n.transforms.length;)A=n.transforms[re](A)||A;return A}function i(N,A,U){let W=A-1,re=-1,Se=!1,$e,Pe,tt,nt;for(;++W<=U;){const ke=N[W];switch(ke[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ke[0]==="enter"?re++:re--,nt=void 0;break}case"lineEndingBlank":{ke[0]==="enter"&&($e&&!nt&&!re&&!tt&&(tt=W),nt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:nt=void 0}if(!re&&ke[0]==="enter"&&ke[1].type==="listItemPrefix"||re===-1&&ke[0]==="exit"&&(ke[1].type==="listUnordered"||ke[1].type==="listOrdered")){if($e){let Ue=W;for(Pe=void 0;Ue--;){const Re=N[Ue];if(Re[1].type==="lineEnding"||Re[1].type==="lineEndingBlank"){if(Re[0]==="exit")continue;Pe&&(N[Pe][1].type="lineEndingBlank",Se=!0),Re[1].type="lineEnding",Pe=Ue}else if(!(Re[1].type==="linePrefix"||Re[1].type==="blockQuotePrefix"||Re[1].type==="blockQuotePrefixWhitespace"||Re[1].type==="blockQuoteMarker"||Re[1].type==="listItemIndent"))break}tt&&(!Pe||tt<Pe)&&($e._spread=!0),$e.end=Object.assign({},Pe?N[Pe][1].start:ke[1].end),N.splice(Pe||W,0,["exit",$e,ke[2]]),W++,U++}if(ke[1].type==="listItemPrefix"){const Ue={type:"listItem",_spread:!1,start:Object.assign({},ke[1].start),end:void 0};$e=Ue,N.splice(W,0,["enter",Ue,ke[2]]),W++,U++,tt=void 0,nt=!0}}}return N[A][1]._spread=Se,U}function a(N,A){return U;function U(W){o.call(this,N(W),W),A&&A.call(this,W)}}function s(){this.stack.push({type:"fragment",children:[]})}function o(N,A,U){this.stack[this.stack.length-1].children.push(N),this.stack.push(N),this.tokenStack.push([A,U||void 0]),N.position={start:Le(A.start),end:void 0}}function u(N){return A;function A(U){N&&N.call(this,U),l.call(this,U)}}function l(N,A){const U=this.stack.pop(),W=this.tokenStack.pop();if(W)W[0].type!==N.type&&(A?A.call(this,N,W[0]):(W[1]||Rr).call(this,N,W[0]));else throw new Error("Cannot close `"+N.type+"` ("+ut({start:N.start,end:N.end})+"): it’s not open");U.position.end=Le(N.end)}function c(){return Ln(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(N){if(this.data.expectingFirstListItemValue){const A=this.stack[this.stack.length-2];A.start=Number.parseInt(this.sliceSerialize(N),10),this.data.expectingFirstListItemValue=void 0}}function h(){const N=this.resume(),A=this.stack[this.stack.length-1];A.lang=N}function x(){const N=this.resume(),A=this.stack[this.stack.length-1];A.meta=N}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function k(){const N=this.resume(),A=this.stack[this.stack.length-1];A.value=N.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const N=this.resume(),A=this.stack[this.stack.length-1];A.value=N.replace(/(\r?\n|\r)$/g,"")}function C(N){const A=this.resume(),U=this.stack[this.stack.length-1];U.label=A,U.identifier=Ee(this.sliceSerialize(N)).toLowerCase()}function j(){const N=this.resume(),A=this.stack[this.stack.length-1];A.title=N}function I(){const N=this.resume(),A=this.stack[this.stack.length-1];A.url=N}function E(N){const A=this.stack[this.stack.length-1];if(!A.depth){const U=this.sliceSerialize(N).length;A.depth=U}}function v(){this.data.setextHeadingSlurpLineEnding=!0}function B(N){const A=this.stack[this.stack.length-1];A.depth=this.sliceSerialize(N).codePointAt(0)===61?1:2}function $(){this.data.setextHeadingSlurpLineEnding=void 0}function V(N){const U=this.stack[this.stack.length-1].children;let W=U[U.length-1];(!W||W.type!=="text")&&(W=He(),W.position={start:Le(N.start),end:void 0},U.push(W)),this.stack.push(W)}function S(N){const A=this.stack.pop();A.value+=this.sliceSerialize(N),A.position.end=Le(N.end)}function z(N){const A=this.stack[this.stack.length-1];if(this.data.atHardBreak){const U=A.children[A.children.length-1];U.position.end=Le(N.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(A.type)&&(V.call(this,N),S.call(this,N))}function R(){this.data.atHardBreak=!0}function L(){const N=this.resume(),A=this.stack[this.stack.length-1];A.value=N}function D(){const N=this.resume(),A=this.stack[this.stack.length-1];A.value=N}function F(){const N=this.resume(),A=this.stack[this.stack.length-1];A.value=N}function O(){const N=this.stack[this.stack.length-1];if(this.data.inReference){const A=this.data.referenceType||"shortcut";N.type+="Reference",N.referenceType=A,delete N.url,delete N.title}else delete N.identifier,delete N.label;this.data.referenceType=void 0}function H(){const N=this.stack[this.stack.length-1];if(this.data.inReference){const A=this.data.referenceType||"shortcut";N.type+="Reference",N.referenceType=A,delete N.url,delete N.title}else delete N.identifier,delete N.label;this.data.referenceType=void 0}function Y(N){const A=this.sliceSerialize(N),U=this.stack[this.stack.length-2];U.label=Sc(A),U.identifier=Ee(A).toLowerCase()}function X(){const N=this.stack[this.stack.length-1],A=this.resume(),U=this.stack[this.stack.length-1];if(this.data.inReference=!0,U.type==="link"){const W=N.children;U.children=W}else U.alt=A}function g(){const N=this.resume(),A=this.stack[this.stack.length-1];A.url=N}function ee(){const N=this.resume(),A=this.stack[this.stack.length-1];A.title=N}function J(){this.data.inReference=void 0}function m(){this.data.referenceType="collapsed"}function T(N){const A=this.resume(),U=this.stack[this.stack.length-1];U.label=A,U.identifier=Ee(this.sliceSerialize(N)).toLowerCase(),this.data.referenceType="full"}function P(N){this.data.characterReferenceType=N.type}function M(N){const A=this.sliceSerialize(N),U=this.data.characterReferenceType;let W;U?(W=ea(A,U==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):W=zn(A);const re=this.stack[this.stack.length-1];re.value+=W}function q(N){const A=this.stack.pop();A.position.end=Le(N.end)}function Q(N){S.call(this,N);const A=this.stack[this.stack.length-1];A.url=this.sliceSerialize(N)}function K(N){S.call(this,N);const A=this.stack[this.stack.length-1];A.url="mailto:"+this.sliceSerialize(N)}function te(){return{type:"blockquote",children:[]}}function oe(){return{type:"code",lang:null,meta:null,value:""}}function pe(){return{type:"inlineCode",value:""}}function ae(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function je(){return{type:"emphasis",children:[]}}function le(){return{type:"heading",depth:0,children:[]}}function ue(){return{type:"break"}}function he(){return{type:"html",value:""}}function Ne(){return{type:"image",title:null,url:"",alt:null}}function ye(){return{type:"link",title:null,url:"",children:[]}}function _e(N){return{type:"list",ordered:N.type==="listOrdered",start:null,spread:N._spread,children:[]}}function Me(N){return{type:"listItem",spread:N._spread,checked:null,children:[]}}function we(){return{type:"paragraph",children:[]}}function Ze(){return{type:"strong",children:[]}}function He(){return{type:"text",value:""}}function et(){return{type:"thematicBreak"}}}function Le(e){return{line:e.line,column:e.column,offset:e.offset}}function da(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?da(e,r):Ic(e,r)}}function Ic(e,n){let t;for(t in n)if(ca.call(n,t))switch(t){case"canContainEols":{const r=n[t];r&&e[t].push(...r);break}case"transforms":{const r=n[t];r&&e[t].push(...r);break}case"enter":case"exit":{const r=n[t];r&&Object.assign(e[t],r);break}}}function Rr(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+ut({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+ut({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+ut({start:n.start,end:n.end})+") is still open")}function Pc(e){const n=this;n.parser=t;function t(r){return Nc(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function Rc(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function Fc(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`
|
|
15
|
+
`}]}function Tc(e,n){const t=n.value?n.value+`
|
|
16
|
+
`:"",r={},i=n.lang?n.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(a.data={meta:n.meta}),e.patch(n,a),a=e.applyData(n,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(n,a),a}function Dc(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function _c(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Lc(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),i=Ke(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+1,o+=1,e.footnoteCounts.set(r,o);const u={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+i,id:t+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(n,u);const l={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(n,l),e.applyData(n,l)}function zc(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Oc(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function fa(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const i=e.all(n),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function Mc(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return fa(e,n);const i={src:Ke(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,a),e.applyData(n,a)}function $c(e,n){const t={src:Ke(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function Bc(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function Vc(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return fa(e,n);const i={href:Ke(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function Hc(e,n){const t={href:Ke(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Uc(e,n,t){const r=e.all(n),i=t?qc(t):pa(n),a={},s=[];if(typeof n.checked=="boolean"){const c=r[0];let d;c&&c.type==="element"&&c.tagName==="p"?d=c:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const c=r[o];(i||o!==0||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
|
|
17
|
+
`}),c.type==="element"&&c.tagName==="p"&&!i?s.push(...c.children):s.push(c)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&s.push({type:"text",value:`
|
|
18
|
+
`});const l={type:"element",tagName:"li",properties:a,children:s};return e.patch(n,l),e.applyData(n,l)}function qc(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r<t.length;)n=pa(t[r])}return n}function pa(e){const n=e.spread;return n??e.children.length>1}function Gc(e,n){const t={},r=e.all(n);let i=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const a={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(r,!0)};return e.patch(n,a),e.applyData(n,a)}function Wc(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Yc(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)}function Xc(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Qc(e,n){const t=e.all(n),r=t.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],s),i.push(s)}if(t.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},o=Fn(n.children[1]),u=Gi(n.children[n.children.length-1]);o&&u&&(s.position={start:o,end:u}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(n,a),e.applyData(n,a)}function Jc(e,n,t){const r=t?t.children:void 0,a=(r?r.indexOf(n):1)===0?"th":"td",s=t&&t.type==="table"?t.align:void 0,o=s?s.length:n.children.length;let u=-1;const l=[];for(;++u<o;){const d=n.children[u],f={},h=s?s[u]:void 0;h&&(f.align=h);let x={type:"element",tagName:a,properties:f,children:[]};d&&(x.children=e.all(d),e.patch(d,x),x=e.applyData(d,x)),l.push(x)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(n,c),e.applyData(n,c)}function Kc(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const Fr=9,Tr=32;function Zc(e){const n=String(e),t=/\r?\n|\r/g;let r=t.exec(n),i=0;const a=[];for(;r;)a.push(Dr(n.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=t.exec(n);return a.push(Dr(n.slice(i),i>0,!1)),a.join("")}function Dr(e,n,t){let r=0,i=e.length;if(n){let a=e.codePointAt(r);for(;a===Fr||a===Tr;)r++,a=e.codePointAt(r)}if(t){let a=e.codePointAt(i-1);for(;a===Fr||a===Tr;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function ed(e,n){const t={type:"text",value:Zc(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function td(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const nd={blockquote:Rc,break:Fc,code:Tc,delete:Dc,emphasis:_c,footnoteReference:Lc,heading:zc,html:Oc,imageReference:Mc,image:$c,inlineCode:Bc,linkReference:Vc,link:Hc,listItem:Uc,list:Gc,paragraph:Wc,root:Yc,strong:Xc,table:Qc,tableCell:Kc,tableRow:Jc,text:ed,thematicBreak:td,toml:kt,yaml:kt,definition:kt,footnoteDefinition:kt};function kt(){}const ha=-1,Bt=0,dt=1,Tt=2,Mn=3,$n=4,Bn=5,Vn=6,ma=7,ga=8,_r=typeof self=="object"?self:globalThis,rd=(e,n)=>{const t=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,s]=n[i];switch(a){case Bt:case ha:return t(s,i);case dt:{const o=t([],i);for(const u of s)o.push(r(u));return o}case Tt:{const o=t({},i);for(const[u,l]of s)o[r(u)]=r(l);return o}case Mn:return t(new Date(s),i);case $n:{const{source:o,flags:u}=s;return t(new RegExp(o,u),i)}case Bn:{const o=t(new Map,i);for(const[u,l]of s)o.set(r(u),r(l));return o}case Vn:{const o=t(new Set,i);for(const u of s)o.add(r(u));return o}case ma:{const{name:o,message:u}=s;return t(new _r[o](u),i)}case ga:return t(BigInt(s),i);case"BigInt":return t(Object(BigInt(s)),i);case"ArrayBuffer":return t(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:o}=new Uint8Array(s);return t(new DataView(o),s)}}return t(new _r[a](s),i)};return r},Lr=e=>rd(new Map,e)(0),We="",{toString:id}={},{keys:ad}=Object,lt=e=>{const n=typeof e;if(n!=="object"||!e)return[Bt,n];const t=id.call(e).slice(8,-1);switch(t){case"Array":return[dt,We];case"Object":return[Tt,We];case"Date":return[Mn,We];case"RegExp":return[$n,We];case"Map":return[Bn,We];case"Set":return[Vn,We];case"DataView":return[dt,t]}return t.includes("Array")?[dt,t]:t.includes("Error")?[ma,t]:[Tt,t]},vt=([e,n])=>e===Bt&&(n==="function"||n==="symbol"),sd=(e,n,t,r)=>{const i=(s,o)=>{const u=r.push(s)-1;return t.set(o,u),u},a=s=>{if(t.has(s))return t.get(s);let[o,u]=lt(s);switch(o){case Bt:{let c=s;switch(u){case"bigint":o=ga,c=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);c=null;break;case"undefined":return i([ha],s)}return i([o,c],s)}case dt:{if(u){let f=s;return u==="DataView"?f=new Uint8Array(s.buffer):u==="ArrayBuffer"&&(f=new Uint8Array(s)),i([u,[...f]],s)}const c=[],d=i([o,c],s);for(const f of s)c.push(a(f));return d}case Tt:{if(u)switch(u){case"BigInt":return i([u,s.toString()],s);case"Boolean":case"Number":case"String":return i([u,s.valueOf()],s)}if(n&&"toJSON"in s)return a(s.toJSON());const c=[],d=i([o,c],s);for(const f of ad(s))(e||!vt(lt(s[f])))&&c.push([a(f),a(s[f])]);return d}case Mn:return i([o,s.toISOString()],s);case $n:{const{source:c,flags:d}=s;return i([o,{source:c,flags:d}],s)}case Bn:{const c=[],d=i([o,c],s);for(const[f,h]of s)(e||!(vt(lt(f))||vt(lt(h))))&&c.push([a(f),a(h)]);return d}case Vn:{const c=[],d=i([o,c],s);for(const f of s)(e||!vt(lt(f)))&&c.push(a(f));return d}}const{message:l}=s;return i([o,{name:u,message:l}],s)};return a},zr=(e,{json:n,lossy:t}={})=>{const r=[];return sd(!(n||t),!!n,new Map,r)(e),r},Dt=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?Lr(zr(e,n)):structuredClone(e):(e,n)=>Lr(zr(e,n));function od(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function ld(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function ud(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||od,r=e.options.footnoteBackLabel||ld,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let u=-1;for(;++u<e.footnoteOrder.length;){const l=e.footnoteById.get(e.footnoteOrder[u]);if(!l)continue;const c=e.all(l),d=String(l.identifier).toUpperCase(),f=Ke(d.toLowerCase());let h=0;const x=[],w=e.footnoteCounts.get(d);for(;w!==void 0&&++h<=w;){x.length>0&&x.push({type:"text",value:" "});let C=typeof t=="string"?t:t(u,h);typeof C=="string"&&(C={type:"text",value:C}),x.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+f+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,h),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const k=c[c.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const C=k.children[k.children.length-1];C&&C.type==="text"?C.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...x)}else c.push(...x);const b={type:"element",tagName:"li",properties:{id:n+"fn-"+f},children:e.wrap(c,!0)};e.patch(l,b),o.push(b)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Dt(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
19
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
|
|
20
|
+
`}]}}const Vt=(function(e){if(e==null)return pd;if(typeof e=="function")return Ht(e);if(typeof e=="object")return Array.isArray(e)?cd(e):dd(e);if(typeof e=="string")return fd(e);throw new Error("Expected function, string, or object as test")});function cd(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=Vt(e[t]);return Ht(r);function r(...i){let a=-1;for(;++a<n.length;)if(n[a].apply(this,i))return!0;return!1}}function dd(e){const n=e;return Ht(t);function t(r){const i=r;let a;for(a in e)if(i[a]!==n[a])return!1;return!0}}function fd(e){return Ht(n);function n(t){return t&&t.type===e}}function Ht(e){return n;function n(t,r,i){return!!(hd(t)&&e.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function pd(){return!0}function hd(e){return e!==null&&typeof e=="object"&&"type"in e}const xa=[],md=!0,bn=!1,gd="skip";function ba(e,n,t,r){let i;typeof n=="function"&&typeof t!="function"?(r=t,t=n):i=n;const a=Vt(i),s=r?-1:1;o(e,void 0,[])();function o(u,l,c){const d=u&&typeof u=="object"?u:{};if(typeof d.type=="string"){const h=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(u.type+(h?"<"+h+">":""))+")"})}return f;function f(){let h=xa,x,w,k;if((!n||a(u,l,c[c.length-1]||void 0))&&(h=xd(t(u,c)),h[0]===bn))return h;if("children"in u&&u.children){const b=u;if(b.children&&h[0]!==gd)for(w=(r?b.children.length:-1)+s,k=c.concat(b);w>-1&&w<b.children.length;){const C=b.children[w];if(x=o(C,w,k)(),x[0]===bn)return x;w=typeof x[1]=="number"?x[1]:w+s}}return h}}}function xd(e){return Array.isArray(e)?e:typeof e=="number"?[md,e]:e==null?xa:[e]}function Hn(e,n,t,r){let i,a,s;typeof n=="function"&&typeof t!="function"?(a=void 0,s=n,i=t):(a=n,s=t,i=r),ba(e,a,o,i);function o(u,l){const c=l[l.length-1],d=c?c.children.indexOf(u):void 0;return s(u,d,c)}}const yn={}.hasOwnProperty,bd={};function yd(e,n){const t=n||bd,r=new Map,i=new Map,a=new Map,s={...nd,...t.handlers},o={all:l,applyData:kd,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:u,options:t,patch:wd,wrap:Cd};return Hn(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const d=c.type==="definition"?r:i,f=String(c.identifier).toUpperCase();d.has(f)||d.set(f,c)}}),o;function u(c,d){const f=c.type,h=o.handlers[f];if(yn.call(o.handlers,f)&&h)return h(o,c,d);if(o.options.passThrough&&o.options.passThrough.includes(f)){if("children"in c){const{children:w,...k}=c,b=Dt(k);return b.children=o.all(c),b}return Dt(c)}return(o.options.unknownHandler||vd)(o,c,d)}function l(c){const d=[];if("children"in c){const f=c.children;let h=-1;for(;++h<f.length;){const x=o.one(f[h],c);if(x){if(h&&f[h-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=Or(x.value)),!Array.isArray(x)&&x.type==="element")){const w=x.children[0];w&&w.type==="text"&&(w.value=Or(w.value))}Array.isArray(x)?d.push(...x):d.push(x)}}}return d}}function wd(e,n){e.position&&(n.position=ll(e))}function kd(e,n){let t=n;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(t.type==="element")t.tagName=r;else{const s="children"in t?t.children:[t];t={type:"element",tagName:r,properties:{},children:s}}t.type==="element"&&a&&Object.assign(t.properties,Dt(a)),"children"in t&&t.children&&i!==null&&i!==void 0&&(t.children=i)}return t}function vd(e,n){const t=n.data||{},r="value"in n&&!(yn.call(t,"hProperties")||yn.call(t,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Cd(e,n){const t=[];let r=-1;for(n&&t.push({type:"text",value:`
|
|
21
|
+
`});++r<e.length;)r&&t.push({type:"text",value:`
|
|
22
|
+
`}),t.push(e[r]);return n&&e.length>0&&t.push({type:"text",value:`
|
|
23
|
+
`}),t}function Or(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function Mr(e,n){const t=yd(e,n),r=t.one(e,void 0),i=ud(t),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
|
|
24
|
+
`},i),a}function jd(e,n){return e&&"run"in e?async function(t,r){const i=Mr(t,{file:r,...n});await e.run(i,r)}:function(t,r){return Mr(t,{file:r,...e||n})}}function $r(e){if(e)throw e}var Jt,Br;function Sd(){if(Br)return Jt;Br=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(l){return typeof Array.isArray=="function"?Array.isArray(l):n.call(l)==="[object Array]"},a=function(l){if(!l||n.call(l)!=="[object Object]")return!1;var c=e.call(l,"constructor"),d=l.constructor&&l.constructor.prototype&&e.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!c&&!d)return!1;var f;for(f in l);return typeof f>"u"||e.call(l,f)},s=function(l,c){t&&c.name==="__proto__"?t(l,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):l[c.name]=c.newValue},o=function(l,c){if(c==="__proto__")if(e.call(l,c)){if(r)return r(l,c).value}else return;return l[c]};return Jt=function u(){var l,c,d,f,h,x,w=arguments[0],k=1,b=arguments.length,C=!1;for(typeof w=="boolean"&&(C=w,w=arguments[1]||{},k=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});k<b;++k)if(l=arguments[k],l!=null)for(c in l)d=o(w,c),f=o(l,c),w!==f&&(C&&f&&(a(f)||(h=i(f)))?(h?(h=!1,x=d&&i(d)?d:[]):x=d&&a(d)?d:{},s(w,{name:c,newValue:u(C,x,f)})):typeof f<"u"&&s(w,{name:c,newValue:f}));return w},Jt}var Ed=Sd();const Kt=ji(Ed);function wn(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Nd(){const e=[],n={run:t,use:r};return n;function t(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);o(null,...i);function o(u,...l){const c=e[++a];let d=-1;if(u){s(u);return}for(;++d<i.length;)(l[d]===null||l[d]===void 0)&&(l[d]=i[d]);i=l,c?Ad(c,o)(...l):s(null,...l)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function Ad(e,n){let t;return r;function r(...s){const o=e.length>s.length;let u;o&&s.push(i);try{u=e.apply(this,s)}catch(l){const c=l;if(o&&t)throw c;return i(c)}o||(u&&u.then&&typeof u.then=="function"?u.then(a,i):u instanceof Error?i(u):a(u))}function i(s,...o){t||(t=!0,n(s,...o))}function a(s){i(null,s)}}const Ae={basename:Id,dirname:Pd,extname:Rd,join:Fd,sep:"/"};function Id(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');bt(e);let t=0,r=-1,i=e.length,a;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){t=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let s=-1,o=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){t=i+1;break}}else s<0&&(a=!0,s=i+1),o>-1&&(e.codePointAt(i)===n.codePointAt(o--)?o<0&&(r=i):(o=-1,r=s));return t===r?r=s:r<0&&(r=e.length),e.slice(t,r)}function Pd(e){if(bt(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function Rd(e){bt(e);let n=e.length,t=-1,r=0,i=-1,a=0,s;for(;n--;){const o=e.codePointAt(n);if(o===47){if(s){r=n+1;break}continue}t<0&&(s=!0,t=n+1),o===46?i<0?i=n:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||t<0||a===0||a===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function Fd(...e){let n=-1,t;for(;++n<e.length;)bt(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":Td(t)}function Td(e){bt(e);const n=e.codePointAt(0)===47;let t=Dd(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function Dd(e,n){let t="",r=0,i=-1,a=0,s=-1,o,u;for(;++s<=e.length;){if(s<e.length)o=e.codePointAt(s);else{if(o===47)break;o=47}if(o===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(u=t.lastIndexOf("/"),u!==t.length-1){u<0?(t="",r=0):(t=t.slice(0,u),r=t.length-1-t.lastIndexOf("/")),i=s,a=0;continue}}else if(t.length>0){t="",r=0,i=s,a=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,s):t=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===46&&a>-1?a++:a=-1}return t}function bt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const _d={cwd:Ld};function Ld(){return"/"}function kn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function zd(e){if(typeof e=="string")e=new URL(e);else if(!kn(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return Od(e)}function Od(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const n=e.pathname;let t=-1;for(;++t<n.length;)if(n.codePointAt(t)===37&&n.codePointAt(t+1)===50){const r=n.codePointAt(t+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(n)}const Zt=["history","path","basename","stem","extname","dirname"];class ya{constructor(n){let t;n?kn(n)?t={path:n}:typeof n=="string"||Md(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":_d.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Zt.length;){const a=Zt[r];a in t&&t[a]!==void 0&&t[a]!==null&&(this[a]=a==="history"?[...t[a]]:t[a])}let i;for(i in t)Zt.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?Ae.basename(this.path):void 0}set basename(n){tn(n,"basename"),en(n,"basename"),this.path=Ae.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?Ae.dirname(this.path):void 0}set dirname(n){Vr(this.basename,"dirname"),this.path=Ae.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?Ae.extname(this.path):void 0}set extname(n){if(en(n,"extname"),Vr(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ae.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){kn(n)&&(n=zd(n)),tn(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?Ae.basename(this.path,this.extname):void 0}set stem(n){tn(n,"stem"),en(n,"stem"),this.path=Ae.join(this.dirname||"",n+(this.extname||""))}fail(n,t,r){const i=this.message(n,t,r);throw i.fatal=!0,i}info(n,t,r){const i=this.message(n,t,r);return i.fatal=void 0,i}message(n,t,r){const i=new de(n,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function en(e,n){if(e&&e.includes(Ae.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+Ae.sep+"`")}function tn(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function Vr(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function Md(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const $d=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),Bd={}.hasOwnProperty;class Un extends $d{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Nd()}copy(){const n=new Un;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data(Kt(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(an("data",this.frozen),this.namespace[n]=t,this):Bd.call(this.namespace,n)&&this.namespace[n]||void 0:n?(an("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=t.call(n,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const t=Ct(n),r=this.parser||this.Parser;return nn("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),nn("process",this.parser||this.Parser),rn("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(a,s){const o=Ct(n),u=r.parse(o);r.run(u,o,function(c,d,f){if(c||!d||!f)return l(c);const h=d,x=r.stringify(h,f);Ud(x)?f.value=x:f.result=x,l(c,f)});function l(c,d){c||!d?s(c):a?a(d):t(void 0,d)}}}processSync(n){let t=!1,r;return this.freeze(),nn("processSync",this.parser||this.Parser),rn("processSync",this.compiler||this.Compiler),this.process(n,i),Ur("processSync","process",t),r;function i(a,s){t=!0,$r(a),r=s}}run(n,t,r){Hr(n),this.freeze();const i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?a(void 0,r):new Promise(a);function a(s,o){const u=Ct(t);i.run(n,u,l);function l(c,d,f){const h=d||n;c?o(c):s?s(h):r(void 0,h,f)}}}runSync(n,t){let r=!1,i;return this.run(n,t,a),Ur("runSync","run",r),i;function a(s,o){$r(s),i=o,r=!0}}stringify(n,t){this.freeze();const r=Ct(t),i=this.compiler||this.Compiler;return rn("stringify",i),Hr(n),i(n,r)}use(n,...t){const r=this.attachers,i=this.namespace;if(an("use",this.frozen),n!=null)if(typeof n=="function")u(n,t);else if(typeof n=="object")Array.isArray(n)?o(n):s(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function a(l){if(typeof l=="function")u(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[c,...d]=l;u(c,d)}else s(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function s(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(l.plugins),l.settings&&(i.settings=Kt(!0,i.settings,l.settings))}function o(l){let c=-1;if(l!=null)if(Array.isArray(l))for(;++c<l.length;){const d=l[c];a(d)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function u(l,c){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===l){f=d;break}if(f===-1)r.push([l,...c]);else if(c.length>0){let[h,...x]=c;const w=r[f][1];wn(w)&&wn(h)&&(h=Kt(!0,w,h)),r[f]=[l,h,...x]}}}}const Vd=new Un().freeze();function nn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function rn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function an(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Hr(e){if(!wn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ur(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Ct(e){return Hd(e)?e:new ya(e)}function Hd(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Ud(e){return typeof e=="string"||qd(e)}function qd(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Gd="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",qr=[],Gr={allowDangerousHtml:!0},Wd=/^(https?|ircs?|mailto|xmpp)$/i,Yd=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Wr(e){const n=Xd(e),t=Qd(e);return Jd(n.runSync(n.parse(t),t),e)}function Xd(e){const n=e.rehypePlugins||qr,t=e.remarkPlugins||qr,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Gr}:Gr;return Vd().use(Pc).use(t).use(jd,r).use(n)}function Qd(e){const n=e.children||"",t=new ya;return typeof n=="string"&&(t.value=n),t}function Jd(e,n){const t=n.allowedElements,r=n.allowElement,i=n.components,a=n.disallowedElements,s=n.skipHtml,o=n.unwrapDisallowed,u=n.urlTransform||Kd;for(const c of Yd)Object.hasOwn(n,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+Gd+c.id,void 0);return Hn(e,l),pl(e,{Fragment:p.Fragment,components:i,ignoreInvalidStyle:!0,jsx:p.jsx,jsxs:p.jsxs,passKeys:!0,passNode:!0});function l(c,d,f){if(c.type==="raw"&&f&&typeof d=="number")return s?f.children.splice(d,1):f.children[d]={type:"text",value:c.value},d;if(c.type==="element"){let h;for(h in Yt)if(Object.hasOwn(Yt,h)&&Object.hasOwn(c.properties,h)){const x=c.properties[h],w=Yt[h];(w===null||w.includes(c.tagName))&&(c.properties[h]=u(String(x||""),h,c))}}if(c.type==="element"){let h=t?!t.includes(c.tagName):a?a.includes(c.tagName):!1;if(!h&&r&&typeof d=="number"&&(h=!r(c,d,f)),h&&f&&typeof d=="number")return o&&c.children?f.children.splice(d,1,...c.children):f.children.splice(d,1),d}}}function Kd(e){const n=e.indexOf(":"),t=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return n===-1||i!==-1&&n>i||t!==-1&&n>t||r!==-1&&n>r||Wd.test(e.slice(0,n))?e:""}function Zd(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function ef(e,n,t){const i=Vt((t||{}).ignore||[]),a=tf(n);let s=-1;for(;++s<a.length;)ba(e,"text",o);function o(l,c){let d=-1,f;for(;++d<c.length;){const h=c[d],x=f?f.children:void 0;if(i(h,x?x.indexOf(h):void 0,f))return;f=h}if(f)return u(l,c)}function u(l,c){const d=c[c.length-1],f=a[s][0],h=a[s][1];let x=0;const k=d.children.indexOf(l);let b=!1,C=[];f.lastIndex=0;let j=f.exec(l.value);for(;j;){const I=j.index,E={index:j.index,input:j.input,stack:[...c,l]};let v=h(...j,E);if(typeof v=="string"&&(v=v.length>0?{type:"text",value:v}:void 0),v===!1?f.lastIndex=I+1:(x!==I&&C.push({type:"text",value:l.value.slice(x,I)}),Array.isArray(v)?C.push(...v):v&&C.push(v),x=I+j[0].length,b=!0),!f.global)break;j=f.exec(l.value)}return b?(x<l.value.length&&C.push({type:"text",value:l.value.slice(x)}),d.children.splice(k,1,...C)):C=[l],k+C.length}}function tf(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<t.length;){const i=t[r];n.push([nf(i[0]),rf(i[1])])}return n}function nf(e){return typeof e=="string"?new RegExp(Zd(e),"g"):e}function rf(e){return typeof e=="function"?e:function(){return e}}const sn="phrasing",on=["autolink","link","image","label"];function af(){return{transforms:[ff],enter:{literalAutolink:of,literalAutolinkEmail:ln,literalAutolinkHttp:ln,literalAutolinkWww:ln},exit:{literalAutolink:df,literalAutolinkEmail:cf,literalAutolinkHttp:lf,literalAutolinkWww:uf}}}function sf(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:sn,notInConstruct:on},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:sn,notInConstruct:on},{character:":",before:"[ps]",after:"\\/",inConstruct:sn,notInConstruct:on}]}}function of(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ln(e){this.config.enter.autolinkProtocol.call(this,e)}function lf(e){this.config.exit.autolinkProtocol.call(this,e)}function uf(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function cf(e){this.config.exit.autolinkEmail.call(this,e)}function df(e){this.exit(e)}function ff(e){ef(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,pf],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,hf]],{ignore:["link","linkReference"]})}function pf(e,n,t,r,i){let a="";if(!wa(i)||(/^w/i.test(n)&&(t=n+t,n="",a="http://"),!mf(t)))return!1;const s=gf(t+r);if(!s[0])return!1;const o={type:"link",title:null,url:a+n+s[0],children:[{type:"text",value:n+s[0]}]};return s[1]?[o,{type:"text",value:s[1]}]:o}function hf(e,n,t,r){return!wa(r,!0)||/[-\d_]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+t,children:[{type:"text",value:n+"@"+t}]}}function mf(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function gf(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const i=nr(e,"(");let a=nr(e,")");for(;r!==-1&&i>a;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),a++;return[e,t]}function wa(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||Ve(t)||Mt(t))&&(!n||t!==47)}ka.peek=Sf;function xf(){this.buffer()}function bf(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function yf(){this.buffer()}function wf(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function kf(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Ee(this.sliceSerialize(e)).toLowerCase(),t.label=n}function vf(e){this.exit(e)}function Cf(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Ee(this.sliceSerialize(e)).toLowerCase(),t.label=n}function jf(e){this.exit(e)}function Sf(){return"["}function ka(e,n,t,r){const i=t.createTracker(r);let a=i.move("[^");const s=t.enter("footnoteReference"),o=t.enter("reference");return a+=i.move(t.safe(t.associationId(e),{after:"]",before:a})),o(),s(),a+=i.move("]"),a}function Ef(){return{enter:{gfmFootnoteCallString:xf,gfmFootnoteCall:bf,gfmFootnoteDefinitionLabelString:yf,gfmFootnoteDefinition:wf},exit:{gfmFootnoteCallString:kf,gfmFootnoteCall:vf,gfmFootnoteDefinitionLabelString:Cf,gfmFootnoteDefinition:jf}}}function Nf(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:ka},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,i,a,s){const o=a.createTracker(s);let u=o.move("[^");const l=a.enter("footnoteDefinition"),c=a.enter("label");return u+=o.move(a.safe(a.associationId(r),{before:u,after:"]"})),c(),u+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),u+=o.move((n?`
|
|
25
|
+
`:" ")+a.indentLines(a.containerFlow(r,o.current()),n?va:Af))),l(),u}}function Af(e,n,t){return n===0?e:va(e,n,t)}function va(e,n,t){return(t?"":" ")+e}const If=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ca.peek=Df;function Pf(){return{canContainEols:["delete"],enter:{strikethrough:Ff},exit:{strikethrough:Tf}}}function Rf(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:If}],handlers:{delete:Ca}}}function Ff(e){this.enter({type:"delete",children:[]},e)}function Tf(e){this.exit(e)}function Ca(e,n,t,r){const i=t.createTracker(r),a=t.enter("strikethrough");let s=i.move("~~");return s+=t.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function Df(){return"~"}function _f(e){return e.length}function Lf(e,n){const t=n||{},r=(t.align||[]).concat(),i=t.stringLength||_f,a=[],s=[],o=[],u=[];let l=0,c=-1;for(;++c<e.length;){const w=[],k=[];let b=-1;for(e[c].length>l&&(l=e[c].length);++b<e[c].length;){const C=zf(e[c][b]);if(t.alignDelimiters!==!1){const j=i(C);k[b]=j,(u[b]===void 0||j>u[b])&&(u[b]=j)}w.push(C)}s[c]=w,o[c]=k}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<l;)a[d]=Yr(r[d]);else{const w=Yr(r);for(;++d<l;)a[d]=w}d=-1;const f=[],h=[];for(;++d<l;){const w=a[d];let k="",b="";w===99?(k=":",b=":"):w===108?k=":":w===114&&(b=":");let C=t.alignDelimiters===!1?1:Math.max(1,u[d]-k.length-b.length);const j=k+"-".repeat(C)+b;t.alignDelimiters!==!1&&(C=k.length+C+b.length,C>u[d]&&(u[d]=C),h[d]=C),f[d]=j}s.splice(1,0,f),o.splice(1,0,h),c=-1;const x=[];for(;++c<s.length;){const w=s[c],k=o[c];d=-1;const b=[];for(;++d<l;){const C=w[d]||"";let j="",I="";if(t.alignDelimiters!==!1){const E=u[d]-(k[d]||0),v=a[d];v===114?j=" ".repeat(E):v===99?E%2?(j=" ".repeat(E/2+.5),I=" ".repeat(E/2-.5)):(j=" ".repeat(E/2),I=j):I=" ".repeat(E)}t.delimiterStart!==!1&&!d&&b.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&C==="")&&(t.delimiterStart!==!1||d)&&b.push(" "),t.alignDelimiters!==!1&&b.push(j),b.push(C),t.alignDelimiters!==!1&&b.push(I),t.padding!==!1&&b.push(" "),(t.delimiterEnd!==!1||d!==l-1)&&b.push("|")}x.push(t.delimiterEnd===!1?b.join("").replace(/ +$/,""):b.join(""))}return x.join(`
|
|
26
|
+
`)}function zf(e){return e==null?"":String(e)}function Yr(e){const n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}function Of(e,n,t,r){const i=t.enter("blockquote"),a=t.createTracker(r);a.move("> "),a.shift(2);const s=t.indentLines(t.containerFlow(e,a.current()),Mf);return i(),s}function Mf(e,n,t){return">"+(t?"":" ")+e}function $f(e,n){return Xr(e,n.inConstruct,!0)&&!Xr(e,n.notInConstruct,!1)}function Xr(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++r<n.length;)if(e.includes(n[r]))return!0;return!1}function Qr(e,n,t,r){let i=-1;for(;++i<t.unsafe.length;)if(t.unsafe[i].character===`
|
|
27
|
+
`&&$f(t.stack,t.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
28
|
+
`}function Bf(e,n){const t=String(e);let r=t.indexOf(n),i=r,a=0,s=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>s&&(s=a):a=1,i=r+n.length,r=t.indexOf(n,i);return s}function Vf(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Hf(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function Uf(e,n,t,r){const i=Hf(t),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(Vf(e,t)){const d=t.enter("codeIndented"),f=t.indentLines(a,qf);return d(),f}const o=t.createTracker(r),u=i.repeat(Math.max(Bf(a,i)+1,3)),l=t.enter("codeFenced");let c=o.move(u);if(e.lang){const d=t.enter(`codeFencedLang${s}`);c+=o.move(t.safe(e.lang,{before:c,after:" ",encode:["`"],...o.current()})),d()}if(e.lang&&e.meta){const d=t.enter(`codeFencedMeta${s}`);c+=o.move(" "),c+=o.move(t.safe(e.meta,{before:c,after:`
|
|
29
|
+
`,encode:["`"],...o.current()})),d()}return c+=o.move(`
|
|
30
|
+
`),a&&(c+=o.move(a+`
|
|
31
|
+
`)),c+=o.move(u),l(),c}function qf(e,n,t){return(t?"":" ")+e}function qn(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function Gf(e,n,t,r){const i=qn(t),a=i==='"'?"Quote":"Apostrophe",s=t.enter("definition");let o=t.enter("label");const u=t.createTracker(r);let l=u.move("[");return l+=u.move(t.safe(t.associationId(e),{before:l,after:"]",...u.current()})),l+=u.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=t.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(t.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(o=t.enter("destinationRaw"),l+=u.move(t.safe(e.url,{before:l,after:e.title?" ":`
|
|
32
|
+
`,...u.current()}))),o(),e.title&&(o=t.enter(`title${a}`),l+=u.move(" "+i),l+=u.move(t.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),o()),s(),l}function Wf(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function ht(e){return"&#x"+e.toString(16).toUpperCase()+";"}function _t(e,n,t){const r=Qe(e),i=Qe(n);return r===void 0?i===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}ja.peek=Yf;function ja(e,n,t,r){const i=Wf(t),a=t.enter("emphasis"),s=t.createTracker(r),o=s.move(i);let u=s.move(t.containerPhrasing(e,{after:i,before:o,...s.current()}));const l=u.charCodeAt(0),c=_t(r.before.charCodeAt(r.before.length-1),l,i);c.inside&&(u=ht(l)+u.slice(1));const d=u.charCodeAt(u.length-1),f=_t(r.after.charCodeAt(0),d,i);f.inside&&(u=u.slice(0,-1)+ht(d));const h=s.move(i);return a(),t.attentionEncodeSurroundingInfo={after:f.outside,before:c.outside},o+u+h}function Yf(e,n,t){return t.options.emphasis||"*"}function Xf(e,n){let t=!1;return Hn(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,bn}),!!((!e.depth||e.depth<3)&&Ln(e)&&(n.options.setext||t))}function Qf(e,n,t,r){const i=Math.max(Math.min(6,e.depth||1),1),a=t.createTracker(r);if(Xf(e,t)){const c=t.enter("headingSetext"),d=t.enter("phrasing"),f=t.containerPhrasing(e,{...a.current(),before:`
|
|
33
|
+
`,after:`
|
|
34
|
+
`});return d(),c(),f+`
|
|
35
|
+
`+(i===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
|
|
36
|
+
`))+1))}const s="#".repeat(i),o=t.enter("headingAtx"),u=t.enter("phrasing");a.move(s+" ");let l=t.containerPhrasing(e,{before:"# ",after:`
|
|
37
|
+
`,...a.current()});return/^[\t ]/.test(l)&&(l=ht(l.charCodeAt(0))+l.slice(1)),l=l?s+" "+l:s,t.options.closeAtx&&(l+=" "+s),u(),o(),l}Sa.peek=Jf;function Sa(e){return e.value||""}function Jf(){return"<"}Ea.peek=Kf;function Ea(e,n,t,r){const i=qn(t),a=i==='"'?"Quote":"Apostrophe",s=t.enter("image");let o=t.enter("label");const u=t.createTracker(r);let l=u.move("![");return l+=u.move(t.safe(e.alt,{before:l,after:"]",...u.current()})),l+=u.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=t.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(t.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(o=t.enter("destinationRaw"),l+=u.move(t.safe(e.url,{before:l,after:e.title?" ":")",...u.current()}))),o(),e.title&&(o=t.enter(`title${a}`),l+=u.move(" "+i),l+=u.move(t.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),o()),l+=u.move(")"),s(),l}function Kf(){return"!"}Na.peek=Zf;function Na(e,n,t,r){const i=e.referenceType,a=t.enter("imageReference");let s=t.enter("label");const o=t.createTracker(r);let u=o.move("![");const l=t.safe(e.alt,{before:u,after:"]",...o.current()});u+=o.move(l+"]["),s();const c=t.stack;t.stack=[],s=t.enter("reference");const d=t.safe(t.associationId(e),{before:u,after:"]",...o.current()});return s(),t.stack=c,a(),i==="full"||!l||l!==d?u+=o.move(d+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function Zf(){return"!"}Aa.peek=ep;function Aa(e,n,t){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<t.unsafe.length;){const s=t.unsafe[a],o=t.compilePattern(s);let u;if(s.atBreak)for(;u=o.exec(r);){let l=u.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(u.index+1)}}return i+r+i}function ep(){return"`"}function Ia(e,n){const t=Ln(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(t===e.url||"mailto:"+t===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Pa.peek=tp;function Pa(e,n,t,r){const i=qn(t),a=i==='"'?"Quote":"Apostrophe",s=t.createTracker(r);let o,u;if(Ia(e,t)){const c=t.stack;t.stack=[],o=t.enter("autolink");let d=s.move("<");return d+=s.move(t.containerPhrasing(e,{before:d,after:">",...s.current()})),d+=s.move(">"),o(),t.stack=c,d}o=t.enter("link"),u=t.enter("label");let l=s.move("[");return l+=s.move(t.containerPhrasing(e,{before:l,after:"](",...s.current()})),l+=s.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=t.enter("destinationLiteral"),l+=s.move("<"),l+=s.move(t.safe(e.url,{before:l,after:">",...s.current()})),l+=s.move(">")):(u=t.enter("destinationRaw"),l+=s.move(t.safe(e.url,{before:l,after:e.title?" ":")",...s.current()}))),u(),e.title&&(u=t.enter(`title${a}`),l+=s.move(" "+i),l+=s.move(t.safe(e.title,{before:l,after:i,...s.current()})),l+=s.move(i),u()),l+=s.move(")"),o(),l}function tp(e,n,t){return Ia(e,t)?"<":"["}Ra.peek=np;function Ra(e,n,t,r){const i=e.referenceType,a=t.enter("linkReference");let s=t.enter("label");const o=t.createTracker(r);let u=o.move("[");const l=t.containerPhrasing(e,{before:u,after:"]",...o.current()});u+=o.move(l+"]["),s();const c=t.stack;t.stack=[],s=t.enter("reference");const d=t.safe(t.associationId(e),{before:u,after:"]",...o.current()});return s(),t.stack=c,a(),i==="full"||!l||l!==d?u+=o.move(d+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function np(){return"["}function Gn(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function rp(e){const n=Gn(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function ip(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function Fa(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function ap(e,n,t,r){const i=t.enter("list"),a=t.bulletCurrent;let s=e.ordered?ip(t):Gn(t);const o=e.ordered?s==="."?")":".":rp(t);let u=n&&t.bulletLastUsed?s===t.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&c&&(!c.children||!c.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(u=!0),Fa(t)===s&&c){let d=-1;for(;++d<e.children.length;){const f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(s=o),t.bulletCurrent=s;const l=t.containerFlow(e,r);return t.bulletLastUsed=s,t.bulletCurrent=a,i(),l}function sp(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function op(e,n,t,r){const i=sp(t);let a=t.bulletCurrent||Gn(t);n&&n.type==="list"&&n.ordered&&(a=(typeof n.start=="number"&&n.start>-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(s=Math.ceil(s/4)*4);const o=t.createTracker(r);o.move(a+" ".repeat(s-a.length)),o.shift(s);const u=t.enter("listItem"),l=t.indentLines(t.containerFlow(e,o.current()),c);return u(),l;function c(d,f,h){return f?(h?"":" ".repeat(s))+d:(h?a:a+" ".repeat(s-a.length))+d}}function lp(e,n,t,r){const i=t.enter("paragraph"),a=t.enter("phrasing"),s=t.containerPhrasing(e,r);return a(),i(),s}const up=Vt(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function cp(e,n,t,r){return(e.children.some(function(s){return up(s)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function dp(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}Ta.peek=fp;function Ta(e,n,t,r){const i=dp(t),a=t.enter("strong"),s=t.createTracker(r),o=s.move(i+i);let u=s.move(t.containerPhrasing(e,{after:i,before:o,...s.current()}));const l=u.charCodeAt(0),c=_t(r.before.charCodeAt(r.before.length-1),l,i);c.inside&&(u=ht(l)+u.slice(1));const d=u.charCodeAt(u.length-1),f=_t(r.after.charCodeAt(0),d,i);f.inside&&(u=u.slice(0,-1)+ht(d));const h=s.move(i+i);return a(),t.attentionEncodeSurroundingInfo={after:f.outside,before:c.outside},o+u+h}function fp(e,n,t){return t.options.strong||"*"}function pp(e,n,t,r){return t.safe(e.value,r)}function hp(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function mp(e,n,t){const r=(Fa(t)+(t.options.ruleSpaces?" ":"")).repeat(hp(t));return t.options.ruleSpaces?r.slice(0,-1):r}const Da={blockquote:Of,break:Qr,code:Uf,definition:Gf,emphasis:ja,hardBreak:Qr,heading:Qf,html:Sa,image:Ea,imageReference:Na,inlineCode:Aa,link:Pa,linkReference:Ra,list:ap,listItem:op,paragraph:lp,root:cp,strong:Ta,text:pp,thematicBreak:mp};function gp(){return{enter:{table:xp,tableData:Jr,tableHeader:Jr,tableRow:yp},exit:{codeText:wp,table:bp,tableData:un,tableHeader:un,tableRow:un}}}function xp(e){const n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function bp(e){this.exit(e),this.data.inTable=void 0}function yp(e){this.enter({type:"tableRow",children:[]},e)}function un(e){this.exit(e)}function Jr(e){this.enter({type:"tableCell",children:[]},e)}function wp(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,kp));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function kp(e,n){return n==="|"?n:e}function vp(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,i=n.stringLength,a=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
38
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:s,tableCell:u,tableRow:o}};function s(h,x,w,k){return l(c(h,w,k),h.align)}function o(h,x,w,k){const b=d(h,w,k),C=l([b]);return C.slice(0,C.indexOf(`
|
|
39
|
+
`))}function u(h,x,w,k){const b=w.enter("tableCell"),C=w.enter("phrasing"),j=w.containerPhrasing(h,{...k,before:a,after:a});return C(),b(),j}function l(h,x){return Lf(h,{align:x,alignDelimiters:r,padding:t,stringLength:i})}function c(h,x,w){const k=h.children;let b=-1;const C=[],j=x.enter("table");for(;++b<k.length;)C[b]=d(k[b],x,w);return j(),C}function d(h,x,w){const k=h.children;let b=-1;const C=[],j=x.enter("tableRow");for(;++b<k.length;)C[b]=u(k[b],h,x,w);return j(),C}function f(h,x,w){let k=Da.inlineCode(h,x,w);return w.stack.includes("tableCell")&&(k=k.replace(/\|/g,"\\$&")),k}}function Cp(){return{exit:{taskListCheckValueChecked:Kr,taskListCheckValueUnchecked:Kr,paragraph:Sp}}}function jp(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Ep}}}function Kr(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function Sp(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const t=this.stack[this.stack.length-1];t.type;const r=t.children[0];if(r&&r.type==="text"){const i=n.children;let a=-1,s;for(;++a<i.length;){const o=i[a];if(o.type==="paragraph"){s=o;break}}s===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Ep(e,n,t,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",o=t.createTracker(r);a&&o.move(s);let u=Da.listItem(e,n,t,{...r,...o.current()});return a&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(c){return c+s}}function Np(){return[af(),Ef(),Pf(),gp(),Cp()]}function Ap(e){return{extensions:[sf(),Nf(e),Rf(),vp(e),jp()]}}const Ip={tokenize:_p,partial:!0},_a={tokenize:Lp,partial:!0},La={tokenize:zp,partial:!0},za={tokenize:Op,partial:!0},Pp={tokenize:Mp,partial:!0},Oa={name:"wwwAutolink",tokenize:Tp,previous:$a},Ma={name:"protocolAutolink",tokenize:Dp,previous:Ba},De={name:"emailAutolink",tokenize:Fp,previous:Va},Ie={};function Rp(){return{text:Ie}}let Be=48;for(;Be<123;)Ie[Be]=De,Be++,Be===58?Be=65:Be===91&&(Be=97);Ie[43]=De;Ie[45]=De;Ie[46]=De;Ie[95]=De;Ie[72]=[De,Ma];Ie[104]=[De,Ma];Ie[87]=[De,Oa];Ie[119]=[De,Oa];function Fp(e,n,t){const r=this;let i,a;return s;function s(d){return!vn(d)||!Va.call(r,r.previous)||Wn(r.events)?t(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(d))}function o(d){return vn(d)?(e.consume(d),o):d===64?(e.consume(d),u):t(d)}function u(d){return d===46?e.check(Pp,c,l)(d):d===45||d===95||ce(d)?(a=!0,e.consume(d),u):c(d)}function l(d){return e.consume(d),i=!0,u}function c(d){return a&&i&&fe(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(d)):t(d)}}function Tp(e,n,t){const r=this;return i;function i(s){return s!==87&&s!==119||!$a.call(r,r.previous)||Wn(r.events)?t(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Ip,e.attempt(_a,e.attempt(La,a),t),t)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(s)}}function Dp(e,n,t){const r=this;let i="",a=!1;return s;function s(d){return(d===72||d===104)&&Ba.call(r,r.previous)&&!Wn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),o):t(d)}function o(d){if(fe(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),o;if(d===58){const f=i.toLowerCase();if(f==="http"||f==="https")return e.consume(d),u}return t(d)}function u(d){return d===47?(e.consume(d),a?l:(a=!0,u)):t(d)}function l(d){return d===null||Ft(d)||ie(d)||Ve(d)||Mt(d)?t(d):e.attempt(_a,e.attempt(La,c),t)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(d)}}function _p(e,n,t){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),a):t(s)}function a(s){return s===null?t(s):n(s)}}function Lp(e,n,t){let r,i,a;return s;function s(l){return l===46||l===95?e.check(za,u,o)(l):l===null||ie(l)||Ve(l)||l!==45&&Mt(l)?u(l):(a=!0,e.consume(l),s)}function o(l){return l===95?r=!0:(i=r,r=void 0),e.consume(l),s}function u(l){return i||r||!a?t(l):n(l)}}function zp(e,n){let t=0,r=0;return i;function i(s){return s===40?(t++,e.consume(s),i):s===41&&r<t?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(za,n,a)(s):s===null||ie(s)||Ve(s)?n(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function Op(e,n,t){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||ie(o)||Ve(o)?n(o):t(o)}function i(o){return o===null||o===40||o===91||ie(o)||Ve(o)?n(o):r(o)}function a(o){return fe(o)?s(o):t(o)}function s(o){return o===59?(e.consume(o),r):fe(o)?(e.consume(o),s):t(o)}}function Mp(e,n,t){return r;function r(a){return e.consume(a),i}function i(a){return ce(a)?t(a):n(a)}}function $a(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ie(e)}function Ba(e){return!fe(e)}function Va(e){return!(e===47||vn(e))}function vn(e){return e===43||e===45||e===46||e===95||ce(e)}function Wn(e){let n=e.length,t=!1;for(;n--;){const r=e[n][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){t=!0;break}if(r._gfmAutolinkLiteralWalkedInto){t=!1;break}}return e.length>0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const $p={tokenize:Yp,partial:!0};function Bp(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:qp,continuation:{tokenize:Gp},exit:Wp}},text:{91:{name:"gfmFootnoteCall",tokenize:Up},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Vp,resolveTo:Hp}}}}function Vp(e,n,t){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){s=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return o;function o(u){if(!s||!s._balanced)return t(u);const l=Ee(r.sliceSerialize({start:s.end,end:r.now()}));return l.codePointAt(0)!==94||!a.includes(l.slice(1))?t(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),n(u))}}function Hp(e,n){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},o=[e[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",i,n],["exit",i,n],["enter",a,n],["enter",s,n],["exit",s,n],["exit",a,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...o),e}function Up(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return o;function o(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),u}function u(d){return d!==94?t(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(d){if(a>999||d===93&&!s||d===null||d===91||ie(d))return t(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return i.includes(Ee(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(d)}return ie(d)||(s=!0),a++,e.consume(d),d===92?c:l}function c(d){return d===91||d===92||d===93?(e.consume(d),a++,l):l(d)}}function qp(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,o;return u;function u(x){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(x){return x===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):t(x)}function c(x){if(s>999||x===93&&!o||x===null||x===91||ie(x))return t(x);if(x===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return a=Ee(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return ie(x)||(o=!0),s++,e.consume(x),x===92?d:c}function d(x){return x===91||x===92||x===93?(e.consume(x),s++,c):c(x)}function f(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),i.includes(a)||i.push(a),ne(e,h,"gfmFootnoteDefinitionWhitespace")):t(x)}function h(x){return n(x)}}function Gp(e,n,t){return e.check(xt,n,e.attempt($p,n,t))}function Wp(e){e.exit("gfmFootnoteDefinition")}function Yp(e,n,t){const r=this;return ne(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?n(a):t(a)}}function Xp(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,o){let u=-1;for(;++u<s.length;)if(s[u][0]==="enter"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._close){let l=u;for(;l--;)if(s[l][0]==="exit"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._open&&s[u][1].end.offset-s[u][1].start.offset===s[l][1].end.offset-s[l][1].start.offset){s[u][1].type="strikethroughSequence",s[l][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},s[l][1].start),end:Object.assign({},s[u][1].end)},d={type:"strikethroughText",start:Object.assign({},s[l][1].end),end:Object.assign({},s[u][1].start)},f=[["enter",c,o],["enter",s[l][1],o],["exit",s[l][1],o],["enter",d,o]],h=o.parser.constructs.insideSpan.null;h&&ve(f,f.length,0,$t(h,s.slice(l+1,u),o)),ve(f,f.length,0,[["exit",d,o],["enter",s[u][1],o],["exit",s[u][1],o],["exit",c,o]]),ve(s,l-1,u-l+3,f),u=l+f.length-2;break}}for(u=-1;++u<s.length;)s[u][1].type==="strikethroughSequenceTemporary"&&(s[u][1].type="data");return s}function a(s,o,u){const l=this.previous,c=this.events;let d=0;return f;function f(x){return l===126&&c[c.length-1][1].type!=="characterEscape"?u(x):(s.enter("strikethroughSequenceTemporary"),h(x))}function h(x){const w=Qe(l);if(x===126)return d>1?u(x):(s.consume(x),d++,h);if(d<2&&!t)return u(x);const k=s.exit("strikethroughSequenceTemporary"),b=Qe(x);return k._open=!b||b===2&&!!w,k._close=!w||w===2&&!!b,o(x)}}}class Qp{constructor(){this.map=[]}add(n,t,r){Jp(this,n,t,r)}consume(n){if(this.map.sort(function(a,s){return a[0]-s[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push(n.slice()),n.length=0;let i=r.pop();for(;i;){for(const a of i)n.push(a);i=r.pop()}this.map.length=0}}function Jp(e,n,t,r){let i=0;if(!(t===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===n){e.map[i][1]+=t,e.map[i][2].push(...r);return}i+=1}e.map.push([n,t,r])}}function Kp(e,n){let t=!1;const r=[];for(;n<e.length;){const i=e[n];if(t){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(t=!0);n+=1}return r}function Zp(){return{flow:{null:{name:"table",tokenize:eh,resolveAll:th}}}}function eh(e,n,t){const r=this;let i=0,a=0,s;return o;function o(S){let z=r.events.length-1;for(;z>-1;){const D=r.events[z][1].type;if(D==="lineEnding"||D==="linePrefix")z--;else break}const R=z>-1?r.events[z][1].type:null,L=R==="tableHead"||R==="tableRow"?v:u;return L===v&&r.parser.lazy[r.now().line]?t(S):L(S)}function u(S){return e.enter("tableHead"),e.enter("tableRow"),l(S)}function l(S){return S===124||(s=!0,a+=1),c(S)}function c(S){return S===null?t(S):G(S)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),h):t(S):Z(S)?ne(e,c,"whitespace")(S):(a+=1,s&&(s=!1,i+=1),S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),s=!0,c):(e.enter("data"),d(S)))}function d(S){return S===null||S===124||ie(S)?(e.exit("data"),c(S)):(e.consume(S),S===92?f:d)}function f(S){return S===92||S===124?(e.consume(S),d):d(S)}function h(S){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(S):(e.enter("tableDelimiterRow"),s=!1,Z(S)?ne(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):x(S))}function x(S){return S===45||S===58?k(S):S===124?(s=!0,e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),w):E(S)}function w(S){return Z(S)?ne(e,k,"whitespace")(S):k(S)}function k(S){return S===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),b):S===45?(a+=1,b(S)):S===null||G(S)?I(S):E(S)}function b(S){return S===45?(e.enter("tableDelimiterFiller"),C(S)):E(S)}function C(S){return S===45?(e.consume(S),C):S===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),j):(e.exit("tableDelimiterFiller"),j(S))}function j(S){return Z(S)?ne(e,I,"whitespace")(S):I(S)}function I(S){return S===124?x(S):S===null||G(S)?!s||i!==a?E(S):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(S)):E(S)}function E(S){return t(S)}function v(S){return e.enter("tableRow"),B(S)}function B(S){return S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),B):S===null||G(S)?(e.exit("tableRow"),n(S)):Z(S)?ne(e,B,"whitespace")(S):(e.enter("data"),$(S))}function $(S){return S===null||S===124||ie(S)?(e.exit("data"),B(S)):(e.consume(S),S===92?V:$)}function V(S){return S===92||S===124?(e.consume(S),$):$(S)}}function th(e,n){let t=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],o=!1,u=0,l,c,d;const f=new Qp;for(;++t<e.length;){const h=e[t],x=h[1];h[0]==="enter"?x.type==="tableHead"?(o=!1,u!==0&&(Zr(f,n,u,l,c),c=void 0,u=0),l={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},f.add(t,0,[["enter",l,n]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,d=void 0,a=[0,0,0,0],s=[0,t+1,0,0],o&&(o=!1,c={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},f.add(t,0,[["enter",c,n]])),i=x.type==="tableDelimiterRow"?2:c?3:1):i&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],d=jt(f,n,a,i,void 0,d),a=[0,0,0,0]),s[2]=t)):x.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],d=jt(f,n,a,i,void 0,d)),a=s,s=[a[1],t,0,0])):x.type==="tableHead"?(o=!0,u=t):x.type==="tableRow"||x.type==="tableDelimiterRow"?(u=t,a[1]!==0?(s[0]=s[1],d=jt(f,n,a,i,t,d)):s[1]!==0&&(d=jt(f,n,s,i,t,d)),i=0):i&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(s[3]=t)}for(u!==0&&Zr(f,n,u,l,c),f.consume(n.events),t=-1;++t<n.events.length;){const h=n.events[t];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=Kp(n.events,t))}return e}function jt(e,n,t,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";t[0]!==0&&(a.end=Object.assign({},Ye(n.events,t[0])),e.add(t[0],0,[["exit",a,n]]));const u=Ye(n.events,t[1]);if(a={type:s,start:Object.assign({},u),end:Object.assign({},u)},e.add(t[1],0,[["enter",a,n]]),t[2]!==0){const l=Ye(n.events,t[2]),c=Ye(n.events,t[3]),d={type:o,start:Object.assign({},l),end:Object.assign({},c)};if(e.add(t[2],0,[["enter",d,n]]),r!==2){const f=n.events[t[2]],h=n.events[t[3]];if(f[1].end=Object.assign({},h[1].end),f[1].type="chunkText",f[1].contentType="text",t[3]>t[2]+1){const x=t[2]+1,w=t[3]-t[2]-1;e.add(x,w,[])}}e.add(t[3]+1,0,[["exit",d,n]])}return i!==void 0&&(a.end=Object.assign({},Ye(n.events,i)),e.add(i,0,[["exit",a,n]]),a=void 0),a}function Zr(e,n,t,r,i){const a=[],s=Ye(n.events,t);i&&(i.end=Object.assign({},s),a.push(["exit",i,n])),r.end=Object.assign({},s),a.push(["exit",r,n]),e.add(t+1,0,a)}function Ye(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const nh={name:"tasklistCheck",tokenize:ih};function rh(){return{text:{91:nh}}}function ih(e,n,t){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),a)}function a(u){return ie(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),s):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),s):t(u)}function s(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):t(u)}function o(u){return G(u)?n(u):Z(u)?e.check({tokenize:ah},n,t)(u):t(u)}}function ah(e,n,t){return ne(e,r,"whitespace");function r(i){return i===null?t(i):n(i)}}function sh(e){return Zi([Rp(),Bp(),Xp(e),Zp(),rh()])}const oh={};function ei(e){const n=this,t=e||oh,r=n.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(sh(t)),a.push(Np()),s.push(Ap(t))}const lh=new Set(["text","txt","plain",""]),ti=({code:e,language:n,className:t=""})=>{const{highlighter:r,isReady:i}=ps(),[a,s]=y.useState(!1),[o,u]=y.useState(null),l=y.useMemo(()=>({js:"javascript",ts:"typescript",jsx:"javascript",tsx:"typescript"})[n]||n,[n]),c=lh.has(l);y.useEffect(()=>{if(c||!i||!r){u(null);return}try{const h=r.getLoadedLanguages().includes(l)?l:"javascript",x=r.codeToHtml(e,{lang:h,theme:"dark-plus"});u(x)}catch(f){console.error("Shiki highlighting failed:",f),u(null)}},[e,l,r,i,c]);const d=async()=>{try{await navigator.clipboard.writeText(e),s(!0),setTimeout(()=>s(!1),2e3)}catch{}};return!c&&!i?p.jsx("div",{className:`relative rounded-lg overflow-hidden my-4 ${t}`,children:p.jsx("div",{className:"bg-[#1e1e1e] p-4 animate-pulse",children:p.jsx("div",{className:"space-y-2",children:Array.from({length:Math.min(e.split(`
|
|
40
|
+
`).length,8)}).map((f,h)=>p.jsx("div",{className:"h-4 bg-white/5 rounded",style:{width:`${40+Math.random()*50}%`}},h))})})}):p.jsxs("div",{className:`relative group rounded-lg overflow-hidden my-4 ${t}`,children:[!c&&p.jsx("div",{className:"absolute top-2 left-3 z-10",children:p.jsx("span",{className:"text-[10px] text-white/30 uppercase font-mono",children:n})}),p.jsx(Xe,{isIconOnly:!0,size:"sm",variant:"flat",className:"absolute top-2 right-2 z-10 opacity-0 group-hover:opacity-100 transition-opacity bg-white/10 text-white/60 hover:text-white min-w-7 h-7",onPress:d,"aria-label":"Copy code",children:a?p.jsx(hs,{className:"w-3.5 h-3.5 text-green-400"}):p.jsx(eo,{className:"w-3.5 h-3.5"})}),c?p.jsx("pre",{className:"bg-[#1e1e1e] p-4 pt-8 text-sm whitespace-pre-wrap break-words",children:p.jsx("code",{className:"text-white/80 font-mono",children:e})}):o?p.jsx("div",{className:"shiki-code-block text-sm [&_pre]:!bg-[#1e1e1e] [&_pre]:p-4 [&_pre]:pt-8 [&_pre]:overflow-x-auto [&_code]:!font-mono",dangerouslySetInnerHTML:{__html:o}}):p.jsx("pre",{className:"bg-[#1e1e1e] p-4 pt-8 overflow-x-auto text-sm",children:p.jsx("code",{className:"text-white/80 font-mono",children:e})})]})},uh={WARNING:{border:"border-orange-500/50",bg:"bg-orange-500/5",icon:p.jsx(Pn,{className:"w-5 h-5 text-orange-400"}),label:"Warning"},NOTE:{border:"border-blue-500/50",bg:"bg-blue-500/5",icon:p.jsx(so,{className:"w-5 h-5 text-blue-400"}),label:"Note"},TIP:{border:"border-teal-500/50",bg:"bg-teal-500/5",icon:p.jsx(lo,{className:"w-5 h-5 text-teal-400"}),label:"Tip"},IMPORTANT:{border:"border-purple-500/50",bg:"bg-purple-500/5",icon:p.jsx(ro,{className:"w-5 h-5 text-purple-400"}),label:"Important"}},ch=({type:e,children:n})=>{const t=uh[e];return p.jsxs("div",{className:`my-4 rounded-lg border-l-4 ${t.border} ${t.bg} p-4`,children:[p.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[t.icon,p.jsx("span",{className:"text-sm font-semibold text-white",children:t.label})]}),p.jsx("div",{className:"text-sm text-white/80 [&_p]:my-1 [&_p:first-child]:mt-0 [&_p:last-child]:mb-0",children:n})]})},dh=(e,n)=>{if(!e)return{type:"broken",href:""};if(e.startsWith("http://")||e.startsWith("https://"))return{type:"external",href:e};if(e.startsWith("#"))return{type:"internal",href:`/docs/${n}${e}`};let t;if(e.startsWith("/"))t=e.replace(/^\//,"").replace(/\/$/,"");else{const r=e.replace(/\/$/,"").split("/"),i=n.split("/");for(const a of r)a===".."?i.pop():a!=="."&&i.push(a);t=i.join("/")}return ms(t)?{type:"internal",href:`/docs/${t}`}:{type:"broken",href:t}};function fh(e){const n=/^>[ \t]*\[!(WARNING|NOTE|TIP|IMPORTANT)\][ \t]*\r?\n((?:>.*(?:\r?\n|$))*)/gm,t=[];let r=0,i;for(;(i=n.exec(e))!==null;){i.index>r&&t.push({type:"markdown",content:e.slice(r,i.index)});const a=i[1],o=i[2].split(/\r?\n/).map(u=>u.replace(/^>[ \t]?/,"")).join(`
|
|
41
|
+
`).trim();t.push({type:"callout",calloutType:a,content:o}),r=i.index+i[0].length}return r<e.length&&t.push({type:"markdown",content:e.slice(r)}),t}const ph=({markdown:e,currentPagePath:n,className:t=""})=>{const r=y.useMemo(()=>fh(e),[e]),i={h1:({children:a})=>p.jsx("h1",{id:St(a),className:"text-3xl font-bold text-white mt-8 mb-4 first:mt-0",children:a}),h2:({children:a})=>p.jsx("h2",{id:St(a),className:"text-2xl font-semibold text-white mt-8 mb-3 pb-2 border-b border-white/10",children:a}),h3:({children:a})=>p.jsx("h3",{id:St(a),className:"text-xl font-semibold text-white mt-6 mb-2",children:a}),h4:({children:a})=>p.jsx("h4",{id:St(a),className:"text-lg font-medium text-white mt-4 mb-2",children:a}),p:({children:a})=>p.jsx("p",{className:"text-white/80 leading-relaxed my-3",children:a}),a:({href:a,children:s})=>{if(!a)return p.jsx("span",{className:"text-white/50",children:s});const o=dh(a,n);return o.type==="internal"?p.jsx(Si,{to:o.href,className:"text-primary-400 hover:text-primary-300 underline underline-offset-2 transition-colors",children:s}):o.type==="external"?p.jsx("a",{href:o.href,target:"_blank",rel:"noopener noreferrer",className:"text-primary-400 hover:text-primary-300 underline underline-offset-2 transition-colors",children:s}):p.jsx("span",{className:"text-white/40 line-through",children:s})},code:({className:a,children:s,...o})=>{const u=/language-(\w+)/.exec(a||""),l=String(s).replace(/\n$/,"");return u?p.jsx(ti,{code:l,language:u[1]}):l.includes(`
|
|
42
|
+
`)?p.jsx(ti,{code:l,language:"text"}):p.jsx("code",{className:"bg-white/10 text-primary-300 px-1.5 py-0.5 rounded text-sm font-mono",...o,children:s})},pre:({children:a})=>p.jsx(p.Fragment,{children:a}),blockquote:({children:a})=>p.jsx("blockquote",{className:"my-4 border-l-4 border-white/20 pl-4 text-white/60 italic",children:a}),ul:({children:a})=>p.jsx("ul",{className:"list-disc list-inside space-y-1 my-3 text-white/80 [&_ul]:ml-4 [&_ul]:mt-1",children:a}),ol:({children:a})=>p.jsx("ol",{className:"list-decimal list-inside space-y-1 my-3 text-white/80 [&_ol]:ml-4 [&_ol]:mt-1",children:a}),li:({children:a})=>p.jsx("li",{className:"leading-relaxed",children:a}),table:({children:a})=>p.jsx("div",{className:"my-4 overflow-x-auto rounded-lg border border-white/10",children:p.jsx("table",{className:"w-full text-sm",children:a})}),thead:({children:a})=>p.jsx("thead",{className:"bg-white/5 border-b border-white/10",children:a}),tbody:({children:a})=>p.jsx("tbody",{children:a}),tr:({children:a})=>p.jsx("tr",{className:"border-b border-white/5 last:border-0",children:a}),th:({children:a})=>p.jsx("th",{className:"px-4 py-2 text-left text-white font-medium",children:a}),td:({children:a})=>p.jsx("td",{className:"px-4 py-2 text-white/70",children:a}),hr:()=>p.jsx("hr",{className:"my-8 border-white/10"}),strong:({children:a})=>p.jsx("strong",{className:"text-white font-semibold",children:a}),em:({children:a})=>p.jsx("em",{className:"text-white/70",children:a})};return p.jsx("div",{className:`docs-markdown ${t}`,children:r.map((a,s)=>a.type==="callout"?p.jsx(ch,{type:a.calloutType,children:p.jsx(Wr,{remarkPlugins:[ei],components:i,children:a.content})},s):p.jsx(Wr,{remarkPlugins:[ei],components:i,children:a.content},s))})},St=e=>Cn(e).toLowerCase().replace(/[^\w\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").trim(),Cn=e=>typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(Cn).join(""):e&&typeof e=="object"&&"props"in e?Cn(e.props.children):"",hh=10*1024*1024,ni=["image/png","image/jpeg","image/jpg","image/webp","image/gif"],mh=({name:e,label:n,value:t,coreInstance:r,onImageChange:i})=>{const a=y.useRef(null),[s,o]=y.useState(!1),[u,l]=y.useState(null),[c,d]=y.useState(null),f=y.useCallback(async E=>{try{const v=document.createElement("canvas");v.width=E.width,v.height=E.height;const B=v.getContext("2d");return B?(B.drawImage(E,0,0),new Promise($=>{v.toBlob(V=>{$(V?URL.createObjectURL(V):null)},"image/png")})):null}catch(v){return console.error("Failed to convert image to preview:",v),null}},[]);y.useEffect(()=>{let E=!0,v=null;return(async()=>{if(t instanceof File||t instanceof Blob){const $=URL.createObjectURL(t);E&&(d($),v=$)}else if(t instanceof ImageBitmap||t instanceof OffscreenCanvas){const $=await f(t);E&&$&&(d($),v=$)}else if(t&&typeof t=="object"){if(r){const $=r.getParameter(e);if($ instanceof ImageBitmap||$ instanceof OffscreenCanvas){const V=await f($);E&&V&&(d(V),v=V)}}}else if(t==null)if(r){const $=r.getParameter(e);if($ instanceof ImageBitmap||$ instanceof OffscreenCanvas){const V=await f($);E&&V&&(d(V),v=V)}else E&&d(null)}else E&&d(null)})(),()=>{E=!1,v&&URL.revokeObjectURL(v)}},[t,e,r,f]);const h=E=>ni.includes(E.type)?E.size>hh?{valid:!1,error:"Image size must be less than 10MB"}:{valid:!0}:{valid:!1,error:"Please select a valid image file (PNG, JPEG, WEBP, or GIF)"},x=E=>{l(null);const v=h(E);if(!v.valid){l(v.error||"Invalid file");return}d(URL.createObjectURL(E)),i(E)},w=E=>{const v=E.target.files?.[0];v&&x(v)},k=E=>{E.preventDefault(),E.stopPropagation(),o(!0)},b=E=>{E.preventDefault(),E.stopPropagation(),o(!1)},C=E=>{E.preventDefault(),E.stopPropagation()},j=E=>{E.preventDefault(),E.stopPropagation(),o(!1);const v=E.dataTransfer.files?.[0];v&&x(v)},I=()=>{d(null),l(null),a.current&&(a.current.value=""),i(null)};return y.useEffect(()=>()=>{c&&URL.revokeObjectURL(c)},[c]),p.jsxs("div",{className:"mb-3",children:[p.jsx("label",{className:"text-white text-sm block mb-2",children:n}),p.jsxs("div",{className:`
|
|
43
|
+
relative border-2 border-dashed rounded-lg overflow-hidden
|
|
44
|
+
transition-colors duration-200
|
|
45
|
+
${s?"border-primary-400 bg-primary-400/10":"border-white/20 bg-black/20"}
|
|
46
|
+
${c?"h-32":"h-24"}
|
|
47
|
+
`,onDragEnter:k,onDragLeave:b,onDragOver:C,onDrop:j,children:[c?p.jsxs("div",{className:"relative w-full h-full",children:[p.jsx("img",{src:c,alt:n,className:"w-full h-full object-contain"}),p.jsx(It,{isIconOnly:!0,size:"sm",variant:"flat",className:"absolute top-1 right-1 bg-black/60 text-white hover:bg-black/80",onPress:I,children:p.jsx(vi,{className:"w-4 h-4"})})]}):p.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-3",children:[p.jsx(po,{className:"w-8 h-8 text-white/40 mb-2"}),p.jsx("p",{className:"text-white/60 text-xs text-center mb-2",children:s?"Drop image here":"Drag & drop an image"}),p.jsx(It,{size:"sm",variant:"flat",className:"bg-white/10 text-white hover:bg-white/20",startContent:p.jsx(Ys,{className:"w-4 h-4"}),onPress:()=>a.current?.click(),children:"Browse"})]}),p.jsx("input",{ref:a,type:"file",accept:ni.join(","),onChange:w,className:"hidden"})]}),u&&p.jsx("p",{className:"text-red-400 text-xs mt-1",children:u}),!u&&p.jsx("p",{className:"text-white/40 text-xs mt-1",children:"Supports: PNG, JPEG, WEBP, GIF (max 10MB)"})]})},gh=({parameterGroups:e,parameters:n,capabilities:t,coreInstance:r,onParameterChange:i,onParameterCommit:a,className:s=""})=>{const o=y.useMemo(()=>e.map(d=>{const f=[];return d.parameters&&typeof d.parameters=="object"&&!Array.isArray(d.parameters)&&Object.entries(d.parameters).forEach(([h,x])=>{f.push({name:h,definition:x,type:x.type||"text",min:x.config?.min,max:x.config?.max,step:x.config?.step,options:x.config?.options||x.options,label:x.label||h.replace(/([A-Z])/g," $1").replace(/^./,w=>w.toUpperCase())})}),{...d,processedParameters:f}}),[e]),u=()=>p.jsxs("div",{className:"mb-4 p-3 bg-black/30 rounded-lg border border-white/10",children:[p.jsx("div",{className:"text-white text-sm font-medium mb-2",children:"📊 Active Capabilities"}),p.jsxs("div",{className:"space-y-1 text-xs",children:[p.jsxs("div",{className:`flex items-center space-x-2 ${t.hasGeneral?"text-green-400":"text-gray-500"}`,children:[p.jsx("span",{children:"🔧"}),p.jsxs("span",{children:["General: ",t.hasGeneral?"Always Active":"Inactive"]})]}),p.jsxs("div",{className:`flex items-center space-x-2 ${t.hasAudio?"text-green-400":"text-gray-500"}`,children:[p.jsx("span",{children:"🎵"}),p.jsxs("span",{children:["Audio: ",t.hasAudio?"Connected":"Not Connected"]})]}),p.jsxs("div",{className:`flex items-center space-x-2 ${t.hasVideo?"text-green-400":"text-gray-500"}`,children:[p.jsx("span",{children:"📹"}),p.jsxs("span",{children:["Video: ",t.hasVideo?"Connected":"Not Connected"]})]}),p.jsxs("div",{className:`flex items-center space-x-2 ${t.hasInteraction?"text-green-400":"text-gray-500"}`,children:[p.jsx("span",{children:"🖱️"}),p.jsxs("span",{children:["Interaction: ",t.hasInteraction?"Enabled":"Disabled"]})]})]}),p.jsx("div",{className:"text-white/60 text-xs mt-2",children:"Only parameters for active capabilities are shown below."})]}),l=d=>{const{name:f,type:h,min:x,max:w,step:k,options:b,label:C}=d,j=n[f]!==void 0?n[f]:d.definition?.defaultValue;switch(h){case"slider":return p.jsxs("div",{className:"mb-3",children:[p.jsxs("div",{className:"flex items-center justify-between mb-2",children:[p.jsx("label",{className:"text-white text-sm",children:C||f}),p.jsx("span",{className:"text-white/70 text-xs",children:j})]}),p.jsx(gs,{defaultValue:j,onChange:I=>{i(f,Array.isArray(I)?I[0]:I)},onChangeEnd:I=>{a(f,Array.isArray(I)?I[0]:I)},minValue:x??0,maxValue:w??100,step:k??1,className:"w-full",color:"primary",size:"sm","aria-label":C||f})]},`${f}-${j??""}`);case"toggle":return p.jsxs("div",{className:"flex items-center justify-between mb-3",children:[p.jsx("span",{className:"text-white text-sm",children:C||f}),p.jsx(Ei,{defaultSelected:j,onValueChange:I=>{i(f,I),a(f,I)},color:"primary",size:"sm"})]},`${f}-${j??""}`);case"color":return p.jsxs("div",{className:"mb-3",children:[p.jsx("label",{className:"text-white text-sm block mb-2",children:C||f}),p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(yt,{type:"color",defaultValue:j,onChange:I=>i(f,I.target.value),onBlur:I=>a(f,I.target.value),className:"w-16 h-8",size:"sm"},`${f}-colorPicker-${j??""}`),p.jsx(yt,{defaultValue:String(j),onChange:I=>i(f,I.target.value),onBlur:I=>a(f,I.target.value),className:"flex-1 text-white",size:"sm",variant:"bordered",classNames:{input:"text-white",inputWrapper:"bg-black/20 border-white/20"}},`${f}-colorText-${j??""}`)]})]},`${f}-${j??""}`);case"select":{const I=b||[],E=String(j),v=I.includes(E)?[E]:[];return p.jsx("div",{className:"mb-3",children:p.jsx(dn,{label:C||f,selectedKeys:v,onSelectionChange:B=>{const $=Array.from(B)[0];i(f,$),a(f,$)},className:"w-full visualizer-select [&_[data-slot=value]]:!text-white [&_[data-slot=value]]:!opacity-100",size:"sm",variant:"bordered",classNames:{trigger:"bg-black/20 border-white/20 text-white data-[hover=true]:bg-black/30",label:"text-white/80",value:"!text-white !opacity-100",innerWrapper:"text-white",selectorIcon:"text-white/60",listbox:"bg-black/90",popoverContent:"bg-black/90 border border-white/20"},style:{"--nextui-content1":"white","--nextui-content1-foreground":"white","--nextui-foreground":"white"},children:I.map(B=>p.jsx(fn,{className:"text-white data-[hover=true]:bg-white/10",children:B},B))},`${f}-${I.join("-")}`)},f)}case"number":return p.jsx("div",{className:"mb-3",children:p.jsx(yt,{type:"number",label:C||f,defaultValue:String(j),onChange:I=>i(f,parseFloat(I.target.value)||0),onBlur:I=>a(f,parseFloat(I.target.value)||0),min:x,max:w,step:k,className:"w-full",size:"sm",variant:"bordered",classNames:{input:"text-white",inputWrapper:"bg-black/20 border-white/20",label:"text-white/80"}})},`${f}-${j??""}`);case"image":return p.jsx(mh,{name:f,label:C||f,value:j,coreInstance:r,onImageChange:I=>{i(f,I),a(f,I)}},f);case"button":return p.jsx("div",{className:"mb-3",children:p.jsx(It,{size:"sm",variant:"flat",className:"w-full bg-white/10 text-white hover:bg-white/20",onPress:()=>{i(f,!0),a(f,!0)},children:C||f})},f);case"text":default:return p.jsx("div",{className:"mb-3",children:p.jsx(yt,{label:C||f,defaultValue:String(j),onChange:I=>i(f,I.target.value),onBlur:I=>a(f,I.target.value),className:"w-full",size:"sm",variant:"bordered",classNames:{input:"text-white",inputWrapper:"bg-black/20 border-white/20",label:"text-white/80"}})},`${f}-${j??""}`)}},c=d=>d.processedParameters.length===0?null:p.jsx("div",{className:"mb-4",children:p.jsxs("div",{className:"bg-black/40 border border-white/20 rounded-lg",children:[p.jsxs("div",{className:"px-3 py-2 border-b border-white/10 flex items-center justify-between",children:[p.jsx("span",{className:"text-white font-medium text-sm",children:d.groupName}),p.jsx("span",{className:"text-white/60 text-xs",children:"−"})]}),p.jsx("div",{className:"p-3 space-y-2",children:d.processedParameters.map(f=>l(f))})]})},d.groupName);return o.length===0?p.jsxs("div",{className:`text-center py-8 text-white/60 ${s}`,children:[p.jsx("div",{className:"text-2xl mb-3",children:"🎨"}),p.jsx("p",{className:"text-sm font-medium text-white/80",children:"No parameters available"}),p.jsx("p",{className:"text-xs mt-2",children:"This scene doesn't have configurable parameters."})]}):p.jsx("div",{className:`flex-1 overflow-y-auto ${s}`,children:p.jsxs("div",{className:"space-y-4",children:[u(),(()=>{const d=o.find(f=>f.groupName==="general");return d&&d.processedParameters.length>0?p.jsxs("div",{className:"mb-6",children:[p.jsx("div",{className:"mb-3 pb-2 border-b border-white/10",children:p.jsx("span",{className:"text-white font-medium text-sm",children:"General Controls"})}),p.jsx("div",{className:"space-y-3",children:d.processedParameters.map(l)})]}):null})(),o.filter(d=>d.groupName!=="general").map(c)]})})},ri=[{value:"1.0",label:"Full Resolution",description:"100% of canvas size (recommended)"},{value:"0.75",label:"High Resolution",description:"75% of canvas size"},{value:"0.5",label:"Half Resolution",description:"50% of canvas size"},{value:"0.25",label:"Low Resolution",description:"25% of canvas size"}],ii=[{value:"full",label:"Full Frame Rate",description:"60 FPS (smooth)"},{value:"half",label:"Half Frame Rate",description:"30 FPS (battery saving)"}],ai=e=>{switch(e){case 1:return"Full (1.0x)";case .5:return"Half (0.5x)";case .75:return"High (0.75x)";case .25:return"Low (0.25x)";default:return`Custom (${e}x)`}},si=e=>{switch(e){case"full":return"Full (60 FPS)";case"half":return"Half (30 FPS)";default:return e}},oi={trigger:"bg-black/20 border-white/20 text-white data-[hover=true]:bg-black/30",label:"text-white/80",value:"!text-white !opacity-100",innerWrapper:"text-white",selectorIcon:"text-white/60",listbox:"bg-black/90",popoverContent:"bg-black/90 border border-white/20"},li={"--nextui-content1":"white","--nextui-content1-foreground":"white","--nextui-foreground":"white"},xh=({resolution:e,frameRateMode:n,showFPS:t,coreActive:r,onResolutionChange:i,onFrameRateChange:a,onShowFPSChange:s,onResetDefaults:o,className:u=""})=>{const l=ri.find(d=>parseFloat(d.value)===e)?.value||"1.0",c=ii.find(d=>d.value===n)?.value||"full";return p.jsx("div",{className:`h-full p-4 overflow-y-auto ${u}`,children:p.jsxs("div",{className:"space-y-6",children:[p.jsx(Ut,{className:"bg-white/5",children:p.jsxs(qt,{className:"p-4",children:[p.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[p.jsx(xs,{className:"w-5 h-5 text-primary-400"}),p.jsx("h3",{className:"text-white font-medium",children:"Render Settings"})]}),p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsxs("div",{className:"flex items-center justify-between mb-2",children:[p.jsx("label",{className:"text-white text-sm font-medium",children:"Resolution"}),p.jsx(er,{size:"sm",variant:"flat",color:"primary",className:"text-xs",children:ai(e)})]}),p.jsx(dn,{selectedKeys:[l],onSelectionChange:d=>{const f=Array.from(d)[0];f&&i(parseFloat(f))},variant:"bordered",size:"sm",className:"w-full visualizer-select [&_[data-slot=value]]:!text-white [&_[data-slot=value]]:!opacity-100",placeholder:"Select resolution","aria-label":"Resolution setting",classNames:oi,style:li,children:ri.map(d=>p.jsx(fn,{textValue:d.label,className:"text-white data-[hover=true]:bg-white/10",children:p.jsxs("div",{className:"flex flex-col",children:[p.jsx("span",{className:"text-sm font-medium text-white",children:d.label}),p.jsx("span",{className:"text-xs text-white/60",children:d.description})]})},d.value))}),p.jsx("p",{className:"text-xs text-white/60 mt-1",children:"Lower resolution multiplier improves performance but reduces visual quality"})]}),p.jsxs("div",{children:[p.jsxs("div",{className:"flex items-center justify-between mb-2",children:[p.jsx("label",{className:"text-white text-sm font-medium",children:"Frame Rate"}),p.jsx(er,{size:"sm",variant:"flat",color:"secondary",className:"text-xs",children:si(n)})]}),p.jsx(dn,{selectedKeys:[c],onSelectionChange:d=>{const f=Array.from(d)[0];f&&a(f)},variant:"bordered",size:"sm",className:"w-full visualizer-select [&_[data-slot=value]]:!text-white [&_[data-slot=value]]:!opacity-100",placeholder:"Select frame rate","aria-label":"Frame rate setting",classNames:oi,style:li,children:ii.map(d=>p.jsx(fn,{textValue:d.label,className:"text-white data-[hover=true]:bg-white/10",children:p.jsxs("div",{className:"flex flex-col",children:[p.jsx("span",{className:"text-sm font-medium text-white",children:d.label}),p.jsx("span",{className:"text-xs text-white/60",children:d.description})]})},d.value))}),p.jsx("p",{className:"text-xs text-white/60 mt-1",children:"Half frame rate reduces CPU usage and extends battery life"})]})]})]})}),p.jsx(Ut,{className:"bg-white/5",children:p.jsxs(qt,{className:"p-4",children:[p.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[p.jsx(bs,{className:"w-5 h-5 text-secondary-400"}),p.jsx("h3",{className:"text-white font-medium",children:"Interface Settings"})]}),p.jsx("div",{className:"space-y-4",children:p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"flex-1",children:[p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(ys,{className:"w-4 h-4 text-white/60"}),p.jsx("label",{className:"text-white text-sm font-medium",children:"Show FPS Counter"})]}),p.jsx("p",{className:"text-xs text-white/60 mt-1",children:"Display real-time frames per second in the bottom center"})]}),p.jsx(Ei,{isSelected:t,onValueChange:s,color:"secondary",size:"sm"})]})})]})}),p.jsx(Ut,{className:"bg-white/5",children:p.jsxs(qt,{className:"p-4",children:[p.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[p.jsx(ws,{className:"w-5 h-5 text-success-400"}),p.jsx("h3",{className:"text-white font-medium",children:"Performance Info"})]}),p.jsxs("div",{className:"space-y-3",children:[p.jsxs("div",{className:"flex justify-between text-sm",children:[p.jsx("span",{className:"text-white/60",children:"Current Resolution:"}),p.jsx("span",{className:"text-white",children:ai(e)})]}),p.jsxs("div",{className:"flex justify-between text-sm",children:[p.jsx("span",{className:"text-white/60",children:"Frame Rate Mode:"}),p.jsx("span",{className:"text-white",children:si(n)})]}),p.jsxs("div",{className:"flex justify-between text-sm",children:[p.jsx("span",{className:"text-white/60",children:"Core Status:"}),p.jsx("span",{className:"text-white",children:r?"Active":"Inactive"})]}),p.jsx(ks,{className:"my-3"}),p.jsxs("div",{className:"text-xs text-white/40",children:[p.jsx("p",{children:"Settings are applied immediately and affect performance."}),p.jsx("p",{className:"mt-1",children:"Lower settings recommended for older devices."})]})]})]})}),p.jsx("div",{className:"pt-4",children:p.jsx(It,{variant:"flat",size:"sm",className:"w-full text-white/60 hover:text-white",onPress:o,children:"Reset to Defaults"})})]})})};function Yn(e){return e?/\/\/\s*@renderer\s+shader|\/\*\s*@renderer\s+shader\s*\*\//.test(e)?"shader":/\/\/\s*@renderer\s+p5|\/\*\s*@renderer\s+p5\s*\*\//.test(e)?"p5":"native":"native"}function bh(e){return e==="shader"?"glsl":"typescript"}let ui=!1;function yh(e){ui||(e.languages.register({id:"glsl"}),e.languages.setMonarchTokensProvider("glsl",{defaultToken:"",tokenPostfix:".glsl",keywords:["attribute","const","uniform","varying","break","continue","do","for","while","if","else","switch","case","default","in","out","inout","true","false","discard","return","lowp","mediump","highp","precision","layout","centroid","flat","smooth","noperspective","patch","sample","invariant","precise","coherent","volatile","restrict","readonly","writeonly","struct"],typeKeywords:["void","bool","int","uint","float","double","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","uvec2","uvec3","uvec4","dvec2","dvec3","dvec4","mat2","mat3","mat4","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","dmat2","dmat3","dmat4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","samplerCubeShadow","sampler1DArray","sampler2DArray","sampler1DArrayShadow","sampler2DArrayShadow","isampler1D","isampler2D","isampler3D","isamplerCube","isampler1DArray","isampler2DArray","usampler1D","usampler2D","usampler3D","usamplerCube","usampler1DArray","usampler2DArray","sampler2DRect","sampler2DRectShadow","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>="],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,tokenizer:{root:[[/#\s*version\s+\d+(\s+es)?/,"keyword.directive"],[/#\s*extension/,"keyword.directive"],[/#\s*(define|undef|if|ifdef|ifndef|else|elif|endif|error|pragma|line)/,"keyword.directive"],[/[a-zA-Z_]\w*/,{cases:{"@typeKeywords":"keyword.type","@keywords":"keyword","@default":"identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?[fF]?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fF]?/,"number.float"],[/0[xX](@hexdigits)[lL]?/,"number.hex"],[/0(@octaldigits)[lL]?/,"number.octal"],[/0[bB](@binarydigits)[lL]?/,"number.binary"],[/(@digits)[fF]/,"number.float"],[/(@digits)[lL]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]]}}),ui=!0,console.log("[Monaco] ✅ GLSL language registered"))}let ci=!1;async function wh(e){if(!ci)try{const{shaderUniforms:n}=await Je(async()=>{const{shaderUniforms:r}=await import("./shader-uniforms-GdaUkQPK.js");return{shaderUniforms:r}},[]),t=Object.entries(n).map(([r,i])=>({name:r,type:i.type,category:i.category,description:i.description}));e.languages.registerCompletionItemProvider("glsl",{triggerCharacters:["u","_"],provideCompletionItems:(r,i)=>{const a=r.getWordUntilPosition(i),s={startLineNumber:i.lineNumber,endLineNumber:i.lineNumber,startColumn:a.startColumn,endColumn:a.endColumn},o=r.getValueInRange({startLineNumber:i.lineNumber,startColumn:1,endLineNumber:i.lineNumber,endColumn:i.column});return o.includes("//")||o.match(/["'].*$/)?{suggestions:[]}:{suggestions:t.map(l=>({label:l.name,kind:e.languages.CompletionItemKind.Variable,detail:`${l.type} (Viji ${l.category})`,documentation:{value:`**${l.type}** ${l.name}
|
|
48
|
+
|
|
49
|
+
${l.description}
|
|
50
|
+
|
|
51
|
+
_Category: ${l.category}_`},insertText:l.name,range:s,sortText:`0_${l.name}`}))}}}),e.languages.registerHoverProvider("glsl",{provideHover:(r,i)=>{const a=r.getWordAtPosition(i);if(!a)return null;const s=n[a.word];return s?{range:new e.Range(i.lineNumber,a.startColumn,i.lineNumber,a.endColumn),contents:[{value:`**${s.type}** \`${a.word}\``},{value:s.description},{value:`_Category: ${s.category}_`}]}:null}}),ci=!0,console.log(`[Monaco] ✅ Viji GLSL completions registered (${t.length} uniforms)`)}catch(n){throw console.error("[Monaco] ❌ Failed to load Viji shader uniforms:",n),n}}let di=null,Te=null,fi=!1;async function kh(e){const n=e.languages.typescript;Te&&(Te.dispose(),console.log("[Monaco] 🗑️ Disposed previous type definitions"));const{artistDts:t}=await Je(async()=>{const{artistDts:r}=await import("./artist-dts-BHUsvSI6.js");return{artistDts:r}},[]);Te=n.typescriptDefaults.addExtraLib(t,"file:///node_modules/@viji-dev/core/viji-native.d.ts"),console.log("[Monaco] ✅ Configured for Native renderer")}async function vh(e){const n=e.languages.typescript;Te&&(Te.dispose(),console.log("[Monaco] 🗑️ Disposed previous type definitions"));const{artistDtsP5:t}=await Je(async()=>{const{artistDtsP5:r}=await import("./artist-dts-p5-Cyw8vmy_.js");return{artistDtsP5:r}},[]);Te=n.typescriptDefaults.addExtraLib(t,"file:///node_modules/@viji-dev/core/viji-p5.d.ts"),console.log("[Monaco] ✅ Configured for P5.js renderer")}async function Ch(e){Te&&(Te.dispose(),Te=null,console.log("[Monaco] 🗑️ Disposed TypeScript type definitions (switching to GLSL)")),yh(e),await wh(e),console.log("[Monaco] ✅ Configured for Shader renderer")}function jh(e){if(fi)return;const n=e.languages.typescript;n.typescriptDefaults.setEagerModelSync?.(!0),n.javascriptDefaults.setEagerModelSync?.(!0),fi=!0}function Sh(e){const n=e.languages.typescript;n.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!1,noSyntaxValidation:!1,diagnosticCodesToIgnore:[2307,1375]}),n.javascriptDefaults.setDiagnosticsOptions?.({noSemanticValidation:!1,noSyntaxValidation:!1,diagnosticCodesToIgnore:[2307,1375]});const t={target:n.ScriptTarget.ES2020,allowJs:!0,checkJs:!1,noEmit:!0,moduleResolution:n.ModuleResolutionKind.NodeJs,module:n.ModuleKind.ESNext,moduleDetection:3,strict:!1,skipLibCheck:!0,noLib:!1};n.typescriptDefaults.setCompilerOptions(t),n.javascriptDefaults.setCompilerOptions?.(t)}async function Eh(e,n){jh(e);const t=n?Yn(n):"native";return di===t?(console.log(`[Monaco] Already configured for ${t} renderer`),t):(console.log(`[Monaco] Configuring for ${t} renderer...`),t==="shader"?await Ch(e):(Sh(e),t==="p5"?await vh(e):await kh(e)),di=t,t)}const pi=()=>Math.random().toString(36).substr(2,9),Nh=async e=>new Promise(n=>{const t=new Audio,r=URL.createObjectURL(e);t.onloadedmetadata=()=>{URL.revokeObjectURL(r),n({duration:t.duration,title:e.name.replace(/\.[^/.]+$/,"")})},t.onerror=()=>{URL.revokeObjectURL(r),n({title:e.name.replace(/\.[^/.]+$/,"")})},t.src=r}),Ah=async e=>new Promise(n=>{const t=document.createElement("video"),r=URL.createObjectURL(e);t.onloadedmetadata=()=>{URL.revokeObjectURL(r),n({duration:t.duration})},t.onerror=()=>{URL.revokeObjectURL(r),n({})},t.src=r}),hi={hasGeneral:!0,hasAudio:!1,hasVideo:!1,hasInteraction:!1},Ih=(e,n)=>{const[t,r]=y.useState({coreInstance:null,parameterGroups:[],parameters:{},capabilities:hi,sceneError:null,isInitializing:!1,resolution:1,frameRateMode:"full"}),i=y.useRef(null),a=y.useRef(n),s=y.useRef(!0),o=y.useCallback(async()=>{if(i.current){try{await i.current.destroy()}catch{}i.current=null,s.current&&r(k=>({...k,coreInstance:null,parameterGroups:[],parameters:{},capabilities:hi,sceneError:null}))}},[]),u=y.useCallback(k=>{if(!s.current)return;const b=k.getVisibleParameterGroups?.()||k.getParameterGroups?.()||[],C={};for(const j of b)if(j.parameters&&typeof j.parameters=="object")for(const[I,E]of Object.entries(j.parameters))C[I]=E.defaultValue??E.value;r(j=>({...j,parameterGroups:b,parameters:{...j.parameters,...C}}))},[]),l=y.useCallback(async k=>{const b=e.current;if(!(!b||!b.isConnected)){r(C=>({...C,isInitializing:!0,sceneError:null}));try{await o(),b&&(b.innerHTML="");const C=new vs({hostContainer:b,sceneCode:k,frameRateMode:t.frameRateMode,resolution:t.resolution,allowUserInteraction:!0});C.onParametersDefined(()=>{u(C)}),C.onCapabilitiesChange&&C.onCapabilitiesChange(j=>{s.current&&(r(I=>({...I,capabilities:{hasGeneral:!0,hasAudio:!!j?.hasAudio,hasVideo:!!j?.hasVideo,hasInteraction:!!j?.hasInteraction}})),u(C))}),await C.initialize(),i.current=C,s.current&&r(j=>({...j,coreInstance:C,isInitializing:!1}))}catch(C){console.error("[PlaygroundCore] Init error:",C),s.current&&r(j=>({...j,sceneError:C?.message||"Failed to initialize scene",isInitializing:!1}))}}},[e,o,u,t.frameRateMode,t.resolution]),c=y.useCallback(async k=>{a.current=k,await l(k)},[l]),d=y.useCallback((k,b)=>{i.current?.setParameter(k,b)},[]),f=y.useCallback((k,b)=>{r(C=>({...C,parameters:{...C.parameters,[k]:b}}))},[]),h=y.useCallback(async k=>{if(r(b=>({...b,resolution:k})),i.current)try{await i.current.setResolution(k)}catch{}},[]),x=y.useCallback(async k=>{if(r(b=>({...b,frameRateMode:k})),i.current)try{await i.current.setFrameRate(k)}catch{}},[]),w=y.useRef(void 0);return y.useEffect(()=>{const k=e.current;if(!k||!i.current)return;const b=()=>{!i.current||!s.current||k.clientWidth===0||k.clientHeight===0||(clearTimeout(w.current),w.current=setTimeout(()=>{if(i.current&&s.current)try{i.current.updateResolution()}catch{}},50))},C=new ResizeObserver(b);return C.observe(k),()=>{C.disconnect(),clearTimeout(w.current)}},[e,t.coreInstance]),y.useEffect(()=>(s.current=!0,()=>{s.current=!1,clearTimeout(w.current),i.current&&(i.current.destroy().catch(()=>{}),i.current=null)}),[]),{...t,refresh:c,setParameter:d,commitParameter:f,setResolution:h,setFrameRateMode:x,createInstance:l,destroyInstance:o}},Ph=(e,n,t)=>{const[r,i]=y.useState({videoInputType:t?.video?"asset":"none",audioInputType:t?.audio?"asset":"none",interactionEnabled:!0,streamError:null,audioDevices:[],videoDevices:[],audioFiles:[],videoFiles:[],audioIsPlaying:!1,audioCurrentTime:0,audioDuration:0,audioVolume:1,audioMuted:!1}),a=y.useRef(null),s=y.useRef(null),o=y.useRef(null),u=y.useRef(null),l=y.useRef(null),c=y.useRef(null),d=y.useRef(null),f=y.useRef(null),h=y.useRef(new Map),x=y.useCallback(async()=>{if(!(!t?.audio||!e))try{a.current?.pause(),s.current?.close();const m=new Audio(t.audio);m.crossOrigin="anonymous",m.loop=!0,m.volume=1,await m.play().catch(()=>{}),a.current=m;const T=new AudioContext;s.current=T;const P=T.createMediaElementSource(m),M=T.createMediaStreamDestination();P.connect(M),P.connect(T.destination),await e.setAudioStream(M.stream)}catch(m){console.error("[PlaygroundInputs] Failed to connect audio asset:",m)}},[t?.audio,e]),w=y.useCallback(async()=>{if(!(!t?.video||!e))try{o.current?.pause();const m=document.createElement("video");m.src=t.video,m.crossOrigin="anonymous",m.loop=!0,m.muted=!0,m.playsInline=!0,await m.play().catch(()=>{}),o.current=m;const T=m.captureStream?.()||m.mozCaptureStream?.();T&&await e.setVideoStream(T)}catch(m){console.error("[PlaygroundInputs] Failed to connect video asset:",m)}},[t?.video,e]);y.useEffect(()=>{if(e)return t?.audio&&r.audioInputType==="asset"&&x(),t?.video&&r.videoInputType==="asset"&&w(),()=>{a.current?.pause(),o.current?.pause()}},[e,t?.audio,t?.video]);const k=y.useRef(!1);y.useEffect(()=>{if(!e||!t?.images||k.current)return;k.current=!0,(async()=>{for(const[T,P]of Object.entries(t.images))try{const q=await(await fetch(P,{mode:"cors"})).blob();await e.setParameter(T,q)}catch(M){console.error(`[PlaygroundInputs] Failed to inject image asset "${T}":`,M)}})()},[e,t?.images]);const b=y.useCallback(()=>{u.current?.getTracks().forEach(m=>m.stop()),u.current=null,l.current?.getTracks().forEach(m=>m.stop()),l.current=null,c.current?.getTracks().forEach(m=>m.stop()),c.current=null},[]),C=y.useCallback(async(m,T)=>{try{const P={};m&&(P.audio=!0),T&&(P.video=!0),(await navigator.mediaDevices.getUserMedia(P)).getTracks().forEach(Q=>Q.stop());const q=await navigator.mediaDevices.enumerateDevices();i(Q=>({...Q,audioDevices:m?q.filter(K=>K.kind==="audioinput"):Q.audioDevices,videoDevices:T?q.filter(K=>K.kind==="videoinput"):Q.videoDevices}))}catch(P){console.error("[PlaygroundInputs] Device enumeration failed:",P)}},[]),j=y.useCallback(()=>(d.current||(d.current=new Audio),d.current),[]),I=y.useCallback(()=>{const m=d.current;m&&(m.pause(),m.ontimeupdate=null,m.onended=null),f.current&&(URL.revokeObjectURL(f.current),f.current=null),i(T=>({...T,audioIsPlaying:!1,audioCurrentTime:0}))},[]),E=y.useCallback(async m=>{const T=h.current,P=m??r.currentAudioFileId??Array.from(T.keys())[0];if(!P)return;const M=T.get(P);if(!M)return;const q=j();if(f.current&&q.src!==""){if(r.currentAudioFileId!==P){URL.revokeObjectURL(f.current);const K=URL.createObjectURL(M);f.current=K,q.src=K}}else{const Q=URL.createObjectURL(M);f.current=Q,q.src=Q}q.volume=r.audioMuted?0:r.audioVolume,q.ontimeupdate=()=>{i(Q=>({...Q,audioCurrentTime:q.currentTime}))},q.onended=()=>{i(Q=>{const K=Q.audioFiles.findIndex(te=>te.id===P);if(K>=0&&K<Q.audioFiles.length-1){const te=Q.audioFiles[K+1].id;setTimeout(()=>E(te),0)}return{...Q,audioIsPlaying:!1}})};try{await q.play();const Q=r.audioFiles.find(K=>K.id===P)?.duration??q.duration??0;if(i(K=>({...K,audioIsPlaying:!0,currentAudioFileId:P,audioDuration:Q})),e&&r.audioInputType==="files")try{const K=new AudioContext,te=K.createMediaElementSource(q),oe=K.createMediaStreamDestination();te.connect(oe),te.connect(K.destination),await e.setAudioStream(oe.stream)}catch{}}catch(Q){console.error("[PlaygroundInputs] Failed to play audio file:",Q)}},[r.currentAudioFileId,r.audioFiles,r.audioInputType,r.audioMuted,r.audioVolume,e,j]),v=y.useCallback(()=>{d.current?.pause(),i(m=>({...m,audioIsPlaying:!1}))},[]),B=y.useCallback(async()=>{r.audioIsPlaying?v():await E()},[r.audioIsPlaying,v,E]),$=y.useCallback(m=>{const T=d.current;T&&(T.currentTime=m,i(P=>({...P,audioCurrentTime:m})))},[]),V=y.useCallback(()=>{i(m=>{const T=m.audioFiles.findIndex(P=>P.id===m.currentAudioFileId);if(T>=0&&T<m.audioFiles.length-1){const P=m.audioFiles[T+1].id;setTimeout(()=>E(P),0)}return m})},[E]),S=y.useCallback(()=>{i(m=>{const T=m.audioFiles.findIndex(P=>P.id===m.currentAudioFileId);if(T>0){const P=m.audioFiles[T-1].id;setTimeout(()=>E(P),0)}return m})},[E]),z=y.useCallback(m=>{i(T=>({...T,audioVolume:m})),d.current&&(d.current.volume=m)},[]),R=y.useCallback(()=>{i(m=>{const T=!m.audioMuted;return d.current&&(d.current.volume=T?0:m.audioVolume),{...m,audioMuted:T}})},[]),L=y.useCallback(async m=>{const T=[];for(const P of m){const M=pi();h.current.set(M,P);const q=await Nh(P);T.push({id:M,name:P.name,...q})}i(P=>({...P,audioFiles:[...P.audioFiles,...T]}))},[]),D=y.useCallback(async m=>{const T=[];for(const P of m){const M=pi(),q=await Ah(P);T.push({id:M,name:P.name,...q})}i(P=>({...P,videoFiles:[...P.videoFiles,...T]}))},[]),F=y.useCallback(m=>{h.current.delete(m),i(T=>({...T,audioFiles:T.audioFiles.filter(P=>P.id!==m),currentAudioFileId:T.currentAudioFileId===m?void 0:T.currentAudioFileId}))},[]),O=y.useCallback(m=>{i(T=>({...T,videoFiles:T.videoFiles.filter(P=>P.id!==m),currentVideoFileId:T.currentVideoFileId===m?void 0:T.currentVideoFileId}))},[]),H=y.useCallback(async m=>{const T=m;if(i(P=>({...P,videoInputType:T,streamError:null})),!!e)try{if(o.current?.pause(),l.current?.getTracks().forEach(P=>P.stop()),l.current=null,c.current?.getVideoTracks().forEach(P=>P.stop()),T==="camera"){const P=r.currentVideoDeviceId,M={video:P?{deviceId:{exact:P}}:!0},q=await navigator.mediaDevices.getUserMedia(M);l.current=q,await e.setVideoStream(q)}else if(T==="screen_video"){const P=await navigator.mediaDevices.getDisplayMedia({video:!0});c.current=P,P.getVideoTracks()[0]?.addEventListener("ended",()=>{i(M=>({...M,videoInputType:"none"})),e.setVideoStream(null)}),await e.setVideoStream(P)}else T==="asset"&&t?.video?await w():T==="files"?await e.setVideoStream(null):await e.setVideoStream(null)}catch(P){i(M=>({...M,streamError:P?.message||"Video input error"}))}},[e,w,t?.video,r.currentVideoDeviceId]),Y=y.useCallback(async m=>{const T=m;if(i(P=>({...P,audioInputType:T,streamError:null})),!!e)try{if(a.current?.pause(),u.current?.getTracks().forEach(P=>P.stop()),u.current=null,I(),c.current?.getAudioTracks().forEach(P=>P.stop()),T==="microphone"){const P=r.currentAudioDeviceId,M={audio:P?{deviceId:{exact:P}}:!0},q=await navigator.mediaDevices.getUserMedia(M);u.current=q,await e.setAudioStream(q)}else if(T==="screen_audio"){const P=await navigator.mediaDevices.getDisplayMedia({audio:!0,video:!0});P.getVideoTracks().forEach(q=>q.stop()),c.current=P;const M=new MediaStream(P.getAudioTracks());P.getAudioTracks()[0]?.addEventListener("ended",()=>{i(q=>({...q,audioInputType:"none"})),e.setAudioStream(null)}),await e.setAudioStream(M)}else T==="asset"&&t?.audio?await x():T==="files"?await e.setAudioStream(null):await e.setAudioStream(null)}catch(P){i(M=>({...M,streamError:P?.message||"Audio input error"}))}},[e,x,t?.audio,r.currentAudioDeviceId,I]),X=y.useCallback(async(m,T)=>{if(i(P=>({...P,currentAudioDeviceId:m})),!(!e||r.audioInputType!=="microphone"))try{u.current?.getTracks().forEach(M=>M.stop());const P=await navigator.mediaDevices.getUserMedia({audio:{deviceId:{exact:m}}});u.current=P,await e.setAudioStream(P)}catch(P){i(M=>({...M,streamError:P?.message||"Audio device error"}))}},[e,r.audioInputType]),g=y.useCallback(async(m,T)=>{if(i(P=>({...P,currentVideoDeviceId:m})),!(!e||r.videoInputType!=="camera"))try{l.current?.getTracks().forEach(M=>M.stop());const P=await navigator.mediaDevices.getUserMedia({video:{deviceId:{exact:m}}});l.current=P,await e.setVideoStream(P)}catch(P){i(M=>({...M,streamError:P?.message||"Video device error"}))}},[e,r.videoInputType]),ee=y.useCallback(async()=>{const m=!r.interactionEnabled;if(i(T=>({...T,interactionEnabled:m})),e)try{await e.setInteractionEnabled(m)}catch(T){console.error("[PlaygroundInputs] Failed to toggle interaction:",T),i(P=>({...P,interactionEnabled:!m}))}},[r.interactionEnabled,e]),J=y.useCallback(()=>{i(m=>({...m,streamError:null}))},[]);return y.useEffect(()=>()=>{b(),a.current?.pause(),s.current?.close(),o.current?.pause(),d.current?.pause(),d.current&&(d.current.ontimeupdate=null),f.current&&URL.revokeObjectURL(f.current),h.current.forEach(()=>{})},[]),{...r,onVideoInputChange:H,onAudioInputChange:Y,onInteractionToggle:ee,onClearStreamError:J,showAudioInput:!!n?.audio,showVideoInput:!!n?.video,showInteraction:!!n?.interaction,hasAssetAudio:!!t?.audio,hasAssetVideo:!!t?.video,hasAudioFiles:r.audioFiles.length>0,hasVideoFiles:r.videoFiles.length>0,enumerateDevices:C,selectAudioDevice:X,selectVideoDevice:g,addAudioFiles:L,addVideoFiles:D,removeAudioFile:F,removeVideoFile:O,playAudioFile:E,pauseAudioFile:v,handleAudioPlayPause:B,seekAudio:$,nextAudioTrack:V,previousAudioTrack:S,setAudioVolume:z,toggleAudioMute:R}},mi=400,Rh=200,Fh=700,Th=({id:e,isInitializing:n,sceneError:t,onContainerReady:r,children:i,className:a=""})=>{const s=y.useRef(null),o=y.useRef(!1),[u,l]=y.useState(mi),c=y.useRef(!1),d=y.useRef(0),f=y.useRef(0);y.useEffect(()=>{s.current&&!o.current&&(o.current=!0,r(s.current))},[r]);const h=y.useCallback(b=>{b.preventDefault(),c.current=!0,d.current=b.clientY,f.current=u,b.target.setPointerCapture(b.pointerId)},[u]),x=y.useCallback(b=>{if(!c.current)return;const C=b.clientY-d.current;l(Math.max(Rh,Math.min(Fh,f.current+C)))},[]),w=y.useCallback(()=>{c.current=!1},[]),k=y.useCallback(()=>{l(mi)},[]);return p.jsxs("div",{className:"relative",children:[p.jsxs("div",{className:`relative w-full bg-black rounded-t-xl overflow-hidden ${a}`,style:{height:u},children:[p.jsx("div",{ref:s,id:e,className:"absolute inset-0"}),n&&p.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/60 z-10",children:p.jsxs("div",{className:"flex flex-col items-center gap-2",children:[p.jsx(Rn,{color:"primary",size:"md"}),p.jsx("span",{className:"text-white/60 text-xs",children:"Loading scene..."})]})}),t&&p.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/80 z-10 p-4",children:p.jsxs("div",{className:"text-center max-w-sm",children:[p.jsx("p",{className:"text-red-400 text-sm font-medium mb-1",children:"Scene Error"}),p.jsx("p",{className:"text-red-300/70 text-xs font-mono break-all",children:t})]})}),i]}),p.jsx("div",{className:"group relative h-2 cursor-ns-resize flex items-center justify-center bg-white/[0.02] hover:bg-white/[0.06] transition-colors",onPointerDown:h,onPointerMove:x,onPointerUp:w,onDoubleClick:k,children:p.jsx("div",{className:"w-8 h-0.5 rounded-full bg-white/15 group-hover:bg-white/30 transition-colors"})})]})},Dh=({parameterGroups:e,parameters:n,capabilities:t,coreInstance:r,resolution:i,frameRateMode:a,showFPS:s,onParameterChange:o,onParameterCommit:u,onResolutionChange:l,onFrameRateChange:c,onShowFPSChange:d,onResetDefaults:f,videoInputType:h,audioInputType:x,interactionEnabled:w,streamError:k,onVideoInputChange:b,onAudioInputChange:C,onInteractionToggle:j,onClearStreamError:I,showAudioInput:E,showVideoInput:v,showInteraction:B,hasAssetAudio:$,hasAssetVideo:V,hasAudioFiles:S,hasVideoFiles:z,audioDevices:R,videoDevices:L,currentAudioDeviceId:D,currentVideoDeviceId:F,onEnumerateDevices:O,onSelectAudioDevice:H,onSelectVideoDevice:Y,audioFiles:X,videoFiles:g,currentAudioFileId:ee,currentVideoFileId:J,onAddAudioFiles:m,onAddVideoFiles:T,onRemoveAudioFile:P,onRemoveVideoFile:M,onSelectAudioFile:q,audioIsPlaying:Q,audioCurrentTime:K,audioDuration:te,audioVolume:oe,audioMuted:pe,onAudioPlayPause:ae,onAudioSeek:je,onAudioNext:le,onAudioPrevious:ue,onAudioVolumeChange:he,onAudioMuteToggle:Ne,className:ye=""})=>{const[_e,Me]=y.useState(!1),[we,Ze]=y.useState(!1),He=e.length>0,et=v||E||B,N=y.useCallback(async A=>{await O(A==="audio",A==="video")},[O]);return p.jsxs("div",{className:`absolute inset-0 pointer-events-none z-10 ${ye}`,children:[p.jsxs("div",{className:"absolute top-2 left-2 flex gap-1 pointer-events-auto",children:[He&&p.jsxs(pr,{isOpen:_e,onOpenChange:Me,placement:"bottom-start",children:[p.jsx(fr,{children:p.jsx(Xe,{isIconOnly:!0,size:"sm",variant:"flat",className:"bg-black/40 backdrop-blur-sm text-white border border-white/10 hover:bg-white/10",children:p.jsx(Cs,{className:"w-4 h-4"})})}),p.jsx(dr,{className:"bg-black/95 backdrop-blur-md border-white/20 w-72 max-h-96 overflow-y-auto p-3",children:p.jsx(gh,{parameterGroups:e,parameters:n,capabilities:t,coreInstance:r,onParameterChange:o,onParameterCommit:u})})]}),p.jsxs(pr,{isOpen:we,onOpenChange:Ze,placement:"bottom-start",children:[p.jsx(fr,{children:p.jsx(Xe,{isIconOnly:!0,size:"sm",variant:"flat",className:"bg-black/40 backdrop-blur-sm text-white border border-white/10 hover:bg-white/10",children:p.jsx(Ci,{className:"w-4 h-4"})})}),p.jsx(dr,{className:"bg-black/95 backdrop-blur-md border-white/20 w-72 max-h-96 overflow-y-auto p-0",children:p.jsx(xh,{resolution:i,frameRateMode:a,showFPS:s,coreActive:!!r,onResolutionChange:l,onFrameRateChange:c,onShowFPSChange:d,onResetDefaults:f})})]})]}),et&&p.jsx(js,{className:"bottom-2 right-2",videoInputType:h,audioInputType:x,interactionEnabled:w,streamError:k,showVideo:v,showAudio:E,showInteraction:B,hasAssetVideo:V,hasAssetAudio:$,hasAudioFiles:S,hasVideoFiles:z,onVideoInputChange:b,onAudioInputChange:C,onInteractionToggle:j,onClearStreamError:I,renderExpansionPanel:({isOpen:A,title:U,children:W})=>p.jsx(Is,{isOpen:A,title:U,className:"bottom-0",children:W}),renderDeviceList:A=>p.jsx(As,{deviceType:A,devices:A==="audio"?R:L,currentDeviceId:A==="audio"?D:F,onDeviceSelect:A==="audio"?H:Y,onRefreshDevices:()=>O(A==="audio",A==="video"),onLoad:()=>N(A)}),renderFileDropzone:(A,U)=>p.jsx(Ns,{fileType:A,onAddFiles:A==="audio"?m:T,onFilesAdded:U}),renderFileList:(A,U)=>p.jsx(Ss,{fileType:A,files:A==="audio"?X:g,currentFileId:A==="audio"?ee:J,onFileSelect:W=>{A==="audio"&&q(W)},onFileRemove:W=>{A==="audio"?P(W):M(W)},onBackToDropzone:U,renderMediaPlayer:A==="audio"?()=>{const W=X.find(re=>re.id===ee);return p.jsx(Es,{isPlaying:Q,currentTime:K,duration:W?.duration??te,volume:oe,isMuted:pe,hasFiles:X.length>0,onPlayPause:ae,onSeek:je,onNext:le,onPrevious:ue,onVolumeChange:he,onMuteToggle:Ne})}:void 0})})]})},_h=({block:e,index:n})=>{const[t,r]=y.useState(e.sceneCode),[i,a]=y.useState(!1),s=y.useRef(null),o=Yn(e.sceneCode),u=bh(o),l=Ih(s,e.sceneCode),c=Ph(l.coreInstance,e.capabilities,e.assets),d=y.useCallback(w=>{s.current=w,l.createInstance(e.sceneCode)},[]),f=y.useCallback(()=>{l.refresh(t)},[l.refresh,t]),h=y.useCallback((w,k)=>{Eh(k,e.sceneCode)},[e.sceneCode]),x=t!==e.sceneCode;return p.jsxs("div",{className:"my-8 rounded-xl border border-white/10 overflow-hidden bg-black/30",children:[p.jsx(Th,{id:`docs-playground-${n}`,isInitializing:l.isInitializing,sceneError:l.sceneError,onContainerReady:d,children:p.jsx(Dh,{parameterGroups:l.parameterGroups,parameters:l.parameters,capabilities:l.capabilities,coreInstance:l.coreInstance,resolution:l.resolution,frameRateMode:l.frameRateMode,showFPS:i,onParameterChange:l.setParameter,onParameterCommit:l.commitParameter,onResolutionChange:l.setResolution,onFrameRateChange:l.setFrameRateMode,onShowFPSChange:a,onResetDefaults:()=>{l.setResolution(1),l.setFrameRateMode("full"),a(!1)},videoInputType:c.videoInputType,audioInputType:c.audioInputType,interactionEnabled:c.interactionEnabled,streamError:c.streamError,onVideoInputChange:c.onVideoInputChange,onAudioInputChange:c.onAudioInputChange,onInteractionToggle:c.onInteractionToggle,onClearStreamError:c.onClearStreamError,showAudioInput:c.showAudioInput,showVideoInput:c.showVideoInput,showInteraction:c.showInteraction,hasAssetAudio:c.hasAssetAudio,hasAssetVideo:c.hasAssetVideo,hasAudioFiles:c.hasAudioFiles,hasVideoFiles:c.hasVideoFiles,audioDevices:c.audioDevices,videoDevices:c.videoDevices,currentAudioDeviceId:c.currentAudioDeviceId,currentVideoDeviceId:c.currentVideoDeviceId,onEnumerateDevices:c.enumerateDevices,onSelectAudioDevice:c.selectAudioDevice,onSelectVideoDevice:c.selectVideoDevice,audioFiles:c.audioFiles,videoFiles:c.videoFiles,currentAudioFileId:c.currentAudioFileId,currentVideoFileId:c.currentVideoFileId,onAddAudioFiles:c.addAudioFiles,onAddVideoFiles:c.addVideoFiles,onRemoveAudioFile:c.removeAudioFile,onRemoveVideoFile:c.removeVideoFile,onSelectAudioFile:c.playAudioFile,audioIsPlaying:c.audioIsPlaying,audioCurrentTime:c.audioCurrentTime,audioDuration:c.audioDuration,audioVolume:c.audioVolume,audioMuted:c.audioMuted,onAudioPlayPause:c.handleAudioPlayPause,onAudioSeek:c.seekAudio,onAudioNext:c.nextAudioTrack,onAudioPrevious:c.previousAudioTrack,onAudioVolumeChange:c.setAudioVolume,onAudioMuteToggle:c.toggleAudioMute})}),p.jsxs("div",{className:"flex items-center justify-between px-4 py-2 bg-black/50 border-t border-white/10",children:[p.jsxs("div",{children:[p.jsx("h4",{className:"text-white text-sm font-medium",children:e.title}),e.description&&p.jsx("p",{className:"text-white/50 text-xs",children:e.description})]}),p.jsx(Xe,{size:"sm",variant:"flat",className:`${x?"bg-primary-500/20 text-primary-300":"bg-white/10 text-white/60"} min-w-0`,startContent:p.jsx(Gs,{className:"w-3.5 h-3.5"}),onPress:f,isDisabled:l.isInitializing,children:"Run"})]}),p.jsx("div",{className:"border-t border-white/10",style:{maxHeight:"500px",overflow:"hidden"},children:p.jsx(Ps,{height:Math.min(e.sceneCode.split(`
|
|
52
|
+
`).length*19+20,500),language:u,path:`file:///docs/playground-${n}.${u==="glsl"?"glsl":"ts"}`,value:t,onChange:w=>r(w||""),onMount:h,theme:"vs-dark",options:{scrollBeyondLastLine:!1,minimap:{enabled:!1},readOnly:!1,fontSize:13,lineNumbers:"on",glyphMargin:!1,folding:!1,lineDecorationsWidth:0,lineNumbersMinChars:3,padding:{top:8,bottom:8},scrollbar:{verticalScrollbarSize:8,horizontalScrollbarSize:8},overviewRulerLanes:0,hideCursorInOverviewRuler:!0,overviewRulerBorder:!1,automaticLayout:!0,fixedOverflowWidgets:!0}})})]})},Lh=({page:e,currentPagePath:n})=>{let t=0;return p.jsx("div",{className:"docs-page-content",children:e.content.map((r,i)=>{if(r.type==="text")return p.jsx(ph,{markdown:r.markdown,currentPagePath:n},`text-${i}`);if(r.type==="live-example"){const a=t++;return p.jsx(_h,{block:r,index:a},`${n}-live-${i}`)}return null})})},zh=({pageId:e,pageTitle:n})=>{const t=Fs(e),r=Ts(e),i=[];if(r?.children)for(const a of r.children)a.id!==e&&a.path&&cn(a.id)&&i.push(a);else if(t?.pages)for(const a of t.pages)a.id!==e&&a.path&&cn(a.id)&&i.push(a);return p.jsxs("div",{className:"max-w-2xl mx-auto py-16 text-center",children:[p.jsx(Rs,{className:"w-16 h-16 text-white/20 mx-auto mb-6"}),p.jsx("h1",{className:"text-3xl font-bold text-white mb-4",children:n}),p.jsx("p",{className:"text-white/60 text-lg mb-8",children:"This page is currently under development and will be available soon."}),i.length>0&&p.jsxs("div",{className:"text-left bg-white/5 rounded-xl p-6 border border-white/10",children:[p.jsx("h3",{className:"text-white font-medium mb-3",children:"Related pages you can explore:"}),p.jsx("ul",{className:"space-y-2",children:i.map(a=>p.jsx("li",{children:p.jsx(Si,{to:`/docs/${a.path}`,className:"text-primary-400 hover:text-primary-300 transition-colors",children:a.title})},a.id))})]})]})},Oh=({pagePath:e})=>{const{manifest:n,findPageByPath:t,getPageContent:r}=Ni();if(!n)return null;const i=t(e);if(!i)return p.jsxs("div",{className:"max-w-2xl mx-auto py-16 text-center",children:[p.jsx(Pn,{className:"w-16 h-16 text-white/20 mx-auto mb-6"}),p.jsx("h1",{className:"text-3xl font-bold text-white mb-4",children:"Page Not Found"}),p.jsxs("p",{className:"text-white/60 text-lg",children:["The documentation page at ",p.jsx("code",{className:"bg-white/10 px-2 py-0.5 rounded text-sm",children:e})," doesn't exist."]})]});const a=r(i.id);return a?p.jsx(Lh,{page:a,currentPagePath:e}):p.jsx(zh,{pageId:i.id,pageTitle:i.title})},Mh=({scrollRef:e})=>{const t=ki().pathname.replace(/^\/docs\/?/,"")||"";return y.useEffect(()=>{e.current?.scrollTo(0,0)},[t,e]),t?p.jsx(Oh,{pagePath:t}):p.jsx(Os,{to:"/docs/getting-started/overview",replace:!0})},qh=()=>{const{manifest:e,isLoading:n,error:t}=Ni(),r=Ds(),i=y.useRef(null);return n?p.jsx("div",{className:"fixed inset-0 bg-black flex items-center justify-center",children:p.jsxs("div",{className:"flex flex-col items-center gap-3",children:[p.jsx(Rn,{color:"primary",size:"lg"}),p.jsx("p",{className:"text-white/60 text-sm",children:"Loading documentation..."})]})}):t||!e?p.jsx("div",{className:"fixed inset-0 bg-black flex items-center justify-center",children:p.jsxs("div",{className:"text-center",children:[p.jsx("p",{className:"text-red-400 text-lg mb-2",children:"Failed to load documentation"}),p.jsx("p",{className:"text-white/50 text-sm",children:t})]})}):p.jsx(_s.Provider,{value:r,children:p.jsxs("div",{className:"fixed inset-0 bg-black text-white flex",children:[p.jsx(Jo,{navigation:e.navigation}),p.jsx("main",{ref:i,className:"flex-1 overflow-y-auto pl-0 lg:pl-72 transition-all duration-300",children:p.jsx("div",{className:"max-w-4xl mx-auto px-6 py-8 pt-16",children:p.jsx(Ls,{children:p.jsx(zs,{path:"*",element:p.jsx(Mh,{scrollRef:i})})})})})]})})},$h=[{path:"getting-started/overview",label:"Getting Started",icon:Ai},{path:"getting-started/best-practices",label:"Best Practices",icon:Ms},{path:"getting-started/common-mistakes",label:"Common Mistakes",icon:Pn}],gi={native:{path:"native/quickstart",label:"Native Renderer Guide"},p5:{path:"p5/quickstart",label:"P5 Renderer Guide"},shader:{path:"shader/quickstart",label:"Shader Renderer Guide"}},Gh=({currentCode:e,onClose:n})=>{const t=e?Yn(e):"native",r=gi[t]||gi.native,i=a=>{window.open(`/docs/${a}`,"_blank"),n()};return p.jsxs("div",{className:"w-72 bg-black/95 backdrop-blur-md border border-white/10 rounded-xl shadow-2xl overflow-hidden",children:[p.jsxs("div",{className:"p-4 border-b border-white/10",children:[p.jsx("h3",{className:"text-white font-semibold text-sm",children:"Viji Scene API"}),p.jsx("p",{className:"text-white/50 text-xs mt-1",children:"Documentation & examples for building scenes"})]}),p.jsxs("div",{className:"p-2",children:[p.jsxs("button",{onClick:()=>i(r.path),className:"w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-left hover:bg-white/5 transition-colors group",children:[p.jsx(In,{className:"w-4 h-4 text-primary-400 flex-shrink-0"}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsx("p",{className:"text-white text-sm font-medium truncate",children:r.label}),p.jsxs("p",{className:"text-white/40 text-xs",children:["Current renderer: ",t]})]}),p.jsx(tr,{className:"w-3.5 h-3.5 text-white/30 group-hover:text-white/60"})]}),p.jsx("div",{className:"h-px bg-white/5 my-1"}),$h.map(a=>{const s=a.icon;return p.jsxs("button",{onClick:()=>i(a.path),className:"w-full flex items-center gap-3 px-3 py-2 rounded-lg text-left hover:bg-white/5 transition-colors group",children:[p.jsx(s,{className:"w-4 h-4 text-white/50 flex-shrink-0"}),p.jsx("span",{className:"text-white/80 text-sm flex-1",children:a.label}),p.jsx(tr,{className:"w-3.5 h-3.5 text-white/20 group-hover:text-white/50"})]},a.path)})]}),p.jsx("div",{className:"p-2 pt-0",children:p.jsx("button",{onClick:()=>i("getting-started/overview"),className:"w-full px-3 py-2 rounded-lg text-center bg-white/5 hover:bg-white/10 transition-colors",children:p.jsx("span",{className:"text-primary-400 text-sm font-medium",children:"Open Full Documentation"})})})]})};export{ch as CalloutBlock,ti as CodeBlock,qh as DocsLayout,Lh as DocsPageRenderer,Oh as DocsPageView,Jo as DocsSidebar,Gh as EditorDocsMenu,_h as LivePlayground,ph as MarkdownRenderer,zh as MissingPage,Th as PlaygroundCanvas,Dh as PlaygroundOverlay,_s as ShikiContext,Xh as findPageByPath,fs as getPage,Ts as getPageParent,Fs as getPageSection,cn as isPageAvailable,ms as isPathValid,dh as resolveDocLink,Ni as useDocsData,Ih as usePlaygroundCore,Ph as usePlaygroundInputs,ps as useShikiHighlighter,Ds as useShikiLoader};
|