@malloy-publisher/app 0.0.76 → 0.0.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/RenderedResult-BAZuT25g-D9KeGh71.cjs +1 -0
- package/dist/RenderedResult-BAZuT25g-zsmphQm1.js +117 -0
- package/dist/index.cjs.js +133 -70
- package/dist/index.es.js +28246 -9519
- package/package.json +3 -2
- package/dist/RenderedResult-DXlUZo0k-CH-bOsNE.cjs +0 -1
- package/dist/RenderedResult-DXlUZo0k-Ck_Iae33.js +0 -79
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var VE=Object.create;var Ec=Object.defineProperty;var YE=Object.getOwnPropertyDescriptor;var KE=Object.getOwnPropertyNames;var QE=Object.getPrototypeOf,XE=Object.prototype.hasOwnProperty;var JE=(e,t,n)=>t in e?Ec(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ZE=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of KE(t))!XE.call(e,o)&&o!==n&&Ec(e,o,{get:()=>t[o],enumerable:!(r=YE(t,o))||r.enumerable});return e};var Xh=(e,t,n)=>(n=e!=null?VE(QE(e)):{},ZE(t||!e||!e.__esModule?Ec(n,"default",{value:e,enumerable:!0}):n,e));var G=(e,t,n)=>JE(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react/jsx-runtime"),O=require("react"),Ge=require("@mui/system"),Dg=require("@emotion/styled"),eT=require("@emotion/react"),v=require("@mui/material"),vt=require("axios"),bd=require("@tanstack/react-query"),Ed=require("markdown-to-jsx"),Sa=require("@mui/icons-material"),Ig=require("@react-spring/web"),Zi=require("react-dom");function wg(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const _=wg(O),tT=wg(Zi);var Bi={},Jh;function nT(){if(Jh)return Bi;Jh=1,Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.parse=a,Bi.serialize=c;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,n=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,r=/^[\u0020-\u003A\u003D-\u007E]*$/,o=Object.prototype.toString,i=(()=>{const h=function(){};return h.prototype=Object.create(null),h})();function a(h,p){const g=new i,b=h.length;if(b<2)return g;const T=p?.decode||d;let E=0;do{const C=h.indexOf("=",E);if(C===-1)break;const x=h.indexOf(";",E),k=x===-1?b:x;if(C>k){E=h.lastIndexOf(";",C-1)+1;continue}const w=s(h,E,C),S=l(h,C,w),B=h.slice(w,S);if(g[B]===void 0){let W=s(h,C+1,k),U=l(h,k,W);const y=T(h.slice(W,U));g[B]=y}E=k+1}while(E<b);return g}function s(h,p,g){do{const b=h.charCodeAt(p);if(b!==32&&b!==9)return p}while(++p<g);return g}function l(h,p,g){for(;p>g;){const b=h.charCodeAt(--p);if(b!==32&&b!==9)return p+1}return g}function c(h,p,g){const b=g?.encode||encodeURIComponent;if(!e.test(h))throw new TypeError(`argument name is invalid: ${h}`);const T=b(p);if(!t.test(T))throw new TypeError(`argument val is invalid: ${p}`);let E=h+"="+T;if(!g)return E;if(g.maxAge!==void 0){if(!Number.isInteger(g.maxAge))throw new TypeError(`option maxAge is invalid: ${g.maxAge}`);E+="; Max-Age="+g.maxAge}if(g.domain){if(!n.test(g.domain))throw new TypeError(`option domain is invalid: ${g.domain}`);E+="; Domain="+g.domain}if(g.path){if(!r.test(g.path))throw new TypeError(`option path is invalid: ${g.path}`);E+="; Path="+g.path}if(g.expires){if(!u(g.expires)||!Number.isFinite(g.expires.valueOf()))throw new TypeError(`option expires is invalid: ${g.expires}`);E+="; Expires="+g.expires.toUTCString()}if(g.httpOnly&&(E+="; HttpOnly"),g.secure&&(E+="; Secure"),g.partitioned&&(E+="; Partitioned"),g.priority)switch(typeof g.priority=="string"?g.priority.toLowerCase():void 0){case"low":E+="; Priority=Low";break;case"medium":E+="; Priority=Medium";break;case"high":E+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${g.priority}`)}if(g.sameSite)switch(typeof g.sameSite=="string"?g.sameSite.toLowerCase():g.sameSite){case!0:case"strict":E+="; SameSite=Strict";break;case"lax":E+="; SameSite=Lax";break;case"none":E+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${g.sameSite}`)}return E}function d(h){if(h.indexOf("%")===-1)return h;try{return decodeURIComponent(h)}catch{return h}}function u(h){return o.call(h)==="[object Date]"}return Bi}nT();/**
|
|
2
2
|
* react-router v7.6.2
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
* LICENSE.md file in the root directory of this source tree.
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
|
-
*/var Hu=e=>{throw TypeError(e)},Xh=(e,t,r)=>t.has(e)||Hu("Cannot "+r),ki=(e,t,r)=>(Xh(e,t,"read from private field"),r?r.call(e):t.get(e)),Jh=(e,t,r)=>t.has(e)?Hu("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),zl="popstate";function Zh(e={}){function t(n,o){let{pathname:a,search:i,hash:s}=n.location;return bo("",{pathname:a,search:i,hash:s},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function r(n,o){return typeof o=="string"?o:Rr(o)}return tm(t,r,null,e)}function me(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Xe(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function em(){return Math.random().toString(36).substring(2,10)}function Wl(e,t){return{usr:e.state,key:e.key,idx:t}}function bo(e,t,r=null,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ar(t):t,state:r,key:t&&t.key||n||em()}}function Rr({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Ar(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function tm(e,t,r,n={}){let{window:o=document.defaultView,v5Compat:a=!1}=n,i=o.history,s="POP",l=null,c=d();c==null&&(c=0,i.replaceState({...i.state,idx:c},""));function d(){return(i.state||{idx:null}).idx}function p(){s="POP";let v=d(),b=v==null?null:v-c;c=v,l&&l({action:s,location:y.location,delta:b})}function h(v,b){s="PUSH";let C=bo(y.location,v,b);c=d()+1;let w=Wl(C,c),k=y.createHref(C);try{i.pushState(w,"",k)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;o.location.assign(k)}a&&l&&l({action:s,location:y.location,delta:1})}function f(v,b){s="REPLACE";let C=bo(y.location,v,b);c=d();let w=Wl(C,c),k=y.createHref(C);i.replaceState(w,"",k),a&&l&&l({action:s,location:y.location,delta:0})}function g(v){return Vu(v)}let y={get action(){return s},get location(){return e(o,i)},listen(v){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(zl,p),l=v,()=>{o.removeEventListener(zl,p),l=null}},createHref(v){return t(o,v)},createURL:g,encodeLocation(v){let b=g(v);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:h,replace:f,go(v){return i.go(v)}};return y}function Vu(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),me(r,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:Rr(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}var no,Ul=class{constructor(e){if(Jh(this,no,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(ki(this,no).has(e))return ki(this,no).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){ki(this,no).set(e,t)}};no=new WeakMap;var rm=new Set(["lazy","caseSensitive","path","id","index","children"]);function nm(e){return rm.has(e)}var om=new Set(["lazy","caseSensitive","path","id","index","unstable_middleware","children"]);function am(e){return om.has(e)}function im(e){return e.index===!0}function wa(e,t,r=[],n={}){return e.map((o,a)=>{let i=[...r,String(a)],s=typeof o.id=="string"?o.id:i.join("-");if(me(o.index!==!0||!o.children,"Cannot specify children on an index route"),me(!n[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),im(o)){let l={...o,...t(o),id:s};return n[s]=l,l}else{let l={...o,...t(o),id:s,children:void 0};return n[s]=l,o.children&&(l.children=wa(o.children,t,i,n)),l}})}function Ir(e,t,r="/"){return da(e,t,r,!1)}function da(e,t,r,n){let o=typeof t=="string"?Ar(t):t,a=Bt(o.pathname||"/",r);if(a==null)return null;let i=Gu(e);lm(i);let s=null;for(let l=0;s==null&&l<i.length;++l){let c=xm(a);s=ym(i[l],c,n)}return s}function sm(e,t){let{route:r,pathname:n,params:o}=e;return{id:r.id,pathname:n,params:o,data:t[r.id],handle:r.handle}}function Gu(e,t=[],r=[],n=""){let o=(a,i,s)=>{let l={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:i,route:a};l.relativePath.startsWith("/")&&(me(l.relativePath.startsWith(n),`Absolute route path "${l.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(n.length));let c=rr([n,l.relativePath]),d=r.concat(l);a.children&&a.children.length>0&&(me(a.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),Gu(a.children,t,d,c)),!(a.path==null&&!a.index)&&t.push({path:c,score:fm(c,a.index),routesMeta:d})};return e.forEach((a,i)=>{if(a.path===""||!a.path?.includes("?"))o(a,i);else for(let s of Ku(a.path))o(a,i,s)}),t}function Ku(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,o=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return o?[a,""]:[a];let i=Ku(n.join("/")),s=[];return s.push(...i.map(l=>l===""?a:[a,l].join("/"))),o&&s.push(...i),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function lm(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:gm(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var cm=/^:[\w-]+$/,um=3,dm=2,pm=1,hm=10,mm=-2,Hl=e=>e==="*";function fm(e,t){let r=e.split("/"),n=r.length;return r.some(Hl)&&(n+=mm),t&&(n+=dm),r.filter(o=>!Hl(o)).reduce((o,a)=>o+(cm.test(a)?um:a===""?pm:hm),n)}function gm(e,t){return e.length===t.length&&e.slice(0,-1).every((n,o)=>n===t[o])?e[e.length-1]-t[t.length-1]:0}function ym(e,t,r=!1){let{routesMeta:n}=e,o={},a="/",i=[];for(let s=0;s<n.length;++s){let l=n[s],c=s===n.length-1,d=a==="/"?t:t.slice(a.length)||"/",p=Ca({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d),h=l.route;if(!p&&c&&r&&!n[n.length-1].route.index&&(p=Ca({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!p)return null;Object.assign(o,p.params),i.push({params:o,pathname:rr([a,p.pathname]),pathnameBase:wm(rr([a,p.pathnameBase])),route:h}),p.pathnameBase!=="/"&&(a=rr([a,p.pathnameBase]))}return i}function Ca(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=bm(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let a=o[0],i=a.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:n.reduce((c,{paramName:d,isOptional:p},h)=>{if(d==="*"){let g=s[h]||"";i=a.slice(0,a.length-g.length).replace(/(.)\/+$/,"$1")}const f=s[h];return p&&!f?c[d]=void 0:c[d]=(f||"").replace(/%2F/g,"/"),c},{}),pathname:a,pathnameBase:i,pattern:e}}function bm(e,t=!1,r=!0){Xe(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}function xm(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Xe(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Bt(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function vm(e,t="/"){let{pathname:r,search:n="",hash:o=""}=typeof e=="string"?Ar(e):e;return{pathname:r?r.startsWith("/")?r:Sm(r,t):t,search:Cm(n),hash:km(o)}}function Sm(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function Pi(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Qu(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function _s(e){let t=Qu(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function Os(e,t,r,n=!1){let o;typeof e=="string"?o=Ar(e):(o={...e},me(!o.pathname||!o.pathname.includes("?"),Pi("?","pathname","search",o)),me(!o.pathname||!o.pathname.includes("#"),Pi("#","pathname","hash",o)),me(!o.search||!o.search.includes("#"),Pi("#","search","hash",o)));let a=e===""||o.pathname==="",i=a?"/":o.pathname,s;if(i==null)s=r;else{let p=t.length-1;if(!n&&i.startsWith("..")){let h=i.split("/");for(;h[0]==="..";)h.shift(),p-=1;o.pathname=h.join("/")}s=p>=0?t[p]:"/"}let l=vm(o,s),c=i&&i!=="/"&&i.endsWith("/"),d=(a||i===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}var rr=e=>e.join("/").replace(/\/\/+/g,"/"),wm=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Cm=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,km=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,ka=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function xo(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var Yu=["POST","PUT","PATCH","DELETE"],Pm=new Set(Yu),Im=["GET",...Yu],jm=new Set(Im),Em=new Set([301,302,303,307,308]),Tm=new Set([307,308]),Ii={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Rm={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Yn={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Ls=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Mm=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Xu="remix-router-transitions",Ju=Symbol("ResetLoaderData");function Nm(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";me(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let n=e.hydrationRouteProperties||[],o=e.mapRouteProperties||Mm,a={},i=wa(e.routes,o,void 0,a),s,l=e.basename||"/",c=e.dataStrategy||$m,d={unstable_middleware:!1,...e.future},p=null,h=new Set,f=null,g=null,y=null,v=e.hydrationData!=null,b=Ir(i,e.history.location,l),C=!1,w=null,k;if(b==null&&!e.patchRoutesOnNavigation){let I=Nt(404,{pathname:e.history.location.pathname}),{matches:E,route:M}=nc(i);k=!0,b=E,w={[M.id]:I}}else if(b&&!e.hydrationData&&Qo(b,i,e.history.location.pathname).active&&(b=null),b)if(b.some(I=>I.route.lazy))k=!1;else if(!b.some(I=>I.route.loader))k=!0;else{let I=e.hydrationData?e.hydrationData.loaderData:null,E=e.hydrationData?e.hydrationData.errors:null;if(E){let M=b.findIndex(z=>E[z.route.id]!==void 0);k=b.slice(0,M+1).every(z=>!Xi(z.route,I,E))}else k=b.every(M=>!Xi(M.route,I,E))}else{k=!1,b=[];let I=Qo(null,i,e.history.location.pathname);I.active&&I.matches&&(C=!0,b=I.matches)}let j,P={historyAction:e.history.action,location:e.history.location,matches:b,initialized:k,navigation:Ii,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||w,fetchers:new Map,blockers:new Map},B="POP",F=!1,L,m=!1,T=new Map,D=null,$=!1,H=!1,J=new Set,V=new Map,ce=0,K=-1,se=new Map,Z=new Set,X=new Map,U=new Map,O=new Set,q=new Map,oe,Pe=null;function it(){if(p=e.history.listen(({action:I,location:E,delta:M})=>{if(oe){oe(),oe=void 0;return}Xe(q.size===0||M!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let z=$l({currentLocation:P.location,nextLocation:E,historyAction:I});if(z&&M!=null){let G=new Promise(te=>{oe=te});e.history.go(M*-1),Ko(z,{state:"blocked",location:E,proceed(){Ko(z,{state:"proceeding",proceed:void 0,reset:void 0,location:E}),G.then(()=>e.history.go(M))},reset(){let te=new Map(P.blockers);te.set(z,Yn),_e({blockers:te})}});return}return dt(I,E)}),r){Km(t,T);let I=()=>Qm(t,T);t.addEventListener("pagehide",I),D=()=>t.removeEventListener("pagehide",I)}return P.initialized||dt("POP",P.location,{initialHydration:!0}),j}function ht(){p&&p(),D&&D(),h.clear(),L&&L.abort(),P.fetchers.forEach((I,E)=>Wn(E)),P.blockers.forEach((I,E)=>ge(E))}function Ae(I){return h.add(I),()=>h.delete(I)}function _e(I,E={}){P={...P,...I};let M=[],z=[];P.fetchers.forEach((G,te)=>{G.state==="idle"&&(O.has(te)?M.push(te):z.push(te))}),O.forEach(G=>{!P.fetchers.has(G)&&!V.has(G)&&M.push(G)}),[...h].forEach(G=>G(P,{deletedFetchers:M,viewTransitionOpts:E.viewTransitionOpts,flushSync:E.flushSync===!0})),M.forEach(G=>Wn(G)),z.forEach(G=>P.fetchers.delete(G))}function jt(I,E,{flushSync:M}={}){let z=P.actionData!=null&&P.navigation.formMethod!=null&&xt(P.navigation.formMethod)&&P.navigation.state==="loading"&&I.state?._isRedirect!==!0,G;E.actionData?Object.keys(E.actionData).length>0?G=E.actionData:G=null:z?G=P.actionData:G=null;let te=E.loaderData?tc(P.loaderData,E.loaderData,E.matches||[],E.errors):P.loaderData,ie=P.blockers;ie.size>0&&(ie=new Map(ie),ie.forEach((ee,ue)=>ie.set(ue,Yn)));let Q=F===!0||P.navigation.formMethod!=null&&xt(P.navigation.formMethod)&&I.state?._isRedirect!==!0;s&&(i=s,s=void 0),$||B==="POP"||(B==="PUSH"?e.history.push(I,I.state):B==="REPLACE"&&e.history.replace(I,I.state));let re;if(B==="POP"){let ee=T.get(P.location.pathname);ee&&ee.has(I.pathname)?re={currentLocation:P.location,nextLocation:I}:T.has(I.pathname)&&(re={currentLocation:I,nextLocation:P.location})}else if(m){let ee=T.get(P.location.pathname);ee?ee.add(I.pathname):(ee=new Set([I.pathname]),T.set(P.location.pathname,ee)),re={currentLocation:P.location,nextLocation:I}}_e({...E,actionData:G,loaderData:te,historyAction:B,location:I,initialized:!0,navigation:Ii,revalidation:"idle",restoreScrollPosition:Bl(I,E.matches||P.matches),preventScrollReset:Q,blockers:ie},{viewTransitionOpts:re,flushSync:M===!0}),B="POP",F=!1,m=!1,$=!1,H=!1,Pe?.resolve(),Pe=null}async function xr(I,E){if(typeof I=="number"){e.history.go(I);return}let M=Yi(P.location,P.matches,l,I,E?.fromRouteId,E?.relative),{path:z,submission:G,error:te}=Vl(!1,M,E),ie=P.location,Q=bo(P.location,z,E&&E.state);Q={...Q,...e.history.encodeLocation(Q)};let re=E&&E.replace!=null?E.replace:void 0,ee="PUSH";re===!0?ee="REPLACE":re===!1||G!=null&&xt(G.formMethod)&&G.formAction===P.location.pathname+P.location.search&&(ee="REPLACE");let ue=E&&"preventScrollReset"in E?E.preventScrollReset===!0:void 0,le=(E&&E.flushSync)===!0,he=$l({currentLocation:ie,nextLocation:Q,historyAction:ee});if(he){Ko(he,{state:"blocked",location:Q,proceed(){Ko(he,{state:"proceeding",proceed:void 0,reset:void 0,location:Q}),xr(I,E)},reset(){let Ie=new Map(P.blockers);Ie.set(he,Yn),_e({blockers:Ie})}});return}await dt(ee,Q,{submission:G,pendingError:te,preventScrollReset:ue,replace:E&&E.replace,enableViewTransition:E&&E.viewTransition,flushSync:le})}function Ut(){Pe||(Pe=Ym()),wr(),_e({revalidation:"loading"});let I=Pe.promise;return P.navigation.state==="submitting"?I:P.navigation.state==="idle"?(dt(P.historyAction,P.location,{startUninterruptedRevalidation:!0}),I):(dt(B||P.historyAction,P.navigation.location,{overrideNavigation:P.navigation,enableViewTransition:m===!0}),I)}async function dt(I,E,M){L&&L.abort(),L=null,B=I,$=(M&&M.startUninterruptedRevalidation)===!0,Bh(P.location,P.matches),F=(M&&M.preventScrollReset)===!0,m=(M&&M.enableViewTransition)===!0;let z=s||i,G=M&&M.overrideNavigation,te=M?.initialHydration&&P.matches&&P.matches.length>0&&!C?P.matches:Ir(z,E,l),ie=(M&&M.flushSync)===!0;if(te&&P.initialized&&!H&&Wm(P.location,E)&&!(M&&M.submission&&xt(M.submission.formMethod))){jt(E,{matches:te},{flushSync:ie});return}let Q=Qo(te,z,E.pathname);if(Q.active&&Q.matches&&(te=Q.matches),!te){let{error:st,notFoundMatches:gt,route:ye}=Si(E.pathname);jt(E,{matches:gt,loaderData:{},errors:{[ye.id]:st}},{flushSync:ie});return}L=new AbortController;let re=kn(e.history,E,L.signal,M&&M.submission),ee=new Ul(e.unstable_getContext?await e.unstable_getContext():void 0),ue;if(M&&M.pendingError)ue=[zr(te).route.id,{type:"error",error:M.pendingError}];else if(M&&M.submission&&xt(M.submission.formMethod)){let st=await Lr(re,E,M.submission,te,ee,Q.active,M&&M.initialHydration===!0,{replace:M.replace,flushSync:ie});if(st.shortCircuited)return;if(st.pendingActionResult){let[gt,ye]=st.pendingActionResult;if(bt(ye)&&xo(ye.error)&&ye.error.status===404){L=null,jt(E,{matches:st.matches,loaderData:{},errors:{[gt]:ye.error}});return}}te=st.matches||te,ue=st.pendingActionResult,G=ji(E,M.submission),ie=!1,Q.active=!1,re=kn(e.history,re.url,re.signal)}let{shortCircuited:le,matches:he,loaderData:Ie,errors:Ze}=await Qt(re,E,te,ee,Q.active,G,M&&M.submission,M&&M.fetcherSubmission,M&&M.replace,M&&M.initialHydration===!0,ie,ue);le||(L=null,jt(E,{matches:he||te,...rc(ue),loaderData:Ie,errors:Ze}))}async function Lr(I,E,M,z,G,te,ie,Q={}){wr();let re=Vm(E,M);if(_e({navigation:re},{flushSync:Q.flushSync===!0}),te){let le=await Yo(z,E.pathname,I.signal);if(le.type==="aborted")return{shortCircuited:!0};if(le.type==="error"){let he=zr(le.partialMatches).route.id;return{matches:le.partialMatches,pendingActionResult:[he,{type:"error",error:le.error}]}}else if(le.matches)z=le.matches;else{let{notFoundMatches:he,error:Ie,route:Ze}=Si(E.pathname);return{matches:he,pendingActionResult:[Ze.id,{type:"error",error:Ie}]}}}let ee,ue=oo(z,E);if(!ue.route.action&&!ue.route.lazy)ee={type:"error",error:Nt(405,{method:I.method,pathname:E.pathname,routeId:ue.route.id})};else{let le=jn(o,a,I,z,ue,ie?[]:n,G),he=await $r(I,le,G,null);if(ee=he[ue.route.id],!ee){for(let Ie of z)if(he[Ie.route.id]){ee=he[Ie.route.id];break}}if(I.signal.aborted)return{shortCircuited:!0}}if(Wr(ee)){let le;return Q&&Q.replace!=null?le=Q.replace:le=Jl(ee.response.headers.get("Location"),new URL(I.url),l)===P.location.pathname+P.location.search,await ne(I,ee,!0,{submission:M,replace:le}),{shortCircuited:!0}}if(bt(ee)){let le=zr(z,ue.route.id);return(Q&&Q.replace)!==!0&&(B="PUSH"),{matches:z,pendingActionResult:[le.route.id,ee,ue.route.id]}}return{matches:z,pendingActionResult:[ue.route.id,ee]}}async function Qt(I,E,M,z,G,te,ie,Q,re,ee,ue,le){let he=te||ji(E,ie),Ie=ie||Q||ac(he),Ze=!$&&!ee;if(G){if(Ze){let Tt=ot(le);_e({navigation:he,...Tt!==void 0?{actionData:Tt}:{}},{flushSync:ue})}let be=await Yo(M,E.pathname,I.signal);if(be.type==="aborted")return{shortCircuited:!0};if(be.type==="error"){let Tt=zr(be.partialMatches).route.id;return{matches:be.partialMatches,loaderData:{},errors:{[Tt]:be.error}}}else if(be.matches)M=be.matches;else{let{error:Tt,notFoundMatches:Cr,route:Jo}=Si(E.pathname);return{matches:Cr,loaderData:{},errors:{[Jo.id]:Tt}}}}let st=s||i,{dsMatches:gt,revalidatingFetchers:ye}=Gl(I,z,o,a,e.history,P,M,Ie,E,ee?[]:n,ee===!0,H,J,O,X,Z,st,l,e.patchRoutesOnNavigation!=null,le);if(K=++ce,!e.dataStrategy&&!gt.some(be=>be.shouldLoad)&&ye.length===0){let be=Vo();return jt(E,{matches:M,loaderData:{},errors:le&&bt(le[1])?{[le[0]]:le[1].error}:null,...rc(le),...be?{fetchers:new Map(P.fetchers)}:{}},{flushSync:ue}),{shortCircuited:!0}}if(Ze){let be={};if(!G){be.navigation=he;let Tt=ot(le);Tt!==void 0&&(be.actionData=Tt)}ye.length>0&&(be.fetchers=Ht(ye)),_e(be,{flushSync:ue})}ye.forEach(be=>{ft(be.key),be.controller&&V.set(be.key,be.controller)});let Hn=()=>ye.forEach(be=>ft(be.key));L&&L.signal.addEventListener("abort",Hn);let{loaderResults:Dr,fetcherResults:Vn}=await Wo(gt,ye,I,z);if(I.signal.aborted)return{shortCircuited:!0};L&&L.signal.removeEventListener("abort",Hn),ye.forEach(be=>V.delete(be.key));let Et=Zo(Dr);if(Et)return await ne(I,Et.result,!0,{replace:re}),{shortCircuited:!0};if(Et=Zo(Vn),Et)return Z.add(Et.key),await ne(I,Et.result,!0,{replace:re}),{shortCircuited:!0};let{loaderData:Gn,errors:Kn}=ec(P,M,Dr,le,ye,Vn);ee&&P.errors&&(Kn={...P.errors,...Kn});let wi=Vo(),Br=Un(K),Xo=wi||Br||ye.length>0;return{matches:M,loaderData:Gn,errors:Kn,...Xo?{fetchers:new Map(P.fetchers)}:{}}}function ot(I){if(I&&!bt(I[1]))return{[I[0]]:I[1].data};if(P.actionData)return Object.keys(P.actionData).length===0?null:P.actionData}function Ht(I){return I.forEach(E=>{let M=P.fetchers.get(E.key),z=Xn(void 0,M?M.data:void 0);P.fetchers.set(E.key,z)}),new Map(P.fetchers)}async function vr(I,E,M,z){ft(I);let G=(z&&z.flushSync)===!0,te=s||i,ie=Yi(P.location,P.matches,l,M,E,z?.relative),Q=Ir(te,ie,l),re=Qo(Q,te,ie);if(re.active&&re.matches&&(Q=re.matches),!Q){Vt(I,E,Nt(404,{pathname:ie}),{flushSync:G});return}let{path:ee,submission:ue,error:le}=Vl(!0,ie,z);if(le){Vt(I,E,le,{flushSync:G});return}let he=oo(Q,ee),Ie=new Ul(e.unstable_getContext?await e.unstable_getContext():void 0),Ze=(z&&z.preventScrollReset)===!0;if(ue&&xt(ue.formMethod)){await Sr(I,E,ee,he,Q,Ie,re.active,G,Ze,ue);return}X.set(I,{routeId:E,path:ee}),await ae(I,E,ee,he,Q,Ie,re.active,G,Ze,ue)}async function Sr(I,E,M,z,G,te,ie,Q,re,ee){wr(),X.delete(I);function ue(Ue){if(!Ue.route.action&&!Ue.route.lazy){let un=Nt(405,{method:ee.formMethod,pathname:M,routeId:E});return Vt(I,E,un,{flushSync:Q}),!0}return!1}if(!ie&&ue(z))return;let le=P.fetchers.get(I);Yt(I,Gm(ee,le),{flushSync:Q});let he=new AbortController,Ie=kn(e.history,M,he.signal,ee);if(ie){let Ue=await Yo(G,M,Ie.signal,I);if(Ue.type==="aborted")return;if(Ue.type==="error"){Vt(I,E,Ue.error,{flushSync:Q});return}else if(Ue.matches){if(G=Ue.matches,z=oo(G,M),ue(z))return}else{Vt(I,E,Nt(404,{pathname:M}),{flushSync:Q});return}}V.set(I,he);let Ze=ce,st=jn(o,a,Ie,G,z,n,te),ye=(await $r(Ie,st,te,I))[z.route.id];if(Ie.signal.aborted){V.get(I)===he&&V.delete(I);return}if(O.has(I)){if(Wr(ye)||bt(ye)){Yt(I,Pr(void 0));return}}else{if(Wr(ye))if(V.delete(I),K>Ze){Yt(I,Pr(void 0));return}else return Z.add(I),Yt(I,Xn(ee)),ne(Ie,ye,!1,{fetcherSubmission:ee,preventScrollReset:re});if(bt(ye)){Vt(I,E,ye.error);return}}let Hn=P.navigation.location||P.location,Dr=kn(e.history,Hn,he.signal),Vn=s||i,Et=P.navigation.state!=="idle"?Ir(Vn,P.navigation.location,l):P.matches;me(Et,"Didn't find any matches after fetcher action");let Gn=++ce;se.set(I,Gn);let Kn=Xn(ee,ye.data);P.fetchers.set(I,Kn);let{dsMatches:wi,revalidatingFetchers:Br}=Gl(Dr,te,o,a,e.history,P,Et,ee,Hn,n,!1,H,J,O,X,Z,Vn,l,e.patchRoutesOnNavigation!=null,[z.route.id,ye]);Br.filter(Ue=>Ue.key!==I).forEach(Ue=>{let un=Ue.key,ql=P.fetchers.get(un),zh=Xn(void 0,ql?ql.data:void 0);P.fetchers.set(un,zh),ft(un),Ue.controller&&V.set(un,Ue.controller)}),_e({fetchers:new Map(P.fetchers)});let Xo=()=>Br.forEach(Ue=>ft(Ue.key));he.signal.addEventListener("abort",Xo);let{loaderResults:be,fetcherResults:Tt}=await Wo(wi,Br,Dr,te);if(he.signal.aborted)return;if(he.signal.removeEventListener("abort",Xo),se.delete(I),V.delete(I),Br.forEach(Ue=>V.delete(Ue.key)),P.fetchers.has(I)){let Ue=Pr(ye.data);P.fetchers.set(I,Ue)}let Cr=Zo(be);if(Cr)return ne(Dr,Cr.result,!1,{preventScrollReset:re});if(Cr=Zo(Tt),Cr)return Z.add(Cr.key),ne(Dr,Cr.result,!1,{preventScrollReset:re});let{loaderData:Jo,errors:Ci}=ec(P,Et,be,void 0,Br,Tt);Un(Gn),P.navigation.state==="loading"&&Gn>K?(me(B,"Expected pending action"),L&&L.abort(),jt(P.navigation.location,{matches:Et,loaderData:Jo,errors:Ci,fetchers:new Map(P.fetchers)})):(_e({errors:Ci,loaderData:tc(P.loaderData,Jo,Et,Ci),fetchers:new Map(P.fetchers)}),H=!1)}async function ae(I,E,M,z,G,te,ie,Q,re,ee){let ue=P.fetchers.get(I);Yt(I,Xn(ee,ue?ue.data:void 0),{flushSync:Q});let le=new AbortController,he=kn(e.history,M,le.signal);if(ie){let ye=await Yo(G,M,he.signal,I);if(ye.type==="aborted")return;if(ye.type==="error"){Vt(I,E,ye.error,{flushSync:Q});return}else if(ye.matches)G=ye.matches,z=oo(G,M);else{Vt(I,E,Nt(404,{pathname:M}),{flushSync:Q});return}}V.set(I,le);let Ie=ce,Ze=jn(o,a,he,G,z,n,te),gt=(await $r(he,Ze,te,I))[z.route.id];if(V.get(I)===le&&V.delete(I),!he.signal.aborted){if(O.has(I)){Yt(I,Pr(void 0));return}if(Wr(gt))if(K>Ie){Yt(I,Pr(void 0));return}else{Z.add(I),await ne(he,gt,!1,{preventScrollReset:re});return}if(bt(gt)){Vt(I,E,gt.error);return}Yt(I,Pr(gt.data))}}async function ne(I,E,M,{submission:z,fetcherSubmission:G,preventScrollReset:te,replace:ie}={}){E.response.headers.has("X-Remix-Revalidate")&&(H=!0);let Q=E.response.headers.get("Location");me(Q,"Expected a Location header on the redirect Response"),Q=Jl(Q,new URL(I.url),l);let re=bo(P.location,Q,{_isRedirect:!0});if(r){let Ze=!1;if(E.response.headers.has("X-Remix-Reload-Document"))Ze=!0;else if(Ls.test(Q)){const st=Vu(Q,!0);Ze=st.origin!==t.location.origin||Bt(st.pathname,l)==null}if(Ze){ie?t.location.replace(Q):t.location.assign(Q);return}}L=null;let ee=ie===!0||E.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:ue,formAction:le,formEncType:he}=P.navigation;!z&&!G&&ue&&le&&he&&(z=ac(P.navigation));let Ie=z||G;if(Tm.has(E.response.status)&&Ie&&xt(Ie.formMethod))await dt(ee,re,{submission:{...Ie,formAction:Q},preventScrollReset:te||F,enableViewTransition:M?m:void 0});else{let Ze=ji(re,z);await dt(ee,re,{overrideNavigation:Ze,fetcherSubmission:G,preventScrollReset:te||F,enableViewTransition:M?m:void 0})}}async function $r(I,E,M,z){let G,te={};try{G=await Dm(c,I,E,z,M,!1)}catch(ie){return E.filter(Q=>Q.shouldLoad).forEach(Q=>{te[Q.route.id]={type:"error",error:ie}}),te}if(I.signal.aborted)return te;for(let[ie,Q]of Object.entries(G))if(Um(Q)){let re=Q.result;te[ie]={type:"redirect",response:Fm(re,I,ie,E,l)}}else te[ie]=await qm(Q);return te}async function Wo(I,E,M,z){let G=$r(M,I,z,null),te=Promise.all(E.map(async re=>{if(re.matches&&re.match&&re.request&&re.controller){let ue=(await $r(re.request,re.matches,z,re.key))[re.match.route.id];return{[re.key]:ue}}else return Promise.resolve({[re.key]:{type:"error",error:Nt(404,{pathname:re.path})}})})),ie=await G,Q=(await te).reduce((re,ee)=>Object.assign(re,ee),{});return{loaderResults:ie,fetcherResults:Q}}function wr(){H=!0,X.forEach((I,E)=>{V.has(E)&&J.add(E),ft(E)})}function Yt(I,E,M={}){P.fetchers.set(I,E),_e({fetchers:new Map(P.fetchers)},{flushSync:(M&&M.flushSync)===!0})}function Vt(I,E,M,z={}){let G=zr(P.matches,E);Wn(I),_e({errors:{[G.route.id]:M},fetchers:new Map(P.fetchers)},{flushSync:(z&&z.flushSync)===!0})}function Uo(I){return U.set(I,(U.get(I)||0)+1),O.has(I)&&O.delete(I),P.fetchers.get(I)||Rm}function Wn(I){let E=P.fetchers.get(I);V.has(I)&&!(E&&E.state==="loading"&&se.has(I))&&ft(I),X.delete(I),se.delete(I),Z.delete(I),O.delete(I),J.delete(I),P.fetchers.delete(I)}function vi(I){let E=(U.get(I)||0)-1;E<=0?(U.delete(I),O.add(I)):U.set(I,E),_e({fetchers:new Map(P.fetchers)})}function ft(I){let E=V.get(I);E&&(E.abort(),V.delete(I))}function Ho(I){for(let E of I){let M=Uo(E),z=Pr(M.data);P.fetchers.set(E,z)}}function Vo(){let I=[],E=!1;for(let M of Z){let z=P.fetchers.get(M);me(z,`Expected fetcher: ${M}`),z.state==="loading"&&(Z.delete(M),I.push(M),E=!0)}return Ho(I),E}function Un(I){let E=[];for(let[M,z]of se)if(z<I){let G=P.fetchers.get(M);me(G,`Expected fetcher: ${M}`),G.state==="loading"&&(ft(M),se.delete(M),E.push(M))}return Ho(E),E.length>0}function Go(I,E){let M=P.blockers.get(I)||Yn;return q.get(I)!==E&&q.set(I,E),M}function ge(I){P.blockers.delete(I),q.delete(I)}function Ko(I,E){let M=P.blockers.get(I)||Yn;me(M.state==="unblocked"&&E.state==="blocked"||M.state==="blocked"&&E.state==="blocked"||M.state==="blocked"&&E.state==="proceeding"||M.state==="blocked"&&E.state==="unblocked"||M.state==="proceeding"&&E.state==="unblocked",`Invalid blocker state transition: ${M.state} -> ${E.state}`);let z=new Map(P.blockers);z.set(I,E),_e({blockers:z})}function $l({currentLocation:I,nextLocation:E,historyAction:M}){if(q.size===0)return;q.size>1&&Xe(!1,"A router only supports one blocker at a time");let z=Array.from(q.entries()),[G,te]=z[z.length-1],ie=P.blockers.get(G);if(!(ie&&ie.state==="proceeding")&&te({currentLocation:I,nextLocation:E,historyAction:M}))return G}function Si(I){let E=Nt(404,{pathname:I}),M=s||i,{matches:z,route:G}=nc(M);return{notFoundMatches:z,route:G,error:E}}function Dh(I,E,M){if(f=I,y=E,g=M||null,!v&&P.navigation===Ii){v=!0;let z=Bl(P.location,P.matches);z!=null&&_e({restoreScrollPosition:z})}return()=>{f=null,y=null,g=null}}function Dl(I,E){return g&&g(I,E.map(z=>sm(z,P.loaderData)))||I.key}function Bh(I,E){if(f&&y){let M=Dl(I,E);f[M]=y()}}function Bl(I,E){if(f){let M=Dl(I,E),z=f[M];if(typeof z=="number")return z}return null}function Qo(I,E,M){if(e.patchRoutesOnNavigation)if(I){if(Object.keys(I[0].params).length>0)return{active:!0,matches:da(E,M,l,!0)}}else return{active:!0,matches:da(E,M,l,!0)||[]};return{active:!1,matches:null}}async function Yo(I,E,M,z){if(!e.patchRoutesOnNavigation)return{type:"success",matches:I};let G=I;for(;;){let te=s==null,ie=s||i,Q=a;try{await e.patchRoutesOnNavigation({signal:M,path:E,matches:G,fetcherKey:z,patch:(ue,le)=>{M.aborted||Kl(ue,le,ie,Q,o)}})}catch(ue){return{type:"error",error:ue,partialMatches:G}}finally{te&&!M.aborted&&(i=[...i])}if(M.aborted)return{type:"aborted"};let re=Ir(ie,E,l);if(re)return{type:"success",matches:re};let ee=da(ie,E,l,!0);if(!ee||G.length===ee.length&&G.every((ue,le)=>ue.route.id===ee[le].route.id))return{type:"success",matches:null};G=ee}}function qh(I){a={},s=wa(I,o,void 0,a)}function Fh(I,E){let M=s==null;Kl(I,E,s||i,a,o),M&&(i=[...i],_e({}))}return j={get basename(){return l},get future(){return d},get state(){return P},get routes(){return i},get window(){return t},initialize:it,subscribe:Ae,enableScrollRestoration:Dh,navigate:xr,fetch:vr,revalidate:Ut,createHref:I=>e.history.createHref(I),encodeLocation:I=>e.history.encodeLocation(I),getFetcher:Uo,deleteFetcher:vi,dispose:ht,getBlocker:Go,deleteBlocker:ge,patchRoutes:Fh,_internalFetchControllers:V,_internalSetRoutes:qh},j}function Am(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Yi(e,t,r,n,o,a){let i,s;if(o){i=[];for(let c of t)if(i.push(c),c.route.id===o){s=c;break}}else i=t,s=t[t.length-1];let l=Os(n||".",_s(i),Bt(e.pathname,r)||e.pathname,a==="path");if(n==null&&(l.search=e.search,l.hash=e.hash),(n==null||n===""||n===".")&&s){let c=$s(l.search);if(s.route.index&&!c)l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index";else if(!s.route.index&&c){let d=new URLSearchParams(l.search),p=d.getAll("index");d.delete("index"),p.filter(f=>f).forEach(f=>d.append("index",f));let h=d.toString();l.search=h?`?${h}`:""}}return r!=="/"&&(l.pathname=l.pathname==="/"?r:rr([r,l.pathname])),Rr(l)}function Vl(e,t,r){if(!r||!Am(r))return{path:t};if(r.formMethod&&!Hm(r.formMethod))return{path:t,error:Nt(405,{method:r.formMethod})};let n=()=>({path:t,error:Nt(400,{type:"invalid-body"})}),a=(r.formMethod||"get").toUpperCase(),i=od(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!xt(a))return n();let p=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((h,[f,g])=>`${h}${f}=${g}
|
|
11
|
-
`,""):String(r.body);return{path:t,submission:{formMethod:a,formAction:i,formEncType:r.formEncType,formData:void 0,json:void 0,text:p}}}else if(r.formEncType==="application/json"){if(!xt(a))return n();try{let p=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:a,formAction:i,formEncType:r.formEncType,formData:void 0,json:p,text:void 0}}}catch{return n()}}}me(typeof FormData=="function","FormData is not available in this environment");let s,l;if(r.formData)s=Zi(r.formData),l=r.formData;else if(r.body instanceof FormData)s=Zi(r.body),l=r.body;else if(r.body instanceof URLSearchParams)s=r.body,l=Zl(s);else if(r.body==null)s=new URLSearchParams,l=new FormData;else try{s=new URLSearchParams(r.body),l=Zl(s)}catch{return n()}let c={formMethod:a,formAction:i,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:l,json:void 0,text:void 0};if(xt(c.formMethod))return{path:t,submission:c};let d=Ar(t);return e&&d.search&&$s(d.search)&&s.append("index",""),d.search=`?${s}`,{path:Rr(d),submission:c}}function Gl(e,t,r,n,o,a,i,s,l,c,d,p,h,f,g,y,v,b,C,w){let k=w?bt(w[1])?w[1].error:w[1].data:void 0,j=o.createURL(a.location),P=o.createURL(l),B;if(d&&a.errors){let $=Object.keys(a.errors)[0];B=i.findIndex(H=>H.route.id===$)}else if(w&&bt(w[1])){let $=w[0];B=i.findIndex(H=>H.route.id===$)-1}let F=w?w[1].statusCode:void 0,L=F&&F>=400,m={currentUrl:j,currentParams:a.matches[0]?.params||{},nextUrl:P,nextParams:i[0].params,...s,actionResult:k,actionStatus:F},T=i.map(($,H)=>{let{route:J}=$,V=null;if(B!=null&&H>B?V=!1:J.lazy?V=!0:J.loader==null?V=!1:d?V=Xi(J,a.loaderData,a.errors):_m(a.loaderData,a.matches[H],$)&&(V=!0),V!==null)return Ji(r,n,e,$,c,t,V);let ce=L?!1:p||j.pathname+j.search===P.pathname+P.search||j.search!==P.search||Om(a.matches[H],$),K={...m,defaultShouldRevalidate:ce},se=Pa($,K);return Ji(r,n,e,$,c,t,se,K)}),D=[];return g.forEach(($,H)=>{if(d||!i.some(U=>U.route.id===$.routeId)||f.has(H))return;let J=a.fetchers.get(H),V=J&&J.state!=="idle"&&J.data===void 0,ce=Ir(v,$.path,b);if(!ce){if(C&&V)return;D.push({key:H,routeId:$.routeId,path:$.path,matches:null,match:null,request:null,controller:null});return}if(y.has(H))return;let K=oo(ce,$.path),se=new AbortController,Z=kn(o,$.path,se.signal),X=null;if(h.has(H))h.delete(H),X=jn(r,n,Z,ce,K,c,t);else if(V)p&&(X=jn(r,n,Z,ce,K,c,t));else{let U={...m,defaultShouldRevalidate:L?!1:p};Pa(K,U)&&(X=jn(r,n,Z,ce,K,c,t,U))}X&&D.push({key:H,routeId:$.routeId,path:$.path,matches:X,match:K,request:Z,controller:se})}),{dsMatches:T,revalidatingFetchers:D}}function Xi(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let n=t!=null&&e.id in t,o=r!=null&&r[e.id]!==void 0;return!n&&o?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!n&&!o}function _m(e,t,r){let n=!t||r.route.id!==t.route.id,o=!e.hasOwnProperty(r.route.id);return n||o}function Om(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function Pa(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function Kl(e,t,r,n,o){let a;if(e){let l=n[e];me(l,`No route found to patch children into: routeId = ${e}`),l.children||(l.children=[]),a=l.children}else a=r;let i=t.filter(l=>!a.some(c=>Zu(l,c))),s=wa(i,o,[e||"_","patch",String(a?.length||"0")],n);a.push(...s)}function Zu(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((r,n)=>t.children?.some(o=>Zu(r,o))):!1}var Ql=new WeakMap,ed=({key:e,route:t,manifest:r,mapRouteProperties:n})=>{let o=r[t.id];if(me(o,"No route found in manifest"),!o.lazy||typeof o.lazy!="object")return;let a=o.lazy[e];if(!a)return;let i=Ql.get(o);i||(i={},Ql.set(o,i));let s=i[e];if(s)return s;let l=(async()=>{let c=nm(e),p=o[e]!==void 0&&e!=="hasErrorBoundary";if(c)Xe(!c,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),i[e]=Promise.resolve();else if(p)Xe(!1,`Route "${o.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let h=await a();h!=null&&(Object.assign(o,{[e]:h}),Object.assign(o,n(o)))}typeof o.lazy=="object"&&(o.lazy[e]=void 0,Object.values(o.lazy).every(h=>h===void 0)&&(o.lazy=void 0))})();return i[e]=l,l},Yl=new WeakMap;function Lm(e,t,r,n,o){let a=r[e.id];if(me(a,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let d=Yl.get(a);if(d)return{lazyRoutePromise:d,lazyHandlerPromise:d};let p=(async()=>{me(typeof e.lazy=="function","No lazy route function found");let h=await e.lazy(),f={};for(let g in h){let y=h[g];if(y===void 0)continue;let v=am(g),C=a[g]!==void 0&&g!=="hasErrorBoundary";v?Xe(!v,"Route property "+g+" is not a supported property to be returned from a lazy route function. This property will be ignored."):C?Xe(!C,`Route "${a.id}" has a static property "${g}" defined but its lazy function is also returning a value for this property. The lazy route property "${g}" will be ignored.`):f[g]=y}Object.assign(a,f),Object.assign(a,{...n(a),lazy:void 0})})();return Yl.set(a,p),p.catch(()=>{}),{lazyRoutePromise:p,lazyHandlerPromise:p}}let i=Object.keys(e.lazy),s=[],l;for(let d of i){if(o&&o.includes(d))continue;let p=ed({key:d,route:e,manifest:r,mapRouteProperties:n});p&&(s.push(p),d===t&&(l=p))}let c=s.length>0?Promise.all(s).then(()=>{}):void 0;return c?.catch(()=>{}),l?.catch(()=>{}),{lazyRoutePromise:c,lazyHandlerPromise:l}}async function Xl(e){let t=e.matches.filter(o=>o.shouldLoad),r={};return(await Promise.all(t.map(o=>o.resolve()))).forEach((o,a)=>{r[t[a].route.id]=o}),r}async function $m(e){return e.matches.some(t=>t.route.unstable_middleware)?td(e,!1,()=>Xl(e),(t,r)=>({[r]:{type:"error",result:t}})):Xl(e)}async function td(e,t,r,n){let{matches:o,request:a,params:i,context:s}=e,l={handlerResult:void 0};try{let c=o.flatMap(p=>p.route.unstable_middleware?p.route.unstable_middleware.map(h=>[p.route.id,h]):[]),d=await rd({request:a,params:i,context:s},c,t,l,r);return t?d:l.handlerResult}catch(c){if(!l.middlewareError)throw c;let d=await n(l.middlewareError.error,l.middlewareError.routeId);return l.handlerResult?Object.assign(l.handlerResult,d):d}}async function rd(e,t,r,n,o,a=0){let{request:i}=e;if(i.signal.aborted)throw i.signal.reason?i.signal.reason:new Error(`Request aborted without an \`AbortSignal.reason\`: ${i.method} ${i.url}`);let s=t[a];if(!s)return n.handlerResult=await o(),n.handlerResult;let[l,c]=s,d=!1,p,h=async()=>{if(d)throw new Error("You may only call `next()` once per middleware");d=!0,await rd(e,t,r,n,o,a+1)};try{let f=await c({request:e.request,params:e.params,context:e.context},h);return d?f===void 0?p:f:h()}catch(f){throw n.middlewareError?n.middlewareError.error!==f&&(n.middlewareError={routeId:l,error:f}):n.middlewareError={routeId:l,error:f},f}}function nd(e,t,r,n,o){let a=ed({key:"unstable_middleware",route:n.route,manifest:t,mapRouteProperties:e}),i=Lm(n.route,xt(r.method)?"action":"loader",t,e,o);return{middleware:a,route:i.lazyRoutePromise,handler:i.lazyHandlerPromise}}function Ji(e,t,r,n,o,a,i,s=null){let l=!1,c=nd(e,t,r,n,o);return{...n,_lazyPromises:c,shouldLoad:i,unstable_shouldRevalidateArgs:s,unstable_shouldCallHandler(d){return l=!0,s?typeof d=="boolean"?Pa(n,{...s,defaultShouldRevalidate:d}):Pa(n,s):i},resolve(d){return l||i||d&&r.method==="GET"&&(n.route.lazy||n.route.loader)?Bm({request:r,match:n,lazyHandlerPromise:c?.handler,lazyRoutePromise:c?.route,handlerOverride:d,scopedContext:a}):Promise.resolve({type:"data",result:void 0})}}}function jn(e,t,r,n,o,a,i,s=null){return n.map(l=>l.route.id!==o.route.id?{...l,shouldLoad:!1,unstable_shouldRevalidateArgs:s,unstable_shouldCallHandler:()=>!1,_lazyPromises:nd(e,t,r,l,a),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Ji(e,t,r,l,a,i,!0,s))}async function Dm(e,t,r,n,o,a){r.some(c=>c._lazyPromises?.middleware)&&await Promise.all(r.map(c=>c._lazyPromises?.middleware));let i={request:t,params:r[0].params,context:o,matches:r},l=await e({...i,fetcherKey:n,unstable_runClientMiddleware:c=>{let d=i;return td(d,!1,()=>c({...d,fetcherKey:n,unstable_runClientMiddleware:()=>{throw new Error("Cannot call `unstable_runClientMiddleware()` from within an `unstable_runClientMiddleware` handler")}}),(p,h)=>({[h]:{type:"error",result:p}}))}});try{await Promise.all(r.flatMap(c=>[c._lazyPromises?.handler,c._lazyPromises?.route]))}catch{}return l}async function Bm({request:e,match:t,lazyHandlerPromise:r,lazyRoutePromise:n,handlerOverride:o,scopedContext:a}){let i,s,l=xt(e.method),c=l?"action":"loader",d=p=>{let h,f=new Promise((v,b)=>h=b);s=()=>h(),e.signal.addEventListener("abort",s);let g=v=>typeof p!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${c}" [routeId: ${t.route.id}]`)):p({request:e,params:t.params,context:a},...v!==void 0?[v]:[]),y=(async()=>{try{return{type:"data",result:await(o?o(b=>g(b)):g())}}catch(v){return{type:"error",result:v}}})();return Promise.race([y,f])};try{let p=l?t.route.action:t.route.loader;if(r||n)if(p){let h,[f]=await Promise.all([d(p).catch(g=>{h=g}),r,n]);if(h!==void 0)throw h;i=f}else{await r;let h=l?t.route.action:t.route.loader;if(h)[i]=await Promise.all([d(h),n]);else if(c==="action"){let f=new URL(e.url),g=f.pathname+f.search;throw Nt(405,{method:e.method,pathname:g,routeId:t.route.id})}else return{type:"data",result:void 0}}else if(p)i=await d(p);else{let h=new URL(e.url),f=h.pathname+h.search;throw Nt(404,{pathname:f})}}catch(p){return{type:"error",result:p}}finally{s&&e.signal.removeEventListener("abort",s)}return i}async function qm(e){let{result:t,type:r}=e;if(ad(t)){let n;try{let o=t.headers.get("Content-Type");o&&/\bapplication\/json\b/.test(o)?t.body==null?n=null:n=await t.json():n=await t.text()}catch(o){return{type:"error",error:o}}return r==="error"?{type:"error",error:new ka(t.status,t.statusText,n),statusCode:t.status,headers:t.headers}:{type:"data",data:n,statusCode:t.status,headers:t.headers}}return r==="error"?oc(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:new ka(t.init?.status||500,void 0,t.data),statusCode:xo(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:xo(t)?t.status:void 0}:oc(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function Fm(e,t,r,n,o){let a=e.headers.get("Location");if(me(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!Ls.test(a)){let i=n.slice(0,n.findIndex(s=>s.route.id===r)+1);a=Yi(new URL(t.url),i,o,a),e.headers.set("Location",a)}return e}function Jl(e,t,r){if(Ls.test(e)){let n=e,o=n.startsWith("//")?new URL(t.protocol+n):new URL(n),a=Bt(o.pathname,r)!=null;if(o.origin===t.origin&&a)return o.pathname+o.search+o.hash}return e}function kn(e,t,r,n){let o=e.createURL(od(t)).toString(),a={signal:r};if(n&&xt(n.formMethod)){let{formMethod:i,formEncType:s}=n;a.method=i.toUpperCase(),s==="application/json"?(a.headers=new Headers({"Content-Type":s}),a.body=JSON.stringify(n.json)):s==="text/plain"?a.body=n.text:s==="application/x-www-form-urlencoded"&&n.formData?a.body=Zi(n.formData):a.body=n.formData}return new Request(o,a)}function Zi(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function Zl(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function zm(e,t,r,n=!1,o=!1){let a={},i=null,s,l=!1,c={},d=r&&bt(r[1])?r[1].error:void 0;return e.forEach(p=>{if(!(p.route.id in t))return;let h=p.route.id,f=t[h];if(me(!Wr(f),"Cannot handle redirect results in processLoaderData"),bt(f)){let g=f.error;if(d!==void 0&&(g=d,d=void 0),i=i||{},o)i[h]=g;else{let y=zr(e,h);i[y.route.id]==null&&(i[y.route.id]=g)}n||(a[h]=Ju),l||(l=!0,s=xo(f.error)?f.error.status:500),f.headers&&(c[h]=f.headers)}else a[h]=f.data,f.statusCode&&f.statusCode!==200&&!l&&(s=f.statusCode),f.headers&&(c[h]=f.headers)}),d!==void 0&&r&&(i={[r[0]]:d},r[2]&&(a[r[2]]=void 0)),{loaderData:a,errors:i,statusCode:s||200,loaderHeaders:c}}function ec(e,t,r,n,o,a){let{loaderData:i,errors:s}=zm(t,r,n);return o.filter(l=>!l.matches||l.matches.some(c=>c.shouldLoad)).forEach(l=>{let{key:c,match:d,controller:p}=l,h=a[c];if(me(h,"Did not find corresponding fetcher result"),!(p&&p.signal.aborted))if(bt(h)){let f=zr(e.matches,d?.route.id);s&&s[f.route.id]||(s={...s,[f.route.id]:h.error}),e.fetchers.delete(c)}else if(Wr(h))me(!1,"Unhandled fetcher revalidation redirect");else{let f=Pr(h.data);e.fetchers.set(c,f)}}),{loaderData:i,errors:s}}function tc(e,t,r,n){let o=Object.entries(t).filter(([,a])=>a!==Ju).reduce((a,[i,s])=>(a[i]=s,a),{});for(let a of r){let i=a.route.id;if(!t.hasOwnProperty(i)&&e.hasOwnProperty(i)&&a.route.loader&&(o[i]=e[i]),n&&n.hasOwnProperty(i))break}return o}function rc(e){return e?bt(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function zr(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function nc(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Nt(e,{pathname:t,routeId:r,method:n,type:o,message:a}={}){let i="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(i="Bad Request",n&&t&&r?s=`You made a ${n} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:o==="invalid-body"&&(s="Unable to encode submission body")):e===403?(i="Forbidden",s=`Route "${r}" does not match URL "${t}"`):e===404?(i="Not Found",s=`No route matches URL "${t}"`):e===405&&(i="Method Not Allowed",n&&t&&r?s=`You made a ${n.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:n&&(s=`Invalid request method "${n.toUpperCase()}"`)),new ka(e||500,i,new Error(s),!0)}function Zo(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,o]=t[r];if(Wr(o))return{key:n,result:o}}}function od(e){let t=typeof e=="string"?Ar(e):e;return Rr({...t,hash:""})}function Wm(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Um(e){return ad(e.result)&&Em.has(e.result.status)}function bt(e){return e.type==="error"}function Wr(e){return(e&&e.type)==="redirect"}function oc(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function ad(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Hm(e){return jm.has(e.toUpperCase())}function xt(e){return Pm.has(e.toUpperCase())}function $s(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function oo(e,t){let r=typeof t=="string"?Ar(t).search:t.search;if(e[e.length-1].route.index&&$s(r||""))return e[e.length-1];let n=Qu(e);return n[n.length-1]}function ac(e){let{formMethod:t,formAction:r,formEncType:n,text:o,formData:a,json:i}=e;if(!(!t||!r||!n)){if(o!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:o};if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:a,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function ji(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Vm(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Xn(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Gm(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Pr(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Km(e,t){try{let r=e.sessionStorage.getItem(Xu);if(r){let n=JSON.parse(r);for(let[o,a]of Object.entries(n||{}))a&&Array.isArray(a)&&t.set(o,new Set(a||[]))}}catch{}}function Qm(e,t){if(t.size>0){let r={};for(let[n,o]of t)r[n]=[...o];try{e.sessionStorage.setItem(Xu,JSON.stringify(r))}catch(n){Xe(!1,`Failed to save applied view transitions in sessionStorage (${n}).`)}}}function Ym(){let e,t,r=new Promise((n,o)=>{e=async a=>{n(a);try{await r}catch{}},t=async a=>{o(a);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}var rn=S.createContext(null);rn.displayName="DataRouter";var To=S.createContext(null);To.displayName="DataRouterState";var Ds=S.createContext({isTransitioning:!1});Ds.displayName="ViewTransition";var id=S.createContext(new Map);id.displayName="Fetchers";var Xm=S.createContext(null);Xm.displayName="Await";var nr=S.createContext(null);nr.displayName="Navigation";var Ga=S.createContext(null);Ga.displayName="Location";var Kt=S.createContext({outlet:null,matches:[],isDataRoute:!1});Kt.displayName="Route";var Bs=S.createContext(null);Bs.displayName="RouteError";function Jm(e,{relative:t}={}){me(Ro(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=S.useContext(nr),{hash:o,pathname:a,search:i}=Mo(e,{relative:t}),s=a;return r!=="/"&&(s=a==="/"?r:rr([r,a])),n.createHref({pathname:s,search:i,hash:o})}function Ro(){return S.useContext(Ga)!=null}function nn(){return me(Ro(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(Ga).location}var sd="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ld(e){S.useContext(nr).static||S.useLayoutEffect(e)}function qs(){let{isDataRoute:e}=S.useContext(Kt);return e?hf():Zm()}function Zm(){me(Ro(),"useNavigate() may be used only in the context of a <Router> component.");let e=S.useContext(rn),{basename:t,navigator:r}=S.useContext(nr),{matches:n}=S.useContext(Kt),{pathname:o}=nn(),a=JSON.stringify(_s(n)),i=S.useRef(!1);return ld(()=>{i.current=!0}),S.useCallback((l,c={})=>{if(Xe(i.current,sd),!i.current)return;if(typeof l=="number"){r.go(l);return}let d=Os(l,JSON.parse(a),o,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:rr([t,d.pathname])),(c.replace?r.replace:r.push)(d,c.state,c)},[t,r,a,o,e])}var ef=S.createContext(null);function tf(e){let t=S.useContext(Kt).outlet;return t&&S.createElement(ef.Provider,{value:e},t)}function on(){let{matches:e}=S.useContext(Kt),t=e[e.length-1];return t?t.params:{}}function Mo(e,{relative:t}={}){let{matches:r}=S.useContext(Kt),{pathname:n}=nn(),o=JSON.stringify(_s(r));return S.useMemo(()=>Os(e,JSON.parse(o),n,t==="path"),[e,o,n,t])}function rf(e,t,r,n){me(Ro(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=S.useContext(nr),{matches:a}=S.useContext(Kt),i=a[a.length-1],s=i?i.params:{},l=i?i.pathname:"/",c=i?i.pathnameBase:"/",d=i&&i.route;{let b=d&&d.path||"";ud(l,!d||b.endsWith("*")||b.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${b}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
10
|
+
*/var Ng=e=>{throw TypeError(e)},rT=(e,t,n)=>t.has(e)||Ng("Cannot "+n),Tc=(e,t,n)=>(rT(e,t,"read from private field"),n?n.call(e):t.get(e)),oT=(e,t,n)=>t.has(e)?Ng("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Zh="popstate";function iT(e={}){function t(r,o){let{pathname:i,search:a,hash:s}=r.location;return Aa("",{pathname:i,search:a,hash:s},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:Yr(o)}return sT(t,n,null,e)}function Ue(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function jt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function aT(){return Math.random().toString(36).substring(2,10)}function ep(e,t){return{usr:e.state,key:e.key,idx:t}}function Aa(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Xr(t):t,state:n,key:t&&t.key||r||aT()}}function Yr({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Xr(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function sT(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,s="POP",l=null,c=d();c==null&&(c=0,a.replaceState({...a.state,idx:c},""));function d(){return(a.state||{idx:null}).idx}function u(){s="POP";let T=d(),E=T==null?null:T-c;c=T,l&&l({action:s,location:b.location,delta:E})}function h(T,E){s="PUSH";let C=Aa(b.location,T,E);c=d()+1;let x=ep(C,c),k=b.createHref(C);try{a.pushState(x,"",k)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;o.location.assign(k)}i&&l&&l({action:s,location:b.location,delta:1})}function p(T,E){s="REPLACE";let C=Aa(b.location,T,E);c=d();let x=ep(C,c),k=b.createHref(C);a.replaceState(x,"",k),i&&l&&l({action:s,location:b.location,delta:0})}function g(T){return Pg(T)}let b={get action(){return s},get location(){return e(o,a)},listen(T){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(Zh,u),l=T,()=>{o.removeEventListener(Zh,u),l=null}},createHref(T){return t(o,T)},createURL:g,encodeLocation(T){let E=g(T);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:h,replace:p,go(T){return a.go(T)}};return b}function Pg(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Ue(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Yr(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}var ea,tp=class{constructor(e){if(oT(this,ea,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(Tc(this,ea).has(e))return Tc(this,ea).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Tc(this,ea).set(e,t)}};ea=new WeakMap;var lT=new Set(["lazy","caseSensitive","path","id","index","children"]);function cT(e){return lT.has(e)}var uT=new Set(["lazy","caseSensitive","path","id","index","unstable_middleware","children"]);function dT(e){return uT.has(e)}function hT(e){return e.index===!0}function Vs(e,t,n=[],r={}){return e.map((o,i)=>{let a=[...n,String(i)],s=typeof o.id=="string"?o.id:a.join("-");if(Ue(o.index!==!0||!o.children,"Cannot specify children on an index route"),Ue(!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),hT(o)){let l={...o,...t(o),id:s};return r[s]=l,l}else{let l={...o,...t(o),id:s,children:void 0};return r[s]=l,o.children&&(l.children=Vs(o.children,t,a,r)),l}})}function $r(e,t,n="/"){return Is(e,t,n,!1)}function Is(e,t,n,r){let o=typeof t=="string"?Xr(t):t,i=Gn(o.pathname||"/",n);if(i==null)return null;let a=Rg(e);fT(a);let s=null;for(let l=0;s==null&&l<a.length;++l){let c=AT(i);s=vT(a[l],c,r)}return s}function pT(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,data:t[n.id],handle:n.handle}}function Rg(e,t=[],n=[],r=""){let o=(i,a,s)=>{let l={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};l.relativePath.startsWith("/")&&(Ue(l.relativePath.startsWith(r),`Absolute route path "${l.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(r.length));let c=ur([r,l.relativePath]),d=n.concat(l);i.children&&i.children.length>0&&(Ue(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),Rg(i.children,t,d,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:xT(c,i.index),routesMeta:d})};return e.forEach((i,a)=>{if(i.path===""||!i.path?.includes("?"))o(i,a);else for(let s of Lg(i.path))o(i,a,s)}),t}function Lg(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let a=Lg(r.join("/")),s=[];return s.push(...a.map(l=>l===""?i:[i,l].join("/"))),o&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function fT(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:CT(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var mT=/^:[\w-]+$/,gT=3,yT=2,bT=1,ET=10,TT=-2,np=e=>e==="*";function xT(e,t){let n=e.split("/"),r=n.length;return n.some(np)&&(r+=TT),t&&(r+=yT),n.filter(o=>!np(o)).reduce((o,i)=>o+(mT.test(i)?gT:i===""?bT:ET),r)}function CT(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function vT(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",a=[];for(let s=0;s<r.length;++s){let l=r[s],c=s===r.length-1,d=i==="/"?t:t.slice(i.length)||"/",u=Ys({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d),h=l.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=Ys({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!u)return null;Object.assign(o,u.params),a.push({params:o,pathname:ur([i,u.pathname]),pathnameBase:DT(ur([i,u.pathnameBase])),route:h}),u.pathnameBase!=="/"&&(i=ur([i,u.pathnameBase]))}return a}function Ys(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=ST(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce((c,{paramName:d,isOptional:u},h)=>{if(d==="*"){let g=s[h]||"";a=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const p=s[h];return u&&!p?c[d]=void 0:c[d]=(p||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:a,pattern:e}}function ST(e,t=!1,n=!0){jt(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,l)=>(r.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function AT(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return jt(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Gn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function kT(e,t="/"){let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?Xr(e):e;return{pathname:n?n.startsWith("/")?n:_T(n,t):t,search:IT(r),hash:wT(o)}}function _T(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function xc(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Og(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Td(e){let t=Og(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function xd(e,t,n,r=!1){let o;typeof e=="string"?o=Xr(e):(o={...e},Ue(!o.pathname||!o.pathname.includes("?"),xc("?","pathname","search",o)),Ue(!o.pathname||!o.pathname.includes("#"),xc("#","pathname","hash",o)),Ue(!o.search||!o.search.includes("#"),xc("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,s;if(a==null)s=n;else{let u=t.length-1;if(!r&&a.startsWith("..")){let h=a.split("/");for(;h[0]==="..";)h.shift(),u-=1;o.pathname=h.join("/")}s=u>=0?t[u]:"/"}let l=kT(o,s),c=a&&a!=="/"&&a.endsWith("/"),d=(i||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}var ur=e=>e.join("/").replace(/\/\/+/g,"/"),DT=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),IT=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,wT=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Ks=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function ka(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var Mg=["POST","PUT","PATCH","DELETE"],NT=new Set(Mg),PT=["GET",...Mg],RT=new Set(PT),LT=new Set([301,302,303,307,308]),OT=new Set([307,308]),Cc={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},MT={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ji={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Cd=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,FT=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Fg="remix-router-transitions",Bg=Symbol("ResetLoaderData");function BT(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";Ue(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let r=e.hydrationRouteProperties||[],o=e.mapRouteProperties||FT,i={},a=Vs(e.routes,o,void 0,i),s,l=e.basename||"/",c=e.dataStrategy||$T,d={unstable_middleware:!1,...e.future},u=null,h=new Set,p=null,g=null,b=null,T=e.hydrationData!=null,E=$r(a,e.history.location,l),C=!1,x=null,k;if(E==null&&!e.patchRoutesOnNavigation){let L=On(404,{pathname:e.history.location.pathname}),{matches:j,route:$}=fp(a);k=!0,E=j,x={[$.id]:L}}else if(E&&!e.hydrationData&&to(E,a,e.history.location.pathname).active&&(E=null),E)if(E.some(L=>L.route.lazy))k=!1;else if(!E.some(L=>L.route.loader))k=!0;else{let L=e.hydrationData?e.hydrationData.loaderData:null,j=e.hydrationData?e.hydrationData.errors:null;if(j){let $=E.findIndex(ae=>j[ae.route.id]!==void 0);k=E.slice(0,$+1).every(ae=>!Eu(ae.route,L,j))}else k=E.every($=>!Eu($.route,L,j))}else{k=!1,E=[];let L=to(null,a,e.history.location.pathname);L.active&&L.matches&&(C=!0,E=L.matches)}let w,S={historyAction:e.history.action,location:e.history.location,matches:E,initialized:k,navigation:Cc,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||x,fetchers:new Map,blockers:new Map},B="POP",W=!1,U,y=!1,R=new Map,F=null,M=!1,z=!1,X=new Set,Z=new Map,me=0,ce=-1,ee=new Map,I=new Set,ue=new Map,J=new Map,A=new Set,Q=new Map,ge,de=null;function ye(){if(u=e.history.listen(({action:L,location:j,delta:$})=>{if(ge){ge(),ge=void 0;return}jt(Q.size===0||$!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ae=Ie({currentLocation:S.location,nextLocation:j,historyAction:L});if(ae&&$!=null){let pe=new Promise(ve=>{ge=ve});e.history.go($*-1),Oe(ae,{state:"blocked",location:j,proceed(){Oe(ae,{state:"proceeding",proceed:void 0,reset:void 0,location:j}),pe.then(()=>e.history.go($))},reset(){let ve=new Map(S.blockers);ve.set(ae,ji),Be({blockers:ve})}});return}return be(L,j)}),n){ex(t,R);let L=()=>tx(t,R);t.addEventListener("pagehide",L),F=()=>t.removeEventListener("pagehide",L)}return S.initialized||be("POP",S.location,{initialHydration:!0}),w}function he(){u&&u(),F&&F(),h.clear(),U&&U.abort(),S.fetchers.forEach((L,j)=>$e(j)),S.blockers.forEach((L,j)=>ne(j))}function Fe(L){return h.add(L),()=>h.delete(L)}function Be(L,j={}){S={...S,...L};let $=[],ae=[];S.fetchers.forEach((pe,ve)=>{pe.state==="idle"&&(A.has(ve)?$.push(ve):ae.push(ve))}),A.forEach(pe=>{!S.fetchers.has(pe)&&!Z.has(pe)&&$.push(pe)}),[...h].forEach(pe=>pe(S,{deletedFetchers:$,viewTransitionOpts:j.viewTransitionOpts,flushSync:j.flushSync===!0})),$.forEach(pe=>$e(pe)),ae.forEach(pe=>S.fetchers.delete(pe))}function xe(L,j,{flushSync:$}={}){let ae=S.actionData!=null&&S.navigation.formMethod!=null&&Cn(S.navigation.formMethod)&&S.navigation.state==="loading"&&L.state?._isRedirect!==!0,pe;j.actionData?Object.keys(j.actionData).length>0?pe=j.actionData:pe=null:ae?pe=S.actionData:pe=null;let ve=j.loaderData?hp(S.loaderData,j.loaderData,j.matches||[],j.errors):S.loaderData,we=S.blockers;we.size>0&&(we=new Map(we),we.forEach((Ce,Pe)=>we.set(Pe,ji)));let Ee=W===!0||S.navigation.formMethod!=null&&Cn(S.navigation.formMethod)&&L.state?._isRedirect!==!0;s&&(a=s,s=void 0),M||B==="POP"||(B==="PUSH"?e.history.push(L,L.state):B==="REPLACE"&&e.history.replace(L,L.state));let ke;if(B==="POP"){let Ce=R.get(S.location.pathname);Ce&&Ce.has(L.pathname)?ke={currentLocation:S.location,nextLocation:L}:R.has(L.pathname)&&(ke={currentLocation:L,nextLocation:S.location})}else if(y){let Ce=R.get(S.location.pathname);Ce?Ce.add(L.pathname):(Ce=new Set([L.pathname]),R.set(S.location.pathname,Ce)),ke={currentLocation:S.location,nextLocation:L}}Be({...j,actionData:pe,loaderData:ve,historyAction:B,location:L,initialized:!0,navigation:Cc,revalidation:"idle",restoreScrollPosition:hn(L,j.matches||S.matches),preventScrollReset:Ee,blockers:we},{viewTransitionOpts:ke,flushSync:$===!0}),B="POP",W=!1,y=!1,M=!1,z=!1,de?.resolve(),de=null}async function dt(L,j){if(typeof L=="number"){e.history.go(L);return}let $=bu(S.location,S.matches,l,L,j?.fromRouteId,j?.relative),{path:ae,submission:pe,error:ve}=rp(!1,$,j),we=S.location,Ee=Aa(S.location,ae,j&&j.state);Ee={...Ee,...e.history.encodeLocation(Ee)};let ke=j&&j.replace!=null?j.replace:void 0,Ce="PUSH";ke===!0?Ce="REPLACE":ke===!1||pe!=null&&Cn(pe.formMethod)&&pe.formAction===S.location.pathname+S.location.search&&(Ce="REPLACE");let Pe=j&&"preventScrollReset"in j?j.preventScrollReset===!0:void 0,Ne=(j&&j.flushSync)===!0,je=Ie({currentLocation:we,nextLocation:Ee,historyAction:Ce});if(je){Oe(je,{state:"blocked",location:Ee,proceed(){Oe(je,{state:"proceeding",proceed:void 0,reset:void 0,location:Ee}),dt(L,j)},reset(){let at=new Map(S.blockers);at.set(je,ji),Be({blockers:at})}});return}await be(Ce,Ee,{submission:pe,pendingError:ve,preventScrollReset:Pe,replace:j&&j.replace,enableViewTransition:j&&j.viewTransition,flushSync:Ne})}function Ze(){de||(de=nx()),Ke(),Be({revalidation:"loading"});let L=de.promise;return S.navigation.state==="submitting"?L:S.navigation.state==="idle"?(be(S.historyAction,S.location,{startUninterruptedRevalidation:!0}),L):(be(B||S.historyAction,S.navigation.location,{overrideNavigation:S.navigation,enableViewTransition:y===!0}),L)}async function be(L,j,$){U&&U.abort(),U=null,B=L,M=($&&$.startUninterruptedRevalidation)===!0,nr(S.location,S.matches),W=($&&$.preventScrollReset)===!0,y=($&&$.enableViewTransition)===!0;let ae=s||a,pe=$&&$.overrideNavigation,ve=$?.initialHydration&&S.matches&&S.matches.length>0&&!C?S.matches:$r(ae,j,l),we=($&&$.flushSync)===!0;if(ve&&S.initialized&&!z&&KT(S.location,j)&&!($&&$.submission&&Cn($.submission.formMethod))){xe(j,{matches:ve},{flushSync:we});return}let Ee=to(ve,ae,j.pathname);if(Ee.active&&Ee.matches&&(ve=Ee.matches),!ve){let{error:tn,notFoundMatches:bn,route:We}=qt(j.pathname);xe(j,{matches:bn,loaderData:{},errors:{[We.id]:tn}},{flushSync:we});return}U=new AbortController;let ke=ei(e.history,j,U.signal,$&&$.submission),Ce=new tp(e.unstable_getContext?await e.unstable_getContext():void 0),Pe;if($&&$.pendingError)Pe=[lo(ve).route.id,{type:"error",error:$.pendingError}];else if($&&$.submission&&Cn($.submission.formMethod)){let tn=await Jt(ke,j,$.submission,ve,Ce,Ee.active,$&&$.initialHydration===!0,{replace:$.replace,flushSync:we});if(tn.shortCircuited)return;if(tn.pendingActionResult){let[bn,We]=tn.pendingActionResult;if(xn(We)&&ka(We.error)&&We.error.status===404){U=null,xe(j,{matches:tn.matches,loaderData:{},errors:{[bn]:We.error}});return}}ve=tn.matches||ve,Pe=tn.pendingActionResult,pe=vc(j,$.submission),we=!1,Ee.active=!1,ke=ei(e.history,ke.url,ke.signal)}let{shortCircuited:Ne,matches:je,loaderData:at,errors:Ut}=await bt(ke,j,ve,Ce,Ee.active,pe,$&&$.submission,$&&$.fetcherSubmission,$&&$.replace,$&&$.initialHydration===!0,we,Pe);Ne||(U=null,xe(j,{matches:je||ve,...pp(Pe),loaderData:at,errors:Ut}))}async function Jt(L,j,$,ae,pe,ve,we,Ee={}){Ke();let ke=JT(j,$);if(Be({navigation:ke},{flushSync:Ee.flushSync===!0}),ve){let Ne=await wt(ae,j.pathname,L.signal);if(Ne.type==="aborted")return{shortCircuited:!0};if(Ne.type==="error"){let je=lo(Ne.partialMatches).route.id;return{matches:Ne.partialMatches,pendingActionResult:[je,{type:"error",error:Ne.error}]}}else if(Ne.matches)ae=Ne.matches;else{let{notFoundMatches:je,error:at,route:Ut}=qt(j.pathname);return{matches:je,pendingActionResult:[Ut.id,{type:"error",error:at}]}}}let Ce,Pe=ta(ae,j);if(!Pe.route.action&&!Pe.route.lazy)Ce={type:"error",error:On(405,{method:L.method,pathname:j.pathname,routeId:Pe.route.id})};else{let Ne=ii(o,i,L,ae,Pe,we?[]:r,pe),je=await Kn(L,Ne,pe,null);if(Ce=je[Pe.route.id],!Ce){for(let at of ae)if(je[at.route.id]){Ce=je[at.route.id];break}}if(L.signal.aborted)return{shortCircuited:!0}}if(co(Ce)){let Ne;return Ee&&Ee.replace!=null?Ne=Ee.replace:Ne=cp(Ce.response.headers.get("Location"),new URL(L.url),l)===S.location.pathname+S.location.search,await fe(L,Ce,!0,{submission:$,replace:Ne}),{shortCircuited:!0}}if(xn(Ce)){let Ne=lo(ae,Pe.route.id);return(Ee&&Ee.replace)!==!0&&(B="PUSH"),{matches:ae,pendingActionResult:[Ne.route.id,Ce,Pe.route.id]}}return{matches:ae,pendingActionResult:[Pe.route.id,Ce]}}async function bt(L,j,$,ae,pe,ve,we,Ee,ke,Ce,Pe,Ne){let je=ve||vc(j,we),at=we||Ee||gp(je),Ut=!M&&!Ce;if(pe){if(Ut){let Pn=_e(Ne);Be({navigation:je,...Pn!==void 0?{actionData:Pn}:{}},{flushSync:Pe})}let Qe=await wt($,j.pathname,L.signal);if(Qe.type==="aborted")return{shortCircuited:!0};if(Qe.type==="error"){let Pn=lo(Qe.partialMatches).route.id;return{matches:Qe.partialMatches,loaderData:{},errors:{[Pn]:Qe.error}}}else if(Qe.matches)$=Qe.matches;else{let{error:Pn,notFoundMatches:Fr,route:ls}=qt(j.pathname);return{matches:Fr,loaderData:{},errors:{[ls.id]:Pn}}}}let tn=s||a,{dsMatches:bn,revalidatingFetchers:We}=op(L,ae,o,i,e.history,S,$,at,j,Ce?[]:r,Ce===!0,z,X,A,ue,I,tn,l,e.patchRoutesOnNavigation!=null,Ne);if(ce=++me,!e.dataStrategy&&!bn.some(Qe=>Qe.shouldLoad)&&We.length===0){let Qe=Kt();return xe(j,{matches:$,loaderData:{},errors:Ne&&xn(Ne[1])?{[Ne[0]]:Ne[1].error}:null,...pp(Ne),...Qe?{fetchers:new Map(S.fetchers)}:{}},{flushSync:Pe}),{shortCircuited:!0}}if(Ut){let Qe={};if(!pe){Qe.navigation=je;let Pn=_e(Ne);Pn!==void 0&&(Qe.actionData=Pn)}We.length>0&&(Qe.fetchers=St(We)),Be(Qe,{flushSync:Pe})}We.forEach(Qe=>{et(Qe.key),Qe.controller&&Z.set(Qe.key,Qe.controller)});let Li=()=>We.forEach(Qe=>et(Qe.key));U&&U.signal.addEventListener("abort",Li);let{loaderResults:ro,fetcherResults:Oi}=await Mr(bn,We,L,ae);if(L.signal.aborted)return{shortCircuited:!0};U&&U.signal.removeEventListener("abort",Li),We.forEach(Qe=>Z.delete(Qe.key));let Nn=cs(ro);if(Nn)return await fe(L,Nn.result,!0,{replace:ke}),{shortCircuited:!0};if(Nn=cs(Oi),Nn)return I.add(Nn.key),await fe(L,Nn.result,!0,{replace:ke}),{shortCircuited:!0};let{loaderData:Mi,errors:Fi}=dp(S,$,ro,Ne,We,Oi);Ce&&S.errors&&(Fi={...S.errors,...Fi});let yc=Kt(),oo=en(ce),ss=yc||oo||We.length>0;return{matches:$,loaderData:Mi,errors:Fi,...ss?{fetchers:new Map(S.fetchers)}:{}}}function _e(L){if(L&&!xn(L[1]))return{[L[0]]:L[1].data};if(S.actionData)return Object.keys(S.actionData).length===0?null:S.actionData}function St(L){return L.forEach(j=>{let $=S.fetchers.get(j.key),ae=Hi(void 0,$?$.data:void 0);S.fetchers.set(j.key,ae)}),new Map(S.fetchers)}async function ht(L,j,$,ae){et(L);let pe=(ae&&ae.flushSync)===!0,ve=s||a,we=bu(S.location,S.matches,l,$,j,ae?.relative),Ee=$r(ve,we,l),ke=to(Ee,ve,we);if(ke.active&&ke.matches&&(Ee=ke.matches),!Ee){re(L,j,On(404,{pathname:we}),{flushSync:pe});return}let{path:Ce,submission:Pe,error:Ne}=rp(!0,we,ae);if(Ne){re(L,j,Ne,{flushSync:pe});return}let je=ta(Ee,Ce),at=new tp(e.unstable_getContext?await e.unstable_getContext():void 0),Ut=(ae&&ae.preventScrollReset)===!0;if(Pe&&Cn(Pe.formMethod)){await pt(L,j,Ce,je,Ee,at,ke.active,pe,Ut,Pe);return}ue.set(L,{routeId:j,path:Ce}),await Se(L,j,Ce,je,Ee,at,ke.active,pe,Ut,Pe)}async function pt(L,j,$,ae,pe,ve,we,Ee,ke,Ce){Ke(),ue.delete(L);function Pe(Nt){if(!Nt.route.action&&!Nt.route.lazy){let Bo=On(405,{method:Ce.formMethod,pathname:$,routeId:j});return re(L,j,Bo,{flushSync:Ee}),!0}return!1}if(!we&&Pe(ae))return;let Ne=S.fetchers.get(L);V(L,ZT(Ce,Ne),{flushSync:Ee});let je=new AbortController,at=ei(e.history,$,je.signal,Ce);if(we){let Nt=await wt(pe,$,at.signal,L);if(Nt.type==="aborted")return;if(Nt.type==="error"){re(L,j,Nt.error,{flushSync:Ee});return}else if(Nt.matches){if(pe=Nt.matches,ae=ta(pe,$),Pe(ae))return}else{re(L,j,On(404,{pathname:$}),{flushSync:Ee});return}}Z.set(L,je);let Ut=me,tn=ii(o,i,at,pe,ae,r,ve),We=(await Kn(at,tn,ve,L))[ae.route.id];if(at.signal.aborted){Z.get(L)===je&&Z.delete(L);return}if(A.has(L)){if(co(We)||xn(We)){V(L,Hr(void 0));return}}else{if(co(We))if(Z.delete(L),ce>Ut){V(L,Hr(void 0));return}else return I.add(L),V(L,Hi(Ce)),fe(at,We,!1,{fetcherSubmission:Ce,preventScrollReset:ke});if(xn(We)){re(L,j,We.error);return}}let Li=S.navigation.location||S.location,ro=ei(e.history,Li,je.signal),Oi=s||a,Nn=S.navigation.state!=="idle"?$r(Oi,S.navigation.location,l):S.matches;Ue(Nn,"Didn't find any matches after fetcher action");let Mi=++me;ee.set(L,Mi);let Fi=Hi(Ce,We.data);S.fetchers.set(L,Fi);let{dsMatches:yc,revalidatingFetchers:oo}=op(ro,ve,o,i,e.history,S,Nn,Ce,Li,r,!1,z,X,A,ue,I,Oi,l,e.patchRoutesOnNavigation!=null,[ae.route.id,We]);oo.filter(Nt=>Nt.key!==L).forEach(Nt=>{let Bo=Nt.key,Qh=S.fetchers.get(Bo),WE=Hi(void 0,Qh?Qh.data:void 0);S.fetchers.set(Bo,WE),et(Bo),Nt.controller&&Z.set(Bo,Nt.controller)}),Be({fetchers:new Map(S.fetchers)});let ss=()=>oo.forEach(Nt=>et(Nt.key));je.signal.addEventListener("abort",ss);let{loaderResults:Qe,fetcherResults:Pn}=await Mr(yc,oo,ro,ve);if(je.signal.aborted)return;if(je.signal.removeEventListener("abort",ss),ee.delete(L),Z.delete(L),oo.forEach(Nt=>Z.delete(Nt.key)),S.fetchers.has(L)){let Nt=Hr(We.data);S.fetchers.set(L,Nt)}let Fr=cs(Qe);if(Fr)return fe(ro,Fr.result,!1,{preventScrollReset:ke});if(Fr=cs(Pn),Fr)return I.add(Fr.key),fe(ro,Fr.result,!1,{preventScrollReset:ke});let{loaderData:ls,errors:bc}=dp(S,Nn,Qe,void 0,oo,Pn);en(Mi),S.navigation.state==="loading"&&Mi>ce?(Ue(B,"Expected pending action"),U&&U.abort(),xe(S.navigation.location,{matches:Nn,loaderData:ls,errors:bc,fetchers:new Map(S.fetchers)})):(Be({errors:bc,loaderData:hp(S.loaderData,ls,Nn,bc),fetchers:new Map(S.fetchers)}),z=!1)}async function Se(L,j,$,ae,pe,ve,we,Ee,ke,Ce){let Pe=S.fetchers.get(L);V(L,Hi(Ce,Pe?Pe.data:void 0),{flushSync:Ee});let Ne=new AbortController,je=ei(e.history,$,Ne.signal);if(we){let We=await wt(pe,$,je.signal,L);if(We.type==="aborted")return;if(We.type==="error"){re(L,j,We.error,{flushSync:Ee});return}else if(We.matches)pe=We.matches,ae=ta(pe,$);else{re(L,j,On(404,{pathname:$}),{flushSync:Ee});return}}Z.set(L,Ne);let at=me,Ut=ii(o,i,je,pe,ae,r,ve),bn=(await Kn(je,Ut,ve,L))[ae.route.id];if(Z.get(L)===Ne&&Z.delete(L),!je.signal.aborted){if(A.has(L)){V(L,Hr(void 0));return}if(co(bn))if(ce>at){V(L,Hr(void 0));return}else{I.add(L),await fe(je,bn,!1,{preventScrollReset:ke});return}if(xn(bn)){re(L,j,bn.error);return}V(L,Hr(bn.data))}}async function fe(L,j,$,{submission:ae,fetcherSubmission:pe,preventScrollReset:ve,replace:we}={}){j.response.headers.has("X-Remix-Revalidate")&&(z=!0);let Ee=j.response.headers.get("Location");Ue(Ee,"Expected a Location header on the redirect Response"),Ee=cp(Ee,new URL(L.url),l);let ke=Aa(S.location,Ee,{_isRedirect:!0});if(n){let Ut=!1;if(j.response.headers.has("X-Remix-Reload-Document"))Ut=!0;else if(Cd.test(Ee)){const tn=Pg(Ee,!0);Ut=tn.origin!==t.location.origin||Gn(tn.pathname,l)==null}if(Ut){we?t.location.replace(Ee):t.location.assign(Ee);return}}U=null;let Ce=we===!0||j.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Pe,formAction:Ne,formEncType:je}=S.navigation;!ae&&!pe&&Pe&&Ne&&je&&(ae=gp(S.navigation));let at=ae||pe;if(OT.has(j.response.status)&&at&&Cn(at.formMethod))await be(Ce,ke,{submission:{...at,formAction:Ee},preventScrollReset:ve||W,enableViewTransition:$?y:void 0});else{let Ut=vc(ke,ae);await be(Ce,ke,{overrideNavigation:Ut,fetcherSubmission:pe,preventScrollReset:ve||W,enableViewTransition:$?y:void 0})}}async function Kn(L,j,$,ae){let pe,ve={};try{pe=await GT(c,L,j,ae,$,!1)}catch(we){return j.filter(Ee=>Ee.shouldLoad).forEach(Ee=>{ve[Ee.route.id]={type:"error",error:we}}),ve}if(L.signal.aborted)return ve;for(let[we,Ee]of Object.entries(pe))if(QT(Ee)){let ke=Ee.result;ve[we]={type:"redirect",response:VT(ke,L,we,j,l)}}else ve[we]=await WT(Ee);return ve}async function Mr(L,j,$,ae){let pe=Kn($,L,ae,null),ve=Promise.all(j.map(async ke=>{if(ke.matches&&ke.match&&ke.request&&ke.controller){let Pe=(await Kn(ke.request,ke.matches,ae,ke.key))[ke.match.route.id];return{[ke.key]:Pe}}else return Promise.resolve({[ke.key]:{type:"error",error:On(404,{pathname:ke.path})}})})),we=await pe,Ee=(await ve).reduce((ke,Ce)=>Object.assign(ke,Ce),{});return{loaderResults:we,fetcherResults:Ee}}function Ke(){z=!0,ue.forEach((L,j)=>{Z.has(j)&&X.add(j),et(j)})}function V(L,j,$={}){S.fetchers.set(L,j),Be({fetchers:new Map(S.fetchers)},{flushSync:($&&$.flushSync)===!0})}function re(L,j,$,ae={}){let pe=lo(S.matches,j);$e(L),Be({errors:{[pe.route.id]:$},fetchers:new Map(S.fetchers)},{flushSync:(ae&&ae.flushSync)===!0})}function Ae(L){return J.set(L,(J.get(L)||0)+1),A.has(L)&&A.delete(L),S.fetchers.get(L)||MT}function $e(L){let j=S.fetchers.get(L);Z.has(L)&&!(j&&j.state==="loading"&&ee.has(L))&&et(L),ue.delete(L),ee.delete(L),I.delete(L),A.delete(L),X.delete(L),S.fetchers.delete(L)}function Ve(L){let j=(J.get(L)||0)-1;j<=0?(J.delete(L),A.add(L)):J.set(L,j),Be({fetchers:new Map(S.fetchers)})}function et(L){let j=Z.get(L);j&&(j.abort(),Z.delete(L))}function Zt(L){for(let j of L){let $=Ae(j),ae=Hr($.data);S.fetchers.set(j,ae)}}function Kt(){let L=[],j=!1;for(let $ of I){let ae=S.fetchers.get($);Ue(ae,`Expected fetcher: ${$}`),ae.state==="loading"&&(I.delete($),L.push($),j=!0)}return Zt(L),j}function en(L){let j=[];for(let[$,ae]of ee)if(ae<L){let pe=S.fetchers.get($);Ue(pe,`Expected fetcher: ${$}`),pe.state==="loading"&&(et($),ee.delete($),j.push($))}return Zt(j),j.length>0}function ie(L,j){let $=S.blockers.get(L)||ji;return Q.get(L)!==j&&Q.set(L,j),$}function ne(L){S.blockers.delete(L),Q.delete(L)}function Oe(L,j){let $=S.blockers.get(L)||ji;Ue($.state==="unblocked"&&j.state==="blocked"||$.state==="blocked"&&j.state==="blocked"||$.state==="blocked"&&j.state==="proceeding"||$.state==="blocked"&&j.state==="unblocked"||$.state==="proceeding"&&j.state==="unblocked",`Invalid blocker state transition: ${$.state} -> ${j.state}`);let ae=new Map(S.blockers);ae.set(L,j),Be({blockers:ae})}function Ie({currentLocation:L,nextLocation:j,historyAction:$}){if(Q.size===0)return;Q.size>1&&jt(!1,"A router only supports one blocker at a time");let ae=Array.from(Q.entries()),[pe,ve]=ae[ae.length-1],we=S.blockers.get(pe);if(!(we&&we.state==="proceeding")&&ve({currentLocation:L,nextLocation:j,historyAction:$}))return pe}function qt(L){let j=On(404,{pathname:L}),$=s||a,{matches:ae,route:pe}=fp($);return{notFoundMatches:ae,route:pe,error:j}}function tr(L,j,$){if(p=L,b=j,g=$||null,!T&&S.navigation===Cc){T=!0;let ae=hn(S.location,S.matches);ae!=null&&Be({restoreScrollPosition:ae})}return()=>{p=null,b=null,g=null}}function Qn(L,j){return g&&g(L,j.map(ae=>pT(ae,S.loaderData)))||L.key}function nr(L,j){if(p&&b){let $=Qn(L,j);p[$]=b()}}function hn(L,j){if(p){let $=Qn(L,j),ae=p[$];if(typeof ae=="number")return ae}return null}function to(L,j,$){if(e.patchRoutesOnNavigation)if(L){if(Object.keys(L[0].params).length>0)return{active:!0,matches:Is(j,$,l,!0)}}else return{active:!0,matches:Is(j,$,l,!0)||[]};return{active:!1,matches:null}}async function wt(L,j,$,ae){if(!e.patchRoutesOnNavigation)return{type:"success",matches:L};let pe=L;for(;;){let ve=s==null,we=s||a,Ee=i;try{await e.patchRoutesOnNavigation({signal:$,path:j,matches:pe,fetcherKey:ae,patch:(Pe,Ne)=>{$.aborted||ip(Pe,Ne,we,Ee,o)}})}catch(Pe){return{type:"error",error:Pe,partialMatches:pe}}finally{ve&&!$.aborted&&(a=[...a])}if($.aborted)return{type:"aborted"};let ke=$r(we,j,l);if(ke)return{type:"success",matches:ke};let Ce=Is(we,j,l,!0);if(!Ce||pe.length===Ce.length&&pe.every((Pe,Ne)=>Pe.route.id===Ce[Ne].route.id))return{type:"success",matches:null};pe=Ce}}function mr(L){i={},s=Vs(L,o,void 0,i)}function no(L,j){let $=s==null;ip(L,j,s||a,i,o),$&&(a=[...a],Be({}))}return w={get basename(){return l},get future(){return d},get state(){return S},get routes(){return a},get window(){return t},initialize:ye,subscribe:Fe,enableScrollRestoration:tr,navigate:dt,fetch:ht,revalidate:Ze,createHref:L=>e.history.createHref(L),encodeLocation:L=>e.history.encodeLocation(L),getFetcher:Ae,deleteFetcher:Ve,dispose:he,getBlocker:ie,deleteBlocker:ne,patchRoutes:no,_internalFetchControllers:Z,_internalSetRoutes:mr},w}function jT(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function bu(e,t,n,r,o,i){let a,s;if(o){a=[];for(let c of t)if(a.push(c),c.route.id===o){s=c;break}}else a=t,s=t[t.length-1];let l=xd(r||".",Td(a),Gn(e.pathname,n)||e.pathname,i==="path");if(r==null&&(l.search=e.search,l.hash=e.hash),(r==null||r===""||r===".")&&s){let c=vd(l.search);if(s.route.index&&!c)l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index";else if(!s.route.index&&c){let d=new URLSearchParams(l.search),u=d.getAll("index");d.delete("index"),u.filter(p=>p).forEach(p=>d.append("index",p));let h=d.toString();l.search=h?`?${h}`:""}}return n!=="/"&&(l.pathname=l.pathname==="/"?n:ur([n,l.pathname])),Yr(l)}function rp(e,t,n){if(!n||!jT(n))return{path:t};if(n.formMethod&&!XT(n.formMethod))return{path:t,error:On(405,{method:n.formMethod})};let r=()=>({path:t,error:On(400,{type:"invalid-body"})}),i=(n.formMethod||"get").toUpperCase(),a=Gg(t);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Cn(i))return r();let u=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((h,[p,g])=>`${h}${p}=${g}
|
|
11
|
+
`,""):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:u}}}else if(n.formEncType==="application/json"){if(!Cn(i))return r();try{let u=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:u,text:void 0}}}catch{return r()}}}Ue(typeof FormData=="function","FormData is not available in this environment");let s,l;if(n.formData)s=xu(n.formData),l=n.formData;else if(n.body instanceof FormData)s=xu(n.body),l=n.body;else if(n.body instanceof URLSearchParams)s=n.body,l=up(s);else if(n.body==null)s=new URLSearchParams,l=new FormData;else try{s=new URLSearchParams(n.body),l=up(s)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:l,json:void 0,text:void 0};if(Cn(c.formMethod))return{path:t,submission:c};let d=Xr(t);return e&&d.search&&vd(d.search)&&s.append("index",""),d.search=`?${s}`,{path:Yr(d),submission:c}}function op(e,t,n,r,o,i,a,s,l,c,d,u,h,p,g,b,T,E,C,x){let k=x?xn(x[1])?x[1].error:x[1].data:void 0,w=o.createURL(i.location),S=o.createURL(l),B;if(d&&i.errors){let M=Object.keys(i.errors)[0];B=a.findIndex(z=>z.route.id===M)}else if(x&&xn(x[1])){let M=x[0];B=a.findIndex(z=>z.route.id===M)-1}let W=x?x[1].statusCode:void 0,U=W&&W>=400,y={currentUrl:w,currentParams:i.matches[0]?.params||{},nextUrl:S,nextParams:a[0].params,...s,actionResult:k,actionStatus:W},R=a.map((M,z)=>{let{route:X}=M,Z=null;if(B!=null&&z>B?Z=!1:X.lazy?Z=!0:X.loader==null?Z=!1:d?Z=Eu(X,i.loaderData,i.errors):HT(i.loaderData,i.matches[z],M)&&(Z=!0),Z!==null)return Tu(n,r,e,M,c,t,Z);let me=U?!1:u||w.pathname+w.search===S.pathname+S.search||w.search!==S.search||UT(i.matches[z],M),ce={...y,defaultShouldRevalidate:me},ee=Qs(M,ce);return Tu(n,r,e,M,c,t,ee,ce)}),F=[];return g.forEach((M,z)=>{if(d||!a.some(J=>J.route.id===M.routeId)||p.has(z))return;let X=i.fetchers.get(z),Z=X&&X.state!=="idle"&&X.data===void 0,me=$r(T,M.path,E);if(!me){if(C&&Z)return;F.push({key:z,routeId:M.routeId,path:M.path,matches:null,match:null,request:null,controller:null});return}if(b.has(z))return;let ce=ta(me,M.path),ee=new AbortController,I=ei(o,M.path,ee.signal),ue=null;if(h.has(z))h.delete(z),ue=ii(n,r,I,me,ce,c,t);else if(Z)u&&(ue=ii(n,r,I,me,ce,c,t));else{let J={...y,defaultShouldRevalidate:U?!1:u};Qs(ce,J)&&(ue=ii(n,r,I,me,ce,c,t,J))}ue&&F.push({key:z,routeId:M.routeId,path:M.path,matches:ue,match:ce,request:I,controller:ee})}),{dsMatches:R,revalidatingFetchers:F}}function Eu(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=t!=null&&e.id in t,o=n!=null&&n[e.id]!==void 0;return!r&&o?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!r&&!o}function HT(e,t,n){let r=!t||n.route.id!==t.route.id,o=!e.hasOwnProperty(n.route.id);return r||o}function UT(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Qs(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function ip(e,t,n,r,o){let i;if(e){let l=r[e];Ue(l,`No route found to patch children into: routeId = ${e}`),l.children||(l.children=[]),i=l.children}else i=n;let a=t.filter(l=>!i.some(c=>jg(l,c))),s=Vs(a,o,[e||"_","patch",String(i?.length||"0")],r);i.push(...s)}function jg(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,r)=>t.children?.some(o=>jg(n,o))):!1}var ap=new WeakMap,Hg=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let o=n[t.id];if(Ue(o,"No route found in manifest"),!o.lazy||typeof o.lazy!="object")return;let i=o.lazy[e];if(!i)return;let a=ap.get(o);a||(a={},ap.set(o,a));let s=a[e];if(s)return s;let l=(async()=>{let c=cT(e),u=o[e]!==void 0&&e!=="hasErrorBoundary";if(c)jt(!c,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),a[e]=Promise.resolve();else if(u)jt(!1,`Route "${o.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let h=await i();h!=null&&(Object.assign(o,{[e]:h}),Object.assign(o,r(o)))}typeof o.lazy=="object"&&(o.lazy[e]=void 0,Object.values(o.lazy).every(h=>h===void 0)&&(o.lazy=void 0))})();return a[e]=l,l},sp=new WeakMap;function zT(e,t,n,r,o){let i=n[e.id];if(Ue(i,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let d=sp.get(i);if(d)return{lazyRoutePromise:d,lazyHandlerPromise:d};let u=(async()=>{Ue(typeof e.lazy=="function","No lazy route function found");let h=await e.lazy(),p={};for(let g in h){let b=h[g];if(b===void 0)continue;let T=dT(g),C=i[g]!==void 0&&g!=="hasErrorBoundary";T?jt(!T,"Route property "+g+" is not a supported property to be returned from a lazy route function. This property will be ignored."):C?jt(!C,`Route "${i.id}" has a static property "${g}" defined but its lazy function is also returning a value for this property. The lazy route property "${g}" will be ignored.`):p[g]=b}Object.assign(i,p),Object.assign(i,{...r(i),lazy:void 0})})();return sp.set(i,u),u.catch(()=>{}),{lazyRoutePromise:u,lazyHandlerPromise:u}}let a=Object.keys(e.lazy),s=[],l;for(let d of a){if(o&&o.includes(d))continue;let u=Hg({key:d,route:e,manifest:n,mapRouteProperties:r});u&&(s.push(u),d===t&&(l=u))}let c=s.length>0?Promise.all(s).then(()=>{}):void 0;return c?.catch(()=>{}),l?.catch(()=>{}),{lazyRoutePromise:c,lazyHandlerPromise:l}}async function lp(e){let t=e.matches.filter(o=>o.shouldLoad),n={};return(await Promise.all(t.map(o=>o.resolve()))).forEach((o,i)=>{n[t[i].route.id]=o}),n}async function $T(e){return e.matches.some(t=>t.route.unstable_middleware)?Ug(e,!1,()=>lp(e),(t,n)=>({[n]:{type:"error",result:t}})):lp(e)}async function Ug(e,t,n,r){let{matches:o,request:i,params:a,context:s}=e,l={handlerResult:void 0};try{let c=o.flatMap(u=>u.route.unstable_middleware?u.route.unstable_middleware.map(h=>[u.route.id,h]):[]),d=await zg({request:i,params:a,context:s},c,t,l,n);return t?d:l.handlerResult}catch(c){if(!l.middlewareError)throw c;let d=await r(l.middlewareError.error,l.middlewareError.routeId);return l.handlerResult?Object.assign(l.handlerResult,d):d}}async function zg(e,t,n,r,o,i=0){let{request:a}=e;if(a.signal.aborted)throw a.signal.reason?a.signal.reason:new Error(`Request aborted without an \`AbortSignal.reason\`: ${a.method} ${a.url}`);let s=t[i];if(!s)return r.handlerResult=await o(),r.handlerResult;let[l,c]=s,d=!1,u,h=async()=>{if(d)throw new Error("You may only call `next()` once per middleware");d=!0,await zg(e,t,n,r,o,i+1)};try{let p=await c({request:e.request,params:e.params,context:e.context},h);return d?p===void 0?u:p:h()}catch(p){throw r.middlewareError?r.middlewareError.error!==p&&(r.middlewareError={routeId:l,error:p}):r.middlewareError={routeId:l,error:p},p}}function $g(e,t,n,r,o){let i=Hg({key:"unstable_middleware",route:r.route,manifest:t,mapRouteProperties:e}),a=zT(r.route,Cn(n.method)?"action":"loader",t,e,o);return{middleware:i,route:a.lazyRoutePromise,handler:a.lazyHandlerPromise}}function Tu(e,t,n,r,o,i,a,s=null){let l=!1,c=$g(e,t,n,r,o);return{...r,_lazyPromises:c,shouldLoad:a,unstable_shouldRevalidateArgs:s,unstable_shouldCallHandler(d){return l=!0,s?typeof d=="boolean"?Qs(r,{...s,defaultShouldRevalidate:d}):Qs(r,s):a},resolve(d){return l||a||d&&n.method==="GET"&&(r.route.lazy||r.route.loader)?qT({request:n,match:r,lazyHandlerPromise:c?.handler,lazyRoutePromise:c?.route,handlerOverride:d,scopedContext:i}):Promise.resolve({type:"data",result:void 0})}}}function ii(e,t,n,r,o,i,a,s=null){return r.map(l=>l.route.id!==o.route.id?{...l,shouldLoad:!1,unstable_shouldRevalidateArgs:s,unstable_shouldCallHandler:()=>!1,_lazyPromises:$g(e,t,n,l,i),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Tu(e,t,n,l,i,a,!0,s))}async function GT(e,t,n,r,o,i){n.some(c=>c._lazyPromises?.middleware)&&await Promise.all(n.map(c=>c._lazyPromises?.middleware));let a={request:t,params:n[0].params,context:o,matches:n},l=await e({...a,fetcherKey:r,unstable_runClientMiddleware:c=>{let d=a;return Ug(d,!1,()=>c({...d,fetcherKey:r,unstable_runClientMiddleware:()=>{throw new Error("Cannot call `unstable_runClientMiddleware()` from within an `unstable_runClientMiddleware` handler")}}),(u,h)=>({[h]:{type:"error",result:u}}))}});try{await Promise.all(n.flatMap(c=>[c._lazyPromises?.handler,c._lazyPromises?.route]))}catch{}return l}async function qT({request:e,match:t,lazyHandlerPromise:n,lazyRoutePromise:r,handlerOverride:o,scopedContext:i}){let a,s,l=Cn(e.method),c=l?"action":"loader",d=u=>{let h,p=new Promise((T,E)=>h=E);s=()=>h(),e.signal.addEventListener("abort",s);let g=T=>typeof u!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${c}" [routeId: ${t.route.id}]`)):u({request:e,params:t.params,context:i},...T!==void 0?[T]:[]),b=(async()=>{try{return{type:"data",result:await(o?o(E=>g(E)):g())}}catch(T){return{type:"error",result:T}}})();return Promise.race([b,p])};try{let u=l?t.route.action:t.route.loader;if(n||r)if(u){let h,[p]=await Promise.all([d(u).catch(g=>{h=g}),n,r]);if(h!==void 0)throw h;a=p}else{await n;let h=l?t.route.action:t.route.loader;if(h)[a]=await Promise.all([d(h),r]);else if(c==="action"){let p=new URL(e.url),g=p.pathname+p.search;throw On(405,{method:e.method,pathname:g,routeId:t.route.id})}else return{type:"data",result:void 0}}else if(u)a=await d(u);else{let h=new URL(e.url),p=h.pathname+h.search;throw On(404,{pathname:p})}}catch(u){return{type:"error",result:u}}finally{s&&e.signal.removeEventListener("abort",s)}return a}async function WT(e){let{result:t,type:n}=e;if(qg(t)){let r;try{let o=t.headers.get("Content-Type");o&&/\bapplication\/json\b/.test(o)?t.body==null?r=null:r=await t.json():r=await t.text()}catch(o){return{type:"error",error:o}}return n==="error"?{type:"error",error:new Ks(t.status,t.statusText,r),statusCode:t.status,headers:t.headers}:{type:"data",data:r,statusCode:t.status,headers:t.headers}}return n==="error"?mp(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:new Ks(t.init?.status||500,void 0,t.data),statusCode:ka(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:ka(t)?t.status:void 0}:mp(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function VT(e,t,n,r,o){let i=e.headers.get("Location");if(Ue(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!Cd.test(i)){let a=r.slice(0,r.findIndex(s=>s.route.id===n)+1);i=bu(new URL(t.url),a,o,i),e.headers.set("Location",i)}return e}function cp(e,t,n){if(Cd.test(e)){let r=e,o=r.startsWith("//")?new URL(t.protocol+r):new URL(r),i=Gn(o.pathname,n)!=null;if(o.origin===t.origin&&i)return o.pathname+o.search+o.hash}return e}function ei(e,t,n,r){let o=e.createURL(Gg(t)).toString(),i={signal:n};if(r&&Cn(r.formMethod)){let{formMethod:a,formEncType:s}=r;i.method=a.toUpperCase(),s==="application/json"?(i.headers=new Headers({"Content-Type":s}),i.body=JSON.stringify(r.json)):s==="text/plain"?i.body=r.text:s==="application/x-www-form-urlencoded"&&r.formData?i.body=xu(r.formData):i.body=r.formData}return new Request(o,i)}function xu(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function up(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function YT(e,t,n,r=!1,o=!1){let i={},a=null,s,l=!1,c={},d=n&&xn(n[1])?n[1].error:void 0;return e.forEach(u=>{if(!(u.route.id in t))return;let h=u.route.id,p=t[h];if(Ue(!co(p),"Cannot handle redirect results in processLoaderData"),xn(p)){let g=p.error;if(d!==void 0&&(g=d,d=void 0),a=a||{},o)a[h]=g;else{let b=lo(e,h);a[b.route.id]==null&&(a[b.route.id]=g)}r||(i[h]=Bg),l||(l=!0,s=ka(p.error)?p.error.status:500),p.headers&&(c[h]=p.headers)}else i[h]=p.data,p.statusCode&&p.statusCode!==200&&!l&&(s=p.statusCode),p.headers&&(c[h]=p.headers)}),d!==void 0&&n&&(a={[n[0]]:d},n[2]&&(i[n[2]]=void 0)),{loaderData:i,errors:a,statusCode:s||200,loaderHeaders:c}}function dp(e,t,n,r,o,i){let{loaderData:a,errors:s}=YT(t,n,r);return o.filter(l=>!l.matches||l.matches.some(c=>c.shouldLoad)).forEach(l=>{let{key:c,match:d,controller:u}=l,h=i[c];if(Ue(h,"Did not find corresponding fetcher result"),!(u&&u.signal.aborted))if(xn(h)){let p=lo(e.matches,d?.route.id);s&&s[p.route.id]||(s={...s,[p.route.id]:h.error}),e.fetchers.delete(c)}else if(co(h))Ue(!1,"Unhandled fetcher revalidation redirect");else{let p=Hr(h.data);e.fetchers.set(c,p)}}),{loaderData:a,errors:s}}function hp(e,t,n,r){let o=Object.entries(t).filter(([,i])=>i!==Bg).reduce((i,[a,s])=>(i[a]=s,i),{});for(let i of n){let a=i.route.id;if(!t.hasOwnProperty(a)&&e.hasOwnProperty(a)&&i.route.loader&&(o[a]=e[a]),r&&r.hasOwnProperty(a))break}return o}function pp(e){return e?xn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function lo(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function fp(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function On(e,{pathname:t,routeId:n,method:r,type:o,message:i}={}){let a="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(a="Bad Request",r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:o==="invalid-body"&&(s="Unable to encode submission body")):e===403?(a="Forbidden",s=`Route "${n}" does not match URL "${t}"`):e===404?(a="Not Found",s=`No route matches URL "${t}"`):e===405&&(a="Method Not Allowed",r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new Ks(e||500,a,new Error(s),!0)}function cs(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,o]=t[n];if(co(o))return{key:r,result:o}}}function Gg(e){let t=typeof e=="string"?Xr(e):e;return Yr({...t,hash:""})}function KT(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function QT(e){return qg(e.result)&<.has(e.result.status)}function xn(e){return e.type==="error"}function co(e){return(e&&e.type)==="redirect"}function mp(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function qg(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function XT(e){return RT.has(e.toUpperCase())}function Cn(e){return NT.has(e.toUpperCase())}function vd(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function ta(e,t){let n=typeof t=="string"?Xr(t).search:t.search;if(e[e.length-1].route.index&&vd(n||""))return e[e.length-1];let r=Og(e);return r[r.length-1]}function gp(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:i,json:a}=e;if(!(!t||!n||!r)){if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o};if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0};if(a!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:a,text:void 0}}}function vc(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function JT(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Hi(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function ZT(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Hr(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function ex(e,t){try{let n=e.sessionStorage.getItem(Fg);if(n){let r=JSON.parse(n);for(let[o,i]of Object.entries(r||{}))i&&Array.isArray(i)&&t.set(o,new Set(i||[]))}}catch{}}function tx(e,t){if(t.size>0){let n={};for(let[r,o]of t)n[r]=[...o];try{e.sessionStorage.setItem(Fg,JSON.stringify(n))}catch(r){jt(!1,`Failed to save applied view transitions in sessionStorage (${r}).`)}}}function nx(){let e,t,n=new Promise((r,o)=>{e=async i=>{r(i);try{await n}catch{}},t=async i=>{o(i);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var Io=_.createContext(null);Io.displayName="DataRouter";var Ha=_.createContext(null);Ha.displayName="DataRouterState";var Sd=_.createContext({isTransitioning:!1});Sd.displayName="ViewTransition";var Wg=_.createContext(new Map);Wg.displayName="Fetchers";var rx=_.createContext(null);rx.displayName="Await";var dr=_.createContext(null);dr.displayName="Navigation";var Il=_.createContext(null);Il.displayName="Location";var Zn=_.createContext({outlet:null,matches:[],isDataRoute:!1});Zn.displayName="Route";var Ad=_.createContext(null);Ad.displayName="RouteError";function ox(e,{relative:t}={}){Ue(Ua(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=_.useContext(dr),{hash:o,pathname:i,search:a}=za(e,{relative:t}),s=i;return n!=="/"&&(s=i==="/"?n:ur([n,i])),r.createHref({pathname:s,search:a,hash:o})}function Ua(){return _.useContext(Il)!=null}function wo(){return Ue(Ua(),"useLocation() may be used only in the context of a <Router> component."),_.useContext(Il).location}var Vg="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Yg(e){_.useContext(dr).static||_.useLayoutEffect(e)}function kd(){let{isDataRoute:e}=_.useContext(Zn);return e?bx():ix()}function ix(){Ue(Ua(),"useNavigate() may be used only in the context of a <Router> component.");let e=_.useContext(Io),{basename:t,navigator:n}=_.useContext(dr),{matches:r}=_.useContext(Zn),{pathname:o}=wo(),i=JSON.stringify(Td(r)),a=_.useRef(!1);return Yg(()=>{a.current=!0}),_.useCallback((l,c={})=>{if(jt(a.current,Vg),!a.current)return;if(typeof l=="number"){n.go(l);return}let d=xd(l,JSON.parse(i),o,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:ur([t,d.pathname])),(c.replace?n.replace:n.push)(d,c.state,c)},[t,n,i,o,e])}var ax=_.createContext(null);function sx(e){let t=_.useContext(Zn).outlet;return t&&_.createElement(ax.Provider,{value:e},t)}function No(){let{matches:e}=_.useContext(Zn),t=e[e.length-1];return t?t.params:{}}function za(e,{relative:t}={}){let{matches:n}=_.useContext(Zn),{pathname:r}=wo(),o=JSON.stringify(Td(n));return _.useMemo(()=>xd(e,JSON.parse(o),r,t==="path"),[e,o,r,t])}function lx(e,t,n,r){Ue(Ua(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=_.useContext(dr),{matches:i}=_.useContext(Zn),a=i[i.length-1],s=a?a.params:{},l=a?a.pathname:"/",c=a?a.pathnameBase:"/",d=a&&a.route;{let E=d&&d.path||"";Qg(l,!d||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${E}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
12
12
|
|
|
13
|
-
Please change the parent <Route path="${b}"> to <Route path="${b==="/"?"*":`${b}/*`}">.`)}let p=nn(),h;h=p;let f=h.pathname||"/",g=f;if(c!=="/"){let b=c.replace(/^\//,"").split("/");g="/"+f.replace(/^\//,"").split("/").slice(b.length).join("/")}let y=Ir(e,{pathname:g});return Xe(d||y!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),Xe(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),lf(y&&y.map(b=>Object.assign({},b,{params:Object.assign({},s,b.params),pathname:rr([c,o.encodeLocation?o.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?c:rr([c,o.encodeLocation?o.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),a,r,n)}function nf(){let e=cd(),t=xo(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:n},a={padding:"2px 4px",backgroundColor:n},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:a},"ErrorBoundary")," or"," ",S.createElement("code",{style:a},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},t),r?S.createElement("pre",{style:o},r):null,i)}var of=S.createElement(nf,null),af=class extends S.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?S.createElement(Kt.Provider,{value:this.props.routeContext},S.createElement(Bs.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function sf({routeContext:e,match:t,children:r}){let n=S.useContext(rn);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),S.createElement(Kt.Provider,{value:e},r)}function lf(e,t=[],r=null,n=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,a=r?.errors;if(a!=null){let l=o.findIndex(c=>c.route.id&&a?.[c.route.id]!==void 0);me(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),o=o.slice(0,Math.min(o.length,l+1))}let i=!1,s=-1;if(r)for(let l=0;l<o.length;l++){let c=o[l];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(s=l),c.route.id){let{loaderData:d,errors:p}=r,h=c.route.loader&&!d.hasOwnProperty(c.route.id)&&(!p||p[c.route.id]===void 0);if(c.route.lazy||h){i=!0,s>=0?o=o.slice(0,s+1):o=[o[0]];break}}}return o.reduceRight((l,c,d)=>{let p,h=!1,f=null,g=null;r&&(p=a&&c.route.id?a[c.route.id]:void 0,f=c.route.errorElement||of,i&&(s<0&&d===0?(ud("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,g=null):s===d&&(h=!0,g=c.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,d+1)),v=()=>{let b;return p?b=f:h?b=g:c.route.Component?b=S.createElement(c.route.Component,null):c.route.element?b=c.route.element:b=l,S.createElement(sf,{match:c,routeContext:{outlet:l,matches:y,isDataRoute:r!=null},children:b})};return r&&(c.route.ErrorBoundary||c.route.errorElement||d===0)?S.createElement(af,{location:r.location,revalidation:r.revalidation,component:f,error:p,children:v(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):v()},null)}function Fs(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function cf(e){let t=S.useContext(rn);return me(t,Fs(e)),t}function uf(e){let t=S.useContext(To);return me(t,Fs(e)),t}function df(e){let t=S.useContext(Kt);return me(t,Fs(e)),t}function zs(e){let t=df(e),r=t.matches[t.matches.length-1];return me(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function pf(){return zs("useRouteId")}function cd(){let e=S.useContext(Bs),t=uf("useRouteError"),r=zs("useRouteError");return e!==void 0?e:t.errors?.[r]}function hf(){let{router:e}=cf("useNavigate"),t=zs("useNavigate"),r=S.useRef(!1);return ld(()=>{r.current=!0}),S.useCallback(async(o,a={})=>{Xe(r.current,sd),r.current&&(typeof o=="number"?e.navigate(o):await e.navigate(o,{fromRouteId:t,...a}))},[e,t])}var ic={};function ud(e,t,r){!t&&!ic[e]&&(ic[e]=!0,Xe(!1,r))}var sc={};function lc(e,t){!e&&!sc[t]&&(sc[t]=!0,console.warn(t))}function mf(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&Xe(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:S.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&Xe(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:S.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&Xe(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:S.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var ff=["HydrateFallback","hydrateFallbackElement"],gf=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",t(r))}})}};function yf({router:e,flushSync:t}){let[r,n]=S.useState(e.state),[o,a]=S.useState(),[i,s]=S.useState({isTransitioning:!1}),[l,c]=S.useState(),[d,p]=S.useState(),[h,f]=S.useState(),g=S.useRef(new Map),y=S.useCallback((w,{deletedFetchers:k,flushSync:j,viewTransitionOpts:P})=>{w.fetchers.forEach((F,L)=>{F.data!==void 0&&g.current.set(L,F.data)}),k.forEach(F=>g.current.delete(F)),lc(j===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let B=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(lc(P==null||B,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!P||!B){t&&j?t(()=>n(w)):S.startTransition(()=>n(w));return}if(t&&j){t(()=>{d&&(l&&l.resolve(),d.skipTransition()),s({isTransitioning:!0,flushSync:!0,currentLocation:P.currentLocation,nextLocation:P.nextLocation})});let F=e.window.document.startViewTransition(()=>{t(()=>n(w))});F.finished.finally(()=>{t(()=>{c(void 0),p(void 0),a(void 0),s({isTransitioning:!1})})}),t(()=>p(F));return}d?(l&&l.resolve(),d.skipTransition(),f({state:w,currentLocation:P.currentLocation,nextLocation:P.nextLocation})):(a(w),s({isTransitioning:!0,flushSync:!1,currentLocation:P.currentLocation,nextLocation:P.nextLocation}))},[e.window,t,d,l]);S.useLayoutEffect(()=>e.subscribe(y),[e,y]),S.useEffect(()=>{i.isTransitioning&&!i.flushSync&&c(new gf)},[i]),S.useEffect(()=>{if(l&&o&&e.window){let w=o,k=l.promise,j=e.window.document.startViewTransition(async()=>{S.startTransition(()=>n(w)),await k});j.finished.finally(()=>{c(void 0),p(void 0),a(void 0),s({isTransitioning:!1})}),p(j)}},[o,l,e.window]),S.useEffect(()=>{l&&o&&r.location.key===o.location.key&&l.resolve()},[l,d,r.location,o]),S.useEffect(()=>{!i.isTransitioning&&h&&(a(h.state),s({isTransitioning:!0,flushSync:!1,currentLocation:h.currentLocation,nextLocation:h.nextLocation}),f(void 0))},[i.isTransitioning,h]);let v=S.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:w=>e.navigate(w),push:(w,k,j)=>e.navigate(w,{state:k,preventScrollReset:j?.preventScrollReset}),replace:(w,k,j)=>e.navigate(w,{replace:!0,state:k,preventScrollReset:j?.preventScrollReset})}),[e]),b=e.basename||"/",C=S.useMemo(()=>({router:e,navigator:v,static:!1,basename:b}),[e,v,b]);return S.createElement(S.Fragment,null,S.createElement(rn.Provider,{value:C},S.createElement(To.Provider,{value:r},S.createElement(id.Provider,{value:g.current},S.createElement(Ds.Provider,{value:i},S.createElement(Sf,{basename:b,location:r.location,navigationType:r.historyAction,navigator:v},S.createElement(bf,{routes:e.routes,future:e.future,state:r})))))),null)}var bf=S.memo(xf);function xf({routes:e,future:t,state:r}){return rf(e,void 0,r,t)}function vf(e){return tf(e.context)}function Sf({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:o,static:a=!1}){me(!Ro(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let i=e.replace(/^\/*/,"/"),s=S.useMemo(()=>({basename:i,navigator:o,static:a,future:{}}),[i,o,a]);typeof r=="string"&&(r=Ar(r));let{pathname:l="/",search:c="",hash:d="",state:p=null,key:h="default"}=r,f=S.useMemo(()=>{let g=Bt(l,i);return g==null?null:{location:{pathname:g,search:c,hash:d,state:p,key:h},navigationType:n}},[i,l,c,d,p,h,n]);return Xe(f!=null,`<Router basename="${i}"> is not able to match the URL "${l}${c}${d}" because it does not start with the basename, so the <Router> won't render anything.`),f==null?null:S.createElement(nr.Provider,{value:s},S.createElement(Ga.Provider,{children:t,value:f}))}var pa="get",ha="application/x-www-form-urlencoded";function Ka(e){return e!=null&&typeof e.tagName=="string"}function wf(e){return Ka(e)&&e.tagName.toLowerCase()==="button"}function Cf(e){return Ka(e)&&e.tagName.toLowerCase()==="form"}function kf(e){return Ka(e)&&e.tagName.toLowerCase()==="input"}function Pf(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function If(e,t){return e.button===0&&(!t||t==="_self")&&!Pf(e)}var ea=null;function jf(){if(ea===null)try{new FormData(document.createElement("form"),0),ea=!1}catch{ea=!0}return ea}var Ef=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ei(e){return e!=null&&!Ef.has(e)?(Xe(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ha}"`),null):e}function Tf(e,t){let r,n,o,a,i;if(Cf(e)){let s=e.getAttribute("action");n=s?Bt(s,t):null,r=e.getAttribute("method")||pa,o=Ei(e.getAttribute("enctype"))||ha,a=new FormData(e)}else if(wf(e)||kf(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||s.getAttribute("action");if(n=l?Bt(l,t):null,r=e.getAttribute("formmethod")||s.getAttribute("method")||pa,o=Ei(e.getAttribute("formenctype"))||Ei(s.getAttribute("enctype"))||ha,a=new FormData(s,e),!jf()){let{name:c,type:d,value:p}=e;if(d==="image"){let h=c?`${c}.`:"";a.append(`${h}x`,"0"),a.append(`${h}y`,"0")}else c&&a.append(c,p)}}else{if(Ka(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=pa,n=null,o=ha,i=e}return a&&o==="text/plain"&&(i=a,a=void 0),{action:n,method:r.toLowerCase(),encType:o,formData:a,body:i}}function Ws(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function Rf(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Mf(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Nf(e,t,r){let n=await Promise.all(e.map(async o=>{let a=t.routes[o.route.id];if(a){let i=await Rf(a,r);return i.links?i.links():[]}return[]}));return Lf(n.flat(1).filter(Mf).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function cc(e,t,r,n,o,a){let i=(l,c)=>r[c]?l.route.id!==r[c].route.id:!0,s=(l,c)=>r[c].pathname!==l.pathname||r[c].route.path?.endsWith("*")&&r[c].params["*"]!==l.params["*"];return a==="assets"?t.filter((l,c)=>i(l,c)||s(l,c)):a==="data"?t.filter((l,c)=>{let d=n.routes[l.route.id];if(!d||!d.hasLoader)return!1;if(i(l,c)||s(l,c))return!0;if(l.route.shouldRevalidate){let p=l.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function Af(e,t,{includeHydrateFallback:r}={}){return _f(e.map(n=>{let o=t.routes[n.route.id];if(!o)return[];let a=[o.module];return o.clientActionModule&&(a=a.concat(o.clientActionModule)),o.clientLoaderModule&&(a=a.concat(o.clientLoaderModule)),r&&o.hydrateFallbackModule&&(a=a.concat(o.hydrateFallbackModule)),o.imports&&(a=a.concat(o.imports)),a}).flat(1))}function _f(e){return[...new Set(e)]}function Of(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function Lf(e,t){let r=new Set;return new Set(t),e.reduce((n,o)=>{let a=JSON.stringify(Of(o));return r.has(a)||(r.add(a),n.push({key:a,link:o})),n},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var $f=new Set([100,101,204,205]);function Df(e,t){let r=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r.pathname==="/"?r.pathname="_root.data":t&&Bt(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}function dd(){let e=S.useContext(rn);return Ws(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Bf(){let e=S.useContext(To);return Ws(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Us=S.createContext(void 0);Us.displayName="FrameworkContext";function pd(){let e=S.useContext(Us);return Ws(e,"You must render this element inside a <HydratedRouter> element"),e}function qf(e,t){let r=S.useContext(Us),[n,o]=S.useState(!1),[a,i]=S.useState(!1),{onFocus:s,onBlur:l,onMouseEnter:c,onMouseLeave:d,onTouchStart:p}=t,h=S.useRef(null);S.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let y=b=>{b.forEach(C=>{i(C.isIntersecting)})},v=new IntersectionObserver(y,{threshold:.5});return h.current&&v.observe(h.current),()=>{v.disconnect()}}},[e]),S.useEffect(()=>{if(n){let y=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(y)}}},[n]);let f=()=>{o(!0)},g=()=>{o(!1),i(!1)};return r?e!=="intent"?[a,h,{}]:[a,h,{onFocus:Jn(s,f),onBlur:Jn(l,g),onMouseEnter:Jn(c,f),onMouseLeave:Jn(d,g),onTouchStart:Jn(p,f)}]:[!1,h,{}]}function Jn(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Ff({page:e,...t}){let{router:r}=dd(),n=S.useMemo(()=>Ir(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?S.createElement(Wf,{page:e,matches:n,...t}):null}function zf(e){let{manifest:t,routeModules:r}=pd(),[n,o]=S.useState([]);return S.useEffect(()=>{let a=!1;return Nf(e,t,r).then(i=>{a||o(i)}),()=>{a=!0}},[e,t,r]),n}function Wf({page:e,matches:t,...r}){let n=nn(),{manifest:o,routeModules:a}=pd(),{basename:i}=dd(),{loaderData:s,matches:l}=Bf(),c=S.useMemo(()=>cc(e,t,l,o,n,"data"),[e,t,l,o,n]),d=S.useMemo(()=>cc(e,t,l,o,n,"assets"),[e,t,l,o,n]),p=S.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let g=new Set,y=!1;if(t.forEach(b=>{let C=o.routes[b.route.id];!C||!C.hasLoader||(!c.some(w=>w.route.id===b.route.id)&&b.route.id in s&&a[b.route.id]?.shouldRevalidate||C.hasClientLoader?y=!0:g.add(b.route.id))}),g.size===0)return[];let v=Df(e,i);return y&&g.size>0&&v.searchParams.set("_routes",t.filter(b=>g.has(b.route.id)).map(b=>b.route.id).join(",")),[v.pathname+v.search]},[i,s,n,o,c,t,e,a]),h=S.useMemo(()=>Af(d,o),[d,o]),f=zf(d);return S.createElement(S.Fragment,null,p.map(g=>S.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...r})),h.map(g=>S.createElement("link",{key:g,rel:"modulepreload",href:g,...r})),f.map(({key:g,link:y})=>S.createElement("link",{key:g,...y})))}function Uf(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var hd=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{hd&&(window.__reactRouterVersion="7.6.2")}catch{}function Hf(e,t){return Nm({basename:t?.basename,unstable_getContext:t?.unstable_getContext,future:t?.future,history:Zh({window:t?.window}),hydrationData:Vf(),routes:e,mapRouteProperties:mf,hydrationRouteProperties:ff,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window}).initialize()}function Vf(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:Gf(e.errors)}),e}function Gf(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,o]of t)if(o&&o.__type==="RouteErrorResponse")r[n]=new ka(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let a=window[o.__subType];if(typeof a=="function")try{let i=new a(o.message);i.stack="",r[n]=i}catch{}}if(r[n]==null){let a=new Error(o.message);a.stack="",r[n]=a}}else r[n]=o;return r}var md=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,fd=S.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:o,reloadDocument:a,replace:i,state:s,target:l,to:c,preventScrollReset:d,viewTransition:p,...h},f){let{basename:g}=S.useContext(nr),y=typeof c=="string"&&md.test(c),v,b=!1;if(typeof c=="string"&&y&&(v=c,hd))try{let L=new URL(window.location.href),m=c.startsWith("//")?new URL(L.protocol+c):new URL(c),T=Bt(m.pathname,g);m.origin===L.origin&&T!=null?c=T+m.search+m.hash:b=!0}catch{Xe(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let C=Jm(c,{relative:o}),[w,k,j]=qf(n,h),P=Xf(c,{replace:i,state:s,target:l,preventScrollReset:d,relative:o,viewTransition:p});function B(L){t&&t(L),L.defaultPrevented||P(L)}let F=S.createElement("a",{...h,...j,href:v||C,onClick:b||a?t:B,ref:Uf(f,k),target:l,"data-discover":!y&&r==="render"?"true":void 0});return w&&!y?S.createElement(S.Fragment,null,F,S.createElement(Ff,{page:C})):F});fd.displayName="Link";var Kf=S.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:o=!1,style:a,to:i,viewTransition:s,children:l,...c},d){let p=Mo(i,{relative:c.relative}),h=nn(),f=S.useContext(To),{navigator:g,basename:y}=S.useContext(nr),v=f!=null&&rg(p)&&s===!0,b=g.encodeLocation?g.encodeLocation(p).pathname:p.pathname,C=h.pathname,w=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;r||(C=C.toLowerCase(),w=w?w.toLowerCase():null,b=b.toLowerCase()),w&&y&&(w=Bt(w,y)||w);const k=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let j=C===b||!o&&C.startsWith(b)&&C.charAt(k)==="/",P=w!=null&&(w===b||!o&&w.startsWith(b)&&w.charAt(b.length)==="/"),B={isActive:j,isPending:P,isTransitioning:v},F=j?t:void 0,L;typeof n=="function"?L=n(B):L=[n,j?"active":null,P?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let m=typeof a=="function"?a(B):a;return S.createElement(fd,{...c,"aria-current":F,className:L,ref:d,style:m,to:i,viewTransition:s},typeof l=="function"?l(B):l)});Kf.displayName="NavLink";var Qf=S.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:o,state:a,method:i=pa,action:s,onSubmit:l,relative:c,preventScrollReset:d,viewTransition:p,...h},f)=>{let g=eg(),y=tg(s,{relative:c}),v=i.toLowerCase()==="get"?"get":"post",b=typeof s=="string"&&md.test(s),C=w=>{if(l&&l(w),w.defaultPrevented)return;w.preventDefault();let k=w.nativeEvent.submitter,j=k?.getAttribute("formmethod")||i;g(k||w.currentTarget,{fetcherKey:t,method:j,navigate:r,replace:o,state:a,relative:c,preventScrollReset:d,viewTransition:p})};return S.createElement("form",{ref:f,method:v,action:y,onSubmit:n?l:C,...h,"data-discover":!b&&e==="render"?"true":void 0})});Qf.displayName="Form";function Yf(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function gd(e){let t=S.useContext(rn);return me(t,Yf(e)),t}function Xf(e,{target:t,replace:r,state:n,preventScrollReset:o,relative:a,viewTransition:i}={}){let s=qs(),l=nn(),c=Mo(e,{relative:a});return S.useCallback(d=>{if(If(d,t)){d.preventDefault();let p=r!==void 0?r:Rr(l)===Rr(c);s(e,{replace:p,state:n,preventScrollReset:o,relative:a,viewTransition:i})}},[l,s,c,r,n,t,e,o,a,i])}var Jf=0,Zf=()=>`__${String(++Jf)}__`;function eg(){let{router:e}=gd("useSubmit"),{basename:t}=S.useContext(nr),r=pf();return S.useCallback(async(n,o={})=>{let{action:a,method:i,encType:s,formData:l,body:c}=Tf(n,t);if(o.navigate===!1){let d=o.fetcherKey||Zf();await e.fetch(d,r,o.action||a,{preventScrollReset:o.preventScrollReset,formData:l,body:c,formMethod:o.method||i,formEncType:o.encType||s,flushSync:o.flushSync})}else await e.navigate(o.action||a,{preventScrollReset:o.preventScrollReset,formData:l,body:c,formMethod:o.method||i,formEncType:o.encType||s,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})},[e,t,r])}function tg(e,{relative:t}={}){let{basename:r}=S.useContext(nr),n=S.useContext(Kt);me(n,"useFormAction must be used inside a RouteContext");let[o]=n.matches.slice(-1),a={...Mo(e||".",{relative:t})},i=nn();if(e==null){a.search=i.search;let s=new URLSearchParams(a.search),l=s.getAll("index");if(l.some(d=>d==="")){s.delete("index"),l.filter(p=>p).forEach(p=>s.append("index",p));let d=s.toString();a.search=d?`?${d}`:""}}return(!e||e===".")&&o.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(a.pathname=a.pathname==="/"?r:rr([r,a.pathname])),Rr(a)}function rg(e,t={}){let r=S.useContext(Ds);me(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=gd("useViewTransitionState"),o=Mo(e,{relative:t.relative});if(!r.isTransitioning)return!1;let a=Bt(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=Bt(r.nextLocation.pathname,n)||r.nextLocation.pathname;return Ca(o.pathname,i)!=null||Ca(o.pathname,a)!=null}[...$f];/**
|
|
13
|
+
Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let u=wo(),h;h=u;let p=h.pathname||"/",g=p;if(c!=="/"){let E=c.replace(/^\//,"").split("/");g="/"+p.replace(/^\//,"").split("/").slice(E.length).join("/")}let b=$r(e,{pathname:g});return jt(d||b!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),jt(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),px(b&&b.map(E=>Object.assign({},E,{params:Object.assign({},s,E.params),pathname:ur([c,o.encodeLocation?o.encodeLocation(E.pathname).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?c:ur([c,o.encodeLocation?o.encodeLocation(E.pathnameBase).pathname:E.pathnameBase])})),i,n,r)}function cx(){let e=Kg(),t=ka(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=_.createElement(_.Fragment,null,_.createElement("p",null,"💿 Hey developer 👋"),_.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",_.createElement("code",{style:i},"ErrorBoundary")," or"," ",_.createElement("code",{style:i},"errorElement")," prop on your route.")),_.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},t),n?_.createElement("pre",{style:o},n):null,a)}var ux=_.createElement(cx,null),dx=class extends _.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?_.createElement(Zn.Provider,{value:this.props.routeContext},_.createElement(Ad.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function hx({routeContext:e,match:t,children:n}){let r=_.useContext(Io);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),_.createElement(Zn.Provider,{value:e},n)}function px(e,t=[],n=null,r=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,i=n?.errors;if(i!=null){let l=o.findIndex(c=>c.route.id&&i?.[c.route.id]!==void 0);Ue(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,l+1))}let a=!1,s=-1;if(n)for(let l=0;l<o.length;l++){let c=o[l];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(s=l),c.route.id){let{loaderData:d,errors:u}=n,h=c.route.loader&&!d.hasOwnProperty(c.route.id)&&(!u||u[c.route.id]===void 0);if(c.route.lazy||h){a=!0,s>=0?o=o.slice(0,s+1):o=[o[0]];break}}}return o.reduceRight((l,c,d)=>{let u,h=!1,p=null,g=null;n&&(u=i&&c.route.id?i[c.route.id]:void 0,p=c.route.errorElement||ux,a&&(s<0&&d===0?(Qg("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,g=null):s===d&&(h=!0,g=c.route.hydrateFallbackElement||null)));let b=t.concat(o.slice(0,d+1)),T=()=>{let E;return u?E=p:h?E=g:c.route.Component?E=_.createElement(c.route.Component,null):c.route.element?E=c.route.element:E=l,_.createElement(hx,{match:c,routeContext:{outlet:l,matches:b,isDataRoute:n!=null},children:E})};return n&&(c.route.ErrorBoundary||c.route.errorElement||d===0)?_.createElement(dx,{location:n.location,revalidation:n.revalidation,component:p,error:u,children:T(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):T()},null)}function _d(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function fx(e){let t=_.useContext(Io);return Ue(t,_d(e)),t}function mx(e){let t=_.useContext(Ha);return Ue(t,_d(e)),t}function gx(e){let t=_.useContext(Zn);return Ue(t,_d(e)),t}function Dd(e){let t=gx(e),n=t.matches[t.matches.length-1];return Ue(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function yx(){return Dd("useRouteId")}function Kg(){let e=_.useContext(Ad),t=mx("useRouteError"),n=Dd("useRouteError");return e!==void 0?e:t.errors?.[n]}function bx(){let{router:e}=fx("useNavigate"),t=Dd("useNavigate"),n=_.useRef(!1);return Yg(()=>{n.current=!0}),_.useCallback(async(o,i={})=>{jt(n.current,Vg),n.current&&(typeof o=="number"?e.navigate(o):await e.navigate(o,{fromRouteId:t,...i}))},[e,t])}var yp={};function Qg(e,t,n){!t&&!yp[e]&&(yp[e]=!0,jt(!1,n))}var bp={};function Ep(e,t){!e&&!bp[t]&&(bp[t]=!0,console.warn(t))}function Ex(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&jt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:_.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&jt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:_.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&jt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:_.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var Tx=["HydrateFallback","hydrateFallbackElement"],xx=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",e(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",t(n))}})}};function Cx({router:e,flushSync:t}){let[n,r]=_.useState(e.state),[o,i]=_.useState(),[a,s]=_.useState({isTransitioning:!1}),[l,c]=_.useState(),[d,u]=_.useState(),[h,p]=_.useState(),g=_.useRef(new Map),b=_.useCallback((x,{deletedFetchers:k,flushSync:w,viewTransitionOpts:S})=>{x.fetchers.forEach((W,U)=>{W.data!==void 0&&g.current.set(U,W.data)}),k.forEach(W=>g.current.delete(W)),Ep(w===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let B=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(Ep(S==null||B,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!S||!B){t&&w?t(()=>r(x)):_.startTransition(()=>r(x));return}if(t&&w){t(()=>{d&&(l&&l.resolve(),d.skipTransition()),s({isTransitioning:!0,flushSync:!0,currentLocation:S.currentLocation,nextLocation:S.nextLocation})});let W=e.window.document.startViewTransition(()=>{t(()=>r(x))});W.finished.finally(()=>{t(()=>{c(void 0),u(void 0),i(void 0),s({isTransitioning:!1})})}),t(()=>u(W));return}d?(l&&l.resolve(),d.skipTransition(),p({state:x,currentLocation:S.currentLocation,nextLocation:S.nextLocation})):(i(x),s({isTransitioning:!0,flushSync:!1,currentLocation:S.currentLocation,nextLocation:S.nextLocation}))},[e.window,t,d,l]);_.useLayoutEffect(()=>e.subscribe(b),[e,b]),_.useEffect(()=>{a.isTransitioning&&!a.flushSync&&c(new xx)},[a]),_.useEffect(()=>{if(l&&o&&e.window){let x=o,k=l.promise,w=e.window.document.startViewTransition(async()=>{_.startTransition(()=>r(x)),await k});w.finished.finally(()=>{c(void 0),u(void 0),i(void 0),s({isTransitioning:!1})}),u(w)}},[o,l,e.window]),_.useEffect(()=>{l&&o&&n.location.key===o.location.key&&l.resolve()},[l,d,n.location,o]),_.useEffect(()=>{!a.isTransitioning&&h&&(i(h.state),s({isTransitioning:!0,flushSync:!1,currentLocation:h.currentLocation,nextLocation:h.nextLocation}),p(void 0))},[a.isTransitioning,h]);let T=_.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:x=>e.navigate(x),push:(x,k,w)=>e.navigate(x,{state:k,preventScrollReset:w?.preventScrollReset}),replace:(x,k,w)=>e.navigate(x,{replace:!0,state:k,preventScrollReset:w?.preventScrollReset})}),[e]),E=e.basename||"/",C=_.useMemo(()=>({router:e,navigator:T,static:!1,basename:E}),[e,T,E]);return _.createElement(_.Fragment,null,_.createElement(Io.Provider,{value:C},_.createElement(Ha.Provider,{value:n},_.createElement(Wg.Provider,{value:g.current},_.createElement(Sd.Provider,{value:a},_.createElement(kx,{basename:E,location:n.location,navigationType:n.historyAction,navigator:T},_.createElement(vx,{routes:e.routes,future:e.future,state:n})))))),null)}var vx=_.memo(Sx);function Sx({routes:e,future:t,state:n}){return lx(e,void 0,n,t)}function Ax(e){return sx(e.context)}function kx({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:i=!1}){Ue(!Ua(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let a=e.replace(/^\/*/,"/"),s=_.useMemo(()=>({basename:a,navigator:o,static:i,future:{}}),[a,o,i]);typeof n=="string"&&(n=Xr(n));let{pathname:l="/",search:c="",hash:d="",state:u=null,key:h="default"}=n,p=_.useMemo(()=>{let g=Gn(l,a);return g==null?null:{location:{pathname:g,search:c,hash:d,state:u,key:h},navigationType:r}},[a,l,c,d,u,h,r]);return jt(p!=null,`<Router basename="${a}"> is not able to match the URL "${l}${c}${d}" because it does not start with the basename, so the <Router> won't render anything.`),p==null?null:_.createElement(dr.Provider,{value:s},_.createElement(Il.Provider,{children:t,value:p}))}var ws="get",Ns="application/x-www-form-urlencoded";function wl(e){return e!=null&&typeof e.tagName=="string"}function _x(e){return wl(e)&&e.tagName.toLowerCase()==="button"}function Dx(e){return wl(e)&&e.tagName.toLowerCase()==="form"}function Ix(e){return wl(e)&&e.tagName.toLowerCase()==="input"}function wx(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Nx(e,t){return e.button===0&&(!t||t==="_self")&&!wx(e)}var us=null;function Px(){if(us===null)try{new FormData(document.createElement("form"),0),us=!1}catch{us=!0}return us}var Rx=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Sc(e){return e!=null&&!Rx.has(e)?(jt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ns}"`),null):e}function Lx(e,t){let n,r,o,i,a;if(Dx(e)){let s=e.getAttribute("action");r=s?Gn(s,t):null,n=e.getAttribute("method")||ws,o=Sc(e.getAttribute("enctype"))||Ns,i=new FormData(e)}else if(_x(e)||Ix(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||s.getAttribute("action");if(r=l?Gn(l,t):null,n=e.getAttribute("formmethod")||s.getAttribute("method")||ws,o=Sc(e.getAttribute("formenctype"))||Sc(s.getAttribute("enctype"))||Ns,i=new FormData(s,e),!Px()){let{name:c,type:d,value:u}=e;if(d==="image"){let h=c?`${c}.`:"";i.append(`${h}x`,"0"),i.append(`${h}y`,"0")}else c&&i.append(c,u)}}else{if(wl(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=ws,r=null,o=Ns,a=e}return i&&o==="text/plain"&&(a=i,i=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:i,body:a}}function Id(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function Ox(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Mx(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Fx(e,t,n){let r=await Promise.all(e.map(async o=>{let i=t.routes[o.route.id];if(i){let a=await Ox(i,n);return a.links?a.links():[]}return[]}));return Ux(r.flat(1).filter(Mx).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Tp(e,t,n,r,o,i){let a=(l,c)=>n[c]?l.route.id!==n[c].route.id:!0,s=(l,c)=>n[c].pathname!==l.pathname||n[c].route.path?.endsWith("*")&&n[c].params["*"]!==l.params["*"];return i==="assets"?t.filter((l,c)=>a(l,c)||s(l,c)):i==="data"?t.filter((l,c)=>{let d=r.routes[l.route.id];if(!d||!d.hasLoader)return!1;if(a(l,c)||s(l,c))return!0;if(l.route.shouldRevalidate){let u=l.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof u=="boolean")return u}return!0}):[]}function Bx(e,t,{includeHydrateFallback:n}={}){return jx(e.map(r=>{let o=t.routes[r.route.id];if(!o)return[];let i=[o.module];return o.clientActionModule&&(i=i.concat(o.clientActionModule)),o.clientLoaderModule&&(i=i.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(i=i.concat(o.hydrateFallbackModule)),o.imports&&(i=i.concat(o.imports)),i}).flat(1))}function jx(e){return[...new Set(e)]}function Hx(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Ux(e,t){let n=new Set;return new Set(t),e.reduce((r,o)=>{let i=JSON.stringify(Hx(o));return n.has(i)||(n.add(i),r.push({key:i,link:o})),r},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var zx=new Set([100,101,204,205]);function $x(e,t){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n.pathname==="/"?n.pathname="_root.data":t&&Gn(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.data`:n.pathname=`${n.pathname.replace(/\/$/,"")}.data`,n}function Xg(){let e=_.useContext(Io);return Id(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Gx(){let e=_.useContext(Ha);return Id(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var wd=_.createContext(void 0);wd.displayName="FrameworkContext";function Jg(){let e=_.useContext(wd);return Id(e,"You must render this element inside a <HydratedRouter> element"),e}function qx(e,t){let n=_.useContext(wd),[r,o]=_.useState(!1),[i,a]=_.useState(!1),{onFocus:s,onBlur:l,onMouseEnter:c,onMouseLeave:d,onTouchStart:u}=t,h=_.useRef(null);_.useEffect(()=>{if(e==="render"&&a(!0),e==="viewport"){let b=E=>{E.forEach(C=>{a(C.isIntersecting)})},T=new IntersectionObserver(b,{threshold:.5});return h.current&&T.observe(h.current),()=>{T.disconnect()}}},[e]),_.useEffect(()=>{if(r){let b=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(b)}}},[r]);let p=()=>{o(!0)},g=()=>{o(!1),a(!1)};return n?e!=="intent"?[i,h,{}]:[i,h,{onFocus:Ui(s,p),onBlur:Ui(l,g),onMouseEnter:Ui(c,p),onMouseLeave:Ui(d,g),onTouchStart:Ui(u,p)}]:[!1,h,{}]}function Ui(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Wx({page:e,...t}){let{router:n}=Xg(),r=_.useMemo(()=>$r(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?_.createElement(Yx,{page:e,matches:r,...t}):null}function Vx(e){let{manifest:t,routeModules:n}=Jg(),[r,o]=_.useState([]);return _.useEffect(()=>{let i=!1;return Fx(e,t,n).then(a=>{i||o(a)}),()=>{i=!0}},[e,t,n]),r}function Yx({page:e,matches:t,...n}){let r=wo(),{manifest:o,routeModules:i}=Jg(),{basename:a}=Xg(),{loaderData:s,matches:l}=Gx(),c=_.useMemo(()=>Tp(e,t,l,o,r,"data"),[e,t,l,o,r]),d=_.useMemo(()=>Tp(e,t,l,o,r,"assets"),[e,t,l,o,r]),u=_.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let g=new Set,b=!1;if(t.forEach(E=>{let C=o.routes[E.route.id];!C||!C.hasLoader||(!c.some(x=>x.route.id===E.route.id)&&E.route.id in s&&i[E.route.id]?.shouldRevalidate||C.hasClientLoader?b=!0:g.add(E.route.id))}),g.size===0)return[];let T=$x(e,a);return b&&g.size>0&&T.searchParams.set("_routes",t.filter(E=>g.has(E.route.id)).map(E=>E.route.id).join(",")),[T.pathname+T.search]},[a,s,r,o,c,t,e,i]),h=_.useMemo(()=>Bx(d,o),[d,o]),p=Vx(d);return _.createElement(_.Fragment,null,u.map(g=>_.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...n})),h.map(g=>_.createElement("link",{key:g,rel:"modulepreload",href:g,...n})),p.map(({key:g,link:b})=>_.createElement("link",{key:g,...b})))}function Kx(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var Zg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Zg&&(window.__reactRouterVersion="7.6.2")}catch{}function Qx(e,t){return BT({basename:t?.basename,unstable_getContext:t?.unstable_getContext,future:t?.future,history:iT({window:t?.window}),hydrationData:Xx(),routes:e,mapRouteProperties:Ex,hydrationRouteProperties:Tx,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window}).initialize()}function Xx(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:Jx(e.errors)}),e}function Jx(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,o]of t)if(o&&o.__type==="RouteErrorResponse")n[r]=new Ks(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let i=window[o.__subType];if(typeof i=="function")try{let a=new i(o.message);a.stack="",n[r]=a}catch{}}if(n[r]==null){let i=new Error(o.message);i.stack="",n[r]=i}}else n[r]=o;return n}var e0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,t0=_.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:o,reloadDocument:i,replace:a,state:s,target:l,to:c,preventScrollReset:d,viewTransition:u,...h},p){let{basename:g}=_.useContext(dr),b=typeof c=="string"&&e0.test(c),T,E=!1;if(typeof c=="string"&&b&&(T=c,Zg))try{let U=new URL(window.location.href),y=c.startsWith("//")?new URL(U.protocol+c):new URL(c),R=Gn(y.pathname,g);y.origin===U.origin&&R!=null?c=R+y.search+y.hash:E=!0}catch{jt(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let C=ox(c,{relative:o}),[x,k,w]=qx(r,h),S=nC(c,{replace:a,state:s,target:l,preventScrollReset:d,relative:o,viewTransition:u});function B(U){t&&t(U),U.defaultPrevented||S(U)}let W=_.createElement("a",{...h,...w,href:T||C,onClick:E||i?t:B,ref:Kx(p,k),target:l,"data-discover":!b&&n==="render"?"true":void 0});return x&&!b?_.createElement(_.Fragment,null,W,_.createElement(Wx,{page:C})):W});t0.displayName="Link";var Zx=_.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:o=!1,style:i,to:a,viewTransition:s,children:l,...c},d){let u=za(a,{relative:c.relative}),h=wo(),p=_.useContext(Ha),{navigator:g,basename:b}=_.useContext(dr),T=p!=null&&sC(u)&&s===!0,E=g.encodeLocation?g.encodeLocation(u).pathname:u.pathname,C=h.pathname,x=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;n||(C=C.toLowerCase(),x=x?x.toLowerCase():null,E=E.toLowerCase()),x&&b&&(x=Gn(x,b)||x);const k=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let w=C===E||!o&&C.startsWith(E)&&C.charAt(k)==="/",S=x!=null&&(x===E||!o&&x.startsWith(E)&&x.charAt(E.length)==="/"),B={isActive:w,isPending:S,isTransitioning:T},W=w?t:void 0,U;typeof r=="function"?U=r(B):U=[r,w?"active":null,S?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let y=typeof i=="function"?i(B):i;return _.createElement(t0,{...c,"aria-current":W,className:U,ref:d,style:y,to:a,viewTransition:s},typeof l=="function"?l(B):l)});Zx.displayName="NavLink";var eC=_.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:i,method:a=ws,action:s,onSubmit:l,relative:c,preventScrollReset:d,viewTransition:u,...h},p)=>{let g=iC(),b=aC(s,{relative:c}),T=a.toLowerCase()==="get"?"get":"post",E=typeof s=="string"&&e0.test(s),C=x=>{if(l&&l(x),x.defaultPrevented)return;x.preventDefault();let k=x.nativeEvent.submitter,w=k?.getAttribute("formmethod")||a;g(k||x.currentTarget,{fetcherKey:t,method:w,navigate:n,replace:o,state:i,relative:c,preventScrollReset:d,viewTransition:u})};return _.createElement("form",{ref:p,method:T,action:b,onSubmit:r?l:C,...h,"data-discover":!E&&e==="render"?"true":void 0})});eC.displayName="Form";function tC(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function n0(e){let t=_.useContext(Io);return Ue(t,tC(e)),t}function nC(e,{target:t,replace:n,state:r,preventScrollReset:o,relative:i,viewTransition:a}={}){let s=kd(),l=wo(),c=za(e,{relative:i});return _.useCallback(d=>{if(Nx(d,t)){d.preventDefault();let u=n!==void 0?n:Yr(l)===Yr(c);s(e,{replace:u,state:r,preventScrollReset:o,relative:i,viewTransition:a})}},[l,s,c,n,r,t,e,o,i,a])}var rC=0,oC=()=>`__${String(++rC)}__`;function iC(){let{router:e}=n0("useSubmit"),{basename:t}=_.useContext(dr),n=yx();return _.useCallback(async(r,o={})=>{let{action:i,method:a,encType:s,formData:l,body:c}=Lx(r,t);if(o.navigate===!1){let d=o.fetcherKey||oC();await e.fetch(d,n,o.action||i,{preventScrollReset:o.preventScrollReset,formData:l,body:c,formMethod:o.method||a,formEncType:o.encType||s,flushSync:o.flushSync})}else await e.navigate(o.action||i,{preventScrollReset:o.preventScrollReset,formData:l,body:c,formMethod:o.method||a,formEncType:o.encType||s,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[e,t,n])}function aC(e,{relative:t}={}){let{basename:n}=_.useContext(dr),r=_.useContext(Zn);Ue(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),i={...za(e||".",{relative:t})},a=wo();if(e==null){i.search=a.search;let s=new URLSearchParams(i.search),l=s.getAll("index");if(l.some(d=>d==="")){s.delete("index"),l.filter(u=>u).forEach(u=>s.append("index",u));let d=s.toString();i.search=d?`?${d}`:""}}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:ur([n,i.pathname])),Yr(i)}function sC(e,t={}){let n=_.useContext(Sd);Ue(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=n0("useViewTransitionState"),o=za(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=Gn(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=Gn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ys(o.pathname,a)!=null||Ys(o.pathname,i)!=null}[...zx];/**
|
|
14
14
|
* react-router v7.6.2
|
|
15
15
|
*
|
|
16
16
|
* Copyright (c) Remix Software Inc.
|
|
@@ -19,7 +19,7 @@ Please change the parent <Route path="${b}"> to <Route path="${b==="/"?"*":`${b}
|
|
|
19
19
|
* LICENSE.md file in the root directory of this source tree.
|
|
20
20
|
*
|
|
21
21
|
* @license MIT
|
|
22
|
-
*/function
|
|
22
|
+
*/function lC(e){return _.createElement(Cx,{flushSync:tT.flushSync,...e})}const xp=e=>e,cC=()=>{let e=xp;return{configure(t){e=t},generate(t){return e(t)},reset(){e=xp}}},uC=cC();function xo(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function Jn(e){if(typeof e!="string")throw new Error(xo(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Nl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Cp={exports:{}},Ac,vp;function dC(){if(vp)return Ac;vp=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ac=e,Ac}var kc,Sp;function hC(){if(Sp)return kc;Sp=1;var e=dC();function t(){}function n(){}return n.resetWarningCache=t,kc=function(){function r(a,s,l,c,d,u){if(u!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},kc}var Ap;function pC(){return Ap||(Ap=1,Cp.exports=hC()()),Cp.exports}var fC=pC();const kp=Nl(fC);function r0(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=r0(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function kt(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=r0(e))&&(r&&(r+=" "),r+=t);return r}function $a(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let a="",s=!0;for(let l=0;l<i.length;l+=1){const c=i[l];c&&(a+=(s===!0?"":" ")+t(c),s=!1,n&&n[c]&&(a+=" "+n[c]))}r[o]=a}return r}var _p={exports:{}},Xe={};/**
|
|
23
23
|
* @license React
|
|
24
24
|
* react-is.production.js
|
|
25
25
|
*
|
|
@@ -27,16 +27,16 @@ Please change the parent <Route path="${b}"> to <Route path="${b==="/"?"*":`${b}
|
|
|
27
27
|
*
|
|
28
28
|
* This source code is licensed under the MIT license found in the
|
|
29
29
|
* LICENSE file in the root directory of this source tree.
|
|
30
|
-
*/var yc;function dg(){if(yc)return xe;yc=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),i=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),f=Symbol.for("react.client.reference");function g(y){if(typeof y=="object"&&y!==null){var v=y.$$typeof;switch(v){case e:switch(y=y.type,y){case r:case o:case n:case l:case c:case h:return y;default:switch(y=y&&y.$$typeof,y){case i:case s:case p:case d:return y;case a:return y;default:return v}}case t:return v}}}return xe.ContextConsumer=a,xe.ContextProvider=i,xe.Element=e,xe.ForwardRef=s,xe.Fragment=r,xe.Lazy=p,xe.Memo=d,xe.Portal=t,xe.Profiler=o,xe.StrictMode=n,xe.Suspense=l,xe.SuspenseList=c,xe.isContextConsumer=function(y){return g(y)===a},xe.isContextProvider=function(y){return g(y)===i},xe.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===e},xe.isForwardRef=function(y){return g(y)===s},xe.isFragment=function(y){return g(y)===r},xe.isLazy=function(y){return g(y)===p},xe.isMemo=function(y){return g(y)===d},xe.isPortal=function(y){return g(y)===t},xe.isProfiler=function(y){return g(y)===o},xe.isStrictMode=function(y){return g(y)===n},xe.isSuspense=function(y){return g(y)===l},xe.isSuspenseList=function(y){return g(y)===c},xe.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===r||y===o||y===n||y===l||y===c||typeof y=="object"&&y!==null&&(y.$$typeof===p||y.$$typeof===d||y.$$typeof===i||y.$$typeof===a||y.$$typeof===s||y.$$typeof===f||y.getModuleId!==void 0)},xe.typeOf=g,xe}var bc;function pg(){return bc||(bc=1,gc.exports=dg()),gc.exports}var bd=pg();function dr(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function xd(e){if(S.isValidElement(e)||bd.isValidElementType(e)||!dr(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=xd(e[r])}),t}function wt(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return dr(e)&&dr(t)&&Object.keys(t).forEach(o=>{S.isValidElement(t[o])||bd.isValidElementType(t[o])?n[o]=t[o]:dr(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&dr(e[o])?n[o]=wt(e[o],t[o],r):r.clone?n[o]=dr(t[o])?xd(t[o]):t[o]:n[o]=t[o]}),n}function po(e,t){return t?wt(e,t,{clone:!1}):e}function hg(e,t){if(!e.containerQueries)return t;const r=Object.keys(t).filter(n=>n.startsWith("@container")).sort((n,o)=>{const a=/min-width:\s*([0-9.]+)/;return+(n.match(a)?.[1]||0)-+(o.match(a)?.[1]||0)});return r.length?r.reduce((n,o)=>{const a=t[o];return delete n[o],n[o]=a,n},{...t}):t}function mg(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function fg(e,t){const r=t.match(/^@([^/]+)?\/?(.+)?$/);if(!r)return null;const[,n,o]=r,a=Number.isNaN(+n)?n||0:+n;return e.containerQueries(o).up(a)}function gg(e){const t=(a,i)=>a.replace("@media",i?`@container ${i}`:"@container");function r(a,i){a.up=(...s)=>t(e.breakpoints.up(...s),i),a.down=(...s)=>t(e.breakpoints.down(...s),i),a.between=(...s)=>t(e.breakpoints.between(...s),i),a.only=(...s)=>t(e.breakpoints.only(...s),i),a.not=(...s)=>{const l=t(e.breakpoints.not(...s),i);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const n={},o=a=>(r(n,a),n);return r(o),{...e,containerQueries:o}}const Qa={xs:0,sm:600,md:900,lg:1200,xl:1536},xc={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Qa[e]}px)`},yg={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:Qa[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function gr(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const o=n.breakpoints||xc;return t.reduce((a,i,s)=>(a[o.up(o.keys[s])]=r(t[s]),a),{})}if(typeof t=="object"){const o=n.breakpoints||xc;return Object.keys(t).reduce((a,i)=>{if(mg(o.keys,i)){const s=fg(n.containerQueries?n:yg,i);s&&(a[s]=r(t[i],i))}else if(Object.keys(o.values||Qa).includes(i)){const s=o.up(i);a[s]=r(t[i],i)}else{const s=i;a[s]=t[s]}return a},{})}return r(t)}function bg(e={}){return e.keys?.reduce((t,r)=>{const n=e.up(r);return t[n]={},t},{})||{}}function xg(e,t){return e.reduce((r,n)=>{const o=r[n];return(!o||Object.keys(o).length===0)&&delete r[n],r},t)}function Ya(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((o,a)=>o&&o[a]?o[a]:null,e);if(n!=null)return n}return t.split(".").reduce((n,o)=>n&&n[o]!=null?n[o]:null,e)}function Ia(e,t,r,n=r){let o;return typeof e=="function"?o=e(r):Array.isArray(e)?o=e[r]||n:o=Ya(e,r)||n,t&&(o=t(o,n,e)),o}function ze(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:o}=e,a=i=>{if(i[t]==null)return null;const s=i[t],l=i.theme,c=Ya(l,n)||{};return gr(i,s,d=>{let p=Ia(c,o,d);return d===p&&typeof d=="string"&&(p=Ia(c,o,`${t}${d==="default"?"":Gt(d)}`,d)),r===!1?p:{[r]:p}})};return a.propTypes={},a.filterProps=[t],a}function vg(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const Sg={m:"margin",p:"padding"},wg={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},vc={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Cg=vg(e=>{if(e.length>2)if(vc[e])e=vc[e];else return[e];const[t,r]=e.split(""),n=Sg[t],o=wg[r]||"";return Array.isArray(o)?o.map(a=>n+a):[n+o]}),Hs=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Vs=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Hs,...Vs];function Ao(e,t,r,n){const o=Ya(e,t,!0)??r;return typeof o=="number"||typeof o=="string"?a=>typeof a=="string"?a:typeof o=="string"?o.startsWith("var(")&&a===0?0:o.startsWith("var(")&&a===1?o:`calc(${a} * ${o})`:o*a:Array.isArray(o)?a=>{if(typeof a=="string")return a;const i=Math.abs(a),s=o[i];return a>=0?s:typeof s=="number"?-s:typeof s=="string"&&s.startsWith("var(")?`calc(-1 * ${s})`:`-${s}`}:typeof o=="function"?o:()=>{}}function Gs(e){return Ao(e,"spacing",8)}function _o(e,t){return typeof t=="string"||t==null?t:e(t)}function kg(e,t){return r=>e.reduce((n,o)=>(n[o]=_o(t,r),n),{})}function Pg(e,t,r,n){if(!t.includes(r))return null;const o=Cg(r),a=kg(o,n),i=e[r];return gr(e,i,a)}function vd(e,t){const r=Gs(e.theme);return Object.keys(e).map(n=>Pg(e,t,n,r)).reduce(po,{})}function Oe(e){return vd(e,Hs)}Oe.propTypes={};Oe.filterProps=Hs;function Le(e){return vd(e,Vs)}Le.propTypes={};Le.filterProps=Vs;function Xa(...e){const t=e.reduce((n,o)=>(o.filterProps.forEach(a=>{n[a]=o}),n),{}),r=n=>Object.keys(n).reduce((o,a)=>t[a]?po(o,t[a](n)):o,{});return r.propTypes={},r.filterProps=e.reduce((n,o)=>n.concat(o.filterProps),[]),r}function Ot(e){return typeof e!="number"?e:`${e}px solid`}function qt(e,t){return ze({prop:e,themeKey:"borders",transform:t})}const Ig=qt("border",Ot),jg=qt("borderTop",Ot),Eg=qt("borderRight",Ot),Tg=qt("borderBottom",Ot),Rg=qt("borderLeft",Ot),Mg=qt("borderColor"),Ng=qt("borderTopColor"),Ag=qt("borderRightColor"),_g=qt("borderBottomColor"),Og=qt("borderLeftColor"),Lg=qt("outline",Ot),$g=qt("outlineColor"),Ja=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Ao(e.theme,"shape.borderRadius",4),r=n=>({borderRadius:_o(t,n)});return gr(e,e.borderRadius,r)}return null};Ja.propTypes={};Ja.filterProps=["borderRadius"];Xa(Ig,jg,Eg,Tg,Rg,Mg,Ng,Ag,_g,Og,Ja,Lg,$g);const Za=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Ao(e.theme,"spacing",8),r=n=>({gap:_o(t,n)});return gr(e,e.gap,r)}return null};Za.propTypes={};Za.filterProps=["gap"];const ei=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Ao(e.theme,"spacing",8),r=n=>({columnGap:_o(t,n)});return gr(e,e.columnGap,r)}return null};ei.propTypes={};ei.filterProps=["columnGap"];const ti=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Ao(e.theme,"spacing",8),r=n=>({rowGap:_o(t,n)});return gr(e,e.rowGap,r)}return null};ti.propTypes={};ti.filterProps=["rowGap"];const Dg=ze({prop:"gridColumn"}),Bg=ze({prop:"gridRow"}),qg=ze({prop:"gridAutoFlow"}),Fg=ze({prop:"gridAutoColumns"}),zg=ze({prop:"gridAutoRows"}),Wg=ze({prop:"gridTemplateColumns"}),Ug=ze({prop:"gridTemplateRows"}),Hg=ze({prop:"gridTemplateAreas"}),Vg=ze({prop:"gridArea"});Xa(Za,ei,ti,Dg,Bg,qg,Fg,zg,Wg,Ug,Hg,Vg);function En(e,t){return t==="grey"?t:e}const Gg=ze({prop:"color",themeKey:"palette",transform:En}),Kg=ze({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:En}),Qg=ze({prop:"backgroundColor",themeKey:"palette",transform:En});Xa(Gg,Kg,Qg);function vt(e){return e<=1&&e!==0?`${e*100}%`:e}const Yg=ze({prop:"width",transform:vt}),Ks=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{const n=e.theme?.breakpoints?.values?.[r]||Qa[r];return n?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:vt(r)}};return gr(e,e.maxWidth,t)}return null};Ks.filterProps=["maxWidth"];const Xg=ze({prop:"minWidth",transform:vt}),Jg=ze({prop:"height",transform:vt}),Zg=ze({prop:"maxHeight",transform:vt}),ey=ze({prop:"minHeight",transform:vt});ze({prop:"size",cssProperty:"width",transform:vt});ze({prop:"size",cssProperty:"height",transform:vt});const ty=ze({prop:"boxSizing"});Xa(Yg,Ks,Xg,Jg,Zg,ey,ty);const ri={border:{themeKey:"borders",transform:Ot},borderTop:{themeKey:"borders",transform:Ot},borderRight:{themeKey:"borders",transform:Ot},borderBottom:{themeKey:"borders",transform:Ot},borderLeft:{themeKey:"borders",transform:Ot},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Ot},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ja},color:{themeKey:"palette",transform:En},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:En},backgroundColor:{themeKey:"palette",transform:En},p:{style:Le},pt:{style:Le},pr:{style:Le},pb:{style:Le},pl:{style:Le},px:{style:Le},py:{style:Le},padding:{style:Le},paddingTop:{style:Le},paddingRight:{style:Le},paddingBottom:{style:Le},paddingLeft:{style:Le},paddingX:{style:Le},paddingY:{style:Le},paddingInline:{style:Le},paddingInlineStart:{style:Le},paddingInlineEnd:{style:Le},paddingBlock:{style:Le},paddingBlockStart:{style:Le},paddingBlockEnd:{style:Le},m:{style:Oe},mt:{style:Oe},mr:{style:Oe},mb:{style:Oe},ml:{style:Oe},mx:{style:Oe},my:{style:Oe},margin:{style:Oe},marginTop:{style:Oe},marginRight:{style:Oe},marginBottom:{style:Oe},marginLeft:{style:Oe},marginX:{style:Oe},marginY:{style:Oe},marginInline:{style:Oe},marginInlineStart:{style:Oe},marginInlineEnd:{style:Oe},marginBlock:{style:Oe},marginBlockStart:{style:Oe},marginBlockEnd:{style:Oe},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Za},rowGap:{style:ti},columnGap:{style:ei},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:vt},maxWidth:{style:Ks},minWidth:{transform:vt},height:{transform:vt},maxHeight:{transform:vt},minHeight:{transform:vt},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function ry(...e){const t=e.reduce((n,o)=>n.concat(Object.keys(o)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function ny(e,t){return typeof e=="function"?e(t):e}function oy(){function e(r,n,o,a){const i={[r]:n,theme:o},s=a[r];if(!s)return{[r]:n};const{cssProperty:l=r,themeKey:c,transform:d,style:p}=s;if(n==null)return null;if(c==="typography"&&n==="inherit")return{[r]:n};const h=Ya(o,c)||{};return p?p(i):gr(i,n,f=>{let g=Ia(h,d,f);return f===g&&typeof f=="string"&&(g=Ia(h,d,`${r}${f==="default"?"":Gt(f)}`,f)),l===!1?g:{[l]:g}})}function t(r){const{sx:n,theme:o={}}=r||{};if(!n)return null;const a=o.unstable_sxConfig??ri;function i(s){let l=s;if(typeof s=="function")l=s(o);else if(typeof s!="object")return s;if(!l)return null;const c=bg(o.breakpoints),d=Object.keys(c);let p=c;return Object.keys(l).forEach(h=>{const f=ny(l[h],o);if(f!=null)if(typeof f=="object")if(a[h])p=po(p,e(h,f,o,a));else{const g=gr({theme:o},f,y=>({[h]:y}));ry(g,f)?p[h]=t({sx:f,theme:o}):p=po(p,g)}else p=po(p,e(h,f,o,a))}),hg(o,xg(d,p))}return Array.isArray(n)?n.map(i):i(n)}return t}const An=oy();An.filterProps=["sx"];function ay(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function Qs(e,t=0,r=1){return ay(e,t,r)}function iy(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),r?`rgb${r.length===4?"a":""}(${r.map((n,o)=>o<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function Mr(e){if(e.type)return e;if(e.charAt(0)==="#")return Mr(iy(e));const t=e.indexOf("("),r=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(r))throw new Error(Xr(9,e));let n=e.substring(t+1,e.length-1),o;if(r==="color"){if(n=n.split(" "),o=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(Xr(10,o))}else n=n.split(",");return n=n.map(a=>parseFloat(a)),{type:r,values:n,colorSpace:o}}const sy=e=>{const t=Mr(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},ao=(e,t)=>{try{return sy(e)}catch{return e}};function ni(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((o,a)=>a<3?parseInt(o,10):o):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function Sd(e){e=Mr(e);const{values:t}=e,r=t[0],n=t[1]/100,o=t[2]/100,a=n*Math.min(o,1-o),i=(c,d=(c+r/30)%12)=>o-a*Math.max(Math.min(d-3,9-d,1),-1);let s="rgb";const l=[Math.round(i(0)*255),Math.round(i(8)*255),Math.round(i(4)*255)];return e.type==="hsla"&&(s+="a",l.push(t[3])),ni({type:s,values:l})}function es(e){e=Mr(e);let t=e.type==="hsl"||e.type==="hsla"?Mr(Sd(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function ly(e,t){const r=es(e),n=es(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function ts(e,t){return e=Mr(e),t=Qs(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,ni(e)}function ta(e,t,r){try{return ts(e,t)}catch{return e}}function Ys(e,t){if(e=Mr(e),t=Qs(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return ni(e)}function Se(e,t,r){try{return Ys(e,t)}catch{return e}}function Xs(e,t){if(e=Mr(e),t=Qs(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return ni(e)}function we(e,t,r){try{return Xs(e,t)}catch{return e}}function cy(e,t=.15){return es(e)>.5?Ys(e,t):Xs(e,t)}function ra(e,t,r){try{return cy(e,t)}catch{return e}}const vo={black:"#000",white:"#fff"},uy={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},pn={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},hn={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Zn={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},mn={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},fn={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},gn={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function wd(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:vo.white,default:vo.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const dy=wd();function Cd(){return{text:{primary:vo.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:vo.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const Sc=Cd();function wc(e,t,r,n){const o=n.light||n,a=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=Xs(e.main,o):t==="dark"&&(e.dark=Ys(e.main,a)))}function py(e="light"){return e==="dark"?{main:mn[200],light:mn[50],dark:mn[400]}:{main:mn[700],light:mn[400],dark:mn[800]}}function hy(e="light"){return e==="dark"?{main:pn[200],light:pn[50],dark:pn[400]}:{main:pn[500],light:pn[300],dark:pn[700]}}function my(e="light"){return e==="dark"?{main:hn[500],light:hn[300],dark:hn[700]}:{main:hn[700],light:hn[400],dark:hn[800]}}function fy(e="light"){return e==="dark"?{main:fn[400],light:fn[300],dark:fn[700]}:{main:fn[700],light:fn[500],dark:fn[900]}}function gy(e="light"){return e==="dark"?{main:gn[400],light:gn[300],dark:gn[700]}:{main:gn[800],light:gn[500],dark:gn[900]}}function yy(e="light"){return e==="dark"?{main:Zn[400],light:Zn[300],dark:Zn[700]}:{main:"#ed6c02",light:Zn[500],dark:Zn[900]}}function Js(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...o}=e,a=e.primary||py(t),i=e.secondary||hy(t),s=e.error||my(t),l=e.info||fy(t),c=e.success||gy(t),d=e.warning||yy(t);function p(g){return ly(g,Sc.text.primary)>=r?Sc.text.primary:dy.text.primary}const h=({color:g,name:y,mainShade:v=500,lightShade:b=300,darkShade:C=700})=>{if(g={...g},!g.main&&g[v]&&(g.main=g[v]),!g.hasOwnProperty("main"))throw new Error(Xr(11,y?` (${y})`:"",v));if(typeof g.main!="string")throw new Error(Xr(12,y?` (${y})`:"",JSON.stringify(g.main)));return wc(g,"light",b,n),wc(g,"dark",C,n),g.contrastText||(g.contrastText=p(g.main)),g};let f;return t==="light"?f=wd():t==="dark"&&(f=Cd()),wt({common:{...vo},mode:t,primary:h({color:a,name:"primary"}),secondary:h({color:i,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:s,name:"error"}),warning:h({color:d,name:"warning"}),info:h({color:l,name:"info"}),success:h({color:c,name:"success"}),grey:uy,contrastThreshold:r,getContrastText:p,augmentColor:h,tonalOffset:n,...f},o)}function by(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var xy={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function vy(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Sy=/[A-Z]|^ms/g,wy=/_EMO_([^_]+?)_([^]*?)_EMO_/g,kd=function(e){return e.charCodeAt(1)===45},Cc=function(e){return e!=null&&typeof e!="boolean"},Mi=vy(function(e){return kd(e)?e:e.replace(Sy,"-$&").toLowerCase()}),kc=function(e,t){switch(e){case"animation":case"animationName":if(typeof t=="string")return t.replace(wy,function(r,n,o){return jr={name:n,styles:o,next:jr},n})}return xy[e]!==1&&!kd(e)&&typeof t=="number"&&t!==0?t+"px":t};function ja(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var o=r;if(o.anim===1)return jr={name:o.name,styles:o.styles,next:jr},o.name;var a=r;if(a.styles!==void 0){var i=a.next;if(i!==void 0)for(;i!==void 0;)jr={name:i.name,styles:i.styles,next:jr},i=i.next;var s=a.styles+";";return s}return Cy(e,t,r)}}var l=r;return l}function Cy(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=ja(e,t,r[o])+";";else for(var a in r){var i=r[a];if(typeof i!="object"){var s=i;Cc(s)&&(n+=Mi(a)+":"+kc(a,s)+";")}else if(Array.isArray(i)&&typeof i[0]=="string"&&t==null)for(var l=0;l<i.length;l++)Cc(i[l])&&(n+=Mi(a)+":"+kc(a,i[l])+";");else{var c=ja(e,t,i);switch(a){case"animation":case"animationName":{n+=Mi(a)+":"+c+";";break}default:n+=a+"{"+c+"}"}}}return n}var Pc=/label:\s*([^\s;{]+)\s*(;|$)/g,jr;function ky(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,o="";jr=void 0;var a=e[0];if(a==null||a.raw===void 0)n=!1,o+=ja(r,t,a);else{var i=a;o+=i[0]}for(var s=1;s<e.length;s++)if(o+=ja(r,t,e[s]),n){var l=a;o+=l[s]}Pc.lastIndex=0;for(var c="",d;(d=Pc.exec(o))!==null;)c+="-"+d[1];var p=by(o)+c;return{name:p,styles:o,next:jr}}function Py(e,t){return Wu(e,t)}function Iy(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Ic=[];function jc(e){return Ic[0]=e,ky(Ic)}const jy=typeof window<"u"?S.useLayoutEffect:S.useEffect;function Ey(e){return Object.keys(e).length===0}function Ty(e=null){const t=S.useContext(Hh.ThemeContext);return!t||Ey(t)?e:t}const Ry=S.createContext(),My=()=>S.useContext(Ry)??!1;function Ea(e,t){const r={...t};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=n;if(o==="components"||o==="slots")r[o]={...e[o],...r[o]};else if(o==="componentsProps"||o==="slotProps"){const a=e[o],i=t[o];if(!i)r[o]=a||{};else if(!a)r[o]=i;else{r[o]={...i};for(const s in a)if(Object.prototype.hasOwnProperty.call(a,s)){const l=s;r[o][l]=Ea(a[l],i[l])}}}else r[o]===void 0&&(r[o]=e[o])}return r}const Ny=S.createContext(void 0);function Ay(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const o=t.components[r];return o.defaultProps?Ea(o.defaultProps,n):!o.styleOverrides&&!o.variants?Ea(o,n):n}function _y({props:e,name:t}){const r=S.useContext(Ny);return Ay({props:e,name:t,theme:{components:r}})}const Ec=(e,t,r,n=[])=>{let o=e;t.forEach((a,i)=>{i===t.length-1?Array.isArray(o)?o[Number(a)]=r:o&&typeof o=="object"&&(o[a]=r):o&&typeof o=="object"&&(o[a]||(o[a]=n.includes(a)?[]:{}),o=o[a])})},Oy=(e,t,r)=>{function n(o,a=[],i=[]){Object.entries(o).forEach(([s,l])=>{(!r||r&&!r([...a,s]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?n(l,[...a,s],Array.isArray(l)?[...i,s]:i):t([...a,s],l,i))})}n(e)},Ly=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function Ni(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},o={},a={},i={};return Oy(e,(s,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!n||!n(s,l))){const d=`--${r?`${r}-`:""}${s.join("-")}`,p=Ly(s,l);Object.assign(o,{[d]:p}),Ec(a,s,`var(${d})`,c),Ec(i,s,`var(${d}, ${p})`,c)}},s=>s[0]==="vars"),{css:o,vars:a,varsWithDefaults:i}}function $y(e,t={}){const{getSelector:r=v,disableCssColorScheme:n,colorSchemeSelector:o}=t,{colorSchemes:a={},components:i,defaultColorScheme:s="light",...l}=e,{vars:c,css:d,varsWithDefaults:p}=Ni(l,t);let h=p;const f={},{[s]:g,...y}=a;if(Object.entries(y||{}).forEach(([b,C])=>{const{vars:w,css:k,varsWithDefaults:j}=Ni(C,t);h=wt(h,j),f[b]={css:k,vars:w}}),g){const{css:b,vars:C,varsWithDefaults:w}=Ni(g,t);h=wt(h,w),f[s]={css:b,vars:C}}function v(b,C){let w=o;if(o==="class"&&(w=".%s"),o==="data"&&(w="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(w=`[${o}="%s"]`),b){if(w==="media")return e.defaultColorScheme===b?":root":{[`@media (prefers-color-scheme: ${a[b]?.palette?.mode||b})`]:{":root":C}};if(w)return e.defaultColorScheme===b?`:root, ${w.replace("%s",String(b))}`:w.replace("%s",String(b))}return":root"}return{vars:h,generateThemeVars:()=>{let b={...c};return Object.entries(f).forEach(([,{vars:C}])=>{b=wt(b,C)}),b},generateStyleSheets:()=>{const b=[],C=e.defaultColorScheme||"light";function w(P,B){Object.keys(B).length&&b.push(typeof P=="string"?{[P]:{...B}}:P)}w(r(void 0,{...d}),d);const{[C]:k,...j}=f;if(k){const{css:P}=k,B=a[C]?.palette?.mode,F=!n&&B?{colorScheme:B,...P}:{...P};w(r(C,{...F}),F)}return Object.entries(j).forEach(([P,{css:B}])=>{const F=a[P]?.palette?.mode,L=!n&&F?{colorScheme:F,...B}:{...B};w(r(P,{...L}),L)}),b}}}function Dy(e){const t={};return Object.entries(e).forEach(r=>{const[n,o]=r;typeof o=="object"&&(t[n]=`${o.fontStyle?`${o.fontStyle} `:""}${o.fontVariant?`${o.fontVariant} `:""}${o.fontWeight?`${o.fontWeight} `:""}${o.fontStretch?`${o.fontStretch} `:""}${o.fontSize||""}${o.lineHeight?`/${o.lineHeight} `:""}${o.fontFamily||""}`)}),t}function By(e){return function(t){return e==="media"?`@media (prefers-color-scheme: ${t})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${t}"] &`:e==="class"?`.${t} &`:e==="data"?`[data-${t}] &`:`${e.replace("%s",t)} &`:"&"}}const qy=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>({...r,[n.key]:n.val}),{})};function Fy(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...o}=e,a=qy(t),i=Object.keys(a);function s(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${r})`}function l(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-n/100}${r})`}function c(h,f){const g=i.indexOf(f);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${r}) and (max-width:${(g!==-1&&typeof t[i[g]]=="number"?t[i[g]]:f)-n/100}${r})`}function d(h){return i.indexOf(h)+1<i.length?c(h,i[i.indexOf(h)+1]):s(h)}function p(h){const f=i.indexOf(h);return f===0?s(i[1]):f===i.length-1?l(i[f]):c(h,i[i.indexOf(h)+1]).replace("@media","@media not all and")}return{keys:i,values:a,up:s,down:l,between:c,only:d,not:p,unit:r,...o}}const zy={borderRadius:4};function Wy(e=8,t=Gs({spacing:e})){if(e.mui)return e;const r=(...n)=>(n.length===0?[1]:n).map(o=>{const a=t(o);return typeof a=="number"?`${a}px`:a}).join(" ");return r.mui=!0,r}function Uy(e,t){const r=this;if(r.vars){if(!r.colorSchemes?.[e]||typeof r.getColorSchemeSelector!="function")return{};let n=r.getColorSchemeSelector(e);return n==="&"?t:((n.includes("data-")||n.includes("."))&&(n=`*:where(${n.replace(/\s*&$/,"")}) &`),{[n]:t})}return r.palette.mode===e?t:{}}function Zs(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:a={},...i}=e,s=Fy(r),l=Wy(o);let c=wt({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:l,shape:{...zy,...a}},i);return c=gg(c),c.applyStyles=Uy,c=t.reduce((d,p)=>wt(d,p),c),c.unstable_sxConfig={...ri,...i?.unstable_sxConfig},c.unstable_sx=function(d){return An({sx:d,theme:this})},c}const Hy={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Ln(e,t,r="Mui"){const n=Hy[t];return n?`${r}-${n}`:`${ag.generate(e)}-${t}`}function Vy(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function Gy(e){return Math.round(e*1e5)/1e5}const Tc={textTransform:"uppercase"},Rc='"Roboto", "Helvetica", "Arial", sans-serif';function Ky(e,t){const{fontFamily:r=Rc,fontSize:n=14,fontWeightLight:o=300,fontWeightRegular:a=400,fontWeightMedium:i=500,fontWeightBold:s=700,htmlFontSize:l=16,allVariants:c,pxToRem:d,...p}=typeof t=="function"?t(e):t,h=n/14,f=d||(v=>`${v/l*h}rem`),g=(v,b,C,w,k)=>({fontFamily:r,fontWeight:v,fontSize:f(b),lineHeight:C,...r===Rc?{letterSpacing:`${Gy(w/b)}em`}:{},...k,...c}),y={h1:g(o,96,1.167,-1.5),h2:g(o,60,1.2,-.5),h3:g(a,48,1.167,0),h4:g(a,34,1.235,.25),h5:g(a,24,1.334,0),h6:g(i,20,1.6,.15),subtitle1:g(a,16,1.75,.15),subtitle2:g(i,14,1.57,.1),body1:g(a,16,1.5,.15),body2:g(a,14,1.43,.15),button:g(i,14,1.75,.4,Tc),caption:g(a,12,1.66,.4),overline:g(a,12,2.66,1,Tc),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return wt({htmlFontSize:l,pxToRem:f,fontFamily:r,fontSize:n,fontWeightLight:o,fontWeightRegular:a,fontWeightMedium:i,fontWeightBold:s,...y},p,{clone:!1})}const Qy=.2,Yy=.14,Xy=.12;function Re(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Qy})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Yy})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Xy})`].join(",")}const Jy=["none",Re(0,2,1,-1,0,1,1,0,0,1,3,0),Re(0,3,1,-2,0,2,2,0,0,1,5,0),Re(0,3,3,-2,0,3,4,0,0,1,8,0),Re(0,2,4,-1,0,4,5,0,0,1,10,0),Re(0,3,5,-1,0,5,8,0,0,1,14,0),Re(0,3,5,-1,0,6,10,0,0,1,18,0),Re(0,4,5,-2,0,7,10,1,0,2,16,1),Re(0,5,5,-3,0,8,10,1,0,3,14,2),Re(0,5,6,-3,0,9,12,1,0,3,16,2),Re(0,6,6,-3,0,10,14,1,0,4,18,3),Re(0,6,7,-4,0,11,15,1,0,4,20,3),Re(0,7,8,-4,0,12,17,2,0,5,22,4),Re(0,7,8,-4,0,13,19,2,0,5,24,4),Re(0,7,9,-4,0,14,21,2,0,5,26,4),Re(0,8,9,-5,0,15,22,2,0,6,28,5),Re(0,8,10,-5,0,16,24,2,0,6,30,5),Re(0,8,11,-5,0,17,26,2,0,6,32,5),Re(0,9,11,-5,0,18,28,2,0,7,34,6),Re(0,9,12,-6,0,19,29,2,0,7,36,6),Re(0,10,13,-6,0,20,31,3,0,8,38,7),Re(0,10,13,-6,0,21,33,3,0,8,40,7),Re(0,10,14,-6,0,22,35,3,0,8,42,7),Re(0,11,14,-7,0,23,36,3,0,9,44,8),Re(0,11,15,-7,0,24,38,3,0,9,46,8)],Zy={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Pd={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Mc(e){return`${Math.round(e)}ms`}function e0(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function t0(e){const t={...Zy,...e.easing},r={...Pd,...e.duration};return{getAutoHeightDuration:e0,create:(n=["all"],o={})=>{const{duration:a=r.standard,easing:i=t.easeInOut,delay:s=0,...l}=o;return(Array.isArray(n)?n:[n]).map(c=>`${c} ${typeof a=="string"?a:Mc(a)} ${i} ${typeof s=="string"?s:Mc(s)}`).join(",")},...e,easing:t,duration:r}}const r0={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function n0(e){return dr(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Id(e={}){const t={...e};function r(n){const o=Object.entries(n);for(let a=0;a<o.length;a++){const[i,s]=o[a];!n0(s)||i.startsWith("unstable_")?delete n[i]:dr(s)&&(n[i]={...s},r(n[i]))}}return r(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
30
|
+
*/var Dp;function mC(){if(Dp)return Xe;Dp=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),p=Symbol.for("react.client.reference");function g(b){if(typeof b=="object"&&b!==null){var T=b.$$typeof;switch(T){case e:switch(b=b.type,b){case n:case o:case r:case l:case c:case h:return b;default:switch(b=b&&b.$$typeof,b){case a:case s:case u:case d:return b;case i:return b;default:return T}}case t:return T}}}return Xe.ContextConsumer=i,Xe.ContextProvider=a,Xe.Element=e,Xe.ForwardRef=s,Xe.Fragment=n,Xe.Lazy=u,Xe.Memo=d,Xe.Portal=t,Xe.Profiler=o,Xe.StrictMode=r,Xe.Suspense=l,Xe.SuspenseList=c,Xe.isContextConsumer=function(b){return g(b)===i},Xe.isContextProvider=function(b){return g(b)===a},Xe.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},Xe.isForwardRef=function(b){return g(b)===s},Xe.isFragment=function(b){return g(b)===n},Xe.isLazy=function(b){return g(b)===u},Xe.isMemo=function(b){return g(b)===d},Xe.isPortal=function(b){return g(b)===t},Xe.isProfiler=function(b){return g(b)===o},Xe.isStrictMode=function(b){return g(b)===r},Xe.isSuspense=function(b){return g(b)===l},Xe.isSuspenseList=function(b){return g(b)===c},Xe.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===o||b===r||b===l||b===c||typeof b=="object"&&b!==null&&(b.$$typeof===u||b.$$typeof===d||b.$$typeof===a||b.$$typeof===i||b.$$typeof===s||b.$$typeof===p||b.getModuleId!==void 0)},Xe.typeOf=g,Xe}var Ip;function gC(){return Ip||(Ip=1,_p.exports=mC()),_p.exports}var o0=gC();function Sr(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function i0(e){if(_.isValidElement(e)||o0.isValidElementType(e)||!Sr(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=i0(e[n])}),t}function An(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return Sr(e)&&Sr(t)&&Object.keys(t).forEach(o=>{_.isValidElement(t[o])||o0.isValidElementType(t[o])?r[o]=t[o]:Sr(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&Sr(e[o])?r[o]=An(e[o],t[o],n):n.clone?r[o]=Sr(t[o])?i0(t[o]):t[o]:r[o]=t[o]}),r}function ca(e,t){return t?An(e,t,{clone:!1}):e}function yC(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,o)=>{const i=/min-width:\s*([0-9.]+)/;return+(r.match(i)?.[1]||0)-+(o.match(i)?.[1]||0)});return n.length?n.reduce((r,o)=>{const i=t[o];return delete r[o],r[o]=i,r},{...t}):t}function bC(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function EC(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}function TC(e){const t=(i,a)=>i.replace("@media",a?`@container ${a}`:"@container");function n(i,a){i.up=(...s)=>t(e.breakpoints.up(...s),a),i.down=(...s)=>t(e.breakpoints.down(...s),a),i.between=(...s)=>t(e.breakpoints.between(...s),a),i.only=(...s)=>t(e.breakpoints.only(...s),a),i.not=(...s)=>{const l=t(e.breakpoints.not(...s),a);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const r={},o=i=>(n(r,i),r);return n(o),{...e,containerQueries:o}}const Pl={xs:0,sm:600,md:900,lg:1200,xl:1536},wp={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Pl[e]}px)`},xC={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:Pl[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Nr(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||wp;return t.reduce((i,a,s)=>(i[o.up(o.keys[s])]=n(t[s]),i),{})}if(typeof t=="object"){const o=r.breakpoints||wp;return Object.keys(t).reduce((i,a)=>{if(bC(o.keys,a)){const s=EC(r.containerQueries?r:xC,a);s&&(i[s]=n(t[a],a))}else if(Object.keys(o.values||Pl).includes(a)){const s=o.up(a);i[s]=n(t[a],a)}else{const s=a;i[s]=t[s]}return i},{})}return n(t)}function CC(e={}){return e.keys?.reduce((t,n)=>{const r=e.up(n);return t[r]={},t},{})||{}}function vC(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function Rl(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function Xs(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=Rl(e,n)||r,t&&(o=t(o,r,e)),o}function Dt(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=a=>{if(a[t]==null)return null;const s=a[t],l=a.theme,c=Rl(l,r)||{};return Nr(a,s,d=>{let u=Xs(c,o,d);return d===u&&typeof d=="string"&&(u=Xs(c,o,`${t}${d==="default"?"":Jn(d)}`,d)),n===!1?u:{[n]:u}})};return i.propTypes={},i.filterProps=[t],i}function SC(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const AC={m:"margin",p:"padding"},kC={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Np={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},_C=SC(e=>{if(e.length>2)if(Np[e])e=Np[e];else return[e];const[t,n]=e.split(""),r=AC[t],o=kC[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),Nd=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Pd=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Nd,...Pd];function Ga(e,t,n,r){const o=Rl(e,t,!0)??n;return typeof o=="number"||typeof o=="string"?i=>typeof i=="string"?i:typeof o=="string"?o.startsWith("var(")&&i===0?0:o.startsWith("var(")&&i===1?o:`calc(${i} * ${o})`:o*i:Array.isArray(o)?i=>{if(typeof i=="string")return i;const a=Math.abs(i),s=o[a];return i>=0?s:typeof s=="number"?-s:typeof s=="string"&&s.startsWith("var(")?`calc(-1 * ${s})`:`-${s}`}:typeof o=="function"?o:()=>{}}function Rd(e){return Ga(e,"spacing",8)}function qa(e,t){return typeof t=="string"||t==null?t:e(t)}function DC(e,t){return n=>e.reduce((r,o)=>(r[o]=qa(t,n),r),{})}function IC(e,t,n,r){if(!t.includes(n))return null;const o=_C(n),i=DC(o,r),a=e[n];return Nr(e,a,i)}function a0(e,t){const n=Rd(e.theme);return Object.keys(e).map(r=>IC(e,t,r,n)).reduce(ca,{})}function Et(e){return a0(e,Nd)}Et.propTypes={};Et.filterProps=Nd;function Tt(e){return a0(e,Pd)}Tt.propTypes={};Tt.filterProps=Pd;function Ll(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(i=>{r[i]=o}),r),{}),n=r=>Object.keys(r).reduce((o,i)=>t[i]?ca(o,t[i](r)):o,{});return n.propTypes={},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function Bn(e){return typeof e!="number"?e:`${e}px solid`}function qn(e,t){return Dt({prop:e,themeKey:"borders",transform:t})}const wC=qn("border",Bn),NC=qn("borderTop",Bn),PC=qn("borderRight",Bn),RC=qn("borderBottom",Bn),LC=qn("borderLeft",Bn),OC=qn("borderColor"),MC=qn("borderTopColor"),FC=qn("borderRightColor"),BC=qn("borderBottomColor"),jC=qn("borderLeftColor"),HC=qn("outline",Bn),UC=qn("outlineColor"),Ol=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Ga(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:qa(t,r)});return Nr(e,e.borderRadius,n)}return null};Ol.propTypes={};Ol.filterProps=["borderRadius"];Ll(wC,NC,PC,RC,LC,OC,MC,FC,BC,jC,Ol,HC,UC);const Ml=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Ga(e.theme,"spacing",8),n=r=>({gap:qa(t,r)});return Nr(e,e.gap,n)}return null};Ml.propTypes={};Ml.filterProps=["gap"];const Fl=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Ga(e.theme,"spacing",8),n=r=>({columnGap:qa(t,r)});return Nr(e,e.columnGap,n)}return null};Fl.propTypes={};Fl.filterProps=["columnGap"];const Bl=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Ga(e.theme,"spacing",8),n=r=>({rowGap:qa(t,r)});return Nr(e,e.rowGap,n)}return null};Bl.propTypes={};Bl.filterProps=["rowGap"];const zC=Dt({prop:"gridColumn"}),$C=Dt({prop:"gridRow"}),GC=Dt({prop:"gridAutoFlow"}),qC=Dt({prop:"gridAutoColumns"}),WC=Dt({prop:"gridAutoRows"}),VC=Dt({prop:"gridTemplateColumns"}),YC=Dt({prop:"gridTemplateRows"}),KC=Dt({prop:"gridTemplateAreas"}),QC=Dt({prop:"gridArea"});Ll(Ml,Fl,Bl,zC,$C,GC,qC,WC,VC,YC,KC,QC);function ai(e,t){return t==="grey"?t:e}const XC=Dt({prop:"color",themeKey:"palette",transform:ai}),JC=Dt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:ai}),ZC=Dt({prop:"backgroundColor",themeKey:"palette",transform:ai});Ll(XC,JC,ZC);function vn(e){return e<=1&&e!==0?`${e*100}%`:e}const ev=Dt({prop:"width",transform:vn}),Ld=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{const r=e.theme?.breakpoints?.values?.[n]||Pl[n];return r?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:vn(n)}};return Nr(e,e.maxWidth,t)}return null};Ld.filterProps=["maxWidth"];const tv=Dt({prop:"minWidth",transform:vn}),nv=Dt({prop:"height",transform:vn}),rv=Dt({prop:"maxHeight",transform:vn}),ov=Dt({prop:"minHeight",transform:vn});Dt({prop:"size",cssProperty:"width",transform:vn});Dt({prop:"size",cssProperty:"height",transform:vn});const iv=Dt({prop:"boxSizing"});Ll(ev,Ld,tv,nv,rv,ov,iv);const jl={border:{themeKey:"borders",transform:Bn},borderTop:{themeKey:"borders",transform:Bn},borderRight:{themeKey:"borders",transform:Bn},borderBottom:{themeKey:"borders",transform:Bn},borderLeft:{themeKey:"borders",transform:Bn},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Bn},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ol},color:{themeKey:"palette",transform:ai},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:ai},backgroundColor:{themeKey:"palette",transform:ai},p:{style:Tt},pt:{style:Tt},pr:{style:Tt},pb:{style:Tt},pl:{style:Tt},px:{style:Tt},py:{style:Tt},padding:{style:Tt},paddingTop:{style:Tt},paddingRight:{style:Tt},paddingBottom:{style:Tt},paddingLeft:{style:Tt},paddingX:{style:Tt},paddingY:{style:Tt},paddingInline:{style:Tt},paddingInlineStart:{style:Tt},paddingInlineEnd:{style:Tt},paddingBlock:{style:Tt},paddingBlockStart:{style:Tt},paddingBlockEnd:{style:Tt},m:{style:Et},mt:{style:Et},mr:{style:Et},mb:{style:Et},ml:{style:Et},mx:{style:Et},my:{style:Et},margin:{style:Et},marginTop:{style:Et},marginRight:{style:Et},marginBottom:{style:Et},marginLeft:{style:Et},marginX:{style:Et},marginY:{style:Et},marginInline:{style:Et},marginInlineStart:{style:Et},marginInlineEnd:{style:Et},marginBlock:{style:Et},marginBlockStart:{style:Et},marginBlockEnd:{style:Et},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Ml},rowGap:{style:Bl},columnGap:{style:Fl},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:vn},maxWidth:{style:Ld},minWidth:{transform:vn},height:{transform:vn},maxHeight:{transform:vn},minHeight:{transform:vn},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function av(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function sv(e,t){return typeof e=="function"?e(t):e}function lv(){function e(n,r,o,i){const a={[n]:r,theme:o},s=i[n];if(!s)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:d,style:u}=s;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const h=Rl(o,c)||{};return u?u(a):Nr(a,r,p=>{let g=Xs(h,d,p);return p===g&&typeof p=="string"&&(g=Xs(h,d,`${n}${p==="default"?"":Jn(p)}`,p)),l===!1?g:{[l]:g}})}function t(n){const{sx:r,theme:o={}}=n||{};if(!r)return null;const i=o.unstable_sxConfig??jl;function a(s){let l=s;if(typeof s=="function")l=s(o);else if(typeof s!="object")return s;if(!l)return null;const c=CC(o.breakpoints),d=Object.keys(c);let u=c;return Object.keys(l).forEach(h=>{const p=sv(l[h],o);if(p!=null)if(typeof p=="object")if(i[h])u=ca(u,e(h,p,o,i));else{const g=Nr({theme:o},p,b=>({[h]:b}));av(g,p)?u[h]=t({sx:p,theme:o}):u=ca(u,g)}else u=ca(u,e(h,p,o,i))}),yC(o,vC(d,u))}return Array.isArray(r)?r.map(a):a(r)}return t}const pi=lv();pi.filterProps=["sx"];function cv(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Od(e,t=0,n=1){return cv(e,t,n)}function uv(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Kr(e){if(e.type)return e;if(e.charAt(0)==="#")return Kr(uv(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(xo(9,e));let r=e.substring(t+1,e.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(xo(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}const dv=e=>{const t=Kr(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},na=(e,t)=>{try{return dv(e)}catch{return e}};function Hl(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((o,i)=>i<3?parseInt(o,10):o):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function s0(e){e=Kr(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=(c,d=(c+n/30)%12)=>o-i*Math.max(Math.min(d-3,9-d,1),-1);let s="rgb";const l=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(s+="a",l.push(t[3])),Hl({type:s,values:l})}function Cu(e){e=Kr(e);let t=e.type==="hsl"||e.type==="hsla"?Kr(s0(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function hv(e,t){const n=Cu(e),r=Cu(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function vu(e,t){return e=Kr(e),t=Od(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Hl(e)}function ds(e,t,n){try{return vu(e,t)}catch{return e}}function Md(e,t){if(e=Kr(e),t=Od(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Hl(e)}function tt(e,t,n){try{return Md(e,t)}catch{return e}}function Fd(e,t){if(e=Kr(e),t=Od(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Hl(e)}function nt(e,t,n){try{return Fd(e,t)}catch{return e}}function pv(e,t=.15){return Cu(e)>.5?Md(e,t):Fd(e,t)}function hs(e,t,n){try{return pv(e,t)}catch{return e}}const _a={black:"#000",white:"#fff"},fv={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},jo={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Ho={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},zi={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Uo={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},zo={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},$o={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function l0(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:_a.white,default:_a.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const mv=l0();function c0(){return{text:{primary:_a.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:_a.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const Pp=c0();function Rp(e,t,n,r){const o=r.light||r,i=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Fd(e.main,o):t==="dark"&&(e.dark=Md(e.main,i)))}function gv(e="light"){return e==="dark"?{main:Uo[200],light:Uo[50],dark:Uo[400]}:{main:Uo[700],light:Uo[400],dark:Uo[800]}}function yv(e="light"){return e==="dark"?{main:jo[200],light:jo[50],dark:jo[400]}:{main:jo[500],light:jo[300],dark:jo[700]}}function bv(e="light"){return e==="dark"?{main:Ho[500],light:Ho[300],dark:Ho[700]}:{main:Ho[700],light:Ho[400],dark:Ho[800]}}function Ev(e="light"){return e==="dark"?{main:zo[400],light:zo[300],dark:zo[700]}:{main:zo[700],light:zo[500],dark:zo[900]}}function Tv(e="light"){return e==="dark"?{main:$o[400],light:$o[300],dark:$o[700]}:{main:$o[800],light:$o[500],dark:$o[900]}}function xv(e="light"){return e==="dark"?{main:zi[400],light:zi[300],dark:zi[700]}:{main:"#ed6c02",light:zi[500],dark:zi[900]}}function Bd(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...o}=e,i=e.primary||gv(t),a=e.secondary||yv(t),s=e.error||bv(t),l=e.info||Ev(t),c=e.success||Tv(t),d=e.warning||xv(t);function u(g){return hv(g,Pp.text.primary)>=n?Pp.text.primary:mv.text.primary}const h=({color:g,name:b,mainShade:T=500,lightShade:E=300,darkShade:C=700})=>{if(g={...g},!g.main&&g[T]&&(g.main=g[T]),!g.hasOwnProperty("main"))throw new Error(xo(11,b?` (${b})`:"",T));if(typeof g.main!="string")throw new Error(xo(12,b?` (${b})`:"",JSON.stringify(g.main)));return Rp(g,"light",E,r),Rp(g,"dark",C,r),g.contrastText||(g.contrastText=u(g.main)),g};let p;return t==="light"?p=l0():t==="dark"&&(p=c0()),An({common:{..._a},mode:t,primary:h({color:i,name:"primary"}),secondary:h({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:s,name:"error"}),warning:h({color:d,name:"warning"}),info:h({color:l,name:"info"}),success:h({color:c,name:"success"}),grey:fv,contrastThreshold:n,getContrastText:u,augmentColor:h,tonalOffset:r,...p},o)}function Cv(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var vv={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Sv(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Av=/[A-Z]|^ms/g,kv=/_EMO_([^_]+?)_([^]*?)_EMO_/g,u0=function(e){return e.charCodeAt(1)===45},Lp=function(e){return e!=null&&typeof e!="boolean"},_c=Sv(function(e){return u0(e)?e:e.replace(Av,"-$&").toLowerCase()}),Op=function(e,t){switch(e){case"animation":case"animationName":if(typeof t=="string")return t.replace(kv,function(n,r,o){return Gr={name:r,styles:o,next:Gr},r})}return vv[e]!==1&&!u0(e)&&typeof t=="number"&&t!==0?t+"px":t};function Js(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return Gr={name:o.name,styles:o.styles,next:Gr},o.name;var i=n;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)Gr={name:a.name,styles:a.styles,next:Gr},a=a.next;var s=i.styles+";";return s}return _v(e,t,n)}}var l=n;return l}function _v(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Js(e,t,n[o])+";";else for(var i in n){var a=n[i];if(typeof a!="object"){var s=a;Lp(s)&&(r+=_c(i)+":"+Op(i,s)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var l=0;l<a.length;l++)Lp(a[l])&&(r+=_c(i)+":"+Op(i,a[l])+";");else{var c=Js(e,t,a);switch(i){case"animation":case"animationName":{r+=_c(i)+":"+c+";";break}default:r+=i+"{"+c+"}"}}}return r}var Mp=/label:\s*([^\s;{]+)\s*(;|$)/g,Gr;function Dv(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";Gr=void 0;var i=e[0];if(i==null||i.raw===void 0)r=!1,o+=Js(n,t,i);else{var a=i;o+=a[0]}for(var s=1;s<e.length;s++)if(o+=Js(n,t,e[s]),r){var l=i;o+=l[s]}Mp.lastIndex=0;for(var c="",d;(d=Mp.exec(o))!==null;)c+="-"+d[1];var u=Cv(o)+c;return{name:u,styles:o,next:Gr}}function Iv(e,t){return Dg(e,t)}function wv(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Fp=[];function Bp(e){return Fp[0]=e,Dv(Fp)}const Nv=typeof window<"u"?_.useLayoutEffect:_.useEffect;function Pv(e){return Object.keys(e).length===0}function Rv(e=null){const t=_.useContext(eT.ThemeContext);return!t||Pv(t)?e:t}const Lv=_.createContext(),Ov=()=>_.useContext(Lv)??!1;function Zs(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const o=r;if(o==="components"||o==="slots")n[o]={...e[o],...n[o]};else if(o==="componentsProps"||o==="slotProps"){const i=e[o],a=t[o];if(!a)n[o]=i||{};else if(!i)n[o]=a;else{n[o]={...a};for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)){const l=s;n[o][l]=Zs(i[l],a[l])}}}else n[o]===void 0&&(n[o]=e[o])}return n}const Mv=_.createContext(void 0);function Fv(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?Zs(o.defaultProps,r):!o.styleOverrides&&!o.variants?Zs(o,r):r}function Bv({props:e,name:t}){const n=_.useContext(Mv);return Fv({props:e,name:t,theme:{components:n}})}const jp=(e,t,n,r=[])=>{let o=e;t.forEach((i,a)=>{a===t.length-1?Array.isArray(o)?o[Number(i)]=n:o&&typeof o=="object"&&(o[i]=n):o&&typeof o=="object"&&(o[i]||(o[i]=r.includes(i)?[]:{}),o=o[i])})},jv=(e,t,n)=>{function r(o,i=[],a=[]){Object.entries(o).forEach(([s,l])=>{(!n||n&&!n([...i,s]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...i,s],Array.isArray(l)?[...a,s]:a):t([...i,s],l,a))})}r(e)},Hv=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(n=>e.includes(n))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function Dc(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},i={},a={};return jv(e,(s,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(s,l))){const d=`--${n?`${n}-`:""}${s.join("-")}`,u=Hv(s,l);Object.assign(o,{[d]:u}),jp(i,s,`var(${d})`,c),jp(a,s,`var(${d}, ${u})`,c)}},s=>s[0]==="vars"),{css:o,vars:i,varsWithDefaults:a}}function Uv(e,t={}){const{getSelector:n=T,disableCssColorScheme:r,colorSchemeSelector:o}=t,{colorSchemes:i={},components:a,defaultColorScheme:s="light",...l}=e,{vars:c,css:d,varsWithDefaults:u}=Dc(l,t);let h=u;const p={},{[s]:g,...b}=i;if(Object.entries(b||{}).forEach(([E,C])=>{const{vars:x,css:k,varsWithDefaults:w}=Dc(C,t);h=An(h,w),p[E]={css:k,vars:x}}),g){const{css:E,vars:C,varsWithDefaults:x}=Dc(g,t);h=An(h,x),p[s]={css:E,vars:C}}function T(E,C){let x=o;if(o==="class"&&(x=".%s"),o==="data"&&(x="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(x=`[${o}="%s"]`),E){if(x==="media")return e.defaultColorScheme===E?":root":{[`@media (prefers-color-scheme: ${i[E]?.palette?.mode||E})`]:{":root":C}};if(x)return e.defaultColorScheme===E?`:root, ${x.replace("%s",String(E))}`:x.replace("%s",String(E))}return":root"}return{vars:h,generateThemeVars:()=>{let E={...c};return Object.entries(p).forEach(([,{vars:C}])=>{E=An(E,C)}),E},generateStyleSheets:()=>{const E=[],C=e.defaultColorScheme||"light";function x(S,B){Object.keys(B).length&&E.push(typeof S=="string"?{[S]:{...B}}:S)}x(n(void 0,{...d}),d);const{[C]:k,...w}=p;if(k){const{css:S}=k,B=i[C]?.palette?.mode,W=!r&&B?{colorScheme:B,...S}:{...S};x(n(C,{...W}),W)}return Object.entries(w).forEach(([S,{css:B}])=>{const W=i[S]?.palette?.mode,U=!r&&W?{colorScheme:W,...B}:{...B};x(n(S,{...U}),U)}),E}}}function zv(e){const t={};return Object.entries(e).forEach(n=>{const[r,o]=n;typeof o=="object"&&(t[r]=`${o.fontStyle?`${o.fontStyle} `:""}${o.fontVariant?`${o.fontVariant} `:""}${o.fontWeight?`${o.fontWeight} `:""}${o.fontStretch?`${o.fontStretch} `:""}${o.fontSize||""}${o.lineHeight?`/${o.lineHeight} `:""}${o.fontFamily||""}`)}),t}function $v(e){return function(t){return e==="media"?`@media (prefers-color-scheme: ${t})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${t}"] &`:e==="class"?`.${t} &`:e==="data"?`[data-${t}] &`:`${e.replace("%s",t)} &`:"&"}}const Gv=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function qv(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,i=Gv(t),a=Object.keys(i);function s(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n})`}function l(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-r/100}${n})`}function c(h,p){const g=a.indexOf(p);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n}) and (max-width:${(g!==-1&&typeof t[a[g]]=="number"?t[a[g]]:p)-r/100}${n})`}function d(h){return a.indexOf(h)+1<a.length?c(h,a[a.indexOf(h)+1]):s(h)}function u(h){const p=a.indexOf(h);return p===0?s(a[1]):p===a.length-1?l(a[p]):c(h,a[a.indexOf(h)+1]).replace("@media","@media not all and")}return{keys:a,values:i,up:s,down:l,between:c,only:d,not:u,unit:n,...o}}const Wv={borderRadius:4};function Vv(e=8,t=Rd({spacing:e})){if(e.mui)return e;const n=(...r)=>(r.length===0?[1]:r).map(o=>{const i=t(o);return typeof i=="number"?`${i}px`:i}).join(" ");return n.mui=!0,n}function Yv(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||typeof n.getColorSchemeSelector!="function")return{};let r=n.getColorSchemeSelector(e);return r==="&"?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function jd(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...a}=e,s=qv(n),l=Vv(o);let c=An({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...Wv,...i}},a);return c=TC(c),c.applyStyles=Yv,c=t.reduce((d,u)=>An(d,u),c),c.unstable_sxConfig={...jl,...a?.unstable_sxConfig},c.unstable_sx=function(d){return pi({sx:d,theme:this})},c}const Kv={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Ei(e,t,n="Mui"){const r=Kv[t];return r?`${n}-${r}`:`${uC.generate(e)}-${t}`}function Qv(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function Xv(e){return Math.round(e*1e5)/1e5}const Hp={textTransform:"uppercase"},Up='"Roboto", "Helvetica", "Arial", sans-serif';function Jv(e,t){const{fontFamily:n=Up,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:l=16,allVariants:c,pxToRem:d,...u}=typeof t=="function"?t(e):t,h=r/14,p=d||(T=>`${T/l*h}rem`),g=(T,E,C,x,k)=>({fontFamily:n,fontWeight:T,fontSize:p(E),lineHeight:C,...n===Up?{letterSpacing:`${Xv(x/E)}em`}:{},...k,...c}),b={h1:g(o,96,1.167,-1.5),h2:g(o,60,1.2,-.5),h3:g(i,48,1.167,0),h4:g(i,34,1.235,.25),h5:g(i,24,1.334,0),h6:g(a,20,1.6,.15),subtitle1:g(i,16,1.75,.15),subtitle2:g(a,14,1.57,.1),body1:g(i,16,1.5,.15),body2:g(i,14,1.43,.15),button:g(a,14,1.75,.4,Hp),caption:g(i,12,1.66,.4),overline:g(i,12,2.66,1,Hp),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return An({htmlFontSize:l,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:s,...b},u,{clone:!1})}const Zv=.2,eS=.14,tS=.12;function ft(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Zv})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${eS})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${tS})`].join(",")}const nS=["none",ft(0,2,1,-1,0,1,1,0,0,1,3,0),ft(0,3,1,-2,0,2,2,0,0,1,5,0),ft(0,3,3,-2,0,3,4,0,0,1,8,0),ft(0,2,4,-1,0,4,5,0,0,1,10,0),ft(0,3,5,-1,0,5,8,0,0,1,14,0),ft(0,3,5,-1,0,6,10,0,0,1,18,0),ft(0,4,5,-2,0,7,10,1,0,2,16,1),ft(0,5,5,-3,0,8,10,1,0,3,14,2),ft(0,5,6,-3,0,9,12,1,0,3,16,2),ft(0,6,6,-3,0,10,14,1,0,4,18,3),ft(0,6,7,-4,0,11,15,1,0,4,20,3),ft(0,7,8,-4,0,12,17,2,0,5,22,4),ft(0,7,8,-4,0,13,19,2,0,5,24,4),ft(0,7,9,-4,0,14,21,2,0,5,26,4),ft(0,8,9,-5,0,15,22,2,0,6,28,5),ft(0,8,10,-5,0,16,24,2,0,6,30,5),ft(0,8,11,-5,0,17,26,2,0,6,32,5),ft(0,9,11,-5,0,18,28,2,0,7,34,6),ft(0,9,12,-6,0,19,29,2,0,7,36,6),ft(0,10,13,-6,0,20,31,3,0,8,38,7),ft(0,10,13,-6,0,21,33,3,0,8,40,7),ft(0,10,14,-6,0,22,35,3,0,8,42,7),ft(0,11,14,-7,0,23,36,3,0,9,44,8),ft(0,11,15,-7,0,24,38,3,0,9,46,8)],rS={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},d0={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function zp(e){return`${Math.round(e)}ms`}function oS(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function iS(e){const t={...rS,...e.easing},n={...d0,...e.duration};return{getAutoHeightDuration:oS,create:(r=["all"],o={})=>{const{duration:i=n.standard,easing:a=t.easeInOut,delay:s=0,...l}=o;return(Array.isArray(r)?r:[r]).map(c=>`${c} ${typeof i=="string"?i:zp(i)} ${a} ${typeof s=="string"?s:zp(s)}`).join(",")},...e,easing:t,duration:n}}const aS={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function sS(e){return Sr(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function h0(e={}){const t={...e};function n(r){const o=Object.entries(r);for(let i=0;i<o.length;i++){const[a,s]=o[i];!sS(s)||a.startsWith("unstable_")?delete r[a]:Sr(s)&&(r[a]={...s},n(r[a]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
31
31
|
|
|
32
32
|
const theme = ${JSON.stringify(t,null,2)};
|
|
33
33
|
|
|
34
34
|
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
35
35
|
theme.transitions = createTransitions(theme.transitions || {});
|
|
36
36
|
|
|
37
|
-
export default theme;`}function rs(e={},...t){const{breakpoints:r,mixins:n={},spacing:o,palette:a={},transitions:i={},typography:s={},shape:l,...c}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(Xr(20));const d=Js(a),p=Zs(e);let h=wt(p,{mixins:Vy(p.breakpoints,n),palette:d,shadows:Jy.slice(),typography:Ky(d,s),transitions:t0(i),zIndex:{...r0}});return h=wt(h,c),h=t.reduce((f,g)=>wt(f,g),h),h.unstable_sxConfig={...ri,...c?.unstable_sxConfig},h.unstable_sx=function(f){return An({sx:f,theme:this})},h.toRuntimeSource=Id,h}function o0(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const a0=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=o0(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function jd(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Ed(e){return e==="dark"?a0:[]}function i0(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...o}=e,a=Js(t);return{palette:a,opacity:{...jd(a.mode),...r},overlays:n||Ed(a.mode),...o}}function s0(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const l0=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],c0=e=>(t,r)=>{const n=e.rootSelector||":root",o=e.colorSchemeSelector;let a=o;if(o==="class"&&(a=".%s"),o==="data"&&(a="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(a=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const i={};return l0(e.cssVarPrefix).forEach(s=>{i[s]=r[s],delete r[s]}),a==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:i}}:a?{[a.replace("%s",t)]:i,[`${n}, ${a.replace("%s",t)}`]:r}:{[n]:{...r,...i}}}if(a&&a!=="media")return`${n}, ${a.replace("%s",String(t))}`}else if(t){if(a==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:r}};if(a)return a.replace("%s",String(t))}return n};function u0(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function N(e,t,r){!e[t]&&r&&(e[t]=r)}function io(e){return typeof e!="string"||!e.startsWith("hsl")?e:Sd(e)}function or(e,t){`${t}Channel`in e||(e[`${t}Channel`]=ao(io(e[t])))}function d0(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Xt=e=>{try{return e()}catch{}},p0=(e="mui")=>fe.unstable_createGetCssVar(e);function Ai(e,t,r,n){if(!t)return;t=t===!0?{}:t;const o=n==="dark"?"dark":"light";if(!r){e[n]=i0({...t,palette:{mode:o,...t?.palette}});return}const{palette:a,...i}=rs({...r,palette:{mode:o,...t?.palette}});return e[n]={...t,palette:a,opacity:{...jd(o),...t?.opacity},overlays:t?.overlays||Ed(o)},i}function h0(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:o=!1,cssVarPrefix:a="mui",shouldSkipGeneratingVar:i=s0,colorSchemeSelector:s=r.light&&r.dark?"media":void 0,rootSelector:l=":root",...c}=e,d=Object.keys(r)[0],p=n||(r.light&&d!=="light"?"light":d),h=p0(a),{[p]:f,light:g,dark:y,...v}=r,b={...v};let C=f;if((p==="dark"&&!("dark"in r)||p==="light"&&!("light"in r))&&(C=!0),!C)throw new Error(Xr(21,p));const w=Ai(b,C,c,p);g&&!b.light&&Ai(b,g,void 0,"light"),y&&!b.dark&&Ai(b,y,void 0,"dark");let k={defaultColorScheme:p,...w,cssVarPrefix:a,colorSchemeSelector:s,rootSelector:l,getCssVar:h,colorSchemes:b,font:{...Dy(w.typography),...w.font},spacing:d0(c.spacing)};Object.keys(k.colorSchemes).forEach(L=>{const m=k.colorSchemes[L].palette,T=D=>{const $=D.split("-"),H=$[1],J=$[2];return h(D,m[H][J])};if(m.mode==="light"&&(N(m.common,"background","#fff"),N(m.common,"onBackground","#000")),m.mode==="dark"&&(N(m.common,"background","#000"),N(m.common,"onBackground","#fff")),u0(m,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),m.mode==="light"){N(m.Alert,"errorColor",Se(m.error.light,.6)),N(m.Alert,"infoColor",Se(m.info.light,.6)),N(m.Alert,"successColor",Se(m.success.light,.6)),N(m.Alert,"warningColor",Se(m.warning.light,.6)),N(m.Alert,"errorFilledBg",T("palette-error-main")),N(m.Alert,"infoFilledBg",T("palette-info-main")),N(m.Alert,"successFilledBg",T("palette-success-main")),N(m.Alert,"warningFilledBg",T("palette-warning-main")),N(m.Alert,"errorFilledColor",Xt(()=>m.getContrastText(m.error.main))),N(m.Alert,"infoFilledColor",Xt(()=>m.getContrastText(m.info.main))),N(m.Alert,"successFilledColor",Xt(()=>m.getContrastText(m.success.main))),N(m.Alert,"warningFilledColor",Xt(()=>m.getContrastText(m.warning.main))),N(m.Alert,"errorStandardBg",we(m.error.light,.9)),N(m.Alert,"infoStandardBg",we(m.info.light,.9)),N(m.Alert,"successStandardBg",we(m.success.light,.9)),N(m.Alert,"warningStandardBg",we(m.warning.light,.9)),N(m.Alert,"errorIconColor",T("palette-error-main")),N(m.Alert,"infoIconColor",T("palette-info-main")),N(m.Alert,"successIconColor",T("palette-success-main")),N(m.Alert,"warningIconColor",T("palette-warning-main")),N(m.AppBar,"defaultBg",T("palette-grey-100")),N(m.Avatar,"defaultBg",T("palette-grey-400")),N(m.Button,"inheritContainedBg",T("palette-grey-300")),N(m.Button,"inheritContainedHoverBg",T("palette-grey-A100")),N(m.Chip,"defaultBorder",T("palette-grey-400")),N(m.Chip,"defaultAvatarColor",T("palette-grey-700")),N(m.Chip,"defaultIconColor",T("palette-grey-700")),N(m.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),N(m.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),N(m.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),N(m.LinearProgress,"primaryBg",we(m.primary.main,.62)),N(m.LinearProgress,"secondaryBg",we(m.secondary.main,.62)),N(m.LinearProgress,"errorBg",we(m.error.main,.62)),N(m.LinearProgress,"infoBg",we(m.info.main,.62)),N(m.LinearProgress,"successBg",we(m.success.main,.62)),N(m.LinearProgress,"warningBg",we(m.warning.main,.62)),N(m.Skeleton,"bg",`rgba(${T("palette-text-primaryChannel")} / 0.11)`),N(m.Slider,"primaryTrack",we(m.primary.main,.62)),N(m.Slider,"secondaryTrack",we(m.secondary.main,.62)),N(m.Slider,"errorTrack",we(m.error.main,.62)),N(m.Slider,"infoTrack",we(m.info.main,.62)),N(m.Slider,"successTrack",we(m.success.main,.62)),N(m.Slider,"warningTrack",we(m.warning.main,.62));const D=ra(m.background.default,.8);N(m.SnackbarContent,"bg",D),N(m.SnackbarContent,"color",Xt(()=>m.getContrastText(D))),N(m.SpeedDialAction,"fabHoverBg",ra(m.background.paper,.15)),N(m.StepConnector,"border",T("palette-grey-400")),N(m.StepContent,"border",T("palette-grey-400")),N(m.Switch,"defaultColor",T("palette-common-white")),N(m.Switch,"defaultDisabledColor",T("palette-grey-100")),N(m.Switch,"primaryDisabledColor",we(m.primary.main,.62)),N(m.Switch,"secondaryDisabledColor",we(m.secondary.main,.62)),N(m.Switch,"errorDisabledColor",we(m.error.main,.62)),N(m.Switch,"infoDisabledColor",we(m.info.main,.62)),N(m.Switch,"successDisabledColor",we(m.success.main,.62)),N(m.Switch,"warningDisabledColor",we(m.warning.main,.62)),N(m.TableCell,"border",we(ta(m.divider,1),.88)),N(m.Tooltip,"bg",ta(m.grey[700],.92))}if(m.mode==="dark"){N(m.Alert,"errorColor",we(m.error.light,.6)),N(m.Alert,"infoColor",we(m.info.light,.6)),N(m.Alert,"successColor",we(m.success.light,.6)),N(m.Alert,"warningColor",we(m.warning.light,.6)),N(m.Alert,"errorFilledBg",T("palette-error-dark")),N(m.Alert,"infoFilledBg",T("palette-info-dark")),N(m.Alert,"successFilledBg",T("palette-success-dark")),N(m.Alert,"warningFilledBg",T("palette-warning-dark")),N(m.Alert,"errorFilledColor",Xt(()=>m.getContrastText(m.error.dark))),N(m.Alert,"infoFilledColor",Xt(()=>m.getContrastText(m.info.dark))),N(m.Alert,"successFilledColor",Xt(()=>m.getContrastText(m.success.dark))),N(m.Alert,"warningFilledColor",Xt(()=>m.getContrastText(m.warning.dark))),N(m.Alert,"errorStandardBg",Se(m.error.light,.9)),N(m.Alert,"infoStandardBg",Se(m.info.light,.9)),N(m.Alert,"successStandardBg",Se(m.success.light,.9)),N(m.Alert,"warningStandardBg",Se(m.warning.light,.9)),N(m.Alert,"errorIconColor",T("palette-error-main")),N(m.Alert,"infoIconColor",T("palette-info-main")),N(m.Alert,"successIconColor",T("palette-success-main")),N(m.Alert,"warningIconColor",T("palette-warning-main")),N(m.AppBar,"defaultBg",T("palette-grey-900")),N(m.AppBar,"darkBg",T("palette-background-paper")),N(m.AppBar,"darkColor",T("palette-text-primary")),N(m.Avatar,"defaultBg",T("palette-grey-600")),N(m.Button,"inheritContainedBg",T("palette-grey-800")),N(m.Button,"inheritContainedHoverBg",T("palette-grey-700")),N(m.Chip,"defaultBorder",T("palette-grey-700")),N(m.Chip,"defaultAvatarColor",T("palette-grey-300")),N(m.Chip,"defaultIconColor",T("palette-grey-300")),N(m.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),N(m.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),N(m.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),N(m.LinearProgress,"primaryBg",Se(m.primary.main,.5)),N(m.LinearProgress,"secondaryBg",Se(m.secondary.main,.5)),N(m.LinearProgress,"errorBg",Se(m.error.main,.5)),N(m.LinearProgress,"infoBg",Se(m.info.main,.5)),N(m.LinearProgress,"successBg",Se(m.success.main,.5)),N(m.LinearProgress,"warningBg",Se(m.warning.main,.5)),N(m.Skeleton,"bg",`rgba(${T("palette-text-primaryChannel")} / 0.13)`),N(m.Slider,"primaryTrack",Se(m.primary.main,.5)),N(m.Slider,"secondaryTrack",Se(m.secondary.main,.5)),N(m.Slider,"errorTrack",Se(m.error.main,.5)),N(m.Slider,"infoTrack",Se(m.info.main,.5)),N(m.Slider,"successTrack",Se(m.success.main,.5)),N(m.Slider,"warningTrack",Se(m.warning.main,.5));const D=ra(m.background.default,.98);N(m.SnackbarContent,"bg",D),N(m.SnackbarContent,"color",Xt(()=>m.getContrastText(D))),N(m.SpeedDialAction,"fabHoverBg",ra(m.background.paper,.15)),N(m.StepConnector,"border",T("palette-grey-600")),N(m.StepContent,"border",T("palette-grey-600")),N(m.Switch,"defaultColor",T("palette-grey-300")),N(m.Switch,"defaultDisabledColor",T("palette-grey-600")),N(m.Switch,"primaryDisabledColor",Se(m.primary.main,.55)),N(m.Switch,"secondaryDisabledColor",Se(m.secondary.main,.55)),N(m.Switch,"errorDisabledColor",Se(m.error.main,.55)),N(m.Switch,"infoDisabledColor",Se(m.info.main,.55)),N(m.Switch,"successDisabledColor",Se(m.success.main,.55)),N(m.Switch,"warningDisabledColor",Se(m.warning.main,.55)),N(m.TableCell,"border",Se(ta(m.divider,1),.68)),N(m.Tooltip,"bg",ta(m.grey[700],.92))}or(m.background,"default"),or(m.background,"paper"),or(m.common,"background"),or(m.common,"onBackground"),or(m,"divider"),Object.keys(m).forEach(D=>{const $=m[D];D!=="tonalOffset"&&$&&typeof $=="object"&&($.main&&N(m[D],"mainChannel",ao(io($.main))),$.light&&N(m[D],"lightChannel",ao(io($.light))),$.dark&&N(m[D],"darkChannel",ao(io($.dark))),$.contrastText&&N(m[D],"contrastTextChannel",ao(io($.contrastText))),D==="text"&&(or(m[D],"primary"),or(m[D],"secondary")),D==="action"&&($.active&&or(m[D],"active"),$.selected&&or(m[D],"selected")))})}),k=t.reduce((L,m)=>wt(L,m),k);const j={prefix:a,disableCssColorScheme:o,shouldSkipGeneratingVar:i,getSelector:c0(k)},{vars:P,generateThemeVars:B,generateStyleSheets:F}=$y(k,j);return k.vars=P,Object.entries(k.colorSchemes[k.defaultColorScheme]).forEach(([L,m])=>{k[L]=m}),k.generateThemeVars=B,k.generateStyleSheets=F,k.generateSpacing=function(){return fe.createSpacing(c.spacing,Gs(this))},k.getColorSchemeSelector=By(s),k.spacing=k.generateSpacing(),k.shouldSkipGeneratingVar=i,k.unstable_sxConfig={...ri,...c?.unstable_sxConfig},k.unstable_sx=function(L){return An({sx:L,theme:this})},k.toRuntimeSource=Id,k}function Nc(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:Js({...r===!0?{}:r.palette,mode:t})})}function m0(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:o=r?void 0:{light:!0},defaultColorScheme:a=r?.mode,...i}=e,s=a||"light",l=o?.[s],c={...o,...r?{[s]:{...typeof l!="boolean"&&l,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return rs(e,...t);let d=r;"palette"in e||c[s]&&(c[s]!==!0?d=c[s].palette:s==="dark"&&(d={mode:"dark"}));const p=rs({...e,palette:d},...t);return p.defaultColorScheme=s,p.colorSchemes=c,p.palette.mode==="light"&&(p.colorSchemes.light={...c.light!==!0&&c.light,palette:p.palette},Nc(p,"dark",c.dark)),p.palette.mode==="dark"&&(p.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:p.palette},Nc(p,"light",c.light)),p}return!r&&!("light"in c)&&s==="light"&&(c.light=!0),h0({...i,colorSchemes:c,defaultColorScheme:s,...typeof n!="boolean"&&n},...t)}const el=m0(),tl="$$material";function f0(){const e=fe.useTheme(el);return e[tl]||e}function g0(e){const{variants:t,...r}=e,n={variants:t,style:jc(r),isProcessed:!0};return n.style===r||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=jc(o.style))}),n}const y0=Zs();function Tr(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function b0(e){return e?(t,r)=>r[e]:null}function x0(e,t,r){e.theme=S0(e.theme)?r:e.theme[t]||e.theme}function ma(e,t){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(n=>ma(e,n));if(Array.isArray(r?.variants)){let n;if(r.isProcessed)n=r.style;else{const{variants:o,...a}=r;n=a}return Td(e,r.variants,[n])}return r?.isProcessed?r.style:r}function Td(e,t,r=[]){let n;e:for(let o=0;o<t.length;o+=1){const a=t[o];if(typeof a.props=="function"){if(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),!a.props(n))continue}else for(const i in a.props)if(e[i]!==a.props[i]&&e.ownerState?.[i]!==a.props[i])continue e;typeof a.style=="function"?(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),r.push(a.style(n))):r.push(a.style)}return r}function v0(e={}){const{themeId:t,defaultTheme:r=y0,rootShouldForwardProp:n=Tr,slotShouldForwardProp:o=Tr}=e;function a(i){x0(i,t,r)}return(i,s={})=>{Iy(i,k=>k.filter(j=>j!==An));const{name:l,slot:c,skipVariantsResolver:d,skipSx:p,overridesResolver:h=b0(C0(c)),...f}=s,g=d!==void 0?d:c&&c!=="Root"&&c!=="root"||!1,y=p||!1;let v=Tr;c==="Root"||c==="root"?v=n:c?v=o:w0(i)&&(v=void 0);const b=Py(i,{shouldForwardProp:v,label:void 0,...f}),C=k=>{if(k.__emotion_real===k)return k;if(typeof k=="function")return function(j){return ma(j,k)};if(dr(k)){const j=g0(k);return j.variants?function(P){return ma(P,j)}:j.style}return k},w=(...k)=>{const j=[],P=k.map(C),B=[];if(j.push(a),l&&h&&B.push(function(m){const T=m.theme.components?.[l]?.styleOverrides;if(!T)return null;const D={};for(const $ in T)D[$]=ma(m,T[$]);return h(m,D)}),l&&!g&&B.push(function(m){const T=m.theme?.components?.[l]?.variants;return T?Td(m,T):null}),y||B.push(An),Array.isArray(P[0])){const m=P.shift(),T=new Array(j.length).fill(""),D=new Array(B.length).fill("");let $;$=[...T,...m,...D],$.raw=[...T,...m.raw,...D],j.unshift($)}const F=[...j,...P,...B],L=b(...F);return i.muiName&&(L.muiName=i.muiName),L};return b.withConfig&&(w.withConfig=b.withConfig),w}}function S0(e){for(const t in e)return!1;return!0}function w0(e){return typeof e=="string"&&e.charCodeAt(0)>96}function C0(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function k0(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const rl=e=>k0(e)&&e!=="classes",Te=v0({themeId:tl,defaultTheme:el,rootShouldForwardProp:rl}),nl=fe.unstable_memoTheme;function $n(e){return _y(e)}function Dn(e,t,r="Mui"){const n={};return t.forEach(o=>{n[o]=Ln(e,o,r)}),n}function P0(e){return Ln("MuiSvgIcon",e)}Dn("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const I0=e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root",t!=="inherit"&&`color${Gt(t)}`,`fontSize${Gt(r)}`]};return No(o,P0,n)},j0=Te("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${Gt(r.color)}`],t[`fontSize${Gt(r.fontSize)}`]]}})(nl(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),ns=S.forwardRef(function(e,t){const r=$n({props:e,name:"MuiSvgIcon"}),{children:n,className:o,color:a="inherit",component:i="svg",fontSize:s="medium",htmlColor:l,inheritViewBox:c=!1,titleAccess:d,viewBox:p="0 0 24 24",...h}=r,f=S.isValidElement(n)&&n.type==="svg",g={...r,color:a,component:i,fontSize:s,instanceFontSize:e.fontSize,inheritViewBox:c,viewBox:p,hasSvgAsChild:f},y={};c||(y.viewBox=p);const v=I0(g);return u.jsxs(j0,{as:i,className:Fe(v.root,o),focusable:"false",color:l,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:t,...y,...h,...f&&n.props,ownerState:g,children:[f?n.props.children:n,d?u.jsx("title",{children:d}):null]})});ns.muiName="SvgIcon";function Ee(e,t){function r(n,o){return u.jsx(ns,{"data-testid":void 0,ref:o,...n,children:e})}return r.muiName=ns.muiName,S.memo(S.forwardRef(r))}function E0(e){const{controlled:t,default:r}=e,{current:n}=S.useRef(t!==void 0),[o,a]=S.useState(r),i=n?t:o,s=S.useCallback(l=>{n||a(l)},[]);return[i,s]}function fa(e){const t=S.useRef(e);return jy(()=>{t.current=e}),S.useRef((...r)=>(0,t.current)(...r)).current}function Ta(...e){const t=S.useRef(void 0),r=S.useCallback(n=>{const o=e.map(a=>{if(a==null)return null;if(typeof a=="function"){const i=a,s=i(n);return typeof s=="function"?s:()=>{i(null)}}return a.current=n,()=>{a.current=null}});return()=>{o.forEach(a=>a?.())}},e);return S.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}function T0(e,t){const r=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&r>=65&&r<=90&&typeof t=="function"}function R0(e,t){if(!e)return t;function r(i,s){const l={};return Object.keys(s).forEach(c=>{T0(c,s[c])&&typeof i[c]=="function"&&(l[c]=(...d)=>{i[c](...d),s[c](...d)})}),l}if(typeof e=="function"||typeof t=="function")return i=>{const s=typeof t=="function"?t(i):t,l=typeof e=="function"?e({...i,...s}):e,c=Fe(i?.className,s?.className,l?.className),d=r(l,s);return{...s,...l,...d,...!!c&&{className:c},...s?.style&&l?.style&&{style:{...s.style,...l.style}},...s?.sx&&l?.sx&&{sx:[...Array.isArray(s.sx)?s.sx:[s.sx],...Array.isArray(l.sx)?l.sx:[l.sx]]}}};const n=t,o=r(e,n),a=Fe(n?.className,e?.className);return{...t,...e,...o,...!!a&&{className:a},...n?.style&&e?.style&&{style:{...n.style,...e.style}},...n?.sx&&e?.sx&&{sx:[...Array.isArray(n.sx)?n.sx:[n.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}const oi=Ee(u.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"})),Oo=Ee(u.jsx("path",{d:"M17 7h-4v2h4c1.65 0 3 1.35 3 3s-1.35 3-3 3h-4v2h4c2.76 0 5-2.24 5-5s-2.24-5-5-5m-6 8H7c-1.65 0-3-1.35-3-3s1.35-3 3-3h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4zm-3-4h8v2H8z"})),qe="http://localhost/api/v0".replace(/\/+$/,"");class _r{constructor(t,r=qe,n=Be){R(this,"configuration");this.basePath=r,this.axios=n,t&&(this.configuration=t,this.basePath=t.basePath??r)}}class M0 extends Error{constructor(t,r){super(r),this.field=t,this.name="RequiredError"}}const Ve={},Ge="https://example.com",pe=function(e,t,r){if(r==null)throw new M0(t,`Required parameter ${t} was null or undefined when calling ${e}.`)};function os(e,t,r=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(n=>os(e,n,r)):Object.keys(t).forEach(n=>os(e,t[n],`${r}${r!==""?".":""}${n}`)):e.has(r)?e.append(r,t):e.set(r,t))}const Ke=function(e,...t){const r=new URLSearchParams(e.search);os(r,t),e.search=r.toString()},Qe=function(e){return e.pathname+e.search+e.hash},Ye=function(e,t,r,n){return(o=t,a=r)=>{const i={...e.options,url:(o.defaults.baseURL?"":n?.basePath??a)+e.url};return o.request(i)}},N0=function(e){return{getConnection:async(t,r,n={})=>{pe("getConnection","projectName",t),pe("getConnection","connectionName",r);const o="/projects/{projectName}/connections/{connectionName}".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(r))),a=new URL(o,Ge);let i;e&&(i=e.baseOptions);const s={method:"GET",...i,...n},l={};Ke(a,{});let c=i&&i.headers?i.headers:{};return s.headers={...l,...c,...n.headers},{url:Qe(a),options:s}},getQuerydata:async(t,r,n,o,a={})=>{pe("getQuerydata","projectName",t),pe("getQuerydata","connectionName",r);const i="/projects/{projectName}/connections/{connectionName}/queryData".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(r))),s=new URL(i,Ge);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...a},d={},p={};n!==void 0&&(p.sqlStatement=n),o!==void 0&&(p.options=o),Ke(s,p);let h=l&&l.headers?l.headers:{};return c.headers={...d,...h,...a.headers},{url:Qe(s),options:c}},getSqlsource:async(t,r,n,o={})=>{pe("getSqlsource","projectName",t),pe("getSqlsource","connectionName",r);const a="/projects/{projectName}/connections/{connectionName}/sqlSource".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(r))),i=new URL(a,Ge);let s;e&&(s=e.baseOptions);const l={method:"GET",...s,...o},c={},d={};n!==void 0&&(d.sqlStatement=n),Ke(i,d);let p=s&&s.headers?s.headers:{};return l.headers={...c,...p,...o.headers},{url:Qe(i),options:l}},getTablesource:async(t,r,n,o,a={})=>{pe("getTablesource","projectName",t),pe("getTablesource","connectionName",r);const i="/projects/{projectName}/connections/{connectionName}/tableSource".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(r))),s=new URL(i,Ge);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...a},d={},p={};n!==void 0&&(p.tableKey=n),o!==void 0&&(p.tablePath=o),Ke(s,p);let h=l&&l.headers?l.headers:{};return c.headers={...d,...h,...a.headers},{url:Qe(s),options:c}},getTemporarytable:async(t,r,n,o={})=>{pe("getTemporarytable","projectName",t),pe("getTemporarytable","connectionName",r);const a="/projects/{projectName}/connections/{connectionName}/temporaryTable".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(r))),i=new URL(a,Ge);let s;e&&(s=e.baseOptions);const l={method:"GET",...s,...o},c={},d={};n!==void 0&&(d.sqlStatement=n),Ke(i,d);let p=s&&s.headers?s.headers:{};return l.headers={...c,...p,...o.headers},{url:Qe(i),options:l}},getTest:async(t,r,n={})=>{pe("getTest","projectName",t),pe("getTest","connectionName",r);const o="/projects/{projectName}/connections/{connectionName}/test".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(r))),a=new URL(o,Ge);let i;e&&(i=e.baseOptions);const s={method:"GET",...i,...n},l={};Ke(a,{});let c=i&&i.headers?i.headers:{};return s.headers={...l,...c,...n.headers},{url:Qe(a),options:s}},listConnections:async(t,r={})=>{pe("listConnections","projectName",t);const n="/projects/{projectName}/connections".replace("{projectName}",encodeURIComponent(String(t))),o=new URL(n,Ge);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...r},s={};Ke(o,{});let l=a&&a.headers?a.headers:{};return i.headers={...s,...l,...r.headers},{url:Qe(o),options:i}},listSchemas:async(t,r,n={})=>{pe("listSchemas","projectName",t),pe("listSchemas","connectionName",r);const o="/projects/{projectName}/connections/{connectionName}/schemas".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(r))),a=new URL(o,Ge);let i;e&&(i=e.baseOptions);const s={method:"GET",...i,...n},l={};Ke(a,{});let c=i&&i.headers?i.headers:{};return s.headers={...l,...c,...n.headers},{url:Qe(a),options:s}},listTables:async(t,r,n,o={})=>{pe("listTables","projectName",t),pe("listTables","connectionName",r),pe("listTables","schemaName",n);const a="/projects/{projectName}/connections/{connectionName}/schemas/{schemaName}/tables".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(r))).replace("{schemaName}",encodeURIComponent(String(n))),i=new URL(a,Ge);let s;e&&(s=e.baseOptions);const l={method:"GET",...s,...o},c={};Ke(i,{});let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...o.headers},{url:Qe(i),options:l}}}},ar=function(e){const t=N0(e);return{async getConnection(r,n,o){const a=await t.getConnection(r,n,o),i=e?.serverIndex??0,s=Ve["ConnectionsApi.getConnection"]?.[i]?.url;return(l,c)=>Ye(a,Be,qe,e)(l,s||c)},async getQuerydata(r,n,o,a,i){const s=await t.getQuerydata(r,n,o,a,i),l=e?.serverIndex??0,c=Ve["ConnectionsApi.getQuerydata"]?.[l]?.url;return(d,p)=>Ye(s,Be,qe,e)(d,c||p)},async getSqlsource(r,n,o,a){const i=await t.getSqlsource(r,n,o,a),s=e?.serverIndex??0,l=Ve["ConnectionsApi.getSqlsource"]?.[s]?.url;return(c,d)=>Ye(i,Be,qe,e)(c,l||d)},async getTablesource(r,n,o,a,i){const s=await t.getTablesource(r,n,o,a,i),l=e?.serverIndex??0,c=Ve["ConnectionsApi.getTablesource"]?.[l]?.url;return(d,p)=>Ye(s,Be,qe,e)(d,c||p)},async getTemporarytable(r,n,o,a){const i=await t.getTemporarytable(r,n,o,a),s=e?.serverIndex??0,l=Ve["ConnectionsApi.getTemporarytable"]?.[s]?.url;return(c,d)=>Ye(i,Be,qe,e)(c,l||d)},async getTest(r,n,o){const a=await t.getTest(r,n,o),i=e?.serverIndex??0,s=Ve["ConnectionsApi.getTest"]?.[i]?.url;return(l,c)=>Ye(a,Be,qe,e)(l,s||c)},async listConnections(r,n){const o=await t.listConnections(r,n),a=e?.serverIndex??0,i=Ve["ConnectionsApi.listConnections"]?.[a]?.url;return(s,l)=>Ye(o,Be,qe,e)(s,i||l)},async listSchemas(r,n,o){const a=await t.listSchemas(r,n,o),i=e?.serverIndex??0,s=Ve["ConnectionsApi.listSchemas"]?.[i]?.url;return(l,c)=>Ye(a,Be,qe,e)(l,s||c)},async listTables(r,n,o,a){const i=await t.listTables(r,n,o,a),s=e?.serverIndex??0,l=Ve["ConnectionsApi.listTables"]?.[s]?.url;return(c,d)=>Ye(i,Be,qe,e)(c,l||d)}}};class Rd extends _r{getConnection(t,r,n){return ar(this.configuration).getConnection(t,r,n).then(o=>o(this.axios,this.basePath))}getQuerydata(t,r,n,o,a){return ar(this.configuration).getQuerydata(t,r,n,o,a).then(i=>i(this.axios,this.basePath))}getSqlsource(t,r,n,o){return ar(this.configuration).getSqlsource(t,r,n,o).then(a=>a(this.axios,this.basePath))}getTablesource(t,r,n,o,a){return ar(this.configuration).getTablesource(t,r,n,o,a).then(i=>i(this.axios,this.basePath))}getTemporarytable(t,r,n,o){return ar(this.configuration).getTemporarytable(t,r,n,o).then(a=>a(this.axios,this.basePath))}getTest(t,r,n){return ar(this.configuration).getTest(t,r,n).then(o=>o(this.axios,this.basePath))}listConnections(t,r){return ar(this.configuration).listConnections(t,r).then(n=>n(this.axios,this.basePath))}listSchemas(t,r,n){return ar(this.configuration).listSchemas(t,r,n).then(o=>o(this.axios,this.basePath))}listTables(t,r,n,o){return ar(this.configuration).listTables(t,r,n,o).then(a=>a(this.axios,this.basePath))}}const A0=function(e){return{listDatabases:async(t,r,n,o={})=>{pe("listDatabases","projectName",t),pe("listDatabases","packageName",r);const a="/projects/{projectName}/packages/{packageName}/databases".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(r))),i=new URL(a,Ge);let s;e&&(s=e.baseOptions);const l={method:"GET",...s,...o},c={},d={};n!==void 0&&(d.versionId=n),Ke(i,d);let p=s&&s.headers?s.headers:{};return l.headers={...c,...p,...o.headers},{url:Qe(i),options:l}}}},_0=function(e){const t=A0(e);return{async listDatabases(r,n,o,a){const i=await t.listDatabases(r,n,o,a),s=e?.serverIndex??0,l=Ve["DatabasesApi.listDatabases"]?.[s]?.url;return(c,d)=>Ye(i,Be,qe,e)(c,l||d)}}};class O0 extends _r{listDatabases(t,r,n,o){return _0(this.configuration).listDatabases(t,r,n,o).then(a=>a(this.axios,this.basePath))}}const L0=function(e){return{getModel:async(t,r,n,o,a={})=>{pe("getModel","projectName",t),pe("getModel","packageName",r),pe("getModel","path",n);const i="/projects/{projectName}/packages/{packageName}/models/{path}".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(r))).replace("{path}",encodeURIComponent(String(n))),s=new URL(i,Ge);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...a},d={},p={};o!==void 0&&(p.versionId=o),Ke(s,p);let h=l&&l.headers?l.headers:{};return c.headers={...d,...h,...a.headers},{url:Qe(s),options:c}},listModels:async(t,r,n,o={})=>{pe("listModels","projectName",t),pe("listModels","packageName",r);const a="/projects/{projectName}/packages/{packageName}/models".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(r))),i=new URL(a,Ge);let s;e&&(s=e.baseOptions);const l={method:"GET",...s,...o},c={},d={};n!==void 0&&(d.versionId=n),Ke(i,d);let p=s&&s.headers?s.headers:{};return l.headers={...c,...p,...o.headers},{url:Qe(i),options:l}}}},Ac=function(e){const t=L0(e);return{async getModel(r,n,o,a,i){const s=await t.getModel(r,n,o,a,i),l=e?.serverIndex??0,c=Ve["ModelsApi.getModel"]?.[l]?.url;return(d,p)=>Ye(s,Be,qe,e)(d,c||p)},async listModels(r,n,o,a){const i=await t.listModels(r,n,o,a),s=e?.serverIndex??0,l=Ve["ModelsApi.listModels"]?.[s]?.url;return(c,d)=>Ye(i,Be,qe,e)(c,l||d)}}};class ai extends _r{getModel(t,r,n,o,a){return Ac(this.configuration).getModel(t,r,n,o,a).then(i=>i(this.axios,this.basePath))}listModels(t,r,n,o){return Ac(this.configuration).listModels(t,r,n,o).then(a=>a(this.axios,this.basePath))}}const $0=function(e){return{getNotebook:async(t,r,n,o,a={})=>{pe("getNotebook","projectName",t),pe("getNotebook","packageName",r),pe("getNotebook","path",n);const i="/projects/{projectName}/packages/{packageName}/notebooks/{path}".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(r))).replace("{path}",encodeURIComponent(String(n))),s=new URL(i,Ge);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...a},d={},p={};o!==void 0&&(p.versionId=o),Ke(s,p);let h=l&&l.headers?l.headers:{};return c.headers={...d,...h,...a.headers},{url:Qe(s),options:c}},listNotebooks:async(t,r,n,o={})=>{pe("listNotebooks","projectName",t),pe("listNotebooks","packageName",r);const a="/projects/{projectName}/packages/{packageName}/notebooks".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(r))),i=new URL(a,Ge);let s;e&&(s=e.baseOptions);const l={method:"GET",...s,...o},c={},d={};n!==void 0&&(d.versionId=n),Ke(i,d);let p=s&&s.headers?s.headers:{};return l.headers={...c,...p,...o.headers},{url:Qe(i),options:l}}}},_c=function(e){const t=$0(e);return{async getNotebook(r,n,o,a,i){const s=await t.getNotebook(r,n,o,a,i),l=e?.serverIndex??0,c=Ve["NotebooksApi.getNotebook"]?.[l]?.url;return(d,p)=>Ye(s,Be,qe,e)(d,c||p)},async listNotebooks(r,n,o,a){const i=await t.listNotebooks(r,n,o,a),s=e?.serverIndex??0,l=Ve["NotebooksApi.listNotebooks"]?.[s]?.url;return(c,d)=>Ye(i,Be,qe,e)(c,l||d)}}};class Md extends _r{getNotebook(t,r,n,o,a){return _c(this.configuration).getNotebook(t,r,n,o,a).then(i=>i(this.axios,this.basePath))}listNotebooks(t,r,n,o){return _c(this.configuration).listNotebooks(t,r,n,o).then(a=>a(this.axios,this.basePath))}}const D0=function(e){return{getPackage:async(t,r,n,o,a={})=>{pe("getPackage","projectName",t),pe("getPackage","packageName",r);const i="/projects/{projectName}/packages/{packageName}".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(r))),s=new URL(i,Ge);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...a},d={},p={};n!==void 0&&(p.versionId=n),o!==void 0&&(p.reload=o),Ke(s,p);let h=l&&l.headers?l.headers:{};return c.headers={...d,...h,...a.headers},{url:Qe(s),options:c}},listPackages:async(t,r={})=>{pe("listPackages","projectName",t);const n="/projects/{projectName}/packages".replace("{projectName}",encodeURIComponent(String(t))),o=new URL(n,Ge);let a;e&&(a=e.baseOptions);const i={method:"GET",...a,...r},s={};Ke(o,{});let l=a&&a.headers?a.headers:{};return i.headers={...s,...l,...r.headers},{url:Qe(o),options:i}}}},Oc=function(e){const t=D0(e);return{async getPackage(r,n,o,a,i){const s=await t.getPackage(r,n,o,a,i),l=e?.serverIndex??0,c=Ve["PackagesApi.getPackage"]?.[l]?.url;return(d,p)=>Ye(s,Be,qe,e)(d,c||p)},async listPackages(r,n){const o=await t.listPackages(r,n),a=e?.serverIndex??0,i=Ve["PackagesApi.listPackages"]?.[a]?.url;return(s,l)=>Ye(o,Be,qe,e)(s,i||l)}}};class Nd extends _r{getPackage(t,r,n,o,a){return Oc(this.configuration).getPackage(t,r,n,o,a).then(i=>i(this.axios,this.basePath))}listPackages(t,r){return Oc(this.configuration).listPackages(t,r).then(n=>n(this.axios,this.basePath))}}const B0=function(e){return{getProject:async(t,r,n={})=>{pe("getProject","projectName",t);const o="/projects/{projectName}".replace("{projectName}",encodeURIComponent(String(t))),a=new URL(o,Ge);let i;e&&(i=e.baseOptions);const s={method:"GET",...i,...n},l={},c={};r!==void 0&&(c.reload=r),Ke(a,c);let d=i&&i.headers?i.headers:{};return s.headers={...l,...d,...n.headers},{url:Qe(a),options:s}},listProjects:async(t={})=>{const r="/projects",n=new URL(r,Ge);let o;e&&(o=e.baseOptions);const a={method:"GET",...o,...t},i={};Ke(n,{});let s=o&&o.headers?o.headers:{};return a.headers={...i,...s,...t.headers},{url:Qe(n),options:a}}}},Lc=function(e){const t=B0(e);return{async getProject(r,n,o){const a=await t.getProject(r,n,o),i=e?.serverIndex??0,s=Ve["ProjectsApi.getProject"]?.[i]?.url;return(l,c)=>Ye(a,Be,qe,e)(l,s||c)},async listProjects(r){const n=await t.listProjects(r),o=e?.serverIndex??0,a=Ve["ProjectsApi.listProjects"]?.[o]?.url;return(i,s)=>Ye(n,Be,qe,e)(i,a||s)}}};class Ad extends _r{getProject(t,r,n){return Lc(this.configuration).getProject(t,r,n).then(o=>o(this.axios,this.basePath))}listProjects(t){return Lc(this.configuration).listProjects(t).then(r=>r(this.axios,this.basePath))}}const q0=function(e){return{executeQuery:async(t,r,n,o,a,i,s,l={})=>{pe("executeQuery","projectName",t),pe("executeQuery","packageName",r),pe("executeQuery","path",n);const c="/projects/{projectName}/packages/{packageName}/queryResults/{path}".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(r))).replace("{path}",encodeURIComponent(String(n))),d=new URL(c,Ge);let p;e&&(p=e.baseOptions);const h={method:"GET",...p,...l},f={},g={};o!==void 0&&(g.query=o),a!==void 0&&(g.sourceName=a),i!==void 0&&(g.queryName=i),s!==void 0&&(g.versionId=s),Ke(d,g);let y=p&&p.headers?p.headers:{};return h.headers={...f,...y,...l.headers},{url:Qe(d),options:h}}}},F0=function(e){const t=q0(e);return{async executeQuery(r,n,o,a,i,s,l,c){const d=await t.executeQuery(r,n,o,a,i,s,l,c),p=e?.serverIndex??0,h=Ve["QueryresultsApi.executeQuery"]?.[p]?.url;return(f,g)=>Ye(d,Be,qe,e)(f,h||g)}}};class _d extends _r{executeQuery(t,r,n,o,a,i,s,l){return F0(this.configuration).executeQuery(t,r,n,o,a,i,s,l).then(c=>c(this.axios,this.basePath))}}const z0=function(e){return{listSchedules:async(t,r,n,o={})=>{pe("listSchedules","projectName",t),pe("listSchedules","packageName",r);const a="/projects/{projectName}/packages/{packageName}/schedules".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(r))),i=new URL(a,Ge);let s;e&&(s=e.baseOptions);const l={method:"GET",...s,...o},c={},d={};n!==void 0&&(d.versionId=n),Ke(i,d);let p=s&&s.headers?s.headers:{};return l.headers={...c,...p,...o.headers},{url:Qe(i),options:l}}}},W0=function(e){const t=z0(e);return{async listSchedules(r,n,o,a){const i=await t.listSchedules(r,n,o,a),s=e?.serverIndex??0,l=Ve["SchedulesApi.listSchedules"]?.[s]?.url;return(c,d)=>Ye(i,Be,qe,e)(c,l||d)}}};class U0 extends _r{listSchedules(t,r,n,o){return W0(this.configuration).listSchedules(t,r,n,o).then(a=>a(this.axios,this.basePath))}}class ct{constructor(t={}){R(this,"apiKey");R(this,"username");R(this,"password");R(this,"accessToken");R(this,"basePath");R(this,"serverIndex");R(this,"baseOptions");R(this,"formDataCtor");this.apiKey=t.apiKey,this.username=t.username,this.password=t.password,this.accessToken=t.accessToken,this.basePath=t.basePath,this.serverIndex=t.serverIndex,this.baseOptions={...t.baseOptions,headers:{...t.baseOptions?.headers}},this.formDataCtor=t.formDataCtor}isJsonMime(t){const r=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return t!==null&&(r.test(t)||t.toLowerCase()==="application/json-patch+json")}}const Od=[{id:"abap",name:"ABAP",import:()=>Promise.resolve().then(()=>require("./abap-BmBUA35e-Dwt2rH6y.cjs"))},{id:"actionscript-3",name:"ActionScript",import:()=>Promise.resolve().then(()=>require("./actionscript-3-zFUbzQa9-mj8Uhnsc.cjs"))},{id:"ada",name:"Ada",import:()=>Promise.resolve().then(()=>require("./ada-CBvPkFpZ-DZM58Vqs.cjs"))},{id:"angular-html",name:"Angular HTML",import:()=>Promise.resolve().then(()=>require("./angular-html-0fTdLuKf-iuJ7ajzA.cjs")).then(e=>e.f)},{id:"angular-ts",name:"Angular TypeScript",import:()=>Promise.resolve().then(()=>require("./angular-ts-wkniW60G-Cm4EfyWn.cjs"))},{id:"apache",name:"Apache Conf",import:()=>Promise.resolve().then(()=>require("./apache-CVNlsSDc-D7v5fxtZ.cjs"))},{id:"apex",name:"Apex",import:()=>Promise.resolve().then(()=>require("./apex-DFk3KRB1-4hrAnw0a.cjs"))},{id:"apl",name:"APL",import:()=>Promise.resolve().then(()=>require("./apl-TLDHFJX6-DZ13rf9a.cjs"))},{id:"applescript",name:"AppleScript",import:()=>Promise.resolve().then(()=>require("./applescript-CYMR_y0g-Cnd3Dxju.cjs"))},{id:"ara",name:"Ara",import:()=>Promise.resolve().then(()=>require("./ara-4QmU5e04-BQ2aGbFQ.cjs"))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>Promise.resolve().then(()=>require("./asciidoc-v_1bjgUg-C6nYvw8K.cjs"))},{id:"asm",name:"Assembly",import:()=>Promise.resolve().then(()=>require("./asm-RC0Yh-NZ-CQnBVCj-.cjs"))},{id:"astro",name:"Astro",import:()=>Promise.resolve().then(()=>require("./astro-Uf8_VxKJ--l1q7Jnf.cjs"))},{id:"awk",name:"AWK",import:()=>Promise.resolve().then(()=>require("./awk-gPH8MVMW-DUx4h__E.cjs"))},{id:"ballerina",name:"Ballerina",import:()=>Promise.resolve().then(()=>require("./ballerina-kvLnRU_e-CXlzbmzl.cjs"))},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>Promise.resolve().then(()=>require("./bat-BHYy44sT-DlMT9sut.cjs"))},{id:"beancount",name:"Beancount",import:()=>Promise.resolve().then(()=>require("./beancount-D-MADTs_-CyyiuUzM.cjs"))},{id:"berry",name:"Berry",aliases:["be"],import:()=>Promise.resolve().then(()=>require("./berry-Ci9U0o4h-B0EjuzrL.cjs"))},{id:"bibtex",name:"BibTeX",import:()=>Promise.resolve().then(()=>require("./bibtex-CX618D15-CfoG9xRq.cjs"))},{id:"bicep",name:"Bicep",import:()=>Promise.resolve().then(()=>require("./bicep-iuYiPopT-D6PH_9IY.cjs"))},{id:"blade",name:"Blade",import:()=>Promise.resolve().then(()=>require("./blade-BtR00Gx0-CC9iBOSk.cjs"))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>Promise.resolve().then(()=>require("./bsl-BIXPNqL4-C8J0Suid.cjs"))},{id:"c",name:"C",import:()=>Promise.resolve().then(()=>require("./c-DASdrs7p-C4sXGJZM.cjs"))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>Promise.resolve().then(()=>require("./cadence-BDALQi26-Dq2CYzXG.cjs"))},{id:"cairo",name:"Cairo",import:()=>Promise.resolve().then(()=>require("./cairo-tXZKA2PT-XMsK9HSC.cjs"))},{id:"clarity",name:"Clarity",import:()=>Promise.resolve().then(()=>require("./clarity-CNgV2Ths-ytMkUD5Q.cjs"))},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>Promise.resolve().then(()=>require("./clojure-CsKKFGwv-B_Wv414H.cjs"))},{id:"cmake",name:"CMake",import:()=>Promise.resolve().then(()=>require("./cmake-Dr-A3iJx-TBUaQXYY.cjs"))},{id:"cobol",name:"COBOL",import:()=>Promise.resolve().then(()=>require("./cobol-DMssKNmC-2IrH-LQK.cjs"))},{id:"codeowners",name:"CODEOWNERS",import:()=>Promise.resolve().then(()=>require("./codeowners-Bt9yU6NX-QhPK6lIJ.cjs"))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>Promise.resolve().then(()=>require("./codeql-DBNTqJi1-B7Q9tkDJ.cjs"))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>Promise.resolve().then(()=>require("./coffee-D_GzM8k1-DQThhwJg.cjs"))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>Promise.resolve().then(()=>require("./common-lisp-r7ZEOG7T-Ced3ctK5.cjs"))},{id:"coq",name:"Coq",import:()=>Promise.resolve().then(()=>require("./coq-CB6Pv_W9-BTRB4iqi.cjs"))},{id:"cpp",name:"C++",aliases:["c++"],import:()=>Promise.resolve().then(()=>require("./cpp-CJF2i3ah-mxGthENV.cjs"))},{id:"crystal",name:"Crystal",import:()=>Promise.resolve().then(()=>require("./crystal-BKWnaU3g-Dh9wsPqT.cjs"))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>Promise.resolve().then(()=>require("./csharp-CYWRhZ2R-TKds-MhG.cjs"))},{id:"css",name:"CSS",import:()=>Promise.resolve().then(()=>require("./css-D1aVdRIU-B0kbn78J.cjs"))},{id:"csv",name:"CSV",import:()=>Promise.resolve().then(()=>require("./csv-DvCncUGQ-BVJjiaC3.cjs"))},{id:"cue",name:"CUE",import:()=>Promise.resolve().then(()=>require("./cue-BXMrmvay-Cz4J-rnd.cjs"))},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>Promise.resolve().then(()=>require("./cypher-DTm5zNR1-DuKTiyez.cjs"))},{id:"d",name:"D",import:()=>Promise.resolve().then(()=>require("./d-D6ZXmn3l-BW9Wd7aK.cjs"))},{id:"dart",name:"Dart",import:()=>Promise.resolve().then(()=>require("./dart-Dz59Is3F-CWs-er6b.cjs"))},{id:"dax",name:"DAX",import:()=>Promise.resolve().then(()=>require("./dax-DTVGzydb-CDxFL2Kb.cjs"))},{id:"desktop",name:"Desktop",import:()=>Promise.resolve().then(()=>require("./desktop-Db9vb-dl-CFgo0jo7.cjs"))},{id:"diff",name:"Diff",import:()=>Promise.resolve().then(()=>require("./diff-XmNrvgM1-BsEkKwI8.cjs"))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>Promise.resolve().then(()=>require("./docker-DWH2onkn-hwiw4W8I.cjs"))},{id:"dotenv",name:"dotEnv",import:()=>Promise.resolve().then(()=>require("./dotenv-4337wvzu-CJ5o3G1C.cjs"))},{id:"dream-maker",name:"Dream Maker",import:()=>Promise.resolve().then(()=>require("./dream-maker-CvvfrJSx-DBharE9Q.cjs"))},{id:"edge",name:"Edge",import:()=>Promise.resolve().then(()=>require("./edge-CgxR-qhM-QOBckj2G.cjs"))},{id:"elixir",name:"Elixir",import:()=>Promise.resolve().then(()=>require("./elixir-DZkeSPwW-BCzkKkN0.cjs"))},{id:"elm",name:"Elm",import:()=>Promise.resolve().then(()=>require("./elm-BKuV1HE1-BuAwt4Hl.cjs"))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>Promise.resolve().then(()=>require("./emacs-lisp-BAefI874-CDDyFsvQ.cjs"))},{id:"erb",name:"ERB",import:()=>Promise.resolve().then(()=>require("./erb-BLwkpXUJ-D1H6o7M6.cjs"))},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>Promise.resolve().then(()=>require("./erlang-CmIiwF3I-3VgdrQXV.cjs"))},{id:"fennel",name:"Fennel",import:()=>Promise.resolve().then(()=>require("./fennel-DNqkz9pE-RbmrEXt1.cjs"))},{id:"fish",name:"Fish",import:()=>Promise.resolve().then(()=>require("./fish-DIm72t2T-CnamI0Ar.cjs"))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>Promise.resolve().then(()=>require("./fluent-BapTxJsC-DFpT66K8.cjs"))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>Promise.resolve().then(()=>require("./fortran-fixed-form-s9Hnb3av-CEjzHIOU.cjs"))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>Promise.resolve().then(()=>require("./fortran-free-form-CNDsBFUj-IaGrWIda.cjs"))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>Promise.resolve().then(()=>require("./fsharp-Cv0x43wb-BCqXh2V2.cjs"))},{id:"gdresource",name:"GDResource",import:()=>Promise.resolve().then(()=>require("./gdresource-CMcKXvgJ-DKu0rUhv.cjs"))},{id:"gdscript",name:"GDScript",import:()=>Promise.resolve().then(()=>require("./gdscript-D7aheHm--5N_43TPQ.cjs"))},{id:"gdshader",name:"GDShader",import:()=>Promise.resolve().then(()=>require("./gdshader-BGJEsM2Z-Bl85Hrm5.cjs"))},{id:"genie",name:"Genie",import:()=>Promise.resolve().then(()=>require("./genie-C9gPjc6J-DGsxMAbQ.cjs"))},{id:"gherkin",name:"Gherkin",import:()=>Promise.resolve().then(()=>require("./gherkin-bka1Exbx-CVV6nEUH.cjs"))},{id:"git-commit",name:"Git Commit Message",import:()=>Promise.resolve().then(()=>require("./git-commit-BspYIY3P-BVfAvSRj.cjs"))},{id:"git-rebase",name:"Git Rebase Message",import:()=>Promise.resolve().then(()=>require("./git-rebase--zLBTjUa-yZFCfYZI.cjs"))},{id:"gleam",name:"Gleam",import:()=>Promise.resolve().then(()=>require("./gleam-B4k9YFGD-nR4mjrhK.cjs"))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>Promise.resolve().then(()=>require("./glimmer-js-DhY9umHJ-B8qSrQ6z.cjs"))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>Promise.resolve().then(()=>require("./glimmer-ts-CCrHcYH5-BhxePz75.cjs"))},{id:"glsl",name:"GLSL",import:()=>Promise.resolve().then(()=>require("./glsl-XLGYNq5B-CKVGq6Vy.cjs"))},{id:"gnuplot",name:"Gnuplot",import:()=>Promise.resolve().then(()=>require("./gnuplot-DnWoRZt--CurtDYoJ.cjs"))},{id:"go",name:"Go",import:()=>Promise.resolve().then(()=>require("./go-BErP6iv1-CM9_GlwL.cjs"))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>Promise.resolve().then(()=>require("./graphql-DWpQF4JI-DAzySKco.cjs"))},{id:"groovy",name:"Groovy",import:()=>Promise.resolve().then(()=>require("./groovy-IWs5-NIO-BaVp9Il5.cjs"))},{id:"hack",name:"Hack",import:()=>Promise.resolve().then(()=>require("./hack-CQrV-ytR-DlrP0wJF.cjs"))},{id:"haml",name:"Ruby Haml",import:()=>Promise.resolve().then(()=>require("./haml-CMN0hQaL-D-xy9KwO.cjs"))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>Promise.resolve().then(()=>require("./handlebars-Cc-7fXX5-C3QFNHjc.cjs"))},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>Promise.resolve().then(()=>require("./haskell-CtlGos0K-suhyCHEm.cjs"))},{id:"haxe",name:"Haxe",import:()=>Promise.resolve().then(()=>require("./haxe-CZZ33vZw-BIQU1qHi.cjs"))},{id:"hcl",name:"HashiCorp HCL",import:()=>Promise.resolve().then(()=>require("./hcl-6hOg9WP4-CbQ1yCnz.cjs"))},{id:"hjson",name:"Hjson",import:()=>Promise.resolve().then(()=>require("./hjson-CgwED-oz-Ddklb4QM.cjs"))},{id:"hlsl",name:"HLSL",import:()=>Promise.resolve().then(()=>require("./hlsl-3-lv4gi7-B4NkiBfC.cjs"))},{id:"html",name:"HTML",import:()=>Promise.resolve().then(()=>require("./html-B0P_v3yU-Bx2ubL-P.cjs"))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>Promise.resolve().then(()=>require("./html-derivative-D59SHfh8-BWgQxp09.cjs"))},{id:"http",name:"HTTP",import:()=>Promise.resolve().then(()=>require("./http-Dcjm_K1m-CyYiumKc.cjs"))},{id:"hxml",name:"HXML",import:()=>Promise.resolve().then(()=>require("./hxml-BNKImryz-DflK5a38.cjs"))},{id:"hy",name:"Hy",import:()=>Promise.resolve().then(()=>require("./hy-C2xHhR6I-DpyTdO3T.cjs"))},{id:"imba",name:"Imba",import:()=>Promise.resolve().then(()=>require("./imba-Drd0AMDo-CtsqZbnp.cjs"))},{id:"ini",name:"INI",aliases:["properties"],import:()=>Promise.resolve().then(()=>require("./ini-BUcvsX-U-CymULaw_.cjs"))},{id:"java",name:"Java",import:()=>Promise.resolve().then(()=>require("./java-B7odJ7Ap-Bn1Lvoni.cjs"))},{id:"javascript",name:"JavaScript",aliases:["js"],import:()=>Promise.resolve().then(()=>require("./javascript-fa8UlHZE-Bnnicc83.cjs"))},{id:"jinja",name:"Jinja",import:()=>Promise.resolve().then(()=>require("./jinja-CCSYduCH-DFH8FT_u.cjs"))},{id:"jison",name:"Jison",import:()=>Promise.resolve().then(()=>require("./jison-BygvlveW-CAVWywU2.cjs"))},{id:"json",name:"JSON",import:()=>Promise.resolve().then(()=>require("./json-71t8ZF9g-y-J1j5EW.cjs"))},{id:"json5",name:"JSON5",import:()=>Promise.resolve().then(()=>require("./json5-Z7F6rA6a-CzvlWgZ7.cjs"))},{id:"jsonc",name:"JSON with Comments",import:()=>Promise.resolve().then(()=>require("./jsonc-Dphhs4m2-BnhWfmQw.cjs"))},{id:"jsonl",name:"JSON Lines",import:()=>Promise.resolve().then(()=>require("./jsonl-D9jj92Gg-BbGkWPJz.cjs"))},{id:"jsonnet",name:"Jsonnet",import:()=>Promise.resolve().then(()=>require("./jsonnet-DEQ7IUoJ-Bn--UDZ1.cjs"))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>Promise.resolve().then(()=>require("./jssm-j74e88UX-4CSVp8lc.cjs"))},{id:"jsx",name:"JSX",import:()=>Promise.resolve().then(()=>require("./jsx-Bkesy5tT-D8YwVp-7.cjs"))},{id:"julia",name:"Julia",aliases:["jl"],import:()=>Promise.resolve().then(()=>require("./julia-CiahampL-B6MmycY8.cjs"))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>Promise.resolve().then(()=>require("./kotlin-DCgZY7Ii-DDI6myF6.cjs"))},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>Promise.resolve().then(()=>require("./kusto-Cw029H-v-OZxALJZT.cjs"))},{id:"latex",name:"LaTeX",import:()=>Promise.resolve().then(()=>require("./latex-LfGCYGw5-BpRkh3pg.cjs"))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>Promise.resolve().then(()=>require("./lean-CYSet4vs-D1iY-35j.cjs"))},{id:"less",name:"Less",import:()=>Promise.resolve().then(()=>require("./less-DQA4v-Nm-DIaY7vQJ.cjs"))},{id:"liquid",name:"Liquid",import:()=>Promise.resolve().then(()=>require("./liquid-CvufO3kO-HvZpXeqg.cjs"))},{id:"log",name:"Log file",import:()=>Promise.resolve().then(()=>require("./log-D2eRfqDn-BIXUeBaj.cjs"))},{id:"logo",name:"Logo",import:()=>Promise.resolve().then(()=>require("./logo-QEAtGWZ9-B2d3b27P.cjs"))},{id:"lua",name:"Lua",import:()=>Promise.resolve().then(()=>require("./lua-BVfhNLDr-uB28QHL6.cjs"))},{id:"luau",name:"Luau",import:()=>Promise.resolve().then(()=>require("./luau-BjYGiqID-CvqAeq4F.cjs"))},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>Promise.resolve().then(()=>require("./make-BjuHP00g-Oob5Z9Pk.cjs"))},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>Promise.resolve().then(()=>require("./markdown-B6guhLWd-BGBuj4LZ.cjs"))},{id:"marko",name:"Marko",import:()=>Promise.resolve().then(()=>require("./marko-CHlMS8w5-Bly6x4mc.cjs"))},{id:"matlab",name:"MATLAB",import:()=>Promise.resolve().then(()=>require("./matlab-BpQlIJiw-CbN2rF6P.cjs"))},{id:"mdc",name:"MDC",import:()=>Promise.resolve().then(()=>require("./mdc-4K6B6lHG-DgYKiLhu.cjs"))},{id:"mdx",name:"MDX",import:()=>Promise.resolve().then(()=>require("./mdx-DIoECIFU-Cl31h8mi.cjs"))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>Promise.resolve().then(()=>require("./mermaid-BZ7WHNIe-CSogK_LM.cjs"))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>Promise.resolve().then(()=>require("./mipsasm-DusDYkFc-BseoYJQp.cjs"))},{id:"mojo",name:"Mojo",import:()=>Promise.resolve().then(()=>require("./mojo-CY9jaezJ-D8QAG3Ze.cjs"))},{id:"move",name:"Move",import:()=>Promise.resolve().then(()=>require("./move-ChphFumd-DaBrcjat.cjs"))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>Promise.resolve().then(()=>require("./narrat-Dz4d7OmN-oOfAO4q8.cjs"))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>Promise.resolve().then(()=>require("./nextflow-DW0Yq9a2-BxJSKvPb.cjs"))},{id:"nginx",name:"Nginx",import:()=>Promise.resolve().then(()=>require("./nginx-Can2eAjw-rA5kE0A8.cjs"))},{id:"nim",name:"Nim",import:()=>Promise.resolve().then(()=>require("./nim-B3r2RtQZ-CRDytbsR.cjs"))},{id:"nix",name:"Nix",import:()=>Promise.resolve().then(()=>require("./nix-Cg5uV_xg-DNME0Ea7.cjs"))},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>Promise.resolve().then(()=>require("./nushell-BfRnzRWn-DI9Z3l3M.cjs"))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>Promise.resolve().then(()=>require("./objective-c-BGg9R27G-DVx8Rcni.cjs"))},{id:"objective-cpp",name:"Objective-C++",import:()=>Promise.resolve().then(()=>require("./objective-cpp-CJ3y3V_5-s6XI7Jvk.cjs"))},{id:"ocaml",name:"OCaml",import:()=>Promise.resolve().then(()=>require("./ocaml-BZLsfx_o-kUzDDUf2.cjs"))},{id:"pascal",name:"Pascal",import:()=>Promise.resolve().then(()=>require("./pascal-l2bqd7Dz-D509_I72.cjs"))},{id:"perl",name:"Perl",import:()=>Promise.resolve().then(()=>require("./perl-DaMQyPwp-C9Yq1yZR.cjs"))},{id:"php",name:"PHP",import:()=>Promise.resolve().then(()=>require("./php-BL3EfPBi-Ctb1WwmF.cjs"))},{id:"plsql",name:"PL/SQL",import:()=>Promise.resolve().then(()=>require("./plsql-oVq_K_wH-C_qH_YOK.cjs"))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>Promise.resolve().then(()=>require("./po-5jaeIyVd-CBsLQIcu.cjs"))},{id:"polar",name:"Polar",import:()=>Promise.resolve().then(()=>require("./polar-wcLp8ci7-De-CDeYv.cjs"))},{id:"postcss",name:"PostCSS",import:()=>Promise.resolve().then(()=>require("./postcss-BZ3MNRIJ-BtcsgaYj.cjs"))},{id:"powerquery",name:"PowerQuery",import:()=>Promise.resolve().then(()=>require("./powerquery-CgRa2XRw-B0rHn13V.cjs"))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>Promise.resolve().then(()=>require("./powershell-Diwyv8Eh-rCX2OYXT.cjs"))},{id:"prisma",name:"Prisma",import:()=>Promise.resolve().then(()=>require("./prisma-COL_v1x4-BaaUHYMp.cjs"))},{id:"prolog",name:"Prolog",import:()=>Promise.resolve().then(()=>require("./prolog-CuvJOxqT-DrXD2tGS.cjs"))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>Promise.resolve().then(()=>require("./proto-o9HLmF90-BtmQjBQu.cjs"))},{id:"pug",name:"Pug",aliases:["jade"],import:()=>Promise.resolve().then(()=>require("./pug-HKe4Luo3-DATD2ck2.cjs"))},{id:"puppet",name:"Puppet",import:()=>Promise.resolve().then(()=>require("./puppet-wpGOnQp5-cIrXIuy8.cjs"))},{id:"purescript",name:"PureScript",import:()=>Promise.resolve().then(()=>require("./purescript-B_1NgE2N-CX9QPs2N.cjs"))},{id:"python",name:"Python",aliases:["py"],import:()=>Promise.resolve().then(()=>require("./python-xYxLFJY--B9x3euv6.cjs"))},{id:"qml",name:"QML",import:()=>Promise.resolve().then(()=>require("./qml-FlMIyjU9-DosAZz3a.cjs"))},{id:"qmldir",name:"QML Directory",import:()=>Promise.resolve().then(()=>require("./qmldir-BInDYbpo-DNF9H2ir.cjs"))},{id:"qss",name:"Qt Style Sheets",import:()=>Promise.resolve().then(()=>require("./qss-D-h4NdUG-C744dLby.cjs"))},{id:"r",name:"R",import:()=>Promise.resolve().then(()=>require("./r-F-9I-ITZ-DgOc9oMe.cjs"))},{id:"racket",name:"Racket",import:()=>Promise.resolve().then(()=>require("./racket-BoD1TBFT-Do9_vqnd.cjs"))},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>Promise.resolve().then(()=>require("./raku-IaYcw19m-BW8wAUIz.cjs"))},{id:"razor",name:"ASP.NET Razor",import:()=>Promise.resolve().then(()=>require("./razor-CeqqNtyB-BA9H6h3O.cjs"))},{id:"reg",name:"Windows Registry Script",import:()=>Promise.resolve().then(()=>require("./reg-CMUdAgIP-CGWN_v-z.cjs"))},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>Promise.resolve().then(()=>require("./regexp-GiFkbxS--N7Z4hEeU.cjs"))},{id:"rel",name:"Rel",import:()=>Promise.resolve().then(()=>require("./rel-BaRn3QX7-BYqA7mnV.cjs"))},{id:"riscv",name:"RISC-V",import:()=>Promise.resolve().then(()=>require("./riscv-B9V3SsvW-ayQMUpo9.cjs"))},{id:"rst",name:"reStructuredText",import:()=>Promise.resolve().then(()=>require("./rst-C3D6-dqL-BT5HStkB.cjs"))},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>Promise.resolve().then(()=>require("./ruby-DcPLUUK3-wN4H1UJ4.cjs"))},{id:"rust",name:"Rust",aliases:["rs"],import:()=>Promise.resolve().then(()=>require("./rust-Pc7DCsZD-BnFKGEfa.cjs"))},{id:"sas",name:"SAS",import:()=>Promise.resolve().then(()=>require("./sas-tDSYjXcL-CVXyyAVy.cjs"))},{id:"sass",name:"Sass",import:()=>Promise.resolve().then(()=>require("./sass-iCyS6eP9-B9gYryDE.cjs"))},{id:"scala",name:"Scala",import:()=>Promise.resolve().then(()=>require("./scala-Cly-fENF-C85dOwSU.cjs"))},{id:"scheme",name:"Scheme",import:()=>Promise.resolve().then(()=>require("./scheme-Zi24oEYu-B_XUaARm.cjs"))},{id:"scss",name:"SCSS",import:()=>Promise.resolve().then(()=>require("./scss-DhHc4lxB-DlTye6oP.cjs"))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>Promise.resolve().then(()=>require("./sdbl-BBamrXFL-7Y5u0OW0.cjs"))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>Promise.resolve().then(()=>require("./shaderlab-CvqEIoL0-CHjycJTX.cjs"))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>Promise.resolve().then(()=>require("./shellscript-Dn0-btNd-3DYM9fut.cjs"))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>Promise.resolve().then(()=>require("./shellsession-8OLo3sB6-1ZxGYG-g.cjs"))},{id:"smalltalk",name:"Smalltalk",import:()=>Promise.resolve().then(()=>require("./smalltalk-Cns31tKw-CCvytUuW.cjs"))},{id:"solidity",name:"Solidity",import:()=>Promise.resolve().then(()=>require("./solidity-BG_k8fA_-BcNcjFC4.cjs"))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>Promise.resolve().then(()=>require("./soy-EwHMOVPj-BYqzy0Qe.cjs"))},{id:"sparql",name:"SPARQL",import:()=>Promise.resolve().then(()=>require("./sparql-DhuelBut-De7XP5Cr.cjs"))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>Promise.resolve().then(()=>require("./splunk-CTqDjQdo-CzITjJj7.cjs"))},{id:"sql",name:"SQL",import:()=>Promise.resolve().then(()=>require("./sql-DCkt643--BqWZrLHB.cjs"))},{id:"ssh-config",name:"SSH Config",import:()=>Promise.resolve().then(()=>require("./ssh-config-DHHGll-v-DUPeuEdB.cjs"))},{id:"stata",name:"Stata",import:()=>Promise.resolve().then(()=>require("./stata-Dok6hMw0-Dx7ri5v3.cjs"))},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>Promise.resolve().then(()=>require("./stylus-n_9f0QQ5-ByHs6N-o.cjs"))},{id:"svelte",name:"Svelte",import:()=>Promise.resolve().then(()=>require("./svelte-01qw6Rxm-Dkzwx26T.cjs"))},{id:"swift",name:"Swift",import:()=>Promise.resolve().then(()=>require("./swift-BAWqNR8A-C5DnOriA.cjs"))},{id:"system-verilog",name:"SystemVerilog",import:()=>Promise.resolve().then(()=>require("./system-verilog-Cui-g-ut-ClPLYLwh.cjs"))},{id:"systemd",name:"Systemd Units",import:()=>Promise.resolve().then(()=>require("./systemd-CsKYQIQK-BASX0DlX.cjs"))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>Promise.resolve().then(()=>require("./talonscript-D2dGh8FO-DkCSnLHD.cjs"))},{id:"tasl",name:"Tasl",import:()=>Promise.resolve().then(()=>require("./tasl-D3W8HMV6-BAQJK7KZ.cjs"))},{id:"tcl",name:"Tcl",import:()=>Promise.resolve().then(()=>require("./tcl-2y0Fuc4S-CwJAYTvh.cjs"))},{id:"templ",name:"Templ",import:()=>Promise.resolve().then(()=>require("./templ-Hmy8U0DD-zKf-hrbF.cjs"))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>Promise.resolve().then(()=>require("./terraform-BGW6Oerf-s-pzyVvp.cjs"))},{id:"tex",name:"TeX",import:()=>Promise.resolve().then(()=>require("./tex-mHs7a43s-CNkFtfz8.cjs"))},{id:"toml",name:"TOML",import:()=>Promise.resolve().then(()=>require("./toml-CQSfOn0e-CyMM7IXy.cjs"))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>Promise.resolve().then(()=>require("./ts-tags-DYZ4SGcN-BlDvJKty.cjs"))},{id:"tsv",name:"TSV",import:()=>Promise.resolve().then(()=>require("./tsv-BtvSkaG0-DqNGnuVj.cjs"))},{id:"tsx",name:"TSX",import:()=>Promise.resolve().then(()=>require("./tsx-DiGsgWT8-DpBRUnKC.cjs"))},{id:"turtle",name:"Turtle",import:()=>Promise.resolve().then(()=>require("./turtle-BJ2wmjPc-DfO3eAsu.cjs"))},{id:"twig",name:"Twig",import:()=>Promise.resolve().then(()=>require("./twig-BmytkGQV-Cn_QYGU2.cjs"))},{id:"typescript",name:"TypeScript",aliases:["ts"],import:()=>Promise.resolve().then(()=>require("./typescript-buWNZFwO-BqvpT6pB.cjs"))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>Promise.resolve().then(()=>require("./typespec-bLbdsxJL-P-ZVy8yC.cjs"))},{id:"typst",name:"Typst",aliases:["typ"],import:()=>Promise.resolve().then(()=>require("./typst-Y9_SmXTs-BVh2IsT9.cjs"))},{id:"v",name:"V",import:()=>Promise.resolve().then(()=>require("./v-wa8Orrdd-BUlE9136.cjs"))},{id:"vala",name:"Vala",import:()=>Promise.resolve().then(()=>require("./vala-DRdriFr_-BIymb2K_.cjs"))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>Promise.resolve().then(()=>require("./vb-E2_-jk4M-IXOh8mqV.cjs"))},{id:"verilog",name:"Verilog",import:()=>Promise.resolve().then(()=>require("./verilog-B1iBoR5_-BiglCqvO.cjs"))},{id:"vhdl",name:"VHDL",import:()=>Promise.resolve().then(()=>require("./vhdl-CRVaAhXk-CJUzuS2t.cjs"))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>Promise.resolve().then(()=>require("./viml-B-zWOd7Z-B1nKLcgt.cjs"))},{id:"vue",name:"Vue",import:()=>Promise.resolve().then(()=>require("./vue-Bl1uVNsA-B4RiOuMx.cjs"))},{id:"vue-html",name:"Vue HTML",import:()=>Promise.resolve().then(()=>require("./vue-html-DHr5wjBG-BMqayJuq.cjs"))},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>Promise.resolve().then(()=>require("./vyper-DWutKXpa-CO9xUkIY.cjs"))},{id:"wasm",name:"WebAssembly",import:()=>Promise.resolve().then(()=>require("./wasm-Bv5f0gKv-CdIThIat.cjs"))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>Promise.resolve().then(()=>require("./wenyan-BMYnfus1-BSJ3fk7e.cjs"))},{id:"wgsl",name:"WGSL",import:()=>Promise.resolve().then(()=>require("./wgsl-DnPoPGDU-d3zZE7ZN.cjs"))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>Promise.resolve().then(()=>require("./wikitext-CntM04PE-BRCqXN2g.cjs"))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>Promise.resolve().then(()=>require("./wolfram-Ws5qPlX9-C3rR92zj.cjs"))},{id:"xml",name:"XML",import:()=>Promise.resolve().then(()=>require("./xml-ChBsf5uy-CyV-nzFi.cjs"))},{id:"xsl",name:"XSL",import:()=>Promise.resolve().then(()=>require("./xsl-BefjlXrd-Bgz0N8I4.cjs"))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>Promise.resolve().then(()=>require("./yaml-Bbg74JKr-7DV6pRKj.cjs"))},{id:"zenscript",name:"ZenScript",import:()=>Promise.resolve().then(()=>require("./zenscript-C0RKE4nU-BWMxwjeH.cjs"))},{id:"zig",name:"Zig",import:()=>Promise.resolve().then(()=>require("./zig-D6SXBGNm-yAcNfpgW.cjs"))}],H0=Object.fromEntries(Od.map(e=>[e.id,e.import])),V0=Object.fromEntries(Od.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),G0={...H0,...V0},K0=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>Promise.resolve().then(()=>require("./andromeeda-uXNdzNpk-BXc5FOIb.cjs"))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>Promise.resolve().then(()=>require("./aurora-x-BwoVEUWZ-C5IpmIOG.cjs"))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./ayu-dark-CxPZkpb2-Cv7nTiif.cjs"))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>Promise.resolve().then(()=>require("./catppuccin-frappe-BrTOiad2-DXAedND3.cjs"))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>Promise.resolve().then(()=>require("./catppuccin-latte-D-dc_R4m-mwGw3-Ej.cjs"))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>Promise.resolve().then(()=>require("./catppuccin-macchiato-DN4jOp0G-cQCk9ADg.cjs"))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>Promise.resolve().then(()=>require("./catppuccin-mocha-B8yCE3-3-ClSzDZSl.cjs"))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>Promise.resolve().then(()=>require("./dark-plus-pUHDTVV0-Cd5emcYO.cjs"))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>Promise.resolve().then(()=>require("./dracula-BtZx2Kac-BNgwAJ-d.cjs"))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>Promise.resolve().then(()=>require("./dracula-soft-BKa-aqBv-BHZ7sHFu.cjs"))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./everforest-dark-DMCBqXCK-_sBMomR1.cjs"))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>Promise.resolve().then(()=>require("./everforest-light-BbXl82Em-H0xoYxl0.cjs"))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-DenFmJkN-BKL9xNgN.cjs"))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-default-BJPUVz4H-Dsv5MuSi.cjs"))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-dimmed-DUshB20C-CtB9hz8U.cjs"))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-high-contrast-D3aGCnF8-BqZVM-jF.cjs"))},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>Promise.resolve().then(()=>require("./github-light-JYsPkUQd-BFTOhCbz.cjs"))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>Promise.resolve().then(()=>require("./github-light-default-D99KPAby-BZoWH9dH.cjs"))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>Promise.resolve().then(()=>require("./github-light-high-contrast-BbmZE-Mp-Ks3kPGJU.cjs"))},{id:"houston",displayName:"Houston",type:"dark",import:()=>Promise.resolve().then(()=>require("./houston-BDYrDoDW-T57H3gQZ.cjs"))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>Promise.resolve().then(()=>require("./kanagawa-dragon-CiKur4Hl-BJZF7xDr.cjs"))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>Promise.resolve().then(()=>require("./kanagawa-lotus-BKu-smKu-BhgzmRV4.cjs"))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>Promise.resolve().then(()=>require("./kanagawa-wave-CQwozSzG-BgJip59C.cjs"))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>Promise.resolve().then(()=>require("./laserwave-6a00oqik-CIb51Re4.cjs"))},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>Promise.resolve().then(()=>require("./light-plus-CZuVqSLX-B5D0le0o.cjs"))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-D6KBX41T-Dj0-OyRN.cjs"))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-darker-CkRroheE-Dvfs29ir.cjs"))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>Promise.resolve().then(()=>require("./material-theme-lighter-BUBw43Yz-EU3ZGl_r.cjs"))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-ocean-ClGX14Ja-px_3Pwqa.cjs"))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-palenight-C1RVm8K1-38jxvsGX.cjs"))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./min-dark-C7ak0t6c-tt5o_I5e.cjs"))},{id:"min-light",displayName:"Min Light",type:"light",import:()=>Promise.resolve().then(()=>require("./min-light-CKFxVcPp-tmTHl_CQ.cjs"))},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>Promise.resolve().then(()=>require("./monokai-C1KBYcO0-DMIxv6MM.cjs"))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>Promise.resolve().then(()=>require("./night-owl-Bm2rzalh-BN78kThQ.cjs"))},{id:"nord",displayName:"Nord",type:"dark",import:()=>Promise.resolve().then(()=>require("./nord-CC5OiUXg-Ca5AGUWc.cjs"))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>Promise.resolve().then(()=>require("./one-dark-pro-D7-kP8fv-JOzzHStv.cjs"))},{id:"one-light",displayName:"One Light",type:"light",import:()=>Promise.resolve().then(()=>require("./one-light-D9sNaUtq-020-h_lv.cjs"))},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>Promise.resolve().then(()=>require("./plastic-CSTz3KZp-r5piqq-S.cjs"))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>Promise.resolve().then(()=>require("./poimandres-C-VADXHD-BLP3NNjc.cjs"))},{id:"red",displayName:"Red",type:"dark",import:()=>Promise.resolve().then(()=>require("./red-7y8PH7HH-BQGOv1D5.cjs"))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>Promise.resolve().then(()=>require("./rose-pine-DhT-HZE9-DKEdv1Oe.cjs"))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>Promise.resolve().then(()=>require("./rose-pine-dawn-DiCjL2i4-Bvt6DtVH.cjs"))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>Promise.resolve().then(()=>require("./rose-pine-moon-BNmGHlcn-cHuJy0Ng.cjs"))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./slack-dark-i7wN4OET-akqwQ7ED.cjs"))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>Promise.resolve().then(()=>require("./slack-ochin-ndHf0LoP-BoQQWmTv.cjs"))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>Promise.resolve().then(()=>require("./snazzy-light-BlSJXAu4-D_IwRieF.cjs"))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./solarized-dark-UTmkh7lw-gmm-WbDC.cjs"))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>Promise.resolve().then(()=>require("./solarized-light-BheCkDPT-DzcxRSZP.cjs"))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>Promise.resolve().then(()=>require("./synthwave-84-NU3C_KFZ-BBRLOmNT.cjs"))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>Promise.resolve().then(()=>require("./tokyo-night-LhP3hHhi-9T7_vGSy.cjs"))},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>Promise.resolve().then(()=>require("./vesper-CJsaOsSM-DqLWLxOu.cjs"))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>Promise.resolve().then(()=>require("./vitesse-black-BoGvW84i-MF-1S1MG.cjs"))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./vitesse-dark-Cym-eLtO-SIffJYSe.cjs"))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>Promise.resolve().then(()=>require("./vitesse-light-CcmG315c-U63SkYGT.cjs"))}],Q0=Object.fromEntries(K0.map(e=>[e.id,e.import]));let fr=class extends Error{constructor(e){super(e),this.name="ShikiError"}},ol=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Y0(){return 2147483648}function X0(){return typeof performance<"u"?performance.now():Date.now()}const J0=(e,t)=>e+(t-e%t)%t;async function Z0(e){let t,r;const n={};function o(f){r=f,n.HEAPU8=new Uint8Array(f),n.HEAPU32=new Uint32Array(f)}function a(f,g,y){n.HEAPU8.copyWithin(f,g,g+y)}function i(f){try{return t.grow(f-r.byteLength+65535>>>16),o(t.buffer),1}catch{}}function s(f){const g=n.HEAPU8.length;f=f>>>0;const y=Y0();if(f>y)return!1;for(let v=1;v<=4;v*=2){let b=g*(1+.2/v);b=Math.min(b,f+100663296);const C=Math.min(y,J0(Math.max(f,b),65536));if(i(C))return!0}return!1}const l=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function c(f,g,y=1024){const v=g+y;let b=g;for(;f[b]&&!(b>=v);)++b;if(b-g>16&&f.buffer&&l)return l.decode(f.subarray(g,b));let C="";for(;g<b;){let w=f[g++];if(!(w&128)){C+=String.fromCharCode(w);continue}const k=f[g++]&63;if((w&224)===192){C+=String.fromCharCode((w&31)<<6|k);continue}const j=f[g++]&63;if((w&240)===224?w=(w&15)<<12|k<<6|j:w=(w&7)<<18|k<<12|j<<6|f[g++]&63,w<65536)C+=String.fromCharCode(w);else{const P=w-65536;C+=String.fromCharCode(55296|P>>10,56320|P&1023)}}return C}function d(f,g){return f?c(n.HEAPU8,f,g):""}const p={emscripten_get_now:X0,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function h(){const f=await e({env:p,wasi_snapshot_preview1:p});t=f.memory,o(t.buffer),Object.assign(n,f),n.UTF8ToString=d}return await h(),n}var eb=Object.defineProperty,tb=(e,t,r)=>t in e?eb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,et=(e,t,r)=>(tb(e,typeof t!="symbol"?t+"":t,r),r);let nt=null;function rb(e){throw new ol(e.UTF8ToString(e.getLastOnigError()))}class ii{constructor(t){et(this,"utf16Length"),et(this,"utf8Length"),et(this,"utf16Value"),et(this,"utf8Value"),et(this,"utf16OffsetToUtf8"),et(this,"utf8OffsetToUtf16");const r=t.length,n=ii._utf8ByteLength(t),o=n!==r,a=o?new Uint32Array(r+1):null;o&&(a[r]=n);const i=o?new Uint32Array(n+1):null;o&&(i[n]=r);const s=new Uint8Array(n);let l=0;for(let c=0;c<r;c++){const d=t.charCodeAt(c);let p=d,h=!1;if(d>=55296&&d<=56319&&c+1<r){const f=t.charCodeAt(c+1);f>=56320&&f<=57343&&(p=(d-55296<<10)+65536|f-56320,h=!0)}o&&(a[c]=l,h&&(a[c+1]=l),p<=127?i[l+0]=c:p<=2047?(i[l+0]=c,i[l+1]=c):p<=65535?(i[l+0]=c,i[l+1]=c,i[l+2]=c):(i[l+0]=c,i[l+1]=c,i[l+2]=c,i[l+3]=c)),p<=127?s[l++]=p:p<=2047?(s[l++]=192|(p&1984)>>>6,s[l++]=128|(p&63)>>>0):p<=65535?(s[l++]=224|(p&61440)>>>12,s[l++]=128|(p&4032)>>>6,s[l++]=128|(p&63)>>>0):(s[l++]=240|(p&1835008)>>>18,s[l++]=128|(p&258048)>>>12,s[l++]=128|(p&4032)>>>6,s[l++]=128|(p&63)>>>0),h&&c++}this.utf16Length=r,this.utf8Length=n,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=i}static _utf8ByteLength(t){let r=0;for(let n=0,o=t.length;n<o;n++){const a=t.charCodeAt(n);let i=a,s=!1;if(a>=55296&&a<=56319&&n+1<o){const l=t.charCodeAt(n+1);l>=56320&&l<=57343&&(i=(a-55296<<10)+65536|l-56320,s=!0)}i<=127?r+=1:i<=2047?r+=2:i<=65535?r+=3:r+=4,s&&n++}return r}createString(t){const r=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,r),r}}const Zt=class{constructor(e){if(et(this,"id",++Zt.LAST_ID),et(this,"_onigBinding"),et(this,"content"),et(this,"utf16Length"),et(this,"utf8Length"),et(this,"utf16OffsetToUtf8"),et(this,"utf8OffsetToUtf16"),et(this,"ptr"),!nt)throw new ol("Must invoke loadWasm first.");this._onigBinding=nt,this.content=e;const t=new ii(e);this.utf16Length=t.utf16Length,this.utf8Length=t.utf8Length,this.utf16OffsetToUtf8=t.utf16OffsetToUtf8,this.utf8OffsetToUtf16=t.utf8OffsetToUtf16,this.utf8Length<1e4&&!Zt._sharedPtrInUse?(Zt._sharedPtr||(Zt._sharedPtr=nt.omalloc(1e4)),Zt._sharedPtrInUse=!0,nt.HEAPU8.set(t.utf8Value,Zt._sharedPtr),this.ptr=Zt._sharedPtr):this.ptr=t.createString(nt)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===Zt._sharedPtr?Zt._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};let Lo=Zt;et(Lo,"LAST_ID",0);et(Lo,"_sharedPtr",0);et(Lo,"_sharedPtrInUse",!1);class nb{constructor(t){if(et(this,"_onigBinding"),et(this,"_ptr"),!nt)throw new ol("Must invoke loadWasm first.");const r=[],n=[];for(let s=0,l=t.length;s<l;s++){const c=new ii(t[s]);r[s]=c.createString(nt),n[s]=c.utf8Length}const o=nt.omalloc(4*t.length);nt.HEAPU32.set(r,o/4);const a=nt.omalloc(4*t.length);nt.HEAPU32.set(n,a/4);const i=nt.createOnigScanner(o,a,t.length);for(let s=0,l=t.length;s<l;s++)nt.ofree(r[s]);nt.ofree(a),nt.ofree(o),i===0&&rb(nt),this._onigBinding=nt,this._ptr=i}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,r,n){let o=0;if(typeof n=="number"&&(o=n),typeof t=="string"){t=new Lo(t);const a=this._findNextMatchSync(t,r,!1,o);return t.dispose(),a}return this._findNextMatchSync(t,r,!1,o)}_findNextMatchSync(t,r,n,o){const a=this._onigBinding,i=a.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(r),o);if(i===0)return null;const s=a.HEAPU32;let l=i/4;const c=s[l++],d=s[l++],p=[];for(let h=0;h<d;h++){const f=t.convertUtf8OffsetToUtf16(s[l++]),g=t.convertUtf8OffsetToUtf16(s[l++]);p[h]={start:f,end:g,length:g-f}}return{index:c,captureIndices:p}}}function ob(e){return typeof e.instantiator=="function"}function ab(e){return typeof e.default=="function"}function ib(e){return typeof e.data<"u"}function sb(e){return typeof Response<"u"&&e instanceof Response}function lb(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let na;function cb(e){if(na)return na;async function t(){nt=await Z0(async r=>{let n=e;return n=await n,typeof n=="function"&&(n=await n(r)),typeof n=="function"&&(n=await n(r)),ob(n)?n=await n.instantiator(r):ab(n)?n=await n.default(r):(ib(n)&&(n=n.data),sb(n)?typeof WebAssembly.instantiateStreaming=="function"?n=await ub(n)(r):n=await db(n)(r):lb(n)?n=await _i(n)(r):n instanceof WebAssembly.Module?n=await _i(n)(r):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await _i(n.default)(r))),"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n})}return na=t(),na}function _i(e){return t=>WebAssembly.instantiate(e,t)}function ub(e){return t=>WebAssembly.instantiateStreaming(e,t)}function db(e){return async t=>{const r=await e.arrayBuffer();return WebAssembly.instantiate(r,t)}}let pb;function hb(){return pb}async function Ld(e){return e&&await cb(e),{createScanner(t){return new nb(t.map(r=>typeof r=="string"?r:r.source))},createString(t){return new Lo(t)}}}function mb(e){return al(e)}function al(e){return Array.isArray(e)?fb(e):e instanceof RegExp?e:typeof e=="object"?gb(e):e}function fb(e){let t=[];for(let r=0,n=e.length;r<n;r++)t[r]=al(e[r]);return t}function gb(e){let t={};for(let r in e)t[r]=al(e[r]);return t}function $d(e,...t){return t.forEach(r=>{for(let n in r)e[n]=r[n]}),e}function Dd(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?Dd(e.substring(0,e.length-1)):e.substr(~t+1)}var Oi=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,oa=class{static hasCaptures(e){return e===null?!1:(Oi.lastIndex=0,Oi.test(e))}static replaceCaptures(e,t,r){return e.replace(Oi,(n,o,a,i)=>{let s=r[parseInt(o||a,10)];if(s){let l=t.substring(s.start,s.end);for(;l[0]===".";)l=l.substring(1);switch(i){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return n})}};function Bd(e,t){return e<t?-1:e>t?1:0}function qd(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let r=e.length,n=t.length;if(r===n){for(let o=0;o<r;o++){let a=Bd(e[o],t[o]);if(a!==0)return a}return 0}return r-n}function $c(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function Fd(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var zd=class{constructor(e){R(this,"cache",new Map);this.fn=e}get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},Ra=class{constructor(e,t,r){R(this,"_cachedMatchRoot",new zd(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=r}static createFromRawTheme(e,t){return this.createFromParsedTheme(xb(e),t)}static createFromParsedTheme(e,t){return Sb(e,t)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(n=>yb(e.parent,n.parentScopes));return r?new Wd(r.fontStyle,r.foreground,r.background):null}},Li=class ga{constructor(t,r){this.parent=t,this.scopeName=r}static push(t,r){for(const n of r)t=new ga(t,n);return t}static from(...t){let r=null;for(let n=0;n<t.length;n++)r=new ga(r,t[n]);return r}push(t){return new ga(this,t)}getSegments(){let t=this;const r=[];for(;t;)r.push(t.scopeName),t=t.parent;return r.reverse(),r}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const r=[];let n=this;for(;n&&n!==t;)r.push(n.scopeName),n=n.parent;return n===t?r.reverse():void 0}};function yb(e,t){if(t.length===0)return!0;for(let r=0;r<t.length;r++){let n=t[r],o=!1;if(n===">"){if(r===t.length-1)return!1;n=t[++r],o=!0}for(;e&&!bb(e.scopeName,n);){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function bb(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var Wd=class{constructor(e,t,r){this.fontStyle=e,this.foregroundId=t,this.backgroundId=r}};function xb(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,r=[],n=0;for(let o=0,a=t.length;o<a;o++){let i=t[o];if(!i.settings)continue;let s;if(typeof i.scope=="string"){let p=i.scope;p=p.replace(/^[,]+/,""),p=p.replace(/[,]+$/,""),s=p.split(",")}else Array.isArray(i.scope)?s=i.scope:s=[""];let l=-1;if(typeof i.settings.fontStyle=="string"){l=0;let p=i.settings.fontStyle.split(" ");for(let h=0,f=p.length;h<f;h++)switch(p[h]){case"italic":l=l|1;break;case"bold":l=l|2;break;case"underline":l=l|4;break;case"strikethrough":l=l|8;break}}let c=null;typeof i.settings.foreground=="string"&&$c(i.settings.foreground)&&(c=i.settings.foreground);let d=null;typeof i.settings.background=="string"&&$c(i.settings.background)&&(d=i.settings.background);for(let p=0,h=s.length;p<h;p++){let f=s[p].trim().split(" "),g=f[f.length-1],y=null;f.length>1&&(y=f.slice(0,f.length-1),y.reverse()),r[n++]=new vb(g,y,o,l,c,d)}}return r}var vb=class{constructor(e,t,r,n,o,a){this.scope=e,this.parentScopes=t,this.index=r,this.fontStyle=n,this.foreground=o,this.background=a}},hr=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(hr||{});function Sb(e,t){e.sort((l,c)=>{let d=Bd(l.scope,c.scope);return d!==0||(d=qd(l.parentScopes,c.parentScopes),d!==0)?d:l.index-c.index});let r=0,n="#000000",o="#ffffff";for(;e.length>=1&&e[0].scope==="";){let l=e.shift();l.fontStyle!==-1&&(r=l.fontStyle),l.foreground!==null&&(n=l.foreground),l.background!==null&&(o=l.background)}let a=new wb(t),i=new Wd(r,a.getId(n),a.getId(o)),s=new kb(new as(0,null,-1,0,0),[]);for(let l=0,c=e.length;l<c;l++){let d=e[l];s.insert(0,d.scope,d.parentScopes,d.fontStyle,a.getId(d.foreground),a.getId(d.background))}return new Ra(a,i,s)}var wb=class{constructor(e){R(this,"_isFrozen");R(this,"_lastColorId");R(this,"_id2color");R(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,r=e.length;t<r;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Cb=Object.freeze([]),as=class Ud{constructor(t,r,n,o,a){R(this,"scopeDepth");R(this,"parentScopes");R(this,"fontStyle");R(this,"foreground");R(this,"background");this.scopeDepth=t,this.parentScopes=r||Cb,this.fontStyle=n,this.foreground=o,this.background=a}clone(){return new Ud(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let r=[];for(let n=0,o=t.length;n<o;n++)r[n]=t[n].clone();return r}acceptOverwrite(t,r,n,o){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,r!==-1&&(this.fontStyle=r),n!==0&&(this.foreground=n),o!==0&&(this.background=o)}},kb=class is{constructor(t,r=[],n={}){R(this,"_rulesWithParentScopes");this._mainRule=t,this._children=n,this._rulesWithParentScopes=r}static _cmpBySpecificity(t,r){if(t.scopeDepth!==r.scopeDepth)return r.scopeDepth-t.scopeDepth;let n=0,o=0;for(;t.parentScopes[n]===">"&&n++,r.parentScopes[o]===">"&&o++,!(n>=t.parentScopes.length||o>=r.parentScopes.length);){const a=r.parentScopes[o].length-t.parentScopes[n].length;if(a!==0)return a;n++,o++}return r.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let n=t.indexOf("."),o,a;if(n===-1?(o=t,a=""):(o=t.substring(0,n),a=t.substring(n+1)),this._children.hasOwnProperty(o))return this._children[o].match(a)}const r=this._rulesWithParentScopes.concat(this._mainRule);return r.sort(is._cmpBySpecificity),r}insert(t,r,n,o,a,i){if(r===""){this._doInsertHere(t,n,o,a,i);return}let s=r.indexOf("."),l,c;s===-1?(l=r,c=""):(l=r.substring(0,s),c=r.substring(s+1));let d;this._children.hasOwnProperty(l)?d=this._children[l]:(d=new is(this._mainRule.clone(),as.cloneArr(this._rulesWithParentScopes)),this._children[l]=d),d.insert(t+1,c,n,o,a,i)}_doInsertHere(t,r,n,o,a){if(r===null){this._mainRule.acceptOverwrite(t,n,o,a);return}for(let i=0,s=this._rulesWithParentScopes.length;i<s;i++){let l=this._rulesWithParentScopes[i];if(qd(l.parentScopes,r)===0){l.acceptOverwrite(t,n,o,a);return}}n===-1&&(n=this._mainRule.fontStyle),o===0&&(o=this._mainRule.foreground),a===0&&(a=this._mainRule.background),this._rulesWithParentScopes.push(new as(t,r,n,o,a))}},_n=class Rt{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const r=Rt.getLanguageId(t),n=Rt.getTokenType(t),o=Rt.getFontStyle(t),a=Rt.getForeground(t),i=Rt.getBackground(t);console.log({languageId:r,tokenType:n,fontStyle:o,foreground:a,background:i})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,r,n,o,a,i,s){let l=Rt.getLanguageId(t),c=Rt.getTokenType(t),d=Rt.containsBalancedBrackets(t)?1:0,p=Rt.getFontStyle(t),h=Rt.getForeground(t),f=Rt.getBackground(t);return r!==0&&(l=r),n!==8&&(c=n),o!==null&&(d=o?1:0),a!==-1&&(p=a),i!==0&&(h=i),s!==0&&(f=s),(l<<0|c<<8|d<<10|p<<11|h<<15|f<<24)>>>0}};function Ma(e,t){const r=[],n=Pb(e);let o=n.next();for(;o!==null;){let l=0;if(o.length===2&&o.charAt(1)===":"){switch(o.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=n.next()}let c=i();if(r.push({matcher:c,priority:l}),o!==",")break;o=n.next()}return r;function a(){if(o==="-"){o=n.next();const l=a();return c=>!!l&&!l(c)}if(o==="("){o=n.next();const l=s();return o===")"&&(o=n.next()),l}if(Dc(o)){const l=[];do l.push(o),o=n.next();while(Dc(o));return c=>t(l,c)}return null}function i(){const l=[];let c=a();for(;c;)l.push(c),c=a();return d=>l.every(p=>p(d))}function s(){const l=[];let c=i();for(;c&&(l.push(c),o==="|"||o===",");){do o=n.next();while(o==="|"||o===",");c=i()}return d=>l.some(p=>p(d))}}function Dc(e){return!!e&&!!e.match(/[\w\.:]+/)}function Pb(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,r=t.exec(e);return{next:()=>{if(!r)return null;const n=r[0];return r=t.exec(e),n}}}function Hd(e){typeof e.dispose=="function"&&e.dispose()}var So=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Ib=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},jb=class{constructor(){R(this,"_references",[]);R(this,"_seenReferenceKeys",new Set);R(this,"visitedRule",new Set)}get references(){return this._references}add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Eb=class{constructor(e,t){R(this,"seenFullScopeRequests",new Set);R(this,"seenPartialScopeRequests",new Set);R(this,"Q");this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new So(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new jb;for(const r of e)Tb(r,this.initialScopeName,this.repo,t);for(const r of t.references)if(r instanceof So){if(this.seenFullScopeRequests.has(r.scopeName))continue;this.seenFullScopeRequests.add(r.scopeName),this.Q.push(r)}else{if(this.seenFullScopeRequests.has(r.scopeName)||this.seenPartialScopeRequests.has(r.toKey()))continue;this.seenPartialScopeRequests.add(r.toKey()),this.Q.push(r)}}};function Tb(e,t,r,n){const o=r.lookup(e.scopeName);if(!o){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const a=r.lookup(t);e instanceof So?ya({baseGrammar:a,selfGrammar:o},n):ss(e.ruleName,{baseGrammar:a,selfGrammar:o,repository:o.repository},n);const i=r.injections(e.scopeName);if(i)for(const s of i)n.add(new So(s))}function ss(e,t,r){if(t.repository&&t.repository[e]){const n=t.repository[e];Na([n],t,r)}}function ya(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Na(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Na(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Na(e,t,r){for(const n of e){if(r.visitedRule.has(n))continue;r.visitedRule.add(n);const o=n.repository?$d({},t.repository,n.repository):t.repository;Array.isArray(n.patterns)&&Na(n.patterns,{...t,repository:o},r);const a=n.include;if(!a)continue;const i=Vd(a);switch(i.kind){case 0:ya({...t,selfGrammar:t.baseGrammar},r);break;case 1:ya(t,r);break;case 2:ss(i.ruleName,{...t,repository:o},r);break;case 3:case 4:const s=i.scopeName===t.selfGrammar.scopeName?t.selfGrammar:i.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(s){const l={baseGrammar:t.baseGrammar,selfGrammar:s,repository:o};i.kind===4?ss(i.ruleName,l,r):ya(l,r)}else i.kind===4?r.add(new Ib(i.scopeName,i.ruleName)):r.add(new So(i.scopeName));break}}}var Rb=class{constructor(){R(this,"kind",0)}},Mb=class{constructor(){R(this,"kind",1)}},Nb=class{constructor(e){R(this,"kind",2);this.ruleName=e}},Ab=class{constructor(e){R(this,"kind",3);this.scopeName=e}},_b=class{constructor(e,t){R(this,"kind",4);this.scopeName=e,this.ruleName=t}};function Vd(e){if(e==="$base")return new Rb;if(e==="$self")return new Mb;const t=e.indexOf("#");if(t===-1)return new Ab(e);if(t===0)return new Nb(e.substring(1));{const r=e.substring(0,t),n=e.substring(t+1);return new _b(r,n)}}var Ob=/\\(\d+)/,Bc=/\\(\d+)/g,Lb=-1,Gd=-2,$o=class{constructor(e,t,r,n){R(this,"$location");R(this,"id");R(this,"_nameIsCapturing");R(this,"_name");R(this,"_contentNameIsCapturing");R(this,"_contentName");this.$location=e,this.id=t,this._name=r||null,this._nameIsCapturing=oa.hasCaptures(this._name),this._contentName=n||null,this._contentNameIsCapturing=oa.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Dd(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:oa.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:oa.replaceCaptures(this._contentName,e,t)}},$b=class extends $o{constructor(t,r,n,o,a){super(t,r,n,o);R(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=a}dispose(){}collectPatterns(t,r){throw new Error("Not supported!")}compile(t,r){throw new Error("Not supported!")}compileAG(t,r,n,o){throw new Error("Not supported!")}},Db=class extends $o{constructor(t,r,n,o,a){super(t,r,n,null);R(this,"_match");R(this,"captures");R(this,"_cachedCompiledPatterns");this._match=new wo(o,this.id),this.captures=a,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,r){r.push(this._match)}compile(t,r){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,r,n,o){return this._getCachedCompiledPatterns(t).compileAG(t,n,o)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Co,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},qc=class extends $o{constructor(t,r,n,o,a){super(t,r,n,o);R(this,"hasMissingPatterns");R(this,"patterns");R(this,"_cachedCompiledPatterns");this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,r){for(const n of this.patterns)t.getRule(n).collectPatterns(t,r)}compile(t,r){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,r,n,o){return this._getCachedCompiledPatterns(t).compileAG(t,n,o)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Co,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ls=class extends $o{constructor(t,r,n,o,a,i,s,l,c,d){super(t,r,n,o);R(this,"_begin");R(this,"beginCaptures");R(this,"_end");R(this,"endHasBackReferences");R(this,"endCaptures");R(this,"applyEndPatternLast");R(this,"hasMissingPatterns");R(this,"patterns");R(this,"_cachedCompiledPatterns");this._begin=new wo(a,this.id),this.beginCaptures=i,this._end=new wo(s||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=c||!1,this.patterns=d.patterns,this.hasMissingPatterns=d.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,r){return this._end.resolveBackReferences(t,r)}collectPatterns(t,r){r.push(this._begin)}compile(t,r){return this._getCachedCompiledPatterns(t,r).compile(t)}compileAG(t,r,n,o){return this._getCachedCompiledPatterns(t,r).compileAG(t,n,o)}_getCachedCompiledPatterns(t,r){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Co;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,r):this._cachedCompiledPatterns.setSource(0,r)),this._cachedCompiledPatterns}},Aa=class extends $o{constructor(t,r,n,o,a,i,s,l,c){super(t,r,n,o);R(this,"_begin");R(this,"beginCaptures");R(this,"whileCaptures");R(this,"_while");R(this,"whileHasBackReferences");R(this,"hasMissingPatterns");R(this,"patterns");R(this,"_cachedCompiledPatterns");R(this,"_cachedCompiledWhilePatterns");this._begin=new wo(a,this.id),this.beginCaptures=i,this.whileCaptures=l,this._while=new wo(s,Gd),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,r){return this._while.resolveBackReferences(t,r)}collectPatterns(t,r){r.push(this._begin)}compile(t,r){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,r,n,o){return this._getCachedCompiledPatterns(t).compileAG(t,n,o)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Co;for(const r of this.patterns)t.getRule(r).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,r){return this._getCachedCompiledWhilePatterns(t,r).compile(t)}compileWhileAG(t,r,n,o){return this._getCachedCompiledWhilePatterns(t,r).compileAG(t,n,o)}_getCachedCompiledWhilePatterns(t,r){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Co,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,r||""),this._cachedCompiledWhilePatterns}},Kd=class lt{static createCaptureRule(t,r,n,o,a){return t.registerRule(i=>new $b(r,i,n,o,a))}static getCompiledRuleId(t,r,n){return t.id||r.registerRule(o=>{if(t.id=o,t.match)return new Db(t.$vscodeTextmateLocation,t.id,t.name,t.match,lt._compileCaptures(t.captures,r,n));if(typeof t.begin>"u"){t.repository&&(n=$d({},n,t.repository));let a=t.patterns;return typeof a>"u"&&t.include&&(a=[{include:t.include}]),new qc(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,lt._compilePatterns(a,r,n))}return t.while?new Aa(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,lt._compileCaptures(t.beginCaptures||t.captures,r,n),t.while,lt._compileCaptures(t.whileCaptures||t.captures,r,n),lt._compilePatterns(t.patterns,r,n)):new ls(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,lt._compileCaptures(t.beginCaptures||t.captures,r,n),t.end,lt._compileCaptures(t.endCaptures||t.captures,r,n),t.applyEndPatternLast,lt._compilePatterns(t.patterns,r,n))}),t.id}static _compileCaptures(t,r,n){let o=[];if(t){let a=0;for(const i in t){if(i==="$vscodeTextmateLocation")continue;const s=parseInt(i,10);s>a&&(a=s)}for(let i=0;i<=a;i++)o[i]=null;for(const i in t){if(i==="$vscodeTextmateLocation")continue;const s=parseInt(i,10);let l=0;t[i].patterns&&(l=lt.getCompiledRuleId(t[i],r,n)),o[s]=lt.createCaptureRule(r,t[i].$vscodeTextmateLocation,t[i].name,t[i].contentName,l)}}return o}static _compilePatterns(t,r,n){let o=[];if(t)for(let a=0,i=t.length;a<i;a++){const s=t[a];let l=-1;if(s.include){const c=Vd(s.include);switch(c.kind){case 0:case 1:l=lt.getCompiledRuleId(n[s.include],r,n);break;case 2:let d=n[c.ruleName];d&&(l=lt.getCompiledRuleId(d,r,n));break;case 3:case 4:const p=c.scopeName,h=c.kind===4?c.ruleName:null,f=r.getExternalGrammar(p,n);if(f)if(h){let g=f.repository[h];g&&(l=lt.getCompiledRuleId(g,r,f.repository))}else l=lt.getCompiledRuleId(f.repository.$self,r,f.repository);break}}else l=lt.getCompiledRuleId(s,r,n);if(l!==-1){const c=r.getRule(l);let d=!1;if((c instanceof qc||c instanceof ls||c instanceof Aa)&&c.hasMissingPatterns&&c.patterns.length===0&&(d=!0),d)continue;o.push(l)}}return{patterns:o,hasMissingPatterns:(t?t.length:0)!==o.length}}},wo=class Qd{constructor(t,r){R(this,"source");R(this,"ruleId");R(this,"hasAnchor");R(this,"hasBackReferences");R(this,"_anchorCache");if(t&&typeof t=="string"){const n=t.length;let o=0,a=[],i=!1;for(let s=0;s<n;s++)if(t.charAt(s)==="\\"&&s+1<n){const l=t.charAt(s+1);l==="z"?(a.push(t.substring(o,s)),a.push("$(?!\\n)(?<!\\n)"),o=s+2):(l==="A"||l==="G")&&(i=!0),s++}this.hasAnchor=i,o===0?this.source=t:(a.push(t.substring(o,n)),this.source=a.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=r,typeof this.source=="string"?this.hasBackReferences=Ob.test(this.source):this.hasBackReferences=!1}clone(){return new Qd(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,r){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let n=r.map(o=>t.substring(o.start,o.end));return Bc.lastIndex=0,this.source.replace(Bc,(o,a)=>Fd(n[parseInt(a,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],r=[],n=[],o=[],a,i,s,l;for(a=0,i=this.source.length;a<i;a++)s=this.source.charAt(a),t[a]=s,r[a]=s,n[a]=s,o[a]=s,s==="\\"&&a+1<i&&(l=this.source.charAt(a+1),l==="A"?(t[a+1]="",r[a+1]="",n[a+1]="A",o[a+1]="A"):l==="G"?(t[a+1]="",r[a+1]="G",n[a+1]="",o[a+1]="G"):(t[a+1]=l,r[a+1]=l,n[a+1]=l,o[a+1]=l),a++);return{A0_G0:t.join(""),A0_G1:r.join(""),A1_G0:n.join(""),A1_G1:o.join("")}}resolveAnchors(t,r){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?r?this._anchorCache.A1_G1:this._anchorCache.A1_G0:r?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Co=class{constructor(){R(this,"_items");R(this,"_hasAnchors");R(this,"_cached");R(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(r=>r.source);this._cached=new Fc(e,t,this._items.map(r=>r.ruleId))}return this._cached}compileAG(e,t,r){return this._hasAnchors?t?r?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G0):r?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,r){let n=this._items.map(o=>o.resolveAnchors(t,r));return new Fc(e,n,this._items.map(o=>o.ruleId))}},Fc=class{constructor(e,t,r){R(this,"scanner");this.regExps=t,this.rules=r,this.scanner=e.createOnigScanner(t)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,r=this.rules.length;t<r;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
|
|
38
|
-
`)}findNextMatchSync(e,t,
|
|
39
|
-
`;const a=this.createOnigString(e),i=a.content.length,s=new Xb(r,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=Yd(this,a,o,0,t,s,!0,n);return Hd(a),{lineLength:i,lineTokens:s,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function Uc(e,t){return e=mb(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var ho=class er{constructor(t,r,n){this.parent=t,this.scopePath=r,this.tokenAttributes=n}static fromExtension(t,r){let n=t,o=t?.scopePath??null;for(const a of r)o=Li.push(o,a.scopeNames),n=new er(n,o,a.encodedTokenAttributes);return n}static createRoot(t,r){return new er(null,new Li(null,t),r)}static createRootAndLookUpScopeName(t,r,n){const o=n.getMetadataForScope(t),a=new Li(null,t),i=n.themeProvider.themeMatch(a),s=er.mergeAttributes(r,o,i);return new er(null,a,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return er.equals(this,t)}static equals(t,r){do{if(t===r||!t&&!r)return!0;if(!t||!r||t.scopeName!==r.scopeName||t.tokenAttributes!==r.tokenAttributes)return!1;t=t.parent,r=r.parent}while(!0)}static mergeAttributes(t,r,n){let o=-1,a=0,i=0;return n!==null&&(o=n.fontStyle,a=n.foregroundId,i=n.backgroundId),_n.set(t,r.languageId,r.tokenType,null,o,a,i)}pushAttributed(t,r){if(t===null)return this;if(t.indexOf(" ")===-1)return er._pushAttributed(this,t,r);const n=t.split(/ /g);let o=this;for(const a of n)o=er._pushAttributed(o,a,r);return o}static _pushAttributed(t,r,n){const o=n.getMetadataForScope(r),a=t.scopePath.push(r),i=n.themeProvider.themeMatch(a),s=er.mergeAttributes(t.tokenAttributes,o,i);return new er(t,a,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const r=[];let n=this;for(;n&&n!==t;)r.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===t?r.reverse():void 0}},$t,cs=($t=class{constructor(t,r,n,o,a,i,s,l){R(this,"_stackElementBrand");R(this,"_enterPos");R(this,"_anchorPos");R(this,"depth");this.parent=t,this.ruleId=r,this.beginRuleCapturedEOL=a,this.endRule=i,this.nameScopesList=s,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=o}equals(t){return t===null?!1:$t._equals(this,t)}static _equals(t,r){return t===r?!0:this._structuralEquals(t,r)?ho.equals(t.contentNameScopesList,r.contentNameScopesList):!1}static _structuralEquals(t,r){do{if(t===r||!t&&!r)return!0;if(!t||!r||t.depth!==r.depth||t.ruleId!==r.ruleId||t.endRule!==r.endRule)return!1;t=t.parent,r=r.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){$t._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,r,n,o,a,i,s){return new $t(this,t,r,n,o,a,i,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,r){return this.parent&&(r=this.parent._writeString(t,r)),t[r++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,r}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new $t(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let r=this;for(;r&&r._enterPos===t._enterPos;){if(r.ruleId===t.ruleId)return!0;r=r.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,r){const n=ho.fromExtension(t?.nameScopesList??null,r.nameScopesList);return new $t(t,r.ruleId,r.enterPos??-1,r.anchorPos??-1,r.beginRuleCapturedEOL,r.endRule,n,ho.fromExtension(n,r.contentNameScopesList))}},R($t,"NULL",new $t(null,0,0,0,!1,null,null,null)),$t),Yb=class{constructor(e,t){R(this,"balancedBracketScopes");R(this,"unbalancedBracketScopes");R(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(r=>r==="*"?(this.allowAny=!0,[]):Ma(r,_a).map(n=>n.matcher)),this.unbalancedBracketScopes=t.flatMap(r=>Ma(r,_a).map(n=>n.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},Xb=class{constructor(e,t,r,n){R(this,"_emitBinaryTokens");R(this,"_lineText");R(this,"_tokens");R(this,"_binaryTokens");R(this,"_lastTokenEndIndex");R(this,"_tokenTypeOverrides");this.balancedBracketSelectors=n,this._emitBinaryTokens=e,this._tokenTypeOverrides=r,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,o=!1;if(this.balancedBracketSelectors?.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const a=e?.getScopeNames()??[];for(const i of this._tokenTypeOverrides)i.matcher(a)&&(n=_n.set(n,0,i.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(a))}if(o&&(n=_n.set(n,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}const r=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:r}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const r=new Uint32Array(this._binaryTokens.length);for(let n=0,o=this._binaryTokens.length;n<o;n++)r[n]=this._binaryTokens[n];return r}},Jb=class{constructor(e,t){R(this,"_grammars",new Map);R(this,"_rawGrammars",new Map);R(this,"_injectionGrammars",new Map);R(this,"_theme");this._onigLib=t,this._theme=e}dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,r,n,o){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,Gb(e,a,t,r,n,o,this,this._onigLib))}return this._grammars.get(e)}},Zb=class{constructor(e){R(this,"_options");R(this,"_syncRegistry");R(this,"_ensureGrammarCache");this._options=e,this._syncRegistry=new Jb(Ra.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(Ra.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,r){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:r})}loadGrammarWithConfiguration(e,t,r){return this._loadGrammar(e,t,r.embeddedLanguages,r.tokenTypes,new Yb(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,r,n,o){const a=new Eb(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(i=>this._loadSingleGrammar(i.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,r,n,o)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const t=this._options.loadGrammar(e);if(t){const r=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,r)}}addGrammar(e,t=[],r=0,n=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,r,n)}_grammarForScopeName(e,t=0,r=null,n=null,o=null){return this._syncRegistry.grammarForScopeName(e,t,r,n,o)}},us=cs.NULL;const ex=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Do{constructor(t,r,n){this.normal=r,this.property=t,n&&(this.space=n)}}Do.prototype.normal={};Do.prototype.property={};Do.prototype.space=void 0;function Jd(e,t){const r={},n={};for(const o of e)Object.assign(r,o.property),Object.assign(n,o.normal);return new Do(r,n,t)}function ds(e){return e.toLowerCase()}class mt{constructor(t,r){this.attribute=r,this.property=t}}mt.prototype.attribute="";mt.prototype.booleanish=!1;mt.prototype.boolean=!1;mt.prototype.commaOrSpaceSeparated=!1;mt.prototype.commaSeparated=!1;mt.prototype.defined=!1;mt.prototype.mustUseProperty=!1;mt.prototype.number=!1;mt.prototype.overloadedBoolean=!1;mt.prototype.property="";mt.prototype.spaceSeparated=!1;mt.prototype.space=void 0;let tx=0;const de=an(),He=an(),Zd=an(),W=an(),je=an(),Tn=an(),yt=an();function an(){return 2**++tx}const ps=Object.freeze(Object.defineProperty({__proto__:null,boolean:de,booleanish:He,commaOrSpaceSeparated:yt,commaSeparated:Tn,number:W,overloadedBoolean:Zd,spaceSeparated:je},Symbol.toStringTag,{value:"Module"})),Di=Object.keys(ps);class il extends mt{constructor(t,r,n,o){let a=-1;if(super(t,r),Hc(this,"space",o),typeof n=="number")for(;++a<Di.length;){const i=Di[a];Hc(this,Di[a],(n&ps[i])===ps[i])}}}il.prototype.defined=!0;function Hc(e,t,r){r&&(e[t]=r)}function Bn(e){const t={},r={};for(const[n,o]of Object.entries(e.properties)){const a=new il(n,e.transform(e.attributes||{},n),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(a.mustUseProperty=!0),t[n]=a,r[ds(n)]=n,r[ds(a.attribute)]=n}return new Do(t,r,e.space)}const ep=Bn({properties:{ariaActiveDescendant:null,ariaAtomic:He,ariaAutoComplete:null,ariaBusy:He,ariaChecked:He,ariaColCount:W,ariaColIndex:W,ariaColSpan:W,ariaControls:je,ariaCurrent:null,ariaDescribedBy:je,ariaDetails:null,ariaDisabled:He,ariaDropEffect:je,ariaErrorMessage:null,ariaExpanded:He,ariaFlowTo:je,ariaGrabbed:He,ariaHasPopup:null,ariaHidden:He,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:je,ariaLevel:W,ariaLive:null,ariaModal:He,ariaMultiLine:He,ariaMultiSelectable:He,ariaOrientation:null,ariaOwns:je,ariaPlaceholder:null,ariaPosInSet:W,ariaPressed:He,ariaReadOnly:He,ariaRelevant:null,ariaRequired:He,ariaRoleDescription:je,ariaRowCount:W,ariaRowIndex:W,ariaRowSpan:W,ariaSelected:He,ariaSetSize:W,ariaSort:null,ariaValueMax:W,ariaValueMin:W,ariaValueNow:W,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function tp(e,t){return t in e?e[t]:t}function rp(e,t){return tp(e,t.toLowerCase())}const rx=Bn({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Tn,acceptCharset:je,accessKey:je,action:null,allow:null,allowFullScreen:de,allowPaymentRequest:de,allowUserMedia:de,alt:null,as:null,async:de,autoCapitalize:null,autoComplete:je,autoFocus:de,autoPlay:de,blocking:je,capture:null,charSet:null,checked:de,cite:null,className:je,cols:W,colSpan:null,content:null,contentEditable:He,controls:de,controlsList:je,coords:W|Tn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:de,defer:de,dir:null,dirName:null,disabled:de,download:Zd,draggable:He,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:de,formTarget:null,headers:je,height:W,hidden:de,high:W,href:null,hrefLang:null,htmlFor:je,httpEquiv:je,id:null,imageSizes:null,imageSrcSet:null,inert:de,inputMode:null,integrity:null,is:null,isMap:de,itemId:null,itemProp:je,itemRef:je,itemScope:de,itemType:je,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:de,low:W,manifest:null,max:null,maxLength:W,media:null,method:null,min:null,minLength:W,multiple:de,muted:de,name:null,nonce:null,noModule:de,noValidate:de,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:de,optimum:W,pattern:null,ping:je,placeholder:null,playsInline:de,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:de,referrerPolicy:null,rel:je,required:de,reversed:de,rows:W,rowSpan:W,sandbox:je,scope:null,scoped:de,seamless:de,selected:de,shadowRootClonable:de,shadowRootDelegatesFocus:de,shadowRootMode:null,shape:null,size:W,sizes:null,slot:null,span:W,spellCheck:He,src:null,srcDoc:null,srcLang:null,srcSet:null,start:W,step:null,style:null,tabIndex:W,target:null,title:null,translate:null,type:null,typeMustMatch:de,useMap:null,value:He,width:W,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:je,axis:null,background:null,bgColor:null,border:W,borderColor:null,bottomMargin:W,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:de,declare:de,event:null,face:null,frame:null,frameBorder:null,hSpace:W,leftMargin:W,link:null,longDesc:null,lowSrc:null,marginHeight:W,marginWidth:W,noResize:de,noHref:de,noShade:de,noWrap:de,object:null,profile:null,prompt:null,rev:null,rightMargin:W,rules:null,scheme:null,scrolling:He,standby:null,summary:null,text:null,topMargin:W,valueType:null,version:null,vAlign:null,vLink:null,vSpace:W,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:de,disableRemotePlayback:de,prefix:null,property:null,results:W,security:null,unselectable:null},space:"html",transform:rp}),nx=Bn({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:yt,accentHeight:W,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:W,amplitude:W,arabicForm:null,ascent:W,attributeName:null,attributeType:null,azimuth:W,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:W,by:null,calcMode:null,capHeight:W,className:je,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:W,diffuseConstant:W,direction:null,display:null,dur:null,divisor:W,dominantBaseline:null,download:de,dx:null,dy:null,edgeMode:null,editable:null,elevation:W,enableBackground:null,end:null,event:null,exponent:W,externalResourcesRequired:null,fill:null,fillOpacity:W,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Tn,g2:Tn,glyphName:Tn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:W,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:W,horizOriginX:W,horizOriginY:W,id:null,ideographic:W,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:W,k:W,k1:W,k2:W,k3:W,k4:W,kernelMatrix:yt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:W,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:W,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:W,overlineThickness:W,paintOrder:null,panose1:null,path:null,pathLength:W,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:je,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:W,pointsAtY:W,pointsAtZ:W,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:yt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:yt,rev:yt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:yt,requiredFeatures:yt,requiredFonts:yt,requiredFormats:yt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:W,specularExponent:W,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:W,strikethroughThickness:W,string:null,stroke:null,strokeDashArray:yt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:W,strokeOpacity:W,strokeWidth:null,style:null,surfaceScale:W,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:yt,tabIndex:W,tableValues:null,target:null,targetX:W,targetY:W,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:yt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:W,underlineThickness:W,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:W,values:null,vAlphabetic:W,vMathematical:W,vectorEffect:null,vHanging:W,vIdeographic:W,version:null,vertAdvY:W,vertOriginX:W,vertOriginY:W,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:W,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:tp}),np=Bn({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),op=Bn({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:rp}),ap=Bn({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),ox=/[A-Z]/g,Vc=/-[a-z]/g,ax=/^data[-\w.:]+$/i;function ix(e,t){const r=ds(t);let n=t,o=mt;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&ax.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Vc,lx);n="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Vc.test(a)){let i=a.replace(ox,sx);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}o=il}return new o(n,t)}function sx(e){return"-"+e.toLowerCase()}function lx(e){return e.charAt(1).toUpperCase()}const cx=Jd([ep,rx,np,op,ap],"html"),ip=Jd([ep,nx,np,op,ap],"svg"),Gc={}.hasOwnProperty;function ux(e,t){const r=t||{};function n(o,...a){let i=n.invalid;const s=n.handlers;if(o&&Gc.call(o,e)){const l=String(o[e]);i=Gc.call(s,l)?s[l]:n.unknown}if(i)return i.call(this,o,...a)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}const dx=/["&'<>`]/g,px=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,hx=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,mx=/[|\\{}()[\]^$+*?.]/g,Kc=new WeakMap;function fx(e,t){if(e=e.replace(t.subset?gx(t.subset):dx,n),t.subset||t.escapeOnly)return e;return e.replace(px,r).replace(hx,n);function r(o,a,i){return t.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,i.charCodeAt(a+2),t)}function n(o,a,i){return t.format(o.charCodeAt(0),i.charCodeAt(a+1),t)}}function gx(e){let t=Kc.get(e);return t||(t=yx(e),Kc.set(e,t)),t}function yx(e){const t=[];let r=-1;for(;++r<e.length;)t.push(e[r].replace(mx,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const bx=/[\dA-Fa-f]/;function xx(e,t,r){const n="&#x"+e.toString(16).toUpperCase();return r&&t&&!bx.test(String.fromCharCode(t))?n:n+";"}const vx=/\d/;function Sx(e,t,r){const n="&#"+String(e);return r&&t&&!vx.test(String.fromCharCode(t))?n:n+";"}const wx=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Bi={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Cx=["cent","copy","divide","gt","lt","not","para","times"],sp={}.hasOwnProperty,hs={};let aa;for(aa in Bi)sp.call(Bi,aa)&&(hs[Bi[aa]]=aa);const kx=/[^\dA-Za-z]/;function Px(e,t,r,n){const o=String.fromCharCode(e);if(sp.call(hs,o)){const a=hs[o],i="&"+a;return r&&wx.includes(a)&&!Cx.includes(a)&&(!n||t&&t!==61&&kx.test(String.fromCharCode(t)))?i:i+";"}return""}function Ix(e,t,r){let n=xx(e,t,r.omitOptionalSemicolons),o;if((r.useNamedReferences||r.useShortestReferences)&&(o=Px(e,t,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!o)&&r.useShortestReferences){const a=Sx(e,t,r.omitOptionalSemicolons);a.length<n.length&&(n=a)}return o&&(!r.useShortestReferences||o.length<n.length)?o:n}function Rn(e,t){return fx(e,Object.assign({format:Ix},t))}const jx=/^>|^->|<!--|-->|--!>|<!-$/g,Ex=[">"],Tx=["<",">"];function Rx(e,t,r,n){return n.settings.bogusComments?"<?"+Rn(e.value,Object.assign({},n.settings.characterReferences,{subset:Ex}))+">":"<!--"+e.value.replace(jx,o)+"-->";function o(a){return Rn(a,Object.assign({},n.settings.characterReferences,{subset:Tx}))}}function Mx(e,t,r,n){return"<!"+(n.settings.upperDoctype?"DOCTYPE":"doctype")+(n.settings.tightDoctype?"":" ")+"html>"}function Qc(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,o=r.indexOf(t);for(;o!==-1;)n++,o=r.indexOf(t,o+t.length);return n}function Nx(e,t){const r=t||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}function Ax(e){return e.join(" ").trim()}const _x=/[ \t\n\f\r]/g;function sl(e){return typeof e=="object"?e.type==="text"?Yc(e.value):!1:Yc(e)}function Yc(e){return e.replace(_x,"")===""}const rt=cp(1),lp=cp(-1),Ox=[];function cp(e){return t;function t(r,n,o){const a=r?r.children:Ox;let i=(n||0)+e,s=a[i];if(!o)for(;s&&sl(s);)i+=e,s=a[i];return s}}const Lx={}.hasOwnProperty;function up(e){return t;function t(r,n,o){return Lx.call(e,r.tagName)&&e[r.tagName](r,n,o)}}const ll=up({body:Dx,caption:qi,colgroup:qi,dd:zx,dt:Fx,head:qi,html:$x,li:qx,optgroup:Wx,option:Ux,p:Bx,rp:Xc,rt:Xc,tbody:Vx,td:Jc,tfoot:Gx,th:Jc,thead:Hx,tr:Kx});function qi(e,t,r){const n=rt(r,t,!0);return!n||n.type!=="comment"&&!(n.type==="text"&&sl(n.value.charAt(0)))}function $x(e,t,r){const n=rt(r,t);return!n||n.type!=="comment"}function Dx(e,t,r){const n=rt(r,t);return!n||n.type!=="comment"}function Bx(e,t,r){const n=rt(r,t);return n?n.type==="element"&&(n.tagName==="address"||n.tagName==="article"||n.tagName==="aside"||n.tagName==="blockquote"||n.tagName==="details"||n.tagName==="div"||n.tagName==="dl"||n.tagName==="fieldset"||n.tagName==="figcaption"||n.tagName==="figure"||n.tagName==="footer"||n.tagName==="form"||n.tagName==="h1"||n.tagName==="h2"||n.tagName==="h3"||n.tagName==="h4"||n.tagName==="h5"||n.tagName==="h6"||n.tagName==="header"||n.tagName==="hgroup"||n.tagName==="hr"||n.tagName==="main"||n.tagName==="menu"||n.tagName==="nav"||n.tagName==="ol"||n.tagName==="p"||n.tagName==="pre"||n.tagName==="section"||n.tagName==="table"||n.tagName==="ul"):!r||!(r.type==="element"&&(r.tagName==="a"||r.tagName==="audio"||r.tagName==="del"||r.tagName==="ins"||r.tagName==="map"||r.tagName==="noscript"||r.tagName==="video"))}function qx(e,t,r){const n=rt(r,t);return!n||n.type==="element"&&n.tagName==="li"}function Fx(e,t,r){const n=rt(r,t);return!!(n&&n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd"))}function zx(e,t,r){const n=rt(r,t);return!n||n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd")}function Xc(e,t,r){const n=rt(r,t);return!n||n.type==="element"&&(n.tagName==="rp"||n.tagName==="rt")}function Wx(e,t,r){const n=rt(r,t);return!n||n.type==="element"&&n.tagName==="optgroup"}function Ux(e,t,r){const n=rt(r,t);return!n||n.type==="element"&&(n.tagName==="option"||n.tagName==="optgroup")}function Hx(e,t,r){const n=rt(r,t);return!!(n&&n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot"))}function Vx(e,t,r){const n=rt(r,t);return!n||n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot")}function Gx(e,t,r){return!rt(r,t)}function Kx(e,t,r){const n=rt(r,t);return!n||n.type==="element"&&n.tagName==="tr"}function Jc(e,t,r){const n=rt(r,t);return!n||n.type==="element"&&(n.tagName==="td"||n.tagName==="th")}const Qx=up({body:Jx,colgroup:Zx,head:Xx,html:Yx,tbody:ev});function Yx(e){const t=rt(e,-1);return!t||t.type!=="comment"}function Xx(e){const t=new Set;for(const n of e.children)if(n.type==="element"&&(n.tagName==="base"||n.tagName==="title")){if(t.has(n.tagName))return!1;t.add(n.tagName)}const r=e.children[0];return!r||r.type==="element"}function Jx(e){const t=rt(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&sl(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function Zx(e,t,r){const n=lp(r,t),o=rt(e,-1,!0);return r&&n&&n.type==="element"&&n.tagName==="colgroup"&&ll(n,r.children.indexOf(n),r)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function ev(e,t,r){const n=lp(r,t),o=rt(e,-1);return r&&n&&n.type==="element"&&(n.tagName==="thead"||n.tagName==="tbody")&&ll(n,r.children.indexOf(n),r)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}const ia={name:[[`
|
|
37
|
+
export default theme;`}function Su(e={},...t){const{breakpoints:n,mixins:r={},spacing:o,palette:i={},transitions:a={},typography:s={},shape:l,...c}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(xo(20));const d=Bd(i),u=jd(e);let h=An(u,{mixins:Qv(u.breakpoints,r),palette:d,shadows:nS.slice(),typography:Jv(d,s),transitions:iS(a),zIndex:{...aS}});return h=An(h,c),h=t.reduce((p,g)=>An(p,g),h),h.unstable_sxConfig={...jl,...c?.unstable_sxConfig},h.unstable_sx=function(p){return pi({sx:p,theme:this})},h.toRuntimeSource=h0,h}function lS(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const cS=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=lS(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function p0(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function f0(e){return e==="dark"?cS:[]}function uS(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...o}=e,i=Bd(t);return{palette:i,opacity:{...p0(i.mode),...n},overlays:r||f0(i.mode),...o}}function dS(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const hS=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],pS=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if(o==="class"&&(i=".%s"),o==="data"&&(i="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return hS(e.cssVarPrefix).forEach(s=>{a[s]=n[s],delete n[s]}),i==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:a}}:i?{[i.replace("%s",t)]:a,[`${r}, ${i.replace("%s",t)}`]:n}:{[r]:{...n,...a}}}if(i&&i!=="media")return`${r}, ${i.replace("%s",String(t))}`}else if(t){if(i==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(i)return i.replace("%s",String(t))}return r};function fS(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function Y(e,t,n){!e[t]&&n&&(e[t]=n)}function ra(e){return typeof e!="string"||!e.startsWith("hsl")?e:s0(e)}function gr(e,t){`${t}Channel`in e||(e[`${t}Channel`]=na(ra(e[t])))}function mS(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const rr=e=>{try{return e()}catch{}},gS=(e="mui")=>Ge.unstable_createGetCssVar(e);function Ic(e,t,n,r){if(!t)return;t=t===!0?{}:t;const o=r==="dark"?"dark":"light";if(!n){e[r]=uS({...t,palette:{mode:o,...t?.palette}});return}const{palette:i,...a}=Su({...n,palette:{mode:o,...t?.palette}});return e[r]={...t,palette:i,opacity:{...p0(o),...t?.opacity},overlays:t?.overlays||f0(o)},a}function yS(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:a=dS,colorSchemeSelector:s=n.light&&n.dark?"media":void 0,rootSelector:l=":root",...c}=e,d=Object.keys(n)[0],u=r||(n.light&&d!=="light"?"light":d),h=gS(i),{[u]:p,light:g,dark:b,...T}=n,E={...T};let C=p;if((u==="dark"&&!("dark"in n)||u==="light"&&!("light"in n))&&(C=!0),!C)throw new Error(xo(21,u));const x=Ic(E,C,c,u);g&&!E.light&&Ic(E,g,void 0,"light"),b&&!E.dark&&Ic(E,b,void 0,"dark");let k={defaultColorScheme:u,...x,cssVarPrefix:i,colorSchemeSelector:s,rootSelector:l,getCssVar:h,colorSchemes:E,font:{...zv(x.typography),...x.font},spacing:mS(c.spacing)};Object.keys(k.colorSchemes).forEach(U=>{const y=k.colorSchemes[U].palette,R=F=>{const M=F.split("-"),z=M[1],X=M[2];return h(F,y[z][X])};if(y.mode==="light"&&(Y(y.common,"background","#fff"),Y(y.common,"onBackground","#000")),y.mode==="dark"&&(Y(y.common,"background","#000"),Y(y.common,"onBackground","#fff")),fS(y,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),y.mode==="light"){Y(y.Alert,"errorColor",tt(y.error.light,.6)),Y(y.Alert,"infoColor",tt(y.info.light,.6)),Y(y.Alert,"successColor",tt(y.success.light,.6)),Y(y.Alert,"warningColor",tt(y.warning.light,.6)),Y(y.Alert,"errorFilledBg",R("palette-error-main")),Y(y.Alert,"infoFilledBg",R("palette-info-main")),Y(y.Alert,"successFilledBg",R("palette-success-main")),Y(y.Alert,"warningFilledBg",R("palette-warning-main")),Y(y.Alert,"errorFilledColor",rr(()=>y.getContrastText(y.error.main))),Y(y.Alert,"infoFilledColor",rr(()=>y.getContrastText(y.info.main))),Y(y.Alert,"successFilledColor",rr(()=>y.getContrastText(y.success.main))),Y(y.Alert,"warningFilledColor",rr(()=>y.getContrastText(y.warning.main))),Y(y.Alert,"errorStandardBg",nt(y.error.light,.9)),Y(y.Alert,"infoStandardBg",nt(y.info.light,.9)),Y(y.Alert,"successStandardBg",nt(y.success.light,.9)),Y(y.Alert,"warningStandardBg",nt(y.warning.light,.9)),Y(y.Alert,"errorIconColor",R("palette-error-main")),Y(y.Alert,"infoIconColor",R("palette-info-main")),Y(y.Alert,"successIconColor",R("palette-success-main")),Y(y.Alert,"warningIconColor",R("palette-warning-main")),Y(y.AppBar,"defaultBg",R("palette-grey-100")),Y(y.Avatar,"defaultBg",R("palette-grey-400")),Y(y.Button,"inheritContainedBg",R("palette-grey-300")),Y(y.Button,"inheritContainedHoverBg",R("palette-grey-A100")),Y(y.Chip,"defaultBorder",R("palette-grey-400")),Y(y.Chip,"defaultAvatarColor",R("palette-grey-700")),Y(y.Chip,"defaultIconColor",R("palette-grey-700")),Y(y.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),Y(y.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),Y(y.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),Y(y.LinearProgress,"primaryBg",nt(y.primary.main,.62)),Y(y.LinearProgress,"secondaryBg",nt(y.secondary.main,.62)),Y(y.LinearProgress,"errorBg",nt(y.error.main,.62)),Y(y.LinearProgress,"infoBg",nt(y.info.main,.62)),Y(y.LinearProgress,"successBg",nt(y.success.main,.62)),Y(y.LinearProgress,"warningBg",nt(y.warning.main,.62)),Y(y.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.11)`),Y(y.Slider,"primaryTrack",nt(y.primary.main,.62)),Y(y.Slider,"secondaryTrack",nt(y.secondary.main,.62)),Y(y.Slider,"errorTrack",nt(y.error.main,.62)),Y(y.Slider,"infoTrack",nt(y.info.main,.62)),Y(y.Slider,"successTrack",nt(y.success.main,.62)),Y(y.Slider,"warningTrack",nt(y.warning.main,.62));const F=hs(y.background.default,.8);Y(y.SnackbarContent,"bg",F),Y(y.SnackbarContent,"color",rr(()=>y.getContrastText(F))),Y(y.SpeedDialAction,"fabHoverBg",hs(y.background.paper,.15)),Y(y.StepConnector,"border",R("palette-grey-400")),Y(y.StepContent,"border",R("palette-grey-400")),Y(y.Switch,"defaultColor",R("palette-common-white")),Y(y.Switch,"defaultDisabledColor",R("palette-grey-100")),Y(y.Switch,"primaryDisabledColor",nt(y.primary.main,.62)),Y(y.Switch,"secondaryDisabledColor",nt(y.secondary.main,.62)),Y(y.Switch,"errorDisabledColor",nt(y.error.main,.62)),Y(y.Switch,"infoDisabledColor",nt(y.info.main,.62)),Y(y.Switch,"successDisabledColor",nt(y.success.main,.62)),Y(y.Switch,"warningDisabledColor",nt(y.warning.main,.62)),Y(y.TableCell,"border",nt(ds(y.divider,1),.88)),Y(y.Tooltip,"bg",ds(y.grey[700],.92))}if(y.mode==="dark"){Y(y.Alert,"errorColor",nt(y.error.light,.6)),Y(y.Alert,"infoColor",nt(y.info.light,.6)),Y(y.Alert,"successColor",nt(y.success.light,.6)),Y(y.Alert,"warningColor",nt(y.warning.light,.6)),Y(y.Alert,"errorFilledBg",R("palette-error-dark")),Y(y.Alert,"infoFilledBg",R("palette-info-dark")),Y(y.Alert,"successFilledBg",R("palette-success-dark")),Y(y.Alert,"warningFilledBg",R("palette-warning-dark")),Y(y.Alert,"errorFilledColor",rr(()=>y.getContrastText(y.error.dark))),Y(y.Alert,"infoFilledColor",rr(()=>y.getContrastText(y.info.dark))),Y(y.Alert,"successFilledColor",rr(()=>y.getContrastText(y.success.dark))),Y(y.Alert,"warningFilledColor",rr(()=>y.getContrastText(y.warning.dark))),Y(y.Alert,"errorStandardBg",tt(y.error.light,.9)),Y(y.Alert,"infoStandardBg",tt(y.info.light,.9)),Y(y.Alert,"successStandardBg",tt(y.success.light,.9)),Y(y.Alert,"warningStandardBg",tt(y.warning.light,.9)),Y(y.Alert,"errorIconColor",R("palette-error-main")),Y(y.Alert,"infoIconColor",R("palette-info-main")),Y(y.Alert,"successIconColor",R("palette-success-main")),Y(y.Alert,"warningIconColor",R("palette-warning-main")),Y(y.AppBar,"defaultBg",R("palette-grey-900")),Y(y.AppBar,"darkBg",R("palette-background-paper")),Y(y.AppBar,"darkColor",R("palette-text-primary")),Y(y.Avatar,"defaultBg",R("palette-grey-600")),Y(y.Button,"inheritContainedBg",R("palette-grey-800")),Y(y.Button,"inheritContainedHoverBg",R("palette-grey-700")),Y(y.Chip,"defaultBorder",R("palette-grey-700")),Y(y.Chip,"defaultAvatarColor",R("palette-grey-300")),Y(y.Chip,"defaultIconColor",R("palette-grey-300")),Y(y.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),Y(y.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),Y(y.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),Y(y.LinearProgress,"primaryBg",tt(y.primary.main,.5)),Y(y.LinearProgress,"secondaryBg",tt(y.secondary.main,.5)),Y(y.LinearProgress,"errorBg",tt(y.error.main,.5)),Y(y.LinearProgress,"infoBg",tt(y.info.main,.5)),Y(y.LinearProgress,"successBg",tt(y.success.main,.5)),Y(y.LinearProgress,"warningBg",tt(y.warning.main,.5)),Y(y.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.13)`),Y(y.Slider,"primaryTrack",tt(y.primary.main,.5)),Y(y.Slider,"secondaryTrack",tt(y.secondary.main,.5)),Y(y.Slider,"errorTrack",tt(y.error.main,.5)),Y(y.Slider,"infoTrack",tt(y.info.main,.5)),Y(y.Slider,"successTrack",tt(y.success.main,.5)),Y(y.Slider,"warningTrack",tt(y.warning.main,.5));const F=hs(y.background.default,.98);Y(y.SnackbarContent,"bg",F),Y(y.SnackbarContent,"color",rr(()=>y.getContrastText(F))),Y(y.SpeedDialAction,"fabHoverBg",hs(y.background.paper,.15)),Y(y.StepConnector,"border",R("palette-grey-600")),Y(y.StepContent,"border",R("palette-grey-600")),Y(y.Switch,"defaultColor",R("palette-grey-300")),Y(y.Switch,"defaultDisabledColor",R("palette-grey-600")),Y(y.Switch,"primaryDisabledColor",tt(y.primary.main,.55)),Y(y.Switch,"secondaryDisabledColor",tt(y.secondary.main,.55)),Y(y.Switch,"errorDisabledColor",tt(y.error.main,.55)),Y(y.Switch,"infoDisabledColor",tt(y.info.main,.55)),Y(y.Switch,"successDisabledColor",tt(y.success.main,.55)),Y(y.Switch,"warningDisabledColor",tt(y.warning.main,.55)),Y(y.TableCell,"border",tt(ds(y.divider,1),.68)),Y(y.Tooltip,"bg",ds(y.grey[700],.92))}gr(y.background,"default"),gr(y.background,"paper"),gr(y.common,"background"),gr(y.common,"onBackground"),gr(y,"divider"),Object.keys(y).forEach(F=>{const M=y[F];F!=="tonalOffset"&&M&&typeof M=="object"&&(M.main&&Y(y[F],"mainChannel",na(ra(M.main))),M.light&&Y(y[F],"lightChannel",na(ra(M.light))),M.dark&&Y(y[F],"darkChannel",na(ra(M.dark))),M.contrastText&&Y(y[F],"contrastTextChannel",na(ra(M.contrastText))),F==="text"&&(gr(y[F],"primary"),gr(y[F],"secondary")),F==="action"&&(M.active&&gr(y[F],"active"),M.selected&&gr(y[F],"selected")))})}),k=t.reduce((U,y)=>An(U,y),k);const w={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:a,getSelector:pS(k)},{vars:S,generateThemeVars:B,generateStyleSheets:W}=Uv(k,w);return k.vars=S,Object.entries(k.colorSchemes[k.defaultColorScheme]).forEach(([U,y])=>{k[U]=y}),k.generateThemeVars=B,k.generateStyleSheets=W,k.generateSpacing=function(){return Ge.createSpacing(c.spacing,Rd(this))},k.getColorSchemeSelector=$v(s),k.spacing=k.generateSpacing(),k.shouldSkipGeneratingVar=a,k.unstable_sxConfig={...jl,...c?.unstable_sxConfig},k.unstable_sx=function(U){return pi({sx:U,theme:this})},k.toRuntimeSource=h0,k}function $p(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Bd({...n===!0?{}:n.palette,mode:t})})}function bS(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:i=n?.mode,...a}=e,s=i||"light",l=o?.[s],c={...o,...n?{[s]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return Su(e,...t);let d=n;"palette"in e||c[s]&&(c[s]!==!0?d=c[s].palette:s==="dark"&&(d={mode:"dark"}));const u=Su({...e,palette:d},...t);return u.defaultColorScheme=s,u.colorSchemes=c,u.palette.mode==="light"&&(u.colorSchemes.light={...c.light!==!0&&c.light,palette:u.palette},$p(u,"dark",c.dark)),u.palette.mode==="dark"&&(u.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:u.palette},$p(u,"light",c.light)),u}return!n&&!("light"in c)&&s==="light"&&(c.light=!0),yS({...a,colorSchemes:c,defaultColorScheme:s,...typeof r!="boolean"&&r},...t)}const Hd=bS(),Ud="$$material";function ES(){const e=Ge.useTheme(Hd);return e[Ud]||e}function TS(e){const{variants:t,...n}=e,r={variants:t,style:Bp(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=Bp(o.style))}),r}const xS=jd();function Vr(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function CS(e){return e?(t,n)=>n[e]:null}function vS(e,t,n){e.theme=AS(e.theme)?n:e.theme[t]||e.theme}function Ps(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(r=>Ps(e,r));if(Array.isArray(n?.variants)){let r;if(n.isProcessed)r=n.style;else{const{variants:o,...i}=n;r=i}return m0(e,n.variants,[r])}return n?.isProcessed?n.style:n}function m0(e,t,n=[]){let r;e:for(let o=0;o<t.length;o+=1){const i=t[o];if(typeof i.props=="function"){if(r??(r={...e,...e.ownerState,ownerState:e.ownerState}),!i.props(r))continue}else for(const a in i.props)if(e[a]!==i.props[a]&&e.ownerState?.[a]!==i.props[a])continue e;typeof i.style=="function"?(r??(r={...e,...e.ownerState,ownerState:e.ownerState}),n.push(i.style(r))):n.push(i.style)}return n}function SS(e={}){const{themeId:t,defaultTheme:n=xS,rootShouldForwardProp:r=Vr,slotShouldForwardProp:o=Vr}=e;function i(a){vS(a,t,n)}return(a,s={})=>{wv(a,k=>k.filter(w=>w!==pi));const{name:l,slot:c,skipVariantsResolver:d,skipSx:u,overridesResolver:h=CS(_S(c)),...p}=s,g=d!==void 0?d:c&&c!=="Root"&&c!=="root"||!1,b=u||!1;let T=Vr;c==="Root"||c==="root"?T=r:c?T=o:kS(a)&&(T=void 0);const E=Iv(a,{shouldForwardProp:T,label:void 0,...p}),C=k=>{if(k.__emotion_real===k)return k;if(typeof k=="function")return function(w){return Ps(w,k)};if(Sr(k)){const w=TS(k);return w.variants?function(S){return Ps(S,w)}:w.style}return k},x=(...k)=>{const w=[],S=k.map(C),B=[];if(w.push(i),l&&h&&B.push(function(y){const R=y.theme.components?.[l]?.styleOverrides;if(!R)return null;const F={};for(const M in R)F[M]=Ps(y,R[M]);return h(y,F)}),l&&!g&&B.push(function(y){const R=y.theme?.components?.[l]?.variants;return R?m0(y,R):null}),b||B.push(pi),Array.isArray(S[0])){const y=S.shift(),R=new Array(w.length).fill(""),F=new Array(B.length).fill("");let M;M=[...R,...y,...F],M.raw=[...R,...y.raw,...F],w.unshift(M)}const W=[...w,...S,...B],U=E(...W);return a.muiName&&(U.muiName=a.muiName),U};return E.withConfig&&(x.withConfig=E.withConfig),x}}function AS(e){for(const t in e)return!1;return!0}function kS(e){return typeof e=="string"&&e.charCodeAt(0)>96}function _S(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function DS(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const zd=e=>DS(e)&&e!=="classes",ut=SS({themeId:Ud,defaultTheme:Hd,rootShouldForwardProp:zd}),$d=Ge.unstable_memoTheme;function Ti(e){return Bv(e)}function xi(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=Ei(e,o,n)}),r}function IS(e){return Ei("MuiSvgIcon",e)}xi("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const wS=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${Jn(t)}`,`fontSize${Jn(n)}`]};return $a(o,IS,r)},NS=ut("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Jn(n.color)}`],t[`fontSize${Jn(n.fontSize)}`]]}})($d(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),Au=_.forwardRef(function(e,t){const n=Ti({props:e,name:"MuiSvgIcon"}),{children:r,className:o,color:i="inherit",component:a="svg",fontSize:s="medium",htmlColor:l,inheritViewBox:c=!1,titleAccess:d,viewBox:u="0 0 24 24",...h}=n,p=_.isValidElement(r)&&r.type==="svg",g={...n,color:i,component:a,fontSize:s,instanceFontSize:e.fontSize,inheritViewBox:c,viewBox:u,hasSvgAsChild:p},b={};c||(b.viewBox=u);const T=wS(g);return f.jsxs(NS,{as:a,className:kt(T.root,o),focusable:"false",color:l,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:t,...b,...h,...p&&r.props,ownerState:g,children:[p?r.props.children:r,d?f.jsx("title",{children:d}):null]})});Au.muiName="SvgIcon";function ct(e,t){function n(r,o){return f.jsx(Au,{"data-testid":void 0,ref:o,...r,children:e})}return n.muiName=Au.muiName,_.memo(_.forwardRef(n))}function PS(e){const{controlled:t,default:n}=e,{current:r}=_.useRef(t!==void 0),[o,i]=_.useState(n),a=r?t:o,s=_.useCallback(l=>{r||i(l)},[]);return[a,s]}function Rs(e){const t=_.useRef(e);return Nv(()=>{t.current=e}),_.useRef((...n)=>(0,t.current)(...n)).current}function el(...e){const t=_.useRef(void 0),n=_.useCallback(r=>{const o=e.map(i=>{if(i==null)return null;if(typeof i=="function"){const a=i,s=a(r);return typeof s=="function"?s:()=>{a(null)}}return i.current=r,()=>{i.current=null}});return()=>{o.forEach(i=>i?.())}},e);return _.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function RS(e,t){const n=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&n>=65&&n<=90&&typeof t=="function"}function LS(e,t){if(!e)return t;function n(a,s){const l={};return Object.keys(s).forEach(c=>{RS(c,s[c])&&typeof a[c]=="function"&&(l[c]=(...d)=>{a[c](...d),s[c](...d)})}),l}if(typeof e=="function"||typeof t=="function")return a=>{const s=typeof t=="function"?t(a):t,l=typeof e=="function"?e({...a,...s}):e,c=kt(a?.className,s?.className,l?.className),d=n(l,s);return{...s,...l,...d,...!!c&&{className:c},...s?.style&&l?.style&&{style:{...s.style,...l.style}},...s?.sx&&l?.sx&&{sx:[...Array.isArray(s.sx)?s.sx:[s.sx],...Array.isArray(l.sx)?l.sx:[l.sx]]}}};const r=t,o=n(e,r),i=kt(r?.className,e?.className);return{...t,...e,...o,...!!i&&{className:i},...r?.style&&e?.style&&{style:{...r.style,...e.style}},...r?.sx&&e?.sx&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}const Ul=ct(f.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"})),Wa=ct(f.jsx("path",{d:"M17 7h-4v2h4c1.65 0 3 1.35 3 3s-1.35 3-3 3h-4v2h4c2.76 0 5-2.24 5-5s-2.24-5-5-5m-6 8H7c-1.65 0-3-1.35-3-3s1.35-3 3-3h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4zm-3-4h8v2H8z"})),At="http://localhost/api/v0".replace(/\/+$/,"");class Jr{constructor(t,n=At,r=vt){G(this,"configuration");this.basePath=n,this.axios=r,t&&(this.configuration=t,this.basePath=t.basePath??n)}}class OS extends Error{constructor(t,n){super(n),this.field=t,this.name="RequiredError"}}const Lt={},Ot="https://example.com",Me=function(e,t,n){if(n==null)throw new OS(t,`Required parameter ${t} was null or undefined when calling ${e}.`)};function ku(e,t,n=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(r=>ku(e,r,n)):Object.keys(t).forEach(r=>ku(e,t[r],`${n}${n!==""?".":""}${r}`)):e.has(n)?e.append(n,t):e.set(n,t))}const Mt=function(e,...t){const n=new URLSearchParams(e.search);ku(n,t),e.search=n.toString()},Ft=function(e){return e.pathname+e.search+e.hash},Bt=function(e,t,n,r){return(o=t,i=n)=>{const a={...e.options,url:(o.defaults.baseURL?"":r?.basePath??i)+e.url};return o.request(a)}},MS=function(e){return{getConnection:async(t,n,r={})=>{Me("getConnection","projectName",t),Me("getConnection","connectionName",n);const o="/projects/{projectName}/connections/{connectionName}".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),i=new URL(o,Ot);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r},l={};Mt(i,{});let c=a&&a.headers?a.headers:{};return s.headers={...l,...c,...r.headers},{url:Ft(i),options:s}},getQuerydata:async(t,n,r,o,i={})=>{Me("getQuerydata","projectName",t),Me("getQuerydata","connectionName",n);const a="/projects/{projectName}/connections/{connectionName}/queryData".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),s=new URL(a,Ot);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...i},d={},u={};r!==void 0&&(u.sqlStatement=r),o!==void 0&&(u.options=o),Mt(s,u);let h=l&&l.headers?l.headers:{};return c.headers={...d,...h,...i.headers},{url:Ft(s),options:c}},getSqlsource:async(t,n,r,o={})=>{Me("getSqlsource","projectName",t),Me("getSqlsource","connectionName",n);const i="/projects/{projectName}/connections/{connectionName}/sqlSource".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),a=new URL(i,Ot);let s;e&&(s=e.baseOptions);const l={method:"GET",...s,...o},c={},d={};r!==void 0&&(d.sqlStatement=r),Mt(a,d);let u=s&&s.headers?s.headers:{};return l.headers={...c,...u,...o.headers},{url:Ft(a),options:l}},getTablesource:async(t,n,r,o,i={})=>{Me("getTablesource","projectName",t),Me("getTablesource","connectionName",n);const a="/projects/{projectName}/connections/{connectionName}/tableSource".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),s=new URL(a,Ot);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...i},d={},u={};r!==void 0&&(u.tableKey=r),o!==void 0&&(u.tablePath=o),Mt(s,u);let h=l&&l.headers?l.headers:{};return c.headers={...d,...h,...i.headers},{url:Ft(s),options:c}},getTemporarytable:async(t,n,r,o={})=>{Me("getTemporarytable","projectName",t),Me("getTemporarytable","connectionName",n);const i="/projects/{projectName}/connections/{connectionName}/temporaryTable".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),a=new URL(i,Ot);let s;e&&(s=e.baseOptions);const l={method:"GET",...s,...o},c={},d={};r!==void 0&&(d.sqlStatement=r),Mt(a,d);let u=s&&s.headers?s.headers:{};return l.headers={...c,...u,...o.headers},{url:Ft(a),options:l}},getTest:async(t,n,r={})=>{Me("getTest","projectName",t),Me("getTest","connectionName",n);const o="/projects/{projectName}/connections/{connectionName}/test".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),i=new URL(o,Ot);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r},l={};Mt(i,{});let c=a&&a.headers?a.headers:{};return s.headers={...l,...c,...r.headers},{url:Ft(i),options:s}},listConnections:async(t,n={})=>{Me("listConnections","projectName",t);const r="/projects/{projectName}/connections".replace("{projectName}",encodeURIComponent(String(t))),o=new URL(r,Ot);let i;e&&(i=e.baseOptions);const a={method:"GET",...i,...n},s={};Mt(o,{});let l=i&&i.headers?i.headers:{};return a.headers={...s,...l,...n.headers},{url:Ft(o),options:a}},listSchemas:async(t,n,r={})=>{Me("listSchemas","projectName",t),Me("listSchemas","connectionName",n);const o="/projects/{projectName}/connections/{connectionName}/schemas".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),i=new URL(o,Ot);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r},l={};Mt(i,{});let c=a&&a.headers?a.headers:{};return s.headers={...l,...c,...r.headers},{url:Ft(i),options:s}},listTables:async(t,n,r,o={})=>{Me("listTables","projectName",t),Me("listTables","connectionName",n),Me("listTables","schemaName",r);const i="/projects/{projectName}/connections/{connectionName}/schemas/{schemaName}/tables".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))).replace("{schemaName}",encodeURIComponent(String(r))),a=new URL(i,Ot);let s;e&&(s=e.baseOptions);const l={method:"GET",...s,...o},c={};Mt(a,{});let d=s&&s.headers?s.headers:{};return l.headers={...c,...d,...o.headers},{url:Ft(a),options:l}}}},yr=function(e){const t=MS(e);return{async getConnection(n,r,o){const i=await t.getConnection(n,r,o),a=e?.serverIndex??0,s=Lt["ConnectionsApi.getConnection"]?.[a]?.url;return(l,c)=>Bt(i,vt,At,e)(l,s||c)},async getQuerydata(n,r,o,i,a){const s=await t.getQuerydata(n,r,o,i,a),l=e?.serverIndex??0,c=Lt["ConnectionsApi.getQuerydata"]?.[l]?.url;return(d,u)=>Bt(s,vt,At,e)(d,c||u)},async getSqlsource(n,r,o,i){const a=await t.getSqlsource(n,r,o,i),s=e?.serverIndex??0,l=Lt["ConnectionsApi.getSqlsource"]?.[s]?.url;return(c,d)=>Bt(a,vt,At,e)(c,l||d)},async getTablesource(n,r,o,i,a){const s=await t.getTablesource(n,r,o,i,a),l=e?.serverIndex??0,c=Lt["ConnectionsApi.getTablesource"]?.[l]?.url;return(d,u)=>Bt(s,vt,At,e)(d,c||u)},async getTemporarytable(n,r,o,i){const a=await t.getTemporarytable(n,r,o,i),s=e?.serverIndex??0,l=Lt["ConnectionsApi.getTemporarytable"]?.[s]?.url;return(c,d)=>Bt(a,vt,At,e)(c,l||d)},async getTest(n,r,o){const i=await t.getTest(n,r,o),a=e?.serverIndex??0,s=Lt["ConnectionsApi.getTest"]?.[a]?.url;return(l,c)=>Bt(i,vt,At,e)(l,s||c)},async listConnections(n,r){const o=await t.listConnections(n,r),i=e?.serverIndex??0,a=Lt["ConnectionsApi.listConnections"]?.[i]?.url;return(s,l)=>Bt(o,vt,At,e)(s,a||l)},async listSchemas(n,r,o){const i=await t.listSchemas(n,r,o),a=e?.serverIndex??0,s=Lt["ConnectionsApi.listSchemas"]?.[a]?.url;return(l,c)=>Bt(i,vt,At,e)(l,s||c)},async listTables(n,r,o,i){const a=await t.listTables(n,r,o,i),s=e?.serverIndex??0,l=Lt["ConnectionsApi.listTables"]?.[s]?.url;return(c,d)=>Bt(a,vt,At,e)(c,l||d)}}};class g0 extends Jr{getConnection(t,n,r){return yr(this.configuration).getConnection(t,n,r).then(o=>o(this.axios,this.basePath))}getQuerydata(t,n,r,o,i){return yr(this.configuration).getQuerydata(t,n,r,o,i).then(a=>a(this.axios,this.basePath))}getSqlsource(t,n,r,o){return yr(this.configuration).getSqlsource(t,n,r,o).then(i=>i(this.axios,this.basePath))}getTablesource(t,n,r,o,i){return yr(this.configuration).getTablesource(t,n,r,o,i).then(a=>a(this.axios,this.basePath))}getTemporarytable(t,n,r,o){return yr(this.configuration).getTemporarytable(t,n,r,o).then(i=>i(this.axios,this.basePath))}getTest(t,n,r){return yr(this.configuration).getTest(t,n,r).then(o=>o(this.axios,this.basePath))}listConnections(t,n){return yr(this.configuration).listConnections(t,n).then(r=>r(this.axios,this.basePath))}listSchemas(t,n,r){return yr(this.configuration).listSchemas(t,n,r).then(o=>o(this.axios,this.basePath))}listTables(t,n,r,o){return yr(this.configuration).listTables(t,n,r,o).then(i=>i(this.axios,this.basePath))}}const FS=function(e){return{listDatabases:async(t,n,r,o={})=>{Me("listDatabases","projectName",t),Me("listDatabases","packageName",n);const i="/projects/{projectName}/packages/{packageName}/databases".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))),a=new URL(i,Ot);let s;e&&(s=e.baseOptions);const l={method:"GET",...s,...o},c={},d={};r!==void 0&&(d.versionId=r),Mt(a,d);let u=s&&s.headers?s.headers:{};return l.headers={...c,...u,...o.headers},{url:Ft(a),options:l}}}},BS=function(e){const t=FS(e);return{async listDatabases(n,r,o,i){const a=await t.listDatabases(n,r,o,i),s=e?.serverIndex??0,l=Lt["DatabasesApi.listDatabases"]?.[s]?.url;return(c,d)=>Bt(a,vt,At,e)(c,l||d)}}};class jS extends Jr{listDatabases(t,n,r,o){return BS(this.configuration).listDatabases(t,n,r,o).then(i=>i(this.axios,this.basePath))}}const HS=function(e){return{getModel:async(t,n,r,o,i={})=>{Me("getModel","projectName",t),Me("getModel","packageName",n),Me("getModel","path",r);const a="/projects/{projectName}/packages/{packageName}/models/{path}".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))).replace("{path}",encodeURIComponent(String(r))),s=new URL(a,Ot);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...i},d={},u={};o!==void 0&&(u.versionId=o),Mt(s,u);let h=l&&l.headers?l.headers:{};return c.headers={...d,...h,...i.headers},{url:Ft(s),options:c}},listModels:async(t,n,r,o={})=>{Me("listModels","projectName",t),Me("listModels","packageName",n);const i="/projects/{projectName}/packages/{packageName}/models".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))),a=new URL(i,Ot);let s;e&&(s=e.baseOptions);const l={method:"GET",...s,...o},c={},d={};r!==void 0&&(d.versionId=r),Mt(a,d);let u=s&&s.headers?s.headers:{};return l.headers={...c,...u,...o.headers},{url:Ft(a),options:l}}}},Gp=function(e){const t=HS(e);return{async getModel(n,r,o,i,a){const s=await t.getModel(n,r,o,i,a),l=e?.serverIndex??0,c=Lt["ModelsApi.getModel"]?.[l]?.url;return(d,u)=>Bt(s,vt,At,e)(d,c||u)},async listModels(n,r,o,i){const a=await t.listModels(n,r,o,i),s=e?.serverIndex??0,l=Lt["ModelsApi.listModels"]?.[s]?.url;return(c,d)=>Bt(a,vt,At,e)(c,l||d)}}};class zl extends Jr{getModel(t,n,r,o,i){return Gp(this.configuration).getModel(t,n,r,o,i).then(a=>a(this.axios,this.basePath))}listModels(t,n,r,o){return Gp(this.configuration).listModels(t,n,r,o).then(i=>i(this.axios,this.basePath))}}const US=function(e){return{getNotebook:async(t,n,r,o,i={})=>{Me("getNotebook","projectName",t),Me("getNotebook","packageName",n),Me("getNotebook","path",r);const a="/projects/{projectName}/packages/{packageName}/notebooks/{path}".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))).replace("{path}",encodeURIComponent(String(r))),s=new URL(a,Ot);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...i},d={},u={};o!==void 0&&(u.versionId=o),Mt(s,u);let h=l&&l.headers?l.headers:{};return c.headers={...d,...h,...i.headers},{url:Ft(s),options:c}},listNotebooks:async(t,n,r,o={})=>{Me("listNotebooks","projectName",t),Me("listNotebooks","packageName",n);const i="/projects/{projectName}/packages/{packageName}/notebooks".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))),a=new URL(i,Ot);let s;e&&(s=e.baseOptions);const l={method:"GET",...s,...o},c={},d={};r!==void 0&&(d.versionId=r),Mt(a,d);let u=s&&s.headers?s.headers:{};return l.headers={...c,...u,...o.headers},{url:Ft(a),options:l}}}},qp=function(e){const t=US(e);return{async getNotebook(n,r,o,i,a){const s=await t.getNotebook(n,r,o,i,a),l=e?.serverIndex??0,c=Lt["NotebooksApi.getNotebook"]?.[l]?.url;return(d,u)=>Bt(s,vt,At,e)(d,c||u)},async listNotebooks(n,r,o,i){const a=await t.listNotebooks(n,r,o,i),s=e?.serverIndex??0,l=Lt["NotebooksApi.listNotebooks"]?.[s]?.url;return(c,d)=>Bt(a,vt,At,e)(c,l||d)}}};class y0 extends Jr{getNotebook(t,n,r,o,i){return qp(this.configuration).getNotebook(t,n,r,o,i).then(a=>a(this.axios,this.basePath))}listNotebooks(t,n,r,o){return qp(this.configuration).listNotebooks(t,n,r,o).then(i=>i(this.axios,this.basePath))}}const zS=function(e){return{getPackage:async(t,n,r,o,i={})=>{Me("getPackage","projectName",t),Me("getPackage","packageName",n);const a="/projects/{projectName}/packages/{packageName}".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))),s=new URL(a,Ot);let l;e&&(l=e.baseOptions);const c={method:"GET",...l,...i},d={},u={};r!==void 0&&(u.versionId=r),o!==void 0&&(u.reload=o),Mt(s,u);let h=l&&l.headers?l.headers:{};return c.headers={...d,...h,...i.headers},{url:Ft(s),options:c}},listPackages:async(t,n={})=>{Me("listPackages","projectName",t);const r="/projects/{projectName}/packages".replace("{projectName}",encodeURIComponent(String(t))),o=new URL(r,Ot);let i;e&&(i=e.baseOptions);const a={method:"GET",...i,...n},s={};Mt(o,{});let l=i&&i.headers?i.headers:{};return a.headers={...s,...l,...n.headers},{url:Ft(o),options:a}}}},Wp=function(e){const t=zS(e);return{async getPackage(n,r,o,i,a){const s=await t.getPackage(n,r,o,i,a),l=e?.serverIndex??0,c=Lt["PackagesApi.getPackage"]?.[l]?.url;return(d,u)=>Bt(s,vt,At,e)(d,c||u)},async listPackages(n,r){const o=await t.listPackages(n,r),i=e?.serverIndex??0,a=Lt["PackagesApi.listPackages"]?.[i]?.url;return(s,l)=>Bt(o,vt,At,e)(s,a||l)}}};class b0 extends Jr{getPackage(t,n,r,o,i){return Wp(this.configuration).getPackage(t,n,r,o,i).then(a=>a(this.axios,this.basePath))}listPackages(t,n){return Wp(this.configuration).listPackages(t,n).then(r=>r(this.axios,this.basePath))}}const $S=function(e){return{getProject:async(t,n,r={})=>{Me("getProject","projectName",t);const o="/projects/{projectName}".replace("{projectName}",encodeURIComponent(String(t))),i=new URL(o,Ot);let a;e&&(a=e.baseOptions);const s={method:"GET",...a,...r},l={},c={};n!==void 0&&(c.reload=n),Mt(i,c);let d=a&&a.headers?a.headers:{};return s.headers={...l,...d,...r.headers},{url:Ft(i),options:s}},listProjects:async(t={})=>{const n="/projects",r=new URL(n,Ot);let o;e&&(o=e.baseOptions);const i={method:"GET",...o,...t},a={};Mt(r,{});let s=o&&o.headers?o.headers:{};return i.headers={...a,...s,...t.headers},{url:Ft(r),options:i}}}},Vp=function(e){const t=$S(e);return{async getProject(n,r,o){const i=await t.getProject(n,r,o),a=e?.serverIndex??0,s=Lt["ProjectsApi.getProject"]?.[a]?.url;return(l,c)=>Bt(i,vt,At,e)(l,s||c)},async listProjects(n){const r=await t.listProjects(n),o=e?.serverIndex??0,i=Lt["ProjectsApi.listProjects"]?.[o]?.url;return(a,s)=>Bt(r,vt,At,e)(a,i||s)}}};class E0 extends Jr{getProject(t,n,r){return Vp(this.configuration).getProject(t,n,r).then(o=>o(this.axios,this.basePath))}listProjects(t){return Vp(this.configuration).listProjects(t).then(n=>n(this.axios,this.basePath))}}const GS=function(e){return{executeQuery:async(t,n,r,o,i,a,s,l={})=>{Me("executeQuery","projectName",t),Me("executeQuery","packageName",n),Me("executeQuery","path",r);const c="/projects/{projectName}/packages/{packageName}/queryResults/{path}".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))).replace("{path}",encodeURIComponent(String(r))),d=new URL(c,Ot);let u;e&&(u=e.baseOptions);const h={method:"GET",...u,...l},p={},g={};o!==void 0&&(g.query=o),i!==void 0&&(g.sourceName=i),a!==void 0&&(g.queryName=a),s!==void 0&&(g.versionId=s),Mt(d,g);let b=u&&u.headers?u.headers:{};return h.headers={...p,...b,...l.headers},{url:Ft(d),options:h}}}},qS=function(e){const t=GS(e);return{async executeQuery(n,r,o,i,a,s,l,c){const d=await t.executeQuery(n,r,o,i,a,s,l,c),u=e?.serverIndex??0,h=Lt["QueryresultsApi.executeQuery"]?.[u]?.url;return(p,g)=>Bt(d,vt,At,e)(p,h||g)}}};class T0 extends Jr{executeQuery(t,n,r,o,i,a,s,l){return qS(this.configuration).executeQuery(t,n,r,o,i,a,s,l).then(c=>c(this.axios,this.basePath))}}const WS=function(e){return{listSchedules:async(t,n,r,o={})=>{Me("listSchedules","projectName",t),Me("listSchedules","packageName",n);const i="/projects/{projectName}/packages/{packageName}/schedules".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))),a=new URL(i,Ot);let s;e&&(s=e.baseOptions);const l={method:"GET",...s,...o},c={},d={};r!==void 0&&(d.versionId=r),Mt(a,d);let u=s&&s.headers?s.headers:{};return l.headers={...c,...u,...o.headers},{url:Ft(a),options:l}}}},VS=function(e){const t=WS(e);return{async listSchedules(n,r,o,i){const a=await t.listSchedules(n,r,o,i),s=e?.serverIndex??0,l=Lt["SchedulesApi.listSchedules"]?.[s]?.url;return(c,d)=>Bt(a,vt,At,e)(c,l||d)}}};class YS extends Jr{listSchedules(t,n,r,o){return VS(this.configuration).listSchedules(t,n,r,o).then(i=>i(this.axios,this.basePath))}}class on{constructor(t={}){G(this,"apiKey");G(this,"username");G(this,"password");G(this,"accessToken");G(this,"basePath");G(this,"serverIndex");G(this,"baseOptions");G(this,"formDataCtor");this.apiKey=t.apiKey,this.username=t.username,this.password=t.password,this.accessToken=t.accessToken,this.basePath=t.basePath,this.serverIndex=t.serverIndex,this.baseOptions={...t.baseOptions,headers:{...t.baseOptions?.headers}},this.formDataCtor=t.formDataCtor}isJsonMime(t){const n=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return t!==null&&(n.test(t)||t.toLowerCase()==="application/json-patch+json")}}const x0=[{id:"abap",name:"ABAP",import:()=>Promise.resolve().then(()=>require("./abap-BmBUA35e-Dwt2rH6y.cjs"))},{id:"actionscript-3",name:"ActionScript",import:()=>Promise.resolve().then(()=>require("./actionscript-3-zFUbzQa9-mj8Uhnsc.cjs"))},{id:"ada",name:"Ada",import:()=>Promise.resolve().then(()=>require("./ada-CBvPkFpZ-DZM58Vqs.cjs"))},{id:"angular-html",name:"Angular HTML",import:()=>Promise.resolve().then(()=>require("./angular-html-0fTdLuKf-iuJ7ajzA.cjs")).then(e=>e.f)},{id:"angular-ts",name:"Angular TypeScript",import:()=>Promise.resolve().then(()=>require("./angular-ts-wkniW60G-Cm4EfyWn.cjs"))},{id:"apache",name:"Apache Conf",import:()=>Promise.resolve().then(()=>require("./apache-CVNlsSDc-D7v5fxtZ.cjs"))},{id:"apex",name:"Apex",import:()=>Promise.resolve().then(()=>require("./apex-DFk3KRB1-4hrAnw0a.cjs"))},{id:"apl",name:"APL",import:()=>Promise.resolve().then(()=>require("./apl-TLDHFJX6-DZ13rf9a.cjs"))},{id:"applescript",name:"AppleScript",import:()=>Promise.resolve().then(()=>require("./applescript-CYMR_y0g-Cnd3Dxju.cjs"))},{id:"ara",name:"Ara",import:()=>Promise.resolve().then(()=>require("./ara-4QmU5e04-BQ2aGbFQ.cjs"))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>Promise.resolve().then(()=>require("./asciidoc-v_1bjgUg-C6nYvw8K.cjs"))},{id:"asm",name:"Assembly",import:()=>Promise.resolve().then(()=>require("./asm-RC0Yh-NZ-CQnBVCj-.cjs"))},{id:"astro",name:"Astro",import:()=>Promise.resolve().then(()=>require("./astro-Uf8_VxKJ--l1q7Jnf.cjs"))},{id:"awk",name:"AWK",import:()=>Promise.resolve().then(()=>require("./awk-gPH8MVMW-DUx4h__E.cjs"))},{id:"ballerina",name:"Ballerina",import:()=>Promise.resolve().then(()=>require("./ballerina-kvLnRU_e-CXlzbmzl.cjs"))},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>Promise.resolve().then(()=>require("./bat-BHYy44sT-DlMT9sut.cjs"))},{id:"beancount",name:"Beancount",import:()=>Promise.resolve().then(()=>require("./beancount-D-MADTs_-CyyiuUzM.cjs"))},{id:"berry",name:"Berry",aliases:["be"],import:()=>Promise.resolve().then(()=>require("./berry-Ci9U0o4h-B0EjuzrL.cjs"))},{id:"bibtex",name:"BibTeX",import:()=>Promise.resolve().then(()=>require("./bibtex-CX618D15-CfoG9xRq.cjs"))},{id:"bicep",name:"Bicep",import:()=>Promise.resolve().then(()=>require("./bicep-iuYiPopT-D6PH_9IY.cjs"))},{id:"blade",name:"Blade",import:()=>Promise.resolve().then(()=>require("./blade-BtR00Gx0-CC9iBOSk.cjs"))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>Promise.resolve().then(()=>require("./bsl-BIXPNqL4-C8J0Suid.cjs"))},{id:"c",name:"C",import:()=>Promise.resolve().then(()=>require("./c-DASdrs7p-C4sXGJZM.cjs"))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>Promise.resolve().then(()=>require("./cadence-BDALQi26-Dq2CYzXG.cjs"))},{id:"cairo",name:"Cairo",import:()=>Promise.resolve().then(()=>require("./cairo-tXZKA2PT-XMsK9HSC.cjs"))},{id:"clarity",name:"Clarity",import:()=>Promise.resolve().then(()=>require("./clarity-CNgV2Ths-ytMkUD5Q.cjs"))},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>Promise.resolve().then(()=>require("./clojure-CsKKFGwv-B_Wv414H.cjs"))},{id:"cmake",name:"CMake",import:()=>Promise.resolve().then(()=>require("./cmake-Dr-A3iJx-TBUaQXYY.cjs"))},{id:"cobol",name:"COBOL",import:()=>Promise.resolve().then(()=>require("./cobol-DMssKNmC-2IrH-LQK.cjs"))},{id:"codeowners",name:"CODEOWNERS",import:()=>Promise.resolve().then(()=>require("./codeowners-Bt9yU6NX-QhPK6lIJ.cjs"))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>Promise.resolve().then(()=>require("./codeql-DBNTqJi1-B7Q9tkDJ.cjs"))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>Promise.resolve().then(()=>require("./coffee-D_GzM8k1-DQThhwJg.cjs"))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>Promise.resolve().then(()=>require("./common-lisp-r7ZEOG7T-Ced3ctK5.cjs"))},{id:"coq",name:"Coq",import:()=>Promise.resolve().then(()=>require("./coq-CB6Pv_W9-BTRB4iqi.cjs"))},{id:"cpp",name:"C++",aliases:["c++"],import:()=>Promise.resolve().then(()=>require("./cpp-CJF2i3ah-mxGthENV.cjs"))},{id:"crystal",name:"Crystal",import:()=>Promise.resolve().then(()=>require("./crystal-BKWnaU3g-Dh9wsPqT.cjs"))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>Promise.resolve().then(()=>require("./csharp-CYWRhZ2R-TKds-MhG.cjs"))},{id:"css",name:"CSS",import:()=>Promise.resolve().then(()=>require("./css-D1aVdRIU-B0kbn78J.cjs"))},{id:"csv",name:"CSV",import:()=>Promise.resolve().then(()=>require("./csv-DvCncUGQ-BVJjiaC3.cjs"))},{id:"cue",name:"CUE",import:()=>Promise.resolve().then(()=>require("./cue-BXMrmvay-Cz4J-rnd.cjs"))},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>Promise.resolve().then(()=>require("./cypher-DTm5zNR1-DuKTiyez.cjs"))},{id:"d",name:"D",import:()=>Promise.resolve().then(()=>require("./d-D6ZXmn3l-BW9Wd7aK.cjs"))},{id:"dart",name:"Dart",import:()=>Promise.resolve().then(()=>require("./dart-Dz59Is3F-CWs-er6b.cjs"))},{id:"dax",name:"DAX",import:()=>Promise.resolve().then(()=>require("./dax-DTVGzydb-CDxFL2Kb.cjs"))},{id:"desktop",name:"Desktop",import:()=>Promise.resolve().then(()=>require("./desktop-Db9vb-dl-CFgo0jo7.cjs"))},{id:"diff",name:"Diff",import:()=>Promise.resolve().then(()=>require("./diff-XmNrvgM1-BsEkKwI8.cjs"))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>Promise.resolve().then(()=>require("./docker-DWH2onkn-hwiw4W8I.cjs"))},{id:"dotenv",name:"dotEnv",import:()=>Promise.resolve().then(()=>require("./dotenv-4337wvzu-CJ5o3G1C.cjs"))},{id:"dream-maker",name:"Dream Maker",import:()=>Promise.resolve().then(()=>require("./dream-maker-CvvfrJSx-DBharE9Q.cjs"))},{id:"edge",name:"Edge",import:()=>Promise.resolve().then(()=>require("./edge-CgxR-qhM-QOBckj2G.cjs"))},{id:"elixir",name:"Elixir",import:()=>Promise.resolve().then(()=>require("./elixir-DZkeSPwW-BCzkKkN0.cjs"))},{id:"elm",name:"Elm",import:()=>Promise.resolve().then(()=>require("./elm-BKuV1HE1-BuAwt4Hl.cjs"))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>Promise.resolve().then(()=>require("./emacs-lisp-BAefI874-CDDyFsvQ.cjs"))},{id:"erb",name:"ERB",import:()=>Promise.resolve().then(()=>require("./erb-BLwkpXUJ-D1H6o7M6.cjs"))},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>Promise.resolve().then(()=>require("./erlang-CmIiwF3I-3VgdrQXV.cjs"))},{id:"fennel",name:"Fennel",import:()=>Promise.resolve().then(()=>require("./fennel-DNqkz9pE-RbmrEXt1.cjs"))},{id:"fish",name:"Fish",import:()=>Promise.resolve().then(()=>require("./fish-DIm72t2T-CnamI0Ar.cjs"))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>Promise.resolve().then(()=>require("./fluent-BapTxJsC-DFpT66K8.cjs"))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>Promise.resolve().then(()=>require("./fortran-fixed-form-s9Hnb3av-CEjzHIOU.cjs"))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>Promise.resolve().then(()=>require("./fortran-free-form-CNDsBFUj-IaGrWIda.cjs"))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>Promise.resolve().then(()=>require("./fsharp-Cv0x43wb-BCqXh2V2.cjs"))},{id:"gdresource",name:"GDResource",import:()=>Promise.resolve().then(()=>require("./gdresource-CMcKXvgJ-DKu0rUhv.cjs"))},{id:"gdscript",name:"GDScript",import:()=>Promise.resolve().then(()=>require("./gdscript-D7aheHm--5N_43TPQ.cjs"))},{id:"gdshader",name:"GDShader",import:()=>Promise.resolve().then(()=>require("./gdshader-BGJEsM2Z-Bl85Hrm5.cjs"))},{id:"genie",name:"Genie",import:()=>Promise.resolve().then(()=>require("./genie-C9gPjc6J-DGsxMAbQ.cjs"))},{id:"gherkin",name:"Gherkin",import:()=>Promise.resolve().then(()=>require("./gherkin-bka1Exbx-CVV6nEUH.cjs"))},{id:"git-commit",name:"Git Commit Message",import:()=>Promise.resolve().then(()=>require("./git-commit-BspYIY3P-BVfAvSRj.cjs"))},{id:"git-rebase",name:"Git Rebase Message",import:()=>Promise.resolve().then(()=>require("./git-rebase--zLBTjUa-yZFCfYZI.cjs"))},{id:"gleam",name:"Gleam",import:()=>Promise.resolve().then(()=>require("./gleam-B4k9YFGD-nR4mjrhK.cjs"))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>Promise.resolve().then(()=>require("./glimmer-js-DhY9umHJ-B8qSrQ6z.cjs"))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>Promise.resolve().then(()=>require("./glimmer-ts-CCrHcYH5-BhxePz75.cjs"))},{id:"glsl",name:"GLSL",import:()=>Promise.resolve().then(()=>require("./glsl-XLGYNq5B-CKVGq6Vy.cjs"))},{id:"gnuplot",name:"Gnuplot",import:()=>Promise.resolve().then(()=>require("./gnuplot-DnWoRZt--CurtDYoJ.cjs"))},{id:"go",name:"Go",import:()=>Promise.resolve().then(()=>require("./go-BErP6iv1-CM9_GlwL.cjs"))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>Promise.resolve().then(()=>require("./graphql-DWpQF4JI-DAzySKco.cjs"))},{id:"groovy",name:"Groovy",import:()=>Promise.resolve().then(()=>require("./groovy-IWs5-NIO-BaVp9Il5.cjs"))},{id:"hack",name:"Hack",import:()=>Promise.resolve().then(()=>require("./hack-CQrV-ytR-DlrP0wJF.cjs"))},{id:"haml",name:"Ruby Haml",import:()=>Promise.resolve().then(()=>require("./haml-CMN0hQaL-D-xy9KwO.cjs"))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>Promise.resolve().then(()=>require("./handlebars-Cc-7fXX5-C3QFNHjc.cjs"))},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>Promise.resolve().then(()=>require("./haskell-CtlGos0K-suhyCHEm.cjs"))},{id:"haxe",name:"Haxe",import:()=>Promise.resolve().then(()=>require("./haxe-CZZ33vZw-BIQU1qHi.cjs"))},{id:"hcl",name:"HashiCorp HCL",import:()=>Promise.resolve().then(()=>require("./hcl-6hOg9WP4-CbQ1yCnz.cjs"))},{id:"hjson",name:"Hjson",import:()=>Promise.resolve().then(()=>require("./hjson-CgwED-oz-Ddklb4QM.cjs"))},{id:"hlsl",name:"HLSL",import:()=>Promise.resolve().then(()=>require("./hlsl-3-lv4gi7-B4NkiBfC.cjs"))},{id:"html",name:"HTML",import:()=>Promise.resolve().then(()=>require("./html-B0P_v3yU-Bx2ubL-P.cjs"))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>Promise.resolve().then(()=>require("./html-derivative-D59SHfh8-BWgQxp09.cjs"))},{id:"http",name:"HTTP",import:()=>Promise.resolve().then(()=>require("./http-Dcjm_K1m-CyYiumKc.cjs"))},{id:"hxml",name:"HXML",import:()=>Promise.resolve().then(()=>require("./hxml-BNKImryz-DflK5a38.cjs"))},{id:"hy",name:"Hy",import:()=>Promise.resolve().then(()=>require("./hy-C2xHhR6I-DpyTdO3T.cjs"))},{id:"imba",name:"Imba",import:()=>Promise.resolve().then(()=>require("./imba-Drd0AMDo-CtsqZbnp.cjs"))},{id:"ini",name:"INI",aliases:["properties"],import:()=>Promise.resolve().then(()=>require("./ini-BUcvsX-U-CymULaw_.cjs"))},{id:"java",name:"Java",import:()=>Promise.resolve().then(()=>require("./java-B7odJ7Ap-Bn1Lvoni.cjs"))},{id:"javascript",name:"JavaScript",aliases:["js"],import:()=>Promise.resolve().then(()=>require("./javascript-fa8UlHZE-Bnnicc83.cjs"))},{id:"jinja",name:"Jinja",import:()=>Promise.resolve().then(()=>require("./jinja-CCSYduCH-DFH8FT_u.cjs"))},{id:"jison",name:"Jison",import:()=>Promise.resolve().then(()=>require("./jison-BygvlveW-CAVWywU2.cjs"))},{id:"json",name:"JSON",import:()=>Promise.resolve().then(()=>require("./json-71t8ZF9g-y-J1j5EW.cjs"))},{id:"json5",name:"JSON5",import:()=>Promise.resolve().then(()=>require("./json5-Z7F6rA6a-CzvlWgZ7.cjs"))},{id:"jsonc",name:"JSON with Comments",import:()=>Promise.resolve().then(()=>require("./jsonc-Dphhs4m2-BnhWfmQw.cjs"))},{id:"jsonl",name:"JSON Lines",import:()=>Promise.resolve().then(()=>require("./jsonl-D9jj92Gg-BbGkWPJz.cjs"))},{id:"jsonnet",name:"Jsonnet",import:()=>Promise.resolve().then(()=>require("./jsonnet-DEQ7IUoJ-Bn--UDZ1.cjs"))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>Promise.resolve().then(()=>require("./jssm-j74e88UX-4CSVp8lc.cjs"))},{id:"jsx",name:"JSX",import:()=>Promise.resolve().then(()=>require("./jsx-Bkesy5tT-D8YwVp-7.cjs"))},{id:"julia",name:"Julia",aliases:["jl"],import:()=>Promise.resolve().then(()=>require("./julia-CiahampL-B6MmycY8.cjs"))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>Promise.resolve().then(()=>require("./kotlin-DCgZY7Ii-DDI6myF6.cjs"))},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>Promise.resolve().then(()=>require("./kusto-Cw029H-v-OZxALJZT.cjs"))},{id:"latex",name:"LaTeX",import:()=>Promise.resolve().then(()=>require("./latex-LfGCYGw5-BpRkh3pg.cjs"))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>Promise.resolve().then(()=>require("./lean-CYSet4vs-D1iY-35j.cjs"))},{id:"less",name:"Less",import:()=>Promise.resolve().then(()=>require("./less-DQA4v-Nm-DIaY7vQJ.cjs"))},{id:"liquid",name:"Liquid",import:()=>Promise.resolve().then(()=>require("./liquid-CvufO3kO-HvZpXeqg.cjs"))},{id:"log",name:"Log file",import:()=>Promise.resolve().then(()=>require("./log-D2eRfqDn-BIXUeBaj.cjs"))},{id:"logo",name:"Logo",import:()=>Promise.resolve().then(()=>require("./logo-QEAtGWZ9-B2d3b27P.cjs"))},{id:"lua",name:"Lua",import:()=>Promise.resolve().then(()=>require("./lua-BVfhNLDr-uB28QHL6.cjs"))},{id:"luau",name:"Luau",import:()=>Promise.resolve().then(()=>require("./luau-BjYGiqID-CvqAeq4F.cjs"))},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>Promise.resolve().then(()=>require("./make-BjuHP00g-Oob5Z9Pk.cjs"))},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>Promise.resolve().then(()=>require("./markdown-B6guhLWd-BGBuj4LZ.cjs"))},{id:"marko",name:"Marko",import:()=>Promise.resolve().then(()=>require("./marko-CHlMS8w5-Bly6x4mc.cjs"))},{id:"matlab",name:"MATLAB",import:()=>Promise.resolve().then(()=>require("./matlab-BpQlIJiw-CbN2rF6P.cjs"))},{id:"mdc",name:"MDC",import:()=>Promise.resolve().then(()=>require("./mdc-4K6B6lHG-DgYKiLhu.cjs"))},{id:"mdx",name:"MDX",import:()=>Promise.resolve().then(()=>require("./mdx-DIoECIFU-Cl31h8mi.cjs"))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>Promise.resolve().then(()=>require("./mermaid-BZ7WHNIe-CSogK_LM.cjs"))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>Promise.resolve().then(()=>require("./mipsasm-DusDYkFc-BseoYJQp.cjs"))},{id:"mojo",name:"Mojo",import:()=>Promise.resolve().then(()=>require("./mojo-CY9jaezJ-D8QAG3Ze.cjs"))},{id:"move",name:"Move",import:()=>Promise.resolve().then(()=>require("./move-ChphFumd-DaBrcjat.cjs"))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>Promise.resolve().then(()=>require("./narrat-Dz4d7OmN-oOfAO4q8.cjs"))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>Promise.resolve().then(()=>require("./nextflow-DW0Yq9a2-BxJSKvPb.cjs"))},{id:"nginx",name:"Nginx",import:()=>Promise.resolve().then(()=>require("./nginx-Can2eAjw-rA5kE0A8.cjs"))},{id:"nim",name:"Nim",import:()=>Promise.resolve().then(()=>require("./nim-B3r2RtQZ-CRDytbsR.cjs"))},{id:"nix",name:"Nix",import:()=>Promise.resolve().then(()=>require("./nix-Cg5uV_xg-DNME0Ea7.cjs"))},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>Promise.resolve().then(()=>require("./nushell-BfRnzRWn-DI9Z3l3M.cjs"))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>Promise.resolve().then(()=>require("./objective-c-BGg9R27G-DVx8Rcni.cjs"))},{id:"objective-cpp",name:"Objective-C++",import:()=>Promise.resolve().then(()=>require("./objective-cpp-CJ3y3V_5-s6XI7Jvk.cjs"))},{id:"ocaml",name:"OCaml",import:()=>Promise.resolve().then(()=>require("./ocaml-BZLsfx_o-kUzDDUf2.cjs"))},{id:"pascal",name:"Pascal",import:()=>Promise.resolve().then(()=>require("./pascal-l2bqd7Dz-D509_I72.cjs"))},{id:"perl",name:"Perl",import:()=>Promise.resolve().then(()=>require("./perl-DaMQyPwp-C9Yq1yZR.cjs"))},{id:"php",name:"PHP",import:()=>Promise.resolve().then(()=>require("./php-BL3EfPBi-Ctb1WwmF.cjs"))},{id:"plsql",name:"PL/SQL",import:()=>Promise.resolve().then(()=>require("./plsql-oVq_K_wH-C_qH_YOK.cjs"))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>Promise.resolve().then(()=>require("./po-5jaeIyVd-CBsLQIcu.cjs"))},{id:"polar",name:"Polar",import:()=>Promise.resolve().then(()=>require("./polar-wcLp8ci7-De-CDeYv.cjs"))},{id:"postcss",name:"PostCSS",import:()=>Promise.resolve().then(()=>require("./postcss-BZ3MNRIJ-BtcsgaYj.cjs"))},{id:"powerquery",name:"PowerQuery",import:()=>Promise.resolve().then(()=>require("./powerquery-CgRa2XRw-B0rHn13V.cjs"))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>Promise.resolve().then(()=>require("./powershell-Diwyv8Eh-rCX2OYXT.cjs"))},{id:"prisma",name:"Prisma",import:()=>Promise.resolve().then(()=>require("./prisma-COL_v1x4-BaaUHYMp.cjs"))},{id:"prolog",name:"Prolog",import:()=>Promise.resolve().then(()=>require("./prolog-CuvJOxqT-DrXD2tGS.cjs"))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>Promise.resolve().then(()=>require("./proto-o9HLmF90-BtmQjBQu.cjs"))},{id:"pug",name:"Pug",aliases:["jade"],import:()=>Promise.resolve().then(()=>require("./pug-HKe4Luo3-DATD2ck2.cjs"))},{id:"puppet",name:"Puppet",import:()=>Promise.resolve().then(()=>require("./puppet-wpGOnQp5-cIrXIuy8.cjs"))},{id:"purescript",name:"PureScript",import:()=>Promise.resolve().then(()=>require("./purescript-B_1NgE2N-CX9QPs2N.cjs"))},{id:"python",name:"Python",aliases:["py"],import:()=>Promise.resolve().then(()=>require("./python-xYxLFJY--B9x3euv6.cjs"))},{id:"qml",name:"QML",import:()=>Promise.resolve().then(()=>require("./qml-FlMIyjU9-DosAZz3a.cjs"))},{id:"qmldir",name:"QML Directory",import:()=>Promise.resolve().then(()=>require("./qmldir-BInDYbpo-DNF9H2ir.cjs"))},{id:"qss",name:"Qt Style Sheets",import:()=>Promise.resolve().then(()=>require("./qss-D-h4NdUG-C744dLby.cjs"))},{id:"r",name:"R",import:()=>Promise.resolve().then(()=>require("./r-F-9I-ITZ-DgOc9oMe.cjs"))},{id:"racket",name:"Racket",import:()=>Promise.resolve().then(()=>require("./racket-BoD1TBFT-Do9_vqnd.cjs"))},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>Promise.resolve().then(()=>require("./raku-IaYcw19m-BW8wAUIz.cjs"))},{id:"razor",name:"ASP.NET Razor",import:()=>Promise.resolve().then(()=>require("./razor-CeqqNtyB-BA9H6h3O.cjs"))},{id:"reg",name:"Windows Registry Script",import:()=>Promise.resolve().then(()=>require("./reg-CMUdAgIP-CGWN_v-z.cjs"))},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>Promise.resolve().then(()=>require("./regexp-GiFkbxS--N7Z4hEeU.cjs"))},{id:"rel",name:"Rel",import:()=>Promise.resolve().then(()=>require("./rel-BaRn3QX7-BYqA7mnV.cjs"))},{id:"riscv",name:"RISC-V",import:()=>Promise.resolve().then(()=>require("./riscv-B9V3SsvW-ayQMUpo9.cjs"))},{id:"rst",name:"reStructuredText",import:()=>Promise.resolve().then(()=>require("./rst-C3D6-dqL-BT5HStkB.cjs"))},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>Promise.resolve().then(()=>require("./ruby-DcPLUUK3-wN4H1UJ4.cjs"))},{id:"rust",name:"Rust",aliases:["rs"],import:()=>Promise.resolve().then(()=>require("./rust-Pc7DCsZD-BnFKGEfa.cjs"))},{id:"sas",name:"SAS",import:()=>Promise.resolve().then(()=>require("./sas-tDSYjXcL-CVXyyAVy.cjs"))},{id:"sass",name:"Sass",import:()=>Promise.resolve().then(()=>require("./sass-iCyS6eP9-B9gYryDE.cjs"))},{id:"scala",name:"Scala",import:()=>Promise.resolve().then(()=>require("./scala-Cly-fENF-C85dOwSU.cjs"))},{id:"scheme",name:"Scheme",import:()=>Promise.resolve().then(()=>require("./scheme-Zi24oEYu-B_XUaARm.cjs"))},{id:"scss",name:"SCSS",import:()=>Promise.resolve().then(()=>require("./scss-DhHc4lxB-DlTye6oP.cjs"))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>Promise.resolve().then(()=>require("./sdbl-BBamrXFL-7Y5u0OW0.cjs"))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>Promise.resolve().then(()=>require("./shaderlab-CvqEIoL0-CHjycJTX.cjs"))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>Promise.resolve().then(()=>require("./shellscript-Dn0-btNd-3DYM9fut.cjs"))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>Promise.resolve().then(()=>require("./shellsession-8OLo3sB6-1ZxGYG-g.cjs"))},{id:"smalltalk",name:"Smalltalk",import:()=>Promise.resolve().then(()=>require("./smalltalk-Cns31tKw-CCvytUuW.cjs"))},{id:"solidity",name:"Solidity",import:()=>Promise.resolve().then(()=>require("./solidity-BG_k8fA_-BcNcjFC4.cjs"))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>Promise.resolve().then(()=>require("./soy-EwHMOVPj-BYqzy0Qe.cjs"))},{id:"sparql",name:"SPARQL",import:()=>Promise.resolve().then(()=>require("./sparql-DhuelBut-De7XP5Cr.cjs"))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>Promise.resolve().then(()=>require("./splunk-CTqDjQdo-CzITjJj7.cjs"))},{id:"sql",name:"SQL",import:()=>Promise.resolve().then(()=>require("./sql-DCkt643--BqWZrLHB.cjs"))},{id:"ssh-config",name:"SSH Config",import:()=>Promise.resolve().then(()=>require("./ssh-config-DHHGll-v-DUPeuEdB.cjs"))},{id:"stata",name:"Stata",import:()=>Promise.resolve().then(()=>require("./stata-Dok6hMw0-Dx7ri5v3.cjs"))},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>Promise.resolve().then(()=>require("./stylus-n_9f0QQ5-ByHs6N-o.cjs"))},{id:"svelte",name:"Svelte",import:()=>Promise.resolve().then(()=>require("./svelte-01qw6Rxm-Dkzwx26T.cjs"))},{id:"swift",name:"Swift",import:()=>Promise.resolve().then(()=>require("./swift-BAWqNR8A-C5DnOriA.cjs"))},{id:"system-verilog",name:"SystemVerilog",import:()=>Promise.resolve().then(()=>require("./system-verilog-Cui-g-ut-ClPLYLwh.cjs"))},{id:"systemd",name:"Systemd Units",import:()=>Promise.resolve().then(()=>require("./systemd-CsKYQIQK-BASX0DlX.cjs"))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>Promise.resolve().then(()=>require("./talonscript-D2dGh8FO-DkCSnLHD.cjs"))},{id:"tasl",name:"Tasl",import:()=>Promise.resolve().then(()=>require("./tasl-D3W8HMV6-BAQJK7KZ.cjs"))},{id:"tcl",name:"Tcl",import:()=>Promise.resolve().then(()=>require("./tcl-2y0Fuc4S-CwJAYTvh.cjs"))},{id:"templ",name:"Templ",import:()=>Promise.resolve().then(()=>require("./templ-Hmy8U0DD-zKf-hrbF.cjs"))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>Promise.resolve().then(()=>require("./terraform-BGW6Oerf-s-pzyVvp.cjs"))},{id:"tex",name:"TeX",import:()=>Promise.resolve().then(()=>require("./tex-mHs7a43s-CNkFtfz8.cjs"))},{id:"toml",name:"TOML",import:()=>Promise.resolve().then(()=>require("./toml-CQSfOn0e-CyMM7IXy.cjs"))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>Promise.resolve().then(()=>require("./ts-tags-DYZ4SGcN-BlDvJKty.cjs"))},{id:"tsv",name:"TSV",import:()=>Promise.resolve().then(()=>require("./tsv-BtvSkaG0-DqNGnuVj.cjs"))},{id:"tsx",name:"TSX",import:()=>Promise.resolve().then(()=>require("./tsx-DiGsgWT8-DpBRUnKC.cjs"))},{id:"turtle",name:"Turtle",import:()=>Promise.resolve().then(()=>require("./turtle-BJ2wmjPc-DfO3eAsu.cjs"))},{id:"twig",name:"Twig",import:()=>Promise.resolve().then(()=>require("./twig-BmytkGQV-Cn_QYGU2.cjs"))},{id:"typescript",name:"TypeScript",aliases:["ts"],import:()=>Promise.resolve().then(()=>require("./typescript-buWNZFwO-BqvpT6pB.cjs"))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>Promise.resolve().then(()=>require("./typespec-bLbdsxJL-P-ZVy8yC.cjs"))},{id:"typst",name:"Typst",aliases:["typ"],import:()=>Promise.resolve().then(()=>require("./typst-Y9_SmXTs-BVh2IsT9.cjs"))},{id:"v",name:"V",import:()=>Promise.resolve().then(()=>require("./v-wa8Orrdd-BUlE9136.cjs"))},{id:"vala",name:"Vala",import:()=>Promise.resolve().then(()=>require("./vala-DRdriFr_-BIymb2K_.cjs"))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>Promise.resolve().then(()=>require("./vb-E2_-jk4M-IXOh8mqV.cjs"))},{id:"verilog",name:"Verilog",import:()=>Promise.resolve().then(()=>require("./verilog-B1iBoR5_-BiglCqvO.cjs"))},{id:"vhdl",name:"VHDL",import:()=>Promise.resolve().then(()=>require("./vhdl-CRVaAhXk-CJUzuS2t.cjs"))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>Promise.resolve().then(()=>require("./viml-B-zWOd7Z-B1nKLcgt.cjs"))},{id:"vue",name:"Vue",import:()=>Promise.resolve().then(()=>require("./vue-Bl1uVNsA-B4RiOuMx.cjs"))},{id:"vue-html",name:"Vue HTML",import:()=>Promise.resolve().then(()=>require("./vue-html-DHr5wjBG-BMqayJuq.cjs"))},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>Promise.resolve().then(()=>require("./vyper-DWutKXpa-CO9xUkIY.cjs"))},{id:"wasm",name:"WebAssembly",import:()=>Promise.resolve().then(()=>require("./wasm-Bv5f0gKv-CdIThIat.cjs"))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>Promise.resolve().then(()=>require("./wenyan-BMYnfus1-BSJ3fk7e.cjs"))},{id:"wgsl",name:"WGSL",import:()=>Promise.resolve().then(()=>require("./wgsl-DnPoPGDU-d3zZE7ZN.cjs"))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>Promise.resolve().then(()=>require("./wikitext-CntM04PE-BRCqXN2g.cjs"))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>Promise.resolve().then(()=>require("./wolfram-Ws5qPlX9-C3rR92zj.cjs"))},{id:"xml",name:"XML",import:()=>Promise.resolve().then(()=>require("./xml-ChBsf5uy-CyV-nzFi.cjs"))},{id:"xsl",name:"XSL",import:()=>Promise.resolve().then(()=>require("./xsl-BefjlXrd-Bgz0N8I4.cjs"))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>Promise.resolve().then(()=>require("./yaml-Bbg74JKr-7DV6pRKj.cjs"))},{id:"zenscript",name:"ZenScript",import:()=>Promise.resolve().then(()=>require("./zenscript-C0RKE4nU-BWMxwjeH.cjs"))},{id:"zig",name:"Zig",import:()=>Promise.resolve().then(()=>require("./zig-D6SXBGNm-yAcNfpgW.cjs"))}],KS=Object.fromEntries(x0.map(e=>[e.id,e.import])),QS=Object.fromEntries(x0.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),XS={...KS,...QS},JS=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>Promise.resolve().then(()=>require("./andromeeda-uXNdzNpk-BXc5FOIb.cjs"))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>Promise.resolve().then(()=>require("./aurora-x-BwoVEUWZ-C5IpmIOG.cjs"))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./ayu-dark-CxPZkpb2-Cv7nTiif.cjs"))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>Promise.resolve().then(()=>require("./catppuccin-frappe-BrTOiad2-DXAedND3.cjs"))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>Promise.resolve().then(()=>require("./catppuccin-latte-D-dc_R4m-mwGw3-Ej.cjs"))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>Promise.resolve().then(()=>require("./catppuccin-macchiato-DN4jOp0G-cQCk9ADg.cjs"))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>Promise.resolve().then(()=>require("./catppuccin-mocha-B8yCE3-3-ClSzDZSl.cjs"))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>Promise.resolve().then(()=>require("./dark-plus-pUHDTVV0-Cd5emcYO.cjs"))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>Promise.resolve().then(()=>require("./dracula-BtZx2Kac-BNgwAJ-d.cjs"))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>Promise.resolve().then(()=>require("./dracula-soft-BKa-aqBv-BHZ7sHFu.cjs"))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./everforest-dark-DMCBqXCK-_sBMomR1.cjs"))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>Promise.resolve().then(()=>require("./everforest-light-BbXl82Em-H0xoYxl0.cjs"))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-DenFmJkN-BKL9xNgN.cjs"))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-default-BJPUVz4H-Dsv5MuSi.cjs"))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-dimmed-DUshB20C-CtB9hz8U.cjs"))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-high-contrast-D3aGCnF8-BqZVM-jF.cjs"))},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>Promise.resolve().then(()=>require("./github-light-JYsPkUQd-BFTOhCbz.cjs"))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>Promise.resolve().then(()=>require("./github-light-default-D99KPAby-BZoWH9dH.cjs"))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>Promise.resolve().then(()=>require("./github-light-high-contrast-BbmZE-Mp-Ks3kPGJU.cjs"))},{id:"houston",displayName:"Houston",type:"dark",import:()=>Promise.resolve().then(()=>require("./houston-BDYrDoDW-T57H3gQZ.cjs"))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>Promise.resolve().then(()=>require("./kanagawa-dragon-CiKur4Hl-BJZF7xDr.cjs"))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>Promise.resolve().then(()=>require("./kanagawa-lotus-BKu-smKu-BhgzmRV4.cjs"))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>Promise.resolve().then(()=>require("./kanagawa-wave-CQwozSzG-BgJip59C.cjs"))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>Promise.resolve().then(()=>require("./laserwave-6a00oqik-CIb51Re4.cjs"))},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>Promise.resolve().then(()=>require("./light-plus-CZuVqSLX-B5D0le0o.cjs"))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-D6KBX41T-Dj0-OyRN.cjs"))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-darker-CkRroheE-Dvfs29ir.cjs"))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>Promise.resolve().then(()=>require("./material-theme-lighter-BUBw43Yz-EU3ZGl_r.cjs"))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-ocean-ClGX14Ja-px_3Pwqa.cjs"))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-palenight-C1RVm8K1-38jxvsGX.cjs"))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./min-dark-C7ak0t6c-tt5o_I5e.cjs"))},{id:"min-light",displayName:"Min Light",type:"light",import:()=>Promise.resolve().then(()=>require("./min-light-CKFxVcPp-tmTHl_CQ.cjs"))},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>Promise.resolve().then(()=>require("./monokai-C1KBYcO0-DMIxv6MM.cjs"))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>Promise.resolve().then(()=>require("./night-owl-Bm2rzalh-BN78kThQ.cjs"))},{id:"nord",displayName:"Nord",type:"dark",import:()=>Promise.resolve().then(()=>require("./nord-CC5OiUXg-Ca5AGUWc.cjs"))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>Promise.resolve().then(()=>require("./one-dark-pro-D7-kP8fv-JOzzHStv.cjs"))},{id:"one-light",displayName:"One Light",type:"light",import:()=>Promise.resolve().then(()=>require("./one-light-D9sNaUtq-020-h_lv.cjs"))},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>Promise.resolve().then(()=>require("./plastic-CSTz3KZp-r5piqq-S.cjs"))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>Promise.resolve().then(()=>require("./poimandres-C-VADXHD-BLP3NNjc.cjs"))},{id:"red",displayName:"Red",type:"dark",import:()=>Promise.resolve().then(()=>require("./red-7y8PH7HH-BQGOv1D5.cjs"))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>Promise.resolve().then(()=>require("./rose-pine-DhT-HZE9-DKEdv1Oe.cjs"))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>Promise.resolve().then(()=>require("./rose-pine-dawn-DiCjL2i4-Bvt6DtVH.cjs"))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>Promise.resolve().then(()=>require("./rose-pine-moon-BNmGHlcn-cHuJy0Ng.cjs"))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./slack-dark-i7wN4OET-akqwQ7ED.cjs"))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>Promise.resolve().then(()=>require("./slack-ochin-ndHf0LoP-BoQQWmTv.cjs"))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>Promise.resolve().then(()=>require("./snazzy-light-BlSJXAu4-D_IwRieF.cjs"))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./solarized-dark-UTmkh7lw-gmm-WbDC.cjs"))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>Promise.resolve().then(()=>require("./solarized-light-BheCkDPT-DzcxRSZP.cjs"))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>Promise.resolve().then(()=>require("./synthwave-84-NU3C_KFZ-BBRLOmNT.cjs"))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>Promise.resolve().then(()=>require("./tokyo-night-LhP3hHhi-9T7_vGSy.cjs"))},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>Promise.resolve().then(()=>require("./vesper-CJsaOsSM-DqLWLxOu.cjs"))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>Promise.resolve().then(()=>require("./vitesse-black-BoGvW84i-MF-1S1MG.cjs"))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./vitesse-dark-Cym-eLtO-SIffJYSe.cjs"))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>Promise.resolve().then(()=>require("./vitesse-light-CcmG315c-U63SkYGT.cjs"))}],ZS=Object.fromEntries(JS.map(e=>[e.id,e.import]));let wr=class extends Error{constructor(e){super(e),this.name="ShikiError"}},Gd=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function eA(){return 2147483648}function tA(){return typeof performance<"u"?performance.now():Date.now()}const nA=(e,t)=>e+(t-e%t)%t;async function rA(e){let t,n;const r={};function o(p){n=p,r.HEAPU8=new Uint8Array(p),r.HEAPU32=new Uint32Array(p)}function i(p,g,b){r.HEAPU8.copyWithin(p,g,g+b)}function a(p){try{return t.grow(p-n.byteLength+65535>>>16),o(t.buffer),1}catch{}}function s(p){const g=r.HEAPU8.length;p=p>>>0;const b=eA();if(p>b)return!1;for(let T=1;T<=4;T*=2){let E=g*(1+.2/T);E=Math.min(E,p+100663296);const C=Math.min(b,nA(Math.max(p,E),65536));if(a(C))return!0}return!1}const l=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function c(p,g,b=1024){const T=g+b;let E=g;for(;p[E]&&!(E>=T);)++E;if(E-g>16&&p.buffer&&l)return l.decode(p.subarray(g,E));let C="";for(;g<E;){let x=p[g++];if(!(x&128)){C+=String.fromCharCode(x);continue}const k=p[g++]&63;if((x&224)===192){C+=String.fromCharCode((x&31)<<6|k);continue}const w=p[g++]&63;if((x&240)===224?x=(x&15)<<12|k<<6|w:x=(x&7)<<18|k<<12|w<<6|p[g++]&63,x<65536)C+=String.fromCharCode(x);else{const S=x-65536;C+=String.fromCharCode(55296|S>>10,56320|S&1023)}}return C}function d(p,g){return p?c(r.HEAPU8,p,g):""}const u={emscripten_get_now:tA,emscripten_memcpy_big:i,emscripten_resize_heap:s,fd_write:()=>0};async function h(){const p=await e({env:u,wasi_snapshot_preview1:u});t=p.memory,o(t.buffer),Object.assign(r,p),r.UTF8ToString=d}return await h(),r}var oA=Object.defineProperty,iA=(e,t,n)=>t in e?oA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zt=(e,t,n)=>(iA(e,typeof t!="symbol"?t+"":t,n),n);let Vt=null;function aA(e){throw new Gd(e.UTF8ToString(e.getLastOnigError()))}class $l{constructor(t){zt(this,"utf16Length"),zt(this,"utf8Length"),zt(this,"utf16Value"),zt(this,"utf8Value"),zt(this,"utf16OffsetToUtf8"),zt(this,"utf8OffsetToUtf16");const n=t.length,r=$l._utf8ByteLength(t),o=r!==n,i=o?new Uint32Array(n+1):null;o&&(i[n]=r);const a=o?new Uint32Array(r+1):null;o&&(a[r]=n);const s=new Uint8Array(r);let l=0;for(let c=0;c<n;c++){const d=t.charCodeAt(c);let u=d,h=!1;if(d>=55296&&d<=56319&&c+1<n){const p=t.charCodeAt(c+1);p>=56320&&p<=57343&&(u=(d-55296<<10)+65536|p-56320,h=!0)}o&&(i[c]=l,h&&(i[c+1]=l),u<=127?a[l+0]=c:u<=2047?(a[l+0]=c,a[l+1]=c):u<=65535?(a[l+0]=c,a[l+1]=c,a[l+2]=c):(a[l+0]=c,a[l+1]=c,a[l+2]=c,a[l+3]=c)),u<=127?s[l++]=u:u<=2047?(s[l++]=192|(u&1984)>>>6,s[l++]=128|(u&63)>>>0):u<=65535?(s[l++]=224|(u&61440)>>>12,s[l++]=128|(u&4032)>>>6,s[l++]=128|(u&63)>>>0):(s[l++]=240|(u&1835008)>>>18,s[l++]=128|(u&258048)>>>12,s[l++]=128|(u&4032)>>>6,s[l++]=128|(u&63)>>>0),h&&c++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=i,this.utf8OffsetToUtf16=a}static _utf8ByteLength(t){let n=0;for(let r=0,o=t.length;r<o;r++){const i=t.charCodeAt(r);let a=i,s=!1;if(i>=55296&&i<=56319&&r+1<o){const l=t.charCodeAt(r+1);l>=56320&&l<=57343&&(a=(i-55296<<10)+65536|l-56320,s=!0)}a<=127?n+=1:a<=2047?n+=2:a<=65535?n+=3:n+=4,s&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const ir=class{constructor(e){if(zt(this,"id",++ir.LAST_ID),zt(this,"_onigBinding"),zt(this,"content"),zt(this,"utf16Length"),zt(this,"utf8Length"),zt(this,"utf16OffsetToUtf8"),zt(this,"utf8OffsetToUtf16"),zt(this,"ptr"),!Vt)throw new Gd("Must invoke loadWasm first.");this._onigBinding=Vt,this.content=e;const t=new $l(e);this.utf16Length=t.utf16Length,this.utf8Length=t.utf8Length,this.utf16OffsetToUtf8=t.utf16OffsetToUtf8,this.utf8OffsetToUtf16=t.utf8OffsetToUtf16,this.utf8Length<1e4&&!ir._sharedPtrInUse?(ir._sharedPtr||(ir._sharedPtr=Vt.omalloc(1e4)),ir._sharedPtrInUse=!0,Vt.HEAPU8.set(t.utf8Value,ir._sharedPtr),this.ptr=ir._sharedPtr):this.ptr=t.createString(Vt)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===ir._sharedPtr?ir._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};let Va=ir;zt(Va,"LAST_ID",0);zt(Va,"_sharedPtr",0);zt(Va,"_sharedPtrInUse",!1);class sA{constructor(t){if(zt(this,"_onigBinding"),zt(this,"_ptr"),!Vt)throw new Gd("Must invoke loadWasm first.");const n=[],r=[];for(let s=0,l=t.length;s<l;s++){const c=new $l(t[s]);n[s]=c.createString(Vt),r[s]=c.utf8Length}const o=Vt.omalloc(4*t.length);Vt.HEAPU32.set(n,o/4);const i=Vt.omalloc(4*t.length);Vt.HEAPU32.set(r,i/4);const a=Vt.createOnigScanner(o,i,t.length);for(let s=0,l=t.length;s<l;s++)Vt.ofree(n[s]);Vt.ofree(i),Vt.ofree(o),a===0&&aA(Vt),this._onigBinding=Vt,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let o=0;if(typeof r=="number"&&(o=r),typeof t=="string"){t=new Va(t);const i=this._findNextMatchSync(t,n,!1,o);return t.dispose(),i}return this._findNextMatchSync(t,n,!1,o)}_findNextMatchSync(t,n,r,o){const i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),o);if(a===0)return null;const s=i.HEAPU32;let l=a/4;const c=s[l++],d=s[l++],u=[];for(let h=0;h<d;h++){const p=t.convertUtf8OffsetToUtf16(s[l++]),g=t.convertUtf8OffsetToUtf16(s[l++]);u[h]={start:p,end:g,length:g-p}}return{index:c,captureIndices:u}}}function lA(e){return typeof e.instantiator=="function"}function cA(e){return typeof e.default=="function"}function uA(e){return typeof e.data<"u"}function dA(e){return typeof Response<"u"&&e instanceof Response}function hA(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let ps;function pA(e){if(ps)return ps;async function t(){Vt=await rA(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),lA(r)?r=await r.instantiator(n):cA(r)?r=await r.default(n):(uA(r)&&(r=r.data),dA(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await fA(r)(n):r=await mA(r)(n):hA(r)?r=await wc(r)(n):r instanceof WebAssembly.Module?r=await wc(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await wc(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return ps=t(),ps}function wc(e){return t=>WebAssembly.instantiate(e,t)}function fA(e){return t=>WebAssembly.instantiateStreaming(e,t)}function mA(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let gA;function yA(){return gA}async function C0(e){return e&&await pA(e),{createScanner(t){return new sA(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new Va(t)}}}function bA(e){return qd(e)}function qd(e){return Array.isArray(e)?EA(e):e instanceof RegExp?e:typeof e=="object"?TA(e):e}function EA(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=qd(e[n]);return t}function TA(e){let t={};for(let n in e)t[n]=qd(e[n]);return t}function v0(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function S0(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?S0(e.substring(0,e.length-1)):e.substr(~t+1)}var Nc=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,fs=class{static hasCaptures(e){return e===null?!1:(Nc.lastIndex=0,Nc.test(e))}static replaceCaptures(e,t,n){return e.replace(Nc,(r,o,i,a)=>{let s=n[parseInt(o||i,10)];if(s){let l=t.substring(s.start,s.end);for(;l[0]===".";)l=l.substring(1);switch(a){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return r})}};function A0(e,t){return e<t?-1:e>t?1:0}function k0(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let o=0;o<n;o++){let i=A0(e[o],t[o]);if(i!==0)return i}return 0}return n-r}function Yp(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function _0(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var D0=class{constructor(e){G(this,"cache",new Map);this.fn=e}get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},tl=class{constructor(e,t,n){G(this,"_cachedMatchRoot",new D0(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(vA(e),t)}static createFromParsedTheme(e,t){return AA(e,t)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,n=this._cachedMatchRoot.get(t).find(r=>xA(e.parent,r.parentScopes));return n?new I0(n.fontStyle,n.foreground,n.background):null}},Pc=class Ls{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new Ls(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new Ls(n,t[r]);return n}push(t){return new Ls(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function xA(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],o=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],o=!0}for(;e&&!CA(e.scopeName,r);){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function CA(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var I0=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function vA(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let o=0,i=t.length;o<i;o++){let a=t[o];if(!a.settings)continue;let s;if(typeof a.scope=="string"){let u=a.scope;u=u.replace(/^[,]+/,""),u=u.replace(/[,]+$/,""),s=u.split(",")}else Array.isArray(a.scope)?s=a.scope:s=[""];let l=-1;if(typeof a.settings.fontStyle=="string"){l=0;let u=a.settings.fontStyle.split(" ");for(let h=0,p=u.length;h<p;h++)switch(u[h]){case"italic":l=l|1;break;case"bold":l=l|2;break;case"underline":l=l|4;break;case"strikethrough":l=l|8;break}}let c=null;typeof a.settings.foreground=="string"&&Yp(a.settings.foreground)&&(c=a.settings.foreground);let d=null;typeof a.settings.background=="string"&&Yp(a.settings.background)&&(d=a.settings.background);for(let u=0,h=s.length;u<h;u++){let p=s[u].trim().split(" "),g=p[p.length-1],b=null;p.length>1&&(b=p.slice(0,p.length-1),b.reverse()),n[r++]=new SA(g,b,o,l,c,d)}}return n}var SA=class{constructor(e,t,n,r,o,i){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=o,this.background=i}},_r=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(_r||{});function AA(e,t){e.sort((l,c)=>{let d=A0(l.scope,c.scope);return d!==0||(d=k0(l.parentScopes,c.parentScopes),d!==0)?d:l.index-c.index});let n=0,r="#000000",o="#ffffff";for(;e.length>=1&&e[0].scope==="";){let l=e.shift();l.fontStyle!==-1&&(n=l.fontStyle),l.foreground!==null&&(r=l.foreground),l.background!==null&&(o=l.background)}let i=new kA(t),a=new I0(n,i.getId(r),i.getId(o)),s=new DA(new _u(0,null,-1,0,0),[]);for(let l=0,c=e.length;l<c;l++){let d=e[l];s.insert(0,d.scope,d.parentScopes,d.fontStyle,i.getId(d.foreground),i.getId(d.background))}return new tl(i,a,s)}var kA=class{constructor(e){G(this,"_isFrozen");G(this,"_lastColorId");G(this,"_id2color");G(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},_A=Object.freeze([]),_u=class w0{constructor(t,n,r,o,i){G(this,"scopeDepth");G(this,"parentScopes");G(this,"fontStyle");G(this,"foreground");G(this,"background");this.scopeDepth=t,this.parentScopes=n||_A,this.fontStyle=r,this.foreground=o,this.background=i}clone(){return new w0(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,o=t.length;r<o;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,o){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),o!==0&&(this.background=o)}},DA=class Du{constructor(t,n=[],r={}){G(this,"_rulesWithParentScopes");this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,o=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[o]===">"&&o++,!(r>=t.parentScopes.length||o>=n.parentScopes.length);){const i=n.parentScopes[o].length-t.parentScopes[r].length;if(i!==0)return i;r++,o++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),o,i;if(r===-1?(o=t,i=""):(o=t.substring(0,r),i=t.substring(r+1)),this._children.hasOwnProperty(o))return this._children[o].match(i)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Du._cmpBySpecificity),n}insert(t,n,r,o,i,a){if(n===""){this._doInsertHere(t,r,o,i,a);return}let s=n.indexOf("."),l,c;s===-1?(l=n,c=""):(l=n.substring(0,s),c=n.substring(s+1));let d;this._children.hasOwnProperty(l)?d=this._children[l]:(d=new Du(this._mainRule.clone(),_u.cloneArr(this._rulesWithParentScopes)),this._children[l]=d),d.insert(t+1,c,r,o,i,a)}_doInsertHere(t,n,r,o,i){if(n===null){this._mainRule.acceptOverwrite(t,r,o,i);return}for(let a=0,s=this._rulesWithParentScopes.length;a<s;a++){let l=this._rulesWithParentScopes[a];if(k0(l.parentScopes,n)===0){l.acceptOverwrite(t,r,o,i);return}}r===-1&&(r=this._mainRule.fontStyle),o===0&&(o=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new _u(t,n,r,o,i))}},fi=class Rn{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=Rn.getLanguageId(t),r=Rn.getTokenType(t),o=Rn.getFontStyle(t),i=Rn.getForeground(t),a=Rn.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:o,foreground:i,background:a})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,o,i,a,s){let l=Rn.getLanguageId(t),c=Rn.getTokenType(t),d=Rn.containsBalancedBrackets(t)?1:0,u=Rn.getFontStyle(t),h=Rn.getForeground(t),p=Rn.getBackground(t);return n!==0&&(l=n),r!==8&&(c=r),o!==null&&(d=o?1:0),i!==-1&&(u=i),a!==0&&(h=a),s!==0&&(p=s),(l<<0|c<<8|d<<10|u<<11|h<<15|p<<24)>>>0}};function nl(e,t){const n=[],r=IA(e);let o=r.next();for(;o!==null;){let l=0;if(o.length===2&&o.charAt(1)===":"){switch(o.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=r.next()}let c=a();if(n.push({matcher:c,priority:l}),o!==",")break;o=r.next()}return n;function i(){if(o==="-"){o=r.next();const l=i();return c=>!!l&&!l(c)}if(o==="("){o=r.next();const l=s();return o===")"&&(o=r.next()),l}if(Kp(o)){const l=[];do l.push(o),o=r.next();while(Kp(o));return c=>t(l,c)}return null}function a(){const l=[];let c=i();for(;c;)l.push(c),c=i();return d=>l.every(u=>u(d))}function s(){const l=[];let c=a();for(;c&&(l.push(c),o==="|"||o===",");){do o=r.next();while(o==="|"||o===",");c=a()}return d=>l.some(u=>u(d))}}function Kp(e){return!!e&&!!e.match(/[\w\.:]+/)}function IA(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function N0(e){typeof e.dispose=="function"&&e.dispose()}var Da=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},wA=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},NA=class{constructor(){G(this,"_references",[]);G(this,"_seenReferenceKeys",new Set);G(this,"visitedRule",new Set)}get references(){return this._references}add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},PA=class{constructor(e,t){G(this,"seenFullScopeRequests",new Set);G(this,"seenPartialScopeRequests",new Set);G(this,"Q");this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Da(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new NA;for(const n of e)RA(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Da){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function RA(e,t,n,r){const o=n.lookup(e.scopeName);if(!o){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const i=n.lookup(t);e instanceof Da?Os({baseGrammar:i,selfGrammar:o},r):Iu(e.ruleName,{baseGrammar:i,selfGrammar:o,repository:o.repository},r);const a=n.injections(e.scopeName);if(a)for(const s of a)r.add(new Da(s))}function Iu(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];rl([r],t,n)}}function Os(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&rl(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&rl(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function rl(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const o=r.repository?v0({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&rl(r.patterns,{...t,repository:o},n);const i=r.include;if(!i)continue;const a=P0(i);switch(a.kind){case 0:Os({...t,selfGrammar:t.baseGrammar},n);break;case 1:Os(t,n);break;case 2:Iu(a.ruleName,{...t,repository:o},n);break;case 3:case 4:const s=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(s){const l={baseGrammar:t.baseGrammar,selfGrammar:s,repository:o};a.kind===4?Iu(a.ruleName,l,n):Os(l,n)}else a.kind===4?n.add(new wA(a.scopeName,a.ruleName)):n.add(new Da(a.scopeName));break}}}var LA=class{constructor(){G(this,"kind",0)}},OA=class{constructor(){G(this,"kind",1)}},MA=class{constructor(e){G(this,"kind",2);this.ruleName=e}},FA=class{constructor(e){G(this,"kind",3);this.scopeName=e}},BA=class{constructor(e,t){G(this,"kind",4);this.scopeName=e,this.ruleName=t}};function P0(e){if(e==="$base")return new LA;if(e==="$self")return new OA;const t=e.indexOf("#");if(t===-1)return new FA(e);if(t===0)return new MA(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new BA(n,r)}}var jA=/\\(\d+)/,Qp=/\\(\d+)/g,HA=-1,R0=-2,Ya=class{constructor(e,t,n,r){G(this,"$location");G(this,"id");G(this,"_nameIsCapturing");G(this,"_name");G(this,"_contentNameIsCapturing");G(this,"_contentName");this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=fs.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=fs.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${S0(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:fs.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:fs.replaceCaptures(this._contentName,e,t)}},UA=class extends Ya{constructor(t,n,r,o,i){super(t,n,r,o);G(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(t,n){throw new Error("Not supported!")}compile(t,n){throw new Error("Not supported!")}compileAG(t,n,r,o){throw new Error("Not supported!")}},zA=class extends Ya{constructor(t,n,r,o,i){super(t,n,r,null);G(this,"_match");G(this,"captures");G(this,"_cachedCompiledPatterns");this._match=new Ia(o,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,n){n.push(this._match)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,o){return this._getCachedCompiledPatterns(t).compileAG(t,r,o)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new wa,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Xp=class extends Ya{constructor(t,n,r,o,i){super(t,n,r,o);G(this,"hasMissingPatterns");G(this,"patterns");G(this,"_cachedCompiledPatterns");this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,n){for(const r of this.patterns)t.getRule(r).collectPatterns(t,n)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,o){return this._getCachedCompiledPatterns(t).compileAG(t,r,o)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new wa,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},wu=class extends Ya{constructor(t,n,r,o,i,a,s,l,c,d){super(t,n,r,o);G(this,"_begin");G(this,"beginCaptures");G(this,"_end");G(this,"endHasBackReferences");G(this,"endCaptures");G(this,"applyEndPatternLast");G(this,"hasMissingPatterns");G(this,"patterns");G(this,"_cachedCompiledPatterns");this._begin=new Ia(i,this.id),this.beginCaptures=a,this._end=new Ia(s||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=c||!1,this.patterns=d.patterns,this.hasMissingPatterns=d.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,n){return this._end.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t,n).compile(t)}compileAG(t,n,r,o){return this._getCachedCompiledPatterns(t,n).compileAG(t,r,o)}_getCachedCompiledPatterns(t,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new wa;for(const r of this.patterns)t.getRule(r).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}},ol=class extends Ya{constructor(t,n,r,o,i,a,s,l,c){super(t,n,r,o);G(this,"_begin");G(this,"beginCaptures");G(this,"whileCaptures");G(this,"_while");G(this,"whileHasBackReferences");G(this,"hasMissingPatterns");G(this,"patterns");G(this,"_cachedCompiledPatterns");G(this,"_cachedCompiledWhilePatterns");this._begin=new Ia(i,this.id),this.beginCaptures=a,this.whileCaptures=l,this._while=new Ia(s,R0),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,n){return this._while.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,o){return this._getCachedCompiledPatterns(t).compileAG(t,r,o)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new wa;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,n){return this._getCachedCompiledWhilePatterns(t,n).compile(t)}compileWhileAG(t,n,r,o){return this._getCachedCompiledWhilePatterns(t,n).compileAG(t,r,o)}_getCachedCompiledWhilePatterns(t,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new wa,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||""),this._cachedCompiledWhilePatterns}},L0=class nn{static createCaptureRule(t,n,r,o,i){return t.registerRule(a=>new UA(n,a,r,o,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(o=>{if(t.id=o,t.match)return new zA(t.$vscodeTextmateLocation,t.id,t.name,t.match,nn._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=v0({},r,t.repository));let i=t.patterns;return typeof i>"u"&&t.include&&(i=[{include:t.include}]),new Xp(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,nn._compilePatterns(i,n,r))}return t.while?new ol(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,nn._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,nn._compileCaptures(t.whileCaptures||t.captures,n,r),nn._compilePatterns(t.patterns,n,r)):new wu(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,nn._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,nn._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,nn._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let o=[];if(t){let i=0;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const s=parseInt(a,10);s>i&&(i=s)}for(let a=0;a<=i;a++)o[a]=null;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const s=parseInt(a,10);let l=0;t[a].patterns&&(l=nn.getCompiledRuleId(t[a],n,r)),o[s]=nn.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,l)}}return o}static _compilePatterns(t,n,r){let o=[];if(t)for(let i=0,a=t.length;i<a;i++){const s=t[i];let l=-1;if(s.include){const c=P0(s.include);switch(c.kind){case 0:case 1:l=nn.getCompiledRuleId(r[s.include],n,r);break;case 2:let d=r[c.ruleName];d&&(l=nn.getCompiledRuleId(d,n,r));break;case 3:case 4:const u=c.scopeName,h=c.kind===4?c.ruleName:null,p=n.getExternalGrammar(u,r);if(p)if(h){let g=p.repository[h];g&&(l=nn.getCompiledRuleId(g,n,p.repository))}else l=nn.getCompiledRuleId(p.repository.$self,n,p.repository);break}}else l=nn.getCompiledRuleId(s,n,r);if(l!==-1){const c=n.getRule(l);let d=!1;if((c instanceof Xp||c instanceof wu||c instanceof ol)&&c.hasMissingPatterns&&c.patterns.length===0&&(d=!0),d)continue;o.push(l)}}return{patterns:o,hasMissingPatterns:(t?t.length:0)!==o.length}}},Ia=class O0{constructor(t,n){G(this,"source");G(this,"ruleId");G(this,"hasAnchor");G(this,"hasBackReferences");G(this,"_anchorCache");if(t&&typeof t=="string"){const r=t.length;let o=0,i=[],a=!1;for(let s=0;s<r;s++)if(t.charAt(s)==="\\"&&s+1<r){const l=t.charAt(s+1);l==="z"?(i.push(t.substring(o,s)),i.push("$(?!\\n)(?<!\\n)"),o=s+2):(l==="A"||l==="G")&&(a=!0),s++}this.hasAnchor=a,o===0?this.source=t:(i.push(t.substring(o,r)),this.source=i.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=jA.test(this.source):this.hasBackReferences=!1}clone(){return new O0(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(o=>t.substring(o.start,o.end));return Qp.lastIndex=0,this.source.replace(Qp,(o,i)=>_0(r[parseInt(i,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],o=[],i,a,s,l;for(i=0,a=this.source.length;i<a;i++)s=this.source.charAt(i),t[i]=s,n[i]=s,r[i]=s,o[i]=s,s==="\\"&&i+1<a&&(l=this.source.charAt(i+1),l==="A"?(t[i+1]="",n[i+1]="",r[i+1]="A",o[i+1]="A"):l==="G"?(t[i+1]="",n[i+1]="G",r[i+1]="",o[i+1]="G"):(t[i+1]=l,n[i+1]=l,r[i+1]=l,o[i+1]=l),i++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:o.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},wa=class{constructor(){G(this,"_items");G(this,"_hasAnchors");G(this,"_cached");G(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new Jp(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(o=>o.resolveAnchors(t,n));return new Jp(e,r,this._items.map(o=>o.ruleId))}},Jp=class{constructor(e,t,n){G(this,"scanner");this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
|
|
38
|
+
`)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Rc=class{constructor(e,t){this.languageId=e,this.tokenType=t}},kr,$A=(kr=class{constructor(t,n){G(this,"_defaultAttributes");G(this,"_embeddedLanguagesMatcher");G(this,"_getBasicScopeAttributes",new D0(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new Rc(n,r)}));this._defaultAttributes=new Rc(t,8),this._embeddedLanguagesMatcher=new GA(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?kr._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(kr.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},G(kr,"_NULL_SCOPE_METADATA",new Rc(0,0)),G(kr,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),kr),GA=class{constructor(e){G(this,"values");G(this,"scopesRegExp");if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>_0(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<"u"&&process.env.VSCODE_TEXTMATE_DEBUG;var Zp=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function M0(e,t,n,r,o,i,a,s){const l=t.content.length;let c=!1,d=-1;if(a){const p=qA(e,t,n,r,o,i);o=p.stack,r=p.linePos,n=p.isFirstLine,d=p.anchorPosition}const u=Date.now();for(;!c;){if(s!==0&&Date.now()-u>s)return new Zp(o,!0);h()}return new Zp(o,!1);function h(){const p=WA(e,t,n,r,o,d);if(!p){i.produce(o,l),c=!0;return}const g=p.captureIndices,b=p.matchedRuleId,T=g&&g.length>0?g[0].end>r:!1;if(b===HA){const E=o.getRule(e);i.produce(o,g[0].start),o=o.withContentNameScopesList(o.nameScopesList),oa(e,t,n,o,i,E.endCaptures,g),i.produce(o,g[0].end);const C=o;if(o=o.parent,d=C.getAnchorPos(),!T&&C.getEnterPos()===r){o=C,i.produce(o,l),c=!0;return}}else{const E=e.getRule(b);i.produce(o,g[0].start);const C=o,x=E.getName(t.content,g),k=o.contentNameScopesList.pushAttributed(x,e);if(o=o.push(b,r,d,g[0].end===l,null,k,k),E instanceof wu){const w=E;oa(e,t,n,o,i,w.beginCaptures,g),i.produce(o,g[0].end),d=g[0].end;const S=w.getContentName(t.content,g),B=k.pushAttributed(S,e);if(o=o.withContentNameScopesList(B),w.endHasBackReferences&&(o=o.withEndRule(w.getEndWithResolvedBackReferences(t.content,g))),!T&&C.hasSameRuleAs(o)){o=o.pop(),i.produce(o,l),c=!0;return}}else if(E instanceof ol){const w=E;oa(e,t,n,o,i,w.beginCaptures,g),i.produce(o,g[0].end),d=g[0].end;const S=w.getContentName(t.content,g),B=k.pushAttributed(S,e);if(o=o.withContentNameScopesList(B),w.whileHasBackReferences&&(o=o.withEndRule(w.getWhileWithResolvedBackReferences(t.content,g))),!T&&C.hasSameRuleAs(o)){o=o.pop(),i.produce(o,l),c=!0;return}}else if(oa(e,t,n,o,i,E.captures,g),i.produce(o,g[0].end),o=o.pop(),!T){o=o.safePop(),i.produce(o,l),c=!0;return}}g[0].end>r&&(r=g[0].end,n=!1)}}function qA(e,t,n,r,o,i){let a=o.beginRuleCapturedEOL?0:-1;const s=[];for(let l=o;l;l=l.pop()){const c=l.getRule(e);c instanceof ol&&s.push({rule:c,stack:l})}for(let l=s.pop();l;l=s.pop()){const{ruleScanner:c,findOptions:d}=KA(l.rule,e,l.stack.endRule,n,r===a),u=c.findNextMatchSync(t,r,d);if(u){if(u.ruleId!==R0){o=l.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(i.produce(l.stack,u.captureIndices[0].start),oa(e,t,n,l.stack,i,l.rule.whileCaptures,u.captureIndices),i.produce(l.stack,u.captureIndices[0].end),a=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{o=l.stack.pop();break}}return{stack:o,linePos:r,anchorPosition:a,isFirstLine:n}}function WA(e,t,n,r,o,i){const a=VA(e,t,n,r,o,i),s=e.getInjections();if(s.length===0)return a;const l=YA(s,e,t,n,r,o,i);if(!l)return a;if(!a)return l;const c=a.captureIndices[0].start,d=l.captureIndices[0].start;return d<c||l.priorityMatch&&d===c?l:a}function VA(e,t,n,r,o,i){const a=o.getRule(e),{ruleScanner:s,findOptions:l}=F0(a,e,o.endRule,n,r===i),c=s.findNextMatchSync(t,r,l);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function YA(e,t,n,r,o,i,a){let s=Number.MAX_VALUE,l=null,c,d=0;const u=i.contentNameScopesList.getScopeNames();for(let h=0,p=e.length;h<p;h++){const g=e[h];if(!g.matcher(u))continue;const b=t.getRule(g.ruleId),{ruleScanner:T,findOptions:E}=F0(b,t,null,r,o===a),C=T.findNextMatchSync(n,o,E);if(!C)continue;const x=C.captureIndices[0].start;if(!(x>=s)&&(s=x,l=C.captureIndices,c=C.ruleId,d=g.priority,s===o))break}return l?{priorityMatch:d===-1,captureIndices:l,matchedRuleId:c}:null}function F0(e,t,n,r,o){return{ruleScanner:e.compileAG(t,n,r,o),findOptions:0}}function KA(e,t,n,r,o){return{ruleScanner:e.compileWhileAG(t,n,r,o),findOptions:0}}function oa(e,t,n,r,o,i,a){if(i.length===0)return;const s=t.content,l=Math.min(i.length,a.length),c=[],d=a[0].end;for(let u=0;u<l;u++){const h=i[u];if(h===null)continue;const p=a[u];if(p.length===0)continue;if(p.start>d)break;for(;c.length>0&&c[c.length-1].endPos<=p.start;)o.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?o.produceFromScopes(c[c.length-1].scopes,p.start):o.produce(r,p.start),h.retokenizeCapturedWithRuleId){const b=h.getName(s,a),T=r.contentNameScopesList.pushAttributed(b,e),E=h.getContentName(s,a),C=T.pushAttributed(E,e),x=r.push(h.retokenizeCapturedWithRuleId,p.start,-1,!1,null,T,C),k=e.createOnigString(s.substring(0,p.end));M0(e,k,n&&p.start===0,p.start,x,o,!1,0),N0(k);continue}const g=h.getName(s,a);if(g!==null){const b=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(g,e);c.push(new QA(b,p.end))}}for(;c.length>0;)o.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var QA=class{constructor(e,t){G(this,"scopes");G(this,"endPos");this.scopes=e,this.endPos=t}};function XA(e,t,n,r,o,i,a,s){return new ZA(e,t,n,r,o,i,a,s)}function ef(e,t,n,r,o){const i=nl(t,il),a=L0.getCompiledRuleId(n,r,o.repository);for(const s of i)e.push({debugSelector:t,matcher:s.matcher,ruleId:a,grammar:o,priority:s.priority})}function il(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let o=n;o<t.length;o++)if(JA(t[o],r))return n=o+1,!0;return!1})}function JA(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var ZA=class{constructor(e,t,n,r,o,i,a,s){G(this,"_rootId");G(this,"_lastRuleId");G(this,"_ruleId2desc");G(this,"_includedGrammars");G(this,"_grammarRepository");G(this,"_grammar");G(this,"_injections");G(this,"_basicScopeAttributesProvider");G(this,"_tokenTypeMatchers");if(this._rootScopeName=e,this.balancedBracketSelectors=i,this._onigLib=s,this._basicScopeAttributesProvider=new $A(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=a,this._grammar=tf(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const l of Object.keys(o)){const c=nl(l,il);for(const d of c)this._tokenTypeMatchers.push({matcher:d.matcher,type:o[l]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:o=>o===this._rootScopeName?this._grammar:this.getExternalGrammar(o),injections:o=>this._grammarRepository.injections(o)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const o=r.injections;if(o)for(let a in o)ef(t,a,o[a],this,r);const i=this._grammarRepository.injections(n);i&&i.forEach(a=>{const s=this.getExternalGrammar(a);if(s){const l=s.injectionSelector;l&&ef(t,l,s,this,s)}})}return t.sort((o,i)=>o.priority-i.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=tf(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=L0.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let o;if(!t||t===Nu.NULL){o=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),d=this.themeProvider.getDefaults(),u=fi.set(0,c.languageId,c.tokenType,null,d.fontStyle,d.foregroundId,d.backgroundId),h=this.getRule(this._rootId).getName(null,null);let p;h?p=ua.createRootAndLookUpScopeName(h,u,this):p=ua.createRoot("unknown",u),t=new Nu(null,this._rootId,-1,-1,!1,null,p,p)}else o=!1,t.reset();e=e+`
|
|
39
|
+
`;const i=this.createOnigString(e),a=i.content.length,s=new tk(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=M0(this,i,o,0,t,s,!0,r);return N0(i),{lineLength:a,lineTokens:s,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function tf(e,t){return e=bA(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var ua=class ar{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,o=t?.scopePath??null;for(const i of n)o=Pc.push(o,i.scopeNames),r=new ar(r,o,i.encodedTokenAttributes);return r}static createRoot(t,n){return new ar(null,new Pc(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const o=r.getMetadataForScope(t),i=new Pc(null,t),a=r.themeProvider.themeMatch(i),s=ar.mergeAttributes(n,o,a);return new ar(null,i,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return ar.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let o=-1,i=0,a=0;return r!==null&&(o=r.fontStyle,i=r.foregroundId,a=r.backgroundId),fi.set(t,n.languageId,n.tokenType,null,o,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return ar._pushAttributed(this,t,n);const r=t.split(/ /g);let o=this;for(const i of r)o=ar._pushAttributed(o,i,n);return o}static _pushAttributed(t,n,r){const o=r.getMetadataForScope(n),i=t.scopePath.push(n),a=r.themeProvider.themeMatch(i),s=ar.mergeAttributes(t.tokenAttributes,o,a);return new ar(t,i,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===t?n.reverse():void 0}},zn,Nu=(zn=class{constructor(t,n,r,o,i,a,s,l){G(this,"_stackElementBrand");G(this,"_enterPos");G(this,"_anchorPos");G(this,"depth");this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=s,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=o}equals(t){return t===null?!1:zn._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?ua.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){zn._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,o,i,a,s){return new zn(this,t,n,r,o,i,a,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new zn(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){const r=ua.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new zn(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,ua.fromExtension(r,n.contentNameScopesList))}},G(zn,"NULL",new zn(null,0,0,0,!1,null,null,null)),zn),ek=class{constructor(e,t){G(this,"balancedBracketScopes");G(this,"unbalancedBracketScopes");G(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):nl(n,il).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>nl(n,il).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},tk=class{constructor(e,t,n,r){G(this,"_emitBinaryTokens");G(this,"_lineText");G(this,"_tokens");G(this,"_binaryTokens");G(this,"_lastTokenEndIndex");G(this,"_tokenTypeOverrides");this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let r=e?.tokenAttributes??0,o=!1;if(this.balancedBracketSelectors?.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const i=e?.getScopeNames()??[];for(const a of this._tokenTypeOverrides)a.matcher(i)&&(r=fi.set(r,0,a.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(i))}if(o&&(r=fi.set(r,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}const n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,o=this._binaryTokens.length;r<o;r++)n[r]=this._binaryTokens[r];return n}},nk=class{constructor(e,t){G(this,"_grammars",new Map);G(this,"_rawGrammars",new Map);G(this,"_injectionGrammars",new Map);G(this,"_theme");this._onigLib=t,this._theme=e}dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,o){if(!this._grammars.has(e)){let i=this._rawGrammars.get(e);if(!i)return null;this._grammars.set(e,XA(e,i,t,n,r,o,this,this._onigLib))}return this._grammars.get(e)}},rk=class{constructor(e){G(this,"_options");G(this,"_syncRegistry");G(this,"_ensureGrammarCache");this._options=e,this._syncRegistry=new nk(tl.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(tl.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new ek(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,o){const i=new PA(this._syncRegistry,e);for(;i.Q.length>0;)i.Q.map(a=>this._loadSingleGrammar(a.scopeName)),i.processQueue();return this._grammarForScopeName(e,t,n,r,o)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const t=this._options.loadGrammar(e);if(t){const n=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,o=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,o)}},Pu=Nu.NULL;const B0=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];let Ka=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Ka.prototype.normal={};Ka.prototype.property={};Ka.prototype.space=void 0;function j0(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Ka(n,r,t)}function Na(e){return e.toLowerCase()}let gn=class{constructor(e,t){this.attribute=t,this.property=e}};gn.prototype.attribute="";gn.prototype.booleanish=!1;gn.prototype.boolean=!1;gn.prototype.commaOrSpaceSeparated=!1;gn.prototype.commaSeparated=!1;gn.prototype.defined=!1;gn.prototype.mustUseProperty=!1;gn.prototype.number=!1;gn.prototype.overloadedBoolean=!1;gn.prototype.property="";gn.prototype.spaceSeparated=!1;gn.prototype.space=void 0;let ok=0;const Re=Po(),Pt=Po(),H0=Po(),se=Po(),st=Po(),si=Po(),En=Po();function Po(){return 2**++ok}const Ru=Object.freeze(Object.defineProperty({__proto__:null,boolean:Re,booleanish:Pt,commaOrSpaceSeparated:En,commaSeparated:si,number:se,overloadedBoolean:H0,spaceSeparated:st},Symbol.toStringTag,{value:"Module"})),Lc=Object.keys(Ru);let Wd=class extends gn{constructor(e,t,n,r){let o=-1;if(super(e,t),nf(this,"space",r),typeof n=="number")for(;++o<Lc.length;){const i=Lc[o];nf(this,Lc[o],(n&Ru[i])===Ru[i])}}};Wd.prototype.defined=!0;function nf(e,t,n){n&&(e[t]=n)}function Ci(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const i=new Wd(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Na(r)]=r,n[Na(i.attribute)]=r}return new Ka(t,n,e.space)}const U0=Ci({properties:{ariaActiveDescendant:null,ariaAtomic:Pt,ariaAutoComplete:null,ariaBusy:Pt,ariaChecked:Pt,ariaColCount:se,ariaColIndex:se,ariaColSpan:se,ariaControls:st,ariaCurrent:null,ariaDescribedBy:st,ariaDetails:null,ariaDisabled:Pt,ariaDropEffect:st,ariaErrorMessage:null,ariaExpanded:Pt,ariaFlowTo:st,ariaGrabbed:Pt,ariaHasPopup:null,ariaHidden:Pt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:st,ariaLevel:se,ariaLive:null,ariaModal:Pt,ariaMultiLine:Pt,ariaMultiSelectable:Pt,ariaOrientation:null,ariaOwns:st,ariaPlaceholder:null,ariaPosInSet:se,ariaPressed:Pt,ariaReadOnly:Pt,ariaRelevant:null,ariaRequired:Pt,ariaRoleDescription:st,ariaRowCount:se,ariaRowIndex:se,ariaRowSpan:se,ariaSelected:Pt,ariaSetSize:se,ariaSort:null,ariaValueMax:se,ariaValueMin:se,ariaValueNow:se,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function z0(e,t){return t in e?e[t]:t}function $0(e,t){return z0(e,t.toLowerCase())}const ik=Ci({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:si,acceptCharset:st,accessKey:st,action:null,allow:null,allowFullScreen:Re,allowPaymentRequest:Re,allowUserMedia:Re,alt:null,as:null,async:Re,autoCapitalize:null,autoComplete:st,autoFocus:Re,autoPlay:Re,blocking:st,capture:null,charSet:null,checked:Re,cite:null,className:st,cols:se,colSpan:null,content:null,contentEditable:Pt,controls:Re,controlsList:st,coords:se|si,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Re,defer:Re,dir:null,dirName:null,disabled:Re,download:H0,draggable:Pt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Re,formTarget:null,headers:st,height:se,hidden:Re,high:se,href:null,hrefLang:null,htmlFor:st,httpEquiv:st,id:null,imageSizes:null,imageSrcSet:null,inert:Re,inputMode:null,integrity:null,is:null,isMap:Re,itemId:null,itemProp:st,itemRef:st,itemScope:Re,itemType:st,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Re,low:se,manifest:null,max:null,maxLength:se,media:null,method:null,min:null,minLength:se,multiple:Re,muted:Re,name:null,nonce:null,noModule:Re,noValidate:Re,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Re,optimum:se,pattern:null,ping:st,placeholder:null,playsInline:Re,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Re,referrerPolicy:null,rel:st,required:Re,reversed:Re,rows:se,rowSpan:se,sandbox:st,scope:null,scoped:Re,seamless:Re,selected:Re,shadowRootClonable:Re,shadowRootDelegatesFocus:Re,shadowRootMode:null,shape:null,size:se,sizes:null,slot:null,span:se,spellCheck:Pt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:se,step:null,style:null,tabIndex:se,target:null,title:null,translate:null,type:null,typeMustMatch:Re,useMap:null,value:Pt,width:se,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:st,axis:null,background:null,bgColor:null,border:se,borderColor:null,bottomMargin:se,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Re,declare:Re,event:null,face:null,frame:null,frameBorder:null,hSpace:se,leftMargin:se,link:null,longDesc:null,lowSrc:null,marginHeight:se,marginWidth:se,noResize:Re,noHref:Re,noShade:Re,noWrap:Re,object:null,profile:null,prompt:null,rev:null,rightMargin:se,rules:null,scheme:null,scrolling:Pt,standby:null,summary:null,text:null,topMargin:se,valueType:null,version:null,vAlign:null,vLink:null,vSpace:se,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Re,disableRemotePlayback:Re,prefix:null,property:null,results:se,security:null,unselectable:null},space:"html",transform:$0}),ak=Ci({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:En,accentHeight:se,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:se,amplitude:se,arabicForm:null,ascent:se,attributeName:null,attributeType:null,azimuth:se,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:se,by:null,calcMode:null,capHeight:se,className:st,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:se,diffuseConstant:se,direction:null,display:null,dur:null,divisor:se,dominantBaseline:null,download:Re,dx:null,dy:null,edgeMode:null,editable:null,elevation:se,enableBackground:null,end:null,event:null,exponent:se,externalResourcesRequired:null,fill:null,fillOpacity:se,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:si,g2:si,glyphName:si,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:se,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:se,horizOriginX:se,horizOriginY:se,id:null,ideographic:se,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:se,k:se,k1:se,k2:se,k3:se,k4:se,kernelMatrix:En,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:se,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:se,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:se,overlineThickness:se,paintOrder:null,panose1:null,path:null,pathLength:se,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:st,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:se,pointsAtY:se,pointsAtZ:se,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:En,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:En,rev:En,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:En,requiredFeatures:En,requiredFonts:En,requiredFormats:En,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:se,specularExponent:se,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:se,strikethroughThickness:se,string:null,stroke:null,strokeDashArray:En,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:se,strokeOpacity:se,strokeWidth:null,style:null,surfaceScale:se,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:En,tabIndex:se,tableValues:null,target:null,targetX:se,targetY:se,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:En,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:se,underlineThickness:se,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:se,values:null,vAlphabetic:se,vMathematical:se,vectorEffect:null,vHanging:se,vIdeographic:se,version:null,vertAdvY:se,vertOriginX:se,vertOriginY:se,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:se,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:z0}),G0=Ci({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),q0=Ci({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:$0}),W0=Ci({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),sk={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"},lk=/[A-Z]/g,rf=/-[a-z]/g,ck=/^data[-\w.:]+$/i;function Qa(e,t){const n=Na(t);let r=t,o=gn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&ck.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(rf,dk);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!rf.test(i)){let a=i.replace(lk,uk);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=Wd}return new o(r,t)}function uk(e){return"-"+e.toLowerCase()}function dk(e){return e.charAt(1).toUpperCase()}const vi=j0([U0,ik,G0,q0,W0],"html"),Rr=j0([U0,ak,G0,q0,W0],"svg"),of={}.hasOwnProperty;function Gl(e,t){const n=t||{};function r(o,...i){let a=r.invalid;const s=r.handlers;if(o&&of.call(o,e)){const l=String(o[e]);a=of.call(s,l)?s[l]:r.unknown}if(a)return a.call(this,o,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const hk=/["&'<>`]/g,pk=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,fk=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,mk=/[|\\{}()[\]^$+*?.]/g,af=new WeakMap;function gk(e,t){if(e=e.replace(t.subset?yk(t.subset):hk,r),t.subset||t.escapeOnly)return e;return e.replace(pk,n).replace(fk,r);function n(o,i,a){return t.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,a.charCodeAt(i+2),t)}function r(o,i,a){return t.format(o.charCodeAt(0),a.charCodeAt(i+1),t)}}function yk(e){let t=af.get(e);return t||(t=bk(e),af.set(e,t)),t}function bk(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(mk,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const Ek=/[\dA-Fa-f]/;function Tk(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!Ek.test(String.fromCharCode(t))?r:r+";"}const xk=/\d/;function Ck(e,t,n){const r="&#"+String(e);return n&&t&&!xk.test(String.fromCharCode(t))?r:r+";"}const vk=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Oc={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Sk=["cent","copy","divide","gt","lt","not","para","times"],V0={}.hasOwnProperty,Lu={};let ms;for(ms in Oc)V0.call(Oc,ms)&&(Lu[Oc[ms]]=ms);const Ak=/[^\dA-Za-z]/;function kk(e,t,n,r){const o=String.fromCharCode(e);if(V0.call(Lu,o)){const i=Lu[o],a="&"+i;return n&&vk.includes(i)&&!Sk.includes(i)&&(!r||t&&t!==61&&Ak.test(String.fromCharCode(t)))?a:a+";"}return""}function _k(e,t,n){let r=Tk(e,t,n.omitOptionalSemicolons),o;if((n.useNamedReferences||n.useShortestReferences)&&(o=kk(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!o)&&n.useShortestReferences){const i=Ck(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return o&&(!n.useShortestReferences||o.length<r.length)?o:r}function li(e,t){return gk(e,Object.assign({format:_k},t))}const Dk=/^>|^->|<!--|-->|--!>|<!-$/g,Ik=[">"],wk=["<",">"];function Nk(e,t,n,r){return r.settings.bogusComments?"<?"+li(e.value,Object.assign({},r.settings.characterReferences,{subset:Ik}))+">":"<!--"+e.value.replace(Dk,o)+"-->";function o(i){return li(i,Object.assign({},r.settings.characterReferences,{subset:wk}))}}function Pk(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function al(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function Ou(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,i=!1;for(;!i;){r===-1&&(r=n.length,i=!0);const a=n.slice(o,r).trim();(a||!i)&&t.push(a),o=r+1,r=n.indexOf(",",o)}return t}function ql(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function Mu(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Wl(e){return e.join(" ").trim()}const Rk=/[ \t\n\f\r]/g;function Xa(e){return typeof e=="object"?e.type==="text"?sf(e.value):!1:sf(e)}function sf(e){return e.replace(Rk,"")===""}const Gt=K0(1),Y0=K0(-1),Lk=[];function K0(e){return t;function t(n,r,o){const i=n?n.children:Lk;let a=(r||0)+e,s=i[a];if(!o)for(;s&&Xa(s);)a+=e,s=i[a];return s}}const Ok={}.hasOwnProperty;function Q0(e){return t;function t(n,r,o){return Ok.call(e,n.tagName)&&e[n.tagName](n,r,o)}}const Vd=Q0({body:Fk,caption:Mc,colgroup:Mc,dd:Uk,dt:Hk,head:Mc,html:Mk,li:jk,optgroup:zk,option:$k,p:Bk,rp:lf,rt:lf,tbody:qk,td:cf,tfoot:Wk,th:cf,thead:Gk,tr:Vk});function Mc(e,t,n){const r=Gt(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&Xa(r.value.charAt(0)))}function Mk(e,t,n){const r=Gt(n,t);return!r||r.type!=="comment"}function Fk(e,t,n){const r=Gt(n,t);return!r||r.type!=="comment"}function Bk(e,t,n){const r=Gt(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function jk(e,t,n){const r=Gt(n,t);return!r||r.type==="element"&&r.tagName==="li"}function Hk(e,t,n){const r=Gt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function Uk(e,t,n){const r=Gt(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function lf(e,t,n){const r=Gt(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function zk(e,t,n){const r=Gt(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function $k(e,t,n){const r=Gt(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function Gk(e,t,n){const r=Gt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function qk(e,t,n){const r=Gt(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function Wk(e,t,n){return!Gt(n,t)}function Vk(e,t,n){const r=Gt(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function cf(e,t,n){const r=Gt(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const Yk=Q0({body:Xk,colgroup:Jk,head:Qk,html:Kk,tbody:Zk});function Kk(e){const t=Gt(e,-1);return!t||t.type!=="comment"}function Qk(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function Xk(e){const t=Gt(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Xa(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function Jk(e,t,n){const r=Y0(n,t),o=Gt(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&Vd(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function Zk(e,t,n){const r=Y0(n,t),o=Gt(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&Vd(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}const gs={name:[[`
|
|
40
40
|
\f\r &/=>`.split(""),`
|
|
41
41
|
\f\r "&'/=>\``.split("")],[`\0
|
|
42
42
|
\f\r "&'/<=>`.split(""),`\0
|
|
@@ -44,33 +44,16 @@ export default theme;`}function rs(e={},...t){const{breakpoints:r,mixins:n={},sp
|
|
|
44
44
|
\f\r &>`.split(""),`\0
|
|
45
45
|
\f\r "&'<=>\``.split("")],[`\0
|
|
46
46
|
\f\r "&'<=>\``.split(""),`\0
|
|
47
|
-
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function tv(e,t,r,n){const o=n.schema,a=o.space==="svg"?!1:n.settings.omitOptionalTags;let i=o.space==="svg"?n.settings.closeEmptyElements:n.settings.voids.includes(e.tagName.toLowerCase());const s=[];let l;o.space==="html"&&e.tagName==="svg"&&(n.schema=ip);const c=rv(n,e.properties),d=n.all(o.space==="html"&&e.tagName==="template"?e.content:e);return n.schema=o,d&&(i=!1),(c||!a||!Qx(e,t,r))&&(s.push("<",e.tagName,c?" "+c:""),i&&(o.space==="svg"||n.settings.closeSelfClosing)&&(l=c.charAt(c.length-1),(!n.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&s.push(" "),s.push("/")),s.push(">")),s.push(d),!i&&(!a||!ll(e,t,r))&&s.push("</"+e.tagName+">"),s.join("")}function rv(e,t){const r=[];let n=-1,o;if(t){for(o in t)if(t[o]!==null&&t[o]!==void 0){const a=nv(e,o,t[o]);a&&r.push(a)}}for(;++n<r.length;){const a=e.settings.tightAttributes?r[n].charAt(r[n].length-1):void 0;n!==r.length-1&&a!=='"'&&a!=="'"&&(r[n]+=" ")}return r.join("")}function nv(e,t,r){const n=ix(e.schema,t),o=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,a=e.settings.allowDangerousCharacters?0:1;let i=e.quote,s;if(n.overloadedBoolean&&(r===n.attribute||r==="")?r=!0:(n.boolean||n.overloadedBoolean)&&(typeof r!="string"||r===n.attribute||r==="")&&(r=!!r),r==null||r===!1||typeof r=="number"&&Number.isNaN(r))return"";const l=Rn(n.attribute,Object.assign({},e.settings.characterReferences,{subset:ia.name[o][a]}));return r===!0||(r=Array.isArray(r)?(n.commaSeparated?Nx:Ax)(r,{padLeft:!e.settings.tightCommaSeparatedLists}):String(r),e.settings.collapseEmptyAttributes&&!r)?l:(e.settings.preferUnquoted&&(s=Rn(r,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:ia.unquoted[o][a]}))),s!==r&&(e.settings.quoteSmart&&Qc(r,i)>Qc(r,e.alternative)&&(i=e.alternative),s=i+Rn(r,Object.assign({},e.settings.characterReferences,{subset:(i==="'"?ia.single:ia.double)[o][a],attribute:!0}))+i),l+(s&&"="+s))}const ov=["<","&"];function dp(e,t,r,n){return r&&r.type==="element"&&(r.tagName==="script"||r.tagName==="style")?e.value:Rn(e.value,Object.assign({},n.settings.characterReferences,{subset:ov}))}function av(e,t,r,n){return n.settings.allowDangerousHtml?e.value:dp(e,t,r,n)}function iv(e,t,r,n){return n.all(e)}const sv=ux("type",{invalid:lv,unknown:cv,handlers:{comment:Rx,doctype:Mx,element:tv,raw:av,root:iv,text:dp}});function lv(e){throw new Error("Expected node, not `"+e+"`")}function cv(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const uv={},dv={},pv=[];function hv(e,t){const r=uv,n=r.quote||'"',o=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Invalid quote `"+n+"`, expected `'` or `\"`");return{one:mv,all:fv,settings:{omitOptionalTags:r.omitOptionalTags||!1,allowParseErrors:r.allowParseErrors||!1,allowDangerousCharacters:r.allowDangerousCharacters||!1,quoteSmart:r.quoteSmart||!1,preferUnquoted:r.preferUnquoted||!1,tightAttributes:r.tightAttributes||!1,upperDoctype:r.upperDoctype||!1,tightDoctype:r.tightDoctype||!1,bogusComments:r.bogusComments||!1,tightCommaSeparatedLists:r.tightCommaSeparatedLists||!1,tightSelfClosing:r.tightSelfClosing||!1,collapseEmptyAttributes:r.collapseEmptyAttributes||!1,allowDangerousHtml:r.allowDangerousHtml||!1,voids:r.voids||ex,characterReferences:r.characterReferences||dv,closeSelfClosing:r.closeSelfClosing||!1,closeEmptyElements:r.closeEmptyElements||!1},schema:r.space==="svg"?ip:cx,quote:n,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function mv(e,t,r){return sv(e,t,r,this)}function fv(e){const t=[],r=e&&e.children||pv;let n=-1;for(;++n<r.length;)t[n]=this.one(r[n],n,e);return t.join("")}function gv(e){return Array.isArray(e)?e:[e]}function si(e,t=!1){const r=e.split(/(\r?\n)/g);let n=0;const o=[];for(let a=0;a<r.length;a+=2){const i=t?r[a]+(r[a+1]||""):r[a];o.push([i,n]),n+=r[a].length,n+=r[a+1]?.length||0}return o}function cl(e){return!e||["plaintext","txt","text","plain"].includes(e)}function pp(e){return e==="ansi"||cl(e)}function ul(e){return e==="none"}function hp(e){return ul(e)}function mp(e,t){var n;if(!t)return e;e.properties||(e.properties={}),(n=e.properties).class||(n.class=[]),typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const r=Array.isArray(t)?t:t.split(/\s+/g);for(const o of r)o&&!e.properties.class.includes(o)&&e.properties.class.push(o);return e}function yv(e,t){let r=0;const n=[];for(const o of t)o>r&&n.push({...e,content:e.content.slice(r,o),offset:e.offset+r}),r=o;return r<e.content.length&&n.push({...e,content:e.content.slice(r),offset:e.offset+r}),n}function bv(e,t){const r=Array.from(t instanceof Set?t:new Set(t)).sort((n,o)=>n-o);return r.length?e.map(n=>n.flatMap(o=>{const a=r.filter(i=>o.offset<i&&i<o.offset+o.content.length).map(i=>i-o.offset).sort((i,s)=>i-s);return a.length?yv(o,a):o})):e}async function fp(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Oa(e,t){const r=typeof e=="string"?{}:{...e.colorReplacements},n=typeof e=="string"?e:e.name;for(const[o,a]of Object.entries(t?.colorReplacements||{}))typeof a=="string"?r[o]=a:o===n&&Object.assign(r,a);return r}function Ur(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function gp(e){const t={};return e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle&&(e.fontStyle&hr.Italic&&(t["font-style"]="italic"),e.fontStyle&hr.Bold&&(t["font-weight"]="bold"),e.fontStyle&hr.Underline&&(t["text-decoration"]="underline")),t}function xv(e){return typeof e=="string"?e:Object.entries(e).map(([t,r])=>`${t}:${r}`).join(";")}function vv(e){const t=si(e,!0).map(([o])=>o);function r(o){if(o===e.length)return{line:t.length-1,character:t[t.length-1].length};let a=o,i=0;for(const s of t){if(a<s.length)break;a-=s.length,i++}return{line:i,character:a}}function n(o,a){let i=0;for(let s=0;s<o;s++)i+=t[s].length;return i+=a,i}return{lines:t,indexToPos:r,posToIndex:n}}class pt extends Error{constructor(t){super(t),this.name="ShikiError"}}const yp=new WeakMap;function li(e,t){yp.set(e,t)}function ko(e){return yp.get(e)}class qn{constructor(...t){R(this,"_stacks",{});R(this,"lang");if(t.length===2){const[r,n]=t;this.lang=n,this._stacks=r}else{const[r,n,o]=t;this.lang=n,this._stacks={[o]:r}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,r){return new qn(Object.fromEntries(gv(r).map(n=>[n,us])),t)}getInternalStack(t=this.theme){return this._stacks[t]}get scopes(){return Zc(this._stacks[this.theme])}getScopes(t=this.theme){return Zc(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.scopes}}}function Zc(e){const t=[],r=new Set;function n(o){if(r.has(o))return;r.add(o);const a=o?.nameScopesList?.scopeName;a&&t.push(a),o.parent&&n(o.parent)}return n(e),t}function Sv(e,t){if(!(e instanceof qn))throw new pt("Invalid grammar state");return e.getInternalStack(t)}function wv(){const e=new WeakMap;function t(r){if(!e.has(r.meta)){let n=function(i){if(typeof i=="number"){if(i<0||i>r.source.length)throw new pt(`Invalid decoration offset: ${i}. Code length: ${r.source.length}`);return{...o.indexToPos(i),offset:i}}else{const s=o.lines[i.line];if(s===void 0)throw new pt(`Invalid decoration position ${JSON.stringify(i)}. Lines length: ${o.lines.length}`);if(i.character<0||i.character>s.length)throw new pt(`Invalid decoration position ${JSON.stringify(i)}. Line ${i.line} length: ${s.length}`);return{...i,offset:o.posToIndex(i.line,i.character)}}};const o=vv(r.source),a=(r.options.decorations||[]).map(i=>({...i,start:n(i.start),end:n(i.end)}));Cv(a),e.set(r.meta,{decorations:a,converter:o,source:r.source})}return e.get(r.meta)}return{name:"shiki:decorations",tokens(r){if(!this.options.decorations?.length)return;const n=t(this).decorations.flatMap(o=>[o.start.offset,o.end.offset]);return bv(r,n)},code(r){if(!this.options.decorations?.length)return;const n=t(this),o=Array.from(r.children).filter(d=>d.type==="element"&&d.tagName==="span");if(o.length!==n.converter.lines.length)throw new pt(`Number of lines in code element (${o.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function a(d,p,h,f){const g=o[d];let y="",v=-1,b=-1;if(p===0&&(v=0),h===0&&(b=0),h===Number.POSITIVE_INFINITY&&(b=g.children.length),v===-1||b===-1)for(let w=0;w<g.children.length;w++)y+=bp(g.children[w]),v===-1&&y.length===p&&(v=w+1),b===-1&&y.length===h&&(b=w+1);if(v===-1)throw new pt(`Failed to find start index for decoration ${JSON.stringify(f.start)}`);if(b===-1)throw new pt(`Failed to find end index for decoration ${JSON.stringify(f.end)}`);const C=g.children.slice(v,b);if(!f.alwaysWrap&&C.length===g.children.length)s(g,f,"line");else if(!f.alwaysWrap&&C.length===1&&C[0].type==="element")s(C[0],f,"token");else{const w={type:"element",tagName:"span",properties:{},children:C};s(w,f,"wrapper"),g.children.splice(v,C.length,w)}}function i(d,p){o[d]=s(o[d],p,"line")}function s(d,p,h){const f=p.properties||{},g=p.transform||(y=>y);return d.tagName=p.tagName||"span",d.properties={...d.properties,...f,class:d.properties.class},p.properties?.class&&mp(d,p.properties.class),d=g(d,h)||d,d}const l=[],c=n.decorations.sort((d,p)=>p.start.offset-d.start.offset);for(const d of c){const{start:p,end:h}=d;if(p.line===h.line)a(p.line,p.character,h.character,d);else if(p.line<h.line){a(p.line,p.character,Number.POSITIVE_INFINITY,d);for(let f=p.line+1;f<h.line;f++)l.unshift(()=>i(f,d));a(h.line,0,h.character,d)}}l.forEach(d=>d())}}}function Cv(e){for(let t=0;t<e.length;t++){const r=e[t];if(r.start.offset>r.end.offset)throw new pt(`Invalid decoration range: ${JSON.stringify(r.start)} - ${JSON.stringify(r.end)}`);for(let n=t+1;n<e.length;n++){const o=e[n],a=r.start.offset<o.start.offset&&o.start.offset<r.end.offset,i=r.start.offset<o.end.offset&&o.end.offset<r.end.offset,s=o.start.offset<r.start.offset&&r.start.offset<o.end.offset,l=o.start.offset<r.end.offset&&r.end.offset<o.end.offset;if(a||i||s||l){if(i&&i||s&&l)continue;throw new pt(`Decorations ${JSON.stringify(r.start)} and ${JSON.stringify(o.start)} intersect.`)}}}}function bp(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(bp).join(""):""}const kv=[wv()];function La(e){return[...e.transformers||[],...kv]}var Hr=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Fi={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function Pv(e,t){const r=e.indexOf("\x1B[",t);if(r!==-1){const n=e.indexOf("m",r);return{sequence:e.substring(r+2,n).split(";"),startPosition:r,position:n+1}}return{position:e.length}}function eu(e,t){let r=1;const n=e[t+r++];let o;if(n==="2"){const a=[e[t+r++],e[t+r++],e[t+r]].map(i=>Number.parseInt(i));a.length===3&&!a.some(i=>Number.isNaN(i))&&(o={type:"rgb",rgb:a})}else if(n==="5"){const a=Number.parseInt(e[t+r]);Number.isNaN(a)||(o={type:"table",index:Number(a)})}return[r,o]}function Iv(e){const t=[];for(let r=0;r<e.length;r++){const n=e[r],o=Number.parseInt(n);if(!Number.isNaN(o))if(o===0)t.push({type:"resetAll"});else if(o<=9)Fi[o]&&t.push({type:"setDecoration",value:Fi[o]});else if(o<=29){const a=Fi[o-20];a&&t.push({type:"resetDecoration",value:a})}else if(o<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Hr[o-30]}});else if(o===38){const[a,i]=eu(e,r);i&&t.push({type:"setForegroundColor",value:i}),r+=a}else if(o===39)t.push({type:"resetForegroundColor"});else if(o<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Hr[o-40]}});else if(o===48){const[a,i]=eu(e,r);i&&t.push({type:"setBackgroundColor",value:i}),r+=a}else o===49?t.push({type:"resetBackgroundColor"}):o>=90&&o<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Hr[o-90+8]}}):o>=100&&o<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Hr[o-100+8]}})}return t}function jv(){let e=null,t=null,r=new Set;return{parse(n){const o=[];let a=0;do{const i=Pv(n,a),s=i.sequence?n.substring(a,i.startPosition):n.substring(a);if(s.length>0&&o.push({value:s,foreground:e,background:t,decorations:new Set(r)}),i.sequence){const l=Iv(i.sequence);for(const c of l)c.type==="resetAll"?(e=null,t=null,r.clear()):c.type==="resetForegroundColor"?e=null:c.type==="resetBackgroundColor"?t=null:c.type==="resetDecoration"&&r.delete(c.value);for(const c of l)c.type==="setForegroundColor"?e=c.value:c.type==="setBackgroundColor"?t=c.value:c.type==="setDecoration"&&r.add(c.value)}a=i.position}while(a<n.length);return o}}}var Ev={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function Tv(e=Ev){function t(s){return e[s]}function r(s){return`#${s.map(l=>Math.max(0,Math.min(l,255)).toString(16).padStart(2,"0")).join("")}`}let n;function o(){if(n)return n;n=[];for(let c=0;c<Hr.length;c++)n.push(t(Hr[c]));let s=[0,95,135,175,215,255];for(let c=0;c<6;c++)for(let d=0;d<6;d++)for(let p=0;p<6;p++)n.push(r([s[c],s[d],s[p]]));let l=8;for(let c=0;c<24;c++,l+=10)n.push(r([l,l,l]));return n}function a(s){return o()[s]}function i(s){switch(s.type){case"named":return t(s.name);case"rgb":return r(s.rgb);case"table":return a(s.index)}}return{value:i}}function Rv(e,t,r){const n=Oa(e,r),o=si(t),a=Tv(Object.fromEntries(Hr.map(s=>[s,e.colors?.[`terminal.ansi${s[0].toUpperCase()}${s.substring(1)}`]]))),i=jv();return o.map(s=>i.parse(s[0]).map(l=>{let c,d;l.decorations.has("reverse")?(c=l.background?a.value(l.background):e.bg,d=l.foreground?a.value(l.foreground):e.fg):(c=l.foreground?a.value(l.foreground):e.fg,d=l.background?a.value(l.background):void 0),c=Ur(c,n),d=Ur(d,n),l.decorations.has("dim")&&(c=Mv(c));let p=hr.None;return l.decorations.has("bold")&&(p|=hr.Bold),l.decorations.has("italic")&&(p|=hr.Italic),l.decorations.has("underline")&&(p|=hr.Underline),{content:l.value,offset:s[1],color:c,bgColor:d,fontStyle:p}}))}function Mv(e){const t=e.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(t)if(t[3]){const n=Math.round(Number.parseInt(t[3],16)/2).toString(16).padStart(2,"0");return`#${t[1]}${t[2]}${n}`}else return t[2]?`#${t[1]}${t[2]}80`:`#${Array.from(t[1]).map(n=>`${n}${n}`).join("")}80`;const r=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return r?`var(${r[1]}-dim)`:e}function dl(e,t,r={}){const{lang:n="text",theme:o=e.getLoadedThemes()[0]}=r;if(cl(n)||ul(o))return si(t).map(l=>[{content:l[0],offset:l[1]}]);const{theme:a,colorMap:i}=e.setTheme(o);if(n==="ansi")return Rv(a,t,r);const s=e.getLanguage(n);if(r.grammarState){if(r.grammarState.lang!==s.name)throw new fr(`Grammar state language "${r.grammarState.lang}" does not match highlight language "${s.name}"`);if(!r.grammarState.themes.includes(a.name))throw new fr(`Grammar state themes "${r.grammarState.themes}" do not contain highlight theme "${a.name}"`)}return Av(t,s,a,i,r)}function Nv(...e){if(e.length===2)return ko(e[1]);const[t,r,n={}]=e,{lang:o="text",theme:a=t.getLoadedThemes()[0]}=n;if(cl(o)||ul(a))throw new fr("Plain language does not have grammar state");if(o==="ansi")throw new fr("ANSI language does not have grammar state");const{theme:i,colorMap:s}=t.setTheme(a),l=t.getLanguage(o);return new qn($a(r,l,i,s,n).stateStack,l.name,i.name)}function Av(e,t,r,n,o){const a=$a(e,t,r,n,o),i=new qn($a(e,t,r,n,o).stateStack,t.name,r.name);return li(a.tokens,i),a.tokens}function $a(e,t,r,n,o){const a=Oa(r,o),{tokenizeMaxLineLength:i=0,tokenizeTimeLimit:s=500}=o,l=si(e);let c=o.grammarState?Sv(o.grammarState,r.name)??us:o.grammarContextCode!=null?$a(o.grammarContextCode,t,r,n,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:us,d=[];const p=[];for(let h=0,f=l.length;h<f;h++){const[g,y]=l[h];if(g===""){d=[],p.push([]);continue}if(i>0&&g.length>=i){d=[],p.push([{content:g,offset:y,color:"",fontStyle:0}]);continue}let v,b,C;o.includeExplanation&&(v=t.tokenizeLine(g,c),b=v.tokens,C=0);const w=t.tokenizeLine2(g,c,s),k=w.tokens.length/2;for(let j=0;j<k;j++){const P=w.tokens[2*j],B=j+1<k?w.tokens[2*j+2]:g.length;if(P===B)continue;const F=w.tokens[2*j+1],L=Ur(n[_n.getForeground(F)],a),m=_n.getFontStyle(F),T={content:g.substring(P,B),offset:y+P,color:L,fontStyle:m};if(o.includeExplanation){const D=[];if(o.includeExplanation!=="scopeName")for(const H of r.settings){let J;switch(typeof H.scope){case"string":J=H.scope.split(/,/).map(V=>V.trim());break;case"object":J=H.scope;break;default:continue}D.push({settings:H,selectors:J.map(V=>V.split(/ /))})}T.explanation=[];let $=0;for(;P+$<B;){const H=b[C],J=g.substring(H.startIndex,H.endIndex);$+=J.length,T.explanation.push({content:J,scopes:o.includeExplanation==="scopeName"?_v(H.scopes):Ov(D,H.scopes)}),C+=1}}d.push(T)}p.push(d),d=[],c=w.ruleStack}return{tokens:p,stateStack:c}}function _v(e){return e.map(t=>({scopeName:t}))}function Ov(e,t){const r=[];for(let n=0,o=t.length;n<o;n++){const a=t[n];r[n]={scopeName:a,themeMatches:$v(e,a,t.slice(0,n))}}return r}function tu(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function Lv(e,t,r){if(!tu(e[e.length-1],t))return!1;let n=e.length-2,o=r.length-1;for(;n>=0&&o>=0;)tu(e[n],r[o])&&(n-=1),o-=1;return n===-1}function $v(e,t,r){const n=[];for(const{selectors:o,settings:a}of e)for(const i of o)if(Lv(i,t,r)){n.push(a);break}return n}function xp(e,t,r){const n=Object.entries(r.themes).filter(l=>l[1]).map(l=>({color:l[0],theme:l[1]})),o=n.map(l=>{const c=dl(e,t,{...r,theme:l.theme}),d=ko(c),p=typeof l.theme=="string"?l.theme:l.theme.name;return{tokens:c,state:d,theme:p}}),a=Dv(...o.map(l=>l.tokens)),i=a[0].map((l,c)=>l.map((d,p)=>{const h={content:d.content,variants:{},offset:d.offset};return"includeExplanation"in r&&r.includeExplanation&&(h.explanation=d.explanation),a.forEach((f,g)=>{const{content:y,explanation:v,offset:b,...C}=f[c][p];h.variants[n[g].color]=C}),h})),s=o[0].state?new qn(Object.fromEntries(o.map(l=>[l.theme,l.state?.getInternalStack(l.theme)])),o[0].state.lang):void 0;return s&&li(i,s),i}function Dv(...e){const t=e.map(()=>[]),r=e.length;for(let n=0;n<e[0].length;n++){const o=e.map(l=>l[n]),a=t.map(()=>[]);t.forEach((l,c)=>l.push(a[c]));const i=o.map(()=>0),s=o.map(l=>l[0]);for(;s.every(l=>l);){const l=Math.min(...s.map(c=>c.content.length));for(let c=0;c<r;c++){const d=s[c];d.content.length===l?(a[c].push(d),i[c]+=1,s[c]=o[c][i[c]]):(a[c].push({...d,content:d.content.slice(0,l)}),s[c]={...d,content:d.content.slice(l),offset:d.offset+l})}}}return t}function Da(e,t,r){let n,o,a,i,s,l;if("themes"in r){const{defaultColor:c="light",cssVariablePrefix:d="--shiki-"}=r,p=Object.entries(r.themes).filter(v=>v[1]).map(v=>({color:v[0],theme:v[1]})).sort((v,b)=>v.color===c?-1:b.color===c?1:0);if(p.length===0)throw new fr("`themes` option must not be empty");const h=xp(e,t,r);if(l=ko(h),c&&!p.find(v=>v.color===c))throw new fr(`\`themes\` option must contain the defaultColor key \`${c}\``);const f=p.map(v=>e.getTheme(v.theme)),g=p.map(v=>v.color);a=h.map(v=>v.map(b=>Bv(b,g,d,c))),l&&li(a,l);const y=p.map(v=>Oa(v.theme,r));o=p.map((v,b)=>(b===0&&c?"":`${d+v.color}:`)+(Ur(f[b].fg,y[b])||"inherit")).join(";"),n=p.map((v,b)=>(b===0&&c?"":`${d+v.color}-bg:`)+(Ur(f[b].bg,y[b])||"inherit")).join(";"),i=`shiki-themes ${f.map(v=>v.name).join(" ")}`,s=c?void 0:[o,n].join(";")}else if("theme"in r){const c=Oa(r.theme,r);a=dl(e,t,r);const d=e.getTheme(r.theme);n=Ur(d.bg,c),o=Ur(d.fg,c),i=d.name,l=ko(a)}else throw new fr("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:o,bg:n,themeName:i,rootStyle:s,grammarState:l}}function Bv(e,t,r,n){const o={content:e.content,explanation:e.explanation,offset:e.offset},a=t.map(l=>gp(e.variants[l])),i=new Set(a.flatMap(l=>Object.keys(l))),s={};return a.forEach((l,c)=>{for(const d of i){const p=l[d]||"inherit";if(c===0&&n)s[d]=p;else{const h=d==="color"?"":d==="background-color"?"-bg":`-${d}`,f=r+t[c]+(d==="color"?"":h);s[f]=p}}}),o.htmlStyle=s,o}function Ba(e,t,r,n={meta:{},options:r,codeToHast:(o,a)=>Ba(e,o,a),codeToTokens:(o,a)=>Da(e,o,a)}){let o=t;for(const f of La(r))o=f.preprocess?.call(n,o,r)||o;let{tokens:a,fg:i,bg:s,themeName:l,rootStyle:c,grammarState:d}=Da(e,o,r);const{mergeWhitespaces:p=!0}=r;p===!0?a=Fv(a):p==="never"&&(a=zv(a));const h={...n,get source(){return o}};for(const f of La(r))a=f.tokens?.call(h,a)||a;return qv(a,{...r,fg:i,bg:s,themeName:l,rootStyle:c},h,d)}function qv(e,t,r,n=ko(e)){const o=La(t),a=[],i={type:"root",children:[]},{structure:s="classic",tabindex:l="0"}=t;let c={type:"element",tagName:"pre",properties:{class:`shiki ${t.themeName||""}`,style:t.rootStyle||`background-color:${t.bg};color:${t.fg}`,...l!==!1&&l!=null?{tabindex:l.toString()}:{},...Object.fromEntries(Array.from(Object.entries(t.meta||{})).filter(([g])=>!g.startsWith("_")))},children:[]},d={type:"element",tagName:"code",properties:{},children:a};const p=[],h={...r,structure:s,addClassToHast:mp,get source(){return r.source},get tokens(){return e},get options(){return t},get root(){return i},get pre(){return c},get code(){return d},get lines(){return p}};if(e.forEach((g,y)=>{y&&(s==="inline"?i.children.push({type:"element",tagName:"br",properties:{},children:[]}):s==="classic"&&a.push({type:"text",value:`
|
|
48
|
-
`}));let v={type:"element",tagName:"span",properties:{class:"line"},children:[]},b=0;for(const C of g){let w={type:"element",tagName:"span",properties:{...C.htmlAttrs},children:[{type:"text",value:C.content}]};C.htmlStyle;const k=xv(C.htmlStyle||gp(C));k&&(w.properties.style=k);for(const j of o)w=j?.span?.call(h,w,y+1,b,v,C)||w;s==="inline"?i.children.push(w):s==="classic"&&v.children.push(w),b+=C.content.length}if(s==="classic"){for(const C of o)v=C?.line?.call(h,v,y+1)||v;p.push(v),a.push(v)}}),s==="classic"){for(const g of o)d=g?.code?.call(h,d)||d;c.children.push(d);for(const g of o)c=g?.pre?.call(h,c)||c;i.children.push(c)}let f=i;for(const g of o)f=g?.root?.call(h,f)||f;return n&&li(f,n),f}function Fv(e){return e.map(t=>{const r=[];let n="",o=0;return t.forEach((a,i)=>{const s=!(a.fontStyle&&a.fontStyle&hr.Underline);s&&a.content.match(/^\s+$/)&&t[i+1]?(o||(o=a.offset),n+=a.content):n?(s?r.push({...a,offset:o,content:n+a.content}):r.push({content:n,offset:o},a),o=0,n=""):r.push(a)}),r})}function zv(e){return e.map(t=>t.flatMap(r=>{if(r.content.match(/^\s+$/))return r;const n=r.content.match(/^(\s*)(.*?)(\s*)$/);if(!n)return r;const[,o,a,i]=n;if(!o&&!i)return r;const s=[{...r,offset:r.offset+o.length,content:a}];return o&&s.unshift({content:o,offset:r.offset}),i&&s.push({content:i,offset:r.offset+o.length+a.length}),s}))}function Wv(e,t,r){const n={meta:{},options:r,codeToHast:(a,i)=>Ba(e,a,i),codeToTokens:(a,i)=>Da(e,a,i)};let o=hv(Ba(e,t,r,n));for(const a of La(r))o=a.postprocess?.call(n,o,r)||o;return o}const ru={light:"#333333",dark:"#bbbbbb"},nu={light:"#fffffe",dark:"#1e1e1e"},ou="__shiki_resolved";function pl(e){if(e?.[ou])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||(t.type="dark"),t.colorReplacements={...t.colorReplacements},t.settings||(t.settings=[]);let{bg:r,fg:n}=t;if(!r||!n){const s=t.settings?t.settings.find(l=>!l.name&&!l.scope):void 0;s?.settings?.foreground&&(n=s.settings.foreground),s?.settings?.background&&(r=s.settings.background),!n&&t?.colors?.["editor.foreground"]&&(n=t.colors["editor.foreground"]),!r&&t?.colors?.["editor.background"]&&(r=t.colors["editor.background"]),n||(n=t.type==="light"?ru.light:ru.dark),r||(r=t.type==="light"?nu.light:nu.dark),t.fg=n,t.bg=r}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let o=0;const a=new Map;function i(s){if(a.has(s))return a.get(s);o+=1;const l=`#${o.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${l}`]?i(s):(a.set(s,l),l)}t.settings=t.settings.map(s=>{const l=s.settings?.foreground&&!s.settings.foreground.startsWith("#"),c=s.settings?.background&&!s.settings.background.startsWith("#");if(!l&&!c)return s;const d={...s,settings:{...s.settings}};if(l){const p=i(s.settings.foreground);t.colorReplacements[p]=s.settings.foreground,d.settings.foreground=p}if(c){const p=i(s.settings.background);t.colorReplacements[p]=s.settings.background,d.settings.background=p}return d});for(const s of Object.keys(t.colors||{}))if((s==="editor.foreground"||s==="editor.background"||s.startsWith("terminal.ansi"))&&!t.colors[s]?.startsWith("#")){const l=i(t.colors[s]);t.colorReplacements[l]=t.colors[s],t.colors[s]=l}return Object.defineProperty(t,ou,{enumerable:!1,writable:!1,value:!0}),t}async function vp(e){return Array.from(new Set((await Promise.all(e.filter(t=>!pp(t)).map(async t=>await fp(t).then(r=>Array.isArray(r)?r:[r])))).flat()))}async function Sp(e){return(await Promise.all(e.map(async t=>hp(t)?null:pl(await fp(t))))).filter(t=>!!t)}class Uv extends Zb{constructor(r,n,o,a={}){super(r);R(this,"_resolvedThemes",new Map);R(this,"_resolvedGrammars",new Map);R(this,"_langMap",new Map);R(this,"_langGraph",new Map);R(this,"_textmateThemeCache",new WeakMap);R(this,"_loadedThemesCache",null);R(this,"_loadedLanguagesCache",null);this._resolver=r,this._themes=n,this._langs=o,this._alias=a,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}getTheme(r){return typeof r=="string"?this._resolvedThemes.get(r):this.loadTheme(r)}loadTheme(r){const n=pl(r);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(r){let n=this._textmateThemeCache.get(r);n||(n=Ra.createFromRawTheme(r),this._textmateThemeCache.set(r,n)),this._syncRegistry.setTheme(n)}getGrammar(r){if(this._alias[r]){const n=new Set([r]);for(;this._alias[r];){if(r=this._alias[r],n.has(r))throw new pt(`Circular alias \`${Array.from(n).join(" -> ")} -> ${r}\``);n.add(r)}}return this._resolvedGrammars.get(r)}loadLanguage(r){if(this.getGrammar(r.name))return;const n=new Set([...this._langMap.values()].filter(i=>i.embeddedLangsLazy?.includes(r.name)));this._resolver.addLanguage(r);const o={balancedBracketSelectors:r.balancedBracketSelectors||["*"],unbalancedBracketSelectors:r.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(r.scopeName,r);const a=this.loadGrammarWithConfiguration(r.scopeName,1,o);if(a.name=r.name,this._resolvedGrammars.set(r.name,a),r.aliases&&r.aliases.forEach(i=>{this._alias[i]=r.name}),this._loadedLanguagesCache=null,n.size)for(const i of n)this._resolvedGrammars.delete(i.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(i.scopeName),this._syncRegistry?._grammars?.delete(i.scopeName),this.loadLanguage(this._langMap.get(i.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(r){for(const a of r)this.resolveEmbeddedLanguages(a);const n=Array.from(this._langGraph.entries()),o=n.filter(([a,i])=>!i);if(o.length){const a=n.filter(([i,s])=>s&&s.embeddedLangs?.some(l=>o.map(([c])=>c).includes(l))).filter(i=>!o.includes(i));throw new pt(`Missing languages ${o.map(([i])=>`\`${i}\``).join(", ")}, required by ${a.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[a,i]of n)this._resolver.addLanguage(i);for(const[a,i]of n)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(r){if(this._langMap.set(r.name,r),this._langGraph.set(r.name,r),r.embeddedLangs)for(const n of r.embeddedLangs)this._langGraph.set(n,this._langMap.get(n))}}class Hv{constructor(t,r){R(this,"_langs",new Map);R(this,"_scopeToLang",new Map);R(this,"_injections",new Map);R(this,"_onigLib");this._onigLib={createOnigScanner:n=>t.createScanner(n),createOnigString:n=>t.createString(n)},r.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(r=>{this._langs.set(r,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(r=>{this._injections.get(r)||this._injections.set(r,[]),this._injections.get(r).push(t.scopeName)})}getInjections(t){const r=t.split(".");let n=[];for(let o=1;o<=r.length;o++){const a=r.slice(0,o).join(".");n=[...n,...this._injections.get(a)||[]]}return n}}let eo=0;function Vv(e){eo+=1,e.warnings!==!1&&eo>=10&&eo%10===0&&console.warn(`[Shiki] ${eo} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new pt("`engine` option is required for synchronous mode");const r=(e.langs||[]).flat(1),n=(e.themes||[]).flat(1).map(pl),o=new Hv(e.engine,r),a=new Uv(o,n,r,e.langAlias);let i;function s(C){v();const w=a.getGrammar(typeof C=="string"?C:C.name);if(!w)throw new pt(`Language \`${C}\` not found, you may need to load it first`);return w}function l(C){if(C==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};v();const w=a.getTheme(C);if(!w)throw new pt(`Theme \`${C}\` not found, you may need to load it first`);return w}function c(C){v();const w=l(C);i!==C&&(a.setTheme(w),i=C);const k=a.getColorMap();return{theme:w,colorMap:k}}function d(){return v(),a.getLoadedThemes()}function p(){return v(),a.getLoadedLanguages()}function h(...C){v(),a.loadLanguages(C.flat(1))}async function f(...C){return h(await vp(C))}function g(...C){v();for(const w of C.flat(1))a.loadTheme(w)}async function y(...C){return v(),g(await Sp(C))}function v(){if(t)throw new pt("Shiki instance has been disposed")}function b(){t||(t=!0,a.dispose(),eo-=1)}return{setTheme:c,getTheme:l,getLanguage:s,getLoadedThemes:d,getLoadedLanguages:p,loadLanguage:f,loadLanguageSync:h,loadTheme:y,loadThemeSync:g,dispose:b,[Symbol.dispose]:b}}async function Gv(e={}){e.loadWasm;const[t,r,n]=await Promise.all([Sp(e.themes||[]),vp(e.langs||[]),e.engine||Ld(e.loadWasm||hb())]);return Vv({...e,themes:t,langs:r,engine:n})}async function Kv(e={}){const t=await Gv(e);return{getLastGrammarState:(...r)=>Nv(t,...r),codeToTokensBase:(r,n)=>dl(t,r,n),codeToTokensWithThemes:(r,n)=>xp(t,r,n),codeToTokens:(r,n)=>Da(t,r,n),codeToHast:(r,n)=>Ba(t,r,n),codeToHtml:(r,n)=>Wv(t,r,n),...t,getInternalContext:()=>t}}function Qv(e,t,r){let n,o,a;{const s=e;n=s.langs,o=s.themes,a=s.engine}async function i(s){function l(f){if(typeof f=="string"){if(pp(f))return[];const g=n[f];if(!g)throw new fr(`Language \`${f}\` is not included in this bundle. You may want to load it from external source.`);return g}return f}function c(f){if(hp(f))return"none";if(typeof f=="string"){const g=o[f];if(!g)throw new fr(`Theme \`${f}\` is not included in this bundle. You may want to load it from external source.`);return g}return f}const d=(s.themes??[]).map(f=>c(f)),p=(s.langs??[]).map(f=>l(f)),h=await Kv({engine:s.engine??a(),...s,themes:d,langs:p});return{...h,loadLanguage(...f){return h.loadLanguage(...f.map(l))},loadTheme(...f){return h.loadTheme(...f.map(c))}}}return i}const Yv=Qv({langs:G0,themes:Q0,engine:()=>Ld(Promise.resolve().then(()=>require("./wasm-DQxwEHae-Dw4u1m6u.cjs")))}),zi={scopeName:"source.malloy",patterns:[{include:"#malloy-language"}],repository:{"malloy-language":{patterns:[{include:"#sql-string"},{include:"#comments"},{include:"#tags"},{include:"#strings"},{include:"#numbers"},{include:"#keywords"},{include:"#properties"},{include:"#functions"},{include:"#datetimes"},{include:"#identifiers-quoted"},{include:"#types"},{include:"#constants"},{include:"#timeframes"},{include:"#identifiers-unquoted"}]},"malloy-matched":{begin:"{",end:"}",patterns:[{include:"#malloy-matched"},{include:"#malloy-language"}]},"malloy-in-sql":{begin:"%{",name:"source.malloy-in-sql",end:"}%?",patterns:[{include:"#malloy-matched"},{include:"#malloy-language"}]},"sql-string":{patterns:[{begin:'(\\b[A-Za-z_][A-Za-z_0-9]*)(\\s*\\.\\s*)(sql)(\\s*\\(\\s*)(""")',end:'"""',beginCaptures:{1:{name:"variable.other"},3:{name:"keyword.control.sql"},5:{name:"punctuation.sql-block.open"}},endCaptures:{0:{name:"punctuation.sql-block.close"}},name:"source.sql",patterns:[{include:"#malloy-in-sql"},{include:"source.sql"}]}]},functions:{patterns:[{match:"(?i)\\b(count)(\\s*\\()(distinct)",captures:{1:{name:"entity.name.function"},3:{name:"entity.name.function.modifier"}}},{match:"(?i)\\b(AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE|UNGROUPED)(\\s*\\()",captures:{1:{name:"entity.name.function"}}},{match:"(?i)\\b([a-zA-Z_][a-zA-Z_0-9]*)(\\s*\\()",captures:{1:{name:"entity.name.function"}}},{match:"(?i)\\b([a-zA-Z_][a-zA-Z_0-9]*)(!)(timestamp|number|string|boolean|date)?(\\s*\\()",captures:{1:{name:"entity.name.function"},3:{name:"entity.name.type"}}}]},datetimes:{patterns:[{match:"(?i)@[0-9]{4}-[0-9]{2}-[0-9]{2}[ T][0-9]{2}:[0-9]{2}((:[0-9]{2})(([\\.,][0-9]+)(\\[[A-Za-z_/]+\\])?)?)?",name:"constant.numeric.timestamp"},{match:"(?i)@[0-9]{4}(-Q[1-4]|-[0-9]{2}(-[0-9]{2}(-WK)?)?)?",name:"constant.numeric.date"}]},"identifiers-quoted":{patterns:[{match:"`[^`]*`",name:"variable.other.quoted"}]},"identifiers-unquoted":{patterns:[{match:"(?i)\\b[A-Za-z_][A-Za-z_0-9]*\\b",name:"variable.other"}]},timeframes:{patterns:[{match:"(?i)\\b((year|quarter|month|week|day|hour|minute|second)s?)\\b",name:"keyword.other.timeframe"},{match:"(?i)\\b(day_of_year|day_of_month)\\b",name:"keyword.other.timeframe"}]},comments:{patterns:[{begin:"/\\*",end:"\\*/",beginCaptures:{0:{name:"punctuation.definition.comment.begin"}},endCaptures:{0:{name:"punctuation.definition.comment.end"}},name:"comment.block"},{begin:"//",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-slash"},{begin:"--",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-hyphen"}]},tags:{patterns:[{match:"##\\n",name:"string.quoted",captures:{0:{name:"string.quoted"}}},{begin:'#"',end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-slash"},{match:"#\\n",name:"string.quoted",captures:{0:{name:"string.quoted"}}},{begin:"#\\s",end:"\\n",beginCaptures:{0:{name:"support.type.property-name.json"}},name:"comment.line.double-slash",patterns:[{include:"#tag-values"}]},{begin:"##\\s",end:"\\n",beginCaptures:{0:{name:"support.type.property-name.json"}},name:"comment.line.double-slash",patterns:[{include:"#tag-values"}]},{begin:"#",end:"\\n",beginCaptures:{0:{name:"string.quoted"}},name:"string.quoted"}],repository:{"tag-values":{name:"support.type.property-name.json",match:'(-)?((?:[^\\s=#]+)|(?:"[^#]+"))(?:\\s*(=)\\s*((?:[^\\s=#]+)|(?:"[^#]+")))?',captures:{1:{name:"keyword.control.negate"},2:{name:"support.type.property-name.json"},3:{name:"keyword.operator.comparison.ts"},4:{name:"string.quoted"}}}}},strings:{patterns:[{begin:"'",end:"'",beginCaptures:{0:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.single",patterns:[{include:"#escapes"}]},{begin:'"',end:'"',beginCaptures:{0:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.double",patterns:[{include:"#escapes"}]},{begin:'"""',end:'"""',beginCaptures:{0:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.triple"},{begin:"(?i)[r|/]'",end:"'",name:"string.regexp",patterns:[{include:"#regex-escapes"}]}],repository:{escapes:{name:"constant.character.escape",match:"\\\\(u[A-Fa-f0-9]{4}|.)",captures:{0:{name:"constant.character.escape"}}},"regex-escapes":{name:"constant.character.escape",match:"\\\\.",captures:{0:{name:"constant.character.escape"}}}}},numbers:{match:"(?i)(\\b((0|[1-9][0-9]*)(E[+-]?[0-9]+|\\.[0-9]*)?)|\\.[0-9]+)",name:"constant.numeric"},constants:{patterns:[{match:"(?i)\\bnull\\b",name:"constant.language.null"},{match:"(?i)\\btrue\\b",name:"constant.language.true"},{match:"(?i)\\bfalse\\b",name:"constant.language.false"}]},types:{patterns:[{match:"(?i)\\bstring\\b",name:"entity.name.type.string"},{match:"(?i)\\bnumber\\b",name:"entity.name.type.number"},{match:"(?i)\\bdate\\b",name:"entity.name.type.date"},{match:"(?i)\\btimestamp\\b",name:"entity.name.type.timestamp"},{match:"(?i)\\bboolean\\b",name:"entity.name.type.boolean"}]},properties:{patterns:[{match:"(?i)\\baccept\\b",name:"keyword.control.accept"},{match:"(?i)\\bselect\\b",name:"keyword.control.select"},{match:"(?i)\\bconnection\\b",name:"keyword.control.connection"},{match:"(?i)\\brun\\b",name:"keyword.control.run"},{match:"(?i)\\bextend\\b",name:"keyword.control.extend"},{match:"(?i)\\brefine\\b",name:"keyword.control.refine"},{match:"(?i)\\baggregate\\b",name:"keyword.control.aggregate"},{match:"(?i)\\bsample\\b",name:"keyword.control.sample"},{match:"(?i)\\bcalculate\\b",name:"keyword.control.calculate"},{match:"(?i)\\btimezone\\b",name:"keyword.control.timezone"},{match:"(?i)\\bdimension\\b",name:"keyword.control.dimension"},{match:"(?i)\\bexcept\\b",name:"keyword.control.except"},{match:"(?i)\\bsource\\b",name:"keyword.control.source"},{match:"(?i)\\bgroup_by\\b",name:"keyword.control.group_by"},{match:"(?i)\\bhaving\\b",name:"keyword.control.having"},{match:"(?i)\\bindex\\b",name:"keyword.control.index"},{match:"(?i)\\bjoin_one\\b",name:"keyword.control.join_one"},{match:"(?i)\\bwith\\b",name:"keyword.control.with"},{match:"(?i)\\bjoin_many\\b",name:"keyword.control.join_many"},{match:"(?i)\\bjoin_cross\\b",name:"keyword.control.join_cross"},{match:"(?i)\\blimit\\b",name:"keyword.control.limit"},{match:"(?i)\\bmeasure\\b",name:"keyword.control.measure"},{match:"(?i)\\bnest\\b",name:"keyword.control.nest"},{match:"(?i)\\border_by\\b",name:"keyword.control.order_by"},{match:"(?i)\\bpartition_by\\b",name:"keyword.control.partition_by"},{match:"(?i)\\bprimary_key\\b",name:"keyword.control.primary_key"},{match:"(?i)\\bproject\\b",name:"keyword.control.project"},{match:"(?i)\\bquery\\b",name:"keyword.control.query"},{match:"(?i)\\brename\\b",name:"keyword.control.rename"},{match:"(?i)\\btop\\b",name:"keyword.control.top"},{match:"(?i)\\bview\\b",name:"keyword.control.view"},{match:"(?i)\\bwhere\\b",name:"keyword.control.where"},{match:"(?i)\\bdeclare\\b",name:"keyword.control.declare"}]},keywords:{patterns:[{match:"(?i)\\bis\\b",name:"keyword.control.is"},{match:"(?i)\\bon\\b",name:"keyword.control.on"},{match:"(?i)\\bnot\\b",name:"keyword.other.not"},{match:"(?i)\\bor\\b",name:"keyword.other.or"},{match:"(?i)\\bdesc\\b",name:"keyword.control.desc"},{match:"(?i)\\bby\\b",name:"keyword.control.by"},{match:"(?i)\\band\\b",name:"keyword.other.and"},{match:"(?i)\\basc\\b",name:"keyword.control.asc"},{match:"(?i)\\bfor\\b",name:"keyword.other.for"},{match:"(?i)\\belse\\b",name:"keyword.other.else"},{match:"(?i)\\bto\\b",name:"keyword.other.to"},{match:"(?i)\\bwhen\\b",name:"keyword.other.when"},{match:"(?i)\\bpick\\b",name:"keyword.other.pick"},{match:"(?i)\\bimport\\b",name:"keyword.control.import"}]}}},Xv={...zi,patterns:[...zi.patterns,{include:"#docvar"}],repository:{...zi.repository,docvar:{patterns:[{match:"\\<\\<[^(\\>\\>)]*\\>\\>",beginCaptures:{0:{name:"punctuation.definition.comment.begin"}},endCaptures:{0:{name:"punctuation.definition.comment.end"}},name:"markup.italic.markdown"}]}}},Jv={name:"Malloy SQL",scopeName:"source.malloy-sql",patterns:[{include:"#malloysql-sql"}],repository:{"malloysql-sql":{beginCaptures:{0:{name:"entity.other.attribute.malloy-sql"},1:{name:"entity.other.attribute.malloy-sql"},3:{name:"comment.line.double-slash"}},name:"meta.embedded.block.malloysql.sql",patterns:[{include:"#comments"},{begin:"%{",end:"}%",beginCaptures:{0:{name:"punctuation.definition.malloy-sql"}},endCaptures:{0:{name:"punctuation.definition.malloy-sql"}},name:"meta.embedded.block.malloy",patterns:[{include:"source.malloy"}]},{include:"source.sql"}]},comments:{patterns:[{begin:"/\\*",end:"\\*/",beginCaptures:{0:{name:"punctuation.definition.comment.begin"}},endCaptures:{0:{name:"punctuation.definition.comment.end"}},name:"comment.block"},{begin:"//",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-slash"},{begin:"--",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-hyphen"}]}}},wp="catppuccin-latte",Zv=Yv({themes:[wp],langs:["sql","json","typescript",{name:"malloy",scopeName:"source.malloy",embeddedLangs:["sql"],...Xv},{name:"malloysql",scopeName:"source.malloy-sql",embeddedLangs:["sql"],...Jv}]});async function Jr(e,t){return(await Zv).codeToHtml(e,{lang:t,theme:wp})}const tt=x.styled(x.Card)({display:"flex",flexDirection:"column",height:"100%"}),kt=x.styled(x.CardContent)({display:"flex",flexDirection:"column",padding:"10px",flexGrow:1}),ci=x.styled(x.CardMedia)({padding:"10px"}),e1=x.styled("div")({display:"flex",flexDirection:"column",height:"100%"});x.styled("div")({height:"30px",backgroundColor:"rgba(225, 240, 255, 1)",display:"flex",padding:"4px",alignItems:"center"});const t1=x.styled("div")({display:"flex",height:"75vh",width:"100%",overflowY:"auto"});x.styled("div")({position:"relative",height:"100%",flex:"0 0 auto"});const r1=Ee([u.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V5h14z"},"0"),u.jsx("path",{d:"M7 12h2v5H7zm8-5h2v10h-2zm-4 7h2v3h-2zm0-4h2v2h-2z"},"1")]),Cp=_.createContext(void 0),qa=({projectName:e,packageName:t,versionId:r,children:n})=>u.jsx(Cp.Provider,{value:{projectName:e,packageName:t,versionId:r},children:n});function Ft(){const e=_.useContext(Cp);if(!e)throw new Error("usePackage must be used within a PackageProvider");return e}function Pt({error:e,context:t}){const r=e.data?.message||"Unknown Error";return u.jsxs(u.Fragment,{children:[t&&u.jsx(x.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:t}),u.jsx("pre",{style:{whiteSpace:"pre-wrap",color:"red",padding:"10px",margin:"auto"},children:r})]})}function zt({text:e,size:t=20,color:r="primary",thickness:n=3.6,centered:o=!0,spacing:a=2,textVariant:i="body2"}){const s=u.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:a},children:[u.jsx(x.CircularProgress,{size:t,color:r,thickness:n}),e&&u.jsx(x.Typography,{variant:i,color:"text.secondary",children:e})]});return o?u.jsx(x.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"200px",width:"100%"},children:s}):s}const kp=new Ms.QueryClient({defaultOptions:{queries:{retry:!1,throwOnError:!1},mutations:{retry:!1,throwOnError:!1}}}),hl=async(e,t)=>{const r=t?await t():void 0;return{baseURL:e,withCredentials:!r,headers:{Authorization:r&&`Bearer ${r}`}}};function It(e){const{server:t,getAccessToken:r}=Cl(),n={...e,queryKey:[...e.queryKey,t],queryFn:async()=>{try{const o=await hl(t,r);return await e.queryFn(o)}catch(o){if(o&&typeof o=="object"&&"response"in o){const a=o;if(a.response?.data){const i=new Error(a.response.data.message||a.message);throw i.status=a.response.status,i.data=a.response.data,i}}throw o}},retry:!1,throwOnError:!1};return Ms.useQuery(n,kp)}function n1(e){const{server:t,getAccessToken:r}=Cl(),n={...e,mutationFn:async o=>{try{const a=await hl(t,r);return await e.mutationFn(o,a)}catch(a){if(a&&typeof a=="object"&&"response"in a){const i=a;if(i.response?.data){const s=new Error(i.response.data.message||i.message);throw s.status=i.response.status,s.data=i.response.data,s}}throw a}},retry:!1,throwOnError:!1};return Ms.useMutation(n,kp)}const o1=_.lazy(()=>Promise.resolve().then(()=>require("./RenderedResult-DXlUZo0k-CH-bOsNE.cjs"))),a1=new _d(new ct);function i1({modelPath:e,query:t,sourceName:r,queryName:n}){const{projectName:o,packageName:a,versionId:i}=Ft(),{data:s,isSuccess:l,isError:c,error:d}=It({queryKey:["queryResult",o,a,e,i,t,r,n],queryFn:p=>a1.executeQuery(o,a,e,t,r,n,i,p)});return u.jsxs(u.Fragment,{children:[!l&&!c&&u.jsx(zt,{text:"Fetching Query Results..."}),l&&u.jsx(_.Suspense,{fallback:u.jsx("div",{children:"Loading..."}),children:u.jsx(o1,{result:s.data.result})}),c&&u.jsx(Pt,{context:`${o} > ${a} > ${e}`,error:d})]})}const s1=x.styled(x.Card)({display:"flex",flexDirection:"column",height:"100%"});function l1({modelPath:e,sourceName:t,queryName:r,expandResult:n,hideResultIcon:o,expandEmbedding:a,hideEmbeddingIcon:i,noView:s,annotations:l}){const[c,d]=_.useState(n),[p,h]=_.useState(a),[f,g]=_.useState(),[y,v]=_.useState(),b=c1(t,r);return _.useEffect(()=>{Jr(b,"typescript").then(C=>{g(C)})},[p,b]),_.useEffect(()=>{if(l&&l.length>0){const C=l.map(w=>`// ${w}`).join(`
|
|
49
|
-
`);Jr(C,"typescript").then(w=>{v(w)})}},[l]),u.jsx(u.Fragment,{children:u.jsxs(s1,{variant:"outlined",sx:{padding:"0px 10px 0px 10px",borderRadius:"0px"},children:[u.jsxs(x.Stack,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",width:"100%"},children:[u.jsx(x.Typography,{variant:"subtitle2",sx:{mt:"auto",mb:"auto"},children:`${s?"":"View >"} ${r}`}),u.jsxs(x.CardActions,{sx:{padding:"0px"},children:[!o&&u.jsx(x.Tooltip,{title:c?"Hide Results":"Show Results",children:u.jsx(x.IconButton,{size:"small",onClick:()=>{d(!c)},children:u.jsx(r1,{})})}),!i&&u.jsx(x.Tooltip,{title:p?"Hide Sharing":"Show Sharing",children:u.jsx(x.IconButton,{size:"small",onClick:()=>{h(!p)},children:u.jsx(Oo,{})})})]})]}),u.jsxs(x.Collapse,{in:p,timeout:"auto",unmountOnExit:!0,children:[u.jsx(x.Divider,{}),u.jsxs(x.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:[u.jsx(x.Typography,{sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:u.jsx("div",{dangerouslySetInnerHTML:{__html:f}})}),u.jsx(x.Tooltip,{title:"Copy Embeddable Code",children:u.jsx(x.IconButton,{sx:{width:"24px",height:"24px"},onClick:()=>{navigator.clipboard.writeText(b)},children:u.jsx(oi,{})})})]})]}),u.jsxs(x.Collapse,{in:c,timeout:"auto",unmountOnExit:!0,children:[u.jsx(x.Divider,{sx:{mb:"4px"}}),y&&u.jsxs(u.Fragment,{children:[u.jsx(x.Stack,{sx:{borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:u.jsx(x.Typography,{fontSize:"12px",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:u.jsx("div",{className:"content",dangerouslySetInnerHTML:{__html:y}})})}),u.jsx(x.Divider,{sx:{mb:"4px"}})]}),u.jsx(x.CardContent,{children:u.jsx(i1,{modelPath:e,sourceName:t,queryName:r})})]})]})})}function c1(e,t){return`<QueryResult
|
|
50
|
-
sourceName="${e}"
|
|
51
|
-
queryName="${t}"
|
|
52
|
-
/>`}function u1(e){const{theme:t,name:r,props:n}=e;return!t||!t.components||!t.components[r]||!t.components[r].defaultProps?n:Ea(t.components[r].defaultProps,n)}const d1=Zs();function p1(e=d1){return Ty(e)}function h1({props:e,name:t,defaultTheme:r,themeId:n}){let o=p1(r);return o=o[n]||o,u1({theme:o,name:t,props:e})}function m1({props:e,name:t}){return h1({props:e,name:t,defaultTheme:el,themeId:tl})}const f1=new _d(new ct),g1=Te(fe.Box)(({theme:e})=>({display:"flex",flexWrap:"wrap",gap:e.spacing(.5),borderBottom:`1px solid ${e.palette.divider}`,minHeight:36})),y1=Te(x.Button)(({theme:e,selected:t})=>({minHeight:36,padding:e.spacing(.5,2),borderRadius:e.shape.borderRadius,background:t?e.palette.action.selected:"none",color:t?e.palette.primary.main:e.palette.text.primary,fontWeight:t?600:400,border:t?`1px solid ${e.palette.primary.main}`:"1px solid transparent",boxShadow:t?e.shadows[1]:"none",textTransform:"uppercase","&:hover":{background:e.palette.action.hover,border:`1px solid ${e.palette.primary.light}`}}));function Pp({sourceAndPaths:e,existingQuery:t,existingSourceName:r,onQueryChange:n,onSourceChange:o}){const[a,i]=_.useState(r?e.findIndex(c=>c.sourceInfo.name===r):0),[s,l]=_.useState(t||mo());return _.useEffect(()=>{o&&o(a)},[a,o]),u.jsxs(tt,{variant:"outlined",children:[u.jsx(kt,{children:u.jsx(fe.Stack,{sx:{flexDirection:"row",justifyContent:"space-between"},children:e.length>0&&u.jsx(g1,{children:e.map((c,d)=>u.jsx(y1,{selected:a===d,onClick:()=>i(d),children:c.sourceInfo.name||`Source ${d+1}`},c.sourceInfo.name||d))})})}),u.jsx(ci,{children:u.jsxs(fe.Stack,{spacing:2,component:"section",children:[u.jsx(Ip,{sourceAndPath:e[a],existingQuery:s,onChange:c=>{l(c),n&&n(c)}}),u.jsx(fe.Box,{height:"5px"})]})})]})}function mo(){return{query:void 0,malloyQuery:void 0,malloyResult:void 0}}function Ip({sourceAndPath:e,onChange:t,existingQuery:r}){const[n,o]=_.useState(r||mo()),[a,i]=_.useState([]);_.useEffect(()=>{t&&t(n)},[t,n]);const{projectName:s,packageName:l,versionId:c}=Ft(),d=n1({mutationFn:(g,y)=>{const v=new Kh.ASTQuery({source:e.sourceInfo,query:n?.malloyQuery}).toMalloy();return o({...n,query:v}),f1.executeQuery(s,l,e.modelPath,v,void 0,void 0,c,y)},onSuccess:g=>{if(g){const y=JSON.parse(g.data.result);o({...n,malloyResult:y})}}}),[p,h]=_.useState(e.sourceInfo.name);_.useEffect(()=>{p!==e.sourceInfo.name&&(h(e.sourceInfo.name),o(mo()))},[e,p]);const f=_.useCallback(g=>{o({...n,malloyQuery:g})},[n]);return p!==e.sourceInfo.name?u.jsx("div",{children:"Loading..."}):u.jsx(e1,{children:u.jsx(t1,{children:u.jsx(dn.MalloyExplorerProvider,{source:e.sourceInfo,query:n?.malloyQuery,onQueryChange:f,focusedNestViewPath:a,onFocusedNestViewPathChange:i,onDrill:g=>{console.info(g)},children:u.jsx("div",{style:{display:"flex",flexDirection:"column",height:"100%"},children:u.jsxs("div",{style:{display:"flex",height:"100%",overflowY:"auto"},children:[u.jsx(dn.ResizableCollapsiblePanel,{isInitiallyExpanded:!0,initialWidth:180,minWidth:180,icon:"database",title:e.sourceInfo.name,children:u.jsx(dn.SourcePanel,{onRefresh:()=>o(mo())})}),u.jsx(dn.ResizableCollapsiblePanel,{isInitiallyExpanded:!0,initialWidth:280,minWidth:280,icon:"filterSliders",title:"Query",children:u.jsx(dn.QueryPanel,{runQuery:()=>{d.mutate()}})}),u.jsx(dn.ResultPanel,{source:e.sourceInfo,draftQuery:n?.malloyQuery,setDraftQuery:g=>o({...n,malloyQuery:g}),submittedQuery:n?.malloyQuery?{executionState:d.isPending?"running":"finished",response:{result:n.malloyResult},query:n.malloyQuery,queryResolutionStartMillis:Date.now(),onCancel:d.reset}:void 0,options:{showRawQuery:!0}})]})})})})},e.sourceInfo.name)}const b1=new ai(new ct);function x1({modelPath:e,expandResults:t,hideResultIcons:r,expandEmbeddings:n,hideEmbeddingIcons:o}){const[a,i]=_.useState(!1),[s,l]=_.useState(),[c,d]=_.useState(0),{projectName:p,packageName:h,versionId:f}=Ft(),g=v1(e);_.useEffect(()=>{Jr(g,"typescript").then(w=>{l(w)})},[a,g]);const{data:y,isError:v,isLoading:b,error:C}=It({queryKey:["package",p,h,e,f],queryFn:async w=>(await b1.getModel(p,h,e,f,w)).data});return b?u.jsx(zt,{text:"Fetching Model..."}):v?(console.log("error",C),u.jsx(Pt,{error:C,context:`${h} > ${e}`})):u.jsxs(tt,{variant:"outlined",children:[u.jsxs(kt,{children:[u.jsxs(x.Stack,{sx:{flexDirection:"row",justifyContent:"space-between"},children:[Array.isArray(y.sourceInfos)&&y.sourceInfos.length>0&&u.jsx(x.Tabs,{value:c,onChange:(w,k)=>d(k),variant:"scrollable",scrollButtons:"auto",sx:{borderBottom:1,borderColor:"divider",minHeight:36},children:y.sourceInfos.map((w,k)=>{let j;try{j=JSON.parse(w)}catch{j={name:String(k)}}return u.jsx(x.Tab,{label:j.name||`Source ${k+1}`,sx:{minHeight:36}},j.name||k)})}),!o&&u.jsx(x.CardActions,{sx:{padding:"0px 10px 0px 10px",mb:"auto",mt:"auto"},children:u.jsx(x.Tooltip,{title:a?"Hide Embedding":"View Embedding",children:u.jsx(x.IconButton,{size:"small",onClick:()=>{i(!a)},children:u.jsx(Oo,{})})})})]}),u.jsxs(x.Collapse,{in:a,timeout:"auto",unmountOnExit:!0,children:[u.jsx(x.Divider,{}),u.jsxs(x.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:[u.jsx(x.Typography,{sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:u.jsx("div",{dangerouslySetInnerHTML:{__html:s}})}),u.jsx(x.Tooltip,{title:"Copy Embeddable Code",children:u.jsx(x.IconButton,{sx:{width:"24px",height:"24px"},onClick:()=>{navigator.clipboard.writeText(g)},children:u.jsx(oi,{})})})]})]}),u.jsx(x.Divider,{})]}),u.jsx(ci,{children:u.jsxs(x.Stack,{spacing:2,component:"section",children:[Array.isArray(y.sourceInfos)&&y.sourceInfos.length>0&&u.jsx(Ip,{sourceAndPath:{modelPath:e,sourceInfo:JSON.parse(y.sourceInfos[c])}}),y.queries?.length>0&&u.jsxs(tt,{variant:"outlined",sx:{padding:"0px 10px 0px 10px"},children:[u.jsx(kt,{sx:{p:"10px"},children:u.jsx(x.Typography,{variant:"subtitle1",children:"Named Queries"})}),u.jsx(x.Stack,{spacing:1,component:"section",children:y.queries.map(w=>u.jsx(l1,{modelPath:e,queryName:w.name,expandResult:t,hideResultIcon:r,expandEmbedding:n,hideEmbeddingIcon:o,noView:!0,annotations:w.annotations},w.name))}),u.jsx(x.Box,{height:"10px"})]}),u.jsx(x.Box,{height:"5px"})]})})]})}function v1(e){return`<Model
|
|
53
|
-
modelPath="${e}"
|
|
54
|
-
accessToken={accessToken}
|
|
55
|
-
/>`}const jp=Ee(u.jsx("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z"})),S1=_.lazy(()=>Promise.resolve().then(()=>require("./RenderedResult-DXlUZo0k-CH-bOsNE.cjs")));function Ep({result:e,minHeight:t,maxHeight:r}){const[n,o]=_.useState(!1),[a,i]=_.useState(0),[s,l]=_.useState(!1),c=_.useRef(null),d=_.useRef(null),[p,h]=_.useState(void 0),[f,g]=_.useState(!1),y=_.useCallback(()=>{const k=n;o(!n),k&&d.current&&setTimeout(()=>{d.current?.scrollIntoView({behavior:"smooth",block:"start"})},100)},[n]),v=_.useCallback(k=>{i(k)},[]);if(_.useEffect(()=>{if(f){l(!0);return}if(a===0){l(!1);return}const k=t-20,j=a>k;a<k&&h(a+20),l(j)},[a,f,t]),!e)return null;const b=u.jsx(zt,{text:"Loading...",centered:!0,size:32}),C=f?n?r-40:t-40:void 0,w=p?{minHeight:`${p}px`,height:"100%"}:{height:"100%"};return u.jsx(u.Fragment,{children:u.jsxs(x.Box,{ref:d,sx:{position:"relative",minHeight:`${t}px`,maxHeight:`${n?r:t}px`,border:"0px",borderRadius:0,overflow:"hidden",display:"flex",flexDirection:"column",...w},children:[u.jsx(x.Box,{ref:c,sx:{flex:1,overflow:n?"auto":"hidden",p:0,pb:s?"40px":1},children:e&&u.jsx(_.Suspense,{fallback:b,children:u.jsx(S1,{result:e,height:C,isFillElement:k=>{g(k)},onSizeChange:v})})||b}),s&&u.jsx(x.Box,{sx:{position:"absolute",bottom:0,left:0,right:0,height:"32px",backgroundColor:"rgba(255,255,255,0.75)",display:"flex",alignItems:"center",justifyContent:"center"},children:u.jsx(x.IconButton,{size:"small",onClick:y,sx:{color:"text.secondary","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)"}},title:n?"Collapse to original size":"Expand to full size",children:n?u.jsx(yo.ExpandLess,{sx:{fontSize:30}}):u.jsx(yo.ExpandMore,{sx:{fontSize:30}})})})]})})}const w1=`
|
|
47
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function e2(e,t,n,r){const o=r.schema,i=o.space==="svg"?!1:r.settings.omitOptionalTags;let a=o.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const s=[];let l;o.space==="html"&&e.tagName==="svg"&&(r.schema=Rr);const c=t2(r,e.properties),d=r.all(o.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=o,d&&(a=!1),(c||!i||!Yk(e,t,n))&&(s.push("<",e.tagName,c?" "+c:""),a&&(o.space==="svg"||r.settings.closeSelfClosing)&&(l=c.charAt(c.length-1),(!r.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&s.push(" "),s.push("/")),s.push(">")),s.push(d),!a&&(!i||!Vd(e,t,n))&&s.push("</"+e.tagName+">"),s.join("")}function t2(e,t){const n=[];let r=-1,o;if(t){for(o in t)if(t[o]!==null&&t[o]!==void 0){const i=n2(e,o,t[o]);i&&n.push(i)}}for(;++r<n.length;){const i=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&i!=='"'&&i!=="'"&&(n[r]+=" ")}return n.join("")}function n2(e,t,n){const r=Qa(e.schema,t),o=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,i=e.settings.allowDangerousCharacters?0:1;let a=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const l=li(r.attribute,Object.assign({},e.settings.characterReferences,{subset:gs.name[o][i]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?ql:Wl)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?l:(e.settings.preferUnquoted&&(s=li(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:gs.unquoted[o][i]}))),s!==n&&(e.settings.quoteSmart&&al(n,a)>al(n,e.alternative)&&(a=e.alternative),s=a+li(n,Object.assign({},e.settings.characterReferences,{subset:(a==="'"?gs.single:gs.double)[o][i],attribute:!0}))+a),l+(s&&"="+s))}const r2=["<","&"];function X0(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:li(e.value,Object.assign({},r.settings.characterReferences,{subset:r2}))}function o2(e,t,n,r){return r.settings.allowDangerousHtml?e.value:X0(e,t,n,r)}function i2(e,t,n,r){return r.all(e)}const a2=Gl("type",{invalid:s2,unknown:l2,handlers:{comment:Nk,doctype:Pk,element:e2,raw:o2,root:i2,text:X0}});function s2(e){throw new Error("Expected node, not `"+e+"`")}function l2(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const c2={},u2={},d2=[];function h2(e,t){const n=c2,r=n.quote||'"',o=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:p2,all:f2,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||B0,characterReferences:n.characterReferences||u2,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?Rr:vi,quote:r,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function p2(e,t,n){return a2(e,t,n,this)}function f2(e){const t=[],n=e&&e.children||d2;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function m2(e){return Array.isArray(e)?e:[e]}function Vl(e,t=!1){const n=e.split(/(\r?\n)/g);let r=0;const o=[];for(let i=0;i<n.length;i+=2){const a=t?n[i]+(n[i+1]||""):n[i];o.push([a,r]),r+=n[i].length,r+=n[i+1]?.length||0}return o}function Yd(e){return!e||["plaintext","txt","text","plain"].includes(e)}function J0(e){return e==="ansi"||Yd(e)}function Kd(e){return e==="none"}function Z0(e){return Kd(e)}function ey(e,t){var r;if(!t)return e;e.properties||(e.properties={}),(r=e.properties).class||(r.class=[]),typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const o of n)o&&!e.properties.class.includes(o)&&e.properties.class.push(o);return e}function g2(e,t){let n=0;const r=[];for(const o of t)o>n&&r.push({...e,content:e.content.slice(n,o),offset:e.offset+n}),n=o;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function y2(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((r,o)=>r-o);return n.length?e.map(r=>r.flatMap(o=>{const i=n.filter(a=>o.offset<a&&a<o.offset+o.content.length).map(a=>a-o.offset).sort((a,s)=>a-s);return i.length?g2(o,i):o})):e}async function ty(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function sl(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[o,i]of Object.entries(t?.colorReplacements||{}))typeof i=="string"?n[o]=i:o===r&&Object.assign(n,i);return n}function uo(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function ny(e){const t={};return e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle&&(e.fontStyle&_r.Italic&&(t["font-style"]="italic"),e.fontStyle&_r.Bold&&(t["font-weight"]="bold"),e.fontStyle&_r.Underline&&(t["text-decoration"]="underline")),t}function b2(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}function E2(e){const t=Vl(e,!0).map(([o])=>o);function n(o){if(o===e.length)return{line:t.length-1,character:t[t.length-1].length};let i=o,a=0;for(const s of t){if(i<s.length)break;i-=s.length,a++}return{line:a,character:i}}function r(o,i){let a=0;for(let s=0;s<o;s++)a+=t[s].length;return a+=i,a}return{lines:t,indexToPos:n,posToIndex:r}}class cn extends Error{constructor(t){super(t),this.name="ShikiError"}}const ry=new WeakMap;function Yl(e,t){ry.set(e,t)}function Pa(e){return ry.get(e)}class Si{constructor(...t){G(this,"_stacks",{});G(this,"lang");if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,o]=t;this.lang=r,this._stacks={[o]:n}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new Si(Object.fromEntries(m2(n).map(r=>[r,Pu])),t)}getInternalStack(t=this.theme){return this._stacks[t]}get scopes(){return uf(this._stacks[this.theme])}getScopes(t=this.theme){return uf(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.scopes}}}function uf(e){const t=[],n=new Set;function r(o){if(n.has(o))return;n.add(o);const i=o?.nameScopesList?.scopeName;i&&t.push(i),o.parent&&r(o.parent)}return r(e),t}function T2(e,t){if(!(e instanceof Si))throw new cn("Invalid grammar state");return e.getInternalStack(t)}function x2(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let r=function(a){if(typeof a=="number"){if(a<0||a>n.source.length)throw new cn(`Invalid decoration offset: ${a}. Code length: ${n.source.length}`);return{...o.indexToPos(a),offset:a}}else{const s=o.lines[a.line];if(s===void 0)throw new cn(`Invalid decoration position ${JSON.stringify(a)}. Lines length: ${o.lines.length}`);if(a.character<0||a.character>s.length)throw new cn(`Invalid decoration position ${JSON.stringify(a)}. Line ${a.line} length: ${s.length}`);return{...a,offset:o.posToIndex(a.line,a.character)}}};const o=E2(n.source),i=(n.options.decorations||[]).map(a=>({...a,start:r(a.start),end:r(a.end)}));C2(i),e.set(n.meta,{decorations:i,converter:o,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(!this.options.decorations?.length)return;const r=t(this).decorations.flatMap(o=>[o.start.offset,o.end.offset]);return y2(n,r)},code(n){if(!this.options.decorations?.length)return;const r=t(this),o=Array.from(n.children).filter(d=>d.type==="element"&&d.tagName==="span");if(o.length!==r.converter.lines.length)throw new cn(`Number of lines in code element (${o.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function i(d,u,h,p){const g=o[d];let b="",T=-1,E=-1;if(u===0&&(T=0),h===0&&(E=0),h===Number.POSITIVE_INFINITY&&(E=g.children.length),T===-1||E===-1)for(let x=0;x<g.children.length;x++)b+=oy(g.children[x]),T===-1&&b.length===u&&(T=x+1),E===-1&&b.length===h&&(E=x+1);if(T===-1)throw new cn(`Failed to find start index for decoration ${JSON.stringify(p.start)}`);if(E===-1)throw new cn(`Failed to find end index for decoration ${JSON.stringify(p.end)}`);const C=g.children.slice(T,E);if(!p.alwaysWrap&&C.length===g.children.length)s(g,p,"line");else if(!p.alwaysWrap&&C.length===1&&C[0].type==="element")s(C[0],p,"token");else{const x={type:"element",tagName:"span",properties:{},children:C};s(x,p,"wrapper"),g.children.splice(T,C.length,x)}}function a(d,u){o[d]=s(o[d],u,"line")}function s(d,u,h){const p=u.properties||{},g=u.transform||(b=>b);return d.tagName=u.tagName||"span",d.properties={...d.properties,...p,class:d.properties.class},u.properties?.class&&ey(d,u.properties.class),d=g(d,h)||d,d}const l=[],c=r.decorations.sort((d,u)=>u.start.offset-d.start.offset);for(const d of c){const{start:u,end:h}=d;if(u.line===h.line)i(u.line,u.character,h.character,d);else if(u.line<h.line){i(u.line,u.character,Number.POSITIVE_INFINITY,d);for(let p=u.line+1;p<h.line;p++)l.unshift(()=>a(p,d));i(h.line,0,h.character,d)}}l.forEach(d=>d())}}}function C2(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new cn(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const o=e[r],i=n.start.offset<o.start.offset&&o.start.offset<n.end.offset,a=n.start.offset<o.end.offset&&o.end.offset<n.end.offset,s=o.start.offset<n.start.offset&&n.start.offset<o.end.offset,l=o.start.offset<n.end.offset&&n.end.offset<o.end.offset;if(i||a||s||l){if(a&&a||s&&l)continue;throw new cn(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(o.start)} intersect.`)}}}}function oy(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(oy).join(""):""}const v2=[x2()];function ll(e){return[...e.transformers||[],...v2]}var ho=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Fc={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function S2(e,t){const n=e.indexOf("\x1B[",t);if(n!==-1){const r=e.indexOf("m",n);return{sequence:e.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:e.length}}function df(e,t){let n=1;const r=e[t+n++];let o;if(r==="2"){const i=[e[t+n++],e[t+n++],e[t+n]].map(a=>Number.parseInt(a));i.length===3&&!i.some(a=>Number.isNaN(a))&&(o={type:"rgb",rgb:i})}else if(r==="5"){const i=Number.parseInt(e[t+n]);Number.isNaN(i)||(o={type:"table",index:Number(i)})}return[n,o]}function A2(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n],o=Number.parseInt(r);if(!Number.isNaN(o))if(o===0)t.push({type:"resetAll"});else if(o<=9)Fc[o]&&t.push({type:"setDecoration",value:Fc[o]});else if(o<=29){const i=Fc[o-20];i&&t.push({type:"resetDecoration",value:i})}else if(o<=37)t.push({type:"setForegroundColor",value:{type:"named",name:ho[o-30]}});else if(o===38){const[i,a]=df(e,n);a&&t.push({type:"setForegroundColor",value:a}),n+=i}else if(o===39)t.push({type:"resetForegroundColor"});else if(o<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:ho[o-40]}});else if(o===48){const[i,a]=df(e,n);a&&t.push({type:"setBackgroundColor",value:a}),n+=i}else o===49?t.push({type:"resetBackgroundColor"}):o>=90&&o<=97?t.push({type:"setForegroundColor",value:{type:"named",name:ho[o-90+8]}}):o>=100&&o<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:ho[o-100+8]}})}return t}function k2(){let e=null,t=null,n=new Set;return{parse(r){const o=[];let i=0;do{const a=S2(r,i),s=a.sequence?r.substring(i,a.startPosition):r.substring(i);if(s.length>0&&o.push({value:s,foreground:e,background:t,decorations:new Set(n)}),a.sequence){const l=A2(a.sequence);for(const c of l)c.type==="resetAll"?(e=null,t=null,n.clear()):c.type==="resetForegroundColor"?e=null:c.type==="resetBackgroundColor"?t=null:c.type==="resetDecoration"&&n.delete(c.value);for(const c of l)c.type==="setForegroundColor"?e=c.value:c.type==="setBackgroundColor"?t=c.value:c.type==="setDecoration"&&n.add(c.value)}i=a.position}while(i<r.length);return o}}}var _2={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function D2(e=_2){function t(s){return e[s]}function n(s){return`#${s.map(l=>Math.max(0,Math.min(l,255)).toString(16).padStart(2,"0")).join("")}`}let r;function o(){if(r)return r;r=[];for(let c=0;c<ho.length;c++)r.push(t(ho[c]));let s=[0,95,135,175,215,255];for(let c=0;c<6;c++)for(let d=0;d<6;d++)for(let u=0;u<6;u++)r.push(n([s[c],s[d],s[u]]));let l=8;for(let c=0;c<24;c++,l+=10)r.push(n([l,l,l]));return r}function i(s){return o()[s]}function a(s){switch(s.type){case"named":return t(s.name);case"rgb":return n(s.rgb);case"table":return i(s.index)}}return{value:a}}function I2(e,t,n){const r=sl(e,n),o=Vl(t),i=D2(Object.fromEntries(ho.map(s=>[s,e.colors?.[`terminal.ansi${s[0].toUpperCase()}${s.substring(1)}`]]))),a=k2();return o.map(s=>a.parse(s[0]).map(l=>{let c,d;l.decorations.has("reverse")?(c=l.background?i.value(l.background):e.bg,d=l.foreground?i.value(l.foreground):e.fg):(c=l.foreground?i.value(l.foreground):e.fg,d=l.background?i.value(l.background):void 0),c=uo(c,r),d=uo(d,r),l.decorations.has("dim")&&(c=w2(c));let u=_r.None;return l.decorations.has("bold")&&(u|=_r.Bold),l.decorations.has("italic")&&(u|=_r.Italic),l.decorations.has("underline")&&(u|=_r.Underline),{content:l.value,offset:s[1],color:c,bgColor:d,fontStyle:u}}))}function w2(e){const t=e.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(t)if(t[3]){const r=Math.round(Number.parseInt(t[3],16)/2).toString(16).padStart(2,"0");return`#${t[1]}${t[2]}${r}`}else return t[2]?`#${t[1]}${t[2]}80`:`#${Array.from(t[1]).map(r=>`${r}${r}`).join("")}80`;const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function Qd(e,t,n={}){const{lang:r="text",theme:o=e.getLoadedThemes()[0]}=n;if(Yd(r)||Kd(o))return Vl(t).map(l=>[{content:l[0],offset:l[1]}]);const{theme:i,colorMap:a}=e.setTheme(o);if(r==="ansi")return I2(i,t,n);const s=e.getLanguage(r);if(n.grammarState){if(n.grammarState.lang!==s.name)throw new wr(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${s.name}"`);if(!n.grammarState.themes.includes(i.name))throw new wr(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return P2(t,s,i,a,n)}function N2(...e){if(e.length===2)return Pa(e[1]);const[t,n,r={}]=e,{lang:o="text",theme:i=t.getLoadedThemes()[0]}=r;if(Yd(o)||Kd(i))throw new wr("Plain language does not have grammar state");if(o==="ansi")throw new wr("ANSI language does not have grammar state");const{theme:a,colorMap:s}=t.setTheme(i),l=t.getLanguage(o);return new Si(cl(n,l,a,s,r).stateStack,l.name,a.name)}function P2(e,t,n,r,o){const i=cl(e,t,n,r,o),a=new Si(cl(e,t,n,r,o).stateStack,t.name,n.name);return Yl(i.tokens,a),i.tokens}function cl(e,t,n,r,o){const i=sl(n,o),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:s=500}=o,l=Vl(e);let c=o.grammarState?T2(o.grammarState,n.name)??Pu:o.grammarContextCode!=null?cl(o.grammarContextCode,t,n,r,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:Pu,d=[];const u=[];for(let h=0,p=l.length;h<p;h++){const[g,b]=l[h];if(g===""){d=[],u.push([]);continue}if(a>0&&g.length>=a){d=[],u.push([{content:g,offset:b,color:"",fontStyle:0}]);continue}let T,E,C;o.includeExplanation&&(T=t.tokenizeLine(g,c),E=T.tokens,C=0);const x=t.tokenizeLine2(g,c,s),k=x.tokens.length/2;for(let w=0;w<k;w++){const S=x.tokens[2*w],B=w+1<k?x.tokens[2*w+2]:g.length;if(S===B)continue;const W=x.tokens[2*w+1],U=uo(r[fi.getForeground(W)],i),y=fi.getFontStyle(W),R={content:g.substring(S,B),offset:b+S,color:U,fontStyle:y};if(o.includeExplanation){const F=[];if(o.includeExplanation!=="scopeName")for(const z of n.settings){let X;switch(typeof z.scope){case"string":X=z.scope.split(/,/).map(Z=>Z.trim());break;case"object":X=z.scope;break;default:continue}F.push({settings:z,selectors:X.map(Z=>Z.split(/ /))})}R.explanation=[];let M=0;for(;S+M<B;){const z=E[C],X=g.substring(z.startIndex,z.endIndex);M+=X.length,R.explanation.push({content:X,scopes:o.includeExplanation==="scopeName"?R2(z.scopes):L2(F,z.scopes)}),C+=1}}d.push(R)}u.push(d),d=[],c=x.ruleStack}return{tokens:u,stateStack:c}}function R2(e){return e.map(t=>({scopeName:t}))}function L2(e,t){const n=[];for(let r=0,o=t.length;r<o;r++){const i=t[r];n[r]={scopeName:i,themeMatches:M2(e,i,t.slice(0,r))}}return n}function hf(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function O2(e,t,n){if(!hf(e[e.length-1],t))return!1;let r=e.length-2,o=n.length-1;for(;r>=0&&o>=0;)hf(e[r],n[o])&&(r-=1),o-=1;return r===-1}function M2(e,t,n){const r=[];for(const{selectors:o,settings:i}of e)for(const a of o)if(O2(a,t,n)){r.push(i);break}return r}function iy(e,t,n){const r=Object.entries(n.themes).filter(l=>l[1]).map(l=>({color:l[0],theme:l[1]})),o=r.map(l=>{const c=Qd(e,t,{...n,theme:l.theme}),d=Pa(c),u=typeof l.theme=="string"?l.theme:l.theme.name;return{tokens:c,state:d,theme:u}}),i=F2(...o.map(l=>l.tokens)),a=i[0].map((l,c)=>l.map((d,u)=>{const h={content:d.content,variants:{},offset:d.offset};return"includeExplanation"in n&&n.includeExplanation&&(h.explanation=d.explanation),i.forEach((p,g)=>{const{content:b,explanation:T,offset:E,...C}=p[c][u];h.variants[r[g].color]=C}),h})),s=o[0].state?new Si(Object.fromEntries(o.map(l=>[l.theme,l.state?.getInternalStack(l.theme)])),o[0].state.lang):void 0;return s&&Yl(a,s),a}function F2(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const o=e.map(l=>l[r]),i=t.map(()=>[]);t.forEach((l,c)=>l.push(i[c]));const a=o.map(()=>0),s=o.map(l=>l[0]);for(;s.every(l=>l);){const l=Math.min(...s.map(c=>c.content.length));for(let c=0;c<n;c++){const d=s[c];d.content.length===l?(i[c].push(d),a[c]+=1,s[c]=o[c][a[c]]):(i[c].push({...d,content:d.content.slice(0,l)}),s[c]={...d,content:d.content.slice(l),offset:d.offset+l})}}}return t}function ul(e,t,n){let r,o,i,a,s,l;if("themes"in n){const{defaultColor:c="light",cssVariablePrefix:d="--shiki-"}=n,u=Object.entries(n.themes).filter(T=>T[1]).map(T=>({color:T[0],theme:T[1]})).sort((T,E)=>T.color===c?-1:E.color===c?1:0);if(u.length===0)throw new wr("`themes` option must not be empty");const h=iy(e,t,n);if(l=Pa(h),c&&!u.find(T=>T.color===c))throw new wr(`\`themes\` option must contain the defaultColor key \`${c}\``);const p=u.map(T=>e.getTheme(T.theme)),g=u.map(T=>T.color);i=h.map(T=>T.map(E=>B2(E,g,d,c))),l&&Yl(i,l);const b=u.map(T=>sl(T.theme,n));o=u.map((T,E)=>(E===0&&c?"":`${d+T.color}:`)+(uo(p[E].fg,b[E])||"inherit")).join(";"),r=u.map((T,E)=>(E===0&&c?"":`${d+T.color}-bg:`)+(uo(p[E].bg,b[E])||"inherit")).join(";"),a=`shiki-themes ${p.map(T=>T.name).join(" ")}`,s=c?void 0:[o,r].join(";")}else if("theme"in n){const c=sl(n.theme,n);i=Qd(e,t,n);const d=e.getTheme(n.theme);r=uo(d.bg,c),o=uo(d.fg,c),a=d.name,l=Pa(i)}else throw new wr("Invalid options, either `theme` or `themes` must be provided");return{tokens:i,fg:o,bg:r,themeName:a,rootStyle:s,grammarState:l}}function B2(e,t,n,r){const o={content:e.content,explanation:e.explanation,offset:e.offset},i=t.map(l=>ny(e.variants[l])),a=new Set(i.flatMap(l=>Object.keys(l))),s={};return i.forEach((l,c)=>{for(const d of a){const u=l[d]||"inherit";if(c===0&&r)s[d]=u;else{const h=d==="color"?"":d==="background-color"?"-bg":`-${d}`,p=n+t[c]+(d==="color"?"":h);s[p]=u}}}),o.htmlStyle=s,o}function dl(e,t,n,r={meta:{},options:n,codeToHast:(o,i)=>dl(e,o,i),codeToTokens:(o,i)=>ul(e,o,i)}){let o=t;for(const p of ll(n))o=p.preprocess?.call(r,o,n)||o;let{tokens:i,fg:a,bg:s,themeName:l,rootStyle:c,grammarState:d}=ul(e,o,n);const{mergeWhitespaces:u=!0}=n;u===!0?i=H2(i):u==="never"&&(i=U2(i));const h={...r,get source(){return o}};for(const p of ll(n))i=p.tokens?.call(h,i)||i;return j2(i,{...n,fg:a,bg:s,themeName:l,rootStyle:c},h,d)}function j2(e,t,n,r=Pa(e)){const o=ll(t),i=[],a={type:"root",children:[]},{structure:s="classic",tabindex:l="0"}=t;let c={type:"element",tagName:"pre",properties:{class:`shiki ${t.themeName||""}`,style:t.rootStyle||`background-color:${t.bg};color:${t.fg}`,...l!==!1&&l!=null?{tabindex:l.toString()}:{},...Object.fromEntries(Array.from(Object.entries(t.meta||{})).filter(([g])=>!g.startsWith("_")))},children:[]},d={type:"element",tagName:"code",properties:{},children:i};const u=[],h={...n,structure:s,addClassToHast:ey,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return a},get pre(){return c},get code(){return d},get lines(){return u}};if(e.forEach((g,b)=>{b&&(s==="inline"?a.children.push({type:"element",tagName:"br",properties:{},children:[]}):s==="classic"&&i.push({type:"text",value:`
|
|
48
|
+
`}));let T={type:"element",tagName:"span",properties:{class:"line"},children:[]},E=0;for(const C of g){let x={type:"element",tagName:"span",properties:{...C.htmlAttrs},children:[{type:"text",value:C.content}]};C.htmlStyle;const k=b2(C.htmlStyle||ny(C));k&&(x.properties.style=k);for(const w of o)x=w?.span?.call(h,x,b+1,E,T,C)||x;s==="inline"?a.children.push(x):s==="classic"&&T.children.push(x),E+=C.content.length}if(s==="classic"){for(const C of o)T=C?.line?.call(h,T,b+1)||T;u.push(T),i.push(T)}}),s==="classic"){for(const g of o)d=g?.code?.call(h,d)||d;c.children.push(d);for(const g of o)c=g?.pre?.call(h,c)||c;a.children.push(c)}let p=a;for(const g of o)p=g?.root?.call(h,p)||p;return r&&Yl(p,r),p}function H2(e){return e.map(t=>{const n=[];let r="",o=0;return t.forEach((i,a)=>{const s=!(i.fontStyle&&i.fontStyle&_r.Underline);s&&i.content.match(/^\s+$/)&&t[a+1]?(o||(o=i.offset),r+=i.content):r?(s?n.push({...i,offset:o,content:r+i.content}):n.push({content:r,offset:o},i),o=0,r=""):n.push(i)}),n})}function U2(e){return e.map(t=>t.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const r=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return n;const[,o,i,a]=r;if(!o&&!a)return n;const s=[{...n,offset:n.offset+o.length,content:i}];return o&&s.unshift({content:o,offset:n.offset}),a&&s.push({content:a,offset:n.offset+o.length+i.length}),s}))}function z2(e,t,n){const r={meta:{},options:n,codeToHast:(i,a)=>dl(e,i,a),codeToTokens:(i,a)=>ul(e,i,a)};let o=h2(dl(e,t,n,r));for(const i of ll(n))o=i.postprocess?.call(r,o,n)||o;return o}const pf={light:"#333333",dark:"#bbbbbb"},ff={light:"#fffffe",dark:"#1e1e1e"},mf="__shiki_resolved";function Xd(e){if(e?.[mf])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||(t.type="dark"),t.colorReplacements={...t.colorReplacements},t.settings||(t.settings=[]);let{bg:n,fg:r}=t;if(!n||!r){const s=t.settings?t.settings.find(l=>!l.name&&!l.scope):void 0;s?.settings?.foreground&&(r=s.settings.foreground),s?.settings?.background&&(n=s.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?pf.light:pf.dark),n||(n=t.type==="light"?ff.light:ff.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let o=0;const i=new Map;function a(s){if(i.has(s))return i.get(s);o+=1;const l=`#${o.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${l}`]?a(s):(i.set(s,l),l)}t.settings=t.settings.map(s=>{const l=s.settings?.foreground&&!s.settings.foreground.startsWith("#"),c=s.settings?.background&&!s.settings.background.startsWith("#");if(!l&&!c)return s;const d={...s,settings:{...s.settings}};if(l){const u=a(s.settings.foreground);t.colorReplacements[u]=s.settings.foreground,d.settings.foreground=u}if(c){const u=a(s.settings.background);t.colorReplacements[u]=s.settings.background,d.settings.background=u}return d});for(const s of Object.keys(t.colors||{}))if((s==="editor.foreground"||s==="editor.background"||s.startsWith("terminal.ansi"))&&!t.colors[s]?.startsWith("#")){const l=a(t.colors[s]);t.colorReplacements[l]=t.colors[s],t.colors[s]=l}return Object.defineProperty(t,mf,{enumerable:!1,writable:!1,value:!0}),t}async function ay(e){return Array.from(new Set((await Promise.all(e.filter(t=>!J0(t)).map(async t=>await ty(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function sy(e){return(await Promise.all(e.map(async t=>Z0(t)?null:Xd(await ty(t))))).filter(t=>!!t)}class $2 extends rk{constructor(n,r,o,i={}){super(n);G(this,"_resolvedThemes",new Map);G(this,"_resolvedGrammars",new Map);G(this,"_langMap",new Map);G(this,"_langGraph",new Map);G(this,"_textmateThemeCache",new WeakMap);G(this,"_loadedThemesCache",null);G(this,"_loadedLanguagesCache",null);this._resolver=n,this._themes=r,this._langs=o,this._alias=i,this._themes.map(a=>this.loadTheme(a)),this.loadLanguages(this._langs)}getTheme(n){return typeof n=="string"?this._resolvedThemes.get(n):this.loadTheme(n)}loadTheme(n){const r=Xd(n);return r.name&&(this._resolvedThemes.set(r.name,r),this._loadedThemesCache=null),r}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(n){let r=this._textmateThemeCache.get(n);r||(r=tl.createFromRawTheme(n),this._textmateThemeCache.set(n,r)),this._syncRegistry.setTheme(r)}getGrammar(n){if(this._alias[n]){const r=new Set([n]);for(;this._alias[n];){if(n=this._alias[n],r.has(n))throw new cn(`Circular alias \`${Array.from(r).join(" -> ")} -> ${n}\``);r.add(n)}}return this._resolvedGrammars.get(n)}loadLanguage(n){if(this.getGrammar(n.name))return;const r=new Set([...this._langMap.values()].filter(a=>a.embeddedLangsLazy?.includes(n.name)));this._resolver.addLanguage(n);const o={balancedBracketSelectors:n.balancedBracketSelectors||["*"],unbalancedBracketSelectors:n.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(n.scopeName,n);const i=this.loadGrammarWithConfiguration(n.scopeName,1,o);if(i.name=n.name,this._resolvedGrammars.set(n.name,i),n.aliases&&n.aliases.forEach(a=>{this._alias[a]=n.name}),this._loadedLanguagesCache=null,r.size)for(const a of r)this._resolvedGrammars.delete(a.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(a.scopeName),this._syncRegistry?._grammars?.delete(a.scopeName),this.loadLanguage(this._langMap.get(a.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(n){for(const i of n)this.resolveEmbeddedLanguages(i);const r=Array.from(this._langGraph.entries()),o=r.filter(([i,a])=>!a);if(o.length){const i=r.filter(([a,s])=>s&&s.embeddedLangs?.some(l=>o.map(([c])=>c).includes(l))).filter(a=>!o.includes(a));throw new cn(`Missing languages ${o.map(([a])=>`\`${a}\``).join(", ")}, required by ${i.map(([a])=>`\`${a}\``).join(", ")}`)}for(const[i,a]of r)this._resolver.addLanguage(a);for(const[i,a]of r)this.loadLanguage(a)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(n){if(this._langMap.set(n.name,n),this._langGraph.set(n.name,n),n.embeddedLangs)for(const r of n.embeddedLangs)this._langGraph.set(r,this._langMap.get(r))}}class G2{constructor(t,n){G(this,"_langs",new Map);G(this,"_scopeToLang",new Map);G(this,"_injections",new Map);G(this,"_onigLib");this._onigLib={createOnigScanner:r=>t.createScanner(r),createOnigString:r=>t.createString(r)},n.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(n=>{this._langs.set(n,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)})}getInjections(t){const n=t.split(".");let r=[];for(let o=1;o<=n.length;o++){const i=n.slice(0,o).join(".");r=[...r,...this._injections.get(i)||[]]}return r}}let $i=0;function q2(e){$i+=1,e.warnings!==!1&&$i>=10&&$i%10===0&&console.warn(`[Shiki] ${$i} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new cn("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(Xd),o=new G2(e.engine,n),i=new $2(o,r,n,e.langAlias);let a;function s(C){T();const x=i.getGrammar(typeof C=="string"?C:C.name);if(!x)throw new cn(`Language \`${C}\` not found, you may need to load it first`);return x}function l(C){if(C==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};T();const x=i.getTheme(C);if(!x)throw new cn(`Theme \`${C}\` not found, you may need to load it first`);return x}function c(C){T();const x=l(C);a!==C&&(i.setTheme(x),a=C);const k=i.getColorMap();return{theme:x,colorMap:k}}function d(){return T(),i.getLoadedThemes()}function u(){return T(),i.getLoadedLanguages()}function h(...C){T(),i.loadLanguages(C.flat(1))}async function p(...C){return h(await ay(C))}function g(...C){T();for(const x of C.flat(1))i.loadTheme(x)}async function b(...C){return T(),g(await sy(C))}function T(){if(t)throw new cn("Shiki instance has been disposed")}function E(){t||(t=!0,i.dispose(),$i-=1)}return{setTheme:c,getTheme:l,getLanguage:s,getLoadedThemes:d,getLoadedLanguages:u,loadLanguage:p,loadLanguageSync:h,loadTheme:b,loadThemeSync:g,dispose:E,[Symbol.dispose]:E}}async function W2(e={}){e.loadWasm;const[t,n,r]=await Promise.all([sy(e.themes||[]),ay(e.langs||[]),e.engine||C0(e.loadWasm||yA())]);return q2({...e,themes:t,langs:n,engine:r})}async function V2(e={}){const t=await W2(e);return{getLastGrammarState:(...n)=>N2(t,...n),codeToTokensBase:(n,r)=>Qd(t,n,r),codeToTokensWithThemes:(n,r)=>iy(t,n,r),codeToTokens:(n,r)=>ul(t,n,r),codeToHast:(n,r)=>dl(t,n,r),codeToHtml:(n,r)=>z2(t,n,r),...t,getInternalContext:()=>t}}function Y2(e,t,n){let r,o,i;{const s=e;r=s.langs,o=s.themes,i=s.engine}async function a(s){function l(p){if(typeof p=="string"){if(J0(p))return[];const g=r[p];if(!g)throw new wr(`Language \`${p}\` is not included in this bundle. You may want to load it from external source.`);return g}return p}function c(p){if(Z0(p))return"none";if(typeof p=="string"){const g=o[p];if(!g)throw new wr(`Theme \`${p}\` is not included in this bundle. You may want to load it from external source.`);return g}return p}const d=(s.themes??[]).map(p=>c(p)),u=(s.langs??[]).map(p=>l(p)),h=await V2({engine:s.engine??i(),...s,themes:d,langs:u});return{...h,loadLanguage(...p){return h.loadLanguage(...p.map(l))},loadTheme(...p){return h.loadTheme(...p.map(c))}}}return a}const K2=Y2({langs:XS,themes:ZS,engine:()=>C0(Promise.resolve().then(()=>require("./wasm-DQxwEHae-Dw4u1m6u.cjs")))}),Bc={scopeName:"source.malloy",patterns:[{include:"#malloy-language"}],repository:{"malloy-language":{patterns:[{include:"#sql-string"},{include:"#comments"},{include:"#tags"},{include:"#strings"},{include:"#numbers"},{include:"#keywords"},{include:"#properties"},{include:"#functions"},{include:"#datetimes"},{include:"#identifiers-quoted"},{include:"#types"},{include:"#constants"},{include:"#timeframes"},{include:"#identifiers-unquoted"}]},"malloy-matched":{begin:"{",end:"}",patterns:[{include:"#malloy-matched"},{include:"#malloy-language"}]},"malloy-in-sql":{begin:"%{",name:"source.malloy-in-sql",end:"}%?",patterns:[{include:"#malloy-matched"},{include:"#malloy-language"}]},"sql-string":{patterns:[{begin:'(\\b[A-Za-z_][A-Za-z_0-9]*)(\\s*\\.\\s*)(sql)(\\s*\\(\\s*)(""")',end:'"""',beginCaptures:{1:{name:"variable.other"},3:{name:"keyword.control.sql"},5:{name:"punctuation.sql-block.open"}},endCaptures:{0:{name:"punctuation.sql-block.close"}},name:"source.sql",patterns:[{include:"#malloy-in-sql"},{include:"source.sql"}]}]},functions:{patterns:[{match:"(?i)\\b(count)(\\s*\\()(distinct)",captures:{1:{name:"entity.name.function"},3:{name:"entity.name.function.modifier"}}},{match:"(?i)\\b(AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE|UNGROUPED)(\\s*\\()",captures:{1:{name:"entity.name.function"}}},{match:"(?i)\\b([a-zA-Z_][a-zA-Z_0-9]*)(\\s*\\()",captures:{1:{name:"entity.name.function"}}},{match:"(?i)\\b([a-zA-Z_][a-zA-Z_0-9]*)(!)(timestamp|number|string|boolean|date)?(\\s*\\()",captures:{1:{name:"entity.name.function"},3:{name:"entity.name.type"}}}]},datetimes:{patterns:[{match:"(?i)@[0-9]{4}-[0-9]{2}-[0-9]{2}[ T][0-9]{2}:[0-9]{2}((:[0-9]{2})(([\\.,][0-9]+)(\\[[A-Za-z_/]+\\])?)?)?",name:"constant.numeric.timestamp"},{match:"(?i)@[0-9]{4}(-Q[1-4]|-[0-9]{2}(-[0-9]{2}(-WK)?)?)?",name:"constant.numeric.date"}]},"identifiers-quoted":{patterns:[{match:"`[^`]*`",name:"variable.other.quoted"}]},"identifiers-unquoted":{patterns:[{match:"(?i)\\b[A-Za-z_][A-Za-z_0-9]*\\b",name:"variable.other"}]},timeframes:{patterns:[{match:"(?i)\\b((year|quarter|month|week|day|hour|minute|second)s?)\\b",name:"keyword.other.timeframe"},{match:"(?i)\\b(day_of_year|day_of_month)\\b",name:"keyword.other.timeframe"}]},comments:{patterns:[{begin:"/\\*",end:"\\*/",beginCaptures:{0:{name:"punctuation.definition.comment.begin"}},endCaptures:{0:{name:"punctuation.definition.comment.end"}},name:"comment.block"},{begin:"//",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-slash"},{begin:"--",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-hyphen"}]},tags:{patterns:[{match:"##\\n",name:"string.quoted",captures:{0:{name:"string.quoted"}}},{begin:'#"',end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-slash"},{match:"#\\n",name:"string.quoted",captures:{0:{name:"string.quoted"}}},{begin:"#\\s",end:"\\n",beginCaptures:{0:{name:"support.type.property-name.json"}},name:"comment.line.double-slash",patterns:[{include:"#tag-values"}]},{begin:"##\\s",end:"\\n",beginCaptures:{0:{name:"support.type.property-name.json"}},name:"comment.line.double-slash",patterns:[{include:"#tag-values"}]},{begin:"#",end:"\\n",beginCaptures:{0:{name:"string.quoted"}},name:"string.quoted"}],repository:{"tag-values":{name:"support.type.property-name.json",match:'(-)?((?:[^\\s=#]+)|(?:"[^#]+"))(?:\\s*(=)\\s*((?:[^\\s=#]+)|(?:"[^#]+")))?',captures:{1:{name:"keyword.control.negate"},2:{name:"support.type.property-name.json"},3:{name:"keyword.operator.comparison.ts"},4:{name:"string.quoted"}}}}},strings:{patterns:[{begin:"'",end:"'",beginCaptures:{0:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.single",patterns:[{include:"#escapes"}]},{begin:'"',end:'"',beginCaptures:{0:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.double",patterns:[{include:"#escapes"}]},{begin:'"""',end:'"""',beginCaptures:{0:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},name:"string.quoted.triple"},{begin:"(?i)[r|/]'",end:"'",name:"string.regexp",patterns:[{include:"#regex-escapes"}]}],repository:{escapes:{name:"constant.character.escape",match:"\\\\(u[A-Fa-f0-9]{4}|.)",captures:{0:{name:"constant.character.escape"}}},"regex-escapes":{name:"constant.character.escape",match:"\\\\.",captures:{0:{name:"constant.character.escape"}}}}},numbers:{match:"(?i)(\\b((0|[1-9][0-9]*)(E[+-]?[0-9]+|\\.[0-9]*)?)|\\.[0-9]+)",name:"constant.numeric"},constants:{patterns:[{match:"(?i)\\bnull\\b",name:"constant.language.null"},{match:"(?i)\\btrue\\b",name:"constant.language.true"},{match:"(?i)\\bfalse\\b",name:"constant.language.false"}]},types:{patterns:[{match:"(?i)\\bstring\\b",name:"entity.name.type.string"},{match:"(?i)\\bnumber\\b",name:"entity.name.type.number"},{match:"(?i)\\bdate\\b",name:"entity.name.type.date"},{match:"(?i)\\btimestamp\\b",name:"entity.name.type.timestamp"},{match:"(?i)\\bboolean\\b",name:"entity.name.type.boolean"}]},properties:{patterns:[{match:"(?i)\\baccept\\b",name:"keyword.control.accept"},{match:"(?i)\\bselect\\b",name:"keyword.control.select"},{match:"(?i)\\bconnection\\b",name:"keyword.control.connection"},{match:"(?i)\\brun\\b",name:"keyword.control.run"},{match:"(?i)\\bextend\\b",name:"keyword.control.extend"},{match:"(?i)\\brefine\\b",name:"keyword.control.refine"},{match:"(?i)\\baggregate\\b",name:"keyword.control.aggregate"},{match:"(?i)\\bsample\\b",name:"keyword.control.sample"},{match:"(?i)\\bcalculate\\b",name:"keyword.control.calculate"},{match:"(?i)\\btimezone\\b",name:"keyword.control.timezone"},{match:"(?i)\\bdimension\\b",name:"keyword.control.dimension"},{match:"(?i)\\bexcept\\b",name:"keyword.control.except"},{match:"(?i)\\bsource\\b",name:"keyword.control.source"},{match:"(?i)\\bgroup_by\\b",name:"keyword.control.group_by"},{match:"(?i)\\bhaving\\b",name:"keyword.control.having"},{match:"(?i)\\bindex\\b",name:"keyword.control.index"},{match:"(?i)\\bjoin_one\\b",name:"keyword.control.join_one"},{match:"(?i)\\bwith\\b",name:"keyword.control.with"},{match:"(?i)\\bjoin_many\\b",name:"keyword.control.join_many"},{match:"(?i)\\bjoin_cross\\b",name:"keyword.control.join_cross"},{match:"(?i)\\blimit\\b",name:"keyword.control.limit"},{match:"(?i)\\bmeasure\\b",name:"keyword.control.measure"},{match:"(?i)\\bnest\\b",name:"keyword.control.nest"},{match:"(?i)\\border_by\\b",name:"keyword.control.order_by"},{match:"(?i)\\bpartition_by\\b",name:"keyword.control.partition_by"},{match:"(?i)\\bprimary_key\\b",name:"keyword.control.primary_key"},{match:"(?i)\\bproject\\b",name:"keyword.control.project"},{match:"(?i)\\bquery\\b",name:"keyword.control.query"},{match:"(?i)\\brename\\b",name:"keyword.control.rename"},{match:"(?i)\\btop\\b",name:"keyword.control.top"},{match:"(?i)\\bview\\b",name:"keyword.control.view"},{match:"(?i)\\bwhere\\b",name:"keyword.control.where"},{match:"(?i)\\bdeclare\\b",name:"keyword.control.declare"}]},keywords:{patterns:[{match:"(?i)\\bis\\b",name:"keyword.control.is"},{match:"(?i)\\bon\\b",name:"keyword.control.on"},{match:"(?i)\\bnot\\b",name:"keyword.other.not"},{match:"(?i)\\bor\\b",name:"keyword.other.or"},{match:"(?i)\\bdesc\\b",name:"keyword.control.desc"},{match:"(?i)\\bby\\b",name:"keyword.control.by"},{match:"(?i)\\band\\b",name:"keyword.other.and"},{match:"(?i)\\basc\\b",name:"keyword.control.asc"},{match:"(?i)\\bfor\\b",name:"keyword.other.for"},{match:"(?i)\\belse\\b",name:"keyword.other.else"},{match:"(?i)\\bto\\b",name:"keyword.other.to"},{match:"(?i)\\bwhen\\b",name:"keyword.other.when"},{match:"(?i)\\bpick\\b",name:"keyword.other.pick"},{match:"(?i)\\bimport\\b",name:"keyword.control.import"}]}}},Q2={...Bc,patterns:[...Bc.patterns,{include:"#docvar"}],repository:{...Bc.repository,docvar:{patterns:[{match:"\\<\\<[^(\\>\\>)]*\\>\\>",beginCaptures:{0:{name:"punctuation.definition.comment.begin"}},endCaptures:{0:{name:"punctuation.definition.comment.end"}},name:"markup.italic.markdown"}]}}},X2={name:"Malloy SQL",scopeName:"source.malloy-sql",patterns:[{include:"#malloysql-sql"}],repository:{"malloysql-sql":{beginCaptures:{0:{name:"entity.other.attribute.malloy-sql"},1:{name:"entity.other.attribute.malloy-sql"},3:{name:"comment.line.double-slash"}},name:"meta.embedded.block.malloysql.sql",patterns:[{include:"#comments"},{begin:"%{",end:"}%",beginCaptures:{0:{name:"punctuation.definition.malloy-sql"}},endCaptures:{0:{name:"punctuation.definition.malloy-sql"}},name:"meta.embedded.block.malloy",patterns:[{include:"source.malloy"}]},{include:"source.sql"}]},comments:{patterns:[{begin:"/\\*",end:"\\*/",beginCaptures:{0:{name:"punctuation.definition.comment.begin"}},endCaptures:{0:{name:"punctuation.definition.comment.end"}},name:"comment.block"},{begin:"//",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-slash"},{begin:"--",end:"\\n",beginCaptures:{0:{name:"punctuation.definition.comment"}},name:"comment.line.double-hyphen"}]}}},ly="catppuccin-latte",J2=K2({themes:[ly],langs:["sql","json","typescript",{name:"malloy",scopeName:"source.malloy",embeddedLangs:["sql"],...Q2},{name:"malloysql",scopeName:"source.malloy-sql",embeddedLangs:["sql"],...X2}]});async function Co(e,t){return(await J2).codeToHtml(e,{lang:t,theme:ly})}const $t=v.styled(v.Card)({display:"flex",flexDirection:"column",height:"100%"}),Dn=v.styled(v.CardContent)({display:"flex",flexDirection:"column",padding:"10px",flexGrow:1}),Kl=v.styled(v.CardMedia)({padding:"10px"}),cy=v.styled("div")({display:"flex",flexDirection:"column",height:"100%"});v.styled("div")({height:"30px",backgroundColor:"rgba(225, 240, 255, 1)",display:"flex",padding:"4px",alignItems:"center"});const uy=v.styled("div")({display:"flex",height:"75vh",width:"100%",overflowY:"auto"});v.styled("div")({position:"relative",height:"100%",flex:"0 0 auto"});const Z2=ct([f.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V5h14z"},"0"),f.jsx("path",{d:"M7 12h2v5H7zm8-5h2v10h-2zm-4 7h2v3h-2zm0-4h2v2h-2z"},"1")]),dy=O.createContext(void 0),hl=({projectName:e,packageName:t,versionId:n,children:r})=>f.jsx(dy.Provider,{value:{projectName:e,packageName:t,versionId:n},children:r});function yn(e=!0){const t=O.useContext(dy);if(!t&&e)throw new Error("usePackage must be used within a PackageProvider");return t}function In({error:e,context:t}){const n=e.data?.message||"Unknown Error";return f.jsxs(f.Fragment,{children:[t&&f.jsx(v.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:t}),f.jsx("pre",{style:{whiteSpace:"pre-wrap",color:"red",padding:"10px",margin:"auto"},children:n})]})}function Wn({text:e,size:t=20,color:n="primary",thickness:r=3.6,centered:o=!0,spacing:i=2,textVariant:a="body2"}){const s=f.jsxs(v.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:i},children:[f.jsx(v.CircularProgress,{size:t,color:n,thickness:r}),e&&f.jsx(v.Typography,{variant:a,color:"text.secondary",children:e})]});return o?f.jsx(v.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"200px",width:"100%"},children:s}):s}const hy=new bd.QueryClient({defaultOptions:{queries:{retry:!1,throwOnError:!1},mutations:{retry:!1,throwOnError:!1}}}),Jd=async(e,t)=>{const n=t?await t():void 0;return{baseURL:e,withCredentials:!n,headers:{Authorization:n&&`Bearer ${n}`}}};function wn(e){const{server:t,getAccessToken:n}=lh(),r={...e,queryKey:[...e.queryKey,t],queryFn:async()=>{try{const o=await Jd(t,n);return await e.queryFn(o)}catch(o){if(o&&typeof o=="object"&&"response"in o){const i=o;if(i.response?.data){const a=new Error(i.response.data.message||i.message);throw a.status=i.response.status,a.data=i.response.data,a}}throw o}},retry:!1,throwOnError:!1};return bd.useQuery(r,hy)}function e_(e){const{server:t,getAccessToken:n}=lh(),r={...e,mutationFn:async o=>{try{const i=await Jd(t,n);return await e.mutationFn(o,i)}catch(i){if(i&&typeof i=="object"&&"response"in i){const a=i;if(a.response?.data){const s=new Error(a.response.data.message||a.message);throw s.status=a.response.status,s.data=a.response.data,s}}throw i}},retry:!1,throwOnError:!1};return bd.useMutation(r,hy)}const t_=O.lazy(()=>Promise.resolve().then(()=>require("./RenderedResult-BAZuT25g-D9KeGh71.cjs"))),n_=new T0(new on);function py(e){const{optionalProjectName:t,optionalPackageName:n}=e;if(!t||!n)throw new Error("Project and Package name must be provided for query embedding.");return JSON.stringify({...e})}function r_({modelPath:e,query:t,sourceName:n,queryName:r,optionalProjectName:o,optionalPackageName:i,optionalVersionId:a}){const s=yn(!1),l=o||s?.projectName,c=i||s?.packageName,d=a||s?.versionId;if(!l||!c)throw new Error("No project or package name provided. Must be set in props or via PackageProvider");const{data:u,isSuccess:h,isError:p,error:g}=wn({queryKey:["queryResult",l,c,e,d,t,n,r],queryFn:b=>n_.executeQuery(l,c,e,t,n,r,d,b)});return f.jsxs(f.Fragment,{children:[!h&&!p&&f.jsx(Wn,{text:"Fetching Query Results..."}),h&&f.jsx(O.Suspense,{fallback:f.jsx("div",{children:"Loading..."}),children:f.jsx(t_,{result:u.data.result})}),p&&f.jsx(In,{context:`${l} > ${c} > ${e}`,error:g})]})}const fy=ct(f.jsx("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z"})),o_=O.lazy(()=>Promise.resolve().then(()=>require("./RenderedResult-BAZuT25g-D9KeGh71.cjs")));function my({result:e,minHeight:t,maxHeight:n}){const[r,o]=O.useState(!1),[i,a]=O.useState(0),[s,l]=O.useState(!1),c=O.useRef(null),d=O.useRef(null),[u,h]=O.useState(void 0),[p,g]=O.useState(!1),b=O.useCallback(()=>{const k=r;o(!r),k&&d.current&&setTimeout(()=>{d.current?.scrollIntoView({behavior:"smooth",block:"start"})},100)},[r]),T=O.useCallback(k=>{a(k)},[]);if(O.useEffect(()=>{if(p){l(!0);return}if(i===0){l(!1);return}const k=t-20,w=i>k;i<k&&h(i+20),l(w)},[i,p,t]),!e)return null;const E=f.jsx(Wn,{text:"Loading...",centered:!0,size:32}),C=p?r?n-40:t-40:void 0,x=u?{minHeight:`${u}px`,height:"100%"}:{height:"100%"};return f.jsx(f.Fragment,{children:f.jsxs(v.Box,{ref:d,sx:{position:"relative",minHeight:`${t}px`,maxHeight:`${r?n:t}px`,border:"0px",borderRadius:0,overflow:"hidden",display:"flex",flexDirection:"column",...x},children:[f.jsx(v.Box,{ref:c,sx:{flex:1,overflow:r?"auto":"hidden",p:0,pb:s?"40px":1},children:e&&f.jsx(O.Suspense,{fallback:E,children:f.jsx(o_,{result:e,height:C,isFillElement:k=>{g(k)},onSizeChange:T})})||E}),s&&f.jsx(v.Box,{sx:{position:"absolute",bottom:0,left:0,right:0,height:"32px",backgroundColor:"rgba(255,255,255,0.75)",display:"flex",alignItems:"center",justifyContent:"center"},children:f.jsx(v.IconButton,{size:"small",onClick:b,sx:{color:"text.secondary","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)"}},title:r?"Collapse to original size":"Expand to full size",children:r?f.jsx(Sa.ExpandLess,{sx:{fontSize:30}}):f.jsx(Sa.ExpandMore,{sx:{fontSize:30}})})})]})})}const i_=`
|
|
56
49
|
.code-display pre {
|
|
57
50
|
margin: 0;
|
|
58
51
|
padding: 0;
|
|
59
52
|
}
|
|
60
|
-
`;function
|
|
61
|
-
modelPath="${e}"
|
|
62
|
-
query="
|
|
63
|
-
${t}
|
|
64
|
-
"
|
|
65
|
-
/>`}function I1(e,t){return`<Notebook
|
|
53
|
+
`;function a_({cell:e,notebookPath:t,expandCodeCell:n,hideCodeCellIcon:r,expandEmbedding:o,hideEmbeddingIcon:i}){const[a,s]=O.useState(n),[l,c]=O.useState(o),[d,u]=O.useState(),[h,p]=O.useState(),[g,b]=O.useState(!1),{packageName:T,projectName:E}=yn(),C=py({modelPath:t,query:e.text,optionalPackageName:T,optionalProjectName:E});return O.useEffect(()=>{e.type==="code"&&Co(e.text,"malloy").then(x=>{u(x)})},[e]),O.useEffect(()=>{Co(C,"typescript").then(x=>{p(x)})},[C]),e.type==="markdown"&&f.jsx($t,{variant:"outlined",children:f.jsx(Dn,{children:f.jsx(Ed,{children:e.text})})})||e.type==="code"&&f.jsxs($t,{variant:"outlined",sx:{height:"auto"},children:[(!r||!i&&e.result)&&f.jsxs(v.Stack,{sx:{flexDirection:"row",justifyContent:"space-between",ml:"8px"},children:[f.jsxs(v.Stack,{sx:{flexDirection:"row"},children:[e.newSources&&e.newSources.length>0&&f.jsx(v.Typography,{variant:"overline",children:f.jsx("b",{children:"Data source"})}),e.result&&f.jsx(v.Typography,{variant:"overline",fontWeight:"bold",children:"Results"})]}),f.jsx(v.Stack,{sx:{flexDirection:"row"},children:f.jsxs(v.CardActions,{sx:{padding:"0px 8px 0px 8px",mb:"auto",mt:"auto"},children:[e.newSources&&e.newSources.length>0&&f.jsx(v.Tooltip,{title:"Explore Data Sources",children:f.jsx(v.IconButton,{size:"small",onClick:()=>{b(!g),c(!1),s(!1)},children:f.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M3 3h18v18H3V3zm2 2v14h14V5H5zm2 2h10v2H7V7zm0 4h10v2H7v-2zm0 4h10v2H7v-2z",fill:"currentColor"})})})}),!r&&f.jsx(v.Tooltip,{title:a?"Hide Code":"View Code",children:f.jsx(v.IconButton,{size:"small",onClick:()=>{s(!a)},children:f.jsx(fy,{})})}),!i&&e.result&&f.jsx(v.Tooltip,{title:l?"Hide Embedding":"View Embedding",children:f.jsx(v.IconButton,{size:"small",onClick:()=>{c(!l)},children:f.jsx(Wa,{})})})]})})]}),f.jsx(v.Collapse,{in:l,timeout:"auto",unmountOnExit:!0,children:f.jsxs(v.Stack,{sx:{p:"8px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:[f.jsx(v.Typography,{component:"div",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},dangerouslySetInnerHTML:{__html:h}}),f.jsx(v.Tooltip,{title:"Copy Embeddable Code",children:f.jsx(v.IconButton,{sx:{width:"24px",height:"24px"},onClick:()=>{navigator.clipboard.writeText(C)},children:f.jsx(Ul,{})})})]})}),f.jsxs(v.Collapse,{in:a,timeout:"auto",unmountOnExit:!0,children:[f.jsx("style",{children:i_}),f.jsx(v.Stack,{sx:{mx:"8px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:f.jsx("div",{className:"code-display",style:{fontSize:"12px",width:"800px",border:"1px solid rgb(220,220,220)"},dangerouslySetInnerHTML:{__html:d}})})]}),f.jsx(v.Collapse,{in:g,timeout:"auto",unmountOnExit:!0,sx:{p:"5px"},children:f.jsx(qy,{sourceAndPaths:e.newSources.map(x=>({sourceInfo:JSON.parse(x),modelPath:t}))})}),e.result&&!g&&f.jsx(f.Fragment,{children:f.jsx(my,{result:e.result,minHeight:300,maxHeight:700})})]})}const s_=new y0(new on);function gy({notebookPath:e,expandResults:t,hideResultIcons:n,expandEmbeddings:r,hideEmbeddingIcons:o}){const[i,a]=O.useState(!1),[s,l]=O.useState(),{projectName:c,packageName:d,versionId:u}=yn(),h=l_(e,!0);O.useEffect(()=>{Co(h,"typescript").then(E=>{l(E)})},[i,h]);const{data:p,isSuccess:g,isError:b,error:T}=wn({queryKey:["notebook",c,d,e,u],queryFn:async E=>(await s_.getNotebook(c,d,e,u,E)).data});return f.jsxs($t,{variant:"outlined",children:[f.jsxs(Dn,{children:[f.jsxs(v.Stack,{sx:{flexDirection:"row",justifyContent:"space-between"},children:[f.jsx(v.Typography,{variant:"overline",fontWeight:"bold",children:"Notebook"}),!o&&f.jsx(v.CardActions,{sx:{padding:"0px 10px 0px 10px",mb:"auto",mt:"auto"},children:f.jsx(v.Tooltip,{title:i?"Hide Embedding":"View Embedding",children:f.jsx(v.IconButton,{size:"small",onClick:()=>{a(!i)},children:f.jsx(Wa,{})})})})]}),f.jsx(v.Collapse,{in:i,timeout:"auto",unmountOnExit:!0,children:f.jsxs(v.Stack,{sx:{borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:[f.jsx(v.Typography,{sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:f.jsx("div",{dangerouslySetInnerHTML:{__html:s}})}),f.jsx(v.Tooltip,{title:"Copy Embeddable Code",children:f.jsx(v.IconButton,{sx:{width:"24px",height:"24px"},onClick:()=>{navigator.clipboard.writeText(h)},children:f.jsx(Ul,{})})})]})})]}),f.jsx(Kl,{children:f.jsxs(v.Stack,{spacing:2,component:"section",children:[!g&&!b&&f.jsx(Wn,{text:"Fetching Notebook..."}),g&&p.notebookCells?.map((E,C)=>f.jsx(a_,{cell:E,notebookPath:e,expandCodeCell:t,hideCodeCellIcon:n,expandEmbedding:r,hideEmbeddingIcon:o},C)),b&&T.status===404&&f.jsxs(v.Typography,{variant:"body2",children:[f.jsx("code",{children:`${c} > ${d} > ${e}`})," ","not found."]}),b&&T.status!==404&&f.jsx(In,{error:T,context:`${c} > ${d} > ${e}`})]})})]})}function l_(e,t){return`<Notebook
|
|
66
54
|
notebookPath="${e}"
|
|
67
55
|
expandCodeCells={${t}}
|
|
68
|
-
/>`}class Rp{makeKey(t,r){let n=`BROWSER_NOTEBOOK_STORAGE__${t.project}/${t.package}`;return r&&(n+=`/${r}`),n}listNotebooks(t){const r=this.makeKey(t),n=[];for(let o=0;o<localStorage.length;o++){const a=localStorage.key(o);if(a&&a.startsWith(r+"/")){const i=a.substring(r.length+1);n.push(i)}}return n}getNotebook(t,r){const n=this.makeKey(t,r),o=localStorage.getItem(n);if(o===null)throw new Error(`Notebook not found at path: ${r}`);return o}deleteNotebook(t,r){const n=this.makeKey(t,r);if(localStorage.getItem(n)===null)throw new Error(`Notebook not found at path: ${r}`);localStorage.removeItem(n)}saveNotebook(t,r,n){const o=this.makeKey(t,r);localStorage.setItem(o,n)}moveNotebook(t,r,n){const o=this.makeKey(t,r),a=this.makeKey(t,n),i=localStorage.getItem(o);if(i===null)throw new Error(`Notebook not found at path: ${r}`);localStorage.setItem(a,i),localStorage.removeItem(o)}}const j1=Ee(u.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"})),yn=fe.createStack({createStyledComponent:Te("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>$n({props:e,name:"MuiStack"})});function Fn(){const e=qs();return(t,r)=>{if(!r||!r.metaKey&&!r.ctrlKey&&!r.shiftKey&&r.button!==1){e(t);return}const n=new URL(t,window.location.href).href;(r.metaKey||r.ctrlKey||r.button===1||r.shiftKey)&&window.open(n,"_blank")}}class fo{constructor(t,r,n){R(this,"isSaved");R(this,"notebookStorage");R(this,"userContext");this.notebookData=n,this.notebookStorage=t,this.userContext=r,this.notebookData?this.isSaved=!0:(this.notebookData={models:[],cells:[],notebookPath:void 0},this.isSaved=!1)}getNotebookData(){return this.notebookData}getNotebookPath(){return this.notebookData.notebookPath}renameNotebook(t){if(this.notebookData.notebookPath!==t)try{this.notebookStorage.deleteNotebook(this.userContext,this.notebookData.notebookPath)}catch{}return this.notebookData.notebookPath=t,this.isSaved=!1,this.saveNotebook(),this}getCells(){return this.notebookData.cells}deleteCell(t){return this.notebookData.cells=[...this.notebookData.cells.slice(0,t),...this.notebookData.cells.slice(t+1)],this.isSaved=!1,this}insertCell(t,r){return this.notebookData.cells=[...this.notebookData.cells.slice(0,t),r,...this.notebookData.cells.slice(t)],this.isSaved=!1,this}setCell(t,r){return this.notebookData.cells[t]=r,this.isSaved=!1,this}setModels(t){return this.notebookData.models=t,this.isSaved=!1,this}getModels(){return this.notebookData.models}updateNotebookData(t){return this.notebookData=t,this.isSaved=!1,this}saveNotebook(){if(!this.isSaved){if(!this.notebookData.notebookPath)throw new Error("Notebook path is not set");this.notebookStorage.saveNotebook(this.userContext,this.notebookData.notebookPath,JSON.stringify(this.notebookData)),this.isSaved=!0}return new fo(this.notebookStorage,this.userContext,this.notebookData)}toMalloyNotebook(){return this.notebookData.cells.map(t=>t.isMarkdown?`>>>markdown
|
|
69
|
-
`+t.value:`>>>malloy
|
|
70
|
-
import {${t.sourceName}}" from '${t.modelPath}'"
|
|
71
|
-
`+t.value+`
|
|
72
|
-
`).join(`
|
|
73
|
-
`)}static newNotebook(t,r){return new fo(t,r,void 0)}static loadNotebook(t,r,n){let o;try{const a=t.getNotebook(r,n);a&&(o=JSON.parse(a))}catch{o={models:[],cells:[],notebookPath:n}}return new fo(t,r,o)}}const Mp=Ee(u.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"})),E1=new Nd(new ct);function T1(){const{projectName:e,packageName:t,versionId:r}=Ft(),{data:n,isSuccess:o,isError:a,error:i}=It({queryKey:["package",e,t,r],queryFn:s=>E1.getPackage(e,t,r,!1,s)});return u.jsx(tt,{variant:"outlined",sx:{width:"100%"},children:u.jsxs(kt,{children:[u.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Package Config"}),u.jsx(x.Divider,{}),u.jsx(x.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:u.jsxs(x.List,{dense:!0,disablePadding:!0,children:[u.jsx(x.ListItem,{dense:!0,disablePadding:!0,children:u.jsx(x.ListItemText,{primary:"Name",primaryTypographyProps:{fontWeight:"500"},secondary:t})}),!o&&!a&&u.jsx(x.ListItem,{children:u.jsx(zt,{text:"Fetching Package Metadata..."})}),o&&(n.data&&u.jsx(x.ListItem,{dense:!0,disablePadding:!0,children:u.jsx(x.ListItemText,{primary:"Description",primaryTypographyProps:{fontWeight:"500"},secondary:n.data.description})})||u.jsxs(x.ListItem,{disablePadding:!0,dense:!0,sx:{mt:"20px"},children:[u.jsx(Mp,{sx:{color:"grey.600",mr:"10px"}}),u.jsx(x.ListItemText,{primary:"No package manifest"})]})),a&&u.jsx(Pt,{error:i,context:`${e} > ${t} > ${r}`})]})})]})})}const R1=new Rd(new ct);function M1({connection:e}){return u.jsxs(x.TableRow,{children:[u.jsx(x.TableCell,{children:u.jsx(x.Typography,{variant:"body2",children:e.name})}),u.jsx(x.TableCell,{children:u.jsx(x.Typography,{variant:"body2",children:e.type})})]},e.name)}function N1(){const{projectName:e}=Ft(),{data:t,isSuccess:r,isError:n,error:o}=It({queryKey:["connections",e],queryFn:a=>R1.listConnections(e,a)});return u.jsx(tt,{variant:"outlined",sx:{width:"100%"},children:u.jsxs(kt,{children:[u.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Database Connections"}),u.jsx(x.Divider,{}),u.jsxs(x.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!r&&!n&&u.jsx(x.Typography,{variant:"body2",sx:{m:"auto"},children:"Fetching Connections..."}),r&&t.data.length>0&&u.jsx(x.Table,{size:"small",children:u.jsxs(x.TableBody,{children:[u.jsxs(x.TableRow,{children:[u.jsx(x.TableCell,{children:u.jsx(x.Typography,{variant:"subtitle2",fontWeight:"bold",children:"Connection Name"})}),u.jsx(x.TableCell,{children:u.jsx(x.Typography,{variant:"subtitle2",fontWeight:"bold",children:"Type"})})]}),t.data.map(a=>u.jsx(M1,{connection:a},a.name))]})}),r&&t.data.length===0&&u.jsx(x.Typography,{variant:"body2",children:"No Connections"}),n&&u.jsx(Pt,{error:o,context:`${e} > Connections`})]})]})})}const A1=new O0(new ct);function _1(){const{projectName:e,packageName:t,versionId:r}=Ft(),[n,o]=_.useState(!1),[a,i]=_.useState(null),s=g=>{i(g),o(!0)},l=()=>{o(!1),i(null)},{data:c,isError:d,error:p,isSuccess:h}=It({queryKey:["databases",e,t,r],queryFn:g=>A1.listDatabases(e,t,r,g)}),f=g=>g>=1024*1024*1024*1024?`${(g/(1024*1024*1024)).toFixed(2)} T`:g>=1024*1024*1024?`${(g/(1024*1024*1024)).toFixed(2)} G`:g>=1024*1024?`${(g/(1024*1024)).toFixed(2)} M`:`${(g/1024).toFixed(2)} K`;return u.jsxs(u.Fragment,{children:[u.jsx(tt,{variant:"outlined",sx:{width:"100%"},children:u.jsxs(kt,{children:[u.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Embedded Databases"}),u.jsx(x.Divider,{}),u.jsxs(x.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!h&&!d&&u.jsx(zt,{text:"Fetching Databases..."}),d&&u.jsx(Pt,{error:p,context:`${e} > ${t} > Databases`}),h&&c.data.length>0&&u.jsxs(x.Table,{size:"small",children:[u.jsx(x.TableHead,{children:u.jsxs(x.TableRow,{children:[u.jsx(x.TableCell,{children:"Name"}),u.jsx(x.TableCell,{align:"right",children:"Rows"})]})}),u.jsx(x.TableBody,{children:c.data.map(g=>u.jsxs(x.TableRow,{onClick:()=>s(g),sx:{cursor:"pointer"},children:[u.jsx(x.TableCell,{component:"th",scope:"row",children:g.path}),u.jsx(x.TableCell,{align:"right",children:f(g.info.rowCount)})]},g.path))})]}),h&&c.data.length===0&&u.jsx(x.Typography,{variant:"body2",sx:{m:"auto"},children:"No databases found"})]})]})}),u.jsxs(x.Dialog,{open:n,onClose:l,maxWidth:"sm",fullWidth:!0,children:[u.jsx(x.DialogTitle,{children:a?.path}),u.jsx(x.DialogContent,{children:a?.info?.columns&&u.jsx(x.TableContainer,{children:u.jsxs(x.Table,{size:"small",children:[u.jsx(x.TableHead,{children:u.jsxs(x.TableRow,{children:[u.jsx(x.TableCell,{children:"Column"}),u.jsx(x.TableCell,{children:"Type"})]})}),u.jsx(x.TableBody,{children:a.info.columns.map(g=>u.jsxs(x.TableRow,{children:[u.jsx(x.TableCell,{component:"th",scope:"row",children:g.name}),u.jsx(x.TableCell,{children:g.type})]},g.name))})]})})})]})]})}function mr(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Y(){return Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Y.apply(null,arguments)}function ms(){return ms=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ms.apply(null,arguments)}function Np(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function fs(e,t){return fs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},fs(e,t)}function Ap(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,fs(e,t)}const au={disabled:!1},Fa=_.createContext(null);var O1=function(e){return e.scrollTop},lo="unmounted",qr="exited",Fr="entering",Pn="entered",gs="exiting",br=function(e){Ap(t,e);function t(n,o){var a;a=e.call(this,n,o)||this;var i=o,s=i&&!i.isMounting?n.enter:n.appear,l;return a.appearStatus=null,n.in?s?(l=qr,a.appearStatus=Fr):l=Pn:n.unmountOnExit||n.mountOnEnter?l=lo:l=qr,a.state={status:l},a.nextCallback=null,a}t.getDerivedStateFromProps=function(n,o){var a=n.in;return a&&o.status===lo?{status:qr}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(n){var o=null;if(n!==this.props){var a=this.state.status;this.props.in?a!==Fr&&a!==Pn&&(o=Fr):(a===Fr||a===Pn)&&(o=gs)}this.updateStatus(!1,o)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var n=this.props.timeout,o,a,i;return o=a=i=n,n!=null&&typeof n!="number"&&(o=n.exit,a=n.enter,i=n.appear!==void 0?n.appear:a),{exit:o,enter:a,appear:i}},r.updateStatus=function(n,o){if(n===void 0&&(n=!1),o!==null)if(this.cancelNextCallback(),o===Fr){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:ro.findDOMNode(this);a&&O1(a)}this.performEnter(n)}else this.performExit();else this.props.unmountOnExit&&this.state.status===qr&&this.setState({status:lo})},r.performEnter=function(n){var o=this,a=this.props.enter,i=this.context?this.context.isMounting:n,s=this.props.nodeRef?[i]:[ro.findDOMNode(this),i],l=s[0],c=s[1],d=this.getTimeouts(),p=i?d.appear:d.enter;if(!n&&!a||au.disabled){this.safeSetState({status:Pn},function(){o.props.onEntered(l)});return}this.props.onEnter(l,c),this.safeSetState({status:Fr},function(){o.props.onEntering(l,c),o.onTransitionEnd(p,function(){o.safeSetState({status:Pn},function(){o.props.onEntered(l,c)})})})},r.performExit=function(){var n=this,o=this.props.exit,a=this.getTimeouts(),i=this.props.nodeRef?void 0:ro.findDOMNode(this);if(!o||au.disabled){this.safeSetState({status:qr},function(){n.props.onExited(i)});return}this.props.onExit(i),this.safeSetState({status:gs},function(){n.props.onExiting(i),n.onTransitionEnd(a.exit,function(){n.safeSetState({status:qr},function(){n.props.onExited(i)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(n,o){o=this.setNextCallback(o),this.setState(n,o)},r.setNextCallback=function(n){var o=this,a=!0;return this.nextCallback=function(i){a&&(a=!1,o.nextCallback=null,n(i))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},r.onTransitionEnd=function(n,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:ro.findDOMNode(this),i=n==null&&!this.props.addEndListener;if(!a||i){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var s=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],l=s[0],c=s[1];this.props.addEndListener(l,c)}n!=null&&setTimeout(this.nextCallback,n)},r.render=function(){var n=this.state.status;if(n===lo)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var i=Np(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return _.createElement(Fa.Provider,{value:null},typeof a=="function"?a(n,i):_.cloneElement(_.Children.only(a),i))},t}(_.Component);br.contextType=Fa;br.propTypes={};function bn(){}br.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:bn,onEntering:bn,onEntered:bn,onExit:bn,onExiting:bn,onExited:bn};br.UNMOUNTED=lo;br.EXITED=qr;br.ENTERING=Fr;br.ENTERED=Pn;br.EXITING=gs;function L1(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ml(e,t){var r=function(o){return t&&_.isValidElement(o)?t(o):o},n=Object.create(null);return e&&_.Children.map(e,function(o){return o}).forEach(function(o){n[o.key]=r(o)}),n}function $1(e,t){e=e||{},t=t||{};function r(d){return d in t?t[d]:e[d]}var n=Object.create(null),o=[];for(var a in e)a in t?o.length&&(n[a]=o,o=[]):o.push(a);var i,s={};for(var l in t){if(n[l])for(i=0;i<n[l].length;i++){var c=n[l][i];s[n[l][i]]=r(c)}s[l]=r(l)}for(i=0;i<o.length;i++)s[o[i]]=r(o[i]);return s}function Vr(e,t,r){return r[t]!=null?r[t]:e.props[t]}function D1(e,t){return ml(e.children,function(r){return _.cloneElement(r,{onExited:t.bind(null,r),in:!0,appear:Vr(r,"appear",e),enter:Vr(r,"enter",e),exit:Vr(r,"exit",e)})})}function B1(e,t,r){var n=ml(e.children),o=$1(t,n);return Object.keys(o).forEach(function(a){var i=o[a];if(_.isValidElement(i)){var s=a in t,l=a in n,c=t[a],d=_.isValidElement(c)&&!c.props.in;l&&(!s||d)?o[a]=_.cloneElement(i,{onExited:r.bind(null,i),in:!0,exit:Vr(i,"exit",e),enter:Vr(i,"enter",e)}):!l&&s&&!d?o[a]=_.cloneElement(i,{in:!1}):l&&s&&_.isValidElement(c)&&(o[a]=_.cloneElement(i,{onExited:r.bind(null,i),in:c.props.in,exit:Vr(i,"exit",e),enter:Vr(i,"enter",e)}))}}),o}var q1=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},F1={component:"div",childFactory:function(e){return e}},fl=function(e){Ap(t,e);function t(n,o){var a;a=e.call(this,n,o)||this;var i=a.handleExited.bind(L1(a));return a.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},a}var r=t.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(n,o){var a=o.children,i=o.handleExited,s=o.firstRender;return{children:s?D1(n,i):B1(n,a,i),firstRender:!1}},r.handleExited=function(n,o){var a=ml(this.props.children);n.key in a||(n.props.onExited&&n.props.onExited(o),this.mounted&&this.setState(function(i){var s=ms({},i.children);return delete s[n.key],{children:s}}))},r.render=function(){var n=this.props,o=n.component,a=n.childFactory,i=Np(n,["component","childFactory"]),s=this.state.contextValue,l=q1(this.state.children).map(a);return delete i.appear,delete i.enter,delete i.exit,o===null?_.createElement(Fa.Provider,{value:s},l):_.createElement(Fa.Provider,{value:s},_.createElement(o,i,l))},t}(_.Component);fl.propTypes={};fl.defaultProps=F1;const iu={};function _p(e,t){const r=S.useRef(iu);return r.current===iu&&(r.current=e(t)),r}const z1=[];function W1(e){S.useEffect(e,z1)}class gl{constructor(){R(this,"currentId",null);R(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});R(this,"disposeEffect",()=>this.clear)}static create(){return new gl}start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},t)}}function Op(){const e=_p(gl.create).current;return W1(e.disposeEffect),e}function su(e,t){const{timeout:r,easing:n,style:o={}}=e;return{duration:o.transitionDuration??(typeof r=="number"?r:r[t.mode]||0),easing:o.transitionTimingFunction??(typeof n=="object"?n[t.mode]:n),delay:o.transitionDelay}}function U1(e){return Ln("MuiCollapse",e)}Dn("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const H1=e=>{const{orientation:t,classes:r}=e,n={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return No(n,U1,r)},V1=Te("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.orientation],r.state==="entered"&&t.entered,r.state==="exited"&&!r.in&&r.collapsedSize==="0px"&&t.hidden]}})(nl(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:t})=>t.state==="exited"&&!t.in&&t.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),G1=Te("div",{name:"MuiCollapse",slot:"Wrapper"})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),K1=Te("div",{name:"MuiCollapse",slot:"WrapperInner"})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),Po=S.forwardRef(function(e,t){const r=$n({props:e,name:"MuiCollapse"}),{addEndListener:n,children:o,className:a,collapsedSize:i="0px",component:s,easing:l,in:c,onEnter:d,onEntered:p,onEntering:h,onExit:f,onExited:g,onExiting:y,orientation:v="vertical",style:b,timeout:C=Pd.standard,TransitionComponent:w=br,...k}=r,j={...r,orientation:v,collapsedSize:i},P=H1(j),B=f0(),F=Op(),L=S.useRef(null),m=S.useRef(),T=typeof i=="number"?`${i}px`:i,D=v==="horizontal",$=D?"width":"height",H=S.useRef(null),J=Ta(t,H),V=q=>oe=>{if(q){const Pe=H.current;oe===void 0?q(Pe):q(Pe,oe)}},ce=()=>L.current?L.current[D?"clientWidth":"clientHeight"]:0,K=V((q,oe)=>{L.current&&D&&(L.current.style.position="absolute"),q.style[$]=T,d&&d(q,oe)}),se=V((q,oe)=>{const Pe=ce();L.current&&D&&(L.current.style.position="");const{duration:it,easing:ht}=su({style:b,timeout:C,easing:l},{mode:"enter"});if(C==="auto"){const Ae=B.transitions.getAutoHeightDuration(Pe);q.style.transitionDuration=`${Ae}ms`,m.current=Ae}else q.style.transitionDuration=typeof it=="string"?it:`${it}ms`;q.style[$]=`${Pe}px`,q.style.transitionTimingFunction=ht,h&&h(q,oe)}),Z=V((q,oe)=>{q.style[$]="auto",p&&p(q,oe)}),X=V(q=>{q.style[$]=`${ce()}px`,f&&f(q)}),U=V(g),O=V(q=>{const oe=ce(),{duration:Pe,easing:it}=su({style:b,timeout:C,easing:l},{mode:"exit"});if(C==="auto"){const ht=B.transitions.getAutoHeightDuration(oe);q.style.transitionDuration=`${ht}ms`,m.current=ht}else q.style.transitionDuration=typeof Pe=="string"?Pe:`${Pe}ms`;q.style[$]=T,q.style.transitionTimingFunction=it,y&&y(q)});return u.jsx(w,{in:c,onEnter:K,onEntered:Z,onEntering:se,onExit:X,onExited:U,onExiting:O,addEndListener:q=>{C==="auto"&&F.start(m.current||0,q),n&&n(H.current,q)},nodeRef:H,timeout:C==="auto"?null:C,...k,children:(q,{ownerState:oe,...Pe})=>u.jsx(V1,{as:s,className:Fe(P.root,a,{entered:P.entered,exited:!c&&T==="0px"&&P.hidden}[q]),style:{[D?"minWidth":"minHeight"]:T,...b},ref:J,ownerState:{...j,state:q},...Pe,children:u.jsx(G1,{ownerState:{...j,state:q},className:P.wrapper,ref:L,children:u.jsx(K1,{ownerState:{...j,state:q},className:P.wrapperInner,children:o})})})})});Po&&(Po.muiSupportAuto=!0);const Q1=S.createContext(void 0);function Y1(){return S.useContext(Q1)}function lu(e){try{return e.matches(":focus-visible")}catch{}return!1}class za{constructor(){R(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new za}static use(){const t=_p(za.create).current,[r,n]=S.useState(!1);return t.shouldMount=r,t.setShouldMount=n,S.useEffect(t.mountEffect,[r]),t}mount(){return this.mounted||(this.mounted=J1(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>this.ref.current?.start(...t))}stop(...t){this.mount().then(()=>this.ref.current?.stop(...t))}pulsate(...t){this.mount().then(()=>this.ref.current?.pulsate(...t))}}function X1(){return za.use()}function J1(){let e,t;const r=new Promise((n,o)=>{e=n,t=o});return r.resolve=e,r.reject=t,r}function Z1(e){const{className:t,classes:r,pulsate:n=!1,rippleX:o,rippleY:a,rippleSize:i,in:s,onExited:l,timeout:c}=e,[d,p]=S.useState(!1),h=Fe(t,r.ripple,r.rippleVisible,n&&r.ripplePulsate),f={width:i,height:i,top:-(i/2)+a,left:-(i/2)+o},g=Fe(r.child,d&&r.childLeaving,n&&r.childPulsate);return!s&&!d&&p(!0),S.useEffect(()=>{if(!s&&l!=null){const y=setTimeout(l,c);return()=>{clearTimeout(y)}}},[l,s,c]),u.jsx("span",{className:h,style:f,children:u.jsx("span",{className:g})})}const At=Dn("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),ys=550,eS=80,tS=fe.keyframes`
|
|
56
|
+
/>`}const yy=ct(f.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"})),c_=new b0(new on);function u_(){const{projectName:e,packageName:t,versionId:n}=yn(),{data:r,isSuccess:o,isError:i,error:a}=wn({queryKey:["package",e,t,n],queryFn:s=>c_.getPackage(e,t,n,!1,s)});return f.jsx($t,{variant:"outlined",sx:{width:"100%"},children:f.jsxs(Dn,{children:[f.jsx(v.Typography,{variant:"overline",fontWeight:"bold",children:"Package Config"}),f.jsx(v.Divider,{}),f.jsx(v.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:f.jsxs(v.List,{dense:!0,disablePadding:!0,children:[f.jsx(v.ListItem,{dense:!0,disablePadding:!0,children:f.jsx(v.ListItemText,{primary:"Name",primaryTypographyProps:{fontWeight:"500"},secondary:t})}),!o&&!i&&f.jsx(v.ListItem,{children:f.jsx(Wn,{text:"Fetching Package Metadata..."})}),o&&(r.data&&f.jsx(v.ListItem,{dense:!0,disablePadding:!0,children:f.jsx(v.ListItemText,{primary:"Description",primaryTypographyProps:{fontWeight:"500"},secondary:r.data.description})})||f.jsxs(v.ListItem,{disablePadding:!0,dense:!0,sx:{mt:"20px"},children:[f.jsx(yy,{sx:{color:"grey.600",mr:"10px"}}),f.jsx(v.ListItemText,{primary:"No package manifest"})]})),i&&f.jsx(In,{error:a,context:`${e} > ${t} > ${n}`})]})})]})})}const d_=new g0(new on);function h_({connection:e}){return f.jsxs(v.TableRow,{children:[f.jsx(v.TableCell,{children:f.jsx(v.Typography,{variant:"body2",children:e.name})}),f.jsx(v.TableCell,{children:f.jsx(v.Typography,{variant:"body2",children:e.type})})]},e.name)}function p_(){const{projectName:e}=yn(),{data:t,isSuccess:n,isError:r,error:o}=wn({queryKey:["connections",e],queryFn:i=>d_.listConnections(e,i)});return f.jsx($t,{variant:"outlined",sx:{width:"100%"},children:f.jsxs(Dn,{children:[f.jsx(v.Typography,{variant:"overline",fontWeight:"bold",children:"Database Connections"}),f.jsx(v.Divider,{}),f.jsxs(v.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!n&&!r&&f.jsx(v.Typography,{variant:"body2",sx:{m:"auto"},children:"Fetching Connections..."}),n&&t.data.length>0&&f.jsx(v.Table,{size:"small",children:f.jsxs(v.TableBody,{children:[f.jsxs(v.TableRow,{children:[f.jsx(v.TableCell,{children:f.jsx(v.Typography,{variant:"subtitle2",fontWeight:"bold",children:"Connection Name"})}),f.jsx(v.TableCell,{children:f.jsx(v.Typography,{variant:"subtitle2",fontWeight:"bold",children:"Type"})})]}),t.data.map(i=>f.jsx(h_,{connection:i},i.name))]})}),n&&t.data.length===0&&f.jsx(v.Typography,{variant:"body2",children:"No Connections"}),r&&f.jsx(In,{error:o,context:`${e} > Connections`})]})]})})}const f_=new jS(new on);function m_(){const{projectName:e,packageName:t,versionId:n}=yn(),[r,o]=O.useState(!1),[i,a]=O.useState(null),s=g=>{a(g),o(!0)},l=()=>{o(!1),a(null)},{data:c,isError:d,error:u,isSuccess:h}=wn({queryKey:["databases",e,t,n],queryFn:g=>f_.listDatabases(e,t,n,g)}),p=g=>g>=1024*1024*1024*1024?`${(g/(1024*1024*1024)).toFixed(2)} T`:g>=1024*1024*1024?`${(g/(1024*1024*1024)).toFixed(2)} G`:g>=1024*1024?`${(g/(1024*1024)).toFixed(2)} M`:`${(g/1024).toFixed(2)} K`;return f.jsxs(f.Fragment,{children:[f.jsx($t,{variant:"outlined",sx:{width:"100%"},children:f.jsxs(Dn,{children:[f.jsx(v.Typography,{variant:"overline",fontWeight:"bold",children:"Embedded Databases"}),f.jsx(v.Divider,{}),f.jsxs(v.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!h&&!d&&f.jsx(Wn,{text:"Fetching Databases..."}),d&&f.jsx(In,{error:u,context:`${e} > ${t} > Databases`}),h&&c.data.length>0&&f.jsxs(v.Table,{size:"small",children:[f.jsx(v.TableHead,{children:f.jsxs(v.TableRow,{children:[f.jsx(v.TableCell,{children:"Name"}),f.jsx(v.TableCell,{align:"right",children:"Rows"})]})}),f.jsx(v.TableBody,{children:c.data.map(g=>f.jsxs(v.TableRow,{onClick:()=>s(g),sx:{cursor:"pointer"},children:[f.jsx(v.TableCell,{component:"th",scope:"row",children:g.path}),f.jsx(v.TableCell,{align:"right",children:p(g.info.rowCount)})]},g.path))})]}),h&&c.data.length===0&&f.jsx(v.Typography,{variant:"body2",sx:{m:"auto"},children:"No databases found"})]})]})}),f.jsxs(v.Dialog,{open:r,onClose:l,maxWidth:"sm",fullWidth:!0,children:[f.jsx(v.DialogTitle,{children:i?.path}),f.jsx(v.DialogContent,{children:i?.info?.columns&&f.jsx(v.TableContainer,{children:f.jsxs(v.Table,{size:"small",children:[f.jsx(v.TableHead,{children:f.jsxs(v.TableRow,{children:[f.jsx(v.TableCell,{children:"Column"}),f.jsx(v.TableCell,{children:"Type"})]})}),f.jsx(v.TableBody,{children:i.info.columns.map(g=>f.jsxs(v.TableRow,{children:[f.jsx(v.TableCell,{component:"th",scope:"row",children:g.name}),f.jsx(v.TableCell,{children:g.type})]},g.name))})]})})})]})]})}function Dr(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Te(){return Te=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Te.apply(null,arguments)}function g_(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:Zs(t.components[n].defaultProps,r)}const y_=jd();function b_(e=y_){return Rv(e)}function E_({props:e,name:t,defaultTheme:n,themeId:r}){let o=b_(n);return o=o[r]||o,g_({theme:o,name:t,props:e})}function T_({props:e,name:t}){return E_({props:e,name:t,defaultTheme:Hd,themeId:Ud})}function Fu(){return Fu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fu.apply(null,arguments)}function by(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Bu(e,t){return Bu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Bu(e,t)}function Ey(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Bu(e,t)}const gf={disabled:!1},pl=O.createContext(null);var x_=function(e){return e.scrollTop},ia="unmounted",ao="exited",so="entering",ti="entered",ju="exiting",Lr=function(e){Ey(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=o,s=a&&!a.isMounting?r.enter:r.appear,l;return i.appearStatus=null,r.in?s?(l=ao,i.appearStatus=so):l=ti:r.unmountOnExit||r.mountOnEnter?l=ia:l=ao,i.state={status:l},i.nextCallback=null,i}t.getDerivedStateFromProps=function(r,o){var i=r.in;return i&&o.status===ia?{status:ao}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(r){var o=null;if(r!==this.props){var i=this.state.status;this.props.in?i!==so&&i!==ti&&(o=so):(i===so||i===ti)&&(o=ju)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var r=this.props.timeout,o,i,a;return o=i=a=r,r!=null&&typeof r!="number"&&(o=r.exit,i=r.enter,a=r.appear!==void 0?r.appear:i),{exit:o,enter:i,appear:a}},n.updateStatus=function(r,o){if(r===void 0&&(r=!1),o!==null)if(this.cancelNextCallback(),o===so){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:Zi.findDOMNode(this);i&&x_(i)}this.performEnter(r)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ao&&this.setState({status:ia})},n.performEnter=function(r){var o=this,i=this.props.enter,a=this.context?this.context.isMounting:r,s=this.props.nodeRef?[a]:[Zi.findDOMNode(this),a],l=s[0],c=s[1],d=this.getTimeouts(),u=a?d.appear:d.enter;if(!r&&!i||gf.disabled){this.safeSetState({status:ti},function(){o.props.onEntered(l)});return}this.props.onEnter(l,c),this.safeSetState({status:so},function(){o.props.onEntering(l,c),o.onTransitionEnd(u,function(){o.safeSetState({status:ti},function(){o.props.onEntered(l,c)})})})},n.performExit=function(){var r=this,o=this.props.exit,i=this.getTimeouts(),a=this.props.nodeRef?void 0:Zi.findDOMNode(this);if(!o||gf.disabled){this.safeSetState({status:ao},function(){r.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:ju},function(){r.props.onExiting(a),r.onTransitionEnd(i.exit,function(){r.safeSetState({status:ao},function(){r.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(r,o){o=this.setNextCallback(o),this.setState(r,o)},n.setNextCallback=function(r){var o=this,i=!0;return this.nextCallback=function(a){i&&(i=!1,o.nextCallback=null,r(a))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},n.onTransitionEnd=function(r,o){this.setNextCallback(o);var i=this.props.nodeRef?this.props.nodeRef.current:Zi.findDOMNode(this),a=r==null&&!this.props.addEndListener;if(!i||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var s=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],l=s[0],c=s[1];this.props.addEndListener(l,c)}r!=null&&setTimeout(this.nextCallback,r)},n.render=function(){var r=this.state.status;if(r===ia)return null;var o=this.props,i=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var a=by(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return O.createElement(pl.Provider,{value:null},typeof i=="function"?i(r,a):O.cloneElement(O.Children.only(i),a))},t}(O.Component);Lr.contextType=pl;Lr.propTypes={};function Go(){}Lr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Go,onEntering:Go,onEntered:Go,onExit:Go,onExiting:Go,onExited:Go};Lr.UNMOUNTED=ia;Lr.EXITED=ao;Lr.ENTERING=so;Lr.ENTERED=ti;Lr.EXITING=ju;function C_(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zd(e,t){var n=function(o){return t&&O.isValidElement(o)?t(o):o},r=Object.create(null);return e&&O.Children.map(e,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function v_(e,t){e=e||{},t=t||{};function n(d){return d in t?t[d]:e[d]}var r=Object.create(null),o=[];for(var i in e)i in t?o.length&&(r[i]=o,o=[]):o.push(i);var a,s={};for(var l in t){if(r[l])for(a=0;a<r[l].length;a++){var c=r[l][a];s[r[l][a]]=n(c)}s[l]=n(l)}for(a=0;a<o.length;a++)s[o[a]]=n(o[a]);return s}function po(e,t,n){return n[t]!=null?n[t]:e.props[t]}function S_(e,t){return Zd(e.children,function(n){return O.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:po(n,"appear",e),enter:po(n,"enter",e),exit:po(n,"exit",e)})})}function A_(e,t,n){var r=Zd(e.children),o=v_(t,r);return Object.keys(o).forEach(function(i){var a=o[i];if(O.isValidElement(a)){var s=i in t,l=i in r,c=t[i],d=O.isValidElement(c)&&!c.props.in;l&&(!s||d)?o[i]=O.cloneElement(a,{onExited:n.bind(null,a),in:!0,exit:po(a,"exit",e),enter:po(a,"enter",e)}):!l&&s&&!d?o[i]=O.cloneElement(a,{in:!1}):l&&s&&O.isValidElement(c)&&(o[i]=O.cloneElement(a,{onExited:n.bind(null,a),in:c.props.in,exit:po(a,"exit",e),enter:po(a,"enter",e)}))}}),o}var k_=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},__={component:"div",childFactory:function(e){return e}},eh=function(e){Ey(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=i.handleExited.bind(C_(i));return i.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},i}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(r,o){var i=o.children,a=o.handleExited,s=o.firstRender;return{children:s?S_(r,a):A_(r,i,a),firstRender:!1}},n.handleExited=function(r,o){var i=Zd(this.props.children);r.key in i||(r.props.onExited&&r.props.onExited(o),this.mounted&&this.setState(function(a){var s=Fu({},a.children);return delete s[r.key],{children:s}}))},n.render=function(){var r=this.props,o=r.component,i=r.childFactory,a=by(r,["component","childFactory"]),s=this.state.contextValue,l=k_(this.state.children).map(i);return delete a.appear,delete a.enter,delete a.exit,o===null?O.createElement(pl.Provider,{value:s},l):O.createElement(pl.Provider,{value:s},O.createElement(o,a,l))},t}(O.Component);eh.propTypes={};eh.defaultProps=__;const yf={};function Ty(e,t){const n=_.useRef(yf);return n.current===yf&&(n.current=e(t)),n}const D_=[];function I_(e){_.useEffect(e,D_)}class th{constructor(){G(this,"currentId",null);G(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});G(this,"disposeEffect",()=>this.clear)}static create(){return new th}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function xy(){const e=Ty(th.create).current;return I_(e.disposeEffect),e}function bf(e,t){const{timeout:n,easing:r,style:o={}}=e;return{duration:o.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:o.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:o.transitionDelay}}function w_(e){return Ei("MuiCollapse",e)}xi("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const N_=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return $a(r,w_,n)},P_=ut("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})($d(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:t})=>t.state==="exited"&&!t.in&&t.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),R_=ut("div",{name:"MuiCollapse",slot:"Wrapper"})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),L_=ut("div",{name:"MuiCollapse",slot:"WrapperInner"})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),Ra=_.forwardRef(function(e,t){const n=Ti({props:e,name:"MuiCollapse"}),{addEndListener:r,children:o,className:i,collapsedSize:a="0px",component:s,easing:l,in:c,onEnter:d,onEntered:u,onEntering:h,onExit:p,onExited:g,onExiting:b,orientation:T="vertical",style:E,timeout:C=d0.standard,TransitionComponent:x=Lr,...k}=n,w={...n,orientation:T,collapsedSize:a},S=N_(w),B=ES(),W=xy(),U=_.useRef(null),y=_.useRef(),R=typeof a=="number"?`${a}px`:a,F=T==="horizontal",M=F?"width":"height",z=_.useRef(null),X=el(t,z),Z=Q=>ge=>{if(Q){const de=z.current;ge===void 0?Q(de):Q(de,ge)}},me=()=>U.current?U.current[F?"clientWidth":"clientHeight"]:0,ce=Z((Q,ge)=>{U.current&&F&&(U.current.style.position="absolute"),Q.style[M]=R,d&&d(Q,ge)}),ee=Z((Q,ge)=>{const de=me();U.current&&F&&(U.current.style.position="");const{duration:ye,easing:he}=bf({style:E,timeout:C,easing:l},{mode:"enter"});if(C==="auto"){const Fe=B.transitions.getAutoHeightDuration(de);Q.style.transitionDuration=`${Fe}ms`,y.current=Fe}else Q.style.transitionDuration=typeof ye=="string"?ye:`${ye}ms`;Q.style[M]=`${de}px`,Q.style.transitionTimingFunction=he,h&&h(Q,ge)}),I=Z((Q,ge)=>{Q.style[M]="auto",u&&u(Q,ge)}),ue=Z(Q=>{Q.style[M]=`${me()}px`,p&&p(Q)}),J=Z(g),A=Z(Q=>{const ge=me(),{duration:de,easing:ye}=bf({style:E,timeout:C,easing:l},{mode:"exit"});if(C==="auto"){const he=B.transitions.getAutoHeightDuration(ge);Q.style.transitionDuration=`${he}ms`,y.current=he}else Q.style.transitionDuration=typeof de=="string"?de:`${de}ms`;Q.style[M]=R,Q.style.transitionTimingFunction=ye,b&&b(Q)});return f.jsx(x,{in:c,onEnter:ce,onEntered:I,onEntering:ee,onExit:ue,onExited:J,onExiting:A,addEndListener:Q=>{C==="auto"&&W.start(y.current||0,Q),r&&r(z.current,Q)},nodeRef:z,timeout:C==="auto"?null:C,...k,children:(Q,{ownerState:ge,...de})=>f.jsx(P_,{as:s,className:kt(S.root,i,{entered:S.entered,exited:!c&&R==="0px"&&S.hidden}[Q]),style:{[F?"minWidth":"minHeight"]:R,...E},ref:X,ownerState:{...w,state:Q},...de,children:f.jsx(R_,{ownerState:{...w,state:Q},className:S.wrapper,ref:U,children:f.jsx(L_,{ownerState:{...w,state:Q},className:S.wrapperInner,children:o})})})})});Ra&&(Ra.muiSupportAuto=!0);const O_=_.createContext(void 0);function M_(){return _.useContext(O_)}function Ef(e){try{return e.matches(":focus-visible")}catch{}return!1}class fl{constructor(){G(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new fl}static use(){const t=Ty(fl.create).current,[n,r]=_.useState(!1);return t.shouldMount=n,t.setShouldMount=r,_.useEffect(t.mountEffect,[n]),t}mount(){return this.mounted||(this.mounted=B_(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>this.ref.current?.start(...t))}stop(...t){this.mount().then(()=>this.ref.current?.stop(...t))}pulsate(...t){this.mount().then(()=>this.ref.current?.pulsate(...t))}}function F_(){return fl.use()}function B_(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function j_(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:a,in:s,onExited:l,timeout:c}=e,[d,u]=_.useState(!1),h=kt(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:a,height:a,top:-(a/2)+i,left:-(a/2)+o},g=kt(n.child,d&&n.childLeaving,r&&n.childPulsate);return!s&&!d&&u(!0),_.useEffect(()=>{if(!s&&l!=null){const b=setTimeout(l,c);return()=>{clearTimeout(b)}}},[l,s,c]),f.jsx("span",{className:h,style:p,children:f.jsx("span",{className:g})})}const Mn=xi("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Hu=550,H_=80,U_=Ge.keyframes`
|
|
74
57
|
0% {
|
|
75
58
|
transform: scale(0);
|
|
76
59
|
opacity: 0.1;
|
|
@@ -80,7 +63,7 @@ import {${t.sourceName}}" from '${t.modelPath}'"
|
|
|
80
63
|
transform: scale(1);
|
|
81
64
|
opacity: 0.3;
|
|
82
65
|
}
|
|
83
|
-
`,
|
|
66
|
+
`,z_=Ge.keyframes`
|
|
84
67
|
0% {
|
|
85
68
|
opacity: 1;
|
|
86
69
|
}
|
|
@@ -88,7 +71,7 @@ import {${t.sourceName}}" from '${t.modelPath}'"
|
|
|
88
71
|
100% {
|
|
89
72
|
opacity: 0;
|
|
90
73
|
}
|
|
91
|
-
|
|
74
|
+
`,$_=Ge.keyframes`
|
|
92
75
|
0% {
|
|
93
76
|
transform: scale(1);
|
|
94
77
|
}
|
|
@@ -100,23 +83,23 @@ import {${t.sourceName}}" from '${t.modelPath}'"
|
|
|
100
83
|
100% {
|
|
101
84
|
transform: scale(1);
|
|
102
85
|
}
|
|
103
|
-
`,
|
|
86
|
+
`,G_=ut("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),q_=ut(j_,{name:"MuiTouchRipple",slot:"Ripple"})`
|
|
104
87
|
opacity: 0;
|
|
105
88
|
position: absolute;
|
|
106
89
|
|
|
107
|
-
&.${
|
|
90
|
+
&.${Mn.rippleVisible} {
|
|
108
91
|
opacity: 0.3;
|
|
109
92
|
transform: scale(1);
|
|
110
|
-
animation-name: ${
|
|
111
|
-
animation-duration: ${
|
|
93
|
+
animation-name: ${U_};
|
|
94
|
+
animation-duration: ${Hu}ms;
|
|
112
95
|
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
113
96
|
}
|
|
114
97
|
|
|
115
|
-
&.${
|
|
98
|
+
&.${Mn.ripplePulsate} {
|
|
116
99
|
animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms;
|
|
117
100
|
}
|
|
118
101
|
|
|
119
|
-
& .${
|
|
102
|
+
& .${Mn.child} {
|
|
120
103
|
opacity: 1;
|
|
121
104
|
display: block;
|
|
122
105
|
width: 100%;
|
|
@@ -125,30 +108,110 @@ import {${t.sourceName}}" from '${t.modelPath}'"
|
|
|
125
108
|
background-color: currentColor;
|
|
126
109
|
}
|
|
127
110
|
|
|
128
|
-
& .${
|
|
111
|
+
& .${Mn.childLeaving} {
|
|
129
112
|
opacity: 0;
|
|
130
|
-
animation-name: ${
|
|
131
|
-
animation-duration: ${
|
|
113
|
+
animation-name: ${z_};
|
|
114
|
+
animation-duration: ${Hu}ms;
|
|
132
115
|
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
133
116
|
}
|
|
134
117
|
|
|
135
|
-
& .${
|
|
118
|
+
& .${Mn.childPulsate} {
|
|
136
119
|
position: absolute;
|
|
137
120
|
/* @noflip */
|
|
138
121
|
left: 0px;
|
|
139
122
|
top: 0;
|
|
140
|
-
animation-name: ${
|
|
123
|
+
animation-name: ${$_};
|
|
141
124
|
animation-duration: 2500ms;
|
|
142
125
|
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
143
126
|
animation-iteration-count: infinite;
|
|
144
127
|
animation-delay: 200ms;
|
|
145
128
|
}
|
|
146
|
-
`,iS=S.forwardRef(function(e,t){const r=$n({props:e,name:"MuiTouchRipple"}),{center:n=!1,classes:o={},className:a,...i}=r,[s,l]=S.useState([]),c=S.useRef(0),d=S.useRef(null);S.useEffect(()=>{d.current&&(d.current(),d.current=null)},[s]);const p=S.useRef(!1),h=Op(),f=S.useRef(null),g=S.useRef(null),y=S.useCallback(w=>{const{pulsate:k,rippleX:j,rippleY:P,rippleSize:B,cb:F}=w;l(L=>[...L,u.jsx(aS,{classes:{ripple:Fe(o.ripple,At.ripple),rippleVisible:Fe(o.rippleVisible,At.rippleVisible),ripplePulsate:Fe(o.ripplePulsate,At.ripplePulsate),child:Fe(o.child,At.child),childLeaving:Fe(o.childLeaving,At.childLeaving),childPulsate:Fe(o.childPulsate,At.childPulsate)},timeout:ys,pulsate:k,rippleX:j,rippleY:P,rippleSize:B},c.current)]),c.current+=1,d.current=F},[o]),v=S.useCallback((w={},k={},j=()=>{})=>{const{pulsate:P=!1,center:B=n||k.pulsate,fakeElement:F=!1}=k;if(w?.type==="mousedown"&&p.current){p.current=!1;return}w?.type==="touchstart"&&(p.current=!0);const L=F?null:g.current,m=L?L.getBoundingClientRect():{width:0,height:0,left:0,top:0};let T,D,$;if(B||w===void 0||w.clientX===0&&w.clientY===0||!w.clientX&&!w.touches)T=Math.round(m.width/2),D=Math.round(m.height/2);else{const{clientX:H,clientY:J}=w.touches&&w.touches.length>0?w.touches[0]:w;T=Math.round(H-m.left),D=Math.round(J-m.top)}if(B)$=Math.sqrt((2*m.width**2+m.height**2)/3),$%2===0&&($+=1);else{const H=Math.max(Math.abs((L?L.clientWidth:0)-T),T)*2+2,J=Math.max(Math.abs((L?L.clientHeight:0)-D),D)*2+2;$=Math.sqrt(H**2+J**2)}w?.touches?f.current===null&&(f.current=()=>{y({pulsate:P,rippleX:T,rippleY:D,rippleSize:$,cb:j})},h.start(eS,()=>{f.current&&(f.current(),f.current=null)})):y({pulsate:P,rippleX:T,rippleY:D,rippleSize:$,cb:j})},[n,y,h]),b=S.useCallback(()=>{v({},{pulsate:!0})},[v]),C=S.useCallback((w,k)=>{if(h.clear(),w?.type==="touchend"&&f.current){f.current(),f.current=null,h.start(0,()=>{C(w,k)});return}f.current=null,l(j=>j.length>0?j.slice(1):j),d.current=k},[h]);return S.useImperativeHandle(t,()=>({pulsate:b,start:v,stop:C}),[b,v,C]),u.jsx(oS,{className:Fe(At.root,o.root,a),ref:g,...i,children:u.jsx(fl,{component:null,exit:!0,children:s})})});function sS(e){return Ln("MuiButtonBase",e)}const lS=Dn("MuiButtonBase",["root","disabled","focusVisible"]),cS=e=>{const{disabled:t,focusVisible:r,focusVisibleClassName:n,classes:o}=e,a=No({root:["root",t&&"disabled",r&&"focusVisible"]},sS,o);return r&&n&&(a.root+=` ${n}`),a},uS=Te("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${lS.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),dS=S.forwardRef(function(e,t){const r=$n({props:e,name:"MuiButtonBase"}),{action:n,centerRipple:o=!1,children:a,className:i,component:s="button",disabled:l=!1,disableRipple:c=!1,disableTouchRipple:d=!1,focusRipple:p=!1,focusVisibleClassName:h,LinkComponent:f="a",onBlur:g,onClick:y,onContextMenu:v,onDragLeave:b,onFocus:C,onFocusVisible:w,onKeyDown:k,onKeyUp:j,onMouseDown:P,onMouseLeave:B,onMouseUp:F,onTouchEnd:L,onTouchMove:m,onTouchStart:T,tabIndex:D=0,TouchRippleProps:$,touchRippleRef:H,type:J,...V}=r,ce=S.useRef(null),K=X1(),se=Ta(K.ref,H),[Z,X]=S.useState(!1);l&&Z&&X(!1),S.useImperativeHandle(n,()=>({focusVisible:()=>{X(!0),ce.current.focus()}}),[]);const U=K.shouldMount&&!c&&!l;S.useEffect(()=>{Z&&p&&!c&&K.pulsate()},[c,p,Z,K]);const O=ir(K,"start",P,d),q=ir(K,"stop",v,d),oe=ir(K,"stop",b,d),Pe=ir(K,"stop",F,d),it=ir(K,"stop",ae=>{Z&&ae.preventDefault(),B&&B(ae)},d),ht=ir(K,"start",T,d),Ae=ir(K,"stop",L,d),_e=ir(K,"stop",m,d),jt=ir(K,"stop",ae=>{lu(ae.target)||X(!1),g&&g(ae)},!1),xr=fa(ae=>{ce.current||(ce.current=ae.currentTarget),lu(ae.target)&&(X(!0),w&&w(ae)),C&&C(ae)}),Ut=()=>{const ae=ce.current;return s&&s!=="button"&&!(ae.tagName==="A"&&ae.href)},dt=fa(ae=>{p&&!ae.repeat&&Z&&ae.key===" "&&K.stop(ae,()=>{K.start(ae)}),ae.target===ae.currentTarget&&Ut()&&ae.key===" "&&ae.preventDefault(),k&&k(ae),ae.target===ae.currentTarget&&Ut()&&ae.key==="Enter"&&!l&&(ae.preventDefault(),y&&y(ae))}),Lr=fa(ae=>{p&&ae.key===" "&&Z&&!ae.defaultPrevented&&K.stop(ae,()=>{K.pulsate(ae)}),j&&j(ae),y&&ae.target===ae.currentTarget&&Ut()&&ae.key===" "&&!ae.defaultPrevented&&y(ae)});let Qt=s;Qt==="button"&&(V.href||V.to)&&(Qt=f);const ot={};Qt==="button"?(ot.type=J===void 0?"button":J,ot.disabled=l):(!V.href&&!V.to&&(ot.role="button"),l&&(ot["aria-disabled"]=l));const Ht=Ta(t,ce),vr={...r,centerRipple:o,component:s,disabled:l,disableRipple:c,disableTouchRipple:d,focusRipple:p,tabIndex:D,focusVisible:Z},Sr=cS(vr);return u.jsxs(uS,{as:Qt,className:Fe(Sr.root,i),ownerState:vr,onBlur:jt,onClick:y,onContextMenu:q,onFocus:xr,onKeyDown:dt,onKeyUp:Lr,onMouseDown:O,onMouseLeave:it,onMouseUp:Pe,onDragLeave:oe,onTouchEnd:Ae,onTouchMove:_e,onTouchStart:ht,ref:Ht,tabIndex:l?-1:D,type:J,...ot,...V,children:[a,U?u.jsx(iS,{ref:se,center:o,...$}):null]})});function ir(e,t,r,n=!1){return fa(o=>(r&&r(o),n||e[t](o),!0))}function pS(e){return Ln("PrivateSwitchBase",e)}Dn("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);function hS(e){return typeof e=="string"}function mS(e,t,r){return e===void 0||hS(e)?t:{...t,ownerState:{...t.ownerState,...r}}}function fS(e,t,r){return typeof e=="function"?e(t,r):e}function gS(e,t=[]){if(e===void 0)return{};const r={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]=="function"&&!t.includes(n)).forEach(n=>{r[n]=e[n]}),r}function cu(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(r=>!(r.match(/^on[A-Z]/)&&typeof e[r]=="function")).forEach(r=>{t[r]=e[r]}),t}function yS(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:n,externalForwardedProps:o,className:a}=e;if(!t){const f=Fe(r?.className,a,o?.className,n?.className),g={...r?.style,...o?.style,...n?.style},y={...r,...o,...n};return f.length>0&&(y.className=f),Object.keys(g).length>0&&(y.style=g),{props:y,internalRef:void 0}}const i=gS({...o,...n}),s=cu(n),l=cu(o),c=t(i),d=Fe(c?.className,r?.className,a,o?.className,n?.className),p={...c?.style,...r?.style,...o?.style,...n?.style},h={...c,...r,...l,...s};return d.length>0&&(h.className=d),Object.keys(p).length>0&&(h.style=p),{props:h,internalRef:c.ref}}function bs(e,t){const{className:r,elementType:n,ownerState:o,externalForwardedProps:a,internalForwardedProps:i,shouldForwardComponentProp:s=!1,...l}=t,{component:c,slots:d={[e]:void 0},slotProps:p={[e]:void 0},...h}=a,f=d[e]||n,g=fS(p[e],o),{props:{component:y,...v},internalRef:b}=yS({className:r,...l,externalForwardedProps:e==="root"?h:void 0,externalSlotProps:g}),C=Ta(b,g?.ref,t.ref),w=e==="root"?y||c:y,k=mS(f,{...e==="root"&&!c&&!d[e]&&i,...e!=="root"&&!d[e]&&i,...v,...w&&!s&&{as:w},...w&&s&&{component:w},ref:C},o);return[f,k]}const bS=e=>{const{classes:t,checked:r,disabled:n,edge:o}=e,a={root:["root",r&&"checked",n&&"disabled",o&&`edge${Gt(o)}`],input:["input"]};return No(a,pS,t)},xS=Te(dS)({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e==="start"&&t.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e==="end"&&t.size!=="small",style:{marginRight:-12}}]}),vS=Te("input",{shouldForwardProp:rl})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),SS=S.forwardRef(function(e,t){const{autoFocus:r,checked:n,checkedIcon:o,defaultChecked:a,disabled:i,disableFocusRipple:s=!1,edge:l=!1,icon:c,id:d,inputProps:p,inputRef:h,name:f,onBlur:g,onChange:y,onFocus:v,readOnly:b,required:C=!1,tabIndex:w,type:k,value:j,slots:P={},slotProps:B={},...F}=e,[L,m]=E0({controlled:n,default:!!a}),T=Y1(),D=q=>{v&&v(q),T&&T.onFocus&&T.onFocus(q)},$=q=>{g&&g(q),T&&T.onBlur&&T.onBlur(q)},H=q=>{if(q.nativeEvent.defaultPrevented)return;const oe=q.target.checked;m(oe),y&&y(q,oe)};let J=i;T&&typeof J>"u"&&(J=T.disabled);const V=k==="checkbox"||k==="radio",ce={...e,checked:L,disabled:J,disableFocusRipple:s,edge:l},K=bS(ce),se={slots:P,slotProps:{input:p,...B}},[Z,X]=bs("root",{ref:t,elementType:xS,className:K.root,shouldForwardComponentProp:!0,externalForwardedProps:{...se,component:"span",...F},getSlotProps:q=>({...q,onFocus:oe=>{q.onFocus?.(oe),D(oe)},onBlur:oe=>{q.onBlur?.(oe),$(oe)}}),ownerState:ce,additionalProps:{centerRipple:!0,focusRipple:!s,disabled:J,role:void 0,tabIndex:null}}),[U,O]=bs("input",{ref:h,elementType:vS,className:K.input,externalForwardedProps:se,getSlotProps:q=>({...q,onChange:oe=>{q.onChange?.(oe),H(oe)}}),ownerState:ce,additionalProps:{autoFocus:r,checked:n,defaultChecked:a,disabled:J,id:V?d:void 0,name:f,readOnly:b,required:C,tabIndex:w,type:k,...k==="checkbox"&&j===void 0?{}:{value:j}}});return u.jsxs(Z,{...X,children:[u.jsx(U,{...O}),L?o:c]})}),wS=Ee(u.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"})),CS=Ee(u.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})),kS=Ee(u.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}));function PS(e){return Ln("MuiCheckbox",e)}const Wi=Dn("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]);function IS(e){return typeof e.main=="string"}function jS(e,t=[]){if(!IS(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function uu(e=[]){return([,t])=>t&&jS(t,e)}const ES=e=>{const{classes:t,indeterminate:r,color:n,size:o}=e,a={root:["root",r&&"indeterminate",`color${Gt(n)}`,`size${Gt(o)}`]},i=No(a,PS,t);return{...t,...i}},TS=Te(SS,{shouldForwardProp:e=>rl(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.indeterminate&&t.indeterminate,t[`size${Gt(r.size)}`],r.color!=="default"&&t[`color${Gt(r.color)}`]]}})(nl(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:ts(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(uu()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:ts(e.palette[t].main,e.palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(uu()).map(([t])=>({props:{color:t},style:{[`&.${Wi.checked}, &.${Wi.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${Wi.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),RS=u.jsx(CS,{}),MS=u.jsx(wS,{}),NS=u.jsx(kS,{}),Lp=S.forwardRef(function(e,t){const r=$n({props:e,name:"MuiCheckbox"}),{checkedIcon:n=RS,color:o="primary",icon:a=MS,indeterminate:i=!1,indeterminateIcon:s=NS,inputProps:l,size:c="medium",disableRipple:d=!1,className:p,slots:h={},slotProps:f={},...g}=r,y=i?s:a,v=i?s:n,b={...r,disableRipple:d,color:o,indeterminate:i,size:c},C=ES(b),w=f.input??l,[k,j]=bs("root",{ref:t,elementType:TS,className:Fe(C.root,p),shouldForwardComponentProp:!0,externalForwardedProps:{slots:h,slotProps:f,...g},ownerState:b,additionalProps:{type:"checkbox",icon:S.cloneElement(y,{fontSize:y.props.fontSize??c}),checkedIcon:S.cloneElement(v,{fontSize:v.props.fontSize??c}),disableRipple:d,slots:h,slotProps:{input:R0(typeof w=="function"?w(b):w,{"data-indeterminate":i})}}});return u.jsx(k,{...j,classes:C})});function On(...e){const t=S.useRef(void 0),r=S.useCallback(n=>{const o=e.map(a=>{if(a==null)return null;if(typeof a=="function"){const i=a,s=i(n);return typeof s=="function"?s:()=>{i(null)}}return a.current=n,()=>{a.current=null}});return()=>{o.forEach(a=>a?.())}},e);return S.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}function AS(e){return typeof e=="string"}function _S(e,t,r){return e===void 0||AS(e)?t:{...t,ownerState:{...t.ownerState,...r}}}function Mt(e,t=[]){if(e===void 0)return{};const r={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]=="function"&&!t.includes(n)).forEach(n=>{r[n]=e[n]}),r}function du(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(r=>!(r.match(/^on[A-Z]/)&&typeof e[r]=="function")).forEach(r=>{t[r]=e[r]}),t}function OS(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:n,externalForwardedProps:o,className:a}=e;if(!t){const f=Fe(r?.className,a,o?.className,n?.className),g={...r?.style,...o?.style,...n?.style},y={...r,...o,...n};return f.length>0&&(y.className=f),Object.keys(g).length>0&&(y.style=g),{props:y,internalRef:void 0}}const i=Mt({...o,...n}),s=du(n),l=du(o),c=t(i),d=Fe(c?.className,r?.className,a,o?.className,n?.className),p={...c?.style,...r?.style,...o?.style,...n?.style},h={...c,...r,...l,...s};return d.length>0&&(h.className=d),Object.keys(p).length>0&&(h.style=p),{props:h,internalRef:c.ref}}function ur(e,t,r){return typeof e=="function"?e(t,r):e}function Gr(e){const{elementType:t,externalSlotProps:r,ownerState:n,skipResolvingSlotProps:o=!1,...a}=e,i=o?{}:ur(r,n),{props:s,internalRef:l}=OS({...a,externalSlotProps:i}),c=On(l,i?.ref,e.additionalProps?.ref);return _S(t,{...s,ref:c},n)}function $p(e,t,r=void 0){const n={};for(const o in e){const a=e[o];let i="",s=!0;for(let l=0;l<a.length;l+=1){const c=a[l];c&&(i+=(s===!0?"":" ")+t(c),s=!1,r&&r[c]&&(i+=" "+r[c]))}n[o]=i}return n}function Dp(e){return m1}const Bp=S.createContext(null);function LS(e){const{value:t,children:r}=e;return u.jsx(Bp.Provider,{value:t,children:t.wrapRoot({children:r,instance:t.instance})})}const sn=()=>{const e=S.useContext(Bp);if(e==null)throw new Error(["MUI X: Could not find the Tree View context.","It looks like you rendered your component outside of a SimpleTreeView or RichTreeView parent component.","This can also happen if you are bundling multiple versions of the Tree View."].join(`
|
|
147
|
-
`));return e}
|
|
148
|
-
`));r(f=>{const g=f.items.itemMetaMap[p];return g.label!==h?Y({},f,{items:Y({},f.items,{itemMetaMap:Y({},f.items.itemMetaMap,{[p]:Y({},g,{label:h})})})}):f}),n.onItemLabelChange&&n.onItemLabelChange(p,h)};return{instance:{setEditedItemId:i,isItemBeingEdited:s,updateItemLabel:d,isItemEditable:c,isTreeViewEditable:l,isItemBeingEditedRef:a},publicAPI:{updateItemLabel:d}}};Dt.itemPlugin=$S;Dt.getDefaultizedParams=({params:e,experimentalFeatures:t})=>{const r=t?.labelEditing;return Y({},e,{isItemEditable:r?e.isItemEditable??!1:!1})};Dt.getInitialState=()=>({editedItemId:null});Dt.params={onItemLabelChange:!0,isItemEditable:!0};const Qr=(e,t)=>e.getAvailablePlugins().has(t),qp=e=>Array.isArray(e)?e.length>0&&e.some(qp):!!e,DS=({itemId:e,children:t})=>{const{instance:r,selection:{multiSelect:n},publicAPI:o}=sn(),a={expandable:qp(t),expanded:r.isItemExpanded(e),focused:r.isItemFocused(e),selected:r.isItemSelected(e),disabled:r.isItemDisabled(e),editing:r?.isItemBeingEdited?r?.isItemBeingEdited(e):!1,editable:r.isItemEditable?r.isItemEditable(e):!1},i=d=>{if(a.disabled)return;a.focused||r.focusItem(d,e);const p=n&&(d.shiftKey||d.ctrlKey||d.metaKey);a.expandable&&!(p&&r.isItemExpanded(e))&&r.toggleItemExpansion(d,e)},s=d=>{a.disabled||(a.focused||r.focusItem(d,e),n&&(d.shiftKey||d.ctrlKey||d.metaKey)?d.shiftKey?r.expandSelectionRange(d,e):r.selectItem({event:d,itemId:e,keepExistingSelection:!0}):r.selectItem({event:d,itemId:e,shouldBeSelected:!0}))},l=d=>{const p=d.nativeEvent.shiftKey;n&&p?r.expandSelectionRange(d,e):r.selectItem({event:d,itemId:e,keepExistingSelection:n,shouldBeSelected:d.target.checked})},c=()=>{Qr(r,Dt)&&r.isItemEditable(e)&&(r.isItemBeingEdited(e)?r.setEditedItemId(null):r.setEditedItemId(e))};return{interactions:{handleExpansion:i,handleSelection:s,handleCheckboxSelection:l,toggleItemEditing:c,handleSaveItemLabel:(d,p)=>{Qr(r,Dt)&&r.isItemBeingEditedRef(e)&&(r.updateItemLabel(e,p),c(),r.focusItem(d,e))},handleCancelItemLabelEditing:d=>{Qr(r,Dt)&&r.isItemBeingEditedRef(e)&&(c(),r.focusItem(d,e))}},status:a,publicAPI:o}},yl=S.createContext(()=>-1),Fp=(e,t)=>{let r=t.length-1;for(;r>=0&&!e.isItemNavigable(t[r]);)r-=1;if(r!==-1)return t[r]},zp=(e,t)=>{const r=e.getItemMeta(t),n=e.getItemOrderedChildrenIds(r.parentId),o=e.getItemIndex(t);if(o===0)return r.parentId;let a=o-1;for(;!e.isItemNavigable(n[a])&&a>=0;)a-=1;if(a===-1)return r.parentId==null?null:zp(e,r.parentId);let i=n[a],s=Fp(e,e.getItemOrderedChildrenIds(i));for(;e.isItemExpanded(i)&&s!=null;)i=s,s=e.getItemOrderedChildrenIds(i).find(e.isItemNavigable);return i},ba=(e,t)=>{if(e.isItemExpanded(t)){const n=e.getItemOrderedChildrenIds(t).find(e.isItemNavigable);if(n!=null)return n}let r=e.getItemMeta(t);for(;r!=null;){const n=e.getItemOrderedChildrenIds(r.parentId),o=e.getItemIndex(r.id);if(o<n.length-1){let a=o+1;for(;!e.isItemNavigable(n[a])&&a<n.length-1;)a+=1;if(e.isItemNavigable(n[a]))return n[a]}r=e.getItemMeta(r.parentId)}return null},Wp=e=>{let t=null;for(;t==null||e.isItemExpanded(t);){const r=e.getItemOrderedChildrenIds(t),n=Fp(e,r);if(n==null)return t;t=n}return t},Io=e=>e.getItemOrderedChildrenIds(null).find(e.isItemNavigable),Up=(e,t,r)=>{if(t===r)return[t,r];const n=e.getItemMeta(t),o=e.getItemMeta(r);if(n.parentId===o.id||o.parentId===n.id)return o.parentId===n.id?[n.id,o.id]:[o.id,n.id];const a=[n.id],i=[o.id];let s=n.parentId,l=o.parentId,c=i.indexOf(s)!==-1,d=a.indexOf(l)!==-1,p=!0,h=!0;for(;!d&&!c;)p&&(a.push(s),c=i.indexOf(s)!==-1,p=s!==null,!c&&p&&(s=e.getItemMeta(s).parentId)),h&&!c&&(i.push(l),d=a.indexOf(l)!==-1,h=l!==null,!d&&h&&(l=e.getItemMeta(l).parentId));const f=c?s:l,g=e.getItemOrderedChildrenIds(f),y=a[a.indexOf(f)-1],v=i[i.indexOf(f)-1];return g.indexOf(y)<g.indexOf(v)?[t,r]:[r,t]},BS=(e,t,r)=>{const n=l=>{if(e.isItemExpandable(l)&&e.isItemExpanded(l))return e.getItemOrderedChildrenIds(l)[0];let c=e.getItemMeta(l);for(;c!=null;){const d=e.getItemOrderedChildrenIds(c.parentId),p=e.getItemIndex(c.id);if(p<d.length-1)return d[p+1];c=e.getItemMeta(c.parentId)}throw new Error("Invalid range")},[o,a]=Up(e,t,r),i=[o];let s=o;for(;s!==a;)s=n(s),e.isItemDisabled(s)||i.push(s);return i},qS=e=>{let t=Io(e);const r=[];for(;t!=null;)r.push(t),t=ba(e,t);return r},jo=(e,t)=>t!==e.closest('*[role="treeitem"]');let pu=0;const FS=()=>(pu+=1,`mui-tree-view-${pu}`),bl=({id:e,treeId:t="",itemId:r})=>e??`${t}-${r}`,zS=e=>{const{runItemPlugins:t,items:{onItemClick:r,disabledItemsFocusable:n,indentationAtItemLevel:o},selection:{disableSelection:a,checkboxSelection:i},expansion:{expansionTrigger:s},treeId:l,instance:c,publicAPI:d}=sn(),p=S.useContext(yl),{id:h,itemId:f,label:g,children:y,rootRef:v}=e,{rootRef:b,contentRef:C,propsEnhancers:w}=t(e),{interactions:k,status:j}=DS({itemId:f,children:y}),P=S.useRef(null),B=S.useRef(null),F=On(v,b,P),L=On(C,B),m=S.useRef(null),T=bl({itemId:f,treeId:l,id:h}),D=c.canItemBeTabbed(f)?0:-1,$={rootRefObject:P,contentRefObject:B,interactions:k},H=U=>O=>{if(U.onFocus?.(O),O.defaultMuiPrevented)return;const q=!j.disabled||n;!j.focused&&q&&O.currentTarget===O.target&&c.focusItem(O,f)},J=U=>O=>{if(U.onBlur?.(O),O.defaultMuiPrevented)return;const q=c.getItemDOMElement(f);j.editing||O.relatedTarget&&jo(O.relatedTarget,q)&&(O.target&&O.target?.dataset?.element==="labelInput"&&jo(O.target,q)||O.relatedTarget?.dataset?.element==="labelInput")||c.removeFocusedItem()},V=U=>O=>{U.onKeyDown?.(O),!(O.defaultMuiPrevented||O.target?.dataset?.element==="labelInput")&&c.handleItemKeyDown(O,f)},ce=U=>O=>{U.onDoubleClick?.(O),!O.defaultMuiPrevented&&k.toggleItemEditing()},K=U=>O=>{U.onClick?.(O),r?.(O,f),!(O.defaultMuiPrevented||m.current?.contains(O.target))&&(s==="content"&&k.handleExpansion(O),i||k.handleSelection(O))},se=U=>O=>{U.onMouseDown?.(O),!O.defaultMuiPrevented&&(O.shiftKey||O.ctrlKey||O.metaKey||j.disabled)&&O.preventDefault()},Z=U=>O=>{U.onChange?.(O),!O.defaultMuiPrevented&&(a||j.disabled||k.handleCheckboxSelection(O))},X=U=>O=>{U.onClick?.(O),!O.defaultMuiPrevented&&s==="iconContainer"&&k.handleExpansion(O)};return{getRootProps:(U={})=>{const O=Y({},Mt(e),Mt(U));let q;j.selected?q=!0:a||j.disabled?q=void 0:q=!1;const oe=Y({},O,{ref:F,role:"treeitem",tabIndex:D,id:T,"aria-expanded":j.expandable?j.expanded:void 0,"aria-selected":q,"aria-disabled":j.disabled||void 0},U,{onFocus:H(O),onBlur:J(O),onKeyDown:V(O)});o&&(oe.style={"--TreeView-itemDepth":typeof p=="function"?p(f):p});const Pe=w.root?.(Y({},$,{externalEventHandlers:O}))??{};return Y({},oe,Pe)},getContentProps:(U={})=>{const O=Mt(U),q=Y({},O,U,{ref:L,onClick:K(O),onMouseDown:se(O),status:j});o&&(q.indentationAtItemLevel=!0);const oe=w.content?.(Y({},$,{externalEventHandlers:O}))??{};return Y({},q,oe)},getGroupTransitionProps:(U={})=>{const O=Mt(U),q=Y({},O,{unmountOnExit:!0,component:"ul",role:"group",in:j.expanded,children:y},U);return o&&(q.indentationAtItemLevel=!0),q},getIconContainerProps:(U={})=>{const O=Mt(U);return Y({},O,U,{onClick:X(O)})},getCheckboxProps:(U={})=>{const O=Mt(U);return Y({},O,{visible:i,ref:m,checked:j.selected,disabled:a||j.disabled,tabIndex:-1},U,{onChange:Z(O)})},getLabelProps:(U={})=>{const O=Y({},Mt(U)),q=Y({},O,{children:g},U,{onDoubleClick:ce(O)});return c.isTreeViewEditable&&(q.editable=j.editable),q},getLabelInputProps:(U={})=>{const O=Mt(U),q=w.labelInput?.({rootRefObject:P,contentRefObject:B,externalEventHandlers:O,interactions:k})??{};return Y({},U,q)},getDragAndDropOverlayProps:(U={})=>{const O=Mt(U),q=w.dragAndDropOverlay?.(Y({},$,{externalEventHandlers:O}))??{};return Y({},U,q)},rootRef:F,status:j,publicAPI:d}},WS=zS;function Hp(e){const{instance:t,items:{onItemClick:r},selection:{multiSelect:n,checkboxSelection:o,disableSelection:a},expansion:{expansionTrigger:i}}=sn(),s=t.isItemExpandable(e),l=t.isItemExpanded(e),c=t.isItemFocused(e),d=t.isItemSelected(e),p=t.isItemDisabled(e),h=t?.isItemBeingEdited?t?.isItemBeingEdited(e):!1,f=t.isItemEditable?t.isItemEditable(e):!1,g=w=>{if(!p){c||t.focusItem(w,e);const k=n&&(w.shiftKey||w.ctrlKey||w.metaKey);s&&!(k&&t.isItemExpanded(e))&&t.toggleItemExpansion(w,e)}},y=w=>{p||(c||t.focusItem(w,e),n&&(w.shiftKey||w.ctrlKey||w.metaKey)?w.shiftKey?t.expandSelectionRange(w,e):t.selectItem({event:w,itemId:e,keepExistingSelection:!0}):t.selectItem({event:w,itemId:e,shouldBeSelected:!0}))},v=w=>{if(a||p)return;const k=w.nativeEvent.shiftKey;n&&k?t.expandSelectionRange(w,e):t.selectItem({event:w,itemId:e,keepExistingSelection:n,shouldBeSelected:w.target.checked})},b=w=>{(w.shiftKey||w.ctrlKey||w.metaKey||p)&&w.preventDefault()},C=()=>{Qr(t,Dt)&&t.isItemEditable(e)&&(t.isItemBeingEdited(e)?t.setEditedItemId(null):t.setEditedItemId(e))};return{disabled:p,expanded:l,selected:d,focused:c,editable:f,editing:h,disableSelection:a,checkboxSelection:o,handleExpansion:g,handleSelection:y,handleCheckboxSelection:v,handleContentClick:r,preventSelection:b,expansionTrigger:i,toggleItemEditing:C,handleSaveItemLabel:(w,k)=>{Qr(t,Dt)&&t.isItemBeingEditedRef(e)&&(t.updateItemLabel(e,k),C(),t.focusItem(w,e))},handleCancelItemLabelEditing:w=>{Qr(t,Dt)&&t.isItemBeingEditedRef(e)&&(C(),t.focusItem(w,e))}}}const US=Te("div",{name:"MuiTreeItem2DragAndDropOverlay",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>fe.shouldForwardProp(e)&&e!=="action"})(({theme:e})=>({position:"absolute",left:0,display:"flex",top:0,bottom:0,right:0,pointerEvents:"none",variants:[{props:{action:"make-child"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",borderRadius:e.shape.borderRadius,backgroundColor:e.vars?`rgba(${e.vars.palette.primary.darkChannel} / ${e.vars.palette.action.focusOpacity})`:fe.alpha(e.palette.primary.dark,e.palette.action.focusOpacity)}},{props:{action:"reorder-above"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",borderTop:`1px solid ${(e.vars||e).palette.action.active}`}},{props:{action:"reorder-below"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",borderBottom:`1px solid ${(e.vars||e).palette.action.active}`}},{props:{action:"move-to-parent"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * calc(var(--TreeView-itemDepth) - 1))",borderBottom:`1px solid ${(e.vars||e).palette.action.active}`}}]}));function HS(e){return e.action==null?null:u.jsx(US,Y({},e))}const VS=Te("input",{name:"MuiTreeItem2",slot:"LabelInput",overridesResolver:(e,t)=>t.labelInput})(({theme:e})=>Y({},e.typography.body1,{width:"100%",backgroundColor:e.palette.background.paper,borderRadius:e.shape.borderRadius,border:"none",padding:"0 2px",boxSizing:"border-box","&:focus":{outline:`1px solid ${e.palette.primary.main}`}})),GS=["classes","className","displayIcon","expansionIcon","icon","label","itemId","onClick","onMouseDown","dragAndDropOverlayProps","labelInputProps"],Vp=S.forwardRef(function(e,t){const{classes:r,className:n,displayIcon:o,expansionIcon:a,icon:i,label:s,itemId:l,onClick:c,onMouseDown:d,dragAndDropOverlayProps:p,labelInputProps:h}=e,f=mr(e,GS),{disabled:g,expanded:y,selected:v,focused:b,editing:C,editable:w,disableSelection:k,checkboxSelection:j,handleExpansion:P,handleSelection:B,handleCheckboxSelection:F,handleContentClick:L,preventSelection:m,expansionTrigger:T,toggleItemEditing:D}=Hp(l),$=i||a||o,H=S.useRef(null),J=K=>{m(K),d&&d(K)},V=K=>{L?.(K,l),!H.current?.contains(K.target)&&(T==="content"&&P(K),j||B(K),c&&c(K))},ce=K=>{K.defaultMuiPrevented||D()};return u.jsxs("div",Y({},f,{className:Fe(r.root,n,y&&r.expanded,v&&r.selected,b&&r.focused,g&&r.disabled,C&&r.editing,w&&r.editable),onClick:V,onMouseDown:J,ref:t,children:[u.jsx("div",{className:r.iconContainer,children:$}),j&&u.jsx(Lp,{className:r.checkbox,checked:v,onChange:F,disabled:g||k,ref:H,tabIndex:-1}),C?u.jsx(VS,Y({},h,{className:r.labelInput})):u.jsx("div",Y({className:r.label},w&&{onDoubleClick:ce},{children:s})),p&&u.jsx(HS,Y({},p))]}))}),hu=e=>e,KS=()=>{let e=hu;return{configure(t){e=t},generate(t){return e(t)},reset(){e=hu}}},QS=KS(),YS={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function xl(e,t,r="Mui"){const n=YS[t];return n?`${r}-${n}`:`${QS.generate(e)}-${t}`}function Gp(e,t,r="Mui"){const n={};return t.forEach(o=>{n[o]=xl(e,o,r)}),n}function XS(e){return xl("MuiTreeItem",e)}const sr=Gp("MuiTreeItem",["root","groupTransition","content","expanded","selected","focused","disabled","iconContainer","label","checkbox","labelInput","editable","editing","dragAndDropOverlay"]),Kp=Ee(u.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),Qp=Ee(u.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}));function vl(e){const{children:t,itemId:r}=e,{wrapItem:n,instance:o}=sn();return n({children:t,itemId:r,instance:o})}vl.propTypes={children:fc.node,itemId:fc.string.isRequired};const JS=["children","className","slots","slotProps","ContentComponent","ContentProps","itemId","id","label","onClick","onMouseDown","onFocus","onBlur","onKeyDown"],ZS=["ownerState"],ew=["ownerState"],tw=["ownerState"],rw=Dp(),nw=e=>{const{classes:t}=e;return $p({root:["root"],content:["content"],expanded:["expanded"],selected:["selected"],focused:["focused"],disabled:["disabled"],iconContainer:["iconContainer"],checkbox:["checkbox"],label:["label"],labelInput:["labelInput"],editing:["editing"],editable:["editable"],groupTransition:["groupTransition"]},XS,t)},ow=Te("li",{name:"MuiTreeItem",slot:"Root",overridesResolver:(e,t)=>t.root})({listStyle:"none",margin:0,padding:0,outline:0}),aw=Te(Vp,{name:"MuiTreeItem",slot:"Content",overridesResolver:(e,t)=>[t.content,t.iconContainer&&{[`& .${sr.iconContainer}`]:t.iconContainer},t.label&&{[`& .${sr.label}`]:t.label}],shouldForwardProp:e=>Tr(e)&&e!=="indentationAtItemLevel"})(({theme:e})=>({padding:e.spacing(.5,1),borderRadius:e.shape.borderRadius,width:"100%",boxSizing:"border-box",position:"relative",display:"flex",alignItems:"center",gap:e.spacing(1),cursor:"pointer",WebkitTapHighlightColor:"transparent","&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${sr.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,backgroundColor:"transparent"},[`&.${sr.focused}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${sr.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:fe.alpha(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:fe.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:fe.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${sr.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:fe.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`& .${sr.iconContainer}`]:{width:16,display:"flex",flexShrink:0,justifyContent:"center","& svg":{fontSize:18}},[`& .${sr.label}`]:Y({width:"100%",boxSizing:"border-box",minWidth:0,position:"relative"},e.typography.body1),[`& .${sr.checkbox}`]:{padding:0},variants:[{props:{indentationAtItemLevel:!0},style:{paddingLeft:`calc(${e.spacing(1)} + var(--TreeView-itemChildrenIndentation) * var(--TreeView-itemDepth))`}}]})),iw=Te(Po,{name:"MuiTreeItem",slot:"GroupTransition",overridesResolver:(e,t)=>t.groupTransition,shouldForwardProp:e=>Tr(e)&&e!=="indentationAtItemLevel"})({margin:0,padding:0,paddingLeft:"var(--TreeView-itemChildrenIndentation)",variants:[{props:{indentationAtItemLevel:!0},style:{paddingLeft:0}}]}),sw=S.forwardRef(function(e,t){const{icons:r,runItemPlugins:n,items:{disabledItemsFocusable:o,indentationAtItemLevel:a},selection:{disableSelection:i},expansion:{expansionTrigger:s},treeId:l,instance:c}=sn(),d=S.useContext(yl),p=rw({props:e,name:"MuiTreeItem"}),{children:h,className:f,slots:g,slotProps:y,ContentComponent:v=Vp,ContentProps:b,itemId:C,id:w,label:k,onClick:j,onMouseDown:P,onBlur:B,onKeyDown:F}=p,L=mr(p,JS),{expanded:m,focused:T,selected:D,disabled:$,editing:H,handleExpansion:J,handleCancelItemLabelEditing:V,handleSaveItemLabel:ce}=Hp(C),{contentRef:K,rootRef:se,propsEnhancers:Z}=n(p),X=S.useRef(null),U=S.useRef(null),O=On(t,se,X),q=On(b?.ref,K,U),oe={expandIcon:g?.expandIcon??r.slots.expandIcon??Kp,collapseIcon:g?.collapseIcon??r.slots.collapseIcon??Qp,endIcon:g?.endIcon??r.slots.endIcon,icon:g?.icon,groupTransition:g?.groupTransition},Pe=ge=>Array.isArray(ge)?ge.length>0&&ge.some(Pe):!!ge,it=Pe(h),ht=Y({},p,{expanded:m,focused:T,selected:D,disabled:$,indentationAtItemLevel:a}),Ae=nw(ht),_e=oe.groupTransition??void 0,jt=Gr({elementType:_e,ownerState:{},externalSlotProps:y?.groupTransition,additionalProps:Y({unmountOnExit:!0,in:m,component:"ul",role:"group"},a?{indentationAtItemLevel:!0}:{}),className:Ae.groupTransition}),xr=ge=>{s==="iconContainer"&&J(ge)},Ut=m?oe.collapseIcon:oe.expandIcon,dt=Gr({elementType:Ut,ownerState:{},externalSlotProps:ge=>m?Y({},ur(r.slotProps.collapseIcon,ge),ur(y?.collapseIcon,ge)):Y({},ur(r.slotProps.expandIcon,ge),ur(y?.expandIcon,ge)),additionalProps:{onClick:xr}}),Lr=mr(dt,ZS),Qt=it&&Ut?u.jsx(Ut,Y({},Lr)):null,ot=it?void 0:oe.endIcon,Ht=Gr({elementType:ot,ownerState:{},externalSlotProps:ge=>it?{}:Y({},ur(r.slotProps.endIcon,ge),ur(y?.endIcon,ge))}),vr=mr(Ht,ew),Sr=ot?u.jsx(ot,Y({},vr)):null,ae=oe.icon,ne=Gr({elementType:ae,ownerState:{},externalSlotProps:y?.icon}),$r=mr(ne,tw),Wo=ae?u.jsx(ae,Y({},$r)):null;let wr;D?wr=!0:i||$?wr=void 0:wr=!1;function Yt(ge){!T&&(!$||o)&&ge.currentTarget===ge.target&&c.focusItem(ge,C)}function Vt(ge){B?.(ge),!(H||ge.relatedTarget&&jo(ge.relatedTarget,X.current)&&(ge.target&&ge.target?.dataset?.element==="labelInput"&&jo(ge.target,X.current)||ge.relatedTarget?.dataset?.element==="labelInput"))&&c.removeFocusedItem()}const Uo=ge=>{F?.(ge),ge.target?.dataset?.element!=="labelInput"&&c.handleItemKeyDown(ge,C)},Wn=bl({itemId:C,treeId:l,id:w}),vi=c.canItemBeTabbed(C)?0:-1,ft={rootRefObject:X,contentRefObject:U,interactions:{handleSaveItemLabel:ce,handleCancelItemLabelEditing:V}},Ho=Z.root?.(Y({},ft,{externalEventHandlers:Mt(L)}))??{},Vo=Z.content?.(Y({},ft,{externalEventHandlers:Mt(b)}))??{},Un=Z.dragAndDropOverlay?.(Y({},ft,{externalEventHandlers:{}}))??{},Go=Z.labelInput?.(Y({},ft,{externalEventHandlers:{}}))??{};return u.jsx(vl,{itemId:C,children:u.jsxs(ow,Y({className:Fe(Ae.root,f),role:"treeitem","aria-expanded":it?m:void 0,"aria-selected":wr,"aria-disabled":$||void 0,id:Wn,tabIndex:vi},L,{ownerState:ht,onFocus:Yt,onBlur:Vt,onKeyDown:Uo,ref:O,style:a?Y({},L.style,{"--TreeView-itemDepth":typeof d=="function"?d(C):d}):L.style},Ho,{children:[u.jsx(aw,Y({as:v,classes:{root:Ae.content,expanded:Ae.expanded,selected:Ae.selected,focused:Ae.focused,disabled:Ae.disabled,editable:Ae.editable,editing:Ae.editing,iconContainer:Ae.iconContainer,label:Ae.label,labelInput:Ae.labelInput,checkbox:Ae.checkbox},label:k,itemId:C,onClick:j,onMouseDown:P,icon:Wo,expansionIcon:Qt,displayIcon:Sr,ownerState:ht},b,Vo,Un.action==null?{}:{dragAndDropOverlayProps:Un},Go.value==null?{}:{labelInputProps:Go},{ref:q})),h&&u.jsx(iw,Y({as:_e},jt,{children:h}))]}))})});function lw(e){const{slots:t,slotProps:r,status:n}=e,o=sn(),a=Y({},o.icons.slots,{expandIcon:o.icons.slots.expandIcon??Kp,collapseIcon:o.icons.slots.collapseIcon??Qp}),i=o.icons.slotProps;let s;t?.icon?s="icon":n.expandable?n.expanded?s="collapseIcon":s="expandIcon":s="endIcon";const l=t?.[s]??a[s],c=Gr({elementType:l,externalSlotProps:d=>Y({},ur(i[s],d),ur(r?.[s],d)),ownerState:{}});return l?u.jsx(l,Y({},c)):null}const cw=["visible"],uw=Te("li",{name:"MuiTreeItem2",slot:"Root",overridesResolver:(e,t)=>t.root})({listStyle:"none",margin:0,padding:0,outline:0}),dw=Te("div",{name:"MuiTreeItem2",slot:"Content",overridesResolver:(e,t)=>t.content,shouldForwardProp:e=>Tr(e)&&e!=="status"&&e!=="indentationAtItemLevel"})(({theme:e})=>({padding:e.spacing(.5,1),borderRadius:e.shape.borderRadius,width:"100%",boxSizing:"border-box",position:"relative",display:"flex",alignItems:"center",gap:e.spacing(1),cursor:"pointer",WebkitTapHighlightColor:"transparent","&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{indentationAtItemLevel:!0},style:{paddingLeft:`calc(${e.spacing(1)} + var(--TreeView-itemChildrenIndentation) * var(--TreeView-itemDepth))`}},{props:({status:t})=>t.disabled,style:{opacity:(e.vars||e).palette.action.disabledOpacity,backgroundColor:"transparent"}},{props:({status:t})=>t.focused,style:{backgroundColor:(e.vars||e).palette.action.focus}},{props:({status:t})=>t.selected,style:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:fe.alpha(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:fe.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:fe.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}}}},{props:({status:t})=>t.selected&&t.focused,style:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:fe.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}]})),pw=Te("div",{name:"MuiTreeItem2",slot:"Label",overridesResolver:(e,t)=>t.label,shouldForwardProp:e=>Tr(e)&&e!=="editable"})(({theme:e})=>Y({width:"100%",boxSizing:"border-box",minWidth:0,position:"relative",overflow:"hidden"},e.typography.body1,{variants:[{props:({editable:t})=>t,style:{paddingLeft:"2px"}}]})),hw=Te("div",{name:"MuiTreeItem2",slot:"IconContainer",overridesResolver:(e,t)=>t.iconContainer})({width:16,display:"flex",flexShrink:0,justifyContent:"center","& svg":{fontSize:18}});Te(Po,{name:"MuiTreeItem2",slot:"GroupTransition",overridesResolver:(e,t)=>t.groupTransition,shouldForwardProp:e=>Tr(e)&&e!=="indentationAtItemLevel"})({margin:0,padding:0,paddingLeft:"var(--TreeView-itemChildrenIndentation)",variants:[{props:{indentationAtItemLevel:!0},style:{paddingLeft:0}}]});Te(S.forwardRef((e,t)=>{const{visible:r}=e,n=mr(e,cw);return r?u.jsx(Lp,Y({},n,{ref:t})):null}),{name:"MuiTreeItem2",slot:"Checkbox",overridesResolver:(e,t)=>t.checkbox})({padding:0});function mw(e){return xl("MuiRichTreeView",e)}Gp("MuiRichTreeView",["root"]);const fw=(e,t)=>{const r=S.useRef({}),[n,o]=S.useState(()=>{const a={};return e.forEach(i=>{i.models&&Object.entries(i.models).forEach(([s,l])=>{r.current[s]={isControlled:t[s]!==void 0,getDefaultValue:l.getDefaultValue},a[s]=l.getDefaultValue(t)})}),a});return Object.fromEntries(Object.entries(r.current).map(([a,i])=>{const s=t[a]??n[a];return[a,{value:s,setControlledValue:l=>{i.isControlled||o(c=>Y({},c,{[a]:l}))}}]}))};class gw{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(t,r,n={}){let o=this.events[t];o||(o={highPriority:new Map,regular:new Map},this.events[t]=o),n.isFirst?o.highPriority.set(r,!0):o.regular.set(r,!0)}removeListener(t,r){this.events[t]&&(this.events[t].regular.delete(r),this.events[t].highPriority.delete(r))}removeAllListeners(){this.events={}}emit(t,...r){const n=this.events[t];if(!n)return;const o=Array.from(n.highPriority.keys()),a=Array.from(n.regular.keys());for(let i=o.length-1;i>=0;i-=1){const s=o[i];n.highPriority.has(s)&&s.apply(this,r)}for(let i=0;i<a.length;i+=1){const s=a[i];n.regular.has(s)&&s.apply(this,r)}}once(t,r){const n=this;this.on(t,function o(...a){n.removeListener(t,o),r.apply(n,a)})}}const yw=e=>e.isPropagationStopped!==void 0,Yp=()=>{const[e]=S.useState(()=>new gw),t=S.useCallback((...n)=>{const[o,a,i={}]=n;i.defaultMuiPrevented=!1,!(yw(i)&&i.isPropagationStopped())&&e.emit(o,a,i)},[e]),r=S.useCallback((n,o)=>(e.on(n,o),()=>{e.removeListener(n,o)}),[e]);return{instance:{$$publishEvent:t,$$subscribeEvent:r}}};Yp.params={};const Xp=({plugins:e})=>{const t=new Set(e);return{instance:{getAvailablePlugins:()=>t}}};Xp.params={};const Sl=({params:e,state:t,setState:r})=>{S.useEffect(()=>{r(o=>o.id.treeId===e.id&&o.id.treeId!==void 0?o:Y({},o,{id:Y({},o.id,{treeId:e.id??FS()})}))},[r,e.id]);const n=e.id??t.id.treeId;return{getRootProps:()=>({id:n}),contextValue:{treeId:n}}};Sl.params={id:!0};Sl.getInitialState=({id:e})=>({id:{treeId:e??void 0}});const bw=[Yp,Xp,Sl],xw=["slots","slotProps","apiRef","experimentalFeatures"],vw=e=>{let{props:{slots:t,slotProps:r,apiRef:n,experimentalFeatures:o},plugins:a}=e,i=mr(e.props,xw);const s={};a.forEach(h=>{Object.assign(s,h.params)});const l={},c={};Object.keys(i).forEach(h=>{const f=i[h];s[h]?l[h]=f:c[h]=f});const d=o??{},p=a.reduce((h,f)=>f.getDefaultizedParams?f.getDefaultizedParams({params:h,experimentalFeatures:d}):h,l);return{apiRef:n,forwardedProps:c,pluginParams:p,slots:t??{},slotProps:r??{},experimentalFeatures:d}},Sw=({plugins:e,instance:t,publicAPI:r,rootRef:n})=>({runItemPlugins:o=>{let a=null,i=null;const s=[],l={};e.forEach(p=>{if(!p.itemPlugin)return;const h=p.itemPlugin({props:o,rootRef:a,contentRef:i});h?.rootRef&&(a=h.rootRef),h?.contentRef&&(i=h.contentRef),h?.propsEnhancers&&(s.push(h.propsEnhancers),Object.keys(h.propsEnhancers).forEach(f=>{l[f]=!0}))});const c=p=>h=>{const f={};return s.forEach(g=>{const y=g[p];y!=null&&Object.assign(f,y(h))}),f},d=Object.fromEntries(Object.keys(l).map(p=>[p,c(p)]));return{contentRef:i,rootRef:a,propsEnhancers:d}},wrapItem:({itemId:o,children:a})=>{let i=a;for(let s=e.length-1;s>=0;s-=1){const l=e[s];l.wrapItem&&(i=l.wrapItem({itemId:o,children:i,instance:t}))}return i},wrapRoot:({children:o})=>{let a=o;for(let i=e.length-1;i>=0;i-=1){const s=e[i];s.wrapRoot&&(a=s.wrapRoot({children:a,instance:t}))}return a},instance:t,rootRef:n,publicAPI:r});function ww(e){const t=S.useRef({});return e?(e.current==null&&(e.current={}),e.current):t.current}const Cw=({plugins:e,rootRef:t,props:r})=>{const n=[...bw,...e],{pluginParams:o,forwardedProps:a,apiRef:i,experimentalFeatures:s,slots:l,slotProps:c}=vw({plugins:n,props:r}),d=fw(n,o),p=S.useRef({}).current,h=ww(i),f=S.useRef(null),g=On(f,t),y=Sw({plugins:n,instance:p,publicAPI:h,rootRef:f}),[v,b]=S.useState(()=>{const k={};return n.forEach(j=>{j.getInitialState&&Object.assign(k,j.getInitialState(o))}),k}),C=[],w=k=>{const j=k({instance:p,params:o,slots:l,slotProps:c,experimentalFeatures:s,state:v,setState:b,rootRef:f,models:d,plugins:n});j.getRootProps&&C.push(j.getRootProps),j.publicAPI&&Object.assign(h,j.publicAPI),j.instance&&Object.assign(p,j.instance),j.contextValue&&Object.assign(y,j.contextValue)};return n.forEach(w),{getRootProps:(k={})=>{const j=Y({role:"tree"},a,k,{ref:g});return C.forEach(P=>{Object.assign(j,P(k))}),j},rootRef:g,contextValue:y,instance:p}},kw=(e,t,r)=>{e.$$publishEvent(t,r)},In="__TREE_VIEW_ROOT_PARENT_ID__",Pw=e=>{const t={};return e.forEach((r,n)=>{t[r]=n}),t},Iw=["children"],Jp=({items:e,isItemDisabled:t,getItemLabel:r,getItemId:n})=>{const o={},a={},i={[In]:[]},s=(c,d,p)=>{const h=n?n(c):c.id;if(h==null)throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.","Alternatively, you can use the `getItemId` prop to specify a custom id for each item.","An item was provided without id in the `items` prop:",JSON.stringify(c)].join(`
|
|
129
|
+
`,W_=_.forwardRef(function(e,t){const n=Ti({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:o={},className:i,...a}=n,[s,l]=_.useState([]),c=_.useRef(0),d=_.useRef(null);_.useEffect(()=>{d.current&&(d.current(),d.current=null)},[s]);const u=_.useRef(!1),h=xy(),p=_.useRef(null),g=_.useRef(null),b=_.useCallback(x=>{const{pulsate:k,rippleX:w,rippleY:S,rippleSize:B,cb:W}=x;l(U=>[...U,f.jsx(q_,{classes:{ripple:kt(o.ripple,Mn.ripple),rippleVisible:kt(o.rippleVisible,Mn.rippleVisible),ripplePulsate:kt(o.ripplePulsate,Mn.ripplePulsate),child:kt(o.child,Mn.child),childLeaving:kt(o.childLeaving,Mn.childLeaving),childPulsate:kt(o.childPulsate,Mn.childPulsate)},timeout:Hu,pulsate:k,rippleX:w,rippleY:S,rippleSize:B},c.current)]),c.current+=1,d.current=W},[o]),T=_.useCallback((x={},k={},w=()=>{})=>{const{pulsate:S=!1,center:B=r||k.pulsate,fakeElement:W=!1}=k;if(x?.type==="mousedown"&&u.current){u.current=!1;return}x?.type==="touchstart"&&(u.current=!0);const U=W?null:g.current,y=U?U.getBoundingClientRect():{width:0,height:0,left:0,top:0};let R,F,M;if(B||x===void 0||x.clientX===0&&x.clientY===0||!x.clientX&&!x.touches)R=Math.round(y.width/2),F=Math.round(y.height/2);else{const{clientX:z,clientY:X}=x.touches&&x.touches.length>0?x.touches[0]:x;R=Math.round(z-y.left),F=Math.round(X-y.top)}if(B)M=Math.sqrt((2*y.width**2+y.height**2)/3),M%2===0&&(M+=1);else{const z=Math.max(Math.abs((U?U.clientWidth:0)-R),R)*2+2,X=Math.max(Math.abs((U?U.clientHeight:0)-F),F)*2+2;M=Math.sqrt(z**2+X**2)}x?.touches?p.current===null&&(p.current=()=>{b({pulsate:S,rippleX:R,rippleY:F,rippleSize:M,cb:w})},h.start(H_,()=>{p.current&&(p.current(),p.current=null)})):b({pulsate:S,rippleX:R,rippleY:F,rippleSize:M,cb:w})},[r,b,h]),E=_.useCallback(()=>{T({},{pulsate:!0})},[T]),C=_.useCallback((x,k)=>{if(h.clear(),x?.type==="touchend"&&p.current){p.current(),p.current=null,h.start(0,()=>{C(x,k)});return}p.current=null,l(w=>w.length>0?w.slice(1):w),d.current=k},[h]);return _.useImperativeHandle(t,()=>({pulsate:E,start:T,stop:C}),[E,T,C]),f.jsx(G_,{className:kt(Mn.root,o.root,i),ref:g,...a,children:f.jsx(eh,{component:null,exit:!0,children:s})})});function V_(e){return Ei("MuiButtonBase",e)}const Y_=xi("MuiButtonBase",["root","disabled","focusVisible"]),K_=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=$a({root:["root",t&&"disabled",n&&"focusVisible"]},V_,o);return n&&r&&(i.root+=` ${r}`),i},Q_=ut("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Y_.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),X_=_.forwardRef(function(e,t){const n=Ti({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:o=!1,children:i,className:a,component:s="button",disabled:l=!1,disableRipple:c=!1,disableTouchRipple:d=!1,focusRipple:u=!1,focusVisibleClassName:h,LinkComponent:p="a",onBlur:g,onClick:b,onContextMenu:T,onDragLeave:E,onFocus:C,onFocusVisible:x,onKeyDown:k,onKeyUp:w,onMouseDown:S,onMouseLeave:B,onMouseUp:W,onTouchEnd:U,onTouchMove:y,onTouchStart:R,tabIndex:F=0,TouchRippleProps:M,touchRippleRef:z,type:X,...Z}=n,me=_.useRef(null),ce=F_(),ee=el(ce.ref,z),[I,ue]=_.useState(!1);l&&I&&ue(!1),_.useImperativeHandle(r,()=>({focusVisible:()=>{ue(!0),me.current.focus()}}),[]);const J=ce.shouldMount&&!c&&!l;_.useEffect(()=>{I&&u&&!c&&ce.pulsate()},[c,u,I,ce]);const A=br(ce,"start",S,d),Q=br(ce,"stop",T,d),ge=br(ce,"stop",E,d),de=br(ce,"stop",W,d),ye=br(ce,"stop",Se=>{I&&Se.preventDefault(),B&&B(Se)},d),he=br(ce,"start",R,d),Fe=br(ce,"stop",U,d),Be=br(ce,"stop",y,d),xe=br(ce,"stop",Se=>{Ef(Se.target)||ue(!1),g&&g(Se)},!1),dt=Rs(Se=>{me.current||(me.current=Se.currentTarget),Ef(Se.target)&&(ue(!0),x&&x(Se)),C&&C(Se)}),Ze=()=>{const Se=me.current;return s&&s!=="button"&&!(Se.tagName==="A"&&Se.href)},be=Rs(Se=>{u&&!Se.repeat&&I&&Se.key===" "&&ce.stop(Se,()=>{ce.start(Se)}),Se.target===Se.currentTarget&&Ze()&&Se.key===" "&&Se.preventDefault(),k&&k(Se),Se.target===Se.currentTarget&&Ze()&&Se.key==="Enter"&&!l&&(Se.preventDefault(),b&&b(Se))}),Jt=Rs(Se=>{u&&Se.key===" "&&I&&!Se.defaultPrevented&&ce.stop(Se,()=>{ce.pulsate(Se)}),w&&w(Se),b&&Se.target===Se.currentTarget&&Ze()&&Se.key===" "&&!Se.defaultPrevented&&b(Se)});let bt=s;bt==="button"&&(Z.href||Z.to)&&(bt=p);const _e={};bt==="button"?(_e.type=X===void 0?"button":X,_e.disabled=l):(!Z.href&&!Z.to&&(_e.role="button"),l&&(_e["aria-disabled"]=l));const St=el(t,me),ht={...n,centerRipple:o,component:s,disabled:l,disableRipple:c,disableTouchRipple:d,focusRipple:u,tabIndex:F,focusVisible:I},pt=K_(ht);return f.jsxs(Q_,{as:bt,className:kt(pt.root,a),ownerState:ht,onBlur:xe,onClick:b,onContextMenu:Q,onFocus:dt,onKeyDown:be,onKeyUp:Jt,onMouseDown:A,onMouseLeave:ye,onMouseUp:de,onDragLeave:ge,onTouchEnd:Fe,onTouchMove:Be,onTouchStart:he,ref:St,tabIndex:l?-1:F,type:X,..._e,...Z,children:[i,J?f.jsx(W_,{ref:ee,center:o,...M}):null]})});function br(e,t,n,r=!1){return Rs(o=>(n&&n(o),r||e[t](o),!0))}function J_(e){return Ei("PrivateSwitchBase",e)}xi("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);function Z_(e){return typeof e=="string"}function eD(e,t,n){return e===void 0||Z_(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function tD(e,t,n){return typeof e=="function"?e(t,n):e}function nD(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function Tf(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function rD(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const p=kt(n?.className,i,o?.className,r?.className),g={...n?.style,...o?.style,...r?.style},b={...n,...o,...r};return p.length>0&&(b.className=p),Object.keys(g).length>0&&(b.style=g),{props:b,internalRef:void 0}}const a=nD({...o,...r}),s=Tf(r),l=Tf(o),c=t(a),d=kt(c?.className,n?.className,i,o?.className,r?.className),u={...c?.style,...n?.style,...o?.style,...r?.style},h={...c,...n,...l,...s};return d.length>0&&(h.className=d),Object.keys(u).length>0&&(h.style=u),{props:h,internalRef:c.ref}}function Uu(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,internalForwardedProps:a,shouldForwardComponentProp:s=!1,...l}=t,{component:c,slots:d={[e]:void 0},slotProps:u={[e]:void 0},...h}=i,p=d[e]||r,g=tD(u[e],o),{props:{component:b,...T},internalRef:E}=rD({className:n,...l,externalForwardedProps:e==="root"?h:void 0,externalSlotProps:g}),C=el(E,g?.ref,t.ref),x=e==="root"?b||c:b,k=eD(p,{...e==="root"&&!c&&!d[e]&&a,...e!=="root"&&!d[e]&&a,...T,...x&&!s&&{as:x},...x&&s&&{component:x},ref:C},o);return[p,k]}const oD=e=>{const{classes:t,checked:n,disabled:r,edge:o}=e,i={root:["root",n&&"checked",r&&"disabled",o&&`edge${Jn(o)}`],input:["input"]};return $a(i,J_,t)},iD=ut(X_)({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e==="start"&&t.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e==="end"&&t.size!=="small",style:{marginRight:-12}}]}),aD=ut("input",{shouldForwardProp:zd})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),sD=_.forwardRef(function(e,t){const{autoFocus:n,checked:r,checkedIcon:o,defaultChecked:i,disabled:a,disableFocusRipple:s=!1,edge:l=!1,icon:c,id:d,inputProps:u,inputRef:h,name:p,onBlur:g,onChange:b,onFocus:T,readOnly:E,required:C=!1,tabIndex:x,type:k,value:w,slots:S={},slotProps:B={},...W}=e,[U,y]=PS({controlled:r,default:!!i}),R=M_(),F=Q=>{T&&T(Q),R&&R.onFocus&&R.onFocus(Q)},M=Q=>{g&&g(Q),R&&R.onBlur&&R.onBlur(Q)},z=Q=>{if(Q.nativeEvent.defaultPrevented)return;const ge=Q.target.checked;y(ge),b&&b(Q,ge)};let X=a;R&&typeof X>"u"&&(X=R.disabled);const Z=k==="checkbox"||k==="radio",me={...e,checked:U,disabled:X,disableFocusRipple:s,edge:l},ce=oD(me),ee={slots:S,slotProps:{input:u,...B}},[I,ue]=Uu("root",{ref:t,elementType:iD,className:ce.root,shouldForwardComponentProp:!0,externalForwardedProps:{...ee,component:"span",...W},getSlotProps:Q=>({...Q,onFocus:ge=>{Q.onFocus?.(ge),F(ge)},onBlur:ge=>{Q.onBlur?.(ge),M(ge)}}),ownerState:me,additionalProps:{centerRipple:!0,focusRipple:!s,disabled:X,role:void 0,tabIndex:null}}),[J,A]=Uu("input",{ref:h,elementType:aD,className:ce.input,externalForwardedProps:ee,getSlotProps:Q=>({...Q,onChange:ge=>{Q.onChange?.(ge),z(ge)}}),ownerState:me,additionalProps:{autoFocus:n,checked:r,defaultChecked:i,disabled:X,id:Z?d:void 0,name:p,readOnly:E,required:C,tabIndex:x,type:k,...k==="checkbox"&&w===void 0?{}:{value:w}}});return f.jsxs(I,{...ue,children:[f.jsx(J,{...A}),U?o:c]})}),lD=ct(f.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"})),cD=ct(f.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})),uD=ct(f.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}));function dD(e){return Ei("MuiCheckbox",e)}const jc=xi("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]);function hD(e){return typeof e.main=="string"}function pD(e,t=[]){if(!hD(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function xf(e=[]){return([,t])=>t&&pD(t,e)}const fD=e=>{const{classes:t,indeterminate:n,color:r,size:o}=e,i={root:["root",n&&"indeterminate",`color${Jn(r)}`,`size${Jn(o)}`]},a=$a(i,dD,t);return{...t,...a}},mD=ut(sD,{shouldForwardProp:e=>zd(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${Jn(n.size)}`],n.color!=="default"&&t[`color${Jn(n.color)}`]]}})($d(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:vu(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(xf()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:vu(e.palette[t].main,e.palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(xf()).map(([t])=>({props:{color:t},style:{[`&.${jc.checked}, &.${jc.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${jc.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),gD=f.jsx(cD,{}),yD=f.jsx(lD,{}),bD=f.jsx(uD,{}),Cy=_.forwardRef(function(e,t){const n=Ti({props:e,name:"MuiCheckbox"}),{checkedIcon:r=gD,color:o="primary",icon:i=yD,indeterminate:a=!1,indeterminateIcon:s=bD,inputProps:l,size:c="medium",disableRipple:d=!1,className:u,slots:h={},slotProps:p={},...g}=n,b=a?s:i,T=a?s:r,E={...n,disableRipple:d,color:o,indeterminate:a,size:c},C=fD(E),x=p.input??l,[k,w]=Uu("root",{ref:t,elementType:mD,className:kt(C.root,u),shouldForwardComponentProp:!0,externalForwardedProps:{slots:h,slotProps:p,...g},ownerState:E,additionalProps:{type:"checkbox",icon:_.cloneElement(b,{fontSize:b.props.fontSize??c}),checkedIcon:_.cloneElement(T,{fontSize:T.props.fontSize??c}),disableRipple:d,slots:h,slotProps:{input:LS(typeof x=="function"?x(E):x,{"data-indeterminate":a})}}});return f.jsx(k,{...w,classes:C})});function mi(...e){const t=_.useRef(void 0),n=_.useCallback(r=>{const o=e.map(i=>{if(i==null)return null;if(typeof i=="function"){const a=i,s=a(r);return typeof s=="function"?s:()=>{a(null)}}return i.current=r,()=>{i.current=null}});return()=>{o.forEach(i=>i?.())}},e);return _.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function ED(e){return typeof e=="string"}function TD(e,t,n){return e===void 0||ED(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function Ln(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function Cf(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function xD(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const p=kt(n?.className,i,o?.className,r?.className),g={...n?.style,...o?.style,...r?.style},b={...n,...o,...r};return p.length>0&&(b.className=p),Object.keys(g).length>0&&(b.style=g),{props:b,internalRef:void 0}}const a=Ln({...o,...r}),s=Cf(r),l=Cf(o),c=t(a),d=kt(c?.className,n?.className,i,o?.className,r?.className),u={...c?.style,...n?.style,...o?.style,...r?.style},h={...c,...n,...l,...s};return d.length>0&&(h.className=d),Object.keys(u).length>0&&(h.style=u),{props:h,internalRef:c.ref}}function vr(e,t,n){return typeof e=="function"?e(t,n):e}function fo(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:vr(n,r),{props:s,internalRef:l}=xD({...i,externalSlotProps:a}),c=mi(l,a?.ref,e.additionalProps?.ref);return TD(t,{...s,ref:c},r)}function vy(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let a="",s=!0;for(let l=0;l<i.length;l+=1){const c=i[l];c&&(a+=(s===!0?"":" ")+t(c),s=!1,n&&n[c]&&(a+=" "+n[c]))}r[o]=a}return r}function Sy(e){return T_}const Ay=_.createContext(null);function CD(e){const{value:t,children:n}=e;return f.jsx(Ay.Provider,{value:t,children:t.wrapRoot({children:n,instance:t.instance})})}const Ro=()=>{const e=_.useContext(Ay);if(e==null)throw new Error(["MUI X: Could not find the Tree View context.","It looks like you rendered your component outside of a SimpleTreeView or RichTreeView parent component.","This can also happen if you are bundling multiple versions of the Tree View."].join(`
|
|
130
|
+
`));return e},vD=({props:e})=>{const{instance:t}=Ro(),{label:n,itemId:r}=e,[o,i]=_.useState(n),a=t.isItemBeingEdited(r);return _.useEffect(()=>{a||i(n)},[a,n]),{propsEnhancers:{labelInput:({externalEventHandlers:s,interactions:l})=>t.isItemEditable(r)?{value:o??"","data-element":"labelInput",onChange:c=>{s.onChange?.(c),i(c.target.value)},onKeyDown:c=>{if(s.onKeyDown?.(c),c.defaultMuiPrevented)return;const d=c.target;c.key==="Enter"&&d.value?l.handleSaveItemLabel(c,d.value):c.key==="Escape"&&l.handleCancelItemLabelEditing(c)},onBlur:c=>{s.onBlur?.(c),!c.defaultMuiPrevented&&c.target.value&&l.handleSaveItemLabel(c,c.target.value)},autoFocus:!0,type:"text"}:{}}}},$n=({instance:e,state:t,setState:n,params:r})=>{const o=_.useRef(t.editedItemId),i=u=>o.current===u,a=u=>{n(h=>Te({},h,{editedItemId:u})),o.current=u},s=u=>u===t.editedItemId,l=!!r.isItemEditable,c=u=>{if(u==null||!l)return!1;const h=e.getItem(u);return h?typeof r.isItemEditable=="function"?r.isItemEditable(h):!!r.isItemEditable:!1},d=(u,h)=>{if(!h)throw new Error(["MUI X: The Tree View component requires all items to have a `label` property.","The label of an item cannot be empty.",u].join(`
|
|
131
|
+
`));n(p=>{const g=p.items.itemMetaMap[u];return g.label!==h?Te({},p,{items:Te({},p.items,{itemMetaMap:Te({},p.items.itemMetaMap,{[u]:Te({},g,{label:h})})})}):p}),r.onItemLabelChange&&r.onItemLabelChange(u,h)};return{instance:{setEditedItemId:a,isItemBeingEdited:s,updateItemLabel:d,isItemEditable:c,isTreeViewEditable:l,isItemBeingEditedRef:i},publicAPI:{updateItemLabel:d}}};$n.itemPlugin=vD;$n.getDefaultizedParams=({params:e,experimentalFeatures:t})=>{const n=t?.labelEditing;return Te({},e,{isItemEditable:n?e.isItemEditable??!1:!1})};$n.getInitialState=()=>({editedItemId:null});$n.params={onItemLabelChange:!0,isItemEditable:!0};const yo=(e,t)=>e.getAvailablePlugins().has(t),ky=e=>Array.isArray(e)?e.length>0&&e.some(ky):!!e,SD=({itemId:e,children:t})=>{const{instance:n,selection:{multiSelect:r},publicAPI:o}=Ro(),i={expandable:ky(t),expanded:n.isItemExpanded(e),focused:n.isItemFocused(e),selected:n.isItemSelected(e),disabled:n.isItemDisabled(e),editing:n?.isItemBeingEdited?n?.isItemBeingEdited(e):!1,editable:n.isItemEditable?n.isItemEditable(e):!1},a=d=>{if(i.disabled)return;i.focused||n.focusItem(d,e);const u=r&&(d.shiftKey||d.ctrlKey||d.metaKey);i.expandable&&!(u&&n.isItemExpanded(e))&&n.toggleItemExpansion(d,e)},s=d=>{i.disabled||(i.focused||n.focusItem(d,e),r&&(d.shiftKey||d.ctrlKey||d.metaKey)?d.shiftKey?n.expandSelectionRange(d,e):n.selectItem({event:d,itemId:e,keepExistingSelection:!0}):n.selectItem({event:d,itemId:e,shouldBeSelected:!0}))},l=d=>{const u=d.nativeEvent.shiftKey;r&&u?n.expandSelectionRange(d,e):n.selectItem({event:d,itemId:e,keepExistingSelection:r,shouldBeSelected:d.target.checked})},c=()=>{yo(n,$n)&&n.isItemEditable(e)&&(n.isItemBeingEdited(e)?n.setEditedItemId(null):n.setEditedItemId(e))};return{interactions:{handleExpansion:a,handleSelection:s,handleCheckboxSelection:l,toggleItemEditing:c,handleSaveItemLabel:(d,u)=>{yo(n,$n)&&n.isItemBeingEditedRef(e)&&(n.updateItemLabel(e,u),c(),n.focusItem(d,e))},handleCancelItemLabelEditing:d=>{yo(n,$n)&&n.isItemBeingEditedRef(e)&&(c(),n.focusItem(d,e))}},status:i,publicAPI:o}},nh=_.createContext(()=>-1),_y=(e,t)=>{let n=t.length-1;for(;n>=0&&!e.isItemNavigable(t[n]);)n-=1;if(n!==-1)return t[n]},Dy=(e,t)=>{const n=e.getItemMeta(t),r=e.getItemOrderedChildrenIds(n.parentId),o=e.getItemIndex(t);if(o===0)return n.parentId;let i=o-1;for(;!e.isItemNavigable(r[i])&&i>=0;)i-=1;if(i===-1)return n.parentId==null?null:Dy(e,n.parentId);let a=r[i],s=_y(e,e.getItemOrderedChildrenIds(a));for(;e.isItemExpanded(a)&&s!=null;)a=s,s=e.getItemOrderedChildrenIds(a).find(e.isItemNavigable);return a},Ms=(e,t)=>{if(e.isItemExpanded(t)){const r=e.getItemOrderedChildrenIds(t).find(e.isItemNavigable);if(r!=null)return r}let n=e.getItemMeta(t);for(;n!=null;){const r=e.getItemOrderedChildrenIds(n.parentId),o=e.getItemIndex(n.id);if(o<r.length-1){let i=o+1;for(;!e.isItemNavigable(r[i])&&i<r.length-1;)i+=1;if(e.isItemNavigable(r[i]))return r[i]}n=e.getItemMeta(n.parentId)}return null},Iy=e=>{let t=null;for(;t==null||e.isItemExpanded(t);){const n=e.getItemOrderedChildrenIds(t),r=_y(e,n);if(r==null)return t;t=r}return t},La=e=>e.getItemOrderedChildrenIds(null).find(e.isItemNavigable),wy=(e,t,n)=>{if(t===n)return[t,n];const r=e.getItemMeta(t),o=e.getItemMeta(n);if(r.parentId===o.id||o.parentId===r.id)return o.parentId===r.id?[r.id,o.id]:[o.id,r.id];const i=[r.id],a=[o.id];let s=r.parentId,l=o.parentId,c=a.indexOf(s)!==-1,d=i.indexOf(l)!==-1,u=!0,h=!0;for(;!d&&!c;)u&&(i.push(s),c=a.indexOf(s)!==-1,u=s!==null,!c&&u&&(s=e.getItemMeta(s).parentId)),h&&!c&&(a.push(l),d=i.indexOf(l)!==-1,h=l!==null,!d&&h&&(l=e.getItemMeta(l).parentId));const p=c?s:l,g=e.getItemOrderedChildrenIds(p),b=i[i.indexOf(p)-1],T=a[a.indexOf(p)-1];return g.indexOf(b)<g.indexOf(T)?[t,n]:[n,t]},AD=(e,t,n)=>{const r=l=>{if(e.isItemExpandable(l)&&e.isItemExpanded(l))return e.getItemOrderedChildrenIds(l)[0];let c=e.getItemMeta(l);for(;c!=null;){const d=e.getItemOrderedChildrenIds(c.parentId),u=e.getItemIndex(c.id);if(u<d.length-1)return d[u+1];c=e.getItemMeta(c.parentId)}throw new Error("Invalid range")},[o,i]=wy(e,t,n),a=[o];let s=o;for(;s!==i;)s=r(s),e.isItemDisabled(s)||a.push(s);return a},kD=e=>{let t=La(e);const n=[];for(;t!=null;)n.push(t),t=Ms(e,t);return n},Oa=(e,t)=>t!==e.closest('*[role="treeitem"]');let vf=0;const _D=()=>(vf+=1,`mui-tree-view-${vf}`),rh=({id:e,treeId:t="",itemId:n})=>e??`${t}-${n}`,DD=e=>{const{runItemPlugins:t,items:{onItemClick:n,disabledItemsFocusable:r,indentationAtItemLevel:o},selection:{disableSelection:i,checkboxSelection:a},expansion:{expansionTrigger:s},treeId:l,instance:c,publicAPI:d}=Ro(),u=_.useContext(nh),{id:h,itemId:p,label:g,children:b,rootRef:T}=e,{rootRef:E,contentRef:C,propsEnhancers:x}=t(e),{interactions:k,status:w}=SD({itemId:p,children:b}),S=_.useRef(null),B=_.useRef(null),W=mi(T,E,S),U=mi(C,B),y=_.useRef(null),R=rh({itemId:p,treeId:l,id:h}),F=c.canItemBeTabbed(p)?0:-1,M={rootRefObject:S,contentRefObject:B,interactions:k},z=J=>A=>{if(J.onFocus?.(A),A.defaultMuiPrevented)return;const Q=!w.disabled||r;!w.focused&&Q&&A.currentTarget===A.target&&c.focusItem(A,p)},X=J=>A=>{if(J.onBlur?.(A),A.defaultMuiPrevented)return;const Q=c.getItemDOMElement(p);w.editing||A.relatedTarget&&Oa(A.relatedTarget,Q)&&(A.target&&A.target?.dataset?.element==="labelInput"&&Oa(A.target,Q)||A.relatedTarget?.dataset?.element==="labelInput")||c.removeFocusedItem()},Z=J=>A=>{J.onKeyDown?.(A),!(A.defaultMuiPrevented||A.target?.dataset?.element==="labelInput")&&c.handleItemKeyDown(A,p)},me=J=>A=>{J.onDoubleClick?.(A),!A.defaultMuiPrevented&&k.toggleItemEditing()},ce=J=>A=>{J.onClick?.(A),n?.(A,p),!(A.defaultMuiPrevented||y.current?.contains(A.target))&&(s==="content"&&k.handleExpansion(A),a||k.handleSelection(A))},ee=J=>A=>{J.onMouseDown?.(A),!A.defaultMuiPrevented&&(A.shiftKey||A.ctrlKey||A.metaKey||w.disabled)&&A.preventDefault()},I=J=>A=>{J.onChange?.(A),!A.defaultMuiPrevented&&(i||w.disabled||k.handleCheckboxSelection(A))},ue=J=>A=>{J.onClick?.(A),!A.defaultMuiPrevented&&s==="iconContainer"&&k.handleExpansion(A)};return{getRootProps:(J={})=>{const A=Te({},Ln(e),Ln(J));let Q;w.selected?Q=!0:i||w.disabled?Q=void 0:Q=!1;const ge=Te({},A,{ref:W,role:"treeitem",tabIndex:F,id:R,"aria-expanded":w.expandable?w.expanded:void 0,"aria-selected":Q,"aria-disabled":w.disabled||void 0},J,{onFocus:z(A),onBlur:X(A),onKeyDown:Z(A)});o&&(ge.style={"--TreeView-itemDepth":typeof u=="function"?u(p):u});const de=x.root?.(Te({},M,{externalEventHandlers:A}))??{};return Te({},ge,de)},getContentProps:(J={})=>{const A=Ln(J),Q=Te({},A,J,{ref:U,onClick:ce(A),onMouseDown:ee(A),status:w});o&&(Q.indentationAtItemLevel=!0);const ge=x.content?.(Te({},M,{externalEventHandlers:A}))??{};return Te({},Q,ge)},getGroupTransitionProps:(J={})=>{const A=Ln(J),Q=Te({},A,{unmountOnExit:!0,component:"ul",role:"group",in:w.expanded,children:b},J);return o&&(Q.indentationAtItemLevel=!0),Q},getIconContainerProps:(J={})=>{const A=Ln(J);return Te({},A,J,{onClick:ue(A)})},getCheckboxProps:(J={})=>{const A=Ln(J);return Te({},A,{visible:a,ref:y,checked:w.selected,disabled:i||w.disabled,tabIndex:-1},J,{onChange:I(A)})},getLabelProps:(J={})=>{const A=Te({},Ln(J)),Q=Te({},A,{children:g},J,{onDoubleClick:me(A)});return c.isTreeViewEditable&&(Q.editable=w.editable),Q},getLabelInputProps:(J={})=>{const A=Ln(J),Q=x.labelInput?.({rootRefObject:S,contentRefObject:B,externalEventHandlers:A,interactions:k})??{};return Te({},J,Q)},getDragAndDropOverlayProps:(J={})=>{const A=Ln(J),Q=x.dragAndDropOverlay?.(Te({},M,{externalEventHandlers:A}))??{};return Te({},J,Q)},rootRef:W,status:w,publicAPI:d}},ID=DD;function Ny(e){const{instance:t,items:{onItemClick:n},selection:{multiSelect:r,checkboxSelection:o,disableSelection:i},expansion:{expansionTrigger:a}}=Ro(),s=t.isItemExpandable(e),l=t.isItemExpanded(e),c=t.isItemFocused(e),d=t.isItemSelected(e),u=t.isItemDisabled(e),h=t?.isItemBeingEdited?t?.isItemBeingEdited(e):!1,p=t.isItemEditable?t.isItemEditable(e):!1,g=x=>{if(!u){c||t.focusItem(x,e);const k=r&&(x.shiftKey||x.ctrlKey||x.metaKey);s&&!(k&&t.isItemExpanded(e))&&t.toggleItemExpansion(x,e)}},b=x=>{u||(c||t.focusItem(x,e),r&&(x.shiftKey||x.ctrlKey||x.metaKey)?x.shiftKey?t.expandSelectionRange(x,e):t.selectItem({event:x,itemId:e,keepExistingSelection:!0}):t.selectItem({event:x,itemId:e,shouldBeSelected:!0}))},T=x=>{if(i||u)return;const k=x.nativeEvent.shiftKey;r&&k?t.expandSelectionRange(x,e):t.selectItem({event:x,itemId:e,keepExistingSelection:r,shouldBeSelected:x.target.checked})},E=x=>{(x.shiftKey||x.ctrlKey||x.metaKey||u)&&x.preventDefault()},C=()=>{yo(t,$n)&&t.isItemEditable(e)&&(t.isItemBeingEdited(e)?t.setEditedItemId(null):t.setEditedItemId(e))};return{disabled:u,expanded:l,selected:d,focused:c,editable:p,editing:h,disableSelection:i,checkboxSelection:o,handleExpansion:g,handleSelection:b,handleCheckboxSelection:T,handleContentClick:n,preventSelection:E,expansionTrigger:a,toggleItemEditing:C,handleSaveItemLabel:(x,k)=>{yo(t,$n)&&t.isItemBeingEditedRef(e)&&(t.updateItemLabel(e,k),C(),t.focusItem(x,e))},handleCancelItemLabelEditing:x=>{yo(t,$n)&&t.isItemBeingEditedRef(e)&&(C(),t.focusItem(x,e))}}}const wD=ut("div",{name:"MuiTreeItem2DragAndDropOverlay",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>Ge.shouldForwardProp(e)&&e!=="action"})(({theme:e})=>({position:"absolute",left:0,display:"flex",top:0,bottom:0,right:0,pointerEvents:"none",variants:[{props:{action:"make-child"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",borderRadius:e.shape.borderRadius,backgroundColor:e.vars?`rgba(${e.vars.palette.primary.darkChannel} / ${e.vars.palette.action.focusOpacity})`:Ge.alpha(e.palette.primary.dark,e.palette.action.focusOpacity)}},{props:{action:"reorder-above"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",borderTop:`1px solid ${(e.vars||e).palette.action.active}`}},{props:{action:"reorder-below"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",borderBottom:`1px solid ${(e.vars||e).palette.action.active}`}},{props:{action:"move-to-parent"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * calc(var(--TreeView-itemDepth) - 1))",borderBottom:`1px solid ${(e.vars||e).palette.action.active}`}}]}));function ND(e){return e.action==null?null:f.jsx(wD,Te({},e))}const PD=ut("input",{name:"MuiTreeItem2",slot:"LabelInput",overridesResolver:(e,t)=>t.labelInput})(({theme:e})=>Te({},e.typography.body1,{width:"100%",backgroundColor:e.palette.background.paper,borderRadius:e.shape.borderRadius,border:"none",padding:"0 2px",boxSizing:"border-box","&:focus":{outline:`1px solid ${e.palette.primary.main}`}})),RD=["classes","className","displayIcon","expansionIcon","icon","label","itemId","onClick","onMouseDown","dragAndDropOverlayProps","labelInputProps"],Py=_.forwardRef(function(e,t){const{classes:n,className:r,displayIcon:o,expansionIcon:i,icon:a,label:s,itemId:l,onClick:c,onMouseDown:d,dragAndDropOverlayProps:u,labelInputProps:h}=e,p=Dr(e,RD),{disabled:g,expanded:b,selected:T,focused:E,editing:C,editable:x,disableSelection:k,checkboxSelection:w,handleExpansion:S,handleSelection:B,handleCheckboxSelection:W,handleContentClick:U,preventSelection:y,expansionTrigger:R,toggleItemEditing:F}=Ny(l),M=a||i||o,z=_.useRef(null),X=ce=>{y(ce),d&&d(ce)},Z=ce=>{U?.(ce,l),!z.current?.contains(ce.target)&&(R==="content"&&S(ce),w||B(ce),c&&c(ce))},me=ce=>{ce.defaultMuiPrevented||F()};return f.jsxs("div",Te({},p,{className:kt(n.root,r,b&&n.expanded,T&&n.selected,E&&n.focused,g&&n.disabled,C&&n.editing,x&&n.editable),onClick:Z,onMouseDown:X,ref:t,children:[f.jsx("div",{className:n.iconContainer,children:M}),w&&f.jsx(Cy,{className:n.checkbox,checked:T,onChange:W,disabled:g||k,ref:z,tabIndex:-1}),C?f.jsx(PD,Te({},h,{className:n.labelInput})):f.jsx("div",Te({className:n.label},x&&{onDoubleClick:me},{children:s})),u&&f.jsx(ND,Te({},u))]}))}),Sf=e=>e,LD=()=>{let e=Sf;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Sf}}},OD=LD(),MD={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function oh(e,t,n="Mui"){const r=MD[t];return r?`${n}-${r}`:`${OD.generate(e)}-${t}`}function Ry(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=oh(e,o,n)}),r}function FD(e){return oh("MuiTreeItem",e)}const Er=Ry("MuiTreeItem",["root","groupTransition","content","expanded","selected","focused","disabled","iconContainer","label","checkbox","labelInput","editable","editing","dragAndDropOverlay"]),Ly=ct(f.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),Oy=ct(f.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}));function ih(e){const{children:t,itemId:n}=e,{wrapItem:r,instance:o}=Ro();return r({children:t,itemId:n,instance:o})}ih.propTypes={children:kp.node,itemId:kp.string.isRequired};const BD=["children","className","slots","slotProps","ContentComponent","ContentProps","itemId","id","label","onClick","onMouseDown","onFocus","onBlur","onKeyDown"],jD=["ownerState"],HD=["ownerState"],UD=["ownerState"],zD=Sy(),$D=e=>{const{classes:t}=e;return vy({root:["root"],content:["content"],expanded:["expanded"],selected:["selected"],focused:["focused"],disabled:["disabled"],iconContainer:["iconContainer"],checkbox:["checkbox"],label:["label"],labelInput:["labelInput"],editing:["editing"],editable:["editable"],groupTransition:["groupTransition"]},FD,t)},GD=ut("li",{name:"MuiTreeItem",slot:"Root",overridesResolver:(e,t)=>t.root})({listStyle:"none",margin:0,padding:0,outline:0}),qD=ut(Py,{name:"MuiTreeItem",slot:"Content",overridesResolver:(e,t)=>[t.content,t.iconContainer&&{[`& .${Er.iconContainer}`]:t.iconContainer},t.label&&{[`& .${Er.label}`]:t.label}],shouldForwardProp:e=>Vr(e)&&e!=="indentationAtItemLevel"})(({theme:e})=>({padding:e.spacing(.5,1),borderRadius:e.shape.borderRadius,width:"100%",boxSizing:"border-box",position:"relative",display:"flex",alignItems:"center",gap:e.spacing(1),cursor:"pointer",WebkitTapHighlightColor:"transparent","&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Er.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,backgroundColor:"transparent"},[`&.${Er.focused}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Er.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ge.alpha(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Ge.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ge.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Er.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Ge.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`& .${Er.iconContainer}`]:{width:16,display:"flex",flexShrink:0,justifyContent:"center","& svg":{fontSize:18}},[`& .${Er.label}`]:Te({width:"100%",boxSizing:"border-box",minWidth:0,position:"relative"},e.typography.body1),[`& .${Er.checkbox}`]:{padding:0},variants:[{props:{indentationAtItemLevel:!0},style:{paddingLeft:`calc(${e.spacing(1)} + var(--TreeView-itemChildrenIndentation) * var(--TreeView-itemDepth))`}}]})),WD=ut(Ra,{name:"MuiTreeItem",slot:"GroupTransition",overridesResolver:(e,t)=>t.groupTransition,shouldForwardProp:e=>Vr(e)&&e!=="indentationAtItemLevel"})({margin:0,padding:0,paddingLeft:"var(--TreeView-itemChildrenIndentation)",variants:[{props:{indentationAtItemLevel:!0},style:{paddingLeft:0}}]}),VD=_.forwardRef(function(e,t){const{icons:n,runItemPlugins:r,items:{disabledItemsFocusable:o,indentationAtItemLevel:i},selection:{disableSelection:a},expansion:{expansionTrigger:s},treeId:l,instance:c}=Ro(),d=_.useContext(nh),u=zD({props:e,name:"MuiTreeItem"}),{children:h,className:p,slots:g,slotProps:b,ContentComponent:T=Py,ContentProps:E,itemId:C,id:x,label:k,onClick:w,onMouseDown:S,onBlur:B,onKeyDown:W}=u,U=Dr(u,BD),{expanded:y,focused:R,selected:F,disabled:M,editing:z,handleExpansion:X,handleCancelItemLabelEditing:Z,handleSaveItemLabel:me}=Ny(C),{contentRef:ce,rootRef:ee,propsEnhancers:I}=r(u),ue=_.useRef(null),J=_.useRef(null),A=mi(t,ee,ue),Q=mi(E?.ref,ce,J),ge={expandIcon:g?.expandIcon??n.slots.expandIcon??Ly,collapseIcon:g?.collapseIcon??n.slots.collapseIcon??Oy,endIcon:g?.endIcon??n.slots.endIcon,icon:g?.icon,groupTransition:g?.groupTransition},de=ne=>Array.isArray(ne)?ne.length>0&&ne.some(de):!!ne,ye=de(h),he=Te({},u,{expanded:y,focused:R,selected:F,disabled:M,indentationAtItemLevel:i}),Fe=$D(he),Be=ge.groupTransition??void 0,xe=fo({elementType:Be,ownerState:{},externalSlotProps:b?.groupTransition,additionalProps:Te({unmountOnExit:!0,in:y,component:"ul",role:"group"},i?{indentationAtItemLevel:!0}:{}),className:Fe.groupTransition}),dt=ne=>{s==="iconContainer"&&X(ne)},Ze=y?ge.collapseIcon:ge.expandIcon,be=fo({elementType:Ze,ownerState:{},externalSlotProps:ne=>y?Te({},vr(n.slotProps.collapseIcon,ne),vr(b?.collapseIcon,ne)):Te({},vr(n.slotProps.expandIcon,ne),vr(b?.expandIcon,ne)),additionalProps:{onClick:dt}}),Jt=Dr(be,jD),bt=ye&&Ze?f.jsx(Ze,Te({},Jt)):null,_e=ye?void 0:ge.endIcon,St=fo({elementType:_e,ownerState:{},externalSlotProps:ne=>ye?{}:Te({},vr(n.slotProps.endIcon,ne),vr(b?.endIcon,ne))}),ht=Dr(St,HD),pt=_e?f.jsx(_e,Te({},ht)):null,Se=ge.icon,fe=fo({elementType:Se,ownerState:{},externalSlotProps:b?.icon}),Kn=Dr(fe,UD),Mr=Se?f.jsx(Se,Te({},Kn)):null;let Ke;F?Ke=!0:a||M?Ke=void 0:Ke=!1;function V(ne){!R&&(!M||o)&&ne.currentTarget===ne.target&&c.focusItem(ne,C)}function re(ne){B?.(ne),!(z||ne.relatedTarget&&Oa(ne.relatedTarget,ue.current)&&(ne.target&&ne.target?.dataset?.element==="labelInput"&&Oa(ne.target,ue.current)||ne.relatedTarget?.dataset?.element==="labelInput"))&&c.removeFocusedItem()}const Ae=ne=>{W?.(ne),ne.target?.dataset?.element!=="labelInput"&&c.handleItemKeyDown(ne,C)},$e=rh({itemId:C,treeId:l,id:x}),Ve=c.canItemBeTabbed(C)?0:-1,et={rootRefObject:ue,contentRefObject:J,interactions:{handleSaveItemLabel:me,handleCancelItemLabelEditing:Z}},Zt=I.root?.(Te({},et,{externalEventHandlers:Ln(U)}))??{},Kt=I.content?.(Te({},et,{externalEventHandlers:Ln(E)}))??{},en=I.dragAndDropOverlay?.(Te({},et,{externalEventHandlers:{}}))??{},ie=I.labelInput?.(Te({},et,{externalEventHandlers:{}}))??{};return f.jsx(ih,{itemId:C,children:f.jsxs(GD,Te({className:kt(Fe.root,p),role:"treeitem","aria-expanded":ye?y:void 0,"aria-selected":Ke,"aria-disabled":M||void 0,id:$e,tabIndex:Ve},U,{ownerState:he,onFocus:V,onBlur:re,onKeyDown:Ae,ref:A,style:i?Te({},U.style,{"--TreeView-itemDepth":typeof d=="function"?d(C):d}):U.style},Zt,{children:[f.jsx(qD,Te({as:T,classes:{root:Fe.content,expanded:Fe.expanded,selected:Fe.selected,focused:Fe.focused,disabled:Fe.disabled,editable:Fe.editable,editing:Fe.editing,iconContainer:Fe.iconContainer,label:Fe.label,labelInput:Fe.labelInput,checkbox:Fe.checkbox},label:k,itemId:C,onClick:w,onMouseDown:S,icon:Mr,expansionIcon:bt,displayIcon:pt,ownerState:he},E,Kt,en.action==null?{}:{dragAndDropOverlayProps:en},ie.value==null?{}:{labelInputProps:ie},{ref:Q})),h&&f.jsx(WD,Te({as:Be},xe,{children:h}))]}))})});function YD(e){const{slots:t,slotProps:n,status:r}=e,o=Ro(),i=Te({},o.icons.slots,{expandIcon:o.icons.slots.expandIcon??Ly,collapseIcon:o.icons.slots.collapseIcon??Oy}),a=o.icons.slotProps;let s;t?.icon?s="icon":r.expandable?r.expanded?s="collapseIcon":s="expandIcon":s="endIcon";const l=t?.[s]??i[s],c=fo({elementType:l,externalSlotProps:d=>Te({},vr(a[s],d),vr(n?.[s],d)),ownerState:{}});return l?f.jsx(l,Te({},c)):null}const KD=["visible"],QD=ut("li",{name:"MuiTreeItem2",slot:"Root",overridesResolver:(e,t)=>t.root})({listStyle:"none",margin:0,padding:0,outline:0}),XD=ut("div",{name:"MuiTreeItem2",slot:"Content",overridesResolver:(e,t)=>t.content,shouldForwardProp:e=>Vr(e)&&e!=="status"&&e!=="indentationAtItemLevel"})(({theme:e})=>({padding:e.spacing(.5,1),borderRadius:e.shape.borderRadius,width:"100%",boxSizing:"border-box",position:"relative",display:"flex",alignItems:"center",gap:e.spacing(1),cursor:"pointer",WebkitTapHighlightColor:"transparent","&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{indentationAtItemLevel:!0},style:{paddingLeft:`calc(${e.spacing(1)} + var(--TreeView-itemChildrenIndentation) * var(--TreeView-itemDepth))`}},{props:({status:t})=>t.disabled,style:{opacity:(e.vars||e).palette.action.disabledOpacity,backgroundColor:"transparent"}},{props:({status:t})=>t.focused,style:{backgroundColor:(e.vars||e).palette.action.focus}},{props:({status:t})=>t.selected,style:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ge.alpha(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Ge.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ge.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}}}},{props:({status:t})=>t.selected&&t.focused,style:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Ge.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}]})),JD=ut("div",{name:"MuiTreeItem2",slot:"Label",overridesResolver:(e,t)=>t.label,shouldForwardProp:e=>Vr(e)&&e!=="editable"})(({theme:e})=>Te({width:"100%",boxSizing:"border-box",minWidth:0,position:"relative",overflow:"hidden"},e.typography.body1,{variants:[{props:({editable:t})=>t,style:{paddingLeft:"2px"}}]})),ZD=ut("div",{name:"MuiTreeItem2",slot:"IconContainer",overridesResolver:(e,t)=>t.iconContainer})({width:16,display:"flex",flexShrink:0,justifyContent:"center","& svg":{fontSize:18}});ut(Ra,{name:"MuiTreeItem2",slot:"GroupTransition",overridesResolver:(e,t)=>t.groupTransition,shouldForwardProp:e=>Vr(e)&&e!=="indentationAtItemLevel"})({margin:0,padding:0,paddingLeft:"var(--TreeView-itemChildrenIndentation)",variants:[{props:{indentationAtItemLevel:!0},style:{paddingLeft:0}}]});ut(_.forwardRef((e,t)=>{const{visible:n}=e,r=Dr(e,KD);return n?f.jsx(Cy,Te({},r,{ref:t})):null}),{name:"MuiTreeItem2",slot:"Checkbox",overridesResolver:(e,t)=>t.checkbox})({padding:0});function eI(e){return oh("MuiRichTreeView",e)}Ry("MuiRichTreeView",["root"]);const tI=(e,t)=>{const n=_.useRef({}),[r,o]=_.useState(()=>{const i={};return e.forEach(a=>{a.models&&Object.entries(a.models).forEach(([s,l])=>{n.current[s]={isControlled:t[s]!==void 0,getDefaultValue:l.getDefaultValue},i[s]=l.getDefaultValue(t)})}),i});return Object.fromEntries(Object.entries(n.current).map(([i,a])=>{const s=t[i]??r[i];return[i,{value:s,setControlledValue:l=>{a.isControlled||o(c=>Te({},c,{[i]:l}))}}]}))};class nI{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(t,n,r={}){let o=this.events[t];o||(o={highPriority:new Map,regular:new Map},this.events[t]=o),r.isFirst?o.highPriority.set(n,!0):o.regular.set(n,!0)}removeListener(t,n){this.events[t]&&(this.events[t].regular.delete(n),this.events[t].highPriority.delete(n))}removeAllListeners(){this.events={}}emit(t,...n){const r=this.events[t];if(!r)return;const o=Array.from(r.highPriority.keys()),i=Array.from(r.regular.keys());for(let a=o.length-1;a>=0;a-=1){const s=o[a];r.highPriority.has(s)&&s.apply(this,n)}for(let a=0;a<i.length;a+=1){const s=i[a];r.regular.has(s)&&s.apply(this,n)}}once(t,n){const r=this;this.on(t,function o(...i){r.removeListener(t,o),n.apply(r,i)})}}const rI=e=>e.isPropagationStopped!==void 0,My=()=>{const[e]=_.useState(()=>new nI),t=_.useCallback((...r)=>{const[o,i,a={}]=r;a.defaultMuiPrevented=!1,!(rI(a)&&a.isPropagationStopped())&&e.emit(o,i,a)},[e]),n=_.useCallback((r,o)=>(e.on(r,o),()=>{e.removeListener(r,o)}),[e]);return{instance:{$$publishEvent:t,$$subscribeEvent:n}}};My.params={};const Fy=({plugins:e})=>{const t=new Set(e);return{instance:{getAvailablePlugins:()=>t}}};Fy.params={};const ah=({params:e,state:t,setState:n})=>{_.useEffect(()=>{n(o=>o.id.treeId===e.id&&o.id.treeId!==void 0?o:Te({},o,{id:Te({},o.id,{treeId:e.id??_D()})}))},[n,e.id]);const r=e.id??t.id.treeId;return{getRootProps:()=>({id:r}),contextValue:{treeId:r}}};ah.params={id:!0};ah.getInitialState=({id:e})=>({id:{treeId:e??void 0}});const oI=[My,Fy,ah],iI=["slots","slotProps","apiRef","experimentalFeatures"],aI=e=>{let{props:{slots:t,slotProps:n,apiRef:r,experimentalFeatures:o},plugins:i}=e,a=Dr(e.props,iI);const s={};i.forEach(h=>{Object.assign(s,h.params)});const l={},c={};Object.keys(a).forEach(h=>{const p=a[h];s[h]?l[h]=p:c[h]=p});const d=o??{},u=i.reduce((h,p)=>p.getDefaultizedParams?p.getDefaultizedParams({params:h,experimentalFeatures:d}):h,l);return{apiRef:r,forwardedProps:c,pluginParams:u,slots:t??{},slotProps:n??{},experimentalFeatures:d}},sI=({plugins:e,instance:t,publicAPI:n,rootRef:r})=>({runItemPlugins:o=>{let i=null,a=null;const s=[],l={};e.forEach(u=>{if(!u.itemPlugin)return;const h=u.itemPlugin({props:o,rootRef:i,contentRef:a});h?.rootRef&&(i=h.rootRef),h?.contentRef&&(a=h.contentRef),h?.propsEnhancers&&(s.push(h.propsEnhancers),Object.keys(h.propsEnhancers).forEach(p=>{l[p]=!0}))});const c=u=>h=>{const p={};return s.forEach(g=>{const b=g[u];b!=null&&Object.assign(p,b(h))}),p},d=Object.fromEntries(Object.keys(l).map(u=>[u,c(u)]));return{contentRef:a,rootRef:i,propsEnhancers:d}},wrapItem:({itemId:o,children:i})=>{let a=i;for(let s=e.length-1;s>=0;s-=1){const l=e[s];l.wrapItem&&(a=l.wrapItem({itemId:o,children:a,instance:t}))}return a},wrapRoot:({children:o})=>{let i=o;for(let a=e.length-1;a>=0;a-=1){const s=e[a];s.wrapRoot&&(i=s.wrapRoot({children:i,instance:t}))}return i},instance:t,rootRef:r,publicAPI:n});function lI(e){const t=_.useRef({});return e?(e.current==null&&(e.current={}),e.current):t.current}const cI=({plugins:e,rootRef:t,props:n})=>{const r=[...oI,...e],{pluginParams:o,forwardedProps:i,apiRef:a,experimentalFeatures:s,slots:l,slotProps:c}=aI({plugins:r,props:n}),d=tI(r,o),u=_.useRef({}).current,h=lI(a),p=_.useRef(null),g=mi(p,t),b=sI({plugins:r,instance:u,publicAPI:h,rootRef:p}),[T,E]=_.useState(()=>{const k={};return r.forEach(w=>{w.getInitialState&&Object.assign(k,w.getInitialState(o))}),k}),C=[],x=k=>{const w=k({instance:u,params:o,slots:l,slotProps:c,experimentalFeatures:s,state:T,setState:E,rootRef:p,models:d,plugins:r});w.getRootProps&&C.push(w.getRootProps),w.publicAPI&&Object.assign(h,w.publicAPI),w.instance&&Object.assign(u,w.instance),w.contextValue&&Object.assign(b,w.contextValue)};return r.forEach(x),{getRootProps:(k={})=>{const w=Te({role:"tree"},i,k,{ref:g});return C.forEach(S=>{Object.assign(w,S(k))}),w},rootRef:g,contextValue:b,instance:u}},uI=(e,t,n)=>{e.$$publishEvent(t,n)},ri="__TREE_VIEW_ROOT_PARENT_ID__",dI=e=>{const t={};return e.forEach((n,r)=>{t[n]=r}),t},hI=["children"],By=({items:e,isItemDisabled:t,getItemLabel:n,getItemId:r})=>{const o={},i={},a={[ri]:[]},s=(c,d,u)=>{const h=r?r(c):c.id;if(h==null)throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.","Alternatively, you can use the `getItemId` prop to specify a custom id for each item.","An item was provided without id in the `items` prop:",JSON.stringify(c)].join(`
|
|
149
132
|
`));if(o[h]!=null)throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.","Alternatively, you can use the `getItemId` prop to specify a custom id for each item.",`Two items were provided with the same id in the \`items\` prop: "${h}"`].join(`
|
|
150
|
-
`));const
|
|
151
|
-
`));o[h]={id:h,label:f,parentId:p,idAttribute:void 0,expandable:!!c.children?.length,disabled:t?t(c):!1,depth:d},a[h]=c;const g=p??In;i[g]||(i[g]=[]),i[g].push(h),c.children?.forEach(y=>s(y,d+1,h))};e.forEach(c=>s(c,0,null));const l={};return Object.keys(i).forEach(c=>{l[c]=Pw(i[c])}),{itemMetaMap:o,itemMap:a,itemOrderedChildrenIds:i,itemChildrenIndexes:l}},Bo=({instance:e,params:t,state:r,setState:n,experimentalFeatures:o})=>{const a=S.useCallback(v=>r.items.itemMetaMap[v],[r.items.itemMetaMap]),i=S.useCallback(v=>r.items.itemMap[v],[r.items.itemMap]),s=S.useCallback(()=>{const v=b=>{const C=r.items.itemMap[b],w=mr(C,Iw),k=r.items.itemOrderedChildrenIds[b];return k&&(w.children=k.map(v)),w};return r.items.itemOrderedChildrenIds[In].map(v)},[r.items.itemMap,r.items.itemOrderedChildrenIds]),l=S.useCallback(v=>{if(v==null)return!1;let b=e.getItemMeta(v);if(!b)return!1;if(b.disabled)return!0;for(;b.parentId!=null;)if(b=e.getItemMeta(b.parentId),b.disabled)return!0;return!1},[e]),c=S.useCallback(v=>{const b=e.getItemMeta(v).parentId??In;return r.items.itemChildrenIndexes[b][v]},[e,r.items.itemChildrenIndexes]),d=S.useCallback(v=>r.items.itemOrderedChildrenIds[v??In]??[],[r.items.itemOrderedChildrenIds]),p=v=>{const b=e.getItemMeta(v);return b==null?null:document.getElementById(bl({treeId:r.id.treeId,itemId:v,id:b.idAttribute}))},h=v=>t.disabledItemsFocusable?!0:!e.isItemDisabled(v),f=S.useRef(!1),g=S.useCallback(()=>{f.current=!0},[]),y=S.useCallback(()=>f.current,[]);return S.useEffect(()=>{e.areItemUpdatesPrevented()||n(v=>{const b=Jp({items:t.items,isItemDisabled:t.isItemDisabled,getItemId:t.getItemId,getItemLabel:t.getItemLabel});return Object.values(v.items.itemMetaMap).forEach(C=>{b.itemMetaMap[C.id]||kw(e,"removeItem",{id:C.id})}),Y({},v,{items:b})})},[e,n,t.items,t.isItemDisabled,t.getItemId,t.getItemLabel]),{getRootProps:()=>({style:{"--TreeView-itemChildrenIndentation":typeof t.itemChildrenIndentation=="number"?`${t.itemChildrenIndentation}px`:t.itemChildrenIndentation}}),publicAPI:{getItem:i,getItemDOMElement:p,getItemTree:s,getItemOrderedChildrenIds:d},instance:{getItemMeta:a,getItem:i,getItemTree:s,getItemsToRender:()=>{const v=b=>{const C=r.items.itemMetaMap[b];return{label:C.label,itemId:C.id,id:C.idAttribute,children:r.items.itemOrderedChildrenIds[b]?.map(v)}};return r.items.itemOrderedChildrenIds[In].map(v)},getItemIndex:c,getItemDOMElement:p,getItemOrderedChildrenIds:d,isItemDisabled:l,isItemNavigable:h,preventItemUpdates:g,areItemUpdatesPrevented:y},contextValue:{items:{onItemClick:t.onItemClick,disabledItemsFocusable:t.disabledItemsFocusable,indentationAtItemLevel:o.indentationAtItemLevel??!1}}}};Bo.getInitialState=e=>({items:Jp({items:e.items,isItemDisabled:e.isItemDisabled,getItemId:e.getItemId,getItemLabel:e.getItemLabel})});Bo.getDefaultizedParams=({params:e})=>Y({},e,{disabledItemsFocusable:e.disabledItemsFocusable??!1,itemChildrenIndentation:e.itemChildrenIndentation??"12px"});Bo.wrapRoot=({children:e,instance:t})=>u.jsx(yl.Provider,{value:r=>t.getItemMeta(r)?.depth??0,children:e});Bo.params={disabledItemsFocusable:!0,items:!0,isItemDisabled:!0,getItemLabel:!0,getItemId:!0,onItemClick:!0,itemChildrenIndentation:!0};const jw=typeof window<"u"?S.useLayoutEffect:S.useEffect;function Mn(e){const t=S.useRef(e);return jw(()=>{t.current=e}),S.useRef((...r)=>(0,t.current)(...r)).current}const ui=({instance:e,params:t,models:r})=>{const n=S.useMemo(()=>{const p=new Map;return r.expandedItems.value.forEach(h=>{p.set(h,!0)}),p},[r.expandedItems.value]),o=(p,h)=>{t.onExpandedItemsChange?.(p,h),r.expandedItems.setControlledValue(h)},a=S.useCallback(p=>n.has(p),[n]),i=S.useCallback(p=>!!e.getItemMeta(p)?.expandable,[e]),s=Mn((p,h)=>{const f=e.isItemExpanded(h);e.setItemExpansion(p,h,!f)}),l=Mn((p,h,f)=>{if(e.isItemExpanded(h)===f)return;let g;f?g=[h].concat(r.expandedItems.value):g=r.expandedItems.value.filter(y=>y!==h),t.onItemExpansionToggle&&t.onItemExpansionToggle(p,h,f),o(p,g)}),c=(p,h)=>{const f=e.getItemMeta(h),g=e.getItemOrderedChildrenIds(f.parentId).filter(v=>e.isItemExpandable(v)&&!e.isItemExpanded(v)),y=r.expandedItems.value.concat(g);g.length>0&&(t.onItemExpansionToggle&&g.forEach(v=>{t.onItemExpansionToggle(p,v,!0)}),o(p,y))},d=S.useMemo(()=>t.expansionTrigger?t.expansionTrigger:e.isTreeViewEditable?"iconContainer":"content",[t.expansionTrigger,e.isTreeViewEditable]);return{publicAPI:{setItemExpansion:l},instance:{isItemExpanded:a,isItemExpandable:i,setItemExpansion:l,toggleItemExpansion:s,expandAllSiblings:c},contextValue:{expansion:{expansionTrigger:d}}}};ui.models={expandedItems:{getDefaultValue:e=>e.defaultExpandedItems}};const Ew=[];ui.getDefaultizedParams=({params:e})=>Y({},e,{defaultExpandedItems:e.defaultExpandedItems??Ew});ui.params={expandedItems:!0,defaultExpandedItems:!0,onExpandedItemsChange:!0,onItemExpansionToggle:!0,expansionTrigger:!0};const xa=e=>Array.isArray(e)?e:e!=null?[e]:[],Ui=e=>{const t={};return e.forEach(r=>{t[r]=!0}),t},di=({instance:e,params:t,models:r})=>{const n=S.useRef(null),o=S.useRef({}),a=S.useMemo(()=>{const d=new Map;return Array.isArray(r.selectedItems.value)?r.selectedItems.value.forEach(p=>{d.set(p,!0)}):r.selectedItems.value!=null&&d.set(r.selectedItems.value,!0),d},[r.selectedItems.value]),i=(d,p)=>{if(t.onItemSelectionToggle)if(t.multiSelect){const h=p.filter(g=>!e.isItemSelected(g)),f=r.selectedItems.value.filter(g=>!p.includes(g));h.forEach(g=>{t.onItemSelectionToggle(d,g,!0)}),f.forEach(g=>{t.onItemSelectionToggle(d,g,!1)})}else p!==r.selectedItems.value&&(r.selectedItems.value!=null&&t.onItemSelectionToggle(d,r.selectedItems.value,!1),p!=null&&t.onItemSelectionToggle(d,p,!0));t.onSelectedItemsChange&&t.onSelectedItemsChange(d,p),r.selectedItems.setControlledValue(p)},s=d=>a.has(d),l=({event:d,itemId:p,keepExistingSelection:h=!1,shouldBeSelected:f})=>{if(t.disableSelection)return;let g;if(h){const y=xa(r.selectedItems.value),v=e.isItemSelected(p);v&&(f===!1||f==null)?g=y.filter(b=>b!==p):!v&&(f===!0||f==null)?g=[p].concat(y):g=y}else f===!1||f==null&&e.isItemSelected(p)?g=t.multiSelect?[]:null:g=t.multiSelect?[p]:p;i(d,g),n.current=p,o.current={}},c=(d,[p,h])=>{if(t.disableSelection||!t.multiSelect)return;let f=xa(r.selectedItems.value).slice();Object.keys(o.current).length>0&&(f=f.filter(b=>!o.current[b]));const g=Ui(f),y=BS(e,p,h),v=y.filter(b=>!g[b]);f=f.concat(v),i(d,f),o.current=Ui(y)};return{getRootProps:()=>({"aria-multiselectable":t.multiSelect}),publicAPI:{selectItem:l},instance:{isItemSelected:s,selectItem:l,selectAllNavigableItems:d=>{if(t.disableSelection||!t.multiSelect)return;const p=qS(e);i(d,p),o.current=Ui(p)},expandSelectionRange:(d,p)=>{if(n.current!=null){const[h,f]=Up(e,p,n.current);c(d,[h,f])}},selectRangeFromStartToItem:(d,p)=>{c(d,[Io(e),p])},selectRangeFromItemToEnd:(d,p)=>{c(d,[p,Wp(e)])},selectItemFromArrowNavigation:(d,p,h)=>{if(t.disableSelection||!t.multiSelect)return;let f=xa(r.selectedItems.value).slice();Object.keys(o.current).length===0?(f.push(h),o.current={[p]:!0,[h]:!0}):(o.current[p]||(o.current={}),o.current[h]?(f=f.filter(g=>g!==p),delete o.current[p]):(f.push(h),o.current[h]=!0)),i(d,f)}},contextValue:{selection:{multiSelect:t.multiSelect,checkboxSelection:t.checkboxSelection,disableSelection:t.disableSelection}}}};di.models={selectedItems:{getDefaultValue:e=>e.defaultSelectedItems}};const Tw=[];di.getDefaultizedParams=({params:e})=>Y({},e,{disableSelection:e.disableSelection??!1,multiSelect:e.multiSelect??!1,checkboxSelection:e.checkboxSelection??!1,defaultSelectedItems:e.defaultSelectedItems??(e.multiSelect?Tw:null)});di.params={disableSelection:!0,multiSelect:!0,checkboxSelection:!0,defaultSelectedItems:!0,selectedItems:!0,onSelectedItemsChange:!0,onItemSelectionToggle:!0};function Rw(e){return e&&e.ownerDocument||document}const mu=1e3;class Mw{constructor(t=mu){this.timeouts=new Map,this.cleanupTimeout=mu,this.cleanupTimeout=t}register(t,r,n){this.timeouts||(this.timeouts=new Map);const o=setTimeout(()=>{typeof r=="function"&&r(),this.timeouts.delete(n.cleanupToken)},this.cleanupTimeout);this.timeouts.set(n.cleanupToken,o)}unregister(t){const r=this.timeouts.get(t.cleanupToken);r&&(this.timeouts.delete(t.cleanupToken),clearTimeout(r))}reset(){this.timeouts&&(this.timeouts.forEach((t,r)=>{this.unregister({cleanupToken:r})}),this.timeouts=void 0)}}class Nw{constructor(){this.registry=new FinalizationRegistry(t=>{typeof t=="function"&&t()})}register(t,r,n){this.registry.register(t,r,n)}unregister(t){this.registry.unregister(t)}reset(){}}class Aw{}function _w(e){let t=0;return function(r,n,o){e.registry===null&&(e.registry=typeof FinalizationRegistry<"u"?new Nw:new Mw);const[a]=S.useState(new Aw),i=S.useRef(null),s=S.useRef(void 0);s.current=o;const l=S.useRef(null);if(!i.current&&s.current){const c=(d,p)=>{p.defaultMuiPrevented||s.current?.(d,p)};i.current=r.$$subscribeEvent(n,c),t+=1,l.current={cleanupToken:t},e.registry.register(a,()=>{i.current?.(),i.current=null,l.current=null},l.current)}else!s.current&&i.current&&(i.current(),i.current=null,l.current&&(e.registry.unregister(l.current),l.current=null));S.useEffect(()=>{if(!i.current&&s.current){const c=(d,p)=>{p.defaultMuiPrevented||s.current?.(d,p)};i.current=r.$$subscribeEvent(n,c)}return l.current&&e.registry&&(e.registry.unregister(l.current),l.current=null),()=>{i.current?.(),i.current=null}},[r,n])}}const Ow={registry:null},Lw=_w(Ow),Zp=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?Zp(t.shadowRoot):t:null},$w=(e,t)=>{let r=xa(t).find(n=>{if(!e.isItemNavigable(n))return!1;const o=e.getItemMeta(n);return o&&(o.parentId==null||e.isItemExpanded(o.parentId))});return r==null&&(r=Io(e)),r},wl=({instance:e,params:t,state:r,setState:n,models:o,rootRef:a})=>{const i=$w(e,o.selectedItems.value),s=Mn(v=>{const b=typeof v=="function"?v(r.focusedItemId):v;r.focusedItemId!==b&&n(C=>Y({},C,{focusedItemId:b}))}),l=S.useCallback(()=>!!a.current&&a.current.contains(Zp(Rw(a.current))),[a]),c=S.useCallback(v=>r.focusedItemId===v&&l(),[r.focusedItemId,l]),d=v=>{const b=e.getItemMeta(v);return b&&(b.parentId==null||e.isItemExpanded(b.parentId))},p=(v,b)=>{const C=e.getItemDOMElement(b);C&&C.focus(),s(b),t.onItemFocus&&t.onItemFocus(v,b)},h=Mn((v,b)=>{d(b)&&p(v,b)}),f=Mn(()=>{if(r.focusedItemId!=null){if(e.getItemMeta(r.focusedItemId)){const v=e.getItemDOMElement(r.focusedItemId);v&&v.blur()}s(null)}}),g=v=>v===i;Lw(e,"removeItem",({id:v})=>{r.focusedItemId===v&&p(null,i)});const y=v=>b=>{v.onFocus?.(b),!b.defaultMuiPrevented&&b.target===b.currentTarget&&p(b,i)};return{getRootProps:v=>({onFocus:y(v)}),publicAPI:{focusItem:h},instance:{isItemFocused:c,canItemBeTabbed:g,focusItem:h,removeFocusedItem:f}}};wl.getInitialState=()=>({focusedItemId:null});wl.params={onItemFocus:!0};function Dw(e){return!!e&&e.length===1&&!!e.match(/\S/)}const eh=({instance:e,params:t,state:r})=>{const n=My(),o=S.useRef({}),a=Mn(c=>{o.current=c(o.current)});S.useEffect(()=>{if(e.areItemUpdatesPrevented())return;const c={},d=p=>{c[p.id]=p.label.substring(0,1).toLowerCase()};Object.values(r.items.itemMetaMap).forEach(d),o.current=c},[r.items.itemMetaMap,t.getItemId,e]);const i=(c,d)=>{const p=d.toLowerCase(),h=v=>{const b=ba(e,v);return b===null?Io(e):b};let f=null,g=h(c);const y={};for(;f==null&&!y[g];)o.current[g]===p?f=g:(y[g]=!0,g=h(g));return f},s=c=>!t.disableSelection&&!e.isItemDisabled(c),l=c=>!e.isItemDisabled(c)&&e.isItemExpandable(c);return{instance:{updateFirstCharMap:a,handleItemKeyDown:(c,d)=>{if(c.defaultMuiPrevented||c.altKey||jo(c.target,c.currentTarget))return;const p=c.ctrlKey||c.metaKey,h=c.key;switch(!0){case(h===" "&&s(d)):{c.preventDefault(),t.multiSelect&&c.shiftKey?e.expandSelectionRange(c,d):e.selectItem({event:c,itemId:d,keepExistingSelection:t.multiSelect,shouldBeSelected:t.multiSelect?void 0:!0});break}case h==="Enter":{Qr(e,Dt)&&e.isItemEditable(d)&&!e.isItemBeingEdited(d)?e.setEditedItemId(d):l(d)?(e.toggleItemExpansion(c,d),c.preventDefault()):s(d)&&(t.multiSelect?(c.preventDefault(),e.selectItem({event:c,itemId:d,keepExistingSelection:!0})):e.isItemSelected(d)||(e.selectItem({event:c,itemId:d}),c.preventDefault()));break}case h==="ArrowDown":{const f=ba(e,d);f&&(c.preventDefault(),e.focusItem(c,f),t.multiSelect&&c.shiftKey&&s(f)&&e.selectItemFromArrowNavigation(c,d,f));break}case h==="ArrowUp":{const f=zp(e,d);f&&(c.preventDefault(),e.focusItem(c,f),t.multiSelect&&c.shiftKey&&s(f)&&e.selectItemFromArrowNavigation(c,d,f));break}case(h==="ArrowRight"&&!n||h==="ArrowLeft"&&n):{if(p)return;if(e.isItemExpanded(d)){const f=ba(e,d);f&&(e.focusItem(c,f),c.preventDefault())}else l(d)&&(e.toggleItemExpansion(c,d),c.preventDefault());break}case(h==="ArrowLeft"&&!n||h==="ArrowRight"&&n):{if(p)return;if(l(d)&&e.isItemExpanded(d))e.toggleItemExpansion(c,d),c.preventDefault();else{const f=e.getItemMeta(d).parentId;f&&(e.focusItem(c,f),c.preventDefault())}break}case h==="Home":{s(d)&&t.multiSelect&&p&&c.shiftKey?e.selectRangeFromStartToItem(c,d):e.focusItem(c,Io(e)),c.preventDefault();break}case h==="End":{s(d)&&t.multiSelect&&p&&c.shiftKey?e.selectRangeFromItemToEnd(c,d):e.focusItem(c,Wp(e)),c.preventDefault();break}case h==="*":{e.expandAllSiblings(c,d),c.preventDefault();break}case(String.fromCharCode(c.keyCode)==="A"&&p&&t.multiSelect&&!t.disableSelection):{e.selectAllNavigableItems(c),c.preventDefault();break}case(!p&&!c.shiftKey&&Dw(h)):{const f=i(d,h);f!=null&&(e.focusItem(c,f),c.preventDefault());break}}}}}};eh.params={};const th=({slots:e,slotProps:t})=>({contextValue:{icons:{slots:{collapseIcon:e.collapseIcon,expandIcon:e.expandIcon,endIcon:e.endIcon},slotProps:{collapseIcon:t.collapseIcon,expandIcon:t.expandIcon,endIcon:t.endIcon}}}});th.params={};const Bw=[Bo,ui,di,wl,eh,th,Dt],qw=["ownerState"];function Fw({slots:e,slotProps:t,label:r,id:n,itemId:o,itemsToRender:a}){const i=e?.item??sw,s=Gr({elementType:i,externalSlotProps:t?.item,additionalProps:{itemId:o,id:n,label:r},ownerState:{itemId:o,label:r}}),l=mr(s,qw),c=S.useMemo(()=>a?u.jsx(rh,{itemsToRender:a,slots:e,slotProps:t}):null,[a,e,t]);return u.jsx(i,Y({},l,{children:c}))}function rh(e){const{itemsToRender:t,slots:r,slotProps:n}=e;return u.jsx(S.Fragment,{children:t.map(o=>u.jsx(Fw,{slots:r,slotProps:n,label:o.label,id:o.id,itemId:o.itemId,itemsToRender:o.children},o.itemId))})}const zw=Dp(),Ww=e=>{const{classes:t}=e;return $p({root:["root"]},mw,t)},Uw=Te("ul",{name:"MuiRichTreeView",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,margin:0,listStyle:"none",outline:0,position:"relative"}),Hw=S.forwardRef(function(e,t){const r=zw({props:e,name:"MuiRichTreeView"}),{getRootProps:n,contextValue:o,instance:a}=Cw({plugins:Bw,rootRef:t,props:r}),{slots:i,slotProps:s}=r,l=Ww(r),c=i?.root??Uw,d=Gr({elementType:c,externalSlotProps:s?.root,className:l.root,getSlotProps:n,ownerState:r});return u.jsx(LS,{value:o,children:u.jsx(c,Y({},d,{children:u.jsx(rh,{slots:i,slotProps:s,itemsToRender:a.getItemsToRender()})}))})}),Vw=Ee(u.jsx("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"})),Gw=Ee([u.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"},"0"),u.jsx("path",{d:"M14 17H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"},"1")]),Kw=Ee(u.jsx("path",{d:"M19 15v4H5v-4zm1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1M7 18.5c-.82 0-1.5-.67-1.5-1.5s.68-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5M19 5v4H5V5zm1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1M7 8.5c-.82 0-1.5-.67-1.5-1.5S6.18 5.5 7 5.5s1.5.68 1.5 1.5S7.83 8.5 7 8.5"})),Qw=Ee(u.jsx("path",{d:"M15 4v2h3v12h-3v2h5V4zM4 20h5v-2H6V6h3V4H4z"}));function nh({items:e,defaultExpandedItems:t,navigate:r}){return u.jsx(Hw,{items:eC(e,r),defaultExpandedItems:t,slots:{item:Zw}})}const Yw=Uu.animated(Po);function Xw(e){const t=Uu.useSpring({to:{opacity:e.in?1:0,transform:`translate3d(0,${e.in?0:20}px,0)`}});return u.jsx(Yw,{style:t,...e})}function Jw({item:e,...t}){const r=u.jsxs(pw,{...t,sx:{display:"flex",alignItems:"center",color:e.error?"error.main":"grey.600"},children:[e.fileType==="directory"&&u.jsx(Vw,{})||e.fileType==="notebook"&&u.jsx(Gw,{})||e.fileType==="model"&&u.jsx(Qw,{})||e.fileType=="database"&&u.jsx(Kw,{})||u.jsx(Mp,{}),u.jsx(x.Typography,{variant:"body2",sx:{marginLeft:"5px"},color:e.error?"error.main":e.link?"primary.main":"grey.600",children:e.label})]});return e.error?u.jsx(x.Tooltip,{title:e.error,placement:"right",children:r}):r}const Zw=S.forwardRef(function(e,t){const{id:r,itemId:n,label:o,children:a,disabled:i,...s}=e,{getRootProps:l,getContentProps:c,getLabelProps:d,getIconContainerProps:p,getGroupTransitionProps:h,status:f,publicAPI:g}=WS({id:r,itemId:n,children:a,label:o,disabled:i,rootRef:t}),y=g.getItem(n);return f.selected=!1,f.focused=!1,u.jsx(vl,{itemId:n,children:u.jsxs(uw,{...l(s),children:[u.jsxs(dw,{...c(),...y.link&&{onClick:v=>y.link(v)},sx:{pointerEvents:!y.selectable&&"none"},children:[u.jsx(hw,{...p(),children:u.jsx(lw,{status:f})}),u.jsx(Jw,{...d({item:y})})]}),a&&u.jsx(Xw,{...h()})]})})});function eC(e,t){const r=new Map;return e.map(n=>{let o=r;const a=n.path.split("/");a.forEach((i,s)=>{s===a.length-1?o.set(i,n):(o.has(i)||o.set(i,new Map),o=o.get(i))})}),oh(r,"",t)}function oh(e,t,r){const n=[];return e.forEach((o,a)=>{const i=a.endsWith(".malloy")&&"model"||a.endsWith(".malloynb")&&"notebook"||a.endsWith(".parquet")&&"database"||"unknown";if(i!=="unknown"){const s=o;n.push({id:t+a,label:a,fileType:i,link:i==="model"||i==="notebook"?l=>r(t+a,l):void 0,selectable:i==="model"||i==="notebook",error:"error"in s?s.error:void 0})}else t+=`${a}/`,n.push({id:t,label:a,fileType:"directory",selectable:!0,link:void 0,children:oh(o,t,r)})}),n}const tC=new ai(new ct),rC=["notebooks/","models/"];function nC({navigate:e}){const{projectName:t,packageName:r,versionId:n}=Ft(),{data:o,isError:a,error:i,isSuccess:s}=It({queryKey:["models",t,r,n],queryFn:l=>tC.listModels(t,r,n,l)});return u.jsx(tt,{variant:"outlined",sx:{width:"100%"},children:u.jsxs(kt,{children:[u.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Semantic Models"}),u.jsx(x.Divider,{}),u.jsxs(x.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!s&&!a&&u.jsx(zt,{text:"Fetching Models..."}),a&&u.jsx(Pt,{error:i,context:`${t} > ${r} > Models`}),s&&o.data.length>0&&u.jsx(nh,{items:o.data.sort((l,c)=>l.path.localeCompare(c.path)),navigate:e,defaultExpandedItems:rC}),s&&o.data.length===0&&u.jsx(x.Typography,{variant:"body2",children:"No models found"})]})]})})}const oC=new Md(new ct),aC=["notebooks/"];function iC({navigate:e}){const{projectName:t,packageName:r,versionId:n}=Ft(),{data:o,isError:a,error:i,isSuccess:s}=It({queryKey:["notebooks",t,r,n],queryFn:l=>oC.listNotebooks(t,r,n,l)});return u.jsx(tt,{variant:"outlined",sx:{width:"100%"},children:u.jsxs(kt,{children:[u.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Notebooks"}),u.jsx(x.Divider,{}),u.jsxs(x.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!s&&!a&&u.jsx(zt,{text:"Fetching Notebooks..."}),a&&u.jsx(Pt,{error:i,context:`${t} > ${r} > Notebooks`}),s&&o.data.length>0&&u.jsx(nh,{items:o.data.sort((l,c)=>l.path.localeCompare(c.path)),defaultExpandedItems:aC,navigate:e}),s&&o.data.length===0&&u.jsx(x.Typography,{variant:"body2",children:"No notebooks found"})]})]})})}const sC=new U0(new ct);function lC(){const{projectName:e,packageName:t,versionId:r}=Ft(),{data:n,isError:o,isLoading:a,error:i}=It({queryKey:["schedules",e,t,r],queryFn:s=>sC.listSchedules(e,t,r,s)});return a?u.jsx(zt,{text:"Fetching Schedules..."}):o?u.jsx(Pt,{error:i,context:`${e} > ${t} > Schedules`}):n.data.length?u.jsx(tt,{variant:"outlined",sx:{padding:"10px",width:"100%"},children:u.jsxs(kt,{children:[u.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Scheduler"}),u.jsx(x.Divider,{}),u.jsx(x.Box,{sx:{mt:"10px",maxHeight:"200px",overflowY:"auto"},children:u.jsx(x.TableContainer,{component:x.Paper,children:u.jsxs(x.Table,{sx:{minWidth:300},size:"small",children:[u.jsx(x.TableHead,{children:u.jsxs(x.TableRow,{children:[u.jsx(x.TableCell,{align:"left",children:"Resource"}),u.jsx(x.TableCell,{align:"left",children:"Schedule"}),u.jsx(x.TableCell,{align:"left",children:"Action"}),u.jsx(x.TableCell,{align:"left",children:"Connection"}),u.jsx(x.TableCell,{align:"left",children:"Last Run"}),u.jsx(x.TableCell,{align:"left",children:"Status"})]})}),u.jsx(x.TableBody,{children:n.data.map(s=>u.jsxs(x.TableRow,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[u.jsx(x.TableCell,{align:"left",children:s.resource}),u.jsx(x.TableCell,{align:"left",children:s.schedule}),u.jsx(x.TableCell,{align:"left",children:s.action}),u.jsx(x.TableCell,{align:"left",children:s.connection}),u.jsx(x.TableCell,{align:"left",children:s.lastRunTime?new Date(s.lastRunTime).toLocaleString():"n/a"}),u.jsx(x.TableCell,{align:"left",children:s.lastRunStatus})]},s.resource))})]})})})]})}):null}const cC="README.malloynb";function uC({navigate:e}){return e||(e=t=>{window.location.href=t}),u.jsxs(x.Grid,{container:!0,spacing:2,columns:12,children:[u.jsx(x.Grid,{size:{xs:12,md:4},children:u.jsx(T1,{})}),u.jsx(x.Grid,{size:{xs:12,md:4},children:u.jsx(iC,{navigate:e})}),u.jsx(x.Grid,{size:{xs:12,md:4},children:u.jsx(nC,{navigate:e})}),u.jsx(x.Grid,{size:{xs:12,md:6},children:u.jsx(_1,{})}),u.jsx(x.Grid,{size:{xs:12,md:6},children:u.jsx(N1,{})}),u.jsx(x.Grid,{size:{xs:12,md:12},children:u.jsx(lC,{})}),u.jsx(x.Grid,{size:{xs:12,md:12},children:u.jsx(Tp,{notebookPath:cC,hideEmbeddingIcons:!0})})]})}const ah=_.createContext(void 0),dC=({server:e=`${window.location.protocol}//${window.location.host}/api/v0`,getAccessToken:t,children:r})=>{const n={server:e,getAccessToken:t};return u.jsx(ah.Provider,{value:n,children:r})},Cl=()=>{const e=_.useContext(ah);if(e===void 0)throw new Error("useServer must be used within a ServerProvider");return e},sa=Ee(u.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})),fu=Ee(u.jsx("path",{d:"m14.06 9.02.92.92L5.92 19H5v-.92zM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29m-3.6 3.19L3 17.25V21h3.75L17.81 9.94z"}));function pC({cell:e,sourceAndPaths:t,onQueryChange:r,onSourceChange:n}){const o={query:e.value,malloyResult:e.result?JSON.parse(e.result):void 0,malloyQuery:e.queryInfo?JSON.parse(e.queryInfo):void 0,sourceName:e.sourceName,modelPath:e.modelPath};return u.jsx(Pp,{sourceAndPaths:t,existingQuery:o,existingSourceName:e.sourceName,onQueryChange:r,onSourceChange:n})}function hC({cell:e,expandCodeCell:t,expandEmbedding:r,hideEmbeddingIcons:n,editingMalloy:o,editingMarkdown:a,sourceAndPaths:i,onCellChange:s,onClose:l,onEdit:c,onDelete:d,addButtonCallback:p}){const[h,f]=_.useState(t),[g,y]=_.useState(r),[v,b]=_.useState(),[C]=_.useState(),[w,k]=_.useState(mo()),[j,P]=_.useState(!1),[B,F]=_.useState(e.sourceName?i.findIndex(O=>O.sourceInfo.name===e.sourceName):0);_.useEffect(()=>{e.isMarkdown||Jr(e.value,"malloy").then(O=>{b(O)})},[e]);const[L,m]=_.useState(e.value);_.useEffect(()=>{document.documentElement.setAttribute("data-color-mode","light")});const T=mC(O=>{s({...e,value:O})}),[D,$]=_.useState(!1),H=()=>{d(),$(!1)},J=i.length===0,V=()=>{const O=i[B],q=O?.modelPath||e.modelPath||"",oe=O?.sourceInfo.name||e.sourceName||"";s({...e,value:w.query,result:w.malloyResult?JSON.stringify(w.malloyResult):void 0,queryInfo:w.malloyQuery?JSON.stringify(w.malloyQuery):void 0,sourceName:oe,modelPath:q})},ce=u.jsx(x.Tooltip,{title:"Delete Cell",children:u.jsx(x.IconButton,{size:"small",onClick:()=>$(!0),children:u.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u.jsx("path",{d:"M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m2 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6h14zM10 11v6M14 11v6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}),K=u.jsxs(x.Dialog,{open:D,onClose:()=>$(!1),children:[u.jsx(x.DialogTitle,{children:"Confirm Delete"}),u.jsx(x.DialogContent,{children:u.jsx(x.Typography,{children:"Are you sure you want to delete this cell?"})}),u.jsxs(x.DialogActions,{children:[u.jsx(x.Button,{onClick:()=>$(!1),children:"Cancel"}),u.jsx(x.Button,{onClick:H,color:"error",children:"Delete"})]})]}),se=e.isMarkdown?u.jsxs(u.Fragment,{children:[a?u.jsx(x.Tooltip,{title:"Save",children:u.jsx(x.IconButton,{size:"small",onClick:l,children:u.jsx(sa,{})})}):u.jsx(x.Tooltip,{title:"Edit",children:u.jsx(x.IconButton,{size:"small",onClick:c,children:u.jsx(fu,{})})}),!a&&ce]}):u.jsxs(u.Fragment,{children:[!o&&u.jsx(x.Tooltip,{title:h?"Hide Code":"View Code",children:u.jsx(x.IconButton,{size:"small",onClick:()=>{f(!h)},children:u.jsx(jp,{})})}),!n&&!o&&e.result&&u.jsx(x.Tooltip,{title:g?"Hide Embedding":"View Embedding",children:u.jsx(x.IconButton,{size:"small",onClick:()=>{y(!g)},children:u.jsx(Oo,{})})}),o&&u.jsx(x.Tooltip,{title:"Save",children:u.jsx(x.IconButton,{size:"small",onClick:()=>{V(),l()},children:u.jsx(sa,{})})}),!o&&u.jsx(x.Tooltip,{title:"Edit",children:u.jsx(x.IconButton,{size:"small",onClick:c,children:u.jsx(fu,{})})}),!o&&ce]}),Z=o||a,X=a?u.jsx(x.Tooltip,{title:"Save",children:u.jsx(x.IconButton,{size:"small",onClick:l,children:u.jsx(sa,{})})}):o?u.jsx(x.Tooltip,{title:"Save",children:u.jsx(x.IconButton,{size:"small",onClick:()=>{V(),l()},children:u.jsx(sa,{})})}):null,U=j&&u.jsx(x.Box,{sx:{position:"absolute",top:"4px",right:"4px",display:"flex",gap:"8px",backgroundColor:"background.paper",border:"1px solid",borderColor:"divider",borderRadius:"8px",padding:"2px 4px",boxShadow:1,zIndex:10},children:!Z&&u.jsxs(u.Fragment,{children:[p(!0),p(!1),se]})||X});return u.jsxs(tt,{sx:{position:"relative",marginTop:"5px",marginBottom:"5px",borderWidth:"1.5px",backgroundColor:"#fff",minHeight:"50px"},onMouseEnter:()=>P(!0),onMouseLeave:()=>{P(!1)},children:[U,e.isMarkdown?u.jsx(u.Fragment,{children:a?u.jsx(Gh,{value:L,preview:"edit",autoFocus:!0,onChange:O=>{m(O),T(O)},onBlur:()=>{V(),j||l()}}):u.jsx(x.Box,{sx:{px:.5,pt:0,mt:0,"& h1, & h2, & h3, & h4, & h5, & h6":{mt:.5,mb:.5},"& p":{mt:.5,mb:.5},"& ul, & ol":{mt:.5,mb:.5},"& li":{mt:0,mb:0},"& pre, & code":{mt:.5,mb:.5},"& blockquote":{mt:.5,mb:.5}},children:L?u.jsx(x.Box,{onClick:c,sx:{cursor:"pointer"},children:u.jsx(Ns,{children:L})}):u.jsxs(x.Box,{onClick:c,sx:{cursor:"pointer"},children:[u.jsx(x.Typography,{sx:{p:2,textAlign:"center",variant:"subtitle2",fontWeight:"medium"},children:"Markdown is empty"}),u.jsx(x.Typography,{sx:{mb:2,textAlign:"center",variant:"body2"},children:"Click to edit."})]})})}):u.jsxs(u.Fragment,{children:[u.jsx(x.Collapse,{in:g,timeout:"auto",unmountOnExit:!0,children:u.jsx(x.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:u.jsx(x.Typography,{component:"div",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},dangerouslySetInnerHTML:{__html:C}})})}),u.jsx(x.Collapse,{in:h,timeout:"auto",unmountOnExit:!0,children:u.jsx(x.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:u.jsx(x.Typography,{component:"div",className:"content",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},dangerouslySetInnerHTML:{__html:v}})})}),o&&(J?u.jsxs(u.Fragment,{children:[u.jsx(x.Typography,{sx:{p:2,textAlign:"center",variant:"subtitle2",fontWeight:"medium"},children:"No Model Imports"}),u.jsx(x.Typography,{sx:{mb:2,textAlign:"center",variant:"body2"},children:"Please add a model import above."})]}):u.jsx(pC,{sourceAndPaths:i,onQueryChange:O=>{k(O)},cell:e,onSourceChange:F})),!o&&e.result&&u.jsx(tt,{variant:"outlined",sx:{borderRadius:0},children:u.jsx(Ep,{result:e.result,minHeight:300,maxHeight:800})}),!o&&!e.result&&u.jsxs(x.Box,{onClick:c,sx:{cursor:"pointer"},children:[u.jsx(x.Typography,{sx:{p:2,textAlign:"center",variant:"subtitle2",fontWeight:"medium"},children:"Explore is empty"}),u.jsx(x.Typography,{sx:{mb:2,textAlign:"center",variant:"body2"},children:"Click to edit."})]})]}),D&&K]})}function mC(e,t=2e3){const r=_.useRef(void 0);return _.useCallback(n=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{e(n)},t)},[e,t])}const ih=_.createContext(void 0);function sh({children:e,userContext:t,notebookStorage:r}){const n=_.useMemo(()=>({notebookStorage:r,userContext:t}),[r,t]);return u.jsx(ih.Provider,{value:n,children:e})}function lh(){const e=_.useContext(ih);if(!e)throw new Error("useNotebookStorage must be used within a NotebookStorageProvider");return e}const fC=Ee(u.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),gC=Ee(u.jsx("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5z"})),yC=new ai(new ct);function bC({initialSelectedModels:e,onModelChange:t}){const{projectName:r,packageName:n,versionId:o}=Ft(),{data:a,isLoading:i,isSuccess:s,isError:l,error:c}=It({queryKey:["models",r,n,o],queryFn:b=>yC.listModels(r,n,o,b)}),[d,p]=_.useState(e||[]),[h,f]=_.useState(null);_.useEffect(()=>{p(e||[])},[e]);const g=b=>{const C=d.filter(w=>w!==b);p(C),t(C)},y=b=>{const C=[...d,b];p(C),t(C),f(null)};let v=[];return s&&a?.data&&(v=a.data.filter(b=>!d.includes(b.path)).map(b=>b.path)),l?u.jsx(Pt,{error:c,context:`${r} > ${n} > Model Picker`}):u.jsxs(u.Fragment,{children:[u.jsxs(x.FormControl,{fullWidth:!0,children:[i&&u.jsx(x.Typography,{children:"Loading..."}),u.jsxs(x.Stack,{direction:"row",spacing:1,children:[d.map(b=>u.jsx(x.Chip,{label:b,onDelete:()=>g(b),deleteIcon:u.jsx(fC,{}),sx:{marginBottom:"5px"}},b)),u.jsx(x.Button,{size:"small",startIcon:u.jsx(gC,{}),onClick:b=>f(b.currentTarget),disabled:i||l||v.length===0,children:"Add Model"})]})]}),u.jsxs(x.Menu,{anchorEl:h,open:!!h,onClose:()=>f(null),children:[u.jsx(x.Typography,{variant:"subtitle2",sx:{ml:1},children:"Models"}),u.jsx(x.Divider,{}),v.length===0?u.jsx(x.MenuItem,{disabled:!0,children:"No models available"}):v.map(b=>u.jsx(x.MenuItem,{onClick:()=>y(b),children:u.jsx(x.Typography,{variant:"body2",children:b})},b))]})]})}const xC=new ai(new ct);function vC({notebookPath:e,expandCodeCells:t,expandEmbeddings:r,hideEmbeddingIcons:n}){const o=Fn(),{projectName:a,packageName:i,versionId:s}=Ft(),{server:l,getAccessToken:c}=Cl(),{notebookStorage:d,userContext:p}=lh();if(!a||!i)throw new Error("Project and package must be provided via PubliserPackageProvider");if(!d||!p)throw new Error("Notebook storage and user context must be provided via NotebookStorageProvider");const[h,f]=_.useState(),[g,y]=_.useState(),[v,b]=_.useState(),[C,w]=_.useState([]),[k,j]=_.useState(null),[P,B]=_.useState(null),F=!!k,L=()=>{j(null),B(null)},m=(Z,X)=>{h.insertCell(X,{isMarkdown:Z,value:""}),V(),Z?b(X):y(X),L()},[T,D]=_.useState(!1),$=()=>{D(!0)},H=Z=>{e&&d&&p&&d.deleteNotebook(p,e),D(!1),o(`/${a}/${i}`,Z)},J=()=>{D(!1)},V=_.useCallback(()=>{f(h.saveNotebook())},[h]);if(_.useEffect(()=>{h&&(async()=>{const Z=new Map(C.map(({modelPath:O,sourceInfos:q})=>[O,q])),X=[],U=[];for(const O of h.getModels())Z.has(O)?X.push({modelPath:O,sourceInfos:Z.get(O)}):(console.log("Fetching model from Publisher",O),U.push(xC.getModel(a,i,O,s,await hl(l,c)).then(q=>({modelPath:O,sourceInfos:q.data.sourceInfos.map(oe=>JSON.parse(oe))}))));if(U.length>0){const O=await Promise.all(U);w([...X,...O])}else w(X)})()},[c,h,i,a,l,s]),_.useEffect(()=>{e&&f(fo.loadNotebook(d,p,e))},[e,d,p]),!h)return u.jsx("div",{children:"Loading..."});const ce=Z=>{const X=[];for(const U of Z)for(const O of U.sourceInfos)X.push({modelPath:U.modelPath,sourceInfo:O});return X},K=(Z,X)=>u.jsx(x.Button,{size:"small",startIcon:u.jsx(j1,{}),onClick:()=>m(Z,X),variant:"contained",sx:{backgroundColor:"#fff",color:U=>U.palette.mode==="dark"?U.palette.grey[100]:U.palette.grey[700],boxShadow:"none","&:hover":{backgroundColor:U=>U.palette.mode==="dark"?U.palette.grey[500]:U.palette.grey[300],boxShadow:"none"}},children:Z?"Markdown":"Explore"}),se=u.jsxs(x.Box,{sx:{display:"flex",gap:1,justifyContent:"center",flex:2},children:[K(!1,h.getCells().length),K(!0,h.getCells().length)]});return u.jsxs(tt,{variant:"outlined",children:[u.jsxs(kt,{children:[u.jsxs(yn,{sx:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[u.jsxs(yn,{direction:"row",spacing:1,alignItems:"center",children:[u.jsx(x.Typography,{variant:"overline",sx:{fontSize:"13px",fontWeight:"bold",verticalAlign:"middle"},children:"Workbook"}),u.jsx(x.Typography,{variant:"subtitle2",sx:{fontSize:"13px",fontWeight:"normal",verticalAlign:"middle",ml:1},children:`${a} > ${i} > ${e}`})]}),u.jsxs(yn,{sx:{display:"flex",flexDirection:"row",gap:1},children:[u.jsx(x.Box,{sx:{display:"flex",alignItems:"center",mt:1,mb:1},children:u.jsx(SC,{notebookData:h})}),u.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",mt:1,mb:1},children:[u.jsx(x.Button,{color:"error",onClick:$,size:"small",children:"Delete"}),u.jsxs(x.Dialog,{open:T,onClose:J,children:[u.jsx(x.DialogTitle,{children:"Delete Notebook"}),u.jsx(x.DialogContent,{children:u.jsxs(x.DialogContentText,{children:['Are you sure you want to delete the notebook "',e,'"? This action cannot be undone.']})}),u.jsxs(x.DialogActions,{children:[u.jsx(x.Button,{onClick:J,color:"primary",size:"small",children:"Cancel"}),u.jsx(x.Button,{onClick:Z=>H(Z),color:"error",autoFocus:!0,size:"small",children:"Delete"})]})]})]})]})]}),u.jsx(x.Divider,{}),u.jsxs(yn,{sx:{display:"flex",flexDirection:"row",width:"100%",mt:2},children:[u.jsx(x.Box,{sx:{flex:1},children:u.jsx(bC,{initialSelectedModels:h.getModels(),onModelChange:Z=>{f(h.setModels(Z)),V()}})}),u.jsx(x.Box,{sx:{flex:1}})]})]}),u.jsx(ci,{children:u.jsxs(yn,{children:[h.getCells().length===0&&u.jsxs(u.Fragment,{children:[u.jsx(x.Typography,{sx:{textAlign:"center",p:2,variant:"subtitle2",fontWeight:"medium"},children:"Workbook is empty"}),u.jsx(x.Typography,{variant:"body2",sx:{textAlign:"center",mb:2,variant:"body2"},children:"Click the + buttons to add a markdown or code cell."})]}),h.getCells().map((Z,X)=>u.jsx(_.Fragment,{children:u.jsx(hC,{cell:Z,addButtonCallback:U=>K(U,X),sourceAndPaths:ce(C),expandCodeCell:t,expandEmbedding:r,hideEmbeddingIcons:n,editingMarkdown:v===X,editingMalloy:g===X,onDelete:()=>{f(h.deleteCell(X)),V()},onCellChange:U=>{f(h.setCell(X,U)),V()},onEdit:()=>{Z.isMarkdown?b(X):y(X)},onClose:()=>{Z.isMarkdown?b(void 0):y(void 0)}},`${X}-${Z.isMarkdown}-${e}-${a}-${i}`)},`${X}-${h.getCells().length}`)),se,u.jsxs(x.Menu,{anchorEl:k,open:F,onClose:L,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:[u.jsx(x.MenuItem,{onClick:()=>m(!0,P??0),children:"Add Markdown"}),u.jsx(x.MenuItem,{onClick:()=>m(!1,P??0),children:"Add Malloy"})]}),u.jsx(yn,{sx:{flexDirection:"row",justifyContent:"flex-end",p:1}})]})})]})}function SC({notebookData:e}){const[t,r]=_.useState(!1);return u.jsx(x.Button,{color:"primary",onClick:async()=>{if(!e)return;const n=e.toMalloyNotebook();try{await navigator.clipboard.writeText(n),r(!0),setTimeout(()=>r(!1),1500)}catch{r(!1),alert("Failed to copy to clipboard")}},size:"small",children:t?"Copied!":"Export"})}function wC({onNotebookClick:e}){const{notebookStorage:t,userContext:r}=lh(),[n,o]=_.useState([]);return _.useEffect(()=>{t&&r&&o(t.listNotebooks(r))},[t,r]),u.jsxs(u.Fragment,{children:[u.jsx(x.Divider,{}),u.jsx(x.Box,{sx:{maxHeight:"300px",overflow:"auto","&::-webkit-scrollbar":{width:"8px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:"rgba(0,0,0,0.2)",borderRadius:"4px"}},children:u.jsxs(x.List,{dense:!0,children:[n.length===0&&u.jsx(x.ListItem,{children:u.jsx(x.ListItemText,{primary:"No notebooks found.",sx:{textAlign:"center"}})}),n.map(a=>u.jsx(x.ListItem,{onClick:i=>e(a,i),sx:{cursor:"pointer","&:hover":{backgroundColor:"action.hover"}},children:u.jsx(x.ListItemText,{primary:a})},a))]})})]})}const CC=new Ad(new ct);function kC(){const{projectName:e}=uh(),{data:t,isSuccess:r,isError:n,error:o}=It({queryKey:["about",e],queryFn:a=>CC.getProject(e,!1,a)});return u.jsxs(u.Fragment,{children:[!r&&!n&&u.jsx(zt,{text:"Fetching About..."}),r&&u.jsxs(tt,{variant:"outlined",sx:{p:2},children:[u.jsx(x.Typography,{variant:"overline",fontWeight:"bold",sx:{mb:1},children:"Readme"}),u.jsx(tt,{sx:{p:1},children:u.jsx(Ns,{children:t.data.readme})})]}),n&&u.jsx(Pt,{error:o,context:`${e} > About`})]})}const PC=new Nd(new ct);function IC({navigate:e}){const{projectName:t}=uh(),{data:r,isSuccess:n,isError:o,error:a}=It({queryKey:["packages",t],queryFn:i=>PC.listPackages(t,i)});return u.jsxs(u.Fragment,{children:[!n&&!o&&u.jsx(zt,{text:"Fetching Packages..."}),n&&u.jsxs(tt,{variant:"outlined",sx:{p:2},children:[u.jsx(x.Typography,{variant:"overline",fontWeight:"bold",sx:{mb:1},children:"Packages"}),u.jsx(x.Grid,{container:!0,spacing:2,columns:12,children:r.data.sort((i,s)=>i.name.localeCompare(s.name)).map(i=>u.jsx(x.Grid,{size:{xs:12,sm:12,md:12,lg:4},children:u.jsx(tt,{variant:"outlined",sx:{cursor:"pointer",transition:"all 0.2s ease-in-out","&:hover":{boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",transform:"translateY(-2px)"}},onClick:s=>e(i.name+"/",s),children:u.jsxs(kt,{children:[u.jsx(x.Typography,{variant:"overline",color:"primary.main",children:i.name}),u.jsx(x.Box,{sx:{maxHeight:"120px",overflowY:"auto"},children:u.jsx(x.Typography,{variant:"body2",children:i.description})})]})})},i.name))})]}),o&&u.jsx(Pt,{error:a,context:`${t} > Packages`})]})}const ch=_.createContext(void 0);function uh(){const e=_.useContext(ch);if(!e)throw new Error("useProject must be used within a ProjectProvider");return e}function jC({children:e,projectName:t}){return u.jsx(ch.Provider,{value:{projectName:t},children:e})}function EC({navigate:e}){return u.jsxs(x.Grid,{container:!0,spacing:2,columns:12,children:[u.jsx(x.Grid,{size:{xs:12,md:12},children:u.jsx(IC,{navigate:e})}),u.jsx(x.Grid,{size:{xs:12,md:12},children:u.jsx(kC,{})})]})}const TC=Ee(u.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2M8 17c-.55 0-1-.45-1-1v-3c0-.55.45-1 1-1s1 .45 1 1v3c0 .55-.45 1-1 1m4 0c-.55 0-1-.45-1-1v-1c0-.55.45-1 1-1s1 .45 1 1v1c0 .55-.45 1-1 1m0-5c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m4 5c-.55 0-1-.45-1-1V8c0-.55.45-1 1-1s1 .45 1 1v8c0 .55-.45 1-1 1"})),RC=Ee(u.jsx("path",{d:"M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42s1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41l-6.58-6.6a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1"})),gu=Ee(u.jsx("path",{d:"m19.46 8 .79-1.75L22 5.46c.39-.18.39-.73 0-.91l-1.75-.79L19.46 2c-.18-.39-.73-.39-.91 0l-.79 1.75-1.76.79c-.39.18-.39.73 0 .91l1.75.79.79 1.76c.18.39.74.39.92 0M11.5 9.5 9.91 6c-.35-.78-1.47-.78-1.82 0L6.5 9.5 3 11.09c-.78.36-.78 1.47 0 1.82l3.5 1.59L8.09 18c.36.78 1.47.78 1.82 0l1.59-3.5 3.5-1.59c.78-.36.78-1.47 0-1.82zm7.04 6.5-.79 1.75-1.75.79c-.39.18-.39.73 0 .91l1.75.79.79 1.76c.18.39.73.39.91 0l.79-1.75 1.76-.79c.39-.18.39-.73 0-.91l-1.75-.79-.79-1.76c-.18-.39-.74-.39-.92 0"})),MC=Ee(u.jsx("path",{d:"M8.7 15.9 4.8 12l3.9-3.9c.39-.39.39-1.01 0-1.4a.984.984 0 0 0-1.4 0l-4.59 4.59c-.39.39-.39 1.02 0 1.41l4.59 4.6c.39.39 1.01.39 1.4 0s.39-1.01 0-1.4m6.6 0 3.9-3.9-3.9-3.9a.984.984 0 0 1 0-1.4c.39-.39 1.01-.39 1.4 0l4.59 4.59c.39.39.39 1.02 0 1.41l-4.59 4.6c-.39.39-1.01.39-1.4 0a.984.984 0 0 1 0-1.4"})),NC=Ee(u.jsx("path",{d:"M12 10.9c-.61 0-1.1.49-1.1 1.1s.49 1.1 1.1 1.1 1.1-.49 1.1-1.1-.49-1.1-1.1-1.1M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m2.19 12.19L6 18l3.81-8.19L18 6z"})),AC=Ee([u.jsx("path",{d:"M13 8.57c-.79 0-1.43.64-1.43 1.43s.64 1.43 1.43 1.43 1.43-.64 1.43-1.43-.64-1.43-1.43-1.43"},"0"),u.jsx("path",{d:"M13.21 3c-3.84-.11-7 2.87-7.19 6.64L4.1 12.2c-.25.33-.01.8.4.8H6v3c0 1.1.9 2 2 2h1v2c0 .55.45 1 1 1h5c.55 0 1-.45 1-1v-3.68c2.44-1.16 4.1-3.68 4-6.58-.14-3.62-3.18-6.63-6.79-6.74M16 10c0 .13-.01.26-.02.39l.83.66c.08.06.1.16.05.25l-.8 1.39c-.05.09-.16.12-.24.09l-.99-.4c-.21.16-.43.29-.67.39L14 13.83c-.01.1-.1.17-.2.17h-1.6c-.1 0-.18-.07-.2-.17l-.15-1.06c-.25-.1-.47-.23-.68-.39l-.99.4c-.09.03-.2 0-.25-.09l-.8-1.39c-.05-.08-.03-.19.05-.25l.84-.66c-.01-.13-.02-.26-.02-.39s.02-.27.04-.39l-.85-.66c-.08-.06-.1-.16-.05-.26l.8-1.38c.05-.09.15-.12.24-.09l1 .4c.2-.15.43-.29.67-.39L12 6.17c.02-.1.1-.17.2-.17h1.6c.1 0 .18.07.2.17l.15 1.06c.24.1.46.23.67.39l1-.4c.09-.03.2 0 .24.09l.8 1.38c.05.09.03.2-.05.26l-.85.66c.03.12.04.25.04.39"},"1")]),yu=Ee(u.jsx("path",{d:"M4 20h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2m0-3h2v2H4zM2 6c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2m4 1H4V5h2zm-2 7h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2m0-3h2v2H4z"})),_C=new Ad(new ct),OC=e=>{if(!e)return"Explore semantic models, run queries, and build dashboards";const t=e.replace(/^#+\s+/gm,"").replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/`([^`]+)`/g,"$1").trim(),r=t.split(/\n\s*\n/)[0]||t;if(r.length<=120)return r;const n=r.substring(0,120).split(" ");return n.pop(),n.join(" ")+"..."};function LC({navigate:e}){const{data:t,isSuccess:r,isError:n,error:o}=It({queryKey:["projects"],queryFn:a=>_C.listProjects(a)});return n?u.jsx(Pt,{error:o,context:"Projects List"}):r?u.jsxs(x.Container,{maxWidth:"lg",sx:{py:4},children:[u.jsxs(x.Box,{sx:{textAlign:"center",mb:6},children:[u.jsxs(x.Stack,{direction:"row",justifyContent:"center",alignItems:"center",spacing:1,sx:{mb:2},children:[u.jsx(gu,{sx:{fontSize:32,color:"primary.main"}}),u.jsx(x.Typography,{variant:"h3",component:"h1",fontWeight:700,children:"Publisher"})]}),u.jsx(x.Typography,{variant:"h5",color:"text.secondary",sx:{mb:3,maxWidth:600,mx:"auto"},children:"The open-source semantic model server for the Malloy data language"}),u.jsx(x.Typography,{variant:"body1",color:"text.secondary",sx:{maxWidth:800,mx:"auto"},children:"Define semantic models once — and use them everywhere. Publisher serves Malloy models through clean APIs, enabling consistent, interpretable, and AI-ready data access for tools, applications, and agents."})]}),u.jsxs(x.Grid,{container:!0,spacing:3,sx:{mb:6},children:[u.jsx(x.Grid,{size:{xs:12,md:4},children:u.jsx(x.Card,{variant:"outlined",onClick:()=>{window.open("https://github.com/malloydata/publisher/blob/main/README.md#ad-hoc-data-analysis","_blank")},sx:{height:"100%",cursor:"pointer",transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:2}},children:u.jsxs(x.CardContent,{sx:{p:3},children:[u.jsxs(x.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{mb:2},children:[u.jsx(TC,{sx:{color:"info.main",fontSize:28}}),u.jsx(x.Typography,{variant:"h6",fontWeight:600,children:"Ad Hoc Analysis"})]}),u.jsx(x.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"Use Explorer, a visual query builder that allows analysts to browse semantic sources, build queries, and run nested logic — all without writing code."}),u.jsx(x.Chip,{label:"No-code",size:"small",color:"primary",variant:"outlined"})]})})}),u.jsx(x.Grid,{size:{xs:12,md:4},children:u.jsx(x.Card,{variant:"outlined",onClick:()=>{window.open("https://github.com/malloydata/publisher/blob/main/README.md#notebook-based-dashboards","_blank")},sx:{height:"100%",cursor:"pointer",transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:2}},children:u.jsxs(x.CardContent,{sx:{p:3},children:[u.jsxs(x.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{mb:2},children:[u.jsx(MC,{sx:{color:"warning.main",fontSize:28}}),u.jsx(x.Typography,{variant:"h6",fontWeight:600,children:"Notebook Dashboards"})]}),u.jsx(x.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"Create shareable, code-first dashboards using Malloy notebooks. Include text, charts, and reusable views — all versioned alongside your models."}),u.jsx(x.Chip,{label:"Versioned",size:"small",color:"warning",variant:"outlined"})]})})}),u.jsx(x.Grid,{size:{xs:12,md:4},children:u.jsx(x.Card,{variant:"outlined",onClick:()=>{window.open("https://github.com/malloydata/publisher/blob/main/README.md#mcp-based-ai-data-agents","_blank")},sx:{height:"100%",cursor:"pointer",transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:2}},children:u.jsxs(x.CardContent,{sx:{p:3},children:[u.jsxs(x.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{mb:2},children:[u.jsx(AC,{sx:{color:"success.main",fontSize:28}}),u.jsx(x.Typography,{variant:"h6",fontWeight:600,children:"AI Data Agents"})]}),u.jsx(x.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"Expose your semantic models via the Model Context Protocol (MCP), enabling AI agents to discover sources and ask well-formed questions."}),u.jsx(x.Chip,{label:"AI-Ready",size:"small",color:"success",variant:"outlined"})]})})})]}),u.jsx(x.Divider,{sx:{my:4}}),t.data.length>0?u.jsxs(u.Fragment,{children:[u.jsxs(x.Box,{sx:{textAlign:"center",mb:4},children:[u.jsxs(x.Stack,{direction:"row",justifyContent:"center",alignItems:"center",spacing:1,sx:{mb:2},children:[u.jsx(yu,{sx:{color:"primary.main",fontSize:24}}),u.jsx(x.Typography,{variant:"h4",fontWeight:600,children:"Select a Project"})]}),u.jsx(x.Typography,{variant:"body1",color:"text.secondary",children:"Choose a project to explore its semantic models and start analyzing your data"})]}),u.jsx(x.Grid,{container:!0,spacing:3,justifyContent:"center",children:t.data.map(a=>u.jsx(x.Grid,{size:{xs:12,sm:6,md:4},children:u.jsx(x.Card,{variant:"outlined",sx:{height:"100%",cursor:"pointer",transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:2,borderColor:"primary.main"}},onClick:i=>e(`/${a.name}/`,i),children:u.jsxs(x.CardContent,{sx:{p:3,textAlign:"center"},children:[u.jsx(NC,{sx:{fontSize:48,color:"primary.main",mb:2}}),u.jsx(x.Typography,{variant:"h6",fontWeight:600,gutterBottom:!0,children:a.name}),u.jsx(x.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:OC(a.readme)}),u.jsx(x.Button,{variant:"contained",color:"secondary",endIcon:u.jsx(RC,{}),fullWidth:!0,children:"Open Project"})]})})},a.name))})]}):u.jsxs(x.Box,{sx:{textAlign:"center",mb:4},children:[u.jsxs(x.Stack,{direction:"row",justifyContent:"center",alignItems:"center",spacing:1,sx:{mb:2},children:[u.jsx(yu,{sx:{color:"primary.main",fontSize:24}}),u.jsx(x.Typography,{variant:"h4",fontWeight:600,children:"Get Started"})]}),u.jsx(x.Typography,{variant:"body1",color:"text.secondary",sx:{mb:3},children:"No projects found. Create your first Malloy project to start exploring semantic models and building data experiences."}),u.jsx(x.Button,{variant:"contained",size:"large",color:"primary",startIcon:u.jsx(gu,{}),href:"https://github.com/malloydata/publisher/blob/main/README.md#server-configuration",target:"_blank",rel:"noopener noreferrer",children:"Learn How to Create Models"})]}),u.jsx(x.Box,{sx:{textAlign:"center",mt:6,pt:4,borderTop:1,borderColor:"divider"},children:u.jsxs(x.Typography,{variant:"body2",color:"text.secondary",children:["Publisher is built on fully open infrastructure and designed for the AI era. Join the"," ",u.jsx("a",{href:"https://join.slack.com/t/malloy-community/shared_invite/zt-1kgfwgi5g-CrsdaRqs81QY67QW0~t_uw",target:"_blank",rel:"noopener noreferrer",style:{color:"primary.main",textDecoration:"underline"},children:"Malloy Slack community"})," ","to ask questions, share ideas, and contribute to the future of data modeling."]})})]}):u.jsx(zt,{text:"Loading projects..."})}function $C(){const{projectName:e,packageName:t}=on(),[r,n]=_.useState(""),[o,a]=_.useState(null),[i,s]=_.useState(!1),[l,c]=_.useState(!1),d=Fn(),p=!!o,h=C=>{a(C.currentTarget)},f=()=>{a(null)},g=()=>{c(!1)},y=()=>{s(!1)},v=(C,w)=>{c(!1),d(`/${e}/${t}/scratchNotebook/${encodeURIComponent(C)}`,w)},b=C=>{s(!1),d(`/${e}/${t}/scratchNotebook/${encodeURIComponent(r)}`,C),n("")};return!e||!t?null:u.jsxs(u.Fragment,{children:[u.jsx(x.Button,{"aria-controls":p?"basic-menu":void 0,"aria-haspopup":"true","aria-expanded":p?"true":void 0,onClick:h,variant:"contained",sx:{height:"40px",px:2,backgroundColor:"#fbbb04","&:hover":{backgroundColor:"#eab308"}},children:"Analyze Package"}),u.jsxs(x.Menu,{id:"basic-menu",anchorEl:o,open:p,onClose:f,MenuListProps:{"aria-labelledby":"basic-button",sx:{py:.5}},children:[u.jsxs(x.MenuItem,{onClick:()=>{s(!0),f()},sx:{py:1,px:2},children:[u.jsx(x.ListItemIcon,{children:u.jsx(yo.Add,{fontSize:"small"})}),u.jsxs(x.ListItemText,{children:[u.jsx(x.Typography,{variant:"body2",fontWeight:500,children:"New Workbook"}),u.jsx(x.Typography,{variant:"caption",color:"text.secondary",children:"Create a new analysis workbook"})]})]}),u.jsxs(x.MenuItem,{onClick:()=>{c(!0),f()},sx:{py:1,px:2},children:[u.jsx(x.ListItemIcon,{children:u.jsx(yo.Launch,{fontSize:"small"})}),u.jsxs(x.ListItemText,{children:[u.jsx(x.Typography,{variant:"body2",fontWeight:500,children:"Open Workbook"}),u.jsx(x.Typography,{variant:"caption",color:"text.secondary",children:"Open an existing workbook"})]})]})]}),u.jsxs(x.Dialog,{open:i,onClose:y,maxWidth:"sm",fullWidth:!0,children:[u.jsxs(x.DialogTitle,{sx:{pb:1,pt:2,px:2},children:[u.jsx(x.Typography,{variant:"h6",fontWeight:600,sx:{mb:.5},children:"Create New Workbook"}),u.jsx(x.Typography,{variant:"body2",color:"text.secondary",children:"Start a new analysis workbook to explore your data"})]}),u.jsx(x.DialogContent,{sx:{px:2,pb:2},children:u.jsxs(x.Stack,{spacing:2,sx:{mt:1},children:[u.jsx(x.FormControl,{fullWidth:!0,children:u.jsx(x.TextField,{label:"Workbook Name",value:r,onChange:C=>n(C.target.value),placeholder:"Enter workbook name...",fullWidth:!0,autoFocus:!0,size:"small"})}),u.jsxs(x.Stack,{direction:"row",spacing:1,justifyContent:"flex-end",children:[u.jsx(x.Button,{onClick:y,variant:"outlined",size:"small",children:"Cancel"}),u.jsx(x.Button,{onClick:C=>b(C),variant:"contained",disabled:!r.trim(),size:"small",children:"Create Workbook"})]})]})})]}),u.jsxs(x.Dialog,{open:l,onClose:g,maxWidth:"md",fullWidth:!0,children:[u.jsxs(x.DialogTitle,{sx:{pb:1,pt:2,px:2},children:[u.jsx(x.Typography,{variant:"h6",fontWeight:600,sx:{mb:.5},children:"Open Workbook"}),u.jsx(x.Typography,{variant:"body2",color:"text.secondary",children:"Select an existing workbook to continue your analysis"})]}),u.jsx(x.DialogContent,{sx:{px:2,pb:2},children:u.jsx(sh,{notebookStorage:new Rp,userContext:{project:e,package:t},children:u.jsx(wC,{onNotebookClick:v})})})]})]})}new Rd(new ct);Be.defaults.baseURL="IfYouAreSeeingThis_baseURL_IsNotSet";function Zr(e,...t){const r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${e}; visit ${r} for the full message.`}const Yr="$$material",DC=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>({...r,[n.key]:n.val}),{})};function BC(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...o}=e,a=DC(t),i=Object.keys(a);function s(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${r})`}function l(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-n/100}${r})`}function c(h,f){const g=i.indexOf(f);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${r}) and (max-width:${(g!==-1&&typeof t[i[g]]=="number"?t[i[g]]:f)-n/100}${r})`}function d(h){return i.indexOf(h)+1<i.length?c(h,i[i.indexOf(h)+1]):s(h)}function p(h){const f=i.indexOf(h);return f===0?s(i[1]):f===i.length-1?l(i[f]):c(h,i[i.indexOf(h)+1]).replace("@media","@media not all and")}return{keys:i,values:a,up:s,down:l,between:c,only:d,not:p,unit:r,...o}}var Hi={exports:{}},ve={};/**
|
|
133
|
+
`));const p=n?n(c):c.label;if(p==null)throw new Error(["MUI X: The Tree View component requires all items to have a `label` property.","Alternatively, you can use the `getItemLabel` prop to specify a custom label for each item.","An item was provided without label in the `items` prop:",JSON.stringify(c)].join(`
|
|
134
|
+
`));o[h]={id:h,label:p,parentId:u,idAttribute:void 0,expandable:!!c.children?.length,disabled:t?t(c):!1,depth:d},i[h]=c;const g=u??ri;a[g]||(a[g]=[]),a[g].push(h),c.children?.forEach(b=>s(b,d+1,h))};e.forEach(c=>s(c,0,null));const l={};return Object.keys(a).forEach(c=>{l[c]=dI(a[c])}),{itemMetaMap:o,itemMap:i,itemOrderedChildrenIds:a,itemChildrenIndexes:l}},Ja=({instance:e,params:t,state:n,setState:r,experimentalFeatures:o})=>{const i=_.useCallback(T=>n.items.itemMetaMap[T],[n.items.itemMetaMap]),a=_.useCallback(T=>n.items.itemMap[T],[n.items.itemMap]),s=_.useCallback(()=>{const T=E=>{const C=n.items.itemMap[E],x=Dr(C,hI),k=n.items.itemOrderedChildrenIds[E];return k&&(x.children=k.map(T)),x};return n.items.itemOrderedChildrenIds[ri].map(T)},[n.items.itemMap,n.items.itemOrderedChildrenIds]),l=_.useCallback(T=>{if(T==null)return!1;let E=e.getItemMeta(T);if(!E)return!1;if(E.disabled)return!0;for(;E.parentId!=null;)if(E=e.getItemMeta(E.parentId),E.disabled)return!0;return!1},[e]),c=_.useCallback(T=>{const E=e.getItemMeta(T).parentId??ri;return n.items.itemChildrenIndexes[E][T]},[e,n.items.itemChildrenIndexes]),d=_.useCallback(T=>n.items.itemOrderedChildrenIds[T??ri]??[],[n.items.itemOrderedChildrenIds]),u=T=>{const E=e.getItemMeta(T);return E==null?null:document.getElementById(rh({treeId:n.id.treeId,itemId:T,id:E.idAttribute}))},h=T=>t.disabledItemsFocusable?!0:!e.isItemDisabled(T),p=_.useRef(!1),g=_.useCallback(()=>{p.current=!0},[]),b=_.useCallback(()=>p.current,[]);return _.useEffect(()=>{e.areItemUpdatesPrevented()||r(T=>{const E=By({items:t.items,isItemDisabled:t.isItemDisabled,getItemId:t.getItemId,getItemLabel:t.getItemLabel});return Object.values(T.items.itemMetaMap).forEach(C=>{E.itemMetaMap[C.id]||uI(e,"removeItem",{id:C.id})}),Te({},T,{items:E})})},[e,r,t.items,t.isItemDisabled,t.getItemId,t.getItemLabel]),{getRootProps:()=>({style:{"--TreeView-itemChildrenIndentation":typeof t.itemChildrenIndentation=="number"?`${t.itemChildrenIndentation}px`:t.itemChildrenIndentation}}),publicAPI:{getItem:a,getItemDOMElement:u,getItemTree:s,getItemOrderedChildrenIds:d},instance:{getItemMeta:i,getItem:a,getItemTree:s,getItemsToRender:()=>{const T=E=>{const C=n.items.itemMetaMap[E];return{label:C.label,itemId:C.id,id:C.idAttribute,children:n.items.itemOrderedChildrenIds[E]?.map(T)}};return n.items.itemOrderedChildrenIds[ri].map(T)},getItemIndex:c,getItemDOMElement:u,getItemOrderedChildrenIds:d,isItemDisabled:l,isItemNavigable:h,preventItemUpdates:g,areItemUpdatesPrevented:b},contextValue:{items:{onItemClick:t.onItemClick,disabledItemsFocusable:t.disabledItemsFocusable,indentationAtItemLevel:o.indentationAtItemLevel??!1}}}};Ja.getInitialState=e=>({items:By({items:e.items,isItemDisabled:e.isItemDisabled,getItemId:e.getItemId,getItemLabel:e.getItemLabel})});Ja.getDefaultizedParams=({params:e})=>Te({},e,{disabledItemsFocusable:e.disabledItemsFocusable??!1,itemChildrenIndentation:e.itemChildrenIndentation??"12px"});Ja.wrapRoot=({children:e,instance:t})=>f.jsx(nh.Provider,{value:n=>t.getItemMeta(n)?.depth??0,children:e});Ja.params={disabledItemsFocusable:!0,items:!0,isItemDisabled:!0,getItemLabel:!0,getItemId:!0,onItemClick:!0,itemChildrenIndentation:!0};const pI=typeof window<"u"?_.useLayoutEffect:_.useEffect;function ci(e){const t=_.useRef(e);return pI(()=>{t.current=e}),_.useRef((...n)=>(0,t.current)(...n)).current}const Ql=({instance:e,params:t,models:n})=>{const r=_.useMemo(()=>{const u=new Map;return n.expandedItems.value.forEach(h=>{u.set(h,!0)}),u},[n.expandedItems.value]),o=(u,h)=>{t.onExpandedItemsChange?.(u,h),n.expandedItems.setControlledValue(h)},i=_.useCallback(u=>r.has(u),[r]),a=_.useCallback(u=>!!e.getItemMeta(u)?.expandable,[e]),s=ci((u,h)=>{const p=e.isItemExpanded(h);e.setItemExpansion(u,h,!p)}),l=ci((u,h,p)=>{if(e.isItemExpanded(h)===p)return;let g;p?g=[h].concat(n.expandedItems.value):g=n.expandedItems.value.filter(b=>b!==h),t.onItemExpansionToggle&&t.onItemExpansionToggle(u,h,p),o(u,g)}),c=(u,h)=>{const p=e.getItemMeta(h),g=e.getItemOrderedChildrenIds(p.parentId).filter(T=>e.isItemExpandable(T)&&!e.isItemExpanded(T)),b=n.expandedItems.value.concat(g);g.length>0&&(t.onItemExpansionToggle&&g.forEach(T=>{t.onItemExpansionToggle(u,T,!0)}),o(u,b))},d=_.useMemo(()=>t.expansionTrigger?t.expansionTrigger:e.isTreeViewEditable?"iconContainer":"content",[t.expansionTrigger,e.isTreeViewEditable]);return{publicAPI:{setItemExpansion:l},instance:{isItemExpanded:i,isItemExpandable:a,setItemExpansion:l,toggleItemExpansion:s,expandAllSiblings:c},contextValue:{expansion:{expansionTrigger:d}}}};Ql.models={expandedItems:{getDefaultValue:e=>e.defaultExpandedItems}};const fI=[];Ql.getDefaultizedParams=({params:e})=>Te({},e,{defaultExpandedItems:e.defaultExpandedItems??fI});Ql.params={expandedItems:!0,defaultExpandedItems:!0,onExpandedItemsChange:!0,onItemExpansionToggle:!0,expansionTrigger:!0};const Fs=e=>Array.isArray(e)?e:e!=null?[e]:[],Hc=e=>{const t={};return e.forEach(n=>{t[n]=!0}),t},Xl=({instance:e,params:t,models:n})=>{const r=_.useRef(null),o=_.useRef({}),i=_.useMemo(()=>{const d=new Map;return Array.isArray(n.selectedItems.value)?n.selectedItems.value.forEach(u=>{d.set(u,!0)}):n.selectedItems.value!=null&&d.set(n.selectedItems.value,!0),d},[n.selectedItems.value]),a=(d,u)=>{if(t.onItemSelectionToggle)if(t.multiSelect){const h=u.filter(g=>!e.isItemSelected(g)),p=n.selectedItems.value.filter(g=>!u.includes(g));h.forEach(g=>{t.onItemSelectionToggle(d,g,!0)}),p.forEach(g=>{t.onItemSelectionToggle(d,g,!1)})}else u!==n.selectedItems.value&&(n.selectedItems.value!=null&&t.onItemSelectionToggle(d,n.selectedItems.value,!1),u!=null&&t.onItemSelectionToggle(d,u,!0));t.onSelectedItemsChange&&t.onSelectedItemsChange(d,u),n.selectedItems.setControlledValue(u)},s=d=>i.has(d),l=({event:d,itemId:u,keepExistingSelection:h=!1,shouldBeSelected:p})=>{if(t.disableSelection)return;let g;if(h){const b=Fs(n.selectedItems.value),T=e.isItemSelected(u);T&&(p===!1||p==null)?g=b.filter(E=>E!==u):!T&&(p===!0||p==null)?g=[u].concat(b):g=b}else p===!1||p==null&&e.isItemSelected(u)?g=t.multiSelect?[]:null:g=t.multiSelect?[u]:u;a(d,g),r.current=u,o.current={}},c=(d,[u,h])=>{if(t.disableSelection||!t.multiSelect)return;let p=Fs(n.selectedItems.value).slice();Object.keys(o.current).length>0&&(p=p.filter(E=>!o.current[E]));const g=Hc(p),b=AD(e,u,h),T=b.filter(E=>!g[E]);p=p.concat(T),a(d,p),o.current=Hc(b)};return{getRootProps:()=>({"aria-multiselectable":t.multiSelect}),publicAPI:{selectItem:l},instance:{isItemSelected:s,selectItem:l,selectAllNavigableItems:d=>{if(t.disableSelection||!t.multiSelect)return;const u=kD(e);a(d,u),o.current=Hc(u)},expandSelectionRange:(d,u)=>{if(r.current!=null){const[h,p]=wy(e,u,r.current);c(d,[h,p])}},selectRangeFromStartToItem:(d,u)=>{c(d,[La(e),u])},selectRangeFromItemToEnd:(d,u)=>{c(d,[u,Iy(e)])},selectItemFromArrowNavigation:(d,u,h)=>{if(t.disableSelection||!t.multiSelect)return;let p=Fs(n.selectedItems.value).slice();Object.keys(o.current).length===0?(p.push(h),o.current={[u]:!0,[h]:!0}):(o.current[u]||(o.current={}),o.current[h]?(p=p.filter(g=>g!==u),delete o.current[u]):(p.push(h),o.current[h]=!0)),a(d,p)}},contextValue:{selection:{multiSelect:t.multiSelect,checkboxSelection:t.checkboxSelection,disableSelection:t.disableSelection}}}};Xl.models={selectedItems:{getDefaultValue:e=>e.defaultSelectedItems}};const mI=[];Xl.getDefaultizedParams=({params:e})=>Te({},e,{disableSelection:e.disableSelection??!1,multiSelect:e.multiSelect??!1,checkboxSelection:e.checkboxSelection??!1,defaultSelectedItems:e.defaultSelectedItems??(e.multiSelect?mI:null)});Xl.params={disableSelection:!0,multiSelect:!0,checkboxSelection:!0,defaultSelectedItems:!0,selectedItems:!0,onSelectedItemsChange:!0,onItemSelectionToggle:!0};function gI(e){return e&&e.ownerDocument||document}const Af=1e3;class yI{constructor(t=Af){this.timeouts=new Map,this.cleanupTimeout=Af,this.cleanupTimeout=t}register(t,n,r){this.timeouts||(this.timeouts=new Map);const o=setTimeout(()=>{typeof n=="function"&&n(),this.timeouts.delete(r.cleanupToken)},this.cleanupTimeout);this.timeouts.set(r.cleanupToken,o)}unregister(t){const n=this.timeouts.get(t.cleanupToken);n&&(this.timeouts.delete(t.cleanupToken),clearTimeout(n))}reset(){this.timeouts&&(this.timeouts.forEach((t,n)=>{this.unregister({cleanupToken:n})}),this.timeouts=void 0)}}class bI{constructor(){this.registry=new FinalizationRegistry(t=>{typeof t=="function"&&t()})}register(t,n,r){this.registry.register(t,n,r)}unregister(t){this.registry.unregister(t)}reset(){}}class EI{}function TI(e){let t=0;return function(n,r,o){e.registry===null&&(e.registry=typeof FinalizationRegistry<"u"?new bI:new yI);const[i]=_.useState(new EI),a=_.useRef(null),s=_.useRef(void 0);s.current=o;const l=_.useRef(null);if(!a.current&&s.current){const c=(d,u)=>{u.defaultMuiPrevented||s.current?.(d,u)};a.current=n.$$subscribeEvent(r,c),t+=1,l.current={cleanupToken:t},e.registry.register(i,()=>{a.current?.(),a.current=null,l.current=null},l.current)}else!s.current&&a.current&&(a.current(),a.current=null,l.current&&(e.registry.unregister(l.current),l.current=null));_.useEffect(()=>{if(!a.current&&s.current){const c=(d,u)=>{u.defaultMuiPrevented||s.current?.(d,u)};a.current=n.$$subscribeEvent(r,c)}return l.current&&e.registry&&(e.registry.unregister(l.current),l.current=null),()=>{a.current?.(),a.current=null}},[n,r])}}const xI={registry:null},CI=TI(xI),jy=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?jy(t.shadowRoot):t:null},vI=(e,t)=>{let n=Fs(t).find(r=>{if(!e.isItemNavigable(r))return!1;const o=e.getItemMeta(r);return o&&(o.parentId==null||e.isItemExpanded(o.parentId))});return n==null&&(n=La(e)),n},sh=({instance:e,params:t,state:n,setState:r,models:o,rootRef:i})=>{const a=vI(e,o.selectedItems.value),s=ci(T=>{const E=typeof T=="function"?T(n.focusedItemId):T;n.focusedItemId!==E&&r(C=>Te({},C,{focusedItemId:E}))}),l=_.useCallback(()=>!!i.current&&i.current.contains(jy(gI(i.current))),[i]),c=_.useCallback(T=>n.focusedItemId===T&&l(),[n.focusedItemId,l]),d=T=>{const E=e.getItemMeta(T);return E&&(E.parentId==null||e.isItemExpanded(E.parentId))},u=(T,E)=>{const C=e.getItemDOMElement(E);C&&C.focus(),s(E),t.onItemFocus&&t.onItemFocus(T,E)},h=ci((T,E)=>{d(E)&&u(T,E)}),p=ci(()=>{if(n.focusedItemId!=null){if(e.getItemMeta(n.focusedItemId)){const T=e.getItemDOMElement(n.focusedItemId);T&&T.blur()}s(null)}}),g=T=>T===a;CI(e,"removeItem",({id:T})=>{n.focusedItemId===T&&u(null,a)});const b=T=>E=>{T.onFocus?.(E),!E.defaultMuiPrevented&&E.target===E.currentTarget&&u(E,a)};return{getRootProps:T=>({onFocus:b(T)}),publicAPI:{focusItem:h},instance:{isItemFocused:c,canItemBeTabbed:g,focusItem:h,removeFocusedItem:p}}};sh.getInitialState=()=>({focusedItemId:null});sh.params={onItemFocus:!0};function SI(e){return!!e&&e.length===1&&!!e.match(/\S/)}const Hy=({instance:e,params:t,state:n})=>{const r=Ov(),o=_.useRef({}),i=ci(c=>{o.current=c(o.current)});_.useEffect(()=>{if(e.areItemUpdatesPrevented())return;const c={},d=u=>{c[u.id]=u.label.substring(0,1).toLowerCase()};Object.values(n.items.itemMetaMap).forEach(d),o.current=c},[n.items.itemMetaMap,t.getItemId,e]);const a=(c,d)=>{const u=d.toLowerCase(),h=T=>{const E=Ms(e,T);return E===null?La(e):E};let p=null,g=h(c);const b={};for(;p==null&&!b[g];)o.current[g]===u?p=g:(b[g]=!0,g=h(g));return p},s=c=>!t.disableSelection&&!e.isItemDisabled(c),l=c=>!e.isItemDisabled(c)&&e.isItemExpandable(c);return{instance:{updateFirstCharMap:i,handleItemKeyDown:(c,d)=>{if(c.defaultMuiPrevented||c.altKey||Oa(c.target,c.currentTarget))return;const u=c.ctrlKey||c.metaKey,h=c.key;switch(!0){case(h===" "&&s(d)):{c.preventDefault(),t.multiSelect&&c.shiftKey?e.expandSelectionRange(c,d):e.selectItem({event:c,itemId:d,keepExistingSelection:t.multiSelect,shouldBeSelected:t.multiSelect?void 0:!0});break}case h==="Enter":{yo(e,$n)&&e.isItemEditable(d)&&!e.isItemBeingEdited(d)?e.setEditedItemId(d):l(d)?(e.toggleItemExpansion(c,d),c.preventDefault()):s(d)&&(t.multiSelect?(c.preventDefault(),e.selectItem({event:c,itemId:d,keepExistingSelection:!0})):e.isItemSelected(d)||(e.selectItem({event:c,itemId:d}),c.preventDefault()));break}case h==="ArrowDown":{const p=Ms(e,d);p&&(c.preventDefault(),e.focusItem(c,p),t.multiSelect&&c.shiftKey&&s(p)&&e.selectItemFromArrowNavigation(c,d,p));break}case h==="ArrowUp":{const p=Dy(e,d);p&&(c.preventDefault(),e.focusItem(c,p),t.multiSelect&&c.shiftKey&&s(p)&&e.selectItemFromArrowNavigation(c,d,p));break}case(h==="ArrowRight"&&!r||h==="ArrowLeft"&&r):{if(u)return;if(e.isItemExpanded(d)){const p=Ms(e,d);p&&(e.focusItem(c,p),c.preventDefault())}else l(d)&&(e.toggleItemExpansion(c,d),c.preventDefault());break}case(h==="ArrowLeft"&&!r||h==="ArrowRight"&&r):{if(u)return;if(l(d)&&e.isItemExpanded(d))e.toggleItemExpansion(c,d),c.preventDefault();else{const p=e.getItemMeta(d).parentId;p&&(e.focusItem(c,p),c.preventDefault())}break}case h==="Home":{s(d)&&t.multiSelect&&u&&c.shiftKey?e.selectRangeFromStartToItem(c,d):e.focusItem(c,La(e)),c.preventDefault();break}case h==="End":{s(d)&&t.multiSelect&&u&&c.shiftKey?e.selectRangeFromItemToEnd(c,d):e.focusItem(c,Iy(e)),c.preventDefault();break}case h==="*":{e.expandAllSiblings(c,d),c.preventDefault();break}case(String.fromCharCode(c.keyCode)==="A"&&u&&t.multiSelect&&!t.disableSelection):{e.selectAllNavigableItems(c),c.preventDefault();break}case(!u&&!c.shiftKey&&SI(h)):{const p=a(d,h);p!=null&&(e.focusItem(c,p),c.preventDefault());break}}}}}};Hy.params={};const Uy=({slots:e,slotProps:t})=>({contextValue:{icons:{slots:{collapseIcon:e.collapseIcon,expandIcon:e.expandIcon,endIcon:e.endIcon},slotProps:{collapseIcon:t.collapseIcon,expandIcon:t.expandIcon,endIcon:t.endIcon}}}});Uy.params={};const AI=[Ja,Ql,Xl,sh,Hy,Uy,$n],kI=["ownerState"];function _I({slots:e,slotProps:t,label:n,id:r,itemId:o,itemsToRender:i}){const a=e?.item??VD,s=fo({elementType:a,externalSlotProps:t?.item,additionalProps:{itemId:o,id:r,label:n},ownerState:{itemId:o,label:n}}),l=Dr(s,kI),c=_.useMemo(()=>i?f.jsx(zy,{itemsToRender:i,slots:e,slotProps:t}):null,[i,e,t]);return f.jsx(a,Te({},l,{children:c}))}function zy(e){const{itemsToRender:t,slots:n,slotProps:r}=e;return f.jsx(_.Fragment,{children:t.map(o=>f.jsx(_I,{slots:n,slotProps:r,label:o.label,id:o.id,itemId:o.itemId,itemsToRender:o.children},o.itemId))})}const DI=Sy(),II=e=>{const{classes:t}=e;return vy({root:["root"]},eI,t)},wI=ut("ul",{name:"MuiRichTreeView",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,margin:0,listStyle:"none",outline:0,position:"relative"}),NI=_.forwardRef(function(e,t){const n=DI({props:e,name:"MuiRichTreeView"}),{getRootProps:r,contextValue:o,instance:i}=cI({plugins:AI,rootRef:t,props:n}),{slots:a,slotProps:s}=n,l=II(n),c=a?.root??wI,d=fo({elementType:c,externalSlotProps:s?.root,className:l.root,getSlotProps:r,ownerState:n});return f.jsx(CD,{value:o,children:f.jsx(c,Te({},d,{children:f.jsx(zy,{slots:a,slotProps:s,itemsToRender:i.getItemsToRender()})}))})}),PI=ct(f.jsx("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"})),RI=ct([f.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"},"0"),f.jsx("path",{d:"M14 17H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"},"1")]),LI=ct(f.jsx("path",{d:"M19 15v4H5v-4zm1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1M7 18.5c-.82 0-1.5-.67-1.5-1.5s.68-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5M19 5v4H5V5zm1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1M7 8.5c-.82 0-1.5-.67-1.5-1.5S6.18 5.5 7 5.5s1.5.68 1.5 1.5S7.83 8.5 7 8.5"})),OI=ct(f.jsx("path",{d:"M15 4v2h3v12h-3v2h5V4zM4 20h5v-2H6V6h3V4H4z"}));function $y({items:e,defaultExpandedItems:t,navigate:n}){return f.jsx(NI,{items:HI(e,n),defaultExpandedItems:t,slots:{item:jI}})}const MI=Ig.animated(Ra);function FI(e){const t=Ig.useSpring({to:{opacity:e.in?1:0,transform:`translate3d(0,${e.in?0:20}px,0)`}});return f.jsx(MI,{style:t,...e})}function BI({item:e,...t}){const n=f.jsxs(JD,{...t,sx:{display:"flex",alignItems:"center",color:e.error?"error.main":"grey.600"},children:[e.fileType==="directory"&&f.jsx(PI,{})||e.fileType==="notebook"&&f.jsx(RI,{})||e.fileType==="model"&&f.jsx(OI,{})||e.fileType=="database"&&f.jsx(LI,{})||f.jsx(yy,{}),f.jsx(v.Typography,{variant:"body2",sx:{marginLeft:"5px"},color:e.error?"error.main":e.link?"primary.main":"grey.600",children:e.label})]});return e.error?f.jsx(v.Tooltip,{title:e.error,placement:"right",children:n}):n}const jI=_.forwardRef(function(e,t){const{id:n,itemId:r,label:o,children:i,disabled:a,...s}=e,{getRootProps:l,getContentProps:c,getLabelProps:d,getIconContainerProps:u,getGroupTransitionProps:h,status:p,publicAPI:g}=ID({id:n,itemId:r,children:i,label:o,disabled:a,rootRef:t}),b=g.getItem(r);return p.selected=!1,p.focused=!1,f.jsx(ih,{itemId:r,children:f.jsxs(QD,{...l(s),children:[f.jsxs(XD,{...c(),...b.link&&{onClick:T=>b.link(T)},sx:{pointerEvents:!b.selectable&&"none"},children:[f.jsx(ZD,{...u(),children:f.jsx(YD,{status:p})}),f.jsx(BI,{...d({item:b})})]}),i&&f.jsx(FI,{...h()})]})})});function HI(e,t){const n=new Map;return e.map(r=>{let o=n;const i=r.path.split("/");i.forEach((a,s)=>{s===i.length-1?o.set(a,r):(o.has(a)||o.set(a,new Map),o=o.get(a))})}),Gy(n,"",t)}function Gy(e,t,n){const r=[];return e.forEach((o,i)=>{const a=i.endsWith(".malloy")&&"model"||i.endsWith(".malloynb")&&"notebook"||i.endsWith(".parquet")&&"database"||"unknown";if(a!=="unknown"){const s=o;r.push({id:t+i,label:i,fileType:a,link:a==="model"||a==="notebook"?l=>n(t+i,l):void 0,selectable:a==="model"||a==="notebook",error:"error"in s?s.error:void 0})}else t+=`${i}/`,r.push({id:t,label:i,fileType:"directory",selectable:!0,link:void 0,children:Gy(o,t,n)})}),r}const UI=new zl(new on),zI=["notebooks/","models/"];function $I({navigate:e}){const{projectName:t,packageName:n,versionId:r}=yn(),{data:o,isError:i,error:a,isSuccess:s}=wn({queryKey:["models",t,n,r],queryFn:l=>UI.listModels(t,n,r,l)});return f.jsx($t,{variant:"outlined",sx:{width:"100%"},children:f.jsxs(Dn,{children:[f.jsx(v.Typography,{variant:"overline",fontWeight:"bold",children:"Semantic Models"}),f.jsx(v.Divider,{}),f.jsxs(v.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!s&&!i&&f.jsx(Wn,{text:"Fetching Models..."}),i&&f.jsx(In,{error:a,context:`${t} > ${n} > Models`}),s&&o.data.length>0&&f.jsx($y,{items:o.data.sort((l,c)=>l.path.localeCompare(c.path)),navigate:e,defaultExpandedItems:zI}),s&&o.data.length===0&&f.jsx(v.Typography,{variant:"body2",children:"No models found"})]})]})})}const GI=new y0(new on),qI=["notebooks/"];function WI({navigate:e}){const{projectName:t,packageName:n,versionId:r}=yn(),{data:o,isError:i,error:a,isSuccess:s}=wn({queryKey:["notebooks",t,n,r],queryFn:l=>GI.listNotebooks(t,n,r,l)});return f.jsx($t,{variant:"outlined",sx:{width:"100%"},children:f.jsxs(Dn,{children:[f.jsx(v.Typography,{variant:"overline",fontWeight:"bold",children:"Notebooks"}),f.jsx(v.Divider,{}),f.jsxs(v.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!s&&!i&&f.jsx(Wn,{text:"Fetching Notebooks..."}),i&&f.jsx(In,{error:a,context:`${t} > ${n} > Notebooks`}),s&&o.data.length>0&&f.jsx($y,{items:o.data.sort((l,c)=>l.path.localeCompare(c.path)),defaultExpandedItems:qI,navigate:e}),s&&o.data.length===0&&f.jsx(v.Typography,{variant:"body2",children:"No notebooks found"})]})]})})}const VI=new YS(new on);function YI(){const{projectName:e,packageName:t,versionId:n}=yn(),{data:r,isError:o,isLoading:i,error:a}=wn({queryKey:["schedules",e,t,n],queryFn:s=>VI.listSchedules(e,t,n,s)});return i?f.jsx(Wn,{text:"Fetching Schedules..."}):o?f.jsx(In,{error:a,context:`${e} > ${t} > Schedules`}):r.data.length?f.jsx($t,{variant:"outlined",sx:{padding:"10px",width:"100%"},children:f.jsxs(Dn,{children:[f.jsx(v.Typography,{variant:"overline",fontWeight:"bold",children:"Scheduler"}),f.jsx(v.Divider,{}),f.jsx(v.Box,{sx:{mt:"10px",maxHeight:"200px",overflowY:"auto"},children:f.jsx(v.TableContainer,{component:v.Paper,children:f.jsxs(v.Table,{sx:{minWidth:300},size:"small",children:[f.jsx(v.TableHead,{children:f.jsxs(v.TableRow,{children:[f.jsx(v.TableCell,{align:"left",children:"Resource"}),f.jsx(v.TableCell,{align:"left",children:"Schedule"}),f.jsx(v.TableCell,{align:"left",children:"Action"}),f.jsx(v.TableCell,{align:"left",children:"Connection"}),f.jsx(v.TableCell,{align:"left",children:"Last Run"}),f.jsx(v.TableCell,{align:"left",children:"Status"})]})}),f.jsx(v.TableBody,{children:r.data.map(s=>f.jsxs(v.TableRow,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[f.jsx(v.TableCell,{align:"left",children:s.resource}),f.jsx(v.TableCell,{align:"left",children:s.schedule}),f.jsx(v.TableCell,{align:"left",children:s.action}),f.jsx(v.TableCell,{align:"left",children:s.connection}),f.jsx(v.TableCell,{align:"left",children:s.lastRunTime?new Date(s.lastRunTime).toLocaleString():"n/a"}),f.jsx(v.TableCell,{align:"left",children:s.lastRunStatus})]},s.resource))})]})})})]})}):null}const KI="README.malloynb";function QI({navigate:e}){return e||(e=t=>{window.location.href=t}),f.jsxs(v.Grid,{container:!0,spacing:2,columns:12,children:[f.jsx(v.Grid,{size:{xs:12,md:4},children:f.jsx(u_,{})}),f.jsx(v.Grid,{size:{xs:12,md:4},children:f.jsx(WI,{navigate:e})}),f.jsx(v.Grid,{size:{xs:12,md:4},children:f.jsx($I,{navigate:e})}),f.jsx(v.Grid,{size:{xs:12,md:6},children:f.jsx(m_,{})}),f.jsx(v.Grid,{size:{xs:12,md:6},children:f.jsx(p_,{})}),f.jsx(v.Grid,{size:{xs:12,md:12},children:f.jsx(YI,{})}),f.jsx(v.Grid,{size:{xs:12,md:12},children:f.jsx(gy,{notebookPath:KI,hideEmbeddingIcons:!0})})]})}const XI=v.styled(v.Card)({display:"flex",flexDirection:"column",height:"100%"});function JI({modelPath:e,sourceName:t,queryName:n,expandResult:r,hideResultIcon:o,expandEmbedding:i,hideEmbeddingIcon:a,noView:s,annotations:l}){const[c,d]=O.useState(r),[u,h]=O.useState(i),[p,g]=O.useState(),[b,T]=O.useState(),{packageName:E,projectName:C}=yn(),x=py({modelPath:e,sourceName:t,queryName:n,optionalPackageName:E,optionalProjectName:C});return O.useEffect(()=>{Co(x,"typescript").then(k=>{g(k)})},[u,x]),O.useEffect(()=>{if(l&&l.length>0){const k=l.map(w=>`// ${w}`).join(`
|
|
135
|
+
`);Co(k,"typescript").then(w=>{T(w)})}},[l]),f.jsx(f.Fragment,{children:f.jsxs(XI,{variant:"outlined",sx:{padding:"0px 10px 0px 10px",borderRadius:"0px"},children:[f.jsxs(v.Stack,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",width:"100%"},children:[f.jsx(v.Typography,{variant:"subtitle2",sx:{mt:"auto",mb:"auto"},children:`${s?"":"View >"} ${n}`}),f.jsxs(v.CardActions,{sx:{padding:"0px"},children:[!o&&f.jsx(v.Tooltip,{title:c?"Hide Results":"Show Results",children:f.jsx(v.IconButton,{size:"small",onClick:()=>{d(!c)},children:f.jsx(Z2,{})})}),!a&&f.jsx(v.Tooltip,{title:u?"Hide Sharing":"Show Sharing",children:f.jsx(v.IconButton,{size:"small",onClick:()=>{h(!u)},children:f.jsx(Wa,{})})})]})]}),f.jsxs(v.Collapse,{in:u,timeout:"auto",unmountOnExit:!0,children:[f.jsx(v.Divider,{}),f.jsxs(v.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:[f.jsx(v.Typography,{sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:f.jsx("div",{dangerouslySetInnerHTML:{__html:p}})}),f.jsx(v.Tooltip,{title:"Copy Embeddable Code",children:f.jsx(v.IconButton,{sx:{width:"24px",height:"24px"},onClick:()=>{navigator.clipboard.writeText(x)},children:f.jsx(Ul,{})})})]})]}),f.jsxs(v.Collapse,{in:c,timeout:"auto",unmountOnExit:!0,children:[f.jsx(v.Divider,{sx:{mb:"4px"}}),b&&f.jsxs(f.Fragment,{children:[f.jsx(v.Stack,{sx:{borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:f.jsx(v.Typography,{fontSize:"12px",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:f.jsx("div",{className:"content",dangerouslySetInnerHTML:{__html:b}})})}),f.jsx(v.Divider,{sx:{mb:"4px"}})]}),f.jsx(v.CardContent,{children:f.jsx(r_,{modelPath:e,sourceName:t,queryName:n})})]})]})})}const ZI=new T0(new on),ew=ut(Ge.Box)(({theme:e})=>({display:"flex",flexWrap:"wrap",gap:e.spacing(.5),borderBottom:`1px solid ${e.palette.divider}`,minHeight:36})),tw=ut(v.Button)(({theme:e,selected:t})=>({minHeight:36,padding:e.spacing(.5,2),borderRadius:e.shape.borderRadius,background:t?e.palette.action.selected:"none",color:t?e.palette.primary.main:e.palette.text.primary,fontWeight:t?600:400,border:t?`1px solid ${e.palette.primary.main}`:"1px solid transparent",boxShadow:t?e.shadows[1]:"none",textTransform:"uppercase","&:hover":{background:e.palette.action.hover,border:`1px solid ${e.palette.primary.light}`}}));function qy({sourceAndPaths:e,existingQuery:t,existingSourceName:n,onQueryChange:r,onSourceChange:o}){const[i,a]=O.useState(n?e.findIndex(c=>c.sourceInfo.name===n):0),[s,l]=O.useState(t||da());return O.useEffect(()=>{o&&o(i)},[i,o]),f.jsxs($t,{variant:"outlined",children:[f.jsx(Dn,{children:f.jsx(Ge.Stack,{sx:{flexDirection:"row",justifyContent:"space-between"},children:e.length>0&&f.jsx(ew,{children:e.map((c,d)=>f.jsx(tw,{selected:i===d,onClick:()=>a(d),children:c.sourceInfo.name||`Source ${d+1}`},c.sourceInfo.name||d))})})}),f.jsx(Kl,{children:f.jsxs(Ge.Stack,{spacing:2,component:"section",children:[f.jsx(Wy,{sourceAndPath:e[i],existingQuery:s,onChange:c=>{l(c),r&&r(c)}}),f.jsx(Ge.Box,{height:"5px"})]})})]})}function da(){return{query:void 0,malloyQuery:void 0,malloyResult:void 0}}function nw({sourceAndPath:e,onChange:t,existingQuery:n,explorerComponents:r,QueryBuilder:o}){const[i,a]=O.useState(n||da()),[s,l]=O.useState([]),{MalloyExplorerProvider:c,QueryPanel:d,ResizableCollapsiblePanel:u,ResultPanel:h,SourcePanel:p}=r;O.useEffect(()=>{t&&t(i)},[t,i]);const{projectName:g,packageName:b,versionId:T}=yn(),E=e_({mutationFn:(w,S)=>{const B=new o.ASTQuery({source:e.sourceInfo,query:i?.malloyQuery}).toMalloy();return a({...i,query:B}),ZI.executeQuery(g,b,e.modelPath,B,void 0,void 0,T,S)},onSuccess:w=>{if(w){const S=JSON.parse(w.data.result);a({...i,malloyResult:S})}}}),[C,x]=O.useState(e.sourceInfo.name);O.useEffect(()=>{C!==e.sourceInfo.name&&(x(e.sourceInfo.name),a(da()))},[e,C]);const k=O.useCallback(w=>{a({...i,malloyQuery:w})},[i]);return C!==e.sourceInfo.name?f.jsx("div",{children:"Loading..."}):f.jsx(cy,{children:f.jsx(uy,{children:f.jsx(c,{source:e.sourceInfo,query:i?.malloyQuery,onQueryChange:k,focusedNestViewPath:s,onFocusedNestViewPathChange:l,onDrill:w=>{console.info(w)},children:f.jsx("div",{style:{display:"flex",flexDirection:"column",height:"100%"},children:f.jsxs("div",{style:{display:"flex",height:"100%",overflowY:"auto"},children:[f.jsx(u,{isInitiallyExpanded:!0,initialWidth:180,minWidth:180,icon:"database",title:e.sourceInfo.name,children:f.jsx(p,{onRefresh:()=>a(da())})}),f.jsx(u,{isInitiallyExpanded:!0,initialWidth:280,minWidth:280,icon:"filterSliders",title:"Query",children:f.jsx(d,{runQuery:()=>{E.mutate()}})}),f.jsx(h,{source:e.sourceInfo,draftQuery:i?.malloyQuery,setDraftQuery:w=>a({...i,malloyQuery:w}),submittedQuery:i?.malloyQuery?{executionState:E.isPending?"running":"finished",response:{result:i.malloyResult},query:i.malloyQuery,queryResolutionStartMillis:Date.now(),onCancel:E.reset}:void 0,options:{showRawQuery:!0}})]})})})})},e.sourceInfo.name)}function Wy(e){const[t,n]=O.useState(null),[r,o]=O.useState(null),[i,a]=O.useState(!0);return O.useEffect(()=>{let s=!0;return Promise.all([import("@malloydata/malloy-explorer"),import("@malloydata/malloy-query-builder")]).then(([l,c])=>{s&&(n(l),o(c),a(!1))}).catch(l=>{console.error("Failed to load Malloy components:",l),s&&a(!1)}),()=>{s=!1}},[]),i||!t||!r?f.jsx(cy,{children:f.jsx(uy,{children:f.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"200px",color:"#666"},children:"Loading explorer..."})})}):f.jsx(nw,{...e,explorerComponents:t,QueryBuilder:r})}const rw=new zl(new on);function ow({modelPath:e,expandResults:t,hideResultIcons:n,expandEmbeddings:r,hideEmbeddingIcons:o}){const[i,a]=O.useState(!1),[s,l]=O.useState(),[c,d]=O.useState(0),{projectName:u,packageName:h,versionId:p}=yn(),g=iw(e);O.useEffect(()=>{Co(g,"typescript").then(x=>{l(x)})},[i,g]);const{data:b,isError:T,isLoading:E,error:C}=wn({queryKey:["package",u,h,e,p],queryFn:async x=>(await rw.getModel(u,h,e,p,x)).data});return E?f.jsx(Wn,{text:"Fetching Model..."}):T?(console.log("error",C),f.jsx(In,{error:C,context:`${h} > ${e}`})):f.jsxs($t,{variant:"outlined",children:[f.jsxs(Dn,{children:[f.jsxs(v.Stack,{sx:{flexDirection:"row",justifyContent:"space-between"},children:[Array.isArray(b.sourceInfos)&&b.sourceInfos.length>0&&f.jsx(v.Tabs,{value:c,onChange:(x,k)=>d(k),variant:"scrollable",scrollButtons:"auto",sx:{borderBottom:1,borderColor:"divider",minHeight:36},children:b.sourceInfos.map((x,k)=>{let w;try{w=JSON.parse(x)}catch{w={name:String(k)}}return f.jsx(v.Tab,{label:w.name||`Source ${k+1}`,sx:{minHeight:36}},w.name||k)})}),!o&&f.jsx(v.CardActions,{sx:{padding:"0px 10px 0px 10px",mb:"auto",mt:"auto"},children:f.jsx(v.Tooltip,{title:i?"Hide Embedding":"View Embedding",children:f.jsx(v.IconButton,{size:"small",onClick:()=>{a(!i)},children:f.jsx(Wa,{})})})})]}),f.jsxs(v.Collapse,{in:i,timeout:"auto",unmountOnExit:!0,children:[f.jsx(v.Divider,{}),f.jsxs(v.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:[f.jsx(v.Typography,{sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:f.jsx("div",{dangerouslySetInnerHTML:{__html:s}})}),f.jsx(v.Tooltip,{title:"Copy Embeddable Code",children:f.jsx(v.IconButton,{sx:{width:"24px",height:"24px"},onClick:()=>{navigator.clipboard.writeText(g)},children:f.jsx(Ul,{})})})]})]}),f.jsx(v.Divider,{})]}),f.jsx(Kl,{children:f.jsxs(v.Stack,{spacing:2,component:"section",children:[Array.isArray(b.sourceInfos)&&b.sourceInfos.length>0&&f.jsx(Wy,{sourceAndPath:{modelPath:e,sourceInfo:JSON.parse(b.sourceInfos[c])}}),b.queries?.length>0&&f.jsxs($t,{variant:"outlined",sx:{padding:"0px 10px 0px 10px"},children:[f.jsx(Dn,{sx:{p:"10px"},children:f.jsx(v.Typography,{variant:"subtitle1",children:"Named Queries"})}),f.jsx(v.Stack,{spacing:1,component:"section",children:b.queries.map(x=>f.jsx(JI,{modelPath:e,queryName:x.name,expandResult:t,hideResultIcon:n,expandEmbedding:r,hideEmbeddingIcon:o,noView:!0,annotations:x.annotations},x.name))}),f.jsx(v.Box,{height:"10px"})]}),f.jsx(v.Box,{height:"5px"})]})})]})}function iw(e){return`<Model
|
|
136
|
+
modelPath="${e}"
|
|
137
|
+
accessToken={accessToken}
|
|
138
|
+
/>`}class Vy{makeKey(t,n){let r=`BROWSER_NOTEBOOK_STORAGE__${t.project}/${t.package}`;return n&&(r+=`/${n}`),r}listNotebooks(t){const n=this.makeKey(t),r=[];for(let o=0;o<localStorage.length;o++){const i=localStorage.key(o);if(i&&i.startsWith(n+"/")){const a=i.substring(n.length+1);r.push(a)}}return r}getNotebook(t,n){const r=this.makeKey(t,n),o=localStorage.getItem(r);if(o===null)throw new Error(`Notebook not found at path: ${n}`);return o}deleteNotebook(t,n){const r=this.makeKey(t,n);if(localStorage.getItem(r)===null)throw new Error(`Notebook not found at path: ${n}`);localStorage.removeItem(r)}saveNotebook(t,n,r){const o=this.makeKey(t,n);localStorage.setItem(o,r)}moveNotebook(t,n,r){const o=this.makeKey(t,n),i=this.makeKey(t,r),a=localStorage.getItem(o);if(a===null)throw new Error(`Notebook not found at path: ${n}`);localStorage.setItem(i,a),localStorage.removeItem(o)}}const aw=ct(f.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"})),qo=Ge.createStack({createStyledComponent:ut("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>Ti({props:e,name:"MuiStack"})});function Ai(){const e=kd();return(t,n)=>{if(!n||!n.metaKey&&!n.ctrlKey&&!n.shiftKey&&n.button!==1){e(t);return}const r=new URL(t,window.location.href).href;(n.metaKey||n.ctrlKey||n.button===1||n.shiftKey)&&window.open(r,"_blank")}}class ha{constructor(t,n,r){G(this,"isSaved");G(this,"notebookStorage");G(this,"userContext");this.notebookData=r,this.notebookStorage=t,this.userContext=n,this.notebookData?this.isSaved=!0:(this.notebookData={models:[],cells:[],notebookPath:void 0},this.isSaved=!1)}getNotebookData(){return this.notebookData}getNotebookPath(){return this.notebookData.notebookPath}renameNotebook(t){if(this.notebookData.notebookPath!==t)try{this.notebookStorage.deleteNotebook(this.userContext,this.notebookData.notebookPath)}catch{}return this.notebookData.notebookPath=t,this.isSaved=!1,this.saveNotebook(),this}getCells(){return this.notebookData.cells}deleteCell(t){return this.notebookData.cells=[...this.notebookData.cells.slice(0,t),...this.notebookData.cells.slice(t+1)],this.isSaved=!1,this}insertCell(t,n){return this.notebookData.cells=[...this.notebookData.cells.slice(0,t),n,...this.notebookData.cells.slice(t)],this.isSaved=!1,this}setCell(t,n){return this.notebookData.cells[t]=n,this.isSaved=!1,this}setModels(t){return this.notebookData.models=t,this.isSaved=!1,this}getModels(){return this.notebookData.models}updateNotebookData(t){return this.notebookData=t,this.isSaved=!1,this}saveNotebook(){if(!this.isSaved){if(!this.notebookData.notebookPath)throw new Error("Notebook path is not set");this.notebookStorage.saveNotebook(this.userContext,this.notebookData.notebookPath,JSON.stringify(this.notebookData)),this.isSaved=!0}return new ha(this.notebookStorage,this.userContext,this.notebookData)}toMalloyNotebook(){return this.notebookData.cells.map(t=>t.isMarkdown?`>>>markdown
|
|
139
|
+
`+t.value:`>>>malloy
|
|
140
|
+
import {${t.sourceName}}" from '${t.modelPath}'"
|
|
141
|
+
`+t.value+`
|
|
142
|
+
`).join(`
|
|
143
|
+
`)}static newNotebook(t,n){return new ha(t,n,void 0)}static loadNotebook(t,n,r){let o;try{const i=t.getNotebook(n,r);i&&(o=JSON.parse(i))}catch{o={models:[],cells:[],notebookPath:r}}return new ha(t,n,o)}}const Yy=O.createContext(void 0),sw=({server:e=`${window.location.protocol}//${window.location.host}/api/v0`,getAccessToken:t,children:n})=>{const r={server:e,getAccessToken:t};return f.jsx(Yy.Provider,{value:r,children:n})},lh=()=>{const e=O.useContext(Yy);if(e===void 0)throw new Error("useServer must be used within a ServerProvider");return e},ys=ct(f.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})),kf=ct(f.jsx("path",{d:"m14.06 9.02.92.92L5.92 19H5v-.92zM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29m-3.6 3.19L3 17.25V21h3.75L17.81 9.94z"}));function Ye(){return Ye=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ye.apply(null,arguments)}function ml(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Ir(){return Ir=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ir.apply(null,arguments)}function lw(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}const cw=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,uw=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,dw={};function _f(e,t){return(dw.jsx?uw:cw).test(e)}var Wo={},Uc,Df;function hw(){if(Df)return Uc;Df=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,l=`
|
|
144
|
+
`,c="/",d="*",u="",h="comment",p="declaration";Uc=function(b,T){if(typeof b!="string")throw new TypeError("First argument must be a string");if(!b)return[];T=T||{};var E=1,C=1;function x(M){var z=M.match(t);z&&(E+=z.length);var X=M.lastIndexOf(l);C=~X?M.length-X:C+M.length}function k(){var M={line:E,column:C};return function(z){return z.position=new w(M),W(),z}}function w(M){this.start=M,this.end={line:E,column:C},this.source=T.source}w.prototype.content=b;function S(M){var z=new Error(T.source+":"+E+":"+C+": "+M);if(z.reason=M,z.filename=T.source,z.line=E,z.column=C,z.source=b,!T.silent)throw z}function B(M){var z=M.exec(b);if(z){var X=z[0];return x(X),b=b.slice(X.length),z}}function W(){B(n)}function U(M){var z;for(M=M||[];z=y();)z!==!1&&M.push(z);return M}function y(){var M=k();if(!(c!=b.charAt(0)||d!=b.charAt(1))){for(var z=2;u!=b.charAt(z)&&(d!=b.charAt(z)||c!=b.charAt(z+1));)++z;if(z+=2,u===b.charAt(z-1))return S("End of comment missing");var X=b.slice(2,z-2);return C+=2,x(X),b=b.slice(z),C+=2,M({type:h,comment:X})}}function R(){var M=k(),z=B(r);if(z){if(y(),!B(o))return S("property missing ':'");var X=B(i),Z=M({type:p,property:g(z[0].replace(e,u)),value:X?g(X[0].replace(e,u)):u});return B(a),Z}}function F(){var M=[];U(M);for(var z;z=R();)z!==!1&&(M.push(z),U(M));return M}return W(),F()};function g(b){return b?b.replace(s,u):u}return Uc}var If;function pw(){if(If)return Wo;If=1;var e=Wo&&Wo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.default=n;var t=e(hw());function n(r,o){var i=null;if(!r||typeof r!="string")return i;var a=(0,t.default)(r),s=typeof o=="function";return a.forEach(function(l){if(l.type==="declaration"){var c=l.property,d=l.value;s?o(c,d,l):d&&(i=i||{},i[c]=d)}}),i}return Wo}var Gi={},wf;function fw(){if(wf)return Gi;wf=1,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,i=function(c){return!c||n.test(c)||e.test(c)},a=function(c,d){return d.toUpperCase()},s=function(c,d){return"".concat(d,"-")},l=function(c,d){return d===void 0&&(d={}),i(c)?c:(c=c.toLowerCase(),d.reactCompat?c=c.replace(o,s):c=c.replace(r,s),c.replace(t,a))};return Gi.camelCase=l,Gi}var qi,Nf;function mw(){if(Nf)return qi;Nf=1;var e=qi&&qi.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(pw()),n=fw();function r(o,i){var a={};return!o||typeof o!="string"||(0,t.default)(o,function(s,l){s&&l&&(a[(0,n.camelCase)(s,i)]=l)}),a}return r.default=r,qi=r,qi}var gw=mw();const yw=Nl(gw),Jl=Ky("end"),hr=Ky("start");function Ky(e){return t;function t(n){const r=n&&n.position&&n.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 bw(e){const t=hr(e),n=Jl(e);if(t&&n)return{start:t,end:n}}function pa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Pf(e.position):"start"in e||"end"in e?Pf(e):"line"in e||"column"in e?zu(e):""}function zu(e){return Rf(e&&e.line)+":"+Rf(e&&e.column)}function Pf(e){return zu(e&&e.start)+"-"+zu(e&&e.end)}function Rf(e){return e&&typeof e=="number"?e:1}class an extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",i={},a=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?o=t:!i.cause&&t&&(a=!0,o=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=s?s.line:void 0,this.name=pa(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual,this.expected,this.note,this.url}}an.prototype.file="";an.prototype.name="";an.prototype.reason="";an.prototype.message="";an.prototype.stack="";an.prototype.column=void 0;an.prototype.line=void 0;an.prototype.ancestors=void 0;an.prototype.cause=void 0;an.prototype.fatal=void 0;an.prototype.place=void 0;an.prototype.ruleId=void 0;an.prototype.source=void 0;const ch={}.hasOwnProperty,Ew=new Map,Tw=/[A-Z]/g,xw=new Set(["table","tbody","thead","tfoot","tr"]),Cw=new Set(["td","th"]),Qy="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function vw(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Nw(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=ww(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Rr:vi,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=Xy(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function Xy(e,t,n){if(t.type==="element")return Sw(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Aw(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return _w(e,t,n);if(t.type==="mdxjsEsm")return kw(e,t);if(t.type==="root")return Dw(e,t,n);if(t.type==="text")return Iw(e,t)}function Sw(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Rr,e.schema=o),e.ancestors.push(t);const i=Zy(e,t.tagName,!1),a=Pw(e,t);let s=dh(e,t);return xw.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!Xa(l):!0})),Jy(e,a,i,t),uh(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function Aw(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Ma(e,t.position)}function kw(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ma(e,t.position)}function _w(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Rr,e.schema=o),e.ancestors.push(t);const i=t.name===null?e.Fragment:Zy(e,t.name,!0),a=Rw(e,t),s=dh(e,t);return Jy(e,a,i,t),uh(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function Dw(e,t,n){const r={};return uh(r,dh(e,t)),e.create(t,e.Fragment,r,n)}function Iw(e,t){return t.value}function Jy(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function uh(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function ww(e,t,n){return r;function r(o,i,a,s){const l=Array.isArray(a.children)?n:t;return s?l(i,a,s):l(i,a)}}function Nw(e,t){return n;function n(r,o,i,a){const s=Array.isArray(i.children),l=hr(r);return t(o,i,a,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function Pw(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&ch.call(t.properties,o)){const i=Lw(e,o,t.properties[o]);if(i){const[a,s]=i;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&Cw.has(t.tagName)?r=s:n[a]=s}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Rw(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const i=o.expression;i.type;const a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Ma(e,t.position);else{const o=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,i=e.evaluater.evaluateExpression(a.expression)}else Ma(e,t.position);else i=r.value===null?!0:r.value;n[o]=i}return n}function dh(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Ew;for(;++r<t.children.length;){const i=t.children[r];let a;if(e.passKeys){const l=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(l){const c=o.get(l)||0;a=l+"-"+c,o.set(l,c+1)}}const s=Xy(e,i,a);s!==void 0&&n.push(s)}return n}function Lw(e,t,n){const r=Qa(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?ql(n):Wl(n)),r.property==="style"){let o=typeof n=="object"?n:Ow(e,String(n));return e.stylePropertyNameCase==="css"&&(o=Mw(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?sk[r.property]||r.property:r.attribute,n]}}function Ow(e,t){try{return yw(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new an("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=Qy+"#cannot-parse-style-attribute",o}}function Zy(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let i=-1,a;for(;++i<o.length;){const s=_f(o[i])?{type:"Identifier",name:o[i]}:{type:"Literal",value:o[i]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(i&&s.type==="Literal"),optional:!1}:s}r=a}else r=_f(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return ch.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ma(e)}function Ma(e,t){const n=new an("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Qy+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Mw(e){const t={};let n;for(n in e)ch.call(e,n)&&(t[Fw(n)]=e[n]);return t}function Fw(e){let t=e.replace(Tw,Bw);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Bw(e){return"-"+e.toLowerCase()}const zc={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"]},jw={};function hh(e,t){const n=jw,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return e1(e,r,o)}function e1(e,t,n){if(Hw(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Lf(e.children,t,n)}return Array.isArray(e)?Lf(e,t,n):""}function Lf(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=e1(e[o],t,n);return r.join("")}function Hw(e){return!!(e&&typeof e=="object")}const Of=document.createElement("i");function ph(e){const t="&"+e+";";Of.innerHTML=t;const n=Of.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function kn(e,t,n,r){const o=e.length;let i=0,a;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);i<r.length;)a=r.slice(i,i+1e4),a.unshift(t,0),e.splice(...a),i+=1e4,t+=1e4}function jn(e,t){return e.length>0?(kn(e,e.length,0,t),e):t}const Mf={}.hasOwnProperty;function t1(e){const t={};let n=-1;for(;++n<e.length;)Uw(t,e[n]);return t}function Uw(e,t){let n;for(n in t){const r=(Mf.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){Mf.call(r,i)||(r[i]=[]);const a=o[i];zw(r[i],Array.isArray(a)?a:a?[a]:[])}}}function zw(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);kn(e,0,0,r)}function n1(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Xn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const un=Zr(/[A-Za-z]/),rn=Zr(/[\dA-Za-z]/),$w=Zr(/[#-'*+\--9=?A-Z^-~]/);function gl(e){return e!==null&&(e<32||e===127)}const $u=Zr(/\d/),Gw=Zr(/[\dA-Fa-f]/),qw=Zr(/[!-/:-@[-`{-~]/);function De(e){return e!==null&&e<-2}function it(e){return e!==null&&(e<0||e===32)}function ze(e){return e===-2||e===-1||e===32}const Zl=Zr(/\p{P}|\p{S}/u),vo=Zr(/\s/);function Zr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ki(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(i===37&&rn(e.charCodeAt(n+1))&&rn(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const s=e.charCodeAt(n+1);i<56320&&s>56319&&s<57344?(a=String.fromCharCode(i,s),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function qe(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(l){return ze(l)?(e.enter(n),s(l)):t(l)}function s(l){return ze(l)&&i++<o?(e.consume(l),s):(e.exit(n),t(l))}}const Ww={tokenize:Vw};function Vw(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),qe(e,t,"linePrefix")}function o(s){return e.enter("paragraph"),i(s)}function i(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return De(s)?(e.consume(s),e.exit("chunkText"),i):(e.consume(s),a)}}const Yw={tokenize:Kw},Ff={tokenize:Qw};function Kw(e){const t=this,n=[];let r=0,o,i,a;return s;function s(x){if(r<n.length){const k=n[r];return t.containerState=k[1],e.attempt(k[0].continuation,l,c)(x)}return c(x)}function l(x){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&C();const k=t.events.length;let w=k,S;for(;w--;)if(t.events[w][0]==="exit"&&t.events[w][1].type==="chunkFlow"){S=t.events[w][1].end;break}E(r);let B=k;for(;B<t.events.length;)t.events[B][1].end={...S},B++;return kn(t.events,w+1,0,t.events.slice(k)),t.events.length=B,c(x)}return s(x)}function c(x){if(r===n.length){if(!o)return h(x);if(o.currentConstruct&&o.currentConstruct.concrete)return g(x);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ff,d,u)(x)}function d(x){return o&&C(),E(r),h(x)}function u(x){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,g(x)}function h(x){return t.containerState={},e.attempt(Ff,p,g)(x)}function p(x){return r++,n.push([t.currentConstruct,t.containerState]),h(x)}function g(x){if(x===null){o&&C(),E(0),e.consume(x);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:i}),b(x)}function b(x){if(x===null){T(e.exit("chunkFlow"),!0),E(0),e.consume(x);return}return De(x)?(e.consume(x),T(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(x),b)}function T(x,k){const w=t.sliceStream(x);if(k&&w.push(null),x.previous=i,i&&(i.next=x),i=x,o.defineSkip(x.start),o.write(w),t.parser.lazy[x.start.line]){let S=o.events.length;for(;S--;)if(o.events[S][1].start.offset<a&&(!o.events[S][1].end||o.events[S][1].end.offset>a))return;const B=t.events.length;let W=B,U,y;for(;W--;)if(t.events[W][0]==="exit"&&t.events[W][1].type==="chunkFlow"){if(U){y=t.events[W][1].end;break}U=!0}for(E(r),S=B;S<t.events.length;)t.events[S][1].end={...y},S++;kn(t.events,W+1,0,t.events.slice(B)),t.events.length=S}}function E(x){let k=n.length;for(;k-- >x;){const w=n[k];t.containerState=w[1],w[0].exit.call(t,e)}n.length=x}function C(){o.write([null]),i=void 0,o=void 0,t.containerState._closeFlow=void 0}}function Qw(e,t,n){return qe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function gi(e){if(e===null||it(e)||vo(e))return 1;if(Zl(e))return 2}function ec(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const Gu={name:"attention",resolveAll:Xw,tokenize:Jw};function Xw(e,t){let n=-1,r,o,i,a,s,l,c,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const u={...e[r][1].end},h={...e[n][1].start};Bf(u,-l),Bf(h,l),a={type:l>1?"strongSequence":"emphasisSequence",start:u,end:{...e[r][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},i={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},o={type:l>1?"strong":"emphasis",start:{...a.start},end:{...s.end}},e[r][1].end={...a.start},e[n][1].start={...s.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=jn(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=jn(c,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",i,t]]),c=jn(c,ec(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=jn(c,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,c=jn(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,kn(e,r-1,n-r+3,c),n=r+c.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Jw(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=gi(r);let i;return a;function a(l){return i=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===i)return e.consume(l),s;const c=e.exit("attentionSequence"),d=gi(l),u=!d||d===2&&o||n.includes(l),h=!o||o===2&&d||n.includes(r);return c._open=!!(i===42?u:u&&(o||!h)),c._close=!!(i===42?h:h&&(d||!u)),t(l)}}function Bf(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Zw={name:"autolink",tokenize:eN};function eN(e,t,n){let r=0;return o;function o(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(p){return un(p)?(e.consume(p),a):p===64?n(p):c(p)}function a(p){return p===43||p===45||p===46||rn(p)?(r=1,s(p)):c(p)}function s(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||rn(p))&&r++<32?(e.consume(p),s):(r=0,c(p))}function l(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||gl(p)?n(p):(e.consume(p),l)}function c(p){return p===64?(e.consume(p),d):$w(p)?(e.consume(p),c):n(p)}function d(p){return rn(p)?u(p):n(p)}function u(p){return p===46?(e.consume(p),r=0,d):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):h(p)}function h(p){if((p===45||rn(p))&&r++<63){const g=p===45?h:u;return e.consume(p),g}return n(p)}}const Za={partial:!0,tokenize:tN};function tN(e,t,n){return r;function r(i){return ze(i)?qe(e,o,"linePrefix")(i):o(i)}function o(i){return i===null||De(i)?t(i):n(i)}}const r1={continuation:{tokenize:rN},exit:oN,name:"blockQuote",tokenize:nN};function nN(e,t,n){const r=this;return o;function o(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),i}return n(a)}function i(a){return ze(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function rN(e,t,n){const r=this;return o;function o(a){return ze(a)?qe(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):i(a)}function i(a){return e.attempt(r1,t,n)(a)}}function oN(e){e.exit("blockQuote")}const o1={name:"characterEscape",tokenize:iN};function iN(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),o}function o(i){return qw(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const i1={name:"characterReference",tokenize:aN};function aN(e,t,n){const r=this;let o=0,i,a;return s;function s(u){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),l}function l(u){return u===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(u),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),i=31,a=rn,d(u))}function c(u){return u===88||u===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(u),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=Gw,d):(e.enter("characterReferenceValue"),i=7,a=$u,d(u))}function d(u){if(u===59&&o){const h=e.exit("characterReferenceValue");return a===rn&&!ph(r.sliceSerialize(h))?n(u):(e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(u)&&o++<i?(e.consume(u),d):n(u)}}const jf={partial:!0,tokenize:lN},Hf={concrete:!0,name:"codeFenced",tokenize:sN};function sN(e,t,n){const r=this,o={partial:!0,tokenize:w};let i=0,a=0,s;return l;function l(S){return c(S)}function c(S){const B=r.events[r.events.length-1];return i=B&&B[1].type==="linePrefix"?B[2].sliceSerialize(B[1],!0).length:0,s=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(S)}function d(S){return S===s?(a++,e.consume(S),d):a<3?n(S):(e.exit("codeFencedFenceSequence"),ze(S)?qe(e,u,"whitespace")(S):u(S))}function u(S){return S===null||De(S)?(e.exit("codeFencedFence"),r.interrupt?t(S):e.check(jf,b,k)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(S))}function h(S){return S===null||De(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),u(S)):ze(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),qe(e,p,"whitespace")(S)):S===96&&S===s?n(S):(e.consume(S),h)}function p(S){return S===null||De(S)?u(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(S))}function g(S){return S===null||De(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),u(S)):S===96&&S===s?n(S):(e.consume(S),g)}function b(S){return e.attempt(o,k,T)(S)}function T(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),E}function E(S){return i>0&&ze(S)?qe(e,C,"linePrefix",i+1)(S):C(S)}function C(S){return S===null||De(S)?e.check(jf,b,k)(S):(e.enter("codeFlowValue"),x(S))}function x(S){return S===null||De(S)?(e.exit("codeFlowValue"),C(S)):(e.consume(S),x)}function k(S){return e.exit("codeFenced"),t(S)}function w(S,B,W){let U=0;return y;function y(X){return S.enter("lineEnding"),S.consume(X),S.exit("lineEnding"),R}function R(X){return S.enter("codeFencedFence"),ze(X)?qe(S,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(X):F(X)}function F(X){return X===s?(S.enter("codeFencedFenceSequence"),M(X)):W(X)}function M(X){return X===s?(U++,S.consume(X),M):U>=a?(S.exit("codeFencedFenceSequence"),ze(X)?qe(S,z,"whitespace")(X):z(X)):W(X)}function z(X){return X===null||De(X)?(S.exit("codeFencedFence"),B(X)):W(X)}}}function lN(e,t,n){const r=this;return o;function o(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const $c={name:"codeIndented",tokenize:uN},cN={partial:!0,tokenize:dN};function uN(e,t,n){const r=this;return o;function o(c){return e.enter("codeIndented"),qe(e,i,"linePrefix",5)(c)}function i(c){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?l(c):De(c)?e.attempt(cN,a,l)(c):(e.enter("codeFlowValue"),s(c))}function s(c){return c===null||De(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),s)}function l(c){return e.exit("codeIndented"),t(c)}}function dN(e,t,n){const r=this;return o;function o(a){return r.parser.lazy[r.now().line]?n(a):De(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):qe(e,i,"linePrefix",5)(a)}function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):De(a)?o(a):n(a)}}const hN={name:"codeText",previous:fN,resolve:pN,tokenize:mN};function pN(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function fN(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function mN(e,t,n){let r=0,o,i;return a;function a(u){return e.enter("codeText"),e.enter("codeTextSequence"),s(u)}function s(u){return u===96?(e.consume(u),r++,s):(e.exit("codeTextSequence"),l(u))}function l(u){return u===null?n(u):u===32?(e.enter("space"),e.consume(u),e.exit("space"),l):u===96?(i=e.enter("codeTextSequence"),o=0,d(u)):De(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(u))}function c(u){return u===null||u===32||u===96||De(u)?(e.exit("codeTextData"),l(u)):(e.consume(u),c)}function d(u){return u===96?(e.consume(u),o++,d):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(u)):(i.type="codeTextData",c(u))}}class gN{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Wi(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Wi(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Wi(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Wi(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Wi(this.left,n.reverse())}}}function Wi(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function a1(e){const t={};let n=-1,r,o,i,a,s,l,c;const d=new gN(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,i=0,i<l.length&&l[i][1].type==="lineEndingBlank"&&(i+=2),i<l.length&&l[i][1].type==="content"))for(;++i<l.length&&l[i][1].type!=="content";)l[i][1].type==="chunkText"&&(l[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,yN(d,n)),n=t[n],c=!0);else if(r[1]._container){for(i=n,o=void 0;i--;)if(a=d.get(i),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(o&&(d.get(o)[1].type="lineEndingBlank"),a[1].type="lineEnding",o=i);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;o&&(r[1].end={...d.get(o)[1].start},s=d.slice(o,n),s.unshift(r),d.splice(o,n-o+1,s))}}return kn(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!c}function yN(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const s=a.events,l=[],c={};let d,u,h=-1,p=n,g=0,b=0;const T=[b];for(;p;){for(;e.get(++o)[1]!==p;);i.push(o),p._tokenizer||(d=r.sliceStream(p),p.next||d.push(null),u&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),u=p,p=p.next}for(p=n;++h<s.length;)s[h][0]==="exit"&&s[h-1][0]==="enter"&&s[h][1].type===s[h-1][1].type&&s[h][1].start.line!==s[h][1].end.line&&(b=h+1,T.push(b),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):T.pop(),h=T.length;h--;){const E=s.slice(T[h],T[h+1]),C=i.pop();l.push([C,C+E.length-1]),e.splice(C,2,E)}for(l.reverse(),h=-1;++h<l.length;)c[g+l[h][0]]=g+l[h][1],g+=l[h][1]-l[h][0]-1;return c}const bN={resolve:TN,tokenize:xN},EN={partial:!0,tokenize:CN};function TN(e){return a1(e),e}function xN(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(s)}function o(s){return s===null?i(s):De(s)?e.check(EN,a,i)(s):(e.consume(s),o)}function i(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function CN(e,t,n){const r=this;return o;function o(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),qe(e,i,"linePrefix")}function i(a){if(a===null||De(a))return n(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function s1(e,t,n,r,o,i,a,s,l){const c=l||Number.POSITIVE_INFINITY;let d=0;return u;function u(E){return E===60?(e.enter(r),e.enter(o),e.enter(i),e.consume(E),e.exit(i),h):E===null||E===32||E===41||gl(E)?n(E):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),b(E))}function h(E){return E===62?(e.enter(i),e.consume(E),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(E))}function p(E){return E===62?(e.exit("chunkString"),e.exit(s),h(E)):E===null||E===60||De(E)?n(E):(e.consume(E),E===92?g:p)}function g(E){return E===60||E===62||E===92?(e.consume(E),p):p(E)}function b(E){return!d&&(E===null||E===41||it(E))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(E)):d<c&&E===40?(e.consume(E),d++,b):E===41?(e.consume(E),d--,b):E===null||E===32||E===40||gl(E)?n(E):(e.consume(E),E===92?T:b)}function T(E){return E===40||E===41||E===92?(e.consume(E),b):b(E)}}function l1(e,t,n,r,o,i){const a=this;let s=0,l;return c;function c(p){return e.enter(r),e.enter(o),e.consume(p),e.exit(o),e.enter(i),d}function d(p){return s>999||p===null||p===91||p===93&&!l||p===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(p):p===93?(e.exit(i),e.enter(o),e.consume(p),e.exit(o),e.exit(r),t):De(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),u(p))}function u(p){return p===null||p===91||p===93||De(p)||s++>999?(e.exit("chunkString"),d(p)):(e.consume(p),l||(l=!ze(p)),p===92?h:u)}function h(p){return p===91||p===92||p===93?(e.consume(p),s++,u):u(p)}}function c1(e,t,n,r,o,i){let a;return s;function s(h){return h===34||h===39||h===40?(e.enter(r),e.enter(o),e.consume(h),e.exit(o),a=h===40?41:h,l):n(h)}function l(h){return h===a?(e.enter(o),e.consume(h),e.exit(o),e.exit(r),t):(e.enter(i),c(h))}function c(h){return h===a?(e.exit(i),l(a)):h===null?n(h):De(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),qe(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===a||h===null||De(h)?(e.exit("chunkString"),c(h)):(e.consume(h),h===92?u:d)}function u(h){return h===a||h===92?(e.consume(h),d):d(h)}}function fa(e,t){let n;return r;function r(o){return De(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):ze(o)?qe(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const vN={name:"definition",tokenize:AN},SN={partial:!0,tokenize:kN};function AN(e,t,n){const r=this;let o;return i;function i(p){return e.enter("definition"),a(p)}function a(p){return l1.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return o=Xn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):n(p)}function l(p){return it(p)?fa(e,c)(p):c(p)}function c(p){return s1(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function d(p){return e.attempt(SN,u,u)(p)}function u(p){return ze(p)?qe(e,h,"whitespace")(p):h(p)}function h(p){return p===null||De(p)?(e.exit("definition"),r.parser.defined.push(o),t(p)):n(p)}}function kN(e,t,n){return r;function r(s){return it(s)?fa(e,o)(s):n(s)}function o(s){return c1(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return ze(s)?qe(e,a,"whitespace")(s):a(s)}function a(s){return s===null||De(s)?t(s):n(s)}}const _N={name:"hardBreakEscape",tokenize:DN};function DN(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),o}function o(i){return De(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const IN={name:"headingAtx",resolve:wN,tokenize:NN};function wN(e,t){let n=e.length-2,r=3,o,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},kn(e,r,n-r+1,[["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t]])),e}function NN(e,t,n){let r=0;return o;function o(d){return e.enter("atxHeading"),i(d)}function i(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&r++<6?(e.consume(d),a):d===null||it(d)?(e.exit("atxHeadingSequence"),s(d)):n(d)}function s(d){return d===35?(e.enter("atxHeadingSequence"),l(d)):d===null||De(d)?(e.exit("atxHeading"),t(d)):ze(d)?qe(e,s,"whitespace")(d):(e.enter("atxHeadingText"),c(d))}function l(d){return d===35?(e.consume(d),l):(e.exit("atxHeadingSequence"),s(d))}function c(d){return d===null||d===35||it(d)?(e.exit("atxHeadingText"),s(d)):(e.consume(d),c)}}const PN=["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"],Uf=["pre","script","style","textarea"],RN={concrete:!0,name:"htmlFlow",resolveTo:MN,tokenize:FN},LN={partial:!0,tokenize:jN},ON={partial:!0,tokenize:BN};function MN(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function FN(e,t,n){const r=this;let o,i,a,s,l;return c;function c(A){return d(A)}function d(A){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(A),u}function u(A){return A===33?(e.consume(A),h):A===47?(e.consume(A),i=!0,b):A===63?(e.consume(A),o=3,r.interrupt?t:I):un(A)?(e.consume(A),a=String.fromCharCode(A),T):n(A)}function h(A){return A===45?(e.consume(A),o=2,p):A===91?(e.consume(A),o=5,s=0,g):un(A)?(e.consume(A),o=4,r.interrupt?t:I):n(A)}function p(A){return A===45?(e.consume(A),r.interrupt?t:I):n(A)}function g(A){const Q="CDATA[";return A===Q.charCodeAt(s++)?(e.consume(A),s===Q.length?r.interrupt?t:F:g):n(A)}function b(A){return un(A)?(e.consume(A),a=String.fromCharCode(A),T):n(A)}function T(A){if(A===null||A===47||A===62||it(A)){const Q=A===47,ge=a.toLowerCase();return!Q&&!i&&Uf.includes(ge)?(o=1,r.interrupt?t(A):F(A)):PN.includes(a.toLowerCase())?(o=6,Q?(e.consume(A),E):r.interrupt?t(A):F(A)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(A):i?C(A):x(A))}return A===45||rn(A)?(e.consume(A),a+=String.fromCharCode(A),T):n(A)}function E(A){return A===62?(e.consume(A),r.interrupt?t:F):n(A)}function C(A){return ze(A)?(e.consume(A),C):y(A)}function x(A){return A===47?(e.consume(A),y):A===58||A===95||un(A)?(e.consume(A),k):ze(A)?(e.consume(A),x):y(A)}function k(A){return A===45||A===46||A===58||A===95||rn(A)?(e.consume(A),k):w(A)}function w(A){return A===61?(e.consume(A),S):ze(A)?(e.consume(A),w):x(A)}function S(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),l=A,B):ze(A)?(e.consume(A),S):W(A)}function B(A){return A===l?(e.consume(A),l=null,U):A===null||De(A)?n(A):(e.consume(A),B)}function W(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||it(A)?w(A):(e.consume(A),W)}function U(A){return A===47||A===62||ze(A)?x(A):n(A)}function y(A){return A===62?(e.consume(A),R):n(A)}function R(A){return A===null||De(A)?F(A):ze(A)?(e.consume(A),R):n(A)}function F(A){return A===45&&o===2?(e.consume(A),Z):A===60&&o===1?(e.consume(A),me):A===62&&o===4?(e.consume(A),ue):A===63&&o===3?(e.consume(A),I):A===93&&o===5?(e.consume(A),ee):De(A)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(LN,J,M)(A)):A===null||De(A)?(e.exit("htmlFlowData"),M(A)):(e.consume(A),F)}function M(A){return e.check(ON,z,J)(A)}function z(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),X}function X(A){return A===null||De(A)?M(A):(e.enter("htmlFlowData"),F(A))}function Z(A){return A===45?(e.consume(A),I):F(A)}function me(A){return A===47?(e.consume(A),a="",ce):F(A)}function ce(A){if(A===62){const Q=a.toLowerCase();return Uf.includes(Q)?(e.consume(A),ue):F(A)}return un(A)&&a.length<8?(e.consume(A),a+=String.fromCharCode(A),ce):F(A)}function ee(A){return A===93?(e.consume(A),I):F(A)}function I(A){return A===62?(e.consume(A),ue):A===45&&o===2?(e.consume(A),I):F(A)}function ue(A){return A===null||De(A)?(e.exit("htmlFlowData"),J(A)):(e.consume(A),ue)}function J(A){return e.exit("htmlFlow"),t(A)}}function BN(e,t,n){const r=this;return o;function o(a){return De(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):n(a)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function jN(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Za,t,n)}}const HN={name:"htmlText",tokenize:UN};function UN(e,t,n){const r=this;let o,i,a;return s;function s(I){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(I),l}function l(I){return I===33?(e.consume(I),c):I===47?(e.consume(I),w):I===63?(e.consume(I),x):un(I)?(e.consume(I),W):n(I)}function c(I){return I===45?(e.consume(I),d):I===91?(e.consume(I),i=0,g):un(I)?(e.consume(I),C):n(I)}function d(I){return I===45?(e.consume(I),p):n(I)}function u(I){return I===null?n(I):I===45?(e.consume(I),h):De(I)?(a=u,me(I)):(e.consume(I),u)}function h(I){return I===45?(e.consume(I),p):u(I)}function p(I){return I===62?Z(I):I===45?h(I):u(I)}function g(I){const ue="CDATA[";return I===ue.charCodeAt(i++)?(e.consume(I),i===ue.length?b:g):n(I)}function b(I){return I===null?n(I):I===93?(e.consume(I),T):De(I)?(a=b,me(I)):(e.consume(I),b)}function T(I){return I===93?(e.consume(I),E):b(I)}function E(I){return I===62?Z(I):I===93?(e.consume(I),E):b(I)}function C(I){return I===null||I===62?Z(I):De(I)?(a=C,me(I)):(e.consume(I),C)}function x(I){return I===null?n(I):I===63?(e.consume(I),k):De(I)?(a=x,me(I)):(e.consume(I),x)}function k(I){return I===62?Z(I):x(I)}function w(I){return un(I)?(e.consume(I),S):n(I)}function S(I){return I===45||rn(I)?(e.consume(I),S):B(I)}function B(I){return De(I)?(a=B,me(I)):ze(I)?(e.consume(I),B):Z(I)}function W(I){return I===45||rn(I)?(e.consume(I),W):I===47||I===62||it(I)?U(I):n(I)}function U(I){return I===47?(e.consume(I),Z):I===58||I===95||un(I)?(e.consume(I),y):De(I)?(a=U,me(I)):ze(I)?(e.consume(I),U):Z(I)}function y(I){return I===45||I===46||I===58||I===95||rn(I)?(e.consume(I),y):R(I)}function R(I){return I===61?(e.consume(I),F):De(I)?(a=R,me(I)):ze(I)?(e.consume(I),R):U(I)}function F(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),o=I,M):De(I)?(a=F,me(I)):ze(I)?(e.consume(I),F):(e.consume(I),z)}function M(I){return I===o?(e.consume(I),o=void 0,X):I===null?n(I):De(I)?(a=M,me(I)):(e.consume(I),M)}function z(I){return I===null||I===34||I===39||I===60||I===61||I===96?n(I):I===47||I===62||it(I)?U(I):(e.consume(I),z)}function X(I){return I===47||I===62||it(I)?U(I):n(I)}function Z(I){return I===62?(e.consume(I),e.exit("htmlTextData"),e.exit("htmlText"),t):n(I)}function me(I){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),ce}function ce(I){return ze(I)?qe(e,ee,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):ee(I)}function ee(I){return e.enter("htmlTextData"),a(I)}}const fh={name:"labelEnd",resolveAll:qN,resolveTo:WN,tokenize:VN},zN={tokenize:YN},$N={tokenize:KN},GN={tokenize:QN};function qN(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&kn(e,0,e.length,n),e}function WN(e,t){let n=e.length,r=0,o,i,a,s;for(;n--;)if(o=e[n][1],i){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(i=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(a=n);const l={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[i][1].start},end:{...e[a][1].end}},d={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return s=[["enter",l,t],["enter",c,t]],s=jn(s,e.slice(i+1,i+r+3)),s=jn(s,[["enter",d,t]]),s=jn(s,ec(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),s=jn(s,[["exit",d,t],e[a-2],e[a-1],["exit",c,t]]),s=jn(s,e.slice(a+1)),s=jn(s,[["exit",l,t]]),kn(e,i,e.length,s),e}function VN(e,t,n){const r=this;let o=r.events.length,i,a;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){i=r.events[o][1];break}return s;function s(h){return i?i._inactive?u(h):(a=r.parser.defined.includes(Xn(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),l):n(h)}function l(h){return h===40?e.attempt(zN,d,a?d:u)(h):h===91?e.attempt($N,d,a?c:u)(h):a?d(h):u(h)}function c(h){return e.attempt(GN,d,u)(h)}function d(h){return t(h)}function u(h){return i._balanced=!0,n(h)}}function YN(e,t,n){return r;function r(u){return e.enter("resource"),e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),o}function o(u){return it(u)?fa(e,i)(u):i(u)}function i(u){return u===41?d(u):s1(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function a(u){return it(u)?fa(e,l)(u):d(u)}function s(u){return n(u)}function l(u){return u===34||u===39||u===40?c1(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):d(u)}function c(u){return it(u)?fa(e,d)(u):d(u)}function d(u){return u===41?(e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),e.exit("resource"),t):n(u)}}function KN(e,t,n){const r=this;return o;function o(s){return l1.call(r,e,i,a,"reference","referenceMarker","referenceString")(s)}function i(s){return r.parser.defined.includes(Xn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function QN(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),o}function o(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const XN={name:"labelStartImage",resolveAll:fh.resolveAll,tokenize:JN};function JN(e,t,n){const r=this;return o;function o(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),i}function i(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const ZN={name:"labelStartLink",resolveAll:fh.resolveAll,tokenize:e5};function e5(e,t,n){const r=this;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),i}function i(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Gc={name:"lineEnding",tokenize:t5};function t5(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),qe(e,t,"linePrefix")}}const Bs={name:"thematicBreak",tokenize:n5};function n5(e,t,n){let r=0,o;return i;function i(c){return e.enter("thematicBreak"),a(c)}function a(c){return o=c,s(c)}function s(c){return c===o?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||De(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===o?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),ze(c)?qe(e,s,"whitespace")(c):s(c))}}const fn={continuation:{tokenize:a5},exit:l5,name:"list",tokenize:i5},r5={partial:!0,tokenize:c5},o5={partial:!0,tokenize:s5};function i5(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,a=0;return s;function s(p){const g=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:$u(p)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Bs,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return n(p)}function l(p){return $u(p)&&++a<10?(e.consume(p),l):(!r.interrupt||a<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Za,r.interrupt?n:d,e.attempt(r5,h,u))}function d(p){return r.containerState.initialBlankLine=!0,i++,h(p)}function u(p){return ze(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function a5(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Za,o,i);function o(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,qe(e,t,"listItemIndent",r.containerState.size+1)(s)}function i(s){return r.containerState.furtherBlankLines||!ze(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(o5,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,qe(e,e.attempt(fn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function s5(e,t,n){const r=this;return qe(e,o,"listItemIndent",r.containerState.size+1);function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(i):n(i)}}function l5(e){e.exit(this.containerState.type)}function c5(e,t,n){const r=this;return qe(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(i){const a=r.events[r.events.length-1];return!ze(i)&&a&&a[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const zf={name:"setextUnderline",resolveTo:u5,tokenize:d5};function u5(e,t){let n=e.length,r,o,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",i?(e.splice(o,0,["enter",a,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function d5(e,t,n){const r=this;let o;return i;function i(c){let d=r.events.length,u;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){u=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||u)?(e.enter("setextHeadingLine"),o=c,a(c)):n(c)}function a(c){return e.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===o?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),ze(c)?qe(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||De(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const h5={tokenize:p5};function p5(e){const t=this,n=e.attempt(Za,r,e.attempt(this.parser.constructs.flowInitial,o,qe(e,e.attempt(this.parser.constructs.flow,o,e.attempt(bN,o)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const f5={resolveAll:d1()},m5=u1("string"),g5=u1("text");function u1(e){return{resolveAll:d1(e==="text"?y5:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],i=n.attempt(o,a,s);return a;function a(d){return c(d)?i(d):s(d)}function s(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),l}function l(d){return c(d)?(n.exit("data"),i(d)):(n.consume(d),l)}function c(d){if(d===null)return!0;const u=o[d];let h=-1;if(u)for(;++h<u.length;){const p=u[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function d1(e){return t;function t(n,r){let o=-1,i;for(;++o<=n.length;)i===void 0?n[o]&&n[o][1].type==="data"&&(i=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==i+2&&(n[i][1].end=n[o-1][1].end,n.splice(i+2,o-i-2),o=i+2),i=void 0);return e?e(n,r):n}}function y5(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let i=o.length,a=-1,s=0,l;for(;i--;){const c=o[i];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(c===-2)l=!0,s++;else if(c!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const c={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?a:r.start._bufferIndex+a,_index:r.start._index+i,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const b5={42:fn,43:fn,45:fn,48:fn,49:fn,50:fn,51:fn,52:fn,53:fn,54:fn,55:fn,56:fn,57:fn,62:r1},E5={91:vN},T5={[-2]:$c,[-1]:$c,32:$c},x5={35:IN,42:Bs,45:[zf,Bs],60:RN,61:zf,95:Bs,96:Hf,126:Hf},C5={38:i1,92:o1},v5={[-5]:Gc,[-4]:Gc,[-3]:Gc,33:XN,38:i1,42:Gu,60:[Zw,HN],91:ZN,92:[_N,o1],93:fh,95:Gu,96:hN},S5={null:[Gu,f5]},A5={null:[42,95]},k5={null:[]},_5=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:A5,contentInitial:E5,disable:k5,document:b5,flow:x5,flowInitial:T5,insideSpan:S5,string:C5,text:v5},Symbol.toStringTag,{value:"Module"}));function D5(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},i=[];let a=[],s=[];const l={attempt:B(w),check:B(S),consume:C,enter:x,exit:k,interrupt:B(S,{interrupt:!0})},c={code:null,containerState:{},defineSkip:b,events:[],now:g,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:u};let d=t.tokenize.call(c,l);return t.resolveAll&&i.push(t),c;function u(R){return a=jn(a,R),T(),a[a.length-1]!==null?[]:(W(t,0),c.events=ec(i,c.events,c),c.events)}function h(R,F){return w5(p(R),F)}function p(R){return I5(a,R)}function g(){const{_bufferIndex:R,_index:F,line:M,column:z,offset:X}=r;return{_bufferIndex:R,_index:F,line:M,column:z,offset:X}}function b(R){o[R.line]=R.column,y()}function T(){let R;for(;r._index<a.length;){const F=a[r._index];if(typeof F=="string")for(R=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===R&&r._bufferIndex<F.length;)E(F.charCodeAt(r._bufferIndex));else E(F)}}function E(R){d=d(R)}function C(R){De(R)?(r.line++,r.column=1,r.offset+=R===-3?2:1,y()):R!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=R}function x(R,F){const M=F||{};return M.type=R,M.start=g(),c.events.push(["enter",M,c]),s.push(M),M}function k(R){const F=s.pop();return F.end=g(),c.events.push(["exit",F,c]),F}function w(R,F){W(R,F.from)}function S(R,F){F.restore()}function B(R,F){return M;function M(z,X,Z){let me,ce,ee,I;return Array.isArray(z)?J(z):"tokenize"in z?J([z]):ue(z);function ue(de){return ye;function ye(he){const Fe=he!==null&&de[he],Be=he!==null&&de.null,xe=[...Array.isArray(Fe)?Fe:Fe?[Fe]:[],...Array.isArray(Be)?Be:Be?[Be]:[]];return J(xe)(he)}}function J(de){return me=de,ce=0,de.length===0?Z:A(de[ce])}function A(de){return ye;function ye(he){return I=U(),ee=de,de.partial||(c.currentConstruct=de),de.name&&c.parser.constructs.disable.null.includes(de.name)?ge():de.tokenize.call(F?Object.assign(Object.create(c),F):c,l,Q,ge)(he)}}function Q(de){return R(ee,I),X}function ge(de){return I.restore(),++ce<me.length?A(me[ce]):Z}}}function W(R,F){R.resolveAll&&!i.includes(R)&&i.push(R),R.resolve&&kn(c.events,F,c.events.length-F,R.resolve(c.events.slice(F),c)),R.resolveTo&&(c.events=R.resolveTo(c.events,c))}function U(){const R=g(),F=c.previous,M=c.currentConstruct,z=c.events.length,X=Array.from(s);return{from:z,restore:Z};function Z(){r=R,c.previous=F,c.currentConstruct=M,c.events.length=z,s=X,y()}}function y(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function I5(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}function w5(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let a;if(typeof i=="string")a=i;else switch(i){case-5:{a="\r";break}case-4:{a=`
|
|
145
|
+
`;break}case-3:{a=`\r
|
|
146
|
+
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&o)continue;a=" ";break}default:a=String.fromCharCode(i)}o=i===-2,r.push(a)}return r.join("")}function N5(e){const t={constructs:t1([_5,...(e||{}).extensions||[]]),content:n(Ww),defined:[],document:n(Yw),flow:n(h5),lazy:{},string:n(m5),text:n(g5)};return t;function n(r){return o;function o(i){return D5(t,r,i)}}}function P5(e){for(;!a1(e););return e}const $f=/[\0\t\n\r]/g;function R5(){let e=1,t="",n=!0,r;return o;function o(i,a,s){const l=[];let c,d,u,h,p;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t="",n&&(i.charCodeAt(0)===65279&&u++,n=void 0);u<i.length;){if($f.lastIndex=u,c=$f.exec(i),h=c&&c.index!==void 0?c.index:i.length,p=i.charCodeAt(h),!c){t=i.slice(u);break}if(p===10&&u===h&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),u<h&&(l.push(i.slice(u,h)),e+=h-u),p){case 0:{l.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,l.push(-2);e++<d;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}u=h+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const L5=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function O5(e){return e.replace(L5,M5)}function M5(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const r=n.charCodeAt(1),o=r===120||r===88;return n1(n.slice(o?2:1),o?16:10)}return ph(n)||e}const h1={}.hasOwnProperty;function F5(e,t,n){return typeof t!="string"&&(n=t,t=void 0),B5(n)(P5(N5(n).document().write(R5()(e,t,!0))))}function B5(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(ht),autolinkProtocol:U,autolinkEmail:U,atxHeading:i(Jt),blockQuote:i(Be),characterEscape:U,characterReference:U,codeFenced:i(xe),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(xe,a),codeText:i(dt,a),codeTextData:U,data:U,codeFlowValue:U,definition:i(Ze),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(be),hardBreakEscape:i(bt),hardBreakTrailing:i(bt),htmlFlow:i(_e,a),htmlFlowData:U,htmlText:i(_e,a),htmlTextData:U,image:i(St),label:a,link:i(ht),listItem:i(Se),listItemValue:h,listOrdered:i(pt,u),listUnordered:i(pt),paragraph:i(fe),reference:A,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(Jt),strong:i(Kn),thematicBreak:i(Ke)},exit:{atxHeading:l(),atxHeadingSequence:w,autolink:l(),autolinkEmail:Fe,autolinkProtocol:he,blockQuote:l(),characterEscapeValue:y,characterReferenceMarkerHexadecimal:ge,characterReferenceMarkerNumeric:ge,characterReferenceValue:de,characterReference:ye,codeFenced:l(T),codeFencedFence:b,codeFencedFenceInfo:p,codeFencedFenceMeta:g,codeFlowValue:y,codeIndented:l(E),codeText:l(X),codeTextData:y,data:y,definition:l(),definitionDestinationString:k,definitionLabelString:C,definitionTitleString:x,emphasis:l(),hardBreakEscape:l(F),hardBreakTrailing:l(F),htmlFlow:l(M),htmlFlowData:y,htmlText:l(z),htmlTextData:y,image:l(me),label:ee,labelText:ce,lineEnding:R,link:l(Z),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Q,resourceDestinationString:I,resourceTitleString:ue,resource:J,setextHeading:l(W),setextHeadingLineSequence:B,setextHeadingText:S,strong:l(),thematicBreak:l()}};p1(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(V){let re={type:"root",children:[]};const Ae={stack:[re],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:d,data:n},$e=[];let Ve=-1;for(;++Ve<V.length;)if(V[Ve][1].type==="listOrdered"||V[Ve][1].type==="listUnordered")if(V[Ve][0]==="enter")$e.push(Ve);else{const et=$e.pop();Ve=o(V,et,Ve)}for(Ve=-1;++Ve<V.length;){const et=t[V[Ve][0]];h1.call(et,V[Ve][1].type)&&et[V[Ve][1].type].call(Object.assign({sliceSerialize:V[Ve][2].sliceSerialize},Ae),V[Ve][1])}if(Ae.tokenStack.length>0){const et=Ae.tokenStack[Ae.tokenStack.length-1];(et[1]||Gf).call(Ae,void 0,et[0])}for(re.position={start:Br(V.length>0?V[0][1].start:{line:1,column:1,offset:0}),end:Br(V.length>0?V[V.length-2][1].end:{line:1,column:1,offset:0})},Ve=-1;++Ve<t.transforms.length;)re=t.transforms[Ve](re)||re;return re}function o(V,re,Ae){let $e=re-1,Ve=-1,et=!1,Zt,Kt,en,ie;for(;++$e<=Ae;){const ne=V[$e];switch(ne[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ne[0]==="enter"?Ve++:Ve--,ie=void 0;break}case"lineEndingBlank":{ne[0]==="enter"&&(Zt&&!ie&&!Ve&&!en&&(en=$e),ie=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ie=void 0}if(!Ve&&ne[0]==="enter"&&ne[1].type==="listItemPrefix"||Ve===-1&&ne[0]==="exit"&&(ne[1].type==="listUnordered"||ne[1].type==="listOrdered")){if(Zt){let Oe=$e;for(Kt=void 0;Oe--;){const Ie=V[Oe];if(Ie[1].type==="lineEnding"||Ie[1].type==="lineEndingBlank"){if(Ie[0]==="exit")continue;Kt&&(V[Kt][1].type="lineEndingBlank",et=!0),Ie[1].type="lineEnding",Kt=Oe}else if(!(Ie[1].type==="linePrefix"||Ie[1].type==="blockQuotePrefix"||Ie[1].type==="blockQuotePrefixWhitespace"||Ie[1].type==="blockQuoteMarker"||Ie[1].type==="listItemIndent"))break}en&&(!Kt||en<Kt)&&(Zt._spread=!0),Zt.end=Object.assign({},Kt?V[Kt][1].start:ne[1].end),V.splice(Kt||$e,0,["exit",Zt,ne[2]]),$e++,Ae++}if(ne[1].type==="listItemPrefix"){const Oe={type:"listItem",_spread:!1,start:Object.assign({},ne[1].start),end:void 0};Zt=Oe,V.splice($e,0,["enter",Oe,ne[2]]),$e++,Ae++,en=void 0,ie=!0}}}return V[re][1]._spread=et,Ae}function i(V,re){return Ae;function Ae($e){s.call(this,V($e),$e),re&&re.call(this,$e)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(V,re,Ae){this.stack[this.stack.length-1].children.push(V),this.stack.push(V),this.tokenStack.push([re,Ae||void 0]),V.position={start:Br(re.start),end:void 0}}function l(V){return re;function re(Ae){V&&V.call(this,Ae),c.call(this,Ae)}}function c(V,re){const Ae=this.stack.pop(),$e=this.tokenStack.pop();if($e)$e[0].type!==V.type&&(re?re.call(this,V,$e[0]):($e[1]||Gf).call(this,V,$e[0]));else throw new Error("Cannot close `"+V.type+"` ("+pa({start:V.start,end:V.end})+"): it’s not open");Ae.position.end=Br(V.end)}function d(){return hh(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function h(V){if(this.data.expectingFirstListItemValue){const re=this.stack[this.stack.length-2];re.start=Number.parseInt(this.sliceSerialize(V),10),this.data.expectingFirstListItemValue=void 0}}function p(){const V=this.resume(),re=this.stack[this.stack.length-1];re.lang=V}function g(){const V=this.resume(),re=this.stack[this.stack.length-1];re.meta=V}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const V=this.resume(),re=this.stack[this.stack.length-1];re.value=V.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const V=this.resume(),re=this.stack[this.stack.length-1];re.value=V.replace(/(\r?\n|\r)$/g,"")}function C(V){const re=this.resume(),Ae=this.stack[this.stack.length-1];Ae.label=re,Ae.identifier=Xn(this.sliceSerialize(V)).toLowerCase()}function x(){const V=this.resume(),re=this.stack[this.stack.length-1];re.title=V}function k(){const V=this.resume(),re=this.stack[this.stack.length-1];re.url=V}function w(V){const re=this.stack[this.stack.length-1];if(!re.depth){const Ae=this.sliceSerialize(V).length;re.depth=Ae}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function B(V){const re=this.stack[this.stack.length-1];re.depth=this.sliceSerialize(V).codePointAt(0)===61?1:2}function W(){this.data.setextHeadingSlurpLineEnding=void 0}function U(V){const re=this.stack[this.stack.length-1].children;let Ae=re[re.length-1];(!Ae||Ae.type!=="text")&&(Ae=Mr(),Ae.position={start:Br(V.start),end:void 0},re.push(Ae)),this.stack.push(Ae)}function y(V){const re=this.stack.pop();re.value+=this.sliceSerialize(V),re.position.end=Br(V.end)}function R(V){const re=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ae=re.children[re.children.length-1];Ae.position.end=Br(V.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(re.type)&&(U.call(this,V),y.call(this,V))}function F(){this.data.atHardBreak=!0}function M(){const V=this.resume(),re=this.stack[this.stack.length-1];re.value=V}function z(){const V=this.resume(),re=this.stack[this.stack.length-1];re.value=V}function X(){const V=this.resume(),re=this.stack[this.stack.length-1];re.value=V}function Z(){const V=this.stack[this.stack.length-1];if(this.data.inReference){const re=this.data.referenceType||"shortcut";V.type+="Reference",V.referenceType=re,delete V.url,delete V.title}else delete V.identifier,delete V.label;this.data.referenceType=void 0}function me(){const V=this.stack[this.stack.length-1];if(this.data.inReference){const re=this.data.referenceType||"shortcut";V.type+="Reference",V.referenceType=re,delete V.url,delete V.title}else delete V.identifier,delete V.label;this.data.referenceType=void 0}function ce(V){const re=this.sliceSerialize(V),Ae=this.stack[this.stack.length-2];Ae.label=O5(re),Ae.identifier=Xn(re).toLowerCase()}function ee(){const V=this.stack[this.stack.length-1],re=this.resume(),Ae=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ae.type==="link"){const $e=V.children;Ae.children=$e}else Ae.alt=re}function I(){const V=this.resume(),re=this.stack[this.stack.length-1];re.url=V}function ue(){const V=this.resume(),re=this.stack[this.stack.length-1];re.title=V}function J(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function Q(V){const re=this.resume(),Ae=this.stack[this.stack.length-1];Ae.label=re,Ae.identifier=Xn(this.sliceSerialize(V)).toLowerCase(),this.data.referenceType="full"}function ge(V){this.data.characterReferenceType=V.type}function de(V){const re=this.sliceSerialize(V),Ae=this.data.characterReferenceType;let $e;Ae?($e=n1(re,Ae==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):$e=ph(re);const Ve=this.stack[this.stack.length-1];Ve.value+=$e}function ye(V){const re=this.stack.pop();re.position.end=Br(V.end)}function he(V){y.call(this,V);const re=this.stack[this.stack.length-1];re.url=this.sliceSerialize(V)}function Fe(V){y.call(this,V);const re=this.stack[this.stack.length-1];re.url="mailto:"+this.sliceSerialize(V)}function Be(){return{type:"blockquote",children:[]}}function xe(){return{type:"code",lang:null,meta:null,value:""}}function dt(){return{type:"inlineCode",value:""}}function Ze(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function be(){return{type:"emphasis",children:[]}}function Jt(){return{type:"heading",depth:0,children:[]}}function bt(){return{type:"break"}}function _e(){return{type:"html",value:""}}function St(){return{type:"image",title:null,url:"",alt:null}}function ht(){return{type:"link",title:null,url:"",children:[]}}function pt(V){return{type:"list",ordered:V.type==="listOrdered",start:null,spread:V._spread,children:[]}}function Se(V){return{type:"listItem",spread:V._spread,checked:null,children:[]}}function fe(){return{type:"paragraph",children:[]}}function Kn(){return{type:"strong",children:[]}}function Mr(){return{type:"text",value:""}}function Ke(){return{type:"thematicBreak"}}}function Br(e){return{line:e.line,column:e.column,offset:e.offset}}function p1(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?p1(e,r):j5(e,r)}}function j5(e,t){let n;for(n in t)if(h1.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Gf(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+pa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+pa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+pa({start:t.start,end:t.end})+") is still open")}function H5(e){const t=this;t.parser=n;function n(r){return F5(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function U5(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function z5(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
147
|
+
`}]}function $5(e,t){const n=t.value?t.value+`
|
|
148
|
+
`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function G5(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function q5(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function W5(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=ki(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function V5(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Y5(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function f1(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&i.type==="text"?i.value="["+i.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&a.type==="text"?a.value+=r:o.push({type:"text",value:r}),o}function K5(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return f1(e,t);const o={src:ki(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)}function Q5(e,t){const n={src:ki(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function X5(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function J5(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return f1(e,t);const o={href:ki(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Z5(e,t){const n={href:ki(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function e3(e,t,n){const r=e.all(t),o=n?t3(n):m1(t),i={},a=[];if(typeof t.checked=="boolean"){const d=r[0];let u;d&&d.type==="element"&&d.tagName==="p"?u=d:(u={type:"element",tagName:"p",properties:{},children:[]},r.unshift(u)),u.children.length>0&&u.children.unshift({type:"text",value:" "}),u.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const d=r[s];(o||s!==0||d.type!=="element"||d.tagName!=="p")&&a.push({type:"text",value:`
|
|
149
|
+
`}),d.type==="element"&&d.tagName==="p"&&!o?a.push(...d.children):a.push(d)}const l=r[r.length-1];l&&(o||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
|
|
150
|
+
`});const c={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,c),e.applyData(t,c)}function t3(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=m1(n[r])}return t}function m1(e){return e.spread??e.children.length>1}function n3(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const a=r[o];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function r3(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function o3(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function i3(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function a3(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),o.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=hr(t.children[1]),l=Jl(t.children[t.children.length-1]);s&&l&&(a.position={start:s,end:l}),o.push(a)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)}function s3(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",i=n&&n.type==="table"?n.align:void 0,a=i?i.length:t.children.length;let s=-1;const l=[];for(;++s<a;){const d=t.children[s],u={},h=i?i[s]:void 0;h&&(u.align=h);let p={type:"element",tagName:o,properties:u,children:[]};d&&(p.children=e.all(d),e.patch(d,p),p=e.applyData(d,p)),l.push(p)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)}function l3(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const qf=9,Wf=32;function c3(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(Vf(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(Vf(t.slice(o),o>0,!1)),i.join("")}function Vf(e,t,n){let r=0,o=e.length;if(t){let i=e.codePointAt(r);for(;i===qf||i===Wf;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(o-1);for(;i===qf||i===Wf;)o--,i=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function u3(e,t){const n={type:"text",value:c3(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function d3(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const h3={blockquote:U5,break:z5,code:$5,delete:G5,emphasis:q5,footnoteReference:W5,heading:V5,html:Y5,imageReference:K5,image:Q5,inlineCode:X5,linkReference:J5,link:Z5,listItem:e3,list:n3,paragraph:r3,root:o3,strong:i3,table:a3,tableCell:l3,tableRow:s3,text:u3,thematicBreak:d3,toml:bs,yaml:bs,definition:bs,footnoteDefinition:bs};function bs(){}const g1=-1,tc=0,ma=1,yl=2,mh=3,gh=4,yh=5,bh=6,y1=7,b1=8,Yf=typeof self=="object"?self:globalThis,p3=(e,t)=>{const n=(o,i)=>(e.set(i,o),o),r=o=>{if(e.has(o))return e.get(o);const[i,a]=t[o];switch(i){case tc:case g1:return n(a,o);case ma:{const s=n([],o);for(const l of a)s.push(r(l));return s}case yl:{const s=n({},o);for(const[l,c]of a)s[r(l)]=r(c);return s}case mh:return n(new Date(a),o);case gh:{const{source:s,flags:l}=a;return n(new RegExp(s,l),o)}case yh:{const s=n(new Map,o);for(const[l,c]of a)s.set(r(l),r(c));return s}case bh:{const s=n(new Set,o);for(const l of a)s.add(r(l));return s}case y1:{const{name:s,message:l}=a;return n(new Yf[s](l),o)}case b1:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:s}=new Uint8Array(a);return n(new DataView(s),a)}}return n(new Yf[i](a),o)};return r},Kf=e=>p3(new Map,e)(0),Vo="",{toString:f3}={},{keys:m3}=Object,Vi=e=>{const t=typeof e;if(t!=="object"||!e)return[tc,t];const n=f3.call(e).slice(8,-1);switch(n){case"Array":return[ma,Vo];case"Object":return[yl,Vo];case"Date":return[mh,Vo];case"RegExp":return[gh,Vo];case"Map":return[yh,Vo];case"Set":return[bh,Vo];case"DataView":return[ma,n]}return n.includes("Array")?[ma,n]:n.includes("Error")?[y1,n]:[yl,n]},Es=([e,t])=>e===tc&&(t==="function"||t==="symbol"),g3=(e,t,n,r)=>{const o=(a,s)=>{const l=r.push(a)-1;return n.set(s,l),l},i=a=>{if(n.has(a))return n.get(a);let[s,l]=Vi(a);switch(s){case tc:{let d=a;switch(l){case"bigint":s=b1,d=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);d=null;break;case"undefined":return o([g1],a)}return o([s,d],a)}case ma:{if(l){let h=a;return l==="DataView"?h=new Uint8Array(a.buffer):l==="ArrayBuffer"&&(h=new Uint8Array(a)),o([l,[...h]],a)}const d=[],u=o([s,d],a);for(const h of a)d.push(i(h));return u}case yl:{if(l)switch(l){case"BigInt":return o([l,a.toString()],a);case"Boolean":case"Number":case"String":return o([l,a.valueOf()],a)}if(t&&"toJSON"in a)return i(a.toJSON());const d=[],u=o([s,d],a);for(const h of m3(a))(e||!Es(Vi(a[h])))&&d.push([i(h),i(a[h])]);return u}case mh:return o([s,a.toISOString()],a);case gh:{const{source:d,flags:u}=a;return o([s,{source:d,flags:u}],a)}case yh:{const d=[],u=o([s,d],a);for(const[h,p]of a)(e||!(Es(Vi(h))||Es(Vi(p))))&&d.push([i(h),i(p)]);return u}case bh:{const d=[],u=o([s,d],a);for(const h of a)(e||!Es(Vi(h)))&&d.push(i(h));return u}}const{message:c}=a;return o([s,{name:l,message:c}],a)};return i},Qf=(e,{json:t,lossy:n}={})=>{const r=[];return g3(!(t||n),!!t,new Map,r)(e),r},So=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Kf(Qf(e,t)):structuredClone(e):(e,t)=>Kf(Qf(e,t));function y3(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function b3(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function E3(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||y3,r=e.options.footnoteBackLabel||b3,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const d=e.all(c),u=String(c.identifier).toUpperCase(),h=ki(u.toLowerCase());let p=0;const g=[],b=e.footnoteCounts.get(u);for(;b!==void 0&&++p<=b;){g.length>0&&g.push({type:"text",value:" "});let C=typeof n=="string"?n:n(l,p);typeof C=="string"&&(C={type:"text",value:C}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,p),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const T=d[d.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const C=T.children[T.children.length-1];C&&C.type==="text"?C.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...g)}else d.push(...g);const E={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(d,!0)};e.patch(c,E),s.push(E)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...So(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
151
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
|
|
152
|
+
`}]}}const nc=function(e){if(e==null)return v3;if(typeof e=="function")return rc(e);if(typeof e=="object")return Array.isArray(e)?T3(e):x3(e);if(typeof e=="string")return C3(e);throw new Error("Expected function, string, or object as test")};function T3(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=nc(e[n]);return rc(r);function r(...o){let i=-1;for(;++i<t.length;)if(t[i].apply(this,o))return!0;return!1}}function x3(e){const t=e;return rc(n);function n(r){const o=r;let i;for(i in e)if(o[i]!==t[i])return!1;return!0}}function C3(e){return rc(t);function t(n){return n&&n.type===e}}function rc(e){return t;function t(n,r,o){return!!(S3(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function v3(){return!0}function S3(e){return e!==null&&typeof e=="object"&&"type"in e}const E1=[],A3=!0,bl=!1,ga="skip";function T1(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const i=nc(o),a=r?-1:1;s(e,void 0,[])();function s(l,c,d){const u=l&&typeof l=="object"?l:{};if(typeof u.type=="string"){const p=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=E1,g,b,T;if((!t||i(l,c,d[d.length-1]||void 0))&&(p=k3(n(l,d)),p[0]===bl))return p;if("children"in l&&l.children){const E=l;if(E.children&&p[0]!==ga)for(b=(r?E.children.length:-1)+a,T=d.concat(E);b>-1&&b<E.children.length;){const C=E.children[b];if(g=s(C,b,T)(),g[0]===bl)return g;b=typeof g[1]=="number"?g[1]:b+a}}return p}}}function k3(e){return Array.isArray(e)?e:typeof e=="number"?[A3,e]:e==null?E1:[e]}function mn(e,t,n,r){let o,i,a;typeof t=="function"&&typeof n!="function"?(i=void 0,a=t,o=n):(i=t,a=n,o=r),T1(e,i,s,o);function s(l,c){const d=c[c.length-1],u=d?d.children.indexOf(l):void 0;return a(l,u,d)}}const qu={}.hasOwnProperty,_3={};function D3(e,t){const n=t||_3,r=new Map,o=new Map,i=new Map,a={...h3,...n.handlers},s={all:c,applyData:w3,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:l,options:n,patch:I3,wrap:P3};return mn(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const u=d.type==="definition"?r:o,h=String(d.identifier).toUpperCase();u.has(h)||u.set(h,d)}}),s;function l(d,u){const h=d.type,p=s.handlers[h];if(qu.call(s.handlers,h)&&p)return p(s,d,u);if(s.options.passThrough&&s.options.passThrough.includes(h)){if("children"in d){const{children:g,...b}=d,T=So(b);return T.children=s.all(d),T}return So(d)}return(s.options.unknownHandler||N3)(s,d,u)}function c(d){const u=[];if("children"in d){const h=d.children;let p=-1;for(;++p<h.length;){const g=s.one(h[p],d);if(g){if(p&&h[p-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=Xf(g.value)),!Array.isArray(g)&&g.type==="element")){const b=g.children[0];b&&b.type==="text"&&(b.value=Xf(b.value))}Array.isArray(g)?u.push(...g):u.push(g)}}}return u}}function I3(e,t){e.position&&(t.position=bw(e))}function w3(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&i&&Object.assign(n.properties,So(i)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function N3(e,t){const n=t.data||{},r="value"in t&&!(qu.call(n,"hProperties")||qu.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function P3(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
153
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
154
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
155
|
+
`}),n}function Xf(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Jf(e,t){const n=D3(e,t),r=n.one(e,void 0),o=E3(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:`
|
|
156
|
+
`},o),i}function R3(e,t){return e&&"run"in e?async function(n,r){const o=Jf(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Jf(n,{file:r,...e||t})}}function Zf(e){if(e)throw e}var qc,em;function L3(){if(em)return qc;em=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(l){return typeof Array.isArray=="function"?Array.isArray(l):t.call(l)==="[object Array]"},i=function(l){if(!l||t.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 u;for(u in l);return typeof u>"u"||e.call(l,u)},a=function(l,c){n&&c.name==="__proto__"?n(l,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):l[c.name]=c.newValue},s=function(l,c){if(c==="__proto__")if(e.call(l,c)){if(r)return r(l,c).value}else return;return l[c]};return qc=function l(){var c,d,u,h,p,g,b=arguments[0],T=1,E=arguments.length,C=!1;for(typeof b=="boolean"&&(C=b,b=arguments[1]||{},T=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});T<E;++T)if(c=arguments[T],c!=null)for(d in c)u=s(b,d),h=s(c,d),b!==h&&(C&&h&&(i(h)||(p=o(h)))?(p?(p=!1,g=u&&o(u)?u:[]):g=u&&i(u)?u:{},a(b,{name:d,newValue:l(C,g,h)})):typeof h<"u"&&a(b,{name:d,newValue:h}));return b},qc}var O3=L3();const Wc=Nl(O3);function Wu(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function M3(){const e=[],t={run:n,use:r};return t;function n(...o){let i=-1;const a=o.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...o);function s(l,...c){const d=e[++i];let u=-1;if(l){a(l);return}for(;++u<o.length;)(c[u]===null||c[u]===void 0)&&(c[u]=o[u]);o=c,d?F3(d,s)(...c):a(null,...c)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function F3(e,t){let n;return r;function r(...a){const s=e.length>a.length;let l;s&&a.push(o);try{l=e.apply(this,a)}catch(c){const d=c;if(s&&n)throw d;return o(d)}s||(l&&l.then&&typeof l.then=="function"?l.then(i,o):l instanceof Error?o(l):i(l))}function o(a,...s){n||(n=!0,t(a,...s))}function i(a){o(null,a)}}const sr={basename:B3,dirname:j3,extname:H3,join:U3,sep:"/"};function B3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');es(e);let n=0,r=-1,o=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else r<0&&(i=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else a<0&&(i=!0,a=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(r=o):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function j3(e){if(es(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function H3(e){es(e);let t=e.length,n=-1,r=0,o=-1,i=0,a;for(;t--;){const s=e.codePointAt(t);if(s===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),s===46?o<0?o=t:i!==1&&(i=1):o>-1&&(i=-1)}return o<0||n<0||i===0||i===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function U3(...e){let t=-1,n;for(;++t<e.length;)es(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":z3(n)}function z3(e){es(e);const t=e.codePointAt(0)===47;let n=$3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function $3(e,t){let n="",r=0,o=-1,i=0,a=-1,s,l;for(;++a<=e.length;){if(a<e.length)s=e.codePointAt(a);else{if(s===47)break;s=47}if(s===47){if(!(o===a-1||i===1))if(o!==a-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),o=a,i=0;continue}}else if(n.length>0){n="",r=0,o=a,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),r=a-o-1;o=a,i=0}else s===46&&i>-1?i++:i=-1}return n}function es(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const G3={cwd:q3};function q3(){return"/"}function Vu(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function W3(e){if(typeof e=="string")e=new URL(e);else if(!Vu(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return V3(e)}function V3(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 t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const Vc=["history","path","basename","stem","extname","dirname"];class x1{constructor(t){let n;t?Vu(t)?n={path:t}:typeof t=="string"||Y3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":G3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Vc.length;){const i=Vc[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let o;for(o in n)Vc.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?sr.basename(this.path):void 0}set basename(t){Kc(t,"basename"),Yc(t,"basename"),this.path=sr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?sr.dirname(this.path):void 0}set dirname(t){tm(this.basename,"dirname"),this.path=sr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?sr.extname(this.path):void 0}set extname(t){if(Yc(t,"extname"),tm(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=sr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Vu(t)&&(t=W3(t)),Kc(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?sr.basename(this.path,this.extname):void 0}set stem(t){Kc(t,"stem"),Yc(t,"stem"),this.path=sr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new an(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Yc(e,t){if(e&&e.includes(sr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+sr.sep+"`")}function Kc(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function tm(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Y3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const K3=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},Q3={}.hasOwnProperty;class Eh extends K3{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=M3()}copy(){const t=new Eh;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Wc(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Jc("data",this.frozen),this.namespace[t]=n,this):Q3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Jc("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Ts(t),r=this.parser||this.Parser;return Qc("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Qc("process",this.parser||this.Parser),Xc("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(i,a){const s=Ts(t),l=r.parse(s);r.run(l,s,function(d,u,h){if(d||!u||!h)return c(d);const p=u,g=r.stringify(p,h);Z3(g)?h.value=g:h.result=g,c(d,h)});function c(d,u){d||!u?a(d):i?i(u):n(void 0,u)}}}processSync(t){let n=!1,r;return this.freeze(),Qc("processSync",this.parser||this.Parser),Xc("processSync",this.compiler||this.Compiler),this.process(t,o),rm("processSync","process",n),r;function o(i,a){n=!0,Zf(i),r=a}}run(t,n,r){nm(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(a,s){const l=Ts(n);o.run(t,l,c);function c(d,u,h){const p=u||t;d?s(d):a?a(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,o;return this.run(t,n,i),rm("runSync","run",r),o;function i(a,s){Zf(a),o=s,r=!0}}stringify(t,n){this.freeze();const r=Ts(n),o=this.compiler||this.Compiler;return Xc("stringify",o),nm(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(Jc("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[d,...u]=c;l(d,u)}else a(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function a(c){if(!("plugins"in c)&&!("settings"in c))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");s(c.plugins),c.settings&&(o.settings=Wc(!0,o.settings,c.settings))}function s(c){let d=-1;if(c!=null)if(Array.isArray(c))for(;++d<c.length;){const u=c[d];i(u)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,d){let u=-1,h=-1;for(;++u<r.length;)if(r[u][0]===c){h=u;break}if(h===-1)r.push([c,...d]);else if(d.length>0){let[p,...g]=d;const b=r[h][1];Wu(b)&&Wu(p)&&(p=Wc(!0,b,p)),r[h]=[c,p,...g]}}}}const X3=new Eh().freeze();function Qc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Xc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Jc(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function nm(e){if(!Wu(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function rm(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ts(e){return J3(e)?e:new x1(e)}function J3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Z3(e){return typeof e=="string"||eP(e)}function eP(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const tP="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",om=[],im={allowDangerousHtml:!0},nP=/^(https?|ircs?|mailto|xmpp)$/i,rP=[{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:"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 oP(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,i=e.components,a=e.disallowedElements,s=e.rehypePlugins||om,l=e.remarkPlugins||om,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...im}:im,d=e.skipHtml,u=e.unwrapDisallowed,h=e.urlTransform||iP,p=X3().use(H5).use(l).use(R3,c).use(s),g=new x1;typeof r=="string"&&(g.value=r);for(const C of rP)Object.hasOwn(e,C.from)&&""+C.from+(C.to?"use `"+C.to+"` instead":"remove it")+tP+C.id;const b=p.parse(g);let T=p.runSync(b,g);return o&&(T={type:"element",tagName:"div",properties:{className:o},children:T.type==="root"?T.children:[T]}),mn(T,E),vw(T,{Fragment:f.Fragment,components:i,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0});function E(C,x,k){if(C.type==="raw"&&k&&typeof x=="number")return d?k.children.splice(x,1):k.children[x]={type:"text",value:C.value},x;if(C.type==="element"){let w;for(w in zc)if(Object.hasOwn(zc,w)&&Object.hasOwn(C.properties,w)){const S=C.properties[w],B=zc[w];(B===null||B.includes(C.tagName))&&(C.properties[w]=h(String(S||""),w,C))}}if(C.type==="element"){let w=t?!t.includes(C.tagName):a?a.includes(C.tagName):!1;if(!w&&n&&typeof x=="number"&&(w=!n(C,x,k)),w&&k&&typeof x=="number")return u&&C.children?k.children.splice(x,1,...C.children):k.children.splice(x,1),x}}}function iP(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||nP.test(e.slice(0,t))?e:""}function aP(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function sP(e,t,n){const r=nc((n||{}).ignore||[]),o=lP(t);let i=-1;for(;++i<o.length;)T1(e,"text",a);function a(l,c){let d=-1,u;for(;++d<c.length;){const h=c[d],p=u?u.children:void 0;if(r(h,p?p.indexOf(h):void 0,u))return;u=h}if(u)return s(l,c)}function s(l,c){const d=c[c.length-1],u=o[i][0],h=o[i][1];let p=0;const g=d.children.indexOf(l);let b=!1,T=[];u.lastIndex=0;let E=u.exec(l.value);for(;E;){const C=E.index,x={index:E.index,input:E.input,stack:[...c,l]};let k=h(...E,x);if(typeof k=="string"&&(k=k.length>0?{type:"text",value:k}:void 0),k===!1?u.lastIndex=C+1:(p!==C&&T.push({type:"text",value:l.value.slice(p,C)}),Array.isArray(k)?T.push(...k):k&&T.push(k),p=C+E[0].length,b=!0),!u.global)break;E=u.exec(l.value)}return b?(p<l.value.length&&T.push({type:"text",value:l.value.slice(p)}),d.children.splice(g,1,...T)):T=[l],g+T.length}}function lP(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([cP(o[0]),uP(o[1])])}return t}function cP(e){return typeof e=="string"?new RegExp(aP(e),"g"):e}function uP(e){return typeof e=="function"?e:function(){return e}}const Zc="phrasing",eu=["autolink","link","image","label"];function dP(){return{transforms:[bP],enter:{literalAutolink:pP,literalAutolinkEmail:tu,literalAutolinkHttp:tu,literalAutolinkWww:tu},exit:{literalAutolink:yP,literalAutolinkEmail:gP,literalAutolinkHttp:fP,literalAutolinkWww:mP}}}function hP(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Zc,notInConstruct:eu},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Zc,notInConstruct:eu},{character:":",before:"[ps]",after:"\\/",inConstruct:Zc,notInConstruct:eu}]}}function pP(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function tu(e){this.config.enter.autolinkProtocol.call(this,e)}function fP(e){this.config.exit.autolinkProtocol.call(this,e)}function mP(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function gP(e){this.config.exit.autolinkEmail.call(this,e)}function yP(e){this.exit(e)}function bP(e){sP(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,EP],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,TP]],{ignore:["link","linkReference"]})}function EP(e,t,n,r,o){let i="";if(!C1(o)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!xP(n)))return!1;const a=CP(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function TP(e,t,n,r){return!C1(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function xP(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function CP(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=al(e,"(");let i=al(e,")");for(;r!==-1&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}function C1(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||vo(n)||Zl(n))&&(!t||n!==47)}v1.peek=NP;function vP(){this.buffer()}function SP(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function AP(){this.buffer()}function kP(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function _P(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Xn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function DP(e){this.exit(e)}function IP(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Xn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function wP(e){this.exit(e)}function NP(){return"["}function v1(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{after:"]",before:i})),s(),a(),i+=o.move("]"),i}function PP(){return{enter:{gfmFootnoteCallString:vP,gfmFootnoteCall:SP,gfmFootnoteDefinitionLabelString:AP,gfmFootnoteDefinition:kP},exit:{gfmFootnoteCallString:_P,gfmFootnoteCall:DP,gfmFootnoteDefinitionLabelString:IP,gfmFootnoteDefinition:wP}}}function RP(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:v1},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,i,a){const s=i.createTracker(a);let l=s.move("[^");const c=i.enter("footnoteDefinition"),d=i.enter("label");return l+=s.move(i.safe(i.associationId(r),{before:l,after:"]"})),d(),l+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),l+=s.move((t?`
|
|
157
|
+
`:" ")+i.indentLines(i.containerFlow(r,s.current()),t?S1:LP))),c(),l}}function LP(e,t,n){return t===0?e:S1(e,t,n)}function S1(e,t,n){return(n?"":" ")+e}const OP=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];A1.peek=HP;function MP(){return{canContainEols:["delete"],enter:{strikethrough:BP},exit:{strikethrough:jP}}}function FP(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:OP}],handlers:{delete:A1}}}function BP(e){this.enter({type:"delete",children:[]},e)}function jP(e){this.exit(e)}function A1(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),a+=o.move("~~"),i(),a}function HP(){return"~"}function UP(e){return e.length}function zP(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||UP,i=[],a=[],s=[],l=[];let c=0,d=-1;for(;++d<e.length;){const b=[],T=[];let E=-1;for(e[d].length>c&&(c=e[d].length);++E<e[d].length;){const C=$P(e[d][E]);if(n.alignDelimiters!==!1){const x=o(C);T[E]=x,(l[E]===void 0||x>l[E])&&(l[E]=x)}b.push(C)}a[d]=b,s[d]=T}let u=-1;if(typeof r=="object"&&"length"in r)for(;++u<c;)i[u]=am(r[u]);else{const b=am(r);for(;++u<c;)i[u]=b}u=-1;const h=[],p=[];for(;++u<c;){const b=i[u];let T="",E="";b===99?(T=":",E=":"):b===108?T=":":b===114&&(E=":");let C=n.alignDelimiters===!1?1:Math.max(1,l[u]-T.length-E.length);const x=T+"-".repeat(C)+E;n.alignDelimiters!==!1&&(C=T.length+C+E.length,C>l[u]&&(l[u]=C),p[u]=C),h[u]=x}a.splice(1,0,h),s.splice(1,0,p),d=-1;const g=[];for(;++d<a.length;){const b=a[d],T=s[d];u=-1;const E=[];for(;++u<c;){const C=b[u]||"";let x="",k="";if(n.alignDelimiters!==!1){const w=l[u]-(T[u]||0),S=i[u];S===114?x=" ".repeat(w):S===99?w%2?(x=" ".repeat(w/2+.5),k=" ".repeat(w/2-.5)):(x=" ".repeat(w/2),k=x):k=" ".repeat(w)}n.delimiterStart!==!1&&!u&&E.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&C==="")&&(n.delimiterStart!==!1||u)&&E.push(" "),n.alignDelimiters!==!1&&E.push(x),E.push(C),n.alignDelimiters!==!1&&E.push(k),n.padding!==!1&&E.push(" "),(n.delimiterEnd!==!1||u!==c-1)&&E.push("|")}g.push(n.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return g.join(`
|
|
158
|
+
`)}function $P(e){return e==null?"":String(e)}function am(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function GP(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const a=n.indentLines(n.containerFlow(e,i.current()),qP);return o(),a}function qP(e,t,n){return">"+(n?"":" ")+e}function WP(e,t){return sm(e,t.inConstruct,!0)&&!sm(e,t.notInConstruct,!1)}function sm(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function lm(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
|
|
159
|
+
`&&WP(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
160
|
+
`}function VP(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++i>a&&(a=i):i=1,o=r+t.length,r=n.indexOf(t,o);return a}function YP(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function KP(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function QP(e,t,n,r){const o=KP(n),i=e.value||"",a=o==="`"?"GraveAccent":"Tilde";if(YP(e,n)){const u=n.enter("codeIndented"),h=n.indentLines(i,XP);return u(),h}const s=n.createTracker(r),l=o.repeat(Math.max(VP(i,o)+1,3)),c=n.enter("codeFenced");let d=s.move(l);if(e.lang){const u=n.enter(`codeFencedLang${a}`);d+=s.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...s.current()})),u()}if(e.lang&&e.meta){const u=n.enter(`codeFencedMeta${a}`);d+=s.move(" "),d+=s.move(n.safe(e.meta,{before:d,after:`
|
|
161
|
+
`,encode:["`"],...s.current()})),u()}return d+=s.move(`
|
|
162
|
+
`),i&&(d+=s.move(i+`
|
|
163
|
+
`)),d+=s.move(l),c(),d}function XP(e,t,n){return(n?"":" ")+e}function Th(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function JP(e,t,n,r){const o=Th(n),i=o==='"'?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":`
|
|
164
|
+
`,...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),a(),c}function ZP(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Fa(e){return"&#x"+e.toString(16).toUpperCase()+";"}function El(e,t,n){const r=gi(e),o=gi(t);return r===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}k1.peek=eR;function k1(e,t,n,r){const o=ZP(n),i=n.enter("emphasis"),a=n.createTracker(r),s=a.move(o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const c=l.charCodeAt(0),d=El(r.before.charCodeAt(r.before.length-1),c,o);d.inside&&(l=Fa(c)+l.slice(1));const u=l.charCodeAt(l.length-1),h=El(r.after.charCodeAt(0),u,o);h.inside&&(l=l.slice(0,-1)+Fa(u));const p=a.move(o);return i(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},s+l+p}function eR(e,t,n){return n.options.emphasis||"*"}function tR(e,t){let n=!1;return mn(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,bl}),!!((!e.depth||e.depth<3)&&hh(e)&&(t.options.setext||n))}function nR(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(tR(e,n)){const d=n.enter("headingSetext"),u=n.enter("phrasing"),h=n.containerPhrasing(e,{...i.current(),before:`
|
|
165
|
+
`,after:`
|
|
166
|
+
`});return u(),d(),h+`
|
|
167
|
+
`+(o===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
|
|
168
|
+
`))+1))}const a="#".repeat(o),s=n.enter("headingAtx"),l=n.enter("phrasing");i.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
|
|
169
|
+
`,...i.current()});return/^[\t ]/.test(c)&&(c=Fa(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),s(),c}_1.peek=rR;function _1(e){return e.value||""}function rR(){return"<"}D1.peek=oR;function D1(e,t,n,r){const o=Th(n),i=o==='"'?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),c+=l.move(")"),a(),c}function oR(){return"!"}I1.peek=iR;function I1(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const d=n.stack;n.stack=[],a=n.enter("reference");const u=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=d,i(),o==="full"||!c||c!==u?l+=s.move(u+"]"):o==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function iR(){return"!"}w1.peek=aR;function w1(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const a=n.unsafe[i],s=n.compilePattern(a);let l;if(a.atBreak)for(;l=s.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return o+r+o}function aR(){return"`"}function N1(e,t){const n=hh(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}P1.peek=sR;function P1(e,t,n,r){const o=Th(n),i=o==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(N1(e,n)){const d=n.stack;n.stack=[],s=n.enter("autolink");let u=a.move("<");return u+=a.move(n.containerPhrasing(e,{before:u,after:">",...a.current()})),u+=a.move(">"),s(),n.stack=d,u}s=n.enter("link"),l=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${i}`),c+=a.move(" "+o),c+=a.move(n.safe(e.title,{before:c,after:o,...a.current()})),c+=a.move(o),l()),c+=a.move(")"),s(),c}function sR(e,t,n){return N1(e,n)?"<":"["}R1.peek=lR;function R1(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const d=n.stack;n.stack=[],a=n.enter("reference");const u=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=d,i(),o==="full"||!c||c!==u?l+=s.move(u+"]"):o==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function lR(){return"["}function xh(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function cR(e){const t=xh(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function uR(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function L1(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function dR(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let a=e.ordered?uR(n):xh(n);const s=e.ordered?a==="."?")":".":cR(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&d&&(!d.children||!d.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),L1(n)===a&&d){let u=-1;for(;++u<e.children.length;){const h=e.children[u];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=i,o(),c}function hR(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function pR(e,t,n,r){const o=hR(n);let i=n.bulletCurrent||xh(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let a=i.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const s=n.createTracker(r);s.move(i+" ".repeat(a-i.length)),s.shift(a);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),d);return l(),c;function d(u,h,p){return h?(p?"":" ".repeat(a))+u:(p?i:i+" ".repeat(a-i.length))+u}}function fR(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),o(),a}const mR=nc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function gR(e,t,n,r){return(e.children.some(function(o){return mR(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function yR(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}O1.peek=bR;function O1(e,t,n,r){const o=yR(n),i=n.enter("strong"),a=n.createTracker(r),s=a.move(o+o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const c=l.charCodeAt(0),d=El(r.before.charCodeAt(r.before.length-1),c,o);d.inside&&(l=Fa(c)+l.slice(1));const u=l.charCodeAt(l.length-1),h=El(r.after.charCodeAt(0),u,o);h.inside&&(l=l.slice(0,-1)+Fa(u));const p=a.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},s+l+p}function bR(e,t,n){return n.options.strong||"*"}function ER(e,t,n,r){return n.safe(e.value,r)}function TR(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function xR(e,t,n){const r=(L1(n)+(n.options.ruleSpaces?" ":"")).repeat(TR(n));return n.options.ruleSpaces?r.slice(0,-1):r}const M1={blockquote:GP,break:lm,code:QP,definition:JP,emphasis:k1,hardBreak:lm,heading:nR,html:_1,image:D1,imageReference:I1,inlineCode:w1,link:P1,linkReference:R1,list:dR,listItem:pR,paragraph:fR,root:gR,strong:O1,text:ER,thematicBreak:xR};function CR(){return{enter:{table:vR,tableData:cm,tableHeader:cm,tableRow:AR},exit:{codeText:kR,table:SR,tableData:nu,tableHeader:nu,tableRow:nu}}}function vR(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function SR(e){this.exit(e),this.data.inTable=void 0}function AR(e){this.enter({type:"tableRow",children:[]},e)}function nu(e){this.exit(e)}function cm(e){this.enter({type:"tableCell",children:[]},e)}function kR(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,_R));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function _R(e,t){return t==="|"?t:e}function DR(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
170
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:a,tableCell:l,tableRow:s}};function a(p,g,b,T){return c(d(p,b,T),p.align)}function s(p,g,b,T){const E=u(p,b,T),C=c([E]);return C.slice(0,C.indexOf(`
|
|
171
|
+
`))}function l(p,g,b,T){const E=b.enter("tableCell"),C=b.enter("phrasing"),x=b.containerPhrasing(p,{...T,before:i,after:i});return C(),E(),x}function c(p,g){return zP(p,{align:g,alignDelimiters:r,padding:n,stringLength:o})}function d(p,g,b){const T=p.children;let E=-1;const C=[],x=g.enter("table");for(;++E<T.length;)C[E]=u(T[E],g,b);return x(),C}function u(p,g,b){const T=p.children;let E=-1;const C=[],x=g.enter("tableRow");for(;++E<T.length;)C[E]=l(T[E],p,g,b);return x(),C}function h(p,g,b){let T=M1.inlineCode(p,g,b);return b.stack.includes("tableCell")&&(T=T.replace(/\|/g,"\\$&")),T}}function IR(){return{exit:{taskListCheckValueChecked:um,taskListCheckValueUnchecked:um,paragraph:NR}}}function wR(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:PR}}}function um(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function NR(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let i=-1,a;for(;++i<o.length;){const s=o[i];if(s.type==="paragraph"){a=s;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function PR(e,t,n,r){const o=e.children[0],i=typeof e.checked=="boolean"&&o&&o.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(a);let l=M1.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(d){return d+a}}function RR(){return[dP(),PP(),MP(),CR(),IR()]}function LR(e){return{extensions:[hP(),RP(e),FP(),DR(e),wR()]}}const OR={tokenize:UR,partial:!0},F1={tokenize:zR,partial:!0},B1={tokenize:$R,partial:!0},j1={tokenize:GR,partial:!0},MR={tokenize:qR,partial:!0},H1={name:"wwwAutolink",tokenize:jR,previous:z1},U1={name:"protocolAutolink",tokenize:HR,previous:$1},Or={name:"emailAutolink",tokenize:BR,previous:G1},pr={};function FR(){return{text:pr}}let io=48;for(;io<123;)pr[io]=Or,io++,io===58?io=65:io===91&&(io=97);pr[43]=Or;pr[45]=Or;pr[46]=Or;pr[95]=Or;pr[72]=[Or,U1];pr[104]=[Or,U1];pr[87]=[Or,H1];pr[119]=[Or,H1];function BR(e,t,n){const r=this;let o,i;return a;function a(u){return!Yu(u)||!G1.call(r,r.previous)||Ch(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(u))}function s(u){return Yu(u)?(e.consume(u),s):u===64?(e.consume(u),l):n(u)}function l(u){return u===46?e.check(MR,d,c)(u):u===45||u===95||rn(u)?(i=!0,e.consume(u),l):d(u)}function c(u){return e.consume(u),o=!0,l}function d(u){return i&&o&&un(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(u)):n(u)}}function jR(e,t,n){const r=this;return o;function o(a){return a!==87&&a!==119||!z1.call(r,r.previous)||Ch(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(OR,e.attempt(F1,e.attempt(B1,i),n),n)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function HR(e,t,n){const r=this;let o="",i=!1;return a;function a(u){return(u===72||u===104)&&$1.call(r,r.previous)&&!Ch(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(u),e.consume(u),s):n(u)}function s(u){if(un(u)&&o.length<5)return o+=String.fromCodePoint(u),e.consume(u),s;if(u===58){const h=o.toLowerCase();if(h==="http"||h==="https")return e.consume(u),l}return n(u)}function l(u){return u===47?(e.consume(u),i?c:(i=!0,l)):n(u)}function c(u){return u===null||gl(u)||it(u)||vo(u)||Zl(u)?n(u):e.attempt(F1,e.attempt(B1,d),n)(u)}function d(u){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(u)}}function UR(e,t,n){let r=0;return o;function o(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),o):a===46&&r===3?(e.consume(a),i):n(a)}function i(a){return a===null?n(a):t(a)}}function zR(e,t,n){let r,o,i;return a;function a(c){return c===46||c===95?e.check(j1,l,s)(c):c===null||it(c)||vo(c)||c!==45&&Zl(c)?l(c):(i=!0,e.consume(c),a)}function s(c){return c===95?r=!0:(o=r,r=void 0),e.consume(c),a}function l(c){return o||r||!i?n(c):t(c)}}function $R(e,t){let n=0,r=0;return o;function o(a){return a===40?(n++,e.consume(a),o):a===41&&r<n?i(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(j1,t,i)(a):a===null||it(a)||vo(a)?t(a):(e.consume(a),o)}function i(a){return a===41&&r++,e.consume(a),o}}function GR(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),i):s===93?(e.consume(s),o):s===60||s===null||it(s)||vo(s)?t(s):n(s)}function o(s){return s===null||s===40||s===91||it(s)||vo(s)?t(s):r(s)}function i(s){return un(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):un(s)?(e.consume(s),a):n(s)}}function qR(e,t,n){return r;function r(i){return e.consume(i),o}function o(i){return rn(i)?n(i):t(i)}}function z1(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||it(e)}function $1(e){return!un(e)}function G1(e){return!(e===47||Yu(e))}function Yu(e){return e===43||e===45||e===46||e===95||rn(e)}function Ch(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const WR={tokenize:e4,partial:!0};function VR(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:XR,continuation:{tokenize:JR},exit:ZR}},text:{91:{name:"gfmFootnoteCall",tokenize:QR},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:YR,resolveTo:KR}}}}function YR(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const l=r.events[o][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!a||!a._balanced)return n(l);const c=Xn(r.sliceSerialize({start:a.end,end:r.now()}));return c.codePointAt(0)!==94||!i.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function KR(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function QR(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,a;return s;function s(u){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),l}function l(u){return u!==94?n(u):(e.enter("gfmFootnoteCallMarker"),e.consume(u),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(u){if(i>999||u===93&&!a||u===null||u===91||it(u))return n(u);if(u===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return o.includes(Xn(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(u)}return it(u)||(a=!0),i++,e.consume(u),u===92?d:c}function d(u){return u===91||u===92||u===93?(e.consume(u),i++,c):c(u)}}function XR(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0,s;return l;function l(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(g)}function d(g){if(a>999||g===93&&!s||g===null||g===91||it(g))return n(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return i=Xn(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return it(g)||(s=!0),a++,e.consume(g),g===92?u:d}function u(g){return g===91||g===92||g===93?(e.consume(g),a++,d):d(g)}function h(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),o.includes(i)||o.push(i),qe(e,p,"gfmFootnoteDefinitionWhitespace")):n(g)}function p(g){return t(g)}}function JR(e,t,n){return e.check(Za,t,e.attempt(WR,t,n))}function ZR(e){e.exit("gfmFootnoteDefinition")}function e4(e,t,n){const r=this;return qe(e,o,"gfmFootnoteDefinitionIndent",5);function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(i):n(i)}}function t4(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:o,resolveAll:r};return t==null&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(i,a){let s=-1;for(;++s<i.length;)if(i[s][0]==="enter"&&i[s][1].type==="strikethroughSequenceTemporary"&&i[s][1]._close){let l=s;for(;l--;)if(i[l][0]==="exit"&&i[l][1].type==="strikethroughSequenceTemporary"&&i[l][1]._open&&i[s][1].end.offset-i[s][1].start.offset===i[l][1].end.offset-i[l][1].start.offset){i[s][1].type="strikethroughSequence",i[l][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},i[l][1].start),end:Object.assign({},i[s][1].end)},d={type:"strikethroughText",start:Object.assign({},i[l][1].end),end:Object.assign({},i[s][1].start)},u=[["enter",c,a],["enter",i[l][1],a],["exit",i[l][1],a],["enter",d,a]],h=a.parser.constructs.insideSpan.null;h&&kn(u,u.length,0,ec(h,i.slice(l+1,s),a)),kn(u,u.length,0,[["exit",d,a],["enter",i[s][1],a],["exit",i[s][1],a],["exit",c,a]]),kn(i,l-1,s-l+3,u),s=l+u.length-2;break}}for(s=-1;++s<i.length;)i[s][1].type==="strikethroughSequenceTemporary"&&(i[s][1].type="data");return i}function o(i,a,s){const l=this.previous,c=this.events;let d=0;return u;function u(p){return l===126&&c[c.length-1][1].type!=="characterEscape"?s(p):(i.enter("strikethroughSequenceTemporary"),h(p))}function h(p){const g=gi(l);if(p===126)return d>1?s(p):(i.consume(p),d++,h);if(d<2&&!t)return s(p);const b=i.exit("strikethroughSequenceTemporary"),T=gi(p);return b._open=!T||T===2&&!!g,b._close=!g||g===2&&!!T,a(p)}}}class n4{constructor(){this.map=[]}add(t,n,r){r4(this,t,n,r)}consume(t){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const i of o)t.push(i);o=r.pop()}this.map.length=0}}function r4(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function o4(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function i4(){return{flow:{null:{name:"table",tokenize:a4,resolveAll:s4}}}}function a4(e,t,n){const r=this;let o=0,i=0,a;return s;function s(y){let R=r.events.length-1;for(;R>-1;){const z=r.events[R][1].type;if(z==="lineEnding"||z==="linePrefix")R--;else break}const F=R>-1?r.events[R][1].type:null,M=F==="tableHead"||F==="tableRow"?S:l;return M===S&&r.parser.lazy[r.now().line]?n(y):M(y)}function l(y){return e.enter("tableHead"),e.enter("tableRow"),c(y)}function c(y){return y===124||(a=!0,i+=1),d(y)}function d(y){return y===null?n(y):De(y)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):n(y):ze(y)?qe(e,d,"whitespace")(y):(i+=1,a&&(a=!1,o+=1),y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),a=!0,d):(e.enter("data"),u(y)))}function u(y){return y===null||y===124||it(y)?(e.exit("data"),d(y)):(e.consume(y),y===92?h:u)}function h(y){return y===92||y===124?(e.consume(y),u):u(y)}function p(y){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(y):(e.enter("tableDelimiterRow"),a=!1,ze(y)?qe(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):g(y))}function g(y){return y===45||y===58?T(y):y===124?(a=!0,e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),b):w(y)}function b(y){return ze(y)?qe(e,T,"whitespace")(y):T(y)}function T(y){return y===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),E):y===45?(i+=1,E(y)):y===null||De(y)?k(y):w(y)}function E(y){return y===45?(e.enter("tableDelimiterFiller"),C(y)):w(y)}function C(y){return y===45?(e.consume(y),C):y===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),x):(e.exit("tableDelimiterFiller"),x(y))}function x(y){return ze(y)?qe(e,k,"whitespace")(y):k(y)}function k(y){return y===124?g(y):y===null||De(y)?!a||o!==i?w(y):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(y)):w(y)}function w(y){return n(y)}function S(y){return e.enter("tableRow"),B(y)}function B(y){return y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),B):y===null||De(y)?(e.exit("tableRow"),t(y)):ze(y)?qe(e,B,"whitespace")(y):(e.enter("data"),W(y))}function W(y){return y===null||y===124||it(y)?(e.exit("data"),B(y)):(e.consume(y),y===92?U:W)}function U(y){return y===92||y===124?(e.consume(y),W):W(y)}}function s4(e,t){let n=-1,r=!0,o=0,i=[0,0,0,0],a=[0,0,0,0],s=!1,l=0,c,d,u;const h=new n4;for(;++n<e.length;){const p=e[n],g=p[1];p[0]==="enter"?g.type==="tableHead"?(s=!1,l!==0&&(dm(h,t,l,c,d),d=void 0,l=0),c={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(n,0,[["enter",c,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,u=void 0,i=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,d={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(n,0,[["enter",d,t]])),o=g.type==="tableDelimiterRow"?2:d?3:1):o&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(i[1]!==0&&(a[0]=a[1],u=xs(h,t,i,o,void 0,u),i=[0,0,0,0]),a[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(a[0]=a[1],u=xs(h,t,i,o,void 0,u)),i=a,a=[i[1],n,0,0])):g.type==="tableHead"?(s=!0,l=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(l=n,i[1]!==0?(a[0]=a[1],u=xs(h,t,i,o,n,u)):a[1]!==0&&(u=xs(h,t,a,o,n,u)),o=0):o&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&dm(h,t,l,c,d),h.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=o4(t.events,n))}return e}function xs(e,t,n,r,o,i){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(i.end=Object.assign({},ni(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const l=ni(t.events,n[1]);if(i={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const c=ni(t.events,n[2]),d=ni(t.events,n[3]),u={type:s,start:Object.assign({},c),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",u,t]]),r!==2){const h=t.events[n[2]],p=t.events[n[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,b=n[3]-n[2]-1;e.add(g,b,[])}}e.add(n[3]+1,0,[["exit",u,t]])}return o!==void 0&&(i.end=Object.assign({},ni(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function dm(e,t,n,r,o){const i=[],a=ni(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function ni(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const l4={name:"tasklistCheck",tokenize:u4};function c4(){return{text:{91:l4}}}function u4(e,t,n){const r=this;return o;function o(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),i)}function i(l){return it(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return De(l)?t(l):ze(l)?e.check({tokenize:d4},t,n)(l):n(l)}}function d4(e,t,n){return qe(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function h4(e){return t1([FR(),VR(),t4(e),i4(),c4()])}const p4={};function f4(e){const t=this,n=e||p4,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(h4(n)),i.push(RR()),a.push(LR(n))}const hm=/[#.]/g;function m4(e,t){const n=e||"",r={};let o=0,i,a;for(;o<n.length;){hm.lastIndex=o;const s=hm.exec(n),l=n.slice(o,s?s.index:n.length);l&&(i?i==="#"?r.id=l:Array.isArray(r.className)?r.className.push(l):r.className=[l]:a=l,o+=l.length),s&&(i=s[0],o++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}function q1(e,t,n){const r=n?E4(n):void 0;function o(i,a,...s){let l;if(i==null){l={type:"root",children:[]};const c=a;s.unshift(c)}else{l=m4(i,t);const c=l.tagName.toLowerCase(),d=r?r.get(c):void 0;if(l.tagName=d||c,g4(a))s.unshift(a);else for(const[u,h]of Object.entries(a))y4(e,l.properties,u,h)}for(const c of s)Ku(l.children,c);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return o}function g4(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const o=t[r];if(o&&typeof o=="object"){if(!Array.isArray(o))return!0;const i=o;for(const a of i)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function y4(e,t,n,r){const o=Qa(e,n);let i;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;i=r}else typeof r=="boolean"?i=r:typeof r=="string"?o.spaceSeparated?i=Mu(r):o.commaSeparated?i=Ou(r):o.commaOrSpaceSeparated?i=Mu(Ou(r).join(" ")):i=pm(o,o.property,r):Array.isArray(r)?i=[...r]:i=o.property==="style"?b4(r):String(r);if(Array.isArray(i)){const a=[];for(const s of i)a.push(pm(o,o.property,s));i=a}o.property==="className"&&Array.isArray(t.className)&&(i=t.className.concat(i)),t[o.property]=i}}function Ku(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Ku(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Ku(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function pm(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Na(n)===Na(t)))return!0}return n}function b4(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function E4(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const T4=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],x4=q1(vi,"div"),C4=q1(Rr,"g",T4);function v4(e){const t=String(e),n=[];return{toOffset:o,toPoint:r};function r(i){if(typeof i=="number"&&i>-1&&i<=t.length){let a=0;for(;;){let s=n[a];if(s===void 0){const l=fm(t,n[a-1]);s=l===-1?t.length+1:l+1,n[a]=s}if(s>i)return{line:a+1,column:i-(a>0?n[a-1]:0)+1,offset:i};a++}}}function o(i){if(i&&typeof i.line=="number"&&typeof i.column=="number"&&!Number.isNaN(i.line)&&!Number.isNaN(i.column)){for(;n.length<i.line;){const s=n[n.length-1],l=fm(t,s),c=l===-1?t.length+1:l+1;if(s===c)break;n.push(c)}const a=(i.line>1?n[i.line-2]:0)+i.column-1;if(a<n[i.line-1])return a}}}function fm(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
172
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const mo={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},W1={}.hasOwnProperty,S4=Object.prototype;function A4(e,t){const n=t||{};return vh({file:n.file||void 0,location:!1,schema:n.space==="svg"?Rr:vi,verbose:n.verbose||!1},e)}function vh(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},js(e,r,n),n}case"#document":case"#document-fragment":{const r=t,o="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:V1(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const i=String(e.file),a=v4(i),s=a.toPoint(0),l=a.toPoint(i.length);n.position={start:s,end:l}}return n}case"#documentType":{const r=t;return n={type:"doctype"},js(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},js(e,r,n),n}default:return n=k4(e,t),n}}function V1(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=vh(e,t[n]);r.push(o)}return r}function k4(e,t){const n=e.schema;e.schema=t.namespaceURI===mo.svg?Rr:vi;let r=-1;const o={};for(;++r<t.attrs.length;){const a=t.attrs[r],s=(a.prefix?a.prefix+":":"")+a.name;W1.call(S4,s)||(o[s]=a.value)}const i=(e.schema.space==="svg"?C4:x4)(t.tagName,o,V1(e,t.childNodes));if(js(e,t,i),i.tagName==="template"){const a=t,s=a.sourceCodeLocation,l=s&&s.startTag&&oi(s.startTag),c=s&&s.endTag&&oi(s.endTag),d=vh(e,a.content);l&&c&&e.file&&(d.position={start:l.end,end:c.start}),i.content=d}return e.schema=n,i}function js(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=_4(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function _4(e,t,n){const r=oi(n);if(t.type==="element"){const o=t.children[t.children.length-1];if(r&&!n.endTag&&o&&o.position&&o.position.end&&(r.end=Object.assign({},o.position.end)),e.verbose){const i={};let a;if(n.attrs)for(a in n.attrs)W1.call(n.attrs,a)&&(i[Qa(e.schema,a).property]=oi(n.attrs[a]));n.startTag;const s=oi(n.startTag),l=n.endTag?oi(n.endTag):void 0,c={opening:s};l&&(c.closing=l),c.properties=i,t.data={position:c}}}return r}function oi(e){const t=mm({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=mm({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function mm(e){return e.line&&e.column?e:void 0}class ts{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}ts.prototype.property={};ts.prototype.normal={};ts.prototype.space=null;function Y1(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new ts(n,r,t)}function Qu(e){return e.toLowerCase()}class Vn{constructor(t,n){this.property=t,this.attribute=n}}Vn.prototype.space=null;Vn.prototype.boolean=!1;Vn.prototype.booleanish=!1;Vn.prototype.overloadedBoolean=!1;Vn.prototype.number=!1;Vn.prototype.commaSeparated=!1;Vn.prototype.spaceSeparated=!1;Vn.prototype.commaOrSpaceSeparated=!1;Vn.prototype.mustUseProperty=!1;Vn.prototype.defined=!1;let D4=0;const Le=Lo(),Rt=Lo(),K1=Lo(),le=Lo(),lt=Lo(),ui=Lo(),Tn=Lo();function Lo(){return 2**++D4}const Xu=Object.freeze(Object.defineProperty({__proto__:null,boolean:Le,booleanish:Rt,commaOrSpaceSeparated:Tn,commaSeparated:ui,number:le,overloadedBoolean:K1,spaceSeparated:lt},Symbol.toStringTag,{value:"Module"})),ru=Object.keys(Xu);class Sh extends Vn{constructor(t,n,r,o){let i=-1;if(super(t,n),gm(this,"space",o),typeof r=="number")for(;++i<ru.length;){const a=ru[i];gm(this,ru[i],(r&Xu[a])===Xu[a])}}}Sh.prototype.defined=!0;function gm(e,t,n){n&&(e[t]=n)}const I4={}.hasOwnProperty;function _i(e){const t={},n={};let r;for(r in e.properties)if(I4.call(e.properties,r)){const o=e.properties[r],i=new Sh(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Qu(r)]=r,n[Qu(i.attribute)]=r}return new ts(t,n,e.space)}const Q1=_i({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),X1=_i({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function J1(e,t){return t in e?e[t]:t}function Z1(e,t){return J1(e,t.toLowerCase())}const eb=_i({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Z1,properties:{xmlns:null,xmlnsXLink:null}}),tb=_i({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Rt,ariaAutoComplete:null,ariaBusy:Rt,ariaChecked:Rt,ariaColCount:le,ariaColIndex:le,ariaColSpan:le,ariaControls:lt,ariaCurrent:null,ariaDescribedBy:lt,ariaDetails:null,ariaDisabled:Rt,ariaDropEffect:lt,ariaErrorMessage:null,ariaExpanded:Rt,ariaFlowTo:lt,ariaGrabbed:Rt,ariaHasPopup:null,ariaHidden:Rt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:lt,ariaLevel:le,ariaLive:null,ariaModal:Rt,ariaMultiLine:Rt,ariaMultiSelectable:Rt,ariaOrientation:null,ariaOwns:lt,ariaPlaceholder:null,ariaPosInSet:le,ariaPressed:Rt,ariaReadOnly:Rt,ariaRelevant:null,ariaRequired:Rt,ariaRoleDescription:lt,ariaRowCount:le,ariaRowIndex:le,ariaRowSpan:le,ariaSelected:Rt,ariaSetSize:le,ariaSort:null,ariaValueMax:le,ariaValueMin:le,ariaValueNow:le,ariaValueText:null,role:null}}),w4=_i({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Z1,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ui,acceptCharset:lt,accessKey:lt,action:null,allow:null,allowFullScreen:Le,allowPaymentRequest:Le,allowUserMedia:Le,alt:null,as:null,async:Le,autoCapitalize:null,autoComplete:lt,autoFocus:Le,autoPlay:Le,blocking:lt,capture:null,charSet:null,checked:Le,cite:null,className:lt,cols:le,colSpan:null,content:null,contentEditable:Rt,controls:Le,controlsList:lt,coords:le|ui,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Le,defer:Le,dir:null,dirName:null,disabled:Le,download:K1,draggable:Rt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Le,formTarget:null,headers:lt,height:le,hidden:Le,high:le,href:null,hrefLang:null,htmlFor:lt,httpEquiv:lt,id:null,imageSizes:null,imageSrcSet:null,inert:Le,inputMode:null,integrity:null,is:null,isMap:Le,itemId:null,itemProp:lt,itemRef:lt,itemScope:Le,itemType:lt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Le,low:le,manifest:null,max:null,maxLength:le,media:null,method:null,min:null,minLength:le,multiple:Le,muted:Le,name:null,nonce:null,noModule:Le,noValidate:Le,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Le,optimum:le,pattern:null,ping:lt,placeholder:null,playsInline:Le,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Le,referrerPolicy:null,rel:lt,required:Le,reversed:Le,rows:le,rowSpan:le,sandbox:lt,scope:null,scoped:Le,seamless:Le,selected:Le,shadowRootClonable:Le,shadowRootDelegatesFocus:Le,shadowRootMode:null,shape:null,size:le,sizes:null,slot:null,span:le,spellCheck:Rt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:le,step:null,style:null,tabIndex:le,target:null,title:null,translate:null,type:null,typeMustMatch:Le,useMap:null,value:Rt,width:le,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lt,axis:null,background:null,bgColor:null,border:le,borderColor:null,bottomMargin:le,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Le,declare:Le,event:null,face:null,frame:null,frameBorder:null,hSpace:le,leftMargin:le,link:null,longDesc:null,lowSrc:null,marginHeight:le,marginWidth:le,noResize:Le,noHref:Le,noShade:Le,noWrap:Le,object:null,profile:null,prompt:null,rev:null,rightMargin:le,rules:null,scheme:null,scrolling:Rt,standby:null,summary:null,text:null,topMargin:le,valueType:null,version:null,vAlign:null,vLink:null,vSpace:le,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Le,disableRemotePlayback:Le,prefix:null,property:null,results:le,security:null,unselectable:null}}),N4=_i({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:J1,properties:{about:Tn,accentHeight:le,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:le,amplitude:le,arabicForm:null,ascent:le,attributeName:null,attributeType:null,azimuth:le,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:le,by:null,calcMode:null,capHeight:le,className:lt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:le,diffuseConstant:le,direction:null,display:null,dur:null,divisor:le,dominantBaseline:null,download:Le,dx:null,dy:null,edgeMode:null,editable:null,elevation:le,enableBackground:null,end:null,event:null,exponent:le,externalResourcesRequired:null,fill:null,fillOpacity:le,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ui,g2:ui,glyphName:ui,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:le,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:le,horizOriginX:le,horizOriginY:le,id:null,ideographic:le,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:le,k:le,k1:le,k2:le,k3:le,k4:le,kernelMatrix:Tn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:le,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:le,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:le,overlineThickness:le,paintOrder:null,panose1:null,path:null,pathLength:le,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:le,pointsAtY:le,pointsAtZ:le,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Tn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Tn,rev:Tn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Tn,requiredFeatures:Tn,requiredFonts:Tn,requiredFormats:Tn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:le,specularExponent:le,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:le,strikethroughThickness:le,string:null,stroke:null,strokeDashArray:Tn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:le,strokeOpacity:le,strokeWidth:null,style:null,surfaceScale:le,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Tn,tabIndex:le,tableValues:null,target:null,targetX:le,targetY:le,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Tn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:le,underlineThickness:le,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:le,values:null,vAlphabetic:le,vMathematical:le,vectorEffect:null,vHanging:le,vIdeographic:le,version:null,vertAdvY:le,vertOriginX:le,vertOriginY:le,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:le,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),P4=/^data[-\w.:]+$/i,ym=/-[a-z]/g,R4=/[A-Z]/g;function L4(e,t){const n=Qu(t);let r=t,o=Vn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&P4.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(ym,M4);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!ym.test(i)){let a=i.replace(R4,O4);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=Sh}return new o(r,t)}function O4(e){return"-"+e.toLowerCase()}function M4(e){return e.charAt(1).toUpperCase()}const F4=Y1([X1,Q1,eb,tb,w4],"html"),nb=Y1([X1,Q1,eb,tb,N4],"svg"),B4={},j4={}.hasOwnProperty,rb=Gl("type",{handlers:{root:U4,element:W4,text:G4,comment:q4,doctype:$4}});function H4(e,t){const n=(t||B4).space;return rb(e,n==="svg"?nb:F4)}function U4(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Ah(e.children,n,t),Di(e,n),n}function z4(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Ah(e.children,n,t),Di(e,n),n}function $4(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Di(e,t),t}function G4(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Di(e,t),t}function q4(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Di(e,t),t}function W4(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=nb);const o=[];let i;if(e.properties){for(i in e.properties)if(i!=="children"&&j4.call(e.properties,i)){const l=V4(r,i,e.properties[i]);l&&o.push(l)}}const a=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:mo[a],childNodes:[],parentNode:null};return s.childNodes=Ah(e.children,s,r),Di(e,s),e.tagName==="template"&&e.content&&(s.content=z4(e.content,r)),s}function V4(e,t,n){const r=L4(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?ql(n):Wl(n));const o={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const i=o.name.indexOf(":");i<0?o.prefix="":(o.name=o.name.slice(i+1),o.prefix=r.attribute.slice(0,i)),o.namespace=mo[r.space]}return o}function Ah(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const i=rb(e[r],n);i.parentNode=t,o.push(i)}return o}function Di(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const Y4=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),yt="�";var D;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(D||(D={}));const pn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function ob(e){return e>=55296&&e<=57343}function K4(e){return e>=56320&&e<=57343}function Q4(e,t){return(e-55296)*1024+9216+t}function ib(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function ab(e){return e>=64976&&e<=65007||Y4.has(e)}var q;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(q||(q={}));const X4=65536;class J4{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=X4,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:o,offset:i}=this,a=o+n,s=i+n;return{code:t,startLine:r,endLine:r,startCol:a,endCol:a,startOffset:s,endOffset:s}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(K4(n))return this.pos++,this._addGap(),Q4(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,D.EOF;return this._err(q.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,D.EOF;const r=this.html.charCodeAt(n);return r===D.CARRIAGE_RETURN?D.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,D.EOF;let t=this.html.charCodeAt(this.pos);return t===D.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,D.LINE_FEED):t===D.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,ob(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===D.LINE_FEED||t===D.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){ib(t)?this._err(q.controlCharacterInInputStream):ab(t)&&this._err(q.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var He;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(He||(He={}));function sb(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const lb=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),Z4=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var ou;const e6=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),t6=(ou=String.fromCodePoint)!==null&&ou!==void 0?ou:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function n6(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=e6.get(e))!==null&&t!==void 0?t:e}var Yt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Yt||(Yt={}));const r6=32;var qr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(qr||(qr={}));function Ju(e){return e>=Yt.ZERO&&e<=Yt.NINE}function o6(e){return e>=Yt.UPPER_A&&e<=Yt.UPPER_F||e>=Yt.LOWER_A&&e<=Yt.LOWER_F}function i6(e){return e>=Yt.UPPER_A&&e<=Yt.UPPER_Z||e>=Yt.LOWER_A&&e<=Yt.LOWER_Z||Ju(e)}function a6(e){return e===Yt.EQUALS||i6(e)}var Wt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Wt||(Wt={}));var Ar;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ar||(Ar={}));class cb{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Wt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ar.Strict}startEntity(t){this.decodeMode=t,this.state=Wt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Wt.EntityStart:return t.charCodeAt(n)===Yt.NUM?(this.state=Wt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Wt.NamedEntity,this.stateNamedEntity(t,n));case Wt.NumericStart:return this.stateNumericStart(t,n);case Wt.NumericDecimal:return this.stateNumericDecimal(t,n);case Wt.NumericHex:return this.stateNumericHex(t,n);case Wt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|r6)===Yt.LOWER_X?(this.state=Wt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Wt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const i=r-n;this.result=this.result*Math.pow(o,i)+parseInt(t.substr(n,i),o),this.consumed+=i}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(Ju(o)||o6(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(Ju(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Yt.SEMI)this.consumed+=1;else if(this.decodeMode===Ar.Strict)return 0;return this.emitCodePoint(n6(this.result),this.consumed),this.errors&&(t!==Yt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],i=(o&qr.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=s6(r,o,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===Ar.Attribute&&(i===0||a6(a))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],i=(o&qr.VALUE_LENGTH)>>14,i!==0){if(a===Yt.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Ar.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&qr.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~qr.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case Wt.NamedEntity:return this.result!==0&&(this.decodeMode!==Ar.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Wt.NumericDecimal:return this.emitNumericEntity(0,2);case Wt.NumericHex:return this.emitNumericEntity(0,3);case Wt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Wt.EntityStart:return 0}}}function ub(e){let t="";const n=new cb(e,r=>t+=t6(r));return function(r,o){let i=0,a=0;for(;(a=r.indexOf("&",a))>=0;){t+=r.slice(i,a),n.startEntity(o);const l=n.write(r,a+1);if(l<0){i=a+n.end();break}i=a+l,a=l===0?i+1:i}const s=t+r.slice(i);return t="",s}}function s6(e,t,n,r){const o=(t&qr.BRANCH_LENGTH)>>7,i=t&qr.JUMP_TABLE;if(o===0)return i!==0&&r===i?n:-1;if(i){const l=r-i;return l<0||l>=o?-1:e[n+l]-1}let a=n,s=a+o-1;for(;a<=s;){const l=a+s>>>1,c=e[l];if(c<r)a=l+1;else if(c>r)s=l-1;else return e[l+o]}return-1}ub(lb);ub(Z4);var te;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(te||(te={}));var bo;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(bo||(bo={}));var Hn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Hn||(Hn={}));var H;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(H||(H={}));var m;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(m||(m={}));const l6=new Map([[H.A,m.A],[H.ADDRESS,m.ADDRESS],[H.ANNOTATION_XML,m.ANNOTATION_XML],[H.APPLET,m.APPLET],[H.AREA,m.AREA],[H.ARTICLE,m.ARTICLE],[H.ASIDE,m.ASIDE],[H.B,m.B],[H.BASE,m.BASE],[H.BASEFONT,m.BASEFONT],[H.BGSOUND,m.BGSOUND],[H.BIG,m.BIG],[H.BLOCKQUOTE,m.BLOCKQUOTE],[H.BODY,m.BODY],[H.BR,m.BR],[H.BUTTON,m.BUTTON],[H.CAPTION,m.CAPTION],[H.CENTER,m.CENTER],[H.CODE,m.CODE],[H.COL,m.COL],[H.COLGROUP,m.COLGROUP],[H.DD,m.DD],[H.DESC,m.DESC],[H.DETAILS,m.DETAILS],[H.DIALOG,m.DIALOG],[H.DIR,m.DIR],[H.DIV,m.DIV],[H.DL,m.DL],[H.DT,m.DT],[H.EM,m.EM],[H.EMBED,m.EMBED],[H.FIELDSET,m.FIELDSET],[H.FIGCAPTION,m.FIGCAPTION],[H.FIGURE,m.FIGURE],[H.FONT,m.FONT],[H.FOOTER,m.FOOTER],[H.FOREIGN_OBJECT,m.FOREIGN_OBJECT],[H.FORM,m.FORM],[H.FRAME,m.FRAME],[H.FRAMESET,m.FRAMESET],[H.H1,m.H1],[H.H2,m.H2],[H.H3,m.H3],[H.H4,m.H4],[H.H5,m.H5],[H.H6,m.H6],[H.HEAD,m.HEAD],[H.HEADER,m.HEADER],[H.HGROUP,m.HGROUP],[H.HR,m.HR],[H.HTML,m.HTML],[H.I,m.I],[H.IMG,m.IMG],[H.IMAGE,m.IMAGE],[H.INPUT,m.INPUT],[H.IFRAME,m.IFRAME],[H.KEYGEN,m.KEYGEN],[H.LABEL,m.LABEL],[H.LI,m.LI],[H.LINK,m.LINK],[H.LISTING,m.LISTING],[H.MAIN,m.MAIN],[H.MALIGNMARK,m.MALIGNMARK],[H.MARQUEE,m.MARQUEE],[H.MATH,m.MATH],[H.MENU,m.MENU],[H.META,m.META],[H.MGLYPH,m.MGLYPH],[H.MI,m.MI],[H.MO,m.MO],[H.MN,m.MN],[H.MS,m.MS],[H.MTEXT,m.MTEXT],[H.NAV,m.NAV],[H.NOBR,m.NOBR],[H.NOFRAMES,m.NOFRAMES],[H.NOEMBED,m.NOEMBED],[H.NOSCRIPT,m.NOSCRIPT],[H.OBJECT,m.OBJECT],[H.OL,m.OL],[H.OPTGROUP,m.OPTGROUP],[H.OPTION,m.OPTION],[H.P,m.P],[H.PARAM,m.PARAM],[H.PLAINTEXT,m.PLAINTEXT],[H.PRE,m.PRE],[H.RB,m.RB],[H.RP,m.RP],[H.RT,m.RT],[H.RTC,m.RTC],[H.RUBY,m.RUBY],[H.S,m.S],[H.SCRIPT,m.SCRIPT],[H.SEARCH,m.SEARCH],[H.SECTION,m.SECTION],[H.SELECT,m.SELECT],[H.SOURCE,m.SOURCE],[H.SMALL,m.SMALL],[H.SPAN,m.SPAN],[H.STRIKE,m.STRIKE],[H.STRONG,m.STRONG],[H.STYLE,m.STYLE],[H.SUB,m.SUB],[H.SUMMARY,m.SUMMARY],[H.SUP,m.SUP],[H.TABLE,m.TABLE],[H.TBODY,m.TBODY],[H.TEMPLATE,m.TEMPLATE],[H.TEXTAREA,m.TEXTAREA],[H.TFOOT,m.TFOOT],[H.TD,m.TD],[H.TH,m.TH],[H.THEAD,m.THEAD],[H.TITLE,m.TITLE],[H.TR,m.TR],[H.TRACK,m.TRACK],[H.TT,m.TT],[H.U,m.U],[H.UL,m.UL],[H.SVG,m.SVG],[H.VAR,m.VAR],[H.WBR,m.WBR],[H.XMP,m.XMP]]);function Ii(e){var t;return(t=l6.get(e))!==null&&t!==void 0?t:m.UNKNOWN}const oe=m,c6={[te.HTML]:new Set([oe.ADDRESS,oe.APPLET,oe.AREA,oe.ARTICLE,oe.ASIDE,oe.BASE,oe.BASEFONT,oe.BGSOUND,oe.BLOCKQUOTE,oe.BODY,oe.BR,oe.BUTTON,oe.CAPTION,oe.CENTER,oe.COL,oe.COLGROUP,oe.DD,oe.DETAILS,oe.DIR,oe.DIV,oe.DL,oe.DT,oe.EMBED,oe.FIELDSET,oe.FIGCAPTION,oe.FIGURE,oe.FOOTER,oe.FORM,oe.FRAME,oe.FRAMESET,oe.H1,oe.H2,oe.H3,oe.H4,oe.H5,oe.H6,oe.HEAD,oe.HEADER,oe.HGROUP,oe.HR,oe.HTML,oe.IFRAME,oe.IMG,oe.INPUT,oe.LI,oe.LINK,oe.LISTING,oe.MAIN,oe.MARQUEE,oe.MENU,oe.META,oe.NAV,oe.NOEMBED,oe.NOFRAMES,oe.NOSCRIPT,oe.OBJECT,oe.OL,oe.P,oe.PARAM,oe.PLAINTEXT,oe.PRE,oe.SCRIPT,oe.SECTION,oe.SELECT,oe.SOURCE,oe.STYLE,oe.SUMMARY,oe.TABLE,oe.TBODY,oe.TD,oe.TEMPLATE,oe.TEXTAREA,oe.TFOOT,oe.TH,oe.THEAD,oe.TITLE,oe.TR,oe.TRACK,oe.UL,oe.WBR,oe.XMP]),[te.MATHML]:new Set([oe.MI,oe.MO,oe.MN,oe.MS,oe.MTEXT,oe.ANNOTATION_XML]),[te.SVG]:new Set([oe.TITLE,oe.FOREIGN_OBJECT,oe.DESC]),[te.XLINK]:new Set,[te.XML]:new Set,[te.XMLNS]:new Set},Zu=new Set([oe.H1,oe.H2,oe.H3,oe.H4,oe.H5,oe.H6]);H.STYLE,H.SCRIPT,H.XMP,H.IFRAME,H.NOEMBED,H.NOFRAMES,H.PLAINTEXT;var N;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(N||(N={}));const _t={DATA:N.DATA,RCDATA:N.RCDATA,RAWTEXT:N.RAWTEXT,SCRIPT_DATA:N.SCRIPT_DATA,PLAINTEXT:N.PLAINTEXT,CDATA_SECTION:N.CDATA_SECTION};function u6(e){return e>=D.DIGIT_0&&e<=D.DIGIT_9}function aa(e){return e>=D.LATIN_CAPITAL_A&&e<=D.LATIN_CAPITAL_Z}function d6(e){return e>=D.LATIN_SMALL_A&&e<=D.LATIN_SMALL_Z}function Ur(e){return d6(e)||aa(e)}function bm(e){return Ur(e)||u6(e)}function Cs(e){return e+32}function db(e){return e===D.SPACE||e===D.LINE_FEED||e===D.TABULATION||e===D.FORM_FEED}function Em(e){return db(e)||e===D.SOLIDUS||e===D.GREATER_THAN_SIGN}function h6(e){return e===D.NULL?q.nullCharacterReference:e>1114111?q.characterReferenceOutsideUnicodeRange:ob(e)?q.surrogateCharacterReference:ab(e)?q.noncharacterCharacterReference:ib(e)||e===D.CARRIAGE_RETURN?q.controlCharacterReference:null}class p6{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=N.DATA,this.returnState=N.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new J4(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new cb(lb,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(q.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(q.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=h6(r);o&&this._err(o,1)}}:void 0)}_err(t,n=0){var r,o;(o=(r=this.handler).onParseError)===null||o===void 0||o.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:He.START_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:He.END_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:He.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:He.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(sb(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const o=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);o[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(q.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Ii(t.tagName),t.type===He.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(q.endTagWithAttributes),t.selfClosing&&this._err(q.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case He.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case He.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case He.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:He.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=db(t)?He.WHITESPACE_CHARACTER:t===D.NULL?He.NULL_CHARACTER:He.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(He.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=N.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ar.Attribute:Ar.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===N.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===N.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===N.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case N.DATA:{this._stateData(t);break}case N.RCDATA:{this._stateRcdata(t);break}case N.RAWTEXT:{this._stateRawtext(t);break}case N.SCRIPT_DATA:{this._stateScriptData(t);break}case N.PLAINTEXT:{this._statePlaintext(t);break}case N.TAG_OPEN:{this._stateTagOpen(t);break}case N.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case N.TAG_NAME:{this._stateTagName(t);break}case N.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case N.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case N.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case N.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case N.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case N.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case N.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case N.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case N.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case N.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case N.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case N.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case N.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case N.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case N.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case N.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case N.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case N.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case N.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case N.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case N.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case N.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case N.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case N.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case N.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case N.BOGUS_COMMENT:{this._stateBogusComment(t);break}case N.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case N.COMMENT_START:{this._stateCommentStart(t);break}case N.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case N.COMMENT:{this._stateComment(t);break}case N.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case N.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case N.COMMENT_END:{this._stateCommentEnd(t);break}case N.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case N.DOCTYPE:{this._stateDoctype(t);break}case N.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case N.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case N.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case N.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case N.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case N.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case N.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case N.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case N.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case N.CDATA_SECTION:{this._stateCdataSection(t);break}case N.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case N.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case N.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case N.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case D.LESS_THAN_SIGN:{this.state=N.TAG_OPEN;break}case D.AMPERSAND:{this._startCharacterReference();break}case D.NULL:{this._err(q.unexpectedNullCharacter),this._emitCodePoint(t);break}case D.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case D.AMPERSAND:{this._startCharacterReference();break}case D.LESS_THAN_SIGN:{this.state=N.RCDATA_LESS_THAN_SIGN;break}case D.NULL:{this._err(q.unexpectedNullCharacter),this._emitChars(yt);break}case D.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case D.LESS_THAN_SIGN:{this.state=N.RAWTEXT_LESS_THAN_SIGN;break}case D.NULL:{this._err(q.unexpectedNullCharacter),this._emitChars(yt);break}case D.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case D.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_LESS_THAN_SIGN;break}case D.NULL:{this._err(q.unexpectedNullCharacter),this._emitChars(yt);break}case D.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case D.NULL:{this._err(q.unexpectedNullCharacter),this._emitChars(yt);break}case D.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Ur(t))this._createStartTagToken(),this.state=N.TAG_NAME,this._stateTagName(t);else switch(t){case D.EXCLAMATION_MARK:{this.state=N.MARKUP_DECLARATION_OPEN;break}case D.SOLIDUS:{this.state=N.END_TAG_OPEN;break}case D.QUESTION_MARK:{this._err(q.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t);break}case D.EOF:{this._err(q.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(q.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=N.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Ur(t))this._createEndTagToken(),this.state=N.TAG_NAME,this._stateTagName(t);else switch(t){case D.GREATER_THAN_SIGN:{this._err(q.missingEndTagName),this.state=N.DATA;break}case D.EOF:{this._err(q.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(q.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this.state=N.BEFORE_ATTRIBUTE_NAME;break}case D.SOLIDUS:{this.state=N.SELF_CLOSING_START_TAG;break}case D.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentTagToken();break}case D.NULL:{this._err(q.unexpectedNullCharacter),n.tagName+=yt;break}case D.EOF:{this._err(q.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(aa(t)?Cs(t):t)}}_stateRcdataLessThanSign(t){t===D.SOLIDUS?this.state=N.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=N.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Ur(t)?(this.state=N.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=N.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=N.BEFORE_ATTRIBUTE_NAME,!1;case D.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=N.SELF_CLOSING_START_TAG,!1;case D.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=N.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===D.SOLIDUS?this.state=N.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Ur(t)?(this.state=N.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case D.SOLIDUS:{this.state=N.SCRIPT_DATA_END_TAG_OPEN;break}case D.EXCLAMATION_MARK:{this.state=N.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=N.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Ur(t)?(this.state=N.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===D.HYPHEN_MINUS?(this.state=N.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===D.HYPHEN_MINUS?(this.state=N.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case D.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case D.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case D.NULL:{this._err(q.unexpectedNullCharacter),this._emitChars(yt);break}case D.EOF:{this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case D.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case D.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case D.NULL:{this._err(q.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_ESCAPED,this._emitChars(yt);break}case D.EOF:{this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case D.HYPHEN_MINUS:{this._emitChars("-");break}case D.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case D.GREATER_THAN_SIGN:{this.state=N.SCRIPT_DATA,this._emitChars(">");break}case D.NULL:{this._err(q.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_ESCAPED,this._emitChars(yt);break}case D.EOF:{this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===D.SOLIDUS?this.state=N.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ur(t)?(this._emitChars("<"),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Ur(t)?(this.state=N.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(pn.SCRIPT,!1)&&Em(this.preprocessor.peek(pn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<pn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case D.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case D.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case D.NULL:{this._err(q.unexpectedNullCharacter),this._emitChars(yt);break}case D.EOF:{this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case D.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case D.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case D.NULL:{this._err(q.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(yt);break}case D.EOF:{this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case D.HYPHEN_MINUS:{this._emitChars("-");break}case D.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case D.GREATER_THAN_SIGN:{this.state=N.SCRIPT_DATA,this._emitChars(">");break}case D.NULL:{this._err(q.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(yt);break}case D.EOF:{this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===D.SOLIDUS?(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(pn.SCRIPT,!1)&&Em(this.preprocessor.peek(pn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<pn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=N.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.SOLIDUS:case D.GREATER_THAN_SIGN:case D.EOF:{this.state=N.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case D.EQUALS_SIGN:{this._err(q.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=N.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=N.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:case D.SOLIDUS:case D.GREATER_THAN_SIGN:case D.EOF:{this._leaveAttrName(),this.state=N.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case D.EQUALS_SIGN:{this._leaveAttrName(),this.state=N.BEFORE_ATTRIBUTE_VALUE;break}case D.QUOTATION_MARK:case D.APOSTROPHE:case D.LESS_THAN_SIGN:{this._err(q.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case D.NULL:{this._err(q.unexpectedNullCharacter),this.currentAttr.name+=yt;break}default:this.currentAttr.name+=String.fromCodePoint(aa(t)?Cs(t):t)}}_stateAfterAttributeName(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.SOLIDUS:{this.state=N.SELF_CLOSING_START_TAG;break}case D.EQUALS_SIGN:{this.state=N.BEFORE_ATTRIBUTE_VALUE;break}case D.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentTagToken();break}case D.EOF:{this._err(q.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=N.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.QUOTATION_MARK:{this.state=N.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case D.APOSTROPHE:{this.state=N.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case D.GREATER_THAN_SIGN:{this._err(q.missingAttributeValue),this.state=N.DATA,this.emitCurrentTagToken();break}default:this.state=N.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case D.QUOTATION_MARK:{this.state=N.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case D.AMPERSAND:{this._startCharacterReference();break}case D.NULL:{this._err(q.unexpectedNullCharacter),this.currentAttr.value+=yt;break}case D.EOF:{this._err(q.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case D.APOSTROPHE:{this.state=N.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case D.AMPERSAND:{this._startCharacterReference();break}case D.NULL:{this._err(q.unexpectedNullCharacter),this.currentAttr.value+=yt;break}case D.EOF:{this._err(q.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this._leaveAttrValue(),this.state=N.BEFORE_ATTRIBUTE_NAME;break}case D.AMPERSAND:{this._startCharacterReference();break}case D.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=N.DATA,this.emitCurrentTagToken();break}case D.NULL:{this._err(q.unexpectedNullCharacter),this.currentAttr.value+=yt;break}case D.QUOTATION_MARK:case D.APOSTROPHE:case D.LESS_THAN_SIGN:case D.EQUALS_SIGN:case D.GRAVE_ACCENT:{this._err(q.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case D.EOF:{this._err(q.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this._leaveAttrValue(),this.state=N.BEFORE_ATTRIBUTE_NAME;break}case D.SOLIDUS:{this._leaveAttrValue(),this.state=N.SELF_CLOSING_START_TAG;break}case D.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=N.DATA,this.emitCurrentTagToken();break}case D.EOF:{this._err(q.eofInTag),this._emitEOFToken();break}default:this._err(q.missingWhitespaceBetweenAttributes),this.state=N.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case D.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=N.DATA,this.emitCurrentTagToken();break}case D.EOF:{this._err(q.eofInTag),this._emitEOFToken();break}default:this._err(q.unexpectedSolidusInTag),this.state=N.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case D.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentComment(n);break}case D.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case D.NULL:{this._err(q.unexpectedNullCharacter),n.data+=yt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(pn.DASH_DASH,!0)?(this._createCommentToken(pn.DASH_DASH.length+1),this.state=N.COMMENT_START):this._consumeSequenceIfMatch(pn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(pn.DOCTYPE.length+1),this.state=N.DOCTYPE):this._consumeSequenceIfMatch(pn.CDATA_START,!0)?this.inForeignNode?this.state=N.CDATA_SECTION:(this._err(q.cdataInHtmlContent),this._createCommentToken(pn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=N.BOGUS_COMMENT):this._ensureHibernation()||(this._err(q.incorrectlyOpenedComment),this._createCommentToken(2),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case D.HYPHEN_MINUS:{this.state=N.COMMENT_START_DASH;break}case D.GREATER_THAN_SIGN:{this._err(q.abruptClosingOfEmptyComment),this.state=N.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=N.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case D.HYPHEN_MINUS:{this.state=N.COMMENT_END;break}case D.GREATER_THAN_SIGN:{this._err(q.abruptClosingOfEmptyComment),this.state=N.DATA,this.emitCurrentComment(n);break}case D.EOF:{this._err(q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=N.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case D.HYPHEN_MINUS:{this.state=N.COMMENT_END_DASH;break}case D.LESS_THAN_SIGN:{n.data+="<",this.state=N.COMMENT_LESS_THAN_SIGN;break}case D.NULL:{this._err(q.unexpectedNullCharacter),n.data+=yt;break}case D.EOF:{this._err(q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case D.EXCLAMATION_MARK:{n.data+="!",this.state=N.COMMENT_LESS_THAN_SIGN_BANG;break}case D.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=N.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===D.HYPHEN_MINUS?this.state=N.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=N.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===D.HYPHEN_MINUS?this.state=N.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=N.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==D.GREATER_THAN_SIGN&&t!==D.EOF&&this._err(q.nestedComment),this.state=N.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case D.HYPHEN_MINUS:{this.state=N.COMMENT_END;break}case D.EOF:{this._err(q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=N.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case D.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentComment(n);break}case D.EXCLAMATION_MARK:{this.state=N.COMMENT_END_BANG;break}case D.HYPHEN_MINUS:{n.data+="-";break}case D.EOF:{this._err(q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=N.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case D.HYPHEN_MINUS:{n.data+="--!",this.state=N.COMMENT_END_DASH;break}case D.GREATER_THAN_SIGN:{this._err(q.incorrectlyClosedComment),this.state=N.DATA,this.emitCurrentComment(n);break}case D.EOF:{this._err(q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=N.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_NAME;break}case D.GREATER_THAN_SIGN:{this.state=N.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case D.EOF:{this._err(q.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(q.missingWhitespaceBeforeDoctypeName),this.state=N.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(aa(t))this._createDoctypeToken(String.fromCharCode(Cs(t))),this.state=N.DOCTYPE_NAME;else switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.NULL:{this._err(q.unexpectedNullCharacter),this._createDoctypeToken(yt),this.state=N.DOCTYPE_NAME;break}case D.GREATER_THAN_SIGN:{this._err(q.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case D.EOF:{this._err(q.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=N.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this.state=N.AFTER_DOCTYPE_NAME;break}case D.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case D.NULL:{this._err(q.unexpectedNullCharacter),n.name+=yt;break}case D.EOF:{this._err(q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(aa(t)?Cs(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case D.EOF:{this._err(q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(pn.PUBLIC,!1)?this.state=N.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(pn.SYSTEM,!1)?this.state=N.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(q.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case D.QUOTATION_MARK:{this._err(q.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case D.APOSTROPHE:{this._err(q.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case D.GREATER_THAN_SIGN:{this._err(q.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case D.EOF:{this._err(q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(q.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.QUOTATION_MARK:{n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case D.APOSTROPHE:{n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case D.GREATER_THAN_SIGN:{this._err(q.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case D.EOF:{this._err(q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(q.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case D.QUOTATION_MARK:{this.state=N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case D.NULL:{this._err(q.unexpectedNullCharacter),n.publicId+=yt;break}case D.GREATER_THAN_SIGN:{this._err(q.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case D.EOF:{this._err(q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case D.APOSTROPHE:{this.state=N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case D.NULL:{this._err(q.unexpectedNullCharacter),n.publicId+=yt;break}case D.GREATER_THAN_SIGN:{this._err(q.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case D.EOF:{this._err(q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this.state=N.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case D.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case D.QUOTATION_MARK:{this._err(q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case D.APOSTROPHE:{this._err(q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case D.EOF:{this._err(q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case D.QUOTATION_MARK:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case D.APOSTROPHE:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case D.EOF:{this._err(q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case D.QUOTATION_MARK:{this._err(q.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case D.APOSTROPHE:{this._err(q.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case D.GREATER_THAN_SIGN:{this._err(q.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case D.EOF:{this._err(q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.QUOTATION_MARK:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case D.APOSTROPHE:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case D.GREATER_THAN_SIGN:{this._err(q.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case D.EOF:{this._err(q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case D.QUOTATION_MARK:{this.state=N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case D.NULL:{this._err(q.unexpectedNullCharacter),n.systemId+=yt;break}case D.GREATER_THAN_SIGN:{this._err(q.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case D.EOF:{this._err(q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case D.APOSTROPHE:{this.state=N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case D.NULL:{this._err(q.unexpectedNullCharacter),n.systemId+=yt;break}case D.GREATER_THAN_SIGN:{this._err(q.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case D.EOF:{this._err(q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case D.EOF:{this._err(q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(q.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case D.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case D.NULL:{this._err(q.unexpectedNullCharacter);break}case D.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case D.RIGHT_SQUARE_BRACKET:{this.state=N.CDATA_SECTION_BRACKET;break}case D.EOF:{this._err(q.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===D.RIGHT_SQUARE_BRACKET?this.state=N.CDATA_SECTION_END:(this._emitChars("]"),this.state=N.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case D.GREATER_THAN_SIGN:{this.state=N.DATA;break}case D.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=N.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(D.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&bm(this.preprocessor.peek(1))?N.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){bm(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===D.SEMICOLON&&this._err(q.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const hb=new Set([m.DD,m.DT,m.LI,m.OPTGROUP,m.OPTION,m.P,m.RB,m.RP,m.RT,m.RTC]),Tm=new Set([...hb,m.CAPTION,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]),Tl=new Set([m.APPLET,m.CAPTION,m.HTML,m.MARQUEE,m.OBJECT,m.TABLE,m.TD,m.TEMPLATE,m.TH]),f6=new Set([...Tl,m.OL,m.UL]),m6=new Set([...Tl,m.BUTTON]),xm=new Set([m.ANNOTATION_XML,m.MI,m.MN,m.MO,m.MS,m.MTEXT]),Cm=new Set([m.DESC,m.FOREIGN_OBJECT,m.TITLE]),g6=new Set([m.TR,m.TEMPLATE,m.HTML]),y6=new Set([m.TBODY,m.TFOOT,m.THEAD,m.TEMPLATE,m.HTML]),b6=new Set([m.TABLE,m.TEMPLATE,m.HTML]),E6=new Set([m.TD,m.TH]);class T6{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=m.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===m.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===te.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const o=this._indexOf(t)+1;this.items.splice(o,0,n),this.tagIDs.splice(o,0,r),this.stackTop++,o===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,o===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==te.HTML);this.shortenToLength(n<0?0:n)}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(n<0?0:n)}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r<0?0:r)}popUntilNumberedHeaderPopped(){this.popUntilPopped(Zu,te.HTML)}popUntilTableCellPopped(){this.popUntilPopped(E6,te.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(b6,te.HTML)}clearBackToTableBodyContext(){this.clearBackTo(y6,te.HTML)}clearBackToTableRowContext(){this.clearBackTo(g6,te.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===m.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===m.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const o=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case te.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case te.SVG:{if(Cm.has(o))return!1;break}case te.MATHML:{if(xm.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Tl)}hasInListItemScope(t){return this.hasInDynamicScope(t,f6)}hasInButtonScope(t){return this.hasInDynamicScope(t,m6)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case te.HTML:{if(Zu.has(n))return!0;if(Tl.has(n))return!1;break}case te.SVG:{if(Cm.has(n))return!1;break}case te.MATHML:{if(xm.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===te.HTML)switch(this.tagIDs[n]){case t:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===te.HTML)switch(this.tagIDs[t]){case m.TBODY:case m.THEAD:case m.TFOOT:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===te.HTML)switch(this.tagIDs[n]){case t:return!0;case m.OPTION:case m.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;hb.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;Tm.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&Tm.has(this.currentTagId);)this.pop()}}const iu=3;var lr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(lr||(lr={}));const vm={type:lr.Marker};class x6{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,i=this.treeAdapter.getTagName(t),a=this.treeAdapter.getNamespaceURI(t);for(let s=0;s<this.entries.length;s++){const l=this.entries[s];if(l.type===lr.Marker)break;const{element:c}=l;if(this.treeAdapter.getTagName(c)===i&&this.treeAdapter.getNamespaceURI(c)===a){const d=this.treeAdapter.getAttrList(c);d.length===o&&r.push({idx:s,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<iu)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<iu)return;const o=new Map(n.map(a=>[a.name,a.value]));let i=0;for(let a=0;a<r.length;a++){const s=r[a];s.attrs.every(l=>o.get(l.name)===l.value)&&(i+=1,i>=iu&&this.entries.splice(s.idx,1))}}insertMarker(){this.entries.unshift(vm)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:lr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:lr.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n>=0&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(vm);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===lr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===lr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===lr.Element&&n.element===t)}}const zr={createDocument(){return{nodeName:"#document",mode:Hn.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const o=e.childNodes.find(i=>i.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=r;else{const i={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};zr.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(zr.isTextNode(n)){n.value+=t;return}}zr.appendChild(e,zr.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&zr.isTextNode(r)?r.value+=t:zr.insertBefore(e,zr.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},pb="html",C6="about:legacy-compat",v6="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",fb=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],S6=[...fb,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],A6=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),mb=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],k6=[...mb,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Sm(e,t){return t.some(n=>e.startsWith(n))}function _6(e){return e.name===pb&&e.publicId===null&&(e.systemId===null||e.systemId===C6)}function D6(e){if(e.name!==pb)return Hn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===v6)return Hn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),A6.has(n))return Hn.QUIRKS;let r=t===null?S6:fb;if(Sm(n,r))return Hn.QUIRKS;if(r=t===null?mb:k6,Sm(n,r))return Hn.LIMITED_QUIRKS}return Hn.NO_QUIRKS}const Am={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},I6="definitionurl",w6="definitionURL",N6=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),P6=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:te.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:te.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:te.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:te.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:te.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:te.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:te.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:te.XML}],["xml:space",{prefix:"xml",name:"space",namespace:te.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:te.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:te.XMLNS}]]),R6=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),L6=new Set([m.B,m.BIG,m.BLOCKQUOTE,m.BODY,m.BR,m.CENTER,m.CODE,m.DD,m.DIV,m.DL,m.DT,m.EM,m.EMBED,m.H1,m.H2,m.H3,m.H4,m.H5,m.H6,m.HEAD,m.HR,m.I,m.IMG,m.LI,m.LISTING,m.MENU,m.META,m.NOBR,m.OL,m.P,m.PRE,m.RUBY,m.S,m.SMALL,m.SPAN,m.STRONG,m.STRIKE,m.SUB,m.SUP,m.TABLE,m.TT,m.U,m.UL,m.VAR]);function O6(e){const t=e.tagID;return t===m.FONT&&e.attrs.some(({name:n})=>n===bo.COLOR||n===bo.SIZE||n===bo.FACE)||L6.has(t)}function gb(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===I6){e.attrs[t].name=w6;break}}function yb(e){for(let t=0;t<e.attrs.length;t++){const n=N6.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function kh(e){for(let t=0;t<e.attrs.length;t++){const n=P6.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function M6(e){const t=R6.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Ii(e.tagName))}function F6(e,t){return t===te.MATHML&&(e===m.MI||e===m.MO||e===m.MN||e===m.MS||e===m.MTEXT)}function B6(e,t,n){if(t===te.MATHML&&e===m.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===bo.ENCODING){const o=n[r].value.toLowerCase();return o===Am.TEXT_HTML||o===Am.APPLICATION_XML}}return t===te.SVG&&(e===m.FOREIGN_OBJECT||e===m.DESC||e===m.TITLE)}function j6(e,t,n,r){return(!r||r===te.HTML)&&B6(e,t,n)||(!r||r===te.MATHML)&&F6(e,t)}const H6="hidden",U6=8,z6=3;var P;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(P||(P={}));const $6={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},bb=new Set([m.TABLE,m.TBODY,m.TFOOT,m.THEAD,m.TR]),km={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:zr,onParseError:null};class _m{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=P.INITIAL,this.originalInsertionMode=P.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...km,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new p6(this.options,this),this.activeFormattingElements=new x6(this.treeAdapter),this.fragmentContextID=r?Ii(this.treeAdapter.getTagName(r)):m.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new T6(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...km,...n};t??(t=r.treeAdapter.createElement(H.TEMPLATE,te.HTML,[]));const o=r.treeAdapter.createElement("documentmock",te.HTML,[]),i=new this(r,o,t);return i.fragmentContextID===m.TEMPLATE&&i.tmplInsertionModeStack.unshift(P.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var o;if(!this.onParseError)return;const i=(o=t.location)!==null&&o!==void 0?o:$6,a={code:n,startLine:i.startLine,startCol:i.startCol,startOffset:i.startOffset,endLine:r?i.startLine:i.endLine,endCol:r?i.startCol:i.endCol,endOffset:r?i.startOffset:i.endOffset};this.onParseError(a)}onItemPush(t,n,r){var o,i;(i=(o=this.treeAdapter).onItemPush)===null||i===void 0||i.call(o,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,o;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(o=(r=this.treeAdapter).onItemPop)===null||o===void 0||o.call(r,t,this.openElements.current),n){let i,a;this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,a=this.fragmentContextID):{current:i,currentTagId:a}=this.openElements,this._setContextModes(i,a)}}_setContextModes(t,n){const r=t===this.document||this.treeAdapter.getNamespaceURI(t)===te.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,te.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=P.TEXT}switchToPlaintextParsing(){this.insertionMode=P.TEXT,this.originalInsertionMode=P.IN_BODY,this.tokenizer.state=_t.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===H.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==te.HTML))switch(this.fragmentContextID){case m.TITLE:case m.TEXTAREA:{this.tokenizer.state=_t.RCDATA;break}case m.STYLE:case m.XMP:case m.IFRAME:case m.NOEMBED:case m.NOFRAMES:case m.NOSCRIPT:{this.tokenizer.state=_t.RAWTEXT;break}case m.SCRIPT:{this.tokenizer.state=_t.SCRIPT_DATA;break}case m.PLAINTEXT:{this.tokenizer.state=_t.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,o),t.location){const i=this.treeAdapter.getChildNodes(this.document).find(a=>this.treeAdapter.isDocumentTypeNode(a));i&&this.treeAdapter.setNodeSourceCodeLocation(i,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,te.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,te.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(H.HTML,te.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,m.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const o=this.treeAdapter.getChildNodes(n),i=r?o.lastIndexOf(r):o.length,a=o[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:s,endCol:l,endOffset:c}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:s,endCol:l,endOffset:c})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,o=this.treeAdapter.getTagName(t),i=n.type===He.END_TAG&&o===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,i)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===m.SVG&&this.treeAdapter.getTagName(n)===H.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===te.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===m.MGLYPH||t.tagID===m.MALIGNMARK)&&!this._isIntegrationPoint(r,n,te.HTML)}_processToken(t){switch(t.type){case He.CHARACTER:{this.onCharacter(t);break}case He.NULL_CHARACTER:{this.onNullCharacter(t);break}case He.COMMENT:{this.onComment(t);break}case He.DOCTYPE:{this.onDoctype(t);break}case He.START_TAG:{this._processStartTag(t);break}case He.END_TAG:{this.onEndTag(t);break}case He.EOF:{this.onEof(t);break}case He.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),i=this.treeAdapter.getAttrList(n);return j6(t,o,i,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===lr.Marker||this.openElements.contains(o.element)),r=n<0?t-1:n-1;for(let o=r;o>=0;o--){const i=this.activeFormattingElements.entries[o];this._insertElement(i.token,this.treeAdapter.getNamespaceURI(i.element)),i.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=P.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(m.P),this.openElements.popUntilTagNamePopped(m.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case m.TR:{this.insertionMode=P.IN_ROW;return}case m.TBODY:case m.THEAD:case m.TFOOT:{this.insertionMode=P.IN_TABLE_BODY;return}case m.CAPTION:{this.insertionMode=P.IN_CAPTION;return}case m.COLGROUP:{this.insertionMode=P.IN_COLUMN_GROUP;return}case m.TABLE:{this.insertionMode=P.IN_TABLE;return}case m.BODY:{this.insertionMode=P.IN_BODY;return}case m.FRAMESET:{this.insertionMode=P.IN_FRAMESET;return}case m.SELECT:{this._resetInsertionModeForSelect(t);return}case m.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case m.HTML:{this.insertionMode=this.headElement?P.AFTER_HEAD:P.BEFORE_HEAD;return}case m.TD:case m.TH:{if(t>0){this.insertionMode=P.IN_CELL;return}break}case m.HEAD:{if(t>0){this.insertionMode=P.IN_HEAD;return}break}}this.insertionMode=P.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===m.TEMPLATE)break;if(r===m.TABLE){this.insertionMode=P.IN_SELECT_IN_TABLE;return}}this.insertionMode=P.IN_SELECT}_isElementCausesFosterParenting(t){return bb.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case m.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===te.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case m.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return c6[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){EO(this,t);return}switch(this.insertionMode){case P.INITIAL:{Yi(this,t);break}case P.BEFORE_HTML:{ya(this,t);break}case P.BEFORE_HEAD:{ba(this,t);break}case P.IN_HEAD:{Ea(this,t);break}case P.IN_HEAD_NO_SCRIPT:{Ta(this,t);break}case P.AFTER_HEAD:{xa(this,t);break}case P.IN_BODY:case P.IN_CAPTION:case P.IN_CELL:case P.IN_TEMPLATE:{Tb(this,t);break}case P.TEXT:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{au(this,t);break}case P.IN_TABLE_TEXT:{kb(this,t);break}case P.IN_COLUMN_GROUP:{xl(this,t);break}case P.AFTER_BODY:{Cl(this,t);break}case P.AFTER_AFTER_BODY:{Hs(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){bO(this,t);return}switch(this.insertionMode){case P.INITIAL:{Yi(this,t);break}case P.BEFORE_HTML:{ya(this,t);break}case P.BEFORE_HEAD:{ba(this,t);break}case P.IN_HEAD:{Ea(this,t);break}case P.IN_HEAD_NO_SCRIPT:{Ta(this,t);break}case P.AFTER_HEAD:{xa(this,t);break}case P.TEXT:{this._insertCharacters(t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{au(this,t);break}case P.IN_COLUMN_GROUP:{xl(this,t);break}case P.AFTER_BODY:{Cl(this,t);break}case P.AFTER_AFTER_BODY:{Hs(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){ed(this,t);return}switch(this.insertionMode){case P.INITIAL:case P.BEFORE_HTML:case P.BEFORE_HEAD:case P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:case P.IN_BODY:case P.IN_TABLE:case P.IN_CAPTION:case P.IN_COLUMN_GROUP:case P.IN_TABLE_BODY:case P.IN_ROW:case P.IN_CELL:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:case P.IN_TEMPLATE:case P.IN_FRAMESET:case P.AFTER_FRAMESET:{ed(this,t);break}case P.IN_TABLE_TEXT:{Ki(this,t);break}case P.AFTER_BODY:{Q6(this,t);break}case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{X6(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case P.INITIAL:{J6(this,t);break}case P.BEFORE_HEAD:case P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:{this._err(t,q.misplacedDoctype);break}case P.IN_TABLE_TEXT:{Ki(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,q.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?TO(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case P.INITIAL:{Yi(this,t);break}case P.BEFORE_HTML:{Z6(this,t);break}case P.BEFORE_HEAD:{tL(this,t);break}case P.IN_HEAD:{er(this,t);break}case P.IN_HEAD_NO_SCRIPT:{oL(this,t);break}case P.AFTER_HEAD:{aL(this,t);break}case P.IN_BODY:{sn(this,t);break}case P.IN_TABLE:{yi(this,t);break}case P.IN_TABLE_TEXT:{Ki(this,t);break}case P.IN_CAPTION:{nO(this,t);break}case P.IN_COLUMN_GROUP:{Ih(this,t);break}case P.IN_TABLE_BODY:{ac(this,t);break}case P.IN_ROW:{sc(this,t);break}case P.IN_CELL:{iO(this,t);break}case P.IN_SELECT:{Ib(this,t);break}case P.IN_SELECT_IN_TABLE:{sO(this,t);break}case P.IN_TEMPLATE:{cO(this,t);break}case P.AFTER_BODY:{dO(this,t);break}case P.IN_FRAMESET:{hO(this,t);break}case P.AFTER_FRAMESET:{fO(this,t);break}case P.AFTER_AFTER_BODY:{gO(this,t);break}case P.AFTER_AFTER_FRAMESET:{yO(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?xO(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case P.INITIAL:{Yi(this,t);break}case P.BEFORE_HTML:{eL(this,t);break}case P.BEFORE_HEAD:{nL(this,t);break}case P.IN_HEAD:{rL(this,t);break}case P.IN_HEAD_NO_SCRIPT:{iL(this,t);break}case P.AFTER_HEAD:{sL(this,t);break}case P.IN_BODY:{ic(this,t);break}case P.TEXT:{WL(this,t);break}case P.IN_TABLE:{Ba(this,t);break}case P.IN_TABLE_TEXT:{Ki(this,t);break}case P.IN_CAPTION:{rO(this,t);break}case P.IN_COLUMN_GROUP:{oO(this,t);break}case P.IN_TABLE_BODY:{td(this,t);break}case P.IN_ROW:{Db(this,t);break}case P.IN_CELL:{aO(this,t);break}case P.IN_SELECT:{wb(this,t);break}case P.IN_SELECT_IN_TABLE:{lO(this,t);break}case P.IN_TEMPLATE:{uO(this,t);break}case P.AFTER_BODY:{Pb(this,t);break}case P.IN_FRAMESET:{pO(this,t);break}case P.AFTER_FRAMESET:{mO(this,t);break}case P.AFTER_AFTER_BODY:{Hs(this,t);break}}}onEof(t){switch(this.insertionMode){case P.INITIAL:{Yi(this,t);break}case P.BEFORE_HTML:{ya(this,t);break}case P.BEFORE_HEAD:{ba(this,t);break}case P.IN_HEAD:{Ea(this,t);break}case P.IN_HEAD_NO_SCRIPT:{Ta(this,t);break}case P.AFTER_HEAD:{xa(this,t);break}case P.IN_BODY:case P.IN_TABLE:case P.IN_CAPTION:case P.IN_COLUMN_GROUP:case P.IN_TABLE_BODY:case P.IN_ROW:case P.IN_CELL:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:{Sb(this,t);break}case P.TEXT:{VL(this,t);break}case P.IN_TABLE_TEXT:{Ki(this,t);break}case P.IN_TEMPLATE:{Nb(this,t);break}case P.AFTER_BODY:case P.IN_FRAMESET:case P.AFTER_FRAMESET:case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{Dh(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===D.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:case P.TEXT:case P.IN_COLUMN_GROUP:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:case P.IN_FRAMESET:case P.AFTER_FRAMESET:{this._insertCharacters(t);break}case P.IN_BODY:case P.IN_CAPTION:case P.IN_CELL:case P.IN_TEMPLATE:case P.AFTER_BODY:case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{Eb(this,t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{au(this,t);break}case P.IN_TABLE_TEXT:{Ab(this,t);break}}}}function G6(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):vb(e,t),n}function q6(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const o=e.openElements.items[r];if(o===t.element)break;e._isSpecialElement(o,e.openElements.tagIDs[r])&&(n=o)}return n||(e.openElements.shortenToLength(r<0?0:r),e.activeFormattingElements.removeEntry(t)),n}function W6(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let i=0,a=o;a!==n;i++,a=o){o=e.openElements.getCommonAncestor(a);const s=e.activeFormattingElements.getElementEntry(a),l=s&&i>=z6;!s||l?(l&&e.activeFormattingElements.removeEntry(s),e.openElements.remove(a)):(a=V6(e,s),r===t&&(e.activeFormattingElements.bookmark=s),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function V6(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function Y6(e,t,n){const r=e.treeAdapter.getTagName(t),o=Ii(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const i=e.treeAdapter.getNamespaceURI(t);o===m.TEMPLATE&&i===te.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function K6(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:o}=n,i=e.treeAdapter.createElement(o.tagName,r,o.attrs);e._adoptNodes(t,i),e.treeAdapter.appendChild(t,i),e.activeFormattingElements.insertElementAfterBookmark(i,o),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,i,o.tagID)}function _h(e,t){for(let n=0;n<U6;n++){const r=G6(e,t);if(!r)break;const o=q6(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const i=W6(e,o,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(i),a&&Y6(e,a,i),K6(e,o,r)}}function ed(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Q6(e,t){e._appendCommentNode(t,e.openElements.items[0])}function X6(e,t){e._appendCommentNode(t,e.document)}function Dh(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],o=e.treeAdapter.getNodeSourceCodeLocation(r);if(o&&!o.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const i=e.openElements.items[1],a=e.treeAdapter.getNodeSourceCodeLocation(i);a&&!a.endTag&&e._setEndLocation(i,t)}}}}function J6(e,t){e._setDocumentType(t);const n=t.forceQuirks?Hn.QUIRKS:D6(t);_6(t)||e._err(t,q.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=P.BEFORE_HTML}function Yi(e,t){e._err(t,q.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Hn.QUIRKS),e.insertionMode=P.BEFORE_HTML,e._processToken(t)}function Z6(e,t){t.tagID===m.HTML?(e._insertElement(t,te.HTML),e.insertionMode=P.BEFORE_HEAD):ya(e,t)}function eL(e,t){const n=t.tagID;(n===m.HTML||n===m.HEAD||n===m.BODY||n===m.BR)&&ya(e,t)}function ya(e,t){e._insertFakeRootElement(),e.insertionMode=P.BEFORE_HEAD,e._processToken(t)}function tL(e,t){switch(t.tagID){case m.HTML:{sn(e,t);break}case m.HEAD:{e._insertElement(t,te.HTML),e.headElement=e.openElements.current,e.insertionMode=P.IN_HEAD;break}default:ba(e,t)}}function nL(e,t){const n=t.tagID;n===m.HEAD||n===m.BODY||n===m.HTML||n===m.BR?ba(e,t):e._err(t,q.endTagWithoutMatchingOpenElement)}function ba(e,t){e._insertFakeElement(H.HEAD,m.HEAD),e.headElement=e.openElements.current,e.insertionMode=P.IN_HEAD,e._processToken(t)}function er(e,t){switch(t.tagID){case m.HTML:{sn(e,t);break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:{e._appendElement(t,te.HTML),t.ackSelfClosing=!0;break}case m.TITLE:{e._switchToTextParsing(t,_t.RCDATA);break}case m.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,_t.RAWTEXT):(e._insertElement(t,te.HTML),e.insertionMode=P.IN_HEAD_NO_SCRIPT);break}case m.NOFRAMES:case m.STYLE:{e._switchToTextParsing(t,_t.RAWTEXT);break}case m.SCRIPT:{e._switchToTextParsing(t,_t.SCRIPT_DATA);break}case m.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=P.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(P.IN_TEMPLATE);break}case m.HEAD:{e._err(t,q.misplacedStartTagForHeadElement);break}default:Ea(e,t)}}function rL(e,t){switch(t.tagID){case m.HEAD:{e.openElements.pop(),e.insertionMode=P.AFTER_HEAD;break}case m.BODY:case m.BR:case m.HTML:{Ea(e,t);break}case m.TEMPLATE:{Oo(e,t);break}default:e._err(t,q.endTagWithoutMatchingOpenElement)}}function Oo(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==m.TEMPLATE&&e._err(t,q.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,q.endTagWithoutMatchingOpenElement)}function Ea(e,t){e.openElements.pop(),e.insertionMode=P.AFTER_HEAD,e._processToken(t)}function oL(e,t){switch(t.tagID){case m.HTML:{sn(e,t);break}case m.BASEFONT:case m.BGSOUND:case m.HEAD:case m.LINK:case m.META:case m.NOFRAMES:case m.STYLE:{er(e,t);break}case m.NOSCRIPT:{e._err(t,q.nestedNoscriptInHead);break}default:Ta(e,t)}}function iL(e,t){switch(t.tagID){case m.NOSCRIPT:{e.openElements.pop(),e.insertionMode=P.IN_HEAD;break}case m.BR:{Ta(e,t);break}default:e._err(t,q.endTagWithoutMatchingOpenElement)}}function Ta(e,t){const n=t.type===He.EOF?q.openElementsLeftAfterEof:q.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=P.IN_HEAD,e._processToken(t)}function aL(e,t){switch(t.tagID){case m.HTML:{sn(e,t);break}case m.BODY:{e._insertElement(t,te.HTML),e.framesetOk=!1,e.insertionMode=P.IN_BODY;break}case m.FRAMESET:{e._insertElement(t,te.HTML),e.insertionMode=P.IN_FRAMESET;break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{e._err(t,q.abandonedHeadElementChild),e.openElements.push(e.headElement,m.HEAD),er(e,t),e.openElements.remove(e.headElement);break}case m.HEAD:{e._err(t,q.misplacedStartTagForHeadElement);break}default:xa(e,t)}}function sL(e,t){switch(t.tagID){case m.BODY:case m.HTML:case m.BR:{xa(e,t);break}case m.TEMPLATE:{Oo(e,t);break}default:e._err(t,q.endTagWithoutMatchingOpenElement)}}function xa(e,t){e._insertFakeElement(H.BODY,m.BODY),e.insertionMode=P.IN_BODY,oc(e,t)}function oc(e,t){switch(t.type){case He.CHARACTER:{Tb(e,t);break}case He.WHITESPACE_CHARACTER:{Eb(e,t);break}case He.COMMENT:{ed(e,t);break}case He.START_TAG:{sn(e,t);break}case He.END_TAG:{ic(e,t);break}case He.EOF:{Sb(e,t);break}}}function Eb(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Tb(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function lL(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function cL(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function uL(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,te.HTML),e.insertionMode=P.IN_FRAMESET)}function dL(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,te.HTML)}function hL(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),Zu.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,te.HTML)}function pL(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,te.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function fL(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,te.HTML),n||(e.formElement=e.openElements.current))}function mL(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const o=e.openElements.tagIDs[r];if(n===m.LI&&o===m.LI||(n===m.DD||n===m.DT)&&(o===m.DD||o===m.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==m.ADDRESS&&o!==m.DIV&&o!==m.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,te.HTML)}function gL(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,te.HTML),e.tokenizer.state=_t.PLAINTEXT}function yL(e,t){e.openElements.hasInScope(m.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,te.HTML),e.framesetOk=!1}function bL(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(H.A);n&&(_h(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,te.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function EL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,te.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function TL(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(m.NOBR)&&(_h(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,te.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function xL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,te.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function CL(e,t){e.treeAdapter.getDocumentMode(e.document)!==Hn.QUIRKS&&e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,te.HTML),e.framesetOk=!1,e.insertionMode=P.IN_TABLE}function xb(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,te.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Cb(e){const t=sb(e,bo.TYPE);return t!=null&&t.toLowerCase()===H6}function vL(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,te.HTML),Cb(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function SL(e,t){e._appendElement(t,te.HTML),t.ackSelfClosing=!0}function AL(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._appendElement(t,te.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function kL(e,t){t.tagName=H.IMG,t.tagID=m.IMG,xb(e,t)}function _L(e,t){e._insertElement(t,te.HTML),e.skipNextNewLine=!0,e.tokenizer.state=_t.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=P.TEXT}function DL(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,_t.RAWTEXT)}function IL(e,t){e.framesetOk=!1,e._switchToTextParsing(t,_t.RAWTEXT)}function Dm(e,t){e._switchToTextParsing(t,_t.RAWTEXT)}function wL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,te.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===P.IN_TABLE||e.insertionMode===P.IN_CAPTION||e.insertionMode===P.IN_TABLE_BODY||e.insertionMode===P.IN_ROW||e.insertionMode===P.IN_CELL?P.IN_SELECT_IN_TABLE:P.IN_SELECT}function NL(e,t){e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,te.HTML)}function PL(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,te.HTML)}function RL(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(m.RTC),e._insertElement(t,te.HTML)}function LL(e,t){e._reconstructActiveFormattingElements(),gb(t),kh(t),t.selfClosing?e._appendElement(t,te.MATHML):e._insertElement(t,te.MATHML),t.ackSelfClosing=!0}function OL(e,t){e._reconstructActiveFormattingElements(),yb(t),kh(t),t.selfClosing?e._appendElement(t,te.SVG):e._insertElement(t,te.SVG),t.ackSelfClosing=!0}function Im(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,te.HTML)}function sn(e,t){switch(t.tagID){case m.I:case m.S:case m.B:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.SMALL:case m.STRIKE:case m.STRONG:{EL(e,t);break}case m.A:{bL(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{hL(e,t);break}case m.P:case m.DL:case m.OL:case m.UL:case m.DIV:case m.DIR:case m.NAV:case m.MAIN:case m.MENU:case m.ASIDE:case m.CENTER:case m.FIGURE:case m.FOOTER:case m.HEADER:case m.HGROUP:case m.DIALOG:case m.DETAILS:case m.ADDRESS:case m.ARTICLE:case m.SEARCH:case m.SECTION:case m.SUMMARY:case m.FIELDSET:case m.BLOCKQUOTE:case m.FIGCAPTION:{dL(e,t);break}case m.LI:case m.DD:case m.DT:{mL(e,t);break}case m.BR:case m.IMG:case m.WBR:case m.AREA:case m.EMBED:case m.KEYGEN:{xb(e,t);break}case m.HR:{AL(e,t);break}case m.RB:case m.RTC:{PL(e,t);break}case m.RT:case m.RP:{RL(e,t);break}case m.PRE:case m.LISTING:{pL(e,t);break}case m.XMP:{DL(e,t);break}case m.SVG:{OL(e,t);break}case m.HTML:{lL(e,t);break}case m.BASE:case m.LINK:case m.META:case m.STYLE:case m.TITLE:case m.SCRIPT:case m.BGSOUND:case m.BASEFONT:case m.TEMPLATE:{er(e,t);break}case m.BODY:{cL(e,t);break}case m.FORM:{fL(e,t);break}case m.NOBR:{TL(e,t);break}case m.MATH:{LL(e,t);break}case m.TABLE:{CL(e,t);break}case m.INPUT:{vL(e,t);break}case m.PARAM:case m.TRACK:case m.SOURCE:{SL(e,t);break}case m.IMAGE:{kL(e,t);break}case m.BUTTON:{yL(e,t);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{xL(e,t);break}case m.IFRAME:{IL(e,t);break}case m.SELECT:{wL(e,t);break}case m.OPTION:case m.OPTGROUP:{NL(e,t);break}case m.NOEMBED:case m.NOFRAMES:{Dm(e,t);break}case m.FRAMESET:{uL(e,t);break}case m.TEXTAREA:{_L(e,t);break}case m.NOSCRIPT:{e.options.scriptingEnabled?Dm(e,t):Im(e,t);break}case m.PLAINTEXT:{gL(e,t);break}case m.COL:case m.TH:case m.TD:case m.TR:case m.HEAD:case m.FRAME:case m.TBODY:case m.TFOOT:case m.THEAD:case m.CAPTION:case m.COLGROUP:break;default:Im(e,t)}}function ML(e,t){if(e.openElements.hasInScope(m.BODY)&&(e.insertionMode=P.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function FL(e,t){e.openElements.hasInScope(m.BODY)&&(e.insertionMode=P.AFTER_BODY,Pb(e,t))}function BL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function jL(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(m.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(m.FORM):n&&e.openElements.remove(n))}function HL(e){e.openElements.hasInButtonScope(m.P)||e._insertFakeElement(H.P,m.P),e._closePElement()}function UL(e){e.openElements.hasInListItemScope(m.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(m.LI),e.openElements.popUntilTagNamePopped(m.LI))}function zL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function $L(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function GL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function qL(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(H.BR,m.BR),e.openElements.pop(),e.framesetOk=!1}function vb(e,t){const n=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const i=e.openElements.items[o],a=e.openElements.tagIDs[o];if(r===a&&(r!==m.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(i,a))break}}function ic(e,t){switch(t.tagID){case m.A:case m.B:case m.I:case m.S:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.NOBR:case m.SMALL:case m.STRIKE:case m.STRONG:{_h(e,t);break}case m.P:{HL(e);break}case m.DL:case m.UL:case m.OL:case m.DIR:case m.DIV:case m.NAV:case m.PRE:case m.MAIN:case m.MENU:case m.ASIDE:case m.BUTTON:case m.CENTER:case m.FIGURE:case m.FOOTER:case m.HEADER:case m.HGROUP:case m.DIALOG:case m.ADDRESS:case m.ARTICLE:case m.DETAILS:case m.SEARCH:case m.SECTION:case m.SUMMARY:case m.LISTING:case m.FIELDSET:case m.BLOCKQUOTE:case m.FIGCAPTION:{BL(e,t);break}case m.LI:{UL(e);break}case m.DD:case m.DT:{zL(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{$L(e);break}case m.BR:{qL(e);break}case m.BODY:{ML(e,t);break}case m.HTML:{FL(e,t);break}case m.FORM:{jL(e);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{GL(e,t);break}case m.TEMPLATE:{Oo(e,t);break}default:vb(e,t)}}function Sb(e,t){e.tmplInsertionModeStack.length>0?Nb(e,t):Dh(e,t)}function WL(e,t){var n;t.tagID===m.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function VL(e,t){e._err(t,q.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function au(e,t){if(bb.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=P.IN_TABLE_TEXT,t.type){case He.CHARACTER:{kb(e,t);break}case He.WHITESPACE_CHARACTER:{Ab(e,t);break}}else ns(e,t)}function YL(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,te.HTML),e.insertionMode=P.IN_CAPTION}function KL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,te.HTML),e.insertionMode=P.IN_COLUMN_GROUP}function QL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(H.COLGROUP,m.COLGROUP),e.insertionMode=P.IN_COLUMN_GROUP,Ih(e,t)}function XL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,te.HTML),e.insertionMode=P.IN_TABLE_BODY}function JL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(H.TBODY,m.TBODY),e.insertionMode=P.IN_TABLE_BODY,ac(e,t)}function ZL(e,t){e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function eO(e,t){Cb(t)?e._appendElement(t,te.HTML):ns(e,t),t.ackSelfClosing=!0}function tO(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,te.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function yi(e,t){switch(t.tagID){case m.TD:case m.TH:case m.TR:{JL(e,t);break}case m.STYLE:case m.SCRIPT:case m.TEMPLATE:{er(e,t);break}case m.COL:{QL(e,t);break}case m.FORM:{tO(e,t);break}case m.TABLE:{ZL(e,t);break}case m.TBODY:case m.TFOOT:case m.THEAD:{XL(e,t);break}case m.INPUT:{eO(e,t);break}case m.CAPTION:{YL(e,t);break}case m.COLGROUP:{KL(e,t);break}default:ns(e,t)}}function Ba(e,t){switch(t.tagID){case m.TABLE:{e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode());break}case m.TEMPLATE:{Oo(e,t);break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:ns(e,t)}}function ns(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,oc(e,t),e.fosterParentingEnabled=n}function Ab(e,t){e.pendingCharacterTokens.push(t)}function kb(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Ki(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)ns(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const _b=new Set([m.CAPTION,m.COL,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]);function nO(e,t){const n=t.tagID;_b.has(n)?e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P.IN_TABLE,yi(e,t)):sn(e,t)}function rO(e,t){const n=t.tagID;switch(n){case m.CAPTION:case m.TABLE:{e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P.IN_TABLE,n===m.TABLE&&Ba(e,t));break}case m.BODY:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:ic(e,t)}}function Ih(e,t){switch(t.tagID){case m.HTML:{sn(e,t);break}case m.COL:{e._appendElement(t,te.HTML),t.ackSelfClosing=!0;break}case m.TEMPLATE:{er(e,t);break}default:xl(e,t)}}function oO(e,t){switch(t.tagID){case m.COLGROUP:{e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=P.IN_TABLE);break}case m.TEMPLATE:{Oo(e,t);break}case m.COL:break;default:xl(e,t)}}function xl(e,t){e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=P.IN_TABLE,e._processToken(t))}function ac(e,t){switch(t.tagID){case m.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,te.HTML),e.insertionMode=P.IN_ROW;break}case m.TH:case m.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(H.TR,m.TR),e.insertionMode=P.IN_ROW,sc(e,t);break}case m.CAPTION:case m.COL:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE,yi(e,t));break}default:yi(e,t)}}function td(e,t){const n=t.tagID;switch(t.tagID){case m.TBODY:case m.TFOOT:case m.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE);break}case m.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE,Ba(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TD:case m.TH:case m.TR:break;default:Ba(e,t)}}function sc(e,t){switch(t.tagID){case m.TH:case m.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,te.HTML),e.insertionMode=P.IN_CELL,e.activeFormattingElements.insertMarker();break}case m.CAPTION:case m.COL:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY,ac(e,t));break}default:yi(e,t)}}function Db(e,t){switch(t.tagID){case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY);break}case m.TABLE:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY,td(e,t));break}case m.TBODY:case m.TFOOT:case m.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(m.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY,td(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TD:case m.TH:break;default:Ba(e,t)}}function iO(e,t){const n=t.tagID;_b.has(n)?(e.openElements.hasInTableScope(m.TD)||e.openElements.hasInTableScope(m.TH))&&(e._closeTableCell(),sc(e,t)):sn(e,t)}function aO(e,t){const n=t.tagID;switch(n){case m.TD:case m.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P.IN_ROW);break}case m.TABLE:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Db(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:break;default:ic(e,t)}}function Ib(e,t){switch(t.tagID){case m.HTML:{sn(e,t);break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._insertElement(t,te.HTML);break}case m.OPTGROUP:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._insertElement(t,te.HTML);break}case m.HR:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._appendElement(t,te.HTML),t.ackSelfClosing=!0;break}case m.INPUT:case m.KEYGEN:case m.TEXTAREA:case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),t.tagID!==m.SELECT&&e._processStartTag(t));break}case m.SCRIPT:case m.TEMPLATE:{er(e,t);break}}}function wb(e,t){switch(t.tagID){case m.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===m.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===m.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop();break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop();break}case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode());break}case m.TEMPLATE:{Oo(e,t);break}}}function sO(e,t){const n=t.tagID;n===m.CAPTION||n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR||n===m.TD||n===m.TH?(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Ib(e,t)}function lO(e,t){const n=t.tagID;n===m.CAPTION||n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR||n===m.TD||n===m.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e.onEndTag(t)):wb(e,t)}function cO(e,t){switch(t.tagID){case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{er(e,t);break}case m.CAPTION:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.tmplInsertionModeStack[0]=P.IN_TABLE,e.insertionMode=P.IN_TABLE,yi(e,t);break}case m.COL:{e.tmplInsertionModeStack[0]=P.IN_COLUMN_GROUP,e.insertionMode=P.IN_COLUMN_GROUP,Ih(e,t);break}case m.TR:{e.tmplInsertionModeStack[0]=P.IN_TABLE_BODY,e.insertionMode=P.IN_TABLE_BODY,ac(e,t);break}case m.TD:case m.TH:{e.tmplInsertionModeStack[0]=P.IN_ROW,e.insertionMode=P.IN_ROW,sc(e,t);break}default:e.tmplInsertionModeStack[0]=P.IN_BODY,e.insertionMode=P.IN_BODY,sn(e,t)}}function uO(e,t){t.tagID===m.TEMPLATE&&Oo(e,t)}function Nb(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Dh(e,t)}function dO(e,t){t.tagID===m.HTML?sn(e,t):Cl(e,t)}function Pb(e,t){var n;if(t.tagID===m.HTML){if(e.fragmentContext||(e.insertionMode=P.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===m.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Cl(e,t)}function Cl(e,t){e.insertionMode=P.IN_BODY,oc(e,t)}function hO(e,t){switch(t.tagID){case m.HTML:{sn(e,t);break}case m.FRAMESET:{e._insertElement(t,te.HTML);break}case m.FRAME:{e._appendElement(t,te.HTML),t.ackSelfClosing=!0;break}case m.NOFRAMES:{er(e,t);break}}}function pO(e,t){t.tagID===m.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==m.FRAMESET&&(e.insertionMode=P.AFTER_FRAMESET))}function fO(e,t){switch(t.tagID){case m.HTML:{sn(e,t);break}case m.NOFRAMES:{er(e,t);break}}}function mO(e,t){t.tagID===m.HTML&&(e.insertionMode=P.AFTER_AFTER_FRAMESET)}function gO(e,t){t.tagID===m.HTML?sn(e,t):Hs(e,t)}function Hs(e,t){e.insertionMode=P.IN_BODY,oc(e,t)}function yO(e,t){switch(t.tagID){case m.HTML:{sn(e,t);break}case m.NOFRAMES:{er(e,t);break}}}function bO(e,t){t.chars=yt,e._insertCharacters(t)}function EO(e,t){e._insertCharacters(t),e.framesetOk=!1}function Rb(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==te.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function TO(e,t){if(O6(t))Rb(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===te.MATHML?gb(t):r===te.SVG&&(M6(t),yb(t)),kh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function xO(e,t){if(t.tagID===m.P||t.tagID===m.BR){Rb(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===te.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}H.AREA,H.BASE,H.BASEFONT,H.BGSOUND,H.BR,H.COL,H.EMBED,H.FRAME,H.HR,H.IMG,H.INPUT,H.KEYGEN,H.LINK,H.META,H.PARAM,H.SOURCE,H.TRACK,H.WBR;const CO=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,vO=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),wm={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Lb(e,t){const n=RO(e),r=Gl("type",{handlers:{root:SO,element:AO,text:kO,comment:Mb,doctype:_O,raw:IO},unknown:wO}),o={parser:n?new _m(wm):_m.getFragmentParser(void 0,wm),handle(s){r(s,o)},stitches:!1,options:t||{}};r(e,o),wi(o,hr());const i=n?o.parser.document:o.parser.getFragment(),a=A4(i,{file:o.options.file});return o.stitches&&mn(a,"comment",function(s,l,c){const d=s;if(d.value.stitch&&c&&l!==void 0){const u=c.children;return u[l]=d.value.stitch,l}}),a.type==="root"&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function Ob(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function SO(e,t){Ob(e.children,t)}function AO(e,t){NO(e,t),Ob(e.children,t),PO(e,t)}function kO(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:He.CHARACTER,chars:e.value,location:rs(e)};wi(t,hr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function _O(e,t){const n={type:He.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:rs(e)};wi(t,hr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function DO(e,t){t.stitches=!0;const n=LO(e);if("children"in e&&"children"in n){const r=Lb({type:"root",children:e.children},t.options);n.children=r.children}Mb({type:"comment",value:{stitch:n}},t)}function Mb(e,t){const n=e.value,r={type:He.COMMENT,data:n,location:rs(e)};wi(t,hr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function IO(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Fb(t,hr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(CO,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function wO(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))DO(n,t);else{let r="";throw vO.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function wi(e,t){Fb(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=_t.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Fb(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function NO(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===_t.PLAINTEXT)return;wi(t,hr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:mo.html;o===mo.html&&n==="svg"&&(o=mo.svg);const i=H4({...e,children:[]},{space:o===mo.svg?"svg":"html"}),a={type:He.START_TAG,tagName:n,tagID:Ii(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in i?i.attrs:[],location:rs(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function PO(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&B0.includes(n)||t.parser.tokenizer.state===_t.PLAINTEXT)return;wi(t,Jl(e));const r={type:He.END_TAG,tagName:n,tagID:Ii(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:rs(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===_t.RCDATA||t.parser.tokenizer.state===_t.RAWTEXT||t.parser.tokenizer.state===_t.SCRIPT_DATA)&&(t.parser.tokenizer.state=_t.DATA)}function RO(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function rs(e){const t=hr(e)||{line:void 0,column:void 0,offset:void 0},n=Jl(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function LO(e){return"children"in e?So({...e,children:[]}):So(e)}function Bb(e){return function(t,n){return Lb(t,{...e,file:n})}}const OO=/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]/i,MO=/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)(\/.*)?\]/i,FO=({legacyTitle:e=!1,tagName:t="div"}={})=>n=>{mn(n,"blockquote",(r,o,i)=>{let a="",s="",l=!0,c=r.children.map(d=>{if(l&&d.type==="paragraph"){const u=d.children[0],h=u.type==="text"?u.value:"",p=e?MO:OO,g=h.match(p);if(g&&(l=!1,a=g[1].toLocaleLowerCase(),s=e&&g[2]||a.toLocaleUpperCase(),h.includes(`
|
|
173
|
+
`)&&(d.children[0]={type:"text",value:h.replace(p,"").replace(/^\n+/,"")}),!h.includes(`
|
|
174
|
+
`))){const b=[];d.children.forEach((T,E)=>{E!=0&&(E==1&&T.type==="break"||b.push(T))}),d.children=[...b]}}return d});a&&(r.data={hName:t,hProperties:{class:`markdown-alert markdown-alert-${a}`,dir:"auto"}},c.unshift({type:"paragraph",children:[BO(a),{type:"text",value:s.replace(/^\//,"")}],data:{hProperties:{class:"markdown-alert-title",dir:"auto"}}})),r.children=[...c]})};function BO(e){let t=jO[e]??"";return{type:"emphasis",data:{hName:"svg",hProperties:{class:"octicon",viewBox:"0 0 16 16",width:"16",height:"16",ariaHidden:"true"}},children:[{type:"emphasis",data:{hName:"path",hProperties:{d:t}},children:[]}]}}const jO={note:"M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z",tip:"M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z",important:"M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z",warning:"M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z",caution:"M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"};function HO(e,t){if(typeof document>"u")return;const n=document.createElement("textarea");n.value=e,n.setAttribute("readonly",""),n.style={position:"absolute",left:"-9999px"},document.body.appendChild(n);const r=document.getSelection().rangeCount>0?document.getSelection().getRangeAt(0):!1;n.select();let o=!1;try{o=!!document.execCommand("copy")}catch{o=!1}document.body.removeChild(n),r&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(r)),t&&t(o)}function jb(e){if(!e)return null;var t=e;return t.dataset.code&&t.classList.contains("copied")?t:t.parentElement?jb(t.parentElement):null}function UO(e){var t=n=>{var r=jb(n.target);r&&(r.classList.add("active"),HO(r.dataset.code,function(){setTimeout(()=>{r.classList.remove("active")},2e3)}))};O.useEffect(()=>{var n,r;return(n=e.current)==null||n.removeEventListener("click",t,!1),(r=e.current)==null||r.addEventListener("click",t,!1),()=>{var o;(o=e.current)==null||o.removeEventListener("click",t,!1)}},[e])}var zO=["prefixCls","className","source","style","disableCopy","skipHtml","onScroll","onMouseOver","pluginsFilter","rehypeRewrite","wrapperElement","warpperElement","urlTransform"],$O=e=>e;const GO=O.forwardRef((e,t)=>{var{prefixCls:n="wmde-markdown wmde-markdown-color",className:r,source:o,style:i,disableCopy:a=!1,skipHtml:s=!0,onScroll:l,onMouseOver:c,pluginsFilter:d,wrapperElement:u={},warpperElement:h={},urlTransform:p}=e,g=lw(e,zO),b=O.useRef(null);O.useImperativeHandle(t,()=>Ir({},e,{mdp:b}),[b,e]);var T=(n||"")+" "+(r||"");UO(b);var E=[...g.rehypePlugins||[]],C={allowElement:(w,S,B)=>g.allowElement?g.allowElement(w,S,B):/^[A-Za-z0-9]+$/.test(w.tagName)};s&&E.push(Bb);var x=[FO,...g.remarkPlugins||[],f4],k=Ir({},h,u);return f.jsx("div",Ir({ref:b,onScroll:l,onMouseOver:c},k,{className:T,style:i,children:f.jsx(oP,Ir({},C,g,{skipHtml:s,urlTransform:p||$O,rehypePlugins:d?d("rehype",E):E,remarkPlugins:d?d("remark",x):x,children:o||""}))}))});var Us={},nd={};function qO(e,t){for(var n=t,r=0;r<e.length;r++){var o=r===e.length-1,i=e.charAt(r),a=n[i]||(n[i]={chars:{}});o&&(a.self=e),n=a.chars}}function Nm(e){if(e.length===0)return Us;for(var t={},n=0,r=e;n<r.length;n++){var o=r[n];qO(o,t)}return t}function WO(e){if(e.length===0)return nd;for(var t={},n=0,r=e;n<r.length;n++){var o=r[n];t[o]=!0}return t}var vs={},Pm={type:"String",optional:!0};function VO(e){var t={type:"NoArgument",optional:!1};function n(a){if(t.type&&t.type!==a&&t.type!=="NoArgument")throw new Error('Conflicting pseudo-class argument type: "'.concat(t.type,'" vs "').concat(a,'".'));t.type=a}for(var r=0,o=e;r<o.length;r++){var i=o[r];i==="NoArgument"&&(t.optional=!0),i==="Formula"&&n("Formula"),i==="FormulaOfSelector"&&(n("Formula"),t.ofSelector=!0),i==="String"&&n("String"),i==="Selector"&&n("Selector")}return t}function YO(e){for(var t={},n=0,r=Object.keys(e);n<r.length;n++){var o=r[n],i=e[o];if(i)for(var a=0,s=i;a<s.length;a++){var l=s[a];(t[l]||(t[l]=[])).push(o)}}return t}function Rm(e){for(var t=YO(e),n={},r=0,o=Object.keys(t);r<o.length;r++){var i=o[r],a=t[i];a&&(n[i]=VO(a))}return n}var bi=function(){return bi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},bi.apply(this,arguments)},KO={},rd={wildcard:!0};function QO(e){return e?typeof e=="boolean"?rd:e:KO}function XO(e,t){return function(n,r){return t(e(n),e(r))}}function JO(e){return function(t,n){var r=e(t,n);if(!r)throw new Error("Syntax definition cannot be null or undefined.");return r}}function Lm(e,t){return function(n,r){return r===!0?e:t(n===!0?e:n,r)}}function Yo(e){return function(t,n){if(!n||!t)return n;if(typeof n!="object"||n===null)throw new Error("Unexpected syntax definition extension type: ".concat(n,"."));for(var r=bi({},t),o=0,i=Object.entries(n);o<i.length;o++){var a=i[o],s=a[0],l=a[1];if(s!=="latest"){var c=e[s];r[s]=c(t[s],l)}}return r}}function Tr(e,t){return t!==void 0?t:e}function Ss(e,t){return t?e?e.concat(t):t:e}function Om(e,t){if(!t)return e;if(!e)return t;for(var n=bi({},e),r=0,o=Object.entries(t);r<o.length;r++){var i=o[r],a=i[0],s=i[1];if(!s){delete n[a];continue}var l=e[a];if(!l){n[a]=s;continue}n[a]=l.concat(s)}return n}var Eo=JO(Yo({baseSyntax:Tr,modules:Ss,tag:Lm(rd,Yo({wildcard:Tr})),ids:Tr,classNames:Tr,namespace:Lm(rd,Yo({wildcard:Tr})),combinators:Ss,attributes:Yo({operators:Ss,caseSensitivityModifiers:Ss,unknownCaseSensitivityModifiers:Tr}),pseudoClasses:Yo({unknown:Tr,definitions:Om}),pseudoElements:Yo({unknown:Tr,notation:Tr,definitions:XO(function(e){return Array.isArray(e)?{NoArgument:e}:e},Om)})})),Hb={tag:{},ids:!0,classNames:!0,combinators:[],pseudoElements:{unknown:"reject",notation:"singleColon",definitions:["first-letter","first-line"]},pseudoClasses:{unknown:"reject",definitions:{NoArgument:["link","visited","active"]}}},Ub=Eo(Hb,{tag:{wildcard:!0},combinators:[">","+"],attributes:{unknownCaseSensitivityModifiers:"reject",operators:["=","~=","|="]},pseudoElements:{definitions:["before","after"]},pseudoClasses:{unknown:"reject",definitions:{NoArgument:["hover","focus","first-child"],String:["lang"]}}}),od=Eo(Ub,{namespace:{wildcard:!0},combinators:["~"],attributes:{operators:["^=","$=","*="]},pseudoElements:{notation:"both"},pseudoClasses:{definitions:{NoArgument:["root","last-child","first-of-type","last-of-type","only-child","only-of-type","empty","target","enabled","disabled","checked","indeterminate"],Formula:["nth-child","nth-last-child","nth-of-type","nth-last-of-type"],Selector:["not"]}}}),zb=Eo(od,{combinators:["||"],attributes:{caseSensitivityModifiers:["i","I","s","S"]},pseudoClasses:{definitions:{NoArgument:["any-link","local-link","target-within","scope","current","past","future","focus-within","focus-visible","read-write","read-only","placeholder-shown","default","valid","invalid","in-range","out-of-range","required","optional","blank","user-invalid","playing","paused","autofill","modal","fullscreen","picture-in-picture","defined","loading","popover-open"],Formula:["nth-col","nth-last-col"],String:["dir"],FormulaOfSelector:["nth-child","nth-last-child"],Selector:["current","is","where","has","state"]}},pseudoElements:{definitions:{NoArgument:["marker"],Selector:["part"]}}}),vl={"css-position-1":{latest:!1,pseudoClasses:{definitions:{NoArgument:["static","relative","absolute"]}}},"css-position-2":{latest:!1,pseudoClasses:{definitions:{NoArgument:["static","relative","absolute","fixed"]}}},"css-position-3":{latest:!1,pseudoClasses:{definitions:{NoArgument:["sticky","fixed","absolute","relative","static"]}}},"css-position-4":{latest:!0,pseudoClasses:{definitions:{NoArgument:["sticky","fixed","absolute","relative","static","initial"]}}},"css-scoping-1":{latest:!0,pseudoClasses:{definitions:{NoArgument:["host","host-context"],Selector:["host","host-context"]}},pseudoElements:{definitions:{Selector:["slotted"]}}},"css-pseudo-4":{latest:!0,pseudoElements:{definitions:{NoArgument:["marker","selection","target-text","search-text","spelling-error","grammar-error","backdrop","file-selector-button","prefix","postfix","placeholder","details-content"],String:["highlight"]}}},"css-shadow-parts-1":{latest:!0,pseudoElements:{definitions:{Selector:["part"]}}}},$b=bi(bi({},zb),{modules:Object.entries(vl).filter(function(e){var t=e[1].latest;return t}).map(function(e){var t=e[0];return t})}),ZO=Eo($b,{pseudoElements:{unknown:"accept"},pseudoClasses:{unknown:"accept"},attributes:{unknownCaseSensitivityModifiers:"accept"}}),id={css1:Hb,css2:Ub,css3:od,"selectors-3":od,"selectors-4":zb,latest:$b,progressive:ZO};function eM(){for(var e={pseudoClasses:{},pseudoElements:{}},t=["css1","css2","css3","selectors-3","selectors-4"],n=0,r=t;n<r.length;n++){var o=r[n],i=id[o];if(i.pseudoClasses&&typeof i.pseudoClasses=="object"){var a=i.pseudoClasses.definitions;if(a)for(var s=0,l=Object.entries(a);s<l.length;s++)for(var c=l[s],d=c[1],u=0,h=d;u<h.length;u++){var p=h[u];e.pseudoClasses[p]||(e.pseudoClasses[p]=[]),e.pseudoClasses[p].includes(o)||e.pseudoClasses[p].push(o)}}if(i.pseudoElements&&typeof i.pseudoElements=="object"){var a=i.pseudoElements.definitions;if(a)if(Array.isArray(a))for(var g=0,b=a;g<b.length;g++){var T=b[g];e.pseudoElements[T]||(e.pseudoElements[T]=[]),e.pseudoElements[T].includes(o)||e.pseudoElements[T].push(o)}else for(var E=0,C=Object.values(a);E<C.length;E++)for(var d=C[E],x=0,k=d;x<k.length;x++){var w=k[x];e.pseudoElements[w]||(e.pseudoElements[w]=[]),e.pseudoElements[w].includes(o)||e.pseudoElements[w].push(o)}}}for(var S=0,B=Object.entries(vl);S<B.length;S++){var W=B[S],U=W[0],y=W[1];if(y.pseudoClasses&&typeof y.pseudoClasses=="object"){var a=y.pseudoClasses.definitions;if(a)for(var R=0,F=Object.values(a);R<F.length;R++)for(var d=F[R],M=0,z=d;M<z.length;M++){var X=z[M];e.pseudoClasses[X]||(e.pseudoClasses[X]=[]),e.pseudoClasses[X].includes(U)||e.pseudoClasses[X].push(U)}}if(y.pseudoElements&&typeof y.pseudoElements=="object"){var a=y.pseudoElements.definitions;if(a)if(Array.isArray(a))for(var Z=0,me=a;Z<me.length;Z++){var ce=me[Z];e.pseudoElements[ce]||(e.pseudoElements[ce]=[]),e.pseudoElements[ce].includes(U)||e.pseudoElements[ce].push(U)}else for(var ee=0,I=Object.values(a);ee<I.length;ee++)for(var d=I[ee],ue=0,J=d;ue<J.length;ue++){var A=J[ue];e.pseudoElements[A]||(e.pseudoElements[A]=[]),e.pseudoElements[A].includes(U)||e.pseudoElements[A].push(U)}}}return e}var Mm=eM();function Qi(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="-"||e==="_"||e==="\\"||e>=" "}function Fm(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="-"||e==="_"||e>=" "}function Xi(e){return e>="a"&&e<="f"||e>="A"&&e<="F"||e>="0"&&e<="9"}var tM={" ":!0," ":!0,"\n":!0,"\r":!0,"\f":!0},nM={'"':!0,"'":!0},su={0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0},rM=6,lu="css-selector-parser parse error: ";function oM(e){e===void 0&&(e={});var t=e.syntax,n=t===void 0?"latest":t,r=e.substitutes,o=e.strict,i=o===void 0?!0:o,a=e.modules,s=typeof n=="object"?n:id[n];if(s.baseSyntax&&(s=Eo(id[s.baseSyntax],s)),s.modules&&s.modules.length>0)for(var l=0,c=s.modules;l<c.length;l++){var d=c[l],u=vl[d];u&&(s=Eo(u,s))}if(a&&a.length>0)for(var h=0,p=a;h<p.length;h++){var g=p[h],u=vl[g];u&&(s=Eo(u,s))}var b=s.tag?[!0,!!QO(s.tag).wildcard]:[!1,!1],T=b[0],E=b[1],C=!!s.ids,x=!!s.classNames,k=!!s.namespace,w=s.namespace&&(s.namespace===!0||s.namespace.wildcard===!0);if(k&&!T)throw new Error("".concat(lu,"Namespaces cannot be enabled while tags are disabled."));var S=!!r,B=s.combinators?Nm(s.combinators):Us,W=s.attributes?[!0,s.attributes.operators?Nm(s.attributes.operators):Us,s.attributes.caseSensitivityModifiers?WO(s.attributes.caseSensitivityModifiers):nd,s.attributes.unknownCaseSensitivityModifiers==="accept"]:[!1,Us,nd,!1],U=W[0],y=W[1],R=W[2],F=W[3],M=F||Object.keys(R).length>0,z=s.pseudoClasses?[!0,s.pseudoClasses.definitions?Rm(s.pseudoClasses.definitions):vs,s.pseudoClasses.unknown==="accept"]:[!1,vs,!1],X=z[0],Z=z[1],me=z[2],ce=s.pseudoElements?[!0,s.pseudoElements.notation==="singleColon"||s.pseudoElements.notation==="both",!s.pseudoElements.notation||s.pseudoElements.notation==="doubleColon"||s.pseudoElements.notation==="both",s.pseudoElements.definitions?Rm(Array.isArray(s.pseudoElements.definitions)?{NoArgument:s.pseudoElements.definitions}:s.pseudoElements.definitions):vs,s.pseudoElements.unknown==="accept"]:[!1,!1,!1,vs,!1],ee=ce[0],I=ce[1],ue=ce[2],J=ce[3],A=ce[4],Q="",ge=Q.length,de=0,ye="",he=function(ie){return ye===ie},Fe=function(){return he("*")||Qi(ye)},Be=function(ie){de=ie,ye=Q.charAt(de)},xe=function(){de++,ye=Q.charAt(de)},dt=function(){var ie=ye;return de++,ye=Q.charAt(de),ie};function Ze(ie){var ne=Math.min(ge-1,de),Oe=new Error("".concat(lu).concat(ie," Pos: ").concat(ne,"."));throw Oe.position=ne,Oe.name="ParserError",Oe}function be(ie,ne){if(!ie)return Ze(ne)}var Jt=function(){be(de<ge,"Unexpected end of input.")},bt=function(){return de>=ge},_e=function(ie){be(de<ge,'Expected "'.concat(ie,'" but end of input reached.')),be(ye===ie,'Expected "'.concat(ie,'" but "').concat(ye,'" found.')),de++,ye=Q.charAt(de)};function St(ie){var ne=ht(ie,de);if(ne)return de+=ne.length,ye=Q.charAt(de),ne}function ht(ie,ne){var Oe=Q.charAt(ne),Ie=ie[Oe];if(Ie){var qt=ht(Ie.chars,ne+1);if(qt)return qt;if(Ie.self)return Ie.self}}function pt(){for(var ie=dt(),ne=1;Xi(ye)&&ne<rM;)ie+=dt(),ne++;return Mr(),String.fromCharCode(parseInt(ie,16))}function Se(ie){var ne="";for(_e(ie);de<ge;){if(he(ie))return xe(),ne;he("\\")?(xe(),he(ie)?(ne+=ie,xe()):ye===`
|
|
175
|
+
`||ye==="\f"?xe():ye==="\r"?(xe(),he(`
|
|
176
|
+
`)&&xe()):Xi(ye)?ne+=pt():(ne+=ye,xe())):(ne+=ye,xe())}return ne}function fe(){if(!Qi(ye))return null;for(var ie="";he("-");)ie+=ye,xe();for(ie==="-"&&!Fm(ye)&&!he("\\")&&Ze("Identifiers cannot consist of a single hyphen."),i&&ie.length>=2&&Ze("Identifiers cannot start with two hyphens with strict mode on."),su[ye]&&Ze("Identifiers cannot start with hyphens followed by digits.");de<ge;)if(Fm(ye))ie+=dt();else if(he("\\"))xe(),Jt(),Xi(ye)?ie+=pt():ie+=dt();else break;return ie}function Kn(){for(var ie="";de<ge&&!he(")");)if(he("\\")){if(xe(),bt()&&!i)return(ie+"\\").trim();Jt(),Xi(ye)?ie+=pt():ie+=dt()}else ie+=dt();return ie.trim()}function Mr(){if(ye===" "||ye===" "||ye==="\f"||ye===`
|
|
177
|
+
`){xe();return}ye==="\r"&&xe(),ye===`
|
|
178
|
+
`&&xe()}function Ke(){for(;tM[ye];)xe()}function V(ie){ie===void 0&&(ie=!1),Ke();for(var ne=[en(ie)];he(",");)xe(),Ke(),ne.push(en(ie));return{type:"Selector",rules:ne}}function re(){_e("["),Ke();var ie;if(he("|")){be(k,"Namespaces are not enabled."),xe();var ne=fe();be(ne,"Expected attribute name."),ie={type:"Attribute",name:ne,namespace:{type:"NoNamespace"}}}else if(he("*")){be(k,"Namespaces are not enabled."),be(w,"Wildcard namespace is not enabled."),xe(),_e("|");var Oe=fe();be(Oe,"Expected attribute name."),ie={type:"Attribute",name:Oe,namespace:{type:"WildcardNamespace"}}}else{var Ie=fe();if(be(Ie,"Expected attribute name."),ie={type:"Attribute",name:Ie},he("|")){var qt=de;if(xe(),Qi(ye)){be(k,"Namespaces are not enabled.");var tr=fe();be(tr,"Expected attribute name."),ie={type:"Attribute",name:tr,namespace:{type:"NamespaceName",name:Ie}}}else Be(qt)}}if(be(ie.name,"Expected attribute name."),Ke(),bt()&&!i)return ie;if(he("]"))xe();else{if(ie.operator=St(y),be(ie.operator,"Expected a valid attribute selector operator."),Ke(),Jt(),nM[ye])ie.value={type:"String",value:Se(ye)};else if(S&&he("$")){xe();var Qn=fe();be(Qn,"Expected substitute name."),ie.value={type:"Substitution",name:Qn}}else{var nr=fe();be(nr,"Expected attribute value."),ie.value={type:"String",value:nr}}if(Ke(),bt()&&!i)return ie;if(!he("]")){var hn=fe();if(be(hn,"Expected end of attribute selector."),ie.caseSensitivityModifier=hn,be(M,"Attribute case sensitivity modifiers are not enabled."),be(F||R[ie.caseSensitivityModifier],"Unknown attribute case sensitivity modifier."),Ke(),bt()&&!i)return ie}_e("]")}return ie}function Ae(){for(var ie="";su[ye];)ie+=dt();return be(ie!=="","Formula parse error."),parseInt(ie)}var $e=function(){return he("-")||he("+")||su[ye]};function Ve(){if(he("e")||he("o")){var ie=fe();if(ie==="even")return Ke(),[2,0];if(ie==="odd")return Ke(),[2,1]}var ne=null,Oe=1;if(he("-")&&(xe(),Oe=-1),$e()&&(he("+")&&xe(),ne=Ae(),!he("\\")&&!he("n")))return[0,ne*Oe];ne===null&&(ne=1),ne*=Oe;var Ie;if(he("\\")?(xe(),Xi(ye)?Ie=pt():Ie=dt()):Ie=dt(),be(Ie==="n",'Formula parse error: expected "n".'),Ke(),he("+")||he("-")){var qt=he("+")?1:-1;return xe(),Ke(),[ne,qt*Ae()]}else return[ne,0]}function et(ie,ne,Oe){var Ie;if(he("(")){if(xe(),Ke(),S&&he("$")){xe();var qt=fe();be(qt,"Expected substitute name."),Ie={type:"Substitution",name:qt}}else if(Oe.type==="String")Ie={type:"String",value:Kn()},be(Ie.value,"Expected ".concat(ne," argument value."));else if(Oe.type==="Selector")Ie=V(!0);else if(Oe.type==="Formula"){var tr=Ve(),Qn=tr[0],nr=tr[1];if(Ie={type:"Formula",a:Qn,b:nr},Oe.ofSelector&&(Ke(),he("o")||he("\\"))){var hn=fe();be(hn==="of","Formula of selector parse error."),Ke(),Ie={type:"FormulaOfSelector",a:Qn,b:nr,selector:en()}}}else return Ze("Invalid ".concat(ne," signature."));if(Ke(),bt()&&!i)return Ie;_e(")")}else be(Oe.optional,"Argument is required for ".concat(ne,' "').concat(ie,'".'));return Ie}function Zt(){if(he("*"))return be(E,"Wildcard tag name is not enabled."),xe(),{type:"WildcardTag"};if(Qi(ye)){be(T,"Tag names are not enabled.");var ie=fe();return be(ie,"Expected tag name."),{type:"TagName",name:ie}}else return Ze("Expected tag name.")}function Kt(){if(he("*")){var ie=de;if(xe(),!he("|")||(xe(),!Fe()))return Be(ie),Zt();be(k,"Namespaces are not enabled."),be(w,"Wildcard namespace is not enabled.");var ne=Zt();return ne.namespace={type:"WildcardNamespace"},ne}else if(he("|")){be(k,"Namespaces are not enabled."),xe();var ne=Zt();return ne.namespace={type:"NoNamespace"},ne}else if(Qi(ye)){var Oe=fe();if(be(Oe,"Expected tag name."),!he("|"))return be(T,"Tag names are not enabled."),{type:"TagName",name:Oe};var ie=de;if(xe(),!Fe())return Be(ie),{type:"TagName",name:Oe};be(k,"Namespaces are not enabled.");var ne=Zt();return ne.namespace={type:"NamespaceName",name:Oe},ne}else return Ze("Expected tag name.")}function en(ie){var ne,Oe;ie===void 0&&(ie=!1);var Ie={type:"Rule",items:[]};if(ie){var qt=St(B);qt&&(Ie.combinator=qt,Ke())}for(;de<ge;)if(Fe())be(Ie.items.length===0,"Unexpected tag/namespace start."),Ie.items.push(Kt());else if(he("|")){var tr=de;if(xe(),Fe())be(Ie.items.length===0,"Unexpected tag/namespace start."),Be(tr),Ie.items.push(Kt());else{Be(tr);break}}else if(he(".")){be(x,"Class names are not enabled."),xe();var Qn=fe();be(Qn,"Expected class name."),Ie.items.push({type:"ClassName",name:Qn})}else if(he("#")){be(C,"IDs are not enabled."),xe();var nr=fe();be(nr,"Expected ID name."),Ie.items.push({type:"Id",name:nr})}else if(he("["))be(U,"Attributes are not enabled."),Ie.items.push(re());else if(he(":")){var hn=!1,to=!1;xe(),he(":")&&(be(ee,"Pseudo elements are not enabled."),be(ue,"Pseudo elements double colon notation is not enabled."),hn=!0,xe());var wt=fe();if(be(hn||wt,"Expected pseudo-class name."),be(!hn||wt,"Expected pseudo-element name."),be(wt,"Expected pseudo-class name."),!(!hn||A||Object.prototype.hasOwnProperty.call(J,wt))){var mr=Mm.pseudoElements[wt],no='Unknown pseudo-element "'.concat(wt,'"');mr&&mr.length>0&&(no+=". It is defined in: ".concat(mr.join(", "))),Ze(no+".")}if(to=ee&&(hn||!hn&&I&&Object.prototype.hasOwnProperty.call(J,wt)),to){var L=(ne=J[wt])!==null&&ne!==void 0?ne:A&&Pm,j={type:"PseudoElement",name:wt},$=et(wt,"pseudo-element",L);$&&(be($.type!=="Formula"&&$.type!=="FormulaOfSelector","Pseudo-elements cannot have formula argument."),j.argument=$),Ie.items.push(j)}else{be(X,"Pseudo-classes are not enabled.");var L=(Oe=Z[wt])!==null&&Oe!==void 0?Oe:me&&Pm;if(!L){var mr=Mm.pseudoClasses[wt],no='Unknown pseudo-class: "'.concat(wt,'"');mr&&mr.length>0&&(no+=". It is defined in: ".concat(mr.join(", "))),Ze(no+".")}var $=et(wt,"pseudo-class",L),ae={type:"PseudoClass",name:wt};$&&(ae.argument=$),Ie.items.push(ae)}}else break;if(Ie.items.length===0)return bt()?Ze("Expected rule but end of input reached."):Ze('Expected rule but "'.concat(ye,'" found.'));if(Ke(),!bt()&&!he(",")&&!he(")")){var qt=St(B);Ke(),Ie.nestedRule=en(),Ie.nestedRule.combinator=qt}return Ie}return function(ie){if(typeof ie!="string")throw new Error("".concat(lu,"Expected string input."));return Q=ie,ge=Q.length,de=0,ye=Q.charAt(0),V()}}const iM=oM({syntax:"selectors-4"});function aM(e){if(typeof e!="string")throw new TypeError("Expected `string` as selector, not `"+e+"`");return iM(e)}const Gb="֑-߿יִ-﷽ﹰ-ﻼ",qb="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",sM=new RegExp("^[^"+qb+"]*["+Gb+"]"),lM=new RegExp("^[^"+Gb+"]*["+qb+"]");function cM(e){const t=String(e||"");return sM.test(t)?"rtl":lM.test(t)?"ltr":"neutral"}function Wb(e){return"children"in e?Vb(e):"value"in e?e.value:""}function uM(e){return e.type==="text"?e.value:"children"in e?Vb(e):""}function Vb(e){let t=-1;const n=[];for(;++t<e.children.length;)n[t]=uM(e.children[t]);return n.join("")}function dM(e,t){const n=e.schema,r=e.language,o=e.direction,i=e.editableOrEditingHost;let a;if(t.type==="element"){const c=t.properties.xmlLang||t.properties.lang,d=t.properties.type||"text",u=Bm(t);c!=null&&(e.language=String(c)),n&&n.space==="html"?(t.properties.contentEditable==="true"&&(e.editableOrEditingHost=!0),t.tagName==="svg"&&(e.schema=Rr),u==="rtl"?a=u:u==="ltr"||u!=="auto"&&t.tagName==="html"||u!=="auto"&&t.tagName==="input"&&d==="tel"?a="ltr":(u==="auto"||t.tagName==="bdi")&&(t.tagName==="textarea"?a=cu(Wb(t)):t.tagName==="input"&&(d==="email"||d==="search"||d==="tel"||d==="text")?a=t.properties.value?cu(String(t.properties.value)):"ltr":mn(t,l)),a&&(e.direction=a)):e.editableOrEditingHost&&(e.editableOrEditingHost=!1)}return s;function s(){e.schema=n,e.language=r,e.direction=o,e.editableOrEditingHost=i}function l(c){if(c.type==="text")return a=cu(c.value),a?bl:void 0;if(c!==t&&c.type==="element"&&(c.tagName==="bdi"||c.tagName==="script"||c.tagName==="style"||c.tagName==="textare"||Bm(c)))return ga}}function cu(e){const t=cM(e);return t==="neutral"?void 0:t}function Bm(e){const t=e.type==="element"&&typeof e.properties.dir=="string"?e.properties.dir.toLowerCase():void 0;return t==="auto"||t==="ltr"||t==="rtl"?t:void 0}function hM(e,t,n){const r=Qa(n,e.name),o=t.properties[r.property];let i=pM(o,r);if(!e.value)return i!==void 0;e.value.type;let a=e.value.value;if(e.caseSensitivityModifier==="i"&&(a=a.toLowerCase(),i&&(i=i.toLowerCase())),i!==void 0)switch(e.operator){case"=":return a===i;case"$=":return a===i.slice(-a.length);case"*=":return i.includes(a);case"^=":return a===i.slice(0,a.length);case"|=":return a===i||a===i.slice(0,a.length)&&i.charAt(a.length)==="-";case"~=":return a===i||Mu(i).includes(a)}return!1}function pM(e,t){if(e!=null)if(typeof e=="boolean"){if(e)return t.attribute}else if(Array.isArray(e)){if(e.length>0)return(t.commaSeparated?ql:Wl)(e)}else return String(e)}const fM=[];function mM(e,t){return(t.properties.className||fM).includes(e.name)}function gM(e,t){return t.properties.id===e.name}function yM(e,t){return e.name===t.tagName}function bM(e,t){return function(n,r){let o=jm(n,"tag");const i=jm(r??"*","range"),a=[];let s=-1;for(;++s<i.length;){const l=i[s].toLowerCase();let c=-1;const d=[];for(;++c<o.length;)e(o[c].toLowerCase(),l)?a.push(o[c]):d.push(o[c]);o=d}return a}}const EM=bM(function(e,t){const n=e.split("-"),r=t.split("-");let o=0,i=0;if(r[i]!=="*"&&n[o]!==r[i])return!1;for(o++,i++;i<r.length;){if(r[i]==="*"){i++;continue}if(!n[o])return!1;if(n[o]===r[i]){o++,i++;continue}if(n[o].length===1)return!1;o++}return!0});function jm(e,t){const n=e&&typeof e=="string"?[e]:e;if(!n||typeof n!="object"||!("length"in n))throw new Error("Invalid "+t+" `"+n+"`, expected non-empty string");return n}const TM={}.hasOwnProperty;function Ao(e,t){const n=e.type==="element"&&TM.call(e.properties,t)&&e.properties[t];return n!=null&&n!==!1}const xM=new Set([9,10,12,13,32]),Hm=48,CM=57;function vM(e){if(e=e.trim().toLowerCase(),e==="even")return[2,0];if(e==="odd")return[2,1];let t=0,n=0,r=i(),o=a();if(t<e.length&&e.charAt(t)==="n"&&(t++,n=r*(o??1),s(),t<e.length?(r=i(),s(),o=a()):r=o=0),o===null||t<e.length)throw new Error(`n-th rule couldn't be parsed ('${e}')`);return[n,r*o];function i(){return e.charAt(t)==="-"?(t++,-1):(e.charAt(t)==="+"&&t++,1)}function a(){const l=t;let c=0;for(;t<e.length&&e.charCodeAt(t)>=Hm&&e.charCodeAt(t)<=CM;)c=c*10+(e.charCodeAt(t)-Hm),t++;return t===l?null:c}function s(){for(;t<e.length&&xM.has(e.charCodeAt(t));)t++}}var Um,zm;function SM(){return zm||(zm=1,Um={trueFunc:function(){return!0},falseFunc:function(){return!1}}),Um}var AM=SM();const $m=Nl(AM);function kM(e){const t=e[0],n=e[1]-1;if(n<0&&t<=0)return $m.falseFunc;if(t===-1)return i=>i<=n;if(t===0)return i=>i===n;if(t===1)return n<0?$m.trueFunc:i=>i>=n;const r=Math.abs(t),o=(n%r+r)%r;return t>1?i=>i>=n&&i%r===o:i=>i<=n&&i%r===o}function Gm(e){return kM(vM(e))}const _M=Gm.default||Gm,DM=Gl("name",{handlers:{"any-link":IM,blank:wM,checked:NM,dir:PM,disabled:Yb,empty:RM,enabled:LM,"first-child":OM,"first-of-type":MM,has:FM,is:Kb,lang:jM,"last-child":HM,"last-of-type":UM,not:zM,"nth-child":$M,"nth-last-child":GM,"nth-last-of-type":qM,"nth-of-type":WM,"only-child":VM,"only-of-type":YM,optional:KM,"read-only":QM,"read-write":Qb,required:Xb,root:XM,scope:JM},invalid:BM,unknown:ZM});function IM(e,t){return(t.tagName==="a"||t.tagName==="area"||t.tagName==="link")&&Ao(t,"href")}function fr(e,t){if(e.shallow)throw new Error("Cannot use `:"+t.name+"` without parent")}function wM(e,t){return!Jb(t,n);function n(r){return r.type==="element"||r.type==="text"&&!Xa(r)}}function NM(e,t){return t.tagName==="input"||t.tagName==="menuitem"?!!((t.properties.type==="checkbox"||t.properties.type==="radio")&&Ao(t,"checked")):t.tagName==="option"?Ao(t,"selected"):!1}function PM(e,t,n,r,o){return e.argument,e.argument.type,o.direction===e.argument.value}function Yb(e,t){return(t.tagName==="button"||t.tagName==="input"||t.tagName==="select"||t.tagName==="textarea"||t.tagName==="optgroup"||t.tagName==="option"||t.tagName==="menuitem"||t.tagName==="fieldset")&&Ao(t,"disabled")}function RM(e,t){return!Jb(t,n);function n(r){return r.type==="element"||r.type==="text"}}function LM(e,t){return!Yb(e,t)}function OM(e,t,n,r,o){return fr(o,e),o.elementIndex===0}function MM(e,t,n,r,o){return fr(o,e),o.typeIndex===0}function lc(e){let t=e._cachedFn;if(!t){const n=e.argument;if(n.type!=="Formula")throw new Error("Expected `nth` formula, such as `even` or `2n+1` (`of` is not yet supported)");t=_M(n.a+"n+"+n.b),e._cachedFn=t}return t}function FM(e,t,n,r,o){e.argument,e.argument.type;const i={...o,found:!1,one:!0,results:[],rootQuery:e.argument,scopeElements:[t],shallow:!1};return wh(i,{type:"root",children:t.children}),i.results.length>0}function BM(){}function Kb(e,t,n,r,o){e.argument,e.argument.type;const i={...o,found:!1,one:!0,results:[],rootQuery:e.argument,scopeElements:[t],shallow:!1};return wh(i,t),i.results[0]===t}function jM(e,t,n,r,o){return e.argument,e.argument.type,o.language!==""&&o.language!==void 0&&EM(o.language,Ou(e.argument.value)).length>0}function HM(e,t,n,r,o){return fr(o,e),!!(o.elementCount&&o.elementIndex===o.elementCount-1)}function UM(e,t,n,r,o){return fr(o,e),typeof o.typeIndex=="number"&&typeof o.typeCount=="number"&&o.typeIndex===o.typeCount-1}function zM(e,t,n,r,o){return!Kb(e,t,n,r,o)}function $M(e,t,n,r,o){const i=lc(e);return fr(o,e),typeof o.elementIndex=="number"&&i(o.elementIndex)}function GM(e,t,n,r,o){const i=lc(e);return fr(o,e),!!(typeof o.elementCount=="number"&&typeof o.elementIndex=="number"&&i(o.elementCount-o.elementIndex-1))}function qM(e,t,n,r,o){const i=lc(e);return fr(o,e),typeof o.typeCount=="number"&&typeof o.typeIndex=="number"&&i(o.typeCount-1-o.typeIndex)}function WM(e,t,n,r,o){const i=lc(e);return fr(o,e),typeof o.typeIndex=="number"&&i(o.typeIndex)}function VM(e,t,n,r,o){return fr(o,e),o.elementCount===1}function YM(e,t,n,r,o){return fr(o,e),o.typeCount===1}function KM(e,t){return!Xb(e,t)}function QM(e,t,n,r,o){return!Qb(e,t,n,r,o)}function Qb(e,t,n,r,o){return t.tagName==="input"||t.tagName==="textarea"?!Ao(t,"readOnly")&&!Ao(t,"disabled"):!!o.editableOrEditingHost}function Xb(e,t){return(t.tagName==="input"||t.tagName==="textarea"||t.tagName==="select")&&Ao(t,"required")}function XM(e,t,n,r,o){return!!((!r||r.type==="root")&&o.schema&&(o.schema.space==="html"||o.schema.space==="svg")&&(t.tagName==="html"||t.tagName==="svg"))}function JM(e,t,n,r,o){return o.scopeElements.includes(t)}function Jb(e,t){const n=e.children;let r=-1;for(;++r<n.length;)if(t(n[r]))return!0;return!1}function ZM(e){const t=e;throw new Error("Unknown pseudo-selector `"+t.name+"`")}function eF(e,t,n,r,o){for(const i of e.items)if(i.type==="Attribute"){if(!hM(i,t,o.schema))return!1}else if(i.type==="Id"){if(!gM(i,t))return!1}else if(i.type==="ClassName"){if(!mM(i,t))return!1}else if(i.type==="PseudoClass"){if(!DM(i,t,n,r,o))return!1}else{if(i.type==="PseudoElement")throw new Error("Invalid selector: `::"+i.name+"`");if(i.type==="TagName"&&!yM(i,t))return!1}return!0}const tF=[];function wh(e,t){t&&Zb(e,[],t,void 0,void 0,t)}function uu(e,t,n){const r=e[t];r?r.push(n):e[t]=[n]}function nF(e,t,n,r){const o=zs(t.descendant,t.directChild);let i,a=-1;const s={count:0,types:new Map},l={count:0,types:new Map};for(;++a<n.children.length;)qm(s,n.children[a]);for(a=-1;++a<n.children.length;){const c=n.children[a],d=c.type==="element"?c.tagName.toUpperCase():void 0;if(e.elementIndex=l.count,e.typeIndex=d&&l.types.get(d)||0,e.elementCount=s.count,e.typeCount=d?s.types.get(d):0,"children"in c){const u=zs(o,i),h=Zb(e,u,n.children[a],a,n,r);i=zs(h.generalSibling,h.adjacentSibling)}if(e.one&&e.found)break;qm(l,n.children[a])}}function rF(e,t,n,r,o){const i={adjacentSibling:void 0,descendant:void 0,directChild:void 0,generalSibling:void 0};let a=-1;for(;++a<t.length;){const s=t[a];if(e.one&&e.found)break;if(e.shallow&&s.nestedRule)throw new Error("Expected selector without nesting");if(eF(s,n,r,o,e)){const l=s.nestedRule;if(l){const c=l.combinator==="+"?"adjacentSibling":l.combinator==="~"?"generalSibling":l.combinator===">"?"directChild":"descendant";uu(i,c,l)}else e.found=!0,e.results.includes(n)||e.results.push(n)}s.combinator===void 0?uu(i,"descendant",s):s.combinator==="~"&&uu(i,"generalSibling",s)}return i}function zs(e,t){return e&&t&&e.length>0&&t.length>0?[...e,...t]:e&&e.length>0?e:t&&t.length>0?t:tF}function qm(e,t){if(t.type==="element"){const n=t.tagName.toUpperCase(),r=(e.types.get(n)||0)+1;e.count++,e.types.set(n,r)}}function Zb(e,t,n,r,o,i){let a={adjacentSibling:void 0,descendant:void 0,directChild:void 0,generalSibling:void 0};const s=dM(e,n);if(n.type==="element"){let l=e.rootQuery.rules;o&&o!==i&&(l=e.rootQuery.rules.filter(c=>c.combinator===void 0||c.combinator===">"&&o===i)),a=rF(e,zs(t,l),n,r,o)}return"children"in n&&!e.shallow&&!(e.one&&e.found)&&nF(e,a,n,i),s(),a}function oF(e,t,n){const r=iF(e,t);return wh(r,t||void 0),r.results}function iF(e,t,n){return{direction:"ltr",editableOrEditingHost:!1,elementCount:void 0,elementIndex:void 0,found:!1,language:void 0,one:!1,results:[],rootQuery:aM(e),schema:vi,scopeElements:t?t.type==="root"?t.children:[t]:[],shallow:!1,typeIndex:void 0,typeCount:void 0}}const eE=(e=[],t="")=>(e.forEach(n=>{n.type==="text"?t+=n.value:n.type==="element"&&n.children&&Array.isArray(n.children)&&(t+=eE(n.children))}),t),aF=e=>{const{selector:t,rewrite:n}=e||{};return r=>{if(!(!n||typeof n!="function")){if(t&&typeof t=="string"){const o=oF(t,r);o&&o.length>0&&mn(r,o,(i,a,s)=>{n(i,a,s)});return}mn(r,(o,i,a)=>{n(o,i,a)})}}},sF=(e="")=>(e.match(/([^?=&]+)(=([^&]*))/g)||[]).reduce((t,n)=>(t[n.slice(0,n.indexOf("="))]=n.slice(n.indexOf("=")+1),t),{}),lF=(e=[],t)=>{let n=t;for(;n>-1;){if(n--,!e[n])return;if(e[n]&&e[n].value&&e[n].value.replace(/(\n|\s)/g,"")!==""||e[n].type!=="text")return!/^rehype:/.test(e[n].value)||e[n].type!=="comment"?void 0:e[n]}},tE=(e=[],t,n,r)=>{let o=t;for(;o<e.length;)if(o++,n){const i=e[o];if(i&&i.value&&i.value.replace(/(\n|\s)/g,"")!==""||e[o]&&e[o].type==="element")return i.tagName===n?i:void 0}else{const i=e[o];if(!i||i.type==="element"||i.type==="text"&&i.value.replace(/(\n|\s)/g,"")!=="")return;if(i.type&&/^(comment|raw)$/ig.test(i.type))return i.value&&!/^rehype:/.test(i.value.replace(/^(\s+)?<!--(.*?)-->/,"$2")||"")?void 0:r?tE(e,o,"pre",r)?void 0:(i.value=(i.value||"").replace(/^(\n|\s)+/,""),i):(i.value=(i.value||"").replace(/^(\n|\s)+/,""),i)}},Wm=({value:e=""})=>{const t=sF(e.replace(/^<!--(.*?)-->/,"$1").replace(/^rehype:/,""));return Object.keys(t).forEach(n=>{t[n]==="true"&&(t[n]=!0),t[n]==="false"&&(t[n]=!1),typeof t[n]=="string"&&!/^0/.test(t[n])&&!isNaN(+t[n])&&(t[n]=+t[n])}),t},Vm=(e,t,n)=>n==="string"?{...e,"data-config":JSON.stringify({...t,rehyp:!0})}:n==="attr"?{...e,...t}:{...e,"data-config":{...t,rehyp:!0}},cF=(e={})=>{const{properties:t="data",codeBlockParames:n=!0}=e;return r=>{mn(r,"element",(o,i,a)=>{if(n&&o.tagName==="pre"&&o&&Array.isArray(o.children)&&a&&Array.isArray(a.children)&&a.children.length>1){const s=o.children[0];if(s&&s.tagName==="code"&&typeof i=="number"){const l=lF(a.children,i);if(l){const c=Wm(l);Object.keys(c).length>0&&(o.properties={...o.properties,"data-type":"rehyp"},s.properties=Vm(s.properties,c,t))}}}if(/^(em|strong|b|a|i|p|pre|kbd|blockquote|h(1|2|3|4|5|6)|code|table|img|del|ul|ol)$/.test(o.tagName)&&a&&Array.isArray(a.children)&&typeof i=="number"){const s=tE(a.children,i,"",n);if(s){const l=Wm(s);Object.keys(l).length>0&&(o.properties=Vm(o.properties,l,t))}}})}};var uF=function(e){return t=>{mn(t,n=>{n.type==="element"&&n.tagName==="code"&&n.data&&n.data.meta&&(n.properties=Ir({},n.properties,{"data-meta":String(n.data.meta)}))})}},dF=function(e){return t=>{mn(t,n=>{if(n.type==="element"&&n.tagName==="code"&&n.properties&&n.properties.dataMeta){n.data||(n.data={});var r=n.properties.dataMeta;typeof r=="string"&&(n.data.meta=r),delete n.properties.dataMeta}})}};const hF=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g,pF=Object.hasOwnProperty;class fF{constructor(){this.occurrences,this.reset()}slug(t,n){const r=this;let o=mF(t,n===!0);const i=o;for(;pF.call(r.occurrences,o);)r.occurrences[i]++,o=i+"-"+r.occurrences[i];return r.occurrences[o]=0,o}reset(){this.occurrences=Object.create(null)}}function mF(e,t){return typeof e!="string"?"":(t||(e=e.toLowerCase()),e.replace(hF,"").replace(/ /g,"-"))}function nE(e){const t=e.type==="element"?e.tagName.toLowerCase():"",n=t.length===2&&t.charCodeAt(0)===104?t.charCodeAt(1):0;return n>48&&n<55?n-48:void 0}const gF={},Ym=new fF;function yF(e){const t=(e||gF).prefix||"";return function(n){Ym.reset(),mn(n,"element",function(r){nE(r)&&!r.properties.id&&(r.properties.id=t+Ym.slug(Wb(r)))})}}const rE=function(e){if(e==null)return TF;if(typeof e=="string")return EF(e);if(typeof e=="object")return bF(e);if(typeof e=="function")return Nh(e);throw new Error("Expected function, string, or array as `test`")};function bF(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=rE(e[n]);return Nh(r);function r(...o){let i=-1;for(;++i<t.length;)if(t[i].apply(this,o))return!0;return!1}}function EF(e){return Nh(t);function t(n){return n.tagName===e}}function Nh(e){return t;function t(n,r,o){return!!(xF(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function TF(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function xF(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const Km={type:"element",tagName:"span",properties:{className:["icon","icon-link"]},children:[]},CF={};function vF(e){const t=e||CF;let n=t.properties;const r=t.headingProperties,o=t.behavior||"prepend",i=t.content,a=t.group,s=rE(t.test);let l;return o==="after"||o==="before"?l=d:o==="wrap"?l=u:(l=c,n||(n={ariaHidden:"true",tabIndex:-1})),function(h){mn(h,"element",function(p,g,b){if(nE(p)&&p.properties.id&&s(p,g,b))return Object.assign(p.properties,As(r,p)),l(p,g,b)})};function c(h){const p=Qm(i||Km,h);return h.children[o==="prepend"?"unshift":"push"](du(h,As(n,h),p)),[ga]}function d(h,p,g){if(typeof p!="number"||!g)return;const b=Qm(i||Km,h),T=du(h,As(n,h),b);let E=o==="before"?[T,h]:[h,T];if(a){const C=oE(a,h);C&&!Array.isArray(C)&&C.type==="element"&&(C.children=E,E=[C])}return g.children.splice(p,1,...E),[ga,p+E.length]}function u(h){let p=h.children,g=[];return typeof i=="function"?(p=[],g=i(h)):i&&(g=Ph(i)),h.children=[du(h,As(n,h),Array.isArray(g)?[...p,...g]:[...p,g])],[ga]}}function Ph(e){return So(e)}function du(e,t,n){return{type:"element",tagName:"a",properties:{...t,href:"#"+e.properties.id},children:n}}function Qm(e,t){const n=oE(e,t);return Array.isArray(n)?n:[n]}function oE(e,t){return typeof e=="function"?e(t):Ph(e)}function As(e,t){return typeof e=="function"?e(t):e?Ph(e):{}}const SF=(e={})=>{const{openDelimiter:t="rehype:ignore:start",closeDelimiter:n="rehype:ignore:end"}=e;return r=>{mn(r,(o,i,a)=>{if(o.type==="element"||o.type==="root"){let s=!1;o.children=o.children.filter(l=>{if(l.type==="raw"||l.type==="comment"){let c=(l.value||"").trim();if(c=c.replace(/^<!--(.*?)-->/,"$1"),c===t)return s=!0,!1;if(c===n)return s=!1,!1}return!s})}})}};var AF={type:"element",tagName:"svg",properties:{className:"octicon octicon-link",viewBox:"0 0 16 16",version:"1.1",width:"16",height:"16",ariaHidden:"true"},children:[{type:"element",tagName:"path",children:[],properties:{fillRule:"evenodd",d:"M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"}}]};function kF(e){return e===void 0&&(e=""),{type:"element",tagName:"div",properties:{class:"copied","data-code":e},children:[{type:"element",tagName:"svg",properties:{className:"octicon-copy",ariaHidden:"true",viewBox:"0 0 16 16",fill:"currentColor",height:12,width:12},children:[{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"},children:[]},{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"},children:[]}]},{type:"element",tagName:"svg",properties:{className:"octicon-check",ariaHidden:"true",viewBox:"0 0 16 16",fill:"currentColor",height:12,width:12},children:[{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"},children:[]}]}]}}var _F=(e,t)=>(n,r,o)=>{if(n.type==="element"&&o&&o.type==="root"&&/h(1|2|3|4|5|6)/.test(n.tagName)){var i=n.children&&n.children[0];i&&i.properties&&i.properties.ariaHidden==="true"&&(i.properties=Ir({class:"anchor"},i.properties),i.children=[AF])}if(n.type==="element"&&n.tagName==="pre"&&!e){var a=eE(n.children);n.children.push(kF(a))}t&&t(n,r===null?void 0:r,o===null?void 0:o)},DF=[yF,vF,SF];const iE=O.forwardRef((e,t)=>{var n,r=[uF,Bb,dF,...DF,[aF,{rewrite:_F((n=e.disableCopy)!=null?n:!1,e.rehypeRewrite)}],[cF,{properties:"attr"}],...e.rehypePlugins||[]];return f.jsx(GO,Ir({},e,{rehypePlugins:r,ref:t}))});function IF(e,t){return Ye({},e,t)}var Ni=O.createContext({markdown:""});function aE(e,t){return e===void 0&&(e=[]),t===void 0&&(t={}),e.forEach(n=>{n.children&&Array.isArray(n.children)?t=Ye({},t,aE(n.children||[])):n.keyCommand&&n.shortcuts&&n.execute&&(t[n.shortcuts.toLocaleLowerCase()]=n)}),t}function sE(e,t,n,r,o){t===void 0&&(t=[]);var i=aE(t||[]),a=[];if(e.altKey&&a.push("alt"),e.shiftKey&&a.push("shift"),e.metaKey&&a.push("cmd"),e.ctrlKey&&a.push("ctrl"),a.length>0&&!/(control|alt|meta|shift)/.test(e.key.toLocaleLowerCase())&&a.push(e.key.toLocaleLowerCase()),/escape/.test(e.key.toLocaleLowerCase())&&a.push("escape"),!(a.length<1)){var s=!!i[a.join("+")],l=s?i[a.join("+")]:void 0;if(Object.keys(i).forEach(c=>{var d=c.split("+").every(u=>/ctrlcmd/.test(u)?a.includes("ctrl")||a.includes("cmd"):a.includes(u));d&&(l=i[c])}),l&&n){e.stopPropagation(),e.preventDefault(),n.executeCommand(l,r,o,a);return}}}var hu;function Xm(e){if(e.nodeName!=="TEXTAREA")return!1;if(typeof hu>"u"){var t=document.createElement("textarea");t.value="1",hu=!!t.firstChild}return hu}function di(e,t){if(e.focus(),document.selection){var n=document.selection.createRange();n.text=t,n.collapse(!1),n.select();return}var r=!1;if(t!==""?r=document.execCommand&&document.execCommand("insertText",!1,t):r=document.execCommand&&document.execCommand("delete",!1),!r){var o=e.selectionStart,i=e.selectionEnd;if(typeof e.setRangeText=="function")e.setRangeText(t);else{var a=document.createRange(),s=document.createTextNode(t);if(Xm(e)){var l=e.firstChild;if(!l)e.appendChild(s);else{for(var c=0,d=null,u=null;l&&(d===null||u===null);){var h=l.nodeValue.length;o>=c&&o<=c+h&&a.setStart(d=l,o-c),i>=c&&i<=c+h&&a.setEnd(u=l,i-c),c+=h,l=l.nextSibling}o!==i&&a.deleteContents()}}if(Xm(e)&&a.commonAncestorContainer.nodeName==="#text")a.insertNode(s);else{var p=e.value;e.value=p.slice(0,o)+t+p.slice(i)}}e.setSelectionRange(o+t.length,o+t.length);var g=document.createEvent("UIEvent");g.initEvent("input",!0,!1),e.dispatchEvent(g)}}function dn(e){var{text:t,selection:n,prefix:r,suffix:o=r}=e,i=n;if(t&&t.length&&n.start===n.end&&(i=wF(t,n.start)),i.start>=r.length&&i.end<=t.length-o.length){var a=t.slice(i.start-r.length,i.end+o.length);if(a.startsWith(r)&&a.endsWith(o))return{start:i.start-r.length,end:i.end+o.length}}return i}function Ca(e){var{text:t,selection:n}=e,r=t.slice(0,n.start).lastIndexOf(`
|
|
179
|
+
`)+1,o=t.slice(n.end).indexOf(`
|
|
180
|
+
`)+n.end;return o===n.end-1&&(o=t.length),{start:r,end:o}}function lE(e,t){if(e===void 0&&(e=""),t===0)return 0;for(var n=2,r=!0,o=t-1;o>=0&&n>=0;o--)switch(e.charCodeAt(o)){case 32:continue;case 10:n--,r=!1;break;default:return n}return r?0:n}function cE(e,t){if(e===void 0&&(e=""),t===e.length-1)return 0;for(var n=2,r=!0,o=t;o<e.length&&n>=0;o++)switch(e.charCodeAt(o)){case 32:continue;case 10:{n--,r=!1;break}default:return n}return r?0:n}function wF(e,t){if(!e)throw Error("Argument 'text' should be truthy");for(var n=s=>s===" "||s.charCodeAt(0)===10,r=0,o=e.length,i=t;i-1>-1;i--)if(n(e[i-1])){r=i;break}for(var a=t;a<e.length;a++)if(n(e[a])){o=a;break}return{start:r,end:o}}function Xt(e){var{api:t,selectedText:n,selection:r,prefix:o,suffix:i=o}=e;n.length>=o.length+i.length&&n.startsWith(o)&&n.endsWith(i)?(t.replaceSelection(n.slice(o.length,i.length?-i.length:void 0)),t.setSelectionRange({start:r.start-o.length,end:r.end-o.length})):(t.replaceSelection(""+o+n+i),t.setSelectionRange({start:r.start+o.length,end:r.end+o.length}))}function Rh(e,t){var n=e.split(/\n/),r=0,o=n.map((i,a)=>{if(typeof t=="string")return i.startsWith(t)?(r-=t.length,i.slice(t.length)):(r+=t.length,t+i);if(typeof t=="function"){if(i.startsWith(t(i,a)))return r-=t(i,a).length,i.slice(t(i,a).length);var s=t(i,a);return r+=s.length,t(i,a)+i}throw Error("insertion is expected to be either a string or a function")}).join(`
|
|
181
|
+
`);return{modifiedText:o,insertionLength:r}}var NF={name:"bold",keyCommand:"bold",shortcuts:"ctrlcmd+b",prefix:"**",buttonProps:{"aria-label":"Add bold text (ctrl + b)",title:"Add bold text (ctrl + b)"},icon:f.jsx("svg",{role:"img",width:"12",height:"12",viewBox:"0 0 384 512",children:f.jsx("path",{fill:"currentColor",d:"M304.793 243.891c33.639-18.537 53.657-54.16 53.657-95.693 0-48.236-26.25-87.626-68.626-104.179C265.138 34.01 240.849 32 209.661 32H24c-8.837 0-16 7.163-16 16v33.049c0 8.837 7.163 16 16 16h33.113v318.53H24c-8.837 0-16 7.163-16 16V464c0 8.837 7.163 16 16 16h195.69c24.203 0 44.834-1.289 66.866-7.584C337.52 457.193 376 410.647 376 350.014c0-52.168-26.573-91.684-71.207-106.123zM142.217 100.809h67.444c16.294 0 27.536 2.019 37.525 6.717 15.828 8.479 24.906 26.502 24.906 49.446 0 35.029-20.32 56.79-53.029 56.79h-76.846V100.809zm112.642 305.475c-10.14 4.056-22.677 4.907-31.409 4.907h-81.233V281.943h84.367c39.645 0 63.057 25.38 63.057 63.057.001 28.425-13.66 52.483-34.782 61.284z"})}),execute:(e,t)=>{var n=dn({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}},uE={name:"codeBlock",keyCommand:"codeBlock",shortcuts:"ctrlcmd+shift+j",prefix:"```",buttonProps:{"aria-label":"Insert Code Block (ctrl + shift + j)",title:"Insert Code Block (ctrl + shift +j)"},icon:f.jsx("svg",{width:"13",height:"13",role:"img",viewBox:"0 0 156 156",children:f.jsx("path",{fill:"currentColor",d:"M110.85 120.575 43.7 120.483333 43.7083334 110.091667 110.85 110.191667 110.841667 120.583333 110.85 120.575ZM85.1333334 87.1916666 43.625 86.7083332 43.7083334 76.3166666 85.2083334 76.7916666 85.1333334 87.1916666 85.1333334 87.1916666ZM110.841667 53.4166666 43.7 53.3166666 43.7083334 42.925 110.85 43.025 110.841667 53.4166666ZM36 138C27.2916666 138 20.75 136.216667 16.4 132.666667 12.1333334 129.2 10 124.308333 10 118L10 95.3333332C10 91.0666666 9.25 88.1333332 7.7333334 86.5333332 6.3166668 84.8416666 3.7333334 84 0 84L0 72C3.7333334 72 6.3083334 71.2 7.7333334 69.6 9.2416668 67.9083334 10 64.9333334 10 60.6666666L10 38C10 31.775 12.1333334 26.8833334 16.4 23.3333332 20.7583334 19.7749998 27.2916666 18 36 18L40.6666668 18 40.6666668 30 36 30C34.0212222 29.9719277 32.1263151 30.7979128 30.8 32.2666666 29.3605875 33.8216362 28.5938182 35.8823287 28.6666668 38L28.6666668 60.6666666C28.6666668 67.5083332 26.6666668 72.4 22.6666668 75.3333332 20.9317416 76.7274684 18.8640675 77.6464347 16.6666668 78 18.8916668 78.35 20.8916668 79.2416666 22.6666668 80.6666666 26.6666668 83.95 28.6666668 88.8416666 28.6666668 95.3333332L28.6666668 118C28.6666668 120.308333 29.3750002 122.216667 30.8 123.733333 32.2166666 125.241667 33.9583334 126 36 126L40.6666668 126 40.6666668 138 36 138 36 138ZM114.116667 126 118.783333 126C120.833333 126 122.566667 125.241667 123.983333 123.733333 125.422746 122.178364 126.189515 120.117671 126.116667 118L126.116667 95.3333332C126.116667 88.8333332 128.116667 83.9499998 132.116667 80.6666666 133.9 79.2416666 135.9 78.35 138.116667 78 135.919156 77.6468047 133.851391 76.7277979 132.116667 75.3333332 128.116667 72.3999998 126.116667 67.5 126.116667 60.6666666L126.116667 38C126.189515 35.8823287 125.422746 33.8216361 123.983333 32.2666666 122.657018 30.7979128 120.762111 29.9719277 118.783333 30L114.116667 30 114.116667 18 118.783333 18C127.5 18 133.983333 19.775 138.25 23.3333332 142.608333 26.8833332 144.783333 31.7749998 144.783333 38L144.783333 60.6666666C144.783333 64.9333332 145.5 67.9083332 146.916667 69.6 148.433333 71.2 151.05 72 154.783333 72L154.783333 84C151.05 84 148.433333 84.8333334 146.916667 86.5333332 145.5 88.1333332 144.783333 91.0666666 144.783333 95.3333332L144.783333 118C144.783333 124.308333 142.616667 129.2 138.25 132.666667 133.983333 136.216667 127.5 138 118.783333 138L114.116667 138 114.116667 126 114.116667 126Z"})}),execute:(e,t)=>{var n=dn({text:e.text,selection:e.selection,prefix:"```\n",suffix:"\n```"}),r=t.setSelectionRange(n),o="\n```\n",i="\n```\n";r.selectedText.length>=o.length+i.length-2&&r.selectedText.startsWith(o)&&r.selectedText.endsWith(i)?(o="```\n",i="\n```"):((r.selection.start>=1&&e.text.slice(r.selection.start-1,r.selection.start)===`
|
|
182
|
+
`||r.selection.start===0)&&(o="```\n"),(r.selection.end<=e.text.length-1&&e.text.slice(r.selection.end,r.selection.end+1)===`
|
|
183
|
+
`||r.selection.end===e.text.length)&&(i="\n```"));var a=dn({text:e.text,selection:e.selection,prefix:o,suffix:i}),s=t.setSelectionRange(a);Xt({api:t,selectedText:s.selectedText,selection:e.selection,prefix:o,suffix:i})}},PF={name:"code",keyCommand:"code",shortcuts:"ctrlcmd+j",prefix:"`",buttonProps:{"aria-label":"Insert code (ctrl + j)",title:"Insert code (ctrl + j)"},icon:f.jsx("svg",{width:"14",height:"14",role:"img",viewBox:"0 0 640 512",children:f.jsx("path",{fill:"currentColor",d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"})}),execute:(e,t)=>{if(e.selectedText.indexOf(`
|
|
184
|
+
`)===-1){var n=dn({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}else uE.execute(e,t)}},RF={name:"comment",keyCommand:"comment",shortcuts:"ctrlcmd+/",prefix:"<!-- ",suffix:" -->",buttonProps:{"aria-label":"Insert comment (ctrl + /)",title:"Insert comment (ctrl + /)"},icon:f.jsx("svg",{height:"1em",width:"1em",viewBox:"0 0 25 25",children:f.jsxs("g",{fill:"none",fillRule:"evenodd",children:[f.jsx("polygon",{points:".769 .727 24.981 .727 24.981 24.727 .769 24.727"}),f.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"M12.625,23.8787879 L8.125,19.6969697 L5.125,19.6969697 C2.63971863,19.6969697 0.625,17.8247059 0.625,15.5151515 L0.625,7.15151515 C0.625,4.84196074 2.63971863,2.96969697 5.125,2.96969697 L20.125,2.96969697 C22.6102814,2.96969697 24.625,4.84196074 24.625,7.15151515 L24.625,15.5151515 C24.625,17.8247059 22.6102814,19.6969697 20.125,19.6969697 L17.125,19.6969697 L12.625,23.8787879"}),f.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"M10.625,8.54545455 L7.25,11.3333333 L10.625,14.1212121 M15.6875,8.54545455 L19.0625,11.3333333 L15.6875,14.1212121"})]})}),execute:(e,t)=>{var n=dn({text:e.text,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}),r=t.setSelectionRange(n);Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix})}},$s={keyCommand:"divider"},LF={name:"fullscreen",keyCommand:"fullscreen",shortcuts:"ctrlcmd+0",value:"fullscreen",buttonProps:{"aria-label":"Toggle fullscreen (ctrl + 0)",title:"Toggle fullscreen (ctrl+ 0)"},icon:f.jsx("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:f.jsx("path",{fill:"currentColor",d:"M118 171.133334L118 342.200271C118 353.766938 126.675 365.333605 141.133333 365.333605L382.634614 365.333605C394.201281 365.333605 405.767948 356.658605 405.767948 342.200271L405.767948 171.133334C405.767948 159.566667 397.092948 148 382.634614 148L141.133333 148C126.674999 148 117.999999 156.675 118 171.133334zM465.353591 413.444444L370 413.444444 370 471.222222 474.0221 471.222222C500.027624 471.222222 520.254143 451 520.254143 425L520.254143 321 462.464089 321 462.464089 413.444444 465.353591 413.444444zM471.0221 43L367 43 367 100.777778 462.353591 100.777778 462.353591 196.111111 520.143647 196.111111 520.143647 89.2222219C517.254144 63.2222219 497.027624 43 471.0221 43zM57.7900547 100.777778L153.143646 100.777778 153.143646 43 46.2320439 43C20.2265191 43 0 63.2222219 0 89.2222219L0 193.222222 57.7900547 193.222222 57.7900547 100.777778zM57.7900547 321L0 321 0 425C0 451 20.2265191 471.222222 46.2320439 471.222223L150.254143 471.222223 150.254143 413.444445 57.7900547 413.444445 57.7900547 321z"})}),execute:(e,t,n,r,o)=>{t.textArea.focus(),o&&n&&r&&n({fullscreen:!r.fullscreen})}};function OF(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var MF=(e,t)=>{var n=Ye({children:e,icon:f.jsx("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:f.jsx("path",{fill:"currentColor",d:"M15.7083333,468 C7.03242448,468 0,462.030833 0,454.666667 L0,421.333333 C0,413.969167 7.03242448,408 15.7083333,408 L361.291667,408 C369.967576,408 377,413.969167 377,421.333333 L377,454.666667 C377,462.030833 369.967576,468 361.291667,468 L15.7083333,468 Z M21.6666667,366 C9.69989583,366 0,359.831861 0,352.222222 L0,317.777778 C0,310.168139 9.69989583,304 21.6666667,304 L498.333333,304 C510.300104,304 520,310.168139 520,317.777778 L520,352.222222 C520,359.831861 510.300104,366 498.333333,366 L21.6666667,366 Z M136.835938,64 L136.835937,126 L107.25,126 L107.25,251 L40.75,251 L40.75,126 L-5.68434189e-14,126 L-5.68434189e-14,64 L136.835938,64 Z M212,64 L212,251 L161.648438,251 L161.648438,64 L212,64 Z M378,64 L378,126 L343.25,126 L343.25,251 L281.75,251 L281.75,126 L238,126 L238,64 L378,64 Z M449.047619,189.550781 L520,189.550781 L520,251 L405,251 L405,64 L449.047619,64 L449.047619,189.550781 Z"})}),execute:()=>{}},t,{keyCommand:"group"});return Array.isArray(n.children)&&(n.children=n.children.map(r=>{var o=Ye({},(OF(r),r));return o.parent=n,Ye({},o)})),n},FF={name:"hr",keyCommand:"hr",shortcuts:"ctrlcmd+h",prefix:`
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
`,suffix:"",buttonProps:{"aria-label":"Insert HR (ctrl + h)",title:"Insert HR (ctrl + h)"},icon:f.jsx("svg",{width:"12",height:"12",viewBox:"0 0 175 175",children:f.jsx("path",{fill:"currentColor",d:"M0,129 L175,129 L175,154 L0,154 L0,129 Z M3,9 L28.2158203,9 L28.2158203,47.9824219 L55.7695313,47.9824219 L55.7695313,9 L81.0966797,9 L81.0966797,107.185547 L55.7695313,107.185547 L55.7695313,68.0214844 L28.2158203,68.0214844 L28.2158203,107.185547 L3,107.185547 L3,9 Z M93.1855469,100.603516 L93.1855469,19 L135.211914,19 C143.004922,19 148.960917,19.6679621 153.080078,21.0039063 C157.199239,22.3398504 160.520495,24.8168764 163.043945,28.4350586 C165.567395,32.0532407 166.829102,36.459935 166.829102,41.6552734 C166.829102,46.1826398 165.864267,50.0883625 163.93457,53.3725586 C162.004873,56.6567547 159.351579,59.3193257 155.974609,61.3603516 C153.822255,62.6591862 150.872089,63.7353473 147.124023,64.5888672 C150.129898,65.5908253 152.319329,66.5927684 153.692383,67.5947266 C154.620122,68.2626987 155.965323,69.6913953 157.728027,71.8808594 C159.490731,74.0703234 160.668942,75.7587831 161.262695,76.9462891 L173,100.603516 L144.953125,100.603516 L131.482422,75.6660156 C129.775382,72.4374839 128.253913,70.3408251 126.917969,69.3759766 C125.0996,68.1142515 123.040051,67.4833984 120.739258,67.4833984 L118.512695,67.4833984 L118.512695,100.603516 L93.1855469,100.603516 Z M118.512695,52.0644531 L129.144531,52.0644531 C130.294928,52.0644531 132.521468,51.6933631 135.824219,50.9511719 C137.494149,50.6171858 138.857905,49.7636787 139.915527,48.390625 C140.97315,47.0175713 141.501953,45.4404386 141.501953,43.6591797 C141.501953,41.0244009 140.667001,39.0019602 138.99707,37.5917969 C137.32714,36.1816336 134.191429,35.4765625 129.589844,35.4765625 L117.512695,35.4765625 L118.512695,52.0644531 Z",transform:"translate(0 9)"})}),execute:(e,t)=>{var n=dn({text:e.text,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}),r=t.setSelectionRange(n);r.selectedText.length>=e.command.prefix.length&&r.selectedText.startsWith(e.command.prefix)?Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}):(r=t.setSelectionRange({start:e.selection.start,end:e.selection.start}),Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}))}},BF={name:"image",keyCommand:"image",shortcuts:"ctrlcmd+k",prefix:"",buttonProps:{"aria-label":"Add image (ctrl + k)",title:"Add image (ctrl + k)"},icon:f.jsx("svg",{width:"13",height:"13",viewBox:"0 0 20 20",children:f.jsx("path",{fill:"currentColor",d:"M15 9c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm4-7H1c-.55 0-1 .45-1 1v14c0 .55.45 1 1 1h18c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1zm-1 13l-6-5-2 2-4-5-4 8V4h16v11z"})}),execute:(e,t)=>{var n=dn({text:e.text,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}),r=t.setSelectionRange(n);r.selectedText.includes("http")||r.selectedText.includes("www")?Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}):(n=dn({text:e.text,selection:e.selection,prefix:"![",suffix:"]()"}),r=t.setSelectionRange(n),r.selectedText.length===0?Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:""}):Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"![",suffix:"]()"}))}},jF={name:"italic",keyCommand:"italic",shortcuts:"ctrlcmd+i",prefix:"*",buttonProps:{"aria-label":"Add italic text (ctrl + i)",title:"Add italic text (ctrl + i)"},icon:f.jsx("svg",{"data-name":"italic",width:"12",height:"12",role:"img",viewBox:"0 0 320 512",children:f.jsx("path",{fill:"currentColor",d:"M204.758 416h-33.849l62.092-320h40.725a16 16 0 0 0 15.704-12.937l6.242-32C297.599 41.184 290.034 32 279.968 32H120.235a16 16 0 0 0-15.704 12.937l-6.242 32C96.362 86.816 103.927 96 113.993 96h33.846l-62.09 320H46.278a16 16 0 0 0-15.704 12.935l-6.245 32C22.402 470.815 29.967 480 40.034 480h158.479a16 16 0 0 0 15.704-12.935l6.245-32c1.927-9.88-5.638-19.065-15.704-19.065z"})}),execute:(e,t)=>{var n=dn({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}},HF={name:"link",keyCommand:"link",shortcuts:"ctrlcmd+l",prefix:"[",suffix:"](url)",buttonProps:{"aria-label":"Add a link (ctrl + l)",title:"Add a link (ctrl + l)"},icon:f.jsx("svg",{"data-name":"italic",width:"12",height:"12",role:"img",viewBox:"0 0 520 520",children:f.jsx("path",{fill:"currentColor",d:"M331.751196,182.121107 C392.438214,241.974735 391.605313,337.935283 332.11686,396.871226 C332.005129,396.991316 331.873084,397.121413 331.751196,397.241503 L263.493918,464.491645 C203.291404,523.80587 105.345257,523.797864 45.151885,464.491645 C-15.0506283,405.187427 -15.0506283,308.675467 45.151885,249.371249 L82.8416853,212.237562 C92.836501,202.39022 110.049118,208.9351 110.56511,222.851476 C111.223305,240.5867 114.451306,258.404985 120.407566,275.611815 C122.424812,281.438159 120.983487,287.882964 116.565047,292.23621 L103.272145,305.332975 C74.8052033,333.379887 73.9123737,379.047937 102.098973,407.369054 C130.563883,435.969378 177.350591,436.139505 206.033884,407.879434 L274.291163,340.6393 C302.9257,312.427264 302.805844,266.827265 274.291163,238.733318 C270.531934,235.036561 266.74528,232.16442 263.787465,230.157924 C259.544542,227.2873 256.928256,222.609848 256.731165,217.542518 C256.328935,206.967633 260.13184,196.070508 268.613213,187.714278 L289.998463,166.643567 C295.606326,161.118448 304.403592,160.439942 310.906317,164.911276 C318.353355,170.034591 325.328531,175.793397 331.751196,182.121107 Z M240.704978,55.4828366 L172.447607,122.733236 C172.325719,122.853326 172.193674,122.983423 172.081943,123.103513 C117.703294,179.334654 129.953294,261.569283 185.365841,328.828764 C191.044403,335.721376 198.762988,340.914712 206.209732,346.037661 C212.712465,350.509012 221.510759,349.829503 227.117615,344.305363 L248.502893,323.234572 C256.984277,314.87831 260.787188,303.981143 260.384957,293.406218 C260.187865,288.338869 257.571576,283.661398 253.328648,280.790763 C250.370829,278.78426 246.58417,275.912107 242.824936,272.215337 C214.310216,244.121282 206.209732,204.825874 229.906702,179.334654 L298.164073,112.094263 C326.847404,83.8340838 373.633159,84.0042113 402.099123,112.604645 C430.285761,140.92587 429.393946,186.594095 400.92595,214.641114 L387.63303,227.737929 C383.214584,232.091191 381.773257,238.536021 383.790506,244.362388 C389.746774,261.569283 392.974779,279.387637 393.632975,297.122928 C394.149984,311.039357 411.361608,317.584262 421.356437,307.736882 L459.046288,270.603053 C519.249898,211.29961 519.249898,114.787281 459.047304,55.4828366 C398.853851,-3.82360914 300.907572,-3.83161514 240.704978,55.4828366 Z"})}),execute:(e,t)=>{var n=dn({text:e.text,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}),r=t.setSelectionRange(n);r.selectedText.includes("http")||r.selectedText.includes("www")?(n=dn({text:e.text,selection:e.selection,prefix:"[](",suffix:")"}),r=t.setSelectionRange(n),Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"[](",suffix:")"})):r.selectedText.length===0?Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"[title",suffix:"](url)"}):Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix})}},Lh=(e,t,n)=>{var r=dn({text:e.text,selection:e.selection,prefix:e.command.prefix}),o=t.setSelectionRange(r),i=lE(o.text,o.selection.start),a=Array(i+1).join(`
|
|
188
|
+
`),s=cE(o.text,o.selection.end),l=Array(s+1).join(`
|
|
189
|
+
`),{modifiedText:c,insertionLength:d}=Rh(o.selectedText,n);if(d<0){var u=o.selection.start,h=o.selection.end;o.selection.start>0&&e.text.slice(o.selection.start-1,o.selection.start)===`
|
|
190
|
+
`&&(u-=1),o.selection.end<e.text.length-1&&e.text.slice(o.selection.end,o.selection.end+1)===`
|
|
191
|
+
`&&(h+=1),t.setSelectionRange({start:u,end:h}),t.replaceSelection(""+c),t.setSelectionRange({start:u,end:u+c.length})}else{t.replaceSelection(""+a+c+l);var p=o.selection.start+i,g=p+c.length;t.setSelectionRange({start:p,end:g})}},UF={name:"unordered-list",keyCommand:"list",shortcuts:"ctrl+shift+u",prefix:"- ",buttonProps:{"aria-label":"Add unordered list (ctrl + shift + u)",title:"Add unordered list (ctrl + shift + u)"},icon:f.jsx("svg",{"data-name":"unordered-list",width:"12",height:"12",viewBox:"0 0 512 512",children:f.jsx("path",{fill:"currentColor",d:"M96 96c0 26.51-21.49 48-48 48S0 122.51 0 96s21.49-48 48-48 48 21.49 48 48zM48 208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm0 160c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm96-236h352c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"})}),execute:(e,t)=>{Lh(e,t,"- ")}},zF={name:"ordered-list",keyCommand:"list",shortcuts:"ctrl+shift+o",prefix:"1. ",buttonProps:{"aria-label":"Add ordered list (ctrl + shift + o)",title:"Add ordered list (ctrl + shift + o)"},icon:f.jsx("svg",{"data-name":"ordered-list",width:"12",height:"12",role:"img",viewBox:"0 0 512 512",children:f.jsx("path",{fill:"currentColor",d:"M3.263 139.527c0-7.477 3.917-11.572 11.573-11.572h15.131V88.078c0-5.163.534-10.503.534-10.503h-.356s-1.779 2.67-2.848 3.738c-4.451 4.273-10.504 4.451-15.666-1.068l-5.518-6.231c-5.342-5.341-4.984-11.216.534-16.379l21.72-19.938C32.815 33.602 36.732 32 42.785 32H54.89c7.656 0 11.749 3.916 11.749 11.572v84.384h15.488c7.655 0 11.572 4.094 11.572 11.572v8.901c0 7.477-3.917 11.572-11.572 11.572H14.836c-7.656 0-11.573-4.095-11.573-11.572v-8.902zM2.211 304.591c0-47.278 50.955-56.383 50.955-69.165 0-7.18-5.954-8.755-9.28-8.755-3.153 0-6.479 1.051-9.455 3.852-5.079 4.903-10.507 7.004-16.111 2.451l-8.579-6.829c-5.779-4.553-7.18-9.805-2.803-15.409C13.592 201.981 26.025 192 47.387 192c19.437 0 44.476 10.506 44.476 39.573 0 38.347-46.753 46.402-48.679 56.909h39.049c7.529 0 11.557 4.027 11.557 11.382v8.755c0 7.354-4.028 11.382-11.557 11.382h-67.94c-7.005 0-12.083-4.028-12.083-11.382v-4.028zM5.654 454.61l5.603-9.28c3.853-6.654 9.105-7.004 15.584-3.152 4.903 2.101 9.63 3.152 14.359 3.152 10.155 0 14.358-3.502 14.358-8.23 0-6.654-5.604-9.106-15.934-9.106h-4.728c-5.954 0-9.28-2.101-12.258-7.88l-1.05-1.926c-2.451-4.728-1.226-9.806 2.801-14.884l5.604-7.004c6.829-8.405 12.257-13.483 12.257-13.483v-.35s-4.203 1.051-12.608 1.051H16.685c-7.53 0-11.383-4.028-11.383-11.382v-8.755c0-7.53 3.853-11.382 11.383-11.382h58.484c7.529 0 11.382 4.027 11.382 11.382v3.327c0 5.778-1.401 9.806-5.079 14.183l-17.509 20.137c19.611 5.078 28.716 20.487 28.716 34.845 0 21.363-14.358 44.126-48.503 44.126-16.636 0-28.192-4.728-35.896-9.455-5.779-4.202-6.304-9.805-2.626-15.934zM144 132h352c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h352c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H144c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"})}),execute:(e,t)=>{Lh(e,t,(n,r)=>r+1+". ")}},$F={name:"checked-list",keyCommand:"list",shortcuts:"ctrl+shift+c",prefix:"- [ ] ",buttonProps:{"aria-label":"Add checked list (ctrl + shift + c)",title:"Add checked list (ctrl + shift + c)"},icon:f.jsx("svg",{"data-name":"checked-list",width:"12",height:"12",role:"img",viewBox:"0 0 512 512",children:f.jsx("path",{fill:"currentColor",d:"M208 132h288c8.8 0 16-7.2 16-16V76c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zm0 160h288c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zm0 160h288c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16H208c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16zM64 368c-26.5 0-48.6 21.5-48.6 48s22.1 48 48.6 48 48-21.5 48-48-21.5-48-48-48zm92.5-299l-72.2 72.2-15.6 15.6c-4.7 4.7-12.9 4.7-17.6 0L3.5 109.4c-4.7-4.7-4.7-12.3 0-17l15.7-15.7c4.7-4.7 12.3-4.7 17 0l22.7 22.1 63.7-63.3c4.7-4.7 12.3-4.7 17 0l17 16.5c4.6 4.7 4.6 12.3-.1 17zm0 159.6l-72.2 72.2-15.7 15.7c-4.7 4.7-12.9 4.7-17.6 0L3.5 269c-4.7-4.7-4.7-12.3 0-17l15.7-15.7c4.7-4.7 12.3-4.7 17 0l22.7 22.1 63.7-63.7c4.7-4.7 12.3-4.7 17 0l17 17c4.6 4.6 4.6 12.2-.1 16.9z"})}),execute:(e,t)=>{Lh(e,t,(n,r)=>"- [ ] ")}},GF={name:"preview",keyCommand:"preview",value:"preview",shortcuts:"ctrlcmd+9",buttonProps:{"aria-label":"Preview code (ctrl + 9)",title:"Preview code (ctrl + 9)"},icon:f.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:[f.jsx("polygon",{fill:"currentColor",points:"0 71.293 0 122 38.023 123 38.023 398 0 397 0 449.707 91.023 450.413 91.023 72.293"}),f.jsx("polygon",{fill:"currentColor",points:"148.023 72.293 520 71.293 520 122 200.023 124 200.023 397 520 396 520 449.707 148.023 450.413"})]}),execute:(e,t,n,r,o)=>{t.textArea.focus(),o&&n&&r&&n({preview:"preview"})}},qF={name:"edit",keyCommand:"preview",value:"edit",shortcuts:"ctrlcmd+7",buttonProps:{"aria-label":"Edit code (ctrl + 7)",title:"Edit code (ctrl + 7)"},icon:f.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:[f.jsx("polygon",{fill:"currentColor",points:"0 71.293 0 122 319 122 319 397 0 397 0 449.707 372 449.413 372 71.293"}),f.jsx("polygon",{fill:"currentColor",points:"429 71.293 520 71.293 520 122 481 123 481 396 520 396 520 449.707 429 449.413"})]}),execute:(e,t,n,r,o)=>{t.textArea.focus(),o&&n&&r&&n({preview:"edit"})}},WF={name:"live",keyCommand:"preview",value:"live",shortcuts:"ctrlcmd+8",buttonProps:{"aria-label":"Live code (ctrl + 8)",title:"Live code (ctrl + 8)"},icon:f.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:[f.jsx("polygon",{fill:"currentColor",points:"0 71.293 0 122 179 122 179 397 0 397 0 449.707 232 449.413 232 71.293"}),f.jsx("polygon",{fill:"currentColor",points:"289 71.293 520 71.293 520 122 341 123 341 396 520 396 520 449.707 289 449.413"})]}),execute:(e,t,n,r,o)=>{t.textArea.focus(),o&&n&&r&&n({preview:"live"})}},VF={name:"quote",keyCommand:"quote",shortcuts:"ctrlcmd+q",prefix:"> ",buttonProps:{"aria-label":"Insert a quote (ctrl + q)",title:"Insert a quote (ctrl + q)"},icon:f.jsx("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:f.jsx("path",{fill:"currentColor",d:"M520,95.75 L520,225.75 C520,364.908906 457.127578,437.050625 325.040469,472.443125 C309.577578,476.586875 294.396016,464.889922 294.396016,448.881641 L294.396016,414.457031 C294.396016,404.242891 300.721328,395.025078 310.328125,391.554687 C377.356328,367.342187 414.375,349.711094 414.375,274.5 L341.25,274.5 C314.325781,274.5 292.5,252.674219 292.5,225.75 L292.5,95.75 C292.5,68.8257812 314.325781,47 341.25,47 L471.25,47 C498.174219,47 520,68.8257812 520,95.75 Z M178.75,47 L48.75,47 C21.8257813,47 0,68.8257812 0,95.75 L0,225.75 C0,252.674219 21.8257813,274.5 48.75,274.5 L121.875,274.5 C121.875,349.711094 84.8563281,367.342187 17.828125,391.554687 C8.22132813,395.025078 1.89601563,404.242891 1.89601563,414.457031 L1.89601563,448.881641 C1.89601563,464.889922 17.0775781,476.586875 32.5404687,472.443125 C164.627578,437.050625 227.5,364.908906 227.5,225.75 L227.5,95.75 C227.5,68.8257812 205.674219,47 178.75,47 Z"})}),execute:(e,t)=>{var n=dn({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n),o=lE(r.text,r.selection.start),i=Array(o+1).join(`
|
|
192
|
+
`),a=cE(r.text,r.selection.end),s=Array(a+1).join(`
|
|
193
|
+
`),l=Rh(r.selectedText,e.command.prefix);t.replaceSelection(""+i+l.modifiedText+s);var c=r.selection.start+o,d=c+l.modifiedText.length;t.setSelectionRange({start:c,end:d})}},YF={name:"strikethrough",keyCommand:"strikethrough",shortcuts:"ctrl+shift+x",buttonProps:{"aria-label":"Add strikethrough text (ctrl + shift + x)",title:"Add strikethrough text (ctrl + shift + x)"},prefix:"~~",icon:f.jsx("svg",{"data-name":"strikethrough",width:"12",height:"12",role:"img",viewBox:"0 0 512 512",children:f.jsx("path",{fill:"currentColor",d:"M496 288H16c-8.837 0-16-7.163-16-16v-32c0-8.837 7.163-16 16-16h480c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16zm-214.666 16c27.258 12.937 46.524 28.683 46.524 56.243 0 33.108-28.977 53.676-75.621 53.676-32.325 0-76.874-12.08-76.874-44.271V368c0-8.837-7.164-16-16-16H113.75c-8.836 0-16 7.163-16 16v19.204c0 66.845 77.717 101.82 154.487 101.82 88.578 0 162.013-45.438 162.013-134.424 0-19.815-3.618-36.417-10.143-50.6H281.334zm-30.952-96c-32.422-13.505-56.836-28.946-56.836-59.683 0-33.92 30.901-47.406 64.962-47.406 42.647 0 64.962 16.593 64.962 32.985V136c0 8.837 7.164 16 16 16h45.613c8.836 0 16-7.163 16-16v-30.318c0-52.438-71.725-79.875-142.575-79.875-85.203 0-150.726 40.972-150.726 125.646 0 22.71 4.665 41.176 12.777 56.547h129.823z"})}),execute:(e,t)=>{var n=dn({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}},dE={name:"title1",keyCommand:"title1",shortcuts:"ctrlcmd+1",prefix:"# ",suffix:"",buttonProps:{"aria-label":"Insert title1 (ctrl + 1)",title:"Insert title1 (ctrl + 1)"},icon:f.jsx("div",{style:{fontSize:18,textAlign:"left"},children:"Title 1"}),execute:(e,t)=>{Pi({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}};function Pi(e){var{state:t,api:n,prefix:r,suffix:o=r}=e,i=Ca({text:t.text,selection:t.selection}),a=n.setSelectionRange(i);Xt({api:n,selectedText:a.selectedText,selection:t.selection,prefix:r,suffix:o})}Ye({},dE,{icon:f.jsx("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:f.jsx("path",{fill:"currentColor",d:"M15.7083333,468 C7.03242448,468 0,462.030833 0,454.666667 L0,421.333333 C0,413.969167 7.03242448,408 15.7083333,408 L361.291667,408 C369.967576,408 377,413.969167 377,421.333333 L377,454.666667 C377,462.030833 369.967576,468 361.291667,468 L15.7083333,468 Z M21.6666667,366 C9.69989583,366 0,359.831861 0,352.222222 L0,317.777778 C0,310.168139 9.69989583,304 21.6666667,304 L498.333333,304 C510.300104,304 520,310.168139 520,317.777778 L520,352.222222 C520,359.831861 510.300104,366 498.333333,366 L21.6666667,366 Z M136.835938,64 L136.835937,126 L107.25,126 L107.25,251 L40.75,251 L40.75,126 L-5.68434189e-14,126 L-5.68434189e-14,64 L136.835938,64 Z M212,64 L212,251 L161.648438,251 L161.648438,64 L212,64 Z M378,64 L378,126 L343.25,126 L343.25,251 L281.75,251 L281.75,126 L238,126 L238,64 L378,64 Z M449.047619,189.550781 L520,189.550781 L520,251 L405,251 L405,64 L449.047619,64 L449.047619,189.550781 Z"})})});var KF={name:"title2",keyCommand:"title2",shortcuts:"ctrlcmd+2",prefix:"## ",suffix:"",buttonProps:{"aria-label":"Insert title2 (ctrl + 2)",title:"Insert title2 (ctrl + 2)"},icon:f.jsx("div",{style:{fontSize:16,textAlign:"left"},children:"Title 2"}),execute:(e,t)=>{Pi({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},QF={name:"title3",keyCommand:"title3",shortcuts:"ctrlcmd+3",prefix:"### ",suffix:"",buttonProps:{"aria-label":"Insert title3 (ctrl + 3)",title:"Insert title3 (ctrl + 3)"},icon:f.jsx("div",{style:{fontSize:15,textAlign:"left"},children:"Title 3"}),execute:(e,t)=>{Pi({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},XF={name:"title4",keyCommand:"title4",shortcuts:"ctrlcmd+4",prefix:"#### ",suffix:"",buttonProps:{"aria-label":"Insert title4 (ctrl + 4)",title:"Insert title4 (ctrl + 4)"},icon:f.jsx("div",{style:{fontSize:14,textAlign:"left"},children:"Title 4"}),execute:(e,t)=>{Pi({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},JF={name:"title5",keyCommand:"title5",shortcuts:"ctrlcmd+5",prefix:"##### ",suffix:"",buttonProps:{"aria-label":"Insert title5 (ctrl + 5)",title:"Insert title5 (ctrl + 5)"},icon:f.jsx("div",{style:{fontSize:12,textAlign:"left"},children:"Title 5"}),execute:(e,t)=>{Pi({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},ZF={name:"title6",keyCommand:"title6",shortcuts:"ctrlcmd+6",prefix:"###### ",suffix:"",buttonProps:{"aria-label":"Insert title6 (ctrl + 6)",title:"Insert title6 (ctrl + 6)"},icon:f.jsx("div",{style:{fontSize:12,textAlign:"left"},children:"Title 6"}),execute:(e,t)=>{Pi({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},e7={name:"table",keyCommand:"table",prefix:`
|
|
194
|
+
| Header | Header |
|
|
195
|
+
|--------|--------|
|
|
196
|
+
| Cell | Cell |
|
|
197
|
+
| Cell | Cell |
|
|
198
|
+
| Cell | Cell |
|
|
199
|
+
|
|
200
|
+
`,suffix:"",buttonProps:{"aria-label":"Add table",title:"Add table"},icon:f.jsx("svg",{role:"img",width:"12",height:"12",viewBox:"0 0 512 512",children:f.jsx("path",{fill:"currentColor",d:"M64 256V160H224v96H64zm0 64H224v96H64V320zm224 96V320H448v96H288zM448 256H288V160H448v96zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64z"})}),execute:(e,t)=>{var n=dn({text:e.text,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}),r=t.setSelectionRange(n);r.selectedText.length>=e.command.prefix.length+e.command.suffix.length&&r.selectedText.startsWith(e.command.prefix)?Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}):(r=t.setSelectionRange({start:e.selection.start,end:e.selection.start}),Xt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}))}},t7={name:"help",keyCommand:"help",buttonProps:{"aria-label":"Open help",title:"Open help"},icon:f.jsx("svg",{viewBox:"0 0 16 16",width:"12px",height:"12px",children:f.jsx("path",{d:"M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm.9 13H7v-1.8h1.9V13Zm-.1-3.6v.5H7.1v-.6c.2-2.1 2-1.9 1.9-3.2.1-.7-.3-1.1-1-1.1-.8 0-1.2.7-1.2 1.6H5c0-1.7 1.2-3 2.9-3 2.3 0 3 1.4 3 2.3.1 2.3-1.9 2-2.1 3.5Z",fill:"currentColor"})}),execute:()=>{window.open("https://www.markdownguide.org/basic-syntax/","_blank","noreferrer")}},n7=()=>[NF,jF,YF,FF,MF([dE,KF,QF,XF,JF,ZF],{name:"title",groupName:"title",buttonProps:{"aria-label":"Insert title",title:"Insert title"}}),$s,HF,VF,PF,uE,RF,BF,e7,$s,UF,zF,$F,$s,t7],r7=()=>[qF,WF,GF,$s,LF];function Sl(e){var t;return{selection:{start:e.selectionStart,end:e.selectionEnd},text:e.value,selectedText:(t=e.value)==null?void 0:t.slice(e.selectionStart,e.selectionEnd)}}class Oh{constructor(t){this.textArea=void 0,this.textArea=t}replaceSelection(t){return di(this.textArea,t),Sl(this.textArea)}setSelectionRange(t){return this.textArea.focus(),this.textArea.selectionStart=t.start,this.textArea.selectionEnd=t.end,Sl(this.textArea)}}class Mh{constructor(t){this.textArea=void 0,this.textApi=void 0,this.textArea=t,this.textApi=new Oh(t)}getState(){return this.textArea?Sl(this.textArea):!1}executeCommand(t,n,r,o){t.execute&&t.execute(Ye({command:t},Sl(this.textArea)),this.textApi,n,r,o)}}function Gs(e){e.stopPropagation(),e.preventDefault()}function Jm(e,t){Gs(e);var n=e.target,r=new Oh(n),o={start:n.selectionStart,end:n.selectionEnd};if(o=Ca({text:n.value,selection:o}),!(t<0&&o.start<=0||t>0&&o.end>=n.value.length)){var i=n.value.slice(o.start,o.end);if(t<0){var a=Ca({text:n.value,selection:{start:o.start-1,end:o.start-1}}),s=n.value.slice(a.start,a.end);r.setSelectionRange({start:a.start,end:o.end}),di(n,i+`
|
|
201
|
+
`+s),r.setSelectionRange({start:a.start,end:a.start+i.length})}else{var l=Ca({text:n.value,selection:{start:o.end+1,end:o.end+1}}),c=n.value.slice(l.start,l.end);r.setSelectionRange({start:o.start,end:l.end}),di(n,c+`
|
|
202
|
+
`+i),r.setSelectionRange({start:l.end-i.length,end:l.end})}}}function o7(e,t,n){t===void 0&&(t=2),n===void 0&&(n=!1);var r=e.target,o=r.value.substr(0,r.selectionStart),i=o.split(`
|
|
203
|
+
`),a=i[i.length-1],s=new Oh(r);if(!n&&e.code&&e.code.toLowerCase()==="tab"){Gs(e);var l=new Array(t+1).join(" ");if(r.selectionStart!==r.selectionEnd){var c=r.value.substring(0,r.selectionStart).split(`
|
|
204
|
+
`),d=r.value.substring(0,r.selectionEnd).split(`
|
|
205
|
+
`),u=[];d.forEach((B,W)=>{B!==c[W]&&u.push(B)});var h=u.join(`
|
|
206
|
+
`),p=r.value.substring(r.selectionStart,r.selectionEnd),g=r.value.substring(0,r.selectionStart).length;s.setSelectionRange({start:r.value.indexOf(h),end:r.selectionEnd});var b=Rh(h,e.shiftKey?"":l),T=b.modifiedText;e.shiftKey&&(T=T.split(`
|
|
207
|
+
`).map(B=>B.replace(new RegExp("^"+l),"")).join(`
|
|
208
|
+
`)),s.replaceSelection(T);var E=e.shiftKey?-t:t,C=e.shiftKey?-u.length*t:u.length*t;s.setSelectionRange({start:g+E,end:g+p.length+C})}else return di(r,l)}else if(e.keyCode===13&&e.code.toLowerCase()==="enter"&&(/^(-|\*)\s/.test(a)||/^\d+.\s/.test(a))&&!e.shiftKey){Gs(e);var x=`
|
|
209
|
+
- `;return a.startsWith("*")&&(x=`
|
|
210
|
+
* `),(a.startsWith("- [ ]")||a.startsWith("- [X]")||a.startsWith("- [x]"))&&(x=`
|
|
211
|
+
- [ ] `),/^\d+.\s/.test(a)&&(x=`
|
|
212
|
+
`+(parseInt(a)+1)+". "),di(r,x)}else if(e.code&&e.code.toLowerCase()==="keyd"&&e.ctrlKey){Gs(e);var k={start:r.selectionStart,end:r.selectionEnd},w=k;k=Ca({text:r.value,selection:k});var S=r.value.slice(k.start,k.end);s.setSelectionRange({start:k.end,end:k.end}),di(r,`
|
|
213
|
+
`+S),s.setSelectionRange({start:w.start,end:w.end})}else e.code&&e.code.toLowerCase()==="arrowup"&&e.altKey?Jm(e,-1):e.code&&e.code.toLowerCase()==="arrowdown"&&e.altKey&&Jm(e,1)}var i7=["prefixCls","onChange"],a7=["markdown","commands","fullscreen","preview","highlightEnable","extraCommands","tabSize","defaultTabEnable","autoFocusEnd","textareaWarp","dispatch"];function s7(e){var{prefixCls:t,onChange:n}=e,r=ml(e,i7),o=O.useContext(Ni),{markdown:i,commands:a,fullscreen:s,preview:l,highlightEnable:c,extraCommands:d,tabSize:u,defaultTabEnable:h,autoFocusEnd:p,textareaWarp:g,dispatch:b}=o;ml(o,a7);var T=O.useRef(null),E=O.useRef(),C=O.useRef({fullscreen:s,preview:l});O.useEffect(()=>{C.current={fullscreen:s,preview:l,highlightEnable:c}},[s,l,c]),O.useEffect(()=>{if(T.current&&b){var k=new Mh(T.current);E.current=k,b({textarea:T.current,commandOrchestrator:k})}},[]),O.useEffect(()=>{if(p&&T.current&&g){T.current.focus();var k=T.current.value.length;T.current.setSelectionRange(k,k),setTimeout(()=>{g&&(g.scrollTop=g.scrollHeight),T.current&&(T.current.scrollTop=T.current.scrollHeight)},0)}},[g]);var x=k=>{o7(k,u,h),sE(k,[...a||[],...d||[]],E.current,b,C.current)};return O.useEffect(()=>(T.current&&T.current.addEventListener("keydown",x),()=>{T.current&&T.current.removeEventListener("keydown",x)}),[]),f.jsx("textarea",Ye({autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1},r,{ref:T,className:t+"-text-input "+(r.className?r.className:""),value:i,onChange:k=>{b&&b({markdown:k.target.value}),n&&n(k)}}))}var l7=["prefixCls","className","onScroll","renderTextarea"];function c7(e){var t=e||{},{prefixCls:n,className:r,onScroll:o,renderTextarea:i}=t,a=ml(t,l7),{markdown:s,scrollTop:l,commands:c,extraCommands:d,dispatch:u}=O.useContext(Ni),h=O.useRef(null),p=O.useRef(),g=O.createRef();O.useEffect(()=>{var T={};g.current&&(T.textareaWarp=g.current||void 0,g.current.scrollTop=l||0),u&&u(Ye({},T))},[]),O.useEffect(()=>{if(h.current&&u){var T=new Mh(h.current);p.current=T,u({textarea:h.current,commandOrchestrator:T})}},[]);var b={WebkitTextFillColor:"initial",overflow:"auto"};return f.jsx("div",{ref:g,className:n+"-area "+(r||""),onScroll:o,children:f.jsx("div",{className:n+"-text",children:i?O.cloneElement(i(Ye({},a,{value:s,autoComplete:"off",autoCorrect:"off",spellCheck:"false",autoCapitalize:"off",className:n+"-text-input",style:{WebkitTextFillColor:"inherit",overflow:"auto"}}),{dispatch:u,onChange:a.onChange,shortcuts:sE,useContext:{commands:c,extraCommands:d,commandOrchestrator:p.current}}),{ref:h}):f.jsx(O.Fragment,{children:f.jsx(s7,Ye({prefixCls:n},a,{style:b}))})})})}function u7(e){var{prefixCls:t,groupName:n,commands:r,children:o}=e||{},{barPopup:i={}}=O.useContext(Ni);return O.useMemo(()=>f.jsx("div",{className:t+"-toolbar-child "+(n&&i[n]?"active":""),onClick:a=>a.stopPropagation(),children:Array.isArray(r)?f.jsx(hE,Ye({commands:r},e,{isChild:!0})):o}),[r,i,n,t])}function Zm(e){var{prefixCls:t,overflow:n}=e,{fullscreen:r,preview:o,barPopup:i={},components:a,commandOrchestrator:s,dispatch:l}=O.useContext(Ni),c=O.useRef("");function d(u,h){if(l){var p={barPopup:Ye({},i)};u.keyCommand==="preview"&&(p.preview=u.value),u.keyCommand==="fullscreen"&&(p.fullscreen=!r),e.commands&&u.keyCommand==="group"?e.commands.forEach(g=>{h===g.groupName?p.barPopup[h]=!0:g.keyCommand&&(p.barPopup[g.groupName]=!1)}):(h||u.parent)&&Object.keys(p.barPopup||{}).forEach(g=>{p.barPopup[g]=!1}),Object.keys(p).length&&l(Ye({},p)),s&&s.executeCommand(u)}}return O.useEffect(()=>{document&&n&&(r?document.body.style.overflow="hidden":(c.current||(c.current=window.getComputedStyle(document.body,null).overflow),document.body.style.overflow=c.current))},[r,c,n]),f.jsx("ul",{children:(e.commands||[]).map((u,h)=>{if(u.keyCommand==="divider")return f.jsx("li",Ye({},u.liProps,{className:t+"-toolbar-divider"}),h);if(!u.keyCommand)return f.jsx(O.Fragment,{},h);var p=r&&u.keyCommand==="fullscreen"||u.keyCommand==="preview"&&o===u.value,g=u.children&&typeof u.children=="function"?u.children({getState:()=>s.getState(),textApi:s?s.textApi:void 0,close:()=>d({},u.groupName),execute:()=>d({execute:u.execute}),dispatch:l}):void 0,b=i&&o&&o==="preview"&&!/(preview|fullscreen)/.test(u.keyCommand),T=a?.toolbar||u.render,E=T&&typeof T=="function"?T(u,!!b,d,h):null;return f.jsxs("li",Ye({},u.liProps,{className:p?"active":"",children:[E&&O.isValidElement(E)&&E,!E&&!u.buttonProps&&u.icon,!E&&u.buttonProps&&O.createElement("button",Ye({type:"button",key:h,disabled:b,"data-name":u.name},u.buttonProps,{onClick:C=>{C.stopPropagation(),d(u,u.groupName)}}),u.icon),u.children&&f.jsx(u7,{overflow:n,groupName:u.groupName,prefixCls:t,children:g,commands:Array.isArray(u.children)?u.children:void 0})]}),h)})})}function hE(e){e===void 0&&(e={});var{prefixCls:t,isChild:n,className:r}=e,{commands:o,extraCommands:i}=O.useContext(Ni);return f.jsxs("div",{className:t+"-toolbar "+r,children:[f.jsx(Zm,Ye({},e,{commands:e.commands||o||[]})),!n&&f.jsx(Zm,Ye({},e,{commands:i||[]}))]})}function eg(e){var{hideToolbar:t,toolbarBottom:n,placement:r,overflow:o,prefixCls:i}=e;if(t||r==="bottom"&&!n||r==="top"&&n)return null;var a=n?"bottom":"";return f.jsx(hE,{prefixCls:i,overflow:o,className:a})}var d7=e=>{var{prefixCls:t,onChange:n}=e||{},r=O.useRef(null),o=O.useRef(),i=O.useRef(e.height);O.useEffect(()=>{i.current!==e.height&&(i.current=e.height)},[e.height]);function a(d){if(o.current){var u,h=d.clientY||((u=d.changedTouches[0])==null?void 0:u.clientY),p=o.current.height+h-o.current.dragY;p>=e.minHeight&&p<=e.maxHeight&&n&&n(o.current.height+(h-o.current.dragY))}}function s(){var d,u;o.current=void 0,document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",s),(d=r.current)==null||d.removeEventListener("touchmove",a),(u=r.current)==null||u.removeEventListener("touchend",s)}function l(d){var u,h,p;d.preventDefault();var g=d.clientY||((u=d.changedTouches[0])==null?void 0:u.clientY);o.current={height:i.current,dragY:g},document.addEventListener("mousemove",a),document.addEventListener("mouseup",s),(h=r.current)==null||h.addEventListener("touchmove",a,{passive:!1}),(p=r.current)==null||p.addEventListener("touchend",s,{passive:!1})}O.useEffect(()=>{if(document){var d,u;(d=r.current)==null||d.addEventListener("touchstart",l,{passive:!1}),(u=r.current)==null||u.addEventListener("mousedown",l)}return()=>{if(document){var h;(h=r.current)==null||h.removeEventListener("touchstart",l),document.removeEventListener("mousemove",a)}}},[]);var c=O.useMemo(()=>f.jsx("svg",{viewBox:"0 0 512 512",height:"100%",children:f.jsx("path",{fill:"currentColor",d:"M304 256c0 26.5-21.5 48-48 48s-48-21.5-48-48 21.5-48 48-48 48 21.5 48 48zm120-48c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48zm-336 0c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z"})}),[]);return f.jsx("div",{className:t+"-bar",ref:r,children:c})},h7=["prefixCls","className","value","commands","commandsFilter","direction","extraCommands","height","enableScroll","visibleDragbar","highlightEnable","preview","fullscreen","overflow","previewOptions","textareaProps","maxHeight","minHeight","autoFocus","autoFocusEnd","tabSize","defaultTabEnable","onChange","onStatistics","onHeightChange","hideToolbar","toolbarBottom","components","renderTextarea"];function p7(e){return e===void 0&&(e={}),Object.keys(e).forEach(t=>{e[t]=!1}),e}var f7=O.forwardRef((e,t)=>{var n=e||{},{prefixCls:r="w-md-editor",className:o,value:i,commands:a=n7(),commandsFilter:s,direction:l,extraCommands:c=r7(),height:d=200,enableScroll:u=!0,visibleDragbar:h=typeof e.visiableDragbar=="boolean"?e.visiableDragbar:!0,highlightEnable:p=!0,preview:g="live",fullscreen:b=!1,overflow:T=!0,previewOptions:E={},textareaProps:C,maxHeight:x=1200,minHeight:k=100,autoFocus:w,autoFocusEnd:S=!1,tabSize:B=2,defaultTabEnable:W=!1,onChange:U,onStatistics:y,onHeightChange:R,hideToolbar:F,toolbarBottom:M=!1,components:z,renderTextarea:X}=n,Z=ml(n,h7),me=a.map(_e=>s?s(_e,!1):_e).filter(Boolean),ce=c.map(_e=>s?s(_e,!0):_e).filter(Boolean),[ee,I]=O.useReducer(IF,{markdown:i,preview:g,components:z,height:d,minHeight:k,highlightEnable:p,tabSize:B,defaultTabEnable:W,scrollTop:0,scrollTopPreview:0,commands:me,extraCommands:ce,fullscreen:b,barPopup:{}}),ue=O.useRef(null),J=O.useRef(null),A=O.useRef(u);O.useImperativeHandle(t,()=>Ye({},ee,{container:ue.current,dispatch:I})),O.useMemo(()=>A.current=u,[u]),O.useEffect(()=>{var _e={};ue.current&&(_e.container=ue.current||void 0),_e.markdown=i||"",_e.barPopup={},I&&I(Ye({},ee,_e))},[]);var Q=[o,"wmde-markdown-var",l?r+"-"+l:null,r,ee.preview?r+"-show-"+ee.preview:null,ee.fullscreen?r+"-fullscreen":null].filter(Boolean).join(" ").trim();O.useMemo(()=>i!==ee.markdown&&I({markdown:i||""}),[i,ee.markdown]),O.useMemo(()=>g!==ee.preview&&I({preview:g}),[g]),O.useMemo(()=>B!==ee.tabSize&&I({tabSize:B}),[B]),O.useMemo(()=>p!==ee.highlightEnable&&I({highlightEnable:p}),[p]),O.useMemo(()=>w!==ee.autoFocus&&I({autoFocus:w}),[w]),O.useMemo(()=>S!==ee.autoFocusEnd&&I({autoFocusEnd:S}),[S]),O.useMemo(()=>b!==ee.fullscreen&&I({fullscreen:b}),[b]),O.useMemo(()=>d!==ee.height&&I({height:d}),[d]),O.useMemo(()=>d!==ee.height&&R&&R(ee.height,d,ee),[d,R,ee]),O.useMemo(()=>a!==ee.commands&&I({commands:me}),[e.commands]),O.useMemo(()=>c!==ee.extraCommands&&I({extraCommands:ce}),[e.extraCommands]);var ge=O.useRef(),de=O.useRef("preview"),ye=O.useRef(!1);O.useMemo(()=>{ge.current=ee.textareaWarp,ee.textareaWarp&&(ee.textareaWarp.addEventListener("mouseover",()=>{de.current="text"}),ee.textareaWarp.addEventListener("mouseleave",()=>{de.current="preview"}))},[ee.textareaWarp]);var he=(_e,St)=>{if(A.current){var ht=ge.current,pt=J.current?J.current:void 0;if(ye.current||(de.current=St,ye.current=!0),ht&&pt){var Se=(ht.scrollHeight-ht.offsetHeight)/(pt.scrollHeight-pt.offsetHeight);_e.target===ht&&de.current==="text"&&(pt.scrollTop=ht.scrollTop/Se),_e.target===pt&&de.current==="preview"&&(ht.scrollTop=pt.scrollTop*Se);var fe=0;de.current==="text"?fe=ht.scrollTop||0:de.current==="preview"&&(fe=pt.scrollTop||0),I({scrollTop:fe})}}},Fe=r+"-preview "+(E.className||""),Be=_e=>he(_e,"preview"),xe=O.useMemo(()=>f.jsx("div",{ref:J,className:Fe,children:f.jsx(iE,Ye({},E,{onScroll:Be,source:ee.markdown||""}))}),[Fe,E,ee.markdown]),dt=z?.preview&&z?.preview(ee.markdown||"",ee,I);dt&&O.isValidElement(dt)&&(xe=f.jsx("div",{className:Fe,ref:J,onScroll:Be,children:dt}));var Ze=Ye({},Z.style,{height:ee.height||"100%"}),be=()=>I({barPopup:Ye({},p7(ee.barPopup))}),Jt=_e=>I({height:_e}),bt=_e=>{if(U&&U(_e.target.value,_e,ee),C&&C.onChange&&C.onChange(_e),ee.textarea&&ee.textarea instanceof HTMLTextAreaElement&&y){var St=new Mh(ee.textarea),ht=St.getState()||{};y(Ye({},ht,{lineCount:_e.target.value.split(`
|
|
214
|
+
`).length,length:_e.target.value.length}))}};return f.jsx(Ni.Provider,{value:Ye({},ee,{dispatch:I}),children:f.jsxs("div",Ye({ref:ue,className:Q},Z,{onClick:be,style:Ze,children:[f.jsx(eg,{hideToolbar:F,toolbarBottom:M,prefixCls:r,overflow:T,placement:"top"}),f.jsxs("div",{className:r+"-content",children:[/(edit|live)/.test(ee.preview||"")&&f.jsx(c7,Ye({className:r+"-input",prefixCls:r,autoFocus:w},C,{onChange:bt,renderTextarea:z?.textarea||X,onScroll:_e=>he(_e,"text")})),/(live|preview)/.test(ee.preview||"")&&xe]}),h&&!ee.fullscreen&&f.jsx(d7,{prefixCls:r,height:ee.height,maxHeight:x,minHeight:k,onChange:Jt}),f.jsx(eg,{hideToolbar:F,toolbarBottom:M,prefixCls:r,overflow:T,placement:"bottom"})]}))})}),pE=f7;pE.Markdown=iE;function m7({cell:e,sourceAndPaths:t,onQueryChange:n,onSourceChange:r}){const o={query:e.value,malloyResult:e.result?JSON.parse(e.result):void 0,malloyQuery:e.queryInfo?JSON.parse(e.queryInfo):void 0,sourceName:e.sourceName,modelPath:e.modelPath};return f.jsx(qy,{sourceAndPaths:t,existingQuery:o,existingSourceName:e.sourceName,onQueryChange:n,onSourceChange:r})}function g7({cell:e,expandCodeCell:t,expandEmbedding:n,hideEmbeddingIcons:r,editingMalloy:o,editingMarkdown:i,sourceAndPaths:a,onCellChange:s,onClose:l,onEdit:c,onDelete:d,addButtonCallback:u}){const[h,p]=O.useState(t),[g,b]=O.useState(n),[T,E]=O.useState(),[C]=O.useState(),[x,k]=O.useState(da()),[w,S]=O.useState(!1),[B,W]=O.useState(e.sourceName?a.findIndex(A=>A.sourceInfo.name===e.sourceName):0);O.useEffect(()=>{e.isMarkdown||Co(e.value,"malloy").then(A=>{E(A)})},[e]);const[U,y]=O.useState(e.value);O.useEffect(()=>{document.documentElement.setAttribute("data-color-mode","light")});const R=y7(A=>{s({...e,value:A})}),[F,M]=O.useState(!1),z=()=>{d(),M(!1)},X=a.length===0,Z=()=>{const A=a[B],Q=A?.modelPath||e.modelPath||"",ge=A?.sourceInfo.name||e.sourceName||"";s({...e,value:x.query,result:x.malloyResult?JSON.stringify(x.malloyResult):void 0,queryInfo:x.malloyQuery?JSON.stringify(x.malloyQuery):void 0,sourceName:ge,modelPath:Q})},me=f.jsx(v.Tooltip,{title:"Delete Cell",children:f.jsx(v.IconButton,{size:"small",onClick:()=>M(!0),children:f.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m2 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6h14zM10 11v6M14 11v6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}),ce=f.jsxs(v.Dialog,{open:F,onClose:()=>M(!1),children:[f.jsx(v.DialogTitle,{children:"Confirm Delete"}),f.jsx(v.DialogContent,{children:f.jsx(v.Typography,{children:"Are you sure you want to delete this cell?"})}),f.jsxs(v.DialogActions,{children:[f.jsx(v.Button,{onClick:()=>M(!1),children:"Cancel"}),f.jsx(v.Button,{onClick:z,color:"error",children:"Delete"})]})]}),ee=e.isMarkdown?f.jsxs(f.Fragment,{children:[i?f.jsx(v.Tooltip,{title:"Save",children:f.jsx(v.IconButton,{size:"small",onClick:l,children:f.jsx(ys,{})})}):f.jsx(v.Tooltip,{title:"Edit",children:f.jsx(v.IconButton,{size:"small",onClick:c,children:f.jsx(kf,{})})}),!i&&me]}):f.jsxs(f.Fragment,{children:[!o&&f.jsx(v.Tooltip,{title:h?"Hide Code":"View Code",children:f.jsx(v.IconButton,{size:"small",onClick:()=>{p(!h)},children:f.jsx(fy,{})})}),!r&&!o&&e.result&&f.jsx(v.Tooltip,{title:g?"Hide Embedding":"View Embedding",children:f.jsx(v.IconButton,{size:"small",onClick:()=>{b(!g)},children:f.jsx(Wa,{})})}),o&&f.jsx(v.Tooltip,{title:"Save",children:f.jsx(v.IconButton,{size:"small",onClick:()=>{Z(),l()},children:f.jsx(ys,{})})}),!o&&f.jsx(v.Tooltip,{title:"Edit",children:f.jsx(v.IconButton,{size:"small",onClick:c,children:f.jsx(kf,{})})}),!o&&me]}),I=o||i,ue=i?f.jsx(v.Tooltip,{title:"Save",children:f.jsx(v.IconButton,{size:"small",onClick:l,children:f.jsx(ys,{})})}):o?f.jsx(v.Tooltip,{title:"Save",children:f.jsx(v.IconButton,{size:"small",onClick:()=>{Z(),l()},children:f.jsx(ys,{})})}):null,J=w&&f.jsx(v.Box,{sx:{position:"absolute",top:"4px",right:"4px",display:"flex",gap:"8px",backgroundColor:"background.paper",border:"1px solid",borderColor:"divider",borderRadius:"8px",padding:"2px 4px",boxShadow:1,zIndex:10},children:!I&&f.jsxs(f.Fragment,{children:[u(!0),u(!1),ee]})||ue});return f.jsxs($t,{sx:{position:"relative",marginTop:"5px",marginBottom:"5px",borderWidth:"1.5px",backgroundColor:"#fff",minHeight:"50px"},onMouseEnter:()=>S(!0),onMouseLeave:()=>{S(!1)},children:[J,e.isMarkdown?f.jsx(f.Fragment,{children:i?f.jsx(pE,{value:U,preview:"edit",autoFocus:!0,onChange:A=>{y(A),R(A)},onBlur:()=>{Z(),w||l()}}):f.jsx(v.Box,{sx:{px:.5,pt:0,mt:0,"& h1, & h2, & h3, & h4, & h5, & h6":{mt:.5,mb:.5},"& p":{mt:.5,mb:.5},"& ul, & ol":{mt:.5,mb:.5},"& li":{mt:0,mb:0},"& pre, & code":{mt:.5,mb:.5},"& blockquote":{mt:.5,mb:.5}},children:U?f.jsx(v.Box,{onClick:c,sx:{cursor:"pointer"},children:f.jsx(Ed,{children:U})}):f.jsxs(v.Box,{onClick:c,sx:{cursor:"pointer"},children:[f.jsx(v.Typography,{sx:{p:2,textAlign:"center",variant:"subtitle2",fontWeight:"medium"},children:"Markdown is empty"}),f.jsx(v.Typography,{sx:{mb:2,textAlign:"center",variant:"body2"},children:"Click to edit."})]})})}):f.jsxs(f.Fragment,{children:[f.jsx(v.Collapse,{in:g,timeout:"auto",unmountOnExit:!0,children:f.jsx(v.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:f.jsx(v.Typography,{component:"div",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},dangerouslySetInnerHTML:{__html:C}})})}),f.jsx(v.Collapse,{in:h,timeout:"auto",unmountOnExit:!0,children:f.jsx(v.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:f.jsx(v.Typography,{component:"div",className:"content",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},dangerouslySetInnerHTML:{__html:T}})})}),o&&(X?f.jsxs(f.Fragment,{children:[f.jsx(v.Typography,{sx:{p:2,textAlign:"center",variant:"subtitle2",fontWeight:"medium"},children:"No Model Imports"}),f.jsx(v.Typography,{sx:{mb:2,textAlign:"center",variant:"body2"},children:"Please add a model import above."})]}):f.jsx(m7,{sourceAndPaths:a,onQueryChange:A=>{k(A)},cell:e,onSourceChange:W})),!o&&e.result&&f.jsx($t,{variant:"outlined",sx:{borderRadius:0},children:f.jsx(my,{result:e.result,minHeight:300,maxHeight:800})}),!o&&!e.result&&f.jsxs(v.Box,{onClick:c,sx:{cursor:"pointer"},children:[f.jsx(v.Typography,{sx:{p:2,textAlign:"center",variant:"subtitle2",fontWeight:"medium"},children:"Explore is empty"}),f.jsx(v.Typography,{sx:{mb:2,textAlign:"center",variant:"body2"},children:"Click to edit."})]})]}),F&&ce]})}function y7(e,t=2e3){const n=O.useRef(void 0);return O.useCallback(r=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{e(r)},t)},[e,t])}const fE=O.createContext(void 0);function mE({children:e,userContext:t,notebookStorage:n}){const r=O.useMemo(()=>({notebookStorage:n,userContext:t}),[n,t]);return f.jsx(fE.Provider,{value:r,children:e})}function gE(){const e=O.useContext(fE);if(!e)throw new Error("useNotebookStorage must be used within a NotebookStorageProvider");return e}const b7=ct(f.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),E7=ct(f.jsx("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5z"})),T7=new zl(new on);function x7({initialSelectedModels:e,onModelChange:t}){const{projectName:n,packageName:r,versionId:o}=yn(),{data:i,isLoading:a,isSuccess:s,isError:l,error:c}=wn({queryKey:["models",n,r,o],queryFn:E=>T7.listModels(n,r,o,E)}),[d,u]=O.useState(e||[]),[h,p]=O.useState(null);O.useEffect(()=>{u(e||[])},[e]);const g=E=>{const C=d.filter(x=>x!==E);u(C),t(C)},b=E=>{const C=[...d,E];u(C),t(C),p(null)};let T=[];return s&&i?.data&&(T=i.data.filter(E=>!d.includes(E.path)).map(E=>E.path)),l?f.jsx(In,{error:c,context:`${n} > ${r} > Model Picker`}):f.jsxs(f.Fragment,{children:[f.jsxs(v.FormControl,{fullWidth:!0,children:[a&&f.jsx(v.Typography,{children:"Loading..."}),f.jsxs(v.Stack,{direction:"row",spacing:1,children:[d.map(E=>f.jsx(v.Chip,{label:E,onDelete:()=>g(E),deleteIcon:f.jsx(b7,{}),sx:{marginBottom:"5px"}},E)),f.jsx(v.Button,{size:"small",startIcon:f.jsx(E7,{}),onClick:E=>p(E.currentTarget),disabled:a||l||T.length===0,children:"Add Model"})]})]}),f.jsxs(v.Menu,{anchorEl:h,open:!!h,onClose:()=>p(null),children:[f.jsx(v.Typography,{variant:"subtitle2",sx:{ml:1},children:"Models"}),f.jsx(v.Divider,{}),T.length===0?f.jsx(v.MenuItem,{disabled:!0,children:"No models available"}):T.map(E=>f.jsx(v.MenuItem,{onClick:()=>b(E),children:f.jsx(v.Typography,{variant:"body2",children:E})},E))]})]})}const C7=new zl(new on);function v7({notebookPath:e,expandCodeCells:t,expandEmbeddings:n,hideEmbeddingIcons:r}){const o=Ai(),{projectName:i,packageName:a,versionId:s}=yn(),{server:l,getAccessToken:c}=lh(),{notebookStorage:d,userContext:u}=gE();if(!i||!a)throw new Error("Project and package must be provided via PubliserPackageProvider");if(!d||!u)throw new Error("Notebook storage and user context must be provided via NotebookStorageProvider");const[h,p]=O.useState(),[g,b]=O.useState(),[T,E]=O.useState(),[C,x]=O.useState([]),[k,w]=O.useState(null),[S,B]=O.useState(null),W=!!k,U=()=>{w(null),B(null)},y=(I,ue)=>{h.insertCell(ue,{isMarkdown:I,value:""}),Z(),I?E(ue):b(ue),U()},[R,F]=O.useState(!1),M=()=>{F(!0)},z=I=>{e&&d&&u&&d.deleteNotebook(u,e),F(!1),o(`/${i}/${a}`,I)},X=()=>{F(!1)},Z=O.useCallback(()=>{p(h.saveNotebook())},[h]);if(O.useEffect(()=>{h&&(async()=>{const I=new Map(C.map(({modelPath:A,sourceInfos:Q})=>[A,Q])),ue=[],J=[];for(const A of h.getModels())I.has(A)?ue.push({modelPath:A,sourceInfos:I.get(A)}):(console.log("Fetching model from Publisher",A),J.push(C7.getModel(i,a,A,s,await Jd(l,c)).then(Q=>({modelPath:A,sourceInfos:Q.data.sourceInfos.map(ge=>JSON.parse(ge))}))));if(J.length>0){const A=await Promise.all(J);x([...ue,...A])}else x(ue)})()},[c,h,a,i,l,s]),O.useEffect(()=>{e&&p(ha.loadNotebook(d,u,e))},[e,d,u]),!h)return f.jsx("div",{children:"Loading..."});const me=I=>{const ue=[];for(const J of I)for(const A of J.sourceInfos)ue.push({modelPath:J.modelPath,sourceInfo:A});return ue},ce=(I,ue)=>f.jsx(v.Button,{size:"small",startIcon:f.jsx(aw,{}),onClick:()=>y(I,ue),variant:"contained",sx:{backgroundColor:"#fff",color:J=>J.palette.mode==="dark"?J.palette.grey[100]:J.palette.grey[700],boxShadow:"none","&:hover":{backgroundColor:J=>J.palette.mode==="dark"?J.palette.grey[500]:J.palette.grey[300],boxShadow:"none"}},children:I?"Markdown":"Explore"}),ee=f.jsxs(v.Box,{sx:{display:"flex",gap:1,justifyContent:"center",flex:2},children:[ce(!1,h.getCells().length),ce(!0,h.getCells().length)]});return f.jsxs($t,{variant:"outlined",children:[f.jsxs(Dn,{children:[f.jsxs(qo,{sx:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[f.jsxs(qo,{direction:"row",spacing:1,alignItems:"center",children:[f.jsx(v.Typography,{variant:"overline",sx:{fontSize:"13px",fontWeight:"bold",verticalAlign:"middle"},children:"Workbook"}),f.jsx(v.Typography,{variant:"subtitle2",sx:{fontSize:"13px",fontWeight:"normal",verticalAlign:"middle",ml:1},children:`${i} > ${a} > ${e}`})]}),f.jsxs(qo,{sx:{display:"flex",flexDirection:"row",gap:1},children:[f.jsx(v.Box,{sx:{display:"flex",alignItems:"center",mt:1,mb:1},children:f.jsx(S7,{notebookData:h})}),f.jsxs(v.Box,{sx:{display:"flex",alignItems:"center",mt:1,mb:1},children:[f.jsx(v.Button,{color:"error",onClick:M,size:"small",children:"Delete"}),f.jsxs(v.Dialog,{open:R,onClose:X,children:[f.jsx(v.DialogTitle,{children:"Delete Notebook"}),f.jsx(v.DialogContent,{children:f.jsxs(v.DialogContentText,{children:['Are you sure you want to delete the notebook "',e,'"? This action cannot be undone.']})}),f.jsxs(v.DialogActions,{children:[f.jsx(v.Button,{onClick:X,color:"primary",size:"small",children:"Cancel"}),f.jsx(v.Button,{onClick:I=>z(I),color:"error",autoFocus:!0,size:"small",children:"Delete"})]})]})]})]})]}),f.jsx(v.Divider,{}),f.jsxs(qo,{sx:{display:"flex",flexDirection:"row",width:"100%",mt:2},children:[f.jsx(v.Box,{sx:{flex:1},children:f.jsx(x7,{initialSelectedModels:h.getModels(),onModelChange:I=>{p(h.setModels(I)),Z()}})}),f.jsx(v.Box,{sx:{flex:1}})]})]}),f.jsx(Kl,{children:f.jsxs(qo,{children:[h.getCells().length===0&&f.jsxs(f.Fragment,{children:[f.jsx(v.Typography,{sx:{textAlign:"center",p:2,variant:"subtitle2",fontWeight:"medium"},children:"Workbook is empty"}),f.jsx(v.Typography,{variant:"body2",sx:{textAlign:"center",mb:2,variant:"body2"},children:"Click the + buttons to add a markdown or code cell."})]}),h.getCells().map((I,ue)=>f.jsx(O.Fragment,{children:f.jsx(g7,{cell:I,addButtonCallback:J=>ce(J,ue),sourceAndPaths:me(C),expandCodeCell:t,expandEmbedding:n,hideEmbeddingIcons:r,editingMarkdown:T===ue,editingMalloy:g===ue,onDelete:()=>{p(h.deleteCell(ue)),Z()},onCellChange:J=>{p(h.setCell(ue,J)),Z()},onEdit:()=>{I.isMarkdown?E(ue):b(ue)},onClose:()=>{I.isMarkdown?E(void 0):b(void 0)}},`${ue}-${I.isMarkdown}-${e}-${i}-${a}`)},`${ue}-${h.getCells().length}`)),ee,f.jsxs(v.Menu,{anchorEl:k,open:W,onClose:U,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:[f.jsx(v.MenuItem,{onClick:()=>y(!0,S??0),children:"Add Markdown"}),f.jsx(v.MenuItem,{onClick:()=>y(!1,S??0),children:"Add Malloy"})]}),f.jsx(qo,{sx:{flexDirection:"row",justifyContent:"flex-end",p:1}})]})})]})}function S7({notebookData:e}){const[t,n]=O.useState(!1);return f.jsx(v.Button,{color:"primary",onClick:async()=>{if(!e)return;const r=e.toMalloyNotebook();try{await navigator.clipboard.writeText(r),n(!0),setTimeout(()=>n(!1),1500)}catch{n(!1),alert("Failed to copy to clipboard")}},size:"small",children:t?"Copied!":"Export"})}function A7({onNotebookClick:e}){const{notebookStorage:t,userContext:n}=gE(),[r,o]=O.useState([]);return O.useEffect(()=>{t&&n&&o(t.listNotebooks(n))},[t,n]),f.jsxs(f.Fragment,{children:[f.jsx(v.Divider,{}),f.jsx(v.Box,{sx:{maxHeight:"300px",overflow:"auto","&::-webkit-scrollbar":{width:"8px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:"rgba(0,0,0,0.2)",borderRadius:"4px"}},children:f.jsxs(v.List,{dense:!0,children:[r.length===0&&f.jsx(v.ListItem,{children:f.jsx(v.ListItemText,{primary:"No notebooks found.",sx:{textAlign:"center"}})}),r.map(i=>f.jsx(v.ListItem,{onClick:a=>e(i,a),sx:{cursor:"pointer","&:hover":{backgroundColor:"action.hover"}},children:f.jsx(v.ListItemText,{primary:i})},i))]})})]})}const k7=new E0(new on);function _7(){const{projectName:e}=bE(),{data:t,isSuccess:n,isError:r,error:o}=wn({queryKey:["about",e],queryFn:i=>k7.getProject(e,!1,i)});return f.jsxs(f.Fragment,{children:[!n&&!r&&f.jsx(Wn,{text:"Fetching About..."}),n&&f.jsxs($t,{variant:"outlined",sx:{p:2},children:[f.jsx(v.Typography,{variant:"overline",fontWeight:"bold",sx:{mb:1},children:"Readme"}),f.jsx($t,{sx:{p:1},children:f.jsx(Ed,{children:t.data.readme})})]}),r&&f.jsx(In,{error:o,context:`${e} > About`})]})}const D7=new b0(new on);function I7({navigate:e}){const{projectName:t}=bE(),{data:n,isSuccess:r,isError:o,error:i}=wn({queryKey:["packages",t],queryFn:a=>D7.listPackages(t,a)});return f.jsxs(f.Fragment,{children:[!r&&!o&&f.jsx(Wn,{text:"Fetching Packages..."}),r&&f.jsxs($t,{variant:"outlined",sx:{p:2},children:[f.jsx(v.Typography,{variant:"overline",fontWeight:"bold",sx:{mb:1},children:"Packages"}),f.jsx(v.Grid,{container:!0,spacing:2,columns:12,children:n.data.sort((a,s)=>a.name.localeCompare(s.name)).map(a=>f.jsx(v.Grid,{size:{xs:12,sm:12,md:12,lg:4},children:f.jsx($t,{variant:"outlined",sx:{cursor:"pointer",transition:"all 0.2s ease-in-out","&:hover":{boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",transform:"translateY(-2px)"}},onClick:s=>e(a.name+"/",s),children:f.jsxs(Dn,{children:[f.jsx(v.Typography,{variant:"overline",color:"primary.main",children:a.name}),f.jsx(v.Box,{sx:{maxHeight:"120px",overflowY:"auto"},children:f.jsx(v.Typography,{variant:"body2",children:a.description})})]})})},a.name))})]}),o&&f.jsx(In,{error:i,context:`${t} > Packages`})]})}const yE=O.createContext(void 0);function bE(){const e=O.useContext(yE);if(!e)throw new Error("useProject must be used within a ProjectProvider");return e}function w7({children:e,projectName:t}){return f.jsx(yE.Provider,{value:{projectName:t},children:e})}function N7({navigate:e}){return f.jsxs(v.Grid,{container:!0,spacing:2,columns:12,children:[f.jsx(v.Grid,{size:{xs:12,md:12},children:f.jsx(I7,{navigate:e})}),f.jsx(v.Grid,{size:{xs:12,md:12},children:f.jsx(_7,{})})]})}const P7=ct(f.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2M8 17c-.55 0-1-.45-1-1v-3c0-.55.45-1 1-1s1 .45 1 1v3c0 .55-.45 1-1 1m4 0c-.55 0-1-.45-1-1v-1c0-.55.45-1 1-1s1 .45 1 1v1c0 .55-.45 1-1 1m0-5c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m4 5c-.55 0-1-.45-1-1V8c0-.55.45-1 1-1s1 .45 1 1v8c0 .55-.45 1-1 1"})),R7=ct(f.jsx("path",{d:"M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42s1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41l-6.58-6.6a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1"})),tg=ct(f.jsx("path",{d:"m19.46 8 .79-1.75L22 5.46c.39-.18.39-.73 0-.91l-1.75-.79L19.46 2c-.18-.39-.73-.39-.91 0l-.79 1.75-1.76.79c-.39.18-.39.73 0 .91l1.75.79.79 1.76c.18.39.74.39.92 0M11.5 9.5 9.91 6c-.35-.78-1.47-.78-1.82 0L6.5 9.5 3 11.09c-.78.36-.78 1.47 0 1.82l3.5 1.59L8.09 18c.36.78 1.47.78 1.82 0l1.59-3.5 3.5-1.59c.78-.36.78-1.47 0-1.82zm7.04 6.5-.79 1.75-1.75.79c-.39.18-.39.73 0 .91l1.75.79.79 1.76c.18.39.73.39.91 0l.79-1.75 1.76-.79c.39-.18.39-.73 0-.91l-1.75-.79-.79-1.76c-.18-.39-.74-.39-.92 0"})),L7=ct(f.jsx("path",{d:"M8.7 15.9 4.8 12l3.9-3.9c.39-.39.39-1.01 0-1.4a.984.984 0 0 0-1.4 0l-4.59 4.59c-.39.39-.39 1.02 0 1.41l4.59 4.6c.39.39 1.01.39 1.4 0s.39-1.01 0-1.4m6.6 0 3.9-3.9-3.9-3.9a.984.984 0 0 1 0-1.4c.39-.39 1.01-.39 1.4 0l4.59 4.59c.39.39.39 1.02 0 1.41l-4.59 4.6c-.39.39-1.01.39-1.4 0a.984.984 0 0 1 0-1.4"})),O7=ct(f.jsx("path",{d:"M12 10.9c-.61 0-1.1.49-1.1 1.1s.49 1.1 1.1 1.1 1.1-.49 1.1-1.1-.49-1.1-1.1-1.1M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m2.19 12.19L6 18l3.81-8.19L18 6z"})),M7=ct([f.jsx("path",{d:"M13 8.57c-.79 0-1.43.64-1.43 1.43s.64 1.43 1.43 1.43 1.43-.64 1.43-1.43-.64-1.43-1.43-1.43"},"0"),f.jsx("path",{d:"M13.21 3c-3.84-.11-7 2.87-7.19 6.64L4.1 12.2c-.25.33-.01.8.4.8H6v3c0 1.1.9 2 2 2h1v2c0 .55.45 1 1 1h5c.55 0 1-.45 1-1v-3.68c2.44-1.16 4.1-3.68 4-6.58-.14-3.62-3.18-6.63-6.79-6.74M16 10c0 .13-.01.26-.02.39l.83.66c.08.06.1.16.05.25l-.8 1.39c-.05.09-.16.12-.24.09l-.99-.4c-.21.16-.43.29-.67.39L14 13.83c-.01.1-.1.17-.2.17h-1.6c-.1 0-.18-.07-.2-.17l-.15-1.06c-.25-.1-.47-.23-.68-.39l-.99.4c-.09.03-.2 0-.25-.09l-.8-1.39c-.05-.08-.03-.19.05-.25l.84-.66c-.01-.13-.02-.26-.02-.39s.02-.27.04-.39l-.85-.66c-.08-.06-.1-.16-.05-.26l.8-1.38c.05-.09.15-.12.24-.09l1 .4c.2-.15.43-.29.67-.39L12 6.17c.02-.1.1-.17.2-.17h1.6c.1 0 .18.07.2.17l.15 1.06c.24.1.46.23.67.39l1-.4c.09-.03.2 0 .24.09l.8 1.38c.05.09.03.2-.05.26l-.85.66c.03.12.04.25.04.39"},"1")]),ng=ct(f.jsx("path",{d:"M4 20h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2m0-3h2v2H4zM2 6c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2m4 1H4V5h2zm-2 7h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2m0-3h2v2H4z"})),F7=new E0(new on),B7=e=>{if(!e)return"Explore semantic models, run queries, and build dashboards";const t=e.replace(/^#+\s+/gm,"").replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/`([^`]+)`/g,"$1").trim(),n=t.split(/\n\s*\n/)[0]||t;if(n.length<=120)return n;const r=n.substring(0,120).split(" ");return r.pop(),r.join(" ")+"..."};function j7({navigate:e}){const{data:t,isSuccess:n,isError:r,error:o}=wn({queryKey:["projects"],queryFn:i=>F7.listProjects(i)});return r?f.jsx(In,{error:o,context:"Projects List"}):n?f.jsxs(v.Container,{maxWidth:"lg",sx:{py:4},children:[f.jsxs(v.Box,{sx:{textAlign:"center",mb:6},children:[f.jsxs(v.Stack,{direction:"row",justifyContent:"center",alignItems:"center",spacing:1,sx:{mb:2},children:[f.jsx(tg,{sx:{fontSize:32,color:"primary.main"}}),f.jsx(v.Typography,{variant:"h3",component:"h1",fontWeight:700,children:"Publisher"})]}),f.jsx(v.Typography,{variant:"h5",color:"text.secondary",sx:{mb:3,maxWidth:600,mx:"auto"},children:"The open-source semantic model server for the Malloy data language"}),f.jsx(v.Typography,{variant:"body1",color:"text.secondary",sx:{maxWidth:800,mx:"auto"},children:"Define semantic models once — and use them everywhere. Publisher serves Malloy models through clean APIs, enabling consistent, interpretable, and AI-ready data access for tools, applications, and agents."})]}),f.jsxs(v.Grid,{container:!0,spacing:3,sx:{mb:6},children:[f.jsx(v.Grid,{size:{xs:12,md:4},children:f.jsx(v.Card,{variant:"outlined",onClick:()=>{window.open("https://github.com/malloydata/publisher/blob/main/README.md#ad-hoc-data-analysis","_blank")},sx:{height:"100%",cursor:"pointer",transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:2}},children:f.jsxs(v.CardContent,{sx:{p:3},children:[f.jsxs(v.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{mb:2},children:[f.jsx(P7,{sx:{color:"info.main",fontSize:28}}),f.jsx(v.Typography,{variant:"h6",fontWeight:600,children:"Ad Hoc Analysis"})]}),f.jsx(v.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"Use Explorer, a visual query builder that allows analysts to browse semantic sources, build queries, and run nested logic — all without writing code."}),f.jsx(v.Chip,{label:"No-code",size:"small",color:"primary",variant:"outlined"})]})})}),f.jsx(v.Grid,{size:{xs:12,md:4},children:f.jsx(v.Card,{variant:"outlined",onClick:()=>{window.open("https://github.com/malloydata/publisher/blob/main/README.md#notebook-based-dashboards","_blank")},sx:{height:"100%",cursor:"pointer",transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:2}},children:f.jsxs(v.CardContent,{sx:{p:3},children:[f.jsxs(v.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{mb:2},children:[f.jsx(L7,{sx:{color:"warning.main",fontSize:28}}),f.jsx(v.Typography,{variant:"h6",fontWeight:600,children:"Notebook Dashboards"})]}),f.jsx(v.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"Create shareable, code-first dashboards using Malloy notebooks. Include text, charts, and reusable views — all versioned alongside your models."}),f.jsx(v.Chip,{label:"Versioned",size:"small",color:"warning",variant:"outlined"})]})})}),f.jsx(v.Grid,{size:{xs:12,md:4},children:f.jsx(v.Card,{variant:"outlined",onClick:()=>{window.open("https://github.com/malloydata/publisher/blob/main/README.md#mcp-based-ai-data-agents","_blank")},sx:{height:"100%",cursor:"pointer",transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:2}},children:f.jsxs(v.CardContent,{sx:{p:3},children:[f.jsxs(v.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{mb:2},children:[f.jsx(M7,{sx:{color:"success.main",fontSize:28}}),f.jsx(v.Typography,{variant:"h6",fontWeight:600,children:"AI Data Agents"})]}),f.jsx(v.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"Expose your semantic models via the Model Context Protocol (MCP), enabling AI agents to discover sources and ask well-formed questions."}),f.jsx(v.Chip,{label:"AI-Ready",size:"small",color:"success",variant:"outlined"})]})})})]}),f.jsx(v.Divider,{sx:{my:4}}),t.data.length>0?f.jsxs(f.Fragment,{children:[f.jsxs(v.Box,{sx:{textAlign:"center",mb:4},children:[f.jsxs(v.Stack,{direction:"row",justifyContent:"center",alignItems:"center",spacing:1,sx:{mb:2},children:[f.jsx(ng,{sx:{color:"primary.main",fontSize:24}}),f.jsx(v.Typography,{variant:"h4",fontWeight:600,children:"Select a Project"})]}),f.jsx(v.Typography,{variant:"body1",color:"text.secondary",children:"Choose a project to explore its semantic models and start analyzing your data"})]}),f.jsx(v.Grid,{container:!0,spacing:3,justifyContent:"center",children:t.data.map(i=>f.jsx(v.Grid,{size:{xs:12,sm:6,md:4},children:f.jsx(v.Card,{variant:"outlined",sx:{height:"100%",cursor:"pointer",transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:2,borderColor:"primary.main"}},onClick:a=>e(`/${i.name}/`,a),children:f.jsxs(v.CardContent,{sx:{p:3,textAlign:"center"},children:[f.jsx(O7,{sx:{fontSize:48,color:"primary.main",mb:2}}),f.jsx(v.Typography,{variant:"h6",fontWeight:600,gutterBottom:!0,children:i.name}),f.jsx(v.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:B7(i.readme)}),f.jsx(v.Button,{variant:"contained",color:"secondary",endIcon:f.jsx(R7,{}),fullWidth:!0,children:"Open Project"})]})})},i.name))})]}):f.jsxs(v.Box,{sx:{textAlign:"center",mb:4},children:[f.jsxs(v.Stack,{direction:"row",justifyContent:"center",alignItems:"center",spacing:1,sx:{mb:2},children:[f.jsx(ng,{sx:{color:"primary.main",fontSize:24}}),f.jsx(v.Typography,{variant:"h4",fontWeight:600,children:"Get Started"})]}),f.jsx(v.Typography,{variant:"body1",color:"text.secondary",sx:{mb:3},children:"No projects found. Create your first Malloy project to start exploring semantic models and building data experiences."}),f.jsx(v.Button,{variant:"contained",size:"large",color:"primary",startIcon:f.jsx(tg,{}),href:"https://github.com/malloydata/publisher/blob/main/README.md#server-configuration",target:"_blank",rel:"noopener noreferrer",children:"Learn How to Create Models"})]}),f.jsx(v.Box,{sx:{textAlign:"center",mt:6,pt:4,borderTop:1,borderColor:"divider"},children:f.jsxs(v.Typography,{variant:"body2",color:"text.secondary",children:["Publisher is built on fully open infrastructure and designed for the AI era. Join the"," ",f.jsx("a",{href:"https://join.slack.com/t/malloy-community/shared_invite/zt-1kgfwgi5g-CrsdaRqs81QY67QW0~t_uw",target:"_blank",rel:"noopener noreferrer",style:{color:"primary.main",textDecoration:"underline"},children:"Malloy Slack community"})," ","to ask questions, share ideas, and contribute to the future of data modeling."]})})]}):f.jsx(Wn,{text:"Loading projects..."})}function H7(){const{projectName:e,packageName:t}=No(),[n,r]=O.useState(""),[o,i]=O.useState(null),[a,s]=O.useState(!1),[l,c]=O.useState(!1),d=Ai(),u=!!o,h=C=>{i(C.currentTarget)},p=()=>{i(null)},g=()=>{c(!1)},b=()=>{s(!1)},T=(C,x)=>{c(!1),d(`/${e}/${t}/scratchNotebook/${encodeURIComponent(C)}`,x)},E=C=>{s(!1),d(`/${e}/${t}/scratchNotebook/${encodeURIComponent(n)}`,C),r("")};return!e||!t?null:f.jsxs(f.Fragment,{children:[f.jsx(v.Button,{"aria-controls":u?"basic-menu":void 0,"aria-haspopup":"true","aria-expanded":u?"true":void 0,onClick:h,variant:"contained",sx:{height:"40px",px:2,backgroundColor:"#fbbb04","&:hover":{backgroundColor:"#eab308"}},children:"Analyze Package"}),f.jsxs(v.Menu,{id:"basic-menu",anchorEl:o,open:u,onClose:p,MenuListProps:{"aria-labelledby":"basic-button",sx:{py:.5}},children:[f.jsxs(v.MenuItem,{onClick:()=>{s(!0),p()},sx:{py:1,px:2},children:[f.jsx(v.ListItemIcon,{children:f.jsx(Sa.Add,{fontSize:"small"})}),f.jsxs(v.ListItemText,{children:[f.jsx(v.Typography,{variant:"body2",fontWeight:500,children:"New Workbook"}),f.jsx(v.Typography,{variant:"caption",color:"text.secondary",children:"Create a new analysis workbook"})]})]}),f.jsxs(v.MenuItem,{onClick:()=>{c(!0),p()},sx:{py:1,px:2},children:[f.jsx(v.ListItemIcon,{children:f.jsx(Sa.Launch,{fontSize:"small"})}),f.jsxs(v.ListItemText,{children:[f.jsx(v.Typography,{variant:"body2",fontWeight:500,children:"Open Workbook"}),f.jsx(v.Typography,{variant:"caption",color:"text.secondary",children:"Open an existing workbook"})]})]})]}),f.jsxs(v.Dialog,{open:a,onClose:b,maxWidth:"sm",fullWidth:!0,children:[f.jsxs(v.DialogTitle,{sx:{pb:1,pt:2,px:2},children:[f.jsx(v.Typography,{variant:"h6",fontWeight:600,sx:{mb:.5},children:"Create New Workbook"}),f.jsx(v.Typography,{variant:"body2",color:"text.secondary",children:"Start a new analysis workbook to explore your data"})]}),f.jsx(v.DialogContent,{sx:{px:2,pb:2},children:f.jsxs(v.Stack,{spacing:2,sx:{mt:1},children:[f.jsx(v.FormControl,{fullWidth:!0,children:f.jsx(v.TextField,{label:"Workbook Name",value:n,onChange:C=>r(C.target.value),placeholder:"Enter workbook name...",fullWidth:!0,autoFocus:!0,size:"small"})}),f.jsxs(v.Stack,{direction:"row",spacing:1,justifyContent:"flex-end",children:[f.jsx(v.Button,{onClick:b,variant:"outlined",size:"small",children:"Cancel"}),f.jsx(v.Button,{onClick:C=>E(C),variant:"contained",disabled:!n.trim(),size:"small",children:"Create Workbook"})]})]})})]}),f.jsxs(v.Dialog,{open:l,onClose:g,maxWidth:"md",fullWidth:!0,children:[f.jsxs(v.DialogTitle,{sx:{pb:1,pt:2,px:2},children:[f.jsx(v.Typography,{variant:"h6",fontWeight:600,sx:{mb:.5},children:"Open Workbook"}),f.jsx(v.Typography,{variant:"body2",color:"text.secondary",children:"Select an existing workbook to continue your analysis"})]}),f.jsx(v.DialogContent,{sx:{px:2,pb:2},children:f.jsx(mE,{notebookStorage:new Vy,userContext:{project:e,package:t},children:f.jsx(A7,{onNotebookClick:T})})})]})]})}new g0(new on);vt.defaults.baseURL="IfYouAreSeeingThis_baseURL_IsNotSet";function ko(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}const To="$$material",U7=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function z7(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,i=U7(t),a=Object.keys(i);function s(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n})`}function l(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-r/100}${n})`}function c(h,p){const g=a.indexOf(p);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n}) and (max-width:${(g!==-1&&typeof t[a[g]]=="number"?t[a[g]]:p)-r/100}${n})`}function d(h){return a.indexOf(h)+1<a.length?c(h,a[a.indexOf(h)+1]):s(h)}function u(h){const p=a.indexOf(h);return p===0?s(a[1]):p===a.length-1?l(a[p]):c(h,a[a.indexOf(h)+1]).replace("@media","@media not all and")}return{keys:a,values:i,up:s,down:l,between:c,only:d,not:u,unit:n,...o}}var pu={exports:{}},Je={};/**
|
|
152
215
|
* @license React
|
|
153
216
|
* react-is.production.js
|
|
154
217
|
*
|
|
@@ -156,14 +219,14 @@ import {${t.sourceName}}" from '${t.modelPath}'"
|
|
|
156
219
|
*
|
|
157
220
|
* This source code is licensed under the MIT license found in the
|
|
158
221
|
* LICENSE file in the root directory of this source tree.
|
|
159
|
-
*/var bu;function qC(){if(bu)return ve;bu=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),i=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),f=Symbol.for("react.client.reference");function g(y){if(typeof y=="object"&&y!==null){var v=y.$$typeof;switch(v){case e:switch(y=y.type,y){case r:case o:case n:case l:case c:case h:return y;default:switch(y=y&&y.$$typeof,y){case i:case s:case p:case d:return y;case a:return y;default:return v}}case t:return v}}}return ve.ContextConsumer=a,ve.ContextProvider=i,ve.Element=e,ve.ForwardRef=s,ve.Fragment=r,ve.Lazy=p,ve.Memo=d,ve.Portal=t,ve.Profiler=o,ve.StrictMode=n,ve.Suspense=l,ve.SuspenseList=c,ve.isContextConsumer=function(y){return g(y)===a},ve.isContextProvider=function(y){return g(y)===i},ve.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===e},ve.isForwardRef=function(y){return g(y)===s},ve.isFragment=function(y){return g(y)===r},ve.isLazy=function(y){return g(y)===p},ve.isMemo=function(y){return g(y)===d},ve.isPortal=function(y){return g(y)===t},ve.isProfiler=function(y){return g(y)===o},ve.isStrictMode=function(y){return g(y)===n},ve.isSuspense=function(y){return g(y)===l},ve.isSuspenseList=function(y){return g(y)===c},ve.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===r||y===o||y===n||y===l||y===c||typeof y=="object"&&y!==null&&(y.$$typeof===p||y.$$typeof===d||y.$$typeof===i||y.$$typeof===a||y.$$typeof===s||y.$$typeof===f||y.getModuleId!==void 0)},ve.typeOf=g,ve}var xu;function FC(){return xu||(xu=1,Hi.exports=qC()),Hi.exports}var dh=FC();function tr(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function ph(e){if(S.isValidElement(e)||dh.isValidElementType(e)||!tr(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=ph(e[r])}),t}function Ct(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return tr(e)&&tr(t)&&Object.keys(t).forEach(o=>{S.isValidElement(t[o])||dh.isValidElementType(t[o])?n[o]=t[o]:tr(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&tr(e[o])?n[o]=Ct(e[o],t[o],r):r.clone?n[o]=tr(t[o])?ph(t[o]):t[o]:n[o]=t[o]}),n}function zC(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function kl(e,t=0,r=1){return zC(e,t,r)}function WC(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),r?`rgb${r.length===4?"a":""}(${r.map((n,o)=>o<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function Nr(e){if(e.type)return e;if(e.charAt(0)==="#")return Nr(WC(e));const t=e.indexOf("("),r=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(r))throw new Error(Zr(9,e));let n=e.substring(t+1,e.length-1),o;if(r==="color"){if(n=n.split(" "),o=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(Zr(10,o))}else n=n.split(",");return n=n.map(a=>parseFloat(a)),{type:r,values:n,colorSpace:o}}const UC=e=>{const t=Nr(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},co=(e,t)=>{try{return UC(e)}catch{return e}};function pi(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((o,a)=>a<3?parseInt(o,10):o):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function hh(e){e=Nr(e);const{values:t}=e,r=t[0],n=t[1]/100,o=t[2]/100,a=n*Math.min(o,1-o),i=(c,d=(c+r/30)%12)=>o-a*Math.max(Math.min(d-3,9-d,1),-1);let s="rgb";const l=[Math.round(i(0)*255),Math.round(i(8)*255),Math.round(i(4)*255)];return e.type==="hsla"&&(s+="a",l.push(t[3])),pi({type:s,values:l})}function xs(e){e=Nr(e);let t=e.type==="hsl"||e.type==="hsla"?Nr(hh(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function HC(e,t){const r=xs(e),n=xs(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function vs(e,t){return e=Nr(e),t=kl(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,pi(e)}function la(e,t,r){try{return vs(e,t)}catch{return e}}function Pl(e,t){if(e=Nr(e),t=kl(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return pi(e)}function Ce(e,t,r){try{return Pl(e,t)}catch{return e}}function Il(e,t){if(e=Nr(e),t=kl(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return pi(e)}function ke(e,t,r){try{return Il(e,t)}catch{return e}}function Ss(e,t=.15){return xs(e)>.5?Pl(e,t):Il(e,t)}function ca(e,t,r){try{return Ss(e,t)}catch{return e}}const Eo={black:"#000",white:"#fff"},VC={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},xn={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},vn={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},to={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Sn={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},wn={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Cn={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function mh(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Eo.white,default:Eo.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const GC=mh();function fh(){return{text:{primary:Eo.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Eo.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const vu=fh();function Su(e,t,r,n){const o=n.light||n,a=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=Il(e.main,o):t==="dark"&&(e.dark=Pl(e.main,a)))}function KC(e="light"){return e==="dark"?{main:Sn[200],light:Sn[50],dark:Sn[400]}:{main:Sn[700],light:Sn[400],dark:Sn[800]}}function QC(e="light"){return e==="dark"?{main:xn[200],light:xn[50],dark:xn[400]}:{main:xn[500],light:xn[300],dark:xn[700]}}function YC(e="light"){return e==="dark"?{main:vn[500],light:vn[300],dark:vn[700]}:{main:vn[700],light:vn[400],dark:vn[800]}}function XC(e="light"){return e==="dark"?{main:wn[400],light:wn[300],dark:wn[700]}:{main:wn[700],light:wn[500],dark:wn[900]}}function JC(e="light"){return e==="dark"?{main:Cn[400],light:Cn[300],dark:Cn[700]}:{main:Cn[800],light:Cn[500],dark:Cn[900]}}function ZC(e="light"){return e==="dark"?{main:to[400],light:to[300],dark:to[700]}:{main:"#ed6c02",light:to[500],dark:to[900]}}function jl(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...o}=e,a=e.primary||KC(t),i=e.secondary||QC(t),s=e.error||YC(t),l=e.info||XC(t),c=e.success||JC(t),d=e.warning||ZC(t);function p(y){return HC(y,vu.text.primary)>=r?vu.text.primary:GC.text.primary}const h=({color:y,name:v,mainShade:b=500,lightShade:C=300,darkShade:w=700})=>{if(y={...y},!y.main&&y[b]&&(y.main=y[b]),!y.hasOwnProperty("main"))throw new Error(Zr(11,v?` (${v})`:"",b));if(typeof y.main!="string")throw new Error(Zr(12,v?` (${v})`:"",JSON.stringify(y.main)));return Su(y,"light",C,n),Su(y,"dark",w,n),y.contrastText||(y.contrastText=p(y.main)),y};let f;return t==="light"?f=mh():t==="dark"&&(f=fh()),Ct({common:{...Eo},mode:t,primary:h({color:a,name:"primary"}),secondary:h({color:i,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:s,name:"error"}),warning:h({color:d,name:"warning"}),info:h({color:l,name:"info"}),success:h({color:c,name:"success"}),grey:VC,contrastThreshold:r,getContrastText:p,augmentColor:h,tonalOffset:n,...f},o)}function go(e,t){return t?Ct(e,t,{clone:!1}):e}function ek(e,t){if(!e.containerQueries)return t;const r=Object.keys(t).filter(n=>n.startsWith("@container")).sort((n,o)=>{const a=/min-width:\s*([0-9.]+)/;return+(n.match(a)?.[1]||0)-+(o.match(a)?.[1]||0)});return r.length?r.reduce((n,o)=>{const a=t[o];return delete n[o],n[o]=a,n},{...t}):t}function tk(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function rk(e,t){const r=t.match(/^@([^/]+)?\/?(.+)?$/);if(!r)return null;const[,n,o]=r,a=Number.isNaN(+n)?n||0:+n;return e.containerQueries(o).up(a)}function nk(e){const t=(a,i)=>a.replace("@media",i?`@container ${i}`:"@container");function r(a,i){a.up=(...s)=>t(e.breakpoints.up(...s),i),a.down=(...s)=>t(e.breakpoints.down(...s),i),a.between=(...s)=>t(e.breakpoints.between(...s),i),a.only=(...s)=>t(e.breakpoints.only(...s),i),a.not=(...s)=>{const l=t(e.breakpoints.not(...s),i);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const n={},o=a=>(r(n,a),n);return r(o),{...e,containerQueries:o}}const hi={xs:0,sm:600,md:900,lg:1200,xl:1536},wu={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${hi[e]}px)`},ok={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:hi[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function yr(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const a=n.breakpoints||wu;return t.reduce((i,s,l)=>(i[a.up(a.keys[l])]=r(t[l]),i),{})}if(typeof t=="object"){const a=n.breakpoints||wu;return Object.keys(t).reduce((i,s)=>{if(tk(a.keys,s)){const l=rk(n.containerQueries?n:ok,s);l&&(i[l]=r(t[s],s))}else if(Object.keys(a.values||hi).includes(s)){const l=a.up(s);i[l]=r(t[s],s)}else{const l=s;i[l]=t[l]}return i},{})}return r(t)}function ak(e={}){return e.keys?.reduce((r,n)=>{const o=e.up(n);return r[o]={},r},{})||{}}function ik(e,t){return e.reduce((r,n)=>{const o=r[n];return(!o||Object.keys(o).length===0)&&delete r[n],r},t)}function Je(e){if(typeof e!="string")throw new Error(Zr(7));return e.charAt(0).toUpperCase()+e.slice(1)}function mi(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((o,a)=>o&&o[a]?o[a]:null,e);if(n!=null)return n}return t.split(".").reduce((n,o)=>n&&n[o]!=null?n[o]:null,e)}function Wa(e,t,r,n=r){let o;return typeof e=="function"?o=e(r):Array.isArray(e)?o=e[r]||n:o=mi(e,r)||n,t&&(o=t(o,n,e)),o}function We(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:o}=e,a=i=>{if(i[t]==null)return null;const s=i[t],l=i.theme,c=mi(l,n)||{};return yr(i,s,p=>{let h=Wa(c,o,p);return p===h&&typeof p=="string"&&(h=Wa(c,o,`${t}${p==="default"?"":Je(p)}`,p)),r===!1?h:{[r]:h}})};return a.propTypes={},a.filterProps=[t],a}function sk(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const lk={m:"margin",p:"padding"},ck={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Cu={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},uk=sk(e=>{if(e.length>2)if(Cu[e])e=Cu[e];else return[e];const[t,r]=e.split(""),n=lk[t],o=ck[r]||"";return Array.isArray(o)?o.map(a=>n+a):[n+o]}),El=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Tl=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...El,...Tl];function qo(e,t,r,n){const o=mi(e,t,!0)??r;return typeof o=="number"||typeof o=="string"?a=>typeof a=="string"?a:typeof o=="string"?o.startsWith("var(")&&a===0?0:o.startsWith("var(")&&a===1?o:`calc(${a} * ${o})`:o*a:Array.isArray(o)?a=>{if(typeof a=="string")return a;const i=Math.abs(a),s=o[i];return a>=0?s:typeof s=="number"?-s:typeof s=="string"&&s.startsWith("var(")?`calc(-1 * ${s})`:`-${s}`}:typeof o=="function"?o:()=>{}}function Rl(e){return qo(e,"spacing",8)}function Fo(e,t){return typeof t=="string"||t==null?t:e(t)}function dk(e,t){return r=>e.reduce((n,o)=>(n[o]=Fo(t,r),n),{})}function pk(e,t,r,n){if(!t.includes(r))return null;const o=uk(r),a=dk(o,n),i=e[r];return yr(e,i,a)}function gh(e,t){const r=Rl(e.theme);return Object.keys(e).map(n=>pk(e,t,n,r)).reduce(go,{})}function $e(e){return gh(e,El)}$e.propTypes={};$e.filterProps=El;function De(e){return gh(e,Tl)}De.propTypes={};De.filterProps=Tl;function hk(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var mk={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function fk(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var gk=/[A-Z]|^ms/g,yk=/_EMO_([^_]+?)_([^]*?)_EMO_/g,yh=function(t){return t.charCodeAt(1)===45},ku=function(t){return t!=null&&typeof t!="boolean"},Vi=fk(function(e){return yh(e)?e:e.replace(gk,"-$&").toLowerCase()}),Pu=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(yk,function(n,o,a){return Er={name:o,styles:a,next:Er},o})}return mk[t]!==1&&!yh(t)&&typeof r=="number"&&r!==0?r+"px":r};function Ua(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var o=r;if(o.anim===1)return Er={name:o.name,styles:o.styles,next:Er},o.name;var a=r;if(a.styles!==void 0){var i=a.next;if(i!==void 0)for(;i!==void 0;)Er={name:i.name,styles:i.styles,next:Er},i=i.next;var s=a.styles+";";return s}return bk(e,t,r)}}var l=r;return l}function bk(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=Ua(e,t,r[o])+";";else for(var a in r){var i=r[a];if(typeof i!="object"){var s=i;ku(s)&&(n+=Vi(a)+":"+Pu(a,s)+";")}else if(Array.isArray(i)&&typeof i[0]=="string"&&t==null)for(var l=0;l<i.length;l++)ku(i[l])&&(n+=Vi(a)+":"+Pu(a,i[l])+";");else{var c=Ua(e,t,i);switch(a){case"animation":case"animationName":{n+=Vi(a)+":"+c+";";break}default:n+=a+"{"+c+"}"}}}return n}var Iu=/label:\s*([^\s;{]+)\s*(;|$)/g,Er;function xk(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,o="";Er=void 0;var a=e[0];if(a==null||a.raw===void 0)n=!1,o+=Ua(r,t,a);else{var i=a;o+=i[0]}for(var s=1;s<e.length;s++)if(o+=Ua(r,t,e[s]),n){var l=a;o+=l[s]}Iu.lastIndex=0;for(var c="",d;(d=Iu.exec(o))!==null;)c+="-"+d[1];var p=hk(o)+c;return{name:p,styles:o,next:Er}}function vk(e,t){return Wu(e,t)}function Sk(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const ju=[];function Eu(e){return ju[0]=e,xk(ju)}const wk=typeof window<"u"?S.useLayoutEffect:S.useEffect;function ws(e,t){const r={...t};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=n;if(o==="components"||o==="slots")r[o]={...e[o],...r[o]};else if(o==="componentsProps"||o==="slotProps"){const a=e[o],i=t[o];if(!i)r[o]=a||{};else if(!a)r[o]=i;else{r[o]={...i};for(const s in a)if(Object.prototype.hasOwnProperty.call(a,s)){const l=s;r[o][l]=ws(a[l],i[l])}}}else r[o]===void 0&&(r[o]=e[o])}return r}const Ck=S.createContext(void 0);function kk(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const o=t.components[r];return o.defaultProps?ws(o.defaultProps,n):!o.styleOverrides&&!o.variants?ws(o,n):n}function Pk({props:e,name:t}){const r=S.useContext(Ck);return kk({props:e,name:t,theme:{components:r}})}const Tu=(e,t,r,n=[])=>{let o=e;t.forEach((a,i)=>{i===t.length-1?Array.isArray(o)?o[Number(a)]=r:o&&typeof o=="object"&&(o[a]=r):o&&typeof o=="object"&&(o[a]||(o[a]=n.includes(a)?[]:{}),o=o[a])})},Ik=(e,t,r)=>{function n(o,a=[],i=[]){Object.entries(o).forEach(([s,l])=>{(!r||r&&!r([...a,s]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?n(l,[...a,s],Array.isArray(l)?[...i,s]:i):t([...a,s],l,i))})}n(e)},jk=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(n=>e.includes(n))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function Gi(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},o={},a={},i={};return Ik(e,(s,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!n||!n(s,l))){const d=`--${r?`${r}-`:""}${s.join("-")}`,p=jk(s,l);Object.assign(o,{[d]:p}),Tu(a,s,`var(${d})`,c),Tu(i,s,`var(${d}, ${p})`,c)}},s=>s[0]==="vars"),{css:o,vars:a,varsWithDefaults:i}}function Ek(e,t={}){const{getSelector:r=v,disableCssColorScheme:n,colorSchemeSelector:o}=t,{colorSchemes:a={},components:i,defaultColorScheme:s="light",...l}=e,{vars:c,css:d,varsWithDefaults:p}=Gi(l,t);let h=p;const f={},{[s]:g,...y}=a;if(Object.entries(y||{}).forEach(([w,k])=>{const{vars:j,css:P,varsWithDefaults:B}=Gi(k,t);h=Ct(h,B),f[w]={css:P,vars:j}}),g){const{css:w,vars:k,varsWithDefaults:j}=Gi(g,t);h=Ct(h,j),f[s]={css:w,vars:k}}function v(w,k){let j=o;if(o==="class"&&(j=".%s"),o==="data"&&(j="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(j=`[${o}="%s"]`),w){if(j==="media")return e.defaultColorScheme===w?":root":{[`@media (prefers-color-scheme: ${a[w]?.palette?.mode||w})`]:{":root":k}};if(j)return e.defaultColorScheme===w?`:root, ${j.replace("%s",String(w))}`:j.replace("%s",String(w))}return":root"}return{vars:h,generateThemeVars:()=>{let w={...c};return Object.entries(f).forEach(([,{vars:k}])=>{w=Ct(w,k)}),w},generateStyleSheets:()=>{const w=[],k=e.defaultColorScheme||"light";function j(F,L){Object.keys(L).length&&w.push(typeof F=="string"?{[F]:{...L}}:F)}j(r(void 0,{...d}),d);const{[k]:P,...B}=f;if(P){const{css:F}=P,L=a[k]?.palette?.mode,m=!n&&L?{colorScheme:L,...F}:{...F};j(r(k,{...m}),m)}return Object.entries(B).forEach(([F,{css:L}])=>{const m=a[F]?.palette?.mode,T=!n&&m?{colorScheme:m,...L}:{...L};j(r(F,{...T}),T)}),w}}}function Tk(e){const t={};return Object.entries(e).forEach(n=>{const[o,a]=n;typeof a=="object"&&(t[o]=`${a.fontStyle?`${a.fontStyle} `:""}${a.fontVariant?`${a.fontVariant} `:""}${a.fontWeight?`${a.fontWeight} `:""}${a.fontStretch?`${a.fontStretch} `:""}${a.fontSize||""}${a.lineHeight?`/${a.lineHeight} `:""}${a.fontFamily||""}`)}),t}function Rk(e){return function(r){return e==="media"?`@media (prefers-color-scheme: ${r})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${r}"] &`:e==="class"?`.${r} &`:e==="data"?`[data-${r}] &`:`${e.replace("%s",r)} &`:"&"}}function fi(...e){const t=e.reduce((n,o)=>(o.filterProps.forEach(a=>{n[a]=o}),n),{}),r=n=>Object.keys(n).reduce((o,a)=>t[a]?go(o,t[a](n)):o,{});return r.propTypes={},r.filterProps=e.reduce((n,o)=>n.concat(o.filterProps),[]),r}function Lt(e){return typeof e!="number"?e:`${e}px solid`}function Wt(e,t){return We({prop:e,themeKey:"borders",transform:t})}const Mk=Wt("border",Lt),Nk=Wt("borderTop",Lt),Ak=Wt("borderRight",Lt),_k=Wt("borderBottom",Lt),Ok=Wt("borderLeft",Lt),Lk=Wt("borderColor"),$k=Wt("borderTopColor"),Dk=Wt("borderRightColor"),Bk=Wt("borderBottomColor"),qk=Wt("borderLeftColor"),Fk=Wt("outline",Lt),zk=Wt("outlineColor"),gi=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=qo(e.theme,"shape.borderRadius",4),r=n=>({borderRadius:Fo(t,n)});return yr(e,e.borderRadius,r)}return null};gi.propTypes={};gi.filterProps=["borderRadius"];fi(Mk,Nk,Ak,_k,Ok,Lk,$k,Dk,Bk,qk,gi,Fk,zk);const yi=e=>{if(e.gap!==void 0&&e.gap!==null){const t=qo(e.theme,"spacing",8),r=n=>({gap:Fo(t,n)});return yr(e,e.gap,r)}return null};yi.propTypes={};yi.filterProps=["gap"];const bi=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=qo(e.theme,"spacing",8),r=n=>({columnGap:Fo(t,n)});return yr(e,e.columnGap,r)}return null};bi.propTypes={};bi.filterProps=["columnGap"];const xi=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=qo(e.theme,"spacing",8),r=n=>({rowGap:Fo(t,n)});return yr(e,e.rowGap,r)}return null};xi.propTypes={};xi.filterProps=["rowGap"];const Wk=We({prop:"gridColumn"}),Uk=We({prop:"gridRow"}),Hk=We({prop:"gridAutoFlow"}),Vk=We({prop:"gridAutoColumns"}),Gk=We({prop:"gridAutoRows"}),Kk=We({prop:"gridTemplateColumns"}),Qk=We({prop:"gridTemplateRows"}),Yk=We({prop:"gridTemplateAreas"}),Xk=We({prop:"gridArea"});fi(yi,bi,xi,Wk,Uk,Hk,Vk,Gk,Kk,Qk,Yk,Xk);function Nn(e,t){return t==="grey"?t:e}const Jk=We({prop:"color",themeKey:"palette",transform:Nn}),Zk=We({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Nn}),eP=We({prop:"backgroundColor",themeKey:"palette",transform:Nn});fi(Jk,Zk,eP);function St(e){return e<=1&&e!==0?`${e*100}%`:e}const tP=We({prop:"width",transform:St}),Ml=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{const n=e.theme?.breakpoints?.values?.[r]||hi[r];return n?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:St(r)}};return yr(e,e.maxWidth,t)}return null};Ml.filterProps=["maxWidth"];const rP=We({prop:"minWidth",transform:St}),nP=We({prop:"height",transform:St}),oP=We({prop:"maxHeight",transform:St}),aP=We({prop:"minHeight",transform:St});We({prop:"size",cssProperty:"width",transform:St});We({prop:"size",cssProperty:"height",transform:St});const iP=We({prop:"boxSizing"});fi(tP,Ml,rP,nP,oP,aP,iP);const zo={border:{themeKey:"borders",transform:Lt},borderTop:{themeKey:"borders",transform:Lt},borderRight:{themeKey:"borders",transform:Lt},borderBottom:{themeKey:"borders",transform:Lt},borderLeft:{themeKey:"borders",transform:Lt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Lt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:gi},color:{themeKey:"palette",transform:Nn},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Nn},backgroundColor:{themeKey:"palette",transform:Nn},p:{style:De},pt:{style:De},pr:{style:De},pb:{style:De},pl:{style:De},px:{style:De},py:{style:De},padding:{style:De},paddingTop:{style:De},paddingRight:{style:De},paddingBottom:{style:De},paddingLeft:{style:De},paddingX:{style:De},paddingY:{style:De},paddingInline:{style:De},paddingInlineStart:{style:De},paddingInlineEnd:{style:De},paddingBlock:{style:De},paddingBlockStart:{style:De},paddingBlockEnd:{style:De},m:{style:$e},mt:{style:$e},mr:{style:$e},mb:{style:$e},ml:{style:$e},mx:{style:$e},my:{style:$e},margin:{style:$e},marginTop:{style:$e},marginRight:{style:$e},marginBottom:{style:$e},marginLeft:{style:$e},marginX:{style:$e},marginY:{style:$e},marginInline:{style:$e},marginInlineStart:{style:$e},marginInlineEnd:{style:$e},marginBlock:{style:$e},marginBlockStart:{style:$e},marginBlockEnd:{style:$e},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:yi},rowGap:{style:xi},columnGap:{style:bi},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:St},maxWidth:{style:Ml},minWidth:{transform:St},height:{transform:St},maxHeight:{transform:St},minHeight:{transform:St},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function sP(...e){const t=e.reduce((n,o)=>n.concat(Object.keys(o)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function lP(e,t){return typeof e=="function"?e(t):e}function cP(){function e(r,n,o,a){const i={[r]:n,theme:o},s=a[r];if(!s)return{[r]:n};const{cssProperty:l=r,themeKey:c,transform:d,style:p}=s;if(n==null)return null;if(c==="typography"&&n==="inherit")return{[r]:n};const h=mi(o,c)||{};return p?p(i):yr(i,n,g=>{let y=Wa(h,d,g);return g===y&&typeof g=="string"&&(y=Wa(h,d,`${r}${g==="default"?"":Je(g)}`,g)),l===!1?y:{[l]:y}})}function t(r){const{sx:n,theme:o={}}=r||{};if(!n)return null;const a=o.unstable_sxConfig??zo;function i(s){let l=s;if(typeof s=="function")l=s(o);else if(typeof s!="object")return s;if(!l)return null;const c=ak(o.breakpoints),d=Object.keys(c);let p=c;return Object.keys(l).forEach(h=>{const f=lP(l[h],o);if(f!=null)if(typeof f=="object")if(a[h])p=go(p,e(h,f,o,a));else{const g=yr({theme:o},f,y=>({[h]:y}));sP(g,f)?p[h]=t({sx:f,theme:o}):p=go(p,g)}else p=go(p,e(h,f,o,a))}),ek(o,ik(d,p))}return Array.isArray(n)?n.map(i):i(n)}return t}const en=cP();en.filterProps=["sx"];const uP=e=>{const t={systemProps:{},otherProps:{}},r=e?.theme?.unstable_sxConfig??zo;return Object.keys(e).forEach(n=>{r[n]?t.systemProps[n]=e[n]:t.otherProps[n]=e[n]}),t};function dP(e){const{sx:t,...r}=e,{systemProps:n,otherProps:o}=uP(r);let a;return Array.isArray(t)?a=[n,...t]:typeof t=="function"?a=(...i)=>{const s=t(...i);return tr(s)?{...n,...s}:n}:a={...n,...t},{...o,sx:a}}const pP={borderRadius:4};function hP(e=8,t=Rl({spacing:e})){if(e.mui)return e;const r=(...n)=>(n.length===0?[1]:n).map(a=>{const i=t(a);return typeof i=="number"?`${i}px`:i}).join(" ");return r.mui=!0,r}function mP(e,t){const r=this;if(r.vars){if(!r.colorSchemes?.[e]||typeof r.getColorSchemeSelector!="function")return{};let n=r.getColorSchemeSelector(e);return n==="&"?t:((n.includes("data-")||n.includes("."))&&(n=`*:where(${n.replace(/\s*&$/,"")}) &`),{[n]:t})}return r.palette.mode===e?t:{}}function bh(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:a={},...i}=e,s=BC(r),l=hP(o);let c=Ct({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:l,shape:{...pP,...a}},i);return c=nk(c),c.applyStyles=mP,c=t.reduce((d,p)=>Ct(d,p),c),c.unstable_sxConfig={...zo,...i?.unstable_sxConfig},c.unstable_sx=function(p){return en({sx:p,theme:this})},c}const Ru=e=>e,fP=()=>{let e=Ru;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Ru}}},gP=fP(),yP={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function ln(e,t,r="Mui"){const n=yP[t];return n?`${r}-${n}`:`${gP.generate(e)}-${t}`}function bP(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function xP(e){return Math.round(e*1e5)/1e5}const Mu={textTransform:"uppercase"},Nu='"Roboto", "Helvetica", "Arial", sans-serif';function xh(e,t){const{fontFamily:r=Nu,fontSize:n=14,fontWeightLight:o=300,fontWeightRegular:a=400,fontWeightMedium:i=500,fontWeightBold:s=700,htmlFontSize:l=16,allVariants:c,pxToRem:d,...p}=typeof t=="function"?t(e):t,h=n/14,f=d||(v=>`${v/l*h}rem`),g=(v,b,C,w,k)=>({fontFamily:r,fontWeight:v,fontSize:f(b),lineHeight:C,...r===Nu?{letterSpacing:`${xP(w/b)}em`}:{},...k,...c}),y={h1:g(o,96,1.167,-1.5),h2:g(o,60,1.2,-.5),h3:g(a,48,1.167,0),h4:g(a,34,1.235,.25),h5:g(a,24,1.334,0),h6:g(i,20,1.6,.15),subtitle1:g(a,16,1.75,.15),subtitle2:g(i,14,1.57,.1),body1:g(a,16,1.5,.15),body2:g(a,14,1.43,.15),button:g(i,14,1.75,.4,Mu),caption:g(a,12,1.66,.4),overline:g(a,12,2.66,1,Mu),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Ct({htmlFontSize:l,pxToRem:f,fontFamily:r,fontSize:n,fontWeightLight:o,fontWeightRegular:a,fontWeightMedium:i,fontWeightBold:s,...y},p,{clone:!1})}const vP=.2,SP=.14,wP=.12;function Me(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${vP})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${SP})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${wP})`].join(",")}const CP=["none",Me(0,2,1,-1,0,1,1,0,0,1,3,0),Me(0,3,1,-2,0,2,2,0,0,1,5,0),Me(0,3,3,-2,0,3,4,0,0,1,8,0),Me(0,2,4,-1,0,4,5,0,0,1,10,0),Me(0,3,5,-1,0,5,8,0,0,1,14,0),Me(0,3,5,-1,0,6,10,0,0,1,18,0),Me(0,4,5,-2,0,7,10,1,0,2,16,1),Me(0,5,5,-3,0,8,10,1,0,3,14,2),Me(0,5,6,-3,0,9,12,1,0,3,16,2),Me(0,6,6,-3,0,10,14,1,0,4,18,3),Me(0,6,7,-4,0,11,15,1,0,4,20,3),Me(0,7,8,-4,0,12,17,2,0,5,22,4),Me(0,7,8,-4,0,13,19,2,0,5,24,4),Me(0,7,9,-4,0,14,21,2,0,5,26,4),Me(0,8,9,-5,0,15,22,2,0,6,28,5),Me(0,8,10,-5,0,16,24,2,0,6,30,5),Me(0,8,11,-5,0,17,26,2,0,6,32,5),Me(0,9,11,-5,0,18,28,2,0,7,34,6),Me(0,9,12,-6,0,19,29,2,0,7,36,6),Me(0,10,13,-6,0,20,31,3,0,8,38,7),Me(0,10,13,-6,0,21,33,3,0,8,40,7),Me(0,10,14,-6,0,22,35,3,0,8,42,7),Me(0,11,14,-7,0,23,36,3,0,9,44,8),Me(0,11,15,-7,0,24,38,3,0,9,46,8)],kP={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},PP={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Au(e){return`${Math.round(e)}ms`}function IP(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function jP(e){const t={...kP,...e.easing},r={...PP,...e.duration};return{getAutoHeightDuration:IP,create:(o=["all"],a={})=>{const{duration:i=r.standard,easing:s=t.easeInOut,delay:l=0,...c}=a;return(Array.isArray(o)?o:[o]).map(d=>`${d} ${typeof i=="string"?i:Au(i)} ${s} ${typeof l=="string"?l:Au(l)}`).join(",")},...e,easing:t,duration:r}}const EP={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function TP(e){return tr(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function vh(e={}){const t={...e};function r(n){const o=Object.entries(n);for(let a=0;a<o.length;a++){const[i,s]=o[a];!TP(s)||i.startsWith("unstable_")?delete n[i]:tr(s)&&(n[i]={...s},r(n[i]))}}return r(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
222
|
+
*/var rg;function $7(){if(rg)return Je;rg=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),p=Symbol.for("react.client.reference");function g(b){if(typeof b=="object"&&b!==null){var T=b.$$typeof;switch(T){case e:switch(b=b.type,b){case n:case o:case r:case l:case c:case h:return b;default:switch(b=b&&b.$$typeof,b){case a:case s:case u:case d:return b;case i:return b;default:return T}}case t:return T}}}return Je.ContextConsumer=i,Je.ContextProvider=a,Je.Element=e,Je.ForwardRef=s,Je.Fragment=n,Je.Lazy=u,Je.Memo=d,Je.Portal=t,Je.Profiler=o,Je.StrictMode=r,Je.Suspense=l,Je.SuspenseList=c,Je.isContextConsumer=function(b){return g(b)===i},Je.isContextProvider=function(b){return g(b)===a},Je.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},Je.isForwardRef=function(b){return g(b)===s},Je.isFragment=function(b){return g(b)===n},Je.isLazy=function(b){return g(b)===u},Je.isMemo=function(b){return g(b)===d},Je.isPortal=function(b){return g(b)===t},Je.isProfiler=function(b){return g(b)===o},Je.isStrictMode=function(b){return g(b)===r},Je.isSuspense=function(b){return g(b)===l},Je.isSuspenseList=function(b){return g(b)===c},Je.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===o||b===r||b===l||b===c||typeof b=="object"&&b!==null&&(b.$$typeof===u||b.$$typeof===d||b.$$typeof===a||b.$$typeof===i||b.$$typeof===s||b.$$typeof===p||b.getModuleId!==void 0)},Je.typeOf=g,Je}var og;function G7(){return og||(og=1,pu.exports=$7()),pu.exports}var EE=G7();function cr(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function TE(e){if(_.isValidElement(e)||EE.isValidElementType(e)||!cr(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=TE(e[n])}),t}function _n(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return cr(e)&&cr(t)&&Object.keys(t).forEach(o=>{_.isValidElement(t[o])||EE.isValidElementType(t[o])?r[o]=t[o]:cr(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&cr(e[o])?r[o]=_n(e[o],t[o],n):n.clone?r[o]=cr(t[o])?TE(t[o]):t[o]:r[o]=t[o]}),r}function q7(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Fh(e,t=0,n=1){return q7(e,t,n)}function W7(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Qr(e){if(e.type)return e;if(e.charAt(0)==="#")return Qr(W7(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(ko(9,e));let r=e.substring(t+1,e.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(ko(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}const V7=e=>{const t=Qr(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},sa=(e,t)=>{try{return V7(e)}catch{return e}};function cc(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((o,i)=>i<3?parseInt(o,10):o):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function xE(e){e=Qr(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=(c,d=(c+n/30)%12)=>o-i*Math.max(Math.min(d-3,9-d,1),-1);let s="rgb";const l=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(s+="a",l.push(t[3])),cc({type:s,values:l})}function ad(e){e=Qr(e);let t=e.type==="hsl"||e.type==="hsla"?Qr(xE(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Y7(e,t){const n=ad(e),r=ad(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function sd(e,t){return e=Qr(e),t=Fh(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,cc(e)}function ks(e,t,n){try{return sd(e,t)}catch{return e}}function Bh(e,t){if(e=Qr(e),t=Fh(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return cc(e)}function rt(e,t,n){try{return Bh(e,t)}catch{return e}}function jh(e,t){if(e=Qr(e),t=Fh(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return cc(e)}function ot(e,t,n){try{return jh(e,t)}catch{return e}}function ld(e,t=.15){return ad(e)>.5?Bh(e,t):jh(e,t)}function _s(e,t,n){try{return ld(e,t)}catch{return e}}const ja={black:"#000",white:"#fff"},K7={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Ko={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Qo={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Ji={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Xo={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Jo={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Zo={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function CE(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:ja.white,default:ja.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Q7=CE();function vE(){return{text:{primary:ja.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:ja.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const ig=vE();function ag(e,t,n,r){const o=r.light||r,i=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=jh(e.main,o):t==="dark"&&(e.dark=Bh(e.main,i)))}function X7(e="light"){return e==="dark"?{main:Xo[200],light:Xo[50],dark:Xo[400]}:{main:Xo[700],light:Xo[400],dark:Xo[800]}}function J7(e="light"){return e==="dark"?{main:Ko[200],light:Ko[50],dark:Ko[400]}:{main:Ko[500],light:Ko[300],dark:Ko[700]}}function Z7(e="light"){return e==="dark"?{main:Qo[500],light:Qo[300],dark:Qo[700]}:{main:Qo[700],light:Qo[400],dark:Qo[800]}}function e8(e="light"){return e==="dark"?{main:Jo[400],light:Jo[300],dark:Jo[700]}:{main:Jo[700],light:Jo[500],dark:Jo[900]}}function t8(e="light"){return e==="dark"?{main:Zo[400],light:Zo[300],dark:Zo[700]}:{main:Zo[800],light:Zo[500],dark:Zo[900]}}function n8(e="light"){return e==="dark"?{main:Ji[400],light:Ji[300],dark:Ji[700]}:{main:"#ed6c02",light:Ji[500],dark:Ji[900]}}function Hh(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...o}=e,i=e.primary||X7(t),a=e.secondary||J7(t),s=e.error||Z7(t),l=e.info||e8(t),c=e.success||t8(t),d=e.warning||n8(t);function u(b){return Y7(b,ig.text.primary)>=n?ig.text.primary:Q7.text.primary}const h=({color:b,name:T,mainShade:E=500,lightShade:C=300,darkShade:x=700})=>{if(b={...b},!b.main&&b[E]&&(b.main=b[E]),!b.hasOwnProperty("main"))throw new Error(ko(11,T?` (${T})`:"",E));if(typeof b.main!="string")throw new Error(ko(12,T?` (${T})`:"",JSON.stringify(b.main)));return ag(b,"light",C,r),ag(b,"dark",x,r),b.contrastText||(b.contrastText=u(b.main)),b};let p;return t==="light"?p=CE():t==="dark"&&(p=vE()),_n({common:{...ja},mode:t,primary:h({color:i,name:"primary"}),secondary:h({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:s,name:"error"}),warning:h({color:d,name:"warning"}),info:h({color:l,name:"info"}),success:h({color:c,name:"success"}),grey:K7,contrastThreshold:n,getContrastText:u,augmentColor:h,tonalOffset:r,...p},o)}function va(e,t){return t?_n(e,t,{clone:!1}):e}function r8(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,o)=>{const i=/min-width:\s*([0-9.]+)/;return+(r.match(i)?.[1]||0)-+(o.match(i)?.[1]||0)});return n.length?n.reduce((r,o)=>{const i=t[o];return delete r[o],r[o]=i,r},{...t}):t}function o8(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function i8(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}function a8(e){const t=(i,a)=>i.replace("@media",a?`@container ${a}`:"@container");function n(i,a){i.up=(...s)=>t(e.breakpoints.up(...s),a),i.down=(...s)=>t(e.breakpoints.down(...s),a),i.between=(...s)=>t(e.breakpoints.between(...s),a),i.only=(...s)=>t(e.breakpoints.only(...s),a),i.not=(...s)=>{const l=t(e.breakpoints.not(...s),a);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const r={},o=i=>(n(r,i),r);return n(o),{...e,containerQueries:o}}const uc={xs:0,sm:600,md:900,lg:1200,xl:1536},sg={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${uc[e]}px)`},s8={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:uc[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Pr(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const i=r.breakpoints||sg;return t.reduce((a,s,l)=>(a[i.up(i.keys[l])]=n(t[l]),a),{})}if(typeof t=="object"){const i=r.breakpoints||sg;return Object.keys(t).reduce((a,s)=>{if(o8(i.keys,s)){const l=i8(r.containerQueries?r:s8,s);l&&(a[l]=n(t[s],s))}else if(Object.keys(i.values||uc).includes(s)){const l=i.up(s);a[l]=n(t[s],s)}else{const l=s;a[l]=t[l]}return a},{})}return n(t)}function l8(e={}){return e.keys?.reduce((n,r)=>{const o=e.up(r);return n[o]={},n},{})||{}}function c8(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function Ht(e){if(typeof e!="string")throw new Error(ko(7));return e.charAt(0).toUpperCase()+e.slice(1)}function dc(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function Al(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=dc(e,n)||r,t&&(o=t(o,r,e)),o}function It(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=a=>{if(a[t]==null)return null;const s=a[t],l=a.theme,c=dc(l,r)||{};return Pr(a,s,u=>{let h=Al(c,o,u);return u===h&&typeof u=="string"&&(h=Al(c,o,`${t}${u==="default"?"":Ht(u)}`,u)),n===!1?h:{[n]:h}})};return i.propTypes={},i.filterProps=[t],i}function u8(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const d8={m:"margin",p:"padding"},h8={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},lg={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},p8=u8(e=>{if(e.length>2)if(lg[e])e=lg[e];else return[e];const[t,n]=e.split(""),r=d8[t],o=h8[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),Uh=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],zh=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Uh,...zh];function os(e,t,n,r){const o=dc(e,t,!0)??n;return typeof o=="number"||typeof o=="string"?i=>typeof i=="string"?i:typeof o=="string"?o.startsWith("var(")&&i===0?0:o.startsWith("var(")&&i===1?o:`calc(${i} * ${o})`:o*i:Array.isArray(o)?i=>{if(typeof i=="string")return i;const a=Math.abs(i),s=o[a];return i>=0?s:typeof s=="number"?-s:typeof s=="string"&&s.startsWith("var(")?`calc(-1 * ${s})`:`-${s}`}:typeof o=="function"?o:()=>{}}function $h(e){return os(e,"spacing",8)}function is(e,t){return typeof t=="string"||t==null?t:e(t)}function f8(e,t){return n=>e.reduce((r,o)=>(r[o]=is(t,n),r),{})}function m8(e,t,n,r){if(!t.includes(n))return null;const o=p8(n),i=f8(o,r),a=e[n];return Pr(e,a,i)}function SE(e,t){const n=$h(e.theme);return Object.keys(e).map(r=>m8(e,t,r,n)).reduce(va,{})}function xt(e){return SE(e,Uh)}xt.propTypes={};xt.filterProps=Uh;function Ct(e){return SE(e,zh)}Ct.propTypes={};Ct.filterProps=zh;function g8(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var y8={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function b8(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var E8=/[A-Z]|^ms/g,T8=/_EMO_([^_]+?)_([^]*?)_EMO_/g,AE=function(t){return t.charCodeAt(1)===45},cg=function(t){return t!=null&&typeof t!="boolean"},fu=b8(function(e){return AE(e)?e:e.replace(E8,"-$&").toLowerCase()}),ug=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(T8,function(r,o,i){return Wr={name:o,styles:i,next:Wr},o})}return y8[t]!==1&&!AE(t)&&typeof n=="number"&&n!==0?n+"px":n};function kl(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return Wr={name:o.name,styles:o.styles,next:Wr},o.name;var i=n;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)Wr={name:a.name,styles:a.styles,next:Wr},a=a.next;var s=i.styles+";";return s}return x8(e,t,n)}}var l=n;return l}function x8(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=kl(e,t,n[o])+";";else for(var i in n){var a=n[i];if(typeof a!="object"){var s=a;cg(s)&&(r+=fu(i)+":"+ug(i,s)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var l=0;l<a.length;l++)cg(a[l])&&(r+=fu(i)+":"+ug(i,a[l])+";");else{var c=kl(e,t,a);switch(i){case"animation":case"animationName":{r+=fu(i)+":"+c+";";break}default:r+=i+"{"+c+"}"}}}return r}var dg=/label:\s*([^\s;{]+)\s*(;|$)/g,Wr;function C8(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";Wr=void 0;var i=e[0];if(i==null||i.raw===void 0)r=!1,o+=kl(n,t,i);else{var a=i;o+=a[0]}for(var s=1;s<e.length;s++)if(o+=kl(n,t,e[s]),r){var l=i;o+=l[s]}dg.lastIndex=0;for(var c="",d;(d=dg.exec(o))!==null;)c+="-"+d[1];var u=g8(o)+c;return{name:u,styles:o,next:Wr}}function v8(e,t){return Dg(e,t)}function S8(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const hg=[];function pg(e){return hg[0]=e,C8(hg)}const A8=typeof window<"u"?_.useLayoutEffect:_.useEffect;function cd(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const o=r;if(o==="components"||o==="slots")n[o]={...e[o],...n[o]};else if(o==="componentsProps"||o==="slotProps"){const i=e[o],a=t[o];if(!a)n[o]=i||{};else if(!i)n[o]=a;else{n[o]={...a};for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)){const l=s;n[o][l]=cd(i[l],a[l])}}}else n[o]===void 0&&(n[o]=e[o])}return n}const k8=_.createContext(void 0);function _8(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?cd(o.defaultProps,r):!o.styleOverrides&&!o.variants?cd(o,r):r}function D8({props:e,name:t}){const n=_.useContext(k8);return _8({props:e,name:t,theme:{components:n}})}const fg=(e,t,n,r=[])=>{let o=e;t.forEach((i,a)=>{a===t.length-1?Array.isArray(o)?o[Number(i)]=n:o&&typeof o=="object"&&(o[i]=n):o&&typeof o=="object"&&(o[i]||(o[i]=r.includes(i)?[]:{}),o=o[i])})},I8=(e,t,n)=>{function r(o,i=[],a=[]){Object.entries(o).forEach(([s,l])=>{(!n||n&&!n([...i,s]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...i,s],Array.isArray(l)?[...a,s]:a):t([...i,s],l,a))})}r(e)},w8=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function mu(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},i={},a={};return I8(e,(s,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(s,l))){const d=`--${n?`${n}-`:""}${s.join("-")}`,u=w8(s,l);Object.assign(o,{[d]:u}),fg(i,s,`var(${d})`,c),fg(a,s,`var(${d}, ${u})`,c)}},s=>s[0]==="vars"),{css:o,vars:i,varsWithDefaults:a}}function N8(e,t={}){const{getSelector:n=T,disableCssColorScheme:r,colorSchemeSelector:o}=t,{colorSchemes:i={},components:a,defaultColorScheme:s="light",...l}=e,{vars:c,css:d,varsWithDefaults:u}=mu(l,t);let h=u;const p={},{[s]:g,...b}=i;if(Object.entries(b||{}).forEach(([x,k])=>{const{vars:w,css:S,varsWithDefaults:B}=mu(k,t);h=_n(h,B),p[x]={css:S,vars:w}}),g){const{css:x,vars:k,varsWithDefaults:w}=mu(g,t);h=_n(h,w),p[s]={css:x,vars:k}}function T(x,k){let w=o;if(o==="class"&&(w=".%s"),o==="data"&&(w="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(w=`[${o}="%s"]`),x){if(w==="media")return e.defaultColorScheme===x?":root":{[`@media (prefers-color-scheme: ${i[x]?.palette?.mode||x})`]:{":root":k}};if(w)return e.defaultColorScheme===x?`:root, ${w.replace("%s",String(x))}`:w.replace("%s",String(x))}return":root"}return{vars:h,generateThemeVars:()=>{let x={...c};return Object.entries(p).forEach(([,{vars:k}])=>{x=_n(x,k)}),x},generateStyleSheets:()=>{const x=[],k=e.defaultColorScheme||"light";function w(W,U){Object.keys(U).length&&x.push(typeof W=="string"?{[W]:{...U}}:W)}w(n(void 0,{...d}),d);const{[k]:S,...B}=p;if(S){const{css:W}=S,U=i[k]?.palette?.mode,y=!r&&U?{colorScheme:U,...W}:{...W};w(n(k,{...y}),y)}return Object.entries(B).forEach(([W,{css:U}])=>{const y=i[W]?.palette?.mode,R=!r&&y?{colorScheme:y,...U}:{...U};w(n(W,{...R}),R)}),x}}}function P8(e){const t={};return Object.entries(e).forEach(r=>{const[o,i]=r;typeof i=="object"&&(t[o]=`${i.fontStyle?`${i.fontStyle} `:""}${i.fontVariant?`${i.fontVariant} `:""}${i.fontWeight?`${i.fontWeight} `:""}${i.fontStretch?`${i.fontStretch} `:""}${i.fontSize||""}${i.lineHeight?`/${i.lineHeight} `:""}${i.fontFamily||""}`)}),t}function R8(e){return function(n){return e==="media"?`@media (prefers-color-scheme: ${n})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}function hc(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(i=>{r[i]=o}),r),{}),n=r=>Object.keys(r).reduce((o,i)=>t[i]?va(o,t[i](r)):o,{});return n.propTypes={},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function Un(e){return typeof e!="number"?e:`${e}px solid`}function Yn(e,t){return It({prop:e,themeKey:"borders",transform:t})}const L8=Yn("border",Un),O8=Yn("borderTop",Un),M8=Yn("borderRight",Un),F8=Yn("borderBottom",Un),B8=Yn("borderLeft",Un),j8=Yn("borderColor"),H8=Yn("borderTopColor"),U8=Yn("borderRightColor"),z8=Yn("borderBottomColor"),$8=Yn("borderLeftColor"),G8=Yn("outline",Un),q8=Yn("outlineColor"),pc=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=os(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:is(t,r)});return Pr(e,e.borderRadius,n)}return null};pc.propTypes={};pc.filterProps=["borderRadius"];hc(L8,O8,M8,F8,B8,j8,H8,U8,z8,$8,pc,G8,q8);const fc=e=>{if(e.gap!==void 0&&e.gap!==null){const t=os(e.theme,"spacing",8),n=r=>({gap:is(t,r)});return Pr(e,e.gap,n)}return null};fc.propTypes={};fc.filterProps=["gap"];const mc=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=os(e.theme,"spacing",8),n=r=>({columnGap:is(t,r)});return Pr(e,e.columnGap,n)}return null};mc.propTypes={};mc.filterProps=["columnGap"];const gc=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=os(e.theme,"spacing",8),n=r=>({rowGap:is(t,r)});return Pr(e,e.rowGap,n)}return null};gc.propTypes={};gc.filterProps=["rowGap"];const W8=It({prop:"gridColumn"}),V8=It({prop:"gridRow"}),Y8=It({prop:"gridAutoFlow"}),K8=It({prop:"gridAutoColumns"}),Q8=It({prop:"gridAutoRows"}),X8=It({prop:"gridTemplateColumns"}),J8=It({prop:"gridTemplateRows"}),Z8=It({prop:"gridTemplateAreas"}),e9=It({prop:"gridArea"});hc(fc,mc,gc,W8,V8,Y8,K8,Q8,X8,J8,Z8,e9);function hi(e,t){return t==="grey"?t:e}const t9=It({prop:"color",themeKey:"palette",transform:hi}),n9=It({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:hi}),r9=It({prop:"backgroundColor",themeKey:"palette",transform:hi});hc(t9,n9,r9);function Sn(e){return e<=1&&e!==0?`${e*100}%`:e}const o9=It({prop:"width",transform:Sn}),Gh=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{const r=e.theme?.breakpoints?.values?.[n]||uc[n];return r?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Sn(n)}};return Pr(e,e.maxWidth,t)}return null};Gh.filterProps=["maxWidth"];const i9=It({prop:"minWidth",transform:Sn}),a9=It({prop:"height",transform:Sn}),s9=It({prop:"maxHeight",transform:Sn}),l9=It({prop:"minHeight",transform:Sn});It({prop:"size",cssProperty:"width",transform:Sn});It({prop:"size",cssProperty:"height",transform:Sn});const c9=It({prop:"boxSizing"});hc(o9,Gh,i9,a9,s9,l9,c9);const as={border:{themeKey:"borders",transform:Un},borderTop:{themeKey:"borders",transform:Un},borderRight:{themeKey:"borders",transform:Un},borderBottom:{themeKey:"borders",transform:Un},borderLeft:{themeKey:"borders",transform:Un},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Un},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:pc},color:{themeKey:"palette",transform:hi},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:hi},backgroundColor:{themeKey:"palette",transform:hi},p:{style:Ct},pt:{style:Ct},pr:{style:Ct},pb:{style:Ct},pl:{style:Ct},px:{style:Ct},py:{style:Ct},padding:{style:Ct},paddingTop:{style:Ct},paddingRight:{style:Ct},paddingBottom:{style:Ct},paddingLeft:{style:Ct},paddingX:{style:Ct},paddingY:{style:Ct},paddingInline:{style:Ct},paddingInlineStart:{style:Ct},paddingInlineEnd:{style:Ct},paddingBlock:{style:Ct},paddingBlockStart:{style:Ct},paddingBlockEnd:{style:Ct},m:{style:xt},mt:{style:xt},mr:{style:xt},mb:{style:xt},ml:{style:xt},mx:{style:xt},my:{style:xt},margin:{style:xt},marginTop:{style:xt},marginRight:{style:xt},marginBottom:{style:xt},marginLeft:{style:xt},marginX:{style:xt},marginY:{style:xt},marginInline:{style:xt},marginInlineStart:{style:xt},marginInlineEnd:{style:xt},marginBlock:{style:xt},marginBlockStart:{style:xt},marginBlockEnd:{style:xt},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:fc},rowGap:{style:gc},columnGap:{style:mc},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Sn},maxWidth:{style:Gh},minWidth:{transform:Sn},height:{transform:Sn},maxHeight:{transform:Sn},minHeight:{transform:Sn},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function u9(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function d9(e,t){return typeof e=="function"?e(t):e}function h9(){function e(n,r,o,i){const a={[n]:r,theme:o},s=i[n];if(!s)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:d,style:u}=s;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const h=dc(o,c)||{};return u?u(a):Pr(a,r,g=>{let b=Al(h,d,g);return g===b&&typeof g=="string"&&(b=Al(h,d,`${n}${g==="default"?"":Ht(g)}`,g)),l===!1?b:{[l]:b}})}function t(n){const{sx:r,theme:o={}}=n||{};if(!r)return null;const i=o.unstable_sxConfig??as;function a(s){let l=s;if(typeof s=="function")l=s(o);else if(typeof s!="object")return s;if(!l)return null;const c=l8(o.breakpoints),d=Object.keys(c);let u=c;return Object.keys(l).forEach(h=>{const p=d9(l[h],o);if(p!=null)if(typeof p=="object")if(i[h])u=va(u,e(h,p,o,i));else{const g=Pr({theme:o},p,b=>({[h]:b}));u9(g,p)?u[h]=t({sx:p,theme:o}):u=va(u,g)}else u=va(u,e(h,p,o,i))}),r8(o,c8(d,u))}return Array.isArray(r)?r.map(a):a(r)}return t}const _o=h9();_o.filterProps=["sx"];const p9=e=>{const t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??as;return Object.keys(e).forEach(r=>{n[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]}),t};function f9(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=p9(n);let i;return Array.isArray(t)?i=[r,...t]:typeof t=="function"?i=(...a)=>{const s=t(...a);return cr(s)?{...r,...s}:r}:i={...r,...t},{...o,sx:i}}const m9={borderRadius:4};function g9(e=8,t=$h({spacing:e})){if(e.mui)return e;const n=(...r)=>(r.length===0?[1]:r).map(i=>{const a=t(i);return typeof a=="number"?`${a}px`:a}).join(" ");return n.mui=!0,n}function y9(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||typeof n.getColorSchemeSelector!="function")return{};let r=n.getColorSchemeSelector(e);return r==="&"?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function kE(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...a}=e,s=z7(n),l=g9(o);let c=_n({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...m9,...i}},a);return c=a8(c),c.applyStyles=y9,c=t.reduce((d,u)=>_n(d,u),c),c.unstable_sxConfig={...as,...a?.unstable_sxConfig},c.unstable_sx=function(u){return _o({sx:u,theme:this})},c}const mg=e=>e,b9=()=>{let e=mg;return{configure(t){e=t},generate(t){return e(t)},reset(){e=mg}}},E9=b9(),T9={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Mo(e,t,n="Mui"){const r=T9[t];return r?`${n}-${r}`:`${E9.generate(e)}-${t}`}function x9(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function C9(e){return Math.round(e*1e5)/1e5}const gg={textTransform:"uppercase"},yg='"Roboto", "Helvetica", "Arial", sans-serif';function _E(e,t){const{fontFamily:n=yg,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:l=16,allVariants:c,pxToRem:d,...u}=typeof t=="function"?t(e):t,h=r/14,p=d||(T=>`${T/l*h}rem`),g=(T,E,C,x,k)=>({fontFamily:n,fontWeight:T,fontSize:p(E),lineHeight:C,...n===yg?{letterSpacing:`${C9(x/E)}em`}:{},...k,...c}),b={h1:g(o,96,1.167,-1.5),h2:g(o,60,1.2,-.5),h3:g(i,48,1.167,0),h4:g(i,34,1.235,.25),h5:g(i,24,1.334,0),h6:g(a,20,1.6,.15),subtitle1:g(i,16,1.75,.15),subtitle2:g(a,14,1.57,.1),body1:g(i,16,1.5,.15),body2:g(i,14,1.43,.15),button:g(a,14,1.75,.4,gg),caption:g(i,12,1.66,.4),overline:g(i,12,2.66,1,gg),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return _n({htmlFontSize:l,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:s,...b},u,{clone:!1})}const v9=.2,S9=.14,A9=.12;function mt(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${v9})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${S9})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${A9})`].join(",")}const k9=["none",mt(0,2,1,-1,0,1,1,0,0,1,3,0),mt(0,3,1,-2,0,2,2,0,0,1,5,0),mt(0,3,3,-2,0,3,4,0,0,1,8,0),mt(0,2,4,-1,0,4,5,0,0,1,10,0),mt(0,3,5,-1,0,5,8,0,0,1,14,0),mt(0,3,5,-1,0,6,10,0,0,1,18,0),mt(0,4,5,-2,0,7,10,1,0,2,16,1),mt(0,5,5,-3,0,8,10,1,0,3,14,2),mt(0,5,6,-3,0,9,12,1,0,3,16,2),mt(0,6,6,-3,0,10,14,1,0,4,18,3),mt(0,6,7,-4,0,11,15,1,0,4,20,3),mt(0,7,8,-4,0,12,17,2,0,5,22,4),mt(0,7,8,-4,0,13,19,2,0,5,24,4),mt(0,7,9,-4,0,14,21,2,0,5,26,4),mt(0,8,9,-5,0,15,22,2,0,6,28,5),mt(0,8,10,-5,0,16,24,2,0,6,30,5),mt(0,8,11,-5,0,17,26,2,0,6,32,5),mt(0,9,11,-5,0,18,28,2,0,7,34,6),mt(0,9,12,-6,0,19,29,2,0,7,36,6),mt(0,10,13,-6,0,20,31,3,0,8,38,7),mt(0,10,13,-6,0,21,33,3,0,8,40,7),mt(0,10,14,-6,0,22,35,3,0,8,42,7),mt(0,11,14,-7,0,23,36,3,0,9,44,8),mt(0,11,15,-7,0,24,38,3,0,9,46,8)],_9={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},D9={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function bg(e){return`${Math.round(e)}ms`}function I9(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function w9(e){const t={..._9,...e.easing},n={...D9,...e.duration};return{getAutoHeightDuration:I9,create:(o=["all"],i={})=>{const{duration:a=n.standard,easing:s=t.easeInOut,delay:l=0,...c}=i;return(Array.isArray(o)?o:[o]).map(d=>`${d} ${typeof a=="string"?a:bg(a)} ${s} ${typeof l=="string"?l:bg(l)}`).join(",")},...e,easing:t,duration:n}}const N9={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function P9(e){return cr(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function DE(e={}){const t={...e};function n(r){const o=Object.entries(r);for(let i=0;i<o.length;i++){const[a,s]=o[i];!P9(s)||a.startsWith("unstable_")?delete r[a]:cr(s)&&(r[a]={...s},n(r[a]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
160
223
|
|
|
161
224
|
const theme = ${JSON.stringify(t,null,2)};
|
|
162
225
|
|
|
163
226
|
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
164
227
|
theme.transitions = createTransitions(theme.transitions || {});
|
|
165
228
|
|
|
166
|
-
export default theme;`}function Cs(e={},...t){const{breakpoints:r,mixins:n={},spacing:o,palette:a={},transitions:i={},typography:s={},shape:l,...c}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(Zr(20));const d=jl(a),p=bh(e);let h=Ct(p,{mixins:bP(p.breakpoints,n),palette:d,shadows:CP.slice(),typography:xh(d,s),transitions:jP(i),zIndex:{...EP}});return h=Ct(h,c),h=t.reduce((f,g)=>Ct(f,g),h),h.unstable_sxConfig={...zo,...c?.unstable_sxConfig},h.unstable_sx=function(g){return en({sx:g,theme:this})},h.toRuntimeSource=vh,h}function RP(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const MP=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=RP(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function Sh(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function wh(e){return e==="dark"?MP:[]}function NP(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...o}=e,a=jl(t);return{palette:a,opacity:{...Sh(a.mode),...r},overlays:n||wh(a.mode),...o}}function AP(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const _P=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],OP=e=>(t,r)=>{const n=e.rootSelector||":root",o=e.colorSchemeSelector;let a=o;if(o==="class"&&(a=".%s"),o==="data"&&(a="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(a=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const i={};return _P(e.cssVarPrefix).forEach(s=>{i[s]=r[s],delete r[s]}),a==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:i}}:a?{[a.replace("%s",t)]:i,[`${n}, ${a.replace("%s",t)}`]:r}:{[n]:{...r,...i}}}if(a&&a!=="media")return`${n}, ${a.replace("%s",String(t))}`}else if(t){if(a==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:r}};if(a)return a.replace("%s",String(t))}return n};function LP(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function A(e,t,r){!e[t]&&r&&(e[t]=r)}function uo(e){return typeof e!="string"||!e.startsWith("hsl")?e:hh(e)}function lr(e,t){`${t}Channel`in e||(e[`${t}Channel`]=co(uo(e[t])))}function $P(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Jt=e=>{try{return e()}catch{}},DP=(e="mui")=>fe.unstable_createGetCssVar(e);function Ki(e,t,r,n){if(!t)return;t=t===!0?{}:t;const o=n==="dark"?"dark":"light";if(!r){e[n]=NP({...t,palette:{mode:o,...t?.palette}});return}const{palette:a,...i}=Cs({...r,palette:{mode:o,...t?.palette}});return e[n]={...t,palette:a,opacity:{...Sh(o),...t?.opacity},overlays:t?.overlays||wh(o)},i}function BP(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:o=!1,cssVarPrefix:a="mui",shouldSkipGeneratingVar:i=AP,colorSchemeSelector:s=r.light&&r.dark?"media":void 0,rootSelector:l=":root",...c}=e,d=Object.keys(r)[0],p=n||(r.light&&d!=="light"?"light":d),h=DP(a),{[p]:f,light:g,dark:y,...v}=r,b={...v};let C=f;if((p==="dark"&&!("dark"in r)||p==="light"&&!("light"in r))&&(C=!0),!C)throw new Error(Zr(21,p));const w=Ki(b,C,c,p);g&&!b.light&&Ki(b,g,void 0,"light"),y&&!b.dark&&Ki(b,y,void 0,"dark");let k={defaultColorScheme:p,...w,cssVarPrefix:a,colorSchemeSelector:s,rootSelector:l,getCssVar:h,colorSchemes:b,font:{...Tk(w.typography),...w.font},spacing:$P(c.spacing)};Object.keys(k.colorSchemes).forEach(L=>{const m=k.colorSchemes[L].palette,T=D=>{const $=D.split("-"),H=$[1],J=$[2];return h(D,m[H][J])};if(m.mode==="light"&&(A(m.common,"background","#fff"),A(m.common,"onBackground","#000")),m.mode==="dark"&&(A(m.common,"background","#000"),A(m.common,"onBackground","#fff")),LP(m,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),m.mode==="light"){A(m.Alert,"errorColor",Ce(m.error.light,.6)),A(m.Alert,"infoColor",Ce(m.info.light,.6)),A(m.Alert,"successColor",Ce(m.success.light,.6)),A(m.Alert,"warningColor",Ce(m.warning.light,.6)),A(m.Alert,"errorFilledBg",T("palette-error-main")),A(m.Alert,"infoFilledBg",T("palette-info-main")),A(m.Alert,"successFilledBg",T("palette-success-main")),A(m.Alert,"warningFilledBg",T("palette-warning-main")),A(m.Alert,"errorFilledColor",Jt(()=>m.getContrastText(m.error.main))),A(m.Alert,"infoFilledColor",Jt(()=>m.getContrastText(m.info.main))),A(m.Alert,"successFilledColor",Jt(()=>m.getContrastText(m.success.main))),A(m.Alert,"warningFilledColor",Jt(()=>m.getContrastText(m.warning.main))),A(m.Alert,"errorStandardBg",ke(m.error.light,.9)),A(m.Alert,"infoStandardBg",ke(m.info.light,.9)),A(m.Alert,"successStandardBg",ke(m.success.light,.9)),A(m.Alert,"warningStandardBg",ke(m.warning.light,.9)),A(m.Alert,"errorIconColor",T("palette-error-main")),A(m.Alert,"infoIconColor",T("palette-info-main")),A(m.Alert,"successIconColor",T("palette-success-main")),A(m.Alert,"warningIconColor",T("palette-warning-main")),A(m.AppBar,"defaultBg",T("palette-grey-100")),A(m.Avatar,"defaultBg",T("palette-grey-400")),A(m.Button,"inheritContainedBg",T("palette-grey-300")),A(m.Button,"inheritContainedHoverBg",T("palette-grey-A100")),A(m.Chip,"defaultBorder",T("palette-grey-400")),A(m.Chip,"defaultAvatarColor",T("palette-grey-700")),A(m.Chip,"defaultIconColor",T("palette-grey-700")),A(m.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),A(m.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),A(m.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),A(m.LinearProgress,"primaryBg",ke(m.primary.main,.62)),A(m.LinearProgress,"secondaryBg",ke(m.secondary.main,.62)),A(m.LinearProgress,"errorBg",ke(m.error.main,.62)),A(m.LinearProgress,"infoBg",ke(m.info.main,.62)),A(m.LinearProgress,"successBg",ke(m.success.main,.62)),A(m.LinearProgress,"warningBg",ke(m.warning.main,.62)),A(m.Skeleton,"bg",`rgba(${T("palette-text-primaryChannel")} / 0.11)`),A(m.Slider,"primaryTrack",ke(m.primary.main,.62)),A(m.Slider,"secondaryTrack",ke(m.secondary.main,.62)),A(m.Slider,"errorTrack",ke(m.error.main,.62)),A(m.Slider,"infoTrack",ke(m.info.main,.62)),A(m.Slider,"successTrack",ke(m.success.main,.62)),A(m.Slider,"warningTrack",ke(m.warning.main,.62));const D=ca(m.background.default,.8);A(m.SnackbarContent,"bg",D),A(m.SnackbarContent,"color",Jt(()=>m.getContrastText(D))),A(m.SpeedDialAction,"fabHoverBg",ca(m.background.paper,.15)),A(m.StepConnector,"border",T("palette-grey-400")),A(m.StepContent,"border",T("palette-grey-400")),A(m.Switch,"defaultColor",T("palette-common-white")),A(m.Switch,"defaultDisabledColor",T("palette-grey-100")),A(m.Switch,"primaryDisabledColor",ke(m.primary.main,.62)),A(m.Switch,"secondaryDisabledColor",ke(m.secondary.main,.62)),A(m.Switch,"errorDisabledColor",ke(m.error.main,.62)),A(m.Switch,"infoDisabledColor",ke(m.info.main,.62)),A(m.Switch,"successDisabledColor",ke(m.success.main,.62)),A(m.Switch,"warningDisabledColor",ke(m.warning.main,.62)),A(m.TableCell,"border",ke(la(m.divider,1),.88)),A(m.Tooltip,"bg",la(m.grey[700],.92))}if(m.mode==="dark"){A(m.Alert,"errorColor",ke(m.error.light,.6)),A(m.Alert,"infoColor",ke(m.info.light,.6)),A(m.Alert,"successColor",ke(m.success.light,.6)),A(m.Alert,"warningColor",ke(m.warning.light,.6)),A(m.Alert,"errorFilledBg",T("palette-error-dark")),A(m.Alert,"infoFilledBg",T("palette-info-dark")),A(m.Alert,"successFilledBg",T("palette-success-dark")),A(m.Alert,"warningFilledBg",T("palette-warning-dark")),A(m.Alert,"errorFilledColor",Jt(()=>m.getContrastText(m.error.dark))),A(m.Alert,"infoFilledColor",Jt(()=>m.getContrastText(m.info.dark))),A(m.Alert,"successFilledColor",Jt(()=>m.getContrastText(m.success.dark))),A(m.Alert,"warningFilledColor",Jt(()=>m.getContrastText(m.warning.dark))),A(m.Alert,"errorStandardBg",Ce(m.error.light,.9)),A(m.Alert,"infoStandardBg",Ce(m.info.light,.9)),A(m.Alert,"successStandardBg",Ce(m.success.light,.9)),A(m.Alert,"warningStandardBg",Ce(m.warning.light,.9)),A(m.Alert,"errorIconColor",T("palette-error-main")),A(m.Alert,"infoIconColor",T("palette-info-main")),A(m.Alert,"successIconColor",T("palette-success-main")),A(m.Alert,"warningIconColor",T("palette-warning-main")),A(m.AppBar,"defaultBg",T("palette-grey-900")),A(m.AppBar,"darkBg",T("palette-background-paper")),A(m.AppBar,"darkColor",T("palette-text-primary")),A(m.Avatar,"defaultBg",T("palette-grey-600")),A(m.Button,"inheritContainedBg",T("palette-grey-800")),A(m.Button,"inheritContainedHoverBg",T("palette-grey-700")),A(m.Chip,"defaultBorder",T("palette-grey-700")),A(m.Chip,"defaultAvatarColor",T("palette-grey-300")),A(m.Chip,"defaultIconColor",T("palette-grey-300")),A(m.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),A(m.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),A(m.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),A(m.LinearProgress,"primaryBg",Ce(m.primary.main,.5)),A(m.LinearProgress,"secondaryBg",Ce(m.secondary.main,.5)),A(m.LinearProgress,"errorBg",Ce(m.error.main,.5)),A(m.LinearProgress,"infoBg",Ce(m.info.main,.5)),A(m.LinearProgress,"successBg",Ce(m.success.main,.5)),A(m.LinearProgress,"warningBg",Ce(m.warning.main,.5)),A(m.Skeleton,"bg",`rgba(${T("palette-text-primaryChannel")} / 0.13)`),A(m.Slider,"primaryTrack",Ce(m.primary.main,.5)),A(m.Slider,"secondaryTrack",Ce(m.secondary.main,.5)),A(m.Slider,"errorTrack",Ce(m.error.main,.5)),A(m.Slider,"infoTrack",Ce(m.info.main,.5)),A(m.Slider,"successTrack",Ce(m.success.main,.5)),A(m.Slider,"warningTrack",Ce(m.warning.main,.5));const D=ca(m.background.default,.98);A(m.SnackbarContent,"bg",D),A(m.SnackbarContent,"color",Jt(()=>m.getContrastText(D))),A(m.SpeedDialAction,"fabHoverBg",ca(m.background.paper,.15)),A(m.StepConnector,"border",T("palette-grey-600")),A(m.StepContent,"border",T("palette-grey-600")),A(m.Switch,"defaultColor",T("palette-grey-300")),A(m.Switch,"defaultDisabledColor",T("palette-grey-600")),A(m.Switch,"primaryDisabledColor",Ce(m.primary.main,.55)),A(m.Switch,"secondaryDisabledColor",Ce(m.secondary.main,.55)),A(m.Switch,"errorDisabledColor",Ce(m.error.main,.55)),A(m.Switch,"infoDisabledColor",Ce(m.info.main,.55)),A(m.Switch,"successDisabledColor",Ce(m.success.main,.55)),A(m.Switch,"warningDisabledColor",Ce(m.warning.main,.55)),A(m.TableCell,"border",Ce(la(m.divider,1),.68)),A(m.Tooltip,"bg",la(m.grey[700],.92))}lr(m.background,"default"),lr(m.background,"paper"),lr(m.common,"background"),lr(m.common,"onBackground"),lr(m,"divider"),Object.keys(m).forEach(D=>{const $=m[D];D!=="tonalOffset"&&$&&typeof $=="object"&&($.main&&A(m[D],"mainChannel",co(uo($.main))),$.light&&A(m[D],"lightChannel",co(uo($.light))),$.dark&&A(m[D],"darkChannel",co(uo($.dark))),$.contrastText&&A(m[D],"contrastTextChannel",co(uo($.contrastText))),D==="text"&&(lr(m[D],"primary"),lr(m[D],"secondary")),D==="action"&&($.active&&lr(m[D],"active"),$.selected&&lr(m[D],"selected")))})}),k=t.reduce((L,m)=>Ct(L,m),k);const j={prefix:a,disableCssColorScheme:o,shouldSkipGeneratingVar:i,getSelector:OP(k)},{vars:P,generateThemeVars:B,generateStyleSheets:F}=Ek(k,j);return k.vars=P,Object.entries(k.colorSchemes[k.defaultColorScheme]).forEach(([L,m])=>{k[L]=m}),k.generateThemeVars=B,k.generateStyleSheets=F,k.generateSpacing=function(){return fe.createSpacing(c.spacing,Rl(this))},k.getColorSchemeSelector=Rk(s),k.spacing=k.generateSpacing(),k.shouldSkipGeneratingVar=i,k.unstable_sxConfig={...zo,...c?.unstable_sxConfig},k.unstable_sx=function(m){return en({sx:m,theme:this})},k.toRuntimeSource=vh,k}function _u(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:jl({...r===!0?{}:r.palette,mode:t})})}function Nl(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:o=r?void 0:{light:!0},defaultColorScheme:a=r?.mode,...i}=e,s=a||"light",l=o?.[s],c={...o,...r?{[s]:{...typeof l!="boolean"&&l,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return Cs(e,...t);let d=r;"palette"in e||c[s]&&(c[s]!==!0?d=c[s].palette:s==="dark"&&(d={mode:"dark"}));const p=Cs({...e,palette:d},...t);return p.defaultColorScheme=s,p.colorSchemes=c,p.palette.mode==="light"&&(p.colorSchemes.light={...c.light!==!0&&c.light,palette:p.palette},_u(p,"dark",c.dark)),p.palette.mode==="dark"&&(p.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:p.palette},_u(p,"light",c.light)),p}return!r&&!("light"in c)&&s==="light"&&(c.light=!0),BP({...i,colorSchemes:c,defaultColorScheme:s,...typeof n!="boolean"&&n},...t)}const qP=Nl();function FP(e){const{variants:t,...r}=e,n={variants:t,style:Eu(r),isProcessed:!0};return n.style===r||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=Eu(o.style))}),n}const zP=bh();function Qi(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function WP(e){return e?(t,r)=>r[e]:null}function UP(e,t,r){e.theme=GP(e.theme)?r:e.theme[t]||e.theme}function va(e,t){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(n=>va(e,n));if(Array.isArray(r?.variants)){let n;if(r.isProcessed)n=r.style;else{const{variants:o,...a}=r;n=a}return Ch(e,r.variants,[n])}return r?.isProcessed?r.style:r}function Ch(e,t,r=[]){let n;e:for(let o=0;o<t.length;o+=1){const a=t[o];if(typeof a.props=="function"){if(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),!a.props(n))continue}else for(const i in a.props)if(e[i]!==a.props[i]&&e.ownerState?.[i]!==a.props[i])continue e;typeof a.style=="function"?(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),r.push(a.style(n))):r.push(a.style)}return r}function HP(e={}){const{themeId:t,defaultTheme:r=zP,rootShouldForwardProp:n=Qi,slotShouldForwardProp:o=Qi}=e;function a(s){UP(s,t,r)}return(s,l={})=>{Sk(s,j=>j.filter(P=>P!==en));const{name:c,slot:d,skipVariantsResolver:p,skipSx:h,overridesResolver:f=WP(QP(d)),...g}=l,y=p!==void 0?p:d&&d!=="Root"&&d!=="root"||!1,v=h||!1;let b=Qi;d==="Root"||d==="root"?b=n:d?b=o:KP(s)&&(b=void 0);const C=vk(s,{shouldForwardProp:b,label:VP(),...g}),w=j=>{if(j.__emotion_real===j)return j;if(typeof j=="function")return function(B){return va(B,j)};if(tr(j)){const P=FP(j);return P.variants?function(F){return va(F,P)}:P.style}return j},k=(...j)=>{const P=[],B=j.map(w),F=[];if(P.push(a),c&&f&&F.push(function(D){const H=D.theme.components?.[c]?.styleOverrides;if(!H)return null;const J={};for(const V in H)J[V]=va(D,H[V]);return f(D,J)}),c&&!y&&F.push(function(D){const H=D.theme?.components?.[c]?.variants;return H?Ch(D,H):null}),v||F.push(en),Array.isArray(B[0])){const T=B.shift(),D=new Array(P.length).fill(""),$=new Array(F.length).fill("");let H;H=[...D,...T,...$],H.raw=[...D,...T.raw,...$],P.unshift(H)}const L=[...P,...B,...F],m=C(...L);return s.muiName&&(m.muiName=s.muiName),m};return C.withConfig&&(k.withConfig=C.withConfig),k}}function VP(e,t){return void 0}function GP(e){for(const t in e)return!1;return!0}function KP(e){return typeof e=="string"&&e.charCodeAt(0)>96}function QP(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function YP(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const XP=e=>YP(e)&&e!=="classes",ut=HP({themeId:Yr,defaultTheme:qP,rootShouldForwardProp:XP});function JP({theme:e,...t}){const r=Yr in e?e[Yr]:void 0;return u.jsx(fe.ThemeProvider,{...t,themeId:r?Yr:void 0,theme:r||e})}const ua={colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"},{CssVarsProvider:ZP,useColorScheme:P2,getInitColorSchemeScript:I2}=fe.unstable_createCssVarsProvider({themeId:Yr,theme:()=>Nl({cssVariables:!0}),colorSchemeStorageKey:ua.colorSchemeStorageKey,modeStorageKey:ua.modeStorageKey,defaultColorScheme:{light:ua.defaultLightColorScheme,dark:ua.defaultDarkColorScheme},resolveTheme:e=>{const t={...e,typography:xh(e.palette,e.typography)};return t.unstable_sx=function(n){return en({sx:n,theme:this})},t}}),eI=ZP;function tI({theme:e,...t}){const r=S.useMemo(()=>{if(typeof e=="function")return e;const n=Yr in e?e[Yr]:e;return"colorSchemes"in n?null:"vars"in n?e:{...e,vars:null}},[e]);return r?u.jsx(JP,{theme:r,...t}):u.jsx(eI,{theme:e,...t})}function kh(){const e=Fn();return u.jsx(LC,{navigate:e})}function Or(e){return Pk(e)}const Ph=fe.createContainer({createStyledComponent:ut("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`maxWidth${Je(String(r.maxWidth))}`],r.fixed&&t.fixed,r.disableGutters&&t.disableGutters]}}),useThemeProps:e=>Or({props:e,name:"MuiContainer"})});function cn(e,t,r="Mui"){const n={};return t.forEach(o=>{n[o]=ln(e,o,r)}),n}function Ih(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Ih(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function at(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Ih(e))&&(n&&(n+=" "),n+=t);return n}function zn(e,t,r=void 0){const n={};for(const o in e){const a=e[o];let i="",s=!0;for(let l=0;l<a.length;l+=1){const c=a[l];c&&(i+=(s===!0?"":" ")+t(c),s=!1,r&&r[c]&&(i+=" "+r[c]))}n[o]=i}return n}function ks(...e){const t=S.useRef(void 0),r=S.useCallback(n=>{const o=e.map(a=>{if(a==null)return null;if(typeof a=="function"){const i=a,s=i(n);return typeof s=="function"?s:()=>{i(null)}}return a.current=n,()=>{a.current=null}});return()=>{o.forEach(a=>a?.())}},e);return S.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}function rI(e){return typeof e=="string"}function nI(e,t,r){return e===void 0||rI(e)?t:{...t,ownerState:{...t.ownerState,...r}}}function oI(e,t=[]){if(e===void 0)return{};const r={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]=="function"&&!t.includes(n)).forEach(n=>{r[n]=e[n]}),r}function Ou(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(r=>!(r.match(/^on[A-Z]/)&&typeof e[r]=="function")).forEach(r=>{t[r]=e[r]}),t}function aI(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:n,externalForwardedProps:o,className:a}=e;if(!t){const f=at(r?.className,a,o?.className,n?.className),g={...r?.style,...o?.style,...n?.style},y={...r,...o,...n};return f.length>0&&(y.className=f),Object.keys(g).length>0&&(y.style=g),{props:y,internalRef:void 0}}const i=oI({...o,...n}),s=Ou(n),l=Ou(o),c=t(i),d=at(c?.className,r?.className,a,o?.className,n?.className),p={...c?.style,...r?.style,...o?.style,...n?.style},h={...c,...r,...l,...s};return d.length>0&&(h.className=d),Object.keys(p).length>0&&(h.style=p),{props:h,internalRef:c.ref}}function iI(e,t,r){return typeof e=="function"?e(t,r):e}function sI(e){const{elementType:t,externalSlotProps:r,ownerState:n,skipResolvingSlotProps:o=!1,...a}=e,i=o?{}:iI(r,n),{props:s,internalRef:l}=aI({...a,externalSlotProps:i}),c=ks(l,i?.ref,e.additionalProps?.ref);return nI(t,{...s,ref:c},n)}function lI(){return dP}const tn=fe.unstable_memoTheme;function cI(e){return typeof e.main=="string"}function uI(e,t=[]){if(!cI(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function Ha(e=[]){return([,t])=>t&&uI(t,e)}function dI(e){return ln("MuiTypography",e)}cn("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const pI={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},hI=lI(),mI=e=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:o,variant:a,classes:i}=e,s={root:["root",a,e.align!=="inherit"&&`align${Je(t)}`,r&&"gutterBottom",n&&"noWrap",o&&"paragraph"]};return zn(s,dI,i)},fI=ut("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.variant&&t[r.variant],r.align!=="inherit"&&t[`align${Je(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(tn(({theme:e})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([t,r])=>t!=="inherit"&&r&&typeof r=="object").map(([t,r])=>({props:{variant:t},style:r})),...Object.entries(e.palette).filter(Ha()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,t])=>typeof t=="string").map(([t])=>({props:{color:`text${Je(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:t})=>t.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:t})=>t.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:t})=>t.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:t})=>t.paragraph,style:{marginBottom:16}}]}))),Lu={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},gI=S.forwardRef(function(t,r){const{color:n,...o}=Or({props:t,name:"MuiTypography"}),a=!pI[n],i=hI({...o,...a&&{color:n}}),{align:s="inherit",className:l,component:c,gutterBottom:d=!1,noWrap:p=!1,paragraph:h=!1,variant:f="body1",variantMapping:g=Lu,...y}=i,v={...i,align:s,color:n,className:l,component:c,gutterBottom:d,noWrap:p,paragraph:h,variant:f,variantMapping:g},b=c||(h?"p":g[f]||Lu[f])||"span",C=mI(v);return u.jsx(fI,{as:b,ref:r,className:at(C.root,l),...y,ownerState:v,style:{...s!=="inherit"&&{"--Typography-textAlign":s},...y.style}})});function yI(e){return ln("MuiSvgIcon",e)}cn("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const bI=e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root",t!=="inherit"&&`color${Je(t)}`,`fontSize${Je(r)}`]};return zn(o,yI,n)},xI=ut("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${Je(r.color)}`],t[`fontSize${Je(r.fontSize)}`]]}})(tn(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),Ps=S.forwardRef(function(t,r){const n=Or({props:t,name:"MuiSvgIcon"}),{children:o,className:a,color:i="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:d=!1,titleAccess:p,viewBox:h="0 0 24 24",...f}=n,g=S.isValidElement(o)&&o.type==="svg",y={...n,color:i,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:g},v={};d||(v.viewBox=h);const b=bI(y);return u.jsxs(xI,{as:s,className:at(b.root,a),focusable:"false",color:c,"aria-hidden":p?void 0:!0,role:p?"img":void 0,ref:r,...v,...f,...g&&o.props,ownerState:y,children:[g?o.props.children:o,p?u.jsx("title",{children:p}):null]})});Ps.muiName="SvgIcon";function Al(e,t){function r(n,o){return u.jsx(Ps,{"data-testid":void 0,ref:o,...n,children:e})}return r.muiName=Ps.muiName,S.memo(S.forwardRef(r))}const vI=Al(u.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}));function $u(e){try{return e.matches(":focus-visible")}catch{}return!1}function Sa(e){const t=S.useRef(e);return wk(()=>{t.current=e}),S.useRef((...r)=>(0,t.current)(...r)).current}const Du={};function jh(e,t){const r=S.useRef(Du);return r.current===Du&&(r.current=e(t)),r}class Va{constructor(){R(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new Va}static use(){const t=jh(Va.create).current,[r,n]=S.useState(!1);return t.shouldMount=r,t.setShouldMount=n,S.useEffect(t.mountEffect,[r]),t}mount(){return this.mounted||(this.mounted=wI(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>this.ref.current?.start(...t))}stop(...t){this.mount().then(()=>this.ref.current?.stop(...t))}pulsate(...t){this.mount().then(()=>this.ref.current?.pulsate(...t))}}function SI(){return Va.use()}function wI(){let e,t;const r=new Promise((n,o)=>{e=n,t=o});return r.resolve=e,r.reject=t,r}function Is(){return Is=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Is.apply(null,arguments)}function CI(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function js(e,t){return js=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},js(e,t)}function kI(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,js(e,t)}const Bu=_.createContext(null);function PI(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _l(e,t){var r=function(a){return t&&_.isValidElement(a)?t(a):a},n=Object.create(null);return e&&_.Children.map(e,function(o){return o}).forEach(function(o){n[o.key]=r(o)}),n}function II(e,t){e=e||{},t=t||{};function r(d){return d in t?t[d]:e[d]}var n=Object.create(null),o=[];for(var a in e)a in t?o.length&&(n[a]=o,o=[]):o.push(a);var i,s={};for(var l in t){if(n[l])for(i=0;i<n[l].length;i++){var c=n[l][i];s[n[l][i]]=r(c)}s[l]=r(l)}for(i=0;i<o.length;i++)s[o[i]]=r(o[i]);return s}function Kr(e,t,r){return r[t]!=null?r[t]:e.props[t]}function jI(e,t){return _l(e.children,function(r){return _.cloneElement(r,{onExited:t.bind(null,r),in:!0,appear:Kr(r,"appear",e),enter:Kr(r,"enter",e),exit:Kr(r,"exit",e)})})}function EI(e,t,r){var n=_l(e.children),o=II(t,n);return Object.keys(o).forEach(function(a){var i=o[a];if(_.isValidElement(i)){var s=a in t,l=a in n,c=t[a],d=_.isValidElement(c)&&!c.props.in;l&&(!s||d)?o[a]=_.cloneElement(i,{onExited:r.bind(null,i),in:!0,exit:Kr(i,"exit",e),enter:Kr(i,"enter",e)}):!l&&s&&!d?o[a]=_.cloneElement(i,{in:!1}):l&&s&&_.isValidElement(c)&&(o[a]=_.cloneElement(i,{onExited:r.bind(null,i),in:c.props.in,exit:Kr(i,"exit",e),enter:Kr(i,"enter",e)}))}}),o}var TI=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},RI={component:"div",childFactory:function(t){return t}},Ol=function(e){kI(t,e);function t(n,o){var a;a=e.call(this,n,o)||this;var i=a.handleExited.bind(PI(a));return a.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},a}var r=t.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(o,a){var i=a.children,s=a.handleExited,l=a.firstRender;return{children:l?jI(o,s):EI(o,i,s),firstRender:!1}},r.handleExited=function(o,a){var i=_l(this.props.children);o.key in i||(o.props.onExited&&o.props.onExited(a),this.mounted&&this.setState(function(s){var l=Is({},s.children);return delete l[o.key],{children:l}}))},r.render=function(){var o=this.props,a=o.component,i=o.childFactory,s=CI(o,["component","childFactory"]),l=this.state.contextValue,c=TI(this.state.children).map(i);return delete s.appear,delete s.enter,delete s.exit,a===null?_.createElement(Bu.Provider,{value:l},c):_.createElement(Bu.Provider,{value:l},_.createElement(a,s,c))},t}(_.Component);Ol.propTypes={};Ol.defaultProps=RI;const MI=[];function NI(e){S.useEffect(e,MI)}class Ll{constructor(){R(this,"currentId",null);R(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});R(this,"disposeEffect",()=>this.clear)}static create(){return new Ll}start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},t)}}function AI(){const e=jh(Ll.create).current;return NI(e.disposeEffect),e}function _I(e){const{className:t,classes:r,pulsate:n=!1,rippleX:o,rippleY:a,rippleSize:i,in:s,onExited:l,timeout:c}=e,[d,p]=S.useState(!1),h=at(t,r.ripple,r.rippleVisible,n&&r.ripplePulsate),f={width:i,height:i,top:-(i/2)+a,left:-(i/2)+o},g=at(r.child,d&&r.childLeaving,n&&r.childPulsate);return!s&&!d&&p(!0),S.useEffect(()=>{if(!s&&l!=null){const y=setTimeout(l,c);return()=>{clearTimeout(y)}}},[l,s,c]),u.jsx("span",{className:h,style:f,children:u.jsx("span",{className:g})})}const _t=cn("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Es=550,OI=80,LI=fe.keyframes`
|
|
229
|
+
export default theme;`}function ud(e={},...t){const{breakpoints:n,mixins:r={},spacing:o,palette:i={},transitions:a={},typography:s={},shape:l,...c}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(ko(20));const d=Hh(i),u=kE(e);let h=_n(u,{mixins:x9(u.breakpoints,r),palette:d,shadows:k9.slice(),typography:_E(d,s),transitions:w9(a),zIndex:{...N9}});return h=_n(h,c),h=t.reduce((p,g)=>_n(p,g),h),h.unstable_sxConfig={...as,...c?.unstable_sxConfig},h.unstable_sx=function(g){return _o({sx:g,theme:this})},h.toRuntimeSource=DE,h}function R9(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const L9=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=R9(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function IE(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function wE(e){return e==="dark"?L9:[]}function O9(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...o}=e,i=Hh(t);return{palette:i,opacity:{...IE(i.mode),...n},overlays:r||wE(i.mode),...o}}function M9(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const F9=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],B9=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if(o==="class"&&(i=".%s"),o==="data"&&(i="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return F9(e.cssVarPrefix).forEach(s=>{a[s]=n[s],delete n[s]}),i==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:a}}:i?{[i.replace("%s",t)]:a,[`${r}, ${i.replace("%s",t)}`]:n}:{[r]:{...n,...a}}}if(i&&i!=="media")return`${r}, ${i.replace("%s",String(t))}`}else if(t){if(i==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(i)return i.replace("%s",String(t))}return r};function j9(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function K(e,t,n){!e[t]&&n&&(e[t]=n)}function la(e){return typeof e!="string"||!e.startsWith("hsl")?e:xE(e)}function xr(e,t){`${t}Channel`in e||(e[`${t}Channel`]=sa(la(e[t])))}function H9(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const or=e=>{try{return e()}catch{}},U9=(e="mui")=>Ge.unstable_createGetCssVar(e);function gu(e,t,n,r){if(!t)return;t=t===!0?{}:t;const o=r==="dark"?"dark":"light";if(!n){e[r]=O9({...t,palette:{mode:o,...t?.palette}});return}const{palette:i,...a}=ud({...n,palette:{mode:o,...t?.palette}});return e[r]={...t,palette:i,opacity:{...IE(o),...t?.opacity},overlays:t?.overlays||wE(o)},a}function z9(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:a=M9,colorSchemeSelector:s=n.light&&n.dark?"media":void 0,rootSelector:l=":root",...c}=e,d=Object.keys(n)[0],u=r||(n.light&&d!=="light"?"light":d),h=U9(i),{[u]:p,light:g,dark:b,...T}=n,E={...T};let C=p;if((u==="dark"&&!("dark"in n)||u==="light"&&!("light"in n))&&(C=!0),!C)throw new Error(ko(21,u));const x=gu(E,C,c,u);g&&!E.light&&gu(E,g,void 0,"light"),b&&!E.dark&&gu(E,b,void 0,"dark");let k={defaultColorScheme:u,...x,cssVarPrefix:i,colorSchemeSelector:s,rootSelector:l,getCssVar:h,colorSchemes:E,font:{...P8(x.typography),...x.font},spacing:H9(c.spacing)};Object.keys(k.colorSchemes).forEach(U=>{const y=k.colorSchemes[U].palette,R=F=>{const M=F.split("-"),z=M[1],X=M[2];return h(F,y[z][X])};if(y.mode==="light"&&(K(y.common,"background","#fff"),K(y.common,"onBackground","#000")),y.mode==="dark"&&(K(y.common,"background","#000"),K(y.common,"onBackground","#fff")),j9(y,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),y.mode==="light"){K(y.Alert,"errorColor",rt(y.error.light,.6)),K(y.Alert,"infoColor",rt(y.info.light,.6)),K(y.Alert,"successColor",rt(y.success.light,.6)),K(y.Alert,"warningColor",rt(y.warning.light,.6)),K(y.Alert,"errorFilledBg",R("palette-error-main")),K(y.Alert,"infoFilledBg",R("palette-info-main")),K(y.Alert,"successFilledBg",R("palette-success-main")),K(y.Alert,"warningFilledBg",R("palette-warning-main")),K(y.Alert,"errorFilledColor",or(()=>y.getContrastText(y.error.main))),K(y.Alert,"infoFilledColor",or(()=>y.getContrastText(y.info.main))),K(y.Alert,"successFilledColor",or(()=>y.getContrastText(y.success.main))),K(y.Alert,"warningFilledColor",or(()=>y.getContrastText(y.warning.main))),K(y.Alert,"errorStandardBg",ot(y.error.light,.9)),K(y.Alert,"infoStandardBg",ot(y.info.light,.9)),K(y.Alert,"successStandardBg",ot(y.success.light,.9)),K(y.Alert,"warningStandardBg",ot(y.warning.light,.9)),K(y.Alert,"errorIconColor",R("palette-error-main")),K(y.Alert,"infoIconColor",R("palette-info-main")),K(y.Alert,"successIconColor",R("palette-success-main")),K(y.Alert,"warningIconColor",R("palette-warning-main")),K(y.AppBar,"defaultBg",R("palette-grey-100")),K(y.Avatar,"defaultBg",R("palette-grey-400")),K(y.Button,"inheritContainedBg",R("palette-grey-300")),K(y.Button,"inheritContainedHoverBg",R("palette-grey-A100")),K(y.Chip,"defaultBorder",R("palette-grey-400")),K(y.Chip,"defaultAvatarColor",R("palette-grey-700")),K(y.Chip,"defaultIconColor",R("palette-grey-700")),K(y.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),K(y.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),K(y.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),K(y.LinearProgress,"primaryBg",ot(y.primary.main,.62)),K(y.LinearProgress,"secondaryBg",ot(y.secondary.main,.62)),K(y.LinearProgress,"errorBg",ot(y.error.main,.62)),K(y.LinearProgress,"infoBg",ot(y.info.main,.62)),K(y.LinearProgress,"successBg",ot(y.success.main,.62)),K(y.LinearProgress,"warningBg",ot(y.warning.main,.62)),K(y.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.11)`),K(y.Slider,"primaryTrack",ot(y.primary.main,.62)),K(y.Slider,"secondaryTrack",ot(y.secondary.main,.62)),K(y.Slider,"errorTrack",ot(y.error.main,.62)),K(y.Slider,"infoTrack",ot(y.info.main,.62)),K(y.Slider,"successTrack",ot(y.success.main,.62)),K(y.Slider,"warningTrack",ot(y.warning.main,.62));const F=_s(y.background.default,.8);K(y.SnackbarContent,"bg",F),K(y.SnackbarContent,"color",or(()=>y.getContrastText(F))),K(y.SpeedDialAction,"fabHoverBg",_s(y.background.paper,.15)),K(y.StepConnector,"border",R("palette-grey-400")),K(y.StepContent,"border",R("palette-grey-400")),K(y.Switch,"defaultColor",R("palette-common-white")),K(y.Switch,"defaultDisabledColor",R("palette-grey-100")),K(y.Switch,"primaryDisabledColor",ot(y.primary.main,.62)),K(y.Switch,"secondaryDisabledColor",ot(y.secondary.main,.62)),K(y.Switch,"errorDisabledColor",ot(y.error.main,.62)),K(y.Switch,"infoDisabledColor",ot(y.info.main,.62)),K(y.Switch,"successDisabledColor",ot(y.success.main,.62)),K(y.Switch,"warningDisabledColor",ot(y.warning.main,.62)),K(y.TableCell,"border",ot(ks(y.divider,1),.88)),K(y.Tooltip,"bg",ks(y.grey[700],.92))}if(y.mode==="dark"){K(y.Alert,"errorColor",ot(y.error.light,.6)),K(y.Alert,"infoColor",ot(y.info.light,.6)),K(y.Alert,"successColor",ot(y.success.light,.6)),K(y.Alert,"warningColor",ot(y.warning.light,.6)),K(y.Alert,"errorFilledBg",R("palette-error-dark")),K(y.Alert,"infoFilledBg",R("palette-info-dark")),K(y.Alert,"successFilledBg",R("palette-success-dark")),K(y.Alert,"warningFilledBg",R("palette-warning-dark")),K(y.Alert,"errorFilledColor",or(()=>y.getContrastText(y.error.dark))),K(y.Alert,"infoFilledColor",or(()=>y.getContrastText(y.info.dark))),K(y.Alert,"successFilledColor",or(()=>y.getContrastText(y.success.dark))),K(y.Alert,"warningFilledColor",or(()=>y.getContrastText(y.warning.dark))),K(y.Alert,"errorStandardBg",rt(y.error.light,.9)),K(y.Alert,"infoStandardBg",rt(y.info.light,.9)),K(y.Alert,"successStandardBg",rt(y.success.light,.9)),K(y.Alert,"warningStandardBg",rt(y.warning.light,.9)),K(y.Alert,"errorIconColor",R("palette-error-main")),K(y.Alert,"infoIconColor",R("palette-info-main")),K(y.Alert,"successIconColor",R("palette-success-main")),K(y.Alert,"warningIconColor",R("palette-warning-main")),K(y.AppBar,"defaultBg",R("palette-grey-900")),K(y.AppBar,"darkBg",R("palette-background-paper")),K(y.AppBar,"darkColor",R("palette-text-primary")),K(y.Avatar,"defaultBg",R("palette-grey-600")),K(y.Button,"inheritContainedBg",R("palette-grey-800")),K(y.Button,"inheritContainedHoverBg",R("palette-grey-700")),K(y.Chip,"defaultBorder",R("palette-grey-700")),K(y.Chip,"defaultAvatarColor",R("palette-grey-300")),K(y.Chip,"defaultIconColor",R("palette-grey-300")),K(y.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),K(y.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),K(y.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),K(y.LinearProgress,"primaryBg",rt(y.primary.main,.5)),K(y.LinearProgress,"secondaryBg",rt(y.secondary.main,.5)),K(y.LinearProgress,"errorBg",rt(y.error.main,.5)),K(y.LinearProgress,"infoBg",rt(y.info.main,.5)),K(y.LinearProgress,"successBg",rt(y.success.main,.5)),K(y.LinearProgress,"warningBg",rt(y.warning.main,.5)),K(y.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.13)`),K(y.Slider,"primaryTrack",rt(y.primary.main,.5)),K(y.Slider,"secondaryTrack",rt(y.secondary.main,.5)),K(y.Slider,"errorTrack",rt(y.error.main,.5)),K(y.Slider,"infoTrack",rt(y.info.main,.5)),K(y.Slider,"successTrack",rt(y.success.main,.5)),K(y.Slider,"warningTrack",rt(y.warning.main,.5));const F=_s(y.background.default,.98);K(y.SnackbarContent,"bg",F),K(y.SnackbarContent,"color",or(()=>y.getContrastText(F))),K(y.SpeedDialAction,"fabHoverBg",_s(y.background.paper,.15)),K(y.StepConnector,"border",R("palette-grey-600")),K(y.StepContent,"border",R("palette-grey-600")),K(y.Switch,"defaultColor",R("palette-grey-300")),K(y.Switch,"defaultDisabledColor",R("palette-grey-600")),K(y.Switch,"primaryDisabledColor",rt(y.primary.main,.55)),K(y.Switch,"secondaryDisabledColor",rt(y.secondary.main,.55)),K(y.Switch,"errorDisabledColor",rt(y.error.main,.55)),K(y.Switch,"infoDisabledColor",rt(y.info.main,.55)),K(y.Switch,"successDisabledColor",rt(y.success.main,.55)),K(y.Switch,"warningDisabledColor",rt(y.warning.main,.55)),K(y.TableCell,"border",rt(ks(y.divider,1),.68)),K(y.Tooltip,"bg",ks(y.grey[700],.92))}xr(y.background,"default"),xr(y.background,"paper"),xr(y.common,"background"),xr(y.common,"onBackground"),xr(y,"divider"),Object.keys(y).forEach(F=>{const M=y[F];F!=="tonalOffset"&&M&&typeof M=="object"&&(M.main&&K(y[F],"mainChannel",sa(la(M.main))),M.light&&K(y[F],"lightChannel",sa(la(M.light))),M.dark&&K(y[F],"darkChannel",sa(la(M.dark))),M.contrastText&&K(y[F],"contrastTextChannel",sa(la(M.contrastText))),F==="text"&&(xr(y[F],"primary"),xr(y[F],"secondary")),F==="action"&&(M.active&&xr(y[F],"active"),M.selected&&xr(y[F],"selected")))})}),k=t.reduce((U,y)=>_n(U,y),k);const w={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:a,getSelector:B9(k)},{vars:S,generateThemeVars:B,generateStyleSheets:W}=N8(k,w);return k.vars=S,Object.entries(k.colorSchemes[k.defaultColorScheme]).forEach(([U,y])=>{k[U]=y}),k.generateThemeVars=B,k.generateStyleSheets=W,k.generateSpacing=function(){return Ge.createSpacing(c.spacing,$h(this))},k.getColorSchemeSelector=R8(s),k.spacing=k.generateSpacing(),k.shouldSkipGeneratingVar=a,k.unstable_sxConfig={...as,...c?.unstable_sxConfig},k.unstable_sx=function(y){return _o({sx:y,theme:this})},k.toRuntimeSource=DE,k}function Eg(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Hh({...n===!0?{}:n.palette,mode:t})})}function qh(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:i=n?.mode,...a}=e,s=i||"light",l=o?.[s],c={...o,...n?{[s]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return ud(e,...t);let d=n;"palette"in e||c[s]&&(c[s]!==!0?d=c[s].palette:s==="dark"&&(d={mode:"dark"}));const u=ud({...e,palette:d},...t);return u.defaultColorScheme=s,u.colorSchemes=c,u.palette.mode==="light"&&(u.colorSchemes.light={...c.light!==!0&&c.light,palette:u.palette},Eg(u,"dark",c.dark)),u.palette.mode==="dark"&&(u.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:u.palette},Eg(u,"light",c.light)),u}return!n&&!("light"in c)&&s==="light"&&(c.light=!0),z9({...a,colorSchemes:c,defaultColorScheme:s,...typeof r!="boolean"&&r},...t)}const $9=qh();function G9(e){const{variants:t,...n}=e,r={variants:t,style:pg(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=pg(o.style))}),r}const q9=kE();function yu(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function W9(e){return e?(t,n)=>n[e]:null}function V9(e,t,n){e.theme=Q9(e.theme)?n:e.theme[t]||e.theme}function qs(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(r=>qs(e,r));if(Array.isArray(n?.variants)){let r;if(n.isProcessed)r=n.style;else{const{variants:o,...i}=n;r=i}return NE(e,n.variants,[r])}return n?.isProcessed?n.style:n}function NE(e,t,n=[]){let r;e:for(let o=0;o<t.length;o+=1){const i=t[o];if(typeof i.props=="function"){if(r??(r={...e,...e.ownerState,ownerState:e.ownerState}),!i.props(r))continue}else for(const a in i.props)if(e[a]!==i.props[a]&&e.ownerState?.[a]!==i.props[a])continue e;typeof i.style=="function"?(r??(r={...e,...e.ownerState,ownerState:e.ownerState}),n.push(i.style(r))):n.push(i.style)}return n}function Y9(e={}){const{themeId:t,defaultTheme:n=q9,rootShouldForwardProp:r=yu,slotShouldForwardProp:o=yu}=e;function i(s){V9(s,t,n)}return(s,l={})=>{S8(s,w=>w.filter(S=>S!==_o));const{name:c,slot:d,skipVariantsResolver:u,skipSx:h,overridesResolver:p=W9(J9(d)),...g}=l,b=u!==void 0?u:d&&d!=="Root"&&d!=="root"||!1,T=h||!1;let E=yu;d==="Root"||d==="root"?E=r:d?E=o:X9(s)&&(E=void 0);const C=v8(s,{shouldForwardProp:E,label:K9(),...g}),x=w=>{if(w.__emotion_real===w)return w;if(typeof w=="function")return function(B){return qs(B,w)};if(cr(w)){const S=G9(w);return S.variants?function(W){return qs(W,S)}:S.style}return w},k=(...w)=>{const S=[],B=w.map(x),W=[];if(S.push(i),c&&p&&W.push(function(F){const z=F.theme.components?.[c]?.styleOverrides;if(!z)return null;const X={};for(const Z in z)X[Z]=qs(F,z[Z]);return p(F,X)}),c&&!b&&W.push(function(F){const z=F.theme?.components?.[c]?.variants;return z?NE(F,z):null}),T||W.push(_o),Array.isArray(B[0])){const R=B.shift(),F=new Array(S.length).fill(""),M=new Array(W.length).fill("");let z;z=[...F,...R,...M],z.raw=[...F,...R.raw,...M],S.unshift(z)}const U=[...S,...B,...W],y=C(...U);return s.muiName&&(y.muiName=s.muiName),y};return C.withConfig&&(k.withConfig=C.withConfig),k}}function K9(e,t){return void 0}function Q9(e){for(const t in e)return!1;return!0}function X9(e){return typeof e=="string"&&e.charCodeAt(0)>96}function J9(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Z9(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const eB=e=>Z9(e)&&e!=="classes",ln=Y9({themeId:To,defaultTheme:$9,rootShouldForwardProp:eB});function tB({theme:e,...t}){const n=To in e?e[To]:void 0;return f.jsx(Ge.ThemeProvider,{...t,themeId:n?To:void 0,theme:n||e})}const Ds={colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"},{CssVarsProvider:nB,useColorScheme:Dj,getInitColorSchemeScript:Ij}=Ge.unstable_createCssVarsProvider({themeId:To,theme:()=>qh({cssVariables:!0}),colorSchemeStorageKey:Ds.colorSchemeStorageKey,modeStorageKey:Ds.modeStorageKey,defaultColorScheme:{light:Ds.defaultLightColorScheme,dark:Ds.defaultDarkColorScheme},resolveTheme:e=>{const t={...e,typography:_E(e.palette,e.typography)};return t.unstable_sx=function(r){return _o({sx:r,theme:this})},t}}),rB=nB;function oB({theme:e,...t}){const n=_.useMemo(()=>{if(typeof e=="function")return e;const r=To in e?e[To]:e;return"colorSchemes"in r?null:"vars"in r?e:{...e,vars:null}},[e]);return n?f.jsx(tB,{theme:n,...t}):f.jsx(rB,{theme:e,...t})}function PE(){const e=Ai();return f.jsx(j7,{navigate:e})}function eo(e){return D8(e)}const RE=Ge.createContainer({createStyledComponent:ln("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${Ht(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>eo({props:e,name:"MuiContainer"})});function Fo(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=Mo(e,o,n)}),r}function LE(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=LE(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Qt(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=LE(e))&&(r&&(r+=" "),r+=t);return r}function Ri(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let a="",s=!0;for(let l=0;l<i.length;l+=1){const c=i[l];c&&(a+=(s===!0?"":" ")+t(c),s=!1,n&&n[c]&&(a+=" "+n[c]))}r[o]=a}return r}function dd(...e){const t=_.useRef(void 0),n=_.useCallback(r=>{const o=e.map(i=>{if(i==null)return null;if(typeof i=="function"){const a=i,s=a(r);return typeof s=="function"?s:()=>{a(null)}}return i.current=r,()=>{i.current=null}});return()=>{o.forEach(i=>i?.())}},e);return _.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function iB(e){return typeof e=="string"}function aB(e,t,n){return e===void 0||iB(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function sB(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function Tg(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function lB(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const p=Qt(n?.className,i,o?.className,r?.className),g={...n?.style,...o?.style,...r?.style},b={...n,...o,...r};return p.length>0&&(b.className=p),Object.keys(g).length>0&&(b.style=g),{props:b,internalRef:void 0}}const a=sB({...o,...r}),s=Tg(r),l=Tg(o),c=t(a),d=Qt(c?.className,n?.className,i,o?.className,r?.className),u={...c?.style,...n?.style,...o?.style,...r?.style},h={...c,...n,...l,...s};return d.length>0&&(h.className=d),Object.keys(u).length>0&&(h.style=u),{props:h,internalRef:c.ref}}function cB(e,t,n){return typeof e=="function"?e(t,n):e}function uB(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:cB(n,r),{props:s,internalRef:l}=lB({...i,externalSlotProps:a}),c=dd(l,a?.ref,e.additionalProps?.ref);return aB(t,{...s,ref:c},r)}function dB(){return f9}const Do=Ge.unstable_memoTheme;function hB(e){return typeof e.main=="string"}function pB(e,t=[]){if(!hB(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function _l(e=[]){return([,t])=>t&&pB(t,e)}function fB(e){return Mo("MuiTypography",e)}Fo("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const mB={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},gB=dB(),yB=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e,s={root:["root",i,e.align!=="inherit"&&`align${Ht(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return Ri(s,fB,a)},bB=ln("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${Ht(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(Do(({theme:e})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([t,n])=>t!=="inherit"&&n&&typeof n=="object").map(([t,n])=>({props:{variant:t},style:n})),...Object.entries(e.palette).filter(_l()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,t])=>typeof t=="string").map(([t])=>({props:{color:`text${Ht(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:t})=>t.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:t})=>t.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:t})=>t.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:t})=>t.paragraph,style:{marginBottom:16}}]}))),xg={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},EB=_.forwardRef(function(t,n){const{color:r,...o}=eo({props:t,name:"MuiTypography"}),i=!mB[r],a=gB({...o,...i&&{color:r}}),{align:s="inherit",className:l,component:c,gutterBottom:d=!1,noWrap:u=!1,paragraph:h=!1,variant:p="body1",variantMapping:g=xg,...b}=a,T={...a,align:s,color:r,className:l,component:c,gutterBottom:d,noWrap:u,paragraph:h,variant:p,variantMapping:g},E=c||(h?"p":g[p]||xg[p])||"span",C=yB(T);return f.jsx(bB,{as:E,ref:n,className:Qt(C.root,l),...b,ownerState:T,style:{...s!=="inherit"&&{"--Typography-textAlign":s},...b.style}})});function TB(e){return Mo("MuiSvgIcon",e)}Fo("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const xB=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${Ht(t)}`,`fontSize${Ht(n)}`]};return Ri(o,TB,r)},CB=ln("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Ht(n.color)}`],t[`fontSize${Ht(n.fontSize)}`]]}})(Do(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),hd=_.forwardRef(function(t,n){const r=eo({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:d=!1,titleAccess:u,viewBox:h="0 0 24 24",...p}=r,g=_.isValidElement(o)&&o.type==="svg",b={...r,color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:g},T={};d||(T.viewBox=h);const E=xB(b);return f.jsxs(CB,{as:s,className:Qt(E.root,i),focusable:"false",color:c,"aria-hidden":u?void 0:!0,role:u?"img":void 0,ref:n,...T,...p,...g&&o.props,ownerState:b,children:[g?o.props.children:o,u?f.jsx("title",{children:u}):null]})});hd.muiName="SvgIcon";function Wh(e,t){function n(r,o){return f.jsx(hd,{"data-testid":void 0,ref:o,...r,children:e})}return n.muiName=hd.muiName,_.memo(_.forwardRef(n))}const vB=Wh(f.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}));function Cg(e){try{return e.matches(":focus-visible")}catch{}return!1}function Ws(e){const t=_.useRef(e);return A8(()=>{t.current=e}),_.useRef((...n)=>(0,t.current)(...n)).current}const vg={};function OE(e,t){const n=_.useRef(vg);return n.current===vg&&(n.current=e(t)),n}class Dl{constructor(){G(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new Dl}static use(){const t=OE(Dl.create).current,[n,r]=_.useState(!1);return t.shouldMount=n,t.setShouldMount=r,_.useEffect(t.mountEffect,[n]),t}mount(){return this.mounted||(this.mounted=AB(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>this.ref.current?.start(...t))}stop(...t){this.mount().then(()=>this.ref.current?.stop(...t))}pulsate(...t){this.mount().then(()=>this.ref.current?.pulsate(...t))}}function SB(){return Dl.use()}function AB(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function pd(){return pd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pd.apply(null,arguments)}function kB(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function fd(e,t){return fd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},fd(e,t)}function _B(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,fd(e,t)}const Sg=O.createContext(null);function DB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vh(e,t){var n=function(i){return t&&O.isValidElement(i)?t(i):i},r=Object.create(null);return e&&O.Children.map(e,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function IB(e,t){e=e||{},t=t||{};function n(d){return d in t?t[d]:e[d]}var r=Object.create(null),o=[];for(var i in e)i in t?o.length&&(r[i]=o,o=[]):o.push(i);var a,s={};for(var l in t){if(r[l])for(a=0;a<r[l].length;a++){var c=r[l][a];s[r[l][a]]=n(c)}s[l]=n(l)}for(a=0;a<o.length;a++)s[o[a]]=n(o[a]);return s}function go(e,t,n){return n[t]!=null?n[t]:e.props[t]}function wB(e,t){return Vh(e.children,function(n){return O.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:go(n,"appear",e),enter:go(n,"enter",e),exit:go(n,"exit",e)})})}function NB(e,t,n){var r=Vh(e.children),o=IB(t,r);return Object.keys(o).forEach(function(i){var a=o[i];if(O.isValidElement(a)){var s=i in t,l=i in r,c=t[i],d=O.isValidElement(c)&&!c.props.in;l&&(!s||d)?o[i]=O.cloneElement(a,{onExited:n.bind(null,a),in:!0,exit:go(a,"exit",e),enter:go(a,"enter",e)}):!l&&s&&!d?o[i]=O.cloneElement(a,{in:!1}):l&&s&&O.isValidElement(c)&&(o[i]=O.cloneElement(a,{onExited:n.bind(null,a),in:c.props.in,exit:go(a,"exit",e),enter:go(a,"enter",e)}))}}),o}var PB=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},RB={component:"div",childFactory:function(t){return t}},Yh=function(e){_B(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=i.handleExited.bind(DB(i));return i.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},i}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(o,i){var a=i.children,s=i.handleExited,l=i.firstRender;return{children:l?wB(o,s):NB(o,a,s),firstRender:!1}},n.handleExited=function(o,i){var a=Vh(this.props.children);o.key in a||(o.props.onExited&&o.props.onExited(i),this.mounted&&this.setState(function(s){var l=pd({},s.children);return delete l[o.key],{children:l}}))},n.render=function(){var o=this.props,i=o.component,a=o.childFactory,s=kB(o,["component","childFactory"]),l=this.state.contextValue,c=PB(this.state.children).map(a);return delete s.appear,delete s.enter,delete s.exit,i===null?O.createElement(Sg.Provider,{value:l},c):O.createElement(Sg.Provider,{value:l},O.createElement(i,s,c))},t}(O.Component);Yh.propTypes={};Yh.defaultProps=RB;const LB=[];function OB(e){_.useEffect(e,LB)}class Kh{constructor(){G(this,"currentId",null);G(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});G(this,"disposeEffect",()=>this.clear)}static create(){return new Kh}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function MB(){const e=OE(Kh.create).current;return OB(e.disposeEffect),e}function FB(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:a,in:s,onExited:l,timeout:c}=e,[d,u]=_.useState(!1),h=Qt(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:a,height:a,top:-(a/2)+i,left:-(a/2)+o},g=Qt(n.child,d&&n.childLeaving,r&&n.childPulsate);return!s&&!d&&u(!0),_.useEffect(()=>{if(!s&&l!=null){const b=setTimeout(l,c);return()=>{clearTimeout(b)}}},[l,s,c]),f.jsx("span",{className:h,style:p,children:f.jsx("span",{className:g})})}const Fn=Fo("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),md=550,BB=80,jB=Ge.keyframes`
|
|
167
230
|
0% {
|
|
168
231
|
transform: scale(0);
|
|
169
232
|
opacity: 0.1;
|
|
@@ -173,7 +236,7 @@ export default theme;`}function Cs(e={},...t){const{breakpoints:r,mixins:n={},sp
|
|
|
173
236
|
transform: scale(1);
|
|
174
237
|
opacity: 0.3;
|
|
175
238
|
}
|
|
176
|
-
|
|
239
|
+
`,HB=Ge.keyframes`
|
|
177
240
|
0% {
|
|
178
241
|
opacity: 1;
|
|
179
242
|
}
|
|
@@ -181,7 +244,7 @@ export default theme;`}function Cs(e={},...t){const{breakpoints:r,mixins:n={},sp
|
|
|
181
244
|
100% {
|
|
182
245
|
opacity: 0;
|
|
183
246
|
}
|
|
184
|
-
`,
|
|
247
|
+
`,UB=Ge.keyframes`
|
|
185
248
|
0% {
|
|
186
249
|
transform: scale(1);
|
|
187
250
|
}
|
|
@@ -193,23 +256,23 @@ export default theme;`}function Cs(e={},...t){const{breakpoints:r,mixins:n={},sp
|
|
|
193
256
|
100% {
|
|
194
257
|
transform: scale(1);
|
|
195
258
|
}
|
|
196
|
-
`,
|
|
259
|
+
`,zB=ln("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),$B=ln(FB,{name:"MuiTouchRipple",slot:"Ripple"})`
|
|
197
260
|
opacity: 0;
|
|
198
261
|
position: absolute;
|
|
199
262
|
|
|
200
|
-
&.${
|
|
263
|
+
&.${Fn.rippleVisible} {
|
|
201
264
|
opacity: 0.3;
|
|
202
265
|
transform: scale(1);
|
|
203
|
-
animation-name: ${
|
|
204
|
-
animation-duration: ${
|
|
266
|
+
animation-name: ${jB};
|
|
267
|
+
animation-duration: ${md}ms;
|
|
205
268
|
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
206
269
|
}
|
|
207
270
|
|
|
208
|
-
&.${
|
|
271
|
+
&.${Fn.ripplePulsate} {
|
|
209
272
|
animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms;
|
|
210
273
|
}
|
|
211
274
|
|
|
212
|
-
& .${
|
|
275
|
+
& .${Fn.child} {
|
|
213
276
|
opacity: 1;
|
|
214
277
|
display: block;
|
|
215
278
|
width: 100%;
|
|
@@ -218,25 +281,25 @@ export default theme;`}function Cs(e={},...t){const{breakpoints:r,mixins:n={},sp
|
|
|
218
281
|
background-color: currentColor;
|
|
219
282
|
}
|
|
220
283
|
|
|
221
|
-
& .${
|
|
284
|
+
& .${Fn.childLeaving} {
|
|
222
285
|
opacity: 0;
|
|
223
|
-
animation-name: ${
|
|
224
|
-
animation-duration: ${
|
|
286
|
+
animation-name: ${HB};
|
|
287
|
+
animation-duration: ${md}ms;
|
|
225
288
|
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
226
289
|
}
|
|
227
290
|
|
|
228
|
-
& .${
|
|
291
|
+
& .${Fn.childPulsate} {
|
|
229
292
|
position: absolute;
|
|
230
293
|
/* @noflip */
|
|
231
294
|
left: 0px;
|
|
232
295
|
top: 0;
|
|
233
|
-
animation-name: ${
|
|
296
|
+
animation-name: ${UB};
|
|
234
297
|
animation-duration: 2500ms;
|
|
235
298
|
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
236
299
|
animation-iteration-count: infinite;
|
|
237
300
|
animation-delay: 200ms;
|
|
238
301
|
}
|
|
239
|
-
`,FI=S.forwardRef(function(t,r){const n=Or({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:a={},className:i,...s}=n,[l,c]=S.useState([]),d=S.useRef(0),p=S.useRef(null);S.useEffect(()=>{p.current&&(p.current(),p.current=null)},[l]);const h=S.useRef(!1),f=AI(),g=S.useRef(null),y=S.useRef(null),v=S.useCallback(k=>{const{pulsate:j,rippleX:P,rippleY:B,rippleSize:F,cb:L}=k;c(m=>[...m,u.jsx(qI,{classes:{ripple:at(a.ripple,_t.ripple),rippleVisible:at(a.rippleVisible,_t.rippleVisible),ripplePulsate:at(a.ripplePulsate,_t.ripplePulsate),child:at(a.child,_t.child),childLeaving:at(a.childLeaving,_t.childLeaving),childPulsate:at(a.childPulsate,_t.childPulsate)},timeout:Es,pulsate:j,rippleX:P,rippleY:B,rippleSize:F},d.current)]),d.current+=1,p.current=L},[a]),b=S.useCallback((k={},j={},P=()=>{})=>{const{pulsate:B=!1,center:F=o||j.pulsate,fakeElement:L=!1}=j;if(k?.type==="mousedown"&&h.current){h.current=!1;return}k?.type==="touchstart"&&(h.current=!0);const m=L?null:y.current,T=m?m.getBoundingClientRect():{width:0,height:0,left:0,top:0};let D,$,H;if(F||k===void 0||k.clientX===0&&k.clientY===0||!k.clientX&&!k.touches)D=Math.round(T.width/2),$=Math.round(T.height/2);else{const{clientX:J,clientY:V}=k.touches&&k.touches.length>0?k.touches[0]:k;D=Math.round(J-T.left),$=Math.round(V-T.top)}if(F)H=Math.sqrt((2*T.width**2+T.height**2)/3),H%2===0&&(H+=1);else{const J=Math.max(Math.abs((m?m.clientWidth:0)-D),D)*2+2,V=Math.max(Math.abs((m?m.clientHeight:0)-$),$)*2+2;H=Math.sqrt(J**2+V**2)}k?.touches?g.current===null&&(g.current=()=>{v({pulsate:B,rippleX:D,rippleY:$,rippleSize:H,cb:P})},f.start(OI,()=>{g.current&&(g.current(),g.current=null)})):v({pulsate:B,rippleX:D,rippleY:$,rippleSize:H,cb:P})},[o,v,f]),C=S.useCallback(()=>{b({},{pulsate:!0})},[b]),w=S.useCallback((k,j)=>{if(f.clear(),k?.type==="touchend"&&g.current){g.current(),g.current=null,f.start(0,()=>{w(k,j)});return}g.current=null,c(P=>P.length>0?P.slice(1):P),p.current=j},[f]);return S.useImperativeHandle(r,()=>({pulsate:C,start:b,stop:w}),[C,b,w]),u.jsx(BI,{className:at(_t.root,a.root,i),ref:y,...s,children:u.jsx(Ol,{component:null,exit:!0,children:l})})});function zI(e){return ln("MuiButtonBase",e)}const WI=cn("MuiButtonBase",["root","disabled","focusVisible"]),UI=e=>{const{disabled:t,focusVisible:r,focusVisibleClassName:n,classes:o}=e,i=zn({root:["root",t&&"disabled",r&&"focusVisible"]},zI,o);return r&&n&&(i.root+=` ${n}`),i},HI=ut("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${WI.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Eh=S.forwardRef(function(t,r){const n=Or({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:a=!1,children:i,className:s,component:l="button",disabled:c=!1,disableRipple:d=!1,disableTouchRipple:p=!1,focusRipple:h=!1,focusVisibleClassName:f,LinkComponent:g="a",onBlur:y,onClick:v,onContextMenu:b,onDragLeave:C,onFocus:w,onFocusVisible:k,onKeyDown:j,onKeyUp:P,onMouseDown:B,onMouseLeave:F,onMouseUp:L,onTouchEnd:m,onTouchMove:T,onTouchStart:D,tabIndex:$=0,TouchRippleProps:H,touchRippleRef:J,type:V,...ce}=n,K=S.useRef(null),se=SI(),Z=ks(se.ref,J),[X,U]=S.useState(!1);c&&X&&U(!1),S.useImperativeHandle(o,()=>({focusVisible:()=>{U(!0),K.current.focus()}}),[]);const O=se.shouldMount&&!d&&!c;S.useEffect(()=>{X&&h&&!d&&se.pulsate()},[d,h,X,se]);const q=cr(se,"start",B,p),oe=cr(se,"stop",b,p),Pe=cr(se,"stop",C,p),it=cr(se,"stop",L,p),ht=cr(se,"stop",ne=>{X&&ne.preventDefault(),F&&F(ne)},p),Ae=cr(se,"start",D,p),_e=cr(se,"stop",m,p),jt=cr(se,"stop",T,p),xr=cr(se,"stop",ne=>{$u(ne.target)||U(!1),y&&y(ne)},!1),Ut=Sa(ne=>{K.current||(K.current=ne.currentTarget),$u(ne.target)&&(U(!0),k&&k(ne)),w&&w(ne)}),dt=()=>{const ne=K.current;return l&&l!=="button"&&!(ne.tagName==="A"&&ne.href)},Lr=Sa(ne=>{h&&!ne.repeat&&X&&ne.key===" "&&se.stop(ne,()=>{se.start(ne)}),ne.target===ne.currentTarget&&dt()&&ne.key===" "&&ne.preventDefault(),j&&j(ne),ne.target===ne.currentTarget&&dt()&&ne.key==="Enter"&&!c&&(ne.preventDefault(),v&&v(ne))}),Qt=Sa(ne=>{h&&ne.key===" "&&X&&!ne.defaultPrevented&&se.stop(ne,()=>{se.pulsate(ne)}),P&&P(ne),v&&ne.target===ne.currentTarget&&dt()&&ne.key===" "&&!ne.defaultPrevented&&v(ne)});let ot=l;ot==="button"&&(ce.href||ce.to)&&(ot=g);const Ht={};ot==="button"?(Ht.type=V===void 0?"button":V,Ht.disabled=c):(!ce.href&&!ce.to&&(Ht.role="button"),c&&(Ht["aria-disabled"]=c));const vr=ks(r,K),Sr={...n,centerRipple:a,component:l,disabled:c,disableRipple:d,disableTouchRipple:p,focusRipple:h,tabIndex:$,focusVisible:X},ae=UI(Sr);return u.jsxs(HI,{as:ot,className:at(ae.root,s),ownerState:Sr,onBlur:xr,onClick:v,onContextMenu:oe,onFocus:Ut,onKeyDown:Lr,onKeyUp:Qt,onMouseDown:q,onMouseLeave:ht,onMouseUp:it,onDragLeave:Pe,onTouchEnd:_e,onTouchMove:jt,onTouchStart:Ae,ref:vr,tabIndex:c?-1:$,type:V,...Ht,...ce,children:[i,O?u.jsx(FI,{ref:Z,center:a,...H}):null]})});function cr(e,t,r,n=!1){return Sa(o=>(r&&r(o),n||e[t](o),!0))}const VI=ut(Eh)(tn(({theme:e})=>({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`,...e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},borderRadius:2,"&:hover, &:focus":{...e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}},"&:active":{boxShadow:e.shadows[0],...e.palette.mode==="light"?{backgroundColor:Ss(e.palette.grey[200],.12)}:{backgroundColor:Ss(e.palette.grey[600],.12)}}}))),GI=ut(vI)({width:24,height:16});function KI(e){const{slots:t={},slotProps:r={},...n}=e,o=e;return u.jsx("li",{children:u.jsx(VI,{focusRipple:!0,...n,ownerState:o,children:u.jsx(GI,{as:t.CollapsedIcon,ownerState:o,...r.collapsedIcon})})})}function QI(e){return ln("MuiBreadcrumbs",e)}const YI=cn("MuiBreadcrumbs",["root","ol","li","separator"]),XI=e=>{const{classes:t}=e;return zn({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},QI,t)},JI=ut(gI,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${YI.li}`]:t.li},t.root]})({}),ZI=ut("ol",{name:"MuiBreadcrumbs",slot:"Ol"})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),e2=ut("li",{name:"MuiBreadcrumbs",slot:"Separator"})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function t2(e,t,r,n){return e.reduce((o,a,i)=>(i<e.length-1?o=o.concat(a,u.jsx(e2,{"aria-hidden":!0,className:t,ownerState:n,children:r},`separator-${i}`)):o.push(a),o),[])}const r2=S.forwardRef(function(t,r){const n=Or({props:t,name:"MuiBreadcrumbs"}),{children:o,className:a,component:i="nav",slots:s={},slotProps:l={},expandText:c="Show path",itemsAfterCollapse:d=1,itemsBeforeCollapse:p=1,maxItems:h=8,separator:f="/",...g}=n,[y,v]=S.useState(!1),b={...n,component:i,expanded:y,expandText:c,itemsAfterCollapse:d,itemsBeforeCollapse:p,maxItems:h,separator:f},C=XI(b),w=sI({elementType:s.CollapsedIcon,externalSlotProps:l.collapsedIcon,ownerState:b}),k=S.useRef(null),j=B=>{const F=()=>{v(!0);const L=k.current.querySelector("a[href],button,[tabindex]");L&&L.focus()};return p+d>=B.length?B:[...B.slice(0,p),u.jsx(KI,{"aria-label":c,slots:{CollapsedIcon:s.CollapsedIcon},slotProps:{collapsedIcon:w},onClick:F},"ellipsis"),...B.slice(B.length-d,B.length)]},P=S.Children.toArray(o).filter(B=>S.isValidElement(B)).map((B,F)=>u.jsx("li",{className:C.li,children:B},`child-${F}`));return u.jsx(JI,{ref:r,component:i,color:"textSecondary",className:at(C.root,a),ownerState:b,...g,children:u.jsx(ZI,{className:C.ol,ref:k,ownerState:b,children:t2(y||h&&P.length<=h?P:j(P),C.separator,f,b)})})});function Th(){const e=on(),t=e["*"],r=Fn();return u.jsx(x.Box,{sx:{display:"flex",alignItems:"center"},children:u.jsxs(r2,{"aria-label":"breadcrumb",separator:u.jsx(yo.ChevronRight,{sx:{fontSize:14,color:"text.secondary"}}),sx:{"& .MuiBreadcrumbs-separator":{margin:"0 6px"}},children:[e.projectName&&u.jsx(x.Chip,{onClick:n=>r(`/${e.projectName}/`,n),label:e.projectName,size:"medium",sx:{backgroundColor:"white",color:"primary.main",fontWeight:500,height:"32px",fontSize:"0.875rem",cursor:"pointer","&:hover":{backgroundColor:"primary.100"}}}),e.packageName&&u.jsx(x.Chip,{onClick:n=>r(`/${e.projectName}/${e.packageName}/`,n),label:e.packageName,size:"medium",sx:{backgroundColor:"white",color:"primary.main",fontWeight:500,height:"32px",fontSize:"0.875rem",cursor:"pointer","&:hover":{backgroundColor:"secondary.100"}}}),t&&u.jsx(x.Chip,{onClick:n=>r(`/${e.projectName}/${e.packageName}/${t}`,n),label:t,size:"medium",sx:{backgroundColor:"white",color:"primary.main",fontWeight:500,height:"32px",fontSize:"0.875rem",cursor:"pointer","&:hover":{backgroundColor:"grey.200"}}})]})})}function n2({logoHeader:e,endCap:t}){const r=qs(),{projectName:n,packageName:o}=on();return u.jsx(x.AppBar,{position:"sticky",elevation:0,sx:{backgroundColor:"background.paper",borderBottom:"1px solid",borderColor:"divider"},children:u.jsxs(x.Toolbar,{sx:{justifyContent:"space-between"},children:[u.jsxs(x.Stack,{direction:"row",spacing:2,alignItems:"center",children:[e||u.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[u.jsx(x.Box,{component:"img",src:"/logo.svg",alt:"Malloy",sx:{width:28,height:28}}),u.jsx(x.Typography,{variant:"h5",sx:{color:"text.primary",fontWeight:700,letterSpacing:"-0.025em",cursor:"pointer"},onClick:()=>{r("/")},children:"Malloy Publisher"})]}),u.jsx(Th,{})]}),u.jsxs(x.Stack,{direction:"row",spacing:2,alignItems:"center",children:[!n||!o?!e&&u.jsxs(u.Fragment,{children:[u.jsx(x.Button,{href:"https://docs.malloydata.dev/documentation/",children:"Malloy Docs"}),u.jsx(x.Button,{href:"https://github.com/malloydata/publisher/blob/main/README.md",children:"Publisher Docs"}),u.jsx(x.Button,{href:"/api-doc.html",children:"Publisher API"})]}):u.jsx(u.Fragment,{children:u.jsx($C,{})}),t]})]})})}function Rh({headerProps:e}){return u.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh"},children:[u.jsx(n2,{...e}),u.jsx(Ph,{maxWidth:"xl",component:"main",sx:{flex:1,display:"flex",flexDirection:"column",py:2,gap:2},children:u.jsx(x.Box,{sx:{flex:1},children:u.jsx(vf,{})})})]})}function Mh(){const e=on(),t=e["*"];return e.projectName?e.packageName?t?.endsWith(".malloy")?u.jsx(qa,{projectName:e.projectName,packageName:e.packageName,children:u.jsx(x1,{modelPath:t,hideEmbeddingIcons:!0})}):t?.endsWith(".malloynb")?u.jsx(qa,{projectName:e.projectName,packageName:e.packageName,children:u.jsx(Tp,{notebookPath:t,hideEmbeddingIcons:!0,expandResults:!1})}):u.jsx("div",{children:u.jsxs("h2",{children:["Unrecognized file type: ",t]})}):u.jsx("div",{children:u.jsx("h2",{children:"Missing package name"})}):u.jsx("div",{children:u.jsx("h2",{children:"Missing project name"})})}function Nh(){const{projectName:e,packageName:t}=on(),r=Fn();return e?t?u.jsx(qa,{projectName:e,packageName:t,children:u.jsx(uC,{navigate:r})}):u.jsx("div",{children:u.jsx("h2",{children:"Missing package name"})}):u.jsx("div",{children:u.jsx("h2",{children:"Missing project name"})})}function Ah(){const e=Fn(),{projectName:t}=on();return t?u.jsx(jC,{projectName:t,children:u.jsx(EC,{navigate:e})}):u.jsx("div",{children:u.jsx("h2",{children:"Missing project name"})})}function _h(){const e=cd();return console.error(e),u.jsx(Ph,{maxWidth:"lg",component:"main",sx:{display:"flex",flexDirection:"column",my:2,gap:0},children:u.jsxs(x.Stack,{sx:{m:"auto",flexDirection:"column"},children:[u.jsx(x.Box,{sx:{height:"300px"}}),u.jsx("img",{src:"/error.png"}),u.jsx(x.Typography,{variant:"subtitle1",children:"An unexpected error occurred"})]})})}function Oh(){const{projectName:e,packageName:t,notebookPath:r}=on();return e?t?u.jsx(qa,{projectName:e,packageName:t,children:u.jsx(sh,{notebookStorage:new Rp,userContext:{project:e,package:t},children:u.jsx(vC,{notebookPath:r,hideEmbeddingIcons:!0},`${r}-${e}-${t}`)})}):u.jsx("div",{children:u.jsx("h2",{children:"Missing package name"})}):u.jsx("div",{children:u.jsx("h2",{children:"Missing project name"})})}const Ne={primary:{main:"#14b3cb",light:"#22d3ee",dark:"#0e7490",50:"#ecfeff",100:"#cffafe",500:"#14b3cb",600:"#0891b2",700:"#0e7490"},secondary:{main:"#fbbb04",light:"#fde047",dark:"#eab308",50:"#fefce8",100:"#fef3c7",500:"#fbbb04",600:"#eab308",700:"#ca8a04"},grey:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},success:{main:"#059669",light:"#10b981",dark:"#047857"},warning:{main:"#d97706",light:"#f59e0b",dark:"#b45309"},error:{main:"#dc2626",light:"#ef4444",dark:"#b91c1c"},info:{main:"#0891b2",light:"#06b6d4",dark:"#0e7490"}},Lh=Nl({palette:{mode:"light",primary:Ne.primary,secondary:Ne.secondary,grey:Ne.grey,success:Ne.success,warning:Ne.warning,error:Ne.error,info:Ne.info,background:{default:"#ffffff",paper:"#ffffff"},text:{primary:Ne.grey[900],secondary:Ne.grey[600]},divider:Ne.grey[200]},typography:{fontFamily:'"Inter", "Roboto", "Helvetica", "Arial", sans-serif',h1:{fontWeight:700,letterSpacing:"-0.025em"},h2:{fontWeight:700,letterSpacing:"-0.025em"},h3:{fontWeight:600,letterSpacing:"-0.025em"},h4:{fontWeight:600,letterSpacing:"-0.025em"},h5:{fontWeight:600,letterSpacing:"-0.025em"},h6:{fontWeight:600,letterSpacing:"-0.025em"},subtitle1:{fontWeight:500,letterSpacing:"-0.025em"},subtitle2:{fontWeight:500,letterSpacing:"-0.025em"},body1:{letterSpacing:"-0.025em"},body2:{letterSpacing:"-0.025em"},button:{fontWeight:500,letterSpacing:"-0.025em",textTransform:"none"}},shape:{borderRadius:4},components:{MuiCssBaseline:{styleOverrides:{body:{scrollbarWidth:"thin",scrollbarColor:`${Ne.grey[300]} ${Ne.grey[100]}`,"&::-webkit-scrollbar":{width:"8px",height:"8px"},"&::-webkit-scrollbar-track":{background:Ne.grey[100],borderRadius:"4px"},"&::-webkit-scrollbar-thumb":{background:Ne.grey[300],borderRadius:"4px","&:hover":{background:Ne.grey[400]}},"&::-webkit-scrollbar-corner":{background:Ne.grey[100]}},"*":{scrollbarWidth:"thin",scrollbarColor:`${Ne.grey[300]} ${Ne.grey[100]}`,"&::-webkit-scrollbar":{width:"8px",height:"8px"},"&::-webkit-scrollbar-track":{background:Ne.grey[100],borderRadius:"4px"},"&::-webkit-scrollbar-thumb":{background:Ne.grey[300],borderRadius:"4px","&:hover":{background:Ne.grey[400]}},"&::-webkit-scrollbar-corner":{background:Ne.grey[100]}}}},MuiButton:{styleOverrides:{root:{borderRadius:4,textTransform:"none",fontWeight:500,boxShadow:"none","&:hover":{boxShadow:"0 1px 3px rgba(0, 0, 0, 0.1)"}},contained:{"&:hover":{boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)"}}}},MuiCard:{styleOverrides:{root:{borderRadius:4,boxShadow:"0 1px 3px rgba(0, 0, 0, 0.1)",border:"1px solid",borderColor:"rgba(0, 0, 0, 0.05)"}}},MuiChip:{styleOverrides:{root:{borderRadius:4,fontWeight:500}}},MuiTextField:{styleOverrides:{root:{"& .MuiOutlinedInput-root":{borderRadius:4}}}},MuiDialog:{styleOverrides:{paper:{borderRadius:4,boxShadow:"0px 20px 25px -5px rgba(0, 0, 0, 0.1), 0px 10px 10px -5px rgba(0, 0, 0, 0.04)"}}},MuiMenu:{styleOverrides:{paper:{borderRadius:4,boxShadow:"0px 10px 15px -3px rgba(0, 0, 0, 0.1), 0px 4px 6px -2px rgba(0, 0, 0, 0.05)",border:"1px solid rgba(0, 0, 0, 0.05)"}}},MuiBreadcrumbs:{styleOverrides:{root:{"& .MuiBreadcrumbs-separator":{margin:"0 6px",color:Ne.grey[400]}}}},MuiDivider:{styleOverrides:{root:{margin:"4px 0",borderColor:Ne.grey[200]}},defaultProps:{sx:{my:1}}}}}),$h=(e="/",t,r,n)=>Hf([{path:e,element:u.jsx(dC,{server:r,getAccessToken:n,children:u.jsxs(tI,{theme:Lh,children:[u.jsx(x.CssBaseline,{}),u.jsx(Rh,{headerProps:t})]})}),errorElement:u.jsx(_h,{}),children:[{path:"",element:u.jsx(kh,{})},{path:":projectName",element:u.jsx(Ah,{})},{path:":projectName/:packageName",element:u.jsx(Nh,{})},{path:":projectName/:packageName/*",element:u.jsx(Mh,{})},{path:":projectName/:packageName/scratchNotebook/:notebookPath",element:u.jsx(Oh,{})}]}]),o2=({server:e,getAccessToken:t,basePath:r="/",headerProps:n})=>{const o=$h(r,n,e,t);return u.jsx(ng,{router:o})};let qu=0;function a2(e){const[t,r]=S.useState(e),n=e||t;return S.useEffect(()=>{t==null&&(qu+=1,r(`mui-${qu}`))},[t]),n}const i2={...S},Fu=i2.useId;function s2(e){if(Fu!==void 0){const t=Fu();return e??t}return a2(e)}function l2(e){return ln("MuiCircularProgress",e)}cn("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const kr=44,Ts=fe.keyframes`
|
|
302
|
+
`,GB=_.forwardRef(function(t,n){const r=eo({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:a,...s}=r,[l,c]=_.useState([]),d=_.useRef(0),u=_.useRef(null);_.useEffect(()=>{u.current&&(u.current(),u.current=null)},[l]);const h=_.useRef(!1),p=MB(),g=_.useRef(null),b=_.useRef(null),T=_.useCallback(k=>{const{pulsate:w,rippleX:S,rippleY:B,rippleSize:W,cb:U}=k;c(y=>[...y,f.jsx($B,{classes:{ripple:Qt(i.ripple,Fn.ripple),rippleVisible:Qt(i.rippleVisible,Fn.rippleVisible),ripplePulsate:Qt(i.ripplePulsate,Fn.ripplePulsate),child:Qt(i.child,Fn.child),childLeaving:Qt(i.childLeaving,Fn.childLeaving),childPulsate:Qt(i.childPulsate,Fn.childPulsate)},timeout:md,pulsate:w,rippleX:S,rippleY:B,rippleSize:W},d.current)]),d.current+=1,u.current=U},[i]),E=_.useCallback((k={},w={},S=()=>{})=>{const{pulsate:B=!1,center:W=o||w.pulsate,fakeElement:U=!1}=w;if(k?.type==="mousedown"&&h.current){h.current=!1;return}k?.type==="touchstart"&&(h.current=!0);const y=U?null:b.current,R=y?y.getBoundingClientRect():{width:0,height:0,left:0,top:0};let F,M,z;if(W||k===void 0||k.clientX===0&&k.clientY===0||!k.clientX&&!k.touches)F=Math.round(R.width/2),M=Math.round(R.height/2);else{const{clientX:X,clientY:Z}=k.touches&&k.touches.length>0?k.touches[0]:k;F=Math.round(X-R.left),M=Math.round(Z-R.top)}if(W)z=Math.sqrt((2*R.width**2+R.height**2)/3),z%2===0&&(z+=1);else{const X=Math.max(Math.abs((y?y.clientWidth:0)-F),F)*2+2,Z=Math.max(Math.abs((y?y.clientHeight:0)-M),M)*2+2;z=Math.sqrt(X**2+Z**2)}k?.touches?g.current===null&&(g.current=()=>{T({pulsate:B,rippleX:F,rippleY:M,rippleSize:z,cb:S})},p.start(BB,()=>{g.current&&(g.current(),g.current=null)})):T({pulsate:B,rippleX:F,rippleY:M,rippleSize:z,cb:S})},[o,T,p]),C=_.useCallback(()=>{E({},{pulsate:!0})},[E]),x=_.useCallback((k,w)=>{if(p.clear(),k?.type==="touchend"&&g.current){g.current(),g.current=null,p.start(0,()=>{x(k,w)});return}g.current=null,c(S=>S.length>0?S.slice(1):S),u.current=w},[p]);return _.useImperativeHandle(n,()=>({pulsate:C,start:E,stop:x}),[C,E,x]),f.jsx(zB,{className:Qt(Fn.root,i.root,a),ref:b,...s,children:f.jsx(Yh,{component:null,exit:!0,children:l})})});function qB(e){return Mo("MuiButtonBase",e)}const WB=Fo("MuiButtonBase",["root","disabled","focusVisible"]),VB=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,a=Ri({root:["root",t&&"disabled",n&&"focusVisible"]},qB,o);return n&&r&&(a.root+=` ${r}`),a},YB=ln("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${WB.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),ME=_.forwardRef(function(t,n){const r=eo({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:a,className:s,component:l="button",disabled:c=!1,disableRipple:d=!1,disableTouchRipple:u=!1,focusRipple:h=!1,focusVisibleClassName:p,LinkComponent:g="a",onBlur:b,onClick:T,onContextMenu:E,onDragLeave:C,onFocus:x,onFocusVisible:k,onKeyDown:w,onKeyUp:S,onMouseDown:B,onMouseLeave:W,onMouseUp:U,onTouchEnd:y,onTouchMove:R,onTouchStart:F,tabIndex:M=0,TouchRippleProps:z,touchRippleRef:X,type:Z,...me}=r,ce=_.useRef(null),ee=SB(),I=dd(ee.ref,X),[ue,J]=_.useState(!1);c&&ue&&J(!1),_.useImperativeHandle(o,()=>({focusVisible:()=>{J(!0),ce.current.focus()}}),[]);const A=ee.shouldMount&&!d&&!c;_.useEffect(()=>{ue&&h&&!d&&ee.pulsate()},[d,h,ue,ee]);const Q=Cr(ee,"start",B,u),ge=Cr(ee,"stop",E,u),de=Cr(ee,"stop",C,u),ye=Cr(ee,"stop",U,u),he=Cr(ee,"stop",fe=>{ue&&fe.preventDefault(),W&&W(fe)},u),Fe=Cr(ee,"start",F,u),Be=Cr(ee,"stop",y,u),xe=Cr(ee,"stop",R,u),dt=Cr(ee,"stop",fe=>{Cg(fe.target)||J(!1),b&&b(fe)},!1),Ze=Ws(fe=>{ce.current||(ce.current=fe.currentTarget),Cg(fe.target)&&(J(!0),k&&k(fe)),x&&x(fe)}),be=()=>{const fe=ce.current;return l&&l!=="button"&&!(fe.tagName==="A"&&fe.href)},Jt=Ws(fe=>{h&&!fe.repeat&&ue&&fe.key===" "&&ee.stop(fe,()=>{ee.start(fe)}),fe.target===fe.currentTarget&&be()&&fe.key===" "&&fe.preventDefault(),w&&w(fe),fe.target===fe.currentTarget&&be()&&fe.key==="Enter"&&!c&&(fe.preventDefault(),T&&T(fe))}),bt=Ws(fe=>{h&&fe.key===" "&&ue&&!fe.defaultPrevented&&ee.stop(fe,()=>{ee.pulsate(fe)}),S&&S(fe),T&&fe.target===fe.currentTarget&&be()&&fe.key===" "&&!fe.defaultPrevented&&T(fe)});let _e=l;_e==="button"&&(me.href||me.to)&&(_e=g);const St={};_e==="button"?(St.type=Z===void 0?"button":Z,St.disabled=c):(!me.href&&!me.to&&(St.role="button"),c&&(St["aria-disabled"]=c));const ht=dd(n,ce),pt={...r,centerRipple:i,component:l,disabled:c,disableRipple:d,disableTouchRipple:u,focusRipple:h,tabIndex:M,focusVisible:ue},Se=VB(pt);return f.jsxs(YB,{as:_e,className:Qt(Se.root,s),ownerState:pt,onBlur:dt,onClick:T,onContextMenu:ge,onFocus:Ze,onKeyDown:Jt,onKeyUp:bt,onMouseDown:Q,onMouseLeave:he,onMouseUp:ye,onDragLeave:de,onTouchEnd:Be,onTouchMove:xe,onTouchStart:Fe,ref:ht,tabIndex:c?-1:M,type:Z,...St,...me,children:[a,A?f.jsx(GB,{ref:I,center:i,...z}):null]})});function Cr(e,t,n,r=!1){return Ws(o=>(n&&n(o),r||e[t](o),!0))}const KB=ln(ME)(Do(({theme:e})=>({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`,...e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},borderRadius:2,"&:hover, &:focus":{...e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}},"&:active":{boxShadow:e.shadows[0],...e.palette.mode==="light"?{backgroundColor:ld(e.palette.grey[200],.12)}:{backgroundColor:ld(e.palette.grey[600],.12)}}}))),QB=ln(vB)({width:24,height:16});function XB(e){const{slots:t={},slotProps:n={},...r}=e,o=e;return f.jsx("li",{children:f.jsx(KB,{focusRipple:!0,...r,ownerState:o,children:f.jsx(QB,{as:t.CollapsedIcon,ownerState:o,...n.collapsedIcon})})})}function JB(e){return Mo("MuiBreadcrumbs",e)}const ZB=Fo("MuiBreadcrumbs",["root","ol","li","separator"]),ej=e=>{const{classes:t}=e;return Ri({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},JB,t)},tj=ln(EB,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${ZB.li}`]:t.li},t.root]})({}),nj=ln("ol",{name:"MuiBreadcrumbs",slot:"Ol"})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),rj=ln("li",{name:"MuiBreadcrumbs",slot:"Separator"})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function oj(e,t,n,r){return e.reduce((o,i,a)=>(a<e.length-1?o=o.concat(i,f.jsx(rj,{"aria-hidden":!0,className:t,ownerState:r,children:n},`separator-${a}`)):o.push(i),o),[])}const ij=_.forwardRef(function(t,n){const r=eo({props:t,name:"MuiBreadcrumbs"}),{children:o,className:i,component:a="nav",slots:s={},slotProps:l={},expandText:c="Show path",itemsAfterCollapse:d=1,itemsBeforeCollapse:u=1,maxItems:h=8,separator:p="/",...g}=r,[b,T]=_.useState(!1),E={...r,component:a,expanded:b,expandText:c,itemsAfterCollapse:d,itemsBeforeCollapse:u,maxItems:h,separator:p},C=ej(E),x=uB({elementType:s.CollapsedIcon,externalSlotProps:l.collapsedIcon,ownerState:E}),k=_.useRef(null),w=B=>{const W=()=>{T(!0);const U=k.current.querySelector("a[href],button,[tabindex]");U&&U.focus()};return u+d>=B.length?B:[...B.slice(0,u),f.jsx(XB,{"aria-label":c,slots:{CollapsedIcon:s.CollapsedIcon},slotProps:{collapsedIcon:x},onClick:W},"ellipsis"),...B.slice(B.length-d,B.length)]},S=_.Children.toArray(o).filter(B=>_.isValidElement(B)).map((B,W)=>f.jsx("li",{className:C.li,children:B},`child-${W}`));return f.jsx(tj,{ref:n,component:a,color:"textSecondary",className:Qt(C.root,i),ownerState:E,...g,children:f.jsx(nj,{className:C.ol,ref:k,ownerState:E,children:oj(b||h&&S.length<=h?S:w(S),C.separator,p,E)})})});function FE(){const e=No(),t=e["*"],n=Ai();return f.jsx(v.Box,{sx:{display:"flex",alignItems:"center"},children:f.jsxs(ij,{"aria-label":"breadcrumb",separator:f.jsx(Sa.ChevronRight,{sx:{fontSize:14,color:"text.secondary"}}),sx:{"& .MuiBreadcrumbs-separator":{margin:"0 6px"}},children:[e.projectName&&f.jsx(v.Chip,{onClick:r=>n(`/${e.projectName}/`,r),label:e.projectName,size:"medium",sx:{backgroundColor:"white",color:"primary.main",fontWeight:500,height:"32px",fontSize:"0.875rem",cursor:"pointer","&:hover":{backgroundColor:"primary.100"}}}),e.packageName&&f.jsx(v.Chip,{onClick:r=>n(`/${e.projectName}/${e.packageName}/`,r),label:e.packageName,size:"medium",sx:{backgroundColor:"white",color:"primary.main",fontWeight:500,height:"32px",fontSize:"0.875rem",cursor:"pointer","&:hover":{backgroundColor:"secondary.100"}}}),t&&f.jsx(v.Chip,{onClick:r=>n(`/${e.projectName}/${e.packageName}/${t}`,r),label:t,size:"medium",sx:{backgroundColor:"white",color:"primary.main",fontWeight:500,height:"32px",fontSize:"0.875rem",cursor:"pointer","&:hover":{backgroundColor:"grey.200"}}})]})})}function aj({logoHeader:e,endCap:t}){const n=kd(),{projectName:r,packageName:o}=No();return f.jsx(v.AppBar,{position:"sticky",elevation:0,sx:{backgroundColor:"background.paper",borderBottom:"1px solid",borderColor:"divider"},children:f.jsxs(v.Toolbar,{sx:{justifyContent:"space-between"},children:[f.jsxs(v.Stack,{direction:"row",spacing:2,alignItems:"center",children:[e||f.jsxs(v.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[f.jsx(v.Box,{component:"img",src:"/logo.svg",alt:"Malloy",sx:{width:28,height:28}}),f.jsx(v.Typography,{variant:"h5",sx:{color:"text.primary",fontWeight:700,letterSpacing:"-0.025em",cursor:"pointer"},onClick:()=>{n("/")},children:"Malloy Publisher"})]}),f.jsx(FE,{})]}),f.jsxs(v.Stack,{direction:"row",spacing:2,alignItems:"center",children:[!r||!o?!e&&f.jsxs(f.Fragment,{children:[f.jsx(v.Button,{href:"https://docs.malloydata.dev/documentation/",children:"Malloy Docs"}),f.jsx(v.Button,{href:"https://github.com/malloydata/publisher/blob/main/README.md",children:"Publisher Docs"}),f.jsx(v.Button,{href:"/api-doc.html",children:"Publisher API"})]}):f.jsx(f.Fragment,{children:f.jsx(H7,{})}),t]})]})})}function BE({headerProps:e}){return f.jsxs(v.Box,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh"},children:[f.jsx(aj,{...e}),f.jsx(RE,{maxWidth:"xl",component:"main",sx:{flex:1,display:"flex",flexDirection:"column",py:2,gap:2},children:f.jsx(v.Box,{sx:{flex:1},children:f.jsx(Ax,{})})})]})}function jE(){const e=No(),t=e["*"];return e.projectName?e.packageName?t?.endsWith(".malloy")?f.jsx(hl,{projectName:e.projectName,packageName:e.packageName,children:f.jsx(ow,{modelPath:t,hideEmbeddingIcons:!0})}):t?.endsWith(".malloynb")?f.jsx(hl,{projectName:e.projectName,packageName:e.packageName,children:f.jsx(gy,{notebookPath:t,hideEmbeddingIcons:!0,expandResults:!1})}):f.jsx("div",{children:f.jsxs("h2",{children:["Unrecognized file type: ",t]})}):f.jsx("div",{children:f.jsx("h2",{children:"Missing package name"})}):f.jsx("div",{children:f.jsx("h2",{children:"Missing project name"})})}function HE(){const{projectName:e,packageName:t}=No(),n=Ai();return e?t?f.jsx(hl,{projectName:e,packageName:t,children:f.jsx(QI,{navigate:n})}):f.jsx("div",{children:f.jsx("h2",{children:"Missing package name"})}):f.jsx("div",{children:f.jsx("h2",{children:"Missing project name"})})}function UE(){const e=Ai(),{projectName:t}=No();return t?f.jsx(w7,{projectName:t,children:f.jsx(N7,{navigate:e})}):f.jsx("div",{children:f.jsx("h2",{children:"Missing project name"})})}function zE(){const e=Kg();return console.error(e),f.jsx(RE,{maxWidth:"lg",component:"main",sx:{display:"flex",flexDirection:"column",my:2,gap:0},children:f.jsxs(v.Stack,{sx:{m:"auto",flexDirection:"column"},children:[f.jsx(v.Box,{sx:{height:"300px"}}),f.jsx("img",{src:"/error.png"}),f.jsx(v.Typography,{variant:"subtitle1",children:"An unexpected error occurred"})]})})}function $E(){const{projectName:e,packageName:t,notebookPath:n}=No();return e?t?f.jsx(hl,{projectName:e,packageName:t,children:f.jsx(mE,{notebookStorage:new Vy,userContext:{project:e,package:t},children:f.jsx(v7,{notebookPath:n,hideEmbeddingIcons:!0},`${n}-${e}-${t}`)})}):f.jsx("div",{children:f.jsx("h2",{children:"Missing package name"})}):f.jsx("div",{children:f.jsx("h2",{children:"Missing project name"})})}const gt={primary:{main:"#14b3cb",light:"#22d3ee",dark:"#0e7490",50:"#ecfeff",100:"#cffafe",500:"#14b3cb",600:"#0891b2",700:"#0e7490"},secondary:{main:"#fbbb04",light:"#fde047",dark:"#eab308",50:"#fefce8",100:"#fef3c7",500:"#fbbb04",600:"#eab308",700:"#ca8a04"},grey:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},success:{main:"#059669",light:"#10b981",dark:"#047857"},warning:{main:"#d97706",light:"#f59e0b",dark:"#b45309"},error:{main:"#dc2626",light:"#ef4444",dark:"#b91c1c"},info:{main:"#0891b2",light:"#06b6d4",dark:"#0e7490"}},GE=qh({palette:{mode:"light",primary:gt.primary,secondary:gt.secondary,grey:gt.grey,success:gt.success,warning:gt.warning,error:gt.error,info:gt.info,background:{default:"#ffffff",paper:"#ffffff"},text:{primary:gt.grey[900],secondary:gt.grey[600]},divider:gt.grey[200]},typography:{fontFamily:'"Inter", "Roboto", "Helvetica", "Arial", sans-serif',h1:{fontWeight:700,letterSpacing:"-0.025em"},h2:{fontWeight:700,letterSpacing:"-0.025em"},h3:{fontWeight:600,letterSpacing:"-0.025em"},h4:{fontWeight:600,letterSpacing:"-0.025em"},h5:{fontWeight:600,letterSpacing:"-0.025em"},h6:{fontWeight:600,letterSpacing:"-0.025em"},subtitle1:{fontWeight:500,letterSpacing:"-0.025em"},subtitle2:{fontWeight:500,letterSpacing:"-0.025em"},body1:{letterSpacing:"-0.025em"},body2:{letterSpacing:"-0.025em"},button:{fontWeight:500,letterSpacing:"-0.025em",textTransform:"none"}},shape:{borderRadius:4},components:{MuiCssBaseline:{styleOverrides:{body:{scrollbarWidth:"thin",scrollbarColor:`${gt.grey[300]} ${gt.grey[100]}`,"&::-webkit-scrollbar":{width:"8px",height:"8px"},"&::-webkit-scrollbar-track":{background:gt.grey[100],borderRadius:"4px"},"&::-webkit-scrollbar-thumb":{background:gt.grey[300],borderRadius:"4px","&:hover":{background:gt.grey[400]}},"&::-webkit-scrollbar-corner":{background:gt.grey[100]}},"*":{scrollbarWidth:"thin",scrollbarColor:`${gt.grey[300]} ${gt.grey[100]}`,"&::-webkit-scrollbar":{width:"8px",height:"8px"},"&::-webkit-scrollbar-track":{background:gt.grey[100],borderRadius:"4px"},"&::-webkit-scrollbar-thumb":{background:gt.grey[300],borderRadius:"4px","&:hover":{background:gt.grey[400]}},"&::-webkit-scrollbar-corner":{background:gt.grey[100]}}}},MuiButton:{styleOverrides:{root:{borderRadius:4,textTransform:"none",fontWeight:500,boxShadow:"none","&:hover":{boxShadow:"0 1px 3px rgba(0, 0, 0, 0.1)"}},contained:{"&:hover":{boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)"}}}},MuiCard:{styleOverrides:{root:{borderRadius:4,boxShadow:"0 1px 3px rgba(0, 0, 0, 0.1)",border:"1px solid",borderColor:"rgba(0, 0, 0, 0.05)"}}},MuiChip:{styleOverrides:{root:{borderRadius:4,fontWeight:500}}},MuiTextField:{styleOverrides:{root:{"& .MuiOutlinedInput-root":{borderRadius:4}}}},MuiDialog:{styleOverrides:{paper:{borderRadius:4,boxShadow:"0px 20px 25px -5px rgba(0, 0, 0, 0.1), 0px 10px 10px -5px rgba(0, 0, 0, 0.04)"}}},MuiMenu:{styleOverrides:{paper:{borderRadius:4,boxShadow:"0px 10px 15px -3px rgba(0, 0, 0, 0.1), 0px 4px 6px -2px rgba(0, 0, 0, 0.05)",border:"1px solid rgba(0, 0, 0, 0.05)"}}},MuiBreadcrumbs:{styleOverrides:{root:{"& .MuiBreadcrumbs-separator":{margin:"0 6px",color:gt.grey[400]}}}},MuiDivider:{styleOverrides:{root:{margin:"4px 0",borderColor:gt.grey[200]}},defaultProps:{sx:{my:1}}}}}),qE=(e="/",t,n,r)=>Qx([{path:e,element:f.jsx(sw,{server:n,getAccessToken:r,children:f.jsxs(oB,{theme:GE,children:[f.jsx(v.CssBaseline,{}),f.jsx(BE,{headerProps:t})]})}),errorElement:f.jsx(zE,{}),children:[{path:"",element:f.jsx(PE,{})},{path:":projectName",element:f.jsx(UE,{})},{path:":projectName/:packageName",element:f.jsx(HE,{})},{path:":projectName/:packageName/*",element:f.jsx(jE,{})},{path:":projectName/:packageName/scratchNotebook/:notebookPath",element:f.jsx($E,{})}]}]),sj=({server:e,getAccessToken:t,basePath:n="/",headerProps:r})=>{const o=qE(n,r,e,t);return f.jsx(lC,{router:o})};let Ag=0;function lj(e){const[t,n]=_.useState(e),r=e||t;return _.useEffect(()=>{t==null&&(Ag+=1,n(`mui-${Ag}`))},[t]),r}const cj={..._},kg=cj.useId;function uj(e){if(kg!==void 0){const t=kg();return e??t}return lj(e)}function dj(e){return Mo("MuiCircularProgress",e)}Fo("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const jr=44,gd=Ge.keyframes`
|
|
240
303
|
0% {
|
|
241
304
|
transform: rotate(0deg);
|
|
242
305
|
}
|
|
@@ -244,7 +307,7 @@ export default theme;`}function Cs(e={},...t){const{breakpoints:r,mixins:n={},sp
|
|
|
244
307
|
100% {
|
|
245
308
|
transform: rotate(360deg);
|
|
246
309
|
}
|
|
247
|
-
`,
|
|
310
|
+
`,yd=Ge.keyframes`
|
|
248
311
|
0% {
|
|
249
312
|
stroke-dasharray: 1px, 200px;
|
|
250
313
|
stroke-dashoffset: 0;
|
|
@@ -259,8 +322,8 @@ export default theme;`}function Cs(e={},...t){const{breakpoints:r,mixins:n={},sp
|
|
|
259
322
|
stroke-dasharray: 1px, 200px;
|
|
260
323
|
stroke-dashoffset: -126px;
|
|
261
324
|
}
|
|
262
|
-
`,
|
|
263
|
-
animation: ${
|
|
264
|
-
`:null,
|
|
265
|
-
animation: ${
|
|
266
|
-
`:null,
|
|
325
|
+
`,hj=typeof gd!="string"?Ge.css`
|
|
326
|
+
animation: ${gd} 1.4s linear infinite;
|
|
327
|
+
`:null,pj=typeof yd!="string"?Ge.css`
|
|
328
|
+
animation: ${yd} 1.4s ease-in-out infinite;
|
|
329
|
+
`:null,fj=e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,i={root:["root",n,`color${Ht(r)}`],svg:["svg"],circle:["circle",`circle${Ht(n)}`,o&&"circleDisableShrink"]};return Ri(i,dj,t)},mj=ln("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Ht(n.color)}`]]}})(Do(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:hj||{animation:`${gd} 1.4s linear infinite`}},...Object.entries(e.palette).filter(_l()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),gj=ln("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),yj=ln("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Ht(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(Do(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:pj||{animation:`${yd} 1.4s ease-in-out infinite`}}]}))),bj=_.forwardRef(function(t,n){const r=eo({props:t,name:"MuiCircularProgress"}),{className:o,color:i="primary",disableShrink:a=!1,size:s=40,style:l,thickness:c=3.6,value:d=0,variant:u="indeterminate",...h}=r,p={...r,color:i,disableShrink:a,size:s,thickness:c,value:d,variant:u},g=fj(p),b={},T={},E={};if(u==="determinate"){const C=2*Math.PI*((jr-c)/2);b.strokeDasharray=C.toFixed(3),E["aria-valuenow"]=Math.round(d),b.strokeDashoffset=`${((100-d)/100*C).toFixed(3)}px`,T.transform="rotate(-90deg)"}return f.jsx(mj,{className:Qt(g.root,o),style:{width:s,height:s,...T,...l},ownerState:p,ref:n,role:"progressbar",...E,...h,children:f.jsx(gj,{className:g.svg,ownerState:p,viewBox:`${jr/2} ${jr/2} ${jr} ${jr}`,children:f.jsx(yj,{className:g.circle,style:b,ownerState:p,cx:jr,cy:jr,r:(jr-c)/2,fill:"none",strokeWidth:c})})})});function Ej(e){return Mo("MuiIconButton",e)}const _g=Fo("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),Tj=e=>{const{classes:t,disabled:n,color:r,edge:o,size:i,loading:a}=e,s={root:["root",a&&"loading",n&&"disabled",r!=="default"&&`color${Ht(r)}`,o&&`edge${Ht(o)}`,`size${Ht(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return Ri(s,Ej,t)},xj=ln(ME,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${Ht(n.color)}`],n.edge&&t[`edge${Ht(n.edge)}`],t[`size${Ht(n.size)}`]]}})(Do(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:sd(e.palette.action.active,e.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),Do(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(_l()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(_l()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:sd((e.vars||e).palette[t].main,e.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${_g.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${_g.loading}`]:{color:"transparent"}}))),Cj=ln("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),vj=_.forwardRef(function(t,n){const r=eo({props:t,name:"MuiIconButton"}),{edge:o=!1,children:i,className:a,color:s="default",disabled:l=!1,disableFocusRipple:c=!1,size:d="medium",id:u,loading:h=null,loadingIndicator:p,...g}=r,b=uj(u),T=p??f.jsx(bj,{"aria-labelledby":b,color:"inherit",size:16}),E={...r,edge:o,color:s,disabled:l,disableFocusRipple:c,loading:h,loadingIndicator:T,size:d},C=Tj(E);return f.jsxs(xj,{id:h?b:u,className:Qt(C.root,a),centerRipple:!0,focusRipple:!c,disabled:l||h,ref:n,...g,ownerState:E,children:[typeof h=="boolean"&&f.jsx("span",{className:C.loadingWrapper,style:{display:"contents"},children:f.jsx(Cj,{className:C.loadingIndicator,ownerState:E,children:h&&T})}),i]})}),Sj=Wh(f.jsx("path",{d:"M11.93 2.3c-2.04-.5-4.02-.35-5.77.28-.72.26-.91 1.22-.31 1.71C8.08 6.12 9.5 8.89 9.5 12s-1.42 5.88-3.65 7.71c-.59.49-.42 1.45.31 1.7 1.04.38 2.17.59 3.34.59 6.05 0 10.85-5.38 9.87-11.6-.61-3.92-3.59-7.16-7.44-8.1"})),Aj=Wh(f.jsx("path",{d:"m6.05 4.14-.39-.39c-.39-.39-1.02-.38-1.4 0l-.01.01c-.39.39-.39 1.02 0 1.4l.39.39c.39.39 1.01.39 1.4 0l.01-.01c.39-.38.39-1.02 0-1.4M3.01 10.5H1.99c-.55 0-.99.44-.99.99v.01c0 .55.44.99.99.99H3c.56.01 1-.43 1-.98v-.01c0-.56-.44-1-.99-1m9-9.95H12c-.56 0-1 .44-1 .99v.96c0 .55.44.99.99.99H12c.56.01 1-.43 1-.98v-.97c0-.55-.44-.99-.99-.99m7.74 3.21c-.39-.39-1.02-.39-1.41-.01l-.39.39c-.39.39-.39 1.02 0 1.4l.01.01c.39.39 1.02.39 1.4 0l.39-.39c.39-.39.39-1.01 0-1.4m-1.81 15.1.39.39c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41l-.39-.39c-.39-.39-1.02-.38-1.4 0-.4.4-.4 1.02-.01 1.41M20 11.49v.01c0 .55.44.99.99.99H22c.55 0 .99-.44.99-.99v-.01c0-.55-.44-.99-.99-.99h-1.01c-.55 0-.99.44-.99.99M12 5.5c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6m-.01 16.95H12c.55 0 .99-.44.99-.99v-.96c0-.55-.44-.99-.99-.99h-.01c-.55 0-.99.44-.99.99v.96c0 .55.44.99.99.99m-7.74-3.21c.39.39 1.02.39 1.41 0l.39-.39c.39-.39.38-1.02 0-1.4l-.01-.01a.996.996 0 0 0-1.41 0l-.39.39c-.38.4-.38 1.02.01 1.41"}));function kj({mode:e,toggleColorMode:t,...n}){return f.jsx(vj,{onClick:t,color:"primary",size:"small","aria-label":"Theme toggle button",...n,children:e==="dark"?f.jsx(Aj,{fontSize:"small"}):f.jsx(Sj,{fontSize:"small"})})}exports.BreadcrumbNav=FE;exports.HomePage=PE;exports.MainPage=BE;exports.MalloyPublisherApp=sj;exports.ModelPage=jE;exports.PackagePage=HE;exports.ProjectPage=UE;exports.RouteError=zE;exports.ScratchNotebookPage=$E;exports.ToggleColorMode=kj;exports.createMalloyRouter=qE;exports.theme=GE;
|