@malloy-publisher/sdk 0.0.77 → 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.js +117 -0
- package/dist/RenderedResult-DW6glKC-.cjs +1 -0
- package/dist/components/Model/SourcesExplorer.d.ts +1 -1
- package/dist/components/Notebook/NotebookCell.d.ts +1 -2
- package/dist/components/Package/PackageProvider.d.ts +1 -1
- package/dist/components/QueryResult/QueryResult.d.ts +11 -1
- package/dist/components/RenderedResult/RenderedResult.d.ts +3 -4
- package/dist/index.cjs.js +108 -45
- package/dist/index.es.js +26938 -8206
- package/dist/sdk.css +1 -1
- package/package.json +1 -1
- package/src/components/Model/ModelCell.tsx +9 -12
- package/src/components/Model/SourcesExplorer.tsx +89 -23
- package/src/components/MutableNotebook/MutableCell.tsx +3 -3
- package/src/components/Notebook/Notebook.tsx +0 -13
- package/src/components/Notebook/NotebookCell.tsx +9 -2
- package/src/components/Package/PackageProvider.tsx +2 -2
- package/src/components/QueryResult/QueryResult.tsx +70 -1
- package/src/components/RenderedResult/RenderedResult.tsx +124 -101
- package/dist/RenderedResult-C4b9CwSp.cjs +0 -1
- package/dist/RenderedResult-DXlUZo0k.js +0 -79
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";var v0=Object.create;var wl=Object.defineProperty;var D0=Object.getOwnPropertyDescriptor;var w0=Object.getOwnPropertyNames;var N0=Object.getPrototypeOf,P0=Object.prototype.hasOwnProperty;var R0=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of w0(t))!P0.call(e,i)&&i!==n&&wl(e,i,{get:()=>t[i],enumerable:!(r=D0(t,i))||r.enumerable});return e};var Nl=(e,t,n)=>(n=e!=null?v0(N0(e)):{},R0(t||!e||!e.__esModule?wl(n,"default",{value:e,enumerable:!0}):n,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react/jsx-runtime"),P=require("react"),We=require("@mui/system"),L0=require("@emotion/styled"),O0=require("@emotion/react"),y=require("@mui/material"),Ve=require("axios"),mu=require("@tanstack/react-query"),gu=require("markdown-to-jsx"),Ns=require("@mui/icons-material"),ch=require("@react-spring/web"),ns=require("react-dom"),dh=require("react-router-dom");function F0(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 $=F0(P),Pl=e=>e,M0=()=>{let e=Pl;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Pl}}},B0=M0();function tr(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 tn(e){if(typeof e!="string")throw new Error(tr(7));return e.charAt(0).toUpperCase()+e.slice(1)}function sa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ba={exports:{}},ja,Rl;function j0(){if(Rl)return ja;Rl=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ja=e,ja}var Ha,Ll;function H0(){if(Ll)return Ha;Ll=1;var e=j0();function t(){}function n(){}return n.resetWarningCache=t,Ha=function(){function r(a,o,u,l,d,c){if(c!==e){var m=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 m.name="Invariant Violation",m}}r.isRequired=r;function i(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},Ha}var Ol;function U0(){return Ol||(Ol=1,Ba.exports=H0()()),Ba.exports}var z0=U0();const Fl=sa(z0);function hh(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=hh(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ye(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=hh(e))&&(r&&(r+=" "),r+=t);return r}function Hi(e,t,n=void 0){const r={};for(const i in e){const s=e[i];let a="",o=!0;for(let u=0;u<s.length;u+=1){const l=s[u];l&&(a+=(o===!0?"":" ")+t(l),o=!1,n&&n[l]&&(a+=" "+n[l]))}r[i]=a}return r}var Ua={exports:{}},Ne={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-is.production.js
|
|
4
4
|
*
|
|
@@ -6,16 +6,16 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var os;function wl(){if(os)return Z;os=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"),s=Symbol.for("react.consumer"),i=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");function g(b){if(typeof b=="object"&&b!==null){var x=b.$$typeof;switch(x){case e:switch(b=b.type,b){case n:case o:case r:case l:case u:case f:return b;default:switch(b=b&&b.$$typeof,b){case i:case a:case p:case d:return b;case s:return b;default:return x}}case t:return x}}}return Z.ContextConsumer=s,Z.ContextProvider=i,Z.Element=e,Z.ForwardRef=a,Z.Fragment=n,Z.Lazy=p,Z.Memo=d,Z.Portal=t,Z.Profiler=o,Z.StrictMode=r,Z.Suspense=l,Z.SuspenseList=u,Z.isContextConsumer=function(b){return g(b)===s},Z.isContextProvider=function(b){return g(b)===i},Z.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},Z.isForwardRef=function(b){return g(b)===a},Z.isFragment=function(b){return g(b)===n},Z.isLazy=function(b){return g(b)===p},Z.isMemo=function(b){return g(b)===d},Z.isPortal=function(b){return g(b)===t},Z.isProfiler=function(b){return g(b)===o},Z.isStrictMode=function(b){return g(b)===r},Z.isSuspense=function(b){return g(b)===l},Z.isSuspenseList=function(b){return g(b)===u},Z.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===o||b===r||b===l||b===u||typeof b=="object"&&b!==null&&(b.$$typeof===p||b.$$typeof===d||b.$$typeof===i||b.$$typeof===s||b.$$typeof===a||b.$$typeof===m||b.getModuleId!==void 0)},Z.typeOf=g,Z}var ss;function kl(){return ss||(ss=1,Rr.exports=wl()),Rr.exports}var ci=kl();function st(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 ui(e){if(P.isValidElement(e)||ci.isValidElementType(e)||!st(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=ui(e[n])}),t}function Be(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return st(e)&&st(t)&&Object.keys(t).forEach(o=>{P.isValidElement(t[o])||ci.isValidElementType(t[o])?r[o]=t[o]:st(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&st(e[o])?r[o]=Be(e[o],t[o],n):n.clone?r[o]=st(t[o])?ui(t[o]):t[o]:r[o]=t[o]}),r}function on(e,t){return t?Be(e,t,{clone:!1}):e}function Il(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,o)=>{const s=/min-width:\s*([0-9.]+)/;return+(r.match(s)?.[1]||0)-+(o.match(s)?.[1]||0)});return n.length?n.reduce((r,o)=>{const s=t[o];return delete r[o],r[o]=s,r},{...t}):t}function Pl(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function Tl(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,s=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(s)}function jl(e){const t=(s,i)=>s.replace("@media",i?`@container ${i}`:"@container");function n(s,i){s.up=(...a)=>t(e.breakpoints.up(...a),i),s.down=(...a)=>t(e.breakpoints.down(...a),i),s.between=(...a)=>t(e.breakpoints.between(...a),i),s.only=(...a)=>t(e.breakpoints.only(...a),i),s.not=(...a)=>{const l=t(e.breakpoints.not(...a),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 r={},o=s=>(n(r,s),r);return n(o),{...e,containerQueries:o}}const sr={xs:0,sm:600,md:900,lg:1200,xl:1536},is={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${sr[e]}px)`},El={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:sr[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function ct(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const s=r.breakpoints||is;return t.reduce((i,a,l)=>(i[s.up(s.keys[l])]=n(t[l]),i),{})}if(typeof t=="object"){const s=r.breakpoints||is;return Object.keys(t).reduce((i,a)=>{if(Pl(s.keys,a)){const l=Tl(r.containerQueries?r:El,a);l&&(i[l]=n(t[a],a))}else if(Object.keys(s.values||sr).includes(a)){const l=s.up(a);i[l]=n(t[a],a)}else{const l=a;i[l]=t[l]}return i},{})}return n(t)}function Rl(e={}){return e.keys?.reduce((n,r)=>{const o=e.up(r);return n[o]={},n},{})||{}}function _l(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function ir(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,s)=>o&&o[s]?o[s]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function zn(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=ir(e,n)||r,t&&(o=t(o,r,e)),o}function ge(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,s=i=>{if(i[t]==null)return null;const a=i[t],l=i.theme,u=ir(l,r)||{};return ct(i,a,p=>{let f=zn(u,o,p);return p===f&&typeof p=="string"&&(f=zn(u,o,`${t}${p==="default"?"":Ke(p)}`,p)),n===!1?f:{[n]:f}})};return s.propTypes={},s.filterProps=[t],s}function Al(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const Ol={m:"margin",p:"padding"},Nl={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},as={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Ml=Al(e=>{if(e.length>2)if(as[e])e=as[e];else return[e];const[t,n]=e.split(""),r=Ol[t],o=Nl[n]||"";return Array.isArray(o)?o.map(s=>r+s):[r+o]}),mo=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],fo=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...mo,...fo];function bn(e,t,n,r){const o=ir(e,t,!0)??n;return typeof o=="number"||typeof o=="string"?s=>typeof s=="string"?s:typeof o=="string"?o.startsWith("var(")&&s===0?0:o.startsWith("var(")&&s===1?o:`calc(${s} * ${o})`:o*s:Array.isArray(o)?s=>{if(typeof s=="string")return s;const i=Math.abs(s),a=o[i];return s>=0?a:typeof a=="number"?-a:typeof a=="string"&&a.startsWith("var(")?`calc(-1 * ${a})`:`-${a}`}:typeof o=="function"?o:()=>{}}function go(e){return bn(e,"spacing",8)}function xn(e,t){return typeof t=="string"||t==null?t:e(t)}function Ll(e,t){return n=>e.reduce((r,o)=>(r[o]=xn(t,n),r),{})}function Dl(e,t,n,r){if(!t.includes(n))return null;const o=Ml(n),s=Ll(o,r),i=e[n];return ct(e,i,s)}function di(e,t){const n=go(e.theme);return Object.keys(e).map(r=>Dl(e,t,r,n)).reduce(on,{})}function ce(e){return di(e,mo)}ce.propTypes={};ce.filterProps=mo;function ue(e){return di(e,fo)}ue.propTypes={};ue.filterProps=fo;function ar(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(s=>{r[s]=o}),r),{}),n=r=>Object.keys(r).reduce((o,s)=>t[s]?on(o,t[s](r)):o,{});return n.propTypes={},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function Ue(e){return typeof e!="number"?e:`${e}px solid`}function We(e,t){return ge({prop:e,themeKey:"borders",transform:t})}const $l=We("border",Ue),Bl=We("borderTop",Ue),ql=We("borderRight",Ue),Vl=We("borderBottom",Ue),Fl=We("borderLeft",Ue),zl=We("borderColor"),Hl=We("borderTopColor"),Ul=We("borderRightColor"),Gl=We("borderBottomColor"),Wl=We("borderLeftColor"),Kl=We("outline",Ue),Ql=We("outlineColor"),lr=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=bn(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:xn(t,r)});return ct(e,e.borderRadius,n)}return null};lr.propTypes={};lr.filterProps=["borderRadius"];ar($l,Bl,ql,Vl,Fl,zl,Hl,Ul,Gl,Wl,lr,Kl,Ql);const cr=e=>{if(e.gap!==void 0&&e.gap!==null){const t=bn(e.theme,"spacing",8),n=r=>({gap:xn(t,r)});return ct(e,e.gap,n)}return null};cr.propTypes={};cr.filterProps=["gap"];const ur=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=bn(e.theme,"spacing",8),n=r=>({columnGap:xn(t,r)});return ct(e,e.columnGap,n)}return null};ur.propTypes={};ur.filterProps=["columnGap"];const dr=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=bn(e.theme,"spacing",8),n=r=>({rowGap:xn(t,r)});return ct(e,e.rowGap,n)}return null};dr.propTypes={};dr.filterProps=["rowGap"];const Yl=ge({prop:"gridColumn"}),Xl=ge({prop:"gridRow"}),Jl=ge({prop:"gridAutoFlow"}),Zl=ge({prop:"gridAutoColumns"}),ec=ge({prop:"gridAutoRows"}),tc=ge({prop:"gridTemplateColumns"}),nc=ge({prop:"gridTemplateRows"}),rc=ge({prop:"gridTemplateAreas"}),oc=ge({prop:"gridArea"});ar(cr,ur,dr,Yl,Xl,Jl,Zl,ec,tc,nc,rc,oc);function Bt(e,t){return t==="grey"?t:e}const sc=ge({prop:"color",themeKey:"palette",transform:Bt}),ic=ge({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Bt}),ac=ge({prop:"backgroundColor",themeKey:"palette",transform:Bt});ar(sc,ic,ac);function $e(e){return e<=1&&e!==0?`${e*100}%`:e}const lc=ge({prop:"width",transform:$e}),yo=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{const r=e.theme?.breakpoints?.values?.[n]||sr[n];return r?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:$e(n)}};return ct(e,e.maxWidth,t)}return null};yo.filterProps=["maxWidth"];const cc=ge({prop:"minWidth",transform:$e}),uc=ge({prop:"height",transform:$e}),dc=ge({prop:"maxHeight",transform:$e}),pc=ge({prop:"minHeight",transform:$e});ge({prop:"size",cssProperty:"width",transform:$e});ge({prop:"size",cssProperty:"height",transform:$e});const hc=ge({prop:"boxSizing"});ar(lc,yo,cc,uc,dc,pc,hc);const pr={border:{themeKey:"borders",transform:Ue},borderTop:{themeKey:"borders",transform:Ue},borderRight:{themeKey:"borders",transform:Ue},borderBottom:{themeKey:"borders",transform:Ue},borderLeft:{themeKey:"borders",transform:Ue},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Ue},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:lr},color:{themeKey:"palette",transform:Bt},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Bt},backgroundColor:{themeKey:"palette",transform:Bt},p:{style:ue},pt:{style:ue},pr:{style:ue},pb:{style:ue},pl:{style:ue},px:{style:ue},py:{style:ue},padding:{style:ue},paddingTop:{style:ue},paddingRight:{style:ue},paddingBottom:{style:ue},paddingLeft:{style:ue},paddingX:{style:ue},paddingY:{style:ue},paddingInline:{style:ue},paddingInlineStart:{style:ue},paddingInlineEnd:{style:ue},paddingBlock:{style:ue},paddingBlockStart:{style:ue},paddingBlockEnd:{style:ue},m:{style:ce},mt:{style:ce},mr:{style:ce},mb:{style:ce},ml:{style:ce},mx:{style:ce},my:{style:ce},margin:{style:ce},marginTop:{style:ce},marginRight:{style:ce},marginBottom:{style:ce},marginLeft:{style:ce},marginX:{style:ce},marginY:{style:ce},marginInline:{style:ce},marginInlineStart:{style:ce},marginInlineEnd:{style:ce},marginBlock:{style:ce},marginBlockStart:{style:ce},marginBlockEnd:{style:ce},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:cr},rowGap:{style:dr},columnGap:{style:ur},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:$e},maxWidth:{style:yo},minWidth:{transform:$e},height:{transform:$e},maxHeight:{transform:$e},minHeight:{transform:$e},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 mc(...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 fc(e,t){return typeof e=="function"?e(t):e}function gc(){function e(n,r,o,s){const i={[n]:r,theme:o},a=s[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:u,transform:d,style:p}=a;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const f=ir(o,u)||{};return p?p(i):ct(i,r,g=>{let b=zn(f,d,g);return g===b&&typeof g=="string"&&(b=zn(f,d,`${n}${g==="default"?"":Ke(g)}`,g)),l===!1?b:{[l]:b}})}function t(n){const{sx:r,theme:o={}}=n||{};if(!r)return null;const s=o.unstable_sxConfig??pr;function i(a){let l=a;if(typeof a=="function")l=a(o);else if(typeof a!="object")return a;if(!l)return null;const u=Rl(o.breakpoints),d=Object.keys(u);let p=u;return Object.keys(l).forEach(f=>{const m=fc(l[f],o);if(m!=null)if(typeof m=="object")if(s[f])p=on(p,e(f,m,o,s));else{const g=ct({theme:o},m,b=>({[f]:b}));mc(g,m)?p[f]=t({sx:m,theme:o}):p=on(p,g)}else p=on(p,e(f,m,o,s))}),Il(o,_l(d,p))}return Array.isArray(r)?r.map(i):i(r)}return t}const zt=gc();zt.filterProps=["sx"];function yc(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function bo(e,t=0,n=1){return yc(e,t,n)}function bc(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 mt(e){if(e.type)return e;if(e.charAt(0)==="#")return mt(bc(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(kt(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(kt(10,o))}else r=r.split(",");return r=r.map(s=>parseFloat(s)),{type:n,values:r,colorSpace:o}}const xc=e=>{const t=mt(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},en=(e,t)=>{try{return xc(e)}catch{return e}};function hr(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((o,s)=>s<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 pi(e){e=mt(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,s=r*Math.min(o,1-o),i=(u,d=(u+n/30)%12)=>o-s*Math.max(Math.min(d-3,9-d,1),-1);let a="rgb";const l=[Math.round(i(0)*255),Math.round(i(8)*255),Math.round(i(4)*255)];return e.type==="hsla"&&(a+="a",l.push(t[3])),hr({type:a,values:l})}function Ur(e){e=mt(e);let t=e.type==="hsl"||e.type==="hsla"?mt(pi(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 vc(e,t){const n=Ur(e),r=Ur(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Gr(e,t){return e=mt(e),t=bo(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,hr(e)}function En(e,t,n){try{return Gr(e,t)}catch{return e}}function xo(e,t){if(e=mt(e),t=bo(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 hr(e)}function ee(e,t,n){try{return xo(e,t)}catch{return e}}function vo(e,t){if(e=mt(e),t=bo(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 hr(e)}function te(e,t,n){try{return vo(e,t)}catch{return e}}function Sc(e,t=.15){return Ur(e)>.5?xo(e,t):vo(e,t)}function Rn(e,t,n){try{return Sc(e,t)}catch{return e}}const cn={black:"#000",white:"#fff"},Cc={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"},Rt={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},_t={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Jt={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},At={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Ot={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Nt={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function hi(){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:cn.white,default:cn.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 wc=hi();function mi(){return{text:{primary:cn.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:cn.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 ls=mi();function cs(e,t,n,r){const o=r.light||r,s=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=vo(e.main,o):t==="dark"&&(e.dark=xo(e.main,s)))}function kc(e="light"){return e==="dark"?{main:At[200],light:At[50],dark:At[400]}:{main:At[700],light:At[400],dark:At[800]}}function Ic(e="light"){return e==="dark"?{main:Rt[200],light:Rt[50],dark:Rt[400]}:{main:Rt[500],light:Rt[300],dark:Rt[700]}}function Pc(e="light"){return e==="dark"?{main:_t[500],light:_t[300],dark:_t[700]}:{main:_t[700],light:_t[400],dark:_t[800]}}function Tc(e="light"){return e==="dark"?{main:Ot[400],light:Ot[300],dark:Ot[700]}:{main:Ot[700],light:Ot[500],dark:Ot[900]}}function jc(e="light"){return e==="dark"?{main:Nt[400],light:Nt[300],dark:Nt[700]}:{main:Nt[800],light:Nt[500],dark:Nt[900]}}function Ec(e="light"){return e==="dark"?{main:Jt[400],light:Jt[300],dark:Jt[700]}:{main:"#ed6c02",light:Jt[500],dark:Jt[900]}}function So(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...o}=e,s=e.primary||kc(t),i=e.secondary||Ic(t),a=e.error||Pc(t),l=e.info||Tc(t),u=e.success||jc(t),d=e.warning||Ec(t);function p(b){return vc(b,ls.text.primary)>=n?ls.text.primary:wc.text.primary}const f=({color:b,name:x,mainShade:v=500,lightShade:S=300,darkShade:C=700})=>{if(b={...b},!b.main&&b[v]&&(b.main=b[v]),!b.hasOwnProperty("main"))throw new Error(kt(11,x?` (${x})`:"",v));if(typeof b.main!="string")throw new Error(kt(12,x?` (${x})`:"",JSON.stringify(b.main)));return cs(b,"light",S,r),cs(b,"dark",C,r),b.contrastText||(b.contrastText=p(b.main)),b};let m;return t==="light"?m=hi():t==="dark"&&(m=mi()),Be({common:{...cn},mode:t,primary:f({color:s,name:"primary"}),secondary:f({color:i,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:a,name:"error"}),warning:f({color:d,name:"warning"}),info:f({color:l,name:"info"}),success:f({color:u,name:"success"}),grey:Cc,contrastThreshold:n,getContrastText:p,augmentColor:f,tonalOffset:r,...m},o)}function Rc(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 _c={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 Ac(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Oc=/[A-Z]|^ms/g,Nc=/_EMO_([^_]+?)_([^]*?)_EMO_/g,fi=function(t){return t.charCodeAt(1)===45},us=function(t){return t!=null&&typeof t!="boolean"},_r=Ac(function(e){return fi(e)?e:e.replace(Oc,"-$&").toLowerCase()}),ds=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Nc,function(r,o,s){return pt={name:o,styles:s,next:pt},o})}return _c[t]!==1&&!fi(t)&&typeof n=="number"&&n!==0?n+"px":n};function Hn(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 pt={name:o.name,styles:o.styles,next:pt},o.name;var s=n;if(s.styles!==void 0){var i=s.next;if(i!==void 0)for(;i!==void 0;)pt={name:i.name,styles:i.styles,next:pt},i=i.next;var a=s.styles+";";return a}return Mc(e,t,n)}}var l=n;return l}function Mc(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Hn(e,t,n[o])+";";else for(var s in n){var i=n[s];if(typeof i!="object"){var a=i;us(a)&&(r+=_r(s)+":"+ds(s,a)+";")}else if(Array.isArray(i)&&typeof i[0]=="string"&&t==null)for(var l=0;l<i.length;l++)us(i[l])&&(r+=_r(s)+":"+ds(s,i[l])+";");else{var u=Hn(e,t,i);switch(s){case"animation":case"animationName":{r+=_r(s)+":"+u+";";break}default:r+=s+"{"+u+"}"}}}return r}var ps=/label:\s*([^\s;{]+)\s*(;|$)/g,pt;function Lc(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="";pt=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,o+=Hn(n,t,s);else{var i=s;o+=i[0]}for(var a=1;a<e.length;a++)if(o+=Hn(n,t,e[a]),r){var l=s;o+=l[a]}ps.lastIndex=0;for(var u="",d;(d=ps.exec(o))!==null;)u+="-"+d[1];var p=Rc(o)+u;return{name:p,styles:o,next:pt}}function Dc(e,t){return dl(e,t)}function $c(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const hs=[];function ms(e){return hs[0]=e,Lc(hs)}const Bc=typeof window<"u"?P.useLayoutEffect:P.useEffect;function qc(e){return Object.keys(e).length===0}function Vc(e=null){const t=P.useContext(pl.ThemeContext);return!t||qc(t)?e:t}const Fc=P.createContext(),zc=()=>P.useContext(Fc)??!1;function Un(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 s=e[o],i=t[o];if(!i)n[o]=s||{};else if(!s)n[o]=i;else{n[o]={...i};for(const a in s)if(Object.prototype.hasOwnProperty.call(s,a)){const l=a;n[o][l]=Un(s[l],i[l])}}}else n[o]===void 0&&(n[o]=e[o])}return n}const Hc=P.createContext(void 0);function Uc(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?Un(o.defaultProps,r):!o.styleOverrides&&!o.variants?Un(o,r):r}function Gc({props:e,name:t}){const n=P.useContext(Hc);return Uc({props:e,name:t,theme:{components:n}})}const fs=(e,t,n,r=[])=>{let o=e;t.forEach((s,i)=>{i===t.length-1?Array.isArray(o)?o[Number(s)]=n:o&&typeof o=="object"&&(o[s]=n):o&&typeof o=="object"&&(o[s]||(o[s]=r.includes(s)?[]:{}),o=o[s])})},Wc=(e,t,n)=>{function r(o,s=[],i=[]){Object.entries(o).forEach(([a,l])=>{(!n||n&&!n([...s,a]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...s,a],Array.isArray(l)?[...i,a]:i):t([...s,a],l,i))})}r(e)},Kc=(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 Ar(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},s={},i={};return Wc(e,(a,l,u)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(a,l))){const d=`--${n?`${n}-`:""}${a.join("-")}`,p=Kc(a,l);Object.assign(o,{[d]:p}),fs(s,a,`var(${d})`,u),fs(i,a,`var(${d}, ${p})`,u)}},a=>a[0]==="vars"),{css:o,vars:s,varsWithDefaults:i}}function Qc(e,t={}){const{getSelector:n=x,disableCssColorScheme:r,colorSchemeSelector:o}=t,{colorSchemes:s={},components:i,defaultColorScheme:a="light",...l}=e,{vars:u,css:d,varsWithDefaults:p}=Ar(l,t);let f=p;const m={},{[a]:g,...b}=s;if(Object.entries(b||{}).forEach(([C,k])=>{const{vars:w,css:E,varsWithDefaults:O}=Ar(k,t);f=Be(f,O),m[C]={css:E,vars:w}}),g){const{css:C,vars:k,varsWithDefaults:w}=Ar(g,t);f=Be(f,w),m[a]={css:C,vars:k}}function x(C,k){let w=o;if(o==="class"&&(w=".%s"),o==="data"&&(w="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(w=`[${o}="%s"]`),C){if(w==="media")return e.defaultColorScheme===C?":root":{[`@media (prefers-color-scheme: ${s[C]?.palette?.mode||C})`]:{":root":k}};if(w)return e.defaultColorScheme===C?`:root, ${w.replace("%s",String(C))}`:w.replace("%s",String(C))}return":root"}return{vars:f,generateThemeVars:()=>{let C={...u};return Object.entries(m).forEach(([,{vars:k}])=>{C=Be(C,k)}),C},generateStyleSheets:()=>{const C=[],k=e.defaultColorScheme||"light";function w(B,q){Object.keys(q).length&&C.push(typeof B=="string"?{[B]:{...q}}:B)}w(n(void 0,{...d}),d);const{[k]:E,...O}=m;if(E){const{css:B}=E,q=s[k]?.palette?.mode,y=!r&&q?{colorScheme:q,...B}:{...B};w(n(k,{...y}),y)}return Object.entries(O).forEach(([B,{css:q}])=>{const y=s[B]?.palette?.mode,R=!r&&y?{colorScheme:y,...q}:{...q};w(n(B,{...R}),R)}),C}}}function Yc(e){const t={};return Object.entries(e).forEach(r=>{const[o,s]=r;typeof s=="object"&&(t[o]=`${s.fontStyle?`${s.fontStyle} `:""}${s.fontVariant?`${s.fontVariant} `:""}${s.fontWeight?`${s.fontWeight} `:""}${s.fontStretch?`${s.fontStretch} `:""}${s.fontSize||""}${s.lineHeight?`/${s.lineHeight} `:""}${s.fontFamily||""}`)}),t}function Xc(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)} &`:"&"}}const Jc=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 Zc(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,s=Jc(t),i=Object.keys(s);function a(f){return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n})`}function l(f){return`@media (max-width:${(typeof t[f]=="number"?t[f]:f)-r/100}${n})`}function u(f,m){const g=i.indexOf(m);return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n}) and (max-width:${(g!==-1&&typeof t[i[g]]=="number"?t[i[g]]:m)-r/100}${n})`}function d(f){return i.indexOf(f)+1<i.length?u(f,i[i.indexOf(f)+1]):a(f)}function p(f){const m=i.indexOf(f);return m===0?a(i[1]):m===i.length-1?l(i[m]):u(f,i[i.indexOf(f)+1]).replace("@media","@media not all and")}return{keys:i,values:s,up:a,down:l,between:u,only:d,not:p,unit:n,...o}}const eu={borderRadius:4};function tu(e=8,t=go({spacing:e})){if(e.mui)return e;const n=(...r)=>(r.length===0?[1]:r).map(s=>{const i=t(s);return typeof i=="number"?`${i}px`:i}).join(" ");return n.mui=!0,n}function nu(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 Co(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:s={},...i}=e,a=Zc(n),l=tu(o);let u=Be({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...eu,...s}},i);return u=jl(u),u.applyStyles=nu,u=t.reduce((d,p)=>Be(d,p),u),u.unstable_sxConfig={...pr,...i?.unstable_sxConfig},u.unstable_sx=function(p){return zt({sx:p,theme:this})},u}const ru={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 Gt(e,t,n="Mui"){const r=ru[t];return r?`${n}-${r}`:`${yl.generate(e)}-${t}`}function ou(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function su(e){return Math.round(e*1e5)/1e5}const gs={textTransform:"uppercase"},ys='"Roboto", "Helvetica", "Arial", sans-serif';function iu(e,t){const{fontFamily:n=ys,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:i=500,fontWeightBold:a=700,htmlFontSize:l=16,allVariants:u,pxToRem:d,...p}=typeof t=="function"?t(e):t,f=r/14,m=d||(x=>`${x/l*f}rem`),g=(x,v,S,C,k)=>({fontFamily:n,fontWeight:x,fontSize:m(v),lineHeight:S,...n===ys?{letterSpacing:`${su(C/v)}em`}:{},...k,...u}),b={h1:g(o,96,1.167,-1.5),h2:g(o,60,1.2,-.5),h3:g(s,48,1.167,0),h4:g(s,34,1.235,.25),h5:g(s,24,1.334,0),h6:g(i,20,1.6,.15),subtitle1:g(s,16,1.75,.15),subtitle2:g(i,14,1.57,.1),body1:g(s,16,1.5,.15),body2:g(s,14,1.43,.15),button:g(i,14,1.75,.4,gs),caption:g(s,12,1.66,.4),overline:g(s,12,2.66,1,gs),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Be({htmlFontSize:l,pxToRem:m,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:i,fontWeightBold:a,...b},p,{clone:!1})}const au=.2,lu=.14,cu=.12;function le(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${au})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${lu})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${cu})`].join(",")}const uu=["none",le(0,2,1,-1,0,1,1,0,0,1,3,0),le(0,3,1,-2,0,2,2,0,0,1,5,0),le(0,3,3,-2,0,3,4,0,0,1,8,0),le(0,2,4,-1,0,4,5,0,0,1,10,0),le(0,3,5,-1,0,5,8,0,0,1,14,0),le(0,3,5,-1,0,6,10,0,0,1,18,0),le(0,4,5,-2,0,7,10,1,0,2,16,1),le(0,5,5,-3,0,8,10,1,0,3,14,2),le(0,5,6,-3,0,9,12,1,0,3,16,2),le(0,6,6,-3,0,10,14,1,0,4,18,3),le(0,6,7,-4,0,11,15,1,0,4,20,3),le(0,7,8,-4,0,12,17,2,0,5,22,4),le(0,7,8,-4,0,13,19,2,0,5,24,4),le(0,7,9,-4,0,14,21,2,0,5,26,4),le(0,8,9,-5,0,15,22,2,0,6,28,5),le(0,8,10,-5,0,16,24,2,0,6,30,5),le(0,8,11,-5,0,17,26,2,0,6,32,5),le(0,9,11,-5,0,18,28,2,0,7,34,6),le(0,9,12,-6,0,19,29,2,0,7,36,6),le(0,10,13,-6,0,20,31,3,0,8,38,7),le(0,10,13,-6,0,21,33,3,0,8,40,7),le(0,10,14,-6,0,22,35,3,0,8,42,7),le(0,11,14,-7,0,23,36,3,0,9,44,8),le(0,11,15,-7,0,24,38,3,0,9,46,8)],du={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)"},gi={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function bs(e){return`${Math.round(e)}ms`}function pu(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function hu(e){const t={...du,...e.easing},n={...gi,...e.duration};return{getAutoHeightDuration:pu,create:(o=["all"],s={})=>{const{duration:i=n.standard,easing:a=t.easeInOut,delay:l=0,...u}=s;return(Array.isArray(o)?o:[o]).map(d=>`${d} ${typeof i=="string"?i:bs(i)} ${a} ${typeof l=="string"?l:bs(l)}`).join(",")},...e,easing:t,duration:n}}const mu={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function fu(e){return st(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function yi(e={}){const t={...e};function n(r){const o=Object.entries(r);for(let s=0;s<o.length;s++){const[i,a]=o[s];!fu(a)||i.startsWith("unstable_")?delete r[i]:st(a)&&(r[i]={...a},n(r[i]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
9
|
+
*/var Ml;function $0(){if(Ml)return Ne;Ml=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),m=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 i:case r:case u:case l:case m:return b;default:switch(b=b&&b.$$typeof,b){case a:case o:case c:case d:return b;case s:return b;default:return T}}case t:return T}}}return Ne.ContextConsumer=s,Ne.ContextProvider=a,Ne.Element=e,Ne.ForwardRef=o,Ne.Fragment=n,Ne.Lazy=c,Ne.Memo=d,Ne.Portal=t,Ne.Profiler=i,Ne.StrictMode=r,Ne.Suspense=u,Ne.SuspenseList=l,Ne.isContextConsumer=function(b){return g(b)===s},Ne.isContextProvider=function(b){return g(b)===a},Ne.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},Ne.isForwardRef=function(b){return g(b)===o},Ne.isFragment=function(b){return g(b)===n},Ne.isLazy=function(b){return g(b)===c},Ne.isMemo=function(b){return g(b)===d},Ne.isPortal=function(b){return g(b)===t},Ne.isProfiler=function(b){return g(b)===i},Ne.isStrictMode=function(b){return g(b)===r},Ne.isSuspense=function(b){return g(b)===u},Ne.isSuspenseList=function(b){return g(b)===l},Ne.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===i||b===r||b===u||b===l||typeof b=="object"&&b!==null&&(b.$$typeof===c||b.$$typeof===d||b.$$typeof===a||b.$$typeof===s||b.$$typeof===o||b.$$typeof===p||b.getModuleId!==void 0)},Ne.typeOf=g,Ne}var Bl;function q0(){return Bl||(Bl=1,Ua.exports=$0()),Ua.exports}var fh=q0();function xn(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($.isValidElement(e)||fh.isValidElementType(e)||!xn(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=ph(e[n])}),t}function jt(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return xn(e)&&xn(t)&&Object.keys(t).forEach(i=>{$.isValidElement(t[i])||fh.isValidElementType(t[i])?r[i]=t[i]:xn(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&xn(e[i])?r[i]=jt(e[i],t[i],n):n.clone?r[i]=xn(t[i])?ph(t[i]):t[i]:r[i]=t[i]}),r}function pi(e,t){return t?jt(e,t,{clone:!1}):e}function V0(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,i)=>{const s=/min-width:\s*([0-9.]+)/;return+(r.match(s)?.[1]||0)-+(i.match(s)?.[1]||0)});return n.length?n.reduce((r,i)=>{const s=t[i];return delete r[i],r[i]=s,r},{...t}):t}function W0(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function G0(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,i]=n,s=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(s)}function Y0(e){const t=(s,a)=>s.replace("@media",a?`@container ${a}`:"@container");function n(s,a){s.up=(...o)=>t(e.breakpoints.up(...o),a),s.down=(...o)=>t(e.breakpoints.down(...o),a),s.between=(...o)=>t(e.breakpoints.between(...o),a),s.only=(...o)=>t(e.breakpoints.only(...o),a),s.not=(...o)=>{const u=t(e.breakpoints.not(...o),a);return u.includes("not all and")?u.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):u}}const r={},i=s=>(n(r,s),r);return n(i),{...e,containerQueries:i}}const aa={xs:0,sm:600,md:900,lg:1200,xl:1536},jl={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${aa[e]}px)`},K0={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:aa[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function In(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const s=r.breakpoints||jl;return t.reduce((a,o,u)=>(a[s.up(s.keys[u])]=n(t[u]),a),{})}if(typeof t=="object"){const s=r.breakpoints||jl;return Object.keys(t).reduce((a,o)=>{if(W0(s.keys,o)){const u=G0(r.containerQueries?r:K0,o);u&&(a[u]=n(t[o],o))}else if(Object.keys(s.values||aa).includes(o)){const u=s.up(o);a[u]=n(t[o],o)}else{const u=o;a[u]=t[u]}return a},{})}return n(t)}function Q0(e={}){return e.keys?.reduce((n,r)=>{const i=e.up(r);return n[i]={},n},{})||{}}function X0(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function oa(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,s)=>i&&i[s]?i[s]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function Ps(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=oa(e,n)||r,t&&(i=t(i,r,e)),i}function Qe(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,s=a=>{if(a[t]==null)return null;const o=a[t],u=a.theme,l=oa(u,r)||{};return In(a,o,c=>{let m=Ps(l,i,c);return c===m&&typeof c=="string"&&(m=Ps(l,i,`${t}${c==="default"?"":tn(c)}`,c)),n===!1?m:{[n]:m}})};return s.propTypes={},s.filterProps=[t],s}function Z0(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const J0={m:"margin",p:"padding"},e1={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Hl={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},t1=Z0(e=>{if(e.length>2)if(Hl[e])e=Hl[e];else return[e];const[t,n]=e.split(""),r=J0[t],i=e1[n]||"";return Array.isArray(i)?i.map(s=>r+s):[r+i]}),bu=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Eu=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...bu,...Eu];function Ui(e,t,n,r){const i=oa(e,t,!0)??n;return typeof i=="number"||typeof i=="string"?s=>typeof s=="string"?s:typeof i=="string"?i.startsWith("var(")&&s===0?0:i.startsWith("var(")&&s===1?i:`calc(${s} * ${i})`:i*s:Array.isArray(i)?s=>{if(typeof s=="string")return s;const a=Math.abs(s),o=i[a];return s>=0?o:typeof o=="number"?-o:typeof o=="string"&&o.startsWith("var(")?`calc(-1 * ${o})`:`-${o}`}:typeof i=="function"?i:()=>{}}function xu(e){return Ui(e,"spacing",8)}function zi(e,t){return typeof t=="string"||t==null?t:e(t)}function n1(e,t){return n=>e.reduce((r,i)=>(r[i]=zi(t,n),r),{})}function r1(e,t,n,r){if(!t.includes(n))return null;const i=t1(n),s=n1(i,r),a=e[n];return In(e,a,s)}function mh(e,t){const n=xu(e.theme);return Object.keys(e).map(r=>r1(e,t,r,n)).reduce(pi,{})}function $e(e){return mh(e,bu)}$e.propTypes={};$e.filterProps=bu;function qe(e){return mh(e,Eu)}qe.propTypes={};qe.filterProps=Eu;function ua(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(s=>{r[s]=i}),r),{}),n=r=>Object.keys(r).reduce((i,s)=>t[s]?pi(i,t[s](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Gt(e){return typeof e!="number"?e:`${e}px solid`}function Xt(e,t){return Qe({prop:e,themeKey:"borders",transform:t})}const i1=Xt("border",Gt),s1=Xt("borderTop",Gt),a1=Xt("borderRight",Gt),o1=Xt("borderBottom",Gt),u1=Xt("borderLeft",Gt),l1=Xt("borderColor"),c1=Xt("borderTopColor"),d1=Xt("borderRightColor"),h1=Xt("borderBottomColor"),f1=Xt("borderLeftColor"),p1=Xt("outline",Gt),m1=Xt("outlineColor"),la=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Ui(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:zi(t,r)});return In(e,e.borderRadius,n)}return null};la.propTypes={};la.filterProps=["borderRadius"];ua(i1,s1,a1,o1,u1,l1,c1,d1,h1,f1,la,p1,m1);const ca=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Ui(e.theme,"spacing",8),n=r=>({gap:zi(t,r)});return In(e,e.gap,n)}return null};ca.propTypes={};ca.filterProps=["gap"];const da=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Ui(e.theme,"spacing",8),n=r=>({columnGap:zi(t,r)});return In(e,e.columnGap,n)}return null};da.propTypes={};da.filterProps=["columnGap"];const ha=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Ui(e.theme,"spacing",8),n=r=>({rowGap:zi(t,r)});return In(e,e.rowGap,n)}return null};ha.propTypes={};ha.filterProps=["rowGap"];const g1=Qe({prop:"gridColumn"}),b1=Qe({prop:"gridRow"}),E1=Qe({prop:"gridAutoFlow"}),x1=Qe({prop:"gridAutoColumns"}),y1=Qe({prop:"gridAutoRows"}),T1=Qe({prop:"gridTemplateColumns"}),C1=Qe({prop:"gridTemplateRows"}),S1=Qe({prop:"gridTemplateAreas"}),A1=Qe({prop:"gridArea"});ua(ca,da,ha,g1,b1,E1,x1,y1,T1,C1,S1,A1);function Ar(e,t){return t==="grey"?t:e}const I1=Qe({prop:"color",themeKey:"palette",transform:Ar}),k1=Qe({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ar}),_1=Qe({prop:"backgroundColor",themeKey:"palette",transform:Ar});ua(I1,k1,_1);function Bt(e){return e<=1&&e!==0?`${e*100}%`:e}const v1=Qe({prop:"width",transform:Bt}),yu=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{const r=e.theme?.breakpoints?.values?.[n]||aa[n];return r?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Bt(n)}};return In(e,e.maxWidth,t)}return null};yu.filterProps=["maxWidth"];const D1=Qe({prop:"minWidth",transform:Bt}),w1=Qe({prop:"height",transform:Bt}),N1=Qe({prop:"maxHeight",transform:Bt}),P1=Qe({prop:"minHeight",transform:Bt});Qe({prop:"size",cssProperty:"width",transform:Bt});Qe({prop:"size",cssProperty:"height",transform:Bt});const R1=Qe({prop:"boxSizing"});ua(v1,yu,D1,w1,N1,P1,R1);const fa={border:{themeKey:"borders",transform:Gt},borderTop:{themeKey:"borders",transform:Gt},borderRight:{themeKey:"borders",transform:Gt},borderBottom:{themeKey:"borders",transform:Gt},borderLeft:{themeKey:"borders",transform:Gt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Gt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:la},color:{themeKey:"palette",transform:Ar},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Ar},backgroundColor:{themeKey:"palette",transform:Ar},p:{style:qe},pt:{style:qe},pr:{style:qe},pb:{style:qe},pl:{style:qe},px:{style:qe},py:{style:qe},padding:{style:qe},paddingTop:{style:qe},paddingRight:{style:qe},paddingBottom:{style:qe},paddingLeft:{style:qe},paddingX:{style:qe},paddingY:{style:qe},paddingInline:{style:qe},paddingInlineStart:{style:qe},paddingInlineEnd:{style:qe},paddingBlock:{style:qe},paddingBlockStart:{style:qe},paddingBlockEnd:{style:qe},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:ca},rowGap:{style:ha},columnGap:{style:da},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Bt},maxWidth:{style:yu},minWidth:{transform:Bt},height:{transform:Bt},maxHeight:{transform:Bt},minHeight:{transform:Bt},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 L1(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function O1(e,t){return typeof e=="function"?e(t):e}function F1(){function e(n,r,i,s){const a={[n]:r,theme:i},o=s[n];if(!o)return{[n]:r};const{cssProperty:u=n,themeKey:l,transform:d,style:c}=o;if(r==null)return null;if(l==="typography"&&r==="inherit")return{[n]:r};const m=oa(i,l)||{};return c?c(a):In(a,r,g=>{let b=Ps(m,d,g);return g===b&&typeof g=="string"&&(b=Ps(m,d,`${n}${g==="default"?"":tn(g)}`,g)),u===!1?b:{[u]:b}})}function t(n){const{sx:r,theme:i={}}=n||{};if(!r)return null;const s=i.unstable_sxConfig??fa;function a(o){let u=o;if(typeof o=="function")u=o(i);else if(typeof o!="object")return o;if(!u)return null;const l=Q0(i.breakpoints),d=Object.keys(l);let c=l;return Object.keys(u).forEach(m=>{const p=O1(u[m],i);if(p!=null)if(typeof p=="object")if(s[m])c=pi(c,e(m,p,i,s));else{const g=In({theme:i},p,b=>({[m]:b}));L1(g,p)?c[m]=t({sx:p,theme:i}):c=pi(c,g)}else c=pi(c,e(m,p,i,s))}),V0(i,X0(d,c))}return Array.isArray(r)?r.map(a):a(r)}return t}const wr=F1();wr.filterProps=["sx"];function M1(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Tu(e,t=0,n=1){return M1(e,t,n)}function B1(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,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Bn(e){if(e.type)return e;if(e.charAt(0)==="#")return Bn(B1(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(tr(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=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(i))throw new Error(tr(10,i))}else r=r.split(",");return r=r.map(s=>parseFloat(s)),{type:n,values:r,colorSpace:i}}const j1=e=>{const t=Bn(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},li=(e,t)=>{try{return j1(e)}catch{return e}};function pa(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((i,s)=>s<3?parseInt(i,10):i):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function gh(e){e=Bn(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,s=r*Math.min(i,1-i),a=(l,d=(l+n/30)%12)=>i-s*Math.max(Math.min(d-3,9-d,1),-1);let o="rgb";const u=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(o+="a",u.push(t[3])),pa({type:o,values:u})}function wo(e){e=Bn(e);let t=e.type==="hsl"||e.type==="hsla"?Bn(gh(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 H1(e,t){const n=wo(e),r=wo(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function No(e,t){return e=Bn(e),t=Tu(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,pa(e)}function rs(e,t,n){try{return No(e,t)}catch{return e}}function Cu(e,t){if(e=Bn(e),t=Tu(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 pa(e)}function Pe(e,t,n){try{return Cu(e,t)}catch{return e}}function Su(e,t){if(e=Bn(e),t=Tu(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 pa(e)}function Re(e,t,n){try{return Su(e,t)}catch{return e}}function U1(e,t=.15){return wo(e)>.5?Cu(e,t):Su(e,t)}function is(e,t,n){try{return U1(e,t)}catch{return e}}const vi={black:"#000",white:"#fff"},z1={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"},cr={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},dr={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Jr={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},hr={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},fr={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},pr={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function bh(){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:vi.white,default:vi.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 $1=bh();function Eh(){return{text:{primary:vi.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:vi.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 Ul=Eh();function zl(e,t,n,r){const i=r.light||r,s=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Su(e.main,i):t==="dark"&&(e.dark=Cu(e.main,s)))}function q1(e="light"){return e==="dark"?{main:hr[200],light:hr[50],dark:hr[400]}:{main:hr[700],light:hr[400],dark:hr[800]}}function V1(e="light"){return e==="dark"?{main:cr[200],light:cr[50],dark:cr[400]}:{main:cr[500],light:cr[300],dark:cr[700]}}function W1(e="light"){return e==="dark"?{main:dr[500],light:dr[300],dark:dr[700]}:{main:dr[700],light:dr[400],dark:dr[800]}}function G1(e="light"){return e==="dark"?{main:fr[400],light:fr[300],dark:fr[700]}:{main:fr[700],light:fr[500],dark:fr[900]}}function Y1(e="light"){return e==="dark"?{main:pr[400],light:pr[300],dark:pr[700]}:{main:pr[800],light:pr[500],dark:pr[900]}}function K1(e="light"){return e==="dark"?{main:Jr[400],light:Jr[300],dark:Jr[700]}:{main:"#ed6c02",light:Jr[500],dark:Jr[900]}}function Au(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...i}=e,s=e.primary||q1(t),a=e.secondary||V1(t),o=e.error||W1(t),u=e.info||G1(t),l=e.success||Y1(t),d=e.warning||K1(t);function c(b){return H1(b,Ul.text.primary)>=n?Ul.text.primary:$1.text.primary}const m=({color:b,name:T,mainShade:x=500,lightShade:C=300,darkShade:S=700})=>{if(b={...b},!b.main&&b[x]&&(b.main=b[x]),!b.hasOwnProperty("main"))throw new Error(tr(11,T?` (${T})`:"",x));if(typeof b.main!="string")throw new Error(tr(12,T?` (${T})`:"",JSON.stringify(b.main)));return zl(b,"light",C,r),zl(b,"dark",S,r),b.contrastText||(b.contrastText=c(b.main)),b};let p;return t==="light"?p=bh():t==="dark"&&(p=Eh()),jt({common:{...vi},mode:t,primary:m({color:s,name:"primary"}),secondary:m({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:m({color:o,name:"error"}),warning:m({color:d,name:"warning"}),info:m({color:u,name:"info"}),success:m({color:l,name:"success"}),grey:z1,contrastThreshold:n,getContrastText:c,augmentColor:m,tonalOffset:r,...p},i)}function Q1(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=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(i){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 X1={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 Z1(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var J1=/[A-Z]|^ms/g,eg=/_EMO_([^_]+?)_([^]*?)_EMO_/g,xh=function(t){return t.charCodeAt(1)===45},$l=function(t){return t!=null&&typeof t!="boolean"},za=Z1(function(e){return xh(e)?e:e.replace(J1,"-$&").toLowerCase()}),ql=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(eg,function(r,i,s){return On={name:i,styles:s,next:On},i})}return X1[t]!==1&&!xh(t)&&typeof n=="number"&&n!==0?n+"px":n};function Rs(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 i=n;if(i.anim===1)return On={name:i.name,styles:i.styles,next:On},i.name;var s=n;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)On={name:a.name,styles:a.styles,next:On},a=a.next;var o=s.styles+";";return o}return tg(e,t,n)}}var u=n;return u}function tg(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Rs(e,t,n[i])+";";else for(var s in n){var a=n[s];if(typeof a!="object"){var o=a;$l(o)&&(r+=za(s)+":"+ql(s,o)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var u=0;u<a.length;u++)$l(a[u])&&(r+=za(s)+":"+ql(s,a[u])+";");else{var l=Rs(e,t,a);switch(s){case"animation":case"animationName":{r+=za(s)+":"+l+";";break}default:r+=s+"{"+l+"}"}}}return r}var Vl=/label:\s*([^\s;{]+)\s*(;|$)/g,On;function ng(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,i="";On=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,i+=Rs(n,t,s);else{var a=s;i+=a[0]}for(var o=1;o<e.length;o++)if(i+=Rs(n,t,e[o]),r){var u=s;i+=u[o]}Vl.lastIndex=0;for(var l="",d;(d=Vl.exec(i))!==null;)l+="-"+d[1];var c=Q1(i)+l;return{name:c,styles:i,next:On}}function rg(e,t){return L0(e,t)}function ig(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Wl=[];function Gl(e){return Wl[0]=e,ng(Wl)}const sg=typeof window<"u"?$.useLayoutEffect:$.useEffect;function ag(e){return Object.keys(e).length===0}function og(e=null){const t=$.useContext(O0.ThemeContext);return!t||ag(t)?e:t}const ug=$.createContext(),lg=()=>$.useContext(ug)??!1;function Ls(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if(i==="components"||i==="slots")n[i]={...e[i],...n[i]};else if(i==="componentsProps"||i==="slotProps"){const s=e[i],a=t[i];if(!a)n[i]=s||{};else if(!s)n[i]=a;else{n[i]={...a};for(const o in s)if(Object.prototype.hasOwnProperty.call(s,o)){const u=o;n[i][u]=Ls(s[u],a[u])}}}else n[i]===void 0&&(n[i]=e[i])}return n}const cg=$.createContext(void 0);function dg(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?Ls(i.defaultProps,r):!i.styleOverrides&&!i.variants?Ls(i,r):r}function hg({props:e,name:t}){const n=$.useContext(cg);return dg({props:e,name:t,theme:{components:n}})}const Yl=(e,t,n,r=[])=>{let i=e;t.forEach((s,a)=>{a===t.length-1?Array.isArray(i)?i[Number(s)]=n:i&&typeof i=="object"&&(i[s]=n):i&&typeof i=="object"&&(i[s]||(i[s]=r.includes(s)?[]:{}),i=i[s])})},fg=(e,t,n)=>{function r(i,s=[],a=[]){Object.entries(i).forEach(([o,u])=>{(!n||n&&!n([...s,o]))&&u!=null&&(typeof u=="object"&&Object.keys(u).length>0?r(u,[...s,o],Array.isArray(u)?[...a,o]:a):t([...s,o],u,a))})}r(e)},pg=(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 $a(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},s={},a={};return fg(e,(o,u,l)=>{if((typeof u=="string"||typeof u=="number")&&(!r||!r(o,u))){const d=`--${n?`${n}-`:""}${o.join("-")}`,c=pg(o,u);Object.assign(i,{[d]:c}),Yl(s,o,`var(${d})`,l),Yl(a,o,`var(${d}, ${c})`,l)}},o=>o[0]==="vars"),{css:i,vars:s,varsWithDefaults:a}}function mg(e,t={}){const{getSelector:n=T,disableCssColorScheme:r,colorSchemeSelector:i}=t,{colorSchemes:s={},components:a,defaultColorScheme:o="light",...u}=e,{vars:l,css:d,varsWithDefaults:c}=$a(u,t);let m=c;const p={},{[o]:g,...b}=s;if(Object.entries(b||{}).forEach(([S,w])=>{const{vars:D,css:N,varsWithDefaults:B}=$a(w,t);m=jt(m,B),p[S]={css:N,vars:D}}),g){const{css:S,vars:w,varsWithDefaults:D}=$a(g,t);m=jt(m,D),p[o]={css:S,vars:w}}function T(S,w){let D=i;if(i==="class"&&(D=".%s"),i==="data"&&(D="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(D=`[${i}="%s"]`),S){if(D==="media")return e.defaultColorScheme===S?":root":{[`@media (prefers-color-scheme: ${s[S]?.palette?.mode||S})`]:{":root":w}};if(D)return e.defaultColorScheme===S?`:root, ${D.replace("%s",String(S))}`:D.replace("%s",String(S))}return":root"}return{vars:m,generateThemeVars:()=>{let S={...l};return Object.entries(p).forEach(([,{vars:w}])=>{S=jt(S,w)}),S},generateStyleSheets:()=>{const S=[],w=e.defaultColorScheme||"light";function D(Z,J){Object.keys(J).length&&S.push(typeof Z=="string"?{[Z]:{...J}}:Z)}D(n(void 0,{...d}),d);const{[w]:N,...B}=p;if(N){const{css:Z}=N,J=s[w]?.palette?.mode,E=!r&&J?{colorScheme:J,...Z}:{...Z};D(n(w,{...E}),E)}return Object.entries(B).forEach(([Z,{css:J}])=>{const E=s[Z]?.palette?.mode,L=!r&&E?{colorScheme:E,...J}:{...J};D(n(Z,{...L}),L)}),S}}}function gg(e){const t={};return Object.entries(e).forEach(r=>{const[i,s]=r;typeof s=="object"&&(t[i]=`${s.fontStyle?`${s.fontStyle} `:""}${s.fontVariant?`${s.fontVariant} `:""}${s.fontWeight?`${s.fontWeight} `:""}${s.fontStretch?`${s.fontStretch} `:""}${s.fontSize||""}${s.lineHeight?`/${s.lineHeight} `:""}${s.fontFamily||""}`)}),t}function bg(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)} &`:"&"}}const Eg=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 xg(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...i}=e,s=Eg(t),a=Object.keys(s);function o(m){return`@media (min-width:${typeof t[m]=="number"?t[m]:m}${n})`}function u(m){return`@media (max-width:${(typeof t[m]=="number"?t[m]:m)-r/100}${n})`}function l(m,p){const g=a.indexOf(p);return`@media (min-width:${typeof t[m]=="number"?t[m]:m}${n}) and (max-width:${(g!==-1&&typeof t[a[g]]=="number"?t[a[g]]:p)-r/100}${n})`}function d(m){return a.indexOf(m)+1<a.length?l(m,a[a.indexOf(m)+1]):o(m)}function c(m){const p=a.indexOf(m);return p===0?o(a[1]):p===a.length-1?u(a[p]):l(m,a[a.indexOf(m)+1]).replace("@media","@media not all and")}return{keys:a,values:s,up:o,down:u,between:l,only:d,not:c,unit:n,...i}}const yg={borderRadius:4};function Tg(e=8,t=xu({spacing:e})){if(e.mui)return e;const n=(...r)=>(r.length===0?[1]:r).map(s=>{const a=t(s);return typeof a=="number"?`${a}px`:a}).join(" ");return n.mui=!0,n}function Cg(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 Iu(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:s={},...a}=e,o=xg(n),u=Tg(i);let l=jt({breakpoints:o,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:u,shape:{...yg,...s}},a);return l=Y0(l),l.applyStyles=Cg,l=t.reduce((d,c)=>jt(d,c),l),l.unstable_sxConfig={...fa,...a?.unstable_sxConfig},l.unstable_sx=function(c){return wr({sx:c,theme:this})},l}const Sg={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 Fr(e,t,n="Mui"){const r=Sg[t];return r?`${n}-${r}`:`${B0.generate(e)}-${t}`}function Ag(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function Ig(e){return Math.round(e*1e5)/1e5}const Kl={textTransform:"uppercase"},Ql='"Roboto", "Helvetica", "Arial", sans-serif';function kg(e,t){const{fontFamily:n=Ql,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:o=700,htmlFontSize:u=16,allVariants:l,pxToRem:d,...c}=typeof t=="function"?t(e):t,m=r/14,p=d||(T=>`${T/u*m}rem`),g=(T,x,C,S,w)=>({fontFamily:n,fontWeight:T,fontSize:p(x),lineHeight:C,...n===Ql?{letterSpacing:`${Ig(S/x)}em`}:{},...w,...l}),b={h1:g(i,96,1.167,-1.5),h2:g(i,60,1.2,-.5),h3:g(s,48,1.167,0),h4:g(s,34,1.235,.25),h5:g(s,24,1.334,0),h6:g(a,20,1.6,.15),subtitle1:g(s,16,1.75,.15),subtitle2:g(a,14,1.57,.1),body1:g(s,16,1.5,.15),body2:g(s,14,1.43,.15),button:g(a,14,1.75,.4,Kl),caption:g(s,12,1.66,.4),overline:g(s,12,2.66,1,Kl),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return jt({htmlFontSize:u,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:o,...b},c,{clone:!1})}const _g=.2,vg=.14,Dg=.12;function He(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${_g})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${vg})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Dg})`].join(",")}const wg=["none",He(0,2,1,-1,0,1,1,0,0,1,3,0),He(0,3,1,-2,0,2,2,0,0,1,5,0),He(0,3,3,-2,0,3,4,0,0,1,8,0),He(0,2,4,-1,0,4,5,0,0,1,10,0),He(0,3,5,-1,0,5,8,0,0,1,14,0),He(0,3,5,-1,0,6,10,0,0,1,18,0),He(0,4,5,-2,0,7,10,1,0,2,16,1),He(0,5,5,-3,0,8,10,1,0,3,14,2),He(0,5,6,-3,0,9,12,1,0,3,16,2),He(0,6,6,-3,0,10,14,1,0,4,18,3),He(0,6,7,-4,0,11,15,1,0,4,20,3),He(0,7,8,-4,0,12,17,2,0,5,22,4),He(0,7,8,-4,0,13,19,2,0,5,24,4),He(0,7,9,-4,0,14,21,2,0,5,26,4),He(0,8,9,-5,0,15,22,2,0,6,28,5),He(0,8,10,-5,0,16,24,2,0,6,30,5),He(0,8,11,-5,0,17,26,2,0,6,32,5),He(0,9,11,-5,0,18,28,2,0,7,34,6),He(0,9,12,-6,0,19,29,2,0,7,36,6),He(0,10,13,-6,0,20,31,3,0,8,38,7),He(0,10,13,-6,0,21,33,3,0,8,40,7),He(0,10,14,-6,0,22,35,3,0,8,42,7),He(0,11,14,-7,0,23,36,3,0,9,44,8),He(0,11,15,-7,0,24,38,3,0,9,46,8)],Ng={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)"},yh={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Xl(e){return`${Math.round(e)}ms`}function Pg(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function Rg(e){const t={...Ng,...e.easing},n={...yh,...e.duration};return{getAutoHeightDuration:Pg,create:(i=["all"],s={})=>{const{duration:a=n.standard,easing:o=t.easeInOut,delay:u=0,...l}=s;return(Array.isArray(i)?i:[i]).map(d=>`${d} ${typeof a=="string"?a:Xl(a)} ${o} ${typeof u=="string"?u:Xl(u)}`).join(",")},...e,easing:t,duration:n}}const Lg={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Og(e){return xn(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Th(e={}){const t={...e};function n(r){const i=Object.entries(r);for(let s=0;s<i.length;s++){const[a,o]=i[s];!Og(o)||a.startsWith("unstable_")?delete r[a]:xn(o)&&(r[a]={...o},n(r[a]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
10
10
|
|
|
11
11
|
const theme = ${JSON.stringify(t,null,2)};
|
|
12
12
|
|
|
13
13
|
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
14
14
|
theme.transitions = createTransitions(theme.transitions || {});
|
|
15
15
|
|
|
16
|
-
export default theme;`}function Wr(e={},...t){const{breakpoints:n,mixins:r={},spacing:o,palette:s={},transitions:i={},typography:a={},shape:l,...u}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(kt(20));const d=So(s),p=Co(e);let f=Be(p,{mixins:ou(p.breakpoints,r),palette:d,shadows:uu.slice(),typography:iu(d,a),transitions:hu(i),zIndex:{...mu}});return f=Be(f,u),f=t.reduce((m,g)=>Be(m,g),f),f.unstable_sxConfig={...pr,...u?.unstable_sxConfig},f.unstable_sx=function(g){return zt({sx:g,theme:this})},f.toRuntimeSource=yi,f}function gu(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 yu=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=gu(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function bi(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function xi(e){return e==="dark"?yu:[]}function bu(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...o}=e,s=So(t);return{palette:s,opacity:{...bi(s.mode),...n},overlays:r||xi(s.mode),...o}}function xu(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 vu=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],Su=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let s=o;if(o==="class"&&(s=".%s"),o==="data"&&(s="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(s=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const i={};return vu(e.cssVarPrefix).forEach(a=>{i[a]=n[a],delete n[a]}),s==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:i}}:s?{[s.replace("%s",t)]:i,[`${r}, ${s.replace("%s",t)}`]:n}:{[r]:{...n,...i}}}if(s&&s!=="media")return`${r}, ${s.replace("%s",String(t))}`}else if(t){if(s==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(s)return s.replace("%s",String(t))}return r};function Cu(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function I(e,t,n){!e[t]&&n&&(e[t]=n)}function tn(e){return typeof e!="string"||!e.startsWith("hsl")?e:pi(e)}function et(e,t){`${t}Channel`in e||(e[`${t}Channel`]=en(tn(e[t])))}function wu(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Qe=e=>{try{return e()}catch{}},ku=(e="mui")=>pe.unstable_createGetCssVar(e);function Or(e,t,n,r){if(!t)return;t=t===!0?{}:t;const o=r==="dark"?"dark":"light";if(!n){e[r]=bu({...t,palette:{mode:o,...t?.palette}});return}const{palette:s,...i}=Wr({...n,palette:{mode:o,...t?.palette}});return e[r]={...t,palette:s,opacity:{...bi(o),...t?.opacity},overlays:t?.overlays||xi(o)},i}function Iu(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:s="mui",shouldSkipGeneratingVar:i=xu,colorSchemeSelector:a=n.light&&n.dark?"media":void 0,rootSelector:l=":root",...u}=e,d=Object.keys(n)[0],p=r||(n.light&&d!=="light"?"light":d),f=ku(s),{[p]:m,light:g,dark:b,...x}=n,v={...x};let S=m;if((p==="dark"&&!("dark"in n)||p==="light"&&!("light"in n))&&(S=!0),!S)throw new Error(kt(21,p));const C=Or(v,S,u,p);g&&!v.light&&Or(v,g,void 0,"light"),b&&!v.dark&&Or(v,b,void 0,"dark");let k={defaultColorScheme:p,...C,cssVarPrefix:s,colorSchemeSelector:a,rootSelector:l,getCssVar:f,colorSchemes:v,font:{...Yc(C.typography),...C.font},spacing:wu(u.spacing)};Object.keys(k.colorSchemes).forEach(q=>{const y=k.colorSchemes[q].palette,R=A=>{const L=A.split("-"),$=L[1],W=L[2];return f(A,y[$][W])};if(y.mode==="light"&&(I(y.common,"background","#fff"),I(y.common,"onBackground","#000")),y.mode==="dark"&&(I(y.common,"background","#000"),I(y.common,"onBackground","#fff")),Cu(y,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),y.mode==="light"){I(y.Alert,"errorColor",ee(y.error.light,.6)),I(y.Alert,"infoColor",ee(y.info.light,.6)),I(y.Alert,"successColor",ee(y.success.light,.6)),I(y.Alert,"warningColor",ee(y.warning.light,.6)),I(y.Alert,"errorFilledBg",R("palette-error-main")),I(y.Alert,"infoFilledBg",R("palette-info-main")),I(y.Alert,"successFilledBg",R("palette-success-main")),I(y.Alert,"warningFilledBg",R("palette-warning-main")),I(y.Alert,"errorFilledColor",Qe(()=>y.getContrastText(y.error.main))),I(y.Alert,"infoFilledColor",Qe(()=>y.getContrastText(y.info.main))),I(y.Alert,"successFilledColor",Qe(()=>y.getContrastText(y.success.main))),I(y.Alert,"warningFilledColor",Qe(()=>y.getContrastText(y.warning.main))),I(y.Alert,"errorStandardBg",te(y.error.light,.9)),I(y.Alert,"infoStandardBg",te(y.info.light,.9)),I(y.Alert,"successStandardBg",te(y.success.light,.9)),I(y.Alert,"warningStandardBg",te(y.warning.light,.9)),I(y.Alert,"errorIconColor",R("palette-error-main")),I(y.Alert,"infoIconColor",R("palette-info-main")),I(y.Alert,"successIconColor",R("palette-success-main")),I(y.Alert,"warningIconColor",R("palette-warning-main")),I(y.AppBar,"defaultBg",R("palette-grey-100")),I(y.Avatar,"defaultBg",R("palette-grey-400")),I(y.Button,"inheritContainedBg",R("palette-grey-300")),I(y.Button,"inheritContainedHoverBg",R("palette-grey-A100")),I(y.Chip,"defaultBorder",R("palette-grey-400")),I(y.Chip,"defaultAvatarColor",R("palette-grey-700")),I(y.Chip,"defaultIconColor",R("palette-grey-700")),I(y.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),I(y.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),I(y.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),I(y.LinearProgress,"primaryBg",te(y.primary.main,.62)),I(y.LinearProgress,"secondaryBg",te(y.secondary.main,.62)),I(y.LinearProgress,"errorBg",te(y.error.main,.62)),I(y.LinearProgress,"infoBg",te(y.info.main,.62)),I(y.LinearProgress,"successBg",te(y.success.main,.62)),I(y.LinearProgress,"warningBg",te(y.warning.main,.62)),I(y.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.11)`),I(y.Slider,"primaryTrack",te(y.primary.main,.62)),I(y.Slider,"secondaryTrack",te(y.secondary.main,.62)),I(y.Slider,"errorTrack",te(y.error.main,.62)),I(y.Slider,"infoTrack",te(y.info.main,.62)),I(y.Slider,"successTrack",te(y.success.main,.62)),I(y.Slider,"warningTrack",te(y.warning.main,.62));const A=Rn(y.background.default,.8);I(y.SnackbarContent,"bg",A),I(y.SnackbarContent,"color",Qe(()=>y.getContrastText(A))),I(y.SpeedDialAction,"fabHoverBg",Rn(y.background.paper,.15)),I(y.StepConnector,"border",R("palette-grey-400")),I(y.StepContent,"border",R("palette-grey-400")),I(y.Switch,"defaultColor",R("palette-common-white")),I(y.Switch,"defaultDisabledColor",R("palette-grey-100")),I(y.Switch,"primaryDisabledColor",te(y.primary.main,.62)),I(y.Switch,"secondaryDisabledColor",te(y.secondary.main,.62)),I(y.Switch,"errorDisabledColor",te(y.error.main,.62)),I(y.Switch,"infoDisabledColor",te(y.info.main,.62)),I(y.Switch,"successDisabledColor",te(y.success.main,.62)),I(y.Switch,"warningDisabledColor",te(y.warning.main,.62)),I(y.TableCell,"border",te(En(y.divider,1),.88)),I(y.Tooltip,"bg",En(y.grey[700],.92))}if(y.mode==="dark"){I(y.Alert,"errorColor",te(y.error.light,.6)),I(y.Alert,"infoColor",te(y.info.light,.6)),I(y.Alert,"successColor",te(y.success.light,.6)),I(y.Alert,"warningColor",te(y.warning.light,.6)),I(y.Alert,"errorFilledBg",R("palette-error-dark")),I(y.Alert,"infoFilledBg",R("palette-info-dark")),I(y.Alert,"successFilledBg",R("palette-success-dark")),I(y.Alert,"warningFilledBg",R("palette-warning-dark")),I(y.Alert,"errorFilledColor",Qe(()=>y.getContrastText(y.error.dark))),I(y.Alert,"infoFilledColor",Qe(()=>y.getContrastText(y.info.dark))),I(y.Alert,"successFilledColor",Qe(()=>y.getContrastText(y.success.dark))),I(y.Alert,"warningFilledColor",Qe(()=>y.getContrastText(y.warning.dark))),I(y.Alert,"errorStandardBg",ee(y.error.light,.9)),I(y.Alert,"infoStandardBg",ee(y.info.light,.9)),I(y.Alert,"successStandardBg",ee(y.success.light,.9)),I(y.Alert,"warningStandardBg",ee(y.warning.light,.9)),I(y.Alert,"errorIconColor",R("palette-error-main")),I(y.Alert,"infoIconColor",R("palette-info-main")),I(y.Alert,"successIconColor",R("palette-success-main")),I(y.Alert,"warningIconColor",R("palette-warning-main")),I(y.AppBar,"defaultBg",R("palette-grey-900")),I(y.AppBar,"darkBg",R("palette-background-paper")),I(y.AppBar,"darkColor",R("palette-text-primary")),I(y.Avatar,"defaultBg",R("palette-grey-600")),I(y.Button,"inheritContainedBg",R("palette-grey-800")),I(y.Button,"inheritContainedHoverBg",R("palette-grey-700")),I(y.Chip,"defaultBorder",R("palette-grey-700")),I(y.Chip,"defaultAvatarColor",R("palette-grey-300")),I(y.Chip,"defaultIconColor",R("palette-grey-300")),I(y.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),I(y.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),I(y.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),I(y.LinearProgress,"primaryBg",ee(y.primary.main,.5)),I(y.LinearProgress,"secondaryBg",ee(y.secondary.main,.5)),I(y.LinearProgress,"errorBg",ee(y.error.main,.5)),I(y.LinearProgress,"infoBg",ee(y.info.main,.5)),I(y.LinearProgress,"successBg",ee(y.success.main,.5)),I(y.LinearProgress,"warningBg",ee(y.warning.main,.5)),I(y.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.13)`),I(y.Slider,"primaryTrack",ee(y.primary.main,.5)),I(y.Slider,"secondaryTrack",ee(y.secondary.main,.5)),I(y.Slider,"errorTrack",ee(y.error.main,.5)),I(y.Slider,"infoTrack",ee(y.info.main,.5)),I(y.Slider,"successTrack",ee(y.success.main,.5)),I(y.Slider,"warningTrack",ee(y.warning.main,.5));const A=Rn(y.background.default,.98);I(y.SnackbarContent,"bg",A),I(y.SnackbarContent,"color",Qe(()=>y.getContrastText(A))),I(y.SpeedDialAction,"fabHoverBg",Rn(y.background.paper,.15)),I(y.StepConnector,"border",R("palette-grey-600")),I(y.StepContent,"border",R("palette-grey-600")),I(y.Switch,"defaultColor",R("palette-grey-300")),I(y.Switch,"defaultDisabledColor",R("palette-grey-600")),I(y.Switch,"primaryDisabledColor",ee(y.primary.main,.55)),I(y.Switch,"secondaryDisabledColor",ee(y.secondary.main,.55)),I(y.Switch,"errorDisabledColor",ee(y.error.main,.55)),I(y.Switch,"infoDisabledColor",ee(y.info.main,.55)),I(y.Switch,"successDisabledColor",ee(y.success.main,.55)),I(y.Switch,"warningDisabledColor",ee(y.warning.main,.55)),I(y.TableCell,"border",ee(En(y.divider,1),.68)),I(y.Tooltip,"bg",En(y.grey[700],.92))}et(y.background,"default"),et(y.background,"paper"),et(y.common,"background"),et(y.common,"onBackground"),et(y,"divider"),Object.keys(y).forEach(A=>{const L=y[A];A!=="tonalOffset"&&L&&typeof L=="object"&&(L.main&&I(y[A],"mainChannel",en(tn(L.main))),L.light&&I(y[A],"lightChannel",en(tn(L.light))),L.dark&&I(y[A],"darkChannel",en(tn(L.dark))),L.contrastText&&I(y[A],"contrastTextChannel",en(tn(L.contrastText))),A==="text"&&(et(y[A],"primary"),et(y[A],"secondary")),A==="action"&&(L.active&&et(y[A],"active"),L.selected&&et(y[A],"selected")))})}),k=t.reduce((q,y)=>Be(q,y),k);const w={prefix:s,disableCssColorScheme:o,shouldSkipGeneratingVar:i,getSelector:Su(k)},{vars:E,generateThemeVars:O,generateStyleSheets:B}=Qc(k,w);return k.vars=E,Object.entries(k.colorSchemes[k.defaultColorScheme]).forEach(([q,y])=>{k[q]=y}),k.generateThemeVars=O,k.generateStyleSheets=B,k.generateSpacing=function(){return pe.createSpacing(u.spacing,go(this))},k.getColorSchemeSelector=Xc(a),k.spacing=k.generateSpacing(),k.shouldSkipGeneratingVar=i,k.unstable_sxConfig={...pr,...u?.unstable_sxConfig},k.unstable_sx=function(y){return zt({sx:y,theme:this})},k.toRuntimeSource=yi,k}function xs(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:So({...n===!0?{}:n.palette,mode:t})})}function Pu(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:s=n?.mode,...i}=e,a=s||"light",l=o?.[a],u={...o,...n?{[a]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return Wr(e,...t);let d=n;"palette"in e||u[a]&&(u[a]!==!0?d=u[a].palette:a==="dark"&&(d={mode:"dark"}));const p=Wr({...e,palette:d},...t);return p.defaultColorScheme=a,p.colorSchemes=u,p.palette.mode==="light"&&(p.colorSchemes.light={...u.light!==!0&&u.light,palette:p.palette},xs(p,"dark",u.dark)),p.palette.mode==="dark"&&(p.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:p.palette},xs(p,"light",u.light)),p}return!n&&!("light"in u)&&a==="light"&&(u.light=!0),Iu({...i,colorSchemes:u,defaultColorScheme:a,...typeof r!="boolean"&&r},...t)}const wo=Pu(),ko="$$material";function Tu(){const e=pe.useTheme(wo);return e[ko]||e}function ju(e){const{variants:t,...n}=e,r={variants:t,style:ms(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=ms(o.style))}),r}const Eu=Co();function ht(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Ru(e){return e?(t,n)=>n[e]:null}function _u(e,t,n){e.theme=Nu(e.theme)?n:e.theme[t]||e.theme}function Ln(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(r=>Ln(e,r));if(Array.isArray(n?.variants)){let r;if(n.isProcessed)r=n.style;else{const{variants:o,...s}=n;r=s}return vi(e,n.variants,[r])}return n?.isProcessed?n.style:n}function vi(e,t,n=[]){let r;e:for(let o=0;o<t.length;o+=1){const s=t[o];if(typeof s.props=="function"){if(r??={...e,...e.ownerState,ownerState:e.ownerState},!s.props(r))continue}else for(const i in s.props)if(e[i]!==s.props[i]&&e.ownerState?.[i]!==s.props[i])continue e;typeof s.style=="function"?(r??={...e,...e.ownerState,ownerState:e.ownerState},n.push(s.style(r))):n.push(s.style)}return n}function Au(e={}){const{themeId:t,defaultTheme:n=Eu,rootShouldForwardProp:r=ht,slotShouldForwardProp:o=ht}=e;function s(a){_u(a,t,n)}return(a,l={})=>{$c(a,w=>w.filter(E=>E!==zt));const{name:u,slot:d,skipVariantsResolver:p,skipSx:f,overridesResolver:m=Ru(Lu(d)),...g}=l,b=p!==void 0?p:d&&d!=="Root"&&d!=="root"||!1,x=f||!1;let v=ht;d==="Root"||d==="root"?v=r:d?v=o:Mu(a)&&(v=void 0);const S=Dc(a,{shouldForwardProp:v,label:Ou(),...g}),C=w=>{if(w.__emotion_real===w)return w;if(typeof w=="function")return function(O){return Ln(O,w)};if(st(w)){const E=ju(w);return E.variants?function(B){return Ln(B,E)}:E.style}return w},k=(...w)=>{const E=[],O=w.map(C),B=[];if(E.push(s),u&&m&&B.push(function(A){const $=A.theme.components?.[u]?.styleOverrides;if(!$)return null;const W={};for(const G in $)W[G]=Ln(A,$[G]);return m(A,W)}),u&&!b&&B.push(function(A){const $=A.theme?.components?.[u]?.variants;return $?vi(A,$):null}),x||B.push(zt),Array.isArray(O[0])){const R=O.shift(),A=new Array(E.length).fill(""),L=new Array(B.length).fill("");let $;$=[...A,...R,...L],$.raw=[...A,...R.raw,...L],E.unshift($)}const q=[...E,...O,...B],y=S(...q);return a.muiName&&(y.muiName=a.muiName),y};return S.withConfig&&(k.withConfig=S.withConfig),k}}function Ou(e,t){return void 0}function Nu(e){for(const t in e)return!1;return!0}function Mu(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Lu(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Du(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Io=e=>Du(e)&&e!=="classes",ae=Au({themeId:ko,defaultTheme:wo,rootShouldForwardProp:Io}),Po=pe.unstable_memoTheme;function Wt(e){return Gc(e)}function Kt(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=Gt(e,o,n)}),r}function $u(e){return Gt("MuiSvgIcon",e)}Kt("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Bu=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${Ke(t)}`,`fontSize${Ke(n)}`]};return yn(o,$u,r)},qu=ae("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Ke(n.color)}`],t[`fontSize${Ke(n.fontSize)}`]]}})(Po(({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}}]}))),Kr=P.forwardRef(function(t,n){const r=Wt({props:t,name:"MuiSvgIcon"}),{children:o,className:s,color:i="inherit",component:a="svg",fontSize:l="medium",htmlColor:u,inheritViewBox:d=!1,titleAccess:p,viewBox:f="0 0 24 24",...m}=r,g=P.isValidElement(o)&&o.type==="svg",b={...r,color:i,component:a,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:f,hasSvgAsChild:g},x={};d||(x.viewBox=f);const v=Bu(b);return c.jsxs(qu,{as:a,className:fe(v.root,s),focusable:"false",color:u,"aria-hidden":p?void 0:!0,role:p?"img":void 0,ref:n,...x,...m,...g&&o.props,ownerState:b,children:[g?o.props.children:o,p?c.jsx("title",{children:p}):null]})});Kr.muiName="SvgIcon";function oe(e,t){function n(r,o){return c.jsx(Kr,{"data-testid":void 0,ref:o,...r,children:e})}return n.muiName=Kr.muiName,P.memo(P.forwardRef(n))}function Vu(e){const{controlled:t,default:n}=e,{current:r}=P.useRef(t!==void 0),[o,s]=P.useState(n),i=r?t:o,a=P.useCallback(l=>{r||s(l)},[]);return[i,a]}function Dn(e){const t=P.useRef(e);return Bc(()=>{t.current=e}),P.useRef((...n)=>(0,t.current)(...n)).current}function Gn(...e){const t=P.useRef(void 0),n=P.useCallback(r=>{const o=e.map(s=>{if(s==null)return null;if(typeof s=="function"){const i=s,a=i(r);return typeof a=="function"?a:()=>{i(null)}}return s.current=r,()=>{s.current=null}});return()=>{o.forEach(s=>s?.())}},e);return P.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function Fu(e,t){const n=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&n>=65&&n<=90&&typeof t=="function"}function zu(e,t){if(!e)return t;function n(i,a){const l={};return Object.keys(a).forEach(u=>{Fu(u,a[u])&&typeof i[u]=="function"&&(l[u]=(...d)=>{i[u](...d),a[u](...d)})}),l}if(typeof e=="function"||typeof t=="function")return i=>{const a=typeof t=="function"?t(i):t,l=typeof e=="function"?e({...i,...a}):e,u=fe(i?.className,a?.className,l?.className),d=n(l,a);return{...a,...l,...d,...!!u&&{className:u},...a?.style&&l?.style&&{style:{...a.style,...l.style}},...a?.sx&&l?.sx&&{sx:[...Array.isArray(a.sx)?a.sx:[a.sx],...Array.isArray(l.sx)?l.sx:[l.sx]]}}};const r=t,o=n(e,r),s=fe(r?.className,e?.className);return{...t,...e,...o,...!!s&&{className:s},...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 mr=oe(c.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"})),vn=oe(c.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"})),me="http://localhost/api/v0".replace(/\/+$/,"");class ft{constructor(t,n=me,r=de){this.basePath=n,this.axios=r,t&&(this.configuration=t,this.basePath=t.basePath??n)}configuration}class Hu extends Error{constructor(t,n){super(n),this.field=t,this.name="RequiredError"}}const be={},xe="https://example.com",U=function(e,t,n){if(n==null)throw new Hu(t,`Required parameter ${t} was null or undefined when calling ${e}.`)};function Qr(e,t,n=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(r=>Qr(e,r,n)):Object.keys(t).forEach(r=>Qr(e,t[r],`${n}${n!==""?".":""}${r}`)):e.has(n)?e.append(n,t):e.set(n,t))}const ve=function(e,...t){const n=new URLSearchParams(e.search);Qr(n,t),e.search=n.toString()},Se=function(e){return e.pathname+e.search+e.hash},Ce=function(e,t,n,r){return(o=t,s=n)=>{const i={...e.options,url:(o.defaults.baseURL?"":r?.basePath??s)+e.url};return o.request(i)}},Uu=function(e){return{getConnection:async(t,n,r={})=>{U("getConnection","projectName",t),U("getConnection","connectionName",n);const o="/projects/{projectName}/connections/{connectionName}".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),s=new URL(o,xe);let i;e&&(i=e.baseOptions);const a={method:"GET",...i,...r},l={};ve(s,{});let d=i&&i.headers?i.headers:{};return a.headers={...l,...d,...r.headers},{url:Se(s),options:a}},getQuerydata:async(t,n,r,o,s={})=>{U("getQuerydata","projectName",t),U("getQuerydata","connectionName",n);const i="/projects/{projectName}/connections/{connectionName}/queryData".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),a=new URL(i,xe);let l;e&&(l=e.baseOptions);const u={method:"GET",...l,...s},d={},p={};r!==void 0&&(p.sqlStatement=r),o!==void 0&&(p.options=o),ve(a,p);let f=l&&l.headers?l.headers:{};return u.headers={...d,...f,...s.headers},{url:Se(a),options:u}},getSqlsource:async(t,n,r,o={})=>{U("getSqlsource","projectName",t),U("getSqlsource","connectionName",n);const s="/projects/{projectName}/connections/{connectionName}/sqlSource".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),i=new URL(s,xe);let a;e&&(a=e.baseOptions);const l={method:"GET",...a,...o},u={},d={};r!==void 0&&(d.sqlStatement=r),ve(i,d);let p=a&&a.headers?a.headers:{};return l.headers={...u,...p,...o.headers},{url:Se(i),options:l}},getTablesource:async(t,n,r,o,s={})=>{U("getTablesource","projectName",t),U("getTablesource","connectionName",n);const i="/projects/{projectName}/connections/{connectionName}/tableSource".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),a=new URL(i,xe);let l;e&&(l=e.baseOptions);const u={method:"GET",...l,...s},d={},p={};r!==void 0&&(p.tableKey=r),o!==void 0&&(p.tablePath=o),ve(a,p);let f=l&&l.headers?l.headers:{};return u.headers={...d,...f,...s.headers},{url:Se(a),options:u}},getTemporarytable:async(t,n,r,o={})=>{U("getTemporarytable","projectName",t),U("getTemporarytable","connectionName",n);const s="/projects/{projectName}/connections/{connectionName}/temporaryTable".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),i=new URL(s,xe);let a;e&&(a=e.baseOptions);const l={method:"GET",...a,...o},u={},d={};r!==void 0&&(d.sqlStatement=r),ve(i,d);let p=a&&a.headers?a.headers:{};return l.headers={...u,...p,...o.headers},{url:Se(i),options:l}},getTest:async(t,n,r={})=>{U("getTest","projectName",t),U("getTest","connectionName",n);const o="/projects/{projectName}/connections/{connectionName}/test".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),s=new URL(o,xe);let i;e&&(i=e.baseOptions);const a={method:"GET",...i,...r},l={};ve(s,{});let d=i&&i.headers?i.headers:{};return a.headers={...l,...d,...r.headers},{url:Se(s),options:a}},listConnections:async(t,n={})=>{U("listConnections","projectName",t);const r="/projects/{projectName}/connections".replace("{projectName}",encodeURIComponent(String(t))),o=new URL(r,xe);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},a={};ve(o,{});let u=s&&s.headers?s.headers:{};return i.headers={...a,...u,...n.headers},{url:Se(o),options:i}},listSchemas:async(t,n,r={})=>{U("listSchemas","projectName",t),U("listSchemas","connectionName",n);const o="/projects/{projectName}/connections/{connectionName}/schemas".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),s=new URL(o,xe);let i;e&&(i=e.baseOptions);const a={method:"GET",...i,...r},l={};ve(s,{});let d=i&&i.headers?i.headers:{};return a.headers={...l,...d,...r.headers},{url:Se(s),options:a}},listTables:async(t,n,r,o={})=>{U("listTables","projectName",t),U("listTables","connectionName",n),U("listTables","schemaName",r);const s="/projects/{projectName}/connections/{connectionName}/schemas/{schemaName}/tables".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))).replace("{schemaName}",encodeURIComponent(String(r))),i=new URL(s,xe);let a;e&&(a=e.baseOptions);const l={method:"GET",...a,...o},u={};ve(i,{});let p=a&&a.headers?a.headers:{};return l.headers={...u,...p,...o.headers},{url:Se(i),options:l}}}},tt=function(e){const t=Uu(e);return{async getConnection(n,r,o){const s=await t.getConnection(n,r,o),i=e?.serverIndex??0,a=be["ConnectionsApi.getConnection"]?.[i]?.url;return(l,u)=>Ce(s,de,me,e)(l,a||u)},async getQuerydata(n,r,o,s,i){const a=await t.getQuerydata(n,r,o,s,i),l=e?.serverIndex??0,u=be["ConnectionsApi.getQuerydata"]?.[l]?.url;return(d,p)=>Ce(a,de,me,e)(d,u||p)},async getSqlsource(n,r,o,s){const i=await t.getSqlsource(n,r,o,s),a=e?.serverIndex??0,l=be["ConnectionsApi.getSqlsource"]?.[a]?.url;return(u,d)=>Ce(i,de,me,e)(u,l||d)},async getTablesource(n,r,o,s,i){const a=await t.getTablesource(n,r,o,s,i),l=e?.serverIndex??0,u=be["ConnectionsApi.getTablesource"]?.[l]?.url;return(d,p)=>Ce(a,de,me,e)(d,u||p)},async getTemporarytable(n,r,o,s){const i=await t.getTemporarytable(n,r,o,s),a=e?.serverIndex??0,l=be["ConnectionsApi.getTemporarytable"]?.[a]?.url;return(u,d)=>Ce(i,de,me,e)(u,l||d)},async getTest(n,r,o){const s=await t.getTest(n,r,o),i=e?.serverIndex??0,a=be["ConnectionsApi.getTest"]?.[i]?.url;return(l,u)=>Ce(s,de,me,e)(l,a||u)},async listConnections(n,r){const o=await t.listConnections(n,r),s=e?.serverIndex??0,i=be["ConnectionsApi.listConnections"]?.[s]?.url;return(a,l)=>Ce(o,de,me,e)(a,i||l)},async listSchemas(n,r,o){const s=await t.listSchemas(n,r,o),i=e?.serverIndex??0,a=be["ConnectionsApi.listSchemas"]?.[i]?.url;return(l,u)=>Ce(s,de,me,e)(l,a||u)},async listTables(n,r,o,s){const i=await t.listTables(n,r,o,s),a=e?.serverIndex??0,l=be["ConnectionsApi.listTables"]?.[a]?.url;return(u,d)=>Ce(i,de,me,e)(u,l||d)}}};class Si extends ft{getConnection(t,n,r){return tt(this.configuration).getConnection(t,n,r).then(o=>o(this.axios,this.basePath))}getQuerydata(t,n,r,o,s){return tt(this.configuration).getQuerydata(t,n,r,o,s).then(i=>i(this.axios,this.basePath))}getSqlsource(t,n,r,o){return tt(this.configuration).getSqlsource(t,n,r,o).then(s=>s(this.axios,this.basePath))}getTablesource(t,n,r,o,s){return tt(this.configuration).getTablesource(t,n,r,o,s).then(i=>i(this.axios,this.basePath))}getTemporarytable(t,n,r,o){return tt(this.configuration).getTemporarytable(t,n,r,o).then(s=>s(this.axios,this.basePath))}getTest(t,n,r){return tt(this.configuration).getTest(t,n,r).then(o=>o(this.axios,this.basePath))}listConnections(t,n){return tt(this.configuration).listConnections(t,n).then(r=>r(this.axios,this.basePath))}listSchemas(t,n,r){return tt(this.configuration).listSchemas(t,n,r).then(o=>o(this.axios,this.basePath))}listTables(t,n,r,o){return tt(this.configuration).listTables(t,n,r,o).then(s=>s(this.axios,this.basePath))}}const Gu=function(e){return{listDatabases:async(t,n,r,o={})=>{U("listDatabases","projectName",t),U("listDatabases","packageName",n);const s="/projects/{projectName}/packages/{packageName}/databases".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))),i=new URL(s,xe);let a;e&&(a=e.baseOptions);const l={method:"GET",...a,...o},u={},d={};r!==void 0&&(d.versionId=r),ve(i,d);let p=a&&a.headers?a.headers:{};return l.headers={...u,...p,...o.headers},{url:Se(i),options:l}}}},Wu=function(e){const t=Gu(e);return{async listDatabases(n,r,o,s){const i=await t.listDatabases(n,r,o,s),a=e?.serverIndex??0,l=be["DatabasesApi.listDatabases"]?.[a]?.url;return(u,d)=>Ce(i,de,me,e)(u,l||d)}}};class Ku extends ft{listDatabases(t,n,r,o){return Wu(this.configuration).listDatabases(t,n,r,o).then(s=>s(this.axios,this.basePath))}}const Qu=function(e){return{getModel:async(t,n,r,o,s={})=>{U("getModel","projectName",t),U("getModel","packageName",n),U("getModel","path",r);const i="/projects/{projectName}/packages/{packageName}/models/{path}".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))).replace("{path}",encodeURIComponent(String(r))),a=new URL(i,xe);let l;e&&(l=e.baseOptions);const u={method:"GET",...l,...s},d={},p={};o!==void 0&&(p.versionId=o),ve(a,p);let f=l&&l.headers?l.headers:{};return u.headers={...d,...f,...s.headers},{url:Se(a),options:u}},listModels:async(t,n,r,o={})=>{U("listModels","projectName",t),U("listModels","packageName",n);const s="/projects/{projectName}/packages/{packageName}/models".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))),i=new URL(s,xe);let a;e&&(a=e.baseOptions);const l={method:"GET",...a,...o},u={},d={};r!==void 0&&(d.versionId=r),ve(i,d);let p=a&&a.headers?a.headers:{};return l.headers={...u,...p,...o.headers},{url:Se(i),options:l}}}},vs=function(e){const t=Qu(e);return{async getModel(n,r,o,s,i){const a=await t.getModel(n,r,o,s,i),l=e?.serverIndex??0,u=be["ModelsApi.getModel"]?.[l]?.url;return(d,p)=>Ce(a,de,me,e)(d,u||p)},async listModels(n,r,o,s){const i=await t.listModels(n,r,o,s),a=e?.serverIndex??0,l=be["ModelsApi.listModels"]?.[a]?.url;return(u,d)=>Ce(i,de,me,e)(u,l||d)}}};class fr extends ft{getModel(t,n,r,o,s){return vs(this.configuration).getModel(t,n,r,o,s).then(i=>i(this.axios,this.basePath))}listModels(t,n,r,o){return vs(this.configuration).listModels(t,n,r,o).then(s=>s(this.axios,this.basePath))}}const Yu=function(e){return{getNotebook:async(t,n,r,o,s={})=>{U("getNotebook","projectName",t),U("getNotebook","packageName",n),U("getNotebook","path",r);const i="/projects/{projectName}/packages/{packageName}/notebooks/{path}".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))).replace("{path}",encodeURIComponent(String(r))),a=new URL(i,xe);let l;e&&(l=e.baseOptions);const u={method:"GET",...l,...s},d={},p={};o!==void 0&&(p.versionId=o),ve(a,p);let f=l&&l.headers?l.headers:{};return u.headers={...d,...f,...s.headers},{url:Se(a),options:u}},listNotebooks:async(t,n,r,o={})=>{U("listNotebooks","projectName",t),U("listNotebooks","packageName",n);const s="/projects/{projectName}/packages/{packageName}/notebooks".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))),i=new URL(s,xe);let a;e&&(a=e.baseOptions);const l={method:"GET",...a,...o},u={},d={};r!==void 0&&(d.versionId=r),ve(i,d);let p=a&&a.headers?a.headers:{};return l.headers={...u,...p,...o.headers},{url:Se(i),options:l}}}},Ss=function(e){const t=Yu(e);return{async getNotebook(n,r,o,s,i){const a=await t.getNotebook(n,r,o,s,i),l=e?.serverIndex??0,u=be["NotebooksApi.getNotebook"]?.[l]?.url;return(d,p)=>Ce(a,de,me,e)(d,u||p)},async listNotebooks(n,r,o,s){const i=await t.listNotebooks(n,r,o,s),a=e?.serverIndex??0,l=be["NotebooksApi.listNotebooks"]?.[a]?.url;return(u,d)=>Ce(i,de,me,e)(u,l||d)}}};class Ci extends ft{getNotebook(t,n,r,o,s){return Ss(this.configuration).getNotebook(t,n,r,o,s).then(i=>i(this.axios,this.basePath))}listNotebooks(t,n,r,o){return Ss(this.configuration).listNotebooks(t,n,r,o).then(s=>s(this.axios,this.basePath))}}const Xu=function(e){return{getPackage:async(t,n,r,o,s={})=>{U("getPackage","projectName",t),U("getPackage","packageName",n);const i="/projects/{projectName}/packages/{packageName}".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))),a=new URL(i,xe);let l;e&&(l=e.baseOptions);const u={method:"GET",...l,...s},d={},p={};r!==void 0&&(p.versionId=r),o!==void 0&&(p.reload=o),ve(a,p);let f=l&&l.headers?l.headers:{};return u.headers={...d,...f,...s.headers},{url:Se(a),options:u}},listPackages:async(t,n={})=>{U("listPackages","projectName",t);const r="/projects/{projectName}/packages".replace("{projectName}",encodeURIComponent(String(t))),o=new URL(r,xe);let s;e&&(s=e.baseOptions);const i={method:"GET",...s,...n},a={};ve(o,{});let u=s&&s.headers?s.headers:{};return i.headers={...a,...u,...n.headers},{url:Se(o),options:i}}}},Cs=function(e){const t=Xu(e);return{async getPackage(n,r,o,s,i){const a=await t.getPackage(n,r,o,s,i),l=e?.serverIndex??0,u=be["PackagesApi.getPackage"]?.[l]?.url;return(d,p)=>Ce(a,de,me,e)(d,u||p)},async listPackages(n,r){const o=await t.listPackages(n,r),s=e?.serverIndex??0,i=be["PackagesApi.listPackages"]?.[s]?.url;return(a,l)=>Ce(o,de,me,e)(a,i||l)}}};class wi extends ft{getPackage(t,n,r,o,s){return Cs(this.configuration).getPackage(t,n,r,o,s).then(i=>i(this.axios,this.basePath))}listPackages(t,n){return Cs(this.configuration).listPackages(t,n).then(r=>r(this.axios,this.basePath))}}const Ju=function(e){return{getProject:async(t,n,r={})=>{U("getProject","projectName",t);const o="/projects/{projectName}".replace("{projectName}",encodeURIComponent(String(t))),s=new URL(o,xe);let i;e&&(i=e.baseOptions);const a={method:"GET",...i,...r},l={},u={};n!==void 0&&(u.reload=n),ve(s,u);let d=i&&i.headers?i.headers:{};return a.headers={...l,...d,...r.headers},{url:Se(s),options:a}},listProjects:async(t={})=>{const n="/projects",r=new URL(n,xe);let o;e&&(o=e.baseOptions);const s={method:"GET",...o,...t},i={};ve(r,{});let l=o&&o.headers?o.headers:{};return s.headers={...i,...l,...t.headers},{url:Se(r),options:s}}}},ws=function(e){const t=Ju(e);return{async getProject(n,r,o){const s=await t.getProject(n,r,o),i=e?.serverIndex??0,a=be["ProjectsApi.getProject"]?.[i]?.url;return(l,u)=>Ce(s,de,me,e)(l,a||u)},async listProjects(n){const r=await t.listProjects(n),o=e?.serverIndex??0,s=be["ProjectsApi.listProjects"]?.[o]?.url;return(i,a)=>Ce(r,de,me,e)(i,s||a)}}};class ki extends ft{getProject(t,n,r){return ws(this.configuration).getProject(t,n,r).then(o=>o(this.axios,this.basePath))}listProjects(t){return ws(this.configuration).listProjects(t).then(n=>n(this.axios,this.basePath))}}const Zu=function(e){return{executeQuery:async(t,n,r,o,s,i,a,l={})=>{U("executeQuery","projectName",t),U("executeQuery","packageName",n),U("executeQuery","path",r);const u="/projects/{projectName}/packages/{packageName}/queryResults/{path}".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))).replace("{path}",encodeURIComponent(String(r))),d=new URL(u,xe);let p;e&&(p=e.baseOptions);const f={method:"GET",...p,...l},m={},g={};o!==void 0&&(g.query=o),s!==void 0&&(g.sourceName=s),i!==void 0&&(g.queryName=i),a!==void 0&&(g.versionId=a),ve(d,g);let b=p&&p.headers?p.headers:{};return f.headers={...m,...b,...l.headers},{url:Se(d),options:f}}}},ed=function(e){const t=Zu(e);return{async executeQuery(n,r,o,s,i,a,l,u){const d=await t.executeQuery(n,r,o,s,i,a,l,u),p=e?.serverIndex??0,f=be["QueryresultsApi.executeQuery"]?.[p]?.url;return(m,g)=>Ce(d,de,me,e)(m,f||g)}}};class Ii extends ft{executeQuery(t,n,r,o,s,i,a,l){return ed(this.configuration).executeQuery(t,n,r,o,s,i,a,l).then(u=>u(this.axios,this.basePath))}}const td=function(e){return{listSchedules:async(t,n,r,o={})=>{U("listSchedules","projectName",t),U("listSchedules","packageName",n);const s="/projects/{projectName}/packages/{packageName}/schedules".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))),i=new URL(s,xe);let a;e&&(a=e.baseOptions);const l={method:"GET",...a,...o},u={},d={};r!==void 0&&(d.versionId=r),ve(i,d);let p=a&&a.headers?a.headers:{};return l.headers={...u,...p,...o.headers},{url:Se(i),options:l}}}},nd=function(e){const t=td(e);return{async listSchedules(n,r,o,s){const i=await t.listSchedules(n,r,o,s),a=e?.serverIndex??0,l=be["SchedulesApi.listSchedules"]?.[a]?.url;return(u,d)=>Ce(i,de,me,e)(u,l||d)}}};class rd extends ft{listSchedules(t,n,r,o){return nd(this.configuration).listSchedules(t,n,r,o).then(s=>s(this.axios,this.basePath))}}class Re{apiKey;username;password;accessToken;basePath;serverIndex;baseOptions;formDataCtor;constructor(t={}){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 Pi=[{id:"abap",name:"ABAP",import:()=>Promise.resolve().then(()=>require("./abap-Dwt2rH6y.cjs"))},{id:"actionscript-3",name:"ActionScript",import:()=>Promise.resolve().then(()=>require("./actionscript-3-mj8Uhnsc.cjs"))},{id:"ada",name:"Ada",import:()=>Promise.resolve().then(()=>require("./ada-DZM58Vqs.cjs"))},{id:"angular-html",name:"Angular HTML",import:()=>Promise.resolve().then(()=>require("./angular-html-BqlvNDNu.cjs")).then(e=>e.angularHtml)},{id:"angular-ts",name:"Angular TypeScript",import:()=>Promise.resolve().then(()=>require("./angular-ts-4ebgyujK.cjs"))},{id:"apache",name:"Apache Conf",import:()=>Promise.resolve().then(()=>require("./apache-D7v5fxtZ.cjs"))},{id:"apex",name:"Apex",import:()=>Promise.resolve().then(()=>require("./apex-4hrAnw0a.cjs"))},{id:"apl",name:"APL",import:()=>Promise.resolve().then(()=>require("./apl-BeeGx1jW.cjs"))},{id:"applescript",name:"AppleScript",import:()=>Promise.resolve().then(()=>require("./applescript-Cnd3Dxju.cjs"))},{id:"ara",name:"Ara",import:()=>Promise.resolve().then(()=>require("./ara-BQ2aGbFQ.cjs"))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>Promise.resolve().then(()=>require("./asciidoc-C6nYvw8K.cjs"))},{id:"asm",name:"Assembly",import:()=>Promise.resolve().then(()=>require("./asm-CQnBVCj-.cjs"))},{id:"astro",name:"Astro",import:()=>Promise.resolve().then(()=>require("./astro-UBxncqOW.cjs"))},{id:"awk",name:"AWK",import:()=>Promise.resolve().then(()=>require("./awk-DUx4h__E.cjs"))},{id:"ballerina",name:"Ballerina",import:()=>Promise.resolve().then(()=>require("./ballerina-CXlzbmzl.cjs"))},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>Promise.resolve().then(()=>require("./bat-DlMT9sut.cjs"))},{id:"beancount",name:"Beancount",import:()=>Promise.resolve().then(()=>require("./beancount-CyyiuUzM.cjs"))},{id:"berry",name:"Berry",aliases:["be"],import:()=>Promise.resolve().then(()=>require("./berry-B0EjuzrL.cjs"))},{id:"bibtex",name:"BibTeX",import:()=>Promise.resolve().then(()=>require("./bibtex-CfoG9xRq.cjs"))},{id:"bicep",name:"Bicep",import:()=>Promise.resolve().then(()=>require("./bicep-D6PH_9IY.cjs"))},{id:"blade",name:"Blade",import:()=>Promise.resolve().then(()=>require("./blade-DYqOCSTj.cjs"))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>Promise.resolve().then(()=>require("./bsl-zRqJRzLj.cjs"))},{id:"c",name:"C",import:()=>Promise.resolve().then(()=>require("./c-C4sXGJZM.cjs"))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>Promise.resolve().then(()=>require("./cadence-Dq2CYzXG.cjs"))},{id:"cairo",name:"Cairo",import:()=>Promise.resolve().then(()=>require("./cairo-C5yDOd-R.cjs"))},{id:"clarity",name:"Clarity",import:()=>Promise.resolve().then(()=>require("./clarity-ytMkUD5Q.cjs"))},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>Promise.resolve().then(()=>require("./clojure-B_Wv414H.cjs"))},{id:"cmake",name:"CMake",import:()=>Promise.resolve().then(()=>require("./cmake-TBUaQXYY.cjs"))},{id:"cobol",name:"COBOL",import:()=>Promise.resolve().then(()=>require("./cobol-D9bHhy8D.cjs"))},{id:"codeowners",name:"CODEOWNERS",import:()=>Promise.resolve().then(()=>require("./codeowners-QhPK6lIJ.cjs"))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>Promise.resolve().then(()=>require("./codeql-B7Q9tkDJ.cjs"))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>Promise.resolve().then(()=>require("./coffee-ZdyLosN6.cjs"))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>Promise.resolve().then(()=>require("./common-lisp-Ced3ctK5.cjs"))},{id:"coq",name:"Coq",import:()=>Promise.resolve().then(()=>require("./coq-BTRB4iqi.cjs"))},{id:"cpp",name:"C++",aliases:["c++"],import:()=>Promise.resolve().then(()=>require("./cpp-DgQ-zDub.cjs"))},{id:"crystal",name:"Crystal",import:()=>Promise.resolve().then(()=>require("./crystal-C5h1rMTi.cjs"))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>Promise.resolve().then(()=>require("./csharp-TKds-MhG.cjs"))},{id:"css",name:"CSS",import:()=>Promise.resolve().then(()=>require("./css-B0kbn78J.cjs"))},{id:"csv",name:"CSV",import:()=>Promise.resolve().then(()=>require("./csv-BVJjiaC3.cjs"))},{id:"cue",name:"CUE",import:()=>Promise.resolve().then(()=>require("./cue-Cz4J-rnd.cjs"))},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>Promise.resolve().then(()=>require("./cypher-DuKTiyez.cjs"))},{id:"d",name:"D",import:()=>Promise.resolve().then(()=>require("./d-BW9Wd7aK.cjs"))},{id:"dart",name:"Dart",import:()=>Promise.resolve().then(()=>require("./dart-CWs-er6b.cjs"))},{id:"dax",name:"DAX",import:()=>Promise.resolve().then(()=>require("./dax-CDxFL2Kb.cjs"))},{id:"desktop",name:"Desktop",import:()=>Promise.resolve().then(()=>require("./desktop-CFgo0jo7.cjs"))},{id:"diff",name:"Diff",import:()=>Promise.resolve().then(()=>require("./diff-BsEkKwI8.cjs"))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>Promise.resolve().then(()=>require("./docker-hwiw4W8I.cjs"))},{id:"dotenv",name:"dotEnv",import:()=>Promise.resolve().then(()=>require("./dotenv-CJ5o3G1C.cjs"))},{id:"dream-maker",name:"Dream Maker",import:()=>Promise.resolve().then(()=>require("./dream-maker-DBharE9Q.cjs"))},{id:"edge",name:"Edge",import:()=>Promise.resolve().then(()=>require("./edge-D4UQJJI4.cjs"))},{id:"elixir",name:"Elixir",import:()=>Promise.resolve().then(()=>require("./elixir-Drlan-oo.cjs"))},{id:"elm",name:"Elm",import:()=>Promise.resolve().then(()=>require("./elm-BcZHvJ8F.cjs"))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>Promise.resolve().then(()=>require("./emacs-lisp-CDDyFsvQ.cjs"))},{id:"erb",name:"ERB",import:()=>Promise.resolve().then(()=>require("./erb-CnncUHI5.cjs"))},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>Promise.resolve().then(()=>require("./erlang-3VgdrQXV.cjs"))},{id:"fennel",name:"Fennel",import:()=>Promise.resolve().then(()=>require("./fennel-BvcDRFAV.cjs"))},{id:"fish",name:"Fish",import:()=>Promise.resolve().then(()=>require("./fish-CnamI0Ar.cjs"))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>Promise.resolve().then(()=>require("./fluent-DFpT66K8.cjs"))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>Promise.resolve().then(()=>require("./fortran-fixed-form-BEveYJYo.cjs"))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>Promise.resolve().then(()=>require("./fortran-free-form-IaGrWIda.cjs"))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>Promise.resolve().then(()=>require("./fsharp-JIb2RzF4.cjs"))},{id:"gdresource",name:"GDResource",import:()=>Promise.resolve().then(()=>require("./gdresource-YnzGv0RG.cjs"))},{id:"gdscript",name:"GDScript",import:()=>Promise.resolve().then(()=>require("./gdscript-5N_43TPQ.cjs"))},{id:"gdshader",name:"GDShader",import:()=>Promise.resolve().then(()=>require("./gdshader-Bl85Hrm5.cjs"))},{id:"genie",name:"Genie",import:()=>Promise.resolve().then(()=>require("./genie-DGsxMAbQ.cjs"))},{id:"gherkin",name:"Gherkin",import:()=>Promise.resolve().then(()=>require("./gherkin-CVV6nEUH.cjs"))},{id:"git-commit",name:"Git Commit Message",import:()=>Promise.resolve().then(()=>require("./git-commit-CBAAAmmS.cjs"))},{id:"git-rebase",name:"Git Rebase Message",import:()=>Promise.resolve().then(()=>require("./git-rebase-teQnnXpn.cjs"))},{id:"gleam",name:"Gleam",import:()=>Promise.resolve().then(()=>require("./gleam-nR4mjrhK.cjs"))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>Promise.resolve().then(()=>require("./glimmer-js-DAfoXdQ-.cjs"))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>Promise.resolve().then(()=>require("./glimmer-ts-CeO7A1-5.cjs"))},{id:"glsl",name:"GLSL",import:()=>Promise.resolve().then(()=>require("./glsl-RcB3ToOh.cjs"))},{id:"gnuplot",name:"Gnuplot",import:()=>Promise.resolve().then(()=>require("./gnuplot-CurtDYoJ.cjs"))},{id:"go",name:"Go",import:()=>Promise.resolve().then(()=>require("./go-CM9_GlwL.cjs"))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>Promise.resolve().then(()=>require("./graphql-DWzZPj_V.cjs"))},{id:"groovy",name:"Groovy",import:()=>Promise.resolve().then(()=>require("./groovy-BaVp9Il5.cjs"))},{id:"hack",name:"Hack",import:()=>Promise.resolve().then(()=>require("./hack-DDrvhASj.cjs"))},{id:"haml",name:"Ruby Haml",import:()=>Promise.resolve().then(()=>require("./haml-BK3-xJKV.cjs"))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>Promise.resolve().then(()=>require("./handlebars-DjnxWdl9.cjs"))},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>Promise.resolve().then(()=>require("./haskell-suhyCHEm.cjs"))},{id:"haxe",name:"Haxe",import:()=>Promise.resolve().then(()=>require("./haxe-BIQU1qHi.cjs"))},{id:"hcl",name:"HashiCorp HCL",import:()=>Promise.resolve().then(()=>require("./hcl-CbQ1yCnz.cjs"))},{id:"hjson",name:"Hjson",import:()=>Promise.resolve().then(()=>require("./hjson-Ddklb4QM.cjs"))},{id:"hlsl",name:"HLSL",import:()=>Promise.resolve().then(()=>require("./hlsl-B4NkiBfC.cjs"))},{id:"html",name:"HTML",import:()=>Promise.resolve().then(()=>require("./html-DiyIZFpA.cjs"))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>Promise.resolve().then(()=>require("./html-derivative-m27xHPNF.cjs"))},{id:"http",name:"HTTP",import:()=>Promise.resolve().then(()=>require("./http-B4wR56ug.cjs"))},{id:"hxml",name:"HXML",import:()=>Promise.resolve().then(()=>require("./hxml-Bv32SKqg.cjs"))},{id:"hy",name:"Hy",import:()=>Promise.resolve().then(()=>require("./hy-DpyTdO3T.cjs"))},{id:"imba",name:"Imba",import:()=>Promise.resolve().then(()=>require("./imba-B0C0YBnY.cjs"))},{id:"ini",name:"INI",aliases:["properties"],import:()=>Promise.resolve().then(()=>require("./ini-CymULaw_.cjs"))},{id:"java",name:"Java",import:()=>Promise.resolve().then(()=>require("./java-Bn1Lvoni.cjs"))},{id:"javascript",name:"JavaScript",aliases:["js"],import:()=>Promise.resolve().then(()=>require("./javascript-Bnnicc83.cjs"))},{id:"jinja",name:"Jinja",import:()=>Promise.resolve().then(()=>require("./jinja-D8wWNdMe.cjs"))},{id:"jison",name:"Jison",import:()=>Promise.resolve().then(()=>require("./jison-f6CjvOiG.cjs"))},{id:"json",name:"JSON",import:()=>Promise.resolve().then(()=>require("./json-y-J1j5EW.cjs"))},{id:"json5",name:"JSON5",import:()=>Promise.resolve().then(()=>require("./json5-CzvlWgZ7.cjs"))},{id:"jsonc",name:"JSON with Comments",import:()=>Promise.resolve().then(()=>require("./jsonc-BnhWfmQw.cjs"))},{id:"jsonl",name:"JSON Lines",import:()=>Promise.resolve().then(()=>require("./jsonl-BbGkWPJz.cjs"))},{id:"jsonnet",name:"Jsonnet",import:()=>Promise.resolve().then(()=>require("./jsonnet-Bn--UDZ1.cjs"))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>Promise.resolve().then(()=>require("./jssm-4CSVp8lc.cjs"))},{id:"jsx",name:"JSX",import:()=>Promise.resolve().then(()=>require("./jsx-D8YwVp-7.cjs"))},{id:"julia",name:"Julia",aliases:["jl"],import:()=>Promise.resolve().then(()=>require("./julia-CPt_7dt8.cjs"))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>Promise.resolve().then(()=>require("./kotlin-DDI6myF6.cjs"))},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>Promise.resolve().then(()=>require("./kusto-OZxALJZT.cjs"))},{id:"latex",name:"LaTeX",import:()=>Promise.resolve().then(()=>require("./latex-C1zmrAP3.cjs"))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>Promise.resolve().then(()=>require("./lean-D1iY-35j.cjs"))},{id:"less",name:"Less",import:()=>Promise.resolve().then(()=>require("./less-DIaY7vQJ.cjs"))},{id:"liquid",name:"Liquid",import:()=>Promise.resolve().then(()=>require("./liquid-mYFf3Ubk.cjs"))},{id:"log",name:"Log file",import:()=>Promise.resolve().then(()=>require("./log-BIXUeBaj.cjs"))},{id:"logo",name:"Logo",import:()=>Promise.resolve().then(()=>require("./logo-B2d3b27P.cjs"))},{id:"lua",name:"Lua",import:()=>Promise.resolve().then(()=>require("./lua-BNycEOCj.cjs"))},{id:"luau",name:"Luau",import:()=>Promise.resolve().then(()=>require("./luau-CvqAeq4F.cjs"))},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>Promise.resolve().then(()=>require("./make-Oob5Z9Pk.cjs"))},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>Promise.resolve().then(()=>require("./markdown-BGBuj4LZ.cjs"))},{id:"marko",name:"Marko",import:()=>Promise.resolve().then(()=>require("./marko-orX0YPzY.cjs"))},{id:"matlab",name:"MATLAB",import:()=>Promise.resolve().then(()=>require("./matlab-CbN2rF6P.cjs"))},{id:"mdc",name:"MDC",import:()=>Promise.resolve().then(()=>require("./mdc-BNCAtGbK.cjs"))},{id:"mdx",name:"MDX",import:()=>Promise.resolve().then(()=>require("./mdx-Cl31h8mi.cjs"))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>Promise.resolve().then(()=>require("./mermaid-CSogK_LM.cjs"))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>Promise.resolve().then(()=>require("./mipsasm-BseoYJQp.cjs"))},{id:"mojo",name:"Mojo",import:()=>Promise.resolve().then(()=>require("./mojo-D8QAG3Ze.cjs"))},{id:"move",name:"Move",import:()=>Promise.resolve().then(()=>require("./move-DaBrcjat.cjs"))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>Promise.resolve().then(()=>require("./narrat-oOfAO4q8.cjs"))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>Promise.resolve().then(()=>require("./nextflow-BxJSKvPb.cjs"))},{id:"nginx",name:"Nginx",import:()=>Promise.resolve().then(()=>require("./nginx-CWVY90PN.cjs"))},{id:"nim",name:"Nim",import:()=>Promise.resolve().then(()=>require("./nim-CwodQ6jZ.cjs"))},{id:"nix",name:"Nix",import:()=>Promise.resolve().then(()=>require("./nix-DNME0Ea7.cjs"))},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>Promise.resolve().then(()=>require("./nushell-DI9Z3l3M.cjs"))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>Promise.resolve().then(()=>require("./objective-c-DVx8Rcni.cjs"))},{id:"objective-cpp",name:"Objective-C++",import:()=>Promise.resolve().then(()=>require("./objective-cpp-s6XI7Jvk.cjs"))},{id:"ocaml",name:"OCaml",import:()=>Promise.resolve().then(()=>require("./ocaml-kUzDDUf2.cjs"))},{id:"pascal",name:"Pascal",import:()=>Promise.resolve().then(()=>require("./pascal-D509_I72.cjs"))},{id:"perl",name:"Perl",import:()=>Promise.resolve().then(()=>require("./perl-CzmOInqo.cjs"))},{id:"php",name:"PHP",import:()=>Promise.resolve().then(()=>require("./php-YwMoY7CJ.cjs"))},{id:"plsql",name:"PL/SQL",import:()=>Promise.resolve().then(()=>require("./plsql-C_qH_YOK.cjs"))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>Promise.resolve().then(()=>require("./po-CBsLQIcu.cjs"))},{id:"polar",name:"Polar",import:()=>Promise.resolve().then(()=>require("./polar-De-CDeYv.cjs"))},{id:"postcss",name:"PostCSS",import:()=>Promise.resolve().then(()=>require("./postcss-BtcsgaYj.cjs"))},{id:"powerquery",name:"PowerQuery",import:()=>Promise.resolve().then(()=>require("./powerquery-B0rHn13V.cjs"))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>Promise.resolve().then(()=>require("./powershell-rCX2OYXT.cjs"))},{id:"prisma",name:"Prisma",import:()=>Promise.resolve().then(()=>require("./prisma-BaaUHYMp.cjs"))},{id:"prolog",name:"Prolog",import:()=>Promise.resolve().then(()=>require("./prolog-DrXD2tGS.cjs"))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>Promise.resolve().then(()=>require("./proto-BtmQjBQu.cjs"))},{id:"pug",name:"Pug",aliases:["jade"],import:()=>Promise.resolve().then(()=>require("./pug-CkHoCGUm.cjs"))},{id:"puppet",name:"Puppet",import:()=>Promise.resolve().then(()=>require("./puppet-cIrXIuy8.cjs"))},{id:"purescript",name:"PureScript",import:()=>Promise.resolve().then(()=>require("./purescript-CX9QPs2N.cjs"))},{id:"python",name:"Python",aliases:["py"],import:()=>Promise.resolve().then(()=>require("./python-B9x3euv6.cjs"))},{id:"qml",name:"QML",import:()=>Promise.resolve().then(()=>require("./qml-Dwwb3xcM.cjs"))},{id:"qmldir",name:"QML Directory",import:()=>Promise.resolve().then(()=>require("./qmldir-DNF9H2ir.cjs"))},{id:"qss",name:"Qt Style Sheets",import:()=>Promise.resolve().then(()=>require("./qss-C744dLby.cjs"))},{id:"r",name:"R",import:()=>Promise.resolve().then(()=>require("./r-DgOc9oMe.cjs"))},{id:"racket",name:"Racket",import:()=>Promise.resolve().then(()=>require("./racket-Do9_vqnd.cjs"))},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>Promise.resolve().then(()=>require("./raku-BW8wAUIz.cjs"))},{id:"razor",name:"ASP.NET Razor",import:()=>Promise.resolve().then(()=>require("./razor-g8HV3m4q.cjs"))},{id:"reg",name:"Windows Registry Script",import:()=>Promise.resolve().then(()=>require("./reg-CGWN_v-z.cjs"))},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>Promise.resolve().then(()=>require("./regexp-N7Z4hEeU.cjs"))},{id:"rel",name:"Rel",import:()=>Promise.resolve().then(()=>require("./rel-BYqA7mnV.cjs"))},{id:"riscv",name:"RISC-V",import:()=>Promise.resolve().then(()=>require("./riscv-ayQMUpo9.cjs"))},{id:"rst",name:"reStructuredText",import:()=>Promise.resolve().then(()=>require("./rst-MlYKz4rn.cjs"))},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>Promise.resolve().then(()=>require("./ruby-DJN5DFiR.cjs"))},{id:"rust",name:"Rust",aliases:["rs"],import:()=>Promise.resolve().then(()=>require("./rust-BnFKGEfa.cjs"))},{id:"sas",name:"SAS",import:()=>Promise.resolve().then(()=>require("./sas-F7gHsd4H.cjs"))},{id:"sass",name:"Sass",import:()=>Promise.resolve().then(()=>require("./sass-B9gYryDE.cjs"))},{id:"scala",name:"Scala",import:()=>Promise.resolve().then(()=>require("./scala-C85dOwSU.cjs"))},{id:"scheme",name:"Scheme",import:()=>Promise.resolve().then(()=>require("./scheme-B_XUaARm.cjs"))},{id:"scss",name:"SCSS",import:()=>Promise.resolve().then(()=>require("./scss-Bn9tb5MW.cjs"))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>Promise.resolve().then(()=>require("./sdbl-7Y5u0OW0.cjs"))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>Promise.resolve().then(()=>require("./shaderlab-Ca09aCzm.cjs"))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>Promise.resolve().then(()=>require("./shellscript-3DYM9fut.cjs"))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>Promise.resolve().then(()=>require("./shellsession-CpSha4Rb.cjs"))},{id:"smalltalk",name:"Smalltalk",import:()=>Promise.resolve().then(()=>require("./smalltalk-CCvytUuW.cjs"))},{id:"solidity",name:"Solidity",import:()=>Promise.resolve().then(()=>require("./solidity-BcNcjFC4.cjs"))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>Promise.resolve().then(()=>require("./soy-CeuZwkAk.cjs"))},{id:"sparql",name:"SPARQL",import:()=>Promise.resolve().then(()=>require("./sparql-BRQlWq86.cjs"))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>Promise.resolve().then(()=>require("./splunk-CzITjJj7.cjs"))},{id:"sql",name:"SQL",import:()=>Promise.resolve().then(()=>require("./sql-BqWZrLHB.cjs"))},{id:"ssh-config",name:"SSH Config",import:()=>Promise.resolve().then(()=>require("./ssh-config-DUPeuEdB.cjs"))},{id:"stata",name:"Stata",import:()=>Promise.resolve().then(()=>require("./stata-B-LlW9Cr.cjs"))},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>Promise.resolve().then(()=>require("./stylus-ByHs6N-o.cjs"))},{id:"svelte",name:"Svelte",import:()=>Promise.resolve().then(()=>require("./svelte-DXe6QUZV.cjs"))},{id:"swift",name:"Swift",import:()=>Promise.resolve().then(()=>require("./swift-C5DnOriA.cjs"))},{id:"system-verilog",name:"SystemVerilog",import:()=>Promise.resolve().then(()=>require("./system-verilog-ClPLYLwh.cjs"))},{id:"systemd",name:"Systemd Units",import:()=>Promise.resolve().then(()=>require("./systemd-BASX0DlX.cjs"))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>Promise.resolve().then(()=>require("./talonscript-DkCSnLHD.cjs"))},{id:"tasl",name:"Tasl",import:()=>Promise.resolve().then(()=>require("./tasl-BAQJK7KZ.cjs"))},{id:"tcl",name:"Tcl",import:()=>Promise.resolve().then(()=>require("./tcl-CwJAYTvh.cjs"))},{id:"templ",name:"Templ",import:()=>Promise.resolve().then(()=>require("./templ-BZj57XLK.cjs"))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>Promise.resolve().then(()=>require("./terraform-s-pzyVvp.cjs"))},{id:"tex",name:"TeX",import:()=>Promise.resolve().then(()=>require("./tex-CTRO38Wo.cjs"))},{id:"toml",name:"TOML",import:()=>Promise.resolve().then(()=>require("./toml-CyMM7IXy.cjs"))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>Promise.resolve().then(()=>require("./ts-tags-hDAF_laC.cjs"))},{id:"tsv",name:"TSV",import:()=>Promise.resolve().then(()=>require("./tsv-DqNGnuVj.cjs"))},{id:"tsx",name:"TSX",import:()=>Promise.resolve().then(()=>require("./tsx-DpBRUnKC.cjs"))},{id:"turtle",name:"Turtle",import:()=>Promise.resolve().then(()=>require("./turtle-DfO3eAsu.cjs"))},{id:"twig",name:"Twig",import:()=>Promise.resolve().then(()=>require("./twig-B2qtj3-0.cjs"))},{id:"typescript",name:"TypeScript",aliases:["ts"],import:()=>Promise.resolve().then(()=>require("./typescript-BqvpT6pB.cjs"))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>Promise.resolve().then(()=>require("./typespec-P-ZVy8yC.cjs"))},{id:"typst",name:"Typst",aliases:["typ"],import:()=>Promise.resolve().then(()=>require("./typst-BVh2IsT9.cjs"))},{id:"v",name:"V",import:()=>Promise.resolve().then(()=>require("./v-BUlE9136.cjs"))},{id:"vala",name:"Vala",import:()=>Promise.resolve().then(()=>require("./vala-BIymb2K_.cjs"))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>Promise.resolve().then(()=>require("./vb-IXOh8mqV.cjs"))},{id:"verilog",name:"Verilog",import:()=>Promise.resolve().then(()=>require("./verilog-BiglCqvO.cjs"))},{id:"vhdl",name:"VHDL",import:()=>Promise.resolve().then(()=>require("./vhdl-CJUzuS2t.cjs"))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>Promise.resolve().then(()=>require("./viml-B1nKLcgt.cjs"))},{id:"vue",name:"Vue",import:()=>Promise.resolve().then(()=>require("./vue-Bz7ob1S8.cjs"))},{id:"vue-html",name:"Vue HTML",import:()=>Promise.resolve().then(()=>require("./vue-html-rW8a786u.cjs"))},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>Promise.resolve().then(()=>require("./vyper-CO9xUkIY.cjs"))},{id:"wasm",name:"WebAssembly",import:()=>Promise.resolve().then(()=>require("./wasm-CdIThIat.cjs"))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>Promise.resolve().then(()=>require("./wenyan-BSJ3fk7e.cjs"))},{id:"wgsl",name:"WGSL",import:()=>Promise.resolve().then(()=>require("./wgsl-d3zZE7ZN.cjs"))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>Promise.resolve().then(()=>require("./wikitext-BRCqXN2g.cjs"))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>Promise.resolve().then(()=>require("./wolfram-C3rR92zj.cjs"))},{id:"xml",name:"XML",import:()=>Promise.resolve().then(()=>require("./xml-CJLy8-Dx.cjs"))},{id:"xsl",name:"XSL",import:()=>Promise.resolve().then(()=>require("./xsl-D4BTm9yO.cjs"))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>Promise.resolve().then(()=>require("./yaml-7DV6pRKj.cjs"))},{id:"zenscript",name:"ZenScript",import:()=>Promise.resolve().then(()=>require("./zenscript-BWMxwjeH.cjs"))},{id:"zig",name:"Zig",import:()=>Promise.resolve().then(()=>require("./zig-yAcNfpgW.cjs"))}],od=Object.fromEntries(Pi.map(e=>[e.id,e.import])),sd=Object.fromEntries(Pi.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),id={...od,...sd},ad=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>Promise.resolve().then(()=>require("./andromeeda-BXc5FOIb.cjs"))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>Promise.resolve().then(()=>require("./aurora-x-C5IpmIOG.cjs"))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./ayu-dark-Cv7nTiif.cjs"))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>Promise.resolve().then(()=>require("./catppuccin-frappe-DXAedND3.cjs"))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>Promise.resolve().then(()=>require("./catppuccin-latte-mwGw3-Ej.cjs"))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>Promise.resolve().then(()=>require("./catppuccin-macchiato-cQCk9ADg.cjs"))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>Promise.resolve().then(()=>require("./catppuccin-mocha-ClSzDZSl.cjs"))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>Promise.resolve().then(()=>require("./dark-plus-Cd5emcYO.cjs"))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>Promise.resolve().then(()=>require("./dracula-BNgwAJ-d.cjs"))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>Promise.resolve().then(()=>require("./dracula-soft-BHZ7sHFu.cjs"))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./everforest-dark-_sBMomR1.cjs"))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>Promise.resolve().then(()=>require("./everforest-light-H0xoYxl0.cjs"))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-BKL9xNgN.cjs"))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-default-Dsv5MuSi.cjs"))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-dimmed-CtB9hz8U.cjs"))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-high-contrast-BqZVM-jF.cjs"))},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>Promise.resolve().then(()=>require("./github-light-BFTOhCbz.cjs"))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>Promise.resolve().then(()=>require("./github-light-default-BZoWH9dH.cjs"))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>Promise.resolve().then(()=>require("./github-light-high-contrast-Ks3kPGJU.cjs"))},{id:"houston",displayName:"Houston",type:"dark",import:()=>Promise.resolve().then(()=>require("./houston-T57H3gQZ.cjs"))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>Promise.resolve().then(()=>require("./kanagawa-dragon-BJZF7xDr.cjs"))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>Promise.resolve().then(()=>require("./kanagawa-lotus-BhgzmRV4.cjs"))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>Promise.resolve().then(()=>require("./kanagawa-wave-BgJip59C.cjs"))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>Promise.resolve().then(()=>require("./laserwave--izBLY1I.cjs"))},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>Promise.resolve().then(()=>require("./light-plus-B5D0le0o.cjs"))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-Dj0-OyRN.cjs"))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-darker-Dvfs29ir.cjs"))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>Promise.resolve().then(()=>require("./material-theme-lighter-EU3ZGl_r.cjs"))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-ocean-px_3Pwqa.cjs"))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-palenight-38jxvsGX.cjs"))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./min-dark-tt5o_I5e.cjs"))},{id:"min-light",displayName:"Min Light",type:"light",import:()=>Promise.resolve().then(()=>require("./min-light-tmTHl_CQ.cjs"))},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>Promise.resolve().then(()=>require("./monokai-DMIxv6MM.cjs"))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>Promise.resolve().then(()=>require("./night-owl-BN78kThQ.cjs"))},{id:"nord",displayName:"Nord",type:"dark",import:()=>Promise.resolve().then(()=>require("./nord-Ca5AGUWc.cjs"))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>Promise.resolve().then(()=>require("./one-dark-pro-JOzzHStv.cjs"))},{id:"one-light",displayName:"One Light",type:"light",import:()=>Promise.resolve().then(()=>require("./one-light-020-h_lv.cjs"))},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>Promise.resolve().then(()=>require("./plastic-r5piqq-S.cjs"))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>Promise.resolve().then(()=>require("./poimandres-BLP3NNjc.cjs"))},{id:"red",displayName:"Red",type:"dark",import:()=>Promise.resolve().then(()=>require("./red-BQGOv1D5.cjs"))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>Promise.resolve().then(()=>require("./rose-pine-DKEdv1Oe.cjs"))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>Promise.resolve().then(()=>require("./rose-pine-dawn-Bvt6DtVH.cjs"))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>Promise.resolve().then(()=>require("./rose-pine-moon-cHuJy0Ng.cjs"))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./slack-dark-akqwQ7ED.cjs"))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>Promise.resolve().then(()=>require("./slack-ochin-BoQQWmTv.cjs"))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>Promise.resolve().then(()=>require("./snazzy-light-D_IwRieF.cjs"))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./solarized-dark-gmm-WbDC.cjs"))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>Promise.resolve().then(()=>require("./solarized-light-DzcxRSZP.cjs"))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>Promise.resolve().then(()=>require("./synthwave-84-BBRLOmNT.cjs"))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>Promise.resolve().then(()=>require("./tokyo-night-9T7_vGSy.cjs"))},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>Promise.resolve().then(()=>require("./vesper-DqLWLxOu.cjs"))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>Promise.resolve().then(()=>require("./vitesse-black-MF-1S1MG.cjs"))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./vitesse-dark-SIffJYSe.cjs"))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>Promise.resolve().then(()=>require("./vitesse-light-U63SkYGT.cjs"))}],ld=Object.fromEntries(ad.map(e=>[e.id,e.import]));let lt=class extends Error{constructor(t){super(t),this.name="ShikiError"}},To=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function cd(){return 2147483648}function ud(){return typeof performance<"u"?performance.now():Date.now()}const dd=(e,t)=>e+(t-e%t)%t;async function pd(e){let t,n;const r={};function o(m){n=m,r.HEAPU8=new Uint8Array(m),r.HEAPU32=new Uint32Array(m)}function s(m,g,b){r.HEAPU8.copyWithin(m,g,g+b)}function i(m){try{return t.grow(m-n.byteLength+65535>>>16),o(t.buffer),1}catch{}}function a(m){const g=r.HEAPU8.length;m=m>>>0;const b=cd();if(m>b)return!1;for(let x=1;x<=4;x*=2){let v=g*(1+.2/x);v=Math.min(v,m+100663296);const S=Math.min(b,dd(Math.max(m,v),65536));if(i(S))return!0}return!1}const l=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(m,g,b=1024){const x=g+b;let v=g;for(;m[v]&&!(v>=x);)++v;if(v-g>16&&m.buffer&&l)return l.decode(m.subarray(g,v));let S="";for(;g<v;){let C=m[g++];if(!(C&128)){S+=String.fromCharCode(C);continue}const k=m[g++]&63;if((C&224)===192){S+=String.fromCharCode((C&31)<<6|k);continue}const w=m[g++]&63;if((C&240)===224?C=(C&15)<<12|k<<6|w:C=(C&7)<<18|k<<12|w<<6|m[g++]&63,C<65536)S+=String.fromCharCode(C);else{const E=C-65536;S+=String.fromCharCode(55296|E>>10,56320|E&1023)}}return S}function d(m,g){return m?u(r.HEAPU8,m,g):""}const p={emscripten_get_now:ud,emscripten_memcpy_big:s,emscripten_resize_heap:a,fd_write:()=>0};async function f(){const g=await e({env:p,wasi_snapshot_preview1:p});t=g.memory,o(t.buffer),Object.assign(r,g),r.UTF8ToString=d}return await f(),r}var hd=Object.defineProperty,md=(e,t,n)=>t in e?hd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ke=(e,t,n)=>(md(e,typeof t!="symbol"?t+"":t,n),n);let Te=null;function fd(e){throw new To(e.UTF8ToString(e.getLastOnigError()))}class gr{constructor(t){ke(this,"utf16Length"),ke(this,"utf8Length"),ke(this,"utf16Value"),ke(this,"utf8Value"),ke(this,"utf16OffsetToUtf8"),ke(this,"utf8OffsetToUtf16");const n=t.length,r=gr._utf8ByteLength(t),o=r!==n,s=o?new Uint32Array(n+1):null;o&&(s[n]=r);const i=o?new Uint32Array(r+1):null;o&&(i[r]=n);const a=new Uint8Array(r);let l=0;for(let u=0;u<n;u++){const d=t.charCodeAt(u);let p=d,f=!1;if(d>=55296&&d<=56319&&u+1<n){const m=t.charCodeAt(u+1);m>=56320&&m<=57343&&(p=(d-55296<<10)+65536|m-56320,f=!0)}o&&(s[u]=l,f&&(s[u+1]=l),p<=127?i[l+0]=u:p<=2047?(i[l+0]=u,i[l+1]=u):p<=65535?(i[l+0]=u,i[l+1]=u,i[l+2]=u):(i[l+0]=u,i[l+1]=u,i[l+2]=u,i[l+3]=u)),p<=127?a[l++]=p:p<=2047?(a[l++]=192|(p&1984)>>>6,a[l++]=128|(p&63)>>>0):p<=65535?(a[l++]=224|(p&61440)>>>12,a[l++]=128|(p&4032)>>>6,a[l++]=128|(p&63)>>>0):(a[l++]=240|(p&1835008)>>>18,a[l++]=128|(p&258048)>>>12,a[l++]=128|(p&4032)>>>6,a[l++]=128|(p&63)>>>0),f&&u++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=a,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=i}static _utf8ByteLength(t){let n=0;for(let r=0,o=t.length;r<o;r++){const s=t.charCodeAt(r);let i=s,a=!1;if(s>=55296&&s<=56319&&r+1<o){const l=t.charCodeAt(r+1);l>=56320&&l<=57343&&(i=(s-55296<<10)+65536|l-56320,a=!0)}i<=127?n+=1:i<=2047?n+=2:i<=65535?n+=3:n+=4,a&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const Ye=class{constructor(e){if(ke(this,"id",++Ye.LAST_ID),ke(this,"_onigBinding"),ke(this,"content"),ke(this,"utf16Length"),ke(this,"utf8Length"),ke(this,"utf16OffsetToUtf8"),ke(this,"utf8OffsetToUtf16"),ke(this,"ptr"),!Te)throw new To("Must invoke loadWasm first.");this._onigBinding=Te,this.content=e;const t=new gr(e);this.utf16Length=t.utf16Length,this.utf8Length=t.utf8Length,this.utf16OffsetToUtf8=t.utf16OffsetToUtf8,this.utf8OffsetToUtf16=t.utf8OffsetToUtf16,this.utf8Length<1e4&&!Ye._sharedPtrInUse?(Ye._sharedPtr||(Ye._sharedPtr=Te.omalloc(1e4)),Ye._sharedPtrInUse=!0,Te.HEAPU8.set(t.utf8Value,Ye._sharedPtr),this.ptr=Ye._sharedPtr):this.ptr=t.createString(Te)}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===Ye._sharedPtr?Ye._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};let Sn=Ye;ke(Sn,"LAST_ID",0);ke(Sn,"_sharedPtr",0);ke(Sn,"_sharedPtrInUse",!1);class gd{constructor(t){if(ke(this,"_onigBinding"),ke(this,"_ptr"),!Te)throw new To("Must invoke loadWasm first.");const n=[],r=[];for(let a=0,l=t.length;a<l;a++){const u=new gr(t[a]);n[a]=u.createString(Te),r[a]=u.utf8Length}const o=Te.omalloc(4*t.length);Te.HEAPU32.set(n,o/4);const s=Te.omalloc(4*t.length);Te.HEAPU32.set(r,s/4);const i=Te.createOnigScanner(o,s,t.length);for(let a=0,l=t.length;a<l;a++)Te.ofree(n[a]);Te.ofree(s),Te.ofree(o),i===0&&fd(Te),this._onigBinding=Te,this._ptr=i}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let o=0;if(typeof r=="number"&&(o=r),typeof t=="string"){t=new Sn(t);const s=this._findNextMatchSync(t,n,!1,o);return t.dispose(),s}return this._findNextMatchSync(t,n,!1,o)}_findNextMatchSync(t,n,r,o){const s=this._onigBinding,i=s.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),o);if(i===0)return null;const a=s.HEAPU32;let l=i/4;const u=a[l++],d=a[l++],p=[];for(let f=0;f<d;f++){const m=t.convertUtf8OffsetToUtf16(a[l++]),g=t.convertUtf8OffsetToUtf16(a[l++]);p[f]={start:m,end:g,length:g-m}}return{index:u,captureIndices:p}}}function yd(e){return typeof e.instantiator=="function"}function bd(e){return typeof e.default=="function"}function xd(e){return typeof e.data<"u"}function vd(e){return typeof Response<"u"&&e instanceof Response}function Sd(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 _n;function Cd(e){if(_n)return _n;async function t(){Te=await pd(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),yd(r)?r=await r.instantiator(n):bd(r)?r=await r.default(n):(xd(r)&&(r=r.data),vd(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await wd(r)(n):r=await kd(r)(n):Sd(r)?r=await Nr(r)(n):r instanceof WebAssembly.Module?r=await Nr(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Nr(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return _n=t(),_n}function Nr(e){return t=>WebAssembly.instantiate(e,t)}function wd(e){return t=>WebAssembly.instantiateStreaming(e,t)}function kd(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let Id;function Pd(){return Id}async function Ti(e){return e&&await Cd(e),{createScanner(t){return new gd(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new Sn(t)}}}function Td(e){return jo(e)}function jo(e){return Array.isArray(e)?jd(e):e instanceof RegExp?e:typeof e=="object"?Ed(e):e}function jd(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=jo(e[n]);return t}function Ed(e){let t={};for(let n in e)t[n]=jo(e[n]);return t}function ji(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function Ei(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?Ei(e.substring(0,e.length-1)):e.substr(~t+1)}var Mr=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,An=class{static hasCaptures(e){return e===null?!1:(Mr.lastIndex=0,Mr.test(e))}static replaceCaptures(e,t,n){return e.replace(Mr,(r,o,s,i)=>{let a=n[parseInt(o||s,10)];if(a){let l=t.substring(a.start,a.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 r})}};function Ri(e,t){return e<t?-1:e>t?1:0}function _i(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 s=Ri(e[o],t[o]);if(s!==0)return s}return 0}return n-r}function ks(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 Ai(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Oi=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},Wn=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Ad(e),t)}static createFromParsedTheme(e,t){return Nd(e,t)}_cachedMatchRoot=new Oi(e=>this._root.match(e));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(o=>Rd(e.parent,o.parentScopes));return r?new Ni(r.fontStyle,r.foreground,r.background):null}},Lr=class $n{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new $n(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new $n(n,t[r]);return n}push(t){return new $n(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 Rd(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&&!_d(e.scopeName,r);){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function _d(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var Ni=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Ad(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let o=0,s=t.length;o<s;o++){let i=t[o];if(!i.settings)continue;let a;if(typeof i.scope=="string"){let p=i.scope;p=p.replace(/^[,]+/,""),p=p.replace(/[,]+$/,""),a=p.split(",")}else Array.isArray(i.scope)?a=i.scope:a=[""];let l=-1;if(typeof i.settings.fontStyle=="string"){l=0;let p=i.settings.fontStyle.split(" ");for(let f=0,m=p.length;f<m;f++)switch(p[f]){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 u=null;typeof i.settings.foreground=="string"&&ks(i.settings.foreground)&&(u=i.settings.foreground);let d=null;typeof i.settings.background=="string"&&ks(i.settings.background)&&(d=i.settings.background);for(let p=0,f=a.length;p<f;p++){let g=a[p].trim().split(" "),b=g[g.length-1],x=null;g.length>1&&(x=g.slice(0,g.length-1),x.reverse()),n[r++]=new Od(b,x,o,l,u,d)}}return n}var Od=class{constructor(e,t,n,r,o,s){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=o,this.background=s}},it=(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))(it||{});function Nd(e,t){e.sort((l,u)=>{let d=Ri(l.scope,u.scope);return d!==0||(d=_i(l.parentScopes,u.parentScopes),d!==0)?d:l.index-u.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 s=new Md(t),i=new Ni(n,s.getId(r),s.getId(o)),a=new Dd(new Yr(0,null,-1,0,0),[]);for(let l=0,u=e.length;l<u;l++){let d=e[l];a.insert(0,d.scope,d.parentScopes,d.fontStyle,s.getId(d.foreground),s.getId(d.background))}return new Wn(s,i,a)}var Md=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){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)}},Ld=Object.freeze([]),Yr=class Mi{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,r,o,s){this.scopeDepth=t,this.parentScopes=n||Ld,this.fontStyle=r,this.foreground=o,this.background=s}clone(){return new Mi(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)}},Dd=class Xr{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;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 s=n.parentScopes[o].length-t.parentScopes[r].length;if(s!==0)return s;r++,o++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),o,s;if(r===-1?(o=t,s=""):(o=t.substring(0,r),s=t.substring(r+1)),this._children.hasOwnProperty(o))return this._children[o].match(s)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Xr._cmpBySpecificity),n}insert(t,n,r,o,s,i){if(n===""){this._doInsertHere(t,r,o,s,i);return}let a=n.indexOf("."),l,u;a===-1?(l=n,u=""):(l=n.substring(0,a),u=n.substring(a+1));let d;this._children.hasOwnProperty(l)?d=this._children[l]:(d=new Xr(this._mainRule.clone(),Yr.cloneArr(this._rulesWithParentScopes)),this._children[l]=d),d.insert(t+1,u,r,o,s,i)}_doInsertHere(t,n,r,o,s){if(n===null){this._mainRule.acceptOverwrite(t,r,o,s);return}for(let i=0,a=this._rulesWithParentScopes.length;i<a;i++){let l=this._rulesWithParentScopes[i];if(_i(l.parentScopes,n)===0){l.acceptOverwrite(t,r,o,s);return}}r===-1&&(r=this._mainRule.fontStyle),o===0&&(o=this._mainRule.foreground),s===0&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new Yr(t,n,r,o,s))}},Ht=class Fe{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=Fe.getLanguageId(t),r=Fe.getTokenType(t),o=Fe.getFontStyle(t),s=Fe.getForeground(t),i=Fe.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:o,foreground:s,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,n,r,o,s,i,a){let l=Fe.getLanguageId(t),u=Fe.getTokenType(t),d=Fe.containsBalancedBrackets(t)?1:0,p=Fe.getFontStyle(t),f=Fe.getForeground(t),m=Fe.getBackground(t);return n!==0&&(l=n),r!==8&&(u=r),o!==null&&(d=o?1:0),s!==-1&&(p=s),i!==0&&(f=i),a!==0&&(m=a),(l<<0|u<<8|d<<10|p<<11|f<<15|m<<24)>>>0}};function Kn(e,t){const n=[],r=$d(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 u=i();if(n.push({matcher:u,priority:l}),o!==",")break;o=r.next()}return n;function s(){if(o==="-"){o=r.next();const l=s();return u=>!!l&&!l(u)}if(o==="("){o=r.next();const l=a();return o===")"&&(o=r.next()),l}if(Is(o)){const l=[];do l.push(o),o=r.next();while(Is(o));return u=>t(l,u)}return null}function i(){const l=[];let u=s();for(;u;)l.push(u),u=s();return d=>l.every(p=>p(d))}function a(){const l=[];let u=i();for(;u&&(l.push(u),o==="|"||o===",");){do o=r.next();while(o==="|"||o===",");u=i()}return d=>l.some(p=>p(d))}}function Is(e){return!!e&&!!e.match(/[\w\.:]+/)}function $d(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 Li(e){typeof e.dispose=="function"&&e.dispose()}var un=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Bd=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},qd=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Vd=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new un(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new qd;for(const n of e)Fd(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof un){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 Fd(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 s=n.lookup(t);e instanceof un?Bn({baseGrammar:s,selfGrammar:o},r):Jr(e.ruleName,{baseGrammar:s,selfGrammar:o,repository:o.repository},r);const i=n.injections(e.scopeName);if(i)for(const a of i)r.add(new un(a))}function Jr(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];Qn([r],t,n)}}function Bn(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Qn(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Qn(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Qn(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const o=r.repository?ji({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Qn(r.patterns,{...t,repository:o},n);const s=r.include;if(!s)continue;const i=Di(s);switch(i.kind){case 0:Bn({...t,selfGrammar:t.baseGrammar},n);break;case 1:Bn(t,n);break;case 2:Jr(i.ruleName,{...t,repository:o},n);break;case 3:case 4:const a=i.scopeName===t.selfGrammar.scopeName?t.selfGrammar:i.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(a){const l={baseGrammar:t.baseGrammar,selfGrammar:a,repository:o};i.kind===4?Jr(i.ruleName,l,n):Bn(l,n)}else i.kind===4?n.add(new Bd(i.scopeName,i.ruleName)):n.add(new un(i.scopeName));break}}}var zd=class{kind=0},Hd=class{kind=1},Ud=class{constructor(e){this.ruleName=e}kind=2},Gd=class{constructor(e){this.scopeName=e}kind=3},Wd=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Di(e){if(e==="$base")return new zd;if(e==="$self")return new Hd;const t=e.indexOf("#");if(t===-1)return new Gd(e);if(t===0)return new Ud(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new Wd(n,r)}}var Kd=/\\(\d+)/,Ps=/\\(\d+)/g,Qd=-1,$i=-2;var Cn=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=An.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=An.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Ei(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:An.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:An.replaceCaptures(this._contentName,e,t)}},Yd=class extends Cn{retokenizeCapturedWithRuleId;constructor(e,t,n,r,o){super(e,t,n,r),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},Xd=class extends Cn{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,o){super(e,t,n,null),this._match=new dn(r,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new pn,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ts=class extends Cn{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,o){super(e,t,n,r),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new pn,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Zr=class extends Cn{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,o,s,i,a,l,u){super(e,t,n,r),this._begin=new dn(o,this.id),this.beginCaptures=s,this._end=new dn(i||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=l||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.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(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new pn;for(const n of this.patterns)e.getRule(n).collectPatterns(e,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,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Yn=class extends Cn{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,o,s,i,a,l){super(e,t,n,r),this._begin=new dn(o,this.id),this.beginCaptures=s,this.whileCaptures=a,this._while=new dn(i,$i),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.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(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new pn;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new pn,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},Bi=class Ee{static createCaptureRule(t,n,r,o,s){return t.registerRule(i=>new Yd(n,i,r,o,s))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(o=>{if(t.id=o,t.match)return new Xd(t.$vscodeTextmateLocation,t.id,t.name,t.match,Ee._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=ji({},r,t.repository));let s=t.patterns;return typeof s>"u"&&t.include&&(s=[{include:t.include}]),new Ts(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Ee._compilePatterns(s,n,r))}return t.while?new Yn(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Ee._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,Ee._compileCaptures(t.whileCaptures||t.captures,n,r),Ee._compilePatterns(t.patterns,n,r)):new Zr(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Ee._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,Ee._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,Ee._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let o=[];if(t){let s=0;for(const i in t){if(i==="$vscodeTextmateLocation")continue;const a=parseInt(i,10);a>s&&(s=a)}for(let i=0;i<=s;i++)o[i]=null;for(const i in t){if(i==="$vscodeTextmateLocation")continue;const a=parseInt(i,10);let l=0;t[i].patterns&&(l=Ee.getCompiledRuleId(t[i],n,r)),o[a]=Ee.createCaptureRule(n,t[i].$vscodeTextmateLocation,t[i].name,t[i].contentName,l)}}return o}static _compilePatterns(t,n,r){let o=[];if(t)for(let s=0,i=t.length;s<i;s++){const a=t[s];let l=-1;if(a.include){const u=Di(a.include);switch(u.kind){case 0:case 1:l=Ee.getCompiledRuleId(r[a.include],n,r);break;case 2:let d=r[u.ruleName];d&&(l=Ee.getCompiledRuleId(d,n,r));break;case 3:case 4:const p=u.scopeName,f=u.kind===4?u.ruleName:null,m=n.getExternalGrammar(p,r);if(m)if(f){let g=m.repository[f];g&&(l=Ee.getCompiledRuleId(g,n,m.repository))}else l=Ee.getCompiledRuleId(m.repository.$self,n,m.repository);break}}else l=Ee.getCompiledRuleId(a,n,r);if(l!==-1){const u=n.getRule(l);let d=!1;if((u instanceof Ts||u instanceof Zr||u instanceof Yn)&&u.hasMissingPatterns&&u.patterns.length===0&&(d=!0),d)continue;o.push(l)}}return{patterns:o,hasMissingPatterns:(t?t.length:0)!==o.length}}},dn=class qi{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){const r=t.length;let o=0,s=[],i=!1;for(let a=0;a<r;a++)if(t.charAt(a)==="\\"&&a+1<r){const u=t.charAt(a+1);u==="z"?(s.push(t.substring(o,a)),s.push("$(?!\\n)(?<!\\n)"),o=a+2):(u==="A"||u==="G")&&(i=!0),a++}this.hasAnchor=i,o===0?this.source=t:(s.push(t.substring(o,r)),this.source=s.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=Kd.test(this.source):this.hasBackReferences=!1}clone(){return new qi(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 Ps.lastIndex=0,this.source.replace(Ps,(o,s)=>Ai(r[parseInt(s,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=[],s,i,a,l;for(s=0,i=this.source.length;s<i;s++)a=this.source.charAt(s),t[s]=a,n[s]=a,r[s]=a,o[s]=a,a==="\\"&&s+1<i&&(l=this.source.charAt(s+1),l==="A"?(t[s+1]="",n[s+1]="",r[s+1]="A",o[s+1]="A"):l==="G"?(t[s+1]="",n[s+1]="G",r[s+1]="",o[s+1]="G"):(t[s+1]=l,n[s+1]=l,r[s+1]=l,o[s+1]=l),s++);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}},pn=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){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 js(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 js(e,r,this._items.map(o=>o.ruleId))}},js=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;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(`
|
|
17
|
-
`)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},
|
|
18
|
-
`;const s=this.createOnigString(e),i=s.content.length,a=new up(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=Vi(this,s,o,0,t,a,!0,r);return Li(s),{lineLength:i,lineTokens:a,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function _s(e,t){return e=Td(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 sn=class Xe{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 s of n)o=Lr.push(o,s.scopeNames),r=new Xe(r,o,s.encodedTokenAttributes);return r}static createRoot(t,n){return new Xe(null,new Lr(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const o=r.getMetadataForScope(t),s=new Lr(null,t),i=r.themeProvider.themeMatch(s),a=Xe.mergeAttributes(n,o,i);return new Xe(null,s,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Xe.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,s=0,i=0;return r!==null&&(o=r.fontStyle,s=r.foregroundId,i=r.backgroundId),Ht.set(t,n.languageId,n.tokenType,null,o,s,i)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Xe._pushAttributed(this,t,n);const r=t.split(/ /g);let o=this;for(const s of r)o=Xe._pushAttributed(o,s,n);return o}static _pushAttributed(t,n,r){const o=r.getMetadataForScope(n),s=t.scopePath.push(n),i=r.themeProvider.themeMatch(s),a=Xe.mergeAttributes(t.tokenAttributes,o,i);return new Xe(t,s,a)}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}},to=class gt{constructor(t,n,r,o,s,i,a,l){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=s,this.endRule=i,this.nameScopesList=a,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=o}_stackElementBrand=void 0;static NULL=new gt(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:gt._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?sn.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(){gt._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,o,s,i,a){return new gt(this,t,n,r,o,s,i,a)}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 gt(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=sn.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new gt(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,sn.fromExtension(r,n.contentNameScopesList))}},cp=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Kn(n,Xn).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Kn(n,Xn).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}},up=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;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 s=e?.getScopeNames()??[];for(const i of this._tokenTypeOverrides)i.matcher(s)&&(r=Ht.set(r,0,i.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(s))}if(o&&(r=Ht.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}},dp=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;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 s=this._rawGrammars.get(e);if(!s)return null;this._grammars.set(e,ip(e,s,t,n,r,o,this,this._onigLib))}return this._grammars.get(e)}},pp=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new dp(Wn.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(Wn.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,r){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(t,n,r){return this._loadGrammar(t,n,r.embeddedLanguages,r.tokenTypes,new cp(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,o,s){const i=new Vd(this._syncRegistry,t);for(;i.Q.length>0;)i.Q.map(a=>this._loadSingleGrammar(a.scopeName)),i.processQueue();return this._grammarForScopeName(t,n,r,o,s)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,o=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,o)}_grammarForScopeName(t,n=0,r=null,o=null,s=null){return this._syncRegistry.grammarForScopeName(t,n,r,o,s)}},no=to.NULL;const hp=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class wn{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}wn.prototype.normal={};wn.prototype.property={};wn.prototype.space=void 0;function zi(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new wn(n,r,t)}function ro(e){return e.toLowerCase()}class Me{constructor(t,n){this.attribute=n,this.property=t}}Me.prototype.attribute="";Me.prototype.booleanish=!1;Me.prototype.boolean=!1;Me.prototype.commaOrSpaceSeparated=!1;Me.prototype.commaSeparated=!1;Me.prototype.defined=!1;Me.prototype.mustUseProperty=!1;Me.prototype.number=!1;Me.prototype.overloadedBoolean=!1;Me.prototype.property="";Me.prototype.spaceSeparated=!1;Me.prototype.space=void 0;let mp=0;const z=Pt(),ye=Pt(),Hi=Pt(),j=Pt(),re=Pt(),qt=Pt(),De=Pt();function Pt(){return 2**++mp}const oo=Object.freeze(Object.defineProperty({__proto__:null,boolean:z,booleanish:ye,commaOrSpaceSeparated:De,commaSeparated:qt,number:j,overloadedBoolean:Hi,spaceSeparated:re},Symbol.toStringTag,{value:"Module"})),$r=Object.keys(oo);class Eo extends Me{constructor(t,n,r,o){let s=-1;if(super(t,n),As(this,"space",o),typeof r=="number")for(;++s<$r.length;){const i=$r[s];As(this,$r[s],(r&oo[i])===oo[i])}}}Eo.prototype.defined=!0;function As(e,t,n){n&&(e[t]=n)}function Qt(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const s=new Eo(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[ro(r)]=r,n[ro(s.attribute)]=r}return new wn(t,n,e.space)}const Ui=Qt({properties:{ariaActiveDescendant:null,ariaAtomic:ye,ariaAutoComplete:null,ariaBusy:ye,ariaChecked:ye,ariaColCount:j,ariaColIndex:j,ariaColSpan:j,ariaControls:re,ariaCurrent:null,ariaDescribedBy:re,ariaDetails:null,ariaDisabled:ye,ariaDropEffect:re,ariaErrorMessage:null,ariaExpanded:ye,ariaFlowTo:re,ariaGrabbed:ye,ariaHasPopup:null,ariaHidden:ye,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:re,ariaLevel:j,ariaLive:null,ariaModal:ye,ariaMultiLine:ye,ariaMultiSelectable:ye,ariaOrientation:null,ariaOwns:re,ariaPlaceholder:null,ariaPosInSet:j,ariaPressed:ye,ariaReadOnly:ye,ariaRelevant:null,ariaRequired:ye,ariaRoleDescription:re,ariaRowCount:j,ariaRowIndex:j,ariaRowSpan:j,ariaSelected:ye,ariaSetSize:j,ariaSort:null,ariaValueMax:j,ariaValueMin:j,ariaValueNow:j,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Gi(e,t){return t in e?e[t]:t}function Wi(e,t){return Gi(e,t.toLowerCase())}const fp=Qt({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:qt,acceptCharset:re,accessKey:re,action:null,allow:null,allowFullScreen:z,allowPaymentRequest:z,allowUserMedia:z,alt:null,as:null,async:z,autoCapitalize:null,autoComplete:re,autoFocus:z,autoPlay:z,blocking:re,capture:null,charSet:null,checked:z,cite:null,className:re,cols:j,colSpan:null,content:null,contentEditable:ye,controls:z,controlsList:re,coords:j|qt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:z,defer:z,dir:null,dirName:null,disabled:z,download:Hi,draggable:ye,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:z,formTarget:null,headers:re,height:j,hidden:z,high:j,href:null,hrefLang:null,htmlFor:re,httpEquiv:re,id:null,imageSizes:null,imageSrcSet:null,inert:z,inputMode:null,integrity:null,is:null,isMap:z,itemId:null,itemProp:re,itemRef:re,itemScope:z,itemType:re,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:z,low:j,manifest:null,max:null,maxLength:j,media:null,method:null,min:null,minLength:j,multiple:z,muted:z,name:null,nonce:null,noModule:z,noValidate:z,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:z,optimum:j,pattern:null,ping:re,placeholder:null,playsInline:z,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:z,referrerPolicy:null,rel:re,required:z,reversed:z,rows:j,rowSpan:j,sandbox:re,scope:null,scoped:z,seamless:z,selected:z,shadowRootClonable:z,shadowRootDelegatesFocus:z,shadowRootMode:null,shape:null,size:j,sizes:null,slot:null,span:j,spellCheck:ye,src:null,srcDoc:null,srcLang:null,srcSet:null,start:j,step:null,style:null,tabIndex:j,target:null,title:null,translate:null,type:null,typeMustMatch:z,useMap:null,value:ye,width:j,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:re,axis:null,background:null,bgColor:null,border:j,borderColor:null,bottomMargin:j,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:z,declare:z,event:null,face:null,frame:null,frameBorder:null,hSpace:j,leftMargin:j,link:null,longDesc:null,lowSrc:null,marginHeight:j,marginWidth:j,noResize:z,noHref:z,noShade:z,noWrap:z,object:null,profile:null,prompt:null,rev:null,rightMargin:j,rules:null,scheme:null,scrolling:ye,standby:null,summary:null,text:null,topMargin:j,valueType:null,version:null,vAlign:null,vLink:null,vSpace:j,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:z,disableRemotePlayback:z,prefix:null,property:null,results:j,security:null,unselectable:null},space:"html",transform:Wi}),gp=Qt({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:De,accentHeight:j,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:j,amplitude:j,arabicForm:null,ascent:j,attributeName:null,attributeType:null,azimuth:j,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:j,by:null,calcMode:null,capHeight:j,className:re,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:j,diffuseConstant:j,direction:null,display:null,dur:null,divisor:j,dominantBaseline:null,download:z,dx:null,dy:null,edgeMode:null,editable:null,elevation:j,enableBackground:null,end:null,event:null,exponent:j,externalResourcesRequired:null,fill:null,fillOpacity:j,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:qt,g2:qt,glyphName:qt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:j,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:j,horizOriginX:j,horizOriginY:j,id:null,ideographic:j,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:j,k:j,k1:j,k2:j,k3:j,k4:j,kernelMatrix:De,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:j,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:j,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:j,overlineThickness:j,paintOrder:null,panose1:null,path:null,pathLength:j,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:re,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:j,pointsAtY:j,pointsAtZ:j,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:De,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:De,rev:De,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:De,requiredFeatures:De,requiredFonts:De,requiredFormats:De,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:j,specularExponent:j,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:j,strikethroughThickness:j,string:null,stroke:null,strokeDashArray:De,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:j,strokeOpacity:j,strokeWidth:null,style:null,surfaceScale:j,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:De,tabIndex:j,tableValues:null,target:null,targetX:j,targetY:j,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:De,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:j,underlineThickness:j,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:j,values:null,vAlphabetic:j,vMathematical:j,vectorEffect:null,vHanging:j,vIdeographic:j,version:null,vertAdvY:j,vertOriginX:j,vertOriginY:j,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:j,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Gi}),Ki=Qt({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()}}),Qi=Qt({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Wi}),Yi=Qt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),yp=/[A-Z]/g,Os=/-[a-z]/g,bp=/^data[-\w.:]+$/i;function xp(e,t){const n=ro(t);let r=t,o=Me;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&bp.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Os,Sp);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Os.test(s)){let i=s.replace(yp,vp);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}o=Eo}return new o(r,t)}function vp(e){return"-"+e.toLowerCase()}function Sp(e){return e.charAt(1).toUpperCase()}const Cp=zi([Ui,fp,Ki,Qi,Yi],"html"),Xi=zi([Ui,gp,Ki,Qi,Yi],"svg"),Ns={}.hasOwnProperty;function wp(e,t){const n=t||{};function r(o,...s){let i=r.invalid;const a=r.handlers;if(o&&Ns.call(o,e)){const l=String(o[e]);i=Ns.call(a,l)?a[l]:r.unknown}if(i)return i.call(this,o,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const kp=/["&'<>`]/g,Ip=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Pp=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Tp=/[|\\{}()[\]^$+*?.]/g,Ms=new WeakMap;function jp(e,t){if(e=e.replace(t.subset?Ep(t.subset):kp,r),t.subset||t.escapeOnly)return e;return e.replace(Ip,n).replace(Pp,r);function n(o,s,i){return t.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,i.charCodeAt(s+2),t)}function r(o,s,i){return t.format(o.charCodeAt(0),i.charCodeAt(s+1),t)}}function Ep(e){let t=Ms.get(e);return t||(t=Rp(e),Ms.set(e,t)),t}function Rp(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(Tp,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const _p=/[\dA-Fa-f]/;function Ap(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!_p.test(String.fromCharCode(t))?r:r+";"}const Op=/\d/;function Np(e,t,n){const r="&#"+String(e);return n&&t&&!Op.test(String.fromCharCode(t))?r:r+";"}const Mp=["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"],Br={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:"€"},Lp=["cent","copy","divide","gt","lt","not","para","times"],Ji={}.hasOwnProperty,so={};let On;for(On in Br)Ji.call(Br,On)&&(so[Br[On]]=On);const Dp=/[^\dA-Za-z]/;function $p(e,t,n,r){const o=String.fromCharCode(e);if(Ji.call(so,o)){const s=so[o],i="&"+s;return n&&Mp.includes(s)&&!Lp.includes(s)&&(!r||t&&t!==61&&Dp.test(String.fromCharCode(t)))?i:i+";"}return""}function Bp(e,t,n){let r=Ap(e,t,n.omitOptionalSemicolons),o;if((n.useNamedReferences||n.useShortestReferences)&&(o=$p(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!o)&&n.useShortestReferences){const s=Np(e,t,n.omitOptionalSemicolons);s.length<r.length&&(r=s)}return o&&(!n.useShortestReferences||o.length<r.length)?o:r}function Vt(e,t){return jp(e,Object.assign({format:Bp},t))}const qp=/^>|^->|<!--|-->|--!>|<!-$/g,Vp=[">"],Fp=["<",">"];function zp(e,t,n,r){return r.settings.bogusComments?"<?"+Vt(e.value,Object.assign({},r.settings.characterReferences,{subset:Vp}))+">":"<!--"+e.value.replace(qp,o)+"-->";function o(s){return Vt(s,Object.assign({},r.settings.characterReferences,{subset:Fp}))}}function Hp(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function Ls(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 Up(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function Gp(e){return e.join(" ").trim()}const Wp=/[ \t\n\f\r]/g;function Ro(e){return typeof e=="object"?e.type==="text"?Ds(e.value):!1:Ds(e)}function Ds(e){return e.replace(Wp,"")===""}const Pe=ea(1),Zi=ea(-1),Kp=[];function ea(e){return t;function t(n,r,o){const s=n?n.children:Kp;let i=(r||0)+e,a=s[i];if(!o)for(;a&&Ro(a);)i+=e,a=s[i];return a}}const Qp={}.hasOwnProperty;function ta(e){return t;function t(n,r,o){return Qp.call(e,n.tagName)&&e[n.tagName](n,r,o)}}const _o=ta({body:Xp,caption:qr,colgroup:qr,dd:th,dt:eh,head:qr,html:Yp,li:Zp,optgroup:nh,option:rh,p:Jp,rp:$s,rt:$s,tbody:sh,td:Bs,tfoot:ih,th:Bs,thead:oh,tr:ah});function qr(e,t,n){const r=Pe(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&Ro(r.value.charAt(0)))}function Yp(e,t,n){const r=Pe(n,t);return!r||r.type!=="comment"}function Xp(e,t,n){const r=Pe(n,t);return!r||r.type!=="comment"}function Jp(e,t,n){const r=Pe(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 Zp(e,t,n){const r=Pe(n,t);return!r||r.type==="element"&&r.tagName==="li"}function eh(e,t,n){const r=Pe(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function th(e,t,n){const r=Pe(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function $s(e,t,n){const r=Pe(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function nh(e,t,n){const r=Pe(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function rh(e,t,n){const r=Pe(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function oh(e,t,n){const r=Pe(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function sh(e,t,n){const r=Pe(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function ih(e,t,n){return!Pe(n,t)}function ah(e,t,n){const r=Pe(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function Bs(e,t,n){const r=Pe(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const lh=ta({body:dh,colgroup:ph,head:uh,html:ch,tbody:hh});function ch(e){const t=Pe(e,-1);return!t||t.type!=="comment"}function uh(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 dh(e){const t=Pe(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Ro(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function ph(e,t,n){const r=Zi(n,t),o=Pe(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&_o(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function hh(e,t,n){const r=Zi(n,t),o=Pe(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&_o(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}const Nn={name:[[`
|
|
16
|
+
export default theme;`}function Po(e={},...t){const{breakpoints:n,mixins:r={},spacing:i,palette:s={},transitions:a={},typography:o={},shape:u,...l}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(tr(20));const d=Au(s),c=Iu(e);let m=jt(c,{mixins:Ag(c.breakpoints,r),palette:d,shadows:wg.slice(),typography:kg(d,o),transitions:Rg(a),zIndex:{...Lg}});return m=jt(m,l),m=t.reduce((p,g)=>jt(p,g),m),m.unstable_sxConfig={...fa,...l?.unstable_sxConfig},m.unstable_sx=function(g){return wr({sx:g,theme:this})},m.toRuntimeSource=Th,m}function Fg(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 Mg=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=Fg(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Ch(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Sh(e){return e==="dark"?Mg:[]}function Bg(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...i}=e,s=Au(t);return{palette:s,opacity:{...Ch(s.mode),...n},overlays:r||Sh(s.mode),...i}}function jg(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 Hg=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],Ug=e=>(t,n)=>{const r=e.rootSelector||":root",i=e.colorSchemeSelector;let s=i;if(i==="class"&&(s=".%s"),i==="data"&&(s="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(s=`[${i}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return Hg(e.cssVarPrefix).forEach(o=>{a[o]=n[o],delete n[o]}),s==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:a}}:s?{[s.replace("%s",t)]:a,[`${r}, ${s.replace("%s",t)}`]:n}:{[r]:{...n,...a}}}if(s&&s!=="media")return`${r}, ${s.replace("%s",String(t))}`}else if(t){if(s==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(s)return s.replace("%s",String(t))}return r};function zg(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function j(e,t,n){!e[t]&&n&&(e[t]=n)}function ci(e){return typeof e!="string"||!e.startsWith("hsl")?e:gh(e)}function fn(e,t){`${t}Channel`in e||(e[`${t}Channel`]=li(ci(e[t])))}function $g(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const sn=e=>{try{return e()}catch{}},qg=(e="mui")=>We.unstable_createGetCssVar(e);function qa(e,t,n,r){if(!t)return;t=t===!0?{}:t;const i=r==="dark"?"dark":"light";if(!n){e[r]=Bg({...t,palette:{mode:i,...t?.palette}});return}const{palette:s,...a}=Po({...n,palette:{mode:i,...t?.palette}});return e[r]={...t,palette:s,opacity:{...Ch(i),...t?.opacity},overlays:t?.overlays||Sh(i)},a}function Vg(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:s="mui",shouldSkipGeneratingVar:a=jg,colorSchemeSelector:o=n.light&&n.dark?"media":void 0,rootSelector:u=":root",...l}=e,d=Object.keys(n)[0],c=r||(n.light&&d!=="light"?"light":d),m=qg(s),{[c]:p,light:g,dark:b,...T}=n,x={...T};let C=p;if((c==="dark"&&!("dark"in n)||c==="light"&&!("light"in n))&&(C=!0),!C)throw new Error(tr(21,c));const S=qa(x,C,l,c);g&&!x.light&&qa(x,g,void 0,"light"),b&&!x.dark&&qa(x,b,void 0,"dark");let w={defaultColorScheme:c,...S,cssVarPrefix:s,colorSchemeSelector:o,rootSelector:u,getCssVar:m,colorSchemes:x,font:{...gg(S.typography),...S.font},spacing:$g(l.spacing)};Object.keys(w.colorSchemes).forEach(J=>{const E=w.colorSchemes[J].palette,L=O=>{const z=O.split("-"),M=z[1],K=z[2];return m(O,E[M][K])};if(E.mode==="light"&&(j(E.common,"background","#fff"),j(E.common,"onBackground","#000")),E.mode==="dark"&&(j(E.common,"background","#000"),j(E.common,"onBackground","#fff")),zg(E,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),E.mode==="light"){j(E.Alert,"errorColor",Pe(E.error.light,.6)),j(E.Alert,"infoColor",Pe(E.info.light,.6)),j(E.Alert,"successColor",Pe(E.success.light,.6)),j(E.Alert,"warningColor",Pe(E.warning.light,.6)),j(E.Alert,"errorFilledBg",L("palette-error-main")),j(E.Alert,"infoFilledBg",L("palette-info-main")),j(E.Alert,"successFilledBg",L("palette-success-main")),j(E.Alert,"warningFilledBg",L("palette-warning-main")),j(E.Alert,"errorFilledColor",sn(()=>E.getContrastText(E.error.main))),j(E.Alert,"infoFilledColor",sn(()=>E.getContrastText(E.info.main))),j(E.Alert,"successFilledColor",sn(()=>E.getContrastText(E.success.main))),j(E.Alert,"warningFilledColor",sn(()=>E.getContrastText(E.warning.main))),j(E.Alert,"errorStandardBg",Re(E.error.light,.9)),j(E.Alert,"infoStandardBg",Re(E.info.light,.9)),j(E.Alert,"successStandardBg",Re(E.success.light,.9)),j(E.Alert,"warningStandardBg",Re(E.warning.light,.9)),j(E.Alert,"errorIconColor",L("palette-error-main")),j(E.Alert,"infoIconColor",L("palette-info-main")),j(E.Alert,"successIconColor",L("palette-success-main")),j(E.Alert,"warningIconColor",L("palette-warning-main")),j(E.AppBar,"defaultBg",L("palette-grey-100")),j(E.Avatar,"defaultBg",L("palette-grey-400")),j(E.Button,"inheritContainedBg",L("palette-grey-300")),j(E.Button,"inheritContainedHoverBg",L("palette-grey-A100")),j(E.Chip,"defaultBorder",L("palette-grey-400")),j(E.Chip,"defaultAvatarColor",L("palette-grey-700")),j(E.Chip,"defaultIconColor",L("palette-grey-700")),j(E.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),j(E.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),j(E.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),j(E.LinearProgress,"primaryBg",Re(E.primary.main,.62)),j(E.LinearProgress,"secondaryBg",Re(E.secondary.main,.62)),j(E.LinearProgress,"errorBg",Re(E.error.main,.62)),j(E.LinearProgress,"infoBg",Re(E.info.main,.62)),j(E.LinearProgress,"successBg",Re(E.success.main,.62)),j(E.LinearProgress,"warningBg",Re(E.warning.main,.62)),j(E.Skeleton,"bg",`rgba(${L("palette-text-primaryChannel")} / 0.11)`),j(E.Slider,"primaryTrack",Re(E.primary.main,.62)),j(E.Slider,"secondaryTrack",Re(E.secondary.main,.62)),j(E.Slider,"errorTrack",Re(E.error.main,.62)),j(E.Slider,"infoTrack",Re(E.info.main,.62)),j(E.Slider,"successTrack",Re(E.success.main,.62)),j(E.Slider,"warningTrack",Re(E.warning.main,.62));const O=is(E.background.default,.8);j(E.SnackbarContent,"bg",O),j(E.SnackbarContent,"color",sn(()=>E.getContrastText(O))),j(E.SpeedDialAction,"fabHoverBg",is(E.background.paper,.15)),j(E.StepConnector,"border",L("palette-grey-400")),j(E.StepContent,"border",L("palette-grey-400")),j(E.Switch,"defaultColor",L("palette-common-white")),j(E.Switch,"defaultDisabledColor",L("palette-grey-100")),j(E.Switch,"primaryDisabledColor",Re(E.primary.main,.62)),j(E.Switch,"secondaryDisabledColor",Re(E.secondary.main,.62)),j(E.Switch,"errorDisabledColor",Re(E.error.main,.62)),j(E.Switch,"infoDisabledColor",Re(E.info.main,.62)),j(E.Switch,"successDisabledColor",Re(E.success.main,.62)),j(E.Switch,"warningDisabledColor",Re(E.warning.main,.62)),j(E.TableCell,"border",Re(rs(E.divider,1),.88)),j(E.Tooltip,"bg",rs(E.grey[700],.92))}if(E.mode==="dark"){j(E.Alert,"errorColor",Re(E.error.light,.6)),j(E.Alert,"infoColor",Re(E.info.light,.6)),j(E.Alert,"successColor",Re(E.success.light,.6)),j(E.Alert,"warningColor",Re(E.warning.light,.6)),j(E.Alert,"errorFilledBg",L("palette-error-dark")),j(E.Alert,"infoFilledBg",L("palette-info-dark")),j(E.Alert,"successFilledBg",L("palette-success-dark")),j(E.Alert,"warningFilledBg",L("palette-warning-dark")),j(E.Alert,"errorFilledColor",sn(()=>E.getContrastText(E.error.dark))),j(E.Alert,"infoFilledColor",sn(()=>E.getContrastText(E.info.dark))),j(E.Alert,"successFilledColor",sn(()=>E.getContrastText(E.success.dark))),j(E.Alert,"warningFilledColor",sn(()=>E.getContrastText(E.warning.dark))),j(E.Alert,"errorStandardBg",Pe(E.error.light,.9)),j(E.Alert,"infoStandardBg",Pe(E.info.light,.9)),j(E.Alert,"successStandardBg",Pe(E.success.light,.9)),j(E.Alert,"warningStandardBg",Pe(E.warning.light,.9)),j(E.Alert,"errorIconColor",L("palette-error-main")),j(E.Alert,"infoIconColor",L("palette-info-main")),j(E.Alert,"successIconColor",L("palette-success-main")),j(E.Alert,"warningIconColor",L("palette-warning-main")),j(E.AppBar,"defaultBg",L("palette-grey-900")),j(E.AppBar,"darkBg",L("palette-background-paper")),j(E.AppBar,"darkColor",L("palette-text-primary")),j(E.Avatar,"defaultBg",L("palette-grey-600")),j(E.Button,"inheritContainedBg",L("palette-grey-800")),j(E.Button,"inheritContainedHoverBg",L("palette-grey-700")),j(E.Chip,"defaultBorder",L("palette-grey-700")),j(E.Chip,"defaultAvatarColor",L("palette-grey-300")),j(E.Chip,"defaultIconColor",L("palette-grey-300")),j(E.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),j(E.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),j(E.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),j(E.LinearProgress,"primaryBg",Pe(E.primary.main,.5)),j(E.LinearProgress,"secondaryBg",Pe(E.secondary.main,.5)),j(E.LinearProgress,"errorBg",Pe(E.error.main,.5)),j(E.LinearProgress,"infoBg",Pe(E.info.main,.5)),j(E.LinearProgress,"successBg",Pe(E.success.main,.5)),j(E.LinearProgress,"warningBg",Pe(E.warning.main,.5)),j(E.Skeleton,"bg",`rgba(${L("palette-text-primaryChannel")} / 0.13)`),j(E.Slider,"primaryTrack",Pe(E.primary.main,.5)),j(E.Slider,"secondaryTrack",Pe(E.secondary.main,.5)),j(E.Slider,"errorTrack",Pe(E.error.main,.5)),j(E.Slider,"infoTrack",Pe(E.info.main,.5)),j(E.Slider,"successTrack",Pe(E.success.main,.5)),j(E.Slider,"warningTrack",Pe(E.warning.main,.5));const O=is(E.background.default,.98);j(E.SnackbarContent,"bg",O),j(E.SnackbarContent,"color",sn(()=>E.getContrastText(O))),j(E.SpeedDialAction,"fabHoverBg",is(E.background.paper,.15)),j(E.StepConnector,"border",L("palette-grey-600")),j(E.StepContent,"border",L("palette-grey-600")),j(E.Switch,"defaultColor",L("palette-grey-300")),j(E.Switch,"defaultDisabledColor",L("palette-grey-600")),j(E.Switch,"primaryDisabledColor",Pe(E.primary.main,.55)),j(E.Switch,"secondaryDisabledColor",Pe(E.secondary.main,.55)),j(E.Switch,"errorDisabledColor",Pe(E.error.main,.55)),j(E.Switch,"infoDisabledColor",Pe(E.info.main,.55)),j(E.Switch,"successDisabledColor",Pe(E.success.main,.55)),j(E.Switch,"warningDisabledColor",Pe(E.warning.main,.55)),j(E.TableCell,"border",Pe(rs(E.divider,1),.68)),j(E.Tooltip,"bg",rs(E.grey[700],.92))}fn(E.background,"default"),fn(E.background,"paper"),fn(E.common,"background"),fn(E.common,"onBackground"),fn(E,"divider"),Object.keys(E).forEach(O=>{const z=E[O];O!=="tonalOffset"&&z&&typeof z=="object"&&(z.main&&j(E[O],"mainChannel",li(ci(z.main))),z.light&&j(E[O],"lightChannel",li(ci(z.light))),z.dark&&j(E[O],"darkChannel",li(ci(z.dark))),z.contrastText&&j(E[O],"contrastTextChannel",li(ci(z.contrastText))),O==="text"&&(fn(E[O],"primary"),fn(E[O],"secondary")),O==="action"&&(z.active&&fn(E[O],"active"),z.selected&&fn(E[O],"selected")))})}),w=t.reduce((J,E)=>jt(J,E),w);const D={prefix:s,disableCssColorScheme:i,shouldSkipGeneratingVar:a,getSelector:Ug(w)},{vars:N,generateThemeVars:B,generateStyleSheets:Z}=mg(w,D);return w.vars=N,Object.entries(w.colorSchemes[w.defaultColorScheme]).forEach(([J,E])=>{w[J]=E}),w.generateThemeVars=B,w.generateStyleSheets=Z,w.generateSpacing=function(){return We.createSpacing(l.spacing,xu(this))},w.getColorSchemeSelector=bg(o),w.spacing=w.generateSpacing(),w.shouldSkipGeneratingVar=a,w.unstable_sxConfig={...fa,...l?.unstable_sxConfig},w.unstable_sx=function(E){return wr({sx:E,theme:this})},w.toRuntimeSource=Th,w}function Zl(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Au({...n===!0?{}:n.palette,mode:t})})}function Wg(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:s=n?.mode,...a}=e,o=s||"light",u=i?.[o],l={...i,...n?{[o]:{...typeof u!="boolean"&&u,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return Po(e,...t);let d=n;"palette"in e||l[o]&&(l[o]!==!0?d=l[o].palette:o==="dark"&&(d={mode:"dark"}));const c=Po({...e,palette:d},...t);return c.defaultColorScheme=o,c.colorSchemes=l,c.palette.mode==="light"&&(c.colorSchemes.light={...l.light!==!0&&l.light,palette:c.palette},Zl(c,"dark",l.dark)),c.palette.mode==="dark"&&(c.colorSchemes.dark={...l.dark!==!0&&l.dark,palette:c.palette},Zl(c,"light",l.light)),c}return!n&&!("light"in l)&&o==="light"&&(l.light=!0),Vg({...a,colorSchemes:l,defaultColorScheme:o,...typeof r!="boolean"&&r},...t)}const ku=Wg(),_u="$$material";function Gg(){const e=We.useTheme(ku);return e[_u]||e}function Yg(e){const{variants:t,...n}=e,r={variants:t,style:Gl(n),isProcessed:!0};return r.style===n||t&&t.forEach(i=>{typeof i.style!="function"&&(i.style=Gl(i.style))}),r}const Kg=Iu();function Mn(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Qg(e){return e?(t,n)=>n[e]:null}function Xg(e,t,n){e.theme=eb(e.theme)?n:e.theme[t]||e.theme}function Es(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(r=>Es(e,r));if(Array.isArray(n?.variants)){let r;if(n.isProcessed)r=n.style;else{const{variants:i,...s}=n;r=s}return Ah(e,n.variants,[r])}return n?.isProcessed?n.style:n}function Ah(e,t,n=[]){let r;e:for(let i=0;i<t.length;i+=1){const s=t[i];if(typeof s.props=="function"){if(r??={...e,...e.ownerState,ownerState:e.ownerState},!s.props(r))continue}else for(const a in s.props)if(e[a]!==s.props[a]&&e.ownerState?.[a]!==s.props[a])continue e;typeof s.style=="function"?(r??={...e,...e.ownerState,ownerState:e.ownerState},n.push(s.style(r))):n.push(s.style)}return n}function Zg(e={}){const{themeId:t,defaultTheme:n=Kg,rootShouldForwardProp:r=Mn,slotShouldForwardProp:i=Mn}=e;function s(o){Xg(o,t,n)}return(o,u={})=>{ig(o,D=>D.filter(N=>N!==wr));const{name:l,slot:d,skipVariantsResolver:c,skipSx:m,overridesResolver:p=Qg(nb(d)),...g}=u,b=c!==void 0?c:d&&d!=="Root"&&d!=="root"||!1,T=m||!1;let x=Mn;d==="Root"||d==="root"?x=r:d?x=i:tb(o)&&(x=void 0);const C=rg(o,{shouldForwardProp:x,label:Jg(),...g}),S=D=>{if(D.__emotion_real===D)return D;if(typeof D=="function")return function(B){return Es(B,D)};if(xn(D)){const N=Yg(D);return N.variants?function(Z){return Es(Z,N)}:N.style}return D},w=(...D)=>{const N=[],B=D.map(S),Z=[];if(N.push(s),l&&p&&Z.push(function(O){const M=O.theme.components?.[l]?.styleOverrides;if(!M)return null;const K={};for(const se in M)K[se]=Es(O,M[se]);return p(O,K)}),l&&!b&&Z.push(function(O){const M=O.theme?.components?.[l]?.variants;return M?Ah(O,M):null}),T||Z.push(wr),Array.isArray(B[0])){const L=B.shift(),O=new Array(N.length).fill(""),z=new Array(Z.length).fill("");let M;M=[...O,...L,...z],M.raw=[...O,...L.raw,...z],N.unshift(M)}const J=[...N,...B,...Z],E=C(...J);return o.muiName&&(E.muiName=o.muiName),E};return C.withConfig&&(w.withConfig=C.withConfig),w}}function Jg(e,t){return void 0}function eb(e){for(const t in e)return!1;return!0}function tb(e){return typeof e=="string"&&e.charCodeAt(0)>96}function nb(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function rb(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const vu=e=>rb(e)&&e!=="classes",Be=Zg({themeId:_u,defaultTheme:ku,rootShouldForwardProp:vu}),Du=We.unstable_memoTheme;function Mr(e){return hg(e)}function Br(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=Fr(e,i,n)}),r}function ib(e){return Fr("MuiSvgIcon",e)}Br("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const sb=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${tn(t)}`,`fontSize${tn(n)}`]};return Hi(i,ib,r)},ab=Be("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${tn(n.color)}`],t[`fontSize${tn(n.fontSize)}`]]}})(Du(({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}}]}))),Ro=$.forwardRef(function(t,n){const r=Mr({props:t,name:"MuiSvgIcon"}),{children:i,className:s,color:a="inherit",component:o="svg",fontSize:u="medium",htmlColor:l,inheritViewBox:d=!1,titleAccess:c,viewBox:m="0 0 24 24",...p}=r,g=$.isValidElement(i)&&i.type==="svg",b={...r,color:a,component:o,fontSize:u,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:m,hasSvgAsChild:g},T={};d||(T.viewBox=m);const x=sb(b);return h.jsxs(ab,{as:o,className:Ye(x.root,s),focusable:"false",color:l,"aria-hidden":c?void 0:!0,role:c?"img":void 0,ref:n,...T,...p,...g&&i.props,ownerState:b,children:[g?i.props.children:i,c?h.jsx("title",{children:c}):null]})});Ro.muiName="SvgIcon";function Me(e,t){function n(r,i){return h.jsx(Ro,{"data-testid":void 0,ref:i,...r,children:e})}return n.muiName=Ro.muiName,$.memo($.forwardRef(n))}function ob(e){const{controlled:t,default:n}=e,{current:r}=$.useRef(t!==void 0),[i,s]=$.useState(n),a=r?t:i,o=$.useCallback(u=>{r||s(u)},[]);return[a,o]}function xs(e){const t=$.useRef(e);return sg(()=>{t.current=e}),$.useRef((...n)=>(0,t.current)(...n)).current}function Os(...e){const t=$.useRef(void 0),n=$.useCallback(r=>{const i=e.map(s=>{if(s==null)return null;if(typeof s=="function"){const a=s,o=a(r);return typeof o=="function"?o:()=>{a(null)}}return s.current=r,()=>{s.current=null}});return()=>{i.forEach(s=>s?.())}},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 ub(e,t){const n=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&n>=65&&n<=90&&typeof t=="function"}function lb(e,t){if(!e)return t;function n(a,o){const u={};return Object.keys(o).forEach(l=>{ub(l,o[l])&&typeof a[l]=="function"&&(u[l]=(...d)=>{a[l](...d),o[l](...d)})}),u}if(typeof e=="function"||typeof t=="function")return a=>{const o=typeof t=="function"?t(a):t,u=typeof e=="function"?e({...a,...o}):e,l=Ye(a?.className,o?.className,u?.className),d=n(u,o);return{...o,...u,...d,...!!l&&{className:l},...o?.style&&u?.style&&{style:{...o.style,...u.style}},...o?.sx&&u?.sx&&{sx:[...Array.isArray(o.sx)?o.sx:[o.sx],...Array.isArray(u.sx)?u.sx:[u.sx]]}}};const r=t,i=n(e,r),s=Ye(r?.className,e?.className);return{...t,...e,...i,...!!s&&{className:s},...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 ma=Me(h.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"})),$i=Me(h.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"})),Ge="http://localhost/api/v0".replace(/\/+$/,"");class jn{constructor(t,n=Ge,r=Ve){this.basePath=n,this.axios=r,t&&(this.configuration=t,this.basePath=t.basePath??n)}configuration}class cb extends Error{constructor(t,n){super(n),this.field=t,this.name="RequiredError"}}const et={},tt="https://example.com",Ae=function(e,t,n){if(n==null)throw new cb(t,`Required parameter ${t} was null or undefined when calling ${e}.`)};function Lo(e,t,n=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(r=>Lo(e,r,n)):Object.keys(t).forEach(r=>Lo(e,t[r],`${n}${n!==""?".":""}${r}`)):e.has(n)?e.append(n,t):e.set(n,t))}const nt=function(e,...t){const n=new URLSearchParams(e.search);Lo(n,t),e.search=n.toString()},rt=function(e){return e.pathname+e.search+e.hash},it=function(e,t,n,r){return(i=t,s=n)=>{const a={...e.options,url:(i.defaults.baseURL?"":r?.basePath??s)+e.url};return i.request(a)}},db=function(e){return{getConnection:async(t,n,r={})=>{Ae("getConnection","projectName",t),Ae("getConnection","connectionName",n);const i="/projects/{projectName}/connections/{connectionName}".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),s=new URL(i,tt);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...r},u={};nt(s,{});let d=a&&a.headers?a.headers:{};return o.headers={...u,...d,...r.headers},{url:rt(s),options:o}},getQuerydata:async(t,n,r,i,s={})=>{Ae("getQuerydata","projectName",t),Ae("getQuerydata","connectionName",n);const a="/projects/{projectName}/connections/{connectionName}/queryData".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),o=new URL(a,tt);let u;e&&(u=e.baseOptions);const l={method:"GET",...u,...s},d={},c={};r!==void 0&&(c.sqlStatement=r),i!==void 0&&(c.options=i),nt(o,c);let m=u&&u.headers?u.headers:{};return l.headers={...d,...m,...s.headers},{url:rt(o),options:l}},getSqlsource:async(t,n,r,i={})=>{Ae("getSqlsource","projectName",t),Ae("getSqlsource","connectionName",n);const s="/projects/{projectName}/connections/{connectionName}/sqlSource".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),a=new URL(s,tt);let o;e&&(o=e.baseOptions);const u={method:"GET",...o,...i},l={},d={};r!==void 0&&(d.sqlStatement=r),nt(a,d);let c=o&&o.headers?o.headers:{};return u.headers={...l,...c,...i.headers},{url:rt(a),options:u}},getTablesource:async(t,n,r,i,s={})=>{Ae("getTablesource","projectName",t),Ae("getTablesource","connectionName",n);const a="/projects/{projectName}/connections/{connectionName}/tableSource".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),o=new URL(a,tt);let u;e&&(u=e.baseOptions);const l={method:"GET",...u,...s},d={},c={};r!==void 0&&(c.tableKey=r),i!==void 0&&(c.tablePath=i),nt(o,c);let m=u&&u.headers?u.headers:{};return l.headers={...d,...m,...s.headers},{url:rt(o),options:l}},getTemporarytable:async(t,n,r,i={})=>{Ae("getTemporarytable","projectName",t),Ae("getTemporarytable","connectionName",n);const s="/projects/{projectName}/connections/{connectionName}/temporaryTable".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),a=new URL(s,tt);let o;e&&(o=e.baseOptions);const u={method:"GET",...o,...i},l={},d={};r!==void 0&&(d.sqlStatement=r),nt(a,d);let c=o&&o.headers?o.headers:{};return u.headers={...l,...c,...i.headers},{url:rt(a),options:u}},getTest:async(t,n,r={})=>{Ae("getTest","projectName",t),Ae("getTest","connectionName",n);const i="/projects/{projectName}/connections/{connectionName}/test".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),s=new URL(i,tt);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...r},u={};nt(s,{});let d=a&&a.headers?a.headers:{};return o.headers={...u,...d,...r.headers},{url:rt(s),options:o}},listConnections:async(t,n={})=>{Ae("listConnections","projectName",t);const r="/projects/{projectName}/connections".replace("{projectName}",encodeURIComponent(String(t))),i=new URL(r,tt);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...n},o={};nt(i,{});let l=s&&s.headers?s.headers:{};return a.headers={...o,...l,...n.headers},{url:rt(i),options:a}},listSchemas:async(t,n,r={})=>{Ae("listSchemas","projectName",t),Ae("listSchemas","connectionName",n);const i="/projects/{projectName}/connections/{connectionName}/schemas".replace("{projectName}",encodeURIComponent(String(t))).replace("{connectionName}",encodeURIComponent(String(n))),s=new URL(i,tt);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...r},u={};nt(s,{});let d=a&&a.headers?a.headers:{};return o.headers={...u,...d,...r.headers},{url:rt(s),options:o}},listTables:async(t,n,r,i={})=>{Ae("listTables","projectName",t),Ae("listTables","connectionName",n),Ae("listTables","schemaName",r);const s="/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(s,tt);let o;e&&(o=e.baseOptions);const u={method:"GET",...o,...i},l={};nt(a,{});let c=o&&o.headers?o.headers:{};return u.headers={...l,...c,...i.headers},{url:rt(a),options:u}}}},pn=function(e){const t=db(e);return{async getConnection(n,r,i){const s=await t.getConnection(n,r,i),a=e?.serverIndex??0,o=et["ConnectionsApi.getConnection"]?.[a]?.url;return(u,l)=>it(s,Ve,Ge,e)(u,o||l)},async getQuerydata(n,r,i,s,a){const o=await t.getQuerydata(n,r,i,s,a),u=e?.serverIndex??0,l=et["ConnectionsApi.getQuerydata"]?.[u]?.url;return(d,c)=>it(o,Ve,Ge,e)(d,l||c)},async getSqlsource(n,r,i,s){const a=await t.getSqlsource(n,r,i,s),o=e?.serverIndex??0,u=et["ConnectionsApi.getSqlsource"]?.[o]?.url;return(l,d)=>it(a,Ve,Ge,e)(l,u||d)},async getTablesource(n,r,i,s,a){const o=await t.getTablesource(n,r,i,s,a),u=e?.serverIndex??0,l=et["ConnectionsApi.getTablesource"]?.[u]?.url;return(d,c)=>it(o,Ve,Ge,e)(d,l||c)},async getTemporarytable(n,r,i,s){const a=await t.getTemporarytable(n,r,i,s),o=e?.serverIndex??0,u=et["ConnectionsApi.getTemporarytable"]?.[o]?.url;return(l,d)=>it(a,Ve,Ge,e)(l,u||d)},async getTest(n,r,i){const s=await t.getTest(n,r,i),a=e?.serverIndex??0,o=et["ConnectionsApi.getTest"]?.[a]?.url;return(u,l)=>it(s,Ve,Ge,e)(u,o||l)},async listConnections(n,r){const i=await t.listConnections(n,r),s=e?.serverIndex??0,a=et["ConnectionsApi.listConnections"]?.[s]?.url;return(o,u)=>it(i,Ve,Ge,e)(o,a||u)},async listSchemas(n,r,i){const s=await t.listSchemas(n,r,i),a=e?.serverIndex??0,o=et["ConnectionsApi.listSchemas"]?.[a]?.url;return(u,l)=>it(s,Ve,Ge,e)(u,o||l)},async listTables(n,r,i,s){const a=await t.listTables(n,r,i,s),o=e?.serverIndex??0,u=et["ConnectionsApi.listTables"]?.[o]?.url;return(l,d)=>it(a,Ve,Ge,e)(l,u||d)}}};class Ih extends jn{getConnection(t,n,r){return pn(this.configuration).getConnection(t,n,r).then(i=>i(this.axios,this.basePath))}getQuerydata(t,n,r,i,s){return pn(this.configuration).getQuerydata(t,n,r,i,s).then(a=>a(this.axios,this.basePath))}getSqlsource(t,n,r,i){return pn(this.configuration).getSqlsource(t,n,r,i).then(s=>s(this.axios,this.basePath))}getTablesource(t,n,r,i,s){return pn(this.configuration).getTablesource(t,n,r,i,s).then(a=>a(this.axios,this.basePath))}getTemporarytable(t,n,r,i){return pn(this.configuration).getTemporarytable(t,n,r,i).then(s=>s(this.axios,this.basePath))}getTest(t,n,r){return pn(this.configuration).getTest(t,n,r).then(i=>i(this.axios,this.basePath))}listConnections(t,n){return pn(this.configuration).listConnections(t,n).then(r=>r(this.axios,this.basePath))}listSchemas(t,n,r){return pn(this.configuration).listSchemas(t,n,r).then(i=>i(this.axios,this.basePath))}listTables(t,n,r,i){return pn(this.configuration).listTables(t,n,r,i).then(s=>s(this.axios,this.basePath))}}const hb=function(e){return{listDatabases:async(t,n,r,i={})=>{Ae("listDatabases","projectName",t),Ae("listDatabases","packageName",n);const s="/projects/{projectName}/packages/{packageName}/databases".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))),a=new URL(s,tt);let o;e&&(o=e.baseOptions);const u={method:"GET",...o,...i},l={},d={};r!==void 0&&(d.versionId=r),nt(a,d);let c=o&&o.headers?o.headers:{};return u.headers={...l,...c,...i.headers},{url:rt(a),options:u}}}},fb=function(e){const t=hb(e);return{async listDatabases(n,r,i,s){const a=await t.listDatabases(n,r,i,s),o=e?.serverIndex??0,u=et["DatabasesApi.listDatabases"]?.[o]?.url;return(l,d)=>it(a,Ve,Ge,e)(l,u||d)}}};class pb extends jn{listDatabases(t,n,r,i){return fb(this.configuration).listDatabases(t,n,r,i).then(s=>s(this.axios,this.basePath))}}const mb=function(e){return{getModel:async(t,n,r,i,s={})=>{Ae("getModel","projectName",t),Ae("getModel","packageName",n),Ae("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))),o=new URL(a,tt);let u;e&&(u=e.baseOptions);const l={method:"GET",...u,...s},d={},c={};i!==void 0&&(c.versionId=i),nt(o,c);let m=u&&u.headers?u.headers:{};return l.headers={...d,...m,...s.headers},{url:rt(o),options:l}},listModels:async(t,n,r,i={})=>{Ae("listModels","projectName",t),Ae("listModels","packageName",n);const s="/projects/{projectName}/packages/{packageName}/models".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))),a=new URL(s,tt);let o;e&&(o=e.baseOptions);const u={method:"GET",...o,...i},l={},d={};r!==void 0&&(d.versionId=r),nt(a,d);let c=o&&o.headers?o.headers:{};return u.headers={...l,...c,...i.headers},{url:rt(a),options:u}}}},Jl=function(e){const t=mb(e);return{async getModel(n,r,i,s,a){const o=await t.getModel(n,r,i,s,a),u=e?.serverIndex??0,l=et["ModelsApi.getModel"]?.[u]?.url;return(d,c)=>it(o,Ve,Ge,e)(d,l||c)},async listModels(n,r,i,s){const a=await t.listModels(n,r,i,s),o=e?.serverIndex??0,u=et["ModelsApi.listModels"]?.[o]?.url;return(l,d)=>it(a,Ve,Ge,e)(l,u||d)}}};class ga extends jn{getModel(t,n,r,i,s){return Jl(this.configuration).getModel(t,n,r,i,s).then(a=>a(this.axios,this.basePath))}listModels(t,n,r,i){return Jl(this.configuration).listModels(t,n,r,i).then(s=>s(this.axios,this.basePath))}}const gb=function(e){return{getNotebook:async(t,n,r,i,s={})=>{Ae("getNotebook","projectName",t),Ae("getNotebook","packageName",n),Ae("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))),o=new URL(a,tt);let u;e&&(u=e.baseOptions);const l={method:"GET",...u,...s},d={},c={};i!==void 0&&(c.versionId=i),nt(o,c);let m=u&&u.headers?u.headers:{};return l.headers={...d,...m,...s.headers},{url:rt(o),options:l}},listNotebooks:async(t,n,r,i={})=>{Ae("listNotebooks","projectName",t),Ae("listNotebooks","packageName",n);const s="/projects/{projectName}/packages/{packageName}/notebooks".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))),a=new URL(s,tt);let o;e&&(o=e.baseOptions);const u={method:"GET",...o,...i},l={},d={};r!==void 0&&(d.versionId=r),nt(a,d);let c=o&&o.headers?o.headers:{};return u.headers={...l,...c,...i.headers},{url:rt(a),options:u}}}},ec=function(e){const t=gb(e);return{async getNotebook(n,r,i,s,a){const o=await t.getNotebook(n,r,i,s,a),u=e?.serverIndex??0,l=et["NotebooksApi.getNotebook"]?.[u]?.url;return(d,c)=>it(o,Ve,Ge,e)(d,l||c)},async listNotebooks(n,r,i,s){const a=await t.listNotebooks(n,r,i,s),o=e?.serverIndex??0,u=et["NotebooksApi.listNotebooks"]?.[o]?.url;return(l,d)=>it(a,Ve,Ge,e)(l,u||d)}}};class kh extends jn{getNotebook(t,n,r,i,s){return ec(this.configuration).getNotebook(t,n,r,i,s).then(a=>a(this.axios,this.basePath))}listNotebooks(t,n,r,i){return ec(this.configuration).listNotebooks(t,n,r,i).then(s=>s(this.axios,this.basePath))}}const bb=function(e){return{getPackage:async(t,n,r,i,s={})=>{Ae("getPackage","projectName",t),Ae("getPackage","packageName",n);const a="/projects/{projectName}/packages/{packageName}".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))),o=new URL(a,tt);let u;e&&(u=e.baseOptions);const l={method:"GET",...u,...s},d={},c={};r!==void 0&&(c.versionId=r),i!==void 0&&(c.reload=i),nt(o,c);let m=u&&u.headers?u.headers:{};return l.headers={...d,...m,...s.headers},{url:rt(o),options:l}},listPackages:async(t,n={})=>{Ae("listPackages","projectName",t);const r="/projects/{projectName}/packages".replace("{projectName}",encodeURIComponent(String(t))),i=new URL(r,tt);let s;e&&(s=e.baseOptions);const a={method:"GET",...s,...n},o={};nt(i,{});let l=s&&s.headers?s.headers:{};return a.headers={...o,...l,...n.headers},{url:rt(i),options:a}}}},tc=function(e){const t=bb(e);return{async getPackage(n,r,i,s,a){const o=await t.getPackage(n,r,i,s,a),u=e?.serverIndex??0,l=et["PackagesApi.getPackage"]?.[u]?.url;return(d,c)=>it(o,Ve,Ge,e)(d,l||c)},async listPackages(n,r){const i=await t.listPackages(n,r),s=e?.serverIndex??0,a=et["PackagesApi.listPackages"]?.[s]?.url;return(o,u)=>it(i,Ve,Ge,e)(o,a||u)}}};class _h extends jn{getPackage(t,n,r,i,s){return tc(this.configuration).getPackage(t,n,r,i,s).then(a=>a(this.axios,this.basePath))}listPackages(t,n){return tc(this.configuration).listPackages(t,n).then(r=>r(this.axios,this.basePath))}}const Eb=function(e){return{getProject:async(t,n,r={})=>{Ae("getProject","projectName",t);const i="/projects/{projectName}".replace("{projectName}",encodeURIComponent(String(t))),s=new URL(i,tt);let a;e&&(a=e.baseOptions);const o={method:"GET",...a,...r},u={},l={};n!==void 0&&(l.reload=n),nt(s,l);let d=a&&a.headers?a.headers:{};return o.headers={...u,...d,...r.headers},{url:rt(s),options:o}},listProjects:async(t={})=>{const n="/projects",r=new URL(n,tt);let i;e&&(i=e.baseOptions);const s={method:"GET",...i,...t},a={};nt(r,{});let u=i&&i.headers?i.headers:{};return s.headers={...a,...u,...t.headers},{url:rt(r),options:s}}}},nc=function(e){const t=Eb(e);return{async getProject(n,r,i){const s=await t.getProject(n,r,i),a=e?.serverIndex??0,o=et["ProjectsApi.getProject"]?.[a]?.url;return(u,l)=>it(s,Ve,Ge,e)(u,o||l)},async listProjects(n){const r=await t.listProjects(n),i=e?.serverIndex??0,s=et["ProjectsApi.listProjects"]?.[i]?.url;return(a,o)=>it(r,Ve,Ge,e)(a,s||o)}}};class vh extends jn{getProject(t,n,r){return nc(this.configuration).getProject(t,n,r).then(i=>i(this.axios,this.basePath))}listProjects(t){return nc(this.configuration).listProjects(t).then(n=>n(this.axios,this.basePath))}}const xb=function(e){return{executeQuery:async(t,n,r,i,s,a,o,u={})=>{Ae("executeQuery","projectName",t),Ae("executeQuery","packageName",n),Ae("executeQuery","path",r);const l="/projects/{projectName}/packages/{packageName}/queryResults/{path}".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))).replace("{path}",encodeURIComponent(String(r))),d=new URL(l,tt);let c;e&&(c=e.baseOptions);const m={method:"GET",...c,...u},p={},g={};i!==void 0&&(g.query=i),s!==void 0&&(g.sourceName=s),a!==void 0&&(g.queryName=a),o!==void 0&&(g.versionId=o),nt(d,g);let b=c&&c.headers?c.headers:{};return m.headers={...p,...b,...u.headers},{url:rt(d),options:m}}}},yb=function(e){const t=xb(e);return{async executeQuery(n,r,i,s,a,o,u,l){const d=await t.executeQuery(n,r,i,s,a,o,u,l),c=e?.serverIndex??0,m=et["QueryresultsApi.executeQuery"]?.[c]?.url;return(p,g)=>it(d,Ve,Ge,e)(p,m||g)}}};class Dh extends jn{executeQuery(t,n,r,i,s,a,o,u){return yb(this.configuration).executeQuery(t,n,r,i,s,a,o,u).then(l=>l(this.axios,this.basePath))}}const Tb=function(e){return{listSchedules:async(t,n,r,i={})=>{Ae("listSchedules","projectName",t),Ae("listSchedules","packageName",n);const s="/projects/{projectName}/packages/{packageName}/schedules".replace("{projectName}",encodeURIComponent(String(t))).replace("{packageName}",encodeURIComponent(String(n))),a=new URL(s,tt);let o;e&&(o=e.baseOptions);const u={method:"GET",...o,...i},l={},d={};r!==void 0&&(d.versionId=r),nt(a,d);let c=o&&o.headers?o.headers:{};return u.headers={...l,...c,...i.headers},{url:rt(a),options:u}}}},Cb=function(e){const t=Tb(e);return{async listSchedules(n,r,i,s){const a=await t.listSchedules(n,r,i,s),o=e?.serverIndex??0,u=et["SchedulesApi.listSchedules"]?.[o]?.url;return(l,d)=>it(a,Ve,Ge,e)(l,u||d)}}};class Sb extends jn{listSchedules(t,n,r,i){return Cb(this.configuration).listSchedules(t,n,r,i).then(s=>s(this.axios,this.basePath))}}class xt{apiKey;username;password;accessToken;basePath;serverIndex;baseOptions;formDataCtor;constructor(t={}){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 wh=[{id:"abap",name:"ABAP",import:()=>Promise.resolve().then(()=>require("./abap-Dwt2rH6y.cjs"))},{id:"actionscript-3",name:"ActionScript",import:()=>Promise.resolve().then(()=>require("./actionscript-3-mj8Uhnsc.cjs"))},{id:"ada",name:"Ada",import:()=>Promise.resolve().then(()=>require("./ada-DZM58Vqs.cjs"))},{id:"angular-html",name:"Angular HTML",import:()=>Promise.resolve().then(()=>require("./angular-html-BqlvNDNu.cjs")).then(e=>e.angularHtml)},{id:"angular-ts",name:"Angular TypeScript",import:()=>Promise.resolve().then(()=>require("./angular-ts-4ebgyujK.cjs"))},{id:"apache",name:"Apache Conf",import:()=>Promise.resolve().then(()=>require("./apache-D7v5fxtZ.cjs"))},{id:"apex",name:"Apex",import:()=>Promise.resolve().then(()=>require("./apex-4hrAnw0a.cjs"))},{id:"apl",name:"APL",import:()=>Promise.resolve().then(()=>require("./apl-BeeGx1jW.cjs"))},{id:"applescript",name:"AppleScript",import:()=>Promise.resolve().then(()=>require("./applescript-Cnd3Dxju.cjs"))},{id:"ara",name:"Ara",import:()=>Promise.resolve().then(()=>require("./ara-BQ2aGbFQ.cjs"))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>Promise.resolve().then(()=>require("./asciidoc-C6nYvw8K.cjs"))},{id:"asm",name:"Assembly",import:()=>Promise.resolve().then(()=>require("./asm-CQnBVCj-.cjs"))},{id:"astro",name:"Astro",import:()=>Promise.resolve().then(()=>require("./astro-UBxncqOW.cjs"))},{id:"awk",name:"AWK",import:()=>Promise.resolve().then(()=>require("./awk-DUx4h__E.cjs"))},{id:"ballerina",name:"Ballerina",import:()=>Promise.resolve().then(()=>require("./ballerina-CXlzbmzl.cjs"))},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>Promise.resolve().then(()=>require("./bat-DlMT9sut.cjs"))},{id:"beancount",name:"Beancount",import:()=>Promise.resolve().then(()=>require("./beancount-CyyiuUzM.cjs"))},{id:"berry",name:"Berry",aliases:["be"],import:()=>Promise.resolve().then(()=>require("./berry-B0EjuzrL.cjs"))},{id:"bibtex",name:"BibTeX",import:()=>Promise.resolve().then(()=>require("./bibtex-CfoG9xRq.cjs"))},{id:"bicep",name:"Bicep",import:()=>Promise.resolve().then(()=>require("./bicep-D6PH_9IY.cjs"))},{id:"blade",name:"Blade",import:()=>Promise.resolve().then(()=>require("./blade-DYqOCSTj.cjs"))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>Promise.resolve().then(()=>require("./bsl-zRqJRzLj.cjs"))},{id:"c",name:"C",import:()=>Promise.resolve().then(()=>require("./c-C4sXGJZM.cjs"))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>Promise.resolve().then(()=>require("./cadence-Dq2CYzXG.cjs"))},{id:"cairo",name:"Cairo",import:()=>Promise.resolve().then(()=>require("./cairo-C5yDOd-R.cjs"))},{id:"clarity",name:"Clarity",import:()=>Promise.resolve().then(()=>require("./clarity-ytMkUD5Q.cjs"))},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>Promise.resolve().then(()=>require("./clojure-B_Wv414H.cjs"))},{id:"cmake",name:"CMake",import:()=>Promise.resolve().then(()=>require("./cmake-TBUaQXYY.cjs"))},{id:"cobol",name:"COBOL",import:()=>Promise.resolve().then(()=>require("./cobol-D9bHhy8D.cjs"))},{id:"codeowners",name:"CODEOWNERS",import:()=>Promise.resolve().then(()=>require("./codeowners-QhPK6lIJ.cjs"))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>Promise.resolve().then(()=>require("./codeql-B7Q9tkDJ.cjs"))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>Promise.resolve().then(()=>require("./coffee-ZdyLosN6.cjs"))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>Promise.resolve().then(()=>require("./common-lisp-Ced3ctK5.cjs"))},{id:"coq",name:"Coq",import:()=>Promise.resolve().then(()=>require("./coq-BTRB4iqi.cjs"))},{id:"cpp",name:"C++",aliases:["c++"],import:()=>Promise.resolve().then(()=>require("./cpp-DgQ-zDub.cjs"))},{id:"crystal",name:"Crystal",import:()=>Promise.resolve().then(()=>require("./crystal-C5h1rMTi.cjs"))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>Promise.resolve().then(()=>require("./csharp-TKds-MhG.cjs"))},{id:"css",name:"CSS",import:()=>Promise.resolve().then(()=>require("./css-B0kbn78J.cjs"))},{id:"csv",name:"CSV",import:()=>Promise.resolve().then(()=>require("./csv-BVJjiaC3.cjs"))},{id:"cue",name:"CUE",import:()=>Promise.resolve().then(()=>require("./cue-Cz4J-rnd.cjs"))},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>Promise.resolve().then(()=>require("./cypher-DuKTiyez.cjs"))},{id:"d",name:"D",import:()=>Promise.resolve().then(()=>require("./d-BW9Wd7aK.cjs"))},{id:"dart",name:"Dart",import:()=>Promise.resolve().then(()=>require("./dart-CWs-er6b.cjs"))},{id:"dax",name:"DAX",import:()=>Promise.resolve().then(()=>require("./dax-CDxFL2Kb.cjs"))},{id:"desktop",name:"Desktop",import:()=>Promise.resolve().then(()=>require("./desktop-CFgo0jo7.cjs"))},{id:"diff",name:"Diff",import:()=>Promise.resolve().then(()=>require("./diff-BsEkKwI8.cjs"))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>Promise.resolve().then(()=>require("./docker-hwiw4W8I.cjs"))},{id:"dotenv",name:"dotEnv",import:()=>Promise.resolve().then(()=>require("./dotenv-CJ5o3G1C.cjs"))},{id:"dream-maker",name:"Dream Maker",import:()=>Promise.resolve().then(()=>require("./dream-maker-DBharE9Q.cjs"))},{id:"edge",name:"Edge",import:()=>Promise.resolve().then(()=>require("./edge-D4UQJJI4.cjs"))},{id:"elixir",name:"Elixir",import:()=>Promise.resolve().then(()=>require("./elixir-Drlan-oo.cjs"))},{id:"elm",name:"Elm",import:()=>Promise.resolve().then(()=>require("./elm-BcZHvJ8F.cjs"))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>Promise.resolve().then(()=>require("./emacs-lisp-CDDyFsvQ.cjs"))},{id:"erb",name:"ERB",import:()=>Promise.resolve().then(()=>require("./erb-CnncUHI5.cjs"))},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>Promise.resolve().then(()=>require("./erlang-3VgdrQXV.cjs"))},{id:"fennel",name:"Fennel",import:()=>Promise.resolve().then(()=>require("./fennel-BvcDRFAV.cjs"))},{id:"fish",name:"Fish",import:()=>Promise.resolve().then(()=>require("./fish-CnamI0Ar.cjs"))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>Promise.resolve().then(()=>require("./fluent-DFpT66K8.cjs"))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>Promise.resolve().then(()=>require("./fortran-fixed-form-BEveYJYo.cjs"))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>Promise.resolve().then(()=>require("./fortran-free-form-IaGrWIda.cjs"))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>Promise.resolve().then(()=>require("./fsharp-JIb2RzF4.cjs"))},{id:"gdresource",name:"GDResource",import:()=>Promise.resolve().then(()=>require("./gdresource-YnzGv0RG.cjs"))},{id:"gdscript",name:"GDScript",import:()=>Promise.resolve().then(()=>require("./gdscript-5N_43TPQ.cjs"))},{id:"gdshader",name:"GDShader",import:()=>Promise.resolve().then(()=>require("./gdshader-Bl85Hrm5.cjs"))},{id:"genie",name:"Genie",import:()=>Promise.resolve().then(()=>require("./genie-DGsxMAbQ.cjs"))},{id:"gherkin",name:"Gherkin",import:()=>Promise.resolve().then(()=>require("./gherkin-CVV6nEUH.cjs"))},{id:"git-commit",name:"Git Commit Message",import:()=>Promise.resolve().then(()=>require("./git-commit-CBAAAmmS.cjs"))},{id:"git-rebase",name:"Git Rebase Message",import:()=>Promise.resolve().then(()=>require("./git-rebase-teQnnXpn.cjs"))},{id:"gleam",name:"Gleam",import:()=>Promise.resolve().then(()=>require("./gleam-nR4mjrhK.cjs"))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>Promise.resolve().then(()=>require("./glimmer-js-DAfoXdQ-.cjs"))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>Promise.resolve().then(()=>require("./glimmer-ts-CeO7A1-5.cjs"))},{id:"glsl",name:"GLSL",import:()=>Promise.resolve().then(()=>require("./glsl-RcB3ToOh.cjs"))},{id:"gnuplot",name:"Gnuplot",import:()=>Promise.resolve().then(()=>require("./gnuplot-CurtDYoJ.cjs"))},{id:"go",name:"Go",import:()=>Promise.resolve().then(()=>require("./go-CM9_GlwL.cjs"))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>Promise.resolve().then(()=>require("./graphql-DWzZPj_V.cjs"))},{id:"groovy",name:"Groovy",import:()=>Promise.resolve().then(()=>require("./groovy-BaVp9Il5.cjs"))},{id:"hack",name:"Hack",import:()=>Promise.resolve().then(()=>require("./hack-DDrvhASj.cjs"))},{id:"haml",name:"Ruby Haml",import:()=>Promise.resolve().then(()=>require("./haml-BK3-xJKV.cjs"))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>Promise.resolve().then(()=>require("./handlebars-DjnxWdl9.cjs"))},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>Promise.resolve().then(()=>require("./haskell-suhyCHEm.cjs"))},{id:"haxe",name:"Haxe",import:()=>Promise.resolve().then(()=>require("./haxe-BIQU1qHi.cjs"))},{id:"hcl",name:"HashiCorp HCL",import:()=>Promise.resolve().then(()=>require("./hcl-CbQ1yCnz.cjs"))},{id:"hjson",name:"Hjson",import:()=>Promise.resolve().then(()=>require("./hjson-Ddklb4QM.cjs"))},{id:"hlsl",name:"HLSL",import:()=>Promise.resolve().then(()=>require("./hlsl-B4NkiBfC.cjs"))},{id:"html",name:"HTML",import:()=>Promise.resolve().then(()=>require("./html-DiyIZFpA.cjs"))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>Promise.resolve().then(()=>require("./html-derivative-m27xHPNF.cjs"))},{id:"http",name:"HTTP",import:()=>Promise.resolve().then(()=>require("./http-B4wR56ug.cjs"))},{id:"hxml",name:"HXML",import:()=>Promise.resolve().then(()=>require("./hxml-Bv32SKqg.cjs"))},{id:"hy",name:"Hy",import:()=>Promise.resolve().then(()=>require("./hy-DpyTdO3T.cjs"))},{id:"imba",name:"Imba",import:()=>Promise.resolve().then(()=>require("./imba-B0C0YBnY.cjs"))},{id:"ini",name:"INI",aliases:["properties"],import:()=>Promise.resolve().then(()=>require("./ini-CymULaw_.cjs"))},{id:"java",name:"Java",import:()=>Promise.resolve().then(()=>require("./java-Bn1Lvoni.cjs"))},{id:"javascript",name:"JavaScript",aliases:["js"],import:()=>Promise.resolve().then(()=>require("./javascript-Bnnicc83.cjs"))},{id:"jinja",name:"Jinja",import:()=>Promise.resolve().then(()=>require("./jinja-D8wWNdMe.cjs"))},{id:"jison",name:"Jison",import:()=>Promise.resolve().then(()=>require("./jison-f6CjvOiG.cjs"))},{id:"json",name:"JSON",import:()=>Promise.resolve().then(()=>require("./json-y-J1j5EW.cjs"))},{id:"json5",name:"JSON5",import:()=>Promise.resolve().then(()=>require("./json5-CzvlWgZ7.cjs"))},{id:"jsonc",name:"JSON with Comments",import:()=>Promise.resolve().then(()=>require("./jsonc-BnhWfmQw.cjs"))},{id:"jsonl",name:"JSON Lines",import:()=>Promise.resolve().then(()=>require("./jsonl-BbGkWPJz.cjs"))},{id:"jsonnet",name:"Jsonnet",import:()=>Promise.resolve().then(()=>require("./jsonnet-Bn--UDZ1.cjs"))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>Promise.resolve().then(()=>require("./jssm-4CSVp8lc.cjs"))},{id:"jsx",name:"JSX",import:()=>Promise.resolve().then(()=>require("./jsx-D8YwVp-7.cjs"))},{id:"julia",name:"Julia",aliases:["jl"],import:()=>Promise.resolve().then(()=>require("./julia-CPt_7dt8.cjs"))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>Promise.resolve().then(()=>require("./kotlin-DDI6myF6.cjs"))},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>Promise.resolve().then(()=>require("./kusto-OZxALJZT.cjs"))},{id:"latex",name:"LaTeX",import:()=>Promise.resolve().then(()=>require("./latex-C1zmrAP3.cjs"))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>Promise.resolve().then(()=>require("./lean-D1iY-35j.cjs"))},{id:"less",name:"Less",import:()=>Promise.resolve().then(()=>require("./less-DIaY7vQJ.cjs"))},{id:"liquid",name:"Liquid",import:()=>Promise.resolve().then(()=>require("./liquid-mYFf3Ubk.cjs"))},{id:"log",name:"Log file",import:()=>Promise.resolve().then(()=>require("./log-BIXUeBaj.cjs"))},{id:"logo",name:"Logo",import:()=>Promise.resolve().then(()=>require("./logo-B2d3b27P.cjs"))},{id:"lua",name:"Lua",import:()=>Promise.resolve().then(()=>require("./lua-BNycEOCj.cjs"))},{id:"luau",name:"Luau",import:()=>Promise.resolve().then(()=>require("./luau-CvqAeq4F.cjs"))},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>Promise.resolve().then(()=>require("./make-Oob5Z9Pk.cjs"))},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>Promise.resolve().then(()=>require("./markdown-BGBuj4LZ.cjs"))},{id:"marko",name:"Marko",import:()=>Promise.resolve().then(()=>require("./marko-orX0YPzY.cjs"))},{id:"matlab",name:"MATLAB",import:()=>Promise.resolve().then(()=>require("./matlab-CbN2rF6P.cjs"))},{id:"mdc",name:"MDC",import:()=>Promise.resolve().then(()=>require("./mdc-BNCAtGbK.cjs"))},{id:"mdx",name:"MDX",import:()=>Promise.resolve().then(()=>require("./mdx-Cl31h8mi.cjs"))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>Promise.resolve().then(()=>require("./mermaid-CSogK_LM.cjs"))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>Promise.resolve().then(()=>require("./mipsasm-BseoYJQp.cjs"))},{id:"mojo",name:"Mojo",import:()=>Promise.resolve().then(()=>require("./mojo-D8QAG3Ze.cjs"))},{id:"move",name:"Move",import:()=>Promise.resolve().then(()=>require("./move-DaBrcjat.cjs"))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>Promise.resolve().then(()=>require("./narrat-oOfAO4q8.cjs"))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>Promise.resolve().then(()=>require("./nextflow-BxJSKvPb.cjs"))},{id:"nginx",name:"Nginx",import:()=>Promise.resolve().then(()=>require("./nginx-CWVY90PN.cjs"))},{id:"nim",name:"Nim",import:()=>Promise.resolve().then(()=>require("./nim-CwodQ6jZ.cjs"))},{id:"nix",name:"Nix",import:()=>Promise.resolve().then(()=>require("./nix-DNME0Ea7.cjs"))},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>Promise.resolve().then(()=>require("./nushell-DI9Z3l3M.cjs"))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>Promise.resolve().then(()=>require("./objective-c-DVx8Rcni.cjs"))},{id:"objective-cpp",name:"Objective-C++",import:()=>Promise.resolve().then(()=>require("./objective-cpp-s6XI7Jvk.cjs"))},{id:"ocaml",name:"OCaml",import:()=>Promise.resolve().then(()=>require("./ocaml-kUzDDUf2.cjs"))},{id:"pascal",name:"Pascal",import:()=>Promise.resolve().then(()=>require("./pascal-D509_I72.cjs"))},{id:"perl",name:"Perl",import:()=>Promise.resolve().then(()=>require("./perl-CzmOInqo.cjs"))},{id:"php",name:"PHP",import:()=>Promise.resolve().then(()=>require("./php-YwMoY7CJ.cjs"))},{id:"plsql",name:"PL/SQL",import:()=>Promise.resolve().then(()=>require("./plsql-C_qH_YOK.cjs"))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>Promise.resolve().then(()=>require("./po-CBsLQIcu.cjs"))},{id:"polar",name:"Polar",import:()=>Promise.resolve().then(()=>require("./polar-De-CDeYv.cjs"))},{id:"postcss",name:"PostCSS",import:()=>Promise.resolve().then(()=>require("./postcss-BtcsgaYj.cjs"))},{id:"powerquery",name:"PowerQuery",import:()=>Promise.resolve().then(()=>require("./powerquery-B0rHn13V.cjs"))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>Promise.resolve().then(()=>require("./powershell-rCX2OYXT.cjs"))},{id:"prisma",name:"Prisma",import:()=>Promise.resolve().then(()=>require("./prisma-BaaUHYMp.cjs"))},{id:"prolog",name:"Prolog",import:()=>Promise.resolve().then(()=>require("./prolog-DrXD2tGS.cjs"))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>Promise.resolve().then(()=>require("./proto-BtmQjBQu.cjs"))},{id:"pug",name:"Pug",aliases:["jade"],import:()=>Promise.resolve().then(()=>require("./pug-CkHoCGUm.cjs"))},{id:"puppet",name:"Puppet",import:()=>Promise.resolve().then(()=>require("./puppet-cIrXIuy8.cjs"))},{id:"purescript",name:"PureScript",import:()=>Promise.resolve().then(()=>require("./purescript-CX9QPs2N.cjs"))},{id:"python",name:"Python",aliases:["py"],import:()=>Promise.resolve().then(()=>require("./python-B9x3euv6.cjs"))},{id:"qml",name:"QML",import:()=>Promise.resolve().then(()=>require("./qml-Dwwb3xcM.cjs"))},{id:"qmldir",name:"QML Directory",import:()=>Promise.resolve().then(()=>require("./qmldir-DNF9H2ir.cjs"))},{id:"qss",name:"Qt Style Sheets",import:()=>Promise.resolve().then(()=>require("./qss-C744dLby.cjs"))},{id:"r",name:"R",import:()=>Promise.resolve().then(()=>require("./r-DgOc9oMe.cjs"))},{id:"racket",name:"Racket",import:()=>Promise.resolve().then(()=>require("./racket-Do9_vqnd.cjs"))},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>Promise.resolve().then(()=>require("./raku-BW8wAUIz.cjs"))},{id:"razor",name:"ASP.NET Razor",import:()=>Promise.resolve().then(()=>require("./razor-g8HV3m4q.cjs"))},{id:"reg",name:"Windows Registry Script",import:()=>Promise.resolve().then(()=>require("./reg-CGWN_v-z.cjs"))},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>Promise.resolve().then(()=>require("./regexp-N7Z4hEeU.cjs"))},{id:"rel",name:"Rel",import:()=>Promise.resolve().then(()=>require("./rel-BYqA7mnV.cjs"))},{id:"riscv",name:"RISC-V",import:()=>Promise.resolve().then(()=>require("./riscv-ayQMUpo9.cjs"))},{id:"rst",name:"reStructuredText",import:()=>Promise.resolve().then(()=>require("./rst-MlYKz4rn.cjs"))},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>Promise.resolve().then(()=>require("./ruby-DJN5DFiR.cjs"))},{id:"rust",name:"Rust",aliases:["rs"],import:()=>Promise.resolve().then(()=>require("./rust-BnFKGEfa.cjs"))},{id:"sas",name:"SAS",import:()=>Promise.resolve().then(()=>require("./sas-F7gHsd4H.cjs"))},{id:"sass",name:"Sass",import:()=>Promise.resolve().then(()=>require("./sass-B9gYryDE.cjs"))},{id:"scala",name:"Scala",import:()=>Promise.resolve().then(()=>require("./scala-C85dOwSU.cjs"))},{id:"scheme",name:"Scheme",import:()=>Promise.resolve().then(()=>require("./scheme-B_XUaARm.cjs"))},{id:"scss",name:"SCSS",import:()=>Promise.resolve().then(()=>require("./scss-Bn9tb5MW.cjs"))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>Promise.resolve().then(()=>require("./sdbl-7Y5u0OW0.cjs"))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>Promise.resolve().then(()=>require("./shaderlab-Ca09aCzm.cjs"))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>Promise.resolve().then(()=>require("./shellscript-3DYM9fut.cjs"))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>Promise.resolve().then(()=>require("./shellsession-CpSha4Rb.cjs"))},{id:"smalltalk",name:"Smalltalk",import:()=>Promise.resolve().then(()=>require("./smalltalk-CCvytUuW.cjs"))},{id:"solidity",name:"Solidity",import:()=>Promise.resolve().then(()=>require("./solidity-BcNcjFC4.cjs"))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>Promise.resolve().then(()=>require("./soy-CeuZwkAk.cjs"))},{id:"sparql",name:"SPARQL",import:()=>Promise.resolve().then(()=>require("./sparql-BRQlWq86.cjs"))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>Promise.resolve().then(()=>require("./splunk-CzITjJj7.cjs"))},{id:"sql",name:"SQL",import:()=>Promise.resolve().then(()=>require("./sql-BqWZrLHB.cjs"))},{id:"ssh-config",name:"SSH Config",import:()=>Promise.resolve().then(()=>require("./ssh-config-DUPeuEdB.cjs"))},{id:"stata",name:"Stata",import:()=>Promise.resolve().then(()=>require("./stata-B-LlW9Cr.cjs"))},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>Promise.resolve().then(()=>require("./stylus-ByHs6N-o.cjs"))},{id:"svelte",name:"Svelte",import:()=>Promise.resolve().then(()=>require("./svelte-DXe6QUZV.cjs"))},{id:"swift",name:"Swift",import:()=>Promise.resolve().then(()=>require("./swift-C5DnOriA.cjs"))},{id:"system-verilog",name:"SystemVerilog",import:()=>Promise.resolve().then(()=>require("./system-verilog-ClPLYLwh.cjs"))},{id:"systemd",name:"Systemd Units",import:()=>Promise.resolve().then(()=>require("./systemd-BASX0DlX.cjs"))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>Promise.resolve().then(()=>require("./talonscript-DkCSnLHD.cjs"))},{id:"tasl",name:"Tasl",import:()=>Promise.resolve().then(()=>require("./tasl-BAQJK7KZ.cjs"))},{id:"tcl",name:"Tcl",import:()=>Promise.resolve().then(()=>require("./tcl-CwJAYTvh.cjs"))},{id:"templ",name:"Templ",import:()=>Promise.resolve().then(()=>require("./templ-BZj57XLK.cjs"))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>Promise.resolve().then(()=>require("./terraform-s-pzyVvp.cjs"))},{id:"tex",name:"TeX",import:()=>Promise.resolve().then(()=>require("./tex-CTRO38Wo.cjs"))},{id:"toml",name:"TOML",import:()=>Promise.resolve().then(()=>require("./toml-CyMM7IXy.cjs"))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>Promise.resolve().then(()=>require("./ts-tags-hDAF_laC.cjs"))},{id:"tsv",name:"TSV",import:()=>Promise.resolve().then(()=>require("./tsv-DqNGnuVj.cjs"))},{id:"tsx",name:"TSX",import:()=>Promise.resolve().then(()=>require("./tsx-DpBRUnKC.cjs"))},{id:"turtle",name:"Turtle",import:()=>Promise.resolve().then(()=>require("./turtle-DfO3eAsu.cjs"))},{id:"twig",name:"Twig",import:()=>Promise.resolve().then(()=>require("./twig-B2qtj3-0.cjs"))},{id:"typescript",name:"TypeScript",aliases:["ts"],import:()=>Promise.resolve().then(()=>require("./typescript-BqvpT6pB.cjs"))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>Promise.resolve().then(()=>require("./typespec-P-ZVy8yC.cjs"))},{id:"typst",name:"Typst",aliases:["typ"],import:()=>Promise.resolve().then(()=>require("./typst-BVh2IsT9.cjs"))},{id:"v",name:"V",import:()=>Promise.resolve().then(()=>require("./v-BUlE9136.cjs"))},{id:"vala",name:"Vala",import:()=>Promise.resolve().then(()=>require("./vala-BIymb2K_.cjs"))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>Promise.resolve().then(()=>require("./vb-IXOh8mqV.cjs"))},{id:"verilog",name:"Verilog",import:()=>Promise.resolve().then(()=>require("./verilog-BiglCqvO.cjs"))},{id:"vhdl",name:"VHDL",import:()=>Promise.resolve().then(()=>require("./vhdl-CJUzuS2t.cjs"))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>Promise.resolve().then(()=>require("./viml-B1nKLcgt.cjs"))},{id:"vue",name:"Vue",import:()=>Promise.resolve().then(()=>require("./vue-Bz7ob1S8.cjs"))},{id:"vue-html",name:"Vue HTML",import:()=>Promise.resolve().then(()=>require("./vue-html-rW8a786u.cjs"))},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>Promise.resolve().then(()=>require("./vyper-CO9xUkIY.cjs"))},{id:"wasm",name:"WebAssembly",import:()=>Promise.resolve().then(()=>require("./wasm-CdIThIat.cjs"))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>Promise.resolve().then(()=>require("./wenyan-BSJ3fk7e.cjs"))},{id:"wgsl",name:"WGSL",import:()=>Promise.resolve().then(()=>require("./wgsl-d3zZE7ZN.cjs"))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>Promise.resolve().then(()=>require("./wikitext-BRCqXN2g.cjs"))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>Promise.resolve().then(()=>require("./wolfram-C3rR92zj.cjs"))},{id:"xml",name:"XML",import:()=>Promise.resolve().then(()=>require("./xml-CJLy8-Dx.cjs"))},{id:"xsl",name:"XSL",import:()=>Promise.resolve().then(()=>require("./xsl-D4BTm9yO.cjs"))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>Promise.resolve().then(()=>require("./yaml-7DV6pRKj.cjs"))},{id:"zenscript",name:"ZenScript",import:()=>Promise.resolve().then(()=>require("./zenscript-BWMxwjeH.cjs"))},{id:"zig",name:"Zig",import:()=>Promise.resolve().then(()=>require("./zig-yAcNfpgW.cjs"))}],Ab=Object.fromEntries(wh.map(e=>[e.id,e.import])),Ib=Object.fromEntries(wh.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),kb={...Ab,...Ib},_b=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>Promise.resolve().then(()=>require("./andromeeda-BXc5FOIb.cjs"))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>Promise.resolve().then(()=>require("./aurora-x-C5IpmIOG.cjs"))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./ayu-dark-Cv7nTiif.cjs"))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>Promise.resolve().then(()=>require("./catppuccin-frappe-DXAedND3.cjs"))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>Promise.resolve().then(()=>require("./catppuccin-latte-mwGw3-Ej.cjs"))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>Promise.resolve().then(()=>require("./catppuccin-macchiato-cQCk9ADg.cjs"))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>Promise.resolve().then(()=>require("./catppuccin-mocha-ClSzDZSl.cjs"))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>Promise.resolve().then(()=>require("./dark-plus-Cd5emcYO.cjs"))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>Promise.resolve().then(()=>require("./dracula-BNgwAJ-d.cjs"))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>Promise.resolve().then(()=>require("./dracula-soft-BHZ7sHFu.cjs"))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./everforest-dark-_sBMomR1.cjs"))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>Promise.resolve().then(()=>require("./everforest-light-H0xoYxl0.cjs"))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-BKL9xNgN.cjs"))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-default-Dsv5MuSi.cjs"))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-dimmed-CtB9hz8U.cjs"))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-high-contrast-BqZVM-jF.cjs"))},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>Promise.resolve().then(()=>require("./github-light-BFTOhCbz.cjs"))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>Promise.resolve().then(()=>require("./github-light-default-BZoWH9dH.cjs"))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>Promise.resolve().then(()=>require("./github-light-high-contrast-Ks3kPGJU.cjs"))},{id:"houston",displayName:"Houston",type:"dark",import:()=>Promise.resolve().then(()=>require("./houston-T57H3gQZ.cjs"))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>Promise.resolve().then(()=>require("./kanagawa-dragon-BJZF7xDr.cjs"))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>Promise.resolve().then(()=>require("./kanagawa-lotus-BhgzmRV4.cjs"))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>Promise.resolve().then(()=>require("./kanagawa-wave-BgJip59C.cjs"))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>Promise.resolve().then(()=>require("./laserwave--izBLY1I.cjs"))},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>Promise.resolve().then(()=>require("./light-plus-B5D0le0o.cjs"))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-Dj0-OyRN.cjs"))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-darker-Dvfs29ir.cjs"))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>Promise.resolve().then(()=>require("./material-theme-lighter-EU3ZGl_r.cjs"))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-ocean-px_3Pwqa.cjs"))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-palenight-38jxvsGX.cjs"))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./min-dark-tt5o_I5e.cjs"))},{id:"min-light",displayName:"Min Light",type:"light",import:()=>Promise.resolve().then(()=>require("./min-light-tmTHl_CQ.cjs"))},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>Promise.resolve().then(()=>require("./monokai-DMIxv6MM.cjs"))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>Promise.resolve().then(()=>require("./night-owl-BN78kThQ.cjs"))},{id:"nord",displayName:"Nord",type:"dark",import:()=>Promise.resolve().then(()=>require("./nord-Ca5AGUWc.cjs"))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>Promise.resolve().then(()=>require("./one-dark-pro-JOzzHStv.cjs"))},{id:"one-light",displayName:"One Light",type:"light",import:()=>Promise.resolve().then(()=>require("./one-light-020-h_lv.cjs"))},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>Promise.resolve().then(()=>require("./plastic-r5piqq-S.cjs"))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>Promise.resolve().then(()=>require("./poimandres-BLP3NNjc.cjs"))},{id:"red",displayName:"Red",type:"dark",import:()=>Promise.resolve().then(()=>require("./red-BQGOv1D5.cjs"))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>Promise.resolve().then(()=>require("./rose-pine-DKEdv1Oe.cjs"))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>Promise.resolve().then(()=>require("./rose-pine-dawn-Bvt6DtVH.cjs"))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>Promise.resolve().then(()=>require("./rose-pine-moon-cHuJy0Ng.cjs"))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./slack-dark-akqwQ7ED.cjs"))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>Promise.resolve().then(()=>require("./slack-ochin-BoQQWmTv.cjs"))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>Promise.resolve().then(()=>require("./snazzy-light-D_IwRieF.cjs"))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./solarized-dark-gmm-WbDC.cjs"))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>Promise.resolve().then(()=>require("./solarized-light-DzcxRSZP.cjs"))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>Promise.resolve().then(()=>require("./synthwave-84-BBRLOmNT.cjs"))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>Promise.resolve().then(()=>require("./tokyo-night-9T7_vGSy.cjs"))},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>Promise.resolve().then(()=>require("./vesper-DqLWLxOu.cjs"))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>Promise.resolve().then(()=>require("./vitesse-black-MF-1S1MG.cjs"))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./vitesse-dark-SIffJYSe.cjs"))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>Promise.resolve().then(()=>require("./vitesse-light-U63SkYGT.cjs"))}],vb=Object.fromEntries(_b.map(e=>[e.id,e.import]));let An=class extends Error{constructor(t){super(t),this.name="ShikiError"}},wu=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Db(){return 2147483648}function wb(){return typeof performance<"u"?performance.now():Date.now()}const Nb=(e,t)=>e+(t-e%t)%t;async function Pb(e){let t,n;const r={};function i(p){n=p,r.HEAPU8=new Uint8Array(p),r.HEAPU32=new Uint32Array(p)}function s(p,g,b){r.HEAPU8.copyWithin(p,g,g+b)}function a(p){try{return t.grow(p-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function o(p){const g=r.HEAPU8.length;p=p>>>0;const b=Db();if(p>b)return!1;for(let T=1;T<=4;T*=2){let x=g*(1+.2/T);x=Math.min(x,p+100663296);const C=Math.min(b,Nb(Math.max(p,x),65536));if(a(C))return!0}return!1}const u=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function l(p,g,b=1024){const T=g+b;let x=g;for(;p[x]&&!(x>=T);)++x;if(x-g>16&&p.buffer&&u)return u.decode(p.subarray(g,x));let C="";for(;g<x;){let S=p[g++];if(!(S&128)){C+=String.fromCharCode(S);continue}const w=p[g++]&63;if((S&224)===192){C+=String.fromCharCode((S&31)<<6|w);continue}const D=p[g++]&63;if((S&240)===224?S=(S&15)<<12|w<<6|D:S=(S&7)<<18|w<<12|D<<6|p[g++]&63,S<65536)C+=String.fromCharCode(S);else{const N=S-65536;C+=String.fromCharCode(55296|N>>10,56320|N&1023)}}return C}function d(p,g){return p?l(r.HEAPU8,p,g):""}const c={emscripten_get_now:wb,emscripten_memcpy_big:s,emscripten_resize_heap:o,fd_write:()=>0};async function m(){const g=await e({env:c,wasi_snapshot_preview1:c});t=g.memory,i(t.buffer),Object.assign(r,g),r.UTF8ToString=d}return await m(),r}var Rb=Object.defineProperty,Lb=(e,t,n)=>t in e?Rb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ot=(e,t,n)=>(Lb(e,typeof t!="symbol"?t+"":t,n),n);let ht=null;function Ob(e){throw new wu(e.UTF8ToString(e.getLastOnigError()))}class ba{constructor(t){ot(this,"utf16Length"),ot(this,"utf8Length"),ot(this,"utf16Value"),ot(this,"utf8Value"),ot(this,"utf16OffsetToUtf8"),ot(this,"utf8OffsetToUtf16");const n=t.length,r=ba._utf8ByteLength(t),i=r!==n,s=i?new Uint32Array(n+1):null;i&&(s[n]=r);const a=i?new Uint32Array(r+1):null;i&&(a[r]=n);const o=new Uint8Array(r);let u=0;for(let l=0;l<n;l++){const d=t.charCodeAt(l);let c=d,m=!1;if(d>=55296&&d<=56319&&l+1<n){const p=t.charCodeAt(l+1);p>=56320&&p<=57343&&(c=(d-55296<<10)+65536|p-56320,m=!0)}i&&(s[l]=u,m&&(s[l+1]=u),c<=127?a[u+0]=l:c<=2047?(a[u+0]=l,a[u+1]=l):c<=65535?(a[u+0]=l,a[u+1]=l,a[u+2]=l):(a[u+0]=l,a[u+1]=l,a[u+2]=l,a[u+3]=l)),c<=127?o[u++]=c:c<=2047?(o[u++]=192|(c&1984)>>>6,o[u++]=128|(c&63)>>>0):c<=65535?(o[u++]=224|(c&61440)>>>12,o[u++]=128|(c&4032)>>>6,o[u++]=128|(c&63)>>>0):(o[u++]=240|(c&1835008)>>>18,o[u++]=128|(c&258048)>>>12,o[u++]=128|(c&4032)>>>6,o[u++]=128|(c&63)>>>0),m&&l++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=o,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=a}static _utf8ByteLength(t){let n=0;for(let r=0,i=t.length;r<i;r++){const s=t.charCodeAt(r);let a=s,o=!1;if(s>=55296&&s<=56319&&r+1<i){const u=t.charCodeAt(r+1);u>=56320&&u<=57343&&(a=(s-55296<<10)+65536|u-56320,o=!0)}a<=127?n+=1:a<=2047?n+=2:a<=65535?n+=3:n+=4,o&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const an=class{constructor(e){if(ot(this,"id",++an.LAST_ID),ot(this,"_onigBinding"),ot(this,"content"),ot(this,"utf16Length"),ot(this,"utf8Length"),ot(this,"utf16OffsetToUtf8"),ot(this,"utf8OffsetToUtf16"),ot(this,"ptr"),!ht)throw new wu("Must invoke loadWasm first.");this._onigBinding=ht,this.content=e;const t=new ba(e);this.utf16Length=t.utf16Length,this.utf8Length=t.utf8Length,this.utf16OffsetToUtf8=t.utf16OffsetToUtf8,this.utf8OffsetToUtf16=t.utf8OffsetToUtf16,this.utf8Length<1e4&&!an._sharedPtrInUse?(an._sharedPtr||(an._sharedPtr=ht.omalloc(1e4)),an._sharedPtrInUse=!0,ht.HEAPU8.set(t.utf8Value,an._sharedPtr),this.ptr=an._sharedPtr):this.ptr=t.createString(ht)}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===an._sharedPtr?an._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};let qi=an;ot(qi,"LAST_ID",0);ot(qi,"_sharedPtr",0);ot(qi,"_sharedPtrInUse",!1);class Fb{constructor(t){if(ot(this,"_onigBinding"),ot(this,"_ptr"),!ht)throw new wu("Must invoke loadWasm first.");const n=[],r=[];for(let o=0,u=t.length;o<u;o++){const l=new ba(t[o]);n[o]=l.createString(ht),r[o]=l.utf8Length}const i=ht.omalloc(4*t.length);ht.HEAPU32.set(n,i/4);const s=ht.omalloc(4*t.length);ht.HEAPU32.set(r,s/4);const a=ht.createOnigScanner(i,s,t.length);for(let o=0,u=t.length;o<u;o++)ht.ofree(n[o]);ht.ofree(s),ht.ofree(i),a===0&&Ob(ht),this._onigBinding=ht,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let i=0;if(typeof r=="number"&&(i=r),typeof t=="string"){t=new qi(t);const s=this._findNextMatchSync(t,n,!1,i);return t.dispose(),s}return this._findNextMatchSync(t,n,!1,i)}_findNextMatchSync(t,n,r,i){const s=this._onigBinding,a=s.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),i);if(a===0)return null;const o=s.HEAPU32;let u=a/4;const l=o[u++],d=o[u++],c=[];for(let m=0;m<d;m++){const p=t.convertUtf8OffsetToUtf16(o[u++]),g=t.convertUtf8OffsetToUtf16(o[u++]);c[m]={start:p,end:g,length:g-p}}return{index:l,captureIndices:c}}}function Mb(e){return typeof e.instantiator=="function"}function Bb(e){return typeof e.default=="function"}function jb(e){return typeof e.data<"u"}function Hb(e){return typeof Response<"u"&&e instanceof Response}function Ub(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 ss;function zb(e){if(ss)return ss;async function t(){ht=await Pb(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),Mb(r)?r=await r.instantiator(n):Bb(r)?r=await r.default(n):(jb(r)&&(r=r.data),Hb(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await $b(r)(n):r=await qb(r)(n):Ub(r)?r=await Va(r)(n):r instanceof WebAssembly.Module?r=await Va(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Va(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return ss=t(),ss}function Va(e){return t=>WebAssembly.instantiate(e,t)}function $b(e){return t=>WebAssembly.instantiateStreaming(e,t)}function qb(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let Vb;function Wb(){return Vb}async function Nh(e){return e&&await zb(e),{createScanner(t){return new Fb(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new qi(t)}}}function Gb(e){return Nu(e)}function Nu(e){return Array.isArray(e)?Yb(e):e instanceof RegExp?e:typeof e=="object"?Kb(e):e}function Yb(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=Nu(e[n]);return t}function Kb(e){let t={};for(let n in e)t[n]=Nu(e[n]);return t}function Ph(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function Rh(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?Rh(e.substring(0,e.length-1)):e.substr(~t+1)}var Wa=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,as=class{static hasCaptures(e){return e===null?!1:(Wa.lastIndex=0,Wa.test(e))}static replaceCaptures(e,t,n){return e.replace(Wa,(r,i,s,a)=>{let o=n[parseInt(i||s,10)];if(o){let u=t.substring(o.start,o.end);for(;u[0]===".";)u=u.substring(1);switch(a){case"downcase":return u.toLowerCase();case"upcase":return u.toUpperCase();default:return u}}else return r})}};function Lh(e,t){return e<t?-1:e>t?1:0}function Oh(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 i=0;i<n;i++){let s=Lh(e[i],t[i]);if(s!==0)return s}return 0}return n-r}function rc(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 Fh(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Mh=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},Fs=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Zb(e),t)}static createFromParsedTheme(e,t){return e2(e,t)}_cachedMatchRoot=new Mh(e=>this._root.match(e));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(i=>Qb(e.parent,i.parentScopes));return r?new Bh(r.fontStyle,r.foreground,r.background):null}},Ga=class ys{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new ys(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new ys(n,t[r]);return n}push(t){return new ys(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 Qb(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Xb(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Xb(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var Bh=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Zb(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let i=0,s=t.length;i<s;i++){let a=t[i];if(!a.settings)continue;let o;if(typeof a.scope=="string"){let c=a.scope;c=c.replace(/^[,]+/,""),c=c.replace(/[,]+$/,""),o=c.split(",")}else Array.isArray(a.scope)?o=a.scope:o=[""];let u=-1;if(typeof a.settings.fontStyle=="string"){u=0;let c=a.settings.fontStyle.split(" ");for(let m=0,p=c.length;m<p;m++)switch(c[m]){case"italic":u=u|1;break;case"bold":u=u|2;break;case"underline":u=u|4;break;case"strikethrough":u=u|8;break}}let l=null;typeof a.settings.foreground=="string"&&rc(a.settings.foreground)&&(l=a.settings.foreground);let d=null;typeof a.settings.background=="string"&&rc(a.settings.background)&&(d=a.settings.background);for(let c=0,m=o.length;c<m;c++){let g=o[c].trim().split(" "),b=g[g.length-1],T=null;g.length>1&&(T=g.slice(0,g.length-1),T.reverse()),n[r++]=new Jb(b,T,i,u,l,d)}}return n}var Jb=class{constructor(e,t,n,r,i,s){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=s}},Tn=(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))(Tn||{});function e2(e,t){e.sort((u,l)=>{let d=Lh(u.scope,l.scope);return d!==0||(d=Oh(u.parentScopes,l.parentScopes),d!==0)?d:u.index-l.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&e[0].scope==="";){let u=e.shift();u.fontStyle!==-1&&(n=u.fontStyle),u.foreground!==null&&(r=u.foreground),u.background!==null&&(i=u.background)}let s=new t2(t),a=new Bh(n,s.getId(r),s.getId(i)),o=new r2(new Oo(0,null,-1,0,0),[]);for(let u=0,l=e.length;u<l;u++){let d=e[u];o.insert(0,d.scope,d.parentScopes,d.fontStyle,s.getId(d.foreground),s.getId(d.background))}return new Fs(s,a,o)}var t2=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){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)}},n2=Object.freeze([]),Oo=class jh{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,r,i,s){this.scopeDepth=t,this.parentScopes=n||n2,this.fontStyle=r,this.foreground=i,this.background=s}clone(){return new jh(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,i=t.length;r<i;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,i){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},r2=class Fo{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,i=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=t.parentScopes.length||i>=n.parentScopes.length);){const s=n.parentScopes[i].length-t.parentScopes[r].length;if(s!==0)return s;r++,i++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),i,s;if(r===-1?(i=t,s=""):(i=t.substring(0,r),s=t.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(s)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Fo._cmpBySpecificity),n}insert(t,n,r,i,s,a){if(n===""){this._doInsertHere(t,r,i,s,a);return}let o=n.indexOf("."),u,l;o===-1?(u=n,l=""):(u=n.substring(0,o),l=n.substring(o+1));let d;this._children.hasOwnProperty(u)?d=this._children[u]:(d=new Fo(this._mainRule.clone(),Oo.cloneArr(this._rulesWithParentScopes)),this._children[u]=d),d.insert(t+1,l,r,i,s,a)}_doInsertHere(t,n,r,i,s){if(n===null){this._mainRule.acceptOverwrite(t,r,i,s);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let u=this._rulesWithParentScopes[a];if(Oh(u.parentScopes,n)===0){u.acceptOverwrite(t,r,i,s);return}}r===-1&&(r=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),s===0&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new Oo(t,n,r,i,s))}},Nr=class qt{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=qt.getLanguageId(t),r=qt.getTokenType(t),i=qt.getFontStyle(t),s=qt.getForeground(t),a=qt.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:s,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,i,s,a,o){let u=qt.getLanguageId(t),l=qt.getTokenType(t),d=qt.containsBalancedBrackets(t)?1:0,c=qt.getFontStyle(t),m=qt.getForeground(t),p=qt.getBackground(t);return n!==0&&(u=n),r!==8&&(l=r),i!==null&&(d=i?1:0),s!==-1&&(c=s),a!==0&&(m=a),o!==0&&(p=o),(u<<0|l<<8|d<<10|c<<11|m<<15|p<<24)>>>0}};function Ms(e,t){const n=[],r=i2(e);let i=r.next();for(;i!==null;){let u=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":u=1;break;case"L":u=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let l=a();if(n.push({matcher:l,priority:u}),i!==",")break;i=r.next()}return n;function s(){if(i==="-"){i=r.next();const u=s();return l=>!!u&&!u(l)}if(i==="("){i=r.next();const u=o();return i===")"&&(i=r.next()),u}if(ic(i)){const u=[];do u.push(i),i=r.next();while(ic(i));return l=>t(u,l)}return null}function a(){const u=[];let l=s();for(;l;)u.push(l),l=s();return d=>u.every(c=>c(d))}function o(){const u=[];let l=a();for(;l&&(u.push(l),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");l=a()}return d=>u.some(c=>c(d))}}function ic(e){return!!e&&!!e.match(/[\w\.:]+/)}function i2(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 Hh(e){typeof e.dispose=="function"&&e.dispose()}var Di=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},s2=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},a2=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},o2=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Di(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new a2;for(const n of e)u2(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Di){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 u2(e,t,n,r){const i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const s=n.lookup(t);e instanceof Di?Ts({baseGrammar:s,selfGrammar:i},r):Mo(e.ruleName,{baseGrammar:s,selfGrammar:i,repository:i.repository},r);const a=n.injections(e.scopeName);if(a)for(const o of a)r.add(new Di(o))}function Mo(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];Bs([r],t,n)}}function Ts(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Bs(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Bs(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Bs(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?Ph({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Bs(r.patterns,{...t,repository:i},n);const s=r.include;if(!s)continue;const a=Uh(s);switch(a.kind){case 0:Ts({...t,selfGrammar:t.baseGrammar},n);break;case 1:Ts(t,n);break;case 2:Mo(a.ruleName,{...t,repository:i},n);break;case 3:case 4:const o=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(o){const u={baseGrammar:t.baseGrammar,selfGrammar:o,repository:i};a.kind===4?Mo(a.ruleName,u,n):Ts(u,n)}else a.kind===4?n.add(new s2(a.scopeName,a.ruleName)):n.add(new Di(a.scopeName));break}}}var l2=class{kind=0},c2=class{kind=1},d2=class{constructor(e){this.ruleName=e}kind=2},h2=class{constructor(e){this.scopeName=e}kind=3},f2=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Uh(e){if(e==="$base")return new l2;if(e==="$self")return new c2;const t=e.indexOf("#");if(t===-1)return new h2(e);if(t===0)return new d2(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new f2(n,r)}}var p2=/\\(\d+)/,sc=/\\(\d+)/g,m2=-1,zh=-2;var Vi=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=as.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=as.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Rh(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:as.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:as.replaceCaptures(this._contentName,e,t)}},g2=class extends Vi{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},b2=class extends Vi{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new wi(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Ni,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ac=class extends Vi{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Ni,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Bo=class extends Vi{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,s,a,o,u,l){super(e,t,n,r),this._begin=new wi(i,this.id),this.beginCaptures=s,this._end=new wi(a||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=o,this.applyEndPatternLast=u||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.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(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Ni;for(const n of this.patterns)e.getRule(n).collectPatterns(e,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,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},js=class extends Vi{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,s,a,o,u){super(e,t,n,r),this._begin=new wi(i,this.id),this.beginCaptures=s,this.whileCaptures=o,this._while=new wi(a,zh),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=u.patterns,this.hasMissingPatterns=u.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(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Ni;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Ni,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},$h=class bt{static createCaptureRule(t,n,r,i,s){return t.registerRule(a=>new g2(n,a,r,i,s))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new b2(t.$vscodeTextmateLocation,t.id,t.name,t.match,bt._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=Ph({},r,t.repository));let s=t.patterns;return typeof s>"u"&&t.include&&(s=[{include:t.include}]),new ac(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,bt._compilePatterns(s,n,r))}return t.while?new js(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,bt._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,bt._compileCaptures(t.whileCaptures||t.captures,n,r),bt._compilePatterns(t.patterns,n,r)):new Bo(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,bt._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,bt._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,bt._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let s=0;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const o=parseInt(a,10);o>s&&(s=o)}for(let a=0;a<=s;a++)i[a]=null;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const o=parseInt(a,10);let u=0;t[a].patterns&&(u=bt.getCompiledRuleId(t[a],n,r)),i[o]=bt.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,u)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let s=0,a=t.length;s<a;s++){const o=t[s];let u=-1;if(o.include){const l=Uh(o.include);switch(l.kind){case 0:case 1:u=bt.getCompiledRuleId(r[o.include],n,r);break;case 2:let d=r[l.ruleName];d&&(u=bt.getCompiledRuleId(d,n,r));break;case 3:case 4:const c=l.scopeName,m=l.kind===4?l.ruleName:null,p=n.getExternalGrammar(c,r);if(p)if(m){let g=p.repository[m];g&&(u=bt.getCompiledRuleId(g,n,p.repository))}else u=bt.getCompiledRuleId(p.repository.$self,n,p.repository);break}}else u=bt.getCompiledRuleId(o,n,r);if(u!==-1){const l=n.getRule(u);let d=!1;if((l instanceof ac||l instanceof Bo||l instanceof js)&&l.hasMissingPatterns&&l.patterns.length===0&&(d=!0),d)continue;i.push(u)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},wi=class qh{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){const r=t.length;let i=0,s=[],a=!1;for(let o=0;o<r;o++)if(t.charAt(o)==="\\"&&o+1<r){const l=t.charAt(o+1);l==="z"?(s.push(t.substring(i,o)),s.push("$(?!\\n)(?<!\\n)"),i=o+2):(l==="A"||l==="G")&&(a=!0),o++}this.hasAnchor=a,i===0?this.source=t:(s.push(t.substring(i,r)),this.source=s.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=p2.test(this.source):this.hasBackReferences=!1}clone(){return new qh(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(i=>t.substring(i.start,i.end));return sc.lastIndex=0,this.source.replace(sc,(i,s)=>Fh(r[parseInt(s,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=[],i=[],s,a,o,u;for(s=0,a=this.source.length;s<a;s++)o=this.source.charAt(s),t[s]=o,n[s]=o,r[s]=o,i[s]=o,o==="\\"&&s+1<a&&(u=this.source.charAt(s+1),u==="A"?(t[s+1]="",n[s+1]="",r[s+1]="A",i[s+1]="A"):u==="G"?(t[s+1]="",n[s+1]="G",r[s+1]="",i[s+1]="G"):(t[s+1]=u,n[s+1]=u,r[s+1]=u,i[s+1]=u),s++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:i.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}},Ni=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){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 oc(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(i=>i.resolveAnchors(t,n));return new oc(e,r,this._items.map(i=>i.ruleId))}},oc=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;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(`
|
|
17
|
+
`)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Ya=class{constructor(e,t){this.languageId=e,this.tokenType=t}},E2=class jo{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,n){this._defaultAttributes=new Ya(t,8),this._embeddedLanguagesMatcher=new x2(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?jo._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Ya(0,0);_getBasicScopeAttributes=new Mh(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new Ya(n,r)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(jo.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!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},x2=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>Fh(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 uc=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Vh(e,t,n,r,i,s,a,o){const u=t.content.length;let l=!1,d=-1;if(a){const p=y2(e,t,n,r,i,s);i=p.stack,r=p.linePos,n=p.isFirstLine,d=p.anchorPosition}const c=Date.now();for(;!l;){if(o!==0&&Date.now()-c>o)return new uc(i,!0);m()}return new uc(i,!1);function m(){const p=T2(e,t,n,r,i,d);if(!p){s.produce(i,u),l=!0;return}const g=p.captureIndices,b=p.matchedRuleId,T=g&&g.length>0?g[0].end>r:!1;if(b===m2){const x=i.getRule(e);s.produce(i,g[0].start),i=i.withContentNameScopesList(i.nameScopesList),di(e,t,n,i,s,x.endCaptures,g),s.produce(i,g[0].end);const C=i;if(i=i.parent,d=C.getAnchorPos(),!T&&C.getEnterPos()===r){i=C,s.produce(i,u),l=!0;return}}else{const x=e.getRule(b);s.produce(i,g[0].start);const C=i,S=x.getName(t.content,g),w=i.contentNameScopesList.pushAttributed(S,e);if(i=i.push(b,r,d,g[0].end===u,null,w,w),x instanceof Bo){const D=x;di(e,t,n,i,s,D.beginCaptures,g),s.produce(i,g[0].end),d=g[0].end;const N=D.getContentName(t.content,g),B=w.pushAttributed(N,e);if(i=i.withContentNameScopesList(B),D.endHasBackReferences&&(i=i.withEndRule(D.getEndWithResolvedBackReferences(t.content,g))),!T&&C.hasSameRuleAs(i)){i=i.pop(),s.produce(i,u),l=!0;return}}else if(x instanceof js){const D=x;di(e,t,n,i,s,D.beginCaptures,g),s.produce(i,g[0].end),d=g[0].end;const N=D.getContentName(t.content,g),B=w.pushAttributed(N,e);if(i=i.withContentNameScopesList(B),D.whileHasBackReferences&&(i=i.withEndRule(D.getWhileWithResolvedBackReferences(t.content,g))),!T&&C.hasSameRuleAs(i)){i=i.pop(),s.produce(i,u),l=!0;return}}else if(di(e,t,n,i,s,x.captures,g),s.produce(i,g[0].end),i=i.pop(),!T){i=i.safePop(),s.produce(i,u),l=!0;return}}g[0].end>r&&(r=g[0].end,n=!1)}}function y2(e,t,n,r,i,s){let a=i.beginRuleCapturedEOL?0:-1;const o=[];for(let u=i;u;u=u.pop()){const l=u.getRule(e);l instanceof js&&o.push({rule:l,stack:u})}for(let u=o.pop();u;u=o.pop()){const{ruleScanner:l,findOptions:d}=A2(u.rule,e,u.stack.endRule,n,r===a),c=l.findNextMatchSync(t,r,d);if(c){if(c.ruleId!==zh){i=u.stack.pop();break}c.captureIndices&&c.captureIndices.length&&(s.produce(u.stack,c.captureIndices[0].start),di(e,t,n,u.stack,s,u.rule.whileCaptures,c.captureIndices),s.produce(u.stack,c.captureIndices[0].end),a=c.captureIndices[0].end,c.captureIndices[0].end>r&&(r=c.captureIndices[0].end,n=!1))}else{i=u.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:a,isFirstLine:n}}function T2(e,t,n,r,i,s){const a=C2(e,t,n,r,i,s),o=e.getInjections();if(o.length===0)return a;const u=S2(o,e,t,n,r,i,s);if(!u)return a;if(!a)return u;const l=a.captureIndices[0].start,d=u.captureIndices[0].start;return d<l||u.priorityMatch&&d===l?u:a}function C2(e,t,n,r,i,s){const a=i.getRule(e),{ruleScanner:o,findOptions:u}=Wh(a,e,i.endRule,n,r===s),l=o.findNextMatchSync(t,r,u);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}function S2(e,t,n,r,i,s,a){let o=Number.MAX_VALUE,u=null,l,d=0;const c=s.contentNameScopesList.getScopeNames();for(let m=0,p=e.length;m<p;m++){const g=e[m];if(!g.matcher(c))continue;const b=t.getRule(g.ruleId),{ruleScanner:T,findOptions:x}=Wh(b,t,null,r,i===a),C=T.findNextMatchSync(n,i,x);if(!C)continue;const S=C.captureIndices[0].start;if(!(S>=o)&&(o=S,u=C.captureIndices,l=C.ruleId,d=g.priority,o===i))break}return u?{priorityMatch:d===-1,captureIndices:u,matchedRuleId:l}:null}function Wh(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function A2(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function di(e,t,n,r,i,s,a){if(s.length===0)return;const o=t.content,u=Math.min(s.length,a.length),l=[],d=a[0].end;for(let c=0;c<u;c++){const m=s[c];if(m===null)continue;const p=a[c];if(p.length===0)continue;if(p.start>d)break;for(;l.length>0&&l[l.length-1].endPos<=p.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,p.start):i.produce(r,p.start),m.retokenizeCapturedWithRuleId){const b=m.getName(o,a),T=r.contentNameScopesList.pushAttributed(b,e),x=m.getContentName(o,a),C=T.pushAttributed(x,e),S=r.push(m.retokenizeCapturedWithRuleId,p.start,-1,!1,null,T,C),w=e.createOnigString(o.substring(0,p.end));Vh(e,w,n&&p.start===0,p.start,S,i,!1,0),Hh(w);continue}const g=m.getName(o,a);if(g!==null){const T=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(g,e);l.push(new I2(T,p.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var I2=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function k2(e,t,n,r,i,s,a,o){return new v2(e,t,n,r,i,s,a,o)}function lc(e,t,n,r,i){const s=Ms(t,Hs),a=$h.getCompiledRuleId(n,r,i.repository);for(const o of s)e.push({debugSelector:t,matcher:o.matcher,ruleId:a,grammar:i,priority:o.priority})}function Hs(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let i=n;i<t.length;i++)if(_2(t[i],r))return n=i+1,!0;return!1})}function _2(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 v2=class{constructor(e,t,n,r,i,s,a,o){if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=o,this._basicScopeAttributesProvider=new E2(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=a,this._grammar=cc(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const u of Object.keys(i)){const l=Ms(u,Hs);for(const d of l)this._tokenTypeMatchers.push({matcher:d.matcher,type:i[u]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;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:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const i=r.injections;if(i)for(let a in i)lc(t,a,i[a],this,r);const s=this._grammarRepository.injections(n);s&&s.forEach(a=>{const o=this.getExternalGrammar(a);if(o){const u=o.injectionSelector;u&&lc(t,u,o,this,o)}})}return t.sort((i,s)=>i.priority-s.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]=cc(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=$h.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Ho.NULL){i=!0;const l=this._basicScopeAttributesProvider.getDefaultAttributes(),d=this.themeProvider.getDefaults(),c=Nr.set(0,l.languageId,l.tokenType,null,d.fontStyle,d.foregroundId,d.backgroundId),m=this.getRule(this._rootId).getName(null,null);let p;m?p=mi.createRootAndLookUpScopeName(m,c,this):p=mi.createRoot("unknown",c),t=new Ho(null,this._rootId,-1,-1,!1,null,p,p)}else i=!1,t.reset();e=e+`
|
|
18
|
+
`;const s=this.createOnigString(e),a=s.content.length,o=new w2(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),u=Vh(this,s,i,0,t,o,!0,r);return Hh(s),{lineLength:a,lineTokens:o,ruleStack:u.stack,stoppedEarly:u.stoppedEarly}}};function cc(e,t){return e=Gb(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 mi=class on{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(const s of n)i=Ga.push(i,s.scopeNames),r=new on(r,i,s.encodedTokenAttributes);return r}static createRoot(t,n){return new on(null,new Ga(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const i=r.getMetadataForScope(t),s=new Ga(null,t),a=r.themeProvider.themeMatch(s),o=on.mergeAttributes(n,i,a);return new on(null,s,o)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return on.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 i=-1,s=0,a=0;return r!==null&&(i=r.fontStyle,s=r.foregroundId,a=r.backgroundId),Nr.set(t,n.languageId,n.tokenType,null,i,s,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return on._pushAttributed(this,t,n);const r=t.split(/ /g);let i=this;for(const s of r)i=on._pushAttributed(i,s,n);return i}static _pushAttributed(t,n,r){const i=r.getMetadataForScope(n),s=t.scopePath.push(n),a=r.themeProvider.themeMatch(s),o=on.mergeAttributes(t.tokenAttributes,i,a);return new on(t,s,o)}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}},Ho=class qn{constructor(t,n,r,i,s,a,o,u){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=s,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=u,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}_stackElementBrand=void 0;static NULL=new qn(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:qn._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?mi.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(){qn._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,s,a,o){return new qn(this,t,n,r,i,s,a,o)}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 qn(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=mi.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new qn(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,mi.fromExtension(r,n.contentNameScopesList))}},D2=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Ms(n,Hs).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Ms(n,Hs).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}},w2=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let r=e?.tokenAttributes??0,i=!1;if(this.balancedBracketSelectors?.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const s=e?.getScopeNames()??[];for(const a of this._tokenTypeOverrides)a.matcher(s)&&(r=Nr.set(r,0,a.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(s))}if(i&&(r=Nr.set(r,0,8,i,-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,i=this._binaryTokens.length;r<i;r++)n[r]=this._binaryTokens[r];return n}},N2=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;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,i){if(!this._grammars.has(e)){let s=this._rawGrammars.get(e);if(!s)return null;this._grammars.set(e,k2(e,s,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},P2=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new N2(Fs.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(Fs.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,r){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(t,n,r){return this._loadGrammar(t,n,r.embeddedLanguages,r.tokenTypes,new D2(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,i,s){const a=new o2(this._syncRegistry,t);for(;a.Q.length>0;)a.Q.map(o=>this._loadSingleGrammar(o.scopeName)),a.processQueue();return this._grammarForScopeName(t,n,r,i,s)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,i=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,i)}_grammarForScopeName(t,n=0,r=null,i=null,s=null){return this._syncRegistry.grammarForScopeName(t,n,r,i,s)}},Uo=Ho.NULL;const Gh=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];let Wi=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Wi.prototype.normal={};Wi.prototype.property={};Wi.prototype.space=void 0;function Yh(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Wi(n,r,t)}function Pi(e){return e.toLowerCase()}let Ot=class{constructor(t,n){this.attribute=n,this.property=t}};Ot.prototype.attribute="";Ot.prototype.booleanish=!1;Ot.prototype.boolean=!1;Ot.prototype.commaOrSpaceSeparated=!1;Ot.prototype.commaSeparated=!1;Ot.prototype.defined=!1;Ot.prototype.mustUseProperty=!1;Ot.prototype.number=!1;Ot.prototype.overloadedBoolean=!1;Ot.prototype.property="";Ot.prototype.spaceSeparated=!1;Ot.prototype.space=void 0;let R2=0;const ye=ar(),Ze=ar(),Kh=ar(),Q=ar(),Oe=ar(),Ir=ar(),Ft=ar();function ar(){return 2**++R2}const zo=Object.freeze(Object.defineProperty({__proto__:null,boolean:ye,booleanish:Ze,commaOrSpaceSeparated:Ft,commaSeparated:Ir,number:Q,overloadedBoolean:Kh,spaceSeparated:Oe},Symbol.toStringTag,{value:"Module"})),Ka=Object.keys(zo);let Pu=class extends Ot{constructor(t,n,r,i){let s=-1;if(super(t,n),dc(this,"space",i),typeof r=="number")for(;++s<Ka.length;){const a=Ka[s];dc(this,Ka[s],(r&zo[a])===zo[a])}}};Pu.prototype.defined=!0;function dc(e,t,n){n&&(e[t]=n)}function jr(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new Pu(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Pi(r)]=r,n[Pi(s.attribute)]=r}return new Wi(t,n,e.space)}const Qh=jr({properties:{ariaActiveDescendant:null,ariaAtomic:Ze,ariaAutoComplete:null,ariaBusy:Ze,ariaChecked:Ze,ariaColCount:Q,ariaColIndex:Q,ariaColSpan:Q,ariaControls:Oe,ariaCurrent:null,ariaDescribedBy:Oe,ariaDetails:null,ariaDisabled:Ze,ariaDropEffect:Oe,ariaErrorMessage:null,ariaExpanded:Ze,ariaFlowTo:Oe,ariaGrabbed:Ze,ariaHasPopup:null,ariaHidden:Ze,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Oe,ariaLevel:Q,ariaLive:null,ariaModal:Ze,ariaMultiLine:Ze,ariaMultiSelectable:Ze,ariaOrientation:null,ariaOwns:Oe,ariaPlaceholder:null,ariaPosInSet:Q,ariaPressed:Ze,ariaReadOnly:Ze,ariaRelevant:null,ariaRequired:Ze,ariaRoleDescription:Oe,ariaRowCount:Q,ariaRowIndex:Q,ariaRowSpan:Q,ariaSelected:Ze,ariaSetSize:Q,ariaSort:null,ariaValueMax:Q,ariaValueMin:Q,ariaValueNow:Q,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Xh(e,t){return t in e?e[t]:t}function Zh(e,t){return Xh(e,t.toLowerCase())}const L2=jr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ir,acceptCharset:Oe,accessKey:Oe,action:null,allow:null,allowFullScreen:ye,allowPaymentRequest:ye,allowUserMedia:ye,alt:null,as:null,async:ye,autoCapitalize:null,autoComplete:Oe,autoFocus:ye,autoPlay:ye,blocking:Oe,capture:null,charSet:null,checked:ye,cite:null,className:Oe,cols:Q,colSpan:null,content:null,contentEditable:Ze,controls:ye,controlsList:Oe,coords:Q|Ir,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ye,defer:ye,dir:null,dirName:null,disabled:ye,download:Kh,draggable:Ze,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ye,formTarget:null,headers:Oe,height:Q,hidden:ye,high:Q,href:null,hrefLang:null,htmlFor:Oe,httpEquiv:Oe,id:null,imageSizes:null,imageSrcSet:null,inert:ye,inputMode:null,integrity:null,is:null,isMap:ye,itemId:null,itemProp:Oe,itemRef:Oe,itemScope:ye,itemType:Oe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ye,low:Q,manifest:null,max:null,maxLength:Q,media:null,method:null,min:null,minLength:Q,multiple:ye,muted:ye,name:null,nonce:null,noModule:ye,noValidate:ye,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:ye,optimum:Q,pattern:null,ping:Oe,placeholder:null,playsInline:ye,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ye,referrerPolicy:null,rel:Oe,required:ye,reversed:ye,rows:Q,rowSpan:Q,sandbox:Oe,scope:null,scoped:ye,seamless:ye,selected:ye,shadowRootClonable:ye,shadowRootDelegatesFocus:ye,shadowRootMode:null,shape:null,size:Q,sizes:null,slot:null,span:Q,spellCheck:Ze,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Q,step:null,style:null,tabIndex:Q,target:null,title:null,translate:null,type:null,typeMustMatch:ye,useMap:null,value:Ze,width:Q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Oe,axis:null,background:null,bgColor:null,border:Q,borderColor:null,bottomMargin:Q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ye,declare:ye,event:null,face:null,frame:null,frameBorder:null,hSpace:Q,leftMargin:Q,link:null,longDesc:null,lowSrc:null,marginHeight:Q,marginWidth:Q,noResize:ye,noHref:ye,noShade:ye,noWrap:ye,object:null,profile:null,prompt:null,rev:null,rightMargin:Q,rules:null,scheme:null,scrolling:Ze,standby:null,summary:null,text:null,topMargin:Q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Q,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ye,disableRemotePlayback:ye,prefix:null,property:null,results:Q,security:null,unselectable:null},space:"html",transform:Zh}),O2=jr({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:Ft,accentHeight:Q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Q,amplitude:Q,arabicForm:null,ascent:Q,attributeName:null,attributeType:null,azimuth:Q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Q,by:null,calcMode:null,capHeight:Q,className:Oe,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:Q,diffuseConstant:Q,direction:null,display:null,dur:null,divisor:Q,dominantBaseline:null,download:ye,dx:null,dy:null,edgeMode:null,editable:null,elevation:Q,enableBackground:null,end:null,event:null,exponent:Q,externalResourcesRequired:null,fill:null,fillOpacity:Q,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:Ir,g2:Ir,glyphName:Ir,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Q,horizOriginX:Q,horizOriginY:Q,id:null,ideographic:Q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Q,k:Q,k1:Q,k2:Q,k3:Q,k4:Q,kernelMatrix:Ft,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Q,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:Q,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:Q,overlineThickness:Q,paintOrder:null,panose1:null,path:null,pathLength:Q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Oe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Q,pointsAtY:Q,pointsAtZ:Q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ft,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ft,rev:Ft,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ft,requiredFeatures:Ft,requiredFonts:Ft,requiredFormats:Ft,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:Q,specularExponent:Q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Q,strikethroughThickness:Q,string:null,stroke:null,strokeDashArray:Ft,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Q,strokeOpacity:Q,strokeWidth:null,style:null,surfaceScale:Q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ft,tabIndex:Q,tableValues:null,target:null,targetX:Q,targetY:Q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ft,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Q,underlineThickness:Q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Q,values:null,vAlphabetic:Q,vMathematical:Q,vectorEffect:null,vHanging:Q,vIdeographic:Q,version:null,vertAdvY:Q,vertOriginX:Q,vertOriginY:Q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Xh}),Jh=jr({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()}}),ef=jr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Zh}),tf=jr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),F2={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"},M2=/[A-Z]/g,hc=/-[a-z]/g,B2=/^data[-\w.:]+$/i;function Gi(e,t){const n=Pi(t);let r=t,i=Ot;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&B2.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(hc,H2);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!hc.test(s)){let a=s.replace(M2,j2);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=Pu}return new i(r,t)}function j2(e){return"-"+e.toLowerCase()}function H2(e){return e.charAt(1).toUpperCase()}const Hr=Yh([Qh,L2,Jh,ef,tf],"html"),kn=Yh([Qh,O2,Jh,ef,tf],"svg"),fc={}.hasOwnProperty;function Ea(e,t){const n=t||{};function r(i,...s){let a=r.invalid;const o=r.handlers;if(i&&fc.call(i,e)){const u=String(i[e]);a=fc.call(o,u)?o[u]:r.unknown}if(a)return a.call(this,i,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const U2=/["&'<>`]/g,z2=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,$2=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,q2=/[|\\{}()[\]^$+*?.]/g,pc=new WeakMap;function V2(e,t){if(e=e.replace(t.subset?W2(t.subset):U2,r),t.subset||t.escapeOnly)return e;return e.replace(z2,n).replace($2,r);function n(i,s,a){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,a.charCodeAt(s+2),t)}function r(i,s,a){return t.format(i.charCodeAt(0),a.charCodeAt(s+1),t)}}function W2(e){let t=pc.get(e);return t||(t=G2(e),pc.set(e,t)),t}function G2(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(q2,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const Y2=/[\dA-Fa-f]/;function K2(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!Y2.test(String.fromCharCode(t))?r:r+";"}const Q2=/\d/;function X2(e,t,n){const r="&#"+String(e);return n&&t&&!Q2.test(String.fromCharCode(t))?r:r+";"}const Z2=["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"],Qa={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:"€"},J2=["cent","copy","divide","gt","lt","not","para","times"],nf={}.hasOwnProperty,$o={};let os;for(os in Qa)nf.call(Qa,os)&&($o[Qa[os]]=os);const eE=/[^\dA-Za-z]/;function tE(e,t,n,r){const i=String.fromCharCode(e);if(nf.call($o,i)){const s=$o[i],a="&"+s;return n&&Z2.includes(s)&&!J2.includes(s)&&(!r||t&&t!==61&&eE.test(String.fromCharCode(t)))?a:a+";"}return""}function nE(e,t,n){let r=K2(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=tE(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const s=X2(e,t,n.omitOptionalSemicolons);s.length<r.length&&(r=s)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function kr(e,t){return V2(e,Object.assign({format:nE},t))}const rE=/^>|^->|<!--|-->|--!>|<!-$/g,iE=[">"],sE=["<",">"];function aE(e,t,n,r){return r.settings.bogusComments?"<?"+kr(e.value,Object.assign({},r.settings.characterReferences,{subset:iE}))+">":"<!--"+e.value.replace(rE,i)+"-->";function i(s){return kr(s,Object.assign({},r.settings.characterReferences,{subset:sE}))}}function oE(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function Us(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function qo(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,s=!1;for(;!s;){r===-1&&(r=n.length,s=!0);const a=n.slice(i,r).trim();(a||!s)&&t.push(a),i=r+1,r=n.indexOf(",",i)}return t}function xa(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function Vo(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function ya(e){return e.join(" ").trim()}const uE=/[ \t\n\f\r]/g;function Yi(e){return typeof e=="object"?e.type==="text"?mc(e.value):!1:mc(e)}function mc(e){return e.replace(uE,"")===""}const lt=sf(1),rf=sf(-1),lE=[];function sf(e){return t;function t(n,r,i){const s=n?n.children:lE;let a=(r||0)+e,o=s[a];if(!i)for(;o&&Yi(o);)a+=e,o=s[a];return o}}const cE={}.hasOwnProperty;function af(e){return t;function t(n,r,i){return cE.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const Ru=af({body:hE,caption:Xa,colgroup:Xa,dd:gE,dt:mE,head:Xa,html:dE,li:pE,optgroup:bE,option:EE,p:fE,rp:gc,rt:gc,tbody:yE,td:bc,tfoot:TE,th:bc,thead:xE,tr:CE});function Xa(e,t,n){const r=lt(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&Yi(r.value.charAt(0)))}function dE(e,t,n){const r=lt(n,t);return!r||r.type!=="comment"}function hE(e,t,n){const r=lt(n,t);return!r||r.type!=="comment"}function fE(e,t,n){const r=lt(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 pE(e,t,n){const r=lt(n,t);return!r||r.type==="element"&&r.tagName==="li"}function mE(e,t,n){const r=lt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function gE(e,t,n){const r=lt(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function gc(e,t,n){const r=lt(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function bE(e,t,n){const r=lt(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function EE(e,t,n){const r=lt(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function xE(e,t,n){const r=lt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function yE(e,t,n){const r=lt(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function TE(e,t,n){return!lt(n,t)}function CE(e,t,n){const r=lt(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function bc(e,t,n){const r=lt(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const SE=af({body:kE,colgroup:_E,head:IE,html:AE,tbody:vE});function AE(e){const t=lt(e,-1);return!t||t.type!=="comment"}function IE(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 kE(e){const t=lt(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Yi(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function _E(e,t,n){const r=rf(n,t),i=lt(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&Ru(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function vE(e,t,n){const r=rf(n,t),i=lt(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&Ru(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const us={name:[[`
|
|
19
19
|
\f\r &/=>`.split(""),`
|
|
20
20
|
\f\r "&'/=>\``.split("")],[`\0
|
|
21
21
|
\f\r "&'/<=>`.split(""),`\0
|
|
@@ -23,33 +23,16 @@ export default theme;`}function Wr(e={},...t){const{breakpoints:n,mixins:r={},sp
|
|
|
23
23
|
\f\r &>`.split(""),`\0
|
|
24
24
|
\f\r "&'<=>\``.split("")],[`\0
|
|
25
25
|
\f\r "&'<=>\``.split(""),`\0
|
|
26
|
-
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function mh(e,t,n,r){const o=r.schema,s=o.space==="svg"?!1:r.settings.omitOptionalTags;let i=o.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const a=[];let l;o.space==="html"&&e.tagName==="svg"&&(r.schema=Xi);const u=fh(r,e.properties),d=r.all(o.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=o,d&&(i=!1),(u||!s||!lh(e,t,n))&&(a.push("<",e.tagName,u?" "+u:""),i&&(o.space==="svg"||r.settings.closeSelfClosing)&&(l=u.charAt(u.length-1),(!r.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&a.push(" "),a.push("/")),a.push(">")),a.push(d),!i&&(!s||!_o(e,t,n))&&a.push("</"+e.tagName+">"),a.join("")}function fh(e,t){const n=[];let r=-1,o;if(t){for(o in t)if(t[o]!==null&&t[o]!==void 0){const s=gh(e,o,t[o]);s&&n.push(s)}}for(;++r<n.length;){const s=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&s!=='"'&&s!=="'"&&(n[r]+=" ")}return n.join("")}function gh(e,t,n){const r=xp(e.schema,t),o=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,s=e.settings.allowDangerousCharacters?0:1;let i=e.quote,a;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=Vt(r.attribute,Object.assign({},e.settings.characterReferences,{subset:Nn.name[o][s]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Up:Gp)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?l:(e.settings.preferUnquoted&&(a=Vt(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Nn.unquoted[o][s]}))),a!==n&&(e.settings.quoteSmart&&Ls(n,i)>Ls(n,e.alternative)&&(i=e.alternative),a=i+Vt(n,Object.assign({},e.settings.characterReferences,{subset:(i==="'"?Nn.single:Nn.double)[o][s],attribute:!0}))+i),l+(a&&"="+a))}const yh=["<","&"];function na(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Vt(e.value,Object.assign({},r.settings.characterReferences,{subset:yh}))}function bh(e,t,n,r){return r.settings.allowDangerousHtml?e.value:na(e,t,n,r)}function xh(e,t,n,r){return r.all(e)}const vh=wp("type",{invalid:Sh,unknown:Ch,handlers:{comment:zp,doctype:Hp,element:mh,raw:bh,root:xh,text:na}});function Sh(e){throw new Error("Expected node, not `"+e+"`")}function Ch(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const wh={},kh={},Ih=[];function Ph(e,t){const n=wh,r=n.quote||'"',o=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Th,all:jh,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||hp,characterReferences:n.characterReferences||kh,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?Xi:Cp,quote:r,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function Th(e,t,n){return vh(e,t,n,this)}function jh(e){const t=[],n=e&&e.children||Ih;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function Eh(e){return Array.isArray(e)?e:[e]}function yr(e,t=!1){const n=e.split(/(\r?\n)/g);let r=0;const o=[];for(let s=0;s<n.length;s+=2){const i=t?n[s]+(n[s+1]||""):n[s];o.push([i,r]),r+=n[s].length,r+=n[s+1]?.length||0}return o}function Ao(e){return!e||["plaintext","txt","text","plain"].includes(e)}function ra(e){return e==="ansi"||Ao(e)}function Oo(e){return e==="none"}function oa(e){return Oo(e)}function sa(e,t){if(!t)return e;e.properties||={},e.properties.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 r of n)r&&!e.properties.class.includes(r)&&e.properties.class.push(r);return e}function Rh(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 _h(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 s=n.filter(i=>o.offset<i&&i<o.offset+o.content.length).map(i=>i-o.offset).sort((i,a)=>i-a);return s.length?Rh(o,s):o})):e}async function ia(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Jn(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[o,s]of Object.entries(t?.colorReplacements||{}))typeof s=="string"?n[o]=s:o===r&&Object.assign(n,s);return n}function xt(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function aa(e){const t={};return e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle&&(e.fontStyle&it.Italic&&(t["font-style"]="italic"),e.fontStyle&it.Bold&&(t["font-weight"]="bold"),e.fontStyle&it.Underline&&(t["text-decoration"]="underline")),t}function Ah(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}function Oh(e){const t=yr(e,!0).map(([o])=>o);function n(o){if(o===e.length)return{line:t.length-1,character:t[t.length-1].length};let s=o,i=0;for(const a of t){if(s<a.length)break;s-=a.length,i++}return{line:i,character:s}}function r(o,s){let i=0;for(let a=0;a<o;a++)i+=t[a].length;return i+=s,i}return{lines:t,indexToPos:n,posToIndex:r}}class Ne extends Error{constructor(t){super(t),this.name="ShikiError"}}const la=new WeakMap;function br(e,t){la.set(e,t)}function hn(e){return la.get(e)}class Yt{_stacks={};lang;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 Yt(Object.fromEntries(Eh(n).map(r=>[r,no])),t)}constructor(...t){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}}}getInternalStack(t=this.theme){return this._stacks[t]}get scopes(){return qs(this._stacks[this.theme])}getScopes(t=this.theme){return qs(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.scopes}}}function qs(e){const t=[],n=new Set;function r(o){if(n.has(o))return;n.add(o);const s=o?.nameScopesList?.scopeName;s&&t.push(s),o.parent&&r(o.parent)}return r(e),t}function Nh(e,t){if(!(e instanceof Yt))throw new Ne("Invalid grammar state");return e.getInternalStack(t)}function Mh(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let r=function(i){if(typeof i=="number"){if(i<0||i>n.source.length)throw new Ne(`Invalid decoration offset: ${i}. Code length: ${n.source.length}`);return{...o.indexToPos(i),offset:i}}else{const a=o.lines[i.line];if(a===void 0)throw new Ne(`Invalid decoration position ${JSON.stringify(i)}. Lines length: ${o.lines.length}`);if(i.character<0||i.character>a.length)throw new Ne(`Invalid decoration position ${JSON.stringify(i)}. Line ${i.line} length: ${a.length}`);return{...i,offset:o.posToIndex(i.line,i.character)}}};const o=Oh(n.source),s=(n.options.decorations||[]).map(i=>({...i,start:r(i.start),end:r(i.end)}));Lh(s),e.set(n.meta,{decorations:s,converter:o,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(!this.options.decorations?.length)return;const o=t(this).decorations.flatMap(i=>[i.start.offset,i.end.offset]);return _h(n,o)},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 Ne(`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 s(d,p,f,m){const g=o[d];let b="",x=-1,v=-1;if(p===0&&(x=0),f===0&&(v=0),f===Number.POSITIVE_INFINITY&&(v=g.children.length),x===-1||v===-1)for(let C=0;C<g.children.length;C++)b+=ca(g.children[C]),x===-1&&b.length===p&&(x=C+1),v===-1&&b.length===f&&(v=C+1);if(x===-1)throw new Ne(`Failed to find start index for decoration ${JSON.stringify(m.start)}`);if(v===-1)throw new Ne(`Failed to find end index for decoration ${JSON.stringify(m.end)}`);const S=g.children.slice(x,v);if(!m.alwaysWrap&&S.length===g.children.length)a(g,m,"line");else if(!m.alwaysWrap&&S.length===1&&S[0].type==="element")a(S[0],m,"token");else{const C={type:"element",tagName:"span",properties:{},children:S};a(C,m,"wrapper"),g.children.splice(x,S.length,C)}}function i(d,p){o[d]=a(o[d],p,"line")}function a(d,p,f){const m=p.properties||{},g=p.transform||(b=>b);return d.tagName=p.tagName||"span",d.properties={...d.properties,...m,class:d.properties.class},p.properties?.class&&sa(d,p.properties.class),d=g(d,f)||d,d}const l=[],u=r.decorations.sort((d,p)=>p.start.offset-d.start.offset);for(const d of u){const{start:p,end:f}=d;if(p.line===f.line)s(p.line,p.character,f.character,d);else if(p.line<f.line){s(p.line,p.character,Number.POSITIVE_INFINITY,d);for(let m=p.line+1;m<f.line;m++)l.unshift(()=>i(m,d));s(f.line,0,f.character,d)}}l.forEach(d=>d())}}}function Lh(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new Ne(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const o=e[r],s=n.start.offset<o.start.offset&&o.start.offset<n.end.offset,i=n.start.offset<o.end.offset&&o.end.offset<n.end.offset,a=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(s||i||a||l){if(i&&i||a&&l)continue;throw new Ne(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(o.start)} intersect.`)}}}}function ca(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(ca).join(""):""}const Dh=[Mh()];function Zn(e){return[...e.transformers||[],...Dh]}var vt=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Vr={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function $h(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 Vs(e,t){let n=1;const r=e[t+n++];let o;if(r==="2"){const s=[e[t+n++],e[t+n++],e[t+n]].map(i=>Number.parseInt(i));s.length===3&&!s.some(i=>Number.isNaN(i))&&(o={type:"rgb",rgb:s})}else if(r==="5"){const s=Number.parseInt(e[t+n]);Number.isNaN(s)||(o={type:"table",index:Number(s)})}return[n,o]}function Bh(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)Vr[o]&&t.push({type:"setDecoration",value:Vr[o]});else if(o<=29){const s=Vr[o-20];s&&t.push({type:"resetDecoration",value:s})}else if(o<=37)t.push({type:"setForegroundColor",value:{type:"named",name:vt[o-30]}});else if(o===38){const[s,i]=Vs(e,n);i&&t.push({type:"setForegroundColor",value:i}),n+=s}else if(o===39)t.push({type:"resetForegroundColor"});else if(o<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:vt[o-40]}});else if(o===48){const[s,i]=Vs(e,n);i&&t.push({type:"setBackgroundColor",value:i}),n+=s}else o===49?t.push({type:"resetBackgroundColor"}):o>=90&&o<=97?t.push({type:"setForegroundColor",value:{type:"named",name:vt[o-90+8]}}):o>=100&&o<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:vt[o-100+8]}})}return t}function qh(){let e=null,t=null,n=new Set;return{parse(r){const o=[];let s=0;do{const i=$h(r,s),a=i.sequence?r.substring(s,i.startPosition):r.substring(s);if(a.length>0&&o.push({value:a,foreground:e,background:t,decorations:new Set(n)}),i.sequence){const l=Bh(i.sequence);for(const u of l)u.type==="resetAll"?(e=null,t=null,n.clear()):u.type==="resetForegroundColor"?e=null:u.type==="resetBackgroundColor"?t=null:u.type==="resetDecoration"&&n.delete(u.value);for(const u of l)u.type==="setForegroundColor"?e=u.value:u.type==="setBackgroundColor"?t=u.value:u.type==="setDecoration"&&n.add(u.value)}s=i.position}while(s<r.length);return o}}}var Vh={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 Fh(e=Vh){function t(a){return e[a]}function n(a){return`#${a.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 u=0;u<vt.length;u++)r.push(t(vt[u]));let a=[0,95,135,175,215,255];for(let u=0;u<6;u++)for(let d=0;d<6;d++)for(let p=0;p<6;p++)r.push(n([a[u],a[d],a[p]]));let l=8;for(let u=0;u<24;u++,l+=10)r.push(n([l,l,l]));return r}function s(a){return o()[a]}function i(a){switch(a.type){case"named":return t(a.name);case"rgb":return n(a.rgb);case"table":return s(a.index)}}return{value:i}}function zh(e,t,n){const r=Jn(e,n),o=yr(t),s=Fh(Object.fromEntries(vt.map(a=>[a,e.colors?.[`terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`]]))),i=qh();return o.map(a=>i.parse(a[0]).map(l=>{let u,d;l.decorations.has("reverse")?(u=l.background?s.value(l.background):e.bg,d=l.foreground?s.value(l.foreground):e.fg):(u=l.foreground?s.value(l.foreground):e.fg,d=l.background?s.value(l.background):void 0),u=xt(u,r),d=xt(d,r),l.decorations.has("dim")&&(u=Hh(u));let p=it.None;return l.decorations.has("bold")&&(p|=it.Bold),l.decorations.has("italic")&&(p|=it.Italic),l.decorations.has("underline")&&(p|=it.Underline),{content:l.value,offset:a[1],color:u,bgColor:d,fontStyle:p}}))}function Hh(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 No(e,t,n={}){const{lang:r="text",theme:o=e.getLoadedThemes()[0]}=n;if(Ao(r)||Oo(o))return yr(t).map(l=>[{content:l[0],offset:l[1]}]);const{theme:s,colorMap:i}=e.setTheme(o);if(r==="ansi")return zh(s,t,n);const a=e.getLanguage(r);if(n.grammarState){if(n.grammarState.lang!==a.name)throw new lt(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${a.name}"`);if(!n.grammarState.themes.includes(s.name))throw new lt(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return Gh(t,a,s,i,n)}function Uh(...e){if(e.length===2)return hn(e[1]);const[t,n,r={}]=e,{lang:o="text",theme:s=t.getLoadedThemes()[0]}=r;if(Ao(o)||Oo(s))throw new lt("Plain language does not have grammar state");if(o==="ansi")throw new lt("ANSI language does not have grammar state");const{theme:i,colorMap:a}=t.setTheme(s),l=t.getLanguage(o);return new Yt(er(n,l,i,a,r).stateStack,l.name,i.name)}function Gh(e,t,n,r,o){const s=er(e,t,n,r,o),i=new Yt(er(e,t,n,r,o).stateStack,t.name,n.name);return br(s.tokens,i),s.tokens}function er(e,t,n,r,o){const s=Jn(n,o),{tokenizeMaxLineLength:i=0,tokenizeTimeLimit:a=500}=o,l=yr(e);let u=o.grammarState?Nh(o.grammarState,n.name)??no:o.grammarContextCode!=null?er(o.grammarContextCode,t,n,r,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:no,d=[];const p=[];for(let f=0,m=l.length;f<m;f++){const[g,b]=l[f];if(g===""){d=[],p.push([]);continue}if(i>0&&g.length>=i){d=[],p.push([{content:g,offset:b,color:"",fontStyle:0}]);continue}let x,v,S;o.includeExplanation&&(x=t.tokenizeLine(g,u),v=x.tokens,S=0);const C=t.tokenizeLine2(g,u,a),k=C.tokens.length/2;for(let w=0;w<k;w++){const E=C.tokens[2*w],O=w+1<k?C.tokens[2*w+2]:g.length;if(E===O)continue;const B=C.tokens[2*w+1],q=xt(r[Ht.getForeground(B)],s),y=Ht.getFontStyle(B),R={content:g.substring(E,O),offset:b+E,color:q,fontStyle:y};if(o.includeExplanation){const A=[];if(o.includeExplanation!=="scopeName")for(const $ of n.settings){let W;switch(typeof $.scope){case"string":W=$.scope.split(/,/).map(G=>G.trim());break;case"object":W=$.scope;break;default:continue}A.push({settings:$,selectors:W.map(G=>G.split(/ /))})}R.explanation=[];let L=0;for(;E+L<O;){const $=v[S],W=g.substring($.startIndex,$.endIndex);L+=W.length,R.explanation.push({content:W,scopes:o.includeExplanation==="scopeName"?Wh($.scopes):Kh(A,$.scopes)}),S+=1}}d.push(R)}p.push(d),d=[],u=C.ruleStack}return{tokens:p,stateStack:u}}function Wh(e){return e.map(t=>({scopeName:t}))}function Kh(e,t){const n=[];for(let r=0,o=t.length;r<o;r++){const s=t[r];n[r]={scopeName:s,themeMatches:Yh(e,s,t.slice(0,r))}}return n}function Fs(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function Qh(e,t,n){if(!Fs(e[e.length-1],t))return!1;let r=e.length-2,o=n.length-1;for(;r>=0&&o>=0;)Fs(e[r],n[o])&&(r-=1),o-=1;return r===-1}function Yh(e,t,n){const r=[];for(const{selectors:o,settings:s}of e)for(const i of o)if(Qh(i,t,n)){r.push(s);break}return r}function ua(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 u=No(e,t,{...n,theme:l.theme}),d=hn(u),p=typeof l.theme=="string"?l.theme:l.theme.name;return{tokens:u,state:d,theme:p}}),s=Xh(...o.map(l=>l.tokens)),i=s[0].map((l,u)=>l.map((d,p)=>{const f={content:d.content,variants:{},offset:d.offset};return"includeExplanation"in n&&n.includeExplanation&&(f.explanation=d.explanation),s.forEach((m,g)=>{const{content:b,explanation:x,offset:v,...S}=m[u][p];f.variants[r[g].color]=S}),f})),a=o[0].state?new Yt(Object.fromEntries(o.map(l=>[l.theme,l.state?.getInternalStack(l.theme)])),o[0].state.lang):void 0;return a&&br(i,a),i}function Xh(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const o=e.map(l=>l[r]),s=t.map(()=>[]);t.forEach((l,u)=>l.push(s[u]));const i=o.map(()=>0),a=o.map(l=>l[0]);for(;a.every(l=>l);){const l=Math.min(...a.map(u=>u.content.length));for(let u=0;u<n;u++){const d=a[u];d.content.length===l?(s[u].push(d),i[u]+=1,a[u]=o[u][i[u]]):(s[u].push({...d,content:d.content.slice(0,l)}),a[u]={...d,content:d.content.slice(l),offset:d.offset+l})}}}return t}function tr(e,t,n){let r,o,s,i,a,l;if("themes"in n){const{defaultColor:u="light",cssVariablePrefix:d="--shiki-"}=n,p=Object.entries(n.themes).filter(x=>x[1]).map(x=>({color:x[0],theme:x[1]})).sort((x,v)=>x.color===u?-1:v.color===u?1:0);if(p.length===0)throw new lt("`themes` option must not be empty");const f=ua(e,t,n);if(l=hn(f),u&&!p.find(x=>x.color===u))throw new lt(`\`themes\` option must contain the defaultColor key \`${u}\``);const m=p.map(x=>e.getTheme(x.theme)),g=p.map(x=>x.color);s=f.map(x=>x.map(v=>Jh(v,g,d,u))),l&&br(s,l);const b=p.map(x=>Jn(x.theme,n));o=p.map((x,v)=>(v===0&&u?"":`${d+x.color}:`)+(xt(m[v].fg,b[v])||"inherit")).join(";"),r=p.map((x,v)=>(v===0&&u?"":`${d+x.color}-bg:`)+(xt(m[v].bg,b[v])||"inherit")).join(";"),i=`shiki-themes ${m.map(x=>x.name).join(" ")}`,a=u?void 0:[o,r].join(";")}else if("theme"in n){const u=Jn(n.theme,n);s=No(e,t,n);const d=e.getTheme(n.theme);r=xt(d.bg,u),o=xt(d.fg,u),i=d.name,l=hn(s)}else throw new lt("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:o,bg:r,themeName:i,rootStyle:a,grammarState:l}}function Jh(e,t,n,r){const o={content:e.content,explanation:e.explanation,offset:e.offset},s=t.map(l=>aa(e.variants[l])),i=new Set(s.flatMap(l=>Object.keys(l))),a={};return s.forEach((l,u)=>{for(const d of i){const p=l[d]||"inherit";if(u===0&&r)a[d]=p;else{const f=d==="color"?"":d==="background-color"?"-bg":`-${d}`,m=n+t[u]+(d==="color"?"":f);a[m]=p}}}),o.htmlStyle=a,o}function nr(e,t,n,r={meta:{},options:n,codeToHast:(o,s)=>nr(e,o,s),codeToTokens:(o,s)=>tr(e,o,s)}){let o=t;for(const m of Zn(n))o=m.preprocess?.call(r,o,n)||o;let{tokens:s,fg:i,bg:a,themeName:l,rootStyle:u,grammarState:d}=tr(e,o,n);const{mergeWhitespaces:p=!0}=n;p===!0?s=em(s):p==="never"&&(s=tm(s));const f={...r,get source(){return o}};for(const m of Zn(n))s=m.tokens?.call(f,s)||s;return Zh(s,{...n,fg:i,bg:a,themeName:l,rootStyle:u},f,d)}function Zh(e,t,n,r=hn(e)){const o=Zn(t),s=[],i={type:"root",children:[]},{structure:a="classic",tabindex:l="0"}=t;let u={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:s};const p=[],f={...n,structure:a,addClassToHast:sa,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return i},get pre(){return u},get code(){return d},get lines(){return p}};if(e.forEach((g,b)=>{b&&(a==="inline"?i.children.push({type:"element",tagName:"br",properties:{},children:[]}):a==="classic"&&s.push({type:"text",value:`
|
|
27
|
-
`}));let x={type:"element",tagName:"span",properties:{class:"line"},children:[]},v=0;for(const S of g){let C={type:"element",tagName:"span",properties:{...S.htmlAttrs},children:[{type:"text",value:S.content}]};S.htmlStyle;const k=Ah(S.htmlStyle||aa(S));k&&(C.properties.style=k);for(const w of o)C=w?.span?.call(f,C,b+1,v,x,S)||C;a==="inline"?i.children.push(C):a==="classic"&&x.children.push(C),v+=S.content.length}if(a==="classic"){for(const S of o)x=S?.line?.call(f,x,b+1)||x;p.push(x),s.push(x)}}),a==="classic"){for(const g of o)d=g?.code?.call(f,d)||d;u.children.push(d);for(const g of o)u=g?.pre?.call(f,u)||u;i.children.push(u)}let m=i;for(const g of o)m=g?.root?.call(f,m)||m;return r&&br(m,r),m}function em(e){return e.map(t=>{const n=[];let r="",o=0;return t.forEach((s,i)=>{const l=!(s.fontStyle&&s.fontStyle&it.Underline);l&&s.content.match(/^\s+$/)&&t[i+1]?(o||(o=s.offset),r+=s.content):r?(l?n.push({...s,offset:o,content:r+s.content}):n.push({content:r,offset:o},s),o=0,r=""):n.push(s)}),n})}function tm(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,s,i]=r;if(!o&&!i)return n;const a=[{...n,offset:n.offset+o.length,content:s}];return o&&a.unshift({content:o,offset:n.offset}),i&&a.push({content:i,offset:n.offset+o.length+s.length}),a}))}function nm(e,t,n){const r={meta:{},options:n,codeToHast:(s,i)=>nr(e,s,i),codeToTokens:(s,i)=>tr(e,s,i)};let o=Ph(nr(e,t,n,r));for(const s of Zn(n))o=s.postprocess?.call(r,o,n)||o;return o}const zs={light:"#333333",dark:"#bbbbbb"},Hs={light:"#fffffe",dark:"#1e1e1e"},Us="__shiki_resolved";function Mo(e){if(e?.[Us])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){const a=t.settings?t.settings.find(l=>!l.name&&!l.scope):void 0;a?.settings?.foreground&&(r=a.settings.foreground),a?.settings?.background&&(n=a.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"?zs.light:zs.dark),n||(n=t.type==="light"?Hs.light:Hs.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 s=new Map;function i(a){if(s.has(a))return s.get(a);o+=1;const l=`#${o.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${l}`]?i(a):(s.set(a,l),l)}t.settings=t.settings.map(a=>{const l=a.settings?.foreground&&!a.settings.foreground.startsWith("#"),u=a.settings?.background&&!a.settings.background.startsWith("#");if(!l&&!u)return a;const d={...a,settings:{...a.settings}};if(l){const p=i(a.settings.foreground);t.colorReplacements[p]=a.settings.foreground,d.settings.foreground=p}if(u){const p=i(a.settings.background);t.colorReplacements[p]=a.settings.background,d.settings.background=p}return d});for(const a of Object.keys(t.colors||{}))if((a==="editor.foreground"||a==="editor.background"||a.startsWith("terminal.ansi"))&&!t.colors[a]?.startsWith("#")){const l=i(t.colors[a]);t.colorReplacements[l]=t.colors[a],t.colors[a]=l}return Object.defineProperty(t,Us,{enumerable:!1,writable:!1,value:!0}),t}async function da(e){return Array.from(new Set((await Promise.all(e.filter(t=>!ra(t)).map(async t=>await ia(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function pa(e){return(await Promise.all(e.map(async n=>oa(n)?null:Mo(await ia(n))))).filter(n=>!!n)}class rm extends pp{constructor(t,n,r,o={}){super(t),this._resolver=t,this._themes=n,this._langs=r,this._alias=o,this._themes.map(s=>this.loadTheme(s)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const n=Mo(t);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(t){let n=this._textmateThemeCache.get(t);n||(n=Wn.createFromRawTheme(t),this._textmateThemeCache.set(t,n)),this._syncRegistry.setTheme(n)}getGrammar(t){if(this._alias[t]){const n=new Set([t]);for(;this._alias[t];){if(t=this._alias[t],n.has(t))throw new Ne(`Circular alias \`${Array.from(n).join(" -> ")} -> ${t}\``);n.add(t)}}return this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const n=new Set([...this._langMap.values()].filter(s=>s.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const r={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const o=this.loadGrammarWithConfiguration(t.scopeName,1,r);if(o.name=t.name,this._resolvedGrammars.set(t.name,o),t.aliases&&t.aliases.forEach(s=>{this._alias[s]=t.name}),this._loadedLanguagesCache=null,n.size)for(const s of n)this._resolvedGrammars.delete(s.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(s.scopeName),this._syncRegistry?._grammars?.delete(s.scopeName),this.loadLanguage(this._langMap.get(s.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const o of t)this.resolveEmbeddedLanguages(o);const n=Array.from(this._langGraph.entries()),r=n.filter(([o,s])=>!s);if(r.length){const o=n.filter(([s,i])=>i&&i.embeddedLangs?.some(a=>r.map(([l])=>l).includes(a))).filter(s=>!r.includes(s));throw new Ne(`Missing languages ${r.map(([s])=>`\`${s}\``).join(", ")}, required by ${o.map(([s])=>`\`${s}\``).join(", ")}`)}for(const[o,s]of n)this._resolver.addLanguage(s);for(const[o,s]of n)this.loadLanguage(s)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){if(this._langMap.set(t.name,t),this._langGraph.set(t.name,t),t.embeddedLangs)for(const n of t.embeddedLangs)this._langGraph.set(n,this._langMap.get(n))}}class om{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,n){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 s=n.slice(0,o).join(".");r=[...r,...this._injections.get(s)||[]]}return r}}let Zt=0;function sm(e){Zt+=1,e.warnings!==!1&&Zt>=10&&Zt%10===0&&console.warn(`[Shiki] ${Zt} 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 Ne("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(Mo),o=new om(e.engine,n),s=new rm(o,r,n,e.langAlias);let i;function a(S){x();const C=s.getGrammar(typeof S=="string"?S:S.name);if(!C)throw new Ne(`Language \`${S}\` not found, you may need to load it first`);return C}function l(S){if(S==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};x();const C=s.getTheme(S);if(!C)throw new Ne(`Theme \`${S}\` not found, you may need to load it first`);return C}function u(S){x();const C=l(S);i!==S&&(s.setTheme(C),i=S);const k=s.getColorMap();return{theme:C,colorMap:k}}function d(){return x(),s.getLoadedThemes()}function p(){return x(),s.getLoadedLanguages()}function f(...S){x(),s.loadLanguages(S.flat(1))}async function m(...S){return f(await da(S))}function g(...S){x();for(const C of S.flat(1))s.loadTheme(C)}async function b(...S){return x(),g(await pa(S))}function x(){if(t)throw new Ne("Shiki instance has been disposed")}function v(){t||(t=!0,s.dispose(),Zt-=1)}return{setTheme:u,getTheme:l,getLanguage:a,getLoadedThemes:d,getLoadedLanguages:p,loadLanguage:m,loadLanguageSync:f,loadTheme:b,loadThemeSync:g,dispose:v,[Symbol.dispose]:v}}async function im(e={}){e.loadWasm;const[t,n,r]=await Promise.all([pa(e.themes||[]),da(e.langs||[]),e.engine||Ti(e.loadWasm||Pd())]);return sm({...e,themes:t,langs:n,engine:r})}async function am(e={}){const t=await im(e);return{getLastGrammarState:(...n)=>Uh(t,...n),codeToTokensBase:(n,r)=>No(t,n,r),codeToTokensWithThemes:(n,r)=>ua(t,n,r),codeToTokens:(n,r)=>tr(t,n,r),codeToHast:(n,r)=>nr(t,n,r),codeToHtml:(n,r)=>nm(t,n,r),...t,getInternalContext:()=>t}}function lm(e,t,n){let r,o,s;{const a=e;r=a.langs,o=a.themes,s=a.engine}async function i(a){function l(m){if(typeof m=="string"){if(ra(m))return[];const g=r[m];if(!g)throw new lt(`Language \`${m}\` is not included in this bundle. You may want to load it from external source.`);return g}return m}function u(m){if(oa(m))return"none";if(typeof m=="string"){const g=o[m];if(!g)throw new lt(`Theme \`${m}\` is not included in this bundle. You may want to load it from external source.`);return g}return m}const d=(a.themes??[]).map(m=>u(m)),p=(a.langs??[]).map(m=>l(m)),f=await am({engine:a.engine??s(),...a,themes:d,langs:p});return{...f,loadLanguage(...m){return f.loadLanguage(...m.map(l))},loadTheme(...m){return f.loadTheme(...m.map(u))}}}return i}const cm=lm({langs:id,themes:ld,engine:()=>Ti(Promise.resolve().then(()=>require("./wasm-Dw4u1m6u.cjs")))}),Fr={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"}]}}},um={...Fr,patterns:[...Fr.patterns,{include:"#docvar"}],repository:{...Fr.repository,docvar:{patterns:[{match:"\\<\\<[^(\\>\\>)]*\\>\\>",beginCaptures:{0:{name:"punctuation.definition.comment.begin"}},endCaptures:{0:{name:"punctuation.definition.comment.end"}},name:"markup.italic.markdown"}]}}},dm={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"}]}}},ha="catppuccin-latte",pm=cm({themes:[ha],langs:["sql","json","typescript",{name:"malloy",scopeName:"source.malloy",embeddedLangs:["sql"],...um},{name:"malloysql",scopeName:"source.malloy-sql",embeddedLangs:["sql"],...dm}]});async function It(e,t){return(await pm).codeToHtml(e,{lang:t,theme:ha})}const Ie=h.styled(h.Card)({display:"flex",flexDirection:"column",height:"100%"}),qe=h.styled(h.CardContent)({display:"flex",flexDirection:"column",padding:"10px",flexGrow:1}),xr=h.styled(h.CardMedia)({padding:"10px"}),hm=h.styled("div")({display:"flex",flexDirection:"column",height:"100%"});h.styled("div")({height:"30px",backgroundColor:"rgba(225, 240, 255, 1)",display:"flex",padding:"4px",alignItems:"center"});const mm=h.styled("div")({display:"flex",height:"75vh",width:"100%",overflowY:"auto"});h.styled("div")({position:"relative",height:"100%",flex:"0 0 auto"});const fm=oe([c.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"),c.jsx("path",{d:"M7 12h2v5H7zm8-5h2v10h-2zm-4 7h2v3h-2zm0-4h2v2h-2z"},"1")]),ma=T.createContext(void 0),fa=({projectName:e,packageName:t,versionId:n,children:r})=>c.jsx(ma.Provider,{value:{projectName:e,packageName:t,versionId:n},children:r});function Le(){const e=T.useContext(ma);if(!e)throw new Error("usePackage must be used within a PackageProvider");return e}function _e({error:e,context:t}){const n=e.data?.message||"Unknown Error";return c.jsxs(c.Fragment,{children:[t&&c.jsx(h.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:t}),c.jsx("pre",{style:{whiteSpace:"pre-wrap",color:"red",padding:"10px",margin:"auto"},children:n})]})}function Ae({text:e,size:t=20,color:n="primary",thickness:r=3.6,centered:o=!0,spacing:s=2,textVariant:i="body2"}){const a=c.jsxs(h.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:s},children:[c.jsx(h.CircularProgress,{size:t,color:n,thickness:r}),e&&c.jsx(h.Typography,{variant:i,color:"text.secondary",children:e})]});return o?c.jsx(h.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"200px",width:"100%"},children:a}):a}const ga=new po.QueryClient({defaultOptions:{queries:{retry:!1,throwOnError:!1},mutations:{retry:!1,throwOnError:!1}}}),Lo=async(e,t)=>{const n=t?await t():void 0;return{baseURL:e,withCredentials:!n,headers:{Authorization:n&&`Bearer ${n}`}}};function Oe(e){const{server:t,getAccessToken:n}=Cr(),r={...e,queryKey:[...e.queryKey,t],queryFn:async()=>{try{const o=await Lo(t,n);return await e.queryFn(o)}catch(o){if(o&&typeof o=="object"&&"response"in o){const s=o;if(s.response?.data){const i=new Error(s.response.data.message||s.message);throw i.status=s.response.status,i.data=s.response.data,i}}throw o}},retry:!1,throwOnError:!1};return po.useQuery(r,ga)}function gm(e){const{server:t,getAccessToken:n}=Cr(),r={...e,mutationFn:async o=>{try{const s=await Lo(t,n);return await e.mutationFn(o,s)}catch(s){if(s&&typeof s=="object"&&"response"in s){const i=s;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 s}},retry:!1,throwOnError:!1};return po.useMutation(r,ga)}const ym=T.lazy(()=>Promise.resolve().then(()=>require("./RenderedResult-C4b9CwSp.cjs"))),bm=new Ii(new Re);function ya({modelPath:e,query:t,sourceName:n,queryName:r}){const{projectName:o,packageName:s,versionId:i}=Le(),{data:a,isSuccess:l,isError:u,error:d}=Oe({queryKey:["queryResult",o,s,e,i,t,n,r],queryFn:p=>bm.executeQuery(o,s,e,t,n,r,i,p)});return c.jsxs(c.Fragment,{children:[!l&&!u&&c.jsx(Ae,{text:"Fetching Query Results..."}),l&&c.jsx(T.Suspense,{fallback:c.jsx("div",{children:"Loading..."}),children:c.jsx(ym,{result:a.data.result})}),u&&c.jsx(_e,{context:`${o} > ${s} > ${e}`,error:d})]})}const xm=h.styled(h.Card)({display:"flex",flexDirection:"column",height:"100%"});function vm({modelPath:e,sourceName:t,queryName:n,expandResult:r,hideResultIcon:o,expandEmbedding:s,hideEmbeddingIcon:i,noView:a,annotations:l}){const[u,d]=T.useState(r),[p,f]=T.useState(s),[m,g]=T.useState(),[b,x]=T.useState(),v=Sm(t,n);return T.useEffect(()=>{It(v,"typescript").then(S=>{g(S)})},[p,v]),T.useEffect(()=>{if(l&&l.length>0){const S=l.map(C=>`// ${C}`).join(`
|
|
28
|
-
`);It(S,"typescript").then(C=>{x(C)})}},[l]),c.jsx(c.Fragment,{children:c.jsxs(xm,{variant:"outlined",sx:{padding:"0px 10px 0px 10px",borderRadius:"0px"},children:[c.jsxs(h.Stack,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",width:"100%"},children:[c.jsx(h.Typography,{variant:"subtitle2",sx:{mt:"auto",mb:"auto"},children:`${a?"":"View >"} ${n}`}),c.jsxs(h.CardActions,{sx:{padding:"0px"},children:[!o&&c.jsx(h.Tooltip,{title:u?"Hide Results":"Show Results",children:c.jsx(h.IconButton,{size:"small",onClick:()=>{d(!u)},children:c.jsx(fm,{})})}),!i&&c.jsx(h.Tooltip,{title:p?"Hide Sharing":"Show Sharing",children:c.jsx(h.IconButton,{size:"small",onClick:()=>{f(!p)},children:c.jsx(vn,{})})})]})]}),c.jsxs(h.Collapse,{in:p,timeout:"auto",unmountOnExit:!0,children:[c.jsx(h.Divider,{}),c.jsxs(h.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:[c.jsx(h.Typography,{sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:c.jsx("div",{dangerouslySetInnerHTML:{__html:m}})}),c.jsx(h.Tooltip,{title:"Copy Embeddable Code",children:c.jsx(h.IconButton,{sx:{width:"24px",height:"24px"},onClick:()=>{navigator.clipboard.writeText(v)},children:c.jsx(mr,{})})})]})]}),c.jsxs(h.Collapse,{in:u,timeout:"auto",unmountOnExit:!0,children:[c.jsx(h.Divider,{sx:{mb:"4px"}}),b&&c.jsxs(c.Fragment,{children:[c.jsx(h.Stack,{sx:{borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:c.jsx(h.Typography,{fontSize:"12px",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:c.jsx("div",{className:"content",dangerouslySetInnerHTML:{__html:b}})})}),c.jsx(h.Divider,{sx:{mb:"4px"}})]}),c.jsx(h.CardContent,{children:c.jsx(ya,{modelPath:e,sourceName:t,queryName:n})})]})]})})}function Sm(e,t){return`<QueryResult
|
|
29
|
-
sourceName="${e}"
|
|
30
|
-
queryName="${t}"
|
|
31
|
-
/>`}function Cm(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:Un(t.components[n].defaultProps,r)}const wm=Co();function km(e=wm){return Vc(e)}function Im({props:e,name:t,defaultTheme:n,themeId:r}){let o=km(n);return o=o[r]||o,Cm({theme:o,name:t,props:e})}function Pm({props:e,name:t}){return Im({props:e,name:t,defaultTheme:wo,themeId:ko})}const Tm=new Ii(new Re),jm=ae(pe.Box)(({theme:e})=>({display:"flex",flexWrap:"wrap",gap:e.spacing(.5),borderBottom:`1px solid ${e.palette.divider}`,minHeight:36})),Em=ae(h.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 Do({sourceAndPaths:e,existingQuery:t,existingSourceName:n,onQueryChange:r,onSourceChange:o}){const[s,i]=T.useState(n?e.findIndex(u=>u.sourceInfo.name===n):0),[a,l]=T.useState(t||an());return T.useEffect(()=>{o&&o(s)},[s,o]),c.jsxs(Ie,{variant:"outlined",children:[c.jsx(qe,{children:c.jsx(pe.Stack,{sx:{flexDirection:"row",justifyContent:"space-between"},children:e.length>0&&c.jsx(jm,{children:e.map((u,d)=>c.jsx(Em,{selected:s===d,onClick:()=>i(d),children:u.sourceInfo.name||`Source ${d+1}`},u.sourceInfo.name||d))})})}),c.jsx(xr,{children:c.jsxs(pe.Stack,{spacing:2,component:"section",children:[c.jsx($o,{sourceAndPath:e[s],existingQuery:a,onChange:u=>{l(u),r&&r(u)}}),c.jsx(pe.Box,{height:"5px"})]})})]})}function an(){return{query:void 0,malloyQuery:void 0,malloyResult:void 0}}function $o({sourceAndPath:e,onChange:t,existingQuery:n}){const[r,o]=T.useState(n||an()),[s,i]=T.useState([]);T.useEffect(()=>{t&&t(r)},[t,r]);const{projectName:a,packageName:l,versionId:u}=Le(),d=gm({mutationFn:(g,b)=>{const x=new fl.ASTQuery({source:e.sourceInfo,query:r?.malloyQuery}).toMalloy();return o({...r,query:x}),Tm.executeQuery(a,l,e.modelPath,x,void 0,void 0,u,b)},onSuccess:g=>{if(g){const b=JSON.parse(g.data.result);o({...r,malloyResult:b})}}}),[p,f]=T.useState(e.sourceInfo.name);T.useEffect(()=>{p!==e.sourceInfo.name&&(f(e.sourceInfo.name),o(an()))},[e,p]);const m=T.useCallback(g=>{o({...r,malloyQuery:g})},[r]);return p!==e.sourceInfo.name?c.jsx("div",{children:"Loading..."}):c.jsx(hm,{children:c.jsx(mm,{children:c.jsx(Et.MalloyExplorerProvider,{source:e.sourceInfo,query:r?.malloyQuery,onQueryChange:m,focusedNestViewPath:s,onFocusedNestViewPathChange:i,onDrill:g=>{console.info(g)},children:c.jsx("div",{style:{display:"flex",flexDirection:"column",height:"100%"},children:c.jsxs("div",{style:{display:"flex",height:"100%",overflowY:"auto"},children:[c.jsx(Et.ResizableCollapsiblePanel,{isInitiallyExpanded:!0,initialWidth:180,minWidth:180,icon:"database",title:e.sourceInfo.name,children:c.jsx(Et.SourcePanel,{onRefresh:()=>o(an())})}),c.jsx(Et.ResizableCollapsiblePanel,{isInitiallyExpanded:!0,initialWidth:280,minWidth:280,icon:"filterSliders",title:"Query",children:c.jsx(Et.QueryPanel,{runQuery:()=>{d.mutate()}})}),c.jsx(Et.ResultPanel,{source:e.sourceInfo,draftQuery:r?.malloyQuery,setDraftQuery:g=>o({...r,malloyQuery:g}),submittedQuery:r?.malloyQuery?{executionState:d.isPending?"running":"finished",response:{result:r.malloyResult},query:r.malloyQuery,queryResolutionStartMillis:Date.now(),onCancel:d.reset}:void 0,options:{showRawQuery:!0}})]})})})})},e.sourceInfo.name)}const Rm=new fr(new Re);function _m({modelPath:e,expandResults:t,hideResultIcons:n,expandEmbeddings:r,hideEmbeddingIcons:o}){const[s,i]=T.useState(!1),[a,l]=T.useState(),[u,d]=T.useState(0),{projectName:p,packageName:f,versionId:m}=Le(),g=Am(e);T.useEffect(()=>{It(g,"typescript").then(C=>{l(C)})},[s,g]);const{data:b,isError:x,isLoading:v,error:S}=Oe({queryKey:["package",p,f,e,m],queryFn:async C=>(await Rm.getModel(p,f,e,m,C)).data});return v?c.jsx(Ae,{text:"Fetching Model..."}):x?(console.log("error",S),c.jsx(_e,{error:S,context:`${f} > ${e}`})):c.jsxs(Ie,{variant:"outlined",children:[c.jsxs(qe,{children:[c.jsxs(h.Stack,{sx:{flexDirection:"row",justifyContent:"space-between"},children:[Array.isArray(b.sourceInfos)&&b.sourceInfos.length>0&&c.jsx(h.Tabs,{value:u,onChange:(C,k)=>d(k),variant:"scrollable",scrollButtons:"auto",sx:{borderBottom:1,borderColor:"divider",minHeight:36},children:b.sourceInfos.map((C,k)=>{let w;try{w=JSON.parse(C)}catch{w={name:String(k)}}return c.jsx(h.Tab,{label:w.name||`Source ${k+1}`,sx:{minHeight:36}},w.name||k)})}),!o&&c.jsx(h.CardActions,{sx:{padding:"0px 10px 0px 10px",mb:"auto",mt:"auto"},children:c.jsx(h.Tooltip,{title:s?"Hide Embedding":"View Embedding",children:c.jsx(h.IconButton,{size:"small",onClick:()=>{i(!s)},children:c.jsx(vn,{})})})})]}),c.jsxs(h.Collapse,{in:s,timeout:"auto",unmountOnExit:!0,children:[c.jsx(h.Divider,{}),c.jsxs(h.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:[c.jsx(h.Typography,{sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:c.jsx("div",{dangerouslySetInnerHTML:{__html:a}})}),c.jsx(h.Tooltip,{title:"Copy Embeddable Code",children:c.jsx(h.IconButton,{sx:{width:"24px",height:"24px"},onClick:()=>{navigator.clipboard.writeText(g)},children:c.jsx(mr,{})})})]})]}),c.jsx(h.Divider,{})]}),c.jsx(xr,{children:c.jsxs(h.Stack,{spacing:2,component:"section",children:[Array.isArray(b.sourceInfos)&&b.sourceInfos.length>0&&c.jsx($o,{sourceAndPath:{modelPath:e,sourceInfo:JSON.parse(b.sourceInfos[u])}}),b.queries?.length>0&&c.jsxs(Ie,{variant:"outlined",sx:{padding:"0px 10px 0px 10px"},children:[c.jsx(qe,{sx:{p:"10px"},children:c.jsx(h.Typography,{variant:"subtitle1",children:"Named Queries"})}),c.jsx(h.Stack,{spacing:1,component:"section",children:b.queries.map(C=>c.jsx(vm,{modelPath:e,queryName:C.name,expandResult:t,hideResultIcon:n,expandEmbedding:r,hideEmbeddingIcon:o,noView:!0,annotations:C.annotations},C.name))}),c.jsx(h.Box,{height:"10px"})]}),c.jsx(h.Box,{height:"5px"})]})})]})}function Am(e){return`<Model
|
|
32
|
-
modelPath="${e}"
|
|
33
|
-
accessToken={accessToken}
|
|
34
|
-
/>`}const ba=oe(c.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"})),Om=T.lazy(()=>Promise.resolve().then(()=>require("./RenderedResult-C4b9CwSp.cjs")));function xa({result:e,minHeight:t,maxHeight:n}){const[r,o]=T.useState(!1),[s,i]=T.useState(0),[a,l]=T.useState(!1),u=T.useRef(null),d=T.useRef(null),[p,f]=T.useState(void 0),[m,g]=T.useState(!1),b=T.useCallback(()=>{const k=r;o(!r),k&&d.current&&setTimeout(()=>{d.current?.scrollIntoView({behavior:"smooth",block:"start"})},100)},[r]),x=T.useCallback(k=>{i(k)},[]);if(T.useEffect(()=>{if(m){l(!0);return}if(s===0){l(!1);return}const k=t-20,w=s>k;s<k&&f(s+20),l(w)},[s,m,t]),!e)return null;const v=c.jsx(Ae,{text:"Loading...",centered:!0,size:32}),S=m?r?n-40:t-40:void 0,C=p?{minHeight:`${p}px`,height:"100%"}:{height:"100%"};return c.jsx(c.Fragment,{children:c.jsxs(h.Box,{ref:d,sx:{position:"relative",minHeight:`${t}px`,maxHeight:`${r?n:t}px`,border:"0px",borderRadius:0,overflow:"hidden",display:"flex",flexDirection:"column",...C},children:[c.jsx(h.Box,{ref:u,sx:{flex:1,overflow:r?"auto":"hidden",p:0,pb:a?"40px":1},children:e&&c.jsx(T.Suspense,{fallback:v,children:c.jsx(Om,{result:e,height:S,isFillElement:k=>{g(k)},onSizeChange:x})})||v}),a&&c.jsx(h.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:c.jsx(h.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?c.jsx(Fn.ExpandLess,{sx:{fontSize:30}}):c.jsx(Fn.ExpandMore,{sx:{fontSize:30}})})})]})})}const Nm=`
|
|
26
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function DE(e,t,n,r){const i=r.schema,s=i.space==="svg"?!1:r.settings.omitOptionalTags;let a=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const o=[];let u;i.space==="html"&&e.tagName==="svg"&&(r.schema=kn);const l=wE(r,e.properties),d=r.all(i.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=i,d&&(a=!1),(l||!s||!SE(e,t,n))&&(o.push("<",e.tagName,l?" "+l:""),a&&(i.space==="svg"||r.settings.closeSelfClosing)&&(u=l.charAt(l.length-1),(!r.settings.tightSelfClosing||u==="/"||u&&u!=='"'&&u!=="'")&&o.push(" "),o.push("/")),o.push(">")),o.push(d),!a&&(!s||!Ru(e,t,n))&&o.push("</"+e.tagName+">"),o.join("")}function wE(e,t){const n=[];let r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){const s=NE(e,i,t[i]);s&&n.push(s)}}for(;++r<n.length;){const s=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&s!=='"'&&s!=="'"&&(n[r]+=" ")}return n.join("")}function NE(e,t,n){const r=Gi(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,s=e.settings.allowDangerousCharacters?0:1;let a=e.quote,o;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 u=kr(r.attribute,Object.assign({},e.settings.characterReferences,{subset:us.name[i][s]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?xa:ya)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?u:(e.settings.preferUnquoted&&(o=kr(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:us.unquoted[i][s]}))),o!==n&&(e.settings.quoteSmart&&Us(n,a)>Us(n,e.alternative)&&(a=e.alternative),o=a+kr(n,Object.assign({},e.settings.characterReferences,{subset:(a==="'"?us.single:us.double)[i][s],attribute:!0}))+a),u+(o&&"="+o))}const PE=["<","&"];function of(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:kr(e.value,Object.assign({},r.settings.characterReferences,{subset:PE}))}function RE(e,t,n,r){return r.settings.allowDangerousHtml?e.value:of(e,t,n,r)}function LE(e,t,n,r){return r.all(e)}const OE=Ea("type",{invalid:FE,unknown:ME,handlers:{comment:aE,doctype:oE,element:DE,raw:RE,root:LE,text:of}});function FE(e){throw new Error("Expected node, not `"+e+"`")}function ME(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const BE={},jE={},HE=[];function UE(e,t){const n=BE,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:zE,all:$E,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||Gh,characterReferences:n.characterReferences||jE,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?kn:Hr,quote:r,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function zE(e,t,n){return OE(e,t,n,this)}function $E(e){const t=[],n=e&&e.children||HE;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function qE(e){return Array.isArray(e)?e:[e]}function Ta(e,t=!1){const n=e.split(/(\r?\n)/g);let r=0;const i=[];for(let s=0;s<n.length;s+=2){const a=t?n[s]+(n[s+1]||""):n[s];i.push([a,r]),r+=n[s].length,r+=n[s+1]?.length||0}return i}function Lu(e){return!e||["plaintext","txt","text","plain"].includes(e)}function uf(e){return e==="ansi"||Lu(e)}function Ou(e){return e==="none"}function lf(e){return Ou(e)}function cf(e,t){if(!t)return e;e.properties||={},e.properties.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 r of n)r&&!e.properties.class.includes(r)&&e.properties.class.push(r);return e}function VE(e,t){let n=0;const r=[];for(const i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function WE(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((r,i)=>r-i);return n.length?e.map(r=>r.flatMap(i=>{const s=n.filter(a=>i.offset<a&&a<i.offset+i.content.length).map(a=>a-i.offset).sort((a,o)=>a-o);return s.length?VE(i,s):i})):e}async function df(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function zs(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[i,s]of Object.entries(t?.colorReplacements||{}))typeof s=="string"?n[i]=s:i===r&&Object.assign(n,s);return n}function Gn(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function hf(e){const t={};return e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle&&(e.fontStyle&Tn.Italic&&(t["font-style"]="italic"),e.fontStyle&Tn.Bold&&(t["font-weight"]="bold"),e.fontStyle&Tn.Underline&&(t["text-decoration"]="underline")),t}function GE(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}function YE(e){const t=Ta(e,!0).map(([i])=>i);function n(i){if(i===e.length)return{line:t.length-1,character:t[t.length-1].length};let s=i,a=0;for(const o of t){if(s<o.length)break;s-=o.length,a++}return{line:a,character:s}}function r(i,s){let a=0;for(let o=0;o<i;o++)a+=t[o].length;return a+=s,a}return{lines:t,indexToPos:n,posToIndex:r}}class _t extends Error{constructor(t){super(t),this.name="ShikiError"}}const ff=new WeakMap;function Ca(e,t){ff.set(e,t)}function Ri(e){return ff.get(e)}class Ur{_stacks={};lang;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 Ur(Object.fromEntries(qE(n).map(r=>[r,Uo])),t)}constructor(...t){if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,i]=t;this.lang=r,this._stacks={[i]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}get scopes(){return Ec(this._stacks[this.theme])}getScopes(t=this.theme){return Ec(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.scopes}}}function Ec(e){const t=[],n=new Set;function r(i){if(n.has(i))return;n.add(i);const s=i?.nameScopesList?.scopeName;s&&t.push(s),i.parent&&r(i.parent)}return r(e),t}function KE(e,t){if(!(e instanceof Ur))throw new _t("Invalid grammar state");return e.getInternalStack(t)}function QE(){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 _t(`Invalid decoration offset: ${a}. Code length: ${n.source.length}`);return{...i.indexToPos(a),offset:a}}else{const o=i.lines[a.line];if(o===void 0)throw new _t(`Invalid decoration position ${JSON.stringify(a)}. Lines length: ${i.lines.length}`);if(a.character<0||a.character>o.length)throw new _t(`Invalid decoration position ${JSON.stringify(a)}. Line ${a.line} length: ${o.length}`);return{...a,offset:i.posToIndex(a.line,a.character)}}};const i=YE(n.source),s=(n.options.decorations||[]).map(a=>({...a,start:r(a.start),end:r(a.end)}));XE(s),e.set(n.meta,{decorations:s,converter:i,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(!this.options.decorations?.length)return;const i=t(this).decorations.flatMap(a=>[a.start.offset,a.end.offset]);return WE(n,i)},code(n){if(!this.options.decorations?.length)return;const r=t(this),i=Array.from(n.children).filter(d=>d.type==="element"&&d.tagName==="span");if(i.length!==r.converter.lines.length)throw new _t(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function s(d,c,m,p){const g=i[d];let b="",T=-1,x=-1;if(c===0&&(T=0),m===0&&(x=0),m===Number.POSITIVE_INFINITY&&(x=g.children.length),T===-1||x===-1)for(let S=0;S<g.children.length;S++)b+=pf(g.children[S]),T===-1&&b.length===c&&(T=S+1),x===-1&&b.length===m&&(x=S+1);if(T===-1)throw new _t(`Failed to find start index for decoration ${JSON.stringify(p.start)}`);if(x===-1)throw new _t(`Failed to find end index for decoration ${JSON.stringify(p.end)}`);const C=g.children.slice(T,x);if(!p.alwaysWrap&&C.length===g.children.length)o(g,p,"line");else if(!p.alwaysWrap&&C.length===1&&C[0].type==="element")o(C[0],p,"token");else{const S={type:"element",tagName:"span",properties:{},children:C};o(S,p,"wrapper"),g.children.splice(T,C.length,S)}}function a(d,c){i[d]=o(i[d],c,"line")}function o(d,c,m){const p=c.properties||{},g=c.transform||(b=>b);return d.tagName=c.tagName||"span",d.properties={...d.properties,...p,class:d.properties.class},c.properties?.class&&cf(d,c.properties.class),d=g(d,m)||d,d}const u=[],l=r.decorations.sort((d,c)=>c.start.offset-d.start.offset);for(const d of l){const{start:c,end:m}=d;if(c.line===m.line)s(c.line,c.character,m.character,d);else if(c.line<m.line){s(c.line,c.character,Number.POSITIVE_INFINITY,d);for(let p=c.line+1;p<m.line;p++)u.unshift(()=>a(p,d));s(m.line,0,m.character,d)}}u.forEach(d=>d())}}}function XE(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new _t(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const i=e[r],s=n.start.offset<i.start.offset&&i.start.offset<n.end.offset,a=n.start.offset<i.end.offset&&i.end.offset<n.end.offset,o=i.start.offset<n.start.offset&&n.start.offset<i.end.offset,u=i.start.offset<n.end.offset&&n.end.offset<i.end.offset;if(s||a||o||u){if(a&&a||o&&u)continue;throw new _t(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function pf(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(pf).join(""):""}const ZE=[QE()];function $s(e){return[...e.transformers||[],...ZE]}var Yn=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Za={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function JE(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 xc(e,t){let n=1;const r=e[t+n++];let i;if(r==="2"){const s=[e[t+n++],e[t+n++],e[t+n]].map(a=>Number.parseInt(a));s.length===3&&!s.some(a=>Number.isNaN(a))&&(i={type:"rgb",rgb:s})}else if(r==="5"){const s=Number.parseInt(e[t+n]);Number.isNaN(s)||(i={type:"table",index:Number(s)})}return[n,i]}function ex(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n],i=Number.parseInt(r);if(!Number.isNaN(i))if(i===0)t.push({type:"resetAll"});else if(i<=9)Za[i]&&t.push({type:"setDecoration",value:Za[i]});else if(i<=29){const s=Za[i-20];s&&t.push({type:"resetDecoration",value:s})}else if(i<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Yn[i-30]}});else if(i===38){const[s,a]=xc(e,n);a&&t.push({type:"setForegroundColor",value:a}),n+=s}else if(i===39)t.push({type:"resetForegroundColor"});else if(i<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Yn[i-40]}});else if(i===48){const[s,a]=xc(e,n);a&&t.push({type:"setBackgroundColor",value:a}),n+=s}else i===49?t.push({type:"resetBackgroundColor"}):i>=90&&i<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Yn[i-90+8]}}):i>=100&&i<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Yn[i-100+8]}})}return t}function tx(){let e=null,t=null,n=new Set;return{parse(r){const i=[];let s=0;do{const a=JE(r,s),o=a.sequence?r.substring(s,a.startPosition):r.substring(s);if(o.length>0&&i.push({value:o,foreground:e,background:t,decorations:new Set(n)}),a.sequence){const u=ex(a.sequence);for(const l of u)l.type==="resetAll"?(e=null,t=null,n.clear()):l.type==="resetForegroundColor"?e=null:l.type==="resetBackgroundColor"?t=null:l.type==="resetDecoration"&&n.delete(l.value);for(const l of u)l.type==="setForegroundColor"?e=l.value:l.type==="setBackgroundColor"?t=l.value:l.type==="setDecoration"&&n.add(l.value)}s=a.position}while(s<r.length);return i}}}var nx={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 rx(e=nx){function t(o){return e[o]}function n(o){return`#${o.map(u=>Math.max(0,Math.min(u,255)).toString(16).padStart(2,"0")).join("")}`}let r;function i(){if(r)return r;r=[];for(let l=0;l<Yn.length;l++)r.push(t(Yn[l]));let o=[0,95,135,175,215,255];for(let l=0;l<6;l++)for(let d=0;d<6;d++)for(let c=0;c<6;c++)r.push(n([o[l],o[d],o[c]]));let u=8;for(let l=0;l<24;l++,u+=10)r.push(n([u,u,u]));return r}function s(o){return i()[o]}function a(o){switch(o.type){case"named":return t(o.name);case"rgb":return n(o.rgb);case"table":return s(o.index)}}return{value:a}}function ix(e,t,n){const r=zs(e,n),i=Ta(t),s=rx(Object.fromEntries(Yn.map(o=>[o,e.colors?.[`terminal.ansi${o[0].toUpperCase()}${o.substring(1)}`]]))),a=tx();return i.map(o=>a.parse(o[0]).map(u=>{let l,d;u.decorations.has("reverse")?(l=u.background?s.value(u.background):e.bg,d=u.foreground?s.value(u.foreground):e.fg):(l=u.foreground?s.value(u.foreground):e.fg,d=u.background?s.value(u.background):void 0),l=Gn(l,r),d=Gn(d,r),u.decorations.has("dim")&&(l=sx(l));let c=Tn.None;return u.decorations.has("bold")&&(c|=Tn.Bold),u.decorations.has("italic")&&(c|=Tn.Italic),u.decorations.has("underline")&&(c|=Tn.Underline),{content:u.value,offset:o[1],color:l,bgColor:d,fontStyle:c}}))}function sx(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 Fu(e,t,n={}){const{lang:r="text",theme:i=e.getLoadedThemes()[0]}=n;if(Lu(r)||Ou(i))return Ta(t).map(u=>[{content:u[0],offset:u[1]}]);const{theme:s,colorMap:a}=e.setTheme(i);if(r==="ansi")return ix(s,t,n);const o=e.getLanguage(r);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new An(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(s.name))throw new An(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return ox(t,o,s,a,n)}function ax(...e){if(e.length===2)return Ri(e[1]);const[t,n,r={}]=e,{lang:i="text",theme:s=t.getLoadedThemes()[0]}=r;if(Lu(i)||Ou(s))throw new An("Plain language does not have grammar state");if(i==="ansi")throw new An("ANSI language does not have grammar state");const{theme:a,colorMap:o}=t.setTheme(s),u=t.getLanguage(i);return new Ur(qs(n,u,a,o,r).stateStack,u.name,a.name)}function ox(e,t,n,r,i){const s=qs(e,t,n,r,i),a=new Ur(qs(e,t,n,r,i).stateStack,t.name,n.name);return Ca(s.tokens,a),s.tokens}function qs(e,t,n,r,i){const s=zs(n,i),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:o=500}=i,u=Ta(e);let l=i.grammarState?KE(i.grammarState,n.name)??Uo:i.grammarContextCode!=null?qs(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:Uo,d=[];const c=[];for(let m=0,p=u.length;m<p;m++){const[g,b]=u[m];if(g===""){d=[],c.push([]);continue}if(a>0&&g.length>=a){d=[],c.push([{content:g,offset:b,color:"",fontStyle:0}]);continue}let T,x,C;i.includeExplanation&&(T=t.tokenizeLine(g,l),x=T.tokens,C=0);const S=t.tokenizeLine2(g,l,o),w=S.tokens.length/2;for(let D=0;D<w;D++){const N=S.tokens[2*D],B=D+1<w?S.tokens[2*D+2]:g.length;if(N===B)continue;const Z=S.tokens[2*D+1],J=Gn(r[Nr.getForeground(Z)],s),E=Nr.getFontStyle(Z),L={content:g.substring(N,B),offset:b+N,color:J,fontStyle:E};if(i.includeExplanation){const O=[];if(i.includeExplanation!=="scopeName")for(const M of n.settings){let K;switch(typeof M.scope){case"string":K=M.scope.split(/,/).map(se=>se.trim());break;case"object":K=M.scope;break;default:continue}O.push({settings:M,selectors:K.map(se=>se.split(/ /))})}L.explanation=[];let z=0;for(;N+z<B;){const M=x[C],K=g.substring(M.startIndex,M.endIndex);z+=K.length,L.explanation.push({content:K,scopes:i.includeExplanation==="scopeName"?ux(M.scopes):lx(O,M.scopes)}),C+=1}}d.push(L)}c.push(d),d=[],l=S.ruleStack}return{tokens:c,stateStack:l}}function ux(e){return e.map(t=>({scopeName:t}))}function lx(e,t){const n=[];for(let r=0,i=t.length;r<i;r++){const s=t[r];n[r]={scopeName:s,themeMatches:dx(e,s,t.slice(0,r))}}return n}function yc(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function cx(e,t,n){if(!yc(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)yc(e[r],n[i])&&(r-=1),i-=1;return r===-1}function dx(e,t,n){const r=[];for(const{selectors:i,settings:s}of e)for(const a of i)if(cx(a,t,n)){r.push(s);break}return r}function mf(e,t,n){const r=Object.entries(n.themes).filter(u=>u[1]).map(u=>({color:u[0],theme:u[1]})),i=r.map(u=>{const l=Fu(e,t,{...n,theme:u.theme}),d=Ri(l),c=typeof u.theme=="string"?u.theme:u.theme.name;return{tokens:l,state:d,theme:c}}),s=hx(...i.map(u=>u.tokens)),a=s[0].map((u,l)=>u.map((d,c)=>{const m={content:d.content,variants:{},offset:d.offset};return"includeExplanation"in n&&n.includeExplanation&&(m.explanation=d.explanation),s.forEach((p,g)=>{const{content:b,explanation:T,offset:x,...C}=p[l][c];m.variants[r[g].color]=C}),m})),o=i[0].state?new Ur(Object.fromEntries(i.map(u=>[u.theme,u.state?.getInternalStack(u.theme)])),i[0].state.lang):void 0;return o&&Ca(a,o),a}function hx(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const i=e.map(u=>u[r]),s=t.map(()=>[]);t.forEach((u,l)=>u.push(s[l]));const a=i.map(()=>0),o=i.map(u=>u[0]);for(;o.every(u=>u);){const u=Math.min(...o.map(l=>l.content.length));for(let l=0;l<n;l++){const d=o[l];d.content.length===u?(s[l].push(d),a[l]+=1,o[l]=i[l][a[l]]):(s[l].push({...d,content:d.content.slice(0,u)}),o[l]={...d,content:d.content.slice(u),offset:d.offset+u})}}}return t}function Vs(e,t,n){let r,i,s,a,o,u;if("themes"in n){const{defaultColor:l="light",cssVariablePrefix:d="--shiki-"}=n,c=Object.entries(n.themes).filter(T=>T[1]).map(T=>({color:T[0],theme:T[1]})).sort((T,x)=>T.color===l?-1:x.color===l?1:0);if(c.length===0)throw new An("`themes` option must not be empty");const m=mf(e,t,n);if(u=Ri(m),l&&!c.find(T=>T.color===l))throw new An(`\`themes\` option must contain the defaultColor key \`${l}\``);const p=c.map(T=>e.getTheme(T.theme)),g=c.map(T=>T.color);s=m.map(T=>T.map(x=>fx(x,g,d,l))),u&&Ca(s,u);const b=c.map(T=>zs(T.theme,n));i=c.map((T,x)=>(x===0&&l?"":`${d+T.color}:`)+(Gn(p[x].fg,b[x])||"inherit")).join(";"),r=c.map((T,x)=>(x===0&&l?"":`${d+T.color}-bg:`)+(Gn(p[x].bg,b[x])||"inherit")).join(";"),a=`shiki-themes ${p.map(T=>T.name).join(" ")}`,o=l?void 0:[i,r].join(";")}else if("theme"in n){const l=zs(n.theme,n);s=Fu(e,t,n);const d=e.getTheme(n.theme);r=Gn(d.bg,l),i=Gn(d.fg,l),a=d.name,u=Ri(s)}else throw new An("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:i,bg:r,themeName:a,rootStyle:o,grammarState:u}}function fx(e,t,n,r){const i={content:e.content,explanation:e.explanation,offset:e.offset},s=t.map(u=>hf(e.variants[u])),a=new Set(s.flatMap(u=>Object.keys(u))),o={};return s.forEach((u,l)=>{for(const d of a){const c=u[d]||"inherit";if(l===0&&r)o[d]=c;else{const m=d==="color"?"":d==="background-color"?"-bg":`-${d}`,p=n+t[l]+(d==="color"?"":m);o[p]=c}}}),i.htmlStyle=o,i}function Ws(e,t,n,r={meta:{},options:n,codeToHast:(i,s)=>Ws(e,i,s),codeToTokens:(i,s)=>Vs(e,i,s)}){let i=t;for(const p of $s(n))i=p.preprocess?.call(r,i,n)||i;let{tokens:s,fg:a,bg:o,themeName:u,rootStyle:l,grammarState:d}=Vs(e,i,n);const{mergeWhitespaces:c=!0}=n;c===!0?s=mx(s):c==="never"&&(s=gx(s));const m={...r,get source(){return i}};for(const p of $s(n))s=p.tokens?.call(m,s)||s;return px(s,{...n,fg:a,bg:o,themeName:u,rootStyle:l},m,d)}function px(e,t,n,r=Ri(e)){const i=$s(t),s=[],a={type:"root",children:[]},{structure:o="classic",tabindex:u="0"}=t;let l={type:"element",tagName:"pre",properties:{class:`shiki ${t.themeName||""}`,style:t.rootStyle||`background-color:${t.bg};color:${t.fg}`,...u!==!1&&u!=null?{tabindex:u.toString()}:{},...Object.fromEntries(Array.from(Object.entries(t.meta||{})).filter(([g])=>!g.startsWith("_")))},children:[]},d={type:"element",tagName:"code",properties:{},children:s};const c=[],m={...n,structure:o,addClassToHast:cf,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return a},get pre(){return l},get code(){return d},get lines(){return c}};if(e.forEach((g,b)=>{b&&(o==="inline"?a.children.push({type:"element",tagName:"br",properties:{},children:[]}):o==="classic"&&s.push({type:"text",value:`
|
|
27
|
+
`}));let T={type:"element",tagName:"span",properties:{class:"line"},children:[]},x=0;for(const C of g){let S={type:"element",tagName:"span",properties:{...C.htmlAttrs},children:[{type:"text",value:C.content}]};C.htmlStyle;const w=GE(C.htmlStyle||hf(C));w&&(S.properties.style=w);for(const D of i)S=D?.span?.call(m,S,b+1,x,T,C)||S;o==="inline"?a.children.push(S):o==="classic"&&T.children.push(S),x+=C.content.length}if(o==="classic"){for(const C of i)T=C?.line?.call(m,T,b+1)||T;c.push(T),s.push(T)}}),o==="classic"){for(const g of i)d=g?.code?.call(m,d)||d;l.children.push(d);for(const g of i)l=g?.pre?.call(m,l)||l;a.children.push(l)}let p=a;for(const g of i)p=g?.root?.call(m,p)||p;return r&&Ca(p,r),p}function mx(e){return e.map(t=>{const n=[];let r="",i=0;return t.forEach((s,a)=>{const u=!(s.fontStyle&&s.fontStyle&Tn.Underline);u&&s.content.match(/^\s+$/)&&t[a+1]?(i||(i=s.offset),r+=s.content):r?(u?n.push({...s,offset:i,content:r+s.content}):n.push({content:r,offset:i},s),i=0,r=""):n.push(s)}),n})}function gx(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[,i,s,a]=r;if(!i&&!a)return n;const o=[{...n,offset:n.offset+i.length,content:s}];return i&&o.unshift({content:i,offset:n.offset}),a&&o.push({content:a,offset:n.offset+i.length+s.length}),o}))}function bx(e,t,n){const r={meta:{},options:n,codeToHast:(s,a)=>Ws(e,s,a),codeToTokens:(s,a)=>Vs(e,s,a)};let i=UE(Ws(e,t,n,r));for(const s of $s(n))i=s.postprocess?.call(r,i,n)||i;return i}const Tc={light:"#333333",dark:"#bbbbbb"},Cc={light:"#fffffe",dark:"#1e1e1e"},Sc="__shiki_resolved";function Mu(e){if(e?.[Sc])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){const o=t.settings?t.settings.find(u=>!u.name&&!u.scope):void 0;o?.settings?.foreground&&(r=o.settings.foreground),o?.settings?.background&&(n=o.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"?Tc.light:Tc.dark),n||(n=t.type==="light"?Cc.light:Cc.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 i=0;const s=new Map;function a(o){if(s.has(o))return s.get(o);i+=1;const u=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${u}`]?a(o):(s.set(o,u),u)}t.settings=t.settings.map(o=>{const u=o.settings?.foreground&&!o.settings.foreground.startsWith("#"),l=o.settings?.background&&!o.settings.background.startsWith("#");if(!u&&!l)return o;const d={...o,settings:{...o.settings}};if(u){const c=a(o.settings.foreground);t.colorReplacements[c]=o.settings.foreground,d.settings.foreground=c}if(l){const c=a(o.settings.background);t.colorReplacements[c]=o.settings.background,d.settings.background=c}return d});for(const o of Object.keys(t.colors||{}))if((o==="editor.foreground"||o==="editor.background"||o.startsWith("terminal.ansi"))&&!t.colors[o]?.startsWith("#")){const u=a(t.colors[o]);t.colorReplacements[u]=t.colors[o],t.colors[o]=u}return Object.defineProperty(t,Sc,{enumerable:!1,writable:!1,value:!0}),t}async function gf(e){return Array.from(new Set((await Promise.all(e.filter(t=>!uf(t)).map(async t=>await df(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function bf(e){return(await Promise.all(e.map(async n=>lf(n)?null:Mu(await df(n))))).filter(n=>!!n)}class Ex extends P2{constructor(t,n,r,i={}){super(t),this._resolver=t,this._themes=n,this._langs=r,this._alias=i,this._themes.map(s=>this.loadTheme(s)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const n=Mu(t);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(t){let n=this._textmateThemeCache.get(t);n||(n=Fs.createFromRawTheme(t),this._textmateThemeCache.set(t,n)),this._syncRegistry.setTheme(n)}getGrammar(t){if(this._alias[t]){const n=new Set([t]);for(;this._alias[t];){if(t=this._alias[t],n.has(t))throw new _t(`Circular alias \`${Array.from(n).join(" -> ")} -> ${t}\``);n.add(t)}}return this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const n=new Set([...this._langMap.values()].filter(s=>s.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const r={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const i=this.loadGrammarWithConfiguration(t.scopeName,1,r);if(i.name=t.name,this._resolvedGrammars.set(t.name,i),t.aliases&&t.aliases.forEach(s=>{this._alias[s]=t.name}),this._loadedLanguagesCache=null,n.size)for(const s of n)this._resolvedGrammars.delete(s.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(s.scopeName),this._syncRegistry?._grammars?.delete(s.scopeName),this.loadLanguage(this._langMap.get(s.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const i of t)this.resolveEmbeddedLanguages(i);const n=Array.from(this._langGraph.entries()),r=n.filter(([i,s])=>!s);if(r.length){const i=n.filter(([s,a])=>a&&a.embeddedLangs?.some(o=>r.map(([u])=>u).includes(o))).filter(s=>!r.includes(s));throw new _t(`Missing languages ${r.map(([s])=>`\`${s}\``).join(", ")}, required by ${i.map(([s])=>`\`${s}\``).join(", ")}`)}for(const[i,s]of n)this._resolver.addLanguage(s);for(const[i,s]of n)this.loadLanguage(s)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){if(this._langMap.set(t.name,t),this._langGraph.set(t.name,t),t.embeddedLangs)for(const n of t.embeddedLangs)this._langGraph.set(n,this._langMap.get(n))}}class xx{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,n){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 i=1;i<=n.length;i++){const s=n.slice(0,i).join(".");r=[...r,...this._injections.get(s)||[]]}return r}}let ei=0;function yx(e){ei+=1,e.warnings!==!1&&ei>=10&&ei%10===0&&console.warn(`[Shiki] ${ei} 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 _t("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(Mu),i=new xx(e.engine,n),s=new Ex(i,r,n,e.langAlias);let a;function o(C){T();const S=s.getGrammar(typeof C=="string"?C:C.name);if(!S)throw new _t(`Language \`${C}\` not found, you may need to load it first`);return S}function u(C){if(C==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};T();const S=s.getTheme(C);if(!S)throw new _t(`Theme \`${C}\` not found, you may need to load it first`);return S}function l(C){T();const S=u(C);a!==C&&(s.setTheme(S),a=C);const w=s.getColorMap();return{theme:S,colorMap:w}}function d(){return T(),s.getLoadedThemes()}function c(){return T(),s.getLoadedLanguages()}function m(...C){T(),s.loadLanguages(C.flat(1))}async function p(...C){return m(await gf(C))}function g(...C){T();for(const S of C.flat(1))s.loadTheme(S)}async function b(...C){return T(),g(await bf(C))}function T(){if(t)throw new _t("Shiki instance has been disposed")}function x(){t||(t=!0,s.dispose(),ei-=1)}return{setTheme:l,getTheme:u,getLanguage:o,getLoadedThemes:d,getLoadedLanguages:c,loadLanguage:p,loadLanguageSync:m,loadTheme:b,loadThemeSync:g,dispose:x,[Symbol.dispose]:x}}async function Tx(e={}){e.loadWasm;const[t,n,r]=await Promise.all([bf(e.themes||[]),gf(e.langs||[]),e.engine||Nh(e.loadWasm||Wb())]);return yx({...e,themes:t,langs:n,engine:r})}async function Cx(e={}){const t=await Tx(e);return{getLastGrammarState:(...n)=>ax(t,...n),codeToTokensBase:(n,r)=>Fu(t,n,r),codeToTokensWithThemes:(n,r)=>mf(t,n,r),codeToTokens:(n,r)=>Vs(t,n,r),codeToHast:(n,r)=>Ws(t,n,r),codeToHtml:(n,r)=>bx(t,n,r),...t,getInternalContext:()=>t}}function Sx(e,t,n){let r,i,s;{const o=e;r=o.langs,i=o.themes,s=o.engine}async function a(o){function u(p){if(typeof p=="string"){if(uf(p))return[];const g=r[p];if(!g)throw new An(`Language \`${p}\` is not included in this bundle. You may want to load it from external source.`);return g}return p}function l(p){if(lf(p))return"none";if(typeof p=="string"){const g=i[p];if(!g)throw new An(`Theme \`${p}\` is not included in this bundle. You may want to load it from external source.`);return g}return p}const d=(o.themes??[]).map(p=>l(p)),c=(o.langs??[]).map(p=>u(p)),m=await Cx({engine:o.engine??s(),...o,themes:d,langs:c});return{...m,loadLanguage(...p){return m.loadLanguage(...p.map(u))},loadTheme(...p){return m.loadTheme(...p.map(l))}}}return a}const Ax=Sx({langs:kb,themes:vb,engine:()=>Nh(Promise.resolve().then(()=>require("./wasm-Dw4u1m6u.cjs")))}),Ja={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"}]}}},Ix={...Ja,patterns:[...Ja.patterns,{include:"#docvar"}],repository:{...Ja.repository,docvar:{patterns:[{match:"\\<\\<[^(\\>\\>)]*\\>\\>",beginCaptures:{0:{name:"punctuation.definition.comment.begin"}},endCaptures:{0:{name:"punctuation.definition.comment.end"}},name:"markup.italic.markdown"}]}}},kx={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"}]}}},Ef="catppuccin-latte",_x=Ax({themes:[Ef],langs:["sql","json","typescript",{name:"malloy",scopeName:"source.malloy",embeddedLangs:["sql"],...Ix},{name:"malloysql",scopeName:"source.malloy-sql",embeddedLangs:["sql"],...kx}]});async function nr(e,t){return(await _x).codeToHtml(e,{lang:t,theme:Ef})}const ut=y.styled(y.Card)({display:"flex",flexDirection:"column",height:"100%"}),Ut=y.styled(y.CardContent)({display:"flex",flexDirection:"column",padding:"10px",flexGrow:1}),Sa=y.styled(y.CardMedia)({padding:"10px"}),xf=y.styled("div")({display:"flex",flexDirection:"column",height:"100%"});y.styled("div")({height:"30px",backgroundColor:"rgba(225, 240, 255, 1)",display:"flex",padding:"4px",alignItems:"center"});const yf=y.styled("div")({display:"flex",height:"75vh",width:"100%",overflowY:"auto"});y.styled("div")({position:"relative",height:"100%",flex:"0 0 auto"});const vx=Me([h.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"),h.jsx("path",{d:"M7 12h2v5H7zm8-5h2v10h-2zm-4 7h2v3h-2zm0-4h2v2h-2z"},"1")]),Tf=P.createContext(void 0),Cf=({projectName:e,packageName:t,versionId:n,children:r})=>h.jsx(Tf.Provider,{value:{projectName:e,packageName:t,versionId:n},children:r});function yt(e=!0){const t=P.useContext(Tf);if(!t&&e)throw new Error("usePackage must be used within a PackageProvider");return t}function Tt({error:e,context:t}){const n=e.data?.message||"Unknown Error";return h.jsxs(h.Fragment,{children:[t&&h.jsx(y.Typography,{variant:"body2",sx:{p:"10px",m:"auto"},children:t}),h.jsx("pre",{style:{whiteSpace:"pre-wrap",color:"red",padding:"10px",margin:"auto"},children:n})]})}function Ct({text:e,size:t=20,color:n="primary",thickness:r=3.6,centered:i=!0,spacing:s=2,textVariant:a="body2"}){const o=h.jsxs(y.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:s},children:[h.jsx(y.CircularProgress,{size:t,color:n,thickness:r}),e&&h.jsx(y.Typography,{variant:a,color:"text.secondary",children:e})]});return i?h.jsx(y.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"200px",width:"100%"},children:o}):o}const Sf=new mu.QueryClient({defaultOptions:{queries:{retry:!1,throwOnError:!1},mutations:{retry:!1,throwOnError:!1}}}),Bu=async(e,t)=>{const n=t?await t():void 0;return{baseURL:e,withCredentials:!n,headers:{Authorization:n&&`Bearer ${n}`}}};function St(e){const{server:t,getAccessToken:n}=ka(),r={...e,queryKey:[...e.queryKey,t],queryFn:async()=>{try{const i=await Bu(t,n);return await e.queryFn(i)}catch(i){if(i&&typeof i=="object"&&"response"in i){const s=i;if(s.response?.data){const a=new Error(s.response.data.message||s.message);throw a.status=s.response.status,a.data=s.response.data,a}}throw i}},retry:!1,throwOnError:!1};return mu.useQuery(r,Sf)}function Dx(e){const{server:t,getAccessToken:n}=ka(),r={...e,mutationFn:async i=>{try{const s=await Bu(t,n);return await e.mutationFn(i,s)}catch(s){if(s&&typeof s=="object"&&"response"in s){const a=s;if(a.response?.data){const o=new Error(a.response.data.message||a.message);throw o.status=a.response.status,o.data=a.response.data,o}}throw s}},retry:!1,throwOnError:!1};return mu.useMutation(r,Sf)}const wx=P.lazy(()=>Promise.resolve().then(()=>require("./RenderedResult-DW6glKC-.cjs"))),Nx=new Dh(new xt);function Af(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 If({modelPath:e,query:t,sourceName:n,queryName:r,optionalProjectName:i,optionalPackageName:s,optionalVersionId:a}){const o=yt(!1),u=i||o?.projectName,l=s||o?.packageName,d=a||o?.versionId;if(!u||!l)throw new Error("No project or package name provided. Must be set in props or via PackageProvider");const{data:c,isSuccess:m,isError:p,error:g}=St({queryKey:["queryResult",u,l,e,d,t,n,r],queryFn:b=>Nx.executeQuery(u,l,e,t,n,r,d,b)});return h.jsxs(h.Fragment,{children:[!m&&!p&&h.jsx(Ct,{text:"Fetching Query Results..."}),m&&h.jsx(P.Suspense,{fallback:h.jsx("div",{children:"Loading..."}),children:h.jsx(wx,{result:c.data.result})}),p&&h.jsx(Tt,{context:`${u} > ${l} > ${e}`,error:g})]})}const kf=Me(h.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"})),Px=P.lazy(()=>Promise.resolve().then(()=>require("./RenderedResult-DW6glKC-.cjs")));function _f({result:e,minHeight:t,maxHeight:n}){const[r,i]=P.useState(!1),[s,a]=P.useState(0),[o,u]=P.useState(!1),l=P.useRef(null),d=P.useRef(null),[c,m]=P.useState(void 0),[p,g]=P.useState(!1),b=P.useCallback(()=>{const w=r;i(!r),w&&d.current&&setTimeout(()=>{d.current?.scrollIntoView({behavior:"smooth",block:"start"})},100)},[r]),T=P.useCallback(w=>{a(w)},[]);if(P.useEffect(()=>{if(p){u(!0);return}if(s===0){u(!1);return}const w=t-20,D=s>w;s<w&&m(s+20),u(D)},[s,p,t]),!e)return null;const x=h.jsx(Ct,{text:"Loading...",centered:!0,size:32}),C=p?r?n-40:t-40:void 0,S=c?{minHeight:`${c}px`,height:"100%"}:{height:"100%"};return h.jsx(h.Fragment,{children:h.jsxs(y.Box,{ref:d,sx:{position:"relative",minHeight:`${t}px`,maxHeight:`${r?n:t}px`,border:"0px",borderRadius:0,overflow:"hidden",display:"flex",flexDirection:"column",...S},children:[h.jsx(y.Box,{ref:l,sx:{flex:1,overflow:r?"auto":"hidden",p:0,pb:o?"40px":1},children:e&&h.jsx(P.Suspense,{fallback:x,children:h.jsx(Px,{result:e,height:C,isFillElement:w=>{g(w)},onSizeChange:T})})||x}),o&&h.jsx(y.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:h.jsx(y.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?h.jsx(Ns.ExpandLess,{sx:{fontSize:30}}):h.jsx(Ns.ExpandMore,{sx:{fontSize:30}})})})]})})}const Rx=`
|
|
35
28
|
.code-display pre {
|
|
36
29
|
margin: 0;
|
|
37
30
|
padding: 0;
|
|
38
31
|
}
|
|
39
|
-
`;function
|
|
40
|
-
modelPath="${e}"
|
|
41
|
-
query="
|
|
42
|
-
${t}
|
|
43
|
-
"
|
|
44
|
-
/>`}function $m(e,t){return`<Notebook
|
|
32
|
+
`;function Lx({cell:e,notebookPath:t,expandCodeCell:n,hideCodeCellIcon:r,expandEmbedding:i,hideEmbeddingIcon:s}){const[a,o]=P.useState(n),[u,l]=P.useState(i),[d,c]=P.useState(),[m,p]=P.useState(),[g,b]=P.useState(!1),{packageName:T,projectName:x}=yt(),C=Af({modelPath:t,query:e.text,optionalPackageName:T,optionalProjectName:x});return P.useEffect(()=>{e.type==="code"&&nr(e.text,"malloy").then(S=>{c(S)})},[e]),P.useEffect(()=>{nr(C,"typescript").then(S=>{p(S)})},[C]),e.type==="markdown"&&h.jsx(ut,{variant:"outlined",children:h.jsx(Ut,{children:h.jsx(gu,{children:e.text})})})||e.type==="code"&&h.jsxs(ut,{variant:"outlined",sx:{height:"auto"},children:[(!r||!s&&e.result)&&h.jsxs(y.Stack,{sx:{flexDirection:"row",justifyContent:"space-between",ml:"8px"},children:[h.jsxs(y.Stack,{sx:{flexDirection:"row"},children:[e.newSources&&e.newSources.length>0&&h.jsx(y.Typography,{variant:"overline",children:h.jsx("b",{children:"Data source"})}),e.result&&h.jsx(y.Typography,{variant:"overline",fontWeight:"bold",children:"Results"})]}),h.jsx(y.Stack,{sx:{flexDirection:"row"},children:h.jsxs(y.CardActions,{sx:{padding:"0px 8px 0px 8px",mb:"auto",mt:"auto"},children:[e.newSources&&e.newSources.length>0&&h.jsx(y.Tooltip,{title:"Explore Data Sources",children:h.jsx(y.IconButton,{size:"small",onClick:()=>{b(!g),l(!1),o(!1)},children:h.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M3 3h18v18H3V3zm2 2v14h14V5H5zm2 2h10v2H7V7zm0 4h10v2H7v-2zm0 4h10v2H7v-2z",fill:"currentColor"})})})}),!r&&h.jsx(y.Tooltip,{title:a?"Hide Code":"View Code",children:h.jsx(y.IconButton,{size:"small",onClick:()=>{o(!a)},children:h.jsx(kf,{})})}),!s&&e.result&&h.jsx(y.Tooltip,{title:u?"Hide Embedding":"View Embedding",children:h.jsx(y.IconButton,{size:"small",onClick:()=>{l(!u)},children:h.jsx($i,{})})})]})})]}),h.jsx(y.Collapse,{in:u,timeout:"auto",unmountOnExit:!0,children:h.jsxs(y.Stack,{sx:{p:"8px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:[h.jsx(y.Typography,{component:"div",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},dangerouslySetInnerHTML:{__html:m}}),h.jsx(y.Tooltip,{title:"Copy Embeddable Code",children:h.jsx(y.IconButton,{sx:{width:"24px",height:"24px"},onClick:()=>{navigator.clipboard.writeText(C)},children:h.jsx(ma,{})})})]})}),h.jsxs(y.Collapse,{in:a,timeout:"auto",unmountOnExit:!0,children:[h.jsx("style",{children:Rx}),h.jsx(y.Stack,{sx:{mx:"8px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:h.jsx("div",{className:"code-display",style:{fontSize:"12px",width:"800px",border:"1px solid rgb(220,220,220)"},dangerouslySetInnerHTML:{__html:d}})})]}),h.jsx(y.Collapse,{in:g,timeout:"auto",unmountOnExit:!0,sx:{p:"5px"},children:h.jsx(Yu,{sourceAndPaths:e.newSources.map(S=>({sourceInfo:JSON.parse(S),modelPath:t}))})}),e.result&&!g&&h.jsx(h.Fragment,{children:h.jsx(_f,{result:e.result,minHeight:300,maxHeight:700})})]})}const Ox=new kh(new xt);function vf({notebookPath:e,expandResults:t,hideResultIcons:n,expandEmbeddings:r,hideEmbeddingIcons:i}){const[s,a]=P.useState(!1),[o,u]=P.useState(),{projectName:l,packageName:d,versionId:c}=yt(),m=Fx(e,!0);P.useEffect(()=>{nr(m,"typescript").then(x=>{u(x)})},[s,m]);const{data:p,isSuccess:g,isError:b,error:T}=St({queryKey:["notebook",l,d,e,c],queryFn:async x=>(await Ox.getNotebook(l,d,e,c,x)).data});return h.jsxs(ut,{variant:"outlined",children:[h.jsxs(Ut,{children:[h.jsxs(y.Stack,{sx:{flexDirection:"row",justifyContent:"space-between"},children:[h.jsx(y.Typography,{variant:"overline",fontWeight:"bold",children:"Notebook"}),!i&&h.jsx(y.CardActions,{sx:{padding:"0px 10px 0px 10px",mb:"auto",mt:"auto"},children:h.jsx(y.Tooltip,{title:s?"Hide Embedding":"View Embedding",children:h.jsx(y.IconButton,{size:"small",onClick:()=>{a(!s)},children:h.jsx($i,{})})})})]}),h.jsx(y.Collapse,{in:s,timeout:"auto",unmountOnExit:!0,children:h.jsxs(y.Stack,{sx:{borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:[h.jsx(y.Typography,{sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:h.jsx("div",{dangerouslySetInnerHTML:{__html:o}})}),h.jsx(y.Tooltip,{title:"Copy Embeddable Code",children:h.jsx(y.IconButton,{sx:{width:"24px",height:"24px"},onClick:()=>{navigator.clipboard.writeText(m)},children:h.jsx(ma,{})})})]})})]}),h.jsx(Sa,{children:h.jsxs(y.Stack,{spacing:2,component:"section",children:[!g&&!b&&h.jsx(Ct,{text:"Fetching Notebook..."}),g&&p.notebookCells?.map((x,C)=>h.jsx(Lx,{cell:x,notebookPath:e,expandCodeCell:t,hideCodeCellIcon:n,expandEmbedding:r,hideEmbeddingIcon:i},C)),b&&T.status===404&&h.jsxs(y.Typography,{variant:"body2",children:[h.jsx("code",{children:`${l} > ${d} > ${e}`})," ","not found."]}),b&&T.status!==404&&h.jsx(Tt,{error:T,context:`${l} > ${d} > ${e}`})]})})]})}function Fx(e,t){return`<Notebook
|
|
45
33
|
notebookPath="${e}"
|
|
46
34
|
expandCodeCells={${t}}
|
|
47
|
-
/>`}class Sa{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 s=localStorage.key(o);if(s&&s.startsWith(n+"/")){const i=s.substring(n.length+1);r.push(i)}}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),s=this.makeKey(t,r),i=localStorage.getItem(o);if(i===null)throw new Error(`Notebook not found at path: ${n}`);localStorage.setItem(s,i),localStorage.removeItem(o)}}const Bm=oe(c.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"})),Mt=pe.createStack({createStyledComponent:ae("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>Wt({props:e,name:"MuiStack"})});function Bo(){const e=si.useNavigate();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 ln{constructor(t,n,r){this.notebookData=r,this.notebookStorage=t,this.userContext=n,this.notebookData?this.isSaved=!0:(this.notebookData={models:[],cells:[],notebookPath:void 0},this.isSaved=!1)}isSaved;notebookStorage;userContext;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 ln(this.notebookStorage,this.userContext,this.notebookData)}toMalloyNotebook(){return this.notebookData.cells.map(t=>t.isMarkdown?`>>>markdown
|
|
48
|
-
`+t.value:`>>>malloy
|
|
49
|
-
import {${t.sourceName}}" from '${t.modelPath}'"
|
|
50
|
-
`+t.value+`
|
|
51
|
-
`).join(`
|
|
52
|
-
`)}static newNotebook(t,n){return new ln(t,n,void 0)}static loadNotebook(t,n,r){let o;try{const s=t.getNotebook(n,r);s&&(o=JSON.parse(s))}catch{o={models:[],cells:[],notebookPath:r}}return new ln(t,n,o)}}const Ca=oe(c.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"})),qm=new wi(new Re);function Vm(){const{projectName:e,packageName:t,versionId:n}=Le(),{data:r,isSuccess:o,isError:s,error:i}=Oe({queryKey:["package",e,t,n],queryFn:a=>qm.getPackage(e,t,n,!1,a)});return c.jsx(Ie,{variant:"outlined",sx:{width:"100%"},children:c.jsxs(qe,{children:[c.jsx(h.Typography,{variant:"overline",fontWeight:"bold",children:"Package Config"}),c.jsx(h.Divider,{}),c.jsx(h.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:c.jsxs(h.List,{dense:!0,disablePadding:!0,children:[c.jsx(h.ListItem,{dense:!0,disablePadding:!0,children:c.jsx(h.ListItemText,{primary:"Name",primaryTypographyProps:{fontWeight:"500"},secondary:t})}),!o&&!s&&c.jsx(h.ListItem,{children:c.jsx(Ae,{text:"Fetching Package Metadata..."})}),o&&(r.data&&c.jsx(h.ListItem,{dense:!0,disablePadding:!0,children:c.jsx(h.ListItemText,{primary:"Description",primaryTypographyProps:{fontWeight:"500"},secondary:r.data.description})})||c.jsxs(h.ListItem,{disablePadding:!0,dense:!0,sx:{mt:"20px"},children:[c.jsx(Ca,{sx:{color:"grey.600",mr:"10px"}}),c.jsx(h.ListItemText,{primary:"No package manifest"})]})),s&&c.jsx(_e,{error:i,context:`${e} > ${t} > ${n}`})]})})]})})}const Fm=new Si(new Re);function zm({connection:e}){return c.jsxs(h.TableRow,{children:[c.jsx(h.TableCell,{children:c.jsx(h.Typography,{variant:"body2",children:e.name})}),c.jsx(h.TableCell,{children:c.jsx(h.Typography,{variant:"body2",children:e.type})})]},e.name)}function Hm(){const{projectName:e}=Le(),{data:t,isSuccess:n,isError:r,error:o}=Oe({queryKey:["connections",e],queryFn:s=>Fm.listConnections(e,s)});return c.jsx(Ie,{variant:"outlined",sx:{width:"100%"},children:c.jsxs(qe,{children:[c.jsx(h.Typography,{variant:"overline",fontWeight:"bold",children:"Database Connections"}),c.jsx(h.Divider,{}),c.jsxs(h.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!n&&!r&&c.jsx(h.Typography,{variant:"body2",sx:{m:"auto"},children:"Fetching Connections..."}),n&&t.data.length>0&&c.jsx(h.Table,{size:"small",children:c.jsxs(h.TableBody,{children:[c.jsxs(h.TableRow,{children:[c.jsx(h.TableCell,{children:c.jsx(h.Typography,{variant:"subtitle2",fontWeight:"bold",children:"Connection Name"})}),c.jsx(h.TableCell,{children:c.jsx(h.Typography,{variant:"subtitle2",fontWeight:"bold",children:"Type"})})]}),t.data.map(s=>c.jsx(zm,{connection:s},s.name))]})}),n&&t.data.length===0&&c.jsx(h.Typography,{variant:"body2",children:"No Connections"}),r&&c.jsx(_e,{error:o,context:`${e} > Connections`})]})]})})}const Um=new Ku(new Re);function Gm(){const{projectName:e,packageName:t,versionId:n}=Le(),[r,o]=T.useState(!1),[s,i]=T.useState(null),a=g=>{i(g),o(!0)},l=()=>{o(!1),i(null)},{data:u,isError:d,error:p,isSuccess:f}=Oe({queryKey:["databases",e,t,n],queryFn:g=>Um.listDatabases(e,t,n,g)}),m=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 c.jsxs(c.Fragment,{children:[c.jsx(Ie,{variant:"outlined",sx:{width:"100%"},children:c.jsxs(qe,{children:[c.jsx(h.Typography,{variant:"overline",fontWeight:"bold",children:"Embedded Databases"}),c.jsx(h.Divider,{}),c.jsxs(h.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!f&&!d&&c.jsx(Ae,{text:"Fetching Databases..."}),d&&c.jsx(_e,{error:p,context:`${e} > ${t} > Databases`}),f&&u.data.length>0&&c.jsxs(h.Table,{size:"small",children:[c.jsx(h.TableHead,{children:c.jsxs(h.TableRow,{children:[c.jsx(h.TableCell,{children:"Name"}),c.jsx(h.TableCell,{align:"right",children:"Rows"})]})}),c.jsx(h.TableBody,{children:u.data.map(g=>c.jsxs(h.TableRow,{onClick:()=>a(g),sx:{cursor:"pointer"},children:[c.jsx(h.TableCell,{component:"th",scope:"row",children:g.path}),c.jsx(h.TableCell,{align:"right",children:m(g.info.rowCount)})]},g.path))})]}),f&&u.data.length===0&&c.jsx(h.Typography,{variant:"body2",sx:{m:"auto"},children:"No databases found"})]})]})}),c.jsxs(h.Dialog,{open:r,onClose:l,maxWidth:"sm",fullWidth:!0,children:[c.jsx(h.DialogTitle,{children:s?.path}),c.jsx(h.DialogContent,{children:s?.info?.columns&&c.jsx(h.TableContainer,{children:c.jsxs(h.Table,{size:"small",children:[c.jsx(h.TableHead,{children:c.jsxs(h.TableRow,{children:[c.jsx(h.TableCell,{children:"Column"}),c.jsx(h.TableCell,{children:"Type"})]})}),c.jsx(h.TableBody,{children:s.info.columns.map(g=>c.jsxs(h.TableRow,{children:[c.jsx(h.TableCell,{component:"th",scope:"row",children:g.name}),c.jsx(h.TableCell,{children:g.type})]},g.name))})]})})})]})]})}function at(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 N(){return N=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},N.apply(null,arguments)}function io(){return io=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},io.apply(null,arguments)}function wa(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 ao(e,t){return ao=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},ao(e,t)}function ka(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ao(e,t)}const Gs={disabled:!1},rr=T.createContext(null);var Wm=function(t){return t.scrollTop},rn="unmounted",yt="exited",bt="entering",Dt="entered",lo="exiting",ut=function(e){ka(t,e);function t(r,o){var s;s=e.call(this,r,o)||this;var i=o,a=i&&!i.isMounting?r.enter:r.appear,l;return s.appearStatus=null,r.in?a?(l=yt,s.appearStatus=bt):l=Dt:r.unmountOnExit||r.mountOnEnter?l=rn:l=yt,s.state={status:l},s.nextCallback=null,s}t.getDerivedStateFromProps=function(o,s){var i=o.in;return i&&s.status===rn?{status:yt}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var s=null;if(o!==this.props){var i=this.state.status;this.props.in?i!==bt&&i!==Dt&&(s=bt):(i===bt||i===Dt)&&(s=lo)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,s,i,a;return s=i=a=o,o!=null&&typeof o!="number"&&(s=o.exit,i=o.enter,a=o.appear!==void 0?o.appear:i),{exit:s,enter:i,appear:a}},n.updateStatus=function(o,s){if(o===void 0&&(o=!1),s!==null)if(this.cancelNextCallback(),s===bt){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:jn.findDOMNode(this);i&&Wm(i)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===yt&&this.setState({status:rn})},n.performEnter=function(o){var s=this,i=this.props.enter,a=this.context?this.context.isMounting:o,l=this.props.nodeRef?[a]:[jn.findDOMNode(this),a],u=l[0],d=l[1],p=this.getTimeouts(),f=a?p.appear:p.enter;if(!o&&!i||Gs.disabled){this.safeSetState({status:Dt},function(){s.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:bt},function(){s.props.onEntering(u,d),s.onTransitionEnd(f,function(){s.safeSetState({status:Dt},function(){s.props.onEntered(u,d)})})})},n.performExit=function(){var o=this,s=this.props.exit,i=this.getTimeouts(),a=this.props.nodeRef?void 0:jn.findDOMNode(this);if(!s||Gs.disabled){this.safeSetState({status:yt},function(){o.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:lo},function(){o.props.onExiting(a),o.onTransitionEnd(i.exit,function(){o.safeSetState({status:yt},function(){o.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,s){s=this.setNextCallback(s),this.setState(o,s)},n.setNextCallback=function(o){var s=this,i=!0;return this.nextCallback=function(a){i&&(i=!1,s.nextCallback=null,o(a))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},n.onTransitionEnd=function(o,s){this.setNextCallback(s);var i=this.props.nodeRef?this.props.nodeRef.current:jn.findDOMNode(this),a=o==null&&!this.props.addEndListener;if(!i||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],u=l[0],d=l[1];this.props.addEndListener(u,d)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===rn)return null;var s=this.props,i=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var a=wa(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return T.createElement(rr.Provider,{value:null},typeof i=="function"?i(o,a):T.cloneElement(T.Children.only(i),a))},t}(T.Component);ut.contextType=rr;ut.propTypes={};function Lt(){}ut.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Lt,onEntering:Lt,onEntered:Lt,onExit:Lt,onExiting:Lt,onExited:Lt};ut.UNMOUNTED=rn;ut.EXITED=yt;ut.ENTERING=bt;ut.ENTERED=Dt;ut.EXITING=lo;function Km(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qo(e,t){var n=function(s){return t&&T.isValidElement(s)?t(s):s},r=Object.create(null);return e&&T.Children.map(e,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function Qm(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 s in e)s in t?o.length&&(r[s]=o,o=[]):o.push(s);var i,a={};for(var l in t){if(r[l])for(i=0;i<r[l].length;i++){var u=r[l][i];a[r[l][i]]=n(u)}a[l]=n(l)}for(i=0;i<o.length;i++)a[o[i]]=n(o[i]);return a}function St(e,t,n){return n[t]!=null?n[t]:e.props[t]}function Ym(e,t){return qo(e.children,function(n){return T.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:St(n,"appear",e),enter:St(n,"enter",e),exit:St(n,"exit",e)})})}function Xm(e,t,n){var r=qo(e.children),o=Qm(t,r);return Object.keys(o).forEach(function(s){var i=o[s];if(T.isValidElement(i)){var a=s in t,l=s in r,u=t[s],d=T.isValidElement(u)&&!u.props.in;l&&(!a||d)?o[s]=T.cloneElement(i,{onExited:n.bind(null,i),in:!0,exit:St(i,"exit",e),enter:St(i,"enter",e)}):!l&&a&&!d?o[s]=T.cloneElement(i,{in:!1}):l&&a&&T.isValidElement(u)&&(o[s]=T.cloneElement(i,{onExited:n.bind(null,i),in:u.props.in,exit:St(i,"exit",e),enter:St(i,"enter",e)}))}}),o}var Jm=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Zm={component:"div",childFactory:function(t){return t}},Vo=function(e){ka(t,e);function t(r,o){var s;s=e.call(this,r,o)||this;var i=s.handleExited.bind(Km(s));return s.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},s}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,s){var i=s.children,a=s.handleExited,l=s.firstRender;return{children:l?Ym(o,a):Xm(o,i,a),firstRender:!1}},n.handleExited=function(o,s){var i=qo(this.props.children);o.key in i||(o.props.onExited&&o.props.onExited(s),this.mounted&&this.setState(function(a){var l=io({},a.children);return delete l[o.key],{children:l}}))},n.render=function(){var o=this.props,s=o.component,i=o.childFactory,a=wa(o,["component","childFactory"]),l=this.state.contextValue,u=Jm(this.state.children).map(i);return delete a.appear,delete a.enter,delete a.exit,s===null?T.createElement(rr.Provider,{value:l},u):T.createElement(rr.Provider,{value:l},T.createElement(s,a,u))},t}(T.Component);Vo.propTypes={};Vo.defaultProps=Zm;const Ws={};function Ia(e,t){const n=P.useRef(Ws);return n.current===Ws&&(n.current=e(t)),n}const ef=[];function tf(e){P.useEffect(e,ef)}class Fo{static create(){return new Fo}currentId=null;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function Pa(){const e=Ia(Fo.create).current;return tf(e.disposeEffect),e}function Ks(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 nf(e){return Gt("MuiCollapse",e)}Kt("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const rf=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return yn(r,nf,n)},of=ae("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]}})(Po(({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"}}]}))),sf=ae("div",{name:"MuiCollapse",slot:"Wrapper"})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),af=ae("div",{name:"MuiCollapse",slot:"WrapperInner"})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),mn=P.forwardRef(function(t,n){const r=Wt({props:t,name:"MuiCollapse"}),{addEndListener:o,children:s,className:i,collapsedSize:a="0px",component:l,easing:u,in:d,onEnter:p,onEntered:f,onEntering:m,onExit:g,onExited:b,onExiting:x,orientation:v="vertical",style:S,timeout:C=gi.standard,TransitionComponent:k=ut,...w}=r,E={...r,orientation:v,collapsedSize:a},O=rf(E),B=Tu(),q=Pa(),y=P.useRef(null),R=P.useRef(),A=typeof a=="number"?`${a}px`:a,L=v==="horizontal",$=L?"width":"height",W=P.useRef(null),G=Gn(n,W),se=D=>je=>{if(D){const we=W.current;je===void 0?D(we):D(we,je)}},ie=()=>y.current?y.current[L?"clientWidth":"clientHeight"]:0,H=se((D,je)=>{y.current&&L&&(y.current.style.position="absolute"),D.style[$]=A,p&&p(D,je)}),Q=se((D,je)=>{const we=ie();y.current&&L&&(y.current.style.position="");const{duration:Ve,easing:M}=Ks({style:S,timeout:C,easing:u},{mode:"enter"});if(C==="auto"){const _=B.transitions.getAutoHeightDuration(we);D.style.transitionDuration=`${_}ms`,R.current=_}else D.style.transitionDuration=typeof Ve=="string"?Ve:`${Ve}ms`;D.style[$]=`${we}px`,D.style.transitionTimingFunction=M,m&&m(D,je)}),F=se((D,je)=>{D.style[$]="auto",f&&f(D,je)}),K=se(D=>{D.style[$]=`${ie()}px`,g&&g(D)}),X=se(b),he=se(D=>{const je=ie(),{duration:we,easing:Ve}=Ks({style:S,timeout:C,easing:u},{mode:"exit"});if(C==="auto"){const M=B.transitions.getAutoHeightDuration(je);D.style.transitionDuration=`${M}ms`,R.current=M}else D.style.transitionDuration=typeof we=="string"?we:`${we}ms`;D.style[$]=A,D.style.transitionTimingFunction=Ve,x&&x(D)}),J=D=>{C==="auto"&&q.start(R.current||0,D),o&&o(W.current,D)};return c.jsx(k,{in:d,onEnter:H,onEntered:F,onEntering:Q,onExit:K,onExited:X,onExiting:he,addEndListener:J,nodeRef:W,timeout:C==="auto"?null:C,...w,children:(D,{ownerState:je,...we})=>c.jsx(of,{as:l,className:fe(O.root,i,{entered:O.entered,exited:!d&&A==="0px"&&O.hidden}[D]),style:{[L?"minWidth":"minHeight"]:A,...S},ref:G,ownerState:{...E,state:D},...we,children:c.jsx(sf,{ownerState:{...E,state:D},className:O.wrapper,ref:y,children:c.jsx(af,{ownerState:{...E,state:D},className:O.wrapperInner,children:s})})})})});mn&&(mn.muiSupportAuto=!0);const lf=P.createContext(void 0);function cf(){return P.useContext(lf)}function Qs(e){try{return e.matches(":focus-visible")}catch{}return!1}class or{static create(){return new or}static use(){const t=Ia(or.create).current,[n,r]=P.useState(!1);return t.shouldMount=n,t.setShouldMount=r,P.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=df(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};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 uf(){return or.use()}function df(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function pf(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:s,rippleSize:i,in:a,onExited:l,timeout:u}=e,[d,p]=P.useState(!1),f=fe(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),m={width:i,height:i,top:-(i/2)+s,left:-(i/2)+o},g=fe(n.child,d&&n.childLeaving,r&&n.childPulsate);return!a&&!d&&p(!0),P.useEffect(()=>{if(!a&&l!=null){const b=setTimeout(l,u);return()=>{clearTimeout(b)}}},[l,a,u]),c.jsx("span",{className:f,style:m,children:c.jsx("span",{className:g})})}const He=Kt("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),co=550,hf=80,mf=pe.keyframes`
|
|
35
|
+
/>`}const Df=Me(h.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"})),Mx=new _h(new xt);function Bx(){const{projectName:e,packageName:t,versionId:n}=yt(),{data:r,isSuccess:i,isError:s,error:a}=St({queryKey:["package",e,t,n],queryFn:o=>Mx.getPackage(e,t,n,!1,o)});return h.jsx(ut,{variant:"outlined",sx:{width:"100%"},children:h.jsxs(Ut,{children:[h.jsx(y.Typography,{variant:"overline",fontWeight:"bold",children:"Package Config"}),h.jsx(y.Divider,{}),h.jsx(y.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:h.jsxs(y.List,{dense:!0,disablePadding:!0,children:[h.jsx(y.ListItem,{dense:!0,disablePadding:!0,children:h.jsx(y.ListItemText,{primary:"Name",primaryTypographyProps:{fontWeight:"500"},secondary:t})}),!i&&!s&&h.jsx(y.ListItem,{children:h.jsx(Ct,{text:"Fetching Package Metadata..."})}),i&&(r.data&&h.jsx(y.ListItem,{dense:!0,disablePadding:!0,children:h.jsx(y.ListItemText,{primary:"Description",primaryTypographyProps:{fontWeight:"500"},secondary:r.data.description})})||h.jsxs(y.ListItem,{disablePadding:!0,dense:!0,sx:{mt:"20px"},children:[h.jsx(Df,{sx:{color:"grey.600",mr:"10px"}}),h.jsx(y.ListItemText,{primary:"No package manifest"})]})),s&&h.jsx(Tt,{error:a,context:`${e} > ${t} > ${n}`})]})})]})})}const jx=new Ih(new xt);function Hx({connection:e}){return h.jsxs(y.TableRow,{children:[h.jsx(y.TableCell,{children:h.jsx(y.Typography,{variant:"body2",children:e.name})}),h.jsx(y.TableCell,{children:h.jsx(y.Typography,{variant:"body2",children:e.type})})]},e.name)}function Ux(){const{projectName:e}=yt(),{data:t,isSuccess:n,isError:r,error:i}=St({queryKey:["connections",e],queryFn:s=>jx.listConnections(e,s)});return h.jsx(ut,{variant:"outlined",sx:{width:"100%"},children:h.jsxs(Ut,{children:[h.jsx(y.Typography,{variant:"overline",fontWeight:"bold",children:"Database Connections"}),h.jsx(y.Divider,{}),h.jsxs(y.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!n&&!r&&h.jsx(y.Typography,{variant:"body2",sx:{m:"auto"},children:"Fetching Connections..."}),n&&t.data.length>0&&h.jsx(y.Table,{size:"small",children:h.jsxs(y.TableBody,{children:[h.jsxs(y.TableRow,{children:[h.jsx(y.TableCell,{children:h.jsx(y.Typography,{variant:"subtitle2",fontWeight:"bold",children:"Connection Name"})}),h.jsx(y.TableCell,{children:h.jsx(y.Typography,{variant:"subtitle2",fontWeight:"bold",children:"Type"})})]}),t.data.map(s=>h.jsx(Hx,{connection:s},s.name))]})}),n&&t.data.length===0&&h.jsx(y.Typography,{variant:"body2",children:"No Connections"}),r&&h.jsx(Tt,{error:i,context:`${e} > Connections`})]})]})})}const zx=new pb(new xt);function $x(){const{projectName:e,packageName:t,versionId:n}=yt(),[r,i]=P.useState(!1),[s,a]=P.useState(null),o=g=>{a(g),i(!0)},u=()=>{i(!1),a(null)},{data:l,isError:d,error:c,isSuccess:m}=St({queryKey:["databases",e,t,n],queryFn:g=>zx.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 h.jsxs(h.Fragment,{children:[h.jsx(ut,{variant:"outlined",sx:{width:"100%"},children:h.jsxs(Ut,{children:[h.jsx(y.Typography,{variant:"overline",fontWeight:"bold",children:"Embedded Databases"}),h.jsx(y.Divider,{}),h.jsxs(y.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!m&&!d&&h.jsx(Ct,{text:"Fetching Databases..."}),d&&h.jsx(Tt,{error:c,context:`${e} > ${t} > Databases`}),m&&l.data.length>0&&h.jsxs(y.Table,{size:"small",children:[h.jsx(y.TableHead,{children:h.jsxs(y.TableRow,{children:[h.jsx(y.TableCell,{children:"Name"}),h.jsx(y.TableCell,{align:"right",children:"Rows"})]})}),h.jsx(y.TableBody,{children:l.data.map(g=>h.jsxs(y.TableRow,{onClick:()=>o(g),sx:{cursor:"pointer"},children:[h.jsx(y.TableCell,{component:"th",scope:"row",children:g.path}),h.jsx(y.TableCell,{align:"right",children:p(g.info.rowCount)})]},g.path))})]}),m&&l.data.length===0&&h.jsx(y.Typography,{variant:"body2",sx:{m:"auto"},children:"No databases found"})]})]})}),h.jsxs(y.Dialog,{open:r,onClose:u,maxWidth:"sm",fullWidth:!0,children:[h.jsx(y.DialogTitle,{children:s?.path}),h.jsx(y.DialogContent,{children:s?.info?.columns&&h.jsx(y.TableContainer,{children:h.jsxs(y.Table,{size:"small",children:[h.jsx(y.TableHead,{children:h.jsxs(y.TableRow,{children:[h.jsx(y.TableCell,{children:"Column"}),h.jsx(y.TableCell,{children:"Type"})]})}),h.jsx(y.TableBody,{children:s.info.columns.map(g=>h.jsxs(y.TableRow,{children:[h.jsx(y.TableCell,{component:"th",scope:"row",children:g.name}),h.jsx(y.TableCell,{children:g.type})]},g.name))})]})})})]})]})}function Cn(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 le(){return le=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},le.apply(null,arguments)}function qx(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:Ls(t.components[n].defaultProps,r)}const Vx=Iu();function Wx(e=Vx){return og(e)}function Gx({props:e,name:t,defaultTheme:n,themeId:r}){let i=Wx(n);return i=i[r]||i,qx({theme:i,name:t,props:e})}function Yx({props:e,name:t}){return Gx({props:e,name:t,defaultTheme:ku,themeId:_u})}function Wo(){return Wo=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},Wo.apply(null,arguments)}function wf(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 Go(e,t){return Go=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Go(e,t)}function Nf(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Go(e,t)}const Ac={disabled:!1},Gs=P.createContext(null);var Kx=function(t){return t.scrollTop},hi="unmounted",Vn="exited",Wn="entering",yr="entered",Yo="exiting",_n=function(e){Nf(t,e);function t(r,i){var s;s=e.call(this,r,i)||this;var a=i,o=a&&!a.isMounting?r.enter:r.appear,u;return s.appearStatus=null,r.in?o?(u=Vn,s.appearStatus=Wn):u=yr:r.unmountOnExit||r.mountOnEnter?u=hi:u=Vn,s.state={status:u},s.nextCallback=null,s}t.getDerivedStateFromProps=function(i,s){var a=i.in;return a&&s.status===hi?{status:Vn}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var s=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Wn&&a!==yr&&(s=Wn):(a===Wn||a===yr)&&(s=Yo)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,s,a,o;return s=a=o=i,i!=null&&typeof i!="number"&&(s=i.exit,a=i.enter,o=i.appear!==void 0?i.appear:a),{exit:s,enter:a,appear:o}},n.updateStatus=function(i,s){if(i===void 0&&(i=!1),s!==null)if(this.cancelNextCallback(),s===Wn){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:ns.findDOMNode(this);a&&Kx(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Vn&&this.setState({status:hi})},n.performEnter=function(i){var s=this,a=this.props.enter,o=this.context?this.context.isMounting:i,u=this.props.nodeRef?[o]:[ns.findDOMNode(this),o],l=u[0],d=u[1],c=this.getTimeouts(),m=o?c.appear:c.enter;if(!i&&!a||Ac.disabled){this.safeSetState({status:yr},function(){s.props.onEntered(l)});return}this.props.onEnter(l,d),this.safeSetState({status:Wn},function(){s.props.onEntering(l,d),s.onTransitionEnd(m,function(){s.safeSetState({status:yr},function(){s.props.onEntered(l,d)})})})},n.performExit=function(){var i=this,s=this.props.exit,a=this.getTimeouts(),o=this.props.nodeRef?void 0:ns.findDOMNode(this);if(!s||Ac.disabled){this.safeSetState({status:Vn},function(){i.props.onExited(o)});return}this.props.onExit(o),this.safeSetState({status:Yo},function(){i.props.onExiting(o),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Vn},function(){i.props.onExited(o)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,s){s=this.setNextCallback(s),this.setState(i,s)},n.setNextCallback=function(i){var s=this,a=!0;return this.nextCallback=function(o){a&&(a=!1,s.nextCallback=null,i(o))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,s){this.setNextCallback(s);var a=this.props.nodeRef?this.props.nodeRef.current:ns.findDOMNode(this),o=i==null&&!this.props.addEndListener;if(!a||o){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],l=u[0],d=u[1];this.props.addEndListener(l,d)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===hi)return null;var s=this.props,a=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var o=wf(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return P.createElement(Gs.Provider,{value:null},typeof a=="function"?a(i,o):P.cloneElement(P.Children.only(a),o))},t}(P.Component);_n.contextType=Gs;_n.propTypes={};function mr(){}_n.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:mr,onEntering:mr,onEntered:mr,onExit:mr,onExiting:mr,onExited:mr};_n.UNMOUNTED=hi;_n.EXITED=Vn;_n.ENTERING=Wn;_n.ENTERED=yr;_n.EXITING=Yo;function Qx(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ju(e,t){var n=function(s){return t&&P.isValidElement(s)?t(s):s},r=Object.create(null);return e&&P.Children.map(e,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function Xx(e,t){e=e||{},t=t||{};function n(d){return d in t?t[d]:e[d]}var r=Object.create(null),i=[];for(var s in e)s in t?i.length&&(r[s]=i,i=[]):i.push(s);var a,o={};for(var u in t){if(r[u])for(a=0;a<r[u].length;a++){var l=r[u][a];o[r[u][a]]=n(l)}o[u]=n(u)}for(a=0;a<i.length;a++)o[i[a]]=n(i[a]);return o}function Kn(e,t,n){return n[t]!=null?n[t]:e.props[t]}function Zx(e,t){return ju(e.children,function(n){return P.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:Kn(n,"appear",e),enter:Kn(n,"enter",e),exit:Kn(n,"exit",e)})})}function Jx(e,t,n){var r=ju(e.children),i=Xx(t,r);return Object.keys(i).forEach(function(s){var a=i[s];if(P.isValidElement(a)){var o=s in t,u=s in r,l=t[s],d=P.isValidElement(l)&&!l.props.in;u&&(!o||d)?i[s]=P.cloneElement(a,{onExited:n.bind(null,a),in:!0,exit:Kn(a,"exit",e),enter:Kn(a,"enter",e)}):!u&&o&&!d?i[s]=P.cloneElement(a,{in:!1}):u&&o&&P.isValidElement(l)&&(i[s]=P.cloneElement(a,{onExited:n.bind(null,a),in:l.props.in,exit:Kn(a,"exit",e),enter:Kn(a,"enter",e)}))}}),i}var ey=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},ty={component:"div",childFactory:function(t){return t}},Hu=function(e){Nf(t,e);function t(r,i){var s;s=e.call(this,r,i)||this;var a=s.handleExited.bind(Qx(s));return s.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},s}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(i,s){var a=s.children,o=s.handleExited,u=s.firstRender;return{children:u?Zx(i,o):Jx(i,a,o),firstRender:!1}},n.handleExited=function(i,s){var a=ju(this.props.children);i.key in a||(i.props.onExited&&i.props.onExited(s),this.mounted&&this.setState(function(o){var u=Wo({},o.children);return delete u[i.key],{children:u}}))},n.render=function(){var i=this.props,s=i.component,a=i.childFactory,o=wf(i,["component","childFactory"]),u=this.state.contextValue,l=ey(this.state.children).map(a);return delete o.appear,delete o.enter,delete o.exit,s===null?P.createElement(Gs.Provider,{value:u},l):P.createElement(Gs.Provider,{value:u},P.createElement(s,o,l))},t}(P.Component);Hu.propTypes={};Hu.defaultProps=ty;const Ic={};function Pf(e,t){const n=$.useRef(Ic);return n.current===Ic&&(n.current=e(t)),n}const ny=[];function ry(e){$.useEffect(e,ny)}class Uu{static create(){return new Uu}currentId=null;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function Rf(){const e=Pf(Uu.create).current;return ry(e.disposeEffect),e}function kc(e,t){const{timeout:n,easing:r,style:i={}}=e;return{duration:i.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:i.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:i.transitionDelay}}function iy(e){return Fr("MuiCollapse",e)}Br("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const sy=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return Hi(r,iy,n)},ay=Be("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]}})(Du(({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"}}]}))),oy=Be("div",{name:"MuiCollapse",slot:"Wrapper"})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),uy=Be("div",{name:"MuiCollapse",slot:"WrapperInner"})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),Li=$.forwardRef(function(t,n){const r=Mr({props:t,name:"MuiCollapse"}),{addEndListener:i,children:s,className:a,collapsedSize:o="0px",component:u,easing:l,in:d,onEnter:c,onEntered:m,onEntering:p,onExit:g,onExited:b,onExiting:T,orientation:x="vertical",style:C,timeout:S=yh.standard,TransitionComponent:w=_n,...D}=r,N={...r,orientation:x,collapsedSize:o},B=sy(N),Z=Gg(),J=Rf(),E=$.useRef(null),L=$.useRef(),O=typeof o=="number"?`${o}px`:o,z=x==="horizontal",M=z?"width":"height",K=$.useRef(null),se=Os(n,K),fe=q=>ie=>{if(q){const te=K.current;ie===void 0?q(te):q(te,ie)}},pe=()=>E.current?E.current[z?"clientWidth":"clientHeight"]:0,W=fe((q,ie)=>{E.current&&z&&(E.current.style.position="absolute"),q.style[M]=O,c&&c(q,ie)}),k=fe((q,ie)=>{const te=pe();E.current&&z&&(E.current.style.position="");const{duration:we,easing:ne}=kc({style:C,timeout:S,easing:l},{mode:"enter"});if(S==="auto"){const U=Z.transitions.getAutoHeightDuration(te);q.style.transitionDuration=`${U}ms`,L.current=U}else q.style.transitionDuration=typeof we=="string"?we:`${we}ms`;q.style[M]=`${te}px`,q.style.transitionTimingFunction=ne,p&&p(q,ie)}),ae=fe((q,ie)=>{q.style[M]="auto",m&&m(q,ie)}),de=fe(q=>{q.style[M]=`${pe()}px`,g&&g(q)}),_=fe(b),Ee=fe(q=>{const ie=pe(),{duration:te,easing:we}=kc({style:C,timeout:S,easing:l},{mode:"exit"});if(S==="auto"){const ne=Z.transitions.getAutoHeightDuration(ie);q.style.transitionDuration=`${ne}ms`,L.current=ne}else q.style.transitionDuration=typeof te=="string"?te:`${te}ms`;q.style[M]=O,q.style.transitionTimingFunction=we,T&&T(q)}),me=q=>{S==="auto"&&J.start(L.current||0,q),i&&i(K.current,q)};return h.jsx(w,{in:d,onEnter:W,onEntered:ae,onEntering:k,onExit:de,onExited:_,onExiting:Ee,addEndListener:me,nodeRef:K,timeout:S==="auto"?null:S,...D,children:(q,{ownerState:ie,...te})=>h.jsx(ay,{as:u,className:Ye(B.root,a,{entered:B.entered,exited:!d&&O==="0px"&&B.hidden}[q]),style:{[z?"minWidth":"minHeight"]:O,...C},ref:se,ownerState:{...N,state:q},...te,children:h.jsx(oy,{ownerState:{...N,state:q},className:B.wrapper,ref:E,children:h.jsx(uy,{ownerState:{...N,state:q},className:B.wrapperInner,children:s})})})})});Li&&(Li.muiSupportAuto=!0);const ly=$.createContext(void 0);function cy(){return $.useContext(ly)}function _c(e){try{return e.matches(":focus-visible")}catch{}return!1}class Ys{static create(){return new Ys}static use(){const t=Pf(Ys.create).current,[n,r]=$.useState(!1);return t.shouldMount=n,t.setShouldMount=r,$.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=hy(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};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 dy(){return Ys.use()}function hy(){let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n}function fy(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:s,rippleSize:a,in:o,onExited:u,timeout:l}=e,[d,c]=$.useState(!1),m=Ye(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:a,height:a,top:-(a/2)+s,left:-(a/2)+i},g=Ye(n.child,d&&n.childLeaving,r&&n.childPulsate);return!o&&!d&&c(!0),$.useEffect(()=>{if(!o&&u!=null){const b=setTimeout(u,l);return()=>{clearTimeout(b)}}},[u,o,l]),h.jsx("span",{className:m,style:p,children:h.jsx("span",{className:g})})}const Wt=Br("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Ko=550,py=80,my=We.keyframes`
|
|
53
36
|
0% {
|
|
54
37
|
transform: scale(0);
|
|
55
38
|
opacity: 0.1;
|
|
@@ -59,7 +42,7 @@ import {${t.sourceName}}" from '${t.modelPath}'"
|
|
|
59
42
|
transform: scale(1);
|
|
60
43
|
opacity: 0.3;
|
|
61
44
|
}
|
|
62
|
-
`,
|
|
45
|
+
`,gy=We.keyframes`
|
|
63
46
|
0% {
|
|
64
47
|
opacity: 1;
|
|
65
48
|
}
|
|
@@ -67,7 +50,7 @@ import {${t.sourceName}}" from '${t.modelPath}'"
|
|
|
67
50
|
100% {
|
|
68
51
|
opacity: 0;
|
|
69
52
|
}
|
|
70
|
-
`,
|
|
53
|
+
`,by=We.keyframes`
|
|
71
54
|
0% {
|
|
72
55
|
transform: scale(1);
|
|
73
56
|
}
|
|
@@ -79,23 +62,23 @@ import {${t.sourceName}}" from '${t.modelPath}'"
|
|
|
79
62
|
100% {
|
|
80
63
|
transform: scale(1);
|
|
81
64
|
}
|
|
82
|
-
`,
|
|
65
|
+
`,Ey=Be("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),xy=Be(fy,{name:"MuiTouchRipple",slot:"Ripple"})`
|
|
83
66
|
opacity: 0;
|
|
84
67
|
position: absolute;
|
|
85
68
|
|
|
86
|
-
&.${
|
|
69
|
+
&.${Wt.rippleVisible} {
|
|
87
70
|
opacity: 0.3;
|
|
88
71
|
transform: scale(1);
|
|
89
|
-
animation-name: ${
|
|
90
|
-
animation-duration: ${
|
|
72
|
+
animation-name: ${my};
|
|
73
|
+
animation-duration: ${Ko}ms;
|
|
91
74
|
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
92
75
|
}
|
|
93
76
|
|
|
94
|
-
&.${
|
|
77
|
+
&.${Wt.ripplePulsate} {
|
|
95
78
|
animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms;
|
|
96
79
|
}
|
|
97
80
|
|
|
98
|
-
& .${
|
|
81
|
+
& .${Wt.child} {
|
|
99
82
|
opacity: 1;
|
|
100
83
|
display: block;
|
|
101
84
|
width: 100%;
|
|
@@ -104,27 +87,107 @@ import {${t.sourceName}}" from '${t.modelPath}'"
|
|
|
104
87
|
background-color: currentColor;
|
|
105
88
|
}
|
|
106
89
|
|
|
107
|
-
& .${
|
|
90
|
+
& .${Wt.childLeaving} {
|
|
108
91
|
opacity: 0;
|
|
109
|
-
animation-name: ${
|
|
110
|
-
animation-duration: ${
|
|
92
|
+
animation-name: ${gy};
|
|
93
|
+
animation-duration: ${Ko}ms;
|
|
111
94
|
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
112
95
|
}
|
|
113
96
|
|
|
114
|
-
& .${
|
|
97
|
+
& .${Wt.childPulsate} {
|
|
115
98
|
position: absolute;
|
|
116
99
|
/* @noflip */
|
|
117
100
|
left: 0px;
|
|
118
101
|
top: 0;
|
|
119
|
-
animation-name: ${
|
|
102
|
+
animation-name: ${by};
|
|
120
103
|
animation-duration: 2500ms;
|
|
121
104
|
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
122
105
|
animation-iteration-count: infinite;
|
|
123
106
|
animation-delay: 200ms;
|
|
124
107
|
}
|
|
125
|
-
`,xf=P.forwardRef(function(t,n){const r=Wt({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:s={},className:i,...a}=r,[l,u]=P.useState([]),d=P.useRef(0),p=P.useRef(null);P.useEffect(()=>{p.current&&(p.current(),p.current=null)},[l]);const f=P.useRef(!1),m=Pa(),g=P.useRef(null),b=P.useRef(null),x=P.useCallback(k=>{const{pulsate:w,rippleX:E,rippleY:O,rippleSize:B,cb:q}=k;u(y=>[...y,c.jsx(bf,{classes:{ripple:fe(s.ripple,He.ripple),rippleVisible:fe(s.rippleVisible,He.rippleVisible),ripplePulsate:fe(s.ripplePulsate,He.ripplePulsate),child:fe(s.child,He.child),childLeaving:fe(s.childLeaving,He.childLeaving),childPulsate:fe(s.childPulsate,He.childPulsate)},timeout:co,pulsate:w,rippleX:E,rippleY:O,rippleSize:B},d.current)]),d.current+=1,p.current=q},[s]),v=P.useCallback((k={},w={},E=()=>{})=>{const{pulsate:O=!1,center:B=o||w.pulsate,fakeElement:q=!1}=w;if(k?.type==="mousedown"&&f.current){f.current=!1;return}k?.type==="touchstart"&&(f.current=!0);const y=q?null:b.current,R=y?y.getBoundingClientRect():{width:0,height:0,left:0,top:0};let A,L,$;if(B||k===void 0||k.clientX===0&&k.clientY===0||!k.clientX&&!k.touches)A=Math.round(R.width/2),L=Math.round(R.height/2);else{const{clientX:W,clientY:G}=k.touches&&k.touches.length>0?k.touches[0]:k;A=Math.round(W-R.left),L=Math.round(G-R.top)}if(B)$=Math.sqrt((2*R.width**2+R.height**2)/3),$%2===0&&($+=1);else{const W=Math.max(Math.abs((y?y.clientWidth:0)-A),A)*2+2,G=Math.max(Math.abs((y?y.clientHeight:0)-L),L)*2+2;$=Math.sqrt(W**2+G**2)}k?.touches?g.current===null&&(g.current=()=>{x({pulsate:O,rippleX:A,rippleY:L,rippleSize:$,cb:E})},m.start(hf,()=>{g.current&&(g.current(),g.current=null)})):x({pulsate:O,rippleX:A,rippleY:L,rippleSize:$,cb:E})},[o,x,m]),S=P.useCallback(()=>{v({},{pulsate:!0})},[v]),C=P.useCallback((k,w)=>{if(m.clear(),k?.type==="touchend"&&g.current){g.current(),g.current=null,m.start(0,()=>{C(k,w)});return}g.current=null,u(E=>E.length>0?E.slice(1):E),p.current=w},[m]);return P.useImperativeHandle(n,()=>({pulsate:S,start:v,stop:C}),[S,v,C]),c.jsx(yf,{className:fe(He.root,s.root,i),ref:b,...a,children:c.jsx(Vo,{component:null,exit:!0,children:l})})});function vf(e){return Gt("MuiButtonBase",e)}const Sf=Kt("MuiButtonBase",["root","disabled","focusVisible"]),Cf=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=yn({root:["root",t&&"disabled",n&&"focusVisible"]},vf,o);return n&&r&&(i.root+=` ${r}`),i},wf=ae("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"},[`&.${Sf.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),kf=P.forwardRef(function(t,n){const r=Wt({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:s=!1,children:i,className:a,component:l="button",disabled:u=!1,disableRipple:d=!1,disableTouchRipple:p=!1,focusRipple:f=!1,focusVisibleClassName:m,LinkComponent:g="a",onBlur:b,onClick:x,onContextMenu:v,onDragLeave:S,onFocus:C,onFocusVisible:k,onKeyDown:w,onKeyUp:E,onMouseDown:O,onMouseLeave:B,onMouseUp:q,onTouchEnd:y,onTouchMove:R,onTouchStart:A,tabIndex:L=0,TouchRippleProps:$,touchRippleRef:W,type:G,...se}=r,ie=P.useRef(null),H=uf(),Q=Gn(H.ref,W),[F,K]=P.useState(!1);u&&F&&K(!1),P.useImperativeHandle(o,()=>({focusVisible:()=>{K(!0),ie.current.focus()}}),[]);const X=H.shouldMount&&!d&&!u;P.useEffect(()=>{F&&f&&!d&&H.pulsate()},[d,f,F,H]);const he=nt(H,"start",O,p),J=nt(H,"stop",v,p),D=nt(H,"stop",S,p),je=nt(H,"stop",q,p),we=nt(H,"stop",V=>{F&&V.preventDefault(),B&&B(V)},p),Ve=nt(H,"start",A,p),M=nt(H,"stop",y,p),_=nt(H,"stop",R,p),ne=nt(H,"stop",V=>{Qs(V.target)||K(!1),b&&b(V)},!1),dt=Dn(V=>{ie.current||(ie.current=V.currentTarget),Qs(V.target)&&(K(!0),k&&k(V)),C&&C(V)}),Je=()=>{const V=ie.current;return l&&l!=="button"&&!(V.tagName==="A"&&V.href)},wr=Dn(V=>{f&&!V.repeat&&F&&V.key===" "&&H.stop(V,()=>{H.start(V)}),V.target===V.currentTarget&&Je()&&V.key===" "&&V.preventDefault(),w&&w(V),V.target===V.currentTarget&&Je()&&V.key==="Enter"&&!u&&(V.preventDefault(),x&&x(V))}),kr=Dn(V=>{f&&V.key===" "&&F&&!V.defaultPrevented&&H.stop(V,()=>{H.pulsate(V)}),E&&E(V),x&&V.target===V.currentTarget&&Je()&&V.key===" "&&!V.defaultPrevented&&x(V)});let jt=l;jt==="button"&&(se.href||se.to)&&(jt=g);const Ze={};jt==="button"?(Ze.type=G===void 0?"button":G,Ze.disabled=u):(!se.href&&!se.to&&(Ze.role="button"),u&&(Ze["aria-disabled"]=u));const Ir=Gn(n,ie),In={...r,centerRipple:s,component:l,disabled:u,disableRipple:d,disableTouchRipple:p,focusRipple:f,tabIndex:L,focusVisible:F},Pr=Cf(In);return c.jsxs(wf,{as:jt,className:fe(Pr.root,a),ownerState:In,onBlur:ne,onClick:x,onContextMenu:J,onFocus:dt,onKeyDown:wr,onKeyUp:kr,onMouseDown:he,onMouseLeave:we,onMouseUp:je,onDragLeave:D,onTouchEnd:M,onTouchMove:_,onTouchStart:Ve,ref:Ir,tabIndex:u?-1:L,type:G,...Ze,...se,children:[i,X?c.jsx(xf,{ref:Q,center:s,...$}):null]})});function nt(e,t,n,r=!1){return Dn(o=>(n&&n(o),r||e[t](o),!0))}function If(e){return Gt("PrivateSwitchBase",e)}Kt("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);function Pf(e){return typeof e=="string"}function Tf(e,t,n){return e===void 0||Pf(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function jf(e,t,n){return typeof e=="function"?e(t,n):e}function Ef(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 Ys(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 Rf(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:s}=e;if(!t){const m=fe(n?.className,s,o?.className,r?.className),g={...n?.style,...o?.style,...r?.style},b={...n,...o,...r};return m.length>0&&(b.className=m),Object.keys(g).length>0&&(b.style=g),{props:b,internalRef:void 0}}const i=Ef({...o,...r}),a=Ys(r),l=Ys(o),u=t(i),d=fe(u?.className,n?.className,s,o?.className,r?.className),p={...u?.style,...n?.style,...o?.style,...r?.style},f={...u,...n,...l,...a};return d.length>0&&(f.className=d),Object.keys(p).length>0&&(f.style=p),{props:f,internalRef:u.ref}}function uo(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:s,internalForwardedProps:i,shouldForwardComponentProp:a=!1,...l}=t,{component:u,slots:d={[e]:void 0},slotProps:p={[e]:void 0},...f}=s,m=d[e]||r,g=jf(p[e],o),{props:{component:b,...x},internalRef:v}=Rf({className:n,...l,externalForwardedProps:e==="root"?f:void 0,externalSlotProps:g}),S=Gn(v,g?.ref,t.ref),C=e==="root"?b||u:b,k=Tf(m,{...e==="root"&&!u&&!d[e]&&i,...e!=="root"&&!d[e]&&i,...x,...C&&!a&&{as:C},...C&&a&&{component:C},ref:S},o);return[m,k]}const _f=e=>{const{classes:t,checked:n,disabled:r,edge:o}=e,s={root:["root",n&&"checked",r&&"disabled",o&&`edge${Ke(o)}`],input:["input"]};return yn(s,If,t)},Af=ae(kf)({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}}]}),Of=ae("input",{shouldForwardProp:Io})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Nf=P.forwardRef(function(t,n){const{autoFocus:r,checked:o,checkedIcon:s,defaultChecked:i,disabled:a,disableFocusRipple:l=!1,edge:u=!1,icon:d,id:p,inputProps:f,inputRef:m,name:g,onBlur:b,onChange:x,onFocus:v,readOnly:S,required:C=!1,tabIndex:k,type:w,value:E,slots:O={},slotProps:B={},...q}=t,[y,R]=Vu({controlled:o,default:!!i}),A=cf(),L=J=>{v&&v(J),A&&A.onFocus&&A.onFocus(J)},$=J=>{b&&b(J),A&&A.onBlur&&A.onBlur(J)},W=J=>{if(J.nativeEvent.defaultPrevented)return;const D=J.target.checked;R(D),x&&x(J,D)};let G=a;A&&typeof G>"u"&&(G=A.disabled);const se=w==="checkbox"||w==="radio",ie={...t,checked:y,disabled:G,disableFocusRipple:l,edge:u},H=_f(ie),Q={slots:O,slotProps:{input:f,...B}},[F,K]=uo("root",{ref:n,elementType:Af,className:H.root,shouldForwardComponentProp:!0,externalForwardedProps:{...Q,component:"span",...q},getSlotProps:J=>({...J,onFocus:D=>{J.onFocus?.(D),L(D)},onBlur:D=>{J.onBlur?.(D),$(D)}}),ownerState:ie,additionalProps:{centerRipple:!0,focusRipple:!l,disabled:G,role:void 0,tabIndex:null}}),[X,he]=uo("input",{ref:m,elementType:Of,className:H.input,externalForwardedProps:Q,getSlotProps:J=>({...J,onChange:D=>{J.onChange?.(D),W(D)}}),ownerState:ie,additionalProps:{autoFocus:r,checked:o,defaultChecked:i,disabled:G,id:se?p:void 0,name:g,readOnly:S,required:C,tabIndex:k,type:w,...w==="checkbox"&&E===void 0?{}:{value:E}}});return c.jsxs(F,{...K,children:[c.jsx(X,{...he}),y?s:d]})}),Mf=oe(c.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"})),Lf=oe(c.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"})),Df=oe(c.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 $f(e){return Gt("MuiCheckbox",e)}const zr=Kt("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]);function Bf(e){return typeof e.main=="string"}function qf(e,t=[]){if(!Bf(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function Xs(e=[]){return([,t])=>t&&qf(t,e)}const Vf=e=>{const{classes:t,indeterminate:n,color:r,size:o}=e,s={root:["root",n&&"indeterminate",`color${Ke(r)}`,`size${Ke(o)}`]},i=yn(s,$f,t);return{...t,...i}},Ff=ae(Nf,{shouldForwardProp:e=>Io(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${Ke(n.size)}`],n.color!=="default"&&t[`color${Ke(n.color)}`]]}})(Po(({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})`:Gr(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(Xs()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Gr(e.palette[t].main,e.palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(Xs()).map(([t])=>({props:{color:t},style:{[`&.${zr.checked}, &.${zr.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${zr.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),zf=c.jsx(Lf,{}),Hf=c.jsx(Mf,{}),Uf=c.jsx(Df,{}),Ta=P.forwardRef(function(t,n){const r=Wt({props:t,name:"MuiCheckbox"}),{checkedIcon:o=zf,color:s="primary",icon:i=Hf,indeterminate:a=!1,indeterminateIcon:l=Uf,inputProps:u,size:d="medium",disableRipple:p=!1,className:f,slots:m={},slotProps:g={},...b}=r,x=a?l:i,v=a?l:o,S={...r,disableRipple:p,color:s,indeterminate:a,size:d},C=Vf(S),k=g.input??u,[w,E]=uo("root",{ref:n,elementType:Ff,className:fe(C.root,f),shouldForwardComponentProp:!0,externalForwardedProps:{slots:m,slotProps:g,...b},ownerState:S,additionalProps:{type:"checkbox",icon:P.cloneElement(x,{fontSize:x.props.fontSize??d}),checkedIcon:P.cloneElement(v,{fontSize:v.props.fontSize??d}),disableRipple:p,slots:m,slotProps:{input:zu(typeof k=="function"?k(S):k,{"data-indeterminate":a})}}});return c.jsx(w,{...E,classes:C})});function Ut(...e){const t=P.useRef(void 0),n=P.useCallback(r=>{const o=e.map(s=>{if(s==null)return null;if(typeof s=="function"){const i=s,a=i(r);return typeof a=="function"?a:()=>{i(null)}}return s.current=r,()=>{s.current=null}});return()=>{o.forEach(s=>s?.())}},e);return P.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function Gf(e){return typeof e=="string"}function Wf(e,t,n){return e===void 0||Gf(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function ze(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 Js(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 Kf(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:s}=e;if(!t){const m=fe(n?.className,s,o?.className,r?.className),g={...n?.style,...o?.style,...r?.style},b={...n,...o,...r};return m.length>0&&(b.className=m),Object.keys(g).length>0&&(b.style=g),{props:b,internalRef:void 0}}const i=ze({...o,...r}),a=Js(r),l=Js(o),u=t(i),d=fe(u?.className,n?.className,s,o?.className,r?.className),p={...u?.style,...n?.style,...o?.style,...r?.style},f={...u,...n,...l,...a};return d.length>0&&(f.className=d),Object.keys(p).length>0&&(f.style=p),{props:f,internalRef:u.ref}}function ot(e,t,n){return typeof e=="function"?e(t,n):e}function Ct(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...s}=e,i=o?{}:ot(n,r),{props:a,internalRef:l}=Kf({...s,externalSlotProps:i}),u=Ut(l,i?.ref,e.additionalProps?.ref);return Wf(t,{...a,ref:u},r)}function ja(e,t,n=void 0){const r={};for(const o in e){const s=e[o];let i="",a=!0;for(let l=0;l<s.length;l+=1){const u=s[l];u&&(i+=(a===!0?"":" ")+t(u),a=!1,n&&n[u]&&(i+=" "+n[u]))}r[o]=i}return r}function Ea(e){return Pm}const Ra=P.createContext(null);function Qf(e){const{value:t,children:n}=e;return c.jsx(Ra.Provider,{value:t,children:t.wrapRoot({children:n,instance:t.instance})})}const Tt=()=>{const e=P.useContext(Ra);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(`
|
|
126
|
-
`));return e},
|
|
127
|
-
`));n(m=>{const g=m.items.itemMetaMap[p];return g.label!==f?N({},m,{items:N({},m.items,{itemMetaMap:N({},m.items.itemMetaMap,{[p]:N({},g,{label:f})})})}):m}),r.onItemLabelChange&&r.onItemLabelChange(p,f)};return{instance:{setEditedItemId:i,isItemBeingEdited:a,updateItemLabel:d,isItemEditable:u,isTreeViewEditable:l,isItemBeingEditedRef:s},publicAPI:{updateItemLabel:d}}};Ge.itemPlugin=Yf;Ge.getDefaultizedParams=({params:e,experimentalFeatures:t})=>{const n=t?.labelEditing;return N({},e,{isItemEditable:n?e.isItemEditable??!1:!1})};Ge.getInitialState=()=>({editedItemId:null});Ge.params={onItemLabelChange:!0,isItemEditable:!0};const wt=(e,t)=>e.getAvailablePlugins().has(t),_a=e=>Array.isArray(e)?e.length>0&&e.some(_a):!!e,Xf=({itemId:e,children:t})=>{const{instance:n,selection:{multiSelect:r},publicAPI:o}=Tt(),s={expandable:_a(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},i=m=>{if(s.disabled)return;s.focused||n.focusItem(m,e);const g=r&&(m.shiftKey||m.ctrlKey||m.metaKey);s.expandable&&!(g&&n.isItemExpanded(e))&&n.toggleItemExpansion(m,e)},a=m=>{if(s.disabled)return;s.focused||n.focusItem(m,e),r&&(m.shiftKey||m.ctrlKey||m.metaKey)?m.shiftKey?n.expandSelectionRange(m,e):n.selectItem({event:m,itemId:e,keepExistingSelection:!0}):n.selectItem({event:m,itemId:e,shouldBeSelected:!0})},l=m=>{const g=m.nativeEvent.shiftKey;r&&g?n.expandSelectionRange(m,e):n.selectItem({event:m,itemId:e,keepExistingSelection:r,shouldBeSelected:m.target.checked})},u=()=>{wt(n,Ge)&&n.isItemEditable(e)&&(n.isItemBeingEdited(e)?n.setEditedItemId(null):n.setEditedItemId(e))};return{interactions:{handleExpansion:i,handleSelection:a,handleCheckboxSelection:l,toggleItemEditing:u,handleSaveItemLabel:(m,g)=>{wt(n,Ge)&&n.isItemBeingEditedRef(e)&&(n.updateItemLabel(e,g),u(),n.focusItem(m,e))},handleCancelItemLabelEditing:m=>{wt(n,Ge)&&n.isItemBeingEditedRef(e)&&(u(),n.focusItem(m,e))}},status:s,publicAPI:o}},zo=P.createContext(()=>-1),Aa=(e,t)=>{let n=t.length-1;for(;n>=0&&!e.isItemNavigable(t[n]);)n-=1;if(n!==-1)return t[n]},Oa=(e,t)=>{const n=e.getItemMeta(t),r=e.getItemOrderedChildrenIds(n.parentId),o=e.getItemIndex(t);if(o===0)return n.parentId;let s=o-1;for(;!e.isItemNavigable(r[s])&&s>=0;)s-=1;if(s===-1)return n.parentId==null?null:Oa(e,n.parentId);let i=r[s],a=Aa(e,e.getItemOrderedChildrenIds(i));for(;e.isItemExpanded(i)&&a!=null;)i=a,a=e.getItemOrderedChildrenIds(i).find(e.isItemNavigable);return i},qn=(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 s=o+1;for(;!e.isItemNavigable(r[s])&&s<r.length-1;)s+=1;if(e.isItemNavigable(r[s]))return r[s]}n=e.getItemMeta(n.parentId)}return null},Na=e=>{let t=null;for(;t==null||e.isItemExpanded(t);){const n=e.getItemOrderedChildrenIds(t),r=Aa(e,n);if(r==null)return t;t=r}return t},fn=e=>e.getItemOrderedChildrenIds(null).find(e.isItemNavigable),Ma=(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 s=[r.id],i=[o.id];let a=r.parentId,l=o.parentId,u=i.indexOf(a)!==-1,d=s.indexOf(l)!==-1,p=!0,f=!0;for(;!d&&!u;)p&&(s.push(a),u=i.indexOf(a)!==-1,p=a!==null,!u&&p&&(a=e.getItemMeta(a).parentId)),f&&!u&&(i.push(l),d=s.indexOf(l)!==-1,f=l!==null,!d&&f&&(l=e.getItemMeta(l).parentId));const m=u?a:l,g=e.getItemOrderedChildrenIds(m),b=s[s.indexOf(m)-1],x=i[i.indexOf(m)-1];return g.indexOf(b)<g.indexOf(x)?[t,n]:[n,t]},Jf=(e,t,n)=>{const r=l=>{if(e.isItemExpandable(l)&&e.isItemExpanded(l))return e.getItemOrderedChildrenIds(l)[0];let u=e.getItemMeta(l);for(;u!=null;){const d=e.getItemOrderedChildrenIds(u.parentId),p=e.getItemIndex(u.id);if(p<d.length-1)return d[p+1];u=e.getItemMeta(u.parentId)}throw new Error("Invalid range")},[o,s]=Ma(e,t,n),i=[o];let a=o;for(;a!==s;)a=r(a),e.isItemDisabled(a)||i.push(a);return i},Zf=e=>{let t=fn(e);const n=[];for(;t!=null;)n.push(t),t=qn(e,t);return n},gn=(e,t)=>t!==e.closest('*[role="treeitem"]');let Zs=0;const eg=()=>(Zs+=1,`mui-tree-view-${Zs}`),Ho=({id:e,treeId:t="",itemId:n})=>e??`${t}-${n}`,tg=e=>{const{runItemPlugins:t,items:{onItemClick:n,disabledItemsFocusable:r,indentationAtItemLevel:o},selection:{disableSelection:s,checkboxSelection:i},expansion:{expansionTrigger:a},treeId:l,instance:u,publicAPI:d}=Tt(),p=P.useContext(zo),{id:f,itemId:m,label:g,children:b,rootRef:x}=e,{rootRef:v,contentRef:S,propsEnhancers:C}=t(e),{interactions:k,status:w}=Xf({itemId:m,children:b}),E=P.useRef(null),O=P.useRef(null),B=Ut(x,v,E),q=Ut(S,O),y=P.useRef(null),R=Ho({itemId:m,treeId:l,id:f}),A=u.canItemBeTabbed(m)?0:-1,L={rootRefObject:E,contentRefObject:O,interactions:k},$=M=>_=>{if(M.onFocus?.(_),_.defaultMuiPrevented)return;const ne=!w.disabled||r;!w.focused&&ne&&_.currentTarget===_.target&&u.focusItem(_,m)},W=M=>_=>{if(M.onBlur?.(_),_.defaultMuiPrevented)return;const ne=u.getItemDOMElement(m);w.editing||_.relatedTarget&&gn(_.relatedTarget,ne)&&(_.target&&_.target?.dataset?.element==="labelInput"&&gn(_.target,ne)||_.relatedTarget?.dataset?.element==="labelInput")||u.removeFocusedItem()},G=M=>_=>{M.onKeyDown?.(_),!(_.defaultMuiPrevented||_.target?.dataset?.element==="labelInput")&&u.handleItemKeyDown(_,m)},se=M=>_=>{M.onDoubleClick?.(_),!_.defaultMuiPrevented&&k.toggleItemEditing()},ie=M=>_=>{M.onClick?.(_),n?.(_,m),!(_.defaultMuiPrevented||y.current?.contains(_.target))&&(a==="content"&&k.handleExpansion(_),i||k.handleSelection(_))},H=M=>_=>{M.onMouseDown?.(_),!_.defaultMuiPrevented&&(_.shiftKey||_.ctrlKey||_.metaKey||w.disabled)&&_.preventDefault()},Q=M=>_=>{M.onChange?.(_),!_.defaultMuiPrevented&&(s||w.disabled||k.handleCheckboxSelection(_))},F=M=>_=>{M.onClick?.(_),!_.defaultMuiPrevented&&a==="iconContainer"&&k.handleExpansion(_)};return{getRootProps:(M={})=>{const _=N({},ze(e),ze(M));let ne;w.selected?ne=!0:s||w.disabled?ne=void 0:ne=!1;const dt=N({},_,{ref:B,role:"treeitem",tabIndex:A,id:R,"aria-expanded":w.expandable?w.expanded:void 0,"aria-selected":ne,"aria-disabled":w.disabled||void 0},M,{onFocus:$(_),onBlur:W(_),onKeyDown:G(_)});o&&(dt.style={"--TreeView-itemDepth":typeof p=="function"?p(m):p});const Je=C.root?.(N({},L,{externalEventHandlers:_}))??{};return N({},dt,Je)},getContentProps:(M={})=>{const _=ze(M),ne=N({},_,M,{ref:q,onClick:ie(_),onMouseDown:H(_),status:w});o&&(ne.indentationAtItemLevel=!0);const dt=C.content?.(N({},L,{externalEventHandlers:_}))??{};return N({},ne,dt)},getGroupTransitionProps:(M={})=>{const _=ze(M),ne=N({},_,{unmountOnExit:!0,component:"ul",role:"group",in:w.expanded,children:b},M);return o&&(ne.indentationAtItemLevel=!0),ne},getIconContainerProps:(M={})=>{const _=ze(M);return N({},_,M,{onClick:F(_)})},getCheckboxProps:(M={})=>{const _=ze(M);return N({},_,{visible:i,ref:y,checked:w.selected,disabled:s||w.disabled,tabIndex:-1},M,{onChange:Q(_)})},getLabelProps:(M={})=>{const _=N({},ze(M)),ne=N({},_,{children:g},M,{onDoubleClick:se(_)});return u.isTreeViewEditable&&(ne.editable=w.editable),ne},getLabelInputProps:(M={})=>{const _=ze(M),ne=C.labelInput?.({rootRefObject:E,contentRefObject:O,externalEventHandlers:_,interactions:k})??{};return N({},M,ne)},getDragAndDropOverlayProps:(M={})=>{const _=ze(M),ne=C.dragAndDropOverlay?.(N({},L,{externalEventHandlers:_}))??{};return N({},M,ne)},rootRef:B,status:w,publicAPI:d}},ng=tg;function La(e){const{instance:t,items:{onItemClick:n},selection:{multiSelect:r,checkboxSelection:o,disableSelection:s},expansion:{expansionTrigger:i}}=Tt(),a=t.isItemExpandable(e),l=t.isItemExpanded(e),u=t.isItemFocused(e),d=t.isItemSelected(e),p=t.isItemDisabled(e),f=t?.isItemBeingEdited?t?.isItemBeingEdited(e):!1,m=t.isItemEditable?t.isItemEditable(e):!1,g=w=>{if(!p){u||t.focusItem(w,e);const E=r&&(w.shiftKey||w.ctrlKey||w.metaKey);a&&!(E&&t.isItemExpanded(e))&&t.toggleItemExpansion(w,e)}},b=w=>{p||(u||t.focusItem(w,e),r&&(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}))},x=w=>{if(s||p)return;const E=w.nativeEvent.shiftKey;r&&E?t.expandSelectionRange(w,e):t.selectItem({event:w,itemId:e,keepExistingSelection:r,shouldBeSelected:w.target.checked})},v=w=>{(w.shiftKey||w.ctrlKey||w.metaKey||p)&&w.preventDefault()},S=()=>{wt(t,Ge)&&t.isItemEditable(e)&&(t.isItemBeingEdited(e)?t.setEditedItemId(null):t.setEditedItemId(e))};return{disabled:p,expanded:l,selected:d,focused:u,editable:m,editing:f,disableSelection:s,checkboxSelection:o,handleExpansion:g,handleSelection:b,handleCheckboxSelection:x,handleContentClick:n,preventSelection:v,expansionTrigger:i,toggleItemEditing:S,handleSaveItemLabel:(w,E)=>{wt(t,Ge)&&t.isItemBeingEditedRef(e)&&(t.updateItemLabel(e,E),S(),t.focusItem(w,e))},handleCancelItemLabelEditing:w=>{wt(t,Ge)&&t.isItemBeingEditedRef(e)&&(S(),t.focusItem(w,e))}}}const rg=ae("div",{name:"MuiTreeItem2DragAndDropOverlay",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>pe.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})`:pe.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 og(e){return e.action==null?null:c.jsx(rg,N({},e))}const sg=ae("input",{name:"MuiTreeItem2",slot:"LabelInput",overridesResolver:(e,t)=>t.labelInput})(({theme:e})=>N({},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}`}})),ig=["classes","className","displayIcon","expansionIcon","icon","label","itemId","onClick","onMouseDown","dragAndDropOverlayProps","labelInputProps"],Da=P.forwardRef(function(t,n){const{classes:r,className:o,displayIcon:s,expansionIcon:i,icon:a,label:l,itemId:u,onClick:d,onMouseDown:p,dragAndDropOverlayProps:f,labelInputProps:m}=t,g=at(t,ig),{disabled:b,expanded:x,selected:v,focused:S,editing:C,editable:k,disableSelection:w,checkboxSelection:E,handleExpansion:O,handleSelection:B,handleCheckboxSelection:q,handleContentClick:y,preventSelection:R,expansionTrigger:A,toggleItemEditing:L}=La(u),$=a||i||s,W=P.useRef(null),G=H=>{R(H),p&&p(H)},se=H=>{y?.(H,u),!W.current?.contains(H.target)&&(A==="content"&&O(H),E||B(H),d&&d(H))},ie=H=>{H.defaultMuiPrevented||L()};return c.jsxs("div",N({},g,{className:fe(r.root,o,x&&r.expanded,v&&r.selected,S&&r.focused,b&&r.disabled,C&&r.editing,k&&r.editable),onClick:se,onMouseDown:G,ref:n,children:[c.jsx("div",{className:r.iconContainer,children:$}),E&&c.jsx(Ta,{className:r.checkbox,checked:v,onChange:q,disabled:b||w,ref:W,tabIndex:-1}),C?c.jsx(sg,N({},m,{className:r.labelInput})):c.jsx("div",N({className:r.label},k&&{onDoubleClick:ie},{children:l})),f&&c.jsx(og,N({},f))]}))}),ei=e=>e,ag=()=>{let e=ei;return{configure(t){e=t},generate(t){return e(t)},reset(){e=ei}}},lg=ag(),cg={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 Uo(e,t,n="Mui"){const r=cg[t];return r?`${n}-${r}`:`${lg.generate(e)}-${t}`}function $a(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=Uo(e,o,n)}),r}function ug(e){return Uo("MuiTreeItem",e)}const rt=$a("MuiTreeItem",["root","groupTransition","content","expanded","selected","focused","disabled","iconContainer","label","checkbox","labelInput","editable","editing","dragAndDropOverlay"]),Ba=oe(c.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),qa=oe(c.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}));function Go(e){const{children:t,itemId:n}=e,{wrapItem:r,instance:o}=Tt();return r({children:t,itemId:n,instance:o})}Go.propTypes={children:rs.node,itemId:rs.string.isRequired};const dg=["children","className","slots","slotProps","ContentComponent","ContentProps","itemId","id","label","onClick","onMouseDown","onFocus","onBlur","onKeyDown"],pg=["ownerState"],hg=["ownerState"],mg=["ownerState"],fg=Ea(),gg=e=>{const{classes:t}=e;return ja({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"]},ug,t)},yg=ae("li",{name:"MuiTreeItem",slot:"Root",overridesResolver:(e,t)=>t.root})({listStyle:"none",margin:0,padding:0,outline:0}),bg=ae(Da,{name:"MuiTreeItem",slot:"Content",overridesResolver:(e,t)=>[t.content,t.iconContainer&&{[`& .${rt.iconContainer}`]:t.iconContainer},t.label&&{[`& .${rt.label}`]:t.label}],shouldForwardProp:e=>ht(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"}},[`&.${rt.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,backgroundColor:"transparent"},[`&.${rt.focused}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${rt.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:pe.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}))`:pe.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})`:pe.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${rt.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:pe.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`& .${rt.iconContainer}`]:{width:16,display:"flex",flexShrink:0,justifyContent:"center","& svg":{fontSize:18}},[`& .${rt.label}`]:N({width:"100%",boxSizing:"border-box",minWidth:0,position:"relative"},e.typography.body1),[`& .${rt.checkbox}`]:{padding:0},variants:[{props:{indentationAtItemLevel:!0},style:{paddingLeft:`calc(${e.spacing(1)} + var(--TreeView-itemChildrenIndentation) * var(--TreeView-itemDepth))`}}]})),xg=ae(mn,{name:"MuiTreeItem",slot:"GroupTransition",overridesResolver:(e,t)=>t.groupTransition,shouldForwardProp:e=>ht(e)&&e!=="indentationAtItemLevel"})({margin:0,padding:0,paddingLeft:"var(--TreeView-itemChildrenIndentation)",variants:[{props:{indentationAtItemLevel:!0},style:{paddingLeft:0}}]}),vg=P.forwardRef(function(t,n){const{icons:r,runItemPlugins:o,items:{disabledItemsFocusable:s,indentationAtItemLevel:i},selection:{disableSelection:a},expansion:{expansionTrigger:l},treeId:u,instance:d}=Tt(),p=P.useContext(zo),f=fg({props:t,name:"MuiTreeItem"}),{children:m,className:g,slots:b,slotProps:x,ContentComponent:v=Da,ContentProps:S,itemId:C,id:k,label:w,onClick:E,onMouseDown:O,onBlur:B,onKeyDown:q}=f,y=at(f,dg),{expanded:R,focused:A,selected:L,disabled:$,editing:W,handleExpansion:G,handleCancelItemLabelEditing:se,handleSaveItemLabel:ie}=La(C),{contentRef:H,rootRef:Q,propsEnhancers:F}=o(f),K=P.useRef(null),X=P.useRef(null),he=Ut(n,Q,K),J=Ut(S?.ref,H,X),D={expandIcon:b?.expandIcon??r.slots.expandIcon??Ba,collapseIcon:b?.collapseIcon??r.slots.collapseIcon??qa,endIcon:b?.endIcon??r.slots.endIcon,icon:b?.icon,groupTransition:b?.groupTransition},je=Y=>Array.isArray(Y)?Y.length>0&&Y.some(je):!!Y,we=je(m),Ve=N({},f,{expanded:R,focused:A,selected:L,disabled:$,indentationAtItemLevel:i}),M=gg(Ve),_=D.groupTransition??void 0,ne=Ct({elementType:_,ownerState:{},externalSlotProps:x?.groupTransition,additionalProps:N({unmountOnExit:!0,in:R,component:"ul",role:"group"},i?{indentationAtItemLevel:!0}:{}),className:M.groupTransition}),dt=Y=>{l==="iconContainer"&&G(Y)},Je=R?D.collapseIcon:D.expandIcon,wr=Ct({elementType:Je,ownerState:{},externalSlotProps:Y=>R?N({},ot(r.slotProps.collapseIcon,Y),ot(x?.collapseIcon,Y)):N({},ot(r.slotProps.expandIcon,Y),ot(x?.expandIcon,Y)),additionalProps:{onClick:dt}}),kr=at(wr,pg),jt=we&&Je?c.jsx(Je,N({},kr)):null,Ze=we?void 0:D.endIcon,Ir=Ct({elementType:Ze,ownerState:{},externalSlotProps:Y=>we?{}:N({},ot(r.slotProps.endIcon,Y),ot(x?.endIcon,Y))}),In=at(Ir,hg),Pr=Ze?c.jsx(Ze,N({},In)):null,V=D.icon,tl=Ct({elementType:V,ownerState:{},externalSlotProps:x?.icon}),nl=at(tl,mg),rl=V?c.jsx(V,N({},nl)):null;let Pn;L?Pn=!0:a||$?Pn=void 0:Pn=!1;function ol(Y){!A&&(!$||s)&&Y.currentTarget===Y.target&&d.focusItem(Y,C)}function sl(Y){B?.(Y),!(W||Y.relatedTarget&&gn(Y.relatedTarget,K.current)&&(Y.target&&Y.target?.dataset?.element==="labelInput"&&gn(Y.target,K.current)||Y.relatedTarget?.dataset?.element==="labelInput"))&&d.removeFocusedItem()}const il=Y=>{q?.(Y),Y.target?.dataset?.element!=="labelInput"&&d.handleItemKeyDown(Y,C)},al=Ho({itemId:C,treeId:u,id:k}),ll=d.canItemBeTabbed(C)?0:-1,Tn={rootRefObject:K,contentRefObject:X,interactions:{handleSaveItemLabel:ie,handleCancelItemLabelEditing:se}},cl=F.root?.(N({},Tn,{externalEventHandlers:ze(y)}))??{},ul=F.content?.(N({},Tn,{externalEventHandlers:ze(S)}))??{},Xo=F.dragAndDropOverlay?.(N({},Tn,{externalEventHandlers:{}}))??{},Jo=F.labelInput?.(N({},Tn,{externalEventHandlers:{}}))??{};return c.jsx(Go,{itemId:C,children:c.jsxs(yg,N({className:fe(M.root,g),role:"treeitem","aria-expanded":we?R:void 0,"aria-selected":Pn,"aria-disabled":$||void 0,id:al,tabIndex:ll},y,{ownerState:Ve,onFocus:ol,onBlur:sl,onKeyDown:il,ref:he,style:i?N({},y.style,{"--TreeView-itemDepth":typeof p=="function"?p(C):p}):y.style},cl,{children:[c.jsx(bg,N({as:v,classes:{root:M.content,expanded:M.expanded,selected:M.selected,focused:M.focused,disabled:M.disabled,editable:M.editable,editing:M.editing,iconContainer:M.iconContainer,label:M.label,labelInput:M.labelInput,checkbox:M.checkbox},label:w,itemId:C,onClick:E,onMouseDown:O,icon:rl,expansionIcon:jt,displayIcon:Pr,ownerState:Ve},S,ul,Xo.action==null?{}:{dragAndDropOverlayProps:Xo},Jo.value==null?{}:{labelInputProps:Jo},{ref:J})),m&&c.jsx(xg,N({as:_},ne,{children:m}))]}))})});function Sg(e){const{slots:t,slotProps:n,status:r}=e,o=Tt(),s=N({},o.icons.slots,{expandIcon:o.icons.slots.expandIcon??Ba,collapseIcon:o.icons.slots.collapseIcon??qa}),i=o.icons.slotProps;let a;t?.icon?a="icon":r.expandable?r.expanded?a="collapseIcon":a="expandIcon":a="endIcon";const l=t?.[a]??s[a],u=Ct({elementType:l,externalSlotProps:d=>N({},ot(i[a],d),ot(n?.[a],d)),ownerState:{}});return l?c.jsx(l,N({},u)):null}const Cg=["visible"],wg=ae("li",{name:"MuiTreeItem2",slot:"Root",overridesResolver:(e,t)=>t.root})({listStyle:"none",margin:0,padding:0,outline:0}),kg=ae("div",{name:"MuiTreeItem2",slot:"Content",overridesResolver:(e,t)=>t.content,shouldForwardProp:e=>ht(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})`:pe.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}))`:pe.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})`:pe.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}))`:pe.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}]})),Ig=ae("div",{name:"MuiTreeItem2",slot:"Label",overridesResolver:(e,t)=>t.label,shouldForwardProp:e=>ht(e)&&e!=="editable"})(({theme:e})=>N({width:"100%",boxSizing:"border-box",minWidth:0,position:"relative",overflow:"hidden"},e.typography.body1,{variants:[{props:({editable:t})=>t,style:{paddingLeft:"2px"}}]})),Pg=ae("div",{name:"MuiTreeItem2",slot:"IconContainer",overridesResolver:(e,t)=>t.iconContainer})({width:16,display:"flex",flexShrink:0,justifyContent:"center","& svg":{fontSize:18}});ae(mn,{name:"MuiTreeItem2",slot:"GroupTransition",overridesResolver:(e,t)=>t.groupTransition,shouldForwardProp:e=>ht(e)&&e!=="indentationAtItemLevel"})({margin:0,padding:0,paddingLeft:"var(--TreeView-itemChildrenIndentation)",variants:[{props:{indentationAtItemLevel:!0},style:{paddingLeft:0}}]});ae(P.forwardRef((e,t)=>{const{visible:n}=e,r=at(e,Cg);return n?c.jsx(Ta,N({},r,{ref:t})):null}),{name:"MuiTreeItem2",slot:"Checkbox",overridesResolver:(e,t)=>t.checkbox})({padding:0});function Tg(e){return Uo("MuiRichTreeView",e)}$a("MuiRichTreeView",["root"]);const jg=(e,t)=>{const n=P.useRef({}),[r,o]=P.useState(()=>{const i={};return e.forEach(a=>{a.models&&Object.entries(a.models).forEach(([l,u])=>{n.current[l]={isControlled:t[l]!==void 0,getDefaultValue:u.getDefaultValue},i[l]=u.getDefaultValue(t)})}),i});return Object.fromEntries(Object.entries(n.current).map(([i,a])=>{const l=t[i]??r[i];return[i,{value:l,setControlledValue:u=>{a.isControlled||o(d=>N({},d,{[i]:u}))}}]}))};class Eg{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()),s=Array.from(r.regular.keys());for(let i=o.length-1;i>=0;i-=1){const a=o[i];r.highPriority.has(a)&&a.apply(this,n)}for(let i=0;i<s.length;i+=1){const a=s[i];r.regular.has(a)&&a.apply(this,n)}}once(t,n){const r=this;this.on(t,function o(...s){r.removeListener(t,o),n.apply(r,s)})}}const Rg=e=>e.isPropagationStopped!==void 0,Va=()=>{const[e]=P.useState(()=>new Eg),t=P.useCallback((...r)=>{const[o,s,i={}]=r;i.defaultMuiPrevented=!1,!(Rg(i)&&i.isPropagationStopped())&&e.emit(o,s,i)},[e]),n=P.useCallback((r,o)=>(e.on(r,o),()=>{e.removeListener(r,o)}),[e]);return{instance:{$$publishEvent:t,$$subscribeEvent:n}}};Va.params={};const Fa=({plugins:e})=>{const t=new Set(e);return{instance:{getAvailablePlugins:()=>t}}};Fa.params={};const Wo=({params:e,state:t,setState:n})=>{P.useEffect(()=>{n(o=>o.id.treeId===e.id&&o.id.treeId!==void 0?o:N({},o,{id:N({},o.id,{treeId:e.id??eg()})}))},[n,e.id]);const r=e.id??t.id.treeId;return{getRootProps:()=>({id:r}),contextValue:{treeId:r}}};Wo.params={id:!0};Wo.getInitialState=({id:e})=>({id:{treeId:e??void 0}});const _g=[Va,Fa,Wo],Ag=["slots","slotProps","apiRef","experimentalFeatures"],Og=e=>{let{props:{slots:t,slotProps:n,apiRef:r,experimentalFeatures:o},plugins:s}=e,i=at(e.props,Ag);const a={};s.forEach(f=>{Object.assign(a,f.params)});const l={},u={};Object.keys(i).forEach(f=>{const m=i[f];a[f]?l[f]=m:u[f]=m});const d=o??{},p=s.reduce((f,m)=>m.getDefaultizedParams?m.getDefaultizedParams({params:f,experimentalFeatures:d}):f,l);return{apiRef:r,forwardedProps:u,pluginParams:p,slots:t??{},slotProps:n??{},experimentalFeatures:d}},Ng=({plugins:e,instance:t,publicAPI:n,rootRef:r})=>({runItemPlugins:a=>{let l=null,u=null;const d=[],p={};e.forEach(g=>{if(!g.itemPlugin)return;const b=g.itemPlugin({props:a,rootRef:l,contentRef:u});b?.rootRef&&(l=b.rootRef),b?.contentRef&&(u=b.contentRef),b?.propsEnhancers&&(d.push(b.propsEnhancers),Object.keys(b.propsEnhancers).forEach(x=>{p[x]=!0}))});const f=g=>b=>{const x={};return d.forEach(v=>{const S=v[g];S!=null&&Object.assign(x,S(b))}),x},m=Object.fromEntries(Object.keys(p).map(g=>[g,f(g)]));return{contentRef:u,rootRef:l,propsEnhancers:m}},wrapItem:({itemId:a,children:l})=>{let u=l;for(let d=e.length-1;d>=0;d-=1){const p=e[d];p.wrapItem&&(u=p.wrapItem({itemId:a,children:u,instance:t}))}return u},wrapRoot:({children:a})=>{let l=a;for(let u=e.length-1;u>=0;u-=1){const d=e[u];d.wrapRoot&&(l=d.wrapRoot({children:l,instance:t}))}return l},instance:t,rootRef:r,publicAPI:n});function Mg(e){const t=P.useRef({});return e?(e.current==null&&(e.current={}),e.current):t.current}const Lg=({plugins:e,rootRef:t,props:n})=>{const r=[..._g,...e],{pluginParams:o,forwardedProps:s,apiRef:i,experimentalFeatures:a,slots:l,slotProps:u}=Og({plugins:r,props:n}),d=jg(r,o),f=P.useRef({}).current,m=Mg(i),g=P.useRef(null),b=Ut(g,t),x=Ng({plugins:r,instance:f,publicAPI:m,rootRef:g}),[v,S]=P.useState(()=>{const E={};return r.forEach(O=>{O.getInitialState&&Object.assign(E,O.getInitialState(o))}),E}),C=[],k=E=>{const O=E({instance:f,params:o,slots:l,slotProps:u,experimentalFeatures:a,state:v,setState:S,rootRef:g,models:d,plugins:r});O.getRootProps&&C.push(O.getRootProps),O.publicAPI&&Object.assign(m,O.publicAPI),O.instance&&Object.assign(f,O.instance),O.contextValue&&Object.assign(x,O.contextValue)};return r.forEach(k),{getRootProps:(E={})=>{const O=N({role:"tree"},s,E,{ref:b});return C.forEach(B=>{Object.assign(O,B(E))}),O},rootRef:b,contextValue:x,instance:f}},Dg=(e,t,n)=>{e.$$publishEvent(t,n)},$t="__TREE_VIEW_ROOT_PARENT_ID__",$g=e=>{const t={};return e.forEach((n,r)=>{t[n]=r}),t},Bg=["children"],za=({items:e,isItemDisabled:t,getItemLabel:n,getItemId:r})=>{const o={},s={},i={[$t]:[]},a=(u,d,p)=>{const f=r?r(u):u.id;if(f==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(u)].join(`
|
|
128
|
-
`));if(
|
|
129
|
-
`));const
|
|
130
|
-
`));o[f]={id:f,label:m,parentId:p,idAttribute:void 0,expandable:!!u.children?.length,disabled:t?t(u):!1,depth:d},s[f]=u;const g=p??$t;i[g]||(i[g]=[]),i[g].push(f),u.children?.forEach(b=>a(b,d+1,f))};e.forEach(u=>a(u,0,null));const l={};return Object.keys(i).forEach(u=>{l[u]=$g(i[u])}),{itemMetaMap:o,itemMap:s,itemOrderedChildrenIds:i,itemChildrenIndexes:l}},kn=({instance:e,params:t,state:n,setState:r,experimentalFeatures:o})=>{const s=P.useCallback(v=>n.items.itemMetaMap[v],[n.items.itemMetaMap]),i=P.useCallback(v=>n.items.itemMap[v],[n.items.itemMap]),a=P.useCallback(()=>{const v=S=>{const C=n.items.itemMap[S],k=at(C,Bg),w=n.items.itemOrderedChildrenIds[S];return w&&(k.children=w.map(v)),k};return n.items.itemOrderedChildrenIds[$t].map(v)},[n.items.itemMap,n.items.itemOrderedChildrenIds]),l=P.useCallback(v=>{if(v==null)return!1;let S=e.getItemMeta(v);if(!S)return!1;if(S.disabled)return!0;for(;S.parentId!=null;)if(S=e.getItemMeta(S.parentId),S.disabled)return!0;return!1},[e]),u=P.useCallback(v=>{const S=e.getItemMeta(v).parentId??$t;return n.items.itemChildrenIndexes[S][v]},[e,n.items.itemChildrenIndexes]),d=P.useCallback(v=>n.items.itemOrderedChildrenIds[v??$t]??[],[n.items.itemOrderedChildrenIds]),p=v=>{const S=e.getItemMeta(v);return S==null?null:document.getElementById(Ho({treeId:n.id.treeId,itemId:v,id:S.idAttribute}))},f=v=>t.disabledItemsFocusable?!0:!e.isItemDisabled(v),m=P.useRef(!1),g=P.useCallback(()=>{m.current=!0},[]),b=P.useCallback(()=>m.current,[]);return P.useEffect(()=>{e.areItemUpdatesPrevented()||r(v=>{const S=za({items:t.items,isItemDisabled:t.isItemDisabled,getItemId:t.getItemId,getItemLabel:t.getItemLabel});return Object.values(v.items.itemMetaMap).forEach(C=>{S.itemMetaMap[C.id]||Dg(e,"removeItem",{id:C.id})}),N({},v,{items:S})})},[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:i,getItemDOMElement:p,getItemTree:a,getItemOrderedChildrenIds:d},instance:{getItemMeta:s,getItem:i,getItemTree:a,getItemsToRender:()=>{const v=S=>{const C=n.items.itemMetaMap[S];return{label:C.label,itemId:C.id,id:C.idAttribute,children:n.items.itemOrderedChildrenIds[S]?.map(v)}};return n.items.itemOrderedChildrenIds[$t].map(v)},getItemIndex:u,getItemDOMElement:p,getItemOrderedChildrenIds:d,isItemDisabled:l,isItemNavigable:f,preventItemUpdates:g,areItemUpdatesPrevented:b},contextValue:{items:{onItemClick:t.onItemClick,disabledItemsFocusable:t.disabledItemsFocusable,indentationAtItemLevel:o.indentationAtItemLevel??!1}}}};kn.getInitialState=e=>({items:za({items:e.items,isItemDisabled:e.isItemDisabled,getItemId:e.getItemId,getItemLabel:e.getItemLabel})});kn.getDefaultizedParams=({params:e})=>N({},e,{disabledItemsFocusable:e.disabledItemsFocusable??!1,itemChildrenIndentation:e.itemChildrenIndentation??"12px"});kn.wrapRoot=({children:e,instance:t})=>c.jsx(zo.Provider,{value:n=>t.getItemMeta(n)?.depth??0,children:e});kn.params={disabledItemsFocusable:!0,items:!0,isItemDisabled:!0,getItemLabel:!0,getItemId:!0,onItemClick:!0,itemChildrenIndentation:!0};const qg=typeof window<"u"?P.useLayoutEffect:P.useEffect;function Ft(e){const t=P.useRef(e);return qg(()=>{t.current=e}),P.useRef((...n)=>(0,t.current)(...n)).current}const vr=({instance:e,params:t,models:n})=>{const r=P.useMemo(()=>{const p=new Map;return n.expandedItems.value.forEach(f=>{p.set(f,!0)}),p},[n.expandedItems.value]),o=(p,f)=>{t.onExpandedItemsChange?.(p,f),n.expandedItems.setControlledValue(f)},s=P.useCallback(p=>r.has(p),[r]),i=P.useCallback(p=>!!e.getItemMeta(p)?.expandable,[e]),a=Ft((p,f)=>{const m=e.isItemExpanded(f);e.setItemExpansion(p,f,!m)}),l=Ft((p,f,m)=>{if(e.isItemExpanded(f)===m)return;let b;m?b=[f].concat(n.expandedItems.value):b=n.expandedItems.value.filter(x=>x!==f),t.onItemExpansionToggle&&t.onItemExpansionToggle(p,f,m),o(p,b)}),u=(p,f)=>{const m=e.getItemMeta(f),b=e.getItemOrderedChildrenIds(m.parentId).filter(v=>e.isItemExpandable(v)&&!e.isItemExpanded(v)),x=n.expandedItems.value.concat(b);b.length>0&&(t.onItemExpansionToggle&&b.forEach(v=>{t.onItemExpansionToggle(p,v,!0)}),o(p,x))},d=P.useMemo(()=>t.expansionTrigger?t.expansionTrigger:e.isTreeViewEditable?"iconContainer":"content",[t.expansionTrigger,e.isTreeViewEditable]);return{publicAPI:{setItemExpansion:l},instance:{isItemExpanded:s,isItemExpandable:i,setItemExpansion:l,toggleItemExpansion:a,expandAllSiblings:u},contextValue:{expansion:{expansionTrigger:d}}}};vr.models={expandedItems:{getDefaultValue:e=>e.defaultExpandedItems}};const Vg=[];vr.getDefaultizedParams=({params:e})=>N({},e,{defaultExpandedItems:e.defaultExpandedItems??Vg});vr.params={expandedItems:!0,defaultExpandedItems:!0,onExpandedItemsChange:!0,onItemExpansionToggle:!0,expansionTrigger:!0};const Vn=e=>Array.isArray(e)?e:e!=null?[e]:[],Hr=e=>{const t={};return e.forEach(n=>{t[n]=!0}),t},Sr=({instance:e,params:t,models:n})=>{const r=P.useRef(null),o=P.useRef({}),s=P.useMemo(()=>{const b=new Map;return Array.isArray(n.selectedItems.value)?n.selectedItems.value.forEach(x=>{b.set(x,!0)}):n.selectedItems.value!=null&&b.set(n.selectedItems.value,!0),b},[n.selectedItems.value]),i=(b,x)=>{if(t.onItemSelectionToggle)if(t.multiSelect){const v=x.filter(C=>!e.isItemSelected(C)),S=n.selectedItems.value.filter(C=>!x.includes(C));v.forEach(C=>{t.onItemSelectionToggle(b,C,!0)}),S.forEach(C=>{t.onItemSelectionToggle(b,C,!1)})}else x!==n.selectedItems.value&&(n.selectedItems.value!=null&&t.onItemSelectionToggle(b,n.selectedItems.value,!1),x!=null&&t.onItemSelectionToggle(b,x,!0));t.onSelectedItemsChange&&t.onSelectedItemsChange(b,x),n.selectedItems.setControlledValue(x)},a=b=>s.has(b),l=({event:b,itemId:x,keepExistingSelection:v=!1,shouldBeSelected:S})=>{if(t.disableSelection)return;let C;if(v){const k=Vn(n.selectedItems.value),w=e.isItemSelected(x);w&&(S===!1||S==null)?C=k.filter(E=>E!==x):!w&&(S===!0||S==null)?C=[x].concat(k):C=k}else S===!1||S==null&&e.isItemSelected(x)?C=t.multiSelect?[]:null:C=t.multiSelect?[x]:x;i(b,C),r.current=x,o.current={}},u=(b,[x,v])=>{if(t.disableSelection||!t.multiSelect)return;let S=Vn(n.selectedItems.value).slice();Object.keys(o.current).length>0&&(S=S.filter(E=>!o.current[E]));const C=Hr(S),k=Jf(e,x,v),w=k.filter(E=>!C[E]);S=S.concat(w),i(b,S),o.current=Hr(k)};return{getRootProps:()=>({"aria-multiselectable":t.multiSelect}),publicAPI:{selectItem:l},instance:{isItemSelected:a,selectItem:l,selectAllNavigableItems:b=>{if(t.disableSelection||!t.multiSelect)return;const x=Zf(e);i(b,x),o.current=Hr(x)},expandSelectionRange:(b,x)=>{if(r.current!=null){const[v,S]=Ma(e,x,r.current);u(b,[v,S])}},selectRangeFromStartToItem:(b,x)=>{u(b,[fn(e),x])},selectRangeFromItemToEnd:(b,x)=>{u(b,[x,Na(e)])},selectItemFromArrowNavigation:(b,x,v)=>{if(t.disableSelection||!t.multiSelect)return;let S=Vn(n.selectedItems.value).slice();Object.keys(o.current).length===0?(S.push(v),o.current={[x]:!0,[v]:!0}):(o.current[x]||(o.current={}),o.current[v]?(S=S.filter(C=>C!==x),delete o.current[x]):(S.push(v),o.current[v]=!0)),i(b,S)}},contextValue:{selection:{multiSelect:t.multiSelect,checkboxSelection:t.checkboxSelection,disableSelection:t.disableSelection}}}};Sr.models={selectedItems:{getDefaultValue:e=>e.defaultSelectedItems}};const Fg=[];Sr.getDefaultizedParams=({params:e})=>N({},e,{disableSelection:e.disableSelection??!1,multiSelect:e.multiSelect??!1,checkboxSelection:e.checkboxSelection??!1,defaultSelectedItems:e.defaultSelectedItems??(e.multiSelect?Fg:null)});Sr.params={disableSelection:!0,multiSelect:!0,checkboxSelection:!0,defaultSelectedItems:!0,selectedItems:!0,onSelectedItemsChange:!0,onItemSelectionToggle:!0};function zg(e){return e&&e.ownerDocument||document}const ti=1e3;class Hg{constructor(t=ti){this.timeouts=new Map,this.cleanupTimeout=ti,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 Ug{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 Gg{}function Wg(e){let t=0;return function(r,o,s){e.registry===null&&(e.registry=typeof FinalizationRegistry<"u"?new Ug:new Hg);const[i]=P.useState(new Gg),a=P.useRef(null),l=P.useRef(void 0);l.current=s;const u=P.useRef(null);if(!a.current&&l.current){const d=(p,f)=>{f.defaultMuiPrevented||l.current?.(p,f)};a.current=r.$$subscribeEvent(o,d),t+=1,u.current={cleanupToken:t},e.registry.register(i,()=>{a.current?.(),a.current=null,u.current=null},u.current)}else!l.current&&a.current&&(a.current(),a.current=null,u.current&&(e.registry.unregister(u.current),u.current=null));P.useEffect(()=>{if(!a.current&&l.current){const d=(p,f)=>{f.defaultMuiPrevented||l.current?.(p,f)};a.current=r.$$subscribeEvent(o,d)}return u.current&&e.registry&&(e.registry.unregister(u.current),u.current=null),()=>{a.current?.(),a.current=null}},[r,o])}}const Kg={registry:null},Qg=Wg(Kg),Ha=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?Ha(t.shadowRoot):t:null},Yg=(e,t)=>{let n=Vn(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=fn(e)),n},Ko=({instance:e,params:t,state:n,setState:r,models:o,rootRef:s})=>{const i=Yg(e,o.selectedItems.value),a=Ft(x=>{const v=typeof x=="function"?x(n.focusedItemId):x;n.focusedItemId!==v&&r(S=>N({},S,{focusedItemId:v}))}),l=P.useCallback(()=>!!s.current&&s.current.contains(Ha(zg(s.current))),[s]),u=P.useCallback(x=>n.focusedItemId===x&&l(),[n.focusedItemId,l]),d=x=>{const v=e.getItemMeta(x);return v&&(v.parentId==null||e.isItemExpanded(v.parentId))},p=(x,v)=>{const S=e.getItemDOMElement(v);S&&S.focus(),a(v),t.onItemFocus&&t.onItemFocus(x,v)},f=Ft((x,v)=>{d(v)&&p(x,v)}),m=Ft(()=>{if(n.focusedItemId==null)return;if(e.getItemMeta(n.focusedItemId)){const v=e.getItemDOMElement(n.focusedItemId);v&&v.blur()}a(null)}),g=x=>x===i;Qg(e,"removeItem",({id:x})=>{n.focusedItemId===x&&p(null,i)});const b=x=>v=>{x.onFocus?.(v),!v.defaultMuiPrevented&&v.target===v.currentTarget&&p(v,i)};return{getRootProps:x=>({onFocus:b(x)}),publicAPI:{focusItem:f},instance:{isItemFocused:u,canItemBeTabbed:g,focusItem:f,removeFocusedItem:m}}};Ko.getInitialState=()=>({focusedItemId:null});Ko.params={onItemFocus:!0};function Xg(e){return!!e&&e.length===1&&!!e.match(/\S/)}const Ua=({instance:e,params:t,state:n})=>{const r=zc(),o=P.useRef({}),s=Ft(d=>{o.current=d(o.current)});P.useEffect(()=>{if(e.areItemUpdatesPrevented())return;const d={},p=f=>{d[f.id]=f.label.substring(0,1).toLowerCase()};Object.values(n.items.itemMetaMap).forEach(p),o.current=d},[n.items.itemMetaMap,t.getItemId,e]);const i=(d,p)=>{const f=p.toLowerCase(),m=v=>{const S=qn(e,v);return S===null?fn(e):S};let g=null,b=m(d);const x={};for(;g==null&&!x[b];)o.current[b]===f?g=b:(x[b]=!0,b=m(b));return g},a=d=>!t.disableSelection&&!e.isItemDisabled(d),l=d=>!e.isItemDisabled(d)&&e.isItemExpandable(d);return{instance:{updateFirstCharMap:s,handleItemKeyDown:(d,p)=>{if(d.defaultMuiPrevented||d.altKey||gn(d.target,d.currentTarget))return;const f=d.ctrlKey||d.metaKey,m=d.key;switch(!0){case(m===" "&&a(p)):{d.preventDefault(),t.multiSelect&&d.shiftKey?e.expandSelectionRange(d,p):e.selectItem({event:d,itemId:p,keepExistingSelection:t.multiSelect,shouldBeSelected:t.multiSelect?void 0:!0});break}case m==="Enter":{wt(e,Ge)&&e.isItemEditable(p)&&!e.isItemBeingEdited(p)?e.setEditedItemId(p):l(p)?(e.toggleItemExpansion(d,p),d.preventDefault()):a(p)&&(t.multiSelect?(d.preventDefault(),e.selectItem({event:d,itemId:p,keepExistingSelection:!0})):e.isItemSelected(p)||(e.selectItem({event:d,itemId:p}),d.preventDefault()));break}case m==="ArrowDown":{const g=qn(e,p);g&&(d.preventDefault(),e.focusItem(d,g),t.multiSelect&&d.shiftKey&&a(g)&&e.selectItemFromArrowNavigation(d,p,g));break}case m==="ArrowUp":{const g=Oa(e,p);g&&(d.preventDefault(),e.focusItem(d,g),t.multiSelect&&d.shiftKey&&a(g)&&e.selectItemFromArrowNavigation(d,p,g));break}case(m==="ArrowRight"&&!r||m==="ArrowLeft"&&r):{if(f)return;if(e.isItemExpanded(p)){const g=qn(e,p);g&&(e.focusItem(d,g),d.preventDefault())}else l(p)&&(e.toggleItemExpansion(d,p),d.preventDefault());break}case(m==="ArrowLeft"&&!r||m==="ArrowRight"&&r):{if(f)return;if(l(p)&&e.isItemExpanded(p))e.toggleItemExpansion(d,p),d.preventDefault();else{const g=e.getItemMeta(p).parentId;g&&(e.focusItem(d,g),d.preventDefault())}break}case m==="Home":{a(p)&&t.multiSelect&&f&&d.shiftKey?e.selectRangeFromStartToItem(d,p):e.focusItem(d,fn(e)),d.preventDefault();break}case m==="End":{a(p)&&t.multiSelect&&f&&d.shiftKey?e.selectRangeFromItemToEnd(d,p):e.focusItem(d,Na(e)),d.preventDefault();break}case m==="*":{e.expandAllSiblings(d,p),d.preventDefault();break}case(String.fromCharCode(d.keyCode)==="A"&&f&&t.multiSelect&&!t.disableSelection):{e.selectAllNavigableItems(d),d.preventDefault();break}case(!f&&!d.shiftKey&&Xg(m)):{const g=i(p,m);g!=null&&(e.focusItem(d,g),d.preventDefault());break}}}}}};Ua.params={};const Ga=({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}}}});Ga.params={};const Jg=[kn,vr,Sr,Ko,Ua,Ga,Ge],Zg=["ownerState"];function ey({slots:e,slotProps:t,label:n,id:r,itemId:o,itemsToRender:s}){const i=e?.item??vg,a=Ct({elementType:i,externalSlotProps:t?.item,additionalProps:{itemId:o,id:r,label:n},ownerState:{itemId:o,label:n}}),l=at(a,Zg),u=P.useMemo(()=>s?c.jsx(Wa,{itemsToRender:s,slots:e,slotProps:t}):null,[s,e,t]);return c.jsx(i,N({},l,{children:u}))}function Wa(e){const{itemsToRender:t,slots:n,slotProps:r}=e;return c.jsx(P.Fragment,{children:t.map(o=>c.jsx(ey,{slots:n,slotProps:r,label:o.label,id:o.id,itemId:o.itemId,itemsToRender:o.children},o.itemId))})}const ty=Ea(),ny=e=>{const{classes:t}=e;return ja({root:["root"]},Tg,t)},ry=ae("ul",{name:"MuiRichTreeView",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,margin:0,listStyle:"none",outline:0,position:"relative"}),oy=P.forwardRef(function(t,n){const r=ty({props:t,name:"MuiRichTreeView"}),{getRootProps:o,contextValue:s,instance:i}=Lg({plugins:Jg,rootRef:n,props:r}),{slots:a,slotProps:l}=r,u=ny(r),d=a?.root??ry,p=Ct({elementType:d,externalSlotProps:l?.root,className:u.root,getSlotProps:o,ownerState:r});return c.jsx(Qf,{value:s,children:c.jsx(d,N({},p,{children:c.jsx(Wa,{slots:a,slotProps:l,itemsToRender:i.getItemsToRender()})}))})}),sy=oe(c.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"})),iy=oe([c.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"),c.jsx("path",{d:"M14 17H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"},"1")]),ay=oe(c.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"})),ly=oe(c.jsx("path",{d:"M15 4v2h3v12h-3v2h5V4zM4 20h5v-2H6V6h3V4H4z"}));function Ka({items:e,defaultExpandedItems:t,navigate:n}){return c.jsx(oy,{items:hy(e,n),defaultExpandedItems:t,slots:{item:py}})}const cy=ii.animated(mn);function uy(e){const t=ii.useSpring({to:{opacity:e.in?1:0,transform:`translate3d(0,${e.in?0:20}px,0)`}});return c.jsx(cy,{style:t,...e})}function dy({item:e,...t}){const n=c.jsxs(Ig,{...t,sx:{display:"flex",alignItems:"center",color:e.error?"error.main":"grey.600"},children:[e.fileType==="directory"&&c.jsx(sy,{})||e.fileType==="notebook"&&c.jsx(iy,{})||e.fileType==="model"&&c.jsx(ly,{})||e.fileType=="database"&&c.jsx(ay,{})||c.jsx(Ca,{}),c.jsx(h.Typography,{variant:"body2",sx:{marginLeft:"5px"},color:e.error?"error.main":e.link?"primary.main":"grey.600",children:e.label})]});return e.error?c.jsx(h.Tooltip,{title:e.error,placement:"right",children:n}):n}const py=P.forwardRef(function(t,n){const{id:r,itemId:o,label:s,children:i,disabled:a,...l}=t,{getRootProps:u,getContentProps:d,getLabelProps:p,getIconContainerProps:f,getGroupTransitionProps:m,status:g,publicAPI:b}=ng({id:r,itemId:o,children:i,label:s,disabled:a,rootRef:n}),x=b.getItem(o);return g.selected=!1,g.focused=!1,c.jsx(Go,{itemId:o,children:c.jsxs(wg,{...u(l),children:[c.jsxs(kg,{...d(),...x.link&&{onClick:v=>x.link(v)},sx:{pointerEvents:!x.selectable&&"none"},children:[c.jsx(Pg,{...f(),children:c.jsx(Sg,{status:g})}),c.jsx(dy,{...p({item:x})})]}),i&&c.jsx(uy,{...m()})]})})});function hy(e,t){const n=new Map;return e.map(r=>{let o=n;const s=r.path.split("/");s.forEach((i,a)=>{a===s.length-1?o.set(i,r):(o.has(i)||o.set(i,new Map),o=o.get(i))})}),Qa(n,"",t)}function Qa(e,t,n){const r=[];return e.forEach((o,s)=>{const i=s.endsWith(".malloy")&&"model"||s.endsWith(".malloynb")&&"notebook"||s.endsWith(".parquet")&&"database"||"unknown";if(i!=="unknown"){const a=o;r.push({id:t+s,label:s,fileType:i,link:i==="model"||i==="notebook"?l=>n(t+s,l):void 0,selectable:i==="model"||i==="notebook",error:"error"in a?a.error:void 0})}else t+=`${s}/`,r.push({id:t,label:s,fileType:"directory",selectable:!0,link:void 0,children:Qa(o,t,n)})}),r}const my=new fr(new Re),fy=["notebooks/","models/"];function gy({navigate:e}){const{projectName:t,packageName:n,versionId:r}=Le(),{data:o,isError:s,error:i,isSuccess:a}=Oe({queryKey:["models",t,n,r],queryFn:l=>my.listModels(t,n,r,l)});return c.jsx(Ie,{variant:"outlined",sx:{width:"100%"},children:c.jsxs(qe,{children:[c.jsx(h.Typography,{variant:"overline",fontWeight:"bold",children:"Semantic Models"}),c.jsx(h.Divider,{}),c.jsxs(h.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!a&&!s&&c.jsx(Ae,{text:"Fetching Models..."}),s&&c.jsx(_e,{error:i,context:`${t} > ${n} > Models`}),a&&o.data.length>0&&c.jsx(Ka,{items:o.data.sort((l,u)=>l.path.localeCompare(u.path)),navigate:e,defaultExpandedItems:fy}),a&&o.data.length===0&&c.jsx(h.Typography,{variant:"body2",children:"No models found"})]})]})})}const yy=new Ci(new Re),by=["notebooks/"];function xy({navigate:e}){const{projectName:t,packageName:n,versionId:r}=Le(),{data:o,isError:s,error:i,isSuccess:a}=Oe({queryKey:["notebooks",t,n,r],queryFn:l=>yy.listNotebooks(t,n,r,l)});return c.jsx(Ie,{variant:"outlined",sx:{width:"100%"},children:c.jsxs(qe,{children:[c.jsx(h.Typography,{variant:"overline",fontWeight:"bold",children:"Notebooks"}),c.jsx(h.Divider,{}),c.jsxs(h.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!a&&!s&&c.jsx(Ae,{text:"Fetching Notebooks..."}),s&&c.jsx(_e,{error:i,context:`${t} > ${n} > Notebooks`}),a&&o.data.length>0&&c.jsx(Ka,{items:o.data.sort((l,u)=>l.path.localeCompare(u.path)),defaultExpandedItems:by,navigate:e}),a&&o.data.length===0&&c.jsx(h.Typography,{variant:"body2",children:"No notebooks found"})]})]})})}const vy=new rd(new Re);function Sy(){const{projectName:e,packageName:t,versionId:n}=Le(),{data:r,isError:o,isLoading:s,error:i}=Oe({queryKey:["schedules",e,t,n],queryFn:a=>vy.listSchedules(e,t,n,a)});return s?c.jsx(Ae,{text:"Fetching Schedules..."}):o?c.jsx(_e,{error:i,context:`${e} > ${t} > Schedules`}):r.data.length?c.jsx(Ie,{variant:"outlined",sx:{padding:"10px",width:"100%"},children:c.jsxs(qe,{children:[c.jsx(h.Typography,{variant:"overline",fontWeight:"bold",children:"Scheduler"}),c.jsx(h.Divider,{}),c.jsx(h.Box,{sx:{mt:"10px",maxHeight:"200px",overflowY:"auto"},children:c.jsx(h.TableContainer,{component:h.Paper,children:c.jsxs(h.Table,{sx:{minWidth:300},size:"small",children:[c.jsx(h.TableHead,{children:c.jsxs(h.TableRow,{children:[c.jsx(h.TableCell,{align:"left",children:"Resource"}),c.jsx(h.TableCell,{align:"left",children:"Schedule"}),c.jsx(h.TableCell,{align:"left",children:"Action"}),c.jsx(h.TableCell,{align:"left",children:"Connection"}),c.jsx(h.TableCell,{align:"left",children:"Last Run"}),c.jsx(h.TableCell,{align:"left",children:"Status"})]})}),c.jsx(h.TableBody,{children:r.data.map(a=>c.jsxs(h.TableRow,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[c.jsx(h.TableCell,{align:"left",children:a.resource}),c.jsx(h.TableCell,{align:"left",children:a.schedule}),c.jsx(h.TableCell,{align:"left",children:a.action}),c.jsx(h.TableCell,{align:"left",children:a.connection}),c.jsx(h.TableCell,{align:"left",children:a.lastRunTime?new Date(a.lastRunTime).toLocaleString():"n/a"}),c.jsx(h.TableCell,{align:"left",children:a.lastRunStatus})]},a.resource))})]})})})]})}):null}const Cy="README.malloynb";function wy({navigate:e}){return e||(e=t=>{window.location.href=t}),c.jsxs(h.Grid,{container:!0,spacing:2,columns:12,children:[c.jsx(h.Grid,{size:{xs:12,md:4},children:c.jsx(Vm,{})}),c.jsx(h.Grid,{size:{xs:12,md:4},children:c.jsx(xy,{navigate:e})}),c.jsx(h.Grid,{size:{xs:12,md:4},children:c.jsx(gy,{navigate:e})}),c.jsx(h.Grid,{size:{xs:12,md:6},children:c.jsx(Gm,{})}),c.jsx(h.Grid,{size:{xs:12,md:6},children:c.jsx(Hm,{})}),c.jsx(h.Grid,{size:{xs:12,md:12},children:c.jsx(Sy,{})}),c.jsx(h.Grid,{size:{xs:12,md:12},children:c.jsx(va,{notebookPath:Cy,hideEmbeddingIcons:!0})})]})}const Ya=T.createContext(void 0),ky=({server:e=`${window.location.protocol}//${window.location.host}/api/v0`,getAccessToken:t,children:n})=>{const r={server:e,getAccessToken:t};return c.jsx(Ya.Provider,{value:r,children:n})},Cr=()=>{const e=T.useContext(Ya);if(e===void 0)throw new Error("useServer must be used within a ServerProvider");return e},Mn=oe(c.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})),ni=oe(c.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 Iy({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 c.jsx(Do,{sourceAndPaths:t,existingQuery:o,existingSourceName:e.sourceName,onQueryChange:n,onSourceChange:r})}function Py({cell:e,expandCodeCell:t,expandEmbedding:n,hideEmbeddingIcons:r,editingMalloy:o,editingMarkdown:s,sourceAndPaths:i,onCellChange:a,onClose:l,onEdit:u,onDelete:d,addButtonCallback:p}){const[f,m]=T.useState(t),[g,b]=T.useState(n),[x,v]=T.useState(),[S]=T.useState(),[C,k]=T.useState(an()),[w,E]=T.useState(!1),[O,B]=T.useState(e.sourceName?i.findIndex(X=>X.sourceInfo.name===e.sourceName):0);T.useEffect(()=>{e.isMarkdown||It(e.value,"malloy").then(X=>{v(X)})},[e]);const[q,y]=T.useState(e.value);T.useEffect(()=>{document.documentElement.setAttribute("data-color-mode","light")});const R=Ty(X=>{a({...e,value:X})}),[A,L]=T.useState(!1),$=()=>{d(),L(!1)},W=i.length===0,G=()=>{const X=i[O],he=X?.modelPath||e.modelPath||"",J=X?.sourceInfo.name||e.sourceName||"";a({...e,value:C.query,result:C.malloyResult?JSON.stringify(C.malloyResult):void 0,queryInfo:C.malloyQuery?JSON.stringify(C.malloyQuery):void 0,sourceName:J,modelPath:he})},se=c.jsx(h.Tooltip,{title:"Delete Cell",children:c.jsx(h.IconButton,{size:"small",onClick:()=>L(!0),children:c.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c.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"})})})}),ie=c.jsxs(h.Dialog,{open:A,onClose:()=>L(!1),children:[c.jsx(h.DialogTitle,{children:"Confirm Delete"}),c.jsx(h.DialogContent,{children:c.jsx(h.Typography,{children:"Are you sure you want to delete this cell?"})}),c.jsxs(h.DialogActions,{children:[c.jsx(h.Button,{onClick:()=>L(!1),children:"Cancel"}),c.jsx(h.Button,{onClick:$,color:"error",children:"Delete"})]})]}),H=e.isMarkdown?c.jsxs(c.Fragment,{children:[s?c.jsx(h.Tooltip,{title:"Save",children:c.jsx(h.IconButton,{size:"small",onClick:l,children:c.jsx(Mn,{})})}):c.jsx(h.Tooltip,{title:"Edit",children:c.jsx(h.IconButton,{size:"small",onClick:u,children:c.jsx(ni,{})})}),!s&&se]}):c.jsxs(c.Fragment,{children:[!o&&c.jsx(h.Tooltip,{title:f?"Hide Code":"View Code",children:c.jsx(h.IconButton,{size:"small",onClick:()=>{m(!f)},children:c.jsx(ba,{})})}),!r&&!o&&e.result&&c.jsx(h.Tooltip,{title:g?"Hide Embedding":"View Embedding",children:c.jsx(h.IconButton,{size:"small",onClick:()=>{b(!g)},children:c.jsx(vn,{})})}),o&&c.jsx(h.Tooltip,{title:"Save",children:c.jsx(h.IconButton,{size:"small",onClick:()=>{G(),l()},children:c.jsx(Mn,{})})}),!o&&c.jsx(h.Tooltip,{title:"Edit",children:c.jsx(h.IconButton,{size:"small",onClick:u,children:c.jsx(ni,{})})}),!o&&se]}),Q=o||s,F=s?c.jsx(h.Tooltip,{title:"Save",children:c.jsx(h.IconButton,{size:"small",onClick:l,children:c.jsx(Mn,{})})}):o?c.jsx(h.Tooltip,{title:"Save",children:c.jsx(h.IconButton,{size:"small",onClick:()=>{G(),l()},children:c.jsx(Mn,{})})}):null,K=w&&c.jsx(h.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:!Q&&c.jsxs(c.Fragment,{children:[p(!0),p(!1),H]})||F});return c.jsxs(Ie,{sx:{position:"relative",marginTop:"5px",marginBottom:"5px",borderWidth:"1.5px",backgroundColor:"#fff",minHeight:"50px"},onMouseEnter:()=>E(!0),onMouseLeave:()=>{E(!1)},children:[K,e.isMarkdown?c.jsx(c.Fragment,{children:s?c.jsx(ml,{value:q,preview:"edit",autoFocus:!0,onChange:X=>{y(X),R(X)},onBlur:()=>{G(),w||l()}}):c.jsx(h.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:q?c.jsx(h.Box,{onClick:u,sx:{cursor:"pointer"},children:c.jsx(ho,{children:q})}):c.jsxs(h.Box,{onClick:u,sx:{cursor:"pointer"},children:[c.jsx(h.Typography,{sx:{p:2,textAlign:"center",variant:"subtitle2",fontWeight:"medium"},children:"Markdown is empty"}),c.jsx(h.Typography,{sx:{mb:2,textAlign:"center",variant:"body2"},children:"Click to edit."})]})})}):c.jsxs(c.Fragment,{children:[c.jsx(h.Collapse,{in:g,timeout:"auto",unmountOnExit:!0,children:c.jsx(h.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:c.jsx(h.Typography,{component:"div",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},dangerouslySetInnerHTML:{__html:S}})})}),c.jsx(h.Collapse,{in:f,timeout:"auto",unmountOnExit:!0,children:c.jsx(h.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:c.jsx(h.Typography,{component:"div",className:"content",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},dangerouslySetInnerHTML:{__html:x}})})}),o&&(W?c.jsxs(c.Fragment,{children:[c.jsx(h.Typography,{sx:{p:2,textAlign:"center",variant:"subtitle2",fontWeight:"medium"},children:"No Model Imports"}),c.jsx(h.Typography,{sx:{mb:2,textAlign:"center",variant:"body2"},children:"Please add a model import above."})]}):c.jsx(Iy,{sourceAndPaths:i,onQueryChange:X=>{k(X)},cell:e,onSourceChange:B})),!o&&e.result&&c.jsx(Ie,{variant:"outlined",sx:{borderRadius:0},children:c.jsx(xa,{result:e.result,minHeight:300,maxHeight:800})}),!o&&!e.result&&c.jsxs(h.Box,{onClick:u,sx:{cursor:"pointer"},children:[c.jsx(h.Typography,{sx:{p:2,textAlign:"center",variant:"subtitle2",fontWeight:"medium"},children:"Explore is empty"}),c.jsx(h.Typography,{sx:{mb:2,textAlign:"center",variant:"body2"},children:"Click to edit."})]})]}),A&&ie]})}function Ty(e,t=2e3){const n=T.useRef(void 0);return T.useCallback(r=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{e(r)},t)},[e,t])}const Xa=T.createContext(void 0);function Ja({children:e,userContext:t,notebookStorage:n}){const r=T.useMemo(()=>({notebookStorage:n,userContext:t}),[n,t]);return c.jsx(Xa.Provider,{value:r,children:e})}function Qo(){const e=T.useContext(Xa);if(!e)throw new Error("useNotebookStorage must be used within a NotebookStorageProvider");return e}const jy=oe(c.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"})),Ey=oe(c.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"})),Ry=new fr(new Re);function _y({initialSelectedModels:e,onModelChange:t}){const{projectName:n,packageName:r,versionId:o}=Le(),{data:s,isLoading:i,isSuccess:a,isError:l,error:u}=Oe({queryKey:["models",n,r,o],queryFn:v=>Ry.listModels(n,r,o,v)}),[d,p]=T.useState(e||[]),[f,m]=T.useState(null);T.useEffect(()=>{p(e||[])},[e]);const g=v=>{const S=d.filter(C=>C!==v);p(S),t(S)},b=v=>{const S=[...d,v];p(S),t(S),m(null)};let x=[];return a&&s?.data&&(x=s.data.filter(v=>!d.includes(v.path)).map(v=>v.path)),l?c.jsx(_e,{error:u,context:`${n} > ${r} > Model Picker`}):c.jsxs(c.Fragment,{children:[c.jsxs(h.FormControl,{fullWidth:!0,children:[i&&c.jsx(h.Typography,{children:"Loading..."}),c.jsxs(h.Stack,{direction:"row",spacing:1,children:[d.map(v=>c.jsx(h.Chip,{label:v,onDelete:()=>g(v),deleteIcon:c.jsx(jy,{}),sx:{marginBottom:"5px"}},v)),c.jsx(h.Button,{size:"small",startIcon:c.jsx(Ey,{}),onClick:v=>m(v.currentTarget),disabled:i||l||x.length===0,children:"Add Model"})]})]}),c.jsxs(h.Menu,{anchorEl:f,open:!!f,onClose:()=>m(null),children:[c.jsx(h.Typography,{variant:"subtitle2",sx:{ml:1},children:"Models"}),c.jsx(h.Divider,{}),x.length===0?c.jsx(h.MenuItem,{disabled:!0,children:"No models available"}):x.map(v=>c.jsx(h.MenuItem,{onClick:()=>b(v),children:c.jsx(h.Typography,{variant:"body2",children:v})},v))]})]})}const Ay=new fr(new Re);function Oy({notebookPath:e,expandCodeCells:t,expandEmbeddings:n,hideEmbeddingIcons:r}){const o=Bo(),{projectName:s,packageName:i,versionId:a}=Le(),{server:l,getAccessToken:u}=Cr(),{notebookStorage:d,userContext:p}=Qo();if(!s||!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[f,m]=T.useState(),[g,b]=T.useState(),[x,v]=T.useState(),[S,C]=T.useState([]),[k,w]=T.useState(null),[E,O]=T.useState(null),B=!!k,q=()=>{w(null),O(null)},y=(Q,F)=>{f.insertCell(F,{isMarkdown:Q,value:""}),G(),Q?v(F):b(F),q()},[R,A]=T.useState(!1),L=()=>{A(!0)},$=Q=>{e&&d&&p&&d.deleteNotebook(p,e),A(!1),o(`/${s}/${i}`,Q)},W=()=>{A(!1)},G=T.useCallback(()=>{m(f.saveNotebook())},[f]);if(T.useEffect(()=>{if(!f)return;(async()=>{const F=new Map(S.map(({modelPath:he,sourceInfos:J})=>[he,J])),K=[],X=[];for(const he of f.getModels())F.has(he)?K.push({modelPath:he,sourceInfos:F.get(he)}):(console.log("Fetching model from Publisher",he),X.push(Ay.getModel(s,i,he,a,await Lo(l,u)).then(J=>({modelPath:he,sourceInfos:J.data.sourceInfos.map(D=>JSON.parse(D))}))));if(X.length>0){const he=await Promise.all(X);C([...K,...he])}else C(K)})()},[u,f,i,s,l,a]),T.useEffect(()=>{e&&m(ln.loadNotebook(d,p,e))},[e,d,p]),!f)return c.jsx("div",{children:"Loading..."});const se=Q=>{const F=[];for(const K of Q)for(const X of K.sourceInfos)F.push({modelPath:K.modelPath,sourceInfo:X});return F},ie=(Q,F)=>c.jsx(h.Button,{size:"small",startIcon:c.jsx(Bm,{}),onClick:()=>y(Q,F),variant:"contained",sx:{backgroundColor:"#fff",color:K=>K.palette.mode==="dark"?K.palette.grey[100]:K.palette.grey[700],boxShadow:"none","&:hover":{backgroundColor:K=>K.palette.mode==="dark"?K.palette.grey[500]:K.palette.grey[300],boxShadow:"none"}},children:Q?"Markdown":"Explore"}),H=c.jsxs(h.Box,{sx:{display:"flex",gap:1,justifyContent:"center",flex:2},children:[ie(!1,f.getCells().length),ie(!0,f.getCells().length)]});return c.jsxs(Ie,{variant:"outlined",children:[c.jsxs(qe,{children:[c.jsxs(Mt,{sx:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[c.jsxs(Mt,{direction:"row",spacing:1,alignItems:"center",children:[c.jsx(h.Typography,{variant:"overline",sx:{fontSize:"13px",fontWeight:"bold",verticalAlign:"middle"},children:"Workbook"}),c.jsx(h.Typography,{variant:"subtitle2",sx:{fontSize:"13px",fontWeight:"normal",verticalAlign:"middle",ml:1},children:`${s} > ${i} > ${e}`})]}),c.jsxs(Mt,{sx:{display:"flex",flexDirection:"row",gap:1},children:[c.jsx(h.Box,{sx:{display:"flex",alignItems:"center",mt:1,mb:1},children:c.jsx(Ny,{notebookData:f})}),c.jsxs(h.Box,{sx:{display:"flex",alignItems:"center",mt:1,mb:1},children:[c.jsx(h.Button,{color:"error",onClick:L,size:"small",children:"Delete"}),c.jsxs(h.Dialog,{open:R,onClose:W,children:[c.jsx(h.DialogTitle,{children:"Delete Notebook"}),c.jsx(h.DialogContent,{children:c.jsxs(h.DialogContentText,{children:['Are you sure you want to delete the notebook "',e,'"? This action cannot be undone.']})}),c.jsxs(h.DialogActions,{children:[c.jsx(h.Button,{onClick:W,color:"primary",size:"small",children:"Cancel"}),c.jsx(h.Button,{onClick:Q=>$(Q),color:"error",autoFocus:!0,size:"small",children:"Delete"})]})]})]})]})]}),c.jsx(h.Divider,{}),c.jsxs(Mt,{sx:{display:"flex",flexDirection:"row",width:"100%",mt:2},children:[c.jsx(h.Box,{sx:{flex:1},children:c.jsx(_y,{initialSelectedModels:f.getModels(),onModelChange:Q=>{m(f.setModels(Q)),G()}})}),c.jsx(h.Box,{sx:{flex:1}})]})]}),c.jsx(xr,{children:c.jsxs(Mt,{children:[f.getCells().length===0&&c.jsxs(c.Fragment,{children:[c.jsx(h.Typography,{sx:{textAlign:"center",p:2,variant:"subtitle2",fontWeight:"medium"},children:"Workbook is empty"}),c.jsx(h.Typography,{variant:"body2",sx:{textAlign:"center",mb:2,variant:"body2"},children:"Click the + buttons to add a markdown or code cell."})]}),f.getCells().map((Q,F)=>c.jsx(T.Fragment,{children:c.jsx(Py,{cell:Q,addButtonCallback:K=>ie(K,F),sourceAndPaths:se(S),expandCodeCell:t,expandEmbedding:n,hideEmbeddingIcons:r,editingMarkdown:x===F,editingMalloy:g===F,onDelete:()=>{m(f.deleteCell(F)),G()},onCellChange:K=>{m(f.setCell(F,K)),G()},onEdit:()=>{Q.isMarkdown?v(F):b(F)},onClose:()=>{Q.isMarkdown?v(void 0):b(void 0)}},`${F}-${Q.isMarkdown}-${e}-${s}-${i}`)},`${F}-${f.getCells().length}`)),H,c.jsxs(h.Menu,{anchorEl:k,open:B,onClose:q,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:[c.jsx(h.MenuItem,{onClick:()=>y(!0,E??0),children:"Add Markdown"}),c.jsx(h.MenuItem,{onClick:()=>y(!1,E??0),children:"Add Malloy"})]}),c.jsx(Mt,{sx:{flexDirection:"row",justifyContent:"flex-end",p:1}})]})})]})}function Ny({notebookData:e}){const[t,n]=T.useState(!1),r=async()=>{if(!e)return;const o=e.toMalloyNotebook();try{await navigator.clipboard.writeText(o),n(!0),setTimeout(()=>n(!1),1500)}catch{n(!1),alert("Failed to copy to clipboard")}};return c.jsx(h.Button,{color:"primary",onClick:r,size:"small",children:t?"Copied!":"Export"})}function Za({onNotebookClick:e}){const{notebookStorage:t,userContext:n}=Qo(),[r,o]=T.useState([]);return T.useEffect(()=>{t&&n&&o(t.listNotebooks(n))},[t,n]),c.jsxs(c.Fragment,{children:[c.jsx(h.Divider,{}),c.jsx(h.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:c.jsxs(h.List,{dense:!0,children:[r.length===0&&c.jsx(h.ListItem,{children:c.jsx(h.ListItemText,{primary:"No notebooks found.",sx:{textAlign:"center"}})}),r.map(s=>c.jsx(h.ListItem,{onClick:i=>e(s,i),sx:{cursor:"pointer","&:hover":{backgroundColor:"action.hover"}},children:c.jsx(h.ListItemText,{primary:s})},s))]})})]})}const My=new ki(new Re);function Ly(){const{projectName:e}=Xt(),{data:t,isSuccess:n,isError:r,error:o}=Oe({queryKey:["about",e],queryFn:s=>My.getProject(e,!1,s)});return c.jsxs(c.Fragment,{children:[!n&&!r&&c.jsx(Ae,{text:"Fetching About..."}),n&&c.jsxs(Ie,{variant:"outlined",sx:{p:2},children:[c.jsx(h.Typography,{variant:"overline",fontWeight:"bold",sx:{mb:1},children:"Readme"}),c.jsx(Ie,{sx:{p:1},children:c.jsx(ho,{children:t.data.readme})})]}),r&&c.jsx(_e,{error:o,context:`${e} > About`})]})}const Dy=new wi(new Re);function $y({navigate:e}){const{projectName:t}=Xt(),{data:n,isSuccess:r,isError:o,error:s}=Oe({queryKey:["packages",t],queryFn:i=>Dy.listPackages(t,i)});return c.jsxs(c.Fragment,{children:[!r&&!o&&c.jsx(Ae,{text:"Fetching Packages..."}),r&&c.jsxs(Ie,{variant:"outlined",sx:{p:2},children:[c.jsx(h.Typography,{variant:"overline",fontWeight:"bold",sx:{mb:1},children:"Packages"}),c.jsx(h.Grid,{container:!0,spacing:2,columns:12,children:n.data.sort((i,a)=>i.name.localeCompare(a.name)).map(i=>c.jsx(h.Grid,{size:{xs:12,sm:12,md:12,lg:4},children:c.jsx(Ie,{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:a=>e(i.name+"/",a),children:c.jsxs(qe,{children:[c.jsx(h.Typography,{variant:"overline",color:"primary.main",children:i.name}),c.jsx(h.Box,{sx:{maxHeight:"120px",overflowY:"auto"},children:c.jsx(h.Typography,{variant:"body2",children:i.description})})]})})},i.name))})]}),o&&c.jsx(_e,{error:s,context:`${t} > Packages`})]})}const el=T.createContext(void 0);function Xt(){const e=T.useContext(el);if(!e)throw new Error("useProject must be used within a ProjectProvider");return e}function By({children:e,projectName:t}){return c.jsx(el.Provider,{value:{projectName:t},children:e})}function qy({navigate:e}){return c.jsxs(h.Grid,{container:!0,spacing:2,columns:12,children:[c.jsx(h.Grid,{size:{xs:12,md:12},children:c.jsx($y,{navigate:e})}),c.jsx(h.Grid,{size:{xs:12,md:12},children:c.jsx(Ly,{})})]})}const Vy=oe(c.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"})),Fy=oe(c.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"})),ri=oe(c.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"})),zy=oe(c.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"})),Hy=oe(c.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"})),Uy=oe([c.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"),c.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")]),oi=oe(c.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"})),Gy=new ki(new Re),Wy=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 o=r.substring(0,120).split(" ");return o.pop(),o.join(" ")+"..."};function Ky({navigate:e}){const{data:t,isSuccess:n,isError:r,error:o}=Oe({queryKey:["projects"],queryFn:s=>Gy.listProjects(s)});return r?c.jsx(_e,{error:o,context:"Projects List"}):n?c.jsxs(h.Container,{maxWidth:"lg",sx:{py:4},children:[c.jsxs(h.Box,{sx:{textAlign:"center",mb:6},children:[c.jsxs(h.Stack,{direction:"row",justifyContent:"center",alignItems:"center",spacing:1,sx:{mb:2},children:[c.jsx(ri,{sx:{fontSize:32,color:"primary.main"}}),c.jsx(h.Typography,{variant:"h3",component:"h1",fontWeight:700,children:"Publisher"})]}),c.jsx(h.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"}),c.jsx(h.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."})]}),c.jsxs(h.Grid,{container:!0,spacing:3,sx:{mb:6},children:[c.jsx(h.Grid,{size:{xs:12,md:4},children:c.jsx(h.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:c.jsxs(h.CardContent,{sx:{p:3},children:[c.jsxs(h.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{mb:2},children:[c.jsx(Vy,{sx:{color:"info.main",fontSize:28}}),c.jsx(h.Typography,{variant:"h6",fontWeight:600,children:"Ad Hoc Analysis"})]}),c.jsx(h.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."}),c.jsx(h.Chip,{label:"No-code",size:"small",color:"primary",variant:"outlined"})]})})}),c.jsx(h.Grid,{size:{xs:12,md:4},children:c.jsx(h.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:c.jsxs(h.CardContent,{sx:{p:3},children:[c.jsxs(h.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{mb:2},children:[c.jsx(zy,{sx:{color:"warning.main",fontSize:28}}),c.jsx(h.Typography,{variant:"h6",fontWeight:600,children:"Notebook Dashboards"})]}),c.jsx(h.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."}),c.jsx(h.Chip,{label:"Versioned",size:"small",color:"warning",variant:"outlined"})]})})}),c.jsx(h.Grid,{size:{xs:12,md:4},children:c.jsx(h.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:c.jsxs(h.CardContent,{sx:{p:3},children:[c.jsxs(h.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{mb:2},children:[c.jsx(Uy,{sx:{color:"success.main",fontSize:28}}),c.jsx(h.Typography,{variant:"h6",fontWeight:600,children:"AI Data Agents"})]}),c.jsx(h.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."}),c.jsx(h.Chip,{label:"AI-Ready",size:"small",color:"success",variant:"outlined"})]})})})]}),c.jsx(h.Divider,{sx:{my:4}}),t.data.length>0?c.jsxs(c.Fragment,{children:[c.jsxs(h.Box,{sx:{textAlign:"center",mb:4},children:[c.jsxs(h.Stack,{direction:"row",justifyContent:"center",alignItems:"center",spacing:1,sx:{mb:2},children:[c.jsx(oi,{sx:{color:"primary.main",fontSize:24}}),c.jsx(h.Typography,{variant:"h4",fontWeight:600,children:"Select a Project"})]}),c.jsx(h.Typography,{variant:"body1",color:"text.secondary",children:"Choose a project to explore its semantic models and start analyzing your data"})]}),c.jsx(h.Grid,{container:!0,spacing:3,justifyContent:"center",children:t.data.map(s=>c.jsx(h.Grid,{size:{xs:12,sm:6,md:4},children:c.jsx(h.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(`/${s.name}/`,i),children:c.jsxs(h.CardContent,{sx:{p:3,textAlign:"center"},children:[c.jsx(Hy,{sx:{fontSize:48,color:"primary.main",mb:2}}),c.jsx(h.Typography,{variant:"h6",fontWeight:600,gutterBottom:!0,children:s.name}),c.jsx(h.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:Wy(s.readme)}),c.jsx(h.Button,{variant:"contained",color:"secondary",endIcon:c.jsx(Fy,{}),fullWidth:!0,children:"Open Project"})]})})},s.name))})]}):c.jsxs(h.Box,{sx:{textAlign:"center",mb:4},children:[c.jsxs(h.Stack,{direction:"row",justifyContent:"center",alignItems:"center",spacing:1,sx:{mb:2},children:[c.jsx(oi,{sx:{color:"primary.main",fontSize:24}}),c.jsx(h.Typography,{variant:"h4",fontWeight:600,children:"Get Started"})]}),c.jsx(h.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."}),c.jsx(h.Button,{variant:"contained",size:"large",color:"primary",startIcon:c.jsx(ri,{}),href:"https://github.com/malloydata/publisher/blob/main/README.md#server-configuration",target:"_blank",rel:"noopener noreferrer",children:"Learn How to Create Models"})]}),c.jsx(h.Box,{sx:{textAlign:"center",mt:6,pt:4,borderTop:1,borderColor:"divider"},children:c.jsxs(h.Typography,{variant:"body2",color:"text.secondary",children:["Publisher is built on fully open infrastructure and designed for the AI era. Join the"," ",c.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."]})})]}):c.jsx(Ae,{text:"Loading projects..."})}function Qy(){const{projectName:e,packageName:t}=si.useParams(),[n,r]=T.useState(""),[o,s]=T.useState(null),[i,a]=T.useState(!1),[l,u]=T.useState(!1),d=Bo(),p=!!o,f=S=>{s(S.currentTarget)},m=()=>{s(null)},g=()=>{u(!1)},b=()=>{a(!1)},x=(S,C)=>{u(!1),d(`/${e}/${t}/scratchNotebook/${encodeURIComponent(S)}`,C)},v=S=>{a(!1),d(`/${e}/${t}/scratchNotebook/${encodeURIComponent(n)}`,S),r("")};return!e||!t?null:c.jsxs(c.Fragment,{children:[c.jsx(h.Button,{"aria-controls":p?"basic-menu":void 0,"aria-haspopup":"true","aria-expanded":p?"true":void 0,onClick:f,variant:"contained",sx:{height:"40px",px:2,backgroundColor:"#fbbb04","&:hover":{backgroundColor:"#eab308"}},children:"Analyze Package"}),c.jsxs(h.Menu,{id:"basic-menu",anchorEl:o,open:p,onClose:m,MenuListProps:{"aria-labelledby":"basic-button",sx:{py:.5}},children:[c.jsxs(h.MenuItem,{onClick:()=>{a(!0),m()},sx:{py:1,px:2},children:[c.jsx(h.ListItemIcon,{children:c.jsx(Fn.Add,{fontSize:"small"})}),c.jsxs(h.ListItemText,{children:[c.jsx(h.Typography,{variant:"body2",fontWeight:500,children:"New Workbook"}),c.jsx(h.Typography,{variant:"caption",color:"text.secondary",children:"Create a new analysis workbook"})]})]}),c.jsxs(h.MenuItem,{onClick:()=>{u(!0),m()},sx:{py:1,px:2},children:[c.jsx(h.ListItemIcon,{children:c.jsx(Fn.Launch,{fontSize:"small"})}),c.jsxs(h.ListItemText,{children:[c.jsx(h.Typography,{variant:"body2",fontWeight:500,children:"Open Workbook"}),c.jsx(h.Typography,{variant:"caption",color:"text.secondary",children:"Open an existing workbook"})]})]})]}),c.jsxs(h.Dialog,{open:i,onClose:b,maxWidth:"sm",fullWidth:!0,children:[c.jsxs(h.DialogTitle,{sx:{pb:1,pt:2,px:2},children:[c.jsx(h.Typography,{variant:"h6",fontWeight:600,sx:{mb:.5},children:"Create New Workbook"}),c.jsx(h.Typography,{variant:"body2",color:"text.secondary",children:"Start a new analysis workbook to explore your data"})]}),c.jsx(h.DialogContent,{sx:{px:2,pb:2},children:c.jsxs(h.Stack,{spacing:2,sx:{mt:1},children:[c.jsx(h.FormControl,{fullWidth:!0,children:c.jsx(h.TextField,{label:"Workbook Name",value:n,onChange:S=>r(S.target.value),placeholder:"Enter workbook name...",fullWidth:!0,autoFocus:!0,size:"small"})}),c.jsxs(h.Stack,{direction:"row",spacing:1,justifyContent:"flex-end",children:[c.jsx(h.Button,{onClick:b,variant:"outlined",size:"small",children:"Cancel"}),c.jsx(h.Button,{onClick:S=>v(S),variant:"contained",disabled:!n.trim(),size:"small",children:"Create Workbook"})]})]})})]}),c.jsxs(h.Dialog,{open:l,onClose:g,maxWidth:"md",fullWidth:!0,children:[c.jsxs(h.DialogTitle,{sx:{pb:1,pt:2,px:2},children:[c.jsx(h.Typography,{variant:"h6",fontWeight:600,sx:{mb:.5},children:"Open Workbook"}),c.jsx(h.Typography,{variant:"body2",color:"text.secondary",children:"Select an existing workbook to continue your analysis"})]}),c.jsx(h.DialogContent,{sx:{px:2,pb:2},children:c.jsx(Ja,{notebookStorage:new Sa,userContext:{project:e,package:t},children:c.jsx(Za,{onNotebookClick:x})})})]})]})}const Yo=new Si(new Re);function Yy({connectionName:e}){const{projectName:t}=Xt(),[n,r]=T.useState(void 0),[o,s]=T.useState(null),[i,a]=T.useState(!1),{data:l,isSuccess:u,isError:d,error:p,isLoading:f}=Oe({queryKey:["tablePath",t,e],queryFn:m=>Yo.listSchemas(t,e,m)});return c.jsxs(h.Grid,{container:!0,spacing:2,children:[c.jsx(h.Grid,{size:{xs:12,md:6},children:c.jsxs(h.Paper,{sx:{p:2},children:[c.jsxs(h.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1},children:[c.jsx(h.Typography,{variant:"overline",fontWeight:"bold",children:"Table Paths"}),c.jsx(h.FormControlLabel,{control:c.jsx(h.Switch,{checked:i,onChange:m=>a(m.target.checked)}),label:"Hidden Schemas"})]}),c.jsx(h.Divider,{}),c.jsxs(h.Box,{sx:{mt:"10px",maxHeight:"600px",overflowY:"auto"},children:[f&&c.jsx(Ae,{text:"Fetching Table Paths..."}),d&&c.jsx(_e,{error:p,context:`${t} > ${e}`}),u&&l.data.length===0&&c.jsx(h.Typography,{variant:"body2",children:"No Schemas"}),u&&l.data.length>0&&c.jsx(h.List,{dense:!0,disablePadding:!0,children:l.data.filter(({isHidden:m})=>i||!m).sort((m,g)=>m.isDefault===g.isDefault?0:m.isDefault?-1:1).map(m=>c.jsx(h.ListItemButton,{selected:o===m.name,onClick:()=>s(m.name),children:c.jsx(h.ListItemText,{primary:m.name})},m.name))})]})]})}),c.jsx(h.Grid,{size:{xs:12,md:6},children:o&&c.jsx(h.Paper,{sx:{p:2},children:c.jsx(Jy,{connectionName:e,schemaName:o,onTableClick:m=>{r(m)}})})}),n&&c.jsx(Xy,{connectionName:e,schemaName:o,tableName:n,onClose:()=>r(void 0)})]})}function Xy({connectionName:e,schemaName:t,tableName:n,onClose:r}){const{projectName:o}=Xt(),{data:s,isSuccess:i,isError:a,error:l,isLoading:u}=Oe({queryKey:["tablePathSchema",o,e,t,n],queryFn:d=>Yo.getTablesource(o,e,n,`${t}.${n}`,d)});return i&&s&&console.log(s),c.jsxs(h.Dialog,{open:!0,onClose:r,maxWidth:"sm",fullWidth:!0,children:[c.jsxs(h.DialogTitle,{children:["Table: ",t,".",n,c.jsx(h.Typography,{fontSize:"large",variant:"body2",fontFamily:"monospace",component:"span",children:n}),c.jsx(h.IconButton,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8},children:c.jsx(h.Box,{sx:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:"X"})})]}),c.jsxs(h.DialogContent,{children:[u&&c.jsx(Ae,{text:"Fetching Table Details..."}),a&&c.jsx(_e,{error:l,context:`${o} > ${e} > ${t}.${n}`}),i&&s&&c.jsx(h.TableContainer,{children:c.jsxs(h.Table,{size:"small",sx:{"& .MuiTableCell-root":{padding:"10px"}},children:[c.jsx(h.TableHead,{children:c.jsxs(h.TableRow,{children:[c.jsx(h.TableCell,{children:"NAME"}),c.jsx(h.TableCell,{children:"TYPE"})]})}),c.jsx(h.TableBody,{children:s.data.columns?.map(d=>c.jsxs(h.TableRow,{children:[c.jsx(h.TableCell,{children:d.name}),c.jsx(h.TableCell,{children:d.type})]},d.name))})]})})]})]})}function Jy({connectionName:e,schemaName:t,onTableClick:n}){const{projectName:r}=Xt(),{data:o,isSuccess:s,isError:i,error:a,isLoading:l}=Oe({queryKey:["tablesInSchema",r,e,t],queryFn:u=>Yo.listTables(r,e,t,u)});return c.jsxs(c.Fragment,{children:[c.jsxs(h.Typography,{variant:"overline",fontWeight:"bold",children:["Tables in ",t]}),c.jsx(h.Divider,{}),c.jsxs(h.Box,{sx:{mt:"10px",maxHeight:"600px",overflowY:"auto"},children:[l&&c.jsx(Ae,{text:"Fetching Tables..."}),i&&c.jsx(_e,{error:a,context:`${r} > ${e} > ${t}`}),s&&o.data.length===0&&c.jsx(h.Typography,{variant:"body2",children:"No Tables"}),s&&o.data.length>0&&c.jsx(h.List,{dense:!0,disablePadding:!0,children:o.data.map(u=>c.jsx(h.ListItemButton,{onClick:()=>n(u),children:c.jsx(h.ListItemText,{primary:u})},u))})]})]})}de.defaults.baseURL="IfYouAreSeeingThis_baseURL_IsNotSet";exports.AnalyzePackageButton=Qy;exports.BrowserNotebookStorage=Sa;exports.ConnectionExplorer=Yy;exports.Home=Ky;exports.Loading=Ae;exports.Model=_m;exports.MutableNotebook=Oy;exports.MutableNotebookList=Za;exports.Notebook=va;exports.NotebookStorageProvider=Ja;exports.Package=wy;exports.PackageProvider=fa;exports.Project=qy;exports.ProjectProvider=By;exports.PublisherPackageProvider=fa;exports.QueryResult=ya;exports.ServerProvider=ky;exports.SourceExplorerComponent=$o;exports.SourcesExplorer=Do;exports.useNotebookStorage=Qo;exports.usePackage=Le;exports.useProject=Xt;exports.usePublisherPackage=Le;exports.useRouterClickHandler=Bo;exports.useServer=Cr;
|
|
108
|
+
`,yy=$.forwardRef(function(t,n){const r=Mr({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:s={},className:a,...o}=r,[u,l]=$.useState([]),d=$.useRef(0),c=$.useRef(null);$.useEffect(()=>{c.current&&(c.current(),c.current=null)},[u]);const m=$.useRef(!1),p=Rf(),g=$.useRef(null),b=$.useRef(null),T=$.useCallback(w=>{const{pulsate:D,rippleX:N,rippleY:B,rippleSize:Z,cb:J}=w;l(E=>[...E,h.jsx(xy,{classes:{ripple:Ye(s.ripple,Wt.ripple),rippleVisible:Ye(s.rippleVisible,Wt.rippleVisible),ripplePulsate:Ye(s.ripplePulsate,Wt.ripplePulsate),child:Ye(s.child,Wt.child),childLeaving:Ye(s.childLeaving,Wt.childLeaving),childPulsate:Ye(s.childPulsate,Wt.childPulsate)},timeout:Ko,pulsate:D,rippleX:N,rippleY:B,rippleSize:Z},d.current)]),d.current+=1,c.current=J},[s]),x=$.useCallback((w={},D={},N=()=>{})=>{const{pulsate:B=!1,center:Z=i||D.pulsate,fakeElement:J=!1}=D;if(w?.type==="mousedown"&&m.current){m.current=!1;return}w?.type==="touchstart"&&(m.current=!0);const E=J?null:b.current,L=E?E.getBoundingClientRect():{width:0,height:0,left:0,top:0};let O,z,M;if(Z||w===void 0||w.clientX===0&&w.clientY===0||!w.clientX&&!w.touches)O=Math.round(L.width/2),z=Math.round(L.height/2);else{const{clientX:K,clientY:se}=w.touches&&w.touches.length>0?w.touches[0]:w;O=Math.round(K-L.left),z=Math.round(se-L.top)}if(Z)M=Math.sqrt((2*L.width**2+L.height**2)/3),M%2===0&&(M+=1);else{const K=Math.max(Math.abs((E?E.clientWidth:0)-O),O)*2+2,se=Math.max(Math.abs((E?E.clientHeight:0)-z),z)*2+2;M=Math.sqrt(K**2+se**2)}w?.touches?g.current===null&&(g.current=()=>{T({pulsate:B,rippleX:O,rippleY:z,rippleSize:M,cb:N})},p.start(py,()=>{g.current&&(g.current(),g.current=null)})):T({pulsate:B,rippleX:O,rippleY:z,rippleSize:M,cb:N})},[i,T,p]),C=$.useCallback(()=>{x({},{pulsate:!0})},[x]),S=$.useCallback((w,D)=>{if(p.clear(),w?.type==="touchend"&&g.current){g.current(),g.current=null,p.start(0,()=>{S(w,D)});return}g.current=null,l(N=>N.length>0?N.slice(1):N),c.current=D},[p]);return $.useImperativeHandle(n,()=>({pulsate:C,start:x,stop:S}),[C,x,S]),h.jsx(Ey,{className:Ye(Wt.root,s.root,a),ref:b,...o,children:h.jsx(Hu,{component:null,exit:!0,children:u})})});function Ty(e){return Fr("MuiButtonBase",e)}const Cy=Br("MuiButtonBase",["root","disabled","focusVisible"]),Sy=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,a=Hi({root:["root",t&&"disabled",n&&"focusVisible"]},Ty,i);return n&&r&&(a.root+=` ${r}`),a},Ay=Be("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"},[`&.${Cy.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Iy=$.forwardRef(function(t,n){const r=Mr({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:s=!1,children:a,className:o,component:u="button",disabled:l=!1,disableRipple:d=!1,disableTouchRipple:c=!1,focusRipple:m=!1,focusVisibleClassName:p,LinkComponent:g="a",onBlur:b,onClick:T,onContextMenu:x,onDragLeave:C,onFocus:S,onFocusVisible:w,onKeyDown:D,onKeyUp:N,onMouseDown:B,onMouseLeave:Z,onMouseUp:J,onTouchEnd:E,onTouchMove:L,onTouchStart:O,tabIndex:z=0,TouchRippleProps:M,touchRippleRef:K,type:se,...fe}=r,pe=$.useRef(null),W=dy(),k=Os(W.ref,K),[ae,de]=$.useState(!1);l&&ae&&de(!1),$.useImperativeHandle(i,()=>({focusVisible:()=>{de(!0),pe.current.focus()}}),[]);const _=W.shouldMount&&!d&&!l;$.useEffect(()=>{ae&&m&&!d&&W.pulsate()},[d,m,ae,W]);const Ee=mn(W,"start",B,c),me=mn(W,"stop",x,c),q=mn(W,"stop",C,c),ie=mn(W,"stop",J,c),te=mn(W,"stop",oe=>{ae&&oe.preventDefault(),Z&&Z(oe)},c),we=mn(W,"start",O,c),ne=mn(W,"stop",E,c),U=mn(W,"stop",L,c),xe=mn(W,"stop",oe=>{_c(oe.target)||de(!1),b&&b(oe)},!1),je=xs(oe=>{pe.current||(pe.current=oe.currentTarget),_c(oe.target)&&(de(!0),w&&w(oe)),S&&S(oe)}),ce=()=>{const oe=pe.current;return u&&u!=="button"&&!(oe.tagName==="A"&&oe.href)},zt=xs(oe=>{m&&!oe.repeat&&ae&&oe.key===" "&&W.stop(oe,()=>{W.start(oe)}),oe.target===oe.currentTarget&&ce()&&oe.key===" "&&oe.preventDefault(),D&&D(oe),oe.target===oe.currentTarget&&ce()&&oe.key==="Enter"&&!l&&(oe.preventDefault(),T&&T(oe))}),mt=xs(oe=>{m&&oe.key===" "&&ae&&!oe.defaultPrevented&&W.stop(oe,()=>{W.pulsate(oe)}),N&&N(oe),T&&oe.target===oe.currentTarget&&ce()&&oe.key===" "&&!oe.defaultPrevented&&T(oe)});let Ce=u;Ce==="button"&&(fe.href||fe.to)&&(Ce=g);const st={};Ce==="button"?(st.type=se===void 0?"button":se,st.disabled=l):(!fe.href&&!fe.to&&(st.role="button"),l&&(st["aria-disabled"]=l));const at=Os(n,pe),Xe={...r,centerRipple:s,component:u,disabled:l,disableRipple:d,disableTouchRipple:c,focusRipple:m,tabIndex:z,focusVisible:ae},rn=Sy(Xe);return h.jsxs(Ay,{as:Ce,className:Ye(rn.root,o),ownerState:Xe,onBlur:xe,onClick:T,onContextMenu:me,onFocus:je,onKeyDown:zt,onKeyUp:mt,onMouseDown:Ee,onMouseLeave:te,onMouseUp:ie,onDragLeave:q,onTouchEnd:ne,onTouchMove:U,onTouchStart:we,ref:at,tabIndex:l?-1:z,type:se,...st,...fe,children:[a,_?h.jsx(yy,{ref:k,center:s,...M}):null]})});function mn(e,t,n,r=!1){return xs(i=>(n&&n(i),r||e[t](i),!0))}function ky(e){return Fr("PrivateSwitchBase",e)}Br("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);function _y(e){return typeof e=="string"}function vy(e,t,n){return e===void 0||_y(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function Dy(e,t,n){return typeof e=="function"?e(t,n):e}function wy(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 vc(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 Ny(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:s}=e;if(!t){const p=Ye(n?.className,s,i?.className,r?.className),g={...n?.style,...i?.style,...r?.style},b={...n,...i,...r};return p.length>0&&(b.className=p),Object.keys(g).length>0&&(b.style=g),{props:b,internalRef:void 0}}const a=wy({...i,...r}),o=vc(r),u=vc(i),l=t(a),d=Ye(l?.className,n?.className,s,i?.className,r?.className),c={...l?.style,...n?.style,...i?.style,...r?.style},m={...l,...n,...u,...o};return d.length>0&&(m.className=d),Object.keys(c).length>0&&(m.style=c),{props:m,internalRef:l.ref}}function Qo(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:s,internalForwardedProps:a,shouldForwardComponentProp:o=!1,...u}=t,{component:l,slots:d={[e]:void 0},slotProps:c={[e]:void 0},...m}=s,p=d[e]||r,g=Dy(c[e],i),{props:{component:b,...T},internalRef:x}=Ny({className:n,...u,externalForwardedProps:e==="root"?m:void 0,externalSlotProps:g}),C=Os(x,g?.ref,t.ref),S=e==="root"?b||l:b,w=vy(p,{...e==="root"&&!l&&!d[e]&&a,...e!=="root"&&!d[e]&&a,...T,...S&&!o&&{as:S},...S&&o&&{component:S},ref:C},i);return[p,w]}const Py=e=>{const{classes:t,checked:n,disabled:r,edge:i}=e,s={root:["root",n&&"checked",r&&"disabled",i&&`edge${tn(i)}`],input:["input"]};return Hi(s,ky,t)},Ry=Be(Iy)({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}}]}),Ly=Be("input",{shouldForwardProp:vu})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Oy=$.forwardRef(function(t,n){const{autoFocus:r,checked:i,checkedIcon:s,defaultChecked:a,disabled:o,disableFocusRipple:u=!1,edge:l=!1,icon:d,id:c,inputProps:m,inputRef:p,name:g,onBlur:b,onChange:T,onFocus:x,readOnly:C,required:S=!1,tabIndex:w,type:D,value:N,slots:B={},slotProps:Z={},...J}=t,[E,L]=ob({controlled:i,default:!!a}),O=cy(),z=me=>{x&&x(me),O&&O.onFocus&&O.onFocus(me)},M=me=>{b&&b(me),O&&O.onBlur&&O.onBlur(me)},K=me=>{if(me.nativeEvent.defaultPrevented)return;const q=me.target.checked;L(q),T&&T(me,q)};let se=o;O&&typeof se>"u"&&(se=O.disabled);const fe=D==="checkbox"||D==="radio",pe={...t,checked:E,disabled:se,disableFocusRipple:u,edge:l},W=Py(pe),k={slots:B,slotProps:{input:m,...Z}},[ae,de]=Qo("root",{ref:n,elementType:Ry,className:W.root,shouldForwardComponentProp:!0,externalForwardedProps:{...k,component:"span",...J},getSlotProps:me=>({...me,onFocus:q=>{me.onFocus?.(q),z(q)},onBlur:q=>{me.onBlur?.(q),M(q)}}),ownerState:pe,additionalProps:{centerRipple:!0,focusRipple:!u,disabled:se,role:void 0,tabIndex:null}}),[_,Ee]=Qo("input",{ref:p,elementType:Ly,className:W.input,externalForwardedProps:k,getSlotProps:me=>({...me,onChange:q=>{me.onChange?.(q),K(q)}}),ownerState:pe,additionalProps:{autoFocus:r,checked:i,defaultChecked:a,disabled:se,id:fe?c:void 0,name:g,readOnly:C,required:S,tabIndex:w,type:D,...D==="checkbox"&&N===void 0?{}:{value:N}}});return h.jsxs(ae,{...de,children:[h.jsx(_,{...Ee}),E?s:d]})}),Fy=Me(h.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"})),My=Me(h.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"})),By=Me(h.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 jy(e){return Fr("MuiCheckbox",e)}const eo=Br("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]);function Hy(e){return typeof e.main=="string"}function Uy(e,t=[]){if(!Hy(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function Dc(e=[]){return([,t])=>t&&Uy(t,e)}const zy=e=>{const{classes:t,indeterminate:n,color:r,size:i}=e,s={root:["root",n&&"indeterminate",`color${tn(r)}`,`size${tn(i)}`]},a=Hi(s,jy,t);return{...t,...a}},$y=Be(Oy,{shouldForwardProp:e=>vu(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${tn(n.size)}`],n.color!=="default"&&t[`color${tn(n.color)}`]]}})(Du(({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})`:No(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(Dc()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:No(e.palette[t].main,e.palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(Dc()).map(([t])=>({props:{color:t},style:{[`&.${eo.checked}, &.${eo.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${eo.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),qy=h.jsx(My,{}),Vy=h.jsx(Fy,{}),Wy=h.jsx(By,{}),Lf=$.forwardRef(function(t,n){const r=Mr({props:t,name:"MuiCheckbox"}),{checkedIcon:i=qy,color:s="primary",icon:a=Vy,indeterminate:o=!1,indeterminateIcon:u=Wy,inputProps:l,size:d="medium",disableRipple:c=!1,className:m,slots:p={},slotProps:g={},...b}=r,T=o?u:a,x=o?u:i,C={...r,disableRipple:c,color:s,indeterminate:o,size:d},S=zy(C),w=g.input??l,[D,N]=Qo("root",{ref:n,elementType:$y,className:Ye(S.root,m),shouldForwardComponentProp:!0,externalForwardedProps:{slots:p,slotProps:g,...b},ownerState:C,additionalProps:{type:"checkbox",icon:$.cloneElement(T,{fontSize:T.props.fontSize??d}),checkedIcon:$.cloneElement(x,{fontSize:x.props.fontSize??d}),disableRipple:c,slots:p,slotProps:{input:lb(typeof w=="function"?w(C):w,{"data-indeterminate":o})}}});return h.jsx(D,{...N,classes:S})});function Pr(...e){const t=$.useRef(void 0),n=$.useCallback(r=>{const i=e.map(s=>{if(s==null)return null;if(typeof s=="function"){const a=s,o=a(r);return typeof o=="function"?o:()=>{a(null)}}return s.current=r,()=>{s.current=null}});return()=>{i.forEach(s=>s?.())}},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 Gy(e){return typeof e=="string"}function Yy(e,t,n){return e===void 0||Gy(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function Vt(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 wc(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 Ky(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:s}=e;if(!t){const p=Ye(n?.className,s,i?.className,r?.className),g={...n?.style,...i?.style,...r?.style},b={...n,...i,...r};return p.length>0&&(b.className=p),Object.keys(g).length>0&&(b.style=g),{props:b,internalRef:void 0}}const a=Vt({...i,...r}),o=wc(r),u=wc(i),l=t(a),d=Ye(l?.className,n?.className,s,i?.className,r?.className),c={...l?.style,...n?.style,...i?.style,...r?.style},m={...l,...n,...u,...o};return d.length>0&&(m.className=d),Object.keys(c).length>0&&(m.style=c),{props:m,internalRef:l.ref}}function En(e,t,n){return typeof e=="function"?e(t,n):e}function Qn(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...s}=e,a=i?{}:En(n,r),{props:o,internalRef:u}=Ky({...s,externalSlotProps:a}),l=Pr(u,a?.ref,e.additionalProps?.ref);return Yy(t,{...o,ref:l},r)}function Of(e,t,n=void 0){const r={};for(const i in e){const s=e[i];let a="",o=!0;for(let u=0;u<s.length;u+=1){const l=s[u];l&&(a+=(o===!0?"":" ")+t(l),o=!1,n&&n[l]&&(a+=" "+n[l]))}r[i]=a}return r}function Ff(e){return Yx}const Mf=$.createContext(null);function Qy(e){const{value:t,children:n}=e;return h.jsx(Mf.Provider,{value:t,children:t.wrapRoot({children:n,instance:t.instance})})}const or=()=>{const e=$.useContext(Mf);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(`
|
|
109
|
+
`));return e},Xy=({props:e})=>{const{instance:t}=or(),{label:n,itemId:r}=e,[i,s]=$.useState(n),a=t.isItemBeingEdited(r);return $.useEffect(()=>{a||s(n)},[a,n]),{propsEnhancers:{labelInput:({externalEventHandlers:o,interactions:u})=>t.isItemEditable(r)?{value:i??"","data-element":"labelInput",onChange:p=>{o.onChange?.(p),s(p.target.value)},onKeyDown:p=>{if(o.onKeyDown?.(p),p.defaultMuiPrevented)return;const g=p.target;p.key==="Enter"&&g.value?u.handleSaveItemLabel(p,g.value):p.key==="Escape"&&u.handleCancelItemLabelEditing(p)},onBlur:p=>{o.onBlur?.(p),!p.defaultMuiPrevented&&p.target.value&&u.handleSaveItemLabel(p,p.target.value)},autoFocus:!0,type:"text"}:{}}}},Qt=({instance:e,state:t,setState:n,params:r})=>{const i=$.useRef(t.editedItemId),s=c=>i.current===c,a=c=>{n(m=>le({},m,{editedItemId:c})),i.current=c},o=c=>c===t.editedItemId,u=!!r.isItemEditable,l=c=>{if(c==null||!u)return!1;const m=e.getItem(c);return m?typeof r.isItemEditable=="function"?r.isItemEditable(m):!!r.isItemEditable:!1},d=(c,m)=>{if(!m)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.",c].join(`
|
|
110
|
+
`));n(p=>{const g=p.items.itemMetaMap[c];return g.label!==m?le({},p,{items:le({},p.items,{itemMetaMap:le({},p.items.itemMetaMap,{[c]:le({},g,{label:m})})})}):p}),r.onItemLabelChange&&r.onItemLabelChange(c,m)};return{instance:{setEditedItemId:a,isItemBeingEdited:o,updateItemLabel:d,isItemEditable:l,isTreeViewEditable:u,isItemBeingEditedRef:s},publicAPI:{updateItemLabel:d}}};Qt.itemPlugin=Xy;Qt.getDefaultizedParams=({params:e,experimentalFeatures:t})=>{const n=t?.labelEditing;return le({},e,{isItemEditable:n?e.isItemEditable??!1:!1})};Qt.getInitialState=()=>({editedItemId:null});Qt.params={onItemLabelChange:!0,isItemEditable:!0};const Zn=(e,t)=>e.getAvailablePlugins().has(t),Bf=e=>Array.isArray(e)?e.length>0&&e.some(Bf):!!e,Zy=({itemId:e,children:t})=>{const{instance:n,selection:{multiSelect:r},publicAPI:i}=or(),s={expandable:Bf(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=p=>{if(s.disabled)return;s.focused||n.focusItem(p,e);const g=r&&(p.shiftKey||p.ctrlKey||p.metaKey);s.expandable&&!(g&&n.isItemExpanded(e))&&n.toggleItemExpansion(p,e)},o=p=>{if(s.disabled)return;s.focused||n.focusItem(p,e),r&&(p.shiftKey||p.ctrlKey||p.metaKey)?p.shiftKey?n.expandSelectionRange(p,e):n.selectItem({event:p,itemId:e,keepExistingSelection:!0}):n.selectItem({event:p,itemId:e,shouldBeSelected:!0})},u=p=>{const g=p.nativeEvent.shiftKey;r&&g?n.expandSelectionRange(p,e):n.selectItem({event:p,itemId:e,keepExistingSelection:r,shouldBeSelected:p.target.checked})},l=()=>{Zn(n,Qt)&&n.isItemEditable(e)&&(n.isItemBeingEdited(e)?n.setEditedItemId(null):n.setEditedItemId(e))};return{interactions:{handleExpansion:a,handleSelection:o,handleCheckboxSelection:u,toggleItemEditing:l,handleSaveItemLabel:(p,g)=>{Zn(n,Qt)&&n.isItemBeingEditedRef(e)&&(n.updateItemLabel(e,g),l(),n.focusItem(p,e))},handleCancelItemLabelEditing:p=>{Zn(n,Qt)&&n.isItemBeingEditedRef(e)&&(l(),n.focusItem(p,e))}},status:s,publicAPI:i}},zu=$.createContext(()=>-1),jf=(e,t)=>{let n=t.length-1;for(;n>=0&&!e.isItemNavigable(t[n]);)n-=1;if(n!==-1)return t[n]},Hf=(e,t)=>{const n=e.getItemMeta(t),r=e.getItemOrderedChildrenIds(n.parentId),i=e.getItemIndex(t);if(i===0)return n.parentId;let s=i-1;for(;!e.isItemNavigable(r[s])&&s>=0;)s-=1;if(s===-1)return n.parentId==null?null:Hf(e,n.parentId);let a=r[s],o=jf(e,e.getItemOrderedChildrenIds(a));for(;e.isItemExpanded(a)&&o!=null;)a=o,o=e.getItemOrderedChildrenIds(a).find(e.isItemNavigable);return a},Cs=(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),i=e.getItemIndex(n.id);if(i<r.length-1){let s=i+1;for(;!e.isItemNavigable(r[s])&&s<r.length-1;)s+=1;if(e.isItemNavigable(r[s]))return r[s]}n=e.getItemMeta(n.parentId)}return null},Uf=e=>{let t=null;for(;t==null||e.isItemExpanded(t);){const n=e.getItemOrderedChildrenIds(t),r=jf(e,n);if(r==null)return t;t=r}return t},Oi=e=>e.getItemOrderedChildrenIds(null).find(e.isItemNavigable),zf=(e,t,n)=>{if(t===n)return[t,n];const r=e.getItemMeta(t),i=e.getItemMeta(n);if(r.parentId===i.id||i.parentId===r.id)return i.parentId===r.id?[r.id,i.id]:[i.id,r.id];const s=[r.id],a=[i.id];let o=r.parentId,u=i.parentId,l=a.indexOf(o)!==-1,d=s.indexOf(u)!==-1,c=!0,m=!0;for(;!d&&!l;)c&&(s.push(o),l=a.indexOf(o)!==-1,c=o!==null,!l&&c&&(o=e.getItemMeta(o).parentId)),m&&!l&&(a.push(u),d=s.indexOf(u)!==-1,m=u!==null,!d&&m&&(u=e.getItemMeta(u).parentId));const p=l?o:u,g=e.getItemOrderedChildrenIds(p),b=s[s.indexOf(p)-1],T=a[a.indexOf(p)-1];return g.indexOf(b)<g.indexOf(T)?[t,n]:[n,t]},Jy=(e,t,n)=>{const r=u=>{if(e.isItemExpandable(u)&&e.isItemExpanded(u))return e.getItemOrderedChildrenIds(u)[0];let l=e.getItemMeta(u);for(;l!=null;){const d=e.getItemOrderedChildrenIds(l.parentId),c=e.getItemIndex(l.id);if(c<d.length-1)return d[c+1];l=e.getItemMeta(l.parentId)}throw new Error("Invalid range")},[i,s]=zf(e,t,n),a=[i];let o=i;for(;o!==s;)o=r(o),e.isItemDisabled(o)||a.push(o);return a},e3=e=>{let t=Oi(e);const n=[];for(;t!=null;)n.push(t),t=Cs(e,t);return n},Fi=(e,t)=>t!==e.closest('*[role="treeitem"]');let Nc=0;const t3=()=>(Nc+=1,`mui-tree-view-${Nc}`),$u=({id:e,treeId:t="",itemId:n})=>e??`${t}-${n}`,n3=e=>{const{runItemPlugins:t,items:{onItemClick:n,disabledItemsFocusable:r,indentationAtItemLevel:i},selection:{disableSelection:s,checkboxSelection:a},expansion:{expansionTrigger:o},treeId:u,instance:l,publicAPI:d}=or(),c=$.useContext(zu),{id:m,itemId:p,label:g,children:b,rootRef:T}=e,{rootRef:x,contentRef:C,propsEnhancers:S}=t(e),{interactions:w,status:D}=Zy({itemId:p,children:b}),N=$.useRef(null),B=$.useRef(null),Z=Pr(T,x,N),J=Pr(C,B),E=$.useRef(null),L=$u({itemId:p,treeId:u,id:m}),O=l.canItemBeTabbed(p)?0:-1,z={rootRefObject:N,contentRefObject:B,interactions:w},M=ne=>U=>{if(ne.onFocus?.(U),U.defaultMuiPrevented)return;const xe=!D.disabled||r;!D.focused&&xe&&U.currentTarget===U.target&&l.focusItem(U,p)},K=ne=>U=>{if(ne.onBlur?.(U),U.defaultMuiPrevented)return;const xe=l.getItemDOMElement(p);D.editing||U.relatedTarget&&Fi(U.relatedTarget,xe)&&(U.target&&U.target?.dataset?.element==="labelInput"&&Fi(U.target,xe)||U.relatedTarget?.dataset?.element==="labelInput")||l.removeFocusedItem()},se=ne=>U=>{ne.onKeyDown?.(U),!(U.defaultMuiPrevented||U.target?.dataset?.element==="labelInput")&&l.handleItemKeyDown(U,p)},fe=ne=>U=>{ne.onDoubleClick?.(U),!U.defaultMuiPrevented&&w.toggleItemEditing()},pe=ne=>U=>{ne.onClick?.(U),n?.(U,p),!(U.defaultMuiPrevented||E.current?.contains(U.target))&&(o==="content"&&w.handleExpansion(U),a||w.handleSelection(U))},W=ne=>U=>{ne.onMouseDown?.(U),!U.defaultMuiPrevented&&(U.shiftKey||U.ctrlKey||U.metaKey||D.disabled)&&U.preventDefault()},k=ne=>U=>{ne.onChange?.(U),!U.defaultMuiPrevented&&(s||D.disabled||w.handleCheckboxSelection(U))},ae=ne=>U=>{ne.onClick?.(U),!U.defaultMuiPrevented&&o==="iconContainer"&&w.handleExpansion(U)};return{getRootProps:(ne={})=>{const U=le({},Vt(e),Vt(ne));let xe;D.selected?xe=!0:s||D.disabled?xe=void 0:xe=!1;const je=le({},U,{ref:Z,role:"treeitem",tabIndex:O,id:L,"aria-expanded":D.expandable?D.expanded:void 0,"aria-selected":xe,"aria-disabled":D.disabled||void 0},ne,{onFocus:M(U),onBlur:K(U),onKeyDown:se(U)});i&&(je.style={"--TreeView-itemDepth":typeof c=="function"?c(p):c});const ce=S.root?.(le({},z,{externalEventHandlers:U}))??{};return le({},je,ce)},getContentProps:(ne={})=>{const U=Vt(ne),xe=le({},U,ne,{ref:J,onClick:pe(U),onMouseDown:W(U),status:D});i&&(xe.indentationAtItemLevel=!0);const je=S.content?.(le({},z,{externalEventHandlers:U}))??{};return le({},xe,je)},getGroupTransitionProps:(ne={})=>{const U=Vt(ne),xe=le({},U,{unmountOnExit:!0,component:"ul",role:"group",in:D.expanded,children:b},ne);return i&&(xe.indentationAtItemLevel=!0),xe},getIconContainerProps:(ne={})=>{const U=Vt(ne);return le({},U,ne,{onClick:ae(U)})},getCheckboxProps:(ne={})=>{const U=Vt(ne);return le({},U,{visible:a,ref:E,checked:D.selected,disabled:s||D.disabled,tabIndex:-1},ne,{onChange:k(U)})},getLabelProps:(ne={})=>{const U=le({},Vt(ne)),xe=le({},U,{children:g},ne,{onDoubleClick:fe(U)});return l.isTreeViewEditable&&(xe.editable=D.editable),xe},getLabelInputProps:(ne={})=>{const U=Vt(ne),xe=S.labelInput?.({rootRefObject:N,contentRefObject:B,externalEventHandlers:U,interactions:w})??{};return le({},ne,xe)},getDragAndDropOverlayProps:(ne={})=>{const U=Vt(ne),xe=S.dragAndDropOverlay?.(le({},z,{externalEventHandlers:U}))??{};return le({},ne,xe)},rootRef:Z,status:D,publicAPI:d}},r3=n3;function $f(e){const{instance:t,items:{onItemClick:n},selection:{multiSelect:r,checkboxSelection:i,disableSelection:s},expansion:{expansionTrigger:a}}=or(),o=t.isItemExpandable(e),u=t.isItemExpanded(e),l=t.isItemFocused(e),d=t.isItemSelected(e),c=t.isItemDisabled(e),m=t?.isItemBeingEdited?t?.isItemBeingEdited(e):!1,p=t.isItemEditable?t.isItemEditable(e):!1,g=D=>{if(!c){l||t.focusItem(D,e);const N=r&&(D.shiftKey||D.ctrlKey||D.metaKey);o&&!(N&&t.isItemExpanded(e))&&t.toggleItemExpansion(D,e)}},b=D=>{c||(l||t.focusItem(D,e),r&&(D.shiftKey||D.ctrlKey||D.metaKey)?D.shiftKey?t.expandSelectionRange(D,e):t.selectItem({event:D,itemId:e,keepExistingSelection:!0}):t.selectItem({event:D,itemId:e,shouldBeSelected:!0}))},T=D=>{if(s||c)return;const N=D.nativeEvent.shiftKey;r&&N?t.expandSelectionRange(D,e):t.selectItem({event:D,itemId:e,keepExistingSelection:r,shouldBeSelected:D.target.checked})},x=D=>{(D.shiftKey||D.ctrlKey||D.metaKey||c)&&D.preventDefault()},C=()=>{Zn(t,Qt)&&t.isItemEditable(e)&&(t.isItemBeingEdited(e)?t.setEditedItemId(null):t.setEditedItemId(e))};return{disabled:c,expanded:u,selected:d,focused:l,editable:p,editing:m,disableSelection:s,checkboxSelection:i,handleExpansion:g,handleSelection:b,handleCheckboxSelection:T,handleContentClick:n,preventSelection:x,expansionTrigger:a,toggleItemEditing:C,handleSaveItemLabel:(D,N)=>{Zn(t,Qt)&&t.isItemBeingEditedRef(e)&&(t.updateItemLabel(e,N),C(),t.focusItem(D,e))},handleCancelItemLabelEditing:D=>{Zn(t,Qt)&&t.isItemBeingEditedRef(e)&&(C(),t.focusItem(D,e))}}}const i3=Be("div",{name:"MuiTreeItem2DragAndDropOverlay",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>We.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})`:We.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 s3(e){return e.action==null?null:h.jsx(i3,le({},e))}const a3=Be("input",{name:"MuiTreeItem2",slot:"LabelInput",overridesResolver:(e,t)=>t.labelInput})(({theme:e})=>le({},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}`}})),o3=["classes","className","displayIcon","expansionIcon","icon","label","itemId","onClick","onMouseDown","dragAndDropOverlayProps","labelInputProps"],qf=$.forwardRef(function(t,n){const{classes:r,className:i,displayIcon:s,expansionIcon:a,icon:o,label:u,itemId:l,onClick:d,onMouseDown:c,dragAndDropOverlayProps:m,labelInputProps:p}=t,g=Cn(t,o3),{disabled:b,expanded:T,selected:x,focused:C,editing:S,editable:w,disableSelection:D,checkboxSelection:N,handleExpansion:B,handleSelection:Z,handleCheckboxSelection:J,handleContentClick:E,preventSelection:L,expansionTrigger:O,toggleItemEditing:z}=$f(l),M=o||a||s,K=$.useRef(null),se=W=>{L(W),c&&c(W)},fe=W=>{E?.(W,l),!K.current?.contains(W.target)&&(O==="content"&&B(W),N||Z(W),d&&d(W))},pe=W=>{W.defaultMuiPrevented||z()};return h.jsxs("div",le({},g,{className:Ye(r.root,i,T&&r.expanded,x&&r.selected,C&&r.focused,b&&r.disabled,S&&r.editing,w&&r.editable),onClick:fe,onMouseDown:se,ref:n,children:[h.jsx("div",{className:r.iconContainer,children:M}),N&&h.jsx(Lf,{className:r.checkbox,checked:x,onChange:J,disabled:b||D,ref:K,tabIndex:-1}),S?h.jsx(a3,le({},p,{className:r.labelInput})):h.jsx("div",le({className:r.label},w&&{onDoubleClick:pe},{children:u})),m&&h.jsx(s3,le({},m))]}))}),Pc=e=>e,u3=()=>{let e=Pc;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Pc}}},l3=u3(),c3={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 qu(e,t,n="Mui"){const r=c3[t];return r?`${n}-${r}`:`${l3.generate(e)}-${t}`}function Vf(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=qu(e,i,n)}),r}function d3(e){return qu("MuiTreeItem",e)}const gn=Vf("MuiTreeItem",["root","groupTransition","content","expanded","selected","focused","disabled","iconContainer","label","checkbox","labelInput","editable","editing","dragAndDropOverlay"]),Wf=Me(h.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),Gf=Me(h.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}));function Vu(e){const{children:t,itemId:n}=e,{wrapItem:r,instance:i}=or();return r({children:t,itemId:n,instance:i})}Vu.propTypes={children:Fl.node,itemId:Fl.string.isRequired};const h3=["children","className","slots","slotProps","ContentComponent","ContentProps","itemId","id","label","onClick","onMouseDown","onFocus","onBlur","onKeyDown"],f3=["ownerState"],p3=["ownerState"],m3=["ownerState"],g3=Ff(),b3=e=>{const{classes:t}=e;return Of({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"]},d3,t)},E3=Be("li",{name:"MuiTreeItem",slot:"Root",overridesResolver:(e,t)=>t.root})({listStyle:"none",margin:0,padding:0,outline:0}),x3=Be(qf,{name:"MuiTreeItem",slot:"Content",overridesResolver:(e,t)=>[t.content,t.iconContainer&&{[`& .${gn.iconContainer}`]:t.iconContainer},t.label&&{[`& .${gn.label}`]:t.label}],shouldForwardProp:e=>Mn(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"}},[`&.${gn.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,backgroundColor:"transparent"},[`&.${gn.focused}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${gn.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:We.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}))`:We.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})`:We.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${gn.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:We.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`& .${gn.iconContainer}`]:{width:16,display:"flex",flexShrink:0,justifyContent:"center","& svg":{fontSize:18}},[`& .${gn.label}`]:le({width:"100%",boxSizing:"border-box",minWidth:0,position:"relative"},e.typography.body1),[`& .${gn.checkbox}`]:{padding:0},variants:[{props:{indentationAtItemLevel:!0},style:{paddingLeft:`calc(${e.spacing(1)} + var(--TreeView-itemChildrenIndentation) * var(--TreeView-itemDepth))`}}]})),y3=Be(Li,{name:"MuiTreeItem",slot:"GroupTransition",overridesResolver:(e,t)=>t.groupTransition,shouldForwardProp:e=>Mn(e)&&e!=="indentationAtItemLevel"})({margin:0,padding:0,paddingLeft:"var(--TreeView-itemChildrenIndentation)",variants:[{props:{indentationAtItemLevel:!0},style:{paddingLeft:0}}]}),T3=$.forwardRef(function(t,n){const{icons:r,runItemPlugins:i,items:{disabledItemsFocusable:s,indentationAtItemLevel:a},selection:{disableSelection:o},expansion:{expansionTrigger:u},treeId:l,instance:d}=or(),c=$.useContext(zu),m=g3({props:t,name:"MuiTreeItem"}),{children:p,className:g,slots:b,slotProps:T,ContentComponent:x=qf,ContentProps:C,itemId:S,id:w,label:D,onClick:N,onMouseDown:B,onBlur:Z,onKeyDown:J}=m,E=Cn(m,h3),{expanded:L,focused:O,selected:z,disabled:M,editing:K,handleExpansion:se,handleCancelItemLabelEditing:fe,handleSaveItemLabel:pe}=$f(S),{contentRef:W,rootRef:k,propsEnhancers:ae}=i(m),de=$.useRef(null),_=$.useRef(null),Ee=Pr(n,k,de),me=Pr(C?.ref,W,_),q={expandIcon:b?.expandIcon??r.slots.expandIcon??Wf,collapseIcon:b?.collapseIcon??r.slots.collapseIcon??Gf,endIcon:b?.endIcon??r.slots.endIcon,icon:b?.icon,groupTransition:b?.groupTransition},ie=ue=>Array.isArray(ue)?ue.length>0&&ue.some(ie):!!ue,te=ie(p),we=le({},m,{expanded:L,focused:O,selected:z,disabled:M,indentationAtItemLevel:a}),ne=b3(we),U=q.groupTransition??void 0,xe=Qn({elementType:U,ownerState:{},externalSlotProps:T?.groupTransition,additionalProps:le({unmountOnExit:!0,in:L,component:"ul",role:"group"},a?{indentationAtItemLevel:!0}:{}),className:ne.groupTransition}),je=ue=>{u==="iconContainer"&&se(ue)},ce=L?q.collapseIcon:q.expandIcon,zt=Qn({elementType:ce,ownerState:{},externalSlotProps:ue=>L?le({},En(r.slotProps.collapseIcon,ue),En(T?.collapseIcon,ue)):le({},En(r.slotProps.expandIcon,ue),En(T?.expandIcon,ue)),additionalProps:{onClick:je}}),mt=Cn(zt,f3),Ce=te&&ce?h.jsx(ce,le({},mt)):null,st=te?void 0:q.endIcon,at=Qn({elementType:st,ownerState:{},externalSlotProps:ue=>te?{}:le({},En(r.slotProps.endIcon,ue),En(T?.endIcon,ue))}),Xe=Cn(at,p3),rn=st?h.jsx(st,le({},Xe)):null,oe=q.icon,Qr=Qn({elementType:oe,ownerState:{},externalSlotProps:T?.icon}),Xr=Cn(Qr,m3),ze=oe?h.jsx(oe,le({},Xr)):null;let H;z?H=!0:o||M?H=void 0:H=!1;function ee(ue){!O&&(!M||s)&&ue.currentTarget===ue.target&&d.focusItem(ue,S)}function ge(ue){Z?.(ue),!(K||ue.relatedTarget&&Fi(ue.relatedTarget,de.current)&&(ue.target&&ue.target?.dataset?.element==="labelInput"&&Fi(ue.target,de.current)||ue.relatedTarget?.dataset?.element==="labelInput"))&&d.removeFocusedItem()}const Se=ue=>{J?.(ue),ue.target?.dataset?.element!=="labelInput"&&d.handleItemKeyDown(ue,S)},ve=$u({itemId:S,treeId:l,id:w}),gt=d.canItemBeTabbed(S)?0:-1,ct={rootRefObject:de,contentRefObject:_,interactions:{handleSaveItemLabel:pe,handleCancelItemLabelEditing:fe}},wt=ae.root?.(le({},ct,{externalEventHandlers:Vt(E)}))??{},$t=ae.content?.(le({},ct,{externalEventHandlers:Vt(C)}))??{},Y=ae.dragAndDropOverlay?.(le({},ct,{externalEventHandlers:{}}))??{},re=ae.labelInput?.(le({},ct,{externalEventHandlers:{}}))??{};return h.jsx(Vu,{itemId:S,children:h.jsxs(E3,le({className:Ye(ne.root,g),role:"treeitem","aria-expanded":te?L:void 0,"aria-selected":H,"aria-disabled":M||void 0,id:ve,tabIndex:gt},E,{ownerState:we,onFocus:ee,onBlur:ge,onKeyDown:Se,ref:Ee,style:a?le({},E.style,{"--TreeView-itemDepth":typeof c=="function"?c(S):c}):E.style},wt,{children:[h.jsx(x3,le({as:x,classes:{root:ne.content,expanded:ne.expanded,selected:ne.selected,focused:ne.focused,disabled:ne.disabled,editable:ne.editable,editing:ne.editing,iconContainer:ne.iconContainer,label:ne.label,labelInput:ne.labelInput,checkbox:ne.checkbox},label:D,itemId:S,onClick:N,onMouseDown:B,icon:ze,expansionIcon:Ce,displayIcon:rn,ownerState:we},C,$t,Y.action==null?{}:{dragAndDropOverlayProps:Y},re.value==null?{}:{labelInputProps:re},{ref:me})),p&&h.jsx(y3,le({as:U},xe,{children:p}))]}))})});function C3(e){const{slots:t,slotProps:n,status:r}=e,i=or(),s=le({},i.icons.slots,{expandIcon:i.icons.slots.expandIcon??Wf,collapseIcon:i.icons.slots.collapseIcon??Gf}),a=i.icons.slotProps;let o;t?.icon?o="icon":r.expandable?r.expanded?o="collapseIcon":o="expandIcon":o="endIcon";const u=t?.[o]??s[o],l=Qn({elementType:u,externalSlotProps:d=>le({},En(a[o],d),En(n?.[o],d)),ownerState:{}});return u?h.jsx(u,le({},l)):null}const S3=["visible"],A3=Be("li",{name:"MuiTreeItem2",slot:"Root",overridesResolver:(e,t)=>t.root})({listStyle:"none",margin:0,padding:0,outline:0}),I3=Be("div",{name:"MuiTreeItem2",slot:"Content",overridesResolver:(e,t)=>t.content,shouldForwardProp:e=>Mn(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})`:We.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}))`:We.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})`:We.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}))`:We.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}]})),k3=Be("div",{name:"MuiTreeItem2",slot:"Label",overridesResolver:(e,t)=>t.label,shouldForwardProp:e=>Mn(e)&&e!=="editable"})(({theme:e})=>le({width:"100%",boxSizing:"border-box",minWidth:0,position:"relative",overflow:"hidden"},e.typography.body1,{variants:[{props:({editable:t})=>t,style:{paddingLeft:"2px"}}]})),_3=Be("div",{name:"MuiTreeItem2",slot:"IconContainer",overridesResolver:(e,t)=>t.iconContainer})({width:16,display:"flex",flexShrink:0,justifyContent:"center","& svg":{fontSize:18}});Be(Li,{name:"MuiTreeItem2",slot:"GroupTransition",overridesResolver:(e,t)=>t.groupTransition,shouldForwardProp:e=>Mn(e)&&e!=="indentationAtItemLevel"})({margin:0,padding:0,paddingLeft:"var(--TreeView-itemChildrenIndentation)",variants:[{props:{indentationAtItemLevel:!0},style:{paddingLeft:0}}]});Be($.forwardRef((e,t)=>{const{visible:n}=e,r=Cn(e,S3);return n?h.jsx(Lf,le({},r,{ref:t})):null}),{name:"MuiTreeItem2",slot:"Checkbox",overridesResolver:(e,t)=>t.checkbox})({padding:0});function v3(e){return qu("MuiRichTreeView",e)}Vf("MuiRichTreeView",["root"]);const D3=(e,t)=>{const n=$.useRef({}),[r,i]=$.useState(()=>{const a={};return e.forEach(o=>{o.models&&Object.entries(o.models).forEach(([u,l])=>{n.current[u]={isControlled:t[u]!==void 0,getDefaultValue:l.getDefaultValue},a[u]=l.getDefaultValue(t)})}),a});return Object.fromEntries(Object.entries(n.current).map(([a,o])=>{const u=t[a]??r[a];return[a,{value:u,setControlledValue:l=>{o.isControlled||i(d=>le({},d,{[a]:l}))}}]}))};class w3{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(t,n,r={}){let i=this.events[t];i||(i={highPriority:new Map,regular:new Map},this.events[t]=i),r.isFirst?i.highPriority.set(n,!0):i.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 i=Array.from(r.highPriority.keys()),s=Array.from(r.regular.keys());for(let a=i.length-1;a>=0;a-=1){const o=i[a];r.highPriority.has(o)&&o.apply(this,n)}for(let a=0;a<s.length;a+=1){const o=s[a];r.regular.has(o)&&o.apply(this,n)}}once(t,n){const r=this;this.on(t,function i(...s){r.removeListener(t,i),n.apply(r,s)})}}const N3=e=>e.isPropagationStopped!==void 0,Yf=()=>{const[e]=$.useState(()=>new w3),t=$.useCallback((...r)=>{const[i,s,a={}]=r;a.defaultMuiPrevented=!1,!(N3(a)&&a.isPropagationStopped())&&e.emit(i,s,a)},[e]),n=$.useCallback((r,i)=>(e.on(r,i),()=>{e.removeListener(r,i)}),[e]);return{instance:{$$publishEvent:t,$$subscribeEvent:n}}};Yf.params={};const Kf=({plugins:e})=>{const t=new Set(e);return{instance:{getAvailablePlugins:()=>t}}};Kf.params={};const Wu=({params:e,state:t,setState:n})=>{$.useEffect(()=>{n(i=>i.id.treeId===e.id&&i.id.treeId!==void 0?i:le({},i,{id:le({},i.id,{treeId:e.id??t3()})}))},[n,e.id]);const r=e.id??t.id.treeId;return{getRootProps:()=>({id:r}),contextValue:{treeId:r}}};Wu.params={id:!0};Wu.getInitialState=({id:e})=>({id:{treeId:e??void 0}});const P3=[Yf,Kf,Wu],R3=["slots","slotProps","apiRef","experimentalFeatures"],L3=e=>{let{props:{slots:t,slotProps:n,apiRef:r,experimentalFeatures:i},plugins:s}=e,a=Cn(e.props,R3);const o={};s.forEach(m=>{Object.assign(o,m.params)});const u={},l={};Object.keys(a).forEach(m=>{const p=a[m];o[m]?u[m]=p:l[m]=p});const d=i??{},c=s.reduce((m,p)=>p.getDefaultizedParams?p.getDefaultizedParams({params:m,experimentalFeatures:d}):m,u);return{apiRef:r,forwardedProps:l,pluginParams:c,slots:t??{},slotProps:n??{},experimentalFeatures:d}},O3=({plugins:e,instance:t,publicAPI:n,rootRef:r})=>({runItemPlugins:o=>{let u=null,l=null;const d=[],c={};e.forEach(g=>{if(!g.itemPlugin)return;const b=g.itemPlugin({props:o,rootRef:u,contentRef:l});b?.rootRef&&(u=b.rootRef),b?.contentRef&&(l=b.contentRef),b?.propsEnhancers&&(d.push(b.propsEnhancers),Object.keys(b.propsEnhancers).forEach(T=>{c[T]=!0}))});const m=g=>b=>{const T={};return d.forEach(x=>{const C=x[g];C!=null&&Object.assign(T,C(b))}),T},p=Object.fromEntries(Object.keys(c).map(g=>[g,m(g)]));return{contentRef:l,rootRef:u,propsEnhancers:p}},wrapItem:({itemId:o,children:u})=>{let l=u;for(let d=e.length-1;d>=0;d-=1){const c=e[d];c.wrapItem&&(l=c.wrapItem({itemId:o,children:l,instance:t}))}return l},wrapRoot:({children:o})=>{let u=o;for(let l=e.length-1;l>=0;l-=1){const d=e[l];d.wrapRoot&&(u=d.wrapRoot({children:u,instance:t}))}return u},instance:t,rootRef:r,publicAPI:n});function F3(e){const t=$.useRef({});return e?(e.current==null&&(e.current={}),e.current):t.current}const M3=({plugins:e,rootRef:t,props:n})=>{const r=[...P3,...e],{pluginParams:i,forwardedProps:s,apiRef:a,experimentalFeatures:o,slots:u,slotProps:l}=L3({plugins:r,props:n}),d=D3(r,i),m=$.useRef({}).current,p=F3(a),g=$.useRef(null),b=Pr(g,t),T=O3({plugins:r,instance:m,publicAPI:p,rootRef:g}),[x,C]=$.useState(()=>{const N={};return r.forEach(B=>{B.getInitialState&&Object.assign(N,B.getInitialState(i))}),N}),S=[],w=N=>{const B=N({instance:m,params:i,slots:u,slotProps:l,experimentalFeatures:o,state:x,setState:C,rootRef:g,models:d,plugins:r});B.getRootProps&&S.push(B.getRootProps),B.publicAPI&&Object.assign(p,B.publicAPI),B.instance&&Object.assign(m,B.instance),B.contextValue&&Object.assign(T,B.contextValue)};return r.forEach(w),{getRootProps:(N={})=>{const B=le({role:"tree"},s,N,{ref:b});return S.forEach(Z=>{Object.assign(B,Z(N))}),B},rootRef:b,contextValue:T,instance:m}},B3=(e,t,n)=>{e.$$publishEvent(t,n)},Cr="__TREE_VIEW_ROOT_PARENT_ID__",j3=e=>{const t={};return e.forEach((n,r)=>{t[n]=r}),t},H3=["children"],Qf=({items:e,isItemDisabled:t,getItemLabel:n,getItemId:r})=>{const i={},s={},a={[Cr]:[]},o=(l,d,c)=>{const m=r?r(l):l.id;if(m==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(l)].join(`
|
|
111
|
+
`));if(i[m]!=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: "${m}"`].join(`
|
|
112
|
+
`));const p=n?n(l):l.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(l)].join(`
|
|
113
|
+
`));i[m]={id:m,label:p,parentId:c,idAttribute:void 0,expandable:!!l.children?.length,disabled:t?t(l):!1,depth:d},s[m]=l;const g=c??Cr;a[g]||(a[g]=[]),a[g].push(m),l.children?.forEach(b=>o(b,d+1,m))};e.forEach(l=>o(l,0,null));const u={};return Object.keys(a).forEach(l=>{u[l]=j3(a[l])}),{itemMetaMap:i,itemMap:s,itemOrderedChildrenIds:a,itemChildrenIndexes:u}},Ki=({instance:e,params:t,state:n,setState:r,experimentalFeatures:i})=>{const s=$.useCallback(x=>n.items.itemMetaMap[x],[n.items.itemMetaMap]),a=$.useCallback(x=>n.items.itemMap[x],[n.items.itemMap]),o=$.useCallback(()=>{const x=C=>{const S=n.items.itemMap[C],w=Cn(S,H3),D=n.items.itemOrderedChildrenIds[C];return D&&(w.children=D.map(x)),w};return n.items.itemOrderedChildrenIds[Cr].map(x)},[n.items.itemMap,n.items.itemOrderedChildrenIds]),u=$.useCallback(x=>{if(x==null)return!1;let C=e.getItemMeta(x);if(!C)return!1;if(C.disabled)return!0;for(;C.parentId!=null;)if(C=e.getItemMeta(C.parentId),C.disabled)return!0;return!1},[e]),l=$.useCallback(x=>{const C=e.getItemMeta(x).parentId??Cr;return n.items.itemChildrenIndexes[C][x]},[e,n.items.itemChildrenIndexes]),d=$.useCallback(x=>n.items.itemOrderedChildrenIds[x??Cr]??[],[n.items.itemOrderedChildrenIds]),c=x=>{const C=e.getItemMeta(x);return C==null?null:document.getElementById($u({treeId:n.id.treeId,itemId:x,id:C.idAttribute}))},m=x=>t.disabledItemsFocusable?!0:!e.isItemDisabled(x),p=$.useRef(!1),g=$.useCallback(()=>{p.current=!0},[]),b=$.useCallback(()=>p.current,[]);return $.useEffect(()=>{e.areItemUpdatesPrevented()||r(x=>{const C=Qf({items:t.items,isItemDisabled:t.isItemDisabled,getItemId:t.getItemId,getItemLabel:t.getItemLabel});return Object.values(x.items.itemMetaMap).forEach(S=>{C.itemMetaMap[S.id]||B3(e,"removeItem",{id:S.id})}),le({},x,{items:C})})},[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:c,getItemTree:o,getItemOrderedChildrenIds:d},instance:{getItemMeta:s,getItem:a,getItemTree:o,getItemsToRender:()=>{const x=C=>{const S=n.items.itemMetaMap[C];return{label:S.label,itemId:S.id,id:S.idAttribute,children:n.items.itemOrderedChildrenIds[C]?.map(x)}};return n.items.itemOrderedChildrenIds[Cr].map(x)},getItemIndex:l,getItemDOMElement:c,getItemOrderedChildrenIds:d,isItemDisabled:u,isItemNavigable:m,preventItemUpdates:g,areItemUpdatesPrevented:b},contextValue:{items:{onItemClick:t.onItemClick,disabledItemsFocusable:t.disabledItemsFocusable,indentationAtItemLevel:i.indentationAtItemLevel??!1}}}};Ki.getInitialState=e=>({items:Qf({items:e.items,isItemDisabled:e.isItemDisabled,getItemId:e.getItemId,getItemLabel:e.getItemLabel})});Ki.getDefaultizedParams=({params:e})=>le({},e,{disabledItemsFocusable:e.disabledItemsFocusable??!1,itemChildrenIndentation:e.itemChildrenIndentation??"12px"});Ki.wrapRoot=({children:e,instance:t})=>h.jsx(zu.Provider,{value:n=>t.getItemMeta(n)?.depth??0,children:e});Ki.params={disabledItemsFocusable:!0,items:!0,isItemDisabled:!0,getItemLabel:!0,getItemId:!0,onItemClick:!0,itemChildrenIndentation:!0};const U3=typeof window<"u"?$.useLayoutEffect:$.useEffect;function _r(e){const t=$.useRef(e);return U3(()=>{t.current=e}),$.useRef((...n)=>(0,t.current)(...n)).current}const Aa=({instance:e,params:t,models:n})=>{const r=$.useMemo(()=>{const c=new Map;return n.expandedItems.value.forEach(m=>{c.set(m,!0)}),c},[n.expandedItems.value]),i=(c,m)=>{t.onExpandedItemsChange?.(c,m),n.expandedItems.setControlledValue(m)},s=$.useCallback(c=>r.has(c),[r]),a=$.useCallback(c=>!!e.getItemMeta(c)?.expandable,[e]),o=_r((c,m)=>{const p=e.isItemExpanded(m);e.setItemExpansion(c,m,!p)}),u=_r((c,m,p)=>{if(e.isItemExpanded(m)===p)return;let b;p?b=[m].concat(n.expandedItems.value):b=n.expandedItems.value.filter(T=>T!==m),t.onItemExpansionToggle&&t.onItemExpansionToggle(c,m,p),i(c,b)}),l=(c,m)=>{const p=e.getItemMeta(m),b=e.getItemOrderedChildrenIds(p.parentId).filter(x=>e.isItemExpandable(x)&&!e.isItemExpanded(x)),T=n.expandedItems.value.concat(b);b.length>0&&(t.onItemExpansionToggle&&b.forEach(x=>{t.onItemExpansionToggle(c,x,!0)}),i(c,T))},d=$.useMemo(()=>t.expansionTrigger?t.expansionTrigger:e.isTreeViewEditable?"iconContainer":"content",[t.expansionTrigger,e.isTreeViewEditable]);return{publicAPI:{setItemExpansion:u},instance:{isItemExpanded:s,isItemExpandable:a,setItemExpansion:u,toggleItemExpansion:o,expandAllSiblings:l},contextValue:{expansion:{expansionTrigger:d}}}};Aa.models={expandedItems:{getDefaultValue:e=>e.defaultExpandedItems}};const z3=[];Aa.getDefaultizedParams=({params:e})=>le({},e,{defaultExpandedItems:e.defaultExpandedItems??z3});Aa.params={expandedItems:!0,defaultExpandedItems:!0,onExpandedItemsChange:!0,onItemExpansionToggle:!0,expansionTrigger:!0};const Ss=e=>Array.isArray(e)?e:e!=null?[e]:[],to=e=>{const t={};return e.forEach(n=>{t[n]=!0}),t},Ia=({instance:e,params:t,models:n})=>{const r=$.useRef(null),i=$.useRef({}),s=$.useMemo(()=>{const b=new Map;return Array.isArray(n.selectedItems.value)?n.selectedItems.value.forEach(T=>{b.set(T,!0)}):n.selectedItems.value!=null&&b.set(n.selectedItems.value,!0),b},[n.selectedItems.value]),a=(b,T)=>{if(t.onItemSelectionToggle)if(t.multiSelect){const x=T.filter(S=>!e.isItemSelected(S)),C=n.selectedItems.value.filter(S=>!T.includes(S));x.forEach(S=>{t.onItemSelectionToggle(b,S,!0)}),C.forEach(S=>{t.onItemSelectionToggle(b,S,!1)})}else T!==n.selectedItems.value&&(n.selectedItems.value!=null&&t.onItemSelectionToggle(b,n.selectedItems.value,!1),T!=null&&t.onItemSelectionToggle(b,T,!0));t.onSelectedItemsChange&&t.onSelectedItemsChange(b,T),n.selectedItems.setControlledValue(T)},o=b=>s.has(b),u=({event:b,itemId:T,keepExistingSelection:x=!1,shouldBeSelected:C})=>{if(t.disableSelection)return;let S;if(x){const w=Ss(n.selectedItems.value),D=e.isItemSelected(T);D&&(C===!1||C==null)?S=w.filter(N=>N!==T):!D&&(C===!0||C==null)?S=[T].concat(w):S=w}else C===!1||C==null&&e.isItemSelected(T)?S=t.multiSelect?[]:null:S=t.multiSelect?[T]:T;a(b,S),r.current=T,i.current={}},l=(b,[T,x])=>{if(t.disableSelection||!t.multiSelect)return;let C=Ss(n.selectedItems.value).slice();Object.keys(i.current).length>0&&(C=C.filter(N=>!i.current[N]));const S=to(C),w=Jy(e,T,x),D=w.filter(N=>!S[N]);C=C.concat(D),a(b,C),i.current=to(w)};return{getRootProps:()=>({"aria-multiselectable":t.multiSelect}),publicAPI:{selectItem:u},instance:{isItemSelected:o,selectItem:u,selectAllNavigableItems:b=>{if(t.disableSelection||!t.multiSelect)return;const T=e3(e);a(b,T),i.current=to(T)},expandSelectionRange:(b,T)=>{if(r.current!=null){const[x,C]=zf(e,T,r.current);l(b,[x,C])}},selectRangeFromStartToItem:(b,T)=>{l(b,[Oi(e),T])},selectRangeFromItemToEnd:(b,T)=>{l(b,[T,Uf(e)])},selectItemFromArrowNavigation:(b,T,x)=>{if(t.disableSelection||!t.multiSelect)return;let C=Ss(n.selectedItems.value).slice();Object.keys(i.current).length===0?(C.push(x),i.current={[T]:!0,[x]:!0}):(i.current[T]||(i.current={}),i.current[x]?(C=C.filter(S=>S!==T),delete i.current[T]):(C.push(x),i.current[x]=!0)),a(b,C)}},contextValue:{selection:{multiSelect:t.multiSelect,checkboxSelection:t.checkboxSelection,disableSelection:t.disableSelection}}}};Ia.models={selectedItems:{getDefaultValue:e=>e.defaultSelectedItems}};const $3=[];Ia.getDefaultizedParams=({params:e})=>le({},e,{disableSelection:e.disableSelection??!1,multiSelect:e.multiSelect??!1,checkboxSelection:e.checkboxSelection??!1,defaultSelectedItems:e.defaultSelectedItems??(e.multiSelect?$3:null)});Ia.params={disableSelection:!0,multiSelect:!0,checkboxSelection:!0,defaultSelectedItems:!0,selectedItems:!0,onSelectedItemsChange:!0,onItemSelectionToggle:!0};function q3(e){return e&&e.ownerDocument||document}const Rc=1e3;class V3{constructor(t=Rc){this.timeouts=new Map,this.cleanupTimeout=Rc,this.cleanupTimeout=t}register(t,n,r){this.timeouts||(this.timeouts=new Map);const i=setTimeout(()=>{typeof n=="function"&&n(),this.timeouts.delete(r.cleanupToken)},this.cleanupTimeout);this.timeouts.set(r.cleanupToken,i)}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 W3{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 G3{}function Y3(e){let t=0;return function(r,i,s){e.registry===null&&(e.registry=typeof FinalizationRegistry<"u"?new W3:new V3);const[a]=$.useState(new G3),o=$.useRef(null),u=$.useRef(void 0);u.current=s;const l=$.useRef(null);if(!o.current&&u.current){const d=(c,m)=>{m.defaultMuiPrevented||u.current?.(c,m)};o.current=r.$$subscribeEvent(i,d),t+=1,l.current={cleanupToken:t},e.registry.register(a,()=>{o.current?.(),o.current=null,l.current=null},l.current)}else!u.current&&o.current&&(o.current(),o.current=null,l.current&&(e.registry.unregister(l.current),l.current=null));$.useEffect(()=>{if(!o.current&&u.current){const d=(c,m)=>{m.defaultMuiPrevented||u.current?.(c,m)};o.current=r.$$subscribeEvent(i,d)}return l.current&&e.registry&&(e.registry.unregister(l.current),l.current=null),()=>{o.current?.(),o.current=null}},[r,i])}}const K3={registry:null},Q3=Y3(K3),Xf=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?Xf(t.shadowRoot):t:null},X3=(e,t)=>{let n=Ss(t).find(r=>{if(!e.isItemNavigable(r))return!1;const i=e.getItemMeta(r);return i&&(i.parentId==null||e.isItemExpanded(i.parentId))});return n==null&&(n=Oi(e)),n},Gu=({instance:e,params:t,state:n,setState:r,models:i,rootRef:s})=>{const a=X3(e,i.selectedItems.value),o=_r(T=>{const x=typeof T=="function"?T(n.focusedItemId):T;n.focusedItemId!==x&&r(C=>le({},C,{focusedItemId:x}))}),u=$.useCallback(()=>!!s.current&&s.current.contains(Xf(q3(s.current))),[s]),l=$.useCallback(T=>n.focusedItemId===T&&u(),[n.focusedItemId,u]),d=T=>{const x=e.getItemMeta(T);return x&&(x.parentId==null||e.isItemExpanded(x.parentId))},c=(T,x)=>{const C=e.getItemDOMElement(x);C&&C.focus(),o(x),t.onItemFocus&&t.onItemFocus(T,x)},m=_r((T,x)=>{d(x)&&c(T,x)}),p=_r(()=>{if(n.focusedItemId==null)return;if(e.getItemMeta(n.focusedItemId)){const x=e.getItemDOMElement(n.focusedItemId);x&&x.blur()}o(null)}),g=T=>T===a;Q3(e,"removeItem",({id:T})=>{n.focusedItemId===T&&c(null,a)});const b=T=>x=>{T.onFocus?.(x),!x.defaultMuiPrevented&&x.target===x.currentTarget&&c(x,a)};return{getRootProps:T=>({onFocus:b(T)}),publicAPI:{focusItem:m},instance:{isItemFocused:l,canItemBeTabbed:g,focusItem:m,removeFocusedItem:p}}};Gu.getInitialState=()=>({focusedItemId:null});Gu.params={onItemFocus:!0};function Z3(e){return!!e&&e.length===1&&!!e.match(/\S/)}const Zf=({instance:e,params:t,state:n})=>{const r=lg(),i=$.useRef({}),s=_r(d=>{i.current=d(i.current)});$.useEffect(()=>{if(e.areItemUpdatesPrevented())return;const d={},c=m=>{d[m.id]=m.label.substring(0,1).toLowerCase()};Object.values(n.items.itemMetaMap).forEach(c),i.current=d},[n.items.itemMetaMap,t.getItemId,e]);const a=(d,c)=>{const m=c.toLowerCase(),p=x=>{const C=Cs(e,x);return C===null?Oi(e):C};let g=null,b=p(d);const T={};for(;g==null&&!T[b];)i.current[b]===m?g=b:(T[b]=!0,b=p(b));return g},o=d=>!t.disableSelection&&!e.isItemDisabled(d),u=d=>!e.isItemDisabled(d)&&e.isItemExpandable(d);return{instance:{updateFirstCharMap:s,handleItemKeyDown:(d,c)=>{if(d.defaultMuiPrevented||d.altKey||Fi(d.target,d.currentTarget))return;const m=d.ctrlKey||d.metaKey,p=d.key;switch(!0){case(p===" "&&o(c)):{d.preventDefault(),t.multiSelect&&d.shiftKey?e.expandSelectionRange(d,c):e.selectItem({event:d,itemId:c,keepExistingSelection:t.multiSelect,shouldBeSelected:t.multiSelect?void 0:!0});break}case p==="Enter":{Zn(e,Qt)&&e.isItemEditable(c)&&!e.isItemBeingEdited(c)?e.setEditedItemId(c):u(c)?(e.toggleItemExpansion(d,c),d.preventDefault()):o(c)&&(t.multiSelect?(d.preventDefault(),e.selectItem({event:d,itemId:c,keepExistingSelection:!0})):e.isItemSelected(c)||(e.selectItem({event:d,itemId:c}),d.preventDefault()));break}case p==="ArrowDown":{const g=Cs(e,c);g&&(d.preventDefault(),e.focusItem(d,g),t.multiSelect&&d.shiftKey&&o(g)&&e.selectItemFromArrowNavigation(d,c,g));break}case p==="ArrowUp":{const g=Hf(e,c);g&&(d.preventDefault(),e.focusItem(d,g),t.multiSelect&&d.shiftKey&&o(g)&&e.selectItemFromArrowNavigation(d,c,g));break}case(p==="ArrowRight"&&!r||p==="ArrowLeft"&&r):{if(m)return;if(e.isItemExpanded(c)){const g=Cs(e,c);g&&(e.focusItem(d,g),d.preventDefault())}else u(c)&&(e.toggleItemExpansion(d,c),d.preventDefault());break}case(p==="ArrowLeft"&&!r||p==="ArrowRight"&&r):{if(m)return;if(u(c)&&e.isItemExpanded(c))e.toggleItemExpansion(d,c),d.preventDefault();else{const g=e.getItemMeta(c).parentId;g&&(e.focusItem(d,g),d.preventDefault())}break}case p==="Home":{o(c)&&t.multiSelect&&m&&d.shiftKey?e.selectRangeFromStartToItem(d,c):e.focusItem(d,Oi(e)),d.preventDefault();break}case p==="End":{o(c)&&t.multiSelect&&m&&d.shiftKey?e.selectRangeFromItemToEnd(d,c):e.focusItem(d,Uf(e)),d.preventDefault();break}case p==="*":{e.expandAllSiblings(d,c),d.preventDefault();break}case(String.fromCharCode(d.keyCode)==="A"&&m&&t.multiSelect&&!t.disableSelection):{e.selectAllNavigableItems(d),d.preventDefault();break}case(!m&&!d.shiftKey&&Z3(p)):{const g=a(c,p);g!=null&&(e.focusItem(d,g),d.preventDefault());break}}}}}};Zf.params={};const Jf=({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}}}});Jf.params={};const J3=[Ki,Aa,Ia,Gu,Zf,Jf,Qt],eT=["ownerState"];function tT({slots:e,slotProps:t,label:n,id:r,itemId:i,itemsToRender:s}){const a=e?.item??T3,o=Qn({elementType:a,externalSlotProps:t?.item,additionalProps:{itemId:i,id:r,label:n},ownerState:{itemId:i,label:n}}),u=Cn(o,eT),l=$.useMemo(()=>s?h.jsx(ep,{itemsToRender:s,slots:e,slotProps:t}):null,[s,e,t]);return h.jsx(a,le({},u,{children:l}))}function ep(e){const{itemsToRender:t,slots:n,slotProps:r}=e;return h.jsx($.Fragment,{children:t.map(i=>h.jsx(tT,{slots:n,slotProps:r,label:i.label,id:i.id,itemId:i.itemId,itemsToRender:i.children},i.itemId))})}const nT=Ff(),rT=e=>{const{classes:t}=e;return Of({root:["root"]},v3,t)},iT=Be("ul",{name:"MuiRichTreeView",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,margin:0,listStyle:"none",outline:0,position:"relative"}),sT=$.forwardRef(function(t,n){const r=nT({props:t,name:"MuiRichTreeView"}),{getRootProps:i,contextValue:s,instance:a}=M3({plugins:J3,rootRef:n,props:r}),{slots:o,slotProps:u}=r,l=rT(r),d=o?.root??iT,c=Qn({elementType:d,externalSlotProps:u?.root,className:l.root,getSlotProps:i,ownerState:r});return h.jsx(Qy,{value:s,children:h.jsx(d,le({},c,{children:h.jsx(ep,{slots:o,slotProps:u,itemsToRender:a.getItemsToRender()})}))})}),aT=Me(h.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"})),oT=Me([h.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"),h.jsx("path",{d:"M14 17H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"},"1")]),uT=Me(h.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"})),lT=Me(h.jsx("path",{d:"M15 4v2h3v12h-3v2h5V4zM4 20h5v-2H6V6h3V4H4z"}));function tp({items:e,defaultExpandedItems:t,navigate:n}){return h.jsx(sT,{items:pT(e,n),defaultExpandedItems:t,slots:{item:fT}})}const cT=ch.animated(Li);function dT(e){const t=ch.useSpring({to:{opacity:e.in?1:0,transform:`translate3d(0,${e.in?0:20}px,0)`}});return h.jsx(cT,{style:t,...e})}function hT({item:e,...t}){const n=h.jsxs(k3,{...t,sx:{display:"flex",alignItems:"center",color:e.error?"error.main":"grey.600"},children:[e.fileType==="directory"&&h.jsx(aT,{})||e.fileType==="notebook"&&h.jsx(oT,{})||e.fileType==="model"&&h.jsx(lT,{})||e.fileType=="database"&&h.jsx(uT,{})||h.jsx(Df,{}),h.jsx(y.Typography,{variant:"body2",sx:{marginLeft:"5px"},color:e.error?"error.main":e.link?"primary.main":"grey.600",children:e.label})]});return e.error?h.jsx(y.Tooltip,{title:e.error,placement:"right",children:n}):n}const fT=$.forwardRef(function(t,n){const{id:r,itemId:i,label:s,children:a,disabled:o,...u}=t,{getRootProps:l,getContentProps:d,getLabelProps:c,getIconContainerProps:m,getGroupTransitionProps:p,status:g,publicAPI:b}=r3({id:r,itemId:i,children:a,label:s,disabled:o,rootRef:n}),T=b.getItem(i);return g.selected=!1,g.focused=!1,h.jsx(Vu,{itemId:i,children:h.jsxs(A3,{...l(u),children:[h.jsxs(I3,{...d(),...T.link&&{onClick:x=>T.link(x)},sx:{pointerEvents:!T.selectable&&"none"},children:[h.jsx(_3,{...m(),children:h.jsx(C3,{status:g})}),h.jsx(hT,{...c({item:T})})]}),a&&h.jsx(dT,{...p()})]})})});function pT(e,t){const n=new Map;return e.map(r=>{let i=n;const s=r.path.split("/");s.forEach((a,o)=>{o===s.length-1?i.set(a,r):(i.has(a)||i.set(a,new Map),i=i.get(a))})}),np(n,"",t)}function np(e,t,n){const r=[];return e.forEach((i,s)=>{const a=s.endsWith(".malloy")&&"model"||s.endsWith(".malloynb")&&"notebook"||s.endsWith(".parquet")&&"database"||"unknown";if(a!=="unknown"){const o=i;r.push({id:t+s,label:s,fileType:a,link:a==="model"||a==="notebook"?u=>n(t+s,u):void 0,selectable:a==="model"||a==="notebook",error:"error"in o?o.error:void 0})}else t+=`${s}/`,r.push({id:t,label:s,fileType:"directory",selectable:!0,link:void 0,children:np(i,t,n)})}),r}const mT=new ga(new xt),gT=["notebooks/","models/"];function bT({navigate:e}){const{projectName:t,packageName:n,versionId:r}=yt(),{data:i,isError:s,error:a,isSuccess:o}=St({queryKey:["models",t,n,r],queryFn:u=>mT.listModels(t,n,r,u)});return h.jsx(ut,{variant:"outlined",sx:{width:"100%"},children:h.jsxs(Ut,{children:[h.jsx(y.Typography,{variant:"overline",fontWeight:"bold",children:"Semantic Models"}),h.jsx(y.Divider,{}),h.jsxs(y.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!o&&!s&&h.jsx(Ct,{text:"Fetching Models..."}),s&&h.jsx(Tt,{error:a,context:`${t} > ${n} > Models`}),o&&i.data.length>0&&h.jsx(tp,{items:i.data.sort((u,l)=>u.path.localeCompare(l.path)),navigate:e,defaultExpandedItems:gT}),o&&i.data.length===0&&h.jsx(y.Typography,{variant:"body2",children:"No models found"})]})]})})}const ET=new kh(new xt),xT=["notebooks/"];function yT({navigate:e}){const{projectName:t,packageName:n,versionId:r}=yt(),{data:i,isError:s,error:a,isSuccess:o}=St({queryKey:["notebooks",t,n,r],queryFn:u=>ET.listNotebooks(t,n,r,u)});return h.jsx(ut,{variant:"outlined",sx:{width:"100%"},children:h.jsxs(Ut,{children:[h.jsx(y.Typography,{variant:"overline",fontWeight:"bold",children:"Notebooks"}),h.jsx(y.Divider,{}),h.jsxs(y.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!o&&!s&&h.jsx(Ct,{text:"Fetching Notebooks..."}),s&&h.jsx(Tt,{error:a,context:`${t} > ${n} > Notebooks`}),o&&i.data.length>0&&h.jsx(tp,{items:i.data.sort((u,l)=>u.path.localeCompare(l.path)),defaultExpandedItems:xT,navigate:e}),o&&i.data.length===0&&h.jsx(y.Typography,{variant:"body2",children:"No notebooks found"})]})]})})}const TT=new Sb(new xt);function CT(){const{projectName:e,packageName:t,versionId:n}=yt(),{data:r,isError:i,isLoading:s,error:a}=St({queryKey:["schedules",e,t,n],queryFn:o=>TT.listSchedules(e,t,n,o)});return s?h.jsx(Ct,{text:"Fetching Schedules..."}):i?h.jsx(Tt,{error:a,context:`${e} > ${t} > Schedules`}):r.data.length?h.jsx(ut,{variant:"outlined",sx:{padding:"10px",width:"100%"},children:h.jsxs(Ut,{children:[h.jsx(y.Typography,{variant:"overline",fontWeight:"bold",children:"Scheduler"}),h.jsx(y.Divider,{}),h.jsx(y.Box,{sx:{mt:"10px",maxHeight:"200px",overflowY:"auto"},children:h.jsx(y.TableContainer,{component:y.Paper,children:h.jsxs(y.Table,{sx:{minWidth:300},size:"small",children:[h.jsx(y.TableHead,{children:h.jsxs(y.TableRow,{children:[h.jsx(y.TableCell,{align:"left",children:"Resource"}),h.jsx(y.TableCell,{align:"left",children:"Schedule"}),h.jsx(y.TableCell,{align:"left",children:"Action"}),h.jsx(y.TableCell,{align:"left",children:"Connection"}),h.jsx(y.TableCell,{align:"left",children:"Last Run"}),h.jsx(y.TableCell,{align:"left",children:"Status"})]})}),h.jsx(y.TableBody,{children:r.data.map(o=>h.jsxs(y.TableRow,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[h.jsx(y.TableCell,{align:"left",children:o.resource}),h.jsx(y.TableCell,{align:"left",children:o.schedule}),h.jsx(y.TableCell,{align:"left",children:o.action}),h.jsx(y.TableCell,{align:"left",children:o.connection}),h.jsx(y.TableCell,{align:"left",children:o.lastRunTime?new Date(o.lastRunTime).toLocaleString():"n/a"}),h.jsx(y.TableCell,{align:"left",children:o.lastRunStatus})]},o.resource))})]})})})]})}):null}const ST="README.malloynb";function AT({navigate:e}){return e||(e=t=>{window.location.href=t}),h.jsxs(y.Grid,{container:!0,spacing:2,columns:12,children:[h.jsx(y.Grid,{size:{xs:12,md:4},children:h.jsx(Bx,{})}),h.jsx(y.Grid,{size:{xs:12,md:4},children:h.jsx(yT,{navigate:e})}),h.jsx(y.Grid,{size:{xs:12,md:4},children:h.jsx(bT,{navigate:e})}),h.jsx(y.Grid,{size:{xs:12,md:6},children:h.jsx($x,{})}),h.jsx(y.Grid,{size:{xs:12,md:6},children:h.jsx(Ux,{})}),h.jsx(y.Grid,{size:{xs:12,md:12},children:h.jsx(CT,{})}),h.jsx(y.Grid,{size:{xs:12,md:12},children:h.jsx(vf,{notebookPath:ST,hideEmbeddingIcons:!0})})]})}const IT=y.styled(y.Card)({display:"flex",flexDirection:"column",height:"100%"});function kT({modelPath:e,sourceName:t,queryName:n,expandResult:r,hideResultIcon:i,expandEmbedding:s,hideEmbeddingIcon:a,noView:o,annotations:u}){const[l,d]=P.useState(r),[c,m]=P.useState(s),[p,g]=P.useState(),[b,T]=P.useState(),{packageName:x,projectName:C}=yt(),S=Af({modelPath:e,sourceName:t,queryName:n,optionalPackageName:x,optionalProjectName:C});return P.useEffect(()=>{nr(S,"typescript").then(w=>{g(w)})},[c,S]),P.useEffect(()=>{if(u&&u.length>0){const w=u.map(D=>`// ${D}`).join(`
|
|
114
|
+
`);nr(w,"typescript").then(D=>{T(D)})}},[u]),h.jsx(h.Fragment,{children:h.jsxs(IT,{variant:"outlined",sx:{padding:"0px 10px 0px 10px",borderRadius:"0px"},children:[h.jsxs(y.Stack,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",width:"100%"},children:[h.jsx(y.Typography,{variant:"subtitle2",sx:{mt:"auto",mb:"auto"},children:`${o?"":"View >"} ${n}`}),h.jsxs(y.CardActions,{sx:{padding:"0px"},children:[!i&&h.jsx(y.Tooltip,{title:l?"Hide Results":"Show Results",children:h.jsx(y.IconButton,{size:"small",onClick:()=>{d(!l)},children:h.jsx(vx,{})})}),!a&&h.jsx(y.Tooltip,{title:c?"Hide Sharing":"Show Sharing",children:h.jsx(y.IconButton,{size:"small",onClick:()=>{m(!c)},children:h.jsx($i,{})})})]})]}),h.jsxs(y.Collapse,{in:c,timeout:"auto",unmountOnExit:!0,children:[h.jsx(y.Divider,{}),h.jsxs(y.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:[h.jsx(y.Typography,{sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:h.jsx("div",{dangerouslySetInnerHTML:{__html:p}})}),h.jsx(y.Tooltip,{title:"Copy Embeddable Code",children:h.jsx(y.IconButton,{sx:{width:"24px",height:"24px"},onClick:()=>{navigator.clipboard.writeText(S)},children:h.jsx(ma,{})})})]})]}),h.jsxs(y.Collapse,{in:l,timeout:"auto",unmountOnExit:!0,children:[h.jsx(y.Divider,{sx:{mb:"4px"}}),b&&h.jsxs(h.Fragment,{children:[h.jsx(y.Stack,{sx:{borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:h.jsx(y.Typography,{fontSize:"12px",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:h.jsx("div",{className:"content",dangerouslySetInnerHTML:{__html:b}})})}),h.jsx(y.Divider,{sx:{mb:"4px"}})]}),h.jsx(y.CardContent,{children:h.jsx(If,{modelPath:e,sourceName:t,queryName:n})})]})]})})}const _T=new Dh(new xt),vT=Be(We.Box)(({theme:e})=>({display:"flex",flexWrap:"wrap",gap:e.spacing(.5),borderBottom:`1px solid ${e.palette.divider}`,minHeight:36})),DT=Be(y.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 Yu({sourceAndPaths:e,existingQuery:t,existingSourceName:n,onQueryChange:r,onSourceChange:i}){const[s,a]=P.useState(n?e.findIndex(l=>l.sourceInfo.name===n):0),[o,u]=P.useState(t||gi());return P.useEffect(()=>{i&&i(s)},[s,i]),h.jsxs(ut,{variant:"outlined",children:[h.jsx(Ut,{children:h.jsx(We.Stack,{sx:{flexDirection:"row",justifyContent:"space-between"},children:e.length>0&&h.jsx(vT,{children:e.map((l,d)=>h.jsx(DT,{selected:s===d,onClick:()=>a(d),children:l.sourceInfo.name||`Source ${d+1}`},l.sourceInfo.name||d))})})}),h.jsx(Sa,{children:h.jsxs(We.Stack,{spacing:2,component:"section",children:[h.jsx(Ku,{sourceAndPath:e[s],existingQuery:o,onChange:l=>{u(l),r&&r(l)}}),h.jsx(We.Box,{height:"5px"})]})})]})}function gi(){return{query:void 0,malloyQuery:void 0,malloyResult:void 0}}function wT({sourceAndPath:e,onChange:t,existingQuery:n,explorerComponents:r,QueryBuilder:i}){const[s,a]=P.useState(n||gi()),[o,u]=P.useState([]),{MalloyExplorerProvider:l,QueryPanel:d,ResizableCollapsiblePanel:c,ResultPanel:m,SourcePanel:p}=r;P.useEffect(()=>{t&&t(s)},[t,s]);const{projectName:g,packageName:b,versionId:T}=yt(),x=Dx({mutationFn:(D,N)=>{const B=new i.ASTQuery({source:e.sourceInfo,query:s?.malloyQuery}).toMalloy();return a({...s,query:B}),_T.executeQuery(g,b,e.modelPath,B,void 0,void 0,T,N)},onSuccess:D=>{if(D){const N=JSON.parse(D.data.result);a({...s,malloyResult:N})}}}),[C,S]=P.useState(e.sourceInfo.name);P.useEffect(()=>{C!==e.sourceInfo.name&&(S(e.sourceInfo.name),a(gi()))},[e,C]);const w=P.useCallback(D=>{a({...s,malloyQuery:D})},[s]);return C!==e.sourceInfo.name?h.jsx("div",{children:"Loading..."}):h.jsx(xf,{children:h.jsx(yf,{children:h.jsx(l,{source:e.sourceInfo,query:s?.malloyQuery,onQueryChange:w,focusedNestViewPath:o,onFocusedNestViewPathChange:u,onDrill:D=>{console.info(D)},children:h.jsx("div",{style:{display:"flex",flexDirection:"column",height:"100%"},children:h.jsxs("div",{style:{display:"flex",height:"100%",overflowY:"auto"},children:[h.jsx(c,{isInitiallyExpanded:!0,initialWidth:180,minWidth:180,icon:"database",title:e.sourceInfo.name,children:h.jsx(p,{onRefresh:()=>a(gi())})}),h.jsx(c,{isInitiallyExpanded:!0,initialWidth:280,minWidth:280,icon:"filterSliders",title:"Query",children:h.jsx(d,{runQuery:()=>{x.mutate()}})}),h.jsx(m,{source:e.sourceInfo,draftQuery:s?.malloyQuery,setDraftQuery:D=>a({...s,malloyQuery:D}),submittedQuery:s?.malloyQuery?{executionState:x.isPending?"running":"finished",response:{result:s.malloyResult},query:s.malloyQuery,queryResolutionStartMillis:Date.now(),onCancel:x.reset}:void 0,options:{showRawQuery:!0}})]})})})})},e.sourceInfo.name)}function Ku(e){const[t,n]=P.useState(null),[r,i]=P.useState(null),[s,a]=P.useState(!0);return P.useEffect(()=>{let o=!0;return Promise.all([import("@malloydata/malloy-explorer"),import("@malloydata/malloy-query-builder")]).then(([u,l])=>{o&&(n(u),i(l),a(!1))}).catch(u=>{console.error("Failed to load Malloy components:",u),o&&a(!1)}),()=>{o=!1}},[]),s||!t||!r?h.jsx(xf,{children:h.jsx(yf,{children:h.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"200px",color:"#666"},children:"Loading explorer..."})})}):h.jsx(wT,{...e,explorerComponents:t,QueryBuilder:r})}const NT=new ga(new xt);function PT({modelPath:e,expandResults:t,hideResultIcons:n,expandEmbeddings:r,hideEmbeddingIcons:i}){const[s,a]=P.useState(!1),[o,u]=P.useState(),[l,d]=P.useState(0),{projectName:c,packageName:m,versionId:p}=yt(),g=RT(e);P.useEffect(()=>{nr(g,"typescript").then(S=>{u(S)})},[s,g]);const{data:b,isError:T,isLoading:x,error:C}=St({queryKey:["package",c,m,e,p],queryFn:async S=>(await NT.getModel(c,m,e,p,S)).data});return x?h.jsx(Ct,{text:"Fetching Model..."}):T?(console.log("error",C),h.jsx(Tt,{error:C,context:`${m} > ${e}`})):h.jsxs(ut,{variant:"outlined",children:[h.jsxs(Ut,{children:[h.jsxs(y.Stack,{sx:{flexDirection:"row",justifyContent:"space-between"},children:[Array.isArray(b.sourceInfos)&&b.sourceInfos.length>0&&h.jsx(y.Tabs,{value:l,onChange:(S,w)=>d(w),variant:"scrollable",scrollButtons:"auto",sx:{borderBottom:1,borderColor:"divider",minHeight:36},children:b.sourceInfos.map((S,w)=>{let D;try{D=JSON.parse(S)}catch{D={name:String(w)}}return h.jsx(y.Tab,{label:D.name||`Source ${w+1}`,sx:{minHeight:36}},D.name||w)})}),!i&&h.jsx(y.CardActions,{sx:{padding:"0px 10px 0px 10px",mb:"auto",mt:"auto"},children:h.jsx(y.Tooltip,{title:s?"Hide Embedding":"View Embedding",children:h.jsx(y.IconButton,{size:"small",onClick:()=>{a(!s)},children:h.jsx($i,{})})})})]}),h.jsxs(y.Collapse,{in:s,timeout:"auto",unmountOnExit:!0,children:[h.jsx(y.Divider,{}),h.jsxs(y.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:[h.jsx(y.Typography,{sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:h.jsx("div",{dangerouslySetInnerHTML:{__html:o}})}),h.jsx(y.Tooltip,{title:"Copy Embeddable Code",children:h.jsx(y.IconButton,{sx:{width:"24px",height:"24px"},onClick:()=>{navigator.clipboard.writeText(g)},children:h.jsx(ma,{})})})]})]}),h.jsx(y.Divider,{})]}),h.jsx(Sa,{children:h.jsxs(y.Stack,{spacing:2,component:"section",children:[Array.isArray(b.sourceInfos)&&b.sourceInfos.length>0&&h.jsx(Ku,{sourceAndPath:{modelPath:e,sourceInfo:JSON.parse(b.sourceInfos[l])}}),b.queries?.length>0&&h.jsxs(ut,{variant:"outlined",sx:{padding:"0px 10px 0px 10px"},children:[h.jsx(Ut,{sx:{p:"10px"},children:h.jsx(y.Typography,{variant:"subtitle1",children:"Named Queries"})}),h.jsx(y.Stack,{spacing:1,component:"section",children:b.queries.map(S=>h.jsx(kT,{modelPath:e,queryName:S.name,expandResult:t,hideResultIcon:n,expandEmbedding:r,hideEmbeddingIcon:i,noView:!0,annotations:S.annotations},S.name))}),h.jsx(y.Box,{height:"10px"})]}),h.jsx(y.Box,{height:"5px"})]})})]})}function RT(e){return`<Model
|
|
115
|
+
modelPath="${e}"
|
|
116
|
+
accessToken={accessToken}
|
|
117
|
+
/>`}class rp{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 i=0;i<localStorage.length;i++){const s=localStorage.key(i);if(s&&s.startsWith(n+"/")){const a=s.substring(n.length+1);r.push(a)}}return r}getNotebook(t,n){const r=this.makeKey(t,n),i=localStorage.getItem(r);if(i===null)throw new Error(`Notebook not found at path: ${n}`);return i}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 i=this.makeKey(t,n);localStorage.setItem(i,r)}moveNotebook(t,n,r){const i=this.makeKey(t,n),s=this.makeKey(t,r),a=localStorage.getItem(i);if(a===null)throw new Error(`Notebook not found at path: ${n}`);localStorage.setItem(s,a),localStorage.removeItem(i)}}const LT=Me(h.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"})),gr=We.createStack({createStyledComponent:Be("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>Mr({props:e,name:"MuiStack"})});function Qu(){const e=dh.useNavigate();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 bi{constructor(t,n,r){this.notebookData=r,this.notebookStorage=t,this.userContext=n,this.notebookData?this.isSaved=!0:(this.notebookData={models:[],cells:[],notebookPath:void 0},this.isSaved=!1)}isSaved;notebookStorage;userContext;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 bi(this.notebookStorage,this.userContext,this.notebookData)}toMalloyNotebook(){return this.notebookData.cells.map(t=>t.isMarkdown?`>>>markdown
|
|
118
|
+
`+t.value:`>>>malloy
|
|
119
|
+
import {${t.sourceName}}" from '${t.modelPath}'"
|
|
120
|
+
`+t.value+`
|
|
121
|
+
`).join(`
|
|
122
|
+
`)}static newNotebook(t,n){return new bi(t,n,void 0)}static loadNotebook(t,n,r){let i;try{const s=t.getNotebook(n,r);s&&(i=JSON.parse(s))}catch{i={models:[],cells:[],notebookPath:r}}return new bi(t,n,i)}}const ip=P.createContext(void 0),OT=({server:e=`${window.location.protocol}//${window.location.host}/api/v0`,getAccessToken:t,children:n})=>{const r={server:e,getAccessToken:t};return h.jsx(ip.Provider,{value:r,children:n})},ka=()=>{const e=P.useContext(ip);if(e===void 0)throw new Error("useServer must be used within a ServerProvider");return e},ls=Me(h.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})),Lc=Me(h.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 De(){return De=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},De.apply(null,arguments)}function Ks(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 Sn(){return Sn=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},Sn.apply(null,arguments)}function FT(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 MT=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,BT=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,jT={};function Oc(e,t){return(jT.jsx?BT:MT).test(e)}var br={},no,Fc;function HT(){if(Fc)return no;Fc=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,o=/^\s+|\s+$/g,u=`
|
|
123
|
+
`,l="/",d="*",c="",m="comment",p="declaration";no=function(b,T){if(typeof b!="string")throw new TypeError("First argument must be a string");if(!b)return[];T=T||{};var x=1,C=1;function S(z){var M=z.match(t);M&&(x+=M.length);var K=z.lastIndexOf(u);C=~K?z.length-K:C+z.length}function w(){var z={line:x,column:C};return function(M){return M.position=new D(z),Z(),M}}function D(z){this.start=z,this.end={line:x,column:C},this.source=T.source}D.prototype.content=b;function N(z){var M=new Error(T.source+":"+x+":"+C+": "+z);if(M.reason=z,M.filename=T.source,M.line=x,M.column=C,M.source=b,!T.silent)throw M}function B(z){var M=z.exec(b);if(M){var K=M[0];return S(K),b=b.slice(K.length),M}}function Z(){B(n)}function J(z){var M;for(z=z||[];M=E();)M!==!1&&z.push(M);return z}function E(){var z=w();if(!(l!=b.charAt(0)||d!=b.charAt(1))){for(var M=2;c!=b.charAt(M)&&(d!=b.charAt(M)||l!=b.charAt(M+1));)++M;if(M+=2,c===b.charAt(M-1))return N("End of comment missing");var K=b.slice(2,M-2);return C+=2,S(K),b=b.slice(M),C+=2,z({type:m,comment:K})}}function L(){var z=w(),M=B(r);if(M){if(E(),!B(i))return N("property missing ':'");var K=B(s),se=z({type:p,property:g(M[0].replace(e,c)),value:K?g(K[0].replace(e,c)):c});return B(a),se}}function O(){var z=[];J(z);for(var M;M=L();)M!==!1&&(z.push(M),J(z));return z}return Z(),O()};function g(b){return b?b.replace(o,c):c}return no}var Mc;function UT(){if(Mc)return br;Mc=1;var e=br&&br.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(br,"__esModule",{value:!0}),br.default=n;var t=e(HT());function n(r,i){var s=null;if(!r||typeof r!="string")return s;var a=(0,t.default)(r),o=typeof i=="function";return a.forEach(function(u){if(u.type==="declaration"){var l=u.property,d=u.value;o?i(l,d,u):d&&(s=s||{},s[l]=d)}}),s}return br}var ti={},Bc;function zT(){if(Bc)return ti;Bc=1,Object.defineProperty(ti,"__esModule",{value:!0}),ti.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(l){return!l||n.test(l)||e.test(l)},a=function(l,d){return d.toUpperCase()},o=function(l,d){return"".concat(d,"-")},u=function(l,d){return d===void 0&&(d={}),s(l)?l:(l=l.toLowerCase(),d.reactCompat?l=l.replace(i,o):l=l.replace(r,o),l.replace(t,a))};return ti.camelCase=u,ti}var ni,jc;function $T(){if(jc)return ni;jc=1;var e=ni&&ni.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(UT()),n=zT();function r(i,s){var a={};return!i||typeof i!="string"||(0,t.default)(i,function(o,u){o&&u&&(a[(0,n.camelCase)(o,s)]=u)}),a}return r.default=r,ni=r,ni}var qT=$T();const VT=sa(qT),_a=sp("end"),cn=sp("start");function sp(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 WT(e){const t=cn(e),n=_a(e);if(t&&n)return{start:t,end:n}}function Ei(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Hc(e.position):"start"in e||"end"in e?Hc(e):"line"in e||"column"in e?Xo(e):""}function Xo(e){return Uc(e&&e.line)+":"+Uc(e&&e.column)}function Hc(e){return Xo(e&&e.start)+"-"+Xo(e&&e.end)}function Uc(e){return e&&typeof e=="number"?e:1}class At extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},a=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(a=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?s.ruleId=r:(s.source=r.slice(0,u),s.ruleId=r.slice(u+1))}if(!s.place&&s.ancestors&&s.ancestors){const u=s.ancestors[s.ancestors.length-1];u&&(s.place=u.position)}const o=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=o?o.line:void 0,this.name=Ei(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual,this.expected,this.note,this.url}}At.prototype.file="";At.prototype.name="";At.prototype.reason="";At.prototype.message="";At.prototype.stack="";At.prototype.column=void 0;At.prototype.line=void 0;At.prototype.ancestors=void 0;At.prototype.cause=void 0;At.prototype.fatal=void 0;At.prototype.place=void 0;At.prototype.ruleId=void 0;At.prototype.source=void 0;const Xu={}.hasOwnProperty,GT=new Map,YT=/[A-Z]/g,KT=new Set(["table","tbody","thead","tfoot","tr"]),QT=new Set(["td","th"]),ap="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function XT(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=sC(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=iC(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?kn:Hr,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=op(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function op(e,t,n){if(t.type==="element")return ZT(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return JT(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return tC(e,t,n);if(t.type==="mdxjsEsm")return eC(e,t);if(t.type==="root")return nC(e,t,n);if(t.type==="text")return rC(e,t)}function ZT(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=kn,e.schema=i),e.ancestors.push(t);const s=lp(e,t.tagName,!1),a=aC(e,t);let o=Ju(e,t);return KT.has(t.tagName)&&(o=o.filter(function(u){return typeof u=="string"?!Yi(u):!0})),up(e,a,s,t),Zu(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function JT(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Mi(e,t.position)}function eC(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Mi(e,t.position)}function tC(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=kn,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:lp(e,t.name,!0),a=oC(e,t),o=Ju(e,t);return up(e,a,s,t),Zu(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function nC(e,t,n){const r={};return Zu(r,Ju(e,t)),e.create(t,e.Fragment,r,n)}function rC(e,t){return t.value}function up(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Zu(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function iC(e,t,n){return r;function r(i,s,a,o){const l=Array.isArray(a.children)?n:t;return o?l(s,a,o):l(s,a)}}function sC(e,t){return n;function n(r,i,s,a){const o=Array.isArray(s.children),u=cn(r);return t(i,s,a,o,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function aC(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Xu.call(t.properties,i)){const s=uC(e,i,t.properties[i]);if(s){const[a,o]=s;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&QT.has(t.tagName)?r=o:n[a]=o}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function oC(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const a=s.expression;a.type;const o=a.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Mi(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,s=e.evaluater.evaluateExpression(o.expression)}else Mi(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function Ju(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:GT;for(;++r<t.children.length;){const s=t.children[r];let a;if(e.passKeys){const u=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(u){const l=i.get(u)||0;a=u+"-"+l,i.set(u,l+1)}}const o=op(e,s,a);o!==void 0&&n.push(o)}return n}function uC(e,t,n){const r=Gi(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?xa(n):ya(n)),r.property==="style"){let i=typeof n=="object"?n:lC(e,String(n));return e.stylePropertyNameCase==="css"&&(i=cC(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?F2[r.property]||r.property:r.attribute,n]}}function lC(e,t){try{return VT(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new At("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=ap+"#cannot-parse-style-attribute",i}}function lp(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,a;for(;++s<i.length;){const o=Oc(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};a=a?{type:"MemberExpression",object:a,property:o,computed:!!(s&&o.type==="Literal"),optional:!1}:o}r=a}else r=Oc(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Xu.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Mi(e)}function Mi(e,t){const n=new At("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=ap+"#cannot-handle-mdx-estrees-without-createevaluater",n}function cC(e){const t={};let n;for(n in e)Xu.call(e,n)&&(t[dC(n)]=e[n]);return t}function dC(e){let t=e.replace(YT,hC);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function hC(e){return"-"+e.toLowerCase()}const ro={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"]},fC={};function el(e,t){const n=fC,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return cp(e,r,i)}function cp(e,t,n){if(pC(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 zc(e.children,t,n)}return Array.isArray(e)?zc(e,t,n):""}function zc(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=cp(e[i],t,n);return r.join("")}function pC(e){return!!(e&&typeof e=="object")}const $c=document.createElement("i");function tl(e){const t="&"+e+";";$c.innerHTML=t;const n=$c.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Ht(e,t,n,r){const i=e.length;let s=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i: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);s<r.length;)a=r.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function Yt(e,t){return e.length>0?(Ht(e,e.length,0,t),e):t}const qc={}.hasOwnProperty;function dp(e){const t={};let n=-1;for(;++n<e.length;)mC(t,e[n]);return t}function mC(e,t){let n;for(n in t){const i=(qc.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let a;if(s)for(a in s){qc.call(i,a)||(i[a]=[]);const o=s[a];gC(i[a],Array.isArray(o)?o:o?[o]:[])}}}function gC(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Ht(e,0,0,r)}function hp(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 en(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const vt=Hn(/[A-Za-z]/),Et=Hn(/[\dA-Za-z]/),bC=Hn(/[#-'*+\--9=?A-Z^-~]/);function Qs(e){return e!==null&&(e<32||e===127)}const Zo=Hn(/\d/),EC=Hn(/[\dA-Fa-f]/),xC=Hn(/[!-/:-@[-`{-~]/);function he(e){return e!==null&&e<-2}function Le(e){return e!==null&&(e<0||e===32)}function ke(e){return e===-2||e===-1||e===32}const va=Hn(/\p{P}|\p{S}/u),rr=Hn(/\s/);function Hn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function zr(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let a="";if(s===37&&Et(e.charCodeAt(n+1))&&Et(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const o=e.charCodeAt(n+1);s<56320&&o>56319&&o<57344?(a=String.fromCharCode(s,o),i=1):a="�"}else a=String.fromCharCode(s);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function _e(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(u){return ke(u)?(e.enter(n),o(u)):t(u)}function o(u){return ke(u)&&s++<i?(e.consume(u),o):(e.exit(n),t(u))}}const yC={tokenize:TC};function TC(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),_e(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),s(o)}function s(o){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,a(o)}function a(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return he(o)?(e.consume(o),e.exit("chunkText"),s):(e.consume(o),a)}}const CC={tokenize:SC},Vc={tokenize:AC};function SC(e){const t=this,n=[];let r=0,i,s,a;return o;function o(S){if(r<n.length){const w=n[r];return t.containerState=w[1],e.attempt(w[0].continuation,u,l)(S)}return l(S)}function u(S){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&C();const w=t.events.length;let D=w,N;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){N=t.events[D][1].end;break}x(r);let B=w;for(;B<t.events.length;)t.events[B][1].end={...N},B++;return Ht(t.events,D+1,0,t.events.slice(w)),t.events.length=B,l(S)}return o(S)}function l(S){if(r===n.length){if(!i)return m(S);if(i.currentConstruct&&i.currentConstruct.concrete)return g(S);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Vc,d,c)(S)}function d(S){return i&&C(),x(r),m(S)}function c(S){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,g(S)}function m(S){return t.containerState={},e.attempt(Vc,p,g)(S)}function p(S){return r++,n.push([t.currentConstruct,t.containerState]),m(S)}function g(S){if(S===null){i&&C(),x(0),e.consume(S);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),b(S)}function b(S){if(S===null){T(e.exit("chunkFlow"),!0),x(0),e.consume(S);return}return he(S)?(e.consume(S),T(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(S),b)}function T(S,w){const D=t.sliceStream(S);if(w&&D.push(null),S.previous=s,s&&(s.next=S),s=S,i.defineSkip(S.start),i.write(D),t.parser.lazy[S.start.line]){let N=i.events.length;for(;N--;)if(i.events[N][1].start.offset<a&&(!i.events[N][1].end||i.events[N][1].end.offset>a))return;const B=t.events.length;let Z=B,J,E;for(;Z--;)if(t.events[Z][0]==="exit"&&t.events[Z][1].type==="chunkFlow"){if(J){E=t.events[Z][1].end;break}J=!0}for(x(r),N=B;N<t.events.length;)t.events[N][1].end={...E},N++;Ht(t.events,Z+1,0,t.events.slice(B)),t.events.length=N}}function x(S){let w=n.length;for(;w-- >S;){const D=n[w];t.containerState=D[1],D[0].exit.call(t,e)}n.length=S}function C(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function AC(e,t,n){return _e(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Rr(e){if(e===null||Le(e)||rr(e))return 1;if(va(e))return 2}function Da(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const Jo={name:"attention",resolveAll:IC,tokenize:kC};function IC(e,t){let n=-1,r,i,s,a,o,u,l,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;u=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 c={...e[r][1].end},m={...e[n][1].start};Wc(c,-u),Wc(m,u),a={type:u>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},o={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:m},s={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[r][1].end={...a.start},e[n][1].start={...o.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Yt(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=Yt(l,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",s,t]]),l=Yt(l,Da(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Yt(l,[["exit",s,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,l=Yt(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,Ht(e,r-1,n-r+3,l),n=r+l.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function kC(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Rr(r);let s;return a;function a(u){return s=u,e.enter("attentionSequence"),o(u)}function o(u){if(u===s)return e.consume(u),o;const l=e.exit("attentionSequence"),d=Rr(u),c=!d||d===2&&i||n.includes(u),m=!i||i===2&&d||n.includes(r);return l._open=!!(s===42?c:c&&(i||!m)),l._close=!!(s===42?m:m&&(d||!c)),t(u)}}function Wc(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const _C={name:"autolink",tokenize:vC};function vC(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(p){return vt(p)?(e.consume(p),a):p===64?n(p):l(p)}function a(p){return p===43||p===45||p===46||Et(p)?(r=1,o(p)):l(p)}function o(p){return p===58?(e.consume(p),r=0,u):(p===43||p===45||p===46||Et(p))&&r++<32?(e.consume(p),o):(r=0,l(p))}function u(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||Qs(p)?n(p):(e.consume(p),u)}function l(p){return p===64?(e.consume(p),d):bC(p)?(e.consume(p),l):n(p)}function d(p){return Et(p)?c(p):n(p)}function c(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):m(p)}function m(p){if((p===45||Et(p))&&r++<63){const g=p===45?m:c;return e.consume(p),g}return n(p)}}const Qi={partial:!0,tokenize:DC};function DC(e,t,n){return r;function r(s){return ke(s)?_e(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||he(s)?t(s):n(s)}}const fp={continuation:{tokenize:NC},exit:PC,name:"blockQuote",tokenize:wC};function wC(e,t,n){const r=this;return i;function i(a){if(a===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return n(a)}function s(a){return ke(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function NC(e,t,n){const r=this;return i;function i(a){return ke(a)?_e(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(fp,t,n)(a)}}function PC(e){e.exit("blockQuote")}const pp={name:"characterEscape",tokenize:RC};function RC(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return xC(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const mp={name:"characterReference",tokenize:LC};function LC(e,t,n){const r=this;let i=0,s,a;return o;function o(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),u}function u(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),s=31,a=Et,d(c))}function l(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=EC,d):(e.enter("characterReferenceValue"),s=7,a=Zo,d(c))}function d(c){if(c===59&&i){const m=e.exit("characterReferenceValue");return a===Et&&!tl(r.sliceSerialize(m))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(c)&&i++<s?(e.consume(c),d):n(c)}}const Gc={partial:!0,tokenize:FC},Yc={concrete:!0,name:"codeFenced",tokenize:OC};function OC(e,t,n){const r=this,i={partial:!0,tokenize:D};let s=0,a=0,o;return u;function u(N){return l(N)}function l(N){const B=r.events[r.events.length-1];return s=B&&B[1].type==="linePrefix"?B[2].sliceSerialize(B[1],!0).length:0,o=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(N)}function d(N){return N===o?(a++,e.consume(N),d):a<3?n(N):(e.exit("codeFencedFenceSequence"),ke(N)?_e(e,c,"whitespace")(N):c(N))}function c(N){return N===null||he(N)?(e.exit("codeFencedFence"),r.interrupt?t(N):e.check(Gc,b,w)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(N))}function m(N){return N===null||he(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(N)):ke(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),_e(e,p,"whitespace")(N)):N===96&&N===o?n(N):(e.consume(N),m)}function p(N){return N===null||he(N)?c(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(N))}function g(N){return N===null||he(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(N)):N===96&&N===o?n(N):(e.consume(N),g)}function b(N){return e.attempt(i,w,T)(N)}function T(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),x}function x(N){return s>0&&ke(N)?_e(e,C,"linePrefix",s+1)(N):C(N)}function C(N){return N===null||he(N)?e.check(Gc,b,w)(N):(e.enter("codeFlowValue"),S(N))}function S(N){return N===null||he(N)?(e.exit("codeFlowValue"),C(N)):(e.consume(N),S)}function w(N){return e.exit("codeFenced"),t(N)}function D(N,B,Z){let J=0;return E;function E(K){return N.enter("lineEnding"),N.consume(K),N.exit("lineEnding"),L}function L(K){return N.enter("codeFencedFence"),ke(K)?_e(N,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):O(K)}function O(K){return K===o?(N.enter("codeFencedFenceSequence"),z(K)):Z(K)}function z(K){return K===o?(J++,N.consume(K),z):J>=a?(N.exit("codeFencedFenceSequence"),ke(K)?_e(N,M,"whitespace")(K):M(K)):Z(K)}function M(K){return K===null||he(K)?(N.exit("codeFencedFence"),B(K)):Z(K)}}}function FC(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const io={name:"codeIndented",tokenize:BC},MC={partial:!0,tokenize:jC};function BC(e,t,n){const r=this;return i;function i(l){return e.enter("codeIndented"),_e(e,s,"linePrefix",5)(l)}function s(l){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(l):n(l)}function a(l){return l===null?u(l):he(l)?e.attempt(MC,a,u)(l):(e.enter("codeFlowValue"),o(l))}function o(l){return l===null||he(l)?(e.exit("codeFlowValue"),a(l)):(e.consume(l),o)}function u(l){return e.exit("codeIndented"),t(l)}}function jC(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):he(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):_e(e,s,"linePrefix",5)(a)}function s(a){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):he(a)?i(a):n(a)}}const HC={name:"codeText",previous:zC,resolve:UC,tokenize:$C};function UC(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function zC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function $C(e,t,n){let r=0,i,s;return a;function a(c){return e.enter("codeText"),e.enter("codeTextSequence"),o(c)}function o(c){return c===96?(e.consume(c),r++,o):(e.exit("codeTextSequence"),u(c))}function u(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),u):c===96?(s=e.enter("codeTextSequence"),i=0,d(c)):he(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):(e.enter("codeTextData"),l(c))}function l(c){return c===null||c===32||c===96||he(c)?(e.exit("codeTextData"),u(c)):(e.consume(c),l)}function d(c){return c===96?(e.consume(c),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(s.type="codeTextData",l(c))}}class qC{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 i=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&ri(this.left,r),s.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),ri(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ri(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);ri(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ri(this.left,n.reverse())}}}function ri(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 gp(e){const t={};let n=-1,r,i,s,a,o,u,l;const d=new qC(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"&&(u=r[1]._tokenizer.events,s=0,s<u.length&&u[s][1].type==="lineEndingBlank"&&(s+=2),s<u.length&&u[s][1].type==="content"))for(;++s<u.length&&u[s][1].type!=="content";)u[s][1].type==="chunkText"&&(u[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,VC(d,n)),n=t[n],l=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(a=d.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...d.get(i)[1].start},o=d.slice(i,n),o.unshift(r),d.splice(i,n-i+1,o))}}return Ht(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!l}function VC(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const o=a.events,u=[],l={};let d,c,m=-1,p=n,g=0,b=0;const T=[b];for(;p;){for(;e.get(++i)[1]!==p;);s.push(i),p._tokenizer||(d=r.sliceStream(p),p.next||d.push(null),c&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),c=p,p=p.next}for(p=n;++m<o.length;)o[m][0]==="exit"&&o[m-1][0]==="enter"&&o[m][1].type===o[m-1][1].type&&o[m][1].start.line!==o[m][1].end.line&&(b=m+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(),m=T.length;m--;){const x=o.slice(T[m],T[m+1]),C=s.pop();u.push([C,C+x.length-1]),e.splice(C,2,x)}for(u.reverse(),m=-1;++m<u.length;)l[g+u[m][0]]=g+u[m][1],g+=u[m][1]-u[m][0]-1;return l}const WC={resolve:YC,tokenize:KC},GC={partial:!0,tokenize:QC};function YC(e){return gp(e),e}function KC(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?s(o):he(o)?e.check(GC,a,s)(o):(e.consume(o),i)}function s(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function a(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function QC(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),_e(e,s,"linePrefix")}function s(a){if(a===null||he(a))return n(a);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function bp(e,t,n,r,i,s,a,o,u){const l=u||Number.POSITIVE_INFINITY;let d=0;return c;function c(x){return x===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(x),e.exit(s),m):x===null||x===32||x===41||Qs(x)?n(x):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),b(x))}function m(x){return x===62?(e.enter(s),e.consume(x),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===62?(e.exit("chunkString"),e.exit(o),m(x)):x===null||x===60||he(x)?n(x):(e.consume(x),x===92?g:p)}function g(x){return x===60||x===62||x===92?(e.consume(x),p):p(x)}function b(x){return!d&&(x===null||x===41||Le(x))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),t(x)):d<l&&x===40?(e.consume(x),d++,b):x===41?(e.consume(x),d--,b):x===null||x===32||x===40||Qs(x)?n(x):(e.consume(x),x===92?T:b)}function T(x){return x===40||x===41||x===92?(e.consume(x),b):b(x)}}function Ep(e,t,n,r,i,s){const a=this;let o=0,u;return l;function l(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(s),d}function d(p){return o>999||p===null||p===91||p===93&&!u||p===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?n(p):p===93?(e.exit(s),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):he(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===null||p===91||p===93||he(p)||o++>999?(e.exit("chunkString"),d(p)):(e.consume(p),u||(u=!ke(p)),p===92?m:c)}function m(p){return p===91||p===92||p===93?(e.consume(p),o++,c):c(p)}}function xp(e,t,n,r,i,s){let a;return o;function o(m){return m===34||m===39||m===40?(e.enter(r),e.enter(i),e.consume(m),e.exit(i),a=m===40?41:m,u):n(m)}function u(m){return m===a?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):(e.enter(s),l(m))}function l(m){return m===a?(e.exit(s),u(a)):m===null?n(m):he(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),_e(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===a||m===null||he(m)?(e.exit("chunkString"),l(m)):(e.consume(m),m===92?c:d)}function c(m){return m===a||m===92?(e.consume(m),d):d(m)}}function xi(e,t){let n;return r;function r(i){return he(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ke(i)?_e(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const XC={name:"definition",tokenize:JC},ZC={partial:!0,tokenize:e6};function JC(e,t,n){const r=this;let i;return s;function s(p){return e.enter("definition"),a(p)}function a(p){return Ep.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function o(p){return i=en(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),u):n(p)}function u(p){return Le(p)?xi(e,l)(p):l(p)}function l(p){return bp(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function d(p){return e.attempt(ZC,c,c)(p)}function c(p){return ke(p)?_e(e,m,"whitespace")(p):m(p)}function m(p){return p===null||he(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function e6(e,t,n){return r;function r(o){return Le(o)?xi(e,i)(o):n(o)}function i(o){return xp(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return ke(o)?_e(e,a,"whitespace")(o):a(o)}function a(o){return o===null||he(o)?t(o):n(o)}}const t6={name:"hardBreakEscape",tokenize:n6};function n6(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return he(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const r6={name:"headingAtx",resolve:i6,tokenize:s6};function i6(e,t){let n=e.length-2,r=3,i,s;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&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Ht(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function s6(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),s(d)}function s(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&r++<6?(e.consume(d),a):d===null||Le(d)?(e.exit("atxHeadingSequence"),o(d)):n(d)}function o(d){return d===35?(e.enter("atxHeadingSequence"),u(d)):d===null||he(d)?(e.exit("atxHeading"),t(d)):ke(d)?_e(e,o,"whitespace")(d):(e.enter("atxHeadingText"),l(d))}function u(d){return d===35?(e.consume(d),u):(e.exit("atxHeadingSequence"),o(d))}function l(d){return d===null||d===35||Le(d)?(e.exit("atxHeadingText"),o(d)):(e.consume(d),l)}}const a6=["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"],Kc=["pre","script","style","textarea"],o6={concrete:!0,name:"htmlFlow",resolveTo:c6,tokenize:d6},u6={partial:!0,tokenize:f6},l6={partial:!0,tokenize:h6};function c6(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 d6(e,t,n){const r=this;let i,s,a,o,u;return l;function l(_){return d(_)}function d(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),c}function c(_){return _===33?(e.consume(_),m):_===47?(e.consume(_),s=!0,b):_===63?(e.consume(_),i=3,r.interrupt?t:k):vt(_)?(e.consume(_),a=String.fromCharCode(_),T):n(_)}function m(_){return _===45?(e.consume(_),i=2,p):_===91?(e.consume(_),i=5,o=0,g):vt(_)?(e.consume(_),i=4,r.interrupt?t:k):n(_)}function p(_){return _===45?(e.consume(_),r.interrupt?t:k):n(_)}function g(_){const Ee="CDATA[";return _===Ee.charCodeAt(o++)?(e.consume(_),o===Ee.length?r.interrupt?t:O:g):n(_)}function b(_){return vt(_)?(e.consume(_),a=String.fromCharCode(_),T):n(_)}function T(_){if(_===null||_===47||_===62||Le(_)){const Ee=_===47,me=a.toLowerCase();return!Ee&&!s&&Kc.includes(me)?(i=1,r.interrupt?t(_):O(_)):a6.includes(a.toLowerCase())?(i=6,Ee?(e.consume(_),x):r.interrupt?t(_):O(_)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(_):s?C(_):S(_))}return _===45||Et(_)?(e.consume(_),a+=String.fromCharCode(_),T):n(_)}function x(_){return _===62?(e.consume(_),r.interrupt?t:O):n(_)}function C(_){return ke(_)?(e.consume(_),C):E(_)}function S(_){return _===47?(e.consume(_),E):_===58||_===95||vt(_)?(e.consume(_),w):ke(_)?(e.consume(_),S):E(_)}function w(_){return _===45||_===46||_===58||_===95||Et(_)?(e.consume(_),w):D(_)}function D(_){return _===61?(e.consume(_),N):ke(_)?(e.consume(_),D):S(_)}function N(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),u=_,B):ke(_)?(e.consume(_),N):Z(_)}function B(_){return _===u?(e.consume(_),u=null,J):_===null||he(_)?n(_):(e.consume(_),B)}function Z(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||Le(_)?D(_):(e.consume(_),Z)}function J(_){return _===47||_===62||ke(_)?S(_):n(_)}function E(_){return _===62?(e.consume(_),L):n(_)}function L(_){return _===null||he(_)?O(_):ke(_)?(e.consume(_),L):n(_)}function O(_){return _===45&&i===2?(e.consume(_),se):_===60&&i===1?(e.consume(_),fe):_===62&&i===4?(e.consume(_),ae):_===63&&i===3?(e.consume(_),k):_===93&&i===5?(e.consume(_),W):he(_)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(u6,de,z)(_)):_===null||he(_)?(e.exit("htmlFlowData"),z(_)):(e.consume(_),O)}function z(_){return e.check(l6,M,de)(_)}function M(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),K}function K(_){return _===null||he(_)?z(_):(e.enter("htmlFlowData"),O(_))}function se(_){return _===45?(e.consume(_),k):O(_)}function fe(_){return _===47?(e.consume(_),a="",pe):O(_)}function pe(_){if(_===62){const Ee=a.toLowerCase();return Kc.includes(Ee)?(e.consume(_),ae):O(_)}return vt(_)&&a.length<8?(e.consume(_),a+=String.fromCharCode(_),pe):O(_)}function W(_){return _===93?(e.consume(_),k):O(_)}function k(_){return _===62?(e.consume(_),ae):_===45&&i===2?(e.consume(_),k):O(_)}function ae(_){return _===null||he(_)?(e.exit("htmlFlowData"),de(_)):(e.consume(_),ae)}function de(_){return e.exit("htmlFlow"),t(_)}}function h6(e,t,n){const r=this;return i;function i(a){return he(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):n(a)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function f6(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Qi,t,n)}}const p6={name:"htmlText",tokenize:m6};function m6(e,t,n){const r=this;let i,s,a;return o;function o(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),u}function u(k){return k===33?(e.consume(k),l):k===47?(e.consume(k),D):k===63?(e.consume(k),S):vt(k)?(e.consume(k),Z):n(k)}function l(k){return k===45?(e.consume(k),d):k===91?(e.consume(k),s=0,g):vt(k)?(e.consume(k),C):n(k)}function d(k){return k===45?(e.consume(k),p):n(k)}function c(k){return k===null?n(k):k===45?(e.consume(k),m):he(k)?(a=c,fe(k)):(e.consume(k),c)}function m(k){return k===45?(e.consume(k),p):c(k)}function p(k){return k===62?se(k):k===45?m(k):c(k)}function g(k){const ae="CDATA[";return k===ae.charCodeAt(s++)?(e.consume(k),s===ae.length?b:g):n(k)}function b(k){return k===null?n(k):k===93?(e.consume(k),T):he(k)?(a=b,fe(k)):(e.consume(k),b)}function T(k){return k===93?(e.consume(k),x):b(k)}function x(k){return k===62?se(k):k===93?(e.consume(k),x):b(k)}function C(k){return k===null||k===62?se(k):he(k)?(a=C,fe(k)):(e.consume(k),C)}function S(k){return k===null?n(k):k===63?(e.consume(k),w):he(k)?(a=S,fe(k)):(e.consume(k),S)}function w(k){return k===62?se(k):S(k)}function D(k){return vt(k)?(e.consume(k),N):n(k)}function N(k){return k===45||Et(k)?(e.consume(k),N):B(k)}function B(k){return he(k)?(a=B,fe(k)):ke(k)?(e.consume(k),B):se(k)}function Z(k){return k===45||Et(k)?(e.consume(k),Z):k===47||k===62||Le(k)?J(k):n(k)}function J(k){return k===47?(e.consume(k),se):k===58||k===95||vt(k)?(e.consume(k),E):he(k)?(a=J,fe(k)):ke(k)?(e.consume(k),J):se(k)}function E(k){return k===45||k===46||k===58||k===95||Et(k)?(e.consume(k),E):L(k)}function L(k){return k===61?(e.consume(k),O):he(k)?(a=L,fe(k)):ke(k)?(e.consume(k),L):J(k)}function O(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),i=k,z):he(k)?(a=O,fe(k)):ke(k)?(e.consume(k),O):(e.consume(k),M)}function z(k){return k===i?(e.consume(k),i=void 0,K):k===null?n(k):he(k)?(a=z,fe(k)):(e.consume(k),z)}function M(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||Le(k)?J(k):(e.consume(k),M)}function K(k){return k===47||k===62||Le(k)?J(k):n(k)}function se(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function fe(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),pe}function pe(k){return ke(k)?_e(e,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):W(k)}function W(k){return e.enter("htmlTextData"),a(k)}}const nl={name:"labelEnd",resolveAll:x6,resolveTo:y6,tokenize:T6},g6={tokenize:C6},b6={tokenize:S6},E6={tokenize:A6};function x6(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 i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Ht(e,0,e.length,n),e}function y6(e,t){let n=e.length,r=0,i,s,a,o;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const u={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[s][1].start},end:{...e[a][1].end}},d={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",u,t],["enter",l,t]],o=Yt(o,e.slice(s+1,s+r+3)),o=Yt(o,[["enter",d,t]]),o=Yt(o,Da(t.parser.constructs.insideSpan.null,e.slice(s+r+4,a-3),t)),o=Yt(o,[["exit",d,t],e[a-2],e[a-1],["exit",l,t]]),o=Yt(o,e.slice(a+1)),o=Yt(o,[["exit",u,t]]),Ht(e,s,e.length,o),e}function T6(e,t,n){const r=this;let i=r.events.length,s,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return o;function o(m){return s?s._inactive?c(m):(a=r.parser.defined.includes(en(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),u):n(m)}function u(m){return m===40?e.attempt(g6,d,a?d:c)(m):m===91?e.attempt(b6,d,a?l:c)(m):a?d(m):c(m)}function l(m){return e.attempt(E6,d,c)(m)}function d(m){return t(m)}function c(m){return s._balanced=!0,n(m)}}function C6(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return Le(c)?xi(e,s)(c):s(c)}function s(c){return c===41?d(c):bp(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function a(c){return Le(c)?xi(e,u)(c):d(c)}function o(c){return n(c)}function u(c){return c===34||c===39||c===40?xp(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):d(c)}function l(c){return Le(c)?xi(e,d)(c):d(c)}function d(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function S6(e,t,n){const r=this;return i;function i(o){return Ep.call(r,e,s,a,"reference","referenceMarker","referenceString")(o)}function s(o){return r.parser.defined.includes(en(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function a(o){return n(o)}}function A6(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const I6={name:"labelStartImage",resolveAll:nl.resolveAll,tokenize:k6};function k6(e,t,n){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),s}function s(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),a):n(o)}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const _6={name:"labelStartLink",resolveAll:nl.resolveAll,tokenize:v6};function v6(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const so={name:"lineEnding",tokenize:D6};function D6(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),_e(e,t,"linePrefix")}}const As={name:"thematicBreak",tokenize:w6};function w6(e,t,n){let r=0,i;return s;function s(l){return e.enter("thematicBreak"),a(l)}function a(l){return i=l,o(l)}function o(l){return l===i?(e.enter("thematicBreakSequence"),u(l)):r>=3&&(l===null||he(l))?(e.exit("thematicBreak"),t(l)):n(l)}function u(l){return l===i?(e.consume(l),r++,u):(e.exit("thematicBreakSequence"),ke(l)?_e(e,o,"whitespace")(l):o(l))}}const Rt={continuation:{tokenize:L6},exit:F6,name:"list",tokenize:R6},N6={partial:!0,tokenize:M6},P6={partial:!0,tokenize:O6};function R6(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return o;function o(p){const g=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Zo(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(As,n,l)(p):l(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(p)}return n(p)}function u(p){return Zo(p)&&++a<10?(e.consume(p),u):(!r.interrupt||a<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),l(p)):n(p)}function l(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Qi,r.interrupt?n:d,e.attempt(N6,m,c))}function d(p){return r.containerState.initialBlankLine=!0,s++,m(p)}function c(p){return ke(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),m):n(p)}function m(p){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function L6(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Qi,i,s);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,_e(e,t,"listItemIndent",r.containerState.size+1)(o)}function s(o){return r.containerState.furtherBlankLines||!ke(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(P6,t,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,_e(e,e.attempt(Rt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function O6(e,t,n){const r=this;return _e(e,i,"listItemIndent",r.containerState.size+1);function i(s){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(s):n(s)}}function F6(e){e.exit(this.containerState.type)}function M6(e,t,n){const r=this;return _e(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=r.events[r.events.length-1];return!ke(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const Qc={name:"setextUnderline",resolveTo:B6,tokenize:j6};function B6(e,t){let n=e.length,r,i,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",a,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function j6(e,t,n){const r=this;let i;return s;function s(l){let d=r.events.length,c;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){c=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=l,a(l)):n(l)}function a(l){return e.enter("setextHeadingLineSequence"),o(l)}function o(l){return l===i?(e.consume(l),o):(e.exit("setextHeadingLineSequence"),ke(l)?_e(e,u,"lineSuffix")(l):u(l))}function u(l){return l===null||he(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const H6={tokenize:U6};function U6(e){const t=this,n=e.attempt(Qi,r,e.attempt(this.parser.constructs.flowInitial,i,_e(e,e.attempt(this.parser.constructs.flow,i,e.attempt(WC,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const z6={resolveAll:Tp()},$6=yp("string"),q6=yp("text");function yp(e){return{resolveAll:Tp(e==="text"?V6:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,a,o);return a;function a(d){return l(d)?s(d):o(d)}function o(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),u}function u(d){return l(d)?(n.exit("data"),s(d)):(n.consume(d),u)}function l(d){if(d===null)return!0;const c=i[d];let m=-1;if(c)for(;++m<c.length;){const p=c[m];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Tp(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function V6(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],i=t.sliceStream(r);let s=i.length,a=-1,o=0,u;for(;s--;){const l=i[s];if(typeof l=="string"){for(a=l.length;l.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(l===-2)u=!0,o++;else if(l!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const l={type:n===e.length||u||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...l.start},r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}const W6={42:Rt,43:Rt,45:Rt,48:Rt,49:Rt,50:Rt,51:Rt,52:Rt,53:Rt,54:Rt,55:Rt,56:Rt,57:Rt,62:fp},G6={91:XC},Y6={[-2]:io,[-1]:io,32:io},K6={35:r6,42:As,45:[Qc,As],60:o6,61:Qc,95:As,96:Yc,126:Yc},Q6={38:mp,92:pp},X6={[-5]:so,[-4]:so,[-3]:so,33:I6,38:mp,42:Jo,60:[_C,p6],91:_6,92:[t6,pp],93:nl,95:Jo,96:HC},Z6={null:[Jo,z6]},J6={null:[42,95]},e4={null:[]},t4=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:J6,contentInitial:G6,disable:e4,document:W6,flow:K6,flowInitial:Y6,insideSpan:Z6,string:Q6,text:X6},Symbol.toStringTag,{value:"Module"}));function n4(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 i={},s=[];let a=[],o=[];const u={attempt:B(D),check:B(N),consume:C,enter:S,exit:w,interrupt:B(N,{interrupt:!0})},l={code:null,containerState:{},defineSkip:b,events:[],now:g,parser:e,previous:null,sliceSerialize:m,sliceStream:p,write:c};let d=t.tokenize.call(l,u);return t.resolveAll&&s.push(t),l;function c(L){return a=Yt(a,L),T(),a[a.length-1]!==null?[]:(Z(t,0),l.events=Da(s,l.events,l),l.events)}function m(L,O){return i4(p(L),O)}function p(L){return r4(a,L)}function g(){const{_bufferIndex:L,_index:O,line:z,column:M,offset:K}=r;return{_bufferIndex:L,_index:O,line:z,column:M,offset:K}}function b(L){i[L.line]=L.column,E()}function T(){let L;for(;r._index<a.length;){const O=a[r._index];if(typeof O=="string")for(L=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===L&&r._bufferIndex<O.length;)x(O.charCodeAt(r._bufferIndex));else x(O)}}function x(L){d=d(L)}function C(L){he(L)?(r.line++,r.column=1,r.offset+=L===-3?2:1,E()):L!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=L}function S(L,O){const z=O||{};return z.type=L,z.start=g(),l.events.push(["enter",z,l]),o.push(z),z}function w(L){const O=o.pop();return O.end=g(),l.events.push(["exit",O,l]),O}function D(L,O){Z(L,O.from)}function N(L,O){O.restore()}function B(L,O){return z;function z(M,K,se){let fe,pe,W,k;return Array.isArray(M)?de(M):"tokenize"in M?de([M]):ae(M);function ae(q){return ie;function ie(te){const we=te!==null&&q[te],ne=te!==null&&q.null,U=[...Array.isArray(we)?we:we?[we]:[],...Array.isArray(ne)?ne:ne?[ne]:[]];return de(U)(te)}}function de(q){return fe=q,pe=0,q.length===0?se:_(q[pe])}function _(q){return ie;function ie(te){return k=J(),W=q,q.partial||(l.currentConstruct=q),q.name&&l.parser.constructs.disable.null.includes(q.name)?me():q.tokenize.call(O?Object.assign(Object.create(l),O):l,u,Ee,me)(te)}}function Ee(q){return L(W,k),K}function me(q){return k.restore(),++pe<fe.length?_(fe[pe]):se}}}function Z(L,O){L.resolveAll&&!s.includes(L)&&s.push(L),L.resolve&&Ht(l.events,O,l.events.length-O,L.resolve(l.events.slice(O),l)),L.resolveTo&&(l.events=L.resolveTo(l.events,l))}function J(){const L=g(),O=l.previous,z=l.currentConstruct,M=l.events.length,K=Array.from(o);return{from:M,restore:se};function se(){r=L,l.previous=O,l.currentConstruct=z,l.events.length=M,o=K,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function r4(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,s)];else{if(a=e.slice(n,i),r>-1){const o=a[0];typeof o=="string"?a[0]=o.slice(r):a.shift()}s>0&&a.push(e[i].slice(0,s))}return a}function i4(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
|
|
124
|
+
`;break}case-3:{a=`\r
|
|
125
|
+
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(s)}i=s===-2,r.push(a)}return r.join("")}function s4(e){const r={constructs:dp([t4,...(e||{}).extensions||[]]),content:i(yC),defined:[],document:i(CC),flow:i(H6),lazy:{},string:i($6),text:i(q6)};return r;function i(s){return a;function a(o){return n4(r,s,o)}}}function a4(e){for(;!gp(e););return e}const Xc=/[\0\t\n\r]/g;function o4(){let e=1,t="",n=!0,r;return i;function i(s,a,o){const u=[];let l,d,c,m,p;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),c=0,t="",n&&(s.charCodeAt(0)===65279&&c++,n=void 0);c<s.length;){if(Xc.lastIndex=c,l=Xc.exec(s),m=l&&l.index!==void 0?l.index:s.length,p=s.charCodeAt(m),!l){t=s.slice(c);break}if(p===10&&c===m&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),c<m&&(u.push(s.slice(c,m)),e+=m-c),p){case 0:{u.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,u.push(-2);e++<d;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}c=m+1}return o&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const u4=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function l4(e){return e.replace(u4,c4)}function c4(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return hp(n.slice(s?2:1),s?16:10)}return tl(n)||e}const Cp={}.hasOwnProperty;function d4(e,t,n){return typeof t!="string"&&(n=t,t=void 0),h4(n)(a4(s4(n).document().write(o4()(e,t,!0))))}function h4(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(at),autolinkProtocol:J,autolinkEmail:J,atxHeading:s(zt),blockQuote:s(ne),characterEscape:J,characterReference:J,codeFenced:s(U),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(U,a),codeText:s(xe,a),codeTextData:J,data:J,codeFlowValue:J,definition:s(je),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(ce),hardBreakEscape:s(mt),hardBreakTrailing:s(mt),htmlFlow:s(Ce,a),htmlFlowData:J,htmlText:s(Ce,a),htmlTextData:J,image:s(st),label:a,link:s(at),listItem:s(rn),listItemValue:m,listOrdered:s(Xe,c),listUnordered:s(Xe),paragraph:s(oe),reference:_,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(zt),strong:s(Qr),thematicBreak:s(ze)},exit:{atxHeading:u(),atxHeadingSequence:D,autolink:u(),autolinkEmail:we,autolinkProtocol:te,blockQuote:u(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:me,characterReferenceMarkerNumeric:me,characterReferenceValue:q,characterReference:ie,codeFenced:u(T),codeFencedFence:b,codeFencedFenceInfo:p,codeFencedFenceMeta:g,codeFlowValue:E,codeIndented:u(x),codeText:u(K),codeTextData:E,data:E,definition:u(),definitionDestinationString:w,definitionLabelString:C,definitionTitleString:S,emphasis:u(),hardBreakEscape:u(O),hardBreakTrailing:u(O),htmlFlow:u(z),htmlFlowData:E,htmlText:u(M),htmlTextData:E,image:u(fe),label:W,labelText:pe,lineEnding:L,link:u(se),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:Ee,resourceDestinationString:k,resourceTitleString:ae,resource:de,setextHeading:u(Z),setextHeadingLineSequence:B,setextHeadingText:N,strong:u(),thematicBreak:u()}};Sp(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(H){let ee={type:"root",children:[]};const ge={stack:[ee],tokenStack:[],config:t,enter:o,exit:l,buffer:a,resume:d,data:n},Se=[];let ve=-1;for(;++ve<H.length;)if(H[ve][1].type==="listOrdered"||H[ve][1].type==="listUnordered")if(H[ve][0]==="enter")Se.push(ve);else{const gt=Se.pop();ve=i(H,gt,ve)}for(ve=-1;++ve<H.length;){const gt=t[H[ve][0]];Cp.call(gt,H[ve][1].type)&>[H[ve][1].type].call(Object.assign({sliceSerialize:H[ve][2].sliceSerialize},ge),H[ve][1])}if(ge.tokenStack.length>0){const gt=ge.tokenStack[ge.tokenStack.length-1];(gt[1]||Zc).call(ge,void 0,gt[0])}for(ee.position={start:Pn(H.length>0?H[0][1].start:{line:1,column:1,offset:0}),end:Pn(H.length>0?H[H.length-2][1].end:{line:1,column:1,offset:0})},ve=-1;++ve<t.transforms.length;)ee=t.transforms[ve](ee)||ee;return ee}function i(H,ee,ge){let Se=ee-1,ve=-1,gt=!1,ct,wt,$t,Y;for(;++Se<=ge;){const re=H[Se];switch(re[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{re[0]==="enter"?ve++:ve--,Y=void 0;break}case"lineEndingBlank":{re[0]==="enter"&&(ct&&!Y&&!ve&&!$t&&($t=Se),Y=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Y=void 0}if(!ve&&re[0]==="enter"&&re[1].type==="listItemPrefix"||ve===-1&&re[0]==="exit"&&(re[1].type==="listUnordered"||re[1].type==="listOrdered")){if(ct){let ue=Se;for(wt=void 0;ue--;){const be=H[ue];if(be[1].type==="lineEnding"||be[1].type==="lineEndingBlank"){if(be[0]==="exit")continue;wt&&(H[wt][1].type="lineEndingBlank",gt=!0),be[1].type="lineEnding",wt=ue}else if(!(be[1].type==="linePrefix"||be[1].type==="blockQuotePrefix"||be[1].type==="blockQuotePrefixWhitespace"||be[1].type==="blockQuoteMarker"||be[1].type==="listItemIndent"))break}$t&&(!wt||$t<wt)&&(ct._spread=!0),ct.end=Object.assign({},wt?H[wt][1].start:re[1].end),H.splice(wt||Se,0,["exit",ct,re[2]]),Se++,ge++}if(re[1].type==="listItemPrefix"){const ue={type:"listItem",_spread:!1,start:Object.assign({},re[1].start),end:void 0};ct=ue,H.splice(Se,0,["enter",ue,re[2]]),Se++,ge++,$t=void 0,Y=!0}}}return H[ee][1]._spread=gt,ge}function s(H,ee){return ge;function ge(Se){o.call(this,H(Se),Se),ee&&ee.call(this,Se)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(H,ee,ge){this.stack[this.stack.length-1].children.push(H),this.stack.push(H),this.tokenStack.push([ee,ge||void 0]),H.position={start:Pn(ee.start),end:void 0}}function u(H){return ee;function ee(ge){H&&H.call(this,ge),l.call(this,ge)}}function l(H,ee){const ge=this.stack.pop(),Se=this.tokenStack.pop();if(Se)Se[0].type!==H.type&&(ee?ee.call(this,H,Se[0]):(Se[1]||Zc).call(this,H,Se[0]));else throw new Error("Cannot close `"+H.type+"` ("+Ei({start:H.start,end:H.end})+"): it’s not open");ge.position.end=Pn(H.end)}function d(){return el(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function m(H){if(this.data.expectingFirstListItemValue){const ee=this.stack[this.stack.length-2];ee.start=Number.parseInt(this.sliceSerialize(H),10),this.data.expectingFirstListItemValue=void 0}}function p(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.lang=H}function g(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.meta=H}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.value=H.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.value=H.replace(/(\r?\n|\r)$/g,"")}function C(H){const ee=this.resume(),ge=this.stack[this.stack.length-1];ge.label=ee,ge.identifier=en(this.sliceSerialize(H)).toLowerCase()}function S(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.title=H}function w(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.url=H}function D(H){const ee=this.stack[this.stack.length-1];if(!ee.depth){const ge=this.sliceSerialize(H).length;ee.depth=ge}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function B(H){const ee=this.stack[this.stack.length-1];ee.depth=this.sliceSerialize(H).codePointAt(0)===61?1:2}function Z(){this.data.setextHeadingSlurpLineEnding=void 0}function J(H){const ge=this.stack[this.stack.length-1].children;let Se=ge[ge.length-1];(!Se||Se.type!=="text")&&(Se=Xr(),Se.position={start:Pn(H.start),end:void 0},ge.push(Se)),this.stack.push(Se)}function E(H){const ee=this.stack.pop();ee.value+=this.sliceSerialize(H),ee.position.end=Pn(H.end)}function L(H){const ee=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ge=ee.children[ee.children.length-1];ge.position.end=Pn(H.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ee.type)&&(J.call(this,H),E.call(this,H))}function O(){this.data.atHardBreak=!0}function z(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.value=H}function M(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.value=H}function K(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.value=H}function se(){const H=this.stack[this.stack.length-1];if(this.data.inReference){const ee=this.data.referenceType||"shortcut";H.type+="Reference",H.referenceType=ee,delete H.url,delete H.title}else delete H.identifier,delete H.label;this.data.referenceType=void 0}function fe(){const H=this.stack[this.stack.length-1];if(this.data.inReference){const ee=this.data.referenceType||"shortcut";H.type+="Reference",H.referenceType=ee,delete H.url,delete H.title}else delete H.identifier,delete H.label;this.data.referenceType=void 0}function pe(H){const ee=this.sliceSerialize(H),ge=this.stack[this.stack.length-2];ge.label=l4(ee),ge.identifier=en(ee).toLowerCase()}function W(){const H=this.stack[this.stack.length-1],ee=this.resume(),ge=this.stack[this.stack.length-1];if(this.data.inReference=!0,ge.type==="link"){const Se=H.children;ge.children=Se}else ge.alt=ee}function k(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.url=H}function ae(){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.title=H}function de(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function Ee(H){const ee=this.resume(),ge=this.stack[this.stack.length-1];ge.label=ee,ge.identifier=en(this.sliceSerialize(H)).toLowerCase(),this.data.referenceType="full"}function me(H){this.data.characterReferenceType=H.type}function q(H){const ee=this.sliceSerialize(H),ge=this.data.characterReferenceType;let Se;ge?(Se=hp(ee,ge==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Se=tl(ee);const ve=this.stack[this.stack.length-1];ve.value+=Se}function ie(H){const ee=this.stack.pop();ee.position.end=Pn(H.end)}function te(H){E.call(this,H);const ee=this.stack[this.stack.length-1];ee.url=this.sliceSerialize(H)}function we(H){E.call(this,H);const ee=this.stack[this.stack.length-1];ee.url="mailto:"+this.sliceSerialize(H)}function ne(){return{type:"blockquote",children:[]}}function U(){return{type:"code",lang:null,meta:null,value:""}}function xe(){return{type:"inlineCode",value:""}}function je(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ce(){return{type:"emphasis",children:[]}}function zt(){return{type:"heading",depth:0,children:[]}}function mt(){return{type:"break"}}function Ce(){return{type:"html",value:""}}function st(){return{type:"image",title:null,url:"",alt:null}}function at(){return{type:"link",title:null,url:"",children:[]}}function Xe(H){return{type:"list",ordered:H.type==="listOrdered",start:null,spread:H._spread,children:[]}}function rn(H){return{type:"listItem",spread:H._spread,checked:null,children:[]}}function oe(){return{type:"paragraph",children:[]}}function Qr(){return{type:"strong",children:[]}}function Xr(){return{type:"text",value:""}}function ze(){return{type:"thematicBreak"}}}function Pn(e){return{line:e.line,column:e.column,offset:e.offset}}function Sp(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Sp(e,r):f4(e,r)}}function f4(e,t){let n;for(n in t)if(Cp.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 Zc(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ei({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ei({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ei({start:t.start,end:t.end})+") is still open")}function p4(e){const t=this;t.parser=n;function n(r){return d4(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function m4(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 g4(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
126
|
+
`}]}function b4(e,t){const n=t.value?t.value+`
|
|
127
|
+
`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function E4(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function x4(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function y4(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=zr(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let a,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=s+1,o+=1,e.footnoteCounts.set(r,o);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,u);const l={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,l),e.applyData(t,l)}function T4(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 C4(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Ap(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 i=e.all(t),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function S4(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ap(e,t);const i={src:zr(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function A4(e,t){const n={src:zr(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 I4(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 k4(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ap(e,t);const i={href:zr(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function _4(e,t){const n={href:zr(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 v4(e,t,n){const r=e.all(t),i=n?D4(n):Ip(t),s={},a=[];if(typeof t.checked=="boolean"){const d=r[0];let c;d&&d.type==="element"&&d.tagName==="p"?c=d:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const d=r[o];(i||o!==0||d.type!=="element"||d.tagName!=="p")&&a.push({type:"text",value:`
|
|
128
|
+
`}),d.type==="element"&&d.tagName==="p"&&!i?a.push(...d.children):a.push(d)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&a.push({type:"text",value:`
|
|
129
|
+
`});const l={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,l),e.applyData(t,l)}function D4(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=Ip(n[r])}return t}function Ip(e){const t=e.spread;return t??e.children.length>1}function w4(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const a=r[i];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 s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function N4(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function P4(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function R4(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function L4(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=cn(t.children[1]),u=_a(t.children[t.children.length-1]);o&&u&&(a.position={start:o,end:u}),i.push(a)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function O4(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,o=a?a.length:t.children.length;let u=-1;const l=[];for(;++u<o;){const c=t.children[u],m={},p=a?a[u]:void 0;p&&(m.align=p);let g={type:"element",tagName:s,properties:m,children:[]};c&&(g.children=e.all(c),e.patch(c,g),g=e.applyData(c,g)),l.push(g)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,d),e.applyData(t,d)}function F4(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Jc=9,ed=32;function M4(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(td(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(td(t.slice(i),i>0,!1)),s.join("")}function td(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===Jc||s===ed;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===Jc||s===ed;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function B4(e,t){const n={type:"text",value:M4(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function j4(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const H4={blockquote:m4,break:g4,code:b4,delete:E4,emphasis:x4,footnoteReference:y4,heading:T4,html:C4,imageReference:S4,image:A4,inlineCode:I4,linkReference:k4,link:_4,listItem:v4,list:w4,paragraph:N4,root:P4,strong:R4,table:L4,tableCell:F4,tableRow:O4,text:B4,thematicBreak:j4,toml:cs,yaml:cs,definition:cs,footnoteDefinition:cs};function cs(){}const kp=-1,wa=0,yi=1,Xs=2,rl=3,il=4,sl=5,al=6,_p=7,vp=8,nd=typeof self=="object"?self:globalThis,U4=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,a]=t[i];switch(s){case wa:case kp:return n(a,i);case yi:{const o=n([],i);for(const u of a)o.push(r(u));return o}case Xs:{const o=n({},i);for(const[u,l]of a)o[r(u)]=r(l);return o}case rl:return n(new Date(a),i);case il:{const{source:o,flags:u}=a;return n(new RegExp(o,u),i)}case sl:{const o=n(new Map,i);for(const[u,l]of a)o.set(r(u),r(l));return o}case al:{const o=n(new Set,i);for(const u of a)o.add(r(u));return o}case _p:{const{name:o,message:u}=a;return n(new nd[o](u),i)}case vp:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:o}=new Uint8Array(a);return n(new DataView(o),a)}}return n(new nd[s](a),i)};return r},rd=e=>U4(new Map,e)(0),Er="",{toString:z4}={},{keys:$4}=Object,ii=e=>{const t=typeof e;if(t!=="object"||!e)return[wa,t];const n=z4.call(e).slice(8,-1);switch(n){case"Array":return[yi,Er];case"Object":return[Xs,Er];case"Date":return[rl,Er];case"RegExp":return[il,Er];case"Map":return[sl,Er];case"Set":return[al,Er];case"DataView":return[yi,n]}return n.includes("Array")?[yi,n]:n.includes("Error")?[_p,n]:[Xs,n]},ds=([e,t])=>e===wa&&(t==="function"||t==="symbol"),q4=(e,t,n,r)=>{const i=(a,o)=>{const u=r.push(a)-1;return n.set(o,u),u},s=a=>{if(n.has(a))return n.get(a);let[o,u]=ii(a);switch(o){case wa:{let d=a;switch(u){case"bigint":o=vp,d=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);d=null;break;case"undefined":return i([kp],a)}return i([o,d],a)}case yi:{if(u){let m=a;return u==="DataView"?m=new Uint8Array(a.buffer):u==="ArrayBuffer"&&(m=new Uint8Array(a)),i([u,[...m]],a)}const d=[],c=i([o,d],a);for(const m of a)d.push(s(m));return c}case Xs:{if(u)switch(u){case"BigInt":return i([u,a.toString()],a);case"Boolean":case"Number":case"String":return i([u,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const d=[],c=i([o,d],a);for(const m of $4(a))(e||!ds(ii(a[m])))&&d.push([s(m),s(a[m])]);return c}case rl:return i([o,a.toISOString()],a);case il:{const{source:d,flags:c}=a;return i([o,{source:d,flags:c}],a)}case sl:{const d=[],c=i([o,d],a);for(const[m,p]of a)(e||!(ds(ii(m))||ds(ii(p))))&&d.push([s(m),s(p)]);return c}case al:{const d=[],c=i([o,d],a);for(const m of a)(e||!ds(ii(m)))&&d.push(s(m));return c}}const{message:l}=a;return i([o,{name:u,message:l}],a)};return s},id=(e,{json:t,lossy:n}={})=>{const r=[];return q4(!(t||n),!!t,new Map,r)(e),r},ir=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?rd(id(e,t)):structuredClone(e):(e,t)=>rd(id(e,t));function V4(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 W4(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function G4(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||V4,r=e.options.footnoteBackLabel||W4,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let u=-1;for(;++u<e.footnoteOrder.length;){const l=e.footnoteById.get(e.footnoteOrder[u]);if(!l)continue;const d=e.all(l),c=String(l.identifier).toUpperCase(),m=zr(c.toLowerCase());let p=0;const g=[],b=e.footnoteCounts.get(c);for(;b!==void 0&&++p<=b;){g.length>0&&g.push({type:"text",value:" "});let C=typeof n=="string"?n:n(u,p);typeof C=="string"&&(C={type:"text",value:C}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,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 x={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(d,!0)};e.patch(l,x),o.push(x)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...ir(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
130
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
|
|
131
|
+
`}]}}const Na=function(e){if(e==null)return X4;if(typeof e=="function")return Pa(e);if(typeof e=="object")return Array.isArray(e)?Y4(e):K4(e);if(typeof e=="string")return Q4(e);throw new Error("Expected function, string, or object as test")};function Y4(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Na(e[n]);return Pa(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function K4(e){const t=e;return Pa(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function Q4(e){return Pa(t);function t(n){return n&&n.type===e}}function Pa(e){return t;function t(n,r,i){return!!(Z4(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function X4(){return!0}function Z4(e){return e!==null&&typeof e=="object"&&"type"in e}const Dp=[],J4=!0,Zs=!1,Ti="skip";function wp(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=Na(i),a=r?-1:1;o(e,void 0,[])();function o(u,l,d){const c=u&&typeof u=="object"?u:{};if(typeof c.type=="string"){const p=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(u.type+(p?"<"+p+">":""))+")"})}return m;function m(){let p=Dp,g,b,T;if((!t||s(u,l,d[d.length-1]||void 0))&&(p=eS(n(u,d)),p[0]===Zs))return p;if("children"in u&&u.children){const x=u;if(x.children&&p[0]!==Ti)for(b=(r?x.children.length:-1)+a,T=d.concat(x);b>-1&&b<x.children.length;){const C=x.children[b];if(g=o(C,b,T)(),g[0]===Zs)return g;b=typeof g[1]=="number"?g[1]:b+a}}return p}}}function eS(e){return Array.isArray(e)?e:typeof e=="number"?[J4,e]:e==null?Dp:[e]}function Lt(e,t,n,r){let i,s,a;typeof t=="function"&&typeof n!="function"?(s=void 0,a=t,i=n):(s=t,a=n,i=r),wp(e,s,o,i);function o(u,l){const d=l[l.length-1],c=d?d.children.indexOf(u):void 0;return a(u,c,d)}}const eu={}.hasOwnProperty,tS={};function nS(e,t){const n=t||tS,r=new Map,i=new Map,s=new Map,a={...H4,...n.handlers},o={all:l,applyData:iS,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:u,options:n,patch:rS,wrap:aS};return Lt(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const c=d.type==="definition"?r:i,m=String(d.identifier).toUpperCase();c.has(m)||c.set(m,d)}}),o;function u(d,c){const m=d.type,p=o.handlers[m];if(eu.call(o.handlers,m)&&p)return p(o,d,c);if(o.options.passThrough&&o.options.passThrough.includes(m)){if("children"in d){const{children:b,...T}=d,x=ir(T);return x.children=o.all(d),x}return ir(d)}return(o.options.unknownHandler||sS)(o,d,c)}function l(d){const c=[];if("children"in d){const m=d.children;let p=-1;for(;++p<m.length;){const g=o.one(m[p],d);if(g){if(p&&m[p-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=sd(g.value)),!Array.isArray(g)&&g.type==="element")){const b=g.children[0];b&&b.type==="text"&&(b.value=sd(b.value))}Array.isArray(g)?c.push(...g):c.push(g)}}}return c}}function rS(e,t){e.position&&(t.position=WT(e))}function iS(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=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"&&s&&Object.assign(n.properties,ir(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function sS(e,t){const n=t.data||{},r="value"in t&&!(eu.call(n,"hProperties")||eu.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 aS(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
132
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
133
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
134
|
+
`}),n}function sd(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ad(e,t){const n=nS(e,t),r=n.one(e,void 0),i=G4(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
|
|
135
|
+
`},i),s}function oS(e,t){return e&&"run"in e?async function(n,r){const i=ad(n,{file:r,...t});await e.run(i,r)}:function(n,r){return ad(n,{file:r,...e||t})}}function od(e){if(e)throw e}var ao,ud;function uS(){if(ud)return ao;ud=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(l){return typeof Array.isArray=="function"?Array.isArray(l):t.call(l)==="[object Array]"},s=function(l){if(!l||t.call(l)!=="[object Object]")return!1;var d=e.call(l,"constructor"),c=l.constructor&&l.constructor.prototype&&e.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!d&&!c)return!1;var m;for(m in l);return typeof m>"u"||e.call(l,m)},a=function(l,d){n&&d.name==="__proto__"?n(l,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):l[d.name]=d.newValue},o=function(l,d){if(d==="__proto__")if(e.call(l,d)){if(r)return r(l,d).value}else return;return l[d]};return ao=function u(){var l,d,c,m,p,g,b=arguments[0],T=1,x=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<x;++T)if(l=arguments[T],l!=null)for(d in l)c=o(b,d),m=o(l,d),b!==m&&(C&&m&&(s(m)||(p=i(m)))?(p?(p=!1,g=c&&i(c)?c:[]):g=c&&s(c)?c:{},a(b,{name:d,newValue:u(C,g,m)})):typeof m<"u"&&a(b,{name:d,newValue:m}));return b},ao}var lS=uS();const oo=sa(lS);function tu(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 cS(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);o(null,...i);function o(u,...l){const d=e[++s];let c=-1;if(u){a(u);return}for(;++c<i.length;)(l[c]===null||l[c]===void 0)&&(l[c]=i[c]);i=l,d?dS(d,o)(...l):a(null,...l)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function dS(e,t){let n;return r;function r(...a){const o=e.length>a.length;let u;o&&a.push(i);try{u=e.apply(this,a)}catch(l){const d=l;if(o&&n)throw d;return i(d)}o||(u&&u.then&&typeof u.then=="function"?u.then(s,i):u instanceof Error?i(u):s(u))}function i(a,...o){n||(n=!0,t(a,...o))}function s(a){i(null,a)}}const un={basename:hS,dirname:fS,extname:pS,join:mS,sep:"/"};function hS(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Xi(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else a<0&&(s=!0,a=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function fS(e){if(Xi(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 pS(e){Xi(e);let t=e.length,n=-1,r=0,i=-1,s=0,a;for(;t--;){const o=e.codePointAt(t);if(o===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),o===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function mS(...e){let t=-1,n;for(;++t<e.length;)Xi(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":gS(n)}function gS(e){Xi(e);const t=e.codePointAt(0)===47;let n=bS(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function bS(e,t){let n="",r=0,i=-1,s=0,a=-1,o,u;for(;++a<=e.length;){if(a<e.length)o=e.codePointAt(a);else{if(o===47)break;o=47}if(o===47){if(!(i===a-1||s===1))if(i!==a-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=a,s=0;continue}}else if(n.length>0){n="",r=0,i=a,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,s=0}else o===46&&s>-1?s++:s=-1}return n}function Xi(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const ES={cwd:xS};function xS(){return"/"}function nu(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function yS(e){if(typeof e=="string")e=new URL(e);else if(!nu(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 TS(e)}function TS(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 i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const uo=["history","path","basename","stem","extname","dirname"];class Np{constructor(t){let n;t?nu(t)?n={path:t}:typeof t=="string"||CS(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":ES.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<uo.length;){const s=uo[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)uo.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?un.basename(this.path):void 0}set basename(t){co(t,"basename"),lo(t,"basename"),this.path=un.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?un.dirname(this.path):void 0}set dirname(t){ld(this.basename,"dirname"),this.path=un.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?un.extname(this.path):void 0}set extname(t){if(lo(t,"extname"),ld(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=un.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){nu(t)&&(t=yS(t)),co(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?un.basename(this.path,this.extname):void 0}set stem(t){co(t,"stem"),lo(t,"stem"),this.path=un.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new At(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function lo(e,t){if(e&&e.includes(un.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+un.sep+"`")}function co(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ld(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function CS(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const SS=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},AS={}.hasOwnProperty;class ol extends SS{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=cS()}copy(){const t=new ol;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(oo(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(po("data",this.frozen),this.namespace[t]=n,this):AS.call(this.namespace,t)&&this.namespace[t]||void 0:t?(po("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 i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=hs(t),r=this.parser||this.Parser;return ho("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ho("process",this.parser||this.Parser),fo("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,a){const o=hs(t),u=r.parse(o);r.run(u,o,function(d,c,m){if(d||!c||!m)return l(d);const p=c,g=r.stringify(p,m);_S(g)?m.value=g:m.result=g,l(d,m)});function l(d,c){d||!c?a(d):s?s(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),ho("processSync",this.parser||this.Parser),fo("processSync",this.compiler||this.Compiler),this.process(t,i),dd("processSync","process",n),r;function i(s,a){n=!0,od(s),r=a}}run(t,n,r){cd(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(a,o){const u=hs(n);i.run(t,u,l);function l(d,c,m){const p=c||t;d?o(d):a?a(p):r(void 0,p,m)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),dd("runSync","run",r),i;function s(a,o){od(a),i=o,r=!0}}stringify(t,n){this.freeze();const r=hs(n),i=this.compiler||this.Compiler;return fo("stringify",i),cd(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(po("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(l){if(typeof l=="function")u(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[d,...c]=l;u(d,c)}else a(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function a(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(l.plugins),l.settings&&(i.settings=oo(!0,i.settings,l.settings))}function o(l){let d=-1;if(l!=null)if(Array.isArray(l))for(;++d<l.length;){const c=l[d];s(c)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function u(l,d){let c=-1,m=-1;for(;++c<r.length;)if(r[c][0]===l){m=c;break}if(m===-1)r.push([l,...d]);else if(d.length>0){let[p,...g]=d;const b=r[m][1];tu(b)&&tu(p)&&(p=oo(!0,b,p)),r[m]=[l,p,...g]}}}}const IS=new ol().freeze();function ho(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function fo(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function po(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 cd(e){if(!tu(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function dd(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function hs(e){return kS(e)?e:new Np(e)}function kS(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function _S(e){return typeof e=="string"||vS(e)}function vS(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const DS="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",hd=[],fd={allowDangerousHtml:!0},wS=/^(https?|ircs?|mailto|xmpp)$/i,NS=[{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 PS(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,s=e.components,a=e.disallowedElements,o=e.rehypePlugins||hd,u=e.remarkPlugins||hd,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...fd}:fd,d=e.skipHtml,c=e.unwrapDisallowed,m=e.urlTransform||RS,p=IS().use(p4).use(u).use(oS,l).use(o),g=new Np;typeof r=="string"&&(g.value=r);for(const C of NS)Object.hasOwn(e,C.from)&&(""+C.from+(C.to?"use `"+C.to+"` instead":"remove it")+DS+C.id,void 0);const b=p.parse(g);let T=p.runSync(b,g);return i&&(T={type:"element",tagName:"div",properties:{className:i},children:T.type==="root"?T.children:[T]}),Lt(T,x),XT(T,{Fragment:h.Fragment,components:s,ignoreInvalidStyle:!0,jsx:h.jsx,jsxs:h.jsxs,passKeys:!0,passNode:!0});function x(C,S,w){if(C.type==="raw"&&w&&typeof S=="number")return d?w.children.splice(S,1):w.children[S]={type:"text",value:C.value},S;if(C.type==="element"){let D;for(D in ro)if(Object.hasOwn(ro,D)&&Object.hasOwn(C.properties,D)){const N=C.properties[D],B=ro[D];(B===null||B.includes(C.tagName))&&(C.properties[D]=m(String(N||""),D,C))}}if(C.type==="element"){let D=t?!t.includes(C.tagName):a?a.includes(C.tagName):!1;if(!D&&n&&typeof S=="number"&&(D=!n(C,S,w)),D&&w&&typeof S=="number")return c&&C.children?w.children.splice(S,1,...C.children):w.children.splice(S,1),S}}}function RS(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||wS.test(e.slice(0,t))?e:""}function LS(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function OS(e,t,n){const i=Na((n||{}).ignore||[]),s=FS(t);let a=-1;for(;++a<s.length;)wp(e,"text",o);function o(l,d){let c=-1,m;for(;++c<d.length;){const p=d[c],g=m?m.children:void 0;if(i(p,g?g.indexOf(p):void 0,m))return;m=p}if(m)return u(l,d)}function u(l,d){const c=d[d.length-1],m=s[a][0],p=s[a][1];let g=0;const T=c.children.indexOf(l);let x=!1,C=[];m.lastIndex=0;let S=m.exec(l.value);for(;S;){const w=S.index,D={index:S.index,input:S.input,stack:[...d,l]};let N=p(...S,D);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?m.lastIndex=w+1:(g!==w&&C.push({type:"text",value:l.value.slice(g,w)}),Array.isArray(N)?C.push(...N):N&&C.push(N),g=w+S[0].length,x=!0),!m.global)break;S=m.exec(l.value)}return x?(g<l.value.length&&C.push({type:"text",value:l.value.slice(g)}),c.children.splice(T,1,...C)):C=[l],T+C.length}}function FS(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 i=n[r];t.push([MS(i[0]),BS(i[1])])}return t}function MS(e){return typeof e=="string"?new RegExp(LS(e),"g"):e}function BS(e){return typeof e=="function"?e:function(){return e}}const mo="phrasing",go=["autolink","link","image","label"];function jS(){return{transforms:[WS],enter:{literalAutolink:US,literalAutolinkEmail:bo,literalAutolinkHttp:bo,literalAutolinkWww:bo},exit:{literalAutolink:VS,literalAutolinkEmail:qS,literalAutolinkHttp:zS,literalAutolinkWww:$S}}}function HS(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:mo,notInConstruct:go},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:mo,notInConstruct:go},{character:":",before:"[ps]",after:"\\/",inConstruct:mo,notInConstruct:go}]}}function US(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function bo(e){this.config.enter.autolinkProtocol.call(this,e)}function zS(e){this.config.exit.autolinkProtocol.call(this,e)}function $S(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 qS(e){this.config.exit.autolinkEmail.call(this,e)}function VS(e){this.exit(e)}function WS(e){OS(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,GS],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,YS]],{ignore:["link","linkReference"]})}function GS(e,t,n,r,i){let s="";if(!Pp(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!KS(n)))return!1;const a=QS(n+r);if(!a[0])return!1;const o={type:"link",title:null,url:s+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[o,{type:"text",value:a[1]}]:o}function YS(e,t,n,r){return!Pp(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function KS(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 QS(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 i=Us(e,"(");let s=Us(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function Pp(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||rr(n)||va(n))&&(!t||n!==47)}Rp.peek=sA;function XS(){this.buffer()}function ZS(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function JS(){this.buffer()}function eA(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function tA(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=en(this.sliceSerialize(e)).toLowerCase(),n.label=t}function nA(e){this.exit(e)}function rA(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=en(this.sliceSerialize(e)).toLowerCase(),n.label=t}function iA(e){this.exit(e)}function sA(){return"["}function Rp(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const a=n.enter("footnoteReference"),o=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),o(),a(),s+=i.move("]"),s}function aA(){return{enter:{gfmFootnoteCallString:XS,gfmFootnoteCall:ZS,gfmFootnoteDefinitionLabelString:JS,gfmFootnoteDefinition:eA},exit:{gfmFootnoteCallString:tA,gfmFootnoteCall:nA,gfmFootnoteDefinitionLabelString:rA,gfmFootnoteDefinition:iA}}}function oA(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Rp},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,a){const o=s.createTracker(a);let u=o.move("[^");const l=s.enter("footnoteDefinition"),d=s.enter("label");return u+=o.move(s.safe(s.associationId(r),{before:u,after:"]"})),d(),u+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),u+=o.move((t?`
|
|
136
|
+
`:" ")+s.indentLines(s.containerFlow(r,o.current()),t?Lp:uA))),l(),u}}function uA(e,t,n){return t===0?e:Lp(e,t,n)}function Lp(e,t,n){return(n?"":" ")+e}const lA=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Op.peek=pA;function cA(){return{canContainEols:["delete"],enter:{strikethrough:hA},exit:{strikethrough:fA}}}function dA(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:lA}],handlers:{delete:Op}}}function hA(e){this.enter({type:"delete",children:[]},e)}function fA(e){this.exit(e)}function Op(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),s(),a}function pA(){return"~"}function mA(e){return e.length}function gA(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||mA,s=[],a=[],o=[],u=[];let l=0,d=-1;for(;++d<e.length;){const b=[],T=[];let x=-1;for(e[d].length>l&&(l=e[d].length);++x<e[d].length;){const C=bA(e[d][x]);if(n.alignDelimiters!==!1){const S=i(C);T[x]=S,(u[x]===void 0||S>u[x])&&(u[x]=S)}b.push(C)}a[d]=b,o[d]=T}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<l;)s[c]=pd(r[c]);else{const b=pd(r);for(;++c<l;)s[c]=b}c=-1;const m=[],p=[];for(;++c<l;){const b=s[c];let T="",x="";b===99?(T=":",x=":"):b===108?T=":":b===114&&(x=":");let C=n.alignDelimiters===!1?1:Math.max(1,u[c]-T.length-x.length);const S=T+"-".repeat(C)+x;n.alignDelimiters!==!1&&(C=T.length+C+x.length,C>u[c]&&(u[c]=C),p[c]=C),m[c]=S}a.splice(1,0,m),o.splice(1,0,p),d=-1;const g=[];for(;++d<a.length;){const b=a[d],T=o[d];c=-1;const x=[];for(;++c<l;){const C=b[c]||"";let S="",w="";if(n.alignDelimiters!==!1){const D=u[c]-(T[c]||0),N=s[c];N===114?S=" ".repeat(D):N===99?D%2?(S=" ".repeat(D/2+.5),w=" ".repeat(D/2-.5)):(S=" ".repeat(D/2),w=S):w=" ".repeat(D)}n.delimiterStart!==!1&&!c&&x.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&C==="")&&(n.delimiterStart!==!1||c)&&x.push(" "),n.alignDelimiters!==!1&&x.push(S),x.push(C),n.alignDelimiters!==!1&&x.push(w),n.padding!==!1&&x.push(" "),(n.delimiterEnd!==!1||c!==l-1)&&x.push("|")}g.push(n.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return g.join(`
|
|
137
|
+
`)}function bA(e){return e==null?"":String(e)}function pd(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 EA(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const a=n.indentLines(n.containerFlow(e,s.current()),xA);return i(),a}function xA(e,t,n){return">"+(n?"":" ")+e}function yA(e,t){return md(e,t.inConstruct,!0)&&!md(e,t.notInConstruct,!1)}function md(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 gd(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
138
|
+
`&&yA(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
139
|
+
`}function TA(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>a&&(a=s):s=1,i=r+t.length,r=n.indexOf(t,i);return a}function CA(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 SA(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 AA(e,t,n,r){const i=SA(n),s=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(CA(e,n)){const c=n.enter("codeIndented"),m=n.indentLines(s,IA);return c(),m}const o=n.createTracker(r),u=i.repeat(Math.max(TA(s,i)+1,3)),l=n.enter("codeFenced");let d=o.move(u);if(e.lang){const c=n.enter(`codeFencedLang${a}`);d+=o.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...o.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${a}`);d+=o.move(" "),d+=o.move(n.safe(e.meta,{before:d,after:`
|
|
140
|
+
`,encode:["`"],...o.current()})),c()}return d+=o.move(`
|
|
141
|
+
`),s&&(d+=o.move(s+`
|
|
142
|
+
`)),d+=o.move(u),l(),d}function IA(e,t,n){return(n?"":" ")+e}function ul(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 kA(e,t,n,r){const i=ul(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let o=n.enter("label");const u=n.createTracker(r);let l=u.move("[");return l+=u.move(n.safe(n.associationId(e),{before:l,after:"]",...u.current()})),l+=u.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(o=n.enter("destinationRaw"),l+=u.move(n.safe(e.url,{before:l,after:e.title?" ":`
|
|
143
|
+
`,...u.current()}))),o(),e.title&&(o=n.enter(`title${s}`),l+=u.move(" "+i),l+=u.move(n.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),o()),a(),l}function _A(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 Bi(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Js(e,t,n){const r=Rr(e),i=Rr(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Fp.peek=vA;function Fp(e,t,n,r){const i=_A(n),s=n.enter("emphasis"),a=n.createTracker(r),o=a.move(i);let u=a.move(n.containerPhrasing(e,{after:i,before:o,...a.current()}));const l=u.charCodeAt(0),d=Js(r.before.charCodeAt(r.before.length-1),l,i);d.inside&&(u=Bi(l)+u.slice(1));const c=u.charCodeAt(u.length-1),m=Js(r.after.charCodeAt(0),c,i);m.inside&&(u=u.slice(0,-1)+Bi(c));const p=a.move(i);return s(),n.attentionEncodeSurroundingInfo={after:m.outside,before:d.outside},o+u+p}function vA(e,t,n){return n.options.emphasis||"*"}function DA(e,t){let n=!1;return Lt(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Zs}),!!((!e.depth||e.depth<3)&&el(e)&&(t.options.setext||n))}function wA(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(DA(e,n)){const d=n.enter("headingSetext"),c=n.enter("phrasing"),m=n.containerPhrasing(e,{...s.current(),before:`
|
|
144
|
+
`,after:`
|
|
145
|
+
`});return c(),d(),m+`
|
|
146
|
+
`+(i===1?"=":"-").repeat(m.length-(Math.max(m.lastIndexOf("\r"),m.lastIndexOf(`
|
|
147
|
+
`))+1))}const a="#".repeat(i),o=n.enter("headingAtx"),u=n.enter("phrasing");s.move(a+" ");let l=n.containerPhrasing(e,{before:"# ",after:`
|
|
148
|
+
`,...s.current()});return/^[\t ]/.test(l)&&(l=Bi(l.charCodeAt(0))+l.slice(1)),l=l?a+" "+l:a,n.options.closeAtx&&(l+=" "+a),u(),o(),l}Mp.peek=NA;function Mp(e){return e.value||""}function NA(){return"<"}Bp.peek=PA;function Bp(e,t,n,r){const i=ul(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let o=n.enter("label");const u=n.createTracker(r);let l=u.move("![");return l+=u.move(n.safe(e.alt,{before:l,after:"]",...u.current()})),l+=u.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(o=n.enter("destinationRaw"),l+=u.move(n.safe(e.url,{before:l,after:e.title?" ":")",...u.current()}))),o(),e.title&&(o=n.enter(`title${s}`),l+=u.move(" "+i),l+=u.move(n.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),o()),l+=u.move(")"),a(),l}function PA(){return"!"}jp.peek=RA;function jp(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let a=n.enter("label");const o=n.createTracker(r);let u=o.move("![");const l=n.safe(e.alt,{before:u,after:"]",...o.current()});u+=o.move(l+"]["),a();const d=n.stack;n.stack=[],a=n.enter("reference");const c=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return a(),n.stack=d,s(),i==="full"||!l||l!==c?u+=o.move(c+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function RA(){return"!"}Hp.peek=LA;function Hp(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const a=n.unsafe[s],o=n.compilePattern(a);let u;if(a.atBreak)for(;u=o.exec(r);){let l=u.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(u.index+1)}}return i+r+i}function LA(){return"`"}function Up(e,t){const n=el(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))}zp.peek=OA;function zp(e,t,n,r){const i=ul(n),s=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let o,u;if(Up(e,n)){const d=n.stack;n.stack=[],o=n.enter("autolink");let c=a.move("<");return c+=a.move(n.containerPhrasing(e,{before:c,after:">",...a.current()})),c+=a.move(">"),o(),n.stack=d,c}o=n.enter("link"),u=n.enter("label");let l=a.move("[");return l+=a.move(n.containerPhrasing(e,{before:l,after:"](",...a.current()})),l+=a.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),l+=a.move("<"),l+=a.move(n.safe(e.url,{before:l,after:">",...a.current()})),l+=a.move(">")):(u=n.enter("destinationRaw"),l+=a.move(n.safe(e.url,{before:l,after:e.title?" ":")",...a.current()}))),u(),e.title&&(u=n.enter(`title${s}`),l+=a.move(" "+i),l+=a.move(n.safe(e.title,{before:l,after:i,...a.current()})),l+=a.move(i),u()),l+=a.move(")"),o(),l}function OA(e,t,n){return Up(e,n)?"<":"["}$p.peek=FA;function $p(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let a=n.enter("label");const o=n.createTracker(r);let u=o.move("[");const l=n.containerPhrasing(e,{before:u,after:"]",...o.current()});u+=o.move(l+"]["),a();const d=n.stack;n.stack=[],a=n.enter("reference");const c=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return a(),n.stack=d,s(),i==="full"||!l||l!==c?u+=o.move(c+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function FA(){return"["}function ll(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 MA(e){const t=ll(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 BA(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 qp(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 jA(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let a=e.ordered?BA(n):ll(n);const o=e.ordered?a==="."?")":".":MA(n);let u=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&&(u=!0),qp(n)===a&&d){let c=-1;for(;++c<e.children.length;){const m=e.children[c];if(m&&m.type==="listItem"&&m.children&&m.children[0]&&m.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(a=o),n.bulletCurrent=a;const l=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=s,i(),l}function HA(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 UA(e,t,n,r){const i=HA(n);let s=n.bulletCurrent||ll(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const o=n.createTracker(r);o.move(s+" ".repeat(a-s.length)),o.shift(a);const u=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,o.current()),d);return u(),l;function d(c,m,p){return m?(p?"":" ".repeat(a))+c:(p?s:s+" ".repeat(a-s.length))+c}}function zA(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),i(),a}const $A=Na(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function qA(e,t,n,r){return(e.children.some(function(a){return $A(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function VA(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Vp.peek=WA;function Vp(e,t,n,r){const i=VA(n),s=n.enter("strong"),a=n.createTracker(r),o=a.move(i+i);let u=a.move(n.containerPhrasing(e,{after:i,before:o,...a.current()}));const l=u.charCodeAt(0),d=Js(r.before.charCodeAt(r.before.length-1),l,i);d.inside&&(u=Bi(l)+u.slice(1));const c=u.charCodeAt(u.length-1),m=Js(r.after.charCodeAt(0),c,i);m.inside&&(u=u.slice(0,-1)+Bi(c));const p=a.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:m.outside,before:d.outside},o+u+p}function WA(e,t,n){return n.options.strong||"*"}function GA(e,t,n,r){return n.safe(e.value,r)}function YA(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 KA(e,t,n){const r=(qp(n)+(n.options.ruleSpaces?" ":"")).repeat(YA(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Wp={blockquote:EA,break:gd,code:AA,definition:kA,emphasis:Fp,hardBreak:gd,heading:wA,html:Mp,image:Bp,imageReference:jp,inlineCode:Hp,link:zp,linkReference:$p,list:jA,listItem:UA,paragraph:zA,root:qA,strong:Vp,text:GA,thematicBreak:KA};function QA(){return{enter:{table:XA,tableData:bd,tableHeader:bd,tableRow:JA},exit:{codeText:e5,table:ZA,tableData:Eo,tableHeader:Eo,tableRow:Eo}}}function XA(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 ZA(e){this.exit(e),this.data.inTable=void 0}function JA(e){this.enter({type:"tableRow",children:[]},e)}function Eo(e){this.exit(e)}function bd(e){this.enter({type:"tableCell",children:[]},e)}function e5(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,t5));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function t5(e,t){return t==="|"?t:e}function n5(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
149
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:m,table:a,tableCell:u,tableRow:o}};function a(p,g,b,T){return l(d(p,b,T),p.align)}function o(p,g,b,T){const x=c(p,b,T),C=l([x]);return C.slice(0,C.indexOf(`
|
|
150
|
+
`))}function u(p,g,b,T){const x=b.enter("tableCell"),C=b.enter("phrasing"),S=b.containerPhrasing(p,{...T,before:s,after:s});return C(),x(),S}function l(p,g){return gA(p,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function d(p,g,b){const T=p.children;let x=-1;const C=[],S=g.enter("table");for(;++x<T.length;)C[x]=c(T[x],g,b);return S(),C}function c(p,g,b){const T=p.children;let x=-1;const C=[],S=g.enter("tableRow");for(;++x<T.length;)C[x]=u(T[x],p,g,b);return S(),C}function m(p,g,b){let T=Wp.inlineCode(p,g,b);return b.stack.includes("tableCell")&&(T=T.replace(/\|/g,"\\$&")),T}}function r5(){return{exit:{taskListCheckValueChecked:Ed,taskListCheckValueUnchecked:Ed,paragraph:s5}}}function i5(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:a5}}}function Ed(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function s5(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 i=t.children;let s=-1,a;for(;++s<i.length;){const o=i[s];if(o.type==="paragraph"){a=o;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 a5(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);s&&o.move(a);let u=Wp.listItem(e,t,n,{...r,...o.current()});return s&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(d){return d+a}}function o5(){return[jS(),aA(),cA(),QA(),r5()]}function u5(e){return{extensions:[HS(),oA(e),dA(),n5(e),i5()]}}const l5={tokenize:m5,partial:!0},Gp={tokenize:g5,partial:!0},Yp={tokenize:b5,partial:!0},Kp={tokenize:E5,partial:!0},c5={tokenize:x5,partial:!0},Qp={name:"wwwAutolink",tokenize:f5,previous:Zp},Xp={name:"protocolAutolink",tokenize:p5,previous:Jp},vn={name:"emailAutolink",tokenize:h5,previous:em},dn={};function d5(){return{text:dn}}let $n=48;for(;$n<123;)dn[$n]=vn,$n++,$n===58?$n=65:$n===91&&($n=97);dn[43]=vn;dn[45]=vn;dn[46]=vn;dn[95]=vn;dn[72]=[vn,Xp];dn[104]=[vn,Xp];dn[87]=[vn,Qp];dn[119]=[vn,Qp];function h5(e,t,n){const r=this;let i,s;return a;function a(c){return!ru(c)||!em.call(r,r.previous)||cl(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(c))}function o(c){return ru(c)?(e.consume(c),o):c===64?(e.consume(c),u):n(c)}function u(c){return c===46?e.check(c5,d,l)(c):c===45||c===95||Et(c)?(s=!0,e.consume(c),u):d(c)}function l(c){return e.consume(c),i=!0,u}function d(c){return s&&i&&vt(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function f5(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!Zp.call(r,r.previous)||cl(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(l5,e.attempt(Gp,e.attempt(Yp,s),n),n)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function p5(e,t,n){const r=this;let i="",s=!1;return a;function a(c){return(c===72||c===104)&&Jp.call(r,r.previous)&&!cl(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),o):n(c)}function o(c){if(vt(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),o;if(c===58){const m=i.toLowerCase();if(m==="http"||m==="https")return e.consume(c),u}return n(c)}function u(c){return c===47?(e.consume(c),s?l:(s=!0,u)):n(c)}function l(c){return c===null||Qs(c)||Le(c)||rr(c)||va(c)?n(c):e.attempt(Gp,e.attempt(Yp,d),n)(c)}function d(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function m5(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),s):n(a)}function s(a){return a===null?n(a):t(a)}}function g5(e,t,n){let r,i,s;return a;function a(l){return l===46||l===95?e.check(Kp,u,o)(l):l===null||Le(l)||rr(l)||l!==45&&va(l)?u(l):(s=!0,e.consume(l),a)}function o(l){return l===95?r=!0:(i=r,r=void 0),e.consume(l),a}function u(l){return i||r||!s?n(l):t(l)}}function b5(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?s(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(Kp,t,s)(a):a===null||Le(a)||rr(a)?t(a):(e.consume(a),i)}function s(a){return a===41&&r++,e.consume(a),i}}function E5(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),s):o===93?(e.consume(o),i):o===60||o===null||Le(o)||rr(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||Le(o)||rr(o)?t(o):r(o)}function s(o){return vt(o)?a(o):n(o)}function a(o){return o===59?(e.consume(o),r):vt(o)?(e.consume(o),a):n(o)}}function x5(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return Et(s)?n(s):t(s)}}function Zp(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Le(e)}function Jp(e){return!vt(e)}function em(e){return!(e===47||ru(e))}function ru(e){return e===43||e===45||e===46||e===95||Et(e)}function cl(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 y5={tokenize:v5,partial:!0};function T5(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:I5,continuation:{tokenize:k5},exit:_5}},text:{91:{name:"gfmFootnoteCall",tokenize:A5},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:C5,resolveTo:S5}}}}function C5(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){a=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return o;function o(u){if(!a||!a._balanced)return n(u);const l=en(r.sliceSerialize({start:a.end,end:r.now()}));return l.codePointAt(0)!==94||!s.includes(l.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function S5(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)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function A5(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;return o;function o(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),u}function u(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(c){if(s>999||c===93&&!a||c===null||c===91||Le(c))return n(c);if(c===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return i.includes(en(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return Le(c)||(a=!0),s++,e.consume(c),c===92?d:l}function d(c){return c===91||c===92||c===93?(e.consume(c),s++,l):l(c)}}function I5(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,o;return u;function u(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(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&&!o||g===null||g===91||Le(g))return n(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return s=en(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return Le(g)||(o=!0),a++,e.consume(g),g===92?c:d}function c(g){return g===91||g===92||g===93?(e.consume(g),a++,d):d(g)}function m(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(s)||i.push(s),_e(e,p,"gfmFootnoteDefinitionWhitespace")):n(g)}function p(g){return t(g)}}function k5(e,t,n){return e.check(Qi,t,e.attempt(y5,t,n))}function _5(e){e.exit("gfmFootnoteDefinition")}function v5(e,t,n){const r=this;return _e(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):n(s)}}function D5(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,o){let u=-1;for(;++u<a.length;)if(a[u][0]==="enter"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._close){let l=u;for(;l--;)if(a[l][0]==="exit"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._open&&a[u][1].end.offset-a[u][1].start.offset===a[l][1].end.offset-a[l][1].start.offset){a[u][1].type="strikethroughSequence",a[l][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},a[l][1].start),end:Object.assign({},a[u][1].end)},c={type:"strikethroughText",start:Object.assign({},a[l][1].end),end:Object.assign({},a[u][1].start)},m=[["enter",d,o],["enter",a[l][1],o],["exit",a[l][1],o],["enter",c,o]],p=o.parser.constructs.insideSpan.null;p&&Ht(m,m.length,0,Da(p,a.slice(l+1,u),o)),Ht(m,m.length,0,[["exit",c,o],["enter",a[u][1],o],["exit",a[u][1],o],["exit",d,o]]),Ht(a,l-1,u-l+3,m),u=l+m.length-2;break}}for(u=-1;++u<a.length;)a[u][1].type==="strikethroughSequenceTemporary"&&(a[u][1].type="data");return a}function s(a,o,u){const l=this.previous,d=this.events;let c=0;return m;function m(g){return l===126&&d[d.length-1][1].type!=="characterEscape"?u(g):(a.enter("strikethroughSequenceTemporary"),p(g))}function p(g){const b=Rr(l);if(g===126)return c>1?u(g):(a.consume(g),c++,p);if(c<2&&!n)return u(g);const T=a.exit("strikethroughSequenceTemporary"),x=Rr(g);return T._open=!x||x===2&&!!b,T._close=!b||b===2&&!!x,o(g)}}}class w5{constructor(){this.map=[]}add(t,n,r){N5(this,t,n,r)}consume(t){if(this.map.sort(function(s,a){return s[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 i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0}}function N5(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function P5(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function R5(){return{flow:{null:{name:"table",tokenize:L5,resolveAll:O5}}}}function L5(e,t,n){const r=this;let i=0,s=0,a;return o;function o(E){let L=r.events.length-1;for(;L>-1;){const M=r.events[L][1].type;if(M==="lineEnding"||M==="linePrefix")L--;else break}const O=L>-1?r.events[L][1].type:null,z=O==="tableHead"||O==="tableRow"?N:u;return z===N&&r.parser.lazy[r.now().line]?n(E):z(E)}function u(E){return e.enter("tableHead"),e.enter("tableRow"),l(E)}function l(E){return E===124||(a=!0,s+=1),d(E)}function d(E){return E===null?n(E):he(E)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),p):n(E):ke(E)?_e(e,d,"whitespace")(E):(s+=1,a&&(a=!1,i+=1),E===124?(e.enter("tableCellDivider"),e.consume(E),e.exit("tableCellDivider"),a=!0,d):(e.enter("data"),c(E)))}function c(E){return E===null||E===124||Le(E)?(e.exit("data"),d(E)):(e.consume(E),E===92?m:c)}function m(E){return E===92||E===124?(e.consume(E),c):c(E)}function p(E){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(E):(e.enter("tableDelimiterRow"),a=!1,ke(E)?_e(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):g(E))}function g(E){return E===45||E===58?T(E):E===124?(a=!0,e.enter("tableCellDivider"),e.consume(E),e.exit("tableCellDivider"),b):D(E)}function b(E){return ke(E)?_e(e,T,"whitespace")(E):T(E)}function T(E){return E===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(E),e.exit("tableDelimiterMarker"),x):E===45?(s+=1,x(E)):E===null||he(E)?w(E):D(E)}function x(E){return E===45?(e.enter("tableDelimiterFiller"),C(E)):D(E)}function C(E){return E===45?(e.consume(E),C):E===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(E),e.exit("tableDelimiterMarker"),S):(e.exit("tableDelimiterFiller"),S(E))}function S(E){return ke(E)?_e(e,w,"whitespace")(E):w(E)}function w(E){return E===124?g(E):E===null||he(E)?!a||i!==s?D(E):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(E)):D(E)}function D(E){return n(E)}function N(E){return e.enter("tableRow"),B(E)}function B(E){return E===124?(e.enter("tableCellDivider"),e.consume(E),e.exit("tableCellDivider"),B):E===null||he(E)?(e.exit("tableRow"),t(E)):ke(E)?_e(e,B,"whitespace")(E):(e.enter("data"),Z(E))}function Z(E){return E===null||E===124||Le(E)?(e.exit("data"),B(E)):(e.consume(E),E===92?J:Z)}function J(E){return E===92||E===124?(e.consume(E),Z):Z(E)}}function O5(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],o=!1,u=0,l,d,c;const m=new w5;for(;++n<e.length;){const p=e[n],g=p[1];p[0]==="enter"?g.type==="tableHead"?(o=!1,u!==0&&(xd(m,t,u,l,d),d=void 0,u=0),l={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},m.add(n,0,[["enter",l,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,c=void 0,s=[0,0,0,0],a=[0,n+1,0,0],o&&(o=!1,d={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},m.add(n,0,[["enter",d,t]])),i=g.type==="tableDelimiterRow"?2:d?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],c=fs(m,t,s,i,void 0,c),s=[0,0,0,0]),a[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],c=fs(m,t,s,i,void 0,c)),s=a,a=[s[1],n,0,0])):g.type==="tableHead"?(o=!0,u=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(u=n,s[1]!==0?(a[0]=a[1],c=fs(m,t,s,i,n,c)):a[1]!==0&&(c=fs(m,t,a,i,n,c)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(a[3]=n)}for(u!==0&&xd(m,t,u,l,d),m.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=P5(t.events,n))}return e}function fs(e,t,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(s.end=Object.assign({},Tr(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const u=Tr(t.events,n[1]);if(s={type:a,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const l=Tr(t.events,n[2]),d=Tr(t.events,n[3]),c={type:o,start:Object.assign({},l),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const m=t.events[n[2]],p=t.events[n[3]];if(m[1].end=Object.assign({},p[1].end),m[1].type="chunkText",m[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",c,t]])}return i!==void 0&&(s.end=Object.assign({},Tr(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function xd(e,t,n,r,i){const s=[],a=Tr(t.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,t])),r.end=Object.assign({},a),s.push(["exit",r,t]),e.add(n+1,0,s)}function Tr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const F5={name:"tasklistCheck",tokenize:B5};function M5(){return{text:{91:F5}}}function B5(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),s)}function s(u){return Le(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),a):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),a):n(u)}function a(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(u)}function o(u){return he(u)?t(u):ke(u)?e.check({tokenize:j5},t,n)(u):n(u)}}function j5(e,t,n){return _e(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function H5(e){return dp([d5(),T5(),D5(e),R5(),M5()])}const U5={};function z5(e){const t=this,n=e||U5,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(H5(n)),s.push(o5()),a.push(u5(n))}const yd=/[#.]/g;function $5(e,t){const n=e||"",r={};let i=0,s,a;for(;i<n.length;){yd.lastIndex=i;const o=yd.exec(n),u=n.slice(i,o?o.index:n.length);u&&(s?s==="#"?r.id=u:Array.isArray(r.className)?r.className.push(u):r.className=[u]:a=u,i+=u.length),o&&(s=o[0],i++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}function tm(e,t,n){const r=n?G5(n):void 0;function i(s,a,...o){let u;if(s==null){u={type:"root",children:[]};const l=a;o.unshift(l)}else{u=$5(s,t);const l=u.tagName.toLowerCase(),d=r?r.get(l):void 0;if(u.tagName=d||l,q5(a))o.unshift(a);else for(const[c,m]of Object.entries(a))V5(e,u.properties,c,m)}for(const l of o)iu(u.children,l);return u.type==="element"&&u.tagName==="template"&&(u.content={type:"root",children:u.children},u.children=[]),u}return i}function q5(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 i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const s=i;for(const a of s)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function V5(e,t,n,r){const i=Gi(e,n);let s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?i.spaceSeparated?s=Vo(r):i.commaSeparated?s=qo(r):i.commaOrSpaceSeparated?s=Vo(qo(r).join(" ")):s=Td(i,i.property,r):Array.isArray(r)?s=[...r]:s=i.property==="style"?W5(r):String(r);if(Array.isArray(s)){const a=[];for(const o of s)a.push(Td(i,i.property,o));s=a}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}function iu(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)iu(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?iu(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Td(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Pi(n)===Pi(t)))return!0}return n}function W5(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function G5(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const Y5=["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"],K5=tm(Hr,"div"),Q5=tm(kn,"g",Y5);function X5(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(s){if(typeof s=="number"&&s>-1&&s<=t.length){let a=0;for(;;){let o=n[a];if(o===void 0){const u=Cd(t,n[a-1]);o=u===-1?t.length+1:u+1,n[a]=o}if(o>s)return{line:a+1,column:s-(a>0?n[a-1]:0)+1,offset:s};a++}}}function i(s){if(s&&typeof s.line=="number"&&typeof s.column=="number"&&!Number.isNaN(s.line)&&!Number.isNaN(s.column)){for(;n.length<s.line;){const o=n[n.length-1],u=Cd(t,o),l=u===-1?t.length+1:u+1;if(o===l)break;n.push(l)}const a=(s.line>1?n[s.line-2]:0)+s.column-1;if(a<n[s.line-1])return a}}}function Cd(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
151
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Xn={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/"},nm={}.hasOwnProperty,Z5=Object.prototype;function J5(e,t){const n=t||{};return dl({file:n.file||void 0,location:!1,schema:n.space==="svg"?kn:Hr,verbose:n.verbose||!1},e)}function dl(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Is(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:rm(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const s=String(e.file),a=X5(s),o=a.toPoint(0),u=a.toPoint(s.length);n.position={start:o,end:u}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Is(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Is(e,r,n),n}default:return n=eI(e,t),n}}function rm(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=dl(e,t[n]);r.push(i)}return r}function eI(e,t){const n=e.schema;e.schema=t.namespaceURI===Xn.svg?kn:Hr;let r=-1;const i={};for(;++r<t.attrs.length;){const o=t.attrs[r],u=(o.prefix?o.prefix+":":"")+o.name;nm.call(Z5,u)||(i[u]=o.value)}const a=(e.schema.space==="svg"?Q5:K5)(t.tagName,i,rm(e,t.childNodes));if(Is(e,t,a),a.tagName==="template"){const o=t,u=o.sourceCodeLocation,l=u&&u.startTag&&Sr(u.startTag),d=u&&u.endTag&&Sr(u.endTag),c=dl(e,o.content);l&&d&&e.file&&(c.position={start:l.end,end:d.start}),a.content=c}return e.schema=n,a}function Is(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=tI(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function tI(e,t,n){const r=Sr(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const s={};let a;if(n.attrs)for(a in n.attrs)nm.call(n.attrs,a)&&(s[Gi(e.schema,a).property]=Sr(n.attrs[a]));n.startTag;const o=Sr(n.startTag),u=n.endTag?Sr(n.endTag):void 0,l={opening:o};u&&(l.closing=u),l.properties=s,t.data={position:l}}}return r}function Sr(e){const t=Sd({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Sd({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Sd(e){return e.line&&e.column?e:void 0}class Zi{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Zi.prototype.property={};Zi.prototype.normal={};Zi.prototype.space=null;function im(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new Zi(n,r,t)}function su(e){return e.toLowerCase()}class Zt{constructor(t,n){this.property=t,this.attribute=n}}Zt.prototype.space=null;Zt.prototype.boolean=!1;Zt.prototype.booleanish=!1;Zt.prototype.overloadedBoolean=!1;Zt.prototype.number=!1;Zt.prototype.commaSeparated=!1;Zt.prototype.spaceSeparated=!1;Zt.prototype.commaOrSpaceSeparated=!1;Zt.prototype.mustUseProperty=!1;Zt.prototype.defined=!1;let nI=0;const Te=ur(),Je=ur(),sm=ur(),X=ur(),Fe=ur(),vr=ur(),Mt=ur();function ur(){return 2**++nI}const au=Object.freeze(Object.defineProperty({__proto__:null,boolean:Te,booleanish:Je,commaOrSpaceSeparated:Mt,commaSeparated:vr,number:X,overloadedBoolean:sm,spaceSeparated:Fe},Symbol.toStringTag,{value:"Module"})),xo=Object.keys(au);class hl extends Zt{constructor(t,n,r,i){let s=-1;if(super(t,n),Ad(this,"space",i),typeof r=="number")for(;++s<xo.length;){const a=xo[s];Ad(this,xo[s],(r&au[a])===au[a])}}}hl.prototype.defined=!0;function Ad(e,t,n){n&&(e[t]=n)}const rI={}.hasOwnProperty;function $r(e){const t={},n={};let r;for(r in e.properties)if(rI.call(e.properties,r)){const i=e.properties[r],s=new hl(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[su(r)]=r,n[su(s.attribute)]=r}return new Zi(t,n,e.space)}const am=$r({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}}),om=$r({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function um(e,t){return t in e?e[t]:t}function lm(e,t){return um(e,t.toLowerCase())}const cm=$r({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:lm,properties:{xmlns:null,xmlnsXLink:null}}),dm=$r({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Je,ariaAutoComplete:null,ariaBusy:Je,ariaChecked:Je,ariaColCount:X,ariaColIndex:X,ariaColSpan:X,ariaControls:Fe,ariaCurrent:null,ariaDescribedBy:Fe,ariaDetails:null,ariaDisabled:Je,ariaDropEffect:Fe,ariaErrorMessage:null,ariaExpanded:Je,ariaFlowTo:Fe,ariaGrabbed:Je,ariaHasPopup:null,ariaHidden:Je,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Fe,ariaLevel:X,ariaLive:null,ariaModal:Je,ariaMultiLine:Je,ariaMultiSelectable:Je,ariaOrientation:null,ariaOwns:Fe,ariaPlaceholder:null,ariaPosInSet:X,ariaPressed:Je,ariaReadOnly:Je,ariaRelevant:null,ariaRequired:Je,ariaRoleDescription:Fe,ariaRowCount:X,ariaRowIndex:X,ariaRowSpan:X,ariaSelected:Je,ariaSetSize:X,ariaSort:null,ariaValueMax:X,ariaValueMin:X,ariaValueNow:X,ariaValueText:null,role:null}}),iI=$r({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:lm,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:vr,acceptCharset:Fe,accessKey:Fe,action:null,allow:null,allowFullScreen:Te,allowPaymentRequest:Te,allowUserMedia:Te,alt:null,as:null,async:Te,autoCapitalize:null,autoComplete:Fe,autoFocus:Te,autoPlay:Te,blocking:Fe,capture:null,charSet:null,checked:Te,cite:null,className:Fe,cols:X,colSpan:null,content:null,contentEditable:Je,controls:Te,controlsList:Fe,coords:X|vr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Te,defer:Te,dir:null,dirName:null,disabled:Te,download:sm,draggable:Je,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Te,formTarget:null,headers:Fe,height:X,hidden:Te,high:X,href:null,hrefLang:null,htmlFor:Fe,httpEquiv:Fe,id:null,imageSizes:null,imageSrcSet:null,inert:Te,inputMode:null,integrity:null,is:null,isMap:Te,itemId:null,itemProp:Fe,itemRef:Fe,itemScope:Te,itemType:Fe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Te,low:X,manifest:null,max:null,maxLength:X,media:null,method:null,min:null,minLength:X,multiple:Te,muted:Te,name:null,nonce:null,noModule:Te,noValidate:Te,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:Te,optimum:X,pattern:null,ping:Fe,placeholder:null,playsInline:Te,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Te,referrerPolicy:null,rel:Fe,required:Te,reversed:Te,rows:X,rowSpan:X,sandbox:Fe,scope:null,scoped:Te,seamless:Te,selected:Te,shadowRootClonable:Te,shadowRootDelegatesFocus:Te,shadowRootMode:null,shape:null,size:X,sizes:null,slot:null,span:X,spellCheck:Je,src:null,srcDoc:null,srcLang:null,srcSet:null,start:X,step:null,style:null,tabIndex:X,target:null,title:null,translate:null,type:null,typeMustMatch:Te,useMap:null,value:Je,width:X,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Fe,axis:null,background:null,bgColor:null,border:X,borderColor:null,bottomMargin:X,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Te,declare:Te,event:null,face:null,frame:null,frameBorder:null,hSpace:X,leftMargin:X,link:null,longDesc:null,lowSrc:null,marginHeight:X,marginWidth:X,noResize:Te,noHref:Te,noShade:Te,noWrap:Te,object:null,profile:null,prompt:null,rev:null,rightMargin:X,rules:null,scheme:null,scrolling:Je,standby:null,summary:null,text:null,topMargin:X,valueType:null,version:null,vAlign:null,vLink:null,vSpace:X,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Te,disableRemotePlayback:Te,prefix:null,property:null,results:X,security:null,unselectable:null}}),sI=$r({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:um,properties:{about:Mt,accentHeight:X,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:X,amplitude:X,arabicForm:null,ascent:X,attributeName:null,attributeType:null,azimuth:X,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:X,by:null,calcMode:null,capHeight:X,className:Fe,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:X,diffuseConstant:X,direction:null,display:null,dur:null,divisor:X,dominantBaseline:null,download:Te,dx:null,dy:null,edgeMode:null,editable:null,elevation:X,enableBackground:null,end:null,event:null,exponent:X,externalResourcesRequired:null,fill:null,fillOpacity:X,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:vr,g2:vr,glyphName:vr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:X,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:X,horizOriginX:X,horizOriginY:X,id:null,ideographic:X,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:X,k:X,k1:X,k2:X,k3:X,k4:X,kernelMatrix:Mt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:X,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:X,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:X,overlineThickness:X,paintOrder:null,panose1:null,path:null,pathLength:X,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Fe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:X,pointsAtY:X,pointsAtZ:X,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Mt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Mt,rev:Mt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Mt,requiredFeatures:Mt,requiredFonts:Mt,requiredFormats:Mt,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:X,specularExponent:X,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:X,strikethroughThickness:X,string:null,stroke:null,strokeDashArray:Mt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:X,strokeOpacity:X,strokeWidth:null,style:null,surfaceScale:X,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Mt,tabIndex:X,tableValues:null,target:null,targetX:X,targetY:X,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Mt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:X,underlineThickness:X,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:X,values:null,vAlphabetic:X,vMathematical:X,vectorEffect:null,vHanging:X,vIdeographic:X,version:null,vertAdvY:X,vertOriginX:X,vertOriginY:X,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:X,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),aI=/^data[-\w.:]+$/i,Id=/-[a-z]/g,oI=/[A-Z]/g;function uI(e,t){const n=su(t);let r=t,i=Zt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&aI.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Id,cI);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Id.test(s)){let a=s.replace(oI,lI);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=hl}return new i(r,t)}function lI(e){return"-"+e.toLowerCase()}function cI(e){return e.charAt(1).toUpperCase()}const dI=im([om,am,cm,dm,iI],"html"),hm=im([om,am,cm,dm,sI],"svg"),hI={},fI={}.hasOwnProperty,fm=Ea("type",{handlers:{root:mI,element:yI,text:EI,comment:xI,doctype:bI}});function pI(e,t){const r=(t||hI).space;return fm(e,r==="svg"?hm:dI)}function mI(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=fl(e.children,n,t),qr(e,n),n}function gI(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=fl(e.children,n,t),qr(e,n),n}function bI(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return qr(e,t),t}function EI(e){const t={nodeName:"#text",value:e.value,parentNode:null};return qr(e,t),t}function xI(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return qr(e,t),t}function yI(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=hm);const i=[];let s;if(e.properties){for(s in e.properties)if(s!=="children"&&fI.call(e.properties,s)){const u=TI(r,s,e.properties[s]);u&&i.push(u)}}const a=r.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Xn[a],childNodes:[],parentNode:null};return o.childNodes=fl(e.children,o,r),qr(e,o),e.tagName==="template"&&e.content&&(o.content=gI(e.content,r)),o}function TI(e,t,n){const r=uI(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?xa(n):ya(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const s=i.name.indexOf(":");s<0?i.prefix="":(i.name=i.name.slice(s+1),i.prefix=r.attribute.slice(0,s)),i.namespace=Xn[r.space]}return i}function fl(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const s=fm(e[r],n);s.parentNode=t,i.push(s)}return i}function qr(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 CI=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]),Ue="�";var A;(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"})(A||(A={}));const Pt={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function pm(e){return e>=55296&&e<=57343}function SI(e){return e>=56320&&e<=57343}function AI(e,t){return(e-55296)*1024+9216+t}function mm(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function gm(e){return e>=64976&&e<=65007||CI.has(e)}var F;(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"})(F||(F={}));const II=65536;class kI{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=II,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:i,offset:s}=this,a=i+n,o=s+n;return{code:t,startLine:r,endLine:r,startCol:a,endCol:a,startOffset:o,endOffset:o}}_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(SI(n))return this.pos++,this._addGap(),AI(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,A.EOF;return this._err(F.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,A.EOF;const r=this.html.charCodeAt(n);return r===A.CARRIAGE_RETURN?A.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,A.EOF;let t=this.html.charCodeAt(this.pos);return t===A.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,A.LINE_FEED):t===A.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,pm(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===A.LINE_FEED||t===A.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){mm(t)?this._err(F.controlCharacterInInputStream):gm(t)&&this._err(F.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Ie;(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"})(Ie||(Ie={}));function bm(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 Em=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))),_I=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var yo;const vI=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]]),DI=(yo=String.fromCodePoint)!==null&&yo!==void 0?yo: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 wI(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=vI.get(e))!==null&&t!==void 0?t:e}var ft;(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"})(ft||(ft={}));const NI=32;var Fn;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Fn||(Fn={}));function ou(e){return e>=ft.ZERO&&e<=ft.NINE}function PI(e){return e>=ft.UPPER_A&&e<=ft.UPPER_F||e>=ft.LOWER_A&&e<=ft.LOWER_F}function RI(e){return e>=ft.UPPER_A&&e<=ft.UPPER_Z||e>=ft.LOWER_A&&e<=ft.LOWER_Z||ou(e)}function LI(e){return e===ft.EQUALS||RI(e)}var dt;(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"})(dt||(dt={}));var yn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(yn||(yn={}));class xm{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=dt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=yn.Strict}startEntity(t){this.decodeMode=t,this.state=dt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case dt.EntityStart:return t.charCodeAt(n)===ft.NUM?(this.state=dt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=dt.NamedEntity,this.stateNamedEntity(t,n));case dt.NumericStart:return this.stateNumericStart(t,n);case dt.NumericDecimal:return this.stateNumericDecimal(t,n);case dt.NumericHex:return this.stateNumericHex(t,n);case dt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|NI)===ft.LOWER_X?(this.state=dt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=dt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const s=r-n;this.result=this.result*Math.pow(i,s)+parseInt(t.substr(n,s),i),this.consumed+=s}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(ou(i)||PI(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(ou(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,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===ft.SEMI)this.consumed+=1;else if(this.decodeMode===yn.Strict)return 0;return this.emitCodePoint(wI(this.result),this.consumed),this.errors&&(t!==ft.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],s=(i&Fn.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=OI(r,i,this.treeIndex+Math.max(1,s),a),this.treeIndex<0)return this.result===0||this.decodeMode===yn.Attribute&&(s===0||LI(a))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],s=(i&Fn.VALUE_LENGTH)>>14,s!==0){if(a===ft.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==yn.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&Fn.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~Fn.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case dt.NamedEntity:return this.result!==0&&(this.decodeMode!==yn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case dt.NumericDecimal:return this.emitNumericEntity(0,2);case dt.NumericHex:return this.emitNumericEntity(0,3);case dt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case dt.EntityStart:return 0}}}function ym(e){let t="";const n=new xm(e,r=>t+=DI(r));return function(i,s){let a=0,o=0;for(;(o=i.indexOf("&",o))>=0;){t+=i.slice(a,o),n.startEntity(s);const l=n.write(i,o+1);if(l<0){a=o+n.end();break}a=o+l,o=l===0?a+1:a}const u=t+i.slice(a);return t="",u}}function OI(e,t,n,r){const i=(t&Fn.BRANCH_LENGTH)>>7,s=t&Fn.JUMP_TABLE;if(i===0)return s!==0&&r===s?n:-1;if(s){const u=r-s;return u<0||u>=i?-1:e[n+u]-1}let a=n,o=a+i-1;for(;a<=o;){const u=a+o>>>1,l=e[u];if(l<r)a=u+1;else if(l>r)o=u-1;else return e[u+i]}return-1}ym(Em);ym(_I);var V;(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/"})(V||(V={}));var Jn;(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"})(Jn||(Jn={}));var Kt;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Kt||(Kt={}));var R;(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"})(R||(R={}));var f;(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"})(f||(f={}));const FI=new Map([[R.A,f.A],[R.ADDRESS,f.ADDRESS],[R.ANNOTATION_XML,f.ANNOTATION_XML],[R.APPLET,f.APPLET],[R.AREA,f.AREA],[R.ARTICLE,f.ARTICLE],[R.ASIDE,f.ASIDE],[R.B,f.B],[R.BASE,f.BASE],[R.BASEFONT,f.BASEFONT],[R.BGSOUND,f.BGSOUND],[R.BIG,f.BIG],[R.BLOCKQUOTE,f.BLOCKQUOTE],[R.BODY,f.BODY],[R.BR,f.BR],[R.BUTTON,f.BUTTON],[R.CAPTION,f.CAPTION],[R.CENTER,f.CENTER],[R.CODE,f.CODE],[R.COL,f.COL],[R.COLGROUP,f.COLGROUP],[R.DD,f.DD],[R.DESC,f.DESC],[R.DETAILS,f.DETAILS],[R.DIALOG,f.DIALOG],[R.DIR,f.DIR],[R.DIV,f.DIV],[R.DL,f.DL],[R.DT,f.DT],[R.EM,f.EM],[R.EMBED,f.EMBED],[R.FIELDSET,f.FIELDSET],[R.FIGCAPTION,f.FIGCAPTION],[R.FIGURE,f.FIGURE],[R.FONT,f.FONT],[R.FOOTER,f.FOOTER],[R.FOREIGN_OBJECT,f.FOREIGN_OBJECT],[R.FORM,f.FORM],[R.FRAME,f.FRAME],[R.FRAMESET,f.FRAMESET],[R.H1,f.H1],[R.H2,f.H2],[R.H3,f.H3],[R.H4,f.H4],[R.H5,f.H5],[R.H6,f.H6],[R.HEAD,f.HEAD],[R.HEADER,f.HEADER],[R.HGROUP,f.HGROUP],[R.HR,f.HR],[R.HTML,f.HTML],[R.I,f.I],[R.IMG,f.IMG],[R.IMAGE,f.IMAGE],[R.INPUT,f.INPUT],[R.IFRAME,f.IFRAME],[R.KEYGEN,f.KEYGEN],[R.LABEL,f.LABEL],[R.LI,f.LI],[R.LINK,f.LINK],[R.LISTING,f.LISTING],[R.MAIN,f.MAIN],[R.MALIGNMARK,f.MALIGNMARK],[R.MARQUEE,f.MARQUEE],[R.MATH,f.MATH],[R.MENU,f.MENU],[R.META,f.META],[R.MGLYPH,f.MGLYPH],[R.MI,f.MI],[R.MO,f.MO],[R.MN,f.MN],[R.MS,f.MS],[R.MTEXT,f.MTEXT],[R.NAV,f.NAV],[R.NOBR,f.NOBR],[R.NOFRAMES,f.NOFRAMES],[R.NOEMBED,f.NOEMBED],[R.NOSCRIPT,f.NOSCRIPT],[R.OBJECT,f.OBJECT],[R.OL,f.OL],[R.OPTGROUP,f.OPTGROUP],[R.OPTION,f.OPTION],[R.P,f.P],[R.PARAM,f.PARAM],[R.PLAINTEXT,f.PLAINTEXT],[R.PRE,f.PRE],[R.RB,f.RB],[R.RP,f.RP],[R.RT,f.RT],[R.RTC,f.RTC],[R.RUBY,f.RUBY],[R.S,f.S],[R.SCRIPT,f.SCRIPT],[R.SEARCH,f.SEARCH],[R.SECTION,f.SECTION],[R.SELECT,f.SELECT],[R.SOURCE,f.SOURCE],[R.SMALL,f.SMALL],[R.SPAN,f.SPAN],[R.STRIKE,f.STRIKE],[R.STRONG,f.STRONG],[R.STYLE,f.STYLE],[R.SUB,f.SUB],[R.SUMMARY,f.SUMMARY],[R.SUP,f.SUP],[R.TABLE,f.TABLE],[R.TBODY,f.TBODY],[R.TEMPLATE,f.TEMPLATE],[R.TEXTAREA,f.TEXTAREA],[R.TFOOT,f.TFOOT],[R.TD,f.TD],[R.TH,f.TH],[R.THEAD,f.THEAD],[R.TITLE,f.TITLE],[R.TR,f.TR],[R.TRACK,f.TRACK],[R.TT,f.TT],[R.U,f.U],[R.UL,f.UL],[R.SVG,f.SVG],[R.VAR,f.VAR],[R.WBR,f.WBR],[R.XMP,f.XMP]]);function Vr(e){var t;return(t=FI.get(e))!==null&&t!==void 0?t:f.UNKNOWN}const G=f,MI={[V.HTML]:new Set([G.ADDRESS,G.APPLET,G.AREA,G.ARTICLE,G.ASIDE,G.BASE,G.BASEFONT,G.BGSOUND,G.BLOCKQUOTE,G.BODY,G.BR,G.BUTTON,G.CAPTION,G.CENTER,G.COL,G.COLGROUP,G.DD,G.DETAILS,G.DIR,G.DIV,G.DL,G.DT,G.EMBED,G.FIELDSET,G.FIGCAPTION,G.FIGURE,G.FOOTER,G.FORM,G.FRAME,G.FRAMESET,G.H1,G.H2,G.H3,G.H4,G.H5,G.H6,G.HEAD,G.HEADER,G.HGROUP,G.HR,G.HTML,G.IFRAME,G.IMG,G.INPUT,G.LI,G.LINK,G.LISTING,G.MAIN,G.MARQUEE,G.MENU,G.META,G.NAV,G.NOEMBED,G.NOFRAMES,G.NOSCRIPT,G.OBJECT,G.OL,G.P,G.PARAM,G.PLAINTEXT,G.PRE,G.SCRIPT,G.SECTION,G.SELECT,G.SOURCE,G.STYLE,G.SUMMARY,G.TABLE,G.TBODY,G.TD,G.TEMPLATE,G.TEXTAREA,G.TFOOT,G.TH,G.THEAD,G.TITLE,G.TR,G.TRACK,G.UL,G.WBR,G.XMP]),[V.MATHML]:new Set([G.MI,G.MO,G.MN,G.MS,G.MTEXT,G.ANNOTATION_XML]),[V.SVG]:new Set([G.TITLE,G.FOREIGN_OBJECT,G.DESC]),[V.XLINK]:new Set,[V.XML]:new Set,[V.XMLNS]:new Set},uu=new Set([G.H1,G.H2,G.H3,G.H4,G.H5,G.H6]);R.STYLE,R.SCRIPT,R.XMP,R.IFRAME,R.NOEMBED,R.NOFRAMES,R.PLAINTEXT;var I;(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"})(I||(I={}));const Ke={DATA:I.DATA,RCDATA:I.RCDATA,RAWTEXT:I.RAWTEXT,SCRIPT_DATA:I.SCRIPT_DATA,PLAINTEXT:I.PLAINTEXT,CDATA_SECTION:I.CDATA_SECTION};function BI(e){return e>=A.DIGIT_0&&e<=A.DIGIT_9}function fi(e){return e>=A.LATIN_CAPITAL_A&&e<=A.LATIN_CAPITAL_Z}function jI(e){return e>=A.LATIN_SMALL_A&&e<=A.LATIN_SMALL_Z}function Rn(e){return jI(e)||fi(e)}function kd(e){return Rn(e)||BI(e)}function ps(e){return e+32}function Tm(e){return e===A.SPACE||e===A.LINE_FEED||e===A.TABULATION||e===A.FORM_FEED}function _d(e){return Tm(e)||e===A.SOLIDUS||e===A.GREATER_THAN_SIGN}function HI(e){return e===A.NULL?F.nullCharacterReference:e>1114111?F.characterReferenceOutsideUnicodeRange:pm(e)?F.surrogateCharacterReference:gm(e)?F.noncharacterCharacterReference:mm(e)||e===A.CARRIAGE_RETURN?F.controlCharacterReference:null}class UI{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=I.DATA,this.returnState=I.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new kI(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new xm(Em,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(F.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(F.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=HI(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.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:Ie.START_TAG,tagName:"",tagID:f.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ie.END_TAG,tagName:"",tagID:f.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ie.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ie.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(bm(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(F.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=Vr(t.tagName),t.type===Ie.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(F.endTagWithAttributes),t.selfClosing&&this._err(F.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 Ie.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ie.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ie.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:Ie.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=Tm(t)?Ie.WHITESPACE_CHARACTER:t===A.NULL?Ie.NULL_CHARACTER:Ie.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ie.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=I.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?yn.Attribute:yn.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===I.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===I.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===I.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case I.DATA:{this._stateData(t);break}case I.RCDATA:{this._stateRcdata(t);break}case I.RAWTEXT:{this._stateRawtext(t);break}case I.SCRIPT_DATA:{this._stateScriptData(t);break}case I.PLAINTEXT:{this._statePlaintext(t);break}case I.TAG_OPEN:{this._stateTagOpen(t);break}case I.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case I.TAG_NAME:{this._stateTagName(t);break}case I.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case I.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case I.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case I.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case I.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case I.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case I.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case I.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case I.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case I.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case I.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case I.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case I.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case I.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case I.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case I.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case I.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case I.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case I.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case I.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case I.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case I.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case I.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case I.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case I.BOGUS_COMMENT:{this._stateBogusComment(t);break}case I.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case I.COMMENT_START:{this._stateCommentStart(t);break}case I.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case I.COMMENT:{this._stateComment(t);break}case I.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case I.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case I.COMMENT_END:{this._stateCommentEnd(t);break}case I.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case I.DOCTYPE:{this._stateDoctype(t);break}case I.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case I.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case I.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case I.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case I.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case I.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case I.CDATA_SECTION:{this._stateCdataSection(t);break}case I.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case I.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case I.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case I.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case A.LESS_THAN_SIGN:{this.state=I.TAG_OPEN;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(F.unexpectedNullCharacter),this._emitCodePoint(t);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case A.AMPERSAND:{this._startCharacterReference();break}case A.LESS_THAN_SIGN:{this.state=I.RCDATA_LESS_THAN_SIGN;break}case A.NULL:{this._err(F.unexpectedNullCharacter),this._emitChars(Ue);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case A.LESS_THAN_SIGN:{this.state=I.RAWTEXT_LESS_THAN_SIGN;break}case A.NULL:{this._err(F.unexpectedNullCharacter),this._emitChars(Ue);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case A.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_LESS_THAN_SIGN;break}case A.NULL:{this._err(F.unexpectedNullCharacter),this._emitChars(Ue);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case A.NULL:{this._err(F.unexpectedNullCharacter),this._emitChars(Ue);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Rn(t))this._createStartTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case A.EXCLAMATION_MARK:{this.state=I.MARKUP_DECLARATION_OPEN;break}case A.SOLIDUS:{this.state=I.END_TAG_OPEN;break}case A.QUESTION_MARK:{this._err(F.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t);break}case A.EOF:{this._err(F.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(F.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=I.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Rn(t))this._createEndTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case A.GREATER_THAN_SIGN:{this._err(F.missingEndTagName),this.state=I.DATA;break}case A.EOF:{this._err(F.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(F.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=I.BEFORE_ATTRIBUTE_NAME;break}case A.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case A.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case A.NULL:{this._err(F.unexpectedNullCharacter),n.tagName+=Ue;break}case A.EOF:{this._err(F.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(fi(t)?ps(t):t)}}_stateRcdataLessThanSign(t){t===A.SOLIDUS?this.state=I.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Rn(t)?(this.state=I.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=I.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 A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=I.BEFORE_ATTRIBUTE_NAME,!1;case A.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=I.SELF_CLOSING_START_TAG,!1;case A.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=I.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===A.SOLIDUS?this.state=I.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Rn(t)?(this.state=I.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case A.SOLIDUS:{this.state=I.SCRIPT_DATA_END_TAG_OPEN;break}case A.EXCLAMATION_MARK:{this.state=I.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=I.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Rn(t)?(this.state=I.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===A.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===A.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case A.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.NULL:{this._err(F.unexpectedNullCharacter),this._emitChars(Ue);break}case A.EOF:{this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case A.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.NULL:{this._err(F.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(Ue);break}case A.EOF:{this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case A.HYPHEN_MINUS:{this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case A.NULL:{this._err(F.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(Ue);break}case A.EOF:{this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===A.SOLIDUS?this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Rn(t)?(this._emitChars("<"),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Rn(t)?(this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Pt.SCRIPT,!1)&&_d(this.preprocessor.peek(Pt.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Pt.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case A.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.NULL:{this._err(F.unexpectedNullCharacter),this._emitChars(Ue);break}case A.EOF:{this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case A.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.NULL:{this._err(F.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ue);break}case A.EOF:{this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case A.HYPHEN_MINUS:{this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case A.NULL:{this._err(F.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ue);break}case A.EOF:{this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===A.SOLIDUS?(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Pt.SCRIPT,!1)&&_d(this.preprocessor.peek(Pt.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Pt.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=I.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.SOLIDUS:case A.GREATER_THAN_SIGN:case A.EOF:{this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case A.EQUALS_SIGN:{this._err(F.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=I.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:case A.SOLIDUS:case A.GREATER_THAN_SIGN:case A.EOF:{this._leaveAttrName(),this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case A.EQUALS_SIGN:{this._leaveAttrName(),this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case A.QUOTATION_MARK:case A.APOSTROPHE:case A.LESS_THAN_SIGN:{this._err(F.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case A.NULL:{this._err(F.unexpectedNullCharacter),this.currentAttr.name+=Ue;break}default:this.currentAttr.name+=String.fromCodePoint(fi(t)?ps(t):t)}}_stateAfterAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case A.EQUALS_SIGN:{this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case A.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(F.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{this.state=I.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this.state=I.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(F.missingAttributeValue),this.state=I.DATA,this.emitCurrentTagToken();break}default:this.state=I.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case A.QUOTATION_MARK:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(F.unexpectedNullCharacter),this.currentAttr.value+=Ue;break}case A.EOF:{this._err(F.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case A.APOSTROPHE:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(F.unexpectedNullCharacter),this.currentAttr.value+=Ue;break}case A.EOF:{this._err(F.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case A.NULL:{this._err(F.unexpectedNullCharacter),this.currentAttr.value+=Ue;break}case A.QUOTATION_MARK:case A.APOSTROPHE:case A.LESS_THAN_SIGN:case A.EQUALS_SIGN:case A.GRAVE_ACCENT:{this._err(F.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case A.EOF:{this._err(F.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case A.SOLIDUS:{this._leaveAttrValue(),this.state=I.SELF_CLOSING_START_TAG;break}case A.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(F.eofInTag),this._emitEOFToken();break}default:this._err(F.missingWhitespaceBetweenAttributes),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case A.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=I.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(F.eofInTag),this._emitEOFToken();break}default:this._err(F.unexpectedSolidusInTag),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(n);break}case A.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case A.NULL:{this._err(F.unexpectedNullCharacter),n.data+=Ue;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Pt.DASH_DASH,!0)?(this._createCommentToken(Pt.DASH_DASH.length+1),this.state=I.COMMENT_START):this._consumeSequenceIfMatch(Pt.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Pt.DOCTYPE.length+1),this.state=I.DOCTYPE):this._consumeSequenceIfMatch(Pt.CDATA_START,!0)?this.inForeignNode?this.state=I.CDATA_SECTION:(this._err(F.cdataInHtmlContent),this._createCommentToken(Pt.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=I.BOGUS_COMMENT):this._ensureHibernation()||(this._err(F.incorrectlyOpenedComment),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case A.HYPHEN_MINUS:{this.state=I.COMMENT_START_DASH;break}case A.GREATER_THAN_SIGN:{this._err(F.abruptClosingOfEmptyComment),this.state=I.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case A.GREATER_THAN_SIGN:{this._err(F.abruptClosingOfEmptyComment),this.state=I.DATA,this.emitCurrentComment(n);break}case A.EOF:{this._err(F.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=I.COMMENT_END_DASH;break}case A.LESS_THAN_SIGN:{n.data+="<",this.state=I.COMMENT_LESS_THAN_SIGN;break}case A.NULL:{this._err(F.unexpectedNullCharacter),n.data+=Ue;break}case A.EOF:{this._err(F.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case A.EXCLAMATION_MARK:{n.data+="!",this.state=I.COMMENT_LESS_THAN_SIGN_BANG;break}case A.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===A.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=I.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===A.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=I.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==A.GREATER_THAN_SIGN&&t!==A.EOF&&this._err(F.nestedComment),this.state=I.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case A.EOF:{this._err(F.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(n);break}case A.EXCLAMATION_MARK:{this.state=I.COMMENT_END_BANG;break}case A.HYPHEN_MINUS:{n.data+="-";break}case A.EOF:{this._err(F.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{n.data+="--!",this.state=I.COMMENT_END_DASH;break}case A.GREATER_THAN_SIGN:{this._err(F.incorrectlyClosedComment),this.state=I.DATA,this.emitCurrentComment(n);break}case A.EOF:{this._err(F.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=I.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case A.EOF:{this._err(F.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.missingWhitespaceBeforeDoctypeName),this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(fi(t))this._createDoctypeToken(String.fromCharCode(ps(t))),this.state=I.DOCTYPE_NAME;else switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.NULL:{this._err(F.unexpectedNullCharacter),this._createDoctypeToken(Ue),this.state=I.DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this._err(F.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case A.EOF:{this._err(F.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=I.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=I.AFTER_DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case A.NULL:{this._err(F.unexpectedNullCharacter),n.name+=Ue;break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(fi(t)?ps(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Pt.PUBLIC,!1)?this.state=I.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Pt.SYSTEM,!1)?this.state=I.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(F.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.QUOTATION_MARK:{this._err(F.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(F.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(F.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(F.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case A.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.NULL:{this._err(F.unexpectedNullCharacter),n.publicId+=Ue;break}case A.GREATER_THAN_SIGN:{this._err(F.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case A.EOF:{this._err(F.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 A.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.NULL:{this._err(F.unexpectedNullCharacter),n.publicId+=Ue;break}case A.GREATER_THAN_SIGN:{this._err(F.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case A.EOF:{this._err(F.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 A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case A.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(n);break}case A.QUOTATION_MARK:{this._err(F.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(F.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case A.QUOTATION_MARK:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.QUOTATION_MARK:{this._err(F.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(F.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(F.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(F.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case A.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.NULL:{this._err(F.unexpectedNullCharacter),n.systemId+=Ue;break}case A.GREATER_THAN_SIGN:{this._err(F.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case A.EOF:{this._err(F.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 A.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.NULL:{this._err(F.unexpectedNullCharacter),n.systemId+=Ue;break}case A.GREATER_THAN_SIGN:{this._err(F.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=I.DATA;break}case A.EOF:{this._err(F.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 A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case A.EOF:{this._err(F.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(F.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=I.DATA;break}case A.NULL:{this._err(F.unexpectedNullCharacter);break}case A.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case A.RIGHT_SQUARE_BRACKET:{this.state=I.CDATA_SECTION_BRACKET;break}case A.EOF:{this._err(F.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===A.RIGHT_SQUARE_BRACKET?this.state=I.CDATA_SECTION_END:(this._emitChars("]"),this.state=I.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case A.GREATER_THAN_SIGN:{this.state=I.DATA;break}case A.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=I.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(A.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&kd(this.preprocessor.peek(1))?I.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){kd(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===A.SEMICOLON&&this._err(F.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Cm=new Set([f.DD,f.DT,f.LI,f.OPTGROUP,f.OPTION,f.P,f.RB,f.RP,f.RT,f.RTC]),vd=new Set([...Cm,f.CAPTION,f.COLGROUP,f.TBODY,f.TD,f.TFOOT,f.TH,f.THEAD,f.TR]),ea=new Set([f.APPLET,f.CAPTION,f.HTML,f.MARQUEE,f.OBJECT,f.TABLE,f.TD,f.TEMPLATE,f.TH]),zI=new Set([...ea,f.OL,f.UL]),$I=new Set([...ea,f.BUTTON]),Dd=new Set([f.ANNOTATION_XML,f.MI,f.MN,f.MO,f.MS,f.MTEXT]),wd=new Set([f.DESC,f.FOREIGN_OBJECT,f.TITLE]),qI=new Set([f.TR,f.TEMPLATE,f.HTML]),VI=new Set([f.TBODY,f.TFOOT,f.THEAD,f.TEMPLATE,f.HTML]),WI=new Set([f.TABLE,f.TEMPLATE,f.HTML]),GI=new Set([f.TD,f.TH]);class YI{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=f.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===f.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===V.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 i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,i===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])!==V.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(uu,V.HTML)}popUntilTableCellPopped(){this.popUntilPopped(GI,V.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(WI,V.HTML)}clearBackToTableBodyContext(){this.clearBackTo(VI,V.HTML)}clearBackToTableRowContext(){this.clearBackTo(qI,V.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]===f.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]===f.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case V.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case V.SVG:{if(wd.has(i))return!1;break}case V.MATHML:{if(Dd.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,ea)}hasInListItemScope(t){return this.hasInDynamicScope(t,zI)}hasInButtonScope(t){return this.hasInDynamicScope(t,$I)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case V.HTML:{if(uu.has(n))return!0;if(ea.has(n))return!1;break}case V.SVG:{if(wd.has(n))return!1;break}case V.MATHML:{if(Dd.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===V.HTML)switch(this.tagIDs[n]){case t:return!0;case f.TABLE:case f.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===V.HTML)switch(this.tagIDs[t]){case f.TBODY:case f.THEAD:case f.TFOOT:return!0;case f.TABLE:case f.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===V.HTML)switch(this.tagIDs[n]){case t:return!0;case f.OPTION:case f.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;Cm.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;vd.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&vd.has(this.currentTagId);)this.pop()}}const To=3;var ln;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(ln||(ln={}));const Nd={type:ln.Marker};class KI{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,s=this.treeAdapter.getTagName(t),a=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const u=this.entries[o];if(u.type===ln.Marker)break;const{element:l}=u;if(this.treeAdapter.getTagName(l)===s&&this.treeAdapter.getNamespaceURI(l)===a){const d=this.treeAdapter.getAttrList(l);d.length===i&&r.push({idx:o,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<To)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<To)return;const i=new Map(n.map(a=>[a.name,a.value]));let s=0;for(let a=0;a<r.length;a++){const o=r[a];o.attrs.every(u=>i.get(u.name)===u.value)&&(s+=1,s>=To&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(Nd)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:ln.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:ln.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(Nd);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===ln.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===ln.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===ln.Element&&n.element===t)}}const Ln={createDocument(){return{nodeName:"#document",mode:Kt.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 i=e.childNodes.find(s=>s.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const s={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Ln.appendChild(e,s)}},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(Ln.isTextNode(n)){n.value+=t;return}}Ln.appendChild(e,Ln.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ln.isTextNode(r)?r.value+=t:Ln.insertBefore(e,Ln.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}}},Sm="html",QI="about:legacy-compat",XI="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Am=["+//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//"],ZI=[...Am,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],JI=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Im=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],ek=[...Im,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Pd(e,t){return t.some(n=>e.startsWith(n))}function tk(e){return e.name===Sm&&e.publicId===null&&(e.systemId===null||e.systemId===QI)}function nk(e){if(e.name!==Sm)return Kt.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===XI)return Kt.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),JI.has(n))return Kt.QUIRKS;let r=t===null?ZI:Am;if(Pd(n,r))return Kt.QUIRKS;if(r=t===null?Im:ek,Pd(n,r))return Kt.LIMITED_QUIRKS}return Kt.NO_QUIRKS}const Rd={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},rk="definitionurl",ik="definitionURL",sk=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])),ak=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:V.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:V.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:V.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:V.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:V.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:V.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:V.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:V.XML}],["xml:space",{prefix:"xml",name:"space",namespace:V.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:V.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:V.XMLNS}]]),ok=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])),uk=new Set([f.B,f.BIG,f.BLOCKQUOTE,f.BODY,f.BR,f.CENTER,f.CODE,f.DD,f.DIV,f.DL,f.DT,f.EM,f.EMBED,f.H1,f.H2,f.H3,f.H4,f.H5,f.H6,f.HEAD,f.HR,f.I,f.IMG,f.LI,f.LISTING,f.MENU,f.META,f.NOBR,f.OL,f.P,f.PRE,f.RUBY,f.S,f.SMALL,f.SPAN,f.STRONG,f.STRIKE,f.SUB,f.SUP,f.TABLE,f.TT,f.U,f.UL,f.VAR]);function lk(e){const t=e.tagID;return t===f.FONT&&e.attrs.some(({name:r})=>r===Jn.COLOR||r===Jn.SIZE||r===Jn.FACE)||uk.has(t)}function km(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===rk){e.attrs[t].name=ik;break}}function _m(e){for(let t=0;t<e.attrs.length;t++){const n=sk.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function pl(e){for(let t=0;t<e.attrs.length;t++){const n=ak.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 ck(e){const t=ok.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Vr(e.tagName))}function dk(e,t){return t===V.MATHML&&(e===f.MI||e===f.MO||e===f.MN||e===f.MS||e===f.MTEXT)}function hk(e,t,n){if(t===V.MATHML&&e===f.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Jn.ENCODING){const i=n[r].value.toLowerCase();return i===Rd.TEXT_HTML||i===Rd.APPLICATION_XML}}return t===V.SVG&&(e===f.FOREIGN_OBJECT||e===f.DESC||e===f.TITLE)}function fk(e,t,n,r){return(!r||r===V.HTML)&&hk(e,t,n)||(!r||r===V.MATHML)&&dk(e,t)}const pk="hidden",mk=8,gk=3;var v;(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"})(v||(v={}));const bk={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},vm=new Set([f.TABLE,f.TBODY,f.TFOOT,f.THEAD,f.TR]),Ld={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ln,onParseError:null};class Od{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=v.INITIAL,this.originalInsertionMode=v.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={...Ld,...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 UI(this.options,this),this.activeFormattingElements=new KI(this.treeAdapter),this.fragmentContextID=r?Vr(this.treeAdapter.getTagName(r)):f.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new YI(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={...Ld,...n};t??(t=r.treeAdapter.createElement(R.TEMPLATE,V.HTML,[]));const i=r.treeAdapter.createElement("documentmock",V.HTML,[]),s=new this(r,i,t);return s.fragmentContextID===f.TEMPLATE&&s.tmplInsertionModeStack.unshift(v.IN_TEMPLATE),s._initTokenizerForFragmentParsing(),s._insertFakeRootElement(),s._resetInsertionMode(),s._findFormInFragmentContext(),s}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const s=(i=t.location)!==null&&i!==void 0?i:bk,a={code:n,startLine:s.startLine,startCol:s.startCol,startOffset:s.startOffset,endLine:r?s.startLine:s.endLine,endCol:r?s.startCol:s.endCol,endOffset:r?s.startOffset:s.endOffset};this.onParseError(a)}onItemPush(t,n,r){var i,s;(s=(i=this.treeAdapter).onItemPush)===null||s===void 0||s.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let s,a;this.openElements.stackTop===0&&this.fragmentContext?(s=this.fragmentContext,a=this.fragmentContextID):{current:s,currentTagId:a}=this.openElements,this._setContextModes(s,a)}}_setContextModes(t,n){const r=t===this.document||this.treeAdapter.getNamespaceURI(t)===V.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,V.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=v.TEXT}switchToPlaintextParsing(){this.insertionMode=v.TEXT,this.originalInsertionMode=v.IN_BODY,this.tokenizer.state=Ke.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)===R.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==V.HTML))switch(this.fragmentContextID){case f.TITLE:case f.TEXTAREA:{this.tokenizer.state=Ke.RCDATA;break}case f.STYLE:case f.XMP:case f.IFRAME:case f.NOEMBED:case f.NOFRAMES:case f.NOSCRIPT:{this.tokenizer.state=Ke.RAWTEXT;break}case f.SCRIPT:{this.tokenizer.state=Ke.SCRIPT_DATA;break}case f.PLAINTEXT:{this.tokenizer.state=Ke.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const a=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));a&&this.treeAdapter.setNodeSourceCodeLocation(a,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,V.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,V.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(R.HTML,V.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,f.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 i=this.treeAdapter.getChildNodes(n),s=r?i.lastIndexOf(r):i.length,a=i[s-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:u,endCol:l,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:u,endCol:l,endOffset:d})}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,i=this.treeAdapter.getTagName(t),s=n.type===Ie.END_TAG&&i===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,s)}}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===f.SVG&&this.treeAdapter.getTagName(n)===R.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===V.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===f.MGLYPH||t.tagID===f.MALIGNMARK)&&!this._isIntegrationPoint(r,n,V.HTML)}_processToken(t){switch(t.type){case Ie.CHARACTER:{this.onCharacter(t);break}case Ie.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ie.COMMENT:{this.onComment(t);break}case Ie.DOCTYPE:{this.onDoctype(t);break}case Ie.START_TAG:{this._processStartTag(t);break}case Ie.END_TAG:{this.onEndTag(t);break}case Ie.EOF:{this.onEof(t);break}case Ie.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),s=this.treeAdapter.getAttrList(n);return fk(t,i,s,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===ln.Marker||this.openElements.contains(i.element)),r=n<0?t-1:n-1;for(let i=r;i>=0;i--){const s=this.activeFormattingElements.entries[i];this._insertElement(s.token,this.treeAdapter.getNamespaceURI(s.element)),s.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=v.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(f.P),this.openElements.popUntilTagNamePopped(f.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case f.TR:{this.insertionMode=v.IN_ROW;return}case f.TBODY:case f.THEAD:case f.TFOOT:{this.insertionMode=v.IN_TABLE_BODY;return}case f.CAPTION:{this.insertionMode=v.IN_CAPTION;return}case f.COLGROUP:{this.insertionMode=v.IN_COLUMN_GROUP;return}case f.TABLE:{this.insertionMode=v.IN_TABLE;return}case f.BODY:{this.insertionMode=v.IN_BODY;return}case f.FRAMESET:{this.insertionMode=v.IN_FRAMESET;return}case f.SELECT:{this._resetInsertionModeForSelect(t);return}case f.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case f.HTML:{this.insertionMode=this.headElement?v.AFTER_HEAD:v.BEFORE_HEAD;return}case f.TD:case f.TH:{if(t>0){this.insertionMode=v.IN_CELL;return}break}case f.HEAD:{if(t>0){this.insertionMode=v.IN_HEAD;return}break}}this.insertionMode=v.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===f.TEMPLATE)break;if(r===f.TABLE){this.insertionMode=v.IN_SELECT_IN_TABLE;return}}this.insertionMode=v.IN_SELECT}_isElementCausesFosterParenting(t){return vm.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 f.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===V.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case f.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 MI[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){G_(this,t);return}switch(this.insertionMode){case v.INITIAL:{si(this,t);break}case v.BEFORE_HTML:{Ci(this,t);break}case v.BEFORE_HEAD:{Si(this,t);break}case v.IN_HEAD:{Ai(this,t);break}case v.IN_HEAD_NO_SCRIPT:{Ii(this,t);break}case v.AFTER_HEAD:{ki(this,t);break}case v.IN_BODY:case v.IN_CAPTION:case v.IN_CELL:case v.IN_TEMPLATE:{wm(this,t);break}case v.TEXT:case v.IN_SELECT:case v.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case v.IN_TABLE:case v.IN_TABLE_BODY:case v.IN_ROW:{Co(this,t);break}case v.IN_TABLE_TEXT:{Fm(this,t);break}case v.IN_COLUMN_GROUP:{ta(this,t);break}case v.AFTER_BODY:{na(this,t);break}case v.AFTER_AFTER_BODY:{ks(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){W_(this,t);return}switch(this.insertionMode){case v.INITIAL:{si(this,t);break}case v.BEFORE_HTML:{Ci(this,t);break}case v.BEFORE_HEAD:{Si(this,t);break}case v.IN_HEAD:{Ai(this,t);break}case v.IN_HEAD_NO_SCRIPT:{Ii(this,t);break}case v.AFTER_HEAD:{ki(this,t);break}case v.TEXT:{this._insertCharacters(t);break}case v.IN_TABLE:case v.IN_TABLE_BODY:case v.IN_ROW:{Co(this,t);break}case v.IN_COLUMN_GROUP:{ta(this,t);break}case v.AFTER_BODY:{na(this,t);break}case v.AFTER_AFTER_BODY:{ks(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){lu(this,t);return}switch(this.insertionMode){case v.INITIAL:case v.BEFORE_HTML:case v.BEFORE_HEAD:case v.IN_HEAD:case v.IN_HEAD_NO_SCRIPT:case v.AFTER_HEAD:case v.IN_BODY:case v.IN_TABLE:case v.IN_CAPTION:case v.IN_COLUMN_GROUP:case v.IN_TABLE_BODY:case v.IN_ROW:case v.IN_CELL:case v.IN_SELECT:case v.IN_SELECT_IN_TABLE:case v.IN_TEMPLATE:case v.IN_FRAMESET:case v.AFTER_FRAMESET:{lu(this,t);break}case v.IN_TABLE_TEXT:{ai(this,t);break}case v.AFTER_BODY:{Ak(this,t);break}case v.AFTER_AFTER_BODY:case v.AFTER_AFTER_FRAMESET:{Ik(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case v.INITIAL:{kk(this,t);break}case v.BEFORE_HEAD:case v.IN_HEAD:case v.IN_HEAD_NO_SCRIPT:case v.AFTER_HEAD:{this._err(t,F.misplacedDoctype);break}case v.IN_TABLE_TEXT:{ai(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,F.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?Y_(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case v.INITIAL:{si(this,t);break}case v.BEFORE_HTML:{_k(this,t);break}case v.BEFORE_HEAD:{Dk(this,t);break}case v.IN_HEAD:{nn(this,t);break}case v.IN_HEAD_NO_SCRIPT:{Pk(this,t);break}case v.AFTER_HEAD:{Lk(this,t);break}case v.IN_BODY:{It(this,t);break}case v.IN_TABLE:{Lr(this,t);break}case v.IN_TABLE_TEXT:{ai(this,t);break}case v.IN_CAPTION:{w_(this,t);break}case v.IN_COLUMN_GROUP:{bl(this,t);break}case v.IN_TABLE_BODY:{Oa(this,t);break}case v.IN_ROW:{Fa(this,t);break}case v.IN_CELL:{R_(this,t);break}case v.IN_SELECT:{jm(this,t);break}case v.IN_SELECT_IN_TABLE:{O_(this,t);break}case v.IN_TEMPLATE:{M_(this,t);break}case v.AFTER_BODY:{j_(this,t);break}case v.IN_FRAMESET:{H_(this,t);break}case v.AFTER_FRAMESET:{z_(this,t);break}case v.AFTER_AFTER_BODY:{q_(this,t);break}case v.AFTER_AFTER_FRAMESET:{V_(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?K_(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case v.INITIAL:{si(this,t);break}case v.BEFORE_HTML:{vk(this,t);break}case v.BEFORE_HEAD:{wk(this,t);break}case v.IN_HEAD:{Nk(this,t);break}case v.IN_HEAD_NO_SCRIPT:{Rk(this,t);break}case v.AFTER_HEAD:{Ok(this,t);break}case v.IN_BODY:{La(this,t);break}case v.TEXT:{y_(this,t);break}case v.IN_TABLE:{ji(this,t);break}case v.IN_TABLE_TEXT:{ai(this,t);break}case v.IN_CAPTION:{N_(this,t);break}case v.IN_COLUMN_GROUP:{P_(this,t);break}case v.IN_TABLE_BODY:{cu(this,t);break}case v.IN_ROW:{Bm(this,t);break}case v.IN_CELL:{L_(this,t);break}case v.IN_SELECT:{Hm(this,t);break}case v.IN_SELECT_IN_TABLE:{F_(this,t);break}case v.IN_TEMPLATE:{B_(this,t);break}case v.AFTER_BODY:{zm(this,t);break}case v.IN_FRAMESET:{U_(this,t);break}case v.AFTER_FRAMESET:{$_(this,t);break}case v.AFTER_AFTER_BODY:{ks(this,t);break}}}onEof(t){switch(this.insertionMode){case v.INITIAL:{si(this,t);break}case v.BEFORE_HTML:{Ci(this,t);break}case v.BEFORE_HEAD:{Si(this,t);break}case v.IN_HEAD:{Ai(this,t);break}case v.IN_HEAD_NO_SCRIPT:{Ii(this,t);break}case v.AFTER_HEAD:{ki(this,t);break}case v.IN_BODY:case v.IN_TABLE:case v.IN_CAPTION:case v.IN_COLUMN_GROUP:case v.IN_TABLE_BODY:case v.IN_ROW:case v.IN_CELL:case v.IN_SELECT:case v.IN_SELECT_IN_TABLE:{Lm(this,t);break}case v.TEXT:{T_(this,t);break}case v.IN_TABLE_TEXT:{ai(this,t);break}case v.IN_TEMPLATE:{Um(this,t);break}case v.AFTER_BODY:case v.IN_FRAMESET:case v.AFTER_FRAMESET:case v.AFTER_AFTER_BODY:case v.AFTER_AFTER_FRAMESET:{gl(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===A.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 v.IN_HEAD:case v.IN_HEAD_NO_SCRIPT:case v.AFTER_HEAD:case v.TEXT:case v.IN_COLUMN_GROUP:case v.IN_SELECT:case v.IN_SELECT_IN_TABLE:case v.IN_FRAMESET:case v.AFTER_FRAMESET:{this._insertCharacters(t);break}case v.IN_BODY:case v.IN_CAPTION:case v.IN_CELL:case v.IN_TEMPLATE:case v.AFTER_BODY:case v.AFTER_AFTER_BODY:case v.AFTER_AFTER_FRAMESET:{Dm(this,t);break}case v.IN_TABLE:case v.IN_TABLE_BODY:case v.IN_ROW:{Co(this,t);break}case v.IN_TABLE_TEXT:{Om(this,t);break}}}}function Ek(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):Rm(e,t),n}function xk(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(r<0?0:r),e.activeFormattingElements.removeEntry(t)),n}function yk(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let s=0,a=i;a!==n;s++,a=i){i=e.openElements.getCommonAncestor(a);const o=e.activeFormattingElements.getElementEntry(a),u=o&&s>=gk;!o||u?(u&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(a)):(a=Tk(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function Tk(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 Ck(e,t,n){const r=e.treeAdapter.getTagName(t),i=Vr(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const s=e.treeAdapter.getNamespaceURI(t);i===f.TEMPLATE&&s===V.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Sk(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,s=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,s),e.treeAdapter.appendChild(t,s),e.activeFormattingElements.insertElementAfterBookmark(s,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,s,i.tagID)}function ml(e,t){for(let n=0;n<mk;n++){const r=Ek(e,t);if(!r)break;const i=xk(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const s=yk(e,i,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(s),a&&Ck(e,a,s),Sk(e,i,r)}}function lu(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Ak(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Ik(e,t){e._appendCommentNode(t,e.document)}function gl(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],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const s=e.openElements.items[1],a=e.treeAdapter.getNodeSourceCodeLocation(s);a&&!a.endTag&&e._setEndLocation(s,t)}}}}function kk(e,t){e._setDocumentType(t);const n=t.forceQuirks?Kt.QUIRKS:nk(t);tk(t)||e._err(t,F.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=v.BEFORE_HTML}function si(e,t){e._err(t,F.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Kt.QUIRKS),e.insertionMode=v.BEFORE_HTML,e._processToken(t)}function _k(e,t){t.tagID===f.HTML?(e._insertElement(t,V.HTML),e.insertionMode=v.BEFORE_HEAD):Ci(e,t)}function vk(e,t){const n=t.tagID;(n===f.HTML||n===f.HEAD||n===f.BODY||n===f.BR)&&Ci(e,t)}function Ci(e,t){e._insertFakeRootElement(),e.insertionMode=v.BEFORE_HEAD,e._processToken(t)}function Dk(e,t){switch(t.tagID){case f.HTML:{It(e,t);break}case f.HEAD:{e._insertElement(t,V.HTML),e.headElement=e.openElements.current,e.insertionMode=v.IN_HEAD;break}default:Si(e,t)}}function wk(e,t){const n=t.tagID;n===f.HEAD||n===f.BODY||n===f.HTML||n===f.BR?Si(e,t):e._err(t,F.endTagWithoutMatchingOpenElement)}function Si(e,t){e._insertFakeElement(R.HEAD,f.HEAD),e.headElement=e.openElements.current,e.insertionMode=v.IN_HEAD,e._processToken(t)}function nn(e,t){switch(t.tagID){case f.HTML:{It(e,t);break}case f.BASE:case f.BASEFONT:case f.BGSOUND:case f.LINK:case f.META:{e._appendElement(t,V.HTML),t.ackSelfClosing=!0;break}case f.TITLE:{e._switchToTextParsing(t,Ke.RCDATA);break}case f.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ke.RAWTEXT):(e._insertElement(t,V.HTML),e.insertionMode=v.IN_HEAD_NO_SCRIPT);break}case f.NOFRAMES:case f.STYLE:{e._switchToTextParsing(t,Ke.RAWTEXT);break}case f.SCRIPT:{e._switchToTextParsing(t,Ke.SCRIPT_DATA);break}case f.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=v.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(v.IN_TEMPLATE);break}case f.HEAD:{e._err(t,F.misplacedStartTagForHeadElement);break}default:Ai(e,t)}}function Nk(e,t){switch(t.tagID){case f.HEAD:{e.openElements.pop(),e.insertionMode=v.AFTER_HEAD;break}case f.BODY:case f.BR:case f.HTML:{Ai(e,t);break}case f.TEMPLATE:{lr(e,t);break}default:e._err(t,F.endTagWithoutMatchingOpenElement)}}function lr(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==f.TEMPLATE&&e._err(t,F.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(f.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,F.endTagWithoutMatchingOpenElement)}function Ai(e,t){e.openElements.pop(),e.insertionMode=v.AFTER_HEAD,e._processToken(t)}function Pk(e,t){switch(t.tagID){case f.HTML:{It(e,t);break}case f.BASEFONT:case f.BGSOUND:case f.HEAD:case f.LINK:case f.META:case f.NOFRAMES:case f.STYLE:{nn(e,t);break}case f.NOSCRIPT:{e._err(t,F.nestedNoscriptInHead);break}default:Ii(e,t)}}function Rk(e,t){switch(t.tagID){case f.NOSCRIPT:{e.openElements.pop(),e.insertionMode=v.IN_HEAD;break}case f.BR:{Ii(e,t);break}default:e._err(t,F.endTagWithoutMatchingOpenElement)}}function Ii(e,t){const n=t.type===Ie.EOF?F.openElementsLeftAfterEof:F.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=v.IN_HEAD,e._processToken(t)}function Lk(e,t){switch(t.tagID){case f.HTML:{It(e,t);break}case f.BODY:{e._insertElement(t,V.HTML),e.framesetOk=!1,e.insertionMode=v.IN_BODY;break}case f.FRAMESET:{e._insertElement(t,V.HTML),e.insertionMode=v.IN_FRAMESET;break}case f.BASE:case f.BASEFONT:case f.BGSOUND:case f.LINK:case f.META:case f.NOFRAMES:case f.SCRIPT:case f.STYLE:case f.TEMPLATE:case f.TITLE:{e._err(t,F.abandonedHeadElementChild),e.openElements.push(e.headElement,f.HEAD),nn(e,t),e.openElements.remove(e.headElement);break}case f.HEAD:{e._err(t,F.misplacedStartTagForHeadElement);break}default:ki(e,t)}}function Ok(e,t){switch(t.tagID){case f.BODY:case f.HTML:case f.BR:{ki(e,t);break}case f.TEMPLATE:{lr(e,t);break}default:e._err(t,F.endTagWithoutMatchingOpenElement)}}function ki(e,t){e._insertFakeElement(R.BODY,f.BODY),e.insertionMode=v.IN_BODY,Ra(e,t)}function Ra(e,t){switch(t.type){case Ie.CHARACTER:{wm(e,t);break}case Ie.WHITESPACE_CHARACTER:{Dm(e,t);break}case Ie.COMMENT:{lu(e,t);break}case Ie.START_TAG:{It(e,t);break}case Ie.END_TAG:{La(e,t);break}case Ie.EOF:{Lm(e,t);break}}}function Dm(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function wm(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Fk(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Mk(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Bk(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,V.HTML),e.insertionMode=v.IN_FRAMESET)}function jk(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,V.HTML)}function Hk(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),uu.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,V.HTML)}function Uk(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,V.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function zk(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,V.HTML),n||(e.formElement=e.openElements.current))}function $k(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===f.LI&&i===f.LI||(n===f.DD||n===f.DT)&&(i===f.DD||i===f.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==f.ADDRESS&&i!==f.DIV&&i!==f.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,V.HTML)}function qk(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,V.HTML),e.tokenizer.state=Ke.PLAINTEXT}function Vk(e,t){e.openElements.hasInScope(f.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML),e.framesetOk=!1}function Wk(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(R.A);n&&(ml(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Gk(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Yk(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(f.NOBR)&&(ml(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,V.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Kk(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Qk(e,t){e.treeAdapter.getDocumentMode(e.document)!==Kt.QUIRKS&&e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,V.HTML),e.framesetOk=!1,e.insertionMode=v.IN_TABLE}function Nm(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,V.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Pm(e){const t=bm(e,Jn.TYPE);return t!=null&&t.toLowerCase()===pk}function Xk(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,V.HTML),Pm(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Zk(e,t){e._appendElement(t,V.HTML),t.ackSelfClosing=!0}function Jk(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._appendElement(t,V.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function e_(e,t){t.tagName=R.IMG,t.tagID=f.IMG,Nm(e,t)}function t_(e,t){e._insertElement(t,V.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ke.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=v.TEXT}function n_(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ke.RAWTEXT)}function r_(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ke.RAWTEXT)}function Fd(e,t){e._switchToTextParsing(t,Ke.RAWTEXT)}function i_(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===v.IN_TABLE||e.insertionMode===v.IN_CAPTION||e.insertionMode===v.IN_TABLE_BODY||e.insertionMode===v.IN_ROW||e.insertionMode===v.IN_CELL?v.IN_SELECT_IN_TABLE:v.IN_SELECT}function s_(e,t){e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML)}function a_(e,t){e.openElements.hasInScope(f.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,V.HTML)}function o_(e,t){e.openElements.hasInScope(f.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(f.RTC),e._insertElement(t,V.HTML)}function u_(e,t){e._reconstructActiveFormattingElements(),km(t),pl(t),t.selfClosing?e._appendElement(t,V.MATHML):e._insertElement(t,V.MATHML),t.ackSelfClosing=!0}function l_(e,t){e._reconstructActiveFormattingElements(),_m(t),pl(t),t.selfClosing?e._appendElement(t,V.SVG):e._insertElement(t,V.SVG),t.ackSelfClosing=!0}function Md(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML)}function It(e,t){switch(t.tagID){case f.I:case f.S:case f.B:case f.U:case f.EM:case f.TT:case f.BIG:case f.CODE:case f.FONT:case f.SMALL:case f.STRIKE:case f.STRONG:{Gk(e,t);break}case f.A:{Wk(e,t);break}case f.H1:case f.H2:case f.H3:case f.H4:case f.H5:case f.H6:{Hk(e,t);break}case f.P:case f.DL:case f.OL:case f.UL:case f.DIV:case f.DIR:case f.NAV:case f.MAIN:case f.MENU:case f.ASIDE:case f.CENTER:case f.FIGURE:case f.FOOTER:case f.HEADER:case f.HGROUP:case f.DIALOG:case f.DETAILS:case f.ADDRESS:case f.ARTICLE:case f.SEARCH:case f.SECTION:case f.SUMMARY:case f.FIELDSET:case f.BLOCKQUOTE:case f.FIGCAPTION:{jk(e,t);break}case f.LI:case f.DD:case f.DT:{$k(e,t);break}case f.BR:case f.IMG:case f.WBR:case f.AREA:case f.EMBED:case f.KEYGEN:{Nm(e,t);break}case f.HR:{Jk(e,t);break}case f.RB:case f.RTC:{a_(e,t);break}case f.RT:case f.RP:{o_(e,t);break}case f.PRE:case f.LISTING:{Uk(e,t);break}case f.XMP:{n_(e,t);break}case f.SVG:{l_(e,t);break}case f.HTML:{Fk(e,t);break}case f.BASE:case f.LINK:case f.META:case f.STYLE:case f.TITLE:case f.SCRIPT:case f.BGSOUND:case f.BASEFONT:case f.TEMPLATE:{nn(e,t);break}case f.BODY:{Mk(e,t);break}case f.FORM:{zk(e,t);break}case f.NOBR:{Yk(e,t);break}case f.MATH:{u_(e,t);break}case f.TABLE:{Qk(e,t);break}case f.INPUT:{Xk(e,t);break}case f.PARAM:case f.TRACK:case f.SOURCE:{Zk(e,t);break}case f.IMAGE:{e_(e,t);break}case f.BUTTON:{Vk(e,t);break}case f.APPLET:case f.OBJECT:case f.MARQUEE:{Kk(e,t);break}case f.IFRAME:{r_(e,t);break}case f.SELECT:{i_(e,t);break}case f.OPTION:case f.OPTGROUP:{s_(e,t);break}case f.NOEMBED:case f.NOFRAMES:{Fd(e,t);break}case f.FRAMESET:{Bk(e,t);break}case f.TEXTAREA:{t_(e,t);break}case f.NOSCRIPT:{e.options.scriptingEnabled?Fd(e,t):Md(e,t);break}case f.PLAINTEXT:{qk(e,t);break}case f.COL:case f.TH:case f.TD:case f.TR:case f.HEAD:case f.FRAME:case f.TBODY:case f.TFOOT:case f.THEAD:case f.CAPTION:case f.COLGROUP:break;default:Md(e,t)}}function c_(e,t){if(e.openElements.hasInScope(f.BODY)&&(e.insertionMode=v.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function d_(e,t){e.openElements.hasInScope(f.BODY)&&(e.insertionMode=v.AFTER_BODY,zm(e,t))}function h_(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function f_(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(f.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(f.FORM):n&&e.openElements.remove(n))}function p_(e){e.openElements.hasInButtonScope(f.P)||e._insertFakeElement(R.P,f.P),e._closePElement()}function m_(e){e.openElements.hasInListItemScope(f.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(f.LI),e.openElements.popUntilTagNamePopped(f.LI))}function g_(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function b_(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function E_(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function x_(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(R.BR,f.BR),e.openElements.pop(),e.framesetOk=!1}function Rm(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const s=e.openElements.items[i],a=e.openElements.tagIDs[i];if(r===a&&(r!==f.UNKNOWN||e.treeAdapter.getTagName(s)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(s,a))break}}function La(e,t){switch(t.tagID){case f.A:case f.B:case f.I:case f.S:case f.U:case f.EM:case f.TT:case f.BIG:case f.CODE:case f.FONT:case f.NOBR:case f.SMALL:case f.STRIKE:case f.STRONG:{ml(e,t);break}case f.P:{p_(e);break}case f.DL:case f.UL:case f.OL:case f.DIR:case f.DIV:case f.NAV:case f.PRE:case f.MAIN:case f.MENU:case f.ASIDE:case f.BUTTON:case f.CENTER:case f.FIGURE:case f.FOOTER:case f.HEADER:case f.HGROUP:case f.DIALOG:case f.ADDRESS:case f.ARTICLE:case f.DETAILS:case f.SEARCH:case f.SECTION:case f.SUMMARY:case f.LISTING:case f.FIELDSET:case f.BLOCKQUOTE:case f.FIGCAPTION:{h_(e,t);break}case f.LI:{m_(e);break}case f.DD:case f.DT:{g_(e,t);break}case f.H1:case f.H2:case f.H3:case f.H4:case f.H5:case f.H6:{b_(e);break}case f.BR:{x_(e);break}case f.BODY:{c_(e,t);break}case f.HTML:{d_(e,t);break}case f.FORM:{f_(e);break}case f.APPLET:case f.OBJECT:case f.MARQUEE:{E_(e,t);break}case f.TEMPLATE:{lr(e,t);break}default:Rm(e,t)}}function Lm(e,t){e.tmplInsertionModeStack.length>0?Um(e,t):gl(e,t)}function y_(e,t){var n;t.tagID===f.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function T_(e,t){e._err(t,F.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Co(e,t){if(vm.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=v.IN_TABLE_TEXT,t.type){case Ie.CHARACTER:{Fm(e,t);break}case Ie.WHITESPACE_CHARACTER:{Om(e,t);break}}else Ji(e,t)}function C_(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,V.HTML),e.insertionMode=v.IN_CAPTION}function S_(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,V.HTML),e.insertionMode=v.IN_COLUMN_GROUP}function A_(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(R.COLGROUP,f.COLGROUP),e.insertionMode=v.IN_COLUMN_GROUP,bl(e,t)}function I_(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,V.HTML),e.insertionMode=v.IN_TABLE_BODY}function k_(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(R.TBODY,f.TBODY),e.insertionMode=v.IN_TABLE_BODY,Oa(e,t)}function __(e,t){e.openElements.hasInTableScope(f.TABLE)&&(e.openElements.popUntilTagNamePopped(f.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function v_(e,t){Pm(t)?e._appendElement(t,V.HTML):Ji(e,t),t.ackSelfClosing=!0}function D_(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,V.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Lr(e,t){switch(t.tagID){case f.TD:case f.TH:case f.TR:{k_(e,t);break}case f.STYLE:case f.SCRIPT:case f.TEMPLATE:{nn(e,t);break}case f.COL:{A_(e,t);break}case f.FORM:{D_(e,t);break}case f.TABLE:{__(e,t);break}case f.TBODY:case f.TFOOT:case f.THEAD:{I_(e,t);break}case f.INPUT:{v_(e,t);break}case f.CAPTION:{C_(e,t);break}case f.COLGROUP:{S_(e,t);break}default:Ji(e,t)}}function ji(e,t){switch(t.tagID){case f.TABLE:{e.openElements.hasInTableScope(f.TABLE)&&(e.openElements.popUntilTagNamePopped(f.TABLE),e._resetInsertionMode());break}case f.TEMPLATE:{lr(e,t);break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:case f.TBODY:case f.TD:case f.TFOOT:case f.TH:case f.THEAD:case f.TR:break;default:Ji(e,t)}}function Ji(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Ra(e,t),e.fosterParentingEnabled=n}function Om(e,t){e.pendingCharacterTokens.push(t)}function Fm(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function ai(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ji(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Mm=new Set([f.CAPTION,f.COL,f.COLGROUP,f.TBODY,f.TD,f.TFOOT,f.TH,f.THEAD,f.TR]);function w_(e,t){const n=t.tagID;Mm.has(n)?e.openElements.hasInTableScope(f.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=v.IN_TABLE,Lr(e,t)):It(e,t)}function N_(e,t){const n=t.tagID;switch(n){case f.CAPTION:case f.TABLE:{e.openElements.hasInTableScope(f.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=v.IN_TABLE,n===f.TABLE&&ji(e,t));break}case f.BODY:case f.COL:case f.COLGROUP:case f.HTML:case f.TBODY:case f.TD:case f.TFOOT:case f.TH:case f.THEAD:case f.TR:break;default:La(e,t)}}function bl(e,t){switch(t.tagID){case f.HTML:{It(e,t);break}case f.COL:{e._appendElement(t,V.HTML),t.ackSelfClosing=!0;break}case f.TEMPLATE:{nn(e,t);break}default:ta(e,t)}}function P_(e,t){switch(t.tagID){case f.COLGROUP:{e.openElements.currentTagId===f.COLGROUP&&(e.openElements.pop(),e.insertionMode=v.IN_TABLE);break}case f.TEMPLATE:{lr(e,t);break}case f.COL:break;default:ta(e,t)}}function ta(e,t){e.openElements.currentTagId===f.COLGROUP&&(e.openElements.pop(),e.insertionMode=v.IN_TABLE,e._processToken(t))}function Oa(e,t){switch(t.tagID){case f.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,V.HTML),e.insertionMode=v.IN_ROW;break}case f.TH:case f.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(R.TR,f.TR),e.insertionMode=v.IN_ROW,Fa(e,t);break}case f.CAPTION:case f.COL:case f.COLGROUP:case f.TBODY:case f.TFOOT:case f.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE,Lr(e,t));break}default:Lr(e,t)}}function cu(e,t){const n=t.tagID;switch(t.tagID){case f.TBODY:case f.TFOOT:case f.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE);break}case f.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE,ji(e,t));break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:case f.TD:case f.TH:case f.TR:break;default:ji(e,t)}}function Fa(e,t){switch(t.tagID){case f.TH:case f.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,V.HTML),e.insertionMode=v.IN_CELL,e.activeFormattingElements.insertMarker();break}case f.CAPTION:case f.COL:case f.COLGROUP:case f.TBODY:case f.TFOOT:case f.THEAD:case f.TR:{e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE_BODY,Oa(e,t));break}default:Lr(e,t)}}function Bm(e,t){switch(t.tagID){case f.TR:{e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE_BODY);break}case f.TABLE:{e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE_BODY,cu(e,t));break}case f.TBODY:case f.TFOOT:case f.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(f.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE_BODY,cu(e,t));break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:case f.TD:case f.TH:break;default:ji(e,t)}}function R_(e,t){const n=t.tagID;Mm.has(n)?(e.openElements.hasInTableScope(f.TD)||e.openElements.hasInTableScope(f.TH))&&(e._closeTableCell(),Fa(e,t)):It(e,t)}function L_(e,t){const n=t.tagID;switch(n){case f.TD:case f.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=v.IN_ROW);break}case f.TABLE:case f.TBODY:case f.TFOOT:case f.THEAD:case f.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Bm(e,t));break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:break;default:La(e,t)}}function jm(e,t){switch(t.tagID){case f.HTML:{It(e,t);break}case f.OPTION:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e._insertElement(t,V.HTML);break}case f.OPTGROUP:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop(),e._insertElement(t,V.HTML);break}case f.HR:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop(),e._appendElement(t,V.HTML),t.ackSelfClosing=!0;break}case f.INPUT:case f.KEYGEN:case f.TEXTAREA:case f.SELECT:{e.openElements.hasInSelectScope(f.SELECT)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),t.tagID!==f.SELECT&&e._processStartTag(t));break}case f.SCRIPT:case f.TEMPLATE:{nn(e,t);break}}}function Hm(e,t){switch(t.tagID){case f.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===f.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===f.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop();break}case f.OPTION:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop();break}case f.SELECT:{e.openElements.hasInSelectScope(f.SELECT)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode());break}case f.TEMPLATE:{lr(e,t);break}}}function O_(e,t){const n=t.tagID;n===f.CAPTION||n===f.TABLE||n===f.TBODY||n===f.TFOOT||n===f.THEAD||n===f.TR||n===f.TD||n===f.TH?(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),e._processStartTag(t)):jm(e,t)}function F_(e,t){const n=t.tagID;n===f.CAPTION||n===f.TABLE||n===f.TBODY||n===f.TFOOT||n===f.THEAD||n===f.TR||n===f.TD||n===f.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Hm(e,t)}function M_(e,t){switch(t.tagID){case f.BASE:case f.BASEFONT:case f.BGSOUND:case f.LINK:case f.META:case f.NOFRAMES:case f.SCRIPT:case f.STYLE:case f.TEMPLATE:case f.TITLE:{nn(e,t);break}case f.CAPTION:case f.COLGROUP:case f.TBODY:case f.TFOOT:case f.THEAD:{e.tmplInsertionModeStack[0]=v.IN_TABLE,e.insertionMode=v.IN_TABLE,Lr(e,t);break}case f.COL:{e.tmplInsertionModeStack[0]=v.IN_COLUMN_GROUP,e.insertionMode=v.IN_COLUMN_GROUP,bl(e,t);break}case f.TR:{e.tmplInsertionModeStack[0]=v.IN_TABLE_BODY,e.insertionMode=v.IN_TABLE_BODY,Oa(e,t);break}case f.TD:case f.TH:{e.tmplInsertionModeStack[0]=v.IN_ROW,e.insertionMode=v.IN_ROW,Fa(e,t);break}default:e.tmplInsertionModeStack[0]=v.IN_BODY,e.insertionMode=v.IN_BODY,It(e,t)}}function B_(e,t){t.tagID===f.TEMPLATE&&lr(e,t)}function Um(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(f.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):gl(e,t)}function j_(e,t){t.tagID===f.HTML?It(e,t):na(e,t)}function zm(e,t){var n;if(t.tagID===f.HTML){if(e.fragmentContext||(e.insertionMode=v.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===f.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 na(e,t)}function na(e,t){e.insertionMode=v.IN_BODY,Ra(e,t)}function H_(e,t){switch(t.tagID){case f.HTML:{It(e,t);break}case f.FRAMESET:{e._insertElement(t,V.HTML);break}case f.FRAME:{e._appendElement(t,V.HTML),t.ackSelfClosing=!0;break}case f.NOFRAMES:{nn(e,t);break}}}function U_(e,t){t.tagID===f.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==f.FRAMESET&&(e.insertionMode=v.AFTER_FRAMESET))}function z_(e,t){switch(t.tagID){case f.HTML:{It(e,t);break}case f.NOFRAMES:{nn(e,t);break}}}function $_(e,t){t.tagID===f.HTML&&(e.insertionMode=v.AFTER_AFTER_FRAMESET)}function q_(e,t){t.tagID===f.HTML?It(e,t):ks(e,t)}function ks(e,t){e.insertionMode=v.IN_BODY,Ra(e,t)}function V_(e,t){switch(t.tagID){case f.HTML:{It(e,t);break}case f.NOFRAMES:{nn(e,t);break}}}function W_(e,t){t.chars=Ue,e._insertCharacters(t)}function G_(e,t){e._insertCharacters(t),e.framesetOk=!1}function $m(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==V.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Y_(e,t){if(lk(t))$m(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===V.MATHML?km(t):r===V.SVG&&(ck(t),_m(t)),pl(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function K_(e,t){if(t.tagID===f.P||t.tagID===f.BR){$m(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)===V.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}R.AREA,R.BASE,R.BASEFONT,R.BGSOUND,R.BR,R.COL,R.EMBED,R.FRAME,R.HR,R.IMG,R.INPUT,R.KEYGEN,R.LINK,R.META,R.PARAM,R.SOURCE,R.TRACK,R.WBR;const Q_=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,X_=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Bd={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function qm(e,t){const n=ov(e),r=Ea("type",{handlers:{root:Z_,element:J_,text:ev,comment:Wm,doctype:tv,raw:rv},unknown:iv}),i={parser:n?new Od(Bd):Od.getFragmentParser(void 0,Bd),handle(o){r(o,i)},stitches:!1,options:t||{}};r(e,i),Wr(i,cn());const s=n?i.parser.document:i.parser.getFragment(),a=J5(s,{file:i.options.file});return i.stitches&&Lt(a,"comment",function(o,u,l){const d=o;if(d.value.stitch&&l&&u!==void 0){const c=l.children;return c[u]=d.value.stitch,u}}),a.type==="root"&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function Vm(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Z_(e,t){Vm(e.children,t)}function J_(e,t){sv(e,t),Vm(e.children,t),av(e,t)}function ev(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ie.CHARACTER,chars:e.value,location:es(e)};Wr(t,cn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function tv(e,t){const n={type:Ie.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:es(e)};Wr(t,cn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function nv(e,t){t.stitches=!0;const n=uv(e);if("children"in e&&"children"in n){const r=qm({type:"root",children:e.children},t.options);n.children=r.children}Wm({type:"comment",value:{stitch:n}},t)}function Wm(e,t){const n=e.value,r={type:Ie.COMMENT,data:n,location:es(e)};Wr(t,cn(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function rv(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,Gm(t,cn(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Q_,"<$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 iv(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))nv(n,t);else{let r="";throw X_.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 Wr(e,t){Gm(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=Ke.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 Gm(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 sv(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ke.PLAINTEXT)return;Wr(t,cn(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Xn.html;i===Xn.html&&n==="svg"&&(i=Xn.svg);const s=pI({...e,children:[]},{space:i===Xn.svg?"svg":"html"}),a={type:Ie.START_TAG,tagName:n,tagID:Vr(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in s?s.attrs:[],location:es(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function av(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Gh.includes(n)||t.parser.tokenizer.state===Ke.PLAINTEXT)return;Wr(t,_a(e));const r={type:Ie.END_TAG,tagName:n,tagID:Vr(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:es(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ke.RCDATA||t.parser.tokenizer.state===Ke.RAWTEXT||t.parser.tokenizer.state===Ke.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ke.DATA)}function ov(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function es(e){const t=cn(e)||{line:void 0,column:void 0,offset:void 0},n=_a(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 uv(e){return"children"in e?ir({...e,children:[]}):ir(e)}function Ym(e){return function(t,n){return qm(t,{...e,file:n})}}const lv=/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]/i,cv=/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)(\/.*)?\]/i,dv=({legacyTitle:e=!1,tagName:t="div"}={})=>n=>{Lt(n,"blockquote",(r,i,s)=>{let a="",o="",u=!0,l=r.children.map(d=>{if(u&&d.type==="paragraph"){const c=d.children[0],m=c.type==="text"?c.value:"",p=e?cv:lv,g=m.match(p);if(g&&(u=!1,a=g[1].toLocaleLowerCase(),o=e&&g[2]||a.toLocaleUpperCase(),m.includes(`
|
|
152
|
+
`)&&(d.children[0]={type:"text",value:m.replace(p,"").replace(/^\n+/,"")}),!m.includes(`
|
|
153
|
+
`))){const b=[];d.children.forEach((T,x)=>{x!=0&&(x==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"}},l.unshift({type:"paragraph",children:[hv(a),{type:"text",value:o.replace(/^\//,"")}],data:{hProperties:{class:"markdown-alert-title",dir:"auto"}}})),r.children=[...l]})};function hv(e){let t=fv[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 fv={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 pv(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 i=!1;try{i=!!document.execCommand("copy")}catch{i=!1}document.body.removeChild(n),r&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(r)),t&&t(i)}function Km(e){if(!e)return null;var t=e;return t.dataset.code&&t.classList.contains("copied")?t:t.parentElement?Km(t.parentElement):null}function mv(e){var t=n=>{var r=Km(n.target);r&&(r.classList.add("active"),pv(r.dataset.code,function(){setTimeout(()=>{r.classList.remove("active")},2e3)}))};P.useEffect(()=>{var n,r;return(n=e.current)==null||n.removeEventListener("click",t,!1),(r=e.current)==null||r.addEventListener("click",t,!1),()=>{var i;(i=e.current)==null||i.removeEventListener("click",t,!1)}},[e])}var gv=["prefixCls","className","source","style","disableCopy","skipHtml","onScroll","onMouseOver","pluginsFilter","rehypeRewrite","wrapperElement","warpperElement","urlTransform"],bv=e=>e;const Ev=P.forwardRef((e,t)=>{var{prefixCls:n="wmde-markdown wmde-markdown-color",className:r,source:i,style:s,disableCopy:a=!1,skipHtml:o=!0,onScroll:u,onMouseOver:l,pluginsFilter:d,wrapperElement:c={},warpperElement:m={},urlTransform:p}=e,g=FT(e,gv),b=P.useRef(null);P.useImperativeHandle(t,()=>Sn({},e,{mdp:b}),[b,e]);var T=(n||"")+" "+(r||"");mv(b);var x=[...g.rehypePlugins||[]],C={allowElement:(D,N,B)=>g.allowElement?g.allowElement(D,N,B):/^[A-Za-z0-9]+$/.test(D.tagName)};o&&x.push(Ym);var S=[dv,...g.remarkPlugins||[],z5],w=Sn({},m,c);return h.jsx("div",Sn({ref:b,onScroll:u,onMouseOver:l},w,{className:T,style:s,children:h.jsx(PS,Sn({},C,g,{skipHtml:o,urlTransform:p||bv,rehypePlugins:d?d("rehype",x):x,remarkPlugins:d?d("remark",S):S,children:i||""}))}))});var _s={},du={};function xv(e,t){for(var n=t,r=0;r<e.length;r++){var i=r===e.length-1,s=e.charAt(r),a=n[s]||(n[s]={chars:{}});i&&(a.self=e),n=a.chars}}function jd(e){if(e.length===0)return _s;for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];xv(i,t)}return t}function yv(e){if(e.length===0)return du;for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];t[i]=!0}return t}var ms={},Hd={type:"String",optional:!0};function Tv(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,i=e;r<i.length;r++){var s=i[r];s==="NoArgument"&&(t.optional=!0),s==="Formula"&&n("Formula"),s==="FormulaOfSelector"&&(n("Formula"),t.ofSelector=!0),s==="String"&&n("String"),s==="Selector"&&n("Selector")}return t}function Cv(e){for(var t={},n=0,r=Object.keys(e);n<r.length;n++){var i=r[n],s=e[i];if(s)for(var a=0,o=s;a<o.length;a++){var u=o[a];(t[u]||(t[u]=[])).push(i)}}return t}function Ud(e){for(var t=Cv(e),n={},r=0,i=Object.keys(t);r<i.length;r++){var s=i[r],a=t[s];a&&(n[s]=Tv(a))}return n}var Or=function(){return Or=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Or.apply(this,arguments)},Sv={},hu={wildcard:!0};function Av(e){return e?typeof e=="boolean"?hu:e:Sv}function Iv(e,t){return function(n,r){return t(e(n),e(r))}}function kv(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 zd(e,t){return function(n,r){return r===!0?e:t(n===!0?e:n,r)}}function xr(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=Or({},t),i=0,s=Object.entries(n);i<s.length;i++){var a=s[i],o=a[0],u=a[1];if(o!=="latest"){var l=e[o];r[o]=l(t[o],u)}}return r}}function bn(e,t){return t!==void 0?t:e}function gs(e,t){return t?e?e.concat(t):t:e}function $d(e,t){if(!t)return e;if(!e)return t;for(var n=Or({},e),r=0,i=Object.entries(t);r<i.length;r++){var s=i[r],a=s[0],o=s[1];if(!o){delete n[a];continue}var u=e[a];if(!u){n[a]=o;continue}n[a]=u.concat(o)}return n}var er=kv(xr({baseSyntax:bn,modules:gs,tag:zd(hu,xr({wildcard:bn})),ids:bn,classNames:bn,namespace:zd(hu,xr({wildcard:bn})),combinators:gs,attributes:xr({operators:gs,caseSensitivityModifiers:gs,unknownCaseSensitivityModifiers:bn}),pseudoClasses:xr({unknown:bn,definitions:$d}),pseudoElements:xr({unknown:bn,notation:bn,definitions:Iv(function(e){return Array.isArray(e)?{NoArgument:e}:e},$d)})})),Qm={tag:{},ids:!0,classNames:!0,combinators:[],pseudoElements:{unknown:"reject",notation:"singleColon",definitions:["first-letter","first-line"]},pseudoClasses:{unknown:"reject",definitions:{NoArgument:["link","visited","active"]}}},Xm=er(Qm,{tag:{wildcard:!0},combinators:[">","+"],attributes:{unknownCaseSensitivityModifiers:"reject",operators:["=","~=","|="]},pseudoElements:{definitions:["before","after"]},pseudoClasses:{unknown:"reject",definitions:{NoArgument:["hover","focus","first-child"],String:["lang"]}}}),fu=er(Xm,{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"]}}}),Zm=er(fu,{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"]}}}),ra={"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"]}}}},Jm=Or(Or({},Zm),{modules:Object.entries(ra).filter(function(e){var t=e[1].latest;return t}).map(function(e){var t=e[0];return t})}),_v=er(Jm,{pseudoElements:{unknown:"accept"},pseudoClasses:{unknown:"accept"},attributes:{unknownCaseSensitivityModifiers:"accept"}}),pu={css1:Qm,css2:Xm,css3:fu,"selectors-3":fu,"selectors-4":Zm,latest:Jm,progressive:_v};function vv(){for(var e={pseudoClasses:{},pseudoElements:{}},t=["css1","css2","css3","selectors-3","selectors-4"],n=0,r=t;n<r.length;n++){var i=r[n],s=pu[i];if(s.pseudoClasses&&typeof s.pseudoClasses=="object"){var a=s.pseudoClasses.definitions;if(a)for(var o=0,u=Object.entries(a);o<u.length;o++)for(var l=u[o],d=l[1],c=0,m=d;c<m.length;c++){var p=m[c];e.pseudoClasses[p]||(e.pseudoClasses[p]=[]),e.pseudoClasses[p].includes(i)||e.pseudoClasses[p].push(i)}}if(s.pseudoElements&&typeof s.pseudoElements=="object"){var a=s.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(i)||e.pseudoElements[T].push(i)}else for(var x=0,C=Object.values(a);x<C.length;x++)for(var d=C[x],S=0,w=d;S<w.length;S++){var D=w[S];e.pseudoElements[D]||(e.pseudoElements[D]=[]),e.pseudoElements[D].includes(i)||e.pseudoElements[D].push(i)}}}for(var N=0,B=Object.entries(ra);N<B.length;N++){var Z=B[N],J=Z[0],E=Z[1];if(E.pseudoClasses&&typeof E.pseudoClasses=="object"){var a=E.pseudoClasses.definitions;if(a)for(var L=0,O=Object.values(a);L<O.length;L++)for(var d=O[L],z=0,M=d;z<M.length;z++){var K=M[z];e.pseudoClasses[K]||(e.pseudoClasses[K]=[]),e.pseudoClasses[K].includes(J)||e.pseudoClasses[K].push(J)}}if(E.pseudoElements&&typeof E.pseudoElements=="object"){var a=E.pseudoElements.definitions;if(a)if(Array.isArray(a))for(var se=0,fe=a;se<fe.length;se++){var pe=fe[se];e.pseudoElements[pe]||(e.pseudoElements[pe]=[]),e.pseudoElements[pe].includes(J)||e.pseudoElements[pe].push(J)}else for(var W=0,k=Object.values(a);W<k.length;W++)for(var d=k[W],ae=0,de=d;ae<de.length;ae++){var _=de[ae];e.pseudoElements[_]||(e.pseudoElements[_]=[]),e.pseudoElements[_].includes(J)||e.pseudoElements[_].push(J)}}}return e}var qd=vv();function oi(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="-"||e==="_"||e==="\\"||e>=" "}function Vd(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="-"||e==="_"||e>=" "}function ui(e){return e>="a"&&e<="f"||e>="A"&&e<="F"||e>="0"&&e<="9"}var Dv={" ":!0," ":!0,"\n":!0,"\r":!0,"\f":!0},wv={'"':!0,"'":!0},So={0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0},Nv=6,Ao="css-selector-parser parse error: ";function Pv(e){e===void 0&&(e={});var t=e.syntax,n=t===void 0?"latest":t,r=e.substitutes,i=e.strict,s=i===void 0?!0:i,a=e.modules,o=typeof n=="object"?n:pu[n];if(o.baseSyntax&&(o=er(pu[o.baseSyntax],o)),o.modules&&o.modules.length>0)for(var u=0,l=o.modules;u<l.length;u++){var d=l[u],c=ra[d];c&&(o=er(c,o))}if(a&&a.length>0)for(var m=0,p=a;m<p.length;m++){var g=p[m],c=ra[g];c&&(o=er(c,o))}var b=o.tag?[!0,!!Av(o.tag).wildcard]:[!1,!1],T=b[0],x=b[1],C=!!o.ids,S=!!o.classNames,w=!!o.namespace,D=o.namespace&&(o.namespace===!0||o.namespace.wildcard===!0);if(w&&!T)throw new Error("".concat(Ao,"Namespaces cannot be enabled while tags are disabled."));var N=!!r,B=o.combinators?jd(o.combinators):_s,Z=o.attributes?[!0,o.attributes.operators?jd(o.attributes.operators):_s,o.attributes.caseSensitivityModifiers?yv(o.attributes.caseSensitivityModifiers):du,o.attributes.unknownCaseSensitivityModifiers==="accept"]:[!1,_s,du,!1],J=Z[0],E=Z[1],L=Z[2],O=Z[3],z=O||Object.keys(L).length>0,M=o.pseudoClasses?[!0,o.pseudoClasses.definitions?Ud(o.pseudoClasses.definitions):ms,o.pseudoClasses.unknown==="accept"]:[!1,ms,!1],K=M[0],se=M[1],fe=M[2],pe=o.pseudoElements?[!0,o.pseudoElements.notation==="singleColon"||o.pseudoElements.notation==="both",!o.pseudoElements.notation||o.pseudoElements.notation==="doubleColon"||o.pseudoElements.notation==="both",o.pseudoElements.definitions?Ud(Array.isArray(o.pseudoElements.definitions)?{NoArgument:o.pseudoElements.definitions}:o.pseudoElements.definitions):ms,o.pseudoElements.unknown==="accept"]:[!1,!1,!1,ms,!1],W=pe[0],k=pe[1],ae=pe[2],de=pe[3],_=pe[4],Ee="",me=Ee.length,q=0,ie="",te=function(Y){return ie===Y},we=function(){return te("*")||oi(ie)},ne=function(Y){q=Y,ie=Ee.charAt(q)},U=function(){q++,ie=Ee.charAt(q)},xe=function(){var Y=ie;return q++,ie=Ee.charAt(q),Y};function je(Y){var re=Math.min(me-1,q),ue=new Error("".concat(Ao).concat(Y," Pos: ").concat(re,"."));throw ue.position=re,ue.name="ParserError",ue}function ce(Y,re){if(!Y)return je(re)}var zt=function(){ce(q<me,"Unexpected end of input.")},mt=function(){return q>=me},Ce=function(Y){ce(q<me,'Expected "'.concat(Y,'" but end of input reached.')),ce(ie===Y,'Expected "'.concat(Y,'" but "').concat(ie,'" found.')),q++,ie=Ee.charAt(q)};function st(Y){var re=at(Y,q);if(re)return q+=re.length,ie=Ee.charAt(q),re}function at(Y,re){var ue=Ee.charAt(re),be=Y[ue];if(be){var Nt=at(be.chars,re+1);if(Nt)return Nt;if(be.self)return be.self}}function Xe(){for(var Y=xe(),re=1;ui(ie)&&re<Nv;)Y+=xe(),re++;return Xr(),String.fromCharCode(parseInt(Y,16))}function rn(Y){var re="";for(Ce(Y);q<me;){if(te(Y))return U(),re;te("\\")?(U(),te(Y)?(re+=Y,U()):ie===`
|
|
154
|
+
`||ie==="\f"?U():ie==="\r"?(U(),te(`
|
|
155
|
+
`)&&U()):ui(ie)?re+=Xe():(re+=ie,U())):(re+=ie,U())}return re}function oe(){if(!oi(ie))return null;for(var Y="";te("-");)Y+=ie,U();for(Y==="-"&&!Vd(ie)&&!te("\\")&&je("Identifiers cannot consist of a single hyphen."),s&&Y.length>=2&&je("Identifiers cannot start with two hyphens with strict mode on."),So[ie]&&je("Identifiers cannot start with hyphens followed by digits.");q<me;)if(Vd(ie))Y+=xe();else if(te("\\"))U(),zt(),ui(ie)?Y+=Xe():Y+=xe();else break;return Y}function Qr(){for(var Y="";q<me&&!te(")");)if(te("\\")){if(U(),mt()&&!s)return(Y+"\\").trim();zt(),ui(ie)?Y+=Xe():Y+=xe()}else Y+=xe();return Y.trim()}function Xr(){if(ie===" "||ie===" "||ie==="\f"||ie===`
|
|
156
|
+
`){U();return}ie==="\r"&&U(),ie===`
|
|
157
|
+
`&&U()}function ze(){for(;Dv[ie];)U()}function H(Y){Y===void 0&&(Y=!1),ze();for(var re=[$t(Y)];te(",");)U(),ze(),re.push($t(Y));return{type:"Selector",rules:re}}function ee(){Ce("["),ze();var Y;if(te("|")){ce(w,"Namespaces are not enabled."),U();var re=oe();ce(re,"Expected attribute name."),Y={type:"Attribute",name:re,namespace:{type:"NoNamespace"}}}else if(te("*")){ce(w,"Namespaces are not enabled."),ce(D,"Wildcard namespace is not enabled."),U(),Ce("|");var ue=oe();ce(ue,"Expected attribute name."),Y={type:"Attribute",name:ue,namespace:{type:"WildcardNamespace"}}}else{var be=oe();if(ce(be,"Expected attribute name."),Y={type:"Attribute",name:be},te("|")){var Nt=q;if(U(),oi(ie)){ce(w,"Namespaces are not enabled.");var Dn=oe();ce(Dn,"Expected attribute name."),Y={type:"Attribute",name:Dn,namespace:{type:"NamespaceName",name:be}}}else ne(Nt)}}if(ce(Y.name,"Expected attribute name."),ze(),mt()&&!s)return Y;if(te("]"))U();else{if(Y.operator=st(E),ce(Y.operator,"Expected a valid attribute selector operator."),ze(),zt(),wv[ie])Y.value={type:"String",value:rn(ie)};else if(N&&te("$")){U();var wn=oe();ce(wn,"Expected substitute name."),Y.value={type:"Substitution",name:wn}}else{var Nn=oe();ce(Nn,"Expected attribute value."),Y.value={type:"String",value:Nn}}if(ze(),mt()&&!s)return Y;if(!te("]")){var Jt=oe();if(ce(Jt,"Expected end of attribute selector."),Y.caseSensitivityModifier=Jt,ce(z,"Attribute case sensitivity modifiers are not enabled."),ce(O||L[Y.caseSensitivityModifier],"Unknown attribute case sensitivity modifier."),ze(),mt()&&!s)return Y}Ce("]")}return Y}function ge(){for(var Y="";So[ie];)Y+=xe();return ce(Y!=="","Formula parse error."),parseInt(Y)}var Se=function(){return te("-")||te("+")||So[ie]};function ve(){if(te("e")||te("o")){var Y=oe();if(Y==="even")return ze(),[2,0];if(Y==="odd")return ze(),[2,1]}var re=null,ue=1;if(te("-")&&(U(),ue=-1),Se()&&(te("+")&&U(),re=ge(),!te("\\")&&!te("n")))return[0,re*ue];re===null&&(re=1),re*=ue;var be;if(te("\\")?(U(),ui(ie)?be=Xe():be=xe()):be=xe(),ce(be==="n",'Formula parse error: expected "n".'),ze(),te("+")||te("-")){var Nt=te("+")?1:-1;return U(),ze(),[re,Nt*ge()]}else return[re,0]}function gt(Y,re,ue){var be;if(te("(")){if(U(),ze(),N&&te("$")){U();var Nt=oe();ce(Nt,"Expected substitute name."),be={type:"Substitution",name:Nt}}else if(ue.type==="String")be={type:"String",value:Qr()},ce(be.value,"Expected ".concat(re," argument value."));else if(ue.type==="Selector")be=H(!0);else if(ue.type==="Formula"){var Dn=ve(),wn=Dn[0],Nn=Dn[1];if(be={type:"Formula",a:wn,b:Nn},ue.ofSelector&&(ze(),te("o")||te("\\"))){var Jt=oe();ce(Jt==="of","Formula of selector parse error."),ze(),be={type:"FormulaOfSelector",a:wn,b:Nn,selector:$t()}}}else return je("Invalid ".concat(re," signature."));if(ze(),mt()&&!s)return be;Ce(")")}else ce(ue.optional,"Argument is required for ".concat(re,' "').concat(Y,'".'));return be}function ct(){if(te("*"))return ce(x,"Wildcard tag name is not enabled."),U(),{type:"WildcardTag"};if(oi(ie)){ce(T,"Tag names are not enabled.");var Y=oe();return ce(Y,"Expected tag name."),{type:"TagName",name:Y}}else return je("Expected tag name.")}function wt(){if(te("*")){var Y=q;if(U(),!te("|")||(U(),!we()))return ne(Y),ct();ce(w,"Namespaces are not enabled."),ce(D,"Wildcard namespace is not enabled.");var re=ct();return re.namespace={type:"WildcardNamespace"},re}else if(te("|")){ce(w,"Namespaces are not enabled."),U();var re=ct();return re.namespace={type:"NoNamespace"},re}else if(oi(ie)){var ue=oe();if(ce(ue,"Expected tag name."),!te("|"))return ce(T,"Tag names are not enabled."),{type:"TagName",name:ue};var Y=q;if(U(),!we())return ne(Y),{type:"TagName",name:ue};ce(w,"Namespaces are not enabled.");var re=ct();return re.namespace={type:"NamespaceName",name:ue},re}else return je("Expected tag name.")}function $t(Y){var re,ue;Y===void 0&&(Y=!1);var be={type:"Rule",items:[]};if(Y){var Nt=st(B);Nt&&(be.combinator=Nt,ze())}for(;q<me;)if(we())ce(be.items.length===0,"Unexpected tag/namespace start."),be.items.push(wt());else if(te("|")){var Dn=q;if(U(),we())ce(be.items.length===0,"Unexpected tag/namespace start."),ne(Dn),be.items.push(wt());else{ne(Dn);break}}else if(te(".")){ce(S,"Class names are not enabled."),U();var wn=oe();ce(wn,"Expected class name."),be.items.push({type:"ClassName",name:wn})}else if(te("#")){ce(C,"IDs are not enabled."),U();var Nn=oe();ce(Nn,"Expected ID name."),be.items.push({type:"Id",name:Nn})}else if(te("["))ce(J,"Attributes are not enabled."),be.items.push(ee());else if(te(":")){var Jt=!1,_l=!1;U(),te(":")&&(ce(W,"Pseudo elements are not enabled."),ce(ae,"Pseudo elements double colon notation is not enabled."),Jt=!0,U());var kt=oe();if(ce(Jt||kt,"Expected pseudo-class name."),ce(!Jt||kt,"Expected pseudo-element name."),ce(kt,"Expected pseudo-class name."),!(!Jt||_||Object.prototype.hasOwnProperty.call(de,kt))){var Un=qd.pseudoElements[kt],Zr='Unknown pseudo-element "'.concat(kt,'"');Un&&Un.length>0&&(Zr+=". It is defined in: ".concat(Un.join(", "))),je(Zr+".")}if(_l=W&&(Jt||!Jt&&k&&Object.prototype.hasOwnProperty.call(de,kt)),_l){var ts=(re=de[kt])!==null&&re!==void 0?re:_&&Hd,vl={type:"PseudoElement",name:kt},zn=gt(kt,"pseudo-element",ts);zn&&(ce(zn.type!=="Formula"&&zn.type!=="FormulaOfSelector","Pseudo-elements cannot have formula argument."),vl.argument=zn),be.items.push(vl)}else{ce(K,"Pseudo-classes are not enabled.");var ts=(ue=se[kt])!==null&&ue!==void 0?ue:fe&&Hd;if(!ts){var Un=qd.pseudoClasses[kt],Zr='Unknown pseudo-class: "'.concat(kt,'"');Un&&Un.length>0&&(Zr+=". It is defined in: ".concat(Un.join(", "))),je(Zr+".")}var zn=gt(kt,"pseudo-class",ts),Dl={type:"PseudoClass",name:kt};zn&&(Dl.argument=zn),be.items.push(Dl)}}else break;if(be.items.length===0)return mt()?je("Expected rule but end of input reached."):je('Expected rule but "'.concat(ie,'" found.'));if(ze(),!mt()&&!te(",")&&!te(")")){var Nt=st(B);ze(),be.nestedRule=$t(),be.nestedRule.combinator=Nt}return be}return function(Y){if(typeof Y!="string")throw new Error("".concat(Ao,"Expected string input."));return Ee=Y,me=Ee.length,q=0,ie=Ee.charAt(0),H()}}const Rv=Pv({syntax:"selectors-4"});function Lv(e){if(typeof e!="string")throw new TypeError("Expected `string` as selector, not `"+e+"`");return Rv(e)}const e0="֑-߿יִ-﷽ﹰ-ﻼ",t0="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",Ov=new RegExp("^[^"+t0+"]*["+e0+"]"),Fv=new RegExp("^[^"+e0+"]*["+t0+"]");function Mv(e){const t=String(e||"");return Ov.test(t)?"rtl":Fv.test(t)?"ltr":"neutral"}function n0(e){return"children"in e?r0(e):"value"in e?e.value:""}function Bv(e){return e.type==="text"?e.value:"children"in e?r0(e):""}function r0(e){let t=-1;const n=[];for(;++t<e.children.length;)n[t]=Bv(e.children[t]);return n.join("")}function jv(e,t){const n=e.schema,r=e.language,i=e.direction,s=e.editableOrEditingHost;let a;if(t.type==="element"){const l=t.properties.xmlLang||t.properties.lang,d=t.properties.type||"text",c=Wd(t);l!=null&&(e.language=String(l)),n&&n.space==="html"?(t.properties.contentEditable==="true"&&(e.editableOrEditingHost=!0),t.tagName==="svg"&&(e.schema=kn),c==="rtl"?a=c:c==="ltr"||c!=="auto"&&t.tagName==="html"||c!=="auto"&&t.tagName==="input"&&d==="tel"?a="ltr":(c==="auto"||t.tagName==="bdi")&&(t.tagName==="textarea"?a=Io(n0(t)):t.tagName==="input"&&(d==="email"||d==="search"||d==="tel"||d==="text")?a=t.properties.value?Io(String(t.properties.value)):"ltr":Lt(t,u)),a&&(e.direction=a)):e.editableOrEditingHost&&(e.editableOrEditingHost=!1)}return o;function o(){e.schema=n,e.language=r,e.direction=i,e.editableOrEditingHost=s}function u(l){if(l.type==="text")return a=Io(l.value),a?Zs:void 0;if(l!==t&&l.type==="element"&&(l.tagName==="bdi"||l.tagName==="script"||l.tagName==="style"||l.tagName==="textare"||Wd(l)))return Ti}}function Io(e){const t=Mv(e);return t==="neutral"?void 0:t}function Wd(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 Hv(e,t,n){const r=Gi(n,e.name),i=t.properties[r.property];let s=Uv(i,r);if(!e.value)return s!==void 0;e.value.type;let a=e.value.value;if(e.caseSensitivityModifier==="i"&&(a=a.toLowerCase(),s&&(s=s.toLowerCase())),s!==void 0)switch(e.operator){case"=":return a===s;case"$=":return a===s.slice(-a.length);case"*=":return s.includes(a);case"^=":return a===s.slice(0,a.length);case"|=":return a===s||a===s.slice(0,a.length)&&s.charAt(a.length)==="-";case"~=":return a===s||Vo(s).includes(a)}return!1}function Uv(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?xa:ya)(e)}else return String(e)}const zv=[];function $v(e,t){return(t.properties.className||zv).includes(e.name)}function qv(e,t){return t.properties.id===e.name}function Vv(e,t){return e.name===t.tagName}function Wv(e,t){return function(n,r){let i=Gd(n,"tag");const s=Gd(r??"*","range"),a=[];let o=-1;for(;++o<s.length;){const u=s[o].toLowerCase();if(!t&&u==="*")continue;let l=-1;const d=[];for(;++l<i.length;)if(e(i[l].toLowerCase(),u)){if(!t)return i[l];a.push(i[l])}else d.push(i[l]);i=d}return t?a:void 0}}const Gv=Wv(function(e,t){const n=e.split("-"),r=t.split("-");let i=0,s=0;if(r[s]!=="*"&&n[i]!==r[s])return!1;for(i++,s++;s<r.length;){if(r[s]==="*"){s++;continue}if(!n[i])return!1;if(n[i]===r[s]){i++,s++;continue}if(n[i].length===1)return!1;i++}return!0},!0);function Gd(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 Yv={}.hasOwnProperty;function sr(e,t){const n=e.type==="element"&&Yv.call(e.properties,t)&&e.properties[t];return n!=null&&n!==!1}const Kv=new Set([9,10,12,13,32]),Yd=48,Qv=57;function Xv(e){if(e=e.trim().toLowerCase(),e==="even")return[2,0];if(e==="odd")return[2,1];let t=0,n=0,r=s(),i=a();if(t<e.length&&e.charAt(t)==="n"&&(t++,n=r*(i??1),o(),t<e.length?(r=s(),o(),i=a()):r=i=0),i===null||t<e.length)throw new Error(`n-th rule couldn't be parsed ('${e}')`);return[n,r*i];function s(){return e.charAt(t)==="-"?(t++,-1):(e.charAt(t)==="+"&&t++,1)}function a(){const u=t;let l=0;for(;t<e.length&&e.charCodeAt(t)>=Yd&&e.charCodeAt(t)<=Qv;)l=l*10+(e.charCodeAt(t)-Yd),t++;return t===u?null:l}function o(){for(;t<e.length&&Kv.has(e.charCodeAt(t));)t++}}var ko,Kd;function Zv(){return Kd||(Kd=1,ko={trueFunc:function(){return!0},falseFunc:function(){return!1}}),ko}var Jv=Zv();const Qd=sa(Jv);function e8(e){const t=e[0],n=e[1]-1;if(n<0&&t<=0)return Qd.falseFunc;if(t===-1)return s=>s<=n;if(t===0)return s=>s===n;if(t===1)return n<0?Qd.trueFunc:s=>s>=n;const r=Math.abs(t),i=(n%r+r)%r;return t>1?s=>s>=n&&s%r===i:s=>s<=n&&s%r===i}function Xd(e){return e8(Xv(e))}const t8=Xd.default||Xd,n8=Ea("name",{handlers:{"any-link":r8,blank:i8,checked:s8,dir:a8,disabled:i0,empty:o8,enabled:u8,"first-child":l8,"first-of-type":c8,has:d8,is:s0,lang:f8,"last-child":p8,"last-of-type":m8,not:g8,"nth-child":b8,"nth-last-child":E8,"nth-last-of-type":x8,"nth-of-type":y8,"only-child":T8,"only-of-type":C8,optional:S8,"read-only":A8,"read-write":a0,required:o0,root:I8,scope:k8},invalid:h8,unknown:_8});function r8(e,t){return(t.tagName==="a"||t.tagName==="area"||t.tagName==="link")&&sr(t,"href")}function hn(e,t){if(e.shallow)throw new Error("Cannot use `:"+t.name+"` without parent")}function i8(e,t){return!u0(t,n);function n(r){return r.type==="element"||r.type==="text"&&!Yi(r)}}function s8(e,t){return t.tagName==="input"||t.tagName==="menuitem"?!!((t.properties.type==="checkbox"||t.properties.type==="radio")&&sr(t,"checked")):t.tagName==="option"?sr(t,"selected"):!1}function a8(e,t,n,r,i){return e.argument,e.argument.type,i.direction===e.argument.value}function i0(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")&&sr(t,"disabled")}function o8(e,t){return!u0(t,n);function n(r){return r.type==="element"||r.type==="text"}}function u8(e,t){return!i0(e,t)}function l8(e,t,n,r,i){return hn(i,e),i.elementIndex===0}function c8(e,t,n,r,i){return hn(i,e),i.typeIndex===0}function Ma(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=t8(n.a+"n+"+n.b),e._cachedFn=t}return t}function d8(e,t,n,r,i){e.argument,e.argument.type;const s={...i,found:!1,one:!0,results:[],rootQuery:e.argument,scopeElements:[t],shallow:!1};return El(s,{type:"root",children:t.children}),s.results.length>0}function h8(){}function s0(e,t,n,r,i){e.argument,e.argument.type;const s={...i,found:!1,one:!0,results:[],rootQuery:e.argument,scopeElements:[t],shallow:!1};return El(s,t),s.results[0]===t}function f8(e,t,n,r,i){return e.argument,e.argument.type,i.language!==""&&i.language!==void 0&&Gv(i.language,qo(e.argument.value)).length>0}function p8(e,t,n,r,i){return hn(i,e),!!(i.elementCount&&i.elementIndex===i.elementCount-1)}function m8(e,t,n,r,i){return hn(i,e),typeof i.typeIndex=="number"&&typeof i.typeCount=="number"&&i.typeIndex===i.typeCount-1}function g8(e,t,n,r,i){return!s0(e,t,n,r,i)}function b8(e,t,n,r,i){const s=Ma(e);return hn(i,e),typeof i.elementIndex=="number"&&s(i.elementIndex)}function E8(e,t,n,r,i){const s=Ma(e);return hn(i,e),!!(typeof i.elementCount=="number"&&typeof i.elementIndex=="number"&&s(i.elementCount-i.elementIndex-1))}function x8(e,t,n,r,i){const s=Ma(e);return hn(i,e),typeof i.typeCount=="number"&&typeof i.typeIndex=="number"&&s(i.typeCount-1-i.typeIndex)}function y8(e,t,n,r,i){const s=Ma(e);return hn(i,e),typeof i.typeIndex=="number"&&s(i.typeIndex)}function T8(e,t,n,r,i){return hn(i,e),i.elementCount===1}function C8(e,t,n,r,i){return hn(i,e),i.typeCount===1}function S8(e,t){return!o0(e,t)}function A8(e,t,n,r,i){return!a0(e,t,n,r,i)}function a0(e,t,n,r,i){return t.tagName==="input"||t.tagName==="textarea"?!sr(t,"readOnly")&&!sr(t,"disabled"):!!i.editableOrEditingHost}function o0(e,t){return(t.tagName==="input"||t.tagName==="textarea"||t.tagName==="select")&&sr(t,"required")}function I8(e,t,n,r,i){return!!((!r||r.type==="root")&&i.schema&&(i.schema.space==="html"||i.schema.space==="svg")&&(t.tagName==="html"||t.tagName==="svg"))}function k8(e,t,n,r,i){return i.scopeElements.includes(t)}function u0(e,t){const n=e.children;let r=-1;for(;++r<n.length;)if(t(n[r]))return!0;return!1}function _8(e){const t=e;throw new Error("Unknown pseudo-selector `"+t.name+"`")}function v8(e,t,n,r,i){for(const s of e.items)if(s.type==="Attribute"){if(!Hv(s,t,i.schema))return!1}else if(s.type==="Id"){if(!qv(s,t))return!1}else if(s.type==="ClassName"){if(!$v(s,t))return!1}else if(s.type==="PseudoClass"){if(!n8(s,t,n,r,i))return!1}else{if(s.type==="PseudoElement")throw new Error("Invalid selector: `::"+s.name+"`");if(s.type==="TagName"&&!Vv(s,t))return!1}return!0}const D8=[];function El(e,t){t&&l0(e,[],t,void 0,void 0,t)}function _o(e,t,n){const r=e[t];r?r.push(n):e[t]=[n]}function w8(e,t,n,r){const i=vs(t.descendant,t.directChild);let s,a=-1;const o={count:0,types:new Map},u={count:0,types:new Map};for(;++a<n.children.length;)Zd(o,n.children[a]);for(a=-1;++a<n.children.length;){const l=n.children[a],d=l.type==="element"?l.tagName.toUpperCase():void 0;if(e.elementIndex=u.count,e.typeIndex=d&&u.types.get(d)||0,e.elementCount=o.count,e.typeCount=d?o.types.get(d):0,"children"in l){const c=vs(i,s),m=l0(e,c,n.children[a],a,n,r);s=vs(m.generalSibling,m.adjacentSibling)}if(e.one&&e.found)break;Zd(u,n.children[a])}}function N8(e,t,n,r,i){const s={adjacentSibling:void 0,descendant:void 0,directChild:void 0,generalSibling:void 0};let a=-1;for(;++a<t.length;){const o=t[a];if(e.one&&e.found)break;if(e.shallow&&o.nestedRule)throw new Error("Expected selector without nesting");if(v8(o,n,r,i,e)){const u=o.nestedRule;if(u){const l=u.combinator==="+"?"adjacentSibling":u.combinator==="~"?"generalSibling":u.combinator===">"?"directChild":"descendant";_o(s,l,u)}else e.found=!0,e.results.includes(n)||e.results.push(n)}o.combinator===void 0?_o(s,"descendant",o):o.combinator==="~"&&_o(s,"generalSibling",o)}return s}function vs(e,t){return e&&t&&e.length>0&&t.length>0?[...e,...t]:e&&e.length>0?e:t&&t.length>0?t:D8}function Zd(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 l0(e,t,n,r,i,s){let a={adjacentSibling:void 0,descendant:void 0,directChild:void 0,generalSibling:void 0};const o=jv(e,n);if(n.type==="element"){let u=e.rootQuery.rules;i&&i!==s&&(u=e.rootQuery.rules.filter(l=>l.combinator===void 0||l.combinator===">"&&i===s)),a=N8(e,vs(t,u),n,r,i)}return"children"in n&&!e.shallow&&!(e.one&&e.found)&&w8(e,a,n,s),o(),a}function P8(e,t,n){const r=R8(e,t);return El(r,t||void 0),r.results}function R8(e,t,n){return{direction:"ltr",editableOrEditingHost:!1,elementCount:void 0,elementIndex:void 0,found:!1,language:void 0,one:!1,results:[],rootQuery:Lv(e),schema:Hr,scopeElements:t?t.type==="root"?t.children:[t]:[],shallow:!1,typeIndex:void 0,typeCount:void 0}}const c0=(e=[],t="")=>(e.forEach(n=>{n.type==="text"?t+=n.value:n.type==="element"&&n.children&&Array.isArray(n.children)&&(t+=c0(n.children))}),t),L8=e=>{const{selector:t,rewrite:n}=e||{};return r=>{if(!(!n||typeof n!="function")){if(t&&typeof t=="string"){const i=P8(t,r);i&&i.length>0&&Lt(r,i,(s,a,o)=>{n(s,a,o)});return}Lt(r,(i,s,a)=>{n(i,s,a)})}}},O8=(e="")=>(e.match(/([^?=&]+)(=([^&]*))/g)||[]).reduce((t,n)=>(t[n.slice(0,n.indexOf("="))]=n.slice(n.indexOf("=")+1),t),{}),F8=(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]}},d0=(e=[],t,n,r)=>{let i=t;for(;i<e.length;)if(i++,n){const s=e[i];if(s&&s.value&&s.value.replace(/(\n|\s)/g,"")!==""||e[i]&&e[i].type==="element")return s.tagName===n?s:void 0}else{const s=e[i];if(!s||s.type==="element"||s.type==="text"&&s.value.replace(/(\n|\s)/g,"")!=="")return;if(s.type&&/^(comment|raw)$/ig.test(s.type))return s.value&&!/^rehype:/.test(s.value.replace(/^(\s+)?<!--(.*?)-->/,"$2")||"")?void 0:r?d0(e,i,"pre",r)?void 0:(s.value=(s.value||"").replace(/^(\n|\s)+/,""),s):(s.value=(s.value||"").replace(/^(\n|\s)+/,""),s)}},Jd=({value:e=""})=>{const t=O8(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},eh=(e,t,n)=>n==="string"?{...e,"data-config":JSON.stringify({...t,rehyp:!0})}:n==="attr"?{...e,...t}:{...e,"data-config":{...t,rehyp:!0}},M8=(e={})=>{const{properties:t="data",codeBlockParames:n=!0}=e;return r=>{Lt(r,"element",(i,s,a)=>{if(n&&i.tagName==="pre"&&i&&Array.isArray(i.children)&&a&&Array.isArray(a.children)&&a.children.length>1){const o=i.children[0];if(o&&o.tagName==="code"&&typeof s=="number"){const u=F8(a.children,s);if(u){const l=Jd(u);Object.keys(l).length>0&&(i.properties={...i.properties,"data-type":"rehyp"},o.properties=eh(o.properties,l,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(i.tagName)&&a&&Array.isArray(a.children)&&typeof s=="number"){const o=d0(a.children,s,"",n);if(o){const u=Jd(o);Object.keys(u).length>0&&(i.properties=eh(i.properties,u,t))}}})}};var B8=function(t){return n=>{Lt(n,r=>{r.type==="element"&&r.tagName==="code"&&r.data&&r.data.meta&&(r.properties=Sn({},r.properties,{"data-meta":String(r.data.meta)}))})}},j8=function(t){return n=>{Lt(n,r=>{if(r.type==="element"&&r.tagName==="code"&&r.properties&&r.properties.dataMeta){r.data||(r.data={});var i=r.properties.dataMeta;typeof i=="string"&&(r.data.meta=i),delete r.properties.dataMeta}})}};const H8=/[\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,U8=Object.hasOwnProperty;class z8{constructor(){this.occurrences,this.reset()}slug(t,n){const r=this;let i=$8(t,n===!0);const s=i;for(;U8.call(r.occurrences,i);)r.occurrences[s]++,i=s+"-"+r.occurrences[s];return r.occurrences[i]=0,i}reset(){this.occurrences=Object.create(null)}}function $8(e,t){return typeof e!="string"?"":(t||(e=e.toLowerCase()),e.replace(H8,"").replace(/ /g,"-"))}function h0(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 q8={},th=new z8;function V8(e){const n=(e||q8).prefix||"";return function(r){th.reset(),Lt(r,"element",function(i){h0(i)&&!i.properties.id&&(i.properties.id=n+th.slug(n0(i)))})}}const f0=function(e){if(e==null)return Y8;if(typeof e=="string")return G8(e);if(typeof e=="object")return W8(e);if(typeof e=="function")return xl(e);throw new Error("Expected function, string, or array as `test`")};function W8(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=f0(e[n]);return xl(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function G8(e){return xl(t);function t(n){return n.tagName===e}}function xl(e){return t;function t(n,r,i){return!!(K8(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Y8(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function K8(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const nh={type:"element",tagName:"span",properties:{className:["icon","icon-link"]},children:[]},Q8={};function X8(e){const t=e||Q8;let n=t.properties;const r=t.headingProperties,i=t.behavior||"prepend",s=t.content,a=t.group,o=f0(t.test);let u;return i==="after"||i==="before"?u=d:i==="wrap"?u=c:(u=l,n||(n={ariaHidden:"true",tabIndex:-1})),function(m){Lt(m,"element",function(p,g,b){if(h0(p)&&p.properties.id&&o(p,g,b))return Object.assign(p.properties,bs(r,p)),u(p,g,b)})};function l(m){const p=rh(s||nh,m);return m.children[i==="prepend"?"unshift":"push"](vo(m,bs(n,m),p)),[Ti]}function d(m,p,g){if(typeof p!="number"||!g)return;const b=rh(s||nh,m),T=vo(m,bs(n,m),b);let x=i==="before"?[T,m]:[m,T];if(a){const C=p0(a,m);C&&!Array.isArray(C)&&C.type==="element"&&(C.children=x,x=[C])}return g.children.splice(p,1,...x),[Ti,p+x.length]}function c(m){let p=m.children,g=[];return typeof s=="function"?(p=[],g=s(m)):s&&(g=yl(s)),m.children=[vo(m,bs(n,m),Array.isArray(g)?[...p,...g]:[...p,g])],[Ti]}}function yl(e){return ir(e)}function vo(e,t,n){return{type:"element",tagName:"a",properties:{...t,href:"#"+e.properties.id},children:n}}function rh(e,t){const n=p0(e,t);return Array.isArray(n)?n:[n]}function p0(e,t){return typeof e=="function"?e(t):yl(e)}function bs(e,t){return typeof e=="function"?e(t):e?yl(e):{}}const Z8=(e={})=>{const{openDelimiter:t="rehype:ignore:start",closeDelimiter:n="rehype:ignore:end"}=e;return r=>{Lt(r,(i,s,a)=>{if(i.type==="element"||i.type==="root"){let o=!1;i.children=i.children.filter(u=>{if(u.type==="raw"||u.type==="comment"){let l=(u.value||"").trim();if(l=l.replace(/^<!--(.*?)-->/,"$1"),l===t)return o=!0,!1;if(l===n)return o=!1,!1}return!o})}})}};var J8={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 eD(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 tD=(e,t)=>(n,r,i)=>{if(n.type==="element"&&i&&i.type==="root"&&/h(1|2|3|4|5|6)/.test(n.tagName)){var s=n.children&&n.children[0];s&&s.properties&&s.properties.ariaHidden==="true"&&(s.properties=Sn({class:"anchor"},s.properties),s.children=[J8])}if(n.type==="element"&&n.tagName==="pre"&&!e){var a=c0(n.children);n.children.push(eD(a))}t&&t(n,r===null?void 0:r,i===null?void 0:i)},nD=[V8,X8,Z8];const m0=P.forwardRef((e,t)=>{var n,r=[B8,Ym,j8,...nD,[L8,{rewrite:tD((n=e.disableCopy)!=null?n:!1,e.rehypeRewrite)}],[M8,{properties:"attr"}],...e.rehypePlugins||[]];return h.jsx(Ev,Sn({},e,{rehypePlugins:r,ref:t}))});function rD(e,t){return De({},e,t)}var Gr=P.createContext({markdown:""});function g0(e,t){return e===void 0&&(e=[]),t===void 0&&(t={}),e.forEach(n=>{n.children&&Array.isArray(n.children)?t=De({},t,g0(n.children||[])):n.keyCommand&&n.shortcuts&&n.execute&&(t[n.shortcuts.toLocaleLowerCase()]=n)}),t}function b0(e,t,n,r,i){t===void 0&&(t=[]);var s=g0(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 o=!!s[a.join("+")],u=o?s[a.join("+")]:void 0;if(Object.keys(s).forEach(l=>{var d=l.split("+").every(c=>/ctrlcmd/.test(c)?a.includes("ctrl")||a.includes("cmd"):a.includes(c));d&&(u=s[l])}),u&&n){e.stopPropagation(),e.preventDefault(),n.executeCommand(u,r,i,a);return}}}var Do;function ih(e){if(e.nodeName!=="TEXTAREA")return!1;if(typeof Do>"u"){var t=document.createElement("textarea");t.value="1",Do=!!t.firstChild}return Do}function Dr(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 i=e.selectionStart,s=e.selectionEnd;if(typeof e.setRangeText=="function")e.setRangeText(t);else{var a=document.createRange(),o=document.createTextNode(t);if(ih(e)){var u=e.firstChild;if(!u)e.appendChild(o);else{for(var l=0,d=null,c=null;u&&(d===null||c===null);){var m=u.nodeValue.length;i>=l&&i<=l+m&&a.setStart(d=u,i-l),s>=l&&s<=l+m&&a.setEnd(c=u,s-l),l+=m,u=u.nextSibling}i!==s&&a.deleteContents()}}if(ih(e)&&a.commonAncestorContainer.nodeName==="#text")a.insertNode(o);else{var p=e.value;e.value=p.slice(0,i)+t+p.slice(s)}}e.setSelectionRange(i+t.length,i+t.length);var g=document.createEvent("UIEvent");g.initEvent("input",!0,!1),e.dispatchEvent(g)}}function Dt(e){var{text:t,selection:n,prefix:r,suffix:i=r}=e,s=n;if(t&&t.length&&n.start===n.end&&(s=iD(t,n.start)),s.start>=r.length&&s.end<=t.length-i.length){var a=t.slice(s.start-r.length,s.end+i.length);if(a.startsWith(r)&&a.endsWith(i))return{start:s.start-r.length,end:s.end+i.length}}return s}function _i(e){var{text:t,selection:n}=e,r=t.slice(0,n.start).lastIndexOf(`
|
|
158
|
+
`)+1,i=t.slice(n.end).indexOf(`
|
|
159
|
+
`)+n.end;return i===n.end-1&&(i=t.length),{start:r,end:i}}function E0(e,t){if(e===void 0&&(e=""),t===0)return 0;for(var n=2,r=!0,i=t-1;i>=0&&n>=0;i--)switch(e.charCodeAt(i)){case 32:continue;case 10:n--,r=!1;break;default:return n}return r?0:n}function x0(e,t){if(e===void 0&&(e=""),t===e.length-1)return 0;for(var n=2,r=!0,i=t;i<e.length&&n>=0;i++)switch(e.charCodeAt(i)){case 32:continue;case 10:{n--,r=!1;break}default:return n}return r?0:n}function iD(e,t){if(!e)throw Error("Argument 'text' should be truthy");for(var n=o=>o===" "||o.charCodeAt(0)===10,r=0,i=e.length,s=t;s-1>-1;s--)if(n(e[s-1])){r=s;break}for(var a=t;a<e.length;a++)if(n(e[a])){i=a;break}return{start:r,end:i}}function pt(e){var{api:t,selectedText:n,selection:r,prefix:i,suffix:s=i}=e;n.length>=i.length+s.length&&n.startsWith(i)&&n.endsWith(s)?(t.replaceSelection(n.slice(i.length,s.length?-s.length:void 0)),t.setSelectionRange({start:r.start-i.length,end:r.end-i.length})):(t.replaceSelection(""+i+n+s),t.setSelectionRange({start:r.start+i.length,end:r.end+i.length}))}function Tl(e,t){var n=e.split(/\n/),r=0,i=n.map((s,a)=>{if(typeof t=="string")return s.startsWith(t)?(r-=t.length,s.slice(t.length)):(r+=t.length,t+s);if(typeof t=="function"){if(s.startsWith(t(s,a)))return r-=t(s,a).length,s.slice(t(s,a).length);var o=t(s,a);return r+=o.length,t(s,a)+s}throw Error("insertion is expected to be either a string or a function")}).join(`
|
|
160
|
+
`);return{modifiedText:i,insertionLength:r}}var sD={name:"bold",keyCommand:"bold",shortcuts:"ctrlcmd+b",prefix:"**",buttonProps:{"aria-label":"Add bold text (ctrl + b)",title:"Add bold text (ctrl + b)"},icon:h.jsx("svg",{role:"img",width:"12",height:"12",viewBox:"0 0 384 512",children:h.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=Dt({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);pt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}},y0={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:h.jsx("svg",{width:"13",height:"13",role:"img",viewBox:"0 0 156 156",children:h.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=Dt({text:e.text,selection:e.selection,prefix:"```\n",suffix:"\n```"}),r=t.setSelectionRange(n),i="\n```\n",s="\n```\n";r.selectedText.length>=i.length+s.length-2&&r.selectedText.startsWith(i)&&r.selectedText.endsWith(s)?(i="```\n",s="\n```"):((r.selection.start>=1&&e.text.slice(r.selection.start-1,r.selection.start)===`
|
|
161
|
+
`||r.selection.start===0)&&(i="```\n"),(r.selection.end<=e.text.length-1&&e.text.slice(r.selection.end,r.selection.end+1)===`
|
|
162
|
+
`||r.selection.end===e.text.length)&&(s="\n```"));var a=Dt({text:e.text,selection:e.selection,prefix:i,suffix:s}),o=t.setSelectionRange(a);pt({api:t,selectedText:o.selectedText,selection:e.selection,prefix:i,suffix:s})}},aD={name:"code",keyCommand:"code",shortcuts:"ctrlcmd+j",prefix:"`",buttonProps:{"aria-label":"Insert code (ctrl + j)",title:"Insert code (ctrl + j)"},icon:h.jsx("svg",{width:"14",height:"14",role:"img",viewBox:"0 0 640 512",children:h.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(`
|
|
163
|
+
`)===-1){var n=Dt({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);pt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}else y0.execute(e,t)}},oD={name:"comment",keyCommand:"comment",shortcuts:"ctrlcmd+/",prefix:"<!-- ",suffix:" -->",buttonProps:{"aria-label":"Insert comment (ctrl + /)",title:"Insert comment (ctrl + /)"},icon:h.jsx("svg",{height:"1em",width:"1em",viewBox:"0 0 25 25",children:h.jsxs("g",{fill:"none",fillRule:"evenodd",children:[h.jsx("polygon",{points:".769 .727 24.981 .727 24.981 24.727 .769 24.727"}),h.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"}),h.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=Dt({text:e.text,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}),r=t.setSelectionRange(n);pt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix})}},Ds={keyCommand:"divider"},uD={name:"fullscreen",keyCommand:"fullscreen",shortcuts:"ctrlcmd+0",value:"fullscreen",buttonProps:{"aria-label":"Toggle fullscreen (ctrl + 0)",title:"Toggle fullscreen (ctrl+ 0)"},icon:h.jsx("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:h.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,i)=>{t.textArea.focus(),i&&n&&r&&n({fullscreen:!r.fullscreen})}};function lD(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var cD=(e,t)=>{var n=De({children:e,icon:h.jsx("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:h.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 i=De({},(lD(r),r));return i.parent=n,De({},i)})),n},dD={name:"hr",keyCommand:"hr",shortcuts:"ctrlcmd+h",prefix:`
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
`,suffix:"",buttonProps:{"aria-label":"Insert HR (ctrl + h)",title:"Insert HR (ctrl + h)"},icon:h.jsx("svg",{width:"12",height:"12",viewBox:"0 0 175 175",children:h.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=Dt({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)?pt({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}),pt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}))}},hD={name:"image",keyCommand:"image",shortcuts:"ctrlcmd+k",prefix:"",buttonProps:{"aria-label":"Add image (ctrl + k)",title:"Add image (ctrl + k)"},icon:h.jsx("svg",{width:"13",height:"13",viewBox:"0 0 20 20",children:h.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=Dt({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")?pt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}):(n=Dt({text:e.text,selection:e.selection,prefix:"![",suffix:"]()"}),r=t.setSelectionRange(n),r.selectedText.length===0?pt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:""}):pt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"![",suffix:"]()"}))}},fD={name:"italic",keyCommand:"italic",shortcuts:"ctrlcmd+i",prefix:"*",buttonProps:{"aria-label":"Add italic text (ctrl + i)",title:"Add italic text (ctrl + i)"},icon:h.jsx("svg",{"data-name":"italic",width:"12",height:"12",role:"img",viewBox:"0 0 320 512",children:h.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=Dt({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);pt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}},pD={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:h.jsx("svg",{"data-name":"italic",width:"12",height:"12",role:"img",viewBox:"0 0 520 520",children:h.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=Dt({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=Dt({text:e.text,selection:e.selection,prefix:"[](",suffix:")"}),r=t.setSelectionRange(n),pt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"[](",suffix:")"})):r.selectedText.length===0?pt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:"[title",suffix:"](url)"}):pt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix})}},Cl=(e,t,n)=>{var r=Dt({text:e.text,selection:e.selection,prefix:e.command.prefix}),i=t.setSelectionRange(r),s=E0(i.text,i.selection.start),a=Array(s+1).join(`
|
|
167
|
+
`),o=x0(i.text,i.selection.end),u=Array(o+1).join(`
|
|
168
|
+
`),{modifiedText:l,insertionLength:d}=Tl(i.selectedText,n);if(d<0){var c=i.selection.start,m=i.selection.end;i.selection.start>0&&e.text.slice(i.selection.start-1,i.selection.start)===`
|
|
169
|
+
`&&(c-=1),i.selection.end<e.text.length-1&&e.text.slice(i.selection.end,i.selection.end+1)===`
|
|
170
|
+
`&&(m+=1),t.setSelectionRange({start:c,end:m}),t.replaceSelection(""+l),t.setSelectionRange({start:c,end:c+l.length})}else{t.replaceSelection(""+a+l+u);var p=i.selection.start+s,g=p+l.length;t.setSelectionRange({start:p,end:g})}},mD={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:h.jsx("svg",{"data-name":"unordered-list",width:"12",height:"12",viewBox:"0 0 512 512",children:h.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)=>{Cl(e,t,"- ")}},gD={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:h.jsx("svg",{"data-name":"ordered-list",width:"12",height:"12",role:"img",viewBox:"0 0 512 512",children:h.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)=>{Cl(e,t,(n,r)=>r+1+". ")}},bD={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:h.jsx("svg",{"data-name":"checked-list",width:"12",height:"12",role:"img",viewBox:"0 0 512 512",children:h.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)=>{Cl(e,t,(n,r)=>"- [ ] ")}},ED={name:"preview",keyCommand:"preview",value:"preview",shortcuts:"ctrlcmd+9",buttonProps:{"aria-label":"Preview code (ctrl + 9)",title:"Preview code (ctrl + 9)"},icon:h.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:[h.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"}),h.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,i)=>{t.textArea.focus(),i&&n&&r&&n({preview:"preview"})}},xD={name:"edit",keyCommand:"preview",value:"edit",shortcuts:"ctrlcmd+7",buttonProps:{"aria-label":"Edit code (ctrl + 7)",title:"Edit code (ctrl + 7)"},icon:h.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:[h.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"}),h.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,i)=>{t.textArea.focus(),i&&n&&r&&n({preview:"edit"})}},yD={name:"live",keyCommand:"preview",value:"live",shortcuts:"ctrlcmd+8",buttonProps:{"aria-label":"Live code (ctrl + 8)",title:"Live code (ctrl + 8)"},icon:h.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:[h.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"}),h.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,i)=>{t.textArea.focus(),i&&n&&r&&n({preview:"live"})}},TD={name:"quote",keyCommand:"quote",shortcuts:"ctrlcmd+q",prefix:"> ",buttonProps:{"aria-label":"Insert a quote (ctrl + q)",title:"Insert a quote (ctrl + q)"},icon:h.jsx("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:h.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=Dt({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n),i=E0(r.text,r.selection.start),s=Array(i+1).join(`
|
|
171
|
+
`),a=x0(r.text,r.selection.end),o=Array(a+1).join(`
|
|
172
|
+
`),u=Tl(r.selectedText,e.command.prefix);t.replaceSelection(""+s+u.modifiedText+o);var l=r.selection.start+i,d=l+u.modifiedText.length;t.setSelectionRange({start:l,end:d})}},CD={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:h.jsx("svg",{"data-name":"strikethrough",width:"12",height:"12",role:"img",viewBox:"0 0 512 512",children:h.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=Dt({text:e.text,selection:e.selection,prefix:e.command.prefix}),r=t.setSelectionRange(n);pt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix})}},T0={name:"title1",keyCommand:"title1",shortcuts:"ctrlcmd+1",prefix:"# ",suffix:"",buttonProps:{"aria-label":"Insert title1 (ctrl + 1)",title:"Insert title1 (ctrl + 1)"},icon:h.jsx("div",{style:{fontSize:18,textAlign:"left"},children:"Title 1"}),execute:(e,t)=>{Yr({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}};function Yr(e){var{state:t,api:n,prefix:r,suffix:i=r}=e,s=_i({text:t.text,selection:t.selection}),a=n.setSelectionRange(s);pt({api:n,selectedText:a.selectedText,selection:t.selection,prefix:r,suffix:i})}De({},T0,{icon:h.jsx("svg",{width:"12",height:"12",viewBox:"0 0 520 520",children:h.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 SD={name:"title2",keyCommand:"title2",shortcuts:"ctrlcmd+2",prefix:"## ",suffix:"",buttonProps:{"aria-label":"Insert title2 (ctrl + 2)",title:"Insert title2 (ctrl + 2)"},icon:h.jsx("div",{style:{fontSize:16,textAlign:"left"},children:"Title 2"}),execute:(e,t)=>{Yr({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},AD={name:"title3",keyCommand:"title3",shortcuts:"ctrlcmd+3",prefix:"### ",suffix:"",buttonProps:{"aria-label":"Insert title3 (ctrl + 3)",title:"Insert title3 (ctrl + 3)"},icon:h.jsx("div",{style:{fontSize:15,textAlign:"left"},children:"Title 3"}),execute:(e,t)=>{Yr({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},ID={name:"title4",keyCommand:"title4",shortcuts:"ctrlcmd+4",prefix:"#### ",suffix:"",buttonProps:{"aria-label":"Insert title4 (ctrl + 4)",title:"Insert title4 (ctrl + 4)"},icon:h.jsx("div",{style:{fontSize:14,textAlign:"left"},children:"Title 4"}),execute:(e,t)=>{Yr({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},kD={name:"title5",keyCommand:"title5",shortcuts:"ctrlcmd+5",prefix:"##### ",suffix:"",buttonProps:{"aria-label":"Insert title5 (ctrl + 5)",title:"Insert title5 (ctrl + 5)"},icon:h.jsx("div",{style:{fontSize:12,textAlign:"left"},children:"Title 5"}),execute:(e,t)=>{Yr({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},_D={name:"title6",keyCommand:"title6",shortcuts:"ctrlcmd+6",prefix:"###### ",suffix:"",buttonProps:{"aria-label":"Insert title6 (ctrl + 6)",title:"Insert title6 (ctrl + 6)"},icon:h.jsx("div",{style:{fontSize:12,textAlign:"left"},children:"Title 6"}),execute:(e,t)=>{Yr({state:e,api:t,prefix:e.command.prefix,suffix:e.command.suffix})}},vD={name:"table",keyCommand:"table",prefix:`
|
|
173
|
+
| Header | Header |
|
|
174
|
+
|--------|--------|
|
|
175
|
+
| Cell | Cell |
|
|
176
|
+
| Cell | Cell |
|
|
177
|
+
| Cell | Cell |
|
|
178
|
+
|
|
179
|
+
`,suffix:"",buttonProps:{"aria-label":"Add table",title:"Add table"},icon:h.jsx("svg",{role:"img",width:"12",height:"12",viewBox:"0 0 512 512",children:h.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=Dt({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)?pt({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}),pt({api:t,selectedText:r.selectedText,selection:e.selection,prefix:e.command.prefix,suffix:e.command.suffix}))}},DD={name:"help",keyCommand:"help",buttonProps:{"aria-label":"Open help",title:"Open help"},icon:h.jsx("svg",{viewBox:"0 0 16 16",width:"12px",height:"12px",children:h.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")}},wD=()=>[sD,fD,CD,dD,cD([T0,SD,AD,ID,kD,_D],{name:"title",groupName:"title",buttonProps:{"aria-label":"Insert title",title:"Insert title"}}),Ds,pD,TD,aD,y0,oD,hD,vD,Ds,mD,gD,bD,Ds,DD],ND=()=>[xD,yD,ED,Ds,uD];function ia(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 Sl{constructor(t){this.textArea=void 0,this.textArea=t}replaceSelection(t){return Dr(this.textArea,t),ia(this.textArea)}setSelectionRange(t){return this.textArea.focus(),this.textArea.selectionStart=t.start,this.textArea.selectionEnd=t.end,ia(this.textArea)}}class Al{constructor(t){this.textArea=void 0,this.textApi=void 0,this.textArea=t,this.textApi=new Sl(t)}getState(){return this.textArea?ia(this.textArea):!1}executeCommand(t,n,r,i){t.execute&&t.execute(De({command:t},ia(this.textArea)),this.textApi,n,r,i)}}function ws(e){e.stopPropagation(),e.preventDefault()}function sh(e,t){ws(e);var n=e.target,r=new Sl(n),i={start:n.selectionStart,end:n.selectionEnd};if(i=_i({text:n.value,selection:i}),!(t<0&&i.start<=0||t>0&&i.end>=n.value.length)){var s=n.value.slice(i.start,i.end);if(t<0){var a=_i({text:n.value,selection:{start:i.start-1,end:i.start-1}}),o=n.value.slice(a.start,a.end);r.setSelectionRange({start:a.start,end:i.end}),Dr(n,s+`
|
|
180
|
+
`+o),r.setSelectionRange({start:a.start,end:a.start+s.length})}else{var u=_i({text:n.value,selection:{start:i.end+1,end:i.end+1}}),l=n.value.slice(u.start,u.end);r.setSelectionRange({start:i.start,end:u.end}),Dr(n,l+`
|
|
181
|
+
`+s),r.setSelectionRange({start:u.end-s.length,end:u.end})}}}function PD(e,t,n){t===void 0&&(t=2),n===void 0&&(n=!1);var r=e.target,i=r.value.substr(0,r.selectionStart),s=i.split(`
|
|
182
|
+
`),a=s[s.length-1],o=new Sl(r);if(!n&&e.code&&e.code.toLowerCase()==="tab"){ws(e);var u=new Array(t+1).join(" ");if(r.selectionStart!==r.selectionEnd){var l=r.value.substring(0,r.selectionStart).split(`
|
|
183
|
+
`),d=r.value.substring(0,r.selectionEnd).split(`
|
|
184
|
+
`),c=[];d.forEach((B,Z)=>{B!==l[Z]&&c.push(B)});var m=c.join(`
|
|
185
|
+
`),p=r.value.substring(r.selectionStart,r.selectionEnd),g=r.value.substring(0,r.selectionStart).length;o.setSelectionRange({start:r.value.indexOf(m),end:r.selectionEnd});var b=Tl(m,e.shiftKey?"":u),T=b.modifiedText;e.shiftKey&&(T=T.split(`
|
|
186
|
+
`).map(B=>B.replace(new RegExp("^"+u),"")).join(`
|
|
187
|
+
`)),o.replaceSelection(T);var x=e.shiftKey?-t:t,C=e.shiftKey?-c.length*t:c.length*t;o.setSelectionRange({start:g+x,end:g+p.length+C})}else return Dr(r,u)}else if(e.keyCode===13&&e.code.toLowerCase()==="enter"&&(/^(-|\*)\s/.test(a)||/^\d+.\s/.test(a))&&!e.shiftKey){ws(e);var S=`
|
|
188
|
+
- `;return a.startsWith("*")&&(S=`
|
|
189
|
+
* `),(a.startsWith("- [ ]")||a.startsWith("- [X]")||a.startsWith("- [x]"))&&(S=`
|
|
190
|
+
- [ ] `),/^\d+.\s/.test(a)&&(S=`
|
|
191
|
+
`+(parseInt(a)+1)+". "),Dr(r,S)}else if(e.code&&e.code.toLowerCase()==="keyd"&&e.ctrlKey){ws(e);var w={start:r.selectionStart,end:r.selectionEnd},D=w;w=_i({text:r.value,selection:w});var N=r.value.slice(w.start,w.end);o.setSelectionRange({start:w.end,end:w.end}),Dr(r,`
|
|
192
|
+
`+N),o.setSelectionRange({start:D.start,end:D.end})}else e.code&&e.code.toLowerCase()==="arrowup"&&e.altKey?sh(e,-1):e.code&&e.code.toLowerCase()==="arrowdown"&&e.altKey&&sh(e,1)}var RD=["prefixCls","onChange"],LD=["markdown","commands","fullscreen","preview","highlightEnable","extraCommands","tabSize","defaultTabEnable","autoFocusEnd","textareaWarp","dispatch"];function OD(e){var{prefixCls:t,onChange:n}=e,r=Ks(e,RD),i=P.useContext(Gr),{markdown:s,commands:a,fullscreen:o,preview:u,highlightEnable:l,extraCommands:d,tabSize:c,defaultTabEnable:m,autoFocusEnd:p,textareaWarp:g,dispatch:b}=i;Ks(i,LD);var T=P.useRef(null),x=P.useRef(),C=P.useRef({fullscreen:o,preview:u});P.useEffect(()=>{C.current={fullscreen:o,preview:u,highlightEnable:l}},[o,u,l]),P.useEffect(()=>{if(T.current&&b){var w=new Al(T.current);x.current=w,b({textarea:T.current,commandOrchestrator:w})}},[]),P.useEffect(()=>{if(p&&T.current&&g){T.current.focus();var w=T.current.value.length;T.current.setSelectionRange(w,w),setTimeout(()=>{g&&(g.scrollTop=g.scrollHeight),T.current&&(T.current.scrollTop=T.current.scrollHeight)},0)}},[g]);var S=w=>{PD(w,c,m),b0(w,[...a||[],...d||[]],x.current,b,C.current)};return P.useEffect(()=>(T.current&&T.current.addEventListener("keydown",S),()=>{T.current&&T.current.removeEventListener("keydown",S)}),[]),h.jsx("textarea",De({autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1},r,{ref:T,className:t+"-text-input "+(r.className?r.className:""),value:s,onChange:w=>{b&&b({markdown:w.target.value}),n&&n(w)}}))}var FD=["prefixCls","className","onScroll","renderTextarea"];function MD(e){var t=e||{},{prefixCls:n,className:r,onScroll:i,renderTextarea:s}=t,a=Ks(t,FD),{markdown:o,scrollTop:u,commands:l,extraCommands:d,dispatch:c}=P.useContext(Gr),m=P.useRef(null),p=P.useRef(),g=P.createRef();P.useEffect(()=>{var T={};g.current&&(T.textareaWarp=g.current||void 0,g.current.scrollTop=u||0),c&&c(De({},T))},[]),P.useEffect(()=>{if(m.current&&c){var T=new Al(m.current);p.current=T,c({textarea:m.current,commandOrchestrator:T})}},[]);var b={WebkitTextFillColor:"initial",overflow:"auto"};return h.jsx("div",{ref:g,className:n+"-area "+(r||""),onScroll:i,children:h.jsx("div",{className:n+"-text",children:s?P.cloneElement(s(De({},a,{value:o,autoComplete:"off",autoCorrect:"off",spellCheck:"false",autoCapitalize:"off",className:n+"-text-input",style:{WebkitTextFillColor:"inherit",overflow:"auto"}}),{dispatch:c,onChange:a.onChange,shortcuts:b0,useContext:{commands:l,extraCommands:d,commandOrchestrator:p.current}}),{ref:m}):h.jsx(P.Fragment,{children:h.jsx(OD,De({prefixCls:n},a,{style:b}))})})})}function BD(e){var{prefixCls:t,groupName:n,commands:r,children:i}=e||{},{barPopup:s={}}=P.useContext(Gr);return P.useMemo(()=>h.jsx("div",{className:t+"-toolbar-child "+(n&&s[n]?"active":""),onClick:a=>a.stopPropagation(),children:Array.isArray(r)?h.jsx(C0,De({commands:r},e,{isChild:!0})):i}),[r,s,n,t])}function ah(e){var{prefixCls:t,overflow:n}=e,{fullscreen:r,preview:i,barPopup:s={},components:a,commandOrchestrator:o,dispatch:u}=P.useContext(Gr),l=P.useRef("");function d(c,m){if(u){var p={barPopup:De({},s)};c.keyCommand==="preview"&&(p.preview=c.value),c.keyCommand==="fullscreen"&&(p.fullscreen=!r),e.commands&&c.keyCommand==="group"?e.commands.forEach(g=>{m===g.groupName?p.barPopup[m]=!0:g.keyCommand&&(p.barPopup[g.groupName]=!1)}):(m||c.parent)&&Object.keys(p.barPopup||{}).forEach(g=>{p.barPopup[g]=!1}),Object.keys(p).length&&u(De({},p)),o&&o.executeCommand(c)}}return P.useEffect(()=>{document&&n&&(r?document.body.style.overflow="hidden":(l.current||(l.current=window.getComputedStyle(document.body,null).overflow),document.body.style.overflow=l.current))},[r,l,n]),h.jsx("ul",{children:(e.commands||[]).map((c,m)=>{if(c.keyCommand==="divider")return h.jsx("li",De({},c.liProps,{className:t+"-toolbar-divider"}),m);if(!c.keyCommand)return h.jsx(P.Fragment,{},m);var p=r&&c.keyCommand==="fullscreen"||c.keyCommand==="preview"&&i===c.value,g=c.children&&typeof c.children=="function"?c.children({getState:()=>o.getState(),textApi:o?o.textApi:void 0,close:()=>d({},c.groupName),execute:()=>d({execute:c.execute}),dispatch:u}):void 0,b=s&&i&&i==="preview"&&!/(preview|fullscreen)/.test(c.keyCommand),T=a?.toolbar||c.render,x=T&&typeof T=="function"?T(c,!!b,d,m):null;return h.jsxs("li",De({},c.liProps,{className:p?"active":"",children:[x&&P.isValidElement(x)&&x,!x&&!c.buttonProps&&c.icon,!x&&c.buttonProps&&P.createElement("button",De({type:"button",key:m,disabled:b,"data-name":c.name},c.buttonProps,{onClick:C=>{C.stopPropagation(),d(c,c.groupName)}}),c.icon),c.children&&h.jsx(BD,{overflow:n,groupName:c.groupName,prefixCls:t,children:g,commands:Array.isArray(c.children)?c.children:void 0})]}),m)})})}function C0(e){e===void 0&&(e={});var{prefixCls:t,isChild:n,className:r}=e,{commands:i,extraCommands:s}=P.useContext(Gr);return h.jsxs("div",{className:t+"-toolbar "+r,children:[h.jsx(ah,De({},e,{commands:e.commands||i||[]})),!n&&h.jsx(ah,De({},e,{commands:s||[]}))]})}function oh(e){var{hideToolbar:t,toolbarBottom:n,placement:r,overflow:i,prefixCls:s}=e;if(t||r==="bottom"&&!n||r==="top"&&n)return null;var a=n?"bottom":"";return h.jsx(C0,{prefixCls:s,overflow:i,className:a})}var jD=e=>{var{prefixCls:t,onChange:n}=e||{},r=P.useRef(null),i=P.useRef(),s=P.useRef(e.height);P.useEffect(()=>{s.current!==e.height&&(s.current=e.height)},[e.height]);function a(d){if(i.current){var c,m=d.clientY||((c=d.changedTouches[0])==null?void 0:c.clientY),p=i.current.height+m-i.current.dragY;p>=e.minHeight&&p<=e.maxHeight&&n&&n(i.current.height+(m-i.current.dragY))}}function o(){var d,c;i.current=void 0,document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",o),(d=r.current)==null||d.removeEventListener("touchmove",a),(c=r.current)==null||c.removeEventListener("touchend",o)}function u(d){var c,m,p;d.preventDefault();var g=d.clientY||((c=d.changedTouches[0])==null?void 0:c.clientY);i.current={height:s.current,dragY:g},document.addEventListener("mousemove",a),document.addEventListener("mouseup",o),(m=r.current)==null||m.addEventListener("touchmove",a,{passive:!1}),(p=r.current)==null||p.addEventListener("touchend",o,{passive:!1})}P.useEffect(()=>{if(document){var d,c;(d=r.current)==null||d.addEventListener("touchstart",u,{passive:!1}),(c=r.current)==null||c.addEventListener("mousedown",u)}return()=>{if(document){var m;(m=r.current)==null||m.removeEventListener("touchstart",u),document.removeEventListener("mousemove",a)}}},[]);var l=P.useMemo(()=>h.jsx("svg",{viewBox:"0 0 512 512",height:"100%",children:h.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 h.jsx("div",{className:t+"-bar",ref:r,children:l})},HD=["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 UD(e){return e===void 0&&(e={}),Object.keys(e).forEach(t=>{e[t]=!1}),e}var zD=P.forwardRef((e,t)=>{var n=e||{},{prefixCls:r="w-md-editor",className:i,value:s,commands:a=wD(),commandsFilter:o,direction:u,extraCommands:l=ND(),height:d=200,enableScroll:c=!0,visibleDragbar:m=typeof e.visiableDragbar=="boolean"?e.visiableDragbar:!0,highlightEnable:p=!0,preview:g="live",fullscreen:b=!1,overflow:T=!0,previewOptions:x={},textareaProps:C,maxHeight:S=1200,minHeight:w=100,autoFocus:D,autoFocusEnd:N=!1,tabSize:B=2,defaultTabEnable:Z=!1,onChange:J,onStatistics:E,onHeightChange:L,hideToolbar:O,toolbarBottom:z=!1,components:M,renderTextarea:K}=n,se=Ks(n,HD),fe=a.map(Ce=>o?o(Ce,!1):Ce).filter(Boolean),pe=l.map(Ce=>o?o(Ce,!0):Ce).filter(Boolean),[W,k]=P.useReducer(rD,{markdown:s,preview:g,components:M,height:d,minHeight:w,highlightEnable:p,tabSize:B,defaultTabEnable:Z,scrollTop:0,scrollTopPreview:0,commands:fe,extraCommands:pe,fullscreen:b,barPopup:{}}),ae=P.useRef(null),de=P.useRef(null),_=P.useRef(c);P.useImperativeHandle(t,()=>De({},W,{container:ae.current,dispatch:k})),P.useMemo(()=>_.current=c,[c]),P.useEffect(()=>{var Ce={};ae.current&&(Ce.container=ae.current||void 0),Ce.markdown=s||"",Ce.barPopup={},k&&k(De({},W,Ce))},[]);var Ee=[i,"wmde-markdown-var",u?r+"-"+u:null,r,W.preview?r+"-show-"+W.preview:null,W.fullscreen?r+"-fullscreen":null].filter(Boolean).join(" ").trim();P.useMemo(()=>s!==W.markdown&&k({markdown:s||""}),[s,W.markdown]),P.useMemo(()=>g!==W.preview&&k({preview:g}),[g]),P.useMemo(()=>B!==W.tabSize&&k({tabSize:B}),[B]),P.useMemo(()=>p!==W.highlightEnable&&k({highlightEnable:p}),[p]),P.useMemo(()=>D!==W.autoFocus&&k({autoFocus:D}),[D]),P.useMemo(()=>N!==W.autoFocusEnd&&k({autoFocusEnd:N}),[N]),P.useMemo(()=>b!==W.fullscreen&&k({fullscreen:b}),[b]),P.useMemo(()=>d!==W.height&&k({height:d}),[d]),P.useMemo(()=>d!==W.height&&L&&L(W.height,d,W),[d,L,W]),P.useMemo(()=>a!==W.commands&&k({commands:fe}),[e.commands]),P.useMemo(()=>l!==W.extraCommands&&k({extraCommands:pe}),[e.extraCommands]);var me=P.useRef(),q=P.useRef("preview"),ie=P.useRef(!1);P.useMemo(()=>{me.current=W.textareaWarp,W.textareaWarp&&(W.textareaWarp.addEventListener("mouseover",()=>{q.current="text"}),W.textareaWarp.addEventListener("mouseleave",()=>{q.current="preview"}))},[W.textareaWarp]);var te=(Ce,st)=>{if(_.current){var at=me.current,Xe=de.current?de.current:void 0;if(ie.current||(q.current=st,ie.current=!0),at&&Xe){var rn=(at.scrollHeight-at.offsetHeight)/(Xe.scrollHeight-Xe.offsetHeight);Ce.target===at&&q.current==="text"&&(Xe.scrollTop=at.scrollTop/rn),Ce.target===Xe&&q.current==="preview"&&(at.scrollTop=Xe.scrollTop*rn);var oe=0;q.current==="text"?oe=at.scrollTop||0:q.current==="preview"&&(oe=Xe.scrollTop||0),k({scrollTop:oe})}}},we=r+"-preview "+(x.className||""),ne=Ce=>te(Ce,"preview"),U=P.useMemo(()=>h.jsx("div",{ref:de,className:we,children:h.jsx(m0,De({},x,{onScroll:ne,source:W.markdown||""}))}),[we,x,W.markdown]),xe=M?.preview&&M?.preview(W.markdown||"",W,k);xe&&P.isValidElement(xe)&&(U=h.jsx("div",{className:we,ref:de,onScroll:ne,children:xe}));var je=De({},se.style,{height:W.height||"100%"}),ce=()=>k({barPopup:De({},UD(W.barPopup))}),zt=Ce=>k({height:Ce}),mt=Ce=>{if(J&&J(Ce.target.value,Ce,W),C&&C.onChange&&C.onChange(Ce),W.textarea&&W.textarea instanceof HTMLTextAreaElement&&E){var st=new Al(W.textarea),at=st.getState()||{};E(De({},at,{lineCount:Ce.target.value.split(`
|
|
193
|
+
`).length,length:Ce.target.value.length}))}};return h.jsx(Gr.Provider,{value:De({},W,{dispatch:k}),children:h.jsxs("div",De({ref:ae,className:Ee},se,{onClick:ce,style:je,children:[h.jsx(oh,{hideToolbar:O,toolbarBottom:z,prefixCls:r,overflow:T,placement:"top"}),h.jsxs("div",{className:r+"-content",children:[/(edit|live)/.test(W.preview||"")&&h.jsx(MD,De({className:r+"-input",prefixCls:r,autoFocus:D},C,{onChange:mt,renderTextarea:M?.textarea||K,onScroll:Ce=>te(Ce,"text")})),/(live|preview)/.test(W.preview||"")&&U]}),m&&!W.fullscreen&&h.jsx(jD,{prefixCls:r,height:W.height,maxHeight:S,minHeight:w,onChange:zt}),h.jsx(oh,{hideToolbar:O,toolbarBottom:z,prefixCls:r,overflow:T,placement:"bottom"})]}))})}),S0=zD;S0.Markdown=m0;function $D({cell:e,sourceAndPaths:t,onQueryChange:n,onSourceChange:r}){const i={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 h.jsx(Yu,{sourceAndPaths:t,existingQuery:i,existingSourceName:e.sourceName,onQueryChange:n,onSourceChange:r})}function qD({cell:e,expandCodeCell:t,expandEmbedding:n,hideEmbeddingIcons:r,editingMalloy:i,editingMarkdown:s,sourceAndPaths:a,onCellChange:o,onClose:u,onEdit:l,onDelete:d,addButtonCallback:c}){const[m,p]=P.useState(t),[g,b]=P.useState(n),[T,x]=P.useState(),[C]=P.useState(),[S,w]=P.useState(gi()),[D,N]=P.useState(!1),[B,Z]=P.useState(e.sourceName?a.findIndex(_=>_.sourceInfo.name===e.sourceName):0);P.useEffect(()=>{e.isMarkdown||nr(e.value,"malloy").then(_=>{x(_)})},[e]);const[J,E]=P.useState(e.value);P.useEffect(()=>{document.documentElement.setAttribute("data-color-mode","light")});const L=VD(_=>{o({...e,value:_})}),[O,z]=P.useState(!1),M=()=>{d(),z(!1)},K=a.length===0,se=()=>{const _=a[B],Ee=_?.modelPath||e.modelPath||"",me=_?.sourceInfo.name||e.sourceName||"";o({...e,value:S.query,result:S.malloyResult?JSON.stringify(S.malloyResult):void 0,queryInfo:S.malloyQuery?JSON.stringify(S.malloyQuery):void 0,sourceName:me,modelPath:Ee})},fe=h.jsx(y.Tooltip,{title:"Delete Cell",children:h.jsx(y.IconButton,{size:"small",onClick:()=>z(!0),children:h.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h.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"})})})}),pe=h.jsxs(y.Dialog,{open:O,onClose:()=>z(!1),children:[h.jsx(y.DialogTitle,{children:"Confirm Delete"}),h.jsx(y.DialogContent,{children:h.jsx(y.Typography,{children:"Are you sure you want to delete this cell?"})}),h.jsxs(y.DialogActions,{children:[h.jsx(y.Button,{onClick:()=>z(!1),children:"Cancel"}),h.jsx(y.Button,{onClick:M,color:"error",children:"Delete"})]})]}),W=e.isMarkdown?h.jsxs(h.Fragment,{children:[s?h.jsx(y.Tooltip,{title:"Save",children:h.jsx(y.IconButton,{size:"small",onClick:u,children:h.jsx(ls,{})})}):h.jsx(y.Tooltip,{title:"Edit",children:h.jsx(y.IconButton,{size:"small",onClick:l,children:h.jsx(Lc,{})})}),!s&&fe]}):h.jsxs(h.Fragment,{children:[!i&&h.jsx(y.Tooltip,{title:m?"Hide Code":"View Code",children:h.jsx(y.IconButton,{size:"small",onClick:()=>{p(!m)},children:h.jsx(kf,{})})}),!r&&!i&&e.result&&h.jsx(y.Tooltip,{title:g?"Hide Embedding":"View Embedding",children:h.jsx(y.IconButton,{size:"small",onClick:()=>{b(!g)},children:h.jsx($i,{})})}),i&&h.jsx(y.Tooltip,{title:"Save",children:h.jsx(y.IconButton,{size:"small",onClick:()=>{se(),u()},children:h.jsx(ls,{})})}),!i&&h.jsx(y.Tooltip,{title:"Edit",children:h.jsx(y.IconButton,{size:"small",onClick:l,children:h.jsx(Lc,{})})}),!i&&fe]}),k=i||s,ae=s?h.jsx(y.Tooltip,{title:"Save",children:h.jsx(y.IconButton,{size:"small",onClick:u,children:h.jsx(ls,{})})}):i?h.jsx(y.Tooltip,{title:"Save",children:h.jsx(y.IconButton,{size:"small",onClick:()=>{se(),u()},children:h.jsx(ls,{})})}):null,de=D&&h.jsx(y.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:!k&&h.jsxs(h.Fragment,{children:[c(!0),c(!1),W]})||ae});return h.jsxs(ut,{sx:{position:"relative",marginTop:"5px",marginBottom:"5px",borderWidth:"1.5px",backgroundColor:"#fff",minHeight:"50px"},onMouseEnter:()=>N(!0),onMouseLeave:()=>{N(!1)},children:[de,e.isMarkdown?h.jsx(h.Fragment,{children:s?h.jsx(S0,{value:J,preview:"edit",autoFocus:!0,onChange:_=>{E(_),L(_)},onBlur:()=>{se(),D||u()}}):h.jsx(y.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:J?h.jsx(y.Box,{onClick:l,sx:{cursor:"pointer"},children:h.jsx(gu,{children:J})}):h.jsxs(y.Box,{onClick:l,sx:{cursor:"pointer"},children:[h.jsx(y.Typography,{sx:{p:2,textAlign:"center",variant:"subtitle2",fontWeight:"medium"},children:"Markdown is empty"}),h.jsx(y.Typography,{sx:{mb:2,textAlign:"center",variant:"body2"},children:"Click to edit."})]})})}):h.jsxs(h.Fragment,{children:[h.jsx(y.Collapse,{in:g,timeout:"auto",unmountOnExit:!0,children:h.jsx(y.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:h.jsx(y.Typography,{component:"div",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},dangerouslySetInnerHTML:{__html:C}})})}),h.jsx(y.Collapse,{in:m,timeout:"auto",unmountOnExit:!0,children:h.jsx(y.Stack,{sx:{p:"10px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:h.jsx(y.Typography,{component:"div",className:"content",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},dangerouslySetInnerHTML:{__html:T}})})}),i&&(K?h.jsxs(h.Fragment,{children:[h.jsx(y.Typography,{sx:{p:2,textAlign:"center",variant:"subtitle2",fontWeight:"medium"},children:"No Model Imports"}),h.jsx(y.Typography,{sx:{mb:2,textAlign:"center",variant:"body2"},children:"Please add a model import above."})]}):h.jsx($D,{sourceAndPaths:a,onQueryChange:_=>{w(_)},cell:e,onSourceChange:Z})),!i&&e.result&&h.jsx(ut,{variant:"outlined",sx:{borderRadius:0},children:h.jsx(_f,{result:e.result,minHeight:300,maxHeight:800})}),!i&&!e.result&&h.jsxs(y.Box,{onClick:l,sx:{cursor:"pointer"},children:[h.jsx(y.Typography,{sx:{p:2,textAlign:"center",variant:"subtitle2",fontWeight:"medium"},children:"Explore is empty"}),h.jsx(y.Typography,{sx:{mb:2,textAlign:"center",variant:"body2"},children:"Click to edit."})]})]}),O&&pe]})}function VD(e,t=2e3){const n=P.useRef(void 0);return P.useCallback(r=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{e(r)},t)},[e,t])}const A0=P.createContext(void 0);function I0({children:e,userContext:t,notebookStorage:n}){const r=P.useMemo(()=>({notebookStorage:n,userContext:t}),[n,t]);return h.jsx(A0.Provider,{value:r,children:e})}function Il(){const e=P.useContext(A0);if(!e)throw new Error("useNotebookStorage must be used within a NotebookStorageProvider");return e}const WD=Me(h.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"})),GD=Me(h.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"})),YD=new ga(new xt);function KD({initialSelectedModels:e,onModelChange:t}){const{projectName:n,packageName:r,versionId:i}=yt(),{data:s,isLoading:a,isSuccess:o,isError:u,error:l}=St({queryKey:["models",n,r,i],queryFn:x=>YD.listModels(n,r,i,x)}),[d,c]=P.useState(e||[]),[m,p]=P.useState(null);P.useEffect(()=>{c(e||[])},[e]);const g=x=>{const C=d.filter(S=>S!==x);c(C),t(C)},b=x=>{const C=[...d,x];c(C),t(C),p(null)};let T=[];return o&&s?.data&&(T=s.data.filter(x=>!d.includes(x.path)).map(x=>x.path)),u?h.jsx(Tt,{error:l,context:`${n} > ${r} > Model Picker`}):h.jsxs(h.Fragment,{children:[h.jsxs(y.FormControl,{fullWidth:!0,children:[a&&h.jsx(y.Typography,{children:"Loading..."}),h.jsxs(y.Stack,{direction:"row",spacing:1,children:[d.map(x=>h.jsx(y.Chip,{label:x,onDelete:()=>g(x),deleteIcon:h.jsx(WD,{}),sx:{marginBottom:"5px"}},x)),h.jsx(y.Button,{size:"small",startIcon:h.jsx(GD,{}),onClick:x=>p(x.currentTarget),disabled:a||u||T.length===0,children:"Add Model"})]})]}),h.jsxs(y.Menu,{anchorEl:m,open:!!m,onClose:()=>p(null),children:[h.jsx(y.Typography,{variant:"subtitle2",sx:{ml:1},children:"Models"}),h.jsx(y.Divider,{}),T.length===0?h.jsx(y.MenuItem,{disabled:!0,children:"No models available"}):T.map(x=>h.jsx(y.MenuItem,{onClick:()=>b(x),children:h.jsx(y.Typography,{variant:"body2",children:x})},x))]})]})}const QD=new ga(new xt);function XD({notebookPath:e,expandCodeCells:t,expandEmbeddings:n,hideEmbeddingIcons:r}){const i=Qu(),{projectName:s,packageName:a,versionId:o}=yt(),{server:u,getAccessToken:l}=ka(),{notebookStorage:d,userContext:c}=Il();if(!s||!a)throw new Error("Project and package must be provided via PubliserPackageProvider");if(!d||!c)throw new Error("Notebook storage and user context must be provided via NotebookStorageProvider");const[m,p]=P.useState(),[g,b]=P.useState(),[T,x]=P.useState(),[C,S]=P.useState([]),[w,D]=P.useState(null),[N,B]=P.useState(null),Z=!!w,J=()=>{D(null),B(null)},E=(k,ae)=>{m.insertCell(ae,{isMarkdown:k,value:""}),se(),k?x(ae):b(ae),J()},[L,O]=P.useState(!1),z=()=>{O(!0)},M=k=>{e&&d&&c&&d.deleteNotebook(c,e),O(!1),i(`/${s}/${a}`,k)},K=()=>{O(!1)},se=P.useCallback(()=>{p(m.saveNotebook())},[m]);if(P.useEffect(()=>{if(!m)return;(async()=>{const ae=new Map(C.map(({modelPath:Ee,sourceInfos:me})=>[Ee,me])),de=[],_=[];for(const Ee of m.getModels())ae.has(Ee)?de.push({modelPath:Ee,sourceInfos:ae.get(Ee)}):(console.log("Fetching model from Publisher",Ee),_.push(QD.getModel(s,a,Ee,o,await Bu(u,l)).then(me=>({modelPath:Ee,sourceInfos:me.data.sourceInfos.map(q=>JSON.parse(q))}))));if(_.length>0){const Ee=await Promise.all(_);S([...de,...Ee])}else S(de)})()},[l,m,a,s,u,o]),P.useEffect(()=>{e&&p(bi.loadNotebook(d,c,e))},[e,d,c]),!m)return h.jsx("div",{children:"Loading..."});const fe=k=>{const ae=[];for(const de of k)for(const _ of de.sourceInfos)ae.push({modelPath:de.modelPath,sourceInfo:_});return ae},pe=(k,ae)=>h.jsx(y.Button,{size:"small",startIcon:h.jsx(LT,{}),onClick:()=>E(k,ae),variant:"contained",sx:{backgroundColor:"#fff",color:de=>de.palette.mode==="dark"?de.palette.grey[100]:de.palette.grey[700],boxShadow:"none","&:hover":{backgroundColor:de=>de.palette.mode==="dark"?de.palette.grey[500]:de.palette.grey[300],boxShadow:"none"}},children:k?"Markdown":"Explore"}),W=h.jsxs(y.Box,{sx:{display:"flex",gap:1,justifyContent:"center",flex:2},children:[pe(!1,m.getCells().length),pe(!0,m.getCells().length)]});return h.jsxs(ut,{variant:"outlined",children:[h.jsxs(Ut,{children:[h.jsxs(gr,{sx:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[h.jsxs(gr,{direction:"row",spacing:1,alignItems:"center",children:[h.jsx(y.Typography,{variant:"overline",sx:{fontSize:"13px",fontWeight:"bold",verticalAlign:"middle"},children:"Workbook"}),h.jsx(y.Typography,{variant:"subtitle2",sx:{fontSize:"13px",fontWeight:"normal",verticalAlign:"middle",ml:1},children:`${s} > ${a} > ${e}`})]}),h.jsxs(gr,{sx:{display:"flex",flexDirection:"row",gap:1},children:[h.jsx(y.Box,{sx:{display:"flex",alignItems:"center",mt:1,mb:1},children:h.jsx(ZD,{notebookData:m})}),h.jsxs(y.Box,{sx:{display:"flex",alignItems:"center",mt:1,mb:1},children:[h.jsx(y.Button,{color:"error",onClick:z,size:"small",children:"Delete"}),h.jsxs(y.Dialog,{open:L,onClose:K,children:[h.jsx(y.DialogTitle,{children:"Delete Notebook"}),h.jsx(y.DialogContent,{children:h.jsxs(y.DialogContentText,{children:['Are you sure you want to delete the notebook "',e,'"? This action cannot be undone.']})}),h.jsxs(y.DialogActions,{children:[h.jsx(y.Button,{onClick:K,color:"primary",size:"small",children:"Cancel"}),h.jsx(y.Button,{onClick:k=>M(k),color:"error",autoFocus:!0,size:"small",children:"Delete"})]})]})]})]})]}),h.jsx(y.Divider,{}),h.jsxs(gr,{sx:{display:"flex",flexDirection:"row",width:"100%",mt:2},children:[h.jsx(y.Box,{sx:{flex:1},children:h.jsx(KD,{initialSelectedModels:m.getModels(),onModelChange:k=>{p(m.setModels(k)),se()}})}),h.jsx(y.Box,{sx:{flex:1}})]})]}),h.jsx(Sa,{children:h.jsxs(gr,{children:[m.getCells().length===0&&h.jsxs(h.Fragment,{children:[h.jsx(y.Typography,{sx:{textAlign:"center",p:2,variant:"subtitle2",fontWeight:"medium"},children:"Workbook is empty"}),h.jsx(y.Typography,{variant:"body2",sx:{textAlign:"center",mb:2,variant:"body2"},children:"Click the + buttons to add a markdown or code cell."})]}),m.getCells().map((k,ae)=>h.jsx(P.Fragment,{children:h.jsx(qD,{cell:k,addButtonCallback:de=>pe(de,ae),sourceAndPaths:fe(C),expandCodeCell:t,expandEmbedding:n,hideEmbeddingIcons:r,editingMarkdown:T===ae,editingMalloy:g===ae,onDelete:()=>{p(m.deleteCell(ae)),se()},onCellChange:de=>{p(m.setCell(ae,de)),se()},onEdit:()=>{k.isMarkdown?x(ae):b(ae)},onClose:()=>{k.isMarkdown?x(void 0):b(void 0)}},`${ae}-${k.isMarkdown}-${e}-${s}-${a}`)},`${ae}-${m.getCells().length}`)),W,h.jsxs(y.Menu,{anchorEl:w,open:Z,onClose:J,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:[h.jsx(y.MenuItem,{onClick:()=>E(!0,N??0),children:"Add Markdown"}),h.jsx(y.MenuItem,{onClick:()=>E(!1,N??0),children:"Add Malloy"})]}),h.jsx(gr,{sx:{flexDirection:"row",justifyContent:"flex-end",p:1}})]})})]})}function ZD({notebookData:e}){const[t,n]=P.useState(!1),r=async()=>{if(!e)return;const i=e.toMalloyNotebook();try{await navigator.clipboard.writeText(i),n(!0),setTimeout(()=>n(!1),1500)}catch{n(!1),alert("Failed to copy to clipboard")}};return h.jsx(y.Button,{color:"primary",onClick:r,size:"small",children:t?"Copied!":"Export"})}function k0({onNotebookClick:e}){const{notebookStorage:t,userContext:n}=Il(),[r,i]=P.useState([]);return P.useEffect(()=>{t&&n&&i(t.listNotebooks(n))},[t,n]),h.jsxs(h.Fragment,{children:[h.jsx(y.Divider,{}),h.jsx(y.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:h.jsxs(y.List,{dense:!0,children:[r.length===0&&h.jsx(y.ListItem,{children:h.jsx(y.ListItemText,{primary:"No notebooks found.",sx:{textAlign:"center"}})}),r.map(s=>h.jsx(y.ListItem,{onClick:a=>e(s,a),sx:{cursor:"pointer","&:hover":{backgroundColor:"action.hover"}},children:h.jsx(y.ListItemText,{primary:s})},s))]})})]})}const JD=new vh(new xt);function ew(){const{projectName:e}=Kr(),{data:t,isSuccess:n,isError:r,error:i}=St({queryKey:["about",e],queryFn:s=>JD.getProject(e,!1,s)});return h.jsxs(h.Fragment,{children:[!n&&!r&&h.jsx(Ct,{text:"Fetching About..."}),n&&h.jsxs(ut,{variant:"outlined",sx:{p:2},children:[h.jsx(y.Typography,{variant:"overline",fontWeight:"bold",sx:{mb:1},children:"Readme"}),h.jsx(ut,{sx:{p:1},children:h.jsx(gu,{children:t.data.readme})})]}),r&&h.jsx(Tt,{error:i,context:`${e} > About`})]})}const tw=new _h(new xt);function nw({navigate:e}){const{projectName:t}=Kr(),{data:n,isSuccess:r,isError:i,error:s}=St({queryKey:["packages",t],queryFn:a=>tw.listPackages(t,a)});return h.jsxs(h.Fragment,{children:[!r&&!i&&h.jsx(Ct,{text:"Fetching Packages..."}),r&&h.jsxs(ut,{variant:"outlined",sx:{p:2},children:[h.jsx(y.Typography,{variant:"overline",fontWeight:"bold",sx:{mb:1},children:"Packages"}),h.jsx(y.Grid,{container:!0,spacing:2,columns:12,children:n.data.sort((a,o)=>a.name.localeCompare(o.name)).map(a=>h.jsx(y.Grid,{size:{xs:12,sm:12,md:12,lg:4},children:h.jsx(ut,{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:o=>e(a.name+"/",o),children:h.jsxs(Ut,{children:[h.jsx(y.Typography,{variant:"overline",color:"primary.main",children:a.name}),h.jsx(y.Box,{sx:{maxHeight:"120px",overflowY:"auto"},children:h.jsx(y.Typography,{variant:"body2",children:a.description})})]})})},a.name))})]}),i&&h.jsx(Tt,{error:s,context:`${t} > Packages`})]})}const _0=P.createContext(void 0);function Kr(){const e=P.useContext(_0);if(!e)throw new Error("useProject must be used within a ProjectProvider");return e}function rw({children:e,projectName:t}){return h.jsx(_0.Provider,{value:{projectName:t},children:e})}function iw({navigate:e}){return h.jsxs(y.Grid,{container:!0,spacing:2,columns:12,children:[h.jsx(y.Grid,{size:{xs:12,md:12},children:h.jsx(nw,{navigate:e})}),h.jsx(y.Grid,{size:{xs:12,md:12},children:h.jsx(ew,{})})]})}const sw=Me(h.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"})),aw=Me(h.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"})),uh=Me(h.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"})),ow=Me(h.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"})),uw=Me(h.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"})),lw=Me([h.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"),h.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")]),lh=Me(h.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"})),cw=new vh(new xt),dw=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 i=r.substring(0,120).split(" ");return i.pop(),i.join(" ")+"..."};function hw({navigate:e}){const{data:t,isSuccess:n,isError:r,error:i}=St({queryKey:["projects"],queryFn:s=>cw.listProjects(s)});return r?h.jsx(Tt,{error:i,context:"Projects List"}):n?h.jsxs(y.Container,{maxWidth:"lg",sx:{py:4},children:[h.jsxs(y.Box,{sx:{textAlign:"center",mb:6},children:[h.jsxs(y.Stack,{direction:"row",justifyContent:"center",alignItems:"center",spacing:1,sx:{mb:2},children:[h.jsx(uh,{sx:{fontSize:32,color:"primary.main"}}),h.jsx(y.Typography,{variant:"h3",component:"h1",fontWeight:700,children:"Publisher"})]}),h.jsx(y.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"}),h.jsx(y.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."})]}),h.jsxs(y.Grid,{container:!0,spacing:3,sx:{mb:6},children:[h.jsx(y.Grid,{size:{xs:12,md:4},children:h.jsx(y.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:h.jsxs(y.CardContent,{sx:{p:3},children:[h.jsxs(y.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{mb:2},children:[h.jsx(sw,{sx:{color:"info.main",fontSize:28}}),h.jsx(y.Typography,{variant:"h6",fontWeight:600,children:"Ad Hoc Analysis"})]}),h.jsx(y.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."}),h.jsx(y.Chip,{label:"No-code",size:"small",color:"primary",variant:"outlined"})]})})}),h.jsx(y.Grid,{size:{xs:12,md:4},children:h.jsx(y.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:h.jsxs(y.CardContent,{sx:{p:3},children:[h.jsxs(y.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{mb:2},children:[h.jsx(ow,{sx:{color:"warning.main",fontSize:28}}),h.jsx(y.Typography,{variant:"h6",fontWeight:600,children:"Notebook Dashboards"})]}),h.jsx(y.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."}),h.jsx(y.Chip,{label:"Versioned",size:"small",color:"warning",variant:"outlined"})]})})}),h.jsx(y.Grid,{size:{xs:12,md:4},children:h.jsx(y.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:h.jsxs(y.CardContent,{sx:{p:3},children:[h.jsxs(y.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{mb:2},children:[h.jsx(lw,{sx:{color:"success.main",fontSize:28}}),h.jsx(y.Typography,{variant:"h6",fontWeight:600,children:"AI Data Agents"})]}),h.jsx(y.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."}),h.jsx(y.Chip,{label:"AI-Ready",size:"small",color:"success",variant:"outlined"})]})})})]}),h.jsx(y.Divider,{sx:{my:4}}),t.data.length>0?h.jsxs(h.Fragment,{children:[h.jsxs(y.Box,{sx:{textAlign:"center",mb:4},children:[h.jsxs(y.Stack,{direction:"row",justifyContent:"center",alignItems:"center",spacing:1,sx:{mb:2},children:[h.jsx(lh,{sx:{color:"primary.main",fontSize:24}}),h.jsx(y.Typography,{variant:"h4",fontWeight:600,children:"Select a Project"})]}),h.jsx(y.Typography,{variant:"body1",color:"text.secondary",children:"Choose a project to explore its semantic models and start analyzing your data"})]}),h.jsx(y.Grid,{container:!0,spacing:3,justifyContent:"center",children:t.data.map(s=>h.jsx(y.Grid,{size:{xs:12,sm:6,md:4},children:h.jsx(y.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(`/${s.name}/`,a),children:h.jsxs(y.CardContent,{sx:{p:3,textAlign:"center"},children:[h.jsx(uw,{sx:{fontSize:48,color:"primary.main",mb:2}}),h.jsx(y.Typography,{variant:"h6",fontWeight:600,gutterBottom:!0,children:s.name}),h.jsx(y.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:dw(s.readme)}),h.jsx(y.Button,{variant:"contained",color:"secondary",endIcon:h.jsx(aw,{}),fullWidth:!0,children:"Open Project"})]})})},s.name))})]}):h.jsxs(y.Box,{sx:{textAlign:"center",mb:4},children:[h.jsxs(y.Stack,{direction:"row",justifyContent:"center",alignItems:"center",spacing:1,sx:{mb:2},children:[h.jsx(lh,{sx:{color:"primary.main",fontSize:24}}),h.jsx(y.Typography,{variant:"h4",fontWeight:600,children:"Get Started"})]}),h.jsx(y.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."}),h.jsx(y.Button,{variant:"contained",size:"large",color:"primary",startIcon:h.jsx(uh,{}),href:"https://github.com/malloydata/publisher/blob/main/README.md#server-configuration",target:"_blank",rel:"noopener noreferrer",children:"Learn How to Create Models"})]}),h.jsx(y.Box,{sx:{textAlign:"center",mt:6,pt:4,borderTop:1,borderColor:"divider"},children:h.jsxs(y.Typography,{variant:"body2",color:"text.secondary",children:["Publisher is built on fully open infrastructure and designed for the AI era. Join the"," ",h.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."]})})]}):h.jsx(Ct,{text:"Loading projects..."})}function fw(){const{projectName:e,packageName:t}=dh.useParams(),[n,r]=P.useState(""),[i,s]=P.useState(null),[a,o]=P.useState(!1),[u,l]=P.useState(!1),d=Qu(),c=!!i,m=C=>{s(C.currentTarget)},p=()=>{s(null)},g=()=>{l(!1)},b=()=>{o(!1)},T=(C,S)=>{l(!1),d(`/${e}/${t}/scratchNotebook/${encodeURIComponent(C)}`,S)},x=C=>{o(!1),d(`/${e}/${t}/scratchNotebook/${encodeURIComponent(n)}`,C),r("")};return!e||!t?null:h.jsxs(h.Fragment,{children:[h.jsx(y.Button,{"aria-controls":c?"basic-menu":void 0,"aria-haspopup":"true","aria-expanded":c?"true":void 0,onClick:m,variant:"contained",sx:{height:"40px",px:2,backgroundColor:"#fbbb04","&:hover":{backgroundColor:"#eab308"}},children:"Analyze Package"}),h.jsxs(y.Menu,{id:"basic-menu",anchorEl:i,open:c,onClose:p,MenuListProps:{"aria-labelledby":"basic-button",sx:{py:.5}},children:[h.jsxs(y.MenuItem,{onClick:()=>{o(!0),p()},sx:{py:1,px:2},children:[h.jsx(y.ListItemIcon,{children:h.jsx(Ns.Add,{fontSize:"small"})}),h.jsxs(y.ListItemText,{children:[h.jsx(y.Typography,{variant:"body2",fontWeight:500,children:"New Workbook"}),h.jsx(y.Typography,{variant:"caption",color:"text.secondary",children:"Create a new analysis workbook"})]})]}),h.jsxs(y.MenuItem,{onClick:()=>{l(!0),p()},sx:{py:1,px:2},children:[h.jsx(y.ListItemIcon,{children:h.jsx(Ns.Launch,{fontSize:"small"})}),h.jsxs(y.ListItemText,{children:[h.jsx(y.Typography,{variant:"body2",fontWeight:500,children:"Open Workbook"}),h.jsx(y.Typography,{variant:"caption",color:"text.secondary",children:"Open an existing workbook"})]})]})]}),h.jsxs(y.Dialog,{open:a,onClose:b,maxWidth:"sm",fullWidth:!0,children:[h.jsxs(y.DialogTitle,{sx:{pb:1,pt:2,px:2},children:[h.jsx(y.Typography,{variant:"h6",fontWeight:600,sx:{mb:.5},children:"Create New Workbook"}),h.jsx(y.Typography,{variant:"body2",color:"text.secondary",children:"Start a new analysis workbook to explore your data"})]}),h.jsx(y.DialogContent,{sx:{px:2,pb:2},children:h.jsxs(y.Stack,{spacing:2,sx:{mt:1},children:[h.jsx(y.FormControl,{fullWidth:!0,children:h.jsx(y.TextField,{label:"Workbook Name",value:n,onChange:C=>r(C.target.value),placeholder:"Enter workbook name...",fullWidth:!0,autoFocus:!0,size:"small"})}),h.jsxs(y.Stack,{direction:"row",spacing:1,justifyContent:"flex-end",children:[h.jsx(y.Button,{onClick:b,variant:"outlined",size:"small",children:"Cancel"}),h.jsx(y.Button,{onClick:C=>x(C),variant:"contained",disabled:!n.trim(),size:"small",children:"Create Workbook"})]})]})})]}),h.jsxs(y.Dialog,{open:u,onClose:g,maxWidth:"md",fullWidth:!0,children:[h.jsxs(y.DialogTitle,{sx:{pb:1,pt:2,px:2},children:[h.jsx(y.Typography,{variant:"h6",fontWeight:600,sx:{mb:.5},children:"Open Workbook"}),h.jsx(y.Typography,{variant:"body2",color:"text.secondary",children:"Select an existing workbook to continue your analysis"})]}),h.jsx(y.DialogContent,{sx:{px:2,pb:2},children:h.jsx(I0,{notebookStorage:new rp,userContext:{project:e,package:t},children:h.jsx(k0,{onNotebookClick:T})})})]})]})}const kl=new Ih(new xt);function pw({connectionName:e}){const{projectName:t}=Kr(),[n,r]=P.useState(void 0),[i,s]=P.useState(null),[a,o]=P.useState(!1),{data:u,isSuccess:l,isError:d,error:c,isLoading:m}=St({queryKey:["tablePath",t,e],queryFn:p=>kl.listSchemas(t,e,p)});return h.jsxs(y.Grid,{container:!0,spacing:2,children:[h.jsx(y.Grid,{size:{xs:12,md:6},children:h.jsxs(y.Paper,{sx:{p:2},children:[h.jsxs(y.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1},children:[h.jsx(y.Typography,{variant:"overline",fontWeight:"bold",children:"Table Paths"}),h.jsx(y.FormControlLabel,{control:h.jsx(y.Switch,{checked:a,onChange:p=>o(p.target.checked)}),label:"Hidden Schemas"})]}),h.jsx(y.Divider,{}),h.jsxs(y.Box,{sx:{mt:"10px",maxHeight:"600px",overflowY:"auto"},children:[m&&h.jsx(Ct,{text:"Fetching Table Paths..."}),d&&h.jsx(Tt,{error:c,context:`${t} > ${e}`}),l&&u.data.length===0&&h.jsx(y.Typography,{variant:"body2",children:"No Schemas"}),l&&u.data.length>0&&h.jsx(y.List,{dense:!0,disablePadding:!0,children:u.data.filter(({isHidden:p})=>a||!p).sort((p,g)=>p.isDefault===g.isDefault?0:p.isDefault?-1:1).map(p=>h.jsx(y.ListItemButton,{selected:i===p.name,onClick:()=>s(p.name),children:h.jsx(y.ListItemText,{primary:p.name})},p.name))})]})]})}),h.jsx(y.Grid,{size:{xs:12,md:6},children:i&&h.jsx(y.Paper,{sx:{p:2},children:h.jsx(gw,{connectionName:e,schemaName:i,onTableClick:p=>{r(p)}})})}),n&&h.jsx(mw,{connectionName:e,schemaName:i,tableName:n,onClose:()=>r(void 0)})]})}function mw({connectionName:e,schemaName:t,tableName:n,onClose:r}){const{projectName:i}=Kr(),{data:s,isSuccess:a,isError:o,error:u,isLoading:l}=St({queryKey:["tablePathSchema",i,e,t,n],queryFn:d=>kl.getTablesource(i,e,n,`${t}.${n}`,d)});return a&&s&&console.log(s),h.jsxs(y.Dialog,{open:!0,onClose:r,maxWidth:"sm",fullWidth:!0,children:[h.jsxs(y.DialogTitle,{children:["Table: ",t,".",n,h.jsx(y.Typography,{fontSize:"large",variant:"body2",fontFamily:"monospace",component:"span",children:n}),h.jsx(y.IconButton,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8},children:h.jsx(y.Box,{sx:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:"X"})})]}),h.jsxs(y.DialogContent,{children:[l&&h.jsx(Ct,{text:"Fetching Table Details..."}),o&&h.jsx(Tt,{error:u,context:`${i} > ${e} > ${t}.${n}`}),a&&s&&h.jsx(y.TableContainer,{children:h.jsxs(y.Table,{size:"small",sx:{"& .MuiTableCell-root":{padding:"10px"}},children:[h.jsx(y.TableHead,{children:h.jsxs(y.TableRow,{children:[h.jsx(y.TableCell,{children:"NAME"}),h.jsx(y.TableCell,{children:"TYPE"})]})}),h.jsx(y.TableBody,{children:s.data.columns?.map(d=>h.jsxs(y.TableRow,{children:[h.jsx(y.TableCell,{children:d.name}),h.jsx(y.TableCell,{children:d.type})]},d.name))})]})})]})]})}function gw({connectionName:e,schemaName:t,onTableClick:n}){const{projectName:r}=Kr(),{data:i,isSuccess:s,isError:a,error:o,isLoading:u}=St({queryKey:["tablesInSchema",r,e,t],queryFn:l=>kl.listTables(r,e,t,l)});return h.jsxs(h.Fragment,{children:[h.jsxs(y.Typography,{variant:"overline",fontWeight:"bold",children:["Tables in ",t]}),h.jsx(y.Divider,{}),h.jsxs(y.Box,{sx:{mt:"10px",maxHeight:"600px",overflowY:"auto"},children:[u&&h.jsx(Ct,{text:"Fetching Tables..."}),a&&h.jsx(Tt,{error:o,context:`${r} > ${e} > ${t}`}),s&&i.data.length===0&&h.jsx(y.Typography,{variant:"body2",children:"No Tables"}),s&&i.data.length>0&&h.jsx(y.List,{dense:!0,disablePadding:!0,children:i.data.map(l=>h.jsx(y.ListItemButton,{onClick:()=>n(l),children:h.jsx(y.ListItemText,{primary:l})},l))})]})]})}Ve.defaults.baseURL="IfYouAreSeeingThis_baseURL_IsNotSet";exports.AnalyzePackageButton=fw;exports.BrowserNotebookStorage=rp;exports.ConnectionExplorer=pw;exports.Home=hw;exports.Loading=Ct;exports.Model=PT;exports.MutableNotebook=XD;exports.MutableNotebookList=k0;exports.Notebook=vf;exports.NotebookStorageProvider=I0;exports.Package=AT;exports.PackageProvider=Cf;exports.Project=iw;exports.ProjectProvider=rw;exports.PublisherPackageProvider=Cf;exports.QueryResult=If;exports.ServerProvider=OT;exports.SourceExplorerComponent=Ku;exports.SourcesExplorer=Yu;exports.useNotebookStorage=Il;exports.usePackage=yt;exports.useProject=Kr;exports.usePublisherPackage=yt;exports.useRouterClickHandler=Qu;exports.useServer=ka;
|