@kousaku-maron/diffshape 0.5.0 → 0.7.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.
@@ -0,0 +1,166 @@
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 yf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ym(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vm={exports:{}},Cl={},xm={exports:{}},Le={};/**
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 Mo=Symbol.for("react.element"),nw=Symbol.for("react.portal"),rw=Symbol.for("react.fragment"),iw=Symbol.for("react.strict_mode"),ow=Symbol.for("react.profiler"),sw=Symbol.for("react.provider"),lw=Symbol.for("react.context"),aw=Symbol.for("react.forward_ref"),uw=Symbol.for("react.suspense"),cw=Symbol.for("react.memo"),dw=Symbol.for("react.lazy"),vf=Symbol.iterator;function fw(e){return e===null||typeof e!="object"?null:(e=vf&&e[vf]||e["@@iterator"],typeof e=="function"?e:null)}var wm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},km=Object.assign,bm={};function Ni(e,t,n){this.props=e,this.context=t,this.refs=bm,this.updater=n||wm}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 Em(){}Em.prototype=Ni.prototype;function Rc(e,t,n){this.props=e,this.context=t,this.refs=bm,this.updater=n||wm}var Oc=Rc.prototype=new Em;Oc.constructor=Rc;km(Oc,Ni.prototype);Oc.isPureReactComponent=!0;var xf=Array.isArray,Sm=Object.prototype.hasOwnProperty,Mc={current:null},Cm={key:!0,ref:!0,__self:!0,__source:!0};function Nm(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)Sm.call(t,r)&&!Cm.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:Mo,type:e,key:o,ref:s,props:i,_owner:Mc.current}}function pw(e,t){return{$$typeof:Mo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Pc(e){return typeof e=="object"&&e!==null&&e.$$typeof===Mo}function hw(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var wf=/\/+/g;function na(e,t){return typeof e=="object"&&e!==null&&e.key!=null?hw(""+e.key):t.toString(36)}function Es(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 Mo:case nw:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+na(s,0):r,xf(i)?(n="",e!=null&&(n=e.replace(wf,"$&/")+"/"),Es(i,t,n,"",function(u){return u})):i!=null&&(Pc(i)&&(i=pw(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(wf,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",xf(e))for(var l=0;l<e.length;l++){o=e[l];var a=r+na(o,l);s+=Es(o,t,n,a,i)}else if(a=fw(e),typeof a=="function")for(e=a.call(e),l=0;!(o=e.next()).done;)o=o.value,a=r+na(o,l++),s+=Es(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 Yo(e,t,n){if(e==null)return e;var r=[],i=0;return Es(e,r,"","",function(o){return t.call(n,o,i++)}),r}function mw(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 Lt={current:null},Ss={transition:null},gw={ReactCurrentDispatcher:Lt,ReactCurrentBatchConfig:Ss,ReactCurrentOwner:Mc};function jm(){throw Error("act(...) is not supported in production builds of React.")}Le.Children={map:Yo,forEach:function(e,t,n){Yo(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Yo(e,function(){t++}),t},toArray:function(e){return Yo(e,function(t){return t})||[]},only:function(e){if(!Pc(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Le.Component=Ni;Le.Fragment=rw;Le.Profiler=ow;Le.PureComponent=Rc;Le.StrictMode=iw;Le.Suspense=uw;Le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=gw;Le.act=jm;Le.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=km({},e.props),i=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=Mc.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(a in t)Sm.call(t,a)&&!Cm.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:Mo,type:e.type,key:i,ref:o,props:r,_owner:s}};Le.createContext=function(e){return e={$$typeof:lw,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:sw,_context:e},e.Consumer=e};Le.createElement=Nm;Le.createFactory=function(e){var t=Nm.bind(null,e);return t.type=e,t};Le.createRef=function(){return{current:null}};Le.forwardRef=function(e){return{$$typeof:aw,render:e}};Le.isValidElement=Pc;Le.lazy=function(e){return{$$typeof:dw,_payload:{_status:-1,_result:e},_init:mw}};Le.memo=function(e,t){return{$$typeof:cw,type:e,compare:t===void 0?null:t}};Le.startTransition=function(e){var t=Ss.transition;Ss.transition={};try{e()}finally{Ss.transition=t}};Le.unstable_act=jm;Le.useCallback=function(e,t){return Lt.current.useCallback(e,t)};Le.useContext=function(e){return Lt.current.useContext(e)};Le.useDebugValue=function(){};Le.useDeferredValue=function(e){return Lt.current.useDeferredValue(e)};Le.useEffect=function(e,t){return Lt.current.useEffect(e,t)};Le.useId=function(){return Lt.current.useId()};Le.useImperativeHandle=function(e,t,n){return Lt.current.useImperativeHandle(e,t,n)};Le.useInsertionEffect=function(e,t){return Lt.current.useInsertionEffect(e,t)};Le.useLayoutEffect=function(e,t){return Lt.current.useLayoutEffect(e,t)};Le.useMemo=function(e,t){return Lt.current.useMemo(e,t)};Le.useReducer=function(e,t,n){return Lt.current.useReducer(e,t,n)};Le.useRef=function(e){return Lt.current.useRef(e)};Le.useState=function(e){return Lt.current.useState(e)};Le.useSyncExternalStore=function(e,t,n){return Lt.current.useSyncExternalStore(e,t,n)};Le.useTransition=function(){return Lt.current.useTransition()};Le.version="18.3.1";xm.exports=Le;var O=xm.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 yw=O,vw=Symbol.for("react.element"),xw=Symbol.for("react.fragment"),ww=Object.prototype.hasOwnProperty,kw=yw.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,bw={key:!0,ref:!0,__self:!0,__source:!0};function _m(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)ww.call(t,r)&&!bw.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:vw,type:e,key:o,ref:s,props:i,_owner:kw.current}}Cl.Fragment=xw;Cl.jsx=_m;Cl.jsxs=_m;vm.exports=Cl;var f=vm.exports,$m={exports:{}},qt={},Tm={exports:{}},Lm={};/**
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(D,W){var S=D.length;D.push(W);e:for(;0<S;){var X=S-1>>>1,H=D[X];if(0<i(H,W))D[X]=W,D[S]=H,S=X;else break e}}function n(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var W=D[0],S=D.pop();if(S!==W){D[0]=S;e:for(var X=0,H=D.length,j=H>>>1;X<j;){var M=2*(X+1)-1,L=D[M],F=M+1,V=D[F];if(0>i(L,S))F<H&&0>i(V,L)?(D[X]=V,D[F]=S,X=F):(D[X]=L,D[M]=S,X=M);else if(F<H&&0>i(V,S))D[X]=V,D[F]=S,X=F;else break e}}return W}function i(D,W){var S=D.sortIndex-W.sortIndex;return S!==0?S:D.id-W.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,p=3,h=!1,y=!1,x=!1,b=typeof setTimeout=="function"?setTimeout:null,v=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(D){for(var W=n(u);W!==null;){if(W.callback===null)r(u);else if(W.startTime<=D)r(u),W.sortIndex=W.expirationTime,t(a,W);else break;W=n(u)}}function k(D){if(x=!1,g(D),!y)if(n(a)!==null)y=!0,U(_);else{var W=n(u);W!==null&&q(k,W.startTime-D)}}function _(D,W){y=!1,x&&(x=!1,v(C),C=-1),h=!0;var S=p;try{for(g(W),d=n(a);d!==null&&(!(d.expirationTime>W)||D&&!A());){var X=d.callback;if(typeof X=="function"){d.callback=null,p=d.priorityLevel;var H=X(d.expirationTime<=W);W=e.unstable_now(),typeof H=="function"?d.callback=H:d===n(a)&&r(a),g(W)}else r(a);d=n(a)}if(d!==null)var j=!0;else{var M=n(u);M!==null&&q(k,M.startTime-W),j=!1}return j}finally{d=null,p=S,h=!1}}var E=!1,$=null,C=-1,T=5,w=-1;function A(){return!(e.unstable_now()-w<T)}function I(){if($!==null){var D=e.unstable_now();w=D;var W=!0;try{W=$(!0,D)}finally{W?P():(E=!1,$=null)}}else E=!1}var P;if(typeof m=="function")P=function(){m(I)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,K=z.port2;z.port1.onmessage=I,P=function(){K.postMessage(null)}}else P=function(){b(I,0)};function U(D){$=D,E||(E=!0,P())}function q(D,W){C=b(function(){D(e.unstable_now())},W)}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(D){D.callback=null},e.unstable_continueExecution=function(){y||h||(y=!0,U(_))},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(D){switch(p){case 1:case 2:case 3:var W=3;break;default:W=p}var S=p;p=W;try{return D()}finally{p=S}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(D,W){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var S=p;p=D;try{return W()}finally{p=S}},e.unstable_scheduleCallback=function(D,W,S){var X=e.unstable_now();switch(typeof S=="object"&&S!==null?(S=S.delay,S=typeof S=="number"&&0<S?X+S:X):S=X,D){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=S+H,D={id:c++,callback:W,priorityLevel:D,startTime:S,expirationTime:H,sortIndex:-1},S>X?(D.sortIndex=S,t(u,D),n(a)===null&&D===n(u)&&(x?(v(C),C=-1):x=!0,q(k,S-X))):(D.sortIndex=H,t(a,D),y||h||(y=!0,U(_))),D},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(D){var W=p;return function(){var S=p;p=W;try{return D.apply(this,arguments)}finally{p=S}}}})(Lm);Tm.exports=Lm;var Ew=Tm.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 Sw=O,Vt=Ew;function ae(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 Im=new Set,mo={};function Fr(e,t){gi(e,t),gi(e+"Capture",t)}function gi(e,t){for(mo[e]=t,e=0;e<t.length;e++)Im.add(t[e])}var Ln=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),du=Object.prototype.hasOwnProperty,Cw=/^[: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]*$/,kf={},bf={};function Nw(e){return du.call(bf,e)?!0:du.call(kf,e)?!1:Cw.test(e)?bf[e]=!0:(kf[e]=!0,!1)}function jw(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 _w(e,t,n,r){if(t===null||typeof t>"u"||jw(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 It(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 kt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){kt[e]=new It(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];kt[t]=new It(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){kt[e]=new It(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){kt[e]=new It(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){kt[e]=new It(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){kt[e]=new It(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){kt[e]=new It(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){kt[e]=new It(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){kt[e]=new It(e,5,!1,e.toLowerCase(),null,!1,!1)});var Fc=/[\-:]([a-z])/g;function Dc(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(Fc,Dc);kt[t]=new It(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(Fc,Dc);kt[t]=new It(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(Fc,Dc);kt[t]=new It(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){kt[e]=new It(e,1,!1,e.toLowerCase(),null,!1,!1)});kt.xlinkHref=new It("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){kt[e]=new It(e,1,!1,e.toLowerCase(),null,!0,!0)});function zc(e,t,n,r){var i=kt.hasOwnProperty(t)?kt[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(_w(t,n,i,r)&&(n=null),r||i===null?Nw(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 Mn=Sw.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Xo=Symbol.for("react.element"),Gr=Symbol.for("react.portal"),Yr=Symbol.for("react.fragment"),Bc=Symbol.for("react.strict_mode"),fu=Symbol.for("react.profiler"),Am=Symbol.for("react.provider"),Rm=Symbol.for("react.context"),Uc=Symbol.for("react.forward_ref"),pu=Symbol.for("react.suspense"),hu=Symbol.for("react.suspense_list"),Hc=Symbol.for("react.memo"),Wn=Symbol.for("react.lazy"),Om=Symbol.for("react.offscreen"),Ef=Symbol.iterator;function Oi(e){return e===null||typeof e!="object"?null:(e=Ef&&e[Ef]||e["@@iterator"],typeof e=="function"?e:null)}var Ge=Object.assign,ra;function Gi(e){if(ra===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ra=t&&t[1]||""}return`
34
+ `+ra+e}var ia=!1;function oa(e,t){if(!e||ia)return"";ia=!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{ia=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Gi(e):""}function $w(e){switch(e.tag){case 5:return Gi(e.type);case 16:return Gi("Lazy");case 13:return Gi("Suspense");case 19:return Gi("SuspenseList");case 0:case 2:case 15:return e=oa(e.type,!1),e;case 11:return e=oa(e.type.render,!1),e;case 1:return e=oa(e.type,!0),e;default:return""}}function mu(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 Yr:return"Fragment";case Gr:return"Portal";case fu:return"Profiler";case Bc:return"StrictMode";case pu:return"Suspense";case hu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Rm:return(e.displayName||"Context")+".Consumer";case Am:return(e._context.displayName||"Context")+".Provider";case Uc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Hc:return t=e.displayName||null,t!==null?t:mu(e.type)||"Memo";case Wn:t=e._payload,e=e._init;try{return mu(e(t))}catch{}}return null}function Tw(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 mu(t);case 8:return t===Bc?"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 or(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Mm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Lw(e){var t=Mm(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 Qo(e){e._valueTracker||(e._valueTracker=Lw(e))}function Pm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Mm(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function zs(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 gu(e,t){var n=t.checked;return Ge({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Sf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=or(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 Fm(e,t){t=t.checked,t!=null&&zc(e,"checked",t,!1)}function yu(e,t){Fm(e,t);var n=or(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")?vu(e,t.type,n):t.hasOwnProperty("defaultValue")&&vu(e,t.type,or(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Cf(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 vu(e,t,n){(t!=="number"||zs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Yi=Array.isArray;function li(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=""+or(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 xu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(ae(91));return Ge({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Nf(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(ae(92));if(Yi(n)){if(1<n.length)throw Error(ae(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:or(n)}}function Dm(e,t){var n=or(t.value),r=or(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 jf(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function zm(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 wu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?zm(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Zo,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(Zo=Zo||document.createElement("div"),Zo.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Zo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function go(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ji={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},Iw=["Webkit","ms","Moz","O"];Object.keys(Ji).forEach(function(e){Iw.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ji[t]=Ji[e]})});function Um(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ji.hasOwnProperty(e)&&Ji[e]?(""+t).trim():t+"px"}function Hm(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Um(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Aw=Ge({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 ku(e,t){if(t){if(Aw[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ae(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ae(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ae(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ae(62))}}function bu(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 Eu=null;function Wc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Su=null,ai=null,ui=null;function _f(e){if(e=Do(e)){if(typeof Su!="function")throw Error(ae(280));var t=e.stateNode;t&&(t=Tl(t),Su(e.stateNode,e.type,t))}}function Wm(e){ai?ui?ui.push(e):ui=[e]:ai=e}function Vm(){if(ai){var e=ai,t=ui;if(ui=ai=null,_f(e),t)for(e=0;e<t.length;e++)_f(t[e])}}function qm(e,t){return e(t)}function Km(){}var sa=!1;function Gm(e,t,n){if(sa)return e(t,n);sa=!0;try{return qm(e,t,n)}finally{sa=!1,(ai!==null||ui!==null)&&(Km(),Vm())}}function yo(e,t){var n=e.stateNode;if(n===null)return null;var r=Tl(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(ae(231,t,typeof n));return n}var Cu=!1;if(Ln)try{var Mi={};Object.defineProperty(Mi,"passive",{get:function(){Cu=!0}}),window.addEventListener("test",Mi,Mi),window.removeEventListener("test",Mi,Mi)}catch{Cu=!1}function Rw(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 eo=!1,Bs=null,Us=!1,Nu=null,Ow={onError:function(e){eo=!0,Bs=e}};function Mw(e,t,n,r,i,o,s,l,a){eo=!1,Bs=null,Rw.apply(Ow,arguments)}function Pw(e,t,n,r,i,o,s,l,a){if(Mw.apply(this,arguments),eo){if(eo){var u=Bs;eo=!1,Bs=null}else throw Error(ae(198));Us||(Us=!0,Nu=u)}}function Dr(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 Ym(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 $f(e){if(Dr(e)!==e)throw Error(ae(188))}function Fw(e){var t=e.alternate;if(!t){if(t=Dr(e),t===null)throw Error(ae(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 $f(i),e;if(o===r)return $f(i),t;o=o.sibling}throw Error(ae(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(ae(189))}}if(n.alternate!==r)throw Error(ae(190))}if(n.tag!==3)throw Error(ae(188));return n.stateNode.current===n?e:t}function Xm(e){return e=Fw(e),e!==null?Qm(e):null}function Qm(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Qm(e);if(t!==null)return t;e=e.sibling}return null}var Zm=Vt.unstable_scheduleCallback,Tf=Vt.unstable_cancelCallback,Dw=Vt.unstable_shouldYield,zw=Vt.unstable_requestPaint,Qe=Vt.unstable_now,Bw=Vt.unstable_getCurrentPriorityLevel,Vc=Vt.unstable_ImmediatePriority,Jm=Vt.unstable_UserBlockingPriority,Hs=Vt.unstable_NormalPriority,Uw=Vt.unstable_LowPriority,eg=Vt.unstable_IdlePriority,Nl=null,kn=null;function Hw(e){if(kn&&typeof kn.onCommitFiberRoot=="function")try{kn.onCommitFiberRoot(Nl,e,void 0,(e.current.flags&128)===128)}catch{}}var dn=Math.clz32?Math.clz32:qw,Ww=Math.log,Vw=Math.LN2;function qw(e){return e>>>=0,e===0?32:31-(Ww(e)/Vw|0)|0}var Jo=64,es=4194304;function Xi(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 Ws(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=Xi(l):(o&=s,o!==0&&(r=Xi(o)))}else s=n&~i,s!==0?r=Xi(s):o!==0&&(r=Xi(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-dn(t),i=1<<n,r|=e[n],t&=~i;return r}function Kw(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 Gw(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-dn(o),l=1<<s,a=i[s];a===-1?(!(l&n)||l&r)&&(i[s]=Kw(l,t)):a<=t&&(e.expiredLanes|=l),o&=~l}}function ju(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function tg(){var e=Jo;return Jo<<=1,!(Jo&4194240)&&(Jo=64),e}function la(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Po(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-dn(t),e[t]=n}function Yw(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-dn(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function qc(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-dn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Pe=0;function ng(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var rg,Kc,ig,og,sg,_u=!1,ts=[],Qn=null,Zn=null,Jn=null,vo=new Map,xo=new Map,qn=[],Xw="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 Lf(e,t){switch(e){case"focusin":case"focusout":Qn=null;break;case"dragenter":case"dragleave":Zn=null;break;case"mouseover":case"mouseout":Jn=null;break;case"pointerover":case"pointerout":vo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":xo.delete(t.pointerId)}}function Pi(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=Do(t),t!==null&&Kc(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Qw(e,t,n,r,i){switch(t){case"focusin":return Qn=Pi(Qn,e,t,n,r,i),!0;case"dragenter":return Zn=Pi(Zn,e,t,n,r,i),!0;case"mouseover":return Jn=Pi(Jn,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return vo.set(o,Pi(vo.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,xo.set(o,Pi(xo.get(o)||null,e,t,n,r,i)),!0}return!1}function lg(e){var t=wr(e.target);if(t!==null){var n=Dr(t);if(n!==null){if(t=n.tag,t===13){if(t=Ym(n),t!==null){e.blockedOn=t,sg(e.priority,function(){ig(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 Cs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=$u(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Eu=r,n.target.dispatchEvent(r),Eu=null}else return t=Do(n),t!==null&&Kc(t),e.blockedOn=n,!1;t.shift()}return!0}function If(e,t,n){Cs(e)&&n.delete(t)}function Zw(){_u=!1,Qn!==null&&Cs(Qn)&&(Qn=null),Zn!==null&&Cs(Zn)&&(Zn=null),Jn!==null&&Cs(Jn)&&(Jn=null),vo.forEach(If),xo.forEach(If)}function Fi(e,t){e.blockedOn===t&&(e.blockedOn=null,_u||(_u=!0,Vt.unstable_scheduleCallback(Vt.unstable_NormalPriority,Zw)))}function wo(e){function t(i){return Fi(i,e)}if(0<ts.length){Fi(ts[0],e);for(var n=1;n<ts.length;n++){var r=ts[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Qn!==null&&Fi(Qn,e),Zn!==null&&Fi(Zn,e),Jn!==null&&Fi(Jn,e),vo.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);)lg(n),n.blockedOn===null&&qn.shift()}var ci=Mn.ReactCurrentBatchConfig,Vs=!0;function Jw(e,t,n,r){var i=Pe,o=ci.transition;ci.transition=null;try{Pe=1,Gc(e,t,n,r)}finally{Pe=i,ci.transition=o}}function ek(e,t,n,r){var i=Pe,o=ci.transition;ci.transition=null;try{Pe=4,Gc(e,t,n,r)}finally{Pe=i,ci.transition=o}}function Gc(e,t,n,r){if(Vs){var i=$u(e,t,n,r);if(i===null)ya(e,t,r,qs,n),Lf(e,r);else if(Qw(i,e,t,n,r))r.stopPropagation();else if(Lf(e,r),t&4&&-1<Xw.indexOf(e)){for(;i!==null;){var o=Do(i);if(o!==null&&rg(o),o=$u(e,t,n,r),o===null&&ya(e,t,r,qs,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else ya(e,t,r,null,n)}}var qs=null;function $u(e,t,n,r){if(qs=null,e=Wc(r),e=wr(e),e!==null)if(t=Dr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Ym(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 qs=e,null}function ag(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(Bw()){case Vc:return 1;case Jm:return 4;case Hs:case Uw:return 16;case eg:return 536870912;default:return 16}default:return 16}}var Yn=null,Yc=null,Ns=null;function ug(){if(Ns)return Ns;var e,t=Yc,n=t.length,r,i="value"in Yn?Yn.value:Yn.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 Ns=i.slice(e,1<r?1-r:void 0)}function js(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 ns(){return!0}function Af(){return!1}function Kt(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)?ns:Af,this.isPropagationStopped=Af,this}return Ge(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=ns)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ns)},persist:function(){},isPersistent:ns}),t}var ji={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Xc=Kt(ji),Fo=Ge({},ji,{view:0,detail:0}),tk=Kt(Fo),aa,ua,Di,jl=Ge({},Fo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Qc,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!==Di&&(Di&&e.type==="mousemove"?(aa=e.screenX-Di.screenX,ua=e.screenY-Di.screenY):ua=aa=0,Di=e),aa)},movementY:function(e){return"movementY"in e?e.movementY:ua}}),Rf=Kt(jl),nk=Ge({},jl,{dataTransfer:0}),rk=Kt(nk),ik=Ge({},Fo,{relatedTarget:0}),ca=Kt(ik),ok=Ge({},ji,{animationName:0,elapsedTime:0,pseudoElement:0}),sk=Kt(ok),lk=Ge({},ji,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ak=Kt(lk),uk=Ge({},ji,{data:0}),Of=Kt(uk),ck={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},dk={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"},fk={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function pk(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=fk[e])?!!t[e]:!1}function Qc(){return pk}var hk=Ge({},Fo,{key:function(e){if(e.key){var t=ck[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=js(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?dk[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Qc,charCode:function(e){return e.type==="keypress"?js(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?js(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),mk=Kt(hk),gk=Ge({},jl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Mf=Kt(gk),yk=Ge({},Fo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Qc}),vk=Kt(yk),xk=Ge({},ji,{propertyName:0,elapsedTime:0,pseudoElement:0}),wk=Kt(xk),kk=Ge({},jl,{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}),bk=Kt(kk),Ek=[9,13,27,32],Zc=Ln&&"CompositionEvent"in window,to=null;Ln&&"documentMode"in document&&(to=document.documentMode);var Sk=Ln&&"TextEvent"in window&&!to,cg=Ln&&(!Zc||to&&8<to&&11>=to),Pf=" ",Ff=!1;function dg(e,t){switch(e){case"keyup":return Ek.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xr=!1;function Ck(e,t){switch(e){case"compositionend":return fg(t);case"keypress":return t.which!==32?null:(Ff=!0,Pf);case"textInput":return e=t.data,e===Pf&&Ff?null:e;default:return null}}function Nk(e,t){if(Xr)return e==="compositionend"||!Zc&&dg(e,t)?(e=ug(),Ns=Yc=Yn=null,Xr=!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 cg&&t.locale!=="ko"?null:t.data;default:return null}}var jk={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 Df(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!jk[e.type]:t==="textarea"}function pg(e,t,n,r){Wm(r),t=Ks(t,"onChange"),0<t.length&&(n=new Xc("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var no=null,ko=null;function _k(e){Sg(e,0)}function _l(e){var t=Jr(e);if(Pm(t))return e}function $k(e,t){if(e==="change")return t}var hg=!1;if(Ln){var da;if(Ln){var fa="oninput"in document;if(!fa){var zf=document.createElement("div");zf.setAttribute("oninput","return;"),fa=typeof zf.oninput=="function"}da=fa}else da=!1;hg=da&&(!document.documentMode||9<document.documentMode)}function Bf(){no&&(no.detachEvent("onpropertychange",mg),ko=no=null)}function mg(e){if(e.propertyName==="value"&&_l(ko)){var t=[];pg(t,ko,e,Wc(e)),Gm(_k,t)}}function Tk(e,t,n){e==="focusin"?(Bf(),no=t,ko=n,no.attachEvent("onpropertychange",mg)):e==="focusout"&&Bf()}function Lk(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return _l(ko)}function Ik(e,t){if(e==="click")return _l(t)}function Ak(e,t){if(e==="input"||e==="change")return _l(t)}function Rk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mn=typeof Object.is=="function"?Object.is:Rk;function bo(e,t){if(mn(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(!du.call(t,i)||!mn(e[i],t[i]))return!1}return!0}function Uf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Hf(e,t){var n=Uf(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=Uf(n)}}function gg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?gg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function yg(){for(var e=window,t=zs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=zs(e.document)}return t}function Jc(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 Ok(e){var t=yg(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&gg(n.ownerDocument.documentElement,n)){if(r!==null&&Jc(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=Hf(n,o);var s=Hf(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 Mk=Ln&&"documentMode"in document&&11>=document.documentMode,Qr=null,Tu=null,ro=null,Lu=!1;function Wf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Lu||Qr==null||Qr!==zs(r)||(r=Qr,"selectionStart"in r&&Jc(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}),ro&&bo(ro,r)||(ro=r,r=Ks(Tu,"onSelect"),0<r.length&&(t=new Xc("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Qr)))}function rs(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Zr={animationend:rs("Animation","AnimationEnd"),animationiteration:rs("Animation","AnimationIteration"),animationstart:rs("Animation","AnimationStart"),transitionend:rs("Transition","TransitionEnd")},pa={},vg={};Ln&&(vg=document.createElement("div").style,"AnimationEvent"in window||(delete Zr.animationend.animation,delete Zr.animationiteration.animation,delete Zr.animationstart.animation),"TransitionEvent"in window||delete Zr.transitionend.transition);function $l(e){if(pa[e])return pa[e];if(!Zr[e])return e;var t=Zr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in vg)return pa[e]=t[n];return e}var xg=$l("animationend"),wg=$l("animationiteration"),kg=$l("animationstart"),bg=$l("transitionend"),Eg=new Map,Vf="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 ur(e,t){Eg.set(e,t),Fr(t,[e])}for(var ha=0;ha<Vf.length;ha++){var ma=Vf[ha],Pk=ma.toLowerCase(),Fk=ma[0].toUpperCase()+ma.slice(1);ur(Pk,"on"+Fk)}ur(xg,"onAnimationEnd");ur(wg,"onAnimationIteration");ur(kg,"onAnimationStart");ur("dblclick","onDoubleClick");ur("focusin","onFocus");ur("focusout","onBlur");ur(bg,"onTransitionEnd");gi("onMouseEnter",["mouseout","mouseover"]);gi("onMouseLeave",["mouseout","mouseover"]);gi("onPointerEnter",["pointerout","pointerover"]);gi("onPointerLeave",["pointerout","pointerover"]);Fr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Fr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Fr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Fr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Fr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Fr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Qi="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(" "),Dk=new Set("cancel close invalid load scroll toggle".split(" ").concat(Qi));function qf(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Pw(r,t,void 0,e),e.currentTarget=null}function Sg(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;qf(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;qf(i,l,u),o=a}}}if(Us)throw e=Nu,Us=!1,Nu=null,e}function Ue(e,t){var n=t[Mu];n===void 0&&(n=t[Mu]=new Set);var r=e+"__bubble";n.has(r)||(Cg(t,e,2,!1),n.add(r))}function ga(e,t,n){var r=0;t&&(r|=4),Cg(n,e,r,t)}var is="_reactListening"+Math.random().toString(36).slice(2);function Eo(e){if(!e[is]){e[is]=!0,Im.forEach(function(n){n!=="selectionchange"&&(Dk.has(n)||ga(n,!1,e),ga(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[is]||(t[is]=!0,ga("selectionchange",!1,t))}}function Cg(e,t,n,r){switch(ag(t)){case 1:var i=Jw;break;case 4:i=ek;break;default:i=Gc}n=i.bind(null,t,n,e),i=void 0,!Cu||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 ya(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=wr(l),s===null)return;if(a=s.tag,a===5||a===6){r=o=s;continue e}l=l.parentNode}}r=r.return}Gm(function(){var u=o,c=Wc(n),d=[];e:{var p=Eg.get(e);if(p!==void 0){var h=Xc,y=e;switch(e){case"keypress":if(js(n)===0)break e;case"keydown":case"keyup":h=mk;break;case"focusin":y="focus",h=ca;break;case"focusout":y="blur",h=ca;break;case"beforeblur":case"afterblur":h=ca;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":h=Rf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=rk;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=vk;break;case xg:case wg:case kg:h=sk;break;case bg:h=wk;break;case"scroll":h=tk;break;case"wheel":h=bk;break;case"copy":case"cut":case"paste":h=ak;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Mf}var x=(t&4)!==0,b=!x&&e==="scroll",v=x?p!==null?p+"Capture":null:p;x=[];for(var m=u,g;m!==null;){g=m;var k=g.stateNode;if(g.tag===5&&k!==null&&(g=k,v!==null&&(k=yo(m,v),k!=null&&x.push(So(m,k,g)))),b)break;m=m.return}0<x.length&&(p=new h(p,y,null,n,c),d.push({event:p,listeners:x}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",p&&n!==Eu&&(y=n.relatedTarget||n.fromElement)&&(wr(y)||y[In]))break e;if((h||p)&&(p=c.window===c?c:(p=c.ownerDocument)?p.defaultView||p.parentWindow:window,h?(y=n.relatedTarget||n.toElement,h=u,y=y?wr(y):null,y!==null&&(b=Dr(y),y!==b||y.tag!==5&&y.tag!==6)&&(y=null)):(h=null,y=u),h!==y)){if(x=Rf,k="onMouseLeave",v="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(x=Mf,k="onPointerLeave",v="onPointerEnter",m="pointer"),b=h==null?p:Jr(h),g=y==null?p:Jr(y),p=new x(k,m+"leave",h,n,c),p.target=b,p.relatedTarget=g,k=null,wr(c)===u&&(x=new x(v,m+"enter",y,n,c),x.target=g,x.relatedTarget=b,k=x),b=k,h&&y)t:{for(x=h,v=y,m=0,g=x;g;g=Ur(g))m++;for(g=0,k=v;k;k=Ur(k))g++;for(;0<m-g;)x=Ur(x),m--;for(;0<g-m;)v=Ur(v),g--;for(;m--;){if(x===v||v!==null&&x===v.alternate)break t;x=Ur(x),v=Ur(v)}x=null}else x=null;h!==null&&Kf(d,p,h,x,!1),y!==null&&b!==null&&Kf(d,b,y,x,!0)}}e:{if(p=u?Jr(u):window,h=p.nodeName&&p.nodeName.toLowerCase(),h==="select"||h==="input"&&p.type==="file")var _=$k;else if(Df(p))if(hg)_=Ak;else{_=Lk;var E=Tk}else(h=p.nodeName)&&h.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(_=Ik);if(_&&(_=_(e,u))){pg(d,_,n,c);break e}E&&E(e,p,u),e==="focusout"&&(E=p._wrapperState)&&E.controlled&&p.type==="number"&&vu(p,"number",p.value)}switch(E=u?Jr(u):window,e){case"focusin":(Df(E)||E.contentEditable==="true")&&(Qr=E,Tu=u,ro=null);break;case"focusout":ro=Tu=Qr=null;break;case"mousedown":Lu=!0;break;case"contextmenu":case"mouseup":case"dragend":Lu=!1,Wf(d,n,c);break;case"selectionchange":if(Mk)break;case"keydown":case"keyup":Wf(d,n,c)}var $;if(Zc)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else Xr?dg(e,n)&&(C="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(cg&&n.locale!=="ko"&&(Xr||C!=="onCompositionStart"?C==="onCompositionEnd"&&Xr&&($=ug()):(Yn=c,Yc="value"in Yn?Yn.value:Yn.textContent,Xr=!0)),E=Ks(u,C),0<E.length&&(C=new Of(C,e,null,n,c),d.push({event:C,listeners:E}),$?C.data=$:($=fg(n),$!==null&&(C.data=$)))),($=Sk?Ck(e,n):Nk(e,n))&&(u=Ks(u,"onBeforeInput"),0<u.length&&(c=new Of("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=$))}Sg(d,t)})}function So(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ks(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=yo(e,n),o!=null&&r.unshift(So(e,o,i)),o=yo(e,t),o!=null&&r.push(So(e,o,i))),e=e.return}return r}function Ur(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Kf(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=yo(n,o),a!=null&&s.unshift(So(n,a,l))):i||(a=yo(n,o),a!=null&&s.push(So(n,a,l)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var zk=/\r\n?/g,Bk=/\u0000|\uFFFD/g;function Gf(e){return(typeof e=="string"?e:""+e).replace(zk,`
38
+ `).replace(Bk,"")}function os(e,t,n){if(t=Gf(t),Gf(e)!==t&&n)throw Error(ae(425))}function Gs(){}var Iu=null,Au=null;function Ru(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 Ou=typeof setTimeout=="function"?setTimeout:void 0,Uk=typeof clearTimeout=="function"?clearTimeout:void 0,Yf=typeof Promise=="function"?Promise:void 0,Hk=typeof queueMicrotask=="function"?queueMicrotask:typeof Yf<"u"?function(e){return Yf.resolve(null).then(e).catch(Wk)}:Ou;function Wk(e){setTimeout(function(){throw e})}function va(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),wo(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);wo(t)}function er(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 Xf(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),wn="__reactFiber$"+_i,Co="__reactProps$"+_i,In="__reactContainer$"+_i,Mu="__reactEvents$"+_i,Vk="__reactListeners$"+_i,qk="__reactHandles$"+_i;function wr(e){var t=e[wn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[In]||n[wn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Xf(e);e!==null;){if(n=e[wn])return n;e=Xf(e)}return t}e=n,n=e.parentNode}return null}function Do(e){return e=e[wn]||e[In],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Jr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ae(33))}function Tl(e){return e[Co]||null}var Pu=[],ei=-1;function cr(e){return{current:e}}function He(e){0>ei||(e.current=Pu[ei],Pu[ei]=null,ei--)}function Be(e,t){ei++,Pu[ei]=e.current,e.current=t}var sr={},Nt=cr(sr),Mt=cr(!1),$r=sr;function yi(e,t){var n=e.type.contextTypes;if(!n)return sr;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 Pt(e){return e=e.childContextTypes,e!=null}function Ys(){He(Mt),He(Nt)}function Qf(e,t,n){if(Nt.current!==sr)throw Error(ae(168));Be(Nt,t),Be(Mt,n)}function Ng(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(ae(108,Tw(e)||"Unknown",i));return Ge({},n,r)}function Xs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||sr,$r=Nt.current,Be(Nt,e),Be(Mt,Mt.current),!0}function Zf(e,t,n){var r=e.stateNode;if(!r)throw Error(ae(169));n?(e=Ng(e,t,$r),r.__reactInternalMemoizedMergedChildContext=e,He(Mt),He(Nt),Be(Nt,e)):He(Mt),Be(Mt,n)}var jn=null,Ll=!1,xa=!1;function jg(e){jn===null?jn=[e]:jn.push(e)}function Kk(e){Ll=!0,jg(e)}function dr(){if(!xa&&jn!==null){xa=!0;var e=0,t=Pe;try{var n=jn;for(Pe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}jn=null,Ll=!1}catch(i){throw jn!==null&&(jn=jn.slice(e+1)),Zm(Vc,dr),i}finally{Pe=t,xa=!1}}return null}var ti=[],ni=0,Qs=null,Zs=0,Yt=[],Xt=0,Tr=null,_n=1,$n="";function gr(e,t){ti[ni++]=Zs,ti[ni++]=Qs,Qs=e,Zs=t}function _g(e,t,n){Yt[Xt++]=_n,Yt[Xt++]=$n,Yt[Xt++]=Tr,Tr=e;var r=_n;e=$n;var i=32-dn(r)-1;r&=~(1<<i),n+=1;var o=32-dn(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,_n=1<<32-dn(t)+i|n<<i|r,$n=o+e}else _n=1<<o|n<<i|r,$n=e}function ed(e){e.return!==null&&(gr(e,1),_g(e,1,0))}function td(e){for(;e===Qs;)Qs=ti[--ni],ti[ni]=null,Zs=ti[--ni],ti[ni]=null;for(;e===Tr;)Tr=Yt[--Xt],Yt[Xt]=null,$n=Yt[--Xt],Yt[Xt]=null,_n=Yt[--Xt],Yt[Xt]=null}var Wt=null,Ht=null,Ve=!1,un=null;function $g(e,t){var n=Zt(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 Jf(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,Wt=e,Ht=er(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Wt=e,Ht=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Tr!==null?{id:_n,overflow:$n}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Zt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Wt=e,Ht=null,!0):!1;default:return!1}}function Fu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Du(e){if(Ve){var t=Ht;if(t){var n=t;if(!Jf(e,t)){if(Fu(e))throw Error(ae(418));t=er(n.nextSibling);var r=Wt;t&&Jf(e,t)?$g(r,n):(e.flags=e.flags&-4097|2,Ve=!1,Wt=e)}}else{if(Fu(e))throw Error(ae(418));e.flags=e.flags&-4097|2,Ve=!1,Wt=e}}}function ep(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Wt=e}function ss(e){if(e!==Wt)return!1;if(!Ve)return ep(e),Ve=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ru(e.type,e.memoizedProps)),t&&(t=Ht)){if(Fu(e))throw Tg(),Error(ae(418));for(;t;)$g(e,t),t=er(t.nextSibling)}if(ep(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ae(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ht=er(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ht=null}}else Ht=Wt?er(e.stateNode.nextSibling):null;return!0}function Tg(){for(var e=Ht;e;)e=er(e.nextSibling)}function vi(){Ht=Wt=null,Ve=!1}function nd(e){un===null?un=[e]:un.push(e)}var Gk=Mn.ReactCurrentBatchConfig;function zi(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(ae(309));var r=n.stateNode}if(!r)throw Error(ae(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(ae(284));if(!n._owner)throw Error(ae(290,e))}return e}function ls(e,t){throw e=Object.prototype.toString.call(t),Error(ae(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function tp(e){var t=e._init;return t(e._payload)}function Lg(e){function t(v,m){if(e){var g=v.deletions;g===null?(v.deletions=[m],v.flags|=16):g.push(m)}}function n(v,m){if(!e)return null;for(;m!==null;)t(v,m),m=m.sibling;return null}function r(v,m){for(v=new Map;m!==null;)m.key!==null?v.set(m.key,m):v.set(m.index,m),m=m.sibling;return v}function i(v,m){return v=ir(v,m),v.index=0,v.sibling=null,v}function o(v,m,g){return v.index=g,e?(g=v.alternate,g!==null?(g=g.index,g<m?(v.flags|=2,m):g):(v.flags|=2,m)):(v.flags|=1048576,m)}function s(v){return e&&v.alternate===null&&(v.flags|=2),v}function l(v,m,g,k){return m===null||m.tag!==6?(m=Na(g,v.mode,k),m.return=v,m):(m=i(m,g),m.return=v,m)}function a(v,m,g,k){var _=g.type;return _===Yr?c(v,m,g.props.children,k,g.key):m!==null&&(m.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Wn&&tp(_)===m.type)?(k=i(m,g.props),k.ref=zi(v,m,g),k.return=v,k):(k=Rs(g.type,g.key,g.props,null,v.mode,k),k.ref=zi(v,m,g),k.return=v,k)}function u(v,m,g,k){return m===null||m.tag!==4||m.stateNode.containerInfo!==g.containerInfo||m.stateNode.implementation!==g.implementation?(m=ja(g,v.mode,k),m.return=v,m):(m=i(m,g.children||[]),m.return=v,m)}function c(v,m,g,k,_){return m===null||m.tag!==7?(m=Cr(g,v.mode,k,_),m.return=v,m):(m=i(m,g),m.return=v,m)}function d(v,m,g){if(typeof m=="string"&&m!==""||typeof m=="number")return m=Na(""+m,v.mode,g),m.return=v,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Xo:return g=Rs(m.type,m.key,m.props,null,v.mode,g),g.ref=zi(v,null,m),g.return=v,g;case Gr:return m=ja(m,v.mode,g),m.return=v,m;case Wn:var k=m._init;return d(v,k(m._payload),g)}if(Yi(m)||Oi(m))return m=Cr(m,v.mode,g,null),m.return=v,m;ls(v,m)}return null}function p(v,m,g,k){var _=m!==null?m.key:null;if(typeof g=="string"&&g!==""||typeof g=="number")return _!==null?null:l(v,m,""+g,k);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Xo:return g.key===_?a(v,m,g,k):null;case Gr:return g.key===_?u(v,m,g,k):null;case Wn:return _=g._init,p(v,m,_(g._payload),k)}if(Yi(g)||Oi(g))return _!==null?null:c(v,m,g,k,null);ls(v,g)}return null}function h(v,m,g,k,_){if(typeof k=="string"&&k!==""||typeof k=="number")return v=v.get(g)||null,l(m,v,""+k,_);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case Xo:return v=v.get(k.key===null?g:k.key)||null,a(m,v,k,_);case Gr:return v=v.get(k.key===null?g:k.key)||null,u(m,v,k,_);case Wn:var E=k._init;return h(v,m,g,E(k._payload),_)}if(Yi(k)||Oi(k))return v=v.get(g)||null,c(m,v,k,_,null);ls(m,k)}return null}function y(v,m,g,k){for(var _=null,E=null,$=m,C=m=0,T=null;$!==null&&C<g.length;C++){$.index>C?(T=$,$=null):T=$.sibling;var w=p(v,$,g[C],k);if(w===null){$===null&&($=T);break}e&&$&&w.alternate===null&&t(v,$),m=o(w,m,C),E===null?_=w:E.sibling=w,E=w,$=T}if(C===g.length)return n(v,$),Ve&&gr(v,C),_;if($===null){for(;C<g.length;C++)$=d(v,g[C],k),$!==null&&(m=o($,m,C),E===null?_=$:E.sibling=$,E=$);return Ve&&gr(v,C),_}for($=r(v,$);C<g.length;C++)T=h($,v,C,g[C],k),T!==null&&(e&&T.alternate!==null&&$.delete(T.key===null?C:T.key),m=o(T,m,C),E===null?_=T:E.sibling=T,E=T);return e&&$.forEach(function(A){return t(v,A)}),Ve&&gr(v,C),_}function x(v,m,g,k){var _=Oi(g);if(typeof _!="function")throw Error(ae(150));if(g=_.call(g),g==null)throw Error(ae(151));for(var E=_=null,$=m,C=m=0,T=null,w=g.next();$!==null&&!w.done;C++,w=g.next()){$.index>C?(T=$,$=null):T=$.sibling;var A=p(v,$,w.value,k);if(A===null){$===null&&($=T);break}e&&$&&A.alternate===null&&t(v,$),m=o(A,m,C),E===null?_=A:E.sibling=A,E=A,$=T}if(w.done)return n(v,$),Ve&&gr(v,C),_;if($===null){for(;!w.done;C++,w=g.next())w=d(v,w.value,k),w!==null&&(m=o(w,m,C),E===null?_=w:E.sibling=w,E=w);return Ve&&gr(v,C),_}for($=r(v,$);!w.done;C++,w=g.next())w=h($,v,C,w.value,k),w!==null&&(e&&w.alternate!==null&&$.delete(w.key===null?C:w.key),m=o(w,m,C),E===null?_=w:E.sibling=w,E=w);return e&&$.forEach(function(I){return t(v,I)}),Ve&&gr(v,C),_}function b(v,m,g,k){if(typeof g=="object"&&g!==null&&g.type===Yr&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case Xo:e:{for(var _=g.key,E=m;E!==null;){if(E.key===_){if(_=g.type,_===Yr){if(E.tag===7){n(v,E.sibling),m=i(E,g.props.children),m.return=v,v=m;break e}}else if(E.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Wn&&tp(_)===E.type){n(v,E.sibling),m=i(E,g.props),m.ref=zi(v,E,g),m.return=v,v=m;break e}n(v,E);break}else t(v,E);E=E.sibling}g.type===Yr?(m=Cr(g.props.children,v.mode,k,g.key),m.return=v,v=m):(k=Rs(g.type,g.key,g.props,null,v.mode,k),k.ref=zi(v,m,g),k.return=v,v=k)}return s(v);case Gr: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(v,m.sibling),m=i(m,g.children||[]),m.return=v,v=m;break e}else{n(v,m);break}else t(v,m);m=m.sibling}m=ja(g,v.mode,k),m.return=v,v=m}return s(v);case Wn:return E=g._init,b(v,m,E(g._payload),k)}if(Yi(g))return y(v,m,g,k);if(Oi(g))return x(v,m,g,k);ls(v,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,m!==null&&m.tag===6?(n(v,m.sibling),m=i(m,g),m.return=v,v=m):(n(v,m),m=Na(g,v.mode,k),m.return=v,v=m),s(v)):n(v,m)}return b}var xi=Lg(!0),Ig=Lg(!1),Js=cr(null),el=null,ri=null,rd=null;function id(){rd=ri=el=null}function od(e){var t=Js.current;He(Js),e._currentValue=t}function zu(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 di(e,t){el=e,rd=ri=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ot=!0),e.firstContext=null)}function en(e){var t=e._currentValue;if(rd!==e)if(e={context:e,memoizedValue:t,next:null},ri===null){if(el===null)throw Error(ae(308));ri=e,el.dependencies={lanes:0,firstContext:e}}else ri=ri.next=e;return t}var kr=null;function sd(e){kr===null?kr=[e]:kr.push(e)}function Ag(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,sd(t)):(n.next=i.next,i.next=n),t.interleaved=n,An(e,r)}function An(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 Vn=!1;function ld(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Rg(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 Tn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function tr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ae&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,An(e,n)}return i=r.interleaved,i===null?(t.next=t,sd(r)):(t.next=i.next,i.next=t),r.interleaved=t,An(e,n)}function _s(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,qc(e,n)}}function np(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 tl(e,t,n,r){var i=e.updateQueue;Vn=!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 p=l.lane,h=l.eventTime;if((r&p)===p){c!==null&&(c=c.next={eventTime:h,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var y=e,x=l;switch(p=t,h=n,x.tag){case 1:if(y=x.payload,typeof y=="function"){d=y.call(h,d,p);break e}d=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=x.payload,p=typeof y=="function"?y.call(h,d,p):y,p==null)break e;d=Ge({},d,p);break e;case 2:Vn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,p=i.effects,p===null?i.effects=[l]:p.push(l))}else h={eventTime:h,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=h,a=d):c=c.next=h,s|=p;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;p=l,l=p.next,p.next=null,i.lastBaseUpdate=p,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);Ir|=s,e.lanes=s,e.memoizedState=d}}function rp(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(ae(191,i));i.call(r)}}}var zo={},bn=cr(zo),No=cr(zo),jo=cr(zo);function br(e){if(e===zo)throw Error(ae(174));return e}function ad(e,t){switch(Be(jo,t),Be(No,e),Be(bn,zo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:wu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=wu(t,e)}He(bn),Be(bn,t)}function wi(){He(bn),He(No),He(jo)}function Og(e){br(jo.current);var t=br(bn.current),n=wu(t,e.type);t!==n&&(Be(No,e),Be(bn,n))}function ud(e){No.current===e&&(He(bn),He(No))}var qe=cr(0);function nl(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 wa=[];function cd(){for(var e=0;e<wa.length;e++)wa[e]._workInProgressVersionPrimary=null;wa.length=0}var $s=Mn.ReactCurrentDispatcher,ka=Mn.ReactCurrentBatchConfig,Lr=0,Ke=null,lt=null,ft=null,rl=!1,io=!1,_o=0,Yk=0;function Et(){throw Error(ae(321))}function dd(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!mn(e[n],t[n]))return!1;return!0}function fd(e,t,n,r,i,o){if(Lr=o,Ke=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,$s.current=e===null||e.memoizedState===null?Jk:e0,e=n(r,i),io){o=0;do{if(io=!1,_o=0,25<=o)throw Error(ae(301));o+=1,ft=lt=null,t.updateQueue=null,$s.current=t0,e=n(r,i)}while(io)}if($s.current=il,t=lt!==null&&lt.next!==null,Lr=0,ft=lt=Ke=null,rl=!1,t)throw Error(ae(300));return e}function pd(){var e=_o!==0;return _o=0,e}function vn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ft===null?Ke.memoizedState=ft=e:ft=ft.next=e,ft}function tn(){if(lt===null){var e=Ke.alternate;e=e!==null?e.memoizedState:null}else e=lt.next;var t=ft===null?Ke.memoizedState:ft.next;if(t!==null)ft=t,lt=e;else{if(e===null)throw Error(ae(310));lt=e,e={memoizedState:lt.memoizedState,baseState:lt.baseState,baseQueue:lt.baseQueue,queue:lt.queue,next:null},ft===null?Ke.memoizedState=ft=e:ft=ft.next=e}return ft}function $o(e,t){return typeof t=="function"?t(e):t}function ba(e){var t=tn(),n=t.queue;if(n===null)throw Error(ae(311));n.lastRenderedReducer=e;var r=lt,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((Lr&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,Ke.lanes|=c,Ir|=c}u=u.next}while(u!==null&&u!==o);a===null?s=r:a.next=l,mn(r,t.memoizedState)||(Ot=!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,Ke.lanes|=o,Ir|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ea(e){var t=tn(),n=t.queue;if(n===null)throw Error(ae(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);mn(o,t.memoizedState)||(Ot=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Mg(){}function Pg(e,t){var n=Ke,r=tn(),i=t(),o=!mn(r.memoizedState,i);if(o&&(r.memoizedState=i,Ot=!0),r=r.queue,hd(zg.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||ft!==null&&ft.memoizedState.tag&1){if(n.flags|=2048,To(9,Dg.bind(null,n,r,i,t),void 0,null),pt===null)throw Error(ae(349));Lr&30||Fg(n,t,i)}return i}function Fg(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ke.updateQueue,t===null?(t={lastEffect:null,stores:null},Ke.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Dg(e,t,n,r){t.value=n,t.getSnapshot=r,Bg(t)&&Ug(e)}function zg(e,t,n){return n(function(){Bg(t)&&Ug(e)})}function Bg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!mn(e,n)}catch{return!0}}function Ug(e){var t=An(e,1);t!==null&&fn(t,e,1,-1)}function ip(e){var t=vn();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=Zk.bind(null,Ke,e),[t.memoizedState,e]}function To(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ke.updateQueue,t===null?(t={lastEffect:null,stores:null},Ke.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 Hg(){return tn().memoizedState}function Ts(e,t,n,r){var i=vn();Ke.flags|=e,i.memoizedState=To(1|t,n,void 0,r===void 0?null:r)}function Il(e,t,n,r){var i=tn();r=r===void 0?null:r;var o=void 0;if(lt!==null){var s=lt.memoizedState;if(o=s.destroy,r!==null&&dd(r,s.deps)){i.memoizedState=To(t,n,o,r);return}}Ke.flags|=e,i.memoizedState=To(1|t,n,o,r)}function op(e,t){return Ts(8390656,8,e,t)}function hd(e,t){return Il(2048,8,e,t)}function Wg(e,t){return Il(4,2,e,t)}function Vg(e,t){return Il(4,4,e,t)}function qg(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 Kg(e,t,n){return n=n!=null?n.concat([e]):null,Il(4,4,qg.bind(null,t,e),n)}function md(){}function Gg(e,t){var n=tn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&dd(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Yg(e,t){var n=tn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&dd(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Xg(e,t,n){return Lr&21?(mn(n,t)||(n=tg(),Ke.lanes|=n,Ir|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ot=!0),e.memoizedState=n)}function Xk(e,t){var n=Pe;Pe=n!==0&&4>n?n:4,e(!0);var r=ka.transition;ka.transition={};try{e(!1),t()}finally{Pe=n,ka.transition=r}}function Qg(){return tn().memoizedState}function Qk(e,t,n){var r=rr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Zg(e))Jg(t,n);else if(n=Ag(e,t,n,r),n!==null){var i=Tt();fn(n,e,r,i),ey(n,t,r)}}function Zk(e,t,n){var r=rr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Zg(e))Jg(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,mn(l,s)){var a=t.interleaved;a===null?(i.next=i,sd(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=Ag(e,t,i,r),n!==null&&(i=Tt(),fn(n,e,r,i),ey(n,t,r))}}function Zg(e){var t=e.alternate;return e===Ke||t!==null&&t===Ke}function Jg(e,t){io=rl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ey(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qc(e,n)}}var il={readContext:en,useCallback:Et,useContext:Et,useEffect:Et,useImperativeHandle:Et,useInsertionEffect:Et,useLayoutEffect:Et,useMemo:Et,useReducer:Et,useRef:Et,useState:Et,useDebugValue:Et,useDeferredValue:Et,useTransition:Et,useMutableSource:Et,useSyncExternalStore:Et,useId:Et,unstable_isNewReconciler:!1},Jk={readContext:en,useCallback:function(e,t){return vn().memoizedState=[e,t===void 0?null:t],e},useContext:en,useEffect:op,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ts(4194308,4,qg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ts(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ts(4,2,e,t)},useMemo:function(e,t){var n=vn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=vn();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=Qk.bind(null,Ke,e),[r.memoizedState,e]},useRef:function(e){var t=vn();return e={current:e},t.memoizedState=e},useState:ip,useDebugValue:md,useDeferredValue:function(e){return vn().memoizedState=e},useTransition:function(){var e=ip(!1),t=e[0];return e=Xk.bind(null,e[1]),vn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ke,i=vn();if(Ve){if(n===void 0)throw Error(ae(407));n=n()}else{if(n=t(),pt===null)throw Error(ae(349));Lr&30||Fg(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,op(zg.bind(null,r,o,e),[e]),r.flags|=2048,To(9,Dg.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=vn(),t=pt.identifierPrefix;if(Ve){var n=$n,r=_n;n=(r&~(1<<32-dn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=_o++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Yk++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},e0={readContext:en,useCallback:Gg,useContext:en,useEffect:hd,useImperativeHandle:Kg,useInsertionEffect:Wg,useLayoutEffect:Vg,useMemo:Yg,useReducer:ba,useRef:Hg,useState:function(){return ba($o)},useDebugValue:md,useDeferredValue:function(e){var t=tn();return Xg(t,lt.memoizedState,e)},useTransition:function(){var e=ba($o)[0],t=tn().memoizedState;return[e,t]},useMutableSource:Mg,useSyncExternalStore:Pg,useId:Qg,unstable_isNewReconciler:!1},t0={readContext:en,useCallback:Gg,useContext:en,useEffect:hd,useImperativeHandle:Kg,useInsertionEffect:Wg,useLayoutEffect:Vg,useMemo:Yg,useReducer:Ea,useRef:Hg,useState:function(){return Ea($o)},useDebugValue:md,useDeferredValue:function(e){var t=tn();return lt===null?t.memoizedState=e:Xg(t,lt.memoizedState,e)},useTransition:function(){var e=Ea($o)[0],t=tn().memoizedState;return[e,t]},useMutableSource:Mg,useSyncExternalStore:Pg,useId:Qg,unstable_isNewReconciler:!1};function sn(e,t){if(e&&e.defaultProps){t=Ge({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Bu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ge({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Al={isMounted:function(e){return(e=e._reactInternals)?Dr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Tt(),i=rr(e),o=Tn(r,i);o.payload=t,n!=null&&(o.callback=n),t=tr(e,o,i),t!==null&&(fn(t,e,i,r),_s(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Tt(),i=rr(e),o=Tn(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=tr(e,o,i),t!==null&&(fn(t,e,i,r),_s(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Tt(),r=rr(e),i=Tn(n,r);i.tag=2,t!=null&&(i.callback=t),t=tr(e,i,r),t!==null&&(fn(t,e,r,n),_s(t,e,r))}};function sp(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?!bo(n,r)||!bo(i,o):!0}function ty(e,t,n){var r=!1,i=sr,o=t.contextType;return typeof o=="object"&&o!==null?o=en(o):(i=Pt(t)?$r:Nt.current,r=t.contextTypes,o=(r=r!=null)?yi(e,i):sr),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Al,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function lp(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&&Al.enqueueReplaceState(t,t.state,null)}function Uu(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},ld(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=en(o):(o=Pt(t)?$r:Nt.current,i.context=yi(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Bu(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&&Al.enqueueReplaceState(i,i.state,null),tl(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function ki(e,t){try{var n="",r=t;do n+=$w(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 Sa(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Hu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var n0=typeof WeakMap=="function"?WeakMap:Map;function ny(e,t,n){n=Tn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){sl||(sl=!0,Ju=r),Hu(e,t)},n}function ry(e,t,n){n=Tn(-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(){Hu(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Hu(e,t),typeof r!="function"&&(nr===null?nr=new Set([this]):nr.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function ap(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new n0;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=g0.bind(null,e,t,n),t.then(e,e))}function up(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 cp(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=Tn(-1,1),t.tag=2,tr(n,t,1))),n.lanes|=1),e)}var r0=Mn.ReactCurrentOwner,Ot=!1;function _t(e,t,n,r){t.child=e===null?Ig(t,null,n,r):xi(t,e.child,n,r)}function dp(e,t,n,r,i){n=n.render;var o=t.ref;return di(t,i),r=fd(e,t,n,r,o,i),n=pd(),e!==null&&!Ot?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Rn(e,t,i)):(Ve&&n&&ed(t),t.flags|=1,_t(e,t,r,i),t.child)}function fp(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!Ed(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,iy(e,t,o,r,i)):(e=Rs(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:bo,n(s,r)&&e.ref===t.ref)return Rn(e,t,i)}return t.flags|=1,e=ir(o,r),e.ref=t.ref,e.return=t,t.child=e}function iy(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(bo(o,r)&&e.ref===t.ref)if(Ot=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(Ot=!0);else return t.lanes=e.lanes,Rn(e,t,i)}return Wu(e,t,n,r,i)}function oy(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(oi,Ut),Ut|=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(oi,Ut),Ut|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Be(oi,Ut),Ut|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Be(oi,Ut),Ut|=r;return _t(e,t,i,n),t.child}function sy(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Wu(e,t,n,r,i){var o=Pt(n)?$r:Nt.current;return o=yi(t,o),di(t,i),n=fd(e,t,n,r,o,i),r=pd(),e!==null&&!Ot?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Rn(e,t,i)):(Ve&&r&&ed(t),t.flags|=1,_t(e,t,n,i),t.child)}function pp(e,t,n,r,i){if(Pt(n)){var o=!0;Xs(t)}else o=!1;if(di(t,i),t.stateNode===null)Ls(e,t),ty(t,n,r),Uu(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=en(u):(u=Pt(n)?$r:Nt.current,u=yi(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)&&lp(t,s,r,u),Vn=!1;var p=t.memoizedState;s.state=p,tl(t,r,s,i),a=t.memoizedState,l!==r||p!==a||Mt.current||Vn?(typeof c=="function"&&(Bu(t,n,c,r),a=t.memoizedState),(l=Vn||sp(t,n,l,r,p,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,Rg(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:sn(t.type,l),s.props=u,d=t.pendingProps,p=s.context,a=n.contextType,typeof a=="object"&&a!==null?a=en(a):(a=Pt(n)?$r:Nt.current,a=yi(t,a));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==d||p!==a)&&lp(t,s,r,a),Vn=!1,p=t.memoizedState,s.state=p,tl(t,r,s,i);var y=t.memoizedState;l!==d||p!==y||Mt.current||Vn?(typeof h=="function"&&(Bu(t,n,h,r),y=t.memoizedState),(u=Vn||sp(t,n,u,r,p,y,a)||!1)?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,y,a),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,y,a)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),s.props=r,s.state=y,s.context=a,r=u):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Vu(e,t,n,r,o,i)}function Vu(e,t,n,r,i,o){sy(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&Zf(t,n,!1),Rn(e,t,o);r=t.stateNode,r0.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)):_t(e,t,l,o),t.memoizedState=r.state,i&&Zf(t,n,!0),t.child}function ly(e){var t=e.stateNode;t.pendingContext?Qf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Qf(e,t.context,!1),ad(e,t.containerInfo)}function hp(e,t,n,r,i){return vi(),nd(i),t.flags|=256,_t(e,t,n,r),t.child}var qu={dehydrated:null,treeContext:null,retryLane:0};function Ku(e){return{baseLanes:e,cachePool:null,transitions:null}}function ay(e,t,n){var r=t.pendingProps,i=qe.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(qe,i&1),e===null)return Du(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=Ml(s,r,0,null),e=Cr(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Ku(n),t.memoizedState=qu,e):gd(t,s));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return i0(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=ir(i,a),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?o=ir(l,o):(o=Cr(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?Ku(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=qu,r}return o=e.child,e=o.sibling,r=ir(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 gd(e,t){return t=Ml({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function as(e,t,n,r){return r!==null&&nd(r),xi(t,e.child,null,n),e=gd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function i0(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=Sa(Error(ae(422))),as(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Ml({mode:"visible",children:r.children},i,0,null),o=Cr(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=Ku(s),t.memoizedState=qu,o);if(!(t.mode&1))return as(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(ae(419)),r=Sa(o,r,void 0),as(e,t,s,r)}if(l=(s&e.childLanes)!==0,Ot||l){if(r=pt,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,An(e,i),fn(r,e,i,-1))}return bd(),r=Sa(Error(ae(421))),as(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=y0.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Ht=er(i.nextSibling),Wt=t,Ve=!0,un=null,e!==null&&(Yt[Xt++]=_n,Yt[Xt++]=$n,Yt[Xt++]=Tr,_n=e.id,$n=e.overflow,Tr=t),t=gd(t,r.children),t.flags|=4096,t)}function mp(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),zu(e.return,t,n)}function Ca(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 uy(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(_t(e,t,r.children,n),r=qe.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&&mp(e,n,t);else if(e.tag===19)mp(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(qe,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&&nl(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ca(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&&nl(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ca(t,!0,n,null,o);break;case"together":Ca(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ls(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Rn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ir|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(ae(153));if(t.child!==null){for(e=t.child,n=ir(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ir(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function o0(e,t,n){switch(t.tag){case 3:ly(t),vi();break;case 5:Og(t);break;case 1:Pt(t.type)&&Xs(t);break;case 4:ad(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Be(Js,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Be(qe,qe.current&1),t.flags|=128,null):n&t.child.childLanes?ay(e,t,n):(Be(qe,qe.current&1),e=Rn(e,t,n),e!==null?e.sibling:null);Be(qe,qe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return uy(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Be(qe,qe.current),r)break;return null;case 22:case 23:return t.lanes=0,oy(e,t,n)}return Rn(e,t,n)}var cy,Gu,dy,fy;cy=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}};Gu=function(){};dy=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,br(bn.current);var o=null;switch(n){case"input":i=gu(e,i),r=gu(e,r),o=[];break;case"select":i=Ge({},i,{value:void 0}),r=Ge({},r,{value:void 0}),o=[];break;case"textarea":i=xu(e,i),r=xu(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Gs)}ku(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"&&(mo.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"&&(mo.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)}};fy=function(e,t,n,r){n!==r&&(t.flags|=4)};function Bi(e,t){if(!Ve)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 St(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 s0(e,t,n){var r=t.pendingProps;switch(td(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return St(t),null;case 1:return Pt(t.type)&&Ys(),St(t),null;case 3:return r=t.stateNode,wi(),He(Mt),He(Nt),cd(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ss(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,un!==null&&(nc(un),un=null))),Gu(e,t),St(t),null;case 5:ud(t);var i=br(jo.current);if(n=t.type,e!==null&&t.stateNode!=null)dy(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(ae(166));return St(t),null}if(e=br(bn.current),ss(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[wn]=t,r[Co]=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<Qi.length;i++)Ue(Qi[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":Sf(r,o),Ue("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Ue("invalid",r);break;case"textarea":Nf(r,o),Ue("invalid",r)}ku(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&&os(r.textContent,l,e),i=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&os(r.textContent,l,e),i=["children",""+l]):mo.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&Ue("scroll",r)}switch(n){case"input":Qo(r),Cf(r,o,!0);break;case"textarea":Qo(r),jf(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Gs)}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=zm(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[wn]=t,e[Co]=r,cy(e,t,!1,!1),t.stateNode=e;e:{switch(s=bu(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<Qi.length;i++)Ue(Qi[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":Sf(e,r),i=gu(e,r),Ue("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Ge({},r,{value:void 0}),Ue("invalid",e);break;case"textarea":Nf(e,r),i=xu(e,r),Ue("invalid",e);break;default:i=r}ku(n,i),l=i;for(o in l)if(l.hasOwnProperty(o)){var a=l[o];o==="style"?Hm(e,a):o==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&Bm(e,a)):o==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&go(e,a):typeof a=="number"&&go(e,""+a):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(mo.hasOwnProperty(o)?a!=null&&o==="onScroll"&&Ue("scroll",e):a!=null&&zc(e,o,a,s))}switch(n){case"input":Qo(e),Cf(e,r,!1);break;case"textarea":Qo(e),jf(e);break;case"option":r.value!=null&&e.setAttribute("value",""+or(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?li(e,!!r.multiple,o,!1):r.defaultValue!=null&&li(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Gs)}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 St(t),null;case 6:if(e&&t.stateNode!=null)fy(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(ae(166));if(n=br(jo.current),br(bn.current),ss(t)){if(r=t.stateNode,n=t.memoizedProps,r[wn]=t,(o=r.nodeValue!==n)&&(e=Wt,e!==null))switch(e.tag){case 3:os(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&os(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[wn]=t,t.stateNode=r}return St(t),null;case 13:if(He(qe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ve&&Ht!==null&&t.mode&1&&!(t.flags&128))Tg(),vi(),t.flags|=98560,o=!1;else if(o=ss(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(ae(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(ae(317));o[wn]=t}else vi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;St(t),o=!1}else un!==null&&(nc(un),un=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||qe.current&1?at===0&&(at=3):bd())),t.updateQueue!==null&&(t.flags|=4),St(t),null);case 4:return wi(),Gu(e,t),e===null&&Eo(t.stateNode.containerInfo),St(t),null;case 10:return od(t.type._context),St(t),null;case 17:return Pt(t.type)&&Ys(),St(t),null;case 19:if(He(qe),o=t.memoizedState,o===null)return St(t),null;if(r=(t.flags&128)!==0,s=o.rendering,s===null)if(r)Bi(o,!1);else{if(at!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=nl(e),s!==null){for(t.flags|=128,Bi(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(qe,qe.current&1|2),t.child}e=e.sibling}o.tail!==null&&Qe()>bi&&(t.flags|=128,r=!0,Bi(o,!1),t.lanes=4194304)}else{if(!r)if(e=nl(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Bi(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Ve)return St(t),null}else 2*Qe()-o.renderingStartTime>bi&&n!==1073741824&&(t.flags|=128,r=!0,Bi(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=Qe(),t.sibling=null,n=qe.current,Be(qe,r?n&1|2:n&1),t):(St(t),null);case 22:case 23:return kd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ut&1073741824&&(St(t),t.subtreeFlags&6&&(t.flags|=8192)):St(t),null;case 24:return null;case 25:return null}throw Error(ae(156,t.tag))}function l0(e,t){switch(td(t),t.tag){case 1:return Pt(t.type)&&Ys(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return wi(),He(Mt),He(Nt),cd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ud(t),null;case 13:if(He(qe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ae(340));vi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return He(qe),null;case 4:return wi(),null;case 10:return od(t.type._context),null;case 22:case 23:return kd(),null;case 24:return null;default:return null}}var us=!1,Ct=!1,a0=typeof WeakSet=="function"?WeakSet:Set,me=null;function ii(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Xe(e,t,r)}else n.current=null}function Yu(e,t,n){try{n()}catch(r){Xe(e,t,r)}}var gp=!1;function u0(e,t){if(Iu=Vs,e=yg(),Jc(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,p=null;t:for(;;){for(var h;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),(h=d.firstChild)!==null;)p=d,d=h;for(;;){if(d===e)break t;if(p===n&&++u===i&&(l=s),p===o&&++c===r&&(a=s),(h=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=h}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Au={focusedElem:e,selectionRange:n},Vs=!1,me=t;me!==null;)if(t=me,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,me=e;else for(;me!==null;){t=me;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var x=y.memoizedProps,b=y.memoizedState,v=t.stateNode,m=v.getSnapshotBeforeUpdate(t.elementType===t.type?x:sn(t.type,x),b);v.__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(ae(163))}}catch(k){Xe(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,me=e;break}me=t.return}return y=gp,gp=!1,y}function oo(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&&Yu(t,n,o)}i=i.next}while(i!==r)}}function Rl(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 Xu(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 py(e){var t=e.alternate;t!==null&&(e.alternate=null,py(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[wn],delete t[Co],delete t[Mu],delete t[Vk],delete t[qk])),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 hy(e){return e.tag===5||e.tag===3||e.tag===4}function yp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||hy(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 Qu(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=Gs));else if(r!==4&&(e=e.child,e!==null))for(Qu(e,t,n),e=e.sibling;e!==null;)Qu(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 gt=null,ln=!1;function Un(e,t,n){for(n=n.child;n!==null;)my(e,t,n),n=n.sibling}function my(e,t,n){if(kn&&typeof kn.onCommitFiberUnmount=="function")try{kn.onCommitFiberUnmount(Nl,n)}catch{}switch(n.tag){case 5:Ct||ii(n,t);case 6:var r=gt,i=ln;gt=null,Un(e,t,n),gt=r,ln=i,gt!==null&&(ln?(e=gt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):gt.removeChild(n.stateNode));break;case 18:gt!==null&&(ln?(e=gt,n=n.stateNode,e.nodeType===8?va(e.parentNode,n):e.nodeType===1&&va(e,n),wo(e)):va(gt,n.stateNode));break;case 4:r=gt,i=ln,gt=n.stateNode.containerInfo,ln=!0,Un(e,t,n),gt=r,ln=i;break;case 0:case 11:case 14:case 15:if(!Ct&&(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)&&Yu(n,t,s),i=i.next}while(i!==r)}Un(e,t,n);break;case 1:if(!Ct&&(ii(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Xe(n,t,l)}Un(e,t,n);break;case 21:Un(e,t,n);break;case 22:n.mode&1?(Ct=(r=Ct)||n.memoizedState!==null,Un(e,t,n),Ct=r):Un(e,t,n);break;default:Un(e,t,n)}}function vp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new a0),t.forEach(function(r){var i=v0.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function on(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:gt=l.stateNode,ln=!1;break e;case 3:gt=l.stateNode.containerInfo,ln=!0;break e;case 4:gt=l.stateNode.containerInfo,ln=!0;break e}l=l.return}if(gt===null)throw Error(ae(160));my(o,s,i),gt=null,ln=!1;var a=i.alternate;a!==null&&(a.return=null),i.return=null}catch(u){Xe(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)gy(t,e),t=t.sibling}function gy(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(on(t,e),yn(e),r&4){try{oo(3,e,e.return),Rl(3,e)}catch(x){Xe(e,e.return,x)}try{oo(5,e,e.return)}catch(x){Xe(e,e.return,x)}}break;case 1:on(t,e),yn(e),r&512&&n!==null&&ii(n,n.return);break;case 5:if(on(t,e),yn(e),r&512&&n!==null&&ii(n,n.return),e.flags&32){var i=e.stateNode;try{go(i,"")}catch(x){Xe(e,e.return,x)}}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&&Fm(i,o),bu(l,s);var u=bu(l,o);for(s=0;s<a.length;s+=2){var c=a[s],d=a[s+1];c==="style"?Hm(i,d):c==="dangerouslySetInnerHTML"?Bm(i,d):c==="children"?go(i,d):zc(i,c,d,u)}switch(l){case"input":yu(i,o);break;case"textarea":Dm(i,o);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var h=o.value;h!=null?li(i,!!o.multiple,h,!1):p!==!!o.multiple&&(o.defaultValue!=null?li(i,!!o.multiple,o.defaultValue,!0):li(i,!!o.multiple,o.multiple?[]:"",!1))}i[Co]=o}catch(x){Xe(e,e.return,x)}}break;case 6:if(on(t,e),yn(e),r&4){if(e.stateNode===null)throw Error(ae(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(x){Xe(e,e.return,x)}}break;case 3:if(on(t,e),yn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{wo(t.containerInfo)}catch(x){Xe(e,e.return,x)}break;case 4:on(t,e),yn(e);break;case 13:on(t,e),yn(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(xd=Qe())),r&4&&vp(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Ct=(u=Ct)||c,on(t,e),Ct=u):on(t,e),yn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(me=e,c=e.child;c!==null;){for(d=me=c;me!==null;){switch(p=me,h=p.child,p.tag){case 0:case 11:case 14:case 15:oo(4,p,p.return);break;case 1:ii(p,p.return);var y=p.stateNode;if(typeof y.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(x){Xe(r,n,x)}}break;case 5:ii(p,p.return);break;case 22:if(p.memoizedState!==null){wp(d);continue}}h!==null?(h.return=p,me=h):wp(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=Um("display",s))}catch(x){Xe(e,e.return,x)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(x){Xe(e,e.return,x)}}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:on(t,e),yn(e),r&4&&vp(e);break;case 21:break;default:on(t,e),yn(e)}}function yn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(hy(n)){var r=n;break e}n=n.return}throw Error(ae(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(go(i,""),r.flags&=-33);var o=yp(e);Zu(e,o,i);break;case 3:case 4:var s=r.stateNode.containerInfo,l=yp(e);Qu(e,l,s);break;default:throw Error(ae(161))}}catch(a){Xe(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function c0(e,t,n){me=e,yy(e)}function yy(e,t,n){for(var r=(e.mode&1)!==0;me!==null;){var i=me,o=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||us;if(!s){var l=i.alternate,a=l!==null&&l.memoizedState!==null||Ct;l=us;var u=Ct;if(us=s,(Ct=a)&&!u)for(me=i;me!==null;)s=me,a=s.child,s.tag===22&&s.memoizedState!==null?kp(i):a!==null?(a.return=s,me=a):kp(i);for(;o!==null;)me=o,yy(o),o=o.sibling;me=i,us=l,Ct=u}xp(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,me=o):xp(e)}}function xp(e){for(;me!==null;){var t=me;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ct||Rl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ct)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:sn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&rp(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}rp(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&&wo(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(ae(163))}Ct||t.flags&512&&Xu(t)}catch(p){Xe(t,t.return,p)}}if(t===e){me=null;break}if(n=t.sibling,n!==null){n.return=t.return,me=n;break}me=t.return}}function wp(e){for(;me!==null;){var t=me;if(t===e){me=null;break}var n=t.sibling;if(n!==null){n.return=t.return,me=n;break}me=t.return}}function kp(e){for(;me!==null;){var t=me;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Rl(4,t)}catch(a){Xe(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(a){Xe(t,i,a)}}var o=t.return;try{Xu(t)}catch(a){Xe(t,o,a)}break;case 5:var s=t.return;try{Xu(t)}catch(a){Xe(t,s,a)}}}catch(a){Xe(t,t.return,a)}if(t===e){me=null;break}var l=t.sibling;if(l!==null){l.return=t.return,me=l;break}me=t.return}}var d0=Math.ceil,ol=Mn.ReactCurrentDispatcher,yd=Mn.ReactCurrentOwner,Jt=Mn.ReactCurrentBatchConfig,Ae=0,pt=null,rt=null,wt=0,Ut=0,oi=cr(0),at=0,Lo=null,Ir=0,Ol=0,vd=0,so=null,Rt=null,xd=0,bi=1/0,Nn=null,sl=!1,Ju=null,nr=null,cs=!1,Xn=null,ll=0,lo=0,ec=null,Is=-1,As=0;function Tt(){return Ae&6?Qe():Is!==-1?Is:Is=Qe()}function rr(e){return e.mode&1?Ae&2&&wt!==0?wt&-wt:Gk.transition!==null?(As===0&&(As=tg()),As):(e=Pe,e!==0||(e=window.event,e=e===void 0?16:ag(e.type)),e):1}function fn(e,t,n,r){if(50<lo)throw lo=0,ec=null,Error(ae(185));Po(e,n,r),(!(Ae&2)||e!==pt)&&(e===pt&&(!(Ae&2)&&(Ol|=n),at===4&&Kn(e,wt)),Ft(e,r),n===1&&Ae===0&&!(t.mode&1)&&(bi=Qe()+500,Ll&&dr()))}function Ft(e,t){var n=e.callbackNode;Gw(e,t);var r=Ws(e,e===pt?wt:0);if(r===0)n!==null&&Tf(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Tf(n),t===1)e.tag===0?Kk(bp.bind(null,e)):jg(bp.bind(null,e)),Hk(function(){!(Ae&6)&&dr()}),n=null;else{switch(ng(r)){case 1:n=Vc;break;case 4:n=Jm;break;case 16:n=Hs;break;case 536870912:n=eg;break;default:n=Hs}n=Cy(n,vy.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function vy(e,t){if(Is=-1,As=0,Ae&6)throw Error(ae(327));var n=e.callbackNode;if(fi()&&e.callbackNode!==n)return null;var r=Ws(e,e===pt?wt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=al(e,r);else{t=r;var i=Ae;Ae|=2;var o=wy();(pt!==e||wt!==t)&&(Nn=null,bi=Qe()+500,Sr(e,t));do try{h0();break}catch(l){xy(e,l)}while(!0);id(),ol.current=o,Ae=i,rt!==null?t=0:(pt=null,wt=0,t=at)}if(t!==0){if(t===2&&(i=ju(e),i!==0&&(r=i,t=tc(e,i))),t===1)throw n=Lo,Sr(e,0),Kn(e,r),Ft(e,Qe()),n;if(t===6)Kn(e,r);else{if(i=e.current.alternate,!(r&30)&&!f0(i)&&(t=al(e,r),t===2&&(o=ju(e),o!==0&&(r=o,t=tc(e,o))),t===1))throw n=Lo,Sr(e,0),Kn(e,r),Ft(e,Qe()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(ae(345));case 2:yr(e,Rt,Nn);break;case 3:if(Kn(e,r),(r&130023424)===r&&(t=xd+500-Qe(),10<t)){if(Ws(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Tt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Ou(yr.bind(null,e,Rt,Nn),t);break}yr(e,Rt,Nn);break;case 4:if(Kn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-dn(r);o=1<<s,s=t[s],s>i&&(i=s),r&=~o}if(r=i,r=Qe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*d0(r/1960))-r,10<r){e.timeoutHandle=Ou(yr.bind(null,e,Rt,Nn),r);break}yr(e,Rt,Nn);break;case 5:yr(e,Rt,Nn);break;default:throw Error(ae(329))}}}return Ft(e,Qe()),e.callbackNode===n?vy.bind(null,e):null}function tc(e,t){var n=so;return e.current.memoizedState.isDehydrated&&(Sr(e,t).flags|=256),e=al(e,t),e!==2&&(t=Rt,Rt=n,t!==null&&nc(t)),e}function nc(e){Rt===null?Rt=e:Rt.push.apply(Rt,e)}function f0(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(!mn(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 Kn(e,t){for(t&=~vd,t&=~Ol,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-dn(t),r=1<<n;e[n]=-1,t&=~r}}function bp(e){if(Ae&6)throw Error(ae(327));fi();var t=Ws(e,0);if(!(t&1))return Ft(e,Qe()),null;var n=al(e,t);if(e.tag!==0&&n===2){var r=ju(e);r!==0&&(t=r,n=tc(e,r))}if(n===1)throw n=Lo,Sr(e,0),Kn(e,t),Ft(e,Qe()),n;if(n===6)throw Error(ae(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,yr(e,Rt,Nn),Ft(e,Qe()),null}function wd(e,t){var n=Ae;Ae|=1;try{return e(t)}finally{Ae=n,Ae===0&&(bi=Qe()+500,Ll&&dr())}}function Ar(e){Xn!==null&&Xn.tag===0&&!(Ae&6)&&fi();var t=Ae;Ae|=1;var n=Jt.transition,r=Pe;try{if(Jt.transition=null,Pe=1,e)return e()}finally{Pe=r,Jt.transition=n,Ae=t,!(Ae&6)&&dr()}}function kd(){Ut=oi.current,He(oi)}function Sr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Uk(n)),rt!==null)for(n=rt.return;n!==null;){var r=n;switch(td(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ys();break;case 3:wi(),He(Mt),He(Nt),cd();break;case 5:ud(r);break;case 4:wi();break;case 13:He(qe);break;case 19:He(qe);break;case 10:od(r.type._context);break;case 22:case 23:kd()}n=n.return}if(pt=e,rt=e=ir(e.current,null),wt=Ut=t,at=0,Lo=null,vd=Ol=Ir=0,Rt=so=null,kr!==null){for(t=0;t<kr.length;t++)if(n=kr[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}kr=null}return e}function xy(e,t){do{var n=rt;try{if(id(),$s.current=il,rl){for(var r=Ke.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}rl=!1}if(Lr=0,ft=lt=Ke=null,io=!1,_o=0,yd.current=null,n===null||n.return===null){at=1,Lo=t,rt=null;break}e:{var o=e,s=n.return,l=n,a=t;if(t=wt,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 p=c.alternate;p?(c.updateQueue=p.updateQueue,c.memoizedState=p.memoizedState,c.lanes=p.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=up(s);if(h!==null){h.flags&=-257,cp(h,s,l,o,t),h.mode&1&&ap(o,u,t),t=h,a=u;var y=t.updateQueue;if(y===null){var x=new Set;x.add(a),t.updateQueue=x}else y.add(a);break e}else{if(!(t&1)){ap(o,u,t),bd();break e}a=Error(ae(426))}}else if(Ve&&l.mode&1){var b=up(s);if(b!==null){!(b.flags&65536)&&(b.flags|=256),cp(b,s,l,o,t),nd(ki(a,l));break e}}o=a=ki(a,l),at!==4&&(at=2),so===null?so=[o]:so.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=ny(o,a,t);np(o,v);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"&&(nr===null||!nr.has(g)))){o.flags|=65536,t&=-t,o.lanes|=t;var k=ry(o,l,t);np(o,k);break e}}o=o.return}while(o!==null)}by(n)}catch(_){t=_,rt===n&&n!==null&&(rt=n=n.return);continue}break}while(!0)}function wy(){var e=ol.current;return ol.current=il,e===null?il:e}function bd(){(at===0||at===3||at===2)&&(at=4),pt===null||!(Ir&268435455)&&!(Ol&268435455)||Kn(pt,wt)}function al(e,t){var n=Ae;Ae|=2;var r=wy();(pt!==e||wt!==t)&&(Nn=null,Sr(e,t));do try{p0();break}catch(i){xy(e,i)}while(!0);if(id(),Ae=n,ol.current=r,rt!==null)throw Error(ae(261));return pt=null,wt=0,at}function p0(){for(;rt!==null;)ky(rt)}function h0(){for(;rt!==null&&!Dw();)ky(rt)}function ky(e){var t=Sy(e.alternate,e,Ut);e.memoizedProps=e.pendingProps,t===null?by(e):rt=t,yd.current=null}function by(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=l0(n,t),n!==null){n.flags&=32767,rt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{at=6,rt=null;return}}else if(n=s0(n,t,Ut),n!==null){rt=n;return}if(t=t.sibling,t!==null){rt=t;return}rt=t=e}while(t!==null);at===0&&(at=5)}function yr(e,t,n){var r=Pe,i=Jt.transition;try{Jt.transition=null,Pe=1,m0(e,t,n,r)}finally{Jt.transition=i,Pe=r}return null}function m0(e,t,n,r){do fi();while(Xn!==null);if(Ae&6)throw Error(ae(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(ae(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Yw(e,o),e===pt&&(rt=pt=null,wt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||cs||(cs=!0,Cy(Hs,function(){return fi(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=Jt.transition,Jt.transition=null;var s=Pe;Pe=1;var l=Ae;Ae|=4,yd.current=null,u0(e,n),gy(n,e),Ok(Au),Vs=!!Iu,Au=Iu=null,e.current=n,c0(n),zw(),Ae=l,Pe=s,Jt.transition=o}else e.current=n;if(cs&&(cs=!1,Xn=e,ll=i),o=e.pendingLanes,o===0&&(nr=null),Hw(n.stateNode),Ft(e,Qe()),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(sl)throw sl=!1,e=Ju,Ju=null,e;return ll&1&&e.tag!==0&&fi(),o=e.pendingLanes,o&1?e===ec?lo++:(lo=0,ec=e):lo=0,dr(),null}function fi(){if(Xn!==null){var e=ng(ll),t=Jt.transition,n=Pe;try{if(Jt.transition=null,Pe=16>e?16:e,Xn===null)var r=!1;else{if(e=Xn,Xn=null,ll=0,Ae&6)throw Error(ae(331));var i=Ae;for(Ae|=4,me=e.current;me!==null;){var o=me,s=o.child;if(me.flags&16){var l=o.deletions;if(l!==null){for(var a=0;a<l.length;a++){var u=l[a];for(me=u;me!==null;){var c=me;switch(c.tag){case 0:case 11:case 15:oo(8,c,o)}var d=c.child;if(d!==null)d.return=c,me=d;else for(;me!==null;){c=me;var p=c.sibling,h=c.return;if(py(c),c===u){me=null;break}if(p!==null){p.return=h,me=p;break}me=h}}}var y=o.alternate;if(y!==null){var x=y.child;if(x!==null){y.child=null;do{var b=x.sibling;x.sibling=null,x=b}while(x!==null)}}me=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,me=s;else e:for(;me!==null;){if(o=me,o.flags&2048)switch(o.tag){case 0:case 11:case 15:oo(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,me=v;break e}me=o.return}}var m=e.current;for(me=m;me!==null;){s=me;var g=s.child;if(s.subtreeFlags&2064&&g!==null)g.return=s,me=g;else e:for(s=m;me!==null;){if(l=me,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Rl(9,l)}}catch(_){Xe(l,l.return,_)}if(l===s){me=null;break e}var k=l.sibling;if(k!==null){k.return=l.return,me=k;break e}me=l.return}}if(Ae=i,dr(),kn&&typeof kn.onPostCommitFiberRoot=="function")try{kn.onPostCommitFiberRoot(Nl,e)}catch{}r=!0}return r}finally{Pe=n,Jt.transition=t}}return!1}function Ep(e,t,n){t=ki(n,t),t=ny(e,t,1),e=tr(e,t,1),t=Tt(),e!==null&&(Po(e,1,t),Ft(e,t))}function Xe(e,t,n){if(e.tag===3)Ep(e,e,n);else for(;t!==null;){if(t.tag===3){Ep(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(nr===null||!nr.has(r))){e=ki(n,e),e=ry(t,e,1),t=tr(t,e,1),e=Tt(),t!==null&&(Po(t,1,e),Ft(t,e));break}}t=t.return}}function g0(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Tt(),e.pingedLanes|=e.suspendedLanes&n,pt===e&&(wt&n)===n&&(at===4||at===3&&(wt&130023424)===wt&&500>Qe()-xd?Sr(e,0):vd|=n),Ft(e,t)}function Ey(e,t){t===0&&(e.mode&1?(t=es,es<<=1,!(es&130023424)&&(es=4194304)):t=1);var n=Tt();e=An(e,t),e!==null&&(Po(e,t,n),Ft(e,n))}function y0(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ey(e,n)}function v0(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(ae(314))}r!==null&&r.delete(t),Ey(e,n)}var Sy;Sy=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Mt.current)Ot=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ot=!1,o0(e,t,n);Ot=!!(e.flags&131072)}else Ot=!1,Ve&&t.flags&1048576&&_g(t,Zs,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ls(e,t),e=t.pendingProps;var i=yi(t,Nt.current);di(t,n),i=fd(null,t,r,e,i,n);var o=pd();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,Pt(r)?(o=!0,Xs(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ld(t),i.updater=Al,t.stateNode=i,i._reactInternals=t,Uu(t,r,e,n),t=Vu(null,t,r,!0,o,n)):(t.tag=0,Ve&&o&&ed(t),_t(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ls(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=w0(r),e=sn(r,e),i){case 0:t=Wu(null,t,r,e,n);break e;case 1:t=pp(null,t,r,e,n);break e;case 11:t=dp(null,t,r,e,n);break e;case 14:t=fp(null,t,r,sn(r.type,e),n);break e}throw Error(ae(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:sn(r,i),Wu(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:sn(r,i),pp(e,t,r,i,n);case 3:e:{if(ly(t),e===null)throw Error(ae(387));r=t.pendingProps,o=t.memoizedState,i=o.element,Rg(e,t),tl(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=ki(Error(ae(423)),t),t=hp(e,t,r,n,i);break e}else if(r!==i){i=ki(Error(ae(424)),t),t=hp(e,t,r,n,i);break e}else for(Ht=er(t.stateNode.containerInfo.firstChild),Wt=t,Ve=!0,un=null,n=Ig(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(vi(),r===i){t=Rn(e,t,n);break e}_t(e,t,r,n)}t=t.child}return t;case 5:return Og(t),e===null&&Du(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Ru(r,i)?s=null:o!==null&&Ru(r,o)&&(t.flags|=32),sy(e,t),_t(e,t,s,n),t.child;case 6:return e===null&&Du(t),null;case 13:return ay(e,t,n);case 4:return ad(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=xi(t,null,r,n):_t(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:sn(r,i),dp(e,t,r,i,n);case 7:return _t(e,t,t.pendingProps,n),t.child;case 8:return _t(e,t,t.pendingProps.children,n),t.child;case 12:return _t(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(Js,r._currentValue),r._currentValue=s,o!==null)if(mn(o.value,s)){if(o.children===i.children&&!Mt.current){t=Rn(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=Tn(-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),zu(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(ae(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),zu(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}_t(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,di(t,n),i=en(i),r=r(i),t.flags|=1,_t(e,t,r,n),t.child;case 14:return r=t.type,i=sn(r,t.pendingProps),i=sn(r.type,i),fp(e,t,r,i,n);case 15:return iy(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:sn(r,i),Ls(e,t),t.tag=1,Pt(r)?(e=!0,Xs(t)):e=!1,di(t,n),ty(t,r,i),Uu(t,r,i,n),Vu(null,t,r,!0,e,n);case 19:return uy(e,t,n);case 22:return oy(e,t,n)}throw Error(ae(156,t.tag))};function Cy(e,t){return Zm(e,t)}function x0(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 Zt(e,t,n,r){return new x0(e,t,n,r)}function Ed(e){return e=e.prototype,!(!e||!e.isReactComponent)}function w0(e){if(typeof e=="function")return Ed(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Uc)return 11;if(e===Hc)return 14}return 2}function ir(e,t){var n=e.alternate;return n===null?(n=Zt(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 Rs(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")Ed(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Yr:return Cr(n.children,i,o,t);case Bc:s=8,i|=8;break;case fu:return e=Zt(12,n,t,i|2),e.elementType=fu,e.lanes=o,e;case pu:return e=Zt(13,n,t,i),e.elementType=pu,e.lanes=o,e;case hu:return e=Zt(19,n,t,i),e.elementType=hu,e.lanes=o,e;case Om:return Ml(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Am:s=10;break e;case Rm:s=9;break e;case Uc:s=11;break e;case Hc:s=14;break e;case Wn:s=16,r=null;break e}throw Error(ae(130,e==null?e:typeof e,""))}return t=Zt(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Cr(e,t,n,r){return e=Zt(7,e,r,t),e.lanes=n,e}function Ml(e,t,n,r){return e=Zt(22,e,r,t),e.elementType=Om,e.lanes=n,e.stateNode={isHidden:!1},e}function Na(e,t,n){return e=Zt(6,e,null,t),e.lanes=n,e}function ja(e,t,n){return t=Zt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function k0(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=la(0),this.expirationTimes=la(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=la(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Sd(e,t,n,r,i,o,s,l,a){return e=new k0(e,t,n,l,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Zt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ld(o),e}function b0(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Gr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Ny(e){if(!e)return sr;e=e._reactInternals;e:{if(Dr(e)!==e||e.tag!==1)throw Error(ae(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Pt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(ae(171))}if(e.tag===1){var n=e.type;if(Pt(n))return Ng(e,n,t)}return t}function jy(e,t,n,r,i,o,s,l,a){return e=Sd(n,r,!0,e,i,o,s,l,a),e.context=Ny(null),n=e.current,r=Tt(),i=rr(n),o=Tn(r,i),o.callback=t??null,tr(n,o,i),e.current.lanes=i,Po(e,i,r),Ft(e,r),e}function Pl(e,t,n,r){var i=t.current,o=Tt(),s=rr(i);return n=Ny(n),t.context===null?t.context=n:t.pendingContext=n,t=Tn(o,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=tr(i,t,s),e!==null&&(fn(e,i,s,o),_s(e,i,s)),s}function ul(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 Sp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Cd(e,t){Sp(e,t),(e=e.alternate)&&Sp(e,t)}function E0(){return null}var _y=typeof reportError=="function"?reportError:function(e){console.error(e)};function Nd(e){this._internalRoot=e}Fl.prototype.render=Nd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(ae(409));Pl(e,t,null,null)};Fl.prototype.unmount=Nd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ar(function(){Pl(null,e,null,null)}),t[In]=null}};function Fl(e){this._internalRoot=e}Fl.prototype.unstable_scheduleHydration=function(e){if(e){var t=og();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&&lg(e)}};function jd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Dl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Cp(){}function S0(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var u=ul(s);o.call(u)}}var s=jy(t,r,e,0,null,!1,!1,"",Cp);return e._reactRootContainer=s,e[In]=s.current,Eo(e.nodeType===8?e.parentNode:e),Ar(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var l=r;r=function(){var u=ul(a);l.call(u)}}var a=Sd(e,0,!1,null,null,!1,!1,"",Cp);return e._reactRootContainer=a,e[In]=a.current,Eo(e.nodeType===8?e.parentNode:e),Ar(function(){Pl(t,a,n,r)}),a}function zl(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=ul(s);l.call(a)}}Pl(t,s,e,i)}else s=S0(n,t,e,i,r);return ul(s)}rg=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Xi(t.pendingLanes);n!==0&&(qc(t,n|1),Ft(t,Qe()),!(Ae&6)&&(bi=Qe()+500,dr()))}break;case 13:Ar(function(){var r=An(e,1);if(r!==null){var i=Tt();fn(r,e,1,i)}}),Cd(e,1)}};Kc=function(e){if(e.tag===13){var t=An(e,134217728);if(t!==null){var n=Tt();fn(t,e,134217728,n)}Cd(e,134217728)}};ig=function(e){if(e.tag===13){var t=rr(e),n=An(e,t);if(n!==null){var r=Tt();fn(n,e,t,r)}Cd(e,t)}};og=function(){return Pe};sg=function(e,t){var n=Pe;try{return Pe=e,t()}finally{Pe=n}};Su=function(e,t,n){switch(t){case"input":if(yu(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=Tl(r);if(!i)throw Error(ae(90));Pm(r),yu(r,i)}}}break;case"textarea":Dm(e,n);break;case"select":t=n.value,t!=null&&li(e,!!n.multiple,t,!1)}};qm=wd;Km=Ar;var C0={usingClientEntryPoint:!1,Events:[Do,Jr,Tl,Wm,Vm,wd]},Ui={findFiberByHostInstance:wr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},N0={bundleType:Ui.bundleType,version:Ui.version,rendererPackageName:Ui.rendererPackageName,rendererConfig:Ui.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Mn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Xm(e),e===null?null:e.stateNode},findFiberByHostInstance:Ui.findFiberByHostInstance||E0,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 ds=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ds.isDisabled&&ds.supportsFiber)try{Nl=ds.inject(N0),kn=ds}catch{}}qt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=C0;qt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!jd(t))throw Error(ae(200));return b0(e,t,null,n)};qt.createRoot=function(e,t){if(!jd(e))throw Error(ae(299));var n=!1,r="",i=_y;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Sd(e,1,!1,null,null,n,!1,r,i),e[In]=t.current,Eo(e.nodeType===8?e.parentNode:e),new Nd(t)};qt.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(ae(188)):(e=Object.keys(e).join(","),Error(ae(268,e)));return e=Xm(t),e=e===null?null:e.stateNode,e};qt.flushSync=function(e){return Ar(e)};qt.hydrate=function(e,t,n){if(!Dl(t))throw Error(ae(200));return zl(null,e,t,!0,n)};qt.hydrateRoot=function(e,t,n){if(!jd(e))throw Error(ae(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",s=_y;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=jy(t,null,e,1,n??null,i,!1,o,s),e[In]=t.current,Eo(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 Fl(t)};qt.render=function(e,t,n){if(!Dl(t))throw Error(ae(200));return zl(null,e,t,!1,n)};qt.unmountComponentAtNode=function(e){if(!Dl(e))throw Error(ae(40));return e._reactRootContainer?(Ar(function(){zl(null,null,e,!1,function(){e._reactRootContainer=null,e[In]=null})}),!0):!1};qt.unstable_batchedUpdates=wd;qt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Dl(n))throw Error(ae(200));if(e==null||e._reactInternals===void 0)throw Error(ae(38));return zl(e,t,n,!1,r)};qt.version="18.3.1-next-f1338f8080-20240426";function $y(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE($y)}catch(e){console.error(e)}}$y(),$m.exports=qt;var j0=$m.exports,Ty,Np=j0;Ty=Np.createRoot,Np.hydrateRoot;const Rr=6;function Io(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 Ly(e){const[t,n]=O.useState(0);return O.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 $i(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 _a({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 rc({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 Pn({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 _0(e){return f.jsxs(Pn,{...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 $0(e){return f.jsxs(Pn,{...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(Pn,{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 Iy({size:e=14,...t}){return f.jsxs(Pn,{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 T0({size:e=14,...t}){return f.jsxs(Pn,{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 L0({size:e=14,...t}){return f.jsx(Pn,{size:e,...t,children:f.jsx("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"})})}function I0({size:e=14,...t}){return f.jsx(Pn,{size:e,...t,children:f.jsx("polyline",{points:"20 6 9 17 4 12"})})}function _d(e){return f.jsxs(Pn,{...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 $d({size:e=14,...t}){return f.jsx(Pn,{size:e,...t,children:f.jsx("polyline",{points:"6 9 12 15 18 9"})})}function Ao({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 A0=O.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 nn(e,t){try{const n=localStorage.getItem(e);return n===null?t:JSON.parse(n)}catch{return t}}function $t(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}function R0(e){try{localStorage.removeItem(e)}catch{}}function jp(e){const[t,n]=O.useState(()=>{const r=nn(e,[]);return new Set(Array.isArray(r)?r:[])});return O.useEffect(()=>$t(e,[...t]),[e,t]),[t,n]}function ic(e,t,n){try{return localStorage.getItem(`${e}.${t}`)??n}catch{return n}}function oc(e,t,n){try{localStorage.setItem(`${e}.${t}`,n)}catch{}}function Td(e){const t=nn(e,[]);return Array.isArray(t)?t:[]}function Ld(e,t){t.length?$t(e,t):R0(e)}const Id=()=>`${Date.now().toString(36)}${Math.random().toString(36).slice(2,7)}`,Ay={open:"未対応",partial:"一部解消",updated:"コメント後に変更あり",resolved:"解消済み?"};function Bl(e){return["以下は、git の差分のレビュービューア diffshape で付けたレビューコメントです。各指摘に対応してください。",`リポジトリ: ${e.repoRoot}`,`比較: ${e.targetLabel} と ${e.baseLabel} の差分`]}function Ad(e){const[t,n]=O.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:Ay[e.state]}),e.ai&&f.jsx("span",{className:"ds-comment-ai",title:`${e.ai} のレビューが付けたコメント`,children:"AI"}),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 Rd=O.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(A0,{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 ao(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 O0={added:"A",modified:"M",removed:"D",renamed:"R",unchanged:""},_p={added:"追加",modified:"変更",removed:"削除",renamed:"名前の変更",unchanged:"変更なし"};function Ei({status:e,small:t=!1,title:n}){const r=n===null?void 0:n??_p[e];return f.jsx("span",{className:`ds-st ${e}${t?" small":""}`,title:r,"aria-label":_p[e],children:O0[e]})}const $p=[["added","追加"],["modified","変更"],["removed","削除"]];function Od({stats:e,unit:t,showZero:n=!1}){const r=$p.filter(([o])=>n||e[o]>0);if(r.length===0)return null;const i=$p.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(Ei,{status:o,small:!0,title:null}),e[o]]},o))})}function Li({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 Md({children:e}){return f.jsx("header",{className:"ds-bar",children:e})}function Pd({children:e}){return f.jsx("span",{className:"ds-bar-counts",children:e})}function Si({children:e}){return f.jsx("span",{className:"ds-bar-label",children:e})}function Fd(){return f.jsx("span",{className:"ds-bar-sep"})}function Dd(){return f.jsx("span",{className:"ds-bar-spacer"})}function zd({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}%`}})})]})}const M0={review:{agent:"",by:{}},fix:{agent:"",by:{}},scope:"current"},Hr=e=>e&&typeof e=="object"?e:{},$a=e=>typeof e=="string"?e:"";function P0(e){const t=r=>({agent:$a(Hr(r).agent),by:Object.fromEntries(Object.entries(Hr(Hr(r).by)).map(([i,o])=>[i,{model:$a(Hr(o).model),effort:$a(Hr(o).effort)}]))}),n=Hr(e);return{review:t(n.review),fix:t(n.fix),scope:n.scope==="all"?"all":"current"}}const Ry=(e,t)=>{var n;return((n=e.models.find(r=>r.id===t))==null?void 0:n.efforts)??e.defaultEfforts};function sc(e,t){const n=t.find(s=>s.id===e.agent)??t[0];if(!n)return null;const r=e.by[n.id]??{model:"",effort:""},i=n.models.some(s=>s.id===r.model)?r.model:"",o=Ry(n,i).includes(r.effort)?r.effort:"";return{agent:n,model:i,effort:o}}const Ta=(e,t,n)=>({agent:t,by:{...e.by,[t]:{...e.by[t]??{model:"",effort:""},...n}}}),F0=e=>e.filter(t=>t.comments.trim()).flatMap(t=>[`## ${t.description}`,"",t.comments.trimEnd(),""]);function Oy(e,t){return[...Bl(e),"",...F0(t)].join(`
63
+ `).trimEnd()+`
64
+ `}function D0(e,t){return[Oy(e,t).trimEnd(),"","## 進め方","","- 作業ディレクトリのファイルを直接編集して、各指摘に対応してください。","- コミットやステージ(git add)はしないでください。","- 指摘と関係のない変更はしないでください。","- 最後に、何を変えたかを日本語で短く報告してください。対応しなかった指摘があれば、その理由も書いてください。",""].join(`
65
+ `)}function z0(e){return e.baseRev===null?"`git diff`(ステージ済みの状態と作業ディレクトリの差分)":`\`git diff ${e.baseRev}\`(まだ git に追加していない新しいファイルはこの差分に出ません。下の一覧にあるものは直接読んでください)`}function B0(e,t){const n=["あなたはコードレビュアーです。git の差分のレビュービューア diffshape から呼ばれています。次の変更をレビューして、指摘をコメントとして返してください。",`リポジトリ: ${e.repoRoot}`,`比較: ${e.targetLabel} と ${e.baseLabel} の差分`,`差分の見方: ${z0(e)}`,"","## 決まり","","- 読むだけにしてください。ファイルの変更、コミット、ステージはしないでください。","- 直す価値のある指摘だけを書いてください(バグ、考慮漏れ、既存の作りとの食い違い、危険な変更など)。好みの問題や細かい書き方の指摘は要りません。問題がなければ comments は空の配列にしてください。","- 1つの指摘を1つのコメントにしてください。body は日本語で、何が問題か、どう直すとよいかを具体的に書いてください。","- 「既に付いているコメント」と同じ指摘は書かないでください。","- 各コメントの module には、下の見出しにある module の値を入れてください。コメントの付け方は見出しごとに違います。使わない項目は null にしてください。",""];for(const r of t)n.push(`## ${r.description}(module: "${r.id}")`,"",(r.review??"").trimEnd(),""),r.comments.trim()&&n.push("既に付いているコメント:","",r.comments.trimEnd(),"");return n.join(`
66
+ `).trimEnd()+`
67
+ `}function U0(e){const t=Math.max(0,Math.floor(e/1e3));return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`}function H0(e,t){if(e===0&&t===0)return"指摘はありませんでした";const n=t?`(${t} 件は指している場所が見つからず、追加していません)`:"";return e?`コメントを ${e} 件追加しました${n}`:`コメントは追加していません${n}`}const W0=e=>e.split(/(`[^`\n]*`)/).map((t,n)=>n%2?t:t.replace(/\[([^\]\n]+)\]\([^)\n]*\)/g,"$1")).join(""),Tp="diffshape.ai",fs="diffshape.ai.seen",Lp={review:"レビュー",fix:"修正"};async function La(e,t){const n=await fetch(e,t===void 0?void 0:{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw new Error(await n.text());return await n.json()}const Ip=e=>e instanceof Error?e.message:String(e);function V0({info:e,modules:t,current:n,reports:r,acks:i,onBatch:o,onReload:s,onFixing:l,flash:a}){var re,ce;const[u,c]=O.useState(null),[d,p]=O.useState(!1),[h,y]=O.useState(()=>P0(nn(Tp,M0))),[x,b]=O.useState(null),[v,m]=O.useState(null),[g,k]=O.useState(null),_=O.useRef(!1),E=oe=>{y(oe),$t(Tp,oe)},$=O.useCallback(()=>La("/api/agent").then(c,()=>{}),[]);O.useEffect(()=>void $(),[$]);const C=(u==null?void 0:u.job)??null,T=(C==null?void 0:C.status)==="running";O.useEffect(()=>{if(!T)return;const oe=window.setTimeout(()=>void $(),1e3);return()=>window.clearTimeout(oe)},[T,u,$]),O.useEffect(()=>l(T&&(C==null?void 0:C.kind)==="fix"),[T,C==null?void 0:C.kind,l]);const w=O.useMemo(()=>t.filter(oe=>{var de;return(de=r[oe.id])==null?void 0:de.review}),[t,r]),A=oe=>h.scope==="all"?oe:oe.filter(de=>de===n),I=A(w),P=A(t.filter(oe=>{var de;return(((de=r[oe.id])==null?void 0:de.open)??0)>0})),z=P.reduce((oe,de)=>oe+r[de.id].open,0),K=oe=>{var de,we,je;return{id:oe.id,description:oe.description,review:(we=(de=r[oe.id])==null?void 0:de.review)==null?void 0:we.call(de),comments:(((je=r[oe.id])==null?void 0:je.open)??0)>0?r[oe.id].prompt():""}},U=(u==null?void 0:u.agents)??[],q={review:sc(h.review,U),fix:sc(h.fix,U)},D=async(oe,de)=>{const we=q[oe];if(we){b(null),m(null);try{const je=await La("/api/agent/start",{kind:oe,agent:we.agent.id,prompt:de,model:we.model,effort:we.effort});c(N=>N&&{...N,job:je})}catch(je){_.current=!1,b(Ip(je))}}},W=oe=>{const de=I.map(K).filter(we=>{var je;return(je=we.review)==null?void 0:je.trim()});if(de.length===0)return b("レビューする変更がありません");_.current=oe,D("review",B0(e,de))},S=()=>void D("fix",D0(e,P.map(K))),X=O.useRef(S);X.current=S;const H=()=>{_.current=!1,La("/api/agent/cancel",{}).then($,oe=>b(Ip(oe)))},j=O.useRef(nn(fs,""));O.useEffect(()=>{var G,ee;if(!C||C.status==="running")return;const oe=`${C.id}:${C.startedAt}`;if(j.current===oe)return;j.current=oe;const de=((G=U.find(he=>he.id===C.agent))==null?void 0:G.label)??C.agent,we=he=>{m(he),a(he)};if(C.kind==="review"){const he=_.current;if(_.current=!1,C.status!=="done")return $t(fs,oe),we(C.status==="cancelled"?"レビューを中止しました":`レビューできませんでした: ${C.error??""}`);const fe=C.comments??[],pe=w.map(Te=>Te.id);if(pe.length===0){j.current="",_.current=he;return}$t(fs,oe),o({seq:C.startedAt,agent:de,items:fe}),k({seq:C.startedAt,ids:pe,other:fe.filter(Te=>!pe.includes(Te.module)).length,chain:he});return}$t(fs,oe);const je=((ee=C.changedFiles)==null?void 0:ee.length)??0,N=C.status==="done"?"修正が終わりました":C.status==="cancelled"?"修正を中止しました":`修正できませんでした: ${C.error??""}`;(je||C.status==="done"?s():Promise.resolve()).then(()=>we(`${N}(変更 ${je} ファイル)`))},[C,U,w,o,s,a]);const[M,L]=O.useState(0);O.useEffect(()=>{if(!g)return;const oe=window.setTimeout(()=>L(g.seq),1e4);return()=>window.clearTimeout(oe)},[g]),O.useEffect(()=>{if(!g)return;const oe=g.ids.filter(N=>{var G;return((G=i[N])==null?void 0:G.seq)===g.seq});if(oe.length<g.ids.length&&M!==g.seq)return;k(null);const de=oe.reduce((N,G)=>N+i[G].placed,0),we=oe.reduce((N,G)=>N+i[G].dropped,0)+g.other,je=H0(de,we);if(g.chain&&z>0)a(je),X.current();else{const N=g.chain?"。直すコメントがないので、修正はしていません":"";m(je+N),a(je+N)}},[g,i,M,z,a]);const F=O.useRef(null);if(O.useEffect(()=>{if(!d)return;const oe=we=>{F.current&&!F.current.contains(we.target)&&p(!1)},de=we=>{we.key==="Escape"&&p(!1)};return document.addEventListener("mousedown",oe),document.addEventListener("keydown",de),()=>{document.removeEventListener("mousedown",oe),document.removeEventListener("keydown",de)}},[d]),!(u!=null&&u.available))return null;const V=T||!!g,Z=C&&T?U0(Date.now()-C.startedAt):"",te=I.length===0?h.scope==="current"?`${n.title}の画面は、まだ AI レビューに対応していません`:"AI レビューに対応した画面がありません":void 0,le=z===0?"未対応のコメントがありません":void 0;return f.jsxs("div",{className:"ai",ref:F,children:[f.jsxs("button",{className:`ds-btn${d?" on":""}`,onClick:()=>p(oe=>!oe),"aria-expanded":d,title:"AI にレビューや修正をさせる(Claude Code / Codex)",children:[f.jsx(L0,{size:13,className:T?"ai-pulse":void 0}),T&&C?`AI ${Lp[C.kind]}中 ${Z}`:"AI"]}),d&&f.jsxs("div",{className:"ai-panel",role:"dialog","aria-label":"AI レビューと修正",children:[t.length>1&&f.jsxs("div",{className:"ai-row",children:[f.jsx("span",{className:"ai-label",children:"範囲"}),f.jsx("div",{className:"ds-seg",role:"radiogroup","aria-label":"範囲",children:[["current",`この画面(${n.title})`],["all","すべて"]].map(([oe,de])=>f.jsx("button",{role:"radio","aria-checked":h.scope===oe,className:h.scope===oe?"on":"",disabled:V,onClick:()=>E({...h,scope:oe}),children:de},oe))})]}),f.jsx(Ap,{label:"レビュー",agents:U,choice:h.review,disabled:V,onChange:oe=>E({...h,review:oe})}),f.jsx(Ap,{label:"修正",agents:U,choice:h.fix,disabled:V,onChange:oe=>E({...h,fix:oe})}),f.jsxs("div",{className:"ai-actions",children:[f.jsx("button",{className:"ds-btn",disabled:V||!!te,title:te??"差分を読んでコメントを付けます(ファイルは変えません)",onClick:()=>W(!1),children:"レビュー"}),f.jsxs("button",{className:"ds-btn",disabled:V||!!le,title:le??"未対応のコメントに対応するよう、作業ディレクトリのファイルを編集します",onClick:S,children:["修正",z>0?`(${z})`:""]}),f.jsx("button",{className:"ds-btn ds-btn-primary",disabled:V||!!te,title:te??"レビューして、付いたコメントを続けて修正します",onClick:()=>W(!0),children:"レビューして修正"})]}),x&&f.jsx("div",{className:"ai-error",children:x}),T&&C&&f.jsxs("div",{className:"ai-run",children:[f.jsxs("div",{className:"ai-run-head",children:[f.jsxs("span",{children:[((re=U.find(oe=>oe.id===C.agent))==null?void 0:re.label)??C.agent," が",Lp[C.kind],"中… ",Z]}),f.jsx("span",{className:"shell-spacer"}),f.jsx("button",{className:"ds-btn",onClick:H,children:"中止"})]}),f.jsx(q0,{lines:C.log})]}),!T&&g&&f.jsx("div",{className:"ai-outcome",children:"コメントを置いています…"}),!V&&v&&f.jsxs("div",{className:"ai-outcome",children:[f.jsx("div",{children:v}),(C==null?void 0:C.kind)==="fix"&&C.text&&f.jsx("div",{className:"ai-said",children:W0(C.text)}),(C==null?void 0:C.kind)==="fix"&&C.snapshot&&(((ce=C.changedFiles)==null?void 0:ce.length)??0)>0&&f.jsx(K0,{command:`diffshape . ${C.snapshot}`})]})]})]})}function Ap({label:e,agents:t,choice:n,disabled:r,onChange:i}){var l;const o=sc(n,t);if(!o)return null;const s=Ry(o.agent,o.model);return f.jsxs("div",{className:"ai-row",children:[f.jsx("span",{className:"ai-label",children:e}),f.jsx("select",{className:"ds-select","aria-label":`${e}のエージェント`,value:o.agent.id,disabled:r||t.length<2,onChange:a=>i(Ta(n,a.target.value,{})),children:t.map(a=>f.jsx("option",{value:a.id,title:a.version?`${a.label} ${a.version}`:a.label,children:a.label},a.id))}),f.jsxs("select",{className:"ds-select ai-model","aria-label":`${e}のモデル`,value:o.model,disabled:r||o.agent.models.length===0,title:((l=o.agent.models.find(a=>a.id===o.model))==null?void 0:l.description)??`${o.agent.label}${o.agent.version?` ${o.agent.version}`:""} の設定どおり`,onChange:a=>i(Ta(n,o.agent.id,{model:a.target.value})),children:[f.jsx("option",{value:"",children:"既定のモデル"}),o.agent.models.map(a=>f.jsx("option",{value:a.id,children:a.label},a.id))]}),f.jsxs("select",{className:"ds-select","aria-label":`${e}の Effort`,value:o.effort,disabled:r||s.length===0,title:"考える深さ(Effort)",onChange:a=>i(Ta(n,o.agent.id,{effort:a.target.value})),children:[f.jsx("option",{value:"",children:"既定の Effort"}),s.map(a=>f.jsx("option",{value:a,children:a},a))]})]})}function q0({lines:e}){const t=O.useRef(null);return O.useEffect(()=>{t.current&&(t.current.scrollTop=t.current.scrollHeight)},[e.length]),f.jsx("div",{className:"ai-log",ref:t,children:e.length===0?f.jsx("div",{className:"shell-muted",children:"開始しています…"}):e.map((n,r)=>f.jsx("div",{children:n},r))})}function K0({command:e}){const[t,n]=O.useState(!1);return f.jsxs("div",{className:"ai-snapshot",children:[f.jsx("span",{className:"shell-muted",children:"AI の変更だけを見る:"}),f.jsx("code",{children:e}),f.jsx("button",{className:"ds-link",onClick:()=>void $i(e).then(()=>{n(!0),window.setTimeout(()=>n(!1),1600)}),children:t?"コピーしました":"コピー"})]})}function Ul(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 Os=e=>e.diff.tables.length+e.diff.values.length+e.diff.enums.length+e.diff.domains.length,My=e=>`カラム・制約・インデックス:追加 ${e.added}・削除 ${e.removed}・変更 ${e.modified}`;function Py(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 G0(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 Y0(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 Hl(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 Fy(e){return e.source==="check"?{label:`${e.table}.${e.column}`,table:e.table}:{label:e.type??""}}function lc(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 uo(e){return`${e.method?`USING ${e.method} `:""}(${e.columns.join(", ")})${e.include?` INCLUDE (${e.include.join(", ")})`:""}${e.where?` WHERE ${e.where}`:""}`}function X0(e){return`${e.unique?"UNIQUE ":""}INDEX ${uo(e)}`}function Q0(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 Or=e=>`${e.kind}:${e.table??""}:${e.name}`,cl=e=>({kind:"table",table:e,name:e});function Dy(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 Ms={table:"テーブル",column:"カラム",constraint:"制約",index:"インデックス",value:"値",type:"型"};function dl(e){return e.kind==="table"||e.kind==="type"?`${Ms[e.kind]} ${e.name}`:e.kind==="column"||e.kind==="value"?`${Ms[e.kind]} ${e.table}.${e.name}`:`${Ms[e.kind]} ${e.table} の ${e.name}`}function Z0(e){return e.kind==="table"?"テーブル全体":e.kind==="type"?e.name:`${Ms[e.kind]} ${e.name}`}const Gt={added:"今回追加",removed:"今回削除",modified:"今回変更"},Ia=e=>lc(e).filter(t=>t.key!=="notNull"||e.notNull).map(t=>t.text).join(" "),Aa=e=>X0(e);function J0(e){if(e.status!=="modified")return Gt[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("コメント"),`${Gt.modified}(${t.join("、")})`}function Bo(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?J0(r):void 0;case"column":{const i=r==null?void 0:r.columns.find(o=>o.name===t.name);return i?i.status!=="modified"?`${Gt[i.status]}: ${Ia(i.after??i.before)}`:`${Gt.modified}: ${Ia(i.before)} → ${Ia(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"?`${Gt[i.status]}: ${(i.after??i.before).definition}`:`${Gt.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"?`${Gt[i.status]}: ${Aa(i.after??i.before)}`:`${Gt.modified}: ${Aa(i.before)} → ${Aa(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?Rp(i):void 0}case"type":{const i=n.enums.find(l=>l.name===t.name);if(i){if(i.status!=="modified")return`${Gt[i.status]}: ENUM (${(i.after??i.before).values.join(", ")})`;const l=n.values.find(a=>a.type===t.name);return l?`値の変更: ${Rp(l)}`:Gt.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"?`${Gt[o.status]}: DOMAIN ${s(o.after??o.before)}`:`${Gt.modified}: ${s(o.before)} → ${s(o.after)}`}}}function Rp(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 zy(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[Dy(t)]}function By(e,t){const n=e.locations[Dy(t)];return!!n&&!n.base}function pi(e,t){const n=Bo(e,t.target);return!By(e,t.target)&&!n||t.snapshot!==void 0&&n===void 0?"resolved":n!==t.snapshot?"updated":"open"}function Uy(e,t,n){return{id:Id(),target:t,body:n,createdAt:Date.now(),snapshot:Bo(e,t)}}const eb=e=>e?e.base?`比較元の ${e.file}:${e.line}(変更後にはありません)`:`${e.file}:${e.line}`:void 0;function Hy(e,t,n={}){const r=n.includeResolved?t:t.filter(o=>pi(e,o)!=="resolved"),i=[...n.header===!1?[]:[...Bl({repoRoot:e.repoRoot,targetLabel:e.target.label,baseLabel:e.base.label}),"対象: DB スキーマ(dbshape)"],`スキーマの SQL: ${Ul(e.schemaFrom)}`,""];return r.forEach((o,s)=>{const l=pi(e,o),a=Bo(e,o.target);i.push(`${s+1}. ${dl(o.target)}${a?`(${a})`:"(変更なし)"}${l==="resolved"?"(解消済み?)":""}`);const u=eb(zy(e,o.target));u&&i.push(` 定義: ${u}`),l==="updated"&&i.push(` コメントしたときは: ${o.snapshot??"変更なし"}`),i.push(` コメント: ${o.body.trim().replace(/\n/g,`
68
+ `)}`),i.push("")}),{text:i.join(`
69
+ `).trimEnd()+`
70
+ `,included:r.length,skipped:t.length-r.length}}const Wy="dbshape.comments:",tb=e=>Td(Wy+e),Op=(e,t)=>Ld(Wy+e,t),Vy=O.createContext(null),Bd=()=>O.useContext(Vy),nb=Ay;function lr({target:e,label:t}){const n=Bd();if(!n)return null;const r=Or(e),i=n.comments.filter(o=>Or(o.target)===r).length;return f.jsxs("button",{className:`cbtn ${i?"has":""}`,onClick:o=>{o.stopPropagation(),n.compose(e)},title:`${t??Z0(e)} にコメントする`,"aria-label":"コメントする",children:[f.jsx(Ti,{size:12}),i>0&&f.jsx("span",{className:"cnum",children:i})]})}function On({target:e,colSpan:t}){const n=Bd();if(!n)return null;const r=Or(e),i=n.comments.filter(s=>Or(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(On,{target:e})})}):f.jsxs("div",{className:"thread",id:`c-${r}`,children:[i.map(s=>n.editing===s.id?f.jsx(Mp,{initial:s.body,onSave:l=>n.update(s.id,l),onCancel:()=>n.edit(null)},s.id):f.jsx(rb,{c:s},s.id)),o&&f.jsx(Mp,{initial:"",onSave:s=>n.add(e,s),onCancel:()=>n.compose(null)})]})}function rb({c:e}){const t=Bd(),n=pi(t.data,e);return f.jsx(Ad,{body:e.body,state:n,ai:e.ai,stateTitle:n==="updated"?`コメントしたときは: ${e.snapshot??"変更なし"}`:n==="resolved"?"対象がなくなったか、比較元と同じに戻りました":void 0,onCopy:()=>$i(Hy(t.data,[e],{includeResolved:!0}).text),onEdit:()=>t.edit(e.id),onDelete:()=>t.remove(e.id)})}function Mp({initial:e,onSave:t,onCancel:n}){const[r,i]=O.useState(e);return f.jsx(Rd,{autoFocus:!0,editing:e!=="",value:r,placeholder:"気になる点や直してほしいこと",onChange:i,onSave:()=>r.trim()&&t(r.trim()),onCancel:n})}function ib({table:e,reviewed:t,onReviewed:n,known:r,onJump:i,highlighted:o,alwaysOpen:s}){const[l,a]=O.useState(!t),[u,c]=O.useState(!1),d=Py(e),p=G0(Y0(e)),h=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(!h),"aria-label":h?"たたむ":"開く","aria-expanded":h,children:h?"▾":"▸"}),f.jsxs("span",{className:"tname",children:[f.jsxs("span",{className:"schema",children:[e.schema,"."]}),e.table]}),f.jsx(Li,{stats:d,title:My(d)}),f.jsx("span",{className:"file",title:e.file,children:e.file}),f.jsx(lr,{target:cl(e.name),label:"テーブル全体"}),f.jsxs("label",{className:"reviewed-box",title:"確認済みにすると、図と一覧で薄く表示します(テーブルがまた変わると外れます)",children:[f.jsx("input",{type:"checkbox",checked:t,onChange:y=>{n(y.target.checked),a(!y.target.checked)}}),"確認済み"]})]}),h&&f.jsxs("div",{className:"card-body",children:[f.jsx(On,{target:cl(e.name)}),e.comment&&f.jsx(ub,{before:e.comment.before,after:e.comment.after,status:e.status}),e.status==="modified"?f.jsxs(f.Fragment,{children:[f.jsx(Hi,{title:"カラム",empty:e.columns.length===0,children:f.jsx("table",{className:"cols",children:f.jsx("tbody",{children:e.columns.map(y=>f.jsx(sb,{table:e.name,change:y,badges:p.get(y.name),known:r,onJump:i},y.name))})})}),f.jsx(Hi,{title:"制約",empty:e.constraints.length===0,children:e.constraints.map(y=>f.jsx(lb,{table:e.name,change:y,known:r,onJump:i},y.name))}),f.jsx(Hi,{title:"インデックス",empty:e.indexes.length===0,children:e.indexes.map(y=>f.jsx(ab,{table:e.name,change:y},y.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(y=>f.jsx(ac,{table:e.name,c:y,badges:p.get(y.name),known:r,onJump:i},y.name))})}),e.unchanged.constraints.map(y=>f.jsx(Pp,{table:e.name,c:y,known:r,onJump:i},y.name)),e.unchanged.indexes.map(y=>f.jsx(Fp,{table:e.name,i:y},y.name))]})]})]}):f.jsxs(f.Fragment,{children:[f.jsx("table",{className:"cols",children:f.jsx("tbody",{children:e.columns.map(y=>f.jsx(ac,{table:e.name,c:y.after??y.before,badges:p.get(y.name),known:r,onJump:i},y.name))})}),e.constraints.length>0&&f.jsx(Hi,{title:"制約",children:e.constraints.map(y=>f.jsx(Pp,{table:e.name,c:y.after??y.before,known:r,onJump:i},y.name))}),e.indexes.length>0&&f.jsx(Hi,{title:"インデックス",children:e.indexes.map(y=>f.jsx(Fp,{table:e.name,i:y.after??y.before},y.name))})]})]})]})}function Hi(e){return e.empty?null:f.jsxs("div",{className:"section",children:[f.jsx("div",{className:"section-title",children:e.title}),e.children]})}const qy={added:"+",removed:"−",modified:"~"};function Ky({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(ob,{table:r.table,columns:r.columns,known:t,onJump:n},r.table))]}):null}function ob({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 Gy=(e,t)=>({kind:"column",table:e,name:t});function ac({table:e,c:t,badges:n,known:r,onJump:i}){const o=Gy(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(Ky,{b:n,known:r,onJump:i}),(n==null?void 0:n.values)&&f.jsx(Yy,{values:n.values}),t.comment&&f.jsx("span",{className:"comment",children:t.comment}),f.jsx(lr,{target:o})]})]}),f.jsx(On,{target:o,colSpan:3})]})}function Yy({values:e}){return f.jsx("span",{className:"chips",children:e.map(t=>f.jsx("span",{className:"chip",children:t},t))})}function sb({table:e,change:t,badges:n,known:r,onJump:i}){const o=Gy(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:qy[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(Ky,{b:n,known:r,onJump:i}),t.status==="added"&&(n==null?void 0:n.values)&&f.jsx(Yy,{values:n.values}),c.comment&&f.jsx("span",{className:"comment",children:c.comment}),f.jsx(lr,{target:o})]})]}),f.jsx(On,{target:o,colSpan:3})]})}const s=new Map(lc(t.before).map(c=>[c.key,c.text])),l=lc(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 h;const d=(h=l.find(y=>y.key===c))==null?void 0:h.text,p=s.get(c);return a.has(c)?f.jsxs("span",{className:"attr change",children:[p!==void 0&&f.jsx("del",{children:p}),p!==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(lr,{target:o})]})]}),f.jsx(On,{target:o,colSpan:3})]})}const Xy={primary:"PK",unique:"UNIQUE",check:"CHECK",foreign:"FK",exclude:"EXCLUDE"};function Qy({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 Uo(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?qy[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(lr,{target:e.target})]}),e.target&&f.jsx(On,{target:e.target})]})}const Wl=(e,t,n)=>({kind:e,table:t,name:n});function Pp({table:e,c:t,known:n,onJump:r}){var i;return f.jsxs(Uo,{kind:Xy[t.kind],name:t.name,target:Wl("constraint",e,t.name),children:[f.jsx("code",{children:t.definition}),f.jsx(Qy,{table:(i=t.references)==null?void 0:i.table,known:n,onJump:r})]})}function lb({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)?Hl(t.before.values.values,t.after.values.values):null;return f.jsxs(Uo,{status:t.status,kind:Xy[t.kind],name:t.name,target:Wl("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(Qy,{table:(a=i.references)==null?void 0:a.table,known:n,onJump:r})]})}function Fp({table:e,i:t}){return f.jsx(Uo,{kind:t.unique?"UNIQUE":"INDEX",name:t.name,target:Wl("index",e,t.name),children:f.jsx("code",{children:uo(t)})})}function ab({table:e,change:t}){const n=t.after??t.before;return f.jsx(Uo,{status:t.status,kind:n.unique?"UNIQUE":"INDEX",name:t.name,target:Wl("index",e,t.name),children:t.status==="modified"?f.jsxs("span",{className:"change-block",children:[f.jsxs("del",{children:[t.before.unique?"UNIQUE ":"",uo(t.before)]}),f.jsxs("ins",{children:[t.after.unique?"UNIQUE ":"",uo(t.after)]})]}):f.jsx("code",{children:uo(n)})})}function ub({before:e,after:t,status:n}){return n!=="modified"?f.jsx("div",{className:"table-comment",children:t??e}):f.jsx(Uo,{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 cb(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(pb,{kind:e.type.kind,change:e.type.change}),e.selection.kind==="table"&&(e.change?f.jsx(ib,{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(db,{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(fb,{v:t},n))]})]})]})}function db({t:e}){const t=cl(e.name);return f.jsxs("div",{className:"unchanged-table",children:[f.jsxs("p",{className:"muted unchanged-note",children:["このテーブルは変更されていません。",f.jsx(lr,{target:t,label:"テーブル全体"})]}),f.jsx(On,{target:t}),f.jsx("table",{className:"cols",children:f.jsx("tbody",{children:e.columns.map(n=>f.jsx(ac,{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 fb({v:e}){const t=Fy(e),n=Hl(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(lr,{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(On,{target:r})]})}function pb({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(lr,{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:Hl(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(On,{target:o})]})}var Fe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),gn=Fe((e,t)=>{var n=Object.defineProperty,r=(P,z,K)=>z in P?n(P,z,{enumerable:!0,configurable:!0,writable:!0,value:K}):P[z]=K,i=(P,z)=>()=>(z||P((z={exports:{}}).exports,z),z.exports),o=(P,z,K)=>r(P,typeof z!="symbol"?z+"":z,K),s=i((P,z)=>{var K="\0",U="\0",q="",D=class{constructor(M){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"),M&&(this._isDirected=Object.hasOwn(M,"directed")?M.directed:!0,this._isMultigraph=Object.hasOwn(M,"multigraph")?M.multigraph:!1,this._isCompound=Object.hasOwn(M,"compound")?M.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[U]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(M){return this._label=M,this}graph(){return this._label}setDefaultNodeLabel(M){return this._defaultNodeLabelFn=M,typeof M!="function"&&(this._defaultNodeLabelFn=()=>M),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var M=this;return this.nodes().filter(L=>Object.keys(M._in[L]).length===0)}sinks(){var M=this;return this.nodes().filter(L=>Object.keys(M._out[L]).length===0)}setNodes(M,L){var F=arguments,V=this;return M.forEach(function(Z){F.length>1?V.setNode(Z,L):V.setNode(Z)}),this}setNode(M,L){return Object.hasOwn(this._nodes,M)?(arguments.length>1&&(this._nodes[M]=L),this):(this._nodes[M]=arguments.length>1?L:this._defaultNodeLabelFn(M),this._isCompound&&(this._parent[M]=U,this._children[M]={},this._children[U][M]=!0),this._in[M]={},this._preds[M]={},this._out[M]={},this._sucs[M]={},++this._nodeCount,this)}node(M){return this._nodes[M]}hasNode(M){return Object.hasOwn(this._nodes,M)}removeNode(M){var L=this;if(Object.hasOwn(this._nodes,M)){var F=V=>L.removeEdge(L._edgeObjs[V]);delete this._nodes[M],this._isCompound&&(this._removeFromParentsChildList(M),delete this._parent[M],this.children(M).forEach(function(V){L.setParent(V)}),delete this._children[M]),Object.keys(this._in[M]).forEach(F),delete this._in[M],delete this._preds[M],Object.keys(this._out[M]).forEach(F),delete this._out[M],delete this._sucs[M],--this._nodeCount}return this}setParent(M,L){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(L===void 0)L=U;else{L+="";for(var F=L;F!==void 0;F=this.parent(F))if(F===M)throw new Error("Setting "+L+" as parent of "+M+" would create a cycle");this.setNode(L)}return this.setNode(M),this._removeFromParentsChildList(M),this._parent[M]=L,this._children[L][M]=!0,this}_removeFromParentsChildList(M){delete this._children[this._parent[M]][M]}parent(M){if(this._isCompound){var L=this._parent[M];if(L!==U)return L}}children(M=U){if(this._isCompound){var L=this._children[M];if(L)return Object.keys(L)}else{if(M===U)return this.nodes();if(this.hasNode(M))return[]}}predecessors(M){var L=this._preds[M];if(L)return Object.keys(L)}successors(M){var L=this._sucs[M];if(L)return Object.keys(L)}neighbors(M){var L=this.predecessors(M);if(L){let V=new Set(L);for(var F of this.successors(M))V.add(F);return Array.from(V.values())}}isLeaf(M){var L;return this.isDirected()?L=this.successors(M):L=this.neighbors(M),L.length===0}filterNodes(M){var L=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});L.setGraph(this.graph());var F=this;Object.entries(this._nodes).forEach(function([te,le]){M(te)&&L.setNode(te,le)}),Object.values(this._edgeObjs).forEach(function(te){L.hasNode(te.v)&&L.hasNode(te.w)&&L.setEdge(te,F.edge(te))});var V={};function Z(te){var le=F.parent(te);return le===void 0||L.hasNode(le)?(V[te]=le,le):le in V?V[le]:Z(le)}return this._isCompound&&L.nodes().forEach(te=>L.setParent(te,Z(te))),L}setDefaultEdgeLabel(M){return this._defaultEdgeLabelFn=M,typeof M!="function"&&(this._defaultEdgeLabelFn=()=>M),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(M,L){var F=this,V=arguments;return M.reduce(function(Z,te){return V.length>1?F.setEdge(Z,te,L):F.setEdge(Z,te),te}),this}setEdge(){var M,L,F,V,Z=!1,te=arguments[0];typeof te=="object"&&te!==null&&"v"in te?(M=te.v,L=te.w,F=te.name,arguments.length===2&&(V=arguments[1],Z=!0)):(M=te,L=arguments[1],F=arguments[3],arguments.length>2&&(V=arguments[2],Z=!0)),M=""+M,L=""+L,F!==void 0&&(F=""+F);var le=X(this._isDirected,M,L,F);if(Object.hasOwn(this._edgeLabels,le))return Z&&(this._edgeLabels[le]=V),this;if(F!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(M),this.setNode(L),this._edgeLabels[le]=Z?V:this._defaultEdgeLabelFn(M,L,F);var re=H(this._isDirected,M,L,F);return M=re.v,L=re.w,Object.freeze(re),this._edgeObjs[le]=re,W(this._preds[L],M),W(this._sucs[M],L),this._in[L][le]=re,this._out[M][le]=re,this._edgeCount++,this}edge(M,L,F){var V=arguments.length===1?j(this._isDirected,arguments[0]):X(this._isDirected,M,L,F);return this._edgeLabels[V]}edgeAsObj(){let M=this.edge(...arguments);return typeof M!="object"?{label:M}:M}hasEdge(M,L,F){var V=arguments.length===1?j(this._isDirected,arguments[0]):X(this._isDirected,M,L,F);return Object.hasOwn(this._edgeLabels,V)}removeEdge(M,L,F){var V=arguments.length===1?j(this._isDirected,arguments[0]):X(this._isDirected,M,L,F),Z=this._edgeObjs[V];return Z&&(M=Z.v,L=Z.w,delete this._edgeLabels[V],delete this._edgeObjs[V],S(this._preds[L],M),S(this._sucs[M],L),delete this._in[L][V],delete this._out[M][V],this._edgeCount--),this}inEdges(M,L){return this.isDirected()?this.filterEdges(this._in[M],M,L):this.nodeEdges(M,L)}outEdges(M,L){return this.isDirected()?this.filterEdges(this._out[M],M,L):this.nodeEdges(M,L)}nodeEdges(M,L){if(M in this._nodes)return this.filterEdges({...this._in[M],...this._out[M]},M,L)}filterEdges(M,L,F){if(M){var V=Object.values(M);return F?V.filter(function(Z){return Z.v===L&&Z.w===F||Z.v===F&&Z.w===L}):V}}};function W(M,L){M[L]?M[L]++:M[L]=1}function S(M,L){--M[L]||delete M[L]}function X(M,L,F,V){var Z=""+L,te=""+F;if(!M&&Z>te){var le=Z;Z=te,te=le}return Z+q+te+q+(V===void 0?K:V)}function H(M,L,F,V){var Z=""+L,te=""+F;if(!M&&Z>te){var le=Z;Z=te,te=le}var re={v:Z,w:te};return V&&(re.name=V),re}function j(M,L){return X(M,L.v,L.w,L.name)}z.exports=D}),l=i((P,z)=>{z.exports="3.0.2"}),a=i((P,z)=>{z.exports={Graph:s(),version:l()}}),u=i((P,z)=>{var K=s();z.exports={write:U,read:W};function U(S){var X={options:{directed:S.isDirected(),multigraph:S.isMultigraph(),compound:S.isCompound()},nodes:q(S),edges:D(S)};return S.graph()!==void 0&&(X.value=structuredClone(S.graph())),X}function q(S){return S.nodes().map(function(X){var H=S.node(X),j=S.parent(X),M={v:X};return H!==void 0&&(M.value=H),j!==void 0&&(M.parent=j),M})}function D(S){return S.edges().map(function(X){var H=S.edge(X),j={v:X.v,w:X.w};return X.name!==void 0&&(j.name=X.name),H!==void 0&&(j.value=H),j})}function W(S){var X=new K(S.options).setGraph(S.value);return S.nodes.forEach(function(H){X.setNode(H.v,H.value),H.parent&&X.setParent(H.v,H.parent)}),S.edges.forEach(function(H){X.setEdge({v:H.v,w:H.w,name:H.name},H.value)}),X}}),c=i((P,z)=>{z.exports=U;var K=()=>1;function U(D,W,S,X){return q(D,String(W),S||K,X||function(H){return D.outEdges(H)})}function q(D,W,S,X){var H={},j=!0,M=0,L=D.nodes(),F=function(le){var re=S(le);H[le.v].distance+re<H[le.w].distance&&(H[le.w]={distance:H[le.v].distance+re,predecessor:le.v},j=!0)},V=function(){L.forEach(function(le){X(le).forEach(function(re){var ce=re.v===le?re.v:re.w,oe=ce===re.v?re.w:re.v;F({v:ce,w:oe})})})};L.forEach(function(le){var re=le===W?0:Number.POSITIVE_INFINITY;H[le]={distance:re}});for(var Z=L.length,te=1;te<Z&&(j=!1,M++,V(),!!j);te++);if(M===Z-1&&(j=!1,V(),j))throw new Error("The graph contains a negative weight cycle");return H}}),d=i((P,z)=>{z.exports=K;function K(U){var q={},D=[],W;function S(X){Object.hasOwn(q,X)||(q[X]=!0,W.push(X),U.successors(X).forEach(S),U.predecessors(X).forEach(S))}return U.nodes().forEach(function(X){W=[],S(X),W.length&&D.push(W)}),D}}),p=i((P,z)=>{var K=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 q=this._keyIndices[U];if(q!==void 0)return this._arr[q].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(U,q){var D=this._keyIndices;if(U=String(U),!Object.hasOwn(D,U)){var W=this._arr,S=W.length;return D[U]=S,W.push({key:U,priority:q}),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,q){var D=this._keyIndices[U];if(q>this._arr[D].priority)throw new Error("New priority is greater than current priority. Key: "+U+" Old: "+this._arr[D].priority+" New: "+q);this._arr[D].priority=q,this._decrease(D)}_heapify(U){var q=this._arr,D=2*U,W=D+1,S=U;D<q.length&&(S=q[D].priority<q[S].priority?D:S,W<q.length&&(S=q[W].priority<q[S].priority?W:S),S!==U&&(this._swap(U,S),this._heapify(S)))}_decrease(U){for(var q=this._arr,D=q[U].priority,W;U!==0&&(W=U>>1,!(q[W].priority<D));)this._swap(U,W),U=W}_swap(U,q){var D=this._arr,W=this._keyIndices,S=D[U],X=D[q];D[U]=X,D[q]=S,W[X.key]=U,W[S.key]=q}};z.exports=K}),h=i((P,z)=>{var K=p();z.exports=q;var U=()=>1;function q(W,S,X,H){var j=function(M){return W.outEdges(M)};return D(W,String(S),X||U,H||j)}function D(W,S,X,H){var j={},M=new K,L,F,V=function(Z){var te=Z.v!==L?Z.v:Z.w,le=j[te],re=X(Z),ce=F.distance+re;if(re<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+Z+" Weight: "+re);ce<le.distance&&(le.distance=ce,le.predecessor=L,M.decrease(te,ce))};for(W.nodes().forEach(function(Z){var te=Z===S?0:Number.POSITIVE_INFINITY;j[Z]={distance:te},M.add(Z,te)});M.size()>0&&(L=M.removeMin(),F=j[L],F.distance!==Number.POSITIVE_INFINITY);)H(L).forEach(V);return j}}),y=i((P,z)=>{var K=h();z.exports=U;function U(q,D,W){return q.nodes().reduce(function(S,X){return S[X]=K(q,X,D,W),S},{})}}),x=i((P,z)=>{z.exports=K;function K(q,D,W){if(q[D].predecessor!==void 0)throw new Error("Invalid source vertex");if(q[W].predecessor===void 0&&W!==D)throw new Error("Invalid destination vertex");return{weight:q[W].distance,path:U(q,D,W)}}function U(q,D,W){for(var S=[],X=W;X!==D;)S.push(X),X=q[X].predecessor;return S.push(D),S.reverse()}}),b=i((P,z)=>{z.exports=K;function K(U){var q=0,D=[],W={},S=[];function X(H){var j=W[H]={onStack:!0,lowlink:q,index:q++};if(D.push(H),U.successors(H).forEach(function(F){Object.hasOwn(W,F)?W[F].onStack&&(j.lowlink=Math.min(j.lowlink,W[F].index)):(X(F),j.lowlink=Math.min(j.lowlink,W[F].lowlink))}),j.lowlink===j.index){var M=[],L;do L=D.pop(),W[L].onStack=!1,M.push(L);while(H!==L);S.push(M)}}return U.nodes().forEach(function(H){Object.hasOwn(W,H)||X(H)}),S}}),v=i((P,z)=>{var K=b();z.exports=U;function U(q){return K(q).filter(function(D){return D.length>1||D.length===1&&q.hasEdge(D[0],D[0])})}}),m=i((P,z)=>{z.exports=U;var K=()=>1;function U(D,W,S){return q(D,W||K,S||function(X){return D.outEdges(X)})}function q(D,W,S){var X={},H=D.nodes();return H.forEach(function(j){X[j]={},X[j][j]={distance:0},H.forEach(function(M){j!==M&&(X[j][M]={distance:Number.POSITIVE_INFINITY})}),S(j).forEach(function(M){var L=M.v===j?M.w:M.v,F=W(M);X[j][L]={distance:F,predecessor:j}})}),H.forEach(function(j){var M=X[j];H.forEach(function(L){var F=X[L];H.forEach(function(V){var Z=F[j],te=M[V],le=F[V],re=Z.distance+te.distance;re<le.distance&&(le.distance=re,le.predecessor=te.predecessor)})})}),X}}),g=i((P,z)=>{function K(q){var D={},W={},S=[];function X(H){if(Object.hasOwn(W,H))throw new U;Object.hasOwn(D,H)||(W[H]=!0,D[H]=!0,q.predecessors(H).forEach(X),delete W[H],S.push(H))}if(q.sinks().forEach(X),Object.keys(D).length!==q.nodeCount())throw new U;return S}var U=class extends Error{constructor(){super(...arguments)}};z.exports=K,K.CycleException=U}),k=i((P,z)=>{var K=g();z.exports=U;function U(q){try{K(q)}catch(D){if(D instanceof K.CycleException)return!1;throw D}return!0}}),_=i((P,z)=>{z.exports=K;function K(q,D,W,S,X){Array.isArray(D)||(D=[D]);var H=(q.isDirected()?q.successors:q.neighbors).bind(q),j={};return D.forEach(function(M){if(!q.hasNode(M))throw new Error("Graph does not have node: "+M);X=U(q,M,W==="post",j,H,S,X)}),X}function U(q,D,W,S,X,H,j){return Object.hasOwn(S,D)||(S[D]=!0,W||(j=H(j,D)),X(D).forEach(function(M){j=U(q,M,W,S,X,H,j)}),W&&(j=H(j,D))),j}}),E=i((P,z)=>{var K=_();z.exports=U;function U(q,D,W){return K(q,D,W,function(S,X){return S.push(X),S},[])}}),$=i((P,z)=>{var K=E();z.exports=U;function U(q,D){return K(q,D,"post")}}),C=i((P,z)=>{var K=E();z.exports=U;function U(q,D){return K(q,D,"pre")}}),T=i((P,z)=>{var K=s(),U=p();z.exports=q;function q(D,W){var S=new K,X={},H=new U,j;function M(F){var V=F.v===j?F.w:F.v,Z=H.priority(V);if(Z!==void 0){var te=W(F);te<Z&&(X[V]=j,H.decrease(V,te))}}if(D.nodeCount()===0)return S;D.nodes().forEach(function(F){H.add(F,Number.POSITIVE_INFINITY),S.setNode(F)}),H.decrease(D.nodes()[0],0);for(var L=!1;H.size()>0;){if(j=H.removeMin(),Object.hasOwn(X,j))S.setEdge(j,X[j]);else{if(L)throw new Error("Input graph is not connected: "+D);L=!0}D.nodeEdges(j).forEach(M)}return S}}),w=i((P,z)=>{var K=h(),U=c();z.exports=q;function q(W,S,X,H){return D(W,S,X,H||function(j){return W.outEdges(j)})}function D(W,S,X,H){if(X===void 0)return K(W,S,X,H);for(var j=!1,M=W.nodes(),L=0;L<M.length;L++){for(var F=H(M[L]),V=0;V<F.length;V++){var Z=F[V],te=Z.v===M[L]?Z.v:Z.w,le=te===Z.v?Z.w:Z.v;X({v:te,w:le})<0&&(j=!0)}if(j)return U(W,S,X,H)}return K(W,S,X,H)}}),A=i((P,z)=>{z.exports={bellmanFord:c(),components:d(),dijkstra:h(),dijkstraAll:y(),extractPath:x(),findCycles:v(),floydWarshall:m(),isAcyclic:k(),postorder:$(),preorder:C(),prim:T(),shortestPaths:w(),reduce:_(),tarjan:b(),topsort:g()}}),I=a();t.exports={Graph:I.Graph,json:u(),alg:A(),version:I.version}}),hb=Fe((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}),mb=Fe((e,t)=>{var n=gn().Graph,r=hb();t.exports=o;var i=()=>1;function o(d,p){if(d.nodeCount()<=1)return[];let h=a(d,p||i);return s(h.graph,h.buckets,h.zeroIdx).flatMap(y=>d.outEdges(y.v,y.w))}function s(d,p,h){let y=[],x=p[p.length-1],b=p[0],v;for(;d.nodeCount();){for(;v=b.dequeue();)l(d,p,h,v);for(;v=x.dequeue();)l(d,p,h,v);if(d.nodeCount()){for(let m=p.length-2;m>0;--m)if(v=p[m].dequeue(),v){y=y.concat(l(d,p,h,v,!0));break}}}return y}function l(d,p,h,y,x){let b=x?[]:void 0;return d.inEdges(y.v).forEach(v=>{let m=d.edge(v),g=d.node(v.v);x&&b.push({v:v.v,w:v.w}),g.out-=m,u(p,h,g)}),d.outEdges(y.v).forEach(v=>{let m=d.edge(v),g=v.w,k=d.node(g);k.in-=m,u(p,h,k)}),d.removeNode(y.v),b}function a(d,p){let h=new n,y=0,x=0;d.nodes().forEach(m=>{h.setNode(m,{v:m,in:0,out:0})}),d.edges().forEach(m=>{let g=h.edge(m.v,m.w)||0,k=p(m),_=g+k;h.setEdge(m.v,m.w,_),x=Math.max(x,h.node(m.v).out+=k),y=Math.max(y,h.node(m.w).in+=k)});let b=c(x+y+3).map(()=>new r),v=y+1;return h.nodes().forEach(m=>{u(b,v,h.node(m))}),{graph:h,buckets:b,zeroIdx:v}}function u(d,p,h){h.out?h.in?d[h.out-h.in+p].enqueue(h):d[d.length-1].enqueue(h):d[0].enqueue(h)}function c(d){let p=[];for(let h=0;h<d;h++)p.push(h);return p}}),it=Fe((e,t)=>{var n=gn().Graph;t.exports={addBorderNode:p,addDummyNode:r,applyWithChunking:x,asNonCompoundGraph:o,buildLayerMatrix:u,intersectRect:a,mapValues:C,maxRank:b,normalizeRanks:c,notime:g,partition:v,pick:$,predecessorWeights:l,range:E,removeEmptyRanks:d,simplify:i,successorWeights:s,time:m,uniqueId:_,zipObject:T};function r(w,A,I,P){for(var z=P;w.hasNode(z);)z=_(P);return I.dummy=A,w.setNode(z,I),z}function i(w){let A=new n().setGraph(w.graph());return w.nodes().forEach(I=>A.setNode(I,w.node(I))),w.edges().forEach(I=>{let P=A.edge(I.v,I.w)||{weight:0,minlen:1},z=w.edge(I);A.setEdge(I.v,I.w,{weight:P.weight+z.weight,minlen:Math.max(P.minlen,z.minlen)})}),A}function o(w){let A=new n({multigraph:w.isMultigraph()}).setGraph(w.graph());return w.nodes().forEach(I=>{w.children(I).length||A.setNode(I,w.node(I))}),w.edges().forEach(I=>{A.setEdge(I,w.edge(I))}),A}function s(w){let A=w.nodes().map(I=>{let P={};return w.outEdges(I).forEach(z=>{P[z.w]=(P[z.w]||0)+w.edge(z).weight}),P});return T(w.nodes(),A)}function l(w){let A=w.nodes().map(I=>{let P={};return w.inEdges(I).forEach(z=>{P[z.v]=(P[z.v]||0)+w.edge(z).weight}),P});return T(w.nodes(),A)}function a(w,A){let I=w.x,P=w.y,z=A.x-I,K=A.y-P,U=w.width/2,q=w.height/2;if(!z&&!K)throw new Error("Not possible to find intersection inside of the rectangle");let D,W;return Math.abs(K)*U>Math.abs(z)*q?(K<0&&(q=-q),D=q*z/K,W=q):(z<0&&(U=-U),D=U,W=U*K/z),{x:I+D,y:P+W}}function u(w){let A=E(b(w)+1).map(()=>[]);return w.nodes().forEach(I=>{let P=w.node(I),z=P.rank;z!==void 0&&(A[z][P.order]=I)}),A}function c(w){let A=w.nodes().map(P=>{let z=w.node(P).rank;return z===void 0?Number.MAX_VALUE:z}),I=x(Math.min,A);w.nodes().forEach(P=>{let z=w.node(P);Object.hasOwn(z,"rank")&&(z.rank-=I)})}function d(w){let A=w.nodes().map(U=>w.node(U).rank).filter(U=>U!==void 0),I=x(Math.min,A),P=[];w.nodes().forEach(U=>{let q=w.node(U).rank-I;P[q]||(P[q]=[]),P[q].push(U)});let z=0,K=w.graph().nodeRankFactor;Array.from(P).forEach((U,q)=>{U===void 0&&q%K!==0?--z:U!==void 0&&z&&U.forEach(D=>w.node(D).rank+=z)})}function p(w,A,I,P){let z={width:0,height:0};return arguments.length>=4&&(z.rank=I,z.order=P),r(w,"border",z,A)}function h(w,A=y){let I=[];for(let P=0;P<w.length;P+=A){let z=w.slice(P,P+A);I.push(z)}return I}var y=65535;function x(w,A){if(A.length>y){let I=h(A);return w.apply(null,I.map(P=>w.apply(null,P)))}else return w.apply(null,A)}function b(w){let A=w.nodes().map(I=>{let P=w.node(I).rank;return P===void 0?Number.MIN_VALUE:P});return x(Math.max,A)}function v(w,A){let I={lhs:[],rhs:[]};return w.forEach(P=>{A(P)?I.lhs.push(P):I.rhs.push(P)}),I}function m(w,A){let I=Date.now();try{return A()}finally{console.log(w+" time: "+(Date.now()-I)+"ms")}}function g(w,A){return A()}var k=0;function _(w){var A=++k;return w+(""+A)}function E(w,A,I=1){A==null&&(A=w,w=0);let P=K=>K<A;I<0&&(P=K=>A<K);let z=[];for(let K=w;P(K);K+=I)z.push(K);return z}function $(w,A){let I={};for(let P of A)w[P]!==void 0&&(I[P]=w[P]);return I}function C(w,A){let I=A;return typeof A=="string"&&(I=P=>P[A]),Object.entries(w).reduce((P,[z,K])=>(P[z]=I(K,z),P),{})}function T(w,A){return w.reduce((I,P,z)=>(I[P]=A[z],I),{})}}),gb=Fe((e,t)=>{var n=mb(),r=it().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(p){Object.hasOwn(c,p)||(c[p]=!0,u[p]=!0,l.outEdges(p).forEach(h=>{Object.hasOwn(u,h.w)?a.push(h):d(h.w)}),delete u[p])}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)}})}}),yb=Fe((e,t)=>{var n=it();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,p=l.name,h=s.edge(l),y=h.labelRank;if(d===u+1)return;s.removeEdge(l);let x,b,v;for(v=0,++u;u<d;++v,++u)h.points=[],b={width:0,height:0,edgeLabel:h,edgeObj:l,rank:u},x=n.addDummyNode(s,"edge",b,"_d"),u===y&&(b.width=h.width,b.height=h.height,b.dummy="edge-label",b.labelpos=h.labelpos),s.setEdge(a,x,{weight:h.weight},p),v===0&&s.graph().dummyChains.push(x),a=x;s.setEdge(a,c,{weight:h.weight},p)}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)})}}),fl=Fe((e,t)=>{var{applyWithChunking:n}=it();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(p=>p==null?Number.POSITIVE_INFINITY:l(p.w)-o.edge(p).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}}),Zy=Fe((e,t)=>{var n=gn().Graph,r=fl().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 p,h;o(u,a)<d;)p=s(u,a),h=u.hasNode(p.v)?r(a,p):-r(a,p),l(u,a,h);return u}function o(a,u){function c(d){u.nodeEdges(d).forEach(p=>{var h=p.v,y=d===h?p.w:h;!a.hasNode(y)&&!r(u,p)&&(a.setNode(y,{}),a.setEdge(d,y,{}),c(y))})}return a.nodes().forEach(c),a.nodeCount()}function s(a,u){return u.edges().reduce((c,d)=>{let p=Number.POSITIVE_INFINITY;return a.hasNode(d.v)!==a.hasNode(d.w)&&(p=r(u,d)),p<c[0]?[p,d]:c},[Number.POSITIVE_INFINITY,null])[1]}function l(a,u,c){a.nodes().forEach(d=>u.node(d).rank+=c)}}),vb=Fe((e,t)=>{var n=Zy(),r=fl().slack,i=fl().longestPath,o=gn().alg.preorder,s=gn().alg.postorder,l=it().simplify;t.exports=a,a.initLowLimValues=p,a.initCutValues=u,a.calcCutValue=d,a.leaveEdge=y,a.enterEdge=x,a.exchangeEdges=b;function a(k){k=l(k),i(k);var _=n(k);p(_),u(_,k);for(var E,$;E=y(_);)$=x(_,k,E),b(_,k,E,$)}function u(k,_){var E=s(k,k.nodes());E=E.slice(0,E.length-1),E.forEach($=>c(k,_,$))}function c(k,_,E){var $=k.node(E),C=$.parent;k.edge(E,C).cutvalue=d(k,_,E)}function d(k,_,E){var $=k.node(E),C=$.parent,T=!0,w=_.edge(E,C),A=0;return w||(T=!1,w=_.edge(C,E)),A=w.weight,_.nodeEdges(E).forEach(I=>{var P=I.v===E,z=P?I.w:I.v;if(z!==C){var K=P===T,U=_.edge(I).weight;if(A+=K?U:-U,m(k,E,z)){var q=k.edge(E,z).cutvalue;A+=K?-q:q}}}),A}function p(k,_){arguments.length<2&&(_=k.nodes()[0]),h(k,{},1,_)}function h(k,_,E,$,C){var T=E,w=k.node($);return _[$]=!0,k.neighbors($).forEach(A=>{Object.hasOwn(_,A)||(E=h(k,_,E,A,$))}),w.low=T,w.lim=E++,C?w.parent=C:delete w.parent,E}function y(k){return k.edges().find(_=>k.edge(_).cutvalue<0)}function x(k,_,E){var $=E.v,C=E.w;_.hasEdge($,C)||($=E.w,C=E.v);var T=k.node($),w=k.node(C),A=T,I=!1;T.lim>w.lim&&(A=w,I=!0);var P=_.edges().filter(z=>I===g(k,k.node(z.v),A)&&I!==g(k,k.node(z.w),A));return P.reduce((z,K)=>r(_,K)<r(_,z)?K:z)}function b(k,_,E,$){var C=E.v,T=E.w;k.removeEdge(C,T),k.setEdge($.v,$.w,{}),p(k),u(k,_),v(k,_)}function v(k,_){var E=k.nodes().find(C=>!_.node(C).parent),$=o(k,E);$=$.slice(1),$.forEach(C=>{var T=k.node(C).parent,w=_.edge(C,T),A=!1;w||(w=_.edge(T,C),A=!0),_.node(C).rank=_.node(T).rank+(A?w.minlen:-w.minlen)})}function m(k,_,E){return k.hasEdge(_,E)}function g(k,_,E){return E.low<=_.lim&&_.lim<=E.lim}}),xb=Fe((e,t)=>{var n=fl(),r=n.longestPath,i=Zy(),o=vb();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)}}),wb=Fe((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,p=c.lca,h=0,y=d[h],x=!0;for(;l!==u.w;){if(a=o.node(l),x){for(;(y=d[h])!==p&&o.node(y).maxRank<a.rank;)h++;y===p&&(x=!1)}if(!x){for(;h<d.length-1&&o.node(y=d[h+1]).minRank<=a.rank;)h++;y=d[h]}o.setParent(l,y),l=o.successors(l)[0]}})}function r(o,s,l,a){let u=[],c=[],d=Math.min(s[l].low,s[a].low),p=Math.max(s[l].lim,s[a].lim),h,y;h=l;do h=o.parent(h),u.push(h);while(h&&(s[h].low>d||p>s[h].lim));for(y=h,h=a;(h=o.parent(h))!==y;)c.push(h);return{path:u.concat(c.reverse()),lca:y}}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}}),kb=Fe((e,t)=>{var n=it();t.exports={run:r,cleanup:l};function r(a){let u=n.addDummyNode(a,"root",{},"_root"),c=o(a),d=Object.values(c),p=n.applyWithChunking(Math.max,d)-1,h=2*p+1;a.graph().nestingRoot=u,a.edges().forEach(x=>a.edge(x).minlen*=h);let y=s(a)+1;a.children().forEach(x=>i(a,u,h,y,p,c,x)),a.graph().nodeRankFactor=h}function i(a,u,c,d,p,h,y){let x=a.children(y);if(!x.length){y!==u&&a.setEdge(u,y,{weight:0,minlen:c});return}let b=n.addBorderNode(a,"_bt"),v=n.addBorderNode(a,"_bb"),m=a.node(y);a.setParent(b,y),m.borderTop=b,a.setParent(v,y),m.borderBottom=v,x.forEach(g=>{i(a,u,c,d,p,h,g);let k=a.node(g),_=k.borderTop?k.borderTop:g,E=k.borderBottom?k.borderBottom:g,$=k.borderTop?d:2*d,C=_!==E?1:p-h[y]+1;a.setEdge(b,_,{weight:$,minlen:C,nestingEdge:!0}),a.setEdge(E,v,{weight:$,minlen:C,nestingEdge:!0})}),a.parent(y)||a.setEdge(u,b,{weight:0,minlen:p+h[y]})}function o(a){var u={};function c(d,p){var h=a.children(d);h&&h.length&&h.forEach(y=>c(y,p+1)),u[d]=p}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)})}}),bb=Fe((e,t)=>{var n=it();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},p=u[s][c-1],h=n.addDummyNode(o,"border",d,l);u[s][c]=h,o.setParent(h,a),p&&o.setEdge(p,h,{weight:1})}}),Eb=Fe((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 p=c.edge(d);p.points.forEach(l),Object.hasOwn(p,"y")&&l(p)})}function l(c){c.y=-c.y}function a(c){c.nodes().forEach(d=>u(c.node(d))),c.edges().forEach(d=>{let p=c.edge(d);p.points.forEach(u),Object.hasOwn(p,"x")&&u(p)})}function u(c){let d=c.x;c.x=c.y,c.y=d}}),Sb=Fe((e,t)=>{var n=it();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 p=i.node(d);u[p.rank].push(d),i.successors(d).forEach(c)}return s.sort((d,p)=>i.node(d).rank-i.node(p).rank).forEach(c),u}}),Cb=Fe((e,t)=>{var n=it().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((y,x)=>x)),u=s.flatMap(y=>o.outEdges(y).map(x=>({pos:a[x.w],weight:o.edge(x).weight})).sort((x,b)=>x.pos-b.pos)),c=1;for(;c<l.length;)c<<=1;let d=2*c-1;c-=1;let p=new Array(d).fill(0),h=0;return u.forEach(y=>{let x=y.pos+c;p[x]+=y.weight;let b=0;for(;x>0;)x%2&&(b+=p[x+1]),x=x-1>>1,p[x]+=y.weight;h+=y.weight*b}),h}}),Nb=Fe((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}})}}),jb=Fe((e,t)=>{var n=it();t.exports=r;function r(s,l){let a={};s.forEach((c,d)=>{let p=a[c.v]={indegree:0,in:[],out:[],vs:[c.v],i:d};c.barycenter!==void 0&&(p.barycenter=c.barycenter,p.weight=c.weight)}),l.edges().forEach(c=>{let d=a[c.v],p=a[c.w];d!==void 0&&p!==void 0&&(p.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}}),_b=Fe((e,t)=>{var n=it();t.exports=r;function r(s,l){let a=n.partition(s,b=>Object.hasOwn(b,"barycenter")),u=a.lhs,c=a.rhs.sort((b,v)=>v.i-b.i),d=[],p=0,h=0,y=0;u.sort(o(!!l)),y=i(d,c,y),u.forEach(b=>{y+=b.vs.length,d.push(b.vs),p+=b.barycenter*b.weight,h+=b.weight,y=i(d,c,y)});let x={vs:d.flat(!0)};return h&&(x.barycenter=p/h,x.weight=h),x}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}}),$b=Fe((e,t)=>{var n=Nb(),r=jb(),i=_b();t.exports=o;function o(a,u,c,d){let p=a.children(u),h=a.node(u),y=h?h.borderLeft:void 0,x=h?h.borderRight:void 0,b={};y&&(p=p.filter(k=>k!==y&&k!==x));let v=n(a,p);v.forEach(k=>{if(a.children(k.v).length){let _=o(a,k.v,c,d);b[k.v]=_,Object.hasOwn(_,"barycenter")&&l(k,_)}});let m=r(v,c);s(m,b);let g=i(m,d);if(y&&(g.vs=[y,g.vs,x].flat(!0),a.predecessors(y).length)){let k=a.node(a.predecessors(y)[0]),_=a.node(a.predecessors(x)[0]);Object.hasOwn(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+k.order+_.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)}}),Tb=Fe((e,t)=>{var n=gn().Graph,r=it();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(p=>s.node(p));return u.forEach(p=>{let h=s.node(p),y=s.parent(p);(h.rank===l||h.minRank<=l&&l<=h.maxRank)&&(d.setNode(p),d.setParent(p,y||c),s[a](p).forEach(x=>{let b=x.v===p?x.w:x.v,v=d.edge(b,p),m=v!==void 0?v.weight:0;d.setEdge(b,p,{weight:s.edge(x).weight+m})}),Object.hasOwn(h,"minRank")&&d.setNode(p,{borderLeft:h.borderLeft[l],borderRight:h.borderRight[l]}))}),d}function o(s){for(var l;s.hasNode(l=r.uniqueId("_root")););return l}}),Lb=Fe((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}})}}),Ib=Fe((e,t)=>{var n=Sb(),r=Cb(),i=$b(),o=Tb(),s=Lb(),l=gn().Graph,a=it();t.exports=u;function u(h,y={}){if(typeof y.customOrder=="function"){y.customOrder(h,u);return}let x=a.maxRank(h),b=c(h,a.range(1,x+1),"inEdges"),v=c(h,a.range(x-1,-1,-1),"outEdges"),m=n(h);if(p(h,m),y.disableOptimalOrderHeuristic)return;let g=Number.POSITIVE_INFINITY,k,_=y.constraints||[];for(let E=0,$=0;$<4;++E,++$){d(E%2?b:v,E%4>=2,_),m=a.buildLayerMatrix(h);let C=r(h,m);C<g?($=0,k=Object.assign({},m),g=C):C===g&&(k=structuredClone(m))}p(h,k)}function c(h,y,x){let b=new Map,v=(m,g)=>{b.has(m)||b.set(m,[]),b.get(m).push(g)};for(let m of h.nodes()){let g=h.node(m);if(typeof g.rank=="number"&&v(g.rank,m),typeof g.minRank=="number"&&typeof g.maxRank=="number")for(let k=g.minRank;k<=g.maxRank;k++)k!==g.rank&&v(k,m)}return y.map(function(m){return o(h,m,x,b.get(m)||[])})}function d(h,y,x){let b=new l;h.forEach(function(v){x.forEach(k=>b.setEdge(k.left,k.right));let m=v.graph().root,g=i(v,m,b,y);g.vs.forEach((k,_)=>v.node(k).order=_),s(v,b,g.vs)})}function p(h,y){Object.values(y).forEach(x=>x.forEach((b,v)=>h.node(b).order=v))}}),Ab=Fe((e,t)=>{var n=gn().Graph,r=it();t.exports={positionX:x,findType1Conflicts:i,findType2Conflicts:o,addConflict:l,hasConflict:a,verticalAlignment:u,horizontalCompaction:c,alignCoordinates:h,findSmallestWidthAlignment:p,balance:y};function i(m,g){let k={};function _(E,$){let C=0,T=0,w=E.length,A=$[$.length-1];return $.forEach((I,P)=>{let z=s(m,I),K=z?m.node(z).order:w;(z||I===A)&&($.slice(T,P+1).forEach(U=>{m.predecessors(U).forEach(q=>{let D=m.node(q),W=D.order;(W<C||K<W)&&!(D.dummy&&m.node(U).dummy)&&l(k,q,U)})}),T=P+1,C=K)}),$}return g.length&&g.reduce(_),k}function o(m,g){let k={};function _($,C,T,w,A){let I;r.range(C,T).forEach(P=>{I=$[P],m.node(I).dummy&&m.predecessors(I).forEach(z=>{let K=m.node(z);K.dummy&&(K.order<w||K.order>A)&&l(k,z,I)})})}function E($,C){let T=-1,w,A=0;return C.forEach((I,P)=>{if(m.node(I).dummy==="border"){let z=m.predecessors(I);z.length&&(w=m.node(z[0]).order,_(C,A,P,T,w),A=P,T=w)}_(C,A,C.length,w,$.length)}),C}return g.length&&g.reduce(E),k}function s(m,g){if(m.node(g).dummy)return m.predecessors(g).find(k=>m.node(k).dummy)}function l(m,g,k){if(g>k){let E=g;g=k,k=E}let _=m[g];_||(m[g]=_={}),_[k]=!0}function a(m,g,k){if(g>k){let _=g;g=k,k=_}return!!m[g]&&Object.hasOwn(m[g],k)}function u(m,g,k,_){let E={},$={},C={};return g.forEach(T=>{T.forEach((w,A)=>{E[w]=w,$[w]=w,C[w]=A})}),g.forEach(T=>{let w=-1;T.forEach(A=>{let I=_(A);if(I.length){I=I.sort((z,K)=>C[z]-C[K]);let P=(I.length-1)/2;for(let z=Math.floor(P),K=Math.ceil(P);z<=K;++z){let U=I[z];$[A]===A&&w<C[U]&&!a(k,A,U)&&($[U]=A,$[A]=E[A]=E[U],w=C[U])}}})}),{root:E,align:$}}function c(m,g,k,_,E){let $={},C=d(m,g,k,E),T=E?"borderLeft":"borderRight";function w(P,z){let K=C.nodes().slice(),U={},q=K.pop();for(;q;){if(U[q])P(q);else{U[q]=!0,K.push(q);for(let D of z(q))K.push(D)}q=K.pop()}}function A(P){$[P]=C.inEdges(P).reduce((z,K)=>Math.max(z,$[K.v]+C.edge(K)),0)}function I(P){let z=C.outEdges(P).reduce((U,q)=>Math.min(U,$[q.w]-C.edge(q)),Number.POSITIVE_INFINITY),K=m.node(P);z!==Number.POSITIVE_INFINITY&&K.borderType!==T&&($[P]=Math.max($[P],z))}return w(A,C.predecessors.bind(C)),w(I,C.successors.bind(C)),Object.keys(_).forEach(P=>$[P]=$[k[P]]),$}function d(m,g,k,_){let E=new n,$=m.graph(),C=b($.nodesep,$.edgesep,_);return g.forEach(T=>{let w;T.forEach(A=>{let I=k[A];if(E.setNode(I),w){var P=k[w],z=E.edge(P,I);E.setEdge(P,I,Math.max(C(m,A,w),z||0))}w=A})}),E}function p(m,g){return Object.values(g).reduce((k,_)=>{let E=Number.NEGATIVE_INFINITY,$=Number.POSITIVE_INFINITY;Object.entries(_).forEach(([T,w])=>{let A=v(m,T)/2;E=Math.max(w+A,E),$=Math.min(w-A,$)});let C=E-$;return C<k[0]&&(k=[C,_]),k},[Number.POSITIVE_INFINITY,null])[1]}function h(m,g){let k=Object.values(g),_=r.applyWithChunking(Math.min,k),E=r.applyWithChunking(Math.max,k);["u","d"].forEach($=>{["l","r"].forEach(C=>{let T=$+C,w=m[T];if(w===g)return;let A=Object.values(w),I=_-r.applyWithChunking(Math.min,A);C!=="l"&&(I=E-r.applyWithChunking(Math.max,A)),I&&(m[T]=r.mapValues(w,P=>P+I))})})}function y(m,g){return r.mapValues(m.ul,(k,_)=>{if(g)return m[g.toLowerCase()][_];{let E=Object.values(m).map($=>$[_]).sort(($,C)=>$-C);return(E[1]+E[2])/2}})}function x(m){let g=r.buildLayerMatrix(m),k=Object.assign(i(m,g),o(m,g)),_={},E;["u","d"].forEach(C=>{E=C==="u"?g:Object.values(g).reverse(),["l","r"].forEach(T=>{T==="r"&&(E=E.map(P=>Object.values(P).reverse()));let w=(C==="u"?m.predecessors:m.successors).bind(m),A=u(m,E,k,w),I=c(m,E,A.root,A.align,T==="r");T==="r"&&(I=r.mapValues(I,P=>-P)),_[C+T]=I})});let $=p(m,_);return h(_,$),y(_,m.graph().align)}function b(m,g,k){return(_,E,$)=>{let C=_.node(E),T=_.node($),w=0,A;if(w+=C.width/2,Object.hasOwn(C,"labelpos"))switch(C.labelpos.toLowerCase()){case"l":A=-C.width/2;break;case"r":A=C.width/2;break}if(A&&(w+=k?A:-A),A=0,w+=(C.dummy?g:m)/2,w+=(T.dummy?g:m)/2,w+=T.width/2,Object.hasOwn(T,"labelpos"))switch(T.labelpos.toLowerCase()){case"l":A=T.width/2;break;case"r":A=-T.width/2;break}return A&&(w+=k?A:-A),A=0,w}}function v(m,g){return m.node(g).width}}),Rb=Fe((e,t)=>{var n=it(),r=Ab().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 p=d.reduce((h,y)=>{let x=s.node(y).height;return h>x?h:x},0);d.forEach(h=>{let y=s.node(h);u==="top"?y.y=c+y.height/2:u==="bottom"?y.y=c+p-y.height/2:y.y=c+p/2}),c+=p+a})}}),Ob=Fe((e,t)=>{var n=gb(),r=yb(),i=xb(),o=it().normalizeRanks,s=wb(),l=it().removeEmptyRanks,a=kb(),u=bb(),c=Eb(),d=Ib(),p=Rb(),h=it(),y=gn().Graph;t.exports=x;function x(L,F={}){let V=F.debugTiming?h.time:h.notime;return V("layout",()=>{let Z=V(" buildLayoutGraph",()=>w(L));return V(" runLayout",()=>b(Z,V,F)),V(" updateInputGraph",()=>v(L,Z)),Z})}function b(L,F,V){F(" makeSpaceForEdgeLabels",()=>A(L)),F(" removeSelfEdges",()=>S(L)),F(" acyclic",()=>n.run(L)),F(" nestingGraph.run",()=>a.run(L)),F(" rank",()=>i(h.asNonCompoundGraph(L))),F(" injectEdgeLabelProxies",()=>I(L)),F(" removeEmptyRanks",()=>l(L)),F(" nestingGraph.cleanup",()=>a.cleanup(L)),F(" normalizeRanks",()=>o(L)),F(" assignRankMinMax",()=>P(L)),F(" removeEdgeLabelProxies",()=>z(L)),F(" normalize.run",()=>r.run(L)),F(" parentDummyChains",()=>s(L)),F(" addBorderSegments",()=>u(L)),F(" order",()=>d(L,V)),F(" insertSelfEdges",()=>X(L)),F(" adjustCoordinateSystem",()=>c.adjust(L)),F(" position",()=>p(L)),F(" positionSelfEdges",()=>H(L)),F(" removeBorderNodes",()=>W(L)),F(" normalize.undo",()=>r.undo(L)),F(" fixupEdgeLabelCoords",()=>q(L)),F(" undoCoordinateSystem",()=>c.undo(L)),F(" translateGraph",()=>K(L)),F(" assignNodeIntersects",()=>U(L)),F(" reversePoints",()=>D(L)),F(" acyclic.undo",()=>n.undo(L))}function v(L,F){L.nodes().forEach(V=>{let Z=L.node(V),te=F.node(V);Z&&(Z.x=te.x,Z.y=te.y,Z.order=te.order,Z.rank=te.rank,F.children(V).length&&(Z.width=te.width,Z.height=te.height))}),L.edges().forEach(V=>{let Z=L.edge(V),te=F.edge(V);Z.points=te.points,Object.hasOwn(te,"x")&&(Z.x=te.x,Z.y=te.y)}),L.graph().width=F.graph().width,L.graph().height=F.graph().height}var m=["nodesep","edgesep","ranksep","marginx","marginy"],g={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb",rankalign:"center"},k=["acyclicer","ranker","rankdir","align","rankalign"],_=["width","height","rank"],E={width:0,height:0},$=["minlen","weight","width","height","labeloffset"],C={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},T=["labelpos"];function w(L){let F=new y({multigraph:!0,compound:!0}),V=M(L.graph());return F.setGraph(Object.assign({},g,j(V,m),h.pick(V,k))),L.nodes().forEach(Z=>{let te=M(L.node(Z)),le=j(te,_);Object.keys(E).forEach(re=>{le[re]===void 0&&(le[re]=E[re])}),F.setNode(Z,le),F.setParent(Z,L.parent(Z))}),L.edges().forEach(Z=>{let te=M(L.edge(Z));F.setEdge(Z,Object.assign({},C,j(te,$),h.pick(te,T)))}),F}function A(L){let F=L.graph();F.ranksep/=2,L.edges().forEach(V=>{let Z=L.edge(V);Z.minlen*=2,Z.labelpos.toLowerCase()!=="c"&&(F.rankdir==="TB"||F.rankdir==="BT"?Z.width+=Z.labeloffset:Z.height+=Z.labeloffset)})}function I(L){L.edges().forEach(F=>{let V=L.edge(F);if(V.width&&V.height){let Z=L.node(F.v),te={rank:(L.node(F.w).rank-Z.rank)/2+Z.rank,e:F};h.addDummyNode(L,"edge-proxy",te,"_ep")}})}function P(L){let F=0;L.nodes().forEach(V=>{let Z=L.node(V);Z.borderTop&&(Z.minRank=L.node(Z.borderTop).rank,Z.maxRank=L.node(Z.borderBottom).rank,F=Math.max(F,Z.maxRank))}),L.graph().maxRank=F}function z(L){L.nodes().forEach(F=>{let V=L.node(F);V.dummy==="edge-proxy"&&(L.edge(V.e).labelRank=V.rank,L.removeNode(F))})}function K(L){let F=Number.POSITIVE_INFINITY,V=0,Z=Number.POSITIVE_INFINITY,te=0,le=L.graph(),re=le.marginx||0,ce=le.marginy||0;function oe(de){let we=de.x,je=de.y,N=de.width,G=de.height;F=Math.min(F,we-N/2),V=Math.max(V,we+N/2),Z=Math.min(Z,je-G/2),te=Math.max(te,je+G/2)}L.nodes().forEach(de=>oe(L.node(de))),L.edges().forEach(de=>{let we=L.edge(de);Object.hasOwn(we,"x")&&oe(we)}),F-=re,Z-=ce,L.nodes().forEach(de=>{let we=L.node(de);we.x-=F,we.y-=Z}),L.edges().forEach(de=>{let we=L.edge(de);we.points.forEach(je=>{je.x-=F,je.y-=Z}),Object.hasOwn(we,"x")&&(we.x-=F),Object.hasOwn(we,"y")&&(we.y-=Z)}),le.width=V-F+re,le.height=te-Z+ce}function U(L){L.edges().forEach(F=>{let V=L.edge(F),Z=L.node(F.v),te=L.node(F.w),le,re;V.points?(le=V.points[0],re=V.points[V.points.length-1]):(V.points=[],le=te,re=Z),V.points.unshift(h.intersectRect(Z,le)),V.points.push(h.intersectRect(te,re))})}function q(L){L.edges().forEach(F=>{let V=L.edge(F);if(Object.hasOwn(V,"x"))switch((V.labelpos==="l"||V.labelpos==="r")&&(V.width-=V.labeloffset),V.labelpos){case"l":V.x-=V.width/2+V.labeloffset;break;case"r":V.x+=V.width/2+V.labeloffset;break}})}function D(L){L.edges().forEach(F=>{let V=L.edge(F);V.reversed&&V.points.reverse()})}function W(L){L.nodes().forEach(F=>{if(L.children(F).length){let V=L.node(F),Z=L.node(V.borderTop),te=L.node(V.borderBottom),le=L.node(V.borderLeft[V.borderLeft.length-1]),re=L.node(V.borderRight[V.borderRight.length-1]);V.width=Math.abs(re.x-le.x),V.height=Math.abs(te.y-Z.y),V.x=le.x+V.width/2,V.y=Z.y+V.height/2}}),L.nodes().forEach(F=>{L.node(F).dummy==="border"&&L.removeNode(F)})}function S(L){L.edges().forEach(F=>{if(F.v===F.w){var V=L.node(F.v);V.selfEdges||(V.selfEdges=[]),V.selfEdges.push({e:F,label:L.edge(F)}),L.removeEdge(F)}})}function X(L){var F=h.buildLayerMatrix(L);F.forEach(V=>{var Z=0;V.forEach((te,le)=>{var re=L.node(te);re.order=le+Z,(re.selfEdges||[]).forEach(ce=>{h.addDummyNode(L,"selfedge",{width:ce.label.width,height:ce.label.height,rank:re.rank,order:le+ ++Z,e:ce.e,label:ce.label},"_se")}),delete re.selfEdges})})}function H(L){L.nodes().forEach(F=>{var V=L.node(F);if(V.dummy==="selfedge"){var Z=L.node(V.e.v),te=Z.x+Z.width/2,le=Z.y,re=V.x-te,ce=Z.height/2;L.setEdge(V.e,V.label),L.removeNode(F),V.label.points=[{x:te+2*re/3,y:le-ce},{x:te+5*re/6,y:le-ce},{x:te+re,y:le},{x:te+5*re/6,y:le+ce},{x:te+2*re/3,y:le+ce}],V.label.x=V.x,V.label.y=V.y}})}function j(L,F){return h.mapValues(h.pick(L,F),Number)}function M(L){var F={};return L&&Object.entries(L).forEach(([V,Z])=>{typeof V=="string"&&(V=V.toLowerCase()),F[V]=Z}),F}}),Mb=Fe((e,t)=>{var n=it(),r=gn().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,p)=>(l.setEdge(d,p,{style:"invis"}),p))}),l}}),Pb=Fe((e,t)=>{t.exports="2.0.4"}),Fb=Fe((e,t)=>{t.exports={graphlib:gn(),layout:Ob(),debug:Mb(),util:{time:it().time,notime:it().notime},version:Pb()}});const Dp=Fb();/*! For license information please see dagre.esm.js.LEGAL.txt */const hi=28,Er=20,Jy=20,Ra=10,Db=150;function zb(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 Bb(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 Ub(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 ev(e){return{name:e.name,type:e.beforeType?`${e.beforeType} → ${e.type}`:e.type}}function Hb(e,t,n,r){const i=zb(e,t),o=new Set(i.map(x=>x.table.name)),s=new Map;for(const{table:x}of i)for(const b of x.foreignKeys){if(!o.has(b.table))continue;const v=s.get(b.table)??new Set;b.refColumns.forEach(m=>v.add(m)),s.set(b.table,v)}const l=new Dp.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:x,neighbor:b})=>{const v=Bb(x,s.get(x.name)??new Set,n.has(x.name)),m=Ub(x);let g=Math.max(Db,r(x.name,!0)+Ra*2+24);for(const _ of v){if(_.kind==="more")continue;const E=ev(_.column);g=Math.max(g,18+r(E.name)+16+r(E.type)+34+Ra*2)}m&&(g=Math.max(g,r(m)+Ra*2));const k=hi+v.length*Er+(m?Jy:0)+4;return{table:x,neighbor:b,rows:v,footer:m,x:0,y:0,width:Math.ceil(g),height:k}}),u=[...new Set(a.map(x=>x.table.schema))];for(const x of u)l.setNode(`schema:${x}`,{label:x,paddingTop:26});for(const x of a)l.setNode(x.table.name,{width:x.width,height:x.height}),l.setParent(x.table.name,`schema:${x.table.schema}`);const c=[];for(const x of a)for(const b of x.table.foreignKeys){if(!o.has(b.table))continue;const v=a.find(g=>g.table.name===b.table),m=(g,k)=>!!k&&g.rows.some(_=>_.kind==="column"&&_.column.name===k);c.push({fk:b,from:x.table.name,to:b.table,fromColumn:m(x,b.columns[0])?b.columns[0]:void 0,toColumn:m(v,b.refColumns[0])?b.refColumns[0]:void 0,points:[]}),b.table!==x.table.name&&l.setEdge(x.table.name,b.table,{},b.name)}Dp.layout(l);for(const x of a){const b=l.node(x.table.name);x.x=b.x-x.width/2,x.y=b.y-x.height/2}const d=u.map(x=>{const b=l.node(`schema:${x}`);return{schema:x,x:b.x-b.width/2,y:b.y-b.height/2,width:b.width,height:b.height}}),p=new Map(a.map(x=>[x.table.name,x]));for(const x of c)x.points=Wb(p.get(x.from),x.fromColumn,p.get(x.to),x.toColumn);const h=Math.max(0,...a.map(x=>x.x+x.width),...d.map(x=>x.x+x.width)),y=Math.max(0,...a.map(x=>x.y+x.height),...d.map(x=>x.y+x.height));return{tables:a,edges:c,groups:d,width:h+20,height:y+20}}function zp(e,t){const n=t?e.rows.findIndex(r=>r.kind==="column"&&r.column.name===t):-1;return n<0?e.y+hi/2:e.y+hi+n*Er+Er/2}function Wb(e,t,n,r){const i=zp(e,t),o=zp(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 Vb(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 qb={added:"+",removed:"−",modified:"~",unchanged:""},tv="12px ui-monospace, SFMono-Regular, Menlo, monospace",Kb=`600 ${tv}`;function Gb(){return O.useMemo(()=>{const e=document.createElement("canvas").getContext("2d");return(t,n)=>e?(e.font=n?Kb:tv,e.measureText(t).width):t.length*7.4},[])}const Yb=O.forwardRef(function({tables:t,mode:n,values:r,selected:i,reviewed:o,comments:s,onSelect:l},a){const u=Gb(),[c,d]=O.useState(new Set),[p,h]=O.useState(null),[y,x]=O.useState({x:0,y:0,k:1}),b=O.useRef(null),v=O.useRef(null),m=O.useMemo(()=>Hb(t,n,c,u),[t,n,c,u]),g=O.useMemo(()=>new Map(m.tables.map(T=>[T.table.name,T])),[m]),k=O.useRef(!1),_=O.useCallback(()=>{const T=b.current;if(!T||m.width===0)return;if(T.clientWidth===0||T.clientHeight===0){k.current=!0;return}k.current=!1;const w=Math.min(1.2,Math.max(.2,Math.min(T.clientWidth/m.width,T.clientHeight/m.height)));x({k:w,x:(T.clientWidth-m.width*w)/2,y:Math.max(0,(T.clientHeight-m.height*w)/2)})},[m]),E=m.tables.map(T=>T.table.name).join("|");O.useEffect(()=>{_()},[E]),O.useEffect(()=>{const T=b.current;if(!T)return;const w=new ResizeObserver(()=>{k.current&&_()});return w.observe(T),()=>w.disconnect()},[_]);const $=O.useCallback((T,w,A)=>{x(I=>{const P=Math.min(3,Math.max(.15,I.k*T));return{k:P,x:w-(w-I.x)*P/I.k,y:A-(A-I.y)*P/I.k}})},[]);O.useImperativeHandle(a,()=>({fit:_,zoom:T=>{const w=b.current;w&&$(T,w.clientWidth/2,w.clientHeight/2)},focus:T=>{const w=g.get(T),A=b.current;!w||!A||x(I=>({...I,x:A.clientWidth/2-(w.x+w.width/2)*I.k,y:A.clientHeight/3-(w.y+Math.min(w.height,200)/2)*I.k}))}}),[_,$,g]),O.useEffect(()=>{const T=b.current;if(!T)return;const w=A=>{A.preventDefault();const I=T.getBoundingClientRect();A.ctrlKey||A.metaKey?$(Math.exp(-A.deltaY*.01),A.clientX-I.left,A.clientY-I.top):x(P=>({...P,x:P.x-A.deltaX,y:P.y-A.deltaY}))};return T.addEventListener("wheel",w,{passive:!1}),()=>T.removeEventListener("wheel",w)},[$]);const C=T=>p===T||i===T;return f.jsx("div",{ref:b,className:"er",onPointerDown:T=>{T.button===0&&(v.current={x:T.clientX,y:T.clientY,vx:y.x,vy:y.y,moved:!1,target:T.target},T.currentTarget.setPointerCapture(T.pointerId))},onPointerMove:T=>{const w=v.current;w&&(Math.abs(T.clientX-w.x)+Math.abs(T.clientY-w.y)>3&&(w.moved=!0),w.moved&&x(A=>({...A,x:w.vx+T.clientX-w.x,y:w.vy+T.clientY-w.y})))},onPointerUp:()=>{const T=v.current;if(v.current=null,T&&!T.moved){const w=T.target.closest("[data-table]"),A=T.target.closest("[data-more]");if(A){const I=A.getAttribute("data-more");d(P=>{const z=new Set(P);return z.has(I)?z.delete(I):z.add(I),z})}else l(w?w.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(T=>f.jsx("marker",{id:`arrow-${T}`,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 ${T}`})},T))}),f.jsxs("g",{transform:`translate(${y.x} ${y.y}) scale(${y.k})`,children:[m.groups.map(T=>f.jsxs("g",{className:"er-group",children:[f.jsx("rect",{x:T.x,y:T.y,width:T.width,height:T.height,rx:8}),f.jsx("text",{x:T.x+10,y:T.y+17,children:T.schema})]},T.schema)),m.edges.map(T=>{const w=C(T.from)||C(T.to);return f.jsx("path",{d:Vb(T.points),className:`er-edge ${T.fk.status} ${w?"lit":""} ${p||i?w?"":"dim":""}`,markerEnd:`url(#arrow-${T.fk.status})`,children:f.jsxs("title",{children:[T.fk.name,": ",T.from,".",T.fk.columns.join(", ")," → ",T.to,".",T.fk.refColumns.join(", ")]})},`${T.from}:${T.fk.name}`)}),m.tables.map(T=>f.jsx(Xb,{t:T,values:r,selected:i===T.table.name,reviewed:o.has(T.table.name),comments:s.tables.get(T.table.name)??0,commented:s.columns,expanded:c.has(T.table.name),onHover:h},T.table.name))]})]})})});function Xb({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:hi,rx:6}),f.jsx("rect",{className:"er-head-fill",y:hi-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=hi+c*Er;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:Er}),f.jsx("text",{x:10,y:d+14,children:s?"▴ たたむ":`▸ 他 ${u.hidden} カラム`})]},"more");const p=u.column,h=ev(p),y=t.get(`${e.table.name}.${p.name}`);return f.jsxs("g",{className:`er-row ${p.status}`,children:[f.jsx("rect",{y:d,width:e.width,height:Er}),f.jsx("text",{x:8,y:d+14,className:`er-mark ${p.status}`,children:qb[p.status]}),f.jsxs("text",{x:20,y:d+14,className:"er-col",children:[p.primary&&f.jsx("tspan",{className:"er-key",children:"◆ "}),h.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 "}),p.values&&f.jsx("tspan",{className:"er-values",children:"値± "}),p.beforeType?f.jsxs(f.Fragment,{children:[f.jsx("tspan",{className:"er-before",children:p.beforeType}),f.jsxs("tspan",{children:[" → ",p.type]})]}):p.type,p.notNull?"":f.jsx("tspan",{className:"er-null",children:"?"})]}),o.has(`${e.table.name}.${p.name}`)&&f.jsx("circle",{className:"er-cdot",cx:e.width-4,cy:d+Er/2,r:2.5}),y&&f.jsx("title",{children:y})]},p.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-Jy/2-1,children:e.footer})]})}const si={side:260,panel:440},Bp=180,Up=320,Hp=320,nv="dbshape.layout";function Qb(){const e=nn(nv,{});return{side:typeof e.side=="number"&&e.side>0?e.side:si.side,panel:typeof e.panel=="number"&&e.panel>0?e.panel:si.panel}}const ps=e=>$t(nv,e);function hs(e,t,n){const r=Rr*(n?2:1);let i=e.panel;n&&(i=Math.max(Hp,Math.min(i,t-r-Bp-Up)));const o=t-r-(n?i:0);return{side:Math.max(Bp,Math.min(e.side,o-Up)),panel:Math.max(Hp,i)}}function Zb(e,t){return[`${e.side}px`,`${Rr}px`,"minmax(0, 1fr)",...t?[`${Rr}px`,`${e.panel}px`]:[]].join(" ")}const Jb=["table","column","constraint","index","value","type"];function e1(e){const t=/^([a-z]+):([^:]*):(.+)$/.exec(e);return!t||!Jb.includes(t[1])?null:{kind:t[1],...t[2]?{table:t[2]}:{},name:t[3]}}function t1(e,t=""){const n=e.diff,r=(o,s)=>{const l=zy(e,o),a=l&&!l.base?` 定義: ${l.file}:${l.line}`:"";return`${" ".repeat(s)}- ${dl(o)}(${Bo(e,o)??"変更なし"})${a} target: "${t}${Or(o)}"`},i=[];for(const o of n.tables){i.push(r(cl(o.name),0));for(const s of o.columns)i.push(r({kind:"column",table:o.name,name:s.name},1));for(const s of o.constraints)i.push(r({kind:"constraint",table:o.name,name:s.name},1));for(const s of o.indexes)i.push(r({kind:"index",table:o.name,name:s.name},1))}for(const o of n.values)o.source==="check"&&o.table&&o.column&&i.push(r({kind:"value",table:o.table,name:o.column},0));for(const o of[...n.enums,...n.domains])i.push(r({kind:"type",name:o.name},0));return i.length===0?"":[`スキーマの SQL: ${Ul(e.schemaFrom)}`,"変更:",...i].join(`
71
+ `)}const n1=["コメントの付け方:","- target: 上の target の値をそのまま","- path / side / line / endLine / code: null","- スキーマの設計を見てください(型、NULL を許すか、既定値、制約、外部キー、インデックス、値の制限、既存のテーブルとの揃い方、既存のデータへの影響など)。定義は SQL ファイルを読んで確かめてください。","- 一覧にないテーブルやカラムも同じ形の target で指せます(table:<schema.table>:<schema.table>、column:<schema.table>:<カラム名>)。"].join(`
72
+ `);function r1(e,t,n,r){const i=[];for(const o of e){if(!o.target||!o.target.startsWith(n))continue;const s=e1(o.target.slice(n.length));!s||!By(t,s)&&Bo(t,s)===void 0||i.push({...Uy(t,s,o.body),ai:r})}return i}const rv="dbshape.reviewed:",i1=e=>nn(rv+e,{}),o1=(e,t)=>$t(rv+e,t),s1=e=>`${e.repoRoot}|${e.base.label}|${e.target.label}|${e.database.id}`,l1=[{status:"added",title:"新規テーブル"},{status:"modified",title:"変更したテーブル"},{status:"removed",title:"削除したテーブル"}];function a1({data:e,active:t,onComments:n,ai:r,aiPrefix:i,onAi:o,switcher:s}){const l=s1(e),[a,u]=O.useState(""),[c,d]=O.useState("changes"),[p,h]=O.useState(null),[y,x]=O.useState(()=>i1(l)),[b,v]=O.useState(()=>tb(l)),[m,g]=O.useState(null),[k,_]=O.useState(null),E=O.useRef(null),$=O.useRef(null),C=O.useRef(null),T=Ly($),[w,A]=O.useState(Qb);O.useEffect(()=>{if(!t)return;const N=G=>{G.key==="Escape"&&!(G.target instanceof HTMLElement&&G.target.closest("textarea, input"))&&h(null)};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[t]),O.useEffect(()=>{const N=b.filter(G=>pi(e,G)!=="resolved").length;n({open:N,prompt:()=>Hy(e,b,{header:!1}).text,review:()=>t1(e,i)})},[e,b,i,n]);const I=O.useRef(b);I.current=b;const P=O.useRef(0),[z,K]=O.useState(null);O.useEffect(()=>{if(!r||r.seq===P.current)return;P.current=r.seq;const N=r1(r.items.filter(G=>G.module==="db"),e,i,r.agent);if(N.length){const G=[...I.current,...N];v(G),Op(l,G)}K({seq:r.seq,placed:N.length,dropped:0})},[r,e,i,l]),O.useEffect(()=>{z&&o(z)},[z,o]);const U=e.diff.tables,q=O.useMemo(()=>new Set(U.map(N=>N.name)),[U]),D=N=>y[N.name]===ao(N),W=O.useMemo(()=>new Set(U.filter(N=>y[N.name]===ao(N)).map(N=>N.name)),[U,y]),S=O.useMemo(()=>{const N=new Map;for(const G of e.diff.values){const ee=Hl(G.before,G.after).map(fe=>fe.status==="added"?`+${fe.value}`:fe.status==="removed"?`−${fe.value}`:fe.value).join(" "),he=G.source==="check"?[`${G.table}.${G.column}`]:G.usedBy??[];for(const fe of he)N.set(fe,`値: ${ee}`)}return N},[e]),X=O.useMemo(()=>{const N=new Map,G=new Set;for(const ee of b)pi(e,ee)==="resolved"||!ee.target.table||(N.set(ee.target.table,(N.get(ee.target.table)??0)+1),(ee.target.kind==="column"||ee.target.kind==="value")&&G.add(`${ee.target.table}.${ee.target.name}`));return{tables:N,columns:G}},[e,b]),H=e.diff,j=(N,G)=>{const ee={...y};G?ee[N.name]=ao(N):delete ee[N.name],x(ee),o1(l,ee)},M=(N,G=!0)=>{h({kind:"table",name:N}),G&&window.setTimeout(()=>{var ee;return(ee=E.current)==null?void 0:ee.focus(N)},0)},L=N=>{v(N),Op(l,N)},F={data:e,comments:b,composing:m,editing:k,compose:N=>{g(N?Or(N):null),_(null)},edit:N=>{_(N),g(null)},add:(N,G)=>{L([...b,Uy(e,N,G)]),g(null)},update:(N,G)=>{L(b.map(ee=>ee.id===N?{...ee,body:G}:ee)),_(null)},remove:N=>L(b.filter(G=>G.id!==N))},V=N=>{N.table?M(N.table):h({kind:"type",name:N.name}),window.setTimeout(()=>{var G;return(G=document.getElementById(`c-${Or(N)}`))==null?void 0:G.scrollIntoView({block:"center",behavior:"smooth"})},50)},Z=U.filter(N=>Q0(N,a)),te=[...H.enums.map(N=>({kind:"ENUM 型",change:N})),...H.domains.map(N=>({kind:"DOMAIN",change:N}))],le=U.filter(D).length,re=p,ce=(re==null?void 0:re.kind)==="table"?U.find(N=>N.name===re.name):void 0,oe=(re==null?void 0:re.kind)==="table"?e.er.find(N=>N.name===re.name):void 0,de=(re==null?void 0:re.kind)==="table"?H.values.filter(N=>{var G;return N.table===re.name||((G=N.usedBy)==null?void 0:G.some(ee=>ee.startsWith(`${re.name}.`)))}):[],we=(re==null?void 0:re.kind)==="type"?te.find(N=>N.change.name===re.name):void 0,je=U.length===0&&H.values.length===0&&te.length===0;return f.jsx(Vy.Provider,{value:F,children:f.jsxs("div",{className:"app",children:[f.jsxs(Md,{children:[s,f.jsxs(Pd,{children:[f.jsx(Si,{children:"テーブル"}),f.jsx(Od,{stats:{added:U.filter(N=>N.status==="added").length,modified:U.filter(N=>N.status==="modified").length,removed:U.filter(N=>N.status==="removed").length},unit:"テーブル",showZero:!0}),f.jsx(Fd,{}),f.jsx(Si,{children:"値の変化"}),f.jsx("span",{className:`vcount${H.values.length?"":" zero"}`,title:"CHECK や ENUM などの値の変化",children:H.values.length})]}),f.jsx(Dd,{}),f.jsx(zd,{done:le,total:U.length,title:"確認済みにしたテーブル(内容が変わると外れます)"})]}),f.jsxs("div",{className:`body ${re?"with-panel":""}`,ref:$,style:{gridTemplateColumns:Zb(T?hs(w,T,!!re):w,!!re)},children:[f.jsxs("nav",{className:"side",ref:C,children:[f.jsx("input",{className:"filter",placeholder:"テーブル・カラムで絞り込み",value:a,onChange:N=>u(N.target.value)}),l1.map(N=>{const G=Z.filter(ee=>ee.status===N.status);return f.jsxs("div",{className:"group",children:[f.jsxs("div",{className:"group-title",children:[N.title," ",f.jsx("span",{className:"muted",children:G.length})]}),G.map(ee=>{const he=Py(ee),fe=X.tables.get(ee.name)??0,pe=D(ee);return f.jsxs("div",{className:`item-row tinted ${ee.status}${pe?" reviewed":""}${(re==null?void 0:re.name)===ee.name?" current":""}`,children:[f.jsxs("button",{className:"item",onClick:()=>M(ee.name),title:ee.name,children:[f.jsxs("span",{className:"iname",children:[f.jsxs("span",{className:"schema",children:[ee.schema,"."]}),ee.table]}),f.jsx(Li,{stats:he,title:My(he)}),fe>0&&f.jsx(Ao,{n:fe,title:"このテーブルへの未対応のコメント"})]}),f.jsx("button",{className:`ireview${pe?" on":""}`,onClick:()=>j(ee,!pe),title:pe?"確認済み(クリックで外す)":"確認済みにする(テーブルがまた変わると外れます)","aria-label":pe?"確認済みを外す":"確認済みにする","aria-pressed":pe,children:f.jsx(I0,{size:12})})]},ee.name)})]},N.status)}),f.jsxs("div",{className:"group",children:[f.jsxs("div",{className:"group-title",children:["値の変化 ",f.jsx("span",{className:"muted",children:H.values.length})]}),H.values.map((N,G)=>{const ee=Fy(N);return f.jsx("button",{className:"item tinted values",onClick:()=>ee.table?M(ee.table):N.type&&h({kind:"type",name:N.type}),children:f.jsx("span",{className:"iname",children:ee.label})},G)})]}),b.length>0&&f.jsxs("div",{className:"group",children:[f.jsxs("div",{className:"group-title",children:["コメント ",f.jsx("span",{className:"muted",children:b.length})]}),b.map(N=>{const G=pi(e,N);return f.jsxs("div",{className:`item comment-item ${G}`,role:"button",tabIndex:0,onClick:()=>V(N.target),onKeyDown:ee=>ee.key==="Enter"&&V(N.target),title:`${dl(N.target)}
73
+ ${N.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:dl(N.target)}),f.jsx("span",{className:"cline",children:N.body.split(`
74
+ `)[0]})]}),G!=="open"&&f.jsx("span",{className:`cstate ${G}`,children:nb[G]}),f.jsx("button",{className:"cdel","aria-label":"削除",title:"このコメントを削除",onClick:ee=>{ee.stopPropagation(),F.remove(N.id)},children:"×"})]},N.id)})]}),te.length>0&&f.jsxs("div",{className:"group",children:[f.jsxs("div",{className:"group-title",children:["型 ",f.jsx("span",{className:"muted",children:te.length})]}),te.map(N=>f.jsx("button",{className:`item tinted ${N.change.status}${(re==null?void 0:re.name)===N.change.name?" current":""}`,onClick:()=>h({kind:"type",name:N.change.name}),children:f.jsx("span",{className:"iname",children:N.change.name})},N.change.name))]}),f.jsxs("div",{className:"side-foot muted",children:[f.jsxs("div",{children:["変更のないテーブル ",H.unchangedTables]}),f.jsxs("details",{children:[f.jsxs("summary",{children:["スキーマ ",e.target.files.length," ファイル(",Ul(e.schemaFrom),")"]}),f.jsx("ul",{children:e.target.files.map(N=>f.jsx("li",{children:N},N))})]}),e.ignored.length>0&&f.jsxs("details",{children:[f.jsxs("summary",{children:["比較していない文 ",e.ignored.reduce((N,G)=>N+G.count,0)]}),f.jsx("ul",{children:e.ignored.map(N=>f.jsxs("li",{children:[N.statement," ",N.count]},N.statement))})]})]})]}),f.jsx(Io,{title:"ドラッグで一覧と図の幅を変える(ダブルクリックで元に戻す)",start:()=>{var N;return((N=C.current)==null?void 0:N.getBoundingClientRect().width)??w.side},onDrag:(N,G)=>A(ee=>hs({...ee,side:N+G},T,!!re)),onEnd:()=>A(N=>(ps(N),N)),onReset:()=>A(N=>(ps({...N,side:si.side}),{...N,side:si.side}))}),f.jsxs("main",{className:"canvas",children:[f.jsxs("div",{className:"toolbar",children:[f.jsxs("div",{className:"ds-seg",children:[f.jsx("button",{className:c==="changes"?"on":"",onClick:()=>d("changes"),title:"変更したテーブルと、その外部キーの参照先だけ",children:"変更まわり"}),f.jsx("button",{className:c==="all"?"on":"",onClick:()=>d("all"),title:"すべてのテーブル",children:"全体"})]}),f.jsx("button",{className:"ds-btn",onClick:()=>{var N;return(N=E.current)==null?void 0:N.fit()},title:"図全体を画面に収める",children:"全体を表示"}),f.jsx("button",{className:"ds-btn ds-btn-icon",onClick:()=>{var N;return(N=E.current)==null?void 0:N.zoom(1.25)},"aria-label":"拡大",children:"+"}),f.jsx("button",{className:"ds-btn ds-btn-icon",onClick:()=>{var N;return(N=E.current)==null?void 0:N.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((N,G)=>f.jsx("div",{className:"warning",children:N},G))}),je&&c==="changes"?f.jsxs("div",{className:"empty",children:["スキーマの変更はありません(",e.target.files.length," ファイルを比較しました)"]}):f.jsx(Yb,{ref:E,tables:e.er,mode:c,values:S,selected:(re==null?void 0:re.kind)==="table"?re.name:null,reviewed:W,comments:X,onSelect:N=>N?M(N,!1):h(null)})]}),re&&f.jsx(Io,{title:"ドラッグで図と詳細パネルの幅を変える(ダブルクリックで元に戻す)",start:()=>hs(w,T,!0).panel,onDrag:(N,G)=>A(ee=>hs({...ee,panel:N-G},T,!0)),onEnd:()=>A(N=>(ps(N),N)),onReset:()=>A(N=>(ps({...N,panel:si.panel}),{...N,panel:si.panel}))}),re&&f.jsx(cb,{selection:re,change:ce,erTable:oe,values:de,type:we,reviewed:ce?D(ce):!1,onReviewed:N=>ce&&j(ce,N),known:q,onJump:N=>M(N),onClose:()=>h(null)})]})]})})}function u1({data:e,active:t,onComments:n,ai:r,onAi:i}){const o=e.databases,s=o.length>1,l=`dbshape.database:${e.repoRoot}`,[a,u]=O.useState(()=>{var C;const $=nn(l,null);return $&&o.some(T=>T.database.id===$)?$:(C=[...o].sort((T,w)=>Os(w)-Os(T))[0])==null?void 0:C.database.id}),c=o.find($=>$.database.id===a)??o[0],d=$=>{u($),$t(l,$)},[p,h]=O.useState({}),y=O.useRef(new Map),x=$=>{let C=y.current.get($);return C||y.current.set($,C=T=>h(w=>({...w,[$]:T}))),C};O.useEffect(()=>{const $=o.filter(C=>{var T;return(((T=p[C.database.id])==null?void 0:T.open)??0)>0});n({open:$.reduce((C,T)=>C+p[T.database.id].open,0),prompt:()=>$.map(C=>{const T=p[C.database.id].prompt().trimEnd();return s?`### DB: ${C.database.name}
75
+
76
+ ${T}`:T}).join(`
77
+
78
+ `),review:()=>{const C=o.map(T=>{var w,A;return{d:T,text:((A=(w=p[T.database.id])==null?void 0:w.review)==null?void 0:A.call(w))??""}}).filter(T=>T.text);return C.length===0?"":[...C.map(({d:T,text:w})=>s?`### DB: ${T.database.name}
79
+
80
+ ${w}`:w),n1].join(`
81
+
82
+ `)}})},[o,p,s,n]);const b=$=>s?`${$+1}/`:"",[v,m]=O.useState({}),g=O.useRef(new Map),k=$=>{let C=g.current.get($);return C||g.current.set($,C=T=>m(w=>({...w,[$]:T}))),C},_=O.useRef(0);if(O.useEffect(()=>{if(!r||_.current===r.seq||!o.every(C=>{var T;return((T=v[C.database.id])==null?void 0:T.seq)===r.seq}))return;_.current=r.seq;const $=o.reduce((C,T)=>C+v[T.database.id].placed,0);i({seq:r.seq,placed:$,dropped:r.items.filter(C=>C.module==="db").length-$})},[r,o,v,i]),!c)return f.jsx("div",{className:"fatal muted",children:"スキーマの SQL ファイルがありません"});const E=s?f.jsx("div",{className:"db-switch",role:"tablist","aria-label":"データベース",children:o.map($=>{const C=Os($),T=$===c;return f.jsxs("button",{role:"tab","aria-selected":T,className:`db-tab ${T?"on":""} ${C===0?"quiet":""}`,onClick:()=>d($.database.id),title:`${Ul($.schemaFrom)}
83
+ 変更 ${C}`,children:[f.jsx("span",{className:"db-name",children:$.database.name}),f.jsx("span",{className:"db-count",children:C})]},$.database.id)})}):void 0;return f.jsx(f.Fragment,{children:o.map(($,C)=>f.jsx("div",{className:"db-pane",hidden:$!==c,children:f.jsx(a1,{data:$,active:t&&$===c,onComments:x($.database.id),ai:r,aiPrefix:b(C),onAi:k($.database.id),switcher:E})},$.database.id))})}const c1={id:"db",title:"DB",description:"DB スキーマ(dbshape): テーブル・カラム・制約・CHECK の値の変化",icon:$0,View:u1,badge:e=>e.databases.reduce((t,n)=>t+Os(n),0)||void 0};function d1(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)Wp(r,l.from,l),Wp(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 Wp(e,t,n){const r=e.get(t);r?r.push(n):e.set(t,[n])}function pl(e,t){return e===0&&t>0?"added":t===0&&e>0?"removed":"unchanged"}function iv(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 ov(e,t,n){const r=iv(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 Me(e){const t=e.lastIndexOf("/");return t===-1?"":e.slice(0,t)}function yt(e){return e.slice(e.lastIndexOf("/")+1)}function f1(e){const t=new Map,n=r=>{let i=t.get(r);return i||(i={path:r,name:r===""?"(root)":yt(r),dirs:[],files:[],stats:{added:0,modified:0,removed:0,total:0}},t.set(r,i),r!==""&&n(Me(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:Me(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 sv(e){const t=[];let n=e;for(;n!=="";)n=Me(n),n!==""&&t.unshift(n);return t}function hl(e){return e.added+e.modified+e.removed===0?"unchanged":e.added===e.total?"added":e.removed===e.total?"removed":"modified"}const p1=e=>`t:${e}`;function Oa(e){if(e.length===0)return"";const t=e.map(r=>Me(r)?Me(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 lv(e){return[...e.files,...e.dirs.flatMap(lv)]}function Nr(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:`${yt(o.dir)}/${yt(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:hl(o.stats),files:lv(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:hl(s),files:o.files,pinned:r,depth:0}}return null}const an=(e,t)=>t===""||e===t||e.startsWith(t+"/");function Ud(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&&an(o.to,t.scope)||r.push(o);return r}const ml=(e,t)=>({from:e,to:t,before:0,after:0,added:0,removed:0,status:"unchanged"});function Vp(e,t){t!=="added"&&e.before++,t!=="removed"&&e.after++,t==="added"&&e.added++,t==="removed"&&e.removed++}function av(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 gl(e,t,n){const r=new Map;for(const i of Ud(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:ov(e.graph.modules,i.to),external:i.external},link:ml(t.id,o),fileLinks:new Map},r.set(o,s));const l=s.link;Vp(l,i.status),i.typeOnly!==void 0&&(l.typeOnly=(l.typeOnly??!0)&&i.typeOnly);for(const a of i.files??[]){const u=p1(a.path);let c=s.fileLinks.get(u);c||s.fileLinks.set(u,c=ml(t.id,u)),Vp(c,a.status),c.typeOnly=(c.typeOnly??!0)&&!!a.typeOnly}av(l,i.files)}for(const{link:i,fileLinks:o}of r.values()){i.status=pl(i.before,i.after);for(const s of o.values())s.status=pl(s.before,s.after),s.typeOnly||delete s.typeOnly}return r}function uv(e,t,n,r=`g:${n}`){const i=ml(t.id,r),o=new Map;let s=!0;for(const l of Ud(e,t,!1)){if(l.external||!an(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),av(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=pl(i.before,i.after),s&&(i.typeOnly=!0),i}function h1(e,t,n,r){const i=s=>{const l=Nr(e,t,s,n.pinned);return l?(l.scope=n.scope??l.scope,l.kind==="file"&&(l.label=yt(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&&Ud(e,s,r).length>0)}function Zi(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&&an(Me(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 cv(e,t,n){if(!n.length)return null;const r=ml(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=pl(r.before,r.after),n.every(i=>i.typeOnly)&&(r.typeOnly=!0),r}function uc(e){const t=e.slice(4);return e.startsWith("i:f:")?n=>n===t:e.startsWith("i:d:")?n=>Me(n)===t:n=>an(Me(n),t)}function m1(e,t,n,r){var s,l;if(n.startsWith("i:")){const a=Nr(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=uc(n);return cv(n,r,[...Zi(e,u)].filter(([d])=>c(d)).map(([,d])=>d))}const i=Nr(e,t,n,!1);if(!i)return null;if(r.startsWith("g:"))return uv(e,i,r.slice(2),r);const o=gl(e,i,!0);return r.startsWith("t:")?((l=o.get(`d:${Me(r.slice(2))}`))==null?void 0:l.fileLinks.get(r))??null:((s=o.get(r))==null?void 0:s.link)??null}function qp(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}/${yt(a[0].dir)}`);if(a.length===0)return[{kind:"dir",dir:s.dir,label:l,self:!1}];const u=a.flatMap(c=>i(c,yt(c.dir)));return s.target&&u.push({kind:"dir",dir:s.dir,label:`${yt(s.dir)}(パッケージ)`,self:!0}),[{kind:"group",dir:s.dir,label:l,children:u}]},o=[...n.children.values()].flatMap(s=>i(s,yt(s.dir)));return r&&o.push({kind:"dir",dir:t,label:t?`${yt(t)}(パッケージ)`:"(ルート)",self:!0}),o}function g1(e,t,n,r,i,o=new Map,s=new Map){var je;const l=[],a=new Set,u=(N,G,ee)=>{if(a.has(N.id))return;a.add(N.id);const he=N.kind==="file"?[]:h1(e,t,N,i);if(Object.assign(N,{depth:G,parent:ee,canOpen:he.length>0,open:he.length>0&&(s.get(N.id)??!1)}),l.push(N),N.open)for(const fe of he)u(fe,G+1,N.id)},c=n.map(N=>Nr(e,t,N,!0)).filter(N=>N!==null);for(const N of c)N.isPin=!0;const d=new Map,p=new Map;for(const N of c)N.kind==="file"&&d.set(Me(N.path),[...d.get(Me(N.path))??[],N]);const h=[...c.filter(N=>N.kind!=="file").map(N=>({key:`${N.path}/`,box:!1,s:N,dir:N.path})),...[...d.keys()].map(N=>({key:N?`${N}/`:"",box:!0,s:null,dir:N}))].sort((N,G)=>N.key.localeCompare(G.key)||Number(N.box)-Number(G.box));for(const N of h){if(!N.box){u(N.s,0,void 0);continue}const G=d.get(N.dir).filter(pe=>!a.has(pe.id)).sort((pe,Te)=>pe.path.localeCompare(Te.path)),ee=G.length?Nr(e,t,`c:${N.dir}`,!0):null;if(!ee)continue;const he=ee.files;ee.files=G.flatMap(pe=>pe.files);const fe={added:0,modified:0,removed:0,total:ee.files.length};for(const pe of ee.files)pe.status!=="unchanged"&&fe[pe.status]++;if(ee.status=hl(fe),a.add(ee.id),ee.depth=0,ee.canOpen=!0,ee.open=s.get(ee.id)??!0,ee.open||(ee.suffix=` ${G.length} ファイル`),l.push(ee),p.set(ee.id,{files:G,pkg:he}),ee.open)for(const pe of G)pe.label=yt(pe.path),u(pe,1,ee.id)}if(r&&!n.includes(r)){const N=Nr(e,t,r,!1);N&&u(N,0,void 0)}const y=l.filter(N=>N.depth===0),x=Oa(y.map(N=>N.path));for(const N of y){const G=x?N.path.slice(x.length+1):N.path;N.label=N.kind==="dir"||N.kind==="rest"||N.kind==="container"?`${G}/`:G}const b=l.map(N=>N.open?new Map:gl(e,N,i)),v=new Set,m=new Map;for(const N of b)for(const{target:G}of N.values())G.external?m.set(G.id,G):v.add(G.dir);const g=Oa([...v]),k=N=>g?N.slice(g.length+1):N,_=N=>{let G=0,ee=0;return b.forEach((he,fe)=>{for(const pe of he.keys())N(pe)&&(G+=fe,ee++)}),ee?G/ee:0},E=N=>_(G=>G.startsWith("d:")&&(N.kind==="group"?an(G.slice(2),N.dir):G.slice(2)===N.dir)),$=N=>[...N].sort((G,ee)=>{const he=G.kind==="dir"&&G.self?1:0,fe=ee.kind==="dir"&&ee.self?1:0;return he-fe||E(G)-E(ee)||G.label.localeCompare(ee.label)}),C=[],T=[],w=N=>{const G=b.flatMap(ee=>{var he;return[...((he=ee.get(N))==null?void 0:he.fileLinks.values())??[]]});return{fileLinks:G,files:[...new Set(G.map(ee=>ee.to))]}},A=(N,G,ee)=>{var Je;if(N.kind==="group"){const J=`g:${N.dir}`,ie=o.get(J)??!0,ye=[...v].filter(se=>se!==N.dir&&an(se,N.dir)).length,ge=v.has(N.dir)?w(`d:${N.dir}`).files.length:0,Y=v.has(N.dir)&&ge===0;if(C.push({id:J,kind:"group",dir:N.dir,label:N.label,fullLabel:k(N.dir),external:!1,depth:G,parent:ee,canOpen:!0,open:ie,folderCount:ye+(Y?1:0),directFileCount:ge}),ie)for(const se of $(N.children))A(se,G+1,J);else for(const se of l){if(se.open)continue;const ve=uv(e,se,N.dir,J);ve&&T.push(ve)}return}const he=`d:${N.dir}`,{fileLinks:fe,files:pe}=w(he),Te=J=>_(ie=>ie===he&&b.some(ye=>{var ge;return(ge=ye.get(ie))==null?void 0:ge.fileLinks.has(J)})),ht=(J,ie)=>{pe.sort((ye,ge)=>Te(ye)-Te(ge)||ye.localeCompare(ge));for(const ye of pe){const ge=ye.slice(2);C.push({id:ye,kind:"file",dir:N.dir,label:yt(ge),fullLabel:k(ge),external:!1,depth:J,parent:ie,file:ge})}T.push(...fe)};if(N.self&&pe.length>0){ht(G,ee);return}const Ze=pe.length>0&&(o.get(he)??!1);if(C.push({id:he,kind:"dir",dir:N.dir,label:N.label,fullLabel:N.self?`${k(N.dir)}(パッケージ)`:k(N.dir),external:!1,depth:G,parent:ee,self:N.self,canOpen:pe.length>0,open:Ze,fileCount:pe.length}),!Ze){for(const J of b){const ie=(Je=J.get(he))==null?void 0:Je.link;ie&&T.push(ie)}return}ht(G+1,he)};for(const N of $(qp([...v],g)))A(N,0,void 0);const I=[...m.values()].sort((N,G)=>_(ee=>ee===N.id)-_(ee=>ee===G.id)||N.label.localeCompare(G.label));for(const N of I){C.push({id:N.id,kind:"external",dir:N.dir,label:N.label,fullLabel:N.label,external:!0,depth:0});for(const G of b){const ee=(je=G.get(N.id))==null?void 0:je.link;ee&&T.push(ee)}}const P=(N,G)=>{var ee;return G.startsWith("t:")?!!((ee=N.get(`d:${Me(G.slice(2))}`))!=null&&ee.fileLinks.has(G)):G.startsWith("g:")?[...N.keys()].some(he=>he.startsWith("d:")&&an(he.slice(2),G.slice(2))):N.has(G)},z=new Map,K=N=>{let G=z.get(N.id);return G||z.set(N.id,G=gl(e,N,i)),G};for(const N of T){const G=p.get(N.from);G&&(N.keys=G.files.filter(ee=>P(K(ee),N.to)).map(ee=>`L:${ee.id}>${N.to}`))}const U=N=>N.endsWith(".go"),q=N=>{var G;return N.kind==="file"&&!!((G=N.parent)!=null&&G.startsWith("c:"))&&U(N.path)},D=new Map,W=N=>{let G=D.get(N.id);if(G)return G;const ee=p.get(N.id),he=ee.pkg.filter(fe=>U(fe.path));return G=ee.files.some(fe=>U(fe.path))&&he.length?Zi(e,{...N,files:he}):new Map,D.set(N.id,G),G},S=N=>p.get(N.id).files.filter(G=>!U(G.path)),X=l.map(N=>{if(q(N))return new Map;if(N.kind==="container"){const G=W(N);if(N.open)return G;const ee=Zi(e,{...N,files:S(N).flatMap(he=>he.files)});for(const[he,fe]of G){const pe=ee.get(he);pe?(pe.before||(pe.before=fe.before),pe.after||(pe.after=fe.after),pe.typeOnly&&(pe.typeOnly=fe.typeOnly)):ee.set(he,{...fe})}return ee}return N.open?new Map:Zi(e,N)}),H=new Map,j=(N,G)=>{if(G.kind!=="container"||G.open)return;const ee=uc(N),he=`L:${N}>${G.id}`,fe=[...W(G).keys()].some(ee)?[he]:[];for(const pe of S(G)){let Te=H.get(pe.id);Te||H.set(pe.id,Te=Zi(e,pe)),[...Te.keys()].some(ee)&&fe.push(`L:${N}>${pe.id}`)}return fe.length===1&&fe[0]===he?void 0:fe},M=new Set(X.flatMap(N=>[...N.keys()])),L=new Set([...M].map(Me)),F=Oa([...L]),V=N=>F?N.slice(F.length+1):N,Z=N=>{let G=0,ee=0;return X.forEach((he,fe)=>{for(const pe of he.keys())N(pe)&&(G+=fe,ee++)}),ee?G/ee:0},te=N=>{const G=uc(N);l.forEach((ee,he)=>{const fe=cv(N,ee.id,[...X[he]].filter(([Te])=>G(Te)).map(([,Te])=>Te));if(!fe)return;const pe=j(N,ee);pe&&(fe.keys=pe),re.push(fe)})},le=[],re=[],ce=(N,G,ee)=>{const he=[...M].filter(fe=>Me(fe)===N);he.sort((fe,pe)=>Z(Te=>Te===fe)-Z(Te=>Te===pe)||fe.localeCompare(pe));for(const fe of he){const pe=`i:f:${fe}`;le.push({id:pe,kind:"file",dir:N,label:yt(fe),fullLabel:V(fe),external:!1,depth:G,parent:ee,file:fe}),te(pe)}},oe=(N,G,ee)=>{if(N.kind==="group"){const Te=`i:g:${N.dir}`,ht=o.get(Te)??!0;if(le.push({id:Te,kind:"group",dir:N.dir,label:N.label,fullLabel:V(N.dir),external:!1,depth:G,parent:ee,canOpen:!0,open:ht,folderCount:[...L].filter(Ze=>Ze!==N.dir&&an(Ze,N.dir)).length,directFileCount:[...M].filter(Ze=>Me(Ze)===N.dir).length}),!ht)te(Te);else for(const Ze of[...N.children].sort((Je,J)=>Number(Je.kind==="dir"&&Je.self)-Number(J.kind==="dir"&&J.self)||Z(ie=>Je.kind==="group"?an(Me(ie),Je.dir):Me(ie)===Je.dir)-Z(ie=>J.kind==="group"?an(Me(ie),J.dir):Me(ie)===J.dir)||Je.label.localeCompare(J.label)))oe(Ze,G+1,Te);return}if(N.self)return ce(N.dir,G,ee);const he=`i:d:${N.dir}`,fe=[...M].filter(Te=>Me(Te)===N.dir).length,pe=o.get(he)??!1;le.push({id:he,kind:"dir",dir:N.dir,label:N.label,fullLabel:V(N.dir),external:!1,depth:G,parent:ee,canOpen:!0,open:pe,fileCount:fe}),pe?ce(N.dir,G+1,he):te(he)},de=qp([...L],F),we=N=>Z(G=>N.kind==="group"?an(Me(G),N.dir):Me(G)===N.dir);for(const N of[...de].sort((G,ee)=>we(G)-we(ee)||G.label.localeCompare(ee.label)))oe(N,0,void 0);return{sources:l,targets:C,links:T,targetPrefix:g,sourcePrefix:x,dependents:le,inLinks:re,dependentPrefix:F}}const y1=e=>e===""?"root":`d:${e}`,v1=e=>`f:${e}`,En=e=>e==="root"?"":e.slice(2);function cc(e,t,n,r){return{id:y1(e.path),kind:t,path:e.path,label:e.name,status:hl(e.stats),dir:e,full:r,children:n}}function dv(e){return{id:v1(e.path),kind:"file",path:e.path,label:yt(e.path),status:e.status,file:e,children:[]}}function x1(e,t){const n=r=>{const i=[];for(const o of r.dirs){const s=t.has(o.path);i.push(cc(o,s?"open":"dir",s?n(o):[],!0))}if(r.path===""||t.has(r.path))for(const o of r.files)i.push(dv(o));return i};return fv(n(e))}function w1(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 sv(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)?{...cc(l,"open",[],!1),collapsed:!0}:k1(cc(l,"open",i(l),!1)));for(const l of o.files)l.status!=="unchanged"&&s.push(dv(l));return s};return fv(i(t))}function k1(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 fv(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 pv=(e,t)=>`L:${e}>${t}`,Vr=e=>`I:${e}`;function Mr(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 Hd=m1;function Wd(e,t,n){const r=Mr(n);if(r.kind==="link"){const i=Hd(e,t,r.from,r.to);return!i||i.after===0?"resolved":"open"}if(r.id.startsWith("f:")){const i=e.fileByPath.get(En(r.id));return!i||i.status==="removed"?"resolved":"open"}return t.has(En(r.id))?"open":"resolved"}function Ci(e,t,n){const r=n.targets.map(o=>Wd(e,t,o)),i=r.filter(o=>o==="resolved").length;return i===0?"open":i===r.length?"resolved":"partial"}function dc(e,t){const n=iv(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 Ma(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=En(n);if(n.startsWith("f:"))return r;if(n.startsWith("d:"))return`${r}/ 配下`;if(n.startsWith("p:"))return`${r}/ 直下のファイル(パッケージ ${yt(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 hv(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:")?`${dc(e,r)}/ 配下`:dc(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 b1(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 mv(e,t,n,r=3){const i=Nr(e,t,`r:${n}`,!1);if(!i||i.files.length===0)return null;const o=[...gl(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})=>`${dc(e,l.dir)} (${a.before})`).join(", ");return`${n}/ の変更のないファイル ${i.files.length} 個の主な依存先: ${s}`}function gv(e,t,n,r={}){const i=r.includeResolved?n:n.filter(l=>Ci(e,t,l)!=="resolved"),o=e.graph,s=r.header===!1?[]:[...Bl(o),"対象: コードの依存関係(depshape)",""];return i.forEach((l,a)=>{var x;const u=l.targets.map(Mr).filter(b=>b.kind==="link"),c=l.targets.map(Mr).filter(b=>b.kind==="item"),d=[];if(u.length){d.push(u.length===1?"依存:":`依存(${u.length}件):`);for(const b of u){const v=Hd(e,t,b.from,b.to),m=b.from.startsWith("i:")?Ma(e,t,b.to):hv(e,b.to,v);d.push(` - ${Ma(e,t,b.from)} → ${m}(${b1(v,b.from.replace(/^i:/,""))})`)}}if(c.length){d.push(c.length===1?"対象:":`対象(${c.length}件):`);for(const b of c){const v=En(b.id);if(b.id.startsWith("f:")){const m=e.fileByPath.get(v),g=[];!m||m.status==="removed"?g.push("現在は存在しない"):(m.status==="added"&&g.push("今回追加"),m.status==="modified"&&g.push("今回変更")),d.push(` - ファイル ${v}${g.length?`(${g.join("、")})`:""}`)}else d.push(` - ${b.id.startsWith("d:")?`フォルダ ${v}/`:Ma(e,t,b.id)}`)}}const p=new Set;for(const b of u)b.from.startsWith("f:")&&p.add(((x=e.fileByPath.get(En(b.from)))==null?void 0:x.dir)??"");const h=[...p].filter(Boolean).map(b=>mv(e,t,b)).filter(b=>!!b);for(const b of h)d.push(`参考: ${b}`);const y=Ci(e,t,l);s.push(`${a+1}.${y==="partial"?"(一部は解消済み)":y==="resolved"?"(解消済み?)":""}`),s.push(...d.map(b=>` ${b}`)),s.push(` コメント: ${l.body.trim().replace(/\n/g,`
84
+ `)}`),s.push("")}),{text:s.join(`
85
+ `).trimEnd()+`
86
+ `,included:i.length,skipped:n.length-i.length}}function fc(e,t){var i;const n=En(t);if(t.startsWith("f:")){const o=n.slice(0,n.lastIndexOf("/"));return`${yt(o)}/${yt(n)}`}const r=((i=e.get(n))==null?void 0:i.name)??yt(n);return t.startsWith("r:")?`${r}/ のほか`:`${r}/`}function Kp(e,t,n){const r=Mr(n);if(r.kind==="item")return fc(t,r.id);const i=r.to.startsWith("x:")?r.to.slice(2):ov(e.graph.modules,r.to.slice(2));return`${fc(t,r.from)} → ${i}`}function E1(e){const t=Mr(e.targets[0]??"I:root");return t.kind==="link"?t.from:t.id}const S1=O.forwardRef(function(t,n){const{model:r,tree:i,comments:o,selection:s,draft:l}=t,[a,u]=O.useState("open"),d=o.map(x=>({c:x,state:Ci(r,i,x)})).filter(x=>a==="all"||x.state!=="resolved"),p=new Map;for(const x of d){const b=E1(x.c);p.set(b,[...p.get(b)??[],x])}const h=[...p.entries()].sort((x,b)=>En(x[0]).localeCompare(En(b[0]))),y=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:x=>u(x.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 で複数)するか、ツリーの行の 💬 から書けます。":"未対応のコメントはありません。「すべて」に切り替えると解消済み?のものも見られます。"}):h.map(([x,b])=>f.jsxs("section",{className:"comment-group",children:[f.jsx("div",{className:"comment-group-head",title:En(x),children:fc(i,x)}),b.map(({c:v,state:m})=>{var g;return f.jsx(Ad,{body:v.body,state:m,ai:v.ai,meta:v.targets.length>1?`${v.targets.length}件`:void 0,lit:(g=t.hoveredKeys)==null?void 0:g.some(k=>v.targets.includes(k)),editing:l.editingId===v.id,onMouseEnter:()=>t.onHoverComment(v.targets),onMouseLeave:()=>t.onHoverComment(null),top:f.jsx("ul",{className:"comment-targets",onClick:()=>t.onShow(v),title:"クリックで図に表示",children:v.targets.map(k=>f.jsx("li",{className:Wd(r,i,k)==="resolved"?"resolved":"",children:Kp(r,i,k)},k))}),onCopy:()=>$i(gv(r,i,[v],{includeResolved:!0}).text),onEdit:()=>t.onEdit(v),onDelete:()=>t.onDelete(v.id)},v.id)})]},x))}),f.jsx(Rd,{ref:n,className:"comment-composer",editing:l.editingId!==null,value:l.body,placeholder:"指摘を書く(例: usecase を経由する形にしてください)",onChange:x=>t.onDraft({...l,body:x}),onSave:t.onSave,onCancel:t.onCancel,canSave:s.length>0,showCancel:y,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(x=>f.jsxs("span",{className:`chip${x.startsWith("L:")?" link":""}`,title:x,children:[Kp(r,i,x),f.jsx("button",{onClick:()=>t.onRemoveTarget(x),title:"外す",children:"×"})]},x))]})})]})});function C1(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 N1(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:C1(o,t-(s?n("…/"):0),n)}}function yv(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 j1=(e,t)=>{const n=yv(e,t);return`${e}|${n.what}|${n.path}`},_1=(e,t)=>t===""||e===t||e.startsWith(`${t}/`);function vv(e,t,n){const[r,i,...o]=e.split("|");if(r!==t)return!1;const s=o.join("|"),l=yv(t,n);switch(i){case"tree":return l.what!=="ext"&&_1(l.path,s);case"dir":return l.what==="dir"&&l.path===s||l.what==="file"&&Me(l.path)===s;default:return i===l.what&&s===l.path}}const Gp=(e,t,n)=>[...e].some(r=>vv(r,t,n));function pc(e,t,n){return new Set([...e].filter(r=>!vv(r,t,n)))}const xv=(e,t)=>ic("depshape",e,t),wv=(e,t)=>oc("depshape",e,t),$1=7.3,dt=28,Pa=8,Cn=10,T1=18,L1=18,Ps=120,I1=20,A1=16,R1=14,O1="12px ui-monospace, SFMono-Regular, Menlo, monospace";let Wr;function Gn(e){if(Wr===void 0&&(Wr=document.createElement("canvas").getContext("2d"),Wr&&(Wr.font=O1)),Wr)return Wr.measureText(e).width;let t=0;for(const n of e)t+=/[ -鿿＀-￯]/.test(n)?2:1;return t*$1}function Yp(e,t){if(Gn(e)<=t)return e;const n=[...e];let r=0;for(;r<n.length&&Gn("…"+n.slice(r).join(""))>t;)r++;return"…"+n.slice(r).join("")}const M1=(e,t)=>N1(e,t,Gn);function Xp(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 Qp(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 Zp(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(Ps,o);break}for(const l of s)n[l]=e[l],i-=e[l];r=r.filter(l=>!s.includes(l))}return n}const Fa=e=>new Map(e.map(t=>[t.id,t.parent])),Da=(e,t,n)=>{for(let r=e.get(t);r;r=e.get(r))if(r===n)return!0;return!1},za=e=>e.metaKey||e.ctrlKey||e.shiftKey,Jp=e=>e.detail>1,ms=e=>e.stopPropagation();function P1(e){const{model:t,tree:n,pins:r,hovered:i,targetOpen:o,sourceOpen:s}=e,[l,a]=O.useState(()=>xv("external","0")==="1"),u=O.useMemo(()=>g1(t,n,r,i,l,o,s),[t,n,r,i,l,o,s]),c=O.useMemo(()=>Fa(u.sources),[u]),d=O.useMemo(()=>Fa(u.targets),[u]),p=O.useMemo(()=>Fa(u.dependents),[u]),h=(R,B)=>Da(c,R,B),y=(R,B)=>Da(d,R,B),x=(R,B)=>Da(p,R,B),b=R=>R.depth*A1,v=R=>R.some(B=>B.canOpen)?R1:0,m=v(u.sources),g=v(u.targets),k=v(u.dependents),_=R=>[R.folderCount?`${R.folderCount} フォルダ`:"",R.directFileCount?`${R.directFileCount} ファイル`:""].filter(Boolean).join("・"),E=R=>R.open?"":R.kind==="group"?` ${_(R)}`:R.fileCount?` ${R.fileCount} ファイル`:"",[$,C]=O.useState(null),T=O.useMemo(()=>{const R=(B,Q)=>new Set(e.hidden.size?Q.filter(ne=>Gp(e.hidden,B,ne.id)).map(ne=>ne.id):[]);return{S:R("S",u.sources),T:R("T",u.targets),I:R("I",u.dependents)}},[u,e.hidden]),w=O.useMemo(()=>u.links.filter(R=>!T.S.has(R.from)&&!T.T.has(R.to)),[u,T]),A=O.useMemo(()=>u.inLinks.filter(R=>!T.I.has(R.from)&&!T.S.has(R.to)),[u,T]),[I,P]=O.useState(null);O.useEffect(()=>{if(!I)return;const R=()=>P(null),B=Q=>Q.key==="Escape"&&R();return window.addEventListener("pointerdown",R),window.addEventListener("keydown",B),window.addEventListener("scroll",R,!0),window.addEventListener("blur",R),()=>{window.removeEventListener("pointerdown",R),window.removeEventListener("keydown",B),window.removeEventListener("scroll",R,!0),window.removeEventListener("blur",R)}},[I]);const z=R=>R&&e.openLabel(R)?R:void 0,K=(R,B,Q)=>ne=>{ne.preventDefault(),ne.stopPropagation(),P({x:ne.clientX,y:ne.clientY,col:R,id:B,file:Q,openAs:Q&&e.openLabel(Q)})},U=R=>{const B=R&&e.openLabel(R);return{dbl:B?`
87
+ ダブルクリックで${B==="差分を開く"?"このファイルの差分":"このファイル"}を開く`:"",menu:B?`「${B}」、`:""}},q=R=>w.filter(B=>B.from===R||h(B.from,R)),D=R=>new Set(u.links.filter(B=>B.from===R.id||h(B.from,R.id)).map(B=>B.to)).size,W=R=>w.filter(B=>B.to===R||y(B.to,R)),S=R=>A.filter(B=>B.from===R||x(B.from,R)),X=R=>R.keys??[pv(R.from,R.to)],H=R=>[...new Set(R.flatMap(X))],j=O.useRef(null),[M,L]=O.useState(600);O.useEffect(()=>{const R=j.current;if(!R)return;const B=new ResizeObserver(()=>L(R.clientWidth));return B.observe(R),L(R.clientWidth),()=>B.disconnect()},[u.sources.length>0]),O.useEffect(()=>{var R,B;i&&((B=(R=j.current)==null?void 0:R.querySelector(`[data-src="${CSS.escape(i)}"]`))==null||B.scrollIntoView({block:"nearest"}))},[i,u]);const F=u.dependents.length>0,V=F?3:2,Z=Math.round(Math.min(110,Math.max(44,M*.26/V))),te=44,le=24+I1,re=R=>R.label+(R.suffix??"")+(D(R)===0&&!R.open?" 依存なし":""),ce=(R,B)=>Math.max(Ps,...R.map(Q=>le+b(Q)+B+Gn(Q.label+E(Q)))),oe=Math.max(Ps,...u.sources.map(R=>te+b(R)+m+Gn(re(R)))),de=ce(u.targets,g),we=F?ce(u.dependents,k):0,je=Math.max(Ps*V,M-Cn*2-Z*(V-1)-4),[N,G,ee]=F?Zp([we,oe,de],je):[0,...Zp([oe,de],je)],he=Cn,fe=F?he+N+Z:Cn,pe=fe+G+Z,Te=pe+ee+Cn,ht=R=>R?R*(dt+Pa)-Pa:0,Je=Cn+(F?L1:0),J=Je+(u.targetPrefix||u.sourcePrefix||u.dependentPrefix?T1:0),ie=Math.max(ht(u.sources.length),ht(u.targets.length),ht(u.dependents.length)),ye=R=>{const B=J+(ie-ht(R.length))/2;return new Map(R.map((Q,ne)=>[Q.id,B+ne*(dt+Pa)]))},ge=ye(u.sources),Y=ye(u.targets),se=ye(u.dependents),ve=J+ie+Cn,be=(R,B)=>$===null?!1:B?R.from===$||x(R.from,$)||R.to===$||h(R.to,$):R.from===$||h(R.from,$)||R.to===$||y(R.to,$),Ee=[...w,...A].some(R=>X(R).some(B=>e.selection.has(B))),Ie={unchanged:0,removed:1,added:2},ut=R=>[...R].sort((B,Q)=>Ie[B.status]-Ie[Q.status]),Ye=R=>R?`${t.graph.repoRoot}/${R}`:t.graph.repoRoot,We=R=>`${R.label}${R.suffix??""}`,Oe=R=>R.kind==="group"?`${R.fullLabel}/ 配下`:R.kind==="dir"&&!R.file&&R.id.startsWith("i:")?`${R.fullLabel}/ 直下`:R.fullLabel,et=(R,B,Q)=>{if(B)return[R.status==="added"?"今回追加した import":R.status==="removed"?"今回削除した import":"既存の import"];const ne=[`import しているファイル: 変更前 ${R.before} → 変更後 ${R.after}${Q!==void 0?`(${Q} ファイル中)`:""}`];return(R.added||R.removed)&&ne.push(`うち 今回追加 ${R.added} / 今回削除 ${R.removed}`),ne},bt=(R,B,Q)=>{var xe;const ne=[`${We(B)} → ${Oe(Q)}${R.typeOnly?"(型のみの import)":""}`];if(ne.push(...et(R,B.kind==="file",B.files.filter(Se=>Se.status!=="removed").length)),(xe=R.files)!=null&&xe.length){const Se={added:"+",removed:"−",unchanged:"・"};ne.push("import しているファイル:");for(const Ce of R.files.slice(0,12))ne.push(` ${Se[Ce.status]} ${Ce.path.slice(Q.dir?Q.dir.length+1:0)}`);R.files.length>12&&ne.push(` …ほか ${R.files.length-12} 件`)}return ne.join(`
88
+ `)},Dn=(R,B,Q)=>[`${Oe(B)} → ${We(Q)}${R.typeOnly?"(型のみの import)":""}`,...et(R,B.kind==="file")].join(`
89
+ `),ot=(R,B,Q,ne,xe,Se,Ce,$e)=>{const mt=Z/2,st=X(R),ct=st.length>0&&st.every(zt=>e.selection.has(zt)),jt=st.some(zt=>{var Br;return(Br=e.litKeys)==null?void 0:Br.has(zt)}),hr=st.reduce((zt,Br)=>zt+(e.commentCounts.get(Br)??0),0),tt=be(R,Se),zn=`M${B},${Q} C${B+mt},${Q} ${ne-mt},${xe} ${ne},${xe}`,Bn=zt=>[Xp(zt,B,B+mt,ne-mt,ne),Xp(zt,Q,Q,xe,xe)];return f.jsxs("g",{className:`plink${tt||jt?" active":""}${ct?" selected":""}`,onClick:zt=>e.onSelectKeys(st,za(zt)),onMouseEnter:()=>e.onHoverKey(st),onMouseLeave:()=>e.onHoverKey(null),children:[(ct||jt)&&f.jsx("path",{d:zn,className:jt?"psel lit":"psel",style:{strokeWidth:Qp(R)+7}}),f.jsx("path",{d:zn,className:`medge ${R.status}${R.typeOnly?" typeonly":""}${tt||ct||jt?" active":""}`,style:{strokeWidth:Qp(R)},markerEnd:`url(#parrow-${R.status})`}),f.jsx("path",{d:zn,className:"phit",children:f.jsx("title",{children:`${Ce}
90
+ クリックで選択(⌘ / Shift で追加)`})}),hr>0&&f.jsxs("g",{className:"pcomment",children:[f.jsx("circle",{cx:Bn(.5)[0],cy:Bn(.5)[1],r:7}),f.jsx("text",{x:Bn(.5)[0],y:Bn(.5)[1]+3.5,textAnchor:"middle",children:hr})]}),$e!==null&&f.jsx("text",{x:Bn($e)[0],y:Bn($e)[1]-4,textAnchor:"middle",className:"pcount",children:R.before!==R.after?`${R.before}→${R.after}`:R.after})]},`${R.from}>${R.to}`)},Ri=(R,B)=>{const{dir:Q,name:ne}=M1(R,B);return f.jsxs(f.Fragment,{children:[Q&&f.jsx("tspan",{className:"pdir",children:Q}),f.jsx("tspan",{className:"pname",children:ne})]})},Ko=(R,B)=>{var gf;const Q=B==="dependent",ne=(Q?se:Y).get(R.id),xe=Q?he:pe,Se=Q?N:ee,Ce=Q?k:g,$e=xe+b(R),mt=Se-b(R),st=R.file?`f:${R.file}`:R.kind==="group"||Q?`d:${R.dir}`:R.self?`p:${R.dir}`:R.id,ct=r.includes(st),jt=Q?S(R.id):W(R.id),hr=jt.length>0&&jt.every(rn=>rn.status==="added"),tt=R.file?(gf=t.fileByPath.get(R.file))==null?void 0:gf.status:void 0,zn=E(R),Bn=Q?"import している側の":"import している ",zt=R.kind==="group"?_(R):`import している ${R.fileCount} ファイル`,Br=R.canOpen?R.open?`
91
+ ▾ でまとめる`:`
92
+ ▸ で開いて、${zt}を表示`:"",ew=R.external?`${R.dir}(外部パッケージ)`:R.file?`${Ye(R.file)}${tt==="added"?"(今回追加したファイル)":tt==="modified"?"(今回変更したファイル)":""}`:R.kind==="group"?`${Ye(R.dir)}/ 配下(${Bn}${_(R)}をまとめた行)`:Q?`${Ye(R.dir)}/ 直下の、import しているファイル`:`${Ye(R.dir)}${R.self?`
93
+ このパッケージ(フォルダ直下のファイル)だけ。下のフォルダは含まない`:""}`,tw=Q?"ここから出る依存":"ここに入る依存",Go=z(R.file),mf=U(Go);return f.jsxs("g",{className:`pnode target ${R.kind}${Q?" dependent":""}${(Q?T.I:T.T).has(R.id)?" hid":""}${R.self?" self":""}${R.open?" open":""}${hr?" new":""}${ct?" pinned":""}${tt&&tt!=="unchanged"?` f-${tt}`:""}`,onMouseEnter:()=>C(R.id),onMouseLeave:()=>C(null),onClick:rn=>!Jp(rn)&&e.onSelectKeys(H(jt),za(rn)),onDoubleClick:Go?()=>{var rn;return(rn=e.onOpenFile)==null?void 0:rn.call(e,Go)}:void 0,onContextMenu:K(Q?"I":"T",R.id,Go),children:[f.jsx("title",{children:`${ew}
94
+ クリックで${tw}をすべて選択${Br}${mf.dbl}
95
+ 右クリックで${mf.menu}線を非表示 / 表示`}),f.jsx("rect",{x:$e,y:ne,width:mt,height:dt,rx:6}),R.canOpen&&f.jsxs("g",{className:"pchev",onClick:rn=>{rn.stopPropagation(),e.onToggleTarget(R.id,!R.open)},onDoubleClick:ms,children:[f.jsx("title",{children:R.open?"まとめる":`開いて、${zt}を表示`}),f.jsx("rect",{x:$e,y:ne,width:10+Ce,height:dt}),f.jsx("text",{x:$e+8,y:ne+dt/2+4,children:R.open?"▾":"▸"})]}),f.jsxs("text",{x:$e+10+Ce,y:ne+dt/2+4,className:"plabel",children:[R.external?Yp(R.label,mt-le-Ce):Ri(R.label,mt-le-Ce-(zn?Gn(zn):0)),zn&&f.jsx("tspan",{className:"pnone",children:zn})]}),!R.external&&f.jsxs("g",{className:`pbtn${ct?" on":""}`,onClick:rn=>{rn.stopPropagation(),e.onTogglePin(st)},onDoubleClick:ms,children:[f.jsx("title",{children:ct?"ピン留め中(クリックでピン留めを外す)":"ピン留めして、この先の依存をたどる"}),f.jsx("rect",{x:$e+mt-26,y:ne+4,width:20,height:dt-8,rx:4}),f.jsx(rc,{on:ct,x:$e+mt-23,y:ne+dt/2-7})]})]},R.id)},pr=(R,B,Q)=>R&&f.jsxs("text",{x:B,y:Je+10,className:"pcaption",children:[f.jsx("title",{children:Ye(R)}),Yp(`${R}/ 以下`,Q)]});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:R=>{a(R.target.checked),wv("external",R.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:Te,height:ve,className:`panel-svg${$||e.litKeys?" hovering":""}${Ee?" selecting":""}`,children:[f.jsx("defs",{children:["unchanged","added","removed"].map(R=>f.jsx("marker",{id:`parrow-${R}`,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 ${R}`})},R))}),F&&f.jsxs("g",{className:"ptitle",children:[f.jsx("text",{x:he,y:Cn+10,children:"依存元(使っている側)"}),f.jsx("text",{x:fe,y:Cn+10,children:"ピン留め"}),f.jsx("text",{x:pe,y:Cn+10,children:"依存先(使っているもの)"})]}),pr(u.dependentPrefix,he,N),pr(u.sourcePrefix,fe,G),pr(u.targetPrefix,pe,ee),ut(A).map(R=>{const B=u.dependents.find(ne=>ne.id===R.from),Q=u.sources.find(ne=>ne.id===R.to);return ot(R,he+N,se.get(R.from)+dt/2,fe+b(Q)-1,ge.get(R.to)+dt/2,!0,Dn(R,B,Q),B.kind!=="file"?.2:null)}),ut(w).map(R=>{const B=u.sources.find(ne=>ne.id===R.from),Q=u.targets.find(ne=>ne.id===R.to);return ot(R,fe+G,ge.get(R.from)+dt/2,pe+b(Q)-1,Y.get(R.to)+dt/2,!1,bt(R,B,Q),B.kind!=="file"?.8:null)}),u.dependents.map(R=>Ko(R,"dependent")),u.sources.map(R=>{const B=ge.get(R.id),Q=D(R),ne=fe+b(R),xe=G-b(R),Se=R.kind==="container",Ce=Q===0&&!R.open,$e=Se?`/
96
+ ピン留めした ${R.files.length} ファイルをまとめた箱(Go ではこの箱がパッケージで、依存元の線はここに届きます)`:R.kind==="file"?"":`
97
+ ${R.files.length} ファイル`,mt=H([...q(R.id),...Se?A.filter(tt=>tt.to===R.id):[]]),st=Se?"ファイルごと":"中のフォルダ・ファイルごと",ct=R.canOpen?R.open?`
98
+ ▾ でまとめる`:`
99
+ ▸ で開いて、${st}に分ける`:"",jt=R.kind==="file"?z(R.path):void 0,hr=U(jt);return f.jsxs("g",{"data-src":R.id,className:`pnode source ${R.kind} ${R.status}${T.S.has(R.id)?" hid":""}${R.pinned?" pinned":" temp"}${R.depth?" child":""}${R.open?" open":""}`,onMouseEnter:()=>C(R.id),onMouseLeave:()=>C(null),onClick:tt=>!Jp(tt)&&e.onSelectKeys(mt,za(tt)),onDoubleClick:jt?()=>{var tt;return(tt=e.onOpenFile)==null?void 0:tt.call(e,jt)}:void 0,onContextMenu:K("S",R.id,jt),children:[f.jsx("title",{children:`${Ye(R.path)}${$e}
100
+ 依存先 ${Q}
101
+ クリックで${Se?"この箱に出入りする":"ここから出る"}依存をすべて選択${ct}${hr.dbl}
102
+ 右クリックで${hr.menu}線を非表示 / 表示`}),f.jsx("rect",{x:ne,y:B,width:xe,height:dt,rx:6}),R.canOpen&&f.jsxs("g",{className:"pchev",onClick:tt=>{tt.stopPropagation(),e.onToggleSource(R.id,!R.open)},onDoubleClick:ms,children:[f.jsx("title",{children:R.open?"まとめる":`開いて、${st}に分ける`}),f.jsx("rect",{x:ne,y:B,width:10+m,height:dt}),f.jsx("text",{x:ne+8,y:B+dt/2+4,children:R.open?"▾":"▸"})]}),f.jsxs("text",{x:ne+10+m,y:B+dt/2+4,className:"plabel",children:[Ri(R.label,xe-te-m-Gn(R.suffix??"")-(Ce?Gn(" 依存なし"):0)),R.suffix&&f.jsx("tspan",{className:"psuffix",children:R.suffix}),Ce&&f.jsx("tspan",{className:"pnone",children:" 依存なし"})]}),R.isPin&&f.jsxs("g",{className:"pbtn",onClick:tt=>{tt.stopPropagation(),e.onTogglePin(R.id)},onDoubleClick:ms,children:[f.jsx("title",{children:"ピン留め中(クリックでピン留めを外す)"}),f.jsx("rect",{x:fe+G-26,y:B+4,width:20,height:dt-8,rx:4}),f.jsx(rc,{on:R.pinned,x:fe+G-23,y:B+dt/2-7})]})]},R.id)}),u.targets.map(R=>Ko(R,"target"))]})}),I&&f.jsx("div",{className:"panel-menu",style:{left:I.x,top:I.y},role:"menu",onPointerDown:R=>R.stopPropagation(),children:(()=>{const R=Gp(e.hidden,I.col,I.id),B=ne=>()=>{e.onHiddenChange(ne),P(null)},Q=I.file;return f.jsxs(f.Fragment,{children:[Q&&f.jsxs(f.Fragment,{children:[f.jsxs("button",{role:"menuitem",onClick:()=>{var ne;(ne=e.onOpenFile)==null||ne.call(e,Q),P(null)},children:[f.jsx(_d,{size:14}),I.openAs]}),f.jsx("div",{className:"panel-menu-sep",role:"separator"})]}),R?f.jsxs("button",{role:"menuitem",onClick:B(pc(e.hidden,I.col,I.id)),children:[f.jsx(_a,{on:!0}),"表示"]}):f.jsxs("button",{role:"menuitem",onClick:B(new Set([...e.hidden,j1(I.col,I.id)])),children:[f.jsx(_a,{on:!1}),"非表示"]}),f.jsxs("button",{role:"menuitem",disabled:e.hidden.size===0,onClick:B(new Set),children:[f.jsx(_a,{on:!0}),"すべて表示"]})]})})()})]})}const yl=340,eh=220,th=360,nh=260,kv="depshape.layout";function F1(){try{const e=JSON.parse(localStorage.getItem(kv)??"{}");return{tree:typeof e.tree=="number"&&e.tree>0?e.tree:void 0,side:typeof e.side=="number"&&e.side>0?e.side:yl}}catch{return{side:yl}}}function gs(e){try{localStorage.setItem(kv,JSON.stringify(e))}catch{}}function ys(e,t,n){const r=Rr*(n?2:1);let i=e.side;n&&(i=Math.max(nh,Math.min(i,t-r-eh-th)));const o=t-r-(n?i:0);return{tree:e.tree===void 0?void 0:Math.max(eh,Math.min(e.tree,o-th)),side:Math.max(nh,i)}}function D1(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,`${Rr}px`,r,...t?[`${Rr}px`,`${e.side}px`]:[]].join(" ")}const bv="depshape.reviewed:",z1=e=>`${e.repoRoot}|${e.targetLabel}|${e.baseLabel}`,rh=e=>nn(bv+e,{}),B1=(e,t)=>$t(bv+e,t);function U1(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,ao(i.sort())]))}function H1(e,t){const n=new Set;for(const[r,i]of e)t[r]===i&&n.add(r);return n}function ih(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 Ev=e=>`import が ${e.added} 増え、${e.removed} 減った`,W1=e=>e.metaKey||e.ctrlKey||e.shiftKey;function V1(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 Ba=e=>t=>{t.stopPropagation(),e()};function q1(e){const{model:t,root:n,tree:r,open:i,mode:o,pins:s}=e,l=!!e.onOpenFile,[a,u]=O.useState(null),c=O.useRef(void 0),d=O.useRef(null),p=O.useRef(null),h=O.useRef(null),[y,x]=O.useState(F1),b=Ly(h),v=O.useRef(null),m=O.useMemo(()=>[...i].sort().join("|"),[i]),g=O.useMemo(()=>[...e.collapsed].sort().join("|"),[e.collapsed]),k=O.useMemo(()=>o==="all"?x1(n,i):w1(t,n,e.collapsed),[t,n,r,o,m,g]),_=O.useMemo(()=>V1(t,k),[t,k]),E=O.useMemo(()=>{const Y=[];let se=!1;const ve=be=>{for(const Ee of be)Ee.kind==="open"&&(Ee.collapsed?se=!0:(Y.push(Ee.path),ve(Ee.children)))};return ve(k.roots),{shown:Y,folded:se}},[k]),$=o==="all"?E.shown.length>0:!E.folded,C=O.useMemo(()=>new Set(s),[s]),[T,w]=O.useState(()=>new Map),A=(Y,se)=>w(ve=>new Map(ve).set(Y,se)),[I,P]=O.useState(()=>new Map),z=(Y,se)=>P(ve=>new Map(ve).set(Y,se)),[K,U]=O.useState(()=>new Set),[q,D]=O.useState([]),[W,S]=O.useState({editingId:null,body:""}),[X,H]=O.useState(null),[j,M]=O.useState(null),L=O.useRef(null),F=O.useMemo(()=>new Set(q),[q]),{comments:V,sidebarOpen:Z,onSidebarOpen:te}=e,le=O.useMemo(()=>V.filter(Y=>Ci(t,r,Y)!=="resolved"),[V,t,r]),re=O.useMemo(()=>{const Y=new Map;for(const se of le)for(const ve of se.targets)Y.set(ve,(Y.get(ve)??0)+1);return Y},[le]),ce=Y=>{const se=ve=>Y===""||ve.startsWith(Y+"/");return le.filter(ve=>ve.targets.some(be=>{const Ee=Mr(be);return se(En(Ee.kind==="item"?Ee.id:Ee.from.startsWith("i:")?Ee.to:Ee.from))})).length},oe=()=>{L.current?L.current.focus():window.setTimeout(()=>{var Y;return(Y=L.current)==null?void 0:Y.focus()},0)},de=(Y,se)=>{if(Y.length===0)return;let ve=[];D(be=>(se?ve=Y.every(Ie=>be.includes(Ie))?be.filter(Ie=>!Y.includes(Ie)):[...be,...Y.filter(Ie=>!be.includes(Ie))]:ve=be.length===Y.length&&Y.every(Ie=>be.includes(Ie))?[]:Y,ve)),Y.length&&te(!0)},we=()=>{D([]),S({editingId:null,body:""})},je=O.useRef(e.active);je.current=e.active,O.useEffect(()=>{const Y=se=>{!je.current||document.activeElement instanceof HTMLTextAreaElement||document.activeElement instanceof HTMLInputElement||(se.key==="Escape"&&D([]),se.key==="c"&&!se.metaKey&&!se.ctrlKey&&!se.altKey&&(se.preventDefault(),te(!0),oe()))};return window.addEventListener("keydown",Y),()=>window.removeEventListener("keydown",Y)},[]);const N=()=>{if(!W.body.trim()||q.length===0)return;const Y=W.editingId?V.map(se=>se.id===W.editingId?{...se,targets:q,body:W.body.trim()}:se):[...V,{id:`${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`,targets:q,body:W.body.trim(),createdAt:Date.now()}];e.onCommentsChange(Y),we()},G=Y=>{const se=Y.targets.map(Mr).flatMap(be=>be.kind==="link"?[be]:[]),ve=se.map(be=>be.from.startsWith("i:")?be.to:be.from);U(be=>{let Ee=new Set(be);for(const Ie of se){const ut=Ie.from.startsWith("i:");Ee=pc(pc(Ee,ut?"I":"S",Ie.from),ut?"S":"T",Ie.to)}return Ee}),e.onPin(ve.filter(be=>!be.startsWith("c:"))),P(be=>{const Ee=new Map(be);for(const Ie of ve)Ie.startsWith("f:")&&Ee.set(`c:${Me(Ie.slice(2))}`,!0);return Ee}),w(be=>{const Ee=new Map(be);for(const Ie of se){if(Ie.from.startsWith("i:")){const We=Ie.from.slice(2),Oe=We.startsWith("f:")?Me(We.slice(2)):We.slice(2);for(let et=Me(Oe);et;et=Me(et))Ee.set(`i:g:${et}`,!0);We.startsWith("f:")?Ee.set(`i:d:${Oe}`,!0).set(`i:g:${Oe}`,!0):We.startsWith("d:")?Ee.set(`i:d:${Oe}`,!1).set(`i:g:${Oe}`,!0):Ee.set(`i:g:${Oe}`,!1);continue}if(Ie.to.startsWith("x:"))continue;const ut=Ie.to.slice(2),Ye=Ie.to.startsWith("t:")?Me(ut):ut;for(let We=Me(Ye);We;We=Me(We))Ee.set(`g:${We}`,!0);Ie.to.startsWith("t:")?Ee.set(`d:${Ye}`,!0).set(`g:${Ye}`,!0):Ie.to.startsWith("d:")?Ee.set(`d:${Ye}`,!1).set(`g:${Ye}`,!0):Ee.set(`g:${Ye}`,!1)}return Ee}),D(Y.targets)},ee=Y=>{G(Y),S({editingId:Y.id,body:Y.body}),oe()},he=Y=>{window.clearTimeout(c.current),u(Y)},fe=()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>u(null),80)},pe=Y=>{var se;return((se=d.current)==null?void 0:se.querySelector(`[data-id="${CSS.escape(Y)}"]`))??null},Te=(Y,se)=>Y.getBoundingClientRect().top-se.getBoundingClientRect().top;O.useLayoutEffect(()=>{const Y=d.current;if(!Y||!v.current)return;const se=pe(v.current.id);se&&(Y.scrollTop+=Te(se,Y)-v.current.top),v.current=null},[k]);const ht=Y=>{const se=d.current,ve=pe(Y.id);se&&ve&&(v.current={id:Y.id,top:Te(ve,se)}),o==="changes"?e.onCollapseToggle(Y.path):e.onToggle(Y.path)},Ze=Y=>Y?`${t.graph.repoRoot}/${Y}`:t.graph.repoRoot,Je=Y=>{const se=Y.dir.stats,ve=[["added","追加"],["modified","変更"],["removed","削除"]].filter(([be])=>se[be]>0).map(([be,Ee])=>`${Ee} ${se[be]}`);return ve.length?`(${ve.join("・")})`:""},J=Y=>ih(Y.path,e.reviewTargets,e.reviewed)?`
103
+ 中の変更したファイルはすべて確認済み`:"",ie=Y=>{switch(Y.kind){case"file":return`${Ze(Y.path)}
104
+ ${Y.file.linesAfter??Y.file.linesBefore} 行`;case"dir":return`${Ze(Y.path)}
105
+ ${Y.dir.stats.total} ファイル${Je(Y)}(クリックで開く)${J(Y)}`;case"open":return`${Ze(Y.path)}
106
+ ${Y.dir.stats.total} ファイル${Je(Y)}(${Y.collapsed?"クリックで開く":"クリックで閉じる"})${J(Y)}`}},ye=Y=>{var Dn;const se=Y.kind==="open"&&!Y.collapsed,ve=Y.kind==="file"?Y.label:`${Y.label}/`,be=Y.kind==="open"&&!Y.collapsed?void 0:_.get(Y.id),Ee=C.has(Y.id),Ie=re.get(Vr(Y.id))??0,ut=Y.kind==="dir"||Y.kind==="open"&&Y.collapsed,Ye=Ie||(ut?ce(Y.path):0),We=Y.kind==="file"&&e.reviewTargets.has(Y.path),Oe=Y.kind==="file"?e.openLabel(Y.path):void 0,et=Y.kind==="file"?e.reviewed.has(Y.path):Y.kind==="dir"||Y.kind==="open"?ih(Y.path,e.reviewTargets,e.reviewed):!1,bt=["trow",Y.kind,Y.status,(Dn=Y.file)!=null&&Dn.isTest?"test":"",Ee?"pinned":"",et?"reviewed":"",a===Y.id?"hovered":"",F.has(Vr(Y.id))?"picked":"",X!=null&&X.has(Vr(Y.id))?"lit":""].filter(Boolean).join(" ");return f.jsxs("div",{className:bt,"data-id":Y.id,title:ie(Y),onMouseEnter:()=>he(Y.id),onMouseLeave:fe,onClick:ot=>{W1(ot)?de([Vr(Y.id)],!0):Y.kind!=="file"&&ht(Y)},onDoubleClick:Oe?()=>{var ot;return(ot=e.onOpenFile)==null?void 0:ot.call(e,Y.path)}:void 0,children:[Y.kind==="file"?f.jsxs(f.Fragment,{children:[We?f.jsx("input",{type:"checkbox",className:"tcheckbox",checked:et,onClick:ot=>ot.stopPropagation(),onDoubleClick:ot=>ot.stopPropagation(),onChange:ot=>e.onReviewed(Y.path,ot.target.checked),"aria-label":`${Y.path} を確認済みにする`,title:"確認済み(このファイルの依存がまた変わると外れます)"}):f.jsx("span",{className:"tcheckbox-space"}),f.jsx(Ei,{status:Y.status,small:!0})]}):f.jsxs(f.Fragment,{children:[f.jsx("span",{className:`tfold${se?" open":""}`,children:f.jsx($d,{size:12})}),Y.dir&&f.jsx(Ei,{status:Y.status,small:!0,title:null})]}),f.jsx("span",{className:"tlabel",children:ve}),f.jsx("span",{className:"tspacer"}),be&&f.jsx(Li,{stats:be,title:Ev(be)}),Ye>0&&f.jsx(Ao,{n:Ye,title:Ie?"この行へのコメント":"この中のファイルへのコメント(未対応)"}),l&&(Oe?f.jsx("button",{className:"tbtn tdiff",onClick:Ba(()=>{var ot;return(ot=e.onOpenFile)==null?void 0:ot.call(e,Y.path)}),title:`${Oe}(ダブルクリックでも開けます)`,"aria-label":Oe,children:f.jsx(_d,{size:13})}):f.jsx("span",{className:"tbtn-space"})),f.jsx("button",{className:"tbtn",onClick:Ba(()=>{D([Vr(Y.id)]),te(!0),oe()}),title:"この行にコメントを書く(⌘ / Shift + クリックで複数選択)","aria-label":"コメントする",children:f.jsx(Ti,{size:13})}),f.jsx("button",{className:`tbtn tpin${Ee?" on":""}`,onClick:Ba(()=>e.onTogglePin(Y.id)),title:Ee?"パネルにピン留め中(クリックでピン留めを外す)":"パネルにピン留めする(表示し続ける)",children:f.jsx(rc,{on:Ee})})]})},ge=Y=>Y.map(se=>se.kind==="open"?f.jsxs("div",{className:`tgroup ${se.status}${se.full?"":" pruned"}${se.collapsed?" collapsed":""}`,children:[ye(se),!se.collapsed&&f.jsx("div",{className:"tchildren",children:ge(se.children)})]},se.id):f.jsx("div",{children:ye(se)},se.id));return f.jsxs("div",{className:"map",children:[f.jsxs("div",{className:`map-body${Z?" with-sidebar":""}`,ref:h,style:{gridTemplateColumns:D1(b?ys(y,b,Z):y,Z)},children:[f.jsxs("aside",{className:"tree-col",ref:p,children:[f.jsxs("div",{className:"tree-head",children:[f.jsx("div",{className:"ds-seg tree-mode",role:"radiogroup","aria-label":"表示範囲",children:[["changes","変更","変更したファイルだけを表示(依存先は右のパネルに出ます)"],["all","全体","リポジトリ全体のツリーを表示(最初は変更のあるフォルダだけ開いています)"]].map(([Y,se,ve])=>f.jsx("button",{role:"radio","aria-checked":o===Y,className:o===Y?"on":"",onClick:()=>e.onModeChange(Y),title:ve,children:se},Y))}),f.jsx("button",{className:"tree-fold",onClick:()=>e.onFold($,E.shown),title:$?"すべてのフォルダを閉じる":o==="all"?"変更のあるフォルダを開く":"すべてのフォルダを開く",children:$?"−":"+"})]}),f.jsx("div",{className:"map-scroll tree",ref:d,onMouseLeave:fe,children:ge(k.roots)})]}),f.jsx(Io,{title:"ドラッグでツリーとパネルの幅を変える(ダブルクリックで元に戻す)",start:()=>{var Y;return((Y=p.current)==null?void 0:Y.getBoundingClientRect().width)??0},onDrag:(Y,se)=>x(ve=>ys({...ve,tree:Y+se},b,Z)),onEnd:()=>x(Y=>(gs(Y),Y)),onReset:()=>x(Y=>(gs({...Y,tree:void 0}),{...Y,tree:void 0}))}),f.jsx(P1,{model:t,tree:r,pins:s,hovered:a&&!C.has(a)?a:null,onTogglePin:e.onTogglePin,onClearPins:e.onClearPins,selection:F,litKeys:X,commentCounts:re,onSelectKeys:de,onHoverKey:M,targetOpen:T,sourceOpen:I,onToggleSource:z,onToggleTarget:A,hidden:K,onHiddenChange:U,openLabel:e.openLabel,onOpenFile:e.onOpenFile}),Z&&f.jsx(Io,{title:"ドラッグでコメントの幅を変える(ダブルクリックで元に戻す)",start:()=>ys(y,b,!0).side,onDrag:(Y,se)=>x(ve=>ys({...ve,side:Y-se},b,!0)),onEnd:()=>x(Y=>(gs(Y),Y)),onReset:()=>x(Y=>(gs({...Y,side:yl}),{...Y,side:yl}))}),Z&&f.jsx(S1,{ref:L,model:t,tree:r,comments:V,selection:q,draft:W,onDraft:S,onSave:N,onCancel:we,onRemoveTarget:Y=>D(se=>se.filter(ve=>ve!==Y)),onClose:()=>te(!1),onShow:G,onEdit:ee,onDelete:Y=>{e.onCommentsChange(V.filter(se=>se.id!==Y)),W.editingId===Y&&we()},hoveredKeys:j,onHoverComment:Y=>H(Y?new Set(Y):null)})]}),f.jsx("div",{className:"legend",children:f.jsxs("span",{className:"muted",children:["行にホバーすると右のパネルに依存先が出ます ・ ピンのアイコンでピン留めし、複数並べて比べられます ・ 矢印や箱のクリック(⌘ / Shift で複数)・行の吹き出しでコメント(c キーで入力欄へ)・ 「+n 依存」= 今回増えた import ・",o==="changes"?" 変更していないファイルは「全体」で表示":" フォルダをクリックで開閉"]})})]})}const K1=200,oh={added:"今回追加",modified:"今回変更",removed:"今回削除"};function G1(e,t){const n=[],r=e.graph.files.filter(i=>i.status!=="unchanged").sort((i,o)=>i.path.localeCompare(o.path));for(const i of r){const o=(e.edgesByFrom.get(i.path)??[]).filter(a=>a.status!=="unchanged").sort((a,u)=>a.to.localeCompare(u.to));if(o.length===0)continue;if(n.length===K1)break;const s=`f:${i.path}`,l=[i.status==="removed"?`- ${i.path}(${oh.removed})`:`- ${i.path}(${oh[i.status]}) target: "${Vr(s)}"`];for(const a of o){const u=a.external?`x:${a.to}`:`d:${a.to}`,c=Hd(e,t,s,u),d=`${hv(e,u,c)}${c!=null&&c.typeOnly?"(型のみ)":""}`;l.push(a.status==="added"?` - 追加した import → ${d} target: "${pv(s,u)}"`:` - 削除した import → ${d}`)}if(i.status!=="removed"&&o.some(a=>a.status==="added"&&!a.external)){const a=mv(e,t,i.dir);a&&l.push(` 参考: ${a}`)}n.push(l.join(`
107
+ `))}return n.length===0?"":["依存の変化(import しているファイルごと):",...n,"","コメントの付け方:",'- target: 上の target の値をそのまま。追加した import を指すなら "L:…"、ファイルそのものを指すなら "I:f:…"',"- path / side / line / endLine / code: null","- ここでは依存の向きと形だけを見てください(層をまたぐ import、同じフォルダの既存のファイルが使っていない依存先、循環、置き場所が合わないファイルなど)。コードの中身への指摘は、ファイルの差分の方に書いてください。","- 削除した import への指摘は、その import をしていたファイルの target に付けてください。"].join(`
108
+ `)}function Y1(e,t,n,r){const i=[];for(const o of e){const s=o.target;!s||!/^(L:[^>]+>.+|I:.+)$/.test(s)||Wd(t,n,s)!=="open"||i.push({id:Id(),targets:[s],body:o.body,createdAt:Date.now(),ai:r})}return i}function X1({data:e,active:t,onComments:n,modules:r,openIn:i,ai:o,onAi:s}){const l=e.repoRoot,[a,u]=jp(`depshape.expanded:${l}`),[c,d]=jp(`depshape.collapsed:${l}`),p=`depshape.pins:${l}`,[h,y]=O.useState(()=>Q1(nn(p,[])));O.useEffect(()=>$t(p,h),[p,h]);const x=`depshape.comments:${l}|${e.targetLabel}|${e.baseLabel}`,[b,v]=O.useState(()=>Td(x)),[m,g]=O.useState(xv("mapMode","changes")),[k,_]=O.useState(!1),E=O.useMemo(()=>d1(e),[e]),$=O.useMemo(()=>f1(E),[E]),C=z1(e),[T,w]=O.useState(()=>rh(C));O.useEffect(()=>w(rh(C)),[C]);const A=O.useMemo(()=>U1(e.files,e.edges),[e]),I=O.useMemo(()=>H1(A,T),[A,T]),P=O.useCallback((ce,oe)=>{const de=A.get(ce);de&&w(we=>{const je={...we};return oe?je[ce]=de:delete je[ce],B1(C,je),je})},[A,C]),z=O.useCallback(ce=>{v(ce),Ld(x,ce)},[x]);O.useEffect(()=>{const ce=b.filter(oe=>Ci(E,$.byPath,oe)!=="resolved").length;n({open:ce,prompt:()=>gv(E,$.byPath,b,{header:!1}).text,review:()=>G1(E,$.byPath)})},[b,E,$,n]);const K=O.useRef(b);K.current=b;const U=O.useRef(0),[q,D]=O.useState(null);O.useEffect(()=>{if(!o||o.seq===U.current)return;U.current=o.seq;const ce=o.items.filter(de=>de.module==="dep"),oe=Y1(ce,E,$.byPath,o.agent);oe.length&&(z([...K.current,...oe]),_(!0)),D({seq:o.seq,placed:oe.length,dropped:ce.length-oe.length})},[o,E,$,z]),O.useEffect(()=>{q&&s(q)},[q,s]);const W=O.useCallback(ce=>d(oe=>{const de=new Set(oe);return de.has(ce)?de.delete(ce):de.add(ce),de}),[d]),S=O.useCallback(ce=>y(oe=>[...oe,...ce.filter(de=>!oe.includes(de))]),[]),X=O.useCallback(ce=>y(oe=>oe.includes(ce)?oe.filter(de=>de!==ce):[...oe,ce]),[]),H=O.useCallback(ce=>u(oe=>{const de=new Set(oe);if(de.has(ce))for(const we of[...de])(we===ce||we.startsWith(ce+"/"))&&de.delete(we);else de.add(ce);return de}),[u]),j=r.includes("file"),M=O.useCallback(ce=>{const oe=E.fileByPath.get(ce);if(!(!j||!oe))return oe.status==="unchanged"?"ファイルを開く":"差分を開く"},[E,j]),L=O.useMemo(()=>j?ce=>i("file",ce):null,[j,i]),F=O.useMemo(()=>{const ce=new Set;for(const oe of E.changedDirs){ce.add(oe);for(const de of sv(oe))ce.add(de)}return ce},[E]),V=O.useRef(!1);O.useEffect(()=>{m!=="all"||V.current||(V.current=!0,a.size===0&&u(new Set(F)))},[m,a,F,u]);const Z=(ce,oe)=>{m==="all"?u(ce?new Set:new Set(F)):d(ce?new Set(oe):new Set)},te=Z1(E.graph.files),le=b.filter(ce=>Ci(E,$.byPath,ce)!=="resolved").length,re=J1(E.graph.edges);return f.jsxs("div",{className:"app",children:[f.jsxs(Md,{children:[f.jsxs(Pd,{children:[f.jsx(Si,{children:"ファイル"}),f.jsx(Od,{stats:te,unit:"ファイル",showZero:!0}),f.jsx(Fd,{}),f.jsx(Si,{children:"依存"}),f.jsx(Li,{stats:re,title:Ev(re),showZero:!0})]}),f.jsx(Dd,{}),f.jsx(zd,{done:I.size,total:A.size,title:"確認済みにした、変更したファイル(そのファイルの依存がまた変わると外れます)"}),f.jsxs("button",{className:`ds-btn${k?" on":""}`,onClick:()=>_(!k),title:"コメントのサイドバーを開閉",children:[f.jsx(Ti,{size:13}),"コメント ",b.length,b.length>0&&f.jsxs("span",{className:"muted",children:["(未対応 ",le,")"]})]})]}),f.jsx("main",{children:f.jsx(q1,{model:E,root:$.root,tree:$.byPath,mode:m,onModeChange:ce=>{g(ce),wv("mapMode",ce)},open:a,onToggle:H,collapsed:c,onCollapseToggle:W,onFold:Z,pins:h,onTogglePin:X,onClearPins:()=>y([]),onPin:S,reviewTargets:A,reviewed:I,onReviewed:P,comments:b,onCommentsChange:z,sidebarOpen:k,onSidebarOpen:_,active:t,openLabel:M,onOpenFile:L})})]})}const Q1=e=>Array.isArray(e)?e.filter(t=>typeof t=="string"):[];function Z1(e){const t={added:0,modified:0,removed:0};for(const n of e)n.status!=="unchanged"&&t[n.status]++;return t}function J1(e){const t={added:0,removed:0};for(const n of e)!n.external&&n.status!=="unchanged"&&t[n.status]++;return t}const eE={id:"dep",title:"依存",description:"コードの依存関係(depshape): フォルダ・ファイルの import の変化",icon:_0,View:X1,badge:e=>e.files.filter(t=>t.status!=="unchanged").length||void 0},Sv=(e,t)=>`path=${encodeURIComponent(e)}&side=${t}`;async function Cv(e,t){const n=await fetch(`/api/module/file/content?${Sv(e,t)}`);if(!n.ok)throw new Error(await n.text());return(await n.json()).lines}async function tE(){const e=await fetch("/api/module/file/files");if(!e.ok)throw new Error(await e.text());return(await e.json()).paths}async function sh(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 Nv=(e,t,n)=>`/api/module/file/raw?${Sv(e,t)}&v=${n}`,nE=/\.(png|jpe?g|gif|webp|avif|bmp|ico|svg)$/i,hc=e=>nE.test(e),rE=e=>/\.(md|markdown|mdx)$/i.test(e),jr=e=>!!e.file||!!e.plain;function lh(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 p=d.get(a[c]);p||(p={name:a[c],path:a.slice(0,c+1).join("/"),children:[]},u.children.push(p),d.set(a[c],p),r.set(p,new Map)),u=p}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 _v(jv(n))}function jv(e){let t={...e,children:e.children.map(jv)};for(;t.path!==""&&!jr(t)&&t.children.length===1&&!jr(t.children[0]);){const n=t.children[0];t={...n,name:`${t.name}/${n.name}`}}return t}function _v(e){const t=e.children.map(_v).sort((n,r)=>jr(n)!==jr(r)?jr(n)?1:-1:n.name.localeCompare(r.name));return{...e,children:t}}function $v(e){return e.file?[e.file]:e.children.flatMap($v)}function Tv(e){return jr(e)?[]:[...e.path?[e.path]:[],...e.children.flatMap(Tv)]}function iE(e){const t=new Set,n=r=>{if(jr(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 Lv(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=>Lv(i,n)).filter(i=>i!==null);return r.length||e.path===""?{...e,children:r}:null}const Ua=(e,t)=>t===0?e+1:e,Ha=(e,t)=>t===0?e:e+t-1,Iv=e=>!e.unchanged&&e.status!=="added"&&e.status!=="removed"&&!e.binary&&!e.large&&e.chunks.length>0;function Wa(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 Vl(e,t){if(!Iv(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?Ha(o.newStart,o.newLines)+1:1,a=s?Ua(s.newStart,s.newLines)-1:t,u=o?Ha(o.oldStart,o.oldLines)-Ha(o.newStart,o.newLines):Ua(s.oldStart,s.oldLines)-Ua(s.newStart,s.newLines);return{index:i,from:l,to:a,delta:u}})}const xr=20,ah=(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 oE(e,t,n){if(e.unchanged)return e.chunks.flatMap(l=>l.lines.map(a=>({kind:"line",line:a})));const r=[],i=Vl(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=ah(u,c),p=Math.min((c==null?void 0:c.top)??0,u.to-u.from+1);o(u,u.from,u.from+p-1),(d>0||a===0)&&r.push({kind:"gap",gap:u,hidden:d,chunk:l}),o(u,u.from+p+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=ah(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 sE(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(xr,s)}:{...o,bottom:o.bottom+Math.min(xr,s)};return{...e,[t.index]:l}}function lE(e,t,n,r,i){let o=n;for(const s of Vl(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 mc(e,t){for(const n of Vl(e)){const r=t-n.delta;if(r>=n.from&&(n.to===void 0||r<=n.to))return r}}function Av(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 uh=500,ch=e=>e.match(/[\p{L}\p{N}_]+|\s+|[^\p{L}\p{N}_\s]/gu)??[];function aE(e,t){if(!e.trim()||!t.trim()||e===t||e.length>uh||t.length>uh)return;const n=ch(e),r=ch(t),i=r.length+1,o=new Uint16Array((n.length+1)*i);for(let d=n.length-1;d>=0;d--)for(let p=r.length-1;p>=0;p--)o[d*i+p]=n[d]===r[p]?o[(d+1)*i+p+1]+1:Math.max(o[(d+1)*i+p],o[d*i+p+1]);const s=new Array(n.length).fill(!1),l=new Array(r.length).fill(!1);for(let d=0,p=0;d<n.length&&p<r.length;)n[d]===r[p]?(s[d++]=!0,l[p++]=!0):o[(d+1)*i+p]>=o[d*i+p+1]?d++:p++;const a=d=>d.trim().length,u=n.reduce((d,p,h)=>d+(s[h]?a(p):0),0),c=n.reduce((d,p)=>d+a(p),0)+r.reduce((d,p)=>d+a(p),0);if(!(c===0||2*u/c<.4))return{old:dh(n,s),new:dh(r,l)}}function dh(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 uE(e){var n,r;const t=new Map;for(const i of Av(e)){if(((n=i.old)==null?void 0:n.type)!=="delete"||((r=i.new)==null?void 0:r.type)!=="add")continue;const o=aE(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 cE(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 dE(e){return ao([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 Rv=e=>e.chunks.reduce((t,n)=>t+n.lines.length,0);function fE(e){const t={added:0,modified:0,removed:0};for(const n of e)t[n.status==="renamed"?"modified":n.status]++;return t}function pE(e){return e.reduce((t,n)=>({added:t.added+n.additions,removed:t.removed+n.deletions}),{added:0,removed:0})}function ql(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=mc(e,o);s!==void 0&&n[s-1]!==void 0&&r.set(o,n[s-1])}}return r}const Ov=e=>(e.endLine??e.line)-e.line+1;function Ro(e,t,n){if(!e)return{state:"resolved"};const r=ql(e,t.side,n),i=t.code.split(`
109
+ `),o=Ov(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 fh(e,t){const n=ql(e,t.side);for(let r=t.line;r<=(t.endLine??t.line);r++)if(!n.has(r))return!1;return!0}const cn=(e,t)=>e.files.find(n=>n.path===t),hE=(e,t,n)=>Ro(cn(e,t.path),t,n).state;function ph(e,t,n=!1){return{id:Id(),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 gc=(e,t,n,r)=>`${e}:L${n}${r&&r!==n?`-L${r}`:""}${t==="old"?" (old)":""}`,mE={old:"変更前",new:"変更後"},vl=(e,t,n,r)=>{const i=`${n&&n!==t?`${t}〜${n}`:t} 行目`;return r?`${i}(変更なし)`:`${mE[e]}の ${i}`},Va=(e,t)=>{const n=t.split(`
110
+ `);return n.length===1?[` ${e}: ${t.trim()}`]:[` ${e}:`," ```",...n.map(r=>` ${r}`)," ```"]};function Mv(e,t,n={}){const r=t.map(s=>{var l;return{c:s,at:Ro(cn(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?[]:[...Bl(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}. ${gc(s.path,s.side,u,c)}(${vl(s.side,u,c,s.unchanged)})${l.state==="resolved"?"(解消済み?)":""}`),l.state==="updated"){const p=ql(cn(e,s.path),s.side,(d=n.contents)==null?void 0:d.get(s.path)),h=Array.from({length:Ov(s)},(y,x)=>p.get(u+x)??"").join(`
111
+ `);o.push(...Va("コード",h),...Va("コメントしたときは",s.code))}else o.push(...Va("コード",s.code));o.push(` コメント: ${s.body.trim().replace(/\n/g,`
112
+ `)}`,"")}),{text:o.join(`
113
+ `).trimEnd()+`
114
+ `,included:i.length,skipped:t.length-i.length}}const Pv="fileshape.comments:",gE=e=>Td(Pv+e),yE=(e,t)=>Ld(Pv+e,t),Fv=O.createContext(null),Vd=()=>O.useContext(Fv),qr=(e,t)=>`${e}:${t}`;function vE({comments:e,composing:t}){var r;const n=Vd();return f.jsxs("div",{className:"fs-thread",children:[e.map(i=>n.editing===i.id?f.jsx(yc,{initial:i.body,label:vl(i.side,i.line,i.endLine,i.unchanged),onSave:o=>n.update(i.id,o),onCancel:()=>n.edit(null)},i.id):f.jsx(qd,{c:i},i.id)),t&&f.jsx(yc,{initial:"",label:vl(t.side,t.line,t.endLine,!!((r=cn(n.run,t.path))!=null&&r.unchanged)),onSave:i=>n.add(t,i),onCancel:()=>n.compose(null)})]})}function qd({c:e,showWhere:t}){const n=Vd(),r=Ro(cn(n.run,e.path),e,n.contents.get(e.path));if(t&&n.editing===e.id)return f.jsx(yc,{initial:e.body,label:gc(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(Ad,{body:e.body,state:r.state,ai:e.ai,top:t?f.jsxs("span",{className:"fs-comment-where",children:[gc(e.path,e.side,e.line,e.endLine)," ",f.jsx("code",{children:e.code.split(`
115
+ `)[0].trim()||"(空行)"}),i&&f.jsx("span",{className:"ds-muted",children:" ほか"})]}):i?f.jsx("span",{className:"ds-muted",children:vl(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:()=>$i(Mv(n.run,[e],{includeResolved:!0,contents:n.contents}).text),onEdit:()=>n.edit(e.id),onDelete:()=>n.remove(e.id)})}function yc({initial:e,label:t,onSave:n,onCancel:r}){const[i,o]=O.useState(e);return f.jsx(Rd,{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 xE=e=>Math.min(e.a,e.b),wE=e=>Math.max(e.a,e.b),Wi=(e,t)=>e==="old"?t.type!=="add"?t.oldLine:void 0:t.type!=="delete"?t.newLine:void 0,kE=O.memo(function({file:t,mode:n,rows:r,tokens:i,byLine:o,onExpand:s}){var A;const l=Vd(),a=((A=l.composing)==null?void 0:A.path)===t.path?l.composing:null,u=O.useMemo(()=>{const I=new Map;for(const P of t.chunks)for(const[z,K]of uE(P.lines))I.set(z,K);return I},[t]),c=O.useMemo(()=>{const I={old:new Map,new:new Map};for(const P of r)if(P.kind==="line")for(const z of["old","new"]){const K=Wi(z,P.line);K!==void 0&&I[z].set(K,P.line.content)}return I},[r]),d=(I,P,z)=>{const K=Math.min(P,z),U=Math.max(P,z),q=[];let D=K;for(let W=K;W<=U;W++){const S=c[I].get(W);if(S===void 0)break;q.push(S),D=W}return{path:t.path,side:I,line:K,...D>K?{endLine:D}:{},code:q.join(`
116
+ `)}},[p,h]=O.useState(null),y=O.useRef(null);y.current=p;const x=O.useRef(()=>{});x.current=()=>{const I=y.current;h(null),I&&l.compose(d(I.side,I.a,I.b))};const b=p!==null;O.useEffect(()=>{if(!b)return;const I=()=>x.current();return window.addEventListener("mouseup",I),()=>window.removeEventListener("mouseup",I)},[b]);const v=p??(a?{side:a.side,a:a.line,b:a.endLine??a.line}:null),m=(I,P)=>!!v&&P!==void 0&&v.side===I&&P>=xE(v)&&P<=wE(v),g=(I,P)=>{const z=P?Wi(I,P):void 0;return!P||z===void 0?f.jsx("td",{className:"fs-num empty"}):f.jsx("td",{className:`fs-num${m(I,z)?" selected":""}`,onMouseDown:K=>{if(K.button===0){if(K.preventDefault(),K.shiftKey&&a&&a.side===I){l.compose(d(I,a.line,z));return}h({side:I,a:z,b:z})}},onMouseEnter:()=>{y.current&&y.current.side===I&&h({...y.current,b:z})},title:`${I==="old"?"変更前":"変更後"}の ${z} 行目にコメントする(Shift+クリックかドラッグで範囲)`,children:z})},k=(I,P)=>{const z=Wi(I,P),K=(P.type==="normal"?(i==null?void 0:i.get(qr("new",P.newLine)))??(i==null?void 0:i.get(qr("old",P.oldLine))):i==null?void 0:i.get(qr(I,z)))??[{types:"",text:P.content}];return cE(K,u.get(qr(I,z))??[]).map((q,D)=>{const W=[q.types?`token ${q.types}`:"",q.mark?`fs-word ${I}`:""].filter(Boolean).join(" ");return W?f.jsx("span",{className:W,children:q.text},D):f.jsx(O.Fragment,{children:q.text},D)})},_=(I,P)=>{const z=[...new Set(I.flatMap(([q,D])=>o.get(qr(q,D))??[]))],K=a?a.endLine??a.line:void 0,U=a&&I.some(([q,D])=>a.side===q&&K===D)?a:void 0;return!z.length&&!U?null:f.jsx("tr",{className:"fs-thread-row",children:f.jsx("td",{colSpan:P,children:f.jsx(vE,{comments:z,composing:U})})})},E=(I,P,z)=>{const{gap:K,hidden:U,chunk:q}=I,D=K.index>0,W=!!q,S=(H,j,M)=>f.jsx("button",{className:"fs-expand",onClick:()=>s(K,H),title:M,"aria-label":M,children:j}),X=U===void 0||U>0;return f.jsx("tr",{className:"fs-hunk",children:f.jsxs("td",{colSpan:P,children:[f.jsx("span",{className:"fs-expanders",children:X&&(U!==void 0&&U<=xr&&D&&W?S("all","↕",`${U} 行をすべて表示`):[W&&S("up","↑",`上の ${Math.min(xr,U??xr)} 行を表示`),D&&S("down","↓",U===void 0?"下の行を表示":`下の ${Math.min(xr,U)} 行を表示`),U!==void 0&&U>xr&&S("all","⇕",`${U} 行をすべて表示`)].filter(Boolean).map((H,j)=>f.jsx(O.Fragment,{children:H},j)))}),q?f.jsxs(f.Fragment,{children:["@@ -",q.oldStart,",",q.oldLines," +",q.newStart,",",q.newLines," @@",q.section&&f.jsxs("span",{className:"fs-hunk-section",children:[" ",q.section]})]}):f.jsx("span",{children:U===void 0?"ファイルの残りを表示":`残り ${U} 行`})]})},`g${z}`)};if(n==="unified"){const I=!!t.unchanged,P=I?3:4;return f.jsxs("table",{className:`fs-table unified${I?" plain":""}`,children:[f.jsxs("colgroup",{children:[!I&&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((z,K)=>{if(z.kind==="gap")return E(z,P,K);const U=z.line,q=U.type==="delete"?"old":"new",D=I?[["new",U.newLine]]:U.type==="normal"?[["old",U.oldLine],["new",U.newLine]]:[[q,Wi(q,U)]],W=D.some(([S,X])=>m(S,X));return f.jsxs(O.Fragment,{children:[f.jsxs("tr",{className:`fs-line ${U.type}${z.opened?" opened":""}${W?" selected":""}`,children:[!I&&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:k(q,U)})]}),_(D,P)]},K)})})]})}const $=[];let C=[],T=new Set;const w=()=>{Av(C).forEach((I,P)=>{var U,q;const z=[];I.old&&z.push(["old",I.old.oldLine]),I.new&&z.push(["new",I.new.newLine]);const K=(D,W)=>`${D?D.type:"empty"}${D&&m(W,Wi(W,D))?" selected":""}`;$.push(f.jsxs(O.Fragment,{children:[f.jsxs("tr",{className:`fs-line${I.old&&T.has(I.old)?" opened":""}`,children:[g("old",I.old),f.jsx("td",{className:`fs-sign ${K(I.old,"old")}`,children:((U=I.old)==null?void 0:U.type)==="delete"?"-":" "}),f.jsx("td",{className:`fs-code ${K(I.old,"old")}`,children:I.old&&k("old",I.old)}),g("new",I.new),f.jsx("td",{className:`fs-sign ${K(I.new,"new")}`,children:((q=I.new)==null?void 0:q.type)==="add"?"+":" "}),f.jsx("td",{className:`fs-code ${K(I.new,"new")}`,children:I.new&&k("new",I.new)})]}),_(z,6)]},`l${$.length}-${P}`))}),C=[],T=new Set};return r.forEach((I,P)=>{I.kind==="gap"?(w(),$.push(E(I,6,P))):(C.push(I.line),I.opened&&T.add(I.line))}),w(),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:$})]})});var Dv={exports:{}};(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
117
+ * Prism: Lightweight, robust, elegant syntax highlighting
118
+ *
119
+ * @license MIT <https://opensource.org/licenses/MIT>
120
+ * @author Lea Verou <https://lea.verou.me>
121
+ * @namespace
122
+ * @public
123
+ */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,k){k=k||{};var _,E;switch(l.util.type(g)){case"Object":if(E=l.util.objId(g),k[E])return k[E];_={},k[E]=_;for(var $ in g)g.hasOwnProperty($)&&(_[$]=m(g[$],k));return _;case"Array":return E=l.util.objId(g),k[E]?k[E]:(_=[],k[E]=_,g.forEach(function(C,T){_[T]=m(C,k)}),_);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(_){var m=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(_.stack)||[])[1];if(m){var g=document.getElementsByTagName("script");for(var k in g)if(g[k].src==m)return g[k]}return null}},isActive:function(m,g,k){for(var _="no-"+g;m;){var E=m.classList;if(E.contains(g))return!0;if(E.contains(_))return!1;m=m.parentElement}return!!k}},languages:{plain:s,plaintext:s,text:s,txt:s,extend:function(m,g){var k=l.util.clone(l.languages[m]);for(var _ in g)k[_]=g[_];return k},insertBefore:function(m,g,k,_){_=_||l.languages;var E=_[m],$={};for(var C in E)if(E.hasOwnProperty(C)){if(C==g)for(var T in k)k.hasOwnProperty(T)&&($[T]=k[T]);k.hasOwnProperty(C)||($[C]=E[C])}var w=_[m];return _[m]=$,l.languages.DFS(l.languages,function(A,I){I===w&&A!=m&&(this[A]=$)}),$},DFS:function m(g,k,_,E){E=E||{};var $=l.util.objId;for(var C in g)if(g.hasOwnProperty(C)){k.call(g,C,g[C],_||C);var T=g[C],w=l.util.type(T);w==="Object"&&!E[$(T)]?(E[$(T)]=!0,m(T,k,null,E)):w==="Array"&&!E[$(T)]&&(E[$(T)]=!0,m(T,k,C,E))}}},plugins:{},highlightAll:function(m,g){l.highlightAllUnder(document,m,g)},highlightAllUnder:function(m,g,k){var _={callback:k,container:m,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};l.hooks.run("before-highlightall",_),_.elements=Array.prototype.slice.apply(_.container.querySelectorAll(_.selector)),l.hooks.run("before-all-elements-highlight",_);for(var E=0,$;$=_.elements[E++];)l.highlightElement($,g===!0,_.callback)},highlightElement:function(m,g,k){var _=l.util.getLanguage(m),E=l.languages[_];l.util.setLanguage(m,_);var $=m.parentElement;$&&$.nodeName.toLowerCase()==="pre"&&l.util.setLanguage($,_);var C=m.textContent,T={element:m,language:_,grammar:E,code:C};function w(I){T.highlightedCode=I,l.hooks.run("before-insert",T),T.element.innerHTML=T.highlightedCode,l.hooks.run("after-highlight",T),l.hooks.run("complete",T),k&&k.call(T.element)}if(l.hooks.run("before-sanity-check",T),$=T.element.parentElement,$&&$.nodeName.toLowerCase()==="pre"&&!$.hasAttribute("tabindex")&&$.setAttribute("tabindex","0"),!T.code){l.hooks.run("complete",T),k&&k.call(T.element);return}if(l.hooks.run("before-highlight",T),!T.grammar){w(l.util.encode(T.code));return}if(g&&r.Worker){var A=new Worker(l.filename);A.onmessage=function(I){w(I.data)},A.postMessage(JSON.stringify({language:T.language,code:T.code,immediateClose:!0}))}else w(l.highlight(T.code,T.grammar,T.language))},highlight:function(m,g,k){var _={code:m,grammar:g,language:k};if(l.hooks.run("before-tokenize",_),!_.grammar)throw new Error('The language "'+_.language+'" has no grammar.');return _.tokens=l.tokenize(_.code,_.grammar),l.hooks.run("after-tokenize",_),a.stringify(l.util.encode(_.tokens),_.language)},tokenize:function(m,g){var k=g.rest;if(k){for(var _ in k)g[_]=k[_];delete g.rest}var E=new d;return p(E,E.head,m),c(m,E,g,E.head,0),y(E)},hooks:{all:{},add:function(m,g){var k=l.hooks.all;k[m]=k[m]||[],k[m].push(g)},run:function(m,g){var k=l.hooks.all[m];if(!(!k||!k.length))for(var _=0,E;E=k[_++];)E(g)}},Token:a};r.Prism=l;function a(m,g,k,_){this.type=m,this.content=g,this.alias=k,this.length=(_||"").length|0}a.stringify=function m(g,k){if(typeof g=="string")return g;if(Array.isArray(g)){var _="";return g.forEach(function(w){_+=m(w,k)}),_}var E={type:g.type,content:m(g.content,k),tag:"span",classes:["token",g.type],attributes:{},language:k},$=g.alias;$&&(Array.isArray($)?Array.prototype.push.apply(E.classes,$):E.classes.push($)),l.hooks.run("wrap",E);var C="";for(var T in E.attributes)C+=" "+T+'="'+(E.attributes[T]||"").replace(/"/g,"&quot;")+'"';return"<"+E.tag+' class="'+E.classes.join(" ")+'"'+C+">"+E.content+"</"+E.tag+">"};function u(m,g,k,_){m.lastIndex=g;var E=m.exec(k);if(E&&_&&E[1]){var $=E[1].length;E.index+=$,E[0]=E[0].slice($)}return E}function c(m,g,k,_,E,$){for(var C in k)if(!(!k.hasOwnProperty(C)||!k[C])){var T=k[C];T=Array.isArray(T)?T:[T];for(var w=0;w<T.length;++w){if($&&$.cause==C+","+w)return;var A=T[w],I=A.inside,P=!!A.lookbehind,z=!!A.greedy,K=A.alias;if(z&&!A.pattern.global){var U=A.pattern.toString().match(/[imsuy]*$/)[0];A.pattern=RegExp(A.pattern.source,U+"g")}for(var q=A.pattern||A,D=_.next,W=E;D!==g.tail&&!($&&W>=$.reach);W+=D.value.length,D=D.next){var S=D.value;if(g.length>m.length)return;if(!(S instanceof a)){var X=1,H;if(z){if(H=u(q,W,m,P),!H||H.index>=m.length)break;var F=H.index,j=H.index+H[0].length,M=W;for(M+=D.value.length;F>=M;)D=D.next,M+=D.value.length;if(M-=D.value.length,W=M,D.value instanceof a)continue;for(var L=D;L!==g.tail&&(M<j||typeof L.value=="string");L=L.next)X++,M+=L.value.length;X--,S=m.slice(W,M),H.index-=W}else if(H=u(q,0,S,P),!H)continue;var F=H.index,V=H[0],Z=S.slice(0,F),te=S.slice(F+V.length),le=W+S.length;$&&le>$.reach&&($.reach=le);var re=D.prev;Z&&(re=p(g,re,Z),W+=Z.length),h(g,re,X);var ce=new a(C,I?l.tokenize(V,I):V,K,V);if(D=p(g,re,ce),te&&p(g,D,te),X>1){var oe={cause:C+","+w,reach:le};c(m,g,k,D.prev,W,oe),$&&oe.reach>$.reach&&($.reach=oe.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 p(m,g,k){var _=g.next,E={value:k,prev:g,next:_};return g.next=E,_.prev=E,m.length++,E}function h(m,g,k){for(var _=g.next,E=0;E<k&&_!==m.tail;E++)_=_.next;g.next=_,_.prev=g,m.length-=E}function y(m){for(var g=[],k=m.head.next;k!==m.tail;)g.push(k.value),k=k.next;return g}if(!r.document)return r.addEventListener&&(l.disableWorkerMessageHandler||r.addEventListener("message",function(m){var g=JSON.parse(m.data),k=g.language,_=g.code,E=g.immediateClose;r.postMessage(l.highlight(_,l.languages[k],k)),E&&r.close()},!1)),l;var x=l.util.currentScript();x&&(l.filename=x.src,x.hasAttribute("data-manual")&&(l.manual=!0));function b(){l.manual||l.highlightAll()}if(!l.manual){var v=document.readyState;v==="loading"||v==="interactive"&&x&&x.defer?document.addEventListener("DOMContentLoaded",b):window.requestAnimationFrame?window.requestAnimationFrame(b):window.setTimeout(b,16)}return l}(t);e.exports&&(e.exports=n),typeof yf<"u"&&(yf.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(x,b){return"✖ Error "+x+" while fetching file: "+b},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 p(x,b,v){var m=new XMLHttpRequest;m.open("GET",x,!0),m.onreadystatechange=function(){m.readyState==4&&(m.status<400&&m.responseText?b(m.responseText):m.status>=400?v(i(m.status,m.statusText)):v(o))},m.send(null)}function h(x){var b=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(x||"");if(b){var v=Number(b[1]),m=b[2],g=b[3];return m?g?[v,Number(g)]:[v,void 0]:[v,v]}}n.hooks.add("before-highlightall",function(x){x.selector+=", "+d}),n.hooks.add("before-sanity-check",function(x){var b=x.element;if(b.matches(d)){x.code="",b.setAttribute(l,a);var v=b.appendChild(document.createElement("CODE"));v.textContent=r;var m=b.getAttribute("data-src"),g=x.language;if(g==="none"){var k=(/\.(\w+)$/.exec(m)||[,"none"])[1];g=s[k]||k}n.util.setLanguage(v,g),n.util.setLanguage(b,g);var _=n.plugins.autoloader;_&&_.loadLanguages(g),p(m,function(E){b.setAttribute(l,u);var $=h(b.getAttribute("data-range"));if($){var C=E.split(/\r\n?|\n/g),T=$[0],w=$[1]==null?C.length:$[1];T<0&&(T+=C.length),T=Math.max(0,Math.min(T-1,C.length)),w<0&&(w+=C.length),w=Math.max(0,Math.min(w,C.length)),E=C.slice(T,w).join(`
124
+ `),b.hasAttribute("data-start")||b.setAttribute("data-start",String(T+1))}v.textContent=E,n.highlightElement(v)},function(E){b.setAttribute(l,c),v.textContent=E})}}),n.plugins.fileHighlight={highlight:function(b){for(var v=(b||document).querySelectorAll(d),m=0,g;g=v[m++];)n.highlightElement(g)}};var y=!1;n.fileHighlight=function(){y||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),y=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(Dv);var bE=Dv.exports;const xl=ym(bE);(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],p=!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--:p=!0),(p||typeof d=="string")&&u.length>0&&u[u.length-1].openedBraces===0){var h=s(d);c<a.length-1&&(typeof a[c+1]=="string"||a[c+1].type==="plain-text")&&(h+=s(a[c+1]),a.splice(c+1,1)),c>0&&(typeof a[c-1]=="string"||a[c-1].type==="plain-text")&&(h=s(a[c-1])+h,a.splice(c-1,1),c--),a[c]=new e.Token("plain-text",h,null,h)}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(W,S){return W.replace(/<<(\d+)>>/g,function(X,H){return"(?:"+S[+H]+")"})}function n(W,S,X){return RegExp(t(W,S),"")}function r(W,S){for(var X=0;X<S;X++)W=W.replace(/<<self>>/g,function(){return"(?:"+W+")"});return W.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(W){return"\\b(?:"+W.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),p=/@?\b[A-Za-z_]\w*\b/.source,h=t(/<<0>>(?:\s*<<1>>)?/.source,[p,c]),y=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[a,h]),x=/\[\s*(?:,\s*)*\]/.source,b=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[y,x]),v=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[c,d,x]),m=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[v]),g=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[m,y,x]),k={keyword:l,punctuation:/[<>()?,.:[\]]/},_=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,E=/"(?:\\.|[^\\"\r\n])*"/.source,$=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[$]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[E]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[y]),lookbehind:!0,inside:k},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[p,g]),lookbehind:!0,inside:k},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[p]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[s,h]),lookbehind:!0,inside:k},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[y]),lookbehind:!0,inside:k},{pattern:n(/(\bwhere\s+)<<0>>/.source,[p]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[b]),lookbehind:!0,inside:k},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[g,u,p]),inside:k}],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,[p]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[p]),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:k},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[g,y]),inside:k,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[g]),lookbehind:!0,inside:k,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[p,c]),inside:{function:n(/^<<0>>/.source,[p]),generic:{pattern:RegExp(c),alias:"class-name",inside:k}}},"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,h,p,g,l.source,d,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[h,d]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:l,"class-name":{pattern:RegExp(g),greedy:!0,inside:k},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 C=E+"|"+_,T=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[C]),w=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[T]),2),A=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,I=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[y,w]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[A,I]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[A]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[w]),inside:e.languages.csharp},"class-name":{pattern:RegExp(y),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var P=/:[^}\r\n]+/.source,z=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[T]),2),K=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[z,P]),U=r(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[C]),2),q=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[U,P]);function D(W,S){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[W]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[S,P]),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,[K]),lookbehind:!0,greedy:!0,inside:D(K,z)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[q]),lookbehind:!0,greedy:!0,inside:D(q,U)}],char:{pattern:RegExp(_),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],p=typeof u=="string"?u:u.content,h=t(r,c),y=p.indexOf(h);if(y>-1){++i;var x=p.substring(0,y),b=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),v=p.substring(y+h.length),m=[];x&&m.push.apply(m,s([x])),m.push(b),v&&m.push.apply(m,s([v])),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(p){if(!(!p||typeof p=="string"))for(var h=0,y=p.length;h<y;h++){var x=p[h];if(x.type!=="code"){d(x.content);continue}var b=x.content[1],v=x.content[3];if(b&&v&&b.type==="code-language"&&v.type==="code-block"&&typeof b.content=="string"){var m=b.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");m=(/[a-z][\w-]*/i.exec(m)||[""])[0].toLowerCase();var g="language-"+m;v.alias?typeof v.alias=="string"?v.alias=[v.alias,g]:v.alias.push(g):v.alias=[g]}}}d(c.tokens)}),e.hooks.add("wrap",function(c){if(c.type==="code-block"){for(var d="",p=0,h=c.classes.length;p<h;p++){var y=c.classes[p],x=/language-(.+)/.exec(y);if(x){d=x[1];break}}var b=e.languages[d];if(b)c.content=e.highlight(u(c.content),b,d);else if(d&&d!=="none"&&e.plugins.autoloader){var v="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);c.attributes.id=v,e.plugins.autoloader.loadLanguages(d,function(){var m=document.getElementById(v);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(p,h){if(h=h.toLowerCase(),h[0]==="#"){var y;return h[1]==="x"?y=parseInt(h.slice(2),16):y=Number(h.slice(1)),a(y)}else{var x=l[h];return x||p}}),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(x){return typeof x!="string"&&x.type!=="comment"&&x.type!=="scalar"}),r=0;function i(x){return n[r+x]}function o(x,b){b=b||0;for(var v=0;v<x.length;v++){var m=i(v+b);if(!m||m.type!==x[v])return!1}return!0}function s(x,b){for(var v=1,m=r;m<n.length;m++){var g=n[m],k=g.content;if(g.type==="punctuation"&&typeof k=="string"){if(x.test(k))v++;else if(b.test(k)&&(v--,v===0))return m}}return-1}function l(x,b){var v=x.alias;v?Array.isArray(v)||(x.alias=v=[v]):x.alias=v=[],v.push(b)}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 p=s(/^\{$/,/^\}$/);if(p===-1)continue;for(var h=r;h<p;h++){var y=n[h];y.type==="variable"&&u.indexOf(y.content)>=0&&l(y,"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 EE={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"},hh={Dockerfile:"docker",Makefile:"makefile",GNUmakefile:"makefile",".env":"bash"};function SE(e){const t=e.split("/").pop()??"";if(hh[t])return hh[t];if(t.startsWith("Dockerfile"))return"docker";const n=t.includes(".")?t.split(".").pop().toLowerCase():"",r=EE[n];return r&&xl.languages[r]?r:void 0}function Kd(e,t){const n=xl.languages[t];if(!n)return e.map(s=>[{types:"",text:s}]);const r=[[]],i=(s,l)=>{l.split(`
125
+ `).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(xl.tokenize(e.join(`
126
+ `),n),"");r.length<e.length;)r.push([]);return r}const mh=5e3,gh=1e3;function CE(e,t){const n=SE(e.path);if(!n)return;let r=0;for(const o of e.chunks)for(const s of o.lines)if(++r>mh||s.content.length>gh)return;const i=new Map;for(const o of e.chunks)yh(o,"old",n,i),yh(o,"new",n,i);return t&&t.length<=mh&&t.every(o=>o.length<=gh)&&Kd(t,n).forEach((o,s)=>i.set(`new:${s+1}`,o)),i}function yh(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=Kd(i.map(s=>s.content),n);i.forEach((s,l)=>r.set(`${t}:${t==="old"?s.oldLine:s.newLine}`,o[l]))}function NE(e,t){const n=t==null?void 0:t.toLowerCase();if(!(!n||!xl.languages[n]||e.length>1e5))return Kd(e.split(`
127
+ `),n)}function jE({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(_E,{side:r,path:r==="old"?e.oldPath??e.path:e.path,version:t},r))})}function _E({side:e,path:t,version:n}){const[r,i]=O.useState(null),[o,s]=O.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:Nv(t,e,n),alt:`${t}(${e==="old"?"変更前":"変更後"})`,onLoad:l=>i(`${l.currentTarget.naturalWidth} × ${l.currentTarget.naturalHeight}`),onError:()=>s(!0)})})]})}function $E(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const TE=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,LE=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,IE={};function vh(e,t){return(IE.jsx?LE:TE).test(e)}const AE=/[ \t\n\f\r]/g;function RE(e){return typeof e=="object"?e.type==="text"?xh(e.value):!1:xh(e)}function xh(e){return e.replace(AE,"")===""}class Ho{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ho.prototype.normal={};Ho.prototype.property={};Ho.prototype.space=void 0;function zv(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Ho(n,r,t)}function vc(e){return e.toLowerCase()}class Dt{constructor(t,n){this.attribute=n,this.property=t}}Dt.prototype.attribute="";Dt.prototype.booleanish=!1;Dt.prototype.boolean=!1;Dt.prototype.commaOrSpaceSeparated=!1;Dt.prototype.commaSeparated=!1;Dt.prototype.defined=!1;Dt.prototype.mustUseProperty=!1;Dt.prototype.number=!1;Dt.prototype.overloadedBoolean=!1;Dt.prototype.property="";Dt.prototype.spaceSeparated=!1;Dt.prototype.space=void 0;let OE=0;const Ne=zr(),nt=zr(),xc=zr(),ue=zr(),De=zr(),_r=zr(),Bt=zr();function zr(){return 2**++OE}const wc=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ne,booleanish:nt,commaOrSpaceSeparated:Bt,commaSeparated:_r,number:ue,overloadedBoolean:xc,spaceSeparated:De},Symbol.toStringTag,{value:"Module"})),qa=Object.keys(wc);class Gd extends Dt{constructor(t,n,r,i){let o=-1;if(super(t,n),wh(this,"space",i),typeof r=="number")for(;++o<qa.length;){const s=qa[o];wh(this,qa[o],(r&wc[s])===wc[s])}}}Gd.prototype.defined=!0;function wh(e,t,n){n&&(e[t]=n)}function Ii(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new Gd(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[vc(r)]=r,n[vc(o.attribute)]=r}return new Ho(t,n,e.space)}const Bv=Ii({properties:{ariaActiveDescendant:null,ariaAtomic:nt,ariaAutoComplete:null,ariaBusy:nt,ariaChecked:nt,ariaColCount:ue,ariaColIndex:ue,ariaColSpan:ue,ariaControls:De,ariaCurrent:null,ariaDescribedBy:De,ariaDetails:null,ariaDisabled:nt,ariaDropEffect:De,ariaErrorMessage:null,ariaExpanded:nt,ariaFlowTo:De,ariaGrabbed:nt,ariaHasPopup:null,ariaHidden:nt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:De,ariaLevel:ue,ariaLive:null,ariaModal:nt,ariaMultiLine:nt,ariaMultiSelectable:nt,ariaOrientation:null,ariaOwns:De,ariaPlaceholder:null,ariaPosInSet:ue,ariaPressed:nt,ariaReadOnly:nt,ariaRelevant:null,ariaRequired:nt,ariaRoleDescription:De,ariaRowCount:ue,ariaRowIndex:ue,ariaRowSpan:ue,ariaSelected:nt,ariaSetSize:ue,ariaSort:null,ariaValueMax:ue,ariaValueMin:ue,ariaValueNow:ue,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Uv(e,t){return t in e?e[t]:t}function Hv(e,t){return Uv(e,t.toLowerCase())}const ME=Ii({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:Ne,allowPaymentRequest:Ne,allowUserMedia:Ne,alpha:Ne,alt:null,as:null,async:Ne,autoCapitalize:null,autoComplete:De,autoFocus:Ne,autoPlay:Ne,blocking:De,capture:null,charSet:null,checked:Ne,cite:null,className:De,closedBy:null,colorSpace:null,cols:ue,colSpan:ue,command:null,commandFor:null,content:null,contentEditable:nt,controls:Ne,controlsList:De,coords:ue|_r,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ne,defer:Ne,dir:null,dirName:null,disabled:Ne,download:xc,draggable:nt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ne,formTarget:null,headers:De,height:ue,hidden:xc,high:ue,href:null,hrefLang:null,htmlFor:De,httpEquiv:De,id:null,imageSizes:null,imageSrcSet:null,inert:Ne,inputMode:null,integrity:null,is:null,isMap:Ne,itemId:null,itemProp:De,itemRef:De,itemScope:Ne,itemType:De,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ne,low:ue,manifest:null,max:null,maxLength:ue,media:null,method:null,min:null,minLength:ue,multiple:Ne,muted:Ne,name:null,nonce:null,noModule:Ne,noValidate:Ne,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:Ne,optimum:ue,pattern:null,ping:De,placeholder:null,playsInline:Ne,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ne,referrerPolicy:null,rel:De,required:Ne,reversed:Ne,rows:ue,rowSpan:ue,sandbox:De,scope:null,scoped:Ne,seamless:Ne,selected:Ne,shadowRootClonable:Ne,shadowRootCustomElementRegistry:Ne,shadowRootDelegatesFocus:Ne,shadowRootMode:null,shadowRootSerializable:Ne,shape:null,size:ue,sizes:null,slot:null,span:ue,spellCheck:nt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ue,step:null,style:null,tabIndex:ue,target:null,title:null,translate:null,type:null,typeMustMatch:Ne,useMap:null,value:nt,width:ue,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:De,axis:null,background:null,bgColor:null,border:ue,borderColor:null,bottomMargin:ue,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ne,declare:Ne,event:null,face:null,frame:null,frameBorder:null,hSpace:ue,leftMargin:ue,link:null,longDesc:null,lowSrc:null,marginHeight:ue,marginWidth:ue,noResize:Ne,noHref:Ne,noShade:Ne,noWrap:Ne,object:null,profile:null,prompt:null,rev:null,rightMargin:ue,rules:null,scheme:null,scrolling:nt,standby:null,summary:null,text:null,topMargin:ue,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ue,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ne,disablePictureInPicture:Ne,disableRemotePlayback:Ne,exportParts:_r,part:De,prefix:null,property:null,results:ue,security:null,unselectable:null},space:"html",transform:Hv}),PE=Ii({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:Bt,accentHeight:ue,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ue,amplitude:ue,arabicForm:null,ascent:ue,attributeName:null,attributeType:null,azimuth:ue,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ue,by:null,calcMode:null,capHeight:ue,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:ue,diffuseConstant:ue,direction:null,display:null,dur:null,divisor:ue,dominantBaseline:null,download:Ne,dx:null,dy:null,edgeMode:null,editable:null,elevation:ue,enableBackground:null,end:null,event:null,exponent:ue,externalResourcesRequired:null,fill:null,fillOpacity:ue,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:ue,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ue,horizOriginX:ue,horizOriginY:ue,id:null,ideographic:ue,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ue,k:ue,k1:ue,k2:ue,k3:ue,k4:ue,kernelMatrix:Bt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ue,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:ue,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:ue,overlineThickness:ue,paintOrder:null,panose1:null,path:null,pathLength:ue,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:De,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ue,pointsAtY:ue,pointsAtZ:ue,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Bt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Bt,rev:Bt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Bt,requiredFeatures:Bt,requiredFonts:Bt,requiredFormats:Bt,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:ue,specularExponent:ue,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ue,strikethroughThickness:ue,string:null,stroke:null,strokeDashArray:Bt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ue,strokeOpacity:ue,strokeWidth:null,style:null,surfaceScale:ue,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Bt,tabIndex:ue,tableValues:null,target:null,targetX:ue,targetY:ue,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Bt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ue,underlineThickness:ue,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ue,values:null,vAlphabetic:ue,vMathematical:ue,vectorEffect:null,vHanging:ue,vIdeographic:ue,version:null,vertAdvY:ue,vertOriginX:ue,vertOriginY:ue,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ue,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Uv}),Wv=Ii({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()}}),Vv=Ii({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Hv}),qv=Ii({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),FE={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"},DE=/[A-Z]/g,kh=/-[a-z]/g,zE=/^data[-\w.:]+$/i;function BE(e,t){const n=vc(t);let r=t,i=Dt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&zE.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(kh,HE);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!kh.test(o)){let s=o.replace(DE,UE);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Gd}return new i(r,t)}function UE(e){return"-"+e.toLowerCase()}function HE(e){return e.charAt(1).toUpperCase()}const WE=zv([Bv,ME,Wv,Vv,qv],"html"),Yd=zv([Bv,PE,Wv,Vv,qv],"svg");function VE(e){return e.join(" ").trim()}var bh=/\/\*(?:[^*]|\*(?!\/))*\*\//g,qE=/\n/g,KE=/^\s*/,GE=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,YE=/^:\s*/,XE=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,QE=/^[;\s]*/,ZE=`
128
+ `,Eh="/",Sh="*",Vi="",JE="comment",eS="declaration";function tS(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(y){var x=y.match(qE);x&&(n+=x.length);var b=y.lastIndexOf(ZE);r=~b?y.length-b:r+y.length}function o(){var y={line:n,column:r};return function(x){return x.position=new s(y),u(),x}}function s(y){this.start=y,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function l(y){var x=new Error(t.source+":"+n+":"+r+": "+y);if(x.reason=y,x.filename=t.source,x.line=n,x.column=r,x.source=e,!t.silent)throw x}function a(y){var x=y.exec(e);if(x){var b=x[0];return i(b),e=e.slice(b.length),x}}function u(){a(KE)}function c(y){for(var x;x=d();)y.push(x);return y}function d(){var y=o();if(!(Eh!=e.charAt(0)||Sh!=e.charAt(1))){for(var x=2;Vi!=e.charAt(x)&&(Sh!=e.charAt(x)||Eh!=e.charAt(x+1));)++x;if(x+=2,Vi===e.charAt(x-1))return l("End of comment missing");var b=e.slice(2,x-2);return r+=2,i(b),e=e.slice(x),r+=2,y({type:JE,comment:b})}}function p(){var y=o(),x=a(GE);if(x){if(d(),!a(YE))return l("property missing ':'");var b=a(XE),v=y({type:eS,property:x[0].replace(bh,Vi).trim(),value:b?b[0].replace(bh,Vi).trim():Vi});return a(QE),v}}function h(){var y=[];c(y);for(var x;x=p();)y.push(x),c(y);return y}return u(),h()}function nS(e,t){let n=null;if(!e||typeof e!="string")return n;const r=tS(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 Kv=Gv("end"),Xd=Gv("start");function Gv(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 rS(e){const t=Xd(e),n=Kv(e);if(t&&n)return{start:t,end:n}}function co(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ch(e.position):"start"in e||"end"in e?Ch(e):"line"in e||"column"in e?kc(e):""}function kc(e){return Nh(e&&e.line)+":"+Nh(e&&e.column)}function Ch(e){return kc(e&&e.start)+"-"+kc(e&&e.end)}function Nh(e){return e&&typeof e=="number"?e:1}class Kl 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=co(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(Kl.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 Qd={}.hasOwnProperty,iS=new Map,oS=/[A-Z]/g,sS=/-([a-z])/g,lS=new Set(["table","tbody","thead","tfoot","tr"]),aS=new Set(["td","th"]),Yv="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function uS(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=yS(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=gS(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"?Yd:WE,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Xv(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Xv(e,t,n){if(t.type==="element")return cS(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return dS(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return pS(e,t,n);if(t.type==="mdxjsEsm")return fS(e,t);if(t.type==="root")return hS(e,t,n);if(t.type==="text")return mS(e,t)}function cS(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Yd,e.schema=i),e.ancestors.push(t);const o=Zv(e,t.tagName,!1),s=vS(e,t);let l=Jd(e,t);return lS.has(t.tagName)&&(l=l.filter(function(a){return typeof a=="string"?!RE(a):!0})),Qv(e,s,o,t),Zd(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function dS(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 fS(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Oo(e,t.position)}function pS(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Yd,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Zv(e,t.name,!0),s=xS(e,t),l=Jd(e,t);return Qv(e,s,o,t),Zd(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function hS(e,t,n){const r={};return Zd(r,Jd(e,t)),e.create(t,e.Fragment,r,n)}function mS(e,t){return t.value}function Qv(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Zd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function gS(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 yS(e,t){return n;function n(r,i,o,s){const l=Array.isArray(o.children),a=Xd(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 vS(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Qd.call(t.properties,i)){const o=wS(e,i,t.properties[i]);if(o){const[s,l]=o;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&aS.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 xS(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 Jd(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:iS;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=Xv(e,o,s);l!==void 0&&n.push(l)}return n}function wS(e,t,n){if(n==null||typeof n=="number"&&Number.isNaN(n))return;const r=BE(e.schema,t);return Array.isArray(n)&&(n=r.commaSeparated?$E(n):VE(n)),r.property==="style"?["style",typeof n=="object"?e.stylePropertyNameCase==="dom"?n:bS(n):kS(e,String(n))]:[e.elementAttributeNameCase==="react"&&r.space?FE[r.property]||r.property:r.attribute,n]}function kS(e,t){const n={};try{nS(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(sS,CS))),n[o]=i}})}catch(r){if(e.ignoreInvalidStyle)return{};const i=r,o=new Kl("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=Yv+"#cannot-parse-style-attribute",o}return n}function Zv(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=vh(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=vh(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Qd.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 Kl("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=Yv+"#cannot-handle-mdx-estrees-without-createevaluater",n}function bS(e){const t={};let n;for(n in e)Qd.call(e,n)&&(t[ES(n)]=e[n]);return t}function ES(e){if(e.slice(0,2)==="--")return e;let t=e.replace(oS,SS);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function SS(e){return"-"+e.toLowerCase()}function CS(e,t){return t.toUpperCase()}const Ka={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"]},NS={};function Gl(e,t){const n=NS,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Jv(e,r,i)}function Jv(e,t,n){if(jS(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 jh(e.children,t,n)}return Array.isArray(e)?jh(e,t,n):""}function jh(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Jv(e[i],t,n);return r.join("")}function jS(e){return!!(e&&typeof e=="object")}const _h=document.createElement("i");function ef(e){const t="&"+e+";";_h.innerHTML=t;const n=_h.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function pn(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 Qt(e,t){return e.length>0?(pn(e,e.length,0,t),e):t}const $h={}.hasOwnProperty;function ex(e){const t={};let n=-1;for(;++n<e.length;)_S(t,e[n]);return t}function _S(e,t){let n;for(n in t){const i=($h.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){$h.call(i,s)||(i[s]=[]);const l=o[s];$S(i[s],Array.isArray(l)?l:l?[l]:[])}}}function $S(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);pn(e,0,0,r)}function tx(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 hn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const vt=fr(/[A-Za-z]/),xt=fr(/[\dA-Za-z]/),TS=fr(/[#-'*+\--9=?A-Z^-~]/);function wl(e){return e!==null&&(e<32||e===127)}const bc=fr(/\d/),LS=fr(/[\dA-Fa-f]/),nx=fr(/[!-/:-@[-`{-~]/);function ke(e){return e!==null&&e<-2}function ze(e){return e!==null&&(e<0||e===32)}function _e(e){return e===-2||e===-1||e===32}const Wo=fr(new RegExp("\\p{P}|\\p{S}","u")),Pr=fr(/\s/);function fr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ai(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let s="";if(o===37&&xt(e.charCodeAt(n+1))&&xt(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 Re(e,t,n,r){const i=r?r-1:1/0;let o=0;return s;function s(a){return _e(a)?(e.enter(n),l(a)):t(a)}function l(a){return _e(a)&&o++<i?(e.consume(a),l):(e.exit(n),t(a))}}function rx(e,t,n,r,i,o){let s=0;return l;function l(c){return _e(c)?(e.enter(r),a(c)):u(c)}function a(c){return _e(c)&&s<o?(e.consume(c),s++,a):(e.exit(r),u(c))}function u(c){return s>=i?t(c):n(c)}}const IS={tokenize:AS};function AS(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"),Re(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 ke(l)?(e.consume(l),e.exit("chunkText"),o):(e.consume(l),s)}}let kl=class{constructor(){this.index=new Map,this.map=[]}add(t,n,r){Th(this,t,n,r,!1)}addBefore(t,n,r){Th(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 Th(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 RS={tokenize:OS},Lh={tokenize:MS};function OS(e){const t=this,n=[];let r=0,i,o,s;return l;function l(g){if(r<n.length){const k=n[r];return t.containerState=k[1],e.attempt(k[0].continuation,a,u)(g)}return u(g)}function a(g){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&m();const k=t.events.length;let _=k,E;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){E=t.events[_][1].end;break}v(r);let $=k;for(;$<t.events.length;)t.events[$][1].end={...E},$++;const C=new kl;return C.add(_+1,0,t.events.slice(k)),C.add(k,$-k,[]),C.consume(t.events),u(g)}return l(g)}function u(g){if(r===n.length){if(!i)return p(g);if(i.currentConstruct&&i.currentConstruct.concrete)return y(g);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Lh,c,d)(g)}function c(g){return i&&m(),v(r),p(g)}function d(g){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,y(g)}function p(g){return t.containerState={},e.attempt(Lh,h,y)(g)}function h(g){return r++,n.push([t.currentConstruct,t.containerState]),p(g)}function y(g){if(g===null){i&&m(),v(0),e.consume(g);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),x(g)}function x(g){if(g===null){b(e.exit("chunkFlow"),!0),v(0),e.consume(g);return}return ke(g)?(e.consume(g),b(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(g),x)}function b(g,k){const _=t.sliceStream(g);if(k&&_.push(null),g.previous=o,o&&(o.next=g),o=g,i.defineSkip(g.start),i.write(_),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 $=t.events.length;let C=$,T,w;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){if(T){w=t.events[C][1].end;break}T=!0}for(v(r),E=$;E<t.events.length;)t.events[E][1].end={...w},E++;const A=new kl;A.add(C+1,0,t.events.slice($)),A.add($,E-$,[]),A.consume(t.events)}}function v(g){let k=n.length;for(;k-- >g;){const _=n[k];t.containerState=_[1],_[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 MS(e,t,n){return Re(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ar(e){if(e===null||ze(e)||Pr(e))return 1;if(Wo(e))return 2}function Yl(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 Ec={name:"attention",resolveAll:PS,tokenize:FS};function PS(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};Ih(s,-o),Ih(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=Qt(r,[["enter",e[i][1],t],["exit",e[i][1],t]])),r=Qt(r,[["enter",d,t],["enter",a,t],["exit",a,t],["enter",c,t]]),r=Qt(r,Yl(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=Qt(r,[["exit",c,t],["enter",u,t],["exit",u,t],["exit",d,t]]);let p=0;e[n][1].end.offset-e[n][1].start.offset&&(p=2,r=Qt(r,[["enter",e[n][1],t],["exit",e[n][1],t]])),pn(e,i-1,n-i+3,r),n=i+r.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function FS(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=ar(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=ar(a),d=!c||c===2&&i||n.includes(a)&&a!==42&&a!==95,p=!i||i===2&&c||n.includes(r)&&r!==42&&r!==95;return u._open=!!(o===42?d:d&&(i||!p)),u._close=!!(o===42?p:p&&(c||!d)),t(a)}}function Ih(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const DS={name:"autolink",tokenize:zS};function zS(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return vt(h)?(e.consume(h),s):h===64?n(h):u(h)}function s(h){return h===43||h===45||h===46||xt(h)?(r=1,l(h)):u(h)}function l(h){return h===58?(e.consume(h),r=0,a):(h===43||h===45||h===46||xt(h))&&r++<32?(e.consume(h),l):(r=0,u(h))}function a(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||wl(h)?n(h):(e.consume(h),a)}function u(h){return h===64?(e.consume(h),c):TS(h)?(e.consume(h),u):n(h)}function c(h){return xt(h)?d(h):n(h)}function d(h){return h===46?(e.consume(h),r=0,c):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):p(h)}function p(h){if((h===45||xt(h))&&r++<63){const y=h===45?p:d;return e.consume(h),y}return n(h)}}const Vo={partial:!0,tokenize:BS};function BS(e,t,n){return r;function r(o){return _e(o)?Re(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||ke(o)?t(o):n(o)}}const ix={continuation:{tokenize:HS},exit:WS,name:"blockQuote",tokenize:US};function US(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 _e(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function HS(e,t,n){const r=this;return i;function i(s){return _e(s)?Re(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(ix,t,n)(s)}}function WS(e){e.exit("blockQuote")}const ox={name:"characterEscape",tokenize:VS};function VS(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 nx(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const sx={name:"characterReference",tokenize:qS};function qS(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=xt,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=LS,c):(e.enter("characterReferenceValue"),o=7,s=bc,c(d))}function c(d){if(d===59&&i){const p=e.exit("characterReferenceValue");return s===xt&&!ef(r.sliceSerialize(p))?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 Sc={partial:!0,tokenize:KS};function KS(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 Ah={concrete:!0,name:"codeFenced",tokenize:GS};function GS(e,t,n){const r=this,i={partial:!0,tokenize:_};let o=0,s=0,l;return a;function a(E){return u(E)}function u(E){const $=r.events[r.events.length-1];return o=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[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"),_e(E)?Re(e,d,"whitespace")(E):d(E))}function d(E){return E===null||ke(E)?(e.exit("codeFencedFence"),r.interrupt?t(E):e.check(Sc,x,k)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(E))}function p(E){return E===null||ke(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(E)):_e(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Re(e,h,"whitespace")(E)):E===96&&E===l?n(E):(e.consume(E),p)}function h(E){return E===null||ke(E)?d(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(E))}function y(E){return E===null||ke(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(E)):E===96&&E===l?n(E):(e.consume(E),y)}function x(E){return e.attempt(i,k,b)(E)}function b(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),v}function v(E){return o>0&&_e(E)?Re(e,m,"linePrefix",o+1)(E):m(E)}function m(E){return E===null||ke(E)?e.check(Sc,x,k)(E):(e.enter("codeFlowValue"),g(E))}function g(E){return E===null||ke(E)?(e.exit("codeFlowValue"),m(E)):(e.consume(E),g)}function k(E){return e.exit("codeFenced"),t(E)}function _(E,$,C){let T=0;return w;function w(K){return E.enter("lineEnding"),E.consume(K),E.exit("lineEnding"),A}function A(K){return E.enter("codeFencedFence"),_e(K)?Re(E,I,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):I(K)}function I(K){return K===l?(E.enter("codeFencedFenceSequence"),P(K)):C(K)}function P(K){return K===l?(T++,E.consume(K),P):T>=s?(E.exit("codeFencedFenceSequence"),_e(K)?Re(E,z,"whitespace")(K):z(K)):C(K)}function z(K){return K===null||ke(K)?(E.exit("codeFencedFence"),$(K)):C(K)}}}const Ga={name:"codeIndented",tokenize:XS},YS={partial:!0,tokenize:QS};function XS(e,t,n){return r;function r(l){return e.enter("codeIndented"),rx(e,i,n,"linePrefix",4,4)(l)}function i(l){return l===null?s(l):ke(l)?e.attempt(YS,i,s)(l):(e.enter("codeFlowValue"),o(l))}function o(l){return l===null||ke(l)?(e.exit("codeFlowValue"),i(l)):(e.consume(l),o)}function s(l){return e.exit("codeIndented"),t(l)}}function QS(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):ke(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):rx(e,t,o,"linePrefix",4,4)(s)}function o(s){return ke(s)?i(s):n(s)}}const ZS={name:"codeText",previous:eC,resolve:JS,tokenize:tC};function JS(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 eC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function tC(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)):ke(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||ke(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 nC{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&&qi(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),qi(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),qi(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);qi(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);qi(this.left,n.reverse())}}}function qi(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 lx(e){const t={};let n=-1,r,i,o,s,l,a,u;const c=new nC(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,rC(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 pn(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function rC(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,p=-1,h=n,y=0,x=0;const b=[x];for(;h;){for(;e.get(++i)[1]!==h;);o.push(i),h._tokenizer||(c=r.sliceStream(h),h.next||c.push(null),d&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=n;++p<l.length;)l[p][0]==="exit"&&l[p-1][0]==="enter"&&l[p][1].type===l[p-1][1].type&&l[p][1].start.line!==l[p][1].end.line&&(x=p+1,b.push(x),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):b.pop(),p=b.length;p--;){const v=l.slice(b[p],b[p+1]),m=o.pop();a.push([m,m+v.length-1]),e.splice(m,2,v)}for(a.reverse(),p=-1;++p<a.length;)u[y+a[p][0]]=y+a[p][1],y+=a[p][1]-a[p][0]-1;return u}const iC={resolve:sC,tokenize:lC},oC={partial:!0,tokenize:aC};function sC(e){return lx(e),e}function lC(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):ke(l)?e.check(oC,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 aC(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Re(e,o,"linePrefix")}function o(s){if(s===null||ke(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 ax(e,t,n,r,i,o,s,l,a){const u=a||Number.POSITIVE_INFINITY;let c=0;return d;function d(v){return v===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(v),e.exit(o),p):v===null||v===32||v===41||wl(v)?n(v):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),x(v))}function p(v){return v===62?(e.enter(o),e.consume(v),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),h(v))}function h(v){return v===62?(e.exit("chunkString"),e.exit(l),p(v)):v===null||v===60||ke(v)?n(v):(e.consume(v),v===92?y:h)}function y(v){return v===60||v===62||v===92?(e.consume(v),h):h(v)}function x(v){return!c&&(v===null||v===41||ze(v))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(v)):c<u&&v===40?(e.consume(v),c++,x):v===41?(e.consume(v),c--,x):v===null||v===32||v===40||wl(v)?n(v):(e.consume(v),v===92?b:x)}function b(v){return v===40||v===41||v===92?(e.consume(v),x):x(v)}}function ux(e,t,n,r,i,o){const s=this;let l=0,a;return u;function u(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(o),c}function c(h){return l>999||h===null||h===91||h===93&&!a||h===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):ke(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||ke(h)||l++>999?(e.exit("chunkString"),c(h)):(e.consume(h),a||(a=!_e(h)),h===92?p:d)}function p(h){return h===91||h===92||h===93?(e.consume(h),l++,d):d(h)}}function cx(e,t,n,r,i,o){let s;return l;function l(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,a):n(p)}function a(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),u(p))}function u(p){return p===s?(e.exit(o),a(s)):p===null?n(p):ke(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Re(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===s||p===null||ke(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?d:c)}function d(p){return p===s||p===92?(e.consume(p),c):c(p)}}function fo(e,t){let n;return r;function r(i){return ke(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):_e(i)?Re(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const uC={name:"definition",tokenize:dC},cC={partial:!0,tokenize:fC};function dC(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),s(h)}function s(h){return ux.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function l(h){return i=hn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),a):n(h)}function a(h){return ze(h)?fo(e,u)(h):u(h)}function u(h){return ax(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function c(h){return e.attempt(cC,d,d)(h)}function d(h){return _e(h)?Re(e,p,"whitespace")(h):p(h)}function p(h){return h===null||ke(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function fC(e,t,n){return r;function r(l){return ze(l)?fo(e,i)(l):n(l)}function i(l){return cx(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return _e(l)?Re(e,s,"whitespace")(l):s(l)}function s(l){return l===null||ke(l)?t(l):n(l)}}const pC={name:"hardBreakEscape",tokenize:hC};function hC(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return ke(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const mC={name:"headingAtx",resolve:gC,tokenize:yC};function gC(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"};pn(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])}return e}function yC(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||ke(c)?(e.exit("atxHeading"),t(c)):_e(c)?Re(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 dx=["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"],Cc=["pre","script","style","textarea"],vC={concrete:!0,name:"htmlFlow",resolveTo:wC,tokenize:kC},xC={partial:!0,tokenize:bC};function wC(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 kC(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),p):j===47?(e.consume(j),o=!0,x):j===63?(e.consume(j),i=3,r.interrupt?t:S):vt(j)?(e.consume(j),s=String.fromCharCode(j),b):n(j)}function p(j){return j===45?(e.consume(j),i=2,h):j===91?(e.consume(j),i=5,l=0,y):vt(j)?(e.consume(j),i=4,r.interrupt?t:S):n(j)}function h(j){return j===45?(e.consume(j),r.interrupt?t:S):n(j)}function y(j){const M="CDATA[";return j===M.charCodeAt(l++)?(e.consume(j),l===M.length?r.interrupt?t:I:y):n(j)}function x(j){return vt(j)?(e.consume(j),s=String.fromCharCode(j),b):n(j)}function b(j){if(j===null||j===47||j===62||ze(j)){const M=j===47,L=s.toLowerCase();return!M&&!o&&Cc.includes(L)?(i=1,r.interrupt?t(j):I(j)):dx.includes(s.toLowerCase())?(i=6,M?(e.consume(j),v):r.interrupt?t(j):I(j)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(j):o?m(j):g(j))}return j===45||xt(j)?(e.consume(j),s+=String.fromCharCode(j),b):n(j)}function v(j){return j===62?(e.consume(j),r.interrupt?t:I):n(j)}function m(j){return _e(j)?(e.consume(j),m):w(j)}function g(j){return j===47?(e.consume(j),w):j===58||j===95||vt(j)?(e.consume(j),k):_e(j)?(e.consume(j),g):w(j)}function k(j){return j===45||j===46||j===58||j===95||xt(j)?(e.consume(j),k):_(j)}function _(j){return j===61?(e.consume(j),E):_e(j)?(e.consume(j),_):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,$):_e(j)?(e.consume(j),E):C(j)}function $(j){return j===a?(e.consume(j),a=null,T):j===null||ke(j)?n(j):(e.consume(j),$)}function C(j){return j===null||j===34||j===39||j===47||j===60||j===61||j===62||j===96||ze(j)?_(j):(e.consume(j),C)}function T(j){return j===47||j===62||_e(j)?g(j):n(j)}function w(j){return j===62?(e.consume(j),A):n(j)}function A(j){return j===null||ke(j)?I(j):_e(j)?(e.consume(j),A):n(j)}function I(j){return j===45&&i===2?(e.consume(j),U):j===60&&i===1?(e.consume(j),q):j===62&&i===4?(e.consume(j),X):j===63&&i===3?(e.consume(j),S):j===93&&i===5?(e.consume(j),W):ke(j)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(xC,H,P)(j)):j===null||ke(j)?(e.exit("htmlFlowData"),P(j)):(e.consume(j),I)}function P(j){return e.check(Sc,z,H)(j)}function z(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),K}function K(j){return j===null||ke(j)?P(j):(e.enter("htmlFlowData"),I(j))}function U(j){return j===45?(e.consume(j),S):I(j)}function q(j){return j===47?(e.consume(j),s="",D):I(j)}function D(j){if(j===62){const M=s.toLowerCase();return Cc.includes(M)?(e.consume(j),X):I(j)}return vt(j)&&s.length<8?(e.consume(j),s+=String.fromCharCode(j),D):I(j)}function W(j){return j===93?(e.consume(j),S):I(j)}function S(j){return j===62?(e.consume(j),X):j===45&&i===2?(e.consume(j),S):I(j)}function X(j){return j===null||ke(j)?(e.exit("htmlFlowData"),H(j)):(e.consume(j),X)}function H(j){return e.exit("htmlFlow"),t(j)}}function bC(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Vo,t,n)}}const EC={name:"htmlText",tokenize:SC};function SC(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),_):S===63?(e.consume(S),g):vt(S)?(e.consume(S),C):n(S)}function u(S){return S===45?(e.consume(S),c):S===91?(e.consume(S),o=0,y):vt(S)?(e.consume(S),m):n(S)}function c(S){return S===45?(e.consume(S),h):n(S)}function d(S){return S===null?n(S):S===45?(e.consume(S),p):ke(S)?(s=d,q(S)):(e.consume(S),d)}function p(S){return S===45?(e.consume(S),h):d(S)}function h(S){return S===62?U(S):S===45?p(S):d(S)}function y(S){const X="CDATA[";return S===X.charCodeAt(o++)?(e.consume(S),o===X.length?x:y):n(S)}function x(S){return S===null?n(S):S===93?(e.consume(S),b):ke(S)?(s=x,q(S)):(e.consume(S),x)}function b(S){return S===93?(e.consume(S),v):x(S)}function v(S){return S===62?U(S):S===93?(e.consume(S),v):x(S)}function m(S){return S===null||S===62?U(S):ke(S)?(s=m,q(S)):(e.consume(S),m)}function g(S){return S===null?n(S):S===63?(e.consume(S),k):ke(S)?(s=g,q(S)):(e.consume(S),g)}function k(S){return S===62?U(S):g(S)}function _(S){return vt(S)?(e.consume(S),E):n(S)}function E(S){return S===45||xt(S)?(e.consume(S),E):$(S)}function $(S){return ke(S)?(s=$,q(S)):_e(S)?(e.consume(S),$):U(S)}function C(S){return S===45||xt(S)?(e.consume(S),C):S===47||S===62||ze(S)?T(S):n(S)}function T(S){return S===47?(e.consume(S),U):S===58||S===95||vt(S)?(e.consume(S),w):ke(S)?(s=T,q(S)):_e(S)?(e.consume(S),T):U(S)}function w(S){return S===45||S===46||S===58||S===95||xt(S)?(e.consume(S),w):A(S)}function A(S){return S===61?(e.consume(S),I):ke(S)?(s=A,q(S)):_e(S)?(e.consume(S),A):T(S)}function I(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),i=S,P):ke(S)?(s=I,q(S)):_e(S)?(e.consume(S),I):(e.consume(S),z)}function P(S){return S===i?(e.consume(S),i=void 0,K):S===null?n(S):ke(S)?(s=P,q(S)):(e.consume(S),P)}function z(S){return S===null||S===34||S===39||S===60||S===61||S===96?n(S):S===47||S===62||ze(S)?T(S):(e.consume(S),z)}function K(S){return S===47||S===62||ze(S)?T(S):n(S)}function U(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):n(S)}function q(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),D}function D(S){return _e(S)?Re(e,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):W(S)}function W(S){return e.enter("htmlTextData"),s(S)}}const tf={name:"labelEnd",resolveAll:_C,resolveTo:$C,tokenize:TC},CC={tokenize:LC},NC={tokenize:IC},jC={tokenize:AC};function _C(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&&pn(e,0,e.length,n),e}function $C(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=Qt(s,e.slice(i+1,i+r+3)),s=Qt(s,[["enter",u,t]]),s=Qt(s,Yl(t.parser.constructs.insideSpan.null,e.slice(i+r+4,o-3),t)),s=Qt(s,[["exit",u,t],e[o-2],e[o-1],["exit",a,t]]),s=Qt(s,e.slice(o+1)),s=Qt(s,[["exit",l,t]]),pn(e,i,e.length,s),e}function TC(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(p){return o?o._inactive?d(p):(s=r.parser.defined.includes(hn(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),a):n(p)}function a(p){return p===40?e.attempt(CC,c,s?c:d)(p):p===91?e.attempt(NC,c,s?u:d)(p):s?c(p):d(p)}function u(p){return e.attempt(jC,c,d)(p)}function c(p){return i.pop(),t(p)}function d(p){return o._balanced=!0,n(p)}}function LC(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)?fo(e,o)(d):o(d)}function o(d){return d===41?c(d):ax(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return ze(d)?fo(e,a)(d):c(d)}function l(d){return n(d)}function a(d){return d===34||d===39||d===40?cx(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return ze(d)?fo(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 IC(e,t,n){const r=this;return i;function i(l){return ux.call(r,e,o,s,"reference","referenceMarker","referenceString")(l)}function o(l){return r.parser.defined.includes(hn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function AC(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 RC={name:"labelStartImage",resolveAll:tf.resolveAll,tokenize:OC};function OC(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 MC={name:"labelStartLink",resolveAll:tf.resolveAll,tokenize:PC};function PC(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 Ya={name:"lineEnding",tokenize:FC};function FC(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Re(e,t,"linePrefix")}}const Fs={name:"thematicBreak",tokenize:DC};function DC(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||ke(u))?(e.exit("thematicBreak"),t(u)):n(u)}function a(u){return u===i?(e.consume(u),r++,a):(e.exit("thematicBreakSequence"),_e(u)?Re(e,l,"whitespace")(u):l(u))}}const At={continuation:{tokenize:HC},exit:VC,name:"list",tokenize:UC},zC={partial:!0,tokenize:qC},BC={partial:!0,tokenize:WC};function UC(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(h){const y=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:bc(h)){if(r.containerState.type||(r.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Fs,n,u)(h):u(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(h)}return n(h)}function a(h){return bc(h)&&++s<10?(e.consume(h),a):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Vo,r.interrupt?n:c,e.attempt(zC,p,d))}function c(h){return r.containerState.initialBlankLine=!0,o++,p(h)}function d(h){return _e(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function HC(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Vo,i,o);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Re(e,t,"listItemIndent",r.containerState.size+1)(l)}function o(l){return r.containerState.furtherBlankLines||!_e(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(BC,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,Re(e,e.attempt(At,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function WC(e,t,n){const r=this;return Re(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 VC(e){e.exit(this.containerState.type)}function qC(e,t,n){const r=this;return Re(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!_e(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Rh={name:"setextUnderline",resolveTo:KC,tokenize:GC};function KC(e,t){const n=new kl;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 GC(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"),_e(u)?Re(e,a,"lineSuffix")(u):a(u))}function a(u){return u===null||ke(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const YC={tokenize:XC};function XC(e){const t=this,n=e.attempt(Vo,r,e.attempt(this.parser.constructs.flowInitial,i,Re(e,e.attempt(this.parser.constructs.flow,i,e.attempt(iC,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 QC={resolveAll:px()},ZC=fx("string"),JC=fx("text");function fx(e){return{resolveAll:px(e==="text"?eN: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 p=-1;if(d)for(;++p<d.length;){const h=d[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function px(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 eN(e,t){const n=new kl;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 tN={42:At,43:At,45:At,48:At,49:At,50:At,51:At,52:At,53:At,54:At,55:At,56:At,57:At,62:ix},nN={91:uC},rN={[-2]:Ga,[-1]:Ga,32:Ga},iN={35:mC,42:Fs,45:[Rh,Fs],60:vC,61:Rh,95:Fs,96:Ah,126:Ah},oN={38:sx,92:ox},sN={[-5]:Ya,[-4]:Ya,[-3]:Ya,33:RC,38:sx,42:Ec,60:[DS,EC],91:MC,92:[pC,ox],93:tf,95:Ec,96:ZS},lN={null:[Ec,QC]},aN={null:[42,95]},uN={null:[]},cN=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:aN,contentInitial:nN,disable:uN,document:tN,flow:iN,flowInitial:rN,insideSpan:lN,string:oN,text:sN},Symbol.toStringTag,{value:"Module"}));function dN(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:$(_),check:$(E),consume:m,enter:g,exit:k,interrupt:$(E,{interrupt:!0})},u={code:null,containerState:{},defineSkip:x,events:[],now:y,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:d};let c=t.tokenize.call(u,a);return t.resolveAll&&o.push(t),u;function d(A){return s=Qt(s,A),b(),s[s.length-1]!==null?[]:(C(t,0),u.events=Yl(o,u.events,u),u.events)}function p(A,I){return pN(h(A),I)}function h(A){return fN(s,A)}function y(){const{_bufferIndex:A,_index:I,line:P,column:z,offset:K}=r;return{_bufferIndex:A,_index:I,line:P,column:z,offset:K}}function x(A){i[A.line]=A.column,w()}function b(){for(;r._index<s.length;){const A=s[r._index];if(typeof A=="string"){const I=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===I&&r._bufferIndex<A.length;)v(A.charCodeAt(r._bufferIndex))}else v(A)}}function v(A){c=c(A)}function m(A){ke(A)?(r.line++,r.column=1,r.offset+=A===-3?2:1,w()):A!==-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=A}function g(A,I){const P=I||{};return P.type=A,P.start=y(),u.events.push(["enter",P,u]),l.push(P),P}function k(A){const I=l.pop();return I.end=y(),u.events.push(["exit",I,u]),I}function _(A,I){C(A,I.from)}function E(A,I){I.restore()}function $(A,I){return P;function P(z,K,U){let q,D,W,S;return Array.isArray(z)?H(z):"tokenize"in z?H([z]):X(z);function X(F){return V;function V(Z){const te=Z!==null&&F[Z],le=Z!==null&&F.null,re=[...Array.isArray(te)?te:te?[te]:[],...Array.isArray(le)?le:le?[le]:[]];return H(re)(Z)}}function H(F){return q=F,D=0,F.length===0?U:j(F[D])}function j(F){return V;function V(Z){return S=T(),W=F,F.partial||(u.currentConstruct=F),F.name&&u.parser.constructs.disable.null.includes(F.name)?L():F.tokenize.call(I?Object.assign(Object.create(u),I):u,a,M,L)(Z)}}function M(F){return A(W,S),K}function L(F){return S.restore(),++D<q.length?j(q[D]):U}}}function C(A,I){A.resolveAll&&!o.includes(A)&&o.push(A),A.resolve&&pn(u.events,I,u.events.length-I,A.resolve(u.events.slice(I),u)),A.resolveTo&&(u.events=A.resolveTo(u.events,u))}function T(){const A=y(),I=u.previous,P=u.currentConstruct,z=u.events.length,K=Array.from(l);return{from:z,restore:U};function U(){r=A,u.previous=I,u.currentConstruct=P,u.events.length=z,l=K,w()}}function w(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function fN(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 pN(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=`
129
+ `;break}case-3:{s=`\r
130
+ `;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 hN(e){const r={constructs:ex([cN,...(e||{}).extensions||[]]),content:i(IS),defined:[],document:i(RS),flow:i(YC),lazy:{},string:i(ZC),text:i(JC)};return r;function i(o){return s;function s(l){return dN(r,o,l)}}}function mN(e){for(;!lx(e););return e}const Oh=/[\0\t\n\r]/g;function gN(){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;){Oh.lastIndex=u;const c=Oh.exec(o),d=c&&c.index!==void 0?c.index:o.length,p=o.charCodeAt(d);if(!c){t=o.slice(u);break}if(p===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),p){case 0:{a.push(65533),e++;break}case 9:{const h=Math.ceil(e/4)*4;for(a.push(-2);e++<h;)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 yN=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function vN(e){return e.replace(yN,xN)}function xN(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return tx(n.slice(o?2:1),o?16:10)}return ef(n)||e}const hx={}.hasOwnProperty;function wN(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),kN(n)(mN(hN(n).document().write(gN()(e,t,!0))))}function kN(e){const t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(he),autolinkProtocol:w,autolinkEmail:w,atxHeading:s(je),blockQuote:s(re),characterEscape:w,characterReference:w,codeFenced:s(ce),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:s(ce,l),codeText:s(oe,l),codeTextData:w,data:w,codeFlowValue:w,definition:s(de),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:s(we),hardBreakEscape:s(N),hardBreakTrailing:s(N),htmlFlow:s(G,l),htmlFlowData:w,htmlText:s(G,l),htmlTextData:w,image:s(ee),label:l,link:s(he),listItem:s(pe),listItemValue:h,listOrdered:s(fe,p),listUnordered:s(fe),paragraph:s(Te),reference:M,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:s(je),strong:s(ht),thematicBreak:s(Je)},exit:{atxHeading:u(),atxHeadingSequence:E,autolink:u(),autolinkEmail:le,autolinkProtocol:te,blockQuote:u(),characterEscapeValue:A,characterReferenceMarkerHexadecimal:F,characterReferenceMarkerNumeric:F,characterReferenceValue:V,characterReference:Z,codeFenced:u(v),codeFencedFence:b,codeFencedFenceInfo:y,codeFencedFenceMeta:x,codeFlowValue:A,codeIndented:u(m),codeText:u(U),codeTextData:A,data:A,definition:u(),definitionDestinationString:_,definitionLabelString:g,definitionTitleString:k,emphasis:u(),hardBreakEscape:u(P),hardBreakTrailing:u(P),htmlFlow:u(z),htmlFlowData:A,htmlText:u(K),htmlTextData:A,image:u(D),label:S,labelText:W,lineEnding:I,link:u(q),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:L,resourceDestinationString:X,resourceTitleString:H,resource:j,setextHeading:u(T),setextHeadingLineSequence:C,setextHeadingText:$,strong:u(),thematicBreak:u()}};mx(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(J){let ie={type:"root",children:[],position:void 0};const ye={stack:[ie],tokenStack:[],config:t,enter:a,exit:c,buffer:l,resume:d,data:n},ge=[],Y=[];let se=-1;for(;++se<J.length;)if(Y.push(J[se]),J[se][1].type==="listOrdered"||J[se][1].type==="listUnordered")if(J[se][0]==="enter")ge.push(Y.length-1);else{const ve=ge.pop();o(Y,ve)}for(J=Y,se=-1;++se<J.length;){const ve=t[J[se][0]];J[se][0]==="enter"&&t.beforeEnter.length>0&&i(t.beforeEnter,{...ye,sliceSerialize:J[se][2].sliceSerialize},J[se][1]),hx.call(ve,J[se][1].type)&&ve[J[se][1].type].call({...ye,sliceSerialize:J[se][2].sliceSerialize},J[se][1]),J[se][0]==="exit"&&t.afterExit.length>0&&i(t.afterExit,{...ye,sliceSerialize:J[se][2].sliceSerialize},J[se][1])}if(ye.tokenStack.length>0){const ve=ye.tokenStack[ye.tokenStack.length-1];(ve[1]||Mh).call(ye,void 0,ve[0])}for(ie.position={start:Hn(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:Hn(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},se=-1;++se<t.transforms.length;)ie=t.transforms[se](ie)||ie;return ie}function i(J,ie,ye){let ge=-1;for(;++ge<J.length;)J[ge].call(ie,ye)}function o(J,ie){const ye=J.length-1;let ge=ie-1,Y=-1,se=!1,ve,be,Ee,Ie;const ut=[];for(;++ge<=ye;){const Oe=J[ge];switch(Oe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Oe[0]==="enter"?Y++:Y--,Ie=void 0;break}case"lineEndingBlank":{Oe[0]==="enter"&&(ve&&!Ie&&!Y&&!Ee&&(Ee=ge),Ie=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ie=void 0}if(!Y&&Oe[0]==="enter"&&Oe[1].type==="listItemPrefix"||Y===-1&&Oe[0]==="exit"&&(Oe[1].type==="listUnordered"||Oe[1].type==="listOrdered")){if(ve){let et=ge;for(be=void 0;et--;){const bt=J[et];if(bt[1].type==="lineEnding"||bt[1].type==="lineEndingBlank"){if(bt[0]==="exit")continue;be&&(J[be][1].type="lineEndingBlank",se=!0),bt[1].type="lineEnding",be=et}else if(!(bt[1].type==="linePrefix"||bt[1].type==="blockQuotePrefix"||bt[1].type==="blockQuotePrefixWhitespace"||bt[1].type==="blockQuoteMarker"||bt[1].type==="listItemIndent"))break}Ee&&(!be||Ee<be)&&(ve._spread=!0),ve.end=Object.assign({},be?J[be][1].start:Oe[1].end),ut.push({at:be||ge,event:["exit",ve,Oe[2]]})}if(Oe[1].type==="listItemPrefix"){const et={type:"listItem",_spread:!1,start:Object.assign({},Oe[1].start),end:void 0};ve=et,ut.push({at:ge,event:["enter",et,Oe[2]]}),Ee=void 0,Ie=!0}}}const Ye=J.splice(ie);let We=0;for(ge=-1;++ge<Ye.length;){for(;We<ut.length&&ut[We].at===ie+ge;)J.push(ut[We++].event);J.push(Ye[ge])}J[ie][1]._spread=se}function s(J,ie){return ye;function ye(ge){a.call(this,J(ge),ge),ie&&ie.call(this,ge)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(J,ie,ye){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([ie,ye||void 0]),J.position={start:Hn(ie.start),end:void 0}}function u(J){return ie;function ie(ye){J&&J.call(this,ye),c.call(this,ye)}}function c(J,ie){const ye=this.stack.pop(),ge=this.tokenStack.pop();if(!ge)throw new Error("Cannot close `"+J.type+"` ("+co({start:J.start,end:J.end})+"): it’s not open");ge[0].type!==J.type&&(ie?ie.call(this,J,ge[0]):(ge[1]||Mh).call(this,J,ge[0])),ye.position.end=Hn(J.end)}function d(){return Gl(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function h(J){if(this.data.expectingFirstListItemValue){const ie=this.stack[this.stack.length-2];ie.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function y(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.lang=J}function x(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.meta=J}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.value=J.replace(/(\r?\n|\r)$/g,"")}function g(J){const ie=this.resume(),ye=this.stack[this.stack.length-1];ye.label=ie,ye.identifier=hn(this.sliceSerialize(J)).toLowerCase()}function k(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.title=J}function _(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.url=J}function E(J){const ie=this.stack[this.stack.length-1];if(!ie.depth){const ye=this.sliceSerialize(J).length;ie.depth=ye}}function $(){this.data.setextHeadingSlurpLineEnding=!0}function C(J){const ie=this.stack[this.stack.length-1];ie.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function w(J){const ye=this.stack[this.stack.length-1].children;let ge=ye[ye.length-1];(!ge||ge.type!=="text")&&(ge=Ze(),ge.position={start:Hn(J.start),end:void 0},ye.push(ge)),this.stack.push(ge)}function A(J){const ie=this.stack.pop();ie.value+=this.sliceSerialize(J),ie.position.end=Hn(J.end)}function I(J){const ie=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ye=ie.children[ie.children.length-1];ye.position.end=Hn(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ie.type)&&(w.call(this,J),A.call(this,J))}function P(){this.data.atHardBreak=!0}function z(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.value=J}function K(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.value=J}function U(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.value=J}function q(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ie,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function D(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ie,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function W(J){const ie=this.sliceSerialize(J),ye=this.stack[this.stack.length-2];ye.label=vN(ie),ye.identifier=hn(ie).toLowerCase()}function S(){const J=this.stack[this.stack.length-1],ie=this.resume(),ye=this.stack[this.stack.length-1];if(this.data.inReference=!0,ye.type==="link"){const ge=J.children;ye.children=ge}else ye.alt=ie}function X(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.url=J}function H(){const J=this.resume(),ie=this.stack[this.stack.length-1];ie.title=J}function j(){this.data.inReference=void 0}function M(){this.data.referenceType="collapsed"}function L(J){const ie=this.resume(),ye=this.stack[this.stack.length-1];ye.label=ie,ye.identifier=hn(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function F(J){this.data.characterReferenceType=J.type}function V(J){const ie=this.sliceSerialize(J),ye=this.data.characterReferenceType;let ge;ye?(ge=tx(ie,ye==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ge=ef(ie);const Y=this.stack[this.stack.length-1];Y.value+=ge}function Z(J){const ie=this.stack.pop();ie.position.end=Hn(J.end)}function te(J){A.call(this,J);const ie=this.stack[this.stack.length-1];ie.url=this.sliceSerialize(J)}function le(J){A.call(this,J);const ie=this.stack[this.stack.length-1];ie.url="mailto:"+this.sliceSerialize(J)}function re(){return{type:"blockquote",children:[],position:void 0}}function ce(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function oe(){return{type:"inlineCode",value:"",position:void 0}}function de(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}function we(){return{type:"emphasis",children:[],position:void 0}}function je(){return{type:"heading",depth:0,children:[],position:void 0}}function N(){return{type:"break",position:void 0}}function G(){return{type:"html",value:"",position:void 0}}function ee(){return{type:"image",title:null,url:"",alt:null,position:void 0}}function he(){return{type:"link",title:null,url:"",children:[],position:void 0}}function fe(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[],position:void 0}}function pe(J){return{type:"listItem",spread:J._spread,checked:null,children:[],position:void 0}}function Te(){return{type:"paragraph",children:[],position:void 0}}function ht(){return{type:"strong",children:[],position:void 0}}function Ze(){return{type:"text",value:"",position:void 0}}function Je(){return{type:"thematicBreak",position:void 0}}}function Hn(e){return{line:e.line,column:e.column,offset:e.offset}}function mx(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?mx(e,r):bN(e,r)}}function bN(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 Mh(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+co({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+co({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+co({start:t.start,end:t.end})+") is still open")}function EN(e){const t=this;t.parser=n;function n(r){return wN(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function SN(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 CN(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
131
+ `}]}function NN(e,t){const n=t.value?t.value+`
132
+ `:"",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 jN(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function _N(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $N(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Ai(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 TN(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 LN(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function gx(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 IN(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return gx(e,t);const i={src:Ai(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 AN(e,t){const n={src:Ai(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 RN(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 ON(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return gx(e,t);const i={href:Ai(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 MN(e,t){const n={href:Ai(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 PN(e,t,n){const r=e.all(t),i=n?FN(n):yx(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:`
133
+ `}),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:`
134
+ `});const u={type:"element",tagName:"li",properties:o,children:s};return e.patch(t,u),e.applyData(t,u)}function FN(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=yx(n[r])}return t}function yx(e){const{spread:t}=e;return t??e.children.length>1}function DN(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 zN(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function BN(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function UN(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function HN(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=Xd(t.children[1]),a=Kv(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 WN(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],p={},h=s?s[a]:void 0;h&&(p.align=h);let y={type:"element",tagName:o,properties:p,children:[]};d&&(y.children=e.all(d),e.patch(d,y),y=e.applyData(d,y)),u.push(y)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}function VN(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Ph=9,Fh=32;function qN(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(Dh(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Dh(t.slice(i),i>0,!1)),o.join("")}function Dh(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===Ph||o===Fh;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===Ph||o===Fh;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function KN(e,t){const n={type:"text",value:qN(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function GN(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const YN={blockquote:SN,break:CN,code:NN,delete:jN,emphasis:_N,footnoteReference:$N,heading:TN,html:LN,imageReference:IN,image:AN,inlineCode:RN,linkReference:ON,link:MN,listItem:PN,list:DN,paragraph:zN,root:BN,strong:UN,table:HN,tableCell:VN,tableRow:WN,text:KN,thematicBreak:GN,toml:vs,yaml:vs,definition:vs,footnoteDefinition:vs};function vs(){}const vx=-1,Xl=0,po=1,bl=2,nf=3,rf=4,of=5,sf=6,xx=7,wx=8,{defineProperty:XN}=Object,kx=typeof self=="object"?self:globalThis,zh=(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 kx[e](t)},QN=(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 Xl:case vx:return n(s,i);case po:{const l=n([],i);for(const a of s)l.push(r(a));return l}case bl:{const l=n({},i);for(const[a,u]of s){const c=r(a),d=r(u);c==="__proto__"?XN(l,c,{value:d,configurable:!0,enumerable:!0,writable:!0}):l[c]=d}return l}case nf:return n(new Date(s),i);case rf:{const{source:l,flags:a}=s;return n(new RegExp(l,a),i)}case of:{const l=n(new Map,i);for(const[a,u]of s)l.set(r(a),r(u));return l}case sf:{const l=n(new Set,i);for(const a of s)l.add(r(a));return l}case xx:{const{name:l,message:a}=s;return n(typeof kx[l]=="function"?zh(l,a):new Error(a),i)}case wx: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(zh(o,s),i)};return r},Bh=e=>QN(new Map,e)(0),vr="",{toString:ZN}={},{keys:JN,is:ej}=Object,Ki=e=>{const t=typeof e;if(t!=="object"||!e)return[Xl,t];const n=ZN.call(e).slice(8,-1);switch(n){case"Array":return[po,vr];case"Object":return[bl,vr];case"Date":return[nf,vr];case"RegExp":return[rf,vr];case"Map":return[of,vr];case"Set":return[sf,vr];case"DataView":return[po,n]}return n.includes("Array")?[po,n]:e instanceof Error?[xx,e.name||"Error"]:[bl,n]},xs=([e,t])=>e===Xl&&(t==="function"||t==="symbol"),tj=(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]=Ki(s);switch(l){case Xl:{let c=s;switch(a){case"bigint":l=wx,c=s.toString();break;case"number":if(!s&&ej(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([vx],s)}return i([l,c],s)}case po:{if(a){let p=s;return a==="DataView"?p=new Uint8Array(s.buffer):a==="ArrayBuffer"&&(p=new Uint8Array(s)),i([a,[...p]],s)}const c=[],d=i([l,c],s);for(const p of s)c.push(o(p));return d}case bl:{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 p of JN(s))(e||!xs(Ki(s[p])))&&c.push([o(p),o(s[p])]);return d}case nf:return i([l,isNaN(s.getTime())?vr:s.toISOString()],s);case rf:{const{source:c,flags:d}=s;return i([l,{source:c,flags:d}],s)}case of:{const c=[],d=i([l,c],s);for(const[p,h]of s)(e||!(xs(Ki(p))||xs(Ki(h))))&&c.push([o(p),o(h)]);return d}case sf:{const c=[],d=i([l,c],s);for(const p of s)(e||!xs(Ki(p)))&&c.push(o(p));return d}}const{message:u}=s;return i([l,{name:a,message:u}],s)};return o},Uh=(e,{json:t,lossy:n}={})=>{const r=[];return tj(!(t||n),!!t,new Map,r)(e),r},El=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Bh(Uh(e,t)):structuredClone(e):(e,t)=>Bh(Uh(e,t));function nj(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 rj(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function ij(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||nj,r=e.options.footnoteBackLabel||rj,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],p=String(c.identifier).toUpperCase(),h=Ai(p.toLowerCase());let y=0;const x=[],b=e.footnoteCounts.get(p);for(;b!==void 0&&++y<=b;){x.length>0&&x.push({type:"text",value:" "});let g=typeof n=="string"?n:n(u,y);typeof g=="string"&&(g={type:"text",value:g}),x.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,y),className:["data-footnote-backref"]},children:Array.isArray(g)?g:[g]})}const v=d[d.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const g=v.children[v.children.length-1];g&&g.type==="text"?g.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...x)}else d.push(...x);const m={type:"element",tagName:"li",properties:{id:t+"fn-"+h},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:{...El(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
135
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
136
+ `}]}}const Ql=function(e){if(e==null)return aj;if(typeof e=="function")return Zl(e);if(typeof e=="object")return Array.isArray(e)?oj(e):sj(e);if(typeof e=="string")return lj(e);throw new Error("Expected function, string, or object as test")};function oj(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ql(e[n]);return Zl(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function sj(e){const t=e;return Zl(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function lj(e){return Zl(t);function t(n){return n&&n.type===e}}function Zl(e){return t;function t(n,r,i){return!!(uj(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function aj(){return!0}function uj(e){return e!==null&&typeof e=="object"&&"type"in e}const bx=[],cj=!0,ho=!1,Nc="skip";function jc(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=Ql(o),c=i?1:-1;d(e,void 0,[])();function d(p,h,y){const x=p&&typeof p=="object"?p:{};if(typeof x.type=="string"){const v=typeof x.tagName=="string"?x.tagName:typeof x.name=="string"?x.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(p.type+(v?"<"+v+">":""))+")"})}return b;function b(){const v=!o||u(p,h,y[y.length-1]||void 0);let m=bx;if(l&&v&&(m=Hh(l(p,y,h)),m[0]===ho))return m;if("children"in p&&p.children){const g=p;if(g.children&&m[0]!==Nc){let k=(i?-1:g.children.length)+c;const _=[...y,g];for(;k>-1&&k<g.children.length;){const E=g.children[k],$=d(E,k,_)();if($[0]===ho)return $;k=typeof $[1]=="number"?$[1]:k+c}}}if(a&&v){const g=Hh(a(p,y,h));if(g[0]===Nc)throw new Error("Unexpected value `"+g[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(g[0]===ho||typeof g[1]=="number")return g}return m}}}function Hh(e){return Array.isArray(e)?e:typeof e=="number"?[cj,e]:e==null?bx:[e]}function Jl(e,t,n,r){let i,o,s;o=t,s=n,typeof o=="function"?jc(e,i,_c(o),s):jc(e,i,dj(o),s)}function dj(e){return!e||typeof e!="object"?e:{enter:typeof e.enter=="function"?_c(e.enter):e.enter,exit:typeof e.exit=="function"?_c(e.exit):e.exit}}function _c(e){return t;function t(n,r,i){return e(n,i,r[r.length-1])}}const $c={}.hasOwnProperty,fj={};function pj(e,t){const n=t||fj,r=new Map,i=new Map,o=new Map,s={...YN,...n.handlers},l={all:u,applyData:mj,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:s,one:a,options:n,patch:hj,wrap:yj};return Jl(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:p}=c,h=l.handlers[p];if($c.call(l.handlers,p)&&h)return h(l,c,d);if(l.options.passThrough&&l.options.passThrough.includes(p)){if("children"in c){const{children:x,...b}=c;return{...El(b),children:l.all(c)}}return El(c)}return(l.options.unknownHandler||gj)(l,c,d)}function u(c){const d=[];if("children"in c){const p=c.children;let h=-1;for(;++h<p.length;){const y=l.one(p[h],c);if(y){if(h&&p[h-1].type==="break"&&(!Array.isArray(y)&&y.type==="text"&&(y.value=Wh(y.value)),!Array.isArray(y)&&y.type==="element")){const x=y.children[0];x&&x.type==="text"&&(x.value=Wh(x.value))}Array.isArray(y)?d.push(...y):d.push(y)}}}return d}}function hj(e,t){e.position&&(t.position=rS(e))}function mj(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,El(o)),"children"in n&&n.children&&r!==null&&r!==void 0&&(n.children=r)}return n}function gj(e,t){const n=t.data||{},r="value"in t&&!($c.call(n,"hProperties")||$c.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 yj(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
137
+ `});++r<e.length;)r&&n.push({type:"text",value:`
138
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
139
+ `}),n}function Wh(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Vh(e,t){const n=pj(e,t),r=n.one(e,void 0),i=ij(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
140
+ `},i),o}function vj(e,t){return e&&"run"in e?async function(n,r){const i=Vh(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Vh(n,{file:r,...e||t})}}function qh(e){if(e)throw e}var Ds=Object.prototype.hasOwnProperty,Ex=Object.prototype.toString,Kh=Object.defineProperty,Gh=Object.getOwnPropertyDescriptor,Yh=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Ex.call(t)==="[object Array]"},Xh=function(t){if(!t||Ex.call(t)!=="[object Object]")return!1;var n=Ds.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Ds.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Ds.call(t,i)},Qh=function(t,n){Kh&&n.name==="__proto__"?Kh(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Zh=function(t,n){if(n==="__proto__")if(Ds.call(t,n)){if(Gh)return Gh(t,n).value}else return;return t[n]},xj=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=Zh(l,n),i=Zh(t,n),l!==i&&(c&&i&&(Xh(i)||(o=Yh(i)))?(o?(o=!1,s=r&&Yh(r)?r:[]):s=r&&Xh(r)?r:{},Qh(l,{name:n,newValue:e(c,s,i)})):typeof i<"u"&&Qh(l,{name:n,newValue:i}));return l};const Xa=ym(xj);function Tc(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 wj(){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?kj(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 kj(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 xn={basename:bj,dirname:Ej,extname:Sj,join:Cj,sep:"/"};function bj(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');qo(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 Ej(e){if(qo(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 Sj(e){qo(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 Cj(...e){let t=-1,n;for(;++t<e.length;)qo(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Nj(n)}function Nj(e){qo(e);const t=e.codePointAt(0)===47;let n=jj(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function jj(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 qo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const _j={cwd:$j};function $j(){return"/"}function Lc(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Tj(e){if(typeof e=="string")e=new URL(e);else if(!Lc(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 Lj(e)}function Lj(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 Qa=["history","path","basename","stem","extname","dirname"];class Sx{constructor(t){let n;t?Lc(t)?n={path:t}:typeof t=="string"||Ij(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":_j.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Qa.length;){const o=Qa[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)Qa.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?xn.basename(this.path):void 0}set basename(t){Ja(t,"basename"),Za(t,"basename"),this.path=xn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?xn.dirname(this.path):void 0}set dirname(t){Jh(this.basename,"dirname"),this.path=xn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?xn.extname(this.path):void 0}set extname(t){if(Za(t,"extname"),Jh(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=xn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Lc(t)&&(t=Tj(t)),Ja(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?xn.basename(this.path,this.extname):void 0}set stem(t){Ja(t,"stem"),Za(t,"stem"),this.path=xn.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 Kl(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 Za(e,t){if(e&&e.includes(xn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+xn.sep+"`")}function Ja(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Jh(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Ij(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Aj=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},Rj={}.hasOwnProperty;class lf extends Aj{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=wj()}copy(){const t=new lf;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Xa(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(nu("data",this.frozen),this.namespace[t]=n,this):Rj.call(this.namespace,t)&&this.namespace[t]||void 0:t?(nu("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=ws(t),r=this.parser||this.Parser;return eu("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),eu("process",this.parser||this.Parser),tu("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,s){const l=ws(t),a=r.parse(l);r.run(a,l,function(c,d,p){if(c||!d||!p)return u(c);const h=d,y=r.stringify(h,p);Pj(y)?p.value=y:p.result=y,u(c,p)});function u(c,d){c||!d?s(c):o?o(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),eu("processSync",this.parser||this.Parser),tu("processSync",this.compiler||this.Compiler),this.process(t,i),tm("processSync","process",n),r;function i(o,s){n=!0,qh(o),r=s}}run(t,n,r){em(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=ws(n);i.run(t,a,u);function u(c,d,p){const h=d||t;c?l(c):s?s(h):r(void 0,h,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),tm("runSync","run",r),i;function o(s,l){qh(s),i=l,r=!0}}stringify(t,n){this.freeze();const r=ws(n),i=this.compiler||this.Compiler;return tu("stringify",i),em(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(nu("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=Xa(!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,p=-1;for(;++d<r.length;)if(r[d][0]===u){p=d;break}if(p===-1)r.push([u,...c]);else if(c.length>0){let[h,...y]=c;const x=r[p][1];Tc(x)&&Tc(h)&&(h=Xa(!0,x,h)),r[p]=[u,h,...y]}}}}const Oj=new lf().freeze();function eu(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function tu(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function nu(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 em(e){if(!Tc(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function tm(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ws(e){return Mj(e)?e:new Sx(e)}function Mj(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Pj(e){return typeof e=="string"||Fj(e)}function Fj(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Dj="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",nm=[],rm={allowDangerousHtml:!0},zj=/^(https?|ircs?|mailto|xmpp)$/i,Bj=[{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 Uj(e){const t=Hj(e),n=Wj(e);return Vj(t.runSync(t.parse(n),n),e)}function Hj(e){const t=e.rehypePlugins||nm,n=e.remarkPlugins||nm,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...rm}:rm;return Oj().use(EN).use(n).use(vj,r).use(t)}function Wj(e){const t=e.children||"",n=new Sx;return typeof t=="string"&&(n.value=t),n}function Vj(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,a=t.urlTransform||Cx;for(const c of Bj)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+Dj+c.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Jl(e,u),uS(e,{Fragment:f.Fragment,components:i,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0});function u(c,d,p){if(c.type==="raw"&&p&&typeof d=="number")return s?p.children.splice(d,1):p.children[d]={type:"text",value:c.value},d;if(c.type==="element"){let h;for(h in Ka)if(Object.hasOwn(Ka,h)&&Object.hasOwn(c.properties,h)){const y=c.properties[h],x=Ka[h];(x===null||x.includes(c.tagName))&&(c.properties[h]=a(String(y||""),h,c))}}if(c.type==="element"){let h=n?!n.includes(c.tagName):o?o.includes(c.tagName):!1;if(!h&&r&&typeof d=="number"&&(h=!r(c,d,p)),h&&p&&typeof d=="number")return l&&c.children?p.children.splice(d,1,...c.children):p.children.splice(d,1),d}}}function Cx(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||zj.test(e.slice(0,t))?e:""}function im(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 qj(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Kj(e,t,n){const i=Ql((n||{}).ignore||[]),o=Gj(t);let s=-1;for(;++s<o.length;)jc(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 Nc}function a(u,c,d){const p=c[c.length-1],h=o[s][0],y=o[s][1];let x=0,b=!1,v=[];h.lastIndex=0;let m=h.exec(u.value);for(;m;){const k=m.index,_={index:m.index,input:m.input,stack:[...c,u]};let E=y(...m,_);if(typeof E=="string"&&(E=E.length>0?{type:"text",value:E}:void 0),E===!1)h.lastIndex=k+1;else{if(x!==k&&g({type:"text",value:u.value.slice(x,k)}),Array.isArray(E))for(const $ of E)g($);else E&&g(E);x=k+m[0].length,b=!0}if(!h.global)break;m=h.exec(u.value)}return b?(x<u.value.length&&g({type:"text",value:u.value.slice(x)}),p.children.splice(d,1,...v)):v=[u],d+v.length;function g(k){const _=v[v.length-1];_&&_.type==="text"&&k.type==="text"?_.value+=k.value:v.push(k)}}}function Gj(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([Yj(i[0]),Xj(i[1])])}return t}function Yj(e){return typeof e=="string"?new RegExp(qj(e),"g"):e}function Xj(e){return typeof e=="function"?e:function(){return e}}const ru="phrasing",iu=["autolink","link","image","label"];function Qj(){return{transforms:[i_],enter:{literalAutolink:Jj,literalAutolinkEmail:ou,literalAutolinkHttp:ou,literalAutolinkWww:ou},exit:{literalAutolink:r_,literalAutolinkEmail:n_,literalAutolinkHttp:e_,literalAutolinkWww:t_}}}function Zj(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ru,notInConstruct:iu},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ru,notInConstruct:iu},{character:":",before:"[ps]",after:"\\/",inConstruct:ru,notInConstruct:iu}]}}function Jj(e){this.enter({type:"link",title:null,url:"",children:[],position:void 0},e)}function ou(e){this.config.enter.autolinkProtocol.call(this,e)}function e_(e){this.config.exit.autolinkProtocol.call(this,e)}function t_(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 n_(e){this.config.exit.autolinkEmail.call(this,e)}function r_(e){this.exit(e)}function i_(e){Kj(e,[[new RegExp("(?<![\\da-z])(https?:\\/\\/|www(?=\\.))([\\w-]*\\.[\\w\\-.]*)([^\\t\\n\\r ]*)","gi"),o_],[new RegExp("(?<![\\w+\\-.@])xmpp:([\\w+\\-.]+)@([\\w-]+(?:\\.[\\w-]+)+)(\\/(?:[\\w\\-/]|\\.(?=[\\dA-Za-z]))*)?","g"),a_],[new RegExp("(?<![\\w+\\-.@])mailto:([\\w+\\-.]+)@([\\w-]+(?:\\.[\\w-]+)+)","g"),l_],[new RegExp("(?<![\\w+\\-.]|(?:^|[^\\d@A-Za-z])(?:mailto|xmpp):)([\\w+\\-.]+)@([\\w-]+(?:\\.[\\w-]+)+)","g"),s_]],{ignore:["link","linkReference"]})}function o_(e,t,n,r,i){if(!d_(i))return!1;let o="";if(/^w/i.test(t)&&(n=t+n,t="",o="http://"),Wo(n.charCodeAt(0))||!u_(n))return!1;const s=c_(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 s_(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 l_(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 a_(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 u_(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 c_(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=im(e,"(");let o=im(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 d_(e){const t=e.input.charCodeAt(e.index-1);return e.index===0||Pr(t)||Wo(t)}Nx.peek=w_;function f_(){this.buffer()}function p_(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function h_(){this.buffer()}function m_(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function g_(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=hn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function y_(e){this.exit(e)}function v_(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=hn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function x_(e){this.exit(e)}function w_(){return"["}function Nx(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 k_(){return{enter:{gfmFootnoteCallString:f_,gfmFootnoteCall:p_,gfmFootnoteDefinitionLabelString:h_,gfmFootnoteDefinition:m_},exit:{gfmFootnoteCallString:g_,gfmFootnoteCall:y_,gfmFootnoteDefinitionLabelString:v_,gfmFootnoteDefinition:x_}}}function b_(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Nx},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?`
141
+ `:" ")+o.indentLines(o.containerFlow(r,l.current()),t?jx:E_))),u(),a}}function E_(e,t,n){return t===0?e:jx(e,t,n)}function jx(e,t,n){return(n?"":" ")+e}const S_=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];af.attention=$_;af.peek=T_;function C_(){return{canContainEols:["delete"],enter:{strikethrough:j_},exit:{strikethrough:__}}}function N_(){return{handlers:{delete:af},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:S_}]}}function j_(e){this.enter({type:"delete",children:[],position:void 0},e)}function __(e){this.exit(e)}function af(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 $_(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function T_(){return"~"}function L_(e){return e.length}function I_(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||L_,o=[],s=[],l=[],a=[];let u=0,c=-1;for(;++c<e.length;){const x=[],b=[];let v=-1;for(e[c].length>u&&(u=e[c].length);++v<e[c].length;){const m=A_(e[c][v]);if(n.alignDelimiters!==!1){const g=i(m);b[v]=g,(a[v]===void 0||g>a[v])&&(a[v]=g)}x.push(m)}s[c]=x,l[c]=b}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<u;)o[d]=om(r[d]);else{const x=om(r);for(;++d<u;)o[d]=x}d=-1;const p=[],h=[];for(;++d<u;){const x=o[d];let b="",v="";x===99?(b=":",v=":"):x===108?b=":":x===114&&(v=":");let m=n.alignDelimiters===!1?1:Math.max(1,a[d]-b.length-v.length);const g=b+"-".repeat(m)+v;n.alignDelimiters!==!1&&(m=b.length+m+v.length,m>a[d]&&(a[d]=m),h[d]=m),p[d]=g}s.splice(1,0,p),l.splice(1,0,h),c=-1;const y=[];for(;++c<s.length;){const x=s[c],b=l[c],v=n.fillRows===!1?Math.max(1,s[c===1?0:c].length):u;d=-1;const m=[];for(;++d<v;){const g=x[d]||"";let k="",_="";if(n.alignDelimiters!==!1){const E=a[d]-(b[d]||0),$=o[d];if($===114)k=" ".repeat(E);else if($===99){const C=E/2;E%2?(k=" ".repeat(C+.5),_=" ".repeat(C-.5)):(k=" ".repeat(C),_=k)}else _=" ".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(k),m.push(g),n.alignDelimiters!==!1&&m.push(_),n.padding!==!1&&m.push(" "),(n.delimiterEnd!==!1||d!==v-1)&&m.push("|")}y.push(n.delimiterEnd===!1?m.join("").replace(/ +$/,""):m.join(""))}return y.join(`
142
+ `)}function A_(e){return e==null?"":String(e)}function om(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 R_=Ql(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function O_(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()),M_);return i(),s}function M_(e,t,n){return">"+(n?"":" ")+e}function P_(e,t){return sm(e,t.inConstruct,!0)&&!sm(e,t.notInConstruct,!1)}function sm(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function lm(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){const o=n.unsafe[i];if(o.character===`
143
+ `&&!o.before&&!o.after&&P_(n.stack,o))return/[\t ]/.test(r.before)?"":" "}return`\\
144
+ `}function F_(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 D_(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 z_(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 B_(e,t,n,r){const i=z_(n),o=e.value||"";if(D_(e,n)){const d=n.enter("codeIndented"),p=n.indentLines(o,U_);return d(),p}const s=n.createTracker(r),l=i.repeat(Math.max(F_(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:`
145
+ `,encode:["`"],...s.current()})),d()}return c+=s.move(`
146
+ `),o&&(c+=s.move(o+`
147
+ `)),c+=s.move(l),a(),c}function U_(e,t,n){return(n?"":" ")+e}function uf(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 H_(e,t,n,r){const i=uf(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?" ":`
148
+ `,...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 W_(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 Sl(e){const t=e.codePointAt(0);return t===void 0?"":String.fromCodePoint(t)}function mi(e){const t=e.codePointAt(e.length-2);return t!==void 0&&t>65535?e.slice(-2):e.slice(-1)}function _x(e){return"&#x"+e.toString(16).toUpperCase()+";"}function am(e,t,n){const r=ar(e),i=ar(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 V_(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:vt(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(!vt(o))return;for(;o===45||xt(o);)o=e.charCodeAt(++i);const s=e.slice(r,i).toLowerCase();return!n&&o!==47&&Cc.includes(s)?1:dx.includes(s)?6:7}const $x=new Map([["*",!1],["_",!0]]);function q_(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 Tx(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=$x.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=ar(c.charCodeAt(c.length-1)),p=ar((u<e.length?e[u].value:n).charCodeAt(0)),h=!p||p===2&&!!d,y=!d||d===2&&!!p,x={tokens:e.slice(s,u),markers:[],start:0,end:0,open:a?h&&(!!d||!y):h,close:a?y&&(!!p||!h):y,split:a!==void 0};for(const b of x.tokens){i.set(b,[...x.tokens]),o.set(b,x);let v=b.value.length;for(;v--;)x.markers.push(b)}x.end=x.markers.length,r.push(x),s=u}for(G_(r,i),s=-1;++s<e.length;){const l=i.get(e[s]);if(l)return{attention:q_(e,l,o),index:s}}}function ks(e,t){const n=e[t?0:e.length-1];if(!n||n.attention)return;const r=t?Sl(n.value):mi(n.value),i=_x(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 K_(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=ea(e,a,r,i),c=Tx(u,r,i);if(!c||c.index>n.index)return{chosen:a,mistake:c,tokens:u}}}}function G_(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),p=r.markers.slice(r.start,r.start+c),h=d[0],y=p[0];if(h===d[c-1]&&h.value.length===c&&y===p[c-1]&&y.value.length===c&&h.attention===y.attention)t.delete(h),t.delete(y);else{const x=[...new Set([...d,...p])];for(const b of x){const v=t.get(b);v&&v.push(...x)}}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 Y_(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(!nx(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 X_(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 h=t.handle.handlers[i[s+1].type];h&&h.peek&&(h=h.peek),c=h?Sl(h(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===`
149
+ `)&&u.type==="html"&&V_(u.value)!==7&&(o[o.length-1]=d.replace(/(\r?\n|\r)$/," "),l=" ",a=t.createTracker(n),a.move(ta(o,n.before,n.after)));const p=t.handle.handlers[u.type];if(p&&p.attention){const h=cf(u,p.attention,t,a);if(!h)continue;o.push(h),l=mi(h.sequences[0])}else{const h=t.handle(u,e,t,{...a.current(),after:c,before:l});if(!h)continue;a.move(h),o.push(h),l=mi(h)}}return r.pop(),o}function cf(e,t,n,r){const{construct:i,markers:o,sizes:s}=t(e,n),l=Y_(e.type,o,s),a=l[0],u=n.enter(i),c=n.createTracker(r.current());c.move(a);const d=X_(e,n,{...c.current(),before:a,after:a});if(u(),d.length!==0)return r.move(a),r.move(ta(d,a,a)),r.move(a),{children:d,sequences:l}}function um(e,t,n,r){let i=ea(e,t,n,r),o=Tx(i,n,r);for(;o;){const s=K_(e,t,o,n,r);if(!s)return;t=s.chosen,i=s.tokens,o=s.mistake}return i}function Lx(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&&$x.has(c)&&u.length>n.length})||s.sequences[0];a!==s.sequences[0]&&t.set(s,a),Lx(s.children,t,a,a),i=a}}function ea(e,t,n,r){const i=[];let o,s=mi(n),l=-1;for(;++l<e.length;){const a=e[l];if(typeof a=="string"){const g={value:a,attention:void 0};o&&o===Sl(a)&&ks([g],!0),o=void 0,i.push(g),g.value&&(s=mi(g.value));continue}const u=t.get(a)||a.sequences[0],c=u.charAt(0),d=e[l+1],p=s,h=Sl(d===void 0?r:typeof d=="string"?d:t.get(d)||d.sequences[0]),y=ea(a.children,t,u,u),x=y[0].value,b=am(p.charCodeAt(p.length-1),x.charCodeAt(0),c);b.inside&&ks(y,!0);const v=mi(y[y.length-1].value),m=am(h.charCodeAt(0),v.charCodeAt(v.length-1),c);m.inside&&ks(y,!1),b.outside&&p!==`
150
+ `&&p!=="\r"&&ks(i,!1),m.outside&&(o=h),i.push({value:u,attention:a},...y,{value:u,attention:a}),s=u.charAt(u.length-1)}return i}function ta(e,t,n){const r=new Map;Lx(e,r,t,n);const i=(r.size>0?um(e,r,t,n):void 0)||um(e,new Map,t,n)||ea(e,new Map,t,n);let o="";for(const s of i)o+=s.value;return o}df.attention=Ix;df.peek=Q_;function df(e,t,n,r){const i=n.enter("phrasing"),o=cf(e,Ix,n,n.createTracker(r)),s=o?ta([o],r.before,r.after):"";return i(),s}function Ix(e,t){return{construct:"emphasis",markers:W_(t)==="*"?["*","_"]:["_","*"],sizes:[1]}}function Q_(e,t,n){return n.options.emphasis||"*"}function Z_(e,t){let n=!1;return Jl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,ho}),!!((!e.depth||e.depth<3)&&Gl(e)&&(t.options.setext||n))}function J_(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(Z_(e,n)){const d=n.enter("headingSetext"),p=n.enter("phrasing"),h=n.containerPhrasing(e,{...o.current(),before:`
151
+ `,after:`
152
+ `});return p(),d(),h+`
153
+ `+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
154
+ `))+1))}const s="#".repeat(i),l=n.enter("headingAtx"),a=n.enter("phrasing");o.move(s+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
155
+ `,...o.current()});const c=u.charCodeAt(0);return(c===9||c===32)&&(u=_x(c)+u.slice(1)),u=u?s+" "+u:s,n.options.closeAtx&&(u+=" "+s),a(),l(),u}Ax.peek=e$;function Ax(e){return e.value||""}function e$(){return"<"}Rx.peek=t$;function Rx(e,t,n,r){const i=uf(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 t$(){return"!"}Ox.peek=n$;function Ox(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(p){return p!=="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 n$(){return"!"}Mx.peek=r$;function Mx(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 r$(){return"`"}function Px(e,t){const n=Gl(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))}Fx.peek=i$;function Fx(e,t,n,r){const i=uf(n),o=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);if(Px(e,n)){const y=n.stack;n.stack=y.filter(function(v){return v!=="phrasing"});const x=n.enter("autolink");let b=s.move("<");return b+=s.move(n.containerPhrasing(e,{before:b,after:">",...s.current()})),b+=s.move(">"),x(),n.stack=y,b}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),p=r.before.charAt(r.before.length-1);let h=e.title||void 0;if(!h&&!d&&(p===`
156
+ `||p==="\r")){let y=0;for(;y<c.length&&c.charCodeAt(y)!==93;)y+=c.charCodeAt(y)===92?2:1;c.charCodeAt(y+1)===58&&(h="")}return!e.url&&typeof h=="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 h=="string"?" ":")",...s.current()}))),a(),typeof h=="string"&&(a=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(h,{before:u,after:i,...s.current()})),u+=s.move(i),a()),u+=s.move(")"),l(),u}function i$(e,t,n){return Px(e,n)?"<":"["}Dx.peek=o$;function Dx(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(p){return p!=="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 o$(){return"["}function ff(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=ff(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 l$(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 zx(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 a$(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let s=e.ordered?l$(n):ff(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),zx(n)===s&&c){let d=-1;for(;++d<e.children.length;){const p=e.children[d];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.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 u$(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 c$(e,t,n,r){const i=u$(n);let o=n.bulletCurrent||ff(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,p,h){return p?(h?"":" ".repeat(s))+d:(h?o:o+" ".repeat(s-o.length))+d}}function d$(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),i(),s}function f$(e,t,n,r){if(!e.children.some(function(l){return R_(l)}))return n.containerFlow(e,r);const o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),s}function p$(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}pf.attention=Bx;pf.peek=h$;function pf(e,t,n,r){const i=n.enter("phrasing"),o=cf(e,Bx,n,n.createTracker(r)),s=o?ta([o],r.before,r.after):"";return i(),s}function Bx(e,t){return{construct:"strong",markers:p$(t)==="*"?["*","_"]:["_","*"],sizes:[2]}}function h$(e,t,n){return n.options.strong||"*"}function m$(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 g$(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 y$(e,t,n){const r=(zx(n)+(n.options.ruleSpaces?" ":"")).repeat(g$(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Ic={blockquote:O_,break:lm,code:B_,definition:H_,emphasis:df,hardBreak:lm,heading:J_,html:Ax,image:Rx,imageReference:Ox,inlineCode:Mx,link:Fx,linkReference:Dx,list:a$,listItem:c$,paragraph:d$,root:f$,strong:pf,text:m$,thematicBreak:y$};function v$(){return{enter:{table:x$,tableData:cm,tableHeader:cm,tableRow:k$},exit:{codeText:b$,table:w$,tableData:su,tableHeader:su,tableRow:su}}}function x$(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 w$(e){this.exit(e),this.data.inTable=void 0}function k$(e){this.enter({type:"tableRow",children:[],position:void 0},e)}function su(e){this.exit(e)}function cm(e){this.enter({type:"tableCell",children:[],position:void 0},e)}function b$(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,E$));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function E$(e,t){return t==="|"?t:e}function S$(e){const t=e||{},{tableCellPadding:n,tablePipeAlign:r,stringLength:i}=t,o=n?" ":"|";return{handlers:{inlineCode:p,table:s,tableCell:a,tableRow:l},join:[C$],unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
157
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}]};function s(h,y,x,b){const v=c(h,x,b),m=v[0];if(m){let g=h.align?h.align.length:0,k=-1;if(!g)for(;++k<v.length;)v[k].length>g&&(g=v[k].length);for(;m.length<g;)m.push("")}return u(v,h.align)}function l(h,y,x,b){const v=d(h,x,b),m=u([v]);return m.slice(0,m.indexOf(`
158
+ `))}function a(h,y,x,b){const v=x.enter("tableCell"),m=x.enter("phrasing"),g=x.containerPhrasing(h,{...b,before:o,after:o});return m(),v(),g}function u(h,y){return I_(h,{align:y,alignDelimiters:r,fillRows:!1,padding:n,stringLength:i})}function c(h,y,x){const{children:b}=h;let v=-1;const m=[],g=y.enter("table");for(;++v<b.length;)m[v]=d(b[v],y,x);return g(),m}function d(h,y,x){const{children:b}=h;let v=-1;const m=[],g=y.enter("tableRow");for(;++v<b.length;)m[v]=a(b[v],h,y,x);return g(),m}function p(h,y,x){const b=Ic.inlineCode(h,y,x);if(!x.stack.includes("tableCell"))return b;const v=[];let m=0,g=b.indexOf("|");for(;g!==-1;){let k=g;for(;k>m&&b.charCodeAt(k-1)===92;)k--;v.push(b.slice(m,g)),(g-k)%2===0&&v.push("\\"),m=g,g=b.indexOf("|",g+1)}return v.push(b.slice(m)),v.join("")}}function C$(e,t,n,r){if(e.type==="table"&&n.type==="listItem"&&n.spread===!1&&(t.type==="definition"||t.type==="heading"&&N$(t,r)||t.type==="paragraph"||t.type==="table"))return 1}function N$(e,t){let n=!1;return Jl(e,function(r){if(r.type==="break"||"value"in r&&/\r?\n|\r/.test(r.value))return n=!0,ho}),!!((!e.depth||e.depth<3)&&Gl(e)&&(t.options.setext||n))}function j$(){return{exit:{taskListCheckValueChecked:dm,taskListCheckValueUnchecked:dm,paragraph:$$}}}function _$(){return{handlers:{paragraph:T$},join:[L$]}}function dm(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function $$(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 T$(e,t,n,r){if(!t||t.type!=="listItem"||Ux(t)!==e)return Ic.paragraph(e,t,n,r);const i="["+(t.checked?"x":" ")+"] ",o=n.createTracker(r);o.move(i);const s=Ic.paragraph(e.children.length>0?e:{type:"paragraph",children:[{type:"text",value:" "}]},t,n,{...r,...o.current()});return i+s}function L$(e,t,n){if(!(e.type==="definition"&&n.type==="listItem"))return;const r=Ux(n);if(r&&n.children.indexOf(e)<n.children.indexOf(r))return 0}function Ux(e){if(typeof e.checked=="boolean")for(const t of e.children){if(t.type==="paragraph")return t;if(t.type!=="definition")return}}function I$(){return[Qj(),k_(),C_(),v$(),j$()]}function A$(e){return{extensions:[Zj(),b_(e),N_(),S$(e),_$()]}}const R$={tokenize:z$,partial:!0},Hx={tokenize:B$,partial:!0},Wx={tokenize:U$,partial:!0},Vx={tokenize:H$,partial:!0},O$={tokenize:W$,partial:!0},qx={name:"wwwAutolink",tokenize:F$,previous:Gx},Kx={name:"protocolAutolink",tokenize:D$,previous:Yx},Fn={name:"emailAutolink",tokenize:P$,previous:Xx},Sn={};function M$(){return{text:Sn}}let mr=48;for(;mr<123;)Sn[mr]=Fn,mr++,mr===58?mr=65:mr===91&&(mr=97);Sn[43]=Fn;Sn[45]=Fn;Sn[46]=Fn;Sn[95]=Fn;Sn[72]=[Fn,Kx];Sn[104]=[Fn,Kx];Sn[87]=[Fn,qx];Sn[119]=[Fn,qx];function P$(e,t,n){const r=this;let i,o;return s;function s(d){return!Ac(d)||!Xx.call(r,r.previous)||hf(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(d))}function l(d){return Ac(d)?(e.consume(d),l):d===64?(e.consume(d),a):n(d)}function a(d){return d===46?e.check(O$,c,u)(d):d===45||d===95||xt(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&&vt(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function F$(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!Gx.call(r,r.previous)||hf(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(R$,e.attempt(Hx,e.attempt(Wx,o),n),n)(s))}function o(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function D$(e,t,n){const r=this;let i="",o=!1;return s;function s(d){return(d===72||d===104)&&Yx.call(r,r.previous)&&!hf(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),l):n(d)}function l(d){if(vt(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),l;if(d===58){const p=i.toLowerCase();if(p==="http"||p==="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||wl(d)||ze(d)||Pr(d)||Wo(d)?n(d):e.attempt(Hx,e.attempt(Wx,c),n)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function z$(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 B$(e,t,n){let r,i,o;return s;function s(u){return u===46||u===95?e.check(Vx,a,l)(u):u===null||ze(u)||Pr(u)||u!==45&&Wo(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 U$(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(Vx,t,o)(s):s===null||ze(s)||Pr(s)?t(s):(e.consume(s),i)}function o(s){return s===41&&r++,e.consume(s),i}}function H$(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)||Pr(l)?t(l):n(l)}function i(l){return l===null||l===40||l===91||ze(l)||Pr(l)?t(l):r(l)}function o(l){return vt(l)?s(l):n(l)}function s(l){return l===59?(e.consume(l),r):vt(l)?(e.consume(l),s):n(l)}}function W$(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return xt(o)?n(o):t(o)}}function Gx(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ze(e)}function Yx(e){return!vt(e)}function Xx(e){return!(e===47||Ac(e))}function Ac(e){return e===43||e===45||e===46||e===95||xt(e)}function hf(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 V$={tokenize:J$,partial:!0};function q$(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:X$,continuation:{tokenize:Q$},exit:Z$}},text:{91:{name:"gfmFootnoteCall",tokenize:Y$},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:K$,resolveTo:G$}}}}function K$(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=hn(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 G$(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 Y$(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 p=e.exit("gfmFootnoteCallString");return i.includes(hn(r.sliceSerialize(p)))?(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 X$(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,s=0,l;return a;function a(y){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(y){return y===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(y)}function c(y){if(s>999||y===93&&!l||y===null||y===91||ze(y))return n(y);if(y===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return o=hn(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return ze(y)||(l=!0),s++,e.consume(y),y===92?d:c}function d(y){return y===91||y===92||y===93?(e.consume(y),s++,c):c(y)}function p(y){return y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),i.includes(o)||i.push(o),Re(e,h,"gfmFootnoteDefinitionWhitespace")):n(y)}function h(y){return t(y)}}function Q$(e,t,n){return e.check(Vo,t,e.attempt(V$,t,n))}function Z$(e){e.exit("gfmFootnoteDefinition")}function J$(e,t,n){const r=this;return Re(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 eT(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)},p=[["enter",c,l],["enter",s[u][1],l],["exit",s[u][1],l],["enter",d,l]],h=l.parser.constructs.insideSpan.null;h&&pn(p,p.length,0,Yl(h,s.slice(u+1,a),l)),pn(p,p.length,0,[["exit",d,l],["enter",s[a][1],l],["exit",s[a][1],l],["exit",c,l]]),pn(s,u-1,a-u+3,p),a=u+p.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 p;function p(y){return u===126&&c[c.length-1][1].type!=="characterEscape"?a(y):(s.enter("strikethroughSequenceTemporary"),h(y))}function h(y){const x=ar(u);if(y===126)return d>1?a(y):(s.consume(y),d++,h);if(d<2&&!n)return a(y);const b=s.exit("strikethroughSequenceTemporary"),v=ar(y);return b._open=!v||v===2&&!!x,b._close=!x||x===2&&!!v,l(y)}}}class tT{constructor(){this.map=[],this.index=new Map}add(t,n,r){nT(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 nT(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 rT(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 iT(){return{flow:{null:{name:"table",tokenize:oT,resolveAll:sT}}}}function oT(e,t,n){const r=this;let i=0,o=0,s;return l;function l(w){let A=r.events.length-1;for(;A>-1;){const{type:z}=r.events[A][1];if(z==="lineEnding"||z==="linePrefix")A--;else break}const I=A>-1?r.events[A][1].type:null,P=I==="tableHead"||I==="tableRow"?E:a;return P===E&&r.parser.lazy[r.now().line]?n(w):P(w)}function a(w){return e.enter("tableHead"),e.enter("tableRow"),u(w)}function u(w){return w===124||(s=!0,o+=1),c(w)}function c(w){return w===null?n(w):ke(w)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),h):n(w):_e(w)?Re(e,c,"whitespace")(w):(o+=1,s&&(s=!1,i+=1),w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),s=!0,c):(e.enter("data"),d(w)))}function d(w){return w===null||w===124||ze(w)?(e.exit("data"),c(w)):(e.consume(w),w===92?p:d)}function p(w){return w===92||w===124?(e.consume(w),d):d(w)}function h(w){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(w):(e.enter("tableDelimiterRow"),s=!1,_e(w)?Re(e,y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):y(w))}function y(w){return w===45||w===58?b(w):w===124?(s=!0,e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),x):_(w)}function x(w){return _e(w)?Re(e,b,"whitespace")(w):b(w)}function b(w){return w===58?(o+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),v):w===45?(o+=1,v(w)):w===null||ke(w)?k(w):_(w)}function v(w){return w===45?(e.enter("tableDelimiterFiller"),m(w)):_(w)}function m(w){return w===45?(e.consume(w),m):w===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),g):(e.exit("tableDelimiterFiller"),g(w))}function g(w){return _e(w)?Re(e,k,"whitespace")(w):k(w)}function k(w){return w===124?y(w):w===null||ke(w)?!s||i!==o?_(w):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(w)):_(w)}function _(w){return n(w)}function E(w){return e.enter("tableRow"),$(w)}function $(w){return w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),$):w===null||ke(w)?(e.exit("tableRow"),t(w)):_e(w)?Re(e,$,"whitespace")(w):(e.enter("data"),C(w))}function C(w){return w===null||w===124||ze(w)?(e.exit("data"),$(w)):(e.consume(w),w===92?T:C)}function T(w){return w===92||w===124?(e.consume(w),C):C(w)}}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 p=new tT;for(;++n<e.length;){const h=e[n],y=h[1];h[0]==="enter"?y.type==="tableHead"?(l=!1,a!==0&&(fm(p,t,a,u,c),c=void 0,a=0),u={type:"table",start:Object.assign({},y.start),end:Object.assign({},y.end)},p.add(n,0,[["enter",u,t]])):y.type==="tableRow"||y.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({},y.start),end:Object.assign({},y.end)},p.add(n,0,[["enter",c,t]])),i=y.type==="tableDelimiterRow"?2:c?3:1):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(o[1]!==0&&(s[0]=s[1],d=bs(p,t,o,i,void 0,d),o=[0,0,0,0]),s[2]=n)):y.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(s[0]=s[1],d=bs(p,t,o,i,void 0,d)),o=s,s=[o[1],n,0,0])):y.type==="tableHead"?(l=!0,a=n):y.type==="tableRow"||y.type==="tableDelimiterRow"?(a=n,o[1]!==0?(s[0]=s[1],d=bs(p,t,o,i,n,d)):s[1]!==0&&(d=bs(p,t,s,i,n,d)),i=0):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")&&(s[3]=n)}for(a!==0&&fm(p,t,a,u,c),p.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=rT(t.events,n))}return e}function bs(e,t,n,r,i,o){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(o.end=Object.assign({},Kr(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const a=Kr(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=Kr(t.events,n[2]),c=Kr(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 p=t.events[n[2]],h=t.events[n[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const y=n[2]+1,x=n[3]-n[2]-1;e.add(y,x,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(o.end=Object.assign({},Kr(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function fm(e,t,n,r,i){const o=[],s=Kr(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 Kr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const lT={name:"tasklistCheck",tokenize:uT};function aT(){return{text:{91:lT}}}function uT(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 ke(a)?t(a):_e(a)?e.check({tokenize:cT},t,n)(a):n(a)}}function cT(e,t,n){return Re(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function dT(e){return ex([M$(),q$(),eT(e),iT(),aT()])}const fT={};function pT(e){const t=this,n=e||fT,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(dT(n)),o.push(I$()),s.push(A$(n))}function hT({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(mT,{side:i,path:i==="old"?e.oldPath??e.path:e.path,diffPath:e.path,version:n,labelled:r.length>1},i))})}function mT({side:e,path:t,diffPath:n,version:r,labelled:i}){const[o,s]=O.useState(null),[l,a]=O.useState(null);O.useEffect(()=>{let c=!0;return a(null),Cv(n,e).then(d=>c&&s(d.join(`
159
+ `)),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 x;const p=(x=/language-([\w+-]+)/.exec(c??""))==null?void 0:x[1],h=String(d??"").replace(/\n$/,""),y=p?NE(h,p):void 0;return y?f.jsx("code",{className:c,children:y.map((b,v)=>f.jsxs("span",{children:[b.map((m,g)=>m.types?f.jsx("span",{className:`token ${m.types}`,children:m.text},g):m.text),v<y.length-1&&`
160
+ `]},v))}):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(Uj,{remarkPlugins:[pT],components:u,urlTransform:(c,d)=>gT(c,d,t,e,r),children:o})})]})}function gT(e,t,n,r,i){if(t!=="src"||/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//"))return Cx(e);const o=yT(n,e.replace(/[?#].*$/,""));return o?Nv(o,r,i):""}function yT(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 Qx=1500;function Zx(e){if(hc(e.path))return{label:"画像",first:e.binary?"preview":"diff"};if(rE(e.path)&&!e.binary&&!e.large)return{label:"プレビュー",first:"diff"}}const vT=O.memo(function(t){const{file:n}=t,r=O.useRef(null),i=kT(r,t.scrollRoot),[o,s]=O.useState(!1),l=Rv(n),a=Zx(n),u=a?t.view:"diff",c=O.useMemo(()=>oE(n,t.content,t.expansion),[n,t.content,t.expansion]),d=O.useMemo(()=>i?CE(n,t.content):void 0,[n,t.content,i]);O.useEffect(()=>(t.register(n.path,r.current),()=>t.register(n.path,null)),[n.path,t.register]);const p=async()=>{await $i(n.path),s(!0),window.setTimeout(()=>s(!1),1400)},h=!!n.unchanged,y=h?wT(n):xT(n),x=()=>u==="preview"?i?hc(n.path)?f.jsx(jE,{file:n,version:t.version}):f.jsx(hT,{file:n,split:t.mode==="split",version:t.version}):f.jsx("div",{className:"fs-placeholder",style:{height:240}}):y?f.jsx("div",{className:"fs-note",children:y}):i?f.jsx(kE,{file:n,mode:h?"unified":t.mode,rows:c,tokens:d,byLine:t.byLine,onExpand:(b,v)=>t.onExpand(n.path,b,v)}):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":""}${h?" 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($d,{size:14})}),f.jsx(Ei,{status:h?"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 p(),title:o?"コピーしました":"パスをコピー","aria-label":"パスをコピー",children:f.jsx(Iy,{size:13})}),n.generated&&f.jsx("span",{className:"fs-tag",title:"ロックファイルや生成されたコード(最初は折りたたんでいます)",children:"生成"}),h&&f.jsx("span",{className:"fs-tag",title:"ツリーの「全体」から開いた、変更していないファイル",children:"変更なし"}),f.jsx("span",{className:"ds-spacer"}),a&&!(hc(n.path)&&n.binary)&&f.jsx("span",{className:"ds-seg fs-view-seg",role:"radiogroup","aria-label":"表示",children:[["diff","差分"],["preview",a.label]].map(([b,v])=>f.jsx("button",{role:"radio","aria-checked":u===b,className:u===b?"on":"",onClick:()=>t.onView(n.path,b),children:v},b))}),t.commentCount>0&&f.jsx(Ao,{n:t.commentCount,title:`コメント ${t.commentCount}`}),h?t.onClose&&f.jsx("button",{className:"ds-btn",onClick:()=>t.onClose(n.path),title:"一覧から外す(ツリーの「全体」からまた開けます)",children:"閉じる"}):f.jsxs(f.Fragment,{children:[f.jsx(Li,{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:b=>t.onReviewed(n.path,b.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(b=>f.jsx(qd,{c:b,showWhere:!0},b.id))]}),x()]}),!t.open&&(n.generated||l>Qx)&&!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 xT(e){if(e.binary)return"バイナリファイルのため、行の差分はありません";if(e.large)return"大きすぎるため、行の差分を表示していません";if(!(e.chunks.length>0))return e.modeChange?`ファイルのモードだけが変わりました(${e.modeChange})`:e.status==="renamed"?"名前だけが変わりました(内容の変更はありません)":"空のファイルです"}function wT(e){return e.loading?"読み込み中…":e.binary?"バイナリファイルです":e.large?"大きすぎるため、内容を表示していません":e.chunks.length===0?"空のファイルです":void 0}function kT(e,t){const[n,r]=O.useState(!1);return O.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 pm=(e,t)=>{const n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n};function bT({mode:e,onMode:t,tree:n,error:r,current:i,reviewed:o,commentCounts:s,onSelect:l,onReviewed:a}){var E,$;const[u,c]=O.useState(""),d=e==="all",[p,h]=O.useState(new Set),[y,x]=O.useState(null),b=O.useMemo(()=>d&&n?iE(n):null,[d,n]);O.useEffect(()=>{b&&y===null&&x(b)},[b,y]);const v=O.useMemo(()=>n?Lv(n,u):null,[n,u]),m=O.useMemo(()=>n&&!d?Tv(n):[],[n,d]),g=C=>{var T;return u.trim()!==""||(d?((T=y??b)==null?void 0:T.has(C))===!0:!p.has(C))},k=C=>d?x(T=>pm(T??b??new Set,C)):h(T=>pm(T,C)),_=(C,T)=>{var I;const w={paddingLeft:8+T*12};if(C.plain||(I=C.file)!=null&&I.unchanged)return f.jsxs("div",{className:`fs-tree-row file plain${i===C.path?" current":""}${C.file?" shown":""}`,style:w,onClick:()=>l(C.path),title:`${C.path}(変更なし)`,children:[f.jsx("span",{className:"fs-tree-check-space"}),f.jsx(Ei,{status:"unchanged",small:!0}),f.jsx("span",{className:"fs-tree-name",children:C.name}),(s.get(C.path)??0)>0&&f.jsx(Ao,{n:s.get(C.path)})]},C.path);if(C.file){const P=C.file,z=s.get(P.path)??0,K=o.has(P.path);return f.jsxs("div",{className:`fs-tree-row file${i===P.path?" current":""}${K?" reviewed":""}`,style:w,onClick:()=>l(P.path),title:P.oldPath?`${P.oldPath} → ${P.path}`:P.path,children:[f.jsx("input",{type:"checkbox",className:"fs-tree-check",checked:K,onClick:U=>U.stopPropagation(),onChange:U=>a(P.path,U.target.checked),"aria-label":`${P.path} を確認済みにする`,title:"確認済み"}),f.jsx(Ei,{status:P.status,small:!0}),f.jsx("span",{className:"fs-tree-name",children:C.name}),z>0&&f.jsx(Ao,{n:z}),f.jsxs("span",{className:"fs-tree-counts",children:[P.additions>0&&f.jsxs("span",{className:"added",children:["+",P.additions]}),P.deletions>0&&f.jsxs("span",{className:"removed",children:["−",P.deletions]})]})]},C.path)}const A=g(C.path);return f.jsxs("div",{children:[f.jsxs("div",{className:`fs-tree-row dir${d&&b&&!b.has(C.path)?" plain":""}`,style:w,onClick:()=>k(C.path),title:C.path,children:[f.jsx("span",{className:`fs-fold small${A?" open":""}`,children:f.jsx($d,{size:12})}),f.jsx("span",{className:"fs-tree-name",children:C.name})]}),A&&C.children.map(P=>_(P,T+1))]},C.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(([C,T,w])=>f.jsx("button",{role:"radio","aria-checked":e===C,className:e===C?"on":"",onClick:()=>t(C),title:w,children:T},C))}),d?f.jsx("button",{className:"fs-icon-btn",disabled:!b,onClick:()=>{var C;return x((C=y??b)!=null&&C.size?new Set:b)},title:(E=y??b)!=null&&E.size?"すべてのフォルダを閉じる":"変更のあるフォルダを開く",children:($=y??b)!=null&&$.size?"−":"+"}):m.length>0&&f.jsx("button",{className:"fs-icon-btn",onClick:()=>h(p.size?new Set:new Set(m)),title:p.size?"すべてのフォルダを開く":"すべてのフォルダを閉じる",children:p.size?"+":"−"}),f.jsx("input",{className:"fs-filter",type:"search",placeholder:"ファイルを絞り込む",value:u,onChange:C=>c(C.target.value)})]}),f.jsx("div",{className:"fs-tree-body",children:r?f.jsxs("div",{className:"fs-tree-empty ds-muted",children:["リポジトリのファイルを読めませんでした: ",r]}):v?v.children.length>0?v.children.map(C=>_(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 Jx="fileshape.reviewed:",ET=e=>`${e.repoRoot}|${e.targetLabel}|${e.baseLabel}`,hm=e=>nn(Jx+e,{}),ST=(e,t)=>$t(Jx+e,t),CT=e=>new Map(e.map(t=>[t.path,dE(t)]));function NT(e,t){const n=new Set;for(const[r,i]of e)t[r]===i&&n.add(r);return n}const lu=300,jT={added:"A",modified:"M",removed:"D",renamed:"R"};function _T(e){const t=[e.additions||e.deletions?`+${e.additions} −${e.deletions}`:"",e.binary?"バイナリ":"",e.large?"大きいファイル":""].filter(Boolean),n=e.status==="renamed"&&e.oldPath?`${e.oldPath} → ${e.path}`:e.path;return`- ${jT[e.status]} ${n}${t.length?`(${t.join("、")})`:""}`}function $T(e){const t=e.files.filter(i=>!i.unchanged&&!i.generated),n=e.files.filter(i=>!i.unchanged&&i.generated).length,r=[`変更されたファイル(${t.length}):`,...t.slice(0,lu).map(_T)];return t.length>lu&&r.push(`- ほか ${t.length-lu} ファイル`),n&&r.push(`(生成されたファイル ${n} 個は対象外)`),r.push("","コメントの付け方:","- path: ファイルのパス(リポジトリのルートから)",'- line: 指摘する行の番号。side が "new" なら変更後のファイルの行、"old" なら変更前のファイルの行','- side: ふつうは "new"。削除された行を指すときだけ "old"',"- code: その行のコードをファイルにあるとおりに(複数行のときは改行でつなぎ、endLine に最後の行の番号。1行なら endLine は null)","- target: null",'- 変更されていないファイルの行も指せます(この変更に合わせて直すべき箇所など)。そのときも side は "new"'),r.join(`
161
+ `)}function mm(e,t,n){const r=e.status==="removed"?"old":e.status==="added"||e.unchanged?"new":t.side??"new",i=ql(e,r,n);if(i.size===0)return null;const o=(t.code??"").replace(/\n+$/,"").split(`
162
+ `),s=t.line??1,l=c=>{let d;for(const p of i.keys())o.every((h,y)=>i.has(p+y)&&c(i.get(p+y),h))&&(d===void 0||Math.abs(p-s)<Math.abs(d-s))&&(d=p);return d},a=(c,d)=>({path:e.path,side:r,line:c,...d>1?{endLine:c+d-1}:{},code:Array.from({length:d},(p,h)=>i.get(c+h)??"").join(`
163
+ `)});if(o.some(c=>c.trim()!=="")){const c=l((d,p)=>d===p)??l((d,p)=>d.trim()===p.trim());if(c!==void 0)return{target:a(c,o.length),exact:!0}}if(t.line===null||!i.has(t.line))return null;let u=t.endLine!==null&&t.endLine>t.line?t.endLine-t.line+1:1;for(;u>1&&!i.has(t.line+u-1);)u--;return{target:a(t.line,u),exact:!1}}const TT=(e,t)=>e.files.find(n=>n.path===t)??e.files.find(n=>n.oldPath===t),au="fileshape.treeWidth",uu=280,LT={};function IT({data:e,active:t,onComments:n,request:r,ai:i,onAi:o}){var R;const s=ET(e),[l,a]=O.useState(()=>gE(s)),u=`fileshape.opened:${s}`,[c,d]=O.useState(()=>AT(nn(u,[])));O.useEffect(()=>$t(u,c),[u,c]);const[p,h]=O.useState(new Map),y=O.useRef(new Set),x=O.useMemo(()=>new Set(e.files.map(B=>B.path)),[e]),b=O.useMemo(()=>[...new Set([...c,...l.filter(B=>B.unchanged).map(B=>B.path)])].filter(B=>!x.has(B)),[c,l,x]);O.useEffect(()=>{for(const B of b){if(p.has(B)||y.current.has(B))continue;const Q=y.current;Q.add(B);const ne=xe=>{y.current===Q&&(Q.delete(B),h(Se=>new Map(Se).set(B,xe)))};sh(B).then(xe=>ne(xe?Wa(B,xe):null),()=>ne(null))}},[b,p]),O.useEffect(()=>{c.some(B=>p.get(B)===null)&&d(B=>B.filter(Q=>p.get(Q)!==null))},[p,c]);const v=O.useMemo(()=>b.filter(B=>p.get(B)!==null).map(B=>p.get(B)??Wa(B,void 0)),[b,p]),m=O.useMemo(()=>v.length?{...e,files:[...e.files,...v]}:e,[e,v]),g=O.useMemo(()=>new Set(l.map(B=>B.path)),[l]),k=O.useCallback(B=>d(Q=>Q.filter(ne=>ne!==B)),[]),_=O.useMemo(()=>lh(m.files),[m]),E=O.useMemo(()=>$v(_),[_]),[$,C]=O.useState(()=>ic("fileshape","treeMode","changes")),T=B=>{C(B),oc("fileshape","treeMode",B)},[w,A]=O.useState(null);O.useEffect(()=>{if($!=="all"||(w==null?void 0:w.diff)===e)return;let B=!0;return tE().then(Q=>B&&A({diff:e,paths:Q}),Q=>B&&A({diff:e,error:Q instanceof Error?Q.message:String(Q)})),()=>{B=!1}},[$,e,w]);const I=(w==null?void 0:w.diff)===e?w.paths:void 0,P=O.useMemo(()=>$==="changes"?_:I?lh(m.files,I):null,[$,_,m,I]),[z,K]=O.useState(()=>ic("fileshape","mode","unified")),U=B=>{K(B),oc("fileshape","mode",B)},[q,D]=O.useState(()=>hm(s));O.useEffect(()=>D(hm(s)),[s]);const W=O.useMemo(()=>CT(e.files),[e]),S=O.useMemo(()=>NT(W,q),[W,q]),[X,H]=O.useState({}),j=B=>{if(B in X)return X[B];const Q=cn(m,B);return!Q||!(S.has(B)||Q.generated||Rv(Q)>Qx)},M=O.useRef(j);M.current=j;const L=O.useCallback(B=>H(Q=>({...Q,[B]:!M.current(B)})),[]),[F,V]=O.useState(new Map),[Z,te]=O.useState({}),[le,re]=O.useState(0),ce=O.useRef(new Map),oe=O.useRef(!0);O.useEffect(()=>{if(oe.current){oe.current=!1;return}ce.current=new Map,V(new Map),te({}),re(B=>B+1),y.current=new Set,h(new Map)},[e]);const de=O.useCallback(B=>{let Q=ce.current.get(B);if(!Q){const ne=ce.current;Q=Cv(B,"new").then(xe=>(ce.current===ne&&V(Se=>new Map(Se).set(B,xe)),xe)),Q.catch(()=>ne.delete(B)),ne.set(B,Q)}return Q},[]),we=O.useCallback(async(B,Q,ne)=>{const xe=cn(m,B);if(!xe)return;let Se;try{Se=await de(B)}catch($e){window.alert(`ファイルを読めませんでした: ${$e instanceof Error?$e.message:String($e)}`);return}const Ce=Vl(xe,Se.length)[Q.index];Ce&&te($e=>({...$e,[B]:sE($e[B]??{},Ce,ne,Se.length)}))},[m,de]),[je,N]=O.useState({}),G=O.useCallback((B,Q)=>N(ne=>({...ne,[B]:Q})),[]),ee=O.useRef(new Map),he=O.useCallback((B,Q)=>{Q?ee.current.set(B,Q):ee.current.delete(B)},[]),[fe,pe]=O.useState(null),Te=O.useCallback((B,Q)=>{const ne=W.get(B);if(ne&&(D(xe=>{const Se={...xe};return Q?Se[B]=ne:delete Se[B],ST(s,Se),Se}),H(xe=>({...xe,[B]:!Q})),Q)){const xe=ee.current.get(B),Se=fe;xe&&Se&&xe.getBoundingClientRect().top<Se.getBoundingClientRect().top&&xe.scrollIntoView({block:"start"})}},[W,s,fe]),[ht,Ze]=O.useState(null),[Je,J]=O.useState(null),ie=O.useCallback(B=>{a(B),yE(s,B)},[s]),ye=O.useMemo(()=>({run:m,comments:l,contents:F,composing:ht,editing:Je,compose:B=>{Ze(B),J(null)},edit:B=>{J(B),Ze(null)},add:(B,Q)=>{var ne;ie([...l,ph(B,Q,!!((ne=cn(m,B.path))!=null&&ne.unchanged))]),Ze(null)},update:(B,Q)=>{ie(l.map(ne=>ne.id===B?{...ne,body:Q}:ne)),J(null)},remove:B=>ie(l.filter(Q=>Q.id!==B))}),[m,l,F,ht,Je,ie]),ge=O.useMemo(()=>{const B=new Map,Q=[];for(const ne of l){const xe=cn(m,ne.path);if(!xe){Q.push(ne);continue}let Se=B.get(ne.path);Se||B.set(ne.path,Se={byLine:new Map,orphans:[]});const Ce=Ro(xe,ne,F.get(ne.path));if(Ce.line===void 0)Se.orphans.push(ne);else{const $e=qr(ne.side,Ce.endLine??Ce.line);Se.byLine.set($e,[...Se.byLine.get($e)??[],ne])}}return{byFile:B,gone:Q}},[l,m,F]);O.useEffect(()=>{for(const B of l){const Q=cn(m,B.path);Q&&!fh(Q,B)&&!F.has(B.path)&&de(B.path).catch(()=>{})}te(B=>{let Q=B;for(const ne of l){const xe=cn(m,ne.path),Se=F.get(ne.path);if(!xe||!Se||fh(xe,ne))continue;const Ce=Ro(xe,ne,Se);if(Ce.line===void 0)continue;const $e=Ce.endLine??Ce.line,[mt,st]=ne.side==="new"?[Ce.line,$e]:[mc(xe,Ce.line)??Ce.line,mc(xe,$e)??$e],ct=lE(xe,Se.length,Q[ne.path]??{},mt,st);ct!==(Q[ne.path]??{})&&JSON.stringify(ct)!==JSON.stringify(Q[ne.path]??{})&&(Q={...Q,[ne.path]:ct})}return Q})},[l,F,m,de]);const Y=O.useMemo(()=>({byLine:new Map,orphans:[]}),[]),se=O.useMemo(()=>{const B=new Map;for(const Q of l)B.set(Q.path,(B.get(Q.path)??0)+1);return B},[l]);O.useEffect(()=>{const B=l.filter(Q=>hE(m,Q,F.get(Q.path))!=="resolved").length;n({open:B,prompt:()=>Mv(m,l,{header:!1,contents:F}).text,review:()=>$T(e)})},[l,m,F,e,n]);const ve=O.useRef(l);ve.current=l;const be=O.useRef(0),[Ee,Ie]=O.useState(null);O.useEffect(()=>{if(!i||i.seq===be.current)return;be.current=i.seq;const B=i.items.filter(Q=>Q.module==="file");(async()=>{const Q=[];for(const ne of B){if(!ne.path)continue;let xe=TT(e,ne.path),Se=!1;if(!xe){const $e=await sh(ne.path).catch(()=>null);if(!$e)continue;xe=Wa(ne.path,$e),Se=!0}let Ce=mm(xe,ne);if(!(Ce!=null&&Ce.exact)&&Iv(xe)){const $e=await de(xe.path).catch(()=>{});$e&&(Ce=mm(xe,ne,$e)??Ce)}Ce&&Q.push({...ph(Ce.target,ne.body,Se),ai:i.agent})}Q.length&&ie([...ve.current,...Q]),Ie({seq:i.seq,placed:Q.length,dropped:B.length-Q.length})})()},[i,e,de,ie]),O.useEffect(()=>{Ee&&o(Ee)},[Ee,o]);const[ut,Ye]=O.useState(((R=E[0])==null?void 0:R.path)??null);O.useEffect(()=>{if(!fe)return;let B=0;const Q=()=>{cancelAnimationFrame(B),B=requestAnimationFrame(()=>{var Se;const ne=fe.getBoundingClientRect().top+8;let xe=((Se=E[0])==null?void 0:Se.path)??null;for(const Ce of E){const $e=ee.current.get(Ce.path);if($e)if($e.getBoundingClientRect().top<=ne)xe=Ce.path;else break}Ye(xe)})};return fe.addEventListener("scroll",Q,{passive:!0}),()=>{fe.removeEventListener("scroll",Q),cancelAnimationFrame(B)}},[fe,E]);const We=O.useRef(null),Oe=B=>{var mt;j(B)||H(st=>({...st,[B]:!0})),Ye(B),(mt=We.current)==null||mt.stop();const Q=fe;if(!Q)return;let ne=0,xe=0;const Se=performance.now(),Ce=()=>{cancelAnimationFrame(ne),Q.removeEventListener("wheel",Ce),Q.removeEventListener("touchmove",Ce),Q.removeEventListener("keydown",Ce),We.current=null},$e=()=>{const st=ee.current.get(B);if(st){const ct=st.getBoundingClientRect().top-Q.getBoundingClientRect().top-(parseFloat(getComputedStyle(Q).paddingTop)||0),jt=Q.scrollTop+Q.clientHeight>=Q.scrollHeight-1;Math.abs(ct)>1&&!(jt&&ct>0)?(Q.scrollTop+=ct,xe=0):xe++}if(xe>10||performance.now()-Se>1500)return Ce();ne=requestAnimationFrame($e)};Q.addEventListener("wheel",Ce,{passive:!0}),Q.addEventListener("touchmove",Ce,{passive:!0}),Q.addEventListener("keydown",Ce),We.current={stop:Ce},ne=requestAnimationFrame($e)};O.useEffect(()=>()=>{var B;return(B=We.current)==null?void 0:B.stop()},[]);const et=B=>{m.files.some(Q=>Q.path===B)||d(Q=>Q.includes(B)?Q:[...Q,B]),Oe(B)},bt=O.useRef(0);O.useEffect(()=>{if(!r||!t||!fe||r.seq===bt.current)return;bt.current=r.seq;const B=E.find(Q=>Q.path===r.target)??E.find(Q=>Q.oldPath===r.target);et(B?B.path:r.target)});const[Dn,ot]=O.useState(()=>nn(au,uu)),Ri=O.useRef(null),Ko=fE(e.files),pr=pE(e.files);return f.jsx(Fv.Provider,{value:ye,children:f.jsxs("div",{className:"fs-app",ref:Ri,style:{gridTemplateColumns:`${Dn}px ${Rr}px minmax(0, 1fr)`},"data-active":t||void 0,children:[f.jsxs(Md,{children:[f.jsxs(Pd,{children:[f.jsx(Si,{children:"ファイル"}),f.jsx(Od,{stats:Ko,unit:"ファイル",showZero:!0}),f.jsx(Fd,{}),f.jsx(Si,{children:"行"}),f.jsx(Li,{stats:pr,title:`追加 ${pr.added} 行・削除 ${pr.removed} 行`,showZero:!0})]}),f.jsx(Dd,{}),f.jsx(zd,{done:S.size,total:W.size,title:"確認済みにしたファイル(そのファイルがまた変わると外れます)"}),f.jsx("div",{className:"ds-seg",role:"radiogroup","aria-label":"表示",children:[["unified","Unified"],["split","Split"]].map(([B,Q])=>f.jsx("button",{role:"radio","aria-checked":z===B,className:z===B?"on":"",onClick:()=>U(B),children:Q},B))})]}),f.jsx(bT,{mode:$,onMode:T,tree:P,error:$==="all"&&(w==null?void 0:w.diff)===e?w.error??null:null,current:ut,reviewed:S,commentCounts:se,onSelect:et,onReviewed:Te}),f.jsx(Io,{title:"ドラッグで幅を変更(ダブルクリックで戻す)",start:()=>Dn,onDrag:(B,Q)=>{var ne;return ot(Math.max(160,Math.min(B+Q,(((ne=Ri.current)==null?void 0:ne.clientWidth)??1200)-320)))},onEnd:()=>$t(au,Dn),onReset:()=>{ot(uu),$t(au,uu)}}),f.jsxs("main",{className:"fs-main",ref:pe,children:[ge.gone.length>0&&f.jsxs("div",{className:"fs-orphans top",children:[f.jsx("div",{className:"ds-muted",children:"差分からなくなったファイルへのコメント"}),ge.gone.map(B=>f.jsx(qd,{c:B,showWhere:!0},B.id))]}),E.length===0&&f.jsx("div",{className:"fs-empty",children:"変更されたファイルはありません"}),E.map(B=>{var ne;const Q=ge.byFile.get(B.path)??Y;return f.jsx(vT,{file:B,mode:z,open:j(B.path),reviewed:S.has(B.path),content:F.get(B.path),expansion:Z[B.path]??LT,view:je[B.path]??((ne=Zx(B))==null?void 0:ne.first)??"diff",version:le,byLine:Q.byLine,orphans:Q.orphans,commentCount:se.get(B.path)??0,scrollRoot:fe,onToggle:L,onReviewed:Te,onExpand:we,onView:G,register:he,onClose:B.unchanged&&!g.has(B.path)?k:void 0},B.path)})]})]})})}const AT=e=>Array.isArray(e)?e.filter(t=>typeof t=="string"):[],RT={id:"file",title:"ファイル",description:"ファイルの差分(fileshape): 変更された各ファイルの行の差分",icon:_d,View:IT,badge:e=>e.files.length||void 0},OT=[RT,eE,c1];async function gm(e){const t=await fetch(e);if(!t.ok)throw new Error(await t.text());return await t.json()}function cu(){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 MT=(e,t)=>`${e}/${t.split("/").map(encodeURIComponent).join("/")}`;function PT(){const[e,t]=O.useState(null),[n,r]=O.useState(null),[i,o]=O.useState({}),[s,l]=O.useState(!1),[a,u]=O.useState(()=>cu().module),[c,d]=O.useState(()=>{const H=cu();return H.target?{[H.module]:{target:H.target,seq:1}}:{}}),[p,h]=O.useState({}),[y,x]=O.useState(null),b=O.useMemo(()=>e?OT.filter(H=>e.modules.includes(H.id)):[],[e]),v=O.useCallback(async H=>{try{const j=await gm(`/api/info${H?"?refresh=1":""}`);t(j),r(null),o(M=>Object.fromEntries(j.modules.map(L=>{var F;return[L,((F=M[L])==null?void 0:F.state)==="ready"?M[L]:{state:"loading"}]}))),await Promise.all(j.modules.map(async M=>{let L;try{const F=await gm(`/api/module/${M}`);L="error"in F?{state:"error",error:F.error}:{state:"ready",data:F.data}}catch(F){L={state:"error",error:F instanceof Error?F.message:String(F)}}o(F=>({...F,[M]:L}))}))}catch(j){r(j instanceof Error?j.message:String(j))}},[]);O.useEffect(()=>{v(!1)},[v]);const m=O.useCallback(()=>{const H=cu();if(u(H.module),H.target){const j=H.target;d(M=>{var L;return{...M,[H.module]:{target:j,seq:(((L=M[H.module])==null?void 0:L.seq)??0)+1}}})}},[]);O.useEffect(()=>(window.addEventListener("hashchange",m),()=>window.removeEventListener("hashchange",m)),[m]);const g=b.find(H=>H.id===a)??b[0],k=H=>{window.location.hash=H,u(H)},_=O.useCallback((H,j)=>{const M=MT(H,j);window.location.hash.replace(/^#\/?/,"")===M?m():window.location.hash=M},[m]),E=O.useMemo(()=>b.map(H=>H.id),[b]),$=O.useRef(new Map),C=H=>{let j=$.current.get(H);return j||$.current.set(H,j=M=>h(L=>({...L,[H]:M}))),j},T=O.useCallback(async()=>{l(!0),await v(!0),l(!1)},[v]),w=O.useCallback(H=>{x(H),window.setTimeout(()=>x(j=>j===H?null:j),4e3)},[]),[A,I]=O.useState(null),[P,z]=O.useState({}),K=O.useRef(new Map),U=H=>{let j=K.current.get(H);return j||K.current.set(H,j=M=>z(L=>({...L,[H]:M}))),j},[q,D]=O.useState(!1),W=b.filter(H=>{var j;return(((j=p[H.id])==null?void 0:j.open)??0)>0}),S=W.reduce((H,j)=>H+p[j.id].open,0),X=async()=>{!e||S===0||(await $i(Oy(e,W.map(H=>({id:H.id,description:H.description,comments:p[H.id].prompt()})))),w(`${S} 件をコピーしました`))};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 ${b.length>1?"with-rail":""}`,children:[b.length>1&&f.jsx("nav",{className:"rail","aria-label":"モジュール",children:b.map(H=>{var j;return f.jsx(FT,{module:H,loaded:i[H.id],active:H===g,comments:((j=p[H.id])==null?void 0:j.open)??0,onClick:()=>k(H.id)},H.id)})}),f.jsxs("header",{className:"shell-head",children:[f.jsx("span",{className:"shell-brand",children:"diffshape"}),b.length===1&&f.jsx("span",{className:"shell-module",children:g.title}),f.jsxs("span",{className:"shell-compare",title:`${e.repoRoot}
164
+ ${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"}),y&&f.jsx("span",{className:"shell-note",children:y}),f.jsxs("button",{className:"ds-btn ds-btn-note",onClick:()=>void X(),disabled:S===0,title:S?`未対応のコメント(${W.map(H=>`${H.title} ${p[H.id].open}`).join("、")})を AI 用のプロンプトとしてコピー`:"未対応のコメントはありません",children:[f.jsx(Iy,{size:13}),"AI 用にコピー",S>0?`(${S})`:""]}),f.jsx(V0,{info:e,modules:b,current:g,reports:p,acks:P,onBatch:I,onReload:T,onFixing:D,flash:w}),f.jsxs("button",{className:"ds-btn",onClick:()=>void T(),disabled:s||q,title:q?"AI が修正しています(終わると自動で読み直します)":"リポジトリを読み直して比較し直す",children:[f.jsx(T0,{size:13,className:s?"shell-spin":void 0}),s?"解析中…":"再読み込み"]})]}),f.jsx("main",{className:"shell-body",children:b.map(H=>{const j=i[H.id]??{state:"loading"},M=H===g;return f.jsxs("section",{className:"shell-module-root","data-module":H.id,hidden:!M,children:[j.state==="loading"&&f.jsx("div",{className:"shell-message shell-muted",children:"解析中…"}),j.state==="error"&&f.jsxs("div",{className:"shell-message",children:[f.jsx("p",{children:H.description}),f.jsx("p",{className:"shell-error",children:j.error})]}),j.state==="ready"&&f.jsx(H.View,{data:j.data,active:M,onComments:C(H.id),modules:E,openIn:_,request:c[H.id]??null,ai:A,onAi:U(H.id)},`${e.targetLabel}|${e.baseLabel}`)]},H.id)})})]})}function FT({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?`
165
+ 変更 ${o}`:""}${r?`
166
+ 未対応のコメント ${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"})]})}Ty(document.getElementById("root")).render(f.jsx(O.StrictMode,{children:f.jsx(PT,{})}));