@kousaku-maron/diffshape 0.6.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,153 +0,0 @@
1
- (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var sf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jh={exports:{}},wl={},em={exports:{}},je={};/**
2
- * @license React
3
- * react.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var Ro=Symbol.for("react.element"),Lv=Symbol.for("react.portal"),Iv=Symbol.for("react.fragment"),Av=Symbol.for("react.strict_mode"),Ov=Symbol.for("react.profiler"),Rv=Symbol.for("react.provider"),Mv=Symbol.for("react.context"),Pv=Symbol.for("react.forward_ref"),Fv=Symbol.for("react.suspense"),Dv=Symbol.for("react.memo"),zv=Symbol.for("react.lazy"),lf=Symbol.iterator;function Bv(e){return e===null||typeof e!="object"?null:(e=lf&&e[lf]||e["@@iterator"],typeof e=="function"?e:null)}var tm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},nm=Object.assign,rm={};function Ni(e,t,n){this.props=e,this.context=t,this.refs=rm,this.updater=n||tm}Ni.prototype.isReactComponent={};Ni.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ni.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function im(){}im.prototype=Ni.prototype;function Ec(e,t,n){this.props=e,this.context=t,this.refs=rm,this.updater=n||tm}var Sc=Ec.prototype=new im;Sc.constructor=Ec;nm(Sc,Ni.prototype);Sc.isPureReactComponent=!0;var af=Array.isArray,om=Object.prototype.hasOwnProperty,Cc={current:null},sm={key:!0,ref:!0,__self:!0,__source:!0};function lm(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)om.call(t,r)&&!sm.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var a=Array(l),u=0;u<l;u++)a[u]=arguments[u+2];i.children=a}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)i[r]===void 0&&(i[r]=l[r]);return{$$typeof:Ro,type:e,key:o,ref:s,props:i,_owner:Cc.current}}function Uv(e,t){return{$$typeof:Ro,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Nc(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ro}function Hv(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var uf=/\/+/g;function Yl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Hv(""+e.key):t.toString(36)}function ws(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Ro:case Lv:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+Yl(s,0):r,af(i)?(n="",e!=null&&(n=e.replace(uf,"$&/")+"/"),ws(i,t,n,"",function(u){return u})):i!=null&&(Nc(i)&&(i=Uv(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(uf,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",af(e))for(var l=0;l<e.length;l++){o=e[l];var a=r+Yl(o,l);s+=ws(o,t,n,a,i)}else if(a=Bv(e),typeof a=="function")for(e=a.call(e),l=0;!(o=e.next()).done;)o=o.value,a=r+Yl(o,l++),s+=ws(o,t,n,a,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Ko(e,t,n){if(e==null)return e;var r=[],i=0;return ws(e,r,"","",function(o){return t.call(n,o,i++)}),r}function Wv(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var jt={current:null},ks={transition:null},Vv={ReactCurrentDispatcher:jt,ReactCurrentBatchConfig:ks,ReactCurrentOwner:Cc};function am(){throw Error("act(...) is not supported in production builds of React.")}je.Children={map:Ko,forEach:function(e,t,n){Ko(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ko(e,function(){t++}),t},toArray:function(e){return Ko(e,function(t){return t})||[]},only:function(e){if(!Nc(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};je.Component=Ni;je.Fragment=Iv;je.Profiler=Ov;je.PureComponent=Ec;je.StrictMode=Av;je.Suspense=Fv;je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Vv;je.act=am;je.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=nm({},e.props),i=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=Cc.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(a in t)om.call(t,a)&&!sm.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&l!==void 0?l[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){l=Array(a);for(var u=0;u<a;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:Ro,type:e.type,key:i,ref:o,props:r,_owner:s}};je.createContext=function(e){return e={$$typeof:Mv,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Rv,_context:e},e.Consumer=e};je.createElement=lm;je.createFactory=function(e){var t=lm.bind(null,e);return t.type=e,t};je.createRef=function(){return{current:null}};je.forwardRef=function(e){return{$$typeof:Pv,render:e}};je.isValidElement=Nc;je.lazy=function(e){return{$$typeof:zv,_payload:{_status:-1,_result:e},_init:Wv}};je.memo=function(e,t){return{$$typeof:Dv,type:e,compare:t===void 0?null:t}};je.startTransition=function(e){var t=ks.transition;ks.transition={};try{e()}finally{ks.transition=t}};je.unstable_act=am;je.useCallback=function(e,t){return jt.current.useCallback(e,t)};je.useContext=function(e){return jt.current.useContext(e)};je.useDebugValue=function(){};je.useDeferredValue=function(e){return jt.current.useDeferredValue(e)};je.useEffect=function(e,t){return jt.current.useEffect(e,t)};je.useId=function(){return jt.current.useId()};je.useImperativeHandle=function(e,t,n){return jt.current.useImperativeHandle(e,t,n)};je.useInsertionEffect=function(e,t){return jt.current.useInsertionEffect(e,t)};je.useLayoutEffect=function(e,t){return jt.current.useLayoutEffect(e,t)};je.useMemo=function(e,t){return jt.current.useMemo(e,t)};je.useReducer=function(e,t,n){return jt.current.useReducer(e,t,n)};je.useRef=function(e){return jt.current.useRef(e)};je.useState=function(e){return jt.current.useState(e)};je.useSyncExternalStore=function(e,t,n){return jt.current.useSyncExternalStore(e,t,n)};je.useTransition=function(){return jt.current.useTransition()};je.version="18.3.1";em.exports=je;var z=em.exports;/**
10
- * @license React
11
- * react-jsx-runtime.production.min.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var Gv=z,Kv=Symbol.for("react.element"),qv=Symbol.for("react.fragment"),Yv=Object.prototype.hasOwnProperty,Xv=Gv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Qv={key:!0,ref:!0,__self:!0,__source:!0};function um(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)Yv.call(t,r)&&!Qv.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Kv,type:e,key:o,ref:s,props:i,_owner:Xv.current}}wl.Fragment=qv;wl.jsx=um;wl.jsxs=um;Jh.exports=wl;var f=Jh.exports,cm={exports:{}},Wt={},dm={exports:{}},fm={};/**
18
- * @license React
19
- * scheduler.production.min.js
20
- *
21
- * Copyright (c) Facebook, Inc. and its affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */(function(e){function t(P,G){var S=P.length;P.push(G);e:for(;0<S;){var Y=S-1>>>1,Z=P[Y];if(0<i(Z,G))P[Y]=G,P[S]=Z,S=Y;else break e}}function n(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var G=P[0],S=P.pop();if(S!==G){P[0]=S;e:for(var Y=0,Z=P.length,j=Z>>>1;Y<j;){var R=2*(Y+1)-1,I=P[R],M=R+1,H=P[M];if(0>i(I,S))M<Z&&0>i(H,I)?(P[Y]=H,P[M]=S,Y=M):(P[Y]=I,P[R]=S,Y=R);else if(M<Z&&0>i(H,S))P[Y]=H,P[M]=S,Y=M;else break e}}return G}function i(P,G){var S=P.sortIndex-G.sortIndex;return S!==0?S:P.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var a=[],u=[],c=1,d=null,h=3,p=!1,x=!1,v=!1,k=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(P){for(var G=n(u);G!==null;){if(G.callback===null)r(u);else if(G.startTime<=P)r(u),G.sortIndex=G.expirationTime,t(a,G);else break;G=n(u)}}function w(P){if(v=!1,g(P),!x)if(n(a)!==null)x=!0,U(C);else{var G=n(u);G!==null&&W(w,G.startTime-P)}}function C(P,G){x=!1,v&&(v=!1,y(_),_=-1),p=!0;var S=h;try{for(g(G),d=n(a);d!==null&&(!(d.expirationTime>G)||P&&!O());){var Y=d.callback;if(typeof Y=="function"){d.callback=null,h=d.priorityLevel;var Z=Y(d.expirationTime<=G);G=e.unstable_now(),typeof Z=="function"?d.callback=Z:d===n(a)&&r(a),g(G)}else r(a);d=n(a)}if(d!==null)var j=!0;else{var R=n(u);R!==null&&W(w,R.startTime-G),j=!1}return j}finally{d=null,h=S,p=!1}}var E=!1,A=null,_=-1,$=5,b=-1;function O(){return!(e.unstable_now()-b<$)}function T(){if(A!==null){var P=e.unstable_now();b=P;var G=!0;try{G=A(!0,P)}finally{G?F():(E=!1,A=null)}}else E=!1}var F;if(typeof m=="function")F=function(){m(T)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,B=L.port2;L.port1.onmessage=T,F=function(){B.postMessage(null)}}else F=function(){k(T,0)};function U(P){A=P,E||(E=!0,F())}function W(P,G){_=k(function(){P(e.unstable_now())},G)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_continueExecution=function(){x||p||(x=!0,U(C))},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(P){switch(h){case 1:case 2:case 3:var G=3;break;default:G=h}var S=h;h=G;try{return P()}finally{h=S}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(P,G){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var S=h;h=P;try{return G()}finally{h=S}},e.unstable_scheduleCallback=function(P,G,S){var Y=e.unstable_now();switch(typeof S=="object"&&S!==null?(S=S.delay,S=typeof S=="number"&&0<S?Y+S:Y):S=Y,P){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=S+Z,P={id:c++,callback:G,priorityLevel:P,startTime:S,expirationTime:Z,sortIndex:-1},S>Y?(P.sortIndex=S,t(u,P),n(a)===null&&P===n(u)&&(v?(y(_),_=-1):v=!0,W(w,S-Y))):(P.sortIndex=Z,t(a,P),x||p||(x=!0,U(C))),P},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(P){var G=h;return function(){var S=h;h=G;try{return P.apply(this,arguments)}finally{h=S}}}})(fm);dm.exports=fm;var Zv=dm.exports;/**
26
- * @license React
27
- * react-dom.production.min.js
28
- *
29
- * Copyright (c) Facebook, Inc. and its affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var Jv=z,Ht=Zv;function le(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var pm=new Set,ho={};function Dr(e,t){mi(e,t),mi(e+"Capture",t)}function mi(e,t){for(ho[e]=t,e=0;e<t.length;e++)pm.add(t[e])}var Rn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ja=Object.prototype.hasOwnProperty,ew=/^[: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]*$/,cf={},df={};function tw(e){return Ja.call(df,e)?!0:Ja.call(cf,e)?!1:ew.test(e)?df[e]=!0:(cf[e]=!0,!1)}function nw(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function rw(e,t,n,r){if(t===null||typeof t>"u"||nw(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function _t(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var vt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){vt[e]=new _t(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];vt[t]=new _t(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){vt[e]=new _t(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){vt[e]=new _t(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){vt[e]=new _t(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){vt[e]=new _t(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){vt[e]=new _t(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){vt[e]=new _t(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){vt[e]=new _t(e,5,!1,e.toLowerCase(),null,!1,!1)});var jc=/[\-:]([a-z])/g;function _c(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(jc,_c);vt[t]=new _t(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(jc,_c);vt[t]=new _t(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(jc,_c);vt[t]=new _t(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){vt[e]=new _t(e,1,!1,e.toLowerCase(),null,!1,!1)});vt.xlinkHref=new _t("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){vt[e]=new _t(e,1,!1,e.toLowerCase(),null,!0,!0)});function Tc(e,t,n,r){var i=vt.hasOwnProperty(t)?vt[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(rw(t,n,i,r)&&(n=null),r||i===null?tw(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var zn=Jv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,qo=Symbol.for("react.element"),Kr=Symbol.for("react.portal"),qr=Symbol.for("react.fragment"),$c=Symbol.for("react.strict_mode"),eu=Symbol.for("react.profiler"),hm=Symbol.for("react.provider"),mm=Symbol.for("react.context"),Lc=Symbol.for("react.forward_ref"),tu=Symbol.for("react.suspense"),nu=Symbol.for("react.suspense_list"),Ic=Symbol.for("react.memo"),Gn=Symbol.for("react.lazy"),gm=Symbol.for("react.offscreen"),ff=Symbol.iterator;function Ai(e){return e===null||typeof e!="object"?null:(e=ff&&e[ff]||e["@@iterator"],typeof e=="function"?e:null)}var Ke=Object.assign,Xl;function Ki(e){if(Xl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Xl=t&&t[1]||""}return`
34
- `+Xl+e}var Ql=!1;function Zl(e,t){if(!e||Ql)return"";Ql=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
35
- `),o=r.stack.split(`
36
- `),s=i.length-1,l=o.length-1;1<=s&&0<=l&&i[s]!==o[l];)l--;for(;1<=s&&0<=l;s--,l--)if(i[s]!==o[l]){if(s!==1||l!==1)do if(s--,l--,0>l||i[s]!==o[l]){var a=`
37
- `+i[s].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{Ql=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ki(e):""}function iw(e){switch(e.tag){case 5:return Ki(e.type);case 16:return Ki("Lazy");case 13:return Ki("Suspense");case 19:return Ki("SuspenseList");case 0:case 2:case 15:return e=Zl(e.type,!1),e;case 11:return e=Zl(e.type.render,!1),e;case 1:return e=Zl(e.type,!0),e;default:return""}}function ru(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case qr:return"Fragment";case Kr:return"Portal";case eu:return"Profiler";case $c:return"StrictMode";case tu:return"Suspense";case nu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case mm:return(e.displayName||"Context")+".Consumer";case hm:return(e._context.displayName||"Context")+".Provider";case Lc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ic:return t=e.displayName||null,t!==null?t:ru(e.type)||"Memo";case Gn:t=e._payload,e=e._init;try{return ru(e(t))}catch{}}return null}function ow(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ru(t);case 8:return t===$c?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function lr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ym(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function sw(e){var t=ym(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Yo(e){e._valueTracker||(e._valueTracker=sw(e))}function xm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ym(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ps(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function iu(e,t){var n=t.checked;return Ke({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function pf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=lr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function vm(e,t){t=t.checked,t!=null&&Tc(e,"checked",t,!1)}function ou(e,t){vm(e,t);var n=lr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?su(e,t.type,n):t.hasOwnProperty("defaultValue")&&su(e,t.type,lr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function hf(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function su(e,t,n){(t!=="number"||Ps(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var qi=Array.isArray;function si(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=""+lr(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 lu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(le(91));return Ke({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function mf(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(le(92));if(qi(n)){if(1<n.length)throw Error(le(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:lr(n)}}function wm(e,t){var n=lr(t.value),r=lr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function gf(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function km(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function au(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?km(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Xo,bm=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Xo=Xo||document.createElement("div"),Xo.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Xo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function mo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Zi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},lw=["Webkit","ms","Moz","O"];Object.keys(Zi).forEach(function(e){lw.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Zi[t]=Zi[e]})});function Em(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Zi.hasOwnProperty(e)&&Zi[e]?(""+t).trim():t+"px"}function Sm(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Em(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var aw=Ke({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function uu(e,t){if(t){if(aw[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(le(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(le(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(le(61))}if(t.style!=null&&typeof t.style!="object")throw Error(le(62))}}function cu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 du=null;function Ac(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var fu=null,li=null,ai=null;function yf(e){if(e=Fo(e)){if(typeof fu!="function")throw Error(le(280));var t=e.stateNode;t&&(t=Cl(t),fu(e.stateNode,e.type,t))}}function Cm(e){li?ai?ai.push(e):ai=[e]:li=e}function Nm(){if(li){var e=li,t=ai;if(ai=li=null,yf(e),t)for(e=0;e<t.length;e++)yf(t[e])}}function jm(e,t){return e(t)}function _m(){}var Jl=!1;function Tm(e,t,n){if(Jl)return e(t,n);Jl=!0;try{return jm(e,t,n)}finally{Jl=!1,(li!==null||ai!==null)&&(_m(),Nm())}}function go(e,t){var n=e.stateNode;if(n===null)return null;var r=Cl(n);if(r===null)return null;n=r[t];e: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 e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(le(231,t,typeof n));return n}var pu=!1;if(Rn)try{var Oi={};Object.defineProperty(Oi,"passive",{get:function(){pu=!0}}),window.addEventListener("test",Oi,Oi),window.removeEventListener("test",Oi,Oi)}catch{pu=!1}function uw(e,t,n,r,i,o,s,l,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Ji=!1,Fs=null,Ds=!1,hu=null,cw={onError:function(e){Ji=!0,Fs=e}};function dw(e,t,n,r,i,o,s,l,a){Ji=!1,Fs=null,uw.apply(cw,arguments)}function fw(e,t,n,r,i,o,s,l,a){if(dw.apply(this,arguments),Ji){if(Ji){var u=Fs;Ji=!1,Fs=null}else throw Error(le(198));Ds||(Ds=!0,hu=u)}}function zr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function $m(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function xf(e){if(zr(e)!==e)throw Error(le(188))}function pw(e){var t=e.alternate;if(!t){if(t=zr(e),t===null)throw Error(le(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return xf(i),e;if(o===r)return xf(i),t;o=o.sibling}throw Error(le(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)throw Error(le(189))}}if(n.alternate!==r)throw Error(le(190))}if(n.tag!==3)throw Error(le(188));return n.stateNode.current===n?e:t}function Lm(e){return e=pw(e),e!==null?Im(e):null}function Im(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Im(e);if(t!==null)return t;e=e.sibling}return null}var Am=Ht.unstable_scheduleCallback,vf=Ht.unstable_cancelCallback,hw=Ht.unstable_shouldYield,mw=Ht.unstable_requestPaint,Je=Ht.unstable_now,gw=Ht.unstable_getCurrentPriorityLevel,Oc=Ht.unstable_ImmediatePriority,Om=Ht.unstable_UserBlockingPriority,zs=Ht.unstable_NormalPriority,yw=Ht.unstable_LowPriority,Rm=Ht.unstable_IdlePriority,kl=null,Sn=null;function xw(e){if(Sn&&typeof Sn.onCommitFiberRoot=="function")try{Sn.onCommitFiberRoot(kl,e,void 0,(e.current.flags&128)===128)}catch{}}var fn=Math.clz32?Math.clz32:kw,vw=Math.log,ww=Math.LN2;function kw(e){return e>>>=0,e===0?32:31-(vw(e)/ww|0)|0}var Qo=64,Zo=4194304;function Yi(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Bs(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=Yi(l):(o&=s,o!==0&&(r=Yi(o)))}else s=n&~i,s!==0?r=Yi(s):o!==0&&(r=Yi(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-fn(t),i=1<<n,r|=e[n],t&=~i;return r}function bw(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ew(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-fn(o),l=1<<s,a=i[s];a===-1?(!(l&n)||l&r)&&(i[s]=bw(l,t)):a<=t&&(e.expiredLanes|=l),o&=~l}}function mu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Mm(){var e=Qo;return Qo<<=1,!(Qo&4194240)&&(Qo=64),e}function ea(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Mo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-fn(t),e[t]=n}function Sw(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-fn(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function Rc(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-fn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Me=0;function Pm(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Fm,Mc,Dm,zm,Bm,gu=!1,Jo=[],Jn=null,er=null,tr=null,yo=new Map,xo=new Map,qn=[],Cw="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 submit".split(" ");function wf(e,t){switch(e){case"focusin":case"focusout":Jn=null;break;case"dragenter":case"dragleave":er=null;break;case"mouseover":case"mouseout":tr=null;break;case"pointerover":case"pointerout":yo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":xo.delete(t.pointerId)}}function Ri(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=Fo(t),t!==null&&Mc(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Nw(e,t,n,r,i){switch(t){case"focusin":return Jn=Ri(Jn,e,t,n,r,i),!0;case"dragenter":return er=Ri(er,e,t,n,r,i),!0;case"mouseover":return tr=Ri(tr,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return yo.set(o,Ri(yo.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,xo.set(o,Ri(xo.get(o)||null,e,t,n,r,i)),!0}return!1}function Um(e){var t=br(e.target);if(t!==null){var n=zr(t);if(n!==null){if(t=n.tag,t===13){if(t=$m(n),t!==null){e.blockedOn=t,Bm(e.priority,function(){Dm(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 bs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=yu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);du=r,n.target.dispatchEvent(r),du=null}else return t=Fo(n),t!==null&&Mc(t),e.blockedOn=n,!1;t.shift()}return!0}function kf(e,t,n){bs(e)&&n.delete(t)}function jw(){gu=!1,Jn!==null&&bs(Jn)&&(Jn=null),er!==null&&bs(er)&&(er=null),tr!==null&&bs(tr)&&(tr=null),yo.forEach(kf),xo.forEach(kf)}function Mi(e,t){e.blockedOn===t&&(e.blockedOn=null,gu||(gu=!0,Ht.unstable_scheduleCallback(Ht.unstable_NormalPriority,jw)))}function vo(e){function t(i){return Mi(i,e)}if(0<Jo.length){Mi(Jo[0],e);for(var n=1;n<Jo.length;n++){var r=Jo[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Jn!==null&&Mi(Jn,e),er!==null&&Mi(er,e),tr!==null&&Mi(tr,e),yo.forEach(t),xo.forEach(t),n=0;n<qn.length;n++)r=qn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<qn.length&&(n=qn[0],n.blockedOn===null);)Um(n),n.blockedOn===null&&qn.shift()}var ui=zn.ReactCurrentBatchConfig,Us=!0;function _w(e,t,n,r){var i=Me,o=ui.transition;ui.transition=null;try{Me=1,Pc(e,t,n,r)}finally{Me=i,ui.transition=o}}function Tw(e,t,n,r){var i=Me,o=ui.transition;ui.transition=null;try{Me=4,Pc(e,t,n,r)}finally{Me=i,ui.transition=o}}function Pc(e,t,n,r){if(Us){var i=yu(e,t,n,r);if(i===null)ca(e,t,r,Hs,n),wf(e,r);else if(Nw(i,e,t,n,r))r.stopPropagation();else if(wf(e,r),t&4&&-1<Cw.indexOf(e)){for(;i!==null;){var o=Fo(i);if(o!==null&&Fm(o),o=yu(e,t,n,r),o===null&&ca(e,t,r,Hs,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else ca(e,t,r,null,n)}}var Hs=null;function yu(e,t,n,r){if(Hs=null,e=Ac(r),e=br(e),e!==null)if(t=zr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=$m(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 Hs=e,null}function Hm(e){switch(e){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"resize":case"seeked":case"submit":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"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(gw()){case Oc:return 1;case Om:return 4;case zs:case yw:return 16;case Rm:return 536870912;default:return 16}default:return 16}}var Qn=null,Fc=null,Es=null;function Wm(){if(Es)return Es;var e,t=Fc,n=t.length,r,i="value"in Qn?Qn.value:Qn.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===i[o-r];r++);return Es=i.slice(e,1<r?1-r:void 0)}function Ss(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 es(){return!0}function bf(){return!1}function Vt(e){function t(n,r,i,o,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?es:bf,this.isPropagationStopped=bf,this}return Ke(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=es)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=es)},persist:function(){},isPersistent:es}),t}var ji={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Dc=Vt(ji),Po=Ke({},ji,{view:0,detail:0}),$w=Vt(Po),ta,na,Pi,bl=Ke({},Po,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zc,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!==Pi&&(Pi&&e.type==="mousemove"?(ta=e.screenX-Pi.screenX,na=e.screenY-Pi.screenY):na=ta=0,Pi=e),ta)},movementY:function(e){return"movementY"in e?e.movementY:na}}),Ef=Vt(bl),Lw=Ke({},bl,{dataTransfer:0}),Iw=Vt(Lw),Aw=Ke({},Po,{relatedTarget:0}),ra=Vt(Aw),Ow=Ke({},ji,{animationName:0,elapsedTime:0,pseudoElement:0}),Rw=Vt(Ow),Mw=Ke({},ji,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Pw=Vt(Mw),Fw=Ke({},ji,{data:0}),Sf=Vt(Fw),Dw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},zw={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"},Bw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Uw(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Bw[e])?!!t[e]:!1}function zc(){return Uw}var Hw=Ke({},Po,{key:function(e){if(e.key){var t=Dw[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ss(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?zw[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zc,charCode:function(e){return e.type==="keypress"?Ss(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ss(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ww=Vt(Hw),Vw=Ke({},bl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Cf=Vt(Vw),Gw=Ke({},Po,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zc}),Kw=Vt(Gw),qw=Ke({},ji,{propertyName:0,elapsedTime:0,pseudoElement:0}),Yw=Vt(qw),Xw=Ke({},bl,{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}),Qw=Vt(Xw),Zw=[9,13,27,32],Bc=Rn&&"CompositionEvent"in window,eo=null;Rn&&"documentMode"in document&&(eo=document.documentMode);var Jw=Rn&&"TextEvent"in window&&!eo,Vm=Rn&&(!Bc||eo&&8<eo&&11>=eo),Nf=" ",jf=!1;function Gm(e,t){switch(e){case"keyup":return Zw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Km(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Yr=!1;function ek(e,t){switch(e){case"compositionend":return Km(t);case"keypress":return t.which!==32?null:(jf=!0,Nf);case"textInput":return e=t.data,e===Nf&&jf?null:e;default:return null}}function tk(e,t){if(Yr)return e==="compositionend"||!Bc&&Gm(e,t)?(e=Wm(),Es=Fc=Qn=null,Yr=!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 Vm&&t.locale!=="ko"?null:t.data;default:return null}}var nk={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 _f(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!nk[e.type]:t==="textarea"}function qm(e,t,n,r){Cm(r),t=Ws(t,"onChange"),0<t.length&&(n=new Dc("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var to=null,wo=null;function rk(e){og(e,0)}function El(e){var t=Zr(e);if(xm(t))return e}function ik(e,t){if(e==="change")return t}var Ym=!1;if(Rn){var ia;if(Rn){var oa="oninput"in document;if(!oa){var Tf=document.createElement("div");Tf.setAttribute("oninput","return;"),oa=typeof Tf.oninput=="function"}ia=oa}else ia=!1;Ym=ia&&(!document.documentMode||9<document.documentMode)}function $f(){to&&(to.detachEvent("onpropertychange",Xm),wo=to=null)}function Xm(e){if(e.propertyName==="value"&&El(wo)){var t=[];qm(t,wo,e,Ac(e)),Tm(rk,t)}}function ok(e,t,n){e==="focusin"?($f(),to=t,wo=n,to.attachEvent("onpropertychange",Xm)):e==="focusout"&&$f()}function sk(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return El(wo)}function lk(e,t){if(e==="click")return El(t)}function ak(e,t){if(e==="input"||e==="change")return El(t)}function uk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yn=typeof Object.is=="function"?Object.is:uk;function ko(e,t){if(yn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)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(!Ja.call(t,i)||!yn(e[i],t[i]))return!1}return!0}function Lf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function If(e,t){var n=Lf(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}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Lf(n)}}function Qm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Qm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Zm(){for(var e=window,t=Ps();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ps(e.document)}return t}function Uc(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")}function ck(e){var t=Zm(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Qm(n.ownerDocument.documentElement,n)){if(r!==null&&Uc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=If(n,o);var s=If(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var dk=Rn&&"documentMode"in document&&11>=document.documentMode,Xr=null,xu=null,no=null,vu=!1;function Af(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;vu||Xr==null||Xr!==Ps(r)||(r=Xr,"selectionStart"in r&&Uc(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}),no&&ko(no,r)||(no=r,r=Ws(xu,"onSelect"),0<r.length&&(t=new Dc("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Xr)))}function ts(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Qr={animationend:ts("Animation","AnimationEnd"),animationiteration:ts("Animation","AnimationIteration"),animationstart:ts("Animation","AnimationStart"),transitionend:ts("Transition","TransitionEnd")},sa={},Jm={};Rn&&(Jm=document.createElement("div").style,"AnimationEvent"in window||(delete Qr.animationend.animation,delete Qr.animationiteration.animation,delete Qr.animationstart.animation),"TransitionEvent"in window||delete Qr.transitionend.transition);function Sl(e){if(sa[e])return sa[e];if(!Qr[e])return e;var t=Qr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Jm)return sa[e]=t[n];return e}var eg=Sl("animationend"),tg=Sl("animationiteration"),ng=Sl("animationstart"),rg=Sl("transitionend"),ig=new Map,Of="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error 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(" ");function dr(e,t){ig.set(e,t),Dr(t,[e])}for(var la=0;la<Of.length;la++){var aa=Of[la],fk=aa.toLowerCase(),pk=aa[0].toUpperCase()+aa.slice(1);dr(fk,"on"+pk)}dr(eg,"onAnimationEnd");dr(tg,"onAnimationIteration");dr(ng,"onAnimationStart");dr("dblclick","onDoubleClick");dr("focusin","onFocus");dr("focusout","onBlur");dr(rg,"onTransitionEnd");mi("onMouseEnter",["mouseout","mouseover"]);mi("onMouseLeave",["mouseout","mouseover"]);mi("onPointerEnter",["pointerout","pointerover"]);mi("onPointerLeave",["pointerout","pointerover"]);Dr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Dr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Dr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Dr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Dr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Dr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xi="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(" "),hk=new Set("cancel close invalid load scroll toggle".split(" ").concat(Xi));function Rf(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,fw(r,t,void 0,e),e.currentTarget=null}function og(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var s=r.length-1;0<=s;s--){var l=r[s],a=l.instance,u=l.currentTarget;if(l=l.listener,a!==o&&i.isPropagationStopped())break e;Rf(i,l,u),o=a}else for(s=0;s<r.length;s++){if(l=r[s],a=l.instance,u=l.currentTarget,l=l.listener,a!==o&&i.isPropagationStopped())break e;Rf(i,l,u),o=a}}}if(Ds)throw e=hu,Ds=!1,hu=null,e}function Ue(e,t){var n=t[Su];n===void 0&&(n=t[Su]=new Set);var r=e+"__bubble";n.has(r)||(sg(t,e,2,!1),n.add(r))}function ua(e,t,n){var r=0;t&&(r|=4),sg(n,e,r,t)}var ns="_reactListening"+Math.random().toString(36).slice(2);function bo(e){if(!e[ns]){e[ns]=!0,pm.forEach(function(n){n!=="selectionchange"&&(hk.has(n)||ua(n,!1,e),ua(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ns]||(t[ns]=!0,ua("selectionchange",!1,t))}}function sg(e,t,n,r){switch(Hm(t)){case 1:var i=_w;break;case 4:i=Tw;break;default:i=Pc}n=i.bind(null,t,n,e),i=void 0,!pu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function ca(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var l=r.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var a=s.tag;if((a===3||a===4)&&(a=s.stateNode.containerInfo,a===i||a.nodeType===8&&a.parentNode===i))return;s=s.return}for(;l!==null;){if(s=br(l),s===null)return;if(a=s.tag,a===5||a===6){r=o=s;continue e}l=l.parentNode}}r=r.return}Tm(function(){var u=o,c=Ac(n),d=[];e:{var h=ig.get(e);if(h!==void 0){var p=Dc,x=e;switch(e){case"keypress":if(Ss(n)===0)break e;case"keydown":case"keyup":p=Ww;break;case"focusin":x="focus",p=ra;break;case"focusout":x="blur",p=ra;break;case"beforeblur":case"afterblur":p=ra;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=Ef;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=Iw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=Kw;break;case eg:case tg:case ng:p=Rw;break;case rg:p=Yw;break;case"scroll":p=$w;break;case"wheel":p=Qw;break;case"copy":case"cut":case"paste":p=Pw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Cf}var v=(t&4)!==0,k=!v&&e==="scroll",y=v?h!==null?h+"Capture":null:h;v=[];for(var m=u,g;m!==null;){g=m;var w=g.stateNode;if(g.tag===5&&w!==null&&(g=w,y!==null&&(w=go(m,y),w!=null&&v.push(Eo(m,w,g)))),k)break;m=m.return}0<v.length&&(h=new p(h,x,null,n,c),d.push({event:h,listeners:v}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&n!==du&&(x=n.relatedTarget||n.fromElement)&&(br(x)||x[Mn]))break e;if((p||h)&&(h=c.window===c?c:(h=c.ownerDocument)?h.defaultView||h.parentWindow:window,p?(x=n.relatedTarget||n.toElement,p=u,x=x?br(x):null,x!==null&&(k=zr(x),x!==k||x.tag!==5&&x.tag!==6)&&(x=null)):(p=null,x=u),p!==x)){if(v=Ef,w="onMouseLeave",y="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(v=Cf,w="onPointerLeave",y="onPointerEnter",m="pointer"),k=p==null?h:Zr(p),g=x==null?h:Zr(x),h=new v(w,m+"leave",p,n,c),h.target=k,h.relatedTarget=g,w=null,br(c)===u&&(v=new v(y,m+"enter",x,n,c),v.target=g,v.relatedTarget=k,w=v),k=w,p&&x)t:{for(v=p,y=x,m=0,g=v;g;g=Hr(g))m++;for(g=0,w=y;w;w=Hr(w))g++;for(;0<m-g;)v=Hr(v),m--;for(;0<g-m;)y=Hr(y),g--;for(;m--;){if(v===y||y!==null&&v===y.alternate)break t;v=Hr(v),y=Hr(y)}v=null}else v=null;p!==null&&Mf(d,h,p,v,!1),x!==null&&k!==null&&Mf(d,k,x,v,!0)}}e:{if(h=u?Zr(u):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var C=ik;else if(_f(h))if(Ym)C=ak;else{C=sk;var E=ok}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(C=lk);if(C&&(C=C(e,u))){qm(d,C,n,c);break e}E&&E(e,h,u),e==="focusout"&&(E=h._wrapperState)&&E.controlled&&h.type==="number"&&su(h,"number",h.value)}switch(E=u?Zr(u):window,e){case"focusin":(_f(E)||E.contentEditable==="true")&&(Xr=E,xu=u,no=null);break;case"focusout":no=xu=Xr=null;break;case"mousedown":vu=!0;break;case"contextmenu":case"mouseup":case"dragend":vu=!1,Af(d,n,c);break;case"selectionchange":if(dk)break;case"keydown":case"keyup":Af(d,n,c)}var A;if(Bc)e:{switch(e){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else Yr?Gm(e,n)&&(_="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(_="onCompositionStart");_&&(Vm&&n.locale!=="ko"&&(Yr||_!=="onCompositionStart"?_==="onCompositionEnd"&&Yr&&(A=Wm()):(Qn=c,Fc="value"in Qn?Qn.value:Qn.textContent,Yr=!0)),E=Ws(u,_),0<E.length&&(_=new Sf(_,e,null,n,c),d.push({event:_,listeners:E}),A?_.data=A:(A=Km(n),A!==null&&(_.data=A)))),(A=Jw?ek(e,n):tk(e,n))&&(u=Ws(u,"onBeforeInput"),0<u.length&&(c=new Sf("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=A))}og(d,t)})}function Eo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ws(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=go(e,n),o!=null&&r.unshift(Eo(e,o,i)),o=go(e,t),o!=null&&r.push(Eo(e,o,i))),e=e.return}return r}function Hr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Mf(e,t,n,r,i){for(var o=t._reactName,s=[];n!==null&&n!==r;){var l=n,a=l.alternate,u=l.stateNode;if(a!==null&&a===r)break;l.tag===5&&u!==null&&(l=u,i?(a=go(n,o),a!=null&&s.unshift(Eo(n,a,l))):i||(a=go(n,o),a!=null&&s.push(Eo(n,a,l)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var mk=/\r\n?/g,gk=/\u0000|\uFFFD/g;function Pf(e){return(typeof e=="string"?e:""+e).replace(mk,`
38
- `).replace(gk,"")}function rs(e,t,n){if(t=Pf(t),Pf(e)!==t&&n)throw Error(le(425))}function Vs(){}var wu=null,ku=null;function bu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Eu=typeof setTimeout=="function"?setTimeout:void 0,yk=typeof clearTimeout=="function"?clearTimeout:void 0,Ff=typeof Promise=="function"?Promise:void 0,xk=typeof queueMicrotask=="function"?queueMicrotask:typeof Ff<"u"?function(e){return Ff.resolve(null).then(e).catch(vk)}:Eu;function vk(e){setTimeout(function(){throw e})}function da(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==="/$"){if(r===0){e.removeChild(i),vo(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);vo(t)}function nr(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==="$?")break;if(t==="/$")return null}}return e}function Df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var _i=Math.random().toString(36).slice(2),En="__reactFiber$"+_i,So="__reactProps$"+_i,Mn="__reactContainer$"+_i,Su="__reactEvents$"+_i,wk="__reactListeners$"+_i,kk="__reactHandles$"+_i;function br(e){var t=e[En];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Mn]||n[En]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Df(e);e!==null;){if(n=e[En])return n;e=Df(e)}return t}e=n,n=e.parentNode}return null}function Fo(e){return e=e[En]||e[Mn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Zr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(le(33))}function Cl(e){return e[So]||null}var Cu=[],Jr=-1;function fr(e){return{current:e}}function He(e){0>Jr||(e.current=Cu[Jr],Cu[Jr]=null,Jr--)}function Be(e,t){Jr++,Cu[Jr]=e.current,e.current=t}var ar={},St=fr(ar),At=fr(!1),Lr=ar;function gi(e,t){var n=e.type.contextTypes;if(!n)return ar;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ot(e){return e=e.childContextTypes,e!=null}function Gs(){He(At),He(St)}function zf(e,t,n){if(St.current!==ar)throw Error(le(168));Be(St,t),Be(At,n)}function lg(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(le(108,ow(e)||"Unknown",i));return Ke({},n,r)}function Ks(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ar,Lr=St.current,Be(St,e),Be(At,At.current),!0}function Bf(e,t,n){var r=e.stateNode;if(!r)throw Error(le(169));n?(e=lg(e,t,Lr),r.__reactInternalMemoizedMergedChildContext=e,He(At),He(St),Be(St,e)):He(At),Be(At,n)}var Ln=null,Nl=!1,fa=!1;function ag(e){Ln===null?Ln=[e]:Ln.push(e)}function bk(e){Nl=!0,ag(e)}function pr(){if(!fa&&Ln!==null){fa=!0;var e=0,t=Me;try{var n=Ln;for(Me=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Ln=null,Nl=!1}catch(i){throw Ln!==null&&(Ln=Ln.slice(e+1)),Am(Oc,pr),i}finally{Me=t,fa=!1}}return null}var ei=[],ti=0,qs=null,Ys=0,Qt=[],Zt=0,Ir=null,In=1,An="";function xr(e,t){ei[ti++]=Ys,ei[ti++]=qs,qs=e,Ys=t}function ug(e,t,n){Qt[Zt++]=In,Qt[Zt++]=An,Qt[Zt++]=Ir,Ir=e;var r=In;e=An;var i=32-fn(r)-1;r&=~(1<<i),n+=1;var o=32-fn(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,In=1<<32-fn(t)+i|n<<i|r,An=o+e}else In=1<<o|n<<i|r,An=e}function Hc(e){e.return!==null&&(xr(e,1),ug(e,1,0))}function Wc(e){for(;e===qs;)qs=ei[--ti],ei[ti]=null,Ys=ei[--ti],ei[ti]=null;for(;e===Ir;)Ir=Qt[--Zt],Qt[Zt]=null,An=Qt[--Zt],Qt[Zt]=null,In=Qt[--Zt],Qt[Zt]=null}var Ut=null,Bt=null,We=!1,cn=null;function cg(e,t){var n=en(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Uf(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ut=e,Bt=nr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ut=e,Bt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ir!==null?{id:In,overflow:An}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=en(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ut=e,Bt=null,!0):!1;default:return!1}}function Nu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ju(e){if(We){var t=Bt;if(t){var n=t;if(!Uf(e,t)){if(Nu(e))throw Error(le(418));t=nr(n.nextSibling);var r=Ut;t&&Uf(e,t)?cg(r,n):(e.flags=e.flags&-4097|2,We=!1,Ut=e)}}else{if(Nu(e))throw Error(le(418));e.flags=e.flags&-4097|2,We=!1,Ut=e}}}function Hf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ut=e}function is(e){if(e!==Ut)return!1;if(!We)return Hf(e),We=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!bu(e.type,e.memoizedProps)),t&&(t=Bt)){if(Nu(e))throw dg(),Error(le(418));for(;t;)cg(e,t),t=nr(t.nextSibling)}if(Hf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(le(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Bt=nr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Bt=null}}else Bt=Ut?nr(e.stateNode.nextSibling):null;return!0}function dg(){for(var e=Bt;e;)e=nr(e.nextSibling)}function yi(){Bt=Ut=null,We=!1}function Vc(e){cn===null?cn=[e]:cn.push(e)}var Ek=zn.ReactCurrentBatchConfig;function Fi(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(le(309));var r=n.stateNode}if(!r)throw Error(le(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(s){var l=i.refs;s===null?delete l[o]:l[o]=s},t._stringRef=o,t)}if(typeof e!="string")throw Error(le(284));if(!n._owner)throw Error(le(290,e))}return e}function os(e,t){throw e=Object.prototype.toString.call(t),Error(le(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Wf(e){var t=e._init;return t(e._payload)}function fg(e){function t(y,m){if(e){var g=y.deletions;g===null?(y.deletions=[m],y.flags|=16):g.push(m)}}function n(y,m){if(!e)return null;for(;m!==null;)t(y,m),m=m.sibling;return null}function r(y,m){for(y=new Map;m!==null;)m.key!==null?y.set(m.key,m):y.set(m.index,m),m=m.sibling;return y}function i(y,m){return y=sr(y,m),y.index=0,y.sibling=null,y}function o(y,m,g){return y.index=g,e?(g=y.alternate,g!==null?(g=g.index,g<m?(y.flags|=2,m):g):(y.flags|=2,m)):(y.flags|=1048576,m)}function s(y){return e&&y.alternate===null&&(y.flags|=2),y}function l(y,m,g,w){return m===null||m.tag!==6?(m=va(g,y.mode,w),m.return=y,m):(m=i(m,g),m.return=y,m)}function a(y,m,g,w){var C=g.type;return C===qr?c(y,m,g.props.children,w,g.key):m!==null&&(m.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Gn&&Wf(C)===m.type)?(w=i(m,g.props),w.ref=Fi(y,m,g),w.return=y,w):(w=Ls(g.type,g.key,g.props,null,y.mode,w),w.ref=Fi(y,m,g),w.return=y,w)}function u(y,m,g,w){return m===null||m.tag!==4||m.stateNode.containerInfo!==g.containerInfo||m.stateNode.implementation!==g.implementation?(m=wa(g,y.mode,w),m.return=y,m):(m=i(m,g.children||[]),m.return=y,m)}function c(y,m,g,w,C){return m===null||m.tag!==7?(m=jr(g,y.mode,w,C),m.return=y,m):(m=i(m,g),m.return=y,m)}function d(y,m,g){if(typeof m=="string"&&m!==""||typeof m=="number")return m=va(""+m,y.mode,g),m.return=y,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case qo:return g=Ls(m.type,m.key,m.props,null,y.mode,g),g.ref=Fi(y,null,m),g.return=y,g;case Kr:return m=wa(m,y.mode,g),m.return=y,m;case Gn:var w=m._init;return d(y,w(m._payload),g)}if(qi(m)||Ai(m))return m=jr(m,y.mode,g,null),m.return=y,m;os(y,m)}return null}function h(y,m,g,w){var C=m!==null?m.key:null;if(typeof g=="string"&&g!==""||typeof g=="number")return C!==null?null:l(y,m,""+g,w);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case qo:return g.key===C?a(y,m,g,w):null;case Kr:return g.key===C?u(y,m,g,w):null;case Gn:return C=g._init,h(y,m,C(g._payload),w)}if(qi(g)||Ai(g))return C!==null?null:c(y,m,g,w,null);os(y,g)}return null}function p(y,m,g,w,C){if(typeof w=="string"&&w!==""||typeof w=="number")return y=y.get(g)||null,l(m,y,""+w,C);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case qo:return y=y.get(w.key===null?g:w.key)||null,a(m,y,w,C);case Kr:return y=y.get(w.key===null?g:w.key)||null,u(m,y,w,C);case Gn:var E=w._init;return p(y,m,g,E(w._payload),C)}if(qi(w)||Ai(w))return y=y.get(g)||null,c(m,y,w,C,null);os(m,w)}return null}function x(y,m,g,w){for(var C=null,E=null,A=m,_=m=0,$=null;A!==null&&_<g.length;_++){A.index>_?($=A,A=null):$=A.sibling;var b=h(y,A,g[_],w);if(b===null){A===null&&(A=$);break}e&&A&&b.alternate===null&&t(y,A),m=o(b,m,_),E===null?C=b:E.sibling=b,E=b,A=$}if(_===g.length)return n(y,A),We&&xr(y,_),C;if(A===null){for(;_<g.length;_++)A=d(y,g[_],w),A!==null&&(m=o(A,m,_),E===null?C=A:E.sibling=A,E=A);return We&&xr(y,_),C}for(A=r(y,A);_<g.length;_++)$=p(A,y,_,g[_],w),$!==null&&(e&&$.alternate!==null&&A.delete($.key===null?_:$.key),m=o($,m,_),E===null?C=$:E.sibling=$,E=$);return e&&A.forEach(function(O){return t(y,O)}),We&&xr(y,_),C}function v(y,m,g,w){var C=Ai(g);if(typeof C!="function")throw Error(le(150));if(g=C.call(g),g==null)throw Error(le(151));for(var E=C=null,A=m,_=m=0,$=null,b=g.next();A!==null&&!b.done;_++,b=g.next()){A.index>_?($=A,A=null):$=A.sibling;var O=h(y,A,b.value,w);if(O===null){A===null&&(A=$);break}e&&A&&O.alternate===null&&t(y,A),m=o(O,m,_),E===null?C=O:E.sibling=O,E=O,A=$}if(b.done)return n(y,A),We&&xr(y,_),C;if(A===null){for(;!b.done;_++,b=g.next())b=d(y,b.value,w),b!==null&&(m=o(b,m,_),E===null?C=b:E.sibling=b,E=b);return We&&xr(y,_),C}for(A=r(y,A);!b.done;_++,b=g.next())b=p(A,y,_,b.value,w),b!==null&&(e&&b.alternate!==null&&A.delete(b.key===null?_:b.key),m=o(b,m,_),E===null?C=b:E.sibling=b,E=b);return e&&A.forEach(function(T){return t(y,T)}),We&&xr(y,_),C}function k(y,m,g,w){if(typeof g=="object"&&g!==null&&g.type===qr&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case qo:e:{for(var C=g.key,E=m;E!==null;){if(E.key===C){if(C=g.type,C===qr){if(E.tag===7){n(y,E.sibling),m=i(E,g.props.children),m.return=y,y=m;break e}}else if(E.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Gn&&Wf(C)===E.type){n(y,E.sibling),m=i(E,g.props),m.ref=Fi(y,E,g),m.return=y,y=m;break e}n(y,E);break}else t(y,E);E=E.sibling}g.type===qr?(m=jr(g.props.children,y.mode,w,g.key),m.return=y,y=m):(w=Ls(g.type,g.key,g.props,null,y.mode,w),w.ref=Fi(y,m,g),w.return=y,y=w)}return s(y);case Kr:e:{for(E=g.key;m!==null;){if(m.key===E)if(m.tag===4&&m.stateNode.containerInfo===g.containerInfo&&m.stateNode.implementation===g.implementation){n(y,m.sibling),m=i(m,g.children||[]),m.return=y,y=m;break e}else{n(y,m);break}else t(y,m);m=m.sibling}m=wa(g,y.mode,w),m.return=y,y=m}return s(y);case Gn:return E=g._init,k(y,m,E(g._payload),w)}if(qi(g))return x(y,m,g,w);if(Ai(g))return v(y,m,g,w);os(y,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,m!==null&&m.tag===6?(n(y,m.sibling),m=i(m,g),m.return=y,y=m):(n(y,m),m=va(g,y.mode,w),m.return=y,y=m),s(y)):n(y,m)}return k}var xi=fg(!0),pg=fg(!1),Xs=fr(null),Qs=null,ni=null,Gc=null;function Kc(){Gc=ni=Qs=null}function qc(e){var t=Xs.current;He(Xs),e._currentValue=t}function _u(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ci(e,t){Qs=e,Gc=ni=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(It=!0),e.firstContext=null)}function nn(e){var t=e._currentValue;if(Gc!==e)if(e={context:e,memoizedValue:t,next:null},ni===null){if(Qs===null)throw Error(le(308));ni=e,Qs.dependencies={lanes:0,firstContext:e}}else ni=ni.next=e;return t}var Er=null;function Yc(e){Er===null?Er=[e]:Er.push(e)}function hg(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Yc(t)):(n.next=i.next,i.next=n),t.interleaved=n,Pn(e,r)}function Pn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Kn=!1;function Xc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function mg(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function On(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function rr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ie&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Pn(e,n)}return i=r.interleaved,i===null?(t.next=t,Yc(r)):(t.next=i.next,i.next=t),r.interleaved=t,Pn(e,n)}function Cs(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Rc(e,n)}}function Vf(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Zs(e,t,n,r){var i=e.updateQueue;Kn=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var a=l,u=a.next;a.next=null,s===null?o=u:s.next=u,s=a;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==s&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=a))}if(o!==null){var d=i.baseState;s=0,c=u=a=null,l=o;do{var h=l.lane,p=l.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var x=e,v=l;switch(h=t,p=n,v.tag){case 1:if(x=v.payload,typeof x=="function"){d=x.call(p,d,h);break e}d=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=v.payload,h=typeof x=="function"?x.call(p,d,h):x,h==null)break e;d=Ke({},d,h);break e;case 2:Kn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[l]:h.push(l))}else p={eventTime:p,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=p,a=d):c=c.next=p,s|=h;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;h=l,l=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(c===null&&(a=d),i.baseState=a,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Or|=s,e.lanes=s,e.memoizedState=d}}function Gf(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(le(191,i));i.call(r)}}}var Do={},Cn=fr(Do),Co=fr(Do),No=fr(Do);function Sr(e){if(e===Do)throw Error(le(174));return e}function Qc(e,t){switch(Be(No,t),Be(Co,e),Be(Cn,Do),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:au(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=au(t,e)}He(Cn),Be(Cn,t)}function vi(){He(Cn),He(Co),He(No)}function gg(e){Sr(No.current);var t=Sr(Cn.current),n=au(t,e.type);t!==n&&(Be(Co,e),Be(Cn,n))}function Zc(e){Co.current===e&&(He(Cn),He(Co))}var Ve=fr(0);function Js(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){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 pa=[];function Jc(){for(var e=0;e<pa.length;e++)pa[e]._workInProgressVersionPrimary=null;pa.length=0}var Ns=zn.ReactCurrentDispatcher,ha=zn.ReactCurrentBatchConfig,Ar=0,Ge=null,at=null,dt=null,el=!1,ro=!1,jo=0,Sk=0;function kt(){throw Error(le(321))}function ed(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!yn(e[n],t[n]))return!1;return!0}function td(e,t,n,r,i,o){if(Ar=o,Ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ns.current=e===null||e.memoizedState===null?_k:Tk,e=n(r,i),ro){o=0;do{if(ro=!1,jo=0,25<=o)throw Error(le(301));o+=1,dt=at=null,t.updateQueue=null,Ns.current=$k,e=n(r,i)}while(ro)}if(Ns.current=tl,t=at!==null&&at.next!==null,Ar=0,dt=at=Ge=null,el=!1,t)throw Error(le(300));return e}function nd(){var e=jo!==0;return jo=0,e}function kn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return dt===null?Ge.memoizedState=dt=e:dt=dt.next=e,dt}function rn(){if(at===null){var e=Ge.alternate;e=e!==null?e.memoizedState:null}else e=at.next;var t=dt===null?Ge.memoizedState:dt.next;if(t!==null)dt=t,at=e;else{if(e===null)throw Error(le(310));at=e,e={memoizedState:at.memoizedState,baseState:at.baseState,baseQueue:at.baseQueue,queue:at.queue,next:null},dt===null?Ge.memoizedState=dt=e:dt=dt.next=e}return dt}function _o(e,t){return typeof t=="function"?t(e):t}function ma(e){var t=rn(),n=t.queue;if(n===null)throw Error(le(311));n.lastRenderedReducer=e;var r=at,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var l=s=null,a=null,u=o;do{var c=u.lane;if((Ar&c)===c)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(l=a=d,s=r):a=a.next=d,Ge.lanes|=c,Or|=c}u=u.next}while(u!==null&&u!==o);a===null?s=r:a.next=l,yn(r,t.memoizedState)||(It=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,Ge.lanes|=o,Or|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ga(e){var t=rn(),n=t.queue;if(n===null)throw Error(le(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);yn(o,t.memoizedState)||(It=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function yg(){}function xg(e,t){var n=Ge,r=rn(),i=t(),o=!yn(r.memoizedState,i);if(o&&(r.memoizedState=i,It=!0),r=r.queue,rd(kg.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||dt!==null&&dt.memoizedState.tag&1){if(n.flags|=2048,To(9,wg.bind(null,n,r,i,t),void 0,null),ft===null)throw Error(le(349));Ar&30||vg(n,t,i)}return i}function vg(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ge.updateQueue,t===null?(t={lastEffect:null,stores:null},Ge.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function wg(e,t,n,r){t.value=n,t.getSnapshot=r,bg(t)&&Eg(e)}function kg(e,t,n){return n(function(){bg(t)&&Eg(e)})}function bg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!yn(e,n)}catch{return!0}}function Eg(e){var t=Pn(e,1);t!==null&&pn(t,e,1,-1)}function Kf(e){var t=kn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_o,lastRenderedState:e},t.queue=e,e=e.dispatch=jk.bind(null,Ge,e),[t.memoizedState,e]}function To(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ge.updateQueue,t===null?(t={lastEffect:null,stores:null},Ge.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Sg(){return rn().memoizedState}function js(e,t,n,r){var i=kn();Ge.flags|=e,i.memoizedState=To(1|t,n,void 0,r===void 0?null:r)}function jl(e,t,n,r){var i=rn();r=r===void 0?null:r;var o=void 0;if(at!==null){var s=at.memoizedState;if(o=s.destroy,r!==null&&ed(r,s.deps)){i.memoizedState=To(t,n,o,r);return}}Ge.flags|=e,i.memoizedState=To(1|t,n,o,r)}function qf(e,t){return js(8390656,8,e,t)}function rd(e,t){return jl(2048,8,e,t)}function Cg(e,t){return jl(4,2,e,t)}function Ng(e,t){return jl(4,4,e,t)}function jg(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function _g(e,t,n){return n=n!=null?n.concat([e]):null,jl(4,4,jg.bind(null,t,e),n)}function id(){}function Tg(e,t){var n=rn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ed(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function $g(e,t){var n=rn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ed(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Lg(e,t,n){return Ar&21?(yn(n,t)||(n=Mm(),Ge.lanes|=n,Or|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,It=!0),e.memoizedState=n)}function Ck(e,t){var n=Me;Me=n!==0&&4>n?n:4,e(!0);var r=ha.transition;ha.transition={};try{e(!1),t()}finally{Me=n,ha.transition=r}}function Ig(){return rn().memoizedState}function Nk(e,t,n){var r=or(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ag(e))Og(t,n);else if(n=hg(e,t,n,r),n!==null){var i=Nt();pn(n,e,r,i),Rg(n,t,r)}}function jk(e,t,n){var r=or(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ag(e))Og(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,yn(l,s)){var a=t.interleaved;a===null?(i.next=i,Yc(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=hg(e,t,i,r),n!==null&&(i=Nt(),pn(n,e,r,i),Rg(n,t,r))}}function Ag(e){var t=e.alternate;return e===Ge||t!==null&&t===Ge}function Og(e,t){ro=el=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Rg(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Rc(e,n)}}var tl={readContext:nn,useCallback:kt,useContext:kt,useEffect:kt,useImperativeHandle:kt,useInsertionEffect:kt,useLayoutEffect:kt,useMemo:kt,useReducer:kt,useRef:kt,useState:kt,useDebugValue:kt,useDeferredValue:kt,useTransition:kt,useMutableSource:kt,useSyncExternalStore:kt,useId:kt,unstable_isNewReconciler:!1},_k={readContext:nn,useCallback:function(e,t){return kn().memoizedState=[e,t===void 0?null:t],e},useContext:nn,useEffect:qf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,js(4194308,4,jg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return js(4194308,4,e,t)},useInsertionEffect:function(e,t){return js(4,2,e,t)},useMemo:function(e,t){var n=kn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=kn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Nk.bind(null,Ge,e),[r.memoizedState,e]},useRef:function(e){var t=kn();return e={current:e},t.memoizedState=e},useState:Kf,useDebugValue:id,useDeferredValue:function(e){return kn().memoizedState=e},useTransition:function(){var e=Kf(!1),t=e[0];return e=Ck.bind(null,e[1]),kn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ge,i=kn();if(We){if(n===void 0)throw Error(le(407));n=n()}else{if(n=t(),ft===null)throw Error(le(349));Ar&30||vg(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,qf(kg.bind(null,r,o,e),[e]),r.flags|=2048,To(9,wg.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=kn(),t=ft.identifierPrefix;if(We){var n=An,r=In;n=(r&~(1<<32-fn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=jo++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Sk++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Tk={readContext:nn,useCallback:Tg,useContext:nn,useEffect:rd,useImperativeHandle:_g,useInsertionEffect:Cg,useLayoutEffect:Ng,useMemo:$g,useReducer:ma,useRef:Sg,useState:function(){return ma(_o)},useDebugValue:id,useDeferredValue:function(e){var t=rn();return Lg(t,at.memoizedState,e)},useTransition:function(){var e=ma(_o)[0],t=rn().memoizedState;return[e,t]},useMutableSource:yg,useSyncExternalStore:xg,useId:Ig,unstable_isNewReconciler:!1},$k={readContext:nn,useCallback:Tg,useContext:nn,useEffect:rd,useImperativeHandle:_g,useInsertionEffect:Cg,useLayoutEffect:Ng,useMemo:$g,useReducer:ga,useRef:Sg,useState:function(){return ga(_o)},useDebugValue:id,useDeferredValue:function(e){var t=rn();return at===null?t.memoizedState=e:Lg(t,at.memoizedState,e)},useTransition:function(){var e=ga(_o)[0],t=rn().memoizedState;return[e,t]},useMutableSource:yg,useSyncExternalStore:xg,useId:Ig,unstable_isNewReconciler:!1};function ln(e,t){if(e&&e.defaultProps){t=Ke({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Tu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ke({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var _l={isMounted:function(e){return(e=e._reactInternals)?zr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Nt(),i=or(e),o=On(r,i);o.payload=t,n!=null&&(o.callback=n),t=rr(e,o,i),t!==null&&(pn(t,e,i,r),Cs(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Nt(),i=or(e),o=On(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=rr(e,o,i),t!==null&&(pn(t,e,i,r),Cs(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Nt(),r=or(e),i=On(n,r);i.tag=2,t!=null&&(i.callback=t),t=rr(e,i,r),t!==null&&(pn(t,e,r,n),Cs(t,e,r))}};function Yf(e,t,n,r,i,o,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,s):t.prototype&&t.prototype.isPureReactComponent?!ko(n,r)||!ko(i,o):!0}function Mg(e,t,n){var r=!1,i=ar,o=t.contextType;return typeof o=="object"&&o!==null?o=nn(o):(i=Ot(t)?Lr:St.current,r=t.contextTypes,o=(r=r!=null)?gi(e,i):ar),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=_l,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function Xf(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&&_l.enqueueReplaceState(t,t.state,null)}function $u(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Xc(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=nn(o):(o=Ot(t)?Lr:St.current,i.context=gi(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Tu(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&_l.enqueueReplaceState(i,i.state,null),Zs(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function wi(e,t){try{var n="",r=t;do n+=iw(r),r=r.return;while(r);var i=n}catch(o){i=`
39
- Error generating stack: `+o.message+`
40
- `+o.stack}return{value:e,source:t,stack:i,digest:null}}function ya(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Lu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Lk=typeof WeakMap=="function"?WeakMap:Map;function Pg(e,t,n){n=On(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){rl||(rl=!0,Bu=r),Lu(e,t)},n}function Fg(e,t,n){n=On(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Lu(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Lu(e,t),typeof r!="function"&&(ir===null?ir=new Set([this]):ir.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Qf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Lk;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)||(i.add(n),e=Vk.bind(null,e,t,n),t.then(e,e))}function Zf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Jf(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=On(-1,1),t.tag=2,rr(n,t,1))),n.lanes|=1),e)}var Ik=zn.ReactCurrentOwner,It=!1;function Ct(e,t,n,r){t.child=e===null?pg(t,null,n,r):xi(t,e.child,n,r)}function ep(e,t,n,r,i){n=n.render;var o=t.ref;return ci(t,i),r=td(e,t,n,r,o,i),n=nd(),e!==null&&!It?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Fn(e,t,i)):(We&&n&&Hc(t),t.flags|=1,Ct(e,t,r,i),t.child)}function tp(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!fd(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Dg(e,t,o,r,i)):(e=Ls(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:ko,n(s,r)&&e.ref===t.ref)return Fn(e,t,i)}return t.flags|=1,e=sr(o,r),e.ref=t.ref,e.return=t,t.child=e}function Dg(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(ko(o,r)&&e.ref===t.ref)if(It=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(It=!0);else return t.lanes=e.lanes,Fn(e,t,i)}return Iu(e,t,n,r,i)}function zg(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Be(ii,zt),zt|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Be(ii,zt),zt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Be(ii,zt),zt|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Be(ii,zt),zt|=r;return Ct(e,t,i,n),t.child}function Bg(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Iu(e,t,n,r,i){var o=Ot(n)?Lr:St.current;return o=gi(t,o),ci(t,i),n=td(e,t,n,r,o,i),r=nd(),e!==null&&!It?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Fn(e,t,i)):(We&&r&&Hc(t),t.flags|=1,Ct(e,t,n,i),t.child)}function np(e,t,n,r,i){if(Ot(n)){var o=!0;Ks(t)}else o=!1;if(ci(t,i),t.stateNode===null)_s(e,t),Mg(t,n,r),$u(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var a=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=nn(u):(u=Ot(n)?Lr:St.current,u=gi(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||a!==u)&&Xf(t,s,r,u),Kn=!1;var h=t.memoizedState;s.state=h,Zs(t,r,s,i),a=t.memoizedState,l!==r||h!==a||At.current||Kn?(typeof c=="function"&&(Tu(t,n,c,r),a=t.memoizedState),(l=Kn||Yf(t,n,l,r,h,a,u))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),s.props=r,s.state=a,s.context=u,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,mg(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:ln(t.type,l),s.props=u,d=t.pendingProps,h=s.context,a=n.contextType,typeof a=="object"&&a!==null?a=nn(a):(a=Ot(n)?Lr:St.current,a=gi(t,a));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==d||h!==a)&&Xf(t,s,r,a),Kn=!1,h=t.memoizedState,s.state=h,Zs(t,r,s,i);var x=t.memoizedState;l!==d||h!==x||At.current||Kn?(typeof p=="function"&&(Tu(t,n,p,r),x=t.memoizedState),(u=Kn||Yf(t,n,u,r,h,x,a)||!1)?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,x,a),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,x,a)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=x),s.props=r,s.state=x,s.context=a,r=u):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Au(e,t,n,r,o,i)}function Au(e,t,n,r,i,o){Bg(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&Bf(t,n,!1),Fn(e,t,o);r=t.stateNode,Ik.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=xi(t,e.child,null,o),t.child=xi(t,null,l,o)):Ct(e,t,l,o),t.memoizedState=r.state,i&&Bf(t,n,!0),t.child}function Ug(e){var t=e.stateNode;t.pendingContext?zf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&zf(e,t.context,!1),Qc(e,t.containerInfo)}function rp(e,t,n,r,i){return yi(),Vc(i),t.flags|=256,Ct(e,t,n,r),t.child}var Ou={dehydrated:null,treeContext:null,retryLane:0};function Ru(e){return{baseLanes:e,cachePool:null,transitions:null}}function Hg(e,t,n){var r=t.pendingProps,i=Ve.current,o=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Be(Ve,i&1),e===null)return ju(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=Ll(s,r,0,null),e=jr(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Ru(n),t.memoizedState=Ou,e):od(t,s));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return Ak(e,t,s,r,l,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,l=i.sibling;var a={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=sr(i,a),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?o=sr(l,o):(o=jr(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?Ru(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=Ou,r}return o=e.child,e=o.sibling,r=sr(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function od(e,t){return t=Ll({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ss(e,t,n,r){return r!==null&&Vc(r),xi(t,e.child,null,n),e=od(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ak(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=ya(Error(le(422))),ss(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Ll({mode:"visible",children:r.children},i,0,null),o=jr(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&xi(t,e.child,null,s),t.child.memoizedState=Ru(s),t.memoizedState=Ou,o);if(!(t.mode&1))return ss(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(le(419)),r=ya(o,r,void 0),ss(e,t,s,r)}if(l=(s&e.childLanes)!==0,It||l){if(r=ft,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Pn(e,i),pn(r,e,i,-1))}return dd(),r=ya(Error(le(421))),ss(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Gk.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Bt=nr(i.nextSibling),Ut=t,We=!0,cn=null,e!==null&&(Qt[Zt++]=In,Qt[Zt++]=An,Qt[Zt++]=Ir,In=e.id,An=e.overflow,Ir=t),t=od(t,r.children),t.flags|=4096,t)}function ip(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),_u(e.return,t,n)}function xa(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Wg(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Ct(e,t,r.children,n),r=Ve.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ip(e,n,t);else if(e.tag===19)ip(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Be(Ve,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Js(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),xa(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Js(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}xa(t,!0,n,null,o);break;case"together":xa(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function _s(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Fn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Or|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(le(153));if(t.child!==null){for(e=t.child,n=sr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=sr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ok(e,t,n){switch(t.tag){case 3:Ug(t),yi();break;case 5:gg(t);break;case 1:Ot(t.type)&&Ks(t);break;case 4:Qc(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Be(Xs,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Be(Ve,Ve.current&1),t.flags|=128,null):n&t.child.childLanes?Hg(e,t,n):(Be(Ve,Ve.current&1),e=Fn(e,t,n),e!==null?e.sibling:null);Be(Ve,Ve.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Wg(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Be(Ve,Ve.current),r)break;return null;case 22:case 23:return t.lanes=0,zg(e,t,n)}return Fn(e,t,n)}var Vg,Mu,Gg,Kg;Vg=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Mu=function(){};Gg=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Sr(Cn.current);var o=null;switch(n){case"input":i=iu(e,i),r=iu(e,r),o=[];break;case"select":i=Ke({},i,{value:void 0}),r=Ke({},r,{value:void 0}),o=[];break;case"textarea":i=lu(e,i),r=lu(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Vs)}uu(n,r);var s;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var l=i[u];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(ho.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var a=r[u];if(l=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&a!==l&&(a!=null||l!=null))if(u==="style")if(l){for(s in l)!l.hasOwnProperty(s)||a&&a.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in a)a.hasOwnProperty(s)&&l[s]!==a[s]&&(n||(n={}),n[s]=a[s])}else n||(o||(o=[]),o.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(o=o||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(o=o||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(ho.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&Ue("scroll",e),o||l===a||(o=[])):(o=o||[]).push(u,a))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};Kg=function(e,t,n,r){n!==r&&(t.flags|=4)};function Di(e,t){if(!We)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var 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}}function bt(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&14680064,r|=i.flags&14680064,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 Rk(e,t,n){var r=t.pendingProps;switch(Wc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bt(t),null;case 1:return Ot(t.type)&&Gs(),bt(t),null;case 3:return r=t.stateNode,vi(),He(At),He(St),Jc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(is(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,cn!==null&&(Wu(cn),cn=null))),Mu(e,t),bt(t),null;case 5:Zc(t);var i=Sr(No.current);if(n=t.type,e!==null&&t.stateNode!=null)Gg(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(le(166));return bt(t),null}if(e=Sr(Cn.current),is(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[En]=t,r[So]=o,e=(t.mode&1)!==0,n){case"dialog":Ue("cancel",r),Ue("close",r);break;case"iframe":case"object":case"embed":Ue("load",r);break;case"video":case"audio":for(i=0;i<Xi.length;i++)Ue(Xi[i],r);break;case"source":Ue("error",r);break;case"img":case"image":case"link":Ue("error",r),Ue("load",r);break;case"details":Ue("toggle",r);break;case"input":pf(r,o),Ue("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Ue("invalid",r);break;case"textarea":mf(r,o),Ue("invalid",r)}uu(n,o),i=null;for(var s in o)if(o.hasOwnProperty(s)){var l=o[s];s==="children"?typeof l=="string"?r.textContent!==l&&(o.suppressHydrationWarning!==!0&&rs(r.textContent,l,e),i=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&rs(r.textContent,l,e),i=["children",""+l]):ho.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&Ue("scroll",r)}switch(n){case"input":Yo(r),hf(r,o,!0);break;case"textarea":Yo(r),gf(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Vs)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=km(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[En]=t,e[So]=r,Vg(e,t,!1,!1),t.stateNode=e;e:{switch(s=cu(n,r),n){case"dialog":Ue("cancel",e),Ue("close",e),i=r;break;case"iframe":case"object":case"embed":Ue("load",e),i=r;break;case"video":case"audio":for(i=0;i<Xi.length;i++)Ue(Xi[i],e);i=r;break;case"source":Ue("error",e),i=r;break;case"img":case"image":case"link":Ue("error",e),Ue("load",e),i=r;break;case"details":Ue("toggle",e),i=r;break;case"input":pf(e,r),i=iu(e,r),Ue("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Ke({},r,{value:void 0}),Ue("invalid",e);break;case"textarea":mf(e,r),i=lu(e,r),Ue("invalid",e);break;default:i=r}uu(n,i),l=i;for(o in l)if(l.hasOwnProperty(o)){var a=l[o];o==="style"?Sm(e,a):o==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&bm(e,a)):o==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&mo(e,a):typeof a=="number"&&mo(e,""+a):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(ho.hasOwnProperty(o)?a!=null&&o==="onScroll"&&Ue("scroll",e):a!=null&&Tc(e,o,a,s))}switch(n){case"input":Yo(e),hf(e,r,!1);break;case"textarea":Yo(e),gf(e);break;case"option":r.value!=null&&e.setAttribute("value",""+lr(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?si(e,!!r.multiple,o,!1):r.defaultValue!=null&&si(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Vs)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return bt(t),null;case 6:if(e&&t.stateNode!=null)Kg(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(le(166));if(n=Sr(No.current),Sr(Cn.current),is(t)){if(r=t.stateNode,n=t.memoizedProps,r[En]=t,(o=r.nodeValue!==n)&&(e=Ut,e!==null))switch(e.tag){case 3:rs(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&rs(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[En]=t,t.stateNode=r}return bt(t),null;case 13:if(He(Ve),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(We&&Bt!==null&&t.mode&1&&!(t.flags&128))dg(),yi(),t.flags|=98560,o=!1;else if(o=is(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(le(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(le(317));o[En]=t}else yi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;bt(t),o=!1}else cn!==null&&(Wu(cn),cn=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ve.current&1?ut===0&&(ut=3):dd())),t.updateQueue!==null&&(t.flags|=4),bt(t),null);case 4:return vi(),Mu(e,t),e===null&&bo(t.stateNode.containerInfo),bt(t),null;case 10:return qc(t.type._context),bt(t),null;case 17:return Ot(t.type)&&Gs(),bt(t),null;case 19:if(He(Ve),o=t.memoizedState,o===null)return bt(t),null;if(r=(t.flags&128)!==0,s=o.rendering,s===null)if(r)Di(o,!1);else{if(ut!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=Js(e),s!==null){for(t.flags|=128,Di(o,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,e=s.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Be(Ve,Ve.current&1|2),t.child}e=e.sibling}o.tail!==null&&Je()>ki&&(t.flags|=128,r=!0,Di(o,!1),t.lanes=4194304)}else{if(!r)if(e=Js(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Di(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!We)return bt(t),null}else 2*Je()-o.renderingStartTime>ki&&n!==1073741824&&(t.flags|=128,r=!0,Di(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Je(),t.sibling=null,n=Ve.current,Be(Ve,r?n&1|2:n&1),t):(bt(t),null);case 22:case 23:return cd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?zt&1073741824&&(bt(t),t.subtreeFlags&6&&(t.flags|=8192)):bt(t),null;case 24:return null;case 25:return null}throw Error(le(156,t.tag))}function Mk(e,t){switch(Wc(t),t.tag){case 1:return Ot(t.type)&&Gs(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return vi(),He(At),He(St),Jc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Zc(t),null;case 13:if(He(Ve),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(le(340));yi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return He(Ve),null;case 4:return vi(),null;case 10:return qc(t.type._context),null;case 22:case 23:return cd(),null;case 24:return null;default:return null}}var ls=!1,Et=!1,Pk=typeof WeakSet=="function"?WeakSet:Set,ce=null;function ri(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Qe(e,t,r)}else n.current=null}function Pu(e,t,n){try{n()}catch(r){Qe(e,t,r)}}var op=!1;function Fk(e,t){if(wu=Us,e=Zm(),Uc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,c=0,d=e,h=null;t:for(;;){for(var p;d!==n||i!==0&&d.nodeType!==3||(l=s+i),d!==o||r!==0&&d.nodeType!==3||(a=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)h=d,d=p;for(;;){if(d===e)break t;if(h===n&&++u===i&&(l=s),h===o&&++c===r&&(a=s),(p=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=p}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(ku={focusedElem:e,selectionRange:n},Us=!1,ce=t;ce!==null;)if(t=ce,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ce=e;else for(;ce!==null;){t=ce;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var v=x.memoizedProps,k=x.memoizedState,y=t.stateNode,m=y.getSnapshotBeforeUpdate(t.elementType===t.type?v:ln(t.type,v),k);y.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(le(163))}}catch(w){Qe(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,ce=e;break}ce=t.return}return x=op,op=!1,x}function io(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Pu(t,n,o)}i=i.next}while(i!==r)}}function Tl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Fu(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function qg(e){var t=e.alternate;t!==null&&(e.alternate=null,qg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[En],delete t[So],delete t[Su],delete t[wk],delete t[kk])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Yg(e){return e.tag===5||e.tag===3||e.tag===4}function sp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Yg(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.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Du(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Vs));else if(r!==4&&(e=e.child,e!==null))for(Du(e,t,n),e=e.sibling;e!==null;)Du(e,t,n),e=e.sibling}function zu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(zu(e,t,n),e=e.sibling;e!==null;)zu(e,t,n),e=e.sibling}var ht=null,an=!1;function Wn(e,t,n){for(n=n.child;n!==null;)Xg(e,t,n),n=n.sibling}function Xg(e,t,n){if(Sn&&typeof Sn.onCommitFiberUnmount=="function")try{Sn.onCommitFiberUnmount(kl,n)}catch{}switch(n.tag){case 5:Et||ri(n,t);case 6:var r=ht,i=an;ht=null,Wn(e,t,n),ht=r,an=i,ht!==null&&(an?(e=ht,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ht.removeChild(n.stateNode));break;case 18:ht!==null&&(an?(e=ht,n=n.stateNode,e.nodeType===8?da(e.parentNode,n):e.nodeType===1&&da(e,n),vo(e)):da(ht,n.stateNode));break;case 4:r=ht,i=an,ht=n.stateNode.containerInfo,an=!0,Wn(e,t,n),ht=r,an=i;break;case 0:case 11:case 14:case 15:if(!Et&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Pu(n,t,s),i=i.next}while(i!==r)}Wn(e,t,n);break;case 1:if(!Et&&(ri(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Qe(n,t,l)}Wn(e,t,n);break;case 21:Wn(e,t,n);break;case 22:n.mode&1?(Et=(r=Et)||n.memoizedState!==null,Wn(e,t,n),Et=r):Wn(e,t,n);break;default:Wn(e,t,n)}}function lp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Pk),t.forEach(function(r){var i=Kk.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function sn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,s=t,l=s;e:for(;l!==null;){switch(l.tag){case 5:ht=l.stateNode,an=!1;break e;case 3:ht=l.stateNode.containerInfo,an=!0;break e;case 4:ht=l.stateNode.containerInfo,an=!0;break e}l=l.return}if(ht===null)throw Error(le(160));Xg(o,s,i),ht=null,an=!1;var a=i.alternate;a!==null&&(a.return=null),i.return=null}catch(u){Qe(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Qg(t,e),t=t.sibling}function Qg(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(sn(t,e),wn(e),r&4){try{io(3,e,e.return),Tl(3,e)}catch(v){Qe(e,e.return,v)}try{io(5,e,e.return)}catch(v){Qe(e,e.return,v)}}break;case 1:sn(t,e),wn(e),r&512&&n!==null&&ri(n,n.return);break;case 5:if(sn(t,e),wn(e),r&512&&n!==null&&ri(n,n.return),e.flags&32){var i=e.stateNode;try{mo(i,"")}catch(v){Qe(e,e.return,v)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,s=n!==null?n.memoizedProps:o,l=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&vm(i,o),cu(l,s);var u=cu(l,o);for(s=0;s<a.length;s+=2){var c=a[s],d=a[s+1];c==="style"?Sm(i,d):c==="dangerouslySetInnerHTML"?bm(i,d):c==="children"?mo(i,d):Tc(i,c,d,u)}switch(l){case"input":ou(i,o);break;case"textarea":wm(i,o);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var p=o.value;p!=null?si(i,!!o.multiple,p,!1):h!==!!o.multiple&&(o.defaultValue!=null?si(i,!!o.multiple,o.defaultValue,!0):si(i,!!o.multiple,o.multiple?[]:"",!1))}i[So]=o}catch(v){Qe(e,e.return,v)}}break;case 6:if(sn(t,e),wn(e),r&4){if(e.stateNode===null)throw Error(le(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(v){Qe(e,e.return,v)}}break;case 3:if(sn(t,e),wn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{vo(t.containerInfo)}catch(v){Qe(e,e.return,v)}break;case 4:sn(t,e),wn(e);break;case 13:sn(t,e),wn(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(ad=Je())),r&4&&lp(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Et=(u=Et)||c,sn(t,e),Et=u):sn(t,e),wn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(ce=e,c=e.child;c!==null;){for(d=ce=c;ce!==null;){switch(h=ce,p=h.child,h.tag){case 0:case 11:case 14:case 15:io(4,h,h.return);break;case 1:ri(h,h.return);var x=h.stateNode;if(typeof x.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,x.props=t.memoizedProps,x.state=t.memoizedState,x.componentWillUnmount()}catch(v){Qe(r,n,v)}}break;case 5:ri(h,h.return);break;case 22:if(h.memoizedState!==null){up(d);continue}}p!==null?(p.return=h,ce=p):up(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=d.stateNode,a=d.memoizedProps.style,s=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=Em("display",s))}catch(v){Qe(e,e.return,v)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(v){Qe(e,e.return,v)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:sn(t,e),wn(e),r&4&&lp(e);break;case 21:break;default:sn(t,e),wn(e)}}function wn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Yg(n)){var r=n;break e}n=n.return}throw Error(le(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(mo(i,""),r.flags&=-33);var o=sp(e);zu(e,o,i);break;case 3:case 4:var s=r.stateNode.containerInfo,l=sp(e);Du(e,l,s);break;default:throw Error(le(161))}}catch(a){Qe(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Dk(e,t,n){ce=e,Zg(e)}function Zg(e,t,n){for(var r=(e.mode&1)!==0;ce!==null;){var i=ce,o=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||ls;if(!s){var l=i.alternate,a=l!==null&&l.memoizedState!==null||Et;l=ls;var u=Et;if(ls=s,(Et=a)&&!u)for(ce=i;ce!==null;)s=ce,a=s.child,s.tag===22&&s.memoizedState!==null?cp(i):a!==null?(a.return=s,ce=a):cp(i);for(;o!==null;)ce=o,Zg(o),o=o.sibling;ce=i,ls=l,Et=u}ap(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,ce=o):ap(e)}}function ap(e){for(;ce!==null;){var t=ce;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Et||Tl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Et)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ln(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Gf(t,o,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Gf(t,s,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&vo(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(le(163))}Et||t.flags&512&&Fu(t)}catch(h){Qe(t,t.return,h)}}if(t===e){ce=null;break}if(n=t.sibling,n!==null){n.return=t.return,ce=n;break}ce=t.return}}function up(e){for(;ce!==null;){var t=ce;if(t===e){ce=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ce=n;break}ce=t.return}}function cp(e){for(;ce!==null;){var t=ce;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Tl(4,t)}catch(a){Qe(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(a){Qe(t,i,a)}}var o=t.return;try{Fu(t)}catch(a){Qe(t,o,a)}break;case 5:var s=t.return;try{Fu(t)}catch(a){Qe(t,s,a)}}}catch(a){Qe(t,t.return,a)}if(t===e){ce=null;break}var l=t.sibling;if(l!==null){l.return=t.return,ce=l;break}ce=t.return}}var zk=Math.ceil,nl=zn.ReactCurrentDispatcher,sd=zn.ReactCurrentOwner,tn=zn.ReactCurrentBatchConfig,Ie=0,ft=null,ot=null,xt=0,zt=0,ii=fr(0),ut=0,$o=null,Or=0,$l=0,ld=0,oo=null,Lt=null,ad=0,ki=1/0,$n=null,rl=!1,Bu=null,ir=null,as=!1,Zn=null,il=0,so=0,Uu=null,Ts=-1,$s=0;function Nt(){return Ie&6?Je():Ts!==-1?Ts:Ts=Je()}function or(e){return e.mode&1?Ie&2&&xt!==0?xt&-xt:Ek.transition!==null?($s===0&&($s=Mm()),$s):(e=Me,e!==0||(e=window.event,e=e===void 0?16:Hm(e.type)),e):1}function pn(e,t,n,r){if(50<so)throw so=0,Uu=null,Error(le(185));Mo(e,n,r),(!(Ie&2)||e!==ft)&&(e===ft&&(!(Ie&2)&&($l|=n),ut===4&&Yn(e,xt)),Rt(e,r),n===1&&Ie===0&&!(t.mode&1)&&(ki=Je()+500,Nl&&pr()))}function Rt(e,t){var n=e.callbackNode;Ew(e,t);var r=Bs(e,e===ft?xt:0);if(r===0)n!==null&&vf(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&vf(n),t===1)e.tag===0?bk(dp.bind(null,e)):ag(dp.bind(null,e)),xk(function(){!(Ie&6)&&pr()}),n=null;else{switch(Pm(r)){case 1:n=Oc;break;case 4:n=Om;break;case 16:n=zs;break;case 536870912:n=Rm;break;default:n=zs}n=sy(n,Jg.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Jg(e,t){if(Ts=-1,$s=0,Ie&6)throw Error(le(327));var n=e.callbackNode;if(di()&&e.callbackNode!==n)return null;var r=Bs(e,e===ft?xt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=ol(e,r);else{t=r;var i=Ie;Ie|=2;var o=ty();(ft!==e||xt!==t)&&($n=null,ki=Je()+500,Nr(e,t));do try{Hk();break}catch(l){ey(e,l)}while(!0);Kc(),nl.current=o,Ie=i,ot!==null?t=0:(ft=null,xt=0,t=ut)}if(t!==0){if(t===2&&(i=mu(e),i!==0&&(r=i,t=Hu(e,i))),t===1)throw n=$o,Nr(e,0),Yn(e,r),Rt(e,Je()),n;if(t===6)Yn(e,r);else{if(i=e.current.alternate,!(r&30)&&!Bk(i)&&(t=ol(e,r),t===2&&(o=mu(e),o!==0&&(r=o,t=Hu(e,o))),t===1))throw n=$o,Nr(e,0),Yn(e,r),Rt(e,Je()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(le(345));case 2:vr(e,Lt,$n);break;case 3:if(Yn(e,r),(r&130023424)===r&&(t=ad+500-Je(),10<t)){if(Bs(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Nt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Eu(vr.bind(null,e,Lt,$n),t);break}vr(e,Lt,$n);break;case 4:if(Yn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-fn(r);o=1<<s,s=t[s],s>i&&(i=s),r&=~o}if(r=i,r=Je()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*zk(r/1960))-r,10<r){e.timeoutHandle=Eu(vr.bind(null,e,Lt,$n),r);break}vr(e,Lt,$n);break;case 5:vr(e,Lt,$n);break;default:throw Error(le(329))}}}return Rt(e,Je()),e.callbackNode===n?Jg.bind(null,e):null}function Hu(e,t){var n=oo;return e.current.memoizedState.isDehydrated&&(Nr(e,t).flags|=256),e=ol(e,t),e!==2&&(t=Lt,Lt=n,t!==null&&Wu(t)),e}function Wu(e){Lt===null?Lt=e:Lt.push.apply(Lt,e)}function Bk(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!yn(o(),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 Yn(e,t){for(t&=~ld,t&=~$l,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-fn(t),r=1<<n;e[n]=-1,t&=~r}}function dp(e){if(Ie&6)throw Error(le(327));di();var t=Bs(e,0);if(!(t&1))return Rt(e,Je()),null;var n=ol(e,t);if(e.tag!==0&&n===2){var r=mu(e);r!==0&&(t=r,n=Hu(e,r))}if(n===1)throw n=$o,Nr(e,0),Yn(e,t),Rt(e,Je()),n;if(n===6)throw Error(le(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,vr(e,Lt,$n),Rt(e,Je()),null}function ud(e,t){var n=Ie;Ie|=1;try{return e(t)}finally{Ie=n,Ie===0&&(ki=Je()+500,Nl&&pr())}}function Rr(e){Zn!==null&&Zn.tag===0&&!(Ie&6)&&di();var t=Ie;Ie|=1;var n=tn.transition,r=Me;try{if(tn.transition=null,Me=1,e)return e()}finally{Me=r,tn.transition=n,Ie=t,!(Ie&6)&&pr()}}function cd(){zt=ii.current,He(ii)}function Nr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,yk(n)),ot!==null)for(n=ot.return;n!==null;){var r=n;switch(Wc(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Gs();break;case 3:vi(),He(At),He(St),Jc();break;case 5:Zc(r);break;case 4:vi();break;case 13:He(Ve);break;case 19:He(Ve);break;case 10:qc(r.type._context);break;case 22:case 23:cd()}n=n.return}if(ft=e,ot=e=sr(e.current,null),xt=zt=t,ut=0,$o=null,ld=$l=Or=0,Lt=oo=null,Er!==null){for(t=0;t<Er.length;t++)if(n=Er[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var s=o.next;o.next=i,r.next=s}n.pending=r}Er=null}return e}function ey(e,t){do{var n=ot;try{if(Kc(),Ns.current=tl,el){for(var r=Ge.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}el=!1}if(Ar=0,dt=at=Ge=null,ro=!1,jo=0,sd.current=null,n===null||n.return===null){ut=1,$o=t,ot=null;break}e:{var o=e,s=n.return,l=n,a=t;if(t=xt,l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,c=l,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var h=c.alternate;h?(c.updateQueue=h.updateQueue,c.memoizedState=h.memoizedState,c.lanes=h.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=Zf(s);if(p!==null){p.flags&=-257,Jf(p,s,l,o,t),p.mode&1&&Qf(o,u,t),t=p,a=u;var x=t.updateQueue;if(x===null){var v=new Set;v.add(a),t.updateQueue=v}else x.add(a);break e}else{if(!(t&1)){Qf(o,u,t),dd();break e}a=Error(le(426))}}else if(We&&l.mode&1){var k=Zf(s);if(k!==null){!(k.flags&65536)&&(k.flags|=256),Jf(k,s,l,o,t),Vc(wi(a,l));break e}}o=a=wi(a,l),ut!==4&&(ut=2),oo===null?oo=[o]:oo.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var y=Pg(o,a,t);Vf(o,y);break e;case 1:l=a;var m=o.type,g=o.stateNode;if(!(o.flags&128)&&(typeof m.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(ir===null||!ir.has(g)))){o.flags|=65536,t&=-t,o.lanes|=t;var w=Fg(o,l,t);Vf(o,w);break e}}o=o.return}while(o!==null)}ry(n)}catch(C){t=C,ot===n&&n!==null&&(ot=n=n.return);continue}break}while(!0)}function ty(){var e=nl.current;return nl.current=tl,e===null?tl:e}function dd(){(ut===0||ut===3||ut===2)&&(ut=4),ft===null||!(Or&268435455)&&!($l&268435455)||Yn(ft,xt)}function ol(e,t){var n=Ie;Ie|=2;var r=ty();(ft!==e||xt!==t)&&($n=null,Nr(e,t));do try{Uk();break}catch(i){ey(e,i)}while(!0);if(Kc(),Ie=n,nl.current=r,ot!==null)throw Error(le(261));return ft=null,xt=0,ut}function Uk(){for(;ot!==null;)ny(ot)}function Hk(){for(;ot!==null&&!hw();)ny(ot)}function ny(e){var t=oy(e.alternate,e,zt);e.memoizedProps=e.pendingProps,t===null?ry(e):ot=t,sd.current=null}function ry(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Mk(n,t),n!==null){n.flags&=32767,ot=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ut=6,ot=null;return}}else if(n=Rk(n,t,zt),n!==null){ot=n;return}if(t=t.sibling,t!==null){ot=t;return}ot=t=e}while(t!==null);ut===0&&(ut=5)}function vr(e,t,n){var r=Me,i=tn.transition;try{tn.transition=null,Me=1,Wk(e,t,n,r)}finally{tn.transition=i,Me=r}return null}function Wk(e,t,n,r){do di();while(Zn!==null);if(Ie&6)throw Error(le(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(le(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Sw(e,o),e===ft&&(ot=ft=null,xt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||as||(as=!0,sy(zs,function(){return di(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=tn.transition,tn.transition=null;var s=Me;Me=1;var l=Ie;Ie|=4,sd.current=null,Fk(e,n),Qg(n,e),ck(ku),Us=!!wu,ku=wu=null,e.current=n,Dk(n),mw(),Ie=l,Me=s,tn.transition=o}else e.current=n;if(as&&(as=!1,Zn=e,il=i),o=e.pendingLanes,o===0&&(ir=null),xw(n.stateNode),Rt(e,Je()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(rl)throw rl=!1,e=Bu,Bu=null,e;return il&1&&e.tag!==0&&di(),o=e.pendingLanes,o&1?e===Uu?so++:(so=0,Uu=e):so=0,pr(),null}function di(){if(Zn!==null){var e=Pm(il),t=tn.transition,n=Me;try{if(tn.transition=null,Me=16>e?16:e,Zn===null)var r=!1;else{if(e=Zn,Zn=null,il=0,Ie&6)throw Error(le(331));var i=Ie;for(Ie|=4,ce=e.current;ce!==null;){var o=ce,s=o.child;if(ce.flags&16){var l=o.deletions;if(l!==null){for(var a=0;a<l.length;a++){var u=l[a];for(ce=u;ce!==null;){var c=ce;switch(c.tag){case 0:case 11:case 15:io(8,c,o)}var d=c.child;if(d!==null)d.return=c,ce=d;else for(;ce!==null;){c=ce;var h=c.sibling,p=c.return;if(qg(c),c===u){ce=null;break}if(h!==null){h.return=p,ce=h;break}ce=p}}}var x=o.alternate;if(x!==null){var v=x.child;if(v!==null){x.child=null;do{var k=v.sibling;v.sibling=null,v=k}while(v!==null)}}ce=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,ce=s;else e:for(;ce!==null;){if(o=ce,o.flags&2048)switch(o.tag){case 0:case 11:case 15:io(9,o,o.return)}var y=o.sibling;if(y!==null){y.return=o.return,ce=y;break e}ce=o.return}}var m=e.current;for(ce=m;ce!==null;){s=ce;var g=s.child;if(s.subtreeFlags&2064&&g!==null)g.return=s,ce=g;else e:for(s=m;ce!==null;){if(l=ce,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Tl(9,l)}}catch(C){Qe(l,l.return,C)}if(l===s){ce=null;break e}var w=l.sibling;if(w!==null){w.return=l.return,ce=w;break e}ce=l.return}}if(Ie=i,pr(),Sn&&typeof Sn.onPostCommitFiberRoot=="function")try{Sn.onPostCommitFiberRoot(kl,e)}catch{}r=!0}return r}finally{Me=n,tn.transition=t}}return!1}function fp(e,t,n){t=wi(n,t),t=Pg(e,t,1),e=rr(e,t,1),t=Nt(),e!==null&&(Mo(e,1,t),Rt(e,t))}function Qe(e,t,n){if(e.tag===3)fp(e,e,n);else for(;t!==null;){if(t.tag===3){fp(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ir===null||!ir.has(r))){e=wi(n,e),e=Fg(t,e,1),t=rr(t,e,1),e=Nt(),t!==null&&(Mo(t,1,e),Rt(t,e));break}}t=t.return}}function Vk(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Nt(),e.pingedLanes|=e.suspendedLanes&n,ft===e&&(xt&n)===n&&(ut===4||ut===3&&(xt&130023424)===xt&&500>Je()-ad?Nr(e,0):ld|=n),Rt(e,t)}function iy(e,t){t===0&&(e.mode&1?(t=Zo,Zo<<=1,!(Zo&130023424)&&(Zo=4194304)):t=1);var n=Nt();e=Pn(e,t),e!==null&&(Mo(e,t,n),Rt(e,n))}function Gk(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),iy(e,n)}function Kk(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(le(314))}r!==null&&r.delete(t),iy(e,n)}var oy;oy=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||At.current)It=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return It=!1,Ok(e,t,n);It=!!(e.flags&131072)}else It=!1,We&&t.flags&1048576&&ug(t,Ys,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;_s(e,t),e=t.pendingProps;var i=gi(t,St.current);ci(t,n),i=td(null,t,r,e,i,n);var o=nd();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ot(r)?(o=!0,Ks(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Xc(t),i.updater=_l,t.stateNode=i,i._reactInternals=t,$u(t,r,e,n),t=Au(null,t,r,!0,o,n)):(t.tag=0,We&&o&&Hc(t),Ct(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(_s(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Yk(r),e=ln(r,e),i){case 0:t=Iu(null,t,r,e,n);break e;case 1:t=np(null,t,r,e,n);break e;case 11:t=ep(null,t,r,e,n);break e;case 14:t=tp(null,t,r,ln(r.type,e),n);break e}throw Error(le(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),Iu(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),np(e,t,r,i,n);case 3:e:{if(Ug(t),e===null)throw Error(le(387));r=t.pendingProps,o=t.memoizedState,i=o.element,mg(e,t),Zs(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=wi(Error(le(423)),t),t=rp(e,t,r,n,i);break e}else if(r!==i){i=wi(Error(le(424)),t),t=rp(e,t,r,n,i);break e}else for(Bt=nr(t.stateNode.containerInfo.firstChild),Ut=t,We=!0,cn=null,n=pg(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(yi(),r===i){t=Fn(e,t,n);break e}Ct(e,t,r,n)}t=t.child}return t;case 5:return gg(t),e===null&&ju(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,bu(r,i)?s=null:o!==null&&bu(r,o)&&(t.flags|=32),Bg(e,t),Ct(e,t,s,n),t.child;case 6:return e===null&&ju(t),null;case 13:return Hg(e,t,n);case 4:return Qc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=xi(t,null,r,n):Ct(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),ep(e,t,r,i,n);case 7:return Ct(e,t,t.pendingProps,n),t.child;case 8:return Ct(e,t,t.pendingProps.children,n),t.child;case 12:return Ct(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,Be(Xs,r._currentValue),r._currentValue=s,o!==null)if(yn(o.value,s)){if(o.children===i.children&&!At.current){t=Fn(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=On(-1,n&-n),a.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),_u(o.return,n,t),l.lanes|=n;break}a=a.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(le(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),_u(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Ct(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,ci(t,n),i=nn(i),r=r(i),t.flags|=1,Ct(e,t,r,n),t.child;case 14:return r=t.type,i=ln(r,t.pendingProps),i=ln(r.type,i),tp(e,t,r,i,n);case 15:return Dg(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ln(r,i),_s(e,t),t.tag=1,Ot(r)?(e=!0,Ks(t)):e=!1,ci(t,n),Mg(t,r,i),$u(t,r,i,n),Au(null,t,r,!0,e,n);case 19:return Wg(e,t,n);case 22:return zg(e,t,n)}throw Error(le(156,t.tag))};function sy(e,t){return Am(e,t)}function qk(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.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 en(e,t,n,r){return new qk(e,t,n,r)}function fd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Yk(e){if(typeof e=="function")return fd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Lc)return 11;if(e===Ic)return 14}return 2}function sr(e,t){var n=e.alternate;return n===null?(n=en(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&14680064,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}function Ls(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")fd(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case qr:return jr(n.children,i,o,t);case $c:s=8,i|=8;break;case eu:return e=en(12,n,t,i|2),e.elementType=eu,e.lanes=o,e;case tu:return e=en(13,n,t,i),e.elementType=tu,e.lanes=o,e;case nu:return e=en(19,n,t,i),e.elementType=nu,e.lanes=o,e;case gm:return Ll(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case hm:s=10;break e;case mm:s=9;break e;case Lc:s=11;break e;case Ic:s=14;break e;case Gn:s=16,r=null;break e}throw Error(le(130,e==null?e:typeof e,""))}return t=en(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function jr(e,t,n,r){return e=en(7,e,r,t),e.lanes=n,e}function Ll(e,t,n,r){return e=en(22,e,r,t),e.elementType=gm,e.lanes=n,e.stateNode={isHidden:!1},e}function va(e,t,n){return e=en(6,e,null,t),e.lanes=n,e}function wa(e,t,n){return t=en(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Xk(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ea(0),this.expirationTimes=ea(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ea(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function pd(e,t,n,r,i,o,s,l,a){return e=new Xk(e,t,n,l,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=en(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Xc(o),e}function Qk(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Kr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function ly(e){if(!e)return ar;e=e._reactInternals;e:{if(zr(e)!==e||e.tag!==1)throw Error(le(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ot(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(le(171))}if(e.tag===1){var n=e.type;if(Ot(n))return lg(e,n,t)}return t}function ay(e,t,n,r,i,o,s,l,a){return e=pd(n,r,!0,e,i,o,s,l,a),e.context=ly(null),n=e.current,r=Nt(),i=or(n),o=On(r,i),o.callback=t??null,rr(n,o,i),e.current.lanes=i,Mo(e,i,r),Rt(e,r),e}function Il(e,t,n,r){var i=t.current,o=Nt(),s=or(i);return n=ly(n),t.context===null?t.context=n:t.pendingContext=n,t=On(o,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=rr(i,t,s),e!==null&&(pn(e,i,s,o),Cs(e,i,s)),s}function sl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function pp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function hd(e,t){pp(e,t),(e=e.alternate)&&pp(e,t)}function Zk(){return null}var uy=typeof reportError=="function"?reportError:function(e){console.error(e)};function md(e){this._internalRoot=e}Al.prototype.render=md.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(le(409));Il(e,t,null,null)};Al.prototype.unmount=md.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Rr(function(){Il(null,e,null,null)}),t[Mn]=null}};function Al(e){this._internalRoot=e}Al.prototype.unstable_scheduleHydration=function(e){if(e){var t=zm();e={blockedOn:null,target:e,priority:t};for(var n=0;n<qn.length&&t!==0&&t<qn[n].priority;n++);qn.splice(n,0,e),n===0&&Um(e)}};function gd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ol(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function hp(){}function Jk(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var u=sl(s);o.call(u)}}var s=ay(t,r,e,0,null,!1,!1,"",hp);return e._reactRootContainer=s,e[Mn]=s.current,bo(e.nodeType===8?e.parentNode:e),Rr(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var l=r;r=function(){var u=sl(a);l.call(u)}}var a=pd(e,0,!1,null,null,!1,!1,"",hp);return e._reactRootContainer=a,e[Mn]=a.current,bo(e.nodeType===8?e.parentNode:e),Rr(function(){Il(t,a,n,r)}),a}function Rl(e,t,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if(typeof i=="function"){var l=i;i=function(){var a=sl(s);l.call(a)}}Il(t,s,e,i)}else s=Jk(n,t,e,i,r);return sl(s)}Fm=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Yi(t.pendingLanes);n!==0&&(Rc(t,n|1),Rt(t,Je()),!(Ie&6)&&(ki=Je()+500,pr()))}break;case 13:Rr(function(){var r=Pn(e,1);if(r!==null){var i=Nt();pn(r,e,1,i)}}),hd(e,1)}};Mc=function(e){if(e.tag===13){var t=Pn(e,134217728);if(t!==null){var n=Nt();pn(t,e,134217728,n)}hd(e,134217728)}};Dm=function(e){if(e.tag===13){var t=or(e),n=Pn(e,t);if(n!==null){var r=Nt();pn(n,e,t,r)}hd(e,t)}};zm=function(){return Me};Bm=function(e,t){var n=Me;try{return Me=e,t()}finally{Me=n}};fu=function(e,t,n){switch(t){case"input":if(ou(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Cl(r);if(!i)throw Error(le(90));xm(r),ou(r,i)}}}break;case"textarea":wm(e,n);break;case"select":t=n.value,t!=null&&si(e,!!n.multiple,t,!1)}};jm=ud;_m=Rr;var e0={usingClientEntryPoint:!1,Events:[Fo,Zr,Cl,Cm,Nm,ud]},zi={findFiberByHostInstance:br,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},t0={bundleType:zi.bundleType,version:zi.version,rendererPackageName:zi.rendererPackageName,rendererConfig:zi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:zn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Lm(e),e===null?null:e.stateNode},findFiberByHostInstance:zi.findFiberByHostInstance||Zk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var us=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!us.isDisabled&&us.supportsFiber)try{kl=us.inject(t0),Sn=us}catch{}}Wt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=e0;Wt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!gd(t))throw Error(le(200));return Qk(e,t,null,n)};Wt.createRoot=function(e,t){if(!gd(e))throw Error(le(299));var n=!1,r="",i=uy;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=pd(e,1,!1,null,null,n,!1,r,i),e[Mn]=t.current,bo(e.nodeType===8?e.parentNode:e),new md(t)};Wt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(le(188)):(e=Object.keys(e).join(","),Error(le(268,e)));return e=Lm(t),e=e===null?null:e.stateNode,e};Wt.flushSync=function(e){return Rr(e)};Wt.hydrate=function(e,t,n){if(!Ol(t))throw Error(le(200));return Rl(null,e,t,!0,n)};Wt.hydrateRoot=function(e,t,n){if(!gd(e))throw Error(le(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",s=uy;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=ay(t,null,e,1,n??null,i,!1,o,s),e[Mn]=t.current,bo(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Al(t)};Wt.render=function(e,t,n){if(!Ol(t))throw Error(le(200));return Rl(null,e,t,!1,n)};Wt.unmountComponentAtNode=function(e){if(!Ol(e))throw Error(le(40));return e._reactRootContainer?(Rr(function(){Rl(null,null,e,!1,function(){e._reactRootContainer=null,e[Mn]=null})}),!0):!1};Wt.unstable_batchedUpdates=ud;Wt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ol(n))throw Error(le(200));if(e==null||e._reactInternals===void 0)throw Error(le(38));return Rl(e,t,n,!1,r)};Wt.version="18.3.1-next-f1338f8080-20240426";function cy(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(cy)}catch(e){console.error(e)}}cy(),cm.exports=Wt;var n0=cm.exports,dy,mp=n0;dy=mp.createRoot,mp.hydrateRoot;const Mr=6;function Lo(e){return f.jsx("div",{className:"ds-divider",role:"separator","aria-orientation":"vertical",title:e.title,onDoubleClick:e.onReset,onPointerDown:t=>{if(t.button!==0)return;t.preventDefault();const n=t.currentTarget,r=t.clientX,i=e.start();n.setPointerCapture(t.pointerId),n.classList.add("dragging"),document.body.classList.add("ds-resizing");const o=l=>e.onDrag(i,l.clientX-r),s=()=>{n.removeEventListener("pointermove",o),n.removeEventListener("pointerup",s),n.removeEventListener("pointercancel",s),n.classList.remove("dragging"),document.body.classList.remove("ds-resizing"),e.onEnd()};n.addEventListener("pointermove",o),n.addEventListener("pointerup",s),n.addEventListener("pointercancel",s)}})}function fy(e){const[t,n]=z.useState(0);return z.useEffect(()=>{const r=e.current;if(!r)return;const i=new ResizeObserver(()=>n(r.clientWidth));return i.observe(r),n(r.clientWidth),()=>i.disconnect()},[e]),t}async function zo(e){try{await navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),t.remove()}}/*!
41
- * Icon paths from Feather (https://github.com/feathericons/feather)
42
- * The MIT License (MIT)
43
- * Copyright (c) 2013-2023 Cole Bemis
44
- *
45
- * Permission is hereby granted, free of charge, to any person obtaining a copy
46
- * of this software and associated documentation files (the "Software"), to deal
47
- * in the Software without restriction, including without limitation the rights
48
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
49
- * copies of the Software, and to permit persons to whom the Software is
50
- * furnished to do so, subject to the following conditions:
51
- *
52
- * The above copyright notice and this permission notice shall be included in all
53
- * copies or substantial portions of the Software.
54
- *
55
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
56
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
57
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
58
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
59
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
60
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
61
- * SOFTWARE.
62
- */function ka({on:e,size:t=14,x:n,y:r}){return f.jsx("svg",{className:`eye${e?" on":""}`,x:n,y:r,width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e?f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),f.jsx("circle",{cx:"12",cy:"12",r:"3"})]}):f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),f.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]})})}function Vu({on:e,size:t=14,x:n,y:r}){return f.jsxs("svg",{className:`pin-icon${e?" on":""}`,x:n,y:r,width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[f.jsx("path",{d:"M8 3h8"}),f.jsx("path",{d:"M9.5 3v6L6 14h12l-3.5-5V3z",fill:e?"currentColor":"none"}),f.jsx("path",{d:"M12 14v7"})]})}function hr({size:e=18,x:t,y:n,className:r,children:i}){return f.jsx("svg",{className:r,x:t,y:n,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:i})}function r0(e){return f.jsxs(hr,{...e,children:[f.jsx("circle",{cx:"18",cy:"5",r:"3"}),f.jsx("circle",{cx:"6",cy:"12",r:"3"}),f.jsx("circle",{cx:"18",cy:"19",r:"3"}),f.jsx("line",{x1:"8.59",y1:"13.51",x2:"15.42",y2:"17.49"}),f.jsx("line",{x1:"15.41",y1:"6.51",x2:"8.59",y2:"10.49"})]})}function i0(e){return f.jsxs(hr,{...e,children:[f.jsx("ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}),f.jsx("path",{d:"M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"}),f.jsx("path",{d:"M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"})]})}function Ti({size:e=14,...t}){return f.jsx(hr,{size:e,...t,children:f.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}function py({size:e=14,...t}){return f.jsxs(hr,{size:e,...t,children:[f.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),f.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}function o0({size:e=14,...t}){return f.jsxs(hr,{size:e,...t,children:[f.jsx("polyline",{points:"23 4 23 10 17 10"}),f.jsx("polyline",{points:"1 20 1 14 7 14"}),f.jsx("path",{d:"M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"})]})}function s0({size:e=14,...t}){return f.jsx(hr,{size:e,...t,children:f.jsx("polyline",{points:"20 6 9 17 4 12"})})}function yd(e){return f.jsxs(hr,{...e,children:[f.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),f.jsx("polyline",{points:"14 2 14 8 20 8"}),f.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),f.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17"}),f.jsx("polyline",{points:"10 9 9 9 8 9"})]})}function xd({size:e=14,...t}){return f.jsx(hr,{size:e,...t,children:f.jsx("polyline",{points:"6 9 12 15 18 9"})})}function Io({n:e,title:t,className:n}){return f.jsxs("span",{className:`ds-count${n?` ${n}`:""}`,title:t,children:[f.jsx(Ti,{size:12}),e]})}const l0=z.forwardRef(function({value:t,onChange:n,onSave:r,onCancel:i,placeholder:o,autoFocus:s,className:l},a){return f.jsx("textarea",{ref:a,className:l,autoFocus:s,value:t,placeholder:o,onChange:u=>n(u.target.value),onKeyDown:u=>{u.key==="Enter"&&(u.metaKey||u.ctrlKey)&&(u.preventDefault(),r()),u.key==="Escape"&&(u.preventDefault(),u.stopPropagation(),u.target.blur(),i())}})});function jn(e,t){try{const n=localStorage.getItem(e);return n===null?t:JSON.parse(n)}catch{return t}}function hn(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}function a0(e){try{localStorage.removeItem(e)}catch{}}function gp(e){const[t,n]=z.useState(()=>{const r=jn(e,[]);return new Set(Array.isArray(r)?r:[])});return z.useEffect(()=>hn(e,[...t]),[e,t]),[t,n]}function Gu(e,t,n){try{return localStorage.getItem(`${e}.${t}`)??n}catch{return n}}function Ku(e,t,n){try{localStorage.setItem(`${e}.${t}`,n)}catch{}}function vd(e){const t=jn(e,[]);return Array.isArray(t)?t:[]}function wd(e,t){t.length?hn(e,t):a0(e)}const hy=()=>`${Date.now().toString(36)}${Math.random().toString(36).slice(2,7)}`,my={open:"未対応",partial:"一部解消",updated:"コメント後に変更あり",resolved:"解消済み?"};function Ml(e){return["以下は、git の差分のレビュービューア diffshape で付けたレビューコメントです。各指摘に対応してください。",`リポジトリ: ${e.repoRoot}`,`比較: ${e.targetLabel} と ${e.baseLabel} の差分`]}function kd(e){const[t,n]=z.useState(!1),r=async()=>{await e.onCopy(),n(!0),window.setTimeout(()=>n(!1),1600)};return f.jsxs("article",{className:`ds-comment ${e.state}${e.lit?" lit":""}${e.editing?" editing":""}`,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,children:[e.top&&f.jsx("div",{className:"ds-comment-top",children:e.top}),f.jsx("div",{className:"ds-comment-body",children:e.body}),f.jsxs("div",{className:"ds-comment-foot",children:[f.jsx("span",{className:`ds-comment-state ${e.state}`,title:e.stateTitle,children:my[e.state]}),e.meta&&f.jsx("span",{className:"ds-muted",children:e.meta}),f.jsx("span",{className:"ds-spacer"}),f.jsx("button",{className:"ds-link",onClick:()=>void r(),title:"このコメントだけ AI 用にコピー",children:t?"コピーしました":"コピー"}),f.jsx("button",{className:"ds-link",onClick:e.onEdit,children:"編集"}),f.jsx("button",{className:"ds-link danger",onClick:()=>{window.confirm("このコメントを削除しますか?")&&e.onDelete()},children:"削除"})]})]})}const bd=z.forwardRef(function(t,n){const r=(t.canSave??!0)&&t.value.trim()!=="";return f.jsxs("div",{className:`ds-composer${t.editing?" editing":""}${t.className?` ${t.className}`:""}`,children:[t.top&&f.jsx("div",{className:"ds-composer-top",children:t.top}),f.jsx(l0,{ref:n,className:"ds-composer-input",autoFocus:t.autoFocus,value:t.value,placeholder:t.placeholder,onChange:t.onChange,onSave:()=>r&&t.onSave(),onCancel:t.onCancel}),f.jsxs("div",{className:"ds-composer-foot",children:[f.jsx("span",{className:"ds-muted",children:"⌘ / Ctrl + Enter で保存 ・ Esc でキャンセル"}),f.jsx("span",{className:"ds-spacer"}),(t.showCancel??!0)&&f.jsx("button",{className:"ds-btn",onClick:t.onCancel,children:"キャンセル"}),f.jsx("button",{className:"ds-btn ds-btn-primary",onClick:t.onSave,disabled:!r,children:t.editing?"更新":"保存"})]})]})});function lo(e){const t=JSON.stringify(e);let n=5381;for(let r=0;r<t.length;r++)n=(n<<5)+n+t.charCodeAt(r)|0;return(n>>>0).toString(36)}const u0={added:"A",modified:"M",removed:"D",renamed:"R",unchanged:""},yp={added:"追加",modified:"変更",removed:"削除",renamed:"名前の変更",unchanged:"変更なし"};function bi({status:e,small:t=!1,title:n}){const r=n===null?void 0:n??yp[e];return f.jsx("span",{className:`ds-st ${e}${t?" small":""}`,title:r,"aria-label":yp[e],children:u0[e]})}const xp=[["added","追加"],["modified","変更"],["removed","削除"]];function Ed({stats:e,unit:t,showZero:n=!1}){const r=xp.filter(([o])=>n||e[o]>0);if(r.length===0)return null;const i=xp.map(([o,s])=>`${s} ${e[o]}`).join("・")+` ${t}`;return f.jsx("span",{className:"ds-status",title:i,children:r.map(([o])=>f.jsxs("span",{className:`ds-status-n ${o}${e[o]===0?" zero":""}`,children:[f.jsx(bi,{status:o,small:!0,title:null}),e[o]]},o))})}function $i({stats:e,title:t,showZero:n=!1}){const r=[["added","+",e.added],["removed","−",e.removed]];e.modified!==void 0&&r.push(["modified","~",e.modified]);const i=r.filter(([,,o])=>n||o>0);return i.length===0?null:f.jsx("span",{className:"ds-change",title:t,children:i.map(([o,s,l])=>f.jsxs("span",{className:l?o:"zero",children:[s,l]},o))})}function Sd({children:e}){return f.jsx("header",{className:"ds-bar",children:e})}function Cd({children:e}){return f.jsx("span",{className:"ds-bar-counts",children:e})}function Ei({children:e}){return f.jsx("span",{className:"ds-bar-label",children:e})}function Nd(){return f.jsx("span",{className:"ds-bar-sep"})}function jd(){return f.jsx("span",{className:"ds-bar-spacer"})}function _d({done:e,total:t,title:n}){return t===0?null:f.jsxs("span",{className:"ds-progress",title:n,children:[f.jsxs("span",{children:["確認済み ",e," / ",t]}),f.jsx("span",{className:"ds-progress-bar",children:f.jsx("span",{style:{width:`${e/t*100}%`}})})]})}function Td(e){var n;if(e.kind==="option")return`--schema ${e.patterns.join(" ")}`;const t=((n=e.envs)==null?void 0:n.filter(Boolean))??[];return`${e.configs.join(", ")}${t.length?`(env: ${t.join(", ")})`:""} の src`}const Is=e=>e.diff.tables.length+e.diff.values.length+e.diff.enums.length+e.diff.domains.length,gy=e=>`カラム・制約・インデックス:追加 ${e.added}・削除 ${e.removed}・変更 ${e.modified}`;function yy(e){const t={added:0,removed:0,modified:0};for(const n of[...e.columns,...e.constraints,...e.indexes])t[n.status]++;return e.comment&&e.status==="modified"&&t.modified++,t}function c0(e){const t=new Map,n=r=>{let i=t.get(r);return i||t.set(r,i={primary:!1,unique:!1,references:[]}),i};for(const r of e)r.kind==="primary"&&r.columns.forEach(i=>n(i).primary=!0),r.kind==="unique"&&r.columns.length===1&&(n(r.columns[0]).unique=!0),r.kind==="foreign"&&r.references&&r.columns.length===1&&n(r.columns[0]).references.push({table:r.references.table,columns:r.references.columns}),r.kind==="check"&&r.values&&(n(r.values.column).values=r.values.values);return t}function d0(e){var n;return[...e.constraints.map(r=>r.after??(e.status==="removed"?r.before:void 0)).filter(r=>!!r),...((n=e.unchanged)==null?void 0:n.constraints)??[]]}function Pl(e,t){const n=new Set(e??[]),r=new Set(t??[]);return[...(t??[]).map(i=>({value:i,status:e&&!n.has(i)?"added":"same"})),...(e??[]).filter(i=>!r.has(i)).map(i=>({value:i,status:"removed"}))]}function xy(e){return e.source==="check"?{label:`${e.table}.${e.column}`,table:e.table}:{label:e.type??""}}function qu(e){const t=[{key:"type",text:e.type}];return t.push({key:"notNull",text:e.notNull?"NOT NULL":"NULL"}),e.default!==void 0&&t.push({key:"default",text:`DEFAULT ${e.default}`}),e.identity&&t.push({key:"identity",text:`IDENTITY ${e.identity==="always"?"ALWAYS":"BY DEFAULT"}`}),e.generated&&t.push({key:"generated",text:`GENERATED (${e.generated})`}),t}function ao(e){return`${e.method?`USING ${e.method} `:""}(${e.columns.join(", ")})${e.include?` INCLUDE (${e.include.join(", ")})`:""}${e.where?` WHERE ${e.where}`:""}`}function f0(e){return`${e.unique?"UNIQUE ":""}INDEX ${ao(e)}`}function p0(e,t){const n=t.trim().toLowerCase();return n?e.name.toLowerCase().includes(n)||e.columns.some(r=>r.name.toLowerCase().includes(n)):!0}const Si=e=>`${e.kind}:${e.table??""}:${e.name}`,Yu=e=>({kind:"table",table:e,name:e});function vy(e){switch(e.kind){case"table":case"type":return e.name;case"column":case"value":return`${e.table}.${e.name}`;default:return`${e.table}:${e.name}`}}const As={table:"テーブル",column:"カラム",constraint:"制約",index:"インデックス",value:"値",type:"型"};function Xu(e){return e.kind==="table"||e.kind==="type"?`${As[e.kind]} ${e.name}`:e.kind==="column"||e.kind==="value"?`${As[e.kind]} ${e.table}.${e.name}`:`${As[e.kind]} ${e.table} の ${e.name}`}function h0(e){return e.kind==="table"?"テーブル全体":e.kind==="type"?e.name:`${As[e.kind]} ${e.name}`}const Xt={added:"今回追加",removed:"今回削除",modified:"今回変更"},ba=e=>qu(e).filter(t=>t.key!=="notNull"||e.notNull).map(t=>t.text).join(" "),Ea=e=>f0(e);function m0(e){if(e.status!=="modified")return Xt[e.status];const t=[],n=(r,i)=>{const o=r.filter(u=>u.status==="added").length,s=r.filter(u=>u.status==="removed").length,l=r.filter(u=>u.status==="modified").length,a=[o&&`+${o}`,s&&`−${s}`,l&&`~${l}`].filter(Boolean).join(" ");a&&t.push(`${i} ${a}`)};return n(e.columns,"カラム"),n(e.constraints,"制約"),n(e.indexes,"インデックス"),e.comment&&t.push("コメント"),`${Xt.modified}(${t.join("、")})`}function $d(e,t){const n=e.diff,r=t.table?n.tables.find(i=>i.name===t.table):void 0;switch(t.kind){case"table":return r?m0(r):void 0;case"column":{const i=r==null?void 0:r.columns.find(o=>o.name===t.name);return i?i.status!=="modified"?`${Xt[i.status]}: ${ba(i.after??i.before)}`:`${Xt.modified}: ${ba(i.before)} → ${ba(i.after)}`:void 0}case"constraint":{const i=r==null?void 0:r.constraints.find(o=>o.name===t.name);return i?i.status!=="modified"?`${Xt[i.status]}: ${(i.after??i.before).definition}`:`${Xt.modified}: ${i.before.definition} → ${i.after.definition}`:void 0}case"index":{const i=r==null?void 0:r.indexes.find(o=>o.name===t.name);return i?i.status!=="modified"?`${Xt[i.status]}: ${Ea(i.after??i.before)}`:`${Xt.modified}: ${Ea(i.before)} → ${Ea(i.after)}`:void 0}case"value":{const i=n.values.find(o=>o.source==="check"&&o.table===t.table&&o.column===t.name);return i?vp(i):void 0}case"type":{const i=n.enums.find(l=>l.name===t.name);if(i){if(i.status!=="modified")return`${Xt[i.status]}: ENUM (${(i.after??i.before).values.join(", ")})`;const l=n.values.find(a=>a.type===t.name);return l?`値の変更: ${vp(l)}`:Xt.modified}const o=n.domains.find(l=>l.name===t.name);if(!o)return;const s=l=>`${l.type}${l.notNull?" NOT NULL":""}${l.checks.map(a=>` ${a.definition}`).join("")}`;return o.status!=="modified"?`${Xt[o.status]}: DOMAIN ${s(o.after??o.before)}`:`${Xt.modified}: ${s(o.before)} → ${s(o.after)}`}}}function vp(e){return e.status==="added"?`値の制限を追加(${(e.after??[]).join(", ")})`:e.status==="removed"?`値の制限を削除(変更前: ${(e.before??[]).join(", ")})`:`${[...e.added.map(n=>`+${n}`),...e.removed.map(n=>`−${n}`)].join(" ")}(変更後: ${(e.after??[]).join(", ")})`}function g0(e,t){if(t.kind==="value"){const n=e.diff.values.find(r=>r.source==="check"&&r.table===t.table&&r.column===t.name);if(n!=null&&n.constraint){const r=e.locations[`${t.table}:${n.constraint}`];if(r)return r}}return e.locations[vy(t)]}function y0(e,t){const n=e.locations[vy(t)];return!!n&&!n.base}function fi(e,t){const n=$d(e,t.target);return!y0(e,t.target)&&!n||t.snapshot!==void 0&&n===void 0?"resolved":n!==t.snapshot?"updated":"open"}function x0(e,t,n){return{id:hy(),target:t,body:n,createdAt:Date.now(),snapshot:$d(e,t)}}const v0=e=>e?e.base?`比較元の ${e.file}:${e.line}(変更後にはありません)`:`${e.file}:${e.line}`:void 0;function wy(e,t,n={}){const r=n.includeResolved?t:t.filter(o=>fi(e,o)!=="resolved"),i=[...n.header===!1?[]:[...Ml({repoRoot:e.repoRoot,targetLabel:e.target.label,baseLabel:e.base.label}),"対象: DB スキーマ(dbshape)"],`スキーマの SQL: ${Td(e.schemaFrom)}`,""];return r.forEach((o,s)=>{const l=fi(e,o),a=$d(e,o.target);i.push(`${s+1}. ${Xu(o.target)}${a?`(${a})`:"(変更なし)"}${l==="resolved"?"(解消済み?)":""}`);const u=v0(g0(e,o.target));u&&i.push(` 定義: ${u}`),l==="updated"&&i.push(` コメントしたときは: ${o.snapshot??"変更なし"}`),i.push(` コメント: ${o.body.trim().replace(/\n/g,`
63
- `)}`),i.push("")}),{text:i.join(`
64
- `).trimEnd()+`
65
- `,included:r.length,skipped:t.length-r.length}}const ky="dbshape.comments:",w0=e=>vd(ky+e),k0=(e,t)=>wd(ky+e,t),by=z.createContext(null),Ld=()=>z.useContext(by),b0=my;function ur({target:e,label:t}){const n=Ld();if(!n)return null;const r=Si(e),i=n.comments.filter(o=>Si(o.target)===r).length;return f.jsxs("button",{className:`cbtn ${i?"has":""}`,onClick:o=>{o.stopPropagation(),n.compose(e)},title:`${t??h0(e)} にコメントする`,"aria-label":"コメントする",children:[f.jsx(Ti,{size:12}),i>0&&f.jsx("span",{className:"cnum",children:i})]})}function Dn({target:e,colSpan:t}){const n=Ld();if(!n)return null;const r=Si(e),i=n.comments.filter(s=>Si(s.target)===r),o=n.composing===r;return!i.length&&!o?null:t?f.jsx("tr",{className:"thread-row",children:f.jsx("td",{colSpan:t,children:f.jsx(Dn,{target:e})})}):f.jsxs("div",{className:"thread",id:`c-${r}`,children:[i.map(s=>n.editing===s.id?f.jsx(wp,{initial:s.body,onSave:l=>n.update(s.id,l),onCancel:()=>n.edit(null)},s.id):f.jsx(E0,{c:s},s.id)),o&&f.jsx(wp,{initial:"",onSave:s=>n.add(e,s),onCancel:()=>n.compose(null)})]})}function E0({c:e}){const t=Ld(),n=fi(t.data,e);return f.jsx(kd,{body:e.body,state:n,stateTitle:n==="updated"?`コメントしたときは: ${e.snapshot??"変更なし"}`:n==="resolved"?"対象がなくなったか、比較元と同じに戻りました":void 0,onCopy:()=>zo(wy(t.data,[e],{includeResolved:!0}).text),onEdit:()=>t.edit(e.id),onDelete:()=>t.remove(e.id)})}function wp({initial:e,onSave:t,onCancel:n}){const[r,i]=z.useState(e);return f.jsx(bd,{autoFocus:!0,editing:e!=="",value:r,placeholder:"気になる点や直してほしいこと",onChange:i,onSave:()=>r.trim()&&t(r.trim()),onCancel:n})}function S0({table:e,reviewed:t,onReviewed:n,known:r,onJump:i,highlighted:o,alwaysOpen:s}){const[l,a]=z.useState(!t),[u,c]=z.useState(!1),d=yy(e),h=c0(d0(e)),p=s||l;return f.jsxs("section",{id:`table-${e.name}`,className:`card ${e.status} ${o?"highlighted":""} ${t&&!s?"reviewed":""}`,children:[f.jsxs("header",{className:"card-head",children:[!s&&f.jsx("button",{className:"fold",onClick:()=>a(!p),"aria-label":p?"たたむ":"開く","aria-expanded":p,children:p?"▾":"▸"}),f.jsxs("span",{className:"tname",children:[f.jsxs("span",{className:"schema",children:[e.schema,"."]}),e.table]}),f.jsx($i,{stats:d,title:gy(d)}),f.jsx("span",{className:"file",title:e.file,children:e.file}),f.jsx(ur,{target:Yu(e.name),label:"テーブル全体"}),f.jsxs("label",{className:"reviewed-box",title:"確認済みにすると、図と一覧で薄く表示します(テーブルがまた変わると外れます)",children:[f.jsx("input",{type:"checkbox",checked:t,onChange:x=>{n(x.target.checked),a(!x.target.checked)}}),"確認済み"]})]}),p&&f.jsxs("div",{className:"card-body",children:[f.jsx(Dn,{target:Yu(e.name)}),e.comment&&f.jsx(T0,{before:e.comment.before,after:e.comment.after,status:e.status}),e.status==="modified"?f.jsxs(f.Fragment,{children:[f.jsx(Bi,{title:"カラム",empty:e.columns.length===0,children:f.jsx("table",{className:"cols",children:f.jsx("tbody",{children:e.columns.map(x=>f.jsx(N0,{table:e.name,change:x,badges:h.get(x.name),known:r,onJump:i},x.name))})})}),f.jsx(Bi,{title:"制約",empty:e.constraints.length===0,children:e.constraints.map(x=>f.jsx(j0,{table:e.name,change:x,known:r,onJump:i},x.name))}),f.jsx(Bi,{title:"インデックス",empty:e.indexes.length===0,children:e.indexes.map(x=>f.jsx(_0,{table:e.name,change:x},x.name))}),e.unchanged&&(e.unchanged.columns.length>0||e.unchanged.constraints.length>0||e.unchanged.indexes.length>0)&&f.jsxs("div",{className:"context",children:[f.jsxs("button",{className:"link",onClick:()=>c(!u),children:[u?"▾":"▸"," 変更のないカラム ",e.unchanged.columns.length,"・制約 ",e.unchanged.constraints.length,"・インデックス ",e.unchanged.indexes.length]}),u&&f.jsxs("div",{className:"context-body",children:[f.jsx("table",{className:"cols",children:f.jsx("tbody",{children:e.unchanged.columns.map(x=>f.jsx(Qu,{table:e.name,c:x,badges:h.get(x.name),known:r,onJump:i},x.name))})}),e.unchanged.constraints.map(x=>f.jsx(kp,{table:e.name,c:x,known:r,onJump:i},x.name)),e.unchanged.indexes.map(x=>f.jsx(bp,{table:e.name,i:x},x.name))]})]})]}):f.jsxs(f.Fragment,{children:[f.jsx("table",{className:"cols",children:f.jsx("tbody",{children:e.columns.map(x=>f.jsx(Qu,{table:e.name,c:x.after??x.before,badges:h.get(x.name),known:r,onJump:i},x.name))})}),e.constraints.length>0&&f.jsx(Bi,{title:"制約",children:e.constraints.map(x=>f.jsx(kp,{table:e.name,c:x.after??x.before,known:r,onJump:i},x.name))}),e.indexes.length>0&&f.jsx(Bi,{title:"インデックス",children:e.indexes.map(x=>f.jsx(bp,{table:e.name,i:x.after??x.before},x.name))})]})]})]})}function Bi(e){return e.empty?null:f.jsxs("div",{className:"section",children:[f.jsx("div",{className:"section-title",children:e.title}),e.children]})}const Ey={added:"+",removed:"−",modified:"~"};function Sy({b:e,known:t,onJump:n}){return e?f.jsxs(f.Fragment,{children:[e.primary&&f.jsx("span",{className:"tag key",children:"PK"}),e.unique&&f.jsx("span",{className:"tag",children:"UNIQUE"}),e.references.map(r=>f.jsx(C0,{table:r.table,columns:r.columns,known:t,onJump:n},r.table))]}):null}function C0({table:e,columns:t,known:n,onJump:r}){const i=`→ ${e}${t.length?` (${t.join(", ")})`:""}`;return n.has(e)?f.jsx("button",{className:"tag ref link",onClick:()=>r(e),title:"このテーブルの変更へ移動",children:i}):f.jsx("span",{className:"tag ref",children:i})}const Cy=(e,t)=>({kind:"column",table:e,name:t});function Qu({table:e,c:t,badges:n,known:r,onJump:i}){const o=Cy(e,t.name);return f.jsxs(f.Fragment,{children:[f.jsxs("tr",{className:"plain",children:[f.jsx("td",{className:"mark"}),f.jsx("td",{className:"cname",children:t.name}),f.jsxs("td",{children:[f.jsx("code",{children:t.type}),t.notNull&&f.jsx("span",{className:"attr",children:"NOT NULL"}),t.default!==void 0&&f.jsxs("span",{className:"attr",children:["DEFAULT ",t.default]}),t.identity&&f.jsx("span",{className:"attr",children:"IDENTITY"}),t.generated&&f.jsxs("span",{className:"attr",children:["GENERATED (",t.generated,")"]}),f.jsx(Sy,{b:n,known:r,onJump:i}),(n==null?void 0:n.values)&&f.jsx(Ny,{values:n.values}),t.comment&&f.jsx("span",{className:"comment",children:t.comment}),f.jsx(ur,{target:o})]})]}),f.jsx(Dn,{target:o,colSpan:3})]})}function Ny({values:e}){return f.jsx("span",{className:"chips",children:e.map(t=>f.jsx("span",{className:"chip",children:t},t))})}function N0({table:e,change:t,badges:n,known:r,onJump:i}){const o=Cy(e,t.name);if(t.status!=="modified"){const c=t.after??t.before;return f.jsxs(f.Fragment,{children:[f.jsxs("tr",{className:t.status,children:[f.jsx("td",{className:"mark",children:Ey[t.status]}),f.jsx("td",{className:"cname",children:t.name}),f.jsxs("td",{children:[f.jsx("code",{children:c.type}),c.notNull&&f.jsx("span",{className:"attr",children:"NOT NULL"}),c.default!==void 0&&f.jsxs("span",{className:"attr",children:["DEFAULT ",c.default]}),c.identity&&f.jsx("span",{className:"attr",children:"IDENTITY"}),c.generated&&f.jsxs("span",{className:"attr",children:["GENERATED (",c.generated,")"]}),t.status==="added"&&f.jsx(Sy,{b:n,known:r,onJump:i}),t.status==="added"&&(n==null?void 0:n.values)&&f.jsx(Ny,{values:n.values}),c.comment&&f.jsx("span",{className:"comment",children:c.comment}),f.jsx(ur,{target:o})]})]}),f.jsx(Dn,{target:o,colSpan:3})]})}const s=new Map(qu(t.before).map(c=>[c.key,c.text])),l=qu(t.after),a=new Set(t.changed??[]),u=[...new Set([...l.map(c=>c.key),...s.keys()])];return f.jsxs(f.Fragment,{children:[f.jsxs("tr",{className:"modified",children:[f.jsx("td",{className:"mark",children:"~"}),f.jsx("td",{className:"cname",children:t.name}),f.jsxs("td",{children:[u.map(c=>{var p;const d=(p=l.find(x=>x.key===c))==null?void 0:p.text,h=s.get(c);return a.has(c)?f.jsxs("span",{className:"attr change",children:[h!==void 0&&f.jsx("del",{children:h}),h!==void 0&&d!==void 0&&f.jsx("span",{className:"arrow",children:"→"}),d!==void 0&&f.jsx("ins",{children:d})]},c):d?f.jsx("span",{className:c==="type"?"attr type":"attr",children:d},c):null}),a.has("comment")&&f.jsxs("span",{className:"attr change",children:[f.jsx("span",{className:"muted",children:"コメント "}),t.before.comment!==void 0&&f.jsx("del",{children:t.before.comment}),f.jsx("span",{className:"arrow",children:"→"}),t.after.comment!==void 0?f.jsx("ins",{children:t.after.comment}):f.jsx("span",{className:"muted",children:"(なし)"})]}),f.jsx(ur,{target:o})]})]}),f.jsx(Dn,{target:o,colSpan:3})]})}const jy={primary:"PK",unique:"UNIQUE",check:"CHECK",foreign:"FK",exclude:"EXCLUDE"};function _y({table:e,known:t,onJump:n}){return!e||!t.has(e)?null:f.jsxs("button",{className:"jump link",onClick:()=>n(e),title:`${e} の変更へ移動`,children:["↗ ",e]})}function Bo(e){return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:`row ${e.status??"plain"} ${e.target?"commentable":""}`,children:[f.jsx("span",{className:"mark",children:e.status?Ey[e.status]:""}),f.jsx("span",{className:"tag kind",children:e.kind}),f.jsx("span",{className:"rbody",children:e.children}),f.jsx("span",{className:"rname",title:e.name,children:e.name}),e.target&&f.jsx(ur,{target:e.target})]}),e.target&&f.jsx(Dn,{target:e.target})]})}const Fl=(e,t,n)=>({kind:e,table:t,name:n});function kp({table:e,c:t,known:n,onJump:r}){var i;return f.jsxs(Bo,{kind:jy[t.kind],name:t.name,target:Fl("constraint",e,t.name),children:[f.jsx("code",{children:t.definition}),f.jsx(_y,{table:(i=t.references)==null?void 0:i.table,known:n,onJump:r})]})}function j0({table:e,change:t,known:n,onJump:r}){var s,l,a;const i=t.after??t.before,o=t.status==="modified"&&((s=t.before)!=null&&s.values)&&((l=t.after)!=null&&l.values)?Pl(t.before.values.values,t.after.values.values):null;return f.jsxs(Bo,{status:t.status,kind:jy[t.kind],name:t.name,target:Fl("constraint",e,t.name),children:[t.status!=="modified"?f.jsx("code",{children:i.definition}):o?f.jsxs(f.Fragment,{children:[f.jsxs("code",{children:[t.after.values.column,": "]}),f.jsx("span",{className:"chips",children:o.map(u=>f.jsxs("span",{className:`chip ${u.status}`,children:[u.status==="added"?"+":u.status==="removed"?"−":"",u.value]},u.value))})]}):f.jsxs("span",{className:"change-block",children:[f.jsx("del",{children:t.before.definition}),f.jsx("ins",{children:t.after.definition})]}),t.status!=="removed"&&f.jsx(_y,{table:(a=i.references)==null?void 0:a.table,known:n,onJump:r})]})}function bp({table:e,i:t}){return f.jsx(Bo,{kind:t.unique?"UNIQUE":"INDEX",name:t.name,target:Fl("index",e,t.name),children:f.jsx("code",{children:ao(t)})})}function _0({table:e,change:t}){const n=t.after??t.before;return f.jsx(Bo,{status:t.status,kind:n.unique?"UNIQUE":"INDEX",name:t.name,target:Fl("index",e,t.name),children:t.status==="modified"?f.jsxs("span",{className:"change-block",children:[f.jsxs("del",{children:[t.before.unique?"UNIQUE ":"",ao(t.before)]}),f.jsxs("ins",{children:[t.after.unique?"UNIQUE ":"",ao(t.after)]})]}):f.jsx("code",{children:ao(n)})})}function T0({before:e,after:t,status:n}){return n!=="modified"?f.jsx("div",{className:"table-comment",children:t??e}):f.jsx(Bo,{status:"modified",kind:"COMMENT",name:"",children:f.jsxs("span",{className:"change-block",children:[e!==void 0?f.jsx("del",{children:e}):f.jsx("span",{className:"muted",children:"(なし)"}),t!==void 0?f.jsx("ins",{children:t}):f.jsx("span",{className:"muted",children:"(なし)"})]})})}function $0(e){return f.jsxs("aside",{className:"panel",children:[f.jsxs("div",{className:"panel-head",children:[f.jsx("span",{className:"panel-title",children:e.selection.name}),f.jsx("button",{className:"ds-btn ds-btn-icon",onClick:e.onClose,"aria-label":"閉じる",title:"閉じる(Esc)",children:"×"})]}),f.jsxs("div",{className:"panel-body",children:[e.selection.kind==="type"&&e.type&&f.jsx(A0,{kind:e.type.kind,change:e.type.change}),e.selection.kind==="table"&&(e.change?f.jsx(S0,{table:e.change,reviewed:e.reviewed,onReviewed:e.onReviewed,known:e.known,onJump:e.onJump,highlighted:!1,alwaysOpen:!0},e.change.name):e.erTable?f.jsx(L0,{t:e.erTable}):null),e.values.length>0&&f.jsxs("div",{className:"panel-section",children:[f.jsx("div",{className:"section-title",children:"値の変化"}),e.values.map((t,n)=>f.jsx(I0,{v:t},n))]})]})]})}function L0({t:e}){const t=Yu(e.name);return f.jsxs("div",{className:"unchanged-table",children:[f.jsxs("p",{className:"muted unchanged-note",children:["このテーブルは変更されていません。",f.jsx(ur,{target:t,label:"テーブル全体"})]}),f.jsx(Dn,{target:t}),f.jsx("table",{className:"cols",children:f.jsx("tbody",{children:e.columns.map(n=>f.jsx(Qu,{table:e.name,c:{name:n.name,type:n.type,notNull:n.notNull},badges:{primary:n.primary,unique:!1,references:e.foreignKeys.filter(r=>r.columns.length===1&&r.columns[0]===n.name).map(r=>({table:r.table,columns:r.refColumns}))},known:new Set,onJump:()=>{}},n.name))})})]})}function I0({v:e}){const t=xy(e),n=Pl(e.before,e.after),r=e.source==="check"?{kind:"value",table:e.table,name:e.column??""}:{kind:"type",name:e.type??""};return f.jsxs("div",{className:"value-row commentable",children:[f.jsx(ur,{target:r,label:e.source==="check"?`${e.column} の値`:void 0}),f.jsxs("div",{className:"value-head",children:[f.jsx("span",{className:"vname",children:t.label}),f.jsx("span",{className:"tag kind",children:e.source==="check"?"CHECK":e.source==="enum"?"ENUM 型":"DOMAIN"}),e.constraint&&f.jsx("span",{className:"muted",children:e.constraint}),e.status==="added"&&f.jsx("span",{className:"note",children:"値の制限が付きました"}),e.status==="removed"&&f.jsx("span",{className:"note",children:"値の制限がなくなりました"})]}),f.jsx("div",{className:"chips",children:n.map(i=>f.jsxs("span",{className:`chip ${e.status==="added"?"same":i.status}`,children:[e.status==="modified"&&i.status==="added"?"+":i.status==="removed"?"−":"",i.value]},i.value))}),e.usedBy&&e.usedBy.length>0&&f.jsxs("div",{className:"muted used",children:["使用しているカラム: ",e.usedBy.join(", ")]}),f.jsx(Dn,{target:r})]})}function A0({kind:e,change:t}){const n=t.before&&"values"in t.before?t.before.values:void 0,r=t.after&&"values"in t.after?t.after.values:void 0,i=t.after??t.before,o={kind:"type",name:t.name};return f.jsxs("div",{className:"value-row commentable",children:[f.jsx(ur,{target:o}),f.jsxs("div",{className:`value-head tinted ${t.status}`,children:[f.jsx("span",{className:"vname",children:t.name}),f.jsx("span",{className:"tag kind",children:e})]}),e==="ENUM 型"?f.jsx("div",{className:"chips",children:Pl(t.status==="added"?void 0:n,t.status==="removed"?n:r).map(s=>f.jsxs("span",{className:`chip ${t.status==="modified"?s.status:"same"}`,children:[t.status==="modified"&&s.status==="added"?"+":s.status==="removed"&&t.status==="modified"?"−":"",s.value]},s.value))}):i&&f.jsx("div",{className:"domain",children:t.status==="modified"&&t.before&&t.after&&"type"in t.before&&"type"in t.after?f.jsxs("span",{className:"change-block",children:[f.jsxs("del",{children:[t.before.type,t.before.notNull?" NOT NULL":"",t.before.checks.map(s=>` ${s.definition}`).join("")]}),f.jsxs("ins",{children:[t.after.type,t.after.notNull?" NOT NULL":"",t.after.checks.map(s=>` ${s.definition}`).join("")]})]}):f.jsxs("code",{children:[i.type,i.notNull?" NOT NULL":"",i.checks.map(s=>` ${s.definition}`).join("")]})}),f.jsx(Dn,{target:o})]})}var Pe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),xn=Pe((e,t)=>{var n=Object.defineProperty,r=(F,L,B)=>L in F?n(F,L,{enumerable:!0,configurable:!0,writable:!0,value:B}):F[L]=B,i=(F,L)=>()=>(L||F((L={exports:{}}).exports,L),L.exports),o=(F,L,B)=>r(F,typeof L!="symbol"?L+"":L,B),s=i((F,L)=>{var B="\0",U="\0",W="",P=class{constructor(R){o(this,"_isDirected",!0),o(this,"_isMultigraph",!1),o(this,"_isCompound",!1),o(this,"_label"),o(this,"_defaultNodeLabelFn",()=>{}),o(this,"_defaultEdgeLabelFn",()=>{}),o(this,"_nodes",{}),o(this,"_in",{}),o(this,"_preds",{}),o(this,"_out",{}),o(this,"_sucs",{}),o(this,"_edgeObjs",{}),o(this,"_edgeLabels",{}),o(this,"_nodeCount",0),o(this,"_edgeCount",0),o(this,"_parent"),o(this,"_children"),R&&(this._isDirected=Object.hasOwn(R,"directed")?R.directed:!0,this._isMultigraph=Object.hasOwn(R,"multigraph")?R.multigraph:!1,this._isCompound=Object.hasOwn(R,"compound")?R.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[U]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(R){return this._label=R,this}graph(){return this._label}setDefaultNodeLabel(R){return this._defaultNodeLabelFn=R,typeof R!="function"&&(this._defaultNodeLabelFn=()=>R),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var R=this;return this.nodes().filter(I=>Object.keys(R._in[I]).length===0)}sinks(){var R=this;return this.nodes().filter(I=>Object.keys(R._out[I]).length===0)}setNodes(R,I){var M=arguments,H=this;return R.forEach(function(K){M.length>1?H.setNode(K,I):H.setNode(K)}),this}setNode(R,I){return Object.hasOwn(this._nodes,R)?(arguments.length>1&&(this._nodes[R]=I),this):(this._nodes[R]=arguments.length>1?I:this._defaultNodeLabelFn(R),this._isCompound&&(this._parent[R]=U,this._children[R]={},this._children[U][R]=!0),this._in[R]={},this._preds[R]={},this._out[R]={},this._sucs[R]={},++this._nodeCount,this)}node(R){return this._nodes[R]}hasNode(R){return Object.hasOwn(this._nodes,R)}removeNode(R){var I=this;if(Object.hasOwn(this._nodes,R)){var M=H=>I.removeEdge(I._edgeObjs[H]);delete this._nodes[R],this._isCompound&&(this._removeFromParentsChildList(R),delete this._parent[R],this.children(R).forEach(function(H){I.setParent(H)}),delete this._children[R]),Object.keys(this._in[R]).forEach(M),delete this._in[R],delete this._preds[R],Object.keys(this._out[R]).forEach(M),delete this._out[R],delete this._sucs[R],--this._nodeCount}return this}setParent(R,I){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(I===void 0)I=U;else{I+="";for(var M=I;M!==void 0;M=this.parent(M))if(M===R)throw new Error("Setting "+I+" as parent of "+R+" would create a cycle");this.setNode(I)}return this.setNode(R),this._removeFromParentsChildList(R),this._parent[R]=I,this._children[I][R]=!0,this}_removeFromParentsChildList(R){delete this._children[this._parent[R]][R]}parent(R){if(this._isCompound){var I=this._parent[R];if(I!==U)return I}}children(R=U){if(this._isCompound){var I=this._children[R];if(I)return Object.keys(I)}else{if(R===U)return this.nodes();if(this.hasNode(R))return[]}}predecessors(R){var I=this._preds[R];if(I)return Object.keys(I)}successors(R){var I=this._sucs[R];if(I)return Object.keys(I)}neighbors(R){var I=this.predecessors(R);if(I){let H=new Set(I);for(var M of this.successors(R))H.add(M);return Array.from(H.values())}}isLeaf(R){var I;return this.isDirected()?I=this.successors(R):I=this.neighbors(R),I.length===0}filterNodes(R){var I=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});I.setGraph(this.graph());var M=this;Object.entries(this._nodes).forEach(function([J,D]){R(J)&&I.setNode(J,D)}),Object.values(this._edgeObjs).forEach(function(J){I.hasNode(J.v)&&I.hasNode(J.w)&&I.setEdge(J,M.edge(J))});var H={};function K(J){var D=M.parent(J);return D===void 0||I.hasNode(D)?(H[J]=D,D):D in H?H[D]:K(D)}return this._isCompound&&I.nodes().forEach(J=>I.setParent(J,K(J))),I}setDefaultEdgeLabel(R){return this._defaultEdgeLabelFn=R,typeof R!="function"&&(this._defaultEdgeLabelFn=()=>R),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(R,I){var M=this,H=arguments;return R.reduce(function(K,J){return H.length>1?M.setEdge(K,J,I):M.setEdge(K,J),J}),this}setEdge(){var R,I,M,H,K=!1,J=arguments[0];typeof J=="object"&&J!==null&&"v"in J?(R=J.v,I=J.w,M=J.name,arguments.length===2&&(H=arguments[1],K=!0)):(R=J,I=arguments[1],M=arguments[3],arguments.length>2&&(H=arguments[2],K=!0)),R=""+R,I=""+I,M!==void 0&&(M=""+M);var D=Y(this._isDirected,R,I,M);if(Object.hasOwn(this._edgeLabels,D))return K&&(this._edgeLabels[D]=H),this;if(M!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(R),this.setNode(I),this._edgeLabels[D]=K?H:this._defaultEdgeLabelFn(R,I,M);var ee=Z(this._isDirected,R,I,M);return R=ee.v,I=ee.w,Object.freeze(ee),this._edgeObjs[D]=ee,G(this._preds[I],R),G(this._sucs[R],I),this._in[I][D]=ee,this._out[R][D]=ee,this._edgeCount++,this}edge(R,I,M){var H=arguments.length===1?j(this._isDirected,arguments[0]):Y(this._isDirected,R,I,M);return this._edgeLabels[H]}edgeAsObj(){let R=this.edge(...arguments);return typeof R!="object"?{label:R}:R}hasEdge(R,I,M){var H=arguments.length===1?j(this._isDirected,arguments[0]):Y(this._isDirected,R,I,M);return Object.hasOwn(this._edgeLabels,H)}removeEdge(R,I,M){var H=arguments.length===1?j(this._isDirected,arguments[0]):Y(this._isDirected,R,I,M),K=this._edgeObjs[H];return K&&(R=K.v,I=K.w,delete this._edgeLabels[H],delete this._edgeObjs[H],S(this._preds[I],R),S(this._sucs[R],I),delete this._in[I][H],delete this._out[R][H],this._edgeCount--),this}inEdges(R,I){return this.isDirected()?this.filterEdges(this._in[R],R,I):this.nodeEdges(R,I)}outEdges(R,I){return this.isDirected()?this.filterEdges(this._out[R],R,I):this.nodeEdges(R,I)}nodeEdges(R,I){if(R in this._nodes)return this.filterEdges({...this._in[R],...this._out[R]},R,I)}filterEdges(R,I,M){if(R){var H=Object.values(R);return M?H.filter(function(K){return K.v===I&&K.w===M||K.v===M&&K.w===I}):H}}};function G(R,I){R[I]?R[I]++:R[I]=1}function S(R,I){--R[I]||delete R[I]}function Y(R,I,M,H){var K=""+I,J=""+M;if(!R&&K>J){var D=K;K=J,J=D}return K+W+J+W+(H===void 0?B:H)}function Z(R,I,M,H){var K=""+I,J=""+M;if(!R&&K>J){var D=K;K=J,J=D}var ee={v:K,w:J};return H&&(ee.name=H),ee}function j(R,I){return Y(R,I.v,I.w,I.name)}L.exports=P}),l=i((F,L)=>{L.exports="3.0.2"}),a=i((F,L)=>{L.exports={Graph:s(),version:l()}}),u=i((F,L)=>{var B=s();L.exports={write:U,read:G};function U(S){var Y={options:{directed:S.isDirected(),multigraph:S.isMultigraph(),compound:S.isCompound()},nodes:W(S),edges:P(S)};return S.graph()!==void 0&&(Y.value=structuredClone(S.graph())),Y}function W(S){return S.nodes().map(function(Y){var Z=S.node(Y),j=S.parent(Y),R={v:Y};return Z!==void 0&&(R.value=Z),j!==void 0&&(R.parent=j),R})}function P(S){return S.edges().map(function(Y){var Z=S.edge(Y),j={v:Y.v,w:Y.w};return Y.name!==void 0&&(j.name=Y.name),Z!==void 0&&(j.value=Z),j})}function G(S){var Y=new B(S.options).setGraph(S.value);return S.nodes.forEach(function(Z){Y.setNode(Z.v,Z.value),Z.parent&&Y.setParent(Z.v,Z.parent)}),S.edges.forEach(function(Z){Y.setEdge({v:Z.v,w:Z.w,name:Z.name},Z.value)}),Y}}),c=i((F,L)=>{L.exports=U;var B=()=>1;function U(P,G,S,Y){return W(P,String(G),S||B,Y||function(Z){return P.outEdges(Z)})}function W(P,G,S,Y){var Z={},j=!0,R=0,I=P.nodes(),M=function(D){var ee=S(D);Z[D.v].distance+ee<Z[D.w].distance&&(Z[D.w]={distance:Z[D.v].distance+ee,predecessor:D.v},j=!0)},H=function(){I.forEach(function(D){Y(D).forEach(function(ee){var ue=ee.v===D?ee.v:ee.w,Fe=ue===ee.v?ee.w:ee.v;M({v:ue,w:Fe})})})};I.forEach(function(D){var ee=D===G?0:Number.POSITIVE_INFINITY;Z[D]={distance:ee}});for(var K=I.length,J=1;J<K&&(j=!1,R++,H(),!!j);J++);if(R===K-1&&(j=!1,H(),j))throw new Error("The graph contains a negative weight cycle");return Z}}),d=i((F,L)=>{L.exports=B;function B(U){var W={},P=[],G;function S(Y){Object.hasOwn(W,Y)||(W[Y]=!0,G.push(Y),U.successors(Y).forEach(S),U.predecessors(Y).forEach(S))}return U.nodes().forEach(function(Y){G=[],S(Y),G.length&&P.push(G)}),P}}),h=i((F,L)=>{var B=class{constructor(){o(this,"_arr",[]),o(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(U){return U.key})}has(U){return Object.hasOwn(this._keyIndices,U)}priority(U){var W=this._keyIndices[U];if(W!==void 0)return this._arr[W].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(U,W){var P=this._keyIndices;if(U=String(U),!Object.hasOwn(P,U)){var G=this._arr,S=G.length;return P[U]=S,G.push({key:U,priority:W}),this._decrease(S),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var U=this._arr.pop();return delete this._keyIndices[U.key],this._heapify(0),U.key}decrease(U,W){var P=this._keyIndices[U];if(W>this._arr[P].priority)throw new Error("New priority is greater than current priority. Key: "+U+" Old: "+this._arr[P].priority+" New: "+W);this._arr[P].priority=W,this._decrease(P)}_heapify(U){var W=this._arr,P=2*U,G=P+1,S=U;P<W.length&&(S=W[P].priority<W[S].priority?P:S,G<W.length&&(S=W[G].priority<W[S].priority?G:S),S!==U&&(this._swap(U,S),this._heapify(S)))}_decrease(U){for(var W=this._arr,P=W[U].priority,G;U!==0&&(G=U>>1,!(W[G].priority<P));)this._swap(U,G),U=G}_swap(U,W){var P=this._arr,G=this._keyIndices,S=P[U],Y=P[W];P[U]=Y,P[W]=S,G[Y.key]=U,G[S.key]=W}};L.exports=B}),p=i((F,L)=>{var B=h();L.exports=W;var U=()=>1;function W(G,S,Y,Z){var j=function(R){return G.outEdges(R)};return P(G,String(S),Y||U,Z||j)}function P(G,S,Y,Z){var j={},R=new B,I,M,H=function(K){var J=K.v!==I?K.v:K.w,D=j[J],ee=Y(K),ue=M.distance+ee;if(ee<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+K+" Weight: "+ee);ue<D.distance&&(D.distance=ue,D.predecessor=I,R.decrease(J,ue))};for(G.nodes().forEach(function(K){var J=K===S?0:Number.POSITIVE_INFINITY;j[K]={distance:J},R.add(K,J)});R.size()>0&&(I=R.removeMin(),M=j[I],M.distance!==Number.POSITIVE_INFINITY);)Z(I).forEach(H);return j}}),x=i((F,L)=>{var B=p();L.exports=U;function U(W,P,G){return W.nodes().reduce(function(S,Y){return S[Y]=B(W,Y,P,G),S},{})}}),v=i((F,L)=>{L.exports=B;function B(W,P,G){if(W[P].predecessor!==void 0)throw new Error("Invalid source vertex");if(W[G].predecessor===void 0&&G!==P)throw new Error("Invalid destination vertex");return{weight:W[G].distance,path:U(W,P,G)}}function U(W,P,G){for(var S=[],Y=G;Y!==P;)S.push(Y),Y=W[Y].predecessor;return S.push(P),S.reverse()}}),k=i((F,L)=>{L.exports=B;function B(U){var W=0,P=[],G={},S=[];function Y(Z){var j=G[Z]={onStack:!0,lowlink:W,index:W++};if(P.push(Z),U.successors(Z).forEach(function(M){Object.hasOwn(G,M)?G[M].onStack&&(j.lowlink=Math.min(j.lowlink,G[M].index)):(Y(M),j.lowlink=Math.min(j.lowlink,G[M].lowlink))}),j.lowlink===j.index){var R=[],I;do I=P.pop(),G[I].onStack=!1,R.push(I);while(Z!==I);S.push(R)}}return U.nodes().forEach(function(Z){Object.hasOwn(G,Z)||Y(Z)}),S}}),y=i((F,L)=>{var B=k();L.exports=U;function U(W){return B(W).filter(function(P){return P.length>1||P.length===1&&W.hasEdge(P[0],P[0])})}}),m=i((F,L)=>{L.exports=U;var B=()=>1;function U(P,G,S){return W(P,G||B,S||function(Y){return P.outEdges(Y)})}function W(P,G,S){var Y={},Z=P.nodes();return Z.forEach(function(j){Y[j]={},Y[j][j]={distance:0},Z.forEach(function(R){j!==R&&(Y[j][R]={distance:Number.POSITIVE_INFINITY})}),S(j).forEach(function(R){var I=R.v===j?R.w:R.v,M=G(R);Y[j][I]={distance:M,predecessor:j}})}),Z.forEach(function(j){var R=Y[j];Z.forEach(function(I){var M=Y[I];Z.forEach(function(H){var K=M[j],J=R[H],D=M[H],ee=K.distance+J.distance;ee<D.distance&&(D.distance=ee,D.predecessor=J.predecessor)})})}),Y}}),g=i((F,L)=>{function B(W){var P={},G={},S=[];function Y(Z){if(Object.hasOwn(G,Z))throw new U;Object.hasOwn(P,Z)||(G[Z]=!0,P[Z]=!0,W.predecessors(Z).forEach(Y),delete G[Z],S.push(Z))}if(W.sinks().forEach(Y),Object.keys(P).length!==W.nodeCount())throw new U;return S}var U=class extends Error{constructor(){super(...arguments)}};L.exports=B,B.CycleException=U}),w=i((F,L)=>{var B=g();L.exports=U;function U(W){try{B(W)}catch(P){if(P instanceof B.CycleException)return!1;throw P}return!0}}),C=i((F,L)=>{L.exports=B;function B(W,P,G,S,Y){Array.isArray(P)||(P=[P]);var Z=(W.isDirected()?W.successors:W.neighbors).bind(W),j={};return P.forEach(function(R){if(!W.hasNode(R))throw new Error("Graph does not have node: "+R);Y=U(W,R,G==="post",j,Z,S,Y)}),Y}function U(W,P,G,S,Y,Z,j){return Object.hasOwn(S,P)||(S[P]=!0,G||(j=Z(j,P)),Y(P).forEach(function(R){j=U(W,R,G,S,Y,Z,j)}),G&&(j=Z(j,P))),j}}),E=i((F,L)=>{var B=C();L.exports=U;function U(W,P,G){return B(W,P,G,function(S,Y){return S.push(Y),S},[])}}),A=i((F,L)=>{var B=E();L.exports=U;function U(W,P){return B(W,P,"post")}}),_=i((F,L)=>{var B=E();L.exports=U;function U(W,P){return B(W,P,"pre")}}),$=i((F,L)=>{var B=s(),U=h();L.exports=W;function W(P,G){var S=new B,Y={},Z=new U,j;function R(M){var H=M.v===j?M.w:M.v,K=Z.priority(H);if(K!==void 0){var J=G(M);J<K&&(Y[H]=j,Z.decrease(H,J))}}if(P.nodeCount()===0)return S;P.nodes().forEach(function(M){Z.add(M,Number.POSITIVE_INFINITY),S.setNode(M)}),Z.decrease(P.nodes()[0],0);for(var I=!1;Z.size()>0;){if(j=Z.removeMin(),Object.hasOwn(Y,j))S.setEdge(j,Y[j]);else{if(I)throw new Error("Input graph is not connected: "+P);I=!0}P.nodeEdges(j).forEach(R)}return S}}),b=i((F,L)=>{var B=p(),U=c();L.exports=W;function W(G,S,Y,Z){return P(G,S,Y,Z||function(j){return G.outEdges(j)})}function P(G,S,Y,Z){if(Y===void 0)return B(G,S,Y,Z);for(var j=!1,R=G.nodes(),I=0;I<R.length;I++){for(var M=Z(R[I]),H=0;H<M.length;H++){var K=M[H],J=K.v===R[I]?K.v:K.w,D=J===K.v?K.w:K.v;Y({v:J,w:D})<0&&(j=!0)}if(j)return U(G,S,Y,Z)}return B(G,S,Y,Z)}}),O=i((F,L)=>{L.exports={bellmanFord:c(),components:d(),dijkstra:p(),dijkstraAll:x(),extractPath:v(),findCycles:y(),floydWarshall:m(),isAcyclic:w(),postorder:A(),preorder:_(),prim:$(),shortestPaths:b(),reduce:C(),tarjan:k(),topsort:g()}}),T=a();t.exports={Graph:T.Graph,json:u(),alg:O(),version:T.version}}),O0=Pe((e,t)=>{var n=class{constructor(){let o={};o._next=o._prev=o,this._sentinel=o}dequeue(){let o=this._sentinel,s=o._prev;if(s!==o)return r(s),s}enqueue(o){let s=this._sentinel;o._prev&&o._next&&r(o),o._next=s._next,s._next._prev=o,s._next=o,o._prev=s}toString(){let o=[],s=this._sentinel,l=s._prev;for(;l!==s;)o.push(JSON.stringify(l,i)),l=l._prev;return"["+o.join(", ")+"]"}};function r(o){o._prev._next=o._next,o._next._prev=o._prev,delete o._next,delete o._prev}function i(o,s){if(o!=="_next"&&o!=="_prev")return s}t.exports=n}),R0=Pe((e,t)=>{var n=xn().Graph,r=O0();t.exports=o;var i=()=>1;function o(d,h){if(d.nodeCount()<=1)return[];let p=a(d,h||i);return s(p.graph,p.buckets,p.zeroIdx).flatMap(x=>d.outEdges(x.v,x.w))}function s(d,h,p){let x=[],v=h[h.length-1],k=h[0],y;for(;d.nodeCount();){for(;y=k.dequeue();)l(d,h,p,y);for(;y=v.dequeue();)l(d,h,p,y);if(d.nodeCount()){for(let m=h.length-2;m>0;--m)if(y=h[m].dequeue(),y){x=x.concat(l(d,h,p,y,!0));break}}}return x}function l(d,h,p,x,v){let k=v?[]:void 0;return d.inEdges(x.v).forEach(y=>{let m=d.edge(y),g=d.node(y.v);v&&k.push({v:y.v,w:y.w}),g.out-=m,u(h,p,g)}),d.outEdges(x.v).forEach(y=>{let m=d.edge(y),g=y.w,w=d.node(g);w.in-=m,u(h,p,w)}),d.removeNode(x.v),k}function a(d,h){let p=new n,x=0,v=0;d.nodes().forEach(m=>{p.setNode(m,{v:m,in:0,out:0})}),d.edges().forEach(m=>{let g=p.edge(m.v,m.w)||0,w=h(m),C=g+w;p.setEdge(m.v,m.w,C),v=Math.max(v,p.node(m.v).out+=w),x=Math.max(x,p.node(m.w).in+=w)});let k=c(v+x+3).map(()=>new r),y=x+1;return p.nodes().forEach(m=>{u(k,y,p.node(m))}),{graph:p,buckets:k,zeroIdx:y}}function u(d,h,p){p.out?p.in?d[p.out-p.in+h].enqueue(p):d[d.length-1].enqueue(p):d[0].enqueue(p)}function c(d){let h=[];for(let p=0;p<d;p++)h.push(p);return h}}),st=Pe((e,t)=>{var n=xn().Graph;t.exports={addBorderNode:h,addDummyNode:r,applyWithChunking:v,asNonCompoundGraph:o,buildLayerMatrix:u,intersectRect:a,mapValues:_,maxRank:k,normalizeRanks:c,notime:g,partition:y,pick:A,predecessorWeights:l,range:E,removeEmptyRanks:d,simplify:i,successorWeights:s,time:m,uniqueId:C,zipObject:$};function r(b,O,T,F){for(var L=F;b.hasNode(L);)L=C(F);return T.dummy=O,b.setNode(L,T),L}function i(b){let O=new n().setGraph(b.graph());return b.nodes().forEach(T=>O.setNode(T,b.node(T))),b.edges().forEach(T=>{let F=O.edge(T.v,T.w)||{weight:0,minlen:1},L=b.edge(T);O.setEdge(T.v,T.w,{weight:F.weight+L.weight,minlen:Math.max(F.minlen,L.minlen)})}),O}function o(b){let O=new n({multigraph:b.isMultigraph()}).setGraph(b.graph());return b.nodes().forEach(T=>{b.children(T).length||O.setNode(T,b.node(T))}),b.edges().forEach(T=>{O.setEdge(T,b.edge(T))}),O}function s(b){let O=b.nodes().map(T=>{let F={};return b.outEdges(T).forEach(L=>{F[L.w]=(F[L.w]||0)+b.edge(L).weight}),F});return $(b.nodes(),O)}function l(b){let O=b.nodes().map(T=>{let F={};return b.inEdges(T).forEach(L=>{F[L.v]=(F[L.v]||0)+b.edge(L).weight}),F});return $(b.nodes(),O)}function a(b,O){let T=b.x,F=b.y,L=O.x-T,B=O.y-F,U=b.width/2,W=b.height/2;if(!L&&!B)throw new Error("Not possible to find intersection inside of the rectangle");let P,G;return Math.abs(B)*U>Math.abs(L)*W?(B<0&&(W=-W),P=W*L/B,G=W):(L<0&&(U=-U),P=U,G=U*B/L),{x:T+P,y:F+G}}function u(b){let O=E(k(b)+1).map(()=>[]);return b.nodes().forEach(T=>{let F=b.node(T),L=F.rank;L!==void 0&&(O[L][F.order]=T)}),O}function c(b){let O=b.nodes().map(F=>{let L=b.node(F).rank;return L===void 0?Number.MAX_VALUE:L}),T=v(Math.min,O);b.nodes().forEach(F=>{let L=b.node(F);Object.hasOwn(L,"rank")&&(L.rank-=T)})}function d(b){let O=b.nodes().map(U=>b.node(U).rank).filter(U=>U!==void 0),T=v(Math.min,O),F=[];b.nodes().forEach(U=>{let W=b.node(U).rank-T;F[W]||(F[W]=[]),F[W].push(U)});let L=0,B=b.graph().nodeRankFactor;Array.from(F).forEach((U,W)=>{U===void 0&&W%B!==0?--L:U!==void 0&&L&&U.forEach(P=>b.node(P).rank+=L)})}function h(b,O,T,F){let L={width:0,height:0};return arguments.length>=4&&(L.rank=T,L.order=F),r(b,"border",L,O)}function p(b,O=x){let T=[];for(let F=0;F<b.length;F+=O){let L=b.slice(F,F+O);T.push(L)}return T}var x=65535;function v(b,O){if(O.length>x){let T=p(O);return b.apply(null,T.map(F=>b.apply(null,F)))}else return b.apply(null,O)}function k(b){let O=b.nodes().map(T=>{let F=b.node(T).rank;return F===void 0?Number.MIN_VALUE:F});return v(Math.max,O)}function y(b,O){let T={lhs:[],rhs:[]};return b.forEach(F=>{O(F)?T.lhs.push(F):T.rhs.push(F)}),T}function m(b,O){let T=Date.now();try{return O()}finally{console.log(b+" time: "+(Date.now()-T)+"ms")}}function g(b,O){return O()}var w=0;function C(b){var O=++w;return b+(""+O)}function E(b,O,T=1){O==null&&(O=b,b=0);let F=B=>B<O;T<0&&(F=B=>O<B);let L=[];for(let B=b;F(B);B+=T)L.push(B);return L}function A(b,O){let T={};for(let F of O)b[F]!==void 0&&(T[F]=b[F]);return T}function _(b,O){let T=O;return typeof O=="string"&&(T=F=>F[O]),Object.entries(b).reduce((F,[L,B])=>(F[L]=T(B,L),F),{})}function $(b,O){return b.reduce((T,F,L)=>(T[F]=O[L],T),{})}}),M0=Pe((e,t)=>{var n=R0(),r=st().uniqueId;t.exports={run:i,undo:s};function i(l){(l.graph().acyclicer==="greedy"?n(l,a(l)):o(l)).forEach(u=>{let c=l.edge(u);l.removeEdge(u),c.forwardName=u.name,c.reversed=!0,l.setEdge(u.w,u.v,c,r("rev"))});function a(u){return c=>u.edge(c).weight}}function o(l){let a=[],u={},c={};function d(h){Object.hasOwn(c,h)||(c[h]=!0,u[h]=!0,l.outEdges(h).forEach(p=>{Object.hasOwn(u,p.w)?a.push(p):d(p.w)}),delete u[h])}return l.nodes().forEach(d),a}function s(l){l.edges().forEach(a=>{let u=l.edge(a);if(u.reversed){l.removeEdge(a);let c=u.forwardName;delete u.reversed,delete u.forwardName,l.setEdge(a.w,a.v,u,c)}})}}),P0=Pe((e,t)=>{var n=st();t.exports={run:r,undo:o};function r(s){s.graph().dummyChains=[],s.edges().forEach(l=>i(s,l))}function i(s,l){let a=l.v,u=s.node(a).rank,c=l.w,d=s.node(c).rank,h=l.name,p=s.edge(l),x=p.labelRank;if(d===u+1)return;s.removeEdge(l);let v,k,y;for(y=0,++u;u<d;++y,++u)p.points=[],k={width:0,height:0,edgeLabel:p,edgeObj:l,rank:u},v=n.addDummyNode(s,"edge",k,"_d"),u===x&&(k.width=p.width,k.height=p.height,k.dummy="edge-label",k.labelpos=p.labelpos),s.setEdge(a,v,{weight:p.weight},h),y===0&&s.graph().dummyChains.push(v),a=v;s.setEdge(a,c,{weight:p.weight},h)}function o(s){s.graph().dummyChains.forEach(l=>{let a=s.node(l),u=a.edgeLabel,c;for(s.setEdge(a.edgeObj,u);a.dummy;)c=s.successors(l)[0],s.removeNode(l),u.points.push({x:a.x,y:a.y}),a.dummy==="edge-label"&&(u.x=a.x,u.y=a.y,u.width=a.width,u.height=a.height),l=c,a=s.node(l)})}}),ll=Pe((e,t)=>{var{applyWithChunking:n}=st();t.exports={longestPath:r,slack:i};function r(o){var s={};function l(a){var u=o.node(a);if(Object.hasOwn(s,a))return u.rank;s[a]=!0;let c=o.outEdges(a).map(h=>h==null?Number.POSITIVE_INFINITY:l(h.w)-o.edge(h).minlen);var d=n(Math.min,c);return d===Number.POSITIVE_INFINITY&&(d=0),u.rank=d}o.sources().forEach(l)}function i(o,s){return o.node(s.w).rank-o.node(s.v).rank-o.edge(s).minlen}}),Ty=Pe((e,t)=>{var n=xn().Graph,r=ll().slack;t.exports=i;function i(a){var u=new n({directed:!1}),c=a.nodes()[0],d=a.nodeCount();u.setNode(c,{});for(var h,p;o(u,a)<d;)h=s(u,a),p=u.hasNode(h.v)?r(a,h):-r(a,h),l(u,a,p);return u}function o(a,u){function c(d){u.nodeEdges(d).forEach(h=>{var p=h.v,x=d===p?h.w:p;!a.hasNode(x)&&!r(u,h)&&(a.setNode(x,{}),a.setEdge(d,x,{}),c(x))})}return a.nodes().forEach(c),a.nodeCount()}function s(a,u){return u.edges().reduce((c,d)=>{let h=Number.POSITIVE_INFINITY;return a.hasNode(d.v)!==a.hasNode(d.w)&&(h=r(u,d)),h<c[0]?[h,d]:c},[Number.POSITIVE_INFINITY,null])[1]}function l(a,u,c){a.nodes().forEach(d=>u.node(d).rank+=c)}}),F0=Pe((e,t)=>{var n=Ty(),r=ll().slack,i=ll().longestPath,o=xn().alg.preorder,s=xn().alg.postorder,l=st().simplify;t.exports=a,a.initLowLimValues=h,a.initCutValues=u,a.calcCutValue=d,a.leaveEdge=x,a.enterEdge=v,a.exchangeEdges=k;function a(w){w=l(w),i(w);var C=n(w);h(C),u(C,w);for(var E,A;E=x(C);)A=v(C,w,E),k(C,w,E,A)}function u(w,C){var E=s(w,w.nodes());E=E.slice(0,E.length-1),E.forEach(A=>c(w,C,A))}function c(w,C,E){var A=w.node(E),_=A.parent;w.edge(E,_).cutvalue=d(w,C,E)}function d(w,C,E){var A=w.node(E),_=A.parent,$=!0,b=C.edge(E,_),O=0;return b||($=!1,b=C.edge(_,E)),O=b.weight,C.nodeEdges(E).forEach(T=>{var F=T.v===E,L=F?T.w:T.v;if(L!==_){var B=F===$,U=C.edge(T).weight;if(O+=B?U:-U,m(w,E,L)){var W=w.edge(E,L).cutvalue;O+=B?-W:W}}}),O}function h(w,C){arguments.length<2&&(C=w.nodes()[0]),p(w,{},1,C)}function p(w,C,E,A,_){var $=E,b=w.node(A);return C[A]=!0,w.neighbors(A).forEach(O=>{Object.hasOwn(C,O)||(E=p(w,C,E,O,A))}),b.low=$,b.lim=E++,_?b.parent=_:delete b.parent,E}function x(w){return w.edges().find(C=>w.edge(C).cutvalue<0)}function v(w,C,E){var A=E.v,_=E.w;C.hasEdge(A,_)||(A=E.w,_=E.v);var $=w.node(A),b=w.node(_),O=$,T=!1;$.lim>b.lim&&(O=b,T=!0);var F=C.edges().filter(L=>T===g(w,w.node(L.v),O)&&T!==g(w,w.node(L.w),O));return F.reduce((L,B)=>r(C,B)<r(C,L)?B:L)}function k(w,C,E,A){var _=E.v,$=E.w;w.removeEdge(_,$),w.setEdge(A.v,A.w,{}),h(w),u(w,C),y(w,C)}function y(w,C){var E=w.nodes().find(_=>!C.node(_).parent),A=o(w,E);A=A.slice(1),A.forEach(_=>{var $=w.node(_).parent,b=C.edge(_,$),O=!1;b||(b=C.edge($,_),O=!0),C.node(_).rank=C.node($).rank+(O?b.minlen:-b.minlen)})}function m(w,C,E){return w.hasEdge(C,E)}function g(w,C,E){return E.low<=C.lim&&C.lim<=E.lim}}),D0=Pe((e,t)=>{var n=ll(),r=n.longestPath,i=Ty(),o=F0();t.exports=s;function s(c){var d=c.graph().ranker;if(d instanceof Function)return d(c);switch(c.graph().ranker){case"network-simplex":u(c);break;case"tight-tree":a(c);break;case"longest-path":l(c);break;case"none":break;default:u(c)}}var l=r;function a(c){r(c),i(c)}function u(c){o(c)}}),z0=Pe((e,t)=>{t.exports=n;function n(o){let s=i(o);o.graph().dummyChains.forEach(l=>{let a=o.node(l),u=a.edgeObj,c=r(o,s,u.v,u.w),d=c.path,h=c.lca,p=0,x=d[p],v=!0;for(;l!==u.w;){if(a=o.node(l),v){for(;(x=d[p])!==h&&o.node(x).maxRank<a.rank;)p++;x===h&&(v=!1)}if(!v){for(;p<d.length-1&&o.node(x=d[p+1]).minRank<=a.rank;)p++;x=d[p]}o.setParent(l,x),l=o.successors(l)[0]}})}function r(o,s,l,a){let u=[],c=[],d=Math.min(s[l].low,s[a].low),h=Math.max(s[l].lim,s[a].lim),p,x;p=l;do p=o.parent(p),u.push(p);while(p&&(s[p].low>d||h>s[p].lim));for(x=p,p=a;(p=o.parent(p))!==x;)c.push(p);return{path:u.concat(c.reverse()),lca:x}}function i(o){let s={},l=0;function a(u){let c=l;o.children(u).forEach(a),s[u]={low:c,lim:l++}}return o.children().forEach(a),s}}),B0=Pe((e,t)=>{var n=st();t.exports={run:r,cleanup:l};function r(a){let u=n.addDummyNode(a,"root",{},"_root"),c=o(a),d=Object.values(c),h=n.applyWithChunking(Math.max,d)-1,p=2*h+1;a.graph().nestingRoot=u,a.edges().forEach(v=>a.edge(v).minlen*=p);let x=s(a)+1;a.children().forEach(v=>i(a,u,p,x,h,c,v)),a.graph().nodeRankFactor=p}function i(a,u,c,d,h,p,x){let v=a.children(x);if(!v.length){x!==u&&a.setEdge(u,x,{weight:0,minlen:c});return}let k=n.addBorderNode(a,"_bt"),y=n.addBorderNode(a,"_bb"),m=a.node(x);a.setParent(k,x),m.borderTop=k,a.setParent(y,x),m.borderBottom=y,v.forEach(g=>{i(a,u,c,d,h,p,g);let w=a.node(g),C=w.borderTop?w.borderTop:g,E=w.borderBottom?w.borderBottom:g,A=w.borderTop?d:2*d,_=C!==E?1:h-p[x]+1;a.setEdge(k,C,{weight:A,minlen:_,nestingEdge:!0}),a.setEdge(E,y,{weight:A,minlen:_,nestingEdge:!0})}),a.parent(x)||a.setEdge(u,k,{weight:0,minlen:h+p[x]})}function o(a){var u={};function c(d,h){var p=a.children(d);p&&p.length&&p.forEach(x=>c(x,h+1)),u[d]=h}return a.children().forEach(d=>c(d,1)),u}function s(a){return a.edges().reduce((u,c)=>u+a.edge(c).weight,0)}function l(a){var u=a.graph();a.removeNode(u.nestingRoot),delete u.nestingRoot,a.edges().forEach(c=>{var d=a.edge(c);d.nestingEdge&&a.removeEdge(c)})}}),U0=Pe((e,t)=>{var n=st();t.exports=r;function r(o){function s(l){let a=o.children(l),u=o.node(l);if(a.length&&a.forEach(s),Object.hasOwn(u,"minRank")){u.borderLeft=[],u.borderRight=[];for(let c=u.minRank,d=u.maxRank+1;c<d;++c)i(o,"borderLeft","_bl",l,u,c),i(o,"borderRight","_br",l,u,c)}}o.children().forEach(s)}function i(o,s,l,a,u,c){let d={width:0,height:0,rank:c,borderType:s},h=u[s][c-1],p=n.addDummyNode(o,"border",d,l);u[s][c]=p,o.setParent(p,a),h&&o.setEdge(h,p,{weight:1})}}),H0=Pe((e,t)=>{t.exports={adjust:n,undo:r};function n(c){let d=c.graph().rankdir.toLowerCase();(d==="lr"||d==="rl")&&i(c)}function r(c){let d=c.graph().rankdir.toLowerCase();(d==="bt"||d==="rl")&&s(c),(d==="lr"||d==="rl")&&(a(c),i(c))}function i(c){c.nodes().forEach(d=>o(c.node(d))),c.edges().forEach(d=>o(c.edge(d)))}function o(c){let d=c.width;c.width=c.height,c.height=d}function s(c){c.nodes().forEach(d=>l(c.node(d))),c.edges().forEach(d=>{let h=c.edge(d);h.points.forEach(l),Object.hasOwn(h,"y")&&l(h)})}function l(c){c.y=-c.y}function a(c){c.nodes().forEach(d=>u(c.node(d))),c.edges().forEach(d=>{let h=c.edge(d);h.points.forEach(u),Object.hasOwn(h,"x")&&u(h)})}function u(c){let d=c.x;c.x=c.y,c.y=d}}),W0=Pe((e,t)=>{var n=st();t.exports=r;function r(i){let o={},s=i.nodes().filter(d=>!i.children(d).length),l=s.map(d=>i.node(d).rank),a=n.applyWithChunking(Math.max,l),u=n.range(a+1).map(()=>[]);function c(d){if(o[d])return;o[d]=!0;let h=i.node(d);u[h.rank].push(d),i.successors(d).forEach(c)}return s.sort((d,h)=>i.node(d).rank-i.node(h).rank).forEach(c),u}}),V0=Pe((e,t)=>{var n=st().zipObject;t.exports=r;function r(o,s){let l=0;for(let a=1;a<s.length;++a)l+=i(o,s[a-1],s[a]);return l}function i(o,s,l){let a=n(l,l.map((x,v)=>v)),u=s.flatMap(x=>o.outEdges(x).map(v=>({pos:a[v.w],weight:o.edge(v).weight})).sort((v,k)=>v.pos-k.pos)),c=1;for(;c<l.length;)c<<=1;let d=2*c-1;c-=1;let h=new Array(d).fill(0),p=0;return u.forEach(x=>{let v=x.pos+c;h[v]+=x.weight;let k=0;for(;v>0;)v%2&&(k+=h[v+1]),v=v-1>>1,h[v]+=x.weight;p+=x.weight*k}),p}}),G0=Pe((e,t)=>{t.exports=n;function n(r,i=[]){return i.map(o=>{let s=r.inEdges(o);if(s.length){let l=s.reduce((a,u)=>{let c=r.edge(u),d=r.node(u.v);return{sum:a.sum+c.weight*d.order,weight:a.weight+c.weight}},{sum:0,weight:0});return{v:o,barycenter:l.sum/l.weight,weight:l.weight}}else return{v:o}})}}),K0=Pe((e,t)=>{var n=st();t.exports=r;function r(s,l){let a={};s.forEach((c,d)=>{let h=a[c.v]={indegree:0,in:[],out:[],vs:[c.v],i:d};c.barycenter!==void 0&&(h.barycenter=c.barycenter,h.weight=c.weight)}),l.edges().forEach(c=>{let d=a[c.v],h=a[c.w];d!==void 0&&h!==void 0&&(h.indegree++,d.out.push(a[c.w]))});let u=Object.values(a).filter(c=>!c.indegree);return i(u)}function i(s){let l=[];function a(c){return d=>{d.merged||(d.barycenter===void 0||c.barycenter===void 0||d.barycenter>=c.barycenter)&&o(c,d)}}function u(c){return d=>{d.in.push(c),--d.indegree===0&&s.push(d)}}for(;s.length;){let c=s.pop();l.push(c),c.in.reverse().forEach(a(c)),c.out.forEach(u(c))}return l.filter(c=>!c.merged).map(c=>n.pick(c,["vs","i","barycenter","weight"]))}function o(s,l){let a=0,u=0;s.weight&&(a+=s.barycenter*s.weight,u+=s.weight),l.weight&&(a+=l.barycenter*l.weight,u+=l.weight),s.vs=l.vs.concat(s.vs),s.barycenter=a/u,s.weight=u,s.i=Math.min(l.i,s.i),l.merged=!0}}),q0=Pe((e,t)=>{var n=st();t.exports=r;function r(s,l){let a=n.partition(s,k=>Object.hasOwn(k,"barycenter")),u=a.lhs,c=a.rhs.sort((k,y)=>y.i-k.i),d=[],h=0,p=0,x=0;u.sort(o(!!l)),x=i(d,c,x),u.forEach(k=>{x+=k.vs.length,d.push(k.vs),h+=k.barycenter*k.weight,p+=k.weight,x=i(d,c,x)});let v={vs:d.flat(!0)};return p&&(v.barycenter=h/p,v.weight=p),v}function i(s,l,a){let u;for(;l.length&&(u=l[l.length-1]).i<=a;)l.pop(),s.push(u.vs),a++;return a}function o(s){return(l,a)=>l.barycenter<a.barycenter?-1:l.barycenter>a.barycenter?1:s?a.i-l.i:l.i-a.i}}),Y0=Pe((e,t)=>{var n=G0(),r=K0(),i=q0();t.exports=o;function o(a,u,c,d){let h=a.children(u),p=a.node(u),x=p?p.borderLeft:void 0,v=p?p.borderRight:void 0,k={};x&&(h=h.filter(w=>w!==x&&w!==v));let y=n(a,h);y.forEach(w=>{if(a.children(w.v).length){let C=o(a,w.v,c,d);k[w.v]=C,Object.hasOwn(C,"barycenter")&&l(w,C)}});let m=r(y,c);s(m,k);let g=i(m,d);if(x&&(g.vs=[x,g.vs,v].flat(!0),a.predecessors(x).length)){let w=a.node(a.predecessors(x)[0]),C=a.node(a.predecessors(v)[0]);Object.hasOwn(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+w.order+C.order)/(g.weight+2),g.weight+=2}return g}function s(a,u){a.forEach(c=>{c.vs=c.vs.flatMap(d=>u[d]?u[d].vs:d)})}function l(a,u){a.barycenter!==void 0?(a.barycenter=(a.barycenter*a.weight+u.barycenter*u.weight)/(a.weight+u.weight),a.weight+=u.weight):(a.barycenter=u.barycenter,a.weight=u.weight)}}),X0=Pe((e,t)=>{var n=xn().Graph,r=st();t.exports=i;function i(s,l,a,u){u||(u=s.nodes());let c=o(s),d=new n({compound:!0}).setGraph({root:c}).setDefaultNodeLabel(h=>s.node(h));return u.forEach(h=>{let p=s.node(h),x=s.parent(h);(p.rank===l||p.minRank<=l&&l<=p.maxRank)&&(d.setNode(h),d.setParent(h,x||c),s[a](h).forEach(v=>{let k=v.v===h?v.w:v.v,y=d.edge(k,h),m=y!==void 0?y.weight:0;d.setEdge(k,h,{weight:s.edge(v).weight+m})}),Object.hasOwn(p,"minRank")&&d.setNode(h,{borderLeft:p.borderLeft[l],borderRight:p.borderRight[l]}))}),d}function o(s){for(var l;s.hasNode(l=r.uniqueId("_root")););return l}}),Q0=Pe((e,t)=>{t.exports=n;function n(r,i,o){let s={},l;o.forEach(a=>{let u=r.parent(a),c,d;for(;u;){if(c=r.parent(u),c?(d=s[c],s[c]=u):(d=l,l=u),d&&d!==u){i.setEdge(d,u);return}u=c}})}}),Z0=Pe((e,t)=>{var n=W0(),r=V0(),i=Y0(),o=X0(),s=Q0(),l=xn().Graph,a=st();t.exports=u;function u(p,x={}){if(typeof x.customOrder=="function"){x.customOrder(p,u);return}let v=a.maxRank(p),k=c(p,a.range(1,v+1),"inEdges"),y=c(p,a.range(v-1,-1,-1),"outEdges"),m=n(p);if(h(p,m),x.disableOptimalOrderHeuristic)return;let g=Number.POSITIVE_INFINITY,w,C=x.constraints||[];for(let E=0,A=0;A<4;++E,++A){d(E%2?k:y,E%4>=2,C),m=a.buildLayerMatrix(p);let _=r(p,m);_<g?(A=0,w=Object.assign({},m),g=_):_===g&&(w=structuredClone(m))}h(p,w)}function c(p,x,v){let k=new Map,y=(m,g)=>{k.has(m)||k.set(m,[]),k.get(m).push(g)};for(let m of p.nodes()){let g=p.node(m);if(typeof g.rank=="number"&&y(g.rank,m),typeof g.minRank=="number"&&typeof g.maxRank=="number")for(let w=g.minRank;w<=g.maxRank;w++)w!==g.rank&&y(w,m)}return x.map(function(m){return o(p,m,v,k.get(m)||[])})}function d(p,x,v){let k=new l;p.forEach(function(y){v.forEach(w=>k.setEdge(w.left,w.right));let m=y.graph().root,g=i(y,m,k,x);g.vs.forEach((w,C)=>y.node(w).order=C),s(y,k,g.vs)})}function h(p,x){Object.values(x).forEach(v=>v.forEach((k,y)=>p.node(k).order=y))}}),J0=Pe((e,t)=>{var n=xn().Graph,r=st();t.exports={positionX:v,findType1Conflicts:i,findType2Conflicts:o,addConflict:l,hasConflict:a,verticalAlignment:u,horizontalCompaction:c,alignCoordinates:p,findSmallestWidthAlignment:h,balance:x};function i(m,g){let w={};function C(E,A){let _=0,$=0,b=E.length,O=A[A.length-1];return A.forEach((T,F)=>{let L=s(m,T),B=L?m.node(L).order:b;(L||T===O)&&(A.slice($,F+1).forEach(U=>{m.predecessors(U).forEach(W=>{let P=m.node(W),G=P.order;(G<_||B<G)&&!(P.dummy&&m.node(U).dummy)&&l(w,W,U)})}),$=F+1,_=B)}),A}return g.length&&g.reduce(C),w}function o(m,g){let w={};function C(A,_,$,b,O){let T;r.range(_,$).forEach(F=>{T=A[F],m.node(T).dummy&&m.predecessors(T).forEach(L=>{let B=m.node(L);B.dummy&&(B.order<b||B.order>O)&&l(w,L,T)})})}function E(A,_){let $=-1,b,O=0;return _.forEach((T,F)=>{if(m.node(T).dummy==="border"){let L=m.predecessors(T);L.length&&(b=m.node(L[0]).order,C(_,O,F,$,b),O=F,$=b)}C(_,O,_.length,b,A.length)}),_}return g.length&&g.reduce(E),w}function s(m,g){if(m.node(g).dummy)return m.predecessors(g).find(w=>m.node(w).dummy)}function l(m,g,w){if(g>w){let E=g;g=w,w=E}let C=m[g];C||(m[g]=C={}),C[w]=!0}function a(m,g,w){if(g>w){let C=g;g=w,w=C}return!!m[g]&&Object.hasOwn(m[g],w)}function u(m,g,w,C){let E={},A={},_={};return g.forEach($=>{$.forEach((b,O)=>{E[b]=b,A[b]=b,_[b]=O})}),g.forEach($=>{let b=-1;$.forEach(O=>{let T=C(O);if(T.length){T=T.sort((L,B)=>_[L]-_[B]);let F=(T.length-1)/2;for(let L=Math.floor(F),B=Math.ceil(F);L<=B;++L){let U=T[L];A[O]===O&&b<_[U]&&!a(w,O,U)&&(A[U]=O,A[O]=E[O]=E[U],b=_[U])}}})}),{root:E,align:A}}function c(m,g,w,C,E){let A={},_=d(m,g,w,E),$=E?"borderLeft":"borderRight";function b(F,L){let B=_.nodes().slice(),U={},W=B.pop();for(;W;){if(U[W])F(W);else{U[W]=!0,B.push(W);for(let P of L(W))B.push(P)}W=B.pop()}}function O(F){A[F]=_.inEdges(F).reduce((L,B)=>Math.max(L,A[B.v]+_.edge(B)),0)}function T(F){let L=_.outEdges(F).reduce((U,W)=>Math.min(U,A[W.w]-_.edge(W)),Number.POSITIVE_INFINITY),B=m.node(F);L!==Number.POSITIVE_INFINITY&&B.borderType!==$&&(A[F]=Math.max(A[F],L))}return b(O,_.predecessors.bind(_)),b(T,_.successors.bind(_)),Object.keys(C).forEach(F=>A[F]=A[w[F]]),A}function d(m,g,w,C){let E=new n,A=m.graph(),_=k(A.nodesep,A.edgesep,C);return g.forEach($=>{let b;$.forEach(O=>{let T=w[O];if(E.setNode(T),b){var F=w[b],L=E.edge(F,T);E.setEdge(F,T,Math.max(_(m,O,b),L||0))}b=O})}),E}function h(m,g){return Object.values(g).reduce((w,C)=>{let E=Number.NEGATIVE_INFINITY,A=Number.POSITIVE_INFINITY;Object.entries(C).forEach(([$,b])=>{let O=y(m,$)/2;E=Math.max(b+O,E),A=Math.min(b-O,A)});let _=E-A;return _<w[0]&&(w=[_,C]),w},[Number.POSITIVE_INFINITY,null])[1]}function p(m,g){let w=Object.values(g),C=r.applyWithChunking(Math.min,w),E=r.applyWithChunking(Math.max,w);["u","d"].forEach(A=>{["l","r"].forEach(_=>{let $=A+_,b=m[$];if(b===g)return;let O=Object.values(b),T=C-r.applyWithChunking(Math.min,O);_!=="l"&&(T=E-r.applyWithChunking(Math.max,O)),T&&(m[$]=r.mapValues(b,F=>F+T))})})}function x(m,g){return r.mapValues(m.ul,(w,C)=>{if(g)return m[g.toLowerCase()][C];{let E=Object.values(m).map(A=>A[C]).sort((A,_)=>A-_);return(E[1]+E[2])/2}})}function v(m){let g=r.buildLayerMatrix(m),w=Object.assign(i(m,g),o(m,g)),C={},E;["u","d"].forEach(_=>{E=_==="u"?g:Object.values(g).reverse(),["l","r"].forEach($=>{$==="r"&&(E=E.map(F=>Object.values(F).reverse()));let b=(_==="u"?m.predecessors:m.successors).bind(m),O=u(m,E,w,b),T=c(m,E,O.root,O.align,$==="r");$==="r"&&(T=r.mapValues(T,F=>-F)),C[_+$]=T})});let A=h(m,C);return p(C,A),x(C,m.graph().align)}function k(m,g,w){return(C,E,A)=>{let _=C.node(E),$=C.node(A),b=0,O;if(b+=_.width/2,Object.hasOwn(_,"labelpos"))switch(_.labelpos.toLowerCase()){case"l":O=-_.width/2;break;case"r":O=_.width/2;break}if(O&&(b+=w?O:-O),O=0,b+=(_.dummy?g:m)/2,b+=($.dummy?g:m)/2,b+=$.width/2,Object.hasOwn($,"labelpos"))switch($.labelpos.toLowerCase()){case"l":O=$.width/2;break;case"r":O=-$.width/2;break}return O&&(b+=w?O:-O),O=0,b}}function y(m,g){return m.node(g).width}}),eb=Pe((e,t)=>{var n=st(),r=J0().positionX;t.exports=i;function i(s){s=n.asNonCompoundGraph(s),o(s),Object.entries(r(s)).forEach(([l,a])=>s.node(l).x=a)}function o(s){let l=n.buildLayerMatrix(s),a=s.graph().ranksep,u=s.graph().rankalign,c=0;l.forEach(d=>{let h=d.reduce((p,x)=>{let v=s.node(x).height;return p>v?p:v},0);d.forEach(p=>{let x=s.node(p);u==="top"?x.y=c+x.height/2:u==="bottom"?x.y=c+h-x.height/2:x.y=c+h/2}),c+=h+a})}}),tb=Pe((e,t)=>{var n=M0(),r=P0(),i=D0(),o=st().normalizeRanks,s=z0(),l=st().removeEmptyRanks,a=B0(),u=U0(),c=H0(),d=Z0(),h=eb(),p=st(),x=xn().Graph;t.exports=v;function v(I,M={}){let H=M.debugTiming?p.time:p.notime;return H("layout",()=>{let K=H(" buildLayoutGraph",()=>b(I));return H(" runLayout",()=>k(K,H,M)),H(" updateInputGraph",()=>y(I,K)),K})}function k(I,M,H){M(" makeSpaceForEdgeLabels",()=>O(I)),M(" removeSelfEdges",()=>S(I)),M(" acyclic",()=>n.run(I)),M(" nestingGraph.run",()=>a.run(I)),M(" rank",()=>i(p.asNonCompoundGraph(I))),M(" injectEdgeLabelProxies",()=>T(I)),M(" removeEmptyRanks",()=>l(I)),M(" nestingGraph.cleanup",()=>a.cleanup(I)),M(" normalizeRanks",()=>o(I)),M(" assignRankMinMax",()=>F(I)),M(" removeEdgeLabelProxies",()=>L(I)),M(" normalize.run",()=>r.run(I)),M(" parentDummyChains",()=>s(I)),M(" addBorderSegments",()=>u(I)),M(" order",()=>d(I,H)),M(" insertSelfEdges",()=>Y(I)),M(" adjustCoordinateSystem",()=>c.adjust(I)),M(" position",()=>h(I)),M(" positionSelfEdges",()=>Z(I)),M(" removeBorderNodes",()=>G(I)),M(" normalize.undo",()=>r.undo(I)),M(" fixupEdgeLabelCoords",()=>W(I)),M(" undoCoordinateSystem",()=>c.undo(I)),M(" translateGraph",()=>B(I)),M(" assignNodeIntersects",()=>U(I)),M(" reversePoints",()=>P(I)),M(" acyclic.undo",()=>n.undo(I))}function y(I,M){I.nodes().forEach(H=>{let K=I.node(H),J=M.node(H);K&&(K.x=J.x,K.y=J.y,K.order=J.order,K.rank=J.rank,M.children(H).length&&(K.width=J.width,K.height=J.height))}),I.edges().forEach(H=>{let K=I.edge(H),J=M.edge(H);K.points=J.points,Object.hasOwn(J,"x")&&(K.x=J.x,K.y=J.y)}),I.graph().width=M.graph().width,I.graph().height=M.graph().height}var m=["nodesep","edgesep","ranksep","marginx","marginy"],g={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb",rankalign:"center"},w=["acyclicer","ranker","rankdir","align","rankalign"],C=["width","height","rank"],E={width:0,height:0},A=["minlen","weight","width","height","labeloffset"],_={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},$=["labelpos"];function b(I){let M=new x({multigraph:!0,compound:!0}),H=R(I.graph());return M.setGraph(Object.assign({},g,j(H,m),p.pick(H,w))),I.nodes().forEach(K=>{let J=R(I.node(K)),D=j(J,C);Object.keys(E).forEach(ee=>{D[ee]===void 0&&(D[ee]=E[ee])}),M.setNode(K,D),M.setParent(K,I.parent(K))}),I.edges().forEach(K=>{let J=R(I.edge(K));M.setEdge(K,Object.assign({},_,j(J,A),p.pick(J,$)))}),M}function O(I){let M=I.graph();M.ranksep/=2,I.edges().forEach(H=>{let K=I.edge(H);K.minlen*=2,K.labelpos.toLowerCase()!=="c"&&(M.rankdir==="TB"||M.rankdir==="BT"?K.width+=K.labeloffset:K.height+=K.labeloffset)})}function T(I){I.edges().forEach(M=>{let H=I.edge(M);if(H.width&&H.height){let K=I.node(M.v),J={rank:(I.node(M.w).rank-K.rank)/2+K.rank,e:M};p.addDummyNode(I,"edge-proxy",J,"_ep")}})}function F(I){let M=0;I.nodes().forEach(H=>{let K=I.node(H);K.borderTop&&(K.minRank=I.node(K.borderTop).rank,K.maxRank=I.node(K.borderBottom).rank,M=Math.max(M,K.maxRank))}),I.graph().maxRank=M}function L(I){I.nodes().forEach(M=>{let H=I.node(M);H.dummy==="edge-proxy"&&(I.edge(H.e).labelRank=H.rank,I.removeNode(M))})}function B(I){let M=Number.POSITIVE_INFINITY,H=0,K=Number.POSITIVE_INFINITY,J=0,D=I.graph(),ee=D.marginx||0,ue=D.marginy||0;function Fe(_e){let Te=_e.x,lt=_e.y,V=_e.width,te=_e.height;M=Math.min(M,Te-V/2),H=Math.max(H,Te+V/2),K=Math.min(K,lt-te/2),J=Math.max(J,lt+te/2)}I.nodes().forEach(_e=>Fe(I.node(_e))),I.edges().forEach(_e=>{let Te=I.edge(_e);Object.hasOwn(Te,"x")&&Fe(Te)}),M-=ee,K-=ue,I.nodes().forEach(_e=>{let Te=I.node(_e);Te.x-=M,Te.y-=K}),I.edges().forEach(_e=>{let Te=I.edge(_e);Te.points.forEach(lt=>{lt.x-=M,lt.y-=K}),Object.hasOwn(Te,"x")&&(Te.x-=M),Object.hasOwn(Te,"y")&&(Te.y-=K)}),D.width=H-M+ee,D.height=J-K+ue}function U(I){I.edges().forEach(M=>{let H=I.edge(M),K=I.node(M.v),J=I.node(M.w),D,ee;H.points?(D=H.points[0],ee=H.points[H.points.length-1]):(H.points=[],D=J,ee=K),H.points.unshift(p.intersectRect(K,D)),H.points.push(p.intersectRect(J,ee))})}function W(I){I.edges().forEach(M=>{let H=I.edge(M);if(Object.hasOwn(H,"x"))switch((H.labelpos==="l"||H.labelpos==="r")&&(H.width-=H.labeloffset),H.labelpos){case"l":H.x-=H.width/2+H.labeloffset;break;case"r":H.x+=H.width/2+H.labeloffset;break}})}function P(I){I.edges().forEach(M=>{let H=I.edge(M);H.reversed&&H.points.reverse()})}function G(I){I.nodes().forEach(M=>{if(I.children(M).length){let H=I.node(M),K=I.node(H.borderTop),J=I.node(H.borderBottom),D=I.node(H.borderLeft[H.borderLeft.length-1]),ee=I.node(H.borderRight[H.borderRight.length-1]);H.width=Math.abs(ee.x-D.x),H.height=Math.abs(J.y-K.y),H.x=D.x+H.width/2,H.y=K.y+H.height/2}}),I.nodes().forEach(M=>{I.node(M).dummy==="border"&&I.removeNode(M)})}function S(I){I.edges().forEach(M=>{if(M.v===M.w){var H=I.node(M.v);H.selfEdges||(H.selfEdges=[]),H.selfEdges.push({e:M,label:I.edge(M)}),I.removeEdge(M)}})}function Y(I){var M=p.buildLayerMatrix(I);M.forEach(H=>{var K=0;H.forEach((J,D)=>{var ee=I.node(J);ee.order=D+K,(ee.selfEdges||[]).forEach(ue=>{p.addDummyNode(I,"selfedge",{width:ue.label.width,height:ue.label.height,rank:ee.rank,order:D+ ++K,e:ue.e,label:ue.label},"_se")}),delete ee.selfEdges})})}function Z(I){I.nodes().forEach(M=>{var H=I.node(M);if(H.dummy==="selfedge"){var K=I.node(H.e.v),J=K.x+K.width/2,D=K.y,ee=H.x-J,ue=K.height/2;I.setEdge(H.e,H.label),I.removeNode(M),H.label.points=[{x:J+2*ee/3,y:D-ue},{x:J+5*ee/6,y:D-ue},{x:J+ee,y:D},{x:J+5*ee/6,y:D+ue},{x:J+2*ee/3,y:D+ue}],H.label.x=H.x,H.label.y=H.y}})}function j(I,M){return p.mapValues(p.pick(I,M),Number)}function R(I){var M={};return I&&Object.entries(I).forEach(([H,K])=>{typeof H=="string"&&(H=H.toLowerCase()),M[H]=K}),M}}),nb=Pe((e,t)=>{var n=st(),r=xn().Graph;t.exports={debugOrdering:i};function i(o){let s=n.buildLayerMatrix(o),l=new r({compound:!0,multigraph:!0}).setGraph({});return o.nodes().forEach(a=>{l.setNode(a,{label:a}),l.setParent(a,"layer"+o.node(a).rank)}),o.edges().forEach(a=>l.setEdge(a.v,a.w,{},a.name)),s.forEach((a,u)=>{let c="layer"+u;l.setNode(c,{rank:"same"}),a.reduce((d,h)=>(l.setEdge(d,h,{style:"invis"}),h))}),l}}),rb=Pe((e,t)=>{t.exports="2.0.4"}),ib=Pe((e,t)=>{t.exports={graphlib:xn(),layout:tb(),debug:nb(),util:{time:st().time,notime:st().notime},version:rb()}});const Ep=ib();/*! For license information please see dagre.esm.js.LEGAL.txt */const pi=28,Cr=20,$y=20,Sa=10,ob=150;function sb(e,t){if(t==="all")return e.map(o=>({table:o,neighbor:!1}));const n=e.filter(o=>o.status!=="unchanged"),r=new Set(n.map(o=>o.name)),i=new Set;for(const o of n)for(const s of o.foreignKeys)r.has(s.table)||i.add(s.table);return e.filter(o=>r.has(o.name)||i.has(o.name)).map(o=>({table:o,neighbor:i.has(o.name)}))}function lb(e,t,n){const r=new Set(e.foreignKeys.flatMap(l=>l.columns)),i=l=>n||l.status!=="unchanged"||l.primary||r.has(l.name)||l.values||t.has(l.name),o=e.columns.filter(i).map(l=>({kind:"column",column:l,fk:r.has(l.name)})),s=e.columns.length-o.length;return s>0&&o.push({kind:"more",hidden:s}),o}function ab(e){const t=[];return e.otherChanges.constraints&&t.push(`制約 ${e.otherChanges.constraints}`),e.otherChanges.indexes&&t.push(`インデックス ${e.otherChanges.indexes}`),e.otherChanges.comment&&t.push("コメント"),t.length?`${t.join("・")} の変更`:void 0}function Ly(e){return{name:e.name,type:e.beforeType?`${e.beforeType} → ${e.type}`:e.type}}function ub(e,t,n,r){const i=sb(e,t),o=new Set(i.map(v=>v.table.name)),s=new Map;for(const{table:v}of i)for(const k of v.foreignKeys){if(!o.has(k.table))continue;const y=s.get(k.table)??new Set;k.refColumns.forEach(m=>y.add(m)),s.set(k.table,y)}const l=new Ep.graphlib.Graph({compound:!0,multigraph:!0});l.setGraph({rankdir:"LR",nodesep:28,ranksep:90,marginx:20,marginy:20}),l.setDefaultEdgeLabel(()=>({}));const a=i.map(({table:v,neighbor:k})=>{const y=lb(v,s.get(v.name)??new Set,n.has(v.name)),m=ab(v);let g=Math.max(ob,r(v.name,!0)+Sa*2+24);for(const C of y){if(C.kind==="more")continue;const E=Ly(C.column);g=Math.max(g,18+r(E.name)+16+r(E.type)+34+Sa*2)}m&&(g=Math.max(g,r(m)+Sa*2));const w=pi+y.length*Cr+(m?$y:0)+4;return{table:v,neighbor:k,rows:y,footer:m,x:0,y:0,width:Math.ceil(g),height:w}}),u=[...new Set(a.map(v=>v.table.schema))];for(const v of u)l.setNode(`schema:${v}`,{label:v,paddingTop:26});for(const v of a)l.setNode(v.table.name,{width:v.width,height:v.height}),l.setParent(v.table.name,`schema:${v.table.schema}`);const c=[];for(const v of a)for(const k of v.table.foreignKeys){if(!o.has(k.table))continue;const y=a.find(g=>g.table.name===k.table),m=(g,w)=>!!w&&g.rows.some(C=>C.kind==="column"&&C.column.name===w);c.push({fk:k,from:v.table.name,to:k.table,fromColumn:m(v,k.columns[0])?k.columns[0]:void 0,toColumn:m(y,k.refColumns[0])?k.refColumns[0]:void 0,points:[]}),k.table!==v.table.name&&l.setEdge(v.table.name,k.table,{},k.name)}Ep.layout(l);for(const v of a){const k=l.node(v.table.name);v.x=k.x-v.width/2,v.y=k.y-v.height/2}const d=u.map(v=>{const k=l.node(`schema:${v}`);return{schema:v,x:k.x-k.width/2,y:k.y-k.height/2,width:k.width,height:k.height}}),h=new Map(a.map(v=>[v.table.name,v]));for(const v of c)v.points=cb(h.get(v.from),v.fromColumn,h.get(v.to),v.toColumn);const p=Math.max(0,...a.map(v=>v.x+v.width),...d.map(v=>v.x+v.width)),x=Math.max(0,...a.map(v=>v.y+v.height),...d.map(v=>v.y+v.height));return{tables:a,edges:c,groups:d,width:p+20,height:x+20}}function Sp(e,t){const n=t?e.rows.findIndex(r=>r.kind==="column"&&r.column.name===t):-1;return n<0?e.y+pi/2:e.y+pi+n*Cr+Cr/2}function cb(e,t,n,r){const i=Sp(e,t),o=Sp(n,r);if(e===n){const d=e.x+e.width;return[{x:d,y:i},{x:d+28,y:i},{x:d+28,y:o},{x:d,y:o}]}const s=e.x+e.width/2,a=n.x+n.width/2>=s,u=a?e.x+e.width:e.x,c=a?n.x:n.x+n.width;return[{x:u,y:i},{x:c,y:o}]}function db(e){if(e.length!==2)return`M ${e.map(i=>`${i.x} ${i.y}`).join(" L ")}`;const[t,n]=e,r=Math.max(30,Math.abs(n.x-t.x)/2)*(n.x>=t.x?1:-1);return`M ${t.x} ${t.y} C ${t.x+r} ${t.y}, ${n.x-r} ${n.y}, ${n.x} ${n.y}`}const fb={added:"+",removed:"−",modified:"~",unchanged:""},Iy="12px ui-monospace, SFMono-Regular, Menlo, monospace",pb=`600 ${Iy}`;function hb(){return z.useMemo(()=>{const e=document.createElement("canvas").getContext("2d");return(t,n)=>e?(e.font=n?pb:Iy,e.measureText(t).width):t.length*7.4},[])}const mb=z.forwardRef(function({tables:t,mode:n,values:r,selected:i,reviewed:o,comments:s,onSelect:l},a){const u=hb(),[c,d]=z.useState(new Set),[h,p]=z.useState(null),[x,v]=z.useState({x:0,y:0,k:1}),k=z.useRef(null),y=z.useRef(null),m=z.useMemo(()=>ub(t,n,c,u),[t,n,c,u]),g=z.useMemo(()=>new Map(m.tables.map($=>[$.table.name,$])),[m]),w=z.useRef(!1),C=z.useCallback(()=>{const $=k.current;if(!$||m.width===0)return;if($.clientWidth===0||$.clientHeight===0){w.current=!0;return}w.current=!1;const b=Math.min(1.2,Math.max(.2,Math.min($.clientWidth/m.width,$.clientHeight/m.height)));v({k:b,x:($.clientWidth-m.width*b)/2,y:Math.max(0,($.clientHeight-m.height*b)/2)})},[m]),E=m.tables.map($=>$.table.name).join("|");z.useEffect(()=>{C()},[E]),z.useEffect(()=>{const $=k.current;if(!$)return;const b=new ResizeObserver(()=>{w.current&&C()});return b.observe($),()=>b.disconnect()},[C]);const A=z.useCallback(($,b,O)=>{v(T=>{const F=Math.min(3,Math.max(.15,T.k*$));return{k:F,x:b-(b-T.x)*F/T.k,y:O-(O-T.y)*F/T.k}})},[]);z.useImperativeHandle(a,()=>({fit:C,zoom:$=>{const b=k.current;b&&A($,b.clientWidth/2,b.clientHeight/2)},focus:$=>{const b=g.get($),O=k.current;!b||!O||v(T=>({...T,x:O.clientWidth/2-(b.x+b.width/2)*T.k,y:O.clientHeight/3-(b.y+Math.min(b.height,200)/2)*T.k}))}}),[C,A,g]),z.useEffect(()=>{const $=k.current;if(!$)return;const b=O=>{O.preventDefault();const T=$.getBoundingClientRect();O.ctrlKey||O.metaKey?A(Math.exp(-O.deltaY*.01),O.clientX-T.left,O.clientY-T.top):v(F=>({...F,x:F.x-O.deltaX,y:F.y-O.deltaY}))};return $.addEventListener("wheel",b,{passive:!1}),()=>$.removeEventListener("wheel",b)},[A]);const _=$=>h===$||i===$;return f.jsx("div",{ref:k,className:"er",onPointerDown:$=>{$.button===0&&(y.current={x:$.clientX,y:$.clientY,vx:x.x,vy:x.y,moved:!1,target:$.target},$.currentTarget.setPointerCapture($.pointerId))},onPointerMove:$=>{const b=y.current;b&&(Math.abs($.clientX-b.x)+Math.abs($.clientY-b.y)>3&&(b.moved=!0),b.moved&&v(O=>({...O,x:b.vx+$.clientX-b.x,y:b.vy+$.clientY-b.y})))},onPointerUp:()=>{const $=y.current;if(y.current=null,$&&!$.moved){const b=$.target.closest("[data-table]"),O=$.target.closest("[data-more]");if(O){const T=O.getAttribute("data-more");d(F=>{const L=new Set(F);return L.has(T)?L.delete(T):L.add(T),L})}else l(b?b.getAttribute("data-table"):null)}},children:m.tables.length===0?f.jsx("div",{className:"er-empty",children:"表示するテーブルはありません"}):f.jsxs("svg",{width:"100%",height:"100%",children:[f.jsx("defs",{children:["added","removed","modified","unchanged"].map($=>f.jsx("marker",{id:`arrow-${$}`,viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"7",markerHeight:"7",orient:"auto-start-reverse",children:f.jsx("path",{d:"M0,0 L10,5 L0,10 z",className:`arrow ${$}`})},$))}),f.jsxs("g",{transform:`translate(${x.x} ${x.y}) scale(${x.k})`,children:[m.groups.map($=>f.jsxs("g",{className:"er-group",children:[f.jsx("rect",{x:$.x,y:$.y,width:$.width,height:$.height,rx:8}),f.jsx("text",{x:$.x+10,y:$.y+17,children:$.schema})]},$.schema)),m.edges.map($=>{const b=_($.from)||_($.to);return f.jsx("path",{d:db($.points),className:`er-edge ${$.fk.status} ${b?"lit":""} ${h||i?b?"":"dim":""}`,markerEnd:`url(#arrow-${$.fk.status})`,children:f.jsxs("title",{children:[$.fk.name,": ",$.from,".",$.fk.columns.join(", ")," → ",$.to,".",$.fk.refColumns.join(", ")]})},`${$.from}:${$.fk.name}`)}),m.tables.map($=>f.jsx(gb,{t:$,values:r,selected:i===$.table.name,reviewed:o.has($.table.name),comments:s.tables.get($.table.name)??0,commented:s.columns,expanded:c.has($.table.name),onHover:p},$.table.name))]})]})})});function gb({t:e,values:t,selected:n,reviewed:r,comments:i,commented:o,expanded:s,onHover:l}){const a=e.table.status;return f.jsxs("g",{className:`er-table ${a} ${e.neighbor?"neighbor":""} ${n?"selected":""} ${r?"reviewed":""}`,"data-table":e.table.name,transform:`translate(${e.x} ${e.y})`,onPointerEnter:()=>l(e.table.name),onPointerLeave:()=>l(null),children:[f.jsx("rect",{className:"er-box",width:e.width,height:e.height,rx:6}),f.jsx("rect",{className:"er-head",width:e.width,height:pi,rx:6}),f.jsx("rect",{className:"er-head-fill",y:pi-6,width:e.width,height:6}),f.jsxs("text",{className:"er-title",x:10,y:18,children:[f.jsxs("tspan",{className:"er-schema",children:[e.table.schema,"."]}),f.jsx("tspan",{children:e.table.table})]}),r&&f.jsx("text",{className:"er-check",x:e.width-(i>0?24:10),y:18,textAnchor:"end",children:"✓"}),e.rows.map((u,c)=>{const d=pi+c*Cr;if(u.kind==="more")return f.jsxs("g",{className:"er-more","data-more":e.table.name,children:[f.jsx("rect",{y:d,width:e.width,height:Cr}),f.jsx("text",{x:10,y:d+14,children:s?"▴ たたむ":`▸ 他 ${u.hidden} カラム`})]},"more");const h=u.column,p=Ly(h),x=t.get(`${e.table.name}.${h.name}`);return f.jsxs("g",{className:`er-row ${h.status}`,children:[f.jsx("rect",{y:d,width:e.width,height:Cr}),f.jsx("text",{x:8,y:d+14,className:`er-mark ${h.status}`,children:fb[h.status]}),f.jsxs("text",{x:20,y:d+14,className:"er-col",children:[h.primary&&f.jsx("tspan",{className:"er-key",children:"◆ "}),p.name]}),f.jsxs("text",{x:e.width-10,y:d+14,textAnchor:"end",className:"er-type",children:[u.fk&&f.jsx("tspan",{className:"er-fk",children:"FK "}),h.values&&f.jsx("tspan",{className:"er-values",children:"値± "}),h.beforeType?f.jsxs(f.Fragment,{children:[f.jsx("tspan",{className:"er-before",children:h.beforeType}),f.jsxs("tspan",{children:[" → ",h.type]})]}):h.type,h.notNull?"":f.jsx("tspan",{className:"er-null",children:"?"})]}),o.has(`${e.table.name}.${h.name}`)&&f.jsx("circle",{className:"er-cdot",cx:e.width-4,cy:d+Cr/2,r:2.5}),x&&f.jsx("title",{children:x})]},h.name)}),i>0&&f.jsxs("g",{className:"er-cbadge",transform:`translate(${e.width-4} 0)`,children:[f.jsxs("title",{children:["コメント ",i," 件"]}),f.jsx("rect",{x:-17,y:-9,width:34,height:18,rx:9}),f.jsx(Ti,{size:10,x:-11,y:-5}),f.jsx("text",{x:4,y:4,textAnchor:"middle",children:i})]}),e.footer&&f.jsx("text",{className:"er-footer",x:10,y:e.height-$y/2-1,children:e.footer})]})}const oi={side:260,panel:440},Cp=180,Np=320,jp=320,Ay="dbshape.layout";function yb(){const e=jn(Ay,{});return{side:typeof e.side=="number"&&e.side>0?e.side:oi.side,panel:typeof e.panel=="number"&&e.panel>0?e.panel:oi.panel}}const cs=e=>hn(Ay,e);function ds(e,t,n){const r=Mr*(n?2:1);let i=e.panel;n&&(i=Math.max(jp,Math.min(i,t-r-Cp-Np)));const o=t-r-(n?i:0);return{side:Math.max(Cp,Math.min(e.side,o-Np)),panel:Math.max(jp,i)}}function xb(e,t){return[`${e.side}px`,`${Mr}px`,"minmax(0, 1fr)",...t?[`${Mr}px`,`${e.panel}px`]:[]].join(" ")}const Oy="dbshape.reviewed:",vb=e=>jn(Oy+e,{}),wb=(e,t)=>hn(Oy+e,t),kb=e=>`${e.repoRoot}|${e.base.label}|${e.target.label}|${e.database.id}`,bb=[{status:"added",title:"新規テーブル"},{status:"modified",title:"変更したテーブル"},{status:"removed",title:"削除したテーブル"}];function Eb({data:e,active:t,onComments:n,switcher:r}){const i=kb(e),[o,s]=z.useState(""),[l,a]=z.useState("changes"),[u,c]=z.useState(null),[d,h]=z.useState(()=>vb(i)),[p,x]=z.useState(()=>w0(i)),[v,k]=z.useState(null),[y,m]=z.useState(null),g=z.useRef(null),w=z.useRef(null),C=z.useRef(null),E=fy(w),[A,_]=z.useState(yb);z.useEffect(()=>{if(!t)return;const D=ee=>{ee.key==="Escape"&&!(ee.target instanceof HTMLElement&&ee.target.closest("textarea, input"))&&c(null)};return window.addEventListener("keydown",D),()=>window.removeEventListener("keydown",D)},[t]),z.useEffect(()=>{const D=p.filter(ee=>fi(e,ee)!=="resolved").length;n({open:D,prompt:()=>wy(e,p,{header:!1}).text})},[e,p,n]);const $=e.diff.tables,b=z.useMemo(()=>new Set($.map(D=>D.name)),[$]),O=D=>d[D.name]===lo(D),T=z.useMemo(()=>new Set($.filter(D=>d[D.name]===lo(D)).map(D=>D.name)),[$,d]),F=z.useMemo(()=>{const D=new Map;for(const ee of e.diff.values){const ue=Pl(ee.before,ee.after).map(_e=>_e.status==="added"?`+${_e.value}`:_e.status==="removed"?`−${_e.value}`:_e.value).join(" "),Fe=ee.source==="check"?[`${ee.table}.${ee.column}`]:ee.usedBy??[];for(const _e of Fe)D.set(_e,`値: ${ue}`)}return D},[e]),L=z.useMemo(()=>{const D=new Map,ee=new Set;for(const ue of p)fi(e,ue)==="resolved"||!ue.target.table||(D.set(ue.target.table,(D.get(ue.target.table)??0)+1),(ue.target.kind==="column"||ue.target.kind==="value")&&ee.add(`${ue.target.table}.${ue.target.name}`));return{tables:D,columns:ee}},[e,p]),B=e.diff,U=(D,ee)=>{const ue={...d};ee?ue[D.name]=lo(D):delete ue[D.name],h(ue),wb(i,ue)},W=(D,ee=!0)=>{c({kind:"table",name:D}),ee&&window.setTimeout(()=>{var ue;return(ue=g.current)==null?void 0:ue.focus(D)},0)},P=D=>{x(D),k0(i,D)},G={data:e,comments:p,composing:v,editing:y,compose:D=>{k(D?Si(D):null),m(null)},edit:D=>{m(D),k(null)},add:(D,ee)=>{P([...p,x0(e,D,ee)]),k(null)},update:(D,ee)=>{P(p.map(ue=>ue.id===D?{...ue,body:ee}:ue)),m(null)},remove:D=>P(p.filter(ee=>ee.id!==D))},S=D=>{D.table?W(D.table):c({kind:"type",name:D.name}),window.setTimeout(()=>{var ee;return(ee=document.getElementById(`c-${Si(D)}`))==null?void 0:ee.scrollIntoView({block:"center",behavior:"smooth"})},50)},Y=$.filter(D=>p0(D,o)),Z=[...B.enums.map(D=>({kind:"ENUM 型",change:D})),...B.domains.map(D=>({kind:"DOMAIN",change:D}))],j=$.filter(O).length,R=u,I=(R==null?void 0:R.kind)==="table"?$.find(D=>D.name===R.name):void 0,M=(R==null?void 0:R.kind)==="table"?e.er.find(D=>D.name===R.name):void 0,H=(R==null?void 0:R.kind)==="table"?B.values.filter(D=>{var ee;return D.table===R.name||((ee=D.usedBy)==null?void 0:ee.some(ue=>ue.startsWith(`${R.name}.`)))}):[],K=(R==null?void 0:R.kind)==="type"?Z.find(D=>D.change.name===R.name):void 0,J=$.length===0&&B.values.length===0&&Z.length===0;return f.jsx(by.Provider,{value:G,children:f.jsxs("div",{className:"app",children:[f.jsxs(Sd,{children:[r,f.jsxs(Cd,{children:[f.jsx(Ei,{children:"テーブル"}),f.jsx(Ed,{stats:{added:$.filter(D=>D.status==="added").length,modified:$.filter(D=>D.status==="modified").length,removed:$.filter(D=>D.status==="removed").length},unit:"テーブル",showZero:!0}),f.jsx(Nd,{}),f.jsx(Ei,{children:"値の変化"}),f.jsx("span",{className:`vcount${B.values.length?"":" zero"}`,title:"CHECK や ENUM などの値の変化",children:B.values.length})]}),f.jsx(jd,{}),f.jsx(_d,{done:j,total:$.length,title:"確認済みにしたテーブル(内容が変わると外れます)"})]}),f.jsxs("div",{className:`body ${R?"with-panel":""}`,ref:w,style:{gridTemplateColumns:xb(E?ds(A,E,!!R):A,!!R)},children:[f.jsxs("nav",{className:"side",ref:C,children:[f.jsx("input",{className:"filter",placeholder:"テーブル・カラムで絞り込み",value:o,onChange:D=>s(D.target.value)}),bb.map(D=>{const ee=Y.filter(ue=>ue.status===D.status);return f.jsxs("div",{className:"group",children:[f.jsxs("div",{className:"group-title",children:[D.title," ",f.jsx("span",{className:"muted",children:ee.length})]}),ee.map(ue=>{const Fe=yy(ue),_e=L.tables.get(ue.name)??0,Te=O(ue);return f.jsxs("div",{className:`item-row tinted ${ue.status}${Te?" reviewed":""}${(R==null?void 0:R.name)===ue.name?" current":""}`,children:[f.jsxs("button",{className:"item",onClick:()=>W(ue.name),title:ue.name,children:[f.jsxs("span",{className:"iname",children:[f.jsxs("span",{className:"schema",children:[ue.schema,"."]}),ue.table]}),f.jsx($i,{stats:Fe,title:gy(Fe)}),_e>0&&f.jsx(Io,{n:_e,title:"このテーブルへの未対応のコメント"})]}),f.jsx("button",{className:`ireview${Te?" on":""}`,onClick:()=>U(ue,!Te),title:Te?"確認済み(クリックで外す)":"確認済みにする(テーブルがまた変わると外れます)","aria-label":Te?"確認済みを外す":"確認済みにする","aria-pressed":Te,children:f.jsx(s0,{size:12})})]},ue.name)})]},D.status)}),f.jsxs("div",{className:"group",children:[f.jsxs("div",{className:"group-title",children:["値の変化 ",f.jsx("span",{className:"muted",children:B.values.length})]}),B.values.map((D,ee)=>{const ue=xy(D);return f.jsx("button",{className:"item tinted values",onClick:()=>ue.table?W(ue.table):D.type&&c({kind:"type",name:D.type}),children:f.jsx("span",{className:"iname",children:ue.label})},ee)})]}),p.length>0&&f.jsxs("div",{className:"group",children:[f.jsxs("div",{className:"group-title",children:["コメント ",f.jsx("span",{className:"muted",children:p.length})]}),p.map(D=>{const ee=fi(e,D);return f.jsxs("div",{className:`item comment-item ${ee}`,role:"button",tabIndex:0,onClick:()=>S(D.target),onKeyDown:ue=>ue.key==="Enter"&&S(D.target),title:`${Xu(D.target)}
66
- ${D.body}`,children:[f.jsx("span",{className:"mark cmark",children:f.jsx(Ti,{size:12})}),f.jsxs("span",{className:"iname",children:[f.jsx("span",{className:"ctarget",children:Xu(D.target)}),f.jsx("span",{className:"cline",children:D.body.split(`
67
- `)[0]})]}),ee!=="open"&&f.jsx("span",{className:`cstate ${ee}`,children:b0[ee]}),f.jsx("button",{className:"cdel","aria-label":"削除",title:"このコメントを削除",onClick:ue=>{ue.stopPropagation(),G.remove(D.id)},children:"×"})]},D.id)})]}),Z.length>0&&f.jsxs("div",{className:"group",children:[f.jsxs("div",{className:"group-title",children:["型 ",f.jsx("span",{className:"muted",children:Z.length})]}),Z.map(D=>f.jsx("button",{className:`item tinted ${D.change.status}${(R==null?void 0:R.name)===D.change.name?" current":""}`,onClick:()=>c({kind:"type",name:D.change.name}),children:f.jsx("span",{className:"iname",children:D.change.name})},D.change.name))]}),f.jsxs("div",{className:"side-foot muted",children:[f.jsxs("div",{children:["変更のないテーブル ",B.unchangedTables]}),f.jsxs("details",{children:[f.jsxs("summary",{children:["スキーマ ",e.target.files.length," ファイル(",Td(e.schemaFrom),")"]}),f.jsx("ul",{children:e.target.files.map(D=>f.jsx("li",{children:D},D))})]}),e.ignored.length>0&&f.jsxs("details",{children:[f.jsxs("summary",{children:["比較していない文 ",e.ignored.reduce((D,ee)=>D+ee.count,0)]}),f.jsx("ul",{children:e.ignored.map(D=>f.jsxs("li",{children:[D.statement," ",D.count]},D.statement))})]})]})]}),f.jsx(Lo,{title:"ドラッグで一覧と図の幅を変える(ダブルクリックで元に戻す)",start:()=>{var D;return((D=C.current)==null?void 0:D.getBoundingClientRect().width)??A.side},onDrag:(D,ee)=>_(ue=>ds({...ue,side:D+ee},E,!!R)),onEnd:()=>_(D=>(cs(D),D)),onReset:()=>_(D=>(cs({...D,side:oi.side}),{...D,side:oi.side}))}),f.jsxs("main",{className:"canvas",children:[f.jsxs("div",{className:"toolbar",children:[f.jsxs("div",{className:"ds-seg",children:[f.jsx("button",{className:l==="changes"?"on":"",onClick:()=>a("changes"),title:"変更したテーブルと、その外部キーの参照先だけ",children:"変更まわり"}),f.jsx("button",{className:l==="all"?"on":"",onClick:()=>a("all"),title:"すべてのテーブル",children:"全体"})]}),f.jsx("button",{className:"ds-btn",onClick:()=>{var D;return(D=g.current)==null?void 0:D.fit()},title:"図全体を画面に収める",children:"全体を表示"}),f.jsx("button",{className:"ds-btn ds-btn-icon",onClick:()=>{var D;return(D=g.current)==null?void 0:D.zoom(1.25)},"aria-label":"拡大",children:"+"}),f.jsx("button",{className:"ds-btn ds-btn-icon",onClick:()=>{var D;return(D=g.current)==null?void 0:D.zoom(.8)},"aria-label":"縮小",children:"−"}),f.jsx("span",{className:"muted hint",title:"スクロールでも移動できます。トラックパッドのピンチでも拡大縮小できます",children:"ドラッグで移動・⌘ / Ctrl + スクロールで拡大・クリックで詳細"})]}),e.warnings.length>0&&f.jsx("div",{className:"warnings",children:e.warnings.map((D,ee)=>f.jsx("div",{className:"warning",children:D},ee))}),J&&l==="changes"?f.jsxs("div",{className:"empty",children:["スキーマの変更はありません(",e.target.files.length," ファイルを比較しました)"]}):f.jsx(mb,{ref:g,tables:e.er,mode:l,values:F,selected:(R==null?void 0:R.kind)==="table"?R.name:null,reviewed:T,comments:L,onSelect:D=>D?W(D,!1):c(null)})]}),R&&f.jsx(Lo,{title:"ドラッグで図と詳細パネルの幅を変える(ダブルクリックで元に戻す)",start:()=>ds(A,E,!0).panel,onDrag:(D,ee)=>_(ue=>ds({...ue,panel:D-ee},E,!0)),onEnd:()=>_(D=>(cs(D),D)),onReset:()=>_(D=>(cs({...D,panel:oi.panel}),{...D,panel:oi.panel}))}),R&&f.jsx($0,{selection:R,change:I,erTable:M,values:H,type:K,reviewed:I?O(I):!1,onReviewed:D=>I&&U(I,D),known:b,onJump:D=>W(D),onClose:()=>c(null)})]})]})})}function Sb({data:e,active:t,onComments:n}){const r=e.databases,i=r.length>1,o=`dbshape.database:${e.repoRoot}`,[s,l]=z.useState(()=>{var k;const v=jn(o,null);return v&&r.some(y=>y.database.id===v)?v:(k=[...r].sort((y,m)=>Is(m)-Is(y))[0])==null?void 0:k.database.id}),a=r.find(v=>v.database.id===s)??r[0],u=v=>{l(v),hn(o,v)},[c,d]=z.useState({}),h=z.useRef(new Map),p=v=>{let k=h.current.get(v);return k||h.current.set(v,k=y=>d(m=>({...m,[v]:y}))),k};if(z.useEffect(()=>{const v=r.filter(k=>{var y;return(((y=c[k.database.id])==null?void 0:y.open)??0)>0});n({open:v.reduce((k,y)=>k+c[y.database.id].open,0),prompt:()=>v.map(k=>{const y=c[k.database.id].prompt().trimEnd();return i?`### DB: ${k.database.name}
68
-
69
- ${y}`:y}).join(`
70
-
71
- `)})},[r,c,i,n]),!a)return f.jsx("div",{className:"fatal muted",children:"スキーマの SQL ファイルがありません"});const x=i?f.jsx("div",{className:"db-switch",role:"tablist","aria-label":"データベース",children:r.map(v=>{const k=Is(v),y=v===a;return f.jsxs("button",{role:"tab","aria-selected":y,className:`db-tab ${y?"on":""} ${k===0?"quiet":""}`,onClick:()=>u(v.database.id),title:`${Td(v.schemaFrom)}
72
- 変更 ${k}`,children:[f.jsx("span",{className:"db-name",children:v.database.name}),f.jsx("span",{className:"db-count",children:k})]},v.database.id)})}):void 0;return f.jsx(f.Fragment,{children:r.map(v=>f.jsx("div",{className:"db-pane",hidden:v!==a,children:f.jsx(Eb,{data:v,active:t&&v===a,onComments:p(v.database.id),switcher:x})},v.database.id))})}const Cb={id:"db",title:"DB",description:"DB スキーマ(dbshape): テーブル・カラム・制約・CHECK の値の変化",icon:i0,View:Sb,badge:e=>e.databases.reduce((t,n)=>t+Is(n),0)||void 0};function Nb(e){const t=new Map,n=new Map;for(const l of e.files){n.set(l.path,l);const a=t.get(l.dir)??[];a.push(l),t.set(l.dir,a)}const r=new Map,i=new Map;for(const l of e.edges)_p(r,l.from,l),_p(i,l.to,l);const o=[...t.keys()].sort(),s=new Set;for(const l of e.files)l.status!=="unchanged"&&s.add(l.dir);return{graph:e,filesByDir:t,edgesByFrom:r,edgesByTo:i,fileByPath:n,dirs:o,changedDirs:[...s].sort()}}function _p(e,t,n){const r=e.get(t);r?r.push(n):e.set(t,[n])}function al(e,t){return e===0&&t>0?"added":t===0&&e>0?"removed":"unchanged"}function Ry(e,t){let n;for(const r of e)(r.dir===""||t===r.dir||t.startsWith(r.dir+"/"))&&(!n||r.dir.length>n.dir.length)&&(n=r);return n}function My(e,t,n){const r=Ry(e,t);if(!r||r.dir==="")return t||"(root)";const i=t===r.dir?".":t.slice(r.dir.length+1);return`${r.dir.split("/").pop()}:${i}`}function Re(e){const t=e.lastIndexOf("/");return t===-1?"":e.slice(0,t)}function mt(e){return e.slice(e.lastIndexOf("/")+1)}function jb(e){const t=new Map,n=r=>{let i=t.get(r);return i||(i={path:r,name:r===""?"(root)":mt(r),dirs:[],files:[],stats:{added:0,modified:0,removed:0,total:0}},t.set(r,i),r!==""&&n(Re(r)).dirs.push(i),i)};n("");for(const r of e.graph.files){n(r.dir).files.push(r);let i=r.dir;for(;i!==null;){const o=n(i);o.stats.total++,r.status!=="unchanged"&&o.stats[r.status]++,i=i===""?null:Re(i)}}for(const r of t.values())r.dirs.sort((i,o)=>i.name.localeCompare(o.name)),r.files.sort((i,o)=>i.path.localeCompare(o.path));return{root:n(""),byPath:t}}function Py(e){const t=[];let n=e;for(;n!=="";)n=Re(n),n!==""&&t.unshift(n);return t}function ul(e){return e.added+e.modified+e.removed===0?"unchanged":e.added===e.total?"added":e.removed===e.total?"removed":"modified"}const _b=e=>`t:${e}`;function Ca(e){if(e.length===0)return"";const t=e.map(r=>Re(r)?Re(r).split("/"):[]),n=[];for(let r=0;;r++){const i=t[0][r];if(i===void 0||t.some(o=>o[r]!==i))break;n.push(i)}return n.join("/")}function Fy(e){return[...e.files,...e.dirs.flatMap(Fy)]}function _r(e,t,n,r){const i=n.slice(2);if(n.startsWith("f:")){const o=e.fileByPath.get(i);return o?{id:n,kind:"file",label:`${mt(o.dir)}/${mt(o.path)}`,path:i,status:o.status,files:[o],pinned:r,depth:0}:null}if(n.startsWith("d:")){const o=t.get(i);return o?{id:n,kind:"dir",label:`${o.name}/`,path:i,status:ul(o.stats),files:Fy(o),pinned:r,scope:i,depth:0}:null}if(n.startsWith("r:")){const o=t.get(i);if(!o)return null;const s=o.files.filter(l=>l.status==="unchanged");return{id:n,kind:"rest",label:`${o.name}/`,suffix:` のほか ${s.length} ファイル`,path:i,status:"unchanged",files:s,pinned:r,depth:0}}if(n.startsWith("c:")){const o=t.get(i);return o?{id:n,kind:"container",label:`${o.name}/`,path:i,status:"unchanged",files:o.files,pinned:r,depth:0}:null}if(n.startsWith("p:")){const o=t.get(i);if(!o)return null;const s={added:0,modified:0,removed:0,total:o.files.length};for(const l of o.files)l.status!=="unchanged"&&s[l.status]++;return{id:n,kind:"package",label:o.name,suffix:"(パッケージ)",path:i,status:ul(s),files:o.files,pinned:r,depth:0}}return null}const un=(e,t)=>t===""||e===t||e.startsWith(t+"/");function Id(e,t,n){const r=[];for(const i of t.files)for(const o of e.edgesByFrom.get(i.path)??[])o.external&&!n||t.scope!==void 0&&!o.external&&un(o.to,t.scope)||r.push(o);return r}const cl=(e,t)=>({from:e,to:t,before:0,after:0,added:0,removed:0,status:"unchanged"});function Tp(e,t){t!=="added"&&e.before++,t!=="removed"&&e.after++,t==="added"&&e.added++,t==="removed"&&e.removed++}function Dy(e,t){if(!t)return;const n=new Map((e.files??[]).map(r=>[r.path,r]));for(const r of t){const i=n.get(r.path);i?(i.status!==r.status&&(i.status="unchanged"),r.typeOnly||delete i.typeOnly):n.set(r.path,{...r})}e.files=[...n.values()].sort((r,i)=>r.path.localeCompare(i.path))}function dl(e,t,n){const r=new Map;for(const i of Id(e,t,n)){const o=i.external?`x:${i.to}`:`d:${i.to}`;let s=r.get(o);s||(s={target:{id:o,dir:i.to,label:i.external?i.to:My(e.graph.modules,i.to),external:i.external},link:cl(t.id,o),fileLinks:new Map},r.set(o,s));const l=s.link;Tp(l,i.status),i.typeOnly!==void 0&&(l.typeOnly=(l.typeOnly??!0)&&i.typeOnly);for(const a of i.files??[]){const u=_b(a.path);let c=s.fileLinks.get(u);c||s.fileLinks.set(u,c=cl(t.id,u)),Tp(c,a.status),c.typeOnly=(c.typeOnly??!0)&&!!a.typeOnly}Dy(l,i.files)}for(const{link:i,fileLinks:o}of r.values()){i.status=al(i.before,i.after);for(const s of o.values())s.status=al(s.before,s.after),s.typeOnly||delete s.typeOnly}return r}function zy(e,t,n,r=`g:${n}`){const i=cl(t.id,r),o=new Map;let s=!0;for(const l of Id(e,t,!1)){if(l.external||!un(l.to,n))continue;const a=o.get(l.from)??{before:!1,after:!1};l.status!=="added"&&(a.before=!0),l.status!=="removed"&&(a.after=!0),o.set(l.from,a),s&&(s=l.typeOnly===!0),Dy(i,l.files)}if(o.size===0)return null;for(const l of o.values())l.before&&i.before++,l.after&&i.after++,!l.before&&l.after&&i.added++,l.before&&!l.after&&i.removed++;return i.status=al(i.before,i.after),s&&(i.typeOnly=!0),i}function Tb(e,t,n,r){const i=s=>{const l=_r(e,t,s,n.pinned);return l?(l.scope=n.scope??l.scope,l.kind==="file"&&(l.label=mt(l.path)),l):null};let o=[];if(n.kind==="dir"){const s=t.get(n.path);if(!s)return[];o=[...s.dirs.map(l=>i(`d:${l.path}`)),...s.files.map(l=>i(`f:${l.path}`))]}else(n.kind==="rest"||n.kind==="package")&&(o=n.files.map(s=>i(`f:${s.path}`)));return o.filter(s=>s!==null&&Id(e,s,r).length>0)}function Qi(e,t){const n=new Set(t.files.map(o=>o.path)),r=new Set(t.files.map(o=>o.dir)),i=new Map;for(const o of e.graph.edges){if(o.external||n.has(o.from)||t.scope!==void 0&&un(Re(o.from),t.scope))continue;let s;if(o.files){const a=o.files.filter(u=>n.has(u.path));if(!a.length)continue;s={before:a.some(u=>u.status!=="added"),after:a.some(u=>u.status!=="removed"),typeOnly:a.every(u=>!!u.typeOnly)}}else{if(!r.has(o.to))continue;s={before:o.status!=="added",after:o.status!=="removed",typeOnly:!1}}const l=i.get(o.from);l?(l.before||(l.before=s.before),l.after||(l.after=s.after),l.typeOnly&&(l.typeOnly=s.typeOnly)):i.set(o.from,s)}return i}function By(e,t,n){if(!n.length)return null;const r=cl(e,t);for(const i of n)i.before&&r.before++,i.after&&r.after++,!i.before&&i.after&&r.added++,i.before&&!i.after&&r.removed++;return r.status=al(r.before,r.after),n.every(i=>i.typeOnly)&&(r.typeOnly=!0),r}function Zu(e){const t=e.slice(4);return e.startsWith("i:f:")?n=>n===t:e.startsWith("i:d:")?n=>Re(n)===t:n=>un(Re(n),t)}function $b(e,t,n,r){var s,l;if(n.startsWith("i:")){const a=_r(e,t,r,!1);if(!a)return null;const u=a.kind==="container"?{...a,files:a.files.filter(d=>d.path.endsWith(".go"))}:a,c=Zu(n);return By(n,r,[...Qi(e,u)].filter(([d])=>c(d)).map(([,d])=>d))}const i=_r(e,t,n,!1);if(!i)return null;if(r.startsWith("g:"))return zy(e,i,r.slice(2),r);const o=dl(e,i,!0);return r.startsWith("t:")?((l=o.get(`d:${Re(r.slice(2))}`))==null?void 0:l.fileLinks.get(r))??null:((s=o.get(r))==null?void 0:s.link)??null}function $p(e,t){const n={dir:t,target:!1,children:new Map},r=e.includes(t);for(const s of e){if(s===t)continue;let l=n;for(const a of(t?s.slice(t.length+1):s).split("/")){const u=l.dir?`${l.dir}/${a}`:a;let c=l.children.get(a);c||l.children.set(a,c={dir:u,target:!1,children:new Map}),l=c}l.target=!0}const i=(s,l)=>{const a=[...s.children.values()];if(!s.target&&a.length===1)return i(a[0],`${l}/${mt(a[0].dir)}`);if(a.length===0)return[{kind:"dir",dir:s.dir,label:l,self:!1}];const u=a.flatMap(c=>i(c,mt(c.dir)));return s.target&&u.push({kind:"dir",dir:s.dir,label:`${mt(s.dir)}(パッケージ)`,self:!0}),[{kind:"group",dir:s.dir,label:l,children:u}]},o=[...n.children.values()].flatMap(s=>i(s,mt(s.dir)));return r&&o.push({kind:"dir",dir:t,label:t?`${mt(t)}(パッケージ)`:"(ルート)",self:!0}),o}function Lb(e,t,n,r,i,o=new Map,s=new Map){var lt;const l=[],a=new Set,u=(V,te,se)=>{if(a.has(V.id))return;a.add(V.id);const ye=V.kind==="file"?[]:Tb(e,t,V,i);if(Object.assign(V,{depth:te,parent:se,canOpen:ye.length>0,open:ye.length>0&&(s.get(V.id)??!1)}),l.push(V),V.open)for(const ge of ye)u(ge,te+1,V.id)},c=n.map(V=>_r(e,t,V,!0)).filter(V=>V!==null);for(const V of c)V.isPin=!0;const d=new Map,h=new Map;for(const V of c)V.kind==="file"&&d.set(Re(V.path),[...d.get(Re(V.path))??[],V]);const p=[...c.filter(V=>V.kind!=="file").map(V=>({key:`${V.path}/`,box:!1,s:V,dir:V.path})),...[...d.keys()].map(V=>({key:V?`${V}/`:"",box:!0,s:null,dir:V}))].sort((V,te)=>V.key.localeCompare(te.key)||Number(V.box)-Number(te.box));for(const V of p){if(!V.box){u(V.s,0,void 0);continue}const te=d.get(V.dir).filter(de=>!a.has(de.id)).sort((de,$e)=>de.path.localeCompare($e.path)),se=te.length?_r(e,t,`c:${V.dir}`,!0):null;if(!se)continue;const ye=se.files;se.files=te.flatMap(de=>de.files);const ge={added:0,modified:0,removed:0,total:se.files.length};for(const de of se.files)de.status!=="unchanged"&&ge[de.status]++;if(se.status=ul(ge),a.add(se.id),se.depth=0,se.canOpen=!0,se.open=s.get(se.id)??!0,se.open||(se.suffix=` ${te.length} ファイル`),l.push(se),h.set(se.id,{files:te,pkg:ye}),se.open)for(const de of te)de.label=mt(de.path),u(de,1,se.id)}if(r&&!n.includes(r)){const V=_r(e,t,r,!1);V&&u(V,0,void 0)}const x=l.filter(V=>V.depth===0),v=Ca(x.map(V=>V.path));for(const V of x){const te=v?V.path.slice(v.length+1):V.path;V.label=V.kind==="dir"||V.kind==="rest"||V.kind==="container"?`${te}/`:te}const k=l.map(V=>V.open?new Map:dl(e,V,i)),y=new Set,m=new Map;for(const V of k)for(const{target:te}of V.values())te.external?m.set(te.id,te):y.add(te.dir);const g=Ca([...y]),w=V=>g?V.slice(g.length+1):V,C=V=>{let te=0,se=0;return k.forEach((ye,ge)=>{for(const de of ye.keys())V(de)&&(te+=ge,se++)}),se?te/se:0},E=V=>C(te=>te.startsWith("d:")&&(V.kind==="group"?un(te.slice(2),V.dir):te.slice(2)===V.dir)),A=V=>[...V].sort((te,se)=>{const ye=te.kind==="dir"&&te.self?1:0,ge=se.kind==="dir"&&se.self?1:0;return ye-ge||E(te)-E(se)||te.label.localeCompare(se.label)}),_=[],$=[],b=V=>{const te=k.flatMap(se=>{var ye;return[...((ye=se.get(V))==null?void 0:ye.fileLinks.values())??[]]});return{fileLinks:te,files:[...new Set(te.map(se=>se.to))]}},O=(V,te,se)=>{var qe;if(V.kind==="group"){const X=`g:${V.dir}`,re=o.get(X)??!0,pe=[...y].filter(oe=>oe!==V.dir&&un(oe,V.dir)).length,he=y.has(V.dir)?b(`d:${V.dir}`).files.length:0,q=y.has(V.dir)&&he===0;if(_.push({id:X,kind:"group",dir:V.dir,label:V.label,fullLabel:w(V.dir),external:!1,depth:te,parent:se,canOpen:!0,open:re,folderCount:pe+(q?1:0),directFileCount:he}),re)for(const oe of A(V.children))O(oe,te+1,X);else for(const oe of l){if(oe.open)continue;const me=zy(e,oe,V.dir,X);me&&$.push(me)}return}const ye=`d:${V.dir}`,{fileLinks:ge,files:de}=b(ye),$e=X=>C(re=>re===ye&&k.some(pe=>{var he;return(he=pe.get(re))==null?void 0:he.fileLinks.has(X)})),pt=(X,re)=>{de.sort((pe,he)=>$e(pe)-$e(he)||pe.localeCompare(he));for(const pe of de){const he=pe.slice(2);_.push({id:pe,kind:"file",dir:V.dir,label:mt(he),fullLabel:w(he),external:!1,depth:X,parent:re,file:he})}$.push(...ge)};if(V.self&&de.length>0){pt(te,se);return}const et=de.length>0&&(o.get(ye)??!1);if(_.push({id:ye,kind:"dir",dir:V.dir,label:V.label,fullLabel:V.self?`${w(V.dir)}(パッケージ)`:w(V.dir),external:!1,depth:te,parent:se,self:V.self,canOpen:de.length>0,open:et,fileCount:de.length}),!et){for(const X of k){const re=(qe=X.get(ye))==null?void 0:qe.link;re&&$.push(re)}return}pt(te+1,ye)};for(const V of A($p([...y],g)))O(V,0,void 0);const T=[...m.values()].sort((V,te)=>C(se=>se===V.id)-C(se=>se===te.id)||V.label.localeCompare(te.label));for(const V of T){_.push({id:V.id,kind:"external",dir:V.dir,label:V.label,fullLabel:V.label,external:!0,depth:0});for(const te of k){const se=(lt=te.get(V.id))==null?void 0:lt.link;se&&$.push(se)}}const F=(V,te)=>{var se;return te.startsWith("t:")?!!((se=V.get(`d:${Re(te.slice(2))}`))!=null&&se.fileLinks.has(te)):te.startsWith("g:")?[...V.keys()].some(ye=>ye.startsWith("d:")&&un(ye.slice(2),te.slice(2))):V.has(te)},L=new Map,B=V=>{let te=L.get(V.id);return te||L.set(V.id,te=dl(e,V,i)),te};for(const V of $){const te=h.get(V.from);te&&(V.keys=te.files.filter(se=>F(B(se),V.to)).map(se=>`L:${se.id}>${V.to}`))}const U=V=>V.endsWith(".go"),W=V=>{var te;return V.kind==="file"&&!!((te=V.parent)!=null&&te.startsWith("c:"))&&U(V.path)},P=new Map,G=V=>{let te=P.get(V.id);if(te)return te;const se=h.get(V.id),ye=se.pkg.filter(ge=>U(ge.path));return te=se.files.some(ge=>U(ge.path))&&ye.length?Qi(e,{...V,files:ye}):new Map,P.set(V.id,te),te},S=V=>h.get(V.id).files.filter(te=>!U(te.path)),Y=l.map(V=>{if(W(V))return new Map;if(V.kind==="container"){const te=G(V);if(V.open)return te;const se=Qi(e,{...V,files:S(V).flatMap(ye=>ye.files)});for(const[ye,ge]of te){const de=se.get(ye);de?(de.before||(de.before=ge.before),de.after||(de.after=ge.after),de.typeOnly&&(de.typeOnly=ge.typeOnly)):se.set(ye,{...ge})}return se}return V.open?new Map:Qi(e,V)}),Z=new Map,j=(V,te)=>{if(te.kind!=="container"||te.open)return;const se=Zu(V),ye=`L:${V}>${te.id}`,ge=[...G(te).keys()].some(se)?[ye]:[];for(const de of S(te)){let $e=Z.get(de.id);$e||Z.set(de.id,$e=Qi(e,de)),[...$e.keys()].some(se)&&ge.push(`L:${V}>${de.id}`)}return ge.length===1&&ge[0]===ye?void 0:ge},R=new Set(Y.flatMap(V=>[...V.keys()])),I=new Set([...R].map(Re)),M=Ca([...I]),H=V=>M?V.slice(M.length+1):V,K=V=>{let te=0,se=0;return Y.forEach((ye,ge)=>{for(const de of ye.keys())V(de)&&(te+=ge,se++)}),se?te/se:0},J=V=>{const te=Zu(V);l.forEach((se,ye)=>{const ge=By(V,se.id,[...Y[ye]].filter(([$e])=>te($e)).map(([,$e])=>$e));if(!ge)return;const de=j(V,se);de&&(ge.keys=de),ee.push(ge)})},D=[],ee=[],ue=(V,te,se)=>{const ye=[...R].filter(ge=>Re(ge)===V);ye.sort((ge,de)=>K($e=>$e===ge)-K($e=>$e===de)||ge.localeCompare(de));for(const ge of ye){const de=`i:f:${ge}`;D.push({id:de,kind:"file",dir:V,label:mt(ge),fullLabel:H(ge),external:!1,depth:te,parent:se,file:ge}),J(de)}},Fe=(V,te,se)=>{if(V.kind==="group"){const $e=`i:g:${V.dir}`,pt=o.get($e)??!0;if(D.push({id:$e,kind:"group",dir:V.dir,label:V.label,fullLabel:H(V.dir),external:!1,depth:te,parent:se,canOpen:!0,open:pt,folderCount:[...I].filter(et=>et!==V.dir&&un(et,V.dir)).length,directFileCount:[...R].filter(et=>Re(et)===V.dir).length}),!pt)J($e);else for(const et of[...V.children].sort((qe,X)=>Number(qe.kind==="dir"&&qe.self)-Number(X.kind==="dir"&&X.self)||K(re=>qe.kind==="group"?un(Re(re),qe.dir):Re(re)===qe.dir)-K(re=>X.kind==="group"?un(Re(re),X.dir):Re(re)===X.dir)||qe.label.localeCompare(X.label)))Fe(et,te+1,$e);return}if(V.self)return ue(V.dir,te,se);const ye=`i:d:${V.dir}`,ge=[...R].filter($e=>Re($e)===V.dir).length,de=o.get(ye)??!1;D.push({id:ye,kind:"dir",dir:V.dir,label:V.label,fullLabel:H(V.dir),external:!1,depth:te,parent:se,canOpen:!0,open:de,fileCount:ge}),de?ue(V.dir,te+1,ye):J(ye)},_e=$p([...I],M),Te=V=>K(te=>V.kind==="group"?un(Re(te),V.dir):Re(te)===V.dir);for(const V of[..._e].sort((te,se)=>Te(te)-Te(se)||te.label.localeCompare(se.label)))Fe(V,0,void 0);return{sources:l,targets:_,links:$,targetPrefix:g,sourcePrefix:v,dependents:D,inLinks:ee,dependentPrefix:M}}const Ib=e=>e===""?"root":`d:${e}`,Ab=e=>`f:${e}`,Nn=e=>e==="root"?"":e.slice(2);function Ju(e,t,n,r){return{id:Ib(e.path),kind:t,path:e.path,label:e.name,status:ul(e.stats),dir:e,full:r,children:n}}function Uy(e){return{id:Ab(e.path),kind:"file",path:e.path,label:mt(e.path),status:e.status,file:e,children:[]}}function Ob(e,t){const n=r=>{const i=[];for(const o of r.dirs){const s=t.has(o.path);i.push(Ju(o,s?"open":"dir",s?n(o):[],!0))}if(r.path===""||t.has(r.path))for(const o of r.files)i.push(Uy(o));return i};return Hy(n(e))}function Rb(e,t,n=new Set){const r=new Set([""]);for(const o of e.graph.files)if(o.status!=="unchanged"){r.add(o.dir);for(const s of Py(o.dir))r.add(s)}const i=o=>{const s=[];for(const l of o.dirs)r.has(l.path)&&s.push(n.has(l.path)?{...Ju(l,"open",[],!1),collapsed:!0}:Mb(Ju(l,"open",i(l),!1)));for(const l of o.files)l.status!=="unchanged"&&s.push(Uy(l));return s};return Hy(i(t))}function Mb(e){if(e.kind!=="open"||e.full||e.collapsed||e.children.length!==1)return e;const t=e.children[0];return t.kind!=="open"?e:{...t,label:`${e.label}/${t.label}`}}function Hy(e){const t=new Map,n=new Map,r=(o,s)=>{n.set(o.path,s);for(const l of o.files)t.set(l.path,s);for(const l of o.dirs)r(l,s)},i=o=>{switch(o.kind){case"file":t.set(o.path,o.id);break;case"dir":r(o.dir,o.id);break;case"open":o.collapsed?r(o.dir,o.id):n.set(o.path,o.id);break}o.children.forEach(i)};return e.forEach(i),{roots:e,fileRep:t,pkgRep:n}}const Pb=(e,t)=>`L:${e}>${t}`,Ui=e=>`I:${e}`;function Pr(e){if(e.startsWith("L:")){const t=e.slice(2),n=t.indexOf(">");return{kind:"link",from:t.slice(0,n),to:t.slice(n+1)}}return{kind:"item",id:e.slice(2)}}const Wy=$b;function Vy(e,t,n){const r=Pr(n);if(r.kind==="link"){const i=Wy(e,t,r.from,r.to);return!i||i.after===0?"resolved":"open"}if(r.id.startsWith("f:")){const i=e.fileByPath.get(Nn(r.id));return!i||i.status==="removed"?"resolved":"open"}return t.has(Nn(r.id))?"open":"resolved"}function Ci(e,t,n){const r=n.targets.map(o=>Vy(e,t,o)),i=r.filter(o=>o==="resolved").length;return i===0?"open":i===r.length?"resolved":"partial"}function ec(e,t){const n=Ry(e.graph.modules,t);if(!n)return t;const r=n.dir===""?t:t===n.dir?"":t.slice(n.dir.length+1);return r?`${n.path}/${r}`:n.path}function Na(e,t,n){if(n.startsWith("i:")){const s=n.slice(4);return n.startsWith("i:f:")?s:n.startsWith("i:d:")?`${s}/ 直下のファイル`:`${s}/ 配下`}const r=Nn(n);if(n.startsWith("f:"))return r;if(n.startsWith("d:"))return`${r}/ 配下`;if(n.startsWith("p:"))return`${r}/ 直下のファイル(パッケージ ${mt(r)})`;if(n.startsWith("c:"))return`パッケージ ${r}/`;const i=t.get(r),o=i?i.files.filter(s=>s.status==="unchanged").length:0;return`${r}/ の変更のないファイル ${o} 個`}function Fb(e,t,n){if(t.startsWith("x:"))return`${t.slice(2)}(外部パッケージ)`;if(t.startsWith("t:"))return t.slice(2);const r=t.slice(2),i=t.startsWith("g:")?`${ec(e,r)}/ 配下`:ec(e,r),o=((n==null?void 0:n.files)??[]).filter(s=>s.status!=="removed").map(s=>s.path.slice(r.length+1));return o.length?t.startsWith("g:")?`${i}(${o.join(", ")})`:`${i}/(${o.join(", ")})`:i}function Db(e,t){if(!e||e.after===0)return"現在は存在しない(解消済み?)";const n=e.typeOnly?"、型のみ":"";if(t.startsWith("f:"))return(e.status==="added"?"今回追加した import":"既存の import")+n;const r=[`import しているファイル 変更前 ${e.before} → 変更後 ${e.after}`];return e.added&&r.push(`今回追加 ${e.added}`),e.removed&&r.push(`今回削除 ${e.removed}`),r.join("、")}function zb(e,t,n,r=3){const i=_r(e,t,`r:${n}`,!1);if(!i||i.files.length===0)return null;const o=[...dl(e,i,!1).values()].filter(({link:l})=>l.before>0).sort((l,a)=>a.link.before-l.link.before).slice(0,r);if(o.length===0)return`${n}/ の変更のないファイル ${i.files.length} 個は、このリポジトリ内のパッケージを import していません`;const s=o.map(({target:l,link:a})=>`${ec(e,l.dir)} (${a.before})`).join(", ");return`${n}/ の変更のないファイル ${i.files.length} 個の主な依存先: ${s}`}function Gy(e,t,n,r={}){const i=r.includeResolved?n:n.filter(l=>Ci(e,t,l)!=="resolved"),o=e.graph,s=r.header===!1?[]:[...Ml(o),"対象: コードの依存関係(depshape)",""];return i.forEach((l,a)=>{var v;const u=l.targets.map(Pr).filter(k=>k.kind==="link"),c=l.targets.map(Pr).filter(k=>k.kind==="item"),d=[];if(u.length){d.push(u.length===1?"依存:":`依存(${u.length}件):`);for(const k of u){const y=Wy(e,t,k.from,k.to),m=k.from.startsWith("i:")?Na(e,t,k.to):Fb(e,k.to,y);d.push(` - ${Na(e,t,k.from)} → ${m}(${Db(y,k.from.replace(/^i:/,""))})`)}}if(c.length){d.push(c.length===1?"対象:":`対象(${c.length}件):`);for(const k of c){const y=Nn(k.id);if(k.id.startsWith("f:")){const m=e.fileByPath.get(y),g=[];!m||m.status==="removed"?g.push("現在は存在しない"):(m.status==="added"&&g.push("今回追加"),m.status==="modified"&&g.push("今回変更")),d.push(` - ファイル ${y}${g.length?`(${g.join("、")})`:""}`)}else d.push(` - ${k.id.startsWith("d:")?`フォルダ ${y}/`:Na(e,t,k.id)}`)}}const h=new Set;for(const k of u)k.from.startsWith("f:")&&h.add(((v=e.fileByPath.get(Nn(k.from)))==null?void 0:v.dir)??"");const p=[...h].filter(Boolean).map(k=>zb(e,t,k)).filter(k=>!!k);for(const k of p)d.push(`参考: ${k}`);const x=Ci(e,t,l);s.push(`${a+1}.${x==="partial"?"(一部は解消済み)":x==="resolved"?"(解消済み?)":""}`),s.push(...d.map(k=>` ${k}`)),s.push(` コメント: ${l.body.trim().replace(/\n/g,`
73
- `)}`),s.push("")}),{text:s.join(`
74
- `).trimEnd()+`
75
- `,included:i.length,skipped:n.length-i.length}}function tc(e,t){var i;const n=Nn(t);if(t.startsWith("f:")){const o=n.slice(0,n.lastIndexOf("/"));return`${mt(o)}/${mt(n)}`}const r=((i=e.get(n))==null?void 0:i.name)??mt(n);return t.startsWith("r:")?`${r}/ のほか`:`${r}/`}function Lp(e,t,n){const r=Pr(n);if(r.kind==="item")return tc(t,r.id);const i=r.to.startsWith("x:")?r.to.slice(2):My(e.graph.modules,r.to.slice(2));return`${tc(t,r.from)} → ${i}`}function Bb(e){const t=Pr(e.targets[0]??"I:root");return t.kind==="link"?t.from:t.id}const Ub=z.forwardRef(function(t,n){const{model:r,tree:i,comments:o,selection:s,draft:l}=t,[a,u]=z.useState("open"),d=o.map(v=>({c:v,state:Ci(r,i,v)})).filter(v=>a==="all"||v.state!=="resolved"),h=new Map;for(const v of d){const k=Bb(v.c);h.set(k,[...h.get(k)??[],v])}const p=[...h.entries()].sort((v,k)=>Nn(v[0]).localeCompare(Nn(k[0]))),x=l.editingId!==null||l.body!==""||s.length>0;return f.jsxs("aside",{className:"comment-sidebar",children:[f.jsxs("div",{className:"dep-panel-head",children:[f.jsx("strong",{children:"コメント"}),f.jsxs("select",{value:a,onChange:v=>u(v.target.value),title:"表示するコメント",children:[f.jsx("option",{value:"open",children:"未対応のみ"}),f.jsx("option",{value:"all",children:"すべて"})]}),f.jsx("span",{className:"tspacer"}),f.jsx("button",{className:"icon-btn",onClick:t.onClose,title:"閉じる",children:"×"})]}),f.jsx("div",{className:"comment-sidebar-list",children:d.length===0?f.jsx("div",{className:"dep-panel-empty",children:o.length===0?"まだコメントはありません。パネルの矢印や箱をクリック(⌘ / Shift で複数)するか、ツリーの行の 💬 から書けます。":"未対応のコメントはありません。「すべて」に切り替えると解消済み?のものも見られます。"}):p.map(([v,k])=>f.jsxs("section",{className:"comment-group",children:[f.jsx("div",{className:"comment-group-head",title:Nn(v),children:tc(i,v)}),k.map(({c:y,state:m})=>{var g;return f.jsx(kd,{body:y.body,state:m,meta:y.targets.length>1?`${y.targets.length}件`:void 0,lit:(g=t.hoveredKeys)==null?void 0:g.some(w=>y.targets.includes(w)),editing:l.editingId===y.id,onMouseEnter:()=>t.onHoverComment(y.targets),onMouseLeave:()=>t.onHoverComment(null),top:f.jsx("ul",{className:"comment-targets",onClick:()=>t.onShow(y),title:"クリックで図に表示",children:y.targets.map(w=>f.jsx("li",{className:Vy(r,i,w)==="resolved"?"resolved":"",children:Lp(r,i,w)},w))}),onCopy:()=>zo(Gy(r,i,[y],{includeResolved:!0}).text),onEdit:()=>t.onEdit(y),onDelete:()=>t.onDelete(y.id)},y.id)})]},v))}),f.jsx(bd,{ref:n,className:"comment-composer",editing:l.editingId!==null,value:l.body,placeholder:"指摘を書く(例: usecase を経由する形にしてください)",onChange:v=>t.onDraft({...l,body:v}),onSave:t.onSave,onCancel:t.onCancel,canSave:s.length>0,showCancel:x,top:f.jsxs("div",{className:"composer-targets",children:[f.jsx("span",{className:"muted",children:l.editingId?"編集中のコメント先:":"コメント先:"}),s.length===0?f.jsx("span",{className:"muted",children:"矢印や箱・行を選ぶとここに入ります(⌘ / Shift で複数)"}):s.map(v=>f.jsxs("span",{className:`chip${v.startsWith("L:")?" link":""}`,title:v,children:[Lp(r,i,v),f.jsx("button",{onClick:()=>t.onRemoveTarget(v),title:"外す",children:"×"})]},v))]})})]})});function Hb(e,t,n){if(n(e)<=t)return e;const r=[...e];let i=r.length;for(;i>0&&n(r.slice(0,i).join("")+"…")>t;)i--;return r.slice(0,i).join("")+"…"}function Wb(e,t,n){const r=e.endsWith("/"),i=(r?e.slice(0,-1):e).split("/"),o=i.pop()+(r?"/":""),s=i.length,l=[];s&&l.push(i.join("/")+"/");for(let a=s-2;a>=1;a--)l.push(`${i[0]}/…/${i.slice(s-a).join("/")}/`);s>=2&&l.push(`…/${i[s-1]}/`,`${i[0]}/…/`),s&&l.push("…/");for(const a of l)if(n(a)+n(o)<=t)return{dir:a,name:o};return{dir:s?"…/":"",name:Hb(o,t-(s?n("…/"):0),n)}}function Ky(e,t){const n=t.startsWith("i:")?t.slice(2):t,r=n.slice(2);switch(n[0]){case"f":case"t":return{what:"file",path:r};case"g":return{what:"tree",path:r};case"d":return{what:e==="S"?"tree":"dir",path:r};case"x":return{what:"ext",path:r};default:return{what:"dir",path:r}}}const Vb=(e,t)=>{const n=Ky(e,t);return`${e}|${n.what}|${n.path}`},Gb=(e,t)=>t===""||e===t||e.startsWith(`${t}/`);function qy(e,t,n){const[r,i,...o]=e.split("|");if(r!==t)return!1;const s=o.join("|"),l=Ky(t,n);switch(i){case"tree":return l.what!=="ext"&&Gb(l.path,s);case"dir":return l.what==="dir"&&l.path===s||l.what==="file"&&Re(l.path)===s;default:return i===l.what&&s===l.path}}const Ip=(e,t,n)=>[...e].some(r=>qy(r,t,n));function nc(e,t,n){return new Set([...e].filter(r=>!qy(r,t,n)))}const Yy=(e,t)=>Gu("depshape",e,t),Xy=(e,t)=>Ku("depshape",e,t),Kb=7.3,ct=28,ja=8,Tn=10,qb=18,Yb=18,Os=120,Xb=20,Qb=16,Zb=14,Jb="12px ui-monospace, SFMono-Regular, Menlo, monospace";let Wr;function Xn(e){if(Wr===void 0&&(Wr=document.createElement("canvas").getContext("2d"),Wr&&(Wr.font=Jb)),Wr)return Wr.measureText(e).width;let t=0;for(const n of e)t+=/[ -鿿＀-￯]/.test(n)?2:1;return t*Kb}function Ap(e,t){if(Xn(e)<=t)return e;const n=[...e];let r=0;for(;r<n.length&&Xn("…"+n.slice(r).join(""))>t;)r++;return"…"+n.slice(r).join("")}const e1=(e,t)=>Wb(e,t,Xn);function Op(e,t,n,r,i){const o=1-e;return o*o*o*t+3*o*o*e*n+3*o*e*e*r+e*e*e*i}function Rp(e){const t=Math.max(e.before,e.after,1);return 1.6+Math.min(3.2,Math.log2(t)*.8)+(e.status==="unchanged"?0:.5)}function Mp(e,t){const n=e.map(()=>0);let r=[...e.keys()],i=t;for(;r.length;){const o=i/r.length,s=r.filter(l=>e[l]<=o);if(!s.length){for(const l of r)n[l]=Math.max(Os,o);break}for(const l of s)n[l]=e[l],i-=e[l];r=r.filter(l=>!s.includes(l))}return n}const _a=e=>new Map(e.map(t=>[t.id,t.parent])),Ta=(e,t,n)=>{for(let r=e.get(t);r;r=e.get(r))if(r===n)return!0;return!1},$a=e=>e.metaKey||e.ctrlKey||e.shiftKey,Pp=e=>e.detail>1,fs=e=>e.stopPropagation();function t1(e){const{model:t,tree:n,pins:r,hovered:i,targetOpen:o,sourceOpen:s}=e,[l,a]=z.useState(()=>Yy("external","0")==="1"),u=z.useMemo(()=>Lb(t,n,r,i,l,o,s),[t,n,r,i,l,o,s]),c=z.useMemo(()=>_a(u.sources),[u]),d=z.useMemo(()=>_a(u.targets),[u]),h=z.useMemo(()=>_a(u.dependents),[u]),p=(N,ie)=>Ta(c,N,ie),x=(N,ie)=>Ta(d,N,ie),v=(N,ie)=>Ta(h,N,ie),k=N=>N.depth*Qb,y=N=>N.some(ie=>ie.canOpen)?Zb:0,m=y(u.sources),g=y(u.targets),w=y(u.dependents),C=N=>[N.folderCount?`${N.folderCount} フォルダ`:"",N.directFileCount?`${N.directFileCount} ファイル`:""].filter(Boolean).join("・"),E=N=>N.open?"":N.kind==="group"?` ${C(N)}`:N.fileCount?` ${N.fileCount} ファイル`:"",[A,_]=z.useState(null),$=z.useMemo(()=>{const N=(ie,fe)=>new Set(e.hidden.size?fe.filter(xe=>Ip(e.hidden,ie,xe.id)).map(xe=>xe.id):[]);return{S:N("S",u.sources),T:N("T",u.targets),I:N("I",u.dependents)}},[u,e.hidden]),b=z.useMemo(()=>u.links.filter(N=>!$.S.has(N.from)&&!$.T.has(N.to)),[u,$]),O=z.useMemo(()=>u.inLinks.filter(N=>!$.I.has(N.from)&&!$.S.has(N.to)),[u,$]),[T,F]=z.useState(null);z.useEffect(()=>{if(!T)return;const N=()=>F(null),ie=fe=>fe.key==="Escape"&&N();return window.addEventListener("pointerdown",N),window.addEventListener("keydown",ie),window.addEventListener("scroll",N,!0),window.addEventListener("blur",N),()=>{window.removeEventListener("pointerdown",N),window.removeEventListener("keydown",ie),window.removeEventListener("scroll",N,!0),window.removeEventListener("blur",N)}},[T]);const L=N=>N&&e.openLabel(N)?N:void 0,B=(N,ie,fe)=>xe=>{xe.preventDefault(),xe.stopPropagation(),F({x:xe.clientX,y:xe.clientY,col:N,id:ie,file:fe,openAs:fe&&e.openLabel(fe)})},U=N=>{const ie=N&&e.openLabel(N);return{dbl:ie?`
76
- ダブルクリックで${ie==="差分を開く"?"このファイルの差分":"このファイル"}を開く`:"",menu:ie?`「${ie}」、`:""}},W=N=>b.filter(ie=>ie.from===N||p(ie.from,N)),P=N=>new Set(u.links.filter(ie=>ie.from===N.id||p(ie.from,N.id)).map(ie=>ie.to)).size,G=N=>b.filter(ie=>ie.to===N||x(ie.to,N)),S=N=>O.filter(ie=>ie.from===N||v(ie.from,N)),Y=N=>N.keys??[Pb(N.from,N.to)],Z=N=>[...new Set(N.flatMap(Y))],j=z.useRef(null),[R,I]=z.useState(600);z.useEffect(()=>{const N=j.current;if(!N)return;const ie=new ResizeObserver(()=>I(N.clientWidth));return ie.observe(N),I(N.clientWidth),()=>ie.disconnect()},[u.sources.length>0]),z.useEffect(()=>{var N,ie;i&&((ie=(N=j.current)==null?void 0:N.querySelector(`[data-src="${CSS.escape(i)}"]`))==null||ie.scrollIntoView({block:"nearest"}))},[i,u]);const M=u.dependents.length>0,H=M?3:2,K=Math.round(Math.min(110,Math.max(44,R*.26/H))),J=44,D=24+Xb,ee=N=>N.label+(N.suffix??"")+(P(N)===0&&!N.open?" 依存なし":""),ue=(N,ie)=>Math.max(Os,...N.map(fe=>D+k(fe)+ie+Xn(fe.label+E(fe)))),Fe=Math.max(Os,...u.sources.map(N=>J+k(N)+m+Xn(ee(N)))),_e=ue(u.targets,g),Te=M?ue(u.dependents,w):0,lt=Math.max(Os*H,R-Tn*2-K*(H-1)-4),[V,te,se]=M?Mp([Te,Fe,_e],lt):[0,...Mp([Fe,_e],lt)],ye=Tn,ge=M?ye+V+K:Tn,de=ge+te+K,$e=de+se+Tn,pt=N=>N?N*(ct+ja)-ja:0,qe=Tn+(M?Yb:0),X=qe+(u.targetPrefix||u.sourcePrefix||u.dependentPrefix?qb:0),re=Math.max(pt(u.sources.length),pt(u.targets.length),pt(u.dependents.length)),pe=N=>{const ie=X+(re-pt(N.length))/2;return new Map(N.map((fe,xe)=>[fe.id,ie+xe*(ct+ja)]))},he=pe(u.sources),q=pe(u.targets),oe=pe(u.dependents),me=X+re+Tn,ke=(N,ie)=>A===null?!1:ie?N.from===A||v(N.from,A)||N.to===A||p(N.to,A):N.from===A||p(N.from,A)||N.to===A||x(N.to,A),be=[...b,...O].some(N=>Y(N).some(ie=>e.selection.has(ie))),Ne={unchanged:0,removed:1,added:2},tt=N=>[...N].sort((ie,fe)=>Ne[ie.status]-Ne[fe.status]),Ye=N=>N?`${t.graph.repoRoot}/${N}`:t.graph.repoRoot,Xe=N=>`${N.label}${N.suffix??""}`,Oe=N=>N.kind==="group"?`${N.fullLabel}/ 配下`:N.kind==="dir"&&!N.file&&N.id.startsWith("i:")?`${N.fullLabel}/ 直下`:N.fullLabel,Ze=(N,ie,fe)=>{if(ie)return[N.status==="added"?"今回追加した import":N.status==="removed"?"今回削除した import":"既存の import"];const xe=[`import しているファイル: 変更前 ${N.before} → 変更後 ${N.after}${fe!==void 0?`(${fe} ファイル中)`:""}`];return(N.added||N.removed)&&xe.push(`うち 今回追加 ${N.added} / 今回削除 ${N.removed}`),xe},wt=(N,ie,fe)=>{var nt;const xe=[`${Xe(ie)} → ${Oe(fe)}${N.typeOnly?"(型のみの import)":""}`];if(xe.push(...Ze(N,ie.kind==="file",ie.files.filter(Tt=>Tt.status!=="removed").length)),(nt=N.files)!=null&&nt.length){const Tt={added:"+",removed:"−",unchanged:"・"};xe.push("import しているファイル:");for(const Gt of N.files.slice(0,12))xe.push(` ${Tt[Gt.status]} ${Gt.path.slice(fe.dir?fe.dir.length+1:0)}`);N.files.length>12&&xe.push(` …ほか ${N.files.length-12} 件`)}return xe.join(`
77
- `)},Q=(N,ie,fe)=>[`${Oe(ie)} → ${Xe(fe)}${N.typeOnly?"(型のみの import)":""}`,...Ze(N,ie.kind==="file")].join(`
78
- `),ne=(N,ie,fe,xe,nt,Tt,Gt,Kt)=>{const qt=K/2,Yt=Y(N),vn=Yt.length>0&&Yt.every(Ft=>e.selection.has(Ft)),Pt=Yt.some(Ft=>{var Ur;return(Ur=e.litKeys)==null?void 0:Ur.has(Ft)}),gr=Yt.reduce((Ft,Ur)=>Ft+(e.commentCounts.get(Ur)??0),0),rt=ke(N,Tt),Un=`M${ie},${fe} C${ie+qt},${fe} ${xe-qt},${nt} ${xe},${nt}`,Hn=Ft=>[Op(Ft,ie,ie+qt,xe-qt,xe),Op(Ft,fe,fe,nt,nt)];return f.jsxs("g",{className:`plink${rt||Pt?" active":""}${vn?" selected":""}`,onClick:Ft=>e.onSelectKeys(Yt,$a(Ft)),onMouseEnter:()=>e.onHoverKey(Yt),onMouseLeave:()=>e.onHoverKey(null),children:[(vn||Pt)&&f.jsx("path",{d:Un,className:Pt?"psel lit":"psel",style:{strokeWidth:Rp(N)+7}}),f.jsx("path",{d:Un,className:`medge ${N.status}${N.typeOnly?" typeonly":""}${rt||vn||Pt?" active":""}`,style:{strokeWidth:Rp(N)},markerEnd:`url(#parrow-${N.status})`}),f.jsx("path",{d:Un,className:"phit",children:f.jsx("title",{children:`${Gt}
79
- クリックで選択(⌘ / Shift で追加)`})}),gr>0&&f.jsxs("g",{className:"pcomment",children:[f.jsx("circle",{cx:Hn(.5)[0],cy:Hn(.5)[1],r:7}),f.jsx("text",{x:Hn(.5)[0],y:Hn(.5)[1]+3.5,textAnchor:"middle",children:gr})]}),Kt!==null&&f.jsx("text",{x:Hn(Kt)[0],y:Hn(Kt)[1]-4,textAnchor:"middle",className:"pcount",children:N.before!==N.after?`${N.before}→${N.after}`:N.after})]},`${N.from}>${N.to}`)},ve=(N,ie)=>{const{dir:fe,name:xe}=e1(N,ie);return f.jsxs(f.Fragment,{children:[fe&&f.jsx("tspan",{className:"pdir",children:fe}),f.jsx("tspan",{className:"pname",children:xe})]})},Ce=(N,ie)=>{var of;const fe=ie==="dependent",xe=(fe?oe:q).get(N.id),nt=fe?ye:de,Tt=fe?V:se,Gt=fe?w:g,Kt=nt+k(N),qt=Tt-k(N),Yt=N.file?`f:${N.file}`:N.kind==="group"||fe?`d:${N.dir}`:N.self?`p:${N.dir}`:N.id,vn=r.includes(Yt),Pt=fe?S(N.id):G(N.id),gr=Pt.length>0&&Pt.every(on=>on.status==="added"),rt=N.file?(of=t.fileByPath.get(N.file))==null?void 0:of.status:void 0,Un=E(N),Hn=fe?"import している側の":"import している ",Ft=N.kind==="group"?C(N):`import している ${N.fileCount} ファイル`,Ur=N.canOpen?N.open?`
80
- ▾ でまとめる`:`
81
- ▸ で開いて、${Ft}を表示`:"",Tv=N.external?`${N.dir}(外部パッケージ)`:N.file?`${Ye(N.file)}${rt==="added"?"(今回追加したファイル)":rt==="modified"?"(今回変更したファイル)":""}`:N.kind==="group"?`${Ye(N.dir)}/ 配下(${Hn}${C(N)}をまとめた行)`:fe?`${Ye(N.dir)}/ 直下の、import しているファイル`:`${Ye(N.dir)}${N.self?`
82
- このパッケージ(フォルダ直下のファイル)だけ。下のフォルダは含まない`:""}`,$v=fe?"ここから出る依存":"ここに入る依存",Go=L(N.file),rf=U(Go);return f.jsxs("g",{className:`pnode target ${N.kind}${fe?" dependent":""}${(fe?$.I:$.T).has(N.id)?" hid":""}${N.self?" self":""}${N.open?" open":""}${gr?" new":""}${vn?" pinned":""}${rt&&rt!=="unchanged"?` f-${rt}`:""}`,onMouseEnter:()=>_(N.id),onMouseLeave:()=>_(null),onClick:on=>!Pp(on)&&e.onSelectKeys(Z(Pt),$a(on)),onDoubleClick:Go?()=>{var on;return(on=e.onOpenFile)==null?void 0:on.call(e,Go)}:void 0,onContextMenu:B(fe?"I":"T",N.id,Go),children:[f.jsx("title",{children:`${Tv}
83
- クリックで${$v}をすべて選択${Ur}${rf.dbl}
84
- 右クリックで${rf.menu}線を非表示 / 表示`}),f.jsx("rect",{x:Kt,y:xe,width:qt,height:ct,rx:6}),N.canOpen&&f.jsxs("g",{className:"pchev",onClick:on=>{on.stopPropagation(),e.onToggleTarget(N.id,!N.open)},onDoubleClick:fs,children:[f.jsx("title",{children:N.open?"まとめる":`開いて、${Ft}を表示`}),f.jsx("rect",{x:Kt,y:xe,width:10+Gt,height:ct}),f.jsx("text",{x:Kt+8,y:xe+ct/2+4,children:N.open?"▾":"▸"})]}),f.jsxs("text",{x:Kt+10+Gt,y:xe+ct/2+4,className:"plabel",children:[N.external?Ap(N.label,qt-D-Gt):ve(N.label,qt-D-Gt-(Un?Xn(Un):0)),Un&&f.jsx("tspan",{className:"pnone",children:Un})]}),!N.external&&f.jsxs("g",{className:`pbtn${vn?" on":""}`,onClick:on=>{on.stopPropagation(),e.onTogglePin(Yt)},onDoubleClick:fs,children:[f.jsx("title",{children:vn?"ピン留め中(クリックでピン留めを外す)":"ピン留めして、この先の依存をたどる"}),f.jsx("rect",{x:Kt+qt-26,y:xe+4,width:20,height:ct-8,rx:4}),f.jsx(Vu,{on:vn,x:Kt+qt-23,y:xe+ct/2-7})]})]},N.id)},Le=(N,ie,fe)=>N&&f.jsxs("text",{x:ie,y:qe+10,className:"pcaption",children:[f.jsx("title",{children:Ye(N)}),Ap(`${N}/ 以下`,fe)]});return f.jsxs("div",{className:"dep-panel",children:[f.jsxs("div",{className:"dep-panel-head",children:[f.jsx("strong",{children:"依存の可視化"}),f.jsxs("span",{className:"muted",children:[r.length?`ピン留め ${r.length}`:"",i?`${r.length?" + ":""}ホバー中 1`:""]}),f.jsx("span",{className:"tspacer"}),f.jsxs("label",{className:"ds-check",title:"依存先の列に、npm パッケージや Go の標準・外部パッケージも描きます(上の差分の数には含みません)",children:[f.jsx("input",{type:"checkbox",checked:l,onChange:N=>{a(N.target.checked),Xy("external",N.target.checked?"1":"0")}}),"外部パッケージも表示"]}),f.jsx("button",{className:"ds-btn",onClick:e.onClearPins,disabled:r.length===0,children:"ピンをすべて外す"})]}),u.sources.length===0?f.jsxs("div",{className:"dep-panel-empty",children:["左のツリーの行にホバーすると、ここに表示され、右に依存先(使っているもの)、左に依存元(使っている側)が出ます。",f.jsx("br",{}),"ピンのアイコンでピン留めすると表示し続けるので、複数並べて依存の形を比べられます。"]}):f.jsx("div",{className:"dep-panel-scroll",ref:j,children:f.jsxs("svg",{width:$e,height:me,className:`panel-svg${A||e.litKeys?" hovering":""}${be?" selecting":""}`,children:[f.jsx("defs",{children:["unchanged","added","removed"].map(N=>f.jsx("marker",{id:`parrow-${N}`,viewBox:"0 0 8 8",refX:"7",refY:"4",markerWidth:"8",markerHeight:"8",markerUnits:"userSpaceOnUse",orient:"auto",children:f.jsx("path",{d:"M0,0 L8,4 L0,8 z",className:`arrowhead ${N}`})},N))}),M&&f.jsxs("g",{className:"ptitle",children:[f.jsx("text",{x:ye,y:Tn+10,children:"依存元(使っている側)"}),f.jsx("text",{x:ge,y:Tn+10,children:"ピン留め"}),f.jsx("text",{x:de,y:Tn+10,children:"依存先(使っているもの)"})]}),Le(u.dependentPrefix,ye,V),Le(u.sourcePrefix,ge,te),Le(u.targetPrefix,de,se),tt(O).map(N=>{const ie=u.dependents.find(xe=>xe.id===N.from),fe=u.sources.find(xe=>xe.id===N.to);return ne(N,ye+V,oe.get(N.from)+ct/2,ge+k(fe)-1,he.get(N.to)+ct/2,!0,Q(N,ie,fe),ie.kind!=="file"?.2:null)}),tt(b).map(N=>{const ie=u.sources.find(xe=>xe.id===N.from),fe=u.targets.find(xe=>xe.id===N.to);return ne(N,ge+te,he.get(N.from)+ct/2,de+k(fe)-1,q.get(N.to)+ct/2,!1,wt(N,ie,fe),ie.kind!=="file"?.8:null)}),u.dependents.map(N=>Ce(N,"dependent")),u.sources.map(N=>{const ie=he.get(N.id),fe=P(N),xe=ge+k(N),nt=te-k(N),Tt=N.kind==="container",Gt=fe===0&&!N.open,Kt=Tt?`/
85
- ピン留めした ${N.files.length} ファイルをまとめた箱(Go ではこの箱がパッケージで、依存元の線はここに届きます)`:N.kind==="file"?"":`
86
- ${N.files.length} ファイル`,qt=Z([...W(N.id),...Tt?O.filter(rt=>rt.to===N.id):[]]),Yt=Tt?"ファイルごと":"中のフォルダ・ファイルごと",vn=N.canOpen?N.open?`
87
- ▾ でまとめる`:`
88
- ▸ で開いて、${Yt}に分ける`:"",Pt=N.kind==="file"?L(N.path):void 0,gr=U(Pt);return f.jsxs("g",{"data-src":N.id,className:`pnode source ${N.kind} ${N.status}${$.S.has(N.id)?" hid":""}${N.pinned?" pinned":" temp"}${N.depth?" child":""}${N.open?" open":""}`,onMouseEnter:()=>_(N.id),onMouseLeave:()=>_(null),onClick:rt=>!Pp(rt)&&e.onSelectKeys(qt,$a(rt)),onDoubleClick:Pt?()=>{var rt;return(rt=e.onOpenFile)==null?void 0:rt.call(e,Pt)}:void 0,onContextMenu:B("S",N.id,Pt),children:[f.jsx("title",{children:`${Ye(N.path)}${Kt}
89
- 依存先 ${fe}
90
- クリックで${Tt?"この箱に出入りする":"ここから出る"}依存をすべて選択${vn}${gr.dbl}
91
- 右クリックで${gr.menu}線を非表示 / 表示`}),f.jsx("rect",{x:xe,y:ie,width:nt,height:ct,rx:6}),N.canOpen&&f.jsxs("g",{className:"pchev",onClick:rt=>{rt.stopPropagation(),e.onToggleSource(N.id,!N.open)},onDoubleClick:fs,children:[f.jsx("title",{children:N.open?"まとめる":`開いて、${Yt}に分ける`}),f.jsx("rect",{x:xe,y:ie,width:10+m,height:ct}),f.jsx("text",{x:xe+8,y:ie+ct/2+4,children:N.open?"▾":"▸"})]}),f.jsxs("text",{x:xe+10+m,y:ie+ct/2+4,className:"plabel",children:[ve(N.label,nt-J-m-Xn(N.suffix??"")-(Gt?Xn(" 依存なし"):0)),N.suffix&&f.jsx("tspan",{className:"psuffix",children:N.suffix}),Gt&&f.jsx("tspan",{className:"pnone",children:" 依存なし"})]}),N.isPin&&f.jsxs("g",{className:"pbtn",onClick:rt=>{rt.stopPropagation(),e.onTogglePin(N.id)},onDoubleClick:fs,children:[f.jsx("title",{children:"ピン留め中(クリックでピン留めを外す)"}),f.jsx("rect",{x:ge+te-26,y:ie+4,width:20,height:ct-8,rx:4}),f.jsx(Vu,{on:N.pinned,x:ge+te-23,y:ie+ct/2-7})]})]},N.id)}),u.targets.map(N=>Ce(N,"target"))]})}),T&&f.jsx("div",{className:"panel-menu",style:{left:T.x,top:T.y},role:"menu",onPointerDown:N=>N.stopPropagation(),children:(()=>{const N=Ip(e.hidden,T.col,T.id),ie=xe=>()=>{e.onHiddenChange(xe),F(null)},fe=T.file;return f.jsxs(f.Fragment,{children:[fe&&f.jsxs(f.Fragment,{children:[f.jsxs("button",{role:"menuitem",onClick:()=>{var xe;(xe=e.onOpenFile)==null||xe.call(e,fe),F(null)},children:[f.jsx(yd,{size:14}),T.openAs]}),f.jsx("div",{className:"panel-menu-sep",role:"separator"})]}),N?f.jsxs("button",{role:"menuitem",onClick:ie(nc(e.hidden,T.col,T.id)),children:[f.jsx(ka,{on:!0}),"表示"]}):f.jsxs("button",{role:"menuitem",onClick:ie(new Set([...e.hidden,Vb(T.col,T.id)])),children:[f.jsx(ka,{on:!1}),"非表示"]}),f.jsxs("button",{role:"menuitem",disabled:e.hidden.size===0,onClick:ie(new Set),children:[f.jsx(ka,{on:!0}),"すべて表示"]})]})})()})]})}const fl=340,Fp=220,Dp=360,zp=260,Qy="depshape.layout";function n1(){try{const e=JSON.parse(localStorage.getItem(Qy)??"{}");return{tree:typeof e.tree=="number"&&e.tree>0?e.tree:void 0,side:typeof e.side=="number"&&e.side>0?e.side:fl}}catch{return{side:fl}}}function ps(e){try{localStorage.setItem(Qy,JSON.stringify(e))}catch{}}function hs(e,t,n){const r=Mr*(n?2:1);let i=e.side;n&&(i=Math.max(zp,Math.min(i,t-r-Fp-Dp)));const o=t-r-(n?i:0);return{tree:e.tree===void 0?void 0:Math.max(Fp,Math.min(e.tree,o-Dp)),side:Math.max(zp,i)}}function r1(e,t){const n=e.tree===void 0?"minmax(0, 1fr)":`${e.tree}px`,r=e.tree===void 0?"minmax(0, 1.15fr)":"minmax(0, 1fr)";return[n,`${Mr}px`,r,...t?[`${Mr}px`,`${e.side}px`]:[]].join(" ")}const Zy="depshape.reviewed:",i1=e=>`${e.repoRoot}|${e.targetLabel}|${e.baseLabel}`,Bp=e=>jn(Zy+e,{}),o1=(e,t)=>hn(Zy+e,t);function s1(e,t){const n=new Map;for(const r of e)r.status!=="unchanged"&&n.set(r.path,[]);for(const r of t){if(r.external||r.status==="unchanged")continue;let i=n.get(r.from);i||n.set(r.from,i=[]),i.push(`${r.status==="added"?"+":"-"} ${r.to}`)}return new Map([...n].map(([r,i])=>[r,lo(i.sort())]))}function l1(e,t){const n=new Set;for(const[r,i]of e)t[r]===i&&n.add(r);return n}function Up(e,t,n){let r=!1;for(const i of t.keys())if(!(e!==""&&!i.startsWith(e+"/"))){if(!n.has(i))return!1;r=!0}return r}const Jy=e=>`import が ${e.added} 増え、${e.removed} 減った`,a1=e=>e.metaKey||e.ctrlKey||e.shiftKey;function u1(e,t){const n=new Map;for(const r of e.graph.edges){if(r.external||r.status==="unchanged")continue;const i=t.fileRep.get(r.from);if(!i)continue;let o=n.get(i);o||n.set(i,o={added:0,removed:0}),o[r.status]++}return n}const La=e=>t=>{t.stopPropagation(),e()};function c1(e){const{model:t,root:n,tree:r,open:i,mode:o,pins:s}=e,l=!!e.onOpenFile,[a,u]=z.useState(null),c=z.useRef(void 0),d=z.useRef(null),h=z.useRef(null),p=z.useRef(null),[x,v]=z.useState(n1),k=fy(p),y=z.useRef(null),m=z.useMemo(()=>[...i].sort().join("|"),[i]),g=z.useMemo(()=>[...e.collapsed].sort().join("|"),[e.collapsed]),w=z.useMemo(()=>o==="all"?Ob(n,i):Rb(t,n,e.collapsed),[t,n,r,o,m,g]),C=z.useMemo(()=>u1(t,w),[t,w]),E=z.useMemo(()=>{const q=[];let oe=!1;const me=ke=>{for(const be of ke)be.kind==="open"&&(be.collapsed?oe=!0:(q.push(be.path),me(be.children)))};return me(w.roots),{shown:q,folded:oe}},[w]),A=o==="all"?E.shown.length>0:!E.folded,_=z.useMemo(()=>new Set(s),[s]),[$,b]=z.useState(()=>new Map),O=(q,oe)=>b(me=>new Map(me).set(q,oe)),[T,F]=z.useState(()=>new Map),L=(q,oe)=>F(me=>new Map(me).set(q,oe)),[B,U]=z.useState(()=>new Set),[W,P]=z.useState([]),[G,S]=z.useState({editingId:null,body:""}),[Y,Z]=z.useState(null),[j,R]=z.useState(null),I=z.useRef(null),M=z.useMemo(()=>new Set(W),[W]),{comments:H,sidebarOpen:K,onSidebarOpen:J}=e,D=z.useMemo(()=>H.filter(q=>Ci(t,r,q)!=="resolved"),[H,t,r]),ee=z.useMemo(()=>{const q=new Map;for(const oe of D)for(const me of oe.targets)q.set(me,(q.get(me)??0)+1);return q},[D]),ue=q=>{const oe=me=>q===""||me.startsWith(q+"/");return D.filter(me=>me.targets.some(ke=>{const be=Pr(ke);return oe(Nn(be.kind==="item"?be.id:be.from.startsWith("i:")?be.to:be.from))})).length},Fe=()=>{I.current?I.current.focus():window.setTimeout(()=>{var q;return(q=I.current)==null?void 0:q.focus()},0)},_e=(q,oe)=>{if(q.length===0)return;let me=[];P(ke=>(oe?me=q.every(Ne=>ke.includes(Ne))?ke.filter(Ne=>!q.includes(Ne)):[...ke,...q.filter(Ne=>!ke.includes(Ne))]:me=ke.length===q.length&&q.every(Ne=>ke.includes(Ne))?[]:q,me)),q.length&&J(!0)},Te=()=>{P([]),S({editingId:null,body:""})},lt=z.useRef(e.active);lt.current=e.active,z.useEffect(()=>{const q=oe=>{!lt.current||document.activeElement instanceof HTMLTextAreaElement||document.activeElement instanceof HTMLInputElement||(oe.key==="Escape"&&P([]),oe.key==="c"&&!oe.metaKey&&!oe.ctrlKey&&!oe.altKey&&(oe.preventDefault(),J(!0),Fe()))};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[]);const V=()=>{if(!G.body.trim()||W.length===0)return;const q=G.editingId?H.map(oe=>oe.id===G.editingId?{...oe,targets:W,body:G.body.trim()}:oe):[...H,{id:`${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`,targets:W,body:G.body.trim(),createdAt:Date.now()}];e.onCommentsChange(q),Te()},te=q=>{const oe=q.targets.map(Pr).flatMap(ke=>ke.kind==="link"?[ke]:[]),me=oe.map(ke=>ke.from.startsWith("i:")?ke.to:ke.from);U(ke=>{let be=new Set(ke);for(const Ne of oe){const tt=Ne.from.startsWith("i:");be=nc(nc(be,tt?"I":"S",Ne.from),tt?"S":"T",Ne.to)}return be}),e.onPin(me.filter(ke=>!ke.startsWith("c:"))),F(ke=>{const be=new Map(ke);for(const Ne of me)Ne.startsWith("f:")&&be.set(`c:${Re(Ne.slice(2))}`,!0);return be}),b(ke=>{const be=new Map(ke);for(const Ne of oe){if(Ne.from.startsWith("i:")){const Xe=Ne.from.slice(2),Oe=Xe.startsWith("f:")?Re(Xe.slice(2)):Xe.slice(2);for(let Ze=Re(Oe);Ze;Ze=Re(Ze))be.set(`i:g:${Ze}`,!0);Xe.startsWith("f:")?be.set(`i:d:${Oe}`,!0).set(`i:g:${Oe}`,!0):Xe.startsWith("d:")?be.set(`i:d:${Oe}`,!1).set(`i:g:${Oe}`,!0):be.set(`i:g:${Oe}`,!1);continue}if(Ne.to.startsWith("x:"))continue;const tt=Ne.to.slice(2),Ye=Ne.to.startsWith("t:")?Re(tt):tt;for(let Xe=Re(Ye);Xe;Xe=Re(Xe))be.set(`g:${Xe}`,!0);Ne.to.startsWith("t:")?be.set(`d:${Ye}`,!0).set(`g:${Ye}`,!0):Ne.to.startsWith("d:")?be.set(`d:${Ye}`,!1).set(`g:${Ye}`,!0):be.set(`g:${Ye}`,!1)}return be}),P(q.targets)},se=q=>{te(q),S({editingId:q.id,body:q.body}),Fe()},ye=q=>{window.clearTimeout(c.current),u(q)},ge=()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>u(null),80)},de=q=>{var oe;return((oe=d.current)==null?void 0:oe.querySelector(`[data-id="${CSS.escape(q)}"]`))??null},$e=(q,oe)=>q.getBoundingClientRect().top-oe.getBoundingClientRect().top;z.useLayoutEffect(()=>{const q=d.current;if(!q||!y.current)return;const oe=de(y.current.id);oe&&(q.scrollTop+=$e(oe,q)-y.current.top),y.current=null},[w]);const pt=q=>{const oe=d.current,me=de(q.id);oe&&me&&(y.current={id:q.id,top:$e(me,oe)}),o==="changes"?e.onCollapseToggle(q.path):e.onToggle(q.path)},et=q=>q?`${t.graph.repoRoot}/${q}`:t.graph.repoRoot,qe=q=>{const oe=q.dir.stats,me=[["added","追加"],["modified","変更"],["removed","削除"]].filter(([ke])=>oe[ke]>0).map(([ke,be])=>`${be} ${oe[ke]}`);return me.length?`(${me.join("・")})`:""},X=q=>Up(q.path,e.reviewTargets,e.reviewed)?`
92
- 中の変更したファイルはすべて確認済み`:"",re=q=>{switch(q.kind){case"file":return`${et(q.path)}
93
- ${q.file.linesAfter??q.file.linesBefore} 行`;case"dir":return`${et(q.path)}
94
- ${q.dir.stats.total} ファイル${qe(q)}(クリックで開く)${X(q)}`;case"open":return`${et(q.path)}
95
- ${q.dir.stats.total} ファイル${qe(q)}(${q.collapsed?"クリックで開く":"クリックで閉じる"})${X(q)}`}},pe=q=>{var Q;const oe=q.kind==="open"&&!q.collapsed,me=q.kind==="file"?q.label:`${q.label}/`,ke=q.kind==="open"&&!q.collapsed?void 0:C.get(q.id),be=_.has(q.id),Ne=ee.get(Ui(q.id))??0,tt=q.kind==="dir"||q.kind==="open"&&q.collapsed,Ye=Ne||(tt?ue(q.path):0),Xe=q.kind==="file"&&e.reviewTargets.has(q.path),Oe=q.kind==="file"?e.openLabel(q.path):void 0,Ze=q.kind==="file"?e.reviewed.has(q.path):q.kind==="dir"||q.kind==="open"?Up(q.path,e.reviewTargets,e.reviewed):!1,wt=["trow",q.kind,q.status,(Q=q.file)!=null&&Q.isTest?"test":"",be?"pinned":"",Ze?"reviewed":"",a===q.id?"hovered":"",M.has(Ui(q.id))?"picked":"",Y!=null&&Y.has(Ui(q.id))?"lit":""].filter(Boolean).join(" ");return f.jsxs("div",{className:wt,"data-id":q.id,title:re(q),onMouseEnter:()=>ye(q.id),onMouseLeave:ge,onClick:ne=>{a1(ne)?_e([Ui(q.id)],!0):q.kind!=="file"&&pt(q)},onDoubleClick:Oe?()=>{var ne;return(ne=e.onOpenFile)==null?void 0:ne.call(e,q.path)}:void 0,children:[q.kind==="file"?f.jsxs(f.Fragment,{children:[Xe?f.jsx("input",{type:"checkbox",className:"tcheckbox",checked:Ze,onClick:ne=>ne.stopPropagation(),onDoubleClick:ne=>ne.stopPropagation(),onChange:ne=>e.onReviewed(q.path,ne.target.checked),"aria-label":`${q.path} を確認済みにする`,title:"確認済み(このファイルの依存がまた変わると外れます)"}):f.jsx("span",{className:"tcheckbox-space"}),f.jsx(bi,{status:q.status,small:!0})]}):f.jsxs(f.Fragment,{children:[f.jsx("span",{className:`tfold${oe?" open":""}`,children:f.jsx(xd,{size:12})}),q.dir&&f.jsx(bi,{status:q.status,small:!0,title:null})]}),f.jsx("span",{className:"tlabel",children:me}),f.jsx("span",{className:"tspacer"}),ke&&f.jsx($i,{stats:ke,title:Jy(ke)}),Ye>0&&f.jsx(Io,{n:Ye,title:Ne?"この行へのコメント":"この中のファイルへのコメント(未対応)"}),l&&(Oe?f.jsx("button",{className:"tbtn tdiff",onClick:La(()=>{var ne;return(ne=e.onOpenFile)==null?void 0:ne.call(e,q.path)}),title:`${Oe}(ダブルクリックでも開けます)`,"aria-label":Oe,children:f.jsx(yd,{size:13})}):f.jsx("span",{className:"tbtn-space"})),f.jsx("button",{className:"tbtn",onClick:La(()=>{P([Ui(q.id)]),J(!0),Fe()}),title:"この行にコメントを書く(⌘ / Shift + クリックで複数選択)","aria-label":"コメントする",children:f.jsx(Ti,{size:13})}),f.jsx("button",{className:`tbtn tpin${be?" on":""}`,onClick:La(()=>e.onTogglePin(q.id)),title:be?"パネルにピン留め中(クリックでピン留めを外す)":"パネルにピン留めする(表示し続ける)",children:f.jsx(Vu,{on:be})})]})},he=q=>q.map(oe=>oe.kind==="open"?f.jsxs("div",{className:`tgroup ${oe.status}${oe.full?"":" pruned"}${oe.collapsed?" collapsed":""}`,children:[pe(oe),!oe.collapsed&&f.jsx("div",{className:"tchildren",children:he(oe.children)})]},oe.id):f.jsx("div",{children:pe(oe)},oe.id));return f.jsxs("div",{className:"map",children:[f.jsxs("div",{className:`map-body${K?" with-sidebar":""}`,ref:p,style:{gridTemplateColumns:r1(k?hs(x,k,K):x,K)},children:[f.jsxs("aside",{className:"tree-col",ref:h,children:[f.jsxs("div",{className:"tree-head",children:[f.jsx("div",{className:"ds-seg tree-mode",role:"radiogroup","aria-label":"表示範囲",children:[["changes","変更","変更したファイルだけを表示(依存先は右のパネルに出ます)"],["all","全体","リポジトリ全体のツリーを表示(最初は変更のあるフォルダだけ開いています)"]].map(([q,oe,me])=>f.jsx("button",{role:"radio","aria-checked":o===q,className:o===q?"on":"",onClick:()=>e.onModeChange(q),title:me,children:oe},q))}),f.jsx("button",{className:"tree-fold",onClick:()=>e.onFold(A,E.shown),title:A?"すべてのフォルダを閉じる":o==="all"?"変更のあるフォルダを開く":"すべてのフォルダを開く",children:A?"−":"+"})]}),f.jsx("div",{className:"map-scroll tree",ref:d,onMouseLeave:ge,children:he(w.roots)})]}),f.jsx(Lo,{title:"ドラッグでツリーとパネルの幅を変える(ダブルクリックで元に戻す)",start:()=>{var q;return((q=h.current)==null?void 0:q.getBoundingClientRect().width)??0},onDrag:(q,oe)=>v(me=>hs({...me,tree:q+oe},k,K)),onEnd:()=>v(q=>(ps(q),q)),onReset:()=>v(q=>(ps({...q,tree:void 0}),{...q,tree:void 0}))}),f.jsx(t1,{model:t,tree:r,pins:s,hovered:a&&!_.has(a)?a:null,onTogglePin:e.onTogglePin,onClearPins:e.onClearPins,selection:M,litKeys:Y,commentCounts:ee,onSelectKeys:_e,onHoverKey:R,targetOpen:$,sourceOpen:T,onToggleSource:L,onToggleTarget:O,hidden:B,onHiddenChange:U,openLabel:e.openLabel,onOpenFile:e.onOpenFile}),K&&f.jsx(Lo,{title:"ドラッグでコメントの幅を変える(ダブルクリックで元に戻す)",start:()=>hs(x,k,!0).side,onDrag:(q,oe)=>v(me=>hs({...me,side:q-oe},k,!0)),onEnd:()=>v(q=>(ps(q),q)),onReset:()=>v(q=>(ps({...q,side:fl}),{...q,side:fl}))}),K&&f.jsx(Ub,{ref:I,model:t,tree:r,comments:H,selection:W,draft:G,onDraft:S,onSave:V,onCancel:Te,onRemoveTarget:q=>P(oe=>oe.filter(me=>me!==q)),onClose:()=>J(!1),onShow:te,onEdit:se,onDelete:q=>{e.onCommentsChange(H.filter(oe=>oe.id!==q)),G.editingId===q&&Te()},hoveredKeys:j,onHoverComment:q=>Z(q?new Set(q):null)})]}),f.jsx("div",{className:"legend",children:f.jsxs("span",{className:"muted",children:["行にホバーすると右のパネルに依存先が出ます ・ ピンのアイコンでピン留めし、複数並べて比べられます ・ 矢印や箱のクリック(⌘ / Shift で複数)・行の吹き出しでコメント(c キーで入力欄へ)・ 「+n 依存」= 今回増えた import ・",o==="changes"?" 変更していないファイルは「全体」で表示":" フォルダをクリックで開閉"]})})]})}function d1({data:e,active:t,onComments:n,modules:r,openIn:i}){const o=e.repoRoot,[s,l]=gp(`depshape.expanded:${o}`),[a,u]=gp(`depshape.collapsed:${o}`),c=`depshape.pins:${o}`,[d,h]=z.useState(()=>f1(jn(c,[])));z.useEffect(()=>hn(c,d),[c,d]);const p=`depshape.comments:${o}|${e.targetLabel}|${e.baseLabel}`,[x,v]=z.useState(()=>vd(p)),[k,y]=z.useState(Yy("mapMode","changes")),[m,g]=z.useState(!1),w=z.useMemo(()=>Nb(e),[e]),C=z.useMemo(()=>jb(w),[w]),E=i1(e),[A,_]=z.useState(()=>Bp(E));z.useEffect(()=>_(Bp(E)),[E]);const $=z.useMemo(()=>s1(e.files,e.edges),[e]),b=z.useMemo(()=>l1($,A),[$,A]),O=z.useCallback((M,H)=>{const K=$.get(M);K&&_(J=>{const D={...J};return H?D[M]=K:delete D[M],o1(E,D),D})},[$,E]),T=z.useCallback(M=>{v(M),wd(p,M)},[p]);z.useEffect(()=>{const M=x.filter(H=>Ci(w,C.byPath,H)!=="resolved").length;n({open:M,prompt:()=>Gy(w,C.byPath,x,{header:!1}).text})},[x,w,C,n]);const F=z.useCallback(M=>u(H=>{const K=new Set(H);return K.has(M)?K.delete(M):K.add(M),K}),[u]),L=z.useCallback(M=>h(H=>[...H,...M.filter(K=>!H.includes(K))]),[]),B=z.useCallback(M=>h(H=>H.includes(M)?H.filter(K=>K!==M):[...H,M]),[]),U=z.useCallback(M=>l(H=>{const K=new Set(H);if(K.has(M))for(const J of[...K])(J===M||J.startsWith(M+"/"))&&K.delete(J);else K.add(M);return K}),[l]),W=r.includes("file"),P=z.useCallback(M=>{const H=w.fileByPath.get(M);if(!(!W||!H))return H.status==="unchanged"?"ファイルを開く":"差分を開く"},[w,W]),G=z.useMemo(()=>W?M=>i("file",M):null,[W,i]),S=z.useMemo(()=>{const M=new Set;for(const H of w.changedDirs){M.add(H);for(const K of Py(H))M.add(K)}return M},[w]),Y=z.useRef(!1);z.useEffect(()=>{k!=="all"||Y.current||(Y.current=!0,s.size===0&&l(new Set(S)))},[k,s,S,l]);const Z=(M,H)=>{k==="all"?l(M?new Set:new Set(S)):u(M?new Set(H):new Set)},j=p1(w.graph.files),R=x.filter(M=>Ci(w,C.byPath,M)!=="resolved").length,I=h1(w.graph.edges);return f.jsxs("div",{className:"app",children:[f.jsxs(Sd,{children:[f.jsxs(Cd,{children:[f.jsx(Ei,{children:"ファイル"}),f.jsx(Ed,{stats:j,unit:"ファイル",showZero:!0}),f.jsx(Nd,{}),f.jsx(Ei,{children:"依存"}),f.jsx($i,{stats:I,title:Jy(I),showZero:!0})]}),f.jsx(jd,{}),f.jsx(_d,{done:b.size,total:$.size,title:"確認済みにした、変更したファイル(そのファイルの依存がまた変わると外れます)"}),f.jsxs("button",{className:`ds-btn${m?" on":""}`,onClick:()=>g(!m),title:"コメントのサイドバーを開閉",children:[f.jsx(Ti,{size:13}),"コメント ",x.length,x.length>0&&f.jsxs("span",{className:"muted",children:["(未対応 ",R,")"]})]})]}),f.jsx("main",{children:f.jsx(c1,{model:w,root:C.root,tree:C.byPath,mode:k,onModeChange:M=>{y(M),Xy("mapMode",M)},open:s,onToggle:U,collapsed:a,onCollapseToggle:F,onFold:Z,pins:d,onTogglePin:B,onClearPins:()=>h([]),onPin:L,reviewTargets:$,reviewed:b,onReviewed:O,comments:x,onCommentsChange:T,sidebarOpen:m,onSidebarOpen:g,active:t,openLabel:P,onOpenFile:G})})]})}const f1=e=>Array.isArray(e)?e.filter(t=>typeof t=="string"):[];function p1(e){const t={added:0,modified:0,removed:0};for(const n of e)n.status!=="unchanged"&&t[n.status]++;return t}function h1(e){const t={added:0,removed:0};for(const n of e)!n.external&&n.status!=="unchanged"&&t[n.status]++;return t}const m1={id:"dep",title:"依存",description:"コードの依存関係(depshape): フォルダ・ファイルの import の変化",icon:r0,View:d1,badge:e=>e.files.filter(t=>t.status!=="unchanged").length||void 0},ex=(e,t)=>`path=${encodeURIComponent(e)}&side=${t}`;async function tx(e,t){const n=await fetch(`/api/module/file/content?${ex(e,t)}`);if(!n.ok)throw new Error(await n.text());return(await n.json()).lines}async function g1(){const e=await fetch("/api/module/file/files");if(!e.ok)throw new Error(await e.text());return(await e.json()).paths}async function y1(e){const t=await fetch(`/api/module/file/plain?path=${encodeURIComponent(e)}`);if(t.status===404)return null;if(!t.ok)throw new Error(await t.text());return await t.json()}const nx=(e,t,n)=>`/api/module/file/raw?${ex(e,t)}&v=${n}`,x1=/\.(png|jpe?g|gif|webp|avif|bmp|ico|svg)$/i,rc=e=>x1.test(e),v1=e=>/\.(md|markdown|mdx)$/i.test(e),Tr=e=>!!e.file||!!e.plain;function Hp(e,t=[]){const n={name:"",path:"",children:[]},r=new Map([[n,new Map]]),i=new Set(e.map(s=>s.path)),o=(s,l)=>{const a=s.split("/");let u=n;for(let c=0;c<a.length-1;c++){const d=r.get(u);let h=d.get(a[c]);h||(h={name:a[c],path:a.slice(0,c+1).join("/"),children:[]},u.children.push(h),d.set(a[c],h),r.set(h,new Map)),u=h}u.children.push({name:a[a.length-1],path:s,children:[],...l})};for(const s of e)o(s.path,{file:s});for(const s of t)i.has(s)||o(s,{plain:!0});return ix(rx(n))}function rx(e){let t={...e,children:e.children.map(rx)};for(;t.path!==""&&!Tr(t)&&t.children.length===1&&!Tr(t.children[0]);){const n=t.children[0];t={...n,name:`${t.name}/${n.name}`}}return t}function ix(e){const t=e.children.map(ix).sort((n,r)=>Tr(n)!==Tr(r)?Tr(n)?1:-1:n.name.localeCompare(r.name));return{...e,children:t}}function ox(e){return e.file?[e.file]:e.children.flatMap(ox)}function sx(e){return Tr(e)?[]:[...e.path?[e.path]:[],...e.children.flatMap(sx)]}function w1(e){const t=new Set,n=r=>{if(Tr(r))return!!r.file&&!r.file.unchanged;let i=!1;for(const o of r.children)n(o)&&(i=!0);return i&&r.path&&t.add(r.path),i};return n(e),t}function lx(e,t){const n=t.trim().toLowerCase();if(!n)return e;if(e.file)return e.file.path.toLowerCase().includes(n)||(e.file.oldPath??"").toLowerCase().includes(n)?e:null;if(e.plain)return e.path.toLowerCase().includes(n)?e:null;const r=e.children.map(i=>lx(i,n)).filter(i=>i!==null);return r.length||e.path===""?{...e,children:r}:null}const Ia=(e,t)=>t===0?e+1:e,Aa=(e,t)=>t===0?e:e+t-1,k1=e=>!e.unchanged&&e.status!=="added"&&e.status!=="removed"&&!e.binary&&!e.large&&e.chunks.length>0;function Wp(e,t){const n={path:e,status:"modified",additions:0,deletions:0,unchanged:!0};if(!t)return{...n,chunks:[],loading:!0};if(t.binary)return{...n,chunks:[],binary:!0};if(t.large||!t.lines)return{...n,chunks:[],large:!0};const r=t.lines.length;if(r===0)return{...n,chunks:[]};const i=t.lines.map((o,s)=>({type:"normal",content:o,oldLine:s+1,newLine:s+1}));return{...n,chunks:[{section:"",oldStart:1,oldLines:r,newStart:1,newLines:r,lines:i}]}}function Dl(e,t){if(!k1(e))return[];const n=e.chunks;return Array.from({length:n.length+1},(r,i)=>{const o=n[i-1],s=n[i],l=o?Aa(o.newStart,o.newLines)+1:1,a=s?Ia(s.newStart,s.newLines)-1:t,u=o?Aa(o.oldStart,o.oldLines)-Aa(o.newStart,o.newLines):Ia(s.oldStart,s.oldLines)-Ia(s.newStart,s.newLines);return{index:i,from:l,to:a,delta:u}})}const kr=20,Vp=(e,t)=>e.to===void 0?void 0:Math.max(0,e.to-e.from+1-((t==null?void 0:t.top)??0)-((t==null?void 0:t.bottom)??0));function b1(e,t,n){if(e.unchanged)return e.chunks.flatMap(l=>l.lines.map(a=>({kind:"line",line:a})));const r=[],i=Dl(e,t==null?void 0:t.length),o=(l,a,u)=>{if(t)for(let c=a;c<=u;c++)t[c-1]!==void 0&&r.push({kind:"line",opened:!0,line:{type:"normal",content:t[c-1],oldLine:c+l.delta,newLine:c}})};e.chunks.forEach((l,a)=>{const u=i[a];if(u){const c=t?n[a]:void 0,d=Vp(u,c),h=Math.min((c==null?void 0:c.top)??0,u.to-u.from+1);o(u,u.from,u.from+h-1),(d>0||a===0)&&r.push({kind:"gap",gap:u,hidden:d,chunk:l}),o(u,u.from+h+d,u.to)}else r.push({kind:"gap",gap:{index:a,from:1,to:0,delta:0},hidden:0,chunk:l});for(const c of l.lines)r.push({kind:"line",line:c})});const s=i[e.chunks.length];if(s){const l=t?n[s.index]:void 0,a=Vp(s,l);t&&o(s,s.from,s.from+((l==null?void 0:l.top)??0)-1),(a===void 0||a>0)&&r.push({kind:"gap",gap:s,hidden:a})}return r}function E1(e,t,n,r){const i=(t.to??r)-t.from+1,o=e[t.index]??{top:0,bottom:0},s=Math.max(0,i-o.top-o.bottom),l=n==="all"?{top:i-o.bottom,bottom:o.bottom}:n==="down"?{...o,top:o.top+Math.min(kr,s)}:{...o,bottom:o.bottom+Math.min(kr,s)};return{...e,[t.index]:l}}function S1(e,t,n,r,i){let o=n;for(const s of Dl(e,t)){const l=s.to??t;if(i<s.from||r>l)continue;const a=o[s.index]??{top:0,bottom:0},u=Math.min(l-s.from+1,Math.max(a.top,Math.min(i,l)-s.from+1+3));u!==a.top&&(o={...o,[s.index]:{...a,top:u}})}return o}function ic(e,t){for(const n of Dl(e)){const r=t-n.delta;if(r>=n.from&&(n.to===void 0||r<=n.to))return r}}function ax(e){const t=[];let n=0;for(;n<e.length;){const r=e[n];if(r.type==="normal"){t.push({old:r,new:r}),n++;continue}const i=[];for(;n<e.length&&e[n].type==="delete";)i.push(e[n++]);const o=[];for(;n<e.length&&e[n].type==="add";)o.push(e[n++]);for(let s=0;s<Math.max(i.length,o.length);s++)t.push({old:i[s],new:o[s]})}return t}const Gp=500,Kp=e=>e.match(/[\p{L}\p{N}_]+|\s+|[^\p{L}\p{N}_\s]/gu)??[];function C1(e,t){if(!e.trim()||!t.trim()||e===t||e.length>Gp||t.length>Gp)return;const n=Kp(e),r=Kp(t),i=r.length+1,o=new Uint16Array((n.length+1)*i);for(let d=n.length-1;d>=0;d--)for(let h=r.length-1;h>=0;h--)o[d*i+h]=n[d]===r[h]?o[(d+1)*i+h+1]+1:Math.max(o[(d+1)*i+h],o[d*i+h+1]);const s=new Array(n.length).fill(!1),l=new Array(r.length).fill(!1);for(let d=0,h=0;d<n.length&&h<r.length;)n[d]===r[h]?(s[d++]=!0,l[h++]=!0):o[(d+1)*i+h]>=o[d*i+h+1]?d++:h++;const a=d=>d.trim().length,u=n.reduce((d,h,p)=>d+(s[p]?a(h):0),0),c=n.reduce((d,h)=>d+a(h),0)+r.reduce((d,h)=>d+a(h),0);if(!(c===0||2*u/c<.4))return{old:qp(n,s),new:qp(r,l)}}function qp(e,t){t=t.map((i,o)=>i&&!(o>0&&o<e.length-1&&!e[o].trim()&&!t[o-1]&&!t[o+1]));const n=[];let r=0;return e.forEach((i,o)=>{const s=r+i.length;if(!t[o]){const l=n[n.length-1];l&&l[1]===r?l[1]=s:n.push([r,s])}r=s}),n}function N1(e){var n,r;const t=new Map;for(const i of ax(e)){if(((n=i.old)==null?void 0:n.type)!=="delete"||((r=i.new)==null?void 0:r.type)!=="add")continue;const o=C1(i.old.content,i.new.content);o&&(t.set(`old:${i.old.oldLine}`,o.old),t.set(`new:${i.new.newLine}`,o.new))}return t}function j1(e,t){if(!t.length)return e;const n=[];let r=0;for(const i of e){const o=r+i.text.length;let s=r;for(const[l,a]of t){if(a<=s||l>=o)continue;l>s&&n.push({...i,text:i.text.slice(s-r,l-r)});const u=Math.min(a,o);n.push({...i,text:i.text.slice(Math.max(l,s)-r,u-r),mark:!0}),s=u}s<o&&n.push({...i,text:i.text.slice(s-r)}),r=o}return n}function _1(e){return lo([e.status,e.oldPath??"",e.modeChange??"",e.binary?"binary":"",e.chunks.map(t=>t.lines.filter(n=>n.type!=="normal").map(n=>`${n.type==="add"?"+":"-"}${n.content}`))])}const ux=e=>e.chunks.reduce((t,n)=>t+n.lines.length,0);function T1(e){const t={added:0,modified:0,removed:0};for(const n of e)t[n.status==="renamed"?"modified":n.status]++;return t}function $1(e){return e.reduce((t,n)=>({added:t.added+n.additions,removed:t.removed+n.deletions}),{added:0,removed:0})}function Ad(e,t,n){const r=new Map;n&&t==="new"&&n.forEach((i,o)=>r.set(o+1,i));for(const i of e.chunks)for(const o of i.lines)t==="old"&&o.type!=="add"&&r.set(o.oldLine,o.content),t==="new"&&o.type!=="delete"&&r.set(o.newLine,o.content);if(n&&t==="old"){const i=Math.max(0,...e.chunks.map(o=>o.oldStart+o.oldLines))+n.length;for(let o=1;o<=i;o++){if(r.has(o))continue;const s=ic(e,o);s!==void 0&&n[s-1]!==void 0&&r.set(o,n[s-1])}}return r}const cx=e=>(e.endLine??e.line)-e.line+1;function Ao(e,t,n){if(!e)return{state:"resolved"};const r=Ad(e,t.side,n),i=t.code.split(`
96
- `),o=cx(t),s=u=>i.every((c,d)=>r.get(u+d)===c),l=(u,c)=>({state:c,line:u,...o>1?{endLine:u+o-1}:{}});if(s(t.line))return l(t.line,"open");let a;for(const[u,c]of r)c===i[0]&&s(u)&&(a===void 0||Math.abs(u-t.line)<Math.abs(a-t.line))&&(a=u);return a!==void 0?l(a,"open"):r.has(t.line)?l(t.line,"updated"):{state:"resolved"}}function Yp(e,t){const n=Ad(e,t.side);for(let r=t.line;r<=(t.endLine??t.line);r++)if(!n.has(r))return!1;return!0}const dn=(e,t)=>e.files.find(n=>n.path===t),L1=(e,t,n)=>Ao(dn(e,t.path),t,n).state;function I1(e,t,n=!1){return{id:hy(),path:e.path,side:e.side,line:e.line,...e.endLine&&e.endLine!==e.line?{endLine:e.endLine}:{},code:e.code,body:t,createdAt:Date.now(),...n?{unchanged:!0}:{}}}const oc=(e,t,n,r)=>`${e}:L${n}${r&&r!==n?`-L${r}`:""}${t==="old"?" (old)":""}`,A1={old:"変更前",new:"変更後"},pl=(e,t,n,r)=>{const i=`${n&&n!==t?`${t}〜${n}`:t} 行目`;return r?`${i}(変更なし)`:`${A1[e]}の ${i}`},Oa=(e,t)=>{const n=t.split(`
97
- `);return n.length===1?[` ${e}: ${t.trim()}`]:[` ${e}:`," ```",...n.map(r=>` ${r}`)," ```"]};function dx(e,t,n={}){const r=t.map(s=>{var l;return{c:s,at:Ao(dn(e,s.path),s,(l=n.contents)==null?void 0:l.get(s.path))}}),i=n.includeResolved?r:r.filter(s=>s.at.state!=="resolved"),o=n.header===!1?[]:[...Ml(e),"対象: ファイルの差分(fileshape)",""];return i.forEach(({c:s,at:l},a)=>{var d;const u=l.line??s.line,c=l.line!==void 0?l.endLine:s.endLine;if(o.push(`${a+1}. ${oc(s.path,s.side,u,c)}(${pl(s.side,u,c,s.unchanged)})${l.state==="resolved"?"(解消済み?)":""}`),l.state==="updated"){const h=Ad(dn(e,s.path),s.side,(d=n.contents)==null?void 0:d.get(s.path)),p=Array.from({length:cx(s)},(x,v)=>h.get(u+v)??"").join(`
98
- `);o.push(...Oa("コード",p),...Oa("コメントしたときは",s.code))}else o.push(...Oa("コード",s.code));o.push(` コメント: ${s.body.trim().replace(/\n/g,`
99
- `)}`,"")}),{text:o.join(`
100
- `).trimEnd()+`
101
- `,included:i.length,skipped:t.length-i.length}}const fx="fileshape.comments:",O1=e=>vd(fx+e),R1=(e,t)=>wd(fx+e,t),px=z.createContext(null),Od=()=>z.useContext(px),Vr=(e,t)=>`${e}:${t}`;function M1({comments:e,composing:t}){var r;const n=Od();return f.jsxs("div",{className:"fs-thread",children:[e.map(i=>n.editing===i.id?f.jsx(sc,{initial:i.body,label:pl(i.side,i.line,i.endLine,i.unchanged),onSave:o=>n.update(i.id,o),onCancel:()=>n.edit(null)},i.id):f.jsx(Rd,{c:i},i.id)),t&&f.jsx(sc,{initial:"",label:pl(t.side,t.line,t.endLine,!!((r=dn(n.run,t.path))!=null&&r.unchanged)),onSave:i=>n.add(t,i),onCancel:()=>n.compose(null)})]})}function Rd({c:e,showWhere:t}){const n=Od(),r=Ao(dn(n.run,e.path),e,n.contents.get(e.path));if(t&&n.editing===e.id)return f.jsx(sc,{initial:e.body,label:oc(e.path,e.side,e.line,e.endLine),onSave:o=>n.update(e.id,o),onCancel:()=>n.edit(null)});const i=e.endLine!==void 0&&e.endLine!==e.line;return f.jsx(kd,{body:e.body,state:r.state,top:t?f.jsxs("span",{className:"fs-comment-where",children:[oc(e.path,e.side,e.line,e.endLine)," ",f.jsx("code",{children:e.code.split(`
102
- `)[0].trim()||"(空行)"}),i&&f.jsx("span",{className:"ds-muted",children:" ほか"})]}):i?f.jsx("span",{className:"ds-muted",children:pl(e.side,r.line??e.line,r.line!==void 0?r.endLine:e.endLine,e.unchanged)}):void 0,stateTitle:r.state==="updated"?`コメントしたときは: ${e.code.trim()}`:r.state==="resolved"?"この行は差分からなくなりました":void 0,onCopy:()=>zo(dx(n.run,[e],{includeResolved:!0,contents:n.contents}).text),onEdit:()=>n.edit(e.id),onDelete:()=>n.remove(e.id)})}function sc({initial:e,label:t,onSave:n,onCancel:r}){const[i,o]=z.useState(e);return f.jsx(bd,{autoFocus:!0,editing:e!=="",top:f.jsxs("span",{className:"ds-muted",children:[t,e===""&&"(行番号を Shift+クリックかドラッグすると範囲になります)"]}),value:i,placeholder:"気になる点や直してほしいこと",onChange:o,onSave:()=>i.trim()&&n(i.trim()),onCancel:r})}const P1=e=>Math.min(e.a,e.b),F1=e=>Math.max(e.a,e.b),Hi=(e,t)=>e==="old"?t.type!=="add"?t.oldLine:void 0:t.type!=="delete"?t.newLine:void 0,D1=z.memo(function({file:t,mode:n,rows:r,tokens:i,byLine:o,onExpand:s}){var O;const l=Od(),a=((O=l.composing)==null?void 0:O.path)===t.path?l.composing:null,u=z.useMemo(()=>{const T=new Map;for(const F of t.chunks)for(const[L,B]of N1(F.lines))T.set(L,B);return T},[t]),c=z.useMemo(()=>{const T={old:new Map,new:new Map};for(const F of r)if(F.kind==="line")for(const L of["old","new"]){const B=Hi(L,F.line);B!==void 0&&T[L].set(B,F.line.content)}return T},[r]),d=(T,F,L)=>{const B=Math.min(F,L),U=Math.max(F,L),W=[];let P=B;for(let G=B;G<=U;G++){const S=c[T].get(G);if(S===void 0)break;W.push(S),P=G}return{path:t.path,side:T,line:B,...P>B?{endLine:P}:{},code:W.join(`
103
- `)}},[h,p]=z.useState(null),x=z.useRef(null);x.current=h;const v=z.useRef(()=>{});v.current=()=>{const T=x.current;p(null),T&&l.compose(d(T.side,T.a,T.b))};const k=h!==null;z.useEffect(()=>{if(!k)return;const T=()=>v.current();return window.addEventListener("mouseup",T),()=>window.removeEventListener("mouseup",T)},[k]);const y=h??(a?{side:a.side,a:a.line,b:a.endLine??a.line}:null),m=(T,F)=>!!y&&F!==void 0&&y.side===T&&F>=P1(y)&&F<=F1(y),g=(T,F)=>{const L=F?Hi(T,F):void 0;return!F||L===void 0?f.jsx("td",{className:"fs-num empty"}):f.jsx("td",{className:`fs-num${m(T,L)?" selected":""}`,onMouseDown:B=>{if(B.button===0){if(B.preventDefault(),B.shiftKey&&a&&a.side===T){l.compose(d(T,a.line,L));return}p({side:T,a:L,b:L})}},onMouseEnter:()=>{x.current&&x.current.side===T&&p({...x.current,b:L})},title:`${T==="old"?"変更前":"変更後"}の ${L} 行目にコメントする(Shift+クリックかドラッグで範囲)`,children:L})},w=(T,F)=>{const L=Hi(T,F),B=(F.type==="normal"?(i==null?void 0:i.get(Vr("new",F.newLine)))??(i==null?void 0:i.get(Vr("old",F.oldLine))):i==null?void 0:i.get(Vr(T,L)))??[{types:"",text:F.content}];return j1(B,u.get(Vr(T,L))??[]).map((W,P)=>{const G=[W.types?`token ${W.types}`:"",W.mark?`fs-word ${T}`:""].filter(Boolean).join(" ");return G?f.jsx("span",{className:G,children:W.text},P):f.jsx(z.Fragment,{children:W.text},P)})},C=(T,F)=>{const L=[...new Set(T.flatMap(([W,P])=>o.get(Vr(W,P))??[]))],B=a?a.endLine??a.line:void 0,U=a&&T.some(([W,P])=>a.side===W&&B===P)?a:void 0;return!L.length&&!U?null:f.jsx("tr",{className:"fs-thread-row",children:f.jsx("td",{colSpan:F,children:f.jsx(M1,{comments:L,composing:U})})})},E=(T,F,L)=>{const{gap:B,hidden:U,chunk:W}=T,P=B.index>0,G=!!W,S=(Z,j,R)=>f.jsx("button",{className:"fs-expand",onClick:()=>s(B,Z),title:R,"aria-label":R,children:j}),Y=U===void 0||U>0;return f.jsx("tr",{className:"fs-hunk",children:f.jsxs("td",{colSpan:F,children:[f.jsx("span",{className:"fs-expanders",children:Y&&(U!==void 0&&U<=kr&&P&&G?S("all","↕",`${U} 行をすべて表示`):[G&&S("up","↑",`上の ${Math.min(kr,U??kr)} 行を表示`),P&&S("down","↓",U===void 0?"下の行を表示":`下の ${Math.min(kr,U)} 行を表示`),U!==void 0&&U>kr&&S("all","⇕",`${U} 行をすべて表示`)].filter(Boolean).map((Z,j)=>f.jsx(z.Fragment,{children:Z},j)))}),W?f.jsxs(f.Fragment,{children:["@@ -",W.oldStart,",",W.oldLines," +",W.newStart,",",W.newLines," @@",W.section&&f.jsxs("span",{className:"fs-hunk-section",children:[" ",W.section]})]}):f.jsx("span",{children:U===void 0?"ファイルの残りを表示":`残り ${U} 行`})]})},`g${L}`)};if(n==="unified"){const T=!!t.unchanged,F=T?3:4;return f.jsxs("table",{className:`fs-table unified${T?" plain":""}`,children:[f.jsxs("colgroup",{children:[!T&&f.jsx("col",{className:"fs-col-num"}),f.jsx("col",{className:"fs-col-num"}),f.jsx("col",{className:"fs-col-sign"}),f.jsx("col",{})]}),f.jsx("tbody",{children:r.map((L,B)=>{if(L.kind==="gap")return E(L,F,B);const U=L.line,W=U.type==="delete"?"old":"new",P=T?[["new",U.newLine]]:U.type==="normal"?[["old",U.oldLine],["new",U.newLine]]:[[W,Hi(W,U)]],G=P.some(([S,Y])=>m(S,Y));return f.jsxs(z.Fragment,{children:[f.jsxs("tr",{className:`fs-line ${U.type}${L.opened?" opened":""}${G?" selected":""}`,children:[!T&&g("old",U.type==="add"?void 0:U),g("new",U.type==="delete"?void 0:U),f.jsx("td",{className:"fs-sign",children:U.type==="add"?"+":U.type==="delete"?"-":" "}),f.jsx("td",{className:"fs-code",children:w(W,U)})]}),C(P,F)]},B)})})]})}const A=[];let _=[],$=new Set;const b=()=>{ax(_).forEach((T,F)=>{var U,W;const L=[];T.old&&L.push(["old",T.old.oldLine]),T.new&&L.push(["new",T.new.newLine]);const B=(P,G)=>`${P?P.type:"empty"}${P&&m(G,Hi(G,P))?" selected":""}`;A.push(f.jsxs(z.Fragment,{children:[f.jsxs("tr",{className:`fs-line${T.old&&$.has(T.old)?" opened":""}`,children:[g("old",T.old),f.jsx("td",{className:`fs-sign ${B(T.old,"old")}`,children:((U=T.old)==null?void 0:U.type)==="delete"?"-":" "}),f.jsx("td",{className:`fs-code ${B(T.old,"old")}`,children:T.old&&w("old",T.old)}),g("new",T.new),f.jsx("td",{className:`fs-sign ${B(T.new,"new")}`,children:((W=T.new)==null?void 0:W.type)==="add"?"+":" "}),f.jsx("td",{className:`fs-code ${B(T.new,"new")}`,children:T.new&&w("new",T.new)})]}),C(L,6)]},`l${A.length}-${F}`))}),_=[],$=new Set};return r.forEach((T,F)=>{T.kind==="gap"?(b(),A.push(E(T,6,F))):(_.push(T.line),T.opened&&$.add(T.line))}),b(),f.jsxs("table",{className:"fs-table split",children:[f.jsxs("colgroup",{children:[f.jsx("col",{className:"fs-col-num"}),f.jsx("col",{className:"fs-col-sign"}),f.jsx("col",{className:"fs-col-half"}),f.jsx("col",{className:"fs-col-num"}),f.jsx("col",{className:"fs-col-sign"}),f.jsx("col",{className:"fs-col-half"})]}),f.jsx("tbody",{children:A})]})});var hx={exports:{}};(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
104
- * Prism: Lightweight, robust, elegant syntax highlighting
105
- *
106
- * @license MIT <https://opensource.org/licenses/MIT>
107
- * @author Lea Verou <https://lea.verou.me>
108
- * @namespace
109
- * @public
110
- */var n=function(r){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,s={},l={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function m(g){return g instanceof a?new a(g.type,m(g.content),g.alias):Array.isArray(g)?g.map(m):g.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(m){return Object.prototype.toString.call(m).slice(8,-1)},objId:function(m){return m.__id||Object.defineProperty(m,"__id",{value:++o}),m.__id},clone:function m(g,w){w=w||{};var C,E;switch(l.util.type(g)){case"Object":if(E=l.util.objId(g),w[E])return w[E];C={},w[E]=C;for(var A in g)g.hasOwnProperty(A)&&(C[A]=m(g[A],w));return C;case"Array":return E=l.util.objId(g),w[E]?w[E]:(C=[],w[E]=C,g.forEach(function(_,$){C[$]=m(_,w)}),C);default:return g}},getLanguage:function(m){for(;m;){var g=i.exec(m.className);if(g)return g[1].toLowerCase();m=m.parentElement}return"none"},setLanguage:function(m,g){m.className=m.className.replace(RegExp(i,"gi"),""),m.classList.add("language-"+g)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(C){var m=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(C.stack)||[])[1];if(m){var g=document.getElementsByTagName("script");for(var w in g)if(g[w].src==m)return g[w]}return null}},isActive:function(m,g,w){for(var C="no-"+g;m;){var E=m.classList;if(E.contains(g))return!0;if(E.contains(C))return!1;m=m.parentElement}return!!w}},languages:{plain:s,plaintext:s,text:s,txt:s,extend:function(m,g){var w=l.util.clone(l.languages[m]);for(var C in g)w[C]=g[C];return w},insertBefore:function(m,g,w,C){C=C||l.languages;var E=C[m],A={};for(var _ in E)if(E.hasOwnProperty(_)){if(_==g)for(var $ in w)w.hasOwnProperty($)&&(A[$]=w[$]);w.hasOwnProperty(_)||(A[_]=E[_])}var b=C[m];return C[m]=A,l.languages.DFS(l.languages,function(O,T){T===b&&O!=m&&(this[O]=A)}),A},DFS:function m(g,w,C,E){E=E||{};var A=l.util.objId;for(var _ in g)if(g.hasOwnProperty(_)){w.call(g,_,g[_],C||_);var $=g[_],b=l.util.type($);b==="Object"&&!E[A($)]?(E[A($)]=!0,m($,w,null,E)):b==="Array"&&!E[A($)]&&(E[A($)]=!0,m($,w,_,E))}}},plugins:{},highlightAll:function(m,g){l.highlightAllUnder(document,m,g)},highlightAllUnder:function(m,g,w){var C={callback:w,container:m,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};l.hooks.run("before-highlightall",C),C.elements=Array.prototype.slice.apply(C.container.querySelectorAll(C.selector)),l.hooks.run("before-all-elements-highlight",C);for(var E=0,A;A=C.elements[E++];)l.highlightElement(A,g===!0,C.callback)},highlightElement:function(m,g,w){var C=l.util.getLanguage(m),E=l.languages[C];l.util.setLanguage(m,C);var A=m.parentElement;A&&A.nodeName.toLowerCase()==="pre"&&l.util.setLanguage(A,C);var _=m.textContent,$={element:m,language:C,grammar:E,code:_};function b(T){$.highlightedCode=T,l.hooks.run("before-insert",$),$.element.innerHTML=$.highlightedCode,l.hooks.run("after-highlight",$),l.hooks.run("complete",$),w&&w.call($.element)}if(l.hooks.run("before-sanity-check",$),A=$.element.parentElement,A&&A.nodeName.toLowerCase()==="pre"&&!A.hasAttribute("tabindex")&&A.setAttribute("tabindex","0"),!$.code){l.hooks.run("complete",$),w&&w.call($.element);return}if(l.hooks.run("before-highlight",$),!$.grammar){b(l.util.encode($.code));return}if(g&&r.Worker){var O=new Worker(l.filename);O.onmessage=function(T){b(T.data)},O.postMessage(JSON.stringify({language:$.language,code:$.code,immediateClose:!0}))}else b(l.highlight($.code,$.grammar,$.language))},highlight:function(m,g,w){var C={code:m,grammar:g,language:w};if(l.hooks.run("before-tokenize",C),!C.grammar)throw new Error('The language "'+C.language+'" has no grammar.');return C.tokens=l.tokenize(C.code,C.grammar),l.hooks.run("after-tokenize",C),a.stringify(l.util.encode(C.tokens),C.language)},tokenize:function(m,g){var w=g.rest;if(w){for(var C in w)g[C]=w[C];delete g.rest}var E=new d;return h(E,E.head,m),c(m,E,g,E.head,0),x(E)},hooks:{all:{},add:function(m,g){var w=l.hooks.all;w[m]=w[m]||[],w[m].push(g)},run:function(m,g){var w=l.hooks.all[m];if(!(!w||!w.length))for(var C=0,E;E=w[C++];)E(g)}},Token:a};r.Prism=l;function a(m,g,w,C){this.type=m,this.content=g,this.alias=w,this.length=(C||"").length|0}a.stringify=function m(g,w){if(typeof g=="string")return g;if(Array.isArray(g)){var C="";return g.forEach(function(b){C+=m(b,w)}),C}var E={type:g.type,content:m(g.content,w),tag:"span",classes:["token",g.type],attributes:{},language:w},A=g.alias;A&&(Array.isArray(A)?Array.prototype.push.apply(E.classes,A):E.classes.push(A)),l.hooks.run("wrap",E);var _="";for(var $ in E.attributes)_+=" "+$+'="'+(E.attributes[$]||"").replace(/"/g,"&quot;")+'"';return"<"+E.tag+' class="'+E.classes.join(" ")+'"'+_+">"+E.content+"</"+E.tag+">"};function u(m,g,w,C){m.lastIndex=g;var E=m.exec(w);if(E&&C&&E[1]){var A=E[1].length;E.index+=A,E[0]=E[0].slice(A)}return E}function c(m,g,w,C,E,A){for(var _ in w)if(!(!w.hasOwnProperty(_)||!w[_])){var $=w[_];$=Array.isArray($)?$:[$];for(var b=0;b<$.length;++b){if(A&&A.cause==_+","+b)return;var O=$[b],T=O.inside,F=!!O.lookbehind,L=!!O.greedy,B=O.alias;if(L&&!O.pattern.global){var U=O.pattern.toString().match(/[imsuy]*$/)[0];O.pattern=RegExp(O.pattern.source,U+"g")}for(var W=O.pattern||O,P=C.next,G=E;P!==g.tail&&!(A&&G>=A.reach);G+=P.value.length,P=P.next){var S=P.value;if(g.length>m.length)return;if(!(S instanceof a)){var Y=1,Z;if(L){if(Z=u(W,G,m,F),!Z||Z.index>=m.length)break;var M=Z.index,j=Z.index+Z[0].length,R=G;for(R+=P.value.length;M>=R;)P=P.next,R+=P.value.length;if(R-=P.value.length,G=R,P.value instanceof a)continue;for(var I=P;I!==g.tail&&(R<j||typeof I.value=="string");I=I.next)Y++,R+=I.value.length;Y--,S=m.slice(G,R),Z.index-=G}else if(Z=u(W,0,S,F),!Z)continue;var M=Z.index,H=Z[0],K=S.slice(0,M),J=S.slice(M+H.length),D=G+S.length;A&&D>A.reach&&(A.reach=D);var ee=P.prev;K&&(ee=h(g,ee,K),G+=K.length),p(g,ee,Y);var ue=new a(_,T?l.tokenize(H,T):H,B,H);if(P=h(g,ee,ue),J&&h(g,P,J),Y>1){var Fe={cause:_+","+b,reach:D};c(m,g,w,P.prev,G,Fe),A&&Fe.reach>A.reach&&(A.reach=Fe.reach)}}}}}}function d(){var m={value:null,prev:null,next:null},g={value:null,prev:m,next:null};m.next=g,this.head=m,this.tail=g,this.length=0}function h(m,g,w){var C=g.next,E={value:w,prev:g,next:C};return g.next=E,C.prev=E,m.length++,E}function p(m,g,w){for(var C=g.next,E=0;E<w&&C!==m.tail;E++)C=C.next;g.next=C,C.prev=g,m.length-=E}function x(m){for(var g=[],w=m.head.next;w!==m.tail;)g.push(w.value),w=w.next;return g}if(!r.document)return r.addEventListener&&(l.disableWorkerMessageHandler||r.addEventListener("message",function(m){var g=JSON.parse(m.data),w=g.language,C=g.code,E=g.immediateClose;r.postMessage(l.highlight(C,l.languages[w],w)),E&&r.close()},!1)),l;var v=l.util.currentScript();v&&(l.filename=v.src,v.hasAttribute("data-manual")&&(l.manual=!0));function k(){l.manual||l.highlightAll()}if(!l.manual){var y=document.readyState;y==="loading"||y==="interactive"&&v&&v.defer?document.addEventListener("DOMContentLoaded",k):window.requestAnimationFrame?window.requestAnimationFrame(k):window.setTimeout(k,16)}return l}(t);e.exports&&(e.exports=n),typeof sf<"u"&&(sf.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&amp;/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(i,o){var s={};s["language-"+o]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[o]},s.cdata=/^<!\[CDATA\[|\]\]>$/i;var l={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:s}};l["language-"+o]={pattern:/[\s\S]+/,inside:n.languages[o]};var a={};a[i]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return i}),"i"),lookbehind:!0,greedy:!0,inside:l},n.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,i){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[i,"language-"+i],inside:n.languages[i]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(r){var i=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+i.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+i.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+i.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+i.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:i,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var o=r.languages.markup;o&&(o.tag.addInlined("style","css"),o.tag.addAttribute("style","css"))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",i=function(v,k){return"✖ Error "+v+" while fetching file: "+k},o="✖ Error: File does not exist or is empty",s={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},l="data-src-status",a="loading",u="loaded",c="failed",d="pre[data-src]:not(["+l+'="'+u+'"]):not(['+l+'="'+a+'"])';function h(v,k,y){var m=new XMLHttpRequest;m.open("GET",v,!0),m.onreadystatechange=function(){m.readyState==4&&(m.status<400&&m.responseText?k(m.responseText):m.status>=400?y(i(m.status,m.statusText)):y(o))},m.send(null)}function p(v){var k=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(v||"");if(k){var y=Number(k[1]),m=k[2],g=k[3];return m?g?[y,Number(g)]:[y,void 0]:[y,y]}}n.hooks.add("before-highlightall",function(v){v.selector+=", "+d}),n.hooks.add("before-sanity-check",function(v){var k=v.element;if(k.matches(d)){v.code="",k.setAttribute(l,a);var y=k.appendChild(document.createElement("CODE"));y.textContent=r;var m=k.getAttribute("data-src"),g=v.language;if(g==="none"){var w=(/\.(\w+)$/.exec(m)||[,"none"])[1];g=s[w]||w}n.util.setLanguage(y,g),n.util.setLanguage(k,g);var C=n.plugins.autoloader;C&&C.loadLanguages(g),h(m,function(E){k.setAttribute(l,u);var A=p(k.getAttribute("data-range"));if(A){var _=E.split(/\r\n?|\n/g),$=A[0],b=A[1]==null?_.length:A[1];$<0&&($+=_.length),$=Math.max(0,Math.min($-1,_.length)),b<0&&(b+=_.length),b=Math.max(0,Math.min(b,_.length)),E=_.slice($,b).join(`
111
- `),k.hasAttribute("data-start")||k.setAttribute("data-start",String($+1))}y.textContent=E,n.highlightElement(y)},function(E){k.setAttribute(l,c),y.textContent=E})}}),n.plugins.fileHighlight={highlight:function(k){for(var y=(k||document).querySelectorAll(d),m=0,g;g=y[m++];)n.highlightElement(g)}};var x=!1;n.fileHighlight=function(){x||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),x=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(hx);var z1=hx.exports;const hl=Zh(z1);(function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript})(Prism);(function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,i=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function o(a,u){return a=a.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return i}),RegExp(a,u)}i=o(i).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=o(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var s=function(a){return a?typeof a=="string"?a:typeof a.content=="string"?a.content:a.content.map(s).join(""):""},l=function(a){for(var u=[],c=0;c<a.length;c++){var d=a[c],h=!1;if(typeof d!="string"&&(d.type==="tag"&&d.content[0]&&d.content[0].type==="tag"?d.content[0].content[0].content==="</"?u.length>0&&u[u.length-1].tagName===s(d.content[0].content[1])&&u.pop():d.content[d.content.length-1].content==="/>"||u.push({tagName:s(d.content[0].content[1]),openedBraces:0}):u.length>0&&d.type==="punctuation"&&d.content==="{"?u[u.length-1].openedBraces++:u.length>0&&u[u.length-1].openedBraces>0&&d.type==="punctuation"&&d.content==="}"?u[u.length-1].openedBraces--:h=!0),(h||typeof d=="string")&&u.length>0&&u[u.length-1].openedBraces===0){var p=s(d);c<a.length-1&&(typeof a[c+1]=="string"||a[c+1].type==="plain-text")&&(p+=s(a[c+1]),a.splice(c+1,1)),c>0&&(typeof a[c-1]=="string"||a[c-1].type==="plain-text")&&(p=s(a[c-1])+p,a.splice(c-1,1),c--),a[c]=new e.Token("plain-text",p,null,p)}d.content&&typeof d.content!="string"&&l(d.content)}};e.hooks.add("after-tokenize",function(a){a.language!=="jsx"&&a.language!=="tsx"||l(a.tokens)})})(Prism);(function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var n=e.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0})(Prism);Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/});Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}});delete Prism.languages.go["class-name"];Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;(function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string})(Prism);(function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism);(function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin})(Prism);Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/};Prism.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=Prism.languages.swift});Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/});Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}});Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}});Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/});delete Prism.languages.c.boolean;(function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])})(Prism);(function(e){function t(G,S){return G.replace(/<<(\d+)>>/g,function(Y,Z){return"(?:"+S[+Z]+")"})}function n(G,S,Y){return RegExp(t(G,S),"")}function r(G,S){for(var Y=0;Y<S;Y++)G=G.replace(/<<self>>/g,function(){return"(?:"+G+")"});return G.replace(/<<self>>/g,"[^\\s\\S]")}var i={type:"bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",typeDeclaration:"class enum interface record struct",contextual:"add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",other:"abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield"};function o(G){return"\\b(?:"+G.trim().replace(/ /g,"|")+")\\b"}var s=o(i.typeDeclaration),l=RegExp(o(i.type+" "+i.typeDeclaration+" "+i.contextual+" "+i.other)),a=o(i.typeDeclaration+" "+i.contextual+" "+i.other),u=o(i.type+" "+i.typeDeclaration+" "+i.other),c=r(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),d=r(/\((?:[^()]|<<self>>)*\)/.source,2),h=/@?\b[A-Za-z_]\w*\b/.source,p=t(/<<0>>(?:\s*<<1>>)?/.source,[h,c]),x=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[a,p]),v=/\[\s*(?:,\s*)*\]/.source,k=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[x,v]),y=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[c,d,v]),m=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[y]),g=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[m,x,v]),w={keyword:l,punctuation:/[<>()?,.:[\]]/},C=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,E=/"(?:\\.|[^\\"\r\n])*"/.source,A=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[A]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[E]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[x]),lookbehind:!0,inside:w},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[h,g]),lookbehind:!0,inside:w},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[h]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[s,p]),lookbehind:!0,inside:w},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[x]),lookbehind:!0,inside:w},{pattern:n(/(\bwhere\s+)<<0>>/.source,[h]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[k]),lookbehind:!0,inside:w},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[g,u,h]),inside:w}],keyword:l,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[h]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[d]),lookbehind:!0,alias:"class-name",inside:w},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[g,x]),inside:w,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[g]),lookbehind:!0,inside:w,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[h,c]),inside:{function:n(/^<<0>>/.source,[h]),generic:{pattern:RegExp(c),alias:"class-name",inside:w}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[s,p,h,g,l.source,d,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[p,d]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:l,"class-name":{pattern:RegExp(g),greedy:!0,inside:w},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var _=E+"|"+C,$=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[_]),b=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[$]),2),O=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,T=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[x,b]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[O,T]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[O]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[b]),inside:e.languages.csharp},"class-name":{pattern:RegExp(x),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var F=/:[^}\r\n]+/.source,L=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[$]),2),B=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[L,F]),U=r(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[_]),2),W=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[U,F]);function P(G,S){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[G]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[S,F]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[B]),lookbehind:!0,greedy:!0,inside:P(B,L)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[W]),lookbehind:!0,greedy:!0,inside:P(W,U)}],char:{pattern:RegExp(C),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp})(Prism);(function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby})(Prism);(function(e){function t(n,r){return"___"+n.toUpperCase()+r+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,i,o){if(n.language===r){var s=n.tokenStack=[];n.code=n.code.replace(i,function(l){if(typeof o=="function"&&!o(l))return l;for(var a=s.length,u;n.code.indexOf(u=t(r,a))!==-1;)++a;return s[a]=l,u}),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language!==r||!n.tokenStack)return;n.grammar=e.languages[r];var i=0,o=Object.keys(n.tokenStack);function s(l){for(var a=0;a<l.length&&!(i>=o.length);a++){var u=l[a];if(typeof u=="string"||u.content&&typeof u.content=="string"){var c=o[i],d=n.tokenStack[c],h=typeof u=="string"?u:u.content,p=t(r,c),x=h.indexOf(p);if(x>-1){++i;var v=h.substring(0,x),k=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),y=h.substring(x+p.length),m=[];v&&m.push.apply(m,s([v])),m.push(k),y&&m.push.apply(m,s([y])),typeof u=="string"?l.splice.apply(l,[a,1].concat(m)):u.content=m}}else u.content&&s(u.content)}return l}s(n.tokens)}}})})(Prism);(function(e){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],r=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,i=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,o=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:r,operator:i,punctuation:o};var s={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},l=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:s}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:s}}];e.languages.insertBefore("php","variable",{string:l,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:l,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:r,operator:i,punctuation:o}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",function(a){if(/<\?/.test(a.code)){var u=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;e.languages["markup-templating"].buildPlaceholders(a,"php",u)}}),e.hooks.add("after-tokenize",function(a){e.languages["markup-templating"].tokenizePlaceholders(a,"php")})})(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;(function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+n.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function s(l,a){a=(a||"").replace(/m/g,"")+"m";var u=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<value>>/g,function(){return l});return RegExp(u,a)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return r})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<key>>/g,function(){return"(?:"+i+"|"+o+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:s(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:s(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:s(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:s(o),lookbehind:!0,greedy:!0},number:{pattern:s(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml})(Prism);(function(e){var t=/(?:[\w-]+|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*")/.source;function n(r){return r.replace(/__/g,function(){return t})}e.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp(n(/(^[\t ]*\[\s*(?:\[\s*)?)__(?:\s*\.\s*__)*(?=\s*\])/.source),"m"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern:RegExp(n(/(^[\t ]*|[{,]\s*)__(?:\s*\.\s*__)*(?=\s*=)/.source),"m"),lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},date:[{pattern:/\b\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?\b/i,alias:"number"},{pattern:/\b\d{2}:\d{2}:\d{2}(?:\.\d+)?\b/,alias:"number"}],number:/(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\b\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?\b(?:inf|nan)\b/,boolean:/\b(?:false|true)\b/,punctuation:/[.,=[\]{}]/}})(Prism);(function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=r.variable[1].inside,s=0;s<i.length;s++)o[i[s]]=e.languages.bash[i[s]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash})(Prism);Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};(function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(c){return c=c.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+c+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+o+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+o+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(c){["url","bold","italic","strike","code-snippet"].forEach(function(d){c!==d&&(e.languages.markdown[c].inside.content.inside[d]=e.languages.markdown[d])})}),e.hooks.add("after-tokenize",function(c){if(c.language!=="markdown"&&c.language!=="md")return;function d(h){if(!(!h||typeof h=="string"))for(var p=0,x=h.length;p<x;p++){var v=h[p];if(v.type!=="code"){d(v.content);continue}var k=v.content[1],y=v.content[3];if(k&&y&&k.type==="code-language"&&y.type==="code-block"&&typeof k.content=="string"){var m=k.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");m=(/[a-z][\w-]*/i.exec(m)||[""])[0].toLowerCase();var g="language-"+m;y.alias?typeof y.alias=="string"?y.alias=[y.alias,g]:y.alias.push(g):y.alias=[g]}}}d(c.tokens)}),e.hooks.add("wrap",function(c){if(c.type==="code-block"){for(var d="",h=0,p=c.classes.length;h<p;h++){var x=c.classes[h],v=/language-(.+)/.exec(x);if(v){d=v[1];break}}var k=e.languages[d];if(k)c.content=e.highlight(u(c.content),k,d);else if(d&&d!=="none"&&e.plugins.autoloader){var y="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);c.attributes.id=y,e.plugins.autoloader.loadLanguages(d,function(){var m=document.getElementById(y);m&&(m.innerHTML=e.highlight(m.textContent,e.languages[d],d))})}}});var s=RegExp(e.languages.markup.tag.pattern.source,"gi"),l={amp:"&",lt:"<",gt:">",quot:'"'},a=String.fromCodePoint||String.fromCharCode;function u(c){var d=c.replace(s,"");return d=d.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(h,p){if(p=p.toLowerCase(),p[0]==="#"){var x;return p[1]==="x"?x=parseInt(p.slice(2),16):x=Number(p.slice(1)),a(x)}else{var v=l[p];return v||h}}),d}e.languages.md=e.languages.markdown})(Prism);Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}});Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]});Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/});Prism.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}});Prism.languages.scss.atrule.inside.rest=Prism.languages.scss;(function(e){var t=/\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source,n=/(?:[ \t]+(?![ \t])(?:<SP_BS>)?|<SP_BS>)/.source.replace(/<SP_BS>/g,function(){return t}),r=/"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"|'(?:[^'\\\r\n]|\\(?:\r\n|[\s\S]))*'/.source,i=/--[\w-]+=(?:<STR>|(?!["'])(?:[^\s\\]|\\.)+)/.source.replace(/<STR>/g,function(){return r}),o={pattern:RegExp(r),greedy:!0},s={pattern:/(^[ \t]*)#.*/m,lookbehind:!0,greedy:!0};function l(a,u){return a=a.replace(/<OPT>/g,function(){return i}).replace(/<SP>/g,function(){return n}),RegExp(a,u)}e.languages.docker={instruction:{pattern:/(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,lookbehind:!0,greedy:!0,inside:{options:{pattern:l(/(^(?:ONBUILD<SP>)?\w+<SP>)<OPT>(?:<SP><OPT>)*/.source,"i"),lookbehind:!0,greedy:!0,inside:{property:{pattern:/(^|\s)--[\w-]+/,lookbehind:!0},string:[o,{pattern:/(=)(?!["'])(?:[^\s\\]|\\.)+/,lookbehind:!0}],operator:/\\$/m,punctuation:/=/}},keyword:[{pattern:l(/(^(?:ONBUILD<SP>)?HEALTHCHECK<SP>(?:<OPT><SP>)*)(?:CMD|NONE)\b/.source,"i"),lookbehind:!0,greedy:!0},{pattern:l(/(^(?:ONBUILD<SP>)?FROM<SP>(?:<OPT><SP>)*(?!--)[^ \t\\]+<SP>)AS/.source,"i"),lookbehind:!0,greedy:!0},{pattern:l(/(^ONBUILD<SP>)\w+/.source,"i"),lookbehind:!0,greedy:!0},{pattern:/^\w+/,greedy:!0}],comment:s,string:o,variable:/\$(?:\w+|\{[^{}"'\\]*\})/,operator:/\\$/m}},comment:s},e.languages.dockerfile=e.languages.docker})(Prism);Prism.languages.hcl={comment:/(?:\/\/|#).*|\/\*[\s\S]*?(?:\*\/|$)/,heredoc:{pattern:/<<-?(\w+\b)[\s\S]*?^[ \t]*\1/m,greedy:!0,alias:"string"},keyword:[{pattern:/(?:data|resource)\s+(?:"(?:\\[\s\S]|[^\\"])*")(?=\s+"[\w-]+"\s+\{)/i,inside:{type:{pattern:/(resource|data|\s+)(?:"(?:\\[\s\S]|[^\\"])*")/i,lookbehind:!0,alias:"variable"}}},{pattern:/(?:backend|module|output|provider|provisioner|variable)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+(?=\{)/i,inside:{type:{pattern:/(backend|module|output|provider|provisioner|variable)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+/i,lookbehind:!0,alias:"variable"}}},/[\w-]+(?=\s+\{)/],property:[/[-\w\.]+(?=\s*=(?!=))/,/"(?:\\[\s\S]|[^\\"])+"(?=\s*[:=])/],string:{pattern:/"(?:[^\\$"]|\\[\s\S]|\$(?:(?=")|\$+(?!\$)|[^"${])|\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\})*"/,greedy:!0,inside:{interpolation:{pattern:/(^|[^$])\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\}/,lookbehind:!0,inside:{type:{pattern:/(\b(?:count|data|local|module|path|self|terraform|var)\b\.)[\w\*]+/i,lookbehind:!0,alias:"variable"},keyword:/\b(?:count|data|local|module|path|self|terraform|var)\b/i,function:/\w+(?=\()/,string:{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0},number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,punctuation:/[!\$#%&'()*+,.\/;<=>@\[\\\]^`{|}~?:]/}}}},number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,boolean:/\b(?:false|true)\b/i,punctuation:/[=\[\]{}]/};Prism.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:Prism.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/};Prism.hooks.add("after-tokenize",function(t){if(t.language!=="graphql")return;var n=t.tokens.filter(function(v){return typeof v!="string"&&v.type!=="comment"&&v.type!=="scalar"}),r=0;function i(v){return n[r+v]}function o(v,k){k=k||0;for(var y=0;y<v.length;y++){var m=i(y+k);if(!m||m.type!==v[y])return!1}return!0}function s(v,k){for(var y=1,m=r;m<n.length;m++){var g=n[m],w=g.content;if(g.type==="punctuation"&&typeof w=="string"){if(v.test(w))y++;else if(k.test(w)&&(y--,y===0))return m}}return-1}function l(v,k){var y=v.alias;y?Array.isArray(y)||(v.alias=y=[y]):v.alias=y=[],y.push(k)}for(;r<n.length;){var a=n[r++];if(a.type==="keyword"&&a.content==="mutation"){var u=[];if(o(["definition-mutation","punctuation"])&&i(1).content==="("){r+=2;var c=s(/^\($/,/^\)$/);if(c===-1)continue;for(;r<c;r++){var d=i(0);d.type==="variable"&&(l(d,"variable-input"),u.push(d.content))}r=c+1}if(o(["punctuation","property-query"])&&i(0).content==="{"&&(r++,l(i(0),"property-mutation"),u.length>0)){var h=s(/^\{$/,/^\}$/);if(h===-1)continue;for(var p=r;p<h;p++){var x=n[p];x.type==="variable"&&u.indexOf(x.content)>=0&&l(x,"variable-input")}}}}});(function(e){var t=/\b(?:bool|bytes|double|s?fixed(?:32|64)|float|[su]?int(?:32|64)|string)\b/;e.languages.protobuf=e.languages.extend("clike",{"class-name":[{pattern:/(\b(?:enum|extend|message|service)\s+)[A-Za-z_]\w*(?=\s*\{)/,lookbehind:!0},{pattern:/(\b(?:rpc\s+\w+|returns)\s*\(\s*(?:stream\s+)?)\.?[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*(?=\s*\))/,lookbehind:!0}],keyword:/\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|returns|rpc(?=\s+\w)|service|stream|syntax|to)\b(?!\s*=\s*\d)/,function:/\b[a-z_]\w*(?=\s*\()/i}),e.languages.insertBefore("protobuf","operator",{map:{pattern:/\bmap<\s*[\w.]+\s*,\s*[\w.]+\s*>(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/[<>.,]/,builtin:t}},builtin:t,"positional-class-name":{pattern:/(?:\b|\B\.)[a-z_]\w*(?:\.[a-z_]\w*)*(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/\./}},annotation:{pattern:/(\[\s*)[a-z_]\w*(?=\s*=)/i,lookbehind:!0}})})(Prism);Prism.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/};Prism.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/};Prism.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/};(function(e){var t=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],n=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};e.languages.dart=e.languages.extend("clike",{"class-name":[r,{pattern:RegExp(n+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:r.inside}],keyword:t,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),e.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.dart}}},string:/[\s\S]+/}},string:void 0}),e.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),e.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})})(Prism);const B1={ts:"typescript",mts:"typescript",cts:"typescript",tsx:"tsx",js:"javascript",mjs:"javascript",cjs:"javascript",jsx:"jsx",go:"go",py:"python",rs:"rust",java:"java",kt:"kotlin",kts:"kotlin",swift:"swift",c:"c",h:"c",cc:"cpp",cpp:"cpp",hpp:"cpp",cs:"csharp",rb:"ruby",php:"php",json:"json",jsonc:"json",yml:"yaml",yaml:"yaml",toml:"toml",sh:"bash",bash:"bash",zsh:"bash",sql:"sql",md:"markdown",mdx:"markdown",css:"css",scss:"scss",html:"markup",htm:"markup",xml:"markup",svg:"markup",vue:"markup",hcl:"hcl",tf:"hcl",graphql:"graphql",gql:"graphql",proto:"protobuf",ini:"ini",lua:"lua",dart:"dart"},Xp={Dockerfile:"docker",Makefile:"makefile",GNUmakefile:"makefile",".env":"bash"};function U1(e){const t=e.split("/").pop()??"";if(Xp[t])return Xp[t];if(t.startsWith("Dockerfile"))return"docker";const n=t.includes(".")?t.split(".").pop().toLowerCase():"",r=B1[n];return r&&hl.languages[r]?r:void 0}function Md(e,t){const n=hl.languages[t];if(!n)return e.map(s=>[{types:"",text:s}]);const r=[[]],i=(s,l)=>{l.split(`
112
- `).forEach((u,c)=>{c>0&&r.push([]),u&&r[r.length-1].push({types:s,text:u})})},o=(s,l)=>{for(const a of s)if(typeof a=="string")i(l,a);else{const u=[a.type,...a.alias?Array.isArray(a.alias)?a.alias:[a.alias]:[]].join(" "),c=l?`${l} ${u}`:u;typeof a.content=="string"?i(c,a.content):o(Array.isArray(a.content)?a.content:[a.content],c)}};for(o(hl.tokenize(e.join(`
113
- `),n),"");r.length<e.length;)r.push([]);return r}const Qp=5e3,Zp=1e3;function H1(e,t){const n=U1(e.path);if(!n)return;let r=0;for(const o of e.chunks)for(const s of o.lines)if(++r>Qp||s.content.length>Zp)return;const i=new Map;for(const o of e.chunks)Jp(o,"old",n,i),Jp(o,"new",n,i);return t&&t.length<=Qp&&t.every(o=>o.length<=Zp)&&Md(t,n).forEach((o,s)=>i.set(`new:${s+1}`,o)),i}function Jp(e,t,n,r){const i=e.lines.filter(s=>s.type==="normal"||s.type===(t==="old"?"delete":"add"));if(!i.length)return;const o=Md(i.map(s=>s.content),n);i.forEach((s,l)=>r.set(`${t}:${t==="old"?s.oldLine:s.newLine}`,o[l]))}function W1(e,t){const n=t==null?void 0:t.toLowerCase();if(!(!n||!hl.languages[n]||e.length>1e5))return Md(e.split(`
114
- `),n)}function V1({file:e,version:t}){const n=e.status==="added"?["new"]:e.status==="removed"?["old"]:["old","new"];return f.jsx("div",{className:`fs-images n${n.length}`,children:n.map(r=>f.jsx(G1,{side:r,path:r==="old"?e.oldPath??e.path:e.path,version:t},r))})}function G1({side:e,path:t,version:n}){const[r,i]=z.useState(null),[o,s]=z.useState(!1);return f.jsxs("figure",{className:`fs-image ${e}`,children:[f.jsxs("figcaption",{children:[f.jsx("span",{className:`fs-image-side ${e}`,children:e==="old"?"変更前":"変更後"}),r&&f.jsx("span",{className:"ds-muted",children:r})]}),f.jsx("div",{className:"fs-image-frame",children:o?f.jsx("span",{className:"ds-muted",children:"表示できませんでした"}):f.jsx("img",{src:nx(t,e,n),alt:`${t}(${e==="old"?"変更前":"変更後"})`,onLoad:l=>i(`${l.currentTarget.naturalWidth} × ${l.currentTarget.naturalHeight}`),onError:()=>s(!0)})})]})}function K1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const q1=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Y1=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,X1={};function eh(e,t){return(X1.jsx?Y1:q1).test(e)}const Q1=/[ \t\n\f\r]/g;function Z1(e){return typeof e=="object"?e.type==="text"?th(e.value):!1:th(e)}function th(e){return e.replace(Q1,"")===""}class Uo{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Uo.prototype.normal={};Uo.prototype.property={};Uo.prototype.space=void 0;function mx(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Uo(n,r,t)}function lc(e){return e.toLowerCase()}class Mt{constructor(t,n){this.attribute=n,this.property=t}}Mt.prototype.attribute="";Mt.prototype.booleanish=!1;Mt.prototype.boolean=!1;Mt.prototype.commaOrSpaceSeparated=!1;Mt.prototype.commaSeparated=!1;Mt.prototype.defined=!1;Mt.prototype.mustUseProperty=!1;Mt.prototype.number=!1;Mt.prototype.overloadedBoolean=!1;Mt.prototype.property="";Mt.prototype.spaceSeparated=!1;Mt.prototype.space=void 0;let J1=0;const Ee=Br(),it=Br(),ac=Br(),ae=Br(),De=Br(),$r=Br(),Dt=Br();function Br(){return 2**++J1}const uc=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ee,booleanish:it,commaOrSpaceSeparated:Dt,commaSeparated:$r,number:ae,overloadedBoolean:ac,spaceSeparated:De},Symbol.toStringTag,{value:"Module"})),Ra=Object.keys(uc);class Pd extends Mt{constructor(t,n,r,i){let o=-1;if(super(t,n),nh(this,"space",i),typeof r=="number")for(;++o<Ra.length;){const s=Ra[o];nh(this,Ra[o],(r&uc[s])===uc[s])}}}Pd.prototype.defined=!0;function nh(e,t,n){n&&(e[t]=n)}function Li(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new Pd(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[lc(r)]=r,n[lc(o.attribute)]=r}return new Uo(t,n,e.space)}const gx=Li({properties:{ariaActiveDescendant:null,ariaAtomic:it,ariaAutoComplete:null,ariaBusy:it,ariaChecked:it,ariaColCount:ae,ariaColIndex:ae,ariaColSpan:ae,ariaControls:De,ariaCurrent:null,ariaDescribedBy:De,ariaDetails:null,ariaDisabled:it,ariaDropEffect:De,ariaErrorMessage:null,ariaExpanded:it,ariaFlowTo:De,ariaGrabbed:it,ariaHasPopup:null,ariaHidden:it,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:De,ariaLevel:ae,ariaLive:null,ariaModal:it,ariaMultiLine:it,ariaMultiSelectable:it,ariaOrientation:null,ariaOwns:De,ariaPlaceholder:null,ariaPosInSet:ae,ariaPressed:it,ariaReadOnly:it,ariaRelevant:null,ariaRequired:it,ariaRoleDescription:De,ariaRowCount:ae,ariaRowIndex:ae,ariaRowSpan:ae,ariaSelected:it,ariaSetSize:ae,ariaSort:null,ariaValueMax:ae,ariaValueMin:ae,ariaValueNow:ae,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function yx(e,t){return t in e?e[t]:t}function xx(e,t){return yx(e,t.toLowerCase())}const eE=Li({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:$r,acceptCharset:De,accessKey:De,action:null,allow:null,allowFullScreen:Ee,allowPaymentRequest:Ee,allowUserMedia:Ee,alpha:Ee,alt:null,as:null,async:Ee,autoCapitalize:null,autoComplete:De,autoFocus:Ee,autoPlay:Ee,blocking:De,capture:null,charSet:null,checked:Ee,cite:null,className:De,closedBy:null,colorSpace:null,cols:ae,colSpan:ae,command:null,commandFor:null,content:null,contentEditable:it,controls:Ee,controlsList:De,coords:ae|$r,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ee,defer:Ee,dir:null,dirName:null,disabled:Ee,download:ac,draggable:it,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ee,formTarget:null,headers:De,height:ae,hidden:ac,high:ae,href:null,hrefLang:null,htmlFor:De,httpEquiv:De,id:null,imageSizes:null,imageSrcSet:null,inert:Ee,inputMode:null,integrity:null,is:null,isMap:Ee,itemId:null,itemProp:De,itemRef:De,itemScope:Ee,itemType:De,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ee,low:ae,manifest:null,max:null,maxLength:ae,media:null,method:null,min:null,minLength:ae,multiple:Ee,muted:Ee,name:null,nonce:null,noModule:Ee,noValidate:Ee,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ee,optimum:ae,pattern:null,ping:De,placeholder:null,playsInline:Ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ee,referrerPolicy:null,rel:De,required:Ee,reversed:Ee,rows:ae,rowSpan:ae,sandbox:De,scope:null,scoped:Ee,seamless:Ee,selected:Ee,shadowRootClonable:Ee,shadowRootCustomElementRegistry:Ee,shadowRootDelegatesFocus:Ee,shadowRootMode:null,shadowRootSerializable:Ee,shape:null,size:ae,sizes:null,slot:null,span:ae,spellCheck:it,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ae,step:null,style:null,tabIndex:ae,target:null,title:null,translate:null,type:null,typeMustMatch:Ee,useMap:null,value:it,width:ae,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:De,axis:null,background:null,bgColor:null,border:ae,borderColor:null,bottomMargin:ae,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ee,declare:Ee,event:null,face:null,frame:null,frameBorder:null,hSpace:ae,leftMargin:ae,link:null,longDesc:null,lowSrc:null,marginHeight:ae,marginWidth:ae,noResize:Ee,noHref:Ee,noShade:Ee,noWrap:Ee,object:null,profile:null,prompt:null,rev:null,rightMargin:ae,rules:null,scheme:null,scrolling:it,standby:null,summary:null,text:null,topMargin:ae,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ae,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ee,disablePictureInPicture:Ee,disableRemotePlayback:Ee,exportParts:$r,part:De,prefix:null,property:null,results:ae,security:null,unselectable:null},space:"html",transform:xx}),tE=Li({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Dt,accentHeight:ae,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ae,amplitude:ae,arabicForm:null,ascent:ae,attributeName:null,attributeType:null,azimuth:ae,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ae,by:null,calcMode:null,capHeight:ae,className:De,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ae,diffuseConstant:ae,direction:null,display:null,dur:null,divisor:ae,dominantBaseline:null,download:Ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:ae,enableBackground:null,end:null,event:null,exponent:ae,externalResourcesRequired:null,fill:null,fillOpacity:ae,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:$r,g2:$r,glyphName:$r,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ae,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ae,horizOriginX:ae,horizOriginY:ae,id:null,ideographic:ae,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ae,k:ae,k1:ae,k2:ae,k3:ae,k4:ae,kernelMatrix:Dt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ae,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ae,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ae,overlineThickness:ae,paintOrder:null,panose1:null,path:null,pathLength:ae,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:De,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ae,pointsAtY:ae,pointsAtZ:ae,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Dt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Dt,rev:Dt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Dt,requiredFeatures:Dt,requiredFonts:Dt,requiredFormats:Dt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ae,specularExponent:ae,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ae,strikethroughThickness:ae,string:null,stroke:null,strokeDashArray:Dt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ae,strokeOpacity:ae,strokeWidth:null,style:null,surfaceScale:ae,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Dt,tabIndex:ae,tableValues:null,target:null,targetX:ae,targetY:ae,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Dt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ae,underlineThickness:ae,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ae,values:null,vAlphabetic:ae,vMathematical:ae,vectorEffect:null,vHanging:ae,vIdeographic:ae,version:null,vertAdvY:ae,vertOriginX:ae,vertOriginY:ae,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ae,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:yx}),vx=Li({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),wx=Li({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:xx}),kx=Li({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),nE={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},rE=/[A-Z]/g,rh=/-[a-z]/g,iE=/^data[-\w.:]+$/i;function oE(e,t){const n=lc(t);let r=t,i=Mt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&iE.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(rh,lE);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!rh.test(o)){let s=o.replace(rE,sE);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Pd}return new i(r,t)}function sE(e){return"-"+e.toLowerCase()}function lE(e){return e.charAt(1).toUpperCase()}const aE=mx([gx,eE,vx,wx,kx],"html"),Fd=mx([gx,tE,vx,wx,kx],"svg");function uE(e){return e.join(" ").trim()}var ih=/\/\*(?:[^*]|\*(?!\/))*\*\//g,cE=/\n/g,dE=/^\s*/,fE=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,pE=/^:\s*/,hE=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,mE=/^[;\s]*/,gE=`
115
- `,oh="/",sh="*",Wi="",yE="comment",xE="declaration";function vE(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(x){var v=x.match(cE);v&&(n+=v.length);var k=x.lastIndexOf(gE);r=~k?x.length-k:r+x.length}function o(){var x={line:n,column:r};return function(v){return v.position=new s(x),u(),v}}function s(x){this.start=x,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function l(x){var v=new Error(t.source+":"+n+":"+r+": "+x);if(v.reason=x,v.filename=t.source,v.line=n,v.column=r,v.source=e,!t.silent)throw v}function a(x){var v=x.exec(e);if(v){var k=v[0];return i(k),e=e.slice(k.length),v}}function u(){a(dE)}function c(x){for(var v;v=d();)x.push(v);return x}function d(){var x=o();if(!(oh!=e.charAt(0)||sh!=e.charAt(1))){for(var v=2;Wi!=e.charAt(v)&&(sh!=e.charAt(v)||oh!=e.charAt(v+1));)++v;if(v+=2,Wi===e.charAt(v-1))return l("End of comment missing");var k=e.slice(2,v-2);return r+=2,i(k),e=e.slice(v),r+=2,x({type:yE,comment:k})}}function h(){var x=o(),v=a(fE);if(v){if(d(),!a(pE))return l("property missing ':'");var k=a(hE),y=x({type:xE,property:v[0].replace(ih,Wi).trim(),value:k?k[0].replace(ih,Wi).trim():Wi});return a(mE),y}}function p(){var x=[];c(x);for(var v;v=h();)x.push(v),c(x);return x}return u(),p()}function wE(e,t){let n=null;if(!e||typeof e!="string")return n;const r=vE(e),i=typeof t=="function";return r.forEach(o=>{if(o.type!=="declaration")return;const{property:s,value:l}=o;i?t(s,l,o):l&&(n=n??{},n[s]=l)}),n}const bx=Ex("end"),Dd=Ex("start");function Ex(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function kE(e){const t=Dd(e),n=bx(e);if(t&&n)return{start:t,end:n}}function uo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?lh(e.position):"start"in e||"end"in e?lh(e):"line"in e||"column"in e?cc(e):""}function cc(e){return ah(e&&e.line)+":"+ah(e&&e.column)}function lh(e){return cc(e&&e.start)+"-"+cc(e&&e.end)}function ah(e){return e&&typeof e=="number"?e:1}class zl extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?o.ruleId=r:(o.source=r.slice(0,a),o.ruleId=r.slice(a+1))}if(!o.place&&o.ancestors){const a=o.ancestors[o.ancestors.length-1];a&&(o.place=a.position)}const l=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=uo(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Object.defineProperties(zl.prototype,{file:{configurable:!0,enumerable:!0,value:"",writable:!0},name:{configurable:!0,enumerable:!0,value:"",writable:!0},reason:{configurable:!0,enumerable:!0,value:"",writable:!0},message:{configurable:!0,enumerable:!0,value:"",writable:!0},stack:{configurable:!0,enumerable:!0,value:"",writable:!0},column:{configurable:!0,enumerable:!0,writable:!0},line:{configurable:!0,enumerable:!0,writable:!0},ancestors:{configurable:!0,enumerable:!0,writable:!0},cause:{configurable:!0,enumerable:!0,writable:!0},fatal:{configurable:!0,enumerable:!0,writable:!0},place:{configurable:!0,enumerable:!0,writable:!0},ruleId:{configurable:!0,enumerable:!0,writable:!0},source:{configurable:!0,enumerable:!0,writable:!0}});const zd={}.hasOwnProperty,bE=new Map,EE=/[A-Z]/g,SE=/-([a-z])/g,CE=new Set(["table","tbody","thead","tfoot","tr"]),NE=new Set(["td","th"]),Sx="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function jE(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=RE(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=OE(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Fd:aE,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Cx(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Cx(e,t,n){if(t.type==="element")return _E(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return TE(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return LE(e,t,n);if(t.type==="mdxjsEsm")return $E(e,t);if(t.type==="root")return IE(e,t,n);if(t.type==="text")return AE(e,t)}function _E(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Fd,e.schema=i),e.ancestors.push(t);const o=jx(e,t.tagName,!1),s=ME(e,t);let l=Ud(e,t);return CE.has(t.tagName)&&(l=l.filter(function(a){return typeof a=="string"?!Z1(a):!0})),Nx(e,s,o,t),Bd(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function TE(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Oo(e,t.position)}function $E(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Oo(e,t.position)}function LE(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Fd,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:jx(e,t.name,!0),s=PE(e,t),l=Ud(e,t);return Nx(e,s,o,t),Bd(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function IE(e,t,n){const r={};return Bd(r,Ud(e,t)),e.create(t,e.Fragment,r,n)}function AE(e,t){return t.value}function Nx(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Bd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function OE(e,t,n){return r;function r(i,o,s,l){const u=Array.isArray(s.children)?n:t;return l?u(o,s,l):u(o,s)}}function RE(e,t){return n;function n(r,i,o,s){const l=Array.isArray(o.children),a=Dd(r);return t(i,o,s,l,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}function ME(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&zd.call(t.properties,i)){const o=FE(e,i,t.properties[i]);if(o){const[s,l]=o;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&NE.has(t.tagName)?r=l:n[s]=l}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function PE(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const s=o.expression;s.type;const l=s.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else Oo(e,t.position);else{const{name:i}=r;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,o=e.evaluater.evaluateExpression(l.expression)}else Oo(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function Ud(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:bE;for(;++r<t.children.length;){const o=t.children[r];let s;if(e.passKeys){const a=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(a){const u=i.get(a)||0;s=a+"-"+u,i.set(a,u+1)}}const l=Cx(e,o,s);l!==void 0&&n.push(l)}return n}function FE(e,t,n){if(n==null||typeof n=="number"&&Number.isNaN(n))return;const r=oE(e.schema,t);return Array.isArray(n)&&(n=r.commaSeparated?K1(n):uE(n)),r.property==="style"?["style",typeof n=="object"?e.stylePropertyNameCase==="dom"?n:zE(n):DE(e,String(n))]:[e.elementAttributeNameCase==="react"&&r.space?nE[r.property]||r.property:r.attribute,n]}function DE(e,t){const n={};try{wE(t,function(r,i){if(r&&i){let o=r;o.slice(0,2)!=="--"&&(o=o.toLowerCase(),e.stylePropertyNameCase==="dom"&&(o.slice(0,4)==="-ms-"&&(o=o.slice(1)),o=o.replace(SE,HE))),n[o]=i}})}catch(r){if(e.ignoreInvalidStyle)return{};const i=r,o=new zl("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=Sx+"#cannot-parse-style-attribute",o}return n}function jx(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,s;for(;++o<i.length;){const l=eh(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};s=s?{type:"MemberExpression",object:s,property:l,computed:!!(o&&l.type==="Literal"),optional:!1}:l}r=s}else r=eh(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return zd.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Oo(e)}function Oo(e,t){const n=new zl("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Sx+"#cannot-handle-mdx-estrees-without-createevaluater",n}function zE(e){const t={};let n;for(n in e)zd.call(e,n)&&(t[BE(n)]=e[n]);return t}function BE(e){if(e.slice(0,2)==="--")return e;let t=e.replace(EE,UE);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function UE(e){return"-"+e.toLowerCase()}function HE(e,t){return t.toUpperCase()}const Ma={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},WE={};function Bl(e,t){const n=WE,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return _x(e,r,i)}function _x(e,t,n){if(VE(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return uh(e.children,t,n)}return Array.isArray(e)?uh(e,t,n):""}function uh(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=_x(e[i],t,n);return r.join("")}function VE(e){return!!(e&&typeof e=="object")}const ch=document.createElement("i");function Hd(e){const t="&"+e+";";ch.innerHTML=t;const n=ch.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function mn(e,t,n,r){const i=e.length;let o=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o<r.length;)s=r.slice(o,o+1e4),s.unshift(t,0),e.splice(...s),o+=1e4,t+=1e4}function Jt(e,t){return e.length>0?(mn(e,e.length,0,t),e):t}const dh={}.hasOwnProperty;function Tx(e){const t={};let n=-1;for(;++n<e.length;)GE(t,e[n]);return t}function GE(e,t){let n;for(n in t){const i=(dh.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){dh.call(i,s)||(i[s]=[]);const l=o[s];KE(i[s],Array.isArray(l)?l:l?[l]:[])}}}function KE(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);mn(e,0,0,r)}function $x(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function gn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const gt=mr(/[A-Za-z]/),yt=mr(/[\dA-Za-z]/),qE=mr(/[#-'*+\--9=?A-Z^-~]/);function ml(e){return e!==null&&(e<32||e===127)}const dc=mr(/\d/),YE=mr(/[\dA-Fa-f]/),Lx=mr(/[!-/:-@[-`{-~]/);function we(e){return e!==null&&e<-2}function ze(e){return e!==null&&(e<0||e===32)}function Se(e){return e===-2||e===-1||e===32}const Ho=mr(new RegExp("\\p{P}|\\p{S}","u")),Fr=mr(/\s/);function mr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ii(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let s="";if(o===37&&yt(e.charCodeAt(n+1))&&yt(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){const l=e.charCodeAt(n+1);o<56320&&l>56319&&l<57344?(s=String.fromCharCode(o,l),i=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Ae(e,t,n,r){const i=r?r-1:1/0;let o=0;return s;function s(a){return Se(a)?(e.enter(n),l(a)):t(a)}function l(a){return Se(a)&&o++<i?(e.consume(a),l):(e.exit(n),t(a))}}function Ix(e,t,n,r,i,o){let s=0;return l;function l(c){return Se(c)?(e.enter(r),a(c)):u(c)}function a(c){return Se(c)&&s<o?(e.consume(c),s++,a):(e.exit(r),u(c))}function u(c){return s>=i?t(c):n(c)}}const XE={tokenize:QE};function QE(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Ae(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),o(l)}function o(l){const a=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=a),n=a,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return we(l)?(e.consume(l),e.exit("chunkText"),o):(e.consume(l),s)}}let gl=class{constructor(){this.index=new Map,this.map=[]}add(t,n,r){fh(this,t,n,r,!1)}addBefore(t,n,r){fh(this,t,n,r,!0)}consume(t){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0,this.index.clear()}};function fh(e,t,n,r,i){if(n===0&&r.length===0)return;const o=e.index.get(t);if(o){o[1]+=n,i?(r.push(...o[2]),o[2]=r):o[2].push(...r);return}const s=[t,n,r];e.map.push(s),e.index.set(t,s)}const ZE={tokenize:JE},ph={tokenize:eS};function JE(e){const t=this,n=[];let r=0,i,o,s;return l;function l(g){if(r<n.length){const w=n[r];return t.containerState=w[1],e.attempt(w[0].continuation,a,u)(g)}return u(g)}function a(g){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&m();const w=t.events.length;let C=w,E;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){E=t.events[C][1].end;break}y(r);let A=w;for(;A<t.events.length;)t.events[A][1].end={...E},A++;const _=new gl;return _.add(C+1,0,t.events.slice(w)),_.add(w,A-w,[]),_.consume(t.events),u(g)}return l(g)}function u(g){if(r===n.length){if(!i)return h(g);if(i.currentConstruct&&i.currentConstruct.concrete)return x(g);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ph,c,d)(g)}function c(g){return i&&m(),y(r),h(g)}function d(g){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,x(g)}function h(g){return t.containerState={},e.attempt(ph,p,x)(g)}function p(g){return r++,n.push([t.currentConstruct,t.containerState]),h(g)}function x(g){if(g===null){i&&m(),y(0),e.consume(g);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),v(g)}function v(g){if(g===null){k(e.exit("chunkFlow"),!0),y(0),e.consume(g);return}return we(g)?(e.consume(g),k(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(g),v)}function k(g,w){const C=t.sliceStream(g);if(w&&C.push(null),g.previous=o,o&&(o.next=g),o=g,i.defineSkip(g.start),i.write(C),t.parser.lazy[g.start.line]){let E=i.events.length;for(;E--;)if(i.events[E][1].start.offset<s&&(!i.events[E][1].end||i.events[E][1].end.offset>s))return;const A=t.events.length;let _=A,$,b;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){if($){b=t.events[_][1].end;break}$=!0}for(y(r),E=A;E<t.events.length;)t.events[E][1].end={...b},E++;const O=new gl;O.add(_+1,0,t.events.slice(A)),O.add(A,E-A,[]),O.consume(t.events)}}function y(g){let w=n.length;for(;w-- >g;){const C=n[w];t.containerState=C[1],C[0].exit.call(t,e)}n.length=g}function m(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function eS(e,t,n){return Ae(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function cr(e){if(e===null||ze(e)||Fr(e))return 1;if(Ho(e))return 2}function Ul(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const fc={name:"attention",resolveAll:tS,tokenize:nS};function tS(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;const o=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,s={...e[i][1].end},l={...e[n][1].start};hh(s,-o),hh(l,o);const a={type:o>1?"strongSequence":"emphasisSequence",start:s,end:{...e[i][1].end}},u={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:l},c={type:o>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},d={type:o>1?"strong":"emphasis",start:{...a.start},end:{...u.end}};e[i][1].end={...a.start},e[n][1].start={...u.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=Jt(r,[["enter",e[i][1],t],["exit",e[i][1],t]])),r=Jt(r,[["enter",d,t],["enter",a,t],["exit",a,t],["enter",c,t]]),r=Jt(r,Ul(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=Jt(r,[["exit",c,t],["enter",u,t],["exit",u,t],["exit",d,t]]);let h=0;e[n][1].end.offset-e[n][1].start.offset&&(h=2,r=Jt(r,[["enter",e[n][1],t],["exit",e[n][1],t]])),mn(e,i-1,n-i+3,r),n=i+r.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function nS(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=cr(r);let o;return s;function s(a){return o=a,e.enter("attentionSequence"),l(a)}function l(a){if(a===o)return e.consume(a),l;const u=e.exit("attentionSequence"),c=cr(a),d=!c||c===2&&i||n.includes(a)&&a!==42&&a!==95,h=!i||i===2&&c||n.includes(r)&&r!==42&&r!==95;return u._open=!!(o===42?d:d&&(i||!h)),u._close=!!(o===42?h:h&&(c||!d)),t(a)}}function hh(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const rS={name:"autolink",tokenize:iS};function iS(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return gt(p)?(e.consume(p),s):p===64?n(p):u(p)}function s(p){return p===43||p===45||p===46||yt(p)?(r=1,l(p)):u(p)}function l(p){return p===58?(e.consume(p),r=0,a):(p===43||p===45||p===46||yt(p))&&r++<32?(e.consume(p),l):(r=0,u(p))}function a(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||ml(p)?n(p):(e.consume(p),a)}function u(p){return p===64?(e.consume(p),c):qE(p)?(e.consume(p),u):n(p)}function c(p){return yt(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,c):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):h(p)}function h(p){if((p===45||yt(p))&&r++<63){const x=p===45?h:d;return e.consume(p),x}return n(p)}}const Wo={partial:!0,tokenize:oS};function oS(e,t,n){return r;function r(o){return Se(o)?Ae(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||we(o)?t(o):n(o)}}const Ax={continuation:{tokenize:lS},exit:aS,name:"blockQuote",tokenize:sS};function sS(e,t,n){const r=this;return i;function i(s){if(s===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return n(s)}function o(s){return Se(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function lS(e,t,n){const r=this;return i;function i(s){return Se(s)?Ae(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(Ax,t,n)(s)}}function aS(e){e.exit("blockQuote")}const Ox={name:"characterEscape",tokenize:uS};function uS(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Lx(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Rx={name:"characterReference",tokenize:cS};function cS(e,t,n){const r=this;let i=0,o,s;return l;function l(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),a}function a(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,s=yt,c(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=YE,c):(e.enter("characterReferenceValue"),o=7,s=dc,c(d))}function c(d){if(d===59&&i){const h=e.exit("characterReferenceValue");return s===yt&&!Hd(r.sliceSerialize(h))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<o?(e.consume(d),c):n(d)}}const pc={partial:!0,tokenize:dS};function dS(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const mh={concrete:!0,name:"codeFenced",tokenize:fS};function fS(e,t,n){const r=this,i={partial:!0,tokenize:C};let o=0,s=0,l;return a;function a(E){return u(E)}function u(E){const A=r.events[r.events.length-1];return o=A&&A[1].type==="linePrefix"?A[2].sliceSerialize(A[1],!0).length:0,l=E,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(E)}function c(E){return E===l?(s++,e.consume(E),c):s<3?n(E):(e.exit("codeFencedFenceSequence"),Se(E)?Ae(e,d,"whitespace")(E):d(E))}function d(E){return E===null||we(E)?(e.exit("codeFencedFence"),r.interrupt?t(E):e.check(pc,v,w)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(E))}function h(E){return E===null||we(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(E)):Se(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ae(e,p,"whitespace")(E)):E===96&&E===l?n(E):(e.consume(E),h)}function p(E){return E===null||we(E)?d(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(E))}function x(E){return E===null||we(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(E)):E===96&&E===l?n(E):(e.consume(E),x)}function v(E){return e.attempt(i,w,k)(E)}function k(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),y}function y(E){return o>0&&Se(E)?Ae(e,m,"linePrefix",o+1)(E):m(E)}function m(E){return E===null||we(E)?e.check(pc,v,w)(E):(e.enter("codeFlowValue"),g(E))}function g(E){return E===null||we(E)?(e.exit("codeFlowValue"),m(E)):(e.consume(E),g)}function w(E){return e.exit("codeFenced"),t(E)}function C(E,A,_){let $=0;return b;function b(B){return E.enter("lineEnding"),E.consume(B),E.exit("lineEnding"),O}function O(B){return E.enter("codeFencedFence"),Se(B)?Ae(E,T,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):T(B)}function T(B){return B===l?(E.enter("codeFencedFenceSequence"),F(B)):_(B)}function F(B){return B===l?($++,E.consume(B),F):$>=s?(E.exit("codeFencedFenceSequence"),Se(B)?Ae(E,L,"whitespace")(B):L(B)):_(B)}function L(B){return B===null||we(B)?(E.exit("codeFencedFence"),A(B)):_(B)}}}const Pa={name:"codeIndented",tokenize:hS},pS={partial:!0,tokenize:mS};function hS(e,t,n){return r;function r(l){return e.enter("codeIndented"),Ix(e,i,n,"linePrefix",4,4)(l)}function i(l){return l===null?s(l):we(l)?e.attempt(pS,i,s)(l):(e.enter("codeFlowValue"),o(l))}function o(l){return l===null||we(l)?(e.exit("codeFlowValue"),i(l)):(e.consume(l),o)}function s(l){return e.exit("codeIndented"),t(l)}}function mS(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):we(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):Ix(e,t,o,"linePrefix",4,4)(s)}function o(s){return we(s)?i(s):n(s)}}const gS={name:"codeText",previous:xS,resolve:yS,tokenize:vS};function yS(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function xS(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function vS(e,t,n){let r=0,i,o;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),l(d)}function l(d){return d===96?(e.consume(d),r++,l):(e.exit("codeTextSequence"),a(d))}function a(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),a):d===96?(o=e.enter("codeTextSequence"),i=0,c(d)):we(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),a):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||we(d)?(e.exit("codeTextData"),a(d)):(e.consume(d),u)}function c(d){return d===96?(e.consume(d),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(o.type="codeTextData",u(d))}}class wS{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Vi(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Vi(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Vi(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Vi(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Vi(this.left,n.reverse())}}}function Vi(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Mx(e){const t={};let n=-1,r,i,o,s,l,a,u;const c=new wS(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(a=r[1]._tokenizer.events,o=0,o<a.length&&a[o][1].type==="lineEndingBlank"&&(o+=2),o<a.length&&a[o][1].type==="content"))for(;++o<a.length&&a[o][1].type!=="content";)a[o][1].type==="chunkText"&&(a[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,kS(c,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(s=c.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},l=c.slice(i,n),l.unshift(r),c.splice(i,n-i+1,l))}}return mn(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function kS(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const l=s.events,a=[],u={};let c,d,h=-1,p=n,x=0,v=0;const k=[v];for(;p;){for(;e.get(++i)[1]!==p;);o.push(i),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(null),d&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++h<l.length;)l[h][0]==="exit"&&l[h-1][0]==="enter"&&l[h][1].type===l[h-1][1].type&&l[h][1].start.line!==l[h][1].end.line&&(v=h+1,k.push(v),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):k.pop(),h=k.length;h--;){const y=l.slice(k[h],k[h+1]),m=o.pop();a.push([m,m+y.length-1]),e.splice(m,2,y)}for(a.reverse(),h=-1;++h<a.length;)u[x+a[h][0]]=x+a[h][1],x+=a[h][1]-a[h][0]-1;return u}const bS={resolve:SS,tokenize:CS},ES={partial:!0,tokenize:NS};function SS(e){return Mx(e),e}function CS(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?o(l):we(l)?e.check(ES,s,o)(l):(e.consume(l),i)}function o(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function NS(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Ae(e,o,"linePrefix")}function o(s){if(s===null||we(s))return n(s);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Px(e,t,n,r,i,o,s,l,a){const u=a||Number.POSITIVE_INFINITY;let c=0;return d;function d(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),h):y===null||y===32||y===41||ml(y)?n(y):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),v(y))}function h(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(l),h(y)):y===null||y===60||we(y)?n(y):(e.consume(y),y===92?x:p)}function x(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function v(y){return!c&&(y===null||y===41||ze(y))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(y)):c<u&&y===40?(e.consume(y),c++,v):y===41?(e.consume(y),c--,v):y===null||y===32||y===40||ml(y)?n(y):(e.consume(y),y===92?k:v)}function k(y){return y===40||y===41||y===92?(e.consume(y),v):v(y)}}function Fx(e,t,n,r,i,o){const s=this;let l=0,a;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),c}function c(p){return l>999||p===null||p===91||p===93&&!a||p===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):we(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||we(p)||l++>999?(e.exit("chunkString"),c(p)):(e.consume(p),a||(a=!Se(p)),p===92?h:d)}function h(p){return p===91||p===92||p===93?(e.consume(p),l++,d):d(p)}}function Dx(e,t,n,r,i,o){let s;return l;function l(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),s=h===40?41:h,a):n(h)}function a(h){return h===s?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(o),u(h))}function u(h){return h===s?(e.exit(o),a(s)):h===null?n(h):we(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),Ae(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===s||h===null||we(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?d:c)}function d(h){return h===s||h===92?(e.consume(h),c):c(h)}}function co(e,t){let n;return r;function r(i){return we(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Se(i)?Ae(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const jS={name:"definition",tokenize:TS},_S={partial:!0,tokenize:$S};function TS(e,t,n){const r=this;let i;return o;function o(p){return e.enter("definition"),s(p)}function s(p){return Fx.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function l(p){return i=gn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),a):n(p)}function a(p){return ze(p)?co(e,u)(p):u(p)}function u(p){return Px(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(_S,d,d)(p)}function d(p){return Se(p)?Ae(e,h,"whitespace")(p):h(p)}function h(p){return p===null||we(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function $S(e,t,n){return r;function r(l){return ze(l)?co(e,i)(l):n(l)}function i(l){return Dx(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return Se(l)?Ae(e,s,"whitespace")(l):s(l)}function s(l){return l===null||we(l)?t(l):n(l)}}const LS={name:"hardBreakEscape",tokenize:IS};function IS(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return we(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const AS={name:"headingAtx",resolve:OS,tokenize:RS};function OS(e,t){let n=e.length-2,r=3;if(e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r){const i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"};mn(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])}return e}function RS(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&r++<6?(e.consume(c),s):c===null||ze(c)?(e.exit("atxHeadingSequence"),l(c)):n(c)}function l(c){return c===35?(e.enter("atxHeadingSequence"),a(c)):c===null||we(c)?(e.exit("atxHeading"),t(c)):Se(c)?Ae(e,l,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function a(c){return c===35?(e.consume(c),a):(e.exit("atxHeadingSequence"),l(c))}function u(c){return c===null||c===35||ze(c)?(e.exit("atxHeadingText"),l(c)):(e.consume(c),u)}}const zx=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],hc=["pre","script","style","textarea"],MS={concrete:!0,name:"htmlFlow",resolveTo:FS,tokenize:DS},PS={partial:!0,tokenize:zS};function FS(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function DS(e,t,n){const r=this;let i,o,s,l,a;return u;function u(j){return c(j)}function c(j){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(j),d}function d(j){return j===33?(e.consume(j),h):j===47?(e.consume(j),o=!0,v):j===63?(e.consume(j),i=3,r.interrupt?t:S):gt(j)?(e.consume(j),s=String.fromCharCode(j),k):n(j)}function h(j){return j===45?(e.consume(j),i=2,p):j===91?(e.consume(j),i=5,l=0,x):gt(j)?(e.consume(j),i=4,r.interrupt?t:S):n(j)}function p(j){return j===45?(e.consume(j),r.interrupt?t:S):n(j)}function x(j){const R="CDATA[";return j===R.charCodeAt(l++)?(e.consume(j),l===R.length?r.interrupt?t:T:x):n(j)}function v(j){return gt(j)?(e.consume(j),s=String.fromCharCode(j),k):n(j)}function k(j){if(j===null||j===47||j===62||ze(j)){const R=j===47,I=s.toLowerCase();return!R&&!o&&hc.includes(I)?(i=1,r.interrupt?t(j):T(j)):zx.includes(s.toLowerCase())?(i=6,R?(e.consume(j),y):r.interrupt?t(j):T(j)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(j):o?m(j):g(j))}return j===45||yt(j)?(e.consume(j),s+=String.fromCharCode(j),k):n(j)}function y(j){return j===62?(e.consume(j),r.interrupt?t:T):n(j)}function m(j){return Se(j)?(e.consume(j),m):b(j)}function g(j){return j===47?(e.consume(j),b):j===58||j===95||gt(j)?(e.consume(j),w):Se(j)?(e.consume(j),g):b(j)}function w(j){return j===45||j===46||j===58||j===95||yt(j)?(e.consume(j),w):C(j)}function C(j){return j===61?(e.consume(j),E):Se(j)?(e.consume(j),C):g(j)}function E(j){return j===null||j===60||j===61||j===62||j===96?n(j):j===34||j===39?(e.consume(j),a=j,A):Se(j)?(e.consume(j),E):_(j)}function A(j){return j===a?(e.consume(j),a=null,$):j===null||we(j)?n(j):(e.consume(j),A)}function _(j){return j===null||j===34||j===39||j===47||j===60||j===61||j===62||j===96||ze(j)?C(j):(e.consume(j),_)}function $(j){return j===47||j===62||Se(j)?g(j):n(j)}function b(j){return j===62?(e.consume(j),O):n(j)}function O(j){return j===null||we(j)?T(j):Se(j)?(e.consume(j),O):n(j)}function T(j){return j===45&&i===2?(e.consume(j),U):j===60&&i===1?(e.consume(j),W):j===62&&i===4?(e.consume(j),Y):j===63&&i===3?(e.consume(j),S):j===93&&i===5?(e.consume(j),G):we(j)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(PS,Z,F)(j)):j===null||we(j)?(e.exit("htmlFlowData"),F(j)):(e.consume(j),T)}function F(j){return e.check(pc,L,Z)(j)}function L(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),B}function B(j){return j===null||we(j)?F(j):(e.enter("htmlFlowData"),T(j))}function U(j){return j===45?(e.consume(j),S):T(j)}function W(j){return j===47?(e.consume(j),s="",P):T(j)}function P(j){if(j===62){const R=s.toLowerCase();return hc.includes(R)?(e.consume(j),Y):T(j)}return gt(j)&&s.length<8?(e.consume(j),s+=String.fromCharCode(j),P):T(j)}function G(j){return j===93?(e.consume(j),S):T(j)}function S(j){return j===62?(e.consume(j),Y):j===45&&i===2?(e.consume(j),S):T(j)}function Y(j){return j===null||we(j)?(e.exit("htmlFlowData"),Z(j)):(e.consume(j),Y)}function Z(j){return e.exit("htmlFlow"),t(j)}}function zS(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Wo,t,n)}}const BS={name:"htmlText",tokenize:US};function US(e,t,n){const r=this;let i,o,s;return l;function l(S){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(S),a}function a(S){return S===33?(e.consume(S),u):S===47?(e.consume(S),C):S===63?(e.consume(S),g):gt(S)?(e.consume(S),_):n(S)}function u(S){return S===45?(e.consume(S),c):S===91?(e.consume(S),o=0,x):gt(S)?(e.consume(S),m):n(S)}function c(S){return S===45?(e.consume(S),p):n(S)}function d(S){return S===null?n(S):S===45?(e.consume(S),h):we(S)?(s=d,W(S)):(e.consume(S),d)}function h(S){return S===45?(e.consume(S),p):d(S)}function p(S){return S===62?U(S):S===45?h(S):d(S)}function x(S){const Y="CDATA[";return S===Y.charCodeAt(o++)?(e.consume(S),o===Y.length?v:x):n(S)}function v(S){return S===null?n(S):S===93?(e.consume(S),k):we(S)?(s=v,W(S)):(e.consume(S),v)}function k(S){return S===93?(e.consume(S),y):v(S)}function y(S){return S===62?U(S):S===93?(e.consume(S),y):v(S)}function m(S){return S===null||S===62?U(S):we(S)?(s=m,W(S)):(e.consume(S),m)}function g(S){return S===null?n(S):S===63?(e.consume(S),w):we(S)?(s=g,W(S)):(e.consume(S),g)}function w(S){return S===62?U(S):g(S)}function C(S){return gt(S)?(e.consume(S),E):n(S)}function E(S){return S===45||yt(S)?(e.consume(S),E):A(S)}function A(S){return we(S)?(s=A,W(S)):Se(S)?(e.consume(S),A):U(S)}function _(S){return S===45||yt(S)?(e.consume(S),_):S===47||S===62||ze(S)?$(S):n(S)}function $(S){return S===47?(e.consume(S),U):S===58||S===95||gt(S)?(e.consume(S),b):we(S)?(s=$,W(S)):Se(S)?(e.consume(S),$):U(S)}function b(S){return S===45||S===46||S===58||S===95||yt(S)?(e.consume(S),b):O(S)}function O(S){return S===61?(e.consume(S),T):we(S)?(s=O,W(S)):Se(S)?(e.consume(S),O):$(S)}function T(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),i=S,F):we(S)?(s=T,W(S)):Se(S)?(e.consume(S),T):(e.consume(S),L)}function F(S){return S===i?(e.consume(S),i=void 0,B):S===null?n(S):we(S)?(s=F,W(S)):(e.consume(S),F)}function L(S){return S===null||S===34||S===39||S===60||S===61||S===96?n(S):S===47||S===62||ze(S)?$(S):(e.consume(S),L)}function B(S){return S===47||S===62||ze(S)?$(S):n(S)}function U(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):n(S)}function W(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),P}function P(S){return Se(S)?Ae(e,G,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):G(S)}function G(S){return e.enter("htmlTextData"),s(S)}}const Wd={name:"labelEnd",resolveAll:GS,resolveTo:KS,tokenize:qS},HS={tokenize:YS},WS={tokenize:XS},VS={tokenize:QS};function GS(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&mn(e,0,e.length,n),e}function KS(e,t){let n=e.length,r=0,i,o,s;for(;n--;){const c=e[n][1];if(i){if(c.type==="link"||c.type==="labelLink"&&c._inactive)break;e[n][0]==="enter"&&c.type==="labelLink"&&(c._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(c.type==="labelImage"||c.type==="labelLink")&&!c._balanced&&(i=n,c.type!=="labelLink")){r=2;break}}else c.type==="labelEnd"&&(o=n)}const l={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},a={type:"label",start:{...e[i][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[o-2][1].start}};return s=[["enter",l,t],["enter",a,t]],s=Jt(s,e.slice(i+1,i+r+3)),s=Jt(s,[["enter",u,t]]),s=Jt(s,Ul(t.parser.constructs.insideSpan.null,e.slice(i+r+4,o-3),t)),s=Jt(s,[["exit",u,t],e[o-2],e[o-1],["exit",a,t]]),s=Jt(s,e.slice(o+1)),s=Jt(s,[["exit",l,t]]),mn(e,i,e.length,s),e}function qS(e,t,n){const r=this,i=r._labelStarts;let o,s;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();o=i[i.length-1]}return l;function l(h){return o?o._inactive?d(h):(s=r.parser.defined.includes(gn(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),a):n(h)}function a(h){return h===40?e.attempt(HS,c,s?c:d)(h):h===91?e.attempt(WS,c,s?u:d)(h):s?c(h):d(h)}function u(h){return e.attempt(VS,c,d)(h)}function c(h){return i.pop(),t(h)}function d(h){return o._balanced=!0,n(h)}}function YS(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return ze(d)?co(e,o)(d):o(d)}function o(d){return d===41?c(d):Px(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return ze(d)?co(e,a)(d):c(d)}function l(d){return n(d)}function a(d){return d===34||d===39||d===40?Dx(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return ze(d)?co(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function XS(e,t,n){const r=this;return i;function i(l){return Fx.call(r,e,o,s,"reference","referenceMarker","referenceString")(l)}function o(l){return r.parser.defined.includes(gn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function QS(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const ZS={name:"labelStartImage",resolveAll:Wd.resolveAll,tokenize:JS};function JS(e,t,n){const r=this;let i;return o;function o(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),s}function s(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),i=e.exit("labelImage"),l):n(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(a))}}const eC={name:"labelStartLink",resolveAll:Wd.resolveAll,tokenize:tC};function tC(e,t,n){const r=this;let i;return o;function o(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),i=e.exit("labelLink"),s}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(l))}}const Fa={name:"lineEnding",tokenize:nC};function nC(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ae(e,t,"linePrefix")}}const Rs={name:"thematicBreak",tokenize:rC};function rC(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),s(u)}function s(u){return i=u,l(u)}function l(u){return u===i?(e.enter("thematicBreakSequence"),a(u)):r>=3&&(u===null||we(u))?(e.exit("thematicBreak"),t(u)):n(u)}function a(u){return u===i?(e.consume(u),r++,a):(e.exit("thematicBreakSequence"),Se(u)?Ae(e,l,"whitespace")(u):l(u))}}const $t={continuation:{tokenize:lC},exit:uC,name:"list",tokenize:sC},iC={partial:!0,tokenize:cC},oC={partial:!0,tokenize:aC};function sC(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return l;function l(p){const x=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:dc(p)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Rs,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(p)}return n(p)}function a(p){return dc(p)&&++s<10?(e.consume(p),a):(!r.interrupt||s<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Wo,r.interrupt?n:c,e.attempt(iC,h,d))}function c(p){return r.containerState.initialBlankLine=!0,o++,h(p)}function d(p){return Se(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function lC(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Wo,i,o);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ae(e,t,"listItemIndent",r.containerState.size+1)(l)}function o(l){return r.containerState.furtherBlankLines||!Se(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(oC,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ae(e,e.attempt($t,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function aC(e,t,n){const r=this;return Ae(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function uC(e){e.exit(this.containerState.type)}function cC(e,t,n){const r=this;return Ae(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const s=r.events[r.events.length-1];return!Se(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const gh={name:"setextUnderline",resolveTo:dC,tokenize:fC};function dC(e,t){const n=new gl;let r=e.length,i,o,s;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(o=r)}else e[r][1].type==="content"&&n.add(r,1,[]),!s&&e[r][1].type==="definition"&&(s=r);const l={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",s?(n.add(o,0,[["enter",l,t]]),n.add(s+1,0,[["exit",e[i][1],t]]),e[i][1].end={...e[s][1].end}):e[i][1]=l,n.add(e.length,0,[["exit",l,t]]),n.consume(e),e}function fC(e,t,n){const r=this;let i;return o;function o(u){let c=r.events.length,d;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){d=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=u,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===i?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),Se(u)?Ae(e,a,"lineSuffix")(u):a(u))}function a(u){return u===null||we(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const pC={tokenize:hC};function hC(e){const t=this,n=e.attempt(Wo,r,e.attempt(this.parser.constructs.flowInitial,i,Ae(e,e.attempt(this.parser.constructs.flow,i,e.attempt(bS,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const mC={resolveAll:Ux()},gC=Bx("string"),yC=Bx("text");function Bx(e){return{resolveAll:Ux(e==="text"?xC:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,l);return s;function s(c){return u(c)?o(c):l(c)}function l(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),a}function a(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),a)}function u(c){if(c===null)return!0;const d=i[c];let h=-1;if(d)for(;++h<d.length;){const p=d[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Ux(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function xC(e,t){const n=new gl;let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const i=e[r-1][1],o=t.sliceStream(i);let s=o.length,l=-1,a=0,u;for(;s--;){const c=o[s];if(typeof c=="string"){for(l=c.length;c.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(c===-2)u=!0,a++;else if(c!==-1){s++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(a=0),a){const c={type:r===e.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?l:i.start._bufferIndex+l,_index:i.start._index+s,line:i.end.line,column:i.end.column-a,offset:i.end.offset-a},end:{...i.end}};i.end={...c.start},i.start.offset===i.end.offset?Object.assign(i,c):n.add(r,0,[["enter",c,t],["exit",c,t]])}r++}return n.consume(e),e}const vC={42:$t,43:$t,45:$t,48:$t,49:$t,50:$t,51:$t,52:$t,53:$t,54:$t,55:$t,56:$t,57:$t,62:Ax},wC={91:jS},kC={[-2]:Pa,[-1]:Pa,32:Pa},bC={35:AS,42:Rs,45:[gh,Rs],60:MS,61:gh,95:Rs,96:mh,126:mh},EC={38:Rx,92:Ox},SC={[-5]:Fa,[-4]:Fa,[-3]:Fa,33:ZS,38:Rx,42:fc,60:[rS,BS],91:eC,92:[LS,Ox],93:Wd,95:fc,96:gS},CC={null:[fc,mC]},NC={null:[42,95]},jC={null:[]},_C=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:NC,contentInitial:wC,disable:jC,document:vC,flow:bC,flowInitial:kC,insideSpan:CC,string:EC,text:SC},Symbol.toStringTag,{value:"Module"}));function TC(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let s=[],l=[];const a={attempt:A(C),check:A(E),consume:m,enter:g,exit:w,interrupt:A(E,{interrupt:!0})},u={code:null,containerState:{},defineSkip:v,events:[],now:x,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:d};let c=t.tokenize.call(u,a);return t.resolveAll&&o.push(t),u;function d(O){return s=Jt(s,O),k(),s[s.length-1]!==null?[]:(_(t,0),u.events=Ul(o,u.events,u),u.events)}function h(O,T){return LC(p(O),T)}function p(O){return $C(s,O)}function x(){const{_bufferIndex:O,_index:T,line:F,column:L,offset:B}=r;return{_bufferIndex:O,_index:T,line:F,column:L,offset:B}}function v(O){i[O.line]=O.column,b()}function k(){for(;r._index<s.length;){const O=s[r._index];if(typeof O=="string"){const T=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===T&&r._bufferIndex<O.length;)y(O.charCodeAt(r._bufferIndex))}else y(O)}}function y(O){c=c(O)}function m(O){we(O)?(r.line++,r.column=1,r.offset+=O===-3?2:1,b()):O!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=O}function g(O,T){const F=T||{};return F.type=O,F.start=x(),u.events.push(["enter",F,u]),l.push(F),F}function w(O){const T=l.pop();return T.end=x(),u.events.push(["exit",T,u]),T}function C(O,T){_(O,T.from)}function E(O,T){T.restore()}function A(O,T){return F;function F(L,B,U){let W,P,G,S;return Array.isArray(L)?Z(L):"tokenize"in L?Z([L]):Y(L);function Y(M){return H;function H(K){const J=K!==null&&M[K],D=K!==null&&M.null,ee=[...Array.isArray(J)?J:J?[J]:[],...Array.isArray(D)?D:D?[D]:[]];return Z(ee)(K)}}function Z(M){return W=M,P=0,M.length===0?U:j(M[P])}function j(M){return H;function H(K){return S=$(),G=M,M.partial||(u.currentConstruct=M),M.name&&u.parser.constructs.disable.null.includes(M.name)?I():M.tokenize.call(T?Object.assign(Object.create(u),T):u,a,R,I)(K)}}function R(M){return O(G,S),B}function I(M){return S.restore(),++P<W.length?j(W[P]):U}}}function _(O,T){O.resolveAll&&!o.includes(O)&&o.push(O),O.resolve&&mn(u.events,T,u.events.length-T,O.resolve(u.events.slice(T),u)),O.resolveTo&&(u.events=O.resolveTo(u.events,u))}function $(){const O=x(),T=u.previous,F=u.currentConstruct,L=u.events.length,B=Array.from(l);return{from:L,restore:U};function U(){r=O,u.previous=T,u.currentConstruct=F,u.events.length=L,l=B,b()}}function b(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function $C(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,o)];else{if(s=e.slice(n,i),r>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function LC(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
116
- `;break}case-3:{s=`\r
117
- `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}function IC(e){const r={constructs:Tx([_C,...(e||{}).extensions||[]]),content:i(XE),defined:[],document:i(ZE),flow:i(pC),lazy:{},string:i(gC),text:i(yC)};return r;function i(o){return s;function s(l){return TC(r,o,l)}}}function AC(e){for(;!Mx(e););return e}const yh=/[\0\t\n\r]/g;function OC(){let e=1,t="",n=!0,r;return i;function i(o,s,l){o=t+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o));const a=[];let u=0;for(t="",n&&(o.charCodeAt(0)===65279&&u++,n=void 0);u<o.length;){yh.lastIndex=u;const c=yh.exec(o),d=c&&c.index!==void 0?c.index:o.length,h=o.charCodeAt(d);if(!c){t=o.slice(u);break}if(h===10&&u===d&&r)a.push(-3),r=void 0;else switch(r&&(a.push(-5),r=void 0),u<d&&(a.push(o.slice(u,d)),e+=d-u),h){case 0:{a.push(65533),e++;break}case 9:{const p=Math.ceil(e/4)*4;for(a.push(-2);e++<p;)a.push(-1);break}case 10:{a.push(-4),e=1;break}default:r=!0,e=1}u=d+1}return l&&(r&&a.push(-5),t&&a.push(t),a.push(null)),a}}const RC=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function MC(e){return e.replace(RC,PC)}function PC(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return $x(n.slice(o?2:1),o?16:10)}return Hd(n)||e}const Hx={}.hasOwnProperty;function FC(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),DC(n)(AC(IC(n).document().write(OC()(e,t,!0))))}function DC(e){const t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(ye),autolinkProtocol:b,autolinkEmail:b,atxHeading:s(lt),blockQuote:s(ee),characterEscape:b,characterReference:b,codeFenced:s(ue),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:s(ue,l),codeText:s(Fe,l),codeTextData:b,data:b,codeFlowValue:b,definition:s(_e),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:s(Te),hardBreakEscape:s(V),hardBreakTrailing:s(V),htmlFlow:s(te,l),htmlFlowData:b,htmlText:s(te,l),htmlTextData:b,image:s(se),label:l,link:s(ye),listItem:s(de),listItemValue:p,listOrdered:s(ge,h),listUnordered:s(ge),paragraph:s($e),reference:R,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:s(lt),strong:s(pt),thematicBreak:s(qe)},exit:{atxHeading:u(),atxHeadingSequence:E,autolink:u(),autolinkEmail:D,autolinkProtocol:J,blockQuote:u(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:M,characterReferenceMarkerNumeric:M,characterReferenceValue:H,characterReference:K,codeFenced:u(y),codeFencedFence:k,codeFencedFenceInfo:x,codeFencedFenceMeta:v,codeFlowValue:O,codeIndented:u(m),codeText:u(U),codeTextData:O,data:O,definition:u(),definitionDestinationString:C,definitionLabelString:g,definitionTitleString:w,emphasis:u(),hardBreakEscape:u(F),hardBreakTrailing:u(F),htmlFlow:u(L),htmlFlowData:O,htmlText:u(B),htmlTextData:O,image:u(P),label:S,labelText:G,lineEnding:T,link:u(W),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:I,resourceDestinationString:Y,resourceTitleString:Z,resource:j,setextHeading:u($),setextHeadingLineSequence:_,setextHeadingText:A,strong:u(),thematicBreak:u()}};Wx(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(X){let re={type:"root",children:[],position:void 0};const pe={stack:[re],tokenStack:[],config:t,enter:a,exit:c,buffer:l,resume:d,data:n},he=[],q=[];let oe=-1;for(;++oe<X.length;)if(q.push(X[oe]),X[oe][1].type==="listOrdered"||X[oe][1].type==="listUnordered")if(X[oe][0]==="enter")he.push(q.length-1);else{const me=he.pop();o(q,me)}for(X=q,oe=-1;++oe<X.length;){const me=t[X[oe][0]];X[oe][0]==="enter"&&t.beforeEnter.length>0&&i(t.beforeEnter,{...pe,sliceSerialize:X[oe][2].sliceSerialize},X[oe][1]),Hx.call(me,X[oe][1].type)&&me[X[oe][1].type].call({...pe,sliceSerialize:X[oe][2].sliceSerialize},X[oe][1]),X[oe][0]==="exit"&&t.afterExit.length>0&&i(t.afterExit,{...pe,sliceSerialize:X[oe][2].sliceSerialize},X[oe][1])}if(pe.tokenStack.length>0){const me=pe.tokenStack[pe.tokenStack.length-1];(me[1]||xh).call(pe,void 0,me[0])}for(re.position={start:Vn(X.length>0?X[0][1].start:{line:1,column:1,offset:0}),end:Vn(X.length>0?X[X.length-2][1].end:{line:1,column:1,offset:0})},oe=-1;++oe<t.transforms.length;)re=t.transforms[oe](re)||re;return re}function i(X,re,pe){let he=-1;for(;++he<X.length;)X[he].call(re,pe)}function o(X,re){const pe=X.length-1;let he=re-1,q=-1,oe=!1,me,ke,be,Ne;const tt=[];for(;++he<=pe;){const Oe=X[he];switch(Oe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Oe[0]==="enter"?q++:q--,Ne=void 0;break}case"lineEndingBlank":{Oe[0]==="enter"&&(me&&!Ne&&!q&&!be&&(be=he),Ne=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ne=void 0}if(!q&&Oe[0]==="enter"&&Oe[1].type==="listItemPrefix"||q===-1&&Oe[0]==="exit"&&(Oe[1].type==="listUnordered"||Oe[1].type==="listOrdered")){if(me){let Ze=he;for(ke=void 0;Ze--;){const wt=X[Ze];if(wt[1].type==="lineEnding"||wt[1].type==="lineEndingBlank"){if(wt[0]==="exit")continue;ke&&(X[ke][1].type="lineEndingBlank",oe=!0),wt[1].type="lineEnding",ke=Ze}else if(!(wt[1].type==="linePrefix"||wt[1].type==="blockQuotePrefix"||wt[1].type==="blockQuotePrefixWhitespace"||wt[1].type==="blockQuoteMarker"||wt[1].type==="listItemIndent"))break}be&&(!ke||be<ke)&&(me._spread=!0),me.end=Object.assign({},ke?X[ke][1].start:Oe[1].end),tt.push({at:ke||he,event:["exit",me,Oe[2]]})}if(Oe[1].type==="listItemPrefix"){const Ze={type:"listItem",_spread:!1,start:Object.assign({},Oe[1].start),end:void 0};me=Ze,tt.push({at:he,event:["enter",Ze,Oe[2]]}),be=void 0,Ne=!0}}}const Ye=X.splice(re);let Xe=0;for(he=-1;++he<Ye.length;){for(;Xe<tt.length&&tt[Xe].at===re+he;)X.push(tt[Xe++].event);X.push(Ye[he])}X[re][1]._spread=oe}function s(X,re){return pe;function pe(he){a.call(this,X(he),he),re&&re.call(this,he)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(X,re,pe){this.stack[this.stack.length-1].children.push(X),this.stack.push(X),this.tokenStack.push([re,pe||void 0]),X.position={start:Vn(re.start),end:void 0}}function u(X){return re;function re(pe){X&&X.call(this,pe),c.call(this,pe)}}function c(X,re){const pe=this.stack.pop(),he=this.tokenStack.pop();if(!he)throw new Error("Cannot close `"+X.type+"` ("+uo({start:X.start,end:X.end})+"): it’s not open");he[0].type!==X.type&&(re?re.call(this,X,he[0]):(he[1]||xh).call(this,X,he[0])),pe.position.end=Vn(X.end)}function d(){return Bl(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function p(X){if(this.data.expectingFirstListItemValue){const re=this.stack[this.stack.length-2];re.start=Number.parseInt(this.sliceSerialize(X),10),this.data.expectingFirstListItemValue=void 0}}function x(){const X=this.resume(),re=this.stack[this.stack.length-1];re.lang=X}function v(){const X=this.resume(),re=this.stack[this.stack.length-1];re.meta=X}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const X=this.resume(),re=this.stack[this.stack.length-1];re.value=X.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const X=this.resume(),re=this.stack[this.stack.length-1];re.value=X.replace(/(\r?\n|\r)$/g,"")}function g(X){const re=this.resume(),pe=this.stack[this.stack.length-1];pe.label=re,pe.identifier=gn(this.sliceSerialize(X)).toLowerCase()}function w(){const X=this.resume(),re=this.stack[this.stack.length-1];re.title=X}function C(){const X=this.resume(),re=this.stack[this.stack.length-1];re.url=X}function E(X){const re=this.stack[this.stack.length-1];if(!re.depth){const pe=this.sliceSerialize(X).length;re.depth=pe}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function _(X){const re=this.stack[this.stack.length-1];re.depth=this.sliceSerialize(X).codePointAt(0)===61?1:2}function $(){this.data.setextHeadingSlurpLineEnding=void 0}function b(X){const pe=this.stack[this.stack.length-1].children;let he=pe[pe.length-1];(!he||he.type!=="text")&&(he=et(),he.position={start:Vn(X.start),end:void 0},pe.push(he)),this.stack.push(he)}function O(X){const re=this.stack.pop();re.value+=this.sliceSerialize(X),re.position.end=Vn(X.end)}function T(X){const re=this.stack[this.stack.length-1];if(this.data.atHardBreak){const pe=re.children[re.children.length-1];pe.position.end=Vn(X.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(re.type)&&(b.call(this,X),O.call(this,X))}function F(){this.data.atHardBreak=!0}function L(){const X=this.resume(),re=this.stack[this.stack.length-1];re.value=X}function B(){const X=this.resume(),re=this.stack[this.stack.length-1];re.value=X}function U(){const X=this.resume(),re=this.stack[this.stack.length-1];re.value=X}function W(){const X=this.stack[this.stack.length-1];if(this.data.inReference){const re=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=re,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function P(){const X=this.stack[this.stack.length-1];if(this.data.inReference){const re=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=re,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function G(X){const re=this.sliceSerialize(X),pe=this.stack[this.stack.length-2];pe.label=MC(re),pe.identifier=gn(re).toLowerCase()}function S(){const X=this.stack[this.stack.length-1],re=this.resume(),pe=this.stack[this.stack.length-1];if(this.data.inReference=!0,pe.type==="link"){const he=X.children;pe.children=he}else pe.alt=re}function Y(){const X=this.resume(),re=this.stack[this.stack.length-1];re.url=X}function Z(){const X=this.resume(),re=this.stack[this.stack.length-1];re.title=X}function j(){this.data.inReference=void 0}function R(){this.data.referenceType="collapsed"}function I(X){const re=this.resume(),pe=this.stack[this.stack.length-1];pe.label=re,pe.identifier=gn(this.sliceSerialize(X)).toLowerCase(),this.data.referenceType="full"}function M(X){this.data.characterReferenceType=X.type}function H(X){const re=this.sliceSerialize(X),pe=this.data.characterReferenceType;let he;pe?(he=$x(re,pe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):he=Hd(re);const q=this.stack[this.stack.length-1];q.value+=he}function K(X){const re=this.stack.pop();re.position.end=Vn(X.end)}function J(X){O.call(this,X);const re=this.stack[this.stack.length-1];re.url=this.sliceSerialize(X)}function D(X){O.call(this,X);const re=this.stack[this.stack.length-1];re.url="mailto:"+this.sliceSerialize(X)}function ee(){return{type:"blockquote",children:[],position:void 0}}function ue(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function Fe(){return{type:"inlineCode",value:"",position:void 0}}function _e(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}function Te(){return{type:"emphasis",children:[],position:void 0}}function lt(){return{type:"heading",depth:0,children:[],position:void 0}}function V(){return{type:"break",position:void 0}}function te(){return{type:"html",value:"",position:void 0}}function se(){return{type:"image",title:null,url:"",alt:null,position:void 0}}function ye(){return{type:"link",title:null,url:"",children:[],position:void 0}}function ge(X){return{type:"list",ordered:X.type==="listOrdered",start:null,spread:X._spread,children:[],position:void 0}}function de(X){return{type:"listItem",spread:X._spread,checked:null,children:[],position:void 0}}function $e(){return{type:"paragraph",children:[],position:void 0}}function pt(){return{type:"strong",children:[],position:void 0}}function et(){return{type:"text",value:"",position:void 0}}function qe(){return{type:"thematicBreak",position:void 0}}}function Vn(e){return{line:e.line,column:e.column,offset:e.offset}}function Wx(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Wx(e,r):zC(e,r)}}function zC(e,t){let n;for(n in t)if(Hx.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"afterExit":case"beforeEnter":{const r=t[n];r&&e[n].push(r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function xh(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+uo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+uo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+uo({start:t.start,end:t.end})+") is still open")}function BC(e){const t=this;t.parser=n;function n(r){return FC(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function UC(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function HC(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
118
- `}]}function WC(e,t){const n=t.value?t.value+`
119
- `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function VC(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function GC(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function KC(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Ii(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let s,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=o+1,l+=1,e.footnoteCounts.set(r,l);const a={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,a);const u={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,u),e.applyData(t,u)}function qC(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function YC(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Vx(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function XC(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Vx(e,t);const i={src:Ii(r.url||"")};t.alt!==null&&t.alt!==void 0&&(i.alt=t.alt),r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function QC(e,t){const n={src:Ii(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function ZC(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function JC(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Vx(e,t);const i={href:Ii(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function eN(e,t){const n={href:Ii(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function tN(e,t,n){const r=e.all(t),i=n?nN(n):Gx(t),o={},s=[];if(typeof t.checked=="boolean"){const c=r[0];let d;c&&c.type==="element"&&c.tagName==="p"?d=c:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const c=r[l];(i||l!==0||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
120
- `}),c.type==="element"&&c.tagName==="p"&&!i?s.push(...c.children):s.push(c)}const a=r[r.length-1];a&&(i||a.type!=="element"||a.tagName!=="p")&&s.push({type:"text",value:`
121
- `});const u={type:"element",tagName:"li",properties:o,children:s};return e.patch(t,u),e.applyData(t,u)}function nN(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const{children:n}=e;let r=-1;for(;!t&&++r<n.length;)t=Gx(n[r])}return t}function Gx(e){const{spread:t}=e;return t??e.children.length>1}function rN(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function iN(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function oN(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function sN(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lN(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=Dd(t.children[1]),a=bx(t.children[t.children.length-1]);l&&a&&(s.position={start:l,end:a}),i.push(s)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function aN(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,l=s?s.length:t.children.length;let a=-1;const u=[];for(;++a<l;){const d=t.children[a],h={},p=s?s[a]:void 0;p&&(h.align=p);let x={type:"element",tagName:o,properties:h,children:[]};d&&(x.children=e.all(d),e.patch(d,x),x=e.applyData(d,x)),u.push(x)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}function uN(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const vh=9,wh=32;function cN(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(kh(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(kh(t.slice(i),i>0,!1)),o.join("")}function kh(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===vh||o===wh;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===vh||o===wh;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function dN(e,t){const n={type:"text",value:cN(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function fN(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const pN={blockquote:UC,break:HC,code:WC,delete:VC,emphasis:GC,footnoteReference:KC,heading:qC,html:YC,imageReference:XC,image:QC,inlineCode:ZC,linkReference:JC,link:eN,listItem:tN,list:rN,paragraph:iN,root:oN,strong:sN,table:lN,tableCell:uN,tableRow:aN,text:dN,thematicBreak:fN,toml:ms,yaml:ms,definition:ms,footnoteDefinition:ms};function ms(){}const Kx=-1,Hl=0,fo=1,yl=2,Vd=3,Gd=4,Kd=5,qd=6,qx=7,Yx=8,{defineProperty:hN}=Object,Xx=typeof self=="object"?self:globalThis,bh=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new Xx[e](t)},mN=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,s]=t[i];switch(o){case Hl:case Kx:return n(s,i);case fo:{const l=n([],i);for(const a of s)l.push(r(a));return l}case yl:{const l=n({},i);for(const[a,u]of s){const c=r(a),d=r(u);c==="__proto__"?hN(l,c,{value:d,configurable:!0,enumerable:!0,writable:!0}):l[c]=d}return l}case Vd:return n(new Date(s),i);case Gd:{const{source:l,flags:a}=s;return n(new RegExp(l,a),i)}case Kd:{const l=n(new Map,i);for(const[a,u]of s)l.set(r(a),r(u));return l}case qd:{const l=n(new Set,i);for(const a of s)l.add(r(a));return l}case qx:{const{name:l,message:a}=s;return n(typeof Xx[l]=="function"?bh(l,a):new Error(a),i)}case Yx:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:l}=new Uint8Array(s);return n(new DataView(l),s)}case"-0":return-0}return n(bh(o,s),i)};return r},Eh=e=>mN(new Map,e)(0),wr="",{toString:gN}={},{keys:yN,is:xN}=Object,Gi=e=>{const t=typeof e;if(t!=="object"||!e)return[Hl,t];const n=gN.call(e).slice(8,-1);switch(n){case"Array":return[fo,wr];case"Object":return[yl,wr];case"Date":return[Vd,wr];case"RegExp":return[Gd,wr];case"Map":return[Kd,wr];case"Set":return[qd,wr];case"DataView":return[fo,n]}return n.includes("Array")?[fo,n]:e instanceof Error?[qx,e.name||"Error"]:[yl,n]},gs=([e,t])=>e===Hl&&(t==="function"||t==="symbol"),vN=(e,t,n,r)=>{const i=(s,l)=>{const a=r.push(s)-1;return n.set(l,a),a},o=s=>{if(n.has(s))return n.get(s);let[l,a]=Gi(s);switch(l){case Hl:{let c=s;switch(a){case"bigint":l=Yx,c=s.toString();break;case"number":if(!s&&xN(s,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);c=null;break;case"undefined":return i([Kx],s)}return i([l,c],s)}case fo:{if(a){let h=s;return a==="DataView"?h=new Uint8Array(s.buffer):a==="ArrayBuffer"&&(h=new Uint8Array(s)),i([a,[...h]],s)}const c=[],d=i([l,c],s);for(const h of s)c.push(o(h));return d}case yl:{if(a)switch(a){case"BigInt":return i([a,s.toString()],s);case"Boolean":case"Number":case"String":return i([a,s.valueOf()],s)}if(t&&"toJSON"in s)return o(s.toJSON());const c=[],d=i([l,c],s);for(const h of yN(s))(e||!gs(Gi(s[h])))&&c.push([o(h),o(s[h])]);return d}case Vd:return i([l,isNaN(s.getTime())?wr:s.toISOString()],s);case Gd:{const{source:c,flags:d}=s;return i([l,{source:c,flags:d}],s)}case Kd:{const c=[],d=i([l,c],s);for(const[h,p]of s)(e||!(gs(Gi(h))||gs(Gi(p))))&&c.push([o(h),o(p)]);return d}case qd:{const c=[],d=i([l,c],s);for(const h of s)(e||!gs(Gi(h)))&&c.push(o(h));return d}}const{message:u}=s;return i([l,{name:a,message:u}],s)};return o},Sh=(e,{json:t,lossy:n}={})=>{const r=[];return vN(!(t||n),!!t,new Map,r)(e),r},xl=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Eh(Sh(e,t)):structuredClone(e):(e,t)=>Eh(Sh(e,t));function wN(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function kN(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function bN(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||wN,r=e.options.footnoteBackLabel||kN,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[],a=[];let u=-1;for(;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);c&&(l[u]=e.all(c))}for(u=-1;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);if(!c)continue;const d=l[u],h=String(c.identifier).toUpperCase(),p=Ii(h.toLowerCase());let x=0;const v=[],k=e.footnoteCounts.get(h);for(;k!==void 0&&++x<=k;){v.length>0&&v.push({type:"text",value:" "});let g=typeof n=="string"?n:n(u,x);typeof g=="string"&&(g={type:"text",value:g}),v.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,x),className:["data-footnote-backref"]},children:Array.isArray(g)?g:[g]})}const y=d[d.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const g=y.children[y.children.length-1];g&&g.type==="text"?g.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...v)}else d.push(...v);const m={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(d,!0)};e.patch(c,m),a.push(m)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...xl(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
122
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
123
- `}]}}const Wl=function(e){if(e==null)return NN;if(typeof e=="function")return Vl(e);if(typeof e=="object")return Array.isArray(e)?EN(e):SN(e);if(typeof e=="string")return CN(e);throw new Error("Expected function, string, or object as test")};function EN(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Wl(e[n]);return Vl(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function SN(e){const t=e;return Vl(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function CN(e){return Vl(t);function t(n){return n&&n.type===e}}function Vl(e){return t;function t(n,r,i){return!!(jN(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function NN(){return!0}function jN(e){return e!==null&&typeof e=="object"&&"type"in e}const Qx=[],_N=!0,po=!1,mc="skip";function gc(e,t,n,r){if(!e||typeof e!="object")throw new Error("Unexpected value `"+e+"` for `tree`, expected node");let i=!0,o,s,l,a;if(typeof n=="function"||n&&typeof n=="object"?(o=t,s=n,r&&(i=!1)):(s=t,n&&(i=!1)),typeof s=="function")l=s;else if(s&&typeof s=="object"){if(!(s.enter===null||s.enter===void 0))if(typeof s.enter=="function")l=s.enter;else throw new Error("Unexpected value `"+s.enter+"` for `visitors.enter`, expected optional visitor");if(typeof s.exit=="function")a=s.exit;else throw new Error("Unexpected value `"+s.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw new Error("Unexpected value `"+s+"` for `enter` or `visitors`, expected visitor or object with visitors");const u=Wl(o),c=i?1:-1;d(e,void 0,[])();function d(h,p,x){const v=h&&typeof h=="object"?h:{};if(typeof v.type=="string"){const y=typeof v.tagName=="string"?v.tagName:typeof v.name=="string"?v.name:void 0;Object.defineProperty(k,"name",{value:"node ("+(h.type+(y?"<"+y+">":""))+")"})}return k;function k(){const y=!o||u(h,p,x[x.length-1]||void 0);let m=Qx;if(l&&y&&(m=Ch(l(h,x,p)),m[0]===po))return m;if("children"in h&&h.children){const g=h;if(g.children&&m[0]!==mc){let w=(i?-1:g.children.length)+c;const C=[...x,g];for(;w>-1&&w<g.children.length;){const E=g.children[w],A=d(E,w,C)();if(A[0]===po)return A;w=typeof A[1]=="number"?A[1]:w+c}}}if(a&&y){const g=Ch(a(h,x,p));if(g[0]===mc)throw new Error("Unexpected value `"+g[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(g[0]===po||typeof g[1]=="number")return g}return m}}}function Ch(e){return Array.isArray(e)?e:typeof e=="number"?[_N,e]:e==null?Qx:[e]}function Gl(e,t,n,r){let i,o,s;o=t,s=n,typeof o=="function"?gc(e,i,yc(o),s):gc(e,i,TN(o),s)}function TN(e){return!e||typeof e!="object"?e:{enter:typeof e.enter=="function"?yc(e.enter):e.enter,exit:typeof e.exit=="function"?yc(e.exit):e.exit}}function yc(e){return t;function t(n,r,i){return e(n,i,r[r.length-1])}}const xc={}.hasOwnProperty,$N={};function LN(e,t){const n=t||$N,r=new Map,i=new Map,o=new Map,s={...pN,...n.handlers},l={all:u,applyData:AN,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:s,one:a,options:n,patch:IN,wrap:RN};return Gl(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const d=String(c.identifier).toUpperCase();c.type==="definition"?r.has(d)||r.set(d,c):i.has(d)||i.set(d,c)}}),l;function a(c,d){const{type:h}=c,p=l.handlers[h];if(xc.call(l.handlers,h)&&p)return p(l,c,d);if(l.options.passThrough&&l.options.passThrough.includes(h)){if("children"in c){const{children:v,...k}=c;return{...xl(k),children:l.all(c)}}return xl(c)}return(l.options.unknownHandler||ON)(l,c,d)}function u(c){const d=[];if("children"in c){const h=c.children;let p=-1;for(;++p<h.length;){const x=l.one(h[p],c);if(x){if(p&&h[p-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=Nh(x.value)),!Array.isArray(x)&&x.type==="element")){const v=x.children[0];v&&v.type==="text"&&(v.value=Nh(v.value))}Array.isArray(x)?d.push(...x):d.push(x)}}}return d}}function IN(e,t){e.position&&(t.position=kE(e))}function AN(e,t){let n=t;if(e&&e.data){const{hChildren:r,hName:i,hProperties:o}=e.data;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const s="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:s}}n.type==="element"&&o&&Object.assign(n.properties,xl(o)),"children"in n&&n.children&&r!==null&&r!==void 0&&(n.children=r)}return n}function ON(e,t){const n=t.data||{},r="value"in t&&!(xc.call(n,"hProperties")||xc.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function RN(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
124
- `});++r<e.length;)r&&n.push({type:"text",value:`
125
- `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
126
- `}),n}function Nh(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function jh(e,t){const n=LN(e,t),r=n.one(e,void 0),i=bN(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
127
- `},i),o}function MN(e,t){return e&&"run"in e?async function(n,r){const i=jh(n,{file:r,...t});await e.run(i,r)}:function(n,r){return jh(n,{file:r,...e||t})}}function _h(e){if(e)throw e}var Ms=Object.prototype.hasOwnProperty,Zx=Object.prototype.toString,Th=Object.defineProperty,$h=Object.getOwnPropertyDescriptor,Lh=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Zx.call(t)==="[object Array]"},Ih=function(t){if(!t||Zx.call(t)!=="[object Object]")return!1;var n=Ms.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Ms.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Ms.call(t,i)},Ah=function(t,n){Th&&n.name==="__proto__"?Th(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Oh=function(t,n){if(n==="__proto__")if(Ms.call(t,n)){if($h)return $h(t,n).value}else return;return t[n]},PN=function e(){var t,n,r,i,o,s,l=arguments[0],a=1,u=arguments.length,c=!1;for(typeof l=="boolean"&&(c=l,l=arguments[1]||{},a=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});a<u;++a)if(t=arguments[a],t!=null)for(n in t)r=Oh(l,n),i=Oh(t,n),l!==i&&(c&&i&&(Ih(i)||(o=Lh(i)))?(o?(o=!1,s=r&&Lh(r)?r:[]):s=r&&Ih(r)?r:{},Ah(l,{name:n,newValue:e(c,s,i)})):typeof i<"u"&&Ah(l,{name:n,newValue:i}));return l};const Da=Zh(PN);function vc(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function FN(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...i);function l(a,...u){const c=e[++o];let d=-1;if(a){s(a);return}for(;++d<i.length;)(u[d]===null||u[d]===void 0)&&(u[d]=i[d]);i=u,c?DN(c,l)(...u):s(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function DN(e,t){let n;return r;function r(...s){const l=e.length>s.length;let a;l&&s.push(i);try{a=e.apply(this,s)}catch(u){const c=u;if(l&&n)throw c;return i(c)}l||(a&&a.then&&typeof a.then=="function"?a.then(o,i):a instanceof Error?i(a):o(a))}function i(s,...l){n||(n=!0,t(s,...l))}function o(s){i(null,s)}}const bn={basename:zN,dirname:BN,extname:UN,join:HN,sep:"/"};function zN(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Vo(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function BN(e){if(Vo(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function UN(e){Vo(e);let t=e.length,n=-1,r=0,i=-1,o=0,s;for(;t--;){const l=e.codePointAt(t);if(l===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),l===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function HN(...e){let t=-1,n;for(;++t<e.length;)Vo(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":WN(n)}function WN(e){Vo(e);const t=e.codePointAt(0)===47;let n=VN(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function VN(e,t){let n="",r=0,i=-1,o=0,s=-1,l,a;for(;++s<=e.length;){if(s<e.length)l=e.codePointAt(s);else{if(l===47)break;l=47}if(l===47){if(!(i===s-1||o===1))if(i!==s-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(a=n.lastIndexOf("/"),a!==n.length-1){a<0?(n="",r=0):(n=n.slice(0,a),r=n.length-1-n.lastIndexOf("/")),i=s,o=0;continue}}else if(n.length>0){n="",r=0,i=s,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,o=0}else l===46&&o>-1?o++:o=-1}return n}function Vo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const GN={cwd:KN};function KN(){return"/"}function wc(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function qN(e){if(typeof e=="string")e=new URL(e);else if(!wc(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return YN(e)}function YN(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const za=["history","path","basename","stem","extname","dirname"];class Jx{constructor(t){let n;t?wc(t)?n={path:t}:typeof t=="string"||XN(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":GN.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<za.length;){const o=za[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)za.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?bn.basename(this.path):void 0}set basename(t){Ua(t,"basename"),Ba(t,"basename"),this.path=bn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?bn.dirname(this.path):void 0}set dirname(t){Rh(this.basename,"dirname"),this.path=bn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?bn.extname(this.path):void 0}set extname(t){if(Ba(t,"extname"),Rh(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=bn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){wc(t)&&(t=qN(t)),Ua(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?bn.basename(this.path,this.extname):void 0}set stem(t){Ua(t,"stem"),Ba(t,"stem"),this.path=bn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new zl(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Ba(e,t){if(e&&e.includes(bn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+bn.sep+"`")}function Ua(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Rh(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function XN(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const QN=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},ZN={}.hasOwnProperty;class Yd extends QN{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=FN()}copy(){const t=new Yd;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Da(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Va("data",this.frozen),this.namespace[t]=n,this):ZN.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Va("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=ys(t),r=this.parser||this.Parser;return Ha("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ha("process",this.parser||this.Parser),Wa("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,s){const l=ys(t),a=r.parse(l);r.run(a,l,function(c,d,h){if(c||!d||!h)return u(c);const p=d,x=r.stringify(p,h);tj(x)?h.value=x:h.result=x,u(c,h)});function u(c,d){c||!d?s(c):o?o(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),Ha("processSync",this.parser||this.Parser),Wa("processSync",this.compiler||this.Compiler),this.process(t,i),Ph("processSync","process",n),r;function i(o,s){n=!0,_h(o),r=s}}run(t,n,r){Mh(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(s,l){const a=ys(n);i.run(t,a,u);function u(c,d,h){const p=d||t;c?l(c):s?s(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),Ph("runSync","run",r),i;function o(s,l){_h(s),i=l,r=!0}}stringify(t,n){this.freeze();const r=ys(n),i=this.compiler||this.Compiler;return Wa("stringify",i),Mh(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Va("use",this.frozen),t!=null)if(typeof t=="function")a(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(u){if(typeof u=="function")a(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...d]=u;a(c,d)}else s(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function s(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(u.plugins),u.settings&&(i.settings=Da(!0,i.settings,u.settings))}function l(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const d=u[c];o(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function a(u,c){let d=-1,h=-1;for(;++d<r.length;)if(r[d][0]===u){h=d;break}if(h===-1)r.push([u,...c]);else if(c.length>0){let[p,...x]=c;const v=r[h][1];vc(v)&&vc(p)&&(p=Da(!0,v,p)),r[h]=[u,p,...x]}}}}const JN=new Yd().freeze();function Ha(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Wa(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Va(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Mh(e){if(!vc(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ph(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ys(e){return ej(e)?e:new Jx(e)}function ej(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function tj(e){return typeof e=="string"||nj(e)}function nj(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const rj="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Fh=[],Dh={allowDangerousHtml:!0},ij=/^(https?|ircs?|mailto|xmpp)$/i,oj=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function sj(e){const t=lj(e),n=aj(e);return uj(t.runSync(t.parse(n),n),e)}function lj(e){const t=e.rehypePlugins||Fh,n=e.remarkPlugins||Fh,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Dh}:Dh;return JN().use(BC).use(n).use(MN,r).use(t)}function aj(e){const t=e.children||"",n=new Jx;return typeof t=="string"&&(n.value=t),n}function uj(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,a=t.urlTransform||ev;for(const c of oj)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+rj+c.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Gl(e,u),jE(e,{Fragment:f.Fragment,components:i,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0});function u(c,d,h){if(c.type==="raw"&&h&&typeof d=="number")return s?h.children.splice(d,1):h.children[d]={type:"text",value:c.value},d;if(c.type==="element"){let p;for(p in Ma)if(Object.hasOwn(Ma,p)&&Object.hasOwn(c.properties,p)){const x=c.properties[p],v=Ma[p];(v===null||v.includes(c.tagName))&&(c.properties[p]=a(String(x||""),p,c))}}if(c.type==="element"){let p=n?!n.includes(c.tagName):o?o.includes(c.tagName):!1;if(!p&&r&&typeof d=="number"&&(p=!r(c,d,h)),p&&h&&typeof d=="number")return l&&c.children?h.children.splice(d,1,...c.children):h.children.splice(d,1),d}}}function ev(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||ij.test(e.slice(0,t))?e:""}function zh(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function cj(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function dj(e,t,n){const i=Wl((n||{}).ignore||[]),o=fj(t);let s=-1;for(;++s<o.length;)gc(e,l);function l(u,c,d){if(u.type==="text"&&typeof d=="number")return a(u,c,d);if(i(u,d,c[c.length-1]))return mc}function a(u,c,d){const h=c[c.length-1],p=o[s][0],x=o[s][1];let v=0,k=!1,y=[];p.lastIndex=0;let m=p.exec(u.value);for(;m;){const w=m.index,C={index:m.index,input:m.input,stack:[...c,u]};let E=x(...m,C);if(typeof E=="string"&&(E=E.length>0?{type:"text",value:E}:void 0),E===!1)p.lastIndex=w+1;else{if(v!==w&&g({type:"text",value:u.value.slice(v,w)}),Array.isArray(E))for(const A of E)g(A);else E&&g(E);v=w+m[0].length,k=!0}if(!p.global)break;m=p.exec(u.value)}return k?(v<u.value.length&&g({type:"text",value:u.value.slice(v)}),h.children.splice(d,1,...y)):y=[u],d+y.length;function g(w){const C=y[y.length-1];C&&C.type==="text"&&w.type==="text"?C.value+=w.value:y.push(w)}}}function fj(e){if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=[],n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([pj(i[0]),hj(i[1])])}return t}function pj(e){return typeof e=="string"?new RegExp(cj(e),"g"):e}function hj(e){return typeof e=="function"?e:function(){return e}}const Ga="phrasing",Ka=["autolink","link","image","label"];function mj(){return{transforms:[bj],enter:{literalAutolink:yj,literalAutolinkEmail:qa,literalAutolinkHttp:qa,literalAutolinkWww:qa},exit:{literalAutolink:kj,literalAutolinkEmail:wj,literalAutolinkHttp:xj,literalAutolinkWww:vj}}}function gj(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ga,notInConstruct:Ka},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ga,notInConstruct:Ka},{character:":",before:"[ps]",after:"\\/",inConstruct:Ga,notInConstruct:Ka}]}}function yj(e){this.enter({type:"link",title:null,url:"",children:[],position:void 0},e)}function qa(e){this.config.enter.autolinkProtocol.call(this,e)}function xj(e){this.config.exit.autolinkProtocol.call(this,e)}function vj(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function wj(e){this.config.exit.autolinkEmail.call(this,e)}function kj(e){this.exit(e)}function bj(e){dj(e,[[new RegExp("(?<![\\da-z])(https?:\\/\\/|www(?=\\.))([\\w-]*\\.[\\w\\-.]*)([^\\t\\n\\r ]*)","gi"),Ej],[new RegExp("(?<![\\w+\\-.@])xmpp:([\\w+\\-.]+)@([\\w-]+(?:\\.[\\w-]+)+)(\\/(?:[\\w\\-/]|\\.(?=[\\dA-Za-z]))*)?","g"),Nj],[new RegExp("(?<![\\w+\\-.@])mailto:([\\w+\\-.]+)@([\\w-]+(?:\\.[\\w-]+)+)","g"),Cj],[new RegExp("(?<![\\w+\\-.]|(?:^|[^\\d@A-Za-z])(?:mailto|xmpp):)([\\w+\\-.]+)@([\\w-]+(?:\\.[\\w-]+)+)","g"),Sj]],{ignore:["link","linkReference"]})}function Ej(e,t,n,r,i){if(!Tj(i))return!1;let o="";if(/^w/i.test(t)&&(n=t+n,t="",o="http://"),Ho(n.charCodeAt(0))||!jj(n))return!1;const s=_j(n+r),l={type:"link",title:null,url:o+t+s[0],children:[{type:"text",value:t+s[0],position:void 0}],position:void 0};return s[1]?[l,{type:"text",value:s[1],position:void 0}]:l}function Sj(e,t,n){return/[\d\-_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n,position:void 0}],position:void 0}}function Cj(e,t,n){if(/[\d\-_]$/.test(n))return!1;const r="mailto:"+t+"@"+n;return{type:"link",title:null,url:r,children:[{type:"text",value:r,position:void 0}],position:void 0}}function Nj(e,t,n,r,i){if(/[\d\-_]$/.test(n)||r&&(!/[A-Za-z]$/.test(r)||i.input.charAt(i.index+e.length)==="@"))return!1;const o="xmpp:"+t+"@"+n+(r||"");return{type:"link",title:null,url:o,children:[{type:"text",value:o,position:void 0}],position:void 0}}function jj(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[\dA-Za-z]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[\dA-Za-z]/.test(t[t.length-2])))}function _j(e){let t=e.length;for(;t>0;){const s=e.charCodeAt(t-1);if(s===33||s===34||s===38||s===39||s===41||s===44||s===46||s===58||s===59||s===60||s===62||s===63||s===93||s===125)t--;else break}if(t===e.length)return[e,void 0];let n=e.slice(t);e=e.slice(0,t);let r=n.indexOf(")");const i=zh(e,"(");let o=zh(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function Tj(e){const t=e.input.charCodeAt(e.index-1);return e.index===0||Fr(t)||Ho(t)}tv.peek=Fj;function $j(){this.buffer()}function Lj(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Ij(){this.buffer()}function Aj(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Oj(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Rj(e){this.exit(e)}function Mj(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Pj(e){this.exit(e)}function Fj(){return"["}function tv(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const s=n.enter("footnoteReference"),l=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),l(),s(),o+=i.move("]"),o}function Dj(){return{enter:{gfmFootnoteCallString:$j,gfmFootnoteCall:Lj,gfmFootnoteDefinitionLabelString:Ij,gfmFootnoteDefinition:Aj},exit:{gfmFootnoteCallString:Oj,gfmFootnoteCall:Rj,gfmFootnoteDefinitionLabelString:Mj,gfmFootnoteDefinition:Pj}}}function zj(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:tv},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,s){const l=o.createTracker(s);let a=l.move("[^");const u=o.enter("footnoteDefinition"),c=o.enter("label");return a+=l.move(o.safe(o.associationId(r),{before:a,after:"]"})),c(),a+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),a+=l.move((t?`
128
- `:" ")+o.indentLines(o.containerFlow(r,l.current()),t?nv:Bj))),u(),a}}function Bj(e,t,n){return t===0?e:nv(e,t,n)}function nv(e,t,n){return(n?"":" ")+e}const Uj=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Xd.attention=Kj;Xd.peek=qj;function Hj(){return{canContainEols:["delete"],enter:{strikethrough:Vj},exit:{strikethrough:Gj}}}function Wj(){return{handlers:{delete:Xd},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Uj}]}}function Vj(e){this.enter({type:"delete",children:[],position:void 0},e)}function Gj(e){this.exit(e)}function Xd(e,t,n,r){const i=n.createTracker(r),o=n.stack.includes("strikethrough")?"~":"~~",s=n.enter("strikethrough");let l=i.move(o);return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move(o),s(),l}function Kj(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function qj(){return"~"}function Yj(e){return e.length}function Xj(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Yj,o=[],s=[],l=[],a=[];let u=0,c=-1;for(;++c<e.length;){const v=[],k=[];let y=-1;for(e[c].length>u&&(u=e[c].length);++y<e[c].length;){const m=Qj(e[c][y]);if(n.alignDelimiters!==!1){const g=i(m);k[y]=g,(a[y]===void 0||g>a[y])&&(a[y]=g)}v.push(m)}s[c]=v,l[c]=k}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<u;)o[d]=Bh(r[d]);else{const v=Bh(r);for(;++d<u;)o[d]=v}d=-1;const h=[],p=[];for(;++d<u;){const v=o[d];let k="",y="";v===99?(k=":",y=":"):v===108?k=":":v===114&&(y=":");let m=n.alignDelimiters===!1?1:Math.max(1,a[d]-k.length-y.length);const g=k+"-".repeat(m)+y;n.alignDelimiters!==!1&&(m=k.length+m+y.length,m>a[d]&&(a[d]=m),p[d]=m),h[d]=g}s.splice(1,0,h),l.splice(1,0,p),c=-1;const x=[];for(;++c<s.length;){const v=s[c],k=l[c],y=n.fillRows===!1?Math.max(1,s[c===1?0:c].length):u;d=-1;const m=[];for(;++d<y;){const g=v[d]||"";let w="",C="";if(n.alignDelimiters!==!1){const E=a[d]-(k[d]||0),A=o[d];if(A===114)w=" ".repeat(E);else if(A===99){const _=E/2;E%2?(w=" ".repeat(_+.5),C=" ".repeat(_-.5)):(w=" ".repeat(_),C=w)}else C=" ".repeat(E)}n.delimiterStart!==!1&&!d&&m.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&g==="")&&(n.delimiterStart!==!1||d)&&m.push(" "),n.alignDelimiters!==!1&&m.push(w),m.push(g),n.alignDelimiters!==!1&&m.push(C),n.padding!==!1&&m.push(" "),(n.delimiterEnd!==!1||d!==y-1)&&m.push("|")}x.push(n.delimiterEnd===!1?m.join("").replace(/ +$/,""):m.join(""))}return x.join(`
129
- `)}function Qj(e){return e==null?"":String(e)}function Bh(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const Zj=Wl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Jj(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const s=n.indentLines(n.containerFlow(e,o.current()),e_);return i(),s}function e_(e,t,n){return">"+(n?"":" ")+e}function t_(e,t){return Uh(e,t.inConstruct,!0)&&!Uh(e,t.notInConstruct,!1)}function Uh(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Hh(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){const o=n.unsafe[i];if(o.character===`
130
- `&&!o.before&&!o.after&&t_(n.stack,o))return/[\t ]/.test(r.before)?"":" "}return`\\
131
- `}function n_(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>s&&(s=o):o=1,i=r+t.length,r=n.indexOf(t,i);return s}function r_(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^\n\r ]/.test(e.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function i_(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function o_(e,t,n,r){const i=i_(n),o=e.value||"";if(r_(e,n)){const d=n.enter("codeIndented"),h=n.indentLines(o,s_);return d(),h}const s=n.createTracker(r),l=i.repeat(Math.max(n_(o,i)+1,3)),a=n.enter("codeFenced"),u=i==="`"?"GraveAccent":"Tilde";let c=s.move(l);if(e.lang){const d=n.enter(`codeFencedLang${u}`);c+=s.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...s.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${u}`);c+=s.move(" "),c+=s.move(n.safe(e.meta,{before:c,after:`
132
- `,encode:["`"],...s.current()})),d()}return c+=s.move(`
133
- `),o&&(c+=s.move(o+`
134
- `)),c+=s.move(l),a(),c}function s_(e,t,n){return(n?"":" ")+e}function Qd(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function l_(e,t,n,r){const i=Qd(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let l=n.enter("label");const a=n.createTracker(r);let u=a.move("[");return u+=a.move(n.safe(n.associationId(e),{before:u,after:"]",...a.current()})),u+=a.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":`
135
- `,...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),s(),u}function a_(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function vl(e){const t=e.codePointAt(0);return t===void 0?"":String.fromCodePoint(t)}function hi(e){const t=e.codePointAt(e.length-2);return t!==void 0&&t>65535?e.slice(-2):e.slice(-1)}function rv(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Wh(e,t,n){const r=cr(e),i=cr(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function u_(e){if(e.charCodeAt(0)!==60)return;const t=e.charCodeAt(1);if(t===33){const l=e.charCodeAt(2);return l===45?2:l===91?5:gt(l)?4:void 0}if(t===63)return 3;const n=t===47,r=n?2:1;let i=r,o=e.charCodeAt(i);if(!gt(o))return;for(;o===45||yt(o);)o=e.charCodeAt(++i);const s=e.slice(r,i).toLowerCase();return!n&&o!==47&&hc.includes(s)?1:zx.includes(s)?6:7}const iv=new Map([["*",!1],["_",!0]]);function c_(e,t,n){const r=new Set;for(const o of e){const s=n.get(o);if(s&&o.attention&&t.some(l=>l.attention===o.attention))for(const l of s.tokens)r.add(l.attention)}const i=[];for(const o of e)o.attention&&r.delete(o.attention)&&i.push(o.attention);return i.reverse(),i}function ov(e,t,n){const r=[],i=new Map,o=new Map;let s=0;for(;s<e.length;){if(!e[s].attention){s++;continue}const l=e[s].value.charAt(0),a=iv.get(l);let u=s+1;for(;u<e.length&&e[u].attention&&e[u].value.charAt(0)===l;)u++;const c=s?e[s-1].value:t,d=cr(c.charCodeAt(c.length-1)),h=cr((u<e.length?e[u].value:n).charCodeAt(0)),p=!h||h===2&&!!d,x=!d||d===2&&!!h,v={tokens:e.slice(s,u),markers:[],start:0,end:0,open:a?p&&(!!d||!x):p,close:a?x&&(!!h||!p):x,split:a!==void 0};for(const k of v.tokens){i.set(k,[...v.tokens]),o.set(k,v);let y=k.value.length;for(;y--;)v.markers.push(k)}v.end=v.markers.length,r.push(v),s=u}for(f_(r,i),s=-1;++s<e.length;){const l=i.get(e[s]);if(l)return{attention:c_(e,l,o),index:s}}}function xs(e,t){const n=e[t?0:e.length-1];if(!n||n.attention)return;const r=t?vl(n.value):hi(n.value),i=rv(r.codePointAt(0));if(t)n.value=i+n.value.slice(r.length);else{let o=n.value.slice(0,n.value.length-r.length),s=0;for(;o.charCodeAt(o.length-1-s)===92;)s++;s%2&&(o+="\\"),n.value=o+i}}function d_(e,t,n,r,i){for(const o of n.attention){const s=t.get(o)||o.sequences[0];for(const l of o.sequences){if(l===s)continue;const a=new Map(t);a.set(o,l);const u=Kl(e,a,r,i),c=ov(u,r,i);if(!c||c.index>n.index)return{chosen:a,mistake:c,tokens:u}}}}function f_(e,t){const n=new Map;for(const r of e){const i=r.tokens[0].value.charAt(0);let o=n.get(i);o||(o=[],n.set(i,o));let s=r.close?o.length:0;for(;s--&&r.start<r.end;){const l=o[s],a=l.end-l.start,u=r.end-r.start;if(r.split?(l.close||r.open)&&u%3&&!((a+u)%3):a!==l.markers.length||a!==u)continue;const c=r.split?a>1&&u>1?2:1:u,d=l.markers.slice(l.end-c,l.end),h=r.markers.slice(r.start,r.start+c),p=d[0],x=h[0];if(p===d[c-1]&&p.value.length===c&&x===h[c-1]&&x.value.length===c&&p.attention===x.attention)t.delete(p),t.delete(x);else{const v=[...new Set([...d,...h])];for(const k of v){const y=t.get(k);y&&y.push(...v)}}l.end-=c,r.start+=c,l.start===l.end&&o.splice(s,1),s=o.length}r.open&&r.start<r.end&&o.push(r)}}function p_(e,t,n){if(t.length===0)throw new Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(n.length===0)throw new Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(const i of n)if(!Number.isSafeInteger(i)||i<1)throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as size, expected positive integer");const r=[];for(const i of t){if(i.length!==1)throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected a single ascii character");if(!Lx(i.charCodeAt(0)))throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected ascii punctuation");for(const o of n)r.push(i.repeat(o))}return r}function h_(e,t,n){const r=t.indexStack,i=e.children||[],o=[];let s=-1,l=n.before;r.push(-1);let a=t.createTracker(n);for(;++s<i.length;){const u=i[s];let c;if(r[r.length-1]=s,s+1<i.length){let p=t.handle.handlers[i[s+1].type];p&&p.peek&&(p=p.peek),c=p?vl(p(i[s+1],e,t,{before:"",after:"",...a.current()})):""}else c=n.after;const d=o[o.length-1];typeof d=="string"&&(l==="\r"||l===`
136
- `)&&u.type==="html"&&u_(u.value)!==7&&(o[o.length-1]=d.replace(/(\r?\n|\r)$/," "),l=" ",a=t.createTracker(n),a.move(ql(o,n.before,n.after)));const h=t.handle.handlers[u.type];if(h&&h.attention){const p=Zd(u,h.attention,t,a);if(!p)continue;o.push(p),l=hi(p.sequences[0])}else{const p=t.handle(u,e,t,{...a.current(),after:c,before:l});if(!p)continue;a.move(p),o.push(p),l=hi(p)}}return r.pop(),o}function Zd(e,t,n,r){const{construct:i,markers:o,sizes:s}=t(e,n),l=p_(e.type,o,s),a=l[0],u=n.enter(i),c=n.createTracker(r.current());c.move(a);const d=h_(e,n,{...c.current(),before:a,after:a});if(u(),d.length!==0)return r.move(a),r.move(ql(d,a,a)),r.move(a),{children:d,sequences:l}}function Vh(e,t,n,r){let i=Kl(e,t,n,r),o=ov(i,n,r);for(;o;){const s=d_(e,t,o,n,r);if(!s)return;t=s.chosen,i=s.tokens,o=s.mistake}return i}function sv(e,t,n,r){let i=n,o=-1;for(;++o<e.length;){const s=e[o];if(typeof s=="string"){i="";continue}const l=o===e.length-1?r:"",a=s.sequences.find(function(u){const c=u.charAt(0);return c!==i.charAt(0)&&c!==l.charAt(0)||e.length===1&&iv.has(c)&&u.length>n.length})||s.sequences[0];a!==s.sequences[0]&&t.set(s,a),sv(s.children,t,a,a),i=a}}function Kl(e,t,n,r){const i=[];let o,s=hi(n),l=-1;for(;++l<e.length;){const a=e[l];if(typeof a=="string"){const g={value:a,attention:void 0};o&&o===vl(a)&&xs([g],!0),o=void 0,i.push(g),g.value&&(s=hi(g.value));continue}const u=t.get(a)||a.sequences[0],c=u.charAt(0),d=e[l+1],h=s,p=vl(d===void 0?r:typeof d=="string"?d:t.get(d)||d.sequences[0]),x=Kl(a.children,t,u,u),v=x[0].value,k=Wh(h.charCodeAt(h.length-1),v.charCodeAt(0),c);k.inside&&xs(x,!0);const y=hi(x[x.length-1].value),m=Wh(p.charCodeAt(0),y.charCodeAt(y.length-1),c);m.inside&&xs(x,!1),k.outside&&h!==`
137
- `&&h!=="\r"&&xs(i,!1),m.outside&&(o=p),i.push({value:u,attention:a},...x,{value:u,attention:a}),s=u.charAt(u.length-1)}return i}function ql(e,t,n){const r=new Map;sv(e,r,t,n);const i=(r.size>0?Vh(e,r,t,n):void 0)||Vh(e,new Map,t,n)||Kl(e,new Map,t,n);let o="";for(const s of i)o+=s.value;return o}Jd.attention=lv;Jd.peek=m_;function Jd(e,t,n,r){const i=n.enter("phrasing"),o=Zd(e,lv,n,n.createTracker(r)),s=o?ql([o],r.before,r.after):"";return i(),s}function lv(e,t){return{construct:"emphasis",markers:a_(t)==="*"?["*","_"]:["_","*"],sizes:[1]}}function m_(e,t,n){return n.options.emphasis||"*"}function g_(e,t){let n=!1;return Gl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,po}),!!((!e.depth||e.depth<3)&&Bl(e)&&(t.options.setext||n))}function y_(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(g_(e,n)){const d=n.enter("headingSetext"),h=n.enter("phrasing"),p=n.containerPhrasing(e,{...o.current(),before:`
138
- `,after:`
139
- `});return h(),d(),p+`
140
- `+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
141
- `))+1))}const s="#".repeat(i),l=n.enter("headingAtx"),a=n.enter("phrasing");o.move(s+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
142
- `,...o.current()});const c=u.charCodeAt(0);return(c===9||c===32)&&(u=rv(c)+u.slice(1)),u=u?s+" "+u:s,n.options.closeAtx&&(u+=" "+s),a(),l(),u}av.peek=x_;function av(e){return e.value||""}function x_(){return"<"}uv.peek=v_;function uv(e,t,n,r){const i=Qd(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let l=n.enter("label");const a=n.createTracker(r);let u=a.move("![");return u+=a.move(n.safe(e.alt,{before:u,after:"]",...a.current()})),u+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),u+=a.move(")"),s(),u}function v_(){return"!"}cv.peek=w_;function cv(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let s=n.enter("label");const l=n.createTracker(r);let a=l.move("![");const u=n.safe(e.alt,{before:a,after:"]",...l.current()});a+=l.move(u+"]["),s();const c=n.stack;n.stack=c.filter(function(h){return h!=="phrasing"}),s=n.enter("reference");const d=n.safe(n.associationId(e),{before:a,after:"]",...l.current()});return s(),n.stack=c,o(),i==="full"||!u||u!==d?a+=l.move(d+"]"):i==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function w_(){return"!"}dv.peek=k_;function dv(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const s=n.unsafe[o],l=n.compilePattern(s);if(!s.atBreak)continue;let a;for(;a=l.exec(r);){let u=a.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(a.index+1)}}return i+r+i}function k_(){return"`"}function fv(e,t){const n=Bl(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))}pv.peek=b_;function pv(e,t,n,r){const i=Qd(n),o=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);if(fv(e,n)){const x=n.stack;n.stack=x.filter(function(y){return y!=="phrasing"});const v=n.enter("autolink");let k=s.move("<");return k+=s.move(n.containerPhrasing(e,{before:k,after:">",...s.current()})),k+=s.move(">"),v(),n.stack=x,k}const l=n.enter("link");let a=n.enter("label"),u=s.move("[");const c=n.containerPhrasing(e,{before:u,after:"](",...s.current()});u+=s.move(c),a(),u+=s.move("](");const d=/[\0- \u007F]/.test(e.url),h=r.before.charAt(r.before.length-1);let p=e.title||void 0;if(!p&&!d&&(h===`
143
- `||h==="\r")){let x=0;for(;x<c.length&&c.charCodeAt(x)!==93;)x+=c.charCodeAt(x)===92?2:1;c.charCodeAt(x+1)===58&&(p="")}return!e.url&&typeof p=="string"||d?(a=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:typeof p=="string"?" ":")",...s.current()}))),a(),typeof p=="string"&&(a=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(p,{before:u,after:i,...s.current()})),u+=s.move(i),a()),u+=s.move(")"),l(),u}function b_(e,t,n){return fv(e,n)?"<":"["}hv.peek=E_;function hv(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let s=n.enter("label");const l=n.createTracker(r);let a=l.move("[");const u=n.containerPhrasing(e,{before:a,after:"]",...l.current()});a+=l.move(u+"]["),s();const c=n.stack;n.stack=c.filter(function(h){return h!=="phrasing"}),s=n.enter("reference");const d=n.safe(n.associationId(e),{before:a,after:"]",...l.current()});return s(),n.stack=c,o(),i==="full"||!u||u!==d?a+=l.move(d+"]"):i==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function E_(){return"["}function ef(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function S_(e){const t=ef(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function C_(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function mv(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function N_(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let s=e.ordered?C_(n):ef(n);const l=e.ordered?s==="."?")":".":S_(n);let a=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&c&&(!c.children||!c.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&&(a=!0),mv(n)===s&&c){let d=-1;for(;++d<e.children.length;){const h=e.children[d];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){a=!0;break}}}}a&&(s=l),n.bulletCurrent=s;const u=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=o,i(),u}function j_(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function __(e,t,n,r){const i=j_(n);let o=n.bulletCurrent||ef(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const l=n.createTracker(r);l.move(o+" ".repeat(s-o.length)),l.shift(s);const a=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,l.current()),c);return a(),u;function c(d,h,p){return h?(p?"":" ".repeat(s))+d:(p?o:o+" ".repeat(s-o.length))+d}}function T_(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),i(),s}function $_(e,t,n,r){if(!e.children.some(function(l){return Zj(l)}))return n.containerFlow(e,r);const o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),s}function L_(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}tf.attention=gv;tf.peek=I_;function tf(e,t,n,r){const i=n.enter("phrasing"),o=Zd(e,gv,n,n.createTracker(r)),s=o?ql([o],r.before,r.after):"";return i(),s}function gv(e,t){return{construct:"strong",markers:L_(t)==="*"?["*","_"]:["_","*"],sizes:[2]}}function I_(e,t,n){return n.options.strong||"*"}function A_(e,t,n,r){const i=t?t.children:[],o=n.indexStack[n.indexStack.length-1];return n.safe(e.value,{...r,afterNode:i[o+1],beforeNode:i[o-1]})}function O_(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function R_(e,t,n){const r=(mv(n)+(n.options.ruleSpaces?" ":"")).repeat(O_(n));return n.options.ruleSpaces?r.slice(0,-1):r}const kc={blockquote:Jj,break:Hh,code:o_,definition:l_,emphasis:Jd,hardBreak:Hh,heading:y_,html:av,image:uv,imageReference:cv,inlineCode:dv,link:pv,linkReference:hv,list:N_,listItem:__,paragraph:T_,root:$_,strong:tf,text:A_,thematicBreak:R_};function M_(){return{enter:{table:P_,tableData:Gh,tableHeader:Gh,tableRow:D_},exit:{codeText:z_,table:F_,tableData:Ya,tableHeader:Ya,tableRow:Ya}}}function P_(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[],position:void 0},e),this.data.inTable=!0}function F_(e){this.exit(e),this.data.inTable=void 0}function D_(e){this.enter({type:"tableRow",children:[],position:void 0},e)}function Ya(e){this.exit(e)}function Gh(e){this.enter({type:"tableCell",children:[],position:void 0},e)}function z_(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,B_));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function B_(e,t){return t==="|"?t:e}function U_(e){const t=e||{},{tableCellPadding:n,tablePipeAlign:r,stringLength:i}=t,o=n?" ":"|";return{handlers:{inlineCode:h,table:s,tableCell:a,tableRow:l},join:[H_],unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
144
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}]};function s(p,x,v,k){const y=c(p,v,k),m=y[0];if(m){let g=p.align?p.align.length:0,w=-1;if(!g)for(;++w<y.length;)y[w].length>g&&(g=y[w].length);for(;m.length<g;)m.push("")}return u(y,p.align)}function l(p,x,v,k){const y=d(p,v,k),m=u([y]);return m.slice(0,m.indexOf(`
145
- `))}function a(p,x,v,k){const y=v.enter("tableCell"),m=v.enter("phrasing"),g=v.containerPhrasing(p,{...k,before:o,after:o});return m(),y(),g}function u(p,x){return Xj(p,{align:x,alignDelimiters:r,fillRows:!1,padding:n,stringLength:i})}function c(p,x,v){const{children:k}=p;let y=-1;const m=[],g=x.enter("table");for(;++y<k.length;)m[y]=d(k[y],x,v);return g(),m}function d(p,x,v){const{children:k}=p;let y=-1;const m=[],g=x.enter("tableRow");for(;++y<k.length;)m[y]=a(k[y],p,x,v);return g(),m}function h(p,x,v){const k=kc.inlineCode(p,x,v);if(!v.stack.includes("tableCell"))return k;const y=[];let m=0,g=k.indexOf("|");for(;g!==-1;){let w=g;for(;w>m&&k.charCodeAt(w-1)===92;)w--;y.push(k.slice(m,g)),(g-w)%2===0&&y.push("\\"),m=g,g=k.indexOf("|",g+1)}return y.push(k.slice(m)),y.join("")}}function H_(e,t,n,r){if(e.type==="table"&&n.type==="listItem"&&n.spread===!1&&(t.type==="definition"||t.type==="heading"&&W_(t,r)||t.type==="paragraph"||t.type==="table"))return 1}function W_(e,t){let n=!1;return Gl(e,function(r){if(r.type==="break"||"value"in r&&/\r?\n|\r/.test(r.value))return n=!0,po}),!!((!e.depth||e.depth<3)&&Bl(e)&&(t.options.setext||n))}function V_(){return{exit:{taskListCheckValueChecked:Kh,taskListCheckValueUnchecked:Kh,paragraph:K_}}}function G_(){return{handlers:{paragraph:q_},join:[Y_]}}function Kh(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function K_(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,s;for(;++o<i.length;){const l=i[o];if(l.type==="paragraph"){s=l;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start={...r.position.start}))}}this.exit(e)}function q_(e,t,n,r){if(!t||t.type!=="listItem"||yv(t)!==e)return kc.paragraph(e,t,n,r);const i="["+(t.checked?"x":" ")+"] ",o=n.createTracker(r);o.move(i);const s=kc.paragraph(e.children.length>0?e:{type:"paragraph",children:[{type:"text",value:" "}]},t,n,{...r,...o.current()});return i+s}function Y_(e,t,n){if(!(e.type==="definition"&&n.type==="listItem"))return;const r=yv(n);if(r&&n.children.indexOf(e)<n.children.indexOf(r))return 0}function yv(e){if(typeof e.checked=="boolean")for(const t of e.children){if(t.type==="paragraph")return t;if(t.type!=="definition")return}}function X_(){return[mj(),Dj(),Hj(),M_(),V_()]}function Q_(e){return{extensions:[gj(),zj(e),Wj(),U_(e),G_()]}}const Z_={tokenize:iT,partial:!0},xv={tokenize:oT,partial:!0},vv={tokenize:sT,partial:!0},wv={tokenize:lT,partial:!0},J_={tokenize:aT,partial:!0},kv={name:"wwwAutolink",tokenize:nT,previous:Ev},bv={name:"protocolAutolink",tokenize:rT,previous:Sv},Bn={name:"emailAutolink",tokenize:tT,previous:Cv},_n={};function eT(){return{text:_n}}let yr=48;for(;yr<123;)_n[yr]=Bn,yr++,yr===58?yr=65:yr===91&&(yr=97);_n[43]=Bn;_n[45]=Bn;_n[46]=Bn;_n[95]=Bn;_n[72]=[Bn,bv];_n[104]=[Bn,bv];_n[87]=[Bn,kv];_n[119]=[Bn,kv];function tT(e,t,n){const r=this;let i,o;return s;function s(d){return!bc(d)||!Cv.call(r,r.previous)||nf(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(d))}function l(d){return bc(d)?(e.consume(d),l):d===64?(e.consume(d),a):n(d)}function a(d){return d===46?e.check(J_,c,u)(d):d===45||d===95||yt(d)?(o=!0,e.consume(d),a):c(d)}function u(d){return e.consume(d),i=!0,a}function c(d){return o&&i&&gt(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function nT(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!Ev.call(r,r.previous)||nf(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Z_,e.attempt(xv,e.attempt(vv,o),n),n)(s))}function o(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function rT(e,t,n){const r=this;let i="",o=!1;return s;function s(d){return(d===72||d===104)&&Sv.call(r,r.previous)&&!nf(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),l):n(d)}function l(d){if(gt(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),l;if(d===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(d),a}return n(d)}function a(d){return d===47?(e.consume(d),o?u:(o=!0,a)):n(d)}function u(d){return d===null||ml(d)||ze(d)||Fr(d)||Ho(d)?n(d):e.attempt(xv,e.attempt(vv,c),n)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function iT(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),o):n(s)}function o(s){return s===null?n(s):t(s)}}function oT(e,t,n){let r,i,o;return s;function s(u){return u===46||u===95?e.check(wv,a,l)(u):u===null||ze(u)||Fr(u)||u!==45&&Ho(u)?a(u):(o=!0,e.consume(u),s)}function l(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),s}function a(u){return i||r||!o?n(u):t(u)}}function sT(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(wv,t,o)(s):s===null||ze(s)||Fr(s)?t(s):(e.consume(s),i)}function o(s){return s===41&&r++,e.consume(s),i}}function lT(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),o):l===93?(e.consume(l),i):l===60||l===null||ze(l)||Fr(l)?t(l):n(l)}function i(l){return l===null||l===40||l===91||ze(l)||Fr(l)?t(l):r(l)}function o(l){return gt(l)?s(l):n(l)}function s(l){return l===59?(e.consume(l),r):gt(l)?(e.consume(l),s):n(l)}}function aT(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return yt(o)?n(o):t(o)}}function Ev(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ze(e)}function Sv(e){return!gt(e)}function Cv(e){return!(e===47||bc(e))}function bc(e){return e===43||e===45||e===46||e===95||yt(e)}function nf(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const uT={tokenize:yT,partial:!0};function cT(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:hT,continuation:{tokenize:mT},exit:gT}},text:{91:{name:"gfmFootnoteCall",tokenize:pT},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:dT,resolveTo:fT}}}}function dT(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const a=r.events[i][1];if(a.type==="labelImage"){s=a;break}if(a.type==="gfmFootnoteCall"||a.type==="labelLink"||a.type==="label"||a.type==="image"||a.type==="link")break}return l;function l(a){if(!s||!s._balanced)return n(a);const u=gn(r.sliceSerialize({start:s.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(a):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a))}}function fT(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function pT(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,s;return l;function l(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),a}function a(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(d){if(o>999||d===93&&!s||d===null||d===91||ze(d))return n(d);if(d===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(gn(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return ze(d)||(s=!0),o++,e.consume(d),d===92?c:u}function c(d){return d===91||d===92||d===93?(e.consume(d),o++,u):u(d)}}function hT(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,s=0,l;return a;function a(x){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(x){return x===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(x)}function c(x){if(s>999||x===93&&!l||x===null||x===91||ze(x))return n(x);if(x===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return o=gn(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return ze(x)||(l=!0),s++,e.consume(x),x===92?d:c}function d(x){return x===91||x===92||x===93?(e.consume(x),s++,c):c(x)}function h(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),i.includes(o)||i.push(o),Ae(e,p,"gfmFootnoteDefinitionWhitespace")):n(x)}function p(x){return t(x)}}function mT(e,t,n){return e.check(Wo,t,e.attempt(uT,t,n))}function gT(e){e.exit("gfmFootnoteDefinition")}function yT(e,t,n){const r=this;return Ae(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(o):n(o)}}function xT(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,l){let a=-1;for(;++a<s.length;)if(s[a][0]==="enter"&&s[a][1].type==="strikethroughSequenceTemporary"&&s[a][1]._close){let u=a;for(;u--;)if(s[u][0]==="exit"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._open&&s[a][1].end.offset-s[a][1].start.offset===s[u][1].end.offset-s[u][1].start.offset){s[a][1].type="strikethroughSequence",s[u][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},s[u][1].start),end:Object.assign({},s[a][1].end)},d={type:"strikethroughText",start:Object.assign({},s[u][1].end),end:Object.assign({},s[a][1].start)},h=[["enter",c,l],["enter",s[u][1],l],["exit",s[u][1],l],["enter",d,l]],p=l.parser.constructs.insideSpan.null;p&&mn(h,h.length,0,Ul(p,s.slice(u+1,a),l)),mn(h,h.length,0,[["exit",d,l],["enter",s[a][1],l],["exit",s[a][1],l],["exit",c,l]]),mn(s,u-1,a-u+3,h),a=u+h.length-2;break}}for(a=-1;++a<s.length;)s[a][1].type==="strikethroughSequenceTemporary"&&(s[a][1].type="data");return s}function o(s,l,a){const u=this.previous,c=this.events;let d=0;return h;function h(x){return u===126&&c[c.length-1][1].type!=="characterEscape"?a(x):(s.enter("strikethroughSequenceTemporary"),p(x))}function p(x){const v=cr(u);if(x===126)return d>1?a(x):(s.consume(x),d++,p);if(d<2&&!n)return a(x);const k=s.exit("strikethroughSequenceTemporary"),y=cr(x);return k._open=!y||y===2&&!!v,k._close=!v||v===2&&!!y,l(x)}}}class vT{constructor(){this.map=[],this.index=new Map}add(t,n,r){wT(this,t,n,r)}consume(t){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0,this.index.clear()}}function wT(e,t,n,r){if(n===0&&r.length===0)return;const i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}const o=[t,n,r];e.map.push(o),e.index.set(t,o)}function kT(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="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 bT(){return{flow:{null:{name:"table",tokenize:ET,resolveAll:ST}}}}function ET(e,t,n){const r=this;let i=0,o=0,s;return l;function l(b){let O=r.events.length-1;for(;O>-1;){const{type:L}=r.events[O][1];if(L==="lineEnding"||L==="linePrefix")O--;else break}const T=O>-1?r.events[O][1].type:null,F=T==="tableHead"||T==="tableRow"?E:a;return F===E&&r.parser.lazy[r.now().line]?n(b):F(b)}function a(b){return e.enter("tableHead"),e.enter("tableRow"),u(b)}function u(b){return b===124||(s=!0,o+=1),c(b)}function c(b){return b===null?n(b):we(b)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),p):n(b):Se(b)?Ae(e,c,"whitespace")(b):(o+=1,s&&(s=!1,i+=1),b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),s=!0,c):(e.enter("data"),d(b)))}function d(b){return b===null||b===124||ze(b)?(e.exit("data"),c(b)):(e.consume(b),b===92?h:d)}function h(b){return b===92||b===124?(e.consume(b),d):d(b)}function p(b){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(b):(e.enter("tableDelimiterRow"),s=!1,Se(b)?Ae(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):x(b))}function x(b){return b===45||b===58?k(b):b===124?(s=!0,e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),v):C(b)}function v(b){return Se(b)?Ae(e,k,"whitespace")(b):k(b)}function k(b){return b===58?(o+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),y):b===45?(o+=1,y(b)):b===null||we(b)?w(b):C(b)}function y(b){return b===45?(e.enter("tableDelimiterFiller"),m(b)):C(b)}function m(b){return b===45?(e.consume(b),m):b===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),g):(e.exit("tableDelimiterFiller"),g(b))}function g(b){return Se(b)?Ae(e,w,"whitespace")(b):w(b)}function w(b){return b===124?x(b):b===null||we(b)?!s||i!==o?C(b):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(b)):C(b)}function C(b){return n(b)}function E(b){return e.enter("tableRow"),A(b)}function A(b){return b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),A):b===null||we(b)?(e.exit("tableRow"),t(b)):Se(b)?Ae(e,A,"whitespace")(b):(e.enter("data"),_(b))}function _(b){return b===null||b===124||ze(b)?(e.exit("data"),A(b)):(e.consume(b),b===92?$:_)}function $(b){return b===92||b===124?(e.consume(b),_):_(b)}}function ST(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],s=[0,0,0,0],l=!1,a=0,u,c,d;const h=new vT;for(;++n<e.length;){const p=e[n],x=p[1];p[0]==="enter"?x.type==="tableHead"?(l=!1,a!==0&&(qh(h,t,a,u,c),c=void 0,a=0),u={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},h.add(n,0,[["enter",u,t]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(r=!0,d=void 0,o=[0,0,0,0],s=[0,n+1,0,0],l&&(l=!1,c={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},h.add(n,0,[["enter",c,t]])),i=x.type==="tableDelimiterRow"?2:c?3:1):i&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(o[1]!==0&&(s[0]=s[1],d=vs(h,t,o,i,void 0,d),o=[0,0,0,0]),s[2]=n)):x.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(s[0]=s[1],d=vs(h,t,o,i,void 0,d)),o=s,s=[o[1],n,0,0])):x.type==="tableHead"?(l=!0,a=n):x.type==="tableRow"||x.type==="tableDelimiterRow"?(a=n,o[1]!==0?(s[0]=s[1],d=vs(h,t,o,i,n,d)):s[1]!==0&&(d=vs(h,t,s,i,n,d)),i=0):i&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(s[3]=n)}for(a!==0&&qh(h,t,a,u,c),h.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=kT(t.events,n))}return e}function vs(e,t,n,r,i,o){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(o.end=Object.assign({},Gr(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const a=Gr(t.events,n[1]);if(o={type:s,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const u=Gr(t.events,n[2]),c=Gr(t.events,n[3]),d={type:l,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const h=t.events[n[2]],p=t.events[n[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const x=n[2]+1,v=n[3]-n[2]-1;e.add(x,v,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(o.end=Object.assign({},Gr(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function qh(e,t,n,r,i){const o=[],s=Gr(t.events,n);i&&(i.end=Object.assign({},s),o.push(["exit",i,t])),r.end=Object.assign({},s),o.push(["exit",r,t]),e.add(n+1,0,o)}function Gr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const CT={name:"tasklistCheck",tokenize:jT};function NT(){return{text:{91:CT}}}function jT(e,t,n){const r=this;return i;function i(a){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(a):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),o)}function o(a){return ze(a)?(e.enter("taskListCheckValueUnchecked"),e.consume(a),e.exit("taskListCheckValueUnchecked"),s):a===88||a===120?(e.enter("taskListCheckValueChecked"),e.consume(a),e.exit("taskListCheckValueChecked"),s):n(a)}function s(a){return a===93?(e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(a)}function l(a){return we(a)?t(a):Se(a)?e.check({tokenize:_T},t,n)(a):n(a)}}function _T(e,t,n){return Ae(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function TT(e){return Tx([eT(),cT(),xT(e),bT(),NT()])}const $T={};function LT(e){const t=this,n=e||$T,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(TT(n)),o.push(X_()),s.push(Q_(n))}function IT({file:e,split:t,version:n}){const r=e.status==="added"?["new"]:e.status==="removed"?["old"]:t?["old","new"]:["new"];return f.jsx("div",{className:`fs-md-sides n${r.length}`,children:r.map(i=>f.jsx(AT,{side:i,path:i==="old"?e.oldPath??e.path:e.path,diffPath:e.path,version:n,labelled:r.length>1},i))})}function AT({side:e,path:t,diffPath:n,version:r,labelled:i}){const[o,s]=z.useState(null),[l,a]=z.useState(null);z.useEffect(()=>{let c=!0;return a(null),tx(n,e).then(d=>c&&s(d.join(`
146
- `)),d=>c&&a(d instanceof Error?d.message:String(d))),()=>{c=!1}},[n,e,r]);const u={a:({href:c,children:d})=>c&&/^(https?:|mailto:)/i.test(c)?f.jsx("a",{href:c,target:"_blank",rel:"noreferrer noopener",children:d}):f.jsx("span",{className:"fs-md-link",title:c,children:d}),code:({className:c,children:d})=>{var v;const h=(v=/language-([\w+-]+)/.exec(c??""))==null?void 0:v[1],p=String(d??"").replace(/\n$/,""),x=h?W1(p,h):void 0;return x?f.jsx("code",{className:c,children:x.map((k,y)=>f.jsxs("span",{children:[k.map((m,g)=>m.types?f.jsx("span",{className:`token ${m.types}`,children:m.text},g):m.text),y<x.length-1&&`
147
- `]},y))}):f.jsx("code",{className:c,children:d})}};return f.jsxs("div",{className:`fs-md-side ${e}`,children:[i&&f.jsx("div",{className:`fs-image-side ${e}`,children:e==="old"?"変更前":"変更後"}),l?f.jsxs("div",{className:"ds-muted",children:["読み込めませんでした: ",l]}):o===null?f.jsx("div",{className:"ds-muted",children:"読み込み中…"}):f.jsx("div",{className:"fs-md",children:f.jsx(sj,{remarkPlugins:[LT],components:u,urlTransform:(c,d)=>OT(c,d,t,e,r),children:o})})]})}function OT(e,t,n,r,i){if(t!=="src"||/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//"))return ev(e);const o=RT(n,e.replace(/[?#].*$/,""));return o?nx(o,r,i):""}function RT(e,t){let n=t;try{n=decodeURIComponent(t)}catch{}const r=n.startsWith("/")?[]:e.split("/").slice(0,-1);for(const i of n.split("/"))if(!(i===""||i==="."))if(i===".."){if(!r.length)return null;r.pop()}else r.push(i);return r.length?r.join("/"):null}const Nv=1500;function jv(e){if(rc(e.path))return{label:"画像",first:e.binary?"preview":"diff"};if(v1(e.path)&&!e.binary&&!e.large)return{label:"プレビュー",first:"diff"}}const MT=z.memo(function(t){const{file:n}=t,r=z.useRef(null),i=DT(r,t.scrollRoot),[o,s]=z.useState(!1),l=ux(n),a=jv(n),u=a?t.view:"diff",c=z.useMemo(()=>b1(n,t.content,t.expansion),[n,t.content,t.expansion]),d=z.useMemo(()=>i?H1(n,t.content):void 0,[n,t.content,i]);z.useEffect(()=>(t.register(n.path,r.current),()=>t.register(n.path,null)),[n.path,t.register]);const h=async()=>{await zo(n.path),s(!0),window.setTimeout(()=>s(!1),1400)},p=!!n.unchanged,x=p?FT(n):PT(n),v=()=>u==="preview"?i?rc(n.path)?f.jsx(V1,{file:n,version:t.version}):f.jsx(IT,{file:n,split:t.mode==="split",version:t.version}):f.jsx("div",{className:"fs-placeholder",style:{height:240}}):x?f.jsx("div",{className:"fs-note",children:x}):i?f.jsx(D1,{file:n,mode:p?"unified":t.mode,rows:c,tokens:d,byLine:t.byLine,onExpand:(k,y)=>t.onExpand(n.path,k,y)}):f.jsx("div",{className:"fs-placeholder",style:{height:(l+n.chunks.length)*20}});return f.jsxs("section",{ref:r,className:`fs-file${t.reviewed?" reviewed":""}${p?" unchanged":""}`,"data-path":n.path,children:[f.jsxs("header",{className:"fs-file-head",children:[f.jsx("button",{className:`fs-fold${t.open?" open":""}`,onClick:()=>t.onToggle(n.path),"aria-label":t.open?"折りたたむ":"開く","aria-expanded":t.open,children:f.jsx(xd,{size:14})}),f.jsx(bi,{status:p?"unchanged":n.status}),f.jsxs("span",{className:"fs-file-path",title:n.oldPath?`${n.oldPath} → ${n.path}`:n.path,onClick:()=>t.onToggle(n.path),children:[n.oldPath&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"fs-old-path",children:n.oldPath}),f.jsx("span",{className:"ds-muted",children:" → "})]}),n.path]}),f.jsx("button",{className:"fs-icon-btn",onClick:()=>void h(),title:o?"コピーしました":"パスをコピー","aria-label":"パスをコピー",children:f.jsx(py,{size:13})}),n.generated&&f.jsx("span",{className:"fs-tag",title:"ロックファイルや生成されたコード(最初は折りたたんでいます)",children:"生成"}),p&&f.jsx("span",{className:"fs-tag",title:"ツリーの「全体」から開いた、変更していないファイル",children:"変更なし"}),f.jsx("span",{className:"ds-spacer"}),a&&!(rc(n.path)&&n.binary)&&f.jsx("span",{className:"ds-seg fs-view-seg",role:"radiogroup","aria-label":"表示",children:[["diff","差分"],["preview",a.label]].map(([k,y])=>f.jsx("button",{role:"radio","aria-checked":u===k,className:u===k?"on":"",onClick:()=>t.onView(n.path,k),children:y},k))}),t.commentCount>0&&f.jsx(Io,{n:t.commentCount,title:`コメント ${t.commentCount}`}),p?t.onClose&&f.jsx("button",{className:"ds-btn",onClick:()=>t.onClose(n.path),title:"一覧から外す(ツリーの「全体」からまた開けます)",children:"閉じる"}):f.jsxs(f.Fragment,{children:[f.jsx($i,{stats:{added:n.additions,removed:n.deletions},title:`追加 ${n.additions} 行・削除 ${n.deletions} 行`}),f.jsxs("label",{className:"ds-check fs-viewed",title:"確認済みにすると折りたたみます(このファイルがまた変わると外れます)",children:[f.jsx("input",{type:"checkbox",checked:t.reviewed,onChange:k=>t.onReviewed(n.path,k.target.checked)}),"確認済み"]})]})]}),t.open&&f.jsxs("div",{className:"fs-file-body",children:[t.orphans.length>0&&f.jsxs("div",{className:"fs-orphans",children:[f.jsx("div",{className:"ds-muted",children:"差分からなくなった行へのコメント"}),t.orphans.map(k=>f.jsx(Rd,{c:k,showWhere:!0},k.id))]}),v()]}),!t.open&&(n.generated||l>Nv)&&!t.reviewed&&f.jsxs("div",{className:"fs-folded",children:[n.generated?"生成されたファイルのため折りたたんでいます":`大きな差分(${l} 行)のため折りたたんでいます`,f.jsx("button",{className:"ds-link",onClick:()=>t.onToggle(n.path),children:"表示する"})]})]})});function PT(e){if(e.binary)return"バイナリファイルのため、行の差分はありません";if(e.large)return"大きすぎるため、行の差分を表示していません";if(!(e.chunks.length>0))return e.modeChange?`ファイルのモードだけが変わりました(${e.modeChange})`:e.status==="renamed"?"名前だけが変わりました(内容の変更はありません)":"空のファイルです"}function FT(e){return e.loading?"読み込み中…":e.binary?"バイナリファイルです":e.large?"大きすぎるため、内容を表示していません":e.chunks.length===0?"空のファイルです":void 0}function DT(e,t){const[n,r]=z.useState(!1);return z.useEffect(()=>{const i=e.current;if(n||!i||!t)return;const o=new IntersectionObserver(s=>{s.some(l=>l.isIntersecting)&&r(!0)},{root:t,rootMargin:"1200px 0px"});return o.observe(i),()=>o.disconnect()},[e,t,n]),n}const Yh=(e,t)=>{const n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n};function zT({mode:e,onMode:t,tree:n,error:r,current:i,reviewed:o,commentCounts:s,onSelect:l,onReviewed:a}){var E,A;const[u,c]=z.useState(""),d=e==="all",[h,p]=z.useState(new Set),[x,v]=z.useState(null),k=z.useMemo(()=>d&&n?w1(n):null,[d,n]);z.useEffect(()=>{k&&x===null&&v(k)},[k,x]);const y=z.useMemo(()=>n?lx(n,u):null,[n,u]),m=z.useMemo(()=>n&&!d?sx(n):[],[n,d]),g=_=>{var $;return u.trim()!==""||(d?(($=x??k)==null?void 0:$.has(_))===!0:!h.has(_))},w=_=>d?v($=>Yh($??k??new Set,_)):p($=>Yh($,_)),C=(_,$)=>{var T;const b={paddingLeft:8+$*12};if(_.plain||(T=_.file)!=null&&T.unchanged)return f.jsxs("div",{className:`fs-tree-row file plain${i===_.path?" current":""}${_.file?" shown":""}`,style:b,onClick:()=>l(_.path),title:`${_.path}(変更なし)`,children:[f.jsx("span",{className:"fs-tree-check-space"}),f.jsx(bi,{status:"unchanged",small:!0}),f.jsx("span",{className:"fs-tree-name",children:_.name}),(s.get(_.path)??0)>0&&f.jsx(Io,{n:s.get(_.path)})]},_.path);if(_.file){const F=_.file,L=s.get(F.path)??0,B=o.has(F.path);return f.jsxs("div",{className:`fs-tree-row file${i===F.path?" current":""}${B?" reviewed":""}`,style:b,onClick:()=>l(F.path),title:F.oldPath?`${F.oldPath} → ${F.path}`:F.path,children:[f.jsx("input",{type:"checkbox",className:"fs-tree-check",checked:B,onClick:U=>U.stopPropagation(),onChange:U=>a(F.path,U.target.checked),"aria-label":`${F.path} を確認済みにする`,title:"確認済み"}),f.jsx(bi,{status:F.status,small:!0}),f.jsx("span",{className:"fs-tree-name",children:_.name}),L>0&&f.jsx(Io,{n:L}),f.jsxs("span",{className:"fs-tree-counts",children:[F.additions>0&&f.jsxs("span",{className:"added",children:["+",F.additions]}),F.deletions>0&&f.jsxs("span",{className:"removed",children:["−",F.deletions]})]})]},_.path)}const O=g(_.path);return f.jsxs("div",{children:[f.jsxs("div",{className:`fs-tree-row dir${d&&k&&!k.has(_.path)?" plain":""}`,style:b,onClick:()=>w(_.path),title:_.path,children:[f.jsx("span",{className:`fs-fold small${O?" open":""}`,children:f.jsx(xd,{size:12})}),f.jsx("span",{className:"fs-tree-name",children:_.name})]}),O&&_.children.map(F=>C(F,$+1))]},_.path)};return f.jsxs("aside",{className:"fs-tree",children:[f.jsxs("div",{className:"fs-tree-head",children:[f.jsx("div",{className:"ds-seg fs-tree-mode",role:"radiogroup","aria-label":"ツリーに出すファイル",children:[["changes","変更","変更したファイルだけ"],["all","全体","リポジトリのすべてのファイル(変更していないファイルはクリックで開きます)"]].map(([_,$,b])=>f.jsx("button",{role:"radio","aria-checked":e===_,className:e===_?"on":"",onClick:()=>t(_),title:b,children:$},_))}),d?f.jsx("button",{className:"fs-icon-btn",disabled:!k,onClick:()=>{var _;return v((_=x??k)!=null&&_.size?new Set:k)},title:(E=x??k)!=null&&E.size?"すべてのフォルダを閉じる":"変更のあるフォルダを開く",children:(A=x??k)!=null&&A.size?"−":"+"}):m.length>0&&f.jsx("button",{className:"fs-icon-btn",onClick:()=>p(h.size?new Set:new Set(m)),title:h.size?"すべてのフォルダを開く":"すべてのフォルダを閉じる",children:h.size?"+":"−"}),f.jsx("input",{className:"fs-filter",type:"search",placeholder:"ファイルを絞り込む",value:u,onChange:_=>c(_.target.value)})]}),f.jsx("div",{className:"fs-tree-body",children:r?f.jsxs("div",{className:"fs-tree-empty ds-muted",children:["リポジトリのファイルを読めませんでした: ",r]}):y?y.children.length>0?y.children.map(_=>C(_,0)):f.jsx("div",{className:"fs-tree-empty ds-muted",children:u?"一致するファイルはありません":d?"ファイルはありません":"変更されたファイルはありません"}):f.jsx("div",{className:"fs-tree-empty ds-muted",children:"読み込み中…"})})]})}const _v="fileshape.reviewed:",BT=e=>`${e.repoRoot}|${e.targetLabel}|${e.baseLabel}`,Xh=e=>jn(_v+e,{}),UT=(e,t)=>hn(_v+e,t),HT=e=>new Map(e.map(t=>[t.path,_1(t)]));function WT(e,t){const n=new Set;for(const[r,i]of e)t[r]===i&&n.add(r);return n}const Xa="fileshape.treeWidth",Qa=280,VT={};function GT({data:e,active:t,onComments:n,request:r}){var wt;const i=BT(e),[o,s]=z.useState(()=>O1(i)),l=`fileshape.opened:${i}`,[a,u]=z.useState(()=>KT(jn(l,[])));z.useEffect(()=>hn(l,a),[l,a]);const[c,d]=z.useState(new Map),h=z.useRef(new Set),p=z.useMemo(()=>new Set(e.files.map(Q=>Q.path)),[e]),x=z.useMemo(()=>[...new Set([...a,...o.filter(Q=>Q.unchanged).map(Q=>Q.path)])].filter(Q=>!p.has(Q)),[a,o,p]);z.useEffect(()=>{for(const Q of x){if(c.has(Q)||h.current.has(Q))continue;const ne=h.current;ne.add(Q);const ve=Ce=>{h.current===ne&&(ne.delete(Q),d(Le=>new Map(Le).set(Q,Ce)))};y1(Q).then(Ce=>ve(Ce?Wp(Q,Ce):null),()=>ve(null))}},[x,c]),z.useEffect(()=>{a.some(Q=>c.get(Q)===null)&&u(Q=>Q.filter(ne=>c.get(ne)!==null))},[c,a]);const v=z.useMemo(()=>x.filter(Q=>c.get(Q)!==null).map(Q=>c.get(Q)??Wp(Q,void 0)),[x,c]),k=z.useMemo(()=>v.length?{...e,files:[...e.files,...v]}:e,[e,v]),y=z.useMemo(()=>new Set(o.map(Q=>Q.path)),[o]),m=z.useCallback(Q=>u(ne=>ne.filter(ve=>ve!==Q)),[]),g=z.useMemo(()=>Hp(k.files),[k]),w=z.useMemo(()=>ox(g),[g]),[C,E]=z.useState(()=>Gu("fileshape","treeMode","changes")),A=Q=>{E(Q),Ku("fileshape","treeMode",Q)},[_,$]=z.useState(null);z.useEffect(()=>{if(C!=="all"||(_==null?void 0:_.diff)===e)return;let Q=!0;return g1().then(ne=>Q&&$({diff:e,paths:ne}),ne=>Q&&$({diff:e,error:ne instanceof Error?ne.message:String(ne)})),()=>{Q=!1}},[C,e,_]);const b=(_==null?void 0:_.diff)===e?_.paths:void 0,O=z.useMemo(()=>C==="changes"?g:b?Hp(k.files,b):null,[C,g,k,b]),[T,F]=z.useState(()=>Gu("fileshape","mode","unified")),L=Q=>{F(Q),Ku("fileshape","mode",Q)},[B,U]=z.useState(()=>Xh(i));z.useEffect(()=>U(Xh(i)),[i]);const W=z.useMemo(()=>HT(e.files),[e]),P=z.useMemo(()=>WT(W,B),[W,B]),[G,S]=z.useState({}),Y=Q=>{if(Q in G)return G[Q];const ne=dn(k,Q);return!ne||!(P.has(Q)||ne.generated||ux(ne)>Nv)},Z=z.useRef(Y);Z.current=Y;const j=z.useCallback(Q=>S(ne=>({...ne,[Q]:!Z.current(Q)})),[]),[R,I]=z.useState(new Map),[M,H]=z.useState({}),[K,J]=z.useState(0),D=z.useRef(new Map),ee=z.useRef(!0);z.useEffect(()=>{if(ee.current){ee.current=!1;return}D.current=new Map,I(new Map),H({}),J(Q=>Q+1),h.current=new Set,d(new Map)},[e]);const ue=z.useCallback(Q=>{let ne=D.current.get(Q);if(!ne){const ve=D.current;ne=tx(Q,"new").then(Ce=>(D.current===ve&&I(Le=>new Map(Le).set(Q,Ce)),Ce)),ne.catch(()=>ve.delete(Q)),ve.set(Q,ne)}return ne},[]),Fe=z.useCallback(async(Q,ne,ve)=>{const Ce=dn(k,Q);if(!Ce)return;let Le;try{Le=await ue(Q)}catch(ie){window.alert(`ファイルを読めませんでした: ${ie instanceof Error?ie.message:String(ie)}`);return}const N=Dl(Ce,Le.length)[ne.index];N&&H(ie=>({...ie,[Q]:E1(ie[Q]??{},N,ve,Le.length)}))},[k,ue]),[_e,Te]=z.useState({}),lt=z.useCallback((Q,ne)=>Te(ve=>({...ve,[Q]:ne})),[]),V=z.useRef(new Map),te=z.useCallback((Q,ne)=>{ne?V.current.set(Q,ne):V.current.delete(Q)},[]),[se,ye]=z.useState(null),ge=z.useCallback((Q,ne)=>{const ve=W.get(Q);if(ve&&(U(Ce=>{const Le={...Ce};return ne?Le[Q]=ve:delete Le[Q],UT(i,Le),Le}),S(Ce=>({...Ce,[Q]:!ne})),ne)){const Ce=V.current.get(Q),Le=se;Ce&&Le&&Ce.getBoundingClientRect().top<Le.getBoundingClientRect().top&&Ce.scrollIntoView({block:"start"})}},[W,i,se]),[de,$e]=z.useState(null),[pt,et]=z.useState(null),qe=z.useCallback(Q=>{s(Q),R1(i,Q)},[i]),X=z.useMemo(()=>({run:k,comments:o,contents:R,composing:de,editing:pt,compose:Q=>{$e(Q),et(null)},edit:Q=>{et(Q),$e(null)},add:(Q,ne)=>{var ve;qe([...o,I1(Q,ne,!!((ve=dn(k,Q.path))!=null&&ve.unchanged))]),$e(null)},update:(Q,ne)=>{qe(o.map(ve=>ve.id===Q?{...ve,body:ne}:ve)),et(null)},remove:Q=>qe(o.filter(ne=>ne.id!==Q))}),[k,o,R,de,pt,qe]),re=z.useMemo(()=>{const Q=new Map,ne=[];for(const ve of o){const Ce=dn(k,ve.path);if(!Ce){ne.push(ve);continue}let Le=Q.get(ve.path);Le||Q.set(ve.path,Le={byLine:new Map,orphans:[]});const N=Ao(Ce,ve,R.get(ve.path));if(N.line===void 0)Le.orphans.push(ve);else{const ie=Vr(ve.side,N.endLine??N.line);Le.byLine.set(ie,[...Le.byLine.get(ie)??[],ve])}}return{byFile:Q,gone:ne}},[o,k,R]);z.useEffect(()=>{for(const Q of o){const ne=dn(k,Q.path);ne&&!Yp(ne,Q)&&!R.has(Q.path)&&ue(Q.path).catch(()=>{})}H(Q=>{let ne=Q;for(const ve of o){const Ce=dn(k,ve.path),Le=R.get(ve.path);if(!Ce||!Le||Yp(Ce,ve))continue;const N=Ao(Ce,ve,Le);if(N.line===void 0)continue;const ie=N.endLine??N.line,[fe,xe]=ve.side==="new"?[N.line,ie]:[ic(Ce,N.line)??N.line,ic(Ce,ie)??ie],nt=S1(Ce,Le.length,ne[ve.path]??{},fe,xe);nt!==(ne[ve.path]??{})&&JSON.stringify(nt)!==JSON.stringify(ne[ve.path]??{})&&(ne={...ne,[ve.path]:nt})}return ne})},[o,R,k,ue]);const pe=z.useMemo(()=>({byLine:new Map,orphans:[]}),[]),he=z.useMemo(()=>{const Q=new Map;for(const ne of o)Q.set(ne.path,(Q.get(ne.path)??0)+1);return Q},[o]);z.useEffect(()=>{const Q=o.filter(ne=>L1(k,ne,R.get(ne.path))!=="resolved").length;n({open:Q,prompt:()=>dx(k,o,{header:!1,contents:R}).text})},[o,k,R,n]);const[q,oe]=z.useState(((wt=w[0])==null?void 0:wt.path)??null);z.useEffect(()=>{if(!se)return;let Q=0;const ne=()=>{cancelAnimationFrame(Q),Q=requestAnimationFrame(()=>{var Le;const ve=se.getBoundingClientRect().top+8;let Ce=((Le=w[0])==null?void 0:Le.path)??null;for(const N of w){const ie=V.current.get(N.path);if(ie)if(ie.getBoundingClientRect().top<=ve)Ce=N.path;else break}oe(Ce)})};return se.addEventListener("scroll",ne,{passive:!0}),()=>{se.removeEventListener("scroll",ne),cancelAnimationFrame(Q)}},[se,w]);const me=z.useRef(null),ke=Q=>{var fe;Y(Q)||S(xe=>({...xe,[Q]:!0})),oe(Q),(fe=me.current)==null||fe.stop();const ne=se;if(!ne)return;let ve=0,Ce=0;const Le=performance.now(),N=()=>{cancelAnimationFrame(ve),ne.removeEventListener("wheel",N),ne.removeEventListener("touchmove",N),ne.removeEventListener("keydown",N),me.current=null},ie=()=>{const xe=V.current.get(Q);if(xe){const nt=xe.getBoundingClientRect().top-ne.getBoundingClientRect().top-(parseFloat(getComputedStyle(ne).paddingTop)||0),Tt=ne.scrollTop+ne.clientHeight>=ne.scrollHeight-1;Math.abs(nt)>1&&!(Tt&&nt>0)?(ne.scrollTop+=nt,Ce=0):Ce++}if(Ce>10||performance.now()-Le>1500)return N();ve=requestAnimationFrame(ie)};ne.addEventListener("wheel",N,{passive:!0}),ne.addEventListener("touchmove",N,{passive:!0}),ne.addEventListener("keydown",N),me.current={stop:N},ve=requestAnimationFrame(ie)};z.useEffect(()=>()=>{var Q;return(Q=me.current)==null?void 0:Q.stop()},[]);const be=Q=>{k.files.some(ne=>ne.path===Q)||u(ne=>ne.includes(Q)?ne:[...ne,Q]),ke(Q)},Ne=z.useRef(0);z.useEffect(()=>{if(!r||!t||!se||r.seq===Ne.current)return;Ne.current=r.seq;const Q=w.find(ne=>ne.path===r.target)??w.find(ne=>ne.oldPath===r.target);be(Q?Q.path:r.target)});const[tt,Ye]=z.useState(()=>jn(Xa,Qa)),Xe=z.useRef(null),Oe=T1(e.files),Ze=$1(e.files);return f.jsx(px.Provider,{value:X,children:f.jsxs("div",{className:"fs-app",ref:Xe,style:{gridTemplateColumns:`${tt}px ${Mr}px minmax(0, 1fr)`},"data-active":t||void 0,children:[f.jsxs(Sd,{children:[f.jsxs(Cd,{children:[f.jsx(Ei,{children:"ファイル"}),f.jsx(Ed,{stats:Oe,unit:"ファイル",showZero:!0}),f.jsx(Nd,{}),f.jsx(Ei,{children:"行"}),f.jsx($i,{stats:Ze,title:`追加 ${Ze.added} 行・削除 ${Ze.removed} 行`,showZero:!0})]}),f.jsx(jd,{}),f.jsx(_d,{done:P.size,total:W.size,title:"確認済みにしたファイル(そのファイルがまた変わると外れます)"}),f.jsx("div",{className:"ds-seg",role:"radiogroup","aria-label":"表示",children:[["unified","Unified"],["split","Split"]].map(([Q,ne])=>f.jsx("button",{role:"radio","aria-checked":T===Q,className:T===Q?"on":"",onClick:()=>L(Q),children:ne},Q))})]}),f.jsx(zT,{mode:C,onMode:A,tree:O,error:C==="all"&&(_==null?void 0:_.diff)===e?_.error??null:null,current:q,reviewed:P,commentCounts:he,onSelect:be,onReviewed:ge}),f.jsx(Lo,{title:"ドラッグで幅を変更(ダブルクリックで戻す)",start:()=>tt,onDrag:(Q,ne)=>{var ve;return Ye(Math.max(160,Math.min(Q+ne,(((ve=Xe.current)==null?void 0:ve.clientWidth)??1200)-320)))},onEnd:()=>hn(Xa,tt),onReset:()=>{Ye(Qa),hn(Xa,Qa)}}),f.jsxs("main",{className:"fs-main",ref:ye,children:[re.gone.length>0&&f.jsxs("div",{className:"fs-orphans top",children:[f.jsx("div",{className:"ds-muted",children:"差分からなくなったファイルへのコメント"}),re.gone.map(Q=>f.jsx(Rd,{c:Q,showWhere:!0},Q.id))]}),w.length===0&&f.jsx("div",{className:"fs-empty",children:"変更されたファイルはありません"}),w.map(Q=>{var ve;const ne=re.byFile.get(Q.path)??pe;return f.jsx(MT,{file:Q,mode:T,open:Y(Q.path),reviewed:P.has(Q.path),content:R.get(Q.path),expansion:M[Q.path]??VT,view:_e[Q.path]??((ve=jv(Q))==null?void 0:ve.first)??"diff",version:K,byLine:ne.byLine,orphans:ne.orphans,commentCount:he.get(Q.path)??0,scrollRoot:se,onToggle:j,onReviewed:ge,onExpand:Fe,onView:lt,register:te,onClose:Q.unchanged&&!y.has(Q.path)?m:void 0},Q.path)})]})]})})}const KT=e=>Array.isArray(e)?e.filter(t=>typeof t=="string"):[],qT={id:"file",title:"ファイル",description:"ファイルの差分(fileshape): 変更された各ファイルの行の差分",icon:yd,View:GT,badge:e=>e.files.length||void 0},YT=[qT,m1,Cb];async function Qh(e){const t=await fetch(e);if(!t.ok)throw new Error(await t.text());return await t.json()}function Za(){const e=window.location.hash.replace(/^#\/?/,""),t=e.indexOf("/");if(t<0)return{module:e,target:null};let n;try{n=decodeURIComponent(e.slice(t+1))}catch{n=e.slice(t+1)}return{module:e.slice(0,t),target:n||null}}const XT=(e,t)=>`${e}/${t.split("/").map(encodeURIComponent).join("/")}`;function QT(){const[e,t]=z.useState(null),[n,r]=z.useState(null),[i,o]=z.useState({}),[s,l]=z.useState(!1),[a,u]=z.useState(()=>Za().module),[c,d]=z.useState(()=>{const L=Za();return L.target?{[L.module]:{target:L.target,seq:1}}:{}}),[h,p]=z.useState({}),[x,v]=z.useState(null),k=z.useMemo(()=>e?YT.filter(L=>e.modules.includes(L.id)):[],[e]),y=z.useCallback(async L=>{try{const B=await Qh(`/api/info${L?"?refresh=1":""}`);t(B),r(null),o(U=>Object.fromEntries(B.modules.map(W=>{var P;return[W,((P=U[W])==null?void 0:P.state)==="ready"?U[W]:{state:"loading"}]}))),await Promise.all(B.modules.map(async U=>{let W;try{const P=await Qh(`/api/module/${U}`);W="error"in P?{state:"error",error:P.error}:{state:"ready",data:P.data}}catch(P){W={state:"error",error:P instanceof Error?P.message:String(P)}}o(P=>({...P,[U]:W}))}))}catch(B){r(B instanceof Error?B.message:String(B))}},[]);z.useEffect(()=>{y(!1)},[y]);const m=z.useCallback(()=>{const L=Za();if(u(L.module),L.target){const B=L.target;d(U=>{var W;return{...U,[L.module]:{target:B,seq:(((W=U[L.module])==null?void 0:W.seq)??0)+1}}})}},[]);z.useEffect(()=>(window.addEventListener("hashchange",m),()=>window.removeEventListener("hashchange",m)),[m]);const g=k.find(L=>L.id===a)??k[0],w=L=>{window.location.hash=L,u(L)},C=z.useCallback((L,B)=>{const U=XT(L,B);window.location.hash.replace(/^#\/?/,"")===U?m():window.location.hash=U},[m]),E=z.useMemo(()=>k.map(L=>L.id),[k]),A=z.useRef(new Map),_=L=>{let B=A.current.get(L);return B||A.current.set(L,B=U=>p(W=>({...W,[L]:U}))),B},$=async()=>{l(!0),await y(!0),l(!1)},b=L=>{v(L),window.setTimeout(()=>v(B=>B===L?null:B),2500)},O=k.filter(L=>{var B;return(((B=h[L.id])==null?void 0:B.open)??0)>0}),T=O.reduce((L,B)=>L+h[B.id].open,0),F=async()=>{if(!e||T===0)return;const L=O.map(B=>[`## ${B.description}`,"",h[B.id].prompt().trimEnd()].join(`
148
- `));await zo([...Ml(e),"",...L.flatMap(B=>[B,""])].join(`
149
- `).trimEnd()+`
150
- `),b(`${T} 件をコピーしました`)};return n?f.jsxs("div",{className:"shell-message",children:["読み込めませんでした: ",n]}):!e||!g?f.jsx("div",{className:"shell-message shell-muted",children:"解析中…"}):f.jsxs("div",{className:`shell ${k.length>1?"with-rail":""}`,children:[k.length>1&&f.jsx("nav",{className:"rail","aria-label":"モジュール",children:k.map(L=>{var B;return f.jsx(ZT,{module:L,loaded:i[L.id],active:L===g,comments:((B=h[L.id])==null?void 0:B.open)??0,onClick:()=>w(L.id)},L.id)})}),f.jsxs("header",{className:"shell-head",children:[f.jsx("span",{className:"shell-brand",children:"diffshape"}),k.length===1&&f.jsx("span",{className:"shell-module",children:g.title}),f.jsxs("span",{className:"shell-compare",title:`${e.repoRoot}
151
- ${e.baseLabel} → ${e.targetLabel}`,children:[f.jsx("span",{className:"ds-ref",children:e.baseLabel}),f.jsx("span",{className:"shell-muted",children:"→"}),f.jsx("span",{className:"ds-ref",children:e.targetLabel})]}),f.jsx("span",{className:"shell-spacer"}),x&&f.jsx("span",{className:"shell-note",children:x}),f.jsxs("button",{className:"ds-btn ds-btn-note",onClick:()=>void F(),disabled:T===0,title:T?`未対応のコメント(${O.map(L=>`${L.title} ${h[L.id].open}`).join("、")})を AI 用のプロンプトとしてコピー`:"未対応のコメントはありません",children:[f.jsx(py,{size:13}),"AI 用にコピー",T>0?`(${T})`:""]}),f.jsxs("button",{className:"ds-btn",onClick:()=>void $(),disabled:s,title:"リポジトリを読み直して比較し直す",children:[f.jsx(o0,{size:13,className:s?"shell-spin":void 0}),s?"解析中…":"再読み込み"]})]}),f.jsx("main",{className:"shell-body",children:k.map(L=>{const B=i[L.id]??{state:"loading"},U=L===g;return f.jsxs("section",{className:"shell-module-root","data-module":L.id,hidden:!U,children:[B.state==="loading"&&f.jsx("div",{className:"shell-message shell-muted",children:"解析中…"}),B.state==="error"&&f.jsxs("div",{className:"shell-message",children:[f.jsx("p",{children:L.description}),f.jsx("p",{className:"shell-error",children:B.error})]}),B.state==="ready"&&f.jsx(L.View,{data:B.data,active:U,onComments:_(L.id),modules:E,openIn:C,request:c[L.id]??null},`${e.targetLabel}|${e.baseLabel}`)]},L.id)})})]})}function ZT({module:e,loaded:t,active:n,comments:r,onClick:i}){var l;const o=(t==null?void 0:t.state)==="ready"?(l=e.badge)==null?void 0:l.call(e,t.data):void 0,s=e.icon;return f.jsxs("button",{className:`rail-btn ${n?"on":""} ${(t==null?void 0:t.state)==="error"?"unavailable":""}`,onClick:i,title:`${e.description}${o?`
152
- 変更 ${o}`:""}${r?`
153
- 未対応のコメント ${r}`:""}`,"aria-label":e.title,"aria-current":n?"page":void 0,children:[f.jsx(s,{size:20}),f.jsx("span",{className:"rail-label",children:e.title}),o!==void 0&&f.jsx("span",{className:"rail-badge",children:o>99?"99+":o}),r>0&&f.jsx("span",{className:"rail-dot"})]})}dy(document.getElementById("root")).render(f.jsx(z.StrictMode,{children:f.jsx(QT,{})}));