reactive-md 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG-ch.md +18 -0
- package/CHANGELOG.md +18 -0
- package/README-ch.md +7 -6
- package/README-en.md +8 -6
- package/README.md +8 -6
- package/dist-library/reactive-md-react.js +1661 -1630
- package/dist-library/reactive-md.js +323 -307
- package/dist-library/{runtime-CXBdLQ3A.js → runtime-UiQPz5ZV.js} +5327 -4925
- package/dist-library/types/local/LocalDocumentView.d.ts +10 -2
- package/dist-library/types/local/diagnostics.d.ts +40 -0
- package/dist-library/types/local/html-names.d.ts +6 -0
- package/dist-library/types/local/index.d.ts +1 -1
- package/dist-library/types/local/limits.d.ts +8 -0
- package/dist-library/types/local/options.d.ts +6 -1
- package/dist-library/types/local/render-types.d.ts +11 -0
- package/dist-library/types/local/types.d.ts +18 -0
- package/dist-library/types/local/worker.d.ts +4 -1
- package/dist-library/types/react/index.d.ts +1 -1
- package/dist-standalone/reactive-md-standalone.js +32 -32
- package/docs/compatibility-ch.md +7 -5
- package/docs/compatibility-en.md +7 -5
- package/docs/component-development-ch.md +4 -4
- package/docs/component-development-en.md +3 -3
- package/docs/component-protocol-ch.md +48 -11
- package/docs/component-protocol-en.md +48 -11
- package/docs/local-integration-ch.md +26 -2
- package/docs/local-integration-en.md +26 -2
- package/docs/release-0.5.2-ch.md +35 -0
- package/docs/release-0.5.2-en.md +35 -0
- package/docs/releasing-ch.md +7 -7
- package/docs/releasing-en.md +8 -8
- package/examples/conformance/README.md +1 -1
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ var ReactiveMD=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`M
|
|
|
6
6
|
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{je=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ae(n):``}function Ne(e,t){switch(e.tag){case 26:case 27:case 5:return Ae(e.type);case 16:return Ae(`Lazy`);case 13:return e.child!==t&&t!==null?Ae(`Suspense Fallback`):Ae(`Suspense`);case 19:return Ae(`SuspenseList`);case 0:case 15:return Me(e.type,!1);case 11:return Me(e.type.render,!1);case 1:return Me(e.type,!0);case 31:return Ae(`Activity`);case 30:return Ae(`ViewTransition`);default:return``}}function Pe(e){try{var t=``,n=null;do t+=Ne(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
7
|
Error generating stack: `+e.message+`
|
|
8
8
|
`+e.stack}}var Fe=Object.prototype.hasOwnProperty,Ie=t.unstable_scheduleCallback,Le=t.unstable_cancelCallback,Re=t.unstable_shouldYield,ze=t.unstable_requestPaint,Be=t.unstable_now,Ve=t.unstable_getCurrentPriorityLevel,He=t.unstable_ImmediatePriority,Ue=t.unstable_UserBlockingPriority,We=t.unstable_NormalPriority,Ge=t.unstable_LowPriority,Ke=t.unstable_IdlePriority,qe=t.log,Je=t.unstable_setDisableYieldValue,Ye=null,Xe=null;function Ze(e){if(typeof qe==`function`&&Je(e),Xe&&typeof Xe.setStrictMode==`function`)try{Xe.setStrictMode(Ye,e)}catch{}}var Qe=Math.clz32?Math.clz32:tt,$e=Math.log,et=Math.LN2;function tt(e){return e>>>=0,e===0?32:31-($e(e)/et|0)|0}var z=256,nt=262144,rt=4194304;function it(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function at(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=it(n))):i=it(o):i=it(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=it(n))):i=it(o)):i=it(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function ot(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function st(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-Qe(n),i=1<<r;t|=e[r],n&=~i}return t}function ct(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function lt(){var e=rt;return rt<<=1,!(rt&62914560)&&(rt=4194304),e}function ut(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function dt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ft(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Qe(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&pt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function pt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Qe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function mt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Qe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ht(e,t){var n=t&-t;return n=n&42?1:gt(n),(n&(e.suspendedLanes|t))===0?n:0}function gt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function _t(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function vt(){var e=R.p;return e===0?(e=window.event,e===void 0?32:Th(e.type)):e}function yt(e,t){var n=R.p;try{return R.p=e,t()}finally{R.p=n}}var bt=Math.random().toString(36).slice(2),xt=`__reactFiber$`+bt,St=`__reactProps$`+bt,Ct=`__reactContainer$`+bt,wt=`__reactEvents$`+bt,Tt=`__reactListeners$`+bt,Et=`__reactHandles$`+bt,Dt=`__reactResources$`+bt,Ot=`__reactMarker$`+bt,kt=`__reactLoad$`+bt;function At(e){delete e[xt],delete e[St],delete e[Tt],delete e[Et]}function jt(e){var t;if(t=e[xt])return t;for(var n=e.parentNode;n;){if(t=n[Ct]||n[xt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=mm(e);e!==null;){if(n=e[xt])return n;e=mm(e)}return t}e=n,n=e.parentNode}return null}function Mt(e){if(e=e[xt]||e[Ct]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Nt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Pt(e){var t=e[Dt];return t||=e[Dt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Ft(e){e[Ot]=!0}function It(e){e[kt]=void 0}var Lt=new Set,Rt={};function zt(e,t){Bt(e,t),Bt(e+`Capture`,t)}function Bt(e,t){for(Rt[e]=t,e=0;e<t.length;e++)Lt.add(t[e])}var Vt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Ht={},Ut={};function Wt(e){return Fe.call(Ut,e)?!0:Fe.call(Ht,e)?!1:Vt.test(e)?Ut[e]=!0:(Ht[e]=!0,!1)}var Gt=!1;function Kt(){var e=Gt;return Gt=!1,e}function qt(e,t,n){if(Wt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function Jt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function Yt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function Xt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Zt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Qt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $t(e){if(!e._valueTracker){var t=Zt(e)?`checked`:`value`;e._valueTracker=Qt(e,t,``+e[t])}}function en(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Zt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var tn=/[\n"\\]/g;function nn(e){return e.replace(tn,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function B(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Xt(t)):e.value!==``+Xt(t)&&(e.value=``+Xt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):an(e,Xt(n)):o===`number`&&e.value==t?an(e,Xt(e.value)):an(e,Xt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Xt(s):e.removeAttribute(`name`)}function rn(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){$t(e);return}n=n==null?``:``+Xt(n),t=t==null?n:``+Xt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),$t(e)}function an(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function on(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Xt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function sn(e,t,n){t!=null&&(t=``+Xt(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+Xt(n)}function cn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(pe(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Xt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),$t(e)}function ln(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var un=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function dn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||un.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function fn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,Gt=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(dn(e,a,r),Gt=!0)}else for(var o in t)t.hasOwnProperty(o)&&dn(e,o,t[o])}function pn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var mn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`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`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`maskType`,`mask-type`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`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`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`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`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),hn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function gn(e){return hn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function _n(){}var vn=null;function yn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bn=null,xn=null;function Sn(e){var t=Mt(e);if(t&&(e=t.stateNode)){var n=e[St]||null;a:switch(e=t.stateNode,t.type){case`input`:if(B(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+nn(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[St]||null;if(!a)throw Error(i(90));B(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&en(r)}break a;case`textarea`:sn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&on(e,!!n.multiple,t,!1)}}}var Cn=!1;function wn(e,t,n){if(Cn)return e(t,n);Cn=!0;try{return e(t)}finally{if(Cn=!1,(bn!==null||xn!==null)&&(zd(),bn&&(t=bn,e=xn,xn=bn=null,Sn(t),e)))for(t=0;t<e.length;t++)Sn(e[t])}}function Tn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[St]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var En=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,Dn=!1;if(En)try{var On={};Object.defineProperty(On,"passive",{get:function(){Dn=!0}}),window.addEventListener(`test`,On,On),window.removeEventListener(`test`,On,On)}catch{Dn=!1}var kn=null,An=null,jn=null;function Mn(){if(jn)return jn;var e,t=An,n=t.length,r,i=`value`in kn?kn.value:kn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return jn=i.slice(e,1<r?1-r:void 0)}function Nn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Pn(){return!0}function Fn(){return!1}function In(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Pn:Fn,this.isPropagationStopped=Fn,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Pn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Pn)},persist:function(){},isPersistent:Pn}),t}var Ln={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rn=In(Ln),zn=D({},Ln,{view:0,detail:0}),Bn=In(zn),Vn,Hn,Un,Wn=D({},zn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tr,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Un&&(Un&&e.type===`mousemove`?(Vn=e.screenX-Un.screenX,Hn=e.screenY-Un.screenY):Hn=Vn=0,Un=e),Vn)},movementY:function(e){return`movementY`in e?e.movementY:Hn}}),Gn=In(Wn),Kn=In(D({},Wn,{dataTransfer:0})),qn=In(D({},zn,{relatedTarget:0})),Jn=In(D({},Ln,{animationName:0,elapsedTime:0,pseudoElement:0})),Yn=In(D({},Ln,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Xn=In(D({},Ln,{data:0})),Zn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Qn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},$n={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function er(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=$n[e])?!!t[e]:!1}function tr(){return er}var nr=In(D({},zn,{key:function(e){if(e.key){var t=Zn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Nn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Qn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tr,charCode:function(e){return e.type===`keypress`?Nn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Nn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),rr=In(D({},Wn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),ir=In(D({},Ln,{submitter:0})),ar=In(D({},zn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tr})),or=In(D({},Ln,{propertyName:0,elapsedTime:0,pseudoElement:0})),sr=In(D({},Wn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),cr=In(D({},Ln,{newState:0,oldState:0,source:0})),lr=[9,13,27,32],ur=En&&`CompositionEvent`in window,dr=null;En&&`documentMode`in document&&(dr=document.documentMode);var fr=En&&`TextEvent`in window&&!dr,pr=En&&(!ur||dr&&8<dr&&11>=dr),mr=` `,hr=!1;function gr(e,t){switch(e){case`keyup`:return lr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function _r(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var vr=!1;function yr(e,t){switch(e){case`compositionend`:return _r(t);case`keypress`:return t.which===32?(hr=!0,mr):null;case`textInput`:return e=t.data,e===mr&&hr?null:e;default:return null}}function br(e,t){if(vr)return e===`compositionend`||!ur&&gr(e,t)?(e=Mn(),jn=An=kn=null,vr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return pr&&t.locale!==`ko`?null:t.data;default:return null}}var xr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Sr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!xr[e.type]:t===`textarea`}function Cr(e,t,n,r){bn?xn?xn.push(r):xn=[r]:bn=r,t=Yf(t,`onChange`),0<t.length&&(n=new Rn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var wr=null,Tr=null;function Er(e){Vf(e,0)}function Dr(e){if(en(Nt(e)))return e}function Or(e,t){if(e===`change`)return t}var kr=!1;if(En){var Ar;if(En){var jr=`oninput`in document;if(!jr){var Mr=document.createElement(`div`);Mr.setAttribute(`oninput`,`return;`),jr=typeof Mr.oninput==`function`}Ar=jr}else Ar=!1;kr=Ar&&(!document.documentMode||9<document.documentMode)}function Nr(){wr&&(wr.detachEvent(`onpropertychange`,Pr),Tr=wr=null)}function Pr(e){if(e.propertyName===`value`&&Dr(Tr)){var t=[];Cr(t,Tr,e,yn(e)),wn(Er,t)}}function Fr(e,t,n){e===`focusin`?(Nr(),wr=t,Tr=n,wr.attachEvent(`onpropertychange`,Pr)):e===`focusout`&&Nr()}function Ir(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Dr(Tr)}function Lr(e,t){if(e===`click`)return Dr(t)}function Rr(e,t){if(e===`input`||e===`change`)return Dr(t)}function zr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Br=typeof Object.is==`function`?Object.is:zr;function Vr(e,t){if(Br(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Fe.call(t,i)||!Br(e[i],t[i]))return!1}return!0}function Hr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wr(e,t){var n=Ur(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Ur(n)}}function Gr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Gr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Kr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Hr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Hr(e.document)}return t}function qr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Jr=En&&`documentMode`in document&&11>=document.documentMode,Yr=null,Xr=null,Zr=null,Qr=!1;function $r(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Qr||Yr==null||Yr!==Hr(r)||(r=Yr,`selectionStart`in r&&qr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Zr&&Vr(Zr,r)||(Zr=r,r=Yf(Xr,`onSelect`),0<r.length&&(t=new Rn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Yr)))}function ei(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ti={animationend:ei(`Animation`,`AnimationEnd`),animationiteration:ei(`Animation`,`AnimationIteration`),animationstart:ei(`Animation`,`AnimationStart`),transitionrun:ei(`Transition`,`TransitionRun`),transitionstart:ei(`Transition`,`TransitionStart`),transitioncancel:ei(`Transition`,`TransitionCancel`),transitionend:ei(`Transition`,`TransitionEnd`)},ni={},ri={};En&&(ri=document.createElement(`div`).style,`AnimationEvent`in window||(delete ti.animationend.animation,delete ti.animationiteration.animation,delete ti.animationstart.animation),`TransitionEvent`in window||delete ti.transitionend.transition);function ii(e){if(ni[e])return ni[e];if(!ti[e])return e;var t=ti[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ri)return ni[e]=t[n];return e}var ai=ii(`animationend`),oi=ii(`animationiteration`),si=ii(`animationstart`),ci=ii(`transitionrun`),li=ii(`transitionstart`),ui=ii(`transitioncancel`),di=ii(`transitionend`),fi=new Map,pi=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);pi.push(`scrollEnd`);function mi(e,t){fi.set(e,t),zt(t,[e])}var hi=0;function V(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=bd.identifierPrefix;var n=hi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function gi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Od;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function H(e,t){return e=gi(e),t=gi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var _i=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},vi=[],yi=0,bi=0;function xi(){for(var e=yi,t=bi=yi=0;t<e;){var n=vi[t];vi[t++]=null;var r=vi[t];vi[t++]=null;var i=vi[t];vi[t++]=null;var a=vi[t];if(vi[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Ti(n,i,a)}}function Si(e,t,n,r){vi[yi++]=e,vi[yi++]=t,vi[yi++]=n,vi[yi++]=r,bi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Ci(e,t,n,r){return Si(e,t,n,r),Ei(e)}function wi(e,t){return Si(e,null,null,t),Ei(e)}function Ti(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Qe(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Ei(e){if(50<kd)throw kd=0,Ad=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Di={};function Oi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ki(e,t,n,r){return new Oi(e,t,n,r)}function Ai(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ji(e,t){var n=e.alternate;return n===null?(n=ki(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Mi(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ni(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Ai(r)&&(s=1);else if(typeof r==`string`)s=Ym(e,n,be.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case ie:return e=ki(31,n,t,a),e.elementType=ie,e.lanes=o,e;case j:return Pi(n.children,a,o,t);case M:s=8,a|=24;break;case N:return e=ki(12,n,t,a|2),e.elementType=N,e.lanes=o,e;case I:return e=ki(13,n,t,a),e.elementType=I,e.lanes=o,e;case te:return e=ki(19,n,t,a),e.elementType=te,e.lanes=o,e;case ae:case se:return e=a|32,e=ki(30,n,t,e),e.elementType=se,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case F:s=10;break a;case P:s=9;break a;case ee:s=11;break a;case ne:s=14;break a;case re:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ki(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Pi(e,t,n,r){return e=ki(7,e,r,t),e.lanes=n,e}function Fi(e,t,n){return e=ki(6,e,null,t),e.lanes=n,e}function Ii(e){var t=ki(18,null,null,0);return t.stateNode=e,t}function Li(e,t,n){return t=ki(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ri=new WeakMap;function zi(e,t){if(typeof e==`object`&&e){var n=Ri.get(e);return n===void 0?(t={value:e,source:t,stack:Pe(t)},Ri.set(e,t),t):n}return{value:e,source:t,stack:Pe(t)}}var Bi=[],Vi=0,Hi=null,Ui=0,Wi=[],Gi=0,Ki=null,qi=1,Ji=``;function Yi(e,t){Bi[Vi++]=Ui,Bi[Vi++]=Hi,Hi=e,Ui=t}function Xi(e,t,n){Wi[Gi++]=qi,Wi[Gi++]=Ji,Wi[Gi++]=Ki,Ki=e;var r=qi;e=Ji;var i=32-Qe(r)-1;r&=~(1<<i),n+=1;var a=32-Qe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,qi=1<<32-Qe(t)+i|n<<i|r,Ji=a+e}else qi=1<<a|n<<i|r,Ji=e}function Zi(e){e.return!==null&&(Yi(e,1),Xi(e,1,0))}function Qi(e){for(;e===Hi;)Hi=Bi[--Vi],Bi[Vi]=null,Ui=Bi[--Vi],Bi[Vi]=null;for(;e===Ki;)Ki=Wi[--Gi],Wi[Gi]=null,Ji=Wi[--Gi],Wi[Gi]=null,qi=Wi[--Gi],Wi[Gi]=null}function $i(e,t){Wi[Gi++]=qi,Wi[Gi++]=Ji,Wi[Gi++]=Ki,qi=t.id,Ji=t.overflow,Ki=e}var ea=null,ta=null,na=!1,ra=null,ia=!1,aa=Error(i(519));function oa(e){throw fa(zi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),aa}function sa(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[xt]=e,t[St]=r,n){case`dialog`:Hf(`cancel`,t),Hf(`close`,t);break;case`iframe`:case`object`:case`embed`:Hf(`load`,t);break;case`video`:case`audio`:for(n=0;n<zf.length;n++)Hf(zf[n],t);break;case`source`:Hf(`error`,t);break;case`img`:case`image`:case`link`:Hf(`error`,t),Hf(`load`,t);break;case`details`:Hf(`toggle`,t);break;case`input`:Hf(`invalid`,t),rn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Hf(`invalid`,t);break;case`textarea`:Hf(`invalid`,t),cn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||tp(t.textContent,n)?(r.popover!=null&&(Hf(`beforetoggle`,t),Hf(`toggle`,t)),r.onScroll!=null&&Hf(`scroll`,t),r.onScrollEnd!=null&&Hf(`scrollend`,t),r.onClick!=null&&(t.onclick=_n),t=!0):t=!1,t||oa(e,!0)}function ca(e){for(ea=e.return;ea;)switch(ea.tag){case 5:case 31:case 13:ia=!1;return;case 27:case 3:ia=!0;return;default:ea=ea.return}}function la(e){if(e!==ea)return!1;if(!na)return ca(e),na=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||hp(e.type,e.memoizedProps)),n=!n),n&&ta&&oa(e),ca(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ta=pm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ta=pm(e)}else t===27?(t=ta,wp(e.type)?(e=fm,fm=null,ta=e):ta=t):ta=ea?dm(e.stateNode.nextSibling):null;return!0}function ua(){ta=ea=null,na=!1}function da(){var e=ra;return e!==null&&(fd===null?fd=e:fd.push.apply(fd,e),ra=null),e}function fa(e){ra===null?ra=[e]:ra.push(e)}var pa=_e(null),ma=null,ha=null;function ga(e,t,n){ye(pa,t._currentValue),t._currentValue=n}function _a(e){e._currentValue=pa.current,ve(pa)}function va(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function ya(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),va(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),va(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),va(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function ba(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Br(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===Ce.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[lh]:e.push(lh))}a=a.return}return e!==null&&ya(t,e,n,r),t.flags|=262144,e!==null}function xa(e){for(e=e.firstContext;e!==null;){if(!Br(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Sa(e){ma=e,ha=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ca(e){return Ta(ma,e)}function wa(e,t){return ma===null&&Sa(e),Ta(e,t)}function Ta(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ha===null){if(e===null)throw Error(i(308));ha=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ha=ha.next=t;return n}var Ea=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Da=t.unstable_scheduleCallback,Oa=t.unstable_NormalPriority,ka={$$typeof:F,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Aa(){return{controller:new Ea,data:new Map,refCount:0}}function ja(e){e.refCount--,e.refCount===0&&Da(Oa,function(){e.controller.abort()})}function Ma(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Na=null;function Pa(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Fa=null,Ia=0,La=0,Ra=null;function za(e,t){if(Fa===null){var n=Fa=[];Ia=0,La=Pf(),Ra={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Ia++,t.then(Ba,Ba),t}function Ba(){if(--Ia===0&&(Na=null,Fa!==null)){Ra!==null&&(Ra.status=`fulfilled`);var e=Fa;Fa=null,La=0,Ra=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Va(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Ha=L.S;L.S=function(e,t){if(hd=Be(),typeof t==`object`&&t&&typeof t.then==`function`&&za(e,t),Na!==null)for(var n=bf;n!==null;)Ma(n,Na),n=n.next;if(n=e.types,n!==null){for(var r=bf;r!==null;)Ma(r,n),r=r.next;if(La!==0){r=Na,r===null&&(r=Na=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ha!==null&&Ha(e,t)};var Ua=_e(null);function Wa(){var e=Ua.current;return e===null?Xu.pooledCache:e}function Ga(e,t){t===null?ye(Ua,Ua.current):ye(Ua,t.pool)}function Ka(){var e=Wa();return e===null?null:{parent:ka._currentValue,pool:e}}var qa=Error(i(460)),Ja=Error(i(474)),Ya=Error(i(542)),Xa={then:function(){}};function Za(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Qa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(_n,_n),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,no(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(_n,_n);else{if(e=Xu,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,no(e),e}throw eo=t,qa}}function $a(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(eo=e,qa):e}}var eo=null;function to(){if(eo===null)throw Error(i(459));var e=eo;return eo=null,e}function no(e){if(e===qa||e===Ya)throw Error(i(483))}var ro=null,io=0;function ao(e){var t=io;return io+=1,ro===null&&(ro=[]),Qa(ro,e,t)}function oo(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function so(e,t){throw t.$$typeof===O?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function co(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ji(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Fi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===j?(e=d(e,t,n.props.children,r,n.key),oo(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===re&&$a(i)===t.type)?(t=a(t,n.props),oo(t,n),t.return=e,t):(t=Ni(n.type,n.key,n.props,null,e.mode,r),oo(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Li(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Pi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Fi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case k:return n=Ni(t.type,t.key,t.props,null,e.mode,n),oo(n,t),n.return=e,n;case A:return t=Li(t,e.mode,n),t.return=e,t;case re:return t=$a(t),f(e,t,n)}if(pe(t)||ue(t))return t=Pi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ao(t),n);if(t.$$typeof===F)return f(e,wa(e,t),n);so(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case k:return n.key===i?l(e,t,n,r):null;case A:return n.key===i?u(e,t,n,r):null;case re:return n=$a(n),p(e,t,n,r)}if(pe(n)||ue(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ao(n),r);if(n.$$typeof===F)return p(e,t,wa(e,n),r);so(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case k:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case A:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case re:return r=$a(r),m(e,t,n,r,i)}if(pe(r)||ue(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,ao(r),i);if(r.$$typeof===F)return m(e,t,n,wa(t,r),i);so(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),na&&Yi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return na&&Yi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),na&&Yi(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),na&&Yi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return na&&Yi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),na&&Yi(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===j&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case k:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===j){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),oo(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===re&&$a(l)===r.type){n(e,r.sibling),c=a(r,o.props),oo(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===j?(c=Pi(o.props.children,e.mode,c,o.key),oo(c,o),c.return=e,e=c):(c=Ni(o.type,o.key,o.props,null,e.mode,c),oo(c,o),c.return=e,e=c)}return s(e);case A:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Li(o,e.mode,c),c.return=e,e=c}return s(e);case re:return o=$a(o),_(e,r,o,c)}if(pe(o))return h(e,r,o,c);if(ue(o)){if(l=ue(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,ao(o),c);if(o.$$typeof===F)return _(e,r,wa(e,o),c);so(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Fi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{io=0;var i=_(e,t,n,r);return ro=null,i}catch(t){if(t===qa||t===Ya)throw t;var a=ki(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var lo=co(!0),uo=co(!1),fo=!1;function po(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function mo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ho(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function go(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Yu&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Ei(e),Ti(e,null,n),t}return Si(e,r,t,n),Ei(e)}function _o(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,mt(e,n)}}function vo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var yo=!1;function bo(){if(yo){var e=Ra;if(e!==null)throw e}}function xo(e,t,n,r){yo=!1;var i=e.updateQueue;fo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Qu&f)===f:(r&f)===f){f!==0&&f===La&&(yo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=D({},d,f);break a;case 2:fo=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),od|=o,e.lanes=o,e.memoizedState=d}}function So(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Co(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)So(n[e],t)}var wo=_e(null),To=_e(0);function Eo(e,t){e=id,ye(To,e),ye(wo,t),id=e|t.baseLanes}function Do(){ye(To,id),ye(wo,wo.current)}function Oo(){id=To.current,ve(wo),ve(To)}var ko=_e(null),Ao=null;function jo(e){var t=e.alternate;ye(Io,Io.current&1),ye(ko,e),Ao===null&&(t===null||wo.current!==null||t.memoizedState!==null)&&(Ao=e)}function Mo(e){ye(Io,Io.current),ye(ko,e),Ao===null&&(Ao=e)}function No(e){e.tag===22?(ye(Io,Io.current),ye(ko,e),Ao===null&&(Ao=e)):Po()}function Po(){ye(Io,Io.current),ye(ko,ko.current)}function Fo(e){ve(ko),Ao===e&&(Ao=null),ve(Io)}var Io=_e(0);function Lo(e,t){ye(ko,ko.current),ye(Io,t)}function Ro(e){ve(Io),ve(ko),Ao===e&&(Ao=null)}function zo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||cm(n)||lm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Bo=0,U=null,Vo=null,Ho=null,Uo=!1,Wo=!1,Go=!1,Ko=0,qo=0,Jo=null,Yo=0;function Xo(){throw Error(i(321))}function Zo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Br(e[n],t[n]))return!1;return!0}function Qo(e,t,n,r,i,a){return Bo=a,U=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,L.H=e===null||e.memoizedState===null?hc:gc,Go=!1,a=n(r,i),Go=!1,Wo&&(a=es(t,n,r,i)),$o(e),a}function $o(e){L.H=mc;var t=Vo!==null&&Vo.next!==null;if(Bo=0,Ho=Vo=U=null,Uo=!1,qo=0,Jo=null,t)throw Error(i(300));e===null||Nc||(e=e.dependencies,e!==null&&xa(e)&&(Nc=!0))}function es(e,t,n,r){U=e;var a=0;do{if(Wo&&(Jo=null),qo=0,Wo=!1,25<=a)throw Error(i(301));if(a+=1,Ho=Vo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}L.H=_c,o=t(n,r)}while(Wo);return o}function ts(){var e=L.H,t=e.useState()[0];return t=typeof t.then==`function`?cs(t):t,e=e.useState()[0],(Vo===null?null:Vo.memoizedState)!==e&&(U.flags|=1024),t}function ns(){var e=Ko!==0;return Ko=0,e}function rs(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function is(e){if(Uo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Uo=!1}Bo=0,Ho=Vo=U=null,Wo=!1,qo=Ko=0,Jo=null}function as(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ho===null?U.memoizedState=Ho=e:Ho=Ho.next=e,Ho}function os(){if(Vo===null){var e=U.alternate;e=e===null?null:e.memoizedState}else e=Vo.next;var t=Ho===null?U.memoizedState:Ho.next;if(t!==null)Ho=t,Vo=e;else{if(e===null)throw U.alternate===null?Error(i(467)):Error(i(310));Vo=e,e={memoizedState:Vo.memoizedState,baseState:Vo.baseState,baseQueue:Vo.baseQueue,queue:Vo.queue,next:null},Ho===null?U.memoizedState=Ho=e:Ho=Ho.next=e}return Ho}function ss(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function cs(e){var t=qo;return qo+=1,Jo===null&&(Jo=[]),e=Qa(Jo,e,t),t=U,(Ho===null?t.memoizedState:Ho.next)===null&&(t=t.alternate,L.H=t===null||t.memoizedState===null?hc:gc),e}function ls(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return cs(e);if(e.$$typeof===ce)return;if(e.$$typeof===F)return Ca(e)}throw Error(i(438,String(e)))}function us(e){var t=null,n=U.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=U.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=ss(),U.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=oe;return t.index++,n}function ds(e,t){return typeof t==`function`?t(e):t}function fs(e){return ps(os(),Vo,e)}function ps(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Bo&f)===f:(Qu&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===La&&(d=!0);else if((Bo&p)===p){u=u.next,p===La&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,U.lanes|=p,od|=p;f=u.action,Go&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,U.lanes|=f,od|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Br(o,e.memoizedState)&&(Nc=!0,d&&(n=Ra,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ms(e){var t=os(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Br(o,t.memoizedState)||(Nc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function hs(e,t,n){var r=U,a=os(),o=na;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Br((Vo||a).memoizedState,n);if(s&&(a.memoizedState=n,Nc=!0),a=a.queue,Bs(vs.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Ho!==null&&!!(Ho.memoizedState.tag&1),Fs(e?9:8,{destroy:void 0},_s.bind(null,r,a,n,t),null),e){if(r.flags|=2048,Xu===null)throw Error(i(349));o||Bo&127||gs(r,t,n)}return n}function gs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=U.updateQueue,t===null?(t=ss(),U.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function _s(e,t,n,r){t.value=n,t.getSnapshot=r,ys(t)&&bs(e)}function vs(e,t,n){return n(function(){ys(t)&&bs(e)})}function ys(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Br(e,n)}catch{return!0}}function bs(e){var t=wi(e,2);t!==null&&Pd(t,e,2)}function xs(e){var t=as();if(typeof e==`function`){var n=e;if(e=n(),Go){Ze(!0);try{n()}finally{Ze(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:e},t}function Ss(e,t,n,r){return e.baseState=n,ps(e,Vo,typeof r==`function`?r:ds)}function Cs(e,t,n,r,a){if(dc(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};L.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,ws(t,o)):(o.next=n.next,t.pending=n.next=o)}}function ws(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=L.T,o={};o.types=a===null?null:a.types,L.T=o;try{var s=n(i,r),c=L.S;c!==null&&c(o,s),Ts(e,t,s)}catch(n){Ds(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),L.T=a}}else try{a=n(i,r),Ts(e,t,a)}catch(n){Ds(e,t,n)}}function Ts(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Es(e,t,n)},function(n){return Ds(e,t,n)}):Es(e,t,n)}function Es(e,t,n){t.status=`fulfilled`,t.value=n,Os(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,ws(e,n)))}function Ds(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Os(t),t=t.next;while(t!==r)}e.action=null}function Os(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ks(e,t){return t}function As(e,t){if(na){var n=Xu.formState;if(n!==null){a:{var r=U;if(na){if(ta){b:{for(var i=ta,a=ia;i.nodeType!==8;)if(!a||(i=dm(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){ta=dm(i.nextSibling),r=i.data===`F!`;break a}}oa(r)}r=!1}r&&(t=n[0])}}return n=as(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ks,lastRenderedState:t},n.queue=r,n=cc.bind(null,U,r),r.dispatch=n,r=xs(!1),a=uc.bind(null,U,!1,r.queue),r=as(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Cs.bind(null,U,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function js(e){return Ms(os(),Vo,e)}function Ms(e,t,n){if(t=ps(e,t,ks)[0],e=fs(ds)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=cs(t)}catch(e){throw e===qa?Ya:e}else r=t;t=os();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(U.flags|=2048,Fs(9,{destroy:void 0},Ns.bind(null,i,n),null)),[r,a,e]}function Ns(e,t){e.action=t}function Ps(e){var t=os(),n=Vo;if(n!==null)return Ms(t,n,e);os(),t=t.memoizedState,n=os();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Fs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=U.updateQueue,t===null&&(t=ss(),U.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Is(){return os().memoizedState}function Ls(e,t,n,r){var i=as();U.flags|=e,i.memoizedState=Fs(1|t,{destroy:void 0},n,r===void 0?null:r)}function Rs(e,t,n,r){var i=os();r=r===void 0?null:r;var a=i.memoizedState.inst;Vo!==null&&r!==null&&Zo(r,Vo.memoizedState.deps)?i.memoizedState=Fs(t,a,n,r):(U.flags|=e,i.memoizedState=Fs(1|t,a,n,r))}function zs(e,t){Ls(8390656,8,e,t)}function Bs(e,t){Rs(2048,8,e,t)}function Vs(e){U.flags|=4;var t=U.updateQueue;if(t===null)t=ss(),U.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Hs(e){var t=os().memoizedState;return Vs({ref:t,nextImpl:e}),function(){if(Yu&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Us(e,t){return Rs(4,2,e,t)}function Ws(e,t){return Rs(4,4,e,t)}function Gs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ks(e,t,n){n=n==null?null:n.concat([e]),Rs(4,4,Gs.bind(null,t,e),n)}function qs(){}function Js(e,t){var n=os();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Zo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ys(e,t){var n=os();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Zo(t,r[1]))return r[0];if(r=e(),Go){Ze(!0);try{e()}finally{Ze(!1)}}return n.memoizedState=[r,t],r}function Xs(e,t,n){return n===void 0||Bo&1073741824&&!(Qu&261930)?e.memoizedState=t:(e.memoizedState=n,e=Md(),U.lanes|=e,od|=e,n)}function Zs(e,t,n,r){return Br(n,t)?n:wo.current===null?!(Bo&106)||Bo&1073741824&&!(Qu&261930)?(Nc=!0,e.memoizedState=n):(e=Md(),U.lanes|=e,od|=e,t):(e=Xs(e,n,r),Br(e,t)||(Nc=!0),e)}function Qs(e,t,n,r,i){var a=R.p;R.p=a!==0&&8>a?a:8;var o=L.T,s={};s.types=o===null?null:o.types,L.T=s,uc(e,!1,t,n);try{var c=i(),l=L.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?lc(e,t,Va(c,r),jd(e)):lc(e,t,r,jd(e))}catch(n){lc(e,t,{then:function(){},status:`rejected`,reason:n},jd())}finally{R.p=a,o!==null&&s.types!==null&&(o.types=s.types),L.T=o}}function $s(){}function ec(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=tc(e).queue;Qs(e,a,t,me,n===null?$s:function(){return nc(e),n(r)})}function tc(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:me,baseState:me,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:me},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function nc(e){var t=tc(e);t.next===null&&(t=e.alternate.memoizedState),lc(e,t.next.queue,{},jd())}function rc(){return Ca(lh)}function ic(){return os().memoizedState}function ac(){return os().memoizedState}function oc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=jd();e=ho(n);var r=go(t,e,n);r!==null&&(Pd(r,t,n),_o(r,t,n)),t={cache:Aa()},e.payload=t;return}t=t.return}}function sc(e,t,n){var r=jd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},dc(e)?fc(t,n):(n=Ci(e,t,n,r),n!==null&&(Pd(n,e,r),pc(n,t,r)))}function cc(e,t,n){lc(e,t,n,jd())}function lc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(dc(e))fc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Br(s,o))return Si(e,t,i,0),Xu===null&&xi(),!1}catch{}if(n=Ci(e,t,i,r),n!==null)return Pd(n,e,r),pc(n,t,r),!0}return!1}function uc(e,t,n,r){if(r={lane:2,revertLane:Pf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},dc(e)){if(t)throw Error(i(479))}else t=Ci(e,n,r,2),t!==null&&Pd(t,e,2)}function dc(e){var t=e.alternate;return e===U||t!==null&&t===U}function fc(e,t){Wo=Uo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function pc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,mt(e,n)}}var mc={readContext:Ca,use:ls,useCallback:Xo,useContext:Xo,useEffect:Xo,useImperativeHandle:Xo,useLayoutEffect:Xo,useInsertionEffect:Xo,useMemo:Xo,useReducer:Xo,useRef:Xo,useState:Xo,useDebugValue:Xo,useDeferredValue:Xo,useTransition:Xo,useSyncExternalStore:Xo,useId:Xo,useHostTransitionStatus:Xo,useFormState:Xo,useActionState:Xo,useOptimistic:Xo,useMemoCache:Xo,useCacheRefresh:Xo,useEffectEvent:Xo},hc={readContext:Ca,use:ls,useCallback:function(e,t){return as().memoizedState=[e,t===void 0?null:t],e},useContext:Ca,useEffect:zs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Ls(4194308,4,Gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ls(4194308,4,e,t)},useInsertionEffect:function(e,t){Ls(4,2,e,t)},useMemo:function(e,t){var n=as();t=t===void 0?null:t;var r=e();if(Go){Ze(!0);try{e()}finally{Ze(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=as();if(n!==void 0){var i=n(t);if(Go){Ze(!0);try{n(t)}finally{Ze(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=sc.bind(null,U,e),[r.memoizedState,e]},useRef:function(e){var t=as();return e={current:e},t.memoizedState=e},useState:function(e){e=xs(e);var t=e.queue,n=cc.bind(null,U,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:qs,useDeferredValue:function(e,t){return Xs(as(),e,t)},useTransition:function(){var e=xs(!1);return e=Qs.bind(null,U,e.queue,!0,!1),as().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=U,a=as();if(na){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Xu===null)throw Error(i(349));Qu&127||gs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,zs(vs.bind(null,r,o,e),[e]),r.flags|=2048,Fs(9,{destroy:void 0},_s.bind(null,r,o,n,t),null),n},useId:function(){var e=as(),t=Xu.identifierPrefix;if(na){var n=Ji,r=qi;n=(r&~(1<<32-Qe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Ko++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Yo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:rc,useFormState:As,useActionState:As,useOptimistic:function(e){var t=as();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=uc.bind(null,U,!0,n),n.dispatch=t,[e,t]},useMemoCache:us,useCacheRefresh:function(){return as().memoizedState=oc.bind(null,U)},useEffectEvent:function(e){var t=as(),n={impl:e};return t.memoizedState=n,function(){if(Yu&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},gc={readContext:Ca,use:ls,useCallback:Js,useContext:Ca,useEffect:Bs,useImperativeHandle:Ks,useInsertionEffect:Us,useLayoutEffect:Ws,useMemo:Ys,useReducer:fs,useRef:Is,useState:function(){return fs(ds)},useDebugValue:qs,useDeferredValue:function(e,t){return Zs(os(),Vo.memoizedState,e,t)},useTransition:function(){var e=fs(ds)[0],t=os().memoizedState;return[typeof e==`boolean`?e:cs(e),t]},useSyncExternalStore:hs,useId:ic,useHostTransitionStatus:rc,useFormState:js,useActionState:js,useOptimistic:function(e,t){return Ss(os(),Vo,e,t)},useMemoCache:us,useCacheRefresh:ac,useEffectEvent:Hs},_c={readContext:Ca,use:ls,useCallback:Js,useContext:Ca,useEffect:Bs,useImperativeHandle:Ks,useInsertionEffect:Us,useLayoutEffect:Ws,useMemo:Ys,useReducer:ms,useRef:Is,useState:function(){return ms(ds)},useDebugValue:qs,useDeferredValue:function(e,t){var n=os();return Vo===null?Xs(n,e,t):Zs(n,Vo.memoizedState,e,t)},useTransition:function(){var e=ms(ds)[0],t=os().memoizedState;return[typeof e==`boolean`?e:cs(e),t]},useSyncExternalStore:hs,useId:ic,useHostTransitionStatus:rc,useFormState:Ps,useActionState:Ps,useOptimistic:function(e,t){var n=os();return Vo===null?(n.baseState=e,[e,n.queue.dispatch]):Ss(n,Vo,e,t)},useMemoCache:us,useCacheRefresh:ac,useEffectEvent:Hs};function vc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:D({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var yc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=jd(),i=ho(r);i.payload=t,n!=null&&(i.callback=n),t=go(e,i,r),t!==null&&(Pd(t,e,r),_o(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=jd(),i=ho(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=go(e,i,r),t!==null&&(Pd(t,e,r),_o(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=jd(),r=ho(n);r.tag=2,t!=null&&(r.callback=t),t=go(e,r,n),t!==null&&(Pd(t,e,n),_o(t,e,n))}};function bc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Vr(n,r)||!Vr(i,a):!0}function xc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&yc.enqueueReplaceState(t,t.state,null)}function Sc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=D({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Cc(e){_i(e)}function wc(e){console.error(e)}function Tc(e){_i(e)}function Ec(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Dc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Oc(e,t,n){return n=ho(n),n.tag=3,n.payload={element:null},n.callback=function(){Ec(e,t)},n}function kc(e){return e=ho(e),e.tag=3,e}function Ac(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Dc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Dc(t,n,r),typeof i!=`function`&&(vd===null?vd=new Set([this]):vd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function jc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ba(t,n,a,!0),n=ko.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Ao===null?Kd():n.alternate===null&&ad===0&&(ad=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Xa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),mf(e,r,a)),!1;case 22:return n.flags|=65536,r===Xa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),mf(e,r,a)),!1}throw Error(i(435,n.tag))}return mf(e,r,a),Kd(),!1}if(na)return t=ko.current,t===null?(r!==aa&&(t=Error(i(423),{cause:r}),fa(zi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=zi(r,n),a=Oc(e.stateNode,r,a),vo(e,a),ad!==4&&(ad=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==aa&&(e=Error(i(422),{cause:r}),fa(zi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=zi(o,n),dd===null?dd=[o]:dd.push(o),ad!==4&&(ad=2),t===null)return!0;r=zi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Oc(n.stateNode,r,e),vo(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(vd===null||!vd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=kc(a),Ac(a,e,n,r),vo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Mc=Error(i(461)),Nc=!1;function Pc(e,t,n,r){t.child=e===null?uo(t,null,n,r):lo(t,e.child,n,r)}function Fc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Sa(t),r=Qo(e,t,n,o,a,i),s=ns(),e!==null&&!Nc?(rs(e,t,i),ll(e,t,i)):(na&&s&&Zi(t),t.flags|=1,Pc(e,t,r,i),t.child)}function Ic(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Ai(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Lc(e,t,a,r,i)):(e=Ni(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!ul(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Vr:n,n(o,r)&&e.ref===t.ref)return ll(e,t,i)}return t.flags|=1,e=ji(a,r),e.ref=t.ref,e.return=t,t.child=e}function Lc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Vr(a,r)&&e.ref===t.ref){if(Nc=!1,t.pendingProps=r=a,ul(e,i))e.flags&131072&&(Nc=!0);else return t.lanes=e.lanes,ll(e,t,i)}}return Gc(e,t,n,r,i)}function Rc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Bc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ga(t,a===null?null:a.cachePool),a===null?Do():Eo(t,a),No(t);else return r=t.lanes=536870912,Bc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ga(t,null),Do(),Po()):(Ga(t,a.cachePool),Eo(t,a),Po(),t.memoizedState=null);return Pc(e,t,i,n),t.child}function zc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Bc(e,t,n,r,i){var a=Wa();return a=a===null?null:{parent:ka._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ga(t,null),Do(),No(t),e!==null&&ba(e,t,r,!0),t.childLanes=i,null}function Vc(e,t){return t=el({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Hc(e,t,n){return lo(t,e.child,null,n),e=Vc(t,t.pendingProps),e.flags|=2,Fo(t),t.memoizedState=null,e}function Uc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(na){if(r.mode===`hidden`)return e=Vc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},zc(null,e);if(Mo(t),(e=ta)?(e=sm(e,ia),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ki===null?null:{id:qi,overflow:Ji},retryLane:536870912,hydrationErrors:null},n=Ii(e),n.return=t,t.child=n,ea=t,ta=null)):e=null,e===null)throw oa(t);return t.lanes=536870912,null}return Vc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Mo(t),a){if(t.flags&256)t.flags&=-257,t=Hc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Nc||ba(e,t,n,!1),a=(n&e.childLanes)!==0,Nc||a){if(wo.current===null){if(r=Xu,r!==null&&(s=ht(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,wi(e,s),Pd(r,e,s),Mc;Kd()}t=Hc(e,t,n)}else e=o.treeContext,ta=dm(s.nextSibling),ea=t,na=!0,ra=null,ia=!1,e!==null&&$i(t,e),t=Vc(t,r),t.flags|=134221824;return t}return e=ji(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Wc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Gc(e,t,n,r,i){return Sa(t),n=Qo(e,t,n,r,void 0,i),r=ns(),e!==null&&!Nc?(rs(e,t,i),ll(e,t,i)):(na&&r&&Zi(t),t.flags|=1,Pc(e,t,n,i),t.child)}function Kc(e,t,n,r,i,a){return Sa(t),t.updateQueue=null,n=es(t,r,n,i),$o(e),r=ns(),e!==null&&!Nc?(rs(e,t,a),ll(e,t,a)):(na&&r&&Zi(t),t.flags|=1,Pc(e,t,n,a),t.child)}function qc(e,t,n,r,i){if(Sa(t),t.stateNode===null){var a=Di,o=n.contextType;typeof o==`object`&&o&&(a=Ca(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=yc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},po(t),o=n.contextType,a.context=typeof o==`object`&&o?Ca(o):Di,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(vc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&yc.enqueueReplaceState(a,a.state,null),xo(t,r,a,i),bo(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Sc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Di,typeof u==`object`&&u&&(o=Ca(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&xc(t,a,r,o),fo=!1;var f=t.memoizedState;a.state=f,xo(t,r,a,i),bo(),l=t.memoizedState,s||f!==l||fo?(typeof d==`function`&&(vc(t,n,d,r),l=t.memoizedState),(c=fo||bc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,mo(e,t),o=t.memoizedProps,u=Sc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Di,typeof l==`object`&&l&&(c=Ca(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&xc(t,a,r,c),fo=!1,f=t.memoizedState,a.state=f,xo(t,r,a,i),bo();var p=t.memoizedState;o!==d||f!==p||fo||e!==null&&e.dependencies!==null&&xa(e.dependencies)?(typeof s==`function`&&(vc(t,n,s,r),p=t.memoizedState),(u=fo||bc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&xa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Wc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=lo(t,e.child,null,i),t.child=lo(t,null,n,i)):Pc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=ll(e,t,i),e}function Jc(e,t,n,r){return ua(),t.flags|=256,Pc(e,t,n,r),t.child}var Yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Xc(e){return{baseLanes:e,cachePool:Ka()}}function Zc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=ld),e}function Qc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Io.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(na){if(i?jo(t):Po(),(e=ta)?(e=sm(e,ia),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ki===null?null:{id:qi,overflow:Ji},retryLane:536870912,hydrationErrors:null},n=Ii(e),n.return=t,t.child=n,ea=t,ta=null)):e=null,e===null)throw oa(t);return t.lanes=lm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Po(),i=t.mode,a=el({mode:`hidden`,children:a},i),r=Pi(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Xc(n),r.childLanes=Zc(e,o,n),t.memoizedState=Yc,zc(null,r)):(jo(t),$c(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return nl(e,t,a,o,r,c,s,n)}return i?(Po(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=ji(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Pi(i,a,n,null),i.flags|=2):i=ji(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,zc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Xc(n):(a=i.cachePool,a===null?a=Ka():(s=ka._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Zc(e,o,n),t.memoizedState=Yc,zc(e.child,r)):(jo(t),n=e.child,e=n.sibling,n=ji(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function $c(e,t){return t=el({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function el(e,t){return e=ki(22,e,null,t),e.lanes=0,e}function tl(e,t,n){return lo(t,e.child,null,n),e=$c(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function nl(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(jo(t),t.flags&=-257,tl(e,t,c)):t.memoizedState===null?(Po(),o=a.fallback,s=t.mode,a=el({mode:`visible`,children:a.children},s),o=Pi(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,lo(t,e.child,null,c),a=t.child,a.memoizedState=Xc(c),a.childLanes=Zc(e,r,c),t.memoizedState=Yc,zc(null,a)):(Po(),t.child=e.child,t.flags|=128,null);if(jo(t),lm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,fa({value:a,source:null,stack:null})),tl(e,t,c)}if(Nc||ba(e,t,c,!1),r=(c&e.childLanes)!==0,Nc||r){if(wo.current!==null)return tl(e,t,c);if(r=Xu,r!==null&&(a=ht(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,wi(e,a),Pd(r,e,a),Mc;return cm(o)||Kd(),tl(e,t,c)}return cm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,ta=dm(o.nextSibling),ea=t,na=!0,ra=null,ia=!1,e!==null&&$i(t,e),t=$c(t,a.children),t.flags|=134221824,t)}function rl(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),va(e.return,t,n)}function il(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&zo(n)===null&&(t=e),e=e.sibling}return t}function al(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function ol(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function sl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Io.current;if(t.flags&128)return Lo(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Lo(t,o),i===`backwards`&&e!==null?(ol(e),Pc(e,t,r,n),ol(e)):Pc(e,t,r,n),r=na?Ui:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&rl(e,n,t);else if(e.tag===19)rl(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=il(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,ol(t)),al(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&zo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}al(t,!0,n,null,a,r);break;case`together`:al(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=il(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),al(t,!1,i,n,a,r)}return t.child}function cl(e,t,n){var r=t.pendingProps;return ga(t,t.type,r.value),Pc(e,t,r.children,n),t.child}function ll(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),od|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(ba(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ji(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ji(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ul(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&xa(e)))}function dl(e,t,n){switch(t.tag){case 3:we(t,t.stateNode.containerInfo),ga(t,ka,e.memoizedState.cache),ua();break;case 27:case 5:Ee(t);break;case 4:we(t,t.stateNode.containerInfo);break;case 10:ga(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Mo(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return jo(t),t.flags|=128,null;r=ba(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Qc(e,t,n):(jo(t),e=ll(e,t,n),e===null?null:e.sibling)}jo(t);break;case 19:if(t.flags&128)return sl(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(ba(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return sl(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Lo(t,Io.current),r)break;return null;case 22:return t.lanes=0,Rc(e,t,n,t.pendingProps);case 24:ga(t,ka,e.memoizedState.cache)}return ll(e,t,n)}function fl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Nc=!0;else{if(!ul(e,n)&&!(t.flags&128))return Nc=!1,dl(e,t,n);Nc=!!(e.flags&131072)}}else Nc=!1,na&&t.flags&1048576&&Xi(t,Ui,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=$a(t.elementType),t.type=e,typeof e==`function`)Ai(e)?(r=Sc(e,r),t.tag=1,t=qc(null,t,e,r,n)):(t.tag=0,t=Gc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===ee){t.tag=11,t=Fc(null,t,e,r,n);break a}if(a===ne){t.tag=14,t=Ic(null,t,e,r,n);break a}if(a===F){t.tag=10,t.type=e,t=cl(null,t,n);break a}}throw t=fe(e)||e,Error(i(306,t,``))}}return t;case 0:return Gc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Sc(r,t.pendingProps),qc(e,t,r,a,n);case 3:a:{if(we(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,mo(e,t),xo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ga(t,ka,r),r!==o.cache&&ya(t,[ka],n,!0),bo(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Jc(e,t,r,n);break a}if(r!==a){a=zi(Error(i(424)),t),fa(a),t=Jc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(ta=dm(e.firstChild),ea=t,na=!0,ra=null,ia=!0,n=uo(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ua(),r===a){t=ll(e,t,n);break a}Pc(e,t,r,n)}t=t.child}return t;case 26:return Wc(e,t),e===null?(n=Fm(t.type,null,t.pendingProps,null))?t.memoizedState=n:na||(t.stateNode=mp(t.type,t.pendingProps,Se.current,t)):t.memoizedState=Fm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ee(t),e===null&&na&&(r=t.stateNode=_m(t.type,t.pendingProps,Se.current),ea=t,ia=!0,a=ta,wp(t.type)?(fm=a,ta=dm(r.firstChild)):ta=a),Pc(e,t,t.pendingProps.children,n),Wc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&na&&((a=r=ta)&&(r=am(r,t.type,t.pendingProps,ia),r===null?a=!1:(t.stateNode=r,ea=t,ta=dm(r.firstChild),ia=!1,a=!0)),a||oa(t)),Ee(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,hp(a,o)?r=null:s!==null&&hp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Qo(e,t,ts,null,null,n),lh._currentValue=a),Wc(e,t),Pc(e,t,r,n),t.child;case 6:return e===null&&na&&((e=n=ta)&&(n=om(n,t.pendingProps,ia),n===null?e=!1:(t.stateNode=n,ea=t,ta=null,e=!0)),e||oa(t)),null;case 13:return Qc(e,t,n);case 4:return we(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=lo(t,null,r,n):Pc(e,t,r,n),t.child;case 11:return Fc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Wc(e,t),Pc(e,t,r,n),t.child;case 8:return Pc(e,t,t.pendingProps.children,n),t.child;case 12:return Pc(e,t,t.pendingProps.children,n),t.child;case 10:return cl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,Sa(t),a=Ca(a),r=r(a),t.flags|=1,Pc(e,t,r,n),t.child;case 14:return Ic(e,t,t.type,t.pendingProps,n);case 15:return Lc(e,t,t.type,t.pendingProps,n);case 19:return sl(e,t,n);case 31:return Uc(e,t,n);case 22:return Rc(e,t,n,t.pendingProps);case 24:return Sa(t),r=Ca(ka),e===null?(a=Wa(),a===null&&(a=Xu,o=Aa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},po(t),ga(t,ka,a)):((e.lanes&n)!==0&&(mo(e,t),xo(t,null,null,n),bo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ga(t,ka,r),r!==a.cache&&ya(t,[ka],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ga(t,ka,r))),Pc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:na&&Zi(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Wc(e,t),Pc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function pl(e){e.flags|=4}function ml(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Xm(t,r):Xm(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Ud())e.flags|=8192;else throw eo=Xa,Ja}}else e.flags&=-16777217}function hl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Zm(t)){if(Ud())e.flags|=8192;else throw eo=Xa,Ja}}function gl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:lt(),e.lanes|=t,ud|=t)}function _l(e,t){if(!na)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function vl(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function yl(e,t,n){var r=t.pendingProps;switch(Qi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vl(t),null;case 1:return vl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),_a(ka),Te(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(la(t)?pl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,da())),vl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(pl(t),o===null?(vl(t),ml(t,a,null,r,n)):(vl(t),hl(t,o))):o?o===e.memoizedState?(vl(t),t.flags&=-16777217):(pl(t),vl(t),hl(t,o)):(e=e.memoizedProps,e!==r&&pl(t),vl(t),ml(t,a,e,r,n)),null;case 27:if(De(t),n=Se.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return vl(t),t.subtreeFlags&=-33554433,null}e=be.current,la(t)?sa(t,e):(e=_m(a,r,n),t.stateNode=e,pl(t))}return vl(t),t.subtreeFlags&=-33554433,null;case 5:if(De(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return vl(t),t.subtreeFlags&=-33554433,null}if(o=be.current,la(t))sa(t,o);else{var s=dp(Se.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[xt]=t,o[St]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(ip(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&pl(t)}}return vl(t),t.subtreeFlags&=-33554433,ml(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Se.current,la(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ea,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[xt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||tp(e.nodeValue,n)),e||oa(t,!0)}else e=dp(e).createTextNode(r),e[xt]=t,t.stateNode=e}return vl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=la(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[xt]=t}else ua(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;vl(t),e=!1}else n=da(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Fo(t),t):(Fo(t),null);if(t.flags&128)throw Error(i(558))}return vl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=la(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[xt]=t}else ua(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;vl(t),a=!1}else a=da(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Fo(t),t):(Fo(t),null)}return Fo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),gl(t,t.updateQueue),vl(t),null);case 4:return Te(),e===null&&Gf(t.stateNode.containerInfo),t.flags|=67108864,vl(t),null;case 10:return _a(t.type),vl(t),null;case 19:if(Ro(t),r=t.memoizedState,r===null)return vl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)_l(r,!1);else{if(ad!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=zo(e),o!==null){for(t.flags|=128,_l(r,!1),e=o.updateQueue,t.updateQueue=e,gl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Mi(n,e),n=n.sibling;return Lo(t,Io.current&1|2),na&&Yi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Be()>gd&&(t.flags|=128,a=!0,_l(r,!1),t.lanes=4194304)}}else{if(!a){if(e=zo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,gl(t,e),_l(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!na)return vl(t),null}else 2*Be()-r.renderingStartTime>gd&&n!==536870912&&(t.flags|=128,a=!0,_l(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Be(),e.sibling=null,o=Io.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||na?Lo(t,o):(n=o,ye(ko,t),ye(Io,n),Ao===null&&(Ao=t)),na&&Yi(t,r.treeForkCount),e}return vl(t),null;case 22:case 23:return Fo(t),Oo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(vl(t),t.subtreeFlags&6&&(t.flags|=8192)):vl(t),n=t.updateQueue,n!==null&&gl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ve(Ua),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),_a(ka),vl(t),null;case 25:return null;case 30:return t.flags|=33554432,vl(t),null}throw Error(i(156,t.tag))}function bl(e,t){switch(Qi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return _a(ka),Te(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return De(t),null;case 31:if(t.memoizedState!==null){if(Fo(t),t.alternate===null)throw Error(i(340));ua()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Fo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ua()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ro(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Te(),null;case 10:return _a(t.type),null;case 22:case 23:return Fo(t),Oo(),e!==null&&ve(Ua),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return _a(ka),null;case 25:return null;default:return null}}function xl(e,t){switch(Qi(t),t.tag){case 3:_a(ka),Te();break;case 26:case 27:case 5:De(t);break;case 4:Te();break;case 31:t.memoizedState!==null&&Fo(t);break;case 13:Fo(t);break;case 19:Ro(t);break;case 10:_a(t.type);break;case 22:case 23:Fo(t),Oo(),e!==null&&ve(Ua);break;case 24:_a(ka)}}function Sl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){pf(t,t.return,e)}}function Cl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){pf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){pf(t,t.return,e)}}function wl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Co(t,n)}catch(t){pf(e,e.return,t)}}}function Tl(e,t,n){n.props=Sc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){pf(e,t,n)}}function El(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=V(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Ip(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Lp(e);p(e.child,!1,em,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){pf(e,t,n)}}function Dl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){pf(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){pf(e,t,n)}else n.current=null}}function Ol(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)nm(e.stateNode,t[n])}function kl(e){for(var t=e.return;t!==null&&(Ml(t)&&nm(e.stateNode,t.stateNode),!jl(t));)t=t.return}function Al(e){for(var t=e.return;t!==null&&(Ml(t)&&rm(e.stateNode,t.stateNode),!jl(t));)t=t.return}function jl(e){return e.tag===5||e.tag===3||e.tag===27}function Ml(e){return e&&e.tag===7&&e.stateNode!==null}function Nl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){pf(e,e.return,t)}}function Pl(e,t,n){try{var r=e.stateNode;op(r,e.type,n,t),r[St]=t}catch(t){pf(e,e.return,t)}}function Fl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&wp(e.type)||e.tag===4}function Il(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Fl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&wp(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ll(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=_n)),Ol(e,r),Gt=!0;else if(i!==4&&(i===27&&(Ol(e,r),r=null,wp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Ll(e,t,n,r),e=e.sibling;e!==null;)Ll(e,t,n,r),e=e.sibling}function Rl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Ol(e,r),Gt=!0;else if(i!==4&&(i===27&&(Ol(e,r),r=null,wp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Rl(e,t,n,r),e=e.sibling;e!==null;)Rl(e,t,n,r),e=e.sibling}function zl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);ip(t,r,n),t[xt]=e,t[St]=n}catch(t){pf(e,e.return,t)}}var Bl=!1,Vl=null;function Hl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Bl=!0)}var Ul=null;function Wl(){var e=Ul;return Ul=null,e}var Gl=0;function Kl(e,t,n,r,i){return Gl=0,ql(e.child,t,n,r,i)}function ql(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Ap(o);r.push(s),s.view&&(a=!0)}else a||Ap(o).view&&(a=!0);Bl=!0,Dp(o,Gl===0?t:t+`_`+Gl,n),Gl++}else e.tag===22&&e.memoizedState!==null||e.tag===30&&i||ql(e.child,t,n,r,i)&&(a=!0);e=e.sibling}return a}function Jl(e,t){for(;e!==null;)e.tag===5?Op(e.stateNode,e.memoizedProps):e.tag===22&&e.memoizedState!==null||e.tag===30&&t||Jl(e.child,t),e=e.sibling}function Yl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Yl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=H(t.default,t.share),t!==`none`&&(Kl(e,n,t,null,!1)||Jl(e.child,!1))}e=e.sibling}}function Xl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=V(r,n),a=H(r.default,n.paired?r.share:r.enter);a===`none`?Yl(e):Kl(e,i,a,null,!1)?(Yl(e),n.paired||t||Nd(e,r.onEnter)):Jl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Xl(e,t),e=e.sibling;else Yl(e)}function Zl(e){if(Vl!==null&&Vl.size!==0){var t=Vl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=H(n.default,n.share);if(a!==`none`&&(Kl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Nd(e,n.onShare)):Jl(e.child,!1)),t.delete(r),t.size===0)break}}}Zl(e)}e=e.sibling}}}function Ql(e){if(e.tag===30){var t=e.memoizedProps,n=V(t,e.stateNode),r=Vl===null?void 0:Vl.get(n),i=H(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Kl(e,n,i,null,!1)?r===void 0?Nd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Vl.delete(n),Nd(e,t.onShare)):Jl(e.child,!1)),Vl!==null&&Zl(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Ql(e),e=e.sibling;else Vl!==null&&Zl(e)}function $l(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=V(t,e.stateNode);t=H(t.default,t.update),e.flags&=-5,t!==`none`&&Kl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&$l(e);e=e.sibling}}function eu(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Jl(e.child,!1))}eu(e)}e=e.sibling}}function tu(e){if(e.tag===30)e.stateNode.paired=null,Jl(e.child,!1),eu(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)tu(e),e=e.sibling;else eu(e)}function nu(e){for(e=e.child;e!==null;)e.tag===30?Jl(e.child,!1):e.subtreeFlags&33554432&&nu(e),e=e.sibling}function ru(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Gl<a.length){var l=a[Gl],u=Ap(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Dp(c,Gl===0?n:n+`_`+Gl,i),s&&e.flags&4||(Ul===null&&(Ul=[]),Ul.push(c,Gl===0?r:r+`_`+Gl,t.memoizedProps)),Gl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:ru(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function iu(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=V(n,r),a=H(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(jp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Gl=0,i=ru(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Nd(e,n.onUpdate))}else e.subtreeFlags&33554432&&iu(e,t);e=e.sibling}}var au=!1,ou=!1,su=!1,cu=!1,W=typeof WeakSet==`function`?WeakSet:Set,lu=null,uu=!1,du=!1,fu=!1,pu=!1;function mu(e,t,n){if(e=e.containerInfo,lp=vh,e=Kr(e),qr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(up={focusedElem:e,selectionRange:r},vh=!1,n=(n&335544064)===n,lu=t,t=n?9270:1024;lu!==null;){if(e=lu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Ql(r[a]);if(e.alternate===null&&e.flags&2)n&&Hl(e),G(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Ql(r),G(n);continue}if(r!==null&&r.memoizedState!==null){n&&Hl(e),G(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,lu=r):(n&&$l(e),G(n))}}Vl=null}function G(e){for(;lu!==null;){var t=lu,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=Sc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){pf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)im(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:im(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=V(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=H(a.default,a.update),a!==`none`&&Kl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,lu=r;break}lu=t.return}}function hu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Fu(e,n),r&4&&Sl(5,n);break;case 1:if(Fu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){pf(n,n.return,e)}else{var i=Sc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){pf(n,n.return,e)}}}r&64&&wl(n),r&512&&El(n,n.return);break;case 3:if(Fu(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Co(e,t)}catch(e){pf(n,n.return,e)}}break;case 27:t===null&&r&4&&zl(n);case 26:case 5:Fu(e,n),t===null&&r&4&&Nl(n),r&512&&El(n,n.return);break;case 12:Fu(e,n);break;case 31:Fu(e,n),r&4&&wu(e,n);break;case 13:Fu(e,n),r&4&&Tu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=_f.bind(null,n),um(e,n))));break;case 22:if(r=n.memoizedState!==null||au,!r){var a=t!==null&&t.memoizedState!==null||ou;t=au,i=ou,au=r,(ou=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Lu(e,n,r)):Fu(e,n),au=t,ou=i}break;case 30:Fu(e,n),r&512&&El(n,n.return);break;case 7:r&512&&El(n,n.return);default:Fu(e,n)}}function gu(e,t){for(e=e.child;e!==null;)_u(e,t),e=e.sibling}function _u(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){pf(e,e.return,t)}vu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,Gt=!0}catch(t){pf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Ep(s,!0):Ep(e.stateNode,!1)}catch(t){pf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&gu(e,t);break;default:gu(e,t)}}function vu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:_u(n,r);break a;case 22:n.memoizedState===null&&vu(n,r);break a;default:vu(n,r)}}e=e.sibling}}function yu(e){var t=e.alternate;t!==null&&(e.alternate=null,yu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&At(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var bu=null,xu=!1;function Su(e,t,n){for(n=n.child;n!==null;)Cu(e,t,n),n=n.sibling}function Cu(e,t,n){if(Xe&&typeof Xe.onCommitFiberUnmount==`function`)try{Xe.onCommitFiberUnmount(Ye,n)}catch{}switch(n.tag){case 26:ou||Dl(n,t),Su(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!ou&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ou||Dl(n,t),Al(n);var r=bu,i=xu;wp(n.type)&&(bu=n.stateNode,xu=!1),Su(e,t,n),vm(n.stateNode,n.type,n.memoizedProps),bu=r,xu=i;break;case 5:ou||Dl(n,t),Al(n);case 6:if(n.tag===6&&Al(n),r=bu,i=xu,bu=null,Su(e,t,n),bu=r,xu=i,bu!==null){if(xu)try{(bu.nodeType===9?bu.body:bu.nodeName===`HTML`?bu.ownerDocument.body:bu).removeChild(n.stateNode),Gt=!0}catch(e){pf(n,t,e)}else try{bu.removeChild(n.stateNode),Gt=!0}catch(e){pf(n,t,e)}}break;case 18:bu!==null&&(xu?(e=bu,Tp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Wh(e)):Tp(bu,n.stateNode));break;case 4:r=bu,i=xu,bu=n.stateNode.containerInfo,xu=!0,Su(e,t,n),bu=r,xu=i;break;case 0:case 11:case 14:case 15:Cl(2,n,t),ou||Cl(4,n,t),Su(e,t,n);break;case 1:ou||(Dl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Tl(n,t,r)),Su(e,t,n);break;case 21:Su(e,t,n);break;case 22:ou=(r=ou)||n.memoizedState!==null,Su(e,t,n),ou=r;break;case 30:Dl(n,t),Su(e,t,n);break;case 7:ou||Dl(n,t),Su(e,t,n);break;default:Su(e,t,n)}}function wu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Wh(e)}catch(e){pf(t,t.return,e)}}}function Tu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Wh(e)}catch(e){pf(t,t.return,e)}}function Eu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new W),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new W),t;default:throw Error(i(435,e.tag))}}function Du(e,t){var n=Eu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=vf.bind(null,e,t);t.then(r,r)}})}function Ou(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(wp(l.type)){bu=l.stateNode,xu=!1;break a}break;case 5:bu=l.stateNode,xu=!1;break a;case 3:case 4:bu=l.stateNode.containerInfo,xu=!0;break a}l=l.return}if(bu===null)throw Error(i(160));Cu(s,c,o),bu=null,xu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Au(t,e,n),t=t.sibling}var ku=null;function Au(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Ou(t,e,n),ju(e),a&4&&(Cl(3,e,e.return),Sl(3,e),Cl(5,e,e.return));break;case 1:Ou(t,e,n),ju(e),a&512&&(ou||r===null||Dl(r,r.return)),a&64&&au&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=ku,Ou(t,e,n),ju(e),a&512&&(ou||r===null||Dl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(au)e.stateNode=mp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[Ot]||r[xt]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),ip(r,t,n),r[xt]=e,Ft(r),t=r;break a;case`link`:if(o=qm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),ip(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=qm(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),ip(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[xt]=e,Ft(r),t=r}e.stateNode=t}}else au||Jm(o,e.type,e.stateNode)}else e.stateNode=Hm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Pl(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||ou||t.parentNode.removeChild(t)):a.count--,n===null?au||Jm(o,e.type,e.stateNode):Hm(o,n,e.memoizedProps))}break;case 27:Ou(t,e,n),ju(e),a&512&&(ou||r===null||Dl(r,r.return)),r!==null&&a&4&&Pl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=su,su=!1,Ou(t,e,n),su=o,ju(e),a&512&&(ou||r===null||Dl(r,r.return)),e.flags&32){t=e.stateNode;try{ln(t,``),Gt=!0}catch(t){pf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Pl(e,t,r===null?t:r.memoizedProps)),a&1024&&(cu=!0);break;case 6:if(Ou(t,e,n),ju(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Gt=!0}catch(t){pf(e,e.return,t)}}break;case 3:if(Gt=!1,Km=null,o=ku,ku=Sm(t.containerInfo),Ou(t,e,n),ku=o,ju(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Wh(t.containerInfo)}catch(t){pf(e,e.return,t)}cu&&(cu=!1,Mu(e)),Gt=!1;break;case 4:a=su,su=au,r=Kt(),o=ku,ku=Sm(e.stateNode.containerInfo),Ou(t,e,n),ju(e),ku=o,Gt&&du&&(fu=!0),Gt=r,su=a;break;case 12:Ou(t,e,n),ju(e);break;case 31:Ou(t,e,n),ju(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 13:Ou(t,e,n),ju(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(md=Be()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=au,l=ou,u=su;au=c||o,su=u||o,ou=l||s,Ou(t,e,n),ou=l,su=u,au=c,ju(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||au||ou||(t=s||ou,n=au,r=ou,au=o||au,ou=t,Iu(e,2),au=n,ou=r),!o&&su||gu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Du(e,n))));break;case 19:Ou(t,e,n),ju(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 30:a&512&&(ou||r===null||Dl(r,r.return)),a=Kt(),o=du,s=(n&335544064)===n,c=e.memoizedProps,du=s&&H(c.default,c.update)!==`none`,Ou(t,e,n),ju(e),s&&r!==null&&Gt&&(e.flags|=4),du=o,Gt=a;break;case 21:break;case 7:a&512&&(ou||r===null||Dl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Ou(t,e,n),ju(e)}}function ju(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Fl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Ml(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(jl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Rl(e,Il(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(ln(l,``),n.flags&=-33),Rl(e,Il(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Ll(e,Il(e),u,s);break;default:throw Error(i(161))}}catch(t){pf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Mu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Mu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,vh=!0,t.reset(),vh=!1),e=e.sibling}}function Nu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Pu(t,e),t=t.sibling;else iu(t,!1)}function Pu(e,t){var n=e.alternate;if(n===null)Xl(e,!1);else switch(e.tag){case 3:if(pu=uu=!1,Wl(),Nu(t,e),!uu&&!fu){if(e=Ul,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Op(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),pu=!0}Ul=null;break;case 5:Nu(t,e);break;case 4:r=uu,uu=!1,Nu(t,e),uu&&(fu=!0),uu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Nu(t,e):Xl(e,!1));break;case 30:r=uu,i=Wl(),uu=!1,Nu(t,e),uu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=V(a,o),o=V(n.memoizedProps,o);var s=H(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Gl=0,t=ru(e,n,t,o,s,a,!0),Gl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Nd(e,e.memoizedProps.onUpdate),Ul=i):i!==null&&(i.push.apply(i,Ul),Ul=i),uu=e.flags&32?!0:r;break;default:Nu(t,e)}}function Fu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)hu(e,t.alternate,t),t=t.sibling}function Iu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:Cl(4,n,n.return),Iu(n,r);break;case 1:Dl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Tl(n,n.return,i),Iu(n,r);break;case 27:r&2&&vm(n.stateNode,n.type,n.memoizedProps);case 5:Dl(n,n.return),n.tag!==5&&n.tag!==27||Al(n),Iu(n,r);break;case 6:Al(n);break;case 26:Dl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||ou||i.parentNode.removeChild(i),Iu(n,r);break;case 22:n.memoizedState===null&&Iu(n,r);break;case 30:Dl(n,n.return),Iu(n,r);break;case 7:Dl(n,n.return);default:Iu(n,r)}e=e.sibling}}function Lu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Lu(i,a,n),Sl(4,a);break;case 1:if(Lu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){pf(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)So(l[i],c)}catch(e){pf(r,r.return,e)}}s&&o&64&&wl(a),El(a,a.return);break;case 27:n&2&&zl(a);case 5:a.tag!==5&&a.tag!==27||kl(a),Lu(i,a,n),s&&r===null&&o&4&&Nl(a),El(a,a.return);break;case 6:kl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||au||Jm(Sm(c.ownerDocument),a.type,c),Lu(i,a,n),s&&r===null&&o&4&&Nl(a),El(a,a.return);break;case 12:Lu(i,a,n);break;case 31:Lu(i,a,n),s&&o&4&&wu(i,a);break;case 13:Lu(i,a,n),s&&o&4&&Tu(i,a);break;case 22:a.memoizedState===null&&Lu(i,a,n),El(a,a.return);break;case 30:Lu(i,a,n),El(a,a.return);break;case 7:El(a,a.return);default:Lu(i,a,n)}t=t.sibling}}function K(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ja(n))}function Ru(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ja(e))}function zu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)q(e,t,n,r),t=t.sibling;else i&&nu(t)}function q(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&tu(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:zu(e,t,n,r),a&2048&&Sl(9,t);break;case 1:zu(e,t,n,r);break;case 3:zu(e,t,n,r),i&&pu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&ja(a)));break;case 12:if(a&2048){zu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){pf(t,t.return,e)}}else zu(e,t,n,r);break;case 31:zu(e,t,n,r);break;case 13:zu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&tu(t),o._visibility&2?zu(e,t,n,r):(o._visibility|=2,J(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&tu(s),o._visibility&2?zu(e,t,n,r):Bu(e,t)),a&2048&&K(s,t);break;case 24:zu(e,t,n,r),a&2048&&Ru(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Jl(a.child,!0),Jl(t.child,!0))),zu(e,t,n,r);break;default:zu(e,t,n,r)}}function J(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:J(a,o,s,c,i),Sl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,J(a,o,s,c,i)):u._visibility&2?J(a,o,s,c,i):Bu(a,o),i&&l&2048&&K(o.alternate,o);break;case 24:J(a,o,s,c,i),i&&l&2048&&Ru(o.alternate,o);break;default:J(a,o,s,c,i)}t=t.sibling}}function Bu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Bu(n,r),i&2048&&K(r.alternate,r);break;case 24:Bu(n,r),i&2048&&Ru(r.alternate,r);break;default:Bu(n,r)}t=t.sibling}}var Vu=8192;function Y(e,t,n){if(e.subtreeFlags&Vu)for(e=e.child;e!==null;)Hu(e,t,n),e=e.sibling}function Hu(e,t,n){switch(e.tag){case 26:Y(e,t,n),e.flags&Vu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&$m(n,e)):eh(n,ku,e.memoizedState,e.memoizedProps));break;case 5:Y(e,t,n),e.flags&Vu&&(e=e.stateNode,(t&335544128)===t&&$m(n,e));break;case 3:case 4:var r=ku;ku=Sm(e.stateNode.containerInfo),Y(e,t,n),ku=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Vu,Vu=16777216,Y(e,t,n),Vu=r):Y(e,t,n));break;case 30:if((e.flags&Vu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Vl===null&&(Vl=new Map),Vl.set(r,i)}Y(e,t,n);break;default:Y(e,t,n)}}function Uu(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Wu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];lu=r,Ku(r,e)}Uu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Gu(e),e=e.sibling}function Gu(e){switch(e.tag){case 0:case 11:case 15:Wu(e),e.flags&2048&&Cl(9,e,e.return);break;case 3:Wu(e);break;case 12:Wu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,X(e)):Wu(e);break;default:Wu(e)}}function X(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];lu=r,Ku(r,e)}Uu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Cl(8,t,t.return),X(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,X(t));break;default:X(t)}e=e.sibling}}function Ku(e,t){for(;lu!==null;){var n=lu;switch(n.tag){case 0:case 11:case 15:Cl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ja(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,lu=r;else a:for(n=e;lu!==null;){r=lu;var i=r.sibling,a=r.return;if(yu(r),r===n){lu=null;break a}if(i!==null){i.return=a,lu=i;break a}lu=a}}}var qu={getCacheForType:function(e){var t=Ca(ka),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ca(ka).controller.signal}},Ju=typeof WeakMap==`function`?WeakMap:Map,Yu=0,Xu=null,Zu=null,Qu=0,$u=0,ed=null,td=!1,nd=!1,rd=!1,id=0,ad=0,od=0,sd=0,cd=0,ld=0,ud=0,dd=null,fd=null,pd=!1,md=0,hd=0,gd=1/0,_d=null,vd=null,yd=0,bd=null,xd=null,Sd=0,Cd=0,wd=null,Td=null,Ed=null,Dd=null,Od=null,kd=0,Ad=null;function jd(){return Yu&2&&Qu!==0?Qu&-Qu:L.T===null?vt():Pf()}function Md(){if(ld===0){if(!(Qu&536870912)||na){var e=nt;nt<<=1,!(nt&3932160)&&(nt=262144),ld=e}else ld=536870912}return e=ko.current,e!==null&&(e.flags|=32),ld}function Nd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Ip(V(e.memoizedProps,n))),Dd===null&&(Dd=[]),Dd.push(t.bind(null,r))}}function Pd(e,t,n){(e===Xu&&($u===2||$u===9)||e.cancelPendingCommit!==null)&&(Vd(e,0),Rd(e,Qu,ld,!1)),dt(e,n),Yu&2&&e===Xu||(e===Xu&&(!(Yu&2)&&(sd|=n),ad===4&&Rd(e,Qu,ld,!1)),Ef(e))}function Fd(e,t,n){if(Yu&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||ot(e,t),a=r?Z(e,t):qd(e,t,!0),o=r;do{if(a===0){nd&&!r&&Rd(e,t,0,!1);break}if(n=e.current.alternate,o&&!Ld(n))a=qd(e,t,!1),o=!1;else{if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=dd;var l=c.current.memoizedState.isDehydrated;if(l&&(Vd(c,s).flags|=256),s=qd(c,s,!1),s!==2&&s!==6){if(rd&&!l){c.errorRecoveryDisabledLanes|=o,sd|=o,a=4;break a}o=fd,fd=a,o!==null&&(fd===null?fd=o:fd.push.apply(fd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Vd(e,0),Rd(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Rd(r,t,ld,!td);break a;case 2:fd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=md+300-Be(),10<a)){if(Rd(r,t,ld,!td),at(r,0,!0)!==0)break a;Sd=t,r.timeoutHandle=vp(Id.bind(null,r,n,fd,_d,pd,t,ld,sd,ud,td,o,`Throttled`,-0,0),a);break a}Id(r,n,fd,_d,pd,t,ld,sd,ud,td,o,null,-0,0)}break}}while(1);Ef(e)}function Id(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:_n},Vl=null,Hu(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=ih.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?md-Be():(a&4194048)===a?hd-Be():0,m=nh(d,m),m!==null)?(Sd=a,e.cancelPendingCommit=m(tf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Rd(e,a,o,!l)):tf(e,t,a,n,r,i,o,s,c,l,u,d)}function Ld(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Br(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Rd(e,t,n,r){t=st(e,t),t&=~cd,t&=~sd,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Qe(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&pt(e,n,t)}function zd(){return Yu&6?!0:(Df(0,!1),!1)}function Bd(){if(Zu!==null){if($u===0)var e=Zu.return;else e=Zu,ha=ma=null,is(e),ro=null,io=0,e=Zu;for(;e!==null;)xl(e.alternate,e),e=e.return;Zu=null}}function Vd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,yp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Sd=0,Bd(),Xu=e,Zu=n=ji(e.current,null),Qu=t,$u=0,ed=null,td=!1,nd=ot(e,t),rd=!1,ud=ld=cd=sd=od=ad=0,fd=dd=null,pd=!1,id=st(e,t),xi(),n}function Hd(e,t){U=null,L.H=mc,t===qa||t===Ya?(t=to(),$u=3):t===Ja?(t=to(),$u=4):$u=t===Mc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,ed=t,Zu===null&&(ad=1,Ec(e,zi(t,e.current)))}function Ud(){var e=ko.current;return e===null?!0:(Qu&4194048)===Qu?Ao===null:(Qu&62914560)===Qu||Qu&536870912?e===Ao:!1}function Wd(){var e=L.H;return L.H=mc,e===null?mc:e}function Gd(){var e=L.A;return L.A=qu,e}function Kd(){ad=4,td||(Qu&4194048)!==Qu&&ko.current!==null||(nd=!0),!(od&134217727)&&!(sd&134217727)||Xu===null||Rd(Xu,Qu,ld,!1)}function qd(e,t,n){var r=Yu;Yu|=2;var i=Wd(),a=Gd();(Xu!==e||Qu!==t)&&(_d=null,Vd(e,t)),t=!1;var o=ad;a:do try{if($u!==0&&Zu!==null){var s=Zu,c=ed;switch($u){case 8:Bd(),o=6;break a;case 3:case 2:case 9:case 6:ko.current===null&&(t=!0);var l=$u;if($u=0,ed=null,Qd(e,s,c,l),n&&nd){o=0;break a}break;default:l=$u,$u=0,ed=null,Qd(e,s,c,l)}}Jd(),o=ad;break}catch(t){Hd(e,t)}while(1);return t&&e.shellSuspendCounter++,ha=ma=null,Yu=r,L.H=i,L.A=a,Zu===null&&(Xu=null,Qu=0,xi()),o}function Jd(){for(;Zu!==null;)Xd(Zu)}function Z(e,t){var n=Yu;Yu|=2;var r=Wd(),a=Gd();Xu!==e||Qu!==t?(_d=null,gd=Be()+500,Vd(e,t)):nd=ot(e,t);a:do try{if($u!==0&&Zu!==null){t=Zu;var o=ed;b:switch($u){case 1:$u=0,ed=null,Qd(e,t,o,1);break;case 2:case 9:if(Za(o)){$u=0,ed=null,Zd(t);break}t=function(){$u!==2&&$u!==9||Xu!==e||($u=7),Ef(e)},o.then(t,t);break a;case 3:$u=7;break a;case 4:$u=5;break a;case 7:Za(o)?($u=0,ed=null,Zd(t)):($u=0,ed=null,Qd(e,t,o,7));break;case 5:var s=null;switch(Zu.tag){case 26:s=Zu.memoizedState;case 5:case 27:var c=Zu;if(s?Zm(s):c.stateNode.complete){$u=0,ed=null;var l=c.sibling;if(l!==null)Zu=l;else{var u=c.return;u===null?Zu=null:(Zu=u,$d(u))}break b}}$u=0,ed=null,Qd(e,t,o,5);break;case 6:$u=0,ed=null,Qd(e,t,o,6);break;case 8:Bd(),ad=6;break a;default:throw Error(i(462))}}Yd();break}catch(t){Hd(e,t)}while(1);return ha=ma=null,L.H=r,L.A=a,Yu=n,Zu===null?(Xu=null,Qu=0,xi(),ad):0}function Yd(){for(;Zu!==null&&!Re();)Xd(Zu)}function Xd(e){var t=fl(e.alternate,e,id);e.memoizedProps=e.pendingProps,t===null?$d(e):Zu=t}function Zd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Kc(n,t,t.pendingProps,t.type,void 0,Qu);break;case 11:t=Kc(n,t,t.pendingProps,t.type.render,t.ref,Qu);break;case 5:is(t);var r=t;r===ea&&(na?(ca(r),r.tag===5&&r.stateNode!=null&&(ta=r.stateNode)):(ca(r),na=!0));default:xl(n,t),t=Zu=Mi(t,id),t=fl(n,t,id)}e.memoizedProps=e.pendingProps,t===null?$d(e):Zu=t}function Qd(e,t,n,r){ha=ma=null,is(t),ro=null,io=0;var i=t.return;try{if(jc(e,i,t,n,Qu)){ad=1,Ec(e,zi(n,e.current)),Zu=null;return}}catch(t){if(i!==null)throw Zu=i,t;ad=1,Ec(e,zi(n,e.current)),Zu=null;return}t.flags&32768?(na||r===1?e=!0:nd||Qu&536870912?e=!1:(td=e=!0,(r===2||r===9||r===3||r===6)&&(r=ko.current,r!==null&&r.tag===13&&(r.flags|=16384))),ef(t,e)):$d(t)}function $d(e){var t=e;do{if(t.flags&32768){ef(t,td);return}e=t.return;var n=yl(t.alternate,t,id);if(n!==null){Zu=n;return}if(t=t.sibling,t!==null){Zu=t;return}Zu=t=e}while(t!==null);ad===0&&(ad=5)}function ef(e,t){do{var n=bl(e.alternate,e);if(n!==null){n.flags&=32767,Zu=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Zu=e;return}Zu=e=n}while(e!==null);ad=6,Zu=null}function tf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do uf();while(yd!==0);if(Yu&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===Xu&&(Zu=Xu=null,Qu=0),xd=t,bd=e,Sd=n,wd=a,Td=r,nf(e,t,n,s,c,l,f)}}function nf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Cd=s,s|=bi,ft(e,n,s,r,i,a),Dd=null,(n&335544064)===n?(Od=Pa(e),r=10262):(Od=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,yf(We,function(){return df(),null})):(e.callbackNode=null,e.callbackPriority=0),Bl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=L.T,L.T=null,i=R.p,R.p=2,a=Yu,Yu|=4;try{mu(e,t,n)}finally{Yu=a,R.p=i,L.T=r}}yd=1,Bl?Ed=Pp(o,e.containerInfo,Od,of,sf,af,cf,df,rf,null,null):(of(),sf(),cf())}function rf(e){if(yd!==0){var t=bd.onRecoverableError;t(e,{componentStack:null})}}function af(){yd===3&&(yd=0,Pu(xd,bd),yd=4)}function of(){if(yd===1){yd=0;var e=bd,t=xd,n=Sd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=L.T,L.T=null;var i=R.p;R.p=2;var a=Yu;Yu|=4;try{du=fu=!1,Au(t,e,n),n=up;var o=Kr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Gr(s.ownerDocument.documentElement,s)){if(c!==null&&qr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Wr(s,h),v=Wr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}vh=!!lp,up=lp=null}finally{Yu=a,R.p=i,L.T=r}}e.current=t,yd=2}}function sf(){if(yd===2){yd=0;var e=bd,t=xd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=L.T,L.T=null;var r=R.p;R.p=2;var i=Yu;Yu|=4;try{hu(e,t.alternate,t)}finally{Yu=i,R.p=r,L.T=n}}yd=3}}function cf(){if(yd===4||yd===3){yd=0;var e=Ed;Ed=null,ze();var t=bd,n=xd,r=Sd,i=Td,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?yd=5:(yd=0,xd=bd=null,lf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(vd=null),_t(r),n=n.stateNode,Xe&&typeof Xe.onCommitFiberRoot==`function`)try{Xe.onCommitFiberRoot(Ye,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=L.T,a=R.p,R.p=2,L.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{L.T=n,R.p=a}}if(i=Dd,o=Od,Od=null,i!==null&&(Dd=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);Sd&3&&uf(),Ef(t),a=t.pendingLanes,r&261930&&a&42?t===Ad?kd++:(kd=0,Ad=t):(kd=0,Ad=null),Df(0,!1)}}function lf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ja(t)))}function uf(){return Ed!==null&&(Ed.skipTransition(),Ed=null),of(),sf(),cf(),df()}function df(){if(yd!==5)return!1;var e=bd,t=Cd;Cd=0;var n=_t(Sd),r=L.T,a=R.p;try{R.p=32>n?32:n,L.T=null,n=wd,wd=null;var o=bd,s=Sd;if(yd=0,xd=bd=null,Sd=0,Yu&6)throw Error(i(331));var c=Yu;if(Yu|=4,Gu(o.current),q(o,o.current,s,n),Yu=c,Df(0,!1),Xe&&typeof Xe.onPostCommitFiberRoot==`function`)try{Xe.onPostCommitFiberRoot(Ye,o)}catch{}return!0}finally{R.p=a,L.T=r,lf(e,t)}}function ff(e,t,n){t=zi(n,t),t=Oc(e.stateNode,t,2),e=go(e,t,2),e!==null&&(dt(e,2),Ef(e))}function pf(e,t,n){if(e.tag===3)ff(e,e,n);else for(;t!==null;){if(t.tag===3){ff(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(vd===null||!vd.has(r))){e=zi(n,e),n=kc(2),r=go(t,n,2),r!==null&&(Ac(n,r,t,e),dt(r,2),Ef(r));break}}t=t.return}}function mf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ju;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(rd=!0,i.add(n),e=hf.bind(null,e,t,n),t.then(e,e))}function hf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Xu===e&&(Qu&n)===n&&(ad===4||ad===3&&(Qu&62914560)===Qu&&300>Be()-md?Yu&2?cd|=n:Vd(e,0):cd|=n,ud===Qu&&(ud=0)),Ef(e)}function gf(e,t){t===0&&(t=lt()),e=wi(e,t),e!==null&&(dt(e,t),Ef(e))}function _f(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),gf(e,n)}function vf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),gf(e,n)}function yf(e,t){return Ie(e,t)}var bf=null,xf=null,Sf=!1,Cf=!1,wf=!1,Tf=0;function Ef(e){e!==xf&&e.next===null&&(xf===null?bf=xf=e:xf=xf.next=e),Cf=!0,Sf||(Sf=!0,Nf())}function Df(e,t){if(!wf&&Cf){wf=!0;do for(var n=!1,r=bf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Qe(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Mf(r,a))}else a=Qu,a=at(r,r===Xu?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ot(r,a)||(n=!0,Mf(r,a))}r=r.next}while(n);wf=!1}}function Of(){kf()}function kf(){Cf=Sf=!1;var e=0;Tf!==0&&_p()&&(e=Tf);for(var t=Be(),n=null,r=bf;r!==null;){var i=r.next,a=Af(r,t);a===0?(r.next=null,n===null?bf=i:n.next=i,i===null&&(xf=n)):(n=r,(e!==0||a&3)&&(Cf=!0)),r=i}yd!==0&&yd!==5||Df(e,!1),Tf!==0&&(Tf=0)}function Af(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Qe(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=ct(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Xu,n=Qu,n=at(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&($u===2||$u===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Le(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ot(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Le(r),_t(n)){case 2:case 8:n=Ue;break;case 32:n=We;break;case 268435456:n=Ke;break;default:n=We}return r=jf.bind(null,e),n=Ie(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Le(r),e.callbackPriority=2,e.callbackNode=null,2}function jf(e,t){if(yd!==0&&yd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(uf()&&e.callbackNode!==n)return null;var r=Qu;return r=at(e,e===Xu?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Fd(e,r,t),Af(e,Be()),e.callbackNode!=null&&e.callbackNode===n?jf.bind(null,e):null)}function Mf(e,t){if(uf())return null;Fd(e,t,!0)}function Nf(){Sp(function(){Yu&6?Ie(He,Of):kf()})}function Pf(){if(Tf===0){var e=La;e===0&&(e=z,z<<=1,!(z&261888)&&(z=256)),Tf=e}return Tf}function Ff(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:gn(e)}function If(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Ff((i[St]||null).action),o=r.submitter;o&&(t=(t=o[St]||null)?Ff(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Rn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Tf!==0){var e=new FormData(i,o);ec(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),ec(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Lf=0;Lf<pi.length;Lf++){var Rf=pi[Lf];mi(Rf.toLowerCase(),`on`+(Rf[0].toUpperCase()+Rf.slice(1)))}mi(ai,`onAnimationEnd`),mi(oi,`onAnimationIteration`),mi(si,`onAnimationStart`),mi(`dblclick`,`onDoubleClick`),mi(`focusin`,`onFocus`),mi(`focusout`,`onBlur`),mi(ci,`onTransitionRun`),mi(li,`onTransitionStart`),mi(ui,`onTransitionCancel`),mi(di,`onTransitionEnd`),Bt(`onMouseEnter`,[`mouseout`,`mouseover`]),Bt(`onMouseLeave`,[`mouseout`,`mouseover`]),Bt(`onPointerEnter`,[`pointerout`,`pointerover`]),Bt(`onPointerLeave`,[`pointerout`,`pointerover`]),zt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),zt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),zt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),zt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),zt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),zt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var zf=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Bf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(zf));function Vf(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){_i(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){_i(e)}i.currentTarget=null,a=c}}}}function Hf(e,t){var n=t[wt];n===void 0&&(n=t[wt]=new Set);var r=e+`__bubble`;n.has(r)||(Kf(t,e,2,!1),n.add(r))}function Uf(e,t,n){var r=0;t&&(r|=4),Kf(n,e,r,t)}var Wf=`_reactListening`+Math.random().toString(36).slice(2);function Gf(e){if(!e[Wf]){e[Wf]=!0,Lt.forEach(function(t){t!==`selectionchange`&&(Bf.has(t)||Uf(t,!1,e),Uf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Wf]||(t[Wf]=!0,Uf(`selectionchange`,!1,t))}}function Kf(e,t,n,r){switch(Th(t)){case 2:var i=yh;break;case 8:i=bh;break;default:i=xh}n=i.bind(null,t,n,e),i=void 0,!Dn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function qf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=jt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}wn(function(){var r=a,i=yn(n),s=[];a:{var c=fi.get(e);if(c!==void 0){var l=Rn,u=e;switch(e){case`keypress`:if(Nn(n)===0)break a;case`keydown`:case`keyup`:l=nr;break;case`focusin`:u=`focus`,l=qn;break;case`focusout`:u=`blur`,l=qn;break;case`beforeblur`:case`afterblur`:l=qn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Gn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Kn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=ar;break;case ai:case oi:case si:l=Jn;break;case di:l=or;break;case`scroll`:case`scrollend`:l=Bn;break;case`wheel`:l=sr;break;case`copy`:case`cut`:case`paste`:l=Yn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=rr;break;case`submit`:l=ir;break;case`toggle`:case`beforetoggle`:l=cr}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=Tn(m,p),g!=null&&d.push(Jf(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==vn&&(u=n.relatedTarget||n.fromElement)&&(jt(u)||u[Ct]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?jt(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Gn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=rr,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Nt(c),h=l==null?u:Nt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,jt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?E(c,l,Xf):null,c!==null&&Zf(s,u,c,d,!1),l!==null&&f!==null&&Zf(s,f,l,d,!0)))}a:{if(c=r?Nt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Or;else if(Sr(c)){if(kr)_=Rr;else{_=Ir;var v=Fr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&pn(r.elementType)&&(_=Or):_=Lr;if(_&&=_(e,r)){Cr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Nt(r):window,e){case`focusin`:(Sr(v)||v.contentEditable===`true`)&&(Yr=v,Xr=r,Zr=null);break;case`focusout`:Zr=Xr=Yr=null;break;case`mousedown`:Qr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Qr=!1,$r(s,n,i);break;case`selectionchange`:if(Jr)break;case`keydown`:case`keyup`:$r(s,n,i)}var y;if(ur)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else vr?gr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(pr&&n.locale!==`ko`&&(vr||b!==`onCompositionStart`?b===`onCompositionEnd`&&vr&&(y=Mn()):(kn=i,An=`value`in kn?kn.value:kn.textContent,vr=!0)),v=Yf(r,b),0<v.length&&(b=new Xn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=_r(n),y!==null&&(b.data=y)))),(y=fr?yr(e,n):br(e,n))&&(b=Yf(r,`onBeforeInput`),0<b.length&&(v=new Xn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),If(s,e,r,n,i)}Vf(s,t)})}function Jf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Yf(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=Tn(e,n),i!=null&&r.unshift(Jf(e,i,a)),i=Tn(e,t),i!=null&&r.push(Jf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Xf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Zf(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=Tn(n,a),l!=null&&o.unshift(Jf(n,l,c))):i||(l=Tn(n,a),l!=null&&o.push(Jf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Qf=/\r\n?/g,$f=/\u0000|\uFFFD/g;function ep(e){return(typeof e==`string`?e:``+e).replace(Qf,`
|
|
9
|
-
`).replace($f,``)}function tp(e,t){return t=ep(t),ep(e)===t}function np(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||ln(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&ln(e,``+r);else return;break;case`className`:Jt(e,`class`,r);break;case`tabIndex`:Jt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Jt(e,n,r);break;case`style`:fn(e,r,o);return;case`data`:if(t!==`object`){Jt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=gn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&np(e,t,`name`,a.name,a,null),np(e,t,`formEncType`,a.formEncType,a,null),np(e,t,`formMethod`,a.formMethod,a,null),np(e,t,`formTarget`,a.formTarget,a,null)):(np(e,t,`encType`,a.encType,a,null),np(e,t,`method`,a.method,a,null),np(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=gn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=_n);return;case`onScroll`:r!=null&&Hf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Hf(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=gn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Hf(`beforetoggle`,e),Hf(`toggle`,e),qt(e,`popover`,r);break;case`xlinkActuate`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:qt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=mn.get(n)||n,qt(e,n,r);else return}Gt=!0}function rp(e,t,n,r,a,o){switch(n){case`style`:fn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)ln(e,r);else if(typeof r==`number`||typeof r==`bigint`)ln(e,``+r);else return;break;case`onScroll`:r!=null&&Hf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Hf(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=_n);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Rt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[St]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}Gt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):qt(e,n,r)}return}Gt=!0}function ip(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Hf(`error`,e),Hf(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:np(e,t,o,s,n,null)}}a&&np(e,t,`srcSet`,n.srcSet,n,null),r&&np(e,t,`src`,n.src,n,null);return;case`input`:Hf(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:np(e,t,r,d,n,null)}}rn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Hf(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:np(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&on(e,!!r,n,!0):on(e,!!r,t,!1);return;case`textarea`:for(s in Hf(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:np(e,t,s,c,n,null)}cn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:np(e,t,l,r,n,null)}return;case`dialog`:Hf(`beforetoggle`,e),Hf(`toggle`,e),Hf(`cancel`,e),Hf(`close`,e);break;case`iframe`:case`object`:Hf(`load`,e);break;case`video`:case`audio`:for(r=0;r<zf.length;r++)Hf(zf[r],e);break;case`image`:Hf(`error`,e),Hf(`load`,e);break;case`details`:Hf(`toggle`,e);break;case`embed`:case`source`:case`link`:Hf(`error`,e),Hf(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:np(e,t,u,r,n,null)}return;default:if(pn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&rp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&np(e,t,c,r,n,null))}var ap={};function op(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||np(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(Gt=!0),o=m;break;case`name`:m!==f&&(Gt=!0),a=m;break;case`checked`:m!==f&&(Gt=!0),u=m;break;case`defaultChecked`:m!==f&&(Gt=!0),d=m;break;case`value`:m!==f&&(Gt=!0),s=m;break;case`defaultValue`:m!==f&&(Gt=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&np(e,t,p,m,r,f)}}B(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||np(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(Gt=!0),p=o;break;case`defaultValue`:o!==l&&(Gt=!0),c=o;break;case`multiple`:o!==l&&(Gt=!0),s=o;default:o!==l&&np(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?on(e,!!n,n?[]:``,!1):on(e,!!n,t,!0)):on(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:np(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(Gt=!0),p=a;break;case`defaultValue`:a!==o&&(Gt=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&np(e,t,s,a,r,o)}sn(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:np(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(Gt=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:np(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&np(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:np(e,t,u,p,r,m)}return;default:if(pn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&rp(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||rp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&np(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||np(e,t,f,p,r,m)}function sp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function cp(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&sp(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&sp(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var lp=null,up=null;function dp(e){return e.nodeType===9?e:e.ownerDocument}function fp(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function pp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function mp(e,t,n,r){return n=dp(n).createElement(e),n[xt]=r,n[St]=t,ip(n,e,t),Ft(n),n}function hp(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var gp=null;function _p(){var e=window.event;return e&&e.type===`popstate`?e!==gp&&(gp=e,!0):(gp=null,!1)}var vp=typeof setTimeout==`function`?setTimeout:void 0,yp=typeof clearTimeout==`function`?clearTimeout:void 0,bp=typeof Promise==`function`?Promise:void 0,xp=typeof requestAnimationFrame==`function`?requestAnimationFrame:vp,Sp=typeof queueMicrotask==`function`?queueMicrotask:bp===void 0?vp:function(e){return bp.resolve(null).then(e).catch(Cp)};function Cp(e){setTimeout(function(){throw e})}function wp(e){return e===`head`}function Tp(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Wh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)ym(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,ym(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Ot]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&ym(e.ownerDocument.body)}n=i}while(n);Wh(t)}function Ep(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Dp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Op(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function kp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Ap(e){return kp(e.getBoundingClientRect(),getComputedStyle(e),e)}function jp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return kp(t,n,e)}function Mp(e){return e.documentElement.clientHeight}function Np(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Pp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Mp(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=Qm(f),u>th){s.length=o;break}f=new Promise(Np.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Fp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Fp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Fp.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Fp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Ip(e){return{name:e,group:new Fp(`group`,e),imagePair:new Fp(`image-pair`,e),old:new Fp(`old`,e),new:new Fp(`new`,e)}}function Lp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Lp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Hp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Bp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),p(this._fragmentFiber.child,!1,Rp,e,s,r)}this._eventListeners=a}};function Rp(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Lp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Hp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Bp(i.optionsOrUseCapture),p(this._fragmentFiber.child,!1,zp,e,n,i),r.splice(t,1),a!==null&&a()}};function zp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function Bp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Vp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Hp(e,t,n,r){if(e.length===0)return-1;r=Vp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Vp(a.optionsOrUseCapture)===r)return i}return-1}Lp.prototype.dispatchEvent=function(e){var t=h(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Bp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Bp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Lp.prototype.focus=function(e){p(this._fragmentFiber.child,!0,Up,e,void 0,void 0)};function Up(e,t){return e.tag!==6&&(e=b(e),hm(e,t))}Lp.prototype.focusLast=function(e){var t=[];p(this._fragmentFiber.child,!0,Wp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Up(t[n],e);n--);};function Wp(e,t){return t.push(e),!1}Lp.prototype.blur=function(){var e=h(this._fragmentFiber);e!==null&&(e=b(e),e=dp(e).activeElement,e!==null&&p(this._fragmentFiber.child,!1,Gp,e,void 0,void 0))};function Gp(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Lp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),p(this._fragmentFiber.child,!1,Kp,e,void 0,void 0)};function Kp(e,t){return e.tag===6||(e=b(e),t.observe(e)),!1}Lp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),p(this._fragmentFiber.child,!1,qp,e,void 0,void 0);for(var n=t=0;n<Jp.length;n++){var r=Jp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Jp[t++]=r}Jp.length=t}};function qp(e,t){return e.tag===6||(e=b(e),t.unobserve(e)),!1}var Jp=[],Yp=!1;function Xp(e,t,n){Jp.push({fragmentInstance:e,observer:t,instance:n}),Yp||(Yp=!0,gm(function(){Yp=!1;var e=Jp;Jp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Lp.prototype.getClientRects=function(){var e=[];return p(this._fragmentFiber.child,!1,Zp,e,void 0,void 0),e};function Zp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Lp.prototype.getRootNode=function(e){var t=h(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Lp.prototype.compareDocumentPosition=function(e){var t=h(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];p(this._fragmentFiber.child,!1,Wp,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Qp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Qp(e,t,n,r,i){var a=jt(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=h(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=E(n,a,T),t===null?t=!1:(p(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(p(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function $p(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Lp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];p(this._fragmentFiber.child,!1,Wp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||h(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),$p(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=b(a),$p(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function em(e,t){return e=b(e),tm(e,t),!1}function tm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function nm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Bp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Jp.length;i++){var a=Jp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Jp[r++]=a)}Jp.length=r,n.observe(e)}),tm(e,t))}function rm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Bp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Xp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function im(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:im(n),At(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function am(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[Ot])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=dm(e.nextSibling),e===null)break}return null}function om(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=dm(e.nextSibling),e===null))return null;return e}function sm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=dm(e.nextSibling),e===null))return null;return e}function cm(e){return e.data===`$?`||e.data===`$~`}function lm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function um(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function dm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var fm=null;function pm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return dm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function mm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function hm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function gm(e){xp(function(){xp(function(t){return e(t)})})}function _m(e,t,n){switch(t=dp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function vm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&np(e,t,r,null,ap,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===_n&&(e.onclick=null),At(e)}function ym(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);At(e)}var bm=new Map,xm=new Set;function Sm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Cm=R.d;R.d={f:wm,r:Tm,D:Om,C:km,L:Am,m:jm,X:Nm,S:Mm,M:Pm};function wm(){var e=Cm.f(),t=zd();return e||t}function Tm(e){var t=Mt(e);t!==null&&t.tag===5&&t.type===`form`?nc(t):Cm.r(e)}var Em=typeof document>`u`?null:document;function Dm(e,t,n){var r=Em;if(r&&typeof t==`string`&&t){var i=nn(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),xm.has(i)||(xm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),ip(t,`link`,e),Ft(t),r.head.appendChild(t)))}}function Om(e){Cm.D(e),Dm(`dns-prefetch`,e,null)}function km(e,t){Cm.C(e,t),Dm(`preconnect`,e,t)}function Am(e,t,n){Cm.L(e,t,n);var r=Em;if(r&&e&&t){var i=`link[rel="preload"][as="`+nn(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+nn(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+nn(n.imageSizes)+`"]`)):i+=`[href="`+nn(e)+`"]`;var a=i;switch(t){case`style`:a=Im(e);break;case`script`:a=Bm(e)}if(!(bm.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),bm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Lm(a))||t===`script`&&r.querySelector(Vm(a))))){var o=r.createElement(`link`);ip(o,`link`,e),t===`style`&&(o[kt]=!0,o.onload=o.onerror=function(){It(o)}),Ft(o),r.head.appendChild(o)}}}function jm(e,t){Cm.m(e,t);var n=Em;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+nn(r)+`"][href="`+nn(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Bm(e)}if(!bm.has(a)&&(e=D({rel:`modulepreload`,href:e},t),bm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Vm(a)))return}r=n.createElement(`link`),ip(r,`link`,e),Ft(r),n.head.appendChild(r)}}}function Mm(e,t,n){Cm.S(e,t,n);var r=Em;if(r&&e){var i=Pt(r).hoistableStyles,a=Im(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Lm(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=bm.get(a))&&Wm(e,n);var c=o=r.createElement(`link`);Ft(c),ip(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Um(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Nm(e,t){Cm.X(e,t);var n=Em;if(n&&e){var r=Pt(n).hoistableScripts,i=Bm(e),a=r.get(i);a||(a=n.querySelector(Vm(i)),a||(e=D({src:e,async:!0},t),(t=bm.get(i))&&Gm(e,t),a=n.createElement(`script`),Ft(a),ip(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Pm(e,t){Cm.M(e,t);var n=Em;if(n&&e){var r=Pt(n).hoistableScripts,i=Bm(e),a=r.get(i);a||(a=n.querySelector(Vm(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=bm.get(i))&&Gm(e,t),a=n.createElement(`script`),Ft(a),ip(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Fm(e,t,n,r){var a=(a=Se.current)?Sm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Im(n.href),t=Pt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Im(n.href);var o=Pt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Lm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=bm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},bm.set(e,o)),zm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Bm(n),t=Pt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Im(e){return`href="`+nn(e)+`"`}function Lm(e){return`link[rel="stylesheet"][`+e+`]`}function Rm(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function zm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[kt]){r.loading=1;return}}else t=e.createElement(`link`),t[kt]=!0,t.onload=t.onerror=It.bind(null,t),ip(t,`link`,n),Ft(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Bm(e){return`[src="`+nn(e)+`"]`}function Vm(e){return`script[async]`+e}function Hm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+nn(n.href)+`"]`);if(r)return t.instance=r,Ft(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Ft(r),ip(r,`style`,a),Um(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Im(n.href);var o=e.querySelector(Lm(a));if(o)return t.state.loading|=4,t.instance=o,Ft(o),o;r=Rm(n),(a=bm.get(a))&&Wm(r,a),o=(e.ownerDocument||e).createElement(`link`),Ft(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),ip(o,`link`,r),t.state.loading|=4,Um(o,n.precedence,e),t.instance=o;case`script`:return o=Bm(n.src),(a=e.querySelector(Vm(o)))?(t.instance=a,Ft(a),a):(r=n,(a=bm.get(o))&&(r=D({},n),Gm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Ft(a),ip(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Um(r,n.precedence,e));return t.instance}function Um(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Wm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Gm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Km=null;function qm(e,t,n){if(Km===null){var r=new Map,i=Km=new Map;i.set(n,r)}else i=Km,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Ot]||a[xt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Jm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Ym(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Xm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Zm(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Qm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function $m(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Qm(t),e.suspenseyImages.push(t)),e=ah.bind(e),t.decode().then(e,e))}function eh(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Im(r.href),a=t.querySelector(Lm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ih.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Ft(a);return}a=t.ownerDocument||t,r=Rm(r),(i=bm.get(i))&&Wm(r,i),a=a.createElement(`link`),Ft(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),ip(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ih.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var th=0;function nh(e,t){return e.stylesheets&&e.count===0&&sh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&sh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&th===0&&(th=62500*cp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&sh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>th?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function rh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)sh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function ih(){this.count--,rh(this)}function ah(){this.imgCount--,rh(this)}var oh=null;function sh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,oh=new Map,t.forEach(ch,e),oh=null,ih.call(e))}function ch(e,t){if(!(t.state.loading&4)){var n=oh.get(e);if(n)var r=n.get(null);else{n=new Map,oh.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=ih.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var lh={$$typeof:F,Provider:null,Consumer:null,_currentValue:me,_currentValue2:me,_threadCount:0};function uh(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ut(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ut(0),this.hiddenUpdates=ut(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function dh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new uh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ki(3,null,null,t),e.current=a,a.stateNode=e,t=Aa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},po(a),e}function fh(e){return e?(e=Di,e):Di}function ph(e,t,n,r,i,a){i=fh(i),r.context===null?r.context=i:r.pendingContext=i,r=ho(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=go(e,r,t),n!==null&&(Pd(n,e,t),_o(n,e,t))}function mh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function hh(e,t){mh(e,t),(e=e.alternate)&&mh(e,t)}function gh(e){if(e.tag===13||e.tag===31){var t=wi(e,67108864);t!==null&&Pd(t,e,67108864),hh(e,67108864)}}function _h(e){if(e.tag===13||e.tag===31){var t=jd();t=gt(t);var n=wi(e,t);n!==null&&Pd(n,e,t),hh(e,t)}}var vh=!0;function yh(e,t,n,r){var i=L.T;L.T=null;var a=R.p;try{R.p=2,xh(e,t,n,r)}finally{R.p=a,L.T=i}}function bh(e,t,n,r){var i=L.T;L.T=null;var a=R.p;try{R.p=8,xh(e,t,n,r)}finally{R.p=a,L.T=i}}function xh(e,t,n,r){if(vh){var i=Sh(r);if(i===null)qf(e,t,r,Ch,n),Ph(e,r);else if(Ih(i,e,t,n,r))r.stopPropagation();else if(Ph(e,r),t&4&&-1<Nh.indexOf(e)){for(;i!==null;){var a=Mt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=it(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Qe(o);s.entanglements[1]|=c,o&=~c}Ef(a),!(Yu&6)&&(gd=Be()+500,Df(0,!1))}}break;case 31:case 13:s=wi(a,2),s!==null&&Pd(s,a,2),zd(),hh(a,2)}if(a=Sh(r),a===null&&qf(e,t,r,Ch,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else qf(e,t,r,null,n)}}function Sh(e){return e=yn(e),wh(e)}var Ch=null;function wh(e){if(Ch=null,e=jt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ch=e,null}function Th(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Ve()){case He:return 2;case Ue:return 8;case We:case Ge:return 32;case Ke:return 268435456;default:return 32}default:return 32}}var Eh=!1,Dh=null,Oh=null,kh=null,Ah=new Map,jh=new Map,Mh=[],Nh=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Ph(e,t){switch(e){case`focusin`:case`focusout`:Dh=null;break;case`dragenter`:case`dragleave`:Oh=null;break;case`mouseover`:case`mouseout`:kh=null;break;case`pointerover`:case`pointerout`:Ah.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:jh.delete(t.pointerId)}}function Fh(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Mt(t),t!==null&&gh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ih(e,t,n,r,i){switch(t){case`focusin`:return Dh=Fh(Dh,e,t,n,r,i),!0;case`dragenter`:return Oh=Fh(Oh,e,t,n,r,i),!0;case`mouseover`:return kh=Fh(kh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Ah.set(a,Fh(Ah.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,jh.set(a,Fh(jh.get(a)||null,e,t,n,r,i)),!0}return!1}function Lh(e){var t=jt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,yt(e.priority,function(){_h(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,yt(e.priority,function(){_h(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Rh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Sh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);vn=r,n.target.dispatchEvent(r),vn=null}else return t=Mt(n),t!==null&&gh(t),e.blockedOn=n,!1;t.shift()}return!0}function zh(e,t,n){Rh(e)&&n.delete(t)}function Bh(){Eh=!1,Dh!==null&&Rh(Dh)&&(Dh=null),Oh!==null&&Rh(Oh)&&(Oh=null),kh!==null&&Rh(kh)&&(kh=null),Ah.forEach(zh),jh.forEach(zh)}function Vh(e,n){e.blockedOn===n&&(e.blockedOn=null,Eh||(Eh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Bh)))}var Hh=null;function Uh(e){Hh!==e&&(Hh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Hh===e&&(Hh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(wh(r||n)===null)continue;break}var a=Mt(n);a!==null&&(e.splice(t,3),t-=3,ec(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Wh(e){function t(t){return Vh(t,e)}Dh!==null&&Vh(Dh,e),Oh!==null&&Vh(Oh,e),kh!==null&&Vh(kh,e),Ah.forEach(t),jh.forEach(t);for(var n=0;n<Mh.length;n++){var r=Mh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Mh.length&&(n=Mh[0],n.blockedOn===null);)Lh(n),n.blockedOn===null&&Mh.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[St]||null;if(typeof a==`function`)o||Uh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[St]||null)s=o.formAction;else if(wh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Uh(n)}}}function Gh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Kh(e){this._internalRoot=e}qh.prototype.render=Kh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;ph(n,jd(),e,t,null,null)},qh.prototype.unmount=Kh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ph(e.current,2,null,e,null,null),zd(),t[Ct]=null}};function qh(e){this._internalRoot=e}qh.prototype.unstable_scheduleHydration=function(e){if(e){var t=vt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Mh.length&&t!==0&&t<Mh[n].priority;n++);Mh.splice(n,0,e),n===0&&Lh(e)}};var Jh=n.version;if(Jh!==`19.3.1`)throw Error(i(527,Jh,`19.3.1`));R.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Yh={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:L,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Xh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xh.isDisabled&&Xh.supportsFiber)try{Ye=Xh.inject(Yh),Xe=Xh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Cc,s=wc,c=Tc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=dh(e,1,!1,null,null,n,r,null,o,s,c,Gh),e[Ct]=t.current,Gf(e),new Kh(t)},e.hydrateRoot=function(e,t,n){if(!a(e))throw Error(i(299));var r=!1,o=``,s=Cc,c=wc,l=Tc,u=null;return n!=null&&(!0===n.unstable_strictMode&&(r=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(c=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.formState!==void 0&&(u=n.formState)),t=dh(e,1,!0,t,n??null,r,o,u,s,c,l,Gh),t.context=fh(null),n=t.current,r=jd(),r=gt(r),o=ho(r),o.callback=null,go(n,o,r),n=r,t.current.lanes=n,dt(t,n),Ef(t),e[Ct]=t.current,Gf(e),new qh(t)}})),v=s(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=_()})),y=m(),b=v(),x=e=>e.attrs?.bind??`@${e.id}`,S=1e6,C=1e4,w=1e5,T=1e4,E=1e5,D=2e3,O=2e4,k=2e6,A=1e3,j=2e3,M=1e4;function N(e){if(e.length>254||/\s/.test(e))return!1;let t=e.indexOf(`@`);if(t<1||t!==e.lastIndexOf(`@`))return!1;let n=e.lastIndexOf(`.`);return n>t+1&&n<e.length-1}var P=class extends Error{code;constructor(e,t){super(t),this.name=`LocalFunctionError`,this.code=e}},F=[`en-US`,`zh-CN`,`de-DE`,`fr-FR`,`ja-JP`],ee=new Set(F),I=/^[A-Z]{3}$/,te=20;function ne(e){throw new P(`expression-domain`,e)}function re(e,t){if(e.length>1e5)throw new P(`expression-budget`,`${t} exceeds the ${w}-character limit.`);return e}function ie(e){return ee.has(e)||ne(`Unsupported locale "${e}"; expected one of ${F.join(`, `)}.`),e}function ae(e,t){return(!Number.isInteger(e)||e<0||e>te)&&ne(`${t} digits must be an integer from 0 to ${te}.`),e}function oe(e){if(!Number.isFinite(e))throw new P(`expression-number`,`Value must be a finite number.`);return e}function se(e){return e===0?0:e}function ce(e,t){let n=oe(e);return n===0||Math.abs(n)<.5*10**-t?0:n}function le(e,t){let n=oe(e);return n===0||Math.abs(n)<.5*10**-(t+2)?0:n}function ue(e,t,n,r,i){let a;try{a=new Intl.NumberFormat(e,t)}catch{a=void 0}return a===void 0&&ne(i),re(a.format(n),r)}function de(e,t=2,n=`en-US`,r=!0){let i=ie(n),a=ae(t,`formatNumber`);return typeof r!=`boolean`&&ne(`formatNumber grouping must be a boolean.`),e===null?``:ue(i,{useGrouping:r,minimumFractionDigits:a,maximumFractionDigits:a,roundingMode:`halfExpand`},ce(e,a),`Formatted number`,`Cannot format a number for locale "${i}".`)}function fe(e,t=0,n=`en-US`){let r=ie(n),i=ae(t,`formatPercent`);return e===null?``:ue(r,{style:`percent`,minimumFractionDigits:i,maximumFractionDigits:i,roundingMode:`halfExpand`},le(e,i),`Formatted percentage`,`Cannot format a percentage for locale "${r}".`)}function pe(e,t=2,n=`en-US`){let r=ie(n),i=ae(t,`formatScientific`);return e===null?``:ue(r,{notation:`scientific`,minimumFractionDigits:i,maximumFractionDigits:i,roundingMode:`halfExpand`},se(oe(e)),`Formatted number`,`Cannot format a number for locale "${r}".`)}function L(e,t=`USD`,n=2,r=`en-US`){let i=ie(r);I.test(t)||ne(`Currency "${t}" must be a three-letter uppercase code such as "USD".`);let a=ae(n,`formatCurrency`);return e===null?``:ue(i,{style:`currency`,currency:t,minimumFractionDigits:a,maximumFractionDigits:a,roundingMode:`halfExpand`},ce(e,a),`Formatted currency`,`Currency code "${t}" is not accepted by Intl.`)}function R(){throw new P(`expression-number`,`The result is not a finite number.`)}function me(e){if(!Number.isFinite(e))throw new P(`expression-value`,`Numeric array members must be finite numbers.`);return e}function he(e){let t=0;for(let n of e)t+=me(n);return Number.isFinite(t)||R(),t}function ge(e){if(e.length===0)return null;let t=he(e)/e.length;return Number.isFinite(t)||R(),t}function _e(e){if(e.length===0)return null;let t=me(e[0]);for(let n=1;n<e.length;n+=1){let r=me(e[n]);r<t&&(t=r)}return t}function ve(e){if(e.length===0)return null;let t=me(e[0]);for(let n=1;n<e.length;n+=1){let r=me(e[n]);r>t&&(t=r)}return t}function ye(e){let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!t)return null;let n=Number(t[1]),r=Number(t[2]),i=Number(t[3]);if(n<1||r<1||r>12||i<1||i>31)return null;let a=new Date(0);return a.setUTCFullYear(n,r-1,i),a.getUTCFullYear()===n&&a.getUTCMonth()===r-1&&a.getUTCDate()===i?a.getTime():null}function be(e){throw new P(`expression-domain`,e)}function xe(e){return re(e.trim(),`trim result`)}function Se(e){return re(e.toLowerCase(),`lower result`)}function Ce(e){return re(e.toUpperCase(),`upper result`)}function we(e,t){return e.startsWith(t)}function Te(e,t){return e.endsWith(t)}function Ee(e,t,n){t.length===0&&be(`replace search text must not be empty.`);let r=n.length-t.length;if(r>0){let n=0,i=0;for(;;){let r=e.indexOf(t,i);if(r<0)break;n+=1,i=r+t.length}if(e.length+n*r>1e5)throw new P(`expression-budget`,`replace result would exceed the ${w}-character limit.`)}let i=``,a=0;for(;;){let r=e.indexOf(t,a);if(r<0)break;i+=e.slice(a,r),i+=n,a=r+t.length}return i+=e.slice(a),re(i,`replace result`)}function De(e,t){return e<0?Math.max(t+e,0):Math.min(e,t)}function Oe(e,t,n){Number.isInteger(t)||be(`slice start must be an integer.`),n!==void 0&&!Number.isInteger(n)&&be(`slice end must be an integer.`);let r=Array.from(e),i=r.length,a=De(t,i),o=n===void 0?i:De(n,i);return o<=a?``:re(r.slice(a,o).join(``),`slice result`)}var ke=new Map([[`days`,864e5],[`hours`,36e5],[`minutes`,6e4],[`seconds`,1e3],[`milliseconds`,1]]),Ae=`days, hours, minutes, seconds or milliseconds`;function je(e){let t=ye(e);if(t===null)throw new P(`expression-domain`,`Date "${e}" must be a valid YYYY-MM-DD calendar date in years 0001-9999.`);return t}function Me(e,t){let n=je(e),r=je(t);return n===r?0:n<r?-1:1}function Ne(e,t,n=`days`){let r=ke.get(n);return r===void 0&&be(`dateDiff unit must be ${Ae}.`),(je(e)-je(t))/r}var Pe=16,Fe=256,Ie=2e3;function Le(e){if(typeof e==`string`)return e.length>Fe?`${e.slice(0,255)}…`:e;if(typeof e==`number`)return Number.isFinite(e)?e:String(e);if(typeof e==`boolean`||e===null)return e;if(e===void 0)return``;try{let t=JSON.stringify(e)??String(e);return t.length>Fe?`${t.slice(0,255)}…`:t}catch{return String(e).slice(0,Fe)}}function Re(e){let t=Object.entries(e);if(t.length===0)return;let n={},r=0,i=0;for(let[e,a]of t){if(i>=Pe)break;if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(e))continue;let t;try{t=Le(a)}catch{t=``}let o=typeof t==`string`?t.length:String(t).length;if(r+o>Ie)break;n[e]=t,r+=o,i+=1}return i>0?n:void 0}function ze(e,t){let n=t?Re(t):void 0;return n?{key:e,params:n}:{key:e}}var Be={"local.version.unsupported":{en:`This reader accepts {supported}; migrate {declared} or use a compatible reader.`,zh:`此阅读器支持 {supported};请迁移 {declared} 或使用兼容的阅读器。`},"local.version.malformed":{en:`Use <!-- reactive-md: local-draft-2 --> on one line.`,zh:`请在单独一行使用 <!-- reactive-md: local-draft-2 -->。`},"local.version.duplicate":{en:`Only one source syntax declaration is allowed.`,zh:`源码只能声明一次语法版本。`},"local.version.placement":{en:`The syntax declaration must be on its own line before the theme and document body.`,zh:`语法版本声明必须独占一行,位于主题声明和正文之前。`},"local.upgrade.from-version":{en:`Cannot migrate from {from}: {detail}.`,zh:`无法从 {from} 迁移:{detail}。`},"local.upgrade.reserved-binding":{en:`Binding {name} becomes reserved in local-draft-2; rename it with a compatible old editor before migration.`,zh:`绑定 {name} 在 local-draft-2 中成为保留名;迁移前请用兼容旧版本的编辑器重命名。`},"local.upgrade.tag":{en:`Tag {name} was inert in local-draft-1 and becomes active in local-draft-2; preserve it as literal code before migration.`,zh:`标签 {name} 在 local-draft-1 中不执行,在 local-draft-2 中会激活;迁移前请将其保留为代码原文。`},"local.upgrade.text-length":{en:`Text length constraints change from UTF-16 units to Unicode code points; explicitly accept this semantic change before migration.`,zh:`文本长度约束从 UTF-16 单元改为 Unicode 码点计数;迁移前须明确接受这一语义变化。`},"local.upgrade.expression":{en:`This expression uses array syntax or a function introduced in local-draft-2; it is outside automatic draft-1 migration.`,zh:`此表达式使用了 local-draft-2 新增的数组语法或函数,不属于 draft-1 自动迁移范围。`},"local.upgrade.version-missing":{en:`The source has no syntax declaration; migration will pin {version}.`,zh:`源码尚未声明语法版本;迁移将固定为 {version}。`},"parse.sourceType":{en:`Document source must be a string.`,zh:`文档源必须是字符串。`},"parse.markdownFailed":{en:`Cannot parse the Markdown document.`,zh:`无法解析 Markdown 文档。`},"parse.failed":{en:`Cannot parse document: {detail}`,zh:`无法解析文档:{detail}`},"budget.document":{en:`Document exceeds the {limit}-character limit.`,zh:`文档超过 {limit} 个字符的上限。`},"budget.syntaxNodes":{en:`Syntax nodes exceed the limit of {limit}.`,zh:`语法节点数量超过上限 {limit}。`},"budget.nesting":{en:`Component nesting exceeds the {limit}-level limit.`,zh:`组件嵌套超过 {limit} 层上限。`},"options.notObject":{en:`Compile options must be an object.`,zh:`编译选项必须是对象。`},"options.limitsNotObject":{en:`Compile option limits must be an object.`,zh:`编译选项 limits 必须是对象。`},"options.maxSyntaxNodes":{en:`Compile option limits.maxSyntaxNodes must be a positive safe integer.`,zh:`编译选项 limits.maxSyntaxNodes 必须是正安全整数。`},"theme.expression":{en:`Theme names must be static text, not expressions.`,zh:`主题名称必须是静态文本,不能是表达式。`},"theme.nameRequired":{en:`A theme declaration requires a quoted name attribute.`,zh:`主题声明需要一个带引号的 name 属性。`},"theme.attributeOnly":{en:`Theme declarations only accept a quoted name attribute.`,zh:`主题声明只接受带引号的 name 属性。`},"theme.nameInvalid":{en:`Theme name "{name}" must use lowercase letters, digits and single hyphens (maximum {limit} characters).`,zh:`主题名称“{name}”只能使用小写字母、数字和单个连字符(最多 {limit} 个字符)。`},"theme.malformedMissingClose":{en:`Theme declaration is missing >.`,zh:`主题声明缺少 >。`},"theme.malformedClosing":{en:`A theme declaration cannot be a closing tag.`,zh:`主题声明不能是结束标签。`},"theme.malformedStandalone":{en:`A theme declaration must be on its own line before the document content.`,zh:`主题声明必须单独占一行并位于文档内容之前。`},"theme.duplicateDeclaration":{en:`Only one theme declaration is allowed before the document content; this declaration is ignored.`,zh:`文档内容之前只允许一个主题声明;此声明将被忽略。`},"theme.late":{en:`Theme declarations after document content are ignored.`,zh:`文档内容之后的主题声明将被忽略。`},"theme.nested":{en:`Theme declarations inside document content are ignored.`,zh:`文档内容内部的主题声明将被忽略。`},"theme.invalidDeclaration":{en:`Invalid theme declaration.`,zh:`无效的主题声明。`},"attribute.lowercase":{en:`Attribute names must use lowercase kebab-case.`,zh:`属性名必须使用小写 kebab-case。`},"budget.attributeName":{en:`Attribute name exceeds the {limit}-character limit.`,zh:`属性名超过 {limit} 个字符的上限。`},"attribute.nameInvalid":{en:`Attribute name {name} must use lowercase kebab-case.`,zh:`属性名 {name} 必须使用小写 kebab-case。`},"attribute.valueQuoted":{en:`Attribute {name} value must be quoted.`,zh:`属性 {name} 的值必须加引号。`},"attribute.valueUnclosed":{en:`Attribute {name} is missing a closing quote.`,zh:`属性 {name} 缺少结束引号。`},"attribute.duplicate":{en:`Duplicate attribute {name}.`,zh:`重复的属性 {name}。`},"attribute.separator":{en:`Attributes must be separated by whitespace.`,zh:`属性之间必须用空白分隔。`},"budget.tagName":{en:`Tag name exceeds the {limit}-character limit.`,zh:`标签名超过 {limit} 个字符的上限。`},"tag.missingClose":{en:`Tag {name} is missing >.`,zh:`标签 {name} 缺少 >。`},"tag.closingAttributes":{en:`Closing tag </{name}> cannot have attributes.`,zh:`结束标签 </{name}> 不能带属性。`},"tag.nameInvalid":{en:`Tag name {name} must use lowercase kebab-case.`,zh:`标签名 {name} 必须使用小写 kebab-case。`},"tag.unclosedPaired":{en:`<{name}> is missing </{name}>.`,zh:`<{name}> 缺少 </{name}>。`},"tag.mismatchRoot":{en:`Closing tag </{name}> does not match the document root.`,zh:`结束标签 </{name}> 与文档根不匹配。`},"tag.mismatchParent":{en:`Closing tag </{name}> does not match <{parent}>.`,zh:`结束标签 </{name}> 与 <{parent}> 不匹配。`},"tag.requiresClose":{en:`<{name}> requires a closing tag.`,zh:`<{name}> 需要结束标签。`},"footnote.unsupported":{en:`Footnotes are not part of the local interaction syntax and are shown as source.`,zh:`脚注不属于本地交互语法,将按源文本显示。`},"interpolation.unclosed":{en:`Interpolation is missing }}.`,zh:`插值缺少 }}。`},"math.unclosed":{en:`Formula is missing its closing delimiter.`,zh:`公式缺少结束定界符。`},"math.whitespace":{en:`Inline math cannot start or end with whitespace.`,zh:`行内公式不能以空白开头或结尾。`},"budget.math":{en:`Formula exceeds the {limit}-character limit.`,zh:`公式超过 {limit} 个字符的上限。`},"html.raw":{en:`Raw HTML is not part of the local interaction syntax.`,zh:`原始 HTML 不属于本地交互语法。`},"html.extended":{en:`HTML element <{name}> requires enableExtendedHtml in this mode; it is shown as source.`,zh:`此模式下 HTML 元素 <{name}> 需要启用 enableExtendedHtml;已按源码显示。`},"html.attribute":{en:`HTML attribute {name} on <{tag}> is not supported; the element is shown as source.`,zh:`<{tag}> 上的 HTML 属性 {name} 不受支持;该元素已按源码显示。`},"html.unsafeUrl":{en:`Unsafe URL in attribute {name} was removed.`,zh:`属性 {name} 中的不安全 URL 已移除。`},"html.capability":{en:`Author {feature} was disabled by the compile options.`,zh:`编译选项已禁用作者提供的{feature}。`},"options.htmlFlag":{en:`Compile option {name} must be a boolean.`,zh:`编译选项 {name} 必须是布尔值。`},"component.unknownSuggestion":{en:`Unknown component <{name}>. Did you mean <{suggestion}>?`,zh:`未知组件 <{name}>。是否想使用 <{suggestion}>?`},"component.unknownPlain":{en:`Unknown component <{name}>. This mode only accepts local interaction components.`,zh:`未知组件 <{name}>。此模式只接受本地交互组件。`},"legacy.fence":{en:`Legacy reactive-md configuration fences (state/data/computed/actions, etc.) are not part of the local interaction syntax; select legacy mode explicitly in the host.`,zh:`旧版 reactive-md 配置围栏(state/data/computed/actions 等)不属于本地交互语法;请在宿主中显式选择旧版模式。`},"attribute.unknownSuggestion":{en:`Component <{component}> does not support attribute {name}. Did you mean {suggestion}?`,zh:`组件 <{component}> 不支持属性 {name}。是否想使用 {suggestion}?`},"attribute.unknownPlain":{en:`Component <{component}> does not support attribute {name}.`,zh:`组件 <{component}> 不支持属性 {name}。`},"budget.attribute":{en:`Attribute {name} on component <{component}> exceeds the {limit}-character limit.`,zh:`组件 <{component}> 的属性 {name} 超过 {limit} 个字符的上限。`},"attribute.color":{en:`Attribute {name} on component <{component}> must be a standard CSS named color or #RGB/#RRGGBB, got "{value}".`,zh:`组件 <{component}> 的属性 {name} 必须是标准 CSS 命名颜色或 #RGB/#RRGGBB,当前为“{value}”。`},"attribute.required":{en:`Component <{component}> is missing required attribute {name}.`,zh:`组件 <{component}> 缺少必需属性 {name}。`},"label.requiredMissing":{en:`Component <{name}> requires a label.`,zh:`组件 <{name}> 需要 label。`},"label.requiredEmpty":{en:`Component <{name}> label cannot be empty.`,zh:`组件 <{name}> 的 label 不能为空。`},"attribute.static":{en:`Attribute {name} is static and cannot contain interpolations.`,zh:`属性 {name} 是静态的,不能包含插值。`},"expression.emptyAttribute":{en:`Attribute {name} interpolation cannot be empty.`,zh:`属性 {name} 的插值不能为空。`},"expression.emptyInterpolation":{en:`Interpolation expression cannot be empty.`,zh:`插值表达式不能为空。`},"attribute.numberInvalid":{en:`Attribute {name} requires a number, got "{value}".`,zh:`属性 {name} 需要数字,当前为“{value}”。`},"attribute.numberInterpolationInvalid":{en:`Attribute {name} requires a number or a full number interpolation, got "{value}".`,zh:`属性 {name} 需要数字或完整的数字插值,当前为“{value}”。`},"attribute.integer":{en:`Attribute {name} requires an integer.`,zh:`属性 {name} 需要整数。`},"attribute.positive":{en:`Attribute {name} requires a positive number.`,zh:`属性 {name} 需要正数。`},"attribute.rangeMin":{en:`Attribute {name} must be at least {min}.`,zh:`属性 {name} 必须至少为 {min}。`},"attribute.rangeMax":{en:`Attribute {name} must be at most {max}.`,zh:`属性 {name} 必须至多为 {max}。`},"attribute.booleanInvalid":{en:`Attribute {name} requires true or false.`,zh:`属性 {name} 需要 true 或 false。`},"attribute.booleanInterpolationInvalid":{en:`Attribute {name} requires true or false, or a full boolean interpolation.`,zh:`属性 {name} 需要 true 或 false,或完整的布尔插值。`},"attribute.enumInvalid":{en:`Attribute {name} must be one of {values}, got "{value}".`,zh:`属性 {name} 必须是 {values} 之一,当前为“{value}”。`},"attribute.dateLower":{en:`Date lower bound {value} is not a valid YYYY-MM-DD.`,zh:`日期下界 {value} 不是有效的 YYYY-MM-DD。`},"attribute.dateUpper":{en:`Date upper bound {value} is not a valid YYYY-MM-DD.`,zh:`日期上界 {value} 不是有效的 YYYY-MM-DD。`},"constraint.componentMinMax":{en:`Component <{name}> min cannot exceed max.`,zh:`组件 <{name}> 的 min 不能大于 max。`},"constraint.componentStep":{en:`Component <{name}> step must be greater than 0.`,zh:`组件 <{name}> 的 step 必须大于 0。`},"constraint.lengthRange":{en:`max-length cannot be less than min-length.`,zh:`max-length 不能小于 min-length。`},"constraint.dateOrder":{en:`Date min cannot be later than max.`,zh:`日期 min 不能晚于 max。`},"constraint.progressRange":{en:`progress value must be between 0 and {max}, got {value}.`,zh:`progress 的 value 必须在 0 到 {max} 之间,当前为 {value}。`},"constraint.plotRange":{en:`plot min must be less than max.`,zh:`plot 的 min 必须小于 max。`},"constraint.timerDuration":{en:`timer duration must be a positive whole number of seconds.`,zh:`timer 的 duration 必须是正整数秒。`},"constraint.rangeSliderOrder":{en:`range-slider min cannot exceed max.`,zh:`range-slider 的 min 不能大于 max。`},"constraint.rangeSliderStep":{en:`range-slider step must be a finite positive number.`,zh:`range-slider 的 step 必须是有限正数。`},"constraint.coordinateOrder":{en:`coordinate {axis}-min cannot exceed {axis}-max.`,zh:`coordinate 的 {axis}-min 不能大于 {axis}-max。`},"constraint.coordinateStep":{en:`coordinate step must be a finite positive number.`,zh:`coordinate 的 step 必须是有限正数。`},"constraint.multiSelectMax":{en:`multi-select max-selected must be a nonnegative whole number.`,zh:`multi-select 的 max-selected 必须是非负整数。`},"constraint.quizTolerance":{en:`<quiz> tolerance must be a nonnegative finite number.`,zh:`<quiz> 的 tolerance 必须是非负有限数。`},"selection.keyNeedsKey":{en:`<{component}> {name} requires a key attribute naming the selection column.`,zh:`<{component}> 的 {name} 需要 key 属性来指定选择列。`},"structure.parent":{en:`<{name}> can only appear directly inside {parents}.`,zh:`<{name}> 只能直接位于 {parents} 内。`},"structure.noBody":{en:`<{name}> does not accept body content.`,zh:`<{name}> 不接受正文内容。`},"structure.inlineOnly":{en:`<{name}> only accepts inline Markdown.`,zh:`<{name}> 只接受行内 Markdown。`},"structure.noNestedComponents":{en:`The body of <{name}> cannot contain other interactive components.`,zh:`<{name}> 的正文不能包含其他交互组件。`},"structure.accordionNeedsDisclosure":{en:`<accordion> requires at least one <disclosure>.`,zh:`<accordion> 至少需要一个 <disclosure>。`},"structure.accordionOnly":{en:`<accordion> can only contain <disclosure>.`,zh:`<accordion> 只能包含 <disclosure>。`},"structure.gridNeedsCard":{en:`<grid> requires at least one <card>.`,zh:`<grid> 至少需要一个 <card>。`},"structure.gridOnlyCard":{en:`Direct children of <grid> must be <card>.`,zh:`<grid> 的直接子元素必须是 <card>。`},"structure.exactlyOneTable":{en:`The body of <{name}> must be exactly one Markdown table.`,zh:`<{name}> 的正文必须恰好是一个 Markdown 表格。`},"structure.plotNeedsFormula":{en:`<plot> requires at least one $$...$$ formula block.`,zh:`<plot> 至少需要一个 $$...$$ 公式块。`},"structure.plotOnlyFormulas":{en:`The body of <plot> can only contain blank lines and $$...$$ formula blocks.`,zh:`<plot> 的正文只能包含空行和 $$...$$ 公式块。`},"structure.nodeNoComponents":{en:`The description of <node> cannot contain interactive components.`,zh:`<node> 的描述不能包含交互组件。`},"structure.optionsNeeded":{en:`<{name}> requires at least one <option value="...">.`,zh:`<{name}> 至少需要一个 <option value="...">。`},"structure.optionsOnly":{en:`<{name}> can only contain <option>.`,zh:`<{name}> 只能包含 <option>。`},"budget.options":{en:`<{name}> options exceed the limit of {limit}.`,zh:`<{name}> 的选项数量超过上限 {limit}。`},"option.valueRequired":{en:`<option> requires a non-empty value.`,zh:`<option> 需要非空 value。`},"option.valueComma":{en:`<multi-select> option values cannot contain commas: "{value}".`,zh:`<multi-select> 的选项值不能包含逗号:“{value}”。`},"option.valueDuplicate":{en:`Option values in <{name}> must be unique; duplicate value "{value}".`,zh:`<{name}> 的选项值必须唯一;重复值“{value}”。`},"structure.optionNoComponents":{en:`The body of <option> cannot contain interactive components.`,zh:`<option> 的正文不能包含交互组件。`},"structure.tabsNeedsTab":{en:`<tabs> requires at least one <tab>.`,zh:`<tabs> 至少需要一个 <tab>。`},"structure.tabsOnly":{en:`<tabs> can only contain <tab>.`,zh:`<tabs> 只能包含 <tab>。`},"tab.valueDuplicate":{en:`Tab values in <tabs> must be unique; duplicate value "{value}".`,zh:`<tabs> 的标签值必须唯一;重复值“{value}”。`},"structure.stepsNeedsStep":{en:`<steps> requires at least one <step>.`,zh:`<steps> 至少需要一个 <step>。`},"structure.stepsOnly":{en:`<steps> can only contain <step>.`,zh:`<steps> 只能包含 <step>。`},"step.valueDuplicate":{en:`Step values in <steps> must be unique; duplicate value "{value}".`,zh:`<steps> 的步骤值必须唯一;重复值“{value}”。`},"quiz.answerRequired":{en:`<quiz> requires a non-empty answer.`,zh:`<quiz> 需要非空 answer。`},"structure.quizNumericNoBody":{en:`A numeric <quiz> cannot have body content; use type="choice" for option-based quizzes.`,zh:`数值型 <quiz> 不能有正文内容;基于选项的测验请使用 type="choice"。`},"quiz.answerNumeric":{en:`A numeric <quiz> answer must be a finite number.`,zh:`数值型 <quiz> 的 answer 必须是有限数字。`},"quiz.answerNotOption":{en:`<quiz> answer "{answer}" is not one of the option values: {options}.`,zh:`<quiz> 的 answer“{answer}”不在选项值中:{options}。`},"diagram.needsNode":{en:`<diagram> requires at least one <node>.`,zh:`<diagram> 至少需要一个 <node>。`},"structure.diagramOnly":{en:`<diagram> can only contain <node> and <edge>.`,zh:`<diagram> 只能包含 <node> 和 <edge>。`},"diagram.nodeInvalid":{en:`Node ID "{id}" may only contain letters, digits, underscores and hyphens, and cannot start with a digit.`,zh:`节点 ID“{id}”只能包含字母、数字、下划线和连字符,且不能以数字开头。`},"diagram.nodeDuplicate":{en:`Duplicate node ID "{id}".`,zh:`重复的节点 ID“{id}”。`},"diagram.edgeFromUnknown":{en:`Edge from references unknown node "{id}".`,zh:`连线起点引用了未知节点“{id}”。`},"diagram.edgeToUnknown":{en:`Edge to references unknown node "{id}".`,zh:`连线终点引用了未知节点“{id}”。`},"diagram.edgeDuplicate":{en:`Duplicate edge: {from} → {to}{label}.`,zh:`重复的连线:{from} → {to}{label}。`},"checklist.bodySingle":{en:`The body of <checklist> must be exactly one single-level Markdown task list.`,zh:`<checklist> 的正文必须恰好是一个单层 Markdown 任务列表。`},"checklist.needsItem":{en:`<checklist> requires at least one task list item.`,zh:`<checklist> 至少需要一个任务列表项。`},"budget.checklistItems":{en:`<checklist> items exceed the limit of {limit}.`,zh:`<checklist> 的任务项数量超过上限 {limit}。`},"checklist.taskOnly":{en:`<checklist> can only contain task list items (- [ ] / - [x]).`,zh:`<checklist> 只能包含任务列表项(- [ ] / - [x])。`},"checklist.noNested":{en:`<checklist> does not support nested lists.`,zh:`<checklist> 不支持嵌套列表。`},"checklist.noComponents":{en:`<checklist> items cannot contain interactive components.`,zh:`<checklist> 的任务项不能包含交互组件。`},"budget.identifier":{en:`Parameter name exceeds the {limit}-character limit.`,zh:`参数名超过 {limit} 个字符的上限。`},"binding.nameInvalid":{en:`Parameter name "{name}" must match [A-Za-z_][A-Za-z0-9_]*.`,zh:`参数名“{name}”必须匹配 [A-Za-z_][A-Za-z0-9_]*。`},"binding.reserved":{en:`Parameter name "{name}" is reserved; choose another name.`,zh:`参数名“{name}”是保留名称;请换一个名称。`},"binding.typeConflict":{en:`Parameter "{key}" is already declared as {kind} by <{first}> and cannot also bind <{second}>.`,zh:`参数“{key}”已由 <{first}> 声明为 {kind},不能再绑定 <{second}>。`},"binding.exclusive":{en:`Parameter "{key}" of <{first}> can only be owned by one component and cannot be shared with <{second}>.`,zh:`<{first}> 的参数“{key}”只能由一个组件拥有,不能与 <{second}> 共享。`},"binding.slotExclusive":{en:`Parameter "{key}" of the {slot} slot of <{name}> is exclusive and cannot be shared with another control.`,zh:`<{name}> 的 {slot} 槽参数“{key}”是独占的,不能与另一个控件共享。`},"binding.constraintConflict":{en:`Parameter "{key}" must use the same numeric range and step: <{first}> has {firstConstraints}, <{second}> has {secondConstraints}.`,zh:`参数“{key}”必须使用相同的数值范围和步长:<{first}> 为 {firstConstraints},<{second}> 为 {secondConstraints}。`},"binding.optionConflict":{en:`Parameter "{key}" must use the same option set in the same order.`,zh:`参数“{key}”必须使用相同顺序的同一组选项。`},"initial.duplicate":{en:`Parameter "{key}" has multiple explicit initial values ({count} in total).`,zh:`参数“{key}”有多个显式初值(共 {count} 个)。`},"initial.duplicatePeers":{en:`Parameter "{key}" has multiple explicit initial values ({count} in total; see also line {lines}).`,zh:`参数“{key}”有多个显式初值(共 {count} 个;另见第 {lines} 行)。`},"initial.rangeNoStep":{en:`Parameter "{key}" has no valid step value within range [{min}, {max}].`,zh:`参数“{key}”在范围 [{min}, {max}] 内没有有效的步长值。`},"initial.cannotDerive":{en:`Cannot derive a default initial value for <{name}> parameter "{key}".`,zh:`无法为 <{name}> 的参数“{key}”推导默认初值。`},"initial.typeFiniteNumber":{en:`Initial value of parameter "{key}" must be a finite number.`,zh:`参数“{key}”的初值必须是有限数字。`},"initial.belowMin":{en:`Initial value {value} of parameter "{key}" is below the minimum {min}.`,zh:`参数“{key}”的初值 {value} 小于最小值 {min}。`},"initial.aboveMax":{en:`Initial value {value} of parameter "{key}" exceeds the maximum {max}.`,zh:`参数“{key}”的初值 {value} 超过最大值 {max}。`},"initial.offStep":{en:`Initial value {value} of parameter "{key}" is not on step {step} (based at {base}).`,zh:`参数“{key}”的初值 {value} 不在步长 {step} 上(基准 {base})。`},"initial.typeBoolean":{en:`Initial value of parameter "{key}" must be a boolean.`,zh:`参数“{key}”的初值必须是布尔值。`},"initial.notAmongOptions":{en:`Initial value "{value}" of parameter "{key}" is not among the available values {options}.`,zh:`参数“{key}”的初值“{value}”不在可用值 {options} 中。`},"initial.typeWrong":{en:`Initial value of parameter "{name}" has the wrong type.`,zh:`参数“{name}”的初值类型不正确。`},"initial.dateInvalid":{en:`Initial date "{value}" is not a valid YYYY-MM-DD.`,zh:`初值日期“{value}”不是有效的 YYYY-MM-DD。`},"initial.notAvailableOption":{en:`Initial value "{value}" is not an available option: {options}.`,zh:`初值“{value}”不是可用选项:{options}。`},"initial.multiSelectOption":{en:`Initial value "{value}" of parameter "{key}" is not an option of <multi-select>.`,zh:`参数“{key}”的初值“{value}”不是 <multi-select> 的选项。`},"initial.rangeSliderOrder":{en:`<range-slider> start {start} cannot be greater than end {end}.`,zh:`<range-slider> 的 start {start} 不能大于 end {end}。`},"initial.slotBelowMin":{en:`Initial value {value} of <{name}> {slot} is below the minimum {min}.`,zh:`<{name}> 的 {slot} 初值 {value} 小于最小值 {min}。`},"initial.slotAboveMax":{en:`Initial value {value} of <{name}> {slot} exceeds the maximum {max}.`,zh:`<{name}> 的 {slot} 初值 {value} 超过最大值 {max}。`},"initial.slotOffStep":{en:`Initial value {value} of <{name}> {slot} is not on step {step} (based at {base}).`,zh:`<{name}> 的 {slot} 初值 {value} 不在步长 {step} 上(基准 {base})。`},"initial.lengthBelow":{en:`Initial value of parameter "{key}" has length {length}, below the minimum length {min} required by <{name}>.`,zh:`参数“{key}”的初值长度为 {length},小于 <{name}> 要求的最小长度 {min}。`},"initial.lengthAbove":{en:`Initial value of parameter "{key}" has length {length}, exceeding the maximum length {max} allowed by <{name}>.`,zh:`参数“{key}”的初值长度为 {length},超过 <{name}> 允许的最大长度 {max}。`},"initial.email":{en:`Initial value of parameter "{key}" is not a valid email address.`,zh:`参数“{key}”的初值不是有效的电子邮件地址。`},"initial.dateBelow":{en:`Initial value {value} of parameter "{key}" is earlier than the minimum date {min} of <date>.`,zh:`参数“{key}”的初值 {value} 早于 <date> 的最小日期 {min}。`},"initial.dateAbove":{en:`Initial value {value} of parameter "{key}" is later than the maximum date {max} of <date>.`,zh:`参数“{key}”的初值 {value} 晚于 <date> 的最大日期 {max}。`},"initial.multiSelectExceeds":{en:`Initial values of <multi-select> exceed max-selected {max}.`,zh:`<multi-select> 的初值数量超过 max-selected {max}。`},"expression.error":{en:`Expression error: {detail}`,zh:`表达式错误:{detail}`},"binding.unknownSuggestion":{en:`Reference to undeclared parameter {name}. Did you mean {suggestion}?`,zh:`引用了未声明的参数 {name}。是否想使用 {suggestion}?`},"binding.unknownPlain":{en:`Reference to undeclared parameter {name}.`,zh:`引用了未声明的参数 {name}。`},"type.number":{en:`Expected a number here, but the expression evaluates to {kind}.`,zh:`此处需要数字,但表达式结果为 {kind}。`},"type.boolean":{en:`Expected a boolean here, but the expression evaluates to {kind}.`,zh:`此处需要布尔值,但表达式结果为 {kind}。`},"type.string":{en:`Expected a string here, but the expression evaluates to {kind}.`,zh:`此处需要字符串,但表达式结果为 {kind}。`},"type.arrayNoDisplay":{en:`Arrays cannot be displayed directly; convert them first with a function such as len.`,zh:`数组不能直接显示;请先用 len 等函数转换。`},"attribute.whenInterpolation":{en:`The when attribute of if must be a full boolean interpolation, e.g. when="{{ seats >= 5 }}".`,zh:`if 的 when 属性必须是完整的布尔插值,例如 when="{{ seats >= 5 }}"。`},"anchor.idInvalid":{en:`Anchor id "{id}" must match [A-Za-z_][A-Za-z0-9_-]*.`,zh:`锚点 id“{id}”必须匹配 [A-Za-z_][A-Za-z0-9_-]*。`},"anchor.duplicate":{en:`Duplicate anchor id "{id}".`,zh:`重复的锚点 id“{id}”。`},"anchor.headingCollision":{en:`Anchor id "{id}" collides with an automatic heading target.`,zh:`锚点 id“{id}”与自动标题目标冲突。`},"jump.empty":{en:`<jump> target cannot be empty.`,zh:`<jump> 的目标不能为空。`},"jump.badTarget":{en:`<jump> target "{target}" must be a bare heading slug or anchor id without "#" or whitespace.`,zh:`<jump> 的目标“{target}”必须是不含“#”或空白的标题 slug 或锚点 id。`},"jump.unresolved":{en:`<jump> target "{target}" does not resolve to a heading or explicit anchor in this document.`,zh:`<jump> 的目标“{target}”无法解析到本文档中的标题或显式锚点。`},"budget.plotCurves":{en:`<plot> supports at most {limit} curves, but has {count}.`,zh:`<plot> 最多支持 {limit} 条曲线,当前有 {count} 条。`},"budget.plotPoints":{en:`The document's total plot sample count exceeds the limit of {limit}.`,zh:`文档的绘图采样点总数超过上限 {limit}。`},"math.formulaShape":{en:`<plot> formulas must be written explicitly as y = expression.`,zh:`<plot> 的公式必须显式写成 y = expression。`},"math.computeFailed":{en:`Cannot compute plot formula: {detail}`,zh:`无法计算绘图公式(错误代码 {code}):{detail}`},"math.bindingUnknown":{en:`Plot formula references undeclared parameter "{name}".`,zh:`绘图公式引用了未声明的参数“{name}”。`},"math.bindingType":{en:`Plot parameter "{name}" must be a number, but is {kind}.`,zh:`绘图参数“{name}”必须是数字,但当前为 {kind}。`},"table.missingHeader":{en:`The table for <{name}> is missing a header.`,zh:`<{name}> 的表格缺少表头。`},"table.headerInterpolation":{en:`Table headers cannot contain interpolations.`,zh:`表格表头不能包含插值。`},"table.headerEmpty":{en:`Table headers cannot be empty.`,zh:`表格表头不能为空。`},"table.headerDuplicate":{en:`Duplicate table header "{name}".`,zh:`重复的表格表头“{name}”。`},"table.rowColumnMismatch":{en:`Table row has a different column count: header has {header} columns, this row has {row}.`,zh:`表格行的列数不一致:表头有 {header} 列,此行有 {row} 列。`},"chart.numericExpression":{en:`Chart column "{name}" requires a number in row {row}, but the expression evaluates to {kind}.`,zh:`图表列“{name}”第 {row} 行需要数字,但表达式结果为 {kind}。`},"timeline.numericExpression":{en:`Timeline column "{name}" requires a number in row {row}, but the expression evaluates to {kind}.`,zh:`时间线列“{name}”第 {row} 行需要数字,但表达式结果为 {kind}。`},"chart.numericPlain":{en:`Chart column "{name}" requires a plain number in row {row}, got "{value}".`,zh:`图表列“{name}”第 {row} 行需要普通数字,当前为“{value}”。`},"timeline.numericPlain":{en:`Timeline column "{name}" requires a plain number in row {row}, got "{value}".`,zh:`时间线列“{name}”第 {row} 行需要普通数字,当前为“{value}”。`},"selection.keyEmpty":{en:`<{component}> key cannot be empty.`,zh:`<{component}> 的 key 不能为空。`},"selection.keyMissingColumn":{en:`<{component}> key column "{name}" does not exist in its table.`,zh:`<{component}> 的 key 列“{name}”在表格中不存在。`},"selection.keyInterpolation":{en:`<{component}> key column "{name}" must contain static text; row {row} contains an interpolation.`,zh:`<{component}> 的 key 列“{name}”必须包含静态文本;第 {row} 行包含插值。`},"selection.keyEmptyCell":{en:`<{component}> key column "{name}" cannot be empty in row {row}.`,zh:`<{component}> 的 key 列“{name}”在第 {row} 行不能为空。`},"selection.keyDuplicate":{en:`<{component}> key column "{name}" must be unique; duplicate value "{value}".`,zh:`<{component}> 的 key 列“{name}”必须唯一;重复值“{value}”。`},"initial.selectionNotValue":{en:`Initial selection "{value}" of <{component}> is not a value of key column "{name}".`,zh:`<{component}> 的初始选择“{value}”不是 key 列“{name}”中的值。`},"chart.columnComma":{en:`Chart column names cannot contain commas: "{name}".`,zh:`图表列名不能包含逗号:“{name}”。`},"chart.xMissing":{en:`Chart x column "{name}" does not exist.`,zh:`图表 x 列“{name}”不存在。`},"chart.yRequired":{en:`Chart y requires a column name.`,zh:`图表 y 需要列名。`},"chart.yMissing":{en:`Chart y column "{name}" does not exist.`,zh:`图表 y 列“{name}”不存在。`},"chart.needsNumeric":{en:`Chart requires at least one numeric column.`,zh:`图表至少需要一个数值列。`},"chart.scatterXMissing":{en:`Scatter chart x column "{name}" does not exist.`,zh:`散点图的 x 列“{name}”不存在。`},"chart.scatterNeedsNumeric":{en:`Scatter chart requires at least one numeric column.`,zh:`散点图至少需要一个数值列。`},"chart.donutNeedsColumns":{en:`Donut chart requires a label column and a value column.`,zh:`环形图需要一个标签列和一个数值列。`},"chart.donutYOne":{en:`Donut chart y can only specify one numeric column.`,zh:`环形图的 y 只能指定一个数值列。`},"chart.donutNeedY":{en:`A donut chart with more than two columns must use y to specify the single numeric column.`,zh:`超过两列的环形图必须用 y 指定唯一的数值列。`},"chart.negative":{en:`Donut chart values cannot be negative; row {row} is {value}.`,zh:`环形图的数值不能为负;第 {row} 行为 {value}。`},"timeline.headerMissing":{en:`Timeline requires either Task, Start and Duration columns or 事项, 开始 and 时长 columns, with optional Notes or 说明.`,zh:`时间线需要 Task、Start、Duration 列,或 事项、开始、时长 列,并可选 Notes 或 说明。`},"timeline.columnUnsupported":{en:`Timeline does not support column "{name}".`,zh:`时间线不支持列“{name}”。`},"timeline.negative":{en:`Timeline column "{name}" cannot be negative in row {row}.`,zh:`时间线列“{name}”在第 {row} 行不能为负。`},"runtime.bindingNoWritable":{en:`This component has no writable binding state.`,zh:`此组件没有可写的绑定状态。`},"runtime.bindingNeedsSlot":{en:`This multi-slot component requires a slot such as start/end or x/y.`,zh:`此多槽组件需要 start/end 或 x/y 之类的槽位。`},"runtime.bindingUnknownSlot":{en:`This component has no writable slot "{slot}".`,zh:`此组件没有可写的槽位“{slot}”。`},"runtime.bindingNoMultiSlot":{en:`This component does not support multiple slots.`,zh:`此组件不支持多个槽位。`},"runtime.dateInvalid":{en:`Date must be a valid YYYY-MM-DD or an empty string.`,zh:`日期必须是有效的 YYYY-MM-DD 或空字符串。`},"runtime.dateRequired":{en:`This date is required.`,zh:`此日期为必填项。`},"runtime.dateEarlier":{en:`Date cannot be earlier than {min}.`,zh:`日期不能早于 {min}。`},"runtime.dateLater":{en:`Date cannot be later than {max}.`,zh:`日期不能晚于 {max}。`},"runtime.fieldRequired":{en:`This field is required.`,zh:`此字段为必填项。`},"runtime.minLength":{en:`At least {min} characters.`,zh:`至少 {min} 个字符。`},"runtime.maxLength":{en:`At most {max} characters.`,zh:`至多 {max} 个字符。`},"runtime.emailLength":{en:`Email address cannot exceed {limit} characters.`,zh:`电子邮件地址不能超过 {limit} 个字符。`},"runtime.emailInvalid":{en:`Enter a valid email address.`,zh:`请输入有效的电子邮件地址。`},"runtime.finiteNumber":{en:`Parameter "{name}" requires a finite number.`,zh:`参数“{name}”需要有限数字。`},"runtime.min":{en:`Parameter "{name}" must be at least {min}.`,zh:`参数“{name}”必须至少为 {min}。`},"runtime.max":{en:`Parameter "{name}" must be at most {max}.`,zh:`参数“{name}”必须至多为 {max}。`},"runtime.step":{en:`Parameter "{name}" must be a multiple of step {step} (base {base}).`,zh:`参数“{name}”必须是步长 {step} 的倍数(基准 {base})。`},"runtime.boolean":{en:`Parameter "{name}" requires a boolean.`,zh:`参数“{name}”需要布尔值。`},"runtime.string":{en:`Parameter "{name}" requires a string.`,zh:`参数“{name}”需要字符串。`},"runtime.array":{en:`Parameter "{name}" requires an array of strings.`,zh:`参数“{name}”需要字符串数组。`},"runtime.arrayMembers":{en:`Parameter "{name}" members must be strings.`,zh:`参数“{name}”的成员必须是字符串。`},"runtime.checklistOption":{en:`Checklist item "{value}" does not exist.`,zh:`清单项“{value}”不存在。`},"runtime.maxItems":{en:`Parameter "{name}" allows at most {max} selected values.`,zh:`参数“{name}”最多允许选择 {max} 个值。`},"runtime.unsupportedType":{en:`Parameter "{name}" has an unsupported value type.`,zh:`参数“{name}”的值类型不受支持。`},"runtime.option":{en:`Value "{value}" is not among the options: {options}.`,zh:`值“{value}”不在选项中:{options}。`},"runtime.budget":{en:`Parameter "{name}": {detail}`,zh:`参数“{name}”:{detail}`},"runtime.rangeOrder":{en:`The range start cannot be greater than its end.`,zh:`范围起点不能大于终点。`},"budget.string":{en:`String exceeds the {limit}-character limit.`,zh:`字符串超过 {limit} 个字符的上限。`},"budget.array":{en:`Array exceeds the {limit}-item limit.`,zh:`数组超过 {limit} 个项的上限。`},"budget.arrayMember":{en:`Array member exceeds the {limit}-character limit.`,zh:`数组成员超过 {limit} 个字符的上限。`},"budget.arrayContents":{en:`Array contents exceed the {limit}-character limit.`,zh:`数组内容超过 {limit} 个字符的上限。`},"theme.missing":{en:`Theme "{name}" is not registered by the host; using the default theme.`,zh:`宿主未注册主题“{name}”;将使用默认主题。`},"theme.registryUnreadable":{en:`The host theme registry could not be read; using the default theme.`,zh:`无法读取宿主主题注册表;将使用默认主题。`},"theme.invalidDefinition":{en:`The selected theme "{name}" is not a valid definition; using the default theme.`,zh:`所选主题“{name}”不是有效定义;将使用默认主题。`},"theme.duplicateRegistration":{en:`Theme "{name}" is registered more than once; using the default theme.`,zh:`主题“{name}”被多次注册;将使用默认主题。`},"theme.protocol":{en:`Theme "{name}" does not support the {protocol} protocol; using the default theme.`,zh:`主题“{name}”不支持 {protocol} 协议;将使用默认主题。`},"theme.modes":{en:`Theme "{name}" must supply both light and dark color schemes; using the default theme.`,zh:`主题“{name}”必须同时提供浅色和深色配色;将使用默认主题。`},"theme.selectedUnreadable":{en:`The selected theme "{name}" could not be read; using the default theme.`,zh:`所选主题“{name}”无法读取;将使用默认主题。`},"error.expression-syntax":{en:`Check expression operators, parentheses and arguments.`,zh:`表达式语法不正确,请检查运算符、括号或参数是否完整。`},"error.expression-index":{en:`An array index must be a finite safe integer.`,zh:`数组索引必须为有限的安全整数。`},"error.expression-cycle":{en:`Named calculations contain a dependency cycle.`,zh:`命名计算中存在循环依赖。`},"error.array.homogeneous":{en:`Array elements must all be strings or all be numbers.`,zh:`数组元素必须全部为字符串或全部为数字。`},"error.array.finite":{en:`Array members must be finite numbers.`,zh:`数字数组元素必须为有限数值。`},"error.array.members":{en:`Array members must be strings or finite numbers.`,zh:`数组元素必须为字符串或有限数值。`},"error.expression-number":{en:`A numeric literal must be finite and valid.`,zh:`数字字面量无效,必须是有限数值。`},"error.expression-string":{en:`Check the string quotes and escape sequences.`,zh:`字符串格式不正确,请检查引号和转义。`},"error.expression-budget":{en:`The expression exceeded a resource budget.`,zh:`表达式超过长度、节点、深度或求值步数预算,请简化表达式。`},"error.expression-assignment":{en:`Assignment is not allowed in expressions.`,zh:`表达式不能执行赋值,请使用比较运算符。`},"error.expression-property":{en:`Property access is not allowed.`,zh:`表达式不支持属性访问,请直接引用绑定名称。`},"error.expression-empty":{en:`An expression is required.`,zh:`此处需要非空表达式。`},"error.expression-unknown-function":{en:`Use a supported built-in function.`,zh:`函数不受支持,请使用语言内置函数。`},"error.expression-arity":{en:`Check the function argument count.`,zh:`函数参数数量不正确。`},"error.expression-forbidden-name":{en:`The name is forbidden.`,zh:`此名称属于禁止访问的名称,请使用已声明的绑定。`},"error.expression-type":{en:`Operand or argument types do not match.`,zh:`操作数或函数参数的类型不匹配,请检查绑定类型。`},"error.expression-unknown-name":{en:`The binding is not declared.`,zh:`引用了未声明的绑定。`},"error.expression-value":{en:`The binding value is not supported.`,zh:`绑定值不符合表达式支持的类型或数值范围。`},"error.expression-eval":{en:`The expression cannot be evaluated.`,zh:`表达式无法求值,请检查输入和运算条件。`},"error.expression-domain":{en:`A value lies outside the function domain.`,zh:`参数超出函数定义域。`},"error.expression-divide-by-zero":{en:`Division by zero is undefined.`,zh:`除数不能为零。`},"error.expression-interpolation":{en:`Check interpolation delimiters and content.`,zh:`插值格式不正确,请检查分隔符和表达式内容。`},"error.latex-budget":{en:`The formula exceeded a resource budget.`,zh:`公式超过长度、记号、节点、深度或计算步数预算,请简化公式。`},"error.latex-syntax":{en:`Check formula syntax and delimiters.`,zh:`公式语法不正确,请检查命令、括号和分隔符。`},"error.latex-empty":{en:`A formula is required.`,zh:`公式不能为空。`},"error.latex-relation":{en:`Check the formula relation.`,zh:`公式中的关系式不符合计算语法。`},"error.latex-number":{en:`A formula number must be finite.`,zh:`公式中的数字必须是有限数值。`},"error.latex-name":{en:`Use a valid formula parameter name.`,zh:`公式参数名称无效,请使用合法绑定名。`},"error.latex-unsupported":{en:`The LaTeX structure is not computable.`,zh:`此 LaTeX 结构不支持计算,请改用支持的函数和运算。`},"error.latex-variable":{en:`A numeric formula parameter is missing or invalid.`,zh:`公式引用的参数缺失或不是有限数字。`},"error.latex-type":{en:`A formula parameter has the wrong type.`,zh:`公式参数类型不正确,计算参数必须为数字。`},"error.latex-divide-by-zero":{en:`Division by zero is undefined.`,zh:`公式中的除数不能为零。`},"error.latex-domain":{en:`A formula value lies outside the function domain.`,zh:`公式参数超出函数定义域。`},"error.latex-undefined":{en:`The formula is undefined at this point.`,zh:`公式在此点没有有限定义值。`},"error.latex-plot-range":{en:`Plot bounds must be finite and increasing.`,zh:`绘图区间必须由有限数值构成,且最小值小于最大值。`},"error.latex-plot-samples":{en:`The sample count must be an integer from 2 to 2000.`,zh:`采样点数必须为 2 至 2000 的整数。`}},Ve=`local.parse,local.budget,local.options.invalid,local.theme.expression,local.theme.name,local.theme.attribute,local.theme.malformed,local.theme.duplicate,local.theme.late,local.theme.nested,local.attribute,local.attribute.name,local.attribute.duplicate,local.budget.name,local.budget.math,local.tag.unclosed,local.tag.closing,local.tag.name,local.tag.mismatch,local.tag.shape,local.footnote.unsupported,local.interpolation,local.math.unclosed,local.math.whitespace,local.component.unknown,local.html`.split(`,`),He=`local.budget.data-table.cells,local.budget.data-table.columns,local.budget.data-table.rows,local.computation.budget,local.computation.const,local.computation.cycle,local.computation.duplicate,local.computation.expression,local.computation.name,local.computation.placement,local.computation.reserved,local.computation.unknown,local.computation.value,local.data-table.column,local.data-table.key,local.data-table.rows,local.data-table.value,local.validation.budget,local.validation.expression,local.validation.failed,local.validation.fields,local.validation.placement,local.validation.when,local.parse,local.legacy,local.component.unknown,local.attribute.unknown,local.budget.attribute,local.attribute.color,local.attribute.required,local.label.required,local.attribute.static,local.expression.empty,local.expression.invalid,local.attribute.type,local.attribute.range,local.constraint,local.selection.key,local.structure.parent,local.structure.children,local.budget.array,local.option.value,local.tab.value,local.step.value,local.quiz.answer,local.diagram.node,local.diagram.edge,local.checklist.body,local.budget.identifier,local.binding.name,local.binding.reserved,local.binding.type,local.binding.exclusive,local.binding.constraint,local.binding.option,local.initial.duplicate,local.initial.length,local.initial.email,local.initial.range,local.initial.option,local.initial.type,local.initial.date,local.initial,local.initial.step,local.binding.unknown,local.type,local.interpolation,local.attribute.interpolation,local.anchor.id,local.anchor.duplicate,local.jump.target,local.budget.plot.curves,local.budget.plot.points,local.math.formula,local.math,local.math.binding,local.table.header,local.table.row,local.chart.numeric,local.chart.column,local.chart.negative,local.timeline.header,local.timeline.value,local.html.extended,local.html.attribute,local.html.unsafe-url,local.html.capability`.split(`,`),Ue=[`local.runtime.binding`,`local.runtime.value`],We=[`local.theme.name`,`local.theme.missing`,`local.theme.manifest`,`local.theme.duplicate`,`local.theme.protocol`,`local.theme.modes`],Ge=[`expression-index`,`expression-cycle`,`expression-syntax`,`expression-number`,`expression-string`,`expression-budget`,`expression-assignment`,`expression-property`,`expression-empty`,`expression-unknown-function`,`expression-arity`,`expression-forbidden-name`,`expression-type`,`expression-unknown-name`,`expression-value`,`expression-eval`,`expression-domain`,`expression-divide-by-zero`,`expression-interpolation`],Ke=[`latex-budget`,`latex-syntax`,`latex-empty`,`latex-relation`,`latex-number`,`latex-name`,`latex-unsupported`,`latex-variable`,`latex-type`,`latex-divide-by-zero`,`latex-domain`,`latex-undefined`,`latex-plot-range`,`latex-plot-samples`],qe=[`local.version.unsupported`,`local.version.malformed`,`local.version.duplicate`,`local.version.placement`,`local.upgrade.from-version`,`local.upgrade.reserved-binding`,`local.upgrade.tag`,`local.upgrade.text-length`,`local.upgrade.expression`,`local.upgrade.version-missing`,...Ve,...He,...Ue,...We];Object.freeze(Array.from(new Set([...qe,...Ge,...Ge.map(e=>`local.expression.${e}`),...Ke])));var Je={"local.options.invalid.object":`options.notObject`,"local.options.invalid.limits":`options.limitsNotObject`,"local.options.invalid.max-syntax-nodes":`options.maxSyntaxNodes`,"local.budget.document":`budget.document`,"local.budget.nodes":`budget.syntaxNodes`,"local.budget.nesting":`budget.nesting`,"local.budget.name.attribute":`budget.attributeName`,"local.budget.name.tag":`budget.tagName`,"local.budget.math":`budget.math`,"local.budget.attribute":`budget.attribute`,"local.budget.array.options":`budget.options`,"local.budget.array.checklist":`budget.checklistItems`,"local.budget.identifier":`budget.identifier`,"local.budget.plot.curves":`budget.plotCurves`,"local.budget.plot.points":`budget.plotPoints`,"local.budget.value.string":`budget.string`,"local.budget.value.array":`budget.array`,"local.budget.value.array-member":`budget.arrayMember`,"local.budget.value.array-contents":`budget.arrayContents`,"local.parse.source":`parse.sourceType`,"local.parse.markdown":`parse.markdownFailed`,"local.parse.document":`parse.failed`,"local.legacy":`legacy.fence`,"local.theme.expression":`theme.expression`,"local.theme.name.missing":`theme.nameRequired`,"local.theme.attribute":`theme.attributeOnly`,"local.theme.name.invalid":`theme.nameInvalid`,"local.theme.name":`theme.nameInvalid`,"local.theme.malformed.unclosed":`theme.malformedMissingClose`,"local.theme.malformed.closing":`theme.malformedClosing`,"local.theme.malformed.placement":`theme.malformedStandalone`,"local.theme.duplicate.declaration":`theme.duplicateDeclaration`,"local.theme.duplicate":`theme.duplicateRegistration`,"local.theme.late":`theme.late`,"local.theme.nested":`theme.nested`,"local.theme.invalid":`theme.invalidDeclaration`,"local.theme.missing":`theme.missing`,"local.theme.manifest.unreadable":`theme.registryUnreadable`,"local.theme.manifest.definition":`theme.invalidDefinition`,"local.theme.manifest.selected":`theme.selectedUnreadable`,"local.theme.protocol":`theme.protocol`,"local.theme.modes":`theme.modes`,"local.tag.missing-close":`tag.missingClose`,"local.tag.unclosed.open":`tag.missingClose`,"local.tag.unclosed.pair":`tag.unclosedPaired`,"local.tag.closing":`tag.closingAttributes`,"local.tag.name":`tag.nameInvalid`,"local.tag.mismatch.root":`tag.mismatchRoot`,"local.tag.mismatch.parent":`tag.mismatchParent`,"local.tag.shape":`tag.requiresClose`,"local.interpolation.unclosed":`interpolation.unclosed`,"local.math.unclosed":`math.unclosed`,"local.math.whitespace":`math.whitespace`,"local.footnote.unsupported":`footnote.unsupported`,"local.html":`html.raw`,"local.html.extended":`html.extended`,"local.html.attribute":`html.attribute`,"local.html.unsafe-url":`html.unsafeUrl`,"local.html.capability":`html.capability`,"local.options.invalid.html-flag":`options.htmlFlag`,"local.component.unknown.suggestion":`component.unknownSuggestion`,"local.component.unknown":`component.unknownPlain`,"local.attribute.format":`attribute.lowercase`,"local.attribute.name":`attribute.nameInvalid`,"local.attribute.value-quoted":`attribute.valueQuoted`,"local.attribute.closing-quote":`attribute.valueUnclosed`,"local.attribute.duplicate":`attribute.duplicate`,"local.attribute.separator":`attribute.separator`,"local.attribute.unknown.suggestion":`attribute.unknownSuggestion`,"local.attribute.unknown":`attribute.unknownPlain`,"local.attribute.color":`attribute.color`,"local.attribute.required":`attribute.required`,"local.attribute.static":`attribute.static`,"local.attribute.type.number":`attribute.numberInvalid`,"local.attribute.type.number-interpolation":`attribute.numberInterpolationInvalid`,"local.attribute.type.integer":`attribute.integer`,"local.attribute.type.positive":`attribute.positive`,"local.attribute.type.boolean":`attribute.booleanInvalid`,"local.attribute.type.boolean-interpolation":`attribute.booleanInterpolationInvalid`,"local.attribute.type.enum":`attribute.enumInvalid`,"local.attribute.type.date-lower":`attribute.dateLower`,"local.attribute.type.date-upper":`attribute.dateUpper`,"local.attribute.range.min":`attribute.rangeMin`,"local.attribute.range.max":`attribute.rangeMax`,"local.attribute.interpolation":`attribute.whenInterpolation`,"local.label.required.missing":`label.requiredMissing`,"local.label.required.empty":`label.requiredEmpty`,"local.expression.empty.attribute":`expression.emptyAttribute`,"local.expression.empty":`expression.emptyInterpolation`,"local.expression.error":`expression.error`,"local.constraint.number-min-max":`constraint.componentMinMax`,"local.constraint.number-step":`constraint.componentStep`,"local.constraint.length-order":`constraint.lengthRange`,"local.constraint.date-order":`constraint.dateOrder`,"local.constraint.progress-range":`constraint.progressRange`,"local.constraint.plot-range":`constraint.plotRange`,"local.constraint.timer-duration":`constraint.timerDuration`,"local.constraint.range-slider-min-max":`constraint.rangeSliderOrder`,"local.constraint.range-slider-step":`constraint.rangeSliderStep`,"local.constraint.coordinate-axis":`constraint.coordinateOrder`,"local.constraint.coordinate-step":`constraint.coordinateStep`,"local.constraint.multi-select":`constraint.multiSelectMax`,"local.constraint.quiz-tolerance":`constraint.quizTolerance`,"local.selection.key.required":`selection.keyNeedsKey`,"local.selection.key.empty":`selection.keyEmpty`,"local.selection.key.missing-column":`selection.keyMissingColumn`,"local.selection.key.interpolation":`selection.keyInterpolation`,"local.selection.key.empty-cell":`selection.keyEmptyCell`,"local.selection.key.duplicate":`selection.keyDuplicate`,"local.selection.key.initial":`initial.selectionNotValue`,"local.structure.parent":`structure.parent`,"local.structure.no-body":`structure.noBody`,"local.structure.inline-only":`structure.inlineOnly`,"local.structure.no-nested-components":`structure.noNestedComponents`,"local.structure.accordion.needs-disclosure":`structure.accordionNeedsDisclosure`,"local.structure.accordion.only-disclosure":`structure.accordionOnly`,"local.structure.grid.needs-card":`structure.gridNeedsCard`,"local.structure.grid.only-card":`structure.gridOnlyCard`,"local.structure.table.single":`structure.exactlyOneTable`,"local.structure.plot.needs-formula":`structure.plotNeedsFormula`,"local.structure.plot.only-formulas":`structure.plotOnlyFormulas`,"local.structure.node.no-components":`structure.nodeNoComponents`,"local.structure.options.needed":`structure.optionsNeeded`,"local.structure.options.only":`structure.optionsOnly`,"local.structure.option.no-components":`structure.optionNoComponents`,"local.structure.tabs.needs-tab":`structure.tabsNeedsTab`,"local.structure.tabs.only-tab":`structure.tabsOnly`,"local.structure.steps.needs-step":`structure.stepsNeedsStep`,"local.structure.steps.only-step":`structure.stepsOnly`,"local.structure.quiz.numeric-no-body":`structure.quizNumericNoBody`,"local.structure.diagram.only":`structure.diagramOnly`,"local.option.value.required":`option.valueRequired`,"local.option.value.comma":`option.valueComma`,"local.option.value.duplicate":`option.valueDuplicate`,"local.tab.value.duplicate":`tab.valueDuplicate`,"local.step.value.duplicate":`step.valueDuplicate`,"local.quiz.answer.required":`quiz.answerRequired`,"local.quiz.answer.numeric":`quiz.answerNumeric`,"local.quiz.answer.not-option":`quiz.answerNotOption`,"local.diagram.node.required":`diagram.needsNode`,"local.diagram.node.invalid":`diagram.nodeInvalid`,"local.diagram.node.duplicate":`diagram.nodeDuplicate`,"local.diagram.edge.from":`diagram.edgeFromUnknown`,"local.diagram.edge.to":`diagram.edgeToUnknown`,"local.diagram.edge.duplicate":`diagram.edgeDuplicate`,"local.checklist.body.single":`checklist.bodySingle`,"local.checklist.body.item-required":`checklist.needsItem`,"local.checklist.body.items-limit":`budget.checklistItems`,"local.checklist.body.task-only":`checklist.taskOnly`,"local.checklist.body.no-nested":`checklist.noNested`,"local.checklist.body.no-components":`checklist.noComponents`,"local.binding.name":`binding.nameInvalid`,"local.binding.reserved":`binding.reserved`,"local.binding.type":`binding.typeConflict`,"local.binding.exclusive":`binding.exclusive`,"local.binding.exclusive.slot":`binding.slotExclusive`,"local.binding.constraint":`binding.constraintConflict`,"local.binding.option":`binding.optionConflict`,"local.binding.unknown.suggestion":`binding.unknownSuggestion`,"local.binding.unknown":`binding.unknownPlain`,"local.initial.duplicate":`initial.duplicate`,"local.initial.duplicate-peers":`initial.duplicatePeers`,"local.initial.no-step":`initial.rangeNoStep`,"local.initial.cannot-derive":`initial.cannotDerive`,"local.initial.type.number":`initial.typeFiniteNumber`,"local.initial.type.boolean":`initial.typeBoolean`,"local.initial.type":`initial.typeWrong`,"local.initial.range.min":`initial.belowMin`,"local.initial.range.max":`initial.aboveMax`,"local.initial.range.step":`initial.offStep`,"local.initial.value.options":`initial.notAmongOptions`,"local.initial.date":`initial.dateInvalid`,"local.initial.value.option":`initial.notAvailableOption`,"local.initial.option.multi-select":`initial.multiSelectOption`,"local.initial.range-slider":`initial.rangeSliderOrder`,"local.initial.slot.min":`initial.slotBelowMin`,"local.initial.slot.max":`initial.slotAboveMax`,"local.initial.slot.step":`initial.slotOffStep`,"local.initial.length.min":`initial.lengthBelow`,"local.initial.length.max":`initial.lengthAbove`,"local.initial.email":`initial.email`,"local.initial.date.min":`initial.dateBelow`,"local.initial.date.max":`initial.dateAbove`,"local.initial.multi-select":`initial.multiSelectExceeds`,"local.type.number":`type.number`,"local.type.boolean":`type.boolean`,"local.type.string":`type.string`,"local.type.array":`type.arrayNoDisplay`,"local.anchor.id":`anchor.idInvalid`,"local.anchor.duplicate":`anchor.duplicate`,"local.anchor.heading-collision":`anchor.headingCollision`,"local.jump.empty":`jump.empty`,"local.jump.bad-target":`jump.badTarget`,"local.jump.unresolved":`jump.unresolved`,"local.math.formula.shape":`math.formulaShape`,"local.math.compute":`math.computeFailed`,"local.math.binding.unknown":`math.bindingUnknown`,"local.math.binding.type":`math.bindingType`,"local.table.header.missing":`table.missingHeader`,"local.table.header.interpolation":`table.headerInterpolation`,"local.table.header.empty":`table.headerEmpty`,"local.table.header.duplicate":`table.headerDuplicate`,"local.table.row.mismatch":`table.rowColumnMismatch`,"local.chart.numeric.expression":`chart.numericExpression`,"local.timeline.numeric.expression":`timeline.numericExpression`,"local.chart.numeric.plain":`chart.numericPlain`,"local.timeline.numeric.plain":`timeline.numericPlain`,"local.chart.column.comma":`chart.columnComma`,"local.chart.column.x-missing":`chart.xMissing`,"local.chart.column.y-required":`chart.yRequired`,"local.chart.column.y-missing":`chart.yMissing`,"local.chart.column.needs-numeric":`chart.needsNumeric`,"local.chart.column.scatter-x-missing":`chart.scatterXMissing`,"local.chart.column.scatter-needs-numeric":`chart.scatterNeedsNumeric`,"local.chart.column.donut-columns":`chart.donutNeedsColumns`,"local.chart.column.donut-y":`chart.donutYOne`,"local.chart.column.donut-need-y":`chart.donutNeedY`,"local.chart.negative":`chart.negative`,"local.timeline.header.missing":`timeline.headerMissing`,"local.timeline.header.column":`timeline.columnUnsupported`,"local.timeline.value.negative":`timeline.negative`,"local.runtime.binding.no-writable":`runtime.bindingNoWritable`,"local.runtime.binding.needs-slot":`runtime.bindingNeedsSlot`,"local.runtime.binding.unknown-slot":`runtime.bindingUnknownSlot`,"local.runtime.binding.no-multi-slot":`runtime.bindingNoMultiSlot`,"local.runtime.value.date-invalid":`runtime.dateInvalid`,"local.runtime.value.date-required":`runtime.dateRequired`,"local.runtime.value.date-earlier":`runtime.dateEarlier`,"local.runtime.value.date-later":`runtime.dateLater`,"local.runtime.value.field-required":`runtime.fieldRequired`,"local.runtime.value.min-length":`runtime.minLength`,"local.runtime.value.max-length":`runtime.maxLength`,"local.runtime.value.email-length":`runtime.emailLength`,"local.runtime.value.email-invalid":`runtime.emailInvalid`,"local.runtime.value.finite-number":`runtime.finiteNumber`,"local.runtime.value.min":`runtime.min`,"local.runtime.value.max":`runtime.max`,"local.runtime.value.step":`runtime.step`,"local.runtime.value.boolean":`runtime.boolean`,"local.runtime.value.string":`runtime.string`,"local.runtime.value.array":`runtime.array`,"local.runtime.value.array-members":`runtime.arrayMembers`,"local.runtime.value.checklist-option":`runtime.checklistOption`,"local.runtime.value.max-items":`runtime.maxItems`,"local.runtime.value.unsupported-type":`runtime.unsupportedType`,"local.runtime.value.option":`runtime.option`,"local.runtime.value.budget":`runtime.budget`,"local.runtime.value.range-order":`runtime.rangeOrder`};Object.freeze([...Object.keys(Je),...Object.keys(Be).filter(e=>e.startsWith(`error.`))].sort());function Ye(e){if(Object.hasOwn(Je,e))return Je[e];if(Object.hasOwn(Be,e))return e}function Xe(e,t=`en`){let n=Ye(e);if(n)return Be[n][t===`zh`?`zh`:`en`]}function Ze(e,t){return t?e.replace(/\{([A-Za-z_][A-Za-z0-9_]*)\}/g,(e,n)=>{let r=t[n];return r===void 0?``:String(r)}):e}function Qe(e,t=`en`,n){let r=Xe(e,t);return r===void 0?``:Ze(r,n)}function $e(e){return Qe(e.key,`en`,e.params)}function et(e,t=`en`){let n=typeof e.messageKey==`string`?e.messageKey:void 0,r=n===void 0?void 0:Xe(n,t),i=e.params;if(t===`zh`&&i){let e=n===void 0?void 0:Ye(n);if(e===`expression.error`||e===`math.computeFailed`){let e=typeof i.code==`string`?Xe(`error.${i.code}`,`zh`):void 0;if(e){let t=typeof i.near==`string`&&i.near?` 相关源码:${i.near}`:``;i={...i,detail:e+t}}}else if(e===`runtime.budget`&&typeof i.detailKey==`string`){let e=Xe(i.detailKey,`zh`);e&&(i={...i,detail:Ze(e,i)})}}let a=r===void 0?typeof e.message==`string`?e.message:String(e.message??``):Ze(r,i),o=typeof a==`string`?a:String(a??``);return o.length>2e3?`${o.slice(0,D-1)}…`:o}function tt(e){if(typeof e!=`string`)return 0;let t=0;for(let n of e)t+=1;return t}var z=class extends Error{offset;code;constructor(e,t,n=0){super(t),this.name=`LocalExpressionError`,this.code=e,this.offset=n}},nt=`abs.sqrt.floor.ceil.round.min.max.pow.sin.cos.tan.asin.acos.atan.exp.log.len.contains.clamp.sum.average.minOf.maxOf.formatNumber.formatPercent.formatScientific.formatCurrency.trim.lower.upper.startsWith.endsWith.replace.slice.dateCompare.dateDiff`.split(`.`),rt=new Set(nt),it=new Map([[`pi`,Math.PI],[`e`,Math.E]]),at=new Set([`__proto__`,`prototype`,`constructor`]),ot=new Set([`string`,`number`,`boolean`,`null`,`array`,`number-array`]),st=new Set([...nt,`x`,`y`,`pi`,`e`,`true`,`false`,`null`,...at]),ct=4e3,lt=2e3,ut=100,dt=200,ft=1e4,pt=250,mt=w,ht=w,gt=500;function _t(e){if(e.length>1e4)return{code:`expression-budget`,...ze(`local.budget.value.array`,{limit:T}),message:`Array exceeds the ${T}-item limit.`};let t=null,n=0;for(let r of e)if(typeof r==`string`){if(t===`number`)return{code:`expression-value`,key:`error.array.homogeneous`,message:`Array elements must all be strings or all be numbers.`};if(t=`string`,r.length>1e5)return{code:`expression-budget`,...ze(`local.budget.value.array-member`,{limit:w}),message:`Array member exceeds the ${w}-character limit.`};if(n+=r.length,n>1e5)return{code:`expression-budget`,...ze(`local.budget.value.array-contents`,{limit:E}),message:`Array contents exceed the ${E}-character limit.`}}else if(typeof r==`number`){if(t===`string`)return{code:`expression-value`,key:`error.array.homogeneous`,message:`Array elements must all be strings or all be numbers.`};if(t=`number`,!Number.isFinite(r))return{code:`expression-value`,key:`error.array.finite`,message:`Array members must be finite numbers.`}}else return{code:`expression-value`,key:`error.array.members`,message:`Array members must be strings or finite numbers.`};return null}function vt(e){if(typeof e==`string`)return e.length>1e5?ze(`local.budget.value.string`,{limit:w}):null;if(Array.isArray(e)){let t=_t(e);return t?ze(t.key,t.params):null}return null}function yt(e){let t=vt(e);return t?$e(t):null}var bt=/^(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?/,xt=/[A-Za-z_]/,St=/[A-Za-z0-9_]/;function Ct(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(/\s/.test(r)){n+=1;continue}if(r>=`0`&&r<=`9`||r===`.`&&/[0-9]/.test(e[n+1]??``)){let r=bt.exec(e.slice(n));if(!r)throw new z(`expression-syntax`,`Invalid number.`,n);let i=r[0],a=Number(i);if(!Number.isFinite(a))throw new z(`expression-number`,`Number must be finite: ${i}.`,n);t.push({kind:`number`,value:i,start:n,number:a}),n+=i.length;continue}if(r===`"`||r===`'`){let i=n,a=r,o=``,s=n+1,c=!1;for(;s<e.length;){let t=e[s];if(t===a){c=!0,s+=1;break}if(t===`
|
|
9
|
+
`).replace($f,``)}function tp(e,t){return t=ep(t),ep(e)===t}function np(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||ln(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&ln(e,``+r);else return;break;case`className`:Jt(e,`class`,r);break;case`tabIndex`:Jt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Jt(e,n,r);break;case`style`:fn(e,r,o);return;case`data`:if(t!==`object`){Jt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=gn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&np(e,t,`name`,a.name,a,null),np(e,t,`formEncType`,a.formEncType,a,null),np(e,t,`formMethod`,a.formMethod,a,null),np(e,t,`formTarget`,a.formTarget,a,null)):(np(e,t,`encType`,a.encType,a,null),np(e,t,`method`,a.method,a,null),np(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=gn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=_n);return;case`onScroll`:r!=null&&Hf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Hf(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=gn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Hf(`beforetoggle`,e),Hf(`toggle`,e),qt(e,`popover`,r);break;case`xlinkActuate`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:qt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=mn.get(n)||n,qt(e,n,r);else return}Gt=!0}function rp(e,t,n,r,a,o){switch(n){case`style`:fn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)ln(e,r);else if(typeof r==`number`||typeof r==`bigint`)ln(e,``+r);else return;break;case`onScroll`:r!=null&&Hf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Hf(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=_n);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Rt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[St]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}Gt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):qt(e,n,r)}return}Gt=!0}function ip(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Hf(`error`,e),Hf(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:np(e,t,o,s,n,null)}}a&&np(e,t,`srcSet`,n.srcSet,n,null),r&&np(e,t,`src`,n.src,n,null);return;case`input`:Hf(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:np(e,t,r,d,n,null)}}rn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Hf(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:np(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&on(e,!!r,n,!0):on(e,!!r,t,!1);return;case`textarea`:for(s in Hf(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:np(e,t,s,c,n,null)}cn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:np(e,t,l,r,n,null)}return;case`dialog`:Hf(`beforetoggle`,e),Hf(`toggle`,e),Hf(`cancel`,e),Hf(`close`,e);break;case`iframe`:case`object`:Hf(`load`,e);break;case`video`:case`audio`:for(r=0;r<zf.length;r++)Hf(zf[r],e);break;case`image`:Hf(`error`,e),Hf(`load`,e);break;case`details`:Hf(`toggle`,e);break;case`embed`:case`source`:case`link`:Hf(`error`,e),Hf(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:np(e,t,u,r,n,null)}return;default:if(pn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&rp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&np(e,t,c,r,n,null))}var ap={};function op(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||np(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(Gt=!0),o=m;break;case`name`:m!==f&&(Gt=!0),a=m;break;case`checked`:m!==f&&(Gt=!0),u=m;break;case`defaultChecked`:m!==f&&(Gt=!0),d=m;break;case`value`:m!==f&&(Gt=!0),s=m;break;case`defaultValue`:m!==f&&(Gt=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&np(e,t,p,m,r,f)}}B(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||np(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(Gt=!0),p=o;break;case`defaultValue`:o!==l&&(Gt=!0),c=o;break;case`multiple`:o!==l&&(Gt=!0),s=o;default:o!==l&&np(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?on(e,!!n,n?[]:``,!1):on(e,!!n,t,!0)):on(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:np(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(Gt=!0),p=a;break;case`defaultValue`:a!==o&&(Gt=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&np(e,t,s,a,r,o)}sn(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:np(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(Gt=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:np(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&np(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:np(e,t,u,p,r,m)}return;default:if(pn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&rp(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||rp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&np(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||np(e,t,f,p,r,m)}function sp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function cp(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&sp(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&sp(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var lp=null,up=null;function dp(e){return e.nodeType===9?e:e.ownerDocument}function fp(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function pp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function mp(e,t,n,r){return n=dp(n).createElement(e),n[xt]=r,n[St]=t,ip(n,e,t),Ft(n),n}function hp(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var gp=null;function _p(){var e=window.event;return e&&e.type===`popstate`?e!==gp&&(gp=e,!0):(gp=null,!1)}var vp=typeof setTimeout==`function`?setTimeout:void 0,yp=typeof clearTimeout==`function`?clearTimeout:void 0,bp=typeof Promise==`function`?Promise:void 0,xp=typeof requestAnimationFrame==`function`?requestAnimationFrame:vp,Sp=typeof queueMicrotask==`function`?queueMicrotask:bp===void 0?vp:function(e){return bp.resolve(null).then(e).catch(Cp)};function Cp(e){setTimeout(function(){throw e})}function wp(e){return e===`head`}function Tp(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Wh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)ym(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,ym(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Ot]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&ym(e.ownerDocument.body)}n=i}while(n);Wh(t)}function Ep(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Dp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Op(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function kp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Ap(e){return kp(e.getBoundingClientRect(),getComputedStyle(e),e)}function jp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return kp(t,n,e)}function Mp(e){return e.documentElement.clientHeight}function Np(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Pp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Mp(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=Qm(f),u>th){s.length=o;break}f=new Promise(Np.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Fp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Fp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Fp.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Fp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Ip(e){return{name:e,group:new Fp(`group`,e),imagePair:new Fp(`image-pair`,e),old:new Fp(`old`,e),new:new Fp(`new`,e)}}function Lp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Lp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Hp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Bp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),p(this._fragmentFiber.child,!1,Rp,e,s,r)}this._eventListeners=a}};function Rp(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Lp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Hp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Bp(i.optionsOrUseCapture),p(this._fragmentFiber.child,!1,zp,e,n,i),r.splice(t,1),a!==null&&a()}};function zp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function Bp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Vp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Hp(e,t,n,r){if(e.length===0)return-1;r=Vp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Vp(a.optionsOrUseCapture)===r)return i}return-1}Lp.prototype.dispatchEvent=function(e){var t=h(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Bp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Bp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Lp.prototype.focus=function(e){p(this._fragmentFiber.child,!0,Up,e,void 0,void 0)};function Up(e,t){return e.tag!==6&&(e=b(e),hm(e,t))}Lp.prototype.focusLast=function(e){var t=[];p(this._fragmentFiber.child,!0,Wp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Up(t[n],e);n--);};function Wp(e,t){return t.push(e),!1}Lp.prototype.blur=function(){var e=h(this._fragmentFiber);e!==null&&(e=b(e),e=dp(e).activeElement,e!==null&&p(this._fragmentFiber.child,!1,Gp,e,void 0,void 0))};function Gp(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Lp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),p(this._fragmentFiber.child,!1,Kp,e,void 0,void 0)};function Kp(e,t){return e.tag===6||(e=b(e),t.observe(e)),!1}Lp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),p(this._fragmentFiber.child,!1,qp,e,void 0,void 0);for(var n=t=0;n<Jp.length;n++){var r=Jp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Jp[t++]=r}Jp.length=t}};function qp(e,t){return e.tag===6||(e=b(e),t.unobserve(e)),!1}var Jp=[],Yp=!1;function Xp(e,t,n){Jp.push({fragmentInstance:e,observer:t,instance:n}),Yp||(Yp=!0,gm(function(){Yp=!1;var e=Jp;Jp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Lp.prototype.getClientRects=function(){var e=[];return p(this._fragmentFiber.child,!1,Zp,e,void 0,void 0),e};function Zp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Lp.prototype.getRootNode=function(e){var t=h(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Lp.prototype.compareDocumentPosition=function(e){var t=h(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];p(this._fragmentFiber.child,!1,Wp,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Qp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Qp(e,t,n,r,i){var a=jt(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=h(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=E(n,a,T),t===null?t=!1:(p(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(p(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function $p(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Lp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];p(this._fragmentFiber.child,!1,Wp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||h(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),$p(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=b(a),$p(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function em(e,t){return e=b(e),tm(e,t),!1}function tm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function nm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Bp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Jp.length;i++){var a=Jp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Jp[r++]=a)}Jp.length=r,n.observe(e)}),tm(e,t))}function rm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Bp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Xp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function im(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:im(n),At(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function am(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[Ot])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=dm(e.nextSibling),e===null)break}return null}function om(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=dm(e.nextSibling),e===null))return null;return e}function sm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=dm(e.nextSibling),e===null))return null;return e}function cm(e){return e.data===`$?`||e.data===`$~`}function lm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function um(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function dm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var fm=null;function pm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return dm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function mm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function hm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function gm(e){xp(function(){xp(function(t){return e(t)})})}function _m(e,t,n){switch(t=dp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function vm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&np(e,t,r,null,ap,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===_n&&(e.onclick=null),At(e)}function ym(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);At(e)}var bm=new Map,xm=new Set;function Sm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Cm=R.d;R.d={f:wm,r:Tm,D:Om,C:km,L:Am,m:jm,X:Nm,S:Mm,M:Pm};function wm(){var e=Cm.f(),t=zd();return e||t}function Tm(e){var t=Mt(e);t!==null&&t.tag===5&&t.type===`form`?nc(t):Cm.r(e)}var Em=typeof document>`u`?null:document;function Dm(e,t,n){var r=Em;if(r&&typeof t==`string`&&t){var i=nn(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),xm.has(i)||(xm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),ip(t,`link`,e),Ft(t),r.head.appendChild(t)))}}function Om(e){Cm.D(e),Dm(`dns-prefetch`,e,null)}function km(e,t){Cm.C(e,t),Dm(`preconnect`,e,t)}function Am(e,t,n){Cm.L(e,t,n);var r=Em;if(r&&e&&t){var i=`link[rel="preload"][as="`+nn(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+nn(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+nn(n.imageSizes)+`"]`)):i+=`[href="`+nn(e)+`"]`;var a=i;switch(t){case`style`:a=Im(e);break;case`script`:a=Bm(e)}if(!(bm.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),bm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Lm(a))||t===`script`&&r.querySelector(Vm(a))))){var o=r.createElement(`link`);ip(o,`link`,e),t===`style`&&(o[kt]=!0,o.onload=o.onerror=function(){It(o)}),Ft(o),r.head.appendChild(o)}}}function jm(e,t){Cm.m(e,t);var n=Em;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+nn(r)+`"][href="`+nn(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Bm(e)}if(!bm.has(a)&&(e=D({rel:`modulepreload`,href:e},t),bm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Vm(a)))return}r=n.createElement(`link`),ip(r,`link`,e),Ft(r),n.head.appendChild(r)}}}function Mm(e,t,n){Cm.S(e,t,n);var r=Em;if(r&&e){var i=Pt(r).hoistableStyles,a=Im(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Lm(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=bm.get(a))&&Wm(e,n);var c=o=r.createElement(`link`);Ft(c),ip(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Um(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Nm(e,t){Cm.X(e,t);var n=Em;if(n&&e){var r=Pt(n).hoistableScripts,i=Bm(e),a=r.get(i);a||(a=n.querySelector(Vm(i)),a||(e=D({src:e,async:!0},t),(t=bm.get(i))&&Gm(e,t),a=n.createElement(`script`),Ft(a),ip(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Pm(e,t){Cm.M(e,t);var n=Em;if(n&&e){var r=Pt(n).hoistableScripts,i=Bm(e),a=r.get(i);a||(a=n.querySelector(Vm(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=bm.get(i))&&Gm(e,t),a=n.createElement(`script`),Ft(a),ip(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Fm(e,t,n,r){var a=(a=Se.current)?Sm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Im(n.href),t=Pt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Im(n.href);var o=Pt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Lm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=bm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},bm.set(e,o)),zm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Bm(n),t=Pt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Im(e){return`href="`+nn(e)+`"`}function Lm(e){return`link[rel="stylesheet"][`+e+`]`}function Rm(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function zm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[kt]){r.loading=1;return}}else t=e.createElement(`link`),t[kt]=!0,t.onload=t.onerror=It.bind(null,t),ip(t,`link`,n),Ft(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Bm(e){return`[src="`+nn(e)+`"]`}function Vm(e){return`script[async]`+e}function Hm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+nn(n.href)+`"]`);if(r)return t.instance=r,Ft(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Ft(r),ip(r,`style`,a),Um(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Im(n.href);var o=e.querySelector(Lm(a));if(o)return t.state.loading|=4,t.instance=o,Ft(o),o;r=Rm(n),(a=bm.get(a))&&Wm(r,a),o=(e.ownerDocument||e).createElement(`link`),Ft(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),ip(o,`link`,r),t.state.loading|=4,Um(o,n.precedence,e),t.instance=o;case`script`:return o=Bm(n.src),(a=e.querySelector(Vm(o)))?(t.instance=a,Ft(a),a):(r=n,(a=bm.get(o))&&(r=D({},n),Gm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Ft(a),ip(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Um(r,n.precedence,e));return t.instance}function Um(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Wm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Gm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Km=null;function qm(e,t,n){if(Km===null){var r=new Map,i=Km=new Map;i.set(n,r)}else i=Km,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Ot]||a[xt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Jm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Ym(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Xm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Zm(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Qm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function $m(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Qm(t),e.suspenseyImages.push(t)),e=ah.bind(e),t.decode().then(e,e))}function eh(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Im(r.href),a=t.querySelector(Lm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ih.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Ft(a);return}a=t.ownerDocument||t,r=Rm(r),(i=bm.get(i))&&Wm(r,i),a=a.createElement(`link`),Ft(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),ip(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ih.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var th=0;function nh(e,t){return e.stylesheets&&e.count===0&&sh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&sh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&th===0&&(th=62500*cp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&sh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>th?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function rh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)sh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function ih(){this.count--,rh(this)}function ah(){this.imgCount--,rh(this)}var oh=null;function sh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,oh=new Map,t.forEach(ch,e),oh=null,ih.call(e))}function ch(e,t){if(!(t.state.loading&4)){var n=oh.get(e);if(n)var r=n.get(null);else{n=new Map,oh.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=ih.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var lh={$$typeof:F,Provider:null,Consumer:null,_currentValue:me,_currentValue2:me,_threadCount:0};function uh(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ut(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ut(0),this.hiddenUpdates=ut(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function dh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new uh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ki(3,null,null,t),e.current=a,a.stateNode=e,t=Aa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},po(a),e}function fh(e){return e?(e=Di,e):Di}function ph(e,t,n,r,i,a){i=fh(i),r.context===null?r.context=i:r.pendingContext=i,r=ho(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=go(e,r,t),n!==null&&(Pd(n,e,t),_o(n,e,t))}function mh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function hh(e,t){mh(e,t),(e=e.alternate)&&mh(e,t)}function gh(e){if(e.tag===13||e.tag===31){var t=wi(e,67108864);t!==null&&Pd(t,e,67108864),hh(e,67108864)}}function _h(e){if(e.tag===13||e.tag===31){var t=jd();t=gt(t);var n=wi(e,t);n!==null&&Pd(n,e,t),hh(e,t)}}var vh=!0;function yh(e,t,n,r){var i=L.T;L.T=null;var a=R.p;try{R.p=2,xh(e,t,n,r)}finally{R.p=a,L.T=i}}function bh(e,t,n,r){var i=L.T;L.T=null;var a=R.p;try{R.p=8,xh(e,t,n,r)}finally{R.p=a,L.T=i}}function xh(e,t,n,r){if(vh){var i=Sh(r);if(i===null)qf(e,t,r,Ch,n),Ph(e,r);else if(Ih(i,e,t,n,r))r.stopPropagation();else if(Ph(e,r),t&4&&-1<Nh.indexOf(e)){for(;i!==null;){var a=Mt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=it(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Qe(o);s.entanglements[1]|=c,o&=~c}Ef(a),!(Yu&6)&&(gd=Be()+500,Df(0,!1))}}break;case 31:case 13:s=wi(a,2),s!==null&&Pd(s,a,2),zd(),hh(a,2)}if(a=Sh(r),a===null&&qf(e,t,r,Ch,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else qf(e,t,r,null,n)}}function Sh(e){return e=yn(e),wh(e)}var Ch=null;function wh(e){if(Ch=null,e=jt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ch=e,null}function Th(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Ve()){case He:return 2;case Ue:return 8;case We:case Ge:return 32;case Ke:return 268435456;default:return 32}default:return 32}}var Eh=!1,Dh=null,Oh=null,kh=null,Ah=new Map,jh=new Map,Mh=[],Nh=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Ph(e,t){switch(e){case`focusin`:case`focusout`:Dh=null;break;case`dragenter`:case`dragleave`:Oh=null;break;case`mouseover`:case`mouseout`:kh=null;break;case`pointerover`:case`pointerout`:Ah.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:jh.delete(t.pointerId)}}function Fh(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Mt(t),t!==null&&gh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ih(e,t,n,r,i){switch(t){case`focusin`:return Dh=Fh(Dh,e,t,n,r,i),!0;case`dragenter`:return Oh=Fh(Oh,e,t,n,r,i),!0;case`mouseover`:return kh=Fh(kh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Ah.set(a,Fh(Ah.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,jh.set(a,Fh(jh.get(a)||null,e,t,n,r,i)),!0}return!1}function Lh(e){var t=jt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,yt(e.priority,function(){_h(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,yt(e.priority,function(){_h(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Rh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Sh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);vn=r,n.target.dispatchEvent(r),vn=null}else return t=Mt(n),t!==null&&gh(t),e.blockedOn=n,!1;t.shift()}return!0}function zh(e,t,n){Rh(e)&&n.delete(t)}function Bh(){Eh=!1,Dh!==null&&Rh(Dh)&&(Dh=null),Oh!==null&&Rh(Oh)&&(Oh=null),kh!==null&&Rh(kh)&&(kh=null),Ah.forEach(zh),jh.forEach(zh)}function Vh(e,n){e.blockedOn===n&&(e.blockedOn=null,Eh||(Eh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Bh)))}var Hh=null;function Uh(e){Hh!==e&&(Hh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Hh===e&&(Hh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(wh(r||n)===null)continue;break}var a=Mt(n);a!==null&&(e.splice(t,3),t-=3,ec(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Wh(e){function t(t){return Vh(t,e)}Dh!==null&&Vh(Dh,e),Oh!==null&&Vh(Oh,e),kh!==null&&Vh(kh,e),Ah.forEach(t),jh.forEach(t);for(var n=0;n<Mh.length;n++){var r=Mh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Mh.length&&(n=Mh[0],n.blockedOn===null);)Lh(n),n.blockedOn===null&&Mh.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[St]||null;if(typeof a==`function`)o||Uh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[St]||null)s=o.formAction;else if(wh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Uh(n)}}}function Gh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Kh(e){this._internalRoot=e}qh.prototype.render=Kh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;ph(n,jd(),e,t,null,null)},qh.prototype.unmount=Kh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ph(e.current,2,null,e,null,null),zd(),t[Ct]=null}};function qh(e){this._internalRoot=e}qh.prototype.unstable_scheduleHydration=function(e){if(e){var t=vt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Mh.length&&t!==0&&t<Mh[n].priority;n++);Mh.splice(n,0,e),n===0&&Lh(e)}};var Jh=n.version;if(Jh!==`19.3.1`)throw Error(i(527,Jh,`19.3.1`));R.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Yh={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:L,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Xh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xh.isDisabled&&Xh.supportsFiber)try{Ye=Xh.inject(Yh),Xe=Xh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Cc,s=wc,c=Tc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=dh(e,1,!1,null,null,n,r,null,o,s,c,Gh),e[Ct]=t.current,Gf(e),new Kh(t)},e.hydrateRoot=function(e,t,n){if(!a(e))throw Error(i(299));var r=!1,o=``,s=Cc,c=wc,l=Tc,u=null;return n!=null&&(!0===n.unstable_strictMode&&(r=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(c=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.formState!==void 0&&(u=n.formState)),t=dh(e,1,!0,t,n??null,r,o,u,s,c,l,Gh),t.context=fh(null),n=t.current,r=jd(),r=gt(r),o=ho(r),o.callback=null,go(n,o,r),n=r,t.current.lanes=n,dt(t,n),Ef(t),e[Ct]=t.current,Gf(e),new qh(t)}})),v=s(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=_()})),y=m(),b=v(),x=e=>e.attrs?.bind??`@${e.id}`,S=1e6,C=1e4,w=1e5,T=1e4,E=1e5,D=2e3,O=2e4,k=2e6,A=1e3,j=2e3,M=1e4;function N(e){if(e.length>254||/\s/.test(e))return!1;let t=e.indexOf(`@`);if(t<1||t!==e.lastIndexOf(`@`))return!1;let n=e.lastIndexOf(`.`);return n>t+1&&n<e.length-1}var P=class extends Error{code;constructor(e,t){super(t),this.name=`LocalFunctionError`,this.code=e}},F=[`en-US`,`zh-CN`,`de-DE`,`fr-FR`,`ja-JP`],ee=new Set(F),I=/^[A-Z]{3}$/,te=20;function ne(e){throw new P(`expression-domain`,e)}function re(e,t){if(e.length>1e5)throw new P(`expression-budget`,`${t} exceeds the ${w}-character limit.`);return e}function ie(e){return ee.has(e)||ne(`Unsupported locale "${e}"; expected one of ${F.join(`, `)}.`),e}function ae(e,t){return(!Number.isInteger(e)||e<0||e>te)&&ne(`${t} digits must be an integer from 0 to ${te}.`),e}function oe(e){if(!Number.isFinite(e))throw new P(`expression-number`,`Value must be a finite number.`);return e}function se(e){return e===0?0:e}function ce(e,t){let n=oe(e);return n===0||Math.abs(n)<.5*10**-t?0:n}function le(e,t){let n=oe(e);return n===0||Math.abs(n)<.5*10**-(t+2)?0:n}function ue(e,t,n,r,i){let a;try{a=new Intl.NumberFormat(e,t)}catch{a=void 0}return a===void 0&&ne(i),re(a.format(n),r)}function de(e,t=2,n=`en-US`,r=!0){let i=ie(n),a=ae(t,`formatNumber`);return typeof r!=`boolean`&&ne(`formatNumber grouping must be a boolean.`),e===null?``:ue(i,{useGrouping:r,minimumFractionDigits:a,maximumFractionDigits:a,roundingMode:`halfExpand`},ce(e,a),`Formatted number`,`Cannot format a number for locale "${i}".`)}function fe(e,t=0,n=`en-US`){let r=ie(n),i=ae(t,`formatPercent`);return e===null?``:ue(r,{style:`percent`,minimumFractionDigits:i,maximumFractionDigits:i,roundingMode:`halfExpand`},le(e,i),`Formatted percentage`,`Cannot format a percentage for locale "${r}".`)}function pe(e,t=2,n=`en-US`){let r=ie(n),i=ae(t,`formatScientific`);return e===null?``:ue(r,{notation:`scientific`,minimumFractionDigits:i,maximumFractionDigits:i,roundingMode:`halfExpand`},se(oe(e)),`Formatted number`,`Cannot format a number for locale "${r}".`)}function L(e,t=`USD`,n=2,r=`en-US`){let i=ie(r);I.test(t)||ne(`Currency "${t}" must be a three-letter uppercase code such as "USD".`);let a=ae(n,`formatCurrency`);return e===null?``:ue(i,{style:`currency`,currency:t,minimumFractionDigits:a,maximumFractionDigits:a,roundingMode:`halfExpand`},ce(e,a),`Formatted currency`,`Currency code "${t}" is not accepted by Intl.`)}function R(){throw new P(`expression-number`,`The result is not a finite number.`)}function me(e){if(!Number.isFinite(e))throw new P(`expression-value`,`Numeric array members must be finite numbers.`);return e}function he(e){let t=0;for(let n of e)t+=me(n);return Number.isFinite(t)||R(),t}function ge(e){if(e.length===0)return null;let t=he(e)/e.length;return Number.isFinite(t)||R(),t}function _e(e){if(e.length===0)return null;let t=me(e[0]);for(let n=1;n<e.length;n+=1){let r=me(e[n]);r<t&&(t=r)}return t}function ve(e){if(e.length===0)return null;let t=me(e[0]);for(let n=1;n<e.length;n+=1){let r=me(e[n]);r>t&&(t=r)}return t}function ye(e){let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!t)return null;let n=Number(t[1]),r=Number(t[2]),i=Number(t[3]);if(n<1||r<1||r>12||i<1||i>31)return null;let a=new Date(0);return a.setUTCFullYear(n,r-1,i),a.getUTCFullYear()===n&&a.getUTCMonth()===r-1&&a.getUTCDate()===i?a.getTime():null}function be(e){throw new P(`expression-domain`,e)}function xe(e){return re(e.trim(),`trim result`)}function Se(e){return re(e.toLowerCase(),`lower result`)}function Ce(e){return re(e.toUpperCase(),`upper result`)}function we(e,t){return e.startsWith(t)}function Te(e,t){return e.endsWith(t)}function Ee(e,t,n){t.length===0&&be(`replace search text must not be empty.`);let r=n.length-t.length;if(r>0){let n=0,i=0;for(;;){let r=e.indexOf(t,i);if(r<0)break;n+=1,i=r+t.length}if(e.length+n*r>1e5)throw new P(`expression-budget`,`replace result would exceed the ${w}-character limit.`)}let i=``,a=0;for(;;){let r=e.indexOf(t,a);if(r<0)break;i+=e.slice(a,r),i+=n,a=r+t.length}return i+=e.slice(a),re(i,`replace result`)}function De(e,t){return e<0?Math.max(t+e,0):Math.min(e,t)}function Oe(e,t,n){Number.isInteger(t)||be(`slice start must be an integer.`),n!==void 0&&!Number.isInteger(n)&&be(`slice end must be an integer.`);let r=Array.from(e),i=r.length,a=De(t,i),o=n===void 0?i:De(n,i);return o<=a?``:re(r.slice(a,o).join(``),`slice result`)}var ke=new Map([[`days`,864e5],[`hours`,36e5],[`minutes`,6e4],[`seconds`,1e3],[`milliseconds`,1]]),Ae=`days, hours, minutes, seconds or milliseconds`;function je(e){let t=ye(e);if(t===null)throw new P(`expression-domain`,`Date "${e}" must be a valid YYYY-MM-DD calendar date in years 0001-9999.`);return t}function Me(e,t){let n=je(e),r=je(t);return n===r?0:n<r?-1:1}function Ne(e,t,n=`days`){let r=ke.get(n);return r===void 0&&be(`dateDiff unit must be ${Ae}.`),(je(e)-je(t))/r}var Pe=16,Fe=256,Ie=2e3;function Le(e){if(typeof e==`string`)return e.length>Fe?`${e.slice(0,255)}…`:e;if(typeof e==`number`)return Number.isFinite(e)?e:String(e);if(typeof e==`boolean`||e===null)return e;if(e===void 0)return``;try{let t=JSON.stringify(e)??String(e);return t.length>Fe?`${t.slice(0,255)}…`:t}catch{return String(e).slice(0,Fe)}}function Re(e){let t=Object.entries(e);if(t.length===0)return;let n={},r=0,i=0;for(let[e,a]of t){if(i>=Pe)break;if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(e))continue;let t;try{t=Le(a)}catch{t=``}let o=typeof t==`string`?t.length:String(t).length;if(r+o>Ie)break;n[e]=t,r+=o,i+=1}return i>0?n:void 0}function ze(e,t){let n=t?Re(t):void 0;return n?{key:e,params:n}:{key:e}}var Be={"local.version.unsupported":{en:`This reader accepts {supported}; migrate {declared} or use a compatible reader.`,zh:`此阅读器支持 {supported};请迁移 {declared} 或使用兼容的阅读器。`},"local.version.malformed":{en:`Use <!-- reactive-md: local-draft-2 --> on one line.`,zh:`请在单独一行使用 <!-- reactive-md: local-draft-2 -->。`},"local.version.duplicate":{en:`Only one source syntax declaration is allowed.`,zh:`源码只能声明一次语法版本。`},"local.version.placement":{en:`The syntax declaration must be on its own line before the theme and document body.`,zh:`语法版本声明必须独占一行,位于主题声明和正文之前。`},"local.upgrade.from-version":{en:`Cannot migrate from {from}: {detail}.`,zh:`无法从 {from} 迁移:{detail}。`},"local.upgrade.reserved-binding":{en:`Binding {name} becomes reserved in local-draft-2; rename it with a compatible old editor before migration.`,zh:`绑定 {name} 在 local-draft-2 中成为保留名;迁移前请用兼容旧版本的编辑器重命名。`},"local.upgrade.tag":{en:`Tag {name} was inert in local-draft-1 and becomes active in local-draft-2; preserve it as literal code before migration.`,zh:`标签 {name} 在 local-draft-1 中不执行,在 local-draft-2 中会激活;迁移前请将其保留为代码原文。`},"local.upgrade.text-length":{en:`Text length constraints change from UTF-16 units to Unicode code points; explicitly accept this semantic change before migration.`,zh:`文本长度约束从 UTF-16 单元改为 Unicode 码点计数;迁移前须明确接受这一语义变化。`},"local.upgrade.expression":{en:`This expression uses array syntax or a function introduced in local-draft-2; it is outside automatic draft-1 migration.`,zh:`此表达式使用了 local-draft-2 新增的数组语法或函数,不属于 draft-1 自动迁移范围。`},"local.upgrade.version-missing":{en:`The source has no syntax declaration; migration will pin {version}.`,zh:`源码尚未声明语法版本;迁移将固定为 {version}。`},"parse.sourceType":{en:`Document source must be a string.`,zh:`文档源必须是字符串。`},"parse.markdownFailed":{en:`Cannot parse the Markdown document.`,zh:`无法解析 Markdown 文档。`},"parse.failed":{en:`Cannot parse document: {detail}`,zh:`无法解析文档:{detail}`},"budget.document":{en:`Document exceeds the {limit}-character limit.`,zh:`文档超过 {limit} 个字符的上限。`},"budget.syntaxNodes":{en:`Syntax nodes exceed the limit of {limit}.`,zh:`语法节点数量超过上限 {limit}。`},"budget.nesting":{en:`Component nesting exceeds the {limit}-level limit.`,zh:`组件嵌套超过 {limit} 层上限。`},"options.notObject":{en:`Compile options must be an object.`,zh:`编译选项必须是对象。`},"options.limitsNotObject":{en:`Compile option limits must be an object.`,zh:`编译选项 limits 必须是对象。`},"options.maxSyntaxNodes":{en:`Compile option limits.maxSyntaxNodes must be a positive safe integer.`,zh:`编译选项 limits.maxSyntaxNodes 必须是正安全整数。`},"options.hostComponents":{en:`Compile option hostComponents is invalid: {detail}`,zh:`编译选项 hostComponents 无效:{detail}`},"theme.expression":{en:`Theme names must be static text, not expressions.`,zh:`主题名称必须是静态文本,不能是表达式。`},"theme.nameRequired":{en:`A theme declaration requires a quoted name attribute.`,zh:`主题声明需要一个带引号的 name 属性。`},"theme.attributeOnly":{en:`Theme declarations only accept a quoted name attribute.`,zh:`主题声明只接受带引号的 name 属性。`},"theme.nameInvalid":{en:`Theme name "{name}" must use lowercase letters, digits and single hyphens (maximum {limit} characters).`,zh:`主题名称“{name}”只能使用小写字母、数字和单个连字符(最多 {limit} 个字符)。`},"theme.malformedMissingClose":{en:`Theme declaration is missing >.`,zh:`主题声明缺少 >。`},"theme.malformedClosing":{en:`A theme declaration cannot be a closing tag.`,zh:`主题声明不能是结束标签。`},"theme.malformedStandalone":{en:`A theme declaration must be on its own line before the document content.`,zh:`主题声明必须单独占一行并位于文档内容之前。`},"theme.duplicateDeclaration":{en:`Only one theme declaration is allowed before the document content; this declaration is ignored.`,zh:`文档内容之前只允许一个主题声明;此声明将被忽略。`},"theme.late":{en:`Theme declarations after document content are ignored.`,zh:`文档内容之后的主题声明将被忽略。`},"theme.nested":{en:`Theme declarations inside document content are ignored.`,zh:`文档内容内部的主题声明将被忽略。`},"theme.invalidDeclaration":{en:`Invalid theme declaration.`,zh:`无效的主题声明。`},"attribute.lowercase":{en:`Attribute names must use lowercase kebab-case.`,zh:`属性名必须使用小写 kebab-case。`},"budget.attributeName":{en:`Attribute name exceeds the {limit}-character limit.`,zh:`属性名超过 {limit} 个字符的上限。`},"attribute.nameInvalid":{en:`Attribute name {name} must use lowercase kebab-case.`,zh:`属性名 {name} 必须使用小写 kebab-case。`},"attribute.valueQuoted":{en:`Attribute {name} value must be quoted.`,zh:`属性 {name} 的值必须加引号。`},"attribute.valueUnclosed":{en:`Attribute {name} is missing a closing quote.`,zh:`属性 {name} 缺少结束引号。`},"attribute.duplicate":{en:`Duplicate attribute {name}.`,zh:`重复的属性 {name}。`},"attribute.separator":{en:`Attributes must be separated by whitespace.`,zh:`属性之间必须用空白分隔。`},"budget.tagName":{en:`Tag name exceeds the {limit}-character limit.`,zh:`标签名超过 {limit} 个字符的上限。`},"tag.missingClose":{en:`Tag {name} is missing >.`,zh:`标签 {name} 缺少 >。`},"tag.closingAttributes":{en:`Closing tag </{name}> cannot have attributes.`,zh:`结束标签 </{name}> 不能带属性。`},"tag.nameInvalid":{en:`Tag name {name} must use lowercase kebab-case.`,zh:`标签名 {name} 必须使用小写 kebab-case。`},"tag.unclosedPaired":{en:`<{name}> is missing </{name}>.`,zh:`<{name}> 缺少 </{name}>。`},"tag.mismatchRoot":{en:`Closing tag </{name}> does not match the document root.`,zh:`结束标签 </{name}> 与文档根不匹配。`},"tag.mismatchParent":{en:`Closing tag </{name}> does not match <{parent}>.`,zh:`结束标签 </{name}> 与 <{parent}> 不匹配。`},"tag.requiresClose":{en:`<{name}> requires a closing tag.`,zh:`<{name}> 需要结束标签。`},"footnote.unsupported":{en:`Footnotes are not part of the local interaction syntax and are shown as source.`,zh:`脚注不属于本地交互语法,将按源文本显示。`},"interpolation.unclosed":{en:`Interpolation is missing }}.`,zh:`插值缺少 }}。`},"math.unclosed":{en:`Formula is missing its closing delimiter.`,zh:`公式缺少结束定界符。`},"math.whitespace":{en:`Inline math cannot start or end with whitespace.`,zh:`行内公式不能以空白开头或结尾。`},"budget.math":{en:`Formula exceeds the {limit}-character limit.`,zh:`公式超过 {limit} 个字符的上限。`},"html.raw":{en:`Raw HTML is not part of the local interaction syntax.`,zh:`原始 HTML 不属于本地交互语法。`},"html.extended":{en:`HTML element <{name}> requires enableExtendedHtml in this mode; it is shown as source.`,zh:`此模式下 HTML 元素 <{name}> 需要启用 enableExtendedHtml;已按源码显示。`},"html.attribute":{en:`HTML attribute {name} on <{tag}> is not supported; the element is shown as source.`,zh:`<{tag}> 上的 HTML 属性 {name} 不受支持;该元素已按源码显示。`},"html.unsafeUrl":{en:`Unsafe URL in attribute {name} was removed.`,zh:`属性 {name} 中的不安全 URL 已移除。`},"html.capability":{en:`Author {feature} was disabled by the compile options.`,zh:`编译选项已禁用作者提供的{feature}。`},"options.htmlFlag":{en:`Compile option {name} must be a boolean.`,zh:`编译选项 {name} 必须是布尔值。`},"component.unknownSuggestion":{en:`Unknown component <{name}>. Did you mean <{suggestion}>?`,zh:`未知组件 <{name}>。是否想使用 <{suggestion}>?`},"component.unknownPlain":{en:`Unknown component <{name}>. This mode only accepts local interaction components.`,zh:`未知组件 <{name}>。此模式只接受本地交互组件。`},"legacy.fence":{en:`Legacy reactive-md configuration fences (state/data/computed/actions, etc.) are not part of the local interaction syntax; select legacy mode explicitly in the host.`,zh:`旧版 reactive-md 配置围栏(state/data/computed/actions 等)不属于本地交互语法;请在宿主中显式选择旧版模式。`},"attribute.unknownSuggestion":{en:`Component <{component}> does not support attribute {name}. Did you mean {suggestion}?`,zh:`组件 <{component}> 不支持属性 {name}。是否想使用 {suggestion}?`},"attribute.unknownPlain":{en:`Component <{component}> does not support attribute {name}.`,zh:`组件 <{component}> 不支持属性 {name}。`},"budget.attribute":{en:`Attribute {name} on component <{component}> exceeds the {limit}-character limit.`,zh:`组件 <{component}> 的属性 {name} 超过 {limit} 个字符的上限。`},"attribute.color":{en:`Attribute {name} on component <{component}> must be a standard CSS named color or #RGB/#RRGGBB, got "{value}".`,zh:`组件 <{component}> 的属性 {name} 必须是标准 CSS 命名颜色或 #RGB/#RRGGBB,当前为“{value}”。`},"attribute.required":{en:`Component <{component}> is missing required attribute {name}.`,zh:`组件 <{component}> 缺少必需属性 {name}。`},"label.requiredMissing":{en:`Component <{name}> requires a label.`,zh:`组件 <{name}> 需要 label。`},"label.requiredEmpty":{en:`Component <{name}> label cannot be empty.`,zh:`组件 <{name}> 的 label 不能为空。`},"attribute.static":{en:`Attribute {name} is static and cannot contain interpolations.`,zh:`属性 {name} 是静态的,不能包含插值。`},"host.attributeUnknown":{en:`Component <{component}> does not support attribute {name}.`,zh:`组件 <{component}> 不支持属性 {name}。`},"host.attributeRequired":{en:`Component <{component}> is missing required attribute {name}.`,zh:`组件 <{component}> 缺少必需属性 {name}。`},"host.attributeStatic":{en:`Attribute {name} is static and cannot contain interpolations.`,zh:`属性 {name} 是静态的,不能包含插值。`},"host.attributeType":{en:`Attribute {name} requires a {kind}, got "{value}".`,zh:`属性 {name} 需要 {kind},当前为“{value}”。`},"host.attributeEnum":{en:`Attribute {name} must be one of {values}, got "{value}".`,zh:`属性 {name} 必须是 {values} 之一,当前为“{value}”。`},"host.attributePattern":{en:`Attribute {name} must match pattern {pattern}.`,zh:`属性 {name} 必须匹配模式 {pattern}。`},"host.attributeInterpolation":{en:`Attribute {name} must be a literal matching {pattern} or one full interpolation.`,zh:`属性 {name} 必须是匹配 {pattern} 的字面值,或一个完整插值。`},"expression.emptyAttribute":{en:`Attribute {name} interpolation cannot be empty.`,zh:`属性 {name} 的插值不能为空。`},"expression.emptyInterpolation":{en:`Interpolation expression cannot be empty.`,zh:`插值表达式不能为空。`},"attribute.numberInvalid":{en:`Attribute {name} requires a number, got "{value}".`,zh:`属性 {name} 需要数字,当前为“{value}”。`},"attribute.numberInterpolationInvalid":{en:`Attribute {name} requires a number or a full number interpolation, got "{value}".`,zh:`属性 {name} 需要数字或完整的数字插值,当前为“{value}”。`},"attribute.integer":{en:`Attribute {name} requires an integer.`,zh:`属性 {name} 需要整数。`},"attribute.positive":{en:`Attribute {name} requires a positive number.`,zh:`属性 {name} 需要正数。`},"attribute.rangeMin":{en:`Attribute {name} must be at least {min}.`,zh:`属性 {name} 必须至少为 {min}。`},"attribute.rangeMax":{en:`Attribute {name} must be at most {max}.`,zh:`属性 {name} 必须至多为 {max}。`},"attribute.booleanInvalid":{en:`Attribute {name} requires true or false.`,zh:`属性 {name} 需要 true 或 false。`},"attribute.booleanInterpolationInvalid":{en:`Attribute {name} requires true or false, or a full boolean interpolation.`,zh:`属性 {name} 需要 true 或 false,或完整的布尔插值。`},"attribute.enumInvalid":{en:`Attribute {name} must be one of {values}, got "{value}".`,zh:`属性 {name} 必须是 {values} 之一,当前为“{value}”。`},"attribute.dateLower":{en:`Date lower bound {value} is not a valid YYYY-MM-DD.`,zh:`日期下界 {value} 不是有效的 YYYY-MM-DD。`},"attribute.dateUpper":{en:`Date upper bound {value} is not a valid YYYY-MM-DD.`,zh:`日期上界 {value} 不是有效的 YYYY-MM-DD。`},"constraint.componentMinMax":{en:`Component <{name}> min cannot exceed max.`,zh:`组件 <{name}> 的 min 不能大于 max。`},"constraint.componentStep":{en:`Component <{name}> step must be greater than 0.`,zh:`组件 <{name}> 的 step 必须大于 0。`},"constraint.lengthRange":{en:`max-length cannot be less than min-length.`,zh:`max-length 不能小于 min-length。`},"constraint.dateOrder":{en:`Date min cannot be later than max.`,zh:`日期 min 不能晚于 max。`},"constraint.progressRange":{en:`progress value must be between 0 and {max}, got {value}.`,zh:`progress 的 value 必须在 0 到 {max} 之间,当前为 {value}。`},"constraint.plotRange":{en:`plot min must be less than max.`,zh:`plot 的 min 必须小于 max。`},"constraint.timerDuration":{en:`timer duration must be a positive whole number of seconds.`,zh:`timer 的 duration 必须是正整数秒。`},"constraint.rangeSliderOrder":{en:`range-slider min cannot exceed max.`,zh:`range-slider 的 min 不能大于 max。`},"constraint.rangeSliderStep":{en:`range-slider step must be a finite positive number.`,zh:`range-slider 的 step 必须是有限正数。`},"constraint.coordinateOrder":{en:`coordinate {axis}-min cannot exceed {axis}-max.`,zh:`coordinate 的 {axis}-min 不能大于 {axis}-max。`},"constraint.coordinateStep":{en:`coordinate step must be a finite positive number.`,zh:`coordinate 的 step 必须是有限正数。`},"constraint.multiSelectMax":{en:`multi-select max-selected must be a nonnegative whole number.`,zh:`multi-select 的 max-selected 必须是非负整数。`},"constraint.quizTolerance":{en:`<quiz> tolerance must be a nonnegative finite number.`,zh:`<quiz> 的 tolerance 必须是非负有限数。`},"selection.keyNeedsKey":{en:`<{component}> {name} requires a key attribute naming the selection column.`,zh:`<{component}> 的 {name} 需要 key 属性来指定选择列。`},"structure.parent":{en:`<{name}> can only appear directly inside {parents}.`,zh:`<{name}> 只能直接位于 {parents} 内。`},"structure.noBody":{en:`<{name}> does not accept body content.`,zh:`<{name}> 不接受正文内容。`},"structure.inlineOnly":{en:`<{name}> only accepts inline Markdown.`,zh:`<{name}> 只接受行内 Markdown。`},"structure.noNestedComponents":{en:`The body of <{name}> cannot contain other interactive components.`,zh:`<{name}> 的正文不能包含其他交互组件。`},"structure.accordionNeedsDisclosure":{en:`<accordion> requires at least one <disclosure>.`,zh:`<accordion> 至少需要一个 <disclosure>。`},"structure.accordionOnly":{en:`<accordion> can only contain <disclosure>.`,zh:`<accordion> 只能包含 <disclosure>。`},"structure.gridNeedsCard":{en:`<grid> requires at least one <card>.`,zh:`<grid> 至少需要一个 <card>。`},"structure.gridOnlyCard":{en:`Direct children of <grid> must be <card>.`,zh:`<grid> 的直接子元素必须是 <card>。`},"structure.exactlyOneTable":{en:`The body of <{name}> must be exactly one Markdown table.`,zh:`<{name}> 的正文必须恰好是一个 Markdown 表格。`},"structure.plotNeedsFormula":{en:`<plot> requires at least one $$...$$ formula block.`,zh:`<plot> 至少需要一个 $$...$$ 公式块。`},"structure.plotOnlyFormulas":{en:`The body of <plot> can only contain blank lines and $$...$$ formula blocks.`,zh:`<plot> 的正文只能包含空行和 $$...$$ 公式块。`},"structure.nodeNoComponents":{en:`The description of <node> cannot contain interactive components.`,zh:`<node> 的描述不能包含交互组件。`},"structure.optionsNeeded":{en:`<{name}> requires at least one <option value="...">.`,zh:`<{name}> 至少需要一个 <option value="...">。`},"structure.optionsOnly":{en:`<{name}> can only contain <option>.`,zh:`<{name}> 只能包含 <option>。`},"budget.options":{en:`<{name}> options exceed the limit of {limit}.`,zh:`<{name}> 的选项数量超过上限 {limit}。`},"option.valueRequired":{en:`<option> requires a non-empty value.`,zh:`<option> 需要非空 value。`},"option.valueComma":{en:`<multi-select> option values cannot contain commas: "{value}".`,zh:`<multi-select> 的选项值不能包含逗号:“{value}”。`},"option.valueDuplicate":{en:`Option values in <{name}> must be unique; duplicate value "{value}".`,zh:`<{name}> 的选项值必须唯一;重复值“{value}”。`},"structure.optionNoComponents":{en:`The body of <option> cannot contain interactive components.`,zh:`<option> 的正文不能包含交互组件。`},"structure.tabsNeedsTab":{en:`<tabs> requires at least one <tab>.`,zh:`<tabs> 至少需要一个 <tab>。`},"structure.tabsOnly":{en:`<tabs> can only contain <tab>.`,zh:`<tabs> 只能包含 <tab>。`},"tab.valueDuplicate":{en:`Tab values in <tabs> must be unique; duplicate value "{value}".`,zh:`<tabs> 的标签值必须唯一;重复值“{value}”。`},"structure.stepsNeedsStep":{en:`<steps> requires at least one <step>.`,zh:`<steps> 至少需要一个 <step>。`},"structure.stepsOnly":{en:`<steps> can only contain <step>.`,zh:`<steps> 只能包含 <step>。`},"step.valueDuplicate":{en:`Step values in <steps> must be unique; duplicate value "{value}".`,zh:`<steps> 的步骤值必须唯一;重复值“{value}”。`},"quiz.answerRequired":{en:`<quiz> requires a non-empty answer.`,zh:`<quiz> 需要非空 answer。`},"structure.quizNumericNoBody":{en:`A numeric <quiz> cannot have body content; use type="choice" for option-based quizzes.`,zh:`数值型 <quiz> 不能有正文内容;基于选项的测验请使用 type="choice"。`},"quiz.answerNumeric":{en:`A numeric <quiz> answer must be a finite number.`,zh:`数值型 <quiz> 的 answer 必须是有限数字。`},"quiz.answerNotOption":{en:`<quiz> answer "{answer}" is not one of the option values: {options}.`,zh:`<quiz> 的 answer“{answer}”不在选项值中:{options}。`},"diagram.needsNode":{en:`<diagram> requires at least one <node>.`,zh:`<diagram> 至少需要一个 <node>。`},"structure.diagramOnly":{en:`<diagram> can only contain <node> and <edge>.`,zh:`<diagram> 只能包含 <node> 和 <edge>。`},"diagram.nodeInvalid":{en:`Node ID "{id}" may only contain letters, digits, underscores and hyphens, and cannot start with a digit.`,zh:`节点 ID“{id}”只能包含字母、数字、下划线和连字符,且不能以数字开头。`},"diagram.nodeDuplicate":{en:`Duplicate node ID "{id}".`,zh:`重复的节点 ID“{id}”。`},"diagram.edgeFromUnknown":{en:`Edge from references unknown node "{id}".`,zh:`连线起点引用了未知节点“{id}”。`},"diagram.edgeToUnknown":{en:`Edge to references unknown node "{id}".`,zh:`连线终点引用了未知节点“{id}”。`},"diagram.edgeDuplicate":{en:`Duplicate edge: {from} → {to}{label}.`,zh:`重复的连线:{from} → {to}{label}。`},"checklist.bodySingle":{en:`The body of <checklist> must be exactly one single-level Markdown task list.`,zh:`<checklist> 的正文必须恰好是一个单层 Markdown 任务列表。`},"checklist.needsItem":{en:`<checklist> requires at least one task list item.`,zh:`<checklist> 至少需要一个任务列表项。`},"budget.checklistItems":{en:`<checklist> items exceed the limit of {limit}.`,zh:`<checklist> 的任务项数量超过上限 {limit}。`},"checklist.taskOnly":{en:`<checklist> can only contain task list items (- [ ] / - [x]).`,zh:`<checklist> 只能包含任务列表项(- [ ] / - [x])。`},"checklist.noNested":{en:`<checklist> does not support nested lists.`,zh:`<checklist> 不支持嵌套列表。`},"checklist.noComponents":{en:`<checklist> items cannot contain interactive components.`,zh:`<checklist> 的任务项不能包含交互组件。`},"budget.identifier":{en:`Parameter name exceeds the {limit}-character limit.`,zh:`参数名超过 {limit} 个字符的上限。`},"binding.nameInvalid":{en:`Parameter name "{name}" must match [A-Za-z_][A-Za-z0-9_]*.`,zh:`参数名“{name}”必须匹配 [A-Za-z_][A-Za-z0-9_]*。`},"binding.reserved":{en:`Parameter name "{name}" is reserved; choose another name.`,zh:`参数名“{name}”是保留名称;请换一个名称。`},"binding.typeConflict":{en:`Parameter "{key}" is already declared as {kind} by <{first}> and cannot also bind <{second}>.`,zh:`参数“{key}”已由 <{first}> 声明为 {kind},不能再绑定 <{second}>。`},"binding.exclusive":{en:`Parameter "{key}" of <{first}> can only be owned by one component and cannot be shared with <{second}>.`,zh:`<{first}> 的参数“{key}”只能由一个组件拥有,不能与 <{second}> 共享。`},"binding.slotExclusive":{en:`Parameter "{key}" of the {slot} slot of <{name}> is exclusive and cannot be shared with another control.`,zh:`<{name}> 的 {slot} 槽参数“{key}”是独占的,不能与另一个控件共享。`},"binding.constraintConflict":{en:`Parameter "{key}" must use the same numeric range and step: <{first}> has {firstConstraints}, <{second}> has {secondConstraints}.`,zh:`参数“{key}”必须使用相同的数值范围和步长:<{first}> 为 {firstConstraints},<{second}> 为 {secondConstraints}。`},"binding.optionConflict":{en:`Parameter "{key}" must use the same option set in the same order.`,zh:`参数“{key}”必须使用相同顺序的同一组选项。`},"initial.duplicate":{en:`Parameter "{key}" has multiple explicit initial values ({count} in total).`,zh:`参数“{key}”有多个显式初值(共 {count} 个)。`},"initial.duplicatePeers":{en:`Parameter "{key}" has multiple explicit initial values ({count} in total; see also line {lines}).`,zh:`参数“{key}”有多个显式初值(共 {count} 个;另见第 {lines} 行)。`},"initial.rangeNoStep":{en:`Parameter "{key}" has no valid step value within range [{min}, {max}].`,zh:`参数“{key}”在范围 [{min}, {max}] 内没有有效的步长值。`},"initial.cannotDerive":{en:`Cannot derive a default initial value for <{name}> parameter "{key}".`,zh:`无法为 <{name}> 的参数“{key}”推导默认初值。`},"initial.typeFiniteNumber":{en:`Initial value of parameter "{key}" must be a finite number.`,zh:`参数“{key}”的初值必须是有限数字。`},"initial.belowMin":{en:`Initial value {value} of parameter "{key}" is below the minimum {min}.`,zh:`参数“{key}”的初值 {value} 小于最小值 {min}。`},"initial.aboveMax":{en:`Initial value {value} of parameter "{key}" exceeds the maximum {max}.`,zh:`参数“{key}”的初值 {value} 超过最大值 {max}。`},"initial.offStep":{en:`Initial value {value} of parameter "{key}" is not on step {step} (based at {base}).`,zh:`参数“{key}”的初值 {value} 不在步长 {step} 上(基准 {base})。`},"initial.typeBoolean":{en:`Initial value of parameter "{key}" must be a boolean.`,zh:`参数“{key}”的初值必须是布尔值。`},"initial.notAmongOptions":{en:`Initial value "{value}" of parameter "{key}" is not among the available values {options}.`,zh:`参数“{key}”的初值“{value}”不在可用值 {options} 中。`},"initial.typeWrong":{en:`Initial value of parameter "{name}" has the wrong type.`,zh:`参数“{name}”的初值类型不正确。`},"initial.dateInvalid":{en:`Initial date "{value}" is not a valid YYYY-MM-DD.`,zh:`初值日期“{value}”不是有效的 YYYY-MM-DD。`},"initial.notAvailableOption":{en:`Initial value "{value}" is not an available option: {options}.`,zh:`初值“{value}”不是可用选项:{options}。`},"initial.multiSelectOption":{en:`Initial value "{value}" of parameter "{key}" is not an option of <multi-select>.`,zh:`参数“{key}”的初值“{value}”不是 <multi-select> 的选项。`},"initial.rangeSliderOrder":{en:`<range-slider> start {start} cannot be greater than end {end}.`,zh:`<range-slider> 的 start {start} 不能大于 end {end}。`},"initial.slotBelowMin":{en:`Initial value {value} of <{name}> {slot} is below the minimum {min}.`,zh:`<{name}> 的 {slot} 初值 {value} 小于最小值 {min}。`},"initial.slotAboveMax":{en:`Initial value {value} of <{name}> {slot} exceeds the maximum {max}.`,zh:`<{name}> 的 {slot} 初值 {value} 超过最大值 {max}。`},"initial.slotOffStep":{en:`Initial value {value} of <{name}> {slot} is not on step {step} (based at {base}).`,zh:`<{name}> 的 {slot} 初值 {value} 不在步长 {step} 上(基准 {base})。`},"initial.lengthBelow":{en:`Initial value of parameter "{key}" has length {length}, below the minimum length {min} required by <{name}>.`,zh:`参数“{key}”的初值长度为 {length},小于 <{name}> 要求的最小长度 {min}。`},"initial.lengthAbove":{en:`Initial value of parameter "{key}" has length {length}, exceeding the maximum length {max} allowed by <{name}>.`,zh:`参数“{key}”的初值长度为 {length},超过 <{name}> 允许的最大长度 {max}。`},"initial.email":{en:`Initial value of parameter "{key}" is not a valid email address.`,zh:`参数“{key}”的初值不是有效的电子邮件地址。`},"initial.dateBelow":{en:`Initial value {value} of parameter "{key}" is earlier than the minimum date {min} of <date>.`,zh:`参数“{key}”的初值 {value} 早于 <date> 的最小日期 {min}。`},"initial.dateAbove":{en:`Initial value {value} of parameter "{key}" is later than the maximum date {max} of <date>.`,zh:`参数“{key}”的初值 {value} 晚于 <date> 的最大日期 {max}。`},"initial.multiSelectExceeds":{en:`Initial values of <multi-select> exceed max-selected {max}.`,zh:`<multi-select> 的初值数量超过 max-selected {max}。`},"expression.error":{en:`Expression error: {detail}`,zh:`表达式错误:{detail}`},"binding.unknownSuggestion":{en:`Reference to undeclared parameter {name}. Did you mean {suggestion}?`,zh:`引用了未声明的参数 {name}。是否想使用 {suggestion}?`},"binding.unknownPlain":{en:`Reference to undeclared parameter {name}.`,zh:`引用了未声明的参数 {name}。`},"type.number":{en:`Expected a number here, but the expression evaluates to {kind}.`,zh:`此处需要数字,但表达式结果为 {kind}。`},"type.boolean":{en:`Expected a boolean here, but the expression evaluates to {kind}.`,zh:`此处需要布尔值,但表达式结果为 {kind}。`},"type.string":{en:`Expected a string here, but the expression evaluates to {kind}.`,zh:`此处需要字符串,但表达式结果为 {kind}。`},"type.arrayNoDisplay":{en:`Arrays cannot be displayed directly; convert them first with a function such as len.`,zh:`数组不能直接显示;请先用 len 等函数转换。`},"attribute.whenInterpolation":{en:`The when attribute of if must be a full boolean interpolation, e.g. when="{{ seats >= 5 }}".`,zh:`if 的 when 属性必须是完整的布尔插值,例如 when="{{ seats >= 5 }}"。`},"anchor.idInvalid":{en:`Anchor id "{id}" must match [A-Za-z_][A-Za-z0-9_-]*.`,zh:`锚点 id“{id}”必须匹配 [A-Za-z_][A-Za-z0-9_-]*。`},"anchor.duplicate":{en:`Duplicate anchor id "{id}".`,zh:`重复的锚点 id“{id}”。`},"anchor.headingCollision":{en:`Anchor id "{id}" collides with an automatic heading target.`,zh:`锚点 id“{id}”与自动标题目标冲突。`},"jump.empty":{en:`<jump> target cannot be empty.`,zh:`<jump> 的目标不能为空。`},"jump.badTarget":{en:`<jump> target "{target}" must be a bare heading slug or anchor id without "#" or whitespace.`,zh:`<jump> 的目标“{target}”必须是不含“#”或空白的标题 slug 或锚点 id。`},"jump.unresolved":{en:`<jump> target "{target}" does not resolve to a heading or explicit anchor in this document.`,zh:`<jump> 的目标“{target}”无法解析到本文档中的标题或显式锚点。`},"budget.plotCurves":{en:`<plot> supports at most {limit} curves, but has {count}.`,zh:`<plot> 最多支持 {limit} 条曲线,当前有 {count} 条。`},"budget.plotPoints":{en:`The document's total plot sample count exceeds the limit of {limit}.`,zh:`文档的绘图采样点总数超过上限 {limit}。`},"math.formulaShape":{en:`<plot> formulas must be written explicitly as y = expression.`,zh:`<plot> 的公式必须显式写成 y = expression。`},"math.computeFailed":{en:`Cannot compute plot formula: {detail}`,zh:`无法计算绘图公式(错误代码 {code}):{detail}`},"math.bindingUnknown":{en:`Plot formula references undeclared parameter "{name}".`,zh:`绘图公式引用了未声明的参数“{name}”。`},"math.bindingType":{en:`Plot parameter "{name}" must be a number, but is {kind}.`,zh:`绘图参数“{name}”必须是数字,但当前为 {kind}。`},"table.missingHeader":{en:`The table for <{name}> is missing a header.`,zh:`<{name}> 的表格缺少表头。`},"table.headerInterpolation":{en:`Table headers cannot contain interpolations.`,zh:`表格表头不能包含插值。`},"table.headerEmpty":{en:`Table headers cannot be empty.`,zh:`表格表头不能为空。`},"table.headerDuplicate":{en:`Duplicate table header "{name}".`,zh:`重复的表格表头“{name}”。`},"table.rowColumnMismatch":{en:`Table row has a different column count: header has {header} columns, this row has {row}.`,zh:`表格行的列数不一致:表头有 {header} 列,此行有 {row} 列。`},"chart.numericExpression":{en:`Chart column "{name}" requires a number in row {row}, but the expression evaluates to {kind}.`,zh:`图表列“{name}”第 {row} 行需要数字,但表达式结果为 {kind}。`},"timeline.numericExpression":{en:`Timeline column "{name}" requires a number in row {row}, but the expression evaluates to {kind}.`,zh:`时间线列“{name}”第 {row} 行需要数字,但表达式结果为 {kind}。`},"chart.numericPlain":{en:`Chart column "{name}" requires a plain number in row {row}, got "{value}".`,zh:`图表列“{name}”第 {row} 行需要普通数字,当前为“{value}”。`},"timeline.numericPlain":{en:`Timeline column "{name}" requires a plain number in row {row}, got "{value}".`,zh:`时间线列“{name}”第 {row} 行需要普通数字,当前为“{value}”。`},"selection.keyEmpty":{en:`<{component}> key cannot be empty.`,zh:`<{component}> 的 key 不能为空。`},"selection.keyMissingColumn":{en:`<{component}> key column "{name}" does not exist in its table.`,zh:`<{component}> 的 key 列“{name}”在表格中不存在。`},"selection.keyInterpolation":{en:`<{component}> key column "{name}" must contain static text; row {row} contains an interpolation.`,zh:`<{component}> 的 key 列“{name}”必须包含静态文本;第 {row} 行包含插值。`},"selection.keyEmptyCell":{en:`<{component}> key column "{name}" cannot be empty in row {row}.`,zh:`<{component}> 的 key 列“{name}”在第 {row} 行不能为空。`},"selection.keyDuplicate":{en:`<{component}> key column "{name}" must be unique; duplicate value "{value}".`,zh:`<{component}> 的 key 列“{name}”必须唯一;重复值“{value}”。`},"initial.selectionNotValue":{en:`Initial selection "{value}" of <{component}> is not a value of key column "{name}".`,zh:`<{component}> 的初始选择“{value}”不是 key 列“{name}”中的值。`},"chart.columnComma":{en:`Chart column names cannot contain commas: "{name}".`,zh:`图表列名不能包含逗号:“{name}”。`},"chart.xMissing":{en:`Chart x column "{name}" does not exist.`,zh:`图表 x 列“{name}”不存在。`},"chart.yRequired":{en:`Chart y requires a column name.`,zh:`图表 y 需要列名。`},"chart.yMissing":{en:`Chart y column "{name}" does not exist.`,zh:`图表 y 列“{name}”不存在。`},"chart.needsNumeric":{en:`Chart requires at least one numeric column.`,zh:`图表至少需要一个数值列。`},"chart.scatterXMissing":{en:`Scatter chart x column "{name}" does not exist.`,zh:`散点图的 x 列“{name}”不存在。`},"chart.scatterNeedsNumeric":{en:`Scatter chart requires at least one numeric column.`,zh:`散点图至少需要一个数值列。`},"chart.donutNeedsColumns":{en:`Donut chart requires a label column and a value column.`,zh:`环形图需要一个标签列和一个数值列。`},"chart.donutYOne":{en:`Donut chart y can only specify one numeric column.`,zh:`环形图的 y 只能指定一个数值列。`},"chart.donutNeedY":{en:`A donut chart with more than two columns must use y to specify the single numeric column.`,zh:`超过两列的环形图必须用 y 指定唯一的数值列。`},"chart.negative":{en:`Donut chart values cannot be negative; row {row} is {value}.`,zh:`环形图的数值不能为负;第 {row} 行为 {value}。`},"timeline.headerMissing":{en:`Timeline requires either Task, Start and Duration columns or 事项, 开始 and 时长 columns, with optional Notes or 说明.`,zh:`时间线需要 Task、Start、Duration 列,或 事项、开始、时长 列,并可选 Notes 或 说明。`},"timeline.columnUnsupported":{en:`Timeline does not support column "{name}".`,zh:`时间线不支持列“{name}”。`},"timeline.negative":{en:`Timeline column "{name}" cannot be negative in row {row}.`,zh:`时间线列“{name}”在第 {row} 行不能为负。`},"runtime.bindingNoWritable":{en:`This component has no writable binding state.`,zh:`此组件没有可写的绑定状态。`},"runtime.bindingNeedsSlot":{en:`This multi-slot component requires a slot such as start/end or x/y.`,zh:`此多槽组件需要 start/end 或 x/y 之类的槽位。`},"runtime.bindingUnknownSlot":{en:`This component has no writable slot "{slot}".`,zh:`此组件没有可写的槽位“{slot}”。`},"runtime.bindingNoMultiSlot":{en:`This component does not support multiple slots.`,zh:`此组件不支持多个槽位。`},"runtime.dateInvalid":{en:`Date must be a valid YYYY-MM-DD or an empty string.`,zh:`日期必须是有效的 YYYY-MM-DD 或空字符串。`},"runtime.dateRequired":{en:`This date is required.`,zh:`此日期为必填项。`},"runtime.dateEarlier":{en:`Date cannot be earlier than {min}.`,zh:`日期不能早于 {min}。`},"runtime.dateLater":{en:`Date cannot be later than {max}.`,zh:`日期不能晚于 {max}。`},"runtime.fieldRequired":{en:`This field is required.`,zh:`此字段为必填项。`},"runtime.minLength":{en:`At least {min} characters.`,zh:`至少 {min} 个字符。`},"runtime.maxLength":{en:`At most {max} characters.`,zh:`至多 {max} 个字符。`},"runtime.emailLength":{en:`Email address cannot exceed {limit} characters.`,zh:`电子邮件地址不能超过 {limit} 个字符。`},"runtime.emailInvalid":{en:`Enter a valid email address.`,zh:`请输入有效的电子邮件地址。`},"runtime.finiteNumber":{en:`Parameter "{name}" requires a finite number.`,zh:`参数“{name}”需要有限数字。`},"runtime.min":{en:`Parameter "{name}" must be at least {min}.`,zh:`参数“{name}”必须至少为 {min}。`},"runtime.max":{en:`Parameter "{name}" must be at most {max}.`,zh:`参数“{name}”必须至多为 {max}。`},"runtime.step":{en:`Parameter "{name}" must be a multiple of step {step} (base {base}).`,zh:`参数“{name}”必须是步长 {step} 的倍数(基准 {base})。`},"runtime.boolean":{en:`Parameter "{name}" requires a boolean.`,zh:`参数“{name}”需要布尔值。`},"runtime.string":{en:`Parameter "{name}" requires a string.`,zh:`参数“{name}”需要字符串。`},"runtime.array":{en:`Parameter "{name}" requires an array of strings.`,zh:`参数“{name}”需要字符串数组。`},"runtime.arrayMembers":{en:`Parameter "{name}" members must be strings.`,zh:`参数“{name}”的成员必须是字符串。`},"runtime.checklistOption":{en:`Checklist item "{value}" does not exist.`,zh:`清单项“{value}”不存在。`},"runtime.maxItems":{en:`Parameter "{name}" allows at most {max} selected values.`,zh:`参数“{name}”最多允许选择 {max} 个值。`},"runtime.unsupportedType":{en:`Parameter "{name}" has an unsupported value type.`,zh:`参数“{name}”的值类型不受支持。`},"runtime.option":{en:`Value "{value}" is not among the options: {options}.`,zh:`值“{value}”不在选项中:{options}。`},"runtime.budget":{en:`Parameter "{name}": {detail}`,zh:`参数“{name}”:{detail}`},"runtime.rangeOrder":{en:`The range start cannot be greater than its end.`,zh:`范围起点不能大于终点。`},"budget.string":{en:`String exceeds the {limit}-character limit.`,zh:`字符串超过 {limit} 个字符的上限。`},"budget.array":{en:`Array exceeds the {limit}-item limit.`,zh:`数组超过 {limit} 个项的上限。`},"budget.arrayMember":{en:`Array member exceeds the {limit}-character limit.`,zh:`数组成员超过 {limit} 个字符的上限。`},"budget.arrayContents":{en:`Array contents exceed the {limit}-character limit.`,zh:`数组内容超过 {limit} 个字符的上限。`},"theme.missing":{en:`Theme "{name}" is not registered by the host; using the default theme.`,zh:`宿主未注册主题“{name}”;将使用默认主题。`},"theme.registryUnreadable":{en:`The host theme registry could not be read; using the default theme.`,zh:`无法读取宿主主题注册表;将使用默认主题。`},"theme.invalidDefinition":{en:`The selected theme "{name}" is not a valid definition; using the default theme.`,zh:`所选主题“{name}”不是有效定义;将使用默认主题。`},"theme.duplicateRegistration":{en:`Theme "{name}" is registered more than once; using the default theme.`,zh:`主题“{name}”被多次注册;将使用默认主题。`},"theme.protocol":{en:`Theme "{name}" does not support the {protocol} protocol; using the default theme.`,zh:`主题“{name}”不支持 {protocol} 协议;将使用默认主题。`},"theme.modes":{en:`Theme "{name}" must supply both light and dark color schemes; using the default theme.`,zh:`主题“{name}”必须同时提供浅色和深色配色;将使用默认主题。`},"theme.selectedUnreadable":{en:`The selected theme "{name}" could not be read; using the default theme.`,zh:`所选主题“{name}”无法读取;将使用默认主题。`},"error.expression-syntax":{en:`Check expression operators, parentheses and arguments.`,zh:`表达式语法不正确,请检查运算符、括号或参数是否完整。`},"error.expression-index":{en:`An array index must be a finite safe integer.`,zh:`数组索引必须为有限的安全整数。`},"error.expression-cycle":{en:`Named calculations contain a dependency cycle.`,zh:`命名计算中存在循环依赖。`},"error.array.homogeneous":{en:`Array elements must all be strings or all be numbers.`,zh:`数组元素必须全部为字符串或全部为数字。`},"error.array.finite":{en:`Array members must be finite numbers.`,zh:`数字数组元素必须为有限数值。`},"error.array.members":{en:`Array members must be strings or finite numbers.`,zh:`数组元素必须为字符串或有限数值。`},"error.expression-number":{en:`A numeric literal must be finite and valid.`,zh:`数字字面量无效,必须是有限数值。`},"error.expression-string":{en:`Check the string quotes and escape sequences.`,zh:`字符串格式不正确,请检查引号和转义。`},"error.expression-budget":{en:`The expression exceeded a resource budget.`,zh:`表达式超过长度、节点、深度或求值步数预算,请简化表达式。`},"error.expression-assignment":{en:`Assignment is not allowed in expressions.`,zh:`表达式不能执行赋值,请使用比较运算符。`},"error.expression-property":{en:`Property access is not allowed.`,zh:`表达式不支持属性访问,请直接引用绑定名称。`},"error.expression-empty":{en:`An expression is required.`,zh:`此处需要非空表达式。`},"error.expression-unknown-function":{en:`Use a supported built-in function.`,zh:`函数不受支持,请使用语言内置函数。`},"error.expression-arity":{en:`Check the function argument count.`,zh:`函数参数数量不正确。`},"error.expression-forbidden-name":{en:`The name is forbidden.`,zh:`此名称属于禁止访问的名称,请使用已声明的绑定。`},"error.expression-type":{en:`Operand or argument types do not match.`,zh:`操作数或函数参数的类型不匹配,请检查绑定类型。`},"error.expression-unknown-name":{en:`The binding is not declared.`,zh:`引用了未声明的绑定。`},"error.expression-value":{en:`The binding value is not supported.`,zh:`绑定值不符合表达式支持的类型或数值范围。`},"error.expression-eval":{en:`The expression cannot be evaluated.`,zh:`表达式无法求值,请检查输入和运算条件。`},"error.expression-domain":{en:`A value lies outside the function domain.`,zh:`参数超出函数定义域。`},"error.expression-divide-by-zero":{en:`Division by zero is undefined.`,zh:`除数不能为零。`},"error.expression-interpolation":{en:`Check interpolation delimiters and content.`,zh:`插值格式不正确,请检查分隔符和表达式内容。`},"error.latex-budget":{en:`The formula exceeded a resource budget.`,zh:`公式超过长度、记号、节点、深度或计算步数预算,请简化公式。`},"error.latex-syntax":{en:`Check formula syntax and delimiters.`,zh:`公式语法不正确,请检查命令、括号和分隔符。`},"error.latex-empty":{en:`A formula is required.`,zh:`公式不能为空。`},"error.latex-relation":{en:`Check the formula relation.`,zh:`公式中的关系式不符合计算语法。`},"error.latex-number":{en:`A formula number must be finite.`,zh:`公式中的数字必须是有限数值。`},"error.latex-name":{en:`Use a valid formula parameter name.`,zh:`公式参数名称无效,请使用合法绑定名。`},"error.latex-unsupported":{en:`The LaTeX structure is not computable.`,zh:`此 LaTeX 结构不支持计算,请改用支持的函数和运算。`},"error.latex-variable":{en:`A numeric formula parameter is missing or invalid.`,zh:`公式引用的参数缺失或不是有限数字。`},"error.latex-type":{en:`A formula parameter has the wrong type.`,zh:`公式参数类型不正确,计算参数必须为数字。`},"error.latex-divide-by-zero":{en:`Division by zero is undefined.`,zh:`公式中的除数不能为零。`},"error.latex-domain":{en:`A formula value lies outside the function domain.`,zh:`公式参数超出函数定义域。`},"error.latex-undefined":{en:`The formula is undefined at this point.`,zh:`公式在此点没有有限定义值。`},"error.latex-plot-range":{en:`Plot bounds must be finite and increasing.`,zh:`绘图区间必须由有限数值构成,且最小值小于最大值。`},"error.latex-plot-samples":{en:`The sample count must be an integer from 2 to 2000.`,zh:`采样点数必须为 2 至 2000 的整数。`}},Ve=`local.parse,local.budget,local.options.invalid,local.theme.expression,local.theme.name,local.theme.attribute,local.theme.malformed,local.theme.duplicate,local.theme.late,local.theme.nested,local.attribute,local.attribute.name,local.attribute.duplicate,local.budget.name,local.budget.math,local.tag.unclosed,local.tag.closing,local.tag.name,local.tag.mismatch,local.tag.shape,local.footnote.unsupported,local.interpolation,local.math.unclosed,local.math.whitespace,local.component.unknown,local.html`.split(`,`),He=`local.budget.data-table.cells,local.budget.data-table.columns,local.budget.data-table.rows,local.computation.budget,local.computation.const,local.computation.cycle,local.computation.duplicate,local.computation.expression,local.computation.name,local.computation.placement,local.computation.reserved,local.computation.unknown,local.computation.value,local.data-table.column,local.data-table.key,local.data-table.rows,local.data-table.value,local.validation.budget,local.validation.expression,local.validation.failed,local.validation.fields,local.validation.placement,local.validation.when,local.parse,local.legacy,local.component.unknown,local.host.attribute,local.attribute.unknown,local.budget.attribute,local.attribute.color,local.attribute.required,local.label.required,local.attribute.static,local.expression.empty,local.expression.invalid,local.attribute.type,local.attribute.range,local.constraint,local.selection.key,local.structure.parent,local.structure.children,local.budget.array,local.option.value,local.tab.value,local.step.value,local.quiz.answer,local.diagram.node,local.diagram.edge,local.checklist.body,local.budget.identifier,local.binding.name,local.binding.reserved,local.binding.type,local.binding.exclusive,local.binding.constraint,local.binding.option,local.initial.duplicate,local.initial.length,local.initial.email,local.initial.range,local.initial.option,local.initial.type,local.initial.date,local.initial,local.initial.step,local.binding.unknown,local.type,local.interpolation,local.attribute.interpolation,local.anchor.id,local.anchor.duplicate,local.jump.target,local.budget.plot.curves,local.budget.plot.points,local.math.formula,local.math,local.math.binding,local.table.header,local.table.row,local.chart.numeric,local.chart.column,local.chart.negative,local.timeline.header,local.timeline.value,local.html.extended,local.html.attribute,local.html.unsafe-url,local.html.capability`.split(`,`),Ue=[`local.runtime.binding`,`local.runtime.value`],We=[`local.theme.name`,`local.theme.missing`,`local.theme.manifest`,`local.theme.duplicate`,`local.theme.protocol`,`local.theme.modes`],Ge=[`expression-index`,`expression-cycle`,`expression-syntax`,`expression-number`,`expression-string`,`expression-budget`,`expression-assignment`,`expression-property`,`expression-empty`,`expression-unknown-function`,`expression-arity`,`expression-forbidden-name`,`expression-type`,`expression-unknown-name`,`expression-value`,`expression-eval`,`expression-domain`,`expression-divide-by-zero`,`expression-interpolation`],Ke=[`latex-budget`,`latex-syntax`,`latex-empty`,`latex-relation`,`latex-number`,`latex-name`,`latex-unsupported`,`latex-variable`,`latex-type`,`latex-divide-by-zero`,`latex-domain`,`latex-undefined`,`latex-plot-range`,`latex-plot-samples`],qe=[`local.version.unsupported`,`local.version.malformed`,`local.version.duplicate`,`local.version.placement`,`local.upgrade.from-version`,`local.upgrade.reserved-binding`,`local.upgrade.tag`,`local.upgrade.text-length`,`local.upgrade.expression`,`local.upgrade.version-missing`,...Ve,...He,...Ue,...We];Object.freeze(Array.from(new Set([...qe,...Ge,...Ge.map(e=>`local.expression.${e}`),...Ke])));var Je={"local.options.invalid.object":`options.notObject`,"local.options.invalid.limits":`options.limitsNotObject`,"local.options.invalid.max-syntax-nodes":`options.maxSyntaxNodes`,"local.options.invalid.host-components":`options.hostComponents`,"local.budget.document":`budget.document`,"local.budget.nodes":`budget.syntaxNodes`,"local.budget.nesting":`budget.nesting`,"local.budget.name.attribute":`budget.attributeName`,"local.budget.name.tag":`budget.tagName`,"local.budget.math":`budget.math`,"local.budget.attribute":`budget.attribute`,"local.budget.array.options":`budget.options`,"local.budget.array.checklist":`budget.checklistItems`,"local.budget.identifier":`budget.identifier`,"local.budget.plot.curves":`budget.plotCurves`,"local.budget.plot.points":`budget.plotPoints`,"local.budget.value.string":`budget.string`,"local.budget.value.array":`budget.array`,"local.budget.value.array-member":`budget.arrayMember`,"local.budget.value.array-contents":`budget.arrayContents`,"local.parse.source":`parse.sourceType`,"local.parse.markdown":`parse.markdownFailed`,"local.parse.document":`parse.failed`,"local.legacy":`legacy.fence`,"local.theme.expression":`theme.expression`,"local.theme.name.missing":`theme.nameRequired`,"local.theme.attribute":`theme.attributeOnly`,"local.theme.name.invalid":`theme.nameInvalid`,"local.theme.name":`theme.nameInvalid`,"local.theme.malformed.unclosed":`theme.malformedMissingClose`,"local.theme.malformed.closing":`theme.malformedClosing`,"local.theme.malformed.placement":`theme.malformedStandalone`,"local.theme.duplicate.declaration":`theme.duplicateDeclaration`,"local.theme.duplicate":`theme.duplicateRegistration`,"local.theme.late":`theme.late`,"local.theme.nested":`theme.nested`,"local.theme.invalid":`theme.invalidDeclaration`,"local.theme.missing":`theme.missing`,"local.theme.manifest.unreadable":`theme.registryUnreadable`,"local.theme.manifest.definition":`theme.invalidDefinition`,"local.theme.manifest.selected":`theme.selectedUnreadable`,"local.theme.protocol":`theme.protocol`,"local.theme.modes":`theme.modes`,"local.tag.missing-close":`tag.missingClose`,"local.tag.unclosed.open":`tag.missingClose`,"local.tag.unclosed.pair":`tag.unclosedPaired`,"local.tag.closing":`tag.closingAttributes`,"local.tag.name":`tag.nameInvalid`,"local.tag.mismatch.root":`tag.mismatchRoot`,"local.tag.mismatch.parent":`tag.mismatchParent`,"local.tag.shape":`tag.requiresClose`,"local.interpolation.unclosed":`interpolation.unclosed`,"local.math.unclosed":`math.unclosed`,"local.math.whitespace":`math.whitespace`,"local.footnote.unsupported":`footnote.unsupported`,"local.html":`html.raw`,"local.html.extended":`html.extended`,"local.html.attribute":`html.attribute`,"local.html.unsafe-url":`html.unsafeUrl`,"local.html.capability":`html.capability`,"local.options.invalid.html-flag":`options.htmlFlag`,"local.component.unknown.suggestion":`component.unknownSuggestion`,"local.component.unknown":`component.unknownPlain`,"local.attribute.format":`attribute.lowercase`,"local.attribute.name":`attribute.nameInvalid`,"local.attribute.value-quoted":`attribute.valueQuoted`,"local.attribute.closing-quote":`attribute.valueUnclosed`,"local.attribute.duplicate":`attribute.duplicate`,"local.attribute.separator":`attribute.separator`,"local.attribute.unknown.suggestion":`attribute.unknownSuggestion`,"local.attribute.unknown":`attribute.unknownPlain`,"local.attribute.color":`attribute.color`,"local.attribute.required":`attribute.required`,"local.attribute.static":`attribute.static`,"local.host.attribute.unknown":`host.attributeUnknown`,"local.host.attribute.required":`host.attributeRequired`,"local.host.attribute.static":`host.attributeStatic`,"local.host.attribute.type":`host.attributeType`,"local.host.attribute.enum":`host.attributeEnum`,"local.host.attribute.pattern":`host.attributePattern`,"local.host.attribute.interpolation":`host.attributeInterpolation`,"local.attribute.type.number":`attribute.numberInvalid`,"local.attribute.type.number-interpolation":`attribute.numberInterpolationInvalid`,"local.attribute.type.integer":`attribute.integer`,"local.attribute.type.positive":`attribute.positive`,"local.attribute.type.boolean":`attribute.booleanInvalid`,"local.attribute.type.boolean-interpolation":`attribute.booleanInterpolationInvalid`,"local.attribute.type.enum":`attribute.enumInvalid`,"local.attribute.type.date-lower":`attribute.dateLower`,"local.attribute.type.date-upper":`attribute.dateUpper`,"local.attribute.range.min":`attribute.rangeMin`,"local.attribute.range.max":`attribute.rangeMax`,"local.attribute.interpolation":`attribute.whenInterpolation`,"local.label.required.missing":`label.requiredMissing`,"local.label.required.empty":`label.requiredEmpty`,"local.expression.empty.attribute":`expression.emptyAttribute`,"local.expression.empty":`expression.emptyInterpolation`,"local.expression.error":`expression.error`,"local.constraint.number-min-max":`constraint.componentMinMax`,"local.constraint.number-step":`constraint.componentStep`,"local.constraint.length-order":`constraint.lengthRange`,"local.constraint.date-order":`constraint.dateOrder`,"local.constraint.progress-range":`constraint.progressRange`,"local.constraint.plot-range":`constraint.plotRange`,"local.constraint.timer-duration":`constraint.timerDuration`,"local.constraint.range-slider-min-max":`constraint.rangeSliderOrder`,"local.constraint.range-slider-step":`constraint.rangeSliderStep`,"local.constraint.coordinate-axis":`constraint.coordinateOrder`,"local.constraint.coordinate-step":`constraint.coordinateStep`,"local.constraint.multi-select":`constraint.multiSelectMax`,"local.constraint.quiz-tolerance":`constraint.quizTolerance`,"local.selection.key.required":`selection.keyNeedsKey`,"local.selection.key.empty":`selection.keyEmpty`,"local.selection.key.missing-column":`selection.keyMissingColumn`,"local.selection.key.interpolation":`selection.keyInterpolation`,"local.selection.key.empty-cell":`selection.keyEmptyCell`,"local.selection.key.duplicate":`selection.keyDuplicate`,"local.selection.key.initial":`initial.selectionNotValue`,"local.structure.parent":`structure.parent`,"local.structure.no-body":`structure.noBody`,"local.structure.inline-only":`structure.inlineOnly`,"local.structure.no-nested-components":`structure.noNestedComponents`,"local.structure.accordion.needs-disclosure":`structure.accordionNeedsDisclosure`,"local.structure.accordion.only-disclosure":`structure.accordionOnly`,"local.structure.grid.needs-card":`structure.gridNeedsCard`,"local.structure.grid.only-card":`structure.gridOnlyCard`,"local.structure.table.single":`structure.exactlyOneTable`,"local.structure.plot.needs-formula":`structure.plotNeedsFormula`,"local.structure.plot.only-formulas":`structure.plotOnlyFormulas`,"local.structure.node.no-components":`structure.nodeNoComponents`,"local.structure.options.needed":`structure.optionsNeeded`,"local.structure.options.only":`structure.optionsOnly`,"local.structure.option.no-components":`structure.optionNoComponents`,"local.structure.tabs.needs-tab":`structure.tabsNeedsTab`,"local.structure.tabs.only-tab":`structure.tabsOnly`,"local.structure.steps.needs-step":`structure.stepsNeedsStep`,"local.structure.steps.only-step":`structure.stepsOnly`,"local.structure.quiz.numeric-no-body":`structure.quizNumericNoBody`,"local.structure.diagram.only":`structure.diagramOnly`,"local.option.value.required":`option.valueRequired`,"local.option.value.comma":`option.valueComma`,"local.option.value.duplicate":`option.valueDuplicate`,"local.tab.value.duplicate":`tab.valueDuplicate`,"local.step.value.duplicate":`step.valueDuplicate`,"local.quiz.answer.required":`quiz.answerRequired`,"local.quiz.answer.numeric":`quiz.answerNumeric`,"local.quiz.answer.not-option":`quiz.answerNotOption`,"local.diagram.node.required":`diagram.needsNode`,"local.diagram.node.invalid":`diagram.nodeInvalid`,"local.diagram.node.duplicate":`diagram.nodeDuplicate`,"local.diagram.edge.from":`diagram.edgeFromUnknown`,"local.diagram.edge.to":`diagram.edgeToUnknown`,"local.diagram.edge.duplicate":`diagram.edgeDuplicate`,"local.checklist.body.single":`checklist.bodySingle`,"local.checklist.body.item-required":`checklist.needsItem`,"local.checklist.body.items-limit":`budget.checklistItems`,"local.checklist.body.task-only":`checklist.taskOnly`,"local.checklist.body.no-nested":`checklist.noNested`,"local.checklist.body.no-components":`checklist.noComponents`,"local.binding.name":`binding.nameInvalid`,"local.binding.reserved":`binding.reserved`,"local.binding.type":`binding.typeConflict`,"local.binding.exclusive":`binding.exclusive`,"local.binding.exclusive.slot":`binding.slotExclusive`,"local.binding.constraint":`binding.constraintConflict`,"local.binding.option":`binding.optionConflict`,"local.binding.unknown.suggestion":`binding.unknownSuggestion`,"local.binding.unknown":`binding.unknownPlain`,"local.initial.duplicate":`initial.duplicate`,"local.initial.duplicate-peers":`initial.duplicatePeers`,"local.initial.no-step":`initial.rangeNoStep`,"local.initial.cannot-derive":`initial.cannotDerive`,"local.initial.type.number":`initial.typeFiniteNumber`,"local.initial.type.boolean":`initial.typeBoolean`,"local.initial.type":`initial.typeWrong`,"local.initial.range.min":`initial.belowMin`,"local.initial.range.max":`initial.aboveMax`,"local.initial.range.step":`initial.offStep`,"local.initial.value.options":`initial.notAmongOptions`,"local.initial.date":`initial.dateInvalid`,"local.initial.value.option":`initial.notAvailableOption`,"local.initial.option.multi-select":`initial.multiSelectOption`,"local.initial.range-slider":`initial.rangeSliderOrder`,"local.initial.slot.min":`initial.slotBelowMin`,"local.initial.slot.max":`initial.slotAboveMax`,"local.initial.slot.step":`initial.slotOffStep`,"local.initial.length.min":`initial.lengthBelow`,"local.initial.length.max":`initial.lengthAbove`,"local.initial.email":`initial.email`,"local.initial.date.min":`initial.dateBelow`,"local.initial.date.max":`initial.dateAbove`,"local.initial.multi-select":`initial.multiSelectExceeds`,"local.type.number":`type.number`,"local.type.boolean":`type.boolean`,"local.type.string":`type.string`,"local.type.array":`type.arrayNoDisplay`,"local.anchor.id":`anchor.idInvalid`,"local.anchor.duplicate":`anchor.duplicate`,"local.anchor.heading-collision":`anchor.headingCollision`,"local.jump.empty":`jump.empty`,"local.jump.bad-target":`jump.badTarget`,"local.jump.unresolved":`jump.unresolved`,"local.math.formula.shape":`math.formulaShape`,"local.math.compute":`math.computeFailed`,"local.math.binding.unknown":`math.bindingUnknown`,"local.math.binding.type":`math.bindingType`,"local.table.header.missing":`table.missingHeader`,"local.table.header.interpolation":`table.headerInterpolation`,"local.table.header.empty":`table.headerEmpty`,"local.table.header.duplicate":`table.headerDuplicate`,"local.table.row.mismatch":`table.rowColumnMismatch`,"local.chart.numeric.expression":`chart.numericExpression`,"local.timeline.numeric.expression":`timeline.numericExpression`,"local.chart.numeric.plain":`chart.numericPlain`,"local.timeline.numeric.plain":`timeline.numericPlain`,"local.chart.column.comma":`chart.columnComma`,"local.chart.column.x-missing":`chart.xMissing`,"local.chart.column.y-required":`chart.yRequired`,"local.chart.column.y-missing":`chart.yMissing`,"local.chart.column.needs-numeric":`chart.needsNumeric`,"local.chart.column.scatter-x-missing":`chart.scatterXMissing`,"local.chart.column.scatter-needs-numeric":`chart.scatterNeedsNumeric`,"local.chart.column.donut-columns":`chart.donutNeedsColumns`,"local.chart.column.donut-y":`chart.donutYOne`,"local.chart.column.donut-need-y":`chart.donutNeedY`,"local.chart.negative":`chart.negative`,"local.timeline.header.missing":`timeline.headerMissing`,"local.timeline.header.column":`timeline.columnUnsupported`,"local.timeline.value.negative":`timeline.negative`,"local.runtime.binding.no-writable":`runtime.bindingNoWritable`,"local.runtime.binding.needs-slot":`runtime.bindingNeedsSlot`,"local.runtime.binding.unknown-slot":`runtime.bindingUnknownSlot`,"local.runtime.binding.no-multi-slot":`runtime.bindingNoMultiSlot`,"local.runtime.value.date-invalid":`runtime.dateInvalid`,"local.runtime.value.date-required":`runtime.dateRequired`,"local.runtime.value.date-earlier":`runtime.dateEarlier`,"local.runtime.value.date-later":`runtime.dateLater`,"local.runtime.value.field-required":`runtime.fieldRequired`,"local.runtime.value.min-length":`runtime.minLength`,"local.runtime.value.max-length":`runtime.maxLength`,"local.runtime.value.email-length":`runtime.emailLength`,"local.runtime.value.email-invalid":`runtime.emailInvalid`,"local.runtime.value.finite-number":`runtime.finiteNumber`,"local.runtime.value.min":`runtime.min`,"local.runtime.value.max":`runtime.max`,"local.runtime.value.step":`runtime.step`,"local.runtime.value.boolean":`runtime.boolean`,"local.runtime.value.string":`runtime.string`,"local.runtime.value.array":`runtime.array`,"local.runtime.value.array-members":`runtime.arrayMembers`,"local.runtime.value.checklist-option":`runtime.checklistOption`,"local.runtime.value.max-items":`runtime.maxItems`,"local.runtime.value.unsupported-type":`runtime.unsupportedType`,"local.runtime.value.option":`runtime.option`,"local.runtime.value.budget":`runtime.budget`,"local.runtime.value.range-order":`runtime.rangeOrder`};Object.freeze([...Object.keys(Je),...Object.keys(Be).filter(e=>e.startsWith(`error.`))].sort());function Ye(e){if(Object.hasOwn(Je,e))return Je[e];if(Object.hasOwn(Be,e))return e}function Xe(e,t=`en`){let n=Ye(e);if(n)return Be[n][t===`zh`?`zh`:`en`]}function Ze(e,t){return t?e.replace(/\{([A-Za-z_][A-Za-z0-9_]*)\}/g,(e,n)=>{let r=t[n];return r===void 0?``:String(r)}):e}function Qe(e,t=`en`,n){let r=Xe(e,t);return r===void 0?``:Ze(r,n)}function $e(e){return Qe(e.key,`en`,e.params)}function et(e,t=`en`){let n=typeof e.messageKey==`string`?e.messageKey:void 0,r=n===void 0?void 0:Xe(n,t),i=e.params;if(t===`zh`&&i){let e=n===void 0?void 0:Ye(n);if(e===`expression.error`||e===`math.computeFailed`){let e=typeof i.code==`string`?Xe(`error.${i.code}`,`zh`):void 0;if(e){let t=typeof i.near==`string`&&i.near?` 相关源码:${i.near}`:``;i={...i,detail:e+t}}}else if(e===`runtime.budget`&&typeof i.detailKey==`string`){let e=Xe(i.detailKey,`zh`);e&&(i={...i,detail:Ze(e,i)})}}let a=r===void 0?typeof e.message==`string`?e.message:String(e.message??``):Ze(r,i),o=typeof a==`string`?a:String(a??``);return o.length>2e3?`${o.slice(0,D-1)}…`:o}function tt(e){if(typeof e!=`string`)return 0;let t=0;for(let n of e)t+=1;return t}var z=class extends Error{offset;code;constructor(e,t,n=0){super(t),this.name=`LocalExpressionError`,this.code=e,this.offset=n}},nt=`abs.sqrt.floor.ceil.round.min.max.pow.sin.cos.tan.asin.acos.atan.exp.log.len.contains.clamp.sum.average.minOf.maxOf.formatNumber.formatPercent.formatScientific.formatCurrency.trim.lower.upper.startsWith.endsWith.replace.slice.dateCompare.dateDiff`.split(`.`),rt=new Set(nt),it=new Map([[`pi`,Math.PI],[`e`,Math.E]]),at=new Set([`__proto__`,`prototype`,`constructor`]),ot=new Set([`string`,`number`,`boolean`,`null`,`array`,`number-array`]),st=new Set([...nt,`x`,`y`,`pi`,`e`,`true`,`false`,`null`,...at]),ct=4e3,lt=2e3,ut=100,dt=200,ft=1e4,pt=250,mt=w,ht=w,gt=500;function _t(e){if(e.length>1e4)return{code:`expression-budget`,...ze(`local.budget.value.array`,{limit:T}),message:`Array exceeds the ${T}-item limit.`};let t=null,n=0;for(let r of e)if(typeof r==`string`){if(t===`number`)return{code:`expression-value`,key:`error.array.homogeneous`,message:`Array elements must all be strings or all be numbers.`};if(t=`string`,r.length>1e5)return{code:`expression-budget`,...ze(`local.budget.value.array-member`,{limit:w}),message:`Array member exceeds the ${w}-character limit.`};if(n+=r.length,n>1e5)return{code:`expression-budget`,...ze(`local.budget.value.array-contents`,{limit:E}),message:`Array contents exceed the ${E}-character limit.`}}else if(typeof r==`number`){if(t===`string`)return{code:`expression-value`,key:`error.array.homogeneous`,message:`Array elements must all be strings or all be numbers.`};if(t=`number`,!Number.isFinite(r))return{code:`expression-value`,key:`error.array.finite`,message:`Array members must be finite numbers.`}}else return{code:`expression-value`,key:`error.array.members`,message:`Array members must be strings or finite numbers.`};return null}function vt(e){if(typeof e==`string`)return e.length>1e5?ze(`local.budget.value.string`,{limit:w}):null;if(Array.isArray(e)){let t=_t(e);return t?ze(t.key,t.params):null}return null}function yt(e){let t=vt(e);return t?$e(t):null}var bt=/^(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?/,xt=/[A-Za-z_]/,St=/[A-Za-z0-9_]/;function Ct(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(/\s/.test(r)){n+=1;continue}if(r>=`0`&&r<=`9`||r===`.`&&/[0-9]/.test(e[n+1]??``)){let r=bt.exec(e.slice(n));if(!r)throw new z(`expression-syntax`,`Invalid number.`,n);let i=r[0],a=Number(i);if(!Number.isFinite(a))throw new z(`expression-number`,`Number must be finite: ${i}.`,n);t.push({kind:`number`,value:i,start:n,number:a}),n+=i.length;continue}if(r===`"`||r===`'`){let i=n,a=r,o=``,s=n+1,c=!1;for(;s<e.length;){let t=e[s];if(t===a){c=!0,s+=1;break}if(t===`
|
|
10
10
|
`||t===`\r`)throw new z(`expression-string`,`String literals cannot span lines.`,i);if(t===`\\`){let t=e[s+1];if(t===void 0)break;switch(t){case`\\`:o+=`\\`;break;case`'`:o+=`'`;break;case`"`:o+=`"`;break;case`n`:o+=`
|
|
11
11
|
`;break;case`t`:o+=` `;break;default:throw new z(`expression-string`,`Unsupported escape \\${t}.`,s)}s+=2}else o+=t,s+=1}if(!c)throw new z(`expression-string`,`Unterminated string literal.`,i);if(o.length>mt)throw new z(`expression-budget`,`String literal exceeds the length limit.`,i);t.push({kind:`string`,value:o,start:i}),n=s;continue}if(xt.test(r)){let r=n+1;for(;r<e.length&&St.test(e[r]);)r+=1;t.push({kind:`ident`,value:e.slice(n,r),start:n}),n=r;continue}let i=e.slice(n,n+2);if(e.startsWith(`!==`,n)||e.startsWith(`===`,n))throw new z(`expression-syntax`,`Unsupported operator ${e.slice(n,n+3)}.`,n);if(i===`==`||i===`!=`||i===`<=`||i===`>=`||i===`&&`||i===`||`)t.push({kind:`punct`,value:i,start:n}),n+=2;else if(`+-*/%()!<>?:,[]`.includes(r))t.push({kind:`punct`,value:r,start:n}),n+=1;else throw r===`=`?new z(`expression-assignment`,`Assignments are not supported.`,n):r===`.`?new z(`expression-property`,`Property access is not supported.`,n):r===`&`||r===`|`?new z(`expression-syntax`,`Use ${r}${r} for logical operations.`,n):new z(`expression-syntax`,`Unrecognized character "${r}".`,n)}return t.push({kind:`eof`,value:``,start:e.length}),t}var wt={abs:[1,1],sqrt:[1,1],floor:[1,1],ceil:[1,1],round:[1,1],min:[1,2**53-1],max:[1,2**53-1],pow:[2,2],sin:[1,1],cos:[1,1],tan:[1,1],asin:[1,1],acos:[1,1],atan:[1,1],exp:[1,1],log:[1,1],len:[1,1],contains:[2,2],clamp:[3,3],sum:[1,1],average:[1,1],minOf:[1,1],maxOf:[1,1],formatNumber:[1,4],formatPercent:[1,3],formatScientific:[1,3],formatCurrency:[1,4],trim:[1,1],lower:[1,1],upper:[1,1],startsWith:[2,2],endsWith:[2,2],replace:[3,3],slice:[2,3],dateCompare:[2,2],dateDiff:[2,3]};function Tt(e){let t=0,n=[{node:e,depth:1}];for(;n.length>0;){let{node:e,depth:r}=n.pop();switch(r>t&&(t=r),e.kind){case`unary`:n.push({node:e.operand,depth:r+1});break;case`binary`:n.push({node:e.left,depth:r+1}),n.push({node:e.right,depth:r+1});break;case`conditional`:n.push({node:e.test,depth:r+1}),n.push({node:e.consequent,depth:r+1}),n.push({node:e.alternate,depth:r+1});break;case`call`:for(let t of e.args)n.push({node:t,depth:r+1});break;case`array`:for(let t of e.elements)n.push({node:t,depth:r+1});break;case`index`:n.push({node:e.target,depth:r+1}),n.push({node:e.index,depth:r+1})}}return t}var Et=class{tokens;position=0;nodeCount=0;dependencyNames=[];dependencySet=new Set;constructor(e){this.tokens=Ct(e)}get dependencies(){return this.dependencyNames}parse(){if(this.peek().kind===`eof`)throw new z(`expression-empty`,`Expression is empty.`,0);let e=this.parseConditional(0),t=this.peek();if(t.kind!==`eof`)throw new z(`expression-syntax`,`Unexpected content "${t.value}".`,t.start);if(Tt(e)>dt)throw new z(`expression-budget`,`Expression is nested too deeply.`,e.start);return e}peek(){return this.tokens[this.position]}next(){let e=this.tokens[this.position];return this.position+=1,e}isPunct(e){let t=this.peek();return t.kind===`punct`&&t.value===e}expect(e){let t=this.peek();if(t.kind!==`punct`||t.value!==e)throw new z(`expression-syntax`,`Missing "${e}".`,t.start);return this.next()}node(e,t,n){if(this.nodeCount+=1,this.nodeCount>lt)throw new z(`expression-budget`,`Expression is too complex.`,n);if(t>ut)throw new z(`expression-budget`,`Expression is nested too deeply.`,n);return e}parseConditional(e){let t=this.parseOr(e);if(!this.isPunct(`?`))return t;let n=t.start;this.next();let r=this.parseConditional(e+1);this.expect(`:`);let i=this.parseConditional(e+1);return this.node({kind:`conditional`,test:t,consequent:r,alternate:i,start:n},e,n)}parseOr(e){let t=this.parseAnd(e);for(;this.isPunct(`||`);){let n=t.start;this.next();let r=this.parseAnd(e);t=this.node({kind:`binary`,operator:`||`,left:t,right:r,start:n},e,n)}return t}parseAnd(e){let t=this.parseEquality(e);for(;this.isPunct(`&&`);){let n=t.start;this.next();let r=this.parseEquality(e);t=this.node({kind:`binary`,operator:`&&`,left:t,right:r,start:n},e,n)}return t}parseEquality(e){let t=this.parseRelational(e);for(;this.isPunct(`==`)||this.isPunct(`!=`);){let n=t.start,r=this.next().value,i=this.parseRelational(e);t=this.node({kind:`binary`,operator:r,left:t,right:i,start:n},e,n)}return t}parseRelational(e){let t=this.parseAdditive(e);for(;this.isPunct(`<`)||this.isPunct(`<=`)||this.isPunct(`>`)||this.isPunct(`>=`);){let n=t.start,r=this.next().value,i=this.parseAdditive(e);t=this.node({kind:`binary`,operator:r,left:t,right:i,start:n},e,n)}return t}parseAdditive(e){let t=this.parseMultiplicative(e);for(;this.isPunct(`+`)||this.isPunct(`-`);){let n=t.start,r=this.next().value,i=this.parseMultiplicative(e);t=this.node({kind:`binary`,operator:r,left:t,right:i,start:n},e,n)}return t}parseMultiplicative(e){let t=this.parseUnary(e);for(;this.isPunct(`*`)||this.isPunct(`/`)||this.isPunct(`%`);){let n=t.start,r=this.next().value,i=this.parseUnary(e);t=this.node({kind:`binary`,operator:r,left:t,right:i,start:n},e,n)}return t}parseUnary(e){let t=this.peek();if(t.kind===`punct`&&(t.value===`-`||t.value===`+`||t.value===`!`)){this.next();let n=this.parseUnary(e+1);return this.node({kind:`unary`,operator:t.value,operand:n,start:t.start},e,t.start)}return this.parsePrimary(e)}parsePrimary(e){let t=this.parseAtom(e);for(;this.isPunct(`[`);){let n=t.start;this.next();let r=this.parseConditional(e+1);this.expect(`]`),t=this.node({kind:`index`,target:t,index:r,start:n},e,n)}return t}parseAtom(e){let t=this.peek();if(t.kind===`number`)return this.next(),this.node({kind:`literal`,value:t.number,start:t.start},e,t.start);if(t.kind===`string`)return this.next(),this.node({kind:`literal`,value:t.value,start:t.start},e,t.start);if(t.kind===`ident`){this.next();let n=t.value;if(this.isPunct(`(`)){if(!rt.has(n))throw new z(`expression-unknown-function`,`Unknown function "${n}".`,t.start);this.next();let r=[];if(!this.isPunct(`)`))for(r.push(this.parseConditional(e+1));this.isPunct(`,`);)this.next(),r.push(this.parseConditional(e+1));this.expect(`)`);let[i,a]=wt[n];if(r.length<i||r.length>a)throw new z(`expression-arity`,`Function ${n} expects ${i===a?`${i} ${i===1?`argument`:`arguments`}`:i===1?`at least one argument`:`${i}–${a} arguments`}.`,t.start);return this.node({kind:`call`,name:n,args:r,start:t.start},e,t.start)}if(n===`true`||n===`false`)return this.node({kind:`literal`,value:n===`true`,start:t.start},e,t.start);if(n===`null`)return this.node({kind:`literal`,value:null,start:t.start},e,t.start);let r=it.get(n);if(r!==void 0)return this.node({kind:`literal`,value:r,start:t.start},e,t.start);if(at.has(n))throw new z(`expression-forbidden-name`,`Name "${n}" is not allowed.`,t.start);if(rt.has(n))throw new z(`expression-syntax`,`Function ${n} must be called with parentheses.`,t.start);return this.dependencySet.has(n)||(this.dependencySet.add(n),this.dependencyNames.push(n)),this.node({kind:`reference`,name:n,start:t.start},e,t.start)}if(t.kind===`punct`&&t.value===`(`){this.next();let t=this.parseConditional(e+1);return this.expect(`)`),t}if(t.kind===`punct`&&t.value===`[`){this.next();let n=[];if(!this.isPunct(`]`))for(n.push(this.parseConditional(e+1));this.isPunct(`,`);)this.next(),n.push(this.parseConditional(e+1));return this.expect(`]`),this.node({kind:`array`,elements:n,start:t.start},e,t.start)}throw new z(`expression-syntax`,`Expected an expression.`,t.start)}};function Dt(e){switch(e){case`string`:return`string`;case`number`:return`number`;case`boolean`:return`boolean`;case`null`:return`null`;case`array`:return`array`;case`number-array`:return`number array`}}function Ot(e){return e===null?`null`:Array.isArray(e)?`array`:typeof e==`boolean`?`boolean`:typeof e==`number`?`number`:`string`}function kt(e,t){throw new z(`expression-type`,e,t)}function At(e,t,n,r){e!==t&&kt(`${r}, got ${Dt(e)}.`,n)}function jt(e,t){return e===t?e:e===`null`?t:t===`null`?e:null}function Mt(e,t){switch(e.kind){case`literal`:return Ot(e.value);case`reference`:{if(typeof t!=`object`||!t||!Object.prototype.hasOwnProperty.call(t,e.name))throw new z(`expression-unknown-name`,`Variable "${e.name}" is not declared.`,e.start);let n=t[e.name];if(typeof n!=`string`||!ot.has(n))throw new z(`expression-value`,`Variable "${e.name}" has an invalid type.`,e.start);return n}case`unary`:{let n=Mt(e.operand,t);return e.operator===`!`?(At(n,`boolean`,e.start,`Logical not requires a boolean`),`boolean`):(At(n,`number`,e.start,`Unary ${e.operator} requires a number`),`number`)}case`binary`:{let n=Mt(e.left,t),r=Mt(e.right,t);switch(e.operator){case`+`:return n===`number`&&r===`number`?`number`:n===`string`&&r===`string`?`string`:kt(`Operator "+" requires two numbers or two strings, got ${Dt(n)} and ${Dt(r)}.`,e.start);case`-`:case`*`:case`/`:case`%`:return At(n,`number`,e.start,`Operator "${e.operator}" requires a number`),At(r,`number`,e.start,`Operator "${e.operator}" requires a number`),`number`;case`<`:case`<=`:case`>`:case`>=`:return n===`number`&&r===`number`||n===`string`&&r===`string`?`boolean`:kt(`Comparison operator "${e.operator}" requires two numbers or two strings, got ${Dt(n)} and ${Dt(r)}.`,e.start);case`==`:case`!=`:return n!==r&&n!==`null`&&r!==`null`?kt(`Equality comparison requires matching types, got ${Dt(n)} and ${Dt(r)}.`,e.start):`boolean`;case`&&`:case`||`:return At(n,`boolean`,e.start,`Logical operators require booleans`),At(r,`boolean`,e.start,`Logical operators require booleans`),`boolean`}break}case`array`:{if(e.elements.length===0)return`number-array`;let n=null;for(let r of e.elements){let e=Mt(r,t);if(e!==`string`&&e!==`number`)return kt(`Array literals require string or number elements, got ${Dt(e)}.`,r.start);if(n===null)n=e;else if(n!==e)return kt(`Array literals require elements of one type, got ${Dt(n)} and ${Dt(e)}.`,r.start)}return n===`string`?`array`:`number-array`}case`index`:{let n=Mt(e.target,t);return At(Mt(e.index,t),`number`,e.start,`Array index must be a number`),n===`array`?`string`:n===`number-array`?`number`:kt(`Index access requires an array, got ${Dt(n)}.`,e.start)}case`conditional`:{At(Mt(e.test,t),`boolean`,e.start,`Conditional test must be a boolean`);let n=Mt(e.consequent,t),r=Mt(e.alternate,t);if(n===`array`&&e.alternate.kind===`array`&&e.alternate.elements.length===0||r===`array`&&e.consequent.kind===`array`&&e.consequent.elements.length===0)return`array`;let i=jt(n,r);return i===null?kt(`Conditional branches must have matching types or one null, got ${Dt(n)} and ${Dt(r)}.`,e.start):i}case`call`:{let n=e.args.map(e=>Mt(e,t));switch(e.name){case`abs`:case`sqrt`:case`floor`:case`ceil`:case`round`:case`sin`:case`cos`:case`tan`:case`asin`:case`acos`:case`atan`:case`exp`:case`log`:return At(n[0],`number`,e.start,`Function ${e.name} requires a number`),`number`;case`min`:case`max`:case`pow`:case`clamp`:for(let t of n)At(t,`number`,e.start,`Function ${e.name} requires a number`);return`number`;case`len`:return n[0]!==`string`&&n[0]!==`array`&&n[0]!==`number-array`&&kt(`Function len requires a string or array, got ${Dt(n[0])}.`,e.start),`number`;case`contains`:if(n[0]===`number-array`)return At(n[1],`number`,e.start,`Function contains requires a numeric member`),`boolean`;if(n[0]===`string`||n[0]===`array`)return At(n[1],`string`,e.start,`Function contains requires a string member`),`boolean`;kt(`Function contains requires a string or array, got ${Dt(n[0])}.`,e.start);break;case`sum`:case`average`:case`minOf`:case`maxOf`:return At(n[0],`number-array`,e.start,`Function ${e.name} requires a numeric array`),`number`;case`formatNumber`:case`formatPercent`:case`formatScientific`:return n[0]!==`number`&&n[0]!==`null`&&kt(`Function ${e.name} requires a number or null, got ${Dt(n[0])}.`,e.start),n[1]!==void 0&&At(n[1],`number`,e.start,`Function ${e.name} requires numeric fraction digits`),n[2]!==void 0&&At(n[2],`string`,e.start,`Function ${e.name} requires a string locale`),e.name===`formatNumber`&&n[3]!==void 0&&At(n[3],`boolean`,e.start,`Function formatNumber requires a boolean grouping flag`),`string`;case`formatCurrency`:return n[0]!==`number`&&n[0]!==`null`&&kt(`Function formatCurrency requires a number or null, got ${Dt(n[0])}.`,e.start),n[1]!==void 0&&At(n[1],`string`,e.start,`Function formatCurrency requires a string currency code`),n[2]!==void 0&&At(n[2],`number`,e.start,`Function formatCurrency requires numeric fraction digits`),n[3]!==void 0&&At(n[3],`string`,e.start,`Function formatCurrency requires a string locale`),`string`;case`trim`:case`lower`:case`upper`:return At(n[0],`string`,e.start,`Function ${e.name} requires a string`),`string`;case`startsWith`:case`endsWith`:return At(n[0],`string`,e.start,`Function ${e.name} requires a string`),At(n[1],`string`,e.start,`Function ${e.name} requires a string search value`),`boolean`;case`replace`:return At(n[0],`string`,e.start,`Function replace requires a string`),At(n[1],`string`,e.start,`Function replace requires a string search value`),At(n[2],`string`,e.start,`Function replace requires a string replacement`),`string`;case`slice`:return At(n[0],`string`,e.start,`Function slice requires a string`),At(n[1],`number`,e.start,`Function slice requires a numeric start index`),n[2]!==void 0&&At(n[2],`number`,e.start,`Function slice requires a numeric end index`),`string`;case`dateCompare`:return At(n[0],`string`,e.start,`Function dateCompare requires a date string`),At(n[1],`string`,e.start,`Function dateCompare requires a date string`),`number`;case`dateDiff`:return At(n[0],`string`,e.start,`Function dateDiff requires a date string`),At(n[1],`string`,e.start,`Function dateDiff requires a date string`),n[2]!==void 0&&At(n[2],`string`,e.start,`Function dateDiff requires a string unit`),`number`}break}}throw new z(`expression-type`,`Unsupported expression.`,0)}function Nt(e,t,n=`expression-eval`){throw new z(n,e,t)}function Pt(e){if(typeof e!=`object`||!e||Array.isArray(e))throw new z(`expression-value`,`Expression environment must be an object.`,0)}function Ft(e,t,n){if(e===null)return null;if(typeof e==`string`){let r=yt(e);if(r)throw new z(`expression-budget`,`Variable "${t}": ${r}`,n);return e}if(typeof e==`boolean`)return e;if(typeof e==`number`){if(!Number.isFinite(e))throw new z(`expression-value`,`Variable "${t}" must be a finite number.`,n);return e}if(Array.isArray(e)){let r=_t(e);if(r)throw new z(r.code,`Variable "${t}": ${r.message}`,n);return e}throw new z(`expression-value`,`Variable "${t}" has an invalid value type.`,n)}function It(e,t,n){return Pt(e),Object.prototype.hasOwnProperty.call(e,t)||Nt(`Variable "${t}" is not declared.`,n,`expression-unknown-name`),Ft(e[t],t,n)}function Lt(e,t,n=`Expected a number`){return typeof e==`number`&&Number.isFinite(e)||Nt(`${n}.`,t,`expression-type`),e}function Rt(e,t,n=`Expected a boolean`){return typeof e!=`boolean`&&Nt(`${n}.`,t,`expression-type`),e}function zt(e,t,n=`Expected a string`){return typeof e!=`string`&&Nt(`${n}.`,t,`expression-type`),e}function Bt(e,t,n){Array.isArray(e)||Nt(`${n}.`,t,`expression-type`);for(let r of e)typeof r==`number`&&Number.isFinite(r)||Nt(`${n}.`,t,`expression-type`);return e}function Vt(e,t){let n=_t(e);return n&&Nt(n.message,t,n.code),e}function Ht(e,t){try{return t()}catch(t){throw t instanceof P?new z(t.code,t.message,e):t}}function Ut(e,t){return Number.isNaN(e)&&Nt(`The result is undefined.`,t,`expression-domain`),Number.isFinite(e)||Nt(`The result is not a finite number.`,t,`expression-number`),e}function Wt(e,t){let n=Array.from(e),r=Array.from(t),i=Math.min(n.length,r.length);for(let e=0;e<i;e+=1){let t=n[e].codePointAt(0),i=r[e].codePointAt(0);if(t!==i)return t<i?-1:1}return n.length===r.length?0:n.length<r.length?-1:1}function Gt(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}return!1}function Kt(e,t){return qt(e,t,{steps:0},1)}function qt(e,t,n,r){switch(n.steps+=1,n.steps>ft&&Nt(`Expression evaluation exceeded the step limit.`,e.start,`expression-budget`),r>pt&&Nt(`Expression evaluation is nested too deeply.`,e.start,`expression-budget`),e.kind){case`literal`:return e.value;case`reference`:return It(t,e.name,e.start);case`unary`:{let i=qt(e.operand,t,n,r+1);if(e.operator===`!`)return!Rt(i,e.start,`Logical not requires a boolean`);let a=Lt(i,e.start,`Unary ${e.operator} requires a number`);return Ut(e.operator===`-`?-a:a,e.start)}case`binary`:{if(e.operator===`&&`||e.operator===`||`){let i=Rt(qt(e.left,t,n,r+1),e.start,`Logical operators require booleans`);return e.operator===`&&`&&!i?!1:e.operator===`||`&&i?!0:Rt(qt(e.right,t,n,r+1),e.start,`Logical operators require booleans`)}let i=qt(e.left,t,n,r+1),a=qt(e.right,t,n,r+1);switch(e.operator){case`+`:if(typeof i==`number`&&typeof a==`number`)return Ut(i+a,e.start);if(typeof i==`string`&&typeof a==`string`){let t=i+a;return t.length>mt&&Nt(`String result exceeds the length limit.`,e.start,`expression-budget`),t}Nt(`Operator "+" requires two numbers or two strings.`,e.start,`expression-type`);case`-`:case`*`:case`/`:case`%`:{let t=Lt(i,e.start,`Operator "${e.operator}" requires a number`),n=Lt(a,e.start,`Operator "${e.operator}" requires a number`);return(e.operator===`/`||e.operator===`%`)&&n===0&&Nt(`Division by zero.`,e.start,`expression-divide-by-zero`),Ut(e.operator===`-`?t-n:e.operator===`*`?t*n:e.operator===`/`?t/n:t%n,e.start)}case`==`:case`!=`:{let t=Ot(i),n=Ot(a);t!==n&&t!==`null`&&n!==`null`&&Nt(`Equality comparison requires matching types.`,e.start,`expression-type`);let r=Gt(i,a);return e.operator===`==`?r:!r}case`<`:case`<=`:case`>`:case`>=`:{let t;return typeof i==`number`&&typeof a==`number`?t=i===a?0:i<a?-1:1:typeof i==`string`&&typeof a==`string`?t=Wt(i,a):Nt(`Comparison operator "${e.operator}" requires two numbers or two strings.`,e.start,`expression-type`),e.operator===`<`?t<0:e.operator===`<=`?t<=0:e.operator===`>`?t>0:t>=0}}break}case`conditional`:return qt(Rt(qt(e.test,t,n,r+1),e.start,`Conditional test must be a boolean`)?e.consequent:e.alternate,t,n,r+1);case`array`:{let i=[];for(let a of e.elements)i.push(qt(a,t,n,r+1));return Vt(i,e.start)}case`index`:{let i=qt(e.target,t,n,r+1),a=Lt(qt(e.index,t,n,r+1),e.start,`Array index must be a number`);return Number.isSafeInteger(a)||Nt(`Array index must be a finite integer.`,e.start,`expression-index`),Array.isArray(i)||Nt(`Index access requires an array.`,e.start,`expression-type`),a<0||a>=i.length?null:i[a]}case`call`:{let i=e.args.map(e=>qt(e,t,n,r+1));switch(e.name){case`abs`:case`sqrt`:case`floor`:case`ceil`:case`round`:case`sin`:case`cos`:case`tan`:case`asin`:case`acos`:case`atan`:case`exp`:case`log`:{let t=Lt(i[0],e.start,`Function ${e.name} requires a number`);e.name===`sqrt`&&t<0&&Nt(`sqrt requires a non-negative argument.`,e.start,`expression-domain`),e.name===`log`&&t<=0&&Nt(`log requires a positive argument.`,e.start,`expression-domain`),(e.name===`asin`||e.name===`acos`)&&(t<-1||t>1)&&Nt(`${e.name} requires an argument between -1 and 1.`,e.start,`expression-domain`);let n;switch(e.name){case`abs`:n=Math.abs(t);break;case`sqrt`:n=Math.sqrt(t);break;case`floor`:n=Math.floor(t);break;case`ceil`:n=Math.ceil(t);break;case`round`:n=Math.round(t);break;case`sin`:n=Math.sin(t);break;case`cos`:n=Math.cos(t);break;case`tan`:n=Math.tan(t);break;case`asin`:n=Math.asin(t);break;case`acos`:n=Math.acos(t);break;case`atan`:n=Math.atan(t);break;case`exp`:n=Math.exp(t);break;default:n=Math.log(t)}return Ut(n,e.start)}case`min`:case`max`:{let t=Lt(i[0],e.start,`Function ${e.name} requires a number`);for(let n=1;n<i.length;n+=1){let r=Lt(i[n],e.start,`Function ${e.name} requires a number`);t=e.name===`min`?Math.min(t,r):Math.max(t,r)}return Ut(t,e.start)}case`pow`:return Ut(Lt(i[0],e.start,`Function pow requires a number`)**+Lt(i[1],e.start,`Function pow requires a number`),e.start);case`clamp`:{let t=Lt(i[0],e.start,`Function clamp requires a number`),n=Lt(i[1],e.start,`Function clamp requires a number`),r=Lt(i[2],e.start,`Function clamp requires a number`);return n>r&&Nt(`clamp lower bound cannot exceed upper bound.`,e.start,`expression-domain`),Ut(Math.min(r,Math.max(n,t)),e.start)}case`len`:{let t=i[0];if(typeof t==`string`)return tt(t);if(Array.isArray(t))return t.length;Nt(`Function len requires a string or array.`,e.start,`expression-type`)}case`contains`:{let t=i[0],n=i[1];if(typeof t==`string`)return t.includes(zt(n,e.start,`Function contains requires a string member`));if(Array.isArray(t)){if(typeof n==`string`){for(let n of t)typeof n!=`string`&&Nt(`Function contains requires a string member for a string array.`,e.start,`expression-type`);return t.includes(n)}if(typeof n==`number`&&Number.isFinite(n)){for(let n of t)typeof n!=`number`&&Nt(`Function contains requires a numeric member for a numeric array.`,e.start,`expression-type`);return t.includes(n)}Nt(`Function contains requires a string or numeric member.`,e.start,`expression-type`)}Nt(`Function contains requires a string or array.`,e.start,`expression-type`)}case`sum`:{let t=Bt(i[0],e.start,`Function sum requires a numeric array`);return Ht(e.start,()=>he(t))}case`average`:{let t=Bt(i[0],e.start,`Function average requires a numeric array`);return Ht(e.start,()=>ge(t))}case`minOf`:{let t=Bt(i[0],e.start,`Function minOf requires a numeric array`);return Ht(e.start,()=>_e(t))}case`maxOf`:{let t=Bt(i[0],e.start,`Function maxOf requires a numeric array`);return Ht(e.start,()=>ve(t))}case`formatNumber`:{let t=i[0]===null?null:Lt(i[0],e.start,`Function formatNumber requires a number or null`),n=i[1]===void 0?2:Lt(i[1],e.start,`Function formatNumber requires numeric fraction digits`),r=i[2]===void 0?`en-US`:zt(i[2],e.start,`Function formatNumber requires a string locale`),a=i[3]===void 0||Rt(i[3],e.start,`Function formatNumber requires a boolean grouping flag`);return Ht(e.start,()=>de(t,n,r,a))}case`formatPercent`:{let t=i[0]===null?null:Lt(i[0],e.start,`Function formatPercent requires a number or null`),n=i[1]===void 0?0:Lt(i[1],e.start,`Function formatPercent requires numeric fraction digits`),r=i[2]===void 0?`en-US`:zt(i[2],e.start,`Function formatPercent requires a string locale`);return Ht(e.start,()=>fe(t,n,r))}case`formatScientific`:{let t=i[0]===null?null:Lt(i[0],e.start,`Function formatScientific requires a number or null`),n=i[1]===void 0?2:Lt(i[1],e.start,`Function formatScientific requires numeric fraction digits`),r=i[2]===void 0?`en-US`:zt(i[2],e.start,`Function formatScientific requires a string locale`);return Ht(e.start,()=>pe(t,n,r))}case`formatCurrency`:{let t=i[0]===null?null:Lt(i[0],e.start,`Function formatCurrency requires a number or null`),n=i[1]===void 0?`USD`:zt(i[1],e.start,`Function formatCurrency requires a string currency code`),r=i[2]===void 0?2:Lt(i[2],e.start,`Function formatCurrency requires numeric fraction digits`),a=i[3]===void 0?`en-US`:zt(i[3],e.start,`Function formatCurrency requires a string locale`);return Ht(e.start,()=>L(t,n,r,a))}case`trim`:return Ht(e.start,()=>xe(zt(i[0],e.start,`Function trim requires a string`)));case`lower`:return Ht(e.start,()=>Se(zt(i[0],e.start,`Function lower requires a string`)));case`upper`:return Ht(e.start,()=>Ce(zt(i[0],e.start,`Function upper requires a string`)));case`startsWith`:return Ht(e.start,()=>we(zt(i[0],e.start,`Function startsWith requires a string`),zt(i[1],e.start,`Function startsWith requires a string search value`)));case`endsWith`:return Ht(e.start,()=>Te(zt(i[0],e.start,`Function endsWith requires a string`),zt(i[1],e.start,`Function endsWith requires a string search value`)));case`replace`:{let t=zt(i[0],e.start,`Function replace requires a string`),n=zt(i[1],e.start,`Function replace requires a string search value`),r=zt(i[2],e.start,`Function replace requires a string replacement`);return Ht(e.start,()=>Ee(t,n,r))}case`slice`:{let t=zt(i[0],e.start,`Function slice requires a string`),n=Lt(i[1],e.start,`Function slice requires a numeric start index`),r=i[2]===void 0?void 0:Lt(i[2],e.start,`Function slice requires a numeric end index`);return Ht(e.start,()=>Oe(t,n,r))}case`dateCompare`:{let t=zt(i[0],e.start,`Function dateCompare requires a date string`),n=zt(i[1],e.start,`Function dateCompare requires a date string`);return Ht(e.start,()=>Me(t,n))}case`dateDiff`:{let t=zt(i[0],e.start,`Function dateDiff requires a date string`),n=zt(i[1],e.start,`Function dateDiff requires a date string`),r=i[2]===void 0?`days`:zt(i[2],e.start,`Function dateDiff requires a string unit`);return Ht(e.start,()=>Ne(t,n,r))}}break}}throw new z(`expression-eval`,`Unsupported expression.`,0)}var Jt=new Map;function Yt(e){if(typeof e!=`string`)throw new z(`expression-syntax`,`Expression must be a string.`,0);if(e.length>ct)throw new z(`expression-budget`,`Expression exceeds the ${ct}-character limit.`,0);let t=Jt.get(e);if(t)return t;let n=new Et(e),r=n.parse(),i=[...n.dependencies],a=Object.freeze({source:e,dependencies:i,evaluate(e){return Kt(r,e)},inferType(e){return Mt(r,e)}});if(Jt.size>=gt){let e=Jt.keys().next().value;e!==void 0&&Jt.delete(e)}return Jt.set(e,a),a}function Xt(e){if(e.length>ht)throw new z(`expression-budget`,`Interpolation template exceeds the length limit.`,0);let t=[],n=0;for(;;){let r=e.indexOf(`{{`,n);if(r<0){n<e.length&&t.push({kind:`text`,value:e.slice(n)});break}r>n&&t.push({kind:`text`,value:e.slice(n,r)});let i=r+2,a=``,o=!1;for(;i<e.length;){let t=e[i];if(a!==``){if(t===`\\`){i+=2;continue}t===a&&(a=``),i+=1}else if(t===`"`||t===`'`)a=t,i+=1;else{if(t===`{`&&e[i+1]===`{`)throw new z(`expression-interpolation`,`Interpolations cannot be nested.`,i);if(t===`}`&&e[i+1]===`}`){o=!0;break}i+=1}}if(!o)throw new z(`expression-interpolation`,`Interpolation is missing }}.`,r);let s=e.slice(r+2,i);if(s.trim()===``)throw new z(`expression-empty`,`Interpolation expression is empty.`,r+2);t.push({kind:`expression`,source:s,start:r+2}),n=i+2}return t}function Zt(e){try{return Yt(e.source)}catch(t){throw t instanceof z?new z(t.code,t.message,e.start+t.offset):t}}function Qt(e,t,n){try{return e.evaluate(t)}catch(e){throw e instanceof z?new z(e.code,e.message,n+e.offset):e}}function $t(e,t){if(e===null)return``;if(typeof e==`string`)return e;if(typeof e==`number`){if(!Number.isFinite(e))throw new z(`expression-value`,`Cannot display a non-finite number.`,t);return String(e)}if(typeof e==`boolean`)return e?`true`:`false`;throw Array.isArray(e)?new z(`expression-type`,`Cannot insert an array as text; convert it with a function such as len first.`,t):new z(`expression-type`,`Cannot display this value as text.`,t)}function en(e,t){let n=[],r=0;for(let i of e){let e;if(e=i.kind===`text`?i.value:$t(Qt(Zt(i),t,i.start),i.start),r+=e.length,r>mt)throw new z(`expression-budget`,`Interpolation result exceeds the length limit.`,0);n.push(e)}return n.join(``)}function tn(e,t){if(typeof e!=`string`)throw new z(`expression-interpolation`,`Interpolation template must be a string.`,0);if(e.length>ht)throw new z(`expression-budget`,`Interpolation template exceeds the ${ht}-character limit.`,0);return e.includes(`{{`)?en(Xt(e),t):e}function nn(e){if(typeof e!=`string`)throw new z(`expression-interpolation`,`Interpolation template must be a string.`,0);let t=new Set;for(let n of Xt(e))if(n.kind===`expression`)for(let e of Zt(n).dependencies)t.add(e);return[...t]}var B=class extends Error{code;offset;constructor(e,t,n=0){super(t),this.name=`LatexError`,this.code=e,this.offset=n}},rn=5e4,an=2e4,on=5e3,sn=120,cn=2e4,ln=1e3,un=2e3,dn=5,fn=1e6,pn=new Set([`quad`,`qquad`,`enspace`,`thinspace`,`medspace`,`thickspace`,`negthinspace`,`displaystyle`,`textstyle`,`scriptstyle`,`scriptscriptstyle`,`limits`,`nolimits`]),mn={alpha:`alpha`,beta:`beta`,gamma:`gamma`,theta:`theta`,omega:`omega`,lambda:`lambda`,mu:`mu`,sigma:`sigma`},hn=new Set([`sin`,`cos`,`tan`,`arcsin`,`arccos`,`arctan`,`exp`,`ln`,`log`,`min`,`max`]),gn={"{":`lbrace`,"}":`rbrace`,"|":`vert`,"%":`percent`,"&":`amp`,"#":`hash`,_:`underscore`,$:`dollar`};function _n(e){let t=[],n=0,r=(e,n,r)=>{if(t.length>=an)throw new B(`latex-budget`,`Math input contains too many tokens.`,r);t.push({kind:e,value:n,offset:r})};for(;n<e.length;){let t=e[n];if(t===` `||t===` `||t===`\r`||t===`
|
|
12
12
|
`)n+=1;else if(t===`%`)for(;n<e.length&&e[n]!==`
|
|
@@ -28,41 +28,41 @@ Error generating stack: `+e.message+`
|
|
|
28
28
|
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
29
29
|
`,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=gc(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}bc.peek=xc;function bc(e){return e.value||``}function xc(){return`<`}Sc.peek=Cc;function Sc(e,t,n,r){let i=uc(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function Cc(){return`!`}wc.peek=Tc;function wc(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Tc(){return`!`}Ec.peek=Dc;function Ec(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function Dc(){return"`"}function Oc(e,t){let n=Jr(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))}kc.peek=Ac;function kc(e,t,n,r){let i=uc(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(Oc(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Ac(e,t,n){return Oc(e,n)?`<`:`[`}jc.peek=Mc;function jc(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Mc(){return`[`}function Nc(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Pc(e){let t=Nc(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Fc(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Ic(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Lc(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Fc(n):Nc(n),s=e.ordered?o===`.`?`)`:`.`:Pc(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if(o!==`*`&&o!==`-`||!t||t.children&&t.children[0]||n.stack[n.stack.length-1]!==`list`||n.stack[n.stack.length-2]!==`listItem`||n.stack[n.stack.length-3]!==`list`||n.stack[n.stack.length-4]!==`listItem`||n.indexStack[n.indexStack.length-1]!==0||n.indexStack[n.indexStack.length-2]!==0||n.indexStack[n.indexStack.length-3]!==0||(c=!0),Ic(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function Rc(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function zc(e,t,n,r){let i=Rc(n),a=n.bulletCurrent||Nc(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Bc(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function Vc(e,t,n,r){if(!e.children.some(function(e){return $s(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function Hc(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Uc.attention=Wc,Uc.peek=Gc;function Uc(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function Wc(e,t){return{construct:`strong`,markers:Hc(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function Gc(e,t,n){return n.options.strong||`*`}function Kc(e,t,n,r){let i=t?t.children:[],a=i.indexOf(e);return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})}function qc(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Jc(e,t,n){let r=(Ic(n)+(n.options.ruleSpaces?` `:``)).repeat(qc(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Yc={blockquote:ec,break:ic,code:cc,definition:dc,emphasis:pc,hardBreak:ic,heading:yc,html:bc,image:Sc,imageReference:wc,inlineCode:Ec,link:kc,linkReference:jc,list:Lc,listItem:zc,paragraph:Bc,root:Vc,strong:Uc,text:Kc,thematicBreak:Jc};function Xc(){return{enter:{table:Zc,tableData:tl,tableHeader:tl,tableRow:$c},exit:{codeText:nl,table:Qc,tableData:el,tableHeader:el,tableRow:el}}}function Zc(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Qc(e){this.exit(e),this.data.inTable=void 0}function $c(e){this.enter({type:`tableRow`,children:[]},e)}function el(e){this.exit(e)}function tl(e){this.enter({type:`tableCell`,children:[]},e)}function nl(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,rl));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function rl(e,t){return t===`|`?t:e}function il(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
30
30
|
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
31
|
-
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Xs(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=Yc.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function al(){return{exit:{taskListCheckValueChecked:sl,taskListCheckValueUnchecked:sl,paragraph:cl}}}function ol(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:ll}}}function sl(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function cl(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function ll(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Yc.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function ul(){return[ps(),Ls(),Hs(),Xc(),al()]}function dl(e){return{extensions:[ms(),Rs(e),Us(),il(e),ol()]}}var fl={tokenize:El,partial:!0},pl={tokenize:Dl,partial:!0},ml={tokenize:Ol,partial:!0},hl={tokenize:kl,partial:!0},gl={tokenize:Al,partial:!0},_l={name:`wwwAutolink`,tokenize:wl,previous:jl},vl={name:`protocolAutolink`,tokenize:Tl,previous:Ml},yl={name:`emailAutolink`,tokenize:Cl,previous:Nl},bl={};function xl(){return{text:bl}}for(var Sl=48;Sl<123;)bl[Sl]=yl,Sl++,Sl===58?Sl=65:Sl===91&&(Sl=97);bl[43]=yl,bl[45]=yl,bl[46]=yl,bl[95]=yl,bl[72]=[yl,vl],bl[104]=[yl,vl],bl[87]=[yl,_l],bl[119]=[yl,_l];function Cl(e,t,n){let r=this,i,a;return o;function o(t){return!Pl(t)||!Nl.call(r,r.previous)||Fl(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Pl(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(gl,u,l)(t):t===45||t===95||ui(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&li(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function wl(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!jl.call(r,r.previous)||Fl(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(fl,e.attempt(pl,e.attempt(ml,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Tl(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Ml.call(r,r.previous)&&!Fl(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(li(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||fi(t)||gi(t)||vi(t)||_i(t)?n(t):e.attempt(pl,e.attempt(ml,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function El(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Dl(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(hl,c,s)(t):t===null||gi(t)||vi(t)||t!==45&&_i(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Ol(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(hl,t,a)(o):o===null||gi(o)||vi(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function kl(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||gi(o)||vi(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||gi(e)||vi(e)?t(e):r(e)}function a(e){return li(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):li(t)?(e.consume(t),o):n(t)}}function Al(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return ui(e)?n(e):t(e)}}function jl(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||gi(e)}function Ml(e){return!li(e)}function Nl(e){return!(e===47||Pl(e))}function Pl(e){return e===43||e===45||e===46||e===95||ui(e)}function Fl(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var Il={tokenize:Wl,partial:!0};function Ll(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Vl,continuation:{tokenize:Hl},exit:Ul}},text:{91:{name:`gfmFootnoteCall`,tokenize:Bl},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Rl,resolveTo:zl}}}}function Rl(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=ci(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function zl(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Bl(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||gi(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(ci(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return gi(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Vl(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||gi(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=ci(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return gi(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),bi(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Hl(e,t,n){return e.check(Ri,t,e.attempt(Il,t,n))}function Ul(e){e.exit(`gfmFootnoteDefinition`)}function Wl(e,t,n){let r=this;return bi(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Gl(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&ti(o,o.length,0,ji(s,e.slice(r+1,n),t)),ti(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),ti(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Ai(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Ai(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Kl=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){ql(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function ql(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function Jl(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Yl(){return{flow:{null:{name:`table`,tokenize:Xl,resolveAll:Zl}}}}function Xl(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):V(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):H(t)?bi(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||gi(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,H(t)?bi(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return H(t)?bi(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||V(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return H(t)?bi(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||V(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||V(n)?(e.exit(`tableRow`),t(n)):H(n)?bi(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||gi(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Zl(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Kl;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&($l(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Ql(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Ql(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Ql(f,t,o,i,n,d)):(o[0]=o[1],d=Ql(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&$l(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Jl(t.events,n))}return e}function Ql(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},eu(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=eu(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=eu(t.events,n[2]),a=eu(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},eu(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function $l(e,t,n,r,i){let a=[],o=eu(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function eu(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var tu={name:`tasklistCheck`,tokenize:ru};function nu(){return{text:{91:tu}}}function ru(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return gi(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return V(r)?t(r):H(r)?e.check({tokenize:iu},t,n)(r):n(r)}}function iu(e,t,n){return bi(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function au(e){return ii([xl(),Ll(),Gl(e),Yl(),nu()])}var ou={};function su(e){let t=this,n=e||ou,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(au(n)),a.push(ul()),o.push(dl(n))}var cu=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]),W;(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`})(W||={});var lu={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function uu(e){return e>=55296&&e<=57343}function du(e){return e>=56320&&e<=57343}function fu(e,t){return(e-55296)*1024+9216+t}function pu(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function mu(e){return e>=64976&&e<=65007||cu.has(e)}var G;(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`})(G||={});var hu=65536,gu=class{constructor(e){this.handler=e,this.html=``,this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=hu,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(du(t))return this.pos++,this._addGap(),fu(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,W.EOF;return this._err(G.surrogateInInputStream),e}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(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((this.html.charCodeAt(this.pos+t)|32)!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,W.EOF;let n=this.html.charCodeAt(t);return n===W.CARRIAGE_RETURN?W.LINE_FEED:n}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,W.EOF;let e=this.html.charCodeAt(this.pos);return e===W.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,W.LINE_FEED):e===W.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,uu(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===W.LINE_FEED||e===W.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){pu(e)?this._err(G.controlCharacterInInputStream):mu(e)&&this._err(G.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},_u;(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`})(_u||={});function vu(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}var yu=[8364,0,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,0,381,0,0,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,0,382,376];function bu(e){return e===0||e>=55296&&e<=57343||e>1114111}function xu(e){return bu(e)?65533:e>=128&&e<=159&&yu[e-128]||e}function Su(e){return bu(e)?65533:e}var Cu=(()=>{let e=new Uint8Array(127),t=0;for(let n=33;n<=126;n++)n!==34&&n!==36&&n!==92&&(e[n]=t++);return e})();function wu(e,t,n,r,i,a){let o=e.length,s=a*90,c=0,l=()=>{let t=Cu[e.charCodeAt(c++)];return t<a?t:t*91-s+Cu[e.charCodeAt(c++)]},u=n-r,d=n+i,f=new Int32Array(d);f.fill(-1,r,a),f.fill(-1,a+u,d);let p=new Int32Array(d),m=new Int32Array(d);function h(t,n){let r=0,i=n,a=n+t;for(;i<a;){let t=Cu[e.charCodeAt(c++)];if(t<89)r+=t,f[i++]=r;else if(t===89){let t=Cu[e.charCodeAt(c++)]+2;for(;t--;)f[i++]=++r}else{let t=Cu[e.charCodeAt(c++)];r+=89+(t<90?t*91+Cu[e.charCodeAt(c++)]:Cu[e.charCodeAt(c++)]*8281+Cu[e.charCodeAt(c++)]*91+Cu[e.charCodeAt(c++)]),f[i++]=r}}}h(r,0),h(u,a);let g=new Int32Array(i*2),_=0,v=0;function y(e,t){for(let n=0;n<e;n++){let e=t+n,r=l(),i=l();g[v*2]=r,g[v*2+1]=i,v+=1,p[e]=_;let a=(f[r]<0?m[r]:1)+(f[i]<0?m[i]:1);m[e]=a,_+=a}}y(i-a+r,a+u),y(a-r,r);let b=new Uint16Array(_),x=0;for(let e=0;e<v;e++)for(let t=0;t<2;t++){let n=g[e*2+t],r=f[n];if(r<0){let e=p[n],t=e+m[n];for(;e<t;)b[x++]=b[e++]}else b[x++]=r}let S=new Uint16Array(t),C=0;for(;c<o;){let t=Cu[e.charCodeAt(c++)];t>=a&&(t=t*91-s+Cu[e.charCodeAt(c++)]);let n=f[t];if(n<0){let e=p[t],n=e+m[t];for(;e<n;)S[C++]=b[e++]}else S[C++]=n}return S}var Tu=wu("!}.&u%}'&}*'~!6*)%&,~!J~!J~%L~y<~!R,~~%Lu~~#GD~~#|)1#%}^%}2%+#.##%##%}&%##%'#%##&%#%#'%#&#%#&#'#%%#&#%##%#)%''%&%#%#'%#%%#%%}%%%#%#&(23#%%#&-%0%('1#(##%#'##+%'*.:1}#%#6-+(%'%%#%%%}#L'2351&('%}&/N'(0(/*-%(%%}#'+&T%7.2}#&%&#%#36/5##%&%%#&#%%#))2%%##%&&'0~!#*+&'%1~!%).'3q?&%'1~!.##%6(~!+%%%(Gw'rT~!E#<nA%#jZ~!H%(~!42##~!*31&~!G%U~#)5~#`3~!J~!Z~%]~%Y~%C~!q~!u~#kz~%#~!6'~!D~!U~!?~#T~!c%~!G#'~%7|~!G~!J~!G&~#pb~(Df}#%}*&}#%##%##%##&#-}&'#'&%#.++}%mI,#,@&(}*%}*'%&##&#%##%}&0}#.},U},%}+%}&%}#%##&}B%(}(%}+%)})%##%#&}&%##%&}<%}>%#%&}*%}(%}9%}/%})%}*%}*%}?&}&%}3%}&*#%})%#%#)}#&#-#+*%E%%'%'#%}#*V##&##I}#&&##%&%#&&Qf%%))w/0+&%#(#.%-''''++++7}>%4'',##1,#%#&%##&#'##&#*#9)%&%}#*}%,#+P(%A&%#'&##wSD',9E00#y#@}(+}&%&>~!#~!X}#*}(&&}(&}(,%}%&#+&}#&}I%#%}%)#(},'%#*}4%%#%}(''}#/##(##),%-##%%)#&}(.}&%#&}%%}*&#%},&&}&%}#%*'#%})%}D&}&%}-&}6&#&}-,%}#%})-(~+`~,=?~I9'9%~!,#%})%})%}@%}?%}(~!?~#<~#pP~#BG~#=1#%K+~#?#~%;)~#A~#mF1~#A'~'X%'~#lR~#N~'N~#r~#m#-~#i'?%#'%~#B%##%,%#~#_%#0%~#]732~,w~2+#:&#%&'0%&>%}#>##F+)#%&&#(+_}4&}-%}(&}@&}O7Fdf0@+/v4}&WU##&/0#&'('B#%}.%}'+#%}#%%&#&%#%##+#&#)#6#'#.},%}c%},%#%##%&#&%#&~#>'*-.%##%##%}#%%}%'~#)D1}#%*&~#_%%'(~#S2%'.}#~#=##*'*-%}&'%'##&&~'E%.#&~#M4}%%##&'%#~#O1##%&#'+~#<B%##%%'%+~#;#@%}#&%#&&%#(~#H1}'%'##&&~#?A}&'~#D#%32}'&&&&~#[}'(#%}'~#;C})&}%%#%~#=&%,3}%'(#%%~#^'#&&)#%'~#Y%-~#d-%'~#^%%&#&&&}#~#b~2t*&'~&(~&@~0%~e~3}%*''0})&}+~!9##-}#%-hD*)1fC#%/&/fB#40~!+#)*4~!+~!K'&:~!/*7~!.#~!H~!L':~%x&~!H#~!*~%1~!I#~!+A~#p'~!F~~#-#~,,(~.Z~!V~%;'B'mq-W~!N~%I%#&&#&}#%},%%}'%}+X#%}#&}(%}'%}<%}#%}%%'}'%}:~![)9@~%>~#UA%-%##&~!C%~!-.9:~!1~!-^2/:a~!y,D*J#-5)/4~%23,~#G~!L1~!0X3`~!2+~!!0-~&E~!W~!o,>Y&]~%cZx_&~#O*9#A#'#+I'%#)~!0B*-5A+-((F&*M#)(-7-5+'-3a5Vi~!Y~!?+[)%3),ERHm~!+:D,VG.+)?fB%%*(%)'(#&80%1'8`K8?`+'Z#&O&'H5#*9)A%%5&3))0%39+.*7#()&&*=4@**L)<'_&*+..;(#*+)./&0#3)%')-8(4ixD(&.}%,('aI:,)%,k2231T)I'#/-W7,/'Q#.'Y24+h')37</31&83##&0#),H(?'&?/1##%#&&#%''-%&&&#(&''&#.-'%#%%(,')*'&#&#'##%(%(#%('#&##%%%%('%#%#%%#%#&%##h>w+v<ayvyvcg.uuhKr}g/v|g>u9i[~>g5uI~=RvdwEg;v/g;uk!!TTSx]@RT!U!#!@VBRUU!'UTe-d0c`e&gSdicedFcrdTaqb.kYcAohdYd@a3e+d}dMdtd.aJ#bqcK`dle/e.e'dwdPdodddjbEb}ogd^ofdpduc6j?l%d{drdqc)d7bacOdQ%T#Y)X.sR[yH>6Vyv3[xwLu>vo'!*.[yBacahoj>6Rew3[xqdZa#!a&#^(X-[yG>6Vyu3[xvg3sEr|g.u/Ri9db0T#^(Xa)!-[y;>6Vylg4wKs{JwNZt3@3r=c4Z([xlg;wKt!cpq's@v7A'*a(a+!-a#[y<3Dt?3Dt'>6Vym3[xmg9rxsNJwLZt4~?r?db1T#`-!(Xa,!0[yS>6Vz%NuQs.g4wKtnJwNZtS@3r>c4Z([y%g;wKtrdga8!a(!#&T*Y-Xa#!a0<or[yc3Dtq>6Vz43[y3JwNZtf@3s!Ju}!%Dti:pm3c_%X#tjB5pkd6q!r]u?voC'*-a.a2!0a&a+[yI3DtI3Ds~3DtH>6Vyw3[xx;:s#~<5pKJwNZtE@3r~d`a)!a2T#a.(!+U.X1[yT3Dt`3Dtv>6Vz&3[y&g9rxwzcxstPu.<rAJwLZtT~?r@dZa%!a.&^*Za(/Reu[ya>6Vz23[y1g3sEr}wkg{NuQRg{ci(U#5@b`~,cg#U(2WnH5wugcRh7dX#T(Y,a'Ta!!a,[yZ<]mj>6Vz,3[y+Pv#5ReZKu+=,%!H}7ABwkaS?Rh:BcW(X#<]mrj:ubv/ARekdg%!(!a.*Ta(Y.X1!#sP>Rl*Dt6[y>>6Vyo3Wf*jOvuumvuRgRJuq*!:9<B@bX~3jVv&v@s@5Re[d/rQt{uAvo&a&a*)a2!,0Wf!3Dt0=Bs'>6Re}3[xy~<5s%JwJZt1~Gs)c;&!#2sJkNuXvzq7rxu,Re8dka4!a8(aEZ+a@Y.X1Xa)[yd=Bs(3DtP>6Vz53[y4cX#X&Re:avRe9~<5s&JwJZtQ~Gs*i^rzvdRg+Jv{%!2sbB@bX}kdga,!Za?&^*T1/!a'Dt+[y6>6Vyf3Wf%g/u;s4hGu6?Rh-JvZ,!c%#&RoX54Rivj7uyvf8RgTKvZB%*!2sGh<vu5Rgq<=C::9bb~#dZ#T&Ta6Y.X*Dt>[y93Wf)coZ(T,6VyifluvRgC@95@B@bX~/hFu34cC#T,k/unq8w8Q5RkUklwQuzunq8w8Q5Rk8d/rJu?v8w9)-&!a0a;a&aIWejg3sEr/h1s<DtDJvyZqY5aws3Jvy!&Wei~Hr1:au5@Bag>23E~5c:Z&bX};kKv?w&unuVu5Rjc;>bs)#~@:Rh.=ay<a]C;b`}Vd6s/t{uAvoaxa()!a,a7%-a#a2Dt,[yF2Wo[>6Vyt3[xuNuPRi&NuPwpi#RoWh?vf8Ri%Jv]!%Ri:KvxD!.'2WeAjZu`q9rxu,Re7woeAg-unLq(qA_/*2Wg_g3u5q^9:4E}/jTrxrzv=Wkkd~0UX#^^Xa-a1a5T&a=U1a'*aEa]!a*aPaA-adok[y54Rn>;:p3~Dp5g9rpsFNvZqjg3uJp4~<5p0Pw;5qlJwNZt*@3p1Pw:5p/Ou!5p2JvG'!6Vye=<qnJvh_[xhg3v,Rh3kOwOw-sDuev/Re^dha[a%!%!a+#Ta7)-5TaCaO!aka!a)sf[yb2>Rl!9ARiq5E}Qg=ucRkBE|oJrJ_@Wk~@Wk{JrJ_@Wk|@WkyJrJ_@Wk}@WkzJvO_[y2g-vMRmiKuYC!)&>Ri;>Ri<@3RkNc](X#@9Rk=g5vuRmhKvDB!+'=]meg3u4Rmgd)#Y'Vz3CARmfd`a+!%T'!+#Ta1Ta6TaM-sTDt9[yA9sYd'%Y#s[[xpj:ueunaXRgEjRq,v-vuqdd2'`#6Rev<32@5>:2<E}5xIo9a*X#Y(;5RePJvD_g>vyRgNj8w)v8<wggs:RgXiZt|vjx,hSq3ah!-(~@:Ro/Ou!5RhWj^v(pyw8unRhUdx-UY#^Ua.a3a70!)%UX1TaDa)'omRiRRhE[y:3Dsz=Br,>6Vyj3[xkg6ruwjcqsrPw;5r*Ku]D'Zt-@3r(~?r.i[vwv]dU1a--U#`a4(g/vsRhPOu!5RhLj:rmu9Wo!~@:wdh@g/vsRiTjXuvvNr}:RhBj^v(pyw8unRn]dz1UYa'a+^Y(!aETZalaRY.Ta?a4[yDJw1!#qLsW>6Vyrfzq-pLflpwRe|Js>%!Dt@3Dt&Jvy_[xs~HrnjMuwpsw'RecKu+D#'!t<~Grl~?rjg5u-x,gwp{ah!-(~@:Rg~Ou!5Rh'jXuvvNr}:Rh#cW#X/c;&!#2sLi[v7u7RgpJv)(!iLrxu,Re6j7v@s@5Se[e7d`aW!Za(a`T.a#!a3!&aDa-!9)Dt_=6s+3[x~~DR|h~DS6avhGun5RkZj3w)v-]mkKunB!&*]kb97R|i<ARk<c:Z(6Vy}Juh'!wziMRoS:F|vkLuauJv5vtvQRh1d='T+Y#VyO~DR|jcF#T'7R|g97R|kJv3'!ay<Rj,Jvh&!:ReXcsa6*a+#a#_aIRf9aLRf?c,Z&Rf5Rf7c.Z&Rf;Rf>cQ#%T'p-Rf8Rf=ct#%'(*!,p,Rf4p+Rf6Rf:Rf<d~'Ua%U*^UYa(!a,-!#a4YaTalaEX0a8a<Weo3Dt/3Dsx=Br93Wen~Dr;~<5p<JwNZt2@3p=Pw:5p;Ou!5r3c7&!#:p>3Ds}KvGB)_6Vyk2sM=<r7x'eovA(!hFu1ARf}cV#X&@r5j6rvwQa^Rf3c=Za'wkghJv__g;unRggA53B9=b^}%j6uduo5Jq;!(hIv%2Re`Ou4ARe_e%a#^^^Xa&!a*a2!&a6YaP!*ad!#a:aE/5Rn?[y@>6Vyp;:pE~DrY~<5pBJwNZt8@3pCh=rt3rWPw:5pAJup_[xoNuPpF9c!#'45pD5ARn)d8#X'X*3@rU72s]h>v<<sSjJpqvewOJq/(!hNw'5ReBk0s2u3w/w'5ReE5@Jq.!a+JQ!&WeU23d(#Y&RjG5]jBk!u7w&u0udARjEe#+^^^Ub#!a2/a`Z(agT1!a-a;|@TaG!aS[yV=Re~fow'RguNuPRe?bz#'>RoUWeL>:Cbb|?JwPZtVg6ruRmzJvD'!6Vz(g/vmRh~Jvy_[y(g9voRgyx*cy(#2>Ri2B9b]~9kIw9u7rluJu3Rg]dI#a%UY'@=p%CAx.gQZ&RhwwygtRm{x5g_Z'+ABqR9Woa=Bp&dV#^*Xa'!&@o{g4v]Rk;Jv{!%Rk[wkkiA5RkiwwfUB=x,fUuqC&*!>RfTg8v0RfV~ARfSd;rJsAuAv9wR'ae+/aO!a@aza/a#[yQ@Wg!2Wemg3sEr0JvB_g>uvReWg2v+Re=KupB_+[y!2AbY~-~Hr2AJwD!(h<~El>h<~El?Kun@+_:9b`}Kg-v/Ri3g;vtwyk_9]k_d=&T#*U.6qh@Ab`|K9:H|CJv[!&3Dtex'fDwC%!Rf[9WlMd[(^X,!a%Z06Vz!@WgBg=v~Rgvg,QRe@awd,#Y+jTv|Q~EfWj]uNr|~FRfXdy#Y&^Ua%!aO.!(a)Ua;=!a@aKap!a-,a!Ta]a[rSa]p?[y82sK=Bq~;:p:~<5p8Pw:5p7d'#Y'Wf(;RnRi[u4w&RgJJvG'!6Vyh=<r#ijuuv/sIKuYD'ZtG@3p9~Gr&d2#`(g<vtRgFj`u5w&rqpxRf2CJuY!+:wfnTOu!5Rg}jNs1ucv&RfwJvA!&3@q|BDcC#T,k/unq8w8Q5RkTklwQuzunq8w8Q5Rk9dga#!a'!a=#a0!:+Tb*b@aO.a4!aba8aFJv^}?!VyR~Dr<g;u%Rn.~<5p[x'e`wNZtR@3p]Pw:5pZhNvjBp.woe_g5u-r4JwF!%DtO3:ooc7&!#:p^3DtpLuGw(!+%)Dtk6Vz#2sd=<r8d'#Y([y#<x3gJt`w@!)%}MRiowzikRij=]ilxAf3,U(#B2Rf#g0v-Rm[ck{`U#]giKv3>)!&6Ri154s,KuGB_%@r68r:dJ|t`#X(9<E|u2@H|rx3gJu?w'!+'1Nu7Reg4=H~+9<wxgY95Rm]xLggZ-`(X}U2:Ri4h<uOawRmsJv__5@bb{jbV~3dka#a'a]!,#a+U=a>b6a3b%!/aKa/)!arwve^VyJ;:pR~DpTg3uJpS~<5pOPw;5qmPw:5pNOu!5pQJvG'!6Vyx=<qoJvA!{~Jup!%@qk7Rn/KvyD!}''[xz;>wkh'?Rh,x8gyt`w5D!&),(SgyccRgztJ@3pPB5p#d'(Y#<]mmifubw&RgoJvE&!82s^JvF&!8Rf,ADb]~;x=h'rNu]vK!,%'*0RnORh)4Rh*AqQg-vaRnNg;wHwkh'ba~4cE#Ta*x3gctyw@'!+%RnFRnD<4Rn@hFvK5RnCxWg[#`&a0Ua()`1Rm75Rg[c]%X#qi8Rg^NvdRj>BwzgZauwji7Rm6A4wgg]d1#&(*,.0a#Rm;Rm<Rm=Rm>Rm?Rm@RmARmBe%#^^^Xaea?aC/b+(,!a+a#!a/!>a&Ta<aKbD!2wphBRnk[yPw}hE|.=Br-3Dtm>6Vy~g6urRf.x,hPrNav!%'RnqRo%Ro#Nu;q[Pw;5r+JwNZtM@3r)d'#Y'Weh;xChL#`&RnmRnoKu}>%(!Rne~Bs-;2wjcussJv+'!aYSO}6@B<5?ba~8LrNvj!.%*ROwungw~ng~:9;Ri^>wtnig;wHRnixDh@|(UZ.x1h@|)!#:2<H|*xHn]#-UX'3Ro)z=iT}6ARns=Bwsn_wpnaRncw]aR(#UXa&Ua*a/=]iPd'#Y&Ro'WnXf{QRm2hNvj]nZd`'T~&1`{|`#9b]{}c:'!#Wl{>@=be}]?cl{{U#:5Abb}Jds#^YaF!a*b4a#a3aPa>&Tb!bH!*a_!Eau?/a&RjY<]gj>6Vz*;:pe~DrZg,QRj1JwNZtX@wihspcJvZ&!VyX9WmOJu|!|N2WmHJvh&!]ht~Bpbcn&T(!#RmQ<s7Nu;padH#X'`+WmJ@>RmKCARhnKup=!)&Wf+:RhqNuPpf9c!#'45pd5AwghpARn(Ls@w!%,)!RmP@Wfe<E|IJva!&WmNg8vsRmLd`*.`#Y'Xa!axRn*]hrA8Rhug5s@rXg8u!RmMd8#X'X*3@rV72smdI*#UY&RmICARho~GsgxVgd)Ta'U-Y&Xa!T#RnEWnA@Wffg1uDRi0hFvK5RnBxGnG&#`%owp)@wsf+bX}Ze-*1!a*^^^Ua|!#a.aq&Ya2!a>.a6!a:aO`aJDtL[y`@Wg#>6Vz12@wzoYRoZNuPRi!NuPRhzg=ucRi,@=b`{Yg=ucRi-ACJvB!&Sh[ebSh]ebi`wUuFRm4Jw2_[y0JvB!.<Ju(!&SoG}6Shd}6<Ju(!&SoH}6She}6Kur@._g5vHRieJvx!{L2G{Kx6gd'T#?Rh82Wi5cZ#X(g1w)Rm5dW-Y(Ta#!a)!#aYa=wnfE=su2>>bU{0j9udv:<svj8uQv-7RgHdE%#^'sq9sp=>Bb_{TJv`!&g/r|snj6v(us5d,#Y(56H}[978H}]Jw5!&g1rushJvB!+j;v{u5?zDhd}6}bj;v{u5?zDhe}6}ce*#`(^^^a[aea!=!a6a*aoXb1a.!aAbL!b>,b'aL!aV@Wf|2Wlg3[y/JwNZt^@3piPw:5pgJunZou3@rsJva&!Vy_g<v~Rm#JvG'!6Vz0=<r{Ju{%!:pj@WfsiXuJu3Rm:JvZ&!WfA~Bph@c4Z&Dtwax5rubx(#:awRk1@d,#Y&RfjRfid1#,Y(@Wfp2Wlrg5s@ryKu[@!,'=]ig9wlk?Rk>g5u-rqJvy'!@9RkQcH(T#=>Ri~@<wkj(Wj(KuZB*!&<7rw@9RkRcH(T#=>Ri}@<wkj)Wj)dg(Ta2Xa9X#`-!a*CARhg@@=I}d9x;c~#X%so=<sj>2@@=aybb}XjWv0Q~EfEj3vLv;<d,#Y(56H}`978H}_dgaPaFa'a/!#a3Y0a_a;a|!1(a7-[yE3[xt;:pJNvZrrg3uJrvJwNZt=@3pIh=rt3rxPw:5pGOu!5rpJvG'!6Vys=<rz@c4Z&Dt(ax5rtJvZ!&~BpH@wsfNg-vaRlNci*U#=<wei<F}a5@Jq.!a*JQ!%@qZ23d(#Y&RjH5]jCk!u7w&u0udARjFd/prq=tyvpaEa(a:.!a1aZ(@@=I}:9wpd%=<sX55w_h}@@=I{t=ay<aU@@=I}T=ay<2@@=I})?C9:9au@9Cb]}DP~=x-fAZ(2Wl1=ay<aU@@=I}>5@d##Y+jTv|vV~EfFj]uNpn~FRfGdgaK!Z2&!a8a-Tb({E!acTbM*!a(DtY[yYd'%Y#sl[y*hHvh>Re5x2c{Z}.j4uCvcawRiMd+#X+_x&d!},<5RkX;2Hzw@x,gavfB-!{CcF&T#Roe;RodwWbBg5urRgaKvHC*_6Vz+<4opieuew&Rmq@d]&Y)X,T#X0Rh}<BqP=4qS9:ReMg/ujReNJw0!/<Jui%!bd{kawwnemRelAxUa?a3#*.&UX(Ya+a/RhvRnQ<o}9Wmtd-#Y&RgSRmw9;Rmxay=Rmyg-vaRmuxEhSrNu,v-voC!%(aR.a(a7+1Ro1>Ro5CE{A9b]{@;5x#eO{:g;urRi+KrNA!%(Ro3>Ro79;Ri_Ku@>{;&!x%gX|{KunA_+g5QRj/g3u5Rj#g>uERj%wio/xRhS&!,!#^1U}wba{8>>@=be}qC@:D5ba{7Ku+A&!}x?ba}t>>@=be}se(aA^^^Uat!b0#{pa+awUazbGa#aLb9bgaWac'a5TbS=Br!d1#`%scp_Jvl!#rT>Re0JvX&!VyN=H{Fcm#U&:pY=ReaJv2&!]h0=]nUJvG'!6Vy|=<r%JrM_=]h2@Wlud'#)U'Wf'b]{i=]h/Jvh!&~BpWg=v]RnMx+ny#'Nu;pVwjnu=]nwxJnx,T#`&Reqwjnt=]nvieu9vrRjLLuYwP(#+!th@wih5pX~Gr'g5v/Rh4KunA'!-CARnP@wwiN:Rm_9x'cvw>!|l=<saKvAA!0&3@q}>w^e1bp#&Re2Re3BDx7gH#T|f5H|eKuZ>!%(:qNAH{]Jv6!+3B2B9=b^{X<5<B92:E{ZLvhwA(a;a%!igQuyRmad+#Y}m@3Rh5d8#X'X*:AqUAHzmaxwbh<aXRnVcF}RT#Nw&cj#U(BWnug/vsRntdka)(a3+.Zb7aYYan1!bVa@Xa}[y^@b[{G=H{+hFu73Rj&Pv#5ReQcK%T#sig1v{Rj'Ku+D#'!t]~Grm~?rkKuMB!01d5#`'Vy.ta3Dtu~Hroc8#'{^45s85AwZbP&!#Rn!wghxWn#KvEA!)&2RlA2RlBx:h|#(T,=]j09Wobz>x]z/@awRoTd+#Y(az]hFhCrm4d,#Y+jTv|Q~EfMj]uNr|~FRfOdCa!Xa9_X#@<plJvf!%b`{(9;Rgwc;.!#2x7cw#T|UDb]|T5Ju={(!=@E{&Jv)&!Ab`{'awJvf!~*>>@=be{#KuY>!+&4Ezyi[ugv&RjIdea+T)#UXa&T-T&a!Rh9auRmW=]kLg5vuRn+g3u4Rn-Ow6ARn,hHus5xNk?#UX(U~)/g8v0RkD~AwkkF?Ri.OuNBwkkA?Ri/d|a2`a*^UYa.!aBTZaTa'Xa;!(!2!-a#b2[yC>6Vyq3[xr2Wi?g1rusVh%s?DtF~<5rbJs;%!DtBfswKtCj[uvuSsEu3RgVx3o:u+wN'*Zt;@3rd~Grh~?rfg8w)Lq)qE&-a%!>bI|`jWv0vV~EfCjTv|vV~Ef@j]uNpn~FRfBcK#T']gWNu7x,k7q4ai(0!hHv8<RhmkMu9vrsBuev/RhlCJvB!,g<v{wchh~@:Rhji[vrv{wchi~@:RhkdS&a5UY#Ta!RgPwwiI5BwciI~@:Rh`x'iJvj'!5]iJPu8Bwch]~@:Rhach)U#h3rp]gLh@t|Ax,hTq3ah!-(~@:Ro0Ou!5RhXj^v(pyw8unRhVd|)`,^UYas!a?/a2Z'a^Ta{Tb7Ta(a#!a,Wf&9sZ3DtAadamov=Bqt3[xig8vsRm~>waiL2b`{QJv*_Ouv2qgj<v]v2BqfdR'X*X#Y-@3qr~Gqv~?p6hHv-]glPup5Lq+q?_%*b_{qF{n9b^{rOu4ARhpKvCD!+&~Bqp:5Dbb}nwoiKl&unuTuBv]v+ueunaXRf0=Jvh!0nKufu8v1w&w7q%w&uHrz:Rgnj5w,uxDJq/(!hNw'5ReCk0s2u3w/w'5ReFd>Za&!*UaA=<wkgsRnSJv^!%Refifw3vyRgOKu_B'!,<]gkiiu:w&Rh<=C@a^<B57@2F{[<B5@aW:=3away9A5aW=<B=C@a^<B57@2F{Ie-#`(^^^bCara.b8aza6!/bZ,!adTbnTbOb+aFaS!aAT9@Wf~2Wli3Dtl2@d,#Y&RfnRfmJwJZtN~GqyJva&!VyMg<v~Rm%iXuJu3Rm9Jv[_=]ih9wlkDRkCd1#`(@Wg>2Wls3cH#T(@<Rj*=>Ri|b~'#23s9h<~El.d'#Y&Dtxi^rzvdRl#d*#U%(o|B2s`hJwSaxRmDKv4B&!1:Rmdd5#`'Vx}to~Hq{x'f1v3(!BA5ba|bJv_&!Wfug1v]ReIdO+U/Y#&G}-8wze=Rh{g1v]ReHg/uQRf/by#)ibQwERl/cH#T(@<Rj+=>Ri{cNu+vlax-!(#a0qa9<Rii2;;bU{H;x<i=&X#Rk`<4wwi=C9H~8xAI(Y#<azRi@45wXI<B9;5bb~7dL(X#Xa(+!aL6Vy{g5QqOau:5au2@ay547EzbxOcU(UX-T#Ta#:Cbb|A?wjh/b_|SOw6ARgtihr}u7Rhy<d1#T)X1@@=I|~=ay<2@@=aybb}Sj3vLv;<d,#Y(56H}A978H}@dGpvs@uAu`vcw9*!aFa+ai%(b!aXa8.a?a[ozWey=sU2@G}Nch&U#Rf_WexKu+D#'!t:~Gr`~?r^j]uNr|~FRg*j^psurwJt|RmcKv)@&!)7Rkv~Br[@wxfO:Rl3co#U'6Rezj_q#vIuavjRltwzeyh@vr5JqD0!>aY?C9:9au@9Cb]}9cl#U*5;5<H||jbuus1ucv&Rfvg1v~d/pppzqFr^a--a~!aMat1(hFv;Wiz@@=Izoj5uuv-7Rix~Cw`fk2WlVcZ#X,k)u3vWs@u2]ktg;wEx'fBq(_2Wg/jTv|vV~EfoJv]!15x'hzqG!(P~EfU~CRl_j6v(us5x4i-#T(2WmZ?C2F|d>Kq<aj1!*jTqIsBv=Wl`~Cw`fi2WlWj`v0u*~>RlR=c>Z,k#u3vWs@u2]kr<c1Z+jTqIsBv=Wla~Cw`fm2WlXdmb3!a{(arZa`bkTa%TbQTa-a9+c'!aM!/[yL=Bqug.w'RifhFvyDRj.g>vgwyk^9]k^Jv3_@WfbAARkhJw2_[x|JvB_wkoIRoKwkoJRoLd'(Y#<]gm=<9<H|yd'%_X#skDtb3awwqkgNulRkgdB#^',9:p'hJwSaxRmEBwVb8@4=H|qLu+w50&!)@3qs~?pU>Awwn;;Rn=c:Z'ARn<=<qwKvC@!/&~BqqJv6!&]eVb^z^xRge'/a%+^`#Sge}6<4Rn3=]n0Pw2>Rn8Jw0!&>Rn:>Rn6cY#a7+!a&=<wkaNw~h3z_c5Z{=wjh#=]nLKv^D!&)Vyz=bW|swYb<WetcG#T(2wxa@qVx@gD#Y&b^|V5JwG&!5bb|pg/w&RgD@x=kHs=uAvn!a%%/'+RmSRh694Ro`g-vaRmRhHv-]mlxCcS#`&ba~.5cD#Ta)P~=d,#Y(56H{>978H{Dd_#{2^Y%_+qbbb{6g3sERhsbU{?dfa.,`a(Xa<!aiX#(55RiG54RiHcI#T'WiU3RiVNvdwtfcRlKNvdd,#Y&RlHRlExQgf.1*^T'X#Sgf}6Wn4=]hfPrk>Rn7Jw0!&>Rn5>Rn9Lunw?&a2!,5<oq@@wqfdRlJj5Q~=d,#Y(~ARfcOuN]fdDKw;ay(}i!547E}j?cI#T(@5bV}iCbV}hdv(^^Tb?a40,b##Tbo!a*bR!a<b|a/!aKai!aU[yK=]o^g:v>ReGJwPZtK<7Rh+h<~El,Pv#5ReR@awwxjCg,ulRjDJv6&!]j!z?aQeeg>w=Sh<eeJw;!&axEzOg,Qosc!#*:wkeJ]eJ>x'h-u(!%Ro.w~h.zPdNZ(X,Ya![x{;9ReY;wkgxRiF:x?ap#Y&RmUg<s2Rkod]+UY0TZ'!a&A9sw<=bczLNvuw{gqzNhJwSaxRmCKuLay!#&s_Rf-55b^{uJvZa!!c%#(55Ri654wmiu5RiuawLu,vp!+}^%b_}Y9;wkgxba}o>A9:=b^}zKuh=a''!3awRk3c*'!#aHRk6c+Z&Rk5Rk4Jv)&!awRjSawd9*`#0?C2@EzMj8u<uJ5RmbjQrquJu3x,k>uq@_+=ayb^|W~ARkEOuN]k@7dhzV^X/X&a-#zRzSb`zXcJzTT#2WkVKvDBzW!%FzY9;5bbzWjQrquJu3Jw3%!b`zU=ayb^zQd:#X(T-a!6Vyywxh}=b]{Jg=u1RiAdGp~qHtzv!w(wA+a+a;<!aJaYai'anasb(=azRmV:Cbb{MLq2vb!%')RjuRjrRjtRjqx3jnqCw3!%')Rk(Rk+Rk&Rk)Lq2vb!%')Rj{RjxRjzRjwLq2vb!%')RjsRjpRjfRjex3jcqCw3!%')Rk'Rk*RjkRjl9<CbbzfOu4ARhxLq2vb!%')RjyRjvRjhRjgx=joq*uKvb!%')+-Rk.Rk%Rj~Rk-Rk#Rj}x=jdq*uKvb!%')+-Rk,Rk!Rj|RjmRjjRjidAq&qKs@uAv8Aa.'*-a@a&0!aM@a5[y73Dsy3Ds|3Dt):wxgI2sHJwJZt.~Gqxwsf0ikrzt}Rl0Jvy_[xj~HqzKv_A|D!&WfP8axRoVcf,U#k(v]v+ueunaXRf1Ju}'!g8u#Ri=jQw!sCunLprq>!,')~<5qeGzq9F{W=c##%s5au:5aU3CBE|;d4#X(D!a&6Vygx(b;#(=]ed?C2F{N<capoq2r[a&!aPa9,'Pw;5s:@@=I|,55w_h|@@=IzcP~=x'fCqB_2Wl2>aU@@=I|1OuNBc1Z+jTqIsBv=Wlc~Cw`fl2WlZ~AcTa%!Z+jTqIsBv=Wlb~Cw`fh2WlYk+uNqJsBv=WlSg,u3dca3#UXaMYa)TaB-=cM|7T#<bI}l5@B932:aV2G{BOuNBJq:|M!5Ezt=<B=C@a^<B57@2F{v>cB{/T#=ay<bI{3Jv6!a.6BKq0ah&+!5E}HP~Ef{978BaU@@=Iza<7d#.Y#978BaU@@=IzH~AJq0!(@@=IzG978BaU@@=IzFe,aU*Y&^^^bvJb,b:bFad!a,c2Ta>aL.bo6!a#CbTa'T#Re{2Wlh2@G{yg6t~Ro_NvdRfticuRQRllJv3&!x&c|zs@Jw3!%RflwpfkRlpKuL;%(!Re<@G|C2GzdhIvuBwgjAg-u0RjAKQB%!(GzZ@G|5NuuRl7d='T+Y#Vy[g<v~Rm!==G|>JvA!)@wma=]m1ifuaw&RmnLs@vT'!|/+[y,g:v>ReTJw1!#qX=x!eC{bLu+wT&)ZtZauq_~Graci&U#F|89:r_Lupvq!.)&2RlG8RfaC=x!eF{_h?rpWlmd&'!#X|&]k::xJey#`'T|+<E|&2@H|%dE#(^,g;u.RiEg6vjRiC9xCkA{O|zY#g=ucRmXKs0@!&*@G|m@awRknJuh!,3d(}gY}eJvj!%Rm):Jw3!%Rm+Rm-Ls0w(&!a(a#@b[|6cZ#X'7RkxWgAOu4ARn'dH'U#Y*Vz-Wm'CARm}d]*#a%^a*T'aK!a<9bV{PC=p*Jw4!&SgxcbB5r]idw(wBRmF7xFkt#&`(Rm/Rm8E|!JuY_9:Rl5=wrgr2:bbxd@xXfB(a*#T+!.X0X1Ta/a'T&RlDRfL>RlyARl9b[z[>RfZ:RlL:RfRwlg/ARl;9;RlxKv,A/!%7s69<74=BA5ba{-8Bde#`a<XaKYa1,a'P~=wxfB2bZ}}?C972@@=I}r8@55B9;5bb}G978B2@@=aybb}3j3vLv;<Jw3&!>Rfk=ayb^}4~Ad1#`*@@=aybb{w2@>==<bbz]dx+UY#^UaF!a9!bB'Ya1.!ajXa#%olRhD[y=3Dt#Ov5BrHKuMB%!(Rf^Wep~HrJwkiQjKr|~FRg)Ku+D#'!t5~GrF~?rDdV)UY,Z/_7RkuG{<~BrBg,rlsO:235B@bX}|d?a1!#`(6Vyn5@d##Y+jTv|vV~EfIj]uNpn~FRfH7Lq2vb1!a9-978BaU@@=Iz9978BbU}#~AJq0!(@@=Iz8978BaU@@=Iz7~AJQ|}!978BbU}!JvkaK!AdUa21-U#`a+(g/vsRn~Ou!5RPj:rmu9WhOjXuvvNr}:RhAj^v(pyw8unRn[kPr}p|u7vwv]RiSBd;pppzq@qHQa?(b.!a.a`@.|xa(hFv;Wiyj5uuv-7Riw~Cw`fg2WlU978BbU|wOuNBJqG!(P~EfD~CRlQcZ#X,k)u3vWs@u2]ksg;wEx'f@q1_2Wg.j]uNpn~FRfqJv]!15x'h{qG!(@@=IzK~CRl^j6v(us5x4i,#T(2WmY?C2F{1>Kq<aj1!*jTqIsBv=Wld~Cw`fj2Wl[j`v0u*~>RlT=c>Z,k#u3vWs@u2]kq<c1Z+jTqIsBv=Wle~Cw`fn2Wl]dn1#c(a(b^a2!b/bAT(bj!aDa7bu,a_a{c0!2T0g:v>ReD2@G{42@G{5~DpM~<5rc=Bx6i>{RT#RnI@zCx]y]z:2Jv[!zr5Awyk]9]k]dD(Y+X#6Vz.g=wKtgwhaCwgmTWj2Lu,w%_+/[y-B;b^xeg3u3Rj-2@bX{*KrJ<!+'@Wg(g?QRlC@Jv`!%b[zIwsfII}8JQ_@w|kW|=Jv(%!AqcOuNBJvEzh!bYzjLs@wP#(0!oy@>RkdJwMZtc3Dtd@BcG#T'9bWxg2@2Fznd*#Y+;2x'c}w<zizixNgwa#Z'U+!/!a'!a+w~g~z6wcn{Rn}wcnzRn|5Rh%=]nJg5vuRmvNvdRlvcprJu}w*az*a#!%.a.'Bot9qT]kj@Wg'ay2Gzv@Jv`!%b[zEwsfHI}1;ck#Ux`<Cbbx_Lu+w!a&0*!wko*wwo,So,}6Juqxf!E}PigQuyRm`d3(`#8>Rn%:A5B;bZ~%KvhCa!a2!x>k7#Uxb@b{#xaRk7Jw0!)>wwhlShl}6>wwhmShm}6CJvB!.x'hhvj{!!5Bwkhhbaz}x'hivjz~!5Bwkhibaz|xEhTrNu,v-vpD!a%&/)a3a.,%Ro2t[CE{)@3re9b]{%wjo09:rgc:Z&Ro6=<riifuaw&RmoKrNA!%(Ro4>Ro89;Ri`dSaL'UYzxZb)7Rka3xRhT&!,!#^1U}vbaz{>>@=be}yC@:D5bazzKu+A&!}{?ba}y>>@=be}wxBh[t`u~vJvr!%a!a()a,a0a4RoC=]o;Ju(!%RoGRhdwjh`=]oAg>w#Ro?g5vuRo=NvdRl|Ku]C.!&;RoEJvB!%RoORoMBx'h[v+_?w~h`}~5?w~hd~!xKh]oiptu-utv.vp!#%&a30a@a'a+(a/aOp(o~p!RoDJu(!%RoHRhewjha=]oBNvdRl}g>w#Ro@g5vuRo>c[#X']o<CauRoRAd-#Y':RkpauRoQKu]C.!&;RoFJvB!%RoNRoPBx'h]v+_?w~ha}t5?w~he}ue!/UbhYacXaW^Tc&a;b:a-c/#b&aja1(!cL+!bKbt!bmcRc9aIc?8[yW3Dtt94Rg`Jv}!&SiRMzBhEebShEMNuPRe>x7gL#TzuwjirRipc<Z&>on;>z=h-MSh.Mwqczx'a7vj&!>Re4@=ResJt__NuPRi*NuPRi)j]uNr|~FRfzKrJ>_+@Wfy@Wf]2WocKrJ<!+'@Wg%g/QRl@@Jv`!&awRl<wsfFIzgLu(w*!.*&ShBMwvhIRhI9;RhNx1hK'!#Sn]Mx1hK~0!#:2<H~7cNu+w7D*'1ZtW>Rn1~?rOc:Z&Rn2=<rQ<7wjh&=BSnLMc]#X(6Vz)w[b=a!U#9wzgMc3#&(RgMRitRis<x,gKt`ax!&+SioM=BSilMc3#&(RgKRinRimKurB,!&SiQMzBhDebShDM6BJQ!(P~Efx978B2@@=I}WLrJw!!,a*&@G}O@9wkibRid@@x'fKwC!&SlDMSfLMjUv~Q~EfKKv3@a+!(hFv-]mpx/hYZ(C5RiWz<o/MwkhY?So/M@x,gbvfB*&!SgEM:SoeeehFu3:Rgbda(,^TZa)X/7Sg[eb:2RgI~BrMC@wgkc:wwkcRerx3h(uUvK!&*,SnOM4Sh*MArRg;wHRh(x=h;rJvPwI!a4',a'0@Wg&=BSh/Mg>w=Rh=g3w*wwgGRgGcW(X#;Sg}M2Gzk@Jv`!&awRl=wsfGIz`dKZ*T'Y-:RhR7RhQg5u-p`j6v(us5d,#Y+~Awkia?RicOuNBwkibba}Ld6p~tyu_vbAa'a+!a/'a3aEa8a!>Sh,ebJv{!&Sh@ebSaReb9;SgwebNuPRi(NvdRl)NuPRi'hHu^<Rm^Jvv_@Wl(g;u1Si/ebKu'B&!*Sh?eb@Wl'z@aPeb95Si.ebcpputyvjB)!,&a+0a%ShAMWeK@G}C@WfJ9;RhMwvhH9w{ia}ix,hJvRA1(!zAn[MRhHx1hJ~*!#hFv(BSn[MBJQ!(@@=I~'978B2@@=I}2db.Ua<'X}+T#a0XaG2G}E;wkg|wuh!Rh!x,hZu,@)!&So0MVy)C5RiXACJvB!&5RiY5RiZg8w)cG}*T#2@bU}=KsA>(!a.3wkhZba~(x,h^u(A!&(SoCMRhb5Bz=h[eb?w~hb~6x,h_u(A!&(SoDMRhc5Bz=h]eb?w~hc~6e)aA1T#T,^^^c-bMb&blcPaP(a/!0!bA=b5c@a(!bfbrc#2afwmhARnjwchORnp2Wlf3DtsNvdRl-2@wpa<]m0bx(#:awRk2@Jw3!%RfhwpfgRlnKQB%!(G{V@G|'NuuRl6d='T+Y#VyUg<v~Rl~==G|<Jv+'!aYShC}6@B<5?ba~8@Jw3'!g2QRljhLrpWlOd+#Y'g.w'rIg>w*wgj@g-u0Rj@Lu+wT&)ZtUauq]~GrGci&U#F|39:rELrNvj!.%*RhCwunfw~nf~:9;Ri]>wtnhg;wHRnhx3hDs@v~!/+'@Wfr@9RkSNu&Rlo=@<5GzoKs0@_+@Wl+@awRkmJuh!-3d(}pY#qWJvj!%Rm(:Jw3!%Rm,Rm*de&!1U-U#`)Re;@G|.@9Ri82@wjfvRlq=@<5GzpLvOvr!).&2RlF8Rf`C=x!eE{.Jw3_g2QRlkhLrpWlPde(!#U{s,UXa*Ta'[y'g:v>ReS;x0PZ&RnlRnn~HrKJw1}f!=x!eB|2w]aP(#Xa&a*Ta.Ua2a7=]iOd'#Y&Ro&WnWg;u.RiDg6vjRiBNvdRlzhNvj]nYJuW_2Wm3x)kFze{9d])!a.!,Y01!#&aC!a3RndC=ox~BrC@2b^{pg,rlse7x'ksuq!%Rm.E{xidw(wBRmGx9o+)X#wwo-So-}69:Rl4@xSf@a#XZ'X)X,Ta(/ARl8b[xc>RfY:RlI:RfQwlg.ARl:9;Rlwdn'#^XafaQa1X1TaHTa)@b[{zcZ#X'7RkwWg@Ou4ARn&x)kG#{,g7u/RkGdH'U#Y*Vz'Wm&CARm|bx#(A]gUbUzJj9Q~=d,#Y(56H}l978H{U7d,0#U*2>ABb_xZ978BbU{e~AJQ{g!978BbU{hxMh?ad{oUYZ.x1h?{l!#:2<H{mx3n[t{vl!,&a%3Ro(z=iS}6ARnr=Bwsn^wvn`Rnbd`*T}B0!#^X'BG{c9b]{a>>@=be}F?JvS!&BG{d7BG}(Bde#`a1X,Ya@!a'P~=wxf@2bZ}I56B2@@=aybb}08@55B9;5bb}<j3vLv;<Jw3&!>Rfg=ayb^}&OuNBKuLA!)a!P~=x#fD{f2@>==<bbzl?C972@@=Ix^d6rSu,v7w*C(0a)a6#B+a%!sQ[y?3Dt%3[xn~<5rLOu!5p@Ku+D#'!t7~GrP~?rNKvlaya7'!h+v-5qMg=t|cd,U#5AAaa5Abb{S@52B5@a[@52B5Gx[iXueu;d<#`a(!/549C;ag>23ExY5@Dah89b^~689Jv)!~2b[~1Lv'w(%*!a#bX|aPrmawRe]keu7uhv-q6rxu,q`xTo]/a5aU!bNaDXbi!b-!ao!b<bwA!#5@B932:aV2G|:d-)Y#hJrL>RhG<7@C5<H|_=Cau:5aj5@B932:bJ|ng>vIbs)#?C2F|9jPv0w.vISh-MKvUaz(.!9ABbb|[5;5<H|Eg>unwfh;9:4E|YjQsBt|vjx'hYq3!(?C2F|J:2<BaY?C2F|GOu!5x,g|p{ah!-(?C2F|c9:4E|OjXuvvNr}:Rh&i[w*t|cd+U#jJvsu)vsSn~Mkfrmu9p}u7vwv]So!McW#Xa!ax5@A5aY:5;5<H|>kJv~vYrquJu3x4ib#T)2@SmZM?C2F|Bj:rmu9@xPhI(a*a#U#`a3-5Abb|L~@:RhK9:4E|0@52B5G|#C::aY?C2F|-:2<BaY?C2F|.5Jvk!a)javYrquJu3x4ia#T)2@SmYM?C2F|HAxPhH(!a#U#`a*-5Abb|4~@:RhJ9:4E|R@52B5G|F:2<BaY?C2F|Sc^#Xa2j=Qq5CJvB!-g<v{z;hhM?C2F|Zi[vrv{z;hiM?C2F|XKsA>!a)-g<v{z;h[eb?C2F|]i[vrv{z;h]eb?C2F|^iZu.vix,hZq3ah!.(?C2F|QOu!5ShXM:2<BaY?C2F|P",13494,2713,49,25,61),Eu=new Uint16Array([512,26465,29036,7,0,2,4,116,24638,116,24636,8693,29807,24610,621,1,0,0,3,112,24614,111,115,24615]),Du;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.FLAG13=8192]=`FLAG13`,e[e.BRANCH_LENGTH=8064]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`,e[e.VALUE_MASK=8191]=`VALUE_MASK`})(Du||={});var Ou;(function(e){e[e.AMP=38]=`AMP`,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_X=120]=`LOWER_X`})(Ou||={});var ku=32;function Au(e){return e-Ou.ZERO>>>0<=9}function ju(e){return(e|ku)-Ou.LOWER_A>>>0<=5}function Mu(e){return(e|ku)-Ou.LOWER_A>>>0<=25}function Nu(e){return e===Ou.EQUALS||Mu(e)||Au(e)}var Pu;(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`})(Pu||={});var Fu;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(Fu||={});var Iu=class{decodeTree;emitCodePoint;errors;state=Pu.EntityStart;consumed=1;result=0;treeIndex=0;excess=1;decodeMode=Fu.Strict;runConsumed=0;constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n}startEntity(e){this.decodeMode=e,this.state=Pu.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(e,t){switch(this.state){case Pu.EntityStart:return e.charCodeAt(t)===Ou.NUM?(this.state=Pu.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Pu.NamedEntity,this.stateNamedEntity(e,t));case Pu.NumericStart:return this.stateNumericStart(e,t);case Pu.NumericDecimal:return this.stateNumericDecimal(e,t);case Pu.NumericHex:return this.stateNumericHex(e,t);default:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|ku)===Ou.LOWER_X?(this.state=Pu.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Pu.NumericDecimal,this.stateNumericDecimal(e,t))}stateNumericHex(e,t){let n=e.length,{result:r}=this,{consumed:i}=this;for(;t<n;){let n=e.charCodeAt(t);if(Au(n)||ju(n)){let e=n<=Ou.NINE?n-Ou.ZERO:(n|ku)-Ou.LOWER_A+10;r=r*16+e,i+=1,t+=1}else return this.result=r,this.consumed=i,this.emitNumericEntity(n,3)}return this.result=r,this.consumed=i,-1}stateNumericDecimal(e,t){let n=e.length,{result:r}=this,{consumed:i}=this;for(;t<n;){let n=e.charCodeAt(t)-Ou.ZERO;if(n>>>0>9)return this.result=r,this.consumed=i,this.emitNumericEntity(n+Ou.ZERO,2);r=r*10+n,i+=1,t+=1}return this.result=r,this.consumed=i,-1}emitNumericEntity(e,t){if(this.consumed<=t)return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===Ou.SEMI)this.consumed+=1;else if(this.decodeMode===Fu.Strict)return 0;return this.emitCodePoint((this.decodeTree===Eu?Su:xu)(this.result),this.consumed),this.errors&&(e!==Ou.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}flushAndEmitLegacyOrReject(e,t,n,r){return this.consumed=e,this.excess=t,this.result===0||this.decodeMode===Fu.Attribute&&(r===0||t>1||Nu(n))?0:this.emitNotTerminatedNamedEntity()}stateNamedEntity(e,t){let{decodeTree:n}=this,r=e.length,i=this.decodeMode===Fu.Strict,{treeIndex:a}=this,{excess:o}=this,{consumed:s}=this,c=n[a];for(;t<r;){for(;(c&(Du.VALUE_LENGTH|Du.FLAG13))===0&&(c&Du.JUMP_TABLE)!==0;){let i=e.charCodeAt(t),l=c&Du.JUMP_TABLE,u=(c&Du.BRANCH_LENGTH)>>7;if(u===0){if(i!==l)return this.flushAndEmitLegacyOrReject(s,o,i,0);a+=1}else{let e=i-l;if(e>>>0>=u)return this.flushAndEmitLegacyOrReject(s,o,i,0);let t=n[a+1+e];if(t===0)return this.flushAndEmitLegacyOrReject(s,o,i,0);a=a+u+t&65535}if(c=n[a],t+=1,o+=1,t>=r)break}if(t>=r)break;if((c&(Du.VALUE_LENGTH|Du.FLAG13))===Du.FLAG13){let i=(c&Du.BRANCH_LENGTH)>>7,{runConsumed:l}=this;if(l===0){let n=e.charCodeAt(t);if(n!==(c&Du.JUMP_TABLE))return this.flushAndEmitLegacyOrReject(s,o,n,0);t+=1,o+=1,l=1}for(;l<i;){if(t>=r)return this.treeIndex=a,this.excess=o,this.consumed=s,this.runConsumed=l,-1;let i=l-1,c=n[a+1+(i>>1)]>>((i&1)<<3)&255,u=e.charCodeAt(t);if(u!==c)return this.runConsumed=0,this.flushAndEmitLegacyOrReject(s,o,u,0);t+=1,o+=1,l+=1}this.runConsumed=0,a+=1+(i>>1),c=n[a];continue}let l=c>>>14,u=e.charCodeAt(t);if(l!==0){if(!i&&(c&Du.FLAG13)===0&&(this.result=a,s+=o-1,o=1),u===Ou.SEMI)return this.emitNamedEntityData(a,l,s+o);if(l===1)return this.flushAndEmitLegacyOrReject(s,o,u,l)}let d=Lu(n,c,a+(l||1),u);if(d<0)return this.flushAndEmitLegacyOrReject(s,o,u,l);a=d,c=n[a],t+=1,o+=1}return!i&&c>>>14&&(c&Du.FLAG13)===0&&(this.result=a,s+=o-1,o=1),this.treeIndex=a,this.excess=o,this.consumed=s,-1}emitNotTerminatedNamedEntity(){let{result:e,decodeTree:t}=this,n=t[e]>>>14;return this.emitNamedEntityData(e,n,this.consumed),this.errors?.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&Du.VALUE_MASK:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){switch(this.state){case Pu.NamedEntity:return this.result!==0&&(this.decodeMode!==Fu.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Pu.NumericDecimal:return this.emitNumericEntity(0,2);case Pu.NumericHex:return this.emitNumericEntity(0,3);case Pu.NumericStart:return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;default:return 0}}};function Lu(e,t,n,r){let i=(t&Du.BRANCH_LENGTH)>>7,a=t&Du.JUMP_TABLE;if(a){if(i===0)return r===a?n:-1;let t=r-a;if(t>>>0>=i)return-1;let o=e[n+t];return o===0?-1:n+i+o-1&65535}if(i===0)return-1;let o=i+1>>1,s=n+o+i;for(let t=0;t<i;t++){let i=e[n+(t>>1)]>>((t&1)<<3)&255;if(i===r)return s+e[n+o+t]&65535;if(i>r)return-1}return-1}var K;(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/`})(K||={});var Ru;(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`})(Ru||={});var zu;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(zu||={});var q;(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`})(q||={});var J;(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`})(J||={});var Bu=new Map([[q.A,J.A],[q.ADDRESS,J.ADDRESS],[q.ANNOTATION_XML,J.ANNOTATION_XML],[q.APPLET,J.APPLET],[q.AREA,J.AREA],[q.ARTICLE,J.ARTICLE],[q.ASIDE,J.ASIDE],[q.B,J.B],[q.BASE,J.BASE],[q.BASEFONT,J.BASEFONT],[q.BGSOUND,J.BGSOUND],[q.BIG,J.BIG],[q.BLOCKQUOTE,J.BLOCKQUOTE],[q.BODY,J.BODY],[q.BR,J.BR],[q.BUTTON,J.BUTTON],[q.CAPTION,J.CAPTION],[q.CENTER,J.CENTER],[q.CODE,J.CODE],[q.COL,J.COL],[q.COLGROUP,J.COLGROUP],[q.DD,J.DD],[q.DESC,J.DESC],[q.DETAILS,J.DETAILS],[q.DIALOG,J.DIALOG],[q.DIR,J.DIR],[q.DIV,J.DIV],[q.DL,J.DL],[q.DT,J.DT],[q.EM,J.EM],[q.EMBED,J.EMBED],[q.FIELDSET,J.FIELDSET],[q.FIGCAPTION,J.FIGCAPTION],[q.FIGURE,J.FIGURE],[q.FONT,J.FONT],[q.FOOTER,J.FOOTER],[q.FOREIGN_OBJECT,J.FOREIGN_OBJECT],[q.FORM,J.FORM],[q.FRAME,J.FRAME],[q.FRAMESET,J.FRAMESET],[q.H1,J.H1],[q.H2,J.H2],[q.H3,J.H3],[q.H4,J.H4],[q.H5,J.H5],[q.H6,J.H6],[q.HEAD,J.HEAD],[q.HEADER,J.HEADER],[q.HGROUP,J.HGROUP],[q.HR,J.HR],[q.HTML,J.HTML],[q.I,J.I],[q.IMG,J.IMG],[q.IMAGE,J.IMAGE],[q.INPUT,J.INPUT],[q.IFRAME,J.IFRAME],[q.KEYGEN,J.KEYGEN],[q.LABEL,J.LABEL],[q.LI,J.LI],[q.LINK,J.LINK],[q.LISTING,J.LISTING],[q.MAIN,J.MAIN],[q.MALIGNMARK,J.MALIGNMARK],[q.MARQUEE,J.MARQUEE],[q.MATH,J.MATH],[q.MENU,J.MENU],[q.META,J.META],[q.MGLYPH,J.MGLYPH],[q.MI,J.MI],[q.MO,J.MO],[q.MN,J.MN],[q.MS,J.MS],[q.MTEXT,J.MTEXT],[q.NAV,J.NAV],[q.NOBR,J.NOBR],[q.NOFRAMES,J.NOFRAMES],[q.NOEMBED,J.NOEMBED],[q.NOSCRIPT,J.NOSCRIPT],[q.OBJECT,J.OBJECT],[q.OL,J.OL],[q.OPTGROUP,J.OPTGROUP],[q.OPTION,J.OPTION],[q.P,J.P],[q.PARAM,J.PARAM],[q.PLAINTEXT,J.PLAINTEXT],[q.PRE,J.PRE],[q.RB,J.RB],[q.RP,J.RP],[q.RT,J.RT],[q.RTC,J.RTC],[q.RUBY,J.RUBY],[q.S,J.S],[q.SCRIPT,J.SCRIPT],[q.SEARCH,J.SEARCH],[q.SECTION,J.SECTION],[q.SELECT,J.SELECT],[q.SOURCE,J.SOURCE],[q.SMALL,J.SMALL],[q.SPAN,J.SPAN],[q.STRIKE,J.STRIKE],[q.STRONG,J.STRONG],[q.STYLE,J.STYLE],[q.SUB,J.SUB],[q.SUMMARY,J.SUMMARY],[q.SUP,J.SUP],[q.TABLE,J.TABLE],[q.TBODY,J.TBODY],[q.TEMPLATE,J.TEMPLATE],[q.TEXTAREA,J.TEXTAREA],[q.TFOOT,J.TFOOT],[q.TD,J.TD],[q.TH,J.TH],[q.THEAD,J.THEAD],[q.TITLE,J.TITLE],[q.TR,J.TR],[q.TRACK,J.TRACK],[q.TT,J.TT],[q.U,J.U],[q.UL,J.UL],[q.SVG,J.SVG],[q.VAR,J.VAR],[q.WBR,J.WBR],[q.XMP,J.XMP]]);function Vu(e){return Bu.get(e)??J.UNKNOWN}var Y=J,Hu={[K.HTML]:new Set([Y.ADDRESS,Y.APPLET,Y.AREA,Y.ARTICLE,Y.ASIDE,Y.BASE,Y.BASEFONT,Y.BGSOUND,Y.BLOCKQUOTE,Y.BODY,Y.BR,Y.BUTTON,Y.CAPTION,Y.CENTER,Y.COL,Y.COLGROUP,Y.DD,Y.DETAILS,Y.DIR,Y.DIV,Y.DL,Y.DT,Y.EMBED,Y.FIELDSET,Y.FIGCAPTION,Y.FIGURE,Y.FOOTER,Y.FORM,Y.FRAME,Y.FRAMESET,Y.H1,Y.H2,Y.H3,Y.H4,Y.H5,Y.H6,Y.HEAD,Y.HEADER,Y.HGROUP,Y.HR,Y.HTML,Y.IFRAME,Y.IMG,Y.INPUT,Y.LI,Y.LINK,Y.LISTING,Y.MAIN,Y.MARQUEE,Y.MENU,Y.META,Y.NAV,Y.NOEMBED,Y.NOFRAMES,Y.NOSCRIPT,Y.OBJECT,Y.OL,Y.P,Y.PARAM,Y.PLAINTEXT,Y.PRE,Y.SCRIPT,Y.SECTION,Y.SELECT,Y.SOURCE,Y.STYLE,Y.SUMMARY,Y.TABLE,Y.TBODY,Y.TD,Y.TEMPLATE,Y.TEXTAREA,Y.TFOOT,Y.TH,Y.THEAD,Y.TITLE,Y.TR,Y.TRACK,Y.UL,Y.WBR,Y.XMP]),[K.MATHML]:new Set([Y.MI,Y.MO,Y.MN,Y.MS,Y.MTEXT,Y.ANNOTATION_XML]),[K.SVG]:new Set([Y.TITLE,Y.FOREIGN_OBJECT,Y.DESC]),[K.XLINK]:new Set,[K.XML]:new Set,[K.XMLNS]:new Set},Uu=new Set([Y.H1,Y.H2,Y.H3,Y.H4,Y.H5,Y.H6]),Wu=new Set([q.STYLE,q.SCRIPT,q.XMP,q.IFRAME,q.NOEMBED,q.NOFRAMES,q.PLAINTEXT]);function Gu(e,t){return Wu.has(e)||t&&e===q.NOSCRIPT}var X;(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`})(X||={});var Ku={DATA:X.DATA,RCDATA:X.RCDATA,RAWTEXT:X.RAWTEXT,SCRIPT_DATA:X.SCRIPT_DATA,PLAINTEXT:X.PLAINTEXT,CDATA_SECTION:X.CDATA_SECTION};function qu(e){return e>=W.DIGIT_0&&e<=W.DIGIT_9}function Ju(e){return e>=W.LATIN_CAPITAL_A&&e<=W.LATIN_CAPITAL_Z}function Yu(e){return e>=W.LATIN_SMALL_A&&e<=W.LATIN_SMALL_Z}function Xu(e){return Yu(e)||Ju(e)}function Zu(e){return Xu(e)||qu(e)}function Qu(e){return e+32}function $u(e){return e===W.SPACE||e===W.LINE_FEED||e===W.TABULATION||e===W.FORM_FEED}function ed(e){return $u(e)||e===W.SOLIDUS||e===W.GREATER_THAN_SIGN}function td(e){return e===W.NULL?G.nullCharacterReference:e>1114111?G.characterReferenceOutsideUnicodeRange:uu(e)?G.surrogateCharacterReference:mu(e)?G.noncharacterCharacterReference:pu(e)||e===W.CARRIAGE_RETURN?G.controlCharacterReference:null}var nd=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName=``,this.active=!1,this.state=X.DATA,this.returnState=X.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new gu(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Iu(Tu,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(G.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(G.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=td(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),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(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:_u.START_TAG,tagName:``,tagID:J.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:_u.END_TAG,tagName:``,tagID:J.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:_u.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:_u.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:``},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e;let t=this.currentToken;if(vu(t,this.currentAttr.name)===null){if(t.attrs.push(this.currentAttr),t.location&&this.currentLocation){let n=(e=t.location).attrs??(e.attrs=Object.create(null));n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(G.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.prepareToken(e),e.tagID=Vu(e.tagName),e.type===_u.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(G.endTagWithAttributes),e.selfClosing&&this._err(G.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case _u.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case _u.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case _u.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:_u.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken){if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk()}this._createCharacterToken(e,t)}_emitCodePoint(e){let t=$u(e)?_u.WHITESPACE_CHARACTER:e===W.NULL?_u.NULL_CHARACTER:_u.CHARACTER;this._appendCharToCurrentCharacterToken(t,e<65536?String.fromCharCode(e):String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(_u.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=X.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Fu.Attribute:Fu.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===X.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===X.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===X.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case X.DATA:this._stateData(e);break;case X.RCDATA:this._stateRcdata(e);break;case X.RAWTEXT:this._stateRawtext(e);break;case X.SCRIPT_DATA:this._stateScriptData(e);break;case X.PLAINTEXT:this._statePlaintext(e);break;case X.TAG_OPEN:this._stateTagOpen(e);break;case X.END_TAG_OPEN:this._stateEndTagOpen(e);break;case X.TAG_NAME:this._stateTagName(e);break;case X.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case X.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case X.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case X.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case X.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case X.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case X.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case X.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case X.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case X.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case X.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case X.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case X.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case X.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case X.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case X.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case X.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case X.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case X.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case X.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case X.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case X.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case X.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case X.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case X.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case X.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case X.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case X.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case X.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case X.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case X.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case X.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case X.BOGUS_COMMENT:this._stateBogusComment(e);break;case X.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case X.COMMENT_START:this._stateCommentStart(e);break;case X.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case X.COMMENT:this._stateComment(e);break;case X.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case X.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case X.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case X.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case X.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case X.COMMENT_END:this._stateCommentEnd(e);break;case X.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case X.DOCTYPE:this._stateDoctype(e);break;case X.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case X.DOCTYPE_NAME:this._stateDoctypeName(e);break;case X.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case X.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case X.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case X.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case X.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case X.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case X.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case X.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case X.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case X.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case X.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case X.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case X.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case X.CDATA_SECTION:this._stateCdataSection(e);break;case X.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case X.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case X.CHARACTER_REFERENCE:this._stateCharacterReference();break;case X.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case W.LESS_THAN_SIGN:this.state=X.TAG_OPEN;break;case W.AMPERSAND:this._startCharacterReference();break;case W.NULL:this._err(G.unexpectedNullCharacter),this._emitCodePoint(e);break;case W.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case W.AMPERSAND:this._startCharacterReference();break;case W.LESS_THAN_SIGN:this.state=X.RCDATA_LESS_THAN_SIGN;break;case W.NULL:this._err(G.unexpectedNullCharacter),this._emitChars(`�`);break;case W.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case W.LESS_THAN_SIGN:this.state=X.RAWTEXT_LESS_THAN_SIGN;break;case W.NULL:this._err(G.unexpectedNullCharacter),this._emitChars(`�`);break;case W.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_LESS_THAN_SIGN;break;case W.NULL:this._err(G.unexpectedNullCharacter),this._emitChars(`�`);break;case W.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case W.NULL:this._err(G.unexpectedNullCharacter),this._emitChars(`�`);break;case W.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(Xu(e))this._createStartTagToken(),this.state=X.TAG_NAME,this._stateTagName(e);else switch(e){case W.EXCLAMATION_MARK:this.state=X.MARKUP_DECLARATION_OPEN;break;case W.SOLIDUS:this.state=X.END_TAG_OPEN;break;case W.QUESTION_MARK:this._err(G.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=X.BOGUS_COMMENT,this._stateBogusComment(e);break;case W.EOF:this._err(G.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(G.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=X.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(Xu(e))this._createEndTagToken(),this.state=X.TAG_NAME,this._stateTagName(e);else switch(e){case W.GREATER_THAN_SIGN:this._err(G.missingEndTagName),this.state=X.DATA;break;case W.EOF:this._err(G.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(G.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=X.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=X.BEFORE_ATTRIBUTE_NAME;break;case W.SOLIDUS:this.state=X.SELF_CLOSING_START_TAG;break;case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentTagToken();break;case W.NULL:this._err(G.unexpectedNullCharacter),t.tagName+=`�`;break;case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(Ju(e)?Qu(e):e)}}_stateRcdataLessThanSign(e){e===W.SOLIDUS?this.state=X.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=X.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){Xu(e)?(this.state=X.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=X.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=X.BEFORE_ATTRIBUTE_NAME,!1;case W.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=X.SELF_CLOSING_START_TAG,!1;case W.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=X.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=X.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===W.SOLIDUS?this.state=X.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=X.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){Xu(e)?(this.state=X.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=X.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=X.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case W.SOLIDUS:this.state=X.SCRIPT_DATA_END_TAG_OPEN;break;case W.EXCLAMATION_MARK:this.state=X.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=X.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){Xu(e)?(this.state=X.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=X.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=X.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===W.HYPHEN_MINUS?(this.state=X.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=X.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===W.HYPHEN_MINUS?(this.state=X.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=X.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case W.HYPHEN_MINUS:this.state=X.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case W.NULL:this._err(G.unexpectedNullCharacter),this._emitChars(`�`);break;case W.EOF:this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case W.HYPHEN_MINUS:this.state=X.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case W.NULL:this._err(G.unexpectedNullCharacter),this.state=X.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case W.EOF:this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=X.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case W.HYPHEN_MINUS:this._emitChars(`-`);break;case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case W.GREATER_THAN_SIGN:this.state=X.SCRIPT_DATA,this._emitChars(`>`);break;case W.NULL:this._err(G.unexpectedNullCharacter),this.state=X.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case W.EOF:this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=X.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===W.SOLIDUS?this.state=X.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Xu(e)?(this._emitChars(`<`),this.state=X.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=X.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){Xu(e)?(this.state=X.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=X.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=X.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(lu.SCRIPT,!1)&&ed(this.preprocessor.peek(lu.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<lu.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=X.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case W.HYPHEN_MINUS:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case W.NULL:this._err(G.unexpectedNullCharacter),this._emitChars(`�`);break;case W.EOF:this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case W.HYPHEN_MINUS:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case W.NULL:this._err(G.unexpectedNullCharacter),this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case W.EOF:this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case W.HYPHEN_MINUS:this._emitChars(`-`);break;case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case W.GREATER_THAN_SIGN:this.state=X.SCRIPT_DATA,this._emitChars(`>`);break;case W.NULL:this._err(G.unexpectedNullCharacter),this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case W.EOF:this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===W.SOLIDUS?(this.state=X.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(lu.SCRIPT,!1)&&ed(this.preprocessor.peek(lu.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<lu.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=X.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.SOLIDUS:case W.GREATER_THAN_SIGN:case W.EOF:this.state=X.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case W.EQUALS_SIGN:this._err(G.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=X.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=X.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:case W.SOLIDUS:case W.GREATER_THAN_SIGN:case W.EOF:this._leaveAttrName(),this.state=X.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case W.EQUALS_SIGN:this._leaveAttrName(),this.state=X.BEFORE_ATTRIBUTE_VALUE;break;case W.QUOTATION_MARK:case W.APOSTROPHE:case W.LESS_THAN_SIGN:this._err(G.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case W.NULL:this._err(G.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(Ju(e)?Qu(e):e)}}_stateAfterAttributeName(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.SOLIDUS:this.state=X.SELF_CLOSING_START_TAG;break;case W.EQUALS_SIGN:this.state=X.BEFORE_ATTRIBUTE_VALUE;break;case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentTagToken();break;case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=X.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.QUOTATION_MARK:this.state=X.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case W.APOSTROPHE:this.state=X.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case W.GREATER_THAN_SIGN:this._err(G.missingAttributeValue),this.state=X.DATA,this.emitCurrentTagToken();break;default:this.state=X.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case W.QUOTATION_MARK:this.state=X.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case W.AMPERSAND:this._startCharacterReference();break;case W.NULL:this._err(G.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case W.APOSTROPHE:this.state=X.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case W.AMPERSAND:this._startCharacterReference();break;case W.NULL:this._err(G.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this._leaveAttrValue(),this.state=X.BEFORE_ATTRIBUTE_NAME;break;case W.AMPERSAND:this._startCharacterReference();break;case W.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=X.DATA,this.emitCurrentTagToken();break;case W.NULL:this._err(G.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case W.QUOTATION_MARK:case W.APOSTROPHE:case W.LESS_THAN_SIGN:case W.EQUALS_SIGN:case W.GRAVE_ACCENT:this._err(G.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this._leaveAttrValue(),this.state=X.BEFORE_ATTRIBUTE_NAME;break;case W.SOLIDUS:this._leaveAttrValue(),this.state=X.SELF_CLOSING_START_TAG;break;case W.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=X.DATA,this.emitCurrentTagToken();break;case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:this._err(G.missingWhitespaceBetweenAttributes),this.state=X.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case W.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=X.DATA,this.emitCurrentTagToken();break}case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:this._err(G.unexpectedSolidusInTag),this.state=X.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentComment(t);break;case W.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case W.NULL:this._err(G.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(lu.DASH_DASH,!0)?(this._createCommentToken(lu.DASH_DASH.length+1),this.state=X.COMMENT_START):this._consumeSequenceIfMatch(lu.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(lu.DOCTYPE.length+1),this.state=X.DOCTYPE):this._consumeSequenceIfMatch(lu.CDATA_START,!0)?this.inForeignNode?this.state=X.CDATA_SECTION:(this._err(G.cdataInHtmlContent),this._createCommentToken(lu.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=X.BOGUS_COMMENT):this._ensureHibernation()||(this._err(G.incorrectlyOpenedComment),this._createCommentToken(2),this.state=X.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case W.HYPHEN_MINUS:this.state=X.COMMENT_START_DASH;break;case W.GREATER_THAN_SIGN:{this._err(G.abruptClosingOfEmptyComment),this.state=X.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=X.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case W.HYPHEN_MINUS:this.state=X.COMMENT_END;break;case W.GREATER_THAN_SIGN:this._err(G.abruptClosingOfEmptyComment),this.state=X.DATA,this.emitCurrentComment(t);break;case W.EOF:this._err(G.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=X.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case W.HYPHEN_MINUS:this.state=X.COMMENT_END_DASH;break;case W.LESS_THAN_SIGN:t.data+=`<`,this.state=X.COMMENT_LESS_THAN_SIGN;break;case W.NULL:this._err(G.unexpectedNullCharacter),t.data+=`�`;break;case W.EOF:this._err(G.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case W.EXCLAMATION_MARK:t.data+=`!`,this.state=X.COMMENT_LESS_THAN_SIGN_BANG;break;case W.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=X.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===W.HYPHEN_MINUS?this.state=X.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=X.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===W.HYPHEN_MINUS?this.state=X.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=X.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==W.GREATER_THAN_SIGN&&e!==W.EOF&&this._err(G.nestedComment),this.state=X.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case W.HYPHEN_MINUS:this.state=X.COMMENT_END;break;case W.EOF:this._err(G.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=X.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentComment(t);break;case W.EXCLAMATION_MARK:this.state=X.COMMENT_END_BANG;break;case W.HYPHEN_MINUS:t.data+=`-`;break;case W.EOF:this._err(G.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=X.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case W.HYPHEN_MINUS:t.data+=`--!`,this.state=X.COMMENT_END_DASH;break;case W.GREATER_THAN_SIGN:this._err(G.incorrectlyClosedComment),this.state=X.DATA,this.emitCurrentComment(t);break;case W.EOF:this._err(G.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=X.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=X.BEFORE_DOCTYPE_NAME;break;case W.GREATER_THAN_SIGN:this.state=X.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case W.EOF:{this._err(G.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(G.missingWhitespaceBeforeDoctypeName),this.state=X.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(Ju(e))this._createDoctypeToken(String.fromCharCode(Qu(e))),this.state=X.DOCTYPE_NAME;else switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.NULL:this._err(G.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=X.DOCTYPE_NAME;break;case W.GREATER_THAN_SIGN:{this._err(G.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=X.DATA;break}case W.EOF:{this._err(G.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=X.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=X.AFTER_DOCTYPE_NAME;break;case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.NULL:this._err(G.unexpectedNullCharacter),t.name+=`�`;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(Ju(e)?Qu(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(lu.PUBLIC,!1)?this.state=X.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(lu.SYSTEM,!1)?this.state=X.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(G.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=X.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case W.QUOTATION_MARK:this._err(G.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=X.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:this._err(G.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=X.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case W.GREATER_THAN_SIGN:this._err(G.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.QUOTATION_MARK:t.publicId=``,this.state=X.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:t.publicId=``,this.state=X.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case W.GREATER_THAN_SIGN:this._err(G.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case W.QUOTATION_MARK:this.state=X.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case W.NULL:this._err(G.unexpectedNullCharacter),t.publicId+=`�`;break;case W.GREATER_THAN_SIGN:this._err(G.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case W.APOSTROPHE:this.state=X.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case W.NULL:this._err(G.unexpectedNullCharacter),t.publicId+=`�`;break;case W.GREATER_THAN_SIGN:this._err(G.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=X.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.QUOTATION_MARK:this._err(G.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:this._err(G.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.QUOTATION_MARK:t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=X.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case W.QUOTATION_MARK:this._err(G.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:this._err(G.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case W.GREATER_THAN_SIGN:this._err(G.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.QUOTATION_MARK:t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case W.GREATER_THAN_SIGN:this._err(G.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case W.QUOTATION_MARK:this.state=X.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case W.NULL:this._err(G.unexpectedNullCharacter),t.systemId+=`�`;break;case W.GREATER_THAN_SIGN:this._err(G.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case W.APOSTROPHE:this.state=X.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case W.NULL:this._err(G.unexpectedNullCharacter),t.systemId+=`�`;break;case W.GREATER_THAN_SIGN:this._err(G.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case W.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.NULL:this._err(G.unexpectedNullCharacter);break;case W.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case W.RIGHT_SQUARE_BRACKET:this.state=X.CDATA_SECTION_BRACKET;break;case W.EOF:this._err(G.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===W.RIGHT_SQUARE_BRACKET?this.state=X.CDATA_SECTION_END:(this._emitChars(`]`),this.state=X.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case W.GREATER_THAN_SIGN:this.state=X.DATA;break;case W.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=X.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0){if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(W.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Zu(this.preprocessor.peek(1))?X.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){Zu(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===W.SEMICOLON&&this._err(G.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},rd=new Set([J.DD,J.DT,J.LI,J.OPTGROUP,J.OPTION,J.P,J.RB,J.RP,J.RT,J.RTC]),id=new Set([...rd,J.CAPTION,J.COLGROUP,J.TBODY,J.TD,J.TFOOT,J.TH,J.THEAD,J.TR]),ad=new Set([J.APPLET,J.CAPTION,J.HTML,J.MARQUEE,J.OBJECT,J.TABLE,J.TD,J.TEMPLATE,J.TH]),od=new Set([...ad,J.OL,J.UL]),sd=new Set([...ad,J.BUTTON]),cd=new Set([J.ANNOTATION_XML,J.MI,J.MN,J.MO,J.MS,J.MTEXT]),ld=new Set([J.DESC,J.FOREIGN_OBJECT,J.TITLE]),ud=new Set([J.TR,J.TEMPLATE,J.HTML]),dd=new Set([J.TBODY,J.TFOOT,J.THEAD,J.TEMPLATE,J.HTML]),fd=new Set([J.TABLE,J.TEMPLATE,J.HTML]),pd=new Set([J.TD,J.TH]),md=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=J.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===J.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===K.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==K.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Uu,K.HTML)}popUntilTableCellPopped(){this.popUntilPopped(pd,K.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(fd,K.HTML)}clearBackToTableBodyContext(){this.clearBackTo(dd,K.HTML)}clearBackToTableRowContext(){this.clearBackTo(ud,K.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===J.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===J.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case K.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case K.SVG:if(ld.has(r))return!1;break;case K.MATHML:if(cd.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,ad)}hasInListItemScope(e){return this.hasInDynamicScope(e,od)}hasInButtonScope(e){return this.hasInDynamicScope(e,sd)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case K.HTML:if(Uu.has(t))return!0;if(ad.has(t))return!1;break;case K.SVG:if(ld.has(t))return!1;break;case K.MATHML:if(cd.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===K.HTML)switch(this.tagIDs[t]){case e:return!0;case J.TABLE:case J.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===K.HTML)switch(this.tagIDs[e]){case J.TBODY:case J.THEAD:case J.TFOOT:return!0;case J.TABLE:case J.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===K.HTML)switch(this.tagIDs[t]){case e:return!0;case J.OPTION:case J.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&rd.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&id.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&id.has(this.currentTagId);)this.pop()}},hd=3,gd;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(gd||={});var _d={type:gd.Marker},vd=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===gd.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){let t=this.treeAdapter.getAttrList(o);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<hd)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<hd)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1,i>=hd&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(_d)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:gd.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:gd.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(_d);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===gd.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===gd.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===gd.Element&&t.element===e)}},yd={createDocument(){return{nodeName:`#document`,mode:zu.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){let 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){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};yd.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(yd.isTextNode(n)){n.value+=t;return}}yd.appendChild(e,yd.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&yd.isTextNode(r)?r.value+=t:yd.insertBefore(e,yd.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.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}}},bd=`html`,xd=`about:legacy-compat`,Sd=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,Cd=`+//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//`.split(`,`),wd=[...Cd,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],Td=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),Ed=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],Dd=[...Ed,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function Od(e,t){return t.some(t=>e.startsWith(t))}function kd(e){return e.name===bd&&e.publicId===null&&(e.systemId===null||e.systemId===xd)}function Ad(e){if(e.name!==bd)return zu.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===Sd)return zu.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Td.has(n))return zu.QUIRKS;let e=t===null?wd:Cd;if(Od(n,e))return zu.QUIRKS;if(e=t===null?Ed:Dd,Od(n,e))return zu.LIMITED_QUIRKS}return zu.NO_QUIRKS}var jd={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},Md=`definitionurl`,Nd=`definitionURL`,Pd=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`.split(`.`).map(e=>[e.toLowerCase(),e])),Fd=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:K.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:K.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:K.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:K.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:K.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:K.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:K.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:K.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:K.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:K.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:K.XMLNS}]]),Id=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`.split(`.`).map(e=>[e.toLowerCase(),e])),Ld=new Set([J.B,J.BIG,J.BLOCKQUOTE,J.BODY,J.BR,J.CENTER,J.CODE,J.DD,J.DIV,J.DL,J.DT,J.EM,J.EMBED,J.H1,J.H2,J.H3,J.H4,J.H5,J.H6,J.HEAD,J.HR,J.I,J.IMG,J.LI,J.LISTING,J.MENU,J.META,J.NOBR,J.OL,J.P,J.PRE,J.RUBY,J.S,J.SMALL,J.SPAN,J.STRONG,J.STRIKE,J.SUB,J.SUP,J.TABLE,J.TT,J.U,J.UL,J.VAR]);function Rd(e){let t=e.tagID;return t===J.FONT&&e.attrs.some(({name:e})=>e===Ru.COLOR||e===Ru.SIZE||e===Ru.FACE)||Ld.has(t)}function zd(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Md){e.attrs[t].name=Nd;break}}function Bd(e){for(let t=0;t<e.attrs.length;t++){let n=Pd.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Vd(e){for(let t=0;t<e.attrs.length;t++){let n=Fd.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 Hd(e){let t=Id.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Vu(e.tagName))}function Ud(e,t){return t===K.MATHML&&(e===J.MI||e===J.MO||e===J.MN||e===J.MS||e===J.MTEXT)}function Wd(e,t,n){if(t===K.MATHML&&e===J.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===Ru.ENCODING){let t=n[e].value.toLowerCase();return t===jd.TEXT_HTML||t===jd.APPLICATION_XML}}return t===K.SVG&&(e===J.FOREIGN_OBJECT||e===J.DESC||e===J.TITLE)}function Gd(e,t,n,r){return(!r||r===K.HTML)&&Wd(e,t,n)||(!r||r===K.MATHML)&&Ud(e,t)}var Kd=`hidden`,qd=8,Jd=3,Z;(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`})(Z||={});var Yd={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Xd=new Set([J.TABLE,J.TBODY,J.TFOOT,J.THEAD,J.TR]),Zd={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:yd,onParseError:null},Qd=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=Z.INITIAL,this.originalInsertionMode=Z.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={...Zd,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new nd(this.options,this),this.activeFormattingElements=new vd(this.treeAdapter),this.fragmentContextID=n?Vu(this.treeAdapter.getTagName(n)):J.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new md(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...Zd,...t};e??=n.treeAdapter.createElement(q.TEMPLATE,K.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,K.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===J.TEMPLATE&&i.tmplInsertionModeStack.unshift(Z.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){if(!this.onParseError)return;let r=e.location??Yd,i={code:t,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:n?r.startLine:r.endLine,endCol:n?r.startCol:r.endCol,endOffset:n?r.startOffset:r.endOffset};this.onParseError(i)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)==null||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===K.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,K.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=Z.TEXT}switchToPlaintextParsing(){this.insertionMode=Z.TEXT,this.originalInsertionMode=Z.IN_BODY,this.tokenizer.state=Ku.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===q.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===K.HTML)switch(this.fragmentContextID){case J.TITLE:case J.TEXTAREA:this.tokenizer.state=Ku.RCDATA;break;case J.STYLE:case J.XMP:case J.IFRAME:case J.NOEMBED:case J.NOFRAMES:case J.NOSCRIPT:this.tokenizer.state=Ku.RAWTEXT;break;case J.SCRIPT:this.tokenizer.state=Ku.SCRIPT_DATA;break;case J.PLAINTEXT:this.tokenizer.state=Ku.PLAINTEXT}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,K.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,K.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(q.HTML,K.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,J.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===_u.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===J.SVG&&this.treeAdapter.getTagName(t)===q.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===K.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===J.MGLYPH||e.tagID===J.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,K.HTML)}_processToken(e){switch(e.type){case _u.CHARACTER:this.onCharacter(e);break;case _u.NULL_CHARACTER:this.onNullCharacter(e);break;case _u.COMMENT:this.onComment(e);break;case _u.DOCTYPE:this.onDoctype(e);break;case _u.START_TAG:this._processStartTag(e);break;case _u.END_TAG:this.onEndTag(e);break;case _u.EOF:this.onEof(e);break;case _u.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){return Gd(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===gd.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=Z.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(J.P),this.openElements.popUntilTagNamePopped(J.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case J.TR:this.insertionMode=Z.IN_ROW;return;case J.TBODY:case J.THEAD:case J.TFOOT:this.insertionMode=Z.IN_TABLE_BODY;return;case J.CAPTION:this.insertionMode=Z.IN_CAPTION;return;case J.COLGROUP:this.insertionMode=Z.IN_COLUMN_GROUP;return;case J.TABLE:this.insertionMode=Z.IN_TABLE;return;case J.BODY:this.insertionMode=Z.IN_BODY;return;case J.FRAMESET:this.insertionMode=Z.IN_FRAMESET;return;case J.SELECT:this._resetInsertionModeForSelect(e);return;case J.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case J.HTML:this.insertionMode=this.headElement?Z.AFTER_HEAD:Z.BEFORE_HEAD;return;case J.TD:case J.TH:if(e>0){this.insertionMode=Z.IN_CELL;return}break;case J.HEAD:if(e>0){this.insertionMode=Z.IN_HEAD;return}}this.insertionMode=Z.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===J.TEMPLATE)break;if(e===J.TABLE){this.insertionMode=Z.IN_SELECT_IN_TABLE;return}}this.insertionMode=Z.IN_SELECT}_isElementCausesFosterParenting(e){return Xd.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case J.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===K.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case J.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return Hu[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)_m(this,e);else switch(this.insertionMode){case Z.INITIAL:ff(this,e);break;case Z.BEFORE_HTML:hf(this,e);break;case Z.BEFORE_HEAD:vf(this,e);break;case Z.IN_HEAD:Sf(this,e);break;case Z.IN_HEAD_NO_SCRIPT:Tf(this,e);break;case Z.AFTER_HEAD:Of(this,e);break;case Z.IN_BODY:case Z.IN_CAPTION:case Z.IN_CELL:case Z.IN_TEMPLATE:jf(this,e);break;case Z.TEXT:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case Z.IN_TABLE:case Z.IN_TABLE_BODY:case Z.IN_ROW:Ep(this,e);break;case Z.IN_TABLE_TEXT:zp(this,e);break;case Z.IN_COLUMN_GROUP:Kp(this,e);break;case Z.AFTER_BODY:cm(this,e);break;case Z.AFTER_AFTER_BODY:mm(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)gm(this,e);else switch(this.insertionMode){case Z.INITIAL:ff(this,e);break;case Z.BEFORE_HTML:hf(this,e);break;case Z.BEFORE_HEAD:vf(this,e);break;case Z.IN_HEAD:Sf(this,e);break;case Z.IN_HEAD_NO_SCRIPT:Tf(this,e);break;case Z.AFTER_HEAD:Of(this,e);break;case Z.TEXT:this._insertCharacters(e);break;case Z.IN_TABLE:case Z.IN_TABLE_BODY:case Z.IN_ROW:Ep(this,e);break;case Z.IN_COLUMN_GROUP:Kp(this,e);break;case Z.AFTER_BODY:cm(this,e);break;case Z.AFTER_AFTER_BODY:mm(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML)sf(this,e);else switch(this.insertionMode){case Z.INITIAL:case Z.BEFORE_HTML:case Z.BEFORE_HEAD:case Z.IN_HEAD:case Z.IN_HEAD_NO_SCRIPT:case Z.AFTER_HEAD:case Z.IN_BODY:case Z.IN_TABLE:case Z.IN_CAPTION:case Z.IN_COLUMN_GROUP:case Z.IN_TABLE_BODY:case Z.IN_ROW:case Z.IN_CELL:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:case Z.IN_TEMPLATE:case Z.IN_FRAMESET:case Z.AFTER_FRAMESET:sf(this,e);break;case Z.IN_TABLE_TEXT:Bp(this,e);break;case Z.AFTER_BODY:cf(this,e);break;case Z.AFTER_AFTER_BODY:case Z.AFTER_AFTER_FRAMESET:lf(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case Z.INITIAL:df(this,e);break;case Z.BEFORE_HEAD:case Z.IN_HEAD:case Z.IN_HEAD_NO_SCRIPT:case Z.AFTER_HEAD:this._err(e,G.misplacedDoctype);break;case Z.IN_TABLE_TEXT:Bp(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,G.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?ym(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case Z.INITIAL:ff(this,e);break;case Z.BEFORE_HTML:pf(this,e);break;case Z.BEFORE_HEAD:gf(this,e);break;case Z.IN_HEAD:yf(this,e);break;case Z.IN_HEAD_NO_SCRIPT:Cf(this,e);break;case Z.AFTER_HEAD:Ef(this,e);break;case Z.IN_BODY:up(this,e);break;case Z.IN_TABLE:Fp(this,e);break;case Z.IN_TABLE_TEXT:Bp(this,e);break;case Z.IN_CAPTION:Hp(this,e);break;case Z.IN_COLUMN_GROUP:Wp(this,e);break;case Z.IN_TABLE_BODY:qp(this,e);break;case Z.IN_ROW:Yp(this,e);break;case Z.IN_CELL:Zp(this,e);break;case Z.IN_SELECT:$p(this,e);break;case Z.IN_SELECT_IN_TABLE:tm(this,e);break;case Z.IN_TEMPLATE:rm(this,e);break;case Z.AFTER_BODY:om(this,e);break;case Z.IN_FRAMESET:lm(this,e);break;case Z.AFTER_FRAMESET:dm(this,e);break;case Z.AFTER_AFTER_BODY:pm(this,e);break;case Z.AFTER_AFTER_FRAMESET:hm(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?bm(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case Z.INITIAL:ff(this,e);break;case Z.BEFORE_HTML:mf(this,e);break;case Z.BEFORE_HEAD:_f(this,e);break;case Z.IN_HEAD:bf(this,e);break;case Z.IN_HEAD_NO_SCRIPT:wf(this,e);break;case Z.AFTER_HEAD:Df(this,e);break;case Z.IN_BODY:Sp(this,e);break;case Z.TEXT:wp(this,e);break;case Z.IN_TABLE:Ip(this,e);break;case Z.IN_TABLE_TEXT:Bp(this,e);break;case Z.IN_CAPTION:Up(this,e);break;case Z.IN_COLUMN_GROUP:Gp(this,e);break;case Z.IN_TABLE_BODY:Jp(this,e);break;case Z.IN_ROW:Xp(this,e);break;case Z.IN_CELL:Qp(this,e);break;case Z.IN_SELECT:em(this,e);break;case Z.IN_SELECT_IN_TABLE:nm(this,e);break;case Z.IN_TEMPLATE:im(this,e);break;case Z.AFTER_BODY:sm(this,e);break;case Z.IN_FRAMESET:um(this,e);break;case Z.AFTER_FRAMESET:fm(this,e);break;case Z.AFTER_AFTER_BODY:mm(this,e)}}onEof(e){switch(this.insertionMode){case Z.INITIAL:ff(this,e);break;case Z.BEFORE_HTML:hf(this,e);break;case Z.BEFORE_HEAD:vf(this,e);break;case Z.IN_HEAD:Sf(this,e);break;case Z.IN_HEAD_NO_SCRIPT:Tf(this,e);break;case Z.AFTER_HEAD:Of(this,e);break;case Z.IN_BODY:case Z.IN_TABLE:case Z.IN_CAPTION:case Z.IN_COLUMN_GROUP:case Z.IN_TABLE_BODY:case Z.IN_ROW:case Z.IN_CELL:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:Cp(this,e);break;case Z.TEXT:Tp(this,e);break;case Z.IN_TABLE_TEXT:Bp(this,e);break;case Z.IN_TEMPLATE:am(this,e);break;case Z.AFTER_BODY:case Z.IN_FRAMESET:case Z.AFTER_FRAMESET:case Z.AFTER_AFTER_BODY:case Z.AFTER_AFTER_FRAMESET:uf(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===W.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode)this._insertCharacters(e);else switch(this.insertionMode){case Z.IN_HEAD:case Z.IN_HEAD_NO_SCRIPT:case Z.AFTER_HEAD:case Z.TEXT:case Z.IN_COLUMN_GROUP:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:case Z.IN_FRAMESET:case Z.AFTER_FRAMESET:this._insertCharacters(e);break;case Z.IN_BODY:case Z.IN_CAPTION:case Z.IN_CELL:case Z.IN_TEMPLATE:case Z.AFTER_BODY:case Z.AFTER_AFTER_BODY:case Z.AFTER_AFTER_FRAMESET:Af(this,e);break;case Z.IN_TABLE:case Z.IN_TABLE_BODY:case Z.IN_ROW:Ep(this,e);break;case Z.IN_TABLE_TEXT:Rp(this,e)}}};function $d(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):xp(e,t),n}function ef(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function tf(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=Jd;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=nf(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function nf(e,t){let 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 rf(e,t,n){let r=Vu(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===J.TEMPLATE&&i===K.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function af(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function of(e,t){for(let n=0;n<qd;n++){let n=$d(e,t);if(!n)break;let r=ef(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=tf(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&rf(e,a,i),af(e,r,n)}}function sf(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function cf(e,t){e._appendCommentNode(t,e.openElements.items[0])}function lf(e,t){e._appendCommentNode(t,e.document)}function uf(e,t){if(e.stopped=!0,t.location){let 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){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function df(e,t){e._setDocumentType(t);let n=t.forceQuirks?zu.QUIRKS:Ad(t);kd(t)||e._err(t,G.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=Z.BEFORE_HTML}function ff(e,t){e._err(t,G.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,zu.QUIRKS),e.insertionMode=Z.BEFORE_HTML,e._processToken(t)}function pf(e,t){t.tagID===J.HTML?(e._insertElement(t,K.HTML),e.insertionMode=Z.BEFORE_HEAD):hf(e,t)}function mf(e,t){let n=t.tagID;(n===J.HTML||n===J.HEAD||n===J.BODY||n===J.BR)&&hf(e,t)}function hf(e,t){e._insertFakeRootElement(),e.insertionMode=Z.BEFORE_HEAD,e._processToken(t)}function gf(e,t){switch(t.tagID){case J.HTML:up(e,t);break;case J.HEAD:e._insertElement(t,K.HTML),e.headElement=e.openElements.current,e.insertionMode=Z.IN_HEAD;break;default:vf(e,t)}}function _f(e,t){let n=t.tagID;n===J.HEAD||n===J.BODY||n===J.HTML||n===J.BR?vf(e,t):e._err(t,G.endTagWithoutMatchingOpenElement)}function vf(e,t){e._insertFakeElement(q.HEAD,J.HEAD),e.headElement=e.openElements.current,e.insertionMode=Z.IN_HEAD,e._processToken(t)}function yf(e,t){switch(t.tagID){case J.HTML:up(e,t);break;case J.BASE:case J.BASEFONT:case J.BGSOUND:case J.LINK:case J.META:e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break;case J.TITLE:e._switchToTextParsing(t,Ku.RCDATA);break;case J.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,Ku.RAWTEXT):(e._insertElement(t,K.HTML),e.insertionMode=Z.IN_HEAD_NO_SCRIPT);break;case J.NOFRAMES:case J.STYLE:e._switchToTextParsing(t,Ku.RAWTEXT);break;case J.SCRIPT:e._switchToTextParsing(t,Ku.SCRIPT_DATA);break;case J.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=Z.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(Z.IN_TEMPLATE);break;case J.HEAD:e._err(t,G.misplacedStartTagForHeadElement);break;default:Sf(e,t)}}function bf(e,t){switch(t.tagID){case J.HEAD:e.openElements.pop(),e.insertionMode=Z.AFTER_HEAD;break;case J.BODY:case J.BR:case J.HTML:Sf(e,t);break;case J.TEMPLATE:xf(e,t);break;default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function xf(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==J.TEMPLATE&&e._err(t,G.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(J.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,G.endTagWithoutMatchingOpenElement)}function Sf(e,t){e.openElements.pop(),e.insertionMode=Z.AFTER_HEAD,e._processToken(t)}function Cf(e,t){switch(t.tagID){case J.HTML:up(e,t);break;case J.BASEFONT:case J.BGSOUND:case J.HEAD:case J.LINK:case J.META:case J.NOFRAMES:case J.STYLE:yf(e,t);break;case J.NOSCRIPT:e._err(t,G.nestedNoscriptInHead);break;default:Tf(e,t)}}function wf(e,t){switch(t.tagID){case J.NOSCRIPT:e.openElements.pop(),e.insertionMode=Z.IN_HEAD;break;case J.BR:Tf(e,t);break;default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function Tf(e,t){let n=t.type===_u.EOF?G.openElementsLeftAfterEof:G.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=Z.IN_HEAD,e._processToken(t)}function Ef(e,t){switch(t.tagID){case J.HTML:up(e,t);break;case J.BODY:e._insertElement(t,K.HTML),e.framesetOk=!1,e.insertionMode=Z.IN_BODY;break;case J.FRAMESET:e._insertElement(t,K.HTML),e.insertionMode=Z.IN_FRAMESET;break;case J.BASE:case J.BASEFONT:case J.BGSOUND:case J.LINK:case J.META:case J.NOFRAMES:case J.SCRIPT:case J.STYLE:case J.TEMPLATE:case J.TITLE:e._err(t,G.abandonedHeadElementChild),e.openElements.push(e.headElement,J.HEAD),yf(e,t),e.openElements.remove(e.headElement);break;case J.HEAD:e._err(t,G.misplacedStartTagForHeadElement);break;default:Of(e,t)}}function Df(e,t){switch(t.tagID){case J.BODY:case J.HTML:case J.BR:Of(e,t);break;case J.TEMPLATE:xf(e,t);break;default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function Of(e,t){e._insertFakeElement(q.BODY,J.BODY),e.insertionMode=Z.IN_BODY,kf(e,t)}function kf(e,t){switch(t.type){case _u.CHARACTER:jf(e,t);break;case _u.WHITESPACE_CHARACTER:Af(e,t);break;case _u.COMMENT:sf(e,t);break;case _u.START_TAG:up(e,t);break;case _u.END_TAG:Sp(e,t);break;case _u.EOF:Cp(e,t)}}function Af(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function jf(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Mf(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Nf(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Pf(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_FRAMESET)}function Ff(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML)}function If(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Uu.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,K.HTML)}function Lf(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Rf(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML),n||(e.formElement=e.openElements.current))}function zf(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===J.LI&&r===J.LI||(n===J.DD||n===J.DT)&&(r===J.DD||r===J.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==J.ADDRESS&&r!==J.DIV&&r!==J.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML)}function Bf(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.tokenizer.state=Ku.PLAINTEXT}function Vf(e,t){e.openElements.hasInScope(J.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(J.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.framesetOk=!1}function Hf(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(q.A);n&&(of(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Uf(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Wf(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(J.NOBR)&&(of(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Gf(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Kf(e,t){e.treeAdapter.getDocumentMode(e.document)!==zu.QUIRKS&&e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.framesetOk=!1,e.insertionMode=Z.IN_TABLE}function qf(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,K.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Jf(e){let t=vu(e,Ru.TYPE);return t!=null&&t.toLowerCase()===Kd}function Yf(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,K.HTML),Jf(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Xf(e,t){e._appendElement(t,K.HTML),t.ackSelfClosing=!0}function Zf(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._appendElement(t,K.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Qf(e,t){t.tagName=q.IMG,t.tagID=J.IMG,qf(e,t)}function $f(e,t){e._insertElement(t,K.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ku.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=Z.TEXT}function ep(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ku.RAWTEXT)}function tp(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ku.RAWTEXT)}function np(e,t){e._switchToTextParsing(t,Ku.RAWTEXT)}function rp(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===Z.IN_TABLE||e.insertionMode===Z.IN_CAPTION||e.insertionMode===Z.IN_TABLE_BODY||e.insertionMode===Z.IN_ROW||e.insertionMode===Z.IN_CELL?Z.IN_SELECT_IN_TABLE:Z.IN_SELECT}function ip(e,t){e.openElements.currentTagId===J.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML)}function ap(e,t){e.openElements.hasInScope(J.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,K.HTML)}function op(e,t){e.openElements.hasInScope(J.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(J.RTC),e._insertElement(t,K.HTML)}function sp(e,t){e._reconstructActiveFormattingElements(),zd(t),Vd(t),t.selfClosing?e._appendElement(t,K.MATHML):e._insertElement(t,K.MATHML),t.ackSelfClosing=!0}function cp(e,t){e._reconstructActiveFormattingElements(),Bd(t),Vd(t),t.selfClosing?e._appendElement(t,K.SVG):e._insertElement(t,K.SVG),t.ackSelfClosing=!0}function lp(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML)}function up(e,t){switch(t.tagID){case J.I:case J.S:case J.B:case J.U:case J.EM:case J.TT:case J.BIG:case J.CODE:case J.FONT:case J.SMALL:case J.STRIKE:case J.STRONG:Uf(e,t);break;case J.A:Hf(e,t);break;case J.H1:case J.H2:case J.H3:case J.H4:case J.H5:case J.H6:If(e,t);break;case J.P:case J.DL:case J.OL:case J.UL:case J.DIV:case J.DIR:case J.NAV:case J.MAIN:case J.MENU:case J.ASIDE:case J.CENTER:case J.FIGURE:case J.FOOTER:case J.HEADER:case J.HGROUP:case J.DIALOG:case J.DETAILS:case J.ADDRESS:case J.ARTICLE:case J.SEARCH:case J.SECTION:case J.SUMMARY:case J.FIELDSET:case J.BLOCKQUOTE:case J.FIGCAPTION:Ff(e,t);break;case J.LI:case J.DD:case J.DT:zf(e,t);break;case J.BR:case J.IMG:case J.WBR:case J.AREA:case J.EMBED:case J.KEYGEN:qf(e,t);break;case J.HR:Zf(e,t);break;case J.RB:case J.RTC:ap(e,t);break;case J.RT:case J.RP:op(e,t);break;case J.PRE:case J.LISTING:Lf(e,t);break;case J.XMP:ep(e,t);break;case J.SVG:cp(e,t);break;case J.HTML:Mf(e,t);break;case J.BASE:case J.LINK:case J.META:case J.STYLE:case J.TITLE:case J.SCRIPT:case J.BGSOUND:case J.BASEFONT:case J.TEMPLATE:yf(e,t);break;case J.BODY:Nf(e,t);break;case J.FORM:Rf(e,t);break;case J.NOBR:Wf(e,t);break;case J.MATH:sp(e,t);break;case J.TABLE:Kf(e,t);break;case J.INPUT:Yf(e,t);break;case J.PARAM:case J.TRACK:case J.SOURCE:Xf(e,t);break;case J.IMAGE:Qf(e,t);break;case J.BUTTON:Vf(e,t);break;case J.APPLET:case J.OBJECT:case J.MARQUEE:Gf(e,t);break;case J.IFRAME:tp(e,t);break;case J.SELECT:rp(e,t);break;case J.OPTION:case J.OPTGROUP:ip(e,t);break;case J.NOEMBED:case J.NOFRAMES:np(e,t);break;case J.FRAMESET:Pf(e,t);break;case J.TEXTAREA:$f(e,t);break;case J.NOSCRIPT:e.options.scriptingEnabled?np(e,t):lp(e,t);break;case J.PLAINTEXT:Bf(e,t);break;case J.COL:case J.TH:case J.TD:case J.TR:case J.HEAD:case J.FRAME:case J.TBODY:case J.TFOOT:case J.THEAD:case J.CAPTION:case J.COLGROUP:break;default:lp(e,t)}}function dp(e,t){if(e.openElements.hasInScope(J.BODY)&&(e.insertionMode=Z.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function fp(e,t){e.openElements.hasInScope(J.BODY)&&(e.insertionMode=Z.AFTER_BODY,sm(e,t))}function pp(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function mp(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(J.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(J.FORM):n&&e.openElements.remove(n))}function hp(e){e.openElements.hasInButtonScope(J.P)||e._insertFakeElement(q.P,J.P),e._closePElement()}function gp(e){e.openElements.hasInListItemScope(J.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(J.LI),e.openElements.popUntilTagNamePopped(J.LI))}function _p(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function vp(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function yp(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function bp(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(q.BR,J.BR),e.openElements.pop(),e.framesetOk=!1}function xp(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==J.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function Sp(e,t){switch(t.tagID){case J.A:case J.B:case J.I:case J.S:case J.U:case J.EM:case J.TT:case J.BIG:case J.CODE:case J.FONT:case J.NOBR:case J.SMALL:case J.STRIKE:case J.STRONG:of(e,t);break;case J.P:hp(e);break;case J.DL:case J.UL:case J.OL:case J.DIR:case J.DIV:case J.NAV:case J.PRE:case J.MAIN:case J.MENU:case J.ASIDE:case J.BUTTON:case J.CENTER:case J.FIGURE:case J.FOOTER:case J.HEADER:case J.HGROUP:case J.DIALOG:case J.ADDRESS:case J.ARTICLE:case J.DETAILS:case J.SEARCH:case J.SECTION:case J.SUMMARY:case J.LISTING:case J.FIELDSET:case J.BLOCKQUOTE:case J.FIGCAPTION:pp(e,t);break;case J.LI:gp(e);break;case J.DD:case J.DT:_p(e,t);break;case J.H1:case J.H2:case J.H3:case J.H4:case J.H5:case J.H6:vp(e);break;case J.BR:bp(e);break;case J.BODY:dp(e,t);break;case J.HTML:fp(e,t);break;case J.FORM:mp(e);break;case J.APPLET:case J.OBJECT:case J.MARQUEE:yp(e,t);break;case J.TEMPLATE:xf(e,t);break;default:xp(e,t)}}function Cp(e,t){e.tmplInsertionModeStack.length>0?am(e,t):uf(e,t)}function wp(e,t){var n;t.tagID===J.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Tp(e,t){e._err(t,G.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ep(e,t){if(e.openElements.currentTagId!==void 0&&Xd.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=Z.IN_TABLE_TEXT,t.type){case _u.CHARACTER:zp(e,t);break;case _u.WHITESPACE_CHARACTER:Rp(e,t)}else Lp(e,t)}function Dp(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_CAPTION}function Op(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_COLUMN_GROUP}function kp(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(q.COLGROUP,J.COLGROUP),e.insertionMode=Z.IN_COLUMN_GROUP,Wp(e,t)}function Ap(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_TABLE_BODY}function jp(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(q.TBODY,J.TBODY),e.insertionMode=Z.IN_TABLE_BODY,qp(e,t)}function Mp(e,t){e.openElements.hasInTableScope(J.TABLE)&&(e.openElements.popUntilTagNamePopped(J.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Np(e,t){Jf(t)?e._appendElement(t,K.HTML):Lp(e,t),t.ackSelfClosing=!0}function Pp(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,K.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Fp(e,t){switch(t.tagID){case J.TD:case J.TH:case J.TR:jp(e,t);break;case J.STYLE:case J.SCRIPT:case J.TEMPLATE:yf(e,t);break;case J.COL:kp(e,t);break;case J.FORM:Pp(e,t);break;case J.TABLE:Mp(e,t);break;case J.TBODY:case J.TFOOT:case J.THEAD:Ap(e,t);break;case J.INPUT:Np(e,t);break;case J.CAPTION:Dp(e,t);break;case J.COLGROUP:Op(e,t);break;default:Lp(e,t)}}function Ip(e,t){switch(t.tagID){case J.TABLE:e.openElements.hasInTableScope(J.TABLE)&&(e.openElements.popUntilTagNamePopped(J.TABLE),e._resetInsertionMode());break;case J.TEMPLATE:xf(e,t);break;case J.BODY:case J.CAPTION:case J.COL:case J.COLGROUP:case J.HTML:case J.TBODY:case J.TD:case J.TFOOT:case J.TH:case J.THEAD:case J.TR:break;default:Lp(e,t)}}function Lp(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,kf(e,t),e.fosterParentingEnabled=n}function Rp(e,t){e.pendingCharacterTokens.push(t)}function zp(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Bp(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Lp(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var Vp=new Set([J.CAPTION,J.COL,J.COLGROUP,J.TBODY,J.TD,J.TFOOT,J.TH,J.THEAD,J.TR]);function Hp(e,t){let n=t.tagID;Vp.has(n)?e.openElements.hasInTableScope(J.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(J.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Z.IN_TABLE,Fp(e,t)):up(e,t)}function Up(e,t){let n=t.tagID;switch(n){case J.CAPTION:case J.TABLE:e.openElements.hasInTableScope(J.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(J.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Z.IN_TABLE,n===J.TABLE&&Ip(e,t));break;case J.BODY:case J.COL:case J.COLGROUP:case J.HTML:case J.TBODY:case J.TD:case J.TFOOT:case J.TH:case J.THEAD:case J.TR:break;default:Sp(e,t)}}function Wp(e,t){switch(t.tagID){case J.HTML:up(e,t);break;case J.COL:e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break;case J.TEMPLATE:yf(e,t);break;default:Kp(e,t)}}function Gp(e,t){switch(t.tagID){case J.COLGROUP:e.openElements.currentTagId===J.COLGROUP&&(e.openElements.pop(),e.insertionMode=Z.IN_TABLE);break;case J.TEMPLATE:xf(e,t);break;case J.COL:break;default:Kp(e,t)}}function Kp(e,t){e.openElements.currentTagId===J.COLGROUP&&(e.openElements.pop(),e.insertionMode=Z.IN_TABLE,e._processToken(t))}function qp(e,t){switch(t.tagID){case J.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_ROW;break;case J.TH:case J.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(q.TR,J.TR),e.insertionMode=Z.IN_ROW,Yp(e,t);break;case J.CAPTION:case J.COL:case J.COLGROUP:case J.TBODY:case J.TFOOT:case J.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE,Fp(e,t));break;default:Fp(e,t)}}function Jp(e,t){let n=t.tagID;switch(t.tagID){case J.TBODY:case J.TFOOT:case J.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE);break;case J.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE,Ip(e,t));break;case J.BODY:case J.CAPTION:case J.COL:case J.COLGROUP:case J.HTML:case J.TD:case J.TH:case J.TR:break;default:Ip(e,t)}}function Yp(e,t){switch(t.tagID){case J.TH:case J.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_CELL,e.activeFormattingElements.insertMarker();break;case J.CAPTION:case J.COL:case J.COLGROUP:case J.TBODY:case J.TFOOT:case J.THEAD:case J.TR:e.openElements.hasInTableScope(J.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY,qp(e,t));break;default:Fp(e,t)}}function Xp(e,t){switch(t.tagID){case J.TR:e.openElements.hasInTableScope(J.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY);break;case J.TABLE:e.openElements.hasInTableScope(J.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY,Jp(e,t));break;case J.TBODY:case J.TFOOT:case J.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(J.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY,Jp(e,t));break;case J.BODY:case J.CAPTION:case J.COL:case J.COLGROUP:case J.HTML:case J.TD:case J.TH:break;default:Ip(e,t)}}function Zp(e,t){let n=t.tagID;Vp.has(n)?(e.openElements.hasInTableScope(J.TD)||e.openElements.hasInTableScope(J.TH))&&(e._closeTableCell(),Yp(e,t)):up(e,t)}function Qp(e,t){let n=t.tagID;switch(n){case J.TD:case J.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Z.IN_ROW);break;case J.TABLE:case J.TBODY:case J.TFOOT:case J.THEAD:case J.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Xp(e,t));break;case J.BODY:case J.CAPTION:case J.COL:case J.COLGROUP:case J.HTML:break;default:Sp(e,t)}}function $p(e,t){switch(t.tagID){case J.HTML:up(e,t);break;case J.OPTION:e.openElements.currentTagId===J.OPTION&&e.openElements.pop(),e._insertElement(t,K.HTML);break;case J.OPTGROUP:e.openElements.currentTagId===J.OPTION&&e.openElements.pop(),e.openElements.currentTagId===J.OPTGROUP&&e.openElements.pop(),e._insertElement(t,K.HTML);break;case J.HR:e.openElements.currentTagId===J.OPTION&&e.openElements.pop(),e.openElements.currentTagId===J.OPTGROUP&&e.openElements.pop(),e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break;case J.INPUT:case J.KEYGEN:case J.TEXTAREA:case J.SELECT:e.openElements.hasInSelectScope(J.SELECT)&&(e.openElements.popUntilTagNamePopped(J.SELECT),e._resetInsertionMode(),t.tagID!==J.SELECT&&e._processStartTag(t));break;case J.SCRIPT:case J.TEMPLATE:yf(e,t)}}function em(e,t){switch(t.tagID){case J.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===J.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===J.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===J.OPTGROUP&&e.openElements.pop();break;case J.OPTION:e.openElements.currentTagId===J.OPTION&&e.openElements.pop();break;case J.SELECT:e.openElements.hasInSelectScope(J.SELECT)&&(e.openElements.popUntilTagNamePopped(J.SELECT),e._resetInsertionMode());break;case J.TEMPLATE:xf(e,t)}}function tm(e,t){let n=t.tagID;n===J.CAPTION||n===J.TABLE||n===J.TBODY||n===J.TFOOT||n===J.THEAD||n===J.TR||n===J.TD||n===J.TH?(e.openElements.popUntilTagNamePopped(J.SELECT),e._resetInsertionMode(),e._processStartTag(t)):$p(e,t)}function nm(e,t){let n=t.tagID;n===J.CAPTION||n===J.TABLE||n===J.TBODY||n===J.TFOOT||n===J.THEAD||n===J.TR||n===J.TD||n===J.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(J.SELECT),e._resetInsertionMode(),e.onEndTag(t)):em(e,t)}function rm(e,t){switch(t.tagID){case J.BASE:case J.BASEFONT:case J.BGSOUND:case J.LINK:case J.META:case J.NOFRAMES:case J.SCRIPT:case J.STYLE:case J.TEMPLATE:case J.TITLE:yf(e,t);break;case J.CAPTION:case J.COLGROUP:case J.TBODY:case J.TFOOT:case J.THEAD:e.tmplInsertionModeStack[0]=Z.IN_TABLE,e.insertionMode=Z.IN_TABLE,Fp(e,t);break;case J.COL:e.tmplInsertionModeStack[0]=Z.IN_COLUMN_GROUP,e.insertionMode=Z.IN_COLUMN_GROUP,Wp(e,t);break;case J.TR:e.tmplInsertionModeStack[0]=Z.IN_TABLE_BODY,e.insertionMode=Z.IN_TABLE_BODY,qp(e,t);break;case J.TD:case J.TH:e.tmplInsertionModeStack[0]=Z.IN_ROW,e.insertionMode=Z.IN_ROW,Yp(e,t);break;default:e.tmplInsertionModeStack[0]=Z.IN_BODY,e.insertionMode=Z.IN_BODY,up(e,t)}}function im(e,t){t.tagID===J.TEMPLATE&&xf(e,t)}function am(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(J.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):uf(e,t)}function om(e,t){t.tagID===J.HTML?up(e,t):cm(e,t)}function sm(e,t){if(t.tagID===J.HTML){if(e.fragmentContext||(e.insertionMode=Z.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===J.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else cm(e,t)}function cm(e,t){e.insertionMode=Z.IN_BODY,kf(e,t)}function lm(e,t){switch(t.tagID){case J.HTML:up(e,t);break;case J.FRAMESET:e._insertElement(t,K.HTML);break;case J.FRAME:e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break;case J.NOFRAMES:yf(e,t)}}function um(e,t){t.tagID===J.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==J.FRAMESET&&(e.insertionMode=Z.AFTER_FRAMESET))}function dm(e,t){switch(t.tagID){case J.HTML:up(e,t);break;case J.NOFRAMES:yf(e,t)}}function fm(e,t){t.tagID===J.HTML&&(e.insertionMode=Z.AFTER_AFTER_FRAMESET)}function pm(e,t){t.tagID===J.HTML?up(e,t):mm(e,t)}function mm(e,t){e.insertionMode=Z.IN_BODY,kf(e,t)}function hm(e,t){switch(t.tagID){case J.HTML:up(e,t);break;case J.NOFRAMES:yf(e,t)}}function gm(e,t){t.chars=`�`,e._insertCharacters(t)}function _m(e,t){e._insertCharacters(t),e.framesetOk=!1}function vm(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==K.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function ym(e,t){if(Rd(t))vm(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===K.MATHML?zd(t):r===K.SVG&&(Hd(t),Bd(t)),Vd(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function bm(e,t){if(t.tagID===J.P||t.tagID===J.BR)vm(e),e._endTagOutsideForeignContent(t);else for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===K.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}function xm(e){return e===34?`"`:e===38?`&`:e===39?`'`:e===60?`<`:e===62?`>`:` `}function Sm(e,t){if(e.lastIndex=0,!e.test(t))return t;let n=``,r=0;do{let i=e.lastIndex-1;r!==i&&(n+=t.substring(r,i));let a=t.charCodeAt(i);n+=xm(a),r=i+1}while(e.test(t));return n+t.substring(r)}var Cm=/["&\u{A0}]/gu;function wm(e){return Sm(Cm,e)}var Tm=/[&<>\u{A0}]/gu;function Em(e){return Sm(Tm,e)}var Dm=new Set([q.AREA,q.BASE,q.BASEFONT,q.BGSOUND,q.BR,q.COL,q.EMBED,q.FRAME,q.HR,q.IMG,q.INPUT,q.KEYGEN,q.LINK,q.META,q.PARAM,q.SOURCE,q.TRACK,q.WBR]);function Om(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===K.HTML&&Dm.has(t.treeAdapter.getTagName(e))}var km={treeAdapter:yd,scriptingEnabled:!0};function Am(e,t){return Mm(e,{...km,...t})}function jm(e,t){let n=``,r=t.treeAdapter.isElementNode(e)&&t.treeAdapter.getTagName(e)===q.TEMPLATE&&t.treeAdapter.getNamespaceURI(e)===K.HTML?t.treeAdapter.getTemplateContent(e):e,i=t.treeAdapter.getChildNodes(r);if(i)for(let e of i)n+=Mm(e,t);return n}function Mm(e,t){return t.treeAdapter.isElementNode(e)?Nm(e,t):t.treeAdapter.isTextNode(e)?Fm(e,t):t.treeAdapter.isCommentNode(e)?Im(e,t):t.treeAdapter.isDocumentTypeNode(e)?Lm(e,t):``}function Nm(e,t){let n=t.treeAdapter.getTagName(e);return`<${n}${Pm(e,t)}>${Om(e,t)?``:`${jm(e,t)}</${n}>`}`}function Pm(e,{treeAdapter:t}){let n=``;for(let r of t.getAttrList(e)){if(n+=` `,r.namespace)switch(r.namespace){case K.XML:n+=`xml:${r.name}`;break;case K.XMLNS:r.name!==`xmlns`&&(n+=`xmlns:`),n+=r.name;break;case K.XLINK:n+=`xlink:${r.name}`;break;default:n+=`${r.prefix}:${r.name}`}else n+=r.name;n+=`="${wm(r.value)}"`}return n}function Fm(e,t){let{treeAdapter:n}=t,r=n.getTextNodeContent(e),i=n.getParentNode(e),a=i&&n.isElementNode(i)&&n.getTagName(i);return a&&n.getNamespaceURI(i)===K.HTML&&Gu(a,t.scriptingEnabled)?r:Em(r)}function Im(e,{treeAdapter:t}){return`<!--${t.getCommentNodeContent(e)}-->`}function Lm(e,{treeAdapter:t}){return`<!DOCTYPE ${t.getDocumentTypeNodeName(e)}>`}function Rm(e,t){return Qd.parse(e,t)}function zm(e,t,n){typeof e==`string`&&(n=t,t=e,e=null);let r=Qd.getFragmentParser(e,n);return r.tokenizer.write(t,!0),r.getFragment()}var Bm=`local-draft-2`,Vm={kind:`string`,static:!0},Hm={kind:`string`,static:!0},Um={kind:`number`,static:!0},Wm={kind:`boolean`,static:!0},Gm={kind:`boolean`,dynamic:!0,default:!1},Km={kind:`string`},qm={kind:`string`,static:!0},Jm={kind:`string`},Ym={kind:`string`},Xm=()=>({kind:`string`,static:!0,color:!0}),Zm=(e={})=>({kind:`number`,...e}),Qm=[{name:`input`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`string`,required:!1,family:`text`},initialRule:`empty`,props:{label:Km,bind:Vm,initial:Hm,type:{kind:`enum`,static:!0,values:[`text`,`email`],default:`text`},placeholder:{kind:`string`},required:{kind:`boolean`,default:!1},"min-length":Zm({integer:!0,min:0,default:0}),"max-length":Zm({integer:!0,min:0}),disabled:Gm}},{name:`textarea`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`string`,required:!1,family:`text`},initialRule:`empty`,props:{label:Km,bind:Vm,initial:Hm,placeholder:{kind:`string`},rows:Zm({integer:!0,positive:!0,default:4}),required:{kind:`boolean`,default:!1},"min-length":Zm({integer:!0,min:0,default:0}),"max-length":Zm({integer:!0,min:0}),disabled:Gm}},{name:`number`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`number`,required:!1,family:`number`},initialRule:`nearest-zero`,props:{label:Km,bind:Vm,initial:Um,min:Zm(),max:Zm(),step:Zm({positive:!0,default:1}),disabled:Gm}},{name:`slider`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`number`,required:!1,family:`number`},initialRule:`min`,props:{label:Km,bind:Vm,initial:Um,min:Zm({default:0}),max:Zm({default:100}),step:Zm({positive:!0,default:1}),disabled:Gm,color:Xm()}},{name:`range-slider`,form:`leaf`,childRule:`none`,label:`required`,slots:[{name:`start`,bind:`bind-start`,initial:`initial-start`,kind:`number`,family:`number`,exclusive:!0,initialRule:`min`},{name:`end`,bind:`bind-end`,initial:`initial-end`,kind:`number`,family:`number`,exclusive:!0,initialRule:`max-step`}],props:{label:Km,"bind-start":Vm,"bind-end":Vm,"initial-start":Um,"initial-end":Um,min:Zm({default:0}),max:Zm({default:100}),step:Zm({positive:!0,default:1}),disabled:Gm,color:Xm()}},{name:`coordinate`,form:`leaf`,childRule:`none`,label:`required`,slots:[{name:`x`,bind:`bind-x`,initial:`initial-x`,kind:`number`,family:`number`,exclusive:!0,initialRule:`nearest-zero`},{name:`y`,bind:`bind-y`,initial:`initial-y`,kind:`number`,family:`number`,exclusive:!0,initialRule:`nearest-zero`}],props:{label:Km,"bind-x":Vm,"bind-y":Vm,"initial-x":Um,"initial-y":Um,"x-min":Zm({default:-5}),"x-max":Zm({default:5}),"y-min":Zm({default:-5}),"y-max":Zm({default:5}),step:Zm({positive:!0,default:1}),disabled:Gm,color:Xm()}},{name:`toggle`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`boolean`,required:!1,family:`boolean`},initialRule:`false`,props:{label:Km,bind:Vm,initial:Wm,disabled:Gm,color:Xm()}},{name:`checkbox`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`boolean`,required:!1,family:`boolean`},initialRule:`false`,props:{label:Km,bind:Vm,initial:Wm,disabled:Gm,color:Xm()}},{name:`date`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`string`,required:!1,family:`date`},initialRule:`empty`,props:{label:Km,bind:Vm,initial:Hm,min:{kind:`string`,static:!0},max:{kind:`string`,static:!0},required:{kind:`boolean`,default:!1},disabled:Gm}},{name:`select`,form:`container`,childRule:`options`,label:`required`,binding:{kind:`string`,required:!1,family:`choice`},initialRule:`first-option`,props:{label:Km,bind:Vm,initial:Hm,disabled:Gm,color:Xm()}},{name:`choices`,form:`container`,childRule:`options`,label:`required`,binding:{kind:`string`,required:!1,family:`choice`},initialRule:`first-option`,props:{label:Km,bind:Vm,initial:Hm,disabled:Gm,color:Xm()}},{name:`radio-group`,form:`container`,childRule:`options`,label:`required`,binding:{kind:`string`,required:!1,family:`choice`},initialRule:`first-option`,props:{label:Km,bind:Vm,initial:Hm,disabled:Gm,color:Xm()}},{name:`multi-select`,form:`container`,childRule:`options`,label:`required`,binding:{kind:`array`,required:!1,family:`multi-select`,exclusive:!0},initialRule:`empty-array`,props:{label:Km,bind:Vm,initial:Hm,"max-selected":Zm({integer:!0,min:0}),disabled:Gm,color:Xm()}},{name:`option`,form:`container`,childRule:`inline`,label:`none`,parent:[`select`,`choices`,`radio-group`,`multi-select`,`quiz`],props:{value:{kind:`string`,static:!0,required:!0}}},{name:`counter`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`number`,required:!1,family:`number`},initialRule:`nearest-zero`,props:{label:Km,bind:Vm,initial:Um,min:Zm({default:0}),max:Zm(),step:Zm({positive:!0,default:1}),disabled:Gm}},{name:`timer`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`number`,required:!1,family:`timer`,exclusive:!0},initialRule:`duration`,props:{label:Km,bind:Vm,duration:Zm({integer:!0,positive:!0,default:60})}},{name:`checklist`,form:`container`,childRule:`content`,label:`required`,binding:{kind:`array`,required:!1,family:`checklist`,exclusive:!0},initialRule:`checked`,props:{label:Km,bind:Vm,disabled:Gm,color:Xm()}},{name:`progress`,form:`leaf`,childRule:`none`,label:`required`,props:{label:Km,value:{kind:`number`,dynamic:!0,required:!0},max:Zm({positive:!0,default:100}),color:Xm()}},{name:`jump`,form:`inline`,childRule:`inline`,label:`none`,props:{to:{kind:`string`,static:!0,required:!0},appearance:{kind:`enum`,static:!0,values:[`link`,`button`],default:`link`},color:Xm()}},{name:`anchor`,form:`leaf`,childRule:`none`,label:`none`,props:{id:{kind:`string`,static:!0,required:!0}}},{name:`text`,form:`inline`,childRule:`inline`,label:`none`,props:{color:{kind:`string`,static:!0,required:!0,color:!0}}},{name:`section`,form:`container`,childRule:`any`,label:`none`,props:{color:{kind:`string`,static:!0,required:!0,color:!0}}},{name:`quiz`,form:`container`,childRule:`quiz`,label:`required`,props:{type:{kind:`enum`,static:!0,values:[`choice`,`number`],default:`choice`},label:Km,answer:{kind:`string`,static:!0,required:!0},explanation:{kind:`string`},tolerance:Zm({min:0,default:0}),disabled:Gm}},{name:`panel`,form:`container`,childRule:`any`,label:`none`,props:{title:Ym,reset:{kind:`boolean`,default:!0}}},{name:`card`,form:`container`,childRule:`any`,label:`none`,props:{title:Ym}},{name:`grid`,form:`container`,childRule:`cards`,label:`none`,props:{columns:Zm({integer:!0,min:1,max:4,default:2})}},{name:`tabs`,form:`container`,childRule:`tabs`,label:`optional`,binding:{kind:`string`,required:!1,family:`tabs`,exclusive:!0},initialRule:`first-tab`,props:{label:Jm,bind:Vm,initial:Hm}},{name:`tab`,form:`container`,childRule:`any`,label:`required`,parent:[`tabs`],props:{label:Km,value:{kind:`string`,static:!0}}},{name:`steps`,form:`container`,childRule:`steps`,label:`optional`,binding:{kind:`string`,required:!1,family:`steps`,exclusive:!0},initialRule:`first-step`,props:{label:Jm,bind:Vm,initial:Hm}},{name:`step`,form:`container`,childRule:`any`,label:`required`,parent:[`steps`],props:{label:Km,value:{kind:`string`,static:!0}}},{name:`accordion`,form:`container`,childRule:`disclosures`,label:`optional`,props:{label:Jm}},{name:`disclosure`,form:`container`,childRule:`any`,label:`required`,parent:[`accordion`],props:{label:Km,open:{kind:`boolean`,default:!1}}},{name:`if`,form:`container`,childRule:`any`,label:`none`,props:{when:{kind:`boolean`,dynamic:!0,required:!0}}},{name:`alert`,form:`container`,childRule:`any`,label:`none`,props:{title:Ym,tone:{kind:`enum`,dynamic:!0,values:[`info`,`success`,`warning`],default:`info`}}},{name:`badge`,form:`inline`,childRule:`inline`,label:`none`,props:{tone:{kind:`enum`,dynamic:!0,values:[`neutral`,`success`,`warning`],default:`neutral`},color:Xm()}},{name:`tooltip`,form:`inline`,childRule:`inline`,label:`none`,props:{text:{kind:`string`,required:!0}}},{name:`computed`,form:`leaf`,childRule:`none`,label:`none`,props:{name:{kind:`string`,static:!0,required:!0},value:{kind:`string`,required:!0}}},{name:`const`,form:`leaf`,childRule:`none`,label:`none`,props:{name:{kind:`string`,static:!0,required:!0},value:{kind:`string`,required:!0}}},{name:`validation`,form:`leaf`,childRule:`none`,label:`none`,props:{when:{kind:`boolean`,dynamic:!0,required:!0},message:{kind:`string`,required:!0},fields:{kind:`string`,static:!0,required:!0}}},{name:`data-table`,form:`container`,childRule:`columns`,label:`required`,props:{label:qm,rows:{kind:`string`,required:!0},key:{kind:`string`,required:!0},"max-rows":Zm({integer:!0,positive:!0,max:A,default:100})}},{name:`column`,form:`leaf`,childRule:`none`,label:`none`,parent:[`data-table`],props:{label:{kind:`string`,static:!0,required:!0},value:{kind:`string`,required:!0}}},{name:`table`,form:`container`,childRule:`table`,label:`optional`,binding:{kind:`string`,required:!1,family:`selection`},initialRule:`none`,props:{label:Jm,searchable:{kind:`boolean`,default:!0},sortable:{kind:`boolean`,default:!0},"page-size":Zm({integer:!0,positive:!0,default:10}),bind:Vm,key:{kind:`string`,static:!0},initial:Hm}},{name:`chart`,form:`container`,childRule:`table`,label:`none`,binding:{kind:`string`,required:!1,family:`selection`},initialRule:`none`,props:{kind:{kind:`enum`,static:!0,values:[`bar`,`line`,`area`,`scatter`,`donut`],default:`bar`},title:Ym,x:{kind:`string`,static:!0},y:{kind:`string`,static:!0},"x-label":{kind:`string`},"y-label":{kind:`string`},bind:Vm,key:{kind:`string`,static:!0},initial:Hm}},{name:`plot`,form:`container`,childRule:`plot`,label:`optional`,props:{label:Jm,min:{kind:`number`,dynamic:!0,default:-10},max:{kind:`number`,dynamic:!0,default:10},samples:Zm({integer:!0,min:2,max:2e3,static:!0,default:200}),"x-label":{kind:`string`,default:`x`},"y-label":{kind:`string`,default:`y`}}},{name:`timeline`,form:`container`,childRule:`table`,label:`none`,props:{title:Ym,unit:{kind:`string`,default:`minutes`}}},{name:`diagram`,form:`container`,childRule:`diagram`,label:`optional`,binding:{kind:`string`,required:!1,family:`diagram`,exclusive:!0},initialRule:`first-node`,props:{label:Jm,bind:Vm,initial:Hm,direction:{kind:`enum`,static:!0,values:[`right`,`down`],default:`right`}}},{name:`node`,form:`container`,childRule:`content`,label:`required`,parent:[`diagram`],props:{id:{kind:`string`,static:!0,required:!0},label:Km,tone:{kind:`enum`,dynamic:!0,values:[`neutral`,`success`,`warning`],default:`neutral`}}},{name:`edge`,form:`leaf`,childRule:`none`,label:`none`,parent:[`diagram`],props:{from:{kind:`string`,static:!0,required:!0},to:{kind:`string`,static:!0,required:!0},label:Jm}}],$m=Object.freeze(Object.fromEntries(Qm.map(e=>[e.name,Object.freeze(e)]))),eh=Object.freeze(Qm.map(e=>e.name)),th=Object.freeze({leaf:Object.freeze(Qm.filter(e=>e.form===`leaf`).map(e=>e.name)),inline:Object.freeze(Qm.filter(e=>e.form===`inline`).map(e=>e.name)),container:Object.freeze(Qm.filter(e=>e.form===`container`).map(e=>e.name))});function nh(e){return th[e]}function rh(e){return Object.hasOwn($m,e)?$m[e]:void 0}function ih(e,t){let n=Array.from({length:t.length+1},(e,t)=>t);for(let r=1;r<=e.length;r++){let i=n[0];n[0]=r;for(let a=1;a<=t.length;a++){let o=n[a];n[a]=Math.min(n[a]+1,n[a-1]+1,i+(e[r-1]===t[a-1]?0:1)),i=o}}return n[t.length]}function ah(e,t){let n,r=1/0;for(let i of t){let t=ih(e,i);t<r&&(n=i,r=t)}return r<=2?n:void 0}function oh(e){return ah(e,eh)}function sh(e,t){return ah(t,Object.keys(e.props))}var ch=`reactive-md-theme-1`,lh=Object.freeze({name:`default`,protocol:ch,colorSchemes:Object.freeze([`light`,`dark`])}),uh=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/,dh=64;function fh(e){return typeof e==`string`&&e.length>0&&e.length<=dh&&uh.test(e)}function ph(e,t){let n=typeof t==`string`?t.length:1/0;if(!e||typeof e.start!=`number`||typeof e.end!=`number`||!Number.isFinite(e.start)||!Number.isFinite(e.end))return{start:0,end:0};let r=Math.max(0,Math.min(n,Math.floor(e.start)));return{start:r,end:Math.max(r,Math.min(n,Math.floor(e.end)))}}function mh(e,t){if(typeof e!=`string`||e.length===0)return{line:1,column:1};let n=Math.min(t,e.length),r=1,i=0;for(let t=0;t<n;t+=1)e[t]===`
|
|
32
|
-
`&&(r+=1,i=t+1);return{line:r,column:t-i+1}}function hh(e,t,n,r){let i=ph(n,r),{line:a,column:o}=mh(r,i.start);return{code:e,message:$e(t),severity:`warning`,range:i,line:a,column:o,messageKey:t.key,...t.params?{params:t.params}:{}}}function gh(e,t,n,r){let i=(e,t)=>({name:lh.name,diagnostics:[hh(e,t,n,r)]}),a=e;if(a==null||a===``)return{name:lh.name,diagnostics:[]};if(!fh(a))return i(`local.theme.name`,ze(`local.theme.name`,{name:String(a),limit:dh}));let o=a;if(o===lh.name)return{name:lh.name,diagnostics:[]};if(!Array.isArray(t))return i(`local.theme.missing`,ze(`local.theme.missing`,{name:o}));let s=0,c=null;try{for(let e of t)typeof e==`object`&&e&&!Array.isArray(e)&&e.name===o&&(s+=1,c=e)}catch{return i(`local.theme.manifest`,ze(`local.theme.manifest.unreadable`))}if(s===0)return i(`local.theme.missing`,ze(`local.theme.missing`,{name:o}));if(s>1)return i(`local.theme.duplicate`,ze(`local.theme.duplicate`,{name:o}));try{let e=c;if(!e||typeof e!=`object`)return i(`local.theme.manifest`,ze(`local.theme.manifest.definition`,{name:o}));if(e.protocol!==`reactive-md-theme-1`)return i(`local.theme.protocol`,ze(`local.theme.protocol`,{name:o,protocol:ch}));let t=e.colorSchemes;if(!Array.isArray(t)||!t.includes(`light`)||!t.includes(`dark`))return i(`local.theme.modes`,ze(`local.theme.modes`,{name:o}))}catch{return i(`local.theme.manifest`,ze(`local.theme.manifest.selected`,{name:o}))}return{name:o,diagnostics:[]}}function _h(e){return typeof e==`string`&&e.trim()!==``?e:void 0}function vh(e){let t=/^\[\^([\s\S]*)\]$/.exec(e.trim());return t?t[1]:e}function yh(e){return e}function bh(e,t){return _h(e.attrs?.[t])}function xh(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase().toLowerCase()}function Sh(e){let t=yh(e),n=_h(e.value);return _h(t.identifier)??_h(t.label)??bh(e,`identifier`)??bh(e,`label`)??(n?vh(n):``)}function Ch(e){return xh(Sh(e))}function wh(e){let t=yh(e),n=_h(e.value);return(_h(t.label)??_h(t.identifier)??bh(e,`label`)??bh(e,`identifier`)??(n?vh(n):``)).trim().replace(/\s+/g,` `)}function Th(e,t){let n=new Map,r=[],i=new Map,a=[],o=e=>{for(let t of e??[])if(t.type===`footnoteDefinition`){let e=Ch(t);e&&!n.has(e)&&n.set(e,t),a.push(t),o(t.children),a.pop()}else if(t.type===`footnoteReference`){let e=a[a.length-1];if(e){let n=i.get(e);n?n.push(t):i.set(e,[t])}else r.push(t)}else o(t.children)};o(e.nodes);let s=[],c=new Map,l=new Map,u=new Map,d=e=>{let r=n.get(e);if(!r)return null;let i=c.get(e);if(i)return i;let a={identifier:e,number:s.length+1,definition:r,id:`${t}-fn-${s.length+1}`,references:[]};return s.push(a),c.set(e,a),a},f=e=>{let n=Ch(e),r=n?d(n):null;if(!r){l.set(e,{id:``,entry:null,label:wh(e)});return}let i=(u.get(n)??0)+1;u.set(n,i);let a=`${t}-fnref-${r.number}-${i}`;r.references.push({node:e,id:a}),l.set(e,{id:a,entry:r,label:wh(e)})};for(let e of r)f(e);for(let e=0;e<s.length;e+=1){let t=s[e];for(let e of i.get(t.definition)??[])f(e)}return{entries:s,siteFor(e){return l.get(e)}}}var Eh=[`enableCss`,`enableJavaScript`,`enableExtendedHtml`];function Dh(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Oh(e){if(e===void 0)return{ok:!0,maxSyntaxNodes:C,html:{enableCss:!1,enableJavaScript:!1,enableExtendedHtml:!1},htmlActive:!1};if(!Dh(e))return{ok:!1,message:`Compile options must be an object.`,key:`local.options.invalid.object`};let t={enableCss:!1,enableJavaScript:!1,enableExtendedHtml:!1};for(let n of Eh){if(!Object.hasOwn(e,n))continue;let r=e[n];if(r!==void 0){if(typeof r!=`boolean`)return{ok:!1,message:`Compile option ${n} must be a boolean.`,key:`local.options.invalid.html-flag`};t[n]=r}}let n=e.limits,r=C;if(n!==void 0){if(!Dh(n))return{ok:!1,message:`Compile option limits must be an object.`,key:`local.options.invalid.limits`};let e=n.maxSyntaxNodes;if(e!==void 0){if(typeof e!=`number`||!Number.isSafeInteger(e)||e<1)return{ok:!1,message:`Compile option limits.maxSyntaxNodes must be a positive safe integer.`,key:`local.options.invalid.max-syntax-nodes`};r=e}}return{ok:!0,maxSyntaxNodes:r,html:t,htmlActive:t.enableCss||t.enableJavaScript||t.enableExtendedHtml}}var kh=new Set(nh(`leaf`)),Ah=new Set([...nh(`container`),...nh(`inline`)]),jh=new Set(nh(`inline`)),Mh=new Set([...kh,...Ah]),Nh=``,Ph=``,Fh=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/,Ih=Fh,Lh={b:`strong`,strong:`strong`,i:`emphasis`,em:`emphasis`,s:`delete`,del:`delete`,u:`underline`,mark:`mark`,sup:`sup`,sub:`sub`},Rh=new Set([...Object.keys(Lh),`br`,`hr`,`img`,`p`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`div`,`span`,`details`,`summary`,`blockquote`,`code`,`pre`,`ul`,`ol`,`li`,`a`]),zh=new Set([`br`,`hr`,`img`]),Bh=new Set([`p`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`div`,`details`,`blockquote`,`pre`,`ul`,`ol`,`li`]),Vh=new Set([`paragraph`,`heading`,`div`,`details`,`blockquote`,`code`,`list`,`listItem`,`thematicBreak`]),Hh=new Set([`id`,`title`,`lang`,`dir`]),Uh={a:new Set([`href`]),img:new Set([`src`,`alt`,`width`,`height`]),ol:new Set([`start`]),details:new Set([`open`])};function Wh(e){if(!e.includes(`&`))return e;try{let t=zm(e.replace(/</g,`<`),{scriptingEnabled:!1}),n=``,r=e=>{if(e.nodeName===`#text`)n+=e.value;else{for(let t of e.childNodes??[])r(t);if(e.content?.childNodes)for(let t of e.content.childNodes)r(t)}};for(let e of t.childNodes)r(e);return n}catch{return e}}function Gh(e,t){let n=Object.create(null),r=[],i=[],a=0;for(;a<e.length;){for(;a<e.length&&/\s/.test(e[a]);)a+=1;if(a>=e.length||e[a]===`/`)break;let o=a,s=/^[A-Za-z_:][A-Za-z0-9_.:-]*/.exec(e.slice(a));if(!s){a+=1;continue}let c=s[0].toLowerCase();for(a+=s[0].length;a<e.length&&/\s/.test(e[a]);)a+=1;let l=`true`;if(e[a]===`=`){for(a+=1;a<e.length&&/\s/.test(e[a]);)a+=1;let n=e[a];if(n===`"`||n===`'`){a+=1;let r=e.indexOf(n,a);if(r<0){i.push({name:c,value:``,start:t+o,end:t+e.length});break}l=Wh(e.slice(a,r)),a=r+1}else{let t=a;for(;a<e.length&&!/[\s>]/.test(e[a]);)a+=1;l=Wh(e.slice(t,a))}}let u={name:c,value:l,start:t+o,end:t+a};Object.hasOwn(n,c)||(n[c]=l),r.push(u)}return{attrs:n,entries:r,invalid:i}}var Kh=128,qh=Math.min(5e4,w),Jh=100,Yh=1e3,Xh=Lr().use(qo).use(su),Zh=class extends Error{code;start;end;key;params;constructor(e,t,n,r,i=e,a){super(t),this.code=e,this.start=n,this.end=r,this.key=i,this.params=a,this.name=`LocalBudgetError`}};function Qh(e,t){let n=[];if(typeof e!=`string`||e.length>1e6){let t=typeof e==`string`?ze(`local.budget.document`,{limit:S}):ze(`local.parse.source`);return{nodes:[],diagnostics:[{code:typeof e==`string`?`local.budget`:`local.parse`,message:typeof e==`string`?`Document exceeds the ${S}-character limit.`:`Document source must be a string.`,severity:`error`,range:{start:0,end:typeof e==`string`&&e.length?1:0},line:1,column:1,messageKey:t.key,...t.params?{params:t.params}:{}}]}}let r=Oh(t);if(!r.ok)return{nodes:[],diagnostics:[{code:`local.options.invalid`,message:r.message,severity:`error`,range:{start:0,end:0},line:1,column:1,messageKey:r.key}]};let i=r.maxSyntaxNodes,a=[0];for(let t=0;t<e.length;t+=1)e[t]===`
|
|
33
|
-
`&&
|
|
34
|
-
`,i),o=a<0?n:Math.min(n,a),s=``,c=i;for(;c<o;c+=1){let t=e[c];if(s)t===s&&(s=``);else if(t===`"`||t===`'`)s=t;else if(t===`>`)break}let l=!!r[1];if(c>=o){let n=o;return{start:t,end:n,rest:e.slice(i,n),closing:l,selfClosing:!1,unclosed:!0}}let u=e.slice(i,c);return{start:t,end:c+1,rest:u,closing:l,selfClosing:/\/\s*$/.test(u),unclosed:!1}}function
|
|
35
|
-
`)r+=1;else if(e.startsWith(`<!--`,r)){let t=e.indexOf(`-->`,r+4);if(t<0||t+3>n)return-1;r=t+3}else break}return r}function
|
|
36
|
-
`}function
|
|
37
|
-
`||
|
|
38
|
-
`,i);t>=0&&(a=Math.min(n,t))}let
|
|
39
|
-
`||
|
|
40
|
-
`,i);t>=0&&(a=Math.min(n,t))}let
|
|
41
|
-
`,t-1)+1;return/^[ \t]*$/.test(e.slice(n,t))}function
|
|
42
|
-
`||t===`\r`)return null}}if(r>=i||e[r]!==`]`)return null;let a=e.slice(t+2,r);if(!a.trim())return null;let o=
|
|
43
|
-
`,t-1)+1;if((r?
|
|
31
|
+
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Xs(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=Yc.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function al(){return{exit:{taskListCheckValueChecked:sl,taskListCheckValueUnchecked:sl,paragraph:cl}}}function ol(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:ll}}}function sl(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function cl(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function ll(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Yc.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function ul(){return[ps(),Ls(),Hs(),Xc(),al()]}function dl(e){return{extensions:[ms(),Rs(e),Us(),il(e),ol()]}}var fl={tokenize:El,partial:!0},pl={tokenize:Dl,partial:!0},ml={tokenize:Ol,partial:!0},hl={tokenize:kl,partial:!0},gl={tokenize:Al,partial:!0},_l={name:`wwwAutolink`,tokenize:wl,previous:jl},vl={name:`protocolAutolink`,tokenize:Tl,previous:Ml},yl={name:`emailAutolink`,tokenize:Cl,previous:Nl},bl={};function xl(){return{text:bl}}for(var Sl=48;Sl<123;)bl[Sl]=yl,Sl++,Sl===58?Sl=65:Sl===91&&(Sl=97);bl[43]=yl,bl[45]=yl,bl[46]=yl,bl[95]=yl,bl[72]=[yl,vl],bl[104]=[yl,vl],bl[87]=[yl,_l],bl[119]=[yl,_l];function Cl(e,t,n){let r=this,i,a;return o;function o(t){return!Pl(t)||!Nl.call(r,r.previous)||Fl(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Pl(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(gl,u,l)(t):t===45||t===95||ui(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&li(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function wl(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!jl.call(r,r.previous)||Fl(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(fl,e.attempt(pl,e.attempt(ml,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Tl(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Ml.call(r,r.previous)&&!Fl(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(li(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||fi(t)||gi(t)||vi(t)||_i(t)?n(t):e.attempt(pl,e.attempt(ml,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function El(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Dl(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(hl,c,s)(t):t===null||gi(t)||vi(t)||t!==45&&_i(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Ol(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(hl,t,a)(o):o===null||gi(o)||vi(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function kl(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||gi(o)||vi(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||gi(e)||vi(e)?t(e):r(e)}function a(e){return li(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):li(t)?(e.consume(t),o):n(t)}}function Al(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return ui(e)?n(e):t(e)}}function jl(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||gi(e)}function Ml(e){return!li(e)}function Nl(e){return!(e===47||Pl(e))}function Pl(e){return e===43||e===45||e===46||e===95||ui(e)}function Fl(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var Il={tokenize:Wl,partial:!0};function Ll(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Vl,continuation:{tokenize:Hl},exit:Ul}},text:{91:{name:`gfmFootnoteCall`,tokenize:Bl},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Rl,resolveTo:zl}}}}function Rl(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=ci(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function zl(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Bl(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||gi(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(ci(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return gi(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Vl(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||gi(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=ci(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return gi(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),bi(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Hl(e,t,n){return e.check(Ri,t,e.attempt(Il,t,n))}function Ul(e){e.exit(`gfmFootnoteDefinition`)}function Wl(e,t,n){let r=this;return bi(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Gl(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&ti(o,o.length,0,ji(s,e.slice(r+1,n),t)),ti(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),ti(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Ai(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Ai(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Kl=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){ql(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function ql(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function Jl(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Yl(){return{flow:{null:{name:`table`,tokenize:Xl,resolveAll:Zl}}}}function Xl(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):V(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):H(t)?bi(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||gi(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,H(t)?bi(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return H(t)?bi(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||V(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return H(t)?bi(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||V(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||V(n)?(e.exit(`tableRow`),t(n)):H(n)?bi(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||gi(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Zl(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Kl;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&($l(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Ql(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Ql(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Ql(f,t,o,i,n,d)):(o[0]=o[1],d=Ql(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&$l(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Jl(t.events,n))}return e}function Ql(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},eu(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=eu(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=eu(t.events,n[2]),a=eu(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},eu(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function $l(e,t,n,r,i){let a=[],o=eu(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function eu(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var tu={name:`tasklistCheck`,tokenize:ru};function nu(){return{text:{91:tu}}}function ru(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return gi(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return V(r)?t(r):H(r)?e.check({tokenize:iu},t,n)(r):n(r)}}function iu(e,t,n){return bi(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function au(e){return ii([xl(),Ll(),Gl(e),Yl(),nu()])}var ou={};function su(e){let t=this,n=e||ou,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(au(n)),a.push(ul()),o.push(dl(n))}var cu=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]),W;(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`})(W||={});var lu={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function uu(e){return e>=55296&&e<=57343}function du(e){return e>=56320&&e<=57343}function fu(e,t){return(e-55296)*1024+9216+t}function pu(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function mu(e){return e>=64976&&e<=65007||cu.has(e)}var G;(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`})(G||={});var hu=65536,gu=class{constructor(e){this.handler=e,this.html=``,this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=hu,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(du(t))return this.pos++,this._addGap(),fu(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,W.EOF;return this._err(G.surrogateInInputStream),e}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(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((this.html.charCodeAt(this.pos+t)|32)!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,W.EOF;let n=this.html.charCodeAt(t);return n===W.CARRIAGE_RETURN?W.LINE_FEED:n}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,W.EOF;let e=this.html.charCodeAt(this.pos);return e===W.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,W.LINE_FEED):e===W.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,uu(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===W.LINE_FEED||e===W.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){pu(e)?this._err(G.controlCharacterInInputStream):mu(e)&&this._err(G.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},_u;(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`})(_u||={});function vu(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}var yu=[8364,0,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,0,381,0,0,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,0,382,376];function bu(e){return e===0||e>=55296&&e<=57343||e>1114111}function xu(e){return bu(e)?65533:e>=128&&e<=159&&yu[e-128]||e}function Su(e){return bu(e)?65533:e}var Cu=(()=>{let e=new Uint8Array(127),t=0;for(let n=33;n<=126;n++)n!==34&&n!==36&&n!==92&&(e[n]=t++);return e})();function wu(e,t,n,r,i,a){let o=e.length,s=a*90,c=0,l=()=>{let t=Cu[e.charCodeAt(c++)];return t<a?t:t*91-s+Cu[e.charCodeAt(c++)]},u=n-r,d=n+i,f=new Int32Array(d);f.fill(-1,r,a),f.fill(-1,a+u,d);let p=new Int32Array(d),m=new Int32Array(d);function h(t,n){let r=0,i=n,a=n+t;for(;i<a;){let t=Cu[e.charCodeAt(c++)];if(t<89)r+=t,f[i++]=r;else if(t===89){let t=Cu[e.charCodeAt(c++)]+2;for(;t--;)f[i++]=++r}else{let t=Cu[e.charCodeAt(c++)];r+=89+(t<90?t*91+Cu[e.charCodeAt(c++)]:Cu[e.charCodeAt(c++)]*8281+Cu[e.charCodeAt(c++)]*91+Cu[e.charCodeAt(c++)]),f[i++]=r}}}h(r,0),h(u,a);let g=new Int32Array(i*2),_=0,v=0;function y(e,t){for(let n=0;n<e;n++){let e=t+n,r=l(),i=l();g[v*2]=r,g[v*2+1]=i,v+=1,p[e]=_;let a=(f[r]<0?m[r]:1)+(f[i]<0?m[i]:1);m[e]=a,_+=a}}y(i-a+r,a+u),y(a-r,r);let b=new Uint16Array(_),x=0;for(let e=0;e<v;e++)for(let t=0;t<2;t++){let n=g[e*2+t],r=f[n];if(r<0){let e=p[n],t=e+m[n];for(;e<t;)b[x++]=b[e++]}else b[x++]=r}let S=new Uint16Array(t),C=0;for(;c<o;){let t=Cu[e.charCodeAt(c++)];t>=a&&(t=t*91-s+Cu[e.charCodeAt(c++)]);let n=f[t];if(n<0){let e=p[t],n=e+m[t];for(;e<n;)S[C++]=b[e++]}else S[C++]=n}return S}var Tu=wu("!}.&u%}'&}*'~!6*)%&,~!J~!J~%L~y<~!R,~~%Lu~~#GD~~#|)1#%}^%}2%+#.##%##%}&%##%'#%##&%#%#'%#&#%#&#'#%%#&#%##%#)%''%&%#%#'%#%%#%%}%%%#%#&(23#%%#&-%0%('1#(##%#'##+%'*.:1}#%#6-+(%'%%#%%%}#L'2351&('%}&/N'(0(/*-%(%%}#'+&T%7.2}#&%&#%#36/5##%&%%#&#%%#))2%%##%&&'0~!#*+&'%1~!%).'3q?&%'1~!.##%6(~!+%%%(Gw'rT~!E#<nA%#jZ~!H%(~!42##~!*31&~!G%U~#)5~#`3~!J~!Z~%]~%Y~%C~!q~!u~#kz~%#~!6'~!D~!U~!?~#T~!c%~!G#'~%7|~!G~!J~!G&~#pb~(Df}#%}*&}#%##%##%##&#-}&'#'&%#.++}%mI,#,@&(}*%}*'%&##&#%##%}&0}#.},U},%}+%}&%}#%##&}B%(}(%}+%)})%##%#&}&%##%&}<%}>%#%&}*%}(%}9%}/%})%}*%}*%}?&}&%}3%}&*#%})%#%#)}#&#-#+*%E%%'%'#%}#*V##&##I}#&&##%&%#&&Qf%%))w/0+&%#(#.%-''''++++7}>%4'',##1,#%#&%##&#'##&#*#9)%&%}#*}%,#+P(%A&%#'&##wSD',9E00#y#@}(+}&%&>~!#~!X}#*}(&&}(&}(,%}%&#+&}#&}I%#%}%)#(},'%#*}4%%#%}(''}#/##(##),%-##%%)#&}(.}&%#&}%%}*&#%},&&}&%}#%*'#%})%}D&}&%}-&}6&#&}-,%}#%})-(~+`~,=?~I9'9%~!,#%})%})%}@%}?%}(~!?~#<~#pP~#BG~#=1#%K+~#?#~%;)~#A~#mF1~#A'~'X%'~#lR~#N~'N~#r~#m#-~#i'?%#'%~#B%##%,%#~#_%#0%~#]732~,w~2+#:&#%&'0%&>%}#>##F+)#%&&#(+_}4&}-%}(&}@&}O7Fdf0@+/v4}&WU##&/0#&'('B#%}.%}'+#%}#%%&#&%#%##+#&#)#6#'#.},%}c%},%#%##%&#&%#&~#>'*-.%##%##%}#%%}%'~#)D1}#%*&~#_%%'(~#S2%'.}#~#=##*'*-%}&'%'##&&~'E%.#&~#M4}%%##&'%#~#O1##%&#'+~#<B%##%%'%+~#;#@%}#&%#&&%#(~#H1}'%'##&&~#?A}&'~#D#%32}'&&&&~#[}'(#%}'~#;C})&}%%#%~#=&%,3}%'(#%%~#^'#&&)#%'~#Y%-~#d-%'~#^%%&#&&&}#~#b~2t*&'~&(~&@~0%~e~3}%*''0})&}+~!9##-}#%-hD*)1fC#%/&/fB#40~!+#)*4~!+~!K'&:~!/*7~!.#~!H~!L':~%x&~!H#~!*~%1~!I#~!+A~#p'~!F~~#-#~,,(~.Z~!V~%;'B'mq-W~!N~%I%#&&#&}#%},%%}'%}+X#%}#&}(%}'%}<%}#%}%%'}'%}:~![)9@~%>~#UA%-%##&~!C%~!-.9:~!1~!-^2/:a~!y,D*J#-5)/4~%23,~#G~!L1~!0X3`~!2+~!!0-~&E~!W~!o,>Y&]~%cZx_&~#O*9#A#'#+I'%#)~!0B*-5A+-((F&*M#)(-7-5+'-3a5Vi~!Y~!?+[)%3),ERHm~!+:D,VG.+)?fB%%*(%)'(#&80%1'8`K8?`+'Z#&O&'H5#*9)A%%5&3))0%39+.*7#()&&*=4@**L)<'_&*+..;(#*+)./&0#3)%')-8(4ixD(&.}%,('aI:,)%,k2231T)I'#/-W7,/'Q#.'Y24+h')37</31&83##&0#),H(?'&?/1##%#&&#%''-%&&&#(&''&#.-'%#%%(,')*'&#&#'##%(%(#%('#&##%%%%('%#%#%%#%#&%##h>w+v<ayvyvcg.uuhKr}g/v|g>u9i[~>g5uI~=RvdwEg;v/g;uk!!TTSx]@RT!U!#!@VBRUU!'UTe-d0c`e&gSdicedFcrdTaqb.kYcAohdYd@a3e+d}dMdtd.aJ#bqcK`dle/e.e'dwdPdodddjbEb}ogd^ofdpduc6j?l%d{drdqc)d7bacOdQ%T#Y)X.sR[yH>6Vyv3[xwLu>vo'!*.[yBacahoj>6Rew3[xqdZa#!a&#^(X-[yG>6Vyu3[xvg3sEr|g.u/Ri9db0T#^(Xa)!-[y;>6Vylg4wKs{JwNZt3@3r=c4Z([xlg;wKt!cpq's@v7A'*a(a+!-a#[y<3Dt?3Dt'>6Vym3[xmg9rxsNJwLZt4~?r?db1T#`-!(Xa,!0[yS>6Vz%NuQs.g4wKtnJwNZtS@3r>c4Z([y%g;wKtrdga8!a(!#&T*Y-Xa#!a0<or[yc3Dtq>6Vz43[y3JwNZtf@3s!Ju}!%Dti:pm3c_%X#tjB5pkd6q!r]u?voC'*-a.a2!0a&a+[yI3DtI3Ds~3DtH>6Vyw3[xx;:s#~<5pKJwNZtE@3r~d`a)!a2T#a.(!+U.X1[yT3Dt`3Dtv>6Vz&3[y&g9rxwzcxstPu.<rAJwLZtT~?r@dZa%!a.&^*Za(/Reu[ya>6Vz23[y1g3sEr}wkg{NuQRg{ci(U#5@b`~,cg#U(2WnH5wugcRh7dX#T(Y,a'Ta!!a,[yZ<]mj>6Vz,3[y+Pv#5ReZKu+=,%!H}7ABwkaS?Rh:BcW(X#<]mrj:ubv/ARekdg%!(!a.*Ta(Y.X1!#sP>Rl*Dt6[y>>6Vyo3Wf*jOvuumvuRgRJuq*!:9<B@bX~3jVv&v@s@5Re[d/rQt{uAvo&a&a*)a2!,0Wf!3Dt0=Bs'>6Re}3[xy~<5s%JwJZt1~Gs)c;&!#2sJkNuXvzq7rxu,Re8dka4!a8(aEZ+a@Y.X1Xa)[yd=Bs(3DtP>6Vz53[y4cX#X&Re:avRe9~<5s&JwJZtQ~Gs*i^rzvdRg+Jv{%!2sbB@bX}kdga,!Za?&^*T1/!a'Dt+[y6>6Vyf3Wf%g/u;s4hGu6?Rh-JvZ,!c%#&RoX54Rivj7uyvf8RgTKvZB%*!2sGh<vu5Rgq<=C::9bb~#dZ#T&Ta6Y.X*Dt>[y93Wf)coZ(T,6VyifluvRgC@95@B@bX~/hFu34cC#T,k/unq8w8Q5RkUklwQuzunq8w8Q5Rk8d/rJu?v8w9)-&!a0a;a&aIWejg3sEr/h1s<DtDJvyZqY5aws3Jvy!&Wei~Hr1:au5@Bag>23E~5c:Z&bX};kKv?w&unuVu5Rjc;>bs)#~@:Rh.=ay<a]C;b`}Vd6s/t{uAvoaxa()!a,a7%-a#a2Dt,[yF2Wo[>6Vyt3[xuNuPRi&NuPwpi#RoWh?vf8Ri%Jv]!%Ri:KvxD!.'2WeAjZu`q9rxu,Re7woeAg-unLq(qA_/*2Wg_g3u5q^9:4E}/jTrxrzv=Wkkd~0UX#^^Xa-a1a5T&a=U1a'*aEa]!a*aPaA-adok[y54Rn>;:p3~Dp5g9rpsFNvZqjg3uJp4~<5p0Pw;5qlJwNZt*@3p1Pw:5p/Ou!5p2JvG'!6Vye=<qnJvh_[xhg3v,Rh3kOwOw-sDuev/Re^dha[a%!%!a+#Ta7)-5TaCaO!aka!a)sf[yb2>Rl!9ARiq5E}Qg=ucRkBE|oJrJ_@Wk~@Wk{JrJ_@Wk|@WkyJrJ_@Wk}@WkzJvO_[y2g-vMRmiKuYC!)&>Ri;>Ri<@3RkNc](X#@9Rk=g5vuRmhKvDB!+'=]meg3u4Rmgd)#Y'Vz3CARmfd`a+!%T'!+#Ta1Ta6TaM-sTDt9[yA9sYd'%Y#s[[xpj:ueunaXRgEjRq,v-vuqdd2'`#6Rev<32@5>:2<E}5xIo9a*X#Y(;5RePJvD_g>vyRgNj8w)v8<wggs:RgXiZt|vjx,hSq3ah!-(~@:Ro/Ou!5RhWj^v(pyw8unRhUdx-UY#^Ua.a3a70!)%UX1TaDa)'omRiRRhE[y:3Dsz=Br,>6Vyj3[xkg6ruwjcqsrPw;5r*Ku]D'Zt-@3r(~?r.i[vwv]dU1a--U#`a4(g/vsRhPOu!5RhLj:rmu9Wo!~@:wdh@g/vsRiTjXuvvNr}:RhBj^v(pyw8unRn]dz1UYa'a+^Y(!aETZalaRY.Ta?a4[yDJw1!#qLsW>6Vyrfzq-pLflpwRe|Js>%!Dt@3Dt&Jvy_[xs~HrnjMuwpsw'RecKu+D#'!t<~Grl~?rjg5u-x,gwp{ah!-(~@:Rg~Ou!5Rh'jXuvvNr}:Rh#cW#X/c;&!#2sLi[v7u7RgpJv)(!iLrxu,Re6j7v@s@5Se[e7d`aW!Za(a`T.a#!a3!&aDa-!9)Dt_=6s+3[x~~DR|h~DS6avhGun5RkZj3w)v-]mkKunB!&*]kb97R|i<ARk<c:Z(6Vy}Juh'!wziMRoS:F|vkLuauJv5vtvQRh1d='T+Y#VyO~DR|jcF#T'7R|g97R|kJv3'!ay<Rj,Jvh&!:ReXcsa6*a+#a#_aIRf9aLRf?c,Z&Rf5Rf7c.Z&Rf;Rf>cQ#%T'p-Rf8Rf=ct#%'(*!,p,Rf4p+Rf6Rf:Rf<d~'Ua%U*^UYa(!a,-!#a4YaTalaEX0a8a<Weo3Dt/3Dsx=Br93Wen~Dr;~<5p<JwNZt2@3p=Pw:5p;Ou!5r3c7&!#:p>3Ds}KvGB)_6Vyk2sM=<r7x'eovA(!hFu1ARf}cV#X&@r5j6rvwQa^Rf3c=Za'wkghJv__g;unRggA53B9=b^}%j6uduo5Jq;!(hIv%2Re`Ou4ARe_e%a#^^^Xa&!a*a2!&a6YaP!*ad!#a:aE/5Rn?[y@>6Vyp;:pE~DrY~<5pBJwNZt8@3pCh=rt3rWPw:5pAJup_[xoNuPpF9c!#'45pD5ARn)d8#X'X*3@rU72s]h>v<<sSjJpqvewOJq/(!hNw'5ReBk0s2u3w/w'5ReE5@Jq.!a+JQ!&WeU23d(#Y&RjG5]jBk!u7w&u0udARjEe#+^^^Ub#!a2/a`Z(agT1!a-a;|@TaG!aS[yV=Re~fow'RguNuPRe?bz#'>RoUWeL>:Cbb|?JwPZtVg6ruRmzJvD'!6Vz(g/vmRh~Jvy_[y(g9voRgyx*cy(#2>Ri2B9b]~9kIw9u7rluJu3Rg]dI#a%UY'@=p%CAx.gQZ&RhwwygtRm{x5g_Z'+ABqR9Woa=Bp&dV#^*Xa'!&@o{g4v]Rk;Jv{!%Rk[wkkiA5RkiwwfUB=x,fUuqC&*!>RfTg8v0RfV~ARfSd;rJsAuAv9wR'ae+/aO!a@aza/a#[yQ@Wg!2Wemg3sEr0JvB_g>uvReWg2v+Re=KupB_+[y!2AbY~-~Hr2AJwD!(h<~El>h<~El?Kun@+_:9b`}Kg-v/Ri3g;vtwyk_9]k_d=&T#*U.6qh@Ab`|K9:H|CJv[!&3Dtex'fDwC%!Rf[9WlMd[(^X,!a%Z06Vz!@WgBg=v~Rgvg,QRe@awd,#Y+jTv|Q~EfWj]uNr|~FRfXdy#Y&^Ua%!aO.!(a)Ua;=!a@aKap!a-,a!Ta]a[rSa]p?[y82sK=Bq~;:p:~<5p8Pw:5p7d'#Y'Wf(;RnRi[u4w&RgJJvG'!6Vyh=<r#ijuuv/sIKuYD'ZtG@3p9~Gr&d2#`(g<vtRgFj`u5w&rqpxRf2CJuY!+:wfnTOu!5Rg}jNs1ucv&RfwJvA!&3@q|BDcC#T,k/unq8w8Q5RkTklwQuzunq8w8Q5Rk9dga#!a'!a=#a0!:+Tb*b@aO.a4!aba8aFJv^}?!VyR~Dr<g;u%Rn.~<5p[x'e`wNZtR@3p]Pw:5pZhNvjBp.woe_g5u-r4JwF!%DtO3:ooc7&!#:p^3DtpLuGw(!+%)Dtk6Vz#2sd=<r8d'#Y([y#<x3gJt`w@!)%}MRiowzikRij=]ilxAf3,U(#B2Rf#g0v-Rm[ck{`U#]giKv3>)!&6Ri154s,KuGB_%@r68r:dJ|t`#X(9<E|u2@H|rx3gJu?w'!+'1Nu7Reg4=H~+9<wxgY95Rm]xLggZ-`(X}U2:Ri4h<uOawRmsJv__5@bb{jbV~3dka#a'a]!,#a+U=a>b6a3b%!/aKa/)!arwve^VyJ;:pR~DpTg3uJpS~<5pOPw;5qmPw:5pNOu!5pQJvG'!6Vyx=<qoJvA!{~Jup!%@qk7Rn/KvyD!}''[xz;>wkh'?Rh,x8gyt`w5D!&),(SgyccRgztJ@3pPB5p#d'(Y#<]mmifubw&RgoJvE&!82s^JvF&!8Rf,ADb]~;x=h'rNu]vK!,%'*0RnORh)4Rh*AqQg-vaRnNg;wHwkh'ba~4cE#Ta*x3gctyw@'!+%RnFRnD<4Rn@hFvK5RnCxWg[#`&a0Ua()`1Rm75Rg[c]%X#qi8Rg^NvdRj>BwzgZauwji7Rm6A4wgg]d1#&(*,.0a#Rm;Rm<Rm=Rm>Rm?Rm@RmARmBe%#^^^Xaea?aC/b+(,!a+a#!a/!>a&Ta<aKbD!2wphBRnk[yPw}hE|.=Br-3Dtm>6Vy~g6urRf.x,hPrNav!%'RnqRo%Ro#Nu;q[Pw;5r+JwNZtM@3r)d'#Y'Weh;xChL#`&RnmRnoKu}>%(!Rne~Bs-;2wjcussJv+'!aYSO}6@B<5?ba~8LrNvj!.%*ROwungw~ng~:9;Ri^>wtnig;wHRnixDh@|(UZ.x1h@|)!#:2<H|*xHn]#-UX'3Ro)z=iT}6ARns=Bwsn_wpnaRncw]aR(#UXa&Ua*a/=]iPd'#Y&Ro'WnXf{QRm2hNvj]nZd`'T~&1`{|`#9b]{}c:'!#Wl{>@=be}]?cl{{U#:5Abb}Jds#^YaF!a*b4a#a3aPa>&Tb!bH!*a_!Eau?/a&RjY<]gj>6Vz*;:pe~DrZg,QRj1JwNZtX@wihspcJvZ&!VyX9WmOJu|!|N2WmHJvh&!]ht~Bpbcn&T(!#RmQ<s7Nu;padH#X'`+WmJ@>RmKCARhnKup=!)&Wf+:RhqNuPpf9c!#'45pd5AwghpARn(Ls@w!%,)!RmP@Wfe<E|IJva!&WmNg8vsRmLd`*.`#Y'Xa!axRn*]hrA8Rhug5s@rXg8u!RmMd8#X'X*3@rV72smdI*#UY&RmICARho~GsgxVgd)Ta'U-Y&Xa!T#RnEWnA@Wffg1uDRi0hFvK5RnBxGnG&#`%owp)@wsf+bX}Ze-*1!a*^^^Ua|!#a.aq&Ya2!a>.a6!a:aO`aJDtL[y`@Wg#>6Vz12@wzoYRoZNuPRi!NuPRhzg=ucRi,@=b`{Yg=ucRi-ACJvB!&Sh[ebSh]ebi`wUuFRm4Jw2_[y0JvB!.<Ju(!&SoG}6Shd}6<Ju(!&SoH}6She}6Kur@._g5vHRieJvx!{L2G{Kx6gd'T#?Rh82Wi5cZ#X(g1w)Rm5dW-Y(Ta#!a)!#aYa=wnfE=su2>>bU{0j9udv:<svj8uQv-7RgHdE%#^'sq9sp=>Bb_{TJv`!&g/r|snj6v(us5d,#Y(56H}[978H}]Jw5!&g1rushJvB!+j;v{u5?zDhd}6}bj;v{u5?zDhe}6}ce*#`(^^^a[aea!=!a6a*aoXb1a.!aAbL!b>,b'aL!aV@Wf|2Wlg3[y/JwNZt^@3piPw:5pgJunZou3@rsJva&!Vy_g<v~Rm#JvG'!6Vz0=<r{Ju{%!:pj@WfsiXuJu3Rm:JvZ&!WfA~Bph@c4Z&Dtwax5rubx(#:awRk1@d,#Y&RfjRfid1#,Y(@Wfp2Wlrg5s@ryKu[@!,'=]ig9wlk?Rk>g5u-rqJvy'!@9RkQcH(T#=>Ri~@<wkj(Wj(KuZB*!&<7rw@9RkRcH(T#=>Ri}@<wkj)Wj)dg(Ta2Xa9X#`-!a*CARhg@@=I}d9x;c~#X%so=<sj>2@@=aybb}XjWv0Q~EfEj3vLv;<d,#Y(56H}`978H}_dgaPaFa'a/!#a3Y0a_a;a|!1(a7-[yE3[xt;:pJNvZrrg3uJrvJwNZt=@3pIh=rt3rxPw:5pGOu!5rpJvG'!6Vys=<rz@c4Z&Dt(ax5rtJvZ!&~BpH@wsfNg-vaRlNci*U#=<wei<F}a5@Jq.!a*JQ!%@qZ23d(#Y&RjH5]jCk!u7w&u0udARjFd/prq=tyvpaEa(a:.!a1aZ(@@=I}:9wpd%=<sX55w_h}@@=I{t=ay<aU@@=I}T=ay<2@@=I})?C9:9au@9Cb]}DP~=x-fAZ(2Wl1=ay<aU@@=I}>5@d##Y+jTv|vV~EfFj]uNpn~FRfGdgaK!Z2&!a8a-Tb({E!acTbM*!a(DtY[yYd'%Y#sl[y*hHvh>Re5x2c{Z}.j4uCvcawRiMd+#X+_x&d!},<5RkX;2Hzw@x,gavfB-!{CcF&T#Roe;RodwWbBg5urRgaKvHC*_6Vz+<4opieuew&Rmq@d]&Y)X,T#X0Rh}<BqP=4qS9:ReMg/ujReNJw0!/<Jui%!bd{kawwnemRelAxUa?a3#*.&UX(Ya+a/RhvRnQ<o}9Wmtd-#Y&RgSRmw9;Rmxay=Rmyg-vaRmuxEhSrNu,v-voC!%(aR.a(a7+1Ro1>Ro5CE{A9b]{@;5x#eO{:g;urRi+KrNA!%(Ro3>Ro79;Ri_Ku@>{;&!x%gX|{KunA_+g5QRj/g3u5Rj#g>uERj%wio/xRhS&!,!#^1U}wba{8>>@=be}qC@:D5ba{7Ku+A&!}x?ba}t>>@=be}se(aA^^^Uat!b0#{pa+awUazbGa#aLb9bgaWac'a5TbS=Br!d1#`%scp_Jvl!#rT>Re0JvX&!VyN=H{Fcm#U&:pY=ReaJv2&!]h0=]nUJvG'!6Vy|=<r%JrM_=]h2@Wlud'#)U'Wf'b]{i=]h/Jvh!&~BpWg=v]RnMx+ny#'Nu;pVwjnu=]nwxJnx,T#`&Reqwjnt=]nvieu9vrRjLLuYwP(#+!th@wih5pX~Gr'g5v/Rh4KunA'!-CARnP@wwiN:Rm_9x'cvw>!|l=<saKvAA!0&3@q}>w^e1bp#&Re2Re3BDx7gH#T|f5H|eKuZ>!%(:qNAH{]Jv6!+3B2B9=b^{X<5<B92:E{ZLvhwA(a;a%!igQuyRmad+#Y}m@3Rh5d8#X'X*:AqUAHzmaxwbh<aXRnVcF}RT#Nw&cj#U(BWnug/vsRntdka)(a3+.Zb7aYYan1!bVa@Xa}[y^@b[{G=H{+hFu73Rj&Pv#5ReQcK%T#sig1v{Rj'Ku+D#'!t]~Grm~?rkKuMB!01d5#`'Vy.ta3Dtu~Hroc8#'{^45s85AwZbP&!#Rn!wghxWn#KvEA!)&2RlA2RlBx:h|#(T,=]j09Wobz>x]z/@awRoTd+#Y(az]hFhCrm4d,#Y+jTv|Q~EfMj]uNr|~FRfOdCa!Xa9_X#@<plJvf!%b`{(9;Rgwc;.!#2x7cw#T|UDb]|T5Ju={(!=@E{&Jv)&!Ab`{'awJvf!~*>>@=be{#KuY>!+&4Ezyi[ugv&RjIdea+T)#UXa&T-T&a!Rh9auRmW=]kLg5vuRn+g3u4Rn-Ow6ARn,hHus5xNk?#UX(U~)/g8v0RkD~AwkkF?Ri.OuNBwkkA?Ri/d|a2`a*^UYa.!aBTZaTa'Xa;!(!2!-a#b2[yC>6Vyq3[xr2Wi?g1rusVh%s?DtF~<5rbJs;%!DtBfswKtCj[uvuSsEu3RgVx3o:u+wN'*Zt;@3rd~Grh~?rfg8w)Lq)qE&-a%!>bI|`jWv0vV~EfCjTv|vV~Ef@j]uNpn~FRfBcK#T']gWNu7x,k7q4ai(0!hHv8<RhmkMu9vrsBuev/RhlCJvB!,g<v{wchh~@:Rhji[vrv{wchi~@:RhkdS&a5UY#Ta!RgPwwiI5BwciI~@:Rh`x'iJvj'!5]iJPu8Bwch]~@:Rhach)U#h3rp]gLh@t|Ax,hTq3ah!-(~@:Ro0Ou!5RhXj^v(pyw8unRhVd|)`,^UYas!a?/a2Z'a^Ta{Tb7Ta(a#!a,Wf&9sZ3DtAadamov=Bqt3[xig8vsRm~>waiL2b`{QJv*_Ouv2qgj<v]v2BqfdR'X*X#Y-@3qr~Gqv~?p6hHv-]glPup5Lq+q?_%*b_{qF{n9b^{rOu4ARhpKvCD!+&~Bqp:5Dbb}nwoiKl&unuTuBv]v+ueunaXRf0=Jvh!0nKufu8v1w&w7q%w&uHrz:Rgnj5w,uxDJq/(!hNw'5ReCk0s2u3w/w'5ReFd>Za&!*UaA=<wkgsRnSJv^!%Refifw3vyRgOKu_B'!,<]gkiiu:w&Rh<=C@a^<B57@2F{[<B5@aW:=3away9A5aW=<B=C@a^<B57@2F{Ie-#`(^^^bCara.b8aza6!/bZ,!adTbnTbOb+aFaS!aAT9@Wf~2Wli3Dtl2@d,#Y&RfnRfmJwJZtN~GqyJva&!VyMg<v~Rm%iXuJu3Rm9Jv[_=]ih9wlkDRkCd1#`(@Wg>2Wls3cH#T(@<Rj*=>Ri|b~'#23s9h<~El.d'#Y&Dtxi^rzvdRl#d*#U%(o|B2s`hJwSaxRmDKv4B&!1:Rmdd5#`'Vx}to~Hq{x'f1v3(!BA5ba|bJv_&!Wfug1v]ReIdO+U/Y#&G}-8wze=Rh{g1v]ReHg/uQRf/by#)ibQwERl/cH#T(@<Rj+=>Ri{cNu+vlax-!(#a0qa9<Rii2;;bU{H;x<i=&X#Rk`<4wwi=C9H~8xAI(Y#<azRi@45wXI<B9;5bb~7dL(X#Xa(+!aL6Vy{g5QqOau:5au2@ay547EzbxOcU(UX-T#Ta#:Cbb|A?wjh/b_|SOw6ARgtihr}u7Rhy<d1#T)X1@@=I|~=ay<2@@=aybb}Sj3vLv;<d,#Y(56H}A978H}@dGpvs@uAu`vcw9*!aFa+ai%(b!aXa8.a?a[ozWey=sU2@G}Nch&U#Rf_WexKu+D#'!t:~Gr`~?r^j]uNr|~FRg*j^psurwJt|RmcKv)@&!)7Rkv~Br[@wxfO:Rl3co#U'6Rezj_q#vIuavjRltwzeyh@vr5JqD0!>aY?C9:9au@9Cb]}9cl#U*5;5<H||jbuus1ucv&Rfvg1v~d/pppzqFr^a--a~!aMat1(hFv;Wiz@@=Izoj5uuv-7Rix~Cw`fk2WlVcZ#X,k)u3vWs@u2]ktg;wEx'fBq(_2Wg/jTv|vV~EfoJv]!15x'hzqG!(P~EfU~CRl_j6v(us5x4i-#T(2WmZ?C2F|d>Kq<aj1!*jTqIsBv=Wl`~Cw`fi2WlWj`v0u*~>RlR=c>Z,k#u3vWs@u2]kr<c1Z+jTqIsBv=Wla~Cw`fm2WlXdmb3!a{(arZa`bkTa%TbQTa-a9+c'!aM!/[yL=Bqug.w'RifhFvyDRj.g>vgwyk^9]k^Jv3_@WfbAARkhJw2_[x|JvB_wkoIRoKwkoJRoLd'(Y#<]gm=<9<H|yd'%_X#skDtb3awwqkgNulRkgdB#^',9:p'hJwSaxRmEBwVb8@4=H|qLu+w50&!)@3qs~?pU>Awwn;;Rn=c:Z'ARn<=<qwKvC@!/&~BqqJv6!&]eVb^z^xRge'/a%+^`#Sge}6<4Rn3=]n0Pw2>Rn8Jw0!&>Rn:>Rn6cY#a7+!a&=<wkaNw~h3z_c5Z{=wjh#=]nLKv^D!&)Vyz=bW|swYb<WetcG#T(2wxa@qVx@gD#Y&b^|V5JwG&!5bb|pg/w&RgD@x=kHs=uAvn!a%%/'+RmSRh694Ro`g-vaRmRhHv-]mlxCcS#`&ba~.5cD#Ta)P~=d,#Y(56H{>978H{Dd_#{2^Y%_+qbbb{6g3sERhsbU{?dfa.,`a(Xa<!aiX#(55RiG54RiHcI#T'WiU3RiVNvdwtfcRlKNvdd,#Y&RlHRlExQgf.1*^T'X#Sgf}6Wn4=]hfPrk>Rn7Jw0!&>Rn5>Rn9Lunw?&a2!,5<oq@@wqfdRlJj5Q~=d,#Y(~ARfcOuN]fdDKw;ay(}i!547E}j?cI#T(@5bV}iCbV}hdv(^^Tb?a40,b##Tbo!a*bR!a<b|a/!aKai!aU[yK=]o^g:v>ReGJwPZtK<7Rh+h<~El,Pv#5ReR@awwxjCg,ulRjDJv6&!]j!z?aQeeg>w=Sh<eeJw;!&axEzOg,Qosc!#*:wkeJ]eJ>x'h-u(!%Ro.w~h.zPdNZ(X,Ya![x{;9ReY;wkgxRiF:x?ap#Y&RmUg<s2Rkod]+UY0TZ'!a&A9sw<=bczLNvuw{gqzNhJwSaxRmCKuLay!#&s_Rf-55b^{uJvZa!!c%#(55Ri654wmiu5RiuawLu,vp!+}^%b_}Y9;wkgxba}o>A9:=b^}zKuh=a''!3awRk3c*'!#aHRk6c+Z&Rk5Rk4Jv)&!awRjSawd9*`#0?C2@EzMj8u<uJ5RmbjQrquJu3x,k>uq@_+=ayb^|W~ARkEOuN]k@7dhzV^X/X&a-#zRzSb`zXcJzTT#2WkVKvDBzW!%FzY9;5bbzWjQrquJu3Jw3%!b`zU=ayb^zQd:#X(T-a!6Vyywxh}=b]{Jg=u1RiAdGp~qHtzv!w(wA+a+a;<!aJaYai'anasb(=azRmV:Cbb{MLq2vb!%')RjuRjrRjtRjqx3jnqCw3!%')Rk(Rk+Rk&Rk)Lq2vb!%')Rj{RjxRjzRjwLq2vb!%')RjsRjpRjfRjex3jcqCw3!%')Rk'Rk*RjkRjl9<CbbzfOu4ARhxLq2vb!%')RjyRjvRjhRjgx=joq*uKvb!%')+-Rk.Rk%Rj~Rk-Rk#Rj}x=jdq*uKvb!%')+-Rk,Rk!Rj|RjmRjjRjidAq&qKs@uAv8Aa.'*-a@a&0!aM@a5[y73Dsy3Ds|3Dt):wxgI2sHJwJZt.~Gqxwsf0ikrzt}Rl0Jvy_[xj~HqzKv_A|D!&WfP8axRoVcf,U#k(v]v+ueunaXRf1Ju}'!g8u#Ri=jQw!sCunLprq>!,')~<5qeGzq9F{W=c##%s5au:5aU3CBE|;d4#X(D!a&6Vygx(b;#(=]ed?C2F{N<capoq2r[a&!aPa9,'Pw;5s:@@=I|,55w_h|@@=IzcP~=x'fCqB_2Wl2>aU@@=I|1OuNBc1Z+jTqIsBv=Wlc~Cw`fl2WlZ~AcTa%!Z+jTqIsBv=Wlb~Cw`fh2WlYk+uNqJsBv=WlSg,u3dca3#UXaMYa)TaB-=cM|7T#<bI}l5@B932:aV2G{BOuNBJq:|M!5Ezt=<B=C@a^<B57@2F{v>cB{/T#=ay<bI{3Jv6!a.6BKq0ah&+!5E}HP~Ef{978BaU@@=Iza<7d#.Y#978BaU@@=IzH~AJq0!(@@=IzG978BaU@@=IzFe,aU*Y&^^^bvJb,b:bFad!a,c2Ta>aL.bo6!a#CbTa'T#Re{2Wlh2@G{yg6t~Ro_NvdRfticuRQRllJv3&!x&c|zs@Jw3!%RflwpfkRlpKuL;%(!Re<@G|C2GzdhIvuBwgjAg-u0RjAKQB%!(GzZ@G|5NuuRl7d='T+Y#Vy[g<v~Rm!==G|>JvA!)@wma=]m1ifuaw&RmnLs@vT'!|/+[y,g:v>ReTJw1!#qX=x!eC{bLu+wT&)ZtZauq_~Graci&U#F|89:r_Lupvq!.)&2RlG8RfaC=x!eF{_h?rpWlmd&'!#X|&]k::xJey#`'T|+<E|&2@H|%dE#(^,g;u.RiEg6vjRiC9xCkA{O|zY#g=ucRmXKs0@!&*@G|m@awRknJuh!,3d(}gY}eJvj!%Rm):Jw3!%Rm+Rm-Ls0w(&!a(a#@b[|6cZ#X'7RkxWgAOu4ARn'dH'U#Y*Vz-Wm'CARm}d]*#a%^a*T'aK!a<9bV{PC=p*Jw4!&SgxcbB5r]idw(wBRmF7xFkt#&`(Rm/Rm8E|!JuY_9:Rl5=wrgr2:bbxd@xXfB(a*#T+!.X0X1Ta/a'T&RlDRfL>RlyARl9b[z[>RfZ:RlL:RfRwlg/ARl;9;RlxKv,A/!%7s69<74=BA5ba{-8Bde#`a<XaKYa1,a'P~=wxfB2bZ}}?C972@@=I}r8@55B9;5bb}G978B2@@=aybb}3j3vLv;<Jw3&!>Rfk=ayb^}4~Ad1#`*@@=aybb{w2@>==<bbz]dx+UY#^UaF!a9!bB'Ya1.!ajXa#%olRhD[y=3Dt#Ov5BrHKuMB%!(Rf^Wep~HrJwkiQjKr|~FRg)Ku+D#'!t5~GrF~?rDdV)UY,Z/_7RkuG{<~BrBg,rlsO:235B@bX}|d?a1!#`(6Vyn5@d##Y+jTv|vV~EfIj]uNpn~FRfH7Lq2vb1!a9-978BaU@@=Iz9978BbU}#~AJq0!(@@=Iz8978BaU@@=Iz7~AJQ|}!978BbU}!JvkaK!AdUa21-U#`a+(g/vsRn~Ou!5RPj:rmu9WhOjXuvvNr}:RhAj^v(pyw8unRn[kPr}p|u7vwv]RiSBd;pppzq@qHQa?(b.!a.a`@.|xa(hFv;Wiyj5uuv-7Riw~Cw`fg2WlU978BbU|wOuNBJqG!(P~EfD~CRlQcZ#X,k)u3vWs@u2]ksg;wEx'f@q1_2Wg.j]uNpn~FRfqJv]!15x'h{qG!(@@=IzK~CRl^j6v(us5x4i,#T(2WmY?C2F{1>Kq<aj1!*jTqIsBv=Wld~Cw`fj2Wl[j`v0u*~>RlT=c>Z,k#u3vWs@u2]kq<c1Z+jTqIsBv=Wle~Cw`fn2Wl]dn1#c(a(b^a2!b/bAT(bj!aDa7bu,a_a{c0!2T0g:v>ReD2@G{42@G{5~DpM~<5rc=Bx6i>{RT#RnI@zCx]y]z:2Jv[!zr5Awyk]9]k]dD(Y+X#6Vz.g=wKtgwhaCwgmTWj2Lu,w%_+/[y-B;b^xeg3u3Rj-2@bX{*KrJ<!+'@Wg(g?QRlC@Jv`!%b[zIwsfII}8JQ_@w|kW|=Jv(%!AqcOuNBJvEzh!bYzjLs@wP#(0!oy@>RkdJwMZtc3Dtd@BcG#T'9bWxg2@2Fznd*#Y+;2x'c}w<zizixNgwa#Z'U+!/!a'!a+w~g~z6wcn{Rn}wcnzRn|5Rh%=]nJg5vuRmvNvdRlvcprJu}w*az*a#!%.a.'Bot9qT]kj@Wg'ay2Gzv@Jv`!%b[zEwsfHI}1;ck#Ux`<Cbbx_Lu+w!a&0*!wko*wwo,So,}6Juqxf!E}PigQuyRm`d3(`#8>Rn%:A5B;bZ~%KvhCa!a2!x>k7#Uxb@b{#xaRk7Jw0!)>wwhlShl}6>wwhmShm}6CJvB!.x'hhvj{!!5Bwkhhbaz}x'hivjz~!5Bwkhibaz|xEhTrNu,v-vpD!a%&/)a3a.,%Ro2t[CE{)@3re9b]{%wjo09:rgc:Z&Ro6=<riifuaw&RmoKrNA!%(Ro4>Ro89;Ri`dSaL'UYzxZb)7Rka3xRhT&!,!#^1U}vbaz{>>@=be}yC@:D5bazzKu+A&!}{?ba}y>>@=be}wxBh[t`u~vJvr!%a!a()a,a0a4RoC=]o;Ju(!%RoGRhdwjh`=]oAg>w#Ro?g5vuRo=NvdRl|Ku]C.!&;RoEJvB!%RoORoMBx'h[v+_?w~h`}~5?w~hd~!xKh]oiptu-utv.vp!#%&a30a@a'a+(a/aOp(o~p!RoDJu(!%RoHRhewjha=]oBNvdRl}g>w#Ro@g5vuRo>c[#X']o<CauRoRAd-#Y':RkpauRoQKu]C.!&;RoFJvB!%RoNRoPBx'h]v+_?w~ha}t5?w~he}ue!/UbhYacXaW^Tc&a;b:a-c/#b&aja1(!cL+!bKbt!bmcRc9aIc?8[yW3Dtt94Rg`Jv}!&SiRMzBhEebShEMNuPRe>x7gL#TzuwjirRipc<Z&>on;>z=h-MSh.Mwqczx'a7vj&!>Re4@=ResJt__NuPRi*NuPRi)j]uNr|~FRfzKrJ>_+@Wfy@Wf]2WocKrJ<!+'@Wg%g/QRl@@Jv`!&awRl<wsfFIzgLu(w*!.*&ShBMwvhIRhI9;RhNx1hK'!#Sn]Mx1hK~0!#:2<H~7cNu+w7D*'1ZtW>Rn1~?rOc:Z&Rn2=<rQ<7wjh&=BSnLMc]#X(6Vz)w[b=a!U#9wzgMc3#&(RgMRitRis<x,gKt`ax!&+SioM=BSilMc3#&(RgKRinRimKurB,!&SiQMzBhDebShDM6BJQ!(P~Efx978B2@@=I}WLrJw!!,a*&@G}O@9wkibRid@@x'fKwC!&SlDMSfLMjUv~Q~EfKKv3@a+!(hFv-]mpx/hYZ(C5RiWz<o/MwkhY?So/M@x,gbvfB*&!SgEM:SoeeehFu3:Rgbda(,^TZa)X/7Sg[eb:2RgI~BrMC@wgkc:wwkcRerx3h(uUvK!&*,SnOM4Sh*MArRg;wHRh(x=h;rJvPwI!a4',a'0@Wg&=BSh/Mg>w=Rh=g3w*wwgGRgGcW(X#;Sg}M2Gzk@Jv`!&awRl=wsfGIz`dKZ*T'Y-:RhR7RhQg5u-p`j6v(us5d,#Y+~Awkia?RicOuNBwkibba}Ld6p~tyu_vbAa'a+!a/'a3aEa8a!>Sh,ebJv{!&Sh@ebSaReb9;SgwebNuPRi(NvdRl)NuPRi'hHu^<Rm^Jvv_@Wl(g;u1Si/ebKu'B&!*Sh?eb@Wl'z@aPeb95Si.ebcpputyvjB)!,&a+0a%ShAMWeK@G}C@WfJ9;RhMwvhH9w{ia}ix,hJvRA1(!zAn[MRhHx1hJ~*!#hFv(BSn[MBJQ!(@@=I~'978B2@@=I}2db.Ua<'X}+T#a0XaG2G}E;wkg|wuh!Rh!x,hZu,@)!&So0MVy)C5RiXACJvB!&5RiY5RiZg8w)cG}*T#2@bU}=KsA>(!a.3wkhZba~(x,h^u(A!&(SoCMRhb5Bz=h[eb?w~hb~6x,h_u(A!&(SoDMRhc5Bz=h]eb?w~hc~6e)aA1T#T,^^^c-bMb&blcPaP(a/!0!bA=b5c@a(!bfbrc#2afwmhARnjwchORnp2Wlf3DtsNvdRl-2@wpa<]m0bx(#:awRk2@Jw3!%RfhwpfgRlnKQB%!(G{V@G|'NuuRl6d='T+Y#VyUg<v~Rl~==G|<Jv+'!aYShC}6@B<5?ba~8@Jw3'!g2QRljhLrpWlOd+#Y'g.w'rIg>w*wgj@g-u0Rj@Lu+wT&)ZtUauq]~GrGci&U#F|39:rELrNvj!.%*RhCwunfw~nf~:9;Ri]>wtnhg;wHRnhx3hDs@v~!/+'@Wfr@9RkSNu&Rlo=@<5GzoKs0@_+@Wl+@awRkmJuh!-3d(}pY#qWJvj!%Rm(:Jw3!%Rm,Rm*de&!1U-U#`)Re;@G|.@9Ri82@wjfvRlq=@<5GzpLvOvr!).&2RlF8Rf`C=x!eE{.Jw3_g2QRlkhLrpWlPde(!#U{s,UXa*Ta'[y'g:v>ReS;x0PZ&RnlRnn~HrKJw1}f!=x!eB|2w]aP(#Xa&a*Ta.Ua2a7=]iOd'#Y&Ro&WnWg;u.RiDg6vjRiBNvdRlzhNvj]nYJuW_2Wm3x)kFze{9d])!a.!,Y01!#&aC!a3RndC=ox~BrC@2b^{pg,rlse7x'ksuq!%Rm.E{xidw(wBRmGx9o+)X#wwo-So-}69:Rl4@xSf@a#XZ'X)X,Ta(/ARl8b[xc>RfY:RlI:RfQwlg.ARl:9;Rlwdn'#^XafaQa1X1TaHTa)@b[{zcZ#X'7RkwWg@Ou4ARn&x)kG#{,g7u/RkGdH'U#Y*Vz'Wm&CARm|bx#(A]gUbUzJj9Q~=d,#Y(56H}l978H{U7d,0#U*2>ABb_xZ978BbU{e~AJQ{g!978BbU{hxMh?ad{oUYZ.x1h?{l!#:2<H{mx3n[t{vl!,&a%3Ro(z=iS}6ARnr=Bwsn^wvn`Rnbd`*T}B0!#^X'BG{c9b]{a>>@=be}F?JvS!&BG{d7BG}(Bde#`a1X,Ya@!a'P~=wxf@2bZ}I56B2@@=aybb}08@55B9;5bb}<j3vLv;<Jw3&!>Rfg=ayb^}&OuNBKuLA!)a!P~=x#fD{f2@>==<bbzl?C972@@=Ix^d6rSu,v7w*C(0a)a6#B+a%!sQ[y?3Dt%3[xn~<5rLOu!5p@Ku+D#'!t7~GrP~?rNKvlaya7'!h+v-5qMg=t|cd,U#5AAaa5Abb{S@52B5@a[@52B5Gx[iXueu;d<#`a(!/549C;ag>23ExY5@Dah89b^~689Jv)!~2b[~1Lv'w(%*!a#bX|aPrmawRe]keu7uhv-q6rxu,q`xTo]/a5aU!bNaDXbi!b-!ao!b<bwA!#5@B932:aV2G|:d-)Y#hJrL>RhG<7@C5<H|_=Cau:5aj5@B932:bJ|ng>vIbs)#?C2F|9jPv0w.vISh-MKvUaz(.!9ABbb|[5;5<H|Eg>unwfh;9:4E|YjQsBt|vjx'hYq3!(?C2F|J:2<BaY?C2F|GOu!5x,g|p{ah!-(?C2F|c9:4E|OjXuvvNr}:Rh&i[w*t|cd+U#jJvsu)vsSn~Mkfrmu9p}u7vwv]So!McW#Xa!ax5@A5aY:5;5<H|>kJv~vYrquJu3x4ib#T)2@SmZM?C2F|Bj:rmu9@xPhI(a*a#U#`a3-5Abb|L~@:RhK9:4E|0@52B5G|#C::aY?C2F|-:2<BaY?C2F|.5Jvk!a)javYrquJu3x4ia#T)2@SmYM?C2F|HAxPhH(!a#U#`a*-5Abb|4~@:RhJ9:4E|R@52B5G|F:2<BaY?C2F|Sc^#Xa2j=Qq5CJvB!-g<v{z;hhM?C2F|Zi[vrv{z;hiM?C2F|XKsA>!a)-g<v{z;h[eb?C2F|]i[vrv{z;h]eb?C2F|^iZu.vix,hZq3ah!.(?C2F|QOu!5ShXM:2<BaY?C2F|P",13494,2713,49,25,61),Eu=new Uint16Array([512,26465,29036,7,0,2,4,116,24638,116,24636,8693,29807,24610,621,1,0,0,3,112,24614,111,115,24615]),Du;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.FLAG13=8192]=`FLAG13`,e[e.BRANCH_LENGTH=8064]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`,e[e.VALUE_MASK=8191]=`VALUE_MASK`})(Du||={});var Ou;(function(e){e[e.AMP=38]=`AMP`,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_X=120]=`LOWER_X`})(Ou||={});var ku=32;function Au(e){return e-Ou.ZERO>>>0<=9}function ju(e){return(e|ku)-Ou.LOWER_A>>>0<=5}function Mu(e){return(e|ku)-Ou.LOWER_A>>>0<=25}function Nu(e){return e===Ou.EQUALS||Mu(e)||Au(e)}var Pu;(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`})(Pu||={});var Fu;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(Fu||={});var Iu=class{decodeTree;emitCodePoint;errors;state=Pu.EntityStart;consumed=1;result=0;treeIndex=0;excess=1;decodeMode=Fu.Strict;runConsumed=0;constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n}startEntity(e){this.decodeMode=e,this.state=Pu.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(e,t){switch(this.state){case Pu.EntityStart:return e.charCodeAt(t)===Ou.NUM?(this.state=Pu.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=Pu.NamedEntity,this.stateNamedEntity(e,t));case Pu.NumericStart:return this.stateNumericStart(e,t);case Pu.NumericDecimal:return this.stateNumericDecimal(e,t);case Pu.NumericHex:return this.stateNumericHex(e,t);default:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|ku)===Ou.LOWER_X?(this.state=Pu.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=Pu.NumericDecimal,this.stateNumericDecimal(e,t))}stateNumericHex(e,t){let n=e.length,{result:r}=this,{consumed:i}=this;for(;t<n;){let n=e.charCodeAt(t);if(Au(n)||ju(n)){let e=n<=Ou.NINE?n-Ou.ZERO:(n|ku)-Ou.LOWER_A+10;r=r*16+e,i+=1,t+=1}else return this.result=r,this.consumed=i,this.emitNumericEntity(n,3)}return this.result=r,this.consumed=i,-1}stateNumericDecimal(e,t){let n=e.length,{result:r}=this,{consumed:i}=this;for(;t<n;){let n=e.charCodeAt(t)-Ou.ZERO;if(n>>>0>9)return this.result=r,this.consumed=i,this.emitNumericEntity(n+Ou.ZERO,2);r=r*10+n,i+=1,t+=1}return this.result=r,this.consumed=i,-1}emitNumericEntity(e,t){if(this.consumed<=t)return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===Ou.SEMI)this.consumed+=1;else if(this.decodeMode===Fu.Strict)return 0;return this.emitCodePoint((this.decodeTree===Eu?Su:xu)(this.result),this.consumed),this.errors&&(e!==Ou.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}flushAndEmitLegacyOrReject(e,t,n,r){return this.consumed=e,this.excess=t,this.result===0||this.decodeMode===Fu.Attribute&&(r===0||t>1||Nu(n))?0:this.emitNotTerminatedNamedEntity()}stateNamedEntity(e,t){let{decodeTree:n}=this,r=e.length,i=this.decodeMode===Fu.Strict,{treeIndex:a}=this,{excess:o}=this,{consumed:s}=this,c=n[a];for(;t<r;){for(;(c&(Du.VALUE_LENGTH|Du.FLAG13))===0&&(c&Du.JUMP_TABLE)!==0;){let i=e.charCodeAt(t),l=c&Du.JUMP_TABLE,u=(c&Du.BRANCH_LENGTH)>>7;if(u===0){if(i!==l)return this.flushAndEmitLegacyOrReject(s,o,i,0);a+=1}else{let e=i-l;if(e>>>0>=u)return this.flushAndEmitLegacyOrReject(s,o,i,0);let t=n[a+1+e];if(t===0)return this.flushAndEmitLegacyOrReject(s,o,i,0);a=a+u+t&65535}if(c=n[a],t+=1,o+=1,t>=r)break}if(t>=r)break;if((c&(Du.VALUE_LENGTH|Du.FLAG13))===Du.FLAG13){let i=(c&Du.BRANCH_LENGTH)>>7,{runConsumed:l}=this;if(l===0){let n=e.charCodeAt(t);if(n!==(c&Du.JUMP_TABLE))return this.flushAndEmitLegacyOrReject(s,o,n,0);t+=1,o+=1,l=1}for(;l<i;){if(t>=r)return this.treeIndex=a,this.excess=o,this.consumed=s,this.runConsumed=l,-1;let i=l-1,c=n[a+1+(i>>1)]>>((i&1)<<3)&255,u=e.charCodeAt(t);if(u!==c)return this.runConsumed=0,this.flushAndEmitLegacyOrReject(s,o,u,0);t+=1,o+=1,l+=1}this.runConsumed=0,a+=1+(i>>1),c=n[a];continue}let l=c>>>14,u=e.charCodeAt(t);if(l!==0){if(!i&&(c&Du.FLAG13)===0&&(this.result=a,s+=o-1,o=1),u===Ou.SEMI)return this.emitNamedEntityData(a,l,s+o);if(l===1)return this.flushAndEmitLegacyOrReject(s,o,u,l)}let d=Lu(n,c,a+(l||1),u);if(d<0)return this.flushAndEmitLegacyOrReject(s,o,u,l);a=d,c=n[a],t+=1,o+=1}return!i&&c>>>14&&(c&Du.FLAG13)===0&&(this.result=a,s+=o-1,o=1),this.treeIndex=a,this.excess=o,this.consumed=s,-1}emitNotTerminatedNamedEntity(){let{result:e,decodeTree:t}=this,n=t[e]>>>14;return this.emitNamedEntityData(e,n,this.consumed),this.errors?.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&Du.VALUE_MASK:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){switch(this.state){case Pu.NamedEntity:return this.result!==0&&(this.decodeMode!==Fu.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Pu.NumericDecimal:return this.emitNumericEntity(0,2);case Pu.NumericHex:return this.emitNumericEntity(0,3);case Pu.NumericStart:return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;default:return 0}}};function Lu(e,t,n,r){let i=(t&Du.BRANCH_LENGTH)>>7,a=t&Du.JUMP_TABLE;if(a){if(i===0)return r===a?n:-1;let t=r-a;if(t>>>0>=i)return-1;let o=e[n+t];return o===0?-1:n+i+o-1&65535}if(i===0)return-1;let o=i+1>>1,s=n+o+i;for(let t=0;t<i;t++){let i=e[n+(t>>1)]>>((t&1)<<3)&255;if(i===r)return s+e[n+o+t]&65535;if(i>r)return-1}return-1}var K;(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/`})(K||={});var Ru;(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`})(Ru||={});var zu;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(zu||={});var q;(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`})(q||={});var J;(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`})(J||={});var Bu=new Map([[q.A,J.A],[q.ADDRESS,J.ADDRESS],[q.ANNOTATION_XML,J.ANNOTATION_XML],[q.APPLET,J.APPLET],[q.AREA,J.AREA],[q.ARTICLE,J.ARTICLE],[q.ASIDE,J.ASIDE],[q.B,J.B],[q.BASE,J.BASE],[q.BASEFONT,J.BASEFONT],[q.BGSOUND,J.BGSOUND],[q.BIG,J.BIG],[q.BLOCKQUOTE,J.BLOCKQUOTE],[q.BODY,J.BODY],[q.BR,J.BR],[q.BUTTON,J.BUTTON],[q.CAPTION,J.CAPTION],[q.CENTER,J.CENTER],[q.CODE,J.CODE],[q.COL,J.COL],[q.COLGROUP,J.COLGROUP],[q.DD,J.DD],[q.DESC,J.DESC],[q.DETAILS,J.DETAILS],[q.DIALOG,J.DIALOG],[q.DIR,J.DIR],[q.DIV,J.DIV],[q.DL,J.DL],[q.DT,J.DT],[q.EM,J.EM],[q.EMBED,J.EMBED],[q.FIELDSET,J.FIELDSET],[q.FIGCAPTION,J.FIGCAPTION],[q.FIGURE,J.FIGURE],[q.FONT,J.FONT],[q.FOOTER,J.FOOTER],[q.FOREIGN_OBJECT,J.FOREIGN_OBJECT],[q.FORM,J.FORM],[q.FRAME,J.FRAME],[q.FRAMESET,J.FRAMESET],[q.H1,J.H1],[q.H2,J.H2],[q.H3,J.H3],[q.H4,J.H4],[q.H5,J.H5],[q.H6,J.H6],[q.HEAD,J.HEAD],[q.HEADER,J.HEADER],[q.HGROUP,J.HGROUP],[q.HR,J.HR],[q.HTML,J.HTML],[q.I,J.I],[q.IMG,J.IMG],[q.IMAGE,J.IMAGE],[q.INPUT,J.INPUT],[q.IFRAME,J.IFRAME],[q.KEYGEN,J.KEYGEN],[q.LABEL,J.LABEL],[q.LI,J.LI],[q.LINK,J.LINK],[q.LISTING,J.LISTING],[q.MAIN,J.MAIN],[q.MALIGNMARK,J.MALIGNMARK],[q.MARQUEE,J.MARQUEE],[q.MATH,J.MATH],[q.MENU,J.MENU],[q.META,J.META],[q.MGLYPH,J.MGLYPH],[q.MI,J.MI],[q.MO,J.MO],[q.MN,J.MN],[q.MS,J.MS],[q.MTEXT,J.MTEXT],[q.NAV,J.NAV],[q.NOBR,J.NOBR],[q.NOFRAMES,J.NOFRAMES],[q.NOEMBED,J.NOEMBED],[q.NOSCRIPT,J.NOSCRIPT],[q.OBJECT,J.OBJECT],[q.OL,J.OL],[q.OPTGROUP,J.OPTGROUP],[q.OPTION,J.OPTION],[q.P,J.P],[q.PARAM,J.PARAM],[q.PLAINTEXT,J.PLAINTEXT],[q.PRE,J.PRE],[q.RB,J.RB],[q.RP,J.RP],[q.RT,J.RT],[q.RTC,J.RTC],[q.RUBY,J.RUBY],[q.S,J.S],[q.SCRIPT,J.SCRIPT],[q.SEARCH,J.SEARCH],[q.SECTION,J.SECTION],[q.SELECT,J.SELECT],[q.SOURCE,J.SOURCE],[q.SMALL,J.SMALL],[q.SPAN,J.SPAN],[q.STRIKE,J.STRIKE],[q.STRONG,J.STRONG],[q.STYLE,J.STYLE],[q.SUB,J.SUB],[q.SUMMARY,J.SUMMARY],[q.SUP,J.SUP],[q.TABLE,J.TABLE],[q.TBODY,J.TBODY],[q.TEMPLATE,J.TEMPLATE],[q.TEXTAREA,J.TEXTAREA],[q.TFOOT,J.TFOOT],[q.TD,J.TD],[q.TH,J.TH],[q.THEAD,J.THEAD],[q.TITLE,J.TITLE],[q.TR,J.TR],[q.TRACK,J.TRACK],[q.TT,J.TT],[q.U,J.U],[q.UL,J.UL],[q.SVG,J.SVG],[q.VAR,J.VAR],[q.WBR,J.WBR],[q.XMP,J.XMP]]);function Vu(e){return Bu.get(e)??J.UNKNOWN}var Y=J,Hu={[K.HTML]:new Set([Y.ADDRESS,Y.APPLET,Y.AREA,Y.ARTICLE,Y.ASIDE,Y.BASE,Y.BASEFONT,Y.BGSOUND,Y.BLOCKQUOTE,Y.BODY,Y.BR,Y.BUTTON,Y.CAPTION,Y.CENTER,Y.COL,Y.COLGROUP,Y.DD,Y.DETAILS,Y.DIR,Y.DIV,Y.DL,Y.DT,Y.EMBED,Y.FIELDSET,Y.FIGCAPTION,Y.FIGURE,Y.FOOTER,Y.FORM,Y.FRAME,Y.FRAMESET,Y.H1,Y.H2,Y.H3,Y.H4,Y.H5,Y.H6,Y.HEAD,Y.HEADER,Y.HGROUP,Y.HR,Y.HTML,Y.IFRAME,Y.IMG,Y.INPUT,Y.LI,Y.LINK,Y.LISTING,Y.MAIN,Y.MARQUEE,Y.MENU,Y.META,Y.NAV,Y.NOEMBED,Y.NOFRAMES,Y.NOSCRIPT,Y.OBJECT,Y.OL,Y.P,Y.PARAM,Y.PLAINTEXT,Y.PRE,Y.SCRIPT,Y.SECTION,Y.SELECT,Y.SOURCE,Y.STYLE,Y.SUMMARY,Y.TABLE,Y.TBODY,Y.TD,Y.TEMPLATE,Y.TEXTAREA,Y.TFOOT,Y.TH,Y.THEAD,Y.TITLE,Y.TR,Y.TRACK,Y.UL,Y.WBR,Y.XMP]),[K.MATHML]:new Set([Y.MI,Y.MO,Y.MN,Y.MS,Y.MTEXT,Y.ANNOTATION_XML]),[K.SVG]:new Set([Y.TITLE,Y.FOREIGN_OBJECT,Y.DESC]),[K.XLINK]:new Set,[K.XML]:new Set,[K.XMLNS]:new Set},Uu=new Set([Y.H1,Y.H2,Y.H3,Y.H4,Y.H5,Y.H6]),Wu=new Set([q.STYLE,q.SCRIPT,q.XMP,q.IFRAME,q.NOEMBED,q.NOFRAMES,q.PLAINTEXT]);function Gu(e,t){return Wu.has(e)||t&&e===q.NOSCRIPT}var X;(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`})(X||={});var Ku={DATA:X.DATA,RCDATA:X.RCDATA,RAWTEXT:X.RAWTEXT,SCRIPT_DATA:X.SCRIPT_DATA,PLAINTEXT:X.PLAINTEXT,CDATA_SECTION:X.CDATA_SECTION};function qu(e){return e>=W.DIGIT_0&&e<=W.DIGIT_9}function Ju(e){return e>=W.LATIN_CAPITAL_A&&e<=W.LATIN_CAPITAL_Z}function Yu(e){return e>=W.LATIN_SMALL_A&&e<=W.LATIN_SMALL_Z}function Xu(e){return Yu(e)||Ju(e)}function Zu(e){return Xu(e)||qu(e)}function Qu(e){return e+32}function $u(e){return e===W.SPACE||e===W.LINE_FEED||e===W.TABULATION||e===W.FORM_FEED}function ed(e){return $u(e)||e===W.SOLIDUS||e===W.GREATER_THAN_SIGN}function td(e){return e===W.NULL?G.nullCharacterReference:e>1114111?G.characterReferenceOutsideUnicodeRange:uu(e)?G.surrogateCharacterReference:mu(e)?G.noncharacterCharacterReference:pu(e)||e===W.CARRIAGE_RETURN?G.controlCharacterReference:null}var nd=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName=``,this.active=!1,this.state=X.DATA,this.returnState=X.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new gu(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Iu(Tu,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(G.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(G.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=td(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),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(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:_u.START_TAG,tagName:``,tagID:J.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:_u.END_TAG,tagName:``,tagID:J.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:_u.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:_u.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:``},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e;let t=this.currentToken;if(vu(t,this.currentAttr.name)===null){if(t.attrs.push(this.currentAttr),t.location&&this.currentLocation){let n=(e=t.location).attrs??(e.attrs=Object.create(null));n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(G.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.prepareToken(e),e.tagID=Vu(e.tagName),e.type===_u.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(G.endTagWithAttributes),e.selfClosing&&this._err(G.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case _u.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case _u.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case _u.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:_u.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken){if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk()}this._createCharacterToken(e,t)}_emitCodePoint(e){let t=$u(e)?_u.WHITESPACE_CHARACTER:e===W.NULL?_u.NULL_CHARACTER:_u.CHARACTER;this._appendCharToCurrentCharacterToken(t,e<65536?String.fromCharCode(e):String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(_u.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=X.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Fu.Attribute:Fu.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===X.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===X.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===X.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case X.DATA:this._stateData(e);break;case X.RCDATA:this._stateRcdata(e);break;case X.RAWTEXT:this._stateRawtext(e);break;case X.SCRIPT_DATA:this._stateScriptData(e);break;case X.PLAINTEXT:this._statePlaintext(e);break;case X.TAG_OPEN:this._stateTagOpen(e);break;case X.END_TAG_OPEN:this._stateEndTagOpen(e);break;case X.TAG_NAME:this._stateTagName(e);break;case X.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case X.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case X.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case X.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case X.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case X.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case X.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case X.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case X.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case X.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case X.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case X.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case X.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case X.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case X.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case X.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case X.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case X.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case X.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case X.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case X.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case X.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case X.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case X.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case X.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case X.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case X.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case X.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case X.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case X.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case X.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case X.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case X.BOGUS_COMMENT:this._stateBogusComment(e);break;case X.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case X.COMMENT_START:this._stateCommentStart(e);break;case X.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case X.COMMENT:this._stateComment(e);break;case X.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case X.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case X.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case X.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case X.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case X.COMMENT_END:this._stateCommentEnd(e);break;case X.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case X.DOCTYPE:this._stateDoctype(e);break;case X.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case X.DOCTYPE_NAME:this._stateDoctypeName(e);break;case X.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case X.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case X.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case X.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case X.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case X.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case X.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case X.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case X.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case X.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case X.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case X.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case X.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case X.CDATA_SECTION:this._stateCdataSection(e);break;case X.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case X.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case X.CHARACTER_REFERENCE:this._stateCharacterReference();break;case X.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case W.LESS_THAN_SIGN:this.state=X.TAG_OPEN;break;case W.AMPERSAND:this._startCharacterReference();break;case W.NULL:this._err(G.unexpectedNullCharacter),this._emitCodePoint(e);break;case W.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case W.AMPERSAND:this._startCharacterReference();break;case W.LESS_THAN_SIGN:this.state=X.RCDATA_LESS_THAN_SIGN;break;case W.NULL:this._err(G.unexpectedNullCharacter),this._emitChars(`�`);break;case W.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case W.LESS_THAN_SIGN:this.state=X.RAWTEXT_LESS_THAN_SIGN;break;case W.NULL:this._err(G.unexpectedNullCharacter),this._emitChars(`�`);break;case W.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_LESS_THAN_SIGN;break;case W.NULL:this._err(G.unexpectedNullCharacter),this._emitChars(`�`);break;case W.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case W.NULL:this._err(G.unexpectedNullCharacter),this._emitChars(`�`);break;case W.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(Xu(e))this._createStartTagToken(),this.state=X.TAG_NAME,this._stateTagName(e);else switch(e){case W.EXCLAMATION_MARK:this.state=X.MARKUP_DECLARATION_OPEN;break;case W.SOLIDUS:this.state=X.END_TAG_OPEN;break;case W.QUESTION_MARK:this._err(G.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=X.BOGUS_COMMENT,this._stateBogusComment(e);break;case W.EOF:this._err(G.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(G.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=X.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(Xu(e))this._createEndTagToken(),this.state=X.TAG_NAME,this._stateTagName(e);else switch(e){case W.GREATER_THAN_SIGN:this._err(G.missingEndTagName),this.state=X.DATA;break;case W.EOF:this._err(G.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(G.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=X.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=X.BEFORE_ATTRIBUTE_NAME;break;case W.SOLIDUS:this.state=X.SELF_CLOSING_START_TAG;break;case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentTagToken();break;case W.NULL:this._err(G.unexpectedNullCharacter),t.tagName+=`�`;break;case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(Ju(e)?Qu(e):e)}}_stateRcdataLessThanSign(e){e===W.SOLIDUS?this.state=X.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=X.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){Xu(e)?(this.state=X.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=X.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=X.BEFORE_ATTRIBUTE_NAME,!1;case W.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=X.SELF_CLOSING_START_TAG,!1;case W.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=X.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=X.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===W.SOLIDUS?this.state=X.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=X.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){Xu(e)?(this.state=X.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=X.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=X.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case W.SOLIDUS:this.state=X.SCRIPT_DATA_END_TAG_OPEN;break;case W.EXCLAMATION_MARK:this.state=X.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=X.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){Xu(e)?(this.state=X.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=X.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=X.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===W.HYPHEN_MINUS?(this.state=X.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=X.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===W.HYPHEN_MINUS?(this.state=X.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=X.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case W.HYPHEN_MINUS:this.state=X.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case W.NULL:this._err(G.unexpectedNullCharacter),this._emitChars(`�`);break;case W.EOF:this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case W.HYPHEN_MINUS:this.state=X.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case W.NULL:this._err(G.unexpectedNullCharacter),this.state=X.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case W.EOF:this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=X.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case W.HYPHEN_MINUS:this._emitChars(`-`);break;case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case W.GREATER_THAN_SIGN:this.state=X.SCRIPT_DATA,this._emitChars(`>`);break;case W.NULL:this._err(G.unexpectedNullCharacter),this.state=X.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case W.EOF:this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=X.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===W.SOLIDUS?this.state=X.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Xu(e)?(this._emitChars(`<`),this.state=X.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=X.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){Xu(e)?(this.state=X.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=X.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=X.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(lu.SCRIPT,!1)&&ed(this.preprocessor.peek(lu.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<lu.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=X.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case W.HYPHEN_MINUS:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case W.NULL:this._err(G.unexpectedNullCharacter),this._emitChars(`�`);break;case W.EOF:this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case W.HYPHEN_MINUS:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case W.NULL:this._err(G.unexpectedNullCharacter),this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case W.EOF:this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case W.HYPHEN_MINUS:this._emitChars(`-`);break;case W.LESS_THAN_SIGN:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case W.GREATER_THAN_SIGN:this.state=X.SCRIPT_DATA,this._emitChars(`>`);break;case W.NULL:this._err(G.unexpectedNullCharacter),this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case W.EOF:this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===W.SOLIDUS?(this.state=X.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(lu.SCRIPT,!1)&&ed(this.preprocessor.peek(lu.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<lu.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=X.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=X.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.SOLIDUS:case W.GREATER_THAN_SIGN:case W.EOF:this.state=X.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case W.EQUALS_SIGN:this._err(G.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=X.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=X.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:case W.SOLIDUS:case W.GREATER_THAN_SIGN:case W.EOF:this._leaveAttrName(),this.state=X.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case W.EQUALS_SIGN:this._leaveAttrName(),this.state=X.BEFORE_ATTRIBUTE_VALUE;break;case W.QUOTATION_MARK:case W.APOSTROPHE:case W.LESS_THAN_SIGN:this._err(G.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case W.NULL:this._err(G.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(Ju(e)?Qu(e):e)}}_stateAfterAttributeName(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.SOLIDUS:this.state=X.SELF_CLOSING_START_TAG;break;case W.EQUALS_SIGN:this.state=X.BEFORE_ATTRIBUTE_VALUE;break;case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentTagToken();break;case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=X.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.QUOTATION_MARK:this.state=X.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case W.APOSTROPHE:this.state=X.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case W.GREATER_THAN_SIGN:this._err(G.missingAttributeValue),this.state=X.DATA,this.emitCurrentTagToken();break;default:this.state=X.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case W.QUOTATION_MARK:this.state=X.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case W.AMPERSAND:this._startCharacterReference();break;case W.NULL:this._err(G.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case W.APOSTROPHE:this.state=X.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case W.AMPERSAND:this._startCharacterReference();break;case W.NULL:this._err(G.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this._leaveAttrValue(),this.state=X.BEFORE_ATTRIBUTE_NAME;break;case W.AMPERSAND:this._startCharacterReference();break;case W.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=X.DATA,this.emitCurrentTagToken();break;case W.NULL:this._err(G.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case W.QUOTATION_MARK:case W.APOSTROPHE:case W.LESS_THAN_SIGN:case W.EQUALS_SIGN:case W.GRAVE_ACCENT:this._err(G.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this._leaveAttrValue(),this.state=X.BEFORE_ATTRIBUTE_NAME;break;case W.SOLIDUS:this._leaveAttrValue(),this.state=X.SELF_CLOSING_START_TAG;break;case W.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=X.DATA,this.emitCurrentTagToken();break;case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:this._err(G.missingWhitespaceBetweenAttributes),this.state=X.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case W.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=X.DATA,this.emitCurrentTagToken();break}case W.EOF:this._err(G.eofInTag),this._emitEOFToken();break;default:this._err(G.unexpectedSolidusInTag),this.state=X.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentComment(t);break;case W.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case W.NULL:this._err(G.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(lu.DASH_DASH,!0)?(this._createCommentToken(lu.DASH_DASH.length+1),this.state=X.COMMENT_START):this._consumeSequenceIfMatch(lu.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(lu.DOCTYPE.length+1),this.state=X.DOCTYPE):this._consumeSequenceIfMatch(lu.CDATA_START,!0)?this.inForeignNode?this.state=X.CDATA_SECTION:(this._err(G.cdataInHtmlContent),this._createCommentToken(lu.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=X.BOGUS_COMMENT):this._ensureHibernation()||(this._err(G.incorrectlyOpenedComment),this._createCommentToken(2),this.state=X.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case W.HYPHEN_MINUS:this.state=X.COMMENT_START_DASH;break;case W.GREATER_THAN_SIGN:{this._err(G.abruptClosingOfEmptyComment),this.state=X.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=X.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case W.HYPHEN_MINUS:this.state=X.COMMENT_END;break;case W.GREATER_THAN_SIGN:this._err(G.abruptClosingOfEmptyComment),this.state=X.DATA,this.emitCurrentComment(t);break;case W.EOF:this._err(G.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=X.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case W.HYPHEN_MINUS:this.state=X.COMMENT_END_DASH;break;case W.LESS_THAN_SIGN:t.data+=`<`,this.state=X.COMMENT_LESS_THAN_SIGN;break;case W.NULL:this._err(G.unexpectedNullCharacter),t.data+=`�`;break;case W.EOF:this._err(G.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case W.EXCLAMATION_MARK:t.data+=`!`,this.state=X.COMMENT_LESS_THAN_SIGN_BANG;break;case W.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=X.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===W.HYPHEN_MINUS?this.state=X.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=X.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===W.HYPHEN_MINUS?this.state=X.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=X.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==W.GREATER_THAN_SIGN&&e!==W.EOF&&this._err(G.nestedComment),this.state=X.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case W.HYPHEN_MINUS:this.state=X.COMMENT_END;break;case W.EOF:this._err(G.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=X.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentComment(t);break;case W.EXCLAMATION_MARK:this.state=X.COMMENT_END_BANG;break;case W.HYPHEN_MINUS:t.data+=`-`;break;case W.EOF:this._err(G.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=X.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case W.HYPHEN_MINUS:t.data+=`--!`,this.state=X.COMMENT_END_DASH;break;case W.GREATER_THAN_SIGN:this._err(G.incorrectlyClosedComment),this.state=X.DATA,this.emitCurrentComment(t);break;case W.EOF:this._err(G.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=X.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=X.BEFORE_DOCTYPE_NAME;break;case W.GREATER_THAN_SIGN:this.state=X.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case W.EOF:{this._err(G.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(G.missingWhitespaceBeforeDoctypeName),this.state=X.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(Ju(e))this._createDoctypeToken(String.fromCharCode(Qu(e))),this.state=X.DOCTYPE_NAME;else switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.NULL:this._err(G.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=X.DOCTYPE_NAME;break;case W.GREATER_THAN_SIGN:{this._err(G.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=X.DATA;break}case W.EOF:{this._err(G.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=X.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=X.AFTER_DOCTYPE_NAME;break;case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.NULL:this._err(G.unexpectedNullCharacter),t.name+=`�`;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(Ju(e)?Qu(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(lu.PUBLIC,!1)?this.state=X.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(lu.SYSTEM,!1)?this.state=X.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(G.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=X.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case W.QUOTATION_MARK:this._err(G.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=X.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:this._err(G.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=X.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case W.GREATER_THAN_SIGN:this._err(G.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.QUOTATION_MARK:t.publicId=``,this.state=X.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:t.publicId=``,this.state=X.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case W.GREATER_THAN_SIGN:this._err(G.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case W.QUOTATION_MARK:this.state=X.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case W.NULL:this._err(G.unexpectedNullCharacter),t.publicId+=`�`;break;case W.GREATER_THAN_SIGN:this._err(G.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case W.APOSTROPHE:this.state=X.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case W.NULL:this._err(G.unexpectedNullCharacter),t.publicId+=`�`;break;case W.GREATER_THAN_SIGN:this._err(G.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=X.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case W.GREATER_THAN_SIGN:this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.QUOTATION_MARK:this._err(G.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:this._err(G.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.QUOTATION_MARK:t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:this.state=X.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case W.QUOTATION_MARK:this._err(G.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:this._err(G.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case W.GREATER_THAN_SIGN:this._err(G.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.QUOTATION_MARK:t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case W.APOSTROPHE:t.systemId=``,this.state=X.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case W.GREATER_THAN_SIGN:this._err(G.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=X.DATA,this.emitCurrentDoctype(t);break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case W.QUOTATION_MARK:this.state=X.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case W.NULL:this._err(G.unexpectedNullCharacter),t.systemId+=`�`;break;case W.GREATER_THAN_SIGN:this._err(G.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case W.APOSTROPHE:this.state=X.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case W.NULL:this._err(G.unexpectedNullCharacter),t.systemId+=`�`;break;case W.GREATER_THAN_SIGN:this._err(G.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case W.SPACE:case W.LINE_FEED:case W.TABULATION:case W.FORM_FEED:break;case W.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.EOF:this._err(G.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(G.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=X.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case W.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=X.DATA;break;case W.NULL:this._err(G.unexpectedNullCharacter);break;case W.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case W.RIGHT_SQUARE_BRACKET:this.state=X.CDATA_SECTION_BRACKET;break;case W.EOF:this._err(G.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===W.RIGHT_SQUARE_BRACKET?this.state=X.CDATA_SECTION_END:(this._emitChars(`]`),this.state=X.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case W.GREATER_THAN_SIGN:this.state=X.DATA;break;case W.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=X.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0){if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(W.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Zu(this.preprocessor.peek(1))?X.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){Zu(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===W.SEMICOLON&&this._err(G.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},rd=new Set([J.DD,J.DT,J.LI,J.OPTGROUP,J.OPTION,J.P,J.RB,J.RP,J.RT,J.RTC]),id=new Set([...rd,J.CAPTION,J.COLGROUP,J.TBODY,J.TD,J.TFOOT,J.TH,J.THEAD,J.TR]),ad=new Set([J.APPLET,J.CAPTION,J.HTML,J.MARQUEE,J.OBJECT,J.TABLE,J.TD,J.TEMPLATE,J.TH]),od=new Set([...ad,J.OL,J.UL]),sd=new Set([...ad,J.BUTTON]),cd=new Set([J.ANNOTATION_XML,J.MI,J.MN,J.MO,J.MS,J.MTEXT]),ld=new Set([J.DESC,J.FOREIGN_OBJECT,J.TITLE]),ud=new Set([J.TR,J.TEMPLATE,J.HTML]),dd=new Set([J.TBODY,J.TFOOT,J.THEAD,J.TEMPLATE,J.HTML]),fd=new Set([J.TABLE,J.TEMPLATE,J.HTML]),pd=new Set([J.TD,J.TH]),md=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=J.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===J.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===K.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==K.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Uu,K.HTML)}popUntilTableCellPopped(){this.popUntilPopped(pd,K.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(fd,K.HTML)}clearBackToTableBodyContext(){this.clearBackTo(dd,K.HTML)}clearBackToTableRowContext(){this.clearBackTo(ud,K.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===J.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===J.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case K.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case K.SVG:if(ld.has(r))return!1;break;case K.MATHML:if(cd.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,ad)}hasInListItemScope(e){return this.hasInDynamicScope(e,od)}hasInButtonScope(e){return this.hasInDynamicScope(e,sd)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case K.HTML:if(Uu.has(t))return!0;if(ad.has(t))return!1;break;case K.SVG:if(ld.has(t))return!1;break;case K.MATHML:if(cd.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===K.HTML)switch(this.tagIDs[t]){case e:return!0;case J.TABLE:case J.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===K.HTML)switch(this.tagIDs[e]){case J.TBODY:case J.THEAD:case J.TFOOT:return!0;case J.TABLE:case J.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===K.HTML)switch(this.tagIDs[t]){case e:return!0;case J.OPTION:case J.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&rd.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&id.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&id.has(this.currentTagId);)this.pop()}},hd=3,gd;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(gd||={});var _d={type:gd.Marker},vd=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===gd.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){let t=this.treeAdapter.getAttrList(o);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<hd)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<hd)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1,i>=hd&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(_d)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:gd.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:gd.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(_d);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===gd.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===gd.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===gd.Element&&t.element===e)}},yd={createDocument(){return{nodeName:`#document`,mode:zu.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){let 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){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};yd.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(yd.isTextNode(n)){n.value+=t;return}}yd.appendChild(e,yd.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&yd.isTextNode(r)?r.value+=t:yd.insertBefore(e,yd.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.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}}},bd=`html`,xd=`about:legacy-compat`,Sd=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,Cd=`+//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//`.split(`,`),wd=[...Cd,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],Td=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),Ed=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],Dd=[...Ed,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function Od(e,t){return t.some(t=>e.startsWith(t))}function kd(e){return e.name===bd&&e.publicId===null&&(e.systemId===null||e.systemId===xd)}function Ad(e){if(e.name!==bd)return zu.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===Sd)return zu.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Td.has(n))return zu.QUIRKS;let e=t===null?wd:Cd;if(Od(n,e))return zu.QUIRKS;if(e=t===null?Ed:Dd,Od(n,e))return zu.LIMITED_QUIRKS}return zu.NO_QUIRKS}var jd={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},Md=`definitionurl`,Nd=`definitionURL`,Pd=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`.split(`.`).map(e=>[e.toLowerCase(),e])),Fd=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:K.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:K.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:K.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:K.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:K.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:K.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:K.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:K.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:K.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:K.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:K.XMLNS}]]),Id=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`.split(`.`).map(e=>[e.toLowerCase(),e])),Ld=new Set([J.B,J.BIG,J.BLOCKQUOTE,J.BODY,J.BR,J.CENTER,J.CODE,J.DD,J.DIV,J.DL,J.DT,J.EM,J.EMBED,J.H1,J.H2,J.H3,J.H4,J.H5,J.H6,J.HEAD,J.HR,J.I,J.IMG,J.LI,J.LISTING,J.MENU,J.META,J.NOBR,J.OL,J.P,J.PRE,J.RUBY,J.S,J.SMALL,J.SPAN,J.STRONG,J.STRIKE,J.SUB,J.SUP,J.TABLE,J.TT,J.U,J.UL,J.VAR]);function Rd(e){let t=e.tagID;return t===J.FONT&&e.attrs.some(({name:e})=>e===Ru.COLOR||e===Ru.SIZE||e===Ru.FACE)||Ld.has(t)}function zd(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Md){e.attrs[t].name=Nd;break}}function Bd(e){for(let t=0;t<e.attrs.length;t++){let n=Pd.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Vd(e){for(let t=0;t<e.attrs.length;t++){let n=Fd.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 Hd(e){let t=Id.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Vu(e.tagName))}function Ud(e,t){return t===K.MATHML&&(e===J.MI||e===J.MO||e===J.MN||e===J.MS||e===J.MTEXT)}function Wd(e,t,n){if(t===K.MATHML&&e===J.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===Ru.ENCODING){let t=n[e].value.toLowerCase();return t===jd.TEXT_HTML||t===jd.APPLICATION_XML}}return t===K.SVG&&(e===J.FOREIGN_OBJECT||e===J.DESC||e===J.TITLE)}function Gd(e,t,n,r){return(!r||r===K.HTML)&&Wd(e,t,n)||(!r||r===K.MATHML)&&Ud(e,t)}var Kd=`hidden`,qd=8,Jd=3,Z;(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`})(Z||={});var Yd={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Xd=new Set([J.TABLE,J.TBODY,J.TFOOT,J.THEAD,J.TR]),Zd={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:yd,onParseError:null},Qd=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=Z.INITIAL,this.originalInsertionMode=Z.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={...Zd,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new nd(this.options,this),this.activeFormattingElements=new vd(this.treeAdapter),this.fragmentContextID=n?Vu(this.treeAdapter.getTagName(n)):J.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new md(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...Zd,...t};e??=n.treeAdapter.createElement(q.TEMPLATE,K.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,K.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===J.TEMPLATE&&i.tmplInsertionModeStack.unshift(Z.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){if(!this.onParseError)return;let r=e.location??Yd,i={code:t,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:n?r.startLine:r.endLine,endCol:n?r.startCol:r.endCol,endOffset:n?r.startOffset:r.endOffset};this.onParseError(i)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)==null||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===K.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,K.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=Z.TEXT}switchToPlaintextParsing(){this.insertionMode=Z.TEXT,this.originalInsertionMode=Z.IN_BODY,this.tokenizer.state=Ku.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===q.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===K.HTML)switch(this.fragmentContextID){case J.TITLE:case J.TEXTAREA:this.tokenizer.state=Ku.RCDATA;break;case J.STYLE:case J.XMP:case J.IFRAME:case J.NOEMBED:case J.NOFRAMES:case J.NOSCRIPT:this.tokenizer.state=Ku.RAWTEXT;break;case J.SCRIPT:this.tokenizer.state=Ku.SCRIPT_DATA;break;case J.PLAINTEXT:this.tokenizer.state=Ku.PLAINTEXT}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,K.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,K.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(q.HTML,K.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,J.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===_u.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===J.SVG&&this.treeAdapter.getTagName(t)===q.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===K.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===J.MGLYPH||e.tagID===J.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,K.HTML)}_processToken(e){switch(e.type){case _u.CHARACTER:this.onCharacter(e);break;case _u.NULL_CHARACTER:this.onNullCharacter(e);break;case _u.COMMENT:this.onComment(e);break;case _u.DOCTYPE:this.onDoctype(e);break;case _u.START_TAG:this._processStartTag(e);break;case _u.END_TAG:this.onEndTag(e);break;case _u.EOF:this.onEof(e);break;case _u.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){return Gd(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===gd.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=Z.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(J.P),this.openElements.popUntilTagNamePopped(J.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case J.TR:this.insertionMode=Z.IN_ROW;return;case J.TBODY:case J.THEAD:case J.TFOOT:this.insertionMode=Z.IN_TABLE_BODY;return;case J.CAPTION:this.insertionMode=Z.IN_CAPTION;return;case J.COLGROUP:this.insertionMode=Z.IN_COLUMN_GROUP;return;case J.TABLE:this.insertionMode=Z.IN_TABLE;return;case J.BODY:this.insertionMode=Z.IN_BODY;return;case J.FRAMESET:this.insertionMode=Z.IN_FRAMESET;return;case J.SELECT:this._resetInsertionModeForSelect(e);return;case J.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case J.HTML:this.insertionMode=this.headElement?Z.AFTER_HEAD:Z.BEFORE_HEAD;return;case J.TD:case J.TH:if(e>0){this.insertionMode=Z.IN_CELL;return}break;case J.HEAD:if(e>0){this.insertionMode=Z.IN_HEAD;return}}this.insertionMode=Z.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===J.TEMPLATE)break;if(e===J.TABLE){this.insertionMode=Z.IN_SELECT_IN_TABLE;return}}this.insertionMode=Z.IN_SELECT}_isElementCausesFosterParenting(e){return Xd.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case J.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===K.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case J.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return Hu[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)_m(this,e);else switch(this.insertionMode){case Z.INITIAL:ff(this,e);break;case Z.BEFORE_HTML:hf(this,e);break;case Z.BEFORE_HEAD:vf(this,e);break;case Z.IN_HEAD:Sf(this,e);break;case Z.IN_HEAD_NO_SCRIPT:Tf(this,e);break;case Z.AFTER_HEAD:Of(this,e);break;case Z.IN_BODY:case Z.IN_CAPTION:case Z.IN_CELL:case Z.IN_TEMPLATE:jf(this,e);break;case Z.TEXT:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case Z.IN_TABLE:case Z.IN_TABLE_BODY:case Z.IN_ROW:Ep(this,e);break;case Z.IN_TABLE_TEXT:zp(this,e);break;case Z.IN_COLUMN_GROUP:Kp(this,e);break;case Z.AFTER_BODY:cm(this,e);break;case Z.AFTER_AFTER_BODY:mm(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)gm(this,e);else switch(this.insertionMode){case Z.INITIAL:ff(this,e);break;case Z.BEFORE_HTML:hf(this,e);break;case Z.BEFORE_HEAD:vf(this,e);break;case Z.IN_HEAD:Sf(this,e);break;case Z.IN_HEAD_NO_SCRIPT:Tf(this,e);break;case Z.AFTER_HEAD:Of(this,e);break;case Z.TEXT:this._insertCharacters(e);break;case Z.IN_TABLE:case Z.IN_TABLE_BODY:case Z.IN_ROW:Ep(this,e);break;case Z.IN_COLUMN_GROUP:Kp(this,e);break;case Z.AFTER_BODY:cm(this,e);break;case Z.AFTER_AFTER_BODY:mm(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML)sf(this,e);else switch(this.insertionMode){case Z.INITIAL:case Z.BEFORE_HTML:case Z.BEFORE_HEAD:case Z.IN_HEAD:case Z.IN_HEAD_NO_SCRIPT:case Z.AFTER_HEAD:case Z.IN_BODY:case Z.IN_TABLE:case Z.IN_CAPTION:case Z.IN_COLUMN_GROUP:case Z.IN_TABLE_BODY:case Z.IN_ROW:case Z.IN_CELL:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:case Z.IN_TEMPLATE:case Z.IN_FRAMESET:case Z.AFTER_FRAMESET:sf(this,e);break;case Z.IN_TABLE_TEXT:Bp(this,e);break;case Z.AFTER_BODY:cf(this,e);break;case Z.AFTER_AFTER_BODY:case Z.AFTER_AFTER_FRAMESET:lf(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case Z.INITIAL:df(this,e);break;case Z.BEFORE_HEAD:case Z.IN_HEAD:case Z.IN_HEAD_NO_SCRIPT:case Z.AFTER_HEAD:this._err(e,G.misplacedDoctype);break;case Z.IN_TABLE_TEXT:Bp(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,G.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?ym(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case Z.INITIAL:ff(this,e);break;case Z.BEFORE_HTML:pf(this,e);break;case Z.BEFORE_HEAD:gf(this,e);break;case Z.IN_HEAD:yf(this,e);break;case Z.IN_HEAD_NO_SCRIPT:Cf(this,e);break;case Z.AFTER_HEAD:Ef(this,e);break;case Z.IN_BODY:up(this,e);break;case Z.IN_TABLE:Fp(this,e);break;case Z.IN_TABLE_TEXT:Bp(this,e);break;case Z.IN_CAPTION:Hp(this,e);break;case Z.IN_COLUMN_GROUP:Wp(this,e);break;case Z.IN_TABLE_BODY:qp(this,e);break;case Z.IN_ROW:Yp(this,e);break;case Z.IN_CELL:Zp(this,e);break;case Z.IN_SELECT:$p(this,e);break;case Z.IN_SELECT_IN_TABLE:tm(this,e);break;case Z.IN_TEMPLATE:rm(this,e);break;case Z.AFTER_BODY:om(this,e);break;case Z.IN_FRAMESET:lm(this,e);break;case Z.AFTER_FRAMESET:dm(this,e);break;case Z.AFTER_AFTER_BODY:pm(this,e);break;case Z.AFTER_AFTER_FRAMESET:hm(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?bm(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case Z.INITIAL:ff(this,e);break;case Z.BEFORE_HTML:mf(this,e);break;case Z.BEFORE_HEAD:_f(this,e);break;case Z.IN_HEAD:bf(this,e);break;case Z.IN_HEAD_NO_SCRIPT:wf(this,e);break;case Z.AFTER_HEAD:Df(this,e);break;case Z.IN_BODY:Sp(this,e);break;case Z.TEXT:wp(this,e);break;case Z.IN_TABLE:Ip(this,e);break;case Z.IN_TABLE_TEXT:Bp(this,e);break;case Z.IN_CAPTION:Up(this,e);break;case Z.IN_COLUMN_GROUP:Gp(this,e);break;case Z.IN_TABLE_BODY:Jp(this,e);break;case Z.IN_ROW:Xp(this,e);break;case Z.IN_CELL:Qp(this,e);break;case Z.IN_SELECT:em(this,e);break;case Z.IN_SELECT_IN_TABLE:nm(this,e);break;case Z.IN_TEMPLATE:im(this,e);break;case Z.AFTER_BODY:sm(this,e);break;case Z.IN_FRAMESET:um(this,e);break;case Z.AFTER_FRAMESET:fm(this,e);break;case Z.AFTER_AFTER_BODY:mm(this,e)}}onEof(e){switch(this.insertionMode){case Z.INITIAL:ff(this,e);break;case Z.BEFORE_HTML:hf(this,e);break;case Z.BEFORE_HEAD:vf(this,e);break;case Z.IN_HEAD:Sf(this,e);break;case Z.IN_HEAD_NO_SCRIPT:Tf(this,e);break;case Z.AFTER_HEAD:Of(this,e);break;case Z.IN_BODY:case Z.IN_TABLE:case Z.IN_CAPTION:case Z.IN_COLUMN_GROUP:case Z.IN_TABLE_BODY:case Z.IN_ROW:case Z.IN_CELL:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:Cp(this,e);break;case Z.TEXT:Tp(this,e);break;case Z.IN_TABLE_TEXT:Bp(this,e);break;case Z.IN_TEMPLATE:am(this,e);break;case Z.AFTER_BODY:case Z.IN_FRAMESET:case Z.AFTER_FRAMESET:case Z.AFTER_AFTER_BODY:case Z.AFTER_AFTER_FRAMESET:uf(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===W.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode)this._insertCharacters(e);else switch(this.insertionMode){case Z.IN_HEAD:case Z.IN_HEAD_NO_SCRIPT:case Z.AFTER_HEAD:case Z.TEXT:case Z.IN_COLUMN_GROUP:case Z.IN_SELECT:case Z.IN_SELECT_IN_TABLE:case Z.IN_FRAMESET:case Z.AFTER_FRAMESET:this._insertCharacters(e);break;case Z.IN_BODY:case Z.IN_CAPTION:case Z.IN_CELL:case Z.IN_TEMPLATE:case Z.AFTER_BODY:case Z.AFTER_AFTER_BODY:case Z.AFTER_AFTER_FRAMESET:Af(this,e);break;case Z.IN_TABLE:case Z.IN_TABLE_BODY:case Z.IN_ROW:Ep(this,e);break;case Z.IN_TABLE_TEXT:Rp(this,e)}}};function $d(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):xp(e,t),n}function ef(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function tf(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=Jd;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=nf(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function nf(e,t){let 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 rf(e,t,n){let r=Vu(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===J.TEMPLATE&&i===K.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function af(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function of(e,t){for(let n=0;n<qd;n++){let n=$d(e,t);if(!n)break;let r=ef(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=tf(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&rf(e,a,i),af(e,r,n)}}function sf(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function cf(e,t){e._appendCommentNode(t,e.openElements.items[0])}function lf(e,t){e._appendCommentNode(t,e.document)}function uf(e,t){if(e.stopped=!0,t.location){let 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){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function df(e,t){e._setDocumentType(t);let n=t.forceQuirks?zu.QUIRKS:Ad(t);kd(t)||e._err(t,G.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=Z.BEFORE_HTML}function ff(e,t){e._err(t,G.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,zu.QUIRKS),e.insertionMode=Z.BEFORE_HTML,e._processToken(t)}function pf(e,t){t.tagID===J.HTML?(e._insertElement(t,K.HTML),e.insertionMode=Z.BEFORE_HEAD):hf(e,t)}function mf(e,t){let n=t.tagID;(n===J.HTML||n===J.HEAD||n===J.BODY||n===J.BR)&&hf(e,t)}function hf(e,t){e._insertFakeRootElement(),e.insertionMode=Z.BEFORE_HEAD,e._processToken(t)}function gf(e,t){switch(t.tagID){case J.HTML:up(e,t);break;case J.HEAD:e._insertElement(t,K.HTML),e.headElement=e.openElements.current,e.insertionMode=Z.IN_HEAD;break;default:vf(e,t)}}function _f(e,t){let n=t.tagID;n===J.HEAD||n===J.BODY||n===J.HTML||n===J.BR?vf(e,t):e._err(t,G.endTagWithoutMatchingOpenElement)}function vf(e,t){e._insertFakeElement(q.HEAD,J.HEAD),e.headElement=e.openElements.current,e.insertionMode=Z.IN_HEAD,e._processToken(t)}function yf(e,t){switch(t.tagID){case J.HTML:up(e,t);break;case J.BASE:case J.BASEFONT:case J.BGSOUND:case J.LINK:case J.META:e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break;case J.TITLE:e._switchToTextParsing(t,Ku.RCDATA);break;case J.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,Ku.RAWTEXT):(e._insertElement(t,K.HTML),e.insertionMode=Z.IN_HEAD_NO_SCRIPT);break;case J.NOFRAMES:case J.STYLE:e._switchToTextParsing(t,Ku.RAWTEXT);break;case J.SCRIPT:e._switchToTextParsing(t,Ku.SCRIPT_DATA);break;case J.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=Z.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(Z.IN_TEMPLATE);break;case J.HEAD:e._err(t,G.misplacedStartTagForHeadElement);break;default:Sf(e,t)}}function bf(e,t){switch(t.tagID){case J.HEAD:e.openElements.pop(),e.insertionMode=Z.AFTER_HEAD;break;case J.BODY:case J.BR:case J.HTML:Sf(e,t);break;case J.TEMPLATE:xf(e,t);break;default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function xf(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==J.TEMPLATE&&e._err(t,G.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(J.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,G.endTagWithoutMatchingOpenElement)}function Sf(e,t){e.openElements.pop(),e.insertionMode=Z.AFTER_HEAD,e._processToken(t)}function Cf(e,t){switch(t.tagID){case J.HTML:up(e,t);break;case J.BASEFONT:case J.BGSOUND:case J.HEAD:case J.LINK:case J.META:case J.NOFRAMES:case J.STYLE:yf(e,t);break;case J.NOSCRIPT:e._err(t,G.nestedNoscriptInHead);break;default:Tf(e,t)}}function wf(e,t){switch(t.tagID){case J.NOSCRIPT:e.openElements.pop(),e.insertionMode=Z.IN_HEAD;break;case J.BR:Tf(e,t);break;default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function Tf(e,t){let n=t.type===_u.EOF?G.openElementsLeftAfterEof:G.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=Z.IN_HEAD,e._processToken(t)}function Ef(e,t){switch(t.tagID){case J.HTML:up(e,t);break;case J.BODY:e._insertElement(t,K.HTML),e.framesetOk=!1,e.insertionMode=Z.IN_BODY;break;case J.FRAMESET:e._insertElement(t,K.HTML),e.insertionMode=Z.IN_FRAMESET;break;case J.BASE:case J.BASEFONT:case J.BGSOUND:case J.LINK:case J.META:case J.NOFRAMES:case J.SCRIPT:case J.STYLE:case J.TEMPLATE:case J.TITLE:e._err(t,G.abandonedHeadElementChild),e.openElements.push(e.headElement,J.HEAD),yf(e,t),e.openElements.remove(e.headElement);break;case J.HEAD:e._err(t,G.misplacedStartTagForHeadElement);break;default:Of(e,t)}}function Df(e,t){switch(t.tagID){case J.BODY:case J.HTML:case J.BR:Of(e,t);break;case J.TEMPLATE:xf(e,t);break;default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function Of(e,t){e._insertFakeElement(q.BODY,J.BODY),e.insertionMode=Z.IN_BODY,kf(e,t)}function kf(e,t){switch(t.type){case _u.CHARACTER:jf(e,t);break;case _u.WHITESPACE_CHARACTER:Af(e,t);break;case _u.COMMENT:sf(e,t);break;case _u.START_TAG:up(e,t);break;case _u.END_TAG:Sp(e,t);break;case _u.EOF:Cp(e,t)}}function Af(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function jf(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Mf(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Nf(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Pf(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_FRAMESET)}function Ff(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML)}function If(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Uu.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,K.HTML)}function Lf(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Rf(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML),n||(e.formElement=e.openElements.current))}function zf(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===J.LI&&r===J.LI||(n===J.DD||n===J.DT)&&(r===J.DD||r===J.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==J.ADDRESS&&r!==J.DIV&&r!==J.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML)}function Bf(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.tokenizer.state=Ku.PLAINTEXT}function Vf(e,t){e.openElements.hasInScope(J.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(J.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.framesetOk=!1}function Hf(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(q.A);n&&(of(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Uf(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Wf(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(J.NOBR)&&(of(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Gf(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Kf(e,t){e.treeAdapter.getDocumentMode(e.document)!==zu.QUIRKS&&e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.framesetOk=!1,e.insertionMode=Z.IN_TABLE}function qf(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,K.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Jf(e){let t=vu(e,Ru.TYPE);return t!=null&&t.toLowerCase()===Kd}function Yf(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,K.HTML),Jf(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Xf(e,t){e._appendElement(t,K.HTML),t.ackSelfClosing=!0}function Zf(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._appendElement(t,K.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Qf(e,t){t.tagName=q.IMG,t.tagID=J.IMG,qf(e,t)}function $f(e,t){e._insertElement(t,K.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ku.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=Z.TEXT}function ep(e,t){e.openElements.hasInButtonScope(J.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ku.RAWTEXT)}function tp(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ku.RAWTEXT)}function np(e,t){e._switchToTextParsing(t,Ku.RAWTEXT)}function rp(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===Z.IN_TABLE||e.insertionMode===Z.IN_CAPTION||e.insertionMode===Z.IN_TABLE_BODY||e.insertionMode===Z.IN_ROW||e.insertionMode===Z.IN_CELL?Z.IN_SELECT_IN_TABLE:Z.IN_SELECT}function ip(e,t){e.openElements.currentTagId===J.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML)}function ap(e,t){e.openElements.hasInScope(J.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,K.HTML)}function op(e,t){e.openElements.hasInScope(J.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(J.RTC),e._insertElement(t,K.HTML)}function sp(e,t){e._reconstructActiveFormattingElements(),zd(t),Vd(t),t.selfClosing?e._appendElement(t,K.MATHML):e._insertElement(t,K.MATHML),t.ackSelfClosing=!0}function cp(e,t){e._reconstructActiveFormattingElements(),Bd(t),Vd(t),t.selfClosing?e._appendElement(t,K.SVG):e._insertElement(t,K.SVG),t.ackSelfClosing=!0}function lp(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML)}function up(e,t){switch(t.tagID){case J.I:case J.S:case J.B:case J.U:case J.EM:case J.TT:case J.BIG:case J.CODE:case J.FONT:case J.SMALL:case J.STRIKE:case J.STRONG:Uf(e,t);break;case J.A:Hf(e,t);break;case J.H1:case J.H2:case J.H3:case J.H4:case J.H5:case J.H6:If(e,t);break;case J.P:case J.DL:case J.OL:case J.UL:case J.DIV:case J.DIR:case J.NAV:case J.MAIN:case J.MENU:case J.ASIDE:case J.CENTER:case J.FIGURE:case J.FOOTER:case J.HEADER:case J.HGROUP:case J.DIALOG:case J.DETAILS:case J.ADDRESS:case J.ARTICLE:case J.SEARCH:case J.SECTION:case J.SUMMARY:case J.FIELDSET:case J.BLOCKQUOTE:case J.FIGCAPTION:Ff(e,t);break;case J.LI:case J.DD:case J.DT:zf(e,t);break;case J.BR:case J.IMG:case J.WBR:case J.AREA:case J.EMBED:case J.KEYGEN:qf(e,t);break;case J.HR:Zf(e,t);break;case J.RB:case J.RTC:ap(e,t);break;case J.RT:case J.RP:op(e,t);break;case J.PRE:case J.LISTING:Lf(e,t);break;case J.XMP:ep(e,t);break;case J.SVG:cp(e,t);break;case J.HTML:Mf(e,t);break;case J.BASE:case J.LINK:case J.META:case J.STYLE:case J.TITLE:case J.SCRIPT:case J.BGSOUND:case J.BASEFONT:case J.TEMPLATE:yf(e,t);break;case J.BODY:Nf(e,t);break;case J.FORM:Rf(e,t);break;case J.NOBR:Wf(e,t);break;case J.MATH:sp(e,t);break;case J.TABLE:Kf(e,t);break;case J.INPUT:Yf(e,t);break;case J.PARAM:case J.TRACK:case J.SOURCE:Xf(e,t);break;case J.IMAGE:Qf(e,t);break;case J.BUTTON:Vf(e,t);break;case J.APPLET:case J.OBJECT:case J.MARQUEE:Gf(e,t);break;case J.IFRAME:tp(e,t);break;case J.SELECT:rp(e,t);break;case J.OPTION:case J.OPTGROUP:ip(e,t);break;case J.NOEMBED:case J.NOFRAMES:np(e,t);break;case J.FRAMESET:Pf(e,t);break;case J.TEXTAREA:$f(e,t);break;case J.NOSCRIPT:e.options.scriptingEnabled?np(e,t):lp(e,t);break;case J.PLAINTEXT:Bf(e,t);break;case J.COL:case J.TH:case J.TD:case J.TR:case J.HEAD:case J.FRAME:case J.TBODY:case J.TFOOT:case J.THEAD:case J.CAPTION:case J.COLGROUP:break;default:lp(e,t)}}function dp(e,t){if(e.openElements.hasInScope(J.BODY)&&(e.insertionMode=Z.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function fp(e,t){e.openElements.hasInScope(J.BODY)&&(e.insertionMode=Z.AFTER_BODY,sm(e,t))}function pp(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function mp(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(J.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(J.FORM):n&&e.openElements.remove(n))}function hp(e){e.openElements.hasInButtonScope(J.P)||e._insertFakeElement(q.P,J.P),e._closePElement()}function gp(e){e.openElements.hasInListItemScope(J.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(J.LI),e.openElements.popUntilTagNamePopped(J.LI))}function _p(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function vp(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function yp(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function bp(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(q.BR,J.BR),e.openElements.pop(),e.framesetOk=!1}function xp(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==J.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function Sp(e,t){switch(t.tagID){case J.A:case J.B:case J.I:case J.S:case J.U:case J.EM:case J.TT:case J.BIG:case J.CODE:case J.FONT:case J.NOBR:case J.SMALL:case J.STRIKE:case J.STRONG:of(e,t);break;case J.P:hp(e);break;case J.DL:case J.UL:case J.OL:case J.DIR:case J.DIV:case J.NAV:case J.PRE:case J.MAIN:case J.MENU:case J.ASIDE:case J.BUTTON:case J.CENTER:case J.FIGURE:case J.FOOTER:case J.HEADER:case J.HGROUP:case J.DIALOG:case J.ADDRESS:case J.ARTICLE:case J.DETAILS:case J.SEARCH:case J.SECTION:case J.SUMMARY:case J.LISTING:case J.FIELDSET:case J.BLOCKQUOTE:case J.FIGCAPTION:pp(e,t);break;case J.LI:gp(e);break;case J.DD:case J.DT:_p(e,t);break;case J.H1:case J.H2:case J.H3:case J.H4:case J.H5:case J.H6:vp(e);break;case J.BR:bp(e);break;case J.BODY:dp(e,t);break;case J.HTML:fp(e,t);break;case J.FORM:mp(e);break;case J.APPLET:case J.OBJECT:case J.MARQUEE:yp(e,t);break;case J.TEMPLATE:xf(e,t);break;default:xp(e,t)}}function Cp(e,t){e.tmplInsertionModeStack.length>0?am(e,t):uf(e,t)}function wp(e,t){var n;t.tagID===J.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Tp(e,t){e._err(t,G.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ep(e,t){if(e.openElements.currentTagId!==void 0&&Xd.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=Z.IN_TABLE_TEXT,t.type){case _u.CHARACTER:zp(e,t);break;case _u.WHITESPACE_CHARACTER:Rp(e,t)}else Lp(e,t)}function Dp(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_CAPTION}function Op(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_COLUMN_GROUP}function kp(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(q.COLGROUP,J.COLGROUP),e.insertionMode=Z.IN_COLUMN_GROUP,Wp(e,t)}function Ap(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_TABLE_BODY}function jp(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(q.TBODY,J.TBODY),e.insertionMode=Z.IN_TABLE_BODY,qp(e,t)}function Mp(e,t){e.openElements.hasInTableScope(J.TABLE)&&(e.openElements.popUntilTagNamePopped(J.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Np(e,t){Jf(t)?e._appendElement(t,K.HTML):Lp(e,t),t.ackSelfClosing=!0}function Pp(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,K.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Fp(e,t){switch(t.tagID){case J.TD:case J.TH:case J.TR:jp(e,t);break;case J.STYLE:case J.SCRIPT:case J.TEMPLATE:yf(e,t);break;case J.COL:kp(e,t);break;case J.FORM:Pp(e,t);break;case J.TABLE:Mp(e,t);break;case J.TBODY:case J.TFOOT:case J.THEAD:Ap(e,t);break;case J.INPUT:Np(e,t);break;case J.CAPTION:Dp(e,t);break;case J.COLGROUP:Op(e,t);break;default:Lp(e,t)}}function Ip(e,t){switch(t.tagID){case J.TABLE:e.openElements.hasInTableScope(J.TABLE)&&(e.openElements.popUntilTagNamePopped(J.TABLE),e._resetInsertionMode());break;case J.TEMPLATE:xf(e,t);break;case J.BODY:case J.CAPTION:case J.COL:case J.COLGROUP:case J.HTML:case J.TBODY:case J.TD:case J.TFOOT:case J.TH:case J.THEAD:case J.TR:break;default:Lp(e,t)}}function Lp(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,kf(e,t),e.fosterParentingEnabled=n}function Rp(e,t){e.pendingCharacterTokens.push(t)}function zp(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Bp(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Lp(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var Vp=new Set([J.CAPTION,J.COL,J.COLGROUP,J.TBODY,J.TD,J.TFOOT,J.TH,J.THEAD,J.TR]);function Hp(e,t){let n=t.tagID;Vp.has(n)?e.openElements.hasInTableScope(J.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(J.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Z.IN_TABLE,Fp(e,t)):up(e,t)}function Up(e,t){let n=t.tagID;switch(n){case J.CAPTION:case J.TABLE:e.openElements.hasInTableScope(J.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(J.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Z.IN_TABLE,n===J.TABLE&&Ip(e,t));break;case J.BODY:case J.COL:case J.COLGROUP:case J.HTML:case J.TBODY:case J.TD:case J.TFOOT:case J.TH:case J.THEAD:case J.TR:break;default:Sp(e,t)}}function Wp(e,t){switch(t.tagID){case J.HTML:up(e,t);break;case J.COL:e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break;case J.TEMPLATE:yf(e,t);break;default:Kp(e,t)}}function Gp(e,t){switch(t.tagID){case J.COLGROUP:e.openElements.currentTagId===J.COLGROUP&&(e.openElements.pop(),e.insertionMode=Z.IN_TABLE);break;case J.TEMPLATE:xf(e,t);break;case J.COL:break;default:Kp(e,t)}}function Kp(e,t){e.openElements.currentTagId===J.COLGROUP&&(e.openElements.pop(),e.insertionMode=Z.IN_TABLE,e._processToken(t))}function qp(e,t){switch(t.tagID){case J.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_ROW;break;case J.TH:case J.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(q.TR,J.TR),e.insertionMode=Z.IN_ROW,Yp(e,t);break;case J.CAPTION:case J.COL:case J.COLGROUP:case J.TBODY:case J.TFOOT:case J.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE,Fp(e,t));break;default:Fp(e,t)}}function Jp(e,t){let n=t.tagID;switch(t.tagID){case J.TBODY:case J.TFOOT:case J.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE);break;case J.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE,Ip(e,t));break;case J.BODY:case J.CAPTION:case J.COL:case J.COLGROUP:case J.HTML:case J.TD:case J.TH:case J.TR:break;default:Ip(e,t)}}function Yp(e,t){switch(t.tagID){case J.TH:case J.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,K.HTML),e.insertionMode=Z.IN_CELL,e.activeFormattingElements.insertMarker();break;case J.CAPTION:case J.COL:case J.COLGROUP:case J.TBODY:case J.TFOOT:case J.THEAD:case J.TR:e.openElements.hasInTableScope(J.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY,qp(e,t));break;default:Fp(e,t)}}function Xp(e,t){switch(t.tagID){case J.TR:e.openElements.hasInTableScope(J.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY);break;case J.TABLE:e.openElements.hasInTableScope(J.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY,Jp(e,t));break;case J.TBODY:case J.TFOOT:case J.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(J.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Z.IN_TABLE_BODY,Jp(e,t));break;case J.BODY:case J.CAPTION:case J.COL:case J.COLGROUP:case J.HTML:case J.TD:case J.TH:break;default:Ip(e,t)}}function Zp(e,t){let n=t.tagID;Vp.has(n)?(e.openElements.hasInTableScope(J.TD)||e.openElements.hasInTableScope(J.TH))&&(e._closeTableCell(),Yp(e,t)):up(e,t)}function Qp(e,t){let n=t.tagID;switch(n){case J.TD:case J.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Z.IN_ROW);break;case J.TABLE:case J.TBODY:case J.TFOOT:case J.THEAD:case J.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Xp(e,t));break;case J.BODY:case J.CAPTION:case J.COL:case J.COLGROUP:case J.HTML:break;default:Sp(e,t)}}function $p(e,t){switch(t.tagID){case J.HTML:up(e,t);break;case J.OPTION:e.openElements.currentTagId===J.OPTION&&e.openElements.pop(),e._insertElement(t,K.HTML);break;case J.OPTGROUP:e.openElements.currentTagId===J.OPTION&&e.openElements.pop(),e.openElements.currentTagId===J.OPTGROUP&&e.openElements.pop(),e._insertElement(t,K.HTML);break;case J.HR:e.openElements.currentTagId===J.OPTION&&e.openElements.pop(),e.openElements.currentTagId===J.OPTGROUP&&e.openElements.pop(),e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break;case J.INPUT:case J.KEYGEN:case J.TEXTAREA:case J.SELECT:e.openElements.hasInSelectScope(J.SELECT)&&(e.openElements.popUntilTagNamePopped(J.SELECT),e._resetInsertionMode(),t.tagID!==J.SELECT&&e._processStartTag(t));break;case J.SCRIPT:case J.TEMPLATE:yf(e,t)}}function em(e,t){switch(t.tagID){case J.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===J.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===J.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===J.OPTGROUP&&e.openElements.pop();break;case J.OPTION:e.openElements.currentTagId===J.OPTION&&e.openElements.pop();break;case J.SELECT:e.openElements.hasInSelectScope(J.SELECT)&&(e.openElements.popUntilTagNamePopped(J.SELECT),e._resetInsertionMode());break;case J.TEMPLATE:xf(e,t)}}function tm(e,t){let n=t.tagID;n===J.CAPTION||n===J.TABLE||n===J.TBODY||n===J.TFOOT||n===J.THEAD||n===J.TR||n===J.TD||n===J.TH?(e.openElements.popUntilTagNamePopped(J.SELECT),e._resetInsertionMode(),e._processStartTag(t)):$p(e,t)}function nm(e,t){let n=t.tagID;n===J.CAPTION||n===J.TABLE||n===J.TBODY||n===J.TFOOT||n===J.THEAD||n===J.TR||n===J.TD||n===J.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(J.SELECT),e._resetInsertionMode(),e.onEndTag(t)):em(e,t)}function rm(e,t){switch(t.tagID){case J.BASE:case J.BASEFONT:case J.BGSOUND:case J.LINK:case J.META:case J.NOFRAMES:case J.SCRIPT:case J.STYLE:case J.TEMPLATE:case J.TITLE:yf(e,t);break;case J.CAPTION:case J.COLGROUP:case J.TBODY:case J.TFOOT:case J.THEAD:e.tmplInsertionModeStack[0]=Z.IN_TABLE,e.insertionMode=Z.IN_TABLE,Fp(e,t);break;case J.COL:e.tmplInsertionModeStack[0]=Z.IN_COLUMN_GROUP,e.insertionMode=Z.IN_COLUMN_GROUP,Wp(e,t);break;case J.TR:e.tmplInsertionModeStack[0]=Z.IN_TABLE_BODY,e.insertionMode=Z.IN_TABLE_BODY,qp(e,t);break;case J.TD:case J.TH:e.tmplInsertionModeStack[0]=Z.IN_ROW,e.insertionMode=Z.IN_ROW,Yp(e,t);break;default:e.tmplInsertionModeStack[0]=Z.IN_BODY,e.insertionMode=Z.IN_BODY,up(e,t)}}function im(e,t){t.tagID===J.TEMPLATE&&xf(e,t)}function am(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(J.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):uf(e,t)}function om(e,t){t.tagID===J.HTML?up(e,t):cm(e,t)}function sm(e,t){if(t.tagID===J.HTML){if(e.fragmentContext||(e.insertionMode=Z.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===J.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else cm(e,t)}function cm(e,t){e.insertionMode=Z.IN_BODY,kf(e,t)}function lm(e,t){switch(t.tagID){case J.HTML:up(e,t);break;case J.FRAMESET:e._insertElement(t,K.HTML);break;case J.FRAME:e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break;case J.NOFRAMES:yf(e,t)}}function um(e,t){t.tagID===J.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==J.FRAMESET&&(e.insertionMode=Z.AFTER_FRAMESET))}function dm(e,t){switch(t.tagID){case J.HTML:up(e,t);break;case J.NOFRAMES:yf(e,t)}}function fm(e,t){t.tagID===J.HTML&&(e.insertionMode=Z.AFTER_AFTER_FRAMESET)}function pm(e,t){t.tagID===J.HTML?up(e,t):mm(e,t)}function mm(e,t){e.insertionMode=Z.IN_BODY,kf(e,t)}function hm(e,t){switch(t.tagID){case J.HTML:up(e,t);break;case J.NOFRAMES:yf(e,t)}}function gm(e,t){t.chars=`�`,e._insertCharacters(t)}function _m(e,t){e._insertCharacters(t),e.framesetOk=!1}function vm(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==K.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function ym(e,t){if(Rd(t))vm(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===K.MATHML?zd(t):r===K.SVG&&(Hd(t),Bd(t)),Vd(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function bm(e,t){if(t.tagID===J.P||t.tagID===J.BR)vm(e),e._endTagOutsideForeignContent(t);else for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===K.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}function xm(e){return e===34?`"`:e===38?`&`:e===39?`'`:e===60?`<`:e===62?`>`:` `}function Sm(e,t){if(e.lastIndex=0,!e.test(t))return t;let n=``,r=0;do{let i=e.lastIndex-1;r!==i&&(n+=t.substring(r,i));let a=t.charCodeAt(i);n+=xm(a),r=i+1}while(e.test(t));return n+t.substring(r)}var Cm=/["&\u{A0}]/gu;function wm(e){return Sm(Cm,e)}var Tm=/[&<>\u{A0}]/gu;function Em(e){return Sm(Tm,e)}var Dm=new Set([q.AREA,q.BASE,q.BASEFONT,q.BGSOUND,q.BR,q.COL,q.EMBED,q.FRAME,q.HR,q.IMG,q.INPUT,q.KEYGEN,q.LINK,q.META,q.PARAM,q.SOURCE,q.TRACK,q.WBR]);function Om(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===K.HTML&&Dm.has(t.treeAdapter.getTagName(e))}var km={treeAdapter:yd,scriptingEnabled:!0};function Am(e,t){return Mm(e,{...km,...t})}function jm(e,t){let n=``,r=t.treeAdapter.isElementNode(e)&&t.treeAdapter.getTagName(e)===q.TEMPLATE&&t.treeAdapter.getNamespaceURI(e)===K.HTML?t.treeAdapter.getTemplateContent(e):e,i=t.treeAdapter.getChildNodes(r);if(i)for(let e of i)n+=Mm(e,t);return n}function Mm(e,t){return t.treeAdapter.isElementNode(e)?Nm(e,t):t.treeAdapter.isTextNode(e)?Fm(e,t):t.treeAdapter.isCommentNode(e)?Im(e,t):t.treeAdapter.isDocumentTypeNode(e)?Lm(e,t):``}function Nm(e,t){let n=t.treeAdapter.getTagName(e);return`<${n}${Pm(e,t)}>${Om(e,t)?``:`${jm(e,t)}</${n}>`}`}function Pm(e,{treeAdapter:t}){let n=``;for(let r of t.getAttrList(e)){if(n+=` `,r.namespace)switch(r.namespace){case K.XML:n+=`xml:${r.name}`;break;case K.XMLNS:r.name!==`xmlns`&&(n+=`xmlns:`),n+=r.name;break;case K.XLINK:n+=`xlink:${r.name}`;break;default:n+=`${r.prefix}:${r.name}`}else n+=r.name;n+=`="${wm(r.value)}"`}return n}function Fm(e,t){let{treeAdapter:n}=t,r=n.getTextNodeContent(e),i=n.getParentNode(e),a=i&&n.isElementNode(i)&&n.getTagName(i);return a&&n.getNamespaceURI(i)===K.HTML&&Gu(a,t.scriptingEnabled)?r:Em(r)}function Im(e,{treeAdapter:t}){return`<!--${t.getCommentNodeContent(e)}-->`}function Lm(e,{treeAdapter:t}){return`<!DOCTYPE ${t.getDocumentTypeNodeName(e)}>`}function Rm(e,t){return Qd.parse(e,t)}function zm(e,t,n){typeof e==`string`&&(n=t,t=e,e=null);let r=Qd.getFragmentParser(e,n);return r.tokenizer.write(t,!0),r.getFragment()}var Bm=`local-draft-2`,Vm={kind:`string`,static:!0},Hm={kind:`string`,static:!0},Um={kind:`number`,static:!0},Wm={kind:`boolean`,static:!0},Gm={kind:`boolean`,dynamic:!0,default:!1},Km={kind:`string`},qm={kind:`string`,static:!0},Jm={kind:`string`},Ym={kind:`string`},Xm=()=>({kind:`string`,static:!0,color:!0}),Zm=(e={})=>({kind:`number`,...e}),Qm=[{name:`input`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`string`,required:!1,family:`text`},initialRule:`empty`,props:{label:Km,bind:Vm,initial:Hm,type:{kind:`enum`,static:!0,values:[`text`,`email`],default:`text`},placeholder:{kind:`string`},required:{kind:`boolean`,default:!1},"min-length":Zm({integer:!0,min:0,default:0}),"max-length":Zm({integer:!0,min:0}),disabled:Gm}},{name:`textarea`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`string`,required:!1,family:`text`},initialRule:`empty`,props:{label:Km,bind:Vm,initial:Hm,placeholder:{kind:`string`},rows:Zm({integer:!0,positive:!0,default:4}),required:{kind:`boolean`,default:!1},"min-length":Zm({integer:!0,min:0,default:0}),"max-length":Zm({integer:!0,min:0}),disabled:Gm}},{name:`number`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`number`,required:!1,family:`number`},initialRule:`nearest-zero`,props:{label:Km,bind:Vm,initial:Um,min:Zm(),max:Zm(),step:Zm({positive:!0,default:1}),disabled:Gm}},{name:`slider`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`number`,required:!1,family:`number`},initialRule:`min`,props:{label:Km,bind:Vm,initial:Um,min:Zm({default:0}),max:Zm({default:100}),step:Zm({positive:!0,default:1}),disabled:Gm,color:Xm()}},{name:`range-slider`,form:`leaf`,childRule:`none`,label:`required`,slots:[{name:`start`,bind:`bind-start`,initial:`initial-start`,kind:`number`,family:`number`,exclusive:!0,initialRule:`min`},{name:`end`,bind:`bind-end`,initial:`initial-end`,kind:`number`,family:`number`,exclusive:!0,initialRule:`max-step`}],props:{label:Km,"bind-start":Vm,"bind-end":Vm,"initial-start":Um,"initial-end":Um,min:Zm({default:0}),max:Zm({default:100}),step:Zm({positive:!0,default:1}),disabled:Gm,color:Xm()}},{name:`coordinate`,form:`leaf`,childRule:`none`,label:`required`,slots:[{name:`x`,bind:`bind-x`,initial:`initial-x`,kind:`number`,family:`number`,exclusive:!0,initialRule:`nearest-zero`},{name:`y`,bind:`bind-y`,initial:`initial-y`,kind:`number`,family:`number`,exclusive:!0,initialRule:`nearest-zero`}],props:{label:Km,"bind-x":Vm,"bind-y":Vm,"initial-x":Um,"initial-y":Um,"x-min":Zm({default:-5}),"x-max":Zm({default:5}),"y-min":Zm({default:-5}),"y-max":Zm({default:5}),step:Zm({positive:!0,default:1}),disabled:Gm,color:Xm()}},{name:`toggle`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`boolean`,required:!1,family:`boolean`},initialRule:`false`,props:{label:Km,bind:Vm,initial:Wm,disabled:Gm,color:Xm()}},{name:`checkbox`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`boolean`,required:!1,family:`boolean`},initialRule:`false`,props:{label:Km,bind:Vm,initial:Wm,disabled:Gm,color:Xm()}},{name:`date`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`string`,required:!1,family:`date`},initialRule:`empty`,props:{label:Km,bind:Vm,initial:Hm,min:{kind:`string`,static:!0},max:{kind:`string`,static:!0},required:{kind:`boolean`,default:!1},disabled:Gm}},{name:`select`,form:`container`,childRule:`options`,label:`required`,binding:{kind:`string`,required:!1,family:`choice`},initialRule:`first-option`,props:{label:Km,bind:Vm,initial:Hm,disabled:Gm,color:Xm()}},{name:`choices`,form:`container`,childRule:`options`,label:`required`,binding:{kind:`string`,required:!1,family:`choice`},initialRule:`first-option`,props:{label:Km,bind:Vm,initial:Hm,disabled:Gm,color:Xm()}},{name:`radio-group`,form:`container`,childRule:`options`,label:`required`,binding:{kind:`string`,required:!1,family:`choice`},initialRule:`first-option`,props:{label:Km,bind:Vm,initial:Hm,disabled:Gm,color:Xm()}},{name:`multi-select`,form:`container`,childRule:`options`,label:`required`,binding:{kind:`array`,required:!1,family:`multi-select`,exclusive:!0},initialRule:`empty-array`,props:{label:Km,bind:Vm,initial:Hm,"max-selected":Zm({integer:!0,min:0}),disabled:Gm,color:Xm()}},{name:`option`,form:`container`,childRule:`inline`,label:`none`,parent:[`select`,`choices`,`radio-group`,`multi-select`,`quiz`],props:{value:{kind:`string`,static:!0,required:!0}}},{name:`counter`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`number`,required:!1,family:`number`},initialRule:`nearest-zero`,props:{label:Km,bind:Vm,initial:Um,min:Zm({default:0}),max:Zm(),step:Zm({positive:!0,default:1}),disabled:Gm}},{name:`timer`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`number`,required:!1,family:`timer`,exclusive:!0},initialRule:`duration`,props:{label:Km,bind:Vm,duration:Zm({integer:!0,positive:!0,default:60})}},{name:`checklist`,form:`container`,childRule:`content`,label:`required`,binding:{kind:`array`,required:!1,family:`checklist`,exclusive:!0},initialRule:`checked`,props:{label:Km,bind:Vm,disabled:Gm,color:Xm()}},{name:`progress`,form:`leaf`,childRule:`none`,label:`required`,props:{label:Km,value:{kind:`number`,dynamic:!0,required:!0},max:Zm({positive:!0,default:100}),color:Xm()}},{name:`jump`,form:`inline`,childRule:`inline`,label:`none`,props:{to:{kind:`string`,static:!0,required:!0},appearance:{kind:`enum`,static:!0,values:[`link`,`button`],default:`link`},color:Xm()}},{name:`anchor`,form:`leaf`,childRule:`none`,label:`none`,props:{id:{kind:`string`,static:!0,required:!0}}},{name:`text`,form:`inline`,childRule:`inline`,label:`none`,props:{color:{kind:`string`,static:!0,required:!0,color:!0}}},{name:`section`,form:`container`,childRule:`any`,label:`none`,props:{color:{kind:`string`,static:!0,required:!0,color:!0}}},{name:`quiz`,form:`container`,childRule:`quiz`,label:`required`,props:{type:{kind:`enum`,static:!0,values:[`choice`,`number`],default:`choice`},label:Km,answer:{kind:`string`,static:!0,required:!0},explanation:{kind:`string`},tolerance:Zm({min:0,default:0}),disabled:Gm}},{name:`panel`,form:`container`,childRule:`any`,label:`none`,props:{title:Ym,reset:{kind:`boolean`,default:!0}}},{name:`card`,form:`container`,childRule:`any`,label:`none`,props:{title:Ym}},{name:`grid`,form:`container`,childRule:`cards`,label:`none`,props:{columns:Zm({integer:!0,min:1,max:4,default:2})}},{name:`tabs`,form:`container`,childRule:`tabs`,label:`optional`,binding:{kind:`string`,required:!1,family:`tabs`,exclusive:!0},initialRule:`first-tab`,props:{label:Jm,bind:Vm,initial:Hm}},{name:`tab`,form:`container`,childRule:`any`,label:`required`,parent:[`tabs`],props:{label:Km,value:{kind:`string`,static:!0}}},{name:`steps`,form:`container`,childRule:`steps`,label:`optional`,binding:{kind:`string`,required:!1,family:`steps`,exclusive:!0},initialRule:`first-step`,props:{label:Jm,bind:Vm,initial:Hm}},{name:`step`,form:`container`,childRule:`any`,label:`required`,parent:[`steps`],props:{label:Km,value:{kind:`string`,static:!0}}},{name:`accordion`,form:`container`,childRule:`disclosures`,label:`optional`,props:{label:Jm}},{name:`disclosure`,form:`container`,childRule:`any`,label:`required`,parent:[`accordion`],props:{label:Km,open:{kind:`boolean`,default:!1}}},{name:`if`,form:`container`,childRule:`any`,label:`none`,props:{when:{kind:`boolean`,dynamic:!0,required:!0}}},{name:`alert`,form:`container`,childRule:`any`,label:`none`,props:{title:Ym,tone:{kind:`enum`,dynamic:!0,values:[`info`,`success`,`warning`],default:`info`}}},{name:`badge`,form:`inline`,childRule:`inline`,label:`none`,props:{tone:{kind:`enum`,dynamic:!0,values:[`neutral`,`success`,`warning`],default:`neutral`},color:Xm()}},{name:`tooltip`,form:`inline`,childRule:`inline`,label:`none`,props:{text:{kind:`string`,required:!0}}},{name:`computed`,form:`leaf`,childRule:`none`,label:`none`,props:{name:{kind:`string`,static:!0,required:!0},value:{kind:`string`,required:!0}}},{name:`const`,form:`leaf`,childRule:`none`,label:`none`,props:{name:{kind:`string`,static:!0,required:!0},value:{kind:`string`,required:!0}}},{name:`validation`,form:`leaf`,childRule:`none`,label:`none`,props:{when:{kind:`boolean`,dynamic:!0,required:!0},message:{kind:`string`,required:!0},fields:{kind:`string`,static:!0,required:!0}}},{name:`data-table`,form:`container`,childRule:`columns`,label:`required`,props:{label:qm,rows:{kind:`string`,required:!0},key:{kind:`string`,required:!0},"max-rows":Zm({integer:!0,positive:!0,max:A,default:100})}},{name:`column`,form:`leaf`,childRule:`none`,label:`none`,parent:[`data-table`],props:{label:{kind:`string`,static:!0,required:!0},value:{kind:`string`,required:!0}}},{name:`table`,form:`container`,childRule:`table`,label:`optional`,binding:{kind:`string`,required:!1,family:`selection`},initialRule:`none`,props:{label:Jm,searchable:{kind:`boolean`,default:!0},sortable:{kind:`boolean`,default:!0},"page-size":Zm({integer:!0,positive:!0,default:10}),bind:Vm,key:{kind:`string`,static:!0},initial:Hm}},{name:`chart`,form:`container`,childRule:`table`,label:`none`,binding:{kind:`string`,required:!1,family:`selection`},initialRule:`none`,props:{kind:{kind:`enum`,static:!0,values:[`bar`,`line`,`area`,`scatter`,`donut`],default:`bar`},title:Ym,x:{kind:`string`,static:!0},y:{kind:`string`,static:!0},"x-label":{kind:`string`},"y-label":{kind:`string`},bind:Vm,key:{kind:`string`,static:!0},initial:Hm}},{name:`plot`,form:`container`,childRule:`plot`,label:`optional`,props:{label:Jm,min:{kind:`number`,dynamic:!0,default:-10},max:{kind:`number`,dynamic:!0,default:10},samples:Zm({integer:!0,min:2,max:2e3,static:!0,default:200}),"x-label":{kind:`string`,default:`x`},"y-label":{kind:`string`,default:`y`}}},{name:`timeline`,form:`container`,childRule:`table`,label:`none`,props:{title:Ym,unit:{kind:`string`,default:`minutes`}}},{name:`diagram`,form:`container`,childRule:`diagram`,label:`optional`,binding:{kind:`string`,required:!1,family:`diagram`,exclusive:!0},initialRule:`first-node`,props:{label:Jm,bind:Vm,initial:Hm,direction:{kind:`enum`,static:!0,values:[`right`,`down`],default:`right`}}},{name:`node`,form:`container`,childRule:`content`,label:`required`,parent:[`diagram`],props:{id:{kind:`string`,static:!0,required:!0},label:Km,tone:{kind:`enum`,dynamic:!0,values:[`neutral`,`success`,`warning`],default:`neutral`}}},{name:`edge`,form:`leaf`,childRule:`none`,label:`none`,parent:[`diagram`],props:{from:{kind:`string`,static:!0,required:!0},to:{kind:`string`,static:!0,required:!0},label:Jm}}],$m=Object.freeze(Object.fromEntries(Qm.map(e=>[e.name,Object.freeze(e)]))),eh=Object.freeze(Qm.map(e=>e.name)),th=Object.freeze({leaf:Object.freeze(Qm.filter(e=>e.form===`leaf`).map(e=>e.name)),inline:Object.freeze(Qm.filter(e=>e.form===`inline`).map(e=>e.name)),container:Object.freeze(Qm.filter(e=>e.form===`container`).map(e=>e.name))});function nh(e){return th[e]}function rh(e){return Object.hasOwn($m,e)?$m[e]:void 0}function ih(e,t){let n=Array.from({length:t.length+1},(e,t)=>t);for(let r=1;r<=e.length;r++){let i=n[0];n[0]=r;for(let a=1;a<=t.length;a++){let o=n[a];n[a]=Math.min(n[a]+1,n[a-1]+1,i+(e[r-1]===t[a-1]?0:1)),i=o}}return n[t.length]}function ah(e,t){let n,r=1/0;for(let i of t){let t=ih(e,i);t<r&&(n=i,r=t)}return r<=2?n:void 0}function oh(e){return ah(e,eh)}function sh(e,t){return ah(t,Object.keys(e.props))}var ch=new Set(`b.strong.i.em.s.del.u.mark.sup.sub.br.hr.img.p.h1.h2.h3.h4.h5.h6.div.span.details.summary.blockquote.code.pre.ul.ol.li.a`.split(`.`)),lh=`reactive-md-theme-1`,uh=Object.freeze({name:`default`,protocol:lh,colorSchemes:Object.freeze([`light`,`dark`])}),dh=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/,fh=64;function ph(e){return typeof e==`string`&&e.length>0&&e.length<=fh&&dh.test(e)}function mh(e,t){let n=typeof t==`string`?t.length:1/0;if(!e||typeof e.start!=`number`||typeof e.end!=`number`||!Number.isFinite(e.start)||!Number.isFinite(e.end))return{start:0,end:0};let r=Math.max(0,Math.min(n,Math.floor(e.start)));return{start:r,end:Math.max(r,Math.min(n,Math.floor(e.end)))}}function hh(e,t){if(typeof e!=`string`||e.length===0)return{line:1,column:1};let n=Math.min(t,e.length),r=1,i=0;for(let t=0;t<n;t+=1)e[t]===`
|
|
32
|
+
`&&(r+=1,i=t+1);return{line:r,column:t-i+1}}function gh(e,t,n,r){let i=mh(n,r),{line:a,column:o}=hh(r,i.start);return{code:e,message:$e(t),severity:`warning`,range:i,line:a,column:o,messageKey:t.key,...t.params?{params:t.params}:{}}}function _h(e,t,n,r){let i=(e,t)=>({name:uh.name,diagnostics:[gh(e,t,n,r)]}),a=e;if(a==null||a===``)return{name:uh.name,diagnostics:[]};if(!ph(a))return i(`local.theme.name`,ze(`local.theme.name`,{name:String(a),limit:fh}));let o=a;if(o===uh.name)return{name:uh.name,diagnostics:[]};if(!Array.isArray(t))return i(`local.theme.missing`,ze(`local.theme.missing`,{name:o}));let s=0,c=null;try{for(let e of t)typeof e==`object`&&e&&!Array.isArray(e)&&e.name===o&&(s+=1,c=e)}catch{return i(`local.theme.manifest`,ze(`local.theme.manifest.unreadable`))}if(s===0)return i(`local.theme.missing`,ze(`local.theme.missing`,{name:o}));if(s>1)return i(`local.theme.duplicate`,ze(`local.theme.duplicate`,{name:o}));try{let e=c;if(!e||typeof e!=`object`)return i(`local.theme.manifest`,ze(`local.theme.manifest.definition`,{name:o}));if(e.protocol!==`reactive-md-theme-1`)return i(`local.theme.protocol`,ze(`local.theme.protocol`,{name:o,protocol:lh}));let t=e.colorSchemes;if(!Array.isArray(t)||!t.includes(`light`)||!t.includes(`dark`))return i(`local.theme.modes`,ze(`local.theme.modes`,{name:o}))}catch{return i(`local.theme.manifest`,ze(`local.theme.manifest.selected`,{name:o}))}return{name:o,diagnostics:[]}}function vh(e){return typeof e==`string`&&e.trim()!==``?e:void 0}function yh(e){let t=/^\[\^([\s\S]*)\]$/.exec(e.trim());return t?t[1]:e}function bh(e){return e}function xh(e,t){return vh(e.attrs?.[t])}function Sh(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase().toLowerCase()}function Ch(e){let t=bh(e),n=vh(e.value);return vh(t.identifier)??vh(t.label)??xh(e,`identifier`)??xh(e,`label`)??(n?yh(n):``)}function wh(e){return Sh(Ch(e))}function Th(e){let t=bh(e),n=vh(e.value);return(vh(t.label)??vh(t.identifier)??xh(e,`label`)??xh(e,`identifier`)??(n?yh(n):``)).trim().replace(/\s+/g,` `)}function Eh(e,t){let n=new Map,r=[],i=new Map,a=[],o=e=>{for(let t of e??[])if(t.type===`footnoteDefinition`){let e=wh(t);e&&!n.has(e)&&n.set(e,t),a.push(t),o(t.children),a.pop()}else if(t.type===`footnoteReference`){let e=a[a.length-1];if(e){let n=i.get(e);n?n.push(t):i.set(e,[t])}else r.push(t)}else o(t.children)};o(e.nodes);let s=[],c=new Map,l=new Map,u=new Map,d=e=>{let r=n.get(e);if(!r)return null;let i=c.get(e);if(i)return i;let a={identifier:e,number:s.length+1,definition:r,id:`${t}-fn-${s.length+1}`,references:[]};return s.push(a),c.set(e,a),a},f=e=>{let n=wh(e),r=n?d(n):null;if(!r){l.set(e,{id:``,entry:null,label:Th(e)});return}let i=(u.get(n)??0)+1;u.set(n,i);let a=`${t}-fnref-${r.number}-${i}`;r.references.push({node:e,id:a}),l.set(e,{id:a,entry:r,label:Th(e)})};for(let e of r)f(e);for(let e=0;e<s.length;e+=1){let t=s[e];for(let e of i.get(t.definition)??[])f(e)}return{entries:s,siteFor(e){return l.get(e)}}}var Dh=[`enableCss`,`enableJavaScript`,`enableExtendedHtml`];function Oh(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var kh=`local.options.invalid.host-components`,Ah=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/,jh=new Set([`string`,`number`,`boolean`,`enum`]);function Mh(e,t){let n=e[t];if(n===`*`||n===`+`||n===`?`)return{length:e[t+1]===`?`?2:1};if(n!==`{`)return null;let r=/^\{(\d+)(?:,(\d*))?\}/.exec(e.slice(t));return r?{length:r[0].length+ +(e[t+r[0].length]===`?`)}:null}function Nh(e){let t=[],n=!1,r=!1;for(let i=0;i<e.length;i+=1){let a=e[i];if(n){n=!1;continue}if(a===`\\`){let t=e[i+1];if(t!==void 0&&t>=`1`&&t<=`9`||t===`k`&&e[i+2]===`<`)return!1;n=!0;continue}if(r){a===`]`&&(r=!1);continue}if(a===`[`){r=!0;continue}if(a===`(`){if(e[i+1]===`?`){if(e[i+2]!==`:`)return!1;t.push({quantified:!1,alternation:!1}),i+=2;continue}t.push({quantified:!1,alternation:!1});continue}if(a===`|`){let e=t[t.length-1];e&&(e.alternation=!0);continue}if(a===`)`){let n=t.pop();if(!n)return!1;let r=Mh(e,i+1);if(r&&(n.quantified||n.alternation))return!1;let a=t[t.length-1];a&&(a.quantified=a.quantified||n.quantified||r!==null,a.alternation=a.alternation||n.alternation),r&&(i+=r.length);continue}let o=Mh(e,i);if(o){let e=t[t.length-1];e&&(e.quantified=!0),i+=o.length-1}}return t.length===0&&!n&&!r}function Ph(e){return{ok:!1,message:`Compile option hostComponents is invalid: ${e}`,key:kh,detail:e}}function Fh(e){let t=[],n=new Map;if(e===void 0)return{ok:!0,hostComponents:t,hostByName:n};if(!Array.isArray(e))return Ph(`must be an array.`);if(e.length>32)return Ph(`accepts at most 32 components.`);let r=new Set([...eh,...ch].map(e=>e.toLowerCase()));r.add(`theme`);for(let i=0;i<e.length;i+=1){let a=e[i],o=`hostComponents[${i}]`;if(!Oh(a))return Ph(`${o} must be an object.`);let s=a.name;if(typeof s!=`string`)return Ph(`${o} "name" must be a string.`);if(s.length>128)return Ph(`${o} "name" exceeds the 128-character limit.`);if(!Ah.test(s))return Ph(`${o} "name" ${s} must use lowercase kebab-case.`);if(r.has(s.toLowerCase()))return Ph(`${o} "name" ${s} conflicts with a built-in component, HTML tag or theme.`);if(n.has(s.toLowerCase()))return Ph(`${o} "name" ${s} is declared more than once.`);if(a.form!==`leaf`)return Ph(`${o} "form" must be "leaf".`);let c=a.props;if(!Oh(c))return Ph(`${o} "props" must be an object.`);let l={};for(let e of Object.keys(c)){if(!Ah.test(e))return Ph(`${o} property "${e}" must use lowercase kebab-case.`);let t=c[e];if(!Oh(t))return Ph(`${o} property "${e}" must be an object.`);let n=t.kind;if(typeof n!=`string`||!jh.has(n))return Ph(`property "${e}" has unsupported kind ${typeof n==`string`?`"${n}"`:String(n)}.`);let r={kind:n};for(let n of[`required`,`static`])if(Object.hasOwn(t,n)&&t[n]!==void 0){if(typeof t[n]!=`boolean`)return Ph(`${o} property "${e}" "${n}" must be a boolean.`);r[n]=t[n]}let i=Object.hasOwn(t,`enum`)&&t.enum!==void 0;if(n!==`enum`){if(i)return Ph(`${o} property "${e}" has "enum" but kind is "${n}".`)}else{let n=t.enum;if(!Array.isArray(n)||n.length===0)return Ph(`${o} property "${e}" "enum" must be a non-empty string array.`);if(n.length>64)return Ph(`${o} property "${e}" "enum" accepts at most 64 values.`);let i=new Set;for(let t of n){if(typeof t!=`string`)return Ph(`${o} property "${e}" "enum" must be a non-empty string array.`);if(t.length>128)return Ph(`${o} property "${e}" enum value exceeds the 128-character limit.`);if(i.has(t))return Ph(`${o} property "${e}" enum value "${t}" is declared more than once.`);i.add(t)}r.enum=[...n]}let a=Object.hasOwn(t,`pattern`)&&t.pattern!==void 0;if(n!==`string`){if(a)return Ph(`${o} property "${e}" has "pattern" but kind is "${n}".`)}else if(a){let n=t.pattern;if(typeof n!=`string`)return Ph(`${o} property "${e}" "pattern" must be a string.`);if(n.length>512)return Ph(`${o} property "${e}" "pattern" exceeds the 512-character limit.`);try{new RegExp(n)}catch{return Ph(`${o} property "${e}" "pattern" is not a valid regular expression.`)}if(!Nh(n))return Ph(`${o} property "${e}" "pattern" uses unsupported regex syntax; nested quantifiers, quantified alternation, backreferences and lookarounds are rejected.`);r.pattern=n}l[e]=r}let u={name:s,form:`leaf`,props:l};t.push(u),n.set(s,u)}return{ok:!0,hostComponents:t,hostByName:n}}function Ih(e){if(e===void 0)return{ok:!0,maxSyntaxNodes:C,html:{enableCss:!1,enableJavaScript:!1,enableExtendedHtml:!1},htmlActive:!1,hostComponents:[],hostByName:new Map};if(!Oh(e))return{ok:!1,message:`Compile options must be an object.`,key:`local.options.invalid.object`};let t={enableCss:!1,enableJavaScript:!1,enableExtendedHtml:!1};for(let n of Dh){if(!Object.hasOwn(e,n))continue;let r=e[n];if(r!==void 0){if(typeof r!=`boolean`)return{ok:!1,message:`Compile option ${n} must be a boolean.`,key:`local.options.invalid.html-flag`};t[n]=r}}let n=e.limits,r=C;if(n!==void 0){if(!Oh(n))return{ok:!1,message:`Compile option limits must be an object.`,key:`local.options.invalid.limits`};let e=n.maxSyntaxNodes;if(e!==void 0){if(typeof e!=`number`||!Number.isSafeInteger(e)||e<1)return{ok:!1,message:`Compile option limits.maxSyntaxNodes must be a positive safe integer.`,key:`local.options.invalid.max-syntax-nodes`};r=e}}let i=Fh(e.hostComponents);return i.ok?{ok:!0,maxSyntaxNodes:r,html:t,htmlActive:t.enableCss||t.enableJavaScript||t.enableExtendedHtml,hostComponents:i.hostComponents,hostByName:i.hostByName}:i}var Lh=new Set(nh(`leaf`)),Rh=new Set([...nh(`container`),...nh(`inline`)]),zh=new Set(nh(`inline`)),Bh=new Set([...Lh,...Rh]),Vh=``,Hh=``,Uh=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/,Wh=Uh,Gh={b:`strong`,strong:`strong`,i:`emphasis`,em:`emphasis`,s:`delete`,del:`delete`,u:`underline`,mark:`mark`,sup:`sup`,sub:`sub`},Kh=ch,qh=new Set([`br`,`hr`,`img`]),Jh=new Set([`p`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`div`,`details`,`blockquote`,`pre`,`ul`,`ol`,`li`]),Yh=new Set([`paragraph`,`heading`,`div`,`details`,`blockquote`,`code`,`list`,`listItem`,`thematicBreak`]),Xh=new Set([`id`,`title`,`lang`,`dir`]),Zh={a:new Set([`href`]),img:new Set([`src`,`alt`,`width`,`height`]),ol:new Set([`start`]),details:new Set([`open`])};function Qh(e){if(!e.includes(`&`))return e;try{let t=zm(e.replace(/</g,`<`),{scriptingEnabled:!1}),n=``,r=e=>{if(e.nodeName===`#text`)n+=e.value;else{for(let t of e.childNodes??[])r(t);if(e.content?.childNodes)for(let t of e.content.childNodes)r(t)}};for(let e of t.childNodes)r(e);return n}catch{return e}}function $h(e,t){let n=Object.create(null),r=[],i=[],a=0;for(;a<e.length;){for(;a<e.length&&/\s/.test(e[a]);)a+=1;if(a>=e.length||e[a]===`/`)break;let o=a,s=/^[A-Za-z_:][A-Za-z0-9_.:-]*/.exec(e.slice(a));if(!s){a+=1;continue}let c=s[0].toLowerCase();for(a+=s[0].length;a<e.length&&/\s/.test(e[a]);)a+=1;let l=`true`;if(e[a]===`=`){for(a+=1;a<e.length&&/\s/.test(e[a]);)a+=1;let n=e[a];if(n===`"`||n===`'`){a+=1;let r=e.indexOf(n,a);if(r<0){i.push({name:c,value:``,start:t+o,end:t+e.length});break}l=Qh(e.slice(a,r)),a=r+1}else{let t=a;for(;a<e.length&&!/[\s>]/.test(e[a]);)a+=1;l=Qh(e.slice(t,a))}}let u={name:c,value:l,start:t+o,end:t+a};Object.hasOwn(n,c)||(n[c]=l),r.push(u)}return{attrs:n,entries:r,invalid:i}}var eg=128,tg=Math.min(5e4,w),ng=100,rg=1e3,ig=Lr().use(qo).use(su),ag=class extends Error{code;start;end;key;params;constructor(e,t,n,r,i=e,a){super(t),this.code=e,this.start=n,this.end=r,this.key=i,this.params=a,this.name=`LocalBudgetError`}};function og(e,t){let n=[];if(typeof e!=`string`||e.length>1e6){let t=typeof e==`string`?ze(`local.budget.document`,{limit:S}):ze(`local.parse.source`);return{nodes:[],diagnostics:[{code:typeof e==`string`?`local.budget`:`local.parse`,message:typeof e==`string`?`Document exceeds the ${S}-character limit.`:`Document source must be a string.`,severity:`error`,range:{start:0,end:typeof e==`string`&&e.length?1:0},line:1,column:1,messageKey:t.key,...t.params?{params:t.params}:{}}]}}let r=Ih(t);if(!r.ok)return{nodes:[],diagnostics:[{code:`local.options.invalid`,message:r.message,severity:`error`,range:{start:0,end:0},line:1,column:1,messageKey:r.key,...r.detail===void 0?{}:{params:{detail:r.detail}}}]};let i=r.maxSyntaxNodes,a=r.hostByName,o=r.hostComponents.length?new Set([...Bh,...r.hostComponents.map(e=>e.name)]):Bh,s=[0];for(let t=0;t<e.length;t+=1)e[t]===`
|
|
33
|
+
`&&s.push(t+1);let c=0,l=0,u=0,d=new Set(e.match(RegExp(`[0-9]+`,`g`))??[]),f=[],p=[],m=+(e.charCodeAt(0)===65279),h=e=>{if(e.type===`code`)f.push({start:e.position.start.offset+m,end:e.position.end.offset+m});else if(e.type===`footnoteDefinition`){let t=e.position?.start?.offset,n=e.position?.end?.offset;Number.isInteger(t)&&Number.isInteger(n)&&n>t&&p.push({start:t+m,end:n+m})}for(let t of e.children??[])h(t)};try{h(ig.parse(e.slice(m)))}catch{return x(`local.parse`,`Cannot parse the Markdown document.`,0,void 0,{key:`local.parse.markdown`}),{nodes:[],diagnostics:n}}p.sort((e,t)=>e.start-t.start||t.end-e.end);let g=[];for(let e of p){let t=g[g.length-1];t&&e.start<t.end?e.end>t.end&&(t.end=e.end):g.push({...e})}let _=e=>{let t=0,n=f.length-1;for(;t<=n;){let r=t+n>>1,i=f[r];if(e<i.start)n=r-1;else if(e>=i.end)t=r+1;else return i.end}return null},v=0,y=(e,t,n,r={})=>{if(l>=i)throw new ag(`local.budget`,`Syntax nodes exceed the limit of ${i}.`,t,n,`local.budget.nodes`,{limit:i});return l+=1,{type:e,id:`local-${c++}`,range:{start:t,end:n},...r}};function b(t,r,i,a,o=a+1,c){if(n.length>=100){if(i===`warning`)return;let e=n.length-1;for(;e>=0&&n[e].severity!==`warning`;)--e;if(e<0)return;n.splice(e,1)}let l=Math.max(0,Math.min(e.length,a)),u=Math.max(l,Math.min(e.length,Math.max(l,o))),d=0,f=s.length-1;for(;d<f;){let e=Math.ceil((d+f)/2);s[e]<=l?d=e:f=e-1}let p=d+1,m=r.length>2e3?`${r.slice(0,D-1)}…`:r,h=ze(c?.key??t,c?.params);n.push({code:t,message:m,severity:i,range:{start:l,end:u},line:p,column:l-s[d]+1,messageKey:h.key,...h.params?{params:h.params}:{}})}function x(e,t,n,r=n+1,i){b(e,t,`error`,n,r,i)}function C(e,t,n,r=n+1,i){b(e,t,`warning`,n,r,i)}let w,T,E=0,O=0,k,A=0;function j(t){let n=e.startsWith(`</theme`,t),r=!n&&e.startsWith(`<theme`,t);if(!n&&!r)return!1;let i=e[t+(n?7:6)];return i!==void 0&&(i===`>`||i===`/`||/\s/.test(i))}function M(t,n){let r=/^<(\/?)theme(?=[\s/>])/.exec(e.slice(t,n));if(!r)return null;let i=t+r[0].length,a=e.indexOf(`
|
|
34
|
+
`,i),o=a<0?n:Math.min(n,a),s=``,c=i;for(;c<o;c+=1){let t=e[c];if(s)t===s&&(s=``);else if(t===`"`||t===`'`)s=t;else if(t===`>`)break}let l=!!r[1];if(c>=o){let n=o;return{start:t,end:n,rest:e.slice(i,n),closing:l,selfClosing:!1,unclosed:!0}}let u=e.slice(i,c);return{start:t,end:c+1,rest:u,closing:l,selfClosing:/\/\s*$/.test(u),unclosed:!1}}function N(t,n){let r=t;for(;r<n;){let t=e[r];if(t.charCodeAt(0)===65279||t===` `||t===` `||t===`\r`||t===`
|
|
35
|
+
`)r+=1;else if(e.startsWith(`<!--`,r)){let t=e.indexOf(`-->`,r+4);if(t<0||t+3>n)return-1;r=t+3}else break}return r}function P(t){if(t.unclosed)return!1;let n=t.end;for(;n<e.length&&(e[n]===` `||e[n]===` `||e[n]===`\r`);)n+=1;return n>=e.length||e[n]===`
|
|
36
|
+
`}function F(e){if(/\{\{|\}\}/.test(e))return{code:`local.theme.expression`,key:`local.theme.expression`,message:`Theme names must be static text, not expressions.`};let t=e.replace(/\/\s*$/,``),n=/^\s*name\s*=\s*(?:"([^"]*)"|'([^']*)')\s*$/.exec(t);if(!n)return/\bname\s*=/.test(t)?{code:`local.theme.attribute`,key:`local.theme.attribute`,message:`Theme declarations only accept a quoted name attribute.`}:{code:`local.theme.name`,key:`local.theme.name.missing`,message:`A theme declaration requires a quoted name attribute.`};let r=n[1]??n[2]??``;return ph(r)?{name:r}:{code:`local.theme.name`,key:`local.theme.name.invalid`,params:{name:r,limit:64},message:`Theme name "${r}" must use lowercase letters, digits and single hyphens (maximum 64 characters).`}}function ee(e){return e.replace(/&(quot|apos|amp|lt|gt);/g,(e,t)=>({quot:`"`,apos:`'`,amp:`&`,lt:`<`,gt:`>`})[t])}function I(e,t){let n=Object.create(null),r=0;for(;r<e.length;){for(;r<e.length&&/\s/.test(e[r]);)r++;if(r>=e.length||e[r]===`/`)break;let i=r,a=/^[A-Za-z][A-Za-z0-9_-]*/.exec(e.slice(r));if(!a){for(x(`local.attribute`,`Attribute names must use lowercase kebab-case.`,t+r,void 0,{key:`local.attribute.format`});r<e.length&&!/\s/.test(e[r]);)r++;continue}let o=a[0];for(r+=o.length,o.length>eg?x(`local.budget.name`,`Attribute name exceeds the ${eg}-character limit.`,t+i,t+r,{key:`local.budget.name.attribute`,params:{limit:eg}}):Wh.test(o)||x(`local.attribute.name`,`Attribute name ${o} must use lowercase kebab-case.`,t+i,t+r,{key:`local.attribute.name`,params:{name:o}});r<e.length&&/\s/.test(e[r]);)r++;let s=`true`;if(e[r]===`=`){for(r++;r<e.length&&/\s/.test(e[r]);)r++;let n=e[r++];if(n!==`"`&&n!==`'`){x(`local.attribute`,`Attribute ${o} value must be quoted.`,t+Math.max(0,r-1),void 0,{key:`local.attribute.value-quoted`,params:{name:o}});break}let i=e.indexOf(n,r);if(i<0){x(`local.attribute`,`Attribute ${o} is missing a closing quote.`,t+Math.max(0,r-1),void 0,{key:`local.attribute.closing-quote`,params:{name:o}});break}s=ee(e.slice(r,i)),r=i+1}if(Object.hasOwn(n,o)?x(`local.attribute.duplicate`,`Duplicate attribute ${o}.`,t+i,t+r,{key:`local.attribute.duplicate`,params:{name:o}}):n[o]=s,r<e.length&&!/\s|\//.test(e[r])){x(`local.attribute`,`Attributes must be separated by whitespace.`,t+r,void 0,{key:`local.attribute.separator`});break}}return n}function te(t,n){let r=/^<(\/?)([A-Za-z][A-Za-z0-9_-]*)(?=[\s/>])/.exec(e.slice(t,n));if(!r)return null;let i=t+r[0].length,a=n,s=e[i];if((s===` `||s===` `||s===`
|
|
37
|
+
`||s===`\r`)&&!o.has(r[2].toLowerCase())&&!re(t)){let t=e.indexOf(`
|
|
38
|
+
`,i);t>=0&&(a=Math.min(n,t))}let c=``,l=i;for(;l<a;l++){let t=e[l];if(c)t===c&&(c=``);else if(t===`"`||t===`'`)c=t;else if(t===`>`)break}let u=r[2];if(l>=a)return{name:u,closing:!!r[1],self:!1,start:t,end:a,attrs:{},head:i,unclosed:!0};u.length>eg&&x(`local.budget.name`,`Tag name exceeds the ${eg}-character limit.`,t,t+1+u.length,{key:`local.budget.name.tag`,params:{limit:eg}});let d=e.slice(i,l);return r[1]?(d.trim()&&x(`local.tag.closing`,`Closing tag </${u}> cannot have attributes.`,t,l+1,{key:`local.tag.closing`,params:{name:u}}),{name:u,closing:!0,self:!1,start:t,end:l+1,attrs:{},head:i,unclosed:!1}):{name:u,closing:!1,self:/\/\s*$/.test(d),start:t,end:l+1,attrs:o.has(u.toLowerCase())?I(d,i):{},head:i,unclosed:!1}}function ne(t,n){let r=/^<(\/?)([A-Za-z][A-Za-z0-9_-]*)(?=[\s/>])/.exec(e.slice(t,n));if(!r)return null;let i=t+r[0].length,a=n,s=e[i];if((s===` `||s===` `||s===`
|
|
39
|
+
`||s===`\r`)&&!o.has(r[2].toLowerCase())&&!re(t)){let t=e.indexOf(`
|
|
40
|
+
`,i);t>=0&&(a=Math.min(n,t))}let c=``,l=i;for(;l<a;l++){let t=e[l];if(c)t===c&&(c=``);else if(t===`"`||t===`'`)c=t;else if(t===`>`)break}if(l>=a)return null;let u=e.slice(i,l);return{name:r[2],closing:!!r[1],self:!r[1]&&/\/\s*$/.test(u),end:l+1}}function re(t){let n=e.lastIndexOf(`
|
|
41
|
+
`,t-1)+1;return/^[ \t]*$/.test(e.slice(n,t))}function ie(t,n){if(e[t]!==`[`||e[t+1]!==`^`)return null;let r=t+2,i=Math.min(n,t+2+rg);for(;r<i;r++){let t=e[r];if(t===`\\`&&/[!-/:-@\[\]\\^_`{|}~]/.test(e[r+1]??``))r+=1;else{if(t===`]`)break;if(t===`[`||t===`
|
|
42
|
+
`||t===`\r`)return null}}if(r>=i||e[r]!==`]`)return null;let a=e.slice(t+2,r);if(!a.trim())return null;let o=Sh(a);return o?{label:a,identifier:o,openEnd:t+2,closeEnd:r+1}:null}function ae(t){let n=ie(t,e.length);return!n||e[n.closeEnd]!==`:`?null:{label:n.label,identifier:n.identifier,bodyStart:n.closeEnd+1}}function oe(t,n){let r=/^<(\/?)([A-Za-z][A-Za-z0-9]*)(?=[\s/>])/.exec(e.slice(t,Math.min(n,t+64)));if(!r)return null;let i=r[2].toLowerCase();if(!Kh.has(i))return null;let a=t+r[0].length,o=``,s=a;for(;s<n;s++){let t=e[s];if(o)t===o&&(o=``);else if(t===`"`||t===`'`)o=t;else if(t===`>`)break}if(s>=n)return null;let c=e.slice(a,s),l=!!r[1],u=l?{attrs:Object.create(null),entries:[],invalid:[]}:$h(c,a);return{lower:i,closing:l,self:!l&&/\/\s*$/.test(c),rest:c,attrs:u.attrs,entries:u.entries,invalid:u.invalid,start:t,head:a,end:s+1}}function se(t,n,r,i){let a=1;for(let o=t;o<r;){if(!i){let e=_(o);if(e!==null&&e>o){o=Math.min(e,r);continue}}let t=L(o,r,i);if(t!==null)o=t;else if(e.startsWith(`<!--`,o)){let t=e.indexOf(`-->`,o+4);o=t<0||t+3>r?r:t+3}else{if(e[o]===`<`){let e=oe(o,r);if(e){if(e.lower===n){if(e.closing){if(--a,a===0)return{start:o,end:e.end}}else!e.self&&!qh.has(n)&&(a+=1)}else if(!e.closing&&(e.lower===`pre`||e.lower===`code`)&&!qh.has(e.lower)){let t=se(e.end,e.lower,r,i);if(t){o=t.end;continue}}o=e.end;continue}}o++}}return null}function ce(e,t){if(!t)return{ok:!1,attr:``};let n=Object.create(null);if(t.invalid.length)return{ok:!1,attr:t.invalid[0].name};for(let r of t.entries){let t=r.name;if(t===`class`||t===`style`||/^on[a-z]/.test(t))return{ok:!1,attr:t};let i=Xh.has(t),a=/^aria-[a-z0-9_.-]+$/.test(t),o=/^data-[a-z0-9_.-]+$/.test(t),s=Zh[e]?.has(t)??!1;if(!i&&!a&&!o&&!s||t===`dir`&&![`ltr`,`rtl`,`auto`].includes(r.value.trim().toLowerCase())||t===`id`&&r.value.trim()===``||(t===`width`||t===`height`)&&!/^\d{1,6}$/.test(r.value.trim())||t===`start`&&!/^-?\d{1,9}$/.test(r.value.trim()))return{ok:!1,attr:t};if(t===`href`||t===`src`){let e=/^([a-z][a-z0-9+.-]*):/i.exec(r.value.trim().replace(/[\u0000- ]+/g,``));if(e&&!((t===`src`?`image`:`link`)==`image`?e[1].toLowerCase()===`http`||e[1].toLowerCase()===`https`:[`http`,`https`,`mailto`,`tel`].includes(e[1].toLowerCase())))return{ok:!1,attr:t}}n[t]=r.value}return e===`details`&&Object.hasOwn(n,`open`)&&(n.open=`true`),{ok:!0,attrs:n}}function le(e){return e.length===1&&e[0].type===`paragraph`?e[0].children??[]:e}function ue(e){return e.flatMap(e=>e.type===`paragraph`?e.children??[]:[e])}function de(t,n,r,i){let a=t.start,o=n.end,s=()=>{let e=ge(t.end,n.start,void 0,a,t.end,i.depth+1,{footnote:i.footnote,indent:i.indent,container:i.container,definitions:[],stripBlockquote:i.stripBlockquote});return _e(t.end,n.start,e.tokens,i.indent,{literalHtml:i.footnote,stripBlockquote:i.stripBlockquote})},c=()=>le(s()),l=e=>{let t=[];for(let n of e)if(n.type===`list`)for(let e of n.children??[])e.type===`listItem`&&t.push(e);else n.type===`listItem`?t.push(n):n.type===`comment`||n.type===`text`&&!(n.value??``).trim()||t.push(y(`listItem`,n.range.start,n.range.end,{children:n.type===`paragraph`?n.children??[]:[n]}));return t};switch(t.lower){case`code`:return y(`inlineCode`,a,o,{value:Qh(e.slice(t.end,n.start))});case`pre`:{let i=e.slice(t.end,n.start),s=/^<code(?:\s[^>]*)?>([\s\S]*)<\/code>$/.exec(i);return y(`code`,a,o,{value:Qh(s?s[1]:i),attrs:r})}case`summary`:return y(`summary`,a,o,{attrs:r,children:c()});case`details`:{let e=s(),t=null,n=e.findIndex(e=>e.type===`summary`);return n<0?(n=e.findIndex(e=>e.type===`paragraph`&&e.children?.length===1&&e.children[0].type===`summary`),n>=0&&(t=e[n].children[0],e.splice(n,1))):(t=e[n],e.splice(n,1)),y(`details`,a,o,{attrs:r,children:t?[t,...e]:e})}case`p`:return y(`paragraph`,a,o,{attrs:r,children:ue(s())});case`h1`:case`h2`:case`h3`:case`h4`:case`h5`:case`h6`:return y(`heading`,a,o,{depth:Number(t.lower.slice(1)),attrs:r,children:ue(s())});case`div`:return y(`div`,a,o,{attrs:r,children:s()});case`blockquote`:return y(`blockquote`,a,o,{attrs:r,children:s()});case`ul`:case`ol`:{let e=t.lower===`ol`,n=r.start,i=e&&n!==void 0?Number(n):void 0;return y(`list`,a,o,{ordered:e,...e&&i!==void 0&&Number.isFinite(i)?{start:i}:{},attrs:r,children:l(s())})}case`li`:{let e=s();return y(`listItem`,a,o,{attrs:r,children:e.length===1&&e[0].type===`paragraph`?e[0].children??[]:e})}case`a`:return r.href===void 0?y(`span`,a,o,{attrs:r,children:c()}):y(`link`,a,o,{url:r.href,title:r.title??null,attrs:r,children:c()});case`span`:return y(`span`,a,o,{attrs:r,children:c()});default:return y(Gh[t.lower]??t.lower,a,o,{attrs:r,children:c()})}}let fe=/^ {0,3}$/,pe=/^[ \t]*$/;function L(t,n,r){let i=e[t];if(i===`\\`)return Math.min(n,t+2);if(i!=="`"&&i!==`~`)return null;let a=e.lastIndexOf(`
|
|
43
|
+
`,t-1)+1;if((r?pe:fe).test(e.slice(a,t))){let i=/^(`{3,}|~{3,})[^\n]*(?:\n|$)/.exec(e.slice(t,n));if(i){let a=RegExp(`^${r?`[ \\t]*`:` {0,3}`}${i[1][0]}{${i[1].length},}[ \\t]*\\r?$`,`gm`);a.lastIndex=t+i[0].length;let o=a.exec(e);return o&&o.index<n?Math.min(n,o.index+o[0].length):n}}if(i==="`"){let r=/^`+/.exec(e.slice(t,n))[0],i=e.indexOf(r,t+r.length);for(;i>=0&&i<n;){if(e[i-1]!=="`"&&e[i+r.length]!=="`")return i+r.length;i=e.indexOf(r,i+r.length)}return t+r.length}return null}function R(t,n,r,i){let a=1;for(let o=t;o<r;){if(!i){let e=_(o);if(e!==null&&e>o){o=Math.min(e,r);continue}}let t=L(o,r,i);if(t!==null)o=t;else if(e.startsWith(`<!--`,o)){let t=e.indexOf(`-->`,o+4);o=t<0||t+3>r?r:t+3}else{if(e[o]===`<`){let e=ne(o,r);if(e){if(e.name===n){if(e.closing){if(--a,a===0)return{start:o,end:e.end}}else e.self||(a+=1)}o=e.end;continue}}o++}}return null}function me(t,n){let r=``;for(let i=t+2;i<n-1;i++){let t=e[i];if(r)t===`\\`?i++:t===r&&(r=``);else if(t===`"`||t===`'`)r=t;else if(t===`}`&&e[i+1]===`}`)return i+2}return-1}function he(t,n){let r=1/0,i=``,a=0,o=t;for(;o<n;){let t=e.indexOf(`
|
|
44
44
|
`,o),s=t<0||t>n?n:t,c=e.slice(o,s);if(e.lastIndexOf(`
|
|
45
|
-
`,o-1)+1===o){if(i)RegExp(`^[ \\t]*${i}{${a},}[ \\t]*\\r?$`).test(c)&&(i=``);else{let e=/^([ \t]*)(`{3,}|~{3,})/.exec(c);e?(r=Math.min(r,e[1].length),i=e[2][0],a=e[2].length):c.trim()!==``&&(r=Math.min(r,/^[ \t]*/.exec(c)[0].length))}}if(s>=n)break;o=s+1}return Number.isFinite(r)?r:0}function
|
|
46
|
-
`){let t=0;for(;t<a&&n<i&&/[ \t]/.test(e[n]);)n++,t++}if(n>=i)break;s.push(n),o+=e[n++]}s.push(i);let c=[],l=e=>{if(e.type===`footnoteDefinition`){let t=s[e.position.start.offset],n=s[e.position.end.offset];Number.isInteger(t)&&Number.isInteger(n)&&n>t&&c.push({start:t,end:n})}else for(let t of e.children??[])l(t)};l(
|
|
47
|
-
`,t-1)+1,
|
|
45
|
+
`,o-1)+1===o){if(i)RegExp(`^[ \\t]*${i}{${a},}[ \\t]*\\r?$`).test(c)&&(i=``);else{let e=/^([ \t]*)(`{3,}|~{3,})/.exec(c);e?(r=Math.min(r,e[1].length),i=e[2][0],a=e[2].length):c.trim()!==``&&(r=Math.min(r,/^[ \t]*/.exec(c)[0].length))}}if(s>=n)break;o=s+1}return Number.isFinite(r)?r:0}function ge(t,n,r,i=t,s=t,c=0,l={}){let u=[];if(c>ng)return x(`local.budget`,`Component nesting exceeds the 100-level limit.`,i,s,{key:`local.budget.nesting`,params:{limit:ng}}),{tokens:u,end:n,contentEnd:t,indent:0};let d=l.footnote===!0,p=l.container??r!==void 0,m=l.indent??0,h=l.definitions??g;if(r){let i=R(t,r,n,!0)?.start??n,a=he(t,i);m=a;let o=``,s=[];for(let n=t;n<i;){if(n===0||e[n-1]===`
|
|
46
|
+
`){let t=0;for(;t<a&&n<i&&/[ \t]/.test(e[n]);)n++,t++}if(n>=i)break;s.push(n),o+=e[n++]}s.push(i);let c=[],l=e=>{if(e.type===`footnoteDefinition`){let t=s[e.position.start.offset],n=s[e.position.end.offset];Number.isInteger(t)&&Number.isInteger(n)&&n>t&&c.push({start:t,end:n})}else for(let t of e.children??[])l(t)};l(ig.parse(o)),h=c.filter(e=>e.start>=t&&e.end<=i).sort((e,t)=>e.start-t.start||t.end-e.end)}let _=0;for(let i=t;i<n;){if(!p){for(;f[v]?.end<=i;)v++;let e=f[v];if(e&&e.start<=i){i=e.end;continue}}for(;h[_]?.end<=i;)_++;let s=h[_];if(s&&s.start===i){let t=i,n=ae(t);for(;!n&&t-i<4&&t<s.end&&(e[t]===` `||e[t]===` `);)t+=1,n=ae(t);if(n&&n.bodyStart<=s.end){let r=e.lastIndexOf(`
|
|
47
|
+
`,t-1)+1,a=e.slice(r,t),o=/^(?:[ \t]{0,3}>[ \t]?)+/.exec(a)?.[0]??``,l=/^[ \t]*/.exec(a.slice(o.length))[0].length,d=l+4,f=ge(n.bodyStart,s.end,void 0,n.bodyStart,n.bodyStart,c+1,{footnote:!0,indent:d,container:p||l>0,definitions:[],stripBlockquote:o.length>0}),m=_e(n.bodyStart,s.end,f.tokens,d,{literalHtml:!0,stripBlockquote:o.length>0});u.push({start:s.start,end:s.end,block:!0,node:y(`footnoteDefinition`,s.start,s.end,{identifier:n.identifier,label:n.label,children:m})}),i=s.end,_+=1;continue}_+=1}let g=L(i,n,p);if(g!==null)i=g;else if(e.startsWith(`<!--`,i)){let t=e.indexOf(`-->`,i+4),a=t<0?n:Math.min(n,t+3),o=e.slice(i,a);if(!d&&/^<!--\s*reactive-md(?=[\s:]|-->|$)/i.test(o)){A+=1;let n=e.lastIndexOf(`
|
|
48
48
|
`,i-1)+1,s=e.indexOf(`
|
|
49
|
-
`,a),c=/^\s*$/.test(e.slice(n,i))&&/^\s*$/.test(e.slice(a,s<0?e.length:s)),l=/^<!--[ \t]*reactive-md:[ \t]*(local-draft-[1-9][0-9]*)[ \t]*-->$/.exec(o);
|
|
50
|
-
`)break;if(t!==`$`)continue;let n=e.slice(i+1,a),r=e[a+1];if(!n||/^\s/.test(n)||/\s$/.test(n)||r!==void 0&&r>=`0`&&r<=`9`)break;o=a;break}if(o<0){i+=1;continue}let s=e.slice(i+1,o);s.length>
|
|
51
|
-
`,t-1)+1,r=f.get(n);if(r===void 0){r=a.stripBlockquote?/^(?:[ \t]{0,3}>[ \t]?)+/.exec(e.slice(n))?.[0].length??0:0;let t=0;for(;t<i&&(e[n+r]===` `||e[n+r]===` `);)r++,t++;f.set(n,r)}return{lineStart:n,skip:r}}function m(e,t,n){if(n&&t===0&&e.charCodeAt(0)===65279&&(e=e.slice(1),t+=1),n&&i>0)for(let n=0;n<e.length;n++){let r=t+n,{lineStart:i,skip:a}=p(r);r<i+a||(o+=e[n],
|
|
49
|
+
`,a),c=/^\s*$/.test(e.slice(n,i))&&/^\s*$/.test(e.slice(a,s<0?e.length:s)),l=/^<!--[ \t]*reactive-md:[ \t]*(local-draft-[1-9][0-9]*)[ \t]*-->$/.exec(o);A>1?x(`local.version.duplicate`,`Only one source syntax declaration is allowed.`,i,a):!l||t<0||/[\r\n]/.test(o)?x(`local.version.malformed`,`Use <!-- reactive-md: local-draft-2 --> on one line.`,i,a):(k={version:l[1],range:{start:i,end:a}},r!==void 0||!c||N(0,i)!==i?x(`local.version.placement`,`The syntax declaration must be on its own line before the theme and document body.`,i,a):l[1]!==`local-draft-2`&&x(`local.version.unsupported`,`This reader accepts ${Bm}; migrate ${l[1]} or use a compatible reader.`,i,a,{key:`local.version.unsupported`,params:{declared:l[1],supported:Bm}}))}u.push({start:i,end:a,node:y(`comment`,i,a)}),i=a}else if(!d&&e.startsWith(`{{`,i)){let t=me(i,n);if(t<0){x(`local.interpolation`,`Interpolation is missing }}.`,i,n,{key:`local.interpolation.unclosed`}),i+=2;continue}u.push({start:i,end:t,node:y(`interpolation`,i,t,{value:e.slice(i+2,t-2).trim()})}),i=t}else if(!d&&e[i]===`$`){let t=e[i+1]===`$`,r=t?`$$`:`$`;if(t){let t=i+r.length;for(;t<n;t++)if(e[t]===`\\`)t++;else if(e.startsWith(r,t))break;if(t>=n||!e.startsWith(r,t)){x(`local.math.unclosed`,`Formula is missing its closing delimiter.`,i,void 0,{key:`local.math.unclosed`}),i+=r.length;continue}let a=e.slice(i+r.length,t);a.length>tg&&(x(`local.budget.math`,`Formula exceeds the ${tg}-character limit.`,i,t+r.length,{key:`local.budget.math`,params:{limit:tg}}),a=a.slice(0,tg));let o=t+r.length;u.push({start:i,end:o,node:y(`math`,i,o,{value:a})}),i=o;continue}let a=i+1,o=-1;for(;a<n;a++){let t=e[a];if(t===`\\`){a++;continue}if(t===`
|
|
50
|
+
`)break;if(t!==`$`)continue;let n=e.slice(i+1,a),r=e[a+1];if(!n||/^\s/.test(n)||/\s$/.test(n)||r!==void 0&&r>=`0`&&r<=`9`)break;o=a;break}if(o<0){i+=1;continue}let s=e.slice(i+1,o);s.length>tg&&(x(`local.budget.math`,`Formula exceeds the ${tg}-character limit.`,i,o+1,{key:`local.budget.math`,params:{limit:tg}}),s=s.slice(0,tg));let c=o+1;u.push({start:i,end:c,node:y(`inlineMath`,i,c,{value:s})}),i=c}else{if(e[i]===`[`){let t=ie(i,n);if(t&&(e[t.closeEnd]!==`:`||!re(i))){u.push({start:i,end:t.closeEnd,node:y(`footnoteReference`,i,t.closeEnd,{identifier:t.identifier,label:t.label})}),i=t.closeEnd;continue}}if(e[i]===`<`){let s=oe(i,n);if(s){if(s.closing){u.push({start:i,end:s.end,block:!1,node:y(`fallback`,i,s.end,{value:e.slice(i,s.end)})}),i=s.end;continue}let t=ce(s.lower,s);if(!t.ok){let r=s.self||qh.has(s.lower)?s.end:se(s.end,s.lower,n,p)?.end??s.end;C(`local.html`,`HTML attribute ${t.attr} is not supported; the tag is shown as source.`,i,r,{key:`local.html`}),u.push({start:i,end:r,block:!1,node:y(`fallback`,i,r,{value:e.slice(i,r)})}),i=r;continue}let r=t.attrs;if(qh.has(s.lower)){if(s.lower===`br`)u.push({start:i,end:s.end,node:y(`break`,i,s.end,{attrs:r})});else if(s.lower===`hr`)u.push({start:i,end:s.end,block:!0,node:y(`thematicBreak`,i,s.end,{attrs:r})});else{let e=r.width===void 0?void 0:Number(r.width),t=r.height===void 0?void 0:Number(r.height);u.push({start:i,end:s.end,node:y(`image`,i,s.end,{url:r.src,alt:r.alt??``,title:r.title??null,...e===void 0?{}:{width:e},...t===void 0?{}:{height:t},attrs:r})})}i=s.end;continue}let a=se(s.end,s.lower,n,p);if(!a){u.push({start:i,end:s.end,block:!1,node:y(`text`,i,s.end,{value:e.slice(i,s.end)})}),i=s.end;continue}let o=Jh.has(s.lower),f=de(s,a,r,{footnote:d,container:p,indent:m,stripBlockquote:l.stripBlockquote===!0,depth:c});u.push({start:i,end:a.end,...o?{block:!0}:{},node:f}),i=a.end;continue}if(d){i+=1;continue}let f=j(i)?M(i,n):null;if(f){if(r===void 0&&N(O,i)===i){if(E+=1,E===1&&(T={start:f.start,end:f.end}),f.unclosed)C(`local.theme.malformed`,`Theme declaration is missing >.`,i,f.end,{key:`local.theme.malformed.unclosed`});else if(f.closing)C(`local.theme.malformed`,`A theme declaration cannot be a closing tag.`,i,f.end,{key:`local.theme.malformed.closing`});else if(!P(f))C(`local.theme.malformed`,`A theme declaration must be on its own line before the document content.`,i,f.end,{key:`local.theme.malformed.placement`});else if(E>1)C(`local.theme.duplicate`,`Only one theme declaration is allowed before the document content; this declaration is ignored.`,i,f.end,{key:`local.theme.duplicate.declaration`});else{let e=F(f.rest);e.code?C(e.code,e.message??`Invalid theme declaration.`,i,f.end,{key:e.key??e.code,...e.params?{params:e.params}:{}}):w=e.name}O=f.end,u.push({start:i,end:f.end,block:!0,node:y(`comment`,i,f.end)}),i=f.end;continue}let t=r===void 0?`local.theme.late`:`local.theme.nested`;C(t,r===void 0?`Theme declarations after document content are ignored.`:`Theme declarations inside document content are ignored.`,i,f.end,{key:t}),u.push({start:i,end:f.end,block:!1,node:y(`fallback`,i,f.end,{value:e.slice(i,f.end)})}),i=f.end;continue}let h=ne(i,n);if(h&&!h.closing&&Uh.test(h.name)&&h.name.length<=eg&&!o.has(h.name)){let t=h.self?h.end:R(h.end,h.name,n,p)?.end??null;if(t===null){if(!re(i)){u.push({start:i,end:h.end,block:!1,node:y(`text`,i,h.end,{value:e.slice(i,h.end)})}),i=h.end;continue}x(`local.tag.unclosed`,`<${h.name}> is missing </${h.name}>.`,i,h.end,{key:`local.tag.unclosed.pair`,params:{name:h.name}}),i=h.end;continue}let r=oh(h.name);C(`local.component.unknown`,`Unknown component <${h.name}>. ${r?`Did you mean <${r}>?`:`This mode only accepts local interaction components.`}`,i,t,{key:r?`local.component.unknown.suggestion`:`local.component.unknown`,params:r?{name:h.name,suggestion:r}:{name:h.name}}),u.push({start:i,end:t,block:re(i),node:y(`fallback`,i,t,{value:e.slice(i,t)})}),i=t;continue}let g=te(i,n);if(g){if(g.unclosed){if(!o.has(g.name.toLowerCase())&&!re(i)){u.push({start:i,end:g.head,block:!1,node:y(`text`,i,g.head,{value:e.slice(i,g.head)})}),i=g.head;continue}x(`local.tag.unclosed`,`Tag ${g.name} is missing >.`,i,n,{key:`local.tag.unclosed.open`,params:{name:g.name}}),i=n;continue}if(!Uh.test(g.name)&&!o.has(g.name.toLowerCase())){u.push({start:i,end:g.end,block:!1,node:y(`text`,i,g.end,{value:e.slice(i,g.end)})}),i=g.end;continue}if(Uh.test(g.name)||x(`local.tag.name`,`Tag name ${g.name} must use lowercase kebab-case.`,i,i+1+g.name.length,{key:`local.tag.name`,params:{name:g.name}}),g.closing){if(g.name===r)return{tokens:u,end:g.end,contentEnd:i,indent:he(t,i)};x(`local.tag.mismatch`,`Closing tag </${g.name}> does not match ${r?`<${r}>`:`the document root`}.`,i,g.end,{key:r?`local.tag.mismatch.parent`:`local.tag.mismatch.root`,params:r?{name:g.name,parent:r}:{name:g.name}}),i=g.end;continue}let s=a.has(g.name),l=s||Lh.has(g.name)||g.self;if(g.self&&Rh.has(g.name)&&x(`local.tag.shape`,`<${g.name}> requires a closing tag.`,i,g.end,{key:`local.tag.shape`,params:{name:g.name}}),l){u.push({start:i,end:g.end,...s?{block:re(i)}:{},node:y(s?`hostComponent`:`component`,i,g.end,{name:g.name,attrs:g.attrs,children:[]})}),i=g.end;continue}let d=ge(g.end,n,g.name,i,g.end,c+1),f=_e(g.end,d.contentEnd,d.tokens,zh.has(g.name)?0:d.indent),p=y(`component`,i,d.end,{name:g.name,attrs:g.attrs,children:zh.has(g.name)&&f.length===1&&f[0].type===`paragraph`?f[0].children??[]:f});u.push({start:i,end:d.end,node:p}),i=d.end;continue}}i++}}return r&&x(`local.tag.unclosed`,`<${r}> is missing </${r}>.`,i,Math.min(e.length,Math.max(s,i+1)),{key:`local.tag.unclosed.pair`,params:{name:r}}),{tokens:u,end:n,contentEnd:n,indent:r?he(t,n):0}}function _e(t,n,r,i=0,a={}){let o=``,s=t,c=[],l=new Map,f=new Map;function p(t){let n=e.lastIndexOf(`
|
|
51
|
+
`,t-1)+1,r=f.get(n);if(r===void 0){r=a.stripBlockquote?/^(?:[ \t]{0,3}>[ \t]?)+/.exec(e.slice(n))?.[0].length??0:0;let t=0;for(;t<i&&(e[n+r]===` `||e[n+r]===` `);)r++,t++;f.set(n,r)}return{lineStart:n,skip:r}}function m(e,t,n){if(n&&t===0&&e.charCodeAt(0)===65279&&(e=e.slice(1),t+=1),n&&i>0)for(let n=0;n<e.length;n++){let r=t+n,{lineStart:i,skip:a}=p(r);r<i+a||(o+=e[n],c.push(r))}else{o+=e;for(let r=0;r<e.length;r++)c.push(n?t+r:t)}}for(let t of r){m(e.slice(s,t.start),s,!0);let n;do n=Vh+u+++Hh;while(d.has(n));let r=t.block??(t.node.type===`math`||(t.node.type===`component`||t.node.type===`hostComponent`)&&!zh.has(t.node.name));r&&m(`
|
|
52
52
|
|
|
53
|
-
`,t.start,!1);let i=o.length;m(``,t.start,!1),
|
|
53
|
+
`,t.start,!1);let i=o.length;m(``,t.start,!1),l.set(i,{marker:n,end:o.length,node:t.node}),r&&m(`
|
|
54
54
|
|
|
55
|
-
`,t.end,!1),s=t.end}m(e.slice(s,n),s,!0),
|
|
56
|
-
`&&t.push(n+1);return t}function
|
|
57
|
-
`&&t.push(n+1);return t}function bg(e,t,n){let r=e.source.length,i=Math.max(0,Math.min(r,t)),a=Math.max(i,Math.min(r,Math.max(i,n))),o=0,s=e.lines.starts.length-1;for(;o<s;){let t=Math.ceil((o+s)/2);e.lines.starts[t]<=i?o=t:s=t-1}return{start:i,end:a,line:o+1,column:i-e.lines.starts[o]+1}}function xg(e,t,n,r,i,a){if(e.diagnostics.length>=100)return;let o=bg(e,r,i),s=ze(a?.key??t,a?.params);e.diagnostics.push({code:t,message:n,severity:`warning`,range:{start:o.start,end:o.end},line:o.line,column:o.column,messageKey:s.key,...s.params?{params:s.params}:{}})}function Sg(e,t){let n=e.sourceCodeLocation,r=n&&Number.isInteger(n.startOffset)?n.startOffset:0,i=n&&Number.isInteger(n.endOffset)?n.endOffset:r;return{start:Math.max(0,Math.min(t.source.length,r)),end:Math.max(0,Math.min(t.source.length,i))}}function Cg(e,t,n){let r=e.sourceCodeLocation?.attrs,i=r&&(r[t.name]??(t.prefix?r[`${t.prefix}:${t.name}`]:void 0));return i&&Number.isInteger(i.startOffset)&&Number.isInteger(i.endOffset)?{start:i.startOffset,end:i.endOffset}:Sg(e,n)}function wg(e,t,n){if(e.budget.nodes+=1,e.budget.nodes>e.maxNodes)throw new vg(t,n,e.maxNodes)}function Tg(e,t){let n=Sg(e,t);return t.source.slice(n.start,n.end).replace(/\u0000/g,`�`)}function Eg(e){return yd.createTextNode(e.replace(/\u0000/g,`�`))}function Dg(e){return e.replace(/[\u0000- \u007f-\u009f]+/g,``)}function Og(e){let t=/^([a-z][a-z0-9+.-]*):/i.exec(Dg(e));return t?t[1].toLowerCase():null}function kg(e,t){let n=e.trim();if(n===``)return!0;let r=Og(n);return r===null?!0:r===`javascript`||r===`vbscript`?!1:r===`data`?t===`image`&&/^data:image\/(?:png|jpeg|gif|webp);base64,[A-Za-z0-9+/]+={0,2}$/i.test(n.replace(/\s+/g,``)):r===`http`||r===`https`||t===`link`&&(r===`mailto`||r===`tel`)}function Ag(e){return Object.hasOwn(gg,e)||e===`xlink:href`}function jg(e,t){return(e===`href`||e===`xlink:href`)&&t===`image`?`image`:e===`href`&&t===`base`?`source`:e===`xlink:href`?`link`:e===`src`?t===`img`||t===`image`?`image`:t===`iframe`||t===`frame`||t===`embed`?`frame`:t===`audio`||t===`video`||t===`source`||t===`track`?`media`:`source`:gg[e]??`source`}function Mg(e,t){return pg.has(t)||t.startsWith(`aria-`)||t.startsWith(`data-`)?!0:hg[e]?.has(t)??!1}function Ng(e){return/^on[a-z]/i.test(e)}function Pg(e,t){return fg.has(e)?!0:t&&mg.has(e)}function Fg(e){return[...e.enableJavaScript?[`allow-scripts`]:[],...e.enableExtendedHtml?[`allow-forms`]:[]].join(` `)}function Ig(e,t){return e.split(/\s+/).filter(Boolean).filter(e=>{let n=e.toLowerCase();return n===`allow-same-origin`||n===`allow-top-navigation`||n===`allow-top-navigation-by-user-activation`||n===`allow-parent-navigation`||n===`allow-popups`||n===`allow-popups-to-escape-sandbox`||n===`allow-modals`||n===`allow-downloads`||n===`allow-orientation-lock`||n===`allow-pointer-lock`||n===`allow-presentation`?!1:n===`allow-forms`?t.enableExtendedHtml:n===`allow-scripts`&&t.enableJavaScript}).join(` `)}function Lg(e,t){for(let n of e.childNodes)if(yd.isElementNode(n)&&n.tagName.toLowerCase()===t)return n;return null}function Rg(e){let t=``;for(let n of e.childNodes)t+=Am(n,{scriptingEnabled:!1});return t}function zg(e){return e.replace(/&/g,`&`).replace(/"/g,`"`).replace(/</g,`<`).replace(/>/g,`>`)}function Bg(e){return[`default-src 'none'`,e.enableExtendedHtml?`base-uri 'self' http: https:`:`base-uri 'none'`,e.enableExtendedHtml?`form-action http: https:`:`form-action 'none'`,`object-src 'none'`,`connect-src 'none'`,`media-src 'none'`,`font-src data:`,`img-src data:`,e.enableCss?`style-src 'unsafe-inline'`:`style-src 'none'`,e.enableJavaScript?`script-src 'unsafe-inline'`:`script-src 'none'`,e.enableExtendedHtml?`frame-src about: data: blob:`:`frame-src 'none'`].join(`; `)}function Vg(e,t){let n=Lg(t,`html`),r=n?Lg(n,`head`):null,i=n?Lg(n,`body`):null,a=r?Rg(r):``,o=Rg(i||n||t);e.bodyFallbacks.length>0&&(o=e.bodyFallbacks.map(e=>Am(Eg(e),{scriptingEnabled:!1})).join(``)+o);let s=zg(Bg(e.policy)),c=e=>(e?.attrs??[]).map(e=>` ${e.prefix?`${e.prefix}:`:``}${e.name}="${zg(e.value)}"`).join(``);return`<!doctype html><html${c(n)}><head${c(r)}><meta charset="utf-8"><meta http-equiv="Content-Security-Policy" content="${s}">${a}</head><body${c(i)}>${o}</body></html>`}function Hg(e,t){if(t.depth>=_g)return``;let n;try{n=Rm(e,{scriptingEnabled:!1,sourceCodeLocationInfo:!1})}catch{return``}let r={...t,source:e,lines:{starts:yg(e)},depth:t.depth+1,bodyFallbacks:[]};try{let e=Lg(n,`html`);return e&&(Ug(e,`html`,!0,r),Kg(e,r,!1)),Vg(r,n)}catch(e){if(e instanceof vg)throw e;return``}}function Ug(e,t,n,r){e.sourceCodeLocation;let i=[],a=!1;for(let o of e.attrs){let s=o.name.toLowerCase(),c=o.prefix?`${o.prefix}:${o.name}`:o.name,l=Cg(e,o,r);if(Ng(s)){if(!r.policy.enableJavaScript){xg(r,`local.html.capability`,`Author event handler attribute ${c} was disabled by the compile options.`,l.start,l.end,{key:`local.html.capability`,params:{feature:`event handlers`}});continue}i.push(o)}else if(s===`style`||Pg(s,n)){if(!r.policy.enableCss){xg(r,`local.html.capability`,`Author style attribute ${c} was disabled by the compile options.`,l.start,l.end,{key:`local.html.capability`,params:{feature:`CSS`}});continue}i.push(o)}else if(s===`srcset`||s===`imagesrcset`)xg(r,`local.html.unsafe-url`,`Unsafe URL in attribute ${c} was removed.`,l.start,l.end,{key:`local.html.unsafe-url`,params:{name:c}});else if(s===`srcdoc`&&t===`iframe`){let e=Hg(o.value,r);if(e===``)continue;o.value=e,i.push(o)}else s===`sandbox`&&t===`iframe`?(o.value=Ig(o.value,r.policy),a=!0,i.push(o)):Ag(s)&&!kg(o.value,jg(s,t))?xg(r,`local.html.unsafe-url`,`Unsafe URL in attribute ${c} was removed.`,l.start,l.end,{key:`local.html.unsafe-url`,params:{name:c}}):s===`target`&&/^_(?:top|parent)$/i.test(o.value.trim())?xg(r,`local.html.capability`,`Navigation target ${o.value} was disabled.`,l.start,l.end,{key:`local.html.capability`,params:{feature:`top-level navigation`}}):!r.policy.enableExtendedHtml&&!Mg(t,s)?xg(r,`local.html.attribute`,`HTML attribute ${c} on <${t}> is not supported; the element is shown as source.`,l.start,l.end,{key:`local.html.attribute`,params:{name:c,tag:t}}):i.push(o)}t===`iframe`&&!a&&i.push({name:`sandbox`,value:Fg(r.policy)}),e.attrs=i}function Wg(e,t,n){let r=Sg(e,t);wg(t,r.start,r.end);let i=e.tagName.toLowerCase(),a=e.namespaceURI===sg;if(ug.has(i))return t.bodyFallbacks.push(Tg(e,t)),xg(t,`local.html.extended`,`HTML element <${i}> requires enableExtendedHtml in this mode; it is shown as source.`,r.start,r.end,{key:`local.html.extended`,params:{name:i}}),[];if(!a&&!t.policy.enableCss&&dg.has(i))return xg(t,`local.html.capability`,`Author animation <${i}> was disabled by the compile options.`,r.start,r.end,{key:`local.html.capability`,params:{feature:`animation`}}),[];if(i===`script`)return t.policy.enableJavaScript?(Ug(e,i,a,t),[e]):(xg(t,`local.html.capability`,`Author JavaScript was disabled by the compile options.`,r.start,r.end,{key:`local.html.capability`,params:{feature:`JavaScript`}}),[]);if(i===`style`)return t.policy.enableCss?(Ug(e,i,a,t),[e]):(xg(t,`local.html.capability`,`Author CSS was disabled by the compile options.`,r.start,r.end,{key:`local.html.capability`,params:{feature:`CSS`}}),[]);if(i===`link`)return(e.attrs.find(e=>e.name.toLowerCase()===`rel`)?.value.toLowerCase()??``).split(/\s+/).includes(`stylesheet`)?t.policy.enableCss?(Ug(e,i,a,t),[e]):(xg(t,`local.html.capability`,`Author CSS was disabled by the compile options.`,r.start,r.end,{key:`local.html.capability`,params:{feature:`CSS`}}),[]):t.policy.enableExtendedHtml?(Ug(e,i,a,t),[e]):Gg(e,t);if(i===`meta`){if(!t.policy.enableExtendedHtml)return Gg(e,t);let n=e.attrs.find(e=>e.name.toLowerCase()===`http-equiv`)?.value.trim().toLowerCase()??``;return n===`refresh`||n===`content-security-policy`||n===`set-cookie`?(xg(t,`local.html.capability`,`Author metadata ${n} was disabled.`,r.start,r.end,{key:`local.html.capability`,params:{feature:`document metadata`}}),[]):(Ug(e,i,a,t),[e])}return(i===`title`||i===`html`||i===`head`||i===`body`)&&!t.policy.enableExtendedHtml&&i===`title`||!(a&&(cg.has(i)||lg.has(i))||t.policy.enableExtendedHtml)?Gg(e,t,n):(Ug(e,i,a,t),i===`template`?(Kg(yd.getTemplateContent(e),t,!1),[e]):(Kg(e,t,n),[e]))}function Gg(e,t,n=!1){let r=e.tagName.toLowerCase(),i=Sg(e,t);return xg(t,`local.html.extended`,`HTML element <${r}> requires enableExtendedHtml in this mode; it is shown as source.`,i.start,i.end,{key:`local.html.extended`,params:{name:r}}),n?(t.bodyFallbacks.push(Tg(e,t)),[]):[Eg(Tg(e,t))]}function Kg(e,t,n){let r=[];for(let i of e.childNodes)if(yd.isTextNode(i))wg(t,0,0),r.push(i);else if(yd.isCommentNode(i))wg(t,0,0),r.push(i);else if(!yd.isDocumentTypeNode(i)&&yd.isElementNode(i)){let e=i.tagName.toLowerCase(),a=n||e===`head`;r.push(...Wg(i,t,a))}e.childNodes=r}function qg(e,t,n){let r=[],i={policy:t,source:e,lines:{starts:yg(e)},diagnostics:r,maxNodes:n,depth:0,budget:{nodes:0},bodyFallbacks:[],stopped:!1},a;try{a=Rm(e,{scriptingEnabled:!1,sourceCodeLocationInfo:!0})}catch(e){return{markup:Vg(i,yd.createDocument()),diagnostics:[{code:`local.parse`,message:`Cannot parse the HTML document: ${e instanceof Error?e.message:String(e)}`,severity:`error`,range:{start:0,end:0},line:1,column:1,messageKey:`local.parse.document`,params:{detail:e instanceof Error?e.message:String(e)}}]}}try{let e=Lg(a,`html`);e?(Ug(e,`html`,!0,i),Kg(e,i,!1)):Kg(a,i,!1)}catch(e){if(e instanceof vg){let t=bg(i,e.start,e.end);return{markup:``,diagnostics:[{code:`local.budget`,message:e.message,severity:`error`,range:{start:t.start,end:t.end},line:t.line,column:t.column,messageKey:`local.budget.nodes`,params:{limit:e.limit}}]}}return{markup:``,diagnostics:[{code:`local.parse`,message:`Cannot parse the HTML document: ${e instanceof Error?e.message:String(e)}`,severity:`error`,range:{start:0,end:0},line:1,column:1,messageKey:`local.parse.document`,params:{detail:e instanceof Error?e.message:String(e)}}]}}return{markup:Vg(i,a),diagnostics:r}}var Jg=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,Yg=/^[A-Za-z_][A-Za-z0-9_]*$/,Xg=1e-9,Zg=128,Qg=4,$g=3,e_=new Set([`x`,`y`,`true`,`false`,`null`,`pi`,`e`]);function t_(e){let t=e.trim();if(!Jg.test(t))return null;let n=Number(t);return Number.isFinite(n)?n:null}function n_(e){return e===``||ye(e)!==null}function r_(e){return Array.isArray(e)?e.slice():e}function i_(e,t,n){let r=(e-t)/n;return Math.abs(r-Math.round(r))<=Xg*Math.max(1,Math.abs(r))}function a_(e,t,n){let r=e??0,i=e===void 0?-1/0:Math.ceil((e-r)/n),a=t===void 0?1/0:Math.floor((t-r)/n);if(i>a)return null;let o=-r/n,s=null;for(let e of[Math.floor(o),Math.ceil(o)]){let t=Math.min(a,Math.max(i,e));if(!Number.isFinite(t))continue;if(s===null){s=t;continue}let o=r+t*n,c=r+s*n;(Math.abs(o)<Math.abs(c)||Math.abs(o)===Math.abs(c)&&o<c)&&(s=t)}if(s===null)return null;let c=r+s*n;return e!==void 0&&c<e||t!==void 0&&c>t?null:c}function o_(e){let t=[],n=[];for(let r=0;r<e.length;){if(e[r]===`\\`&&e.startsWith(`{{`,r+1)){r+=3;continue}if(!e.startsWith(`{{`,r)){r++;continue}let i=``,a=r+2;for(;a<e.length-1;a++){let t=e[a];if(i)t===`\\`?a++:t===i&&(i=``);else if(t===`"`||t===`'`)i=t;else if(t===`}`&&e[a+1]===`}`)break}if(a>=e.length-1){n.push(r);break}let o=e.slice(r+2,a),s=o.length-o.trimStart().length;t.push({expression:o.trim(),start:r+2+s,end:a}),r=a+2}return{segments:t,unterminated:n}}function s_(e){let t=/^\s*\{\{([\s\S]*)\}\}\s*$/.exec(e);if(!t)return null;let n=t[1],r=n.length-n.trimStart().length,i=e.indexOf(`{{`);return{expression:n.trim(),start:i+2+r}}function c_(e){return e.type===`comment`||e.type===`text`&&!(e.value??``).trim()||e.type===`paragraph`&&!e.children?.length&&!(e.value??``).trim()}function l_(e){return(e??[]).filter(e=>!c_(e))}function u_(e){return e.type===`text`||e.type===`inlineCode`||e.type===`fallback`?e.value??``:e.type===`interpolation`?`\0`:e.type===`break`?` `:(e.children??[]).map(u_).join(``)}function d_(e){return e.type===`interpolation`||(e.children??[]).some(d_)}function f_(e){return e.type===`component`||(e.children??[]).some(f_)}function p_(e){switch(e){case`string`:return`string`;case`number`:return`number`;case`boolean`:return`boolean`;case`null`:return`null`;case`array`:return`array`;case`number-array`:return`number-array`}}function m_(e,t){if(typeof e!=`string`||e.length>1e6)return{ok:!1,diagnostics:[{code:typeof e==`string`?`local.budget`:`local.parse`,message:typeof e==`string`?`Document exceeds the ${S}-character limit.`:`Document source must be a string.`,severity:`error`,range:{start:0,end:typeof e==`string`&&e.length?1:0},line:1,column:1,messageKey:typeof e==`string`?`local.budget.document`:`local.parse.source`,...typeof e==`string`?{params:{limit:S}}:{}}]};let n=qg(e,t.html,t.maxSyntaxNodes);return n.diagnostics.some(e=>e.severity===`error`)?{ok:!1,diagnostics:n.diagnostics}:{ok:!0,document:{syntax:`local`,source:e,syntaxVersion:Bm,html:t.html,nodes:[{type:`htmlDocument`,id:`local-0`,range:{start:0,end:e.length},value:n.markup}],initialState:{},bindings:{}},diagnostics:n.diagnostics}}function h_(e,t){let n=Oh(t);if(!n.ok)return{ok:!1,diagnostics:[{code:`local.options.invalid`,message:n.message,severity:`error`,range:{start:0,end:0},line:1,column:1,messageKey:n.key}]};if(n.htmlActive)return m_(e,n);if(typeof e!=`string`||e.length>1e6)return{ok:!1,diagnostics:Qh(e,t).diagnostics};let r=[],i=[0];for(let t=0;t<e.length;t+=1)e[t]===`
|
|
58
|
-
`&&i.push(t+1);let a=(t,n,a,o=a+1,s)=>{if(r.length>=100){let e=r.length-1;for(;e>=0&&r[e].severity!==`warning`;)--e;if(e<0)return;r.splice(e,1)}let c=Math.max(0,Math.min(e.length,a)),l=Math.max(c,Math.min(e.length,Math.max(c,o))),u=0,d=i.length-1;for(;u<d;){let e=Math.ceil((u+d)/2);i[e]<=c?u=e:d=e-1}let f=ze(s?.key??t,s?.params);r.push({code:t,message:n.length>2e3?`${n.slice(0,D-1)}…`:n,severity:`error`,range:{start:c,end:l},line:u+1,column:c-i[u]+1,messageKey:f.key,...f.params?{params:f.params}:{}})},o;try{o=Qh(e,t)}catch(e){return a(`local.parse`,`Cannot parse document: ${e instanceof Error?e.message:String(e)}`,0,void 0,{key:`local.parse.document`,params:{detail:e instanceof Error?e.message:String(e)}}),{ok:!1,diagnostics:r}}if(r.push(...o.diagnostics),r.some(e=>e.severity===`error`&&e.code.startsWith(`local.version.`)))return{ok:!1,diagnostics:r.filter(e=>e.code.startsWith(`local.version.`))};for(let e of g_(o.nodes))a(`local.legacy`,`Legacy reactive-md configuration fences (state/data/computed/actions, etc.) are not part of the local interaction syntax; select legacy mode explicitly in the host.`,e.range.start,e.range.end,{key:`local.legacy`});let s={source:e,lineStarts:i,nodes:o.nodes,report:a,entries:[],attrs:new Map,options:new Map,tabs:new Map,steps:new Map,selections:new Map,diagramNodes:new Map,checklists:new Map,tables:new Map,tableShapes:new Map,bindingSlots:Object.create(null),bindingKinds:{},computationKinds:{},computations:{},expressionKinds:new Map};__(o.nodes,null,s.entries,s);for(let e of s.entries)s.attrs.set(e.node.id,b_(e,s)),C_(e,s);for(let e of s.entries)T_(e,s);bv(s);let c=N_(s);s.bindingKinds=P_(c),Z_(s),ev(s),sv(s);let l=cv(s);fv(s),_v(s);let u={};for(let[e,t]of Object.entries(c))u[e]=r_(t.initial);if(tv(s,c,u),r.sort((e,t)=>e.range.start-t.range.start||e.range.end-t.range.end),r.some(e=>e.severity===`error`))return{ok:!1,diagnostics:r};let d=J_(s),f=Object.keys(s.computations),p={syntax:`local`,source:e,syntaxVersion:Bm,...o.versionDeclaration?{versionDeclaration:o.versionDeclaration}:{},nodes:$_(o.nodes),initialState:u,bindings:c,theme:o.theme??lh.name,...o.themeRange?{themeRange:o.themeRange}:{},...d?{bindingSlots:d}:{},...f.length?{computations:s.computations}:{},...l.length?{validations:l}:{}};return Wn(p),yv(p,s.tableShapes),{ok:!0,document:p,diagnostics:r}}function g_(e){let t=[],n=e=>{for(let r of e)r.type===`code`&&(r.lang??``).trim().toLowerCase()===`reactive-md`&&t.push(r),r.children&&n(r.children)};return n(e),t}function __(e,t,n,r){for(let i of e){let e=t;if(i.type===`component`&&i.name){let a=rh(i.name);if(a){let r={node:i,name:i.name,schema:a,parent:t};n.push(r),e=r}else{let e=i.name.length<=Zg?oh(i.name):void 0;r.report(`local.component.unknown`,`Unknown component <${i.name}>. ${e?`Did you mean <${e}>?`:`This mode only accepts local interaction components.`}`,i.range.start,i.range.end,{key:e?`local.component.unknown.suggestion`:`local.component.unknown`,params:e?{name:i.name,suggestion:e}:{name:i.name}})}}i.children&&__(i.children,e,n,r)}}function v_(e,t,n){let r=``,i=t;for(;i<n;i+=1){let t=e[i];if(r)t===r&&(r=``);else if(t===`"`||t===`'`)r=t;else if(t===`>`){i+=1;break}}return e.slice(t,i)}function y_(e,t,n){if(n.length>Zg)return t.node.range.start;let r=v_(e.source,t.node.range.start,t.node.range.end),i=RegExp(`(?:^|[\\s"'/])${n.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}(?=\\s|=|/|>)`).exec(r);return i?t.node.range.start+i.index+(i[0].length-n.length):t.node.range.start}function b_(e,t){let n={},r=e.node.attrs??{};for(let[i,a]of Object.entries(r)){let r=e.schema.props[i],o=y_(t,e,i);if(!r){let n=i.length<=Zg?sh(e.schema,i):void 0;t.report(`local.attribute.unknown`,`Component <${e.name}> does not support attribute ${i}.${n?` Did you mean ${n}?`:``}`,o,o+i.length,{key:n?`local.attribute.unknown.suggestion`:`local.attribute.unknown`,params:n?{component:e.name,name:i,suggestion:n}:{component:e.name,name:i}});continue}let s={raw:a,offset:o,dynamic:!1};if(r.kind===`string`&&a.length>1e5&&(t.report(`local.budget.attribute`,`Attribute ${i} on component <${e.name}> exceeds the ${w}-character limit.`,o,o+i.length,{key:`local.budget.attribute`,params:{name:i,component:e.name,limit:w}}),s.raw=a.slice(0,w)),x_(e,i,r,s,t),r.color){let n=o_(s.raw);n.segments.length||n.unterminated.length||qn(s.raw)||t.report(`local.attribute.color`,`Attribute ${i} on component <${e.name}> must be a standard CSS named color or #RGB/#RRGGBB, got "${s.raw}".`,o,o+i.length,{key:`local.attribute.color`,params:{name:i,component:e.name,value:s.raw}})}n[i]=s}for(let[r,i]of Object.entries(e.schema.props))i.required&&!Object.hasOwn(n,r)&&t.report(`local.attribute.required`,`Component <${e.name}> is missing required attribute ${r}.`,e.node.range.start,e.node.range.end,{key:`local.attribute.required`,params:{component:e.name,name:r}});return e.schema.label===`required`&&(Object.hasOwn(n,`label`)?String(n.label.raw).trim()||t.report(`local.label.required`,`Component <${e.name}> label cannot be empty.`,n.label.offset,void 0,{key:`local.label.required.empty`,params:{component:e.name}}):t.report(`local.label.required`,`Component <${e.name}> requires a label.`,e.node.range.start,e.node.range.end,{key:`local.label.required.missing`,params:{component:e.name}})),n}function x_(e,t,n,r,i){if(n.kind===`string`){if(n.static){let e=o_(r.raw);(e.segments.length||e.unterminated.length)&&i.report(`local.attribute.static`,`Attribute ${t} is static and cannot contain interpolations.`,r.offset,r.offset+r.raw.length,{key:`local.attribute.static`,params:{name:t}})}r.value=r.raw;return}if(n.kind===`number`){let e=n.dynamic?s_(r.raw):null;if(e){r.dynamic=!0,r.expression=e.expression,r.expressionOffset=r.offset+e.start,e.expression||i.report(`local.expression.empty`,`Attribute ${t} interpolation cannot be empty.`,r.expressionOffset,void 0,{key:`local.expression.empty.attribute`,params:{name:t}});return}let a=t_(r.raw);if(a===null){i.report(`local.attribute.type`,`Attribute ${t} requires a number${n.dynamic?` or a full number interpolation`:``}, got "${r.raw}".`,r.offset,r.offset+r.raw.length,{key:n.dynamic?`local.attribute.type.number-interpolation`:`local.attribute.type.number`,params:{name:t,value:r.raw}});return}n.integer&&!Number.isInteger(a)&&i.report(`local.attribute.type`,`Attribute ${t} requires an integer.`,r.offset,void 0,{key:`local.attribute.type.integer`,params:{name:t}}),n.positive&&!(a>0)&&i.report(`local.attribute.type`,`Attribute ${t} requires a positive number.`,r.offset,void 0,{key:`local.attribute.type.positive`,params:{name:t}}),n.min!==void 0&&a<n.min&&i.report(`local.attribute.range`,`Attribute ${t} must be at least ${n.min}.`,r.offset,void 0,{key:`local.attribute.range.min`,params:{name:t,min:n.min}}),n.max!==void 0&&a>n.max&&i.report(`local.attribute.range`,`Attribute ${t} must be at most ${n.max}.`,r.offset,void 0,{key:`local.attribute.range.max`,params:{name:t,max:n.max}}),r.value=a;return}if(n.kind===`boolean`){let e=n.dynamic?s_(r.raw):null;if(e){r.dynamic=!0,r.expression=e.expression,r.expressionOffset=r.offset+e.start,e.expression||i.report(`local.expression.empty`,`Attribute ${t} interpolation cannot be empty.`,r.expressionOffset,void 0,{key:`local.expression.empty.attribute`,params:{name:t}});return}if(r.raw===`true`||r.raw===`false`){r.value=r.raw===`true`;return}i.report(`local.attribute.type`,`Attribute ${t} requires true or false${n.dynamic?`, or a full boolean interpolation`:``}.`,r.offset,r.offset+r.raw.length,{key:n.dynamic?`local.attribute.type.boolean-interpolation`:`local.attribute.type.boolean`,params:{name:t}});return}let a=n.dynamic?s_(r.raw):null;if(a){r.dynamic=!0,r.expression=a.expression,r.expressionOffset=r.offset+a.start,a.expression||i.report(`local.expression.empty`,`Attribute ${t} interpolation cannot be empty.`,r.expressionOffset,void 0,{key:`local.expression.empty.attribute`,params:{name:t}});return}let o=n.values??[];o.includes(r.raw)?r.value=r.raw:i.report(`local.attribute.type`,`Attribute ${t} must be one of ${o.join(` / `)}, got "${r.raw}".`,r.offset,r.offset+r.raw.length,{key:`local.attribute.type.enum`,params:{name:t,values:o.join(` / `),value:r.raw}})}function S_(e,t,n){let r=t[n];if(r)return!r.dynamic&&typeof r.value==`number`?r.value:void 0;let i=e.schema.props[n]?.default;return typeof i==`number`?i:void 0}function C_(e,t){let n=t.attrs.get(e.node.id)??{},r=t.report;if(e.name===`number`||e.name===`slider`||e.name===`counter`){let t=S_(e,n,`min`),i=S_(e,n,`max`),a=S_(e,n,`step`);t!==void 0&&i!==void 0&&t>i&&r(`local.constraint`,`Component <${e.name}> min cannot exceed max.`,n.min?.offset??e.node.range.start,void 0,{key:`local.constraint.number-min-max`,params:{component:e.name}}),a!==void 0&&!(a>0)&&r(`local.constraint`,`Component <${e.name}> step must be greater than 0.`,n.step?.offset??e.node.range.start,void 0,{key:`local.constraint.number-step`,params:{component:e.name}})}if(e.name===`input`||e.name===`textarea`){let t=S_(e,n,`min-length`)??0,i=S_(e,n,`max-length`);i!==void 0&&i<t&&r(`local.constraint`,`max-length cannot be less than min-length.`,n[`max-length`]?.offset??e.node.range.start,void 0,{key:`local.constraint.length-order`})}if(e.name===`date`){let t=typeof n.min?.value==`string`?n.min.value:void 0,i=typeof n.max?.value==`string`?n.max.value:void 0;t!==void 0&&!n_(t)&&r(`local.attribute.type`,`Date lower bound ${t} is not a valid YYYY-MM-DD.`,n.min?.offset??e.node.range.start,void 0,{key:`local.attribute.type.date-lower`,params:{value:t}}),i!==void 0&&!n_(i)&&r(`local.attribute.type`,`Date upper bound ${i} is not a valid YYYY-MM-DD.`,n.max?.offset??e.node.range.start,void 0,{key:`local.attribute.type.date-upper`,params:{value:i}}),t&&i&&t>i&&r(`local.constraint`,`Date min cannot be later than max.`,n.min?.offset??e.node.range.start,void 0,{key:`local.constraint.date-order`})}if(e.name===`progress`){let t=S_(e,n,`max`)??100,i=n.value;i&&!i.dynamic&&typeof i.value==`number`&&(i.value<0||i.value>t)&&r(`local.constraint`,`progress value must be between 0 and ${t}, got ${i.value}.`,i.offset,void 0,{key:`local.constraint.progress-range`,params:{max:t,value:i.value}})}if(e.name===`plot`){let t=S_(e,n,`min`),i=S_(e,n,`max`);t!==void 0&&i!==void 0&&!(t<i)&&r(`local.constraint`,`plot min must be less than max.`,n.min?.offset??e.node.range.start,void 0,{key:`local.constraint.plot-range`})}if(e.name===`timer`){let t=S_(e,n,`duration`)??60;(!Number.isInteger(t)||t<=0)&&r(`local.constraint`,`timer duration must be a positive whole number of seconds.`,n.duration?.offset??e.node.range.start,void 0,{key:`local.constraint.timer-duration`})}if(e.name===`range-slider`){let t=S_(e,n,`min`)??0,i=S_(e,n,`max`)??100,a=S_(e,n,`step`)??1;t<=i||r(`local.constraint`,`range-slider min cannot exceed max.`,n.min?.offset??e.node.range.start,void 0,{key:`local.constraint.range-slider-min-max`}),a>0&&Number.isFinite(a)||r(`local.constraint`,`range-slider step must be a finite positive number.`,n.step?.offset??e.node.range.start,void 0,{key:`local.constraint.range-slider-step`})}if(e.name===`coordinate`){for(let t of[`x`,`y`])(S_(e,n,`${t}-min`)??-5)<=(S_(e,n,`${t}-max`)??5)||r(`local.constraint`,`coordinate ${t}-min cannot exceed ${t}-max.`,n[`${t}-min`]?.offset??e.node.range.start,void 0,{key:`local.constraint.coordinate-axis`,params:{axis:t}});let t=S_(e,n,`step`)??1;t>0&&Number.isFinite(t)||r(`local.constraint`,`coordinate step must be a finite positive number.`,n.step?.offset??e.node.range.start,void 0,{key:`local.constraint.coordinate-step`})}if(e.name===`multi-select`){let t=S_(e,n,`max-selected`);t!==void 0&&(!Number.isInteger(t)||t<0)&&r(`local.constraint`,`multi-select max-selected must be a nonnegative whole number.`,n[`max-selected`]?.offset??e.node.range.start,void 0,{key:`local.constraint.multi-select`})}if((e.name===`table`||e.name===`chart`)&&!Object.hasOwn(n,`key`))for(let t of[`bind`,`initial`])Object.hasOwn(n,t)&&r(`local.selection.key`,`<${e.name}> ${t} requires a key attribute naming the selection column.`,n[t].offset,void 0,{key:`local.selection.key.required`,params:{component:e.name,name:t}})}function w_(e){return(e.node.children??[]).filter(e=>e.type===`component`&&!!e.name).map(t=>({node:t,name:t.name,schema:rh(t.name),parent:e})).filter(e=>!!e.schema)}function T_(e,t){let n=t.attrs.get(e.node.id)??{},r=l_(e.node.children),i=t.report,a=e.schema.childRule;switch(e.schema.parent&&(e.parent&&e.schema.parent.includes(e.parent.name)||i(`local.structure.parent`,`<${e.name}> can only appear directly inside ${e.schema.parent.map(e=>`<${e}>`).join(` or `)}.`,e.node.range.start,e.node.range.end,{key:`local.structure.parent`,params:{name:e.name,parents:e.schema.parent.map(e=>`<${e}>`).join(` / `)}})),a){case`none`:r.length&&i(`local.structure.children`,`<${e.name}> does not accept body content.`,r[0].range.start,r[0].range.end,{key:`local.structure.no-body`,params:{name:e.name}});break;case`inline`:if(e.name===`text`||e.name===`jump`){let t=new Set([`text`,`emphasis`,`strong`,`delete`,`underline`,`mark`,`link`,`image`,`inlineCode`,`inlineMath`,`interpolation`,`break`,`comment`,`fallback`,`footnoteReference`]),n=e=>t.has(e.type)&&(e.children??[]).every(n);(r.length===1&&r[0].type===`paragraph`?r[0].children??[]:r).every(n)||i(`local.structure.children`,`<${e.name}> only accepts inline Markdown.`,e.node.range.start,e.node.range.end,{key:`local.structure.inline-only`,params:{name:e.name}})}for(let t of r)f_(t)&&i(`local.structure.children`,`The body of <${e.name}> cannot contain other interactive components.`,t.range.start,t.range.end,{key:`local.structure.no-nested-components`,params:{name:e.name}});break;case`content`:e.name===`node`&&E_(e,t);break;case`any`:break;case`options`:D_(e,t,n);break;case`tabs`:O_(e,t);break;case`disclosures`:{let t=w_(e),n=t.filter(e=>e.name===`disclosure`);if(n.length||i(`local.structure.children`,`<accordion> requires at least one <disclosure>.`,e.node.range.start,e.node.range.end,{key:`local.structure.accordion.needs-disclosure`}),n.length!==t.length)for(let e of t)e.name!==`disclosure`&&i(`local.structure.children`,`<accordion> can only contain <disclosure>.`,e.node.range.start,e.node.range.end,{key:`local.structure.accordion.only-disclosure`});r.some(e=>e.type!==`component`)&&i(`local.structure.children`,`<accordion> can only contain <disclosure>.`,e.node.range.start,e.node.range.end,{key:`local.structure.accordion.only-disclosure`});break}case`cards`:{let t=w_(e),n=t.filter(e=>e.name===`card`);if(n.length||i(`local.structure.children`,`<grid> requires at least one <card>.`,e.node.range.start,e.node.range.end,{key:`local.structure.grid.needs-card`}),n.length!==t.length)for(let e of t)e.name!==`card`&&i(`local.structure.children`,`Direct children of <grid> must be <card>.`,e.node.range.start,e.node.range.end,{key:`local.structure.grid.only-card`});r.some(e=>e.type!==`component`)&&i(`local.structure.children`,`Direct children of <grid> must be <card>.`,e.node.range.start,e.node.range.end,{key:`local.structure.grid.only-card`});break}case`diagram`:j_(e,t);break;case`table`:{let n=r.filter(e=>e.type===`table`);(n.length!==1||r.length!==1)&&i(`local.structure.children`,`The body of <${e.name}> must be exactly one Markdown table.`,e.node.range.start,e.node.range.end,{key:`local.structure.table.single`,params:{name:e.name}}),n.length?t.tables.set(e.node.id,n[0]):e.name===`table`&&r.length===1&&t.tables.set(e.node.id,r[0]);break}case`plot`:r.filter(e=>e.type===`math`).length||i(`local.structure.children`,`<plot> requires at least one $$...$$ formula block.`,e.node.range.start,e.node.range.end,{key:`local.structure.plot.needs-formula`});for(let e of r)e.type!==`math`&&i(`local.structure.children`,`The body of <plot> can only contain blank lines and $$...$$ formula blocks.`,e.range.start,e.range.end,{key:`local.structure.plot.only-formulas`});break;case`steps`:k_(e,t);break;case`quiz`:A_(e,t,n);break;case`columns`:{let t=w_(e),n=t.filter(e=>e.name===`column`);n.length||i(`local.structure.children`,`<data-table> requires at least one <column>.`,e.node.range.start,e.node.range.end),n.length>20&&i(`local.budget.data-table.columns`,`<data-table> supports at most 20 columns, but has ${n.length}.`,e.node.range.start,e.node.range.end);for(let e of t)e.name!==`column`&&i(`local.structure.children`,`<data-table> can only contain <column>.`,e.node.range.start,e.node.range.end);r.some(e=>e.type!==`component`)&&i(`local.structure.children`,`<data-table> can only contain <column>.`,e.node.range.start,e.node.range.end);break}}}function E_(e,t){let n=e=>{for(let r of e)r.type===`component`?t.report(`local.structure.children`,`The description of <node> cannot contain interactive components.`,r.range.start,r.range.end,{key:`local.structure.node.no-components`}):r.children&&n(r.children)};n(e.node.children??[])}function D_(e,t,n){let r=w_(e),i=r.filter(e=>e.name===`option`);i.length||t.report(`local.structure.children`,`<${e.name}> requires at least one <option value="...">.`,e.node.range.start,e.node.range.end,{key:`local.structure.options.needed`,params:{name:e.name}});for(let n of r)n.name!==`option`&&t.report(`local.structure.children`,`<${e.name}> can only contain <option>.`,n.node.range.start,n.node.range.end,{key:`local.structure.options.only`,params:{name:e.name}});l_(e.node.children).some(e=>e.type!==`component`)&&t.report(`local.structure.children`,`<${e.name}> can only contain <option>.`,e.node.range.start,e.node.range.end,{key:`local.structure.options.only`,params:{name:e.name}}),i.length>1e4&&t.report(`local.budget.array`,`<${e.name}> options exceed the limit of ${T}.`,e.node.range.start,e.node.range.end,{key:`local.budget.array.options`,params:{name:e.name,limit:T}});let a=[];for(let n of i){let r=t.attrs.get(n.node.id)??{},i=typeof r.value?.value==`string`?r.value.value:``;i?e.name===`multi-select`&&i.includes(`,`)?t.report(`local.option.value`,`<multi-select> option values cannot contain commas: "${i}".`,n.node.range.start,n.node.range.end,{key:`local.option.value.comma`,params:{value:i}}):a.includes(i)?t.report(`local.option.value`,`Option values in <${e.name}> must be unique; duplicate value "${i}".`,n.node.range.start,n.node.range.end,{key:`local.option.value.duplicate`,params:{name:e.name,value:i}}):((n.node.children??[]).some(f_)&&t.report(`local.structure.children`,`The body of <option> cannot contain interactive components.`,n.node.range.start,n.node.range.end,{key:`local.structure.option.no-components`}),a.push(i)):t.report(`local.option.value`,`<option> requires a non-empty value.`,n.node.range.start,n.node.range.end,{key:`local.option.value.required`})}t.options.set(e.node.id,a)}function O_(e,t){let n=w_(e),r=n.filter(e=>e.name===`tab`);r.length||t.report(`local.structure.children`,`<tabs> requires at least one <tab>.`,e.node.range.start,e.node.range.end,{key:`local.structure.tabs.needs-tab`});for(let e of n)e.name!==`tab`&&t.report(`local.structure.children`,`<tabs> can only contain <tab>.`,e.node.range.start,e.node.range.end,{key:`local.structure.tabs.only-tab`});l_(e.node.children).some(e=>e.type!==`component`)&&t.report(`local.structure.children`,`<tabs> can only contain <tab>.`,e.node.range.start,e.node.range.end,{key:`local.structure.tabs.only-tab`});let i=[];r.forEach((e,n)=>{let r=t.attrs.get(e.node.id)??{},a=(typeof r.value?.value==`string`?r.value.value.trim():``)||`tab-${n+1}`;i.includes(a)?t.report(`local.tab.value`,`Tab values in <tabs> must be unique; duplicate value "${a}".`,e.node.range.start,e.node.range.end,{key:`local.tab.value.duplicate`,params:{value:a}}):i.push(a)}),t.tabs.set(e.node.id,i)}function k_(e,t){let n=w_(e),r=n.filter(e=>e.name===`step`);r.length||t.report(`local.structure.children`,`<steps> requires at least one <step>.`,e.node.range.start,e.node.range.end,{key:`local.structure.steps.needs-step`});for(let e of n)e.name!==`step`&&t.report(`local.structure.children`,`<steps> can only contain <step>.`,e.node.range.start,e.node.range.end,{key:`local.structure.steps.only-step`});l_(e.node.children).some(e=>e.type!==`component`)&&t.report(`local.structure.children`,`<steps> can only contain <step>.`,e.node.range.start,e.node.range.end,{key:`local.structure.steps.only-step`});let i=[];r.forEach((e,n)=>{let r=t.attrs.get(e.node.id)??{},a=(typeof r.value?.value==`string`?r.value.value.trim():``)||`step-${n+1}`;i.includes(a)?t.report(`local.step.value`,`Step values in <steps> must be unique; duplicate value "${a}".`,e.node.range.start,e.node.range.end,{key:`local.step.value.duplicate`,params:{value:a}}):i.push(a)}),t.steps.set(e.node.id,i)}function A_(e,t,n){let r=typeof n.type?.value==`string`?n.type.value:`choice`,i=typeof n.answer?.value==`string`?n.answer.value:``;if(i.trim()||t.report(`local.quiz.answer`,`<quiz> requires a non-empty answer.`,n.answer?.offset??e.node.range.start,void 0,{key:`local.quiz.answer.required`}),r===`number`){l_(e.node.children).length&&t.report(`local.structure.children`,`A numeric <quiz> cannot have body content; use type="choice" for option-based quizzes.`,e.node.range.start,e.node.range.end,{key:`local.structure.quiz.numeric-no-body`}),i.trim()&&t_(i)===null&&t.report(`local.quiz.answer`,`A numeric <quiz> answer must be a finite number.`,n.answer?.offset??e.node.range.start,void 0,{key:`local.quiz.answer.numeric`});let r=S_(e,n,`tolerance`);r!==void 0&&(!Number.isFinite(r)||r<0)&&t.report(`local.constraint`,`<quiz> tolerance must be a nonnegative finite number.`,n.tolerance?.offset??e.node.range.start,void 0,{key:`local.constraint.quiz-tolerance`});return}D_(e,t,n);let a=t.options.get(e.node.id)??[];i.trim()&&a.length&&!a.includes(i)&&t.report(`local.quiz.answer`,`<quiz> answer "${i}" is not one of the option values: ${a.join(`, `)}.`,n.answer?.offset??e.node.range.start,void 0,{key:`local.quiz.answer.not-option`,params:{answer:i,options:a.join(`, `)}})}function j_(e,t){let n=w_(e),r=n.filter(e=>e.name===`node`),i=n.filter(e=>e.name===`edge`);r.length||t.report(`local.diagram.node`,`<diagram> requires at least one <node>.`,e.node.range.start,e.node.range.end,{key:`local.diagram.node.required`});for(let e of n)e.name!==`node`&&e.name!==`edge`&&t.report(`local.structure.children`,`<diagram> can only contain <node> and <edge>.`,e.node.range.start,e.node.range.end,{key:`local.structure.diagram.only`});l_(e.node.children).some(e=>e.type!==`component`)&&t.report(`local.structure.children`,`<diagram> can only contain <node> and <edge>.`,e.node.range.start,e.node.range.end,{key:`local.structure.diagram.only`});let a=[];for(let e of r){let n=t.attrs.get(e.node.id)??{},r=typeof n.id?.value==`string`?n.id.value:``;r&&(/^[A-Za-z_][A-Za-z0-9_-]*$/.test(r)||t.report(`local.diagram.node`,`Node ID "${r}" may only contain letters, digits, underscores and hyphens, and cannot start with a digit.`,e.node.range.start,e.node.range.end,{key:`local.diagram.node.invalid`,params:{id:r}}),a.includes(r)?t.report(`local.diagram.node`,`Duplicate node ID "${r}".`,e.node.range.start,e.node.range.end,{key:`local.diagram.node.duplicate`,params:{id:r}}):a.push(r))}t.diagramNodes.set(e.node.id,a);let o=new Set;for(let e of i){let n=t.attrs.get(e.node.id)??{},r=typeof n.from?.value==`string`?n.from.value:``,i=typeof n.to?.value==`string`?n.to.value:``,s=typeof n.label?.value==`string`?n.label.value:``;r&&!a.includes(r)&&t.report(`local.diagram.edge`,`Edge from references unknown node "${r}".`,e.node.range.start,e.node.range.end,{key:`local.diagram.edge.from`,params:{id:r}}),i&&!a.includes(i)&&t.report(`local.diagram.edge`,`Edge to references unknown node "${i}".`,e.node.range.start,e.node.range.end,{key:`local.diagram.edge.to`,params:{id:i}});let c=`${r}\u0000${i}\u0000${s}`;o.has(c)&&t.report(`local.diagram.edge`,`Duplicate edge: ${r} → ${i}${s?` (${s})`:``}.`,e.node.range.start,e.node.range.end,{key:`local.diagram.edge.duplicate`,params:{from:r,to:i,label:s?` (${s})`:``}}),o.add(c)}}function M_(e,t){let n=t.checklists.get(e.node.id);if(n)return n;let r=l_(e.node.children),i=r.filter(e=>e.type===`list`);(r.length!==1||i.length!==1)&&t.report(`local.checklist.body`,`The body of <checklist> must be exactly one single-level Markdown task list.`,e.node.range.start,e.node.range.end,{key:`local.checklist.body.single`});let a=i[0],o=[],s=[];if(!a)return t.checklists.set(e.node.id,{ids:o,checked:s}),{ids:o,checked:s};let c=a.children??[];c.length||t.report(`local.checklist.body`,`<checklist> requires at least one task list item.`,a.range.start,a.range.end,{key:`local.checklist.body.item-required`}),c.length>1e4&&t.report(`local.budget.array`,`<checklist> items exceed the limit of ${T}.`,a.range.start,a.range.end,{key:`local.checklist.body.items-limit`,params:{limit:T}}),c.slice(0,T).forEach((e,n)=>{if(e.type!==`listItem`||e.checked===null||e.checked===void 0){t.report(`local.checklist.body`,`<checklist> can only contain task list items (- [ ] / - [x]).`,e.range.start,e.range.end,{key:`local.checklist.body.task-only`});return}(e.children??[]).some(e=>e.type===`list`)&&t.report(`local.checklist.body`,`<checklist> does not support nested lists.`,e.range.start,e.range.end,{key:`local.checklist.body.no-nested`}),f_(e)&&t.report(`local.checklist.body`,`<checklist> items cannot contain interactive components.`,e.range.start,e.range.end,{key:`local.checklist.body.no-components`});let r=`item-${n+1}`;o.push(r),e.checked&&s.push(r)});let l={ids:o,checked:s};return t.checklists.set(e.node.id,l),l}function N_(e){let t=new Map;for(let n of e.entries){if(!n.schema.binding)continue;let r=e.attrs.get(n.node.id)??{};if((n.name===`table`||n.name===`chart`)&&!Object.hasOwn(r,`key`))continue;let i=typeof r.bind?.value==`string`?r.bind.value:``,a=i||`@${n.node.id}`;r.bind&&(i.length>Zg?(e.report(`local.budget.identifier`,`Parameter name exceeds the ${Zg}-character limit.`,r.bind.offset??n.node.range.start,void 0,{key:`local.budget.identifier`,params:{limit:Zg}}),a=`@${n.node.id}`):Yg.test(i)?(st.has(i)||e_.has(i))&&(e.report(`local.binding.reserved`,`Parameter name "${i}" is reserved; choose another name.`,r.bind.offset??n.node.range.start,void 0,{key:`local.binding.reserved`,params:{name:i}}),a=`@${n.node.id}`):(e.report(`local.binding.name`,`Parameter name "${i}" must match [A-Za-z_][A-Za-z0-9_]*.`,r.bind.offset??n.node.range.start,void 0,{key:`local.binding.name`,params:{name:i}}),a=`@${n.node.id}`));let o=t.get(a);o?o.members.push({entry:n,attrs:r}):t.set(a,{key:a,schema:n.schema,members:[{entry:n,attrs:r}]})}let n={};for(let r of t.values()){let t=I_(r,e);t&&(n[r.key]=t)}return G_(e,n),n}function P_(e){let t={};for(let[n,r]of Object.entries(e))n.startsWith(`@`)||(t[n]=r.type);return t}function F_(e,t,n){return n===`timer`?{min:0,max:S_(e,t,`duration`)??60,step:1}:{min:S_(e,t,`min`),max:S_(e,t,`max`),step:S_(e,t,`step`)??1}}function I_(e,t){let n=e.members[0],r=n.entry.schema.binding;if(!r)return null;let i=r.family;for(let a of e.members.slice(1))a.entry.schema.binding?.family!==i&&t.report(`local.binding.type`,`Parameter "${e.key}" is already declared as ${p_(r.kind)} by <${n.entry.name}> and cannot also bind <${a.entry.name}>.`,a.entry.node.range.start,a.entry.node.range.end,{key:`local.binding.type`,params:{key:e.key,kind:p_(r.kind),first:n.entry.name,second:a.entry.name}});if(r.exclusive&&e.members.length>1)for(let r of e.members.slice(1))t.report(`local.binding.exclusive`,`Parameter "${e.key}" of <${n.entry.name}> can only be owned by one component and cannot be shared with <${r.entry.name}>.`,r.entry.node.range.start,r.entry.node.range.end,{key:`local.binding.exclusive`,params:{key:e.key,first:n.entry.name,second:r.entry.name}});let a=B_(n.entry,t,i),o;if(r.kind===`number`){o=F_(n.entry,n.attrs,i);for(let r of e.members.slice(1)){let a=F_(r.entry,r.attrs,i);(a.min!==o.min||a.max!==o.max||a.step!==o.step)&&t.report(`local.binding.constraint`,`Parameter "${e.key}" must use the same numeric range and step: <${n.entry.name}> has ${L_(o)}, <${r.entry.name}> has ${L_(a)}.`,r.entry.node.range.start,r.entry.node.range.end,{key:`local.binding.constraint`,params:{key:e.key,first:n.entry.name,second:r.entry.name,firstConstraints:L_(o),secondConstraints:L_(a)}})}}if(i===`choice`||i===`selection`)for(let n of e.members.slice(1))B_(n.entry,t,i).join(`\0`)!==a.join(`\0`)&&t.report(`local.binding.option`,`Parameter "${e.key}" must use the same option set in the same order.`,n.entry.node.range.start,n.entry.node.range.end,{key:`local.binding.option`,params:{key:e.key}});let s=i===`multi-select`?S_(n.entry,n.attrs,`max-selected`):void 0,c=e.members.filter(e=>Object.hasOwn(e.attrs,`initial`)),l;if(c.length>1){let n=c.map(e=>R_(t,e.attrs.initial.offset)),r=Math.min(c.length,Qg);for(let i=0;i<r;i+=1){let r=[];for(let e=1;e<n.length&&r.length<$g;e+=1)r.push(n[(i+e)%n.length]);t.report(`local.initial.duplicate`,`Parameter "${e.key}" has multiple explicit initial values (${c.length} in total${r.length?`; see also line ${r.join(`, `)}`:``}).`,c[i].attrs.initial.offset,void 0,r.length?{key:`local.initial.duplicate-peers`,params:{key:e.key,count:c.length,lines:r.join(`, `)}}:{key:`local.initial.duplicate`,params:{key:e.key,count:c.length}})}}l=i===`multi-select`?c.length?V_(c[0],a,s,t):[]:c.length>0?H_(c[0],t,i,a):U_(n,t,i,a,o),i===`checklist`&&!Array.isArray(l)&&(l=[]),r.kind!==`array`&&W_(e,n,l,i,a,o,t),(i===`text`||i===`date`)&&z_(e,l,t);let u={name:e.key,nodeIds:e.members.map(e=>e.entry.node.id),type:r.kind,initial:r_(l),owner:n.entry.node.id};return o&&(o.min!==void 0&&(u.min=o.min),o.max!==void 0&&(u.max=o.max),u.step=o.step),a.length&&(u.options=[...a]),i===`multi-select`&&(u.maxItems=s??a.length),u}function L_(e){return`[${e.min===void 0?`-∞`:String(e.min)}, ${e.max===void 0?`∞`:String(e.max)}] / ${e.step}`}function R_(e,t){let n=Math.max(0,Math.min(e.source.length,t)),r=0,i=e.lineStarts.length-1;for(;r<i;){let t=Math.ceil((r+i)/2);e.lineStarts[t]<=n?r=t:i=t-1}return r+1}function z_(e,t,n){if(typeof t!=`string`||t===``)return;let r=e.members[0],i=r.attrs.initial?.offset??r.entry.node.range.start,a=tt(t);for(let r of e.members){let{entry:o,attrs:s}=r;if(o.name===`input`||o.name===`textarea`){let r=S_(o,s,`min-length`)??0,c=S_(o,s,`max-length`);a<r&&n.report(`local.initial.length`,`Initial value of parameter "${e.key}" has length ${a}, below the minimum length ${r} required by <${o.name}>.`,i,void 0,{key:`local.initial.length.min`,params:{key:e.key,length:a,min:r,name:o.name}}),c!==void 0&&a>c&&n.report(`local.initial.length`,`Initial value of parameter "${e.key}" has length ${a}, exceeding the maximum length ${c} allowed by <${o.name}>.`,i,void 0,{key:`local.initial.length.max`,params:{key:e.key,length:a,max:c,name:o.name}}),o.name===`input`&&(typeof s.type?.value==`string`?s.type.value:`text`)===`email`&&!N(t)&&n.report(`local.initial.email`,`Initial value of parameter "${e.key}" is not a valid email address.`,i,void 0,{key:`local.initial.email`,params:{key:e.key}})}else if(o.name===`date`&&n_(t)){let r=typeof s.min?.value==`string`&&n_(s.min.value)?s.min.value:void 0,a=typeof s.max?.value==`string`&&n_(s.max.value)?s.max.value:void 0;r&&t<r&&n.report(`local.initial.range`,`Initial value ${t} of parameter "${e.key}" is earlier than the minimum date ${r} of <date>.`,i,void 0,{key:`local.initial.date.min`,params:{key:e.key,value:t,min:r}}),a&&t>a&&n.report(`local.initial.range`,`Initial value ${t} of parameter "${e.key}" is later than the maximum date ${a} of <date>.`,i,void 0,{key:`local.initial.date.max`,params:{key:e.key,value:t,max:a}})}}}function B_(e,t,n){switch(n){case`choice`:case`multi-select`:return t.options.get(e.node.id)??[];case`tabs`:return t.tabs.get(e.node.id)??[];case`steps`:return t.steps.get(e.node.id)??[];case`selection`:return t.selections.get(e.node.id)??[``];case`diagram`:return t.diagramNodes.get(e.node.id)??[];case`checklist`:return M_(e,t).ids;default:return[]}}function V_(e,t,n,r){let i=e.attrs.initial;if(!i)return[];let a=typeof i.value==`string`?i.value:String(i.value??``),o=[];for(let n of a.split(`,`).map(e=>e.trim()).filter(Boolean))t.includes(n)?o.includes(n)||o.push(n):r.report(`local.initial.option`,`Initial value "${n}" of parameter "${e.entry.node.id}" is not an option of <multi-select>.`,i.offset,void 0,{key:`local.initial.option.multi-select`,params:{key:e.entry.node.id,value:n}});return n!==void 0&&o.length>n&&r.report(`local.initial.range`,`Initial values of <multi-select> exceed max-selected ${n}.`,i.offset,void 0,{key:`local.initial.multi-select`,params:{max:n}}),t.filter(e=>o.includes(e))}function H_(e,t,n,r){let i=e.attrs.initial;if(!i)return U_(e,t,n,r,void 0);let a=e.entry;if(n===`number`&&typeof i.value==`number`||n===`boolean`&&typeof i.value==`boolean`)return i.value;if(n===`number`||n===`boolean`)return t.report(`local.initial.type`,`Initial value of parameter "${a.node.id}" has the wrong type.`,i.offset,void 0,{key:`local.initial.type`,params:{name:a.node.id}}),n===`number`&&0;let o=typeof i.value==`string`?i.value:String(i.value??``);return n===`date`&&!n_(o)&&t.report(`local.initial.date`,`Initial date "${o}" is not a valid YYYY-MM-DD.`,i.offset,void 0,{key:`local.initial.date`,params:{value:o}}),n===`choice`&&r.length&&!r.includes(o)&&t.report(`local.initial.option`,`Initial value "${o}" is not an available option: ${r.join(`, `)}.`,i.offset,void 0,{key:`local.initial.value.option`,params:{value:o,options:r.join(`, `)}}),o}function U_(e,t,n,r,i){let a=e.entry;switch(n){case`text`:case`date`:return``;case`boolean`:return!1;case`choice`:return r[0]??``;case`tabs`:case`steps`:case`diagram`:return r[0]??``;case`selection`:return``;case`multi-select`:return[];case`timer`:return(i??F_(a,e.attrs,n)).max??60;case`checklist`:return[...M_(a,t).checked];case`number`:{let r=i??F_(a,e.attrs,n);if(a.schema.initialRule===`min`)return r.min??0;let o=a_(r.min,r.max,r.step);return o===null?(t.report(`local.initial.range`,`Parameter "${a.node.id}" has no valid step value within range [${r.min??`-∞`}, ${r.max??`∞`}].`,a.node.range.start,a.node.range.end,{key:`local.initial.no-step`,params:{key:a.node.id,min:r.min??`-∞`,max:r.max??`∞`}}),0):o}}return t.report(`local.initial`,`Cannot derive a default initial value for <${a.name}> parameter "${a.node.id}".`,a.node.range.start,a.node.range.end,{key:`local.initial.cannot-derive`,params:{name:a.name,key:a.node.id}}),``}function W_(e,t,n,r,i,a,o){let s=e.key;if(r===`number`){if(typeof n!=`number`||!Number.isFinite(n)){o.report(`local.initial.type`,`Initial value of parameter "${s}" must be a finite number.`,t.entry.node.range.start,void 0,{key:`local.initial.type.number`,params:{key:s}});return}let e=a??F_(t.entry,t.attrs,r);e.min!==void 0&&n<e.min&&o.report(`local.initial.range`,`Initial value ${n} of parameter "${s}" is below the minimum ${e.min}.`,t.attrs.initial?.offset??t.entry.node.range.start,void 0,{key:`local.initial.range.min`,params:{value:n,key:s,min:e.min}}),e.max!==void 0&&n>e.max&&o.report(`local.initial.range`,`Initial value ${n} of parameter "${s}" exceeds the maximum ${e.max}.`,t.attrs.initial?.offset??t.entry.node.range.start,void 0,{key:`local.initial.range.max`,params:{value:n,key:s,max:e.max}});let i=e.min??0;n>=(e.min??-1/0)&&n<=(e.max??1/0)&&!i_(n,i,e.step)&&o.report(`local.initial.step`,`Initial value ${n} of parameter "${s}" is not on step ${e.step} (based at ${e.min??0}).`,t.attrs.initial?.offset??t.entry.node.range.start,void 0,{key:`local.initial.range.step`,params:{value:n,key:s,step:e.step,base:e.min??0}})}else r===`boolean`&&typeof n!=`boolean`&&o.report(`local.initial.type`,`Initial value of parameter "${s}" must be a boolean.`,t.entry.node.range.start,void 0,{key:`local.initial.type.boolean`,params:{key:s}}),(r===`choice`||r===`tabs`||r===`steps`||r===`diagram`||r===`selection`)&&i.length&&!i.includes(String(n))&&o.report(`local.initial.option`,`Initial value "${String(n)}" of parameter "${s}" is not among the available values ${i.join(`, `)}.`,t.attrs.initial?.offset??t.entry.node.range.start,void 0,{key:`local.initial.value.options`,params:{value:String(n),key:s,options:i.join(`, `)}})}function G_(e,t){let n=new Set(Object.keys(t));for(let r of e.entries){let i=r.schema.slots;if(!i?.length)continue;let a=e.attrs.get(r.node.id)??{},o=Object.create(null),s=new Map;for(let c of i){let i=a[c.bind],l;if(i){let t=typeof i.value==`string`?i.value:``;t.length>Zg?e.report(`local.budget.identifier`,`Parameter name exceeds the ${Zg}-character limit.`,i.offset??r.node.range.start,void 0,{key:`local.budget.identifier`,params:{limit:Zg}}):Yg.test(t)?st.has(t)||e_.has(t)?e.report(`local.binding.reserved`,`Parameter name "${t}" is reserved; choose another name.`,i.offset??r.node.range.start,void 0,{key:`local.binding.reserved`,params:{name:t}}):l=t:e.report(`local.binding.name`,`Parameter name "${t}" must match [A-Za-z_][A-Za-z0-9_]*.`,i.offset??r.node.range.start,void 0,{key:`local.binding.name`,params:{name:t}})}let u=l??`@${r.node.id}:${c.name}`;l&&n.has(l)&&(e.report(`local.binding.exclusive`,`Parameter "${l}" of the ${c.name} slot of <${r.name}> is exclusive and cannot be shared with another control.`,i?.offset??r.node.range.start,void 0,{key:`local.binding.exclusive.slot`,params:{key:l,slot:c.name,name:r.name}}),u=`@${r.node.id}:${c.name}`),n.add(u);let d=K_(r,a,c.name),f=q_(r,a,c,d,e),p={name:u,nodeIds:[r.node.id],type:c.kind,initial:f,owner:r.node.id};d.min!==void 0&&(p.min=d.min),d.max!==void 0&&(p.max=d.max),p.step=d.step,t[u]=p,o[c.name]=u,s.set(c.name,u)}let c=s.get(`start`),l=s.get(`end`);if(c&&l){let n=t[c].initial,i=t[l].initial;typeof n==`number`&&typeof i==`number`&&n>i&&e.report(`local.initial.range`,`<range-slider> start ${n} cannot be greater than end ${i}.`,r.node.range.start,r.node.range.end,{key:`local.initial.range-slider`,params:{start:n,end:i}})}e.bindingSlots[r.node.id]=o}}function K_(e,t,n){return e.name===`coordinate`?{min:S_(e,t,`${n}-min`)??-5,max:S_(e,t,`${n}-max`)??5,step:S_(e,t,`step`)??1}:{min:S_(e,t,`min`)??0,max:S_(e,t,`max`)??100,step:S_(e,t,`step`)??1}}function q_(e,t,n,r,i){let a=r.min??0,o=t[n.initial];if(o&&typeof o.value==`number`){let t=o.value;return r.min!==void 0&&t<r.min&&i.report(`local.initial.range`,`Initial value ${t} of <${e.name}> ${n.initial} is below the minimum ${r.min}.`,o.offset,void 0,{key:`local.initial.slot.min`,params:{value:t,name:e.name,slot:n.initial,min:r.min}}),r.max!==void 0&&t>r.max&&i.report(`local.initial.range`,`Initial value ${t} of <${e.name}> ${n.initial} exceeds the maximum ${r.max}.`,o.offset,void 0,{key:`local.initial.slot.max`,params:{value:t,name:e.name,slot:n.initial,max:r.max}}),i_(t,a,r.step)||i.report(`local.initial.step`,`Initial value ${t} of <${e.name}> ${n.initial} is not on step ${r.step} (based at ${a}).`,o.offset,void 0,{key:`local.initial.slot.step`,params:{value:t,name:e.name,slot:n.initial,step:r.step,base:a}}),t}if(n.initialRule===`max-step`){let e=(r.max??a)-a,t=a+Math.max(0,Math.floor(e/r.step+Xg))*r.step;return Math.min(r.max??t,Math.max(r.min??t,t))}return n.initialRule===`min`?r.min??0:a_(r.min,r.max,r.step)??0}function J_(e){return Object.keys(e.bindingSlots).length?e.bindingSlots:void 0}function Y_(e,t){let n=e.source.lastIndexOf(`
|
|
55
|
+
`,t.end,!1),s=t.end}m(e.slice(s,n),s,!0),c.push(n);let h=ig.parse(o);function g(e){for(let t of e)t.type===`interpolation`&&t.value!==void 0&&(t.value=t.value.replace(/\\\|/g,`|`)),t.children&&g(t.children)}function _(e){let r=c[e.position?.start?.offset??0]??t,i=c[e.position?.end?.offset??o.length]??n;if(e.type===`image`){let t=l.get(e.position?.start?.offset);if(t&&e.position.end.offset===t.end&&e.url===`rmd-internal:placeholder`&&e.alt===t.marker)return l.delete(e.position.start.offset),t.node.type===`comment`?[]:[t.node]}if(e.type===`text`)return e.value?[y(`text`,r,i,{value:e.value})]:[];if(e.type===`footnoteReference`||e.type===`footnoteDefinition`){let t=typeof e.label==`string`&&e.label?e.label:String(e.identifier??``),n=Sh(String(e.identifier??t));if(e.type===`footnoteDefinition`){let a=e.children?.flatMap(_);return[y(`footnoteDefinition`,r,i,{identifier:n,label:t,children:a??[]})]}return[y(`footnoteReference`,r,i,{identifier:n,label:t})]}let s=e.children?.flatMap(_);if(e.type===`paragraph`&&s?.length===1&&(s[0].type===`math`||s[0].type===`fallback`||s[0].type===`footnoteDefinition`||Yh.has(s[0].type)||(s[0].type===`component`||s[0].type===`hostComponent`)&&!zh.has(s[0].name)))return s;if(e.type===`paragraph`&&!s?.length)return[];if(e.type===`html`)return a.literalHtml?typeof e.value==`string`&&e.value?[y(`text`,r,i,{value:e.value})]:[]:(x(`local.html`,`Raw HTML is not part of the local interaction syntax.`,r,i,{key:`local.html`}),[]);let u=y(e.type,r,i);for(let t of[`value`,`depth`,`ordered`,`start`,`checked`,`url`,`title`,`alt`,`lang`,`align`])e[t]!==void 0&&(u[t]=e[t]);return s&&(u.children=s),e.type===`table`&&u.children&&g(u.children),[u]}return h.children.flatMap(_)}function ve(t){let n=new Set,r=e=>{for(let t of e)t.type===`footnoteDefinition`&&t.identifier&&n.add(t.identifier),t.children&&r(t.children)};r(t);let i=t=>{for(let r of t)r.type!==`footnoteReference`||r.identifier&&n.has(r.identifier)||(r.type=`text`,r.value=e.slice(r.range.start,r.range.end),delete r.identifier,delete r.label),r.children&&i(r.children)};i(t)}try{let t=ge(0,e.length),r=_e(0,e.length,t.tokens);return ve(r),{nodes:r,diagnostics:n,...k?{versionDeclaration:k}:{},...w===void 0?{}:{theme:w},...T?{themeRange:T}:{}}}catch(e){return e instanceof ag?(x(e.code,e.message,e.start,e.end,{key:e.key,params:e.params}),{nodes:[],diagnostics:n}):(x(`local.parse`,`Cannot parse document: ${e instanceof Error?e.message:String(e)}`,0,void 0,{key:`local.parse.document`,params:{detail:e instanceof Error?e.message:String(e)}}),{nodes:[],diagnostics:n})}}var sg=`local.validation.failed`,cg=`local.validation.expression`,lg=`Validation failed.`;function ug(e){return e.length>2e3?`${e.slice(0,D-1)}…`:e}function dg(e){let t=e.trim();return t?t.split(/\s+/):[]}function fg(e){let t=[0];for(let n=0;n<e.length;n+=1)e[n]===`
|
|
56
|
+
`&&t.push(n+1);return t}function pg(e){if(!e||typeof e!=`object`)return!1;let t=e,n=t.range;return typeof t.expression==`string`&&typeof t.message==`string`&&Array.isArray(t.fields)&&!!n&&Number.isFinite(n.start)&&Number.isFinite(n.end)}function mg(e,t,n,r,i){let a=e.length,o=Math.max(0,Math.min(a,Math.trunc(n.start))),s=Math.max(o+1,Math.min(a,Math.trunc(n.end))),c=0,l=Math.max(0,t.length-1);for(;c<l;){let e=Math.ceil((c+l)/2);t[e]<=o?c=e:l=e-1}return{code:r,message:i,severity:`error`,range:{start:o,end:s},line:c+1,column:o-t[c]+1}}var hg=`http://www.w3.org/1999/xhtml`,gg=new Set(`b.strong.i.em.s.del.u.mark.sup.sub.br.hr.p.h1.h2.h3.h4.h5.h6.div.span.details.summary.blockquote.code.pre.ul.ol.li.a.img`.split(`.`)),_g=new Set([`html`,`head`,`body`]),vg=new Set([`frameset`,`frame`,`noframes`,`applet`]),yg=new Set([`animate`,`animatemotion`,`animatetransform`,`set`,`discard`]),bg=new Set(`alignment-baseline.baseline-shift.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-rendering.cursor.direction.display.dominant-baseline.fill.fill-opacity.fill-rule.filter.flood-color.flood-opacity.font.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.glyph-orientation-horizontal.glyph-orientation-vertical.image-rendering.kerning.letter-spacing.lighting-color.marker.marker-end.marker-mid.marker-start.mask.opacity.overflow.paint-order.pointer-events.shape-rendering.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.text-anchor.text-decoration.text-rendering.transform-origin.unicode-bidi.vector-effect.visibility.word-spacing.writing-mode`.split(`.`)),xg=new Set([`id`,`class`,`title`,`lang`,`dir`]),Sg=new Set([`align`,`bgcolor`,`background`,`face`,`text`,`link`,`alink`,`vlink`,`border`,`cellpadding`,`cellspacing`,`frame`,`rules`,`hspace`,`vspace`]),Cg={a:new Set([`href`]),img:new Set([`src`,`alt`,`width`,`height`]),ol:new Set([`start`]),details:new Set([`open`]),script:new Set([`type`,`src`,`async`,`defer`,`nomodule`,`crossorigin`,`integrity`,`referrerpolicy`]),style:new Set([`type`,`media`]),link:new Set([`rel`,`href`,`type`,`media`,`crossorigin`,`integrity`,`referrerpolicy`,`disabled`])},wg={href:`link`,action:`form`,formaction:`form`,poster:`image`,background:`image`,data:`frame`,src:`source`,cite:`link`,longdesc:`link`},Tg=4,Eg=class extends Error{start;end;limit;constructor(e,t,n){super(`Syntax nodes exceed the limit of ${n}.`),this.start=e,this.end=t,this.limit=n,this.name=`HtmlBudgetError`}};function Dg(e){let t=[0];for(let n=0;n<e.length;n+=1)e[n]===`
|
|
57
|
+
`&&t.push(n+1);return t}function Og(e,t,n){let r=e.source.length,i=Math.max(0,Math.min(r,t)),a=Math.max(i,Math.min(r,Math.max(i,n))),o=0,s=e.lines.starts.length-1;for(;o<s;){let t=Math.ceil((o+s)/2);e.lines.starts[t]<=i?o=t:s=t-1}return{start:i,end:a,line:o+1,column:i-e.lines.starts[o]+1}}function kg(e,t,n,r,i,a){if(e.diagnostics.length>=100)return;let o=Og(e,r,i),s=ze(a?.key??t,a?.params);e.diagnostics.push({code:t,message:n,severity:`warning`,range:{start:o.start,end:o.end},line:o.line,column:o.column,messageKey:s.key,...s.params?{params:s.params}:{}})}function Ag(e,t){let n=e.sourceCodeLocation,r=n&&Number.isInteger(n.startOffset)?n.startOffset:0,i=n&&Number.isInteger(n.endOffset)?n.endOffset:r;return{start:Math.max(0,Math.min(t.source.length,r)),end:Math.max(0,Math.min(t.source.length,i))}}function jg(e,t,n){let r=e.sourceCodeLocation?.attrs,i=r&&(r[t.name]??(t.prefix?r[`${t.prefix}:${t.name}`]:void 0));return i&&Number.isInteger(i.startOffset)&&Number.isInteger(i.endOffset)?{start:i.startOffset,end:i.endOffset}:Ag(e,n)}function Mg(e,t,n){if(e.budget.nodes+=1,e.budget.nodes>e.maxNodes)throw new Eg(t,n,e.maxNodes)}function Ng(e,t){let n=Ag(e,t);return t.source.slice(n.start,n.end).replace(/\u0000/g,`�`)}function Pg(e){return yd.createTextNode(e.replace(/\u0000/g,`�`))}function Fg(e){return e.replace(/[\u0000- \u007f-\u009f]+/g,``)}function Ig(e){let t=/^([a-z][a-z0-9+.-]*):/i.exec(Fg(e));return t?t[1].toLowerCase():null}function Lg(e,t){let n=e.trim();if(n===``)return!0;let r=Ig(n);return r===null?!0:r===`javascript`||r===`vbscript`?!1:r===`data`?t===`image`&&/^data:image\/(?:png|jpeg|gif|webp);base64,[A-Za-z0-9+/]+={0,2}$/i.test(n.replace(/\s+/g,``)):r===`http`||r===`https`||t===`link`&&(r===`mailto`||r===`tel`)}function Rg(e){return Object.hasOwn(wg,e)||e===`xlink:href`}function zg(e,t){return(e===`href`||e===`xlink:href`)&&t===`image`?`image`:e===`href`&&t===`base`?`source`:e===`xlink:href`?`link`:e===`src`?t===`img`||t===`image`?`image`:t===`iframe`||t===`frame`||t===`embed`?`frame`:t===`audio`||t===`video`||t===`source`||t===`track`?`media`:`source`:wg[e]??`source`}function Bg(e,t){return xg.has(t)||t.startsWith(`aria-`)||t.startsWith(`data-`)?!0:Cg[e]?.has(t)??!1}function Vg(e){return/^on[a-z]/i.test(e)}function Hg(e,t){return bg.has(e)?!0:t&&Sg.has(e)}function Ug(e){return[...e.enableJavaScript?[`allow-scripts`]:[],...e.enableExtendedHtml?[`allow-forms`]:[]].join(` `)}function Wg(e,t){return e.split(/\s+/).filter(Boolean).filter(e=>{let n=e.toLowerCase();return n===`allow-same-origin`||n===`allow-top-navigation`||n===`allow-top-navigation-by-user-activation`||n===`allow-parent-navigation`||n===`allow-popups`||n===`allow-popups-to-escape-sandbox`||n===`allow-modals`||n===`allow-downloads`||n===`allow-orientation-lock`||n===`allow-pointer-lock`||n===`allow-presentation`?!1:n===`allow-forms`?t.enableExtendedHtml:n===`allow-scripts`&&t.enableJavaScript}).join(` `)}function Gg(e,t){for(let n of e.childNodes)if(yd.isElementNode(n)&&n.tagName.toLowerCase()===t)return n;return null}function Kg(e){let t=``;for(let n of e.childNodes)t+=Am(n,{scriptingEnabled:!1});return t}function qg(e){return e.replace(/&/g,`&`).replace(/"/g,`"`).replace(/</g,`<`).replace(/>/g,`>`)}function Jg(e){return[`default-src 'none'`,e.enableExtendedHtml?`base-uri 'self' http: https:`:`base-uri 'none'`,e.enableExtendedHtml?`form-action http: https:`:`form-action 'none'`,`object-src 'none'`,`connect-src 'none'`,`media-src 'none'`,`font-src data:`,`img-src data:`,e.enableCss?`style-src 'unsafe-inline'`:`style-src 'none'`,e.enableJavaScript?`script-src 'unsafe-inline'`:`script-src 'none'`,e.enableExtendedHtml?`frame-src about: data: blob:`:`frame-src 'none'`].join(`; `)}function Yg(e,t){let n=Gg(t,`html`),r=n?Gg(n,`head`):null,i=n?Gg(n,`body`):null,a=r?Kg(r):``,o=Kg(i||n||t);e.bodyFallbacks.length>0&&(o=e.bodyFallbacks.map(e=>Am(Pg(e),{scriptingEnabled:!1})).join(``)+o);let s=qg(Jg(e.policy)),c=e=>(e?.attrs??[]).map(e=>` ${e.prefix?`${e.prefix}:`:``}${e.name}="${qg(e.value)}"`).join(``);return`<!doctype html><html${c(n)}><head${c(r)}><meta charset="utf-8"><meta http-equiv="Content-Security-Policy" content="${s}">${a}</head><body${c(i)}>${o}</body></html>`}function Xg(e,t){if(t.depth>=Tg)return``;let n;try{n=Rm(e,{scriptingEnabled:!1,sourceCodeLocationInfo:!1})}catch{return``}let r={...t,source:e,lines:{starts:Dg(e)},depth:t.depth+1,bodyFallbacks:[]};try{let e=Gg(n,`html`);return e&&(Zg(e,`html`,!0,r),e_(e,r,!1)),Yg(r,n)}catch(e){if(e instanceof Eg)throw e;return``}}function Zg(e,t,n,r){e.sourceCodeLocation;let i=[],a=!1;for(let o of e.attrs){let s=o.name.toLowerCase(),c=o.prefix?`${o.prefix}:${o.name}`:o.name,l=jg(e,o,r);if(Vg(s)){if(!r.policy.enableJavaScript){kg(r,`local.html.capability`,`Author event handler attribute ${c} was disabled by the compile options.`,l.start,l.end,{key:`local.html.capability`,params:{feature:`event handlers`}});continue}i.push(o)}else if(s===`style`||Hg(s,n)){if(!r.policy.enableCss){kg(r,`local.html.capability`,`Author style attribute ${c} was disabled by the compile options.`,l.start,l.end,{key:`local.html.capability`,params:{feature:`CSS`}});continue}i.push(o)}else if(s===`srcset`||s===`imagesrcset`)kg(r,`local.html.unsafe-url`,`Unsafe URL in attribute ${c} was removed.`,l.start,l.end,{key:`local.html.unsafe-url`,params:{name:c}});else if(s===`srcdoc`&&t===`iframe`){let e=Xg(o.value,r);if(e===``)continue;o.value=e,i.push(o)}else s===`sandbox`&&t===`iframe`?(o.value=Wg(o.value,r.policy),a=!0,i.push(o)):Rg(s)&&!Lg(o.value,zg(s,t))?kg(r,`local.html.unsafe-url`,`Unsafe URL in attribute ${c} was removed.`,l.start,l.end,{key:`local.html.unsafe-url`,params:{name:c}}):s===`target`&&/^_(?:top|parent)$/i.test(o.value.trim())?kg(r,`local.html.capability`,`Navigation target ${o.value} was disabled.`,l.start,l.end,{key:`local.html.capability`,params:{feature:`top-level navigation`}}):!r.policy.enableExtendedHtml&&!Bg(t,s)?kg(r,`local.html.attribute`,`HTML attribute ${c} on <${t}> is not supported; the element is shown as source.`,l.start,l.end,{key:`local.html.attribute`,params:{name:c,tag:t}}):i.push(o)}t===`iframe`&&!a&&i.push({name:`sandbox`,value:Ug(r.policy)}),e.attrs=i}function Qg(e,t,n){let r=Ag(e,t);Mg(t,r.start,r.end);let i=e.tagName.toLowerCase(),a=e.namespaceURI===hg;if(vg.has(i))return t.bodyFallbacks.push(Ng(e,t)),kg(t,`local.html.extended`,`HTML element <${i}> requires enableExtendedHtml in this mode; it is shown as source.`,r.start,r.end,{key:`local.html.extended`,params:{name:i}}),[];if(!a&&!t.policy.enableCss&&yg.has(i))return kg(t,`local.html.capability`,`Author animation <${i}> was disabled by the compile options.`,r.start,r.end,{key:`local.html.capability`,params:{feature:`animation`}}),[];if(i===`script`)return t.policy.enableJavaScript?(Zg(e,i,a,t),[e]):(kg(t,`local.html.capability`,`Author JavaScript was disabled by the compile options.`,r.start,r.end,{key:`local.html.capability`,params:{feature:`JavaScript`}}),[]);if(i===`style`)return t.policy.enableCss?(Zg(e,i,a,t),[e]):(kg(t,`local.html.capability`,`Author CSS was disabled by the compile options.`,r.start,r.end,{key:`local.html.capability`,params:{feature:`CSS`}}),[]);if(i===`link`)return(e.attrs.find(e=>e.name.toLowerCase()===`rel`)?.value.toLowerCase()??``).split(/\s+/).includes(`stylesheet`)?t.policy.enableCss?(Zg(e,i,a,t),[e]):(kg(t,`local.html.capability`,`Author CSS was disabled by the compile options.`,r.start,r.end,{key:`local.html.capability`,params:{feature:`CSS`}}),[]):t.policy.enableExtendedHtml?(Zg(e,i,a,t),[e]):$g(e,t);if(i===`meta`){if(!t.policy.enableExtendedHtml)return $g(e,t);let n=e.attrs.find(e=>e.name.toLowerCase()===`http-equiv`)?.value.trim().toLowerCase()??``;return n===`refresh`||n===`content-security-policy`||n===`set-cookie`?(kg(t,`local.html.capability`,`Author metadata ${n} was disabled.`,r.start,r.end,{key:`local.html.capability`,params:{feature:`document metadata`}}),[]):(Zg(e,i,a,t),[e])}return(i===`title`||i===`html`||i===`head`||i===`body`)&&!t.policy.enableExtendedHtml&&i===`title`||!(a&&(gg.has(i)||_g.has(i))||t.policy.enableExtendedHtml)?$g(e,t,n):(Zg(e,i,a,t),i===`template`?(e_(yd.getTemplateContent(e),t,!1),[e]):(e_(e,t,n),[e]))}function $g(e,t,n=!1){let r=e.tagName.toLowerCase(),i=Ag(e,t);return kg(t,`local.html.extended`,`HTML element <${r}> requires enableExtendedHtml in this mode; it is shown as source.`,i.start,i.end,{key:`local.html.extended`,params:{name:r}}),n?(t.bodyFallbacks.push(Ng(e,t)),[]):[Pg(Ng(e,t))]}function e_(e,t,n){let r=[];for(let i of e.childNodes)if(yd.isTextNode(i))Mg(t,0,0),r.push(i);else if(yd.isCommentNode(i))Mg(t,0,0),r.push(i);else if(!yd.isDocumentTypeNode(i)&&yd.isElementNode(i)){let e=i.tagName.toLowerCase(),a=n||e===`head`;r.push(...Qg(i,t,a))}e.childNodes=r}function t_(e,t,n){let r=[],i={policy:t,source:e,lines:{starts:Dg(e)},diagnostics:r,maxNodes:n,depth:0,budget:{nodes:0},bodyFallbacks:[],stopped:!1},a;try{a=Rm(e,{scriptingEnabled:!1,sourceCodeLocationInfo:!0})}catch(e){return{markup:Yg(i,yd.createDocument()),diagnostics:[{code:`local.parse`,message:`Cannot parse the HTML document: ${e instanceof Error?e.message:String(e)}`,severity:`error`,range:{start:0,end:0},line:1,column:1,messageKey:`local.parse.document`,params:{detail:e instanceof Error?e.message:String(e)}}]}}try{let e=Gg(a,`html`);e?(Zg(e,`html`,!0,i),e_(e,i,!1)):e_(a,i,!1)}catch(e){if(e instanceof Eg){let t=Og(i,e.start,e.end);return{markup:``,diagnostics:[{code:`local.budget`,message:e.message,severity:`error`,range:{start:t.start,end:t.end},line:t.line,column:t.column,messageKey:`local.budget.nodes`,params:{limit:e.limit}}]}}return{markup:``,diagnostics:[{code:`local.parse`,message:`Cannot parse the HTML document: ${e instanceof Error?e.message:String(e)}`,severity:`error`,range:{start:0,end:0},line:1,column:1,messageKey:`local.parse.document`,params:{detail:e instanceof Error?e.message:String(e)}}]}}return{markup:Yg(i,a),diagnostics:r}}var n_=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,r_=/^[A-Za-z_][A-Za-z0-9_]*$/,i_=1e-9,a_=128,o_=4,s_=3,c_=new Set([`x`,`y`,`true`,`false`,`null`,`pi`,`e`]);function l_(e){let t=e.trim();if(!n_.test(t))return null;let n=Number(t);return Number.isFinite(n)?n:null}function u_(e){return e===``||ye(e)!==null}function d_(e){return Array.isArray(e)?e.slice():e}function f_(e,t,n){let r=(e-t)/n;return Math.abs(r-Math.round(r))<=i_*Math.max(1,Math.abs(r))}function p_(e,t,n){let r=e??0,i=e===void 0?-1/0:Math.ceil((e-r)/n),a=t===void 0?1/0:Math.floor((t-r)/n);if(i>a)return null;let o=-r/n,s=null;for(let e of[Math.floor(o),Math.ceil(o)]){let t=Math.min(a,Math.max(i,e));if(!Number.isFinite(t))continue;if(s===null){s=t;continue}let o=r+t*n,c=r+s*n;(Math.abs(o)<Math.abs(c)||Math.abs(o)===Math.abs(c)&&o<c)&&(s=t)}if(s===null)return null;let c=r+s*n;return e!==void 0&&c<e||t!==void 0&&c>t?null:c}function m_(e){let t=[],n=[];for(let r=0;r<e.length;){if(e[r]===`\\`&&e.startsWith(`{{`,r+1)){r+=3;continue}if(!e.startsWith(`{{`,r)){r++;continue}let i=``,a=r+2;for(;a<e.length-1;a++){let t=e[a];if(i)t===`\\`?a++:t===i&&(i=``);else if(t===`"`||t===`'`)i=t;else if(t===`}`&&e[a+1]===`}`)break}if(a>=e.length-1){n.push(r);break}let o=e.slice(r+2,a),s=o.length-o.trimStart().length;t.push({expression:o.trim(),start:r+2+s,end:a}),r=a+2}return{segments:t,unterminated:n}}function h_(e){let t=/^\s*\{\{([\s\S]*)\}\}\s*$/.exec(e);if(!t)return null;let n=t[1],r=n.length-n.trimStart().length,i=e.indexOf(`{{`);return{expression:n.trim(),start:i+2+r}}function g_(e){return e.type===`comment`||e.type===`text`&&!(e.value??``).trim()||e.type===`paragraph`&&!e.children?.length&&!(e.value??``).trim()}function __(e){return(e??[]).filter(e=>!g_(e))}function v_(e){return e.type===`text`||e.type===`inlineCode`||e.type===`fallback`?e.value??``:e.type===`interpolation`?`\0`:e.type===`break`?` `:(e.children??[]).map(v_).join(``)}function y_(e){return e.type===`interpolation`||(e.children??[]).some(y_)}function b_(e){return e.type===`component`||(e.children??[]).some(b_)}function x_(e){switch(e){case`string`:return`string`;case`number`:return`number`;case`boolean`:return`boolean`;case`null`:return`null`;case`array`:return`array`;case`number-array`:return`number-array`}}function S_(e,t){if(typeof e!=`string`||e.length>1e6)return{ok:!1,diagnostics:[{code:typeof e==`string`?`local.budget`:`local.parse`,message:typeof e==`string`?`Document exceeds the ${S}-character limit.`:`Document source must be a string.`,severity:`error`,range:{start:0,end:typeof e==`string`&&e.length?1:0},line:1,column:1,messageKey:typeof e==`string`?`local.budget.document`:`local.parse.source`,...typeof e==`string`?{params:{limit:S}}:{}}]};let n=t_(e,t.html,t.maxSyntaxNodes);return n.diagnostics.some(e=>e.severity===`error`)?{ok:!1,diagnostics:n.diagnostics}:{ok:!0,document:{syntax:`local`,source:e,syntaxVersion:Bm,html:t.html,nodes:[{type:`htmlDocument`,id:`local-0`,range:{start:0,end:e.length},value:n.markup}],initialState:{},bindings:{}},diagnostics:n.diagnostics}}function C_(e,t){let n=Ih(t);if(!n.ok)return{ok:!1,diagnostics:[{code:`local.options.invalid`,message:n.message,severity:`error`,range:{start:0,end:0},line:1,column:1,messageKey:n.key,...n.detail===void 0?{}:{params:{detail:n.detail}}}]};if(n.htmlActive)return S_(e,n);if(typeof e!=`string`||e.length>1e6)return{ok:!1,diagnostics:og(e,t).diagnostics};let r=[],i=[0];for(let t=0;t<e.length;t+=1)e[t]===`
|
|
58
|
+
`&&i.push(t+1);let a=(t,n,a,o=a+1,s)=>{if(r.length>=100){let e=r.length-1;for(;e>=0&&r[e].severity!==`warning`;)--e;if(e<0)return;r.splice(e,1)}let c=Math.max(0,Math.min(e.length,a)),l=Math.max(c,Math.min(e.length,Math.max(c,o))),u=0,d=i.length-1;for(;u<d;){let e=Math.ceil((u+d)/2);i[e]<=c?u=e:d=e-1}let f=ze(s?.key??t,s?.params);r.push({code:t,message:n.length>2e3?`${n.slice(0,D-1)}…`:n,severity:`error`,range:{start:c,end:l},line:u+1,column:c-i[u]+1,messageKey:f.key,...f.params?{params:f.params}:{}})},o;try{o=og(e,t)}catch(e){return a(`local.parse`,`Cannot parse document: ${e instanceof Error?e.message:String(e)}`,0,void 0,{key:`local.parse.document`,params:{detail:e instanceof Error?e.message:String(e)}}),{ok:!1,diagnostics:r}}if(r.push(...o.diagnostics),r.some(e=>e.severity===`error`&&e.code.startsWith(`local.version.`)))return{ok:!1,diagnostics:r.filter(e=>e.code.startsWith(`local.version.`))};for(let e of w_(o.nodes))a(`local.legacy`,`Legacy reactive-md configuration fences (state/data/computed/actions, etc.) are not part of the local interaction syntax; select legacy mode explicitly in the host.`,e.range.start,e.range.end,{key:`local.legacy`});let s={source:e,lineStarts:i,nodes:o.nodes,diagnostics:r,report:a,entries:[],attrs:new Map,options:new Map,tabs:new Map,steps:new Map,selections:new Map,diagramNodes:new Map,checklists:new Map,tables:new Map,tableShapes:new Map,bindingSlots:Object.create(null),bindingKinds:{},computationKinds:{},computations:{},expressionKinds:new Map};T_(o.nodes,null,s.entries,s);for(let e of s.entries)s.attrs.set(e.node.id,O_(e,s)),j_(e,s);for(let e of s.entries)N_(e,s);Ov(s);let c=V_(s);s.bindingKinds=H_(c),av(s),cv(s),hv(s);let l=gv(s);bv(s),Tv(s);let u={};for(let[e,t]of Object.entries(c))u[e]=d_(t.initial);if(lv(s,c,u),Mv(o.nodes,n.hostByName,s),r.sort((e,t)=>e.range.start-t.range.start||e.range.end-t.range.end),r.some(e=>e.severity===`error`))return{ok:!1,diagnostics:r};let d=nv(s),f=Object.keys(s.computations),p={syntax:`local`,source:e,syntaxVersion:Bm,...o.versionDeclaration?{versionDeclaration:o.versionDeclaration}:{},nodes:sv(o.nodes),initialState:u,bindings:c,theme:o.theme??uh.name,...o.themeRange?{themeRange:o.themeRange}:{},...d?{bindingSlots:d}:{},...f.length?{computations:s.computations}:{},...l.length?{validations:l}:{}};return Wn(p),Dv(p,s.tableShapes),{ok:!0,document:p,diagnostics:r}}function w_(e){let t=[],n=e=>{for(let r of e)r.type===`code`&&(r.lang??``).trim().toLowerCase()===`reactive-md`&&t.push(r),r.children&&n(r.children)};return n(e),t}function T_(e,t,n,r){for(let i of e){let e=t;if(i.type===`component`&&i.name){let a=rh(i.name);if(a){let r={node:i,name:i.name,schema:a,parent:t};n.push(r),e=r}else{let e=i.name.length<=a_?oh(i.name):void 0;r.report(`local.component.unknown`,`Unknown component <${i.name}>. ${e?`Did you mean <${e}>?`:`This mode only accepts local interaction components.`}`,i.range.start,i.range.end,{key:e?`local.component.unknown.suggestion`:`local.component.unknown`,params:e?{name:i.name,suggestion:e}:{name:i.name}})}}i.children&&T_(i.children,e,n,r)}}function E_(e,t,n){let r=``,i=t;for(;i<n;i+=1){let t=e[i];if(r)t===r&&(r=``);else if(t===`"`||t===`'`)r=t;else if(t===`>`){i+=1;break}}return e.slice(t,i)}function D_(e,t,n){if(n.length>a_)return t.range.start;let r=E_(e.source,t.range.start,t.range.end),i=RegExp(`(?:^|[\\s"'/])${n.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}(?=\\s|=|/|>)`).exec(r);return i?t.range.start+i.index+(i[0].length-n.length):t.range.start}function O_(e,t){let n={},r=e.node.attrs??{};for(let[i,a]of Object.entries(r)){let r=e.schema.props[i],o=D_(t,e.node,i);if(!r){let n=i.length<=a_?sh(e.schema,i):void 0;t.report(`local.attribute.unknown`,`Component <${e.name}> does not support attribute ${i}.${n?` Did you mean ${n}?`:``}`,o,o+i.length,{key:n?`local.attribute.unknown.suggestion`:`local.attribute.unknown`,params:n?{component:e.name,name:i,suggestion:n}:{component:e.name,name:i}});continue}let s={raw:a,offset:o,dynamic:!1};if(r.kind===`string`&&a.length>1e5&&(t.report(`local.budget.attribute`,`Attribute ${i} on component <${e.name}> exceeds the ${w}-character limit.`,o,o+i.length,{key:`local.budget.attribute`,params:{name:i,component:e.name,limit:w}}),s.raw=a.slice(0,w)),k_(e,i,r,s,t),r.color){let n=m_(s.raw);n.segments.length||n.unterminated.length||qn(s.raw)||t.report(`local.attribute.color`,`Attribute ${i} on component <${e.name}> must be a standard CSS named color or #RGB/#RRGGBB, got "${s.raw}".`,o,o+i.length,{key:`local.attribute.color`,params:{name:i,component:e.name,value:s.raw}})}n[i]=s}for(let[r,i]of Object.entries(e.schema.props))i.required&&!Object.hasOwn(n,r)&&t.report(`local.attribute.required`,`Component <${e.name}> is missing required attribute ${r}.`,e.node.range.start,e.node.range.end,{key:`local.attribute.required`,params:{component:e.name,name:r}});return e.schema.label===`required`&&(Object.hasOwn(n,`label`)?String(n.label.raw).trim()||t.report(`local.label.required`,`Component <${e.name}> label cannot be empty.`,n.label.offset,void 0,{key:`local.label.required.empty`,params:{component:e.name}}):t.report(`local.label.required`,`Component <${e.name}> requires a label.`,e.node.range.start,e.node.range.end,{key:`local.label.required.missing`,params:{component:e.name}})),n}function k_(e,t,n,r,i){if(n.kind===`string`){if(n.static){let e=m_(r.raw);(e.segments.length||e.unterminated.length)&&i.report(`local.attribute.static`,`Attribute ${t} is static and cannot contain interpolations.`,r.offset,r.offset+r.raw.length,{key:`local.attribute.static`,params:{name:t}})}r.value=r.raw;return}if(n.kind===`number`){let e=n.dynamic?h_(r.raw):null;if(e){r.dynamic=!0,r.expression=e.expression,r.expressionOffset=r.offset+e.start,e.expression||i.report(`local.expression.empty`,`Attribute ${t} interpolation cannot be empty.`,r.expressionOffset,void 0,{key:`local.expression.empty.attribute`,params:{name:t}});return}let a=l_(r.raw);if(a===null){i.report(`local.attribute.type`,`Attribute ${t} requires a number${n.dynamic?` or a full number interpolation`:``}, got "${r.raw}".`,r.offset,r.offset+r.raw.length,{key:n.dynamic?`local.attribute.type.number-interpolation`:`local.attribute.type.number`,params:{name:t,value:r.raw}});return}n.integer&&!Number.isInteger(a)&&i.report(`local.attribute.type`,`Attribute ${t} requires an integer.`,r.offset,void 0,{key:`local.attribute.type.integer`,params:{name:t}}),n.positive&&!(a>0)&&i.report(`local.attribute.type`,`Attribute ${t} requires a positive number.`,r.offset,void 0,{key:`local.attribute.type.positive`,params:{name:t}}),n.min!==void 0&&a<n.min&&i.report(`local.attribute.range`,`Attribute ${t} must be at least ${n.min}.`,r.offset,void 0,{key:`local.attribute.range.min`,params:{name:t,min:n.min}}),n.max!==void 0&&a>n.max&&i.report(`local.attribute.range`,`Attribute ${t} must be at most ${n.max}.`,r.offset,void 0,{key:`local.attribute.range.max`,params:{name:t,max:n.max}}),r.value=a;return}if(n.kind===`boolean`){let e=n.dynamic?h_(r.raw):null;if(e){r.dynamic=!0,r.expression=e.expression,r.expressionOffset=r.offset+e.start,e.expression||i.report(`local.expression.empty`,`Attribute ${t} interpolation cannot be empty.`,r.expressionOffset,void 0,{key:`local.expression.empty.attribute`,params:{name:t}});return}if(r.raw===`true`||r.raw===`false`){r.value=r.raw===`true`;return}i.report(`local.attribute.type`,`Attribute ${t} requires true or false${n.dynamic?`, or a full boolean interpolation`:``}.`,r.offset,r.offset+r.raw.length,{key:n.dynamic?`local.attribute.type.boolean-interpolation`:`local.attribute.type.boolean`,params:{name:t}});return}let a=n.dynamic?h_(r.raw):null;if(a){r.dynamic=!0,r.expression=a.expression,r.expressionOffset=r.offset+a.start,a.expression||i.report(`local.expression.empty`,`Attribute ${t} interpolation cannot be empty.`,r.expressionOffset,void 0,{key:`local.expression.empty.attribute`,params:{name:t}});return}let o=n.values??[];o.includes(r.raw)?r.value=r.raw:i.report(`local.attribute.type`,`Attribute ${t} must be one of ${o.join(` / `)}, got "${r.raw}".`,r.offset,r.offset+r.raw.length,{key:`local.attribute.type.enum`,params:{name:t,values:o.join(` / `),value:r.raw}})}function A_(e,t,n){let r=t[n];if(r)return!r.dynamic&&typeof r.value==`number`?r.value:void 0;let i=e.schema.props[n]?.default;return typeof i==`number`?i:void 0}function j_(e,t){let n=t.attrs.get(e.node.id)??{},r=t.report;if(e.name===`number`||e.name===`slider`||e.name===`counter`){let t=A_(e,n,`min`),i=A_(e,n,`max`),a=A_(e,n,`step`);t!==void 0&&i!==void 0&&t>i&&r(`local.constraint`,`Component <${e.name}> min cannot exceed max.`,n.min?.offset??e.node.range.start,void 0,{key:`local.constraint.number-min-max`,params:{component:e.name}}),a!==void 0&&!(a>0)&&r(`local.constraint`,`Component <${e.name}> step must be greater than 0.`,n.step?.offset??e.node.range.start,void 0,{key:`local.constraint.number-step`,params:{component:e.name}})}if(e.name===`input`||e.name===`textarea`){let t=A_(e,n,`min-length`)??0,i=A_(e,n,`max-length`);i!==void 0&&i<t&&r(`local.constraint`,`max-length cannot be less than min-length.`,n[`max-length`]?.offset??e.node.range.start,void 0,{key:`local.constraint.length-order`})}if(e.name===`date`){let t=typeof n.min?.value==`string`?n.min.value:void 0,i=typeof n.max?.value==`string`?n.max.value:void 0;t!==void 0&&!u_(t)&&r(`local.attribute.type`,`Date lower bound ${t} is not a valid YYYY-MM-DD.`,n.min?.offset??e.node.range.start,void 0,{key:`local.attribute.type.date-lower`,params:{value:t}}),i!==void 0&&!u_(i)&&r(`local.attribute.type`,`Date upper bound ${i} is not a valid YYYY-MM-DD.`,n.max?.offset??e.node.range.start,void 0,{key:`local.attribute.type.date-upper`,params:{value:i}}),t&&i&&t>i&&r(`local.constraint`,`Date min cannot be later than max.`,n.min?.offset??e.node.range.start,void 0,{key:`local.constraint.date-order`})}if(e.name===`progress`){let t=A_(e,n,`max`)??100,i=n.value;i&&!i.dynamic&&typeof i.value==`number`&&(i.value<0||i.value>t)&&r(`local.constraint`,`progress value must be between 0 and ${t}, got ${i.value}.`,i.offset,void 0,{key:`local.constraint.progress-range`,params:{max:t,value:i.value}})}if(e.name===`plot`){let t=A_(e,n,`min`),i=A_(e,n,`max`);t!==void 0&&i!==void 0&&!(t<i)&&r(`local.constraint`,`plot min must be less than max.`,n.min?.offset??e.node.range.start,void 0,{key:`local.constraint.plot-range`})}if(e.name===`timer`){let t=A_(e,n,`duration`)??60;(!Number.isInteger(t)||t<=0)&&r(`local.constraint`,`timer duration must be a positive whole number of seconds.`,n.duration?.offset??e.node.range.start,void 0,{key:`local.constraint.timer-duration`})}if(e.name===`range-slider`){let t=A_(e,n,`min`)??0,i=A_(e,n,`max`)??100,a=A_(e,n,`step`)??1;t<=i||r(`local.constraint`,`range-slider min cannot exceed max.`,n.min?.offset??e.node.range.start,void 0,{key:`local.constraint.range-slider-min-max`}),a>0&&Number.isFinite(a)||r(`local.constraint`,`range-slider step must be a finite positive number.`,n.step?.offset??e.node.range.start,void 0,{key:`local.constraint.range-slider-step`})}if(e.name===`coordinate`){for(let t of[`x`,`y`])(A_(e,n,`${t}-min`)??-5)<=(A_(e,n,`${t}-max`)??5)||r(`local.constraint`,`coordinate ${t}-min cannot exceed ${t}-max.`,n[`${t}-min`]?.offset??e.node.range.start,void 0,{key:`local.constraint.coordinate-axis`,params:{axis:t}});let t=A_(e,n,`step`)??1;t>0&&Number.isFinite(t)||r(`local.constraint`,`coordinate step must be a finite positive number.`,n.step?.offset??e.node.range.start,void 0,{key:`local.constraint.coordinate-step`})}if(e.name===`multi-select`){let t=A_(e,n,`max-selected`);t!==void 0&&(!Number.isInteger(t)||t<0)&&r(`local.constraint`,`multi-select max-selected must be a nonnegative whole number.`,n[`max-selected`]?.offset??e.node.range.start,void 0,{key:`local.constraint.multi-select`})}if((e.name===`table`||e.name===`chart`)&&!Object.hasOwn(n,`key`))for(let t of[`bind`,`initial`])Object.hasOwn(n,t)&&r(`local.selection.key`,`<${e.name}> ${t} requires a key attribute naming the selection column.`,n[t].offset,void 0,{key:`local.selection.key.required`,params:{component:e.name,name:t}})}function M_(e){return(e.node.children??[]).filter(e=>e.type===`component`&&!!e.name).map(t=>({node:t,name:t.name,schema:rh(t.name),parent:e})).filter(e=>!!e.schema)}function N_(e,t){let n=t.attrs.get(e.node.id)??{},r=__(e.node.children),i=t.report,a=e.schema.childRule;switch(e.schema.parent&&(e.parent&&e.schema.parent.includes(e.parent.name)||i(`local.structure.parent`,`<${e.name}> can only appear directly inside ${e.schema.parent.map(e=>`<${e}>`).join(` or `)}.`,e.node.range.start,e.node.range.end,{key:`local.structure.parent`,params:{name:e.name,parents:e.schema.parent.map(e=>`<${e}>`).join(` / `)}})),a){case`none`:r.length&&i(`local.structure.children`,`<${e.name}> does not accept body content.`,r[0].range.start,r[0].range.end,{key:`local.structure.no-body`,params:{name:e.name}});break;case`inline`:if(e.name===`text`||e.name===`jump`){let t=new Set([`text`,`emphasis`,`strong`,`delete`,`underline`,`mark`,`link`,`image`,`inlineCode`,`inlineMath`,`interpolation`,`break`,`comment`,`fallback`,`footnoteReference`]),n=e=>t.has(e.type)&&(e.children??[]).every(n);(r.length===1&&r[0].type===`paragraph`?r[0].children??[]:r).every(n)||i(`local.structure.children`,`<${e.name}> only accepts inline Markdown.`,e.node.range.start,e.node.range.end,{key:`local.structure.inline-only`,params:{name:e.name}})}for(let t of r)b_(t)&&i(`local.structure.children`,`The body of <${e.name}> cannot contain other interactive components.`,t.range.start,t.range.end,{key:`local.structure.no-nested-components`,params:{name:e.name}});break;case`content`:e.name===`node`&&P_(e,t);break;case`any`:break;case`options`:F_(e,t,n);break;case`tabs`:I_(e,t);break;case`disclosures`:{let t=M_(e),n=t.filter(e=>e.name===`disclosure`);if(n.length||i(`local.structure.children`,`<accordion> requires at least one <disclosure>.`,e.node.range.start,e.node.range.end,{key:`local.structure.accordion.needs-disclosure`}),n.length!==t.length)for(let e of t)e.name!==`disclosure`&&i(`local.structure.children`,`<accordion> can only contain <disclosure>.`,e.node.range.start,e.node.range.end,{key:`local.structure.accordion.only-disclosure`});r.some(e=>e.type!==`component`)&&i(`local.structure.children`,`<accordion> can only contain <disclosure>.`,e.node.range.start,e.node.range.end,{key:`local.structure.accordion.only-disclosure`});break}case`cards`:{let t=M_(e),n=t.filter(e=>e.name===`card`);if(n.length||i(`local.structure.children`,`<grid> requires at least one <card>.`,e.node.range.start,e.node.range.end,{key:`local.structure.grid.needs-card`}),n.length!==t.length)for(let e of t)e.name!==`card`&&i(`local.structure.children`,`Direct children of <grid> must be <card>.`,e.node.range.start,e.node.range.end,{key:`local.structure.grid.only-card`});r.some(e=>e.type!==`component`)&&i(`local.structure.children`,`Direct children of <grid> must be <card>.`,e.node.range.start,e.node.range.end,{key:`local.structure.grid.only-card`});break}case`diagram`:z_(e,t);break;case`table`:{let n=r.filter(e=>e.type===`table`);(n.length!==1||r.length!==1)&&i(`local.structure.children`,`The body of <${e.name}> must be exactly one Markdown table.`,e.node.range.start,e.node.range.end,{key:`local.structure.table.single`,params:{name:e.name}}),n.length?t.tables.set(e.node.id,n[0]):e.name===`table`&&r.length===1&&t.tables.set(e.node.id,r[0]);break}case`plot`:r.filter(e=>e.type===`math`).length||i(`local.structure.children`,`<plot> requires at least one $$...$$ formula block.`,e.node.range.start,e.node.range.end,{key:`local.structure.plot.needs-formula`});for(let e of r)e.type!==`math`&&i(`local.structure.children`,`The body of <plot> can only contain blank lines and $$...$$ formula blocks.`,e.range.start,e.range.end,{key:`local.structure.plot.only-formulas`});break;case`steps`:L_(e,t);break;case`quiz`:R_(e,t,n);break;case`columns`:{let t=M_(e),n=t.filter(e=>e.name===`column`);n.length||i(`local.structure.children`,`<data-table> requires at least one <column>.`,e.node.range.start,e.node.range.end),n.length>20&&i(`local.budget.data-table.columns`,`<data-table> supports at most 20 columns, but has ${n.length}.`,e.node.range.start,e.node.range.end);for(let e of t)e.name!==`column`&&i(`local.structure.children`,`<data-table> can only contain <column>.`,e.node.range.start,e.node.range.end);r.some(e=>e.type!==`component`)&&i(`local.structure.children`,`<data-table> can only contain <column>.`,e.node.range.start,e.node.range.end);break}}}function P_(e,t){let n=e=>{for(let r of e)r.type===`component`?t.report(`local.structure.children`,`The description of <node> cannot contain interactive components.`,r.range.start,r.range.end,{key:`local.structure.node.no-components`}):r.children&&n(r.children)};n(e.node.children??[])}function F_(e,t,n){let r=M_(e),i=r.filter(e=>e.name===`option`);i.length||t.report(`local.structure.children`,`<${e.name}> requires at least one <option value="...">.`,e.node.range.start,e.node.range.end,{key:`local.structure.options.needed`,params:{name:e.name}});for(let n of r)n.name!==`option`&&t.report(`local.structure.children`,`<${e.name}> can only contain <option>.`,n.node.range.start,n.node.range.end,{key:`local.structure.options.only`,params:{name:e.name}});__(e.node.children).some(e=>e.type!==`component`)&&t.report(`local.structure.children`,`<${e.name}> can only contain <option>.`,e.node.range.start,e.node.range.end,{key:`local.structure.options.only`,params:{name:e.name}}),i.length>1e4&&t.report(`local.budget.array`,`<${e.name}> options exceed the limit of ${T}.`,e.node.range.start,e.node.range.end,{key:`local.budget.array.options`,params:{name:e.name,limit:T}});let a=[];for(let n of i){let r=t.attrs.get(n.node.id)??{},i=typeof r.value?.value==`string`?r.value.value:``;i?e.name===`multi-select`&&i.includes(`,`)?t.report(`local.option.value`,`<multi-select> option values cannot contain commas: "${i}".`,n.node.range.start,n.node.range.end,{key:`local.option.value.comma`,params:{value:i}}):a.includes(i)?t.report(`local.option.value`,`Option values in <${e.name}> must be unique; duplicate value "${i}".`,n.node.range.start,n.node.range.end,{key:`local.option.value.duplicate`,params:{name:e.name,value:i}}):((n.node.children??[]).some(b_)&&t.report(`local.structure.children`,`The body of <option> cannot contain interactive components.`,n.node.range.start,n.node.range.end,{key:`local.structure.option.no-components`}),a.push(i)):t.report(`local.option.value`,`<option> requires a non-empty value.`,n.node.range.start,n.node.range.end,{key:`local.option.value.required`})}t.options.set(e.node.id,a)}function I_(e,t){let n=M_(e),r=n.filter(e=>e.name===`tab`);r.length||t.report(`local.structure.children`,`<tabs> requires at least one <tab>.`,e.node.range.start,e.node.range.end,{key:`local.structure.tabs.needs-tab`});for(let e of n)e.name!==`tab`&&t.report(`local.structure.children`,`<tabs> can only contain <tab>.`,e.node.range.start,e.node.range.end,{key:`local.structure.tabs.only-tab`});__(e.node.children).some(e=>e.type!==`component`)&&t.report(`local.structure.children`,`<tabs> can only contain <tab>.`,e.node.range.start,e.node.range.end,{key:`local.structure.tabs.only-tab`});let i=[];r.forEach((e,n)=>{let r=t.attrs.get(e.node.id)??{},a=(typeof r.value?.value==`string`?r.value.value.trim():``)||`tab-${n+1}`;i.includes(a)?t.report(`local.tab.value`,`Tab values in <tabs> must be unique; duplicate value "${a}".`,e.node.range.start,e.node.range.end,{key:`local.tab.value.duplicate`,params:{value:a}}):i.push(a)}),t.tabs.set(e.node.id,i)}function L_(e,t){let n=M_(e),r=n.filter(e=>e.name===`step`);r.length||t.report(`local.structure.children`,`<steps> requires at least one <step>.`,e.node.range.start,e.node.range.end,{key:`local.structure.steps.needs-step`});for(let e of n)e.name!==`step`&&t.report(`local.structure.children`,`<steps> can only contain <step>.`,e.node.range.start,e.node.range.end,{key:`local.structure.steps.only-step`});__(e.node.children).some(e=>e.type!==`component`)&&t.report(`local.structure.children`,`<steps> can only contain <step>.`,e.node.range.start,e.node.range.end,{key:`local.structure.steps.only-step`});let i=[];r.forEach((e,n)=>{let r=t.attrs.get(e.node.id)??{},a=(typeof r.value?.value==`string`?r.value.value.trim():``)||`step-${n+1}`;i.includes(a)?t.report(`local.step.value`,`Step values in <steps> must be unique; duplicate value "${a}".`,e.node.range.start,e.node.range.end,{key:`local.step.value.duplicate`,params:{value:a}}):i.push(a)}),t.steps.set(e.node.id,i)}function R_(e,t,n){let r=typeof n.type?.value==`string`?n.type.value:`choice`,i=typeof n.answer?.value==`string`?n.answer.value:``;if(i.trim()||t.report(`local.quiz.answer`,`<quiz> requires a non-empty answer.`,n.answer?.offset??e.node.range.start,void 0,{key:`local.quiz.answer.required`}),r===`number`){__(e.node.children).length&&t.report(`local.structure.children`,`A numeric <quiz> cannot have body content; use type="choice" for option-based quizzes.`,e.node.range.start,e.node.range.end,{key:`local.structure.quiz.numeric-no-body`}),i.trim()&&l_(i)===null&&t.report(`local.quiz.answer`,`A numeric <quiz> answer must be a finite number.`,n.answer?.offset??e.node.range.start,void 0,{key:`local.quiz.answer.numeric`});let r=A_(e,n,`tolerance`);r!==void 0&&(!Number.isFinite(r)||r<0)&&t.report(`local.constraint`,`<quiz> tolerance must be a nonnegative finite number.`,n.tolerance?.offset??e.node.range.start,void 0,{key:`local.constraint.quiz-tolerance`});return}F_(e,t,n);let a=t.options.get(e.node.id)??[];i.trim()&&a.length&&!a.includes(i)&&t.report(`local.quiz.answer`,`<quiz> answer "${i}" is not one of the option values: ${a.join(`, `)}.`,n.answer?.offset??e.node.range.start,void 0,{key:`local.quiz.answer.not-option`,params:{answer:i,options:a.join(`, `)}})}function z_(e,t){let n=M_(e),r=n.filter(e=>e.name===`node`),i=n.filter(e=>e.name===`edge`);r.length||t.report(`local.diagram.node`,`<diagram> requires at least one <node>.`,e.node.range.start,e.node.range.end,{key:`local.diagram.node.required`});for(let e of n)e.name!==`node`&&e.name!==`edge`&&t.report(`local.structure.children`,`<diagram> can only contain <node> and <edge>.`,e.node.range.start,e.node.range.end,{key:`local.structure.diagram.only`});__(e.node.children).some(e=>e.type!==`component`)&&t.report(`local.structure.children`,`<diagram> can only contain <node> and <edge>.`,e.node.range.start,e.node.range.end,{key:`local.structure.diagram.only`});let a=[];for(let e of r){let n=t.attrs.get(e.node.id)??{},r=typeof n.id?.value==`string`?n.id.value:``;r&&(/^[A-Za-z_][A-Za-z0-9_-]*$/.test(r)||t.report(`local.diagram.node`,`Node ID "${r}" may only contain letters, digits, underscores and hyphens, and cannot start with a digit.`,e.node.range.start,e.node.range.end,{key:`local.diagram.node.invalid`,params:{id:r}}),a.includes(r)?t.report(`local.diagram.node`,`Duplicate node ID "${r}".`,e.node.range.start,e.node.range.end,{key:`local.diagram.node.duplicate`,params:{id:r}}):a.push(r))}t.diagramNodes.set(e.node.id,a);let o=new Set;for(let e of i){let n=t.attrs.get(e.node.id)??{},r=typeof n.from?.value==`string`?n.from.value:``,i=typeof n.to?.value==`string`?n.to.value:``,s=typeof n.label?.value==`string`?n.label.value:``;r&&!a.includes(r)&&t.report(`local.diagram.edge`,`Edge from references unknown node "${r}".`,e.node.range.start,e.node.range.end,{key:`local.diagram.edge.from`,params:{id:r}}),i&&!a.includes(i)&&t.report(`local.diagram.edge`,`Edge to references unknown node "${i}".`,e.node.range.start,e.node.range.end,{key:`local.diagram.edge.to`,params:{id:i}});let c=`${r}\u0000${i}\u0000${s}`;o.has(c)&&t.report(`local.diagram.edge`,`Duplicate edge: ${r} → ${i}${s?` (${s})`:``}.`,e.node.range.start,e.node.range.end,{key:`local.diagram.edge.duplicate`,params:{from:r,to:i,label:s?` (${s})`:``}}),o.add(c)}}function B_(e,t){let n=t.checklists.get(e.node.id);if(n)return n;let r=__(e.node.children),i=r.filter(e=>e.type===`list`);(r.length!==1||i.length!==1)&&t.report(`local.checklist.body`,`The body of <checklist> must be exactly one single-level Markdown task list.`,e.node.range.start,e.node.range.end,{key:`local.checklist.body.single`});let a=i[0],o=[],s=[];if(!a)return t.checklists.set(e.node.id,{ids:o,checked:s}),{ids:o,checked:s};let c=a.children??[];c.length||t.report(`local.checklist.body`,`<checklist> requires at least one task list item.`,a.range.start,a.range.end,{key:`local.checklist.body.item-required`}),c.length>1e4&&t.report(`local.budget.array`,`<checklist> items exceed the limit of ${T}.`,a.range.start,a.range.end,{key:`local.checklist.body.items-limit`,params:{limit:T}}),c.slice(0,T).forEach((e,n)=>{if(e.type!==`listItem`||e.checked===null||e.checked===void 0){t.report(`local.checklist.body`,`<checklist> can only contain task list items (- [ ] / - [x]).`,e.range.start,e.range.end,{key:`local.checklist.body.task-only`});return}(e.children??[]).some(e=>e.type===`list`)&&t.report(`local.checklist.body`,`<checklist> does not support nested lists.`,e.range.start,e.range.end,{key:`local.checklist.body.no-nested`}),b_(e)&&t.report(`local.checklist.body`,`<checklist> items cannot contain interactive components.`,e.range.start,e.range.end,{key:`local.checklist.body.no-components`});let r=`item-${n+1}`;o.push(r),e.checked&&s.push(r)});let l={ids:o,checked:s};return t.checklists.set(e.node.id,l),l}function V_(e){let t=new Map;for(let n of e.entries){if(!n.schema.binding)continue;let r=e.attrs.get(n.node.id)??{};if((n.name===`table`||n.name===`chart`)&&!Object.hasOwn(r,`key`))continue;let i=typeof r.bind?.value==`string`?r.bind.value:``,a=i||`@${n.node.id}`;r.bind&&(i.length>a_?(e.report(`local.budget.identifier`,`Parameter name exceeds the ${a_}-character limit.`,r.bind.offset??n.node.range.start,void 0,{key:`local.budget.identifier`,params:{limit:a_}}),a=`@${n.node.id}`):r_.test(i)?(st.has(i)||c_.has(i))&&(e.report(`local.binding.reserved`,`Parameter name "${i}" is reserved; choose another name.`,r.bind.offset??n.node.range.start,void 0,{key:`local.binding.reserved`,params:{name:i}}),a=`@${n.node.id}`):(e.report(`local.binding.name`,`Parameter name "${i}" must match [A-Za-z_][A-Za-z0-9_]*.`,r.bind.offset??n.node.range.start,void 0,{key:`local.binding.name`,params:{name:i}}),a=`@${n.node.id}`));let o=t.get(a);o?o.members.push({entry:n,attrs:r}):t.set(a,{key:a,schema:n.schema,members:[{entry:n,attrs:r}]})}let n={};for(let r of t.values()){let t=W_(r,e);t&&(n[r.key]=t)}return $_(e,n),n}function H_(e){let t={};for(let[n,r]of Object.entries(e))n.startsWith(`@`)||(t[n]=r.type);return t}function U_(e,t,n){return n===`timer`?{min:0,max:A_(e,t,`duration`)??60,step:1}:{min:A_(e,t,`min`),max:A_(e,t,`max`),step:A_(e,t,`step`)??1}}function W_(e,t){let n=e.members[0],r=n.entry.schema.binding;if(!r)return null;let i=r.family;for(let a of e.members.slice(1))a.entry.schema.binding?.family!==i&&t.report(`local.binding.type`,`Parameter "${e.key}" is already declared as ${x_(r.kind)} by <${n.entry.name}> and cannot also bind <${a.entry.name}>.`,a.entry.node.range.start,a.entry.node.range.end,{key:`local.binding.type`,params:{key:e.key,kind:x_(r.kind),first:n.entry.name,second:a.entry.name}});if(r.exclusive&&e.members.length>1)for(let r of e.members.slice(1))t.report(`local.binding.exclusive`,`Parameter "${e.key}" of <${n.entry.name}> can only be owned by one component and cannot be shared with <${r.entry.name}>.`,r.entry.node.range.start,r.entry.node.range.end,{key:`local.binding.exclusive`,params:{key:e.key,first:n.entry.name,second:r.entry.name}});let a=J_(n.entry,t,i),o;if(r.kind===`number`){o=U_(n.entry,n.attrs,i);for(let r of e.members.slice(1)){let a=U_(r.entry,r.attrs,i);(a.min!==o.min||a.max!==o.max||a.step!==o.step)&&t.report(`local.binding.constraint`,`Parameter "${e.key}" must use the same numeric range and step: <${n.entry.name}> has ${G_(o)}, <${r.entry.name}> has ${G_(a)}.`,r.entry.node.range.start,r.entry.node.range.end,{key:`local.binding.constraint`,params:{key:e.key,first:n.entry.name,second:r.entry.name,firstConstraints:G_(o),secondConstraints:G_(a)}})}}if(i===`choice`||i===`selection`)for(let n of e.members.slice(1))J_(n.entry,t,i).join(`\0`)!==a.join(`\0`)&&t.report(`local.binding.option`,`Parameter "${e.key}" must use the same option set in the same order.`,n.entry.node.range.start,n.entry.node.range.end,{key:`local.binding.option`,params:{key:e.key}});let s=i===`multi-select`?A_(n.entry,n.attrs,`max-selected`):void 0,c=e.members.filter(e=>Object.hasOwn(e.attrs,`initial`)),l;if(c.length>1){let n=c.map(e=>K_(t,e.attrs.initial.offset)),r=Math.min(c.length,o_);for(let i=0;i<r;i+=1){let r=[];for(let e=1;e<n.length&&r.length<s_;e+=1)r.push(n[(i+e)%n.length]);t.report(`local.initial.duplicate`,`Parameter "${e.key}" has multiple explicit initial values (${c.length} in total${r.length?`; see also line ${r.join(`, `)}`:``}).`,c[i].attrs.initial.offset,void 0,r.length?{key:`local.initial.duplicate-peers`,params:{key:e.key,count:c.length,lines:r.join(`, `)}}:{key:`local.initial.duplicate`,params:{key:e.key,count:c.length}})}}l=i===`multi-select`?c.length?Y_(c[0],a,s,t):[]:c.length>0?X_(c[0],t,i,a):Z_(n,t,i,a,o),i===`checklist`&&!Array.isArray(l)&&(l=[]),r.kind!==`array`&&Q_(e,n,l,i,a,o,t),(i===`text`||i===`date`)&&q_(e,l,t);let u={name:e.key,nodeIds:e.members.map(e=>e.entry.node.id),type:r.kind,initial:d_(l),owner:n.entry.node.id};return o&&(o.min!==void 0&&(u.min=o.min),o.max!==void 0&&(u.max=o.max),u.step=o.step),a.length&&(u.options=[...a]),i===`multi-select`&&(u.maxItems=s??a.length),u}function G_(e){return`[${e.min===void 0?`-∞`:String(e.min)}, ${e.max===void 0?`∞`:String(e.max)}] / ${e.step}`}function K_(e,t){let n=Math.max(0,Math.min(e.source.length,t)),r=0,i=e.lineStarts.length-1;for(;r<i;){let t=Math.ceil((r+i)/2);e.lineStarts[t]<=n?r=t:i=t-1}return r+1}function q_(e,t,n){if(typeof t!=`string`||t===``)return;let r=e.members[0],i=r.attrs.initial?.offset??r.entry.node.range.start,a=tt(t);for(let r of e.members){let{entry:o,attrs:s}=r;if(o.name===`input`||o.name===`textarea`){let r=A_(o,s,`min-length`)??0,c=A_(o,s,`max-length`);a<r&&n.report(`local.initial.length`,`Initial value of parameter "${e.key}" has length ${a}, below the minimum length ${r} required by <${o.name}>.`,i,void 0,{key:`local.initial.length.min`,params:{key:e.key,length:a,min:r,name:o.name}}),c!==void 0&&a>c&&n.report(`local.initial.length`,`Initial value of parameter "${e.key}" has length ${a}, exceeding the maximum length ${c} allowed by <${o.name}>.`,i,void 0,{key:`local.initial.length.max`,params:{key:e.key,length:a,max:c,name:o.name}}),o.name===`input`&&(typeof s.type?.value==`string`?s.type.value:`text`)===`email`&&!N(t)&&n.report(`local.initial.email`,`Initial value of parameter "${e.key}" is not a valid email address.`,i,void 0,{key:`local.initial.email`,params:{key:e.key}})}else if(o.name===`date`&&u_(t)){let r=typeof s.min?.value==`string`&&u_(s.min.value)?s.min.value:void 0,a=typeof s.max?.value==`string`&&u_(s.max.value)?s.max.value:void 0;r&&t<r&&n.report(`local.initial.range`,`Initial value ${t} of parameter "${e.key}" is earlier than the minimum date ${r} of <date>.`,i,void 0,{key:`local.initial.date.min`,params:{key:e.key,value:t,min:r}}),a&&t>a&&n.report(`local.initial.range`,`Initial value ${t} of parameter "${e.key}" is later than the maximum date ${a} of <date>.`,i,void 0,{key:`local.initial.date.max`,params:{key:e.key,value:t,max:a}})}}}function J_(e,t,n){switch(n){case`choice`:case`multi-select`:return t.options.get(e.node.id)??[];case`tabs`:return t.tabs.get(e.node.id)??[];case`steps`:return t.steps.get(e.node.id)??[];case`selection`:return t.selections.get(e.node.id)??[``];case`diagram`:return t.diagramNodes.get(e.node.id)??[];case`checklist`:return B_(e,t).ids;default:return[]}}function Y_(e,t,n,r){let i=e.attrs.initial;if(!i)return[];let a=typeof i.value==`string`?i.value:String(i.value??``),o=[];for(let n of a.split(`,`).map(e=>e.trim()).filter(Boolean))t.includes(n)?o.includes(n)||o.push(n):r.report(`local.initial.option`,`Initial value "${n}" of parameter "${e.entry.node.id}" is not an option of <multi-select>.`,i.offset,void 0,{key:`local.initial.option.multi-select`,params:{key:e.entry.node.id,value:n}});return n!==void 0&&o.length>n&&r.report(`local.initial.range`,`Initial values of <multi-select> exceed max-selected ${n}.`,i.offset,void 0,{key:`local.initial.multi-select`,params:{max:n}}),t.filter(e=>o.includes(e))}function X_(e,t,n,r){let i=e.attrs.initial;if(!i)return Z_(e,t,n,r,void 0);let a=e.entry;if(n===`number`&&typeof i.value==`number`||n===`boolean`&&typeof i.value==`boolean`)return i.value;if(n===`number`||n===`boolean`)return t.report(`local.initial.type`,`Initial value of parameter "${a.node.id}" has the wrong type.`,i.offset,void 0,{key:`local.initial.type`,params:{name:a.node.id}}),n===`number`&&0;let o=typeof i.value==`string`?i.value:String(i.value??``);return n===`date`&&!u_(o)&&t.report(`local.initial.date`,`Initial date "${o}" is not a valid YYYY-MM-DD.`,i.offset,void 0,{key:`local.initial.date`,params:{value:o}}),n===`choice`&&r.length&&!r.includes(o)&&t.report(`local.initial.option`,`Initial value "${o}" is not an available option: ${r.join(`, `)}.`,i.offset,void 0,{key:`local.initial.value.option`,params:{value:o,options:r.join(`, `)}}),o}function Z_(e,t,n,r,i){let a=e.entry;switch(n){case`text`:case`date`:return``;case`boolean`:return!1;case`choice`:return r[0]??``;case`tabs`:case`steps`:case`diagram`:return r[0]??``;case`selection`:return``;case`multi-select`:return[];case`timer`:return(i??U_(a,e.attrs,n)).max??60;case`checklist`:return[...B_(a,t).checked];case`number`:{let r=i??U_(a,e.attrs,n);if(a.schema.initialRule===`min`)return r.min??0;let o=p_(r.min,r.max,r.step);return o===null?(t.report(`local.initial.range`,`Parameter "${a.node.id}" has no valid step value within range [${r.min??`-∞`}, ${r.max??`∞`}].`,a.node.range.start,a.node.range.end,{key:`local.initial.no-step`,params:{key:a.node.id,min:r.min??`-∞`,max:r.max??`∞`}}),0):o}}return t.report(`local.initial`,`Cannot derive a default initial value for <${a.name}> parameter "${a.node.id}".`,a.node.range.start,a.node.range.end,{key:`local.initial.cannot-derive`,params:{name:a.name,key:a.node.id}}),``}function Q_(e,t,n,r,i,a,o){let s=e.key;if(r===`number`){if(typeof n!=`number`||!Number.isFinite(n)){o.report(`local.initial.type`,`Initial value of parameter "${s}" must be a finite number.`,t.entry.node.range.start,void 0,{key:`local.initial.type.number`,params:{key:s}});return}let e=a??U_(t.entry,t.attrs,r);e.min!==void 0&&n<e.min&&o.report(`local.initial.range`,`Initial value ${n} of parameter "${s}" is below the minimum ${e.min}.`,t.attrs.initial?.offset??t.entry.node.range.start,void 0,{key:`local.initial.range.min`,params:{value:n,key:s,min:e.min}}),e.max!==void 0&&n>e.max&&o.report(`local.initial.range`,`Initial value ${n} of parameter "${s}" exceeds the maximum ${e.max}.`,t.attrs.initial?.offset??t.entry.node.range.start,void 0,{key:`local.initial.range.max`,params:{value:n,key:s,max:e.max}});let i=e.min??0;n>=(e.min??-1/0)&&n<=(e.max??1/0)&&!f_(n,i,e.step)&&o.report(`local.initial.step`,`Initial value ${n} of parameter "${s}" is not on step ${e.step} (based at ${e.min??0}).`,t.attrs.initial?.offset??t.entry.node.range.start,void 0,{key:`local.initial.range.step`,params:{value:n,key:s,step:e.step,base:e.min??0}})}else r===`boolean`&&typeof n!=`boolean`&&o.report(`local.initial.type`,`Initial value of parameter "${s}" must be a boolean.`,t.entry.node.range.start,void 0,{key:`local.initial.type.boolean`,params:{key:s}}),(r===`choice`||r===`tabs`||r===`steps`||r===`diagram`||r===`selection`)&&i.length&&!i.includes(String(n))&&o.report(`local.initial.option`,`Initial value "${String(n)}" of parameter "${s}" is not among the available values ${i.join(`, `)}.`,t.attrs.initial?.offset??t.entry.node.range.start,void 0,{key:`local.initial.value.options`,params:{value:String(n),key:s,options:i.join(`, `)}})}function $_(e,t){let n=new Set(Object.keys(t));for(let r of e.entries){let i=r.schema.slots;if(!i?.length)continue;let a=e.attrs.get(r.node.id)??{},o=Object.create(null),s=new Map;for(let c of i){let i=a[c.bind],l;if(i){let t=typeof i.value==`string`?i.value:``;t.length>a_?e.report(`local.budget.identifier`,`Parameter name exceeds the ${a_}-character limit.`,i.offset??r.node.range.start,void 0,{key:`local.budget.identifier`,params:{limit:a_}}):r_.test(t)?st.has(t)||c_.has(t)?e.report(`local.binding.reserved`,`Parameter name "${t}" is reserved; choose another name.`,i.offset??r.node.range.start,void 0,{key:`local.binding.reserved`,params:{name:t}}):l=t:e.report(`local.binding.name`,`Parameter name "${t}" must match [A-Za-z_][A-Za-z0-9_]*.`,i.offset??r.node.range.start,void 0,{key:`local.binding.name`,params:{name:t}})}let u=l??`@${r.node.id}:${c.name}`;l&&n.has(l)&&(e.report(`local.binding.exclusive`,`Parameter "${l}" of the ${c.name} slot of <${r.name}> is exclusive and cannot be shared with another control.`,i?.offset??r.node.range.start,void 0,{key:`local.binding.exclusive.slot`,params:{key:l,slot:c.name,name:r.name}}),u=`@${r.node.id}:${c.name}`),n.add(u);let d=ev(r,a,c.name),f=tv(r,a,c,d,e),p={name:u,nodeIds:[r.node.id],type:c.kind,initial:f,owner:r.node.id};d.min!==void 0&&(p.min=d.min),d.max!==void 0&&(p.max=d.max),p.step=d.step,t[u]=p,o[c.name]=u,s.set(c.name,u)}let c=s.get(`start`),l=s.get(`end`);if(c&&l){let n=t[c].initial,i=t[l].initial;typeof n==`number`&&typeof i==`number`&&n>i&&e.report(`local.initial.range`,`<range-slider> start ${n} cannot be greater than end ${i}.`,r.node.range.start,r.node.range.end,{key:`local.initial.range-slider`,params:{start:n,end:i}})}e.bindingSlots[r.node.id]=o}}function ev(e,t,n){return e.name===`coordinate`?{min:A_(e,t,`${n}-min`)??-5,max:A_(e,t,`${n}-max`)??5,step:A_(e,t,`step`)??1}:{min:A_(e,t,`min`)??0,max:A_(e,t,`max`)??100,step:A_(e,t,`step`)??1}}function tv(e,t,n,r,i){let a=r.min??0,o=t[n.initial];if(o&&typeof o.value==`number`){let t=o.value;return r.min!==void 0&&t<r.min&&i.report(`local.initial.range`,`Initial value ${t} of <${e.name}> ${n.initial} is below the minimum ${r.min}.`,o.offset,void 0,{key:`local.initial.slot.min`,params:{value:t,name:e.name,slot:n.initial,min:r.min}}),r.max!==void 0&&t>r.max&&i.report(`local.initial.range`,`Initial value ${t} of <${e.name}> ${n.initial} exceeds the maximum ${r.max}.`,o.offset,void 0,{key:`local.initial.slot.max`,params:{value:t,name:e.name,slot:n.initial,max:r.max}}),f_(t,a,r.step)||i.report(`local.initial.step`,`Initial value ${t} of <${e.name}> ${n.initial} is not on step ${r.step} (based at ${a}).`,o.offset,void 0,{key:`local.initial.slot.step`,params:{value:t,name:e.name,slot:n.initial,step:r.step,base:a}}),t}if(n.initialRule===`max-step`){let e=(r.max??a)-a,t=a+Math.max(0,Math.floor(e/r.step+i_))*r.step;return Math.min(r.max??t,Math.max(r.min??t,t))}return n.initialRule===`min`?r.min??0:p_(r.min,r.max,r.step)??0}function nv(e){return Object.keys(e.bindingSlots).length?e.bindingSlots:void 0}function rv(e,t){let n=e.source.lastIndexOf(`
|
|
59
59
|
`,t.range.start-1)+1,r=e.source.indexOf(`
|
|
60
|
-
`,t.range.end),i=r<0?e.source.length:r;return e.source.slice(n,t.range.start).trim()===``&&e.source.slice(t.range.end,i).trim()===``}function X_(e,t,n){let r=v_(e.source,t.node.range.start,t.node.range.end),i=/(?:^|[\s"'/])value\s*=\s*(["'])/.exec(r);if(!i)return t.node.range.start;let a=t.node.range.start+i.index+i[0].length;return Math.min(t.node.range.end,a+n)}function Z_(e){let t=[],n=new Map,r=new Set(e.nodes);for(let i of e.entries){if(i.name!==`computed`&&i.name!==`const`)continue;let a=i.name,o=i.node;if(!r.has(o)||!Y_(e,o)){e.report(`local.computation.placement`,`<${a}> declarations must be standalone tags at the document top level.`,o.range.start,o.range.end);continue}let s=e.attrs.get(o.id)??{},c=s.name,l=typeof c?.value==`string`?c.value:``;if(!c||!l)continue;if(l.length>Zg){e.report(`local.budget.identifier`,`Computation name exceeds the ${Zg}-character limit.`,c.offset);continue}if(!Yg.test(l)){e.report(`local.computation.name`,`Computation name "${l}" must match [A-Za-z_][A-Za-z0-9_]*.`,c.offset);continue}if(st.has(l)||e_.has(l)){e.report(`local.computation.reserved`,`Computation name "${l}" is reserved; choose another name.`,c.offset);continue}if(Object.hasOwn(e.bindingKinds,l)){e.report(`local.computation.duplicate`,`Computation name "${l}" conflicts with a control parameter of the same name.`,c.offset);continue}if(n.has(l)){e.report(`local.computation.duplicate`,`Computation name "${l}" is declared more than once.`,c.offset);continue}n.set(l,a);let u=s.value;if(!u)continue;let d=s_(u.raw);d?d.expression?t.push({name:l,kind:a,source:d.expression,expressionOffset:X_(e,i,d.start),nodeId:o.id,range:{...o.range}}):e.report(`local.expression.empty`,`Interpolation expression cannot be empty.`,u.offset):e.report(`local.computation.value`,`The value of <${a}> must be exactly one {{ expression }} interpolation.`,u.offset,u.offset+u.raw.length)}let i=Qn(t,e.bindingKinds,e.report);e.computations=i.computations,e.computationKinds=i.kinds}function Q_(e){return Object.keys(e.computationKinds).length?{...e.bindingKinds,...e.computationKinds}:e.bindingKinds}function $_(e){let t=[];for(let n of e)(n.type!==`component`||n.name!==`computed`&&n.name!==`const`)&&(n.children&&=$_(n.children),t.push(n));return t}function ev(e){let t=Q_(e),n=Object.keys(t),r=(t,n)=>{t instanceof z?e.report(`local.expression.${t.code||`invalid`}`,`Expression error: ${t.message}`,n+(Number.isFinite(t.offset)?t.offset:0),void 0,{key:`local.expression.error`,params:{detail:t.message,code:t.code||`invalid`,near:e.source.slice(Math.max(n,n+t.offset-16),n+t.offset+24)}}):e.report(`local.expression.invalid`,`Expression error: ${t instanceof Error?t.message:String(t)}`,n,void 0,{key:`local.expression.error`,params:{detail:t instanceof Error?t.message:String(t),code:`invalid`}})},i=(i,a,o)=>{if(!i.trim())return e.report(`local.expression.empty`,`Interpolation expression cannot be empty.`,a,void 0,{key:`local.expression.empty`}),null;let s=null;try{s=Yt(i)}catch(e){return r(e,a),null}if(!s)return null;let c=!1;for(let r of s.dependencies)if(!Object.hasOwn(t,r)){let t=lv(r,n);e.report(`local.binding.unknown`,`Reference to undeclared parameter ${r}.${t?` Did you mean ${t}?`:``}`,a+Math.max(0,i.indexOf(r)),void 0,t?{key:`local.binding.unknown.suggestion`,params:{name:r,suggestion:t}}:{key:`local.binding.unknown`,params:{name:r}}),c=!0}if(c)return null;let l;try{l=s.inferType(t)}catch(e){return r(e,a),null}return o===`number`&&l!==`number`?e.report(`local.type`,`Expected a number here, but the expression evaluates to ${p_(l)}.`,a,void 0,{key:`local.type.number`,params:{kind:p_(l)}}):o===`boolean`&&l!==`boolean`?e.report(`local.type`,`Expected a boolean here, but the expression evaluates to ${p_(l)}.`,a,void 0,{key:`local.type.boolean`,params:{kind:p_(l)}}):o===`string`&&l!==`string`?e.report(`local.type`,`Expected a string here, but the expression evaluates to ${p_(l)}.`,a,void 0,{key:`local.type.string`,params:{kind:p_(l)}}):o===`text`&&(l===`array`||l===`number-array`)&&e.report(`local.type`,`Arrays cannot be displayed directly; convert them first with a function such as len.`,a,void 0,{key:`local.type.array`}),l},a=t=>{for(let n of t){if(n.type===`interpolation`){let t=e.source.slice(n.range.start+2,Math.max(n.range.start+2,n.range.end-2)),r=n.value??``,a=Math.max(0,t.indexOf(r)),o=n.range.start+2+a;e.expressionKinds.set(n.id,i(r,o,`text`))}n.children&&a(n.children)}};a(e.nodes);for(let t of e.entries){if(t.name===`computed`||t.name===`const`)continue;let n=e.attrs.get(t.node.id)??{};for(let[r,a]of Object.entries(n)){let n=t.schema.props[r];if(n&&!n.static&&(t.name!==`data-table`||r!==`rows`&&r!==`key`)&&(t.name!==`column`||r!==`value`)&&(t.name!==`validation`||r!==`when`)){if(n.kind===`string`){let t=o_(a.raw);for(let n of t.unterminated)e.report(`local.interpolation`,`Interpolation is missing }}.`,a.offset+n,void 0,{key:`local.interpolation.unclosed`});for(let e of t.segments)i(e.expression,a.offset+e.start,`text`)}else a.dynamic&&(n.kind===`number`?i(a.expression??``,a.expressionOffset??a.offset,`number`):n.kind===`boolean`?i(a.expression??``,a.expressionOffset??a.offset,`boolean`):n.kind===`enum`&&i(a.expression??``,a.expressionOffset??a.offset,`string`))}}if(t.name===`if`){let t=n.when;t&&!t.dynamic&&e.report(`local.attribute.interpolation`,`The when attribute of if must be a full boolean interpolation, e.g. when="{{ seats >= 5 }}".`,t.offset,void 0,{key:`local.attribute.interpolation`})}}}function tv(e,t,n){let r={syntax:`local`,source:e.source,nodes:e.nodes,initialState:n,bindings:t,...Object.keys(e.computations).length?{computations:e.computations}:{}},i=`__local_core_check__`,a=ir(r,i,!1),o=new Set,s=e=>{for(let t of e){if(t.type===`heading`){let e=a.ids.get(t);e&&e.startsWith(`${i}-`)&&o.add(e.slice(21))}t.children&&s(t.children)}};s(e.nodes);let c=new Set;for(let t of e.entries){if(t.name!==`anchor`)continue;let n=(e.attrs.get(t.node.id)??{}).id;if(!n)continue;let r=typeof n.value==`string`?n.value:``;!r||!nv.test(r)?e.report(`local.anchor.id`,`Anchor id "${r}" must match [A-Za-z_][A-Za-z0-9_-]*.`,n.offset,void 0,{key:`local.anchor.id`,params:{id:r}}):(c.has(r)?e.report(`local.anchor.duplicate`,`Duplicate anchor id "${r}".`,n.offset,void 0,{key:`local.anchor.duplicate`,params:{id:r}}):c.add(r),o.has(r)&&e.report(`local.anchor.duplicate`,`Anchor id "${r}" collides with an automatic heading target.`,n.offset,void 0,{key:`local.anchor.heading-collision`,params:{id:r}}))}for(let t of e.entries){if(t.name!==`jump`)continue;let n=(e.attrs.get(t.node.id)??{}).to;if(!n)continue;let r=typeof n.value==`string`?n.value:``;r?r.startsWith(`#`)||/\s/.test(r)?e.report(`local.jump.target`,`<jump> target "${r}" must be a bare heading slug or anchor id without "#" or whitespace.`,n.offset,void 0,{key:`local.jump.bad-target`,params:{target:r}}):!c.has(r)&&!o.has(r)&&e.report(`local.jump.target`,`<jump> target "${r}" does not resolve to a heading or explicit anchor in this document.`,n.offset,void 0,{key:`local.jump.unresolved`,params:{target:r}}):e.report(`local.jump.target`,`<jump> target cannot be empty.`,n.offset,void 0,{key:`local.jump.empty`})}}var nv=/^[A-Za-z_][A-Za-z0-9_-]*$/;function rv(e,t,n){t instanceof z?e.report(`local.expression.${t.code||`invalid`}`,`Expression error: ${t.message}`,n+(Number.isFinite(t.offset)?t.offset:0)):e.report(`local.expression.invalid`,`Expression error: ${t instanceof Error?t.message:String(t)}`,n)}function iv(e,t,n,r,i){if(!t.trim())return e.report(`local.expression.empty`,`Interpolation expression cannot be empty.`,n),null;let a;try{a=Yt(t)}catch(t){return rv(e,t,n),null}let o=Object.keys(r),s=!1;for(let i of a.dependencies)if(!Object.hasOwn(r,i)){let r=lv(i,o);e.report(`local.binding.unknown`,`Reference to undeclared parameter ${i}.${r?` Did you mean ${r}?`:``}`,n+Math.max(0,t.indexOf(i))),s=!0}if(s||!i)return{compiled:a,kind:null};let c;try{c=a.inferType(r)}catch(t){return rv(e,t,n),null}return{compiled:a,kind:c}}function av(e,t,n,r,i){if(!e)return null;let a=s_(e.raw);return a?a.expression?{expression:a.expression,base:e.offset+a.start}:(i.report(`local.expression.empty`,`Interpolation expression cannot be empty.`,e.offset+a.start),null):(i.report(t,`<${n}> ${r} must be exactly one {{ expression }} interpolation.`,e.offset,e.offset+e.raw.length),null)}function ov(e){let t=e[`max-rows`];return t&&!t.dynamic&&typeof t.value==`number`&&Number.isInteger(t.value)&&t.value>0&&t.value<=1e3?t.value:100}function sv(e){let t=e.entries.filter(e=>e.name===`data-table`);if(!t.length)return;let n=Q_(e),r=0,i=0,a=!1,o=!1;for(let s of t){let t=e.attrs.get(s.node.id)??{},c=l_(s.node.children).filter(e=>e.type===`component`&&e.name===`column`),l=ov(t),u=Math.min(c.length,20);r+=l,i+=l*u,!a&&r>2e3&&(a=!0,e.report(`local.budget.data-table.rows`,`The document's generated row budget exceeds ${j}; max-rows summed over every <data-table> must stay within it.`,s.node.range.start,s.node.range.end)),!o&&i>1e4&&(o=!0,e.report(`local.budget.data-table.cells`,`The document's generated cell budget exceeds ${M}; max-rows multiplied by columns, summed over every <data-table>, must stay within it.`,s.node.range.start,s.node.range.end));let d=av(t.rows,`local.data-table.rows`,`data-table`,`rows`,e),f=`string`,p=!1;if(d){let t=iv(e,d.expression,d.base,n,!0);t?.kind===`array`?(f=`string`,p=!0):t?.kind===`number-array`?(f=`number`,p=!0):t&&t.kind!==null&&e.report(`local.data-table.rows`,`<data-table> rows must evaluate to an array, but the expression evaluates to ${p_(t.kind)}.`,d.base)}let m={...n,item:f,index:`number`},h=av(t.key,`local.data-table.key`,`data-table`,`key`,e);if(h){let t=iv(e,h.expression,h.base,m,p);if(t){let r=t.compiled.dependencies;r.includes(`item`)||e.report(`local.data-table.key`,`<data-table> key must depend on item.`,h.base);for(let t of r)t!==`item`&&(t===`index`?e.report(`local.data-table.key`,`<data-table> key cannot depend on index; use a stable item identifier.`,h.base):Object.hasOwn(n,t)&&e.report(`local.data-table.key`,`<data-table> key cannot depend on global parameter "${t}"; it must be derived from item only.`,h.base));t.kind!==null&&t.kind!==`string`&&t.kind!==`number`&&e.report(`local.data-table.key`,`<data-table> key must evaluate to a string or number, got ${p_(t.kind)}.`,h.base)}}for(let t of c){let n=e.attrs.get(t.id)??{},r=n.label;r&&!String(r.value??``).trim()&&e.report(`local.data-table.column`,`<column> label cannot be empty.`,r.offset);let i=av(n.value,`local.data-table.value`,`column`,`value`,e);if(!i)continue;let a=iv(e,i.expression,i.base,m,p);a&&(a.kind===`array`||a.kind===`number-array`)&&e.report(`local.data-table.value`,`<column> value must be a scalar string, number, boolean or null, got ${p_(a.kind)}.`,i.base)}}}function cv(e){let t=[],n=0,r=!1,i=Object.keys(e.bindingKinds),a=Q_(e);for(let o of e.entries){if(o.name!==`validation`)continue;n+=1;let s=o.node;if(n>100){r||(r=!0,e.report(`local.validation.budget`,`The document declares more than 100 validation rules; rules in hidden regions count too.`,s.range.start,s.range.end));continue}o.parent&&(o.parent.schema.form!==`container`||o.parent.name===`data-table`)&&e.report(`local.validation.placement`,`<validation> can appear in normal prose or a container, but not inside inline content or a data table.`,s.range.start,s.range.end);let c=e.attrs.get(s.id)??{},l=``,u=[],d=c.when;if(d){let t=s_(d.raw);if(!t)e.report(`local.validation.when`,`<validation> when must be exactly one {{ boolean }} interpolation.`,d.offset,d.offset+d.raw.length);else if(t.expression){l=t.expression;let n=iv(e,l,d.offset+t.start,a,!0);n&&(u=[...n.compiled.dependencies],n.kind!==null&&n.kind!==`boolean`&&e.report(`local.type`,`Expected a boolean here, but the expression evaluates to ${p_(n.kind)}.`,d.offset+t.start))}}let f=c.fields,p=f?rg(f.raw):[];f&&!p.length&&e.report(`local.validation.fields`,`<validation> requires at least one field name.`,f.offset,f.offset+f.raw.length);let m=new Set;for(let t of p)if(m.has(t))e.report(`local.validation.fields`,`Duplicate field "${t}" in <validation> fields.`,f?.offset??s.range.start);else if(m.add(t),!Object.hasOwn(e.bindingKinds,t)){let n=lv(t,i);e.report(`local.validation.fields`,`Field "${t}" is not a public writable parameter.${n?` Did you mean ${n}?`:``}`,f?.offset??s.range.start)}l&&t.push({nodeId:s.id,expression:l,dependencies:u,message:typeof c.message?.value==`string`?c.message.value:``,fields:[...m],range:{...s.range}})}return t}function lv(e,t){if(e.length>Zg)return;let n,r=1/0;for(let i of t){let t=uv(e,i);t<r&&(n=i,r=t)}return r<=2?n:void 0}function uv(e,t){let n=Array.from({length:t.length+1},(e,t)=>t);for(let r=1;r<=e.length;r++){let i=n[0];n[0]=r;for(let a=1;a<=t.length;a++){let o=n[a];n[a]=Math.min(n[a]+1,n[a-1]+1,i+(e[r-1]===t[a-1]?0:1)),i=o}}return n[t.length]}function dv(e,t){let n=e.schema.props.samples?.default,r=typeof n==`number`?n:200;return S_(e,t,`samples`)??r}function fv(e){let t=Q_(e),n=0,r=!1;for(let i of e.entries){if(i.name!==`plot`)continue;let a=e.attrs.get(i.node.id)??{},o=l_(i.node.children).filter(e=>e.type===`math`),s=dv(i,a);o.length>16&&e.report(`local.budget.plot.curves`,`<plot> supports at most 16 curves, but has ${o.length}.`,i.node.range.start,i.node.range.end,{key:`local.budget.plot.curves`,params:{limit:16,count:o.length}});let c=o.length*s,l=n+c;if(!r&&l>2e4&&(e.report(`local.budget.plot.points`,`The document's total plot sample count exceeds the limit of ${O}.`,i.node.range.start,i.node.range.end,{key:`local.budget.plot.points`,params:{limit:O}}),r=!0),n=Math.min(O+1,l),!(o.length>16||r))for(let n of o){let r=(n.value??``).trim();if(!/^y\s*=/u.test(r)){e.report(`local.math.formula`,`<plot> formulas must be written explicitly as y = expression.`,n.range.start,n.range.end,{key:`local.math.formula.shape`});continue}let i=null;try{i=Mn(r)}catch(t){e.report(`local.math`,`Cannot compute plot formula: ${t instanceof Error?t.message:String(t)}`,n.range.start,n.range.end,{key:`local.math.compute`,params:{detail:t instanceof Error?t.message:String(t),code:t&&typeof t==`object`&&`code`in t&&typeof t.code==`string`?t.code:`latex-syntax`,near:r.slice(0,120)}})}if(i)for(let r of i.dependencies)r!==`x`&&r!==`y`&&(Object.hasOwn(t,r)?t[r]!==`number`&&e.report(`local.math.binding`,`Plot parameter "${r}" must be a number, but is ${p_(t[r])}.`,n.range.start,n.range.end,{key:`local.math.binding.type`,params:{name:r,kind:p_(t[r])}}):e.report(`local.math.binding`,`Plot formula references undeclared parameter "${r}".`,n.range.start,n.range.end,{key:`local.math.binding.unknown`,params:{name:r}}))}}}function pv(e,t,n){let r=(e.children??[]).filter(e=>e.type===`tableRow`);if(!r.length)return t.report(`local.table.header`,`The table for <${n.name}> is missing a header.`,e.range.start,e.range.end,{key:`local.table.header.missing`,params:{name:n.name}}),null;let i=r[0].children??[],a=[];for(let e of i){if(d_(e))return t.report(`local.table.header`,`Table headers cannot contain interpolations.`,e.range.start,e.range.end,{key:`local.table.header.interpolation`}),null;let n=u_(e).trim();if(!n)return t.report(`local.table.header`,`Table headers cannot be empty.`,e.range.start,e.range.end,{key:`local.table.header.empty`}),null;if(a.includes(n))return t.report(`local.table.header`,`Duplicate table header "${n}".`,e.range.start,e.range.end,{key:`local.table.header.duplicate`,params:{name:n}}),null;a.push(n)}if(!a.length)return t.report(`local.table.header`,`Table headers cannot be empty.`,e.range.start,e.range.end,{key:`local.table.header.empty`}),null;let o=[];for(let e of r.slice(1)){let n=e.children??[];n.length===a.length?o.push(n):t.report(`local.table.row`,`Table row has a different column count: header has ${a.length} columns, this row has ${n.length}.`,e.range.start,e.range.end,{key:`local.table.row.mismatch`,params:{header:a.length,row:n.length}})}return{header:a,rows:o}}function mv(e,t){let n=l_(e.children);if(n.length===1&&n[0].type===`interpolation`){let e=t.expressionKinds.get(n[0].id);if(e===`number`||e===null)return!0;if(e!==void 0)return!1}let r=u_(e).trim();return r?t_(r)!==null:!1}function hv(e,t,n,r,i){let a=e.header[t];e.rows.forEach((e,i)=>{let o=e[t];if(!o)return;let s=l_(o.children);if(s.length===1&&s[0].type===`interpolation`){let e=n.expressionKinds.get(s[0].id);e!=null&&e!==`number`&&n.report(`local.chart.numeric`,`${r.name===`timeline`?`Timeline`:`Chart`} column "${a}" requires a number in row ${i+1}, but the expression evaluates to ${p_(e)}.`,o.range.start,o.range.end,{key:r.name===`timeline`?`local.timeline.numeric.expression`:`local.chart.numeric.expression`,params:{name:a,row:i+1,kind:p_(e)}})}else mv(o,n)||n.report(`local.chart.numeric`,`${r.name===`timeline`?`Timeline`:`Chart`} column "${a}" requires a plain number in row ${i+1}, got "${u_(o).trim()||`empty`}".`,o.range.start,o.range.end,{key:r.name===`timeline`?`local.timeline.numeric.plain`:`local.chart.numeric.plain`,params:{name:a,row:i+1,value:u_(o).trim()||`empty`}})})}function gv(e,t){return e.indexOf(t)}function _v(e){for(let t of e.entries){if(t.name===`table`){vv(t,e);continue}if(t.name!==`chart`&&t.name!==`timeline`)continue;let n=vv(t,e);n&&(t.name===`chart`?xv(t,n,e):Sv(t,n,e))}}function vv(e,t){if(t.tableShapes.has(e.node.id))return t.tableShapes.get(e.node.id)??null;let n=t.tables.get(e.node.id),r=n?pv(n,t,e):null;return t.tableShapes.set(e.node.id,r),r}function yv(e,t){if(t.size===0)return;let n=Object.create(null),r=0;for(let[e,i]of t)i&&(n[e]=Object.freeze({header:Object.freeze([...i.header]),rowIds:Object.freeze(i.rows.map(e=>Object.freeze(e.map(e=>e.id))))}),r+=1);r!==0&&(e.tableShapes=Object.freeze(n))}function bv(e){for(let t of e.entries){if(t.name!==`table`&&t.name!==`chart`)continue;let n=e.attrs.get(t.node.id)??{},r=n.key;if(!r)continue;let i=typeof r.value==`string`?r.value.trim():``;if(!i){e.report(`local.selection.key`,`<${t.name}> key cannot be empty.`,r.offset,void 0,{key:`local.selection.key.empty`,params:{component:t.name}}),e.selections.set(t.node.id,[``]);continue}let a=vv(t,e);if(!a){e.selections.set(t.node.id,[``]);continue}let o=gv(a.header,i);if(o<0){e.report(`local.selection.key`,`<${t.name}> key column "${i}" does not exist in its table.`,r.offset,void 0,{key:`local.selection.key.missing-column`,params:{component:t.name,name:i}}),e.selections.set(t.node.id,[``]);continue}let s=[],c=new Set;a.rows.forEach((n,r)=>{let a=n[o];if(!a)return;if(d_(a)){e.report(`local.selection.key`,`<${t.name}> key column "${i}" must contain static text; row ${r+1} contains an interpolation.`,a.range.start,a.range.end,{key:`local.selection.key.interpolation`,params:{component:t.name,name:i,row:r+1}});return}let l=u_(a).trim();l?c.has(l)?e.report(`local.selection.key`,`<${t.name}> key column "${i}" must be unique; duplicate value "${l}".`,a.range.start,a.range.end,{key:`local.selection.key.duplicate`,params:{component:t.name,name:i,value:l}}):(c.add(l),s.push(l)):e.report(`local.selection.key`,`<${t.name}> key column "${i}" cannot be empty in row ${r+1}.`,a.range.start,a.range.end,{key:`local.selection.key.empty-cell`,params:{component:t.name,name:i,row:r+1}})}),e.selections.set(t.node.id,[``,...s]);let l=n.initial;l&&typeof l.value==`string`&&l.value!==``&&!s.includes(l.value)&&e.report(`local.initial.option`,`Initial selection "${l.value}" of <${t.name}> is not a value of key column "${i}".`,l.offset,void 0,{key:`local.selection.key.initial`,params:{value:l.value,component:t.name,name:i}})}}function xv(e,t,n){let r=n.attrs.get(e.node.id)??{},i=typeof r.kind?.value==`string`?r.kind.value:`bar`,a=t.header;for(let t of a)t.includes(`,`)&&n.report(`local.chart.column`,`Chart column names cannot contain commas: "${t}".`,e.node.range.start,e.node.range.end,{key:`local.chart.column.comma`,params:{name:t}});let o=typeof r.x?.value==`string`?r.x.value.trim():``,s=typeof r.y?.value==`string`?r.y.value.trim():``;o&&gv(a,o)<0&&n.report(`local.chart.column`,`Chart x column "${o}" does not exist.`,r.x?.offset??e.node.range.start,void 0,{key:`local.chart.column.x-missing`,params:{name:o}});let c=[];if(s){c=s.split(`,`).map(e=>e.trim()).filter(Boolean),c.length||n.report(`local.chart.column`,`Chart y requires a column name.`,r.y?.offset??e.node.range.start,void 0,{key:`local.chart.column.y-required`});for(let t of c)gv(a,t)<0&&n.report(`local.chart.column`,`Chart y column "${t}" does not exist.`,r.y?.offset??e.node.range.start,void 0,{key:`local.chart.column.y-missing`,params:{name:t}})}let l=[];if(i===`bar`||i===`line`||i===`area`){let t=o?Math.max(0,gv(a,o)):0;l=c.length?c.map(e=>gv(a,e)).filter(e=>e>=0):a.map((e,t)=>t).filter(e=>e!==t),l.length||n.report(`local.chart.column`,`Chart requires at least one numeric column.`,e.node.range.start,e.node.range.end,{key:`local.chart.column.needs-numeric`})}else if(i===`scatter`){let r=o?gv(a,o):0;r<0?n.report(`local.chart.column`,`Scatter chart x column "${o}" does not exist.`,e.node.range.start,void 0,{key:`local.chart.column.scatter-x-missing`,params:{name:o}}):hv(t,r,n,e,`x`),l=c.length?c.map(e=>gv(a,e)).filter(e=>e>=0):a.map((e,t)=>t).filter(e=>e!==r),l.length||n.report(`local.chart.column`,`Scatter chart requires at least one numeric column.`,e.node.range.start,e.node.range.end,{key:`local.chart.column.scatter-needs-numeric`})}else if(i===`donut`){if(a.length<2){n.report(`local.chart.column`,`Donut chart requires a label column and a value column.`,e.node.range.start,e.node.range.end,{key:`local.chart.column.donut-columns`});return}if(c.length===1){let e=gv(a,c[0]);e>=0&&(l=[e])}else c.length>1?n.report(`local.chart.column`,`Donut chart y can only specify one numeric column.`,r.y?.offset??e.node.range.start,void 0,{key:`local.chart.column.donut-y`}):a.length>2?n.report(`local.chart.column`,`A donut chart with more than two columns must use y to specify the single numeric column.`,e.node.range.start,e.node.range.end,{key:`local.chart.column.donut-need-y`}):l=[1]}l=[...new Set(l)];for(let r of l)hv(t,r,n,e,`y`);if(i===`donut`)for(let e of l)t.rows.forEach((t,r)=>{let i=t[e];if(!i||l_(i.children).length)return;let a=t_(u_(i).trim());a!==null&&a<0&&n.report(`local.chart.negative`,`Donut chart values cannot be negative; row ${r+1} is ${a}.`,i.range.start,i.range.end,{key:`local.chart.negative`,params:{row:r+1,value:a}})})}function Sv(e,t,n){let r=[{title:`Task`,start:`Start`,duration:`Duration`,notes:`Notes`},{title:`事项`,start:`开始`,duration:`时长`,notes:`说明`}].find(e=>t.header.includes(e.title)&&t.header.includes(e.start)&&t.header.includes(e.duration));if(!r){n.report(`local.timeline.header`,`Timeline requires either Task, Start and Duration columns or 事项, 开始 and 时长 columns, with optional Notes or 说明.`,e.node.range.start,e.node.range.end,{key:`local.timeline.header.missing`});return}let i=new Set(Object.values(r));for(let r of t.header)i.has(r)||n.report(`local.timeline.header`,`Timeline does not support column "${r}".`,e.node.range.start,e.node.range.end,{key:`local.timeline.header.column`,params:{name:r}});for(let i of[r.start,r.duration]){let r=gv(t.header,i);r>=0&&hv(t,r,n,e,i)}let a=gv(t.header,r.start),o=gv(t.header,r.duration);t.rows.forEach((e,r)=>{for(let i of[a,o]){if(i<0)continue;let a=e[i];if(!a||l_(a.children).length)continue;let o=t_(u_(a).trim());o!==null&&o<0&&n.report(`local.timeline.value`,`Timeline column "${t.header[i]}" cannot be negative in row ${r+1}.`,a.range.start,a.range.end,{key:`local.timeline.value.negative`,params:{name:t.header[i],row:r+1}})}})}var Cv=1e-9,wv=200;function Tv(e){return Array.isArray(e)?e.slice():e}function Ev(e){return{...e,range:{...e.range}}}function Dv(e,t){return Array.isArray(e)||Array.isArray(t)?!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length?!1:e.every((e,n)=>e===t[n]):e===t}function Ov(e){return e===``||ye(e)!==null}function kv(e,t,n){let r=(e-t)/n;return Math.abs(r-Math.round(r))<=Cv*Math.max(1,Math.abs(r))}function Av(e){for(let[t,n]of Object.entries(e))Array.isArray(n)&&!Object.isFrozen(n)&&(e[t]=Object.freeze([...n]));return Object.freeze(e)}function jv(e,t,n,r){let i=Math.max(0,Math.min(e.source.length,t.range.start)),a=e.source.slice(0,i).split(`
|
|
61
|
-
`);return{code:n,message:$e(r),severity:`error`,range:{start:i,end:Math.max(i+1,Math.min(e.source.length,t.range.end))},line:a.length,column:(a.at(-1)??``).length+1,messageKey:r.key,...r.params?{params:r.params}:{}}}function Mv(e,t){return{code:e,message:t,severity:`error`,range:{start:0,end:0},line:1,column:1}}function Nv(e,t){return e.attrs?.[t]}function Pv(e,t){let n=Nv(e,t);if(n===`true`)return!0;if(n===`false`)return!1}function Fv(e,t){let n=Nv(e,t);if(n===void 0)return;let r=Number(n);return Number.isFinite(r)?r:void 0}function Iv(e){return tt(e)}function Lv(e,t){return{ok:!1,detail:ze(e,t)}}function Rv(e,t){if(e.name===`date`){if(!Ov(t))return Lv(`local.runtime.value.date-invalid`);if(t===``&&Pv(e,`required`)===!0)return Lv(`local.runtime.value.date-required`);let n=Nv(e,`min`),r=Nv(e,`max`);return t!==``&&n&&t<n?Lv(`local.runtime.value.date-earlier`,{min:n}):t!==``&&r&&t>r?Lv(`local.runtime.value.date-later`,{max:r}):{ok:!0,value:t}}if(e.name===`input`||e.name===`textarea`){let n=Iv(t);if(t===``&&Pv(e,`required`)===!0)return Lv(`local.runtime.value.field-required`);let r=Fv(e,`min-length`),i=Fv(e,`max-length`);if(r!==void 0&&r>0&&t!==``&&n<r)return Lv(`local.runtime.value.min-length`,{min:r});if(i!==void 0&&n>i)return Lv(`local.runtime.value.max-length`,{max:i});if(e.name===`input`&&Nv(e,`type`)===`email`&&t!==``){if(t.length>254)return Lv(`local.runtime.value.email-length`,{limit:254});if(!N(t))return Lv(`local.runtime.value.email-invalid`)}}return{ok:!0,value:t}}function zv(e,t,n){switch(e.type){case`number`:{if(typeof n!=`number`||!Number.isFinite(n))return Lv(`local.runtime.value.finite-number`,{name:e.name});if(e.min!==void 0&&n<e.min)return Lv(`local.runtime.value.min`,{name:e.name,min:e.min});if(e.max!==void 0&&n>e.max)return Lv(`local.runtime.value.max`,{name:e.name,max:e.max});let t=e.step??1,r=e.min??0;return t>0&&!kv(n,r,t)?Lv(`local.runtime.value.step`,{name:e.name,step:t,base:r}):{ok:!0,value:n}}case`boolean`:return typeof n==`boolean`?{ok:!0,value:n}:Lv(`local.runtime.value.boolean`,{name:e.name});case`string`:{if(typeof n!=`string`)return Lv(`local.runtime.value.string`,{name:e.name});let r=vt(n);if(r)return Lv(`local.runtime.value.budget`,{name:e.name,detail:$e(r),detailKey:r.key,...r.params});for(let e of t){let t=Rv(e,n);if(!t.ok)return t}return e.options?.length&&!e.options.includes(n)?Lv(`local.runtime.value.option`,{value:n,options:e.options.join(`, `)}):{ok:!0,value:n}}case`array`:{if(!Array.isArray(n))return Lv(`local.runtime.value.array`,{name:e.name});let t=vt(n);if(t)return Lv(`local.runtime.value.budget`,{name:e.name,detail:$e(t),detailKey:t.key,...t.params});let r=new Set;for(let t of n){if(typeof t!=`string`)return Lv(`local.runtime.value.array-members`,{name:e.name});if(e.options&&!e.options.includes(t))return Lv(`local.runtime.value.checklist-option`,{value:t});r.add(t)}let i=e.options?e.options.filter(e=>r.has(e)):[...r];return e.maxItems!==void 0&&i.length>e.maxItems?Lv(`local.runtime.value.max-items`,{name:e.name,max:e.maxItems}):{ok:!0,value:i}}case`null`:return{ok:!0,value:n}}return Lv(`local.runtime.value.unsupported-type`,{name:e.name})}function Bv(e){if(!e||e.syntax!==`local`)throw Error(`createLocalRuntime requires a local interaction document.`);if(e.syntaxVersion!==void 0&&e.syntaxVersion!==`local-draft-2`||e.versionDeclaration&&e.versionDeclaration.version!==`local-draft-2`)throw Error(`createLocalRuntime requires ${Bm}; migrate the source before constructing a runtime.`);let t=new Map,n=e=>{for(let r of e)t.set(r.id,r),r.children&&n(r.children)};n(e.nodes);let r={},i=new Map;for(let[n,a]of Object.entries(e.bindings)){let e=vt(a.initial);if(e)throw new z(`expression-budget`,`Parameter "${n}": ${$e(e)}`,0);r[n]=Tv(a.initial);let o=[];for(let e of a.nodeIds){let n=t.get(e);n&&o.push(n)}i.set(n,o)}let a=new Map;for(let[t,n]of Object.entries(e.bindingSlots??{}))a.set(t,{...n});let o=Object.freeze(Object.keys(e.bindings).filter(e=>!e.startsWith(`@`)).sort()),s=new Map;for(let[e,t]of a)for(let n of Object.values(t)){if(n.startsWith(`@`))continue;let t=s.get(n)??new Set;t.add(e),s.set(n,t)}let c=(e,t)=>{let n=a.get(e);if(!n?.start||!n?.end)return!1;let r=t[n.start],i=t[n.end];return typeof r==`number`&&typeof i==`number`&&r>i},l=e.computations??{},u=Object.keys(l),d=new Map;for(let[e,t]of Object.entries(l))try{d.set(e,Yt(t.source))}catch{}let{order:f,cyclic:p}=Zn(l),m={},h=new Map,g=e=>e instanceof z?e:new z(`expression-eval`,e instanceof Error?e.message:String(e),0);for(let e of f){let t=l[e];if(!t||t.kind!==`const`)continue;if(Object.hasOwn(t,`value`)){let n=t.value,r=yt(n);if(r){h.set(e,new z(`expression-budget`,`Constant "${e}": ${r}`,0));continue}m[e]=Tv(n);continue}let n=d.get(e);if(!n)h.set(e,new z(`expression-eval`,`Constant "${e}" cannot be evaluated.`,0));else try{let t=n.evaluate({...m}),r=yt(t);if(r){h.set(e,new z(`expression-budget`,`Constant "${e}": ${r}`,0));continue}m[e]=Tv(t)}catch(t){h.set(e,g(t))}}let _=new Map;for(let e of p)_.set(e,new z(`expression-cycle`,`Computation "${e}" is part of a dependency cycle.`,0));let v=[];if(Array.isArray(e.validations)){for(let t of e.validations)if(ag(t))try{v.push({rule:t,expression:Yt(t.expression),error:null})}catch(e){v.push({rule:t,expression:null,error:g(e)})}}let y=ig(typeof e.source==`string`?e.source:``),b=null,S=e=>{let t;try{t=tn(e,O)}catch{t=tg}return ng(t)},C=()=>{let t=[],n=typeof e.source==`string`?e.source:``;for(let e of v){if(e.error){t.push(og(n,y,e.rule.range,eg,ng(`Validation expression is invalid: ${e.error.message}`)));continue}if(!e.expression)continue;let r;try{r=e.expression.evaluate(O)}catch(r){t.push(og(n,y,e.rule.range,eg,ng(`Validation expression failed: ${r instanceof Error?r.message:String(r)}`)));continue}typeof r==`boolean`?r||t.push(og(n,y,e.rule.range,$h,S(e.rule.message))):t.push(og(n,y,e.rule.range,eg,`Validation expression must evaluate to a boolean.`))}return t},w=r,T=0,E={},D=new Map,O={},k={},A={revision:0,state:Av({})},j=!1,M=new Set,N=new Map,P=new Map,F=()=>{if(j)throw Error(`The local interaction runtime has been disposed.`)},ee=()=>{if(u.length===0)E={},D=new Map;else{let e=$n(l,f,d,w,m);E=e.values,D=e.errors;for(let[e,t]of h)Object.hasOwn(E,e)||D.set(e,t);for(let[e,t]of _)Object.hasOwn(E,e)||D.set(e,t)}let e={};for(let[t,n]of Object.entries(w))e[t]=n;for(let[t,n]of Object.entries(E))e[t]=n;for(let[t,n]of D)Object.hasOwn(E,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get(){throw n}});O=e;let t={};for(let[e,n]of Object.entries(w))t[e]=n;for(let[e,n]of Object.entries(E))t[e]=n;k=t},I=()=>{A={revision:T,state:Av(k)}},te=e=>{w=e,T+=1,ee(),I();for(let e of M)e()},ne=(n,r)=>{let a=(i.get(n.name)??[])[0]??(n.owner?t.get(n.owner):void 0)??(n.nodeIds[0]?t.get(n.nodeIds[0]):void 0);return a?jv(e,a,`local.runtime.value`,r):Mv(`local.runtime.value`,$e(r))},re=n=>{F();let r=[],a={},o=Object.keys(n).sort();for(let t of o){if(t===`__proto__`){r.push(Mv(`local.runtime.parameter`,`Parameter names cannot be "__proto__".`));continue}if(t.startsWith(`@`)){r.push(Mv(`local.runtime.parameter`,`Internal parameter "${t}" cannot be written by name.`));continue}if(!Object.hasOwn(e.bindings,t)){r.push(Mv(`local.runtime.parameter`,`Unknown parameter "${t}".`));continue}let o=e.bindings[t],s=zv(o,i.get(t)??[],n[t]);s.ok?a[t]=Tv(s.value):r.push(ne(o,s.detail))}if(r.length)return r;if(!o.some(e=>!Dv(w[e],a[e])))return[];let l={...w,...a},u=new Set;for(let e of o)for(let t of s.get(e)??[])u.add(t);for(let n of[...u].sort())if(c(n,l)){let i=t.get(n);r.push(i?jv(e,i,`local.runtime.value`,ze(`local.runtime.value.range-order`)):Mv(`local.runtime.value`,$e(ze(`local.runtime.value.range-order`))))}return r.length?r:(te(l),[])};ee(),I();let ie=e=>{let t=P.get(e);if(!t){if(t=Yt(e),P.size>=wv){let e=P.keys().next().value;e!==void 0&&P.delete(e)}P.set(e,t)}return t},ae=e=>{let t=new Set,n=e=>{t.add(e.id);for(let t of e.children??[])n(t)};return n(e),t};return{document:e,snapshot(){return F(),A},get(e,n){F();let r=t.get(e.id);if(!r)return null;let i=n===void 0?x(r):a.get(r.id)?.[n];return i&&Object.hasOwn(w,i)?Tv(w[i]):null},set(n,r,o){F();let s=t.get(n.id);if(!s)return[jv(e,n,`local.runtime.binding`,ze(`local.runtime.binding.no-writable`))];let l=a.get(s.id),u;if(o===void 0){if(l)return[jv(e,s,`local.runtime.binding`,ze(`local.runtime.binding.needs-slot`))];u=x(s)}else if(u=l?.[o],!u)return[jv(e,s,`local.runtime.binding`,ze(`local.runtime.binding.unknown-slot`,{slot:o}))];let d=Object.hasOwn(e.bindings,u)?e.bindings[u]:void 0;if(!d)return[jv(e,s,`local.runtime.binding`,ze(`local.runtime.binding.no-writable`))];let f=zv(d,i.get(u)??[],r);if(!f.ok)return[jv(e,s,`local.runtime.value`,f.detail)];let p=Tv(f.value);if(Dv(w[u],p))return[];let m={...w,[u]:p};return c(s.id,m)?[jv(e,s,`local.runtime.value`,ze(`local.runtime.value.range-order`))]:(te(m),[])},setMany(n,r){F();let o=t.get(n.id);if(!o)return[jv(e,n,`local.runtime.binding`,ze(`local.runtime.binding.no-writable`))];let s=a.get(o.id);if(!s)return[jv(e,o,`local.runtime.binding`,ze(`local.runtime.binding.no-multi-slot`))];let l=Object.entries(r);if(!l.length)return[];let u={...w};for(let[t,n]of l){let r=s[t];if(!r||!Object.hasOwn(e.bindings,r))return[jv(e,o,`local.runtime.binding`,ze(`local.runtime.binding.unknown-slot`,{slot:t}))];let a=zv(e.bindings[r],i.get(r)??[],n);if(!a.ok)return[jv(e,o,`local.runtime.value`,a.detail)];u[r]=Tv(a.value)}return c(o.id,u)?[jv(e,o,`local.runtime.value`,ze(`local.runtime.value.range-order`))]:(l.every(([e,t])=>Dv(w[s[e]],t))||te(u),[])},parameterNames(){return F(),o},getParameter(t){if(F(),!t.startsWith(`@`)&&Object.hasOwn(e.bindings,t))return Object.hasOwn(w,t)?Tv(w[t]):void 0},getParameters(){F();let e={};for(let t of o){let n=w[t];e[t]=Array.isArray(n)?Object.freeze([...n]):n}return Object.freeze(e)},setParameter(e,t){F();let n=Object.create(null);return n[e]=t,re(n)},setParameters(e){if(F(),typeof e!=`object`||!e||Array.isArray(e))throw TypeError(`setParameters requires an object of parameter values.`);return re(e)},evaluate(e){F();let t=ie(e).evaluate(O);return Array.isArray(t)?t.slice():t},validate(){if(F(),b&&b.revision===T)return b.diagnostics.map(Ev);let e=C();return b={revision:T,diagnostics:e},e.map(Ev)},text(e){return F(),tn(e,O)},reset(n){F();let r=t.get(n.id);if(!r)return;let a=ae(r),o={...w};for(let[t,n]of Object.entries(e.bindings)){if(!(i.get(t)??[]).some(e=>a.has(e.id)))continue;let e=vt(n.initial);if(e)throw new z(`expression-budget`,`Parameter "${t}": ${$e(e)}`,0);o[t]=Tv(n.initial)}for(let e of a)N.set(e,(N.get(e)??0)+1);te(o)},resetToken(e){F();let n=t.get(e.id);return n?N.get(n.id)??0:0},subscribe(e){return F(),M.add(e),()=>{M.delete(e)}},dispose(){j||(j=!0,M.clear(),P.clear(),d.clear(),N.clear())}}}var Q=(e,t,...n)=>(0,y.createElement)(e,t,...n),Vv={" ":`space`,",":`thinspace`,":":`medspace`,";":`thickspace`,"!":`negthinspace`,"{":`lbrace`,"}":`rbrace`,"|":`vert`,"%":`percent`,"&":`amp`,"#":`hash`,_:`underscore`,$:`dollar`},Hv=5e4,Uv=2e4,Wv=120,Gv=2e3;function Kv(e){return e.length>Gv?`${e.slice(0,Gv)}…`:e}function qv(e){if(e.length>Hv)throw Error(`Math source exceeds the length limit.`);let t=[],n=e=>{if(t.length>=Uv)throw Error(`Math input contains too many tokens.`);t.push(e)},r=0;for(;r<e.length;){let t=e[r];if(t===` `||t===` `||t===`\r`||t===`
|
|
60
|
+
`,t.range.end),i=r<0?e.source.length:r;return e.source.slice(n,t.range.start).trim()===``&&e.source.slice(t.range.end,i).trim()===``}function iv(e,t,n){let r=E_(e.source,t.node.range.start,t.node.range.end),i=/(?:^|[\s"'/])value\s*=\s*(["'])/.exec(r);if(!i)return t.node.range.start;let a=t.node.range.start+i.index+i[0].length;return Math.min(t.node.range.end,a+n)}function av(e){let t=[],n=new Map,r=new Set(e.nodes);for(let i of e.entries){if(i.name!==`computed`&&i.name!==`const`)continue;let a=i.name,o=i.node;if(!r.has(o)||!rv(e,o)){e.report(`local.computation.placement`,`<${a}> declarations must be standalone tags at the document top level.`,o.range.start,o.range.end);continue}let s=e.attrs.get(o.id)??{},c=s.name,l=typeof c?.value==`string`?c.value:``;if(!c||!l)continue;if(l.length>a_){e.report(`local.budget.identifier`,`Computation name exceeds the ${a_}-character limit.`,c.offset);continue}if(!r_.test(l)){e.report(`local.computation.name`,`Computation name "${l}" must match [A-Za-z_][A-Za-z0-9_]*.`,c.offset);continue}if(st.has(l)||c_.has(l)){e.report(`local.computation.reserved`,`Computation name "${l}" is reserved; choose another name.`,c.offset);continue}if(Object.hasOwn(e.bindingKinds,l)){e.report(`local.computation.duplicate`,`Computation name "${l}" conflicts with a control parameter of the same name.`,c.offset);continue}if(n.has(l)){e.report(`local.computation.duplicate`,`Computation name "${l}" is declared more than once.`,c.offset);continue}n.set(l,a);let u=s.value;if(!u)continue;let d=h_(u.raw);d?d.expression?t.push({name:l,kind:a,source:d.expression,expressionOffset:iv(e,i,d.start),nodeId:o.id,range:{...o.range}}):e.report(`local.expression.empty`,`Interpolation expression cannot be empty.`,u.offset):e.report(`local.computation.value`,`The value of <${a}> must be exactly one {{ expression }} interpolation.`,u.offset,u.offset+u.raw.length)}let i=Qn(t,e.bindingKinds,e.report);e.computations=i.computations,e.computationKinds=i.kinds}function ov(e){return Object.keys(e.computationKinds).length?{...e.bindingKinds,...e.computationKinds}:e.bindingKinds}function sv(e){let t=[];for(let n of e)(n.type!==`component`||n.name!==`computed`&&n.name!==`const`)&&(n.children&&=sv(n.children),t.push(n));return t}function cv(e){let t=ov(e),n=Object.keys(t),r=(t,n)=>{t instanceof z?e.report(`local.expression.${t.code||`invalid`}`,`Expression error: ${t.message}`,n+(Number.isFinite(t.offset)?t.offset:0),void 0,{key:`local.expression.error`,params:{detail:t.message,code:t.code||`invalid`,near:e.source.slice(Math.max(n,n+t.offset-16),n+t.offset+24)}}):e.report(`local.expression.invalid`,`Expression error: ${t instanceof Error?t.message:String(t)}`,n,void 0,{key:`local.expression.error`,params:{detail:t instanceof Error?t.message:String(t),code:`invalid`}})},i=(i,a,o)=>{if(!i.trim())return e.report(`local.expression.empty`,`Interpolation expression cannot be empty.`,a,void 0,{key:`local.expression.empty`}),null;let s=null;try{s=Yt(i)}catch(e){return r(e,a),null}if(!s)return null;let c=!1;for(let r of s.dependencies)if(!Object.hasOwn(t,r)){let t=_v(r,n);e.report(`local.binding.unknown`,`Reference to undeclared parameter ${r}.${t?` Did you mean ${t}?`:``}`,a+Math.max(0,i.indexOf(r)),void 0,t?{key:`local.binding.unknown.suggestion`,params:{name:r,suggestion:t}}:{key:`local.binding.unknown`,params:{name:r}}),c=!0}if(c)return null;let l;try{l=s.inferType(t)}catch(e){return r(e,a),null}return o===`number`&&l!==`number`?e.report(`local.type`,`Expected a number here, but the expression evaluates to ${x_(l)}.`,a,void 0,{key:`local.type.number`,params:{kind:x_(l)}}):o===`boolean`&&l!==`boolean`?e.report(`local.type`,`Expected a boolean here, but the expression evaluates to ${x_(l)}.`,a,void 0,{key:`local.type.boolean`,params:{kind:x_(l)}}):o===`string`&&l!==`string`?e.report(`local.type`,`Expected a string here, but the expression evaluates to ${x_(l)}.`,a,void 0,{key:`local.type.string`,params:{kind:x_(l)}}):o===`text`&&(l===`array`||l===`number-array`)&&e.report(`local.type`,`Arrays cannot be displayed directly; convert them first with a function such as len.`,a,void 0,{key:`local.type.array`}),l},a=t=>{for(let n of t){if(n.type===`interpolation`){let t=e.source.slice(n.range.start+2,Math.max(n.range.start+2,n.range.end-2)),r=n.value??``,a=Math.max(0,t.indexOf(r)),o=n.range.start+2+a;e.expressionKinds.set(n.id,i(r,o,`text`))}n.children&&a(n.children)}};a(e.nodes);for(let t of e.entries){if(t.name===`computed`||t.name===`const`)continue;let n=e.attrs.get(t.node.id)??{};for(let[r,a]of Object.entries(n)){let n=t.schema.props[r];if(n&&!n.static&&(t.name!==`data-table`||r!==`rows`&&r!==`key`)&&(t.name!==`column`||r!==`value`)&&(t.name!==`validation`||r!==`when`)){if(n.kind===`string`){let t=m_(a.raw);for(let n of t.unterminated)e.report(`local.interpolation`,`Interpolation is missing }}.`,a.offset+n,void 0,{key:`local.interpolation.unclosed`});for(let e of t.segments)i(e.expression,a.offset+e.start,`text`)}else a.dynamic&&(n.kind===`number`?i(a.expression??``,a.expressionOffset??a.offset,`number`):n.kind===`boolean`?i(a.expression??``,a.expressionOffset??a.offset,`boolean`):n.kind===`enum`&&i(a.expression??``,a.expressionOffset??a.offset,`string`))}}if(t.name===`if`){let t=n.when;t&&!t.dynamic&&e.report(`local.attribute.interpolation`,`The when attribute of if must be a full boolean interpolation, e.g. when="{{ seats >= 5 }}".`,t.offset,void 0,{key:`local.attribute.interpolation`})}}}function lv(e,t,n){let r={syntax:`local`,source:e.source,nodes:e.nodes,initialState:n,bindings:t,...Object.keys(e.computations).length?{computations:e.computations}:{}},i=`__local_core_check__`,a=ir(r,i,!1),o=new Set,s=e=>{for(let t of e){if(t.type===`heading`){let e=a.ids.get(t);e&&e.startsWith(`${i}-`)&&o.add(e.slice(21))}t.children&&s(t.children)}};s(e.nodes);let c=new Set;for(let t of e.entries){if(t.name!==`anchor`)continue;let n=(e.attrs.get(t.node.id)??{}).id;if(!n)continue;let r=typeof n.value==`string`?n.value:``;!r||!uv.test(r)?e.report(`local.anchor.id`,`Anchor id "${r}" must match [A-Za-z_][A-Za-z0-9_-]*.`,n.offset,void 0,{key:`local.anchor.id`,params:{id:r}}):(c.has(r)?e.report(`local.anchor.duplicate`,`Duplicate anchor id "${r}".`,n.offset,void 0,{key:`local.anchor.duplicate`,params:{id:r}}):c.add(r),o.has(r)&&e.report(`local.anchor.duplicate`,`Anchor id "${r}" collides with an automatic heading target.`,n.offset,void 0,{key:`local.anchor.heading-collision`,params:{id:r}}))}for(let t of e.entries){if(t.name!==`jump`)continue;let n=(e.attrs.get(t.node.id)??{}).to;if(!n)continue;let r=typeof n.value==`string`?n.value:``;r?r.startsWith(`#`)||/\s/.test(r)?e.report(`local.jump.target`,`<jump> target "${r}" must be a bare heading slug or anchor id without "#" or whitespace.`,n.offset,void 0,{key:`local.jump.bad-target`,params:{target:r}}):!c.has(r)&&!o.has(r)&&e.report(`local.jump.target`,`<jump> target "${r}" does not resolve to a heading or explicit anchor in this document.`,n.offset,void 0,{key:`local.jump.unresolved`,params:{target:r}}):e.report(`local.jump.target`,`<jump> target cannot be empty.`,n.offset,void 0,{key:`local.jump.empty`})}}var uv=/^[A-Za-z_][A-Za-z0-9_-]*$/;function dv(e,t,n){t instanceof z?e.report(`local.expression.${t.code||`invalid`}`,`Expression error: ${t.message}`,n+(Number.isFinite(t.offset)?t.offset:0)):e.report(`local.expression.invalid`,`Expression error: ${t instanceof Error?t.message:String(t)}`,n)}function fv(e,t,n,r,i){if(!t.trim())return e.report(`local.expression.empty`,`Interpolation expression cannot be empty.`,n),null;let a;try{a=Yt(t)}catch(t){return dv(e,t,n),null}let o=Object.keys(r),s=!1;for(let i of a.dependencies)if(!Object.hasOwn(r,i)){let r=_v(i,o);e.report(`local.binding.unknown`,`Reference to undeclared parameter ${i}.${r?` Did you mean ${r}?`:``}`,n+Math.max(0,t.indexOf(i))),s=!0}if(s||!i)return{compiled:a,kind:null};let c;try{c=a.inferType(r)}catch(t){return dv(e,t,n),null}return{compiled:a,kind:c}}function pv(e,t,n,r,i){if(!e)return null;let a=h_(e.raw);return a?a.expression?{expression:a.expression,base:e.offset+a.start}:(i.report(`local.expression.empty`,`Interpolation expression cannot be empty.`,e.offset+a.start),null):(i.report(t,`<${n}> ${r} must be exactly one {{ expression }} interpolation.`,e.offset,e.offset+e.raw.length),null)}function mv(e){let t=e[`max-rows`];return t&&!t.dynamic&&typeof t.value==`number`&&Number.isInteger(t.value)&&t.value>0&&t.value<=1e3?t.value:100}function hv(e){let t=e.entries.filter(e=>e.name===`data-table`);if(!t.length)return;let n=ov(e),r=0,i=0,a=!1,o=!1;for(let s of t){let t=e.attrs.get(s.node.id)??{},c=__(s.node.children).filter(e=>e.type===`component`&&e.name===`column`),l=mv(t),u=Math.min(c.length,20);r+=l,i+=l*u,!a&&r>2e3&&(a=!0,e.report(`local.budget.data-table.rows`,`The document's generated row budget exceeds ${j}; max-rows summed over every <data-table> must stay within it.`,s.node.range.start,s.node.range.end)),!o&&i>1e4&&(o=!0,e.report(`local.budget.data-table.cells`,`The document's generated cell budget exceeds ${M}; max-rows multiplied by columns, summed over every <data-table>, must stay within it.`,s.node.range.start,s.node.range.end));let d=pv(t.rows,`local.data-table.rows`,`data-table`,`rows`,e),f=`string`,p=!1;if(d){let t=fv(e,d.expression,d.base,n,!0);t?.kind===`array`?(f=`string`,p=!0):t?.kind===`number-array`?(f=`number`,p=!0):t&&t.kind!==null&&e.report(`local.data-table.rows`,`<data-table> rows must evaluate to an array, but the expression evaluates to ${x_(t.kind)}.`,d.base)}let m={...n,item:f,index:`number`},h=pv(t.key,`local.data-table.key`,`data-table`,`key`,e);if(h){let t=fv(e,h.expression,h.base,m,p);if(t){let r=t.compiled.dependencies;r.includes(`item`)||e.report(`local.data-table.key`,`<data-table> key must depend on item.`,h.base);for(let t of r)t!==`item`&&(t===`index`?e.report(`local.data-table.key`,`<data-table> key cannot depend on index; use a stable item identifier.`,h.base):Object.hasOwn(n,t)&&e.report(`local.data-table.key`,`<data-table> key cannot depend on global parameter "${t}"; it must be derived from item only.`,h.base));t.kind!==null&&t.kind!==`string`&&t.kind!==`number`&&e.report(`local.data-table.key`,`<data-table> key must evaluate to a string or number, got ${x_(t.kind)}.`,h.base)}}for(let t of c){let n=e.attrs.get(t.id)??{},r=n.label;r&&!String(r.value??``).trim()&&e.report(`local.data-table.column`,`<column> label cannot be empty.`,r.offset);let i=pv(n.value,`local.data-table.value`,`column`,`value`,e);if(!i)continue;let a=fv(e,i.expression,i.base,m,p);a&&(a.kind===`array`||a.kind===`number-array`)&&e.report(`local.data-table.value`,`<column> value must be a scalar string, number, boolean or null, got ${x_(a.kind)}.`,i.base)}}}function gv(e){let t=[],n=0,r=!1,i=Object.keys(e.bindingKinds),a=ov(e);for(let o of e.entries){if(o.name!==`validation`)continue;n+=1;let s=o.node;if(n>100){r||(r=!0,e.report(`local.validation.budget`,`The document declares more than 100 validation rules; rules in hidden regions count too.`,s.range.start,s.range.end));continue}o.parent&&(o.parent.schema.form!==`container`||o.parent.name===`data-table`)&&e.report(`local.validation.placement`,`<validation> can appear in normal prose or a container, but not inside inline content or a data table.`,s.range.start,s.range.end);let c=e.attrs.get(s.id)??{},l=``,u=[],d=c.when;if(d){let t=h_(d.raw);if(!t)e.report(`local.validation.when`,`<validation> when must be exactly one {{ boolean }} interpolation.`,d.offset,d.offset+d.raw.length);else if(t.expression){l=t.expression;let n=fv(e,l,d.offset+t.start,a,!0);n&&(u=[...n.compiled.dependencies],n.kind!==null&&n.kind!==`boolean`&&e.report(`local.type`,`Expected a boolean here, but the expression evaluates to ${x_(n.kind)}.`,d.offset+t.start))}}let f=c.fields,p=f?dg(f.raw):[];f&&!p.length&&e.report(`local.validation.fields`,`<validation> requires at least one field name.`,f.offset,f.offset+f.raw.length);let m=new Set;for(let t of p)if(m.has(t))e.report(`local.validation.fields`,`Duplicate field "${t}" in <validation> fields.`,f?.offset??s.range.start);else if(m.add(t),!Object.hasOwn(e.bindingKinds,t)){let n=_v(t,i);e.report(`local.validation.fields`,`Field "${t}" is not a public writable parameter.${n?` Did you mean ${n}?`:``}`,f?.offset??s.range.start)}l&&t.push({nodeId:s.id,expression:l,dependencies:u,message:typeof c.message?.value==`string`?c.message.value:``,fields:[...m],range:{...s.range}})}return t}function _v(e,t){if(e.length>a_)return;let n,r=1/0;for(let i of t){let t=vv(e,i);t<r&&(n=i,r=t)}return r<=2?n:void 0}function vv(e,t){let n=Array.from({length:t.length+1},(e,t)=>t);for(let r=1;r<=e.length;r++){let i=n[0];n[0]=r;for(let a=1;a<=t.length;a++){let o=n[a];n[a]=Math.min(n[a]+1,n[a-1]+1,i+(e[r-1]===t[a-1]?0:1)),i=o}}return n[t.length]}function yv(e,t){let n=e.schema.props.samples?.default,r=typeof n==`number`?n:200;return A_(e,t,`samples`)??r}function bv(e){let t=ov(e),n=0,r=!1;for(let i of e.entries){if(i.name!==`plot`)continue;let a=e.attrs.get(i.node.id)??{},o=__(i.node.children).filter(e=>e.type===`math`),s=yv(i,a);o.length>16&&e.report(`local.budget.plot.curves`,`<plot> supports at most 16 curves, but has ${o.length}.`,i.node.range.start,i.node.range.end,{key:`local.budget.plot.curves`,params:{limit:16,count:o.length}});let c=o.length*s,l=n+c;if(!r&&l>2e4&&(e.report(`local.budget.plot.points`,`The document's total plot sample count exceeds the limit of ${O}.`,i.node.range.start,i.node.range.end,{key:`local.budget.plot.points`,params:{limit:O}}),r=!0),n=Math.min(O+1,l),!(o.length>16||r))for(let n of o){let r=(n.value??``).trim();if(!/^y\s*=/u.test(r)){e.report(`local.math.formula`,`<plot> formulas must be written explicitly as y = expression.`,n.range.start,n.range.end,{key:`local.math.formula.shape`});continue}let i=null;try{i=Mn(r)}catch(t){e.report(`local.math`,`Cannot compute plot formula: ${t instanceof Error?t.message:String(t)}`,n.range.start,n.range.end,{key:`local.math.compute`,params:{detail:t instanceof Error?t.message:String(t),code:t&&typeof t==`object`&&`code`in t&&typeof t.code==`string`?t.code:`latex-syntax`,near:r.slice(0,120)}})}if(i)for(let r of i.dependencies)r!==`x`&&r!==`y`&&(Object.hasOwn(t,r)?t[r]!==`number`&&e.report(`local.math.binding`,`Plot parameter "${r}" must be a number, but is ${x_(t[r])}.`,n.range.start,n.range.end,{key:`local.math.binding.type`,params:{name:r,kind:x_(t[r])}}):e.report(`local.math.binding`,`Plot formula references undeclared parameter "${r}".`,n.range.start,n.range.end,{key:`local.math.binding.unknown`,params:{name:r}}))}}}function xv(e,t,n){let r=(e.children??[]).filter(e=>e.type===`tableRow`);if(!r.length)return t.report(`local.table.header`,`The table for <${n.name}> is missing a header.`,e.range.start,e.range.end,{key:`local.table.header.missing`,params:{name:n.name}}),null;let i=r[0].children??[],a=[];for(let e of i){if(y_(e))return t.report(`local.table.header`,`Table headers cannot contain interpolations.`,e.range.start,e.range.end,{key:`local.table.header.interpolation`}),null;let n=v_(e).trim();if(!n)return t.report(`local.table.header`,`Table headers cannot be empty.`,e.range.start,e.range.end,{key:`local.table.header.empty`}),null;if(a.includes(n))return t.report(`local.table.header`,`Duplicate table header "${n}".`,e.range.start,e.range.end,{key:`local.table.header.duplicate`,params:{name:n}}),null;a.push(n)}if(!a.length)return t.report(`local.table.header`,`Table headers cannot be empty.`,e.range.start,e.range.end,{key:`local.table.header.empty`}),null;let o=[];for(let e of r.slice(1)){let n=e.children??[];n.length===a.length?o.push(n):t.report(`local.table.row`,`Table row has a different column count: header has ${a.length} columns, this row has ${n.length}.`,e.range.start,e.range.end,{key:`local.table.row.mismatch`,params:{header:a.length,row:n.length}})}return{header:a,rows:o}}function Sv(e,t){let n=__(e.children);if(n.length===1&&n[0].type===`interpolation`){let e=t.expressionKinds.get(n[0].id);if(e===`number`||e===null)return!0;if(e!==void 0)return!1}let r=v_(e).trim();return r?l_(r)!==null:!1}function Cv(e,t,n,r,i){let a=e.header[t];e.rows.forEach((e,i)=>{let o=e[t];if(!o)return;let s=__(o.children);if(s.length===1&&s[0].type===`interpolation`){let e=n.expressionKinds.get(s[0].id);e!=null&&e!==`number`&&n.report(`local.chart.numeric`,`${r.name===`timeline`?`Timeline`:`Chart`} column "${a}" requires a number in row ${i+1}, but the expression evaluates to ${x_(e)}.`,o.range.start,o.range.end,{key:r.name===`timeline`?`local.timeline.numeric.expression`:`local.chart.numeric.expression`,params:{name:a,row:i+1,kind:x_(e)}})}else Sv(o,n)||n.report(`local.chart.numeric`,`${r.name===`timeline`?`Timeline`:`Chart`} column "${a}" requires a plain number in row ${i+1}, got "${v_(o).trim()||`empty`}".`,o.range.start,o.range.end,{key:r.name===`timeline`?`local.timeline.numeric.plain`:`local.chart.numeric.plain`,params:{name:a,row:i+1,value:v_(o).trim()||`empty`}})})}function wv(e,t){return e.indexOf(t)}function Tv(e){for(let t of e.entries){if(t.name===`table`){Ev(t,e);continue}if(t.name!==`chart`&&t.name!==`timeline`)continue;let n=Ev(t,e);n&&(t.name===`chart`?kv(t,n,e):Av(t,n,e))}}function Ev(e,t){if(t.tableShapes.has(e.node.id))return t.tableShapes.get(e.node.id)??null;let n=t.tables.get(e.node.id),r=n?xv(n,t,e):null;return t.tableShapes.set(e.node.id,r),r}function Dv(e,t){if(t.size===0)return;let n=Object.create(null),r=0;for(let[e,i]of t)i&&(n[e]=Object.freeze({header:Object.freeze([...i.header]),rowIds:Object.freeze(i.rows.map(e=>Object.freeze(e.map(e=>e.id))))}),r+=1);r!==0&&(e.tableShapes=Object.freeze(n))}function Ov(e){for(let t of e.entries){if(t.name!==`table`&&t.name!==`chart`)continue;let n=e.attrs.get(t.node.id)??{},r=n.key;if(!r)continue;let i=typeof r.value==`string`?r.value.trim():``;if(!i){e.report(`local.selection.key`,`<${t.name}> key cannot be empty.`,r.offset,void 0,{key:`local.selection.key.empty`,params:{component:t.name}}),e.selections.set(t.node.id,[``]);continue}let a=Ev(t,e);if(!a){e.selections.set(t.node.id,[``]);continue}let o=wv(a.header,i);if(o<0){e.report(`local.selection.key`,`<${t.name}> key column "${i}" does not exist in its table.`,r.offset,void 0,{key:`local.selection.key.missing-column`,params:{component:t.name,name:i}}),e.selections.set(t.node.id,[``]);continue}let s=[],c=new Set;a.rows.forEach((n,r)=>{let a=n[o];if(!a)return;if(y_(a)){e.report(`local.selection.key`,`<${t.name}> key column "${i}" must contain static text; row ${r+1} contains an interpolation.`,a.range.start,a.range.end,{key:`local.selection.key.interpolation`,params:{component:t.name,name:i,row:r+1}});return}let l=v_(a).trim();l?c.has(l)?e.report(`local.selection.key`,`<${t.name}> key column "${i}" must be unique; duplicate value "${l}".`,a.range.start,a.range.end,{key:`local.selection.key.duplicate`,params:{component:t.name,name:i,value:l}}):(c.add(l),s.push(l)):e.report(`local.selection.key`,`<${t.name}> key column "${i}" cannot be empty in row ${r+1}.`,a.range.start,a.range.end,{key:`local.selection.key.empty-cell`,params:{component:t.name,name:i,row:r+1}})}),e.selections.set(t.node.id,[``,...s]);let l=n.initial;l&&typeof l.value==`string`&&l.value!==``&&!s.includes(l.value)&&e.report(`local.initial.option`,`Initial selection "${l.value}" of <${t.name}> is not a value of key column "${i}".`,l.offset,void 0,{key:`local.selection.key.initial`,params:{value:l.value,component:t.name,name:i}})}}function kv(e,t,n){let r=n.attrs.get(e.node.id)??{},i=typeof r.kind?.value==`string`?r.kind.value:`bar`,a=t.header;for(let t of a)t.includes(`,`)&&n.report(`local.chart.column`,`Chart column names cannot contain commas: "${t}".`,e.node.range.start,e.node.range.end,{key:`local.chart.column.comma`,params:{name:t}});let o=typeof r.x?.value==`string`?r.x.value.trim():``,s=typeof r.y?.value==`string`?r.y.value.trim():``;o&&wv(a,o)<0&&n.report(`local.chart.column`,`Chart x column "${o}" does not exist.`,r.x?.offset??e.node.range.start,void 0,{key:`local.chart.column.x-missing`,params:{name:o}});let c=[];if(s){c=s.split(`,`).map(e=>e.trim()).filter(Boolean),c.length||n.report(`local.chart.column`,`Chart y requires a column name.`,r.y?.offset??e.node.range.start,void 0,{key:`local.chart.column.y-required`});for(let t of c)wv(a,t)<0&&n.report(`local.chart.column`,`Chart y column "${t}" does not exist.`,r.y?.offset??e.node.range.start,void 0,{key:`local.chart.column.y-missing`,params:{name:t}})}let l=[];if(i===`bar`||i===`line`||i===`area`){let t=o?Math.max(0,wv(a,o)):0;l=c.length?c.map(e=>wv(a,e)).filter(e=>e>=0):a.map((e,t)=>t).filter(e=>e!==t),l.length||n.report(`local.chart.column`,`Chart requires at least one numeric column.`,e.node.range.start,e.node.range.end,{key:`local.chart.column.needs-numeric`})}else if(i===`scatter`){let r=o?wv(a,o):0;r<0?n.report(`local.chart.column`,`Scatter chart x column "${o}" does not exist.`,e.node.range.start,void 0,{key:`local.chart.column.scatter-x-missing`,params:{name:o}}):Cv(t,r,n,e,`x`),l=c.length?c.map(e=>wv(a,e)).filter(e=>e>=0):a.map((e,t)=>t).filter(e=>e!==r),l.length||n.report(`local.chart.column`,`Scatter chart requires at least one numeric column.`,e.node.range.start,e.node.range.end,{key:`local.chart.column.scatter-needs-numeric`})}else if(i===`donut`){if(a.length<2){n.report(`local.chart.column`,`Donut chart requires a label column and a value column.`,e.node.range.start,e.node.range.end,{key:`local.chart.column.donut-columns`});return}if(c.length===1){let e=wv(a,c[0]);e>=0&&(l=[e])}else c.length>1?n.report(`local.chart.column`,`Donut chart y can only specify one numeric column.`,r.y?.offset??e.node.range.start,void 0,{key:`local.chart.column.donut-y`}):a.length>2?n.report(`local.chart.column`,`A donut chart with more than two columns must use y to specify the single numeric column.`,e.node.range.start,e.node.range.end,{key:`local.chart.column.donut-need-y`}):l=[1]}l=[...new Set(l)];for(let r of l)Cv(t,r,n,e,`y`);if(i===`donut`)for(let e of l)t.rows.forEach((t,r)=>{let i=t[e];if(!i||__(i.children).length)return;let a=l_(v_(i).trim());a!==null&&a<0&&n.report(`local.chart.negative`,`Donut chart values cannot be negative; row ${r+1} is ${a}.`,i.range.start,i.range.end,{key:`local.chart.negative`,params:{row:r+1,value:a}})})}function Av(e,t,n){let r=[{title:`Task`,start:`Start`,duration:`Duration`,notes:`Notes`},{title:`事项`,start:`开始`,duration:`时长`,notes:`说明`}].find(e=>t.header.includes(e.title)&&t.header.includes(e.start)&&t.header.includes(e.duration));if(!r){n.report(`local.timeline.header`,`Timeline requires either Task, Start and Duration columns or 事项, 开始 and 时长 columns, with optional Notes or 说明.`,e.node.range.start,e.node.range.end,{key:`local.timeline.header.missing`});return}let i=new Set(Object.values(r));for(let r of t.header)i.has(r)||n.report(`local.timeline.header`,`Timeline does not support column "${r}".`,e.node.range.start,e.node.range.end,{key:`local.timeline.header.column`,params:{name:r}});for(let i of[r.start,r.duration]){let r=wv(t.header,i);r>=0&&Cv(t,r,n,e,i)}let a=wv(t.header,r.start),o=wv(t.header,r.duration);t.rows.forEach((e,r)=>{for(let i of[a,o]){if(i<0)continue;let a=e[i];if(!a||__(a.children).length)continue;let o=l_(v_(a).trim());o!==null&&o<0&&n.report(`local.timeline.value`,`Timeline column "${t.header[i]}" cannot be negative in row ${r+1}.`,a.range.start,a.range.end,{key:`local.timeline.value.negative`,params:{name:t.header[i],row:r+1}})}})}function jv(e,t,n,r,i=r+1,a){if(e.diagnostics.length>=100)return;let o=Math.max(0,Math.min(e.source.length,r)),s=Math.max(o,Math.min(e.source.length,Math.max(o,i))),c=0,l=e.lineStarts.length-1;for(;c<l;){let t=Math.ceil((c+l)/2);e.lineStarts[t]<=o?c=t:l=t-1}let u=ze(a?.key??t,a?.params);e.diagnostics.push({code:t,message:n.length>2e3?`${n.slice(0,D-1)}…`:n,severity:`warning`,range:{start:o,end:s},line:c+1,column:o-e.lineStarts[c]+1,messageKey:u.key,...u.params?{params:u.params}:{}})}function Mv(e,t,n){for(let r of e){if(r.type===`hostComponent`){let e=r.name?t.get(r.name):void 0;if(e)Nv(r,e,n);else{let e=r.name??``;jv(n,`local.component.unknown`,`Unknown component <${e}>. This mode only accepts local interaction components.`,r.range.start,r.range.end,{key:`local.component.unknown`,params:{name:e}})}}r.children&&Mv(r.children,t,n)}}function Nv(e,t,n){let r=t.name,i=e.attrs??{};for(let[a,o]of Object.entries(i)){let i=t.props[a],s=D_(n,e,a);i?o.length>1e5?n.report(`local.budget.attribute`,`Attribute ${a} on component <${r}> exceeds the ${w}-character limit.`,s,s+a.length,{key:`local.budget.attribute`,params:{name:a,component:r,limit:w}}):Fv(a,i,o,s,n):n.report(`local.host.attribute`,`Component <${r}> does not support attribute ${a}.`,s,s+a.length,{key:`local.host.attribute.unknown`,params:{component:r,name:a}})}for(let[a,o]of Object.entries(t.props))o.required&&!Object.hasOwn(i,a)&&n.report(`local.host.attribute`,`Component <${r}> is missing required attribute ${a}.`,e.range.start,e.range.end,{key:`local.host.attribute.required`,params:{component:r,name:a}})}function Pv(e){if(!h_(e))return!1;let t=m_(e);return t.segments.length===1&&t.unterminated.length===0}function Fv(e,t,n,r,i){if(t.static){let t=m_(n);if(t.segments.length||t.unterminated.length){i.report(`local.host.attribute`,`Attribute ${e} is static and cannot contain interpolations.`,r,r+n.length,{key:`local.host.attribute.static`,params:{name:e}});return}}if(t.kind===`string`){let a=m_(n);if(a.segments.length>0||a.unterminated.length>0){t.pattern&&!Pv(n)&&i.report(`local.host.attribute`,`Attribute ${e} must be a literal matching ${t.pattern} or one full interpolation.`,r,r+n.length,{key:`local.host.attribute.interpolation`,params:{name:e,pattern:t.pattern}});return}if(t.pattern){let a=!0;try{a=new RegExp(t.pattern).test(n)}catch{}a||i.report(`local.host.attribute`,`Attribute ${e} must match pattern ${t.pattern}.`,r,r+n.length,{key:`local.host.attribute.pattern`,params:{name:e,pattern:t.pattern}})}return}if(!t.static&&Pv(n))return;if(t.kind===`number`){l_(n)===null&&i.report(`local.host.attribute`,`Attribute ${e} requires a number, got "${n}".`,r,r+n.length,{key:`local.host.attribute.type`,params:{name:e,value:n,kind:`number`}});return}if(t.kind===`boolean`){n!==`true`&&n!==`false`&&i.report(`local.host.attribute`,`Attribute ${e} requires a boolean, got "${n}".`,r,r+n.length,{key:`local.host.attribute.type`,params:{name:e,value:n,kind:`boolean`}});return}let a=t.enum??[];a.includes(n)||i.report(`local.host.attribute`,`Attribute ${e} must be one of ${a.join(` / `)}, got "${n}".`,r,r+n.length,{key:`local.host.attribute.enum`,params:{name:e,values:a.join(` / `),value:n}})}var Iv=1e-9,Lv=200;function Rv(e){return Array.isArray(e)?e.slice():e}function zv(e){return{...e,range:{...e.range}}}function Bv(e,t){return Array.isArray(e)||Array.isArray(t)?!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length?!1:e.every((e,n)=>e===t[n]):e===t}function Vv(e){return e===``||ye(e)!==null}function Hv(e,t,n){let r=(e-t)/n;return Math.abs(r-Math.round(r))<=Iv*Math.max(1,Math.abs(r))}function Uv(e){for(let[t,n]of Object.entries(e))Array.isArray(n)&&!Object.isFrozen(n)&&(e[t]=Object.freeze([...n]));return Object.freeze(e)}function Wv(e,t,n,r){let i=Math.max(0,Math.min(e.source.length,t.range.start)),a=e.source.slice(0,i).split(`
|
|
61
|
+
`);return{code:n,message:$e(r),severity:`error`,range:{start:i,end:Math.max(i+1,Math.min(e.source.length,t.range.end))},line:a.length,column:(a.at(-1)??``).length+1,messageKey:r.key,...r.params?{params:r.params}:{}}}function Gv(e,t){return{code:e,message:t,severity:`error`,range:{start:0,end:0},line:1,column:1}}function Kv(e,t){return e.attrs?.[t]}function qv(e,t){let n=Kv(e,t);if(n===`true`)return!0;if(n===`false`)return!1}function Jv(e,t){let n=Kv(e,t);if(n===void 0)return;let r=Number(n);return Number.isFinite(r)?r:void 0}function Yv(e){return tt(e)}function Xv(e,t){return{ok:!1,detail:ze(e,t)}}function Zv(e,t){if(e.name===`date`){if(!Vv(t))return Xv(`local.runtime.value.date-invalid`);if(t===``&&qv(e,`required`)===!0)return Xv(`local.runtime.value.date-required`);let n=Kv(e,`min`),r=Kv(e,`max`);return t!==``&&n&&t<n?Xv(`local.runtime.value.date-earlier`,{min:n}):t!==``&&r&&t>r?Xv(`local.runtime.value.date-later`,{max:r}):{ok:!0,value:t}}if(e.name===`input`||e.name===`textarea`){let n=Yv(t);if(t===``&&qv(e,`required`)===!0)return Xv(`local.runtime.value.field-required`);let r=Jv(e,`min-length`),i=Jv(e,`max-length`);if(r!==void 0&&r>0&&t!==``&&n<r)return Xv(`local.runtime.value.min-length`,{min:r});if(i!==void 0&&n>i)return Xv(`local.runtime.value.max-length`,{max:i});if(e.name===`input`&&Kv(e,`type`)===`email`&&t!==``){if(t.length>254)return Xv(`local.runtime.value.email-length`,{limit:254});if(!N(t))return Xv(`local.runtime.value.email-invalid`)}}return{ok:!0,value:t}}function Qv(e,t,n){switch(e.type){case`number`:{if(typeof n!=`number`||!Number.isFinite(n))return Xv(`local.runtime.value.finite-number`,{name:e.name});if(e.min!==void 0&&n<e.min)return Xv(`local.runtime.value.min`,{name:e.name,min:e.min});if(e.max!==void 0&&n>e.max)return Xv(`local.runtime.value.max`,{name:e.name,max:e.max});let t=e.step??1,r=e.min??0;return t>0&&!Hv(n,r,t)?Xv(`local.runtime.value.step`,{name:e.name,step:t,base:r}):{ok:!0,value:n}}case`boolean`:return typeof n==`boolean`?{ok:!0,value:n}:Xv(`local.runtime.value.boolean`,{name:e.name});case`string`:{if(typeof n!=`string`)return Xv(`local.runtime.value.string`,{name:e.name});let r=vt(n);if(r)return Xv(`local.runtime.value.budget`,{name:e.name,detail:$e(r),detailKey:r.key,...r.params});for(let e of t){let t=Zv(e,n);if(!t.ok)return t}return e.options?.length&&!e.options.includes(n)?Xv(`local.runtime.value.option`,{value:n,options:e.options.join(`, `)}):{ok:!0,value:n}}case`array`:{if(!Array.isArray(n))return Xv(`local.runtime.value.array`,{name:e.name});let t=vt(n);if(t)return Xv(`local.runtime.value.budget`,{name:e.name,detail:$e(t),detailKey:t.key,...t.params});let r=new Set;for(let t of n){if(typeof t!=`string`)return Xv(`local.runtime.value.array-members`,{name:e.name});if(e.options&&!e.options.includes(t))return Xv(`local.runtime.value.checklist-option`,{value:t});r.add(t)}let i=e.options?e.options.filter(e=>r.has(e)):[...r];return e.maxItems!==void 0&&i.length>e.maxItems?Xv(`local.runtime.value.max-items`,{name:e.name,max:e.maxItems}):{ok:!0,value:i}}case`null`:return{ok:!0,value:n}}return Xv(`local.runtime.value.unsupported-type`,{name:e.name})}function $v(e){if(!e||e.syntax!==`local`)throw Error(`createLocalRuntime requires a local interaction document.`);if(e.syntaxVersion!==void 0&&e.syntaxVersion!==`local-draft-2`||e.versionDeclaration&&e.versionDeclaration.version!==`local-draft-2`)throw Error(`createLocalRuntime requires ${Bm}; migrate the source before constructing a runtime.`);let t=new Map,n=e=>{for(let r of e)t.set(r.id,r),r.children&&n(r.children)};n(e.nodes);let r={},i=new Map;for(let[n,a]of Object.entries(e.bindings)){let e=vt(a.initial);if(e)throw new z(`expression-budget`,`Parameter "${n}": ${$e(e)}`,0);r[n]=Rv(a.initial);let o=[];for(let e of a.nodeIds){let n=t.get(e);n&&o.push(n)}i.set(n,o)}let a=new Map;for(let[t,n]of Object.entries(e.bindingSlots??{}))a.set(t,{...n});let o=Object.freeze(Object.keys(e.bindings).filter(e=>!e.startsWith(`@`)).sort()),s=new Map;for(let[e,t]of a)for(let n of Object.values(t)){if(n.startsWith(`@`))continue;let t=s.get(n)??new Set;t.add(e),s.set(n,t)}let c=(e,t)=>{let n=a.get(e);if(!n?.start||!n?.end)return!1;let r=t[n.start],i=t[n.end];return typeof r==`number`&&typeof i==`number`&&r>i},l=e.computations??{},u=Object.keys(l),d=new Map;for(let[e,t]of Object.entries(l))try{d.set(e,Yt(t.source))}catch{}let{order:f,cyclic:p}=Zn(l),m={},h=new Map,g=e=>e instanceof z?e:new z(`expression-eval`,e instanceof Error?e.message:String(e),0);for(let e of f){let t=l[e];if(!t||t.kind!==`const`)continue;if(Object.hasOwn(t,`value`)){let n=t.value,r=yt(n);if(r){h.set(e,new z(`expression-budget`,`Constant "${e}": ${r}`,0));continue}m[e]=Rv(n);continue}let n=d.get(e);if(!n)h.set(e,new z(`expression-eval`,`Constant "${e}" cannot be evaluated.`,0));else try{let t=n.evaluate({...m}),r=yt(t);if(r){h.set(e,new z(`expression-budget`,`Constant "${e}": ${r}`,0));continue}m[e]=Rv(t)}catch(t){h.set(e,g(t))}}let _=new Map;for(let e of p)_.set(e,new z(`expression-cycle`,`Computation "${e}" is part of a dependency cycle.`,0));let v=[];if(Array.isArray(e.validations)){for(let t of e.validations)if(pg(t))try{v.push({rule:t,expression:Yt(t.expression),error:null})}catch(e){v.push({rule:t,expression:null,error:g(e)})}}let y=fg(typeof e.source==`string`?e.source:``),b=null,S=e=>{let t;try{t=tn(e,O)}catch{t=lg}return ug(t)},C=()=>{let t=[],n=typeof e.source==`string`?e.source:``;for(let e of v){if(e.error){t.push(mg(n,y,e.rule.range,cg,ug(`Validation expression is invalid: ${e.error.message}`)));continue}if(!e.expression)continue;let r;try{r=e.expression.evaluate(O)}catch(r){t.push(mg(n,y,e.rule.range,cg,ug(`Validation expression failed: ${r instanceof Error?r.message:String(r)}`)));continue}typeof r==`boolean`?r||t.push(mg(n,y,e.rule.range,sg,S(e.rule.message))):t.push(mg(n,y,e.rule.range,cg,`Validation expression must evaluate to a boolean.`))}return t},w=r,T=0,E={},D=new Map,O={},k={},A={revision:0,state:Uv({})},j=!1,M=new Set,N=new Map,P=new Map,F=()=>{if(j)throw Error(`The local interaction runtime has been disposed.`)},ee=()=>{if(u.length===0)E={},D=new Map;else{let e=$n(l,f,d,w,m);E=e.values,D=e.errors;for(let[e,t]of h)Object.hasOwn(E,e)||D.set(e,t);for(let[e,t]of _)Object.hasOwn(E,e)||D.set(e,t)}let e={};for(let[t,n]of Object.entries(w))e[t]=n;for(let[t,n]of Object.entries(E))e[t]=n;for(let[t,n]of D)Object.hasOwn(E,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get(){throw n}});O=e;let t={};for(let[e,n]of Object.entries(w))t[e]=n;for(let[e,n]of Object.entries(E))t[e]=n;k=t},I=()=>{A={revision:T,state:Uv(k)}},te=e=>{w=e,T+=1,ee(),I();for(let e of M)e()},ne=(n,r)=>{let a=(i.get(n.name)??[])[0]??(n.owner?t.get(n.owner):void 0)??(n.nodeIds[0]?t.get(n.nodeIds[0]):void 0);return a?Wv(e,a,`local.runtime.value`,r):Gv(`local.runtime.value`,$e(r))},re=n=>{F();let r=[],a={},o=Object.keys(n).sort();for(let t of o){if(t===`__proto__`){r.push(Gv(`local.runtime.parameter`,`Parameter names cannot be "__proto__".`));continue}if(t.startsWith(`@`)){r.push(Gv(`local.runtime.parameter`,`Internal parameter "${t}" cannot be written by name.`));continue}if(!Object.hasOwn(e.bindings,t)){r.push(Gv(`local.runtime.parameter`,`Unknown parameter "${t}".`));continue}let o=e.bindings[t],s=Qv(o,i.get(t)??[],n[t]);s.ok?a[t]=Rv(s.value):r.push(ne(o,s.detail))}if(r.length)return r;if(!o.some(e=>!Bv(w[e],a[e])))return[];let l={...w,...a},u=new Set;for(let e of o)for(let t of s.get(e)??[])u.add(t);for(let n of[...u].sort())if(c(n,l)){let i=t.get(n);r.push(i?Wv(e,i,`local.runtime.value`,ze(`local.runtime.value.range-order`)):Gv(`local.runtime.value`,$e(ze(`local.runtime.value.range-order`))))}return r.length?r:(te(l),[])};ee(),I();let ie=e=>{let t=P.get(e);if(!t){if(t=Yt(e),P.size>=Lv){let e=P.keys().next().value;e!==void 0&&P.delete(e)}P.set(e,t)}return t},ae=e=>{let t=new Set,n=e=>{t.add(e.id);for(let t of e.children??[])n(t)};return n(e),t};return{document:e,snapshot(){return F(),A},get(e,n){F();let r=t.get(e.id);if(!r)return null;let i=n===void 0?x(r):a.get(r.id)?.[n];return i&&Object.hasOwn(w,i)?Rv(w[i]):null},set(n,r,o){F();let s=t.get(n.id);if(!s)return[Wv(e,n,`local.runtime.binding`,ze(`local.runtime.binding.no-writable`))];let l=a.get(s.id),u;if(o===void 0){if(l)return[Wv(e,s,`local.runtime.binding`,ze(`local.runtime.binding.needs-slot`))];u=x(s)}else if(u=l?.[o],!u)return[Wv(e,s,`local.runtime.binding`,ze(`local.runtime.binding.unknown-slot`,{slot:o}))];let d=Object.hasOwn(e.bindings,u)?e.bindings[u]:void 0;if(!d)return[Wv(e,s,`local.runtime.binding`,ze(`local.runtime.binding.no-writable`))];let f=Qv(d,i.get(u)??[],r);if(!f.ok)return[Wv(e,s,`local.runtime.value`,f.detail)];let p=Rv(f.value);if(Bv(w[u],p))return[];let m={...w,[u]:p};return c(s.id,m)?[Wv(e,s,`local.runtime.value`,ze(`local.runtime.value.range-order`))]:(te(m),[])},setMany(n,r){F();let o=t.get(n.id);if(!o)return[Wv(e,n,`local.runtime.binding`,ze(`local.runtime.binding.no-writable`))];let s=a.get(o.id);if(!s)return[Wv(e,o,`local.runtime.binding`,ze(`local.runtime.binding.no-multi-slot`))];let l=Object.entries(r);if(!l.length)return[];let u={...w};for(let[t,n]of l){let r=s[t];if(!r||!Object.hasOwn(e.bindings,r))return[Wv(e,o,`local.runtime.binding`,ze(`local.runtime.binding.unknown-slot`,{slot:t}))];let a=Qv(e.bindings[r],i.get(r)??[],n);if(!a.ok)return[Wv(e,o,`local.runtime.value`,a.detail)];u[r]=Rv(a.value)}return c(o.id,u)?[Wv(e,o,`local.runtime.value`,ze(`local.runtime.value.range-order`))]:(l.every(([e,t])=>Bv(w[s[e]],t))||te(u),[])},parameterNames(){return F(),o},getParameter(t){if(F(),!t.startsWith(`@`)&&Object.hasOwn(e.bindings,t))return Object.hasOwn(w,t)?Rv(w[t]):void 0},getParameters(){F();let e={};for(let t of o){let n=w[t];e[t]=Array.isArray(n)?Object.freeze([...n]):n}return Object.freeze(e)},setParameter(e,t){F();let n=Object.create(null);return n[e]=t,re(n)},setParameters(e){if(F(),typeof e!=`object`||!e||Array.isArray(e))throw TypeError(`setParameters requires an object of parameter values.`);return re(e)},evaluate(e){F();let t=ie(e).evaluate(O);return Array.isArray(t)?t.slice():t},validate(){if(F(),b&&b.revision===T)return b.diagnostics.map(zv);let e=C();return b={revision:T,diagnostics:e},e.map(zv)},text(e){return F(),tn(e,O)},reset(n){F();let r=t.get(n.id);if(!r)return;let a=ae(r),o={...w};for(let[t,n]of Object.entries(e.bindings)){if(!(i.get(t)??[]).some(e=>a.has(e.id)))continue;let e=vt(n.initial);if(e)throw new z(`expression-budget`,`Parameter "${t}": ${$e(e)}`,0);o[t]=Rv(n.initial)}for(let e of a)N.set(e,(N.get(e)??0)+1);te(o)},resetToken(e){F();let n=t.get(e.id);return n?N.get(n.id)??0:0},subscribe(e){return F(),M.add(e),()=>{M.delete(e)}},dispose(){j||(j=!0,M.clear(),P.clear(),d.clear(),N.clear())}}}var Q=(e,t,...n)=>(0,y.createElement)(e,t,...n),ey={" ":`space`,",":`thinspace`,":":`medspace`,";":`thickspace`,"!":`negthinspace`,"{":`lbrace`,"}":`rbrace`,"|":`vert`,"%":`percent`,"&":`amp`,"#":`hash`,_:`underscore`,$:`dollar`},ty=5e4,ny=2e4,ry=120,iy=2e3;function ay(e){return e.length>iy?`${e.slice(0,iy)}…`:e}function oy(e){if(e.length>ty)throw Error(`Math source exceeds the length limit.`);let t=[],n=e=>{if(t.length>=ny)throw Error(`Math input contains too many tokens.`);t.push(e)},r=0;for(;r<e.length;){let t=e[r];if(t===` `||t===` `||t===`\r`||t===`
|
|
62
62
|
`)r+=1;else if(t===`%`)for(;r<e.length&&e[r]!==`
|
|
63
|
-
`;)r+=1;else if(t===`\\`){if(r+1>=e.length){n({kind:`command`,value:`backslash`,offset:r}),r+=1;continue}let t=e[r+1];if(t===`\\`){n({kind:`newline`,value:`\\\\`,offset:r}),r+=2;continue}if(/[A-Za-z]/.test(t)){let t=r+1;for(;t<e.length&&/[A-Za-z]/.test(e[t]);)t+=1;n({kind:`command`,value:e.slice(r+1,t),offset:r}),r=t;continue}n({kind:`command`,value:Object.hasOwn(Vv,t)?Vv[t]:t,offset:r}),r+=2}else if(t>=`0`&&t<=`9`){let t=/^\d+(?:\.\d*)?/.exec(e.slice(r));n({kind:`number`,value:t[0],offset:r}),r+=t[0].length}else if(t===`.`&&e[r+1]>=`0`&&e[r+1]<=`9`){let t=/^(?:\d+(?:\.\d*)?|\.\d+)/.exec(e.slice(r));n({kind:`number`,value:t[0],offset:r}),r+=t[0].length}else/[A-Za-z]/.test(t)?(n({kind:`letter`,value:t,offset:r}),r+=1):(n({kind:`punct`,value:t,offset:r}),r+=1)}return n({kind:`eof`,value:``,offset:e.length}),t}var Jv={alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ϵ`,varepsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,vartheta:`ϑ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,varpi:`ϖ`,rho:`ρ`,varrho:`ϱ`,sigma:`σ`,varsigma:`ς`,tau:`τ`,upsilon:`υ`,phi:`φ`,varphi:`ϕ`,chi:`χ`,psi:`ψ`,omega:`ω`,Gamma:`Γ`,Delta:`Δ`,Theta:`Θ`,Lambda:`Λ`,Xi:`Ξ`,Pi:`Π`,Sigma:`Σ`,Upsilon:`Υ`,Phi:`Φ`,Psi:`Ψ`,Omega:`Ω`},Yv={cdot:`·`,times:`×`,div:`÷`,pm:`±`,mp:`∓`,le:`≤`,leq:`≤`,ge:`≥`,geq:`≥`,ne:`≠`,neq:`≠`,lt:`<`,gt:`>`,approx:`≈`,equiv:`≡`,sim:`∼`,propto:`∝`,infty:`∞`,partial:`∂`,nabla:`∇`,sum:`∑`,prod:`∏`,int:`∫`,iint:`∬`,oint:`∮`,to:`→`,rightarrow:`→`,leftarrow:`←`,Rightarrow:`⇒`,leftrightarrow:`↔`,in:`∈`,notin:`∉`,ni:`∋`,subset:`⊂`,supset:`⊃`,subseteq:`⊆`,supseteq:`⊇`,cup:`∪`,cap:`∩`,emptyset:`∅`,forall:`∀`,exists:`∃`,neg:`¬`,land:`∧`,lor:`∨`,angle:`∠`,perp:`⊥`,parallel:`∥`,degree:`°`,prime:`′`,ldots:`…`,cdots:`⋯`,dots:`…`,langle:`⟨`,rangle:`⟩`,lbrace:`{`,rbrace:`}`,vert:`|`,lvert:`|`,rvert:`|`,lVert:`‖`,rVert:`‖`,backslash:`\\`,percent:`%`,amp:`&`,hash:`#`,underscore:`_`,dollar:`$`,colon:`:`},Xv=new Set([`sin`,`cos`,`tan`,`arcsin`,`arccos`,`arctan`,`exp`,`ln`,`log`,`min`,`max`,`lim`,`det`,`sup`,`inf`,`arg`,`gcd`]),Zv={space:`0.25em`,thinspace:`0.167em`,medspace:`0.222em`,thickspace:`0.278em`,negthinspace:`-0.167em`,quad:`1em`,qquad:`2em`,enspace:`0.5em`},Qv=new Set([`displaystyle`,`textstyle`,`scriptstyle`,`scriptscriptstyle`,`limits`,`nolimits`]),$v=class{tokens;pos=0;source;depth=0;constructor(e){this.source=e,this.tokens=qv(e)}enter(){if(this.depth+=1,this.depth>Wv)throw--this.depth,Error(`Formula is nested too deeply.`)}leave(){--this.depth}render(){let e=this.parseRow({});return e.length===1?e[0]:Q(`mrow`,null,...e)}peek(e=0){return this.tokens[Math.min(this.pos+e,this.tokens.length-1)]}take(){return this.tokens[this.pos++]}atPunct(e){let t=this.peek();return t.kind===`punct`&&t.value===e}atCommand(e){let t=this.peek();return t.kind===`command`&&t.value===e}parseRow(e){this.enter();try{let t=[];for(;;){let n=this.peek();if(n.kind===`eof`||n.kind===`punct`&&e.chars?.has(n.value)||n.kind===`command`&&e.commands?.has(n.value)||n.kind===`newline`&&e.newline)break;t.push(this.parseAtom())}return t}finally{this.leave()}}parseAtom(){this.enter();try{return this.parseAtomBody()}finally{this.leave()}}parseAtomBody(){let e=this.peek(),t;return e.kind===`number`?(this.take(),t=Q(`mn`,null,e.value)):e.kind===`letter`?(this.take(),t=Q(`mi`,null,e.value)):e.kind===`punct`?t=this.parsePunctuation(e):e.kind===`newline`?(this.take(),t=Q(`mspace`,{linebreak:`newline`})):e.kind===`command`?t=this.parseCommand(e):(this.take(),t=Q(`mtext`,null,``)),this.applyScripts(t)}parsePunctuation(e){return this.take(),e.value===`{`?(--this.pos,this.parseBraceGroup()):e.value===`}`||e.value===`&`||e.value===`#`?Q(`mo`,null,e.value):Q(`mo`,e.value===`(`||e.value===`)`||e.value===`[`||e.value===`]`||e.value===`|`?{fence:`true`,stretchy:`true`}:null,e.value)}parseCommand(e){let t=e.value;if(t===`frac`||t===`dfrac`||t===`tfrac`)return this.take(),this.parseFraction();if(t===`sqrt`)return this.take(),this.parseRoot();if(t===`left`)return this.take(),this.parseLeft();if(t===`right`)return this.take(),this.readDelimiter()??Q(`mrow`,null);if(t===`begin`)return this.take(),this.parseEnvironment();if(t===`end`)return this.take(),this.readRawGroup(),Q(`mtext`,null,`\\end`);if(t===`text`||t===`textrm`||t===`mbox`||t===`operatorname`)return this.take(),Q(`mtext`,null,this.readRawGroup());if(t===`mathrm`||t===`mathbf`||t===`mathit`||t===`mathsf`){this.take();let e=this.readRawGroup();return Q(`mtext`,{mathvariant:t===`mathrm`?`normal`:t===`mathbf`?`bold`:t===`mathit`?`italic`:`sans-serif`},e)}if(t===`overline`||t===`bar`||t===`hat`||t===`tilde`||t===`vec`||t===`dot`||t===`ddot`)return this.take(),Q(`mover`,{accent:`true`},this.parseRequiredArgument(),Q(`mo`,{stretchy:`true`},t===`overline`||t===`bar`?`¯`:t===`hat`?`^`:t===`tilde`?`~`:t===`vec`?`→`:t===`dot`?`˙`:`¨`));if(Qv.has(t))return this.take(),Q(`mrow`,null);if(Object.hasOwn(Zv,t))return this.take(),Q(`mspace`,{width:Zv[t]});if(Xv.has(t))return this.take(),Q(`mo`,{mathvariant:`normal`,form:`prefix`},t);if(Object.hasOwn(Jv,t))return this.take(),Q(`mi`,null,Jv[t]);if(Object.hasOwn(Yv,t)){this.take();let e=Yv[t];return Q(`mo`,e===`(`||e===`)`||e===`[`||e===`]`||e===`{`||e===`}`||e===`|`||e===`‖`||e===`⟨`||e===`⟩`?{fence:`true`,stretchy:`true`}:null,e)}return this.take(),Q(`mtext`,null,`\\${t}`)}parseBraceGroup(){if(!this.atPunct(`{`))return Q(`mrow`,null);this.take();let e=this.parseRow({chars:new Set([`}`])});return this.atPunct(`}`)&&this.take(),Q(`mrow`,null,...e)}parseFraction(){return Q(`mfrac`,null,this.parseRequiredArgument(),this.parseRequiredArgument())}parseRoot(){let e=null;if(this.atPunct(`[`)){this.take();let t=this.parseRow({chars:new Set([`]`])});this.atPunct(`]`)&&this.take(),e=Q(`mrow`,null,...t)}let t=this.parseRequiredArgument();return e?Q(`mroot`,null,t,e):Q(`msqrt`,null,t)}parseRequiredArgument(){return this.atPunct(`{`)?this.parseBraceGroup():this.parseAtom()}parseLeft(){let e=this.readDelimiter(),t=this.parseRow({commands:new Set([`right`])}),n=null;return this.atCommand(`right`)&&(this.take(),n=this.readDelimiter()),!e&&!n?Q(`mrow`,null,...t):Q(`mrow`,null,e,...t,n)}readDelimiter(){let e=this.peek();if(e.kind===`punct`)return e.value===`.`?(this.take(),null):`()[]|`.includes(e.value)?(this.take(),Q(`mo`,{fence:`true`,stretchy:`true`},e.value)):null;if(e.kind===`command`){let t={lbrace:`{`,rbrace:`}`,lvert:`|`,rvert:`|`,vert:`|`,lVert:`‖`,rVert:`‖`,Vert:`‖`,langle:`⟨`,rangle:`⟩`},n=Object.hasOwn(t,e.value)?t[e.value]:void 0;if(n)return this.take(),Q(`mo`,{fence:`true`,stretchy:`true`},n)}return null}parseEnvironment(){let e=this.readRawGroup().trim();if(e!==`cases`)return Q(`mtext`,null,`\\begin{${e}}`);let t=[],n=0;for(;!this.atCommand(`end`)&&this.peek().kind!==`eof`&&n<500;){n+=1;let e=[];for(;;){let t=this.parseRow({chars:new Set([`&`]),commands:new Set([`end`]),newline:!0});if(e.push(Q(`mtd`,{columnalign:`left`},...t)),!this.atPunct(`&`))break;this.take()}if(t.push(Q(`mtr`,null,...e)),this.peek().kind===`newline`)this.take();else{if(this.atCommand(`end`)||this.peek().kind===`eof`)break;this.take()}}this.atCommand(`end`)&&(this.take(),this.readRawGroup());let r=Q(`mtable`,{columnalign:`left`,columnspacing:`1em`},...t);return Q(`mrow`,null,Q(`mo`,{fence:`true`,stretchy:`true`},`{`),r)}applyScripts(e){let t=null,n=null,r=!1;for(;;)if(this.atPunct(`^`))this.take(),n=this.parseScriptArgument(),r=!0;else if(this.atPunct(`_`))this.take(),t=this.parseScriptArgument(),r=!0;else break;return r?t!==null&&n!==null?Q(`msubsup`,null,e,t,n):n===null?Q(`msub`,null,e,t):Q(`msup`,null,e,n):e}parseScriptArgument(){return this.atPunct(`{`)?this.parseBraceGroup():this.atPunct(`+`)||this.atPunct(`-`)?Q(`mrow`,null,Q(`mo`,null,this.take().value),this.parseAtom()):this.parseAtom()}readRawGroup(){if(!this.atPunct(`{`))return``;let e=this.take(),t=1,n=this.pos;for(;n<this.tokens.length;n+=1){let e=this.tokens[n];if(e.kind===`eof`)break;if(e.kind===`punct`){if(e.value===`{`)t+=1;else if(e.value===`}`&&(--t,t===0))break}}if(n>=this.tokens.length||this.tokens[n].kind===`eof`)return this.pos=n,this.source.slice(e.offset+1);let r=this.tokens[n];return this.pos=n+1,this.source.slice(e.offset+1,r.offset)}};function ey({source:e,display:t=!1}){let n=Kv(e),r;if(e.length>Hv)r=Q(`mtext`,null,n);else try{r=new $v(e).render()}catch{r=Q(`mtext`,null,n)}let i=e.length>Gv?n:e;return Q(`math`,{display:t?`block`:`inline`,className:t?`local-math local-math-block`:`local-math`,"aria-label":i},Q(`semantics`,null,Q(`mrow`,null,r),Q(`annotation`,{encoding:`application/x-tex`},i)))}var ty=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),$=s(((e,t)=>{t.exports=ty()}))(),ny=e=>e,ry=(0,y.createContext)(`en`);function iy({locale:e=`en`,children:t}){return(0,$.jsx)(ry.Provider,{value:e,children:t})}function ay(){return(0,y.useContext)(ry)}function oy(e,t,n){return e===`zh`?n:t}function sy(){let e=ay();return(0,y.useMemo)(()=>(t,n)=>oy(e,t,n),[e])}var cy=[`var(--chart-1)`,`var(--chart-2)`,`var(--chart-3)`,`var(--chart-4)`,`var(--chart-5)`,`var(--chart-6)`,`var(--chart-7)`,`var(--chart-8)`],ly=520,uy=320,dy=520,fy=320,py=520,my=120,hy=46,gy=150,_y=12.5,vy=10,yy=100,by=2,xy=15,Sy=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,Cy=/^\s*\{\{([\s\S]*)\}\}\s*$/;function wy(e){if(!Number.isFinite(e))return`—`;if(Object.is(e,-0))return`0`;let t=Math.abs(e);return t>=0xe8d4a51000||t>0&&t<1e-4?e.toExponential(3).replace(/(\.\d*?)0+e/,`$1e`).replace(/\.e/,`e`):Number(e.toFixed(6)).toString()}function Ty(e){if(!Number.isFinite(e))return`—`;let t=Math.abs(e);return t>=1e6||t>0&&t<.001?e.toExponential(2):Number(e.toFixed(4)).toString()}function Ey(e){return e instanceof Error?e.message:String(e)}function Dy(e,t,n,r=``){let i=t?.[n];if(i===void 0)return r;try{return e.text(i)}catch{return r}}function Oy(e,t,n,r){let i=t?.[n];if(i===void 0)return r;let a=i.trim();if(!a)return null;let o=Cy.exec(a);try{let t=o?e.evaluate(o[1].trim()):Number(a);return typeof t==`number`&&Number.isFinite(t)?t:null}catch{return null}}function ky(e,t,n,r){let i=t?.[n];if(i===void 0)return r;let a=i.trim();if(!a||a===`true`)return!0;if(a===`false`)return!1;let o=Cy.exec(a);if(!o)return r;try{let t=e.evaluate(o[1].trim());return typeof t==`boolean`?t:r}catch{return r}}function Ay(e,t,n,r){let i=Oy(e,t,n,r);return i===null||!Number.isFinite(i)?r:Math.trunc(i)}function jy(e,t){return e.length>t?`${e.slice(0,Math.max(1,t-1))}…`:e}function My(e,t=8,n=2){if(!e)return[``];let r=[],i=e;for(;i&&r.length<n-1;)r.push(i.slice(0,t)),i=i.slice(t);return(i||r.length===0)&&r.push(i.length>t?`${i.slice(0,Math.max(1,t-1))}…`:i),r}function Ny(e,t){let n=Array.from(e),r=Array.from(t),i=Math.min(n.length,r.length);for(let e=0;e<i;e+=1){let t=(n[e].codePointAt(0)??0)-(r[e].codePointAt(0)??0);if(t!==0)return t}return n.length-r.length}function Py(e,t,n=5){if(!Number.isFinite(e)||!Number.isFinite(t)||t<=e)return[e];let r=(t-e)/Math.max(1,n-1),i=10**Math.floor(Math.log10(r)),a=r/i,o=(a<=1?1:a<=2?2:a<=5?5:10)*i,s=Math.ceil(e/o)*o,c=[];for(let e=s;e<=t+o*1e-9&&c.length<40;e+=o)c.push(Number(e.toFixed(10)));return c}function Fy(e,t){let n=1/0,r=-1/0;for(let t of e)Number.isFinite(t)&&(t<n&&(n=t),t>r&&(r=t));if(!Number.isFinite(n)||!Number.isFinite(r))return{min:0,max:1};if(t&&(n=Math.min(n,0),r=Math.max(r,0)),n===r){let e=Math.abs(n)>0?Math.abs(n)*.15:1;n-=e,r+=e}else{let e=(r-n)*.06;n-=e,r+=e,t&&(n=Math.min(n,0),r=Math.max(r,0))}return{min:n,max:r}}function Iy(e,t){return Math.max(46,...e.map(e=>Ty(e).length*6+(t?24:10)))}function Ly(e,t,n){let r=e.currentTarget,i=r.ownerSVGElement??r.closest(`svg`);if(!i)return;let a=Array.from(i.querySelectorAll(t)),o=a.indexOf(r);o<0||a.length===0||(e.preventDefault(),a[(o+n+a.length)%a.length]?.focus())}function Ry(e){return e.key===`Enter`||e.key===` `||e.key===`Spacebar`}function zy(e,t=ny){return e===null?{text:``,kind:`null`,error:null}:typeof e==`string`?{text:e,kind:`string`,error:null}:typeof e==`number`?Number.isFinite(e)?{text:wy(e),kind:`number`,error:null}:{text:t(`Cannot compute`,`无法计算`),kind:`error`,error:t(`Result is not a finite number`,`结果不是有限数字`)}:typeof e==`boolean`?{text:e?`true`:`false`,kind:`boolean`,error:null}:{text:t(`Cannot compute`,`无法计算`),kind:`array`,error:t(`Arrays must first be converted with a function such as len`,`数组需要先用 len 等函数转换`)}}function By(e,t,n=ny){let r=``,i=null;for(let a of e??[])if(a.type===`text`||a.type===`inlineCode`||a.type===`code`)r+=a.value??``;else if(a.type===`interpolation`)try{let e=zy(t.evaluate((a.value??``).trim()),n);e.error&&(i??=e.error),r+=e.text}catch(e){i??=Ey(e),r+=n(`Cannot compute`,`无法计算`)}else if(a.type===`inlineMath`||a.type===`math`)r+=a.value??``;else if(a.type===`image`)r+=a.alt??``;else if(a.children&&a.children.length>0){let e=By(a.children,t,n);r+=e.text,i??=e.error}else a.value&&(r+=a.value);return{text:r,error:i}}function Vy(e,t,n=ny){let r=e.children??[],i=r.filter(e=>!(e.type===`text`&&!(e.value??``).trim()));if(i.length===1&&i[0].type===`interpolation`)try{let a=t.evaluate((i[0].value??``).trim()),o=zy(a,n);return{node:e,children:r,text:o.text,value:a,kind:o.kind,numeric:o.kind===`number`?a:null,error:o.error}}catch(t){return{node:e,children:r,text:n(`Cannot compute`,`无法计算`),value:void 0,kind:`error`,numeric:null,error:Ey(t)}}let a=By(r,t,n);if(i.length>0&&i.every(e=>e.type===`text`)&&Sy.test(a.text.trim())){let t=Number(a.text.trim());if(Number.isFinite(t))return{node:e,children:r,text:a.text,value:t,kind:`number`,numeric:t,error:null}}let o=!a.text.trim()&&!a.error;return{node:e,children:r,text:a.error?n(`Cannot compute`,`无法计算`):a.text,value:a.text,kind:a.error?`error`:o?`empty`:`string`,numeric:null,error:a.error}}function Hy(e,t=ny){return e?e.error?t(`Cannot compute`,`无法计算`):e.text:``}function Uy(e,t,n=ny){let r=e.children?.find(e=>e.type===`table`);if(!r)return null;let i=r.children?.filter(e=>e.type===`tableRow`)??[];if(i.length===0)return null;let a=(i[0].children??[]).map(e=>Vy(e,t,n));return{tableNode:r,header:a,headerText:a.map(e=>Hy(e,n)),rows:i.slice(1).map((e,r)=>({index:r,cells:(e.children??[]).map(e=>Vy(e,t,n))}))}}function Wy(e,t){let n=!1;for(let r of e.rows){let e=r.cells[t];if(e&&e.kind!==`empty`){if(e.numeric===null)return!1;n=!0}}return n}function Gy(e,t){let n=(e?.key??``).trim();return n?t.findIndex(e=>e.trim()===n):-1}function Ky(e,t,n){return e<0?``:Hy(t.cells[e],n).trim()}function qy(e,t,n){if(!n)return``;try{let n=e.get(t);return typeof n==`string`?n:``}catch{return``}}function Jy({className:e,label:t,children:n}){let r=(0,y.useId)();return(0,$.jsxs)(`figure`,{className:`local-visual ${e}`,"aria-labelledby":r,children:[(0,$.jsx)(`figcaption`,{id:r,className:`local-visual-title`,children:t}),n]})}function Yy({message:e,kind:t=`status`}){return(0,$.jsx)(`p`,{className:`local-visual-message local-visual-${t}`,role:t,children:e})}function Xy({notes:e}){return e.length===0?null:(0,$.jsx)(`ul`,{className:`local-visual-notes`,role:`status`,children:e.map((e,t)=>(0,$.jsx)(`li`,{children:e},`${e}-${t}`))})}function Zy({items:e,hidden:t,onToggle:n,label:r,mode:i}){let a=sy(),o=i!==`static`;return(0,$.jsx)(`div`,{className:`local-visual-legend${o?``:` local-static-legend`}`,role:`group`,"aria-label":o?r:a(`Legend`,`图例`),children:e.map((e,r)=>{let i=t.has(r);return o?(0,$.jsxs)(`button`,{type:`button`,className:`local-visual-legend-item${i?` is-off`:``}`,"aria-pressed":!i,disabled:e.disabled,onClick:()=>n(r),title:i?a(`Show ${e.name}`,`显示 ${e.name}`):a(`Hide ${e.name}`,`隐藏 ${e.name}`),children:[(0,$.jsx)(`span`,{className:`local-visual-swatch`,style:{backgroundColor:e.color},"aria-hidden":`true`}),(0,$.jsxs)(`span`,{className:`local-visual-legend-text`,children:[e.name,e.detail?a(` (${e.detail})`,`(${e.detail})`):``]})]},`${e.name}-${r}`):(0,$.jsxs)(`span`,{className:`local-visual-legend-item local-static-legend-item`,children:[(0,$.jsx)(`span`,{className:`local-visual-swatch`,style:{backgroundColor:e.color},"aria-hidden":`true`}),(0,$.jsxs)(`span`,{className:`local-visual-legend-text`,children:[e.name,e.detail?a(` (${e.detail})`,`(${e.detail})`):``]})]},`${e.name}-${r}`)})})}function Qy({node:e,runtime:t,render:n,mode:r}){let i=sy(),[a,o]=(0,y.useState)(``),[s,c]=(0,y.useState)(null),[l,u]=(0,y.useState)(1),[d,f]=(0,y.useState)(null),p=t.resetToken(e);(0,y.useEffect)(()=>{o(``),c(null),u(1),f(null)},[p]);let m=Dy(t,e.attrs,`label`,i(`Table`,`表格`)),h=ky(t,e.attrs,`searchable`,!0),g=ky(t,e.attrs,`sortable`,!0),_=Ay(t,e.attrs,`page-size`,10),v=Math.max(1,_),b=Uy(e,t,i);if(!b||b.header.length===0)return(0,$.jsx)(Jy,{className:`local-visual-table-block`,label:m,children:(0,$.jsx)(Yy,{message:i(`Table requires a non-empty Markdown table.`,`表格需要一个非空的 Markdown 表格。`),kind:`alert`})});let x=Gy(e.attrs,b.headerText),S=x>=0,C=qy(t,e,S),w=n=>{f(null);try{let r=t.set(e,n);r.length>0&&f(r.map(e=>i(et(e,`en`),et(e,`zh`))).join(`; `))}catch(e){f(Ey(e))}},T=b.header.map((e,t)=>Wy(b,t)),E=a.trim().toLowerCase(),D=[...b.rows.filter(e=>!E||e.cells.some(e=>Hy(e,i).toLowerCase().includes(E)))];if(s){let e=T[s.column];D.sort((t,n)=>{let r=t.cells[s.column],a=n.cells[s.column],o;if(e){let e=r?.numeric??-1/0,t=a?.numeric??-1/0;o=e===t?0:e<t?-1:1}else o=Ny(Hy(r,i),Hy(a,i));return o===0?t.index-n.index:s.direction===`asc`?o:-o})}let O=Math.max(1,Math.ceil(D.length/v)),k=Math.min(l,O),A=D.slice((k-1)*v,k*v),j=e=>{u(1),c(t=>!t||t.column!==e?{column:e,direction:`asc`}:t.direction===`asc`?{column:e,direction:`desc`}:null)},M=e=>!s||s.column!==e?null:(0,$.jsx)(`span`,{className:`local-visual-sort-marker`,"aria-hidden":`true`,children:s.direction===`asc`?`▲`:`▼`});return r===`static`?(0,$.jsxs)(Jy,{className:`local-visual-table-block local-static-table-block`,label:m,children:[(0,$.jsx)(`div`,{className:`local-visual-table-scroll local-static-table-scroll`,children:(0,$.jsxs)(`table`,{className:`local-visual-table local-static-table`,children:[(0,$.jsx)(`caption`,{className:`local-visual-sr-only`,children:m}),(0,$.jsx)(`thead`,{children:(0,$.jsx)(`tr`,{children:b.header.map((e,t)=>(0,$.jsx)(`th`,{scope:`col`,className:T[t]?`is-numeric`:void 0,children:Hy(e,i)},`head-${t}`))})}),(0,$.jsx)(`tbody`,{children:b.rows.map(e=>{let t=S?Ky(x,e,i):``,r=S&&t!==``&&t===C;return(0,$.jsx)(`tr`,{className:r?`is-selected local-static-selected`:void 0,children:b.header.map((t,a)=>{let o=e.cells[a];return(0,$.jsxs)(`td`,{className:T[a]?`is-numeric`:void 0,children:[r&&a===0?(0,$.jsx)(`span`,{className:`local-visual-sr-only`,children:i(`Selected row`,`已选择行`)}):null,o?.error?(0,$.jsx)(`span`,{className:`local-visual-cell-error`,title:o.error,children:i(`Cannot compute`,`无法计算`)}):n(o?.children??[])]},`cell-${e.index}-${a}`)})},`row-${e.index}`)})})]})}),b.rows.length===0?(0,$.jsx)(Yy,{message:i(`No rows to display`,`没有可显示的行`)}):null]}):(0,$.jsxs)(Jy,{className:`local-visual-table-block`,label:m,children:[h?(0,$.jsxs)(`label`,{className:`local-visual-search`,children:[(0,$.jsx)(`span`,{children:i(`Search`,`搜索`)}),(0,$.jsx)(`input`,{type:`search`,value:a,placeholder:i(`Search all columns`,`搜索所有列`),"aria-label":i(`Search ${m}`,`搜索${m}`),onChange:e=>{o(e.target.value),u(1)}})]}):null,(0,$.jsx)(`div`,{className:`local-visual-table-scroll`,children:(0,$.jsxs)(`table`,{className:`local-visual-table`,children:[(0,$.jsx)(`caption`,{className:`local-visual-sr-only`,children:m}),(0,$.jsx)(`thead`,{children:(0,$.jsxs)(`tr`,{children:[S?(0,$.jsx)(`th`,{scope:`col`,className:`local-visual-select-column`,children:(0,$.jsx)(`span`,{className:`local-visual-sr-only`,children:i(`Select`,`选择`)})}):null,b.header.map((e,t)=>{let n=s&&s.column===t?s.direction===`asc`?`ascending`:`descending`:`none`;return(0,$.jsx)(`th`,{scope:`col`,"aria-sort":n,className:T[t]?`is-numeric`:void 0,children:g?(0,$.jsxs)(`button`,{type:`button`,className:`local-visual-sort-button${s&&s.column===t?` is-sorted`:``}`,onClick:()=>j(t),title:i(`Click to cycle ascending, descending and original order`,`点击切换升序、降序和原始顺序`),children:[Hy(e,i),M(t)]}):Hy(e,i)},`head-${t}`)})]})}),(0,$.jsx)(`tbody`,{children:A.map(e=>{let t=S?Ky(x,e,i):``,r=S&&t!==``&&t===C;return(0,$.jsxs)(`tr`,{className:r?`is-selected`:void 0,children:[S?(0,$.jsx)(`td`,{className:`local-visual-select-cell`,children:t?(0,$.jsx)(`button`,{type:`button`,className:`local-visual-select-button${r?` is-selected`:``}`,"aria-pressed":r,"aria-label":i(`Select row ${t}`,`选择行 ${t}`),title:i(`Select row ${t}`,`选择行 ${t}`),onClick:()=>w(t),children:(0,$.jsx)(`span`,{"aria-hidden":`true`,children:r?`●`:`○`})}):null}):null,b.header.map((t,r)=>{let a=e.cells[r];return(0,$.jsx)(`td`,{className:T[r]?`is-numeric`:void 0,children:a?.error?(0,$.jsx)(`span`,{className:`local-visual-cell-error`,title:a.error,children:i(`Cannot compute`,`无法计算`)}):n(a?.children??[])},`cell-${e.index}-${r}`)})]},`row-${e.index}`)})})]})}),d?(0,$.jsx)(Yy,{message:d,kind:`alert`}):null,D.length===0?(0,$.jsx)(Yy,{message:i(`No matching results`,`没有匹配结果`)}):null,O>1?(0,$.jsxs)(`nav`,{className:`local-visual-pagination`,"aria-label":i(`Table pagination`,`表格分页`),children:[(0,$.jsx)(`button`,{type:`button`,disabled:k<=1,onClick:()=>u(e=>Math.max(1,e-1)),children:i(`Previous`,`上一页`)}),(0,$.jsx)(`span`,{children:i(`Page ${k} of ${O} · ${D.length} rows`,`第 ${k} / ${O} 页 · 共 ${D.length} 行`)}),(0,$.jsx)(`button`,{type:`button`,disabled:k>=O,onClick:()=>u(e=>Math.min(O,e+1)),children:i(`Next`,`下一页`)})]}):null]})}var $y=[`bar`,`line`,`area`,`scatter`,`donut`];function eb(e,t,n,r,i,a){let o=(n,r)=>[e+n*Math.cos(r),t+n*Math.sin(r)],[s,c]=o(n,i),[l,u]=o(n,a),[d,f]=o(r,a),[p,m]=o(r,i),h=+(a-i>Math.PI);return[`M ${s} ${c}`,`A ${n} ${n} 0 ${h} 1 ${l} ${u}`,`L ${d} ${f}`,`A ${r} ${r} 0 ${h} 0 ${p} ${m}`,`Z`].join(` `)}function tb({node:e,runtime:t,mode:n}){let r=sy(),i=n===`static`,[a,o]=(0,y.useState)(new Set),[s,c]=(0,y.useState)(new Set),[l,u]=(0,y.useState)(null),[d,f]=(0,y.useState)(null),p=t.resetToken(e);(0,y.useEffect)(()=>{o(new Set),c(new Set),u(null),f(null)},[p]);let m=(0,y.useId)(),h=Dy(t,e.attrs,`title`,``)||Dy(t,e.attrs,`label`,``)||r(`Chart`,`图表`),g=(e.attrs?.kind??`bar`).trim().toLowerCase(),_=$y.includes(g)?g:null,v=Dy(t,e.attrs,`x-label`,``),b=Dy(t,e.attrs,`y-label`,``),x=Uy(e,t,r);if(!x||x.header.length===0)return(0,$.jsx)(Jy,{className:`local-visual-chart`,label:h,children:(0,$.jsx)(Yy,{message:r(`chart body requires a non-empty Markdown table.`,`chart 正文需要一个非空的 Markdown 表格。`),kind:`alert`})});let S=x.headerText.map(e=>e.trim()),C=Gy(e.attrs,S),w=C>=0,T=qy(t,e,w),E=n=>{f(null);try{let i=t.set(e,n);i.length>0&&f(i.map(e=>r(et(e,`en`),et(e,`zh`))).join(`; `))}catch(e){f(Ey(e))}},D=x.rows.map(e=>({index:e.index,cells:e.cells,texts:S.map((t,n)=>Hy(e.cells[n],r)),keyValue:Ky(C,e,r)}));if(!_)return(0,$.jsx)(Jy,{className:`local-visual-chart`,label:h,children:(0,$.jsx)(Yy,{message:r(`Unknown chart type "${g}".`,`未知图表类型“${g}”。`),kind:`alert`})});let O=[],k=[],A=(e.attrs?.x??``).trim(),j=A?S.indexOf(A):0;(j<0||j>=S.length)&&k.push(r(`x column "${A}" does not exist.`,`x 列“${A}”不存在。`));let M=(e.attrs?.y??``).split(`,`).map(e=>e.trim()).filter(Boolean),N=[];if(_===`donut`){if(M.length>1)k.push(r(`donut can only use one numeric column; specify a single column in y.`,`donut 只能使用一个数值列,请在 y 中指定唯一列。`));else if(M.length===1){let e=S.indexOf(M[0]);e<0?k.push(r(`y column "${M[0]}" does not exist.`,`y 列“${M[0]}”不存在。`)):N=[e]}else S.length===2?N=[1]:k.push(r(`A donut chart with more than two columns must use y to specify the single numeric column.`,`donut 多于两列时必须用 y 指定唯一数值列。`))}else if(M.length>0)for(let e of M){let t=S.indexOf(e);t<0?k.push(r(`y column "${e}" does not exist.`,`y 列“${e}”不存在。`)):N.includes(t)||N.push(t)}else N=S.map((e,t)=>t).filter(e=>e!==j);if(k.length===0&&N.length===0&&k.push(r(`Chart requires at least one numeric series.`,`图表至少需要一个数值系列。`)),k.length>0)return(0,$.jsx)(Jy,{className:`local-visual-chart local-visual-chart-${_}`,label:h,children:k.map((e,t)=>(0,$.jsx)(Yy,{message:e,kind:`alert`},`${e}-${t}`))});let P=N.map(e=>S[e]||r(`Series ${e+1}`,`系列 ${e+1}`)),F=0,ee=0,I=D.map(e=>{let t=e.cells[j],n=e.texts[j]||r(`Item ${e.index+1}`,`第 ${e.index+1} 项`),i=t&&t.numeric!==null?t.numeric:null,a=N.map(t=>{let n=e.cells[t];return!n||n.kind===`empty`||n.numeric===null?(F+=1,null):(_===`donut`&&n.numeric<0&&(ee+=1),n.numeric)});return{index:e.index,label:n,xValue:i,values:a,cells:e.cells,keyValue:e.keyValue}});F>0&&O.push(r(`${F} values are empty or cannot be computed; gaps are kept in the chart.`,`${F} 个数值为空或无法计算,图表中保留空缺。`));for(let e of N)Wy(x,e)||O.push(r(`Column "${S[e]}" is not purely numeric; non-numeric values are treated as gaps.`,`列“${S[e]}”不是纯数值列,非数值按空缺处理。`));_===`donut`&&ee>0&&O.push(r(`Donut values must be non-negative; ignored ${ee} negative values.`,`环形图数值必须非负,已忽略 ${ee} 个负值。`)),_===`scatter`&&!Wy(x,j)&&O.push(r(`scatter horizontal axis column "${S[j]}" requires numeric values.`,`scatter 的横轴列“${S[j]}”需要数值。`));let te=e=>{u(null),o(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},ne=e=>{u(null),c(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},re=P.map((e,t)=>({name:e,color:cy[t%cy.length]}));if(_===`donut`){let e=I.map(e=>e.values[0]),t=e.map(e=>e!==null&&e>=0?e:0),a=t.reduce((e,t,n)=>!i&&s.has(n)?e:e+t,0),o=I.map((n,r)=>({name:n.label,color:cy[r%cy.length],detail:e[r]===null?`—`:wy(e[r]),disabled:t[r]<=0}));if(a<=0)return(0,$.jsxs)(Jy,{className:`local-visual-chart local-visual-chart-donut`,label:h,children:[(0,$.jsx)(Yy,{message:r(`No share to display`,`暂无占比`)}),(0,$.jsx)(Xy,{notes:O}),(0,$.jsx)(Zy,{items:o,hidden:s,onToggle:ne,label:r(`Legend`,`图例`),mode:n})]});let c=-Math.PI/2,f=[];I.forEach((e,n)=>{if(!i&&s.has(n))return;let r=t[n];if(r<=0)return;let o=r/a*Math.PI*2,l=c,u=c+o;c=u,f.push({key:`donut:${n}`,label:e.label,value:r,start:l,end:u,color:cy[n%cy.length],x:170,y:120,rowKey:e.keyValue})});let p=l?r(`${l.label}: ${wy(l.value)}`,`${l.label}:${wy(l.value)}`):r(`Focus a slice or legend to view values`,`聚焦扇区或图例查看数值`);return(0,$.jsxs)(Jy,{className:`local-visual-chart local-visual-chart-donut${i?` local-static-chart`:``}`,label:h,children:[i?null:(0,$.jsx)(`div`,{className:`local-visual-readout`,id:m,"aria-live":`polite`,children:p}),(0,$.jsx)(`div`,{className:`local-visual-svg-wrap`,children:(0,$.jsxs)(`svg`,{className:`local-visual-svg`,viewBox:`0 0 340 240`,role:`group`,"aria-label":r(`${h}, donut chart, ${I.length} items`,`${h},环形图,共 ${I.length} 项`),"aria-describedby":i?void 0:m,children:[(0,$.jsxs)(`g`,{className:`local-visual-donut-center`,"aria-hidden":`true`,children:[(0,$.jsx)(`text`,{x:170,y:118,textAnchor:`middle`,className:`local-visual-donut-total`,children:wy(a)}),(0,$.jsx)(`text`,{x:170,y:138,textAnchor:`middle`,className:`local-visual-donut-caption`,children:jy(P[0],14)})]}),f.map(e=>{let t=w&&e.rowKey!==``,n=t&&e.rowKey===T,a={key:e.key,series:P[0],label:e.label,value:e.value,x:e.x,y:e.y,rowKey:e.rowKey,selectable:t,selected:n},o=i?{}:{"data-chart-mark":``,...t?{"data-chart-selectable":``}:{},tabIndex:0,role:t?`button`:`img`,...t?{"aria-pressed":n}:{},"aria-label":r(`${e.label}: ${wy(e.value)}`,`${e.label}:${wy(e.value)}`),onFocus:()=>u(a),onBlur:()=>u(null),onPointerEnter:()=>u(a),onPointerLeave:()=>u(null),onClick:t?()=>E(e.rowKey):void 0,onKeyDown:n=>{t&&Ry(n)?(n.preventDefault(),E(e.rowKey)):n.key===`ArrowRight`||n.key===`ArrowDown`?Ly(n,`[data-chart-mark]`,1):(n.key===`ArrowLeft`||n.key===`ArrowUp`)&&Ly(n,`[data-chart-mark]`,-1)}},s=`local-visual-donut-slice${n?` is-selected`:``}`;return e.end-e.start>=Math.PI*2-1e-6?(0,$.jsx)(`circle`,{className:s,cx:170,cy:120,r:77,fill:`none`,style:{stroke:e.color},strokeWidth:30,...o,children:(0,$.jsx)(`title`,{children:r(`${e.label}: ${wy(e.value)}`,`${e.label}:${wy(e.value)}`)})},e.key):(0,$.jsx)(`path`,{className:s,d:eb(170,120,92,62,e.start,e.end),style:{fill:e.color},...o,children:(0,$.jsx)(`title`,{children:r(`${e.label}: ${wy(e.value)}`,`${e.label}:${wy(e.value)}`)})},e.key)})]})}),(0,$.jsx)(Zy,{items:o,hidden:s,onToggle:ne,label:r(`Legend, toggle slices`,`图例,可开关扇区`),mode:n}),d?(0,$.jsx)(Yy,{message:d,kind:`alert`}):null,(0,$.jsx)(Xy,{notes:O})]})}let ie=P.map((e,t)=>t).filter(e=>i||!a.has(e));if(ie.length===0)return(0,$.jsxs)(Jy,{className:`local-visual-chart local-visual-chart-${_}`,label:h,children:[(0,$.jsx)(Yy,{message:r(`All series are hidden in the legend`,`所有系列已在图例中关闭`)}),(0,$.jsx)(Zy,{items:re,hidden:a,onToggle:te,label:r(`Legend, toggle series`,`图例,可开关系列`),mode:n})]});let ae=Wy(x,j),oe=_===`scatter`?!0:_===`line`||_===`area`?ae:!1,se=oe?I.filter(e=>e.xValue!==null):I;oe&&se.length<I.length&&O.push(r(`${I.length-se.length} rows have an empty or non-numeric horizontal axis and are not plotted.`,`${I.length-se.length} 行横轴为空或不是数值,未参与绘制。`));let ce=[];for(let e of se)for(let t of ie){let n=e.values[t];n!==null&&ce.push(n)}if(se.length===0)return(0,$.jsxs)(Jy,{className:`local-visual-chart local-visual-chart-${_}`,label:h,children:[(0,$.jsx)(Yy,{message:r(`No data rows to plot`,`没有可绘制的数据行`)}),(0,$.jsx)(Xy,{notes:O}),(0,$.jsx)(Zy,{items:re,hidden:a,onToggle:te,label:r(`Legend, toggle series`,`图例,可开关系列`),mode:n})]});if(ce.length===0)return(0,$.jsxs)(Jy,{className:`local-visual-chart local-visual-chart-${_}`,label:h,children:[(0,$.jsx)(Yy,{message:r(`No values to read`,`没有可读取的数值`)}),(0,$.jsx)(Xy,{notes:O}),(0,$.jsx)(Zy,{items:re,hidden:a,onToggle:te,label:r(`Legend, toggle series`,`图例,可开关系列`),mode:n})]});let le=Fy(ce,_===`bar`||_===`area`),ue=Py(le.min,le.max,5),de=Iy(ue,!!b),fe=506-de,pe=e=>16+(le.max-e)/(le.max-le.min)*258,L=pe(Math.max(le.min,Math.min(le.max,0))),R=oe&&se.length>0?Fy(se.map(e=>e.xValue).filter(e=>e!==null),!1):null,me=fe/Math.max(1,I.length),he=e=>de+me*(e+.5),ge=e=>de+(e-R.min)/(R.max-R.min)*fe,_e=(e,t)=>R?e.xValue===null?null:ge(e.xValue):he(t),ve=[];if(R)ve.push(...Py(R.min,R.max,5));else{let e=Math.max(1,Math.ceil(I.length/6));for(let t=0;t<I.length;t+=e)ve.push(t);let t=I.length-1;t>=0&&ve[ve.length-1]!==t&&(ve.length>1&&t-ve[ve.length-1]<e*.6?ve[ve.length-1]=t:ve.push(t))}let ye=e=>R?de+(e-R.min)/(R.max-R.min)*fe:he(e),be=i||!l?null:R?(0,$.jsx)(`line`,{className:`local-visual-guide`,x1:Math.max(de,Math.min(506,l.x)),x2:Math.max(de,Math.min(506,l.x)),y1:16,y2:274}):null,xe=e=>i?{}:{"data-chart-mark":``,...e.selectable?{"data-chart-selectable":``}:{},tabIndex:0,role:e.selectable?`button`:`img`,...e.selectable?{"aria-pressed":e.selected}:{},"aria-label":r(`${e.series}, ${e.label}${e.selectable&&e.rowKey!==e.label?`, ${e.rowKey}`:``}: ${wy(e.value)}`,`${e.series},${e.label}${e.selectable&&e.rowKey!==e.label?`,${e.rowKey}`:``}:${wy(e.value)}`),onFocus:()=>u(e),onBlur:()=>u(null),onPointerEnter:()=>u(e),onPointerLeave:()=>u(null),onClick:e.selectable?()=>E(e.rowKey):void 0,onKeyDown:t=>{e.selectable&&Ry(t)?(t.preventDefault(),E(e.rowKey)):t.key===`ArrowRight`||t.key===`ArrowDown`?Ly(t,`[data-chart-mark]`,1):(t.key===`ArrowLeft`||t.key===`ArrowUp`)&&Ly(t,`[data-chart-mark]`,-1)}},Se=(e,t,n,r,i)=>{let a=w&&t.keyValue!==``;return{key:`${e}:${t.index}`,series:P[e],label:t.label,value:n,x:r,y:i,rowKey:t.keyValue,selectable:a,selected:a&&t.keyValue===T}},Ce=[];if(_===`bar`){let e=me*.76,t=Math.max(1,e/Math.max(1,ie.length));I.forEach((n,i)=>{ie.forEach((a,o)=>{let s=n.values[a];if(s===null)return;let c=de+me*i+(me-e)/2+o*t,l=Math.max(1,Math.abs(pe(s)-L)),u=s>=0?L-l:L,d=Math.max(1.5,t-1),f=Math.min(4,d/2,l/2),p=Se(a,n,s,c+t/2,u+l/2);Ce.push((0,$.jsx)(`rect`,{className:`local-visual-bar${p.selected?` is-selected`:``}`,x:c,y:u,width:d,height:l,rx:f,style:{fill:cy[a%cy.length]},...xe(p),children:(0,$.jsx)(`title`,{children:r(`${p.series}, ${p.label}: ${wy(p.value)}`,`${p.series},${p.label}:${wy(p.value)}`)})},`bar-${a}-${n.index}`))})})}let we=[],Te=[],Ee=[];if(_===`line`||_===`area`)for(let e of ie){let t=[],n=[],i=()=>{n.length>0&&t.push(n),n=[]};I.forEach((t,r)=>{let a=t.values[e],o=_e(t,r);a===null||o===null?i():n.push({row:t,value:a,x:o,y:pe(a)})}),i();for(let n of t){if(n.length>=2){let t=n.map((e,t)=>`${t===0?`M`:`L`} ${e.x} ${e.y}`).join(` `);if(we.push((0,$.jsx)(`path`,{className:`local-visual-line`,d:t,fill:`none`,style:{stroke:cy[e%cy.length]},strokeWidth:2.4,strokeLinejoin:`round`,strokeLinecap:`round`},`line-${e}-${n[0].row.index}`)),_===`area`){let t=L,r=n[0],i=n[n.length-1],a=`M ${r.x} ${t} ${n.map(e=>`L ${e.x} ${e.y}`).join(` `)} L ${i.x} ${t} Z`;Te.push((0,$.jsx)(`path`,{className:`local-visual-area`,d:a,style:{fill:cy[e%cy.length]}},`area-${e}-${r.row.index}`))}}for(let t of n){let n=Se(e,t.row,t.value,t.x,t.y);Ee.push((0,$.jsxs)(`g`,{className:`local-visual-point-group`,children:[(0,$.jsx)(`circle`,{className:`local-visual-hit${n.selected?` is-selected`:``}`,cx:t.x,cy:t.y,r:12,fill:`transparent`,...xe(n),children:(0,$.jsx)(`title`,{children:r(`${n.series}, ${n.label}: ${wy(n.value)}`,`${n.series},${n.label}:${wy(n.value)}`)})}),(0,$.jsx)(`circle`,{className:`local-visual-point${n.selected?` is-selected`:``}`,cx:t.x,cy:t.y,r:4.5,style:{fill:cy[e%cy.length],stroke:`var(--surface)`},strokeWidth:1.5,pointerEvents:`none`})]},`point-${e}-${t.row.index}`))}}}_===`scatter`&&I.forEach((e,t)=>{let n=_e(e,t);n!==null&&ie.forEach(t=>{let i=e.values[t];if(i===null)return;let a=pe(i),o=Se(t,e,i,n,a);Ee.push((0,$.jsxs)(`g`,{className:`local-visual-point-group`,children:[(0,$.jsx)(`circle`,{className:`local-visual-hit${o.selected?` is-selected`:``}`,cx:n,cy:a,r:15,fill:`transparent`,...xe(o),children:(0,$.jsx)(`title`,{children:r(`${o.series}, ${o.label}: ${wy(o.value)}`,`${o.series},${o.label}:${wy(o.value)}`)})}),(0,$.jsx)(`circle`,{className:`local-visual-point${o.selected?` is-selected`:``}`,cx:n,cy:a,r:6,style:{fill:cy[t%cy.length],stroke:`var(--surface)`},strokeWidth:1.5,pointerEvents:`none`})]},`scatter-${t}-${e.index}`))})});let De=l?r(`${l.series} · ${l.label}: ${wy(l.value)}`,`${l.series} · ${l.label}:${wy(l.value)}`):r(`Focus or point at a mark; use arrow keys to change the readout`,`聚焦或指向图形,用方向键切换读数`),Oe=r(`${h}, ${_} chart, ${I.length} items, ${ie.length} series`,`${h},${_} 图,共 ${I.length} 项,${ie.length} 个系列`);return(0,$.jsxs)(Jy,{className:`local-visual-chart local-visual-chart-${_}${i?` local-static-chart`:``}`,label:h,children:[i?null:(0,$.jsx)(`div`,{className:`local-visual-readout`,id:m,"aria-live":`polite`,children:De}),(0,$.jsx)(`div`,{className:`local-visual-svg-wrap`,children:(0,$.jsxs)(`svg`,{className:`local-visual-svg`,viewBox:`0 0 ${ly} ${uy}`,role:`group`,"aria-label":Oe,"aria-describedby":i?void 0:m,children:[ue.map(e=>(0,$.jsxs)(`g`,{children:[(0,$.jsx)(`line`,{className:`local-visual-grid-line`,x1:de,x2:506,y1:pe(e),y2:pe(e)}),(0,$.jsx)(`text`,{className:`local-visual-axis-label`,x:de-6,y:pe(e),textAnchor:`end`,dominantBaseline:`middle`,children:Ty(e)})]},`y-${e}`)),le.min<0&&le.max>0?(0,$.jsx)(`line`,{className:`local-visual-zero-line`,x1:de,x2:506,y1:L,y2:L}):null,(0,$.jsx)(`line`,{className:`local-visual-axis-line`,x1:de,x2:506,y1:274,y2:274}),ve.map(e=>{let t=ye(e),n=R?Ty(e):jy(I[e]?.label??``,8);return(0,$.jsxs)(`g`,{children:[(0,$.jsx)(`line`,{className:`local-visual-tick`,x1:t,x2:t,y1:274,y2:279}),(0,$.jsxs)(`text`,{className:`local-visual-axis-label`,x:t,y:293,textAnchor:`middle`,children:[n,!R&&I[e]?(0,$.jsx)(`title`,{children:I[e].label}):null]})]},`x-${e}`)}),v?(0,$.jsx)(`text`,{className:`local-visual-axis-title`,x:(de+506)/2,y:318,textAnchor:`middle`,children:v}):null,b?(0,$.jsx)(`text`,{className:`local-visual-axis-title`,transform:`translate(12 145) rotate(-90)`,textAnchor:`middle`,children:b}):null,Te,we,be,Ce,Ee]})}),(0,$.jsx)(Zy,{items:re,hidden:a,onToggle:te,label:r(`Legend, toggle series`,`图例,可开关系列`),mode:n}),d?(0,$.jsx)(Yy,{message:d,kind:`alert`}):null,(0,$.jsx)(Xy,{notes:O})]})}var nb=64,rb=new WeakMap,ib=new WeakMap;function ab(e,t){let n=rb.get(e);return n&&n.revision===t||(n={revision:t,requestedPoints:new Map,evaluation:{steps:0,limit:k}},rb.set(e,n)),n}function ob(e){let t=ib.get(e);return t||(t=new Map,ib.set(e,t)),t}function sb(e,t,n){if(e.size>=nb){let t=e.keys().next().value;t!==void 0&&e.delete(t)}return e.set(t,n),n}function cb(e,t,n){return e.map(e=>{let r=/^y\s*=\s*([\s\S]+)$/.exec((e.value??``).trim());if(!r)return`\u0003${n}`;try{let e=Mn(r[1].trim());return JSON.stringify(e.dependencies.map(e=>t[e]??null))}catch{return`\u0003${n}`}}).join(``)}function lb(e,t,n,r,i,a,o,s,c,l=ny){let u=ob(s),d=u.get(t);if(d)return d;let f=ab(s,c),p=e=>sb(u,t,{ok:!1,message:e});if(n.length>16)return p(l(`plot supports at most 16 curves, but has ${n.length}.`,`plot 最多支持 16 条曲线,当前为 ${n.length} 条。`));let m=n.length*o;f.requestedPoints.set(e,m);let h=0;for(let e of f.requestedPoints.values())h+=e;if(h>2e4)return p(l(`The document's plot sample count exceeds the limit: ${h} requested, at most ${O} allowed. Reduce curves or samples.`,`整篇文档的绘图采样点超过上限:已请求 ${h} 个,最多 ${O} 个。请减少曲线或采样数。`));let g=[],_={message:null},v=n.map((e,t)=>{let n=(e.value??``).trim(),s=/^y\s*=\s*([\s\S]+)$/.exec(n);if(!s)return g.push(l(`Curve ${t+1}: cannot compute (each formula block must be written as y = expression).`,`曲线 ${t+1}:无法计算(每块公式需写成 y = 表达式)。`)),{source:n,expression:null,points:[],endpoint:null,error:`formula`};try{let e=Mn(s[1].trim()),t=In(e,r,i,a,o,f.evaluation);return{source:n,expression:e,points:t.points,endpoint:t.endpoint,error:null}}catch(e){return e instanceof B&&e.code===`latex-budget`?(_.message=e.message,{source:n,expression:null,points:[],endpoint:null,error:e.message}):(g.push(l(`Curve ${t+1}: cannot compute (${Ey(e)}).`,`曲线 ${t+1}:无法计算(${Ey(e)})。`)),{source:n,expression:null,points:[],endpoint:null,error:Ey(e)})}});return _.message===null?sb(u,t,{ok:!0,curves:v,notes:g}):p(l(`Plot computation exceeded the shared execution budget: ${_.message}`,`绘图计算超过共享执行预算:${_.message}`))}function ub(e){if(e.length===0)return 0;let t=[...e].sort((e,t)=>e-t),n=Math.floor(t.length/2);return t.length%2==0?(t[n-1]+t[n])/2:t[n]}function db(e,t,n,r){let i=[],a=[],o=(e,i)=>{let a=Math.abs(i.y-e.y),o=e.y*i.y<0&&Math.min(Math.abs(e.y),Math.abs(i.y))>Math.max(1,n*8),s=a>t*.8&&a>Math.max(r,1e-9)*10;return o||s};for(let t of e){if(t.y===null){a.length>0&&i.push(a),a=[];continue}let e={x:t.x,y:t.y},n=a[a.length-1];n&&o(n,e)&&(i.push(a),a=[]),a.push(e)}return a.length>0&&i.push(a),i}function fb({node:e,runtime:t,mode:n}){let r=sy(),i=ay(),a=n===`static`,[o,s]=(0,y.useState)(null),c=t.resetToken(e);(0,y.useEffect)(()=>{s(null)},[c]);let l=(0,y.useId)(),u=Dy(t,e.attrs,`label`,``)||r(`Function plot`,`函数图`),d=Dy(t,e.attrs,`x-label`,`x`),f=Dy(t,e.attrs,`y-label`,`y`),p=Oy(t,e.attrs,`min`,-10),m=Oy(t,e.attrs,`max`,10),h=Math.min(2e3,Math.max(2,Ay(t,e.attrs,`samples`,200))),g=(e.children??[]).filter(e=>e.type===`math`||e.type===`inlineMath`),_=(()=>{try{return{...t.snapshot().state}}catch{return{}}})(),v=0;try{v=t.snapshot().revision}catch{v=0}let b=g.map(e=>`${e.id}\u0000${e.value??``}`).join(``),x=`${e.id}\u0000${p}\u0000${m}\u0000${h}\u0000${i}\u0000${b}`,S=cb(g,_,v),C=`${x}\u0002${S}`,w=(0,y.useMemo)(()=>g.length===0||p===null||m===null||!(m>p)?{ok:!0,curves:[],notes:[]}:lb(e.id,C,g,_,p,m,h,t,v,r),[x,S,e.id,t,r]);if(g.length===0)return(0,$.jsx)(Jy,{className:`local-visual-plot`,label:u,children:(0,$.jsx)(Yy,{message:r(`plot body requires one or more $$ formula blocks.`,`plot 正文需要一个或多个 $$ 公式块。`),kind:`alert`})});if(p===null||m===null||!(m>p))return(0,$.jsx)(Jy,{className:`local-visual-plot`,label:u,children:(0,$.jsx)(Yy,{message:r(`plot min must be less than max.`,`plot 的 min 必须小于 max。`),kind:`alert`})});if(!w.ok)return(0,$.jsx)(Jy,{className:`local-visual-plot`,label:u,children:(0,$.jsx)(Yy,{message:w.message,kind:`alert`})});let{curves:T,notes:E}=w,D=T.flatMap(e=>e.points.filter(e=>e.y!==null&&Number.isFinite(e.y))),O=(0,$.jsx)(`div`,{className:`local-visual-plot-legend`,role:`list`,"aria-label":r(`Curve legend`,`曲线图例`),children:T.map((e,t)=>(0,$.jsxs)(`div`,{className:`local-visual-plot-legend-item`,role:`listitem`,children:[(0,$.jsx)(`span`,{className:`local-visual-swatch`,style:{backgroundColor:cy[t%cy.length]},"aria-hidden":`true`}),(0,$.jsx)(`span`,{className:`local-visual-plot-legend-text`,children:(0,$.jsx)(`span`,{className:`local-visual-plot-formula`,children:(0,$.jsx)(ey,{source:e.source})})})]},`curve-legend-${t}`))});if(D.length===0)return(0,$.jsxs)(Jy,{className:`local-visual-plot`,label:u,children:[(0,$.jsx)(Yy,{message:r(`No plottable values in the current range`,`当前范围内没有可绘制的值`)}),(0,$.jsx)(Xy,{notes:E}),O]});let A=Fy(D.map(e=>e.y),!1),j=Py(A.min,A.max,5),M=Py(p,m,5),N=Iy(j,!!f),P=506-N,F=e=>N+(e-p)/(m-p)*P,ee=e=>16+(A.max-e)/(A.max-A.min)*258,I=ub(D.map(e=>Math.abs(e.y))),te=[];for(let e of T)for(let t=1;t<e.points.length;t+=1){let n=e.points[t-1],r=e.points[t];n.y!==null&&r.y!==null&&te.push(Math.abs(r.y-n.y))}let ne=ub(te),re=A.max-A.min,ie=T.map(e=>db(e.points,re,I,ne)),ae={steps:0,limit:k},oe=(e,t)=>{if(!e.expression)return null;try{let n=e.expression.evaluate(t,_,ae);return typeof n==`number`&&Number.isFinite(n)?n:null}catch{return null}},se=e=>Math.max(p,Math.min(m,e)),ce=(m-p)/100,le=e=>{let t=e.currentTarget.getBoundingClientRect();if(t.width===0)return;let n=Math.max(0,Math.min(1,(e.clientX-t.left)/t.width));s(p+n*(m-p))},ue=e=>{let t=e.shiftKey?10:1,n=o;if(e.key===`ArrowRight`)n=(o??(p+m)/2)+ce*t;else if(e.key===`ArrowLeft`)n=(o??(p+m)/2)-ce*t;else if(e.key===`Home`)n=p;else if(e.key===`End`)n=m;else return;e.preventDefault(),s(se(n))},de=a||o===null?null:se(o),fe=de===null?r(`Range [${wy(p)}, ${wy(m)}] · ${h} samples; use arrow keys or pointer to read values`,`区间 [${wy(p)}, ${wy(m)}] · ${h} 个采样点;用方向键或指针读取数值`):`${r(`x = ${wy(de)}; `,`x = ${wy(de)};`)}${T.map((e,t)=>{let n=oe(e,de),i=e.error?r(`cannot compute`,`无法计算`):n===null?r(`undefined`,`无定义`):wy(n);return r(`Curve ${t+1}: `,`曲线 ${t+1}:`)+i}).join(r(`; `,`;`))}`,pe=de===null?null:T.map((e,t)=>{let n=oe(e,de);return n===null||!e.expression?null:(0,$.jsx)(`circle`,{className:`local-visual-active-point`,cx:F(de),cy:ee(n),r:4.5,style:{fill:cy[t%cy.length],stroke:`var(--surface)`},strokeWidth:1.5},`active-${t}`)});return(0,$.jsxs)(Jy,{className:`local-visual-plot`,label:u,children:[a?null:(0,$.jsx)(`div`,{className:`local-visual-readout`,id:l,"aria-live":`polite`,children:fe}),(0,$.jsx)(`div`,{className:`local-visual-svg-wrap`,children:(0,$.jsxs)(`svg`,{className:`local-visual-svg`,viewBox:`0 0 ${dy} ${fy}`,role:`group`,"aria-label":r(`${u}, range ${wy(p)} to ${wy(m)}, ${h} samples`,`${u},区间 ${wy(p)} 到 ${wy(m)},${h} 个采样点`),"aria-describedby":a?void 0:l,tabIndex:a?void 0:0,onPointerMove:a?void 0:le,onPointerLeave:a?void 0:()=>s(null),onFocus:a?void 0:()=>s(e=>e??(p+m)/2),onBlur:a?void 0:()=>s(null),onKeyDown:a?void 0:ue,children:[j.map(e=>(0,$.jsxs)(`g`,{children:[(0,$.jsx)(`line`,{className:`local-visual-grid-line`,x1:N,x2:506,y1:ee(e),y2:ee(e)}),(0,$.jsx)(`text`,{className:`local-visual-axis-label`,x:N-6,y:ee(e),textAnchor:`end`,dominantBaseline:`middle`,children:Ty(e)})]},`y-${e}`)),A.min<0&&A.max>0?(0,$.jsx)(`line`,{className:`local-visual-zero-line`,x1:N,x2:506,y1:ee(0),y2:ee(0)}):null,(0,$.jsx)(`line`,{className:`local-visual-axis-line`,x1:N,x2:506,y1:274,y2:274}),M.map(e=>(0,$.jsxs)(`g`,{children:[(0,$.jsx)(`line`,{className:`local-visual-tick`,x1:F(e),x2:F(e),y1:274,y2:279}),(0,$.jsx)(`text`,{className:`local-visual-axis-label`,x:F(e),y:293,textAnchor:`middle`,children:Ty(e)})]},`x-${e}`)),d?(0,$.jsx)(`text`,{className:`local-visual-axis-title`,x:(N+506)/2,y:318,textAnchor:`middle`,children:d}):null,f?(0,$.jsx)(`text`,{className:`local-visual-axis-title`,transform:`translate(12 145) rotate(-90)`,textAnchor:`middle`,children:f}):null,ie.map((e,t)=>e.map((e,n)=>{if(e.length<2)return null;let r=e.map((e,t)=>`${t===0?`M`:`L`} ${F(e.x)} ${ee(e.y)}`).join(` `);return(0,$.jsx)(`path`,{className:`local-visual-plot-line`,d:r,fill:`none`,style:{stroke:cy[t%cy.length]},strokeWidth:2.4,strokeLinejoin:`round`,strokeLinecap:`round`},`curve-${t}-${n}`)})),de===null?null:(0,$.jsx)(`line`,{className:`local-visual-guide`,x1:F(de),x2:F(de),y1:16,y2:274}),pe]})}),(0,$.jsx)(Xy,{notes:E}),O]})}var pb={title:`Task`,start:`Start`,duration:`Duration`,notes:`Notes`},mb={title:`事项`,start:`开始`,duration:`时长`,notes:`说明`};function hb(e){let t=t=>e.includes(t.title)&&e.includes(t.start)&&e.includes(t.duration);return t(pb)?pb:t(mb)?mb:null}function gb({node:e,runtime:t,render:n,mode:r}){let i=sy(),a=r!==`static`,[o,s]=(0,y.useState)(null),c=t.resetToken(e);(0,y.useEffect)(()=>{s(null)},[c]);let l=Dy(t,e.attrs,`title`,``)||i(`Timeline`,`时间轴`),u=Dy(t,e.attrs,`unit`,i(`minutes`,`分钟`)),d=Uy(e,t,i);if(!d)return(0,$.jsx)(Jy,{className:`local-visual-timeline`,label:l,children:(0,$.jsx)(Yy,{message:i(`timeline body requires a Markdown table.`,`timeline 正文需要一个 Markdown 表格。`),kind:`alert`})});let f=d.headerText.map(e=>e.trim()),p=hb(f),m=p?f.indexOf(p.title):-1,h=p?f.indexOf(p.start):-1,g=p?f.indexOf(p.duration):-1,_=p?f.indexOf(p.notes):-1;if(!p||m<0||h<0||g<0)return(0,$.jsx)(Jy,{className:`local-visual-timeline`,label:l,children:(0,$.jsx)(Yy,{message:i(`timeline table requires the "Task", "Start" and "Duration" columns.`,`timeline 表格需要“事项”“开始”“时长”三列,或“Task”“Start”“Duration”三列。`),kind:`alert`})});let v=[],b=[],x=[];if(d.rows.forEach((e,t)=>{let n=e.cells[h],r=e.cells[g],a=n?.numeric??null,o=r?.numeric??null;if(a===null||o===null||a<0||o<0){b.push(t+1);return}let s=Hy(e.cells[m],i)||i(`Task ${t+1}`,`事项 ${t+1}`);x.push({key:`item-${e.index}`,title:s,start:a,duration:o,description:_>=0?e.cells[_]?.children??[]:[],sourceIndex:t})}),b.length>0&&v.push(i(`Rows ${b.join(`, `)} have an invalid start or duration (must be non-negative numbers) and are hidden.`,`第 ${b.join(`、`)} 行的开始或时长不是非负数字,未显示。`)),x.length===0)return(0,$.jsxs)(Jy,{className:`local-visual-timeline`,label:l,children:[(0,$.jsx)(Yy,{message:i(`No valid timeline items.`,`没有有效的时间轴事项。`)}),(0,$.jsx)(Xy,{notes:v})]});let S=[...x].sort((e,t)=>e.start-t.start||e.sourceIndex-t.sourceIndex),C=S.reduce((e,t)=>Math.max(e,t.start+t.duration),0),w=Math.max(1,C),T=Py(0,w,5);(T.length===0||T[0]!==0)&&T.unshift(0),T[T.length-1]<w&&T.push(w);let E=u?` ${u}`:``,D=e=>`${wy(e)}${E}`,O=S.find(e=>e.key===o)??null;return(0,$.jsxs)(Jy,{className:`local-visual-timeline${a?``:` local-static-timeline`}`,label:l,children:[(0,$.jsx)(`div`,{className:`local-visual-timeline-axis`,"aria-hidden":`true`,children:T.map((e,t)=>{let n=e/w*100,r=t===T.length-1?{left:`${n}%`,transform:`translateX(-100%)`}:t===0?{left:`0%`}:{left:`${n}%`,transform:`translateX(-50%)`};return(0,$.jsx)(`span`,{className:`local-visual-timeline-tick`,style:r,children:Ty(e)},`tick-${e}`)})}),(0,$.jsx)(`ol`,{className:`local-visual-timeline-list`,children:S.map(e=>{let t=e.start+e.duration,r=e.start/w*100,c=e.duration/w*100,l=S.indexOf(e);return(0,$.jsxs)(`li`,{className:`local-visual-timeline-item${a&&o===e.key?` is-active`:``}${a?``:` local-static-timeline-item`}`,tabIndex:a?0:void 0,"aria-label":a?i(`${e.title}, started ${D(e.start)}, ended ${D(t)}, duration ${D(e.duration)}${e.description.length>0?`, with notes`:``}`,`${e.title},开始 ${D(e.start)},结束 ${D(t)},时长 ${D(e.duration)}${e.description.length>0?`,有说明`:``}`):void 0,onFocus:a?()=>s(e.key):void 0,onBlur:a?()=>s(t=>t===e.key?null:t):void 0,onPointerEnter:a?()=>s(e.key):void 0,onPointerLeave:a?()=>s(t=>t===e.key?null:t):void 0,onKeyDown:a?e=>{e.key===`Escape`&&(e.preventDefault(),s(null))}:void 0,children:[(0,$.jsxs)(`div`,{className:`local-visual-timeline-head`,children:[(0,$.jsxs)(`span`,{className:`local-visual-timeline-title`,children:[(0,$.jsx)(`span`,{className:`local-visual-swatch`,style:{backgroundColor:cy[l%cy.length]},"aria-hidden":`true`}),e.title]}),(0,$.jsxs)(`span`,{className:`local-visual-timeline-times`,children:[i(`Started`,`开始`),` `,D(e.start),` · `,i(`Ended`,`结束`),` `,D(t),` · `,i(`Duration`,`时长`),` `,D(e.duration)]})]}),(0,$.jsx)(`div`,{className:`local-visual-timeline-track`,"aria-hidden":`true`,children:(0,$.jsx)(`span`,{className:`local-visual-timeline-bar${e.duration===0?` is-zero`:``}`,style:{left:`${r}%`,width:`${c}%`,backgroundColor:cy[l%cy.length]}})}),a||e.description.length===0?null:(0,$.jsx)(`div`,{className:`local-visual-timeline-detail local-static-timeline-detail`,children:n(e.description)})]},e.key)})}),a?(0,$.jsx)(`div`,{className:`local-visual-timeline-detail`,"aria-live":`polite`,children:O?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`strong`,{children:O.title}),O.description.length>0?n(O.description):(0,$.jsx)(`span`,{children:i(`No notes.`,`没有说明。`)})]}):(0,$.jsx)(`span`,{children:i(`Focus or point at an item to view its notes.`,`聚焦或指向事项查看说明。`)})}):null,(0,$.jsx)(Xy,{notes:v})]})}var _b=/[\u1100-\u115f\u2e80-\u303f\u3040-\u33ff\u3400-\u4dbf\u4e00-\u9fff\uac00-\ud7af\uf900-\ufaff\ufe30-\ufe4f\uff00-\uff60\uffe0-\uffe6]/u;function vb(e){let t=0;for(let n of e)_b.test(n)?t+=1:/\s/u.test(n)?t+=.3:t+=.58;return t*_y}function yb(e,t){if(vb(e)<=t)return e;let n=``;for(let r of e){if(vb(`${n}${r}…`)>t)break;n+=r}return`${n.trimEnd()}…`}function bb(e){let t=[],n=``;for(let r of e)n&&vb(n+r)>yy?(t.push(n),n=r):n+=r;if(n&&t.push(n),t.length<=by)return t;let r=t.slice(0,by);return r[1]=yb(t.slice(1).join(``),yy),r}function xb(e){let t=bb(e);return{width:t.reduce((e,t)=>Math.max(e,vb(t)),0)+10,height:t.length*xy+6,lines:t}}function Sb(e){let t=new Map;for(let n of e){let e=`${n.from}\u0000${n.to}`;t.set(e,(t.get(e)??0)+1)}let n=new Map,r=new Map;for(let i of e){let e=`${i.from}\u0000${i.to}`,a=t.get(e)??1,o=n.get(e)??0;n.set(e,o+1),r.set(i.key,(o-(a-1)/2)*12)}return r}function Cb(e,t,n){let{width:r,height:i,positions:a}=e,o=Sb(t),s=1/0,c=1/0,l=-1/0,u=-1/0;for(let e of t){if(!e.label)continue;let t=a.get(e.from),r=a.get(e.to);if(!t||!r)continue;let i=Tb(n,t,r,o.get(e.key)??0,e.from===e.to),d=xb(e.label);s=Math.min(s,i.labelX-d.width/2),c=Math.min(c,i.labelY-d.height/2),l=Math.max(l,i.labelX+d.width/2),u=Math.max(u,i.labelY+d.height/2)}if(!Number.isFinite(s))return e;let d=Math.max(0,vy-s),f=Math.max(0,vy-c),p=Math.max(0,l+vy-r),m=Math.max(0,u+vy-i);if(d===0&&f===0&&p===0&&m===0)return e;for(let e of a.values())e.x+=d,e.y+=f;return{width:r+d+p,height:i+f+m,positions:a}}function wb(e,t,n){let r=e.map(e=>e.id),i=new Map(r.map((e,t)=>[e,t])),a=new Set(r),o=new Map(r.map(e=>[e,[]]));for(let e of t)e.from!==e.to&&a.has(e.from)&&a.has(e.to)&&o.get(e.from).push(e.to);let s=new Map,c=new Map,l=new Set,u=[],d=[],f=0,p=e=>{s.set(e,f),c.set(e,f),f+=1,u.push(e),l.add(e);for(let t of o.get(e)??[])s.has(t)?l.has(t)&&c.set(e,Math.min(c.get(e),s.get(t))):(p(t),c.set(e,Math.min(c.get(e),c.get(t))));if(c.get(e)===s.get(e)){let t=[],n;do n=u.pop(),l.delete(n),t.push(n);while(n!==e);d.push(t.reverse())}};for(let e of r)s.has(e)||p(e);let m=new Map;d.forEach((e,t)=>{for(let n of e)m.set(n,t)});let h=d.map(()=>new Set),g=d.map(()=>0);for(let e of t){if(!a.has(e.from)||!a.has(e.to))continue;let t=m.get(e.from),n=m.get(e.to);t===n||h[t].has(n)||(h[t].add(n),g[n]+=1)}let _=d.map((e,t)=>({index:t,order:Math.min(...e.map(e=>i.get(e)??0))})),v=_.filter(e=>g[e.index]===0).map(e=>e.index).sort((e,t)=>_[e].order-_[t].order),y=d.map(()=>0);for(;v.length>0;){let e=v.shift();for(let t of h[e])y[t]=Math.max(y[t],y[e]+1),--g[t],g[t]===0&&v.push(t)}let b=Math.max(1,...y)+1,x=Array.from({length:b},()=>[]);for(let e of r)x[y[m.get(e)]].push(e);let S=x.filter(e=>e.length>0),C=Math.max(1,...S.map(e=>e.length)),w=new Map,T,E;if(n===`down`)T=py,E=Math.max(240,106+(S.length-1)*120),S.forEach((e,t)=>{let n=53+t*120;e.forEach((t,r)=>{let i=e.length===1?T/2:104+r*((T-88-my)/(e.length-1));w.set(t,{x:i,y:n})})});else{let e=t.reduce((e,t)=>t.label?Math.max(e,xb(t.label).width):e,0),n=Math.max(gy,my+(e>0?e+24:0));T=Math.max(py,208+(S.length-1)*n),E=Math.max(240,106+(C-1)*74),S.forEach((e,t)=>{let n=S.length===1?T/2:104+t*((T-88-my)/(S.length-1));e.forEach((t,r)=>{let i=e.length===1?E/2:53+r*((E-60-hy)/(e.length-1));w.set(t,{x:n,y:i})})})}return Cb({width:T,height:E,positions:w},t,n)}function Tb(e,t,n,r,i){let a=my,o=hy;if(i)return e===`right`?{d:`M ${t.x+20} ${t.y-o/2} C ${t.x+64} ${t.y-o/2-64}, ${t.x-64} ${t.y-o/2-64}, ${t.x-20} ${t.y-o/2}`,labelX:t.x,labelY:t.y-o/2-46}:{d:`M ${t.x+a/2} ${t.y-10} C ${t.x+a/2+64} ${t.y-54}, ${t.x+a/2+64} ${t.y+54}, ${t.x+a/2} ${t.y+10}`,labelX:t.x+a/2+44,labelY:t.y};if(e===`right`){if(n.x>t.x){let e=t.x+a/2,i=t.y+r,o=n.x-a/2,s=n.y+r;return{d:`M ${e} ${i} L ${o} ${s}`,labelX:(e+o)/2,labelY:(i+s)/2-12}}let e=t.x+r,i=n.x+r,s=t.y+o/2,c=n.y-o/2,l=Math.max(70,Math.abs(i-e)*.45);return{d:`M ${e} ${s} C ${e+l} ${s+86}, ${i-l} ${c+86}, ${i} ${c}`,labelX:(e+i)/2,labelY:Math.max(s,c)+48}}if(n.y>t.y){let e=t.x+r,i=n.x+r,a=t.y+o/2,s=n.y-o/2;return{d:`M ${e} ${a} L ${i} ${s}`,labelX:(e+i)/2+10,labelY:(a+s)/2}}let s=t.x+a/2,c=n.x-a/2,l=t.y+r,u=n.y+r,d=Math.max(70,Math.abs(u-l)*.45);return{d:`M ${s} ${l} C ${s+86} ${l+d}, ${c+86} ${u-d}, ${c} ${u}`,labelX:Math.max(s,c)+48,labelY:(l+u)/2}}function Eb({node:e,runtime:t,render:n,mode:r}){let i=sy(),a=r!==`static`,[o,s]=(0,y.useState)(null),[c,l]=(0,y.useState)(null),u=t.resetToken(e);(0,y.useEffect)(()=>{s(null),l(null)},[u]);let d=(0,y.useId)().replace(/[^a-zA-Z0-9_-]/g,``),f=`local-diagram-arrow-${d}`,p=`local-diagram-description-${d}`,m=Dy(t,e.attrs,`label`,``)||i(`Diagram`,`图解`),h=(e.attrs?.direction??`right`).trim().toLowerCase()===`down`?`down`:`right`,g=e.children?.filter(e=>e.type===`component`)??[],_=[],v=[],b=new Set;for(let e of g){if(e.name!==`node`)continue;let n=(e.attrs?.id??``).trim();if(!n){_.push(i(`Ignored a node without an id.`,`已忽略缺少 id 的节点。`));continue}if(b.has(n)){_.push(i(`Duplicate node id ${n}; ignored the later node.`,`节点 id 重复(${n}),已忽略后一个节点。`));continue}b.add(n);let r=Dy(t,e.attrs,`tone`,`neutral`).trim(),a=r===`success`||r===`warning`?r:`neutral`;v.push({id:n,label:Dy(t,e.attrs,`label`,n)||n,tone:a,children:e.children??[]})}let x=[],S=new Set;for(let e of g){if(e.name!==`edge`)continue;let n=(e.attrs?.from??``).trim(),r=(e.attrs?.to??``).trim();if(!n||!r||!b.has(n)||!b.has(r)){_.push(i(`Edge ${n||`?`} → ${r||`?`} references a missing endpoint; ignored.`,`连线 ${n||`?`} → ${r||`?`} 缺少端点,已忽略。`));continue}let a=Dy(t,e.attrs,`label`,``),o=`${n}\u0000${r}\u0000${a}`;S.has(o)?_.push(i(`Duplicate edge: ${n} → ${r}${a?` (${a})`:``}; ignored.`,`重复连线:${n} → ${r}${a?`(${a})`:``},已忽略。`)):(S.add(o),x.push({key:o,from:n,to:r,label:a}))}if(v.length===0)return(0,$.jsxs)(Jy,{className:`local-visual-diagram`,label:m,children:[(0,$.jsx)(Yy,{message:`diagram requires at least one node.`,kind:`alert`}),(0,$.jsx)(Xy,{notes:_})]});let C=null;try{let n=t.get(e);typeof n==`string`&&(C=n)}catch{C=null}let w=new Set(v.map(e=>e.id)),T=(e.attrs?.initial??``).trim(),E=T&&w.has(T)?T:v[0].id,D=C&&w.has(C)?C:o&&w.has(o)?o:E,O=v.find(e=>e.id===D)??v[0],k=C&&w.has(C)?C:T&&w.has(T)?T:null,A=n=>{s(n),l(null);try{let r=t.set(e,n);r.length>0&&l(r.map(e=>i(et(e,`en`),et(e,`zh`))).join(`; `))}catch(e){l(Ey(e))}},j=wb(v,x,h),M=Sb(x),N=[],P=[];for(let e of x){let t=j.positions.get(e.from),n=j.positions.get(e.to);if(!t||!n)continue;let r=Tb(h,t,n,M.get(e.key)??0,e.from===e.to);if(N.push((0,$.jsx)(`g`,{className:`local-visual-edge`,children:(0,$.jsx)(`path`,{d:r.d,fill:`none`,style:{stroke:`var(--ink-muted)`},strokeWidth:1.6,markerEnd:`url(#${f})`})},`edge-${e.key}`)),!e.label)continue;let i=xb(e.label);P.push((0,$.jsx)(`g`,{className:`local-visual-edge-label-group`,children:(0,$.jsx)(`text`,{className:`local-visual-edge-label`,x:r.labelX,y:r.labelY,textAnchor:`middle`,dominantBaseline:`middle`,children:i.lines.map((e,t)=>(0,$.jsx)(`tspan`,{x:r.labelX,y:r.labelY+(t-(i.lines.length-1)/2)*xy,children:e},t))})},`edge-label-${e.key}`))}return(0,$.jsxs)(Jy,{className:`local-visual-diagram${a?``:` local-static-diagram`}`,label:m,children:[(0,$.jsx)(`div`,{className:`local-visual-svg-wrap`,children:(0,$.jsxs)(`svg`,{className:`local-visual-svg local-visual-diagram-svg`,viewBox:`0 0 ${j.width} ${j.height}`,role:`group`,"aria-label":a?`${m}, with ${v.length} nodes and ${x.length} edges; press Tab to focus a node and Enter to select`:i(`${m}, with ${v.length} nodes and ${x.length} edges`,`${m},共 ${v.length} 个节点、${x.length} 条连线`),"aria-describedby":p,children:[(0,$.jsx)(`defs`,{children:(0,$.jsx)(`marker`,{id:f,viewBox:`0 0 10 10`,refX:`9`,refY:`5`,markerWidth:`7`,markerHeight:`7`,orient:`auto-start-reverse`,children:(0,$.jsx)(`path`,{d:`M 0 0 L 10 5 L 0 10 z`,style:{fill:`var(--ink-muted)`}})})}),N,v.map(e=>{let t=j.positions.get(e.id);if(!t)return null;let n=a?e.id===D:k!==null&&e.id===k,r=My(e.label,8,2);return(0,$.jsxs)(`g`,{className:`local-visual-node local-visual-node-${e.tone}${n?` is-selected`:``}`,"data-diagram-node":a?``:void 0,transform:`translate(${t.x} ${t.y})`,role:a?`button`:void 0,tabIndex:a?0:void 0,"aria-pressed":a?n:void 0,"aria-label":a?e.label:void 0,onClick:a?()=>A(e.id):void 0,onKeyDown:a?t=>{Ry(t)?(t.preventDefault(),A(e.id)):t.key===`ArrowRight`||t.key===`ArrowDown`?Ly(t,`[data-diagram-node]`,1):(t.key===`ArrowLeft`||t.key===`ArrowUp`)&&Ly(t,`[data-diagram-node]`,-1)}:void 0,children:[(0,$.jsx)(`title`,{children:e.label}),(0,$.jsx)(`rect`,{className:`local-visual-node-shape`,x:-60,y:-23,width:my,height:hy,rx:10}),(0,$.jsx)(`text`,{className:`local-visual-node-text`,textAnchor:`middle`,children:r.map((e,t)=>(0,$.jsx)(`tspan`,{x:0,y:(t-(r.length-1)/2)*16+4,children:e},t))})]},`node-${e.id}`)}),P]})}),a?(0,$.jsx)(`div`,{className:`local-visual-diagram-detail`,"aria-live":`polite`,children:O?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`strong`,{children:O.label}),O.children.length>0?n(O.children):(0,$.jsx)(`span`,{children:i(`This node has no description.`,`此节点没有说明。`)})]}):(0,$.jsx)(`span`,{children:i(`Click a node, or focus it with Tab and press Enter, to view its description.`,`点击节点,或用 Tab 聚焦后按 Enter 查看说明。`)})}):(0,$.jsx)(`div`,{className:`local-visual-diagram-detail local-static-diagram-detail`,children:(0,$.jsx)(`dl`,{className:`local-static-diagram-nodes`,children:v.map(e=>(0,$.jsxs)(`div`,{className:`local-static-diagram-node`,children:[(0,$.jsx)(`dt`,{children:e.label}),(0,$.jsx)(`dd`,{children:e.children.length>0?n(e.children):(0,$.jsx)(`span`,{children:i(`This node has no description.`,`此节点没有说明。`)})})]},`static-node-${e.id}`))})}),(0,$.jsxs)(`ul`,{id:p,className:`local-visual-sr-only`,"aria-label":i(`Nodes and edges`,`节点与连线`),children:[v.map(e=>(0,$.jsx)(`li`,{children:e.label},`description-node-${e.id}`)),x.map(e=>{let t=v.find(t=>t.id===e.from),n=v.find(t=>t.id===e.to);return(0,$.jsxs)(`li`,{children:[t?.label??e.from,` → `,n?.label??e.to,e.label?` (${e.label})`:``]},`description-edge-${e.key}`)})]}),c?(0,$.jsx)(Yy,{message:c,kind:`alert`}):null,(0,$.jsx)(Xy,{notes:_})]})}function Db(e){let t={...e,mode:e.mode??`interactive`};switch(t.node.name){case`table`:return(0,$.jsx)(Qy,{...t});case`chart`:return(0,$.jsx)(tb,{...t});case`plot`:return(0,$.jsx)(fb,{...t});case`timeline`:return(0,$.jsx)(gb,{...t});case`diagram`:return(0,$.jsx)(Eb,{...t});default:return null}}var Ob=class extends Error{failure;constructor(e){super(e),this.name=`DataTableFailureError`,this.failure=e}};function kb(e){return e===null?``:typeof e==`string`?e:typeof e==`number`?Number.isFinite(e)?String(e):null:typeof e==`boolean`?e?`true`:`false`:null}function Ab(e){return typeof e==`string`?e===``?null:`s:${e}`:typeof e==`number`&&Number.isFinite(e)?`n:${e===0?0:e}`:null}function jb(e,t,n){let r={...n};for(let i of t)Object.hasOwn(n,i)||Object.defineProperty(r,i,{enumerable:!0,configurable:!0,get(){return e.evaluate(i)}});return r}function Mb(e){if(e.length===0)return null;let t=typeof e[0];if(t!==`string`&&t!==`number`)return`rows`;for(let n of e)if(typeof n!==t||typeof n==`number`&&!Number.isFinite(n))return`rows`;return null}function Nb(e,t){let n;try{n=Yt(t)}catch{throw new Ob(`rows`)}let r;try{r=n.evaluate(jb(e,n.dependencies,{}))}catch{throw new Ob(`rows`)}if(!Array.isArray(r))throw new Ob(`rows`);let i=Mb(r);if(i)throw new Ob(i);return r}function Pb(e){let{rows:t,columns:n,keyExpression:r,runtime:i}=e,a=e.maxRows??100,o=e.budget??1e5;if(!Number.isSafeInteger(a)||a<=0||a>1e3)return{ok:!1,failure:`max-rows`};if(n.length<1||n.length>20)return{ok:!1,failure:`columns`};let s=Mb(t);if(s)return{ok:!1,failure:s};if(t.length>a)return{ok:!1,failure:`rows-budget`};let c;try{c=Yt(r)}catch{return{ok:!1,failure:`key`}}let l=c.dependencies;if(l.length!==1||l[0]!==`item`)return{ok:!1,failure:`key`};let u=n.map(e=>{try{return{spec:e,expression:Yt(e.value)}}catch{return{spec:e,expression:null}}}),d=0;for(let e of n)d+=e.label.length;if(t.length===0&&(d+=7),d>o)return{ok:!1,failure:`text-budget`};let f=e=>{if(d+=e,d>o)throw new Ob(`text-budget`)},p=new Set,m=[];try{for(let e=0;e<t.length;e+=1){let n={item:t[e],index:e},r=null;try{r=Ab(c.evaluate(n))}catch{return{ok:!1,failure:`key`}}if(r===null||p.has(r))return{ok:!1,failure:`key`};f(r.length),p.add(r);let a=[];for(let e of u){if(!e.expression){f(14),a.push({ok:!1,text:``});continue}let t=null;try{t=kb(e.expression.evaluate(jb(i,e.expression.dependencies,n)))}catch{t=null}t===null?(f(14),a.push({ok:!1,text:``})):(f(t.length),a.push({ok:!0,text:t}))}m.push({key:r,cells:a})}}catch(e){return e instanceof Ob?{ok:!1,failure:e.failure}:{ok:!1,failure:`rows`}}return{ok:!0,model:{columns:n.map(e=>e.label),rows:m,empty:t.length===0}}}function Fb(e,t){switch(t){case`label`:return e(`Data table requires a label.`,`数据表需要标签。`);case`columns`:return e(`Data table requires between 1 and 20 column definitions.`,`数据表需要 1 到 20 个列定义。`);case`max-rows`:return e(`max-rows must be a positive integer no greater than ${A}.`,`max-rows 必须是 1 到 ${A} 之间的整数。`);case`rows`:return e(`Rows must evaluate to a list.`,`行数据必须计算为列表。`);case`rows-budget`:return e(`Too many rows for this table.`,`此数据表的行数超过上限。`);case`key`:return e(`Every row needs a unique, non-empty key.`,`每一行都需要唯一且非空的键。`);case`text-budget`:return e(`The table content exceeds the text budget.`,`数据表内容超过文本上限。`)}}var Ib=/^\s*\{\{([\s\S]*)\}\}\s*$/;function Lb(e){if(e===void 0)return null;let t=Ib.exec(e),n=t?t[1].trim():``;return n===``?null:n}function Rb(e){return e.type===`comment`||e.type===`text`&&(e.value??``).trim()===``||e.type===`paragraph`&&!e.children?.length&&(e.value??``).trim()===``}function zb(e){let t=(e.attrs?.label??``).trim();if(t===``)return{ok:!1,failure:`label`};let n=Lb(e.attrs?.rows);if(!n)return{ok:!1,failure:`rows`};let r=Lb(e.attrs?.key);if(!r)return{ok:!1,failure:`key`};let i=e.attrs?.[`max-rows`],a=100;if(i!==void 0&&(!/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/.test(i.trim())||(a=Number(i.trim()),!Number.isSafeInteger(a)||a<=0||a>1e3)))return{ok:!1,failure:`max-rows`};let o=(e.children??[]).filter(e=>!Rb(e)),s=[];for(let e of o){let t=(e.children??[]).filter(e=>!Rb(e));if(e.type!==`component`||e.name!==`column`||t.length>0)return{ok:!1,failure:`columns`};let n=(e.attrs?.label??``).trim(),r=Lb(e.attrs?.value);if(n===``||!r)return{ok:!1,failure:`columns`};s.push({label:n,value:r})}return s.length<1||s.length>20?{ok:!1,failure:`columns`}:{ok:!0,table:{label:t,rows:n,key:r,maxRows:a,columns:s}}}function Bb({node:e,runtime:t,t:n}){let r=zb(e);if(!r.ok)return(0,$.jsx)(`div`,{className:`local-error local-data-table-error`,role:`alert`,children:Fb(n,r.failure)});let i;try{i=Pb({rows:Nb(t,r.table.rows),columns:r.table.columns,keyExpression:r.table.key,maxRows:r.table.maxRows,runtime:t})}catch(e){i={ok:!1,failure:e instanceof Ob?e.failure:`rows`}}if(!i.ok)return(0,$.jsx)(`div`,{className:`local-error local-data-table-error`,role:`alert`,children:Fb(n,i.failure)});let{model:a}=i;return(0,$.jsx)(`div`,{className:`md-table-scroll local-data-table-scroll`,"data-local-data-table":``,children:(0,$.jsxs)(`table`,{className:`md-table local-data-table`,"aria-label":r.table.label,children:[(0,$.jsx)(`thead`,{children:(0,$.jsx)(`tr`,{children:a.columns.map((e,t)=>(0,$.jsx)(`th`,{scope:`col`,children:e},`column-${t}`))})}),(0,$.jsx)(`tbody`,{children:a.empty?(0,$.jsx)(`tr`,{children:(0,$.jsx)(`td`,{className:`local-data-table-empty`,colSpan:a.columns.length,children:n(`No rows`,`没有数据`)})}):a.rows.map(e=>(0,$.jsx)(`tr`,{children:e.cells.map((e,t)=>(0,$.jsx)(`td`,{children:e.ok?e.text:(0,$.jsx)(`span`,{className:`local-error local-data-table-cell-error`,children:n(`Cannot compute`,`无法计算`)})},`cell-${t}`))},e.key))})]})})}function Vb(e){let t=e.regex,n=e.COMMENT(`//`,`$`,{contains:[{begin:/\\\n/}]}),r=`[a-zA-Z_]\\w*::`,i=`(?!struct)(decltype\\(auto\\)|`+t.optional(r)+`[a-zA-Z_]\\w*`+t.optional(`<[^<>]+>`)+`)`,a={className:`type`,begin:`\\b[a-z\\d_]*_t\\b`},o={className:`string`,variants:[{begin:`(u8?|U|L)?"`,end:`"`,illegal:`\\n`,contains:[e.BACKSLASH_ESCAPE]},{begin:`(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)`,end:`'`,illegal:`.`},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},s={className:`number`,variants:[{begin:`[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)`},{begin:`[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)`}],relevance:0},c={className:`meta`,begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:`if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include`},contains:[{begin:/\\\n/,relevance:0},e.inherit(o,{className:`string`}),{className:`string`,begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},l={className:`title`,begin:t.optional(r)+e.IDENT_RE,relevance:0},u=t.optional(r)+e.IDENT_RE+`\\s*\\(`,d=`alignas.alignof.and.and_eq.asm.atomic_cancel.atomic_commit.atomic_noexcept.auto.bitand.bitor.break.case.catch.class.co_await.co_return.co_yield.compl.concept.const_cast|10.consteval.constexpr.constinit.continue.decltype.default.delete.do.dynamic_cast|10.else.enum.explicit.export.extern.false.final.for.friend.goto.if.import.inline.module.mutable.namespace.new.noexcept.not.not_eq.nullptr.operator.or.or_eq.override.private.protected.public.reflexpr.register.reinterpret_cast|10.requires.return.sizeof.static_assert.static_cast|10.struct.switch.synchronized.template.this.thread_local.throw.transaction_safe.transaction_safe_dynamic.true.try.typedef.typeid.typename.union.using.virtual.volatile.while.xor.xor_eq`.split(`.`),f=[`bool`,`char`,`char16_t`,`char32_t`,`char8_t`,`double`,`float`,`int`,`long`,`short`,`void`,`wchar_t`,`unsigned`,`signed`,`const`,`static`],p=`any.auto_ptr.barrier.binary_semaphore.bitset.complex.condition_variable.condition_variable_any.counting_semaphore.deque.false_type.flat_map.flat_set.future.imaginary.initializer_list.istringstream.jthread.latch.lock_guard.multimap.multiset.mutex.optional.ostringstream.packaged_task.pair.promise.priority_queue.queue.recursive_mutex.recursive_timed_mutex.scoped_lock.set.shared_future.shared_lock.shared_mutex.shared_timed_mutex.shared_ptr.stack.string_view.stringstream.timed_mutex.thread.true_type.tuple.unique_lock.unique_ptr.unordered_map.unordered_multimap.unordered_multiset.unordered_set.variant.vector.weak_ptr.wstring.wstring_view`.split(`.`),m=`abort.abs.acos.apply.as_const.asin.atan.atan2.calloc.ceil.cerr.cin.clog.cos.cosh.cout.declval.endl.exchange.exit.exp.fabs.floor.fmod.forward.fprintf.fputs.free.frexp.fscanf.future.invoke.isalnum.isalpha.iscntrl.isdigit.isgraph.islower.isprint.ispunct.isspace.isupper.isxdigit.labs.launder.ldexp.log.log10.make_pair.make_shared.make_shared_for_overwrite.make_tuple.make_unique.malloc.memchr.memcmp.memcpy.memset.modf.move.pow.printf.putchar.puts.realloc.scanf.sin.sinh.snprintf.sprintf.sqrt.sscanf.std.stderr.stdin.stdout.strcat.strchr.strcmp.strcpy.strcspn.strlen.strncat.strncmp.strncpy.strpbrk.strrchr.strspn.strstr.swap.tan.tanh.terminate.to_underlying.tolower.toupper.vfprintf.visit.vprintf.vsprintf`.split(`.`),h={type:f,keyword:d,literal:[`NULL`,`false`,`nullopt`,`nullptr`,`true`],built_in:[`_Pragma`],_type_hints:p},g={className:`function.dispatch`,relevance:0,keywords:{_hint:m},begin:t.concat(/\b/,`(?!${d.join(`|`)})`,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},_=[g,c,a,n,e.C_BLOCK_COMMENT_MODE,s,o],v={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:`new throw return else`,end:/;/}],keywords:h,contains:_.concat([{begin:/\(/,end:/\)/,keywords:h,contains:_.concat([`self`]),relevance:0}]),relevance:0},y={className:`function`,begin:`(`+i+`[\\*&\\s]+)+`+u,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:h,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:`decltype\\(auto\\)`,keywords:h,relevance:0},{begin:u,returnBegin:!0,contains:[l],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[o,s]},{relevance:0,match:/,/},{className:`params`,begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,o,s,a,{begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[`self`,n,e.C_BLOCK_COMMENT_MODE,o,s,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:`C++`,aliases:[`cc`,`c++`,`h++`,`hpp`,`hh`,`hxx`,`cxx`],keywords:h,illegal:`</`,classNameAliases:{"function.dispatch":`built_in`},contains:[].concat(v,y,g,_,[c,{begin:`\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)`,end:`>`,keywords:h,contains:[`self`,a]},{begin:e.IDENT_RE+`::`,keywords:h},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:`keyword`,3:`title.class`}}])}}function Hb(e){let t={type:[`boolean`,`byte`,`word`,`String`],built_in:`KeyboardController.MouseController.SoftwareSerial.EthernetServer.EthernetClient.LiquidCrystal.RobotControl.GSMVoiceCall.EthernetUDP.EsploraTFT.HttpClient.RobotMotor.WiFiClient.GSMScanner.FileSystem.Scheduler.GSMServer.YunClient.YunServer.IPAddress.GSMClient.GSMModem.Keyboard.Ethernet.Console.GSMBand.Esplora.Stepper.Process.WiFiUDP.GSM_SMS.Mailbox.USBHost.Firmata.PImage.Client.Server.GSMPIN.FileIO.Bridge.Serial.EEPROM.Stream.Mouse.Audio.Servo.File.Task.GPRS.WiFi.Wire.TFT.GSM.SPI.SD`.split(`.`),_hints:`setup.loop.runShellCommandAsynchronously.analogWriteResolution.retrieveCallingNumber.printFirmwareVersion.analogReadResolution.sendDigitalPortPair.noListenOnLocalhost.readJoystickButton.setFirmwareVersion.readJoystickSwitch.scrollDisplayRight.getVoiceCallStatus.scrollDisplayLeft.writeMicroseconds.delayMicroseconds.beginTransmission.getSignalStrength.runAsynchronously.getAsynchronously.listenOnLocalhost.getCurrentCarrier.readAccelerometer.messageAvailable.sendDigitalPorts.lineFollowConfig.countryNameWrite.runShellCommand.readStringUntil.rewindDirectory.readTemperature.setClockDivider.readLightSensor.endTransmission.analogReference.detachInterrupt.countryNameRead.attachInterrupt.encryptionType.readBytesUntil.robotNameWrite.readMicrophone.robotNameRead.cityNameWrite.userNameWrite.readJoystickY.readJoystickX.mouseReleased.openNextFile.scanNetworks.noInterrupts.digitalWrite.beginSpeaker.mousePressed.isActionDone.mouseDragged.displayLogos.noAutoscroll.addParameter.remoteNumber.getModifiers.keyboardRead.userNameRead.waitContinue.processInput.parseCommand.printVersion.readNetworks.writeMessage.blinkVersion.cityNameRead.readMessage.setDataMode.parsePacket.isListening.setBitOrder.beginPacket.isDirectory.motorsWrite.drawCompass.digitalRead.clearScreen.serialEvent.rightToLeft.setTextSize.leftToRight.requestFrom.keyReleased.compassRead.analogWrite.interrupts.WiFiServer.disconnect.playMelody.parseFloat.autoscroll.getPINUsed.setPINUsed.setTimeout.sendAnalog.readSlider.analogRead.beginWrite.createChar.motorsStop.keyPressed.tempoWrite.readButton.subnetMask.debugPrint.macAddress.writeGreen.randomSeed.attachGPRS.readString.sendString.remotePort.releaseAll.mouseMoved.background.getXChange.getYChange.answerCall.getResult.voiceCall.endPacket.constrain.getSocket.writeJSON.getButton.available.connected.findUntil.readBytes.exitValue.readGreen.writeBlue.startLoop.IPAddress.isPressed.sendSysex.pauseMode.gatewayIP.setCursor.getOemKey.tuneWrite.noDisplay.loadImage.switchPIN.onRequest.onReceive.changePIN.playFile.noBuffer.parseInt.overflow.checkPIN.knobRead.beginTFT.bitClear.updateIR.bitWrite.position.writeRGB.highByte.writeRed.setSpeed.readBlue.noStroke.remoteIP.transfer.shutdown.hangCall.beginSMS.endWrite.attached.maintain.noCursor.checkReg.checkPUK.shiftOut.isValid.shiftIn.pulseIn.connect.println.localIP.pinMode.getIMEI.display.noBlink.process.getBand.running.beginSD.drawBMP.lowByte.setBand.release.bitRead.prepare.pointTo.readRed.setMode.noFill.remove.listen.stroke.detach.attach.noTone.exists.buffer.height.bitSet.circle.config.cursor.random.IRread.setDNS.endSMS.getKey.micros.millis.begin.print.write.ready.flush.width.isPIN.blink.clear.press.mkdir.rmdir.close.point.yield.image.BSSID.click.delay.read.text.move.peek.beep.rect.line.open.seek.fill.size.turn.stop.home.find.step.tone.sqrt.RSSI.SSID.end.bit.tan.cos.sin.pow.map.abs.max.min.get.run.put`.split(`.`),literal:[`DIGITAL_MESSAGE`,`FIRMATA_STRING`,`ANALOG_MESSAGE`,`REPORT_DIGITAL`,`REPORT_ANALOG`,`INPUT_PULLUP`,`SET_PIN_MODE`,`INTERNAL2V56`,`SYSTEM_RESET`,`LED_BUILTIN`,`INTERNAL1V1`,`SYSEX_START`,`INTERNAL`,`EXTERNAL`,`DEFAULT`,`OUTPUT`,`INPUT`,`HIGH`,`LOW`]},n=Vb(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name=`Arduino`,n.aliases=[`ino`],n.supersetOf=`cpp`,n}function Ub(e){let t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:[`self`,{begin:/:-/,contains:[n]}]};Object.assign(n,{className:`variable`,variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,`(?![\\w\\d])(?![$])`)},r]});let i={className:`subst`,begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:`comment`}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:`string`})]}},s={className:`string`,begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(s);let c={match:/\\"/},l={className:`string`,begin:/'/,end:/'/},u={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:`number`},e.NUMBER_MODE,n]},f=e.SHEBANG({binary:`(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)`,relevance:10}),p={className:`function`,begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=[`if`,`then`,`else`,`elif`,`fi`,`time`,`for`,`while`,`until`,`in`,`do`,`done`,`case`,`esac`,`coproc`,`function`,`select`],h=[`true`,`false`],g={match:/(\/[a-z._-]+)+/},_=[`break`,`cd`,`continue`,`eval`,`exec`,`exit`,`export`,`getopts`,`hash`,`pwd`,`readonly`,`return`,`shift`,`test`,`times`,`trap`,`umask`,`unset`],v=[`alias`,`bind`,`builtin`,`caller`,`command`,`declare`,`echo`,`enable`,`help`,`let`,`local`,`logout`,`mapfile`,`printf`,`read`,`readarray`,`source`,`sudo`,`type`,`typeset`,`ulimit`,`unalias`],y=`autoload.bg.bindkey.bye.cap.chdir.clone.comparguments.compcall.compctl.compdescribe.compfiles.compgroups.compquote.comptags.comptry.compvalues.dirs.disable.disown.echotc.echoti.emulate.fc.fg.float.functions.getcap.getln.history.integer.jobs.kill.limit.log.noglob.popd.print.pushd.pushln.rehash.sched.setcap.setopt.stat.suspend.ttyctl.unfunction.unhash.unlimit.unsetopt.vared.wait.whence.where.which.zcompile.zformat.zftp.zle.zmodload.zparseopts.zprof.zpty.zregexparse.zsocket.zstyle.ztcp`.split(`.`),b=`chcon.chgrp.chown.chmod.cp.dd.df.dir.dircolors.ln.ls.mkdir.mkfifo.mknod.mktemp.mv.realpath.rm.rmdir.shred.sync.touch.truncate.vdir.b2sum.base32.base64.cat.cksum.comm.csplit.cut.expand.fmt.fold.head.join.md5sum.nl.numfmt.od.paste.ptx.pr.sha1sum.sha224sum.sha256sum.sha384sum.sha512sum.shuf.sort.split.sum.tac.tail.tr.tsort.unexpand.uniq.wc.arch.basename.chroot.date.dirname.du.echo.env.expr.factor.groups.hostid.id.link.logname.nice.nohup.nproc.pathchk.pinky.printenv.printf.pwd.readlink.runcon.seq.sleep.stat.stdbuf.stty.tee.test.timeout.tty.uname.unlink.uptime.users.who.whoami.yes`.split(`.`);return{name:`Bash`,aliases:[`sh`,`zsh`],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:h,built_in:[..._,...v,`set`,`shopt`,...y,...b]},contains:[f,e.SHEBANG(),p,d,a,o,g,s,c,l,u,n]}}function Wb(e){let t=e.regex,n=e.COMMENT(`//`,`$`,{contains:[{begin:/\\\n/}]}),r=`[a-zA-Z_]\\w*::`,i=`(decltype\\(auto\\)|`+t.optional(r)+`[a-zA-Z_]\\w*`+t.optional(`<[^<>]+>`)+`)`,a={className:`type`,variants:[{begin:`\\b[a-z\\d_]*_t\\b`},{match:/\batomic_[a-z]{3,6}\b/}]},o={className:`string`,variants:[{begin:`(u8?|U|L)?"`,end:`"`,illegal:`\\n`,contains:[e.BACKSLASH_ESCAPE]},{begin:`(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)`,end:`'`,illegal:`.`},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},s={className:`number`,variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},c={className:`meta`,begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:`if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include`},contains:[{begin:/\\\n/,relevance:0},e.inherit(o,{className:`string`}),{className:`string`,begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},l={className:`title`,begin:t.optional(r)+e.IDENT_RE,relevance:0},u=t.optional(r)+e.IDENT_RE+`\\s*\\(`,d={keyword:`asm.auto.break.case.continue.default.do.else.enum.extern.for.fortran.goto.if.inline.register.restrict.return.sizeof.typeof.typeof_unqual.struct.switch.typedef.union.volatile.while._Alignas._Alignof._Atomic._Generic._Noreturn._Static_assert._Thread_local.alignas.alignof.noreturn.static_assert.thread_local._Pragma`.split(`.`),type:`float.double.signed.unsigned.int.short.long.char.void._Bool._BitInt._Complex._Imaginary._Decimal32._Decimal64._Decimal96._Decimal128._Decimal64x._Decimal128x._Float16._Float32._Float64._Float128._Float32x._Float64x._Float128x.const.static.constexpr.complex.bool.imaginary`.split(`.`),literal:`true false NULL`,built_in:`std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr`},f=[c,a,n,e.C_BLOCK_COMMENT_MODE,s,o],p={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:`new throw return else`,end:/;/}],keywords:d,contains:f.concat([{begin:/\(/,end:/\)/,keywords:d,contains:f.concat([`self`]),relevance:0}]),relevance:0},m={begin:`(`+i+`[\\*&\\s]+)+`+u,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:d,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:`decltype\\(auto\\)`,keywords:d,relevance:0},{begin:u,returnBegin:!0,contains:[e.inherit(l,{className:`title.function`})],relevance:0},{relevance:0,match:/,/},{className:`params`,begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,o,s,a,{begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[`self`,n,e.C_BLOCK_COMMENT_MODE,o,s,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:`C`,aliases:[`h`],keywords:d,disableAutodetect:!0,illegal:`</`,contains:[].concat(p,m,f,[c,{begin:e.IDENT_RE+`::`,keywords:d},{className:`class`,beginKeywords:`enum class struct union`,end:/[{;:<>=]/,contains:[{beginKeywords:`final class struct`},e.TITLE_MODE]}]),exports:{preprocessor:c,strings:o,keywords:d}}}function Gb(e){let t=e.regex,n=e.COMMENT(`//`,`$`,{contains:[{begin:/\\\n/}]}),r=`[a-zA-Z_]\\w*::`,i=`(?!struct)(decltype\\(auto\\)|`+t.optional(r)+`[a-zA-Z_]\\w*`+t.optional(`<[^<>]+>`)+`)`,a={className:`type`,begin:`\\b[a-z\\d_]*_t\\b`},o={className:`string`,variants:[{begin:`(u8?|U|L)?"`,end:`"`,illegal:`\\n`,contains:[e.BACKSLASH_ESCAPE]},{begin:`(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)`,end:`'`,illegal:`.`},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},s={className:`number`,variants:[{begin:`[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)`},{begin:`[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)`}],relevance:0},c={className:`meta`,begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:`if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include`},contains:[{begin:/\\\n/,relevance:0},e.inherit(o,{className:`string`}),{className:`string`,begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},l={className:`title`,begin:t.optional(r)+e.IDENT_RE,relevance:0},u=t.optional(r)+e.IDENT_RE+`\\s*\\(`,d=`alignas.alignof.and.and_eq.asm.atomic_cancel.atomic_commit.atomic_noexcept.auto.bitand.bitor.break.case.catch.class.co_await.co_return.co_yield.compl.concept.const_cast|10.consteval.constexpr.constinit.continue.decltype.default.delete.do.dynamic_cast|10.else.enum.explicit.export.extern.false.final.for.friend.goto.if.import.inline.module.mutable.namespace.new.noexcept.not.not_eq.nullptr.operator.or.or_eq.override.private.protected.public.reflexpr.register.reinterpret_cast|10.requires.return.sizeof.static_assert.static_cast|10.struct.switch.synchronized.template.this.thread_local.throw.transaction_safe.transaction_safe_dynamic.true.try.typedef.typeid.typename.union.using.virtual.volatile.while.xor.xor_eq`.split(`.`),f=[`bool`,`char`,`char16_t`,`char32_t`,`char8_t`,`double`,`float`,`int`,`long`,`short`,`void`,`wchar_t`,`unsigned`,`signed`,`const`,`static`],p=`any.auto_ptr.barrier.binary_semaphore.bitset.complex.condition_variable.condition_variable_any.counting_semaphore.deque.false_type.flat_map.flat_set.future.imaginary.initializer_list.istringstream.jthread.latch.lock_guard.multimap.multiset.mutex.optional.ostringstream.packaged_task.pair.promise.priority_queue.queue.recursive_mutex.recursive_timed_mutex.scoped_lock.set.shared_future.shared_lock.shared_mutex.shared_timed_mutex.shared_ptr.stack.string_view.stringstream.timed_mutex.thread.true_type.tuple.unique_lock.unique_ptr.unordered_map.unordered_multimap.unordered_multiset.unordered_set.variant.vector.weak_ptr.wstring.wstring_view`.split(`.`),m=`abort.abs.acos.apply.as_const.asin.atan.atan2.calloc.ceil.cerr.cin.clog.cos.cosh.cout.declval.endl.exchange.exit.exp.fabs.floor.fmod.forward.fprintf.fputs.free.frexp.fscanf.future.invoke.isalnum.isalpha.iscntrl.isdigit.isgraph.islower.isprint.ispunct.isspace.isupper.isxdigit.labs.launder.ldexp.log.log10.make_pair.make_shared.make_shared_for_overwrite.make_tuple.make_unique.malloc.memchr.memcmp.memcpy.memset.modf.move.pow.printf.putchar.puts.realloc.scanf.sin.sinh.snprintf.sprintf.sqrt.sscanf.std.stderr.stdin.stdout.strcat.strchr.strcmp.strcpy.strcspn.strlen.strncat.strncmp.strncpy.strpbrk.strrchr.strspn.strstr.swap.tan.tanh.terminate.to_underlying.tolower.toupper.vfprintf.visit.vprintf.vsprintf`.split(`.`),h={type:f,keyword:d,literal:[`NULL`,`false`,`nullopt`,`nullptr`,`true`],built_in:[`_Pragma`],_type_hints:p},g={className:`function.dispatch`,relevance:0,keywords:{_hint:m},begin:t.concat(/\b/,`(?!${d.join(`|`)})`,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},_=[g,c,a,n,e.C_BLOCK_COMMENT_MODE,s,o],v={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:`new throw return else`,end:/;/}],keywords:h,contains:_.concat([{begin:/\(/,end:/\)/,keywords:h,contains:_.concat([`self`]),relevance:0}]),relevance:0},y={className:`function`,begin:`(`+i+`[\\*&\\s]+)+`+u,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:h,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:`decltype\\(auto\\)`,keywords:h,relevance:0},{begin:u,returnBegin:!0,contains:[l],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[o,s]},{relevance:0,match:/,/},{className:`params`,begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,o,s,a,{begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[`self`,n,e.C_BLOCK_COMMENT_MODE,o,s,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:`C++`,aliases:[`cc`,`c++`,`h++`,`hpp`,`hh`,`hxx`,`cxx`],keywords:h,illegal:`</`,classNameAliases:{"function.dispatch":`built_in`},contains:[].concat(v,y,g,_,[c,{begin:`\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)`,end:`>`,keywords:h,contains:[`self`,a]},{begin:e.IDENT_RE+`::`,keywords:h},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:`keyword`,3:`title.class`}}])}}function Kb(e){let t=[`bool`,`byte`,`char`,`decimal`,`delegate`,`double`,`dynamic`,`enum`,`float`,`int`,`long`,`nint`,`nuint`,`object`,`sbyte`,`short`,`string`,`ulong`,`uint`,`ushort`],n=[`public`,`private`,`protected`,`static`,`internal`,`protected`,`abstract`,`async`,`extern`,`override`,`unsafe`,`virtual`,`new`,`sealed`,`partial`],r={keyword:`abstract.as.base.break.case.catch.class.const.continue.do.else.event.explicit.extern.finally.fixed.for.foreach.goto.if.implicit.in.interface.internal.is.lock.namespace.new.operator.out.override.params.private.protected.public.readonly.record.ref.return.scoped.sealed.sizeof.stackalloc.static.struct.switch.this.throw.try.typeof.unchecked.unsafe.using.virtual.void.volatile.while`.split(`.`).concat(`add.alias.and.ascending.args.async.await.by.descending.dynamic.equals.file.from.get.global.group.init.into.join.let.nameof.not.notnull.on.or.orderby.partial.record.remove.required.scoped.select.set.unmanaged.value|0.var.when.where.with.yield`.split(`.`)),built_in:t,literal:[`default`,`false`,`null`,`true`]},i=e.inherit(e.TITLE_MODE,{begin:`[a-zA-Z](\\.?\\w)*`}),a={className:`number`,variants:[{begin:`\\b(0b[01']+)`},{begin:`(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)`},{begin:`(-?)(\\b0[xX][a-fA-F0-9'_]+|(\\b[\\d'_]+(\\.[\\d'_]*)?|\\.[\\d'_]+)([eE][-+]?[\\d'_]+)?)`}],relevance:0},o={className:`string`,begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},s={className:`string`,begin:`@"`,end:`"`,contains:[{begin:`""`}]},c=e.inherit(s,{illegal:/\n/}),l={className:`subst`,begin:/\{/,end:/\}/,keywords:r},u=e.inherit(l,{illegal:/\n/}),d={className:`string`,begin:/\$"/,end:`"`,illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,u]},f={className:`string`,begin:/\$@"/,end:`"`,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:`""`},l]},p=e.inherit(f,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:`""`},u]});l.contains=[f,d,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.C_BLOCK_COMMENT_MODE],u.contains=[p,d,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];let m={variants:[o,f,d,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},h={begin:`<`,end:`>`,contains:[{beginKeywords:`in out`},i]},g=e.IDENT_RE+`(<`+e.IDENT_RE+`(\\s*,\\s*`+e.IDENT_RE+`)*>)?(\\[\\])?`,_={begin:`@`+e.IDENT_RE,relevance:0};return{name:`C#`,aliases:[`cs`,`c#`],keywords:r,illegal:/::/,contains:[e.COMMENT(`///`,`$`,{returnBegin:!0,contains:[{className:`doctag`,variants:[{begin:`///`,relevance:0},{begin:`<!--|-->`},{begin:`</?`,end:`>`}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:`meta`,begin:`#`,end:`$`,keywords:{keyword:`if else elif endif define undef warning error line region endregion pragma checksum`}},m,a,{beginKeywords:`class interface`,relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:`where class`},i,h,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:`namespace`,relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[i,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:`record`,relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[i,h,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:`meta`,begin:`^\\s*\\[(?=[\\w])`,excludeBegin:!0,end:`\\]`,excludeEnd:!0,contains:[{className:`string`,begin:/"/,end:/"/}]},{beginKeywords:`new return throw await else`,relevance:0},{className:`function`,begin:`(`+g+`\\s+)+`+e.IDENT_RE+`\\s*(<[^=]+>\\s*)?\\(`,returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:r,contains:[{beginKeywords:n.join(` `),relevance:0},{begin:e.IDENT_RE+`\\s*(<[^=]+>\\s*)?\\(`,returnBegin:!0,contains:[e.TITLE_MODE,h],relevance:0},{match:/\(\)/},{className:`params`,begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:r,relevance:0,contains:[m,a,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},_]}}var qb=e=>({IMPORTANT:{scope:`meta`,begin:`!important`},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:`number`,begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:`number`,begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,4}(-[0-9A-Fa-f][0-9A-Fa-f]{0,4})?/},FUNCTION_DISPATCH:{className:`built_in`,begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:`selector-attr`,begin:/\[/,end:/\]/,illegal:`$`,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:`number`,begin:e.NUMBER_RE+`(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?`,relevance:0},CSS_VARIABLE:{className:`attr`,begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Jb=`a.abbr.address.article.aside.audio.b.blockquote.body.button.canvas.caption.cite.code.dd.del.details.dfn.div.dl.dt.em.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.html.i.iframe.img.input.ins.kbd.label.legend.li.main.mark.menu.nav.object.ol.optgroup.option.p.picture.q.quote.samp.section.select.source.span.strong.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.ul.var.video`.split(`.`),Yb=`defs.g.marker.mask.pattern.svg.switch.symbol.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feFlood.feGaussianBlur.feImage.feMerge.feMorphology.feOffset.feSpecularLighting.feTile.feTurbulence.linearGradient.radialGradient.stop.circle.ellipse.image.line.path.polygon.polyline.rect.text.use.textPath.tspan.foreignObject.clipPath`.split(`.`),Xb=[...Jb,...Yb],Zb=`any-hover.any-pointer.aspect-ratio.color.color-gamut.color-index.device-aspect-ratio.device-height.device-width.display-mode.forced-colors.grid.height.hover.inverted-colors.monochrome.orientation.overflow-block.overflow-inline.pointer.prefers-color-scheme.prefers-contrast.prefers-reduced-motion.prefers-reduced-transparency.resolution.scan.scripting.update.width.min-width.max-width.min-height.max-height`.split(`.`).sort().reverse(),Qb=`active.any-link.blank.checked.current.default.defined.dir.disabled.drop.empty.enabled.first.first-child.first-of-type.fullscreen.future.focus.focus-visible.focus-within.has.host.host-context.hover.indeterminate.in-range.invalid.is.lang.last-child.last-of-type.left.link.local-link.not.nth-child.nth-col.nth-last-child.nth-last-col.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.past.placeholder-shown.read-only.read-write.required.right.root.scope.target.target-within.user-invalid.valid.visited.where`.split(`.`).sort().reverse(),$b=[`after`,`backdrop`,`before`,`cue`,`cue-region`,`first-letter`,`first-line`,`grammar-error`,`marker`,`part`,`placeholder`,`selection`,`slotted`,`spelling-error`].sort().reverse(),ex=`accent-color.align-content.align-items.align-self.alignment-baseline.all.anchor-name.animation.animation-composition.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-range.animation-range-end.animation-range-start.animation-timeline.animation-timing-function.appearance.aspect-ratio.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.block-size.border.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-end-end-radius.border-end-start-radius.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-start-end-radius.border-start-start-radius.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-align.box-decoration-break.box-direction.box-flex.box-flex-group.box-lines.box-ordinal-group.box-orient.box-pack.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.color-scheme.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.contain-intrinsic-block-size.contain-intrinsic-height.contain-intrinsic-inline-size.contain-intrinsic-size.contain-intrinsic-width.container.container-name.container-type.content.content-visibility.counter-increment.counter-reset.counter-set.cue.cue-after.cue-before.cursor.cx.cy.direction.display.dominant-baseline.empty-cells.enable-background.field-sizing.fill.fill-opacity.fill-rule.filter.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.flood-color.flood-opacity.flow.font.font-display.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-palette.font-size.font-size-adjust.font-smooth.font-smoothing.font-stretch.font-style.font-synthesis.font-synthesis-position.font-synthesis-small-caps.font-synthesis-style.font-synthesis-weight.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-emoji.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.forced-color-adjust.gap.glyph-orientation-horizontal.glyph-orientation-vertical.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphenate-character.hyphenate-limit-chars.hyphens.icon.image-orientation.image-rendering.image-resolution.ime-mode.initial-letter.initial-letter-align.inline-size.inset.inset-area.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.kerning.left.letter-spacing.lighting-color.line-break.line-height.line-height-step.list-style.list-style-image.list-style-position.list-style-type.margin.margin-block.margin-block-end.margin-block-start.margin-bottom.margin-inline.margin-inline-end.margin-inline-start.margin-left.margin-right.margin-top.margin-trim.marker.marker-end.marker-mid.marker-start.marks.mask.mask-border.mask-border-mode.mask-border-outset.mask-border-repeat.mask-border-slice.mask-border-source.mask-border-width.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.masonry-auto-flow.math-depth.math-shift.math-style.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.nav-down.nav-index.nav-left.nav-right.nav-up.none.normal.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-anchor.overflow-block.overflow-clip-margin.overflow-inline.overflow-wrap.overflow-x.overflow-y.overlay.overscroll-behavior.overscroll-behavior-block.overscroll-behavior-inline.overscroll-behavior-x.overscroll-behavior-y.padding.padding-block.padding-block-end.padding-block-start.padding-bottom.padding-inline.padding-inline-end.padding-inline-start.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.paint-order.pause.pause-after.pause-before.perspective.perspective-origin.place-content.place-items.place-self.pointer-events.position.position-anchor.position-visibility.print-color-adjust.quotes.r.resize.rest.rest-after.rest-before.right.rotate.row-gap.ruby-align.ruby-position.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-stop.scroll-snap-type.scroll-timeline.scroll-timeline-axis.scroll-timeline-name.scrollbar-color.scrollbar-gutter.scrollbar-width.shape-image-threshold.shape-margin.shape-outside.shape-rendering.speak.speak-as.src.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.table-layout.text-align.text-align-all.text-align-last.text-anchor.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-decoration-thickness.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-indent.text-justify.text-orientation.text-overflow.text-rendering.text-shadow.text-size-adjust.text-transform.text-underline-offset.text-underline-position.text-wrap.text-wrap-mode.text-wrap-style.timeline-scope.top.touch-action.transform.transform-box.transform-origin.transform-style.transition.transition-behavior.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.unicode-range.user-modify.user-select.vector-effect.vertical-align.view-timeline.view-timeline-axis.view-timeline-inset.view-timeline-name.view-transition-name.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.white-space.white-space-collapse.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.x.y.z-index.zoom`.split(`.`).sort().reverse();function tx(e){let t=e.regex,n=qb(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i=/@-?\w[\w]*(-\w+)*/,a=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:`CSS`,case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:`from to`},classNameAliases:{keyframePosition:`selector-tag`},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:`selector-id`,begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:`selector-class`,begin:`\\.[a-zA-Z-][a-zA-Z0-9_-]*`,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:`selector-pseudo`,variants:[{begin:`:(`+Qb.join(`|`)+`)`},{begin:`:(:)?(`+$b.join(`|`)+`)`}]},n.CSS_VARIABLE,{className:`attribute`,begin:`\\b(`+ex.join(`|`)+`)\\b`},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,n.UNICODE_RANGE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:`url data-uri`},contains:[...a,{className:`string`,begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:`[{;]`,relevance:0,illegal:/:/,contains:[{className:`keyword`,begin:i},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:`and or not only`,attribute:Zb.join(` `)},contains:[{begin:/[a-z-]+(?=:)/,className:`attribute`},...a,n.CSS_NUMBER_MODE]}]},{className:`selector-tag`,begin:`\\b(`+Xb.join(`|`)+`)\\b`}]}}function nx(e){let t=e.regex;return{name:`Diff`,aliases:[`patch`],contains:[{className:`meta`,relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+,\d+ +\+\d+ +@@/,/^@@ +-\d+ +\+\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:`comment`,variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:`addition`,begin:/^\+/,end:/$/},{className:`deletion`,begin:/^-/,end:/$/},{className:`addition`,begin:/^!/,end:/$/}]}}function rx(e){let t={keyword:[`break`,`case`,`chan`,`const`,`continue`,`default`,`defer`,`else`,`fallthrough`,`for`,`func`,`go`,`goto`,`if`,`import`,`interface`,`map`,`package`,`range`,`return`,`select`,`struct`,`switch`,`type`,`var`],type:[`bool`,`byte`,`complex64`,`complex128`,`error`,`float32`,`float64`,`int8`,`int16`,`int32`,`int64`,`string`,`uint8`,`uint16`,`uint32`,`uint64`,`int`,`uint`,`uintptr`,`rune`],literal:[`true`,`false`,`iota`,`nil`],built_in:[`append`,`cap`,`close`,`complex`,`copy`,`imag`,`len`,`make`,`new`,`panic`,`print`,`println`,`real`,`recover`,`delete`]};return{name:`Go`,aliases:[`golang`],keywords:t,illegal:`</`,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:`string`,variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:`number`,variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:`function`,beginKeywords:`func`,end:`\\s*(\\{|$)`,excludeEnd:!0,contains:[e.TITLE_MODE,{className:`params`,begin:/\(/,end:/\)/,endsParent:!0,keywords:t,illegal:/["']/}]}]}}function ix(e){let t=e.regex;return{name:`GraphQL`,aliases:[`gql`],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:[`query`,`mutation`,`subscription`,`type`,`input`,`schema`,`directive`,`interface`,`union`,`scalar`,`fragment`,`enum`,`on`],literal:[`true`,`false`,`null`]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:`punctuation`,match:/[.]{3}/,relevance:0},{scope:`punctuation`,begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:`variable`,begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:`meta`,match:/@\w+/,excludeEnd:!0},{scope:`symbol`,begin:t.concat(/[_A-Za-z][_0-9A-Za-z]*/,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function ax(e){let t=e.regex,n={className:`number`,relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];let i={className:`variable`,variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},a={className:`literal`,begin:/\bon|off|true|false|yes|no\b/},o={className:`string`,contains:[e.BACKSLASH_ESCAPE],variants:[{begin:`'''`,end:`'''`,relevance:10},{begin:`"""`,end:`"""`,relevance:10},{begin:`"`,end:`"`},{begin:`'`,end:`'`}]},s={begin:/\[/,end:/\]/,contains:[r,a,i,o,n,`self`],relevance:0},c=t.either(/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/);return{name:`TOML, also INI`,aliases:[`toml`],case_insensitive:!0,illegal:/\S/,contains:[r,{className:`section`,begin:/\[+/,end:/\]+/},{begin:t.concat(c,`(\\s*\\.\\s*`,c,`)*`,t.lookahead(/\s*=\s*[^#\s]/)),className:`attr`,starts:{end:/$/,contains:[r,s,a,i,o,n]}}]}}var ox=`[0-9](_*[0-9])*`,sx=`\\.(${ox})`,cx=`[0-9a-fA-F](_*[0-9a-fA-F])*`,lx={className:`number`,variants:[{begin:`(\\b(${ox})((${sx})|\\.)?|(${sx}))[eE][+-]?(${ox})[fFdD]?\\b`},{begin:`\\b(${ox})((${sx})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${sx})[fFdD]?\\b`},{begin:`\\b(${ox})[fFdD]\\b`},{begin:`\\b0[xX]((${cx})\\.?|(${cx})?\\.(${cx}))[pP][+-]?(${ox})[fFdD]?\\b`},{begin:`\\b(0|[1-9](_*[0-9])*)[lL]?\\b`},{begin:`\\b0[xX](${cx})[lL]?\\b`},{begin:`\\b0(_*[0-7])*[lL]?\\b`},{begin:`\\b0[bB][01](_*[01])*[lL]?\\b`}],relevance:0};function ux(e,t,n){return n===-1?``:e.replace(t,r=>ux(e,t,n-1))}function dx(e){let t=e.regex,n=`[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*`,r=n+ux(`(?:<`+n+`~~~(?:\\s*,\\s*`+n+`~~~)*>)?`,/~~~/g,2),i={keyword:`synchronized.abstract.private.var.static.if.const .for.while.strictfp.finally.protected.import.native.final.void.enum.else.break.transient.catch.instanceof.volatile.case.assert.package.default.public.try.switch.continue.throws.protected.public.private.module.requires.exports.do.sealed.yield.permits.goto.when`.split(`.`),literal:[`false`,`true`,`null`],type:[`char`,`boolean`,`long`,`float`,`int`,`byte`,`short`,`double`],built_in:[`super`,`this`]},a={className:`meta`,begin:`@`+n,contains:[{begin:/\(/,end:/\)/,contains:[`self`]}]},o={className:`params`,begin:/\(/,end:/\)/,keywords:i,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:`Java`,aliases:[`jsp`],keywords:i,illegal:/<\/|#/,contains:[e.COMMENT(`/\\*\\*`,`\\*/`,{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:`doctag`,begin:`@[A-Za-z]+`}]}),{begin:/import java\.[a-z]+\./,keywords:`import`,relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:`string`,contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:`keyword`,3:`title.class`}},{match:/non-sealed/,scope:`keyword`},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:`type`,3:`variable`,5:`operator`}},{begin:[/record/,/\s+/,n],className:{1:`keyword`,3:`title.class`},contains:[o,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:`new throw return else`,relevance:0},{begin:[`(?:`+r+`\\s+)`,e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:`title.function`},keywords:i,contains:[{className:`params`,begin:/\(/,end:/\)/,keywords:i,relevance:0,contains:[a,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,lx,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},lx,a]}}var fx=`[A-Za-z$_][0-9A-Za-z$_]*`,px=`as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using`.split(`.`),mx=[`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`],hx=`Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly`.split(`.`),gx=[`Error`,`EvalError`,`InternalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],_x=[`setInterval`,`setTimeout`,`clearInterval`,`clearTimeout`,`require`,`exports`,`eval`,`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,`escape`,`unescape`],vx=[`arguments`,`this`,`super`,`console`,`window`,`document`,`localStorage`,`sessionStorage`,`module`,`global`],yx=[].concat(_x,hx,gx);function bx(e){let t=e.regex,n=(e,{after:t})=>{let n=`</`+e[0].slice(1);return e.input.indexOf(n,t)!==-1},r=fx,i={begin:`<>`,end:`</>`},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{let r=e[0].length+e.index,i=e.input[r];if(i===`<`||i===`,`){t.ignoreMatch();return}i===`>`&&(n(e,{after:r})||t.ignoreMatch());let a,o=e.input.substring(r);((a=o.match(/^\s*=/))||(a=o.match(/^\s+extends\s+/))&&a.index===0)&&t.ignoreMatch()}},s={$pattern:fx,keyword:px,literal:mx,built_in:yx,"variable.language":vx},c=`[0-9](_?[0-9])*`,l=`\\.(${c})`,u=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,d={className:`number`,variants:[{begin:`(\\b(${u})((${l})|\\.)?|(${l}))[eE][+-]?(${c})\\b`},{begin:`\\b(${u})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*n?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*n?\\b`},{begin:`\\b0[0-7]+n?\\b`}],relevance:0},f={className:`subst`,begin:`\\$\\{`,end:`\\}`,keywords:s,contains:[]},p={begin:".?html`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`xml`}},m={begin:".?css`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`css`}},h={begin:".?gql`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`graphql`}},g={className:`string`,begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},_={className:`comment`,variants:[e.COMMENT(/\/\*\*(?!\/)/,`\\*/`,{relevance:0,contains:[{begin:`(?=@[A-Za-z]+)`,relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`},{className:`type`,begin:`\\{`,end:`\\}`,excludeEnd:!0,excludeBegin:!0,relevance:0},{className:`variable`,begin:r+`(?=\\s*(-)|$)`,endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:s,contains:[`self`].concat(v)});let y=[].concat(_,f.contains),b=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:[`self`].concat(y)}]),x={className:`params`,begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},S={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,`(`,t.concat(/\./,r),`)*`)],scope:{1:`keyword`,3:`title.class`,5:`keyword`,7:`title.class.inherited`}},{match:[/class/,/\s+/,r],scope:{1:`keyword`,3:`title.class`}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:`title.class`,keywords:{_:[...hx,...gx]}},w={label:`use_strict`,className:`meta`,relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:`keyword`,3:`title.function`},label:`func.def`,contains:[x],illegal:/%/},E={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`};function D(e){return t.concat(`(?!`,e.join(`|`),`)`)}let O={match:t.concat(/\b/,D([..._x,`super`,`import`,`await`].map(e=>`${e}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:`title.function`,relevance:0},k={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:`prototype`,className:`property`,relevance:0},A={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:`keyword`,3:`title.function`},contains:[{begin:/\(\)/},x]},j=`(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|`+e.UNDERSCORE_IDENT_RE+`)\\s*=>`,M={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(j)],keywords:`async`,className:{1:`keyword`,3:`title.function`},contains:[x]};return{name:`JavaScript`,aliases:[`js`,`jsx`,`mjs`,`cjs`],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:C},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:`shebang`,binary:`node`,relevance:5}),w,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,_,{match:/\$\d+/},d,C,{scope:`attr`,match:r+t.lookahead(`:`),relevance:0},M,{begin:`(`+e.RE_STARTERS_RE+`|\\b(case|return|throw)\\b)\\s*`,keywords:`return throw case`,relevance:0,contains:[_,e.REGEXP_MODE,{className:`function`,begin:j,returnBegin:!0,end:`\\s*=>`,contains:[{className:`params`,variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:`xml`,contains:[{begin:o.begin,end:o.end,skip:!0,contains:[`self`]}]}]},T,{beginKeywords:`while if switch catch for`},{begin:`\\b(?!function)`+e.UNDERSCORE_IDENT_RE+`\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{`,returnBegin:!0,label:`func.def`,contains:[x,e.inherit(e.TITLE_MODE,{begin:r,className:`title.function`})]},{match:/\.\.\./,relevance:0},k,{match:`\\$`+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:`title.function`},contains:[x]},O,E,S,A,{match:/\$[(.]/}]}}var xx={scope:`number`,match:`([-+]?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)|NaN|[-+]?Infinity`,relevance:0};function Sx(e){let t={className:`attr`,begin:/(("(\\.|[^\\"\r\n])*")|('(\\.|[^\\'\r\n])*'))(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:`punctuation`,relevance:0},r=[`true`,`false`,`null`],i={scope:`literal`,beginKeywords:r.join(` `)};return{name:`JSON`,aliases:[`jsonc`,`json5`],keywords:{literal:r},contains:[t,n,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,xx,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:`\\S`}}var Cx=`[0-9](_*[0-9])*`,wx=`\\.(${Cx})`,Tx=`[0-9a-fA-F](_*[0-9a-fA-F])*`,Ex={className:`number`,variants:[{begin:`(\\b(${Cx})((${wx})|\\.)?|(${wx}))[eE][+-]?(${Cx})[fFdD]?\\b`},{begin:`\\b(${Cx})((${wx})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${wx})[fFdD]?\\b`},{begin:`\\b(${Cx})[fFdD]\\b`},{begin:`\\b0[xX]((${Tx})\\.?|(${Tx})?\\.(${Tx}))[pP][+-]?(${Cx})[fFdD]?\\b`},{begin:`\\b(0|[1-9](_*[0-9])*)[lL]?\\b`},{begin:`\\b0[xX](${Tx})[lL]?\\b`},{begin:`\\b0(_*[0-7])*[lL]?\\b`},{begin:`\\b0[bB][01](_*[01])*[lL]?\\b`}],relevance:0};function Dx(e){let t={keyword:`abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual`,built_in:`Byte Short Char Int Long Boolean Float Double Void Unit Nothing`,literal:`true false null`},n={className:`keyword`,begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:`symbol`,begin:/@\w+/}]}},r={className:`symbol`,begin:e.UNDERSCORE_IDENT_RE+`@`},i={className:`subst`,begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},a={className:`variable`,begin:`\\$`+e.UNDERSCORE_IDENT_RE},o={className:`string`,variants:[{begin:`"""`,end:`"""(?=[^"])`,contains:[a,i]},{begin:`'`,end:`'`,illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:`"`,end:`"`,illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,a,i]}]};i.contains.push(o);let s={className:`meta`,begin:`@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*`+e.UNDERSCORE_IDENT_RE+`)?`},c={className:`meta`,begin:`@`+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(o,{className:`string`}),`self`]}]},l=Ex,u=e.COMMENT(`/\\*`,`\\*/`,{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:`type`,begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},f=d;return f.variants[1].contains=[d],d.variants[1].contains=[f],{name:`Kotlin`,aliases:[`kt`,`kts`],keywords:t,contains:[e.COMMENT(`/\\*\\*`,`\\*/`,{relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`}]}),e.C_LINE_COMMENT_MODE,u,n,r,s,c,{className:`function`,beginKeywords:`fun`,end:`[(]|$`,returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+`\\s*\\(`,returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:`type`,begin:/</,end:/>/,keywords:`reified`,relevance:0},{className:`params`,begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,u],relevance:0},e.C_LINE_COMMENT_MODE,u,s,c,o,e.C_NUMBER_MODE]},u]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:`title.class`},keywords:`class interface trait`,end:/[:\{(]|$/,excludeEnd:!0,illegal:`extends implements`,contains:[{beginKeywords:`public protected internal private constructor`},e.UNDERSCORE_TITLE_MODE,{className:`type`,begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:`type`,begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},s,c]},o,{className:`meta`,begin:`^#!/usr/bin/env`,end:`$`,illegal:`
|
|
64
|
-
`},l]}}var Ox=e=>({IMPORTANT:{scope:`meta`,begin:`!important`},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:`number`,begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:`number`,begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,4}(-[0-9A-Fa-f][0-9A-Fa-f]{0,4})?/},FUNCTION_DISPATCH:{className:`built_in`,begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:`selector-attr`,begin:/\[/,end:/\]/,illegal:`$`,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:`number`,begin:e.NUMBER_RE+`(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?`,relevance:0},CSS_VARIABLE:{className:`attr`,begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),kx=`a.abbr.address.article.aside.audio.b.blockquote.body.button.canvas.caption.cite.code.dd.del.details.dfn.div.dl.dt.em.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.html.i.iframe.img.input.ins.kbd.label.legend.li.main.mark.menu.nav.object.ol.optgroup.option.p.picture.q.quote.samp.section.select.source.span.strong.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.ul.var.video`.split(`.`),Ax=`defs.g.marker.mask.pattern.svg.switch.symbol.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feFlood.feGaussianBlur.feImage.feMerge.feMorphology.feOffset.feSpecularLighting.feTile.feTurbulence.linearGradient.radialGradient.stop.circle.ellipse.image.line.path.polygon.polyline.rect.text.use.textPath.tspan.foreignObject.clipPath`.split(`.`),jx=[...kx,...Ax],Mx=`any-hover.any-pointer.aspect-ratio.color.color-gamut.color-index.device-aspect-ratio.device-height.device-width.display-mode.forced-colors.grid.height.hover.inverted-colors.monochrome.orientation.overflow-block.overflow-inline.pointer.prefers-color-scheme.prefers-contrast.prefers-reduced-motion.prefers-reduced-transparency.resolution.scan.scripting.update.width.min-width.max-width.min-height.max-height`.split(`.`).sort().reverse(),Nx=`active.any-link.blank.checked.current.default.defined.dir.disabled.drop.empty.enabled.first.first-child.first-of-type.fullscreen.future.focus.focus-visible.focus-within.has.host.host-context.hover.indeterminate.in-range.invalid.is.lang.last-child.last-of-type.left.link.local-link.not.nth-child.nth-col.nth-last-child.nth-last-col.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.past.placeholder-shown.read-only.read-write.required.right.root.scope.target.target-within.user-invalid.valid.visited.where`.split(`.`).sort().reverse(),Px=[`after`,`backdrop`,`before`,`cue`,`cue-region`,`first-letter`,`first-line`,`grammar-error`,`marker`,`part`,`placeholder`,`selection`,`slotted`,`spelling-error`].sort().reverse(),Fx=`accent-color.align-content.align-items.align-self.alignment-baseline.all.anchor-name.animation.animation-composition.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-range.animation-range-end.animation-range-start.animation-timeline.animation-timing-function.appearance.aspect-ratio.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.block-size.border.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-end-end-radius.border-end-start-radius.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-start-end-radius.border-start-start-radius.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-align.box-decoration-break.box-direction.box-flex.box-flex-group.box-lines.box-ordinal-group.box-orient.box-pack.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.color-scheme.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.contain-intrinsic-block-size.contain-intrinsic-height.contain-intrinsic-inline-size.contain-intrinsic-size.contain-intrinsic-width.container.container-name.container-type.content.content-visibility.counter-increment.counter-reset.counter-set.cue.cue-after.cue-before.cursor.cx.cy.direction.display.dominant-baseline.empty-cells.enable-background.field-sizing.fill.fill-opacity.fill-rule.filter.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.flood-color.flood-opacity.flow.font.font-display.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-palette.font-size.font-size-adjust.font-smooth.font-smoothing.font-stretch.font-style.font-synthesis.font-synthesis-position.font-synthesis-small-caps.font-synthesis-style.font-synthesis-weight.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-emoji.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.forced-color-adjust.gap.glyph-orientation-horizontal.glyph-orientation-vertical.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphenate-character.hyphenate-limit-chars.hyphens.icon.image-orientation.image-rendering.image-resolution.ime-mode.initial-letter.initial-letter-align.inline-size.inset.inset-area.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.kerning.left.letter-spacing.lighting-color.line-break.line-height.line-height-step.list-style.list-style-image.list-style-position.list-style-type.margin.margin-block.margin-block-end.margin-block-start.margin-bottom.margin-inline.margin-inline-end.margin-inline-start.margin-left.margin-right.margin-top.margin-trim.marker.marker-end.marker-mid.marker-start.marks.mask.mask-border.mask-border-mode.mask-border-outset.mask-border-repeat.mask-border-slice.mask-border-source.mask-border-width.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.masonry-auto-flow.math-depth.math-shift.math-style.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.nav-down.nav-index.nav-left.nav-right.nav-up.none.normal.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-anchor.overflow-block.overflow-clip-margin.overflow-inline.overflow-wrap.overflow-x.overflow-y.overlay.overscroll-behavior.overscroll-behavior-block.overscroll-behavior-inline.overscroll-behavior-x.overscroll-behavior-y.padding.padding-block.padding-block-end.padding-block-start.padding-bottom.padding-inline.padding-inline-end.padding-inline-start.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.paint-order.pause.pause-after.pause-before.perspective.perspective-origin.place-content.place-items.place-self.pointer-events.position.position-anchor.position-visibility.print-color-adjust.quotes.r.resize.rest.rest-after.rest-before.right.rotate.row-gap.ruby-align.ruby-position.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-stop.scroll-snap-type.scroll-timeline.scroll-timeline-axis.scroll-timeline-name.scrollbar-color.scrollbar-gutter.scrollbar-width.shape-image-threshold.shape-margin.shape-outside.shape-rendering.speak.speak-as.src.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.table-layout.text-align.text-align-all.text-align-last.text-anchor.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-decoration-thickness.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-indent.text-justify.text-orientation.text-overflow.text-rendering.text-shadow.text-size-adjust.text-transform.text-underline-offset.text-underline-position.text-wrap.text-wrap-mode.text-wrap-style.timeline-scope.top.touch-action.transform.transform-box.transform-origin.transform-style.transition.transition-behavior.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.unicode-range.user-modify.user-select.vector-effect.vertical-align.view-timeline.view-timeline-axis.view-timeline-inset.view-timeline-name.view-transition-name.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.white-space.white-space-collapse.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.x.y.z-index.zoom`.split(`.`).sort().reverse(),Ix=Nx.concat(Px).sort().reverse();function Lx(e){let t=Ox(e),n=Ix,r=`([\\w-]+|@\\{[\\w-]+\\})`,i=[],a=[],o=function(e){return{className:`string`,begin:`~?`+e+`.*?`+e}},s=function(e,t,n){return{className:e,begin:t,relevance:n}},c={$pattern:/[a-z-]+/,keyword:`and or not only`,attribute:Mx.join(` `)},l={begin:`\\(`,end:`\\)`,contains:a,keywords:c,relevance:0};a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,o(`'`),o(`"`),t.CSS_NUMBER_MODE,{begin:`(url|data-uri)\\(`,starts:{className:`string`,end:`[\\)\\n]`,excludeEnd:!0}},t.UNICODE_RANGE,t.HEXCOLOR,l,s(`variable`,`@@?[\\w-]+`,10),s(`variable`,`@\\{[\\w-]+\\}`),s(`built_in`,"~?`[^`]*?`"),{className:`attribute`,begin:`[\\w-]+\\s*:`,end:`:`,returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:`and not`},t.FUNCTION_DISPATCH);let u=a.concat({begin:/\{/,end:/\}/,contains:i}),d={beginKeywords:`when`,endsWithParent:!0,contains:[{beginKeywords:`and not`}].concat(a)},f={begin:r+`\\s*:`,returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:`attribute`,begin:`\\b(`+Fx.join(`|`)+`)\\b`,end:/(?=:)/,starts:{endsWithParent:!0,illegal:`[<=$]`,relevance:0,contains:a}}]},p={className:`keyword`,begin:`@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b`,starts:{end:`[;{}]`,keywords:c,returnEnd:!0,contains:a,relevance:0}},m={className:`variable`,variants:[{begin:`@[\\w-]+\\s*:`,relevance:15},{begin:`@[\\w-]+`}],starts:{end:`[;}]`,returnEnd:!0,contains:u}},h={variants:[{begin:`[\\.#:&\\[>]`,end:`[;{}]`},{begin:r,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,d,s(`keyword`,`all\\b`),s(`variable`,`@\\{[\\w-]+\\}`),{begin:`\\b(`+jx.join(`|`)+`)\\b`,className:`selector-tag`},t.CSS_NUMBER_MODE,s(`selector-tag`,r,0),s(`selector-id`,`#`+r),s(`selector-class`,`\\.`+r,0),s(`selector-tag`,`&`,0),t.ATTRIBUTE_SELECTOR_MODE,{className:`selector-pseudo`,begin:`:(`+Nx.join(`|`)+`)`},{className:`selector-pseudo`,begin:`:(:)?(`+Px.join(`|`)+`)`},{begin:/\(/,end:/\)/,relevance:0,contains:u},{begin:`!important`},t.FUNCTION_DISPATCH]},g={begin:`[\\w-]+:(:)?(${n.join(`|`)})`,returnBegin:!0,contains:[h]};return i.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p,m,g,f,h,d,t.FUNCTION_DISPATCH),{name:`Less`,case_insensitive:!0,illegal:`[=>'/<($"]`,contains:i}}function Rx(e){let t=`\\[=*\\[`,n=`\\]=*\\]`,r={begin:t,end:n,contains:[`self`]},i=[e.COMMENT(`--(?!\\[=*\\[)`,`$`),e.COMMENT(`--\\[=*\\[`,n,{contains:[r],relevance:10})];return{name:`Lua`,aliases:[`pluto`],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:`true false nil`,keyword:`and break do else elseif end for goto if in local not or repeat return then until while`,built_in:`_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove`},contains:i.concat([{className:`function`,beginKeywords:`function`,end:`\\)`,contains:[e.inherit(e.TITLE_MODE,{begin:`([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*`}),{className:`params`,begin:`\\(`,endsWithParent:!0,contains:i}].concat(i)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:`string`,begin:t,end:n,contains:[r],relevance:5}])}}function zx(e){let t={className:`variable`,variants:[{begin:`\\$\\(`+e.UNDERSCORE_IDENT_RE+`\\)`,contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:`string`,begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},r={className:`variable`,begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:`subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value`},contains:[t,n]},i={begin:`^`+e.UNDERSCORE_IDENT_RE+`\\s*(?=[:+?]?=)`},a={className:`meta`,begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:`.PHONY`}},o={className:`section`,begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:`Makefile`,aliases:[`mk`,`mak`,`make`],keywords:{$pattern:/[\w-]+/,keyword:`define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath`},contains:[e.HASH_COMMENT_MODE,t,n,r,i,a,o]}}function Bx(e){let t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:`>`,subLanguage:`xml`,relevance:0},r={begin:`^[-\\*]{3,}`,end:`$`},i={className:`code`,variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:`(~{3,})[^~](.|\\n)*?\\1~*[ ]*`},{begin:"```",end:"```+[ ]*$"},{begin:`~~~`,end:`~~~+[ ]*$`},{begin:"`.+?`"},{begin:`(?=^( {4}|\\t))`,contains:[{begin:`^( {4}|\\t)`,end:`(\\n)$`}],relevance:0}]},a={className:`bullet`,begin:`^[ ]*([*+-]|(\\d+\\.))(?=\\s+)`,end:`\\s+`,excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:`symbol`,begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:`link`,begin:/:\s*/,end:/$/,excludeBegin:!0}]},s={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:`string`,relevance:0,begin:`\\[`,end:`\\]`,excludeBegin:!0,returnEnd:!0},{className:`link`,relevance:0,begin:`\\]\\(`,end:`\\)`,excludeBegin:!0,excludeEnd:!0},{className:`symbol`,relevance:0,begin:`\\]\\[`,end:`\\]`,excludeBegin:!0,excludeEnd:!0}]},c={className:`strong`,contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},l={className:`emphasis`,contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},u=e.inherit(c,{contains:[]}),d=e.inherit(l,{contains:[]});c.contains.push(d),l.contains.push(u);let f=[n,s];return[c,l,u,d].forEach(e=>{e.contains=e.contains.concat(f)}),f=f.concat(c,l),{name:`Markdown`,aliases:[`md`,`mkdown`,`mkd`],contains:[{className:`section`,variants:[{begin:`^#{1,6}`,end:`$`,contains:f},{begin:`(?=^.+?\\n[=-]{2,}$)`,contains:[{begin:`^[=-]*$`},{begin:`^`,end:`\\n`,contains:f}]}]},n,a,c,l,{className:`quote`,begin:`^>\\s+`,contains:f,end:`$`},i,r,s,o,{scope:`literal`,match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function Vx(e){let t={className:`built_in`,begin:`\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+`},n=/[a-zA-Z@][a-zA-Z0-9_]*/,r={"variable.language":[`this`,`super`],$pattern:n,keyword:`while.export.sizeof.typedef.const.struct.for.union.volatile.static.mutable.if.do.return.goto.enum.else.break.extern.asm.case.default.register.explicit.typename.switch.continue.inline.readonly.assign.readwrite.self.@synchronized.id.typeof.nonatomic.IBOutlet.IBAction.strong.weak.copy.in.out.inout.bycopy.byref.oneway.__strong.__weak.__block.__autoreleasing.@private.@protected.@public.@try.@property.@end.@throw.@catch.@finally.@autoreleasepool.@synthesize.@dynamic.@selector.@optional.@required.@encode.@package.@import.@defs.@compatibility_alias.__bridge.__bridge_transfer.__bridge_retained.__bridge_retain.__covariant.__contravariant.__kindof._Nonnull._Nullable._Null_unspecified.__FUNCTION__.__PRETTY_FUNCTION__.__attribute__.getter.setter.retain.unsafe_unretained.nonnull.nullable.null_unspecified.null_resettable.class.instancetype.NS_DESIGNATED_INITIALIZER.NS_UNAVAILABLE.NS_REQUIRES_SUPER.NS_RETURNS_INNER_POINTER.NS_INLINE.NS_AVAILABLE.NS_DEPRECATED.NS_ENUM.NS_OPTIONS.NS_SWIFT_UNAVAILABLE.NS_ASSUME_NONNULL_BEGIN.NS_ASSUME_NONNULL_END.NS_REFINED_FOR_SWIFT.NS_SWIFT_NAME.NS_SWIFT_NOTHROW.NS_DURING.NS_HANDLER.NS_ENDHANDLER.NS_VALUERETURN.NS_VOIDRETURN`.split(`.`),literal:[`false`,`true`,`FALSE`,`TRUE`,`nil`,`YES`,`NO`,`NULL`],built_in:[`dispatch_once_t`,`dispatch_queue_t`,`dispatch_sync`,`dispatch_async`,`dispatch_once`],type:[`int`,`float`,`char`,`unsigned`,`signed`,`short`,`long`,`double`,`wchar_t`,`unichar`,`void`,`bool`,`BOOL`,`id|0`,`_Bool`]},i={$pattern:n,keyword:[`@interface`,`@class`,`@protocol`,`@implementation`]};return{name:`Objective-C`,aliases:[`mm`,`objc`,`obj-c`,`obj-c++`,`objective-c++`],keywords:r,illegal:`</`,contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:`string`,variants:[{begin:`@"`,end:`"`,illegal:`\\n`,contains:[e.BACKSLASH_ESCAPE]}]},{className:`meta`,begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:`if else elif endif define undef warning error line pragma ifdef ifndef include`},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:`string`}),{className:`string`,begin:/<.*?>/,end:/$/,illegal:`\\n`},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:`class`,begin:`(`+i.keyword.join(`|`)+`)\\b`,end:/(\{|$)/,excludeEnd:!0,keywords:i,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:`\\.`+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function Hx(e){let t=e.regex,n=`abs.accept.alarm.and.atan2.bind.binmode.bless.break.caller.chdir.chmod.chomp.chop.chown.chr.chroot.class.close.closedir.connect.continue.cos.crypt.dbmclose.dbmopen.defined.delete.die.do.dump.each.else.elsif.endgrent.endhostent.endnetent.endprotoent.endpwent.endservent.eof.eval.exec.exists.exit.exp.fcntl.field.fileno.flock.for.foreach.fork.format.formline.getc.getgrent.getgrgid.getgrnam.gethostbyaddr.gethostbyname.gethostent.getlogin.getnetbyaddr.getnetbyname.getnetent.getpeername.getpgrp.getpriority.getprotobyname.getprotobynumber.getprotoent.getpwent.getpwnam.getpwuid.getservbyname.getservbyport.getservent.getsockname.getsockopt.given.glob.gmtime.goto.grep.gt.hex.if.index.int.ioctl.join.keys.kill.last.lc.lcfirst.length.link.listen.local.localtime.log.lstat.lt.ma.map.method.mkdir.msgctl.msgget.msgrcv.msgsnd.my.ne.next.no.not.oct.open.opendir.or.ord.our.pack.package.pipe.pop.pos.print.printf.prototype.push.q|0.qq.quotemeta.qw.qx.rand.read.readdir.readline.readlink.readpipe.recv.redo.ref.rename.require.reset.return.reverse.rewinddir.rindex.rmdir.say.scalar.seek.seekdir.select.semctl.semget.semop.send.setgrent.sethostent.setnetent.setpgrp.setpriority.setprotoent.setpwent.setservent.setsockopt.shift.shmctl.shmget.shmread.shmwrite.shutdown.sin.sleep.socket.socketpair.sort.splice.split.sprintf.sqrt.srand.stat.state.study.sub.substr.symlink.syscall.sysopen.sysread.sysseek.system.syswrite.tell.telldir.tie.tied.time.times.tr.truncate.uc.ucfirst.umask.undef.unless.unlink.unpack.unshift.untie.until.use.utime.values.vec.wait.waitpid.wantarray.warn.when.while.write.x|0.xor.y|0`.split(`.`),r=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:n.join(` `)},a={className:`subst`,begin:`[$@]\\{`,end:`\\}`,keywords:i},o={begin:/->\{/,end:/\}/},s={scope:`attr`,match:/\s+:\s*\w+(\s*\(.*?\))?/},c={scope:`variable`,variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,`(?![A-Za-z])(?![@$%])`)},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[s]},l={className:`number`,variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},u=[e.BACKSLASH_ESCAPE,a,c],d=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],f=(e,n,i=`\\1`)=>{let a=i===`\\1`?i:t.concat(i,n);return t.concat(t.concat(`(?:`,e,`)`),n,/(?:\\.|[^\\\/])*?/,a,/(?:\\.|[^\\\/])*?/,i,r)},p=(e,n,i)=>t.concat(t.concat(`(?:`,e,`)`),n,/(?:\\.|[^\\\/])*?/,i,r),m=[c,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:`string`,contains:u,variants:[{begin:`q[qwxr]?\\s*\\(`,end:`\\)`,relevance:5},{begin:`q[qwxr]?\\s*\\[`,end:`\\]`,relevance:5},{begin:`q[qwxr]?\\s*\\{`,end:`\\}`,relevance:5},{begin:`q[qwxr]?\\s*\\|`,end:`\\|`,relevance:5},{begin:`q[qwxr]?\\s*<`,end:`>`,relevance:5},{begin:`qw\\s+q`,end:`q`,relevance:5},{begin:`'`,end:`'`,contains:[e.BACKSLASH_ESCAPE]},{begin:`"`,end:`"`},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:`-?\\w+\\s*=>`,relevance:0}]},l,{begin:`(\\/\\/|`+e.RE_STARTERS_RE+`|\\b(split|return|print|reverse|grep)\\b)\\s*`,keywords:`split return print reverse grep`,relevance:0,contains:[e.HASH_COMMENT_MODE,{className:`regexp`,variants:[{begin:f(`s|tr|y`,t.either(...d,{capture:!0}))},{begin:f(`s|tr|y`,`\\(`,`\\)`)},{begin:f(`s|tr|y`,`\\[`,`\\]`)},{begin:f(`s|tr|y`,`\\{`,`\\}`)}],relevance:2},{className:`regexp`,variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:p(`(?:m|qr)?`,/\//,/\//)},{begin:p(`m|qr`,t.either(...d,{capture:!0}),/\1/)},{begin:p(`m|qr`,/\(/,/\)/)},{begin:p(`m|qr`,/\[/,/\]/)},{begin:p(`m|qr`,/\{/,/\}/)}]}]},{className:`function`,beginKeywords:`sub method`,end:`(\\s*\\(.*?\\))?[;{]`,excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,s]},{className:`class`,beginKeywords:`class`,end:`[;{]`,excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,s,l]},{begin:`-\\w\\b`,relevance:0},{begin:`^__DATA__$`,end:`^__END__$`,subLanguage:`mojolicious`,contains:[{begin:`^@@.*`,end:`$`,className:`comment`}]}];return a.contains=m,o.contains=m,{name:`Perl`,aliases:[`pl`,`pm`],keywords:i,contains:m}}function Ux(e){let t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),i=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),a=t.concat(/[A-Z]+/,n),o={scope:`variable`,match:`\\$+`+r},s={scope:`meta`,variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},c={scope:`subst`,variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},l=e.inherit(e.APOS_STRING_MODE,{illegal:null}),u=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(c)}),d={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(c),"on:begin":(e,t)=>{t.data._beginMatch=e[1]||e[2]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}},f=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),p=`[
|
|
65
|
-
]`,m={scope:`string`,variants:[u,l,d,f]},h={scope:`number`,variants:[{begin:`\\b0[bB][01]+(?:_[01]+)*\\b`},{begin:`\\b0[oO][0-7]+(?:_[0-7]+)*\\b`},{begin:`\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b`},{begin:`(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?`}],relevance:0},g=[`false`,`null`,`true`],_=`__CLASS__.__DIR__.__FILE__.__FUNCTION__.__COMPILER_HALT_OFFSET__.__LINE__.__METHOD__.__NAMESPACE__.__TRAIT__.die.echo.exit.include.include_once.print.require.require_once.array.abstract.and.as.binary.bool.boolean.break.callable.case.catch.class.clone.const.continue.declare.default.do.double.else.elseif.empty.enddeclare.endfor.endforeach.endif.endswitch.endwhile.enum.eval.extends.final.finally.float.for.foreach.from.global.goto.if.implements.instanceof.insteadof.int.integer.interface.isset.iterable.list.match|0.mixed.new.never.object.or.private.protected.public.readonly.real.return.string.switch.throw.trait.try.unset.use.var.void.while.xor.yield`.split(`.`),v=`Error|0.AppendIterator.ArgumentCountError.ArithmeticError.ArrayIterator.ArrayObject.AssertionError.BadFunctionCallException.BadMethodCallException.CachingIterator.CallbackFilterIterator.CompileError.Countable.DirectoryIterator.DivisionByZeroError.DomainException.EmptyIterator.ErrorException.Exception.FilesystemIterator.FilterIterator.GlobIterator.InfiniteIterator.InvalidArgumentException.IteratorIterator.LengthException.LimitIterator.LogicException.MultipleIterator.NoRewindIterator.OutOfBoundsException.OutOfRangeException.OuterIterator.OverflowException.ParentIterator.ParseError.RangeException.RecursiveArrayIterator.RecursiveCachingIterator.RecursiveCallbackFilterIterator.RecursiveDirectoryIterator.RecursiveFilterIterator.RecursiveIterator.RecursiveIteratorIterator.RecursiveRegexIterator.RecursiveTreeIterator.RegexIterator.RuntimeException.SeekableIterator.SplDoublyLinkedList.SplFileInfo.SplFileObject.SplFixedArray.SplHeap.SplMaxHeap.SplMinHeap.SplObjectStorage.SplObserver.SplPriorityQueue.SplQueue.SplStack.SplSubject.SplTempFileObject.TypeError.UnderflowException.UnexpectedValueException.UnhandledMatchError.ArrayAccess.BackedEnum.Closure.Fiber.Generator.Iterator.IteratorAggregate.Serializable.Stringable.Throwable.Traversable.UnitEnum.WeakReference.WeakMap.Directory.__PHP_Incomplete_Class.parent.php_user_filter.self.static.stdClass`.split(`.`),y={keyword:_,literal:(e=>{let t=[];return e.forEach(e=>{t.push(e),e.toLowerCase()===e?t.push(e.toUpperCase()):t.push(e.toLowerCase())}),t})(g),built_in:v},b=e=>e.map(e=>e.replace(/\|\d+$/,``)),x={variants:[{match:[/new/,t.concat(p,`+`),t.concat(`(?!`,b(v).join(`\\b|`),`\\b)`),i],scope:{1:`keyword`,4:`title.class`}}]},S=t.concat(r,`\\b(?!\\()`),C={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),S],scope:{2:`variable.constant`}},{match:[/::/,/class/],scope:{2:`variable.language`}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),S],scope:{1:`title.class`,3:`variable.constant`}},{match:[i,t.concat(`::`,t.lookahead(/(?!class\b)/))],scope:{1:`title.class`}},{match:[i,/::/,/class/],scope:{1:`title.class`,3:`variable.language`}}]},w={scope:`attr`,match:t.concat(r,t.lookahead(`:`),t.lookahead(/(?!::)/))},T={relevance:0,begin:/\(/,end:/\)/,keywords:y,contains:[w,o,C,e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,m,h,x]},E={relevance:0,match:[/\b/,t.concat(`(?!fn\\b|function\\b|`,b(_).join(`\\b|`),`|`,b(v).join(`\\b|`),`\\b)`),r,t.concat(p,`*`),t.lookahead(/(?=\()/)],scope:{3:`title.function.invoke`},contains:[T]};T.contains.push(E);let D=[w,C,e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,m,h,x],O={begin:t.concat(/#\[\s*\\?/,t.either(i,a)),beginScope:`meta`,end:/]/,endScope:`meta`,keywords:{literal:g,keyword:[`new`,`array`]},contains:[{begin:/\[/,end:/]/,keywords:{literal:g,keyword:[`new`,`array`]},contains:[`self`,...D]},...D,{scope:`meta`,variants:[{match:i},{match:a}]}]};return{case_insensitive:!1,keywords:y,contains:[O,e.HASH_COMMENT_MODE,e.COMMENT(`//`,`$`),e.COMMENT(`/\\*`,`\\*/`,{contains:[{scope:`doctag`,match:`@[A-Za-z]+`}]}),{match:/__halt_compiler\(\);/,keywords:`__halt_compiler`,starts:{scope:`comment`,end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:`meta`,endsParent:!0}]}},s,{scope:`variable.language`,match:/\$this\b/},o,E,C,{match:[/const/,/\s/,r],scope:{1:`keyword`,3:`variable.constant`}},x,{scope:`function`,relevance:0,beginKeywords:`fn function`,end:/[;{]/,excludeEnd:!0,illegal:`[$%\\[]`,contains:[{beginKeywords:`use`},e.UNDERSCORE_TITLE_MODE,{begin:`=>`,endsParent:!0},{scope:`params`,begin:`\\(`,end:`\\)`,excludeBegin:!0,excludeEnd:!0,keywords:y,contains:[`self`,O,o,C,e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,m,h]}]},{scope:`class`,variants:[{beginKeywords:`enum`,illegal:/[($"]/},{beginKeywords:`class interface trait`,illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:`extends implements`},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:`namespace`,relevance:0,end:`;`,illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:`title.class`})]},{beginKeywords:`use`,relevance:0,end:`;`,contains:[{match:/\b(as|const|function)\b/,scope:`keyword`},e.UNDERSCORE_TITLE_MODE]},m,h]}}function Wx(e){return{name:`PHP template`,subLanguage:`xml`,contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:`php`,contains:[{begin:`/\\*`,end:`\\*/`,skip:!0},{begin:`b"`,end:`"`,skip:!0},{begin:`b'`,end:`'`,skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function Gx(e){return{name:`Plain text`,aliases:[`text`,`txt`],disableAutodetect:!0}}function Kx(e){let t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=`and.as.assert.async.await.break.case.class.continue.def.del.elif.else.except.finally.for.from.global.if.import.in.is.lambda.match.nonlocal|10.not.or.pass.raise.return.try.while.with.yield`.split(`.`),i={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:`__import__.abs.all.any.ascii.bin.bool.breakpoint.bytearray.bytes.callable.chr.classmethod.compile.complex.delattr.dict.dir.divmod.enumerate.eval.exec.filter.float.format.frozenset.getattr.globals.hasattr.hash.help.hex.id.input.int.isinstance.issubclass.iter.len.list.locals.map.max.memoryview.min.next.object.oct.open.ord.pow.print.property.range.repr.reversed.round.set.setattr.slice.sorted.staticmethod.str.sum.super.tuple.type.vars.zip`.split(`.`),literal:[`__debug__`,`Ellipsis`,`False`,`None`,`NotImplemented`,`True`],type:[`Any`,`Callable`,`Coroutine`,`Dict`,`List`,`Literal`,`Generic`,`Optional`,`Sequence`,`Set`,`Tuple`,`Type`,`Union`]},a={className:`meta`,begin:/^(>>>|\.\.\.) /},o={className:`subst`,begin:/\{/,end:/\}/,keywords:i,illegal:/#/},s={begin:/\{\{/,relevance:0},c={className:`string`,contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a,s,o]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a,s,o]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,s,o]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,o]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},l=`[0-9](_?[0-9])*`,u=`(\\b(${l}))?\\.(${l})|\\b(${l})\\.`,d=`\\b|${r.join(`|`)}`,f={className:`number`,relevance:0,variants:[{begin:`(\\b(${l})|(${u}))[eE][+-]?(${l})[jJ]?(?=${d})`},{begin:`(${u})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${d})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${d})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${d})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${d})`},{begin:`\\b(${l})[jJ](?=${d})`}]},p={className:`comment`,begin:t.lookahead(/# type:/),end:/$/,keywords:i,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},m={className:`params`,variants:[{className:``,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:[`self`,a,f,c,e.HASH_COMMENT_MODE]}]};return o.contains=[c,f,a],{name:`Python`,aliases:[`py`,`gyp`,`ipython`],unicodeRegex:!0,keywords:i,illegal:/(<\/|\?)|=>/,contains:[a,f,{scope:`variable.language`,match:/\bself\b/},{beginKeywords:`if`,relevance:0},{match:/\bor\b/,scope:`keyword`},c,p,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:`keyword`,3:`title.function`},contains:[m]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:`keyword`,3:`title.class`,6:`title.class.inherited`}},{className:`meta`,begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[f,m,c]}]}}function qx(e){return{aliases:[`pycon`],contains:[{className:`meta.prompt`,starts:{end:/ |$/,starts:{end:`$`,subLanguage:`python`}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function Jx(e){let t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,a=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:`R`,keywords:{$pattern:n,keyword:`function if in break next repeat else for while`,literal:`NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10`,built_in:`LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm`},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:`doctag`,match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:`doctag`,begin:`@param`,end:/$/,contains:[{scope:`variable`,variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:`doctag`,match:/@[a-zA-Z]+/},{scope:`keyword`,match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:`string`,contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:`"`,end:`"`,relevance:0},{begin:`'`,end:`'`,relevance:0}]},{relevance:0,variants:[{scope:{1:`operator`,2:`number`},match:[i,r]},{scope:{1:`operator`,2:`number`},match:[/%[^%]*%/,r]},{scope:{1:`punctuation`,2:`number`},match:[a,r]},{scope:{2:`number`},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:`operator`},match:[n,/\s+/,/<-/,/\s+/]},{scope:`operator`,relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:`punctuation`,relevance:0,match:a},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function Yx(e){let t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=t.concat(r,/(::\w+)*/),a={"variable.constant":[`__FILE__`,`__LINE__`,`__ENCODING__`],"variable.language":[`self`,`super`],keyword:`alias.and.begin.BEGIN.break.case.class.defined.do.else.elsif.end.END.ensure.for.if.in.module.next.not.or.redo.require.rescue.retry.return.then.undef.unless.until.when.while.yield.include.extend.prepend.public.private.protected.raise.throw`.split(`.`),built_in:[`proc`,`lambda`,`attr_accessor`,`attr_reader`,`attr_writer`,`define_method`,`private_constant`,`module_function`],literal:[`true`,`false`,`nil`]},o={className:`doctag`,begin:`@[A-Za-z]+`},s={begin:`#<`,end:`>`},c=[e.COMMENT(`#`,`$`,{contains:[o]}),e.COMMENT(`^=begin`,`^=end`,{contains:[o],relevance:10}),e.COMMENT(`^__END__`,e.MATCH_NOTHING_RE)],l={className:`subst`,begin:/#\{/,end:/\}/,keywords:a},u={className:`string`,contains:[e.BACKSLASH_ESCAPE,l],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,l]})]}]},d=`[0-9](_?[0-9])*`,f={className:`number`,relevance:0,variants:[{begin:`\\b([1-9](_?[0-9])*|0)(\\.(${d}))?([eE][+-]?(${d})|r)?i?\\b`},{begin:`\\b0[dD][0-9](_?[0-9])*r?i?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*r?i?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*r?i?\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b`},{begin:`\\b0(_?[0-7])+r?i?\\b`}]},p={variants:[{match:/\(\)/},{className:`params`,begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:a}]},m=[u,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:`title.class`,4:`title.class.inherited`},keywords:a},{match:[/(include|extend)\s+/,i],scope:{2:`title.class`},keywords:a},{relevance:0,match:[i,/\.new[. (]/],scope:{1:`title.class`}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`},{relevance:0,match:r,scope:`title.class`},{match:[/def/,/\s+/,n],scope:{1:`keyword`,3:`title.function`},contains:[p]},{begin:e.IDENT_RE+`::`},{className:`symbol`,begin:e.UNDERSCORE_IDENT_RE+`(!|\\?)?:`,relevance:0},{className:`symbol`,begin:`:(?!\\s)`,contains:[u,{begin:n}],relevance:0},f,{className:`variable`,begin:`(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])`},{className:`params`,begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:a},{begin:`(`+e.RE_STARTERS_RE+`|unless)\\s*`,keywords:`unless`,contains:[{className:`regexp`,contains:[e.BACKSLASH_ESCAPE,l],illegal:/\n/,variants:[{begin:`/`,end:`/[a-z]*`},{begin:/%r\{/,end:/\}[a-z]*/},{begin:`%r\\(`,end:`\\)[a-z]*`},{begin:`%r!`,end:`![a-z]*`},{begin:`%r\\[`,end:`\\][a-z]*`}]}].concat(s,c),relevance:0}].concat(s,c);l.contains=m,p.contains=m;let h=[{begin:/^\s*=>/,starts:{end:`$`,contains:m}},{className:`meta.prompt`,begin:`^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])`,starts:{end:`$`,keywords:a,contains:m}}];return c.unshift(s),{name:`Ruby`,aliases:[`rb`,`gemspec`,`podspec`,`thor`,`irb`],keywords:a,illegal:/\/\*/,contains:[e.SHEBANG({binary:`ruby`})].concat(h,c,m)}}function Xx(e){let t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),i=t.concat(n,e.IDENT_RE),a={className:`title.function.invoke`,relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,i,t.lookahead(/\s*\(/))},o=`([ui](8|16|32|64|128|size)|f(32|64))?`,s=`abstract.as.async.await.become.box.break.const.continue.crate.do.dyn.else.enum.extern.false.final.fn.for.if.impl.in.let.loop.macro.match.mod.move.mut.override.priv.pub.ref.return.self.Self.static.struct.super.trait.true.try.type.typeof.union.unsafe.unsized.use.virtual.where.while.yield`.split(`.`),c=[`true`,`false`,`Some`,`None`,`Ok`,`Err`],l=`drop .Copy.Send.Sized.Sync.Drop.Fn.FnMut.FnOnce.ToOwned.Clone.Debug.PartialEq.PartialOrd.Eq.Ord.AsRef.AsMut.Into.From.Default.Iterator.Extend.IntoIterator.DoubleEndedIterator.ExactSizeIterator.SliceConcatExt.ToString.assert!.assert_eq!.bitflags!.bytes!.cfg!.col!.concat!.concat_idents!.debug_assert!.debug_assert_eq!.env!.eprintln!.panic!.file!.format!.format_args!.include_bytes!.include_str!.line!.local_data_key!.module_path!.option_env!.print!.println!.select!.stringify!.try!.unimplemented!.unreachable!.vec!.write!.writeln!.macro_rules!.assert_ne!.debug_assert_ne!`.split(`.`),u=[`i8`,`i16`,`i32`,`i64`,`i128`,`isize`,`u8`,`u16`,`u32`,`u64`,`u128`,`usize`,`f32`,`f64`,`str`,`char`,`bool`,`Box`,`Option`,`Result`,`String`,`Vec`];return{name:`Rust`,aliases:[`rs`],keywords:{$pattern:e.IDENT_RE+`!?`,type:u,keyword:s,literal:c,built_in:l},illegal:`</`,contains:[e.C_LINE_COMMENT_MODE,e.COMMENT(`/\\*`,`\\*/`,{contains:[`self`]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:`symbol`,begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:`string`,variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:`char.escape`,match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:`number`,variants:[{begin:`\\b0b([01_]+)`+o},{begin:`\\b0o([0-7_]+)`+o},{begin:`\\b0x([A-Fa-f0-9_]+)`+o},{begin:`\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)`+o}],relevance:0},{begin:[/fn/,/\s+/,r],className:{1:`keyword`,3:`title.function`}},{className:`meta`,begin:`#!?\\[`,end:`\\]`,contains:[{className:`string`,begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],className:{1:`keyword`,3:`keyword`,4:`variable`}},{begin:[/for/,/\s+/,r,/\s+/,/in/],className:{1:`keyword`,3:`variable`,5:`keyword`}},{begin:[/type/,/\s+/,r],className:{1:`keyword`,3:`title.class`}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],className:{1:`keyword`,3:`title.class`}},{begin:e.IDENT_RE+`::`,keywords:{keyword:`Self`,built_in:l,type:u}},{className:`punctuation`,begin:`->`},a]}}var Zx=e=>({IMPORTANT:{scope:`meta`,begin:`!important`},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:`number`,begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:`number`,begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,4}(-[0-9A-Fa-f][0-9A-Fa-f]{0,4})?/},FUNCTION_DISPATCH:{className:`built_in`,begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:`selector-attr`,begin:/\[/,end:/\]/,illegal:`$`,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:`number`,begin:e.NUMBER_RE+`(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?`,relevance:0},CSS_VARIABLE:{className:`attr`,begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Qx=`a.abbr.address.article.aside.audio.b.blockquote.body.button.canvas.caption.cite.code.dd.del.details.dfn.div.dl.dt.em.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.html.i.iframe.img.input.ins.kbd.label.legend.li.main.mark.menu.nav.object.ol.optgroup.option.p.picture.q.quote.samp.section.select.source.span.strong.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.ul.var.video`.split(`.`),$x=`defs.g.marker.mask.pattern.svg.switch.symbol.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feFlood.feGaussianBlur.feImage.feMerge.feMorphology.feOffset.feSpecularLighting.feTile.feTurbulence.linearGradient.radialGradient.stop.circle.ellipse.image.line.path.polygon.polyline.rect.text.use.textPath.tspan.foreignObject.clipPath`.split(`.`),eS=[...Qx,...$x],tS=`any-hover.any-pointer.aspect-ratio.color.color-gamut.color-index.device-aspect-ratio.device-height.device-width.display-mode.forced-colors.grid.height.hover.inverted-colors.monochrome.orientation.overflow-block.overflow-inline.pointer.prefers-color-scheme.prefers-contrast.prefers-reduced-motion.prefers-reduced-transparency.resolution.scan.scripting.update.width.min-width.max-width.min-height.max-height`.split(`.`).sort().reverse(),nS=`active.any-link.blank.checked.current.default.defined.dir.disabled.drop.empty.enabled.first.first-child.first-of-type.fullscreen.future.focus.focus-visible.focus-within.has.host.host-context.hover.indeterminate.in-range.invalid.is.lang.last-child.last-of-type.left.link.local-link.not.nth-child.nth-col.nth-last-child.nth-last-col.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.past.placeholder-shown.read-only.read-write.required.right.root.scope.target.target-within.user-invalid.valid.visited.where`.split(`.`).sort().reverse(),rS=[`after`,`backdrop`,`before`,`cue`,`cue-region`,`first-letter`,`first-line`,`grammar-error`,`marker`,`part`,`placeholder`,`selection`,`slotted`,`spelling-error`].sort().reverse(),iS=`accent-color.align-content.align-items.align-self.alignment-baseline.all.anchor-name.animation.animation-composition.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-range.animation-range-end.animation-range-start.animation-timeline.animation-timing-function.appearance.aspect-ratio.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.block-size.border.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-end-end-radius.border-end-start-radius.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-start-end-radius.border-start-start-radius.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-align.box-decoration-break.box-direction.box-flex.box-flex-group.box-lines.box-ordinal-group.box-orient.box-pack.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.color-scheme.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.contain-intrinsic-block-size.contain-intrinsic-height.contain-intrinsic-inline-size.contain-intrinsic-size.contain-intrinsic-width.container.container-name.container-type.content.content-visibility.counter-increment.counter-reset.counter-set.cue.cue-after.cue-before.cursor.cx.cy.direction.display.dominant-baseline.empty-cells.enable-background.field-sizing.fill.fill-opacity.fill-rule.filter.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.flood-color.flood-opacity.flow.font.font-display.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-palette.font-size.font-size-adjust.font-smooth.font-smoothing.font-stretch.font-style.font-synthesis.font-synthesis-position.font-synthesis-small-caps.font-synthesis-style.font-synthesis-weight.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-emoji.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.forced-color-adjust.gap.glyph-orientation-horizontal.glyph-orientation-vertical.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphenate-character.hyphenate-limit-chars.hyphens.icon.image-orientation.image-rendering.image-resolution.ime-mode.initial-letter.initial-letter-align.inline-size.inset.inset-area.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.kerning.left.letter-spacing.lighting-color.line-break.line-height.line-height-step.list-style.list-style-image.list-style-position.list-style-type.margin.margin-block.margin-block-end.margin-block-start.margin-bottom.margin-inline.margin-inline-end.margin-inline-start.margin-left.margin-right.margin-top.margin-trim.marker.marker-end.marker-mid.marker-start.marks.mask.mask-border.mask-border-mode.mask-border-outset.mask-border-repeat.mask-border-slice.mask-border-source.mask-border-width.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.masonry-auto-flow.math-depth.math-shift.math-style.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.nav-down.nav-index.nav-left.nav-right.nav-up.none.normal.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-anchor.overflow-block.overflow-clip-margin.overflow-inline.overflow-wrap.overflow-x.overflow-y.overlay.overscroll-behavior.overscroll-behavior-block.overscroll-behavior-inline.overscroll-behavior-x.overscroll-behavior-y.padding.padding-block.padding-block-end.padding-block-start.padding-bottom.padding-inline.padding-inline-end.padding-inline-start.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.paint-order.pause.pause-after.pause-before.perspective.perspective-origin.place-content.place-items.place-self.pointer-events.position.position-anchor.position-visibility.print-color-adjust.quotes.r.resize.rest.rest-after.rest-before.right.rotate.row-gap.ruby-align.ruby-position.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-stop.scroll-snap-type.scroll-timeline.scroll-timeline-axis.scroll-timeline-name.scrollbar-color.scrollbar-gutter.scrollbar-width.shape-image-threshold.shape-margin.shape-outside.shape-rendering.speak.speak-as.src.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.table-layout.text-align.text-align-all.text-align-last.text-anchor.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-decoration-thickness.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-indent.text-justify.text-orientation.text-overflow.text-rendering.text-shadow.text-size-adjust.text-transform.text-underline-offset.text-underline-position.text-wrap.text-wrap-mode.text-wrap-style.timeline-scope.top.touch-action.transform.transform-box.transform-origin.transform-style.transition.transition-behavior.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.unicode-range.user-modify.user-select.vector-effect.vertical-align.view-timeline.view-timeline-axis.view-timeline-inset.view-timeline-name.view-transition-name.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.white-space.white-space-collapse.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.x.y.z-index.zoom`.split(`.`).sort().reverse();function aS(e){let t=Zx(e),n=rS,r=nS,i=`@[a-z-]+`,a={className:`variable`,begin:`(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b`,relevance:0};return{name:`SCSS`,case_insensitive:!0,illegal:`[=/|']`,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:`selector-id`,begin:`#[A-Za-z0-9_-]+`,relevance:0},{className:`selector-class`,begin:`\\.[A-Za-z0-9_-]+`,relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:`selector-tag`,begin:`\\b(`+eS.join(`|`)+`)\\b`,relevance:0},{className:`selector-pseudo`,begin:`:(`+r.join(`|`)+`)`},{className:`selector-pseudo`,begin:`:(:)?(`+n.join(`|`)+`)`},a,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:`attribute`,begin:`\\b(`+iS.join(`|`)+`)\\b`},{begin:`\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b`},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,a,t.HEXCOLOR,t.CSS_NUMBER_MODE,t.UNICODE_RANGE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:`@(page|font-face)`,keywords:{$pattern:i,keyword:`@page @font-face`}},{begin:`@`,end:`[{;]`,returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:`and or not only`,attribute:tS.join(` `)},contains:[{begin:i,className:`keyword`},{begin:/[a-z-]+(?=:)/,className:`attribute`},a,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function oS(e){return{name:`Shell Session`,aliases:[`console`,`shellsession`],contains:[{className:`meta.prompt`,begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:`bash`}}]}}function sS(e){let t=e.regex,n=e.COMMENT(`--`,`$`),r={scope:`string`,variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},a=[`true`,`false`,`unknown`],o=[`double precision`,`large object`,`with timezone`,`without timezone`],s=`bigint.binary.blob.boolean.char.character.clob.date.dec.decfloat.decimal.float.int.integer.interval.nchar.nclob.national.numeric.real.row.smallint.time.timestamp.varchar.varying.varbinary`.split(`.`),c=[`add`,`asc`,`collation`,`desc`,`final`,`first`,`last`,`view`],l=`abs.acos.all.allocate.alter.and.any.are.array.array_agg.array_max_cardinality.as.asensitive.asin.asymmetric.at.atan.atomic.authorization.avg.begin.begin_frame.begin_partition.between.bigint.binary.blob.boolean.both.by.call.called.cardinality.cascaded.case.cast.ceil.ceiling.char.char_length.character.character_length.check.classifier.clob.close.coalesce.collate.collect.column.commit.condition.connect.constraint.contains.convert.copy.corr.corresponding.cos.cosh.count.covar_pop.covar_samp.create.cross.cube.cume_dist.current.current_catalog.current_date.current_default_transform_group.current_path.current_role.current_row.current_schema.current_time.current_timestamp.current_path.current_role.current_transform_group_for_type.current_user.cursor.cycle.date.day.deallocate.dec.decimal.decfloat.declare.default.define.delete.dense_rank.deref.describe.deterministic.disconnect.distinct.double.drop.dynamic.each.element.else.empty.end.end_frame.end_partition.end-exec.equals.escape.every.except.exec.execute.exists.exp.external.extract.false.fetch.filter.first_value.float.floor.for.foreign.frame_row.free.from.full.function.fusion.get.global.grant.group.grouping.groups.having.hold.hour.identity.in.indicator.initial.inner.inout.insensitive.insert.int.integer.intersect.intersection.interval.into.is.join.json_array.json_arrayagg.json_exists.json_object.json_objectagg.json_query.json_table.json_table_primitive.json_value.lag.language.large.last_value.lateral.lead.leading.left.like.like_regex.listagg.ln.local.localtime.localtimestamp.log.log10.lower.match.match_number.match_recognize.matches.max.member.merge.method.min.minute.mod.modifies.module.month.multiset.national.natural.nchar.nclob.new.no.none.normalize.not.nth_value.ntile.null.nullif.numeric.octet_length.occurrences_regex.of.offset.old.omit.on.one.only.open.or.order.out.outer.over.overlaps.overlay.parameter.partition.pattern.per.percent.percent_rank.percentile_cont.percentile_disc.period.portion.position.position_regex.power.precedes.precision.prepare.primary.procedure.ptf.range.rank.reads.real.recursive.ref.references.referencing.regr_avgx.regr_avgy.regr_count.regr_intercept.regr_r2.regr_slope.regr_sxx.regr_sxy.regr_syy.release.result.return.returns.revoke.right.rollback.rollup.row.row_number.rows.running.savepoint.scope.scroll.search.second.seek.select.sensitive.session_user.set.show.similar.sin.sinh.skip.smallint.some.specific.specifictype.sql.sqlexception.sqlstate.sqlwarning.sqrt.start.static.stddev_pop.stddev_samp.submultiset.subset.substring.substring_regex.succeeds.sum.symmetric.system.system_time.system_user.table.tablesample.tan.tanh.then.time.timestamp.timezone_hour.timezone_minute.to.trailing.translate.translate_regex.translation.treat.trigger.trim.trim_array.true.truncate.uescape.union.unique.unknown.unnest.update.upper.user.using.value.values.value_of.var_pop.var_samp.varbinary.varchar.varying.versioning.when.whenever.where.width_bucket.window.with.within.without.year`.split(`.`),u=`abs.acos.array_agg.asin.atan.avg.cast.ceil.ceiling.coalesce.corr.cos.cosh.count.covar_pop.covar_samp.cume_dist.dense_rank.deref.element.exp.extract.first_value.floor.json_array.json_arrayagg.json_exists.json_object.json_objectagg.json_query.json_table.json_table_primitive.json_value.lag.last_value.lead.listagg.ln.log.log10.lower.max.min.mod.nth_value.ntile.nullif.percent_rank.percentile_cont.percentile_disc.position.position_regex.power.rank.regr_avgx.regr_avgy.regr_count.regr_intercept.regr_r2.regr_slope.regr_sxx.regr_sxy.regr_syy.row_number.sin.sinh.sqrt.stddev_pop.stddev_samp.substring.substring_regex.sum.tan.tanh.translate.translate_regex.treat.trim.trim_array.unnest.upper.value_of.var_pop.var_samp.width_bucket`.split(`.`),d=[`current_catalog`,`current_date`,`current_default_transform_group`,`current_path`,`current_role`,`current_schema`,`current_transform_group_for_type`,`current_user`,`session_user`,`system_time`,`system_user`,`current_time`,`localtime`,`current_timestamp`,`localtimestamp`],f=[`create table`,`insert into`,`primary key`,`foreign key`,`not null`,`alter table`,`add constraint`,`grouping sets`,`on overflow`,`character set`,`respect nulls`,`ignore nulls`,`nulls first`,`nulls last`,`depth first`,`breadth first`],p=u,m=[...l,...c].filter(e=>!u.includes(e)),h={scope:`variable`,match:/@[a-z0-9][a-z0-9_]*/},g={scope:`operator`,match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},_={match:t.concat(/\b/,t.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function v(e){return t.concat(/\b/,t.either(...e.map(e=>e.replace(/\s+/,`\\s+`))),/\b/)}let y={scope:`keyword`,match:v(f),relevance:0};function b(e,{exceptions:t,when:n}={}){let r=n;return t||=[],e.map(e=>e.match(/\|\d+$/)||t.includes(e)?e:r(e)?`${e}|0`:e)}return{name:`SQL`,case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:b(m,{when:e=>e.length<3}),literal:a,type:s,built_in:d},contains:[{scope:`type`,match:v(o)},y,_,h,r,i,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,g]}}function cS(e){return e?typeof e==`string`?e:e.source:null}function lS(e){return uS(`(?=`,e,`)`)}function uS(...e){return e.map(e=>cS(e)).join(``)}function dS(e){let t=e[e.length-1];return typeof t==`object`&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function fS(...e){return`(`+(dS(e).capture?``:`?:`)+e.map(e=>cS(e)).join(`|`)+`)`}var pS=e=>uS(/\b/,e,/\w$/.test(e)?/\b/:/\B/),mS=[`Protocol`,`Type`].map(pS),hS=[`init`,`self`].map(pS),gS=[`Any`,`Self`],_S=[`actor`,`any`,`associatedtype`,`async`,`await`,/as\?/,/as!/,`as`,`borrowing`,`break`,`case`,`catch`,`class`,`consume`,`consuming`,`continue`,`convenience`,`copy`,`default`,`defer`,`deinit`,`didSet`,`distributed`,`do`,`dynamic`,`each`,`else`,`enum`,`extension`,`fallthrough`,/fileprivate\(set\)/,`fileprivate`,`final`,`for`,`func`,`get`,`guard`,`if`,`import`,`indirect`,`infix`,/init\?/,/init!/,`inout`,/internal\(set\)/,`internal`,`in`,`is`,`isolated`,`nonisolated`,`lazy`,`let`,`macro`,`mutating`,`nonmutating`,/open\(set\)/,`open`,`operator`,`optional`,`override`,`package`,`postfix`,`precedencegroup`,`prefix`,/private\(set\)/,`private`,`protocol`,/public\(set\)/,`public`,`repeat`,`required`,`rethrows`,`return`,`set`,`some`,`static`,`struct`,`subscript`,`super`,`switch`,`throws`,`throw`,/try\?/,/try!/,`try`,`typealias`,/unowned\(safe\)/,/unowned\(unsafe\)/,`unowned`,`var`,`weak`,`where`,`while`,`willSet`],vS=[`false`,`nil`,`true`],yS=[`assignment`,`associativity`,`higherThan`,`left`,`lowerThan`,`none`,`right`],bS=[`#colorLiteral`,`#column`,`#dsohandle`,`#else`,`#elseif`,`#endif`,`#error`,`#file`,`#fileID`,`#fileLiteral`,`#filePath`,`#function`,`#if`,`#imageLiteral`,`#keyPath`,`#line`,`#selector`,`#sourceLocation`,`#warning`],xS=`abs.all.any.assert.assertionFailure.debugPrint.dump.fatalError.getVaList.isKnownUniquelyReferenced.max.min.numericCast.pointwiseMax.pointwiseMin.precondition.preconditionFailure.print.readLine.repeatElement.sequence.stride.swap.swift_unboxFromSwiftValueWithType.transcode.type.unsafeBitCast.unsafeDowncast.withExtendedLifetime.withUnsafeMutablePointer.withUnsafePointer.withVaList.withoutActuallyEscaping.zip`.split(`.`),SS=fS(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),CS=fS(SS,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),wS=uS(SS,CS,`*`),TS=fS(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),ES=fS(TS,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),DS=uS(TS,ES,`*`),OS=uS(/[A-Z]/,ES,`*`),kS=[`attached`,`autoclosure`,uS(/convention\(/,fS(`swift`,`block`,`c`),/\)/),`discardableResult`,`dynamicCallable`,`dynamicMemberLookup`,`escaping`,`freestanding`,`frozen`,`GKInspectable`,`IBAction`,`IBDesignable`,`IBInspectable`,`IBOutlet`,`IBSegueAction`,`inlinable`,`main`,`nonobjc`,`NSApplicationMain`,`NSCopying`,`NSManaged`,uS(/objc\(/,DS,/\)/),`objc`,`objcMembers`,`propertyWrapper`,`requires_stored_property_inits`,`resultBuilder`,`Sendable`,`testable`,`UIApplicationMain`,`unchecked`,`unknown`,`usableFromInline`,`warn_unqualified_access`],AS=[`iOS`,`iOSApplicationExtension`,`macOS`,`macOSApplicationExtension`,`macCatalyst`,`macCatalystApplicationExtension`,`watchOS`,`watchOSApplicationExtension`,`tvOS`,`tvOSApplicationExtension`,`swift`];function jS(e){let t={match:/\s+/,relevance:0},n=e.COMMENT(`/\\*`,`\\*/`,{contains:[`self`]}),r=[e.C_LINE_COMMENT_MODE,n],i={match:[/\./,fS(...mS,...hS)],className:{2:`keyword`}},a={match:uS(/\./,fS(..._S)),relevance:0},o=_S.filter(e=>typeof e==`string`).concat([`_|0`]),s={variants:[{className:`keyword`,match:fS(..._S.filter(e=>typeof e!=`string`).concat(gS).map(pS),...hS)}]},c={$pattern:fS(/\b\w+/,/#\w+/),keyword:o.concat(bS),literal:vS},l=[i,a,s],u=[{match:uS(/\./,fS(...xS)),relevance:0},{className:`built_in`,match:uS(/\b/,fS(...xS),/(?=\()/)}],d={match:/->/,relevance:0},f=[d,{className:`operator`,relevance:0,variants:[{match:wS},{match:`\\.(\\.|${CS})+`}]}],p=`([0-9]_*)+`,m=`([0-9a-fA-F]_*)+`,h={className:`number`,relevance:0,variants:[{match:`\\b(${p})(\\.(${p}))?([eE][+-]?(${p}))?\\b`},{match:`\\b0x(${m})(\\.(${m}))?([pP][+-]?(${p}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},g=(e=``)=>({className:`subst`,variants:[{match:uS(/\\/,e,/[0\\tnr"']/)},{match:uS(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),_=(e=``)=>({className:`subst`,match:uS(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),v=(e=``)=>({className:`subst`,label:`interpol`,begin:uS(/\\/,e,/\(/),end:/\)/}),y=(e=``)=>({begin:uS(e,/"""/),end:uS(/"""/,e),contains:[g(e),_(e),v(e)]}),b=(e=``)=>({begin:uS(e,/"/),end:uS(/"/,e),contains:[g(e),v(e)]}),x={className:`string`,variants:[y(),y(`#`),y(`##`),y(`###`),b(),b(`#`),b(`##`),b(`###`)]},S=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],C={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:S},w=e=>{let t=uS(e,/\//),n=uS(/\//,e);return{begin:t,end:n,contains:[...S,{scope:`comment`,begin:`#(?!.*${n})`,end:/$/}]}},T={scope:`regexp`,variants:[w(`###`),w(`##`),w(`#`),C]},E={match:uS(/`/,DS,/`/)},D=[E,{className:`variable`,match:/\$\d+/},{className:`variable`,match:`\\$${ES}+`}],O=[{match:/(@|#(un)?)available/,scope:`keyword`,starts:{contains:[{begin:/\(/,end:/\)/,keywords:AS,contains:[...f,h,x]}]}},{scope:`keyword`,match:uS(/@/,fS(...kS),lS(fS(/\(/,/\s+/)))},{scope:`meta`,match:uS(/@/,DS)}],k={match:lS(/\b[A-Z]/),relevance:0,contains:[{className:`type`,match:uS(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,ES,`+`)},{className:`type`,match:OS,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:uS(/\s+&\s+/,lS(OS)),relevance:0}]},A={begin:/</,end:/>/,keywords:c,contains:[...r,...l,...O,d,k]};k.contains.push(A);let j={begin:/\(/,end:/\)/,relevance:0,keywords:c,contains:[`self`,{match:uS(DS,/\s*:/),keywords:`_|0`,relevance:0},...r,T,...l,...u,...f,h,x,...D,...O,k]},M={begin:/</,end:/>/,keywords:`repeat each`,contains:[...r,k]},N={begin:/\(/,end:/\)/,keywords:c,contains:[{begin:fS(lS(uS(DS,/\s*:/)),lS(uS(DS,/\s+/,DS,/\s*:/))),end:/:/,relevance:0,contains:[{className:`keyword`,match:/\b_\b/},{className:`params`,match:DS}]},...r,...l,...f,h,x,...O,k,j],endsParent:!0,illegal:/["']/},P={match:[/(func|macro)/,/\s+/,fS(E.match,DS,wS)],className:{1:`keyword`,3:`title.function`},contains:[M,N,t],illegal:[/\[/,/%/]},F={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:`keyword`},contains:[M,N,t],illegal:/\[|%/},ee={match:[/operator/,/\s+/,wS],className:{1:`keyword`,3:`title`}},I={begin:[/precedencegroup/,/\s+/,OS],className:{1:`keyword`,3:`title`},contains:[k],keywords:[...yS,...vS],end:/}/},te={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:`keyword`,3:`keyword`,5:`title.function`}},ne={match:[/class\b/,/\s+/,/var\b/],scope:{1:`keyword`,3:`keyword`}},re={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,DS,/\s*/],beginScope:{1:`keyword`,3:`title.class`},keywords:c,contains:[M,...l,{begin:/:/,end:/\{/,keywords:c,contains:[{scope:`title.class.inherited`,match:OS},...l],relevance:0}]};for(let e of x.variants){let t=e.contains.find(e=>e.label===`interpol`);t.keywords=c;let n=[...l,...u,...f,h,x,...D];t.contains=[...n,{begin:/\(/,end:/\)/,contains:[`self`,...n]}]}return{name:`Swift`,keywords:c,contains:[...r,P,F,te,ne,re,ee,I,{beginKeywords:`import`,end:/$/,contains:[...r],relevance:0},T,...l,...u,...f,h,x,...D,...O,k,j]}}var MS=`[A-Za-z$_][0-9A-Za-z$_]*`,NS=`as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using`.split(`.`),PS=[`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`],FS=`Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly`.split(`.`),IS=[`Error`,`EvalError`,`InternalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],LS=[`setInterval`,`setTimeout`,`clearInterval`,`clearTimeout`,`require`,`exports`,`eval`,`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,`escape`,`unescape`],RS=[`arguments`,`this`,`super`,`console`,`window`,`document`,`localStorage`,`sessionStorage`,`module`,`global`],zS=[].concat(LS,FS,IS);function BS(e){let t=e.regex,n=(e,{after:t})=>{let n=`</`+e[0].slice(1);return e.input.indexOf(n,t)!==-1},r=MS,i={begin:`<>`,end:`</>`},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{let r=e[0].length+e.index,i=e.input[r];if(i===`<`||i===`,`){t.ignoreMatch();return}i===`>`&&(n(e,{after:r})||t.ignoreMatch());let a,o=e.input.substring(r);((a=o.match(/^\s*=/))||(a=o.match(/^\s+extends\s+/))&&a.index===0)&&t.ignoreMatch()}},s={$pattern:MS,keyword:NS,literal:PS,built_in:zS,"variable.language":RS},c=`[0-9](_?[0-9])*`,l=`\\.(${c})`,u=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,d={className:`number`,variants:[{begin:`(\\b(${u})((${l})|\\.)?|(${l}))[eE][+-]?(${c})\\b`},{begin:`\\b(${u})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*n?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*n?\\b`},{begin:`\\b0[0-7]+n?\\b`}],relevance:0},f={className:`subst`,begin:`\\$\\{`,end:`\\}`,keywords:s,contains:[]},p={begin:".?html`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`xml`}},m={begin:".?css`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`css`}},h={begin:".?gql`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`graphql`}},g={className:`string`,begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},_={className:`comment`,variants:[e.COMMENT(/\/\*\*(?!\/)/,`\\*/`,{relevance:0,contains:[{begin:`(?=@[A-Za-z]+)`,relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`},{className:`type`,begin:`\\{`,end:`\\}`,excludeEnd:!0,excludeBegin:!0,relevance:0},{className:`variable`,begin:r+`(?=\\s*(-)|$)`,endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:s,contains:[`self`].concat(v)});let y=[].concat(_,f.contains),b=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:[`self`].concat(y)}]),x={className:`params`,begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},S={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,`(`,t.concat(/\./,r),`)*`)],scope:{1:`keyword`,3:`title.class`,5:`keyword`,7:`title.class.inherited`}},{match:[/class/,/\s+/,r],scope:{1:`keyword`,3:`title.class`}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:`title.class`,keywords:{_:[...FS,...IS]}},w={label:`use_strict`,className:`meta`,relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:`keyword`,3:`title.function`},label:`func.def`,contains:[x],illegal:/%/},E={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`};function D(e){return t.concat(`(?!`,e.join(`|`),`)`)}let O={match:t.concat(/\b/,D([...LS,`super`,`import`,`await`].map(e=>`${e}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:`title.function`,relevance:0},k={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:`prototype`,className:`property`,relevance:0},A={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:`keyword`,3:`title.function`},contains:[{begin:/\(\)/},x]},j=`(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|`+e.UNDERSCORE_IDENT_RE+`)\\s*=>`,M={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(j)],keywords:`async`,className:{1:`keyword`,3:`title.function`},contains:[x]};return{name:`JavaScript`,aliases:[`js`,`jsx`,`mjs`,`cjs`],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:C},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:`shebang`,binary:`node`,relevance:5}),w,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,_,{match:/\$\d+/},d,C,{scope:`attr`,match:r+t.lookahead(`:`),relevance:0},M,{begin:`(`+e.RE_STARTERS_RE+`|\\b(case|return|throw)\\b)\\s*`,keywords:`return throw case`,relevance:0,contains:[_,e.REGEXP_MODE,{className:`function`,begin:j,returnBegin:!0,end:`\\s*=>`,contains:[{className:`params`,variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:`xml`,contains:[{begin:o.begin,end:o.end,skip:!0,contains:[`self`]}]}]},T,{beginKeywords:`while if switch catch for`},{begin:`\\b(?!function)`+e.UNDERSCORE_IDENT_RE+`\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{`,returnBegin:!0,label:`func.def`,contains:[x,e.inherit(e.TITLE_MODE,{begin:r,className:`title.function`})]},{match:/\.\.\./,relevance:0},k,{match:`\\$`+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:`title.function`},contains:[x]},O,E,S,A,{match:/\$[(.]/}]}}function VS(e){let t=e.regex,n=BS(e),r=MS,i=[`any`,`void`,`number`,`boolean`,`string`,`object`,`never`,`symbol`,`bigint`,`unknown`],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:`keyword`,3:`title.class`}},o={beginKeywords:`interface`,end:/\{/,excludeEnd:!0,keywords:{keyword:`interface extends`,built_in:i},contains:[n.exports.CLASS_REFERENCE]},s={className:`meta`,relevance:10,begin:/^\s*['"]use strict['"]/},c={$pattern:MS,keyword:NS.concat([`type`,`interface`,`public`,`private`,`protected`,`implements`,`declare`,`abstract`,`readonly`,`enum`,`override`,`satisfies`]),literal:PS,built_in:zS.concat(i),"variable.language":RS},l={className:`meta`,begin:`@`+r},u=(e,t,n)=>{let r=e.contains.findIndex(e=>e.label===t);if(r===-1)throw Error(`can not find mode to replace`);e.contains.splice(r,1,n)};Object.assign(n.keywords,c),n.exports.PARAMS_CONTAINS.push(l);let d=n.contains.find(e=>e.scope===`attr`),f=Object.assign({},d,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,d,f]),n.contains=n.contains.concat([l,a,o,f]),u(n,`shebang`,e.SHEBANG()),u(n,`use_strict`,s);let p=n.contains.find(e=>e.label===`func.def`);return p.relevance=0,Object.assign(n,{name:`TypeScript`,aliases:[`ts`,`tsx`,`mts`,`cts`]}),n}function HS(e){let t=e.regex,n={className:`string`,begin:/"(""|[^/n])"C\b/},r={className:`string`,begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,a=/\d{4}-\d{1,2}-\d{1,2}/,o=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,s=/\d{1,2}(:\d{1,2}){1,2}/,c={className:`literal`,variants:[{begin:t.concat(/# */,t.either(a,i),/ *#/)},{begin:t.concat(/# */,s,/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,t.either(a,i),/ +/,t.either(o,s),/ *#/)}]},l={className:`number`,relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},u={className:`label`,begin:/^\w+:/},d=e.COMMENT(/'''/,/$/,{contains:[{className:`doctag`,begin:/<\/?/,end:/>/}]}),f=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:`Visual Basic .NET`,aliases:[`vb`],case_insensitive:!0,classNameAliases:{label:`symbol`},keywords:{keyword:`addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield`,built_in:`addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort`,type:`boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort`,literal:`true false nothing`},illegal:`//|\\{|\\}|endif|gosub|variant|wend|^\\$ `,contains:[n,r,c,l,u,d,f,{className:`meta`,begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:`const disable else elseif enable end externalsource if region then`},contains:[f]}]}}function US(e){e.regex;let t=e.COMMENT(/\(;/,/;\)/);return t.contains.push(`self`),{name:`WebAssembly`,keywords:{$pattern:/[\w.]+/,keyword:`anyfunc,block,br,br_if,br_table,call,call_indirect,data,drop,elem,else,end,export,func,global.get,global.set,local.get,local.set,local.tee,get_global,get_local,global,if,import,local,loop,memory,memory.grow,memory.size,module,mut,nop,offset,param,result,return,select,set_global,set_local,start,table,tee_local,then,type,unreachable`.split(`,`)},contains:[e.COMMENT(/;;/,/$/),t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:`keyword`,3:`operator`}},{className:`variable`,begin:/\$[\w_]+/},{match:/(\((?!;)|\))+/,className:`punctuation`,relevance:0},{begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:`keyword`,3:`title.function`}},e.QUOTE_STRING_MODE,{match:/(i32|i64|f32|f64)(?!\.)/,className:`type`},{className:`keyword`,match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/},{className:`number`,relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/}]}}function WS(e){let t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:`symbol`,begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:`keyword`,begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(a,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{className:`string`}),c=e.inherit(e.QUOTE_STRING_MODE,{className:`string`}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:`attr`,begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:`string`,endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:`HTML, XML`,aliases:[`html`,`xhtml`,`rss`,`atom`,`xjb`,`xsd`,`xsl`,`plist`,`wsf`,`svg`],case_insensitive:!0,unicodeRegex:!0,contains:[{className:`meta`,begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,c,s,o,{begin:/\[/,end:/\]/,contains:[{className:`meta`,begin:/<![a-z]/,end:/>/,contains:[a,o,c,s]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:`meta`,end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[c]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:`tag`,begin:/<style(?=\s|>)/,end:/>/,keywords:{name:`style`},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:[`css`,`xml`]}},{className:`tag`,begin:/<script(?=\s|>)/,end:/>/,keywords:{name:`script`},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:[`javascript`,`handlebars`,`xml`]}},{className:`tag`,begin:/<>|<\/>/},{className:`tag`,begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:`name`,begin:n,relevance:0,starts:l}]},{className:`tag`,begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:`name`,begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function GS(e){let t=`true false yes no null`,n=`[\\w#;/?:@&=+$,.~*'()[\\]]+`,r={className:`attr`,variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:`template-variable`,variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:`string`,relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:`char.escape`,relevance:0}]},o={className:`string`,relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,i]},s=e.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),c={className:`number`,begin:`\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b`},l={end:`,`,endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},u={begin:/\{/,end:/\}/,contains:[l],illegal:`\\n`,relevance:0},d={begin:`\\[`,end:`\\]`,contains:[l],illegal:`\\n`,relevance:0},f=[r,{className:`meta`,begin:`^---\\s*$`,relevance:10},{className:`string`,begin:`[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*`},{begin:`<%[%=-]?`,end:`[%-]?%>`,subLanguage:`ruby`,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:`type`,begin:`!\\w+!`+n},{className:`type`,begin:`!<`+n+`>`},{className:`type`,begin:`!`+n},{className:`type`,begin:`!!`+n},{className:`meta`,begin:`&`+e.UNDERSCORE_IDENT_RE+`$`},{className:`meta`,begin:`\\*`+e.UNDERSCORE_IDENT_RE+`$`},{className:`bullet`,begin:`-(?=[ ]|$)`,relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},c,{className:`number`,begin:e.C_NUMBER_RE+`\\b`,relevance:0},u,d,a,o],p=[...f];return p.pop(),p.push(s),l.contains=p,{name:`YAML`,case_insensitive:!0,aliases:[`yml`],contains:f}}var KS={arduino:Hb,bash:Ub,c:Wb,cpp:Gb,csharp:Kb,css:tx,diff:nx,go:rx,graphql:ix,ini:ax,java:dx,javascript:bx,json:Sx,kotlin:Dx,less:Lx,lua:Rx,makefile:zx,markdown:Bx,objectivec:Vx,perl:Hx,php:Ux,"php-template":Wx,plaintext:Gx,python:Kx,"python-repl":qx,r:Jx,ruby:Yx,rust:Xx,scss:aS,shell:oS,sql:sS,swift:jS,typescript:VS,vbnet:HS,wasm:US,xml:WS,yaml:GS},qS=u(s(((e,t)=>{function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw Error(`map is read-only`)}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw Error(`set is read-only`)}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let r=e[t],i=typeof r;i!==`object`&&i!==`function`||Object.isFrozen(r)||n(r)}),e}var r=class{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function i(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}function a(e,...t){let n=Object.create(null);for(let t in e)n[t]=e[t];return t.forEach(function(e){for(let t in e)n[t]=e[t]}),n}var o=`</span>`,s=e=>!!e.scope,c=(e,{prefix:t})=>{if(e.startsWith(`language:`))return e.replace(`language:`,`language-`);if(e.includes(`.`)){let n=e.split(`.`);return[`${t}${n.shift()}`,...n.map((e,t)=>`${e}${`_`.repeat(t+1)}`)].join(` `)}return`${t}${e}`},l=class{constructor(e,t){this.buffer=``,this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=i(e)}openNode(e){if(!s(e))return;let t=c(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){s(e)&&(this.buffer+=o)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}},u=(e={})=>{let t={children:[]};return Object.assign(t,e),t},d=class e{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){let t=u({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t==`string`?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(t){typeof t!=`string`&&t.children&&(t.children.every(e=>typeof e==`string`)?t.children=[t.children.join(``)]:t.children.forEach(t=>{e._collapse(t)}))}},f=class extends d{constructor(e){super(),this.options=e}addText(e){e!==``&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){let n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new l(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function p(e){return e?typeof e==`string`?e:e.source:null}function m(e){return _(`(?=`,e,`)`)}function h(e){return _(`(?:`,e,`)*`)}function g(e){return _(`(?:`,e,`)?`)}function _(...e){return e.map(e=>p(e)).join(``)}function v(e){let t=e[e.length-1];return typeof t==`object`&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function y(...e){return`(`+(v(e).capture?``:`?:`)+e.map(e=>p(e)).join(`|`)+`)`}function b(e){return RegExp(e.toString()+`|`).exec(``).length-1}function x(e,t){let n=e&&e.exec(t);return n&&n.index===0}var S=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function C(e,{joinWith:t}){let n=0;return e.map(e=>{n+=1;let t=n,r=p(e),i=``;for(;r.length>0;){let e=S.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),e[0][0]===`\\`&&e[1]?i+=`\\`+String(Number(e[1])+t):(i+=e[0],e[0]===`(`&&n++)}return i}).map(e=>`(${e})`).join(t)}var w=/\b\B/,T=`[a-zA-Z]\\w*`,E=`[a-zA-Z_]\\w*`,D=`\\b\\d+(\\.\\d+)?`,O=`(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)`,k=`\\b(0b[01]+)`,A=`!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~`,j=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=_(t,/.*\b/,e.binary,/\b.*/)),a({scope:`meta`,begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{e.index!==0&&t.ignoreMatch()}},e)},M={begin:`\\\\[\\s\\S]`,relevance:0},N={scope:`string`,begin:`'`,end:`'`,illegal:`\\n`,contains:[M]},P={scope:`string`,begin:`"`,end:`"`,illegal:`\\n`,contains:[M]},F={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},ee=function(e,t,n={}){let r=a({scope:`comment`,begin:e,end:t,contains:[]},n);r.contains.push({scope:`doctag`,begin:`[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)`,end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let i=y(`I`,`a`,`is`,`so`,`us`,`to`,`at`,`if`,`in`,`it`,`on`,/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:_(/[ ]+/,`(`,i,/[.]?[:]?([.][ ]|[ ])/,`){3}`)}),r},I=ee(`//`,`$`),te=ee(`/\\*`,`\\*/`),ne=ee(`#`,`$`),re=Object.freeze({__proto__:null,APOS_STRING_MODE:N,BACKSLASH_ESCAPE:M,BINARY_NUMBER_MODE:{scope:`number`,begin:k,relevance:0},BINARY_NUMBER_RE:k,COMMENT:ee,C_BLOCK_COMMENT_MODE:te,C_LINE_COMMENT_MODE:I,C_NUMBER_MODE:{scope:`number`,begin:O,relevance:0},C_NUMBER_RE:O,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:ne,IDENT_RE:T,MATCH_NOTHING_RE:w,METHOD_GUARD:{begin:`\\.\\s*[a-zA-Z_]\\w*`,relevance:0},NUMBER_MODE:{scope:`number`,begin:D,relevance:0},NUMBER_RE:D,PHRASAL_WORDS_MODE:F,QUOTE_STRING_MODE:P,REGEXP_MODE:{scope:`regexp`,begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[M,{begin:/\[/,end:/\]/,relevance:0,contains:[M]}]},RE_STARTERS_RE:A,SHEBANG:j,TITLE_MODE:{scope:`title`,begin:T,relevance:0},UNDERSCORE_IDENT_RE:E,UNDERSCORE_TITLE_MODE:{scope:`title`,begin:E,relevance:0}});function ie(e,t){e.input[e.index-1]===`.`&&t.ignoreMatch()}function ae(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function oe(e,t){t&&e.beginKeywords&&(e.begin=`\\b(`+e.beginKeywords.split(` `).join(`|`)+`)(?!\\.)(?=\\b|\\s)`,e.__beforeBegin=ie,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function se(e,t){Array.isArray(e.illegal)&&(e.illegal=y(...e.illegal))}function ce(e,t){if(e.match){if(e.begin||e.end)throw Error(`begin & end are not supported with match`);e.begin=e.match,delete e.match}}function le(e,t){e.relevance===void 0&&(e.relevance=1)}var ue=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw Error(`beforeMatch cannot be used with starts`);let n=Object.assign({},e);Object.keys(e).forEach(t=>{delete e[t]}),e.keywords=n.keywords,e.begin=_(n.beforeMatch,m(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},de=[`of`,`and`,`for`,`in`,`not`,`or`,`if`,`then`,`parent`,`list`,`value`],fe=`keyword`;function pe(e,t,n=fe){let r=Object.create(null);return typeof e==`string`?i(n,e.split(` `)):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(n){Object.assign(r,pe(e[n],t,n))}),r;function i(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach(function(t){let n=t.split(`|`);r[n[0]]=[e,L(n[0],n[1])]})}}function L(e,t){return t?Number(t):+!R(e)}function R(e){return de.includes(e.toLowerCase())}var me={},he=e=>{console.error(e)},ge=(e,...t)=>{console.log(`WARN: ${e}`,...t)},_e=(e,t)=>{me[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),me[`${e}/${t}`]=!0)},ve=Error();function ye(e,t,{key:n}){let r=0,i=e[n],a={},o={};for(let e=1;e<=t.length;e++)o[e+r]=i[e],a[e+r]=!0,r+=b(t[e-1]);e[n]=o,e[n]._emit=a,e[n]._multi=!0}function be(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw he(`skip, excludeBegin, returnBegin not compatible with beginScope: {}`),ve;if(typeof e.beginScope!=`object`||e.beginScope===null)throw he(`beginScope must be object`),ve;ye(e,e.begin,{key:`beginScope`}),e.begin=C(e.begin,{joinWith:``})}}function xe(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw he(`skip, excludeEnd, returnEnd not compatible with endScope: {}`),ve;if(typeof e.endScope!=`object`||e.endScope===null)throw he(`endScope must be object`),ve;ye(e,e.end,{key:`endScope`}),e.end=C(e.end,{joinWith:``})}}function Se(e){e.scope&&typeof e.scope==`object`&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Ce(e){Se(e),typeof e.beginScope==`string`&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope==`string`&&(e.endScope={_wrap:e.endScope}),be(e),xe(e)}function we(e){function t(t,n){return new RegExp(p(t),`m`+(e.case_insensitive?`i`:``)+(e.unicodeRegex?`u`:``)+(n?`g`:``))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=b(e)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let e=this.regexes.map(e=>e[1]);this.matcherRe=t(C(e,{joinWith:`|`}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;let t=this.matcherRe.exec(e);if(!t)return null;let n=t.findIndex((e,t)=>t>0&&e!==void 0),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];let t=new n;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),t.type===`begin`&&this.count++}exec(e){let t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition()&&!(n&&n.index===this.lastIndex)){let t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}function i(e){let t=new r;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:`begin`})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:`end`}),e.illegal&&t.addRule(e.illegal,{type:`illegal`}),t}function o(n,r){let a=n;if(n.isCompiled)return a;[ae,ce,Ce,ue].forEach(e=>e(n,r)),e.compilerExtensions.forEach(e=>e(n,r)),n.__beforeBegin=null,[oe,se,le].forEach(e=>e(n,r)),n.isCompiled=!0;let s=null;return typeof n.keywords==`object`&&n.keywords.$pattern&&(n.keywords=Object.assign({},n.keywords),s=n.keywords.$pattern,delete n.keywords.$pattern),s||=/\w+/,n.keywords&&=pe(n.keywords,e.case_insensitive),a.keywordPatternRe=t(s,!0),r&&(n.begin||=/\B|\b/,a.beginRe=t(a.begin),!n.end&&!n.endsWithParent&&(n.end=/\B|\b/),n.end&&(a.endRe=t(a.end)),a.terminatorEnd=p(a.end)||``,n.endsWithParent&&r.terminatorEnd&&(a.terminatorEnd+=(n.end?`|`:``)+r.terminatorEnd)),n.illegal&&(a.illegalRe=t(n.illegal)),n.contains||=[],n.contains=[].concat(...n.contains.map(function(e){return Ee(e===`self`?n:e)})),n.contains.forEach(function(e){o(e,a)}),n.starts&&o(n.starts,r),a.matcher=i(a),a}if(e.compilerExtensions||=[],e.contains&&e.contains.includes(`self`))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=a(e.classNameAliases||{}),o(e)}function Te(e){return e?e.endsWithParent||Te(e.starts):!1}function Ee(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return a(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:Te(e)?a(e,{starts:e.starts?a(e.starts):null}):Object.isFrozen(e)?a(e):e}var De=`11.11.2`,Oe=class extends Error{constructor(e,t){super(e),this.name=`HTMLInjectionError`,this.html=t}},ke=i,Ae=a,je=Symbol(`nomatch`),Me=7,Ne=function(e){let t=Object.create(null),i=Object.create(null),a=[],o=!0,s=`Could not find the language '{}', did you forget to load/include a language module?`,c={disableAutodetect:!0,name:`Plain text`,contains:[]},l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:`hljs-`,cssSelector:`pre code`,languages:null,__emitter:f};function u(e){return l.noHighlightRe.test(e)}function d(e){let t=e.className+` `;t+=e.parentNode?e.parentNode.className:``;let n=l.languageDetectRe.exec(t);if(n){let t=N(n[1]);return t||(ge(s.replace(`{}`,n[1])),ge(`Falling back to no-highlight mode for this block.`,e)),t?n[1]:`no-highlight`}return t.split(/\s+/).find(e=>u(e)||N(e))}function p(e,t,n){let r=``,i=``;typeof t==`object`?(r=e,n=t.ignoreIllegals,i=t.language):(_e(`10.7.0`,`highlight(lang, code, ...args) has been deprecated.`),_e(`10.7.0`,`Please use highlight(code, options) instead.
|
|
63
|
+
`;)r+=1;else if(t===`\\`){if(r+1>=e.length){n({kind:`command`,value:`backslash`,offset:r}),r+=1;continue}let t=e[r+1];if(t===`\\`){n({kind:`newline`,value:`\\\\`,offset:r}),r+=2;continue}if(/[A-Za-z]/.test(t)){let t=r+1;for(;t<e.length&&/[A-Za-z]/.test(e[t]);)t+=1;n({kind:`command`,value:e.slice(r+1,t),offset:r}),r=t;continue}n({kind:`command`,value:Object.hasOwn(ey,t)?ey[t]:t,offset:r}),r+=2}else if(t>=`0`&&t<=`9`){let t=/^\d+(?:\.\d*)?/.exec(e.slice(r));n({kind:`number`,value:t[0],offset:r}),r+=t[0].length}else if(t===`.`&&e[r+1]>=`0`&&e[r+1]<=`9`){let t=/^(?:\d+(?:\.\d*)?|\.\d+)/.exec(e.slice(r));n({kind:`number`,value:t[0],offset:r}),r+=t[0].length}else/[A-Za-z]/.test(t)?(n({kind:`letter`,value:t,offset:r}),r+=1):(n({kind:`punct`,value:t,offset:r}),r+=1)}return n({kind:`eof`,value:``,offset:e.length}),t}var sy={alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ϵ`,varepsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,vartheta:`ϑ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,varpi:`ϖ`,rho:`ρ`,varrho:`ϱ`,sigma:`σ`,varsigma:`ς`,tau:`τ`,upsilon:`υ`,phi:`φ`,varphi:`ϕ`,chi:`χ`,psi:`ψ`,omega:`ω`,Gamma:`Γ`,Delta:`Δ`,Theta:`Θ`,Lambda:`Λ`,Xi:`Ξ`,Pi:`Π`,Sigma:`Σ`,Upsilon:`Υ`,Phi:`Φ`,Psi:`Ψ`,Omega:`Ω`},cy={cdot:`·`,times:`×`,div:`÷`,pm:`±`,mp:`∓`,le:`≤`,leq:`≤`,ge:`≥`,geq:`≥`,ne:`≠`,neq:`≠`,lt:`<`,gt:`>`,approx:`≈`,equiv:`≡`,sim:`∼`,propto:`∝`,infty:`∞`,partial:`∂`,nabla:`∇`,sum:`∑`,prod:`∏`,int:`∫`,iint:`∬`,oint:`∮`,to:`→`,rightarrow:`→`,leftarrow:`←`,Rightarrow:`⇒`,leftrightarrow:`↔`,in:`∈`,notin:`∉`,ni:`∋`,subset:`⊂`,supset:`⊃`,subseteq:`⊆`,supseteq:`⊇`,cup:`∪`,cap:`∩`,emptyset:`∅`,forall:`∀`,exists:`∃`,neg:`¬`,land:`∧`,lor:`∨`,angle:`∠`,perp:`⊥`,parallel:`∥`,degree:`°`,prime:`′`,ldots:`…`,cdots:`⋯`,dots:`…`,langle:`⟨`,rangle:`⟩`,lbrace:`{`,rbrace:`}`,vert:`|`,lvert:`|`,rvert:`|`,lVert:`‖`,rVert:`‖`,backslash:`\\`,percent:`%`,amp:`&`,hash:`#`,underscore:`_`,dollar:`$`,colon:`:`},ly=new Set([`sin`,`cos`,`tan`,`arcsin`,`arccos`,`arctan`,`exp`,`ln`,`log`,`min`,`max`,`lim`,`det`,`sup`,`inf`,`arg`,`gcd`]),uy={space:`0.25em`,thinspace:`0.167em`,medspace:`0.222em`,thickspace:`0.278em`,negthinspace:`-0.167em`,quad:`1em`,qquad:`2em`,enspace:`0.5em`},dy=new Set([`displaystyle`,`textstyle`,`scriptstyle`,`scriptscriptstyle`,`limits`,`nolimits`]),fy=class{tokens;pos=0;source;depth=0;constructor(e){this.source=e,this.tokens=oy(e)}enter(){if(this.depth+=1,this.depth>ry)throw--this.depth,Error(`Formula is nested too deeply.`)}leave(){--this.depth}render(){let e=this.parseRow({});return e.length===1?e[0]:Q(`mrow`,null,...e)}peek(e=0){return this.tokens[Math.min(this.pos+e,this.tokens.length-1)]}take(){return this.tokens[this.pos++]}atPunct(e){let t=this.peek();return t.kind===`punct`&&t.value===e}atCommand(e){let t=this.peek();return t.kind===`command`&&t.value===e}parseRow(e){this.enter();try{let t=[];for(;;){let n=this.peek();if(n.kind===`eof`||n.kind===`punct`&&e.chars?.has(n.value)||n.kind===`command`&&e.commands?.has(n.value)||n.kind===`newline`&&e.newline)break;t.push(this.parseAtom())}return t}finally{this.leave()}}parseAtom(){this.enter();try{return this.parseAtomBody()}finally{this.leave()}}parseAtomBody(){let e=this.peek(),t;return e.kind===`number`?(this.take(),t=Q(`mn`,null,e.value)):e.kind===`letter`?(this.take(),t=Q(`mi`,null,e.value)):e.kind===`punct`?t=this.parsePunctuation(e):e.kind===`newline`?(this.take(),t=Q(`mspace`,{linebreak:`newline`})):e.kind===`command`?t=this.parseCommand(e):(this.take(),t=Q(`mtext`,null,``)),this.applyScripts(t)}parsePunctuation(e){return this.take(),e.value===`{`?(--this.pos,this.parseBraceGroup()):e.value===`}`||e.value===`&`||e.value===`#`?Q(`mo`,null,e.value):Q(`mo`,e.value===`(`||e.value===`)`||e.value===`[`||e.value===`]`||e.value===`|`?{fence:`true`,stretchy:`true`}:null,e.value)}parseCommand(e){let t=e.value;if(t===`frac`||t===`dfrac`||t===`tfrac`)return this.take(),this.parseFraction();if(t===`sqrt`)return this.take(),this.parseRoot();if(t===`left`)return this.take(),this.parseLeft();if(t===`right`)return this.take(),this.readDelimiter()??Q(`mrow`,null);if(t===`begin`)return this.take(),this.parseEnvironment();if(t===`end`)return this.take(),this.readRawGroup(),Q(`mtext`,null,`\\end`);if(t===`text`||t===`textrm`||t===`mbox`||t===`operatorname`)return this.take(),Q(`mtext`,null,this.readRawGroup());if(t===`mathrm`||t===`mathbf`||t===`mathit`||t===`mathsf`){this.take();let e=this.readRawGroup();return Q(`mtext`,{mathvariant:t===`mathrm`?`normal`:t===`mathbf`?`bold`:t===`mathit`?`italic`:`sans-serif`},e)}if(t===`overline`||t===`bar`||t===`hat`||t===`tilde`||t===`vec`||t===`dot`||t===`ddot`)return this.take(),Q(`mover`,{accent:`true`},this.parseRequiredArgument(),Q(`mo`,{stretchy:`true`},t===`overline`||t===`bar`?`¯`:t===`hat`?`^`:t===`tilde`?`~`:t===`vec`?`→`:t===`dot`?`˙`:`¨`));if(dy.has(t))return this.take(),Q(`mrow`,null);if(Object.hasOwn(uy,t))return this.take(),Q(`mspace`,{width:uy[t]});if(ly.has(t))return this.take(),Q(`mo`,{mathvariant:`normal`,form:`prefix`},t);if(Object.hasOwn(sy,t))return this.take(),Q(`mi`,null,sy[t]);if(Object.hasOwn(cy,t)){this.take();let e=cy[t];return Q(`mo`,e===`(`||e===`)`||e===`[`||e===`]`||e===`{`||e===`}`||e===`|`||e===`‖`||e===`⟨`||e===`⟩`?{fence:`true`,stretchy:`true`}:null,e)}return this.take(),Q(`mtext`,null,`\\${t}`)}parseBraceGroup(){if(!this.atPunct(`{`))return Q(`mrow`,null);this.take();let e=this.parseRow({chars:new Set([`}`])});return this.atPunct(`}`)&&this.take(),Q(`mrow`,null,...e)}parseFraction(){return Q(`mfrac`,null,this.parseRequiredArgument(),this.parseRequiredArgument())}parseRoot(){let e=null;if(this.atPunct(`[`)){this.take();let t=this.parseRow({chars:new Set([`]`])});this.atPunct(`]`)&&this.take(),e=Q(`mrow`,null,...t)}let t=this.parseRequiredArgument();return e?Q(`mroot`,null,t,e):Q(`msqrt`,null,t)}parseRequiredArgument(){return this.atPunct(`{`)?this.parseBraceGroup():this.parseAtom()}parseLeft(){let e=this.readDelimiter(),t=this.parseRow({commands:new Set([`right`])}),n=null;return this.atCommand(`right`)&&(this.take(),n=this.readDelimiter()),!e&&!n?Q(`mrow`,null,...t):Q(`mrow`,null,e,...t,n)}readDelimiter(){let e=this.peek();if(e.kind===`punct`)return e.value===`.`?(this.take(),null):`()[]|`.includes(e.value)?(this.take(),Q(`mo`,{fence:`true`,stretchy:`true`},e.value)):null;if(e.kind===`command`){let t={lbrace:`{`,rbrace:`}`,lvert:`|`,rvert:`|`,vert:`|`,lVert:`‖`,rVert:`‖`,Vert:`‖`,langle:`⟨`,rangle:`⟩`},n=Object.hasOwn(t,e.value)?t[e.value]:void 0;if(n)return this.take(),Q(`mo`,{fence:`true`,stretchy:`true`},n)}return null}parseEnvironment(){let e=this.readRawGroup().trim();if(e!==`cases`)return Q(`mtext`,null,`\\begin{${e}}`);let t=[],n=0;for(;!this.atCommand(`end`)&&this.peek().kind!==`eof`&&n<500;){n+=1;let e=[];for(;;){let t=this.parseRow({chars:new Set([`&`]),commands:new Set([`end`]),newline:!0});if(e.push(Q(`mtd`,{columnalign:`left`},...t)),!this.atPunct(`&`))break;this.take()}if(t.push(Q(`mtr`,null,...e)),this.peek().kind===`newline`)this.take();else{if(this.atCommand(`end`)||this.peek().kind===`eof`)break;this.take()}}this.atCommand(`end`)&&(this.take(),this.readRawGroup());let r=Q(`mtable`,{columnalign:`left`,columnspacing:`1em`},...t);return Q(`mrow`,null,Q(`mo`,{fence:`true`,stretchy:`true`},`{`),r)}applyScripts(e){let t=null,n=null,r=!1;for(;;)if(this.atPunct(`^`))this.take(),n=this.parseScriptArgument(),r=!0;else if(this.atPunct(`_`))this.take(),t=this.parseScriptArgument(),r=!0;else break;return r?t!==null&&n!==null?Q(`msubsup`,null,e,t,n):n===null?Q(`msub`,null,e,t):Q(`msup`,null,e,n):e}parseScriptArgument(){return this.atPunct(`{`)?this.parseBraceGroup():this.atPunct(`+`)||this.atPunct(`-`)?Q(`mrow`,null,Q(`mo`,null,this.take().value),this.parseAtom()):this.parseAtom()}readRawGroup(){if(!this.atPunct(`{`))return``;let e=this.take(),t=1,n=this.pos;for(;n<this.tokens.length;n+=1){let e=this.tokens[n];if(e.kind===`eof`)break;if(e.kind===`punct`){if(e.value===`{`)t+=1;else if(e.value===`}`&&(--t,t===0))break}}if(n>=this.tokens.length||this.tokens[n].kind===`eof`)return this.pos=n,this.source.slice(e.offset+1);let r=this.tokens[n];return this.pos=n+1,this.source.slice(e.offset+1,r.offset)}};function py({source:e,display:t=!1}){let n=ay(e),r;if(e.length>ty)r=Q(`mtext`,null,n);else try{r=new fy(e).render()}catch{r=Q(`mtext`,null,n)}let i=e.length>iy?n:e;return Q(`math`,{display:t?`block`:`inline`,className:t?`local-math local-math-block`:`local-math`,"aria-label":i},Q(`semantics`,null,Q(`mrow`,null,r),Q(`annotation`,{encoding:`application/x-tex`},i)))}var my=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),$=s(((e,t)=>{t.exports=my()}))(),hy=e=>e,gy=(0,y.createContext)(`en`);function _y({locale:e=`en`,children:t}){return(0,$.jsx)(gy.Provider,{value:e,children:t})}function vy(){return(0,y.useContext)(gy)}function yy(e,t,n){return e===`zh`?n:t}function by(){let e=vy();return(0,y.useMemo)(()=>(t,n)=>yy(e,t,n),[e])}var xy=[`var(--chart-1)`,`var(--chart-2)`,`var(--chart-3)`,`var(--chart-4)`,`var(--chart-5)`,`var(--chart-6)`,`var(--chart-7)`,`var(--chart-8)`],Sy=520,Cy=320,wy=520,Ty=320,Ey=520,Dy=120,Oy=46,ky=150,Ay=12.5,jy=10,My=100,Ny=2,Py=15,Fy=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,Iy=/^\s*\{\{([\s\S]*)\}\}\s*$/;function Ly(e){if(!Number.isFinite(e))return`—`;if(Object.is(e,-0))return`0`;let t=Math.abs(e);return t>=0xe8d4a51000||t>0&&t<1e-4?e.toExponential(3).replace(/(\.\d*?)0+e/,`$1e`).replace(/\.e/,`e`):Number(e.toFixed(6)).toString()}function Ry(e){if(!Number.isFinite(e))return`—`;let t=Math.abs(e);return t>=1e6||t>0&&t<.001?e.toExponential(2):Number(e.toFixed(4)).toString()}function zy(e){return e instanceof Error?e.message:String(e)}function By(e,t,n,r=``){let i=t?.[n];if(i===void 0)return r;try{return e.text(i)}catch{return r}}function Vy(e,t,n,r){let i=t?.[n];if(i===void 0)return r;let a=i.trim();if(!a)return null;let o=Iy.exec(a);try{let t=o?e.evaluate(o[1].trim()):Number(a);return typeof t==`number`&&Number.isFinite(t)?t:null}catch{return null}}function Hy(e,t,n,r){let i=t?.[n];if(i===void 0)return r;let a=i.trim();if(!a||a===`true`)return!0;if(a===`false`)return!1;let o=Iy.exec(a);if(!o)return r;try{let t=e.evaluate(o[1].trim());return typeof t==`boolean`?t:r}catch{return r}}function Uy(e,t,n,r){let i=Vy(e,t,n,r);return i===null||!Number.isFinite(i)?r:Math.trunc(i)}function Wy(e,t){return e.length>t?`${e.slice(0,Math.max(1,t-1))}…`:e}function Gy(e,t=8,n=2){if(!e)return[``];let r=[],i=e;for(;i&&r.length<n-1;)r.push(i.slice(0,t)),i=i.slice(t);return(i||r.length===0)&&r.push(i.length>t?`${i.slice(0,Math.max(1,t-1))}…`:i),r}function Ky(e,t){let n=Array.from(e),r=Array.from(t),i=Math.min(n.length,r.length);for(let e=0;e<i;e+=1){let t=(n[e].codePointAt(0)??0)-(r[e].codePointAt(0)??0);if(t!==0)return t}return n.length-r.length}function qy(e,t,n=5){if(!Number.isFinite(e)||!Number.isFinite(t)||t<=e)return[e];let r=(t-e)/Math.max(1,n-1),i=10**Math.floor(Math.log10(r)),a=r/i,o=(a<=1?1:a<=2?2:a<=5?5:10)*i,s=Math.ceil(e/o)*o,c=[];for(let e=s;e<=t+o*1e-9&&c.length<40;e+=o)c.push(Number(e.toFixed(10)));return c}function Jy(e,t){let n=1/0,r=-1/0;for(let t of e)Number.isFinite(t)&&(t<n&&(n=t),t>r&&(r=t));if(!Number.isFinite(n)||!Number.isFinite(r))return{min:0,max:1};if(t&&(n=Math.min(n,0),r=Math.max(r,0)),n===r){let e=Math.abs(n)>0?Math.abs(n)*.15:1;n-=e,r+=e}else{let e=(r-n)*.06;n-=e,r+=e,t&&(n=Math.min(n,0),r=Math.max(r,0))}return{min:n,max:r}}function Yy(e,t){return Math.max(46,...e.map(e=>Ry(e).length*6+(t?24:10)))}function Xy(e,t,n){let r=e.currentTarget,i=r.ownerSVGElement??r.closest(`svg`);if(!i)return;let a=Array.from(i.querySelectorAll(t)),o=a.indexOf(r);o<0||a.length===0||(e.preventDefault(),a[(o+n+a.length)%a.length]?.focus())}function Zy(e){return e.key===`Enter`||e.key===` `||e.key===`Spacebar`}function Qy(e,t=hy){return e===null?{text:``,kind:`null`,error:null}:typeof e==`string`?{text:e,kind:`string`,error:null}:typeof e==`number`?Number.isFinite(e)?{text:Ly(e),kind:`number`,error:null}:{text:t(`Cannot compute`,`无法计算`),kind:`error`,error:t(`Result is not a finite number`,`结果不是有限数字`)}:typeof e==`boolean`?{text:e?`true`:`false`,kind:`boolean`,error:null}:{text:t(`Cannot compute`,`无法计算`),kind:`array`,error:t(`Arrays must first be converted with a function such as len`,`数组需要先用 len 等函数转换`)}}function $y(e,t,n=hy){let r=``,i=null;for(let a of e??[])if(a.type===`text`||a.type===`inlineCode`||a.type===`code`)r+=a.value??``;else if(a.type===`interpolation`)try{let e=Qy(t.evaluate((a.value??``).trim()),n);e.error&&(i??=e.error),r+=e.text}catch(e){i??=zy(e),r+=n(`Cannot compute`,`无法计算`)}else if(a.type===`inlineMath`||a.type===`math`)r+=a.value??``;else if(a.type===`image`)r+=a.alt??``;else if(a.children&&a.children.length>0){let e=$y(a.children,t,n);r+=e.text,i??=e.error}else a.value&&(r+=a.value);return{text:r,error:i}}function eb(e,t,n=hy){let r=e.children??[],i=r.filter(e=>!(e.type===`text`&&!(e.value??``).trim()));if(i.length===1&&i[0].type===`interpolation`)try{let a=t.evaluate((i[0].value??``).trim()),o=Qy(a,n);return{node:e,children:r,text:o.text,value:a,kind:o.kind,numeric:o.kind===`number`?a:null,error:o.error}}catch(t){return{node:e,children:r,text:n(`Cannot compute`,`无法计算`),value:void 0,kind:`error`,numeric:null,error:zy(t)}}let a=$y(r,t,n);if(i.length>0&&i.every(e=>e.type===`text`)&&Fy.test(a.text.trim())){let t=Number(a.text.trim());if(Number.isFinite(t))return{node:e,children:r,text:a.text,value:t,kind:`number`,numeric:t,error:null}}let o=!a.text.trim()&&!a.error;return{node:e,children:r,text:a.error?n(`Cannot compute`,`无法计算`):a.text,value:a.text,kind:a.error?`error`:o?`empty`:`string`,numeric:null,error:a.error}}function tb(e,t=hy){return e?e.error?t(`Cannot compute`,`无法计算`):e.text:``}function nb(e,t,n=hy){let r=e.children?.find(e=>e.type===`table`);if(!r)return null;let i=r.children?.filter(e=>e.type===`tableRow`)??[];if(i.length===0)return null;let a=(i[0].children??[]).map(e=>eb(e,t,n));return{tableNode:r,header:a,headerText:a.map(e=>tb(e,n)),rows:i.slice(1).map((e,r)=>({index:r,cells:(e.children??[]).map(e=>eb(e,t,n))}))}}function rb(e,t){let n=!1;for(let r of e.rows){let e=r.cells[t];if(e&&e.kind!==`empty`){if(e.numeric===null)return!1;n=!0}}return n}function ib(e,t){let n=(e?.key??``).trim();return n?t.findIndex(e=>e.trim()===n):-1}function ab(e,t,n){return e<0?``:tb(t.cells[e],n).trim()}function ob(e,t,n){if(!n)return``;try{let n=e.get(t);return typeof n==`string`?n:``}catch{return``}}function sb({className:e,label:t,children:n}){let r=(0,y.useId)();return(0,$.jsxs)(`figure`,{className:`local-visual ${e}`,"aria-labelledby":r,children:[(0,$.jsx)(`figcaption`,{id:r,className:`local-visual-title`,children:t}),n]})}function cb({message:e,kind:t=`status`}){return(0,$.jsx)(`p`,{className:`local-visual-message local-visual-${t}`,role:t,children:e})}function lb({notes:e}){return e.length===0?null:(0,$.jsx)(`ul`,{className:`local-visual-notes`,role:`status`,children:e.map((e,t)=>(0,$.jsx)(`li`,{children:e},`${e}-${t}`))})}function ub({items:e,hidden:t,onToggle:n,label:r,mode:i}){let a=by(),o=i!==`static`;return(0,$.jsx)(`div`,{className:`local-visual-legend${o?``:` local-static-legend`}`,role:`group`,"aria-label":o?r:a(`Legend`,`图例`),children:e.map((e,r)=>{let i=t.has(r);return o?(0,$.jsxs)(`button`,{type:`button`,className:`local-visual-legend-item${i?` is-off`:``}`,"aria-pressed":!i,disabled:e.disabled,onClick:()=>n(r),title:i?a(`Show ${e.name}`,`显示 ${e.name}`):a(`Hide ${e.name}`,`隐藏 ${e.name}`),children:[(0,$.jsx)(`span`,{className:`local-visual-swatch`,style:{backgroundColor:e.color},"aria-hidden":`true`}),(0,$.jsxs)(`span`,{className:`local-visual-legend-text`,children:[e.name,e.detail?a(` (${e.detail})`,`(${e.detail})`):``]})]},`${e.name}-${r}`):(0,$.jsxs)(`span`,{className:`local-visual-legend-item local-static-legend-item`,children:[(0,$.jsx)(`span`,{className:`local-visual-swatch`,style:{backgroundColor:e.color},"aria-hidden":`true`}),(0,$.jsxs)(`span`,{className:`local-visual-legend-text`,children:[e.name,e.detail?a(` (${e.detail})`,`(${e.detail})`):``]})]},`${e.name}-${r}`)})})}function db({node:e,runtime:t,render:n,mode:r}){let i=by(),[a,o]=(0,y.useState)(``),[s,c]=(0,y.useState)(null),[l,u]=(0,y.useState)(1),[d,f]=(0,y.useState)(null),p=t.resetToken(e);(0,y.useEffect)(()=>{o(``),c(null),u(1),f(null)},[p]);let m=By(t,e.attrs,`label`,i(`Table`,`表格`)),h=Hy(t,e.attrs,`searchable`,!0),g=Hy(t,e.attrs,`sortable`,!0),_=Uy(t,e.attrs,`page-size`,10),v=Math.max(1,_),b=nb(e,t,i);if(!b||b.header.length===0)return(0,$.jsx)(sb,{className:`local-visual-table-block`,label:m,children:(0,$.jsx)(cb,{message:i(`Table requires a non-empty Markdown table.`,`表格需要一个非空的 Markdown 表格。`),kind:`alert`})});let x=ib(e.attrs,b.headerText),S=x>=0,C=ob(t,e,S),w=n=>{f(null);try{let r=t.set(e,n);r.length>0&&f(r.map(e=>i(et(e,`en`),et(e,`zh`))).join(`; `))}catch(e){f(zy(e))}},T=b.header.map((e,t)=>rb(b,t)),E=a.trim().toLowerCase(),D=[...b.rows.filter(e=>!E||e.cells.some(e=>tb(e,i).toLowerCase().includes(E)))];if(s){let e=T[s.column];D.sort((t,n)=>{let r=t.cells[s.column],a=n.cells[s.column],o;if(e){let e=r?.numeric??-1/0,t=a?.numeric??-1/0;o=e===t?0:e<t?-1:1}else o=Ky(tb(r,i),tb(a,i));return o===0?t.index-n.index:s.direction===`asc`?o:-o})}let O=Math.max(1,Math.ceil(D.length/v)),k=Math.min(l,O),A=D.slice((k-1)*v,k*v),j=e=>{u(1),c(t=>!t||t.column!==e?{column:e,direction:`asc`}:t.direction===`asc`?{column:e,direction:`desc`}:null)},M=e=>!s||s.column!==e?null:(0,$.jsx)(`span`,{className:`local-visual-sort-marker`,"aria-hidden":`true`,children:s.direction===`asc`?`▲`:`▼`});return r===`static`?(0,$.jsxs)(sb,{className:`local-visual-table-block local-static-table-block`,label:m,children:[(0,$.jsx)(`div`,{className:`local-visual-table-scroll local-static-table-scroll`,children:(0,$.jsxs)(`table`,{className:`local-visual-table local-static-table`,children:[(0,$.jsx)(`caption`,{className:`local-visual-sr-only`,children:m}),(0,$.jsx)(`thead`,{children:(0,$.jsx)(`tr`,{children:b.header.map((e,t)=>(0,$.jsx)(`th`,{scope:`col`,className:T[t]?`is-numeric`:void 0,children:tb(e,i)},`head-${t}`))})}),(0,$.jsx)(`tbody`,{children:b.rows.map(e=>{let t=S?ab(x,e,i):``,r=S&&t!==``&&t===C;return(0,$.jsx)(`tr`,{className:r?`is-selected local-static-selected`:void 0,children:b.header.map((t,a)=>{let o=e.cells[a];return(0,$.jsxs)(`td`,{className:T[a]?`is-numeric`:void 0,children:[r&&a===0?(0,$.jsx)(`span`,{className:`local-visual-sr-only`,children:i(`Selected row`,`已选择行`)}):null,o?.error?(0,$.jsx)(`span`,{className:`local-visual-cell-error`,title:o.error,children:i(`Cannot compute`,`无法计算`)}):n(o?.children??[])]},`cell-${e.index}-${a}`)})},`row-${e.index}`)})})]})}),b.rows.length===0?(0,$.jsx)(cb,{message:i(`No rows to display`,`没有可显示的行`)}):null]}):(0,$.jsxs)(sb,{className:`local-visual-table-block`,label:m,children:[h?(0,$.jsxs)(`label`,{className:`local-visual-search`,children:[(0,$.jsx)(`span`,{children:i(`Search`,`搜索`)}),(0,$.jsx)(`input`,{type:`search`,value:a,placeholder:i(`Search all columns`,`搜索所有列`),"aria-label":i(`Search ${m}`,`搜索${m}`),onChange:e=>{o(e.target.value),u(1)}})]}):null,(0,$.jsx)(`div`,{className:`local-visual-table-scroll`,children:(0,$.jsxs)(`table`,{className:`local-visual-table`,children:[(0,$.jsx)(`caption`,{className:`local-visual-sr-only`,children:m}),(0,$.jsx)(`thead`,{children:(0,$.jsxs)(`tr`,{children:[S?(0,$.jsx)(`th`,{scope:`col`,className:`local-visual-select-column`,children:(0,$.jsx)(`span`,{className:`local-visual-sr-only`,children:i(`Select`,`选择`)})}):null,b.header.map((e,t)=>{let n=s&&s.column===t?s.direction===`asc`?`ascending`:`descending`:`none`;return(0,$.jsx)(`th`,{scope:`col`,"aria-sort":n,className:T[t]?`is-numeric`:void 0,children:g?(0,$.jsxs)(`button`,{type:`button`,className:`local-visual-sort-button${s&&s.column===t?` is-sorted`:``}`,onClick:()=>j(t),title:i(`Click to cycle ascending, descending and original order`,`点击切换升序、降序和原始顺序`),children:[tb(e,i),M(t)]}):tb(e,i)},`head-${t}`)})]})}),(0,$.jsx)(`tbody`,{children:A.map(e=>{let t=S?ab(x,e,i):``,r=S&&t!==``&&t===C;return(0,$.jsxs)(`tr`,{className:r?`is-selected`:void 0,children:[S?(0,$.jsx)(`td`,{className:`local-visual-select-cell`,children:t?(0,$.jsx)(`button`,{type:`button`,className:`local-visual-select-button${r?` is-selected`:``}`,"aria-pressed":r,"aria-label":i(`Select row ${t}`,`选择行 ${t}`),title:i(`Select row ${t}`,`选择行 ${t}`),onClick:()=>w(t),children:(0,$.jsx)(`span`,{"aria-hidden":`true`,children:r?`●`:`○`})}):null}):null,b.header.map((t,r)=>{let a=e.cells[r];return(0,$.jsx)(`td`,{className:T[r]?`is-numeric`:void 0,children:a?.error?(0,$.jsx)(`span`,{className:`local-visual-cell-error`,title:a.error,children:i(`Cannot compute`,`无法计算`)}):n(a?.children??[])},`cell-${e.index}-${r}`)})]},`row-${e.index}`)})})]})}),d?(0,$.jsx)(cb,{message:d,kind:`alert`}):null,D.length===0?(0,$.jsx)(cb,{message:i(`No matching results`,`没有匹配结果`)}):null,O>1?(0,$.jsxs)(`nav`,{className:`local-visual-pagination`,"aria-label":i(`Table pagination`,`表格分页`),children:[(0,$.jsx)(`button`,{type:`button`,disabled:k<=1,onClick:()=>u(e=>Math.max(1,e-1)),children:i(`Previous`,`上一页`)}),(0,$.jsx)(`span`,{children:i(`Page ${k} of ${O} · ${D.length} rows`,`第 ${k} / ${O} 页 · 共 ${D.length} 行`)}),(0,$.jsx)(`button`,{type:`button`,disabled:k>=O,onClick:()=>u(e=>Math.min(O,e+1)),children:i(`Next`,`下一页`)})]}):null]})}var fb=[`bar`,`line`,`area`,`scatter`,`donut`];function pb(e,t,n,r,i,a){let o=(n,r)=>[e+n*Math.cos(r),t+n*Math.sin(r)],[s,c]=o(n,i),[l,u]=o(n,a),[d,f]=o(r,a),[p,m]=o(r,i),h=+(a-i>Math.PI);return[`M ${s} ${c}`,`A ${n} ${n} 0 ${h} 1 ${l} ${u}`,`L ${d} ${f}`,`A ${r} ${r} 0 ${h} 0 ${p} ${m}`,`Z`].join(` `)}function mb({node:e,runtime:t,mode:n}){let r=by(),i=n===`static`,[a,o]=(0,y.useState)(new Set),[s,c]=(0,y.useState)(new Set),[l,u]=(0,y.useState)(null),[d,f]=(0,y.useState)(null),p=t.resetToken(e);(0,y.useEffect)(()=>{o(new Set),c(new Set),u(null),f(null)},[p]);let m=(0,y.useId)(),h=By(t,e.attrs,`title`,``)||By(t,e.attrs,`label`,``)||r(`Chart`,`图表`),g=(e.attrs?.kind??`bar`).trim().toLowerCase(),_=fb.includes(g)?g:null,v=By(t,e.attrs,`x-label`,``),b=By(t,e.attrs,`y-label`,``),x=nb(e,t,r);if(!x||x.header.length===0)return(0,$.jsx)(sb,{className:`local-visual-chart`,label:h,children:(0,$.jsx)(cb,{message:r(`chart body requires a non-empty Markdown table.`,`chart 正文需要一个非空的 Markdown 表格。`),kind:`alert`})});let S=x.headerText.map(e=>e.trim()),C=ib(e.attrs,S),w=C>=0,T=ob(t,e,w),E=n=>{f(null);try{let i=t.set(e,n);i.length>0&&f(i.map(e=>r(et(e,`en`),et(e,`zh`))).join(`; `))}catch(e){f(zy(e))}},D=x.rows.map(e=>({index:e.index,cells:e.cells,texts:S.map((t,n)=>tb(e.cells[n],r)),keyValue:ab(C,e,r)}));if(!_)return(0,$.jsx)(sb,{className:`local-visual-chart`,label:h,children:(0,$.jsx)(cb,{message:r(`Unknown chart type "${g}".`,`未知图表类型“${g}”。`),kind:`alert`})});let O=[],k=[],A=(e.attrs?.x??``).trim(),j=A?S.indexOf(A):0;(j<0||j>=S.length)&&k.push(r(`x column "${A}" does not exist.`,`x 列“${A}”不存在。`));let M=(e.attrs?.y??``).split(`,`).map(e=>e.trim()).filter(Boolean),N=[];if(_===`donut`){if(M.length>1)k.push(r(`donut can only use one numeric column; specify a single column in y.`,`donut 只能使用一个数值列,请在 y 中指定唯一列。`));else if(M.length===1){let e=S.indexOf(M[0]);e<0?k.push(r(`y column "${M[0]}" does not exist.`,`y 列“${M[0]}”不存在。`)):N=[e]}else S.length===2?N=[1]:k.push(r(`A donut chart with more than two columns must use y to specify the single numeric column.`,`donut 多于两列时必须用 y 指定唯一数值列。`))}else if(M.length>0)for(let e of M){let t=S.indexOf(e);t<0?k.push(r(`y column "${e}" does not exist.`,`y 列“${e}”不存在。`)):N.includes(t)||N.push(t)}else N=S.map((e,t)=>t).filter(e=>e!==j);if(k.length===0&&N.length===0&&k.push(r(`Chart requires at least one numeric series.`,`图表至少需要一个数值系列。`)),k.length>0)return(0,$.jsx)(sb,{className:`local-visual-chart local-visual-chart-${_}`,label:h,children:k.map((e,t)=>(0,$.jsx)(cb,{message:e,kind:`alert`},`${e}-${t}`))});let P=N.map(e=>S[e]||r(`Series ${e+1}`,`系列 ${e+1}`)),F=0,ee=0,I=D.map(e=>{let t=e.cells[j],n=e.texts[j]||r(`Item ${e.index+1}`,`第 ${e.index+1} 项`),i=t&&t.numeric!==null?t.numeric:null,a=N.map(t=>{let n=e.cells[t];return!n||n.kind===`empty`||n.numeric===null?(F+=1,null):(_===`donut`&&n.numeric<0&&(ee+=1),n.numeric)});return{index:e.index,label:n,xValue:i,values:a,cells:e.cells,keyValue:e.keyValue}});F>0&&O.push(r(`${F} values are empty or cannot be computed; gaps are kept in the chart.`,`${F} 个数值为空或无法计算,图表中保留空缺。`));for(let e of N)rb(x,e)||O.push(r(`Column "${S[e]}" is not purely numeric; non-numeric values are treated as gaps.`,`列“${S[e]}”不是纯数值列,非数值按空缺处理。`));_===`donut`&&ee>0&&O.push(r(`Donut values must be non-negative; ignored ${ee} negative values.`,`环形图数值必须非负,已忽略 ${ee} 个负值。`)),_===`scatter`&&!rb(x,j)&&O.push(r(`scatter horizontal axis column "${S[j]}" requires numeric values.`,`scatter 的横轴列“${S[j]}”需要数值。`));let te=e=>{u(null),o(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},ne=e=>{u(null),c(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},re=P.map((e,t)=>({name:e,color:xy[t%xy.length]}));if(_===`donut`){let e=I.map(e=>e.values[0]),t=e.map(e=>e!==null&&e>=0?e:0),a=t.reduce((e,t,n)=>!i&&s.has(n)?e:e+t,0),o=I.map((n,r)=>({name:n.label,color:xy[r%xy.length],detail:e[r]===null?`—`:Ly(e[r]),disabled:t[r]<=0}));if(a<=0)return(0,$.jsxs)(sb,{className:`local-visual-chart local-visual-chart-donut`,label:h,children:[(0,$.jsx)(cb,{message:r(`No share to display`,`暂无占比`)}),(0,$.jsx)(lb,{notes:O}),(0,$.jsx)(ub,{items:o,hidden:s,onToggle:ne,label:r(`Legend`,`图例`),mode:n})]});let c=-Math.PI/2,f=[];I.forEach((e,n)=>{if(!i&&s.has(n))return;let r=t[n];if(r<=0)return;let o=r/a*Math.PI*2,l=c,u=c+o;c=u,f.push({key:`donut:${n}`,label:e.label,value:r,start:l,end:u,color:xy[n%xy.length],x:170,y:120,rowKey:e.keyValue})});let p=l?r(`${l.label}: ${Ly(l.value)}`,`${l.label}:${Ly(l.value)}`):r(`Focus a slice or legend to view values`,`聚焦扇区或图例查看数值`);return(0,$.jsxs)(sb,{className:`local-visual-chart local-visual-chart-donut${i?` local-static-chart`:``}`,label:h,children:[i?null:(0,$.jsx)(`div`,{className:`local-visual-readout`,id:m,"aria-live":`polite`,children:p}),(0,$.jsx)(`div`,{className:`local-visual-svg-wrap`,children:(0,$.jsxs)(`svg`,{className:`local-visual-svg`,viewBox:`0 0 340 240`,role:`group`,"aria-label":r(`${h}, donut chart, ${I.length} items`,`${h},环形图,共 ${I.length} 项`),"aria-describedby":i?void 0:m,children:[(0,$.jsxs)(`g`,{className:`local-visual-donut-center`,"aria-hidden":`true`,children:[(0,$.jsx)(`text`,{x:170,y:118,textAnchor:`middle`,className:`local-visual-donut-total`,children:Ly(a)}),(0,$.jsx)(`text`,{x:170,y:138,textAnchor:`middle`,className:`local-visual-donut-caption`,children:Wy(P[0],14)})]}),f.map(e=>{let t=w&&e.rowKey!==``,n=t&&e.rowKey===T,a={key:e.key,series:P[0],label:e.label,value:e.value,x:e.x,y:e.y,rowKey:e.rowKey,selectable:t,selected:n},o=i?{}:{"data-chart-mark":``,...t?{"data-chart-selectable":``}:{},tabIndex:0,role:t?`button`:`img`,...t?{"aria-pressed":n}:{},"aria-label":r(`${e.label}: ${Ly(e.value)}`,`${e.label}:${Ly(e.value)}`),onFocus:()=>u(a),onBlur:()=>u(null),onPointerEnter:()=>u(a),onPointerLeave:()=>u(null),onClick:t?()=>E(e.rowKey):void 0,onKeyDown:n=>{t&&Zy(n)?(n.preventDefault(),E(e.rowKey)):n.key===`ArrowRight`||n.key===`ArrowDown`?Xy(n,`[data-chart-mark]`,1):(n.key===`ArrowLeft`||n.key===`ArrowUp`)&&Xy(n,`[data-chart-mark]`,-1)}},s=`local-visual-donut-slice${n?` is-selected`:``}`;return e.end-e.start>=Math.PI*2-1e-6?(0,$.jsx)(`circle`,{className:s,cx:170,cy:120,r:77,fill:`none`,style:{stroke:e.color},strokeWidth:30,...o,children:(0,$.jsx)(`title`,{children:r(`${e.label}: ${Ly(e.value)}`,`${e.label}:${Ly(e.value)}`)})},e.key):(0,$.jsx)(`path`,{className:s,d:pb(170,120,92,62,e.start,e.end),style:{fill:e.color},...o,children:(0,$.jsx)(`title`,{children:r(`${e.label}: ${Ly(e.value)}`,`${e.label}:${Ly(e.value)}`)})},e.key)})]})}),(0,$.jsx)(ub,{items:o,hidden:s,onToggle:ne,label:r(`Legend, toggle slices`,`图例,可开关扇区`),mode:n}),d?(0,$.jsx)(cb,{message:d,kind:`alert`}):null,(0,$.jsx)(lb,{notes:O})]})}let ie=P.map((e,t)=>t).filter(e=>i||!a.has(e));if(ie.length===0)return(0,$.jsxs)(sb,{className:`local-visual-chart local-visual-chart-${_}`,label:h,children:[(0,$.jsx)(cb,{message:r(`All series are hidden in the legend`,`所有系列已在图例中关闭`)}),(0,$.jsx)(ub,{items:re,hidden:a,onToggle:te,label:r(`Legend, toggle series`,`图例,可开关系列`),mode:n})]});let ae=rb(x,j),oe=_===`scatter`?!0:_===`line`||_===`area`?ae:!1,se=oe?I.filter(e=>e.xValue!==null):I;oe&&se.length<I.length&&O.push(r(`${I.length-se.length} rows have an empty or non-numeric horizontal axis and are not plotted.`,`${I.length-se.length} 行横轴为空或不是数值,未参与绘制。`));let ce=[];for(let e of se)for(let t of ie){let n=e.values[t];n!==null&&ce.push(n)}if(se.length===0)return(0,$.jsxs)(sb,{className:`local-visual-chart local-visual-chart-${_}`,label:h,children:[(0,$.jsx)(cb,{message:r(`No data rows to plot`,`没有可绘制的数据行`)}),(0,$.jsx)(lb,{notes:O}),(0,$.jsx)(ub,{items:re,hidden:a,onToggle:te,label:r(`Legend, toggle series`,`图例,可开关系列`),mode:n})]});if(ce.length===0)return(0,$.jsxs)(sb,{className:`local-visual-chart local-visual-chart-${_}`,label:h,children:[(0,$.jsx)(cb,{message:r(`No values to read`,`没有可读取的数值`)}),(0,$.jsx)(lb,{notes:O}),(0,$.jsx)(ub,{items:re,hidden:a,onToggle:te,label:r(`Legend, toggle series`,`图例,可开关系列`),mode:n})]});let le=Jy(ce,_===`bar`||_===`area`),ue=qy(le.min,le.max,5),de=Yy(ue,!!b),fe=506-de,pe=e=>16+(le.max-e)/(le.max-le.min)*258,L=pe(Math.max(le.min,Math.min(le.max,0))),R=oe&&se.length>0?Jy(se.map(e=>e.xValue).filter(e=>e!==null),!1):null,me=fe/Math.max(1,I.length),he=e=>de+me*(e+.5),ge=e=>de+(e-R.min)/(R.max-R.min)*fe,_e=(e,t)=>R?e.xValue===null?null:ge(e.xValue):he(t),ve=[];if(R)ve.push(...qy(R.min,R.max,5));else{let e=Math.max(1,Math.ceil(I.length/6));for(let t=0;t<I.length;t+=e)ve.push(t);let t=I.length-1;t>=0&&ve[ve.length-1]!==t&&(ve.length>1&&t-ve[ve.length-1]<e*.6?ve[ve.length-1]=t:ve.push(t))}let ye=e=>R?de+(e-R.min)/(R.max-R.min)*fe:he(e),be=i||!l?null:R?(0,$.jsx)(`line`,{className:`local-visual-guide`,x1:Math.max(de,Math.min(506,l.x)),x2:Math.max(de,Math.min(506,l.x)),y1:16,y2:274}):null,xe=e=>i?{}:{"data-chart-mark":``,...e.selectable?{"data-chart-selectable":``}:{},tabIndex:0,role:e.selectable?`button`:`img`,...e.selectable?{"aria-pressed":e.selected}:{},"aria-label":r(`${e.series}, ${e.label}${e.selectable&&e.rowKey!==e.label?`, ${e.rowKey}`:``}: ${Ly(e.value)}`,`${e.series},${e.label}${e.selectable&&e.rowKey!==e.label?`,${e.rowKey}`:``}:${Ly(e.value)}`),onFocus:()=>u(e),onBlur:()=>u(null),onPointerEnter:()=>u(e),onPointerLeave:()=>u(null),onClick:e.selectable?()=>E(e.rowKey):void 0,onKeyDown:t=>{e.selectable&&Zy(t)?(t.preventDefault(),E(e.rowKey)):t.key===`ArrowRight`||t.key===`ArrowDown`?Xy(t,`[data-chart-mark]`,1):(t.key===`ArrowLeft`||t.key===`ArrowUp`)&&Xy(t,`[data-chart-mark]`,-1)}},Se=(e,t,n,r,i)=>{let a=w&&t.keyValue!==``;return{key:`${e}:${t.index}`,series:P[e],label:t.label,value:n,x:r,y:i,rowKey:t.keyValue,selectable:a,selected:a&&t.keyValue===T}},Ce=[];if(_===`bar`){let e=me*.76,t=Math.max(1,e/Math.max(1,ie.length));I.forEach((n,i)=>{ie.forEach((a,o)=>{let s=n.values[a];if(s===null)return;let c=de+me*i+(me-e)/2+o*t,l=Math.max(1,Math.abs(pe(s)-L)),u=s>=0?L-l:L,d=Math.max(1.5,t-1),f=Math.min(4,d/2,l/2),p=Se(a,n,s,c+t/2,u+l/2);Ce.push((0,$.jsx)(`rect`,{className:`local-visual-bar${p.selected?` is-selected`:``}`,x:c,y:u,width:d,height:l,rx:f,style:{fill:xy[a%xy.length]},...xe(p),children:(0,$.jsx)(`title`,{children:r(`${p.series}, ${p.label}: ${Ly(p.value)}`,`${p.series},${p.label}:${Ly(p.value)}`)})},`bar-${a}-${n.index}`))})})}let we=[],Te=[],Ee=[];if(_===`line`||_===`area`)for(let e of ie){let t=[],n=[],i=()=>{n.length>0&&t.push(n),n=[]};I.forEach((t,r)=>{let a=t.values[e],o=_e(t,r);a===null||o===null?i():n.push({row:t,value:a,x:o,y:pe(a)})}),i();for(let n of t){if(n.length>=2){let t=n.map((e,t)=>`${t===0?`M`:`L`} ${e.x} ${e.y}`).join(` `);if(we.push((0,$.jsx)(`path`,{className:`local-visual-line`,d:t,fill:`none`,style:{stroke:xy[e%xy.length]},strokeWidth:2.4,strokeLinejoin:`round`,strokeLinecap:`round`},`line-${e}-${n[0].row.index}`)),_===`area`){let t=L,r=n[0],i=n[n.length-1],a=`M ${r.x} ${t} ${n.map(e=>`L ${e.x} ${e.y}`).join(` `)} L ${i.x} ${t} Z`;Te.push((0,$.jsx)(`path`,{className:`local-visual-area`,d:a,style:{fill:xy[e%xy.length]}},`area-${e}-${r.row.index}`))}}for(let t of n){let n=Se(e,t.row,t.value,t.x,t.y);Ee.push((0,$.jsxs)(`g`,{className:`local-visual-point-group`,children:[(0,$.jsx)(`circle`,{className:`local-visual-hit${n.selected?` is-selected`:``}`,cx:t.x,cy:t.y,r:12,fill:`transparent`,...xe(n),children:(0,$.jsx)(`title`,{children:r(`${n.series}, ${n.label}: ${Ly(n.value)}`,`${n.series},${n.label}:${Ly(n.value)}`)})}),(0,$.jsx)(`circle`,{className:`local-visual-point${n.selected?` is-selected`:``}`,cx:t.x,cy:t.y,r:4.5,style:{fill:xy[e%xy.length],stroke:`var(--surface)`},strokeWidth:1.5,pointerEvents:`none`})]},`point-${e}-${t.row.index}`))}}}_===`scatter`&&I.forEach((e,t)=>{let n=_e(e,t);n!==null&&ie.forEach(t=>{let i=e.values[t];if(i===null)return;let a=pe(i),o=Se(t,e,i,n,a);Ee.push((0,$.jsxs)(`g`,{className:`local-visual-point-group`,children:[(0,$.jsx)(`circle`,{className:`local-visual-hit${o.selected?` is-selected`:``}`,cx:n,cy:a,r:15,fill:`transparent`,...xe(o),children:(0,$.jsx)(`title`,{children:r(`${o.series}, ${o.label}: ${Ly(o.value)}`,`${o.series},${o.label}:${Ly(o.value)}`)})}),(0,$.jsx)(`circle`,{className:`local-visual-point${o.selected?` is-selected`:``}`,cx:n,cy:a,r:6,style:{fill:xy[t%xy.length],stroke:`var(--surface)`},strokeWidth:1.5,pointerEvents:`none`})]},`scatter-${t}-${e.index}`))})});let De=l?r(`${l.series} · ${l.label}: ${Ly(l.value)}`,`${l.series} · ${l.label}:${Ly(l.value)}`):r(`Focus or point at a mark; use arrow keys to change the readout`,`聚焦或指向图形,用方向键切换读数`),Oe=r(`${h}, ${_} chart, ${I.length} items, ${ie.length} series`,`${h},${_} 图,共 ${I.length} 项,${ie.length} 个系列`);return(0,$.jsxs)(sb,{className:`local-visual-chart local-visual-chart-${_}${i?` local-static-chart`:``}`,label:h,children:[i?null:(0,$.jsx)(`div`,{className:`local-visual-readout`,id:m,"aria-live":`polite`,children:De}),(0,$.jsx)(`div`,{className:`local-visual-svg-wrap`,children:(0,$.jsxs)(`svg`,{className:`local-visual-svg`,viewBox:`0 0 ${Sy} ${Cy}`,role:`group`,"aria-label":Oe,"aria-describedby":i?void 0:m,children:[ue.map(e=>(0,$.jsxs)(`g`,{children:[(0,$.jsx)(`line`,{className:`local-visual-grid-line`,x1:de,x2:506,y1:pe(e),y2:pe(e)}),(0,$.jsx)(`text`,{className:`local-visual-axis-label`,x:de-6,y:pe(e),textAnchor:`end`,dominantBaseline:`middle`,children:Ry(e)})]},`y-${e}`)),le.min<0&&le.max>0?(0,$.jsx)(`line`,{className:`local-visual-zero-line`,x1:de,x2:506,y1:L,y2:L}):null,(0,$.jsx)(`line`,{className:`local-visual-axis-line`,x1:de,x2:506,y1:274,y2:274}),ve.map(e=>{let t=ye(e),n=R?Ry(e):Wy(I[e]?.label??``,8);return(0,$.jsxs)(`g`,{children:[(0,$.jsx)(`line`,{className:`local-visual-tick`,x1:t,x2:t,y1:274,y2:279}),(0,$.jsxs)(`text`,{className:`local-visual-axis-label`,x:t,y:293,textAnchor:`middle`,children:[n,!R&&I[e]?(0,$.jsx)(`title`,{children:I[e].label}):null]})]},`x-${e}`)}),v?(0,$.jsx)(`text`,{className:`local-visual-axis-title`,x:(de+506)/2,y:318,textAnchor:`middle`,children:v}):null,b?(0,$.jsx)(`text`,{className:`local-visual-axis-title`,transform:`translate(12 145) rotate(-90)`,textAnchor:`middle`,children:b}):null,Te,we,be,Ce,Ee]})}),(0,$.jsx)(ub,{items:re,hidden:a,onToggle:te,label:r(`Legend, toggle series`,`图例,可开关系列`),mode:n}),d?(0,$.jsx)(cb,{message:d,kind:`alert`}):null,(0,$.jsx)(lb,{notes:O})]})}var hb=64,gb=new WeakMap,_b=new WeakMap;function vb(e,t){let n=gb.get(e);return n&&n.revision===t||(n={revision:t,requestedPoints:new Map,evaluation:{steps:0,limit:k}},gb.set(e,n)),n}function yb(e){let t=_b.get(e);return t||(t=new Map,_b.set(e,t)),t}function bb(e,t,n){if(e.size>=hb){let t=e.keys().next().value;t!==void 0&&e.delete(t)}return e.set(t,n),n}function xb(e,t,n){return e.map(e=>{let r=/^y\s*=\s*([\s\S]+)$/.exec((e.value??``).trim());if(!r)return`\u0003${n}`;try{let e=Mn(r[1].trim());return JSON.stringify(e.dependencies.map(e=>t[e]??null))}catch{return`\u0003${n}`}}).join(``)}function Sb(e,t,n,r,i,a,o,s,c,l=hy){let u=yb(s),d=u.get(t);if(d)return d;let f=vb(s,c),p=e=>bb(u,t,{ok:!1,message:e});if(n.length>16)return p(l(`plot supports at most 16 curves, but has ${n.length}.`,`plot 最多支持 16 条曲线,当前为 ${n.length} 条。`));let m=n.length*o;f.requestedPoints.set(e,m);let h=0;for(let e of f.requestedPoints.values())h+=e;if(h>2e4)return p(l(`The document's plot sample count exceeds the limit: ${h} requested, at most ${O} allowed. Reduce curves or samples.`,`整篇文档的绘图采样点超过上限:已请求 ${h} 个,最多 ${O} 个。请减少曲线或采样数。`));let g=[],_={message:null},v=n.map((e,t)=>{let n=(e.value??``).trim(),s=/^y\s*=\s*([\s\S]+)$/.exec(n);if(!s)return g.push(l(`Curve ${t+1}: cannot compute (each formula block must be written as y = expression).`,`曲线 ${t+1}:无法计算(每块公式需写成 y = 表达式)。`)),{source:n,expression:null,points:[],endpoint:null,error:`formula`};try{let e=Mn(s[1].trim()),t=In(e,r,i,a,o,f.evaluation);return{source:n,expression:e,points:t.points,endpoint:t.endpoint,error:null}}catch(e){return e instanceof B&&e.code===`latex-budget`?(_.message=e.message,{source:n,expression:null,points:[],endpoint:null,error:e.message}):(g.push(l(`Curve ${t+1}: cannot compute (${zy(e)}).`,`曲线 ${t+1}:无法计算(${zy(e)})。`)),{source:n,expression:null,points:[],endpoint:null,error:zy(e)})}});return _.message===null?bb(u,t,{ok:!0,curves:v,notes:g}):p(l(`Plot computation exceeded the shared execution budget: ${_.message}`,`绘图计算超过共享执行预算:${_.message}`))}function Cb(e){if(e.length===0)return 0;let t=[...e].sort((e,t)=>e-t),n=Math.floor(t.length/2);return t.length%2==0?(t[n-1]+t[n])/2:t[n]}function wb(e,t,n,r){let i=[],a=[],o=(e,i)=>{let a=Math.abs(i.y-e.y),o=e.y*i.y<0&&Math.min(Math.abs(e.y),Math.abs(i.y))>Math.max(1,n*8),s=a>t*.8&&a>Math.max(r,1e-9)*10;return o||s};for(let t of e){if(t.y===null){a.length>0&&i.push(a),a=[];continue}let e={x:t.x,y:t.y},n=a[a.length-1];n&&o(n,e)&&(i.push(a),a=[]),a.push(e)}return a.length>0&&i.push(a),i}function Tb({node:e,runtime:t,mode:n}){let r=by(),i=vy(),a=n===`static`,[o,s]=(0,y.useState)(null),c=t.resetToken(e);(0,y.useEffect)(()=>{s(null)},[c]);let l=(0,y.useId)(),u=By(t,e.attrs,`label`,``)||r(`Function plot`,`函数图`),d=By(t,e.attrs,`x-label`,`x`),f=By(t,e.attrs,`y-label`,`y`),p=Vy(t,e.attrs,`min`,-10),m=Vy(t,e.attrs,`max`,10),h=Math.min(2e3,Math.max(2,Uy(t,e.attrs,`samples`,200))),g=(e.children??[]).filter(e=>e.type===`math`||e.type===`inlineMath`),_=(()=>{try{return{...t.snapshot().state}}catch{return{}}})(),v=0;try{v=t.snapshot().revision}catch{v=0}let b=g.map(e=>`${e.id}\u0000${e.value??``}`).join(``),x=`${e.id}\u0000${p}\u0000${m}\u0000${h}\u0000${i}\u0000${b}`,S=xb(g,_,v),C=`${x}\u0002${S}`,w=(0,y.useMemo)(()=>g.length===0||p===null||m===null||!(m>p)?{ok:!0,curves:[],notes:[]}:Sb(e.id,C,g,_,p,m,h,t,v,r),[x,S,e.id,t,r]);if(g.length===0)return(0,$.jsx)(sb,{className:`local-visual-plot`,label:u,children:(0,$.jsx)(cb,{message:r(`plot body requires one or more $$ formula blocks.`,`plot 正文需要一个或多个 $$ 公式块。`),kind:`alert`})});if(p===null||m===null||!(m>p))return(0,$.jsx)(sb,{className:`local-visual-plot`,label:u,children:(0,$.jsx)(cb,{message:r(`plot min must be less than max.`,`plot 的 min 必须小于 max。`),kind:`alert`})});if(!w.ok)return(0,$.jsx)(sb,{className:`local-visual-plot`,label:u,children:(0,$.jsx)(cb,{message:w.message,kind:`alert`})});let{curves:T,notes:E}=w,D=T.flatMap(e=>e.points.filter(e=>e.y!==null&&Number.isFinite(e.y))),O=(0,$.jsx)(`div`,{className:`local-visual-plot-legend`,role:`list`,"aria-label":r(`Curve legend`,`曲线图例`),children:T.map((e,t)=>(0,$.jsxs)(`div`,{className:`local-visual-plot-legend-item`,role:`listitem`,children:[(0,$.jsx)(`span`,{className:`local-visual-swatch`,style:{backgroundColor:xy[t%xy.length]},"aria-hidden":`true`}),(0,$.jsx)(`span`,{className:`local-visual-plot-legend-text`,children:(0,$.jsx)(`span`,{className:`local-visual-plot-formula`,children:(0,$.jsx)(py,{source:e.source})})})]},`curve-legend-${t}`))});if(D.length===0)return(0,$.jsxs)(sb,{className:`local-visual-plot`,label:u,children:[(0,$.jsx)(cb,{message:r(`No plottable values in the current range`,`当前范围内没有可绘制的值`)}),(0,$.jsx)(lb,{notes:E}),O]});let A=Jy(D.map(e=>e.y),!1),j=qy(A.min,A.max,5),M=qy(p,m,5),N=Yy(j,!!f),P=506-N,F=e=>N+(e-p)/(m-p)*P,ee=e=>16+(A.max-e)/(A.max-A.min)*258,I=Cb(D.map(e=>Math.abs(e.y))),te=[];for(let e of T)for(let t=1;t<e.points.length;t+=1){let n=e.points[t-1],r=e.points[t];n.y!==null&&r.y!==null&&te.push(Math.abs(r.y-n.y))}let ne=Cb(te),re=A.max-A.min,ie=T.map(e=>wb(e.points,re,I,ne)),ae={steps:0,limit:k},oe=(e,t)=>{if(!e.expression)return null;try{let n=e.expression.evaluate(t,_,ae);return typeof n==`number`&&Number.isFinite(n)?n:null}catch{return null}},se=e=>Math.max(p,Math.min(m,e)),ce=(m-p)/100,le=e=>{let t=e.currentTarget.getBoundingClientRect();if(t.width===0)return;let n=Math.max(0,Math.min(1,(e.clientX-t.left)/t.width));s(p+n*(m-p))},ue=e=>{let t=e.shiftKey?10:1,n=o;if(e.key===`ArrowRight`)n=(o??(p+m)/2)+ce*t;else if(e.key===`ArrowLeft`)n=(o??(p+m)/2)-ce*t;else if(e.key===`Home`)n=p;else if(e.key===`End`)n=m;else return;e.preventDefault(),s(se(n))},de=a||o===null?null:se(o),fe=de===null?r(`Range [${Ly(p)}, ${Ly(m)}] · ${h} samples; use arrow keys or pointer to read values`,`区间 [${Ly(p)}, ${Ly(m)}] · ${h} 个采样点;用方向键或指针读取数值`):`${r(`x = ${Ly(de)}; `,`x = ${Ly(de)};`)}${T.map((e,t)=>{let n=oe(e,de),i=e.error?r(`cannot compute`,`无法计算`):n===null?r(`undefined`,`无定义`):Ly(n);return r(`Curve ${t+1}: `,`曲线 ${t+1}:`)+i}).join(r(`; `,`;`))}`,pe=de===null?null:T.map((e,t)=>{let n=oe(e,de);return n===null||!e.expression?null:(0,$.jsx)(`circle`,{className:`local-visual-active-point`,cx:F(de),cy:ee(n),r:4.5,style:{fill:xy[t%xy.length],stroke:`var(--surface)`},strokeWidth:1.5},`active-${t}`)});return(0,$.jsxs)(sb,{className:`local-visual-plot`,label:u,children:[a?null:(0,$.jsx)(`div`,{className:`local-visual-readout`,id:l,"aria-live":`polite`,children:fe}),(0,$.jsx)(`div`,{className:`local-visual-svg-wrap`,children:(0,$.jsxs)(`svg`,{className:`local-visual-svg`,viewBox:`0 0 ${wy} ${Ty}`,role:`group`,"aria-label":r(`${u}, range ${Ly(p)} to ${Ly(m)}, ${h} samples`,`${u},区间 ${Ly(p)} 到 ${Ly(m)},${h} 个采样点`),"aria-describedby":a?void 0:l,tabIndex:a?void 0:0,onPointerMove:a?void 0:le,onPointerLeave:a?void 0:()=>s(null),onFocus:a?void 0:()=>s(e=>e??(p+m)/2),onBlur:a?void 0:()=>s(null),onKeyDown:a?void 0:ue,children:[j.map(e=>(0,$.jsxs)(`g`,{children:[(0,$.jsx)(`line`,{className:`local-visual-grid-line`,x1:N,x2:506,y1:ee(e),y2:ee(e)}),(0,$.jsx)(`text`,{className:`local-visual-axis-label`,x:N-6,y:ee(e),textAnchor:`end`,dominantBaseline:`middle`,children:Ry(e)})]},`y-${e}`)),A.min<0&&A.max>0?(0,$.jsx)(`line`,{className:`local-visual-zero-line`,x1:N,x2:506,y1:ee(0),y2:ee(0)}):null,(0,$.jsx)(`line`,{className:`local-visual-axis-line`,x1:N,x2:506,y1:274,y2:274}),M.map(e=>(0,$.jsxs)(`g`,{children:[(0,$.jsx)(`line`,{className:`local-visual-tick`,x1:F(e),x2:F(e),y1:274,y2:279}),(0,$.jsx)(`text`,{className:`local-visual-axis-label`,x:F(e),y:293,textAnchor:`middle`,children:Ry(e)})]},`x-${e}`)),d?(0,$.jsx)(`text`,{className:`local-visual-axis-title`,x:(N+506)/2,y:318,textAnchor:`middle`,children:d}):null,f?(0,$.jsx)(`text`,{className:`local-visual-axis-title`,transform:`translate(12 145) rotate(-90)`,textAnchor:`middle`,children:f}):null,ie.map((e,t)=>e.map((e,n)=>{if(e.length<2)return null;let r=e.map((e,t)=>`${t===0?`M`:`L`} ${F(e.x)} ${ee(e.y)}`).join(` `);return(0,$.jsx)(`path`,{className:`local-visual-plot-line`,d:r,fill:`none`,style:{stroke:xy[t%xy.length]},strokeWidth:2.4,strokeLinejoin:`round`,strokeLinecap:`round`},`curve-${t}-${n}`)})),de===null?null:(0,$.jsx)(`line`,{className:`local-visual-guide`,x1:F(de),x2:F(de),y1:16,y2:274}),pe]})}),(0,$.jsx)(lb,{notes:E}),O]})}var Eb={title:`Task`,start:`Start`,duration:`Duration`,notes:`Notes`},Db={title:`事项`,start:`开始`,duration:`时长`,notes:`说明`};function Ob(e){let t=t=>e.includes(t.title)&&e.includes(t.start)&&e.includes(t.duration);return t(Eb)?Eb:t(Db)?Db:null}function kb({node:e,runtime:t,render:n,mode:r}){let i=by(),a=r!==`static`,[o,s]=(0,y.useState)(null),c=t.resetToken(e);(0,y.useEffect)(()=>{s(null)},[c]);let l=By(t,e.attrs,`title`,``)||i(`Timeline`,`时间轴`),u=By(t,e.attrs,`unit`,i(`minutes`,`分钟`)),d=nb(e,t,i);if(!d)return(0,$.jsx)(sb,{className:`local-visual-timeline`,label:l,children:(0,$.jsx)(cb,{message:i(`timeline body requires a Markdown table.`,`timeline 正文需要一个 Markdown 表格。`),kind:`alert`})});let f=d.headerText.map(e=>e.trim()),p=Ob(f),m=p?f.indexOf(p.title):-1,h=p?f.indexOf(p.start):-1,g=p?f.indexOf(p.duration):-1,_=p?f.indexOf(p.notes):-1;if(!p||m<0||h<0||g<0)return(0,$.jsx)(sb,{className:`local-visual-timeline`,label:l,children:(0,$.jsx)(cb,{message:i(`timeline table requires the "Task", "Start" and "Duration" columns.`,`timeline 表格需要“事项”“开始”“时长”三列,或“Task”“Start”“Duration”三列。`),kind:`alert`})});let v=[],b=[],x=[];if(d.rows.forEach((e,t)=>{let n=e.cells[h],r=e.cells[g],a=n?.numeric??null,o=r?.numeric??null;if(a===null||o===null||a<0||o<0){b.push(t+1);return}let s=tb(e.cells[m],i)||i(`Task ${t+1}`,`事项 ${t+1}`);x.push({key:`item-${e.index}`,title:s,start:a,duration:o,description:_>=0?e.cells[_]?.children??[]:[],sourceIndex:t})}),b.length>0&&v.push(i(`Rows ${b.join(`, `)} have an invalid start or duration (must be non-negative numbers) and are hidden.`,`第 ${b.join(`、`)} 行的开始或时长不是非负数字,未显示。`)),x.length===0)return(0,$.jsxs)(sb,{className:`local-visual-timeline`,label:l,children:[(0,$.jsx)(cb,{message:i(`No valid timeline items.`,`没有有效的时间轴事项。`)}),(0,$.jsx)(lb,{notes:v})]});let S=[...x].sort((e,t)=>e.start-t.start||e.sourceIndex-t.sourceIndex),C=S.reduce((e,t)=>Math.max(e,t.start+t.duration),0),w=Math.max(1,C),T=qy(0,w,5);(T.length===0||T[0]!==0)&&T.unshift(0),T[T.length-1]<w&&T.push(w);let E=u?` ${u}`:``,D=e=>`${Ly(e)}${E}`,O=S.find(e=>e.key===o)??null;return(0,$.jsxs)(sb,{className:`local-visual-timeline${a?``:` local-static-timeline`}`,label:l,children:[(0,$.jsx)(`div`,{className:`local-visual-timeline-axis`,"aria-hidden":`true`,children:T.map((e,t)=>{let n=e/w*100,r=t===T.length-1?{left:`${n}%`,transform:`translateX(-100%)`}:t===0?{left:`0%`}:{left:`${n}%`,transform:`translateX(-50%)`};return(0,$.jsx)(`span`,{className:`local-visual-timeline-tick`,style:r,children:Ry(e)},`tick-${e}`)})}),(0,$.jsx)(`ol`,{className:`local-visual-timeline-list`,children:S.map(e=>{let t=e.start+e.duration,r=e.start/w*100,c=e.duration/w*100,l=S.indexOf(e);return(0,$.jsxs)(`li`,{className:`local-visual-timeline-item${a&&o===e.key?` is-active`:``}${a?``:` local-static-timeline-item`}`,tabIndex:a?0:void 0,"aria-label":a?i(`${e.title}, started ${D(e.start)}, ended ${D(t)}, duration ${D(e.duration)}${e.description.length>0?`, with notes`:``}`,`${e.title},开始 ${D(e.start)},结束 ${D(t)},时长 ${D(e.duration)}${e.description.length>0?`,有说明`:``}`):void 0,onFocus:a?()=>s(e.key):void 0,onBlur:a?()=>s(t=>t===e.key?null:t):void 0,onPointerEnter:a?()=>s(e.key):void 0,onPointerLeave:a?()=>s(t=>t===e.key?null:t):void 0,onKeyDown:a?e=>{e.key===`Escape`&&(e.preventDefault(),s(null))}:void 0,children:[(0,$.jsxs)(`div`,{className:`local-visual-timeline-head`,children:[(0,$.jsxs)(`span`,{className:`local-visual-timeline-title`,children:[(0,$.jsx)(`span`,{className:`local-visual-swatch`,style:{backgroundColor:xy[l%xy.length]},"aria-hidden":`true`}),e.title]}),(0,$.jsxs)(`span`,{className:`local-visual-timeline-times`,children:[i(`Started`,`开始`),` `,D(e.start),` · `,i(`Ended`,`结束`),` `,D(t),` · `,i(`Duration`,`时长`),` `,D(e.duration)]})]}),(0,$.jsx)(`div`,{className:`local-visual-timeline-track`,"aria-hidden":`true`,children:(0,$.jsx)(`span`,{className:`local-visual-timeline-bar${e.duration===0?` is-zero`:``}`,style:{left:`${r}%`,width:`${c}%`,backgroundColor:xy[l%xy.length]}})}),a||e.description.length===0?null:(0,$.jsx)(`div`,{className:`local-visual-timeline-detail local-static-timeline-detail`,children:n(e.description)})]},e.key)})}),a?(0,$.jsx)(`div`,{className:`local-visual-timeline-detail`,"aria-live":`polite`,children:O?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`strong`,{children:O.title}),O.description.length>0?n(O.description):(0,$.jsx)(`span`,{children:i(`No notes.`,`没有说明。`)})]}):(0,$.jsx)(`span`,{children:i(`Focus or point at an item to view its notes.`,`聚焦或指向事项查看说明。`)})}):null,(0,$.jsx)(lb,{notes:v})]})}var Ab=/[\u1100-\u115f\u2e80-\u303f\u3040-\u33ff\u3400-\u4dbf\u4e00-\u9fff\uac00-\ud7af\uf900-\ufaff\ufe30-\ufe4f\uff00-\uff60\uffe0-\uffe6]/u;function jb(e){let t=0;for(let n of e)Ab.test(n)?t+=1:/\s/u.test(n)?t+=.3:t+=.58;return t*Ay}function Mb(e,t){if(jb(e)<=t)return e;let n=``;for(let r of e){if(jb(`${n}${r}…`)>t)break;n+=r}return`${n.trimEnd()}…`}function Nb(e){let t=[],n=``;for(let r of e)n&&jb(n+r)>My?(t.push(n),n=r):n+=r;if(n&&t.push(n),t.length<=Ny)return t;let r=t.slice(0,Ny);return r[1]=Mb(t.slice(1).join(``),My),r}function Pb(e){let t=Nb(e);return{width:t.reduce((e,t)=>Math.max(e,jb(t)),0)+10,height:t.length*Py+6,lines:t}}function Fb(e){let t=new Map;for(let n of e){let e=`${n.from}\u0000${n.to}`;t.set(e,(t.get(e)??0)+1)}let n=new Map,r=new Map;for(let i of e){let e=`${i.from}\u0000${i.to}`,a=t.get(e)??1,o=n.get(e)??0;n.set(e,o+1),r.set(i.key,(o-(a-1)/2)*12)}return r}function Ib(e,t,n){let{width:r,height:i,positions:a}=e,o=Fb(t),s=1/0,c=1/0,l=-1/0,u=-1/0;for(let e of t){if(!e.label)continue;let t=a.get(e.from),r=a.get(e.to);if(!t||!r)continue;let i=Rb(n,t,r,o.get(e.key)??0,e.from===e.to),d=Pb(e.label);s=Math.min(s,i.labelX-d.width/2),c=Math.min(c,i.labelY-d.height/2),l=Math.max(l,i.labelX+d.width/2),u=Math.max(u,i.labelY+d.height/2)}if(!Number.isFinite(s))return e;let d=Math.max(0,jy-s),f=Math.max(0,jy-c),p=Math.max(0,l+jy-r),m=Math.max(0,u+jy-i);if(d===0&&f===0&&p===0&&m===0)return e;for(let e of a.values())e.x+=d,e.y+=f;return{width:r+d+p,height:i+f+m,positions:a}}function Lb(e,t,n){let r=e.map(e=>e.id),i=new Map(r.map((e,t)=>[e,t])),a=new Set(r),o=new Map(r.map(e=>[e,[]]));for(let e of t)e.from!==e.to&&a.has(e.from)&&a.has(e.to)&&o.get(e.from).push(e.to);let s=new Map,c=new Map,l=new Set,u=[],d=[],f=0,p=e=>{s.set(e,f),c.set(e,f),f+=1,u.push(e),l.add(e);for(let t of o.get(e)??[])s.has(t)?l.has(t)&&c.set(e,Math.min(c.get(e),s.get(t))):(p(t),c.set(e,Math.min(c.get(e),c.get(t))));if(c.get(e)===s.get(e)){let t=[],n;do n=u.pop(),l.delete(n),t.push(n);while(n!==e);d.push(t.reverse())}};for(let e of r)s.has(e)||p(e);let m=new Map;d.forEach((e,t)=>{for(let n of e)m.set(n,t)});let h=d.map(()=>new Set),g=d.map(()=>0);for(let e of t){if(!a.has(e.from)||!a.has(e.to))continue;let t=m.get(e.from),n=m.get(e.to);t===n||h[t].has(n)||(h[t].add(n),g[n]+=1)}let _=d.map((e,t)=>({index:t,order:Math.min(...e.map(e=>i.get(e)??0))})),v=_.filter(e=>g[e.index]===0).map(e=>e.index).sort((e,t)=>_[e].order-_[t].order),y=d.map(()=>0);for(;v.length>0;){let e=v.shift();for(let t of h[e])y[t]=Math.max(y[t],y[e]+1),--g[t],g[t]===0&&v.push(t)}let b=Math.max(1,...y)+1,x=Array.from({length:b},()=>[]);for(let e of r)x[y[m.get(e)]].push(e);let S=x.filter(e=>e.length>0),C=Math.max(1,...S.map(e=>e.length)),w=new Map,T,E;if(n===`down`)T=Ey,E=Math.max(240,106+(S.length-1)*120),S.forEach((e,t)=>{let n=53+t*120;e.forEach((t,r)=>{let i=e.length===1?T/2:104+r*((T-88-Dy)/(e.length-1));w.set(t,{x:i,y:n})})});else{let e=t.reduce((e,t)=>t.label?Math.max(e,Pb(t.label).width):e,0),n=Math.max(ky,Dy+(e>0?e+24:0));T=Math.max(Ey,208+(S.length-1)*n),E=Math.max(240,106+(C-1)*74),S.forEach((e,t)=>{let n=S.length===1?T/2:104+t*((T-88-Dy)/(S.length-1));e.forEach((t,r)=>{let i=e.length===1?E/2:53+r*((E-60-Oy)/(e.length-1));w.set(t,{x:n,y:i})})})}return Ib({width:T,height:E,positions:w},t,n)}function Rb(e,t,n,r,i){let a=Dy,o=Oy;if(i)return e===`right`?{d:`M ${t.x+20} ${t.y-o/2} C ${t.x+64} ${t.y-o/2-64}, ${t.x-64} ${t.y-o/2-64}, ${t.x-20} ${t.y-o/2}`,labelX:t.x,labelY:t.y-o/2-46}:{d:`M ${t.x+a/2} ${t.y-10} C ${t.x+a/2+64} ${t.y-54}, ${t.x+a/2+64} ${t.y+54}, ${t.x+a/2} ${t.y+10}`,labelX:t.x+a/2+44,labelY:t.y};if(e===`right`){if(n.x>t.x){let e=t.x+a/2,i=t.y+r,o=n.x-a/2,s=n.y+r;return{d:`M ${e} ${i} L ${o} ${s}`,labelX:(e+o)/2,labelY:(i+s)/2-12}}let e=t.x+r,i=n.x+r,s=t.y+o/2,c=n.y-o/2,l=Math.max(70,Math.abs(i-e)*.45);return{d:`M ${e} ${s} C ${e+l} ${s+86}, ${i-l} ${c+86}, ${i} ${c}`,labelX:(e+i)/2,labelY:Math.max(s,c)+48}}if(n.y>t.y){let e=t.x+r,i=n.x+r,a=t.y+o/2,s=n.y-o/2;return{d:`M ${e} ${a} L ${i} ${s}`,labelX:(e+i)/2+10,labelY:(a+s)/2}}let s=t.x+a/2,c=n.x-a/2,l=t.y+r,u=n.y+r,d=Math.max(70,Math.abs(u-l)*.45);return{d:`M ${s} ${l} C ${s+86} ${l+d}, ${c+86} ${u-d}, ${c} ${u}`,labelX:Math.max(s,c)+48,labelY:(l+u)/2}}function zb({node:e,runtime:t,render:n,mode:r}){let i=by(),a=r!==`static`,[o,s]=(0,y.useState)(null),[c,l]=(0,y.useState)(null),u=t.resetToken(e);(0,y.useEffect)(()=>{s(null),l(null)},[u]);let d=(0,y.useId)().replace(/[^a-zA-Z0-9_-]/g,``),f=`local-diagram-arrow-${d}`,p=`local-diagram-description-${d}`,m=By(t,e.attrs,`label`,``)||i(`Diagram`,`图解`),h=(e.attrs?.direction??`right`).trim().toLowerCase()===`down`?`down`:`right`,g=e.children?.filter(e=>e.type===`component`)??[],_=[],v=[],b=new Set;for(let e of g){if(e.name!==`node`)continue;let n=(e.attrs?.id??``).trim();if(!n){_.push(i(`Ignored a node without an id.`,`已忽略缺少 id 的节点。`));continue}if(b.has(n)){_.push(i(`Duplicate node id ${n}; ignored the later node.`,`节点 id 重复(${n}),已忽略后一个节点。`));continue}b.add(n);let r=By(t,e.attrs,`tone`,`neutral`).trim(),a=r===`success`||r===`warning`?r:`neutral`;v.push({id:n,label:By(t,e.attrs,`label`,n)||n,tone:a,children:e.children??[]})}let x=[],S=new Set;for(let e of g){if(e.name!==`edge`)continue;let n=(e.attrs?.from??``).trim(),r=(e.attrs?.to??``).trim();if(!n||!r||!b.has(n)||!b.has(r)){_.push(i(`Edge ${n||`?`} → ${r||`?`} references a missing endpoint; ignored.`,`连线 ${n||`?`} → ${r||`?`} 缺少端点,已忽略。`));continue}let a=By(t,e.attrs,`label`,``),o=`${n}\u0000${r}\u0000${a}`;S.has(o)?_.push(i(`Duplicate edge: ${n} → ${r}${a?` (${a})`:``}; ignored.`,`重复连线:${n} → ${r}${a?`(${a})`:``},已忽略。`)):(S.add(o),x.push({key:o,from:n,to:r,label:a}))}if(v.length===0)return(0,$.jsxs)(sb,{className:`local-visual-diagram`,label:m,children:[(0,$.jsx)(cb,{message:`diagram requires at least one node.`,kind:`alert`}),(0,$.jsx)(lb,{notes:_})]});let C=null;try{let n=t.get(e);typeof n==`string`&&(C=n)}catch{C=null}let w=new Set(v.map(e=>e.id)),T=(e.attrs?.initial??``).trim(),E=T&&w.has(T)?T:v[0].id,D=C&&w.has(C)?C:o&&w.has(o)?o:E,O=v.find(e=>e.id===D)??v[0],k=C&&w.has(C)?C:T&&w.has(T)?T:null,A=n=>{s(n),l(null);try{let r=t.set(e,n);r.length>0&&l(r.map(e=>i(et(e,`en`),et(e,`zh`))).join(`; `))}catch(e){l(zy(e))}},j=Lb(v,x,h),M=Fb(x),N=[],P=[];for(let e of x){let t=j.positions.get(e.from),n=j.positions.get(e.to);if(!t||!n)continue;let r=Rb(h,t,n,M.get(e.key)??0,e.from===e.to);if(N.push((0,$.jsx)(`g`,{className:`local-visual-edge`,children:(0,$.jsx)(`path`,{d:r.d,fill:`none`,style:{stroke:`var(--ink-muted)`},strokeWidth:1.6,markerEnd:`url(#${f})`})},`edge-${e.key}`)),!e.label)continue;let i=Pb(e.label);P.push((0,$.jsx)(`g`,{className:`local-visual-edge-label-group`,children:(0,$.jsx)(`text`,{className:`local-visual-edge-label`,x:r.labelX,y:r.labelY,textAnchor:`middle`,dominantBaseline:`middle`,children:i.lines.map((e,t)=>(0,$.jsx)(`tspan`,{x:r.labelX,y:r.labelY+(t-(i.lines.length-1)/2)*Py,children:e},t))})},`edge-label-${e.key}`))}return(0,$.jsxs)(sb,{className:`local-visual-diagram${a?``:` local-static-diagram`}`,label:m,children:[(0,$.jsx)(`div`,{className:`local-visual-svg-wrap`,children:(0,$.jsxs)(`svg`,{className:`local-visual-svg local-visual-diagram-svg`,viewBox:`0 0 ${j.width} ${j.height}`,role:`group`,"aria-label":a?`${m}, with ${v.length} nodes and ${x.length} edges; press Tab to focus a node and Enter to select`:i(`${m}, with ${v.length} nodes and ${x.length} edges`,`${m},共 ${v.length} 个节点、${x.length} 条连线`),"aria-describedby":p,children:[(0,$.jsx)(`defs`,{children:(0,$.jsx)(`marker`,{id:f,viewBox:`0 0 10 10`,refX:`9`,refY:`5`,markerWidth:`7`,markerHeight:`7`,orient:`auto-start-reverse`,children:(0,$.jsx)(`path`,{d:`M 0 0 L 10 5 L 0 10 z`,style:{fill:`var(--ink-muted)`}})})}),N,v.map(e=>{let t=j.positions.get(e.id);if(!t)return null;let n=a?e.id===D:k!==null&&e.id===k,r=Gy(e.label,8,2);return(0,$.jsxs)(`g`,{className:`local-visual-node local-visual-node-${e.tone}${n?` is-selected`:``}`,"data-diagram-node":a?``:void 0,transform:`translate(${t.x} ${t.y})`,role:a?`button`:void 0,tabIndex:a?0:void 0,"aria-pressed":a?n:void 0,"aria-label":a?e.label:void 0,onClick:a?()=>A(e.id):void 0,onKeyDown:a?t=>{Zy(t)?(t.preventDefault(),A(e.id)):t.key===`ArrowRight`||t.key===`ArrowDown`?Xy(t,`[data-diagram-node]`,1):(t.key===`ArrowLeft`||t.key===`ArrowUp`)&&Xy(t,`[data-diagram-node]`,-1)}:void 0,children:[(0,$.jsx)(`title`,{children:e.label}),(0,$.jsx)(`rect`,{className:`local-visual-node-shape`,x:-60,y:-23,width:Dy,height:Oy,rx:10}),(0,$.jsx)(`text`,{className:`local-visual-node-text`,textAnchor:`middle`,children:r.map((e,t)=>(0,$.jsx)(`tspan`,{x:0,y:(t-(r.length-1)/2)*16+4,children:e},t))})]},`node-${e.id}`)}),P]})}),a?(0,$.jsx)(`div`,{className:`local-visual-diagram-detail`,"aria-live":`polite`,children:O?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`strong`,{children:O.label}),O.children.length>0?n(O.children):(0,$.jsx)(`span`,{children:i(`This node has no description.`,`此节点没有说明。`)})]}):(0,$.jsx)(`span`,{children:i(`Click a node, or focus it with Tab and press Enter, to view its description.`,`点击节点,或用 Tab 聚焦后按 Enter 查看说明。`)})}):(0,$.jsx)(`div`,{className:`local-visual-diagram-detail local-static-diagram-detail`,children:(0,$.jsx)(`dl`,{className:`local-static-diagram-nodes`,children:v.map(e=>(0,$.jsxs)(`div`,{className:`local-static-diagram-node`,children:[(0,$.jsx)(`dt`,{children:e.label}),(0,$.jsx)(`dd`,{children:e.children.length>0?n(e.children):(0,$.jsx)(`span`,{children:i(`This node has no description.`,`此节点没有说明。`)})})]},`static-node-${e.id}`))})}),(0,$.jsxs)(`ul`,{id:p,className:`local-visual-sr-only`,"aria-label":i(`Nodes and edges`,`节点与连线`),children:[v.map(e=>(0,$.jsx)(`li`,{children:e.label},`description-node-${e.id}`)),x.map(e=>{let t=v.find(t=>t.id===e.from),n=v.find(t=>t.id===e.to);return(0,$.jsxs)(`li`,{children:[t?.label??e.from,` → `,n?.label??e.to,e.label?` (${e.label})`:``]},`description-edge-${e.key}`)})]}),c?(0,$.jsx)(cb,{message:c,kind:`alert`}):null,(0,$.jsx)(lb,{notes:_})]})}function Bb(e){let t={...e,mode:e.mode??`interactive`};switch(t.node.name){case`table`:return(0,$.jsx)(db,{...t});case`chart`:return(0,$.jsx)(mb,{...t});case`plot`:return(0,$.jsx)(Tb,{...t});case`timeline`:return(0,$.jsx)(kb,{...t});case`diagram`:return(0,$.jsx)(zb,{...t});default:return null}}var Vb=class extends Error{failure;constructor(e){super(e),this.name=`DataTableFailureError`,this.failure=e}};function Hb(e){return e===null?``:typeof e==`string`?e:typeof e==`number`?Number.isFinite(e)?String(e):null:typeof e==`boolean`?e?`true`:`false`:null}function Ub(e){return typeof e==`string`?e===``?null:`s:${e}`:typeof e==`number`&&Number.isFinite(e)?`n:${e===0?0:e}`:null}function Wb(e,t,n){let r={...n};for(let i of t)Object.hasOwn(n,i)||Object.defineProperty(r,i,{enumerable:!0,configurable:!0,get(){return e.evaluate(i)}});return r}function Gb(e){if(e.length===0)return null;let t=typeof e[0];if(t!==`string`&&t!==`number`)return`rows`;for(let n of e)if(typeof n!==t||typeof n==`number`&&!Number.isFinite(n))return`rows`;return null}function Kb(e,t){let n;try{n=Yt(t)}catch{throw new Vb(`rows`)}let r;try{r=n.evaluate(Wb(e,n.dependencies,{}))}catch{throw new Vb(`rows`)}if(!Array.isArray(r))throw new Vb(`rows`);let i=Gb(r);if(i)throw new Vb(i);return r}function qb(e){let{rows:t,columns:n,keyExpression:r,runtime:i}=e,a=e.maxRows??100,o=e.budget??1e5;if(!Number.isSafeInteger(a)||a<=0||a>1e3)return{ok:!1,failure:`max-rows`};if(n.length<1||n.length>20)return{ok:!1,failure:`columns`};let s=Gb(t);if(s)return{ok:!1,failure:s};if(t.length>a)return{ok:!1,failure:`rows-budget`};let c;try{c=Yt(r)}catch{return{ok:!1,failure:`key`}}let l=c.dependencies;if(l.length!==1||l[0]!==`item`)return{ok:!1,failure:`key`};let u=n.map(e=>{try{return{spec:e,expression:Yt(e.value)}}catch{return{spec:e,expression:null}}}),d=0;for(let e of n)d+=e.label.length;if(t.length===0&&(d+=7),d>o)return{ok:!1,failure:`text-budget`};let f=e=>{if(d+=e,d>o)throw new Vb(`text-budget`)},p=new Set,m=[];try{for(let e=0;e<t.length;e+=1){let n={item:t[e],index:e},r=null;try{r=Ub(c.evaluate(n))}catch{return{ok:!1,failure:`key`}}if(r===null||p.has(r))return{ok:!1,failure:`key`};f(r.length),p.add(r);let a=[];for(let e of u){if(!e.expression){f(14),a.push({ok:!1,text:``});continue}let t=null;try{t=Hb(e.expression.evaluate(Wb(i,e.expression.dependencies,n)))}catch{t=null}t===null?(f(14),a.push({ok:!1,text:``})):(f(t.length),a.push({ok:!0,text:t}))}m.push({key:r,cells:a})}}catch(e){return e instanceof Vb?{ok:!1,failure:e.failure}:{ok:!1,failure:`rows`}}return{ok:!0,model:{columns:n.map(e=>e.label),rows:m,empty:t.length===0}}}function Jb(e,t){switch(t){case`label`:return e(`Data table requires a label.`,`数据表需要标签。`);case`columns`:return e(`Data table requires between 1 and 20 column definitions.`,`数据表需要 1 到 20 个列定义。`);case`max-rows`:return e(`max-rows must be a positive integer no greater than ${A}.`,`max-rows 必须是 1 到 ${A} 之间的整数。`);case`rows`:return e(`Rows must evaluate to a list.`,`行数据必须计算为列表。`);case`rows-budget`:return e(`Too many rows for this table.`,`此数据表的行数超过上限。`);case`key`:return e(`Every row needs a unique, non-empty key.`,`每一行都需要唯一且非空的键。`);case`text-budget`:return e(`The table content exceeds the text budget.`,`数据表内容超过文本上限。`)}}var Yb=/^\s*\{\{([\s\S]*)\}\}\s*$/;function Xb(e){if(e===void 0)return null;let t=Yb.exec(e),n=t?t[1].trim():``;return n===``?null:n}function Zb(e){return e.type===`comment`||e.type===`text`&&(e.value??``).trim()===``||e.type===`paragraph`&&!e.children?.length&&(e.value??``).trim()===``}function Qb(e){let t=(e.attrs?.label??``).trim();if(t===``)return{ok:!1,failure:`label`};let n=Xb(e.attrs?.rows);if(!n)return{ok:!1,failure:`rows`};let r=Xb(e.attrs?.key);if(!r)return{ok:!1,failure:`key`};let i=e.attrs?.[`max-rows`],a=100;if(i!==void 0&&(!/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/.test(i.trim())||(a=Number(i.trim()),!Number.isSafeInteger(a)||a<=0||a>1e3)))return{ok:!1,failure:`max-rows`};let o=(e.children??[]).filter(e=>!Zb(e)),s=[];for(let e of o){let t=(e.children??[]).filter(e=>!Zb(e));if(e.type!==`component`||e.name!==`column`||t.length>0)return{ok:!1,failure:`columns`};let n=(e.attrs?.label??``).trim(),r=Xb(e.attrs?.value);if(n===``||!r)return{ok:!1,failure:`columns`};s.push({label:n,value:r})}return s.length<1||s.length>20?{ok:!1,failure:`columns`}:{ok:!0,table:{label:t,rows:n,key:r,maxRows:a,columns:s}}}function $b({node:e,runtime:t,t:n}){let r=Qb(e);if(!r.ok)return(0,$.jsx)(`div`,{className:`local-error local-data-table-error`,role:`alert`,children:Jb(n,r.failure)});let i;try{i=qb({rows:Kb(t,r.table.rows),columns:r.table.columns,keyExpression:r.table.key,maxRows:r.table.maxRows,runtime:t})}catch(e){i={ok:!1,failure:e instanceof Vb?e.failure:`rows`}}if(!i.ok)return(0,$.jsx)(`div`,{className:`local-error local-data-table-error`,role:`alert`,children:Jb(n,i.failure)});let{model:a}=i;return(0,$.jsx)(`div`,{className:`md-table-scroll local-data-table-scroll`,"data-local-data-table":``,children:(0,$.jsxs)(`table`,{className:`md-table local-data-table`,"aria-label":r.table.label,children:[(0,$.jsx)(`thead`,{children:(0,$.jsx)(`tr`,{children:a.columns.map((e,t)=>(0,$.jsx)(`th`,{scope:`col`,children:e},`column-${t}`))})}),(0,$.jsx)(`tbody`,{children:a.empty?(0,$.jsx)(`tr`,{children:(0,$.jsx)(`td`,{className:`local-data-table-empty`,colSpan:a.columns.length,children:n(`No rows`,`没有数据`)})}):a.rows.map(e=>(0,$.jsx)(`tr`,{children:e.cells.map((e,t)=>(0,$.jsx)(`td`,{children:e.ok?e.text:(0,$.jsx)(`span`,{className:`local-error local-data-table-cell-error`,children:n(`Cannot compute`,`无法计算`)})},`cell-${t}`))},e.key))})]})})}function ex(e){let t=e.regex,n=e.COMMENT(`//`,`$`,{contains:[{begin:/\\\n/}]}),r=`[a-zA-Z_]\\w*::`,i=`(?!struct)(decltype\\(auto\\)|`+t.optional(r)+`[a-zA-Z_]\\w*`+t.optional(`<[^<>]+>`)+`)`,a={className:`type`,begin:`\\b[a-z\\d_]*_t\\b`},o={className:`string`,variants:[{begin:`(u8?|U|L)?"`,end:`"`,illegal:`\\n`,contains:[e.BACKSLASH_ESCAPE]},{begin:`(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)`,end:`'`,illegal:`.`},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},s={className:`number`,variants:[{begin:`[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)`},{begin:`[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)`}],relevance:0},c={className:`meta`,begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:`if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include`},contains:[{begin:/\\\n/,relevance:0},e.inherit(o,{className:`string`}),{className:`string`,begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},l={className:`title`,begin:t.optional(r)+e.IDENT_RE,relevance:0},u=t.optional(r)+e.IDENT_RE+`\\s*\\(`,d=`alignas.alignof.and.and_eq.asm.atomic_cancel.atomic_commit.atomic_noexcept.auto.bitand.bitor.break.case.catch.class.co_await.co_return.co_yield.compl.concept.const_cast|10.consteval.constexpr.constinit.continue.decltype.default.delete.do.dynamic_cast|10.else.enum.explicit.export.extern.false.final.for.friend.goto.if.import.inline.module.mutable.namespace.new.noexcept.not.not_eq.nullptr.operator.or.or_eq.override.private.protected.public.reflexpr.register.reinterpret_cast|10.requires.return.sizeof.static_assert.static_cast|10.struct.switch.synchronized.template.this.thread_local.throw.transaction_safe.transaction_safe_dynamic.true.try.typedef.typeid.typename.union.using.virtual.volatile.while.xor.xor_eq`.split(`.`),f=[`bool`,`char`,`char16_t`,`char32_t`,`char8_t`,`double`,`float`,`int`,`long`,`short`,`void`,`wchar_t`,`unsigned`,`signed`,`const`,`static`],p=`any.auto_ptr.barrier.binary_semaphore.bitset.complex.condition_variable.condition_variable_any.counting_semaphore.deque.false_type.flat_map.flat_set.future.imaginary.initializer_list.istringstream.jthread.latch.lock_guard.multimap.multiset.mutex.optional.ostringstream.packaged_task.pair.promise.priority_queue.queue.recursive_mutex.recursive_timed_mutex.scoped_lock.set.shared_future.shared_lock.shared_mutex.shared_timed_mutex.shared_ptr.stack.string_view.stringstream.timed_mutex.thread.true_type.tuple.unique_lock.unique_ptr.unordered_map.unordered_multimap.unordered_multiset.unordered_set.variant.vector.weak_ptr.wstring.wstring_view`.split(`.`),m=`abort.abs.acos.apply.as_const.asin.atan.atan2.calloc.ceil.cerr.cin.clog.cos.cosh.cout.declval.endl.exchange.exit.exp.fabs.floor.fmod.forward.fprintf.fputs.free.frexp.fscanf.future.invoke.isalnum.isalpha.iscntrl.isdigit.isgraph.islower.isprint.ispunct.isspace.isupper.isxdigit.labs.launder.ldexp.log.log10.make_pair.make_shared.make_shared_for_overwrite.make_tuple.make_unique.malloc.memchr.memcmp.memcpy.memset.modf.move.pow.printf.putchar.puts.realloc.scanf.sin.sinh.snprintf.sprintf.sqrt.sscanf.std.stderr.stdin.stdout.strcat.strchr.strcmp.strcpy.strcspn.strlen.strncat.strncmp.strncpy.strpbrk.strrchr.strspn.strstr.swap.tan.tanh.terminate.to_underlying.tolower.toupper.vfprintf.visit.vprintf.vsprintf`.split(`.`),h={type:f,keyword:d,literal:[`NULL`,`false`,`nullopt`,`nullptr`,`true`],built_in:[`_Pragma`],_type_hints:p},g={className:`function.dispatch`,relevance:0,keywords:{_hint:m},begin:t.concat(/\b/,`(?!${d.join(`|`)})`,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},_=[g,c,a,n,e.C_BLOCK_COMMENT_MODE,s,o],v={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:`new throw return else`,end:/;/}],keywords:h,contains:_.concat([{begin:/\(/,end:/\)/,keywords:h,contains:_.concat([`self`]),relevance:0}]),relevance:0},y={className:`function`,begin:`(`+i+`[\\*&\\s]+)+`+u,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:h,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:`decltype\\(auto\\)`,keywords:h,relevance:0},{begin:u,returnBegin:!0,contains:[l],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[o,s]},{relevance:0,match:/,/},{className:`params`,begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,o,s,a,{begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[`self`,n,e.C_BLOCK_COMMENT_MODE,o,s,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:`C++`,aliases:[`cc`,`c++`,`h++`,`hpp`,`hh`,`hxx`,`cxx`],keywords:h,illegal:`</`,classNameAliases:{"function.dispatch":`built_in`},contains:[].concat(v,y,g,_,[c,{begin:`\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)`,end:`>`,keywords:h,contains:[`self`,a]},{begin:e.IDENT_RE+`::`,keywords:h},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:`keyword`,3:`title.class`}}])}}function tx(e){let t={type:[`boolean`,`byte`,`word`,`String`],built_in:`KeyboardController.MouseController.SoftwareSerial.EthernetServer.EthernetClient.LiquidCrystal.RobotControl.GSMVoiceCall.EthernetUDP.EsploraTFT.HttpClient.RobotMotor.WiFiClient.GSMScanner.FileSystem.Scheduler.GSMServer.YunClient.YunServer.IPAddress.GSMClient.GSMModem.Keyboard.Ethernet.Console.GSMBand.Esplora.Stepper.Process.WiFiUDP.GSM_SMS.Mailbox.USBHost.Firmata.PImage.Client.Server.GSMPIN.FileIO.Bridge.Serial.EEPROM.Stream.Mouse.Audio.Servo.File.Task.GPRS.WiFi.Wire.TFT.GSM.SPI.SD`.split(`.`),_hints:`setup.loop.runShellCommandAsynchronously.analogWriteResolution.retrieveCallingNumber.printFirmwareVersion.analogReadResolution.sendDigitalPortPair.noListenOnLocalhost.readJoystickButton.setFirmwareVersion.readJoystickSwitch.scrollDisplayRight.getVoiceCallStatus.scrollDisplayLeft.writeMicroseconds.delayMicroseconds.beginTransmission.getSignalStrength.runAsynchronously.getAsynchronously.listenOnLocalhost.getCurrentCarrier.readAccelerometer.messageAvailable.sendDigitalPorts.lineFollowConfig.countryNameWrite.runShellCommand.readStringUntil.rewindDirectory.readTemperature.setClockDivider.readLightSensor.endTransmission.analogReference.detachInterrupt.countryNameRead.attachInterrupt.encryptionType.readBytesUntil.robotNameWrite.readMicrophone.robotNameRead.cityNameWrite.userNameWrite.readJoystickY.readJoystickX.mouseReleased.openNextFile.scanNetworks.noInterrupts.digitalWrite.beginSpeaker.mousePressed.isActionDone.mouseDragged.displayLogos.noAutoscroll.addParameter.remoteNumber.getModifiers.keyboardRead.userNameRead.waitContinue.processInput.parseCommand.printVersion.readNetworks.writeMessage.blinkVersion.cityNameRead.readMessage.setDataMode.parsePacket.isListening.setBitOrder.beginPacket.isDirectory.motorsWrite.drawCompass.digitalRead.clearScreen.serialEvent.rightToLeft.setTextSize.leftToRight.requestFrom.keyReleased.compassRead.analogWrite.interrupts.WiFiServer.disconnect.playMelody.parseFloat.autoscroll.getPINUsed.setPINUsed.setTimeout.sendAnalog.readSlider.analogRead.beginWrite.createChar.motorsStop.keyPressed.tempoWrite.readButton.subnetMask.debugPrint.macAddress.writeGreen.randomSeed.attachGPRS.readString.sendString.remotePort.releaseAll.mouseMoved.background.getXChange.getYChange.answerCall.getResult.voiceCall.endPacket.constrain.getSocket.writeJSON.getButton.available.connected.findUntil.readBytes.exitValue.readGreen.writeBlue.startLoop.IPAddress.isPressed.sendSysex.pauseMode.gatewayIP.setCursor.getOemKey.tuneWrite.noDisplay.loadImage.switchPIN.onRequest.onReceive.changePIN.playFile.noBuffer.parseInt.overflow.checkPIN.knobRead.beginTFT.bitClear.updateIR.bitWrite.position.writeRGB.highByte.writeRed.setSpeed.readBlue.noStroke.remoteIP.transfer.shutdown.hangCall.beginSMS.endWrite.attached.maintain.noCursor.checkReg.checkPUK.shiftOut.isValid.shiftIn.pulseIn.connect.println.localIP.pinMode.getIMEI.display.noBlink.process.getBand.running.beginSD.drawBMP.lowByte.setBand.release.bitRead.prepare.pointTo.readRed.setMode.noFill.remove.listen.stroke.detach.attach.noTone.exists.buffer.height.bitSet.circle.config.cursor.random.IRread.setDNS.endSMS.getKey.micros.millis.begin.print.write.ready.flush.width.isPIN.blink.clear.press.mkdir.rmdir.close.point.yield.image.BSSID.click.delay.read.text.move.peek.beep.rect.line.open.seek.fill.size.turn.stop.home.find.step.tone.sqrt.RSSI.SSID.end.bit.tan.cos.sin.pow.map.abs.max.min.get.run.put`.split(`.`),literal:[`DIGITAL_MESSAGE`,`FIRMATA_STRING`,`ANALOG_MESSAGE`,`REPORT_DIGITAL`,`REPORT_ANALOG`,`INPUT_PULLUP`,`SET_PIN_MODE`,`INTERNAL2V56`,`SYSTEM_RESET`,`LED_BUILTIN`,`INTERNAL1V1`,`SYSEX_START`,`INTERNAL`,`EXTERNAL`,`DEFAULT`,`OUTPUT`,`INPUT`,`HIGH`,`LOW`]},n=ex(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name=`Arduino`,n.aliases=[`ino`],n.supersetOf=`cpp`,n}function nx(e){let t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:[`self`,{begin:/:-/,contains:[n]}]};Object.assign(n,{className:`variable`,variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,`(?![\\w\\d])(?![$])`)},r]});let i={className:`subst`,begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:`comment`}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:`string`})]}},s={className:`string`,begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(s);let c={match:/\\"/},l={className:`string`,begin:/'/,end:/'/},u={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:`number`},e.NUMBER_MODE,n]},f=e.SHEBANG({binary:`(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)`,relevance:10}),p={className:`function`,begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=[`if`,`then`,`else`,`elif`,`fi`,`time`,`for`,`while`,`until`,`in`,`do`,`done`,`case`,`esac`,`coproc`,`function`,`select`],h=[`true`,`false`],g={match:/(\/[a-z._-]+)+/},_=[`break`,`cd`,`continue`,`eval`,`exec`,`exit`,`export`,`getopts`,`hash`,`pwd`,`readonly`,`return`,`shift`,`test`,`times`,`trap`,`umask`,`unset`],v=[`alias`,`bind`,`builtin`,`caller`,`command`,`declare`,`echo`,`enable`,`help`,`let`,`local`,`logout`,`mapfile`,`printf`,`read`,`readarray`,`source`,`sudo`,`type`,`typeset`,`ulimit`,`unalias`],y=`autoload.bg.bindkey.bye.cap.chdir.clone.comparguments.compcall.compctl.compdescribe.compfiles.compgroups.compquote.comptags.comptry.compvalues.dirs.disable.disown.echotc.echoti.emulate.fc.fg.float.functions.getcap.getln.history.integer.jobs.kill.limit.log.noglob.popd.print.pushd.pushln.rehash.sched.setcap.setopt.stat.suspend.ttyctl.unfunction.unhash.unlimit.unsetopt.vared.wait.whence.where.which.zcompile.zformat.zftp.zle.zmodload.zparseopts.zprof.zpty.zregexparse.zsocket.zstyle.ztcp`.split(`.`),b=`chcon.chgrp.chown.chmod.cp.dd.df.dir.dircolors.ln.ls.mkdir.mkfifo.mknod.mktemp.mv.realpath.rm.rmdir.shred.sync.touch.truncate.vdir.b2sum.base32.base64.cat.cksum.comm.csplit.cut.expand.fmt.fold.head.join.md5sum.nl.numfmt.od.paste.ptx.pr.sha1sum.sha224sum.sha256sum.sha384sum.sha512sum.shuf.sort.split.sum.tac.tail.tr.tsort.unexpand.uniq.wc.arch.basename.chroot.date.dirname.du.echo.env.expr.factor.groups.hostid.id.link.logname.nice.nohup.nproc.pathchk.pinky.printenv.printf.pwd.readlink.runcon.seq.sleep.stat.stdbuf.stty.tee.test.timeout.tty.uname.unlink.uptime.users.who.whoami.yes`.split(`.`);return{name:`Bash`,aliases:[`sh`,`zsh`],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:h,built_in:[..._,...v,`set`,`shopt`,...y,...b]},contains:[f,e.SHEBANG(),p,d,a,o,g,s,c,l,u,n]}}function rx(e){let t=e.regex,n=e.COMMENT(`//`,`$`,{contains:[{begin:/\\\n/}]}),r=`[a-zA-Z_]\\w*::`,i=`(decltype\\(auto\\)|`+t.optional(r)+`[a-zA-Z_]\\w*`+t.optional(`<[^<>]+>`)+`)`,a={className:`type`,variants:[{begin:`\\b[a-z\\d_]*_t\\b`},{match:/\batomic_[a-z]{3,6}\b/}]},o={className:`string`,variants:[{begin:`(u8?|U|L)?"`,end:`"`,illegal:`\\n`,contains:[e.BACKSLASH_ESCAPE]},{begin:`(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)`,end:`'`,illegal:`.`},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},s={className:`number`,variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},c={className:`meta`,begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:`if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include`},contains:[{begin:/\\\n/,relevance:0},e.inherit(o,{className:`string`}),{className:`string`,begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},l={className:`title`,begin:t.optional(r)+e.IDENT_RE,relevance:0},u=t.optional(r)+e.IDENT_RE+`\\s*\\(`,d={keyword:`asm.auto.break.case.continue.default.do.else.enum.extern.for.fortran.goto.if.inline.register.restrict.return.sizeof.typeof.typeof_unqual.struct.switch.typedef.union.volatile.while._Alignas._Alignof._Atomic._Generic._Noreturn._Static_assert._Thread_local.alignas.alignof.noreturn.static_assert.thread_local._Pragma`.split(`.`),type:`float.double.signed.unsigned.int.short.long.char.void._Bool._BitInt._Complex._Imaginary._Decimal32._Decimal64._Decimal96._Decimal128._Decimal64x._Decimal128x._Float16._Float32._Float64._Float128._Float32x._Float64x._Float128x.const.static.constexpr.complex.bool.imaginary`.split(`.`),literal:`true false NULL`,built_in:`std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr`},f=[c,a,n,e.C_BLOCK_COMMENT_MODE,s,o],p={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:`new throw return else`,end:/;/}],keywords:d,contains:f.concat([{begin:/\(/,end:/\)/,keywords:d,contains:f.concat([`self`]),relevance:0}]),relevance:0},m={begin:`(`+i+`[\\*&\\s]+)+`+u,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:d,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:`decltype\\(auto\\)`,keywords:d,relevance:0},{begin:u,returnBegin:!0,contains:[e.inherit(l,{className:`title.function`})],relevance:0},{relevance:0,match:/,/},{className:`params`,begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,o,s,a,{begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[`self`,n,e.C_BLOCK_COMMENT_MODE,o,s,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:`C`,aliases:[`h`],keywords:d,disableAutodetect:!0,illegal:`</`,contains:[].concat(p,m,f,[c,{begin:e.IDENT_RE+`::`,keywords:d},{className:`class`,beginKeywords:`enum class struct union`,end:/[{;:<>=]/,contains:[{beginKeywords:`final class struct`},e.TITLE_MODE]}]),exports:{preprocessor:c,strings:o,keywords:d}}}function ix(e){let t=e.regex,n=e.COMMENT(`//`,`$`,{contains:[{begin:/\\\n/}]}),r=`[a-zA-Z_]\\w*::`,i=`(?!struct)(decltype\\(auto\\)|`+t.optional(r)+`[a-zA-Z_]\\w*`+t.optional(`<[^<>]+>`)+`)`,a={className:`type`,begin:`\\b[a-z\\d_]*_t\\b`},o={className:`string`,variants:[{begin:`(u8?|U|L)?"`,end:`"`,illegal:`\\n`,contains:[e.BACKSLASH_ESCAPE]},{begin:`(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)`,end:`'`,illegal:`.`},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},s={className:`number`,variants:[{begin:`[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)`},{begin:`[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)`}],relevance:0},c={className:`meta`,begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:`if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include`},contains:[{begin:/\\\n/,relevance:0},e.inherit(o,{className:`string`}),{className:`string`,begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},l={className:`title`,begin:t.optional(r)+e.IDENT_RE,relevance:0},u=t.optional(r)+e.IDENT_RE+`\\s*\\(`,d=`alignas.alignof.and.and_eq.asm.atomic_cancel.atomic_commit.atomic_noexcept.auto.bitand.bitor.break.case.catch.class.co_await.co_return.co_yield.compl.concept.const_cast|10.consteval.constexpr.constinit.continue.decltype.default.delete.do.dynamic_cast|10.else.enum.explicit.export.extern.false.final.for.friend.goto.if.import.inline.module.mutable.namespace.new.noexcept.not.not_eq.nullptr.operator.or.or_eq.override.private.protected.public.reflexpr.register.reinterpret_cast|10.requires.return.sizeof.static_assert.static_cast|10.struct.switch.synchronized.template.this.thread_local.throw.transaction_safe.transaction_safe_dynamic.true.try.typedef.typeid.typename.union.using.virtual.volatile.while.xor.xor_eq`.split(`.`),f=[`bool`,`char`,`char16_t`,`char32_t`,`char8_t`,`double`,`float`,`int`,`long`,`short`,`void`,`wchar_t`,`unsigned`,`signed`,`const`,`static`],p=`any.auto_ptr.barrier.binary_semaphore.bitset.complex.condition_variable.condition_variable_any.counting_semaphore.deque.false_type.flat_map.flat_set.future.imaginary.initializer_list.istringstream.jthread.latch.lock_guard.multimap.multiset.mutex.optional.ostringstream.packaged_task.pair.promise.priority_queue.queue.recursive_mutex.recursive_timed_mutex.scoped_lock.set.shared_future.shared_lock.shared_mutex.shared_timed_mutex.shared_ptr.stack.string_view.stringstream.timed_mutex.thread.true_type.tuple.unique_lock.unique_ptr.unordered_map.unordered_multimap.unordered_multiset.unordered_set.variant.vector.weak_ptr.wstring.wstring_view`.split(`.`),m=`abort.abs.acos.apply.as_const.asin.atan.atan2.calloc.ceil.cerr.cin.clog.cos.cosh.cout.declval.endl.exchange.exit.exp.fabs.floor.fmod.forward.fprintf.fputs.free.frexp.fscanf.future.invoke.isalnum.isalpha.iscntrl.isdigit.isgraph.islower.isprint.ispunct.isspace.isupper.isxdigit.labs.launder.ldexp.log.log10.make_pair.make_shared.make_shared_for_overwrite.make_tuple.make_unique.malloc.memchr.memcmp.memcpy.memset.modf.move.pow.printf.putchar.puts.realloc.scanf.sin.sinh.snprintf.sprintf.sqrt.sscanf.std.stderr.stdin.stdout.strcat.strchr.strcmp.strcpy.strcspn.strlen.strncat.strncmp.strncpy.strpbrk.strrchr.strspn.strstr.swap.tan.tanh.terminate.to_underlying.tolower.toupper.vfprintf.visit.vprintf.vsprintf`.split(`.`),h={type:f,keyword:d,literal:[`NULL`,`false`,`nullopt`,`nullptr`,`true`],built_in:[`_Pragma`],_type_hints:p},g={className:`function.dispatch`,relevance:0,keywords:{_hint:m},begin:t.concat(/\b/,`(?!${d.join(`|`)})`,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},_=[g,c,a,n,e.C_BLOCK_COMMENT_MODE,s,o],v={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:`new throw return else`,end:/;/}],keywords:h,contains:_.concat([{begin:/\(/,end:/\)/,keywords:h,contains:_.concat([`self`]),relevance:0}]),relevance:0},y={className:`function`,begin:`(`+i+`[\\*&\\s]+)+`+u,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:h,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:`decltype\\(auto\\)`,keywords:h,relevance:0},{begin:u,returnBegin:!0,contains:[l],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[o,s]},{relevance:0,match:/,/},{className:`params`,begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,o,s,a,{begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[`self`,n,e.C_BLOCK_COMMENT_MODE,o,s,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:`C++`,aliases:[`cc`,`c++`,`h++`,`hpp`,`hh`,`hxx`,`cxx`],keywords:h,illegal:`</`,classNameAliases:{"function.dispatch":`built_in`},contains:[].concat(v,y,g,_,[c,{begin:`\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)`,end:`>`,keywords:h,contains:[`self`,a]},{begin:e.IDENT_RE+`::`,keywords:h},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:`keyword`,3:`title.class`}}])}}function ax(e){let t=[`bool`,`byte`,`char`,`decimal`,`delegate`,`double`,`dynamic`,`enum`,`float`,`int`,`long`,`nint`,`nuint`,`object`,`sbyte`,`short`,`string`,`ulong`,`uint`,`ushort`],n=[`public`,`private`,`protected`,`static`,`internal`,`protected`,`abstract`,`async`,`extern`,`override`,`unsafe`,`virtual`,`new`,`sealed`,`partial`],r={keyword:`abstract.as.base.break.case.catch.class.const.continue.do.else.event.explicit.extern.finally.fixed.for.foreach.goto.if.implicit.in.interface.internal.is.lock.namespace.new.operator.out.override.params.private.protected.public.readonly.record.ref.return.scoped.sealed.sizeof.stackalloc.static.struct.switch.this.throw.try.typeof.unchecked.unsafe.using.virtual.void.volatile.while`.split(`.`).concat(`add.alias.and.ascending.args.async.await.by.descending.dynamic.equals.file.from.get.global.group.init.into.join.let.nameof.not.notnull.on.or.orderby.partial.record.remove.required.scoped.select.set.unmanaged.value|0.var.when.where.with.yield`.split(`.`)),built_in:t,literal:[`default`,`false`,`null`,`true`]},i=e.inherit(e.TITLE_MODE,{begin:`[a-zA-Z](\\.?\\w)*`}),a={className:`number`,variants:[{begin:`\\b(0b[01']+)`},{begin:`(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)`},{begin:`(-?)(\\b0[xX][a-fA-F0-9'_]+|(\\b[\\d'_]+(\\.[\\d'_]*)?|\\.[\\d'_]+)([eE][-+]?[\\d'_]+)?)`}],relevance:0},o={className:`string`,begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},s={className:`string`,begin:`@"`,end:`"`,contains:[{begin:`""`}]},c=e.inherit(s,{illegal:/\n/}),l={className:`subst`,begin:/\{/,end:/\}/,keywords:r},u=e.inherit(l,{illegal:/\n/}),d={className:`string`,begin:/\$"/,end:`"`,illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,u]},f={className:`string`,begin:/\$@"/,end:`"`,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:`""`},l]},p=e.inherit(f,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:`""`},u]});l.contains=[f,d,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.C_BLOCK_COMMENT_MODE],u.contains=[p,d,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];let m={variants:[o,f,d,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},h={begin:`<`,end:`>`,contains:[{beginKeywords:`in out`},i]},g=e.IDENT_RE+`(<`+e.IDENT_RE+`(\\s*,\\s*`+e.IDENT_RE+`)*>)?(\\[\\])?`,_={begin:`@`+e.IDENT_RE,relevance:0};return{name:`C#`,aliases:[`cs`,`c#`],keywords:r,illegal:/::/,contains:[e.COMMENT(`///`,`$`,{returnBegin:!0,contains:[{className:`doctag`,variants:[{begin:`///`,relevance:0},{begin:`<!--|-->`},{begin:`</?`,end:`>`}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:`meta`,begin:`#`,end:`$`,keywords:{keyword:`if else elif endif define undef warning error line region endregion pragma checksum`}},m,a,{beginKeywords:`class interface`,relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:`where class`},i,h,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:`namespace`,relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[i,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:`record`,relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[i,h,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:`meta`,begin:`^\\s*\\[(?=[\\w])`,excludeBegin:!0,end:`\\]`,excludeEnd:!0,contains:[{className:`string`,begin:/"/,end:/"/}]},{beginKeywords:`new return throw await else`,relevance:0},{className:`function`,begin:`(`+g+`\\s+)+`+e.IDENT_RE+`\\s*(<[^=]+>\\s*)?\\(`,returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:r,contains:[{beginKeywords:n.join(` `),relevance:0},{begin:e.IDENT_RE+`\\s*(<[^=]+>\\s*)?\\(`,returnBegin:!0,contains:[e.TITLE_MODE,h],relevance:0},{match:/\(\)/},{className:`params`,begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:r,relevance:0,contains:[m,a,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},_]}}var ox=e=>({IMPORTANT:{scope:`meta`,begin:`!important`},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:`number`,begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:`number`,begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,4}(-[0-9A-Fa-f][0-9A-Fa-f]{0,4})?/},FUNCTION_DISPATCH:{className:`built_in`,begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:`selector-attr`,begin:/\[/,end:/\]/,illegal:`$`,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:`number`,begin:e.NUMBER_RE+`(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?`,relevance:0},CSS_VARIABLE:{className:`attr`,begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),sx=`a.abbr.address.article.aside.audio.b.blockquote.body.button.canvas.caption.cite.code.dd.del.details.dfn.div.dl.dt.em.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.html.i.iframe.img.input.ins.kbd.label.legend.li.main.mark.menu.nav.object.ol.optgroup.option.p.picture.q.quote.samp.section.select.source.span.strong.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.ul.var.video`.split(`.`),cx=`defs.g.marker.mask.pattern.svg.switch.symbol.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feFlood.feGaussianBlur.feImage.feMerge.feMorphology.feOffset.feSpecularLighting.feTile.feTurbulence.linearGradient.radialGradient.stop.circle.ellipse.image.line.path.polygon.polyline.rect.text.use.textPath.tspan.foreignObject.clipPath`.split(`.`),lx=[...sx,...cx],ux=`any-hover.any-pointer.aspect-ratio.color.color-gamut.color-index.device-aspect-ratio.device-height.device-width.display-mode.forced-colors.grid.height.hover.inverted-colors.monochrome.orientation.overflow-block.overflow-inline.pointer.prefers-color-scheme.prefers-contrast.prefers-reduced-motion.prefers-reduced-transparency.resolution.scan.scripting.update.width.min-width.max-width.min-height.max-height`.split(`.`).sort().reverse(),dx=`active.any-link.blank.checked.current.default.defined.dir.disabled.drop.empty.enabled.first.first-child.first-of-type.fullscreen.future.focus.focus-visible.focus-within.has.host.host-context.hover.indeterminate.in-range.invalid.is.lang.last-child.last-of-type.left.link.local-link.not.nth-child.nth-col.nth-last-child.nth-last-col.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.past.placeholder-shown.read-only.read-write.required.right.root.scope.target.target-within.user-invalid.valid.visited.where`.split(`.`).sort().reverse(),fx=[`after`,`backdrop`,`before`,`cue`,`cue-region`,`first-letter`,`first-line`,`grammar-error`,`marker`,`part`,`placeholder`,`selection`,`slotted`,`spelling-error`].sort().reverse(),px=`accent-color.align-content.align-items.align-self.alignment-baseline.all.anchor-name.animation.animation-composition.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-range.animation-range-end.animation-range-start.animation-timeline.animation-timing-function.appearance.aspect-ratio.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.block-size.border.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-end-end-radius.border-end-start-radius.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-start-end-radius.border-start-start-radius.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-align.box-decoration-break.box-direction.box-flex.box-flex-group.box-lines.box-ordinal-group.box-orient.box-pack.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.color-scheme.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.contain-intrinsic-block-size.contain-intrinsic-height.contain-intrinsic-inline-size.contain-intrinsic-size.contain-intrinsic-width.container.container-name.container-type.content.content-visibility.counter-increment.counter-reset.counter-set.cue.cue-after.cue-before.cursor.cx.cy.direction.display.dominant-baseline.empty-cells.enable-background.field-sizing.fill.fill-opacity.fill-rule.filter.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.flood-color.flood-opacity.flow.font.font-display.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-palette.font-size.font-size-adjust.font-smooth.font-smoothing.font-stretch.font-style.font-synthesis.font-synthesis-position.font-synthesis-small-caps.font-synthesis-style.font-synthesis-weight.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-emoji.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.forced-color-adjust.gap.glyph-orientation-horizontal.glyph-orientation-vertical.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphenate-character.hyphenate-limit-chars.hyphens.icon.image-orientation.image-rendering.image-resolution.ime-mode.initial-letter.initial-letter-align.inline-size.inset.inset-area.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.kerning.left.letter-spacing.lighting-color.line-break.line-height.line-height-step.list-style.list-style-image.list-style-position.list-style-type.margin.margin-block.margin-block-end.margin-block-start.margin-bottom.margin-inline.margin-inline-end.margin-inline-start.margin-left.margin-right.margin-top.margin-trim.marker.marker-end.marker-mid.marker-start.marks.mask.mask-border.mask-border-mode.mask-border-outset.mask-border-repeat.mask-border-slice.mask-border-source.mask-border-width.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.masonry-auto-flow.math-depth.math-shift.math-style.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.nav-down.nav-index.nav-left.nav-right.nav-up.none.normal.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-anchor.overflow-block.overflow-clip-margin.overflow-inline.overflow-wrap.overflow-x.overflow-y.overlay.overscroll-behavior.overscroll-behavior-block.overscroll-behavior-inline.overscroll-behavior-x.overscroll-behavior-y.padding.padding-block.padding-block-end.padding-block-start.padding-bottom.padding-inline.padding-inline-end.padding-inline-start.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.paint-order.pause.pause-after.pause-before.perspective.perspective-origin.place-content.place-items.place-self.pointer-events.position.position-anchor.position-visibility.print-color-adjust.quotes.r.resize.rest.rest-after.rest-before.right.rotate.row-gap.ruby-align.ruby-position.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-stop.scroll-snap-type.scroll-timeline.scroll-timeline-axis.scroll-timeline-name.scrollbar-color.scrollbar-gutter.scrollbar-width.shape-image-threshold.shape-margin.shape-outside.shape-rendering.speak.speak-as.src.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.table-layout.text-align.text-align-all.text-align-last.text-anchor.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-decoration-thickness.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-indent.text-justify.text-orientation.text-overflow.text-rendering.text-shadow.text-size-adjust.text-transform.text-underline-offset.text-underline-position.text-wrap.text-wrap-mode.text-wrap-style.timeline-scope.top.touch-action.transform.transform-box.transform-origin.transform-style.transition.transition-behavior.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.unicode-range.user-modify.user-select.vector-effect.vertical-align.view-timeline.view-timeline-axis.view-timeline-inset.view-timeline-name.view-transition-name.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.white-space.white-space-collapse.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.x.y.z-index.zoom`.split(`.`).sort().reverse();function mx(e){let t=e.regex,n=ox(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i=/@-?\w[\w]*(-\w+)*/,a=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:`CSS`,case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:`from to`},classNameAliases:{keyframePosition:`selector-tag`},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:`selector-id`,begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:`selector-class`,begin:`\\.[a-zA-Z-][a-zA-Z0-9_-]*`,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:`selector-pseudo`,variants:[{begin:`:(`+dx.join(`|`)+`)`},{begin:`:(:)?(`+fx.join(`|`)+`)`}]},n.CSS_VARIABLE,{className:`attribute`,begin:`\\b(`+px.join(`|`)+`)\\b`},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,n.UNICODE_RANGE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:`url data-uri`},contains:[...a,{className:`string`,begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:`[{;]`,relevance:0,illegal:/:/,contains:[{className:`keyword`,begin:i},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:`and or not only`,attribute:ux.join(` `)},contains:[{begin:/[a-z-]+(?=:)/,className:`attribute`},...a,n.CSS_NUMBER_MODE]}]},{className:`selector-tag`,begin:`\\b(`+lx.join(`|`)+`)\\b`}]}}function hx(e){let t=e.regex;return{name:`Diff`,aliases:[`patch`],contains:[{className:`meta`,relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+,\d+ +\+\d+ +@@/,/^@@ +-\d+ +\+\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:`comment`,variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:`addition`,begin:/^\+/,end:/$/},{className:`deletion`,begin:/^-/,end:/$/},{className:`addition`,begin:/^!/,end:/$/}]}}function gx(e){let t={keyword:[`break`,`case`,`chan`,`const`,`continue`,`default`,`defer`,`else`,`fallthrough`,`for`,`func`,`go`,`goto`,`if`,`import`,`interface`,`map`,`package`,`range`,`return`,`select`,`struct`,`switch`,`type`,`var`],type:[`bool`,`byte`,`complex64`,`complex128`,`error`,`float32`,`float64`,`int8`,`int16`,`int32`,`int64`,`string`,`uint8`,`uint16`,`uint32`,`uint64`,`int`,`uint`,`uintptr`,`rune`],literal:[`true`,`false`,`iota`,`nil`],built_in:[`append`,`cap`,`close`,`complex`,`copy`,`imag`,`len`,`make`,`new`,`panic`,`print`,`println`,`real`,`recover`,`delete`]};return{name:`Go`,aliases:[`golang`],keywords:t,illegal:`</`,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:`string`,variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:`number`,variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:`function`,beginKeywords:`func`,end:`\\s*(\\{|$)`,excludeEnd:!0,contains:[e.TITLE_MODE,{className:`params`,begin:/\(/,end:/\)/,endsParent:!0,keywords:t,illegal:/["']/}]}]}}function _x(e){let t=e.regex;return{name:`GraphQL`,aliases:[`gql`],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:[`query`,`mutation`,`subscription`,`type`,`input`,`schema`,`directive`,`interface`,`union`,`scalar`,`fragment`,`enum`,`on`],literal:[`true`,`false`,`null`]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:`punctuation`,match:/[.]{3}/,relevance:0},{scope:`punctuation`,begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:`variable`,begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:`meta`,match:/@\w+/,excludeEnd:!0},{scope:`symbol`,begin:t.concat(/[_A-Za-z][_0-9A-Za-z]*/,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function vx(e){let t=e.regex,n={className:`number`,relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];let i={className:`variable`,variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},a={className:`literal`,begin:/\bon|off|true|false|yes|no\b/},o={className:`string`,contains:[e.BACKSLASH_ESCAPE],variants:[{begin:`'''`,end:`'''`,relevance:10},{begin:`"""`,end:`"""`,relevance:10},{begin:`"`,end:`"`},{begin:`'`,end:`'`}]},s={begin:/\[/,end:/\]/,contains:[r,a,i,o,n,`self`],relevance:0},c=t.either(/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/);return{name:`TOML, also INI`,aliases:[`toml`],case_insensitive:!0,illegal:/\S/,contains:[r,{className:`section`,begin:/\[+/,end:/\]+/},{begin:t.concat(c,`(\\s*\\.\\s*`,c,`)*`,t.lookahead(/\s*=\s*[^#\s]/)),className:`attr`,starts:{end:/$/,contains:[r,s,a,i,o,n]}}]}}var yx=`[0-9](_*[0-9])*`,bx=`\\.(${yx})`,xx=`[0-9a-fA-F](_*[0-9a-fA-F])*`,Sx={className:`number`,variants:[{begin:`(\\b(${yx})((${bx})|\\.)?|(${bx}))[eE][+-]?(${yx})[fFdD]?\\b`},{begin:`\\b(${yx})((${bx})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${bx})[fFdD]?\\b`},{begin:`\\b(${yx})[fFdD]\\b`},{begin:`\\b0[xX]((${xx})\\.?|(${xx})?\\.(${xx}))[pP][+-]?(${yx})[fFdD]?\\b`},{begin:`\\b(0|[1-9](_*[0-9])*)[lL]?\\b`},{begin:`\\b0[xX](${xx})[lL]?\\b`},{begin:`\\b0(_*[0-7])*[lL]?\\b`},{begin:`\\b0[bB][01](_*[01])*[lL]?\\b`}],relevance:0};function Cx(e,t,n){return n===-1?``:e.replace(t,r=>Cx(e,t,n-1))}function wx(e){let t=e.regex,n=`[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*`,r=n+Cx(`(?:<`+n+`~~~(?:\\s*,\\s*`+n+`~~~)*>)?`,/~~~/g,2),i={keyword:`synchronized.abstract.private.var.static.if.const .for.while.strictfp.finally.protected.import.native.final.void.enum.else.break.transient.catch.instanceof.volatile.case.assert.package.default.public.try.switch.continue.throws.protected.public.private.module.requires.exports.do.sealed.yield.permits.goto.when`.split(`.`),literal:[`false`,`true`,`null`],type:[`char`,`boolean`,`long`,`float`,`int`,`byte`,`short`,`double`],built_in:[`super`,`this`]},a={className:`meta`,begin:`@`+n,contains:[{begin:/\(/,end:/\)/,contains:[`self`]}]},o={className:`params`,begin:/\(/,end:/\)/,keywords:i,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:`Java`,aliases:[`jsp`],keywords:i,illegal:/<\/|#/,contains:[e.COMMENT(`/\\*\\*`,`\\*/`,{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:`doctag`,begin:`@[A-Za-z]+`}]}),{begin:/import java\.[a-z]+\./,keywords:`import`,relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:`string`,contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:`keyword`,3:`title.class`}},{match:/non-sealed/,scope:`keyword`},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:`type`,3:`variable`,5:`operator`}},{begin:[/record/,/\s+/,n],className:{1:`keyword`,3:`title.class`},contains:[o,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:`new throw return else`,relevance:0},{begin:[`(?:`+r+`\\s+)`,e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:`title.function`},keywords:i,contains:[{className:`params`,begin:/\(/,end:/\)/,keywords:i,relevance:0,contains:[a,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,Sx,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},Sx,a]}}var Tx=`[A-Za-z$_][0-9A-Za-z$_]*`,Ex=`as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using`.split(`.`),Dx=[`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`],Ox=`Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly`.split(`.`),kx=[`Error`,`EvalError`,`InternalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],Ax=[`setInterval`,`setTimeout`,`clearInterval`,`clearTimeout`,`require`,`exports`,`eval`,`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,`escape`,`unescape`],jx=[`arguments`,`this`,`super`,`console`,`window`,`document`,`localStorage`,`sessionStorage`,`module`,`global`],Mx=[].concat(Ax,Ox,kx);function Nx(e){let t=e.regex,n=(e,{after:t})=>{let n=`</`+e[0].slice(1);return e.input.indexOf(n,t)!==-1},r=Tx,i={begin:`<>`,end:`</>`},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{let r=e[0].length+e.index,i=e.input[r];if(i===`<`||i===`,`){t.ignoreMatch();return}i===`>`&&(n(e,{after:r})||t.ignoreMatch());let a,o=e.input.substring(r);((a=o.match(/^\s*=/))||(a=o.match(/^\s+extends\s+/))&&a.index===0)&&t.ignoreMatch()}},s={$pattern:Tx,keyword:Ex,literal:Dx,built_in:Mx,"variable.language":jx},c=`[0-9](_?[0-9])*`,l=`\\.(${c})`,u=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,d={className:`number`,variants:[{begin:`(\\b(${u})((${l})|\\.)?|(${l}))[eE][+-]?(${c})\\b`},{begin:`\\b(${u})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*n?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*n?\\b`},{begin:`\\b0[0-7]+n?\\b`}],relevance:0},f={className:`subst`,begin:`\\$\\{`,end:`\\}`,keywords:s,contains:[]},p={begin:".?html`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`xml`}},m={begin:".?css`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`css`}},h={begin:".?gql`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`graphql`}},g={className:`string`,begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},_={className:`comment`,variants:[e.COMMENT(/\/\*\*(?!\/)/,`\\*/`,{relevance:0,contains:[{begin:`(?=@[A-Za-z]+)`,relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`},{className:`type`,begin:`\\{`,end:`\\}`,excludeEnd:!0,excludeBegin:!0,relevance:0},{className:`variable`,begin:r+`(?=\\s*(-)|$)`,endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:s,contains:[`self`].concat(v)});let y=[].concat(_,f.contains),b=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:[`self`].concat(y)}]),x={className:`params`,begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},S={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,`(`,t.concat(/\./,r),`)*`)],scope:{1:`keyword`,3:`title.class`,5:`keyword`,7:`title.class.inherited`}},{match:[/class/,/\s+/,r],scope:{1:`keyword`,3:`title.class`}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:`title.class`,keywords:{_:[...Ox,...kx]}},w={label:`use_strict`,className:`meta`,relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:`keyword`,3:`title.function`},label:`func.def`,contains:[x],illegal:/%/},E={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`};function D(e){return t.concat(`(?!`,e.join(`|`),`)`)}let O={match:t.concat(/\b/,D([...Ax,`super`,`import`,`await`].map(e=>`${e}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:`title.function`,relevance:0},k={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:`prototype`,className:`property`,relevance:0},A={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:`keyword`,3:`title.function`},contains:[{begin:/\(\)/},x]},j=`(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|`+e.UNDERSCORE_IDENT_RE+`)\\s*=>`,M={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(j)],keywords:`async`,className:{1:`keyword`,3:`title.function`},contains:[x]};return{name:`JavaScript`,aliases:[`js`,`jsx`,`mjs`,`cjs`],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:C},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:`shebang`,binary:`node`,relevance:5}),w,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,_,{match:/\$\d+/},d,C,{scope:`attr`,match:r+t.lookahead(`:`),relevance:0},M,{begin:`(`+e.RE_STARTERS_RE+`|\\b(case|return|throw)\\b)\\s*`,keywords:`return throw case`,relevance:0,contains:[_,e.REGEXP_MODE,{className:`function`,begin:j,returnBegin:!0,end:`\\s*=>`,contains:[{className:`params`,variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:`xml`,contains:[{begin:o.begin,end:o.end,skip:!0,contains:[`self`]}]}]},T,{beginKeywords:`while if switch catch for`},{begin:`\\b(?!function)`+e.UNDERSCORE_IDENT_RE+`\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{`,returnBegin:!0,label:`func.def`,contains:[x,e.inherit(e.TITLE_MODE,{begin:r,className:`title.function`})]},{match:/\.\.\./,relevance:0},k,{match:`\\$`+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:`title.function`},contains:[x]},O,E,S,A,{match:/\$[(.]/}]}}var Px={scope:`number`,match:`([-+]?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)|NaN|[-+]?Infinity`,relevance:0};function Fx(e){let t={className:`attr`,begin:/(("(\\.|[^\\"\r\n])*")|('(\\.|[^\\'\r\n])*'))(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:`punctuation`,relevance:0},r=[`true`,`false`,`null`],i={scope:`literal`,beginKeywords:r.join(` `)};return{name:`JSON`,aliases:[`jsonc`,`json5`],keywords:{literal:r},contains:[t,n,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,Px,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:`\\S`}}var Ix=`[0-9](_*[0-9])*`,Lx=`\\.(${Ix})`,Rx=`[0-9a-fA-F](_*[0-9a-fA-F])*`,zx={className:`number`,variants:[{begin:`(\\b(${Ix})((${Lx})|\\.)?|(${Lx}))[eE][+-]?(${Ix})[fFdD]?\\b`},{begin:`\\b(${Ix})((${Lx})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Lx})[fFdD]?\\b`},{begin:`\\b(${Ix})[fFdD]\\b`},{begin:`\\b0[xX]((${Rx})\\.?|(${Rx})?\\.(${Rx}))[pP][+-]?(${Ix})[fFdD]?\\b`},{begin:`\\b(0|[1-9](_*[0-9])*)[lL]?\\b`},{begin:`\\b0[xX](${Rx})[lL]?\\b`},{begin:`\\b0(_*[0-7])*[lL]?\\b`},{begin:`\\b0[bB][01](_*[01])*[lL]?\\b`}],relevance:0};function Bx(e){let t={keyword:`abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual`,built_in:`Byte Short Char Int Long Boolean Float Double Void Unit Nothing`,literal:`true false null`},n={className:`keyword`,begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:`symbol`,begin:/@\w+/}]}},r={className:`symbol`,begin:e.UNDERSCORE_IDENT_RE+`@`},i={className:`subst`,begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},a={className:`variable`,begin:`\\$`+e.UNDERSCORE_IDENT_RE},o={className:`string`,variants:[{begin:`"""`,end:`"""(?=[^"])`,contains:[a,i]},{begin:`'`,end:`'`,illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:`"`,end:`"`,illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,a,i]}]};i.contains.push(o);let s={className:`meta`,begin:`@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*`+e.UNDERSCORE_IDENT_RE+`)?`},c={className:`meta`,begin:`@`+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(o,{className:`string`}),`self`]}]},l=zx,u=e.COMMENT(`/\\*`,`\\*/`,{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:`type`,begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},f=d;return f.variants[1].contains=[d],d.variants[1].contains=[f],{name:`Kotlin`,aliases:[`kt`,`kts`],keywords:t,contains:[e.COMMENT(`/\\*\\*`,`\\*/`,{relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`}]}),e.C_LINE_COMMENT_MODE,u,n,r,s,c,{className:`function`,beginKeywords:`fun`,end:`[(]|$`,returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+`\\s*\\(`,returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:`type`,begin:/</,end:/>/,keywords:`reified`,relevance:0},{className:`params`,begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,u],relevance:0},e.C_LINE_COMMENT_MODE,u,s,c,o,e.C_NUMBER_MODE]},u]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:`title.class`},keywords:`class interface trait`,end:/[:\{(]|$/,excludeEnd:!0,illegal:`extends implements`,contains:[{beginKeywords:`public protected internal private constructor`},e.UNDERSCORE_TITLE_MODE,{className:`type`,begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:`type`,begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},s,c]},o,{className:`meta`,begin:`^#!/usr/bin/env`,end:`$`,illegal:`
|
|
64
|
+
`},l]}}var Vx=e=>({IMPORTANT:{scope:`meta`,begin:`!important`},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:`number`,begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:`number`,begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,4}(-[0-9A-Fa-f][0-9A-Fa-f]{0,4})?/},FUNCTION_DISPATCH:{className:`built_in`,begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:`selector-attr`,begin:/\[/,end:/\]/,illegal:`$`,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:`number`,begin:e.NUMBER_RE+`(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?`,relevance:0},CSS_VARIABLE:{className:`attr`,begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Hx=`a.abbr.address.article.aside.audio.b.blockquote.body.button.canvas.caption.cite.code.dd.del.details.dfn.div.dl.dt.em.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.html.i.iframe.img.input.ins.kbd.label.legend.li.main.mark.menu.nav.object.ol.optgroup.option.p.picture.q.quote.samp.section.select.source.span.strong.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.ul.var.video`.split(`.`),Ux=`defs.g.marker.mask.pattern.svg.switch.symbol.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feFlood.feGaussianBlur.feImage.feMerge.feMorphology.feOffset.feSpecularLighting.feTile.feTurbulence.linearGradient.radialGradient.stop.circle.ellipse.image.line.path.polygon.polyline.rect.text.use.textPath.tspan.foreignObject.clipPath`.split(`.`),Wx=[...Hx,...Ux],Gx=`any-hover.any-pointer.aspect-ratio.color.color-gamut.color-index.device-aspect-ratio.device-height.device-width.display-mode.forced-colors.grid.height.hover.inverted-colors.monochrome.orientation.overflow-block.overflow-inline.pointer.prefers-color-scheme.prefers-contrast.prefers-reduced-motion.prefers-reduced-transparency.resolution.scan.scripting.update.width.min-width.max-width.min-height.max-height`.split(`.`).sort().reverse(),Kx=`active.any-link.blank.checked.current.default.defined.dir.disabled.drop.empty.enabled.first.first-child.first-of-type.fullscreen.future.focus.focus-visible.focus-within.has.host.host-context.hover.indeterminate.in-range.invalid.is.lang.last-child.last-of-type.left.link.local-link.not.nth-child.nth-col.nth-last-child.nth-last-col.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.past.placeholder-shown.read-only.read-write.required.right.root.scope.target.target-within.user-invalid.valid.visited.where`.split(`.`).sort().reverse(),qx=[`after`,`backdrop`,`before`,`cue`,`cue-region`,`first-letter`,`first-line`,`grammar-error`,`marker`,`part`,`placeholder`,`selection`,`slotted`,`spelling-error`].sort().reverse(),Jx=`accent-color.align-content.align-items.align-self.alignment-baseline.all.anchor-name.animation.animation-composition.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-range.animation-range-end.animation-range-start.animation-timeline.animation-timing-function.appearance.aspect-ratio.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.block-size.border.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-end-end-radius.border-end-start-radius.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-start-end-radius.border-start-start-radius.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-align.box-decoration-break.box-direction.box-flex.box-flex-group.box-lines.box-ordinal-group.box-orient.box-pack.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.color-scheme.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.contain-intrinsic-block-size.contain-intrinsic-height.contain-intrinsic-inline-size.contain-intrinsic-size.contain-intrinsic-width.container.container-name.container-type.content.content-visibility.counter-increment.counter-reset.counter-set.cue.cue-after.cue-before.cursor.cx.cy.direction.display.dominant-baseline.empty-cells.enable-background.field-sizing.fill.fill-opacity.fill-rule.filter.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.flood-color.flood-opacity.flow.font.font-display.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-palette.font-size.font-size-adjust.font-smooth.font-smoothing.font-stretch.font-style.font-synthesis.font-synthesis-position.font-synthesis-small-caps.font-synthesis-style.font-synthesis-weight.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-emoji.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.forced-color-adjust.gap.glyph-orientation-horizontal.glyph-orientation-vertical.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphenate-character.hyphenate-limit-chars.hyphens.icon.image-orientation.image-rendering.image-resolution.ime-mode.initial-letter.initial-letter-align.inline-size.inset.inset-area.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.kerning.left.letter-spacing.lighting-color.line-break.line-height.line-height-step.list-style.list-style-image.list-style-position.list-style-type.margin.margin-block.margin-block-end.margin-block-start.margin-bottom.margin-inline.margin-inline-end.margin-inline-start.margin-left.margin-right.margin-top.margin-trim.marker.marker-end.marker-mid.marker-start.marks.mask.mask-border.mask-border-mode.mask-border-outset.mask-border-repeat.mask-border-slice.mask-border-source.mask-border-width.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.masonry-auto-flow.math-depth.math-shift.math-style.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.nav-down.nav-index.nav-left.nav-right.nav-up.none.normal.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-anchor.overflow-block.overflow-clip-margin.overflow-inline.overflow-wrap.overflow-x.overflow-y.overlay.overscroll-behavior.overscroll-behavior-block.overscroll-behavior-inline.overscroll-behavior-x.overscroll-behavior-y.padding.padding-block.padding-block-end.padding-block-start.padding-bottom.padding-inline.padding-inline-end.padding-inline-start.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.paint-order.pause.pause-after.pause-before.perspective.perspective-origin.place-content.place-items.place-self.pointer-events.position.position-anchor.position-visibility.print-color-adjust.quotes.r.resize.rest.rest-after.rest-before.right.rotate.row-gap.ruby-align.ruby-position.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-stop.scroll-snap-type.scroll-timeline.scroll-timeline-axis.scroll-timeline-name.scrollbar-color.scrollbar-gutter.scrollbar-width.shape-image-threshold.shape-margin.shape-outside.shape-rendering.speak.speak-as.src.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.table-layout.text-align.text-align-all.text-align-last.text-anchor.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-decoration-thickness.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-indent.text-justify.text-orientation.text-overflow.text-rendering.text-shadow.text-size-adjust.text-transform.text-underline-offset.text-underline-position.text-wrap.text-wrap-mode.text-wrap-style.timeline-scope.top.touch-action.transform.transform-box.transform-origin.transform-style.transition.transition-behavior.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.unicode-range.user-modify.user-select.vector-effect.vertical-align.view-timeline.view-timeline-axis.view-timeline-inset.view-timeline-name.view-transition-name.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.white-space.white-space-collapse.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.x.y.z-index.zoom`.split(`.`).sort().reverse(),Yx=Kx.concat(qx).sort().reverse();function Xx(e){let t=Vx(e),n=Yx,r=`([\\w-]+|@\\{[\\w-]+\\})`,i=[],a=[],o=function(e){return{className:`string`,begin:`~?`+e+`.*?`+e}},s=function(e,t,n){return{className:e,begin:t,relevance:n}},c={$pattern:/[a-z-]+/,keyword:`and or not only`,attribute:Gx.join(` `)},l={begin:`\\(`,end:`\\)`,contains:a,keywords:c,relevance:0};a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,o(`'`),o(`"`),t.CSS_NUMBER_MODE,{begin:`(url|data-uri)\\(`,starts:{className:`string`,end:`[\\)\\n]`,excludeEnd:!0}},t.UNICODE_RANGE,t.HEXCOLOR,l,s(`variable`,`@@?[\\w-]+`,10),s(`variable`,`@\\{[\\w-]+\\}`),s(`built_in`,"~?`[^`]*?`"),{className:`attribute`,begin:`[\\w-]+\\s*:`,end:`:`,returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:`and not`},t.FUNCTION_DISPATCH);let u=a.concat({begin:/\{/,end:/\}/,contains:i}),d={beginKeywords:`when`,endsWithParent:!0,contains:[{beginKeywords:`and not`}].concat(a)},f={begin:r+`\\s*:`,returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:`attribute`,begin:`\\b(`+Jx.join(`|`)+`)\\b`,end:/(?=:)/,starts:{endsWithParent:!0,illegal:`[<=$]`,relevance:0,contains:a}}]},p={className:`keyword`,begin:`@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b`,starts:{end:`[;{}]`,keywords:c,returnEnd:!0,contains:a,relevance:0}},m={className:`variable`,variants:[{begin:`@[\\w-]+\\s*:`,relevance:15},{begin:`@[\\w-]+`}],starts:{end:`[;}]`,returnEnd:!0,contains:u}},h={variants:[{begin:`[\\.#:&\\[>]`,end:`[;{}]`},{begin:r,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,d,s(`keyword`,`all\\b`),s(`variable`,`@\\{[\\w-]+\\}`),{begin:`\\b(`+Wx.join(`|`)+`)\\b`,className:`selector-tag`},t.CSS_NUMBER_MODE,s(`selector-tag`,r,0),s(`selector-id`,`#`+r),s(`selector-class`,`\\.`+r,0),s(`selector-tag`,`&`,0),t.ATTRIBUTE_SELECTOR_MODE,{className:`selector-pseudo`,begin:`:(`+Kx.join(`|`)+`)`},{className:`selector-pseudo`,begin:`:(:)?(`+qx.join(`|`)+`)`},{begin:/\(/,end:/\)/,relevance:0,contains:u},{begin:`!important`},t.FUNCTION_DISPATCH]},g={begin:`[\\w-]+:(:)?(${n.join(`|`)})`,returnBegin:!0,contains:[h]};return i.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p,m,g,f,h,d,t.FUNCTION_DISPATCH),{name:`Less`,case_insensitive:!0,illegal:`[=>'/<($"]`,contains:i}}function Zx(e){let t=`\\[=*\\[`,n=`\\]=*\\]`,r={begin:t,end:n,contains:[`self`]},i=[e.COMMENT(`--(?!\\[=*\\[)`,`$`),e.COMMENT(`--\\[=*\\[`,n,{contains:[r],relevance:10})];return{name:`Lua`,aliases:[`pluto`],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:`true false nil`,keyword:`and break do else elseif end for goto if in local not or repeat return then until while`,built_in:`_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove`},contains:i.concat([{className:`function`,beginKeywords:`function`,end:`\\)`,contains:[e.inherit(e.TITLE_MODE,{begin:`([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*`}),{className:`params`,begin:`\\(`,endsWithParent:!0,contains:i}].concat(i)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:`string`,begin:t,end:n,contains:[r],relevance:5}])}}function Qx(e){let t={className:`variable`,variants:[{begin:`\\$\\(`+e.UNDERSCORE_IDENT_RE+`\\)`,contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:`string`,begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},r={className:`variable`,begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:`subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value`},contains:[t,n]},i={begin:`^`+e.UNDERSCORE_IDENT_RE+`\\s*(?=[:+?]?=)`},a={className:`meta`,begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:`.PHONY`}},o={className:`section`,begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:`Makefile`,aliases:[`mk`,`mak`,`make`],keywords:{$pattern:/[\w-]+/,keyword:`define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath`},contains:[e.HASH_COMMENT_MODE,t,n,r,i,a,o]}}function $x(e){let t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:`>`,subLanguage:`xml`,relevance:0},r={begin:`^[-\\*]{3,}`,end:`$`},i={className:`code`,variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:`(~{3,})[^~](.|\\n)*?\\1~*[ ]*`},{begin:"```",end:"```+[ ]*$"},{begin:`~~~`,end:`~~~+[ ]*$`},{begin:"`.+?`"},{begin:`(?=^( {4}|\\t))`,contains:[{begin:`^( {4}|\\t)`,end:`(\\n)$`}],relevance:0}]},a={className:`bullet`,begin:`^[ ]*([*+-]|(\\d+\\.))(?=\\s+)`,end:`\\s+`,excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:`symbol`,begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:`link`,begin:/:\s*/,end:/$/,excludeBegin:!0}]},s={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:`string`,relevance:0,begin:`\\[`,end:`\\]`,excludeBegin:!0,returnEnd:!0},{className:`link`,relevance:0,begin:`\\]\\(`,end:`\\)`,excludeBegin:!0,excludeEnd:!0},{className:`symbol`,relevance:0,begin:`\\]\\[`,end:`\\]`,excludeBegin:!0,excludeEnd:!0}]},c={className:`strong`,contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},l={className:`emphasis`,contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},u=e.inherit(c,{contains:[]}),d=e.inherit(l,{contains:[]});c.contains.push(d),l.contains.push(u);let f=[n,s];return[c,l,u,d].forEach(e=>{e.contains=e.contains.concat(f)}),f=f.concat(c,l),{name:`Markdown`,aliases:[`md`,`mkdown`,`mkd`],contains:[{className:`section`,variants:[{begin:`^#{1,6}`,end:`$`,contains:f},{begin:`(?=^.+?\\n[=-]{2,}$)`,contains:[{begin:`^[=-]*$`},{begin:`^`,end:`\\n`,contains:f}]}]},n,a,c,l,{className:`quote`,begin:`^>\\s+`,contains:f,end:`$`},i,r,s,o,{scope:`literal`,match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function eS(e){let t={className:`built_in`,begin:`\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+`},n=/[a-zA-Z@][a-zA-Z0-9_]*/,r={"variable.language":[`this`,`super`],$pattern:n,keyword:`while.export.sizeof.typedef.const.struct.for.union.volatile.static.mutable.if.do.return.goto.enum.else.break.extern.asm.case.default.register.explicit.typename.switch.continue.inline.readonly.assign.readwrite.self.@synchronized.id.typeof.nonatomic.IBOutlet.IBAction.strong.weak.copy.in.out.inout.bycopy.byref.oneway.__strong.__weak.__block.__autoreleasing.@private.@protected.@public.@try.@property.@end.@throw.@catch.@finally.@autoreleasepool.@synthesize.@dynamic.@selector.@optional.@required.@encode.@package.@import.@defs.@compatibility_alias.__bridge.__bridge_transfer.__bridge_retained.__bridge_retain.__covariant.__contravariant.__kindof._Nonnull._Nullable._Null_unspecified.__FUNCTION__.__PRETTY_FUNCTION__.__attribute__.getter.setter.retain.unsafe_unretained.nonnull.nullable.null_unspecified.null_resettable.class.instancetype.NS_DESIGNATED_INITIALIZER.NS_UNAVAILABLE.NS_REQUIRES_SUPER.NS_RETURNS_INNER_POINTER.NS_INLINE.NS_AVAILABLE.NS_DEPRECATED.NS_ENUM.NS_OPTIONS.NS_SWIFT_UNAVAILABLE.NS_ASSUME_NONNULL_BEGIN.NS_ASSUME_NONNULL_END.NS_REFINED_FOR_SWIFT.NS_SWIFT_NAME.NS_SWIFT_NOTHROW.NS_DURING.NS_HANDLER.NS_ENDHANDLER.NS_VALUERETURN.NS_VOIDRETURN`.split(`.`),literal:[`false`,`true`,`FALSE`,`TRUE`,`nil`,`YES`,`NO`,`NULL`],built_in:[`dispatch_once_t`,`dispatch_queue_t`,`dispatch_sync`,`dispatch_async`,`dispatch_once`],type:[`int`,`float`,`char`,`unsigned`,`signed`,`short`,`long`,`double`,`wchar_t`,`unichar`,`void`,`bool`,`BOOL`,`id|0`,`_Bool`]},i={$pattern:n,keyword:[`@interface`,`@class`,`@protocol`,`@implementation`]};return{name:`Objective-C`,aliases:[`mm`,`objc`,`obj-c`,`obj-c++`,`objective-c++`],keywords:r,illegal:`</`,contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:`string`,variants:[{begin:`@"`,end:`"`,illegal:`\\n`,contains:[e.BACKSLASH_ESCAPE]}]},{className:`meta`,begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:`if else elif endif define undef warning error line pragma ifdef ifndef include`},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:`string`}),{className:`string`,begin:/<.*?>/,end:/$/,illegal:`\\n`},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:`class`,begin:`(`+i.keyword.join(`|`)+`)\\b`,end:/(\{|$)/,excludeEnd:!0,keywords:i,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:`\\.`+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function tS(e){let t=e.regex,n=`abs.accept.alarm.and.atan2.bind.binmode.bless.break.caller.chdir.chmod.chomp.chop.chown.chr.chroot.class.close.closedir.connect.continue.cos.crypt.dbmclose.dbmopen.defined.delete.die.do.dump.each.else.elsif.endgrent.endhostent.endnetent.endprotoent.endpwent.endservent.eof.eval.exec.exists.exit.exp.fcntl.field.fileno.flock.for.foreach.fork.format.formline.getc.getgrent.getgrgid.getgrnam.gethostbyaddr.gethostbyname.gethostent.getlogin.getnetbyaddr.getnetbyname.getnetent.getpeername.getpgrp.getpriority.getprotobyname.getprotobynumber.getprotoent.getpwent.getpwnam.getpwuid.getservbyname.getservbyport.getservent.getsockname.getsockopt.given.glob.gmtime.goto.grep.gt.hex.if.index.int.ioctl.join.keys.kill.last.lc.lcfirst.length.link.listen.local.localtime.log.lstat.lt.ma.map.method.mkdir.msgctl.msgget.msgrcv.msgsnd.my.ne.next.no.not.oct.open.opendir.or.ord.our.pack.package.pipe.pop.pos.print.printf.prototype.push.q|0.qq.quotemeta.qw.qx.rand.read.readdir.readline.readlink.readpipe.recv.redo.ref.rename.require.reset.return.reverse.rewinddir.rindex.rmdir.say.scalar.seek.seekdir.select.semctl.semget.semop.send.setgrent.sethostent.setnetent.setpgrp.setpriority.setprotoent.setpwent.setservent.setsockopt.shift.shmctl.shmget.shmread.shmwrite.shutdown.sin.sleep.socket.socketpair.sort.splice.split.sprintf.sqrt.srand.stat.state.study.sub.substr.symlink.syscall.sysopen.sysread.sysseek.system.syswrite.tell.telldir.tie.tied.time.times.tr.truncate.uc.ucfirst.umask.undef.unless.unlink.unpack.unshift.untie.until.use.utime.values.vec.wait.waitpid.wantarray.warn.when.while.write.x|0.xor.y|0`.split(`.`),r=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:n.join(` `)},a={className:`subst`,begin:`[$@]\\{`,end:`\\}`,keywords:i},o={begin:/->\{/,end:/\}/},s={scope:`attr`,match:/\s+:\s*\w+(\s*\(.*?\))?/},c={scope:`variable`,variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,`(?![A-Za-z])(?![@$%])`)},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[s]},l={className:`number`,variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},u=[e.BACKSLASH_ESCAPE,a,c],d=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],f=(e,n,i=`\\1`)=>{let a=i===`\\1`?i:t.concat(i,n);return t.concat(t.concat(`(?:`,e,`)`),n,/(?:\\.|[^\\\/])*?/,a,/(?:\\.|[^\\\/])*?/,i,r)},p=(e,n,i)=>t.concat(t.concat(`(?:`,e,`)`),n,/(?:\\.|[^\\\/])*?/,i,r),m=[c,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:`string`,contains:u,variants:[{begin:`q[qwxr]?\\s*\\(`,end:`\\)`,relevance:5},{begin:`q[qwxr]?\\s*\\[`,end:`\\]`,relevance:5},{begin:`q[qwxr]?\\s*\\{`,end:`\\}`,relevance:5},{begin:`q[qwxr]?\\s*\\|`,end:`\\|`,relevance:5},{begin:`q[qwxr]?\\s*<`,end:`>`,relevance:5},{begin:`qw\\s+q`,end:`q`,relevance:5},{begin:`'`,end:`'`,contains:[e.BACKSLASH_ESCAPE]},{begin:`"`,end:`"`},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:`-?\\w+\\s*=>`,relevance:0}]},l,{begin:`(\\/\\/|`+e.RE_STARTERS_RE+`|\\b(split|return|print|reverse|grep)\\b)\\s*`,keywords:`split return print reverse grep`,relevance:0,contains:[e.HASH_COMMENT_MODE,{className:`regexp`,variants:[{begin:f(`s|tr|y`,t.either(...d,{capture:!0}))},{begin:f(`s|tr|y`,`\\(`,`\\)`)},{begin:f(`s|tr|y`,`\\[`,`\\]`)},{begin:f(`s|tr|y`,`\\{`,`\\}`)}],relevance:2},{className:`regexp`,variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:p(`(?:m|qr)?`,/\//,/\//)},{begin:p(`m|qr`,t.either(...d,{capture:!0}),/\1/)},{begin:p(`m|qr`,/\(/,/\)/)},{begin:p(`m|qr`,/\[/,/\]/)},{begin:p(`m|qr`,/\{/,/\}/)}]}]},{className:`function`,beginKeywords:`sub method`,end:`(\\s*\\(.*?\\))?[;{]`,excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,s]},{className:`class`,beginKeywords:`class`,end:`[;{]`,excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,s,l]},{begin:`-\\w\\b`,relevance:0},{begin:`^__DATA__$`,end:`^__END__$`,subLanguage:`mojolicious`,contains:[{begin:`^@@.*`,end:`$`,className:`comment`}]}];return a.contains=m,o.contains=m,{name:`Perl`,aliases:[`pl`,`pm`],keywords:i,contains:m}}function nS(e){let t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),i=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),a=t.concat(/[A-Z]+/,n),o={scope:`variable`,match:`\\$+`+r},s={scope:`meta`,variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},c={scope:`subst`,variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},l=e.inherit(e.APOS_STRING_MODE,{illegal:null}),u=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(c)}),d={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(c),"on:begin":(e,t)=>{t.data._beginMatch=e[1]||e[2]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}},f=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),p=`[
|
|
65
|
+
]`,m={scope:`string`,variants:[u,l,d,f]},h={scope:`number`,variants:[{begin:`\\b0[bB][01]+(?:_[01]+)*\\b`},{begin:`\\b0[oO][0-7]+(?:_[0-7]+)*\\b`},{begin:`\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b`},{begin:`(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?`}],relevance:0},g=[`false`,`null`,`true`],_=`__CLASS__.__DIR__.__FILE__.__FUNCTION__.__COMPILER_HALT_OFFSET__.__LINE__.__METHOD__.__NAMESPACE__.__TRAIT__.die.echo.exit.include.include_once.print.require.require_once.array.abstract.and.as.binary.bool.boolean.break.callable.case.catch.class.clone.const.continue.declare.default.do.double.else.elseif.empty.enddeclare.endfor.endforeach.endif.endswitch.endwhile.enum.eval.extends.final.finally.float.for.foreach.from.global.goto.if.implements.instanceof.insteadof.int.integer.interface.isset.iterable.list.match|0.mixed.new.never.object.or.private.protected.public.readonly.real.return.string.switch.throw.trait.try.unset.use.var.void.while.xor.yield`.split(`.`),v=`Error|0.AppendIterator.ArgumentCountError.ArithmeticError.ArrayIterator.ArrayObject.AssertionError.BadFunctionCallException.BadMethodCallException.CachingIterator.CallbackFilterIterator.CompileError.Countable.DirectoryIterator.DivisionByZeroError.DomainException.EmptyIterator.ErrorException.Exception.FilesystemIterator.FilterIterator.GlobIterator.InfiniteIterator.InvalidArgumentException.IteratorIterator.LengthException.LimitIterator.LogicException.MultipleIterator.NoRewindIterator.OutOfBoundsException.OutOfRangeException.OuterIterator.OverflowException.ParentIterator.ParseError.RangeException.RecursiveArrayIterator.RecursiveCachingIterator.RecursiveCallbackFilterIterator.RecursiveDirectoryIterator.RecursiveFilterIterator.RecursiveIterator.RecursiveIteratorIterator.RecursiveRegexIterator.RecursiveTreeIterator.RegexIterator.RuntimeException.SeekableIterator.SplDoublyLinkedList.SplFileInfo.SplFileObject.SplFixedArray.SplHeap.SplMaxHeap.SplMinHeap.SplObjectStorage.SplObserver.SplPriorityQueue.SplQueue.SplStack.SplSubject.SplTempFileObject.TypeError.UnderflowException.UnexpectedValueException.UnhandledMatchError.ArrayAccess.BackedEnum.Closure.Fiber.Generator.Iterator.IteratorAggregate.Serializable.Stringable.Throwable.Traversable.UnitEnum.WeakReference.WeakMap.Directory.__PHP_Incomplete_Class.parent.php_user_filter.self.static.stdClass`.split(`.`),y={keyword:_,literal:(e=>{let t=[];return e.forEach(e=>{t.push(e),e.toLowerCase()===e?t.push(e.toUpperCase()):t.push(e.toLowerCase())}),t})(g),built_in:v},b=e=>e.map(e=>e.replace(/\|\d+$/,``)),x={variants:[{match:[/new/,t.concat(p,`+`),t.concat(`(?!`,b(v).join(`\\b|`),`\\b)`),i],scope:{1:`keyword`,4:`title.class`}}]},S=t.concat(r,`\\b(?!\\()`),C={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),S],scope:{2:`variable.constant`}},{match:[/::/,/class/],scope:{2:`variable.language`}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),S],scope:{1:`title.class`,3:`variable.constant`}},{match:[i,t.concat(`::`,t.lookahead(/(?!class\b)/))],scope:{1:`title.class`}},{match:[i,/::/,/class/],scope:{1:`title.class`,3:`variable.language`}}]},w={scope:`attr`,match:t.concat(r,t.lookahead(`:`),t.lookahead(/(?!::)/))},T={relevance:0,begin:/\(/,end:/\)/,keywords:y,contains:[w,o,C,e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,m,h,x]},E={relevance:0,match:[/\b/,t.concat(`(?!fn\\b|function\\b|`,b(_).join(`\\b|`),`|`,b(v).join(`\\b|`),`\\b)`),r,t.concat(p,`*`),t.lookahead(/(?=\()/)],scope:{3:`title.function.invoke`},contains:[T]};T.contains.push(E);let D=[w,C,e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,m,h,x],O={begin:t.concat(/#\[\s*\\?/,t.either(i,a)),beginScope:`meta`,end:/]/,endScope:`meta`,keywords:{literal:g,keyword:[`new`,`array`]},contains:[{begin:/\[/,end:/]/,keywords:{literal:g,keyword:[`new`,`array`]},contains:[`self`,...D]},...D,{scope:`meta`,variants:[{match:i},{match:a}]}]};return{case_insensitive:!1,keywords:y,contains:[O,e.HASH_COMMENT_MODE,e.COMMENT(`//`,`$`),e.COMMENT(`/\\*`,`\\*/`,{contains:[{scope:`doctag`,match:`@[A-Za-z]+`}]}),{match:/__halt_compiler\(\);/,keywords:`__halt_compiler`,starts:{scope:`comment`,end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:`meta`,endsParent:!0}]}},s,{scope:`variable.language`,match:/\$this\b/},o,E,C,{match:[/const/,/\s/,r],scope:{1:`keyword`,3:`variable.constant`}},x,{scope:`function`,relevance:0,beginKeywords:`fn function`,end:/[;{]/,excludeEnd:!0,illegal:`[$%\\[]`,contains:[{beginKeywords:`use`},e.UNDERSCORE_TITLE_MODE,{begin:`=>`,endsParent:!0},{scope:`params`,begin:`\\(`,end:`\\)`,excludeBegin:!0,excludeEnd:!0,keywords:y,contains:[`self`,O,o,C,e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,m,h]}]},{scope:`class`,variants:[{beginKeywords:`enum`,illegal:/[($"]/},{beginKeywords:`class interface trait`,illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:`extends implements`},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:`namespace`,relevance:0,end:`;`,illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:`title.class`})]},{beginKeywords:`use`,relevance:0,end:`;`,contains:[{match:/\b(as|const|function)\b/,scope:`keyword`},e.UNDERSCORE_TITLE_MODE]},m,h]}}function rS(e){return{name:`PHP template`,subLanguage:`xml`,contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:`php`,contains:[{begin:`/\\*`,end:`\\*/`,skip:!0},{begin:`b"`,end:`"`,skip:!0},{begin:`b'`,end:`'`,skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function iS(e){return{name:`Plain text`,aliases:[`text`,`txt`],disableAutodetect:!0}}function aS(e){let t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=`and.as.assert.async.await.break.case.class.continue.def.del.elif.else.except.finally.for.from.global.if.import.in.is.lambda.match.nonlocal|10.not.or.pass.raise.return.try.while.with.yield`.split(`.`),i={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:`__import__.abs.all.any.ascii.bin.bool.breakpoint.bytearray.bytes.callable.chr.classmethod.compile.complex.delattr.dict.dir.divmod.enumerate.eval.exec.filter.float.format.frozenset.getattr.globals.hasattr.hash.help.hex.id.input.int.isinstance.issubclass.iter.len.list.locals.map.max.memoryview.min.next.object.oct.open.ord.pow.print.property.range.repr.reversed.round.set.setattr.slice.sorted.staticmethod.str.sum.super.tuple.type.vars.zip`.split(`.`),literal:[`__debug__`,`Ellipsis`,`False`,`None`,`NotImplemented`,`True`],type:[`Any`,`Callable`,`Coroutine`,`Dict`,`List`,`Literal`,`Generic`,`Optional`,`Sequence`,`Set`,`Tuple`,`Type`,`Union`]},a={className:`meta`,begin:/^(>>>|\.\.\.) /},o={className:`subst`,begin:/\{/,end:/\}/,keywords:i,illegal:/#/},s={begin:/\{\{/,relevance:0},c={className:`string`,contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a,s,o]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a,s,o]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,s,o]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,o]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},l=`[0-9](_?[0-9])*`,u=`(\\b(${l}))?\\.(${l})|\\b(${l})\\.`,d=`\\b|${r.join(`|`)}`,f={className:`number`,relevance:0,variants:[{begin:`(\\b(${l})|(${u}))[eE][+-]?(${l})[jJ]?(?=${d})`},{begin:`(${u})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${d})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${d})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${d})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${d})`},{begin:`\\b(${l})[jJ](?=${d})`}]},p={className:`comment`,begin:t.lookahead(/# type:/),end:/$/,keywords:i,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},m={className:`params`,variants:[{className:``,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:[`self`,a,f,c,e.HASH_COMMENT_MODE]}]};return o.contains=[c,f,a],{name:`Python`,aliases:[`py`,`gyp`,`ipython`],unicodeRegex:!0,keywords:i,illegal:/(<\/|\?)|=>/,contains:[a,f,{scope:`variable.language`,match:/\bself\b/},{beginKeywords:`if`,relevance:0},{match:/\bor\b/,scope:`keyword`},c,p,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:`keyword`,3:`title.function`},contains:[m]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:`keyword`,3:`title.class`,6:`title.class.inherited`}},{className:`meta`,begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[f,m,c]}]}}function oS(e){return{aliases:[`pycon`],contains:[{className:`meta.prompt`,starts:{end:/ |$/,starts:{end:`$`,subLanguage:`python`}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function sS(e){let t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,a=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:`R`,keywords:{$pattern:n,keyword:`function if in break next repeat else for while`,literal:`NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10`,built_in:`LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm`},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:`doctag`,match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:`doctag`,begin:`@param`,end:/$/,contains:[{scope:`variable`,variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:`doctag`,match:/@[a-zA-Z]+/},{scope:`keyword`,match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:`string`,contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:`"`,end:`"`,relevance:0},{begin:`'`,end:`'`,relevance:0}]},{relevance:0,variants:[{scope:{1:`operator`,2:`number`},match:[i,r]},{scope:{1:`operator`,2:`number`},match:[/%[^%]*%/,r]},{scope:{1:`punctuation`,2:`number`},match:[a,r]},{scope:{2:`number`},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:`operator`},match:[n,/\s+/,/<-/,/\s+/]},{scope:`operator`,relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:`punctuation`,relevance:0,match:a},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function cS(e){let t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=t.concat(r,/(::\w+)*/),a={"variable.constant":[`__FILE__`,`__LINE__`,`__ENCODING__`],"variable.language":[`self`,`super`],keyword:`alias.and.begin.BEGIN.break.case.class.defined.do.else.elsif.end.END.ensure.for.if.in.module.next.not.or.redo.require.rescue.retry.return.then.undef.unless.until.when.while.yield.include.extend.prepend.public.private.protected.raise.throw`.split(`.`),built_in:[`proc`,`lambda`,`attr_accessor`,`attr_reader`,`attr_writer`,`define_method`,`private_constant`,`module_function`],literal:[`true`,`false`,`nil`]},o={className:`doctag`,begin:`@[A-Za-z]+`},s={begin:`#<`,end:`>`},c=[e.COMMENT(`#`,`$`,{contains:[o]}),e.COMMENT(`^=begin`,`^=end`,{contains:[o],relevance:10}),e.COMMENT(`^__END__`,e.MATCH_NOTHING_RE)],l={className:`subst`,begin:/#\{/,end:/\}/,keywords:a},u={className:`string`,contains:[e.BACKSLASH_ESCAPE,l],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,l]})]}]},d=`[0-9](_?[0-9])*`,f={className:`number`,relevance:0,variants:[{begin:`\\b([1-9](_?[0-9])*|0)(\\.(${d}))?([eE][+-]?(${d})|r)?i?\\b`},{begin:`\\b0[dD][0-9](_?[0-9])*r?i?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*r?i?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*r?i?\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b`},{begin:`\\b0(_?[0-7])+r?i?\\b`}]},p={variants:[{match:/\(\)/},{className:`params`,begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:a}]},m=[u,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:`title.class`,4:`title.class.inherited`},keywords:a},{match:[/(include|extend)\s+/,i],scope:{2:`title.class`},keywords:a},{relevance:0,match:[i,/\.new[. (]/],scope:{1:`title.class`}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`},{relevance:0,match:r,scope:`title.class`},{match:[/def/,/\s+/,n],scope:{1:`keyword`,3:`title.function`},contains:[p]},{begin:e.IDENT_RE+`::`},{className:`symbol`,begin:e.UNDERSCORE_IDENT_RE+`(!|\\?)?:`,relevance:0},{className:`symbol`,begin:`:(?!\\s)`,contains:[u,{begin:n}],relevance:0},f,{className:`variable`,begin:`(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])`},{className:`params`,begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:a},{begin:`(`+e.RE_STARTERS_RE+`|unless)\\s*`,keywords:`unless`,contains:[{className:`regexp`,contains:[e.BACKSLASH_ESCAPE,l],illegal:/\n/,variants:[{begin:`/`,end:`/[a-z]*`},{begin:/%r\{/,end:/\}[a-z]*/},{begin:`%r\\(`,end:`\\)[a-z]*`},{begin:`%r!`,end:`![a-z]*`},{begin:`%r\\[`,end:`\\][a-z]*`}]}].concat(s,c),relevance:0}].concat(s,c);l.contains=m,p.contains=m;let h=[{begin:/^\s*=>/,starts:{end:`$`,contains:m}},{className:`meta.prompt`,begin:`^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])`,starts:{end:`$`,keywords:a,contains:m}}];return c.unshift(s),{name:`Ruby`,aliases:[`rb`,`gemspec`,`podspec`,`thor`,`irb`],keywords:a,illegal:/\/\*/,contains:[e.SHEBANG({binary:`ruby`})].concat(h,c,m)}}function lS(e){let t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),i=t.concat(n,e.IDENT_RE),a={className:`title.function.invoke`,relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,i,t.lookahead(/\s*\(/))},o=`([ui](8|16|32|64|128|size)|f(32|64))?`,s=`abstract.as.async.await.become.box.break.const.continue.crate.do.dyn.else.enum.extern.false.final.fn.for.if.impl.in.let.loop.macro.match.mod.move.mut.override.priv.pub.ref.return.self.Self.static.struct.super.trait.true.try.type.typeof.union.unsafe.unsized.use.virtual.where.while.yield`.split(`.`),c=[`true`,`false`,`Some`,`None`,`Ok`,`Err`],l=`drop .Copy.Send.Sized.Sync.Drop.Fn.FnMut.FnOnce.ToOwned.Clone.Debug.PartialEq.PartialOrd.Eq.Ord.AsRef.AsMut.Into.From.Default.Iterator.Extend.IntoIterator.DoubleEndedIterator.ExactSizeIterator.SliceConcatExt.ToString.assert!.assert_eq!.bitflags!.bytes!.cfg!.col!.concat!.concat_idents!.debug_assert!.debug_assert_eq!.env!.eprintln!.panic!.file!.format!.format_args!.include_bytes!.include_str!.line!.local_data_key!.module_path!.option_env!.print!.println!.select!.stringify!.try!.unimplemented!.unreachable!.vec!.write!.writeln!.macro_rules!.assert_ne!.debug_assert_ne!`.split(`.`),u=[`i8`,`i16`,`i32`,`i64`,`i128`,`isize`,`u8`,`u16`,`u32`,`u64`,`u128`,`usize`,`f32`,`f64`,`str`,`char`,`bool`,`Box`,`Option`,`Result`,`String`,`Vec`];return{name:`Rust`,aliases:[`rs`],keywords:{$pattern:e.IDENT_RE+`!?`,type:u,keyword:s,literal:c,built_in:l},illegal:`</`,contains:[e.C_LINE_COMMENT_MODE,e.COMMENT(`/\\*`,`\\*/`,{contains:[`self`]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:`symbol`,begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:`string`,variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:`char.escape`,match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:`number`,variants:[{begin:`\\b0b([01_]+)`+o},{begin:`\\b0o([0-7_]+)`+o},{begin:`\\b0x([A-Fa-f0-9_]+)`+o},{begin:`\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)`+o}],relevance:0},{begin:[/fn/,/\s+/,r],className:{1:`keyword`,3:`title.function`}},{className:`meta`,begin:`#!?\\[`,end:`\\]`,contains:[{className:`string`,begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],className:{1:`keyword`,3:`keyword`,4:`variable`}},{begin:[/for/,/\s+/,r,/\s+/,/in/],className:{1:`keyword`,3:`variable`,5:`keyword`}},{begin:[/type/,/\s+/,r],className:{1:`keyword`,3:`title.class`}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],className:{1:`keyword`,3:`title.class`}},{begin:e.IDENT_RE+`::`,keywords:{keyword:`Self`,built_in:l,type:u}},{className:`punctuation`,begin:`->`},a]}}var uS=e=>({IMPORTANT:{scope:`meta`,begin:`!important`},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:`number`,begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:`number`,begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,4}(-[0-9A-Fa-f][0-9A-Fa-f]{0,4})?/},FUNCTION_DISPATCH:{className:`built_in`,begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:`selector-attr`,begin:/\[/,end:/\]/,illegal:`$`,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:`number`,begin:e.NUMBER_RE+`(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?`,relevance:0},CSS_VARIABLE:{className:`attr`,begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),dS=`a.abbr.address.article.aside.audio.b.blockquote.body.button.canvas.caption.cite.code.dd.del.details.dfn.div.dl.dt.em.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.html.i.iframe.img.input.ins.kbd.label.legend.li.main.mark.menu.nav.object.ol.optgroup.option.p.picture.q.quote.samp.section.select.source.span.strong.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.ul.var.video`.split(`.`),fS=`defs.g.marker.mask.pattern.svg.switch.symbol.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feFlood.feGaussianBlur.feImage.feMerge.feMorphology.feOffset.feSpecularLighting.feTile.feTurbulence.linearGradient.radialGradient.stop.circle.ellipse.image.line.path.polygon.polyline.rect.text.use.textPath.tspan.foreignObject.clipPath`.split(`.`),pS=[...dS,...fS],mS=`any-hover.any-pointer.aspect-ratio.color.color-gamut.color-index.device-aspect-ratio.device-height.device-width.display-mode.forced-colors.grid.height.hover.inverted-colors.monochrome.orientation.overflow-block.overflow-inline.pointer.prefers-color-scheme.prefers-contrast.prefers-reduced-motion.prefers-reduced-transparency.resolution.scan.scripting.update.width.min-width.max-width.min-height.max-height`.split(`.`).sort().reverse(),hS=`active.any-link.blank.checked.current.default.defined.dir.disabled.drop.empty.enabled.first.first-child.first-of-type.fullscreen.future.focus.focus-visible.focus-within.has.host.host-context.hover.indeterminate.in-range.invalid.is.lang.last-child.last-of-type.left.link.local-link.not.nth-child.nth-col.nth-last-child.nth-last-col.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.past.placeholder-shown.read-only.read-write.required.right.root.scope.target.target-within.user-invalid.valid.visited.where`.split(`.`).sort().reverse(),gS=[`after`,`backdrop`,`before`,`cue`,`cue-region`,`first-letter`,`first-line`,`grammar-error`,`marker`,`part`,`placeholder`,`selection`,`slotted`,`spelling-error`].sort().reverse(),_S=`accent-color.align-content.align-items.align-self.alignment-baseline.all.anchor-name.animation.animation-composition.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-range.animation-range-end.animation-range-start.animation-timeline.animation-timing-function.appearance.aspect-ratio.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.block-size.border.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-end-end-radius.border-end-start-radius.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-start-end-radius.border-start-start-radius.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-align.box-decoration-break.box-direction.box-flex.box-flex-group.box-lines.box-ordinal-group.box-orient.box-pack.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.color-scheme.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.contain-intrinsic-block-size.contain-intrinsic-height.contain-intrinsic-inline-size.contain-intrinsic-size.contain-intrinsic-width.container.container-name.container-type.content.content-visibility.counter-increment.counter-reset.counter-set.cue.cue-after.cue-before.cursor.cx.cy.direction.display.dominant-baseline.empty-cells.enable-background.field-sizing.fill.fill-opacity.fill-rule.filter.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.flood-color.flood-opacity.flow.font.font-display.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-palette.font-size.font-size-adjust.font-smooth.font-smoothing.font-stretch.font-style.font-synthesis.font-synthesis-position.font-synthesis-small-caps.font-synthesis-style.font-synthesis-weight.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-emoji.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.forced-color-adjust.gap.glyph-orientation-horizontal.glyph-orientation-vertical.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphenate-character.hyphenate-limit-chars.hyphens.icon.image-orientation.image-rendering.image-resolution.ime-mode.initial-letter.initial-letter-align.inline-size.inset.inset-area.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.kerning.left.letter-spacing.lighting-color.line-break.line-height.line-height-step.list-style.list-style-image.list-style-position.list-style-type.margin.margin-block.margin-block-end.margin-block-start.margin-bottom.margin-inline.margin-inline-end.margin-inline-start.margin-left.margin-right.margin-top.margin-trim.marker.marker-end.marker-mid.marker-start.marks.mask.mask-border.mask-border-mode.mask-border-outset.mask-border-repeat.mask-border-slice.mask-border-source.mask-border-width.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.masonry-auto-flow.math-depth.math-shift.math-style.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.nav-down.nav-index.nav-left.nav-right.nav-up.none.normal.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-anchor.overflow-block.overflow-clip-margin.overflow-inline.overflow-wrap.overflow-x.overflow-y.overlay.overscroll-behavior.overscroll-behavior-block.overscroll-behavior-inline.overscroll-behavior-x.overscroll-behavior-y.padding.padding-block.padding-block-end.padding-block-start.padding-bottom.padding-inline.padding-inline-end.padding-inline-start.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.paint-order.pause.pause-after.pause-before.perspective.perspective-origin.place-content.place-items.place-self.pointer-events.position.position-anchor.position-visibility.print-color-adjust.quotes.r.resize.rest.rest-after.rest-before.right.rotate.row-gap.ruby-align.ruby-position.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-stop.scroll-snap-type.scroll-timeline.scroll-timeline-axis.scroll-timeline-name.scrollbar-color.scrollbar-gutter.scrollbar-width.shape-image-threshold.shape-margin.shape-outside.shape-rendering.speak.speak-as.src.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.table-layout.text-align.text-align-all.text-align-last.text-anchor.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-decoration-thickness.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-indent.text-justify.text-orientation.text-overflow.text-rendering.text-shadow.text-size-adjust.text-transform.text-underline-offset.text-underline-position.text-wrap.text-wrap-mode.text-wrap-style.timeline-scope.top.touch-action.transform.transform-box.transform-origin.transform-style.transition.transition-behavior.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.unicode-range.user-modify.user-select.vector-effect.vertical-align.view-timeline.view-timeline-axis.view-timeline-inset.view-timeline-name.view-transition-name.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.white-space.white-space-collapse.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.x.y.z-index.zoom`.split(`.`).sort().reverse();function vS(e){let t=uS(e),n=gS,r=hS,i=`@[a-z-]+`,a={className:`variable`,begin:`(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b`,relevance:0};return{name:`SCSS`,case_insensitive:!0,illegal:`[=/|']`,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:`selector-id`,begin:`#[A-Za-z0-9_-]+`,relevance:0},{className:`selector-class`,begin:`\\.[A-Za-z0-9_-]+`,relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:`selector-tag`,begin:`\\b(`+pS.join(`|`)+`)\\b`,relevance:0},{className:`selector-pseudo`,begin:`:(`+r.join(`|`)+`)`},{className:`selector-pseudo`,begin:`:(:)?(`+n.join(`|`)+`)`},a,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:`attribute`,begin:`\\b(`+_S.join(`|`)+`)\\b`},{begin:`\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b`},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,a,t.HEXCOLOR,t.CSS_NUMBER_MODE,t.UNICODE_RANGE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:`@(page|font-face)`,keywords:{$pattern:i,keyword:`@page @font-face`}},{begin:`@`,end:`[{;]`,returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:`and or not only`,attribute:mS.join(` `)},contains:[{begin:i,className:`keyword`},{begin:/[a-z-]+(?=:)/,className:`attribute`},a,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function yS(e){return{name:`Shell Session`,aliases:[`console`,`shellsession`],contains:[{className:`meta.prompt`,begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:`bash`}}]}}function bS(e){let t=e.regex,n=e.COMMENT(`--`,`$`),r={scope:`string`,variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},a=[`true`,`false`,`unknown`],o=[`double precision`,`large object`,`with timezone`,`without timezone`],s=`bigint.binary.blob.boolean.char.character.clob.date.dec.decfloat.decimal.float.int.integer.interval.nchar.nclob.national.numeric.real.row.smallint.time.timestamp.varchar.varying.varbinary`.split(`.`),c=[`add`,`asc`,`collation`,`desc`,`final`,`first`,`last`,`view`],l=`abs.acos.all.allocate.alter.and.any.are.array.array_agg.array_max_cardinality.as.asensitive.asin.asymmetric.at.atan.atomic.authorization.avg.begin.begin_frame.begin_partition.between.bigint.binary.blob.boolean.both.by.call.called.cardinality.cascaded.case.cast.ceil.ceiling.char.char_length.character.character_length.check.classifier.clob.close.coalesce.collate.collect.column.commit.condition.connect.constraint.contains.convert.copy.corr.corresponding.cos.cosh.count.covar_pop.covar_samp.create.cross.cube.cume_dist.current.current_catalog.current_date.current_default_transform_group.current_path.current_role.current_row.current_schema.current_time.current_timestamp.current_path.current_role.current_transform_group_for_type.current_user.cursor.cycle.date.day.deallocate.dec.decimal.decfloat.declare.default.define.delete.dense_rank.deref.describe.deterministic.disconnect.distinct.double.drop.dynamic.each.element.else.empty.end.end_frame.end_partition.end-exec.equals.escape.every.except.exec.execute.exists.exp.external.extract.false.fetch.filter.first_value.float.floor.for.foreign.frame_row.free.from.full.function.fusion.get.global.grant.group.grouping.groups.having.hold.hour.identity.in.indicator.initial.inner.inout.insensitive.insert.int.integer.intersect.intersection.interval.into.is.join.json_array.json_arrayagg.json_exists.json_object.json_objectagg.json_query.json_table.json_table_primitive.json_value.lag.language.large.last_value.lateral.lead.leading.left.like.like_regex.listagg.ln.local.localtime.localtimestamp.log.log10.lower.match.match_number.match_recognize.matches.max.member.merge.method.min.minute.mod.modifies.module.month.multiset.national.natural.nchar.nclob.new.no.none.normalize.not.nth_value.ntile.null.nullif.numeric.octet_length.occurrences_regex.of.offset.old.omit.on.one.only.open.or.order.out.outer.over.overlaps.overlay.parameter.partition.pattern.per.percent.percent_rank.percentile_cont.percentile_disc.period.portion.position.position_regex.power.precedes.precision.prepare.primary.procedure.ptf.range.rank.reads.real.recursive.ref.references.referencing.regr_avgx.regr_avgy.regr_count.regr_intercept.regr_r2.regr_slope.regr_sxx.regr_sxy.regr_syy.release.result.return.returns.revoke.right.rollback.rollup.row.row_number.rows.running.savepoint.scope.scroll.search.second.seek.select.sensitive.session_user.set.show.similar.sin.sinh.skip.smallint.some.specific.specifictype.sql.sqlexception.sqlstate.sqlwarning.sqrt.start.static.stddev_pop.stddev_samp.submultiset.subset.substring.substring_regex.succeeds.sum.symmetric.system.system_time.system_user.table.tablesample.tan.tanh.then.time.timestamp.timezone_hour.timezone_minute.to.trailing.translate.translate_regex.translation.treat.trigger.trim.trim_array.true.truncate.uescape.union.unique.unknown.unnest.update.upper.user.using.value.values.value_of.var_pop.var_samp.varbinary.varchar.varying.versioning.when.whenever.where.width_bucket.window.with.within.without.year`.split(`.`),u=`abs.acos.array_agg.asin.atan.avg.cast.ceil.ceiling.coalesce.corr.cos.cosh.count.covar_pop.covar_samp.cume_dist.dense_rank.deref.element.exp.extract.first_value.floor.json_array.json_arrayagg.json_exists.json_object.json_objectagg.json_query.json_table.json_table_primitive.json_value.lag.last_value.lead.listagg.ln.log.log10.lower.max.min.mod.nth_value.ntile.nullif.percent_rank.percentile_cont.percentile_disc.position.position_regex.power.rank.regr_avgx.regr_avgy.regr_count.regr_intercept.regr_r2.regr_slope.regr_sxx.regr_sxy.regr_syy.row_number.sin.sinh.sqrt.stddev_pop.stddev_samp.substring.substring_regex.sum.tan.tanh.translate.translate_regex.treat.trim.trim_array.unnest.upper.value_of.var_pop.var_samp.width_bucket`.split(`.`),d=[`current_catalog`,`current_date`,`current_default_transform_group`,`current_path`,`current_role`,`current_schema`,`current_transform_group_for_type`,`current_user`,`session_user`,`system_time`,`system_user`,`current_time`,`localtime`,`current_timestamp`,`localtimestamp`],f=[`create table`,`insert into`,`primary key`,`foreign key`,`not null`,`alter table`,`add constraint`,`grouping sets`,`on overflow`,`character set`,`respect nulls`,`ignore nulls`,`nulls first`,`nulls last`,`depth first`,`breadth first`],p=u,m=[...l,...c].filter(e=>!u.includes(e)),h={scope:`variable`,match:/@[a-z0-9][a-z0-9_]*/},g={scope:`operator`,match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},_={match:t.concat(/\b/,t.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function v(e){return t.concat(/\b/,t.either(...e.map(e=>e.replace(/\s+/,`\\s+`))),/\b/)}let y={scope:`keyword`,match:v(f),relevance:0};function b(e,{exceptions:t,when:n}={}){let r=n;return t||=[],e.map(e=>e.match(/\|\d+$/)||t.includes(e)?e:r(e)?`${e}|0`:e)}return{name:`SQL`,case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:b(m,{when:e=>e.length<3}),literal:a,type:s,built_in:d},contains:[{scope:`type`,match:v(o)},y,_,h,r,i,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,g]}}function xS(e){return e?typeof e==`string`?e:e.source:null}function SS(e){return CS(`(?=`,e,`)`)}function CS(...e){return e.map(e=>xS(e)).join(``)}function wS(e){let t=e[e.length-1];return typeof t==`object`&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function TS(...e){return`(`+(wS(e).capture?``:`?:`)+e.map(e=>xS(e)).join(`|`)+`)`}var ES=e=>CS(/\b/,e,/\w$/.test(e)?/\b/:/\B/),DS=[`Protocol`,`Type`].map(ES),OS=[`init`,`self`].map(ES),kS=[`Any`,`Self`],AS=[`actor`,`any`,`associatedtype`,`async`,`await`,/as\?/,/as!/,`as`,`borrowing`,`break`,`case`,`catch`,`class`,`consume`,`consuming`,`continue`,`convenience`,`copy`,`default`,`defer`,`deinit`,`didSet`,`distributed`,`do`,`dynamic`,`each`,`else`,`enum`,`extension`,`fallthrough`,/fileprivate\(set\)/,`fileprivate`,`final`,`for`,`func`,`get`,`guard`,`if`,`import`,`indirect`,`infix`,/init\?/,/init!/,`inout`,/internal\(set\)/,`internal`,`in`,`is`,`isolated`,`nonisolated`,`lazy`,`let`,`macro`,`mutating`,`nonmutating`,/open\(set\)/,`open`,`operator`,`optional`,`override`,`package`,`postfix`,`precedencegroup`,`prefix`,/private\(set\)/,`private`,`protocol`,/public\(set\)/,`public`,`repeat`,`required`,`rethrows`,`return`,`set`,`some`,`static`,`struct`,`subscript`,`super`,`switch`,`throws`,`throw`,/try\?/,/try!/,`try`,`typealias`,/unowned\(safe\)/,/unowned\(unsafe\)/,`unowned`,`var`,`weak`,`where`,`while`,`willSet`],jS=[`false`,`nil`,`true`],MS=[`assignment`,`associativity`,`higherThan`,`left`,`lowerThan`,`none`,`right`],NS=[`#colorLiteral`,`#column`,`#dsohandle`,`#else`,`#elseif`,`#endif`,`#error`,`#file`,`#fileID`,`#fileLiteral`,`#filePath`,`#function`,`#if`,`#imageLiteral`,`#keyPath`,`#line`,`#selector`,`#sourceLocation`,`#warning`],PS=`abs.all.any.assert.assertionFailure.debugPrint.dump.fatalError.getVaList.isKnownUniquelyReferenced.max.min.numericCast.pointwiseMax.pointwiseMin.precondition.preconditionFailure.print.readLine.repeatElement.sequence.stride.swap.swift_unboxFromSwiftValueWithType.transcode.type.unsafeBitCast.unsafeDowncast.withExtendedLifetime.withUnsafeMutablePointer.withUnsafePointer.withVaList.withoutActuallyEscaping.zip`.split(`.`),FS=TS(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),IS=TS(FS,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),LS=CS(FS,IS,`*`),RS=TS(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),zS=TS(RS,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),BS=CS(RS,zS,`*`),VS=CS(/[A-Z]/,zS,`*`),HS=[`attached`,`autoclosure`,CS(/convention\(/,TS(`swift`,`block`,`c`),/\)/),`discardableResult`,`dynamicCallable`,`dynamicMemberLookup`,`escaping`,`freestanding`,`frozen`,`GKInspectable`,`IBAction`,`IBDesignable`,`IBInspectable`,`IBOutlet`,`IBSegueAction`,`inlinable`,`main`,`nonobjc`,`NSApplicationMain`,`NSCopying`,`NSManaged`,CS(/objc\(/,BS,/\)/),`objc`,`objcMembers`,`propertyWrapper`,`requires_stored_property_inits`,`resultBuilder`,`Sendable`,`testable`,`UIApplicationMain`,`unchecked`,`unknown`,`usableFromInline`,`warn_unqualified_access`],US=[`iOS`,`iOSApplicationExtension`,`macOS`,`macOSApplicationExtension`,`macCatalyst`,`macCatalystApplicationExtension`,`watchOS`,`watchOSApplicationExtension`,`tvOS`,`tvOSApplicationExtension`,`swift`];function WS(e){let t={match:/\s+/,relevance:0},n=e.COMMENT(`/\\*`,`\\*/`,{contains:[`self`]}),r=[e.C_LINE_COMMENT_MODE,n],i={match:[/\./,TS(...DS,...OS)],className:{2:`keyword`}},a={match:CS(/\./,TS(...AS)),relevance:0},o=AS.filter(e=>typeof e==`string`).concat([`_|0`]),s={variants:[{className:`keyword`,match:TS(...AS.filter(e=>typeof e!=`string`).concat(kS).map(ES),...OS)}]},c={$pattern:TS(/\b\w+/,/#\w+/),keyword:o.concat(NS),literal:jS},l=[i,a,s],u=[{match:CS(/\./,TS(...PS)),relevance:0},{className:`built_in`,match:CS(/\b/,TS(...PS),/(?=\()/)}],d={match:/->/,relevance:0},f=[d,{className:`operator`,relevance:0,variants:[{match:LS},{match:`\\.(\\.|${IS})+`}]}],p=`([0-9]_*)+`,m=`([0-9a-fA-F]_*)+`,h={className:`number`,relevance:0,variants:[{match:`\\b(${p})(\\.(${p}))?([eE][+-]?(${p}))?\\b`},{match:`\\b0x(${m})(\\.(${m}))?([pP][+-]?(${p}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},g=(e=``)=>({className:`subst`,variants:[{match:CS(/\\/,e,/[0\\tnr"']/)},{match:CS(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),_=(e=``)=>({className:`subst`,match:CS(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),v=(e=``)=>({className:`subst`,label:`interpol`,begin:CS(/\\/,e,/\(/),end:/\)/}),y=(e=``)=>({begin:CS(e,/"""/),end:CS(/"""/,e),contains:[g(e),_(e),v(e)]}),b=(e=``)=>({begin:CS(e,/"/),end:CS(/"/,e),contains:[g(e),v(e)]}),x={className:`string`,variants:[y(),y(`#`),y(`##`),y(`###`),b(),b(`#`),b(`##`),b(`###`)]},S=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],C={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:S},w=e=>{let t=CS(e,/\//),n=CS(/\//,e);return{begin:t,end:n,contains:[...S,{scope:`comment`,begin:`#(?!.*${n})`,end:/$/}]}},T={scope:`regexp`,variants:[w(`###`),w(`##`),w(`#`),C]},E={match:CS(/`/,BS,/`/)},D=[E,{className:`variable`,match:/\$\d+/},{className:`variable`,match:`\\$${zS}+`}],O=[{match:/(@|#(un)?)available/,scope:`keyword`,starts:{contains:[{begin:/\(/,end:/\)/,keywords:US,contains:[...f,h,x]}]}},{scope:`keyword`,match:CS(/@/,TS(...HS),SS(TS(/\(/,/\s+/)))},{scope:`meta`,match:CS(/@/,BS)}],k={match:SS(/\b[A-Z]/),relevance:0,contains:[{className:`type`,match:CS(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,zS,`+`)},{className:`type`,match:VS,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:CS(/\s+&\s+/,SS(VS)),relevance:0}]},A={begin:/</,end:/>/,keywords:c,contains:[...r,...l,...O,d,k]};k.contains.push(A);let j={begin:/\(/,end:/\)/,relevance:0,keywords:c,contains:[`self`,{match:CS(BS,/\s*:/),keywords:`_|0`,relevance:0},...r,T,...l,...u,...f,h,x,...D,...O,k]},M={begin:/</,end:/>/,keywords:`repeat each`,contains:[...r,k]},N={begin:/\(/,end:/\)/,keywords:c,contains:[{begin:TS(SS(CS(BS,/\s*:/)),SS(CS(BS,/\s+/,BS,/\s*:/))),end:/:/,relevance:0,contains:[{className:`keyword`,match:/\b_\b/},{className:`params`,match:BS}]},...r,...l,...f,h,x,...O,k,j],endsParent:!0,illegal:/["']/},P={match:[/(func|macro)/,/\s+/,TS(E.match,BS,LS)],className:{1:`keyword`,3:`title.function`},contains:[M,N,t],illegal:[/\[/,/%/]},F={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:`keyword`},contains:[M,N,t],illegal:/\[|%/},ee={match:[/operator/,/\s+/,LS],className:{1:`keyword`,3:`title`}},I={begin:[/precedencegroup/,/\s+/,VS],className:{1:`keyword`,3:`title`},contains:[k],keywords:[...MS,...jS],end:/}/},te={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:`keyword`,3:`keyword`,5:`title.function`}},ne={match:[/class\b/,/\s+/,/var\b/],scope:{1:`keyword`,3:`keyword`}},re={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,BS,/\s*/],beginScope:{1:`keyword`,3:`title.class`},keywords:c,contains:[M,...l,{begin:/:/,end:/\{/,keywords:c,contains:[{scope:`title.class.inherited`,match:VS},...l],relevance:0}]};for(let e of x.variants){let t=e.contains.find(e=>e.label===`interpol`);t.keywords=c;let n=[...l,...u,...f,h,x,...D];t.contains=[...n,{begin:/\(/,end:/\)/,contains:[`self`,...n]}]}return{name:`Swift`,keywords:c,contains:[...r,P,F,te,ne,re,ee,I,{beginKeywords:`import`,end:/$/,contains:[...r],relevance:0},T,...l,...u,...f,h,x,...D,...O,k,j]}}var GS=`[A-Za-z$_][0-9A-Za-z$_]*`,KS=`as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using`.split(`.`),qS=[`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`],JS=`Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly`.split(`.`),YS=[`Error`,`EvalError`,`InternalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],XS=[`setInterval`,`setTimeout`,`clearInterval`,`clearTimeout`,`require`,`exports`,`eval`,`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,`escape`,`unescape`],ZS=[`arguments`,`this`,`super`,`console`,`window`,`document`,`localStorage`,`sessionStorage`,`module`,`global`],QS=[].concat(XS,JS,YS);function $S(e){let t=e.regex,n=(e,{after:t})=>{let n=`</`+e[0].slice(1);return e.input.indexOf(n,t)!==-1},r=GS,i={begin:`<>`,end:`</>`},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{let r=e[0].length+e.index,i=e.input[r];if(i===`<`||i===`,`){t.ignoreMatch();return}i===`>`&&(n(e,{after:r})||t.ignoreMatch());let a,o=e.input.substring(r);((a=o.match(/^\s*=/))||(a=o.match(/^\s+extends\s+/))&&a.index===0)&&t.ignoreMatch()}},s={$pattern:GS,keyword:KS,literal:qS,built_in:QS,"variable.language":ZS},c=`[0-9](_?[0-9])*`,l=`\\.(${c})`,u=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,d={className:`number`,variants:[{begin:`(\\b(${u})((${l})|\\.)?|(${l}))[eE][+-]?(${c})\\b`},{begin:`\\b(${u})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*n?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*n?\\b`},{begin:`\\b0[0-7]+n?\\b`}],relevance:0},f={className:`subst`,begin:`\\$\\{`,end:`\\}`,keywords:s,contains:[]},p={begin:".?html`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`xml`}},m={begin:".?css`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`css`}},h={begin:".?gql`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`graphql`}},g={className:`string`,begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},_={className:`comment`,variants:[e.COMMENT(/\/\*\*(?!\/)/,`\\*/`,{relevance:0,contains:[{begin:`(?=@[A-Za-z]+)`,relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`},{className:`type`,begin:`\\{`,end:`\\}`,excludeEnd:!0,excludeBegin:!0,relevance:0},{className:`variable`,begin:r+`(?=\\s*(-)|$)`,endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:s,contains:[`self`].concat(v)});let y=[].concat(_,f.contains),b=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:[`self`].concat(y)}]),x={className:`params`,begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},S={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,`(`,t.concat(/\./,r),`)*`)],scope:{1:`keyword`,3:`title.class`,5:`keyword`,7:`title.class.inherited`}},{match:[/class/,/\s+/,r],scope:{1:`keyword`,3:`title.class`}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:`title.class`,keywords:{_:[...JS,...YS]}},w={label:`use_strict`,className:`meta`,relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:`keyword`,3:`title.function`},label:`func.def`,contains:[x],illegal:/%/},E={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`};function D(e){return t.concat(`(?!`,e.join(`|`),`)`)}let O={match:t.concat(/\b/,D([...XS,`super`,`import`,`await`].map(e=>`${e}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:`title.function`,relevance:0},k={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:`prototype`,className:`property`,relevance:0},A={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:`keyword`,3:`title.function`},contains:[{begin:/\(\)/},x]},j=`(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|`+e.UNDERSCORE_IDENT_RE+`)\\s*=>`,M={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(j)],keywords:`async`,className:{1:`keyword`,3:`title.function`},contains:[x]};return{name:`JavaScript`,aliases:[`js`,`jsx`,`mjs`,`cjs`],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:C},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:`shebang`,binary:`node`,relevance:5}),w,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,_,{match:/\$\d+/},d,C,{scope:`attr`,match:r+t.lookahead(`:`),relevance:0},M,{begin:`(`+e.RE_STARTERS_RE+`|\\b(case|return|throw)\\b)\\s*`,keywords:`return throw case`,relevance:0,contains:[_,e.REGEXP_MODE,{className:`function`,begin:j,returnBegin:!0,end:`\\s*=>`,contains:[{className:`params`,variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:`xml`,contains:[{begin:o.begin,end:o.end,skip:!0,contains:[`self`]}]}]},T,{beginKeywords:`while if switch catch for`},{begin:`\\b(?!function)`+e.UNDERSCORE_IDENT_RE+`\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{`,returnBegin:!0,label:`func.def`,contains:[x,e.inherit(e.TITLE_MODE,{begin:r,className:`title.function`})]},{match:/\.\.\./,relevance:0},k,{match:`\\$`+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:`title.function`},contains:[x]},O,E,S,A,{match:/\$[(.]/}]}}function eC(e){let t=e.regex,n=$S(e),r=GS,i=[`any`,`void`,`number`,`boolean`,`string`,`object`,`never`,`symbol`,`bigint`,`unknown`],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:`keyword`,3:`title.class`}},o={beginKeywords:`interface`,end:/\{/,excludeEnd:!0,keywords:{keyword:`interface extends`,built_in:i},contains:[n.exports.CLASS_REFERENCE]},s={className:`meta`,relevance:10,begin:/^\s*['"]use strict['"]/},c={$pattern:GS,keyword:KS.concat([`type`,`interface`,`public`,`private`,`protected`,`implements`,`declare`,`abstract`,`readonly`,`enum`,`override`,`satisfies`]),literal:qS,built_in:QS.concat(i),"variable.language":ZS},l={className:`meta`,begin:`@`+r},u=(e,t,n)=>{let r=e.contains.findIndex(e=>e.label===t);if(r===-1)throw Error(`can not find mode to replace`);e.contains.splice(r,1,n)};Object.assign(n.keywords,c),n.exports.PARAMS_CONTAINS.push(l);let d=n.contains.find(e=>e.scope===`attr`),f=Object.assign({},d,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,d,f]),n.contains=n.contains.concat([l,a,o,f]),u(n,`shebang`,e.SHEBANG()),u(n,`use_strict`,s);let p=n.contains.find(e=>e.label===`func.def`);return p.relevance=0,Object.assign(n,{name:`TypeScript`,aliases:[`ts`,`tsx`,`mts`,`cts`]}),n}function tC(e){let t=e.regex,n={className:`string`,begin:/"(""|[^/n])"C\b/},r={className:`string`,begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,a=/\d{4}-\d{1,2}-\d{1,2}/,o=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,s=/\d{1,2}(:\d{1,2}){1,2}/,c={className:`literal`,variants:[{begin:t.concat(/# */,t.either(a,i),/ *#/)},{begin:t.concat(/# */,s,/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,t.either(a,i),/ +/,t.either(o,s),/ *#/)}]},l={className:`number`,relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},u={className:`label`,begin:/^\w+:/},d=e.COMMENT(/'''/,/$/,{contains:[{className:`doctag`,begin:/<\/?/,end:/>/}]}),f=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:`Visual Basic .NET`,aliases:[`vb`],case_insensitive:!0,classNameAliases:{label:`symbol`},keywords:{keyword:`addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield`,built_in:`addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort`,type:`boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort`,literal:`true false nothing`},illegal:`//|\\{|\\}|endif|gosub|variant|wend|^\\$ `,contains:[n,r,c,l,u,d,f,{className:`meta`,begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:`const disable else elseif enable end externalsource if region then`},contains:[f]}]}}function nC(e){e.regex;let t=e.COMMENT(/\(;/,/;\)/);return t.contains.push(`self`),{name:`WebAssembly`,keywords:{$pattern:/[\w.]+/,keyword:`anyfunc,block,br,br_if,br_table,call,call_indirect,data,drop,elem,else,end,export,func,global.get,global.set,local.get,local.set,local.tee,get_global,get_local,global,if,import,local,loop,memory,memory.grow,memory.size,module,mut,nop,offset,param,result,return,select,set_global,set_local,start,table,tee_local,then,type,unreachable`.split(`,`)},contains:[e.COMMENT(/;;/,/$/),t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:`keyword`,3:`operator`}},{className:`variable`,begin:/\$[\w_]+/},{match:/(\((?!;)|\))+/,className:`punctuation`,relevance:0},{begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:`keyword`,3:`title.function`}},e.QUOTE_STRING_MODE,{match:/(i32|i64|f32|f64)(?!\.)/,className:`type`},{className:`keyword`,match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/},{className:`number`,relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/}]}}function rC(e){let t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:`symbol`,begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:`keyword`,begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(a,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{className:`string`}),c=e.inherit(e.QUOTE_STRING_MODE,{className:`string`}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:`attr`,begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:`string`,endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:`HTML, XML`,aliases:[`html`,`xhtml`,`rss`,`atom`,`xjb`,`xsd`,`xsl`,`plist`,`wsf`,`svg`],case_insensitive:!0,unicodeRegex:!0,contains:[{className:`meta`,begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,c,s,o,{begin:/\[/,end:/\]/,contains:[{className:`meta`,begin:/<![a-z]/,end:/>/,contains:[a,o,c,s]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:`meta`,end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[c]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:`tag`,begin:/<style(?=\s|>)/,end:/>/,keywords:{name:`style`},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:[`css`,`xml`]}},{className:`tag`,begin:/<script(?=\s|>)/,end:/>/,keywords:{name:`script`},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:[`javascript`,`handlebars`,`xml`]}},{className:`tag`,begin:/<>|<\/>/},{className:`tag`,begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:`name`,begin:n,relevance:0,starts:l}]},{className:`tag`,begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:`name`,begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function iC(e){let t=`true false yes no null`,n=`[\\w#;/?:@&=+$,.~*'()[\\]]+`,r={className:`attr`,variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:`template-variable`,variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:`string`,relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:`char.escape`,relevance:0}]},o={className:`string`,relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,i]},s=e.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),c={className:`number`,begin:`\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b`},l={end:`,`,endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},u={begin:/\{/,end:/\}/,contains:[l],illegal:`\\n`,relevance:0},d={begin:`\\[`,end:`\\]`,contains:[l],illegal:`\\n`,relevance:0},f=[r,{className:`meta`,begin:`^---\\s*$`,relevance:10},{className:`string`,begin:`[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*`},{begin:`<%[%=-]?`,end:`[%-]?%>`,subLanguage:`ruby`,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:`type`,begin:`!\\w+!`+n},{className:`type`,begin:`!<`+n+`>`},{className:`type`,begin:`!`+n},{className:`type`,begin:`!!`+n},{className:`meta`,begin:`&`+e.UNDERSCORE_IDENT_RE+`$`},{className:`meta`,begin:`\\*`+e.UNDERSCORE_IDENT_RE+`$`},{className:`bullet`,begin:`-(?=[ ]|$)`,relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},c,{className:`number`,begin:e.C_NUMBER_RE+`\\b`,relevance:0},u,d,a,o],p=[...f];return p.pop(),p.push(s),l.contains=p,{name:`YAML`,case_insensitive:!0,aliases:[`yml`],contains:f}}var aC={arduino:tx,bash:nx,c:rx,cpp:ix,csharp:ax,css:mx,diff:hx,go:gx,graphql:_x,ini:vx,java:wx,javascript:Nx,json:Fx,kotlin:Bx,less:Xx,lua:Zx,makefile:Qx,markdown:$x,objectivec:eS,perl:tS,php:nS,"php-template":rS,plaintext:iS,python:aS,"python-repl":oS,r:sS,ruby:cS,rust:lS,scss:vS,shell:yS,sql:bS,swift:WS,typescript:eC,vbnet:tC,wasm:nC,xml:rC,yaml:iC},oC=u(s(((e,t)=>{function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw Error(`map is read-only`)}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw Error(`set is read-only`)}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let r=e[t],i=typeof r;i!==`object`&&i!==`function`||Object.isFrozen(r)||n(r)}),e}var r=class{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function i(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}function a(e,...t){let n=Object.create(null);for(let t in e)n[t]=e[t];return t.forEach(function(e){for(let t in e)n[t]=e[t]}),n}var o=`</span>`,s=e=>!!e.scope,c=(e,{prefix:t})=>{if(e.startsWith(`language:`))return e.replace(`language:`,`language-`);if(e.includes(`.`)){let n=e.split(`.`);return[`${t}${n.shift()}`,...n.map((e,t)=>`${e}${`_`.repeat(t+1)}`)].join(` `)}return`${t}${e}`},l=class{constructor(e,t){this.buffer=``,this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=i(e)}openNode(e){if(!s(e))return;let t=c(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){s(e)&&(this.buffer+=o)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}},u=(e={})=>{let t={children:[]};return Object.assign(t,e),t},d=class e{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){let t=u({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t==`string`?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(t){typeof t!=`string`&&t.children&&(t.children.every(e=>typeof e==`string`)?t.children=[t.children.join(``)]:t.children.forEach(t=>{e._collapse(t)}))}},f=class extends d{constructor(e){super(),this.options=e}addText(e){e!==``&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){let n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new l(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function p(e){return e?typeof e==`string`?e:e.source:null}function m(e){return _(`(?=`,e,`)`)}function h(e){return _(`(?:`,e,`)*`)}function g(e){return _(`(?:`,e,`)?`)}function _(...e){return e.map(e=>p(e)).join(``)}function v(e){let t=e[e.length-1];return typeof t==`object`&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function y(...e){return`(`+(v(e).capture?``:`?:`)+e.map(e=>p(e)).join(`|`)+`)`}function b(e){return RegExp(e.toString()+`|`).exec(``).length-1}function x(e,t){let n=e&&e.exec(t);return n&&n.index===0}var S=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function C(e,{joinWith:t}){let n=0;return e.map(e=>{n+=1;let t=n,r=p(e),i=``;for(;r.length>0;){let e=S.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),e[0][0]===`\\`&&e[1]?i+=`\\`+String(Number(e[1])+t):(i+=e[0],e[0]===`(`&&n++)}return i}).map(e=>`(${e})`).join(t)}var w=/\b\B/,T=`[a-zA-Z]\\w*`,E=`[a-zA-Z_]\\w*`,D=`\\b\\d+(\\.\\d+)?`,O=`(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)`,k=`\\b(0b[01]+)`,A=`!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~`,j=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=_(t,/.*\b/,e.binary,/\b.*/)),a({scope:`meta`,begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{e.index!==0&&t.ignoreMatch()}},e)},M={begin:`\\\\[\\s\\S]`,relevance:0},N={scope:`string`,begin:`'`,end:`'`,illegal:`\\n`,contains:[M]},P={scope:`string`,begin:`"`,end:`"`,illegal:`\\n`,contains:[M]},F={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},ee=function(e,t,n={}){let r=a({scope:`comment`,begin:e,end:t,contains:[]},n);r.contains.push({scope:`doctag`,begin:`[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)`,end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let i=y(`I`,`a`,`is`,`so`,`us`,`to`,`at`,`if`,`in`,`it`,`on`,/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:_(/[ ]+/,`(`,i,/[.]?[:]?([.][ ]|[ ])/,`){3}`)}),r},I=ee(`//`,`$`),te=ee(`/\\*`,`\\*/`),ne=ee(`#`,`$`),re=Object.freeze({__proto__:null,APOS_STRING_MODE:N,BACKSLASH_ESCAPE:M,BINARY_NUMBER_MODE:{scope:`number`,begin:k,relevance:0},BINARY_NUMBER_RE:k,COMMENT:ee,C_BLOCK_COMMENT_MODE:te,C_LINE_COMMENT_MODE:I,C_NUMBER_MODE:{scope:`number`,begin:O,relevance:0},C_NUMBER_RE:O,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:ne,IDENT_RE:T,MATCH_NOTHING_RE:w,METHOD_GUARD:{begin:`\\.\\s*[a-zA-Z_]\\w*`,relevance:0},NUMBER_MODE:{scope:`number`,begin:D,relevance:0},NUMBER_RE:D,PHRASAL_WORDS_MODE:F,QUOTE_STRING_MODE:P,REGEXP_MODE:{scope:`regexp`,begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[M,{begin:/\[/,end:/\]/,relevance:0,contains:[M]}]},RE_STARTERS_RE:A,SHEBANG:j,TITLE_MODE:{scope:`title`,begin:T,relevance:0},UNDERSCORE_IDENT_RE:E,UNDERSCORE_TITLE_MODE:{scope:`title`,begin:E,relevance:0}});function ie(e,t){e.input[e.index-1]===`.`&&t.ignoreMatch()}function ae(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function oe(e,t){t&&e.beginKeywords&&(e.begin=`\\b(`+e.beginKeywords.split(` `).join(`|`)+`)(?!\\.)(?=\\b|\\s)`,e.__beforeBegin=ie,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function se(e,t){Array.isArray(e.illegal)&&(e.illegal=y(...e.illegal))}function ce(e,t){if(e.match){if(e.begin||e.end)throw Error(`begin & end are not supported with match`);e.begin=e.match,delete e.match}}function le(e,t){e.relevance===void 0&&(e.relevance=1)}var ue=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw Error(`beforeMatch cannot be used with starts`);let n=Object.assign({},e);Object.keys(e).forEach(t=>{delete e[t]}),e.keywords=n.keywords,e.begin=_(n.beforeMatch,m(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},de=[`of`,`and`,`for`,`in`,`not`,`or`,`if`,`then`,`parent`,`list`,`value`],fe=`keyword`;function pe(e,t,n=fe){let r=Object.create(null);return typeof e==`string`?i(n,e.split(` `)):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(n){Object.assign(r,pe(e[n],t,n))}),r;function i(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach(function(t){let n=t.split(`|`);r[n[0]]=[e,L(n[0],n[1])]})}}function L(e,t){return t?Number(t):+!R(e)}function R(e){return de.includes(e.toLowerCase())}var me={},he=e=>{console.error(e)},ge=(e,...t)=>{console.log(`WARN: ${e}`,...t)},_e=(e,t)=>{me[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),me[`${e}/${t}`]=!0)},ve=Error();function ye(e,t,{key:n}){let r=0,i=e[n],a={},o={};for(let e=1;e<=t.length;e++)o[e+r]=i[e],a[e+r]=!0,r+=b(t[e-1]);e[n]=o,e[n]._emit=a,e[n]._multi=!0}function be(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw he(`skip, excludeBegin, returnBegin not compatible with beginScope: {}`),ve;if(typeof e.beginScope!=`object`||e.beginScope===null)throw he(`beginScope must be object`),ve;ye(e,e.begin,{key:`beginScope`}),e.begin=C(e.begin,{joinWith:``})}}function xe(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw he(`skip, excludeEnd, returnEnd not compatible with endScope: {}`),ve;if(typeof e.endScope!=`object`||e.endScope===null)throw he(`endScope must be object`),ve;ye(e,e.end,{key:`endScope`}),e.end=C(e.end,{joinWith:``})}}function Se(e){e.scope&&typeof e.scope==`object`&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Ce(e){Se(e),typeof e.beginScope==`string`&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope==`string`&&(e.endScope={_wrap:e.endScope}),be(e),xe(e)}function we(e){function t(t,n){return new RegExp(p(t),`m`+(e.case_insensitive?`i`:``)+(e.unicodeRegex?`u`:``)+(n?`g`:``))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=b(e)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let e=this.regexes.map(e=>e[1]);this.matcherRe=t(C(e,{joinWith:`|`}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;let t=this.matcherRe.exec(e);if(!t)return null;let n=t.findIndex((e,t)=>t>0&&e!==void 0),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];let t=new n;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),t.type===`begin`&&this.count++}exec(e){let t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition()&&!(n&&n.index===this.lastIndex)){let t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}function i(e){let t=new r;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:`begin`})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:`end`}),e.illegal&&t.addRule(e.illegal,{type:`illegal`}),t}function o(n,r){let a=n;if(n.isCompiled)return a;[ae,ce,Ce,ue].forEach(e=>e(n,r)),e.compilerExtensions.forEach(e=>e(n,r)),n.__beforeBegin=null,[oe,se,le].forEach(e=>e(n,r)),n.isCompiled=!0;let s=null;return typeof n.keywords==`object`&&n.keywords.$pattern&&(n.keywords=Object.assign({},n.keywords),s=n.keywords.$pattern,delete n.keywords.$pattern),s||=/\w+/,n.keywords&&=pe(n.keywords,e.case_insensitive),a.keywordPatternRe=t(s,!0),r&&(n.begin||=/\B|\b/,a.beginRe=t(a.begin),!n.end&&!n.endsWithParent&&(n.end=/\B|\b/),n.end&&(a.endRe=t(a.end)),a.terminatorEnd=p(a.end)||``,n.endsWithParent&&r.terminatorEnd&&(a.terminatorEnd+=(n.end?`|`:``)+r.terminatorEnd)),n.illegal&&(a.illegalRe=t(n.illegal)),n.contains||=[],n.contains=[].concat(...n.contains.map(function(e){return Ee(e===`self`?n:e)})),n.contains.forEach(function(e){o(e,a)}),n.starts&&o(n.starts,r),a.matcher=i(a),a}if(e.compilerExtensions||=[],e.contains&&e.contains.includes(`self`))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=a(e.classNameAliases||{}),o(e)}function Te(e){return e?e.endsWithParent||Te(e.starts):!1}function Ee(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return a(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:Te(e)?a(e,{starts:e.starts?a(e.starts):null}):Object.isFrozen(e)?a(e):e}var De=`11.11.2`,Oe=class extends Error{constructor(e,t){super(e),this.name=`HTMLInjectionError`,this.html=t}},ke=i,Ae=a,je=Symbol(`nomatch`),Me=7,Ne=function(e){let t=Object.create(null),i=Object.create(null),a=[],o=!0,s=`Could not find the language '{}', did you forget to load/include a language module?`,c={disableAutodetect:!0,name:`Plain text`,contains:[]},l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:`hljs-`,cssSelector:`pre code`,languages:null,__emitter:f};function u(e){return l.noHighlightRe.test(e)}function d(e){let t=e.className+` `;t+=e.parentNode?e.parentNode.className:``;let n=l.languageDetectRe.exec(t);if(n){let t=N(n[1]);return t||(ge(s.replace(`{}`,n[1])),ge(`Falling back to no-highlight mode for this block.`,e)),t?n[1]:`no-highlight`}return t.split(/\s+/).find(e=>u(e)||N(e))}function p(e,t,n){let r=``,i=``;typeof t==`object`?(r=e,n=t.ignoreIllegals,i=t.language):(_e(`10.7.0`,`highlight(lang, code, ...args) has been deprecated.`),_e(`10.7.0`,`Please use highlight(code, options) instead.
|
|
66
66
|
https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(n=!0);let a={code:r,language:i};ne(`before:highlight`,a);let o=a.result?a.result:v(a.language,a.code,n);return o.code=a.code,ne(`after:highlight`,o),o}function v(e,n,i,a){let c=Object.create(null);function u(e,t){return e.keywords[t]}function d(){if(!A.keywords){M.addText(P);return}let e=0;A.keywordPatternRe.lastIndex=0;let t=A.keywordPatternRe.exec(P),n=``;for(;t;){n+=P.substring(e,t.index);let r=D.case_insensitive?t[0].toLowerCase():t[0],i=u(A,r);if(i){let[e,a]=i;if(M.addText(n),n=``,c[r]=(c[r]||0)+1,c[r]<=Me&&(F+=a),e.startsWith(`_`))n+=t[0];else{let n=D.classNameAliases[e]||e;m(t[0],n)}}else n+=t[0];e=A.keywordPatternRe.lastIndex,t=A.keywordPatternRe.exec(P)}n+=P.substring(e),M.addText(n)}function f(){if(P===``)return;let e=null;if(typeof A.subLanguage==`string`){if(!t[A.subLanguage]){M.addText(P);return}e=v(A.subLanguage,P,!0,j[A.subLanguage]),j[A.subLanguage]=e._top}else e=S(P,A.subLanguage.length?A.subLanguage:null);A.relevance>0&&(F+=e.relevance),M.__addSublanguage(e._emitter,e.language)}function p(){A.subLanguage==null?d():f(),P=``}function m(e,t){e!==``&&(M.startScope(t),M.addText(e),M.endScope())}function h(e,t){let n=1,r=t.length-1;for(;n<=r;){if(!e._emit[n]){n++;continue}let r=D.classNameAliases[e[n]]||e[n],i=t[n];r?m(i,r):(P=i,d(),P=``),n++}}function g(e,t){return e.scope&&typeof e.scope==`string`&&M.openNode(D.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(m(P,D.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),P=``):e.beginScope._multi&&(h(e.beginScope,t),P=``)),A=Object.create(e,{parent:{value:A}}),A}function _(e,t,n){let i=x(e.endRe,n);if(i){if(e[`on:end`]){let n=new r(e);e[`on:end`](t,n),n.isMatchIgnored&&(i=!1)}if(i){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return _(e.parent,t,n)}function y(e){return A.matcher.regexIndex===0?(P+=e[0],1):(te=!0,0)}function b(e){let t=e[0],n=e.rule,i=new r(n),a=[n.__beforeBegin,n[`on:begin`]];for(let n of a)if(n&&(n(e,i),i.isMatchIgnored))return y(t);return n.skip?P+=t:(n.excludeBegin&&(P+=t),p(),!n.returnBegin&&!n.excludeBegin&&(P=t)),g(n,e),n.returnBegin?0:t.length}function C(e){let t=e[0],r=n.substring(e.index),i=_(A,e,r);if(!i)return je;let a=A;A.endScope&&A.endScope._wrap?(p(),m(t,A.endScope._wrap)):A.endScope&&A.endScope._multi?(p(),h(A.endScope,e)):a.skip?P+=t:(a.returnEnd||a.excludeEnd||(P+=t),p(),a.excludeEnd&&(P=t));do A.scope&&M.closeNode(),!A.skip&&!A.subLanguage&&(F+=A.relevance),A=A.parent;while(A!==i.parent);return i.starts&&g(i.starts,e),a.returnEnd?0:t.length}function w(){let e=[];for(let t=A;t!==D;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach(e=>M.openNode(e))}let T={};function E(t,r){let a=r&&r[0];if(P+=t,a==null)return p(),0;if(T.type===`begin`&&r.type===`end`&&T.index===r.index&&a===``){if(P+=n.slice(r.index,r.index+1),!o){let t=Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=T.rule,t}return 1}if(T=r,r.type===`begin`)return b(r);if(r.type===`illegal`&&!i){let e=Error(`Illegal lexeme "`+a+`" for mode "`+(A.scope||`<unnamed>`)+`"`);throw e.mode=A,e}if(r.type===`end`){let e=C(r);if(e!==je)return e}if(r.type===`illegal`&&a===``)return r.index===n.length||(P+=`
|
|
67
|
-
`),1;if(I>1e5&&I>r.index*3)throw Error(`potential infinite loop, way more iterations than matches`);return P+=a,a.length}let D=N(e);if(!D)throw he(s.replace(`{}`,e)),Error(`Unknown language: "`+e+`"`);let O=we(D),k=``,A=a||O,j={},M=new l.__emitter(l);w();let P=``,F=0,ee=0,I=0,te=!1;try{if(D.__emitTokens)D.__emitTokens(n,M);else{for(A.matcher.considerAll();;){I++,te?te=!1:A.matcher.considerAll(),A.matcher.lastIndex=ee;let e=A.matcher.exec(n);if(!e)break;let t=E(n.substring(ee,e.index),e);ee=e.index+t}E(n.substring(ee))}return M.finalize(),k=M.toHTML(),{language:e,value:k,relevance:F,illegal:!1,_emitter:M,_top:A}}catch(t){if(t.message&&t.message.includes(`Illegal`))return{language:e,value:ke(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:ee,context:n.slice(ee-100,ee+100),mode:t.mode,resultSoFar:k},_emitter:M};if(o)return{language:e,value:ke(n),illegal:!1,relevance:0,errorRaised:t,_emitter:M,_top:A};throw t}}function b(e){let t={value:ke(e),illegal:!1,relevance:0,_top:c,_emitter:new l.__emitter(l)};return t._emitter.addText(e),t}function S(e,n){n=n||l.languages||Object.keys(t);let r=b(e),i=n.filter(N).filter(F).map(t=>v(t,e,!1));i.unshift(r);let[a,o]=i.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(N(e.language).supersetOf===t.language)return 1;if(N(t.language).supersetOf===e.language)return-1}return 0}),s=a;return s.secondBest=o,s}function C(e,t,n){let r=t&&i[t]||n;e.classList.add(`hljs`),e.classList.add(`language-${r}`)}function w(e){let t=null,n=d(e);if(u(n))return;if(ne(`before:highlightElement`,{el:e,language:n}),e.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);return}if(e.children.length>0&&(l.ignoreUnescapedHTML||(console.warn(`One of your code blocks includes unescaped HTML. This is a potentially serious security risk.`),console.warn(`https://github.com/highlightjs/highlight.js/wiki/security`),console.warn(`The element with unescaped HTML:`),console.warn(e)),l.throwUnescapedHTML))throw new Oe(`One of your code blocks includes unescaped HTML.`,e.innerHTML);t=e;let r=t.textContent,i=n?p(r,{language:n,ignoreIllegals:!0}):S(r);e.innerHTML=i.value,e.dataset.highlighted=`yes`,C(e,n,i.language),e.result={language:i.language,re:i.relevance,relevance:i.relevance},i.secondBest&&(e.secondBest={language:i.secondBest.language,relevance:i.secondBest.relevance}),ne(`after:highlightElement`,{el:e,result:i,text:r})}function T(e){l=Ae(l,e)}let E=()=>{k(),_e(`10.6.0`,`initHighlighting() deprecated. Use highlightAll() now.`)};function D(){k(),_e(`10.6.0`,`initHighlightingOnLoad() deprecated. Use highlightAll() now.`)}let O=!1;function k(){function e(){k()}document.readyState===`loading`?(O||window.addEventListener(`DOMContentLoaded`,e,!1),O=!0):document.querySelectorAll(l.cssSelector).forEach(w)}function A(n,r){let i=null;try{i=r(e)}catch(e){if(he(`Language definition for '{}' could not be registered.`.replace(`{}`,n)),o)he(e);else throw e;i=c}i.name||(i.name=n),t[n]=i,i.rawDefinition=r.bind(null,e),i.aliases&&P(i.aliases,{languageName:n})}function j(e){delete t[e];for(let t of Object.keys(i))i[t]===e&&delete i[t]}function M(){return Object.keys(t)}function N(e){return e=(e||``).toLowerCase(),t[e]||t[i[e]]}function P(e,{languageName:t}){typeof e==`string`&&(e=[e]),e.forEach(e=>{i[e.toLowerCase()]=t})}function F(e){let t=N(e);return t&&!t.disableAutodetect}function ee(e){e[`before:highlightBlock`]&&!e[`before:highlightElement`]&&(e[`before:highlightElement`]=t=>{e[`before:highlightBlock`](Object.assign({block:t.el},t))}),e[`after:highlightBlock`]&&!e[`after:highlightElement`]&&(e[`after:highlightElement`]=t=>{e[`after:highlightBlock`](Object.assign({block:t.el},t))})}function I(e){ee(e),a.push(e)}function te(e){let t=a.indexOf(e);t!==-1&&a.splice(t,1)}function ne(e,t){let n=e;a.forEach(function(e){e[n]&&e[n](t)})}function ie(e){return _e(`10.7.0`,`highlightBlock will be removed entirely in v12.0`),_e(`10.7.0`,`Please use highlightElement now.`),w(e)}Object.assign(e,{highlight:p,highlightAuto:S,highlightAll:k,highlightElement:w,highlightBlock:ie,configure:T,initHighlighting:E,initHighlightingOnLoad:D,registerLanguage:A,unregisterLanguage:j,listLanguages:M,getLanguage:N,registerAliases:P,autoDetection:F,inherit:Ae,addPlugin:I,removePlugin:te}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=De,e.regex={concat:_,lookahead:m,either:y,optional:g,anyNumberOfTimes:h};for(let e in re)typeof re[e]==`object`&&n(re[e]);return Object.assign(e,re),e},Pe=Ne({});Pe.newInstance=()=>Ne({}),t.exports=Pe,Pe.HighlightJS=Pe,Pe.default=Pe}))()).default,JS={},YS=`hljs-`;function XS(e){let t=qS.newInstance();return e&&a(e),{highlight:n,highlightAuto:r,listLanguages:i,register:a,registerAlias:o,registered:s};function n(e,n,r){let i=r||JS,a=typeof i.prefix==`string`?i.prefix:YS;if(!t.getLanguage(e))throw Error("Unknown language: `"+e+"` is not registered");t.configure({__emitter:ZS,classPrefix:a});let o=t.highlight(n,{ignoreIllegals:!0,language:e});if(o.errorRaised)throw Error("Could not highlight with `Highlight.js`",{cause:o.errorRaised});let s=o._emitter.root,c=s.data;return c.language=o.language,c.relevance=o.relevance,s}function r(e,r){let a=(r||JS).subset||i(),o=-1,s=0,c;for(;++o<a.length;){let i=a[o];if(!t.getLanguage(i))continue;let l=n(i,e,r);l.data&&l.data.relevance!==void 0&&l.data.relevance>s&&(s=l.data.relevance,c=l)}return c||{type:`root`,children:[],data:{language:void 0,relevance:s}}}function i(){return t.listLanguages()}function a(e,n){if(typeof e==`string`)t.registerLanguage(e,n);else{let n;for(n in e)Object.hasOwn(e,n)&&t.registerLanguage(n,e[n])}}function o(e,n){if(typeof e==`string`)t.registerAliases(typeof n==`string`?n:[...n],{languageName:e});else{let n;for(n in e)if(Object.hasOwn(e,n)){let r=e[n];t.registerAliases(typeof r==`string`?r:[...r],{languageName:n})}}}function s(e){return!!t.getLanguage(e)}}var ZS=class{constructor(e){this.options=e,this.root={type:`root`,children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(e){if(e===``)return;let t=this.stack[this.stack.length-1],n=t.children[t.children.length-1];n&&n.type===`text`?n.value+=e:t.children.push({type:`text`,value:e})}startScope(e){this.openNode(String(e))}endScope(){this.closeNode()}__addSublanguage(e,t){let n=this.stack[this.stack.length-1],r=e.root.children;t?n.children.push({type:`element`,tagName:`span`,properties:{className:[t]},children:r}):n.children.push(...r)}openNode(e){let t=this,n=e.split(`.`).map(function(e,n){return n?e+`_`.repeat(n):t.options.classPrefix+e}),r=this.stack[this.stack.length-1],i={type:`element`,tagName:`span`,properties:{className:n},children:[]};r.children.push(i),this.stack.push(i)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return``}},QS=2e4,$S=100,eC=2e3,tC=XS(KS),nC={js:`javascript`,jsx:`javascript`,mjs:`javascript`,cjs:`javascript`,ts:`typescript`,tsx:`typescript`,py:`python`,sh:`bash`,shell:`bash`,zsh:`bash`,html:`xml`,htm:`xml`,svg:`xml`,xml:`xml`,json:`json`,jsonc:`json`,json5:`json`,css:`css`,md:`markdown`,markdown:`markdown`,yml:`yaml`,yaml:`yaml`};function rC(e){if(e===void 0)return null;let t=e.trim().toLowerCase();return t.startsWith(`language-`)&&(t=t.slice(9)),t===``?null:t}function iC(e){let t=Object.hasOwn(nC,e)?nC[e]:void 0;return t!==void 0&&tC.registered(t)?t:tC.registered(e)?e:null}function aC(e){let t=e.className,n=(Array.isArray(t)?t:typeof t==`string`?[t]:[]).filter(e=>typeof e==`string`&&/^[A-Za-z0-9_-]+$/.test(e));return n.length>0?n.join(` `):void 0}function oC(e){let t=``,n=0,r=[...e].reverse();for(;r.length>0;){let e=r.pop();if(n+=1,n>QS)return null;if(e.type===`text`)t+=e.value;else{if(e.type!==`element`||e.tagName!==`span`)return null;for(let t=e.children.length-1;t>=0;--t)r.push(e.children[t])}}return t}function sC(e,t=0){if(t>$S)throw Error(`Code token tree is nested too deeply.`);return e.map((e,n)=>e.type===`text`?e.value:e.type===`element`&&e.tagName===`span`?(0,$.jsx)(`span`,{className:aC(e.properties),children:sC(e.children,t+1)},n):null)}function cC(e,t){let n=rC(t);if(n===null||e===``||e.length>2e4)return{nodes:null,highlighted:!1};let r=iC(n);if(r===null)return{nodes:null,highlighted:!1};try{let t=tC.highlight(r,e);if(oC(t.children)!==e)return{nodes:null,highlighted:!1};let n=sC(t.children);return n.length===0&&e!==``?{nodes:null,highlighted:!1}:{nodes:n,highlighted:!0}}catch{return{nodes:null,highlighted:!1}}}function lC(e){if(typeof document>`u`||document.body===null)return!1;let t=document.activeElement,n=typeof window>`u`?null:window.getSelection(),r=[];if(n!==null)for(let e=0;e<n.rangeCount;e+=1)r.push(n.getRangeAt(e).cloneRange());let i=document.createElement(`textarea`);i.value=e,i.setAttribute(`readonly`,``),i.setAttribute(`aria-hidden`,`true`),i.tabIndex=-1,i.style.position=`fixed`,i.style.top=`-1000px`,i.style.left=`-1000px`,i.style.opacity=`0`,document.body.appendChild(i);let a=!1;try{i.focus({preventScroll:!0}),i.select(),i.setSelectionRange(0,i.value.length),a=typeof document.execCommand==`function`&&document.execCommand(`copy`)}catch{a=!1}finally{if(i.remove(),t!==null&&typeof t.focus==`function`)try{t.focus({preventScroll:!0})}catch{}if(n!==null){n.removeAllRanges();for(let e of r)n.addRange(e)}}return a}async function uC(e){if(typeof navigator<`u`&&navigator.clipboard&&typeof navigator.clipboard.writeText==`function`)try{return await navigator.clipboard.writeText(e),!0}catch{return lC(e)}return lC(e)}var dC=/^[a-z0-9][a-z0-9+#._-]*$/;function fC({value:e,language:t,mode:n,htmlProps:r}){let i=sy(),a=(0,y.useMemo)(()=>cC(e,t),[e,t]),[o,s]=(0,y.useState)({value:e,state:`idle`}),c=(0,y.useRef)(e),l=(0,y.useRef)(null),u=(0,y.useRef)(!0);c.current=e;let d=o.value===e?o.state:`idle`;(0,y.useEffect)(()=>(u.current=!0,()=>{u.current=!1,l.current!==null&&(clearTimeout(l.current),l.current=null)}),[]),(0,y.useEffect)(()=>{l.current!==null&&(clearTimeout(l.current),l.current=null),s({value:e,state:`idle`})},[e]);let f=(0,y.useCallback)(async()=>{let t=e;l.current!==null&&(clearTimeout(l.current),l.current=null);let n=await uC(t);u.current&&c.current===t&&(s({value:t,state:n?`success`:`error`}),l.current=setTimeout(()=>{l.current=null,u.current&&s(e=>e.value===t?{value:t,state:`idle`}:e)},eC))},[e]),p=rC(t),m=t!==void 0&&t.trim()!==``?t.trim():i(`Text`,`文本`),h=[a.highlighted?`hljs`:``,p!==null&&dC.test(p)?`language-${p}`:``].filter(e=>e!==``).join(` `)||void 0,g=d===`success`?i(`Copied`,`已复制`):d===`error`?i(`Copy failed`,`复制失败`):``;return(0,$.jsxs)(`div`,{className:`md-code-block`,"data-code-mode":n,children:[(0,$.jsxs)(`div`,{className:`md-code-block-toolbar`,children:[(0,$.jsx)(`span`,{className:`md-code-block-language`,children:m}),n===`interactive`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{className:`md-code-block-feedback`,"data-state":d,role:`status`,"aria-live":`polite`,children:g}),(0,$.jsx)(`button`,{type:`button`,className:`md-code-block-copy`,"aria-label":i(`Copy code`,`复制代码`),onClick:()=>{f()},children:i(`Copy`,`复制`)})]})]}),(0,$.jsx)(`pre`,{className:`md-code`,...r,children:(0,$.jsx)(`code`,{className:h,children:a.nodes??e})})]})}var pC=g();function mC({src:e,alt:t,title:n,mode:r,rootRef:i,imageProps:a}){let o=sy(),s=(0,y.useRef)(null),c=(0,y.useRef)(null),l=(0,y.useRef)(!1),u=(0,y.useRef)(e),[d,f]=(0,y.useState)(!1),[p,m]=(0,y.useState)(!1),[h,g]=(0,y.useState)(null),[_,v]=(0,y.useState)(null),b=(0,y.useCallback)(()=>{let e=s.current;if(e&&e.isConnected)try{e.focus({preventScroll:!0})}catch{e.focus()}},[]),x=(0,y.useCallback)(()=>{l.current&&(l.current=!1,m(!1),b())},[b]),S=(0,y.useCallback)(()=>{let e=c.current;if(e?.open)try{e.close()}catch{}x()},[x]),C=(0,y.useCallback)(()=>{let t=i.current;t&&!l.current&&(v(e),g(t),l.current=!0,m(!0))},[i,e]);(0,y.useEffect)(()=>{if(r!==`interactive`){f(!1),S();return}let e=s.current;f(e!==null&&e.closest(`a`)===null)},[r,e,S]),(0,y.useEffect)(()=>{u.current!==e&&(u.current=e,l.current&&S())},[e,S]),(0,y.useEffect)(()=>{if(!p)return;let e=c.current;if(e&&!e.open){if(typeof e.showModal!=`function`)x();else try{e.showModal()}catch{x()}}},[p,x]);let w=d?{role:`button`,tabIndex:0,"aria-haspopup":`dialog`,"aria-label":t?void 0:o(`View image`,`查看图片`),"data-zoomable":`true`,onClick:e=>{e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.currentTarget.closest(`a`)||C()},onKeyDown:e=>{e.key!==`Enter`&&e.key!==` `&&e.key!==`Spacebar`||e.currentTarget.closest(`a`)||(e.preventDefault(),C())}}:{},T=(0,$.jsx)(`img`,{ref:s,className:`md-image`,...a,src:e,alt:t,title:n,loading:`lazy`,referrerPolicy:`no-referrer`,...w}),E=t||n?o(`Image preview: ${t||n}`,`图片预览:${t||n}`):o(`Image preview`,`图片预览`),D=!!(t||n),O=n&&n!==t?n:void 0;return(0,$.jsxs)($.Fragment,{children:[T,p&&h&&_===e?(0,pC.createPortal)((0,$.jsxs)(`dialog`,{ref:c,className:`md-image-zoom`,"aria-label":E,onClose:x,onKeyDown:e=>{e.key===`Tab`&&(e.preventDefault(),e.currentTarget.querySelector(`button`)?.focus())},onCancel:e=>{e.preventDefault(),S()},onClick:e=>{e.target===e.currentTarget&&S()},children:[(0,$.jsx)(`button`,{type:`button`,className:`md-image-zoom-close`,"aria-label":o(`Close image preview`,`关闭图片预览`),onClick:S,children:(0,$.jsx)(`span`,{"aria-hidden":`true`,children:`×`})}),(0,$.jsxs)(`figure`,{className:`md-image-zoom-figure`,children:[(0,$.jsx)(`img`,{className:`md-image-zoom-full`,src:e,alt:t,title:n,referrerPolicy:`no-referrer`}),D?(0,$.jsxs)(`figcaption`,{className:`md-image-zoom-caption`,children:[t?(0,$.jsx)(`span`,{children:t}):null,O?(0,$.jsx)(`span`,{className:`md-image-zoom-title`,children:O}):null]}):null]})]}),h):null]})}var hC=(0,y.createContext)(null);function gC(){let e=(0,y.useContext)(hC);if(!e)throw Error(`LocalViewContext is not initialized`);return e}var _C=`local.validation.failed`,vC=`local.validation.expression`,yC=2e3,bC={invalid:!1},xC={hintFor:()=>null,fieldFor:()=>bC};function SC(e){return`${e.start}:${e.end}`}function CC(e){return e.length>yC?`${e.slice(0,1999)}…`:e}function wC(e,t,n,r){let i=Array.isArray(e.validations)?e.validations:[];if(i.length===0)return xC;let a=null;try{typeof t.validate==`function`&&(a=t.validate())}catch{a=null}let o=new Map;for(let e of a??[])(e.code===_C||e.code===vC)&&o.set(SC(e.range),e);let s=new Map,c=new Map,l=new Map,u=r(`This rule cannot be evaluated`,`无法计算此规则`),d=r(`Validation failed.`,`校验未通过。`);for(let[t,r]of i.entries()){let i=SC(r.range),f=o.get(i),p=a===null||f?.code===vC,m=f?.code===_C,h=m?CC(f?.message||r.message||d):p?f?.message?`${u}: ${CC(f.message)}`:u:``,g={id:`${n}-validation-${t}`,failed:m,error:p,message:h};if(s.set(r.nodeId,g),c.set(i,g),m||p)for(let t of r.fields??[]){let n=Object.hasOwn(e.bindings,t)?e.bindings[t]:void 0;if(n)for(let e of n.nodeIds??[]){let t=l.get(e);t?t.includes(g.id)||t.push(g.id):l.set(e,[g.id])}}}return{hintFor(e){return c.get(SC(e.range))??s.get(e.id)??null},fieldFor(e){let t=l.get(e.id);return t&&t.length>0?{describedBy:t.join(` `),invalid:!0}:bC}}}function TC(e){return gC().validation.fieldFor(e)}var EC=/^\s*\{\{([\s\S]*)\}\}\s*$/,DC={revision:0,state:{}};function OC(e,t){return e.attrs?.[t]}function kC(e,t,n){let r=OC(t,n);if(r===void 0)return{present:!1};let i=EC.exec(r);if(!i)return{present:!0,ok:!0,value:r};try{return{present:!0,ok:!0,value:e.evaluate(i[1])}}catch{return{present:!0,ok:!1}}}function AC(e){return e===null?``:typeof e==`string`?e:typeof e==`number`?Number.isFinite(e)?String(e):null:typeof e==`boolean`?e?`true`:`false`:null}function jC(e,t,n,r=``,i=ny){let a=OC(t,n);if(a===void 0)return r;let o=EC.exec(a);try{return o?AC(e.evaluate(o[1]))??i(`Cannot compute`,`无法计算`):e.text(a)}catch{return i(`Cannot compute`,`无法计算`)}}function MC(e,t,n,r){let i=OC(t,n);if(i===void 0)return{ok:!0,value:r};let a=EC.exec(i);if(!a)return{ok:!0,value:i===`true`};try{let t=e.evaluate(a[1]);return typeof t==`boolean`?{ok:!0,value:t}:{ok:!1}}catch{return{ok:!1}}}function NC(e,t,n,r=!1){let i=MC(e,t,n,r);return i.ok?i.value:r}function PC(e,t,n,r,i){let a=OC(t,n);if(a===void 0)return{tone:i,error:!1};let o=EC.exec(a);if(!o){let e=a.trim();return{tone:r.includes(e)?e:i,error:!1}}try{let t=e.evaluate(o[1]);return typeof t==`string`&&r.includes(t)?{tone:t,error:!1}:{tone:i,error:!0}}catch{return{tone:i,error:!0}}}function FC(e){try{return e.snapshot().revision}catch{return 0}}function IC(e,t,n,r){let i=OC(t,n);if(i===void 0)return r;let a=EC.exec(i);try{let t=a?e.evaluate(a[1]):Number(i);return typeof t==`number`&&Number.isFinite(t)?t:r}catch{return r}}function LC(e,t){try{return e.get(t)}catch{return null}}function RC(e){return AC(e)??``}var zC=`—`;function BC(e){return e.trim()===``?zC:e}function VC({label:e,value:t,hint:n,className:r=``,multiline:i=!1}){return(0,$.jsxs)(`div`,{className:`md-control local-static-control ${r}`.trim(),children:[(0,$.jsx)(`span`,{className:`md-label`,children:e}),(0,$.jsx)(`span`,{className:`local-static-value${i?` local-static-multiline`:``}`,"data-local-static-value":``,children:t}),n?(0,$.jsx)(`span`,{className:`md-hint`,children:n}):null]})}function HC({value:e,block:t=!1}){return t?(0,$.jsx)(`div`,{className:`local-print-value local-print-block`,"aria-hidden":`true`,"data-local-print-value":``,children:e}):(0,$.jsx)(`span`,{className:`local-print-value`,"aria-hidden":`true`,"data-local-print-value":``,children:e})}function UC(e){let t=OC(e,`color`);if(t===void 0)return;let n=t.trim();return n!==``&&qn(n)?n:void 0}function WC(e){if(e)return{"--local-accent":e,"--local-accent-soft":`color-mix(in srgb, ${e} 14%, var(--surface))`,"--local-accent-strong":e}}var GC=`(prefers-color-scheme: dark)`;function KC(e){if(!Array.isArray(e)||e.length===0)return``;try{return e.map(e=>{if(!e||typeof e!=`object`)return``;let t=Array.isArray(e.colorSchemes)?e.colorSchemes.join(``):``;return`${e.name}\u0000${e.protocol}\u0000${t}`}).join(``)}catch{return``}}function qC(e){return e.map(e=>`${e.code}\u0000${e.range.start}\u0000${e.range.end}\u0000${e.message}`).join(``)}function JC(e){return e===`light`||e===`dark`?e:null}function YC(e){let t=JC(e.getAttribute(`data-theme`));if(t)return t;let n=e.parentElement;for(;n;){let e=JC(n.getAttribute(`data-color-scheme`))??JC(n.getAttribute(`data-theme`));if(e)return e;n=n.parentElement}return null}function XC(){if(typeof window>`u`||typeof window.matchMedia!=`function`)return null;try{return window.matchMedia(GC).matches?`dark`:`light`}catch{return null}}function ZC(e,t){let n=JC(t),[r,i]=(0,y.useState)(`light`);return(0,y.useEffect)(()=>{if(n){i(n);return}let t=e.current;if(!t||typeof window>`u`){i(`light`);return}let r=()=>i(YC(t)??XC()??`light`);r();let a=[];if(typeof MutationObserver==`function`)try{let e=(e,t)=>{let n=new MutationObserver(r);n.observe(e,{attributes:!0,attributeFilter:t}),a.push(n)};e(t,[`data-theme`]);let n=t.parentElement;for(;n;)e(n,[`data-color-scheme`,`data-theme`]),n=n.parentElement}catch{for(let e of a)e.disconnect();a=[]}let o=()=>r(),s=null;if(typeof window.matchMedia==`function`)try{s=window.matchMedia(GC),typeof s.addEventListener==`function`?s.addEventListener(`change`,o):typeof s.addListener==`function`&&s.addListener(o)}catch{s=null}return()=>{for(let e of a)e.disconnect();s&&(typeof s.removeEventListener==`function`?s.removeEventListener(`change`,o):typeof s.removeListener==`function`&&s.removeListener(o))}},[n,e]),n??r}function QC(e,t,n){return Math.min(n,Math.max(t,e))}function $C(e,t,n,r){let i=Number.isFinite(r)&&r>0?r:1,a=Math.max(0,Math.floor((n-t)/i+1e-9)),o=t+Math.max(0,Math.min(a,Math.round((e-t)/i)))*i;return Number(o.toPrecision(15))}function ew(e,t,n,r){try{let i=e.get(t,n);return typeof i==`number`&&Number.isFinite(i)?i:r}catch{return r}}function tw(e,t,n,r,i,a,o=1){let s=IC(e,t,n,i),c=IC(e,t,r,a);s>c&&([s,c]=[c,s]);let l=IC(e,t,`step`,o);return{min:s,max:c,step:Number.isFinite(l)&&l>0?l:1}}function nw(e){let{runtime:t,report:n}=gC(),r=ay(),i=sy(),[a,o]=(0,y.useState)(null);return{write:(0,y.useCallback)((a,s)=>{try{let i=t.set(e,a,s);return i.length?(o(i.map(e=>et(e,r)).join(`; `)),n(i),!1):(o(null),!0)}catch(e){return o(e instanceof Error?e.message:i(`Cannot write`,`无法写入`)),!1}},[r,e,n,t,i]),writeMany:(0,y.useCallback)(a=>{try{let i=t.setMany(e,a);return i.length?(o(i.map(e=>et(e,r)).join(`; `)),n(i),!1):(o(null),!0)}catch(e){return o(e instanceof Error?e.message:i(`Cannot write`,`无法写入`)),!1}},[r,e,n,t,i]),error:a,setError:o}}function rw(e){let{runtime:t}=gC(),n=MC(t,e,`disabled`,!1);return n.ok?{disabled:n.value,invalid:!1}:{disabled:!0,invalid:!0}}function iw(e,t,n){let r=0;try{r=e.resetToken(t)}catch{r=0}let i=(0,y.useRef)(r),a=(0,y.useRef)(n);a.current=n,(0,y.useEffect)(()=>{i.current!==r&&(i.current=r,a.current())},[r])}function aw({message:e}){let t=sy();return(0,$.jsx)(`span`,{className:`local-error`,role:`alert`,children:e??t(`Cannot compute`,`无法计算`)})}var ow=class extends y.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidUpdate(e){this.state.failed&&e.revision!==this.props.revision&&this.setState({failed:!1})}render(){return this.state.failed?(0,$.jsx)(aw,{}):this.props.children}},sw=new Set([`table`,`chart`,`plot`,`timeline`,`diagram`]);function cw(e,t,n){if(!e)return null;let r=e.trim();if(!r)return null;let i=r.replace(/[\u0000- ]+/g,``),a=/^([a-z][a-z0-9+.-]*):/i.exec(i);if(a){let e=a[1].toLowerCase();if(!(t===`image`?e===`http`||e===`https`:e===`http`||e===`https`||e===`mailto`||e===`tel`))return null}if(!n)return t===`image`?null:r;try{return n(r,t)?r:null}catch{return null}}function lw(e){return`h${Math.min(6,Math.max(1,e??1))}`}var uw=/^(?:aria|data)-[a-z0-9_.:-]+$/,dw=new Set([`aria-labelledby`,`aria-describedby`,`aria-controls`,`aria-owns`,`aria-details`,`aria-errormessage`,`aria-flowto`,`aria-activedescendant`]);function fw(e,t){let n=t.attrs;if(!n)return{};let r={},i=e.anchors.ids.get(t)??e.anchors.htmlIds.get(t);i&&(r.id=i);for(let[t,i]of Object.entries(n)){let n=t.toLowerCase();if(n!==`id`){if(n===`title`||n===`lang`)r[n]=i;else if(n===`dir`){let e=i.trim().toLowerCase();(e===`ltr`||e===`rtl`||e===`auto`)&&(r.dir=e)}else uw.test(n)&&(r[n]=dw.has(n)?i.trim().split(/\s+/).filter(Boolean).map(t=>e.anchors.referenceId(t)).join(` `):i)}}return r}function pw(e,t){if(e.node!==t.node||e.visible!==t.visible||e.resetToken!==t.resetToken||e.env!==t.env||e.depValues===null||t.depValues===null||e.depValues.length!==t.depValues.length)return!1;for(let n=0;n<e.depValues.length;n+=1)if(!Object.is(e.depValues[n],t.depValues[n]))return!1;return!0}var mw=(0,y.memo)(function({node:e,index:t,visible:n,env:r}){return bw(r,e,t,n,!0)},pw);function hw(e,t,n,r=!0){if(!t||t.length===0)return null;if(!r)return t.map((t,r)=>bw(e,t,r,n,!1));let i=null,a=null;try{i=e.runtime.snapshot().state,a=Vn(e.runtime)}catch{i=null}let o=i;return t.map((t,r)=>{let i=e.dependencies.get(t.id),s=i==null||o===null||a===null?null:i.map(e=>o[e]),c=a?.get(t.id)??0;return(0,$.jsx)(mw,{node:t,index:r,visible:n,env:e,depValues:s,resetToken:c},t.id||`${t.type}-${r}`)})}function gw(e,t){if(typeof t.value==`string`)return t.value;let{start:n,end:r}=t.range;return Number.isInteger(n)&&Number.isInteger(r)&&n>=0&&r>=n?e.runtime.document.source.slice(n,r):``}function _w(e,t,n,r){return(0,$.jsx)(`span`,{className:r?`local-fallback local-fallback-block`:`local-fallback local-fallback-inline`,title:e.t(`Unsupported syntax shown as source`,`未支持的语法,已按源码原样显示`),"data-local-fallback":``,children:gw(e,t)},n)}function vw(e,t,n){return!t||t.length===0?null:t.map((t,r)=>t.type===`paragraph`||t.type===`root`?(0,$.jsx)(`span`,{children:hw(e,t.children,n,!1)},t.id||`inline-${r}`):bw(e,t,r,n,!1))}function yw(e,t,n){let r=e.footnotes.siteFor(t);if(!r||!r.entry){let i=r?.label||wh(t)||`?`;return(0,$.jsx)(`span`,{className:`local-footnote-missing`,title:e.t(`Undefined footnote`,`未定义的脚注`),"data-local-footnote-missing":``,children:`[^${i}]`},n)}let i=r.entry;return(0,$.jsx)(`sup`,{className:`local-footnote-ref`,children:(0,$.jsx)(`a`,{id:r.id,href:`#${i.id}`,className:`local-footnote-ref-link`,role:`doc-noteref`,"data-local-footnote-number":i.number,"aria-label":e.t(`Footnote ${i.number}`,`脚注 ${i.number}`),children:i.number})},n)}function bw(e,t,n,r,i=!0){let a=t.id||`${t.type}-${n}`;if(t.type===`component`)return(0,$.jsx)(ow,{revision:FC(e.runtime),children:Sw(t,r,e.runtime,e.t)},a);switch(t.type){case`root`:return(0,$.jsx)(`div`,{children:hw(e,t.children,r)},a);case`heading`:return(0,y.createElement)(lw(t.depth),{key:a,id:e.anchors.ids.get(t),...fw(e,t)},hw(e,t.children,r,!1));case`paragraph`:return(0,$.jsx)(`p`,{...fw(e,t),children:hw(e,t.children,r,!1)},a);case`text`:return(0,$.jsx)(`span`,{children:t.value??``},a);case`emphasis`:return(0,$.jsx)(`em`,{...fw(e,t),children:hw(e,t.children,r,!1)},a);case`strong`:return(0,$.jsx)(`strong`,{...fw(e,t),children:hw(e,t.children,r,!1)},a);case`delete`:return(0,$.jsx)(`del`,{...fw(e,t),children:hw(e,t.children,r,!1)},a);case`underline`:return(0,$.jsx)(`u`,{...fw(e,t),children:hw(e,t.children,r,!1)},a);case`mark`:return(0,$.jsx)(`mark`,{...fw(e,t),children:hw(e,t.children,r,!1)},a);case`sup`:return(0,$.jsx)(`sup`,{...fw(e,t),children:hw(e,t.children,r,!1)},a);case`sub`:return(0,$.jsx)(`sub`,{...fw(e,t),children:hw(e,t.children,r,!1)},a);case`span`:return(0,$.jsx)(`span`,{...fw(e,t),children:hw(e,t.children,r,!1)},a);case`div`:return(0,$.jsx)(`div`,{...fw(e,t),children:hw(e,t.children,r)},a);case`summary`:return(0,$.jsx)(`span`,{...fw(e,t),children:hw(e,t.children,r,!1)},a);case`details`:return(0,$.jsx)(rT,{node:t,visible:r},a);case`inlineCode`:return(0,$.jsx)(`code`,{className:`md-inline-code`,...fw(e,t),children:t.value??``},a);case`code`:return(0,$.jsx)(fC,{value:t.value??``,language:t.lang??void 0,mode:e.mode,htmlProps:fw(e,t)},a);case`blockquote`:return(0,$.jsx)(`blockquote`,{...fw(e,t),children:hw(e,t.children,r)},a);case`break`:return(0,$.jsx)(`br`,{...fw(e,t)},a);case`thematicBreak`:return(0,$.jsx)(`hr`,{...fw(e,t)},a);case`list`:return t.ordered?(0,$.jsx)(`ol`,{start:t.start??1,className:`md-list`,...fw(e,t),children:hw(e,t.children,r)},a):(0,$.jsx)(`ul`,{className:`md-list`,...fw(e,t),children:hw(e,t.children,r)},a);case`listItem`:{let n=typeof t.checked==`boolean`;return(0,$.jsxs)(`li`,{className:n?`md-list-item md-task-item`:`md-list-item`,...fw(e,t),children:[n?e.mode===`static`?(0,$.jsx)(`span`,{className:`md-task-marker`,role:`img`,"aria-label":t.checked?e.t(`Completed`,`已完成`):e.t(`Not completed`,`未完成`),children:t.checked?`✓`:`☐`}):(0,$.jsx)(`input`,{type:`checkbox`,className:`md-task-checkbox`,checked:t.checked===!0,readOnly:!0,tabIndex:-1,"aria-label":t.checked?e.t(`Completed`,`已完成`):e.t(`Not completed`,`未完成`)}):null,hw(e,t.children,r)]},a)}case`link`:{let n=cw(t.url,`link`,e.urlPolicy);if(!n)return(0,y.createElement)(`span`,{...fw(e,t),className:`md-link-rejected`,key:a,title:e.t(`Unsafe link URL rejected`,`已拒绝不安全的链接地址`)},hw(e,t.children,r,!1));let i=e.anchors.resolve(n),o=/^https?:/i.test(i);return(0,$.jsx)(`a`,{...fw(e,t),href:i,title:t.title??void 0,target:o?`_blank`:void 0,rel:o?`noopener noreferrer`:void 0,children:hw(e,t.children,r,!1)},a)}case`image`:{let n=cw(t.url,`image`,e.urlPolicy),r=n;if(n&&e.imageResolver)try{let t=e.imageResolver(n);r=typeof t==`string`&&t.trim()!==``?t:null}catch{r=null}if(!r){let n=e.t(`Unsafe image rejected`,`已拒绝不安全的图片`),r=t.alt?e.t(`: ${t.alt}`,`:${t.alt}`):``;return(0,$.jsxs)(`span`,{className:`md-image-rejected`,...fw(e,t),children:[`[`,n,r,`]`]},a)}return(0,$.jsx)(mC,{src:r,alt:t.alt??``,title:t.title??void 0,mode:e.mode,rootRef:e.rootRef,imageProps:t.attrs===void 0?void 0:{...fw(e,t),width:t.width,height:t.height}},a)}case`table`:{let[n,...i]=t.children??[];return(0,$.jsx)(`div`,{className:`md-table-scroll`,children:(0,$.jsxs)(`table`,{className:`md-table`,children:[n?(0,$.jsx)(`thead`,{children:(0,$.jsx)(`tr`,{children:xw(e,n,`th`,t.align,r)})}):null,i.length?(0,$.jsx)(`tbody`,{children:i.map((n,i)=>(0,$.jsx)(`tr`,{children:xw(e,n,`td`,t.align,r)},n.id||`${a}-row-${i}`))}):null]})},a)}case`tableRow`:return(0,$.jsx)(`tr`,{children:xw(e,t,`td`,void 0,r)},a);case`tableCell`:{let n=t.align?.[0]??void 0;return(0,$.jsx)(`td`,{style:{textAlign:n??void 0},children:hw(e,t.children,r,!1)},a)}case`interpolation`:try{let n=AC(e.runtime.evaluate(t.value??``));if(n===null)throw Error(`Cannot display an array`);return(0,$.jsx)(`span`,{className:`local-interpolation`,children:n},a)}catch{return(0,$.jsx)(aw,{},a)}case`math`:case`inlineMath`:{let n=t.type===`math`;return(0,$.jsx)(`span`,{className:n?`local-math-display`:`local-math-inline`,children:(0,$.jsx)(ow,{revision:FC(e.runtime),children:(0,$.jsx)(ey,{source:t.value??``,display:n})})},a)}case`html`:return(0,$.jsx)(`span`,{className:`md-raw-html`,children:t.value??``},a);case`fallback`:return _w(e,t,a,i);case`footnoteReference`:return yw(e,t,a);case`footnoteDefinition`:return null;case`comment`:case`definition`:return null;default:return t.children&&t.children.length?(0,$.jsx)(`span`,{children:hw(e,t.children,r,i)},a):typeof t.value==`string`?(0,$.jsx)(`span`,{children:t.value},a):null}}function xw(e,t,n,r,i){return(t.children??[]).map((a,o)=>{let s=a.align?.[0]??t.align?.[o]??r?.[o]??void 0;return n===`th`?(0,$.jsx)(`th`,{style:{textAlign:s??void 0},children:hw(e,a.children,i,!1)},a.id||`${t.id}-h-${o}`):(0,$.jsx)(`td`,{style:{textAlign:s??void 0},children:hw(e,a.children,i,!1)},a.id||`${t.id}-c-${o}`)})}function Sw(e,t,n,r){let i=e.name??``;if(i===`computed`||i===`const`)return null;if(i===`data-table`)return(0,$.jsx)(Bb,{node:e,visible:t,runtime:n,t:r});if(sw.has(i))return(0,$.jsx)(Cw,{node:e,visible:t});let a=xT[i];return a?(0,$.jsx)(a,{node:e,visible:t}):(0,$.jsxs)(`span`,{className:`component-error`,children:[r(`Unknown component "`,`未知组件“`),i||r(`(missing name)`,`(缺少名称)`),r(`"`,`”`)]})}function Cw({node:e,visible:t}){let{runtime:n,render:r,mode:i}=gC(),a=sy(),o=TC(e),s=(0,$.jsx)(Db,{node:e,runtime:n,render:r,visible:t,mode:i});if(!n.document.validations?.some(t=>t.fields.some(t=>Object.hasOwn(n.document.bindings,t)&&n.document.bindings[t].nodeIds.includes(e.id))))return s;let c=jC(n,e,`label`,jC(n,e,`title`,a(`Selection`,`选择`),a),a);return(0,$.jsx)(`div`,{role:`group`,"aria-label":c,"aria-invalid":o.invalid||void 0,"aria-describedby":o.describedBy,children:s})}function ww({node:e,visible:t}){let{validation:n}=gC(),r=n.hintFor(e);if(!r)return null;let i=r.failed||r.error,a=t&&i;return(0,$.jsx)(`span`,{id:r.id,className:`local-validation-hint`,"data-local-validation":r.error?`error`:r.failed?`failed`:`passed`,role:a?`status`:void 0,"aria-live":a?`polite`:void 0,children:i?r.message:null})}function Tw(){return null}function Ew({message:e}){return e?(0,$.jsx)(`span`,{className:`field-error`,role:`alert`,children:e}):null}function Dw(e,t,n=ny){if(t.required&&e.length===0)return n(`This field is required`,`请填写此字段`);if(e.length>1e5)return n(`At most ${w} characters`,`最多允许 ${w} 个字符`);if(t.email&&e!==``&&!N(e))return n(`Enter a valid email address`,`请输入有效的邮箱地址`);let r=tt(e);return t.minLength!==void 0&&t.minLength>0&&e!==``&&r<t.minLength?n(`At least ${t.minLength} characters`,`至少需要 ${t.minLength} 个字符`):t.maxLength!==void 0&&t.maxLength>=0&&r>t.maxLength?n(`At most ${t.maxLength} characters`,`最多允许 ${t.maxLength} 个字符`):null}function Ow({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=gC(),i=sy(),{write:a,error:o,setError:s}=nw(e),c=jC(n,e,`label`,e.name??i(`Input`,`输入`),i),l=jC(n,e,`placeholder`,``,i),u=(OC(e,`type`)??`text`)===`email`,d=NC(n,e,`required`,!1),{disabled:f,invalid:p}=rw(e),m=TC(e),h=OC(e,`min-length`),g=OC(e,`max-length`),_=h===void 0?void 0:Math.max(0,Math.floor(IC(n,e,`min-length`,0))),v=g===void 0?void 0:Math.max(0,Math.floor(IC(n,e,`max-length`,0))),b=RC(LC(n,e)),[x,S]=(0,y.useState)(b),[C,w]=(0,y.useState)(!1),[T,E]=(0,y.useState)(!1),[D,O]=(0,y.useState)(null),k=(0,y.useRef)(!1),A=(0,y.useRef)(b),j=(0,y.useRef)(b);if(j.current=b,(0,y.useEffect)(()=>{A.current!==b&&(A.current=b,!C&&!k.current&&S(b))},[b,C]),iw(n,e,()=>{k.current=!1,S(j.current),E(!1),O(null),s(null)}),r===`static`)return(0,$.jsx)(VC,{className:`local-input${u?` local-input-email`:``}`,label:c,value:BC(b)});let M=e=>Dw(e,{required:d,minLength:_,maxLength:v,email:u},i);return(0,$.jsxs)(`div`,{className:`md-control local-input${u?` local-input-email`:``}`,children:[(0,$.jsx)(`label`,{className:`md-label`,htmlFor:`${t}-input`,children:c}),(0,$.jsx)(`input`,{id:`${t}-input`,className:`md-text-input`,type:u?`email`:`text`,value:x,placeholder:l||void 0,disabled:f,required:d,"aria-invalid":D||o||m.invalid?!0:void 0,"aria-describedby":m.describedBy,onFocus:()=>w(!0),onBlur:()=>{w(!1),E(!0);let e=M(x);O(e),!e&&x!==b&&a(x)},onChange:e=>{let t=e.target.value;S(t),s(null),T&&O(M(t)),!k.current&&M(t)===null&&a(t)},onCompositionStart:()=>{k.current=!0},onCompositionEnd:e=>{k.current=!1;let t=e.currentTarget.value;S(t),T&&O(M(t)),M(t)===null&&a(t)}}),(0,$.jsx)(HC,{value:BC(b)}),(0,$.jsx)(Ew,{message:p?i(`Cannot compute`,`无法计算`):D??o})]})}function kw({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=gC(),i=sy(),{write:a,error:o,setError:s}=nw(e),c=jC(n,e,`label`,i(`Text`,`文本`),i),l=jC(n,e,`placeholder`,``,i),u=Math.min(40,Math.max(1,Math.floor(IC(n,e,`rows`,4)))),d=NC(n,e,`required`,!1),{disabled:f,invalid:p}=rw(e),m=TC(e),h=OC(e,`min-length`),g=OC(e,`max-length`),_=h===void 0?void 0:Math.max(0,Math.floor(IC(n,e,`min-length`,0))),v=g===void 0?void 0:Math.max(0,Math.floor(IC(n,e,`max-length`,0))),b=RC(LC(n,e)),[x,S]=(0,y.useState)(b),[C,w]=(0,y.useState)(!1),[T,E]=(0,y.useState)(!1),[D,O]=(0,y.useState)(null),k=(0,y.useRef)(!1),A=(0,y.useRef)(b),j=(0,y.useRef)(b);if(j.current=b,(0,y.useEffect)(()=>{A.current!==b&&(A.current=b,!C&&!k.current&&S(b))},[b,C]),iw(n,e,()=>{k.current=!1,S(j.current),E(!1),O(null),s(null)}),r===`static`)return(0,$.jsx)(VC,{className:`local-textarea`,label:c,value:BC(b),multiline:!0});let M=e=>Dw(e,{required:d,minLength:_,maxLength:v},i);return(0,$.jsxs)(`div`,{className:`md-control local-textarea`,children:[(0,$.jsx)(`label`,{className:`md-label`,htmlFor:`${t}-textarea`,children:c}),(0,$.jsx)(`textarea`,{id:`${t}-textarea`,className:`md-text-input`,rows:u,value:x,placeholder:l||void 0,disabled:f,required:d,"aria-invalid":D||o||m.invalid?!0:void 0,"aria-describedby":m.describedBy,onFocus:()=>w(!0),onBlur:()=>{w(!1),E(!0);let e=M(x);O(e),!e&&x!==b&&a(x)},onChange:e=>{let t=e.target.value;S(t),s(null),T&&O(M(t)),!k.current&&M(t)===null&&a(t)},onCompositionStart:()=>{k.current=!0},onCompositionEnd:e=>{k.current=!1;let t=e.currentTarget.value;S(t),T&&O(M(t)),M(t)===null&&a(t)}}),(0,$.jsx)(HC,{value:BC(b),block:!0}),(0,$.jsx)(Ew,{message:p?i(`Cannot compute`,`无法计算`):D??o})]})}function Aw(e){let t=e.trim();if(t===``||t===`-`||t===`+`||t===`.`||t===`-.`)return{kind:`empty`};let n=Number(t);return Number.isFinite(n)?{kind:`valid`,value:n}:{kind:`invalid`}}function jw(e,t,n,r,i=ny){let a=1e-9*Math.max(1,Math.abs(e));if(t!==void 0&&e<t-a)return i(`Must be at least ${t}`,`不能小于 ${t}`);if(n!==void 0&&e>n+a)return i(`Must be at most ${n}`,`不能大于 ${n}`);if(!Number.isFinite(r)||r<=0)return i(`Step must be greater than 0`,`步长必须大于 0`);let o=(e-(t??0))/r;return Math.abs(o-Math.round(o))>1e-9*Math.max(1,Math.abs(o))?i(`Must be a multiple of ${r}`,`需要按步长 ${r} 取值`):null}function Mw({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=gC(),i=sy(),{write:a,error:o,setError:s}=nw(e),c=jC(n,e,`label`,i(`Number`,`数字`),i),{disabled:l,invalid:u}=rw(e),d=TC(e),f=OC(e,`min`)!==void 0,p=OC(e,`max`)!==void 0,m=f?IC(n,e,`min`,0):void 0,h=p?IC(n,e,`max`,0):void 0,g=IC(n,e,`step`,1),_=LC(n,e),v=typeof _==`number`&&Number.isFinite(_)?String(_):``,[b,x]=(0,y.useState)(v),[S,C]=(0,y.useState)(!1),[w,T]=(0,y.useState)(!1),[E,D]=(0,y.useState)(null),O=(0,y.useRef)(!1),k=(0,y.useRef)(v),A=(0,y.useRef)(v);A.current=v,(0,y.useEffect)(()=>{k.current!==v&&(k.current=v,!S&&!O.current&&x(v))},[v,S]),iw(n,e,()=>{O.current=!1,x(A.current),T(!1),D(null),s(null)});let j=(0,$.jsxs)($.Fragment,{children:[m===void 0?``:i(`Min ${m}`,`最小 ${m}`),m!==void 0&&h!==void 0?` · `:``,h===void 0?``:i(`Max ${h}`,`最大 ${h}`),g===void 0?``:i(` · Step ${g}`,` · 步长 ${g}`)]});if(r===`static`)return(0,$.jsx)(VC,{className:`local-number`,label:c,value:BC(v),hint:j});let M=(e,t)=>{let n=Aw(e);if(n.kind!==`valid`)return t&&D(i(`Enter a valid number`,`请输入有效数字`)),!1;let r=jw(n.value,m,h,g,i);return r?(t&&D(r),!1):(D(null),a(n.value))};return(0,$.jsxs)(`div`,{className:`md-control local-number`,children:[(0,$.jsx)(`label`,{className:`md-label`,htmlFor:`${t}-number`,children:c}),(0,$.jsx)(`input`,{id:`${t}-number`,className:`md-text-input`,type:`text`,inputMode:`decimal`,value:b,disabled:l,"aria-invalid":E||o||d.invalid?!0:void 0,"aria-describedby":d.describedBy,onFocus:()=>C(!0),onBlur:()=>{C(!1),T(!0),M(b,!0)},onChange:e=>{let t=e.target.value;x(t),s(null),O.current||M(t,w)},onCompositionStart:()=>{O.current=!0},onCompositionEnd:e=>{O.current=!1,M(e.currentTarget.value,w)}}),(0,$.jsx)(HC,{value:BC(v)}),m!==void 0||h!==void 0||g!==void 0?(0,$.jsx)(`span`,{className:`md-hint`,children:j}):null,(0,$.jsx)(Ew,{message:u?i(`Cannot compute`,`无法计算`):E??o})]})}function Nw({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=gC(),i=sy(),{write:a,error:o}=nw(e),s=jC(n,e,`label`,i(`Slider`,`滑块`),i),{disabled:c,invalid:l}=rw(e),u=TC(e),d=IC(n,e,`min`,0),f=IC(n,e,`max`,100),p=IC(n,e,`step`,1),m=LC(n,e),h=Math.min(f,Math.max(d,typeof m==`number`&&Number.isFinite(m)?m:d));return r===`static`?(0,$.jsx)(VC,{className:`md-slider local-slider`,label:s,value:String(h)}):(0,$.jsxs)(`div`,{className:`md-control md-slider local-slider`,style:WC(UC(e)),children:[(0,$.jsxs)(`label`,{className:`md-label`,htmlFor:`${t}-slider`,children:[(0,$.jsx)(`span`,{children:s}),(0,$.jsx)(`span`,{className:`md-slider-value`,"aria-hidden":`true`,children:h})]}),(0,$.jsx)(`input`,{id:`${t}-slider`,type:`range`,min:d,max:f,step:p,value:h,disabled:c,"aria-invalid":u.invalid||void 0,"aria-describedby":u.describedBy,onChange:e=>a(Number(e.target.value))}),(0,$.jsx)(HC,{value:String(h)}),(0,$.jsx)(Ew,{message:l?i(`Cannot compute`,`无法计算`):o})]})}function Pw({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=gC(),i=sy(),{write:a,error:o}=nw(e),s=jC(n,e,`label`,i(`Toggle`,`开关`),i),{disabled:c,invalid:l}=rw(e),u=TC(e),d=LC(n,e)===!0,f=d?i(`On`,`开`):i(`Off`,`关`);return r===`static`?(0,$.jsx)(VC,{className:`md-toggle local-toggle`,label:s,value:f}):(0,$.jsxs)(`div`,{className:`md-control md-toggle local-toggle`,style:WC(UC(e)),children:[(0,$.jsxs)(`label`,{className:`md-toggle-label`,htmlFor:`${t}-toggle`,children:[(0,$.jsx)(`input`,{id:`${t}-toggle`,type:`checkbox`,checked:d,disabled:c,"aria-invalid":u.invalid||void 0,"aria-describedby":u.describedBy,onChange:e=>a(e.target.checked)}),(0,$.jsx)(`span`,{children:s})]}),(0,$.jsx)(HC,{value:f}),(0,$.jsx)(Ew,{message:l?i(`Cannot compute`,`无法计算`):o})]})}function Fw({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=gC(),i=sy(),{write:a,error:o}=nw(e),s=jC(n,e,`label`,i(`Checkbox`,`勾选`),i),{disabled:c,invalid:l}=rw(e),u=TC(e),d=LC(n,e)===!0,f=d?i(`Checked`,`已勾选`):i(`Unchecked`,`未勾选`);return r===`static`?(0,$.jsx)(VC,{className:`local-checkbox`,label:s,value:f}):(0,$.jsxs)(`div`,{className:`md-control local-checkbox`,style:WC(UC(e)),children:[(0,$.jsxs)(`label`,{className:`md-toggle-label`,htmlFor:`${t}-checkbox`,children:[(0,$.jsx)(`input`,{id:`${t}-checkbox`,type:`checkbox`,checked:d,disabled:c,"aria-invalid":u.invalid||void 0,"aria-describedby":u.describedBy,onChange:e=>a(e.target.checked)}),(0,$.jsx)(`span`,{children:s})]}),(0,$.jsx)(HC,{value:f}),(0,$.jsx)(Ew,{message:l?i(`Cannot compute`,`无法计算`):o})]})}function Iw({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=gC(),i=sy(),{write:a,error:o}=nw(e),s=jC(n,e,`label`,i(`Date`,`日期`),i),{disabled:c,invalid:l}=rw(e),u=TC(e),d=NC(n,e,`required`,!1),f=jC(n,e,`min`,``,i),p=jC(n,e,`max`,``,i),m=LC(n,e),h=typeof m==`string`?m:``,[g,_]=(0,y.useState)(!1),v=g&&d&&h===``?i(`Select a date`,`请选择日期`):null;return r===`static`?(0,$.jsx)(VC,{className:`local-date`,label:s,value:BC(h)}):(0,$.jsxs)(`div`,{className:`md-control local-date`,children:[(0,$.jsx)(`label`,{className:`md-label`,htmlFor:`${t}-date`,children:s}),(0,$.jsx)(`input`,{id:`${t}-date`,className:`md-text-input`,type:`date`,value:h,min:f||void 0,max:p||void 0,required:d,disabled:c,"aria-invalid":v||o||u.invalid?!0:void 0,"aria-describedby":u.describedBy,onBlur:()=>_(!0),onChange:e=>{_(!0),a(e.target.value)}}),(0,$.jsx)(HC,{value:BC(h)}),(0,$.jsx)(Ew,{message:l?i(`Cannot compute`,`无法计算`):v??o})]})}function Lw(e){return(e.children??[]).filter(e=>e.type===`component`&&e.name===`option`).map((e,t)=>({value:OC(e,`value`)??`option-${t+1}`,node:e}))}function Rw(e,t,n=ny){if(!t)return``;let r=``;for(let i of t)if(i.type===`text`||i.type===`inlineCode`)r+=i.value??``;else if(i.type===`fallback`)r+=i.value??``;else if(i.type===`interpolation`)try{r+=AC(e.evaluate(i.value??``))??``}catch{r+=n(`Cannot compute`,`无法计算`)}else i.type===`break`?r+=` `:r+=Rw(e,i.children,n);return r}function zw(e,t,n=ny){return Rw(e,t.children,n)||OC(t,`value`)||``}function Bw(){return null}function Vw({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=gC(),i=sy(),{write:a,error:o}=nw(e),s=jC(n,e,`label`,i(`Select`,`选择`),i),{disabled:c,invalid:l}=rw(e),u=TC(e),d=Lw(e),f=LC(n,e),p=typeof f==`string`?f:``,m=d.some(e=>e.value===p)?p:d[0]?.value??``,h=d.find(e=>e.value===m),g=h?zw(n,h.node,i)||m:``;return d.length===0?(0,$.jsx)(aw,{message:i(`Missing options`,`缺少选项`)}):r===`static`?(0,$.jsx)(VC,{className:`md-select local-select`,label:s,value:BC(g)}):(0,$.jsxs)(`div`,{className:`md-control md-select local-select`,style:WC(UC(e)),children:[(0,$.jsx)(`label`,{className:`md-label`,htmlFor:`${t}-select`,children:s}),(0,$.jsx)(`select`,{id:`${t}-select`,className:`md-select-input`,value:m,disabled:c,"aria-invalid":u.invalid||void 0,"aria-describedby":u.describedBy,onChange:e=>a(e.target.value),children:d.map(e=>(0,$.jsx)(`option`,{value:e.value,children:zw(n,e.node,i)||e.value},e.node.id))}),(0,$.jsx)(HC,{value:BC(g)}),(0,$.jsx)(Ew,{message:l?i(`Cannot compute`,`无法计算`):o})]})}function Hw({node:e,visible:t}){let n=(0,y.useId)(),r=gC(),{runtime:i,mode:a}=r,o=sy(),{write:s,error:c}=nw(e),l=jC(i,e,`label`,o(`Options`,`选项`),o),{disabled:u,invalid:d}=rw(e),f=TC(e),p=Lw(e),m=LC(i,e),h=typeof m==`string`?m:``,g=p.findIndex(e=>e.value===h),_=g>=0?g:0,v=g>=0?p[g]:void 0,b=v?zw(i,v.node,o):``,x=(0,y.useRef)([]);if(p.length===0)return(0,$.jsx)(aw,{message:o(`Missing options`,`缺少选项`)});if(a===`static`)return(0,$.jsx)(VC,{className:`local-choices`,label:l,value:BC(b)});let S=e=>{let t=p[e];t&&(s(t.value),x.current[e]?.focus())},C=(e,t)=>{let n=-1;e.key===`ArrowRight`||e.key===`ArrowDown`?n=(t+1)%p.length:e.key===`ArrowLeft`||e.key===`ArrowUp`?n=(t-1+p.length)%p.length:e.key===`Home`?n=0:e.key===`End`&&(n=p.length-1),!(n<0)&&(e.preventDefault(),S(n))};return(0,$.jsxs)(`div`,{className:`md-control local-choices`,style:WC(UC(e)),children:[(0,$.jsx)(`span`,{className:`md-label`,id:`${n}-choices-label`,children:l}),(0,$.jsx)(`div`,{className:`local-choice-list`,role:`radiogroup`,"aria-labelledby":`${n}-choices-label`,"aria-disabled":u||void 0,"aria-invalid":f.invalid||void 0,"aria-describedby":f.describedBy,children:p.map((e,n)=>{let i=e.value===h;return(0,$.jsx)(`button`,{ref:e=>{x.current[n]=e},type:`button`,role:`radio`,"aria-checked":i,tabIndex:n===_?0:-1,disabled:u,className:`local-choice${i?` is-selected`:``}`,onClick:()=>s(e.value),onKeyDown:e=>C(e,n),children:vw(r,e.node.children,t)},e.node.id)})}),(0,$.jsx)(HC,{value:BC(b)}),(0,$.jsx)(Ew,{message:d?o(`Cannot compute`,`无法计算`):c})]})}function Uw({node:e,visible:t}){let n=(0,y.useId)(),r=gC(),{runtime:i,mode:a}=r,o=sy(),{write:s,error:c}=nw(e),l=jC(i,e,`label`,o(`Options`,`选项`),o),{disabled:u,invalid:d}=rw(e),f=TC(e),p=Lw(e),m=LC(i,e),h=typeof m==`string`?m:``,g=n,_=p.find(e=>e.value===h),v=_?zw(i,_.node,o):``;return p.length===0?(0,$.jsx)(aw,{message:o(`Missing options`,`缺少选项`)}):a===`static`?(0,$.jsx)(VC,{className:`local-radio-group`,label:l,value:BC(v)}):(0,$.jsxs)(`fieldset`,{className:`md-control local-radio-group`,style:WC(UC(e)),disabled:u,"aria-invalid":f.invalid||void 0,"aria-describedby":f.describedBy,children:[(0,$.jsx)(`legend`,{className:`md-label`,children:l}),p.map(e=>(0,$.jsxs)(`label`,{className:`local-radio-option`,children:[(0,$.jsx)(`input`,{type:`radio`,name:g,value:e.value,checked:h===e.value,onChange:()=>s(e.value)}),(0,$.jsx)(`span`,{children:vw(r,e.node.children,t)})]},e.node.id)),(0,$.jsx)(HC,{value:BC(v)}),(0,$.jsx)(Ew,{message:d?o(`Cannot compute`,`无法计算`):c})]})}function Ww(e){return((e.children??[]).find(e=>e.type===`list`)?.children??[]).filter(e=>e.type===`listItem`).map((e,t)=>({id:`item-${t+1}`,node:e}))}function Gw({node:e,visible:t}){let n=(0,y.useId)(),r=gC(),{runtime:i,mode:a}=r,o=sy(),{write:s,error:c}=nw(e),l=jC(i,e,`label`,o(`Checklist`,`清单`),o),{disabled:u,invalid:d}=rw(e),f=TC(e),p=Ww(e),m=LC(i,e),h=Array.isArray(m)?m.filter(e=>typeof e==`string`):[];if(p.length===0)return(0,$.jsx)(aw,{message:o(`Checklist requires a task list`,`清单需要任务列表`)});let g=e=>e?o(`Checked`,`已勾选`):o(`Unchecked`,`未勾选`);if(a===`static`)return(0,$.jsxs)(`div`,{className:`local-checklist local-static-checklist`,style:WC(UC(e)),role:`group`,"aria-label":l,children:[(0,$.jsx)(`span`,{className:`md-label`,children:l}),(0,$.jsx)(`ul`,{className:`local-static-list`,children:p.map(e=>{let n=h.includes(e.id);return(0,$.jsxs)(`li`,{className:`local-static-list-item`,children:[(0,$.jsx)(`span`,{className:`local-static-state`,children:g(n)}),(0,$.jsx)(`span`,{className:`local-static-item${n?` is-checked`:``}`,children:vw(r,e.node.children,t)})]},e.id)})})]});let _=(e,t)=>{let n=new Set(h);t?n.add(e):n.delete(e),s(p.filter(e=>n.has(e.id)).map(e=>e.id))};return(0,$.jsxs)(`fieldset`,{className:`local-checklist`,style:WC(UC(e)),disabled:u,"aria-invalid":f.invalid||void 0,"aria-describedby":f.describedBy,children:[(0,$.jsx)(`legend`,{className:`md-label`,children:l}),p.map(e=>{let i=h.includes(e.id);return(0,$.jsxs)(`div`,{className:`local-checklist-item`,children:[(0,$.jsx)(`input`,{id:`${n}-${e.id}`,type:`checkbox`,checked:i,onChange:t=>_(e.id,t.target.checked)}),(0,$.jsx)(`label`,{className:`local-checklist-text${i?` is-checked`:``}`,htmlFor:`${n}-${e.id}`,children:vw(r,e.node.children,t)})]},e.id)}),(0,$.jsx)(HC,{block:!0,value:(0,$.jsx)(`ul`,{className:`local-static-list`,children:p.map(e=>{let t=h.includes(e.id);return(0,$.jsxs)(`li`,{className:`local-static-list-item`,children:[(0,$.jsx)(`span`,{className:`local-static-state`,children:g(t)}),(0,$.jsx)(`span`,{className:`local-static-item${t?` is-checked`:``}`,children:Rw(i,e.node.children,o)})]},e.id)})})}),(0,$.jsx)(Ew,{message:d?o(`Cannot compute`,`无法计算`):c})]})}function Kw(e,t=ny){let n=Math.max(0,Math.floor(e)),r=Math.floor(n/60),i=n%60;return r===0?t(`${i} seconds`,`${i} 秒`):`${r}:${String(i).padStart(2,`0`)}`}function qw({node:e}){let{runtime:t,mode:n}=gC(),r=sy(),{write:i,error:a}=nw(e),o=jC(t,e,`label`,r(`Counter`,`计数`),r),{disabled:s,invalid:c}=rw(e),l=TC(e),u=IC(t,e,`min`,0),d=OC(e,`max`)===void 0?void 0:IC(t,e,`max`,0),f=IC(t,e,`step`,1),p=LC(t,e),m=typeof p==`number`&&Number.isFinite(p)?p:u,h=Number.isFinite(f)&&f>0?f:1,g=1e-9*Math.max(1,Math.abs(m)),_=m-h>=u-g,v=d===void 0||m+h<=d+g;if(n===`static`)return(0,$.jsx)(VC,{className:`local-counter`,label:o,value:String(m)});let y=e=>{let t=Number((m+e*h).toFixed(12));i(t)};return(0,$.jsxs)(`div`,{className:`local-counter`,role:`group`,"aria-label":o,"aria-invalid":l.invalid||void 0,"aria-describedby":l.describedBy,children:[(0,$.jsx)(`span`,{className:`md-label`,children:o}),(0,$.jsxs)(`div`,{className:`local-counter-row`,children:[(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-secondary local-counter-button`,"aria-label":`${o} ${r(`decrease`,`减少`)}`,disabled:s||!_,onClick:()=>y(-1),children:`−`}),(0,$.jsx)(`span`,{className:`local-counter-value`,"aria-live":`polite`,children:m}),(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-secondary local-counter-button`,"aria-label":`${o} ${r(`increase`,`增加`)}`,disabled:s||!v,onClick:()=>y(1),children:`+`}),(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-quiet local-counter-reset`,disabled:s,onClick:()=>{try{t.reset(e)}catch{}},children:r(`Reset`,`恢复初值`)})]}),(0,$.jsx)(HC,{value:String(m)}),(0,$.jsx)(Ew,{message:c?r(`Cannot compute`,`无法计算`):a})]})}function Jw({node:e,visible:t}){let{runtime:n,mode:r}=gC(),i=ay(),a=sy(),o=jC(n,e,`label`,a(`Timer`,`计时器`),a),s=TC(e),c=IC(n,e,`duration`,60),l=Math.floor(c),u=LC(n,e),d=typeof u==`number`&&Number.isFinite(u)?Math.max(0,Math.ceil(u)):l,[f,p]=(0,y.useState)(!1),[m,h]=(0,y.useState)(!1),g=(0,y.useRef)(0),_=(0,y.useRef)(d);_.current=d;let[v,b]=(0,y.useState)(null),x=(0,y.useCallback)(t=>{try{let r=n.set(e,t);r.length&&b(r.map(e=>et(e,i)).join(`; `))}catch{}},[i,e,n]);return(0,y.useEffect)(()=>{if(!f)return;let e=window.setInterval(()=>{let e=Math.max(0,Math.ceil((g.current-performance.now())/1e3));e!==_.current&&(_.current=e,x(e)),e<=0&&(p(!1),h(!0))},200);return()=>window.clearInterval(e)},[f,x]),(0,y.useEffect)(()=>{if(t||!f)return;let e=Math.max(0,Math.ceil((g.current-performance.now())/1e3));_.current=e,x(e),p(!1)},[t,f,x]),iw(n,e,()=>{p(!1),h(!1),b(null)}),!Number.isFinite(c)||l<=0?(0,$.jsx)(aw,{message:a(`Timer duration must be a positive number of seconds`,`计时时长必须是大于 0 的秒数`)}):r===`static`?(0,$.jsx)(VC,{className:`local-timer`,label:o,value:Kw(d,a)}):(0,$.jsxs)(`div`,{className:`local-timer`,role:`group`,"aria-label":o,"aria-invalid":s.invalid||void 0,"aria-describedby":s.describedBy,children:[(0,$.jsxs)(`div`,{className:`local-timer-head`,children:[(0,$.jsx)(`span`,{className:`md-label`,children:o}),(0,$.jsx)(`span`,{className:`local-timer-value`,role:`timer`,"aria-label":a(`${d} seconds remaining`,`剩余 ${d} 秒`),children:Kw(d,a)})]}),(0,$.jsxs)(`div`,{className:`local-timer-controls`,children:[(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-primary`,onClick:()=>{if(f)return;let e=d>0?d:l;d<=0&&(_.current=l,x(l)),g.current=performance.now()+e*1e3,h(!1),b(null),p(!0)},disabled:f,children:a(`Start`,`开始`)}),(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-secondary`,onClick:()=>{if(!f)return;let e=Math.max(0,Math.ceil((g.current-performance.now())/1e3));_.current=e,x(e),p(!1)},disabled:!f,children:a(`Pause`,`暂停`)}),(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-quiet`,onClick:()=>{p(!1),h(!1),b(null),_.current=l;try{n.reset(e)}catch{}},children:a(`Reset`,`重置`)})]}),(0,$.jsx)(`span`,{className:`local-timer-status`,role:`status`,"aria-live":`polite`,children:m?a(`Completed`,`计时完成`):f?a(`Running`,`计时中`):a(`Paused`,`已暂停`)}),(0,$.jsx)(HC,{value:Kw(d,a)}),(0,$.jsx)(Ew,{message:v})]})}function Yw({node:e}){let{runtime:t}=gC(),n=sy(),r=jC(t,e,`label`,n(`Progress`,`进度`),n),i=IC(t,e,`max`,100),a=kC(t,e,`value`);if(!Number.isFinite(i)||i<=0)return(0,$.jsx)(aw,{message:n(`Progress maximum must be positive`,`进度上限必须是正数`)});if(!a.present||!a.ok)return(0,$.jsx)(aw,{});let o=a.value,s=typeof o==`number`?o:typeof o==`string`&&o.trim()!==``?Number(o):NaN;if(!Number.isFinite(s))return(0,$.jsx)(aw,{});if(s<0||s>i)return(0,$.jsx)(aw,{message:n(`Progress value must be between 0 and ${i}`,`进度值需要在 0 到 ${i} 之间`)});let c=s/i*100,l=UC(e);return(0,$.jsxs)(`div`,{className:`local-progress`,style:l?{"--local-progress-color":l}:void 0,children:[(0,$.jsxs)(`div`,{className:`local-progress-head`,children:[(0,$.jsx)(`span`,{className:`md-label`,children:r}),(0,$.jsxs)(`span`,{className:`local-progress-value`,children:[Math.round(c),`%`]})]}),(0,$.jsx)(`div`,{className:`local-progress-track`,role:`progressbar`,"aria-label":r||n(`Progress`,`进度`),"aria-valuemin":0,"aria-valuemax":i,"aria-valuenow":s,children:(0,$.jsx)(`div`,{className:`local-progress-fill`,style:{width:`${c}%`}})})]})}function Xw({node:e,visible:t}){let{runtime:n,render:r,mode:i}=gC(),a=sy(),o=jC(n,e,`title`,``,a),s=NC(n,e,`reset`,!0)&&i!==`static`,[c,l]=(0,y.useState)(null);return(0,$.jsxs)(`section`,{className:`local-panel`,"aria-label":o||a(`Parameter panel`,`参数面板`),children:[o||s?(0,$.jsxs)(`div`,{className:`local-panel-head`,children:[o?(0,$.jsx)(`h3`,{className:`local-panel-title`,children:o}):(0,$.jsx)(`span`,{}),s?(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-quiet local-panel-reset`,onClick:()=>{try{n.reset(e),l(null)}catch(e){l(e instanceof Error?e.message:a(`Cannot reset`,`无法恢复默认`))}},"aria-label":o?a(`Reset ${o}`,`${o} 恢复默认`):a(`Reset`,`恢复默认`),children:a(`Reset`,`恢复默认`)}):null]}):null,(0,$.jsx)(`div`,{className:`local-panel-body`,children:r(e.children??[],t)}),(0,$.jsx)(Ew,{message:c})]})}function Zw({node:e,visible:t}){let{runtime:n,render:r}=gC(),i=jC(n,e,`title`,``,sy());return(0,$.jsxs)(`section`,{className:`md-card local-card`,children:[i?(0,$.jsx)(`h3`,{className:`md-card-title`,children:i}):null,(0,$.jsx)(`div`,{className:`md-card-body`,children:r(e.children??[],t)})]})}function Qw({node:e,visible:t}){let{runtime:n,render:r}=gC(),i=Math.min(4,Math.max(1,Math.floor(IC(n,e,`columns`,2))));return(0,$.jsx)(`div`,{className:`local-grid`,style:{"--local-grid-columns":String(i)},children:r(e.children??[],t)})}function $w({node:e,visible:t}){let{render:n}=gC();return(0,$.jsx)(`div`,{className:`local-tabpanel-body`,children:n(e.children??[],t)})}function eT(){return null}function tT({node:e,visible:t}){let n=(0,y.useId)(),{runtime:r,render:i,mode:a}=gC(),o=sy(),{write:s,error:c}=nw(e),l=jC(r,e,`label`,``,o),u=TC(e),d=(e.children??[]).filter(e=>e.type===`component`&&e.name===`tab`),f=d.map((e,t)=>OC(e,`value`)??`tab-${t+1}`),p=d.map((e,t)=>jC(r,e,`label`,f[t],o)),m=OC(e,`initial`)??f[0]??``,h=OC(e,`bind`)!==void 0,g=LC(r,e),_=typeof g==`string`?g:``,[v,b]=(0,y.useState)(()=>f.includes(m)?m:f[0]??``),x=(0,y.useRef)([]);if(iw(r,e,()=>{b(f.includes(m)?m:f[0]??``)}),d.length===0)return(0,$.jsx)(aw,{message:o(`Tabs requires at least one tab`,`标签页至少需要一个 tab`)});if(a===`static`)return(0,$.jsxs)(`section`,{className:`local-tabs local-static-tabs`,"aria-label":l||o(`Tabs`,`选项卡`),children:[l?(0,$.jsx)(`div`,{className:`local-tabs-label`,children:l}):null,d.map((e,n)=>(0,$.jsxs)(`section`,{className:`local-static-tab`,children:[(0,$.jsx)(`h4`,{className:`local-static-tab-label`,children:p[n]}),(0,$.jsx)(`div`,{className:`local-static-tab-body`,children:i(e.children??[],t)})]},e.id))]});let S=h?f.includes(_)?_:f[0]:f.includes(v)?v:f[0],C=Math.max(0,f.indexOf(S)),w=e=>{let t=f[e];t!==void 0&&(h?s(t):b(t),x.current[e]?.focus())};return(0,$.jsxs)(`section`,{className:`local-tabs`,"aria-label":l||o(`Tabs`,`选项卡`),"aria-invalid":u.invalid||void 0,"aria-describedby":u.describedBy,children:[l?(0,$.jsx)(`div`,{className:`local-tabs-label`,children:l}):null,(0,$.jsx)(`div`,{className:`local-tablist`,role:`tablist`,"aria-label":l||o(`Tabs`,`选项卡`),onKeyDown:e=>{let t=-1;e.key===`ArrowRight`?t=(C+1)%d.length:e.key===`ArrowLeft`?t=(C-1+d.length)%d.length:e.key===`Home`?t=0:e.key===`End`&&(t=d.length-1),!(t<0)&&(e.preventDefault(),w(t))},children:d.map((e,t)=>{let r=f[t],i=r===S;return(0,$.jsx)(`button`,{ref:e=>{x.current[t]=e},id:`${n}-tab-${t}`,type:`button`,role:`tab`,className:`local-tab${i?` is-selected`:``}`,"aria-selected":i,"aria-controls":`${n}-panel-${t}`,tabIndex:i?0:-1,onClick:()=>{h?s(r):b(r)},children:p[t]},e.id)})}),d.map((e,r)=>{let a=f[r]===S;return(0,$.jsxs)(`div`,{id:`${n}-panel-${r}`,className:`local-tabpanel`,role:`tabpanel`,"aria-labelledby":`${n}-tab-${r}`,tabIndex:0,hidden:!a,children:[(0,$.jsx)(HC,{block:!0,value:p[r]}),i(e.children??[],t&&a)]},e.id)}),(0,$.jsx)(Ew,{message:c})]})}function nT({node:e,visible:t}){let{runtime:n,render:r}=gC(),i=sy(),a=jC(n,e,`label`,``,i);return(0,$.jsxs)(`div`,{className:`local-accordion`,role:`group`,"aria-label":a||i(`Accordion`,`折叠面板`),children:[a?(0,$.jsx)(`div`,{className:`local-accordion-label`,children:a}):null,r(e.children??[],t)]})}function rT({node:e,visible:t}){let n=(0,y.useId)(),r=gC(),{render:i,mode:a}=r,o=sy(),s=e.children??[],c=s.find(e=>e.type===`summary`),l=s.findIndex(e=>e.type===`paragraph`&&e.children?.length===1&&e.children[0].type===`summary`),u=c??(l>=0?s[l].children[0]:void 0),d=s.filter((e,t)=>e!==u&&t!==l),f=u?(0,$.jsx)(`span`,{...fw(r,u),children:vw(r,u.children,t)}):o(`Details`,`折叠内容`),p=e.attrs!==void 0&&Object.hasOwn(e.attrs,`open`),[m,h]=(0,y.useState)(p);if(iw(r.runtime,e,()=>h(p)),a===`static`)return(0,$.jsxs)(`section`,{className:`local-disclosure local-static-disclosure local-html-details`,...fw(r,e),children:[(0,$.jsx)(`h3`,{className:`local-disclosure-heading`,children:f}),(0,$.jsx)(`div`,{className:`local-disclosure-panel`,children:i(d,t)})]});let g=`${n}-html-details-trigger`,_=`${n}-html-details-panel`;return(0,$.jsxs)(`div`,{className:`local-disclosure local-html-details`,...fw(r,e),children:[(0,$.jsx)(`h3`,{className:`local-disclosure-heading`,children:(0,$.jsxs)(`button`,{id:g,type:`button`,className:`local-disclosure-trigger`,"aria-expanded":m,"aria-controls":_,onClick:()=>h(e=>!e),children:[(0,$.jsx)(`span`,{className:`local-chevron${m?` is-open`:``}`,"aria-hidden":`true`,children:`▸`}),(0,$.jsx)(`span`,{children:f})]})}),(0,$.jsx)(`div`,{id:_,className:`local-disclosure-panel`,role:`region`,"aria-labelledby":g,hidden:!m,children:i(d,t&&m)})]})}function iT({node:e,visible:t}){let n=(0,y.useId)(),{runtime:r,render:i,mode:a}=gC(),o=sy(),s=jC(r,e,`label`,o(`Details`,`折叠内容`),o),c=NC(r,e,`open`,!1),[l,u]=(0,y.useState)(c);if(iw(r,e,()=>{u(c)}),a===`static`)return(0,$.jsxs)(`section`,{className:`local-disclosure local-static-disclosure`,children:[(0,$.jsx)(`h3`,{className:`local-disclosure-heading`,children:s}),(0,$.jsx)(`div`,{className:`local-disclosure-panel`,children:i(e.children??[],t)})]});let d=`${n}-disclosure-trigger`,f=`${n}-disclosure-panel`;return(0,$.jsxs)(`div`,{className:`local-disclosure`,children:[(0,$.jsxs)(`h3`,{className:`local-disclosure-heading`,children:[(0,$.jsxs)(`button`,{id:d,type:`button`,className:`local-disclosure-trigger`,"aria-expanded":l,"aria-controls":f,onClick:()=>u(e=>!e),children:[(0,$.jsx)(`span`,{className:`local-chevron${l?` is-open`:``}`,"aria-hidden":`true`,children:`▸`}),(0,$.jsx)(`span`,{children:s})]}),(0,$.jsx)(HC,{value:s})]}),(0,$.jsx)(`div`,{id:f,className:`local-disclosure-panel`,role:`region`,"aria-labelledby":d,hidden:!l,children:i(e.children??[],t&&l)})]})}function aT({node:e,visible:t}){let{runtime:n,render:r}=gC(),i=sy(),a=MC(n,e,`when`,!1),o=a.ok?a.value:!1,s=!a.ok,c=(0,y.useRef)(null),l=(0,y.useRef)(o),u=(0,y.useRef)(!1);return(0,y.useEffect)(()=>{if(l.current&&!o){if(u.current){let e=c.current?.closest(`.local-document`);e&&(e.tabIndex=-1,e.focus({preventScroll:!0}))}u.current=!1}l.current=o},[o]),(0,$.jsxs)($.Fragment,{children:[s?(0,$.jsx)(aw,{}):null,(0,$.jsx)(`div`,{ref:c,className:`local-if md-if`,role:`group`,"aria-label":i(`Conditional content`,`条件内容`),tabIndex:-1,hidden:!o,"aria-hidden":!o,onFocus:()=>{u.current=!0},onBlur:e=>{c.current?.contains(e.relatedTarget)||(u.current=!1)},children:r(e.children??[],t&&o)})]})}function oT(){let e=sy();return(0,$.jsx)(`span`,{className:`local-error local-tone-error`,role:`status`,children:e(`Invalid tone; using the default style`,`色调无效,已使用默认样式`)})}function sT({node:e,visible:t}){let{runtime:n,render:r}=gC(),i=jC(n,e,`title`,``,sy()),{tone:a,error:o}=PC(n,e,`tone`,[`info`,`success`,`warning`],`info`),s=a===`warning`?`alert`:`status`;return(0,$.jsxs)($.Fragment,{children:[o?(0,$.jsx)(oT,{}):null,(0,$.jsxs)(`div`,{className:`local-alert local-alert-${a}`,role:s,children:[i?(0,$.jsx)(`div`,{className:`local-alert-title`,children:i}):null,(0,$.jsx)(`div`,{className:`local-alert-body`,children:r(e.children??[],t)})]})]})}function cT({node:e,visible:t}){let n=gC(),{runtime:r}=n,{tone:i,error:a}=PC(r,e,`tone`,[`neutral`,`success`,`warning`],`neutral`),o=UC(e);return(0,$.jsxs)($.Fragment,{children:[a?(0,$.jsx)(oT,{}):null,(0,$.jsx)(`span`,{className:`md-badge md-badge-${i} local-badge`,style:o?{color:o}:void 0,children:vw(n,e.children,t)})]})}function lT({node:e,visible:t}){let n=(0,y.useId)(),r=gC(),{runtime:i,mode:a}=r,o=sy(),s=jC(i,e,`text`,o(`Tooltip`,`提示`),o),[c,l]=(0,y.useState)(!1),u=`${n}-tooltip`;return a===`static`?(0,$.jsxs)(`span`,{className:`local-tooltip local-static-tooltip`,children:[(0,$.jsx)(`span`,{className:`local-tooltip-trigger`,children:vw(r,e.children,t)}),(0,$.jsx)(`span`,{className:`local-tooltip-bubble is-visible`,role:`note`,children:s})]}):(0,$.jsxs)(`span`,{className:`local-tooltip`,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[(0,$.jsx)(`span`,{className:`local-tooltip-trigger`,tabIndex:0,"aria-describedby":u,onFocus:()=>l(!0),onBlur:()=>l(!1),onKeyDown:e=>{e.key===`Escape`&&(e.stopPropagation(),l(!1))},children:vw(r,e.children,t)}),(0,$.jsx)(`span`,{id:u,role:`tooltip`,className:`local-tooltip-bubble${c?` is-visible`:``}`,children:s}),(0,$.jsx)(HC,{value:s})]})}function uT({node:e,visible:t}){let n=(0,y.useId)(),r=gC(),{anchors:i,rootRef:a,runtime:o,urlPolicy:s,mode:c}=r,l=sy(),u=`${n}-jump-feedback`,[d,f]=(0,y.useState)(null),p=OC(e,`to`)??``,m=i.targetId(p),h=OC(e,`appearance`)===`button`?`button`:`link`,g=UC(e),_=m?`#${m}`:`#`,v=m!==void 0;if(v&&s)try{v=s(`#${p}`,`link`)===!0}catch{v=!1}return iw(o,e,()=>f(null)),c===`static`?v&&m?(0,$.jsx)(`a`,{href:`#${m}`,className:`local-jump local-jump-link local-jump-static`,style:WC(g),children:vw(r,e.children,t)}):(0,$.jsx)(`span`,{className:`local-jump local-jump-static-blocked`,style:WC(g),children:vw(r,e.children,t)}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`a`,{href:v?_:`#`,className:`local-jump local-jump-${h}`,style:WC(g),"data-local-target-missing":m?void 0:`true`,"data-local-jump-blocked":m&&!v?`true`:void 0,"aria-describedby":d?u:void 0,onClick:e=>{if(!v||!m){e.preventDefault(),f(m?l(`Jump is blocked by the host`,`跳转已被主机策略阻止`):l(`Jump target not found`,`找不到跳转目标`));return}let t=a.current;if(!t||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let n=null;try{n=t.querySelector(`[id="${m}"]`)}catch{n=null}if(!n){e.preventDefault(),f(l(`Jump target not found`,`找不到跳转目标`));return}if(n.closest(`[hidden]`)){e.preventDefault(),f(l(`Jump target is hidden`,`跳转目标当前隐藏`));return}e.preventDefault(),n.hasAttribute(`tabindex`)||(n.tabIndex=-1);try{n.focus({preventScroll:!0})}catch{}let r=`smooth`;try{window.matchMedia(`(prefers-reduced-motion: reduce)`).matches&&(r=`auto`)}catch{r=`auto`}try{n.scrollIntoView({behavior:r,block:`start`})}catch{}f(null)},children:vw(r,e.children,t)}),d?(0,$.jsx)(`span`,{id:u,className:`local-jump-feedback`,role:`status`,"aria-live":`polite`,children:d}):null]})}function dT({node:e}){let{anchors:t}=gC(),n=t.anchorIds.get(e);return n?(0,$.jsx)(`span`,{className:`local-anchor`,id:n,"data-local-anchor":``}):null}function fT({node:e,visible:t}){let n=gC(),r=UC(e);return(0,$.jsx)(`span`,{className:`local-text`,style:r?{color:r}:void 0,children:vw(n,e.children,t)})}function pT({node:e,visible:t}){let{render:n}=gC(),r=UC(e);return(0,$.jsx)(`div`,{className:`local-section`,style:r?{color:r}:void 0,children:n(e.children??[],t)})}function mT({node:e,visible:t}){let n=(0,y.useId)(),r=gC(),{runtime:i,mode:a}=r,o=sy(),{write:s,error:c,setError:l}=nw(e),u=jC(i,e,`label`,o(`Multi select`,`多选`),o),{disabled:d,invalid:f}=rw(e),p=TC(e),m=Lw(e),h=LC(i,e),g=Array.isArray(h)?h.filter(e=>typeof e==`string`):[],_=m.filter(e=>g.includes(e.value)).map(e=>zw(i,e.node,o)||e.value),v=IC(i,e,`max-selected`,m.length),b=Number.isFinite(v)?Math.max(0,Math.floor(v)):m.length,[x,S]=(0,y.useState)(``);if(iw(i,e,()=>{S(``),l(null)}),m.length===0)return(0,$.jsx)(aw,{message:o(`Missing options`,`缺少选项`)});if(a===`static`)return(0,$.jsx)(VC,{className:`local-multi-select`,label:u,value:BC(_.join(`, `))});let C=new Set(g),w=g.length>=b,T=x.trim().toLocaleLowerCase(),E=T?m.filter(e=>`${Rw(i,e.node.children,o)} ${e.value}`.toLocaleLowerCase().includes(T)):m,D=(e,t)=>{let n=new Set(C);if(t){if(!n.has(e)&&n.size>=b)return;n.add(e)}else n.delete(e);s(m.filter(e=>n.has(e.value)).map(e=>e.value))};return(0,$.jsxs)(`fieldset`,{className:`local-multi-select`,style:WC(UC(e)),disabled:d,"aria-invalid":p.invalid||void 0,"aria-describedby":p.describedBy,children:[(0,$.jsx)(`legend`,{className:`md-label`,children:u}),(0,$.jsxs)(`div`,{className:`local-multi-toolbar`,children:[(0,$.jsx)(`input`,{id:`${n}-multi-search`,type:`search`,className:`md-text-input local-multi-search`,value:x,placeholder:o(`Search options`,`搜索选项`),"aria-label":o(`Search ${u}`,`搜索${u}`),onChange:e=>S(e.target.value)}),(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-quiet local-multi-clear`,onClick:()=>{S(``),g.length>0&&s([])},children:o(`Clear`,`清除`)})]}),(0,$.jsx)(`div`,{className:`local-multi-list`,role:`group`,"aria-label":u,children:E.length===0?(0,$.jsx)(`span`,{className:`local-multi-empty`,children:o(`No matching options`,`没有匹配选项`)}):E.map(e=>{let n=C.has(e.value);return(0,$.jsxs)(`label`,{className:`local-multi-option${n?` is-selected`:``}`,children:[(0,$.jsx)(`input`,{type:`checkbox`,checked:n,disabled:!n&&w,onChange:t=>D(e.value,t.target.checked)}),(0,$.jsx)(`span`,{children:vw(r,e.node.children,t)})]},e.node.id)})}),(0,$.jsx)(`span`,{className:`local-multi-count`,role:`status`,"aria-live":`polite`,children:o(`${g.length} of ${b} selected`,`已选 ${g.length}/${b}`)}),(0,$.jsx)(HC,{value:BC(_.join(`, `))}),(0,$.jsx)(Ew,{message:f?o(`Cannot compute`,`无法计算`):c})]})}function hT({node:e}){let{runtime:t,mode:n}=gC(),r=sy(),{write:i,error:a,setError:o}=nw(e),s=jC(t,e,`label`,r(`Range`,`范围`),r),{disabled:c,invalid:l}=rw(e),u=TC(e),{min:d,max:f,step:p}=tw(t,e,`min`,`max`,0,100,1),m=Math.floor((f-d)/p+1e-9),h=d,g=QC(d+Math.max(0,m)*p,d,f),_=$C(ew(t,e,`start`,h),d,f,p),v=$C(ew(t,e,`end`,g),d,f,p);_>v&&(_=v);let[b,x]=(0,y.useState)(null);iw(t,e,()=>{x(null),o(null)});let S=r(`Start`,`起点`),C=r(`End`,`终点`),w=`${S}: ${_} · ${C}: ${v}`;if(n===`static`)return(0,$.jsx)(VC,{className:`local-range-slider`,label:s,value:w});let T=(e,t)=>{let n=$C(QC(t,d,f),d,f,p);e===`start`&&n>v?x(r(`Start cannot exceed end`,`起点不能超过终点`)):e===`end`&&n<_?x(r(`End cannot be less than start`,`终点不能小于起点`)):(x(null),i(n,e))};return(0,$.jsxs)(`div`,{className:`md-control local-range-slider`,style:WC(UC(e)),role:`group`,"aria-label":s,"aria-invalid":u.invalid||void 0,"aria-describedby":u.describedBy,children:[(0,$.jsx)(`span`,{className:`md-label`,children:s}),(0,$.jsxs)(`div`,{className:`local-range-row`,children:[(0,$.jsx)(`span`,{className:`local-range-name`,children:r(`Start`,`起点`)}),(0,$.jsx)(`input`,{type:`range`,className:`local-range-input`,min:d,max:v,step:p,value:_,disabled:c,"aria-label":`${s} ${r(`Start`,`起点`)}`,onChange:e=>T(`start`,Number(e.target.value))}),(0,$.jsx)(`span`,{className:`local-range-value`,"aria-hidden":`true`,children:_})]}),(0,$.jsxs)(`div`,{className:`local-range-row`,children:[(0,$.jsx)(`span`,{className:`local-range-name`,children:r(`End`,`终点`)}),(0,$.jsx)(`input`,{type:`range`,className:`local-range-input`,min:_,max:f,step:p,value:v,disabled:c,"aria-label":`${s} ${r(`End`,`终点`)}`,onChange:e=>T(`end`,Number(e.target.value))}),(0,$.jsx)(`span`,{className:`local-range-value`,"aria-hidden":`true`,children:v})]}),(0,$.jsx)(HC,{value:w}),(0,$.jsx)(Ew,{message:l?r(`Cannot compute`,`无法计算`):b??a})]})}function gT({id:e,label:t,value:n,min:r,max:i,step:a,disabled:o,onCommit:s,reset:c}){let[l,u]=(0,y.useState)(()=>String(n)),[d,f]=(0,y.useState)(!1),p=(0,y.useRef)(n);(0,y.useEffect)(()=>{u(String(n)),f(!1)},[c]),(0,y.useEffect)(()=>{p.current!==n&&(p.current=n,d||u(String(n)))},[n,d]);let m=e=>{let t=e.trim();if(t===``||t===`-`||t===`.`||t===`-.`)return null;let n=Number(t);return Number.isFinite(n)?$C(QC(n,r,i),r,i,a):null};return(0,$.jsxs)(`div`,{className:`local-number-field`,children:[(0,$.jsx)(`label`,{className:`md-label`,htmlFor:e,children:t}),(0,$.jsx)(`input`,{id:e,className:`md-text-input`,type:`text`,inputMode:`decimal`,value:l,disabled:o,onFocus:()=>f(!0),onBlur:()=>{f(!1);let e=m(l);u(String(e??n))},onChange:e=>{let t=e.target.value;u(t);let n=m(t);n!==null&&s(n)}})]})}function _T({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=gC(),i=sy(),{write:a,writeMany:o,error:s,setError:c}=nw(e),l=jC(n,e,`label`,i(`Coordinate`,`坐标`),i),{disabled:u,invalid:d}=rw(e),f=TC(e),p=tw(n,e,`x-min`,`x-max`,-5,5,1),m=tw(n,e,`y-min`,`y-max`,-5,5,1),h=$C(0,p.min,p.max,p.step),g=$C(0,m.min,m.max,m.step),_=$C(ew(n,e,`x`,h),p.min,p.max,p.step),v=$C(ew(n,e,`y`,g),m.min,m.max,m.step),b=(0,y.useRef)(null),x=(0,y.useRef)(!1);iw(n,e,()=>c(null));let S=`X: ${_} · Y: ${v}`;if(r===`static`)return(0,$.jsx)(VC,{className:`local-coordinate`,label:l,value:S});let C=e=>p.max>p.min?40+(e-p.min)/(p.max-p.min)*320:200,w=e=>m.max>m.min?360-(e-m.min)/(m.max-m.min)*320:200,T=C(_),E=w(v),D=C(QC(0,p.min,p.max)),O=w(QC(0,m.min,m.max)),k=e=>{let t=e.step*Math.max(1,Math.ceil((e.max-e.min)/(e.step*10))),n=Math.min(11,Math.floor((e.max-e.min)/t)+1);return Array.from({length:n},(n,r)=>e.min+r*t)},A=e=>{let t=b.current?.getBoundingClientRect();if(!t||t.width===0||t.height===0)return null;let n=QC(((e.clientX-t.left)/t.width-.1)/.8,0,1),r=QC(((e.clientY-t.top)/t.height-.1)/.8,0,1);return{x:$C(p.min+n*(p.max-p.min),p.min,p.max,p.step),y:$C(m.min+(1-r)*(m.max-m.min),m.min,m.max,m.step)}},j=(e,t)=>{(e!==_||t!==v)&&o({x:e,y:t})};return(0,$.jsxs)(`div`,{className:`local-coordinate`,style:WC(UC(e)),role:`group`,"aria-label":l,"aria-invalid":f.invalid||void 0,"aria-describedby":f.describedBy,children:[(0,$.jsx)(`span`,{className:`md-label`,children:l}),(0,$.jsxs)(`div`,{className:`local-coordinate-surface`,children:[(0,$.jsx)(`div`,{ref:b,className:`local-coordinate-pad`,role:`group`,"aria-label":i(`${l} drag area`,`${l} 拖拽区`),"aria-disabled":u||void 0,tabIndex:u?-1:0,onKeyDown:e=>{if(u)return;let t=_,n=v;switch(e.key){case`ArrowLeft`:t=$C(_-p.step,p.min,p.max,p.step);break;case`ArrowRight`:t=$C(_+p.step,p.min,p.max,p.step);break;case`ArrowDown`:n=$C(v-m.step,m.min,m.max,m.step);break;case`ArrowUp`:n=$C(v+m.step,m.min,m.max,m.step);break;case`Home`:t=p.min,n=m.min;break;case`End`:t=$C(p.max,p.min,p.max,p.step),n=$C(m.max,m.min,m.max,m.step);break;default:return}e.preventDefault(),j(t,n)},onPointerDown:e=>{if(u)return;e.preventDefault(),x.current=!0,b.current?.focus({preventScroll:!0});try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}let t=A(e);t&&j(t.x,t.y)},onPointerMove:e=>{if(!x.current||u)return;let t=A(e);t&&j(t.x,t.y)},onPointerUp:e=>{x.current=!1;try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}},onPointerCancel:()=>{x.current=!1},children:(0,$.jsxs)(`svg`,{className:`local-coordinate-svg`,viewBox:`0 0 400 400`,"aria-hidden":`true`,focusable:`false`,children:[(0,$.jsx)(`defs`,{children:(0,$.jsx)(`marker`,{id:`${t}-coordinate-arrow`,markerWidth:`8`,markerHeight:`8`,refX:`6`,refY:`4`,orient:`auto`,viewBox:`0 0 8 8`,children:(0,$.jsx)(`path`,{className:`local-coordinate-arrow`,d:`M1 1 L6 4 L1 7`})})}),(0,$.jsxs)(`g`,{className:`local-coordinate-grid`,children:[(0,$.jsx)(`rect`,{x:`40`,y:`40`,width:`320`,height:`320`}),k(p).map((e,t)=>(0,$.jsx)(`line`,{x1:C(e),y1:`40`,x2:C(e),y2:`360`},`x-${t}`)),k(m).map((e,t)=>(0,$.jsx)(`line`,{x1:`40`,y1:w(e),x2:`360`,y2:w(e)},`y-${t}`))]}),(0,$.jsxs)(`g`,{className:`local-coordinate-axes`,children:[(0,$.jsx)(`line`,{className:`local-coordinate-horizontal`,x1:`26`,y1:O,x2:`372`,y2:O,markerEnd:`url(#${t}-coordinate-arrow)`}),(0,$.jsx)(`line`,{className:`local-coordinate-vertical`,x1:D,y1:`374`,x2:D,y2:`24`,markerEnd:`url(#${t}-coordinate-arrow)`})]}),(0,$.jsxs)(`g`,{className:`local-coordinate-axis-label`,children:[(0,$.jsx)(`text`,{x:`358`,y:O-14,children:`x`}),(0,$.jsx)(`text`,{x:D+12,y:`40`,children:`y`})]}),(0,$.jsxs)(`g`,{className:`local-coordinate-projection`,children:[(0,$.jsx)(`line`,{x1:T,y1:E,x2:T,y2:O}),(0,$.jsx)(`line`,{x1:T,y1:E,x2:D,y2:E})]}),(0,$.jsx)(`circle`,{className:`local-coordinate-dot`,cx:T,cy:E,r:`10`}),(0,$.jsx)(`text`,{className:`local-coordinate-value`,x:T,y:E>330?E-22:E+30,textAnchor:T<80?`start`:T>320?`end`:`middle`,children:`(${_}, ${v})`})]})}),(0,$.jsx)(`span`,{className:`local-coordinate-caption`,children:i(`Draggable coordinate plane`,`可拖动的坐标平面`)})]}),(0,$.jsx)(`span`,{className:`md-hint local-hint`,children:i(`Arrow keys adjust the point; Home and End jump to the lower or upper bounds.`,`方向键调整坐标;Home 和 End 跳到最小或最大边界。`)}),(0,$.jsxs)(`div`,{className:`local-coordinate-fields`,children:[(0,$.jsx)(gT,{id:`${t}-coordinate-x`,reset:n.resetToken(e),label:`${l} X`,value:_,min:p.min,max:p.max,step:p.step,disabled:u,onCommit:e=>a(e,`x`)}),(0,$.jsx)(gT,{id:`${t}-coordinate-y`,reset:n.resetToken(e),label:`${l} Y`,value:v,min:m.min,max:m.max,step:m.step,disabled:u,onCommit:e=>a(e,`y`)})]}),(0,$.jsx)(HC,{value:S}),(0,$.jsx)(Ew,{message:d?i(`Cannot compute`,`无法计算`):s})]})}function vT({node:e,visible:t}){let n=(0,y.useId)(),r=gC(),{runtime:i,mode:a}=r,o=sy(),s=jC(i,e,`label`,o(`Quiz`,`测验`),o),c=OC(e,`type`)===`number`?`number`:`choice`,l=(OC(e,`answer`)??``).trim(),u=IC(i,e,`tolerance`,0),d=Number.isFinite(u)&&u>=0?u:0,{disabled:f,invalid:p}=rw(e),m=Lw(e),h=jC(i,e,`explanation`,``,o),[g,_]=(0,y.useState)(``),[v,b]=(0,y.useState)(null);iw(i,e,()=>{_(``),b(null)});let x=c===`number`?Number(l):NaN;if(c===`number`&&!Number.isFinite(x))return(0,$.jsx)(aw,{message:o(`Quiz answer must be a number`,`测验答案必须是数字`)});if(c===`choice`&&m.length===0)return(0,$.jsx)(aw,{message:o(`Missing options`,`缺少选项`)});let S=m.map(e=>zw(i,e.node,o)||e.value);if(a===`static`)return(0,$.jsxs)(`div`,{className:`local-quiz local-static-quiz`,role:`group`,"aria-label":s,children:[(0,$.jsx)(`span`,{className:`md-label`,children:s}),c===`choice`?(0,$.jsx)(`ul`,{className:`local-static-list local-static-quiz-options`,children:m.map(e=>(0,$.jsx)(`li`,{className:`local-static-list-item`,children:vw(r,e.node.children,t)},e.node.id))}):(0,$.jsx)(`span`,{className:`local-static-value`,children:o(`Numeric answer`,`数字作答`)})]});let C=()=>{if(c===`choice`){if(g===``){b(`incomplete`);return}b(g===l?`correct`:`incorrect`);return}let e=g.trim(),t=e===``?NaN:Number(e);b(Number.isFinite(t)?Math.abs(t-x)<=d?`correct`:`incorrect`:`incomplete`)},w=()=>{_(``),b(null)},T=v===null?null:v===`correct`?`${o(`Correct`,`回答正确`)}`:v===`incorrect`?`${o(`Not quite`,`回答不正确`)}`:c===`number`?o(`Enter a number first`,`请先输入数字`):o(`Choose an answer first`,`请先选择答案`),E=v===`correct`?` is-correct`:v===`incorrect`?` is-incorrect`:``;return(0,$.jsxs)(`div`,{className:`local-quiz`,role:`group`,"aria-label":s,children:[c===`choice`?(0,$.jsxs)(`fieldset`,{className:`local-quiz-options`,disabled:f,children:[(0,$.jsx)(`legend`,{className:`md-label`,children:s}),m.map(e=>(0,$.jsxs)(`label`,{className:`local-radio-option`,children:[(0,$.jsx)(`input`,{type:`radio`,name:`${n}-quiz`,value:e.value,checked:g===e.value,onChange:()=>{_(e.value),b(null)}}),(0,$.jsx)(`span`,{children:vw(r,e.node.children,t)})]},e.node.id))]}):(0,$.jsxs)(`div`,{className:`local-quiz-number`,children:[(0,$.jsx)(`label`,{className:`md-label`,htmlFor:`${n}-quiz`,children:s}),(0,$.jsx)(`input`,{id:`${n}-quiz`,className:`md-text-input local-quiz-input`,type:`text`,inputMode:`decimal`,value:g,disabled:f,"aria-label":s,onChange:e=>{_(e.target.value),b(null)}})]}),(0,$.jsxs)(`div`,{className:`local-quiz-actions`,children:[(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-primary local-quiz-check`,disabled:f,onClick:C,children:o(`Check answer`,`检查答案`)}),(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-secondary local-quiz-again`,disabled:f,onClick:w,children:o(`Try again`,`再试一次`)})]}),(0,$.jsx)(`span`,{className:`local-quiz-feedback${E}`,role:`status`,"aria-live":`polite`,children:T?`${v===`correct`?`✓ `:v===`incorrect`?`✗ `:``}${T}`:``}),v!==null&&h?(0,$.jsx)(`div`,{className:`local-quiz-explanation`,children:h}):null,(0,$.jsx)(HC,{block:!0,value:c===`choice`?`${T?`${T} · `:``}${S.join(` · `)}`:T||o(`No answer yet`,`尚未作答`)}),(0,$.jsx)(Ew,{message:p?o(`Cannot compute`,`无法计算`):null})]})}function yT({node:e,visible:t}){let n=(0,y.useId)(),{runtime:r,render:i,mode:a}=gC(),o=sy(),{write:s,error:c,setError:l}=nw(e),u=jC(r,e,`label`,``,o),d=TC(e),f=(e.children??[]).filter(e=>e.type===`component`&&e.name===`step`),p=f.map((e,t)=>OC(e,`value`)??`step-${t+1}`),m=f.map((e,t)=>jC(r,e,`label`,p[t],o)),h=OC(e,`initial`)??``,g=p.includes(h)?h:p[0]??``,_=LC(r,e),v=typeof _==`string`?_:``,b=(0,y.useRef)([]),x=(0,y.useRef)(!1);iw(r,e,()=>{l(null),x.current=!1});let S=p.includes(v)?v:g,C=Math.max(0,p.indexOf(S));if((0,y.useEffect)(()=>{x.current&&(x.current=!1,b.current[C]?.focus({preventScroll:!0}))},[C,S]),f.length===0)return(0,$.jsx)(aw,{message:o(`Steps requires at least one step`,`步骤至少需要一个 step`)});if(a===`static`){let e=f[C];return(0,$.jsxs)(`section`,{className:`local-steps local-static-steps`,"aria-label":u||o(`Steps`,`步骤`),children:[u?(0,$.jsx)(`div`,{className:`local-steps-label`,children:u}):null,(0,$.jsx)(`div`,{className:`local-steps-nav local-static-steps-nav`,children:(0,$.jsx)(`span`,{className:`local-steps-status`,role:`status`,"aria-live":`polite`,children:o(`Step ${C+1} of ${f.length}`,`第 ${C+1} 步,共 ${f.length} 步`)})}),(0,$.jsx)(`div`,{className:`local-steps-panel`,role:`group`,"aria-label":m[C],children:i(e.children??[],t)})]})}let w=e=>{let t=p[e];t!==void 0&&(x.current=!0,s(t))};return(0,$.jsxs)(`section`,{className:`local-steps`,"aria-label":u||o(`Steps`,`步骤`),"aria-invalid":d.invalid||void 0,"aria-describedby":d.describedBy,children:[u?(0,$.jsx)(`div`,{className:`local-steps-label`,children:u}):null,(0,$.jsxs)(`div`,{className:`local-steps-nav`,children:[(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-secondary local-steps-prev`,disabled:C<=0,onClick:()=>w(C-1),children:o(`Previous`,`上一步`)}),(0,$.jsx)(`span`,{className:`local-steps-status`,role:`status`,"aria-live":`polite`,children:o(`Step ${C+1} of ${f.length}`,`第 ${C+1} 步,共 ${f.length} 步`)}),(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-secondary local-steps-next`,disabled:C>=f.length-1,onClick:()=>w(C+1),children:o(`Next`,`下一步`)})]}),f.map((e,r)=>{let a=r===C;return(0,$.jsx)(`div`,{id:`${n}-step-${r}`,ref:e=>{b.current[r]=e},className:`local-steps-panel`,role:`group`,"aria-label":m[r],tabIndex:-1,hidden:!a,children:i(e.children??[],t&&a)},e.id)}),(0,$.jsx)(Ew,{message:c})]})}function bT(){return null}var xT={panel:Xw,card:Zw,grid:Qw,tabs:tT,tab:$w,accordion:nT,disclosure:iT,if:aT,alert:sT,badge:cT,validation:ww,column:Tw,tooltip:lT,input:Ow,textarea:kw,number:Mw,slider:Nw,toggle:Pw,checkbox:Fw,date:Iw,select:Vw,choices:Hw,"radio-group":Uw,option:Bw,node:$w,edge:eT,counter:qw,timer:Jw,checklist:Gw,progress:Yw,jump:uT,anchor:dT,text:fT,section:pT,"multi-select":mT,"range-slider":hT,coordinate:_T,quiz:vT,steps:yT,step:bT};function ST(e,t){let n=t.definition.children;return n&&n.length>0?hw(e,n,!0):typeof t.definition.value==`string`&&t.definition.value!==``?(0,$.jsx)(`p`,{children:t.definition.value}):null}function CT({entries:e,env:t,t:n,titleId:r}){return(0,$.jsxs)(`section`,{className:`local-footnotes`,role:`doc-endnotes`,"aria-labelledby":r,"data-local-footnotes":``,children:[(0,$.jsx)(`h2`,{id:r,className:`local-footnotes-title`,children:n(`Footnotes`,`脚注`)}),(0,$.jsx)(`ol`,{className:`local-footnotes-list`,children:e.map(e=>{let r=e.references.length>1;return(0,$.jsxs)(`li`,{id:e.id,className:`local-footnote`,"data-local-footnote-number":e.number,children:[(0,$.jsx)(`div`,{className:`local-footnote-body`,children:ST(t,e)}),(0,$.jsx)(`span`,{className:`local-footnote-backlinks`,children:e.references.map((t,i)=>(0,$.jsx)(`a`,{href:`#${t.id}`,className:`local-footnote-backlink`,role:`doc-backlink`,"aria-label":r?n(`Back to reference ${e.number} (${i+1} of ${e.references.length})`,`返回脚注 ${e.number} 的第 ${i+1} 处引用`):n(`Back to reference ${e.number}`,`返回脚注 ${e.number}`),children:`↩`},t.id))})]},e.id)})})]})}function wT({document:e,mode:t=`interactive`,staticFirst:n=!1,locale:r=`en`,onDiagnostics:i}){let[a,o]=(0,y.useState)(!n);(0,y.useEffect)(()=>{n&&o(!0)},[n]);let s=t===`interactive`&&n&&!a?`static`:t,c=e.html?.enableCss===!0,l=s===`interactive`&&e.html?.enableJavaScript===!0,u=e.html?.enableExtendedHtml===!0,d=(0,y.useMemo)(()=>({enableCss:c,enableJavaScript:l,enableExtendedHtml:u}),[c,l,u]),f=(0,y.useMemo)(()=>qg(e.source,d,Math.max(C,e.source.length*2+10)),[e.source,d]),p=(0,y.useRef)(i);return p.current=i,(0,y.useEffect)(()=>{p.current?.(f.diagnostics)},[f]),f.diagnostics.some(e=>e.severity===`error`)?(0,$.jsx)(`div`,{className:`md-document local-document local-inactive`,role:`alert`,children:oy(r,`HTML rendering failed.`,`HTML 渲染失败。`)}):(0,$.jsx)(`article`,{className:`md-document local-document reactive-md-native-document${s===`static`?` local-static`:``}`,"data-source-mode":`html`,"data-render-mode":s,children:(0,$.jsx)(`iframe`,{className:`reactive-md-native-frame`,title:oy(r,`HTML document`,`HTML 文档`),sandbox:Fg(d),referrerPolicy:`no-referrer`,srcDoc:f.markup,style:{display:`block`,width:`100%`,minHeight:`60vh`,border:0,background:`#fff`,colorScheme:`light`}},`${Number(c)}${Number(l)}${Number(u)}:${e.source}`)})}function TT(e){return e.document.html?(0,$.jsx)(wT,{...e}):(0,$.jsx)(ET,{...e})}function ET({document:e,runtime:t,onDiagnostics:n,urlPolicy:r,locale:i=`en`,themes:a,colorScheme:o=`auto`,mode:s=`interactive`,staticFirst:c=!1,imageResolver:l}){let[u,d]=(0,y.useState)(!c);(0,y.useEffect)(()=>{c&&d(!0)},[c]);let f=s===`interactive`&&c&&!u?`static`:s,p=(0,y.useId)(),m=(0,y.useMemo)(()=>(e,t)=>oy(i,e,t),[i]),h=(0,y.useMemo)(()=>ir(e,`local-heading-${p}`),[e,p]),g=(0,y.useMemo)(()=>Th(e,p),[e,p]),_=(0,y.useMemo)(()=>{try{return Un(e)}catch{return Ln}},[e]),v=(0,y.useRef)(n);v.current=n;let b=(0,y.useRef)(null),x=(0,y.useCallback)(e=>{v.current?.(e)},[]),S=KC(a),C=(0,y.useMemo)(()=>{try{return gh(e.theme,a,e.themeRange,e.source)}catch{return{name:lh.name,diagnostics:[]}}},[e.theme,e.themeRange?.start,e.themeRange?.end,e.source,S]),w=ZC(b,o),T=(0,y.useRef)(``);(0,y.useEffect)(()=>{let e=qC(C.diagnostics);if(e===T.current)return;let t=T.current!==``;T.current=e,(C.diagnostics.length>0||t)&&x(C.diagnostics)},[C,x]);let E=(0,y.useCallback)(e=>{try{return t.subscribe(e)}catch{return()=>{}}},[t]),D=(0,y.useCallback)(()=>{try{return t.snapshot()}catch{return DC}},[t]);(0,y.useSyncExternalStore)(E,D,D);let O=``;if(e.validations?.length)try{O=qC(t.validate())}catch{O=`unavailable`}let k=(0,y.useMemo)(()=>wC(e,t,p,m),[e,t,p,m,O]),A=(0,y.useMemo)(()=>({runtime:t,rootRef:b,urlPolicy:r,imageResolver:l,anchors:h,t:m,mode:f,dependencies:_,footnotes:g}),[t,b,r,l,h,m,f,_,g]),j=(0,y.useCallback)((e,t=!0)=>hw(A,e??[],t),[A]),M=(0,y.useMemo)(()=>({runtime:t,render:j,visible:!0,mode:f,imageResolver:l,validation:k,report:x,urlPolicy:r,anchors:h,rootRef:b,t:m,dependencies:_,footnotes:g}),[t,j,x,r,l,f,h,b,m,k,_,g]);return(0,$.jsx)(iy,{locale:i,children:(0,$.jsx)(`article`,{ref:b,className:`md-document local-document${f===`static`?` local-static`:``}`,"data-rmd-theme":C.name,"data-color-scheme":w,"data-render-mode":f,style:{colorScheme:w},"aria-label":f===`static`?m(`Static document`,`静态文档`):m(`Interactive document`,`交互文档`),children:(0,$.jsxs)(hC.Provider,{value:M,children:[j(e.nodes,!0),g.entries.length>0?(0,$.jsx)(CT,{entries:g.entries,env:A,t:m,titleId:`${p}-footnotes-title`}):null]})})})}var DT=`reactive-md-state/v1`,OT=1048576,kT=/^fnv1a32:[0-9a-f]{8}$/,AT=2166136261,jT=16777619,MT=new Set([`format`,`syntax`,`sourceDigest`,`parameters`,`generator`]),NT=new Set([`name`,`version`]),PT=new TextEncoder;function FT(e,t){return{code:e,message:t.length>2e3?`${t.slice(0,D-1)}…`:t,severity:`error`,range:{start:0,end:0},line:1,column:1}}function IT(e,t,n){e.length<100&&e.push(FT(t,n))}function LT(e){return e instanceof Error?e.message:String(e)}function RT(e){for(let t=0;t<e.length;t+=1){let n=e.charCodeAt(t);if(n>=55296&&n<=56319){let n=e.charCodeAt(t+1);if(n>=56320&&n<=57343){t+=1;continue}return!1}if(n>=56320&&n<=57343)return!1}return!0}function zT(e){if(typeof e!=`string`)throw TypeError(`localSourceDigest requires a source string.`);let t=PT.encode(e),n=AT;for(let e=0;e<t.length;e+=1)n^=t[e],n=Math.imul(n,jT)>>>0;return`fnv1a32:${n.toString(16).padStart(8,`0`)}`}function BT(e){if(typeof e==`string`)return RT(e)?{ok:!0,value:e}:{ok:!1,message:`contains malformed Unicode.`};if(typeof e==`number`)return Number.isFinite(e)?{ok:!0,value:e}:{ok:!1,message:`must be a finite number.`};if(typeof e==`boolean`||e===null)return{ok:!0,value:e};if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n+=1){let r=e[n];if(typeof r!=`string`)return{ok:!1,message:`must be an array of strings.`};if(!RT(r))return{ok:!1,message:`contains malformed Unicode.`};t.push(r)}return{ok:!0,value:Object.freeze(t)}}return{ok:!1,message:`must be a string, finite number, boolean, null or string array.`}}function VT(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function HT(e){return Object.freeze(e.parameters),e.generator&&Object.freeze(e.generator),Object.freeze(e)}function UT(e){if(!e||typeof e!=`object`||Array.isArray(e))throw TypeError(`generator must be an object with string name and version.`);if(typeof e.name!=`string`||typeof e.version!=`string`)throw TypeError(`generator must have string name and version.`);if(!RT(e.name)||!RT(e.version))throw TypeError(`generator name and version must be well-formed Unicode strings.`);return Object.freeze({name:e.name,version:e.version})}function WT(e){return typeof e==`string`?`"${e.length>48?`${e.slice(0,48)}…`:e}"`:e===null?`null`:Array.isArray(e)?`an array`:typeof e}function GT(e,t){return e.length>t?e.length:PT.encode(e).byteLength}function KT(e,t){let n;try{let t=JSON.stringify(e);if(typeof t!=`string`)return null;n=t}catch{return null}return GT(n,t)}function qT(e){if(e===void 0)return OT;if(typeof e!=`object`||!e)throw TypeError(`parseLocalState options must be an object.`);let{maxLength:t}=e;if(t===void 0)return OT;if(typeof t!=`number`||!Number.isSafeInteger(t)||t<=0)throw RangeError(`maxLength must be a finite positive integer.`);return t}function JT(e,t,n){if(!e||e.syntax!==`local`||typeof e.source!=`string`)throw TypeError(`createLocalStateFile requires a compiled local document.`);if(!t||typeof t!=`object`||Array.isArray(t))throw TypeError(`createLocalStateFile requires a state object.`);let r=Object.keys(e.bindings).filter(e=>!e.startsWith(`@`)).sort(),i=new Set(r),a=new Map;for(let n of Object.keys(t)){if(Object.hasOwn(e.computations??{},n))continue;if(n.startsWith(`@`)){if(!Object.hasOwn(e.bindings,n))throw Error(`Cannot persist parameter "${n}": it is not a binding of this document.`);continue}if(!i.has(n))throw Error(`Cannot persist parameter "${n}": it is not a public binding of this document.`);let r=BT(t[n]);if(!r.ok)throw TypeError(`Cannot persist parameter "${n}": the value ${r.message}`);a.set(n,r.value)}let o={};for(let e of r){if(!a.has(e))throw Error(`Cannot persist the document: parameter "${e}" is missing from the supplied state.`);o[e]=a.get(e)}let s={format:DT,syntax:Bm,sourceDigest:zT(e.source),parameters:o};return n!==void 0&&(s.generator=UT(n)),HT(s)}function YT(e,t){let n=[],r=(e,t)=>IT(n,e,t),i=e;if(typeof e==`string`){if(GT(e,t)>t)return{ok:!1,diagnostics:[FT(`local.state.size`,`The state payload exceeds the ${t}-byte limit.`)]};if(!RT(e))return{ok:!1,diagnostics:[FT(`local.state.utf`,`The state payload contains malformed Unicode.`)]};try{i=JSON.parse(e)}catch(e){return{ok:!1,diagnostics:[FT(`local.state.json`,`The state payload is not valid JSON: ${LT(e)}`)]}}}else{let n=KT(e,t);if(n===null)return{ok:!1,diagnostics:[FT(`local.state.shape`,`The state payload must be a JSON object.`)]};if(n>t)return{ok:!1,diagnostics:[FT(`local.state.size`,`The state payload exceeds the ${t}-byte limit.`)]}}if(!VT(i))return{ok:!1,diagnostics:[FT(`local.state.shape`,`The state payload must be a JSON object.`)]};Object.getOwnPropertySymbols(i).length>0&&r(`local.state.shape`,`The state payload cannot use symbol keys.`);for(let e of Object.keys(i))MT.has(e)||r(`local.state.key`,`Unknown top-level state key "${e}".`);let a=i.format;a!==`reactive-md-state/v1`&&r(`local.state.format`,`Unsupported state format ${WT(a)}; expected "${DT}".`);let o=i.syntax;o!==`local-draft-2`&&r(`local.state.syntax`,`Unsupported state syntax ${WT(o)}; expected "${Bm}".`);let s=i.sourceDigest;typeof s==`string`&&kT.test(s)||r(`local.state.digest`,`sourceDigest must match "fnv1a32:" followed by 8 lowercase hexadecimal digits.`);let c={},l=i.parameters;if(!VT(l))r(`local.state.parameters`,`parameters must be a JSON object of public binding values.`);else for(let e of Object.keys(l).sort()){if(e===`__proto__`){r(`local.state.parameter.prototype`,`Parameter names cannot be "__proto__".`);continue}if(e.startsWith(`@`)){r(`local.state.parameter.internal`,`Internal parameter "${e}" cannot be persisted.`);continue}let t=BT(l[e]);t.ok?c[e]=t.value:r(`local.state.parameter.value`,`Parameter "${e}" ${t.message}`)}let u;if(Object.hasOwn(i,`generator`)){let e=i.generator;if(!VT(e))r(`local.state.generator`,`generator must be an object with string name and version.`);else{for(let t of Object.keys(e))NT.has(t)||r(`local.state.generator`,`generator has unknown key "${t}".`);typeof e.name!=`string`||typeof e.version!=`string`?r(`local.state.generator`,`generator must have string name and version.`):!RT(e.name)||!RT(e.version)?r(`local.state.utf`,`generator contains malformed Unicode.`):u=Object.freeze({name:e.name,version:e.version})}}if(n.length)return{ok:!1,diagnostics:n};let d={format:DT,syntax:Bm,sourceDigest:s,parameters:c};return u&&(d.generator=u),{ok:!0,file:HT(d)}}function XT(e,t){let n=qT(t);try{return YT(e,n)}catch(e){return{ok:!1,diagnostics:[FT(`local.state.invalid`,`Cannot read the local state: ${LT(e)}`)]}}}function ZT(e){let t=new Map,n=e=>{for(let r of e)t.set(r.id,r),r.children&&n(r.children)};return n(e.nodes),t}function QT(e){let t=ZT(e),n=new Map,r=[];for(let[i,a]of Object.entries(e.bindingSlots??{})){let e=t.get(i);if(!e)continue;let o={node:e,slots:[]};for(let[t,r]of Object.entries(a))o.slots.push({slot:t,key:r}),r.startsWith(`@`)||n.set(r,{node:e,slot:t});o.slots.length&&r.push(o)}let i=[];for(let[r,a]of Object.entries(e.bindings)){if(r.startsWith(`@`))continue;let e=n.get(r);if(e){i.push({key:r,binding:a,node:e.node,slot:e.slot});continue}let o=a.owner&&t.has(a.owner)?a.owner:a.nodeIds.find(e=>t.has(e));i.push({key:r,binding:a,node:o?t.get(o):void 0})}return{plans:i,groups:r}}function $T(e,t,n){let r=[];for(let i of t.plans)i.slot===void 0&&Object.hasOwn(n,i.key)&&(i.node?Object.is(e.get(i.node),n[i.key])||r.push(...e.set(i.node,n[i.key])):r.push(FT(`local.state.document`,`The document has no component for parameter "${i.key}".`)));for(let i of t.groups){let t={},a=!1;for(let{slot:e,key:r}of i.slots)Object.hasOwn(n,r)&&(t[e]=n[r],a=!0);a&&r.push(...e.setMany(i.node,t))}return r}function eE(e,t){let n=e.snapshot(),r={};for(let e of t){let t=n.state[e];r[e]=Array.isArray(t)?Object.freeze([...t]):t}return Object.freeze(r)}function tE(e,t,n,r){let i=XT(t,r);if(!i.ok)return i;if(!e||e.syntax!==`local`||typeof e.source!=`string`||!Array.isArray(e.nodes)||!e.bindings)return{ok:!1,diagnostics:[FT(`local.state.document`,`resolveLocalState requires a compiled local document.`)]};if(i.file.syntax!==`local-draft-2`)return{ok:!1,diagnostics:[FT(`local.state.syntax`,`This state file uses syntax "${i.file.syntax}", but this build accepts "${Bm}".`)]};if(i.file.sourceDigest!==zT(e.source))return{ok:!1,diagnostics:[FT(`local.state.source`,`This state file was created for a different document (source digest mismatch).`)]};let a=QT(e),o=new Set(a.plans.map(e=>e.key)),s=[];for(let e of Object.keys(i.file.parameters))o.has(e)||IT(s,`local.state.parameter.unknown`,`The state contains unknown parameter "${e}" for this document.`);for(let e of o)Object.hasOwn(i.file.parameters,e)||IT(s,`local.state.parameter.missing`,`The state is missing parameter "${e}".`);if(s.length)return{ok:!1,diagnostics:s};let c;try{c=Bv(e)}catch(e){return{ok:!1,diagnostics:[FT(`local.state.document`,`Cannot validate this document: ${LT(e)}`)]}}try{if(n){let e=$T(c,a,n);if(e.length)return{ok:!1,diagnostics:e}}let e=$T(c,a,i.file.parameters);if(e.length)return{ok:!1,diagnostics:e};let t=[...o].sort();return{ok:!0,file:i.file,state:eE(c,t)}}finally{c.dispose()}}function nE(e,t,n){try{return tE(e,t,void 0,n)}catch(e){return{ok:!1,diagnostics:[FT(`local.state.invalid`,`Cannot resolve the local state: ${LT(e)}`)]}}}function rE(e,t){return JT(e.document,e.getParameters(),t)}function iE(e,t){return{code:e,message:t,severity:`error`,range:{start:0,end:0},line:1,column:1}}function aE(e,t=8){let n=e.slice(0,t).map(e=>`- [${e.code}] ${e.message} (line ${e.line}, column ${e.column})`);return e.length>n.length&&n.push(`- ${e.length-n.length} more diagnostic(s).`),n.join(`
|
|
68
|
-
`)}function oE(e){return e instanceof Error?e.message:String(e)}var sE=class extends Error{diagnostics;constructor(e,t){let n=aE(t);super(n?`${e}\n${n}`:e),this.name=`ReactiveMDMountError`,this.diagnostics=t}};function cE(e,t=`standalone.mount`){if(typeof e==`object`&&e&&Array.isArray(e.diagnostics)){let t=e.diagnostics;if(t.length>0)return t}return[iE(t,oE(e))]}var lE=`reactive-md-diagnostics`,uE=`reactive-md-state-change`,dE=/^[A-Za-z][A-Za-z0-9_-]*$/,fE=256,pE=/^data:image\/(?:png|jpeg|gif|webp);base64,[A-Za-z0-9+/]+={0,2}$/,mE=/[\u0000-\u001f\u007f-\u009f]/,hE=64,gE=4096,_E=41943040;function vE(e,t){if(e===void 0)return;if(!bE(e)){t(`standalone.payload.images`,`images must be a JSON object mapping image URLs to data URLs.`);return}let n=Object.entries(e);if(n.length>hE){t(`standalone.payload.images`,`images cannot contain more than ${hE} entries.`);return}let r=Object.create(null),i=0;for(let[e,a]of n)if(!e||e.length>gE||e===`__proto__`||mE.test(e)||typeof a!=`string`||!pE.test(a))t(`standalone.payload.images`,`Every image entry must use a bounded URL key and a base64 raster data URL.`);else{if(i+=a.length,i>_E){t(`standalone.payload.images`,`The embedded image map exceeds the 40 MiB budget.`);return}r[e]=a}return r}function yE(e,t){if(e===void 0)return;let n=Oh(e);if(!n.ok){t(`standalone.payload.compile-options`,`The payload compile options are invalid: ${n.message}`);return}let r={enableCss:n.html.enableCss,enableJavaScript:n.html.enableJavaScript,enableExtendedHtml:n.html.enableExtendedHtml},i=e.limits;return bE(i)&&i.maxSyntaxNodes!==void 0&&(r.limits={maxSyntaxNodes:n.maxSyntaxNodes}),r}function bE(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function xE(e){let t=[],n=(e,n)=>{t.push(iE(e,n))};if(!bE(e))return{ok:!1,diagnostics:[iE(`standalone.payload.shape`,`The reactive-md payload must be a JSON object.`)]};e.version!==1&&n(`standalone.payload.version`,`The reactive-md payload must use version 1.`);let r=e.target;typeof r!=`string`||r.length===0||r.length>fE?n(`standalone.payload.target`,`The payload target must be an element id of 1-${fE} characters.`):dE.test(r)||n(`standalone.payload.target`,`The payload target must start with a letter and use only letters, digits, underscores or hyphens.`);let i=e.source;typeof i!=`string`&&n(`standalone.payload.source`,`The payload source must be a string.`);let a=e.locale===void 0?`en`:e.locale;a!==`en`&&a!==`zh`&&n(`standalone.payload.locale`,`The payload locale must be "en" or "zh".`);let o=e.colorScheme===void 0?`auto`:e.colorScheme;o!==`light`&&o!==`dark`&&o!==`auto`&&n(`standalone.payload.color-scheme`,`The payload colorScheme must be "light", "dark" or "auto".`);let s=e.hydrate!==void 0&&e.hydrate;typeof s!=`boolean`&&n(`standalone.payload.hydrate`,`The payload hydrate flag must be a boolean.`);let c=e.state;bE(c)||n(`standalone.payload.state`,`The payload state must be a JSON object.`);let l=yE(e.compileOptions,n),u=vE(e.images,n);return t.length>0?{ok:!1,diagnostics:t}:{ok:!0,payload:{version:1,target:r,source:i,state:c,locale:a,colorScheme:o,hydrate:s,...l===void 0?{}:{compileOptions:l},...u&&Object.keys(u).length>0?{images:u}:{}}}}function SE(e){try{return xE(e)}catch(e){return{ok:!1,diagnostics:[iE(`standalone.payload.invalid`,`The reactive-md payload could not be read: ${oE(e)}`)]}}}function CE(e){return Array.isArray(e)?e.slice():e}function wE(e,t){let n=nE(e,t);if(!n.ok)return n;let r={};for(let[t,i]of Object.entries(e.bindings))r[t]=Object.hasOwn(n.state,t)?{...i,initial:CE(n.state[t])}:i;let i={...e.initialState};for(let[e,t]of Object.entries(n.state))i[e]=CE(t);return{ok:!0,baseline:{document:{...e,bindings:r,initialState:i},state:n.state}}}function TE(e,t,n,r){if(typeof e!=`string`)throw new sE(`Cannot mount a Reactive MD document: source must be a string.`,[iE(`standalone.source`,`source must be a string.`)]);let i=h_(e,r);if(!i.ok)throw new sE(`Cannot mount a Reactive MD document: the source contains syntax errors.`,i.diagnostics);let a=i.document;if(t!==void 0){let e=XT(t);if(!e.ok)throw new sE(`Cannot mount a Reactive MD document: the state payload is invalid.`,e.diagnostics);let n=wE(a,e.file);if(!n.ok)throw new sE(`Cannot mount a Reactive MD document: the state does not match this source.`,n.diagnostics);a=n.baseline.document}return typeof n==`string`&&n.trim().length>0&&(a={...a,theme:n.trim(),themeRange:void 0}),{document:a,diagnostics:i.diagnostics.slice()}}var EE=`0.4.0`,DE=Object.freeze({name:`reactive-md-standalone`,version:EE}),OE=`data-reactive-md-mounted`,kE=`script[type="application/reactive-md+json"][data-reactive-md-auto]`,AE=/^data:image\/(?:png|jpeg|gif|webp);base64,[A-Za-z0-9+/]+={0,2}$/,jE=64;function ME(e){if(!e)return{};let t=new Map;for(let[n,r]of Object.entries(e).slice(0,jE))typeof n==`string`&&n.length>0&&typeof r==`string`&&AE.test(r)&&t.set(n,r);return t.size===0?{}:{urlPolicy:(e,n)=>n===`link`||t.has(e),imageResolver:e=>t.get(e)??null}}var NE=new WeakSet;function PE(e){return NE.has(e)||e.hasAttribute(`data-reactive-md-mounted`)}function FE(e,t){return rE(e,t)}function IE(e){if(e)try{e()}catch{}}function LE(e){let t=()=>{let t=e.querySelector(`article.local-document`);t&&(t.classList.remove(`local-static-first`,`reactive-md-static-first`,`reactive-md-hydrating`),t.removeAttribute(`data-static-first`),t.removeAttribute(`data-reactive-md-static-first`)),e.classList.remove(`local-static-first`,`reactive-md-static-first`),e.removeAttribute(`data-static-first`)};if(typeof requestAnimationFrame!=`function`)return t(),()=>{};let n=0,r=0;return n=requestAnimationFrame(()=>{t(),r=requestAnimationFrame(t)}),()=>{typeof cancelAnimationFrame==`function`&&(cancelAnimationFrame(n),r&&cancelAnimationFrame(r))}}function RE(e,t,n={}){if(!e||typeof e!=`object`||!(`nodeType`in e)||!e.hasAttribute)throw new sE(`Cannot mount a Reactive MD document: element must be an HTMLElement.`,[iE(`standalone.element`,`element must be an HTMLElement.`)]);if(PE(e))throw new sE(`Cannot mount a Reactive MD document: this element is already mounted.`,[iE(`standalone.mount`,`The target element already hosts a Reactive MD document.`)]);if(!t||typeof t!=`object`)throw new sE(`Cannot mount a Reactive MD document: options are required.`,[iE(`standalone.options`,`mount requires an options object with a source string.`)]);let r=TE(t.source,t.state,n.theme,t.compileOptions),i;try{i=Bv(r.document)}catch(e){throw new sE(`Cannot mount a Reactive MD document: the interactive runtime could not be created.`,[iE(`standalone.runtime`,oE(e))])}let a=t.generator??DE,o=ME(t.images),s=t.urlPolicy??o.urlPolicy,c=t.imageResolver??o.imageResolver,l=()=>FE(i,a),u;try{u=l()}catch(e){try{i.dispose()}catch{}throw new sE(`Cannot mount a Reactive MD document: the initial state could not be captured.`,[iE(`standalone.state`,oE(e))])}let d=!1,f=e=>{d||IE(n.onDiagnostics?()=>n.onDiagnostics(e):void 0)},p=t.hydrate===!0&&e.hasChildNodes(),m=(0,$.jsx)(TT,{document:r.document,runtime:i,onDiagnostics:f,urlPolicy:s,locale:t.locale??`en`,themes:t.themes,colorScheme:t.colorScheme??`auto`,mode:`interactive`,staticFirst:p,imageResolver:c});if(!p)for(;e.firstChild;)e.removeChild(e.firstChild);let h=null;try{h=p?(0,b.hydrateRoot)(e,m):(0,b.createRoot)(e),p||h.render(m)}catch(e){try{h?.unmount()}catch{}try{i.dispose()}catch{}throw new sE(`Cannot mount a Reactive MD document: React could not render the document.`,cE(e,`standalone.render`))}NE.add(e),e.setAttribute(OE,``);let g=n.onStateChange?i.subscribe(()=>{if(d)return;let e;try{e=l()}catch{return}IE(n.onStateChange?()=>n.onStateChange(e):void 0)}):()=>{};IE(n.onStateChange?()=>n.onStateChange(u):void 0),r.diagnostics.length>0&&f(r.diagnostics);let _=p?LE(e):()=>{};return{element:e,getState(){if(d)throw Error(`This Reactive MD document has been unmounted.`);return l()},unmount:()=>{if(!d){d=!0,g(),_();try{h?.unmount()}catch{}try{i.dispose()}catch{}NE.delete(e),e.getAttribute(`data-reactive-md-mounted`)===``&&e.removeAttribute(OE)}}}}function zE(e,t){return RE(e,t)}function BE(e,t,n){if(typeof console<`u`&&typeof console.error==`function`)try{console.error(`Reactive MD: ${n.map(e=>`[${e.code}] ${e.message}`).join(` `)}`)}catch{}let r=e.defaultView?.CustomEvent;if(typeof r==`function`)try{t.dispatchEvent(new r(lE,{detail:n,bubbles:!0,composed:!0}))}catch{}}function VE(e,t){let n=t.defaultView?.HTMLElement;return n?e instanceof n:e.namespaceURI===`http://www.w3.org/1999/xhtml`}function HE(e){if(typeof document>`u`)return[];let t=e??document,n=t,r=n.nodeType===9?t:n.ownerDocument??document,i=[],a;try{a=Array.from(t.querySelectorAll(kE))}catch{return i}for(let e of a){let a;try{a=SE(JSON.parse(e.textContent??``))}catch(t){BE(r,e,[iE(`standalone.payload.json`,`The reactive-md payload is not valid JSON: ${oE(t)}`)]);continue}if(!a.ok){BE(r,e,a.diagnostics);continue}let o=a.payload,s=t,c=(typeof s.getElementById==`function`?s.getElementById(o.target):null)??r.getElementById(o.target);if(!c)BE(r,e,[iE(`standalone.target.missing`,`The reactive-md payload target "#${o.target}" was not found.`)]);else if(n!==r&&!n.contains(c))BE(r,e,[iE(`standalone.target.scope`,`The reactive-md payload target is outside the scanned root.`)]);else if(!VE(c,r))BE(r,e,[iE(`standalone.target.type`,`The reactive-md payload target must be an HTML element.`)]);else if(!PE(c))try{i.push(zE(c,{source:o.source,state:o.state,locale:o.locale,colorScheme:o.colorScheme,hydrate:o.hydrate,images:o.images,compileOptions:o.compileOptions}))}catch(e){BE(r,c,cE(e))}}return i}var UE=`reactive-md-doc`,WE=typeof HTMLElement<`u`?HTMLElement:class{};function GE(e){return typeof e==`object`&&!!e&&e.name===`AbortError`}var KE=class extends WE{static observedAttributes=[`src`,`source`,`locale`,`color-scheme`,`theme`];_source;_state;_urlPolicy;_imageResolver;_themes;_connected=!1;_generation=0;_restartScheduled=!1;_session=null;_abort=null;_stateTimer=null;_pendingState=null;_cache=null;connectedCallback(){this._connected||(this._connected=!0,this._start())}disconnectedCallback(){this._connected&&(this._connected=!1,this._generation+=1,this._restartScheduled=!1,this._abortFetch(),this._clearStateTimer(),this._teardown(),this._cache=null)}attributeChangedCallback(e,t,n){t!==n&&(e===`src`&&(this._cache=null),this._requestRestart())}get src(){return this.getAttribute(`src`)??void 0}set src(e){e==null?this.removeAttribute(`src`):this.setAttribute(`src`,e)}get theme(){return this.getAttribute(`theme`)??void 0}set theme(e){e==null?this.removeAttribute(`theme`):this.setAttribute(`theme`,e)}get source(){return this._source===void 0?this.getAttribute(`source`)??void 0:this._source}set source(e){let t=typeof e==`string`?e:void 0;t!==this._source&&(this._source=t,this._requestRestart())}get state(){return this._state}set state(e){e!==this._state&&(this._state=e,this._requestRestart())}get urlPolicy(){return this._urlPolicy}set urlPolicy(e){e!==this._urlPolicy&&(this._urlPolicy=e,this._requestRestart())}get imageResolver(){return this._imageResolver}set imageResolver(e){e!==this._imageResolver&&(this._imageResolver=e,this._requestRestart())}get themes(){return this._themes}set themes(e){e!==this._themes&&(this._themes=e,this._requestRestart())}get _locale(){return this.getAttribute(`locale`)===`zh`?`zh`:`en`}get _colorScheme(){let e=this.getAttribute(`color-scheme`);return e===`light`||e===`dark`?e:`auto`}get _themeOverride(){return this.getAttribute(`theme`)?.trim()||void 0}_requestRestart(){this._connected&&!this._restartScheduled&&(this._restartScheduled=!0,queueMicrotask(()=>{this._restartScheduled=!1,this._connected&&this._start()}))}_start(){this._generation+=1;let e=this._generation;this._abortFetch(),this._clearStateTimer(),this._teardown(),this._load(e)}async _load(e){let t=this.getAttribute(`src`)?.trim()??``,n=this.source;if(t){if(this._cache&&this._cache.src===t)n=this._cache.text;else{let r=null;try{r=typeof AbortController==`function`?new AbortController:null,this._abort=r;let i=await fetch(t,r?{signal:r.signal}:{});if(!i.ok)throw Error(`HTTP ${i.status}${i.statusText?` ${i.statusText}`:``}`);let a=await i.text();if(!this._connected||e!==this._generation)return;this._cache={src:t,text:a},n=a}catch(n){if(!this._connected||e!==this._generation||GE(n))return;this._showError([iE(`standalone.fetch`,`Cannot load "${t}": ${oE(n)}`)]);return}finally{this._abort===r&&(this._abort=null)}}}if(this._connected&&e===this._generation){if(typeof n!=`string`)this._showError([iE(`standalone.source`,`The <reactive-md-doc> element requires a "src" attribute or a "source" attribute/property.`)]);else try{let t=RE(this,{source:n,state:this._state,locale:this._locale,colorScheme:this._colorScheme,themes:this._themes,urlPolicy:this._urlPolicy,imageResolver:this._imageResolver},{theme:this._themeOverride,onDiagnostics:e=>this._emitDiagnostics(e),onStateChange:e=>this._queueState(e)});if(!this._connected||e!==this._generation){try{t.unmount()}catch{}return}this._session=t}catch(e){this._session=null,this._showError(cE(e))}}}_teardown(){let e=this._session;if(this._session=null,e)try{e.unmount()}catch{}}_abortFetch(){let e=this._abort;if(this._abort=null,e)try{e.abort()}catch{}}_clearStateTimer(){this._stateTimer!==null&&(clearTimeout(this._stateTimer),this._stateTimer=null),this._pendingState=null}_queueState(e){this._connected&&(this._pendingState=e,this._stateTimer===null&&(this._stateTimer=setTimeout(()=>{this._stateTimer=null;let e=this._pendingState;this._pendingState=null,this._connected&&e&&this._dispatch(uE,e)},0)))}_emitDiagnostics(e){this._connected&&e.length!==0&&this._dispatch(lE,e)}_showError(e){if(!this._connected)return;this._teardown(),this._clearStateTimer();let t=this.ownerDocument;for(;this.firstChild;)this.removeChild(this.firstChild);let n=t.createElement(`div`);n.className=`local-inactive reactive-md-standalone-error`,n.setAttribute(`role`,`alert`),n.setAttribute(`data-reactive-md-error`,``);let r=t.createElement(`p`);if(r.className=`local-inactive-title`,r.textContent=this._locale===`zh`?`无法加载交互文档。`:`This interactive document could not be loaded.`,n.appendChild(r),e.length>0){let r=t.createElement(`ul`);r.className=`local-inactive-list`;for(let n of e.slice(0,12)){let e=t.createElement(`li`);e.textContent=`${n.message} (line ${n.line}, column ${n.column})`,r.appendChild(e)}n.appendChild(r)}this.appendChild(n),this._emitDiagnostics(e)}_dispatch(e,t){if(!this._connected)return;let n=this.ownerDocument.defaultView?.CustomEvent;if(typeof n==`function`)try{this.dispatchEvent(new n(e,{detail:t,bubbles:!0,composed:!0}))}catch{}}};function qE(){typeof customElements<`u`&&(customElements.get(`reactive-md-doc`)||customElements.define(UE,KE))}qE();var JE=!1;function YE(){if(JE||typeof document>`u`)return;JE=!0;let e=()=>{try{HE(document)}catch(e){typeof console<`u`&&typeof console.error==`function`&&console.error(`Reactive MD: automatic mounting failed.`,e)}};document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,e,{once:!0}):queueMicrotask(e)}return YE(),e.REACTIVE_MD_DIAGNOSTICS_EVENT=lE,e.REACTIVE_MD_DOC_TAG=UE,e.REACTIVE_MD_MOUNTED_ATTRIBUTE=OE,e.REACTIVE_MD_STANDALONE_GENERATOR=DE,e.REACTIVE_MD_STANDALONE_VERSION=EE,e.REACTIVE_MD_STATE_CHANGE_EVENT=uE,e.ReactiveMDDocElement=KE,e.ReactiveMDMountError=sE,e.defineReactiveMDDoc=qE,e.diagnosticsFromError=cE,e.isReactiveMDMounted=PE,e.mount=zE,e.mountAll=HE,e.parseMountPayload=SE,e.prepareStandaloneDocument=TE,e})({});
|
|
67
|
+
`),1;if(I>1e5&&I>r.index*3)throw Error(`potential infinite loop, way more iterations than matches`);return P+=a,a.length}let D=N(e);if(!D)throw he(s.replace(`{}`,e)),Error(`Unknown language: "`+e+`"`);let O=we(D),k=``,A=a||O,j={},M=new l.__emitter(l);w();let P=``,F=0,ee=0,I=0,te=!1;try{if(D.__emitTokens)D.__emitTokens(n,M);else{for(A.matcher.considerAll();;){I++,te?te=!1:A.matcher.considerAll(),A.matcher.lastIndex=ee;let e=A.matcher.exec(n);if(!e)break;let t=E(n.substring(ee,e.index),e);ee=e.index+t}E(n.substring(ee))}return M.finalize(),k=M.toHTML(),{language:e,value:k,relevance:F,illegal:!1,_emitter:M,_top:A}}catch(t){if(t.message&&t.message.includes(`Illegal`))return{language:e,value:ke(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:ee,context:n.slice(ee-100,ee+100),mode:t.mode,resultSoFar:k},_emitter:M};if(o)return{language:e,value:ke(n),illegal:!1,relevance:0,errorRaised:t,_emitter:M,_top:A};throw t}}function b(e){let t={value:ke(e),illegal:!1,relevance:0,_top:c,_emitter:new l.__emitter(l)};return t._emitter.addText(e),t}function S(e,n){n=n||l.languages||Object.keys(t);let r=b(e),i=n.filter(N).filter(F).map(t=>v(t,e,!1));i.unshift(r);let[a,o]=i.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(N(e.language).supersetOf===t.language)return 1;if(N(t.language).supersetOf===e.language)return-1}return 0}),s=a;return s.secondBest=o,s}function C(e,t,n){let r=t&&i[t]||n;e.classList.add(`hljs`),e.classList.add(`language-${r}`)}function w(e){let t=null,n=d(e);if(u(n))return;if(ne(`before:highlightElement`,{el:e,language:n}),e.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);return}if(e.children.length>0&&(l.ignoreUnescapedHTML||(console.warn(`One of your code blocks includes unescaped HTML. This is a potentially serious security risk.`),console.warn(`https://github.com/highlightjs/highlight.js/wiki/security`),console.warn(`The element with unescaped HTML:`),console.warn(e)),l.throwUnescapedHTML))throw new Oe(`One of your code blocks includes unescaped HTML.`,e.innerHTML);t=e;let r=t.textContent,i=n?p(r,{language:n,ignoreIllegals:!0}):S(r);e.innerHTML=i.value,e.dataset.highlighted=`yes`,C(e,n,i.language),e.result={language:i.language,re:i.relevance,relevance:i.relevance},i.secondBest&&(e.secondBest={language:i.secondBest.language,relevance:i.secondBest.relevance}),ne(`after:highlightElement`,{el:e,result:i,text:r})}function T(e){l=Ae(l,e)}let E=()=>{k(),_e(`10.6.0`,`initHighlighting() deprecated. Use highlightAll() now.`)};function D(){k(),_e(`10.6.0`,`initHighlightingOnLoad() deprecated. Use highlightAll() now.`)}let O=!1;function k(){function e(){k()}document.readyState===`loading`?(O||window.addEventListener(`DOMContentLoaded`,e,!1),O=!0):document.querySelectorAll(l.cssSelector).forEach(w)}function A(n,r){let i=null;try{i=r(e)}catch(e){if(he(`Language definition for '{}' could not be registered.`.replace(`{}`,n)),o)he(e);else throw e;i=c}i.name||(i.name=n),t[n]=i,i.rawDefinition=r.bind(null,e),i.aliases&&P(i.aliases,{languageName:n})}function j(e){delete t[e];for(let t of Object.keys(i))i[t]===e&&delete i[t]}function M(){return Object.keys(t)}function N(e){return e=(e||``).toLowerCase(),t[e]||t[i[e]]}function P(e,{languageName:t}){typeof e==`string`&&(e=[e]),e.forEach(e=>{i[e.toLowerCase()]=t})}function F(e){let t=N(e);return t&&!t.disableAutodetect}function ee(e){e[`before:highlightBlock`]&&!e[`before:highlightElement`]&&(e[`before:highlightElement`]=t=>{e[`before:highlightBlock`](Object.assign({block:t.el},t))}),e[`after:highlightBlock`]&&!e[`after:highlightElement`]&&(e[`after:highlightElement`]=t=>{e[`after:highlightBlock`](Object.assign({block:t.el},t))})}function I(e){ee(e),a.push(e)}function te(e){let t=a.indexOf(e);t!==-1&&a.splice(t,1)}function ne(e,t){let n=e;a.forEach(function(e){e[n]&&e[n](t)})}function ie(e){return _e(`10.7.0`,`highlightBlock will be removed entirely in v12.0`),_e(`10.7.0`,`Please use highlightElement now.`),w(e)}Object.assign(e,{highlight:p,highlightAuto:S,highlightAll:k,highlightElement:w,highlightBlock:ie,configure:T,initHighlighting:E,initHighlightingOnLoad:D,registerLanguage:A,unregisterLanguage:j,listLanguages:M,getLanguage:N,registerAliases:P,autoDetection:F,inherit:Ae,addPlugin:I,removePlugin:te}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=De,e.regex={concat:_,lookahead:m,either:y,optional:g,anyNumberOfTimes:h};for(let e in re)typeof re[e]==`object`&&n(re[e]);return Object.assign(e,re),e},Pe=Ne({});Pe.newInstance=()=>Ne({}),t.exports=Pe,Pe.HighlightJS=Pe,Pe.default=Pe}))()).default,sC={},cC=`hljs-`;function lC(e){let t=oC.newInstance();return e&&a(e),{highlight:n,highlightAuto:r,listLanguages:i,register:a,registerAlias:o,registered:s};function n(e,n,r){let i=r||sC,a=typeof i.prefix==`string`?i.prefix:cC;if(!t.getLanguage(e))throw Error("Unknown language: `"+e+"` is not registered");t.configure({__emitter:uC,classPrefix:a});let o=t.highlight(n,{ignoreIllegals:!0,language:e});if(o.errorRaised)throw Error("Could not highlight with `Highlight.js`",{cause:o.errorRaised});let s=o._emitter.root,c=s.data;return c.language=o.language,c.relevance=o.relevance,s}function r(e,r){let a=(r||sC).subset||i(),o=-1,s=0,c;for(;++o<a.length;){let i=a[o];if(!t.getLanguage(i))continue;let l=n(i,e,r);l.data&&l.data.relevance!==void 0&&l.data.relevance>s&&(s=l.data.relevance,c=l)}return c||{type:`root`,children:[],data:{language:void 0,relevance:s}}}function i(){return t.listLanguages()}function a(e,n){if(typeof e==`string`)t.registerLanguage(e,n);else{let n;for(n in e)Object.hasOwn(e,n)&&t.registerLanguage(n,e[n])}}function o(e,n){if(typeof e==`string`)t.registerAliases(typeof n==`string`?n:[...n],{languageName:e});else{let n;for(n in e)if(Object.hasOwn(e,n)){let r=e[n];t.registerAliases(typeof r==`string`?r:[...r],{languageName:n})}}}function s(e){return!!t.getLanguage(e)}}var uC=class{constructor(e){this.options=e,this.root={type:`root`,children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(e){if(e===``)return;let t=this.stack[this.stack.length-1],n=t.children[t.children.length-1];n&&n.type===`text`?n.value+=e:t.children.push({type:`text`,value:e})}startScope(e){this.openNode(String(e))}endScope(){this.closeNode()}__addSublanguage(e,t){let n=this.stack[this.stack.length-1],r=e.root.children;t?n.children.push({type:`element`,tagName:`span`,properties:{className:[t]},children:r}):n.children.push(...r)}openNode(e){let t=this,n=e.split(`.`).map(function(e,n){return n?e+`_`.repeat(n):t.options.classPrefix+e}),r=this.stack[this.stack.length-1],i={type:`element`,tagName:`span`,properties:{className:n},children:[]};r.children.push(i),this.stack.push(i)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return``}},dC=2e4,fC=100,pC=2e3,mC=lC(aC),hC={js:`javascript`,jsx:`javascript`,mjs:`javascript`,cjs:`javascript`,ts:`typescript`,tsx:`typescript`,py:`python`,sh:`bash`,shell:`bash`,zsh:`bash`,html:`xml`,htm:`xml`,svg:`xml`,xml:`xml`,json:`json`,jsonc:`json`,json5:`json`,css:`css`,md:`markdown`,markdown:`markdown`,yml:`yaml`,yaml:`yaml`};function gC(e){if(e===void 0)return null;let t=e.trim().toLowerCase();return t.startsWith(`language-`)&&(t=t.slice(9)),t===``?null:t}function _C(e){let t=Object.hasOwn(hC,e)?hC[e]:void 0;return t!==void 0&&mC.registered(t)?t:mC.registered(e)?e:null}function vC(e){let t=e.className,n=(Array.isArray(t)?t:typeof t==`string`?[t]:[]).filter(e=>typeof e==`string`&&/^[A-Za-z0-9_-]+$/.test(e));return n.length>0?n.join(` `):void 0}function yC(e){let t=``,n=0,r=[...e].reverse();for(;r.length>0;){let e=r.pop();if(n+=1,n>dC)return null;if(e.type===`text`)t+=e.value;else{if(e.type!==`element`||e.tagName!==`span`)return null;for(let t=e.children.length-1;t>=0;--t)r.push(e.children[t])}}return t}function bC(e,t=0){if(t>fC)throw Error(`Code token tree is nested too deeply.`);return e.map((e,n)=>e.type===`text`?e.value:e.type===`element`&&e.tagName===`span`?(0,$.jsx)(`span`,{className:vC(e.properties),children:bC(e.children,t+1)},n):null)}function xC(e,t){let n=gC(t);if(n===null||e===``||e.length>2e4)return{nodes:null,highlighted:!1};let r=_C(n);if(r===null)return{nodes:null,highlighted:!1};try{let t=mC.highlight(r,e);if(yC(t.children)!==e)return{nodes:null,highlighted:!1};let n=bC(t.children);return n.length===0&&e!==``?{nodes:null,highlighted:!1}:{nodes:n,highlighted:!0}}catch{return{nodes:null,highlighted:!1}}}function SC(e){if(typeof document>`u`||document.body===null)return!1;let t=document.activeElement,n=typeof window>`u`?null:window.getSelection(),r=[];if(n!==null)for(let e=0;e<n.rangeCount;e+=1)r.push(n.getRangeAt(e).cloneRange());let i=document.createElement(`textarea`);i.value=e,i.setAttribute(`readonly`,``),i.setAttribute(`aria-hidden`,`true`),i.tabIndex=-1,i.style.position=`fixed`,i.style.top=`-1000px`,i.style.left=`-1000px`,i.style.opacity=`0`,document.body.appendChild(i);let a=!1;try{i.focus({preventScroll:!0}),i.select(),i.setSelectionRange(0,i.value.length),a=typeof document.execCommand==`function`&&document.execCommand(`copy`)}catch{a=!1}finally{if(i.remove(),t!==null&&typeof t.focus==`function`)try{t.focus({preventScroll:!0})}catch{}if(n!==null){n.removeAllRanges();for(let e of r)n.addRange(e)}}return a}async function CC(e){if(typeof navigator<`u`&&navigator.clipboard&&typeof navigator.clipboard.writeText==`function`)try{return await navigator.clipboard.writeText(e),!0}catch{return SC(e)}return SC(e)}var wC=/^[a-z0-9][a-z0-9+#._-]*$/;function TC({value:e,language:t,mode:n,htmlProps:r}){let i=by(),a=(0,y.useMemo)(()=>xC(e,t),[e,t]),[o,s]=(0,y.useState)({value:e,state:`idle`}),c=(0,y.useRef)(e),l=(0,y.useRef)(null),u=(0,y.useRef)(!0);c.current=e;let d=o.value===e?o.state:`idle`;(0,y.useEffect)(()=>(u.current=!0,()=>{u.current=!1,l.current!==null&&(clearTimeout(l.current),l.current=null)}),[]),(0,y.useEffect)(()=>{l.current!==null&&(clearTimeout(l.current),l.current=null),s({value:e,state:`idle`})},[e]);let f=(0,y.useCallback)(async()=>{let t=e;l.current!==null&&(clearTimeout(l.current),l.current=null);let n=await CC(t);u.current&&c.current===t&&(s({value:t,state:n?`success`:`error`}),l.current=setTimeout(()=>{l.current=null,u.current&&s(e=>e.value===t?{value:t,state:`idle`}:e)},pC))},[e]),p=gC(t),m=t!==void 0&&t.trim()!==``?t.trim():i(`Text`,`文本`),h=[a.highlighted?`hljs`:``,p!==null&&wC.test(p)?`language-${p}`:``].filter(e=>e!==``).join(` `)||void 0,g=d===`success`?i(`Copied`,`已复制`):d===`error`?i(`Copy failed`,`复制失败`):``;return(0,$.jsxs)(`div`,{className:`md-code-block`,"data-code-mode":n,children:[(0,$.jsxs)(`div`,{className:`md-code-block-toolbar`,children:[(0,$.jsx)(`span`,{className:`md-code-block-language`,children:m}),n===`interactive`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{className:`md-code-block-feedback`,"data-state":d,role:`status`,"aria-live":`polite`,children:g}),(0,$.jsx)(`button`,{type:`button`,className:`md-code-block-copy`,"aria-label":i(`Copy code`,`复制代码`),onClick:()=>{f()},children:i(`Copy`,`复制`)})]})]}),(0,$.jsx)(`pre`,{className:`md-code`,...r,children:(0,$.jsx)(`code`,{className:h,children:a.nodes??e})})]})}var EC=g();function DC({src:e,alt:t,title:n,mode:r,rootRef:i,imageProps:a}){let o=by(),s=(0,y.useRef)(null),c=(0,y.useRef)(null),l=(0,y.useRef)(!1),u=(0,y.useRef)(e),[d,f]=(0,y.useState)(!1),[p,m]=(0,y.useState)(!1),[h,g]=(0,y.useState)(null),[_,v]=(0,y.useState)(null),b=(0,y.useCallback)(()=>{let e=s.current;if(e&&e.isConnected)try{e.focus({preventScroll:!0})}catch{e.focus()}},[]),x=(0,y.useCallback)(()=>{l.current&&(l.current=!1,m(!1),b())},[b]),S=(0,y.useCallback)(()=>{let e=c.current;if(e?.open)try{e.close()}catch{}x()},[x]),C=(0,y.useCallback)(()=>{let t=i.current;t&&!l.current&&(v(e),g(t),l.current=!0,m(!0))},[i,e]);(0,y.useEffect)(()=>{if(r!==`interactive`){f(!1),S();return}let e=s.current;f(e!==null&&e.closest(`a`)===null)},[r,e,S]),(0,y.useEffect)(()=>{u.current!==e&&(u.current=e,l.current&&S())},[e,S]),(0,y.useEffect)(()=>{if(!p)return;let e=c.current;if(e&&!e.open){if(typeof e.showModal!=`function`)x();else try{e.showModal()}catch{x()}}},[p,x]);let w=d?{role:`button`,tabIndex:0,"aria-haspopup":`dialog`,"aria-label":t?void 0:o(`View image`,`查看图片`),"data-zoomable":`true`,onClick:e=>{e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.currentTarget.closest(`a`)||C()},onKeyDown:e=>{e.key!==`Enter`&&e.key!==` `&&e.key!==`Spacebar`||e.currentTarget.closest(`a`)||(e.preventDefault(),C())}}:{},T=(0,$.jsx)(`img`,{ref:s,className:`md-image`,...a,src:e,alt:t,title:n,loading:`lazy`,referrerPolicy:`no-referrer`,...w}),E=t||n?o(`Image preview: ${t||n}`,`图片预览:${t||n}`):o(`Image preview`,`图片预览`),D=!!(t||n),O=n&&n!==t?n:void 0;return(0,$.jsxs)($.Fragment,{children:[T,p&&h&&_===e?(0,EC.createPortal)((0,$.jsxs)(`dialog`,{ref:c,className:`md-image-zoom`,"aria-label":E,onClose:x,onKeyDown:e=>{e.key===`Tab`&&(e.preventDefault(),e.currentTarget.querySelector(`button`)?.focus())},onCancel:e=>{e.preventDefault(),S()},onClick:e=>{e.target===e.currentTarget&&S()},children:[(0,$.jsx)(`button`,{type:`button`,className:`md-image-zoom-close`,"aria-label":o(`Close image preview`,`关闭图片预览`),onClick:S,children:(0,$.jsx)(`span`,{"aria-hidden":`true`,children:`×`})}),(0,$.jsxs)(`figure`,{className:`md-image-zoom-figure`,children:[(0,$.jsx)(`img`,{className:`md-image-zoom-full`,src:e,alt:t,title:n,referrerPolicy:`no-referrer`}),D?(0,$.jsxs)(`figcaption`,{className:`md-image-zoom-caption`,children:[t?(0,$.jsx)(`span`,{children:t}):null,O?(0,$.jsx)(`span`,{className:`md-image-zoom-title`,children:O}):null]}):null]})]}),h):null]})}var OC=(0,y.createContext)(null);function kC(){let e=(0,y.useContext)(OC);if(!e)throw Error(`LocalViewContext is not initialized`);return e}var AC=`local.validation.failed`,jC=`local.validation.expression`,MC=2e3,NC={invalid:!1},PC={hintFor:()=>null,fieldFor:()=>NC};function FC(e){return`${e.start}:${e.end}`}function IC(e){return e.length>MC?`${e.slice(0,1999)}…`:e}function LC(e,t,n,r){let i=Array.isArray(e.validations)?e.validations:[];if(i.length===0)return PC;let a=null;try{typeof t.validate==`function`&&(a=t.validate())}catch{a=null}let o=new Map;for(let e of a??[])(e.code===AC||e.code===jC)&&o.set(FC(e.range),e);let s=new Map,c=new Map,l=new Map,u=r(`This rule cannot be evaluated`,`无法计算此规则`),d=r(`Validation failed.`,`校验未通过。`);for(let[t,r]of i.entries()){let i=FC(r.range),f=o.get(i),p=a===null||f?.code===jC,m=f?.code===AC,h=m?IC(f?.message||r.message||d):p?f?.message?`${u}: ${IC(f.message)}`:u:``,g={id:`${n}-validation-${t}`,failed:m,error:p,message:h};if(s.set(r.nodeId,g),c.set(i,g),m||p)for(let t of r.fields??[]){let n=Object.hasOwn(e.bindings,t)?e.bindings[t]:void 0;if(n)for(let e of n.nodeIds??[]){let t=l.get(e);t?t.includes(g.id)||t.push(g.id):l.set(e,[g.id])}}}return{hintFor(e){return c.get(FC(e.range))??s.get(e.id)??null},fieldFor(e){let t=l.get(e.id);return t&&t.length>0?{describedBy:t.join(` `),invalid:!0}:NC}}}function RC(e){return kC().validation.fieldFor(e)}var zC=/^\s*\{\{([\s\S]*)\}\}\s*$/,BC={revision:0,state:{}};function VC(e,t){return e.attrs?.[t]}function HC(e,t,n){let r=VC(t,n);if(r===void 0)return{present:!1};let i=zC.exec(r);if(!i)return{present:!0,ok:!0,value:r};try{return{present:!0,ok:!0,value:e.evaluate(i[1])}}catch{return{present:!0,ok:!1}}}function UC(e){return e===null?``:typeof e==`string`?e:typeof e==`number`?Number.isFinite(e)?String(e):null:typeof e==`boolean`?e?`true`:`false`:null}function WC(e,t,n,r=``,i=hy){let a=VC(t,n);if(a===void 0)return r;let o=zC.exec(a);try{return o?UC(e.evaluate(o[1]))??i(`Cannot compute`,`无法计算`):e.text(a)}catch{return i(`Cannot compute`,`无法计算`)}}function GC(e,t,n,r){let i=VC(t,n);if(i===void 0)return{ok:!0,value:r};let a=zC.exec(i);if(!a)return{ok:!0,value:i===`true`};try{let t=e.evaluate(a[1]);return typeof t==`boolean`?{ok:!0,value:t}:{ok:!1}}catch{return{ok:!1}}}function KC(e,t,n,r=!1){let i=GC(e,t,n,r);return i.ok?i.value:r}function qC(e,t,n,r,i){let a=VC(t,n);if(a===void 0)return{tone:i,error:!1};let o=zC.exec(a);if(!o){let e=a.trim();return{tone:r.includes(e)?e:i,error:!1}}try{let t=e.evaluate(o[1]);return typeof t==`string`&&r.includes(t)?{tone:t,error:!1}:{tone:i,error:!0}}catch{return{tone:i,error:!0}}}function JC(e){try{return e.snapshot().revision}catch{return 0}}function YC(e,t,n,r){let i=VC(t,n);if(i===void 0)return r;let a=zC.exec(i);try{let t=a?e.evaluate(a[1]):Number(i);return typeof t==`number`&&Number.isFinite(t)?t:r}catch{return r}}function XC(e,t){try{return e.get(t)}catch{return null}}function ZC(e){return UC(e)??``}var QC=`—`;function $C(e){return e.trim()===``?QC:e}function ew({label:e,value:t,hint:n,className:r=``,multiline:i=!1}){return(0,$.jsxs)(`div`,{className:`md-control local-static-control ${r}`.trim(),children:[(0,$.jsx)(`span`,{className:`md-label`,children:e}),(0,$.jsx)(`span`,{className:`local-static-value${i?` local-static-multiline`:``}`,"data-local-static-value":``,children:t}),n?(0,$.jsx)(`span`,{className:`md-hint`,children:n}):null]})}function tw({value:e,block:t=!1}){return t?(0,$.jsx)(`div`,{className:`local-print-value local-print-block`,"aria-hidden":`true`,"data-local-print-value":``,children:e}):(0,$.jsx)(`span`,{className:`local-print-value`,"aria-hidden":`true`,"data-local-print-value":``,children:e})}function nw(e){let t=VC(e,`color`);if(t===void 0)return;let n=t.trim();return n!==``&&qn(n)?n:void 0}function rw(e){if(e)return{"--local-accent":e,"--local-accent-soft":`color-mix(in srgb, ${e} 14%, var(--surface))`,"--local-accent-strong":e}}var iw=`(prefers-color-scheme: dark)`;function aw(e){if(!Array.isArray(e)||e.length===0)return``;try{return e.map(e=>{if(!e||typeof e!=`object`)return``;let t=Array.isArray(e.colorSchemes)?e.colorSchemes.join(``):``;return`${e.name}\u0000${e.protocol}\u0000${t}`}).join(``)}catch{return``}}function ow(e){return e.map(e=>`${e.code}\u0000${e.range.start}\u0000${e.range.end}\u0000${e.message}`).join(``)}function sw(e){return e===`light`||e===`dark`?e:null}function cw(e){let t=sw(e.getAttribute(`data-theme`));if(t)return t;let n=e.parentElement;for(;n;){let e=sw(n.getAttribute(`data-color-scheme`))??sw(n.getAttribute(`data-theme`));if(e)return e;n=n.parentElement}return null}function lw(){if(typeof window>`u`||typeof window.matchMedia!=`function`)return null;try{return window.matchMedia(iw).matches?`dark`:`light`}catch{return null}}function uw(e,t){let n=sw(t),[r,i]=(0,y.useState)(`light`);return(0,y.useEffect)(()=>{if(n){i(n);return}let t=e.current;if(!t||typeof window>`u`){i(`light`);return}let r=()=>i(cw(t)??lw()??`light`);r();let a=[];if(typeof MutationObserver==`function`)try{let e=(e,t)=>{let n=new MutationObserver(r);n.observe(e,{attributes:!0,attributeFilter:t}),a.push(n)};e(t,[`data-theme`]);let n=t.parentElement;for(;n;)e(n,[`data-color-scheme`,`data-theme`]),n=n.parentElement}catch{for(let e of a)e.disconnect();a=[]}let o=()=>r(),s=null;if(typeof window.matchMedia==`function`)try{s=window.matchMedia(iw),typeof s.addEventListener==`function`?s.addEventListener(`change`,o):typeof s.addListener==`function`&&s.addListener(o)}catch{s=null}return()=>{for(let e of a)e.disconnect();s&&(typeof s.removeEventListener==`function`?s.removeEventListener(`change`,o):typeof s.removeListener==`function`&&s.removeListener(o))}},[n,e]),n??r}function dw(e,t,n){return Math.min(n,Math.max(t,e))}function fw(e,t,n,r){let i=Number.isFinite(r)&&r>0?r:1,a=Math.max(0,Math.floor((n-t)/i+1e-9)),o=t+Math.max(0,Math.min(a,Math.round((e-t)/i)))*i;return Number(o.toPrecision(15))}function pw(e,t,n,r){try{let i=e.get(t,n);return typeof i==`number`&&Number.isFinite(i)?i:r}catch{return r}}function mw(e,t,n,r,i,a,o=1){let s=YC(e,t,n,i),c=YC(e,t,r,a);s>c&&([s,c]=[c,s]);let l=YC(e,t,`step`,o);return{min:s,max:c,step:Number.isFinite(l)&&l>0?l:1}}function hw(e){let{runtime:t,report:n}=kC(),r=vy(),i=by(),[a,o]=(0,y.useState)(null);return{write:(0,y.useCallback)((a,s)=>{try{let i=t.set(e,a,s);return i.length?(o(i.map(e=>et(e,r)).join(`; `)),n(i),!1):(o(null),!0)}catch(e){return o(e instanceof Error?e.message:i(`Cannot write`,`无法写入`)),!1}},[r,e,n,t,i]),writeMany:(0,y.useCallback)(a=>{try{let i=t.setMany(e,a);return i.length?(o(i.map(e=>et(e,r)).join(`; `)),n(i),!1):(o(null),!0)}catch(e){return o(e instanceof Error?e.message:i(`Cannot write`,`无法写入`)),!1}},[r,e,n,t,i]),error:a,setError:o}}function gw(e){let{runtime:t}=kC(),n=GC(t,e,`disabled`,!1);return n.ok?{disabled:n.value,invalid:!1}:{disabled:!0,invalid:!0}}function _w(e,t,n){let r=0;try{r=e.resetToken(t)}catch{r=0}let i=(0,y.useRef)(r),a=(0,y.useRef)(n);a.current=n,(0,y.useEffect)(()=>{i.current!==r&&(i.current=r,a.current())},[r])}function vw({message:e}){let t=by();return(0,$.jsx)(`span`,{className:`local-error`,role:`alert`,children:e??t(`Cannot compute`,`无法计算`)})}var yw=class extends y.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidUpdate(e){this.state.failed&&e.revision!==this.props.revision&&this.setState({failed:!1})}render(){return this.state.failed?(0,$.jsx)(vw,{}):this.props.children}},bw=new Set([`table`,`chart`,`plot`,`timeline`,`diagram`]);function xw(e,t,n){if(!e)return null;let r=e.trim();if(!r)return null;let i=r.replace(/[\u0000- ]+/g,``),a=/^([a-z][a-z0-9+.-]*):/i.exec(i);if(a){let e=a[1].toLowerCase();if(!(t===`image`?e===`http`||e===`https`:e===`http`||e===`https`||e===`mailto`||e===`tel`))return null}if(!n)return t===`image`?null:r;try{return n(r,t)?r:null}catch{return null}}function Sw(e){return`h${Math.min(6,Math.max(1,e??1))}`}var Cw=/^(?:aria|data)-[a-z0-9_.:-]+$/,ww=new Set([`aria-labelledby`,`aria-describedby`,`aria-controls`,`aria-owns`,`aria-details`,`aria-errormessage`,`aria-flowto`,`aria-activedescendant`]);function Tw(e,t){let n=t.attrs;if(!n)return{};let r={},i=e.anchors.ids.get(t)??e.anchors.htmlIds.get(t);i&&(r.id=i);for(let[t,i]of Object.entries(n)){let n=t.toLowerCase();if(n!==`id`){if(n===`title`||n===`lang`)r[n]=i;else if(n===`dir`){let e=i.trim().toLowerCase();(e===`ltr`||e===`rtl`||e===`auto`)&&(r.dir=e)}else Cw.test(n)&&(r[n]=ww.has(n)?i.trim().split(/\s+/).filter(Boolean).map(t=>e.anchors.referenceId(t)).join(` `):i)}}return r}function Ew(e,t){if(e.node!==t.node||e.visible!==t.visible||e.resetToken!==t.resetToken||e.env!==t.env||e.depValues===null||t.depValues===null||e.depValues.length!==t.depValues.length)return!1;for(let n=0;n<e.depValues.length;n+=1)if(!Object.is(e.depValues[n],t.depValues[n]))return!1;return!0}var Dw=(0,y.memo)(function({node:e,index:t,visible:n,env:r}){return Pw(r,e,t,n,!0)},Ew);function Ow(e,t,n,r=!0){if(!t||t.length===0)return null;if(!r)return t.map((t,r)=>Pw(e,t,r,n,!1));let i=null,a=null;try{i=e.runtime.snapshot().state,a=Vn(e.runtime)}catch{i=null}let o=i;return t.map((t,r)=>{let i=e.dependencies.get(t.id),s=i==null||o===null||a===null?null:i.map(e=>o[e]),c=a?.get(t.id)??0;return(0,$.jsx)(Dw,{node:t,index:r,visible:n,env:e,depValues:s,resetToken:c},t.id||`${t.type}-${r}`)})}function kw(e,t){if(typeof t.value==`string`)return t.value;let{start:n,end:r}=t.range;return Number.isInteger(n)&&Number.isInteger(r)&&n>=0&&r>=n?e.runtime.document.source.slice(n,r):``}function Aw(e,t,n,r){return(0,$.jsx)(`span`,{className:r?`local-fallback local-fallback-block`:`local-fallback local-fallback-inline`,title:e.t(`Unsupported syntax shown as source`,`未支持的语法,已按源码原样显示`),"data-local-fallback":``,children:kw(e,t)},n)}function jw(e,t,n){return!t||t.length===0?null:t.map((t,r)=>t.type===`paragraph`||t.type===`root`?(0,$.jsx)(`span`,{children:Ow(e,t.children,n,!1)},t.id||`inline-${r}`):Pw(e,t,r,n,!1))}function Mw(e,t,n){let r=e.footnotes.siteFor(t);if(!r||!r.entry){let i=r?.label||Th(t)||`?`;return(0,$.jsx)(`span`,{className:`local-footnote-missing`,title:e.t(`Undefined footnote`,`未定义的脚注`),"data-local-footnote-missing":``,children:`[^${i}]`},n)}let i=r.entry;return(0,$.jsx)(`sup`,{className:`local-footnote-ref`,children:(0,$.jsx)(`a`,{id:r.id,href:`#${i.id}`,className:`local-footnote-ref-link`,role:`doc-noteref`,"data-local-footnote-number":i.number,"aria-label":e.t(`Footnote ${i.number}`,`脚注 ${i.number}`),children:i.number})},n)}function Nw(e,t,n,r){let i=t.name??``,a=t=>(0,$.jsx)(`span`,{className:`local-host-component local-host-unavailable`,"data-local-host-component":i,"data-local-host-reason":t,role:`note`,children:e.t(`Host component <${i}> is unavailable here.`,`宿主组件 <${i}> 在此不可用。`)},n),o=t.attrs?.kind?.trim()??``,s=t.attrs?.ref?.trim()??``,c=o!==``&&s!==``?`${o}:${s}`:null,l=e.hostRenderer;if(!l)return a(`renderer`);if(c===null)return a(`data`);let u=e.hostData?.[c];if(u===void 0)return a(`data`);let d={runtime:e.runtime,render:(t,n=!0)=>Ow(e,t??[],n),visible:r,mode:e.mode};try{return(0,y.createElement)(y.Fragment,{key:n},l(t,u,d))}catch{return a(`error`)}}function Pw(e,t,n,r,i=!0){let a=t.id||`${t.type}-${n}`;if(t.type===`component`)return(0,$.jsx)(yw,{revision:JC(e.runtime),children:Iw(t,r,e.runtime,e.t)},a);switch(t.type){case`root`:return(0,$.jsx)(`div`,{children:Ow(e,t.children,r)},a);case`heading`:return(0,y.createElement)(Sw(t.depth),{key:a,id:e.anchors.ids.get(t),...Tw(e,t)},Ow(e,t.children,r,!1));case`paragraph`:return(0,$.jsx)(`p`,{...Tw(e,t),children:Ow(e,t.children,r,!1)},a);case`text`:return(0,$.jsx)(`span`,{children:t.value??``},a);case`emphasis`:return(0,$.jsx)(`em`,{...Tw(e,t),children:Ow(e,t.children,r,!1)},a);case`strong`:return(0,$.jsx)(`strong`,{...Tw(e,t),children:Ow(e,t.children,r,!1)},a);case`delete`:return(0,$.jsx)(`del`,{...Tw(e,t),children:Ow(e,t.children,r,!1)},a);case`underline`:return(0,$.jsx)(`u`,{...Tw(e,t),children:Ow(e,t.children,r,!1)},a);case`mark`:return(0,$.jsx)(`mark`,{...Tw(e,t),children:Ow(e,t.children,r,!1)},a);case`sup`:return(0,$.jsx)(`sup`,{...Tw(e,t),children:Ow(e,t.children,r,!1)},a);case`sub`:return(0,$.jsx)(`sub`,{...Tw(e,t),children:Ow(e,t.children,r,!1)},a);case`span`:return(0,$.jsx)(`span`,{...Tw(e,t),children:Ow(e,t.children,r,!1)},a);case`div`:return(0,$.jsx)(`div`,{...Tw(e,t),children:Ow(e,t.children,r)},a);case`summary`:return(0,$.jsx)(`span`,{...Tw(e,t),children:Ow(e,t.children,r,!1)},a);case`details`:return(0,$.jsx)(_T,{node:t,visible:r},a);case`inlineCode`:return(0,$.jsx)(`code`,{className:`md-inline-code`,...Tw(e,t),children:t.value??``},a);case`code`:return(0,$.jsx)(TC,{value:t.value??``,language:t.lang??void 0,mode:e.mode,htmlProps:Tw(e,t)},a);case`blockquote`:return(0,$.jsx)(`blockquote`,{...Tw(e,t),children:Ow(e,t.children,r)},a);case`break`:return(0,$.jsx)(`br`,{...Tw(e,t)},a);case`thematicBreak`:return(0,$.jsx)(`hr`,{...Tw(e,t)},a);case`list`:return t.ordered?(0,$.jsx)(`ol`,{start:t.start??1,className:`md-list`,...Tw(e,t),children:Ow(e,t.children,r)},a):(0,$.jsx)(`ul`,{className:`md-list`,...Tw(e,t),children:Ow(e,t.children,r)},a);case`listItem`:{let n=typeof t.checked==`boolean`;return(0,$.jsxs)(`li`,{className:n?`md-list-item md-task-item`:`md-list-item`,...Tw(e,t),children:[n?e.mode===`static`?(0,$.jsx)(`span`,{className:`md-task-marker`,role:`img`,"aria-label":t.checked?e.t(`Completed`,`已完成`):e.t(`Not completed`,`未完成`),children:t.checked?`✓`:`☐`}):(0,$.jsx)(`input`,{type:`checkbox`,className:`md-task-checkbox`,checked:t.checked===!0,readOnly:!0,tabIndex:-1,"aria-label":t.checked?e.t(`Completed`,`已完成`):e.t(`Not completed`,`未完成`)}):null,Ow(e,t.children,r)]},a)}case`link`:{let n=xw(t.url,`link`,e.urlPolicy);if(!n)return(0,y.createElement)(`span`,{...Tw(e,t),className:`md-link-rejected`,key:a,title:e.t(`Unsafe link URL rejected`,`已拒绝不安全的链接地址`)},Ow(e,t.children,r,!1));let i=e.anchors.resolve(n),o=/^https?:/i.test(i);return(0,$.jsx)(`a`,{...Tw(e,t),href:i,title:t.title??void 0,target:o?`_blank`:void 0,rel:o?`noopener noreferrer`:void 0,children:Ow(e,t.children,r,!1)},a)}case`image`:{let n=xw(t.url,`image`,e.urlPolicy),r=n;if(n&&e.imageResolver)try{let t=e.imageResolver(n);r=typeof t==`string`&&t.trim()!==``?t:null}catch{r=null}if(!r){let n=e.t(`Unsafe image rejected`,`已拒绝不安全的图片`),r=t.alt?e.t(`: ${t.alt}`,`:${t.alt}`):``;return(0,$.jsxs)(`span`,{className:`md-image-rejected`,...Tw(e,t),children:[`[`,n,r,`]`]},a)}return(0,$.jsx)(DC,{src:r,alt:t.alt??``,title:t.title??void 0,mode:e.mode,rootRef:e.rootRef,imageProps:t.attrs===void 0?void 0:{...Tw(e,t),width:t.width,height:t.height}},a)}case`table`:{let[n,...i]=t.children??[];return(0,$.jsx)(`div`,{className:`md-table-scroll`,children:(0,$.jsxs)(`table`,{className:`md-table`,children:[n?(0,$.jsx)(`thead`,{children:(0,$.jsx)(`tr`,{children:Fw(e,n,`th`,t.align,r)})}):null,i.length?(0,$.jsx)(`tbody`,{children:i.map((n,i)=>(0,$.jsx)(`tr`,{children:Fw(e,n,`td`,t.align,r)},n.id||`${a}-row-${i}`))}):null]})},a)}case`tableRow`:return(0,$.jsx)(`tr`,{children:Fw(e,t,`td`,void 0,r)},a);case`tableCell`:{let n=t.align?.[0]??void 0;return(0,$.jsx)(`td`,{style:{textAlign:n??void 0},children:Ow(e,t.children,r,!1)},a)}case`interpolation`:try{let n=UC(e.runtime.evaluate(t.value??``));if(n===null)throw Error(`Cannot display an array`);return(0,$.jsx)(`span`,{className:`local-interpolation`,children:n},a)}catch{return(0,$.jsx)(vw,{},a)}case`math`:case`inlineMath`:{let n=t.type===`math`;return(0,$.jsx)(`span`,{className:n?`local-math-display`:`local-math-inline`,children:(0,$.jsx)(yw,{revision:JC(e.runtime),children:(0,$.jsx)(py,{source:t.value??``,display:n})})},a)}case`html`:return(0,$.jsx)(`span`,{className:`md-raw-html`,children:t.value??``},a);case`fallback`:return Aw(e,t,a,i);case`footnoteReference`:return Mw(e,t,a);case`footnoteDefinition`:return null;case`comment`:case`definition`:return null;case`hostComponent`:return Nw(e,t,a,r);default:return t.children&&t.children.length?(0,$.jsx)(`span`,{children:Ow(e,t.children,r,i)},a):typeof t.value==`string`?(0,$.jsx)(`span`,{children:t.value},a):null}}function Fw(e,t,n,r,i){return(t.children??[]).map((a,o)=>{let s=a.align?.[0]??t.align?.[o]??r?.[o]??void 0;return n===`th`?(0,$.jsx)(`th`,{style:{textAlign:s??void 0},children:Ow(e,a.children,i,!1)},a.id||`${t.id}-h-${o}`):(0,$.jsx)(`td`,{style:{textAlign:s??void 0},children:Ow(e,a.children,i,!1)},a.id||`${t.id}-c-${o}`)})}function Iw(e,t,n,r){let i=e.name??``;if(i===`computed`||i===`const`)return null;if(i===`data-table`)return(0,$.jsx)($b,{node:e,visible:t,runtime:n,t:r});if(bw.has(i))return(0,$.jsx)(Lw,{node:e,visible:t});let a=FT[i];return a?(0,$.jsx)(a,{node:e,visible:t}):(0,$.jsxs)(`span`,{className:`component-error`,children:[r(`Unknown component "`,`未知组件“`),i||r(`(missing name)`,`(缺少名称)`),r(`"`,`”`)]})}function Lw({node:e,visible:t}){let{runtime:n,render:r,mode:i}=kC(),a=by(),o=RC(e),s=(0,$.jsx)(Bb,{node:e,runtime:n,render:r,visible:t,mode:i});if(!n.document.validations?.some(t=>t.fields.some(t=>Object.hasOwn(n.document.bindings,t)&&n.document.bindings[t].nodeIds.includes(e.id))))return s;let c=WC(n,e,`label`,WC(n,e,`title`,a(`Selection`,`选择`),a),a);return(0,$.jsx)(`div`,{role:`group`,"aria-label":c,"aria-invalid":o.invalid||void 0,"aria-describedby":o.describedBy,children:s})}function Rw({node:e,visible:t}){let{validation:n}=kC(),r=n.hintFor(e);if(!r)return null;let i=r.failed||r.error,a=t&&i;return(0,$.jsx)(`span`,{id:r.id,className:`local-validation-hint`,"data-local-validation":r.error?`error`:r.failed?`failed`:`passed`,role:a?`status`:void 0,"aria-live":a?`polite`:void 0,children:i?r.message:null})}function zw(){return null}function Bw({message:e}){return e?(0,$.jsx)(`span`,{className:`field-error`,role:`alert`,children:e}):null}function Vw(e,t,n=hy){if(t.required&&e.length===0)return n(`This field is required`,`请填写此字段`);if(e.length>1e5)return n(`At most ${w} characters`,`最多允许 ${w} 个字符`);if(t.email&&e!==``&&!N(e))return n(`Enter a valid email address`,`请输入有效的邮箱地址`);let r=tt(e);return t.minLength!==void 0&&t.minLength>0&&e!==``&&r<t.minLength?n(`At least ${t.minLength} characters`,`至少需要 ${t.minLength} 个字符`):t.maxLength!==void 0&&t.maxLength>=0&&r>t.maxLength?n(`At most ${t.maxLength} characters`,`最多允许 ${t.maxLength} 个字符`):null}function Hw({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=kC(),i=by(),{write:a,error:o,setError:s}=hw(e),c=WC(n,e,`label`,e.name??i(`Input`,`输入`),i),l=WC(n,e,`placeholder`,``,i),u=(VC(e,`type`)??`text`)===`email`,d=KC(n,e,`required`,!1),{disabled:f,invalid:p}=gw(e),m=RC(e),h=VC(e,`min-length`),g=VC(e,`max-length`),_=h===void 0?void 0:Math.max(0,Math.floor(YC(n,e,`min-length`,0))),v=g===void 0?void 0:Math.max(0,Math.floor(YC(n,e,`max-length`,0))),b=ZC(XC(n,e)),[x,S]=(0,y.useState)(b),[C,w]=(0,y.useState)(!1),[T,E]=(0,y.useState)(!1),[D,O]=(0,y.useState)(null),k=(0,y.useRef)(!1),A=(0,y.useRef)(b),j=(0,y.useRef)(b);if(j.current=b,(0,y.useEffect)(()=>{A.current!==b&&(A.current=b,!C&&!k.current&&S(b))},[b,C]),_w(n,e,()=>{k.current=!1,S(j.current),E(!1),O(null),s(null)}),r===`static`)return(0,$.jsx)(ew,{className:`local-input${u?` local-input-email`:``}`,label:c,value:$C(b)});let M=e=>Vw(e,{required:d,minLength:_,maxLength:v,email:u},i);return(0,$.jsxs)(`div`,{className:`md-control local-input${u?` local-input-email`:``}`,children:[(0,$.jsx)(`label`,{className:`md-label`,htmlFor:`${t}-input`,children:c}),(0,$.jsx)(`input`,{id:`${t}-input`,className:`md-text-input`,type:u?`email`:`text`,value:x,placeholder:l||void 0,disabled:f,required:d,"aria-invalid":D||o||m.invalid?!0:void 0,"aria-describedby":m.describedBy,onFocus:()=>w(!0),onBlur:()=>{w(!1),E(!0);let e=M(x);O(e),!e&&x!==b&&a(x)},onChange:e=>{let t=e.target.value;S(t),s(null),T&&O(M(t)),!k.current&&M(t)===null&&a(t)},onCompositionStart:()=>{k.current=!0},onCompositionEnd:e=>{k.current=!1;let t=e.currentTarget.value;S(t),T&&O(M(t)),M(t)===null&&a(t)}}),(0,$.jsx)(tw,{value:$C(b)}),(0,$.jsx)(Bw,{message:p?i(`Cannot compute`,`无法计算`):D??o})]})}function Uw({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=kC(),i=by(),{write:a,error:o,setError:s}=hw(e),c=WC(n,e,`label`,i(`Text`,`文本`),i),l=WC(n,e,`placeholder`,``,i),u=Math.min(40,Math.max(1,Math.floor(YC(n,e,`rows`,4)))),d=KC(n,e,`required`,!1),{disabled:f,invalid:p}=gw(e),m=RC(e),h=VC(e,`min-length`),g=VC(e,`max-length`),_=h===void 0?void 0:Math.max(0,Math.floor(YC(n,e,`min-length`,0))),v=g===void 0?void 0:Math.max(0,Math.floor(YC(n,e,`max-length`,0))),b=ZC(XC(n,e)),[x,S]=(0,y.useState)(b),[C,w]=(0,y.useState)(!1),[T,E]=(0,y.useState)(!1),[D,O]=(0,y.useState)(null),k=(0,y.useRef)(!1),A=(0,y.useRef)(b),j=(0,y.useRef)(b);if(j.current=b,(0,y.useEffect)(()=>{A.current!==b&&(A.current=b,!C&&!k.current&&S(b))},[b,C]),_w(n,e,()=>{k.current=!1,S(j.current),E(!1),O(null),s(null)}),r===`static`)return(0,$.jsx)(ew,{className:`local-textarea`,label:c,value:$C(b),multiline:!0});let M=e=>Vw(e,{required:d,minLength:_,maxLength:v},i);return(0,$.jsxs)(`div`,{className:`md-control local-textarea`,children:[(0,$.jsx)(`label`,{className:`md-label`,htmlFor:`${t}-textarea`,children:c}),(0,$.jsx)(`textarea`,{id:`${t}-textarea`,className:`md-text-input`,rows:u,value:x,placeholder:l||void 0,disabled:f,required:d,"aria-invalid":D||o||m.invalid?!0:void 0,"aria-describedby":m.describedBy,onFocus:()=>w(!0),onBlur:()=>{w(!1),E(!0);let e=M(x);O(e),!e&&x!==b&&a(x)},onChange:e=>{let t=e.target.value;S(t),s(null),T&&O(M(t)),!k.current&&M(t)===null&&a(t)},onCompositionStart:()=>{k.current=!0},onCompositionEnd:e=>{k.current=!1;let t=e.currentTarget.value;S(t),T&&O(M(t)),M(t)===null&&a(t)}}),(0,$.jsx)(tw,{value:$C(b),block:!0}),(0,$.jsx)(Bw,{message:p?i(`Cannot compute`,`无法计算`):D??o})]})}function Ww(e){let t=e.trim();if(t===``||t===`-`||t===`+`||t===`.`||t===`-.`)return{kind:`empty`};let n=Number(t);return Number.isFinite(n)?{kind:`valid`,value:n}:{kind:`invalid`}}function Gw(e,t,n,r,i=hy){let a=1e-9*Math.max(1,Math.abs(e));if(t!==void 0&&e<t-a)return i(`Must be at least ${t}`,`不能小于 ${t}`);if(n!==void 0&&e>n+a)return i(`Must be at most ${n}`,`不能大于 ${n}`);if(!Number.isFinite(r)||r<=0)return i(`Step must be greater than 0`,`步长必须大于 0`);let o=(e-(t??0))/r;return Math.abs(o-Math.round(o))>1e-9*Math.max(1,Math.abs(o))?i(`Must be a multiple of ${r}`,`需要按步长 ${r} 取值`):null}function Kw({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=kC(),i=by(),{write:a,error:o,setError:s}=hw(e),c=WC(n,e,`label`,i(`Number`,`数字`),i),{disabled:l,invalid:u}=gw(e),d=RC(e),f=VC(e,`min`)!==void 0,p=VC(e,`max`)!==void 0,m=f?YC(n,e,`min`,0):void 0,h=p?YC(n,e,`max`,0):void 0,g=YC(n,e,`step`,1),_=XC(n,e),v=typeof _==`number`&&Number.isFinite(_)?String(_):``,[b,x]=(0,y.useState)(v),[S,C]=(0,y.useState)(!1),[w,T]=(0,y.useState)(!1),[E,D]=(0,y.useState)(null),O=(0,y.useRef)(!1),k=(0,y.useRef)(v),A=(0,y.useRef)(v);A.current=v,(0,y.useEffect)(()=>{k.current!==v&&(k.current=v,!S&&!O.current&&x(v))},[v,S]),_w(n,e,()=>{O.current=!1,x(A.current),T(!1),D(null),s(null)});let j=(0,$.jsxs)($.Fragment,{children:[m===void 0?``:i(`Min ${m}`,`最小 ${m}`),m!==void 0&&h!==void 0?` · `:``,h===void 0?``:i(`Max ${h}`,`最大 ${h}`),g===void 0?``:i(` · Step ${g}`,` · 步长 ${g}`)]});if(r===`static`)return(0,$.jsx)(ew,{className:`local-number`,label:c,value:$C(v),hint:j});let M=(e,t)=>{let n=Ww(e);if(n.kind!==`valid`)return t&&D(i(`Enter a valid number`,`请输入有效数字`)),!1;let r=Gw(n.value,m,h,g,i);return r?(t&&D(r),!1):(D(null),a(n.value))};return(0,$.jsxs)(`div`,{className:`md-control local-number`,children:[(0,$.jsx)(`label`,{className:`md-label`,htmlFor:`${t}-number`,children:c}),(0,$.jsx)(`input`,{id:`${t}-number`,className:`md-text-input`,type:`text`,inputMode:`decimal`,value:b,disabled:l,"aria-invalid":E||o||d.invalid?!0:void 0,"aria-describedby":d.describedBy,onFocus:()=>C(!0),onBlur:()=>{C(!1),T(!0),M(b,!0)},onChange:e=>{let t=e.target.value;x(t),s(null),O.current||M(t,w)},onCompositionStart:()=>{O.current=!0},onCompositionEnd:e=>{O.current=!1,M(e.currentTarget.value,w)}}),(0,$.jsx)(tw,{value:$C(v)}),m!==void 0||h!==void 0||g!==void 0?(0,$.jsx)(`span`,{className:`md-hint`,children:j}):null,(0,$.jsx)(Bw,{message:u?i(`Cannot compute`,`无法计算`):E??o})]})}function qw({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=kC(),i=by(),{write:a,error:o}=hw(e),s=WC(n,e,`label`,i(`Slider`,`滑块`),i),{disabled:c,invalid:l}=gw(e),u=RC(e),d=YC(n,e,`min`,0),f=YC(n,e,`max`,100),p=YC(n,e,`step`,1),m=XC(n,e),h=Math.min(f,Math.max(d,typeof m==`number`&&Number.isFinite(m)?m:d));return r===`static`?(0,$.jsx)(ew,{className:`md-slider local-slider`,label:s,value:String(h)}):(0,$.jsxs)(`div`,{className:`md-control md-slider local-slider`,style:rw(nw(e)),children:[(0,$.jsxs)(`label`,{className:`md-label`,htmlFor:`${t}-slider`,children:[(0,$.jsx)(`span`,{children:s}),(0,$.jsx)(`span`,{className:`md-slider-value`,"aria-hidden":`true`,children:h})]}),(0,$.jsx)(`input`,{id:`${t}-slider`,type:`range`,min:d,max:f,step:p,value:h,disabled:c,"aria-invalid":u.invalid||void 0,"aria-describedby":u.describedBy,onChange:e=>a(Number(e.target.value))}),(0,$.jsx)(tw,{value:String(h)}),(0,$.jsx)(Bw,{message:l?i(`Cannot compute`,`无法计算`):o})]})}function Jw({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=kC(),i=by(),{write:a,error:o}=hw(e),s=WC(n,e,`label`,i(`Toggle`,`开关`),i),{disabled:c,invalid:l}=gw(e),u=RC(e),d=XC(n,e)===!0,f=d?i(`On`,`开`):i(`Off`,`关`);return r===`static`?(0,$.jsx)(ew,{className:`md-toggle local-toggle`,label:s,value:f}):(0,$.jsxs)(`div`,{className:`md-control md-toggle local-toggle`,style:rw(nw(e)),children:[(0,$.jsxs)(`label`,{className:`md-toggle-label`,htmlFor:`${t}-toggle`,children:[(0,$.jsx)(`input`,{id:`${t}-toggle`,type:`checkbox`,checked:d,disabled:c,"aria-invalid":u.invalid||void 0,"aria-describedby":u.describedBy,onChange:e=>a(e.target.checked)}),(0,$.jsx)(`span`,{children:s})]}),(0,$.jsx)(tw,{value:f}),(0,$.jsx)(Bw,{message:l?i(`Cannot compute`,`无法计算`):o})]})}function Yw({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=kC(),i=by(),{write:a,error:o}=hw(e),s=WC(n,e,`label`,i(`Checkbox`,`勾选`),i),{disabled:c,invalid:l}=gw(e),u=RC(e),d=XC(n,e)===!0,f=d?i(`Checked`,`已勾选`):i(`Unchecked`,`未勾选`);return r===`static`?(0,$.jsx)(ew,{className:`local-checkbox`,label:s,value:f}):(0,$.jsxs)(`div`,{className:`md-control local-checkbox`,style:rw(nw(e)),children:[(0,$.jsxs)(`label`,{className:`md-toggle-label`,htmlFor:`${t}-checkbox`,children:[(0,$.jsx)(`input`,{id:`${t}-checkbox`,type:`checkbox`,checked:d,disabled:c,"aria-invalid":u.invalid||void 0,"aria-describedby":u.describedBy,onChange:e=>a(e.target.checked)}),(0,$.jsx)(`span`,{children:s})]}),(0,$.jsx)(tw,{value:f}),(0,$.jsx)(Bw,{message:l?i(`Cannot compute`,`无法计算`):o})]})}function Xw({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=kC(),i=by(),{write:a,error:o}=hw(e),s=WC(n,e,`label`,i(`Date`,`日期`),i),{disabled:c,invalid:l}=gw(e),u=RC(e),d=KC(n,e,`required`,!1),f=WC(n,e,`min`,``,i),p=WC(n,e,`max`,``,i),m=XC(n,e),h=typeof m==`string`?m:``,[g,_]=(0,y.useState)(!1),v=g&&d&&h===``?i(`Select a date`,`请选择日期`):null;return r===`static`?(0,$.jsx)(ew,{className:`local-date`,label:s,value:$C(h)}):(0,$.jsxs)(`div`,{className:`md-control local-date`,children:[(0,$.jsx)(`label`,{className:`md-label`,htmlFor:`${t}-date`,children:s}),(0,$.jsx)(`input`,{id:`${t}-date`,className:`md-text-input`,type:`date`,value:h,min:f||void 0,max:p||void 0,required:d,disabled:c,"aria-invalid":v||o||u.invalid?!0:void 0,"aria-describedby":u.describedBy,onBlur:()=>_(!0),onChange:e=>{_(!0),a(e.target.value)}}),(0,$.jsx)(tw,{value:$C(h)}),(0,$.jsx)(Bw,{message:l?i(`Cannot compute`,`无法计算`):v??o})]})}function Zw(e){return(e.children??[]).filter(e=>e.type===`component`&&e.name===`option`).map((e,t)=>({value:VC(e,`value`)??`option-${t+1}`,node:e}))}function Qw(e,t,n=hy){if(!t)return``;let r=``;for(let i of t)if(i.type===`text`||i.type===`inlineCode`)r+=i.value??``;else if(i.type===`fallback`)r+=i.value??``;else if(i.type===`interpolation`)try{r+=UC(e.evaluate(i.value??``))??``}catch{r+=n(`Cannot compute`,`无法计算`)}else i.type===`break`?r+=` `:r+=Qw(e,i.children,n);return r}function $w(e,t,n=hy){return Qw(e,t.children,n)||VC(t,`value`)||``}function eT(){return null}function tT({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=kC(),i=by(),{write:a,error:o}=hw(e),s=WC(n,e,`label`,i(`Select`,`选择`),i),{disabled:c,invalid:l}=gw(e),u=RC(e),d=Zw(e),f=XC(n,e),p=typeof f==`string`?f:``,m=d.some(e=>e.value===p)?p:d[0]?.value??``,h=d.find(e=>e.value===m),g=h?$w(n,h.node,i)||m:``;return d.length===0?(0,$.jsx)(vw,{message:i(`Missing options`,`缺少选项`)}):r===`static`?(0,$.jsx)(ew,{className:`md-select local-select`,label:s,value:$C(g)}):(0,$.jsxs)(`div`,{className:`md-control md-select local-select`,style:rw(nw(e)),children:[(0,$.jsx)(`label`,{className:`md-label`,htmlFor:`${t}-select`,children:s}),(0,$.jsx)(`select`,{id:`${t}-select`,className:`md-select-input`,value:m,disabled:c,"aria-invalid":u.invalid||void 0,"aria-describedby":u.describedBy,onChange:e=>a(e.target.value),children:d.map(e=>(0,$.jsx)(`option`,{value:e.value,children:$w(n,e.node,i)||e.value},e.node.id))}),(0,$.jsx)(tw,{value:$C(g)}),(0,$.jsx)(Bw,{message:l?i(`Cannot compute`,`无法计算`):o})]})}function nT({node:e,visible:t}){let n=(0,y.useId)(),r=kC(),{runtime:i,mode:a}=r,o=by(),{write:s,error:c}=hw(e),l=WC(i,e,`label`,o(`Options`,`选项`),o),{disabled:u,invalid:d}=gw(e),f=RC(e),p=Zw(e),m=XC(i,e),h=typeof m==`string`?m:``,g=p.findIndex(e=>e.value===h),_=g>=0?g:0,v=g>=0?p[g]:void 0,b=v?$w(i,v.node,o):``,x=(0,y.useRef)([]);if(p.length===0)return(0,$.jsx)(vw,{message:o(`Missing options`,`缺少选项`)});if(a===`static`)return(0,$.jsx)(ew,{className:`local-choices`,label:l,value:$C(b)});let S=e=>{let t=p[e];t&&(s(t.value),x.current[e]?.focus())},C=(e,t)=>{let n=-1;e.key===`ArrowRight`||e.key===`ArrowDown`?n=(t+1)%p.length:e.key===`ArrowLeft`||e.key===`ArrowUp`?n=(t-1+p.length)%p.length:e.key===`Home`?n=0:e.key===`End`&&(n=p.length-1),!(n<0)&&(e.preventDefault(),S(n))};return(0,$.jsxs)(`div`,{className:`md-control local-choices`,style:rw(nw(e)),children:[(0,$.jsx)(`span`,{className:`md-label`,id:`${n}-choices-label`,children:l}),(0,$.jsx)(`div`,{className:`local-choice-list`,role:`radiogroup`,"aria-labelledby":`${n}-choices-label`,"aria-disabled":u||void 0,"aria-invalid":f.invalid||void 0,"aria-describedby":f.describedBy,children:p.map((e,n)=>{let i=e.value===h;return(0,$.jsx)(`button`,{ref:e=>{x.current[n]=e},type:`button`,role:`radio`,"aria-checked":i,tabIndex:n===_?0:-1,disabled:u,className:`local-choice${i?` is-selected`:``}`,onClick:()=>s(e.value),onKeyDown:e=>C(e,n),children:jw(r,e.node.children,t)},e.node.id)})}),(0,$.jsx)(tw,{value:$C(b)}),(0,$.jsx)(Bw,{message:d?o(`Cannot compute`,`无法计算`):c})]})}function rT({node:e,visible:t}){let n=(0,y.useId)(),r=kC(),{runtime:i,mode:a}=r,o=by(),{write:s,error:c}=hw(e),l=WC(i,e,`label`,o(`Options`,`选项`),o),{disabled:u,invalid:d}=gw(e),f=RC(e),p=Zw(e),m=XC(i,e),h=typeof m==`string`?m:``,g=n,_=p.find(e=>e.value===h),v=_?$w(i,_.node,o):``;return p.length===0?(0,$.jsx)(vw,{message:o(`Missing options`,`缺少选项`)}):a===`static`?(0,$.jsx)(ew,{className:`local-radio-group`,label:l,value:$C(v)}):(0,$.jsxs)(`fieldset`,{className:`md-control local-radio-group`,style:rw(nw(e)),disabled:u,"aria-invalid":f.invalid||void 0,"aria-describedby":f.describedBy,children:[(0,$.jsx)(`legend`,{className:`md-label`,children:l}),p.map(e=>(0,$.jsxs)(`label`,{className:`local-radio-option`,children:[(0,$.jsx)(`input`,{type:`radio`,name:g,value:e.value,checked:h===e.value,onChange:()=>s(e.value)}),(0,$.jsx)(`span`,{children:jw(r,e.node.children,t)})]},e.node.id)),(0,$.jsx)(tw,{value:$C(v)}),(0,$.jsx)(Bw,{message:d?o(`Cannot compute`,`无法计算`):c})]})}function iT(e){return((e.children??[]).find(e=>e.type===`list`)?.children??[]).filter(e=>e.type===`listItem`).map((e,t)=>({id:`item-${t+1}`,node:e}))}function aT({node:e,visible:t}){let n=(0,y.useId)(),r=kC(),{runtime:i,mode:a}=r,o=by(),{write:s,error:c}=hw(e),l=WC(i,e,`label`,o(`Checklist`,`清单`),o),{disabled:u,invalid:d}=gw(e),f=RC(e),p=iT(e),m=XC(i,e),h=Array.isArray(m)?m.filter(e=>typeof e==`string`):[];if(p.length===0)return(0,$.jsx)(vw,{message:o(`Checklist requires a task list`,`清单需要任务列表`)});let g=e=>e?o(`Checked`,`已勾选`):o(`Unchecked`,`未勾选`);if(a===`static`)return(0,$.jsxs)(`div`,{className:`local-checklist local-static-checklist`,style:rw(nw(e)),role:`group`,"aria-label":l,children:[(0,$.jsx)(`span`,{className:`md-label`,children:l}),(0,$.jsx)(`ul`,{className:`local-static-list`,children:p.map(e=>{let n=h.includes(e.id);return(0,$.jsxs)(`li`,{className:`local-static-list-item`,children:[(0,$.jsx)(`span`,{className:`local-static-state`,children:g(n)}),(0,$.jsx)(`span`,{className:`local-static-item${n?` is-checked`:``}`,children:jw(r,e.node.children,t)})]},e.id)})})]});let _=(e,t)=>{let n=new Set(h);t?n.add(e):n.delete(e),s(p.filter(e=>n.has(e.id)).map(e=>e.id))};return(0,$.jsxs)(`fieldset`,{className:`local-checklist`,style:rw(nw(e)),disabled:u,"aria-invalid":f.invalid||void 0,"aria-describedby":f.describedBy,children:[(0,$.jsx)(`legend`,{className:`md-label`,children:l}),p.map(e=>{let i=h.includes(e.id);return(0,$.jsxs)(`div`,{className:`local-checklist-item`,children:[(0,$.jsx)(`input`,{id:`${n}-${e.id}`,type:`checkbox`,checked:i,onChange:t=>_(e.id,t.target.checked)}),(0,$.jsx)(`label`,{className:`local-checklist-text${i?` is-checked`:``}`,htmlFor:`${n}-${e.id}`,children:jw(r,e.node.children,t)})]},e.id)}),(0,$.jsx)(tw,{block:!0,value:(0,$.jsx)(`ul`,{className:`local-static-list`,children:p.map(e=>{let t=h.includes(e.id);return(0,$.jsxs)(`li`,{className:`local-static-list-item`,children:[(0,$.jsx)(`span`,{className:`local-static-state`,children:g(t)}),(0,$.jsx)(`span`,{className:`local-static-item${t?` is-checked`:``}`,children:Qw(i,e.node.children,o)})]},e.id)})})}),(0,$.jsx)(Bw,{message:d?o(`Cannot compute`,`无法计算`):c})]})}function oT(e,t=hy){let n=Math.max(0,Math.floor(e)),r=Math.floor(n/60),i=n%60;return r===0?t(`${i} seconds`,`${i} 秒`):`${r}:${String(i).padStart(2,`0`)}`}function sT({node:e}){let{runtime:t,mode:n}=kC(),r=by(),{write:i,error:a}=hw(e),o=WC(t,e,`label`,r(`Counter`,`计数`),r),{disabled:s,invalid:c}=gw(e),l=RC(e),u=YC(t,e,`min`,0),d=VC(e,`max`)===void 0?void 0:YC(t,e,`max`,0),f=YC(t,e,`step`,1),p=XC(t,e),m=typeof p==`number`&&Number.isFinite(p)?p:u,h=Number.isFinite(f)&&f>0?f:1,g=1e-9*Math.max(1,Math.abs(m)),_=m-h>=u-g,v=d===void 0||m+h<=d+g;if(n===`static`)return(0,$.jsx)(ew,{className:`local-counter`,label:o,value:String(m)});let y=e=>{let t=Number((m+e*h).toFixed(12));i(t)};return(0,$.jsxs)(`div`,{className:`local-counter`,role:`group`,"aria-label":o,"aria-invalid":l.invalid||void 0,"aria-describedby":l.describedBy,children:[(0,$.jsx)(`span`,{className:`md-label`,children:o}),(0,$.jsxs)(`div`,{className:`local-counter-row`,children:[(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-secondary local-counter-button`,"aria-label":`${o} ${r(`decrease`,`减少`)}`,disabled:s||!_,onClick:()=>y(-1),children:`−`}),(0,$.jsx)(`span`,{className:`local-counter-value`,"aria-live":`polite`,children:m}),(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-secondary local-counter-button`,"aria-label":`${o} ${r(`increase`,`增加`)}`,disabled:s||!v,onClick:()=>y(1),children:`+`}),(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-quiet local-counter-reset`,disabled:s,onClick:()=>{try{t.reset(e)}catch{}},children:r(`Reset`,`恢复初值`)})]}),(0,$.jsx)(tw,{value:String(m)}),(0,$.jsx)(Bw,{message:c?r(`Cannot compute`,`无法计算`):a})]})}function cT({node:e,visible:t}){let{runtime:n,mode:r}=kC(),i=vy(),a=by(),o=WC(n,e,`label`,a(`Timer`,`计时器`),a),s=RC(e),c=YC(n,e,`duration`,60),l=Math.floor(c),u=XC(n,e),d=typeof u==`number`&&Number.isFinite(u)?Math.max(0,Math.ceil(u)):l,[f,p]=(0,y.useState)(!1),[m,h]=(0,y.useState)(!1),g=(0,y.useRef)(0),_=(0,y.useRef)(d);_.current=d;let[v,b]=(0,y.useState)(null),x=(0,y.useCallback)(t=>{try{let r=n.set(e,t);r.length&&b(r.map(e=>et(e,i)).join(`; `))}catch{}},[i,e,n]);return(0,y.useEffect)(()=>{if(!f)return;let e=window.setInterval(()=>{let e=Math.max(0,Math.ceil((g.current-performance.now())/1e3));e!==_.current&&(_.current=e,x(e)),e<=0&&(p(!1),h(!0))},200);return()=>window.clearInterval(e)},[f,x]),(0,y.useEffect)(()=>{if(t||!f)return;let e=Math.max(0,Math.ceil((g.current-performance.now())/1e3));_.current=e,x(e),p(!1)},[t,f,x]),_w(n,e,()=>{p(!1),h(!1),b(null)}),!Number.isFinite(c)||l<=0?(0,$.jsx)(vw,{message:a(`Timer duration must be a positive number of seconds`,`计时时长必须是大于 0 的秒数`)}):r===`static`?(0,$.jsx)(ew,{className:`local-timer`,label:o,value:oT(d,a)}):(0,$.jsxs)(`div`,{className:`local-timer`,role:`group`,"aria-label":o,"aria-invalid":s.invalid||void 0,"aria-describedby":s.describedBy,children:[(0,$.jsxs)(`div`,{className:`local-timer-head`,children:[(0,$.jsx)(`span`,{className:`md-label`,children:o}),(0,$.jsx)(`span`,{className:`local-timer-value`,role:`timer`,"aria-label":a(`${d} seconds remaining`,`剩余 ${d} 秒`),children:oT(d,a)})]}),(0,$.jsxs)(`div`,{className:`local-timer-controls`,children:[(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-primary`,onClick:()=>{if(f)return;let e=d>0?d:l;d<=0&&(_.current=l,x(l)),g.current=performance.now()+e*1e3,h(!1),b(null),p(!0)},disabled:f,children:a(`Start`,`开始`)}),(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-secondary`,onClick:()=>{if(!f)return;let e=Math.max(0,Math.ceil((g.current-performance.now())/1e3));_.current=e,x(e),p(!1)},disabled:!f,children:a(`Pause`,`暂停`)}),(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-quiet`,onClick:()=>{p(!1),h(!1),b(null),_.current=l;try{n.reset(e)}catch{}},children:a(`Reset`,`重置`)})]}),(0,$.jsx)(`span`,{className:`local-timer-status`,role:`status`,"aria-live":`polite`,children:m?a(`Completed`,`计时完成`):f?a(`Running`,`计时中`):a(`Paused`,`已暂停`)}),(0,$.jsx)(tw,{value:oT(d,a)}),(0,$.jsx)(Bw,{message:v})]})}function lT({node:e}){let{runtime:t}=kC(),n=by(),r=WC(t,e,`label`,n(`Progress`,`进度`),n),i=YC(t,e,`max`,100),a=HC(t,e,`value`);if(!Number.isFinite(i)||i<=0)return(0,$.jsx)(vw,{message:n(`Progress maximum must be positive`,`进度上限必须是正数`)});if(!a.present||!a.ok)return(0,$.jsx)(vw,{});let o=a.value,s=typeof o==`number`?o:typeof o==`string`&&o.trim()!==``?Number(o):NaN;if(!Number.isFinite(s))return(0,$.jsx)(vw,{});if(s<0||s>i)return(0,$.jsx)(vw,{message:n(`Progress value must be between 0 and ${i}`,`进度值需要在 0 到 ${i} 之间`)});let c=s/i*100,l=nw(e);return(0,$.jsxs)(`div`,{className:`local-progress`,style:l?{"--local-progress-color":l}:void 0,children:[(0,$.jsxs)(`div`,{className:`local-progress-head`,children:[(0,$.jsx)(`span`,{className:`md-label`,children:r}),(0,$.jsxs)(`span`,{className:`local-progress-value`,children:[Math.round(c),`%`]})]}),(0,$.jsx)(`div`,{className:`local-progress-track`,role:`progressbar`,"aria-label":r||n(`Progress`,`进度`),"aria-valuemin":0,"aria-valuemax":i,"aria-valuenow":s,children:(0,$.jsx)(`div`,{className:`local-progress-fill`,style:{width:`${c}%`}})})]})}function uT({node:e,visible:t}){let{runtime:n,render:r,mode:i}=kC(),a=by(),o=WC(n,e,`title`,``,a),s=KC(n,e,`reset`,!0)&&i!==`static`,[c,l]=(0,y.useState)(null);return(0,$.jsxs)(`section`,{className:`local-panel`,"aria-label":o||a(`Parameter panel`,`参数面板`),children:[o||s?(0,$.jsxs)(`div`,{className:`local-panel-head`,children:[o?(0,$.jsx)(`h3`,{className:`local-panel-title`,children:o}):(0,$.jsx)(`span`,{}),s?(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-quiet local-panel-reset`,onClick:()=>{try{n.reset(e),l(null)}catch(e){l(e instanceof Error?e.message:a(`Cannot reset`,`无法恢复默认`))}},"aria-label":o?a(`Reset ${o}`,`${o} 恢复默认`):a(`Reset`,`恢复默认`),children:a(`Reset`,`恢复默认`)}):null]}):null,(0,$.jsx)(`div`,{className:`local-panel-body`,children:r(e.children??[],t)}),(0,$.jsx)(Bw,{message:c})]})}function dT({node:e,visible:t}){let{runtime:n,render:r}=kC(),i=WC(n,e,`title`,``,by());return(0,$.jsxs)(`section`,{className:`md-card local-card`,children:[i?(0,$.jsx)(`h3`,{className:`md-card-title`,children:i}):null,(0,$.jsx)(`div`,{className:`md-card-body`,children:r(e.children??[],t)})]})}function fT({node:e,visible:t}){let{runtime:n,render:r}=kC(),i=Math.min(4,Math.max(1,Math.floor(YC(n,e,`columns`,2))));return(0,$.jsx)(`div`,{className:`local-grid`,style:{"--local-grid-columns":String(i)},children:r(e.children??[],t)})}function pT({node:e,visible:t}){let{render:n}=kC();return(0,$.jsx)(`div`,{className:`local-tabpanel-body`,children:n(e.children??[],t)})}function mT(){return null}function hT({node:e,visible:t}){let n=(0,y.useId)(),{runtime:r,render:i,mode:a}=kC(),o=by(),{write:s,error:c}=hw(e),l=WC(r,e,`label`,``,o),u=RC(e),d=(e.children??[]).filter(e=>e.type===`component`&&e.name===`tab`),f=d.map((e,t)=>VC(e,`value`)??`tab-${t+1}`),p=d.map((e,t)=>WC(r,e,`label`,f[t],o)),m=VC(e,`initial`)??f[0]??``,h=VC(e,`bind`)!==void 0,g=XC(r,e),_=typeof g==`string`?g:``,[v,b]=(0,y.useState)(()=>f.includes(m)?m:f[0]??``),x=(0,y.useRef)([]);if(_w(r,e,()=>{b(f.includes(m)?m:f[0]??``)}),d.length===0)return(0,$.jsx)(vw,{message:o(`Tabs requires at least one tab`,`标签页至少需要一个 tab`)});if(a===`static`)return(0,$.jsxs)(`section`,{className:`local-tabs local-static-tabs`,"aria-label":l||o(`Tabs`,`选项卡`),children:[l?(0,$.jsx)(`div`,{className:`local-tabs-label`,children:l}):null,d.map((e,n)=>(0,$.jsxs)(`section`,{className:`local-static-tab`,children:[(0,$.jsx)(`h4`,{className:`local-static-tab-label`,children:p[n]}),(0,$.jsx)(`div`,{className:`local-static-tab-body`,children:i(e.children??[],t)})]},e.id))]});let S=h?f.includes(_)?_:f[0]:f.includes(v)?v:f[0],C=Math.max(0,f.indexOf(S)),w=e=>{let t=f[e];t!==void 0&&(h?s(t):b(t),x.current[e]?.focus())};return(0,$.jsxs)(`section`,{className:`local-tabs`,"aria-label":l||o(`Tabs`,`选项卡`),"aria-invalid":u.invalid||void 0,"aria-describedby":u.describedBy,children:[l?(0,$.jsx)(`div`,{className:`local-tabs-label`,children:l}):null,(0,$.jsx)(`div`,{className:`local-tablist`,role:`tablist`,"aria-label":l||o(`Tabs`,`选项卡`),onKeyDown:e=>{let t=-1;e.key===`ArrowRight`?t=(C+1)%d.length:e.key===`ArrowLeft`?t=(C-1+d.length)%d.length:e.key===`Home`?t=0:e.key===`End`&&(t=d.length-1),!(t<0)&&(e.preventDefault(),w(t))},children:d.map((e,t)=>{let r=f[t],i=r===S;return(0,$.jsx)(`button`,{ref:e=>{x.current[t]=e},id:`${n}-tab-${t}`,type:`button`,role:`tab`,className:`local-tab${i?` is-selected`:``}`,"aria-selected":i,"aria-controls":`${n}-panel-${t}`,tabIndex:i?0:-1,onClick:()=>{h?s(r):b(r)},children:p[t]},e.id)})}),d.map((e,r)=>{let a=f[r]===S;return(0,$.jsxs)(`div`,{id:`${n}-panel-${r}`,className:`local-tabpanel`,role:`tabpanel`,"aria-labelledby":`${n}-tab-${r}`,tabIndex:0,hidden:!a,children:[(0,$.jsx)(tw,{block:!0,value:p[r]}),i(e.children??[],t&&a)]},e.id)}),(0,$.jsx)(Bw,{message:c})]})}function gT({node:e,visible:t}){let{runtime:n,render:r}=kC(),i=by(),a=WC(n,e,`label`,``,i);return(0,$.jsxs)(`div`,{className:`local-accordion`,role:`group`,"aria-label":a||i(`Accordion`,`折叠面板`),children:[a?(0,$.jsx)(`div`,{className:`local-accordion-label`,children:a}):null,r(e.children??[],t)]})}function _T({node:e,visible:t}){let n=(0,y.useId)(),r=kC(),{render:i,mode:a}=r,o=by(),s=e.children??[],c=s.find(e=>e.type===`summary`),l=s.findIndex(e=>e.type===`paragraph`&&e.children?.length===1&&e.children[0].type===`summary`),u=c??(l>=0?s[l].children[0]:void 0),d=s.filter((e,t)=>e!==u&&t!==l),f=u?(0,$.jsx)(`span`,{...Tw(r,u),children:jw(r,u.children,t)}):o(`Details`,`折叠内容`),p=e.attrs!==void 0&&Object.hasOwn(e.attrs,`open`),[m,h]=(0,y.useState)(p);if(_w(r.runtime,e,()=>h(p)),a===`static`)return(0,$.jsxs)(`section`,{className:`local-disclosure local-static-disclosure local-html-details`,...Tw(r,e),children:[(0,$.jsx)(`h3`,{className:`local-disclosure-heading`,children:f}),(0,$.jsx)(`div`,{className:`local-disclosure-panel`,children:i(d,t)})]});let g=`${n}-html-details-trigger`,_=`${n}-html-details-panel`;return(0,$.jsxs)(`div`,{className:`local-disclosure local-html-details`,...Tw(r,e),children:[(0,$.jsx)(`h3`,{className:`local-disclosure-heading`,children:(0,$.jsxs)(`button`,{id:g,type:`button`,className:`local-disclosure-trigger`,"aria-expanded":m,"aria-controls":_,onClick:()=>h(e=>!e),children:[(0,$.jsx)(`span`,{className:`local-chevron${m?` is-open`:``}`,"aria-hidden":`true`,children:`▸`}),(0,$.jsx)(`span`,{children:f})]})}),(0,$.jsx)(`div`,{id:_,className:`local-disclosure-panel`,role:`region`,"aria-labelledby":g,hidden:!m,children:i(d,t&&m)})]})}function vT({node:e,visible:t}){let n=(0,y.useId)(),{runtime:r,render:i,mode:a}=kC(),o=by(),s=WC(r,e,`label`,o(`Details`,`折叠内容`),o),c=KC(r,e,`open`,!1),[l,u]=(0,y.useState)(c);if(_w(r,e,()=>{u(c)}),a===`static`)return(0,$.jsxs)(`section`,{className:`local-disclosure local-static-disclosure`,children:[(0,$.jsx)(`h3`,{className:`local-disclosure-heading`,children:s}),(0,$.jsx)(`div`,{className:`local-disclosure-panel`,children:i(e.children??[],t)})]});let d=`${n}-disclosure-trigger`,f=`${n}-disclosure-panel`;return(0,$.jsxs)(`div`,{className:`local-disclosure`,children:[(0,$.jsxs)(`h3`,{className:`local-disclosure-heading`,children:[(0,$.jsxs)(`button`,{id:d,type:`button`,className:`local-disclosure-trigger`,"aria-expanded":l,"aria-controls":f,onClick:()=>u(e=>!e),children:[(0,$.jsx)(`span`,{className:`local-chevron${l?` is-open`:``}`,"aria-hidden":`true`,children:`▸`}),(0,$.jsx)(`span`,{children:s})]}),(0,$.jsx)(tw,{value:s})]}),(0,$.jsx)(`div`,{id:f,className:`local-disclosure-panel`,role:`region`,"aria-labelledby":d,hidden:!l,children:i(e.children??[],t&&l)})]})}function yT({node:e,visible:t}){let{runtime:n,render:r}=kC(),i=by(),a=GC(n,e,`when`,!1),o=a.ok?a.value:!1,s=!a.ok,c=(0,y.useRef)(null),l=(0,y.useRef)(o),u=(0,y.useRef)(!1);return(0,y.useEffect)(()=>{if(l.current&&!o){if(u.current){let e=c.current?.closest(`.local-document`);e&&(e.tabIndex=-1,e.focus({preventScroll:!0}))}u.current=!1}l.current=o},[o]),(0,$.jsxs)($.Fragment,{children:[s?(0,$.jsx)(vw,{}):null,(0,$.jsx)(`div`,{ref:c,className:`local-if md-if`,role:`group`,"aria-label":i(`Conditional content`,`条件内容`),tabIndex:-1,hidden:!o,"aria-hidden":!o,onFocus:()=>{u.current=!0},onBlur:e=>{c.current?.contains(e.relatedTarget)||(u.current=!1)},children:r(e.children??[],t&&o)})]})}function bT(){let e=by();return(0,$.jsx)(`span`,{className:`local-error local-tone-error`,role:`status`,children:e(`Invalid tone; using the default style`,`色调无效,已使用默认样式`)})}function xT({node:e,visible:t}){let{runtime:n,render:r}=kC(),i=WC(n,e,`title`,``,by()),{tone:a,error:o}=qC(n,e,`tone`,[`info`,`success`,`warning`],`info`),s=a===`warning`?`alert`:`status`;return(0,$.jsxs)($.Fragment,{children:[o?(0,$.jsx)(bT,{}):null,(0,$.jsxs)(`div`,{className:`local-alert local-alert-${a}`,role:s,children:[i?(0,$.jsx)(`div`,{className:`local-alert-title`,children:i}):null,(0,$.jsx)(`div`,{className:`local-alert-body`,children:r(e.children??[],t)})]})]})}function ST({node:e,visible:t}){let n=kC(),{runtime:r}=n,{tone:i,error:a}=qC(r,e,`tone`,[`neutral`,`success`,`warning`],`neutral`),o=nw(e);return(0,$.jsxs)($.Fragment,{children:[a?(0,$.jsx)(bT,{}):null,(0,$.jsx)(`span`,{className:`md-badge md-badge-${i} local-badge`,style:o?{color:o}:void 0,children:jw(n,e.children,t)})]})}function CT({node:e,visible:t}){let n=(0,y.useId)(),r=kC(),{runtime:i,mode:a}=r,o=by(),s=WC(i,e,`text`,o(`Tooltip`,`提示`),o),[c,l]=(0,y.useState)(!1),u=`${n}-tooltip`;return a===`static`?(0,$.jsxs)(`span`,{className:`local-tooltip local-static-tooltip`,children:[(0,$.jsx)(`span`,{className:`local-tooltip-trigger`,children:jw(r,e.children,t)}),(0,$.jsx)(`span`,{className:`local-tooltip-bubble is-visible`,role:`note`,children:s})]}):(0,$.jsxs)(`span`,{className:`local-tooltip`,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[(0,$.jsx)(`span`,{className:`local-tooltip-trigger`,tabIndex:0,"aria-describedby":u,onFocus:()=>l(!0),onBlur:()=>l(!1),onKeyDown:e=>{e.key===`Escape`&&(e.stopPropagation(),l(!1))},children:jw(r,e.children,t)}),(0,$.jsx)(`span`,{id:u,role:`tooltip`,className:`local-tooltip-bubble${c?` is-visible`:``}`,children:s}),(0,$.jsx)(tw,{value:s})]})}function wT({node:e,visible:t}){let n=(0,y.useId)(),r=kC(),{anchors:i,rootRef:a,runtime:o,urlPolicy:s,mode:c}=r,l=by(),u=`${n}-jump-feedback`,[d,f]=(0,y.useState)(null),p=VC(e,`to`)??``,m=i.targetId(p),h=VC(e,`appearance`)===`button`?`button`:`link`,g=nw(e),_=m?`#${m}`:`#`,v=m!==void 0;if(v&&s)try{v=s(`#${p}`,`link`)===!0}catch{v=!1}return _w(o,e,()=>f(null)),c===`static`?v&&m?(0,$.jsx)(`a`,{href:`#${m}`,className:`local-jump local-jump-link local-jump-static`,style:rw(g),children:jw(r,e.children,t)}):(0,$.jsx)(`span`,{className:`local-jump local-jump-static-blocked`,style:rw(g),children:jw(r,e.children,t)}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`a`,{href:v?_:`#`,className:`local-jump local-jump-${h}`,style:rw(g),"data-local-target-missing":m?void 0:`true`,"data-local-jump-blocked":m&&!v?`true`:void 0,"aria-describedby":d?u:void 0,onClick:e=>{if(!v||!m){e.preventDefault(),f(m?l(`Jump is blocked by the host`,`跳转已被主机策略阻止`):l(`Jump target not found`,`找不到跳转目标`));return}let t=a.current;if(!t||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let n=null;try{n=t.querySelector(`[id="${m}"]`)}catch{n=null}if(!n){e.preventDefault(),f(l(`Jump target not found`,`找不到跳转目标`));return}if(n.closest(`[hidden]`)){e.preventDefault(),f(l(`Jump target is hidden`,`跳转目标当前隐藏`));return}e.preventDefault(),n.hasAttribute(`tabindex`)||(n.tabIndex=-1);try{n.focus({preventScroll:!0})}catch{}let r=`smooth`;try{window.matchMedia(`(prefers-reduced-motion: reduce)`).matches&&(r=`auto`)}catch{r=`auto`}try{n.scrollIntoView({behavior:r,block:`start`})}catch{}f(null)},children:jw(r,e.children,t)}),d?(0,$.jsx)(`span`,{id:u,className:`local-jump-feedback`,role:`status`,"aria-live":`polite`,children:d}):null]})}function TT({node:e}){let{anchors:t}=kC(),n=t.anchorIds.get(e);return n?(0,$.jsx)(`span`,{className:`local-anchor`,id:n,"data-local-anchor":``}):null}function ET({node:e,visible:t}){let n=kC(),r=nw(e);return(0,$.jsx)(`span`,{className:`local-text`,style:r?{color:r}:void 0,children:jw(n,e.children,t)})}function DT({node:e,visible:t}){let{render:n}=kC(),r=nw(e);return(0,$.jsx)(`div`,{className:`local-section`,style:r?{color:r}:void 0,children:n(e.children??[],t)})}function OT({node:e,visible:t}){let n=(0,y.useId)(),r=kC(),{runtime:i,mode:a}=r,o=by(),{write:s,error:c,setError:l}=hw(e),u=WC(i,e,`label`,o(`Multi select`,`多选`),o),{disabled:d,invalid:f}=gw(e),p=RC(e),m=Zw(e),h=XC(i,e),g=Array.isArray(h)?h.filter(e=>typeof e==`string`):[],_=m.filter(e=>g.includes(e.value)).map(e=>$w(i,e.node,o)||e.value),v=YC(i,e,`max-selected`,m.length),b=Number.isFinite(v)?Math.max(0,Math.floor(v)):m.length,[x,S]=(0,y.useState)(``);if(_w(i,e,()=>{S(``),l(null)}),m.length===0)return(0,$.jsx)(vw,{message:o(`Missing options`,`缺少选项`)});if(a===`static`)return(0,$.jsx)(ew,{className:`local-multi-select`,label:u,value:$C(_.join(`, `))});let C=new Set(g),w=g.length>=b,T=x.trim().toLocaleLowerCase(),E=T?m.filter(e=>`${Qw(i,e.node.children,o)} ${e.value}`.toLocaleLowerCase().includes(T)):m,D=(e,t)=>{let n=new Set(C);if(t){if(!n.has(e)&&n.size>=b)return;n.add(e)}else n.delete(e);s(m.filter(e=>n.has(e.value)).map(e=>e.value))};return(0,$.jsxs)(`fieldset`,{className:`local-multi-select`,style:rw(nw(e)),disabled:d,"aria-invalid":p.invalid||void 0,"aria-describedby":p.describedBy,children:[(0,$.jsx)(`legend`,{className:`md-label`,children:u}),(0,$.jsxs)(`div`,{className:`local-multi-toolbar`,children:[(0,$.jsx)(`input`,{id:`${n}-multi-search`,type:`search`,className:`md-text-input local-multi-search`,value:x,placeholder:o(`Search options`,`搜索选项`),"aria-label":o(`Search ${u}`,`搜索${u}`),onChange:e=>S(e.target.value)}),(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-quiet local-multi-clear`,onClick:()=>{S(``),g.length>0&&s([])},children:o(`Clear`,`清除`)})]}),(0,$.jsx)(`div`,{className:`local-multi-list`,role:`group`,"aria-label":u,children:E.length===0?(0,$.jsx)(`span`,{className:`local-multi-empty`,children:o(`No matching options`,`没有匹配选项`)}):E.map(e=>{let n=C.has(e.value);return(0,$.jsxs)(`label`,{className:`local-multi-option${n?` is-selected`:``}`,children:[(0,$.jsx)(`input`,{type:`checkbox`,checked:n,disabled:!n&&w,onChange:t=>D(e.value,t.target.checked)}),(0,$.jsx)(`span`,{children:jw(r,e.node.children,t)})]},e.node.id)})}),(0,$.jsx)(`span`,{className:`local-multi-count`,role:`status`,"aria-live":`polite`,children:o(`${g.length} of ${b} selected`,`已选 ${g.length}/${b}`)}),(0,$.jsx)(tw,{value:$C(_.join(`, `))}),(0,$.jsx)(Bw,{message:f?o(`Cannot compute`,`无法计算`):c})]})}function kT({node:e}){let{runtime:t,mode:n}=kC(),r=by(),{write:i,error:a,setError:o}=hw(e),s=WC(t,e,`label`,r(`Range`,`范围`),r),{disabled:c,invalid:l}=gw(e),u=RC(e),{min:d,max:f,step:p}=mw(t,e,`min`,`max`,0,100,1),m=Math.floor((f-d)/p+1e-9),h=d,g=dw(d+Math.max(0,m)*p,d,f),_=fw(pw(t,e,`start`,h),d,f,p),v=fw(pw(t,e,`end`,g),d,f,p);_>v&&(_=v);let[b,x]=(0,y.useState)(null);_w(t,e,()=>{x(null),o(null)});let S=r(`Start`,`起点`),C=r(`End`,`终点`),w=`${S}: ${_} · ${C}: ${v}`;if(n===`static`)return(0,$.jsx)(ew,{className:`local-range-slider`,label:s,value:w});let T=(e,t)=>{let n=fw(dw(t,d,f),d,f,p);e===`start`&&n>v?x(r(`Start cannot exceed end`,`起点不能超过终点`)):e===`end`&&n<_?x(r(`End cannot be less than start`,`终点不能小于起点`)):(x(null),i(n,e))};return(0,$.jsxs)(`div`,{className:`md-control local-range-slider`,style:rw(nw(e)),role:`group`,"aria-label":s,"aria-invalid":u.invalid||void 0,"aria-describedby":u.describedBy,children:[(0,$.jsx)(`span`,{className:`md-label`,children:s}),(0,$.jsxs)(`div`,{className:`local-range-row`,children:[(0,$.jsx)(`span`,{className:`local-range-name`,children:r(`Start`,`起点`)}),(0,$.jsx)(`input`,{type:`range`,className:`local-range-input`,min:d,max:v,step:p,value:_,disabled:c,"aria-label":`${s} ${r(`Start`,`起点`)}`,onChange:e=>T(`start`,Number(e.target.value))}),(0,$.jsx)(`span`,{className:`local-range-value`,"aria-hidden":`true`,children:_})]}),(0,$.jsxs)(`div`,{className:`local-range-row`,children:[(0,$.jsx)(`span`,{className:`local-range-name`,children:r(`End`,`终点`)}),(0,$.jsx)(`input`,{type:`range`,className:`local-range-input`,min:_,max:f,step:p,value:v,disabled:c,"aria-label":`${s} ${r(`End`,`终点`)}`,onChange:e=>T(`end`,Number(e.target.value))}),(0,$.jsx)(`span`,{className:`local-range-value`,"aria-hidden":`true`,children:v})]}),(0,$.jsx)(tw,{value:w}),(0,$.jsx)(Bw,{message:l?r(`Cannot compute`,`无法计算`):b??a})]})}function AT({id:e,label:t,value:n,min:r,max:i,step:a,disabled:o,onCommit:s,reset:c}){let[l,u]=(0,y.useState)(()=>String(n)),[d,f]=(0,y.useState)(!1),p=(0,y.useRef)(n);(0,y.useEffect)(()=>{u(String(n)),f(!1)},[c]),(0,y.useEffect)(()=>{p.current!==n&&(p.current=n,d||u(String(n)))},[n,d]);let m=e=>{let t=e.trim();if(t===``||t===`-`||t===`.`||t===`-.`)return null;let n=Number(t);return Number.isFinite(n)?fw(dw(n,r,i),r,i,a):null};return(0,$.jsxs)(`div`,{className:`local-number-field`,children:[(0,$.jsx)(`label`,{className:`md-label`,htmlFor:e,children:t}),(0,$.jsx)(`input`,{id:e,className:`md-text-input`,type:`text`,inputMode:`decimal`,value:l,disabled:o,onFocus:()=>f(!0),onBlur:()=>{f(!1);let e=m(l);u(String(e??n))},onChange:e=>{let t=e.target.value;u(t);let n=m(t);n!==null&&s(n)}})]})}function jT({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=kC(),i=by(),{write:a,writeMany:o,error:s,setError:c}=hw(e),l=WC(n,e,`label`,i(`Coordinate`,`坐标`),i),{disabled:u,invalid:d}=gw(e),f=RC(e),p=mw(n,e,`x-min`,`x-max`,-5,5,1),m=mw(n,e,`y-min`,`y-max`,-5,5,1),h=fw(0,p.min,p.max,p.step),g=fw(0,m.min,m.max,m.step),_=fw(pw(n,e,`x`,h),p.min,p.max,p.step),v=fw(pw(n,e,`y`,g),m.min,m.max,m.step),b=(0,y.useRef)(null),x=(0,y.useRef)(!1);_w(n,e,()=>c(null));let S=`X: ${_} · Y: ${v}`;if(r===`static`)return(0,$.jsx)(ew,{className:`local-coordinate`,label:l,value:S});let C=e=>p.max>p.min?40+(e-p.min)/(p.max-p.min)*320:200,w=e=>m.max>m.min?360-(e-m.min)/(m.max-m.min)*320:200,T=C(_),E=w(v),D=C(dw(0,p.min,p.max)),O=w(dw(0,m.min,m.max)),k=e=>{let t=e.step*Math.max(1,Math.ceil((e.max-e.min)/(e.step*10))),n=Math.min(11,Math.floor((e.max-e.min)/t)+1);return Array.from({length:n},(n,r)=>e.min+r*t)},A=e=>{let t=b.current?.getBoundingClientRect();if(!t||t.width===0||t.height===0)return null;let n=dw(((e.clientX-t.left)/t.width-.1)/.8,0,1),r=dw(((e.clientY-t.top)/t.height-.1)/.8,0,1);return{x:fw(p.min+n*(p.max-p.min),p.min,p.max,p.step),y:fw(m.min+(1-r)*(m.max-m.min),m.min,m.max,m.step)}},j=(e,t)=>{(e!==_||t!==v)&&o({x:e,y:t})};return(0,$.jsxs)(`div`,{className:`local-coordinate`,style:rw(nw(e)),role:`group`,"aria-label":l,"aria-invalid":f.invalid||void 0,"aria-describedby":f.describedBy,children:[(0,$.jsx)(`span`,{className:`md-label`,children:l}),(0,$.jsxs)(`div`,{className:`local-coordinate-surface`,children:[(0,$.jsx)(`div`,{ref:b,className:`local-coordinate-pad`,role:`group`,"aria-label":i(`${l} drag area`,`${l} 拖拽区`),"aria-disabled":u||void 0,tabIndex:u?-1:0,onKeyDown:e=>{if(u)return;let t=_,n=v;switch(e.key){case`ArrowLeft`:t=fw(_-p.step,p.min,p.max,p.step);break;case`ArrowRight`:t=fw(_+p.step,p.min,p.max,p.step);break;case`ArrowDown`:n=fw(v-m.step,m.min,m.max,m.step);break;case`ArrowUp`:n=fw(v+m.step,m.min,m.max,m.step);break;case`Home`:t=p.min,n=m.min;break;case`End`:t=fw(p.max,p.min,p.max,p.step),n=fw(m.max,m.min,m.max,m.step);break;default:return}e.preventDefault(),j(t,n)},onPointerDown:e=>{if(u)return;e.preventDefault(),x.current=!0,b.current?.focus({preventScroll:!0});try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}let t=A(e);t&&j(t.x,t.y)},onPointerMove:e=>{if(!x.current||u)return;let t=A(e);t&&j(t.x,t.y)},onPointerUp:e=>{x.current=!1;try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}},onPointerCancel:()=>{x.current=!1},children:(0,$.jsxs)(`svg`,{className:`local-coordinate-svg`,viewBox:`0 0 400 400`,"aria-hidden":`true`,focusable:`false`,children:[(0,$.jsx)(`defs`,{children:(0,$.jsx)(`marker`,{id:`${t}-coordinate-arrow`,markerWidth:`8`,markerHeight:`8`,refX:`6`,refY:`4`,orient:`auto`,viewBox:`0 0 8 8`,children:(0,$.jsx)(`path`,{className:`local-coordinate-arrow`,d:`M1 1 L6 4 L1 7`})})}),(0,$.jsxs)(`g`,{className:`local-coordinate-grid`,children:[(0,$.jsx)(`rect`,{x:`40`,y:`40`,width:`320`,height:`320`}),k(p).map((e,t)=>(0,$.jsx)(`line`,{x1:C(e),y1:`40`,x2:C(e),y2:`360`},`x-${t}`)),k(m).map((e,t)=>(0,$.jsx)(`line`,{x1:`40`,y1:w(e),x2:`360`,y2:w(e)},`y-${t}`))]}),(0,$.jsxs)(`g`,{className:`local-coordinate-axes`,children:[(0,$.jsx)(`line`,{className:`local-coordinate-horizontal`,x1:`26`,y1:O,x2:`372`,y2:O,markerEnd:`url(#${t}-coordinate-arrow)`}),(0,$.jsx)(`line`,{className:`local-coordinate-vertical`,x1:D,y1:`374`,x2:D,y2:`24`,markerEnd:`url(#${t}-coordinate-arrow)`})]}),(0,$.jsxs)(`g`,{className:`local-coordinate-axis-label`,children:[(0,$.jsx)(`text`,{x:`358`,y:O-14,children:`x`}),(0,$.jsx)(`text`,{x:D+12,y:`40`,children:`y`})]}),(0,$.jsxs)(`g`,{className:`local-coordinate-projection`,children:[(0,$.jsx)(`line`,{x1:T,y1:E,x2:T,y2:O}),(0,$.jsx)(`line`,{x1:T,y1:E,x2:D,y2:E})]}),(0,$.jsx)(`circle`,{className:`local-coordinate-dot`,cx:T,cy:E,r:`10`}),(0,$.jsx)(`text`,{className:`local-coordinate-value`,x:T,y:E>330?E-22:E+30,textAnchor:T<80?`start`:T>320?`end`:`middle`,children:`(${_}, ${v})`})]})}),(0,$.jsx)(`span`,{className:`local-coordinate-caption`,children:i(`Draggable coordinate plane`,`可拖动的坐标平面`)})]}),(0,$.jsx)(`span`,{className:`md-hint local-hint`,children:i(`Arrow keys adjust the point; Home and End jump to the lower or upper bounds.`,`方向键调整坐标;Home 和 End 跳到最小或最大边界。`)}),(0,$.jsxs)(`div`,{className:`local-coordinate-fields`,children:[(0,$.jsx)(AT,{id:`${t}-coordinate-x`,reset:n.resetToken(e),label:`${l} X`,value:_,min:p.min,max:p.max,step:p.step,disabled:u,onCommit:e=>a(e,`x`)}),(0,$.jsx)(AT,{id:`${t}-coordinate-y`,reset:n.resetToken(e),label:`${l} Y`,value:v,min:m.min,max:m.max,step:m.step,disabled:u,onCommit:e=>a(e,`y`)})]}),(0,$.jsx)(tw,{value:S}),(0,$.jsx)(Bw,{message:d?i(`Cannot compute`,`无法计算`):s})]})}function MT({node:e,visible:t}){let n=(0,y.useId)(),r=kC(),{runtime:i,mode:a}=r,o=by(),s=WC(i,e,`label`,o(`Quiz`,`测验`),o),c=VC(e,`type`)===`number`?`number`:`choice`,l=(VC(e,`answer`)??``).trim(),u=YC(i,e,`tolerance`,0),d=Number.isFinite(u)&&u>=0?u:0,{disabled:f,invalid:p}=gw(e),m=Zw(e),h=WC(i,e,`explanation`,``,o),[g,_]=(0,y.useState)(``),[v,b]=(0,y.useState)(null);_w(i,e,()=>{_(``),b(null)});let x=c===`number`?Number(l):NaN;if(c===`number`&&!Number.isFinite(x))return(0,$.jsx)(vw,{message:o(`Quiz answer must be a number`,`测验答案必须是数字`)});if(c===`choice`&&m.length===0)return(0,$.jsx)(vw,{message:o(`Missing options`,`缺少选项`)});let S=m.map(e=>$w(i,e.node,o)||e.value);if(a===`static`)return(0,$.jsxs)(`div`,{className:`local-quiz local-static-quiz`,role:`group`,"aria-label":s,children:[(0,$.jsx)(`span`,{className:`md-label`,children:s}),c===`choice`?(0,$.jsx)(`ul`,{className:`local-static-list local-static-quiz-options`,children:m.map(e=>(0,$.jsx)(`li`,{className:`local-static-list-item`,children:jw(r,e.node.children,t)},e.node.id))}):(0,$.jsx)(`span`,{className:`local-static-value`,children:o(`Numeric answer`,`数字作答`)})]});let C=()=>{if(c===`choice`){if(g===``){b(`incomplete`);return}b(g===l?`correct`:`incorrect`);return}let e=g.trim(),t=e===``?NaN:Number(e);b(Number.isFinite(t)?Math.abs(t-x)<=d?`correct`:`incorrect`:`incomplete`)},w=()=>{_(``),b(null)},T=v===null?null:v===`correct`?`${o(`Correct`,`回答正确`)}`:v===`incorrect`?`${o(`Not quite`,`回答不正确`)}`:c===`number`?o(`Enter a number first`,`请先输入数字`):o(`Choose an answer first`,`请先选择答案`),E=v===`correct`?` is-correct`:v===`incorrect`?` is-incorrect`:``;return(0,$.jsxs)(`div`,{className:`local-quiz`,role:`group`,"aria-label":s,children:[c===`choice`?(0,$.jsxs)(`fieldset`,{className:`local-quiz-options`,disabled:f,children:[(0,$.jsx)(`legend`,{className:`md-label`,children:s}),m.map(e=>(0,$.jsxs)(`label`,{className:`local-radio-option`,children:[(0,$.jsx)(`input`,{type:`radio`,name:`${n}-quiz`,value:e.value,checked:g===e.value,onChange:()=>{_(e.value),b(null)}}),(0,$.jsx)(`span`,{children:jw(r,e.node.children,t)})]},e.node.id))]}):(0,$.jsxs)(`div`,{className:`local-quiz-number`,children:[(0,$.jsx)(`label`,{className:`md-label`,htmlFor:`${n}-quiz`,children:s}),(0,$.jsx)(`input`,{id:`${n}-quiz`,className:`md-text-input local-quiz-input`,type:`text`,inputMode:`decimal`,value:g,disabled:f,"aria-label":s,onChange:e=>{_(e.target.value),b(null)}})]}),(0,$.jsxs)(`div`,{className:`local-quiz-actions`,children:[(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-primary local-quiz-check`,disabled:f,onClick:C,children:o(`Check answer`,`检查答案`)}),(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-secondary local-quiz-again`,disabled:f,onClick:w,children:o(`Try again`,`再试一次`)})]}),(0,$.jsx)(`span`,{className:`local-quiz-feedback${E}`,role:`status`,"aria-live":`polite`,children:T?`${v===`correct`?`✓ `:v===`incorrect`?`✗ `:``}${T}`:``}),v!==null&&h?(0,$.jsx)(`div`,{className:`local-quiz-explanation`,children:h}):null,(0,$.jsx)(tw,{block:!0,value:c===`choice`?`${T?`${T} · `:``}${S.join(` · `)}`:T||o(`No answer yet`,`尚未作答`)}),(0,$.jsx)(Bw,{message:p?o(`Cannot compute`,`无法计算`):null})]})}function NT({node:e,visible:t}){let n=(0,y.useId)(),{runtime:r,render:i,mode:a}=kC(),o=by(),{write:s,error:c,setError:l}=hw(e),u=WC(r,e,`label`,``,o),d=RC(e),f=(e.children??[]).filter(e=>e.type===`component`&&e.name===`step`),p=f.map((e,t)=>VC(e,`value`)??`step-${t+1}`),m=f.map((e,t)=>WC(r,e,`label`,p[t],o)),h=VC(e,`initial`)??``,g=p.includes(h)?h:p[0]??``,_=XC(r,e),v=typeof _==`string`?_:``,b=(0,y.useRef)([]),x=(0,y.useRef)(!1);_w(r,e,()=>{l(null),x.current=!1});let S=p.includes(v)?v:g,C=Math.max(0,p.indexOf(S));if((0,y.useEffect)(()=>{x.current&&(x.current=!1,b.current[C]?.focus({preventScroll:!0}))},[C,S]),f.length===0)return(0,$.jsx)(vw,{message:o(`Steps requires at least one step`,`步骤至少需要一个 step`)});if(a===`static`){let e=f[C];return(0,$.jsxs)(`section`,{className:`local-steps local-static-steps`,"aria-label":u||o(`Steps`,`步骤`),children:[u?(0,$.jsx)(`div`,{className:`local-steps-label`,children:u}):null,(0,$.jsx)(`div`,{className:`local-steps-nav local-static-steps-nav`,children:(0,$.jsx)(`span`,{className:`local-steps-status`,role:`status`,"aria-live":`polite`,children:o(`Step ${C+1} of ${f.length}`,`第 ${C+1} 步,共 ${f.length} 步`)})}),(0,$.jsx)(`div`,{className:`local-steps-panel`,role:`group`,"aria-label":m[C],children:i(e.children??[],t)})]})}let w=e=>{let t=p[e];t!==void 0&&(x.current=!0,s(t))};return(0,$.jsxs)(`section`,{className:`local-steps`,"aria-label":u||o(`Steps`,`步骤`),"aria-invalid":d.invalid||void 0,"aria-describedby":d.describedBy,children:[u?(0,$.jsx)(`div`,{className:`local-steps-label`,children:u}):null,(0,$.jsxs)(`div`,{className:`local-steps-nav`,children:[(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-secondary local-steps-prev`,disabled:C<=0,onClick:()=>w(C-1),children:o(`Previous`,`上一步`)}),(0,$.jsx)(`span`,{className:`local-steps-status`,role:`status`,"aria-live":`polite`,children:o(`Step ${C+1} of ${f.length}`,`第 ${C+1} 步,共 ${f.length} 步`)}),(0,$.jsx)(`button`,{type:`button`,className:`md-button md-button-secondary local-steps-next`,disabled:C>=f.length-1,onClick:()=>w(C+1),children:o(`Next`,`下一步`)})]}),f.map((e,r)=>{let a=r===C;return(0,$.jsx)(`div`,{id:`${n}-step-${r}`,ref:e=>{b.current[r]=e},className:`local-steps-panel`,role:`group`,"aria-label":m[r],tabIndex:-1,hidden:!a,children:i(e.children??[],t&&a)},e.id)}),(0,$.jsx)(Bw,{message:c})]})}function PT(){return null}var FT={panel:uT,card:dT,grid:fT,tabs:hT,tab:pT,accordion:gT,disclosure:vT,if:yT,alert:xT,badge:ST,validation:Rw,column:zw,tooltip:CT,input:Hw,textarea:Uw,number:Kw,slider:qw,toggle:Jw,checkbox:Yw,date:Xw,select:tT,choices:nT,"radio-group":rT,option:eT,node:pT,edge:mT,counter:sT,timer:cT,checklist:aT,progress:lT,jump:wT,anchor:TT,text:ET,section:DT,"multi-select":OT,"range-slider":kT,coordinate:jT,quiz:MT,steps:NT,step:PT};function IT(e,t){let n=t.definition.children;return n&&n.length>0?Ow(e,n,!0):typeof t.definition.value==`string`&&t.definition.value!==``?(0,$.jsx)(`p`,{children:t.definition.value}):null}function LT({entries:e,env:t,t:n,titleId:r}){return(0,$.jsxs)(`section`,{className:`local-footnotes`,role:`doc-endnotes`,"aria-labelledby":r,"data-local-footnotes":``,children:[(0,$.jsx)(`h2`,{id:r,className:`local-footnotes-title`,children:n(`Footnotes`,`脚注`)}),(0,$.jsx)(`ol`,{className:`local-footnotes-list`,children:e.map(e=>{let r=e.references.length>1;return(0,$.jsxs)(`li`,{id:e.id,className:`local-footnote`,"data-local-footnote-number":e.number,children:[(0,$.jsx)(`div`,{className:`local-footnote-body`,children:IT(t,e)}),(0,$.jsx)(`span`,{className:`local-footnote-backlinks`,children:e.references.map((t,i)=>(0,$.jsx)(`a`,{href:`#${t.id}`,className:`local-footnote-backlink`,role:`doc-backlink`,"aria-label":r?n(`Back to reference ${e.number} (${i+1} of ${e.references.length})`,`返回脚注 ${e.number} 的第 ${i+1} 处引用`):n(`Back to reference ${e.number}`,`返回脚注 ${e.number}`),children:`↩`},t.id))})]},e.id)})})]})}function RT({document:e,mode:t=`interactive`,staticFirst:n=!1,locale:r=`en`,onDiagnostics:i}){let[a,o]=(0,y.useState)(!n);(0,y.useEffect)(()=>{n&&o(!0)},[n]);let s=t===`interactive`&&n&&!a?`static`:t,c=e.html?.enableCss===!0,l=s===`interactive`&&e.html?.enableJavaScript===!0,u=e.html?.enableExtendedHtml===!0,d=(0,y.useMemo)(()=>({enableCss:c,enableJavaScript:l,enableExtendedHtml:u}),[c,l,u]),f=(0,y.useMemo)(()=>t_(e.source,d,Math.max(C,e.source.length*2+10)),[e.source,d]),p=(0,y.useRef)(i);return p.current=i,(0,y.useEffect)(()=>{p.current?.(f.diagnostics)},[f]),f.diagnostics.some(e=>e.severity===`error`)?(0,$.jsx)(`div`,{className:`md-document local-document local-inactive`,role:`alert`,children:yy(r,`HTML rendering failed.`,`HTML 渲染失败。`)}):(0,$.jsx)(`article`,{className:`md-document local-document reactive-md-native-document${s===`static`?` local-static`:``}`,"data-source-mode":`html`,"data-render-mode":s,children:(0,$.jsx)(`iframe`,{className:`reactive-md-native-frame`,title:yy(r,`HTML document`,`HTML 文档`),sandbox:Ug(d),referrerPolicy:`no-referrer`,srcDoc:f.markup,style:{display:`block`,width:`100%`,minHeight:`60vh`,border:0,background:`#fff`,colorScheme:`light`}},`${Number(c)}${Number(l)}${Number(u)}:${e.source}`)})}function zT(e){return e.document.html?(0,$.jsx)(RT,{...e}):(0,$.jsx)(BT,{...e})}function BT({document:e,runtime:t,onDiagnostics:n,urlPolicy:r,locale:i=`en`,themes:a,colorScheme:o=`auto`,mode:s=`interactive`,staticFirst:c=!1,imageResolver:l,hostData:u,hostRenderer:d}){let[f,p]=(0,y.useState)(!c);(0,y.useEffect)(()=>{c&&p(!0)},[c]);let m=s===`interactive`&&c&&!f?`static`:s,h=(0,y.useId)(),g=(0,y.useMemo)(()=>(e,t)=>yy(i,e,t),[i]),_=(0,y.useMemo)(()=>ir(e,`local-heading-${h}`),[e,h]),v=(0,y.useMemo)(()=>Eh(e,h),[e,h]),b=(0,y.useMemo)(()=>{try{return Un(e)}catch{return Ln}},[e]),x=(0,y.useRef)(n);x.current=n;let S=(0,y.useRef)(null),C=(0,y.useCallback)(e=>{x.current?.(e)},[]),w=aw(a),T=(0,y.useMemo)(()=>{try{return _h(e.theme,a,e.themeRange,e.source)}catch{return{name:uh.name,diagnostics:[]}}},[e.theme,e.themeRange?.start,e.themeRange?.end,e.source,w]),E=uw(S,o),D=(0,y.useRef)(``);(0,y.useEffect)(()=>{let e=ow(T.diagnostics);if(e===D.current)return;let t=D.current!==``;D.current=e,(T.diagnostics.length>0||t)&&C(T.diagnostics)},[T,C]);let O=(0,y.useCallback)(e=>{try{return t.subscribe(e)}catch{return()=>{}}},[t]),k=(0,y.useCallback)(()=>{try{return t.snapshot()}catch{return BC}},[t]);(0,y.useSyncExternalStore)(O,k,k);let A=``;if(e.validations?.length)try{A=ow(t.validate())}catch{A=`unavailable`}let j=(0,y.useMemo)(()=>LC(e,t,h,g),[e,t,h,g,A]),M=(0,y.useMemo)(()=>({runtime:t,rootRef:S,urlPolicy:r,imageResolver:l,hostData:u,hostRenderer:d,anchors:_,t:g,mode:m,dependencies:b,footnotes:v}),[t,S,r,l,u,d,_,g,m,b,v]),N=(0,y.useCallback)((e,t=!0)=>Ow(M,e??[],t),[M]),P=(0,y.useMemo)(()=>({runtime:t,render:N,visible:!0,mode:m,imageResolver:l,validation:j,report:C,urlPolicy:r,anchors:_,rootRef:S,t:g,dependencies:b,footnotes:v}),[t,N,C,r,l,m,_,S,g,j,b,v]);return(0,$.jsx)(_y,{locale:i,children:(0,$.jsx)(`article`,{ref:S,className:`md-document local-document${m===`static`?` local-static`:``}`,"data-rmd-theme":T.name,"data-color-scheme":E,"data-render-mode":m,style:{colorScheme:E},"aria-label":m===`static`?g(`Static document`,`静态文档`):g(`Interactive document`,`交互文档`),children:(0,$.jsxs)(OC.Provider,{value:P,children:[N(e.nodes,!0),v.entries.length>0?(0,$.jsx)(LT,{entries:v.entries,env:M,t:g,titleId:`${h}-footnotes-title`}):null]})})})}var VT=`reactive-md-state/v1`,HT=1048576,UT=/^fnv1a32:[0-9a-f]{8}$/,WT=2166136261,GT=16777619,KT=new Set([`format`,`syntax`,`sourceDigest`,`parameters`,`generator`]),qT=new Set([`name`,`version`]),JT=new TextEncoder;function YT(e,t){return{code:e,message:t.length>2e3?`${t.slice(0,D-1)}…`:t,severity:`error`,range:{start:0,end:0},line:1,column:1}}function XT(e,t,n){e.length<100&&e.push(YT(t,n))}function ZT(e){return e instanceof Error?e.message:String(e)}function QT(e){for(let t=0;t<e.length;t+=1){let n=e.charCodeAt(t);if(n>=55296&&n<=56319){let n=e.charCodeAt(t+1);if(n>=56320&&n<=57343){t+=1;continue}return!1}if(n>=56320&&n<=57343)return!1}return!0}function $T(e){if(typeof e!=`string`)throw TypeError(`localSourceDigest requires a source string.`);let t=JT.encode(e),n=WT;for(let e=0;e<t.length;e+=1)n^=t[e],n=Math.imul(n,GT)>>>0;return`fnv1a32:${n.toString(16).padStart(8,`0`)}`}function eE(e){if(typeof e==`string`)return QT(e)?{ok:!0,value:e}:{ok:!1,message:`contains malformed Unicode.`};if(typeof e==`number`)return Number.isFinite(e)?{ok:!0,value:e}:{ok:!1,message:`must be a finite number.`};if(typeof e==`boolean`||e===null)return{ok:!0,value:e};if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n+=1){let r=e[n];if(typeof r!=`string`)return{ok:!1,message:`must be an array of strings.`};if(!QT(r))return{ok:!1,message:`contains malformed Unicode.`};t.push(r)}return{ok:!0,value:Object.freeze(t)}}return{ok:!1,message:`must be a string, finite number, boolean, null or string array.`}}function tE(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function nE(e){return Object.freeze(e.parameters),e.generator&&Object.freeze(e.generator),Object.freeze(e)}function rE(e){if(!e||typeof e!=`object`||Array.isArray(e))throw TypeError(`generator must be an object with string name and version.`);if(typeof e.name!=`string`||typeof e.version!=`string`)throw TypeError(`generator must have string name and version.`);if(!QT(e.name)||!QT(e.version))throw TypeError(`generator name and version must be well-formed Unicode strings.`);return Object.freeze({name:e.name,version:e.version})}function iE(e){return typeof e==`string`?`"${e.length>48?`${e.slice(0,48)}…`:e}"`:e===null?`null`:Array.isArray(e)?`an array`:typeof e}function aE(e,t){return e.length>t?e.length:JT.encode(e).byteLength}function oE(e,t){let n;try{let t=JSON.stringify(e);if(typeof t!=`string`)return null;n=t}catch{return null}return aE(n,t)}function sE(e){if(e===void 0)return HT;if(typeof e!=`object`||!e)throw TypeError(`parseLocalState options must be an object.`);let{maxLength:t}=e;if(t===void 0)return HT;if(typeof t!=`number`||!Number.isSafeInteger(t)||t<=0)throw RangeError(`maxLength must be a finite positive integer.`);return t}function cE(e,t,n){if(!e||e.syntax!==`local`||typeof e.source!=`string`)throw TypeError(`createLocalStateFile requires a compiled local document.`);if(!t||typeof t!=`object`||Array.isArray(t))throw TypeError(`createLocalStateFile requires a state object.`);let r=Object.keys(e.bindings).filter(e=>!e.startsWith(`@`)).sort(),i=new Set(r),a=new Map;for(let n of Object.keys(t)){if(Object.hasOwn(e.computations??{},n))continue;if(n.startsWith(`@`)){if(!Object.hasOwn(e.bindings,n))throw Error(`Cannot persist parameter "${n}": it is not a binding of this document.`);continue}if(!i.has(n))throw Error(`Cannot persist parameter "${n}": it is not a public binding of this document.`);let r=eE(t[n]);if(!r.ok)throw TypeError(`Cannot persist parameter "${n}": the value ${r.message}`);a.set(n,r.value)}let o={};for(let e of r){if(!a.has(e))throw Error(`Cannot persist the document: parameter "${e}" is missing from the supplied state.`);o[e]=a.get(e)}let s={format:VT,syntax:Bm,sourceDigest:$T(e.source),parameters:o};return n!==void 0&&(s.generator=rE(n)),nE(s)}function lE(e,t){let n=[],r=(e,t)=>XT(n,e,t),i=e;if(typeof e==`string`){if(aE(e,t)>t)return{ok:!1,diagnostics:[YT(`local.state.size`,`The state payload exceeds the ${t}-byte limit.`)]};if(!QT(e))return{ok:!1,diagnostics:[YT(`local.state.utf`,`The state payload contains malformed Unicode.`)]};try{i=JSON.parse(e)}catch(e){return{ok:!1,diagnostics:[YT(`local.state.json`,`The state payload is not valid JSON: ${ZT(e)}`)]}}}else{let n=oE(e,t);if(n===null)return{ok:!1,diagnostics:[YT(`local.state.shape`,`The state payload must be a JSON object.`)]};if(n>t)return{ok:!1,diagnostics:[YT(`local.state.size`,`The state payload exceeds the ${t}-byte limit.`)]}}if(!tE(i))return{ok:!1,diagnostics:[YT(`local.state.shape`,`The state payload must be a JSON object.`)]};Object.getOwnPropertySymbols(i).length>0&&r(`local.state.shape`,`The state payload cannot use symbol keys.`);for(let e of Object.keys(i))KT.has(e)||r(`local.state.key`,`Unknown top-level state key "${e}".`);let a=i.format;a!==`reactive-md-state/v1`&&r(`local.state.format`,`Unsupported state format ${iE(a)}; expected "${VT}".`);let o=i.syntax;o!==`local-draft-2`&&r(`local.state.syntax`,`Unsupported state syntax ${iE(o)}; expected "${Bm}".`);let s=i.sourceDigest;typeof s==`string`&&UT.test(s)||r(`local.state.digest`,`sourceDigest must match "fnv1a32:" followed by 8 lowercase hexadecimal digits.`);let c={},l=i.parameters;if(!tE(l))r(`local.state.parameters`,`parameters must be a JSON object of public binding values.`);else for(let e of Object.keys(l).sort()){if(e===`__proto__`){r(`local.state.parameter.prototype`,`Parameter names cannot be "__proto__".`);continue}if(e.startsWith(`@`)){r(`local.state.parameter.internal`,`Internal parameter "${e}" cannot be persisted.`);continue}let t=eE(l[e]);t.ok?c[e]=t.value:r(`local.state.parameter.value`,`Parameter "${e}" ${t.message}`)}let u;if(Object.hasOwn(i,`generator`)){let e=i.generator;if(!tE(e))r(`local.state.generator`,`generator must be an object with string name and version.`);else{for(let t of Object.keys(e))qT.has(t)||r(`local.state.generator`,`generator has unknown key "${t}".`);typeof e.name!=`string`||typeof e.version!=`string`?r(`local.state.generator`,`generator must have string name and version.`):!QT(e.name)||!QT(e.version)?r(`local.state.utf`,`generator contains malformed Unicode.`):u=Object.freeze({name:e.name,version:e.version})}}if(n.length)return{ok:!1,diagnostics:n};let d={format:VT,syntax:Bm,sourceDigest:s,parameters:c};return u&&(d.generator=u),{ok:!0,file:nE(d)}}function uE(e,t){let n=sE(t);try{return lE(e,n)}catch(e){return{ok:!1,diagnostics:[YT(`local.state.invalid`,`Cannot read the local state: ${ZT(e)}`)]}}}function dE(e){let t=new Map,n=e=>{for(let r of e)t.set(r.id,r),r.children&&n(r.children)};return n(e.nodes),t}function fE(e){let t=dE(e),n=new Map,r=[];for(let[i,a]of Object.entries(e.bindingSlots??{})){let e=t.get(i);if(!e)continue;let o={node:e,slots:[]};for(let[t,r]of Object.entries(a))o.slots.push({slot:t,key:r}),r.startsWith(`@`)||n.set(r,{node:e,slot:t});o.slots.length&&r.push(o)}let i=[];for(let[r,a]of Object.entries(e.bindings)){if(r.startsWith(`@`))continue;let e=n.get(r);if(e){i.push({key:r,binding:a,node:e.node,slot:e.slot});continue}let o=a.owner&&t.has(a.owner)?a.owner:a.nodeIds.find(e=>t.has(e));i.push({key:r,binding:a,node:o?t.get(o):void 0})}return{plans:i,groups:r}}function pE(e,t,n){let r=[];for(let i of t.plans)i.slot===void 0&&Object.hasOwn(n,i.key)&&(i.node?Object.is(e.get(i.node),n[i.key])||r.push(...e.set(i.node,n[i.key])):r.push(YT(`local.state.document`,`The document has no component for parameter "${i.key}".`)));for(let i of t.groups){let t={},a=!1;for(let{slot:e,key:r}of i.slots)Object.hasOwn(n,r)&&(t[e]=n[r],a=!0);a&&r.push(...e.setMany(i.node,t))}return r}function mE(e,t){let n=e.snapshot(),r={};for(let e of t){let t=n.state[e];r[e]=Array.isArray(t)?Object.freeze([...t]):t}return Object.freeze(r)}function hE(e,t,n,r){let i=uE(t,r);if(!i.ok)return i;if(!e||e.syntax!==`local`||typeof e.source!=`string`||!Array.isArray(e.nodes)||!e.bindings)return{ok:!1,diagnostics:[YT(`local.state.document`,`resolveLocalState requires a compiled local document.`)]};if(i.file.syntax!==`local-draft-2`)return{ok:!1,diagnostics:[YT(`local.state.syntax`,`This state file uses syntax "${i.file.syntax}", but this build accepts "${Bm}".`)]};if(i.file.sourceDigest!==$T(e.source))return{ok:!1,diagnostics:[YT(`local.state.source`,`This state file was created for a different document (source digest mismatch).`)]};let a=fE(e),o=new Set(a.plans.map(e=>e.key)),s=[];for(let e of Object.keys(i.file.parameters))o.has(e)||XT(s,`local.state.parameter.unknown`,`The state contains unknown parameter "${e}" for this document.`);for(let e of o)Object.hasOwn(i.file.parameters,e)||XT(s,`local.state.parameter.missing`,`The state is missing parameter "${e}".`);if(s.length)return{ok:!1,diagnostics:s};let c;try{c=$v(e)}catch(e){return{ok:!1,diagnostics:[YT(`local.state.document`,`Cannot validate this document: ${ZT(e)}`)]}}try{if(n){let e=pE(c,a,n);if(e.length)return{ok:!1,diagnostics:e}}let e=pE(c,a,i.file.parameters);if(e.length)return{ok:!1,diagnostics:e};let t=[...o].sort();return{ok:!0,file:i.file,state:mE(c,t)}}finally{c.dispose()}}function gE(e,t,n){try{return hE(e,t,void 0,n)}catch(e){return{ok:!1,diagnostics:[YT(`local.state.invalid`,`Cannot resolve the local state: ${ZT(e)}`)]}}}function _E(e,t){return cE(e.document,e.getParameters(),t)}function vE(e,t){return{code:e,message:t,severity:`error`,range:{start:0,end:0},line:1,column:1}}function yE(e,t=8){let n=e.slice(0,t).map(e=>`- [${e.code}] ${e.message} (line ${e.line}, column ${e.column})`);return e.length>n.length&&n.push(`- ${e.length-n.length} more diagnostic(s).`),n.join(`
|
|
68
|
+
`)}function bE(e){return e instanceof Error?e.message:String(e)}var xE=class extends Error{diagnostics;constructor(e,t){let n=yE(t);super(n?`${e}\n${n}`:e),this.name=`ReactiveMDMountError`,this.diagnostics=t}};function SE(e,t=`standalone.mount`){if(typeof e==`object`&&e&&Array.isArray(e.diagnostics)){let t=e.diagnostics;if(t.length>0)return t}return[vE(t,bE(e))]}var CE=`reactive-md-diagnostics`,wE=`reactive-md-state-change`,TE=/^[A-Za-z][A-Za-z0-9_-]*$/,EE=256,DE=/^data:image\/(?:png|jpeg|gif|webp);base64,[A-Za-z0-9+/]+={0,2}$/,OE=/[\u0000-\u001f\u007f-\u009f]/,kE=64,AE=4096,jE=41943040;function ME(e,t){if(e===void 0)return;if(!PE(e)){t(`standalone.payload.images`,`images must be a JSON object mapping image URLs to data URLs.`);return}let n=Object.entries(e);if(n.length>kE){t(`standalone.payload.images`,`images cannot contain more than ${kE} entries.`);return}let r=Object.create(null),i=0;for(let[e,a]of n)if(!e||e.length>AE||e===`__proto__`||OE.test(e)||typeof a!=`string`||!DE.test(a))t(`standalone.payload.images`,`Every image entry must use a bounded URL key and a base64 raster data URL.`);else{if(i+=a.length,i>jE){t(`standalone.payload.images`,`The embedded image map exceeds the 40 MiB budget.`);return}r[e]=a}return r}function NE(e,t){if(e===void 0)return;let n=Ih(e);if(!n.ok){t(`standalone.payload.compile-options`,`The payload compile options are invalid: ${n.message}`);return}let r={enableCss:n.html.enableCss,enableJavaScript:n.html.enableJavaScript,enableExtendedHtml:n.html.enableExtendedHtml},i=e.limits;return PE(i)&&i.maxSyntaxNodes!==void 0&&(r.limits={maxSyntaxNodes:n.maxSyntaxNodes}),r}function PE(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function FE(e){let t=[],n=(e,n)=>{t.push(vE(e,n))};if(!PE(e))return{ok:!1,diagnostics:[vE(`standalone.payload.shape`,`The reactive-md payload must be a JSON object.`)]};e.version!==1&&n(`standalone.payload.version`,`The reactive-md payload must use version 1.`);let r=e.target;typeof r!=`string`||r.length===0||r.length>EE?n(`standalone.payload.target`,`The payload target must be an element id of 1-${EE} characters.`):TE.test(r)||n(`standalone.payload.target`,`The payload target must start with a letter and use only letters, digits, underscores or hyphens.`);let i=e.source;typeof i!=`string`&&n(`standalone.payload.source`,`The payload source must be a string.`);let a=e.locale===void 0?`en`:e.locale;a!==`en`&&a!==`zh`&&n(`standalone.payload.locale`,`The payload locale must be "en" or "zh".`);let o=e.colorScheme===void 0?`auto`:e.colorScheme;o!==`light`&&o!==`dark`&&o!==`auto`&&n(`standalone.payload.color-scheme`,`The payload colorScheme must be "light", "dark" or "auto".`);let s=e.hydrate!==void 0&&e.hydrate;typeof s!=`boolean`&&n(`standalone.payload.hydrate`,`The payload hydrate flag must be a boolean.`);let c=e.state;PE(c)||n(`standalone.payload.state`,`The payload state must be a JSON object.`);let l=NE(e.compileOptions,n),u=ME(e.images,n);return t.length>0?{ok:!1,diagnostics:t}:{ok:!0,payload:{version:1,target:r,source:i,state:c,locale:a,colorScheme:o,hydrate:s,...l===void 0?{}:{compileOptions:l},...u&&Object.keys(u).length>0?{images:u}:{}}}}function IE(e){try{return FE(e)}catch(e){return{ok:!1,diagnostics:[vE(`standalone.payload.invalid`,`The reactive-md payload could not be read: ${bE(e)}`)]}}}function LE(e){return Array.isArray(e)?e.slice():e}function RE(e,t){let n=gE(e,t);if(!n.ok)return n;let r={};for(let[t,i]of Object.entries(e.bindings))r[t]=Object.hasOwn(n.state,t)?{...i,initial:LE(n.state[t])}:i;let i={...e.initialState};for(let[e,t]of Object.entries(n.state))i[e]=LE(t);return{ok:!0,baseline:{document:{...e,bindings:r,initialState:i},state:n.state}}}function zE(e,t,n,r){if(typeof e!=`string`)throw new xE(`Cannot mount a Reactive MD document: source must be a string.`,[vE(`standalone.source`,`source must be a string.`)]);let i=C_(e,r);if(!i.ok)throw new xE(`Cannot mount a Reactive MD document: the source contains syntax errors.`,i.diagnostics);let a=i.document;if(t!==void 0){let e=uE(t);if(!e.ok)throw new xE(`Cannot mount a Reactive MD document: the state payload is invalid.`,e.diagnostics);let n=RE(a,e.file);if(!n.ok)throw new xE(`Cannot mount a Reactive MD document: the state does not match this source.`,n.diagnostics);a=n.baseline.document}return typeof n==`string`&&n.trim().length>0&&(a={...a,theme:n.trim(),themeRange:void 0}),{document:a,diagnostics:i.diagnostics.slice()}}var BE=`0.4.0`,VE=Object.freeze({name:`reactive-md-standalone`,version:BE}),HE=`data-reactive-md-mounted`,UE=`script[type="application/reactive-md+json"][data-reactive-md-auto]`,WE=/^data:image\/(?:png|jpeg|gif|webp);base64,[A-Za-z0-9+/]+={0,2}$/,GE=64;function KE(e){if(!e)return{};let t=new Map;for(let[n,r]of Object.entries(e).slice(0,GE))typeof n==`string`&&n.length>0&&typeof r==`string`&&WE.test(r)&&t.set(n,r);return t.size===0?{}:{urlPolicy:(e,n)=>n===`link`||t.has(e),imageResolver:e=>t.get(e)??null}}var qE=new WeakSet;function JE(e){return qE.has(e)||e.hasAttribute(`data-reactive-md-mounted`)}function YE(e,t){return _E(e,t)}function XE(e){if(e)try{e()}catch{}}function ZE(e){let t=()=>{let t=e.querySelector(`article.local-document`);t&&(t.classList.remove(`local-static-first`,`reactive-md-static-first`,`reactive-md-hydrating`),t.removeAttribute(`data-static-first`),t.removeAttribute(`data-reactive-md-static-first`)),e.classList.remove(`local-static-first`,`reactive-md-static-first`),e.removeAttribute(`data-static-first`)};if(typeof requestAnimationFrame!=`function`)return t(),()=>{};let n=0,r=0;return n=requestAnimationFrame(()=>{t(),r=requestAnimationFrame(t)}),()=>{typeof cancelAnimationFrame==`function`&&(cancelAnimationFrame(n),r&&cancelAnimationFrame(r))}}function QE(e,t,n={}){if(!e||typeof e!=`object`||!(`nodeType`in e)||!e.hasAttribute)throw new xE(`Cannot mount a Reactive MD document: element must be an HTMLElement.`,[vE(`standalone.element`,`element must be an HTMLElement.`)]);if(JE(e))throw new xE(`Cannot mount a Reactive MD document: this element is already mounted.`,[vE(`standalone.mount`,`The target element already hosts a Reactive MD document.`)]);if(!t||typeof t!=`object`)throw new xE(`Cannot mount a Reactive MD document: options are required.`,[vE(`standalone.options`,`mount requires an options object with a source string.`)]);let r=zE(t.source,t.state,n.theme,t.compileOptions),i;try{i=$v(r.document)}catch(e){throw new xE(`Cannot mount a Reactive MD document: the interactive runtime could not be created.`,[vE(`standalone.runtime`,bE(e))])}let a=t.generator??VE,o=KE(t.images),s=t.urlPolicy??o.urlPolicy,c=t.imageResolver??o.imageResolver,l=()=>YE(i,a),u;try{u=l()}catch(e){try{i.dispose()}catch{}throw new xE(`Cannot mount a Reactive MD document: the initial state could not be captured.`,[vE(`standalone.state`,bE(e))])}let d=!1,f=e=>{d||XE(n.onDiagnostics?()=>n.onDiagnostics(e):void 0)},p=t.hydrate===!0&&e.hasChildNodes(),m=(0,$.jsx)(zT,{document:r.document,runtime:i,onDiagnostics:f,urlPolicy:s,locale:t.locale??`en`,themes:t.themes,colorScheme:t.colorScheme??`auto`,mode:`interactive`,staticFirst:p,imageResolver:c});if(!p)for(;e.firstChild;)e.removeChild(e.firstChild);let h=null;try{h=p?(0,b.hydrateRoot)(e,m):(0,b.createRoot)(e),p||h.render(m)}catch(e){try{h?.unmount()}catch{}try{i.dispose()}catch{}throw new xE(`Cannot mount a Reactive MD document: React could not render the document.`,SE(e,`standalone.render`))}qE.add(e),e.setAttribute(HE,``);let g=n.onStateChange?i.subscribe(()=>{if(d)return;let e;try{e=l()}catch{return}XE(n.onStateChange?()=>n.onStateChange(e):void 0)}):()=>{};XE(n.onStateChange?()=>n.onStateChange(u):void 0),r.diagnostics.length>0&&f(r.diagnostics);let _=p?ZE(e):()=>{};return{element:e,getState(){if(d)throw Error(`This Reactive MD document has been unmounted.`);return l()},unmount:()=>{if(!d){d=!0,g(),_();try{h?.unmount()}catch{}try{i.dispose()}catch{}qE.delete(e),e.getAttribute(`data-reactive-md-mounted`)===``&&e.removeAttribute(HE)}}}}function $E(e,t){return QE(e,t)}function eD(e,t,n){if(typeof console<`u`&&typeof console.error==`function`)try{console.error(`Reactive MD: ${n.map(e=>`[${e.code}] ${e.message}`).join(` `)}`)}catch{}let r=e.defaultView?.CustomEvent;if(typeof r==`function`)try{t.dispatchEvent(new r(CE,{detail:n,bubbles:!0,composed:!0}))}catch{}}function tD(e,t){let n=t.defaultView?.HTMLElement;return n?e instanceof n:e.namespaceURI===`http://www.w3.org/1999/xhtml`}function nD(e){if(typeof document>`u`)return[];let t=e??document,n=t,r=n.nodeType===9?t:n.ownerDocument??document,i=[],a;try{a=Array.from(t.querySelectorAll(UE))}catch{return i}for(let e of a){let a;try{a=IE(JSON.parse(e.textContent??``))}catch(t){eD(r,e,[vE(`standalone.payload.json`,`The reactive-md payload is not valid JSON: ${bE(t)}`)]);continue}if(!a.ok){eD(r,e,a.diagnostics);continue}let o=a.payload,s=t,c=(typeof s.getElementById==`function`?s.getElementById(o.target):null)??r.getElementById(o.target);if(!c)eD(r,e,[vE(`standalone.target.missing`,`The reactive-md payload target "#${o.target}" was not found.`)]);else if(n!==r&&!n.contains(c))eD(r,e,[vE(`standalone.target.scope`,`The reactive-md payload target is outside the scanned root.`)]);else if(!tD(c,r))eD(r,e,[vE(`standalone.target.type`,`The reactive-md payload target must be an HTML element.`)]);else if(!JE(c))try{i.push($E(c,{source:o.source,state:o.state,locale:o.locale,colorScheme:o.colorScheme,hydrate:o.hydrate,images:o.images,compileOptions:o.compileOptions}))}catch(e){eD(r,c,SE(e))}}return i}var rD=`reactive-md-doc`,iD=typeof HTMLElement<`u`?HTMLElement:class{};function aD(e){return typeof e==`object`&&!!e&&e.name===`AbortError`}var oD=class extends iD{static observedAttributes=[`src`,`source`,`locale`,`color-scheme`,`theme`];_source;_state;_urlPolicy;_imageResolver;_themes;_connected=!1;_generation=0;_restartScheduled=!1;_session=null;_abort=null;_stateTimer=null;_pendingState=null;_cache=null;connectedCallback(){this._connected||(this._connected=!0,this._start())}disconnectedCallback(){this._connected&&(this._connected=!1,this._generation+=1,this._restartScheduled=!1,this._abortFetch(),this._clearStateTimer(),this._teardown(),this._cache=null)}attributeChangedCallback(e,t,n){t!==n&&(e===`src`&&(this._cache=null),this._requestRestart())}get src(){return this.getAttribute(`src`)??void 0}set src(e){e==null?this.removeAttribute(`src`):this.setAttribute(`src`,e)}get theme(){return this.getAttribute(`theme`)??void 0}set theme(e){e==null?this.removeAttribute(`theme`):this.setAttribute(`theme`,e)}get source(){return this._source===void 0?this.getAttribute(`source`)??void 0:this._source}set source(e){let t=typeof e==`string`?e:void 0;t!==this._source&&(this._source=t,this._requestRestart())}get state(){return this._state}set state(e){e!==this._state&&(this._state=e,this._requestRestart())}get urlPolicy(){return this._urlPolicy}set urlPolicy(e){e!==this._urlPolicy&&(this._urlPolicy=e,this._requestRestart())}get imageResolver(){return this._imageResolver}set imageResolver(e){e!==this._imageResolver&&(this._imageResolver=e,this._requestRestart())}get themes(){return this._themes}set themes(e){e!==this._themes&&(this._themes=e,this._requestRestart())}get _locale(){return this.getAttribute(`locale`)===`zh`?`zh`:`en`}get _colorScheme(){let e=this.getAttribute(`color-scheme`);return e===`light`||e===`dark`?e:`auto`}get _themeOverride(){return this.getAttribute(`theme`)?.trim()||void 0}_requestRestart(){this._connected&&!this._restartScheduled&&(this._restartScheduled=!0,queueMicrotask(()=>{this._restartScheduled=!1,this._connected&&this._start()}))}_start(){this._generation+=1;let e=this._generation;this._abortFetch(),this._clearStateTimer(),this._teardown(),this._load(e)}async _load(e){let t=this.getAttribute(`src`)?.trim()??``,n=this.source;if(t){if(this._cache&&this._cache.src===t)n=this._cache.text;else{let r=null;try{r=typeof AbortController==`function`?new AbortController:null,this._abort=r;let i=await fetch(t,r?{signal:r.signal}:{});if(!i.ok)throw Error(`HTTP ${i.status}${i.statusText?` ${i.statusText}`:``}`);let a=await i.text();if(!this._connected||e!==this._generation)return;this._cache={src:t,text:a},n=a}catch(n){if(!this._connected||e!==this._generation||aD(n))return;this._showError([vE(`standalone.fetch`,`Cannot load "${t}": ${bE(n)}`)]);return}finally{this._abort===r&&(this._abort=null)}}}if(this._connected&&e===this._generation){if(typeof n!=`string`)this._showError([vE(`standalone.source`,`The <reactive-md-doc> element requires a "src" attribute or a "source" attribute/property.`)]);else try{let t=QE(this,{source:n,state:this._state,locale:this._locale,colorScheme:this._colorScheme,themes:this._themes,urlPolicy:this._urlPolicy,imageResolver:this._imageResolver},{theme:this._themeOverride,onDiagnostics:e=>this._emitDiagnostics(e),onStateChange:e=>this._queueState(e)});if(!this._connected||e!==this._generation){try{t.unmount()}catch{}return}this._session=t}catch(e){this._session=null,this._showError(SE(e))}}}_teardown(){let e=this._session;if(this._session=null,e)try{e.unmount()}catch{}}_abortFetch(){let e=this._abort;if(this._abort=null,e)try{e.abort()}catch{}}_clearStateTimer(){this._stateTimer!==null&&(clearTimeout(this._stateTimer),this._stateTimer=null),this._pendingState=null}_queueState(e){this._connected&&(this._pendingState=e,this._stateTimer===null&&(this._stateTimer=setTimeout(()=>{this._stateTimer=null;let e=this._pendingState;this._pendingState=null,this._connected&&e&&this._dispatch(wE,e)},0)))}_emitDiagnostics(e){this._connected&&e.length!==0&&this._dispatch(CE,e)}_showError(e){if(!this._connected)return;this._teardown(),this._clearStateTimer();let t=this.ownerDocument;for(;this.firstChild;)this.removeChild(this.firstChild);let n=t.createElement(`div`);n.className=`local-inactive reactive-md-standalone-error`,n.setAttribute(`role`,`alert`),n.setAttribute(`data-reactive-md-error`,``);let r=t.createElement(`p`);if(r.className=`local-inactive-title`,r.textContent=this._locale===`zh`?`无法加载交互文档。`:`This interactive document could not be loaded.`,n.appendChild(r),e.length>0){let r=t.createElement(`ul`);r.className=`local-inactive-list`;for(let n of e.slice(0,12)){let e=t.createElement(`li`);e.textContent=`${n.message} (line ${n.line}, column ${n.column})`,r.appendChild(e)}n.appendChild(r)}this.appendChild(n),this._emitDiagnostics(e)}_dispatch(e,t){if(!this._connected)return;let n=this.ownerDocument.defaultView?.CustomEvent;if(typeof n==`function`)try{this.dispatchEvent(new n(e,{detail:t,bubbles:!0,composed:!0}))}catch{}}};function sD(){typeof customElements<`u`&&(customElements.get(`reactive-md-doc`)||customElements.define(rD,oD))}sD();var cD=!1;function lD(){if(cD||typeof document>`u`)return;cD=!0;let e=()=>{try{nD(document)}catch(e){typeof console<`u`&&typeof console.error==`function`&&console.error(`Reactive MD: automatic mounting failed.`,e)}};document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,e,{once:!0}):queueMicrotask(e)}return lD(),e.REACTIVE_MD_DIAGNOSTICS_EVENT=CE,e.REACTIVE_MD_DOC_TAG=rD,e.REACTIVE_MD_MOUNTED_ATTRIBUTE=HE,e.REACTIVE_MD_STANDALONE_GENERATOR=VE,e.REACTIVE_MD_STANDALONE_VERSION=BE,e.REACTIVE_MD_STATE_CHANGE_EVENT=wE,e.ReactiveMDDocElement=oD,e.ReactiveMDMountError=xE,e.defineReactiveMDDoc=sD,e.diagnosticsFromError=SE,e.isReactiveMDMounted=JE,e.mount=$E,e.mountAll=nD,e.parseMountPayload=IE,e.prepareStandaloneDocument=zE,e})({});
|