difit 3.1.18 → 4.0.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.
- package/README.ja.md +30 -3
- package/README.ko.md +30 -3
- package/README.md +30 -3
- package/README.zh.md +30 -3
- package/dist/cli/github.d.ts +65 -0
- package/dist/cli/github.js +296 -0
- package/dist/cli/github.test.d.ts +1 -0
- package/dist/cli/github.test.js +341 -0
- package/dist/cli/index.js +26 -1
- package/dist/cli/index.test.js +206 -4
- package/dist/cli/utils.d.ts +2 -8
- package/dist/cli/utils.js +4 -43
- package/dist/cli/utils.test.js +50 -67
- package/dist/client/assets/{_basePickBy-DyiQWUmK.js → _basePickBy-B9N-f0iT.js} +1 -1
- package/dist/client/assets/{_baseUniq-DivSZEOF.js → _baseUniq-tbL7nVvN.js} +1 -1
- package/dist/client/assets/{arc-c0kacVOL.js → arc-BOY-7mep.js} +1 -1
- package/dist/client/assets/{architectureDiagram-2XIMDMQ5-ubymLNEe.js → architectureDiagram-2XIMDMQ5-59AvHaSB.js} +1 -1
- package/dist/client/assets/{blockDiagram-WCTKOSBZ-F9D8w4_S.js → blockDiagram-WCTKOSBZ-DXIlumQk.js} +1 -1
- package/dist/client/assets/{c4Diagram-IC4MRINW-JE9Kx4yQ.js → c4Diagram-IC4MRINW-BbfZ0uRn.js} +1 -1
- package/dist/client/assets/channel-cZXsTJxA.js +1 -0
- package/dist/client/assets/{chunk-4BX2VUAB-CYOCoDMc.js → chunk-4BX2VUAB-l7rcB2IW.js} +1 -1
- package/dist/client/assets/{chunk-55IACEB6-PRBuiJg9.js → chunk-55IACEB6-CrZL3qv9.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-C0eJ7JsI.js → chunk-FMBD7UC4-CrKv7ndg.js} +1 -1
- package/dist/client/assets/{chunk-JSJVCQXG-QZotPSqo.js → chunk-JSJVCQXG-DyBDhAEM.js} +1 -1
- package/dist/client/assets/{chunk-KX2RTZJC-B8du3tt8.js → chunk-KX2RTZJC-By5mkZmU.js} +1 -1
- package/dist/client/assets/{chunk-NQ4KR5QH-B10ldi5m.js → chunk-NQ4KR5QH-C30p9xRx.js} +1 -1
- package/dist/client/assets/{chunk-QZHKN3VN-CpwW9rUQ.js → chunk-QZHKN3VN-DVlhR2wU.js} +1 -1
- package/dist/client/assets/{chunk-WL4C6EOR-DwKPHpbL.js → chunk-WL4C6EOR-Cn7a6CO3.js} +1 -1
- package/dist/client/assets/classDiagram-VBA2DB6C-B_coIPEy.js +1 -0
- package/dist/client/assets/classDiagram-v2-RAHNMMFH-B_coIPEy.js +1 -0
- package/dist/client/assets/clone-BjaT2HOk.js +1 -0
- package/dist/client/assets/{cose-bilkent-S5V4N54A-p76yal75.js → cose-bilkent-S5V4N54A-LyauIk_9.js} +1 -1
- package/dist/client/assets/{dagre-KLK3FWXG-CdDyed3V.js → dagre-KLK3FWXG-DRWb2KE3.js} +1 -1
- package/dist/client/assets/{diagram-E7M64L7V-BaC8dXuW.js → diagram-E7M64L7V-ChT6mNWK.js} +1 -1
- package/dist/client/assets/{diagram-IFDJBPK2-BGf8xwJI.js → diagram-IFDJBPK2-CqbTduoP.js} +1 -1
- package/dist/client/assets/{diagram-P4PSJMXO-D3j16gBZ.js → diagram-P4PSJMXO-Bzv5Z3ri.js} +1 -1
- package/dist/client/assets/{erDiagram-INFDFZHY-DFpDdocf.js → erDiagram-INFDFZHY-CvXfUZ4L.js} +1 -1
- package/dist/client/assets/{flowDiagram-PKNHOUZH-Cz4mb4IF.js → flowDiagram-PKNHOUZH-CxmpNUKq.js} +1 -1
- package/dist/client/assets/{ganttDiagram-A5KZAMGK-CNzY9ua5.js → ganttDiagram-A5KZAMGK-9LpZCsg6.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-K3NZZRJ6-DCSxL8EQ.js → gitGraphDiagram-K3NZZRJ6-C6yZOrQJ.js} +1 -1
- package/dist/client/assets/{graph-BC2BV1-T.js → graph-bUZ7uHLW.js} +1 -1
- package/dist/client/assets/index-BLNN1bfE.js +98 -0
- package/dist/client/assets/index-VxkpzDXr.css +1 -0
- package/dist/client/assets/{infoDiagram-LFFYTUFH-BKSspZbH.js → infoDiagram-LFFYTUFH-Djdy3W21.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-PHBUUO56-DZ2IRYwc.js → ishikawaDiagram-PHBUUO56-oOdwCpeS.js} +1 -1
- package/dist/client/assets/{journeyDiagram-4ABVD52K-BrjXAkii.js → journeyDiagram-4ABVD52K-DTb_nGAw.js} +1 -1
- package/dist/client/assets/{kanban-definition-K7BYSVSG-B1mfOekw.js → kanban-definition-K7BYSVSG-CMtP7pHA.js} +1 -1
- package/dist/client/assets/{layout-CWTG02uT.js → layout-CXr5MatK.js} +1 -1
- package/dist/client/assets/{linear-CGgOKp1d.js → linear-pOMS9pjV.js} +1 -1
- package/dist/client/assets/{mermaid.core-DTPtVBG7.js → mermaid.core-DV5JJ1Ie.js} +4 -4
- package/dist/client/assets/{mindmap-definition-YRQLILUH-DByVRPFT.js → mindmap-definition-YRQLILUH-DN-sbonc.js} +1 -1
- package/dist/client/assets/{pieDiagram-SKSYHLDU-DEgvAxAy.js → pieDiagram-SKSYHLDU-tAHCkgh1.js} +1 -1
- package/dist/client/assets/{prism-csharp-DqTrHqwJ.js → prism-csharp-5CQ0RcEE.js} +1 -1
- package/dist/client/assets/{prism-elixir-DEJaM00V.js → prism-elixir-BSOTyVg2.js} +1 -1
- package/dist/client/assets/{prism-hcl-HvJ0aPiH.js → prism-hcl-BYvi1mtM.js} +1 -1
- package/dist/client/assets/{prism-java-DDUFERTh.js → prism-java-DMU2FM4X.js} +1 -1
- package/dist/client/assets/{prism-perl-CNA3SNC9.js → prism-perl-CpfvaEQk.js} +1 -1
- package/dist/client/assets/{prism-php-hBQuhE2A.js → prism-php-SC920LoD.js} +1 -1
- package/dist/client/assets/{prism-ruby-BKap8imy.js → prism-ruby-DZph-YiO.js} +1 -1
- package/dist/client/assets/{prism-solidity-DHc7LZHq.js → prism-solidity-qTLbmiAT.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-337W2JSQ-DTtikTvc.js → quadrantDiagram-337W2JSQ-B0wODmgR.js} +1 -1
- package/dist/client/assets/{requirementDiagram-Z7DCOOCP-B34R-xD0.js → requirementDiagram-Z7DCOOCP-A3aeHC06.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-WA2Y5GQK-Dts1ZXRC.js → sankeyDiagram-WA2Y5GQK-BWa6kZhG.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-2WXFIKYE-DzM3WhEY.js → sequenceDiagram-2WXFIKYE-Cx_COX9G.js} +1 -1
- package/dist/client/assets/{stateDiagram-RAJIS63D-B2dF8YnK.js → stateDiagram-RAJIS63D-BXGnN6rZ.js} +1 -1
- package/dist/client/assets/stateDiagram-v2-FVOUBMTO-CMw3xNha.js +1 -0
- package/dist/client/assets/{timeline-definition-YZTLITO2-BO4OtcEm.js → timeline-definition-YZTLITO2-DbqaUm9k.js} +1 -1
- package/dist/client/assets/{treemap-KZPCXAKY-DaXnvVRH.js → treemap-KZPCXAKY-CfEujPCR.js} +1 -1
- package/dist/client/assets/{vennDiagram-LZ73GAT5-AIMhd8Js.js → vennDiagram-LZ73GAT5-CqJE8CAD.js} +1 -1
- package/dist/client/assets/{xychartDiagram-JWTSCODW-Ch6W1f7P.js → xychartDiagram-JWTSCODW-CfdDvzHC.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/generated-file-check.js +113 -58
- package/dist/server/generated-file-check.test.js +2 -0
- package/dist/server/git-diff.d.ts +1 -0
- package/dist/server/git-diff.js +33 -6
- package/dist/server/git-diff.test.js +26 -0
- package/dist/server/server.d.ts +2 -0
- package/dist/server/server.js +107 -34
- package/dist/server/server.test.js +120 -0
- package/dist/types/diff.d.ts +73 -14
- package/dist/utils/commentFormatting.d.ts +4 -2
- package/dist/utils/commentFormatting.js +57 -19
- package/dist/utils/commentImports.d.ts +9 -0
- package/dist/utils/commentImports.js +264 -0
- package/dist/utils/commentImports.test.d.ts +1 -0
- package/dist/utils/commentImports.test.js +197 -0
- package/package.json +1 -1
- package/dist/client/assets/channel-Ca4c0q8d.js +0 -1
- package/dist/client/assets/classDiagram-VBA2DB6C-CJLw9sK7.js +0 -1
- package/dist/client/assets/classDiagram-v2-RAHNMMFH-CJLw9sK7.js +0 -1
- package/dist/client/assets/clone-D0mDLEir.js +0 -1
- package/dist/client/assets/index-DHt9OwVU.css +0 -1
- package/dist/client/assets/index-mE8CA51x.js +0 -95
- package/dist/client/assets/stateDiagram-v2-FVOUBMTO-ReD0hBzH.js +0 -1
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
function JS(e,r){for(var i=0;i<r.length;i++){const l=r[i];if(typeof l!="string"&&!Array.isArray(l)){for(const o in l)if(o!=="default"&&!(o in e)){const u=Object.getOwnPropertyDescriptor(l,o);u&&Object.defineProperty(e,o,u.get?u:{enumerable:!0,get:()=>l[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))l(o);new MutationObserver(o=>{for(const u of o)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&l(c)}).observe(document,{childList:!0,subtree:!0});function i(o){const u={};return o.integrity&&(u.integrity=o.integrity),o.referrerPolicy&&(u.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?u.credentials="include":o.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function l(o){if(o.ep)return;o.ep=!0;const u=i(o);fetch(o.href,u)}})();const a1="data-theme",WS={"--color-github-bg-primary":"#0d1117","--color-github-bg-secondary":"#161b22","--color-github-bg-tertiary":"#21262d","--color-github-border":"#30363d","--color-github-text-primary":"#f0f6fc","--color-github-text-secondary":"#8b949e","--color-github-text-muted":"#6e7681","--color-github-accent":"#238636","--color-github-danger":"#da3633","--color-github-warning":"#d29922","--color-diff-addition-bg":"#0d4429","--color-diff-addition-border":"#1b7c3d","--color-diff-deletion-bg":"#67060c","--color-diff-deletion-border":"#da3633","--color-diff-neutral-bg":"#21262d","--color-comment-bg":"#1c2128","--color-comment-border":"#373e47","--color-comment-text":"#e6edf3","--color-yellow-btn-bg":"rgba(180, 83, 9, 0.2)","--color-yellow-btn-border":"rgba(217, 119, 6, 0.5)","--color-yellow-btn-text":"#fbbf24","--color-yellow-btn-hover-bg":"rgba(180, 83, 9, 0.3)","--color-yellow-btn-hover-border":"#d97706","--color-yellow-path-bg":"rgba(180, 83, 9, 0.3)","--color-yellow-path-text":"#fbbf24","--color-editor-btn-bg":"rgba(248, 250, 252, 0.1)","--color-editor-btn-border":"rgba(248, 250, 252, 0.3)","--color-editor-btn-text":"#f0f6fc","--color-editor-btn-hover-bg":"rgba(248, 250, 252, 0.2)","--color-editor-btn-hover-border":"rgba(248, 250, 252, 0.45)"},e2={"--color-github-bg-primary":"#ffffff","--color-github-bg-secondary":"#f6f8fa","--color-github-bg-tertiary":"#f1f3f4","--color-github-border":"#d1d9e0","--color-github-text-primary":"#24292f","--color-github-text-secondary":"#656d76","--color-github-text-muted":"#8c959f","--color-github-accent":"#1f883d","--color-github-danger":"#cf222e","--color-github-warning":"#bf8700","--color-diff-addition-bg":"#d1f4cd","--color-diff-addition-border":"#1f883d","--color-diff-deletion-bg":"#ffd8d3","--color-diff-deletion-border":"#cf222e","--color-diff-neutral-bg":"#f1f3f4","--color-comment-bg":"#fff8e1","--color-comment-border":"#ffd54f","--color-comment-text":"#5d4037","--color-yellow-btn-bg":"#fef3c7","--color-yellow-btn-border":"#f59e0b","--color-yellow-btn-text":"#92400e","--color-yellow-btn-hover-bg":"#fde68a","--color-yellow-btn-hover-border":"#d97706","--color-yellow-path-bg":"#fde68a","--color-yellow-path-text":"#92400e","--color-editor-btn-bg":"rgba(248, 250, 252, 0.1)","--color-editor-btn-border":"rgba(31, 41, 55, 0.35)","--color-editor-btn-text":"#1f2937","--color-editor-btn-hover-bg":"rgba(248, 250, 252, 0.2)","--color-editor-btn-hover-border":"rgba(31, 41, 55, 0.5)"},t2={dark:WS,light:e2},Ud="reviewit-appearance-settings",n2=e=>e==="light"||e==="dark"||e==="auto",r2=e=>e==="normal"||e==="deuteranopia",i2=e=>e==="light"||e==="dark",bh=()=>{if(!(typeof window>"u"))try{return window.localStorage}catch{return}},yh=()=>{if(!(typeof window>"u"))return window};function o1(e=bh()){if(!e)return null;try{const r=e.getItem(Ud);if(!r)return null;const i=JSON.parse(r);if(i&&typeof i=="object"){const l={},o=i;return n2(o.theme)&&(l.theme=o.theme),r2(o.colorVision)&&(l.colorVision=o.colorVision),l}}catch{return null}return null}function xh(e=yh()){return e?.matchMedia("(prefers-color-scheme: dark)").matches??!0?"dark":"light"}function Is(e,r=xh()){return e==="light"||e==="dark"?e:r}function $b(e=typeof document>"u"?void 0:document,r=bh(),i=yh()){const l=e?.documentElement.getAttribute(a1)??null;return i2(l)?l:Is(o1(r)?.theme,xh(i))}const l2={"--color-github-accent":"#58a6ff","--color-github-danger":"#d29922","--color-diff-addition-bg":"#0c2d6b","--color-diff-addition-border":"#388bfd","--color-diff-deletion-bg":"#5a3600","--color-diff-deletion-border":"#d29922"},a2={"--color-github-accent":"#0969da","--color-github-danger":"#bf8700","--color-diff-addition-bg":"#ddf4ff","--color-diff-addition-border":"#0969da","--color-diff-deletion-bg":"#fff8c5","--color-diff-deletion-border":"#bf8700"},o2={dark:l2,light:a2};function s1(e,r="normal",i=document){const l=i.documentElement;l.setAttribute(a1,e),l.setAttribute("data-color-vision",r);const o=t2[e];if(Object.entries(o).forEach(([u,c])=>{l.style.setProperty(u,c)}),r==="deuteranopia"){const u=o2[e];Object.entries(u).forEach(([c,f])=>{l.style.setProperty(c,f)})}i.body&&(i.body.style.backgroundColor="var(--color-github-bg-primary)",i.body.style.color="var(--color-github-text-primary)")}function s2(e=typeof document>"u"?void 0:document,r=bh(),i=yh()){if(!e)return null;const l=o1(r),o=Is(l?.theme,xh(i)),u=l?.colorVision??"normal";return s1(o,u,e),o}s2();function yu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function WR(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var r=e.default;if(typeof r=="function"){var i=function l(){var o=!1;try{o=this instanceof l}catch{}return o?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};i.prototype=r.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach(function(l){var o=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(i,l,o.get?o:{enumerable:!0,get:function(){return e[l]}})}),i}var Xf={exports:{}},Da={};var Vb;function u2(){if(Vb)return Da;Vb=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function i(l,o,u){var c=null;if(u!==void 0&&(c=""+u),o.key!==void 0&&(c=""+o.key),"key"in o){u={};for(var f in o)f!=="key"&&(u[f]=o[f])}else u=o;return o=u.ref,{$$typeof:e,type:l,key:c,ref:o!==void 0?o:null,props:u}}return Da.Fragment=r,Da.jsx=i,Da.jsxs=i,Da}var Gb;function c2(){return Gb||(Gb=1,Xf.exports=u2()),Xf.exports}var y=c2(),Zf={exports:{}},_e={};var Yb;function f2(){if(Yb)return _e;Yb=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),w=Symbol.iterator;function x(D){return D===null||typeof D!="object"?null:(D=w&&D[w]||D["@@iterator"],typeof D=="function"?D:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function N(D,P,T){this.props=D,this.context=P,this.refs=C,this.updater=T||v}N.prototype.isReactComponent={},N.prototype.setState=function(D,P){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,P,"setState")},N.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function E(){}E.prototype=N.prototype;function R(D,P,T){this.props=D,this.context=P,this.refs=C,this.updater=T||v}var O=R.prototype=new E;O.constructor=R,S(O,N.prototype),O.isPureReactComponent=!0;var H=Array.isArray;function _(){}var F={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function B(D,P,T){var W=T.ref;return{$$typeof:e,type:D,key:P,ref:W!==void 0?W:null,props:T}}function M(D,P){return B(D.type,P,D.props)}function $(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function V(D){var P={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(T){return P[T]})}var J=/\/+/g;function I(D,P){return typeof D=="object"&&D!==null&&D.key!=null?V(""+D.key):P.toString(36)}function Z(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(_,_):(D.status="pending",D.then(function(P){D.status==="pending"&&(D.status="fulfilled",D.value=P)},function(P){D.status==="pending"&&(D.status="rejected",D.reason=P)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function U(D,P,T,W,te){var ce=typeof D;(ce==="undefined"||ce==="boolean")&&(D=null);var me=!1;if(D===null)me=!0;else switch(ce){case"bigint":case"string":case"number":me=!0;break;case"object":switch(D.$$typeof){case e:case r:me=!0;break;case b:return me=D._init,U(me(D._payload),P,T,W,te)}}if(me)return te=te(D),me=W===""?"."+I(D,0):W,H(te)?(T="",me!=null&&(T=me.replace(J,"$&/")+"/"),U(te,P,T,"",function(ve){return ve})):te!=null&&($(te)&&(te=M(te,T+(te.key==null||D&&D.key===te.key?"":(""+te.key).replace(J,"$&/")+"/")+me)),P.push(te)),1;me=0;var xe=W===""?".":W+":";if(H(D))for(var ge=0;ge<D.length;ge++)W=D[ge],ce=xe+I(W,ge),me+=U(W,P,T,ce,te);else if(ge=x(D),typeof ge=="function")for(D=ge.call(D),ge=0;!(W=D.next()).done;)W=W.value,ce=xe+I(W,ge++),me+=U(W,P,T,ce,te);else if(ce==="object"){if(typeof D.then=="function")return U(Z(D),P,T,W,te);throw P=String(D),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead.")}return me}function Y(D,P,T){if(D==null)return D;var W=[],te=0;return U(D,W,"","",function(ce){return P.call(T,ce,te++)}),W}function X(D){if(D._status===-1){var P=D._result;P=P(),P.then(function(T){(D._status===0||D._status===-1)&&(D._status=1,D._result=T)},function(T){(D._status===0||D._status===-1)&&(D._status=2,D._result=T)}),D._status===-1&&(D._status=0,D._result=P)}if(D._status===1)return D._result.default;throw D._result}var q=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var P=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(P))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},j={map:Y,forEach:function(D,P,T){Y(D,function(){P.apply(this,arguments)},T)},count:function(D){var P=0;return Y(D,function(){P++}),P},toArray:function(D){return Y(D,function(P){return P})||[]},only:function(D){if(!$(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return _e.Activity=g,_e.Children=j,_e.Component=N,_e.Fragment=i,_e.Profiler=o,_e.PureComponent=R,_e.StrictMode=l,_e.Suspense=p,_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,_e.__COMPILER_RUNTIME={__proto__:null,c:function(D){return F.H.useMemoCache(D)}},_e.cache=function(D){return function(){return D.apply(null,arguments)}},_e.cacheSignal=function(){return null},_e.cloneElement=function(D,P,T){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var W=S({},D.props),te=D.key;if(P!=null)for(ce in P.key!==void 0&&(te=""+P.key),P)!z.call(P,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&P.ref===void 0||(W[ce]=P[ce]);var ce=arguments.length-2;if(ce===1)W.children=T;else if(1<ce){for(var me=Array(ce),xe=0;xe<ce;xe++)me[xe]=arguments[xe+2];W.children=me}return B(D.type,te,W)},_e.createContext=function(D){return D={$$typeof:c,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:u,_context:D},D},_e.createElement=function(D,P,T){var W,te={},ce=null;if(P!=null)for(W in P.key!==void 0&&(ce=""+P.key),P)z.call(P,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(te[W]=P[W]);var me=arguments.length-2;if(me===1)te.children=T;else if(1<me){for(var xe=Array(me),ge=0;ge<me;ge++)xe[ge]=arguments[ge+2];te.children=xe}if(D&&D.defaultProps)for(W in me=D.defaultProps,me)te[W]===void 0&&(te[W]=me[W]);return B(D,ce,te)},_e.createRef=function(){return{current:null}},_e.forwardRef=function(D){return{$$typeof:f,render:D}},_e.isValidElement=$,_e.lazy=function(D){return{$$typeof:b,_payload:{_status:-1,_result:D},_init:X}},_e.memo=function(D,P){return{$$typeof:h,type:D,compare:P===void 0?null:P}},_e.startTransition=function(D){var P=F.T,T={};F.T=T;try{var W=D(),te=F.S;te!==null&&te(T,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(_,q)}catch(ce){q(ce)}finally{P!==null&&T.types!==null&&(P.types=T.types),F.T=P}},_e.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},_e.use=function(D){return F.H.use(D)},_e.useActionState=function(D,P,T){return F.H.useActionState(D,P,T)},_e.useCallback=function(D,P){return F.H.useCallback(D,P)},_e.useContext=function(D){return F.H.useContext(D)},_e.useDebugValue=function(){},_e.useDeferredValue=function(D,P){return F.H.useDeferredValue(D,P)},_e.useEffect=function(D,P){return F.H.useEffect(D,P)},_e.useEffectEvent=function(D){return F.H.useEffectEvent(D)},_e.useId=function(){return F.H.useId()},_e.useImperativeHandle=function(D,P,T){return F.H.useImperativeHandle(D,P,T)},_e.useInsertionEffect=function(D,P){return F.H.useInsertionEffect(D,P)},_e.useLayoutEffect=function(D,P){return F.H.useLayoutEffect(D,P)},_e.useMemo=function(D,P){return F.H.useMemo(D,P)},_e.useOptimistic=function(D,P){return F.H.useOptimistic(D,P)},_e.useReducer=function(D,P,T){return F.H.useReducer(D,P,T)},_e.useRef=function(D){return F.H.useRef(D)},_e.useState=function(D){return F.H.useState(D)},_e.useSyncExternalStore=function(D,P,T){return F.H.useSyncExternalStore(D,P,T)},_e.useTransition=function(){return F.H.useTransition()},_e.version="19.2.4",_e}var Xb;function vh(){return Xb||(Xb=1,Zf.exports=f2()),Zf.exports}var A=vh();const Qt=yu(A),u1=JS({__proto__:null,default:Qt},[A]);var Kf={exports:{}},Oa={},Qf={exports:{}},Jf={};var Zb;function d2(){return Zb||(Zb=1,(function(e){function r(U,Y){var X=U.length;U.push(Y);e:for(;0<X;){var q=X-1>>>1,j=U[q];if(0<o(j,Y))U[q]=Y,U[X]=j,X=q;else break e}}function i(U){return U.length===0?null:U[0]}function l(U){if(U.length===0)return null;var Y=U[0],X=U.pop();if(X!==Y){U[0]=X;e:for(var q=0,j=U.length,D=j>>>1;q<D;){var P=2*(q+1)-1,T=U[P],W=P+1,te=U[W];if(0>o(T,X))W<j&&0>o(te,T)?(U[q]=te,U[W]=X,q=W):(U[q]=T,U[P]=X,q=P);else if(W<j&&0>o(te,X))U[q]=te,U[W]=X,q=W;else break e}}return Y}function o(U,Y){var X=U.sortIndex-Y.sortIndex;return X!==0?X:U.id-Y.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var p=[],h=[],b=1,g=null,w=3,x=!1,v=!1,S=!1,C=!1,N=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function O(U){for(var Y=i(h);Y!==null;){if(Y.callback===null)l(h);else if(Y.startTime<=U)l(h),Y.sortIndex=Y.expirationTime,r(p,Y);else break;Y=i(h)}}function H(U){if(S=!1,O(U),!v)if(i(p)!==null)v=!0,_||(_=!0,V());else{var Y=i(h);Y!==null&&Z(H,Y.startTime-U)}}var _=!1,F=-1,z=5,B=-1;function M(){return C?!0:!(e.unstable_now()-B<z)}function $(){if(C=!1,_){var U=e.unstable_now();B=U;var Y=!0;try{e:{v=!1,S&&(S=!1,E(F),F=-1),x=!0;var X=w;try{t:{for(O(U),g=i(p);g!==null&&!(g.expirationTime>U&&M());){var q=g.callback;if(typeof q=="function"){g.callback=null,w=g.priorityLevel;var j=q(g.expirationTime<=U);if(U=e.unstable_now(),typeof j=="function"){g.callback=j,O(U),Y=!0;break t}g===i(p)&&l(p),O(U)}else l(p);g=i(p)}if(g!==null)Y=!0;else{var D=i(h);D!==null&&Z(H,D.startTime-U),Y=!1}}break e}finally{g=null,w=X,x=!1}Y=void 0}}finally{Y?V():_=!1}}}var V;if(typeof R=="function")V=function(){R($)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,I=J.port2;J.port1.onmessage=$,V=function(){I.postMessage(null)}}else V=function(){N($,0)};function Z(U,Y){F=N(function(){U(e.unstable_now())},Y)}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(U){U.callback=null},e.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<U?Math.floor(1e3/U):5},e.unstable_getCurrentPriorityLevel=function(){return w},e.unstable_next=function(U){switch(w){case 1:case 2:case 3:var Y=3;break;default:Y=w}var X=w;w=Y;try{return U()}finally{w=X}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(U,Y){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var X=w;w=U;try{return Y()}finally{w=X}},e.unstable_scheduleCallback=function(U,Y,X){var q=e.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?q+X:q):X=q,U){case 1:var j=-1;break;case 2:j=250;break;case 5:j=1073741823;break;case 4:j=1e4;break;default:j=5e3}return j=X+j,U={id:b++,callback:Y,priorityLevel:U,startTime:X,expirationTime:j,sortIndex:-1},X>q?(U.sortIndex=X,r(h,U),i(p)===null&&U===i(h)&&(S?(E(F),F=-1):S=!0,Z(H,X-q))):(U.sortIndex=j,r(p,U),v||x||(v=!0,_||(_=!0,V()))),U},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(U){var Y=w;return function(){var X=w;w=Y;try{return U.apply(this,arguments)}finally{w=X}}}})(Jf)),Jf}var Kb;function h2(){return Kb||(Kb=1,Qf.exports=d2()),Qf.exports}var Wf={exports:{}},qt={};var Qb;function p2(){if(Qb)return qt;Qb=1;var e=vh();function r(p){var h="https://react.dev/errors/"+p;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)h+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+p+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var l={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");function u(p,h,b){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:p,containerInfo:h,implementation:b}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(p,h){if(p==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return qt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,qt.createPortal=function(p,h){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(r(299));return u(p,h,null,b)},qt.flushSync=function(p){var h=c.T,b=l.p;try{if(c.T=null,l.p=2,p)return p()}finally{c.T=h,l.p=b,l.d.f()}},qt.preconnect=function(p,h){typeof p=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,l.d.C(p,h))},qt.prefetchDNS=function(p){typeof p=="string"&&l.d.D(p)},qt.preinit=function(p,h){if(typeof p=="string"&&h&&typeof h.as=="string"){var b=h.as,g=f(b,h.crossOrigin),w=typeof h.integrity=="string"?h.integrity:void 0,x=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;b==="style"?l.d.S(p,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:g,integrity:w,fetchPriority:x}):b==="script"&&l.d.X(p,{crossOrigin:g,integrity:w,fetchPriority:x,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},qt.preinitModule=function(p,h){if(typeof p=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var b=f(h.as,h.crossOrigin);l.d.M(p,{crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&l.d.M(p)},qt.preload=function(p,h){if(typeof p=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var b=h.as,g=f(b,h.crossOrigin);l.d.L(p,b,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},qt.preloadModule=function(p,h){if(typeof p=="string")if(h){var b=f(h.as,h.crossOrigin);l.d.m(p,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else l.d.m(p)},qt.requestFormReset=function(p){l.d.r(p)},qt.unstable_batchedUpdates=function(p,h){return p(h)},qt.useFormState=function(p,h,b){return c.H.useFormState(p,h,b)},qt.useFormStatus=function(){return c.H.useHostTransitionStatus()},qt.version="19.2.4",qt}var Jb;function c1(){if(Jb)return Wf.exports;Jb=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),Wf.exports=p2(),Wf.exports}var Wb;function m2(){if(Wb)return Oa;Wb=1;var e=h2(),r=vh(),i=c1();function l(t){var n="https://react.dev/errors/"+t;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function u(t){var n=t,a=t;if(t.alternate)for(;n.return;)n=n.return;else{t=n;do n=t,(n.flags&4098)!==0&&(a=n.return),t=n.return;while(t)}return n.tag===3?a:null}function c(t){if(t.tag===13){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function f(t){if(t.tag===31){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function p(t){if(u(t)!==t)throw Error(l(188))}function h(t){var n=t.alternate;if(!n){if(n=u(t),n===null)throw Error(l(188));return n!==t?null:t}for(var a=t,s=n;;){var d=a.return;if(d===null)break;var m=d.alternate;if(m===null){if(s=d.return,s!==null){a=s;continue}break}if(d.child===m.child){for(m=d.child;m;){if(m===a)return p(d),t;if(m===s)return p(d),n;m=m.sibling}throw Error(l(188))}if(a.return!==s.return)a=d,s=m;else{for(var k=!1,L=d.child;L;){if(L===a){k=!0,a=d,s=m;break}if(L===s){k=!0,s=d,a=m;break}L=L.sibling}if(!k){for(L=m.child;L;){if(L===a){k=!0,a=m,s=d;break}if(L===s){k=!0,s=m,a=d;break}L=L.sibling}if(!k)throw Error(l(189))}}if(a.alternate!==s)throw Error(l(190))}if(a.tag!==3)throw Error(l(188));return a.stateNode.current===a?t:n}function b(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t;for(t=t.child;t!==null;){if(n=b(t),n!==null)return n;t=t.sibling}return null}var g=Object.assign,w=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),R=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),M=Symbol.for("react.memo_cache_sentinel"),$=Symbol.iterator;function V(t){return t===null||typeof t!="object"?null:(t=$&&t[$]||t["@@iterator"],typeof t=="function"?t:null)}var J=Symbol.for("react.client.reference");function I(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===J?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case S:return"Fragment";case N:return"Profiler";case C:return"StrictMode";case H:return"Suspense";case _:return"SuspenseList";case B:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case v:return"Portal";case R:return t.displayName||"Context";case E:return(t._context.displayName||"Context")+".Consumer";case O:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case F:return n=t.displayName||null,n!==null?n:I(t.type)||"Memo";case z:n=t._payload,t=t._init;try{return I(t(n))}catch{}}return null}var Z=Array.isArray,U=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X={pending:!1,data:null,method:null,action:null},q=[],j=-1;function D(t){return{current:t}}function P(t){0>j||(t.current=q[j],q[j]=null,j--)}function T(t,n){j++,q[j]=t.current,t.current=n}var W=D(null),te=D(null),ce=D(null),me=D(null);function xe(t,n){switch(T(ce,n),T(te,t),T(W,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?hb(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=hb(n),t=pb(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}P(W),T(W,t)}function ge(){P(W),P(te),P(ce)}function ve(t){t.memoizedState!==null&&T(me,t);var n=W.current,a=pb(n,t.type);n!==a&&(T(te,t),T(W,a))}function Ee(t){te.current===t&&(P(W),P(te)),me.current===t&&(P(me),ja._currentValue=X)}var de,ye;function we(t){if(de===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);de=n&&n[1]||"",ye=-1<a.stack.indexOf(`
|
|
2
|
-
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+de+t+ye}var Re=!1;function Ye(t,n){if(!t||Re)return"";Re=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(n){var fe=function(){throw Error()};if(Object.defineProperty(fe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fe,[])}catch(ie){var re=ie}Reflect.construct(t,[],fe)}else{try{fe.call()}catch(ie){re=ie}t.call(fe.prototype)}}else{try{throw Error()}catch(ie){re=ie}(fe=t())&&typeof fe.catch=="function"&&fe.catch(function(){})}}catch(ie){if(ie&&re&&typeof ie.stack=="string")return[ie.stack,re.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=s.DetermineComponentFrameRoot(),k=m[0],L=m[1];if(k&&L){var G=k.split(`
|
|
4
|
-
`),ne=L.split(`
|
|
5
|
-
`);for(d=s=0;s<G.length&&!G[s].includes("DetermineComponentFrameRoot");)s++;for(;d<ne.length&&!ne[d].includes("DetermineComponentFrameRoot");)d++;if(s===G.length||d===ne.length)for(s=G.length-1,d=ne.length-1;1<=s&&0<=d&&G[s]!==ne[d];)d--;for(;1<=s&&0<=d;s--,d--)if(G[s]!==ne[d]){if(s!==1||d!==1)do if(s--,d--,0>d||G[s]!==ne[d]){var ae=`
|
|
6
|
-
`+G[s].replace(" at new "," at ");return t.displayName&&ae.includes("<anonymous>")&&(ae=ae.replace("<anonymous>",t.displayName)),ae}while(1<=s&&0<=d);break}}}finally{Re=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?we(a):""}function Ie(t,n){switch(t.tag){case 26:case 27:case 5:return we(t.type);case 16:return we("Lazy");case 13:return t.child!==n&&n!==null?we("Suspense Fallback"):we("Suspense");case 19:return we("SuspenseList");case 0:case 15:return Ye(t.type,!1);case 11:return Ye(t.type.render,!1);case 1:return Ye(t.type,!0);case 31:return we("Activity");default:return""}}function It(t){try{var n="",a=null;do n+=Ie(t,a),a=t,t=t.return;while(t);return n}catch(s){return`
|
|
7
|
-
Error generating stack: `+s.message+`
|
|
8
|
-
`+s.stack}}var at=Object.prototype.hasOwnProperty,pt=e.unstable_scheduleCallback,Bt=e.unstable_cancelCallback,Jt=e.unstable_shouldYield,Ut=e.unstable_requestPaint,Fe=e.unstable_now,tr=e.unstable_getCurrentPriorityLevel,oe=e.unstable_ImmediatePriority,pe=e.unstable_UserBlockingPriority,Te=e.unstable_NormalPriority,ze=e.unstable_LowPriority,Xe=e.unstable_IdlePriority,_t=e.log,fn=e.unstable_setDisableYieldValue,Lt=null,bt=null;function Dt(t){if(typeof _t=="function"&&fn(t),bt&&typeof bt.setStrictMode=="function")try{bt.setStrictMode(Lt,t)}catch{}}var We=Math.clz32?Math.clz32:Fu,$n=Math.log,dn=Math.LN2;function Fu(t){return t>>>=0,t===0?32:31-($n(t)/dn|0)|0}var Tr=256,jr=262144,Bi=4194304;function In(t){var n=t&42;if(n!==0)return n;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Rr(t,n,a){var s=t.pendingLanes;if(s===0)return 0;var d=0,m=t.suspendedLanes,k=t.pingedLanes;t=t.warmLanes;var L=s&134217727;return L!==0?(s=L&~m,s!==0?d=In(s):(k&=L,k!==0?d=In(k):a||(a=L&~t,a!==0&&(d=In(a))))):(L=s&~m,L!==0?d=In(L):k!==0?d=In(k):a||(a=s&~t,a!==0&&(d=In(a)))),d===0?0:n!==0&&n!==d&&(n&m)===0&&(m=d&-d,a=n&-n,m>=a||m===32&&(a&4194048)!==0)?n:d}function nr(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function Ui(t,n){switch(t){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function so(){var t=Bi;return Bi<<=1,(Bi&62914560)===0&&(Bi=4194304),t}function Hi(t){for(var n=[],a=0;31>a;a++)n.push(t);return n}function rr(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Iu(t,n,a,s,d,m){var k=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var L=t.entanglements,G=t.expirationTimes,ne=t.hiddenUpdates;for(a=k&~a;0<a;){var ae=31-We(a),fe=1<<ae;L[ae]=0,G[ae]=-1;var re=ne[ae];if(re!==null)for(ne[ae]=null,ae=0;ae<re.length;ae++){var ie=re[ae];ie!==null&&(ie.lane&=-536870913)}a&=~fe}s!==0&&ql(t,s,0),m!==0&&d===0&&t.tag!==0&&(t.suspendedLanes|=m&~(k&~n))}function ql(t,n,a){t.pendingLanes|=n,t.suspendedLanes&=~n;var s=31-We(n);t.entangledLanes|=n,t.entanglements[s]=t.entanglements[s]|1073741824|a&261930}function Pl(t,n){var a=t.entangledLanes|=n;for(t=t.entanglements;a;){var s=31-We(a),d=1<<s;d&n|t[s]&n&&(t[s]|=n),a&=~d}}function Wt(t,n){var a=n&-n;return a=(a&42)!==0?1:$l(a),(a&(t.suspendedLanes|n))!==0?0:a}function $l(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function qi(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function ir(){var t=Y.p;return t!==0?t:(t=window.event,t===void 0?32:Fb(t.type))}function uo(t,n){var a=Y.p;try{return Y.p=t,n()}finally{Y.p=a}}var Vn=Math.random().toString(36).slice(2),Ct="__reactFiber$"+Vn,Ht="__reactProps$"+Vn,Cn="__reactContainer$"+Vn,Pi="__reactEvents$"+Vn,co="__reactListeners$"+Vn,Bu="__reactHandles$"+Vn,$i="__reactResources$"+Vn,hi="__reactMarker$"+Vn;function Vl(t){delete t[Ct],delete t[Ht],delete t[Pi],delete t[co],delete t[Bu]}function _r(t){var n=t[Ct];if(n)return n;for(var a=t.parentNode;a;){if(n=a[Cn]||a[Ct]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(t=wb(t);t!==null;){if(a=t[Ct])return a;t=wb(t)}return n}t=a,a=t.parentNode}return null}function Lr(t){if(t=t[Ct]||t[Cn]){var n=t.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return t}return null}function pi(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error(l(33))}function le(t){var n=t[$i];return n||(n=t[$i]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function be(t){t[hi]=!0}var je=new Set,Je={};function De(t,n){Nt(t,n),Nt(t+"Capture",n)}function Nt(t,n){for(Je[t]=n,t=0;t<n.length;t++)je.add(n[t])}var Vi=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),rp={},ip={};function $v(t){return at.call(ip,t)?!0:at.call(rp,t)?!1:Vi.test(t)?ip[t]=!0:(rp[t]=!0,!1)}function fo(t,n,a){if($v(n))if(a===null)t.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(n);return;case"boolean":var s=n.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){t.removeAttribute(n);return}}t.setAttribute(n,""+a)}}function ho(t,n,a){if(a===null)t.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttribute(n,""+a)}}function lr(t,n,a,s){if(s===null)t.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttributeNS(n,a,""+s)}}function Nn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function lp(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Vv(t,n,a){var s=Object.getOwnPropertyDescriptor(t.constructor.prototype,n);if(!t.hasOwnProperty(n)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var d=s.get,m=s.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return d.call(this)},set:function(k){a=""+k,m.call(this,k)}}),Object.defineProperty(t,n,{enumerable:s.enumerable}),{getValue:function(){return a},setValue:function(k){a=""+k},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function Uu(t){if(!t._valueTracker){var n=lp(t)?"checked":"value";t._valueTracker=Vv(t,n,""+t[n])}}function ap(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var a=n.getValue(),s="";return t&&(s=lp(t)?t.checked?"true":"false":t.value),t=s,t!==a?(n.setValue(t),!0):!1}function po(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Gv=/[\n"\\]/g;function An(t){return t.replace(Gv,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Hu(t,n,a,s,d,m,k,L){t.name="",k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?t.type=k:t.removeAttribute("type"),n!=null?k==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+Nn(n)):t.value!==""+Nn(n)&&(t.value=""+Nn(n)):k!=="submit"&&k!=="reset"||t.removeAttribute("value"),n!=null?qu(t,k,Nn(n)):a!=null?qu(t,k,Nn(a)):s!=null&&t.removeAttribute("value"),d==null&&m!=null&&(t.defaultChecked=!!m),d!=null&&(t.checked=d&&typeof d!="function"&&typeof d!="symbol"),L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"?t.name=""+Nn(L):t.removeAttribute("name")}function op(t,n,a,s,d,m,k,L){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(t.type=m),n!=null||a!=null){if(!(m!=="submit"&&m!=="reset"||n!=null)){Uu(t);return}a=a!=null?""+Nn(a):"",n=n!=null?""+Nn(n):a,L||n===t.value||(t.value=n),t.defaultValue=n}s=s??d,s=typeof s!="function"&&typeof s!="symbol"&&!!s,t.checked=L?t.checked:!!s,t.defaultChecked=!!s,k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(t.name=k),Uu(t)}function qu(t,n,a){n==="number"&&po(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function Gi(t,n,a,s){if(t=t.options,n){n={};for(var d=0;d<a.length;d++)n["$"+a[d]]=!0;for(a=0;a<t.length;a++)d=n.hasOwnProperty("$"+t[a].value),t[a].selected!==d&&(t[a].selected=d),d&&s&&(t[a].defaultSelected=!0)}else{for(a=""+Nn(a),n=null,d=0;d<t.length;d++){if(t[d].value===a){t[d].selected=!0,s&&(t[d].defaultSelected=!0);return}n!==null||t[d].disabled||(n=t[d])}n!==null&&(n.selected=!0)}}function sp(t,n,a){if(n!=null&&(n=""+Nn(n),n!==t.value&&(t.value=n),a==null)){t.defaultValue!==n&&(t.defaultValue=n);return}t.defaultValue=a!=null?""+Nn(a):""}function up(t,n,a,s){if(n==null){if(s!=null){if(a!=null)throw Error(l(92));if(Z(s)){if(1<s.length)throw Error(l(93));s=s[0]}a=s}a==null&&(a=""),n=a}a=Nn(n),t.defaultValue=a,s=t.textContent,s===a&&s!==""&&s!==null&&(t.value=s),Uu(t)}function Yi(t,n){if(n){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=n;return}}t.textContent=n}var Yv=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function cp(t,n,a){var s=n.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?s?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="":s?t.setProperty(n,a):typeof a!="number"||a===0||Yv.has(n)?n==="float"?t.cssFloat=a:t[n]=(""+a).trim():t[n]=a+"px"}function fp(t,n,a){if(n!=null&&typeof n!="object")throw Error(l(62));if(t=t.style,a!=null){for(var s in a)!a.hasOwnProperty(s)||n!=null&&n.hasOwnProperty(s)||(s.indexOf("--")===0?t.setProperty(s,""):s==="float"?t.cssFloat="":t[s]="");for(var d in n)s=n[d],n.hasOwnProperty(d)&&a[d]!==s&&cp(t,d,s)}else for(var m in n)n.hasOwnProperty(m)&&cp(t,m,n[m])}function Pu(t){if(t.indexOf("-")===-1)return!1;switch(t){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 Xv=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Zv=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function mo(t){return Zv.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function ar(){}var $u=null;function Vu(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Xi=null,Zi=null;function dp(t){var n=Lr(t);if(n&&(t=n.stateNode)){var a=t[Ht]||null;e:switch(t=n.stateNode,n.type){case"input":if(Hu(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),n=a.name,a.type==="radio"&&n!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+An(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var s=a[n];if(s!==t&&s.form===t.form){var d=s[Ht]||null;if(!d)throw Error(l(90));Hu(s,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(n=0;n<a.length;n++)s=a[n],s.form===t.form&&ap(s)}break e;case"textarea":sp(t,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&Gi(t,!!a.multiple,n,!1)}}}var Gu=!1;function hp(t,n,a){if(Gu)return t(n,a);Gu=!0;try{var s=t(n);return s}finally{if(Gu=!1,(Xi!==null||Zi!==null)&&(ns(),Xi&&(n=Xi,t=Zi,Zi=Xi=null,dp(n),t)))for(n=0;n<t.length;n++)dp(t[n])}}function Gl(t,n){var a=t.stateNode;if(a===null)return null;var s=a[Ht]||null;if(s===null)return null;a=s[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(t=t.type,s=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!s;break e;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error(l(231,n,typeof a));return a}var or=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yu=!1;if(or)try{var Yl={};Object.defineProperty(Yl,"passive",{get:function(){Yu=!0}}),window.addEventListener("test",Yl,Yl),window.removeEventListener("test",Yl,Yl)}catch{Yu=!1}var Dr=null,Xu=null,go=null;function pp(){if(go)return go;var t,n=Xu,a=n.length,s,d="value"in Dr?Dr.value:Dr.textContent,m=d.length;for(t=0;t<a&&n[t]===d[t];t++);var k=a-t;for(s=1;s<=k&&n[a-s]===d[m-s];s++);return go=d.slice(t,1<s?1-s:void 0)}function bo(t){var n=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&n===13&&(t=13)):t=n,t===10&&(t=13),32<=t||t===13?t:0}function yo(){return!0}function mp(){return!1}function en(t){function n(a,s,d,m,k){this._reactName=a,this._targetInst=d,this.type=s,this.nativeEvent=m,this.target=k,this.currentTarget=null;for(var L in t)t.hasOwnProperty(L)&&(a=t[L],this[L]=a?a(m):m[L]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?yo:mp,this.isPropagationStopped=mp,this}return g(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=yo)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=yo)},persist:function(){},isPersistent:yo}),n}var mi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xo=en(mi),Xl=g({},mi,{view:0,detail:0}),Kv=en(Xl),Zu,Ku,Zl,vo=g({},Xl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ju,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Zl&&(Zl&&t.type==="mousemove"?(Zu=t.screenX-Zl.screenX,Ku=t.screenY-Zl.screenY):Ku=Zu=0,Zl=t),Zu)},movementY:function(t){return"movementY"in t?t.movementY:Ku}}),gp=en(vo),Qv=g({},vo,{dataTransfer:0}),Jv=en(Qv),Wv=g({},Xl,{relatedTarget:0}),Qu=en(Wv),ew=g({},mi,{animationName:0,elapsedTime:0,pseudoElement:0}),tw=en(ew),nw=g({},mi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),rw=en(nw),iw=g({},mi,{data:0}),bp=en(iw),lw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},aw={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"},ow={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sw(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=ow[t])?!!n[t]:!1}function Ju(){return sw}var uw=g({},Xl,{key:function(t){if(t.key){var n=lw[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=bo(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?aw[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ju,charCode:function(t){return t.type==="keypress"?bo(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?bo(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),cw=en(uw),fw=g({},vo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yp=en(fw),dw=g({},Xl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ju}),hw=en(dw),pw=g({},mi,{propertyName:0,elapsedTime:0,pseudoElement:0}),mw=en(pw),gw=g({},vo,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),bw=en(gw),yw=g({},mi,{newState:0,oldState:0}),xw=en(yw),vw=[9,13,27,32],Wu=or&&"CompositionEvent"in window,Kl=null;or&&"documentMode"in document&&(Kl=document.documentMode);var ww=or&&"TextEvent"in window&&!Kl,xp=or&&(!Wu||Kl&&8<Kl&&11>=Kl),vp=" ",wp=!1;function Sp(t,n){switch(t){case"keyup":return vw.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ki=!1;function Sw(t,n){switch(t){case"compositionend":return kp(n);case"keypress":return n.which!==32?null:(wp=!0,vp);case"textInput":return t=n.data,t===vp&&wp?null:t;default:return null}}function kw(t,n){if(Ki)return t==="compositionend"||!Wu&&Sp(t,n)?(t=pp(),go=Xu=Dr=null,Ki=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return xp&&n.locale!=="ko"?null:n.data;default:return null}}var Ew={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 Ep(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!Ew[t.type]:n==="textarea"}function Cp(t,n,a,s){Xi?Zi?Zi.push(s):Zi=[s]:Xi=s,n=us(n,"onChange"),0<n.length&&(a=new xo("onChange","change",null,a,s),t.push({event:a,listeners:n}))}var Ql=null,Jl=null;function Cw(t){ob(t,0)}function wo(t){var n=pi(t);if(ap(n))return t}function Np(t,n){if(t==="change")return n}var Ap=!1;if(or){var ec;if(or){var tc="oninput"in document;if(!tc){var Tp=document.createElement("div");Tp.setAttribute("oninput","return;"),tc=typeof Tp.oninput=="function"}ec=tc}else ec=!1;Ap=ec&&(!document.documentMode||9<document.documentMode)}function jp(){Ql&&(Ql.detachEvent("onpropertychange",Rp),Jl=Ql=null)}function Rp(t){if(t.propertyName==="value"&&wo(Jl)){var n=[];Cp(n,Jl,t,Vu(t)),hp(Cw,n)}}function Nw(t,n,a){t==="focusin"?(jp(),Ql=n,Jl=a,Ql.attachEvent("onpropertychange",Rp)):t==="focusout"&&jp()}function Aw(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return wo(Jl)}function Tw(t,n){if(t==="click")return wo(n)}function jw(t,n){if(t==="input"||t==="change")return wo(n)}function Rw(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}var hn=typeof Object.is=="function"?Object.is:Rw;function Wl(t,n){if(hn(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var a=Object.keys(t),s=Object.keys(n);if(a.length!==s.length)return!1;for(s=0;s<a.length;s++){var d=a[s];if(!at.call(n,d)||!hn(t[d],n[d]))return!1}return!0}function _p(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Lp(t,n){var a=_p(t);t=0;for(var s;a;){if(a.nodeType===3){if(s=t+a.textContent.length,t<=n&&s>=n)return{node:a,offset:n-t};t=s}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=_p(a)}}function Dp(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?Dp(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function Op(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=po(t.document);n instanceof t.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)t=n.contentWindow;else break;n=po(t.document)}return n}function nc(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n&&(n==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||n==="textarea"||t.contentEditable==="true")}var _w=or&&"documentMode"in document&&11>=document.documentMode,Qi=null,rc=null,ea=null,ic=!1;function Mp(t,n,a){var s=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;ic||Qi==null||Qi!==po(s)||(s=Qi,"selectionStart"in s&&nc(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),ea&&Wl(ea,s)||(ea=s,s=us(rc,"onSelect"),0<s.length&&(n=new xo("onSelect","select",null,n,a),t.push({event:n,listeners:s}),n.target=Qi)))}function gi(t,n){var a={};return a[t.toLowerCase()]=n.toLowerCase(),a["Webkit"+t]="webkit"+n,a["Moz"+t]="moz"+n,a}var Ji={animationend:gi("Animation","AnimationEnd"),animationiteration:gi("Animation","AnimationIteration"),animationstart:gi("Animation","AnimationStart"),transitionrun:gi("Transition","TransitionRun"),transitionstart:gi("Transition","TransitionStart"),transitioncancel:gi("Transition","TransitionCancel"),transitionend:gi("Transition","TransitionEnd")},lc={},zp={};or&&(zp=document.createElement("div").style,"AnimationEvent"in window||(delete Ji.animationend.animation,delete Ji.animationiteration.animation,delete Ji.animationstart.animation),"TransitionEvent"in window||delete Ji.transitionend.transition);function bi(t){if(lc[t])return lc[t];if(!Ji[t])return t;var n=Ji[t],a;for(a in n)if(n.hasOwnProperty(a)&&a in zp)return lc[t]=n[a];return t}var Fp=bi("animationend"),Ip=bi("animationiteration"),Bp=bi("animationstart"),Lw=bi("transitionrun"),Dw=bi("transitionstart"),Ow=bi("transitioncancel"),Up=bi("transitionend"),Hp=new Map,ac="abort auxClick beforeToggle 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(" ");ac.push("scrollEnd");function Bn(t,n){Hp.set(t,n),De(n,[t])}var So=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Tn=[],Wi=0,oc=0;function ko(){for(var t=Wi,n=oc=Wi=0;n<t;){var a=Tn[n];Tn[n++]=null;var s=Tn[n];Tn[n++]=null;var d=Tn[n];Tn[n++]=null;var m=Tn[n];if(Tn[n++]=null,s!==null&&d!==null){var k=s.pending;k===null?d.next=d:(d.next=k.next,k.next=d),s.pending=d}m!==0&&qp(a,d,m)}}function Eo(t,n,a,s){Tn[Wi++]=t,Tn[Wi++]=n,Tn[Wi++]=a,Tn[Wi++]=s,oc|=s,t.lanes|=s,t=t.alternate,t!==null&&(t.lanes|=s)}function sc(t,n,a,s){return Eo(t,n,a,s),Co(t)}function yi(t,n){return Eo(t,null,null,n),Co(t)}function qp(t,n,a){t.lanes|=a;var s=t.alternate;s!==null&&(s.lanes|=a);for(var d=!1,m=t.return;m!==null;)m.childLanes|=a,s=m.alternate,s!==null&&(s.childLanes|=a),m.tag===22&&(t=m.stateNode,t===null||t._visibility&1||(d=!0)),t=m,m=m.return;return t.tag===3?(m=t.stateNode,d&&n!==null&&(d=31-We(a),t=m.hiddenUpdates,s=t[d],s===null?t[d]=[n]:s.push(n),n.lane=a|536870912),m):null}function Co(t){if(50<Sa)throw Sa=0,yf=null,Error(l(185));for(var n=t.return;n!==null;)t=n,n=t.return;return t.tag===3?t.stateNode:null}var el={};function Mw(t,n,a,s){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function pn(t,n,a,s){return new Mw(t,n,a,s)}function uc(t){return t=t.prototype,!(!t||!t.isReactComponent)}function sr(t,n){var a=t.alternate;return a===null?(a=pn(t.tag,n,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=n,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&65011712,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,n=t.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a}function Pp(t,n){t.flags&=65011714;var a=t.alternate;return a===null?(t.childLanes=0,t.lanes=n,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=a.childLanes,t.lanes=a.lanes,t.child=a.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=a.memoizedProps,t.memoizedState=a.memoizedState,t.updateQueue=a.updateQueue,t.type=a.type,n=a.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),t}function No(t,n,a,s,d,m){var k=0;if(s=t,typeof t=="function")uc(t)&&(k=1);else if(typeof t=="string")k=US(t,a,W.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case B:return t=pn(31,a,n,d),t.elementType=B,t.lanes=m,t;case S:return xi(a.children,d,m,n);case C:k=8,d|=24;break;case N:return t=pn(12,a,n,d|2),t.elementType=N,t.lanes=m,t;case H:return t=pn(13,a,n,d),t.elementType=H,t.lanes=m,t;case _:return t=pn(19,a,n,d),t.elementType=_,t.lanes=m,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case R:k=10;break e;case E:k=9;break e;case O:k=11;break e;case F:k=14;break e;case z:k=16,s=null;break e}k=29,a=Error(l(130,t===null?"null":typeof t,"")),s=null}return n=pn(k,a,n,d),n.elementType=t,n.type=s,n.lanes=m,n}function xi(t,n,a,s){return t=pn(7,t,s,n),t.lanes=a,t}function cc(t,n,a){return t=pn(6,t,null,n),t.lanes=a,t}function $p(t){var n=pn(18,null,null,0);return n.stateNode=t,n}function fc(t,n,a){return n=pn(4,t.children!==null?t.children:[],t.key,n),n.lanes=a,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}var Vp=new WeakMap;function jn(t,n){if(typeof t=="object"&&t!==null){var a=Vp.get(t);return a!==void 0?a:(n={value:t,source:n,stack:It(n)},Vp.set(t,n),n)}return{value:t,source:n,stack:It(n)}}var tl=[],nl=0,Ao=null,ta=0,Rn=[],_n=0,Or=null,Gn=1,Yn="";function ur(t,n){tl[nl++]=ta,tl[nl++]=Ao,Ao=t,ta=n}function Gp(t,n,a){Rn[_n++]=Gn,Rn[_n++]=Yn,Rn[_n++]=Or,Or=t;var s=Gn;t=Yn;var d=32-We(s)-1;s&=~(1<<d),a+=1;var m=32-We(n)+d;if(30<m){var k=d-d%5;m=(s&(1<<k)-1).toString(32),s>>=k,d-=k,Gn=1<<32-We(n)+d|a<<d|s,Yn=m+t}else Gn=1<<m|a<<d|s,Yn=t}function dc(t){t.return!==null&&(ur(t,1),Gp(t,1,0))}function hc(t){for(;t===Ao;)Ao=tl[--nl],tl[nl]=null,ta=tl[--nl],tl[nl]=null;for(;t===Or;)Or=Rn[--_n],Rn[_n]=null,Yn=Rn[--_n],Rn[_n]=null,Gn=Rn[--_n],Rn[_n]=null}function Yp(t,n){Rn[_n++]=Gn,Rn[_n++]=Yn,Rn[_n++]=Or,Gn=n.id,Yn=n.overflow,Or=t}var Ot=null,ft=null,$e=!1,Mr=null,Ln=!1,pc=Error(l(519));function zr(t){var n=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw na(jn(n,t)),pc}function Xp(t){var n=t.stateNode,a=t.type,s=t.memoizedProps;switch(n[Ct]=t,n[Ht]=s,a){case"dialog":Ue("cancel",n),Ue("close",n);break;case"iframe":case"object":case"embed":Ue("load",n);break;case"video":case"audio":for(a=0;a<Ea.length;a++)Ue(Ea[a],n);break;case"source":Ue("error",n);break;case"img":case"image":case"link":Ue("error",n),Ue("load",n);break;case"details":Ue("toggle",n);break;case"input":Ue("invalid",n),op(n,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Ue("invalid",n);break;case"textarea":Ue("invalid",n),up(n,s.value,s.defaultValue,s.children)}a=s.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||n.textContent===""+a||s.suppressHydrationWarning===!0||fb(n.textContent,a)?(s.popover!=null&&(Ue("beforetoggle",n),Ue("toggle",n)),s.onScroll!=null&&Ue("scroll",n),s.onScrollEnd!=null&&Ue("scrollend",n),s.onClick!=null&&(n.onclick=ar),n=!0):n=!1,n||zr(t,!0)}function Zp(t){for(Ot=t.return;Ot;)switch(Ot.tag){case 5:case 31:case 13:Ln=!1;return;case 27:case 3:Ln=!0;return;default:Ot=Ot.return}}function rl(t){if(t!==Ot)return!1;if(!$e)return Zp(t),$e=!0,!1;var n=t.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||Df(t.type,t.memoizedProps)),a=!a),a&&ft&&zr(t),Zp(t),n===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));ft=vb(t)}else if(n===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));ft=vb(t)}else n===27?(n=ft,Kr(t.type)?(t=If,If=null,ft=t):ft=n):ft=Ot?On(t.stateNode.nextSibling):null;return!0}function vi(){ft=Ot=null,$e=!1}function mc(){var t=Mr;return t!==null&&(ln===null?ln=t:ln.push.apply(ln,t),Mr=null),t}function na(t){Mr===null?Mr=[t]:Mr.push(t)}var gc=D(null),wi=null,cr=null;function Fr(t,n,a){T(gc,n._currentValue),n._currentValue=a}function fr(t){t._currentValue=gc.current,P(gc)}function bc(t,n,a){for(;t!==null;){var s=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,s!==null&&(s.childLanes|=n)):s!==null&&(s.childLanes&n)!==n&&(s.childLanes|=n),t===a)break;t=t.return}}function yc(t,n,a,s){var d=t.child;for(d!==null&&(d.return=t);d!==null;){var m=d.dependencies;if(m!==null){var k=d.child;m=m.firstContext;e:for(;m!==null;){var L=m;m=d;for(var G=0;G<n.length;G++)if(L.context===n[G]){m.lanes|=a,L=m.alternate,L!==null&&(L.lanes|=a),bc(m.return,a,t),s||(k=null);break e}m=L.next}}else if(d.tag===18){if(k=d.return,k===null)throw Error(l(341));k.lanes|=a,m=k.alternate,m!==null&&(m.lanes|=a),bc(k,a,t),k=null}else k=d.child;if(k!==null)k.return=d;else for(k=d;k!==null;){if(k===t){k=null;break}if(d=k.sibling,d!==null){d.return=k.return,k=d;break}k=k.return}d=k}}function il(t,n,a,s){t=null;for(var d=n,m=!1;d!==null;){if(!m){if((d.flags&524288)!==0)m=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var k=d.alternate;if(k===null)throw Error(l(387));if(k=k.memoizedProps,k!==null){var L=d.type;hn(d.pendingProps.value,k.value)||(t!==null?t.push(L):t=[L])}}else if(d===me.current){if(k=d.alternate,k===null)throw Error(l(387));k.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(t!==null?t.push(ja):t=[ja])}d=d.return}t!==null&&yc(n,t,a,s),n.flags|=262144}function To(t){for(t=t.firstContext;t!==null;){if(!hn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Si(t){wi=t,cr=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Mt(t){return Kp(wi,t)}function jo(t,n){return wi===null&&Si(t),Kp(t,n)}function Kp(t,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},cr===null){if(t===null)throw Error(l(308));cr=n,t.dependencies={lanes:0,firstContext:n},t.flags|=524288}else cr=cr.next=n;return a}var zw=typeof AbortController<"u"?AbortController:function(){var t=[],n=this.signal={aborted:!1,addEventListener:function(a,s){t.push(s)}};this.abort=function(){n.aborted=!0,t.forEach(function(a){return a()})}},Fw=e.unstable_scheduleCallback,Iw=e.unstable_NormalPriority,vt={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function xc(){return{controller:new zw,data:new Map,refCount:0}}function ra(t){t.refCount--,t.refCount===0&&Fw(Iw,function(){t.controller.abort()})}var ia=null,vc=0,ll=0,al=null;function Bw(t,n){if(ia===null){var a=ia=[];vc=0,ll=Ef(),al={status:"pending",value:void 0,then:function(s){a.push(s)}}}return vc++,n.then(Qp,Qp),n}function Qp(){if(--vc===0&&ia!==null){al!==null&&(al.status="fulfilled");var t=ia;ia=null,ll=0,al=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function Uw(t,n){var a=[],s={status:"pending",value:null,reason:null,then:function(d){a.push(d)}};return t.then(function(){s.status="fulfilled",s.value=n;for(var d=0;d<a.length;d++)(0,a[d])(n)},function(d){for(s.status="rejected",s.reason=d,d=0;d<a.length;d++)(0,a[d])(void 0)}),s}var Jp=U.S;U.S=function(t,n){Mg=Fe(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&Bw(t,n),Jp!==null&&Jp(t,n)};var ki=D(null);function wc(){var t=ki.current;return t!==null?t:ot.pooledCache}function Ro(t,n){n===null?T(ki,ki.current):T(ki,n.pool)}function Wp(){var t=wc();return t===null?null:{parent:vt._currentValue,pool:t}}var ol=Error(l(460)),Sc=Error(l(474)),_o=Error(l(542)),Lo={then:function(){}};function em(t){return t=t.status,t==="fulfilled"||t==="rejected"}function tm(t,n,a){switch(a=t[a],a===void 0?t.push(n):a!==n&&(n.then(ar,ar),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,rm(t),t;default:if(typeof n.status=="string")n.then(ar,ar);else{if(t=ot,t!==null&&100<t.shellSuspendCounter)throw Error(l(482));t=n,t.status="pending",t.then(function(s){if(n.status==="pending"){var d=n;d.status="fulfilled",d.value=s}},function(s){if(n.status==="pending"){var d=n;d.status="rejected",d.reason=s}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,rm(t),t}throw Ci=n,ol}}function Ei(t){try{var n=t._init;return n(t._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Ci=a,ol):a}}var Ci=null;function nm(){if(Ci===null)throw Error(l(459));var t=Ci;return Ci=null,t}function rm(t){if(t===ol||t===_o)throw Error(l(483))}var sl=null,la=0;function Do(t){var n=la;return la+=1,sl===null&&(sl=[]),tm(sl,t,n)}function aa(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function Oo(t,n){throw n.$$typeof===w?Error(l(525)):(t=Object.prototype.toString.call(n),Error(l(31,t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t)))}function im(t){function n(Q,K){if(t){var ee=Q.deletions;ee===null?(Q.deletions=[K],Q.flags|=16):ee.push(K)}}function a(Q,K){if(!t)return null;for(;K!==null;)n(Q,K),K=K.sibling;return null}function s(Q){for(var K=new Map;Q!==null;)Q.key!==null?K.set(Q.key,Q):K.set(Q.index,Q),Q=Q.sibling;return K}function d(Q,K){return Q=sr(Q,K),Q.index=0,Q.sibling=null,Q}function m(Q,K,ee){return Q.index=ee,t?(ee=Q.alternate,ee!==null?(ee=ee.index,ee<K?(Q.flags|=67108866,K):ee):(Q.flags|=67108866,K)):(Q.flags|=1048576,K)}function k(Q){return t&&Q.alternate===null&&(Q.flags|=67108866),Q}function L(Q,K,ee,se){return K===null||K.tag!==6?(K=cc(ee,Q.mode,se),K.return=Q,K):(K=d(K,ee),K.return=Q,K)}function G(Q,K,ee,se){var Ce=ee.type;return Ce===S?ae(Q,K,ee.props.children,se,ee.key):K!==null&&(K.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===z&&Ei(Ce)===K.type)?(K=d(K,ee.props),aa(K,ee),K.return=Q,K):(K=No(ee.type,ee.key,ee.props,null,Q.mode,se),aa(K,ee),K.return=Q,K)}function ne(Q,K,ee,se){return K===null||K.tag!==4||K.stateNode.containerInfo!==ee.containerInfo||K.stateNode.implementation!==ee.implementation?(K=fc(ee,Q.mode,se),K.return=Q,K):(K=d(K,ee.children||[]),K.return=Q,K)}function ae(Q,K,ee,se,Ce){return K===null||K.tag!==7?(K=xi(ee,Q.mode,se,Ce),K.return=Q,K):(K=d(K,ee),K.return=Q,K)}function fe(Q,K,ee){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return K=cc(""+K,Q.mode,ee),K.return=Q,K;if(typeof K=="object"&&K!==null){switch(K.$$typeof){case x:return ee=No(K.type,K.key,K.props,null,Q.mode,ee),aa(ee,K),ee.return=Q,ee;case v:return K=fc(K,Q.mode,ee),K.return=Q,K;case z:return K=Ei(K),fe(Q,K,ee)}if(Z(K)||V(K))return K=xi(K,Q.mode,ee,null),K.return=Q,K;if(typeof K.then=="function")return fe(Q,Do(K),ee);if(K.$$typeof===R)return fe(Q,jo(Q,K),ee);Oo(Q,K)}return null}function re(Q,K,ee,se){var Ce=K!==null?K.key:null;if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return Ce!==null?null:L(Q,K,""+ee,se);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case x:return ee.key===Ce?G(Q,K,ee,se):null;case v:return ee.key===Ce?ne(Q,K,ee,se):null;case z:return ee=Ei(ee),re(Q,K,ee,se)}if(Z(ee)||V(ee))return Ce!==null?null:ae(Q,K,ee,se,null);if(typeof ee.then=="function")return re(Q,K,Do(ee),se);if(ee.$$typeof===R)return re(Q,K,jo(Q,ee),se);Oo(Q,ee)}return null}function ie(Q,K,ee,se,Ce){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return Q=Q.get(ee)||null,L(K,Q,""+se,Ce);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case x:return Q=Q.get(se.key===null?ee:se.key)||null,G(K,Q,se,Ce);case v:return Q=Q.get(se.key===null?ee:se.key)||null,ne(K,Q,se,Ce);case z:return se=Ei(se),ie(Q,K,ee,se,Ce)}if(Z(se)||V(se))return Q=Q.get(ee)||null,ae(K,Q,se,Ce,null);if(typeof se.then=="function")return ie(Q,K,ee,Do(se),Ce);if(se.$$typeof===R)return ie(Q,K,ee,jo(K,se),Ce);Oo(K,se)}return null}function Se(Q,K,ee,se){for(var Ce=null,Ze=null,ke=K,Oe=K=0,Pe=null;ke!==null&&Oe<ee.length;Oe++){ke.index>Oe?(Pe=ke,ke=null):Pe=ke.sibling;var Ke=re(Q,ke,ee[Oe],se);if(Ke===null){ke===null&&(ke=Pe);break}t&&ke&&Ke.alternate===null&&n(Q,ke),K=m(Ke,K,Oe),Ze===null?Ce=Ke:Ze.sibling=Ke,Ze=Ke,ke=Pe}if(Oe===ee.length)return a(Q,ke),$e&&ur(Q,Oe),Ce;if(ke===null){for(;Oe<ee.length;Oe++)ke=fe(Q,ee[Oe],se),ke!==null&&(K=m(ke,K,Oe),Ze===null?Ce=ke:Ze.sibling=ke,Ze=ke);return $e&&ur(Q,Oe),Ce}for(ke=s(ke);Oe<ee.length;Oe++)Pe=ie(ke,Q,Oe,ee[Oe],se),Pe!==null&&(t&&Pe.alternate!==null&&ke.delete(Pe.key===null?Oe:Pe.key),K=m(Pe,K,Oe),Ze===null?Ce=Pe:Ze.sibling=Pe,Ze=Pe);return t&&ke.forEach(function(ti){return n(Q,ti)}),$e&&ur(Q,Oe),Ce}function Ae(Q,K,ee,se){if(ee==null)throw Error(l(151));for(var Ce=null,Ze=null,ke=K,Oe=K=0,Pe=null,Ke=ee.next();ke!==null&&!Ke.done;Oe++,Ke=ee.next()){ke.index>Oe?(Pe=ke,ke=null):Pe=ke.sibling;var ti=re(Q,ke,Ke.value,se);if(ti===null){ke===null&&(ke=Pe);break}t&&ke&&ti.alternate===null&&n(Q,ke),K=m(ti,K,Oe),Ze===null?Ce=ti:Ze.sibling=ti,Ze=ti,ke=Pe}if(Ke.done)return a(Q,ke),$e&&ur(Q,Oe),Ce;if(ke===null){for(;!Ke.done;Oe++,Ke=ee.next())Ke=fe(Q,Ke.value,se),Ke!==null&&(K=m(Ke,K,Oe),Ze===null?Ce=Ke:Ze.sibling=Ke,Ze=Ke);return $e&&ur(Q,Oe),Ce}for(ke=s(ke);!Ke.done;Oe++,Ke=ee.next())Ke=ie(ke,Q,Oe,Ke.value,se),Ke!==null&&(t&&Ke.alternate!==null&&ke.delete(Ke.key===null?Oe:Ke.key),K=m(Ke,K,Oe),Ze===null?Ce=Ke:Ze.sibling=Ke,Ze=Ke);return t&&ke.forEach(function(QS){return n(Q,QS)}),$e&&ur(Q,Oe),Ce}function it(Q,K,ee,se){if(typeof ee=="object"&&ee!==null&&ee.type===S&&ee.key===null&&(ee=ee.props.children),typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case x:e:{for(var Ce=ee.key;K!==null;){if(K.key===Ce){if(Ce=ee.type,Ce===S){if(K.tag===7){a(Q,K.sibling),se=d(K,ee.props.children),se.return=Q,Q=se;break e}}else if(K.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===z&&Ei(Ce)===K.type){a(Q,K.sibling),se=d(K,ee.props),aa(se,ee),se.return=Q,Q=se;break e}a(Q,K);break}else n(Q,K);K=K.sibling}ee.type===S?(se=xi(ee.props.children,Q.mode,se,ee.key),se.return=Q,Q=se):(se=No(ee.type,ee.key,ee.props,null,Q.mode,se),aa(se,ee),se.return=Q,Q=se)}return k(Q);case v:e:{for(Ce=ee.key;K!==null;){if(K.key===Ce)if(K.tag===4&&K.stateNode.containerInfo===ee.containerInfo&&K.stateNode.implementation===ee.implementation){a(Q,K.sibling),se=d(K,ee.children||[]),se.return=Q,Q=se;break e}else{a(Q,K);break}else n(Q,K);K=K.sibling}se=fc(ee,Q.mode,se),se.return=Q,Q=se}return k(Q);case z:return ee=Ei(ee),it(Q,K,ee,se)}if(Z(ee))return Se(Q,K,ee,se);if(V(ee)){if(Ce=V(ee),typeof Ce!="function")throw Error(l(150));return ee=Ce.call(ee),Ae(Q,K,ee,se)}if(typeof ee.then=="function")return it(Q,K,Do(ee),se);if(ee.$$typeof===R)return it(Q,K,jo(Q,ee),se);Oo(Q,ee)}return typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint"?(ee=""+ee,K!==null&&K.tag===6?(a(Q,K.sibling),se=d(K,ee),se.return=Q,Q=se):(a(Q,K),se=cc(ee,Q.mode,se),se.return=Q,Q=se),k(Q)):a(Q,K)}return function(Q,K,ee,se){try{la=0;var Ce=it(Q,K,ee,se);return sl=null,Ce}catch(ke){if(ke===ol||ke===_o)throw ke;var Ze=pn(29,ke,null,Q.mode);return Ze.lanes=se,Ze.return=Q,Ze}}}var Ni=im(!0),lm=im(!1),Ir=!1;function kc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ec(t,n){t=t.updateQueue,n.updateQueue===t&&(n.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Br(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Ur(t,n,a){var s=t.updateQueue;if(s===null)return null;if(s=s.shared,(Qe&2)!==0){var d=s.pending;return d===null?n.next=n:(n.next=d.next,d.next=n),s.pending=n,n=Co(t),qp(t,null,a),n}return Eo(t,s,n,a),Co(t)}function oa(t,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var s=n.lanes;s&=t.pendingLanes,a|=s,n.lanes=a,Pl(t,a)}}function Cc(t,n){var a=t.updateQueue,s=t.alternate;if(s!==null&&(s=s.updateQueue,a===s)){var d=null,m=null;if(a=a.firstBaseUpdate,a!==null){do{var k={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};m===null?d=m=k:m=m.next=k,a=a.next}while(a!==null);m===null?d=m=n:m=m.next=n}else d=m=n;a={baseState:s.baseState,firstBaseUpdate:d,lastBaseUpdate:m,shared:s.shared,callbacks:s.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=n:t.next=n,a.lastBaseUpdate=n}var Nc=!1;function sa(){if(Nc){var t=al;if(t!==null)throw t}}function ua(t,n,a,s){Nc=!1;var d=t.updateQueue;Ir=!1;var m=d.firstBaseUpdate,k=d.lastBaseUpdate,L=d.shared.pending;if(L!==null){d.shared.pending=null;var G=L,ne=G.next;G.next=null,k===null?m=ne:k.next=ne,k=G;var ae=t.alternate;ae!==null&&(ae=ae.updateQueue,L=ae.lastBaseUpdate,L!==k&&(L===null?ae.firstBaseUpdate=ne:L.next=ne,ae.lastBaseUpdate=G))}if(m!==null){var fe=d.baseState;k=0,ae=ne=G=null,L=m;do{var re=L.lane&-536870913,ie=re!==L.lane;if(ie?(qe&re)===re:(s&re)===re){re!==0&&re===ll&&(Nc=!0),ae!==null&&(ae=ae.next={lane:0,tag:L.tag,payload:L.payload,callback:null,next:null});e:{var Se=t,Ae=L;re=n;var it=a;switch(Ae.tag){case 1:if(Se=Ae.payload,typeof Se=="function"){fe=Se.call(it,fe,re);break e}fe=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=Ae.payload,re=typeof Se=="function"?Se.call(it,fe,re):Se,re==null)break e;fe=g({},fe,re);break e;case 2:Ir=!0}}re=L.callback,re!==null&&(t.flags|=64,ie&&(t.flags|=8192),ie=d.callbacks,ie===null?d.callbacks=[re]:ie.push(re))}else ie={lane:re,tag:L.tag,payload:L.payload,callback:L.callback,next:null},ae===null?(ne=ae=ie,G=fe):ae=ae.next=ie,k|=re;if(L=L.next,L===null){if(L=d.shared.pending,L===null)break;ie=L,L=ie.next,ie.next=null,d.lastBaseUpdate=ie,d.shared.pending=null}}while(!0);ae===null&&(G=fe),d.baseState=G,d.firstBaseUpdate=ne,d.lastBaseUpdate=ae,m===null&&(d.shared.lanes=0),Vr|=k,t.lanes=k,t.memoizedState=fe}}function am(t,n){if(typeof t!="function")throw Error(l(191,t));t.call(n)}function om(t,n){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)am(a[t],n)}var ul=D(null),Mo=D(0);function sm(t,n){t=vr,T(Mo,t),T(ul,n),vr=t|n.baseLanes}function Ac(){T(Mo,vr),T(ul,ul.current)}function Tc(){vr=Mo.current,P(ul),P(Mo)}var mn=D(null),Dn=null;function Hr(t){var n=t.alternate;T(yt,yt.current&1),T(mn,t),Dn===null&&(n===null||ul.current!==null||n.memoizedState!==null)&&(Dn=t)}function jc(t){T(yt,yt.current),T(mn,t),Dn===null&&(Dn=t)}function um(t){t.tag===22?(T(yt,yt.current),T(mn,t),Dn===null&&(Dn=t)):qr()}function qr(){T(yt,yt.current),T(mn,mn.current)}function gn(t){P(mn),Dn===t&&(Dn=null),P(yt)}var yt=D(0);function zo(t){for(var n=t;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||zf(a)||Ff(a)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(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 null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var dr=0,Le=null,nt=null,wt=null,Fo=!1,cl=!1,Ai=!1,Io=0,ca=0,fl=null,Hw=0;function mt(){throw Error(l(321))}function Rc(t,n){if(n===null)return!1;for(var a=0;a<n.length&&a<t.length;a++)if(!hn(t[a],n[a]))return!1;return!0}function _c(t,n,a,s,d,m){return dr=m,Le=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,U.H=t===null||t.memoizedState===null?Gm:Gc,Ai=!1,m=a(s,d),Ai=!1,cl&&(m=fm(n,a,s,d)),cm(t),m}function cm(t){U.H=ha;var n=nt!==null&&nt.next!==null;if(dr=0,wt=nt=Le=null,Fo=!1,ca=0,fl=null,n)throw Error(l(300));t===null||St||(t=t.dependencies,t!==null&&To(t)&&(St=!0))}function fm(t,n,a,s){Le=t;var d=0;do{if(cl&&(fl=null),ca=0,cl=!1,25<=d)throw Error(l(301));if(d+=1,wt=nt=null,t.updateQueue!=null){var m=t.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}U.H=Ym,m=n(a,s)}while(cl);return m}function qw(){var t=U.H,n=t.useState()[0];return n=typeof n.then=="function"?fa(n):n,t=t.useState()[0],(nt!==null?nt.memoizedState:null)!==t&&(Le.flags|=1024),n}function Lc(){var t=Io!==0;return Io=0,t}function Dc(t,n,a){n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~a}function Oc(t){if(Fo){for(t=t.memoizedState;t!==null;){var n=t.queue;n!==null&&(n.pending=null),t=t.next}Fo=!1}dr=0,wt=nt=Le=null,cl=!1,ca=Io=0,fl=null}function Xt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wt===null?Le.memoizedState=wt=t:wt=wt.next=t,wt}function xt(){if(nt===null){var t=Le.alternate;t=t!==null?t.memoizedState:null}else t=nt.next;var n=wt===null?Le.memoizedState:wt.next;if(n!==null)wt=n,nt=t;else{if(t===null)throw Le.alternate===null?Error(l(467)):Error(l(310));nt=t,t={memoizedState:nt.memoizedState,baseState:nt.baseState,baseQueue:nt.baseQueue,queue:nt.queue,next:null},wt===null?Le.memoizedState=wt=t:wt=wt.next=t}return wt}function Bo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function fa(t){var n=ca;return ca+=1,fl===null&&(fl=[]),t=tm(fl,t,n),n=Le,(wt===null?n.memoizedState:wt.next)===null&&(n=n.alternate,U.H=n===null||n.memoizedState===null?Gm:Gc),t}function Uo(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return fa(t);if(t.$$typeof===R)return Mt(t)}throw Error(l(438,String(t)))}function Mc(t){var n=null,a=Le.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var s=Le.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(n={data:s.data.map(function(d){return d.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=Bo(),Le.updateQueue=a),a.memoCache=n,a=n.data[n.index],a===void 0)for(a=n.data[n.index]=Array(t),s=0;s<t;s++)a[s]=M;return n.index++,a}function hr(t,n){return typeof n=="function"?n(t):n}function Ho(t){var n=xt();return zc(n,nt,t)}function zc(t,n,a){var s=t.queue;if(s===null)throw Error(l(311));s.lastRenderedReducer=a;var d=t.baseQueue,m=s.pending;if(m!==null){if(d!==null){var k=d.next;d.next=m.next,m.next=k}n.baseQueue=d=m,s.pending=null}if(m=t.baseState,d===null)t.memoizedState=m;else{n=d.next;var L=k=null,G=null,ne=n,ae=!1;do{var fe=ne.lane&-536870913;if(fe!==ne.lane?(qe&fe)===fe:(dr&fe)===fe){var re=ne.revertLane;if(re===0)G!==null&&(G=G.next={lane:0,revertLane:0,gesture:null,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null}),fe===ll&&(ae=!0);else if((dr&re)===re){ne=ne.next,re===ll&&(ae=!0);continue}else fe={lane:0,revertLane:ne.revertLane,gesture:null,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null},G===null?(L=G=fe,k=m):G=G.next=fe,Le.lanes|=re,Vr|=re;fe=ne.action,Ai&&a(m,fe),m=ne.hasEagerState?ne.eagerState:a(m,fe)}else re={lane:fe,revertLane:ne.revertLane,gesture:ne.gesture,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null},G===null?(L=G=re,k=m):G=G.next=re,Le.lanes|=fe,Vr|=fe;ne=ne.next}while(ne!==null&&ne!==n);if(G===null?k=m:G.next=L,!hn(m,t.memoizedState)&&(St=!0,ae&&(a=al,a!==null)))throw a;t.memoizedState=m,t.baseState=k,t.baseQueue=G,s.lastRenderedState=m}return d===null&&(s.lanes=0),[t.memoizedState,s.dispatch]}function Fc(t){var n=xt(),a=n.queue;if(a===null)throw Error(l(311));a.lastRenderedReducer=t;var s=a.dispatch,d=a.pending,m=n.memoizedState;if(d!==null){a.pending=null;var k=d=d.next;do m=t(m,k.action),k=k.next;while(k!==d);hn(m,n.memoizedState)||(St=!0),n.memoizedState=m,n.baseQueue===null&&(n.baseState=m),a.lastRenderedState=m}return[m,s]}function dm(t,n,a){var s=Le,d=xt(),m=$e;if(m){if(a===void 0)throw Error(l(407));a=a()}else a=n();var k=!hn((nt||d).memoizedState,a);if(k&&(d.memoizedState=a,St=!0),d=d.queue,Uc(mm.bind(null,s,d,t),[t]),d.getSnapshot!==n||k||wt!==null&&wt.memoizedState.tag&1){if(s.flags|=2048,dl(9,{destroy:void 0},pm.bind(null,s,d,a,n),null),ot===null)throw Error(l(349));m||(dr&127)!==0||hm(s,n,a)}return a}function hm(t,n,a){t.flags|=16384,t={getSnapshot:n,value:a},n=Le.updateQueue,n===null?(n=Bo(),Le.updateQueue=n,n.stores=[t]):(a=n.stores,a===null?n.stores=[t]:a.push(t))}function pm(t,n,a,s){n.value=a,n.getSnapshot=s,gm(n)&&bm(t)}function mm(t,n,a){return a(function(){gm(n)&&bm(t)})}function gm(t){var n=t.getSnapshot;t=t.value;try{var a=n();return!hn(t,a)}catch{return!0}}function bm(t){var n=yi(t,2);n!==null&&an(n,t,2)}function Ic(t){var n=Xt();if(typeof t=="function"){var a=t;if(t=a(),Ai){Dt(!0);try{a()}finally{Dt(!1)}}}return n.memoizedState=n.baseState=t,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hr,lastRenderedState:t},n}function ym(t,n,a,s){return t.baseState=a,zc(t,nt,typeof s=="function"?s:hr)}function Pw(t,n,a,s,d){if($o(t))throw Error(l(485));if(t=n.action,t!==null){var m={payload:d,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(k){m.listeners.push(k)}};U.T!==null?a(!0):m.isTransition=!1,s(m),a=n.pending,a===null?(m.next=n.pending=m,xm(n,m)):(m.next=a.next,n.pending=a.next=m)}}function xm(t,n){var a=n.action,s=n.payload,d=t.state;if(n.isTransition){var m=U.T,k={};U.T=k;try{var L=a(d,s),G=U.S;G!==null&&G(k,L),vm(t,n,L)}catch(ne){Bc(t,n,ne)}finally{m!==null&&k.types!==null&&(m.types=k.types),U.T=m}}else try{m=a(d,s),vm(t,n,m)}catch(ne){Bc(t,n,ne)}}function vm(t,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(s){wm(t,n,s)},function(s){return Bc(t,n,s)}):wm(t,n,a)}function wm(t,n,a){n.status="fulfilled",n.value=a,Sm(n),t.state=a,n=t.pending,n!==null&&(a=n.next,a===n?t.pending=null:(a=a.next,n.next=a,xm(t,a)))}function Bc(t,n,a){var s=t.pending;if(t.pending=null,s!==null){s=s.next;do n.status="rejected",n.reason=a,Sm(n),n=n.next;while(n!==s)}t.action=null}function Sm(t){t=t.listeners;for(var n=0;n<t.length;n++)(0,t[n])()}function km(t,n){return n}function Em(t,n){if($e){var a=ot.formState;if(a!==null){e:{var s=Le;if($e){if(ft){t:{for(var d=ft,m=Ln;d.nodeType!==8;){if(!m){d=null;break t}if(d=On(d.nextSibling),d===null){d=null;break t}}m=d.data,d=m==="F!"||m==="F"?d:null}if(d){ft=On(d.nextSibling),s=d.data==="F!";break e}}zr(s)}s=!1}s&&(n=a[0])}}return a=Xt(),a.memoizedState=a.baseState=n,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:km,lastRenderedState:n},a.queue=s,a=Pm.bind(null,Le,s),s.dispatch=a,s=Ic(!1),m=Vc.bind(null,Le,!1,s.queue),s=Xt(),d={state:n,dispatch:null,action:t,pending:null},s.queue=d,a=Pw.bind(null,Le,d,m,a),d.dispatch=a,s.memoizedState=t,[n,a,!1]}function Cm(t){var n=xt();return Nm(n,nt,t)}function Nm(t,n,a){if(n=zc(t,n,km)[0],t=Ho(hr)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var s=fa(n)}catch(k){throw k===ol?_o:k}else s=n;n=xt();var d=n.queue,m=d.dispatch;return a!==n.memoizedState&&(Le.flags|=2048,dl(9,{destroy:void 0},$w.bind(null,d,a),null)),[s,m,t]}function $w(t,n){t.action=n}function Am(t){var n=xt(),a=nt;if(a!==null)return Nm(n,a,t);xt(),n=n.memoizedState,a=xt();var s=a.queue.dispatch;return a.memoizedState=t,[n,s,!1]}function dl(t,n,a,s){return t={tag:t,create:a,deps:s,inst:n,next:null},n=Le.updateQueue,n===null&&(n=Bo(),Le.updateQueue=n),a=n.lastEffect,a===null?n.lastEffect=t.next=t:(s=a.next,a.next=t,t.next=s,n.lastEffect=t),t}function Tm(){return xt().memoizedState}function qo(t,n,a,s){var d=Xt();Le.flags|=t,d.memoizedState=dl(1|n,{destroy:void 0},a,s===void 0?null:s)}function Po(t,n,a,s){var d=xt();s=s===void 0?null:s;var m=d.memoizedState.inst;nt!==null&&s!==null&&Rc(s,nt.memoizedState.deps)?d.memoizedState=dl(n,m,a,s):(Le.flags|=t,d.memoizedState=dl(1|n,m,a,s))}function jm(t,n){qo(8390656,8,t,n)}function Uc(t,n){Po(2048,8,t,n)}function Vw(t){Le.flags|=4;var n=Le.updateQueue;if(n===null)n=Bo(),Le.updateQueue=n,n.events=[t];else{var a=n.events;a===null?n.events=[t]:a.push(t)}}function Rm(t){var n=xt().memoizedState;return Vw({ref:n,nextImpl:t}),function(){if((Qe&2)!==0)throw Error(l(440));return n.impl.apply(void 0,arguments)}}function _m(t,n){return Po(4,2,t,n)}function Lm(t,n){return Po(4,4,t,n)}function Dm(t,n){if(typeof n=="function"){t=t();var a=n(t);return function(){typeof a=="function"?a():n(null)}}if(n!=null)return t=t(),n.current=t,function(){n.current=null}}function Om(t,n,a){a=a!=null?a.concat([t]):null,Po(4,4,Dm.bind(null,n,t),a)}function Hc(){}function Mm(t,n){var a=xt();n=n===void 0?null:n;var s=a.memoizedState;return n!==null&&Rc(n,s[1])?s[0]:(a.memoizedState=[t,n],t)}function zm(t,n){var a=xt();n=n===void 0?null:n;var s=a.memoizedState;if(n!==null&&Rc(n,s[1]))return s[0];if(s=t(),Ai){Dt(!0);try{t()}finally{Dt(!1)}}return a.memoizedState=[s,n],s}function qc(t,n,a){return a===void 0||(dr&1073741824)!==0&&(qe&261930)===0?t.memoizedState=n:(t.memoizedState=a,t=Fg(),Le.lanes|=t,Vr|=t,a)}function Fm(t,n,a,s){return hn(a,n)?a:ul.current!==null?(t=qc(t,a,s),hn(t,n)||(St=!0),t):(dr&42)===0||(dr&1073741824)!==0&&(qe&261930)===0?(St=!0,t.memoizedState=a):(t=Fg(),Le.lanes|=t,Vr|=t,n)}function Im(t,n,a,s,d){var m=Y.p;Y.p=m!==0&&8>m?m:8;var k=U.T,L={};U.T=L,Vc(t,!1,n,a);try{var G=d(),ne=U.S;if(ne!==null&&ne(L,G),G!==null&&typeof G=="object"&&typeof G.then=="function"){var ae=Uw(G,s);da(t,n,ae,xn(t))}else da(t,n,s,xn(t))}catch(fe){da(t,n,{then:function(){},status:"rejected",reason:fe},xn())}finally{Y.p=m,k!==null&&L.types!==null&&(k.types=L.types),U.T=k}}function Gw(){}function Pc(t,n,a,s){if(t.tag!==5)throw Error(l(476));var d=Bm(t).queue;Im(t,d,n,X,a===null?Gw:function(){return Um(t),a(s)})}function Bm(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:X,baseState:X,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hr,lastRenderedState:X},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hr,lastRenderedState:a},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function Um(t){var n=Bm(t);n.next===null&&(n=t.alternate.memoizedState),da(t,n.next.queue,{},xn())}function $c(){return Mt(ja)}function Hm(){return xt().memoizedState}function qm(){return xt().memoizedState}function Yw(t){for(var n=t.return;n!==null;){switch(n.tag){case 24:case 3:var a=xn();t=Br(a);var s=Ur(n,t,a);s!==null&&(an(s,n,a),oa(s,n,a)),n={cache:xc()},t.payload=n;return}n=n.return}}function Xw(t,n,a){var s=xn();a={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},$o(t)?$m(n,a):(a=sc(t,n,a,s),a!==null&&(an(a,t,s),Vm(a,n,s)))}function Pm(t,n,a){var s=xn();da(t,n,a,s)}function da(t,n,a,s){var d={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if($o(t))$m(n,d);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=n.lastRenderedReducer,m!==null))try{var k=n.lastRenderedState,L=m(k,a);if(d.hasEagerState=!0,d.eagerState=L,hn(L,k))return Eo(t,n,d,0),ot===null&&ko(),!1}catch{}if(a=sc(t,n,d,s),a!==null)return an(a,t,s),Vm(a,n,s),!0}return!1}function Vc(t,n,a,s){if(s={lane:2,revertLane:Ef(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},$o(t)){if(n)throw Error(l(479))}else n=sc(t,a,s,2),n!==null&&an(n,t,2)}function $o(t){var n=t.alternate;return t===Le||n!==null&&n===Le}function $m(t,n){cl=Fo=!0;var a=t.pending;a===null?n.next=n:(n.next=a.next,a.next=n),t.pending=n}function Vm(t,n,a){if((a&4194048)!==0){var s=n.lanes;s&=t.pendingLanes,a|=s,n.lanes=a,Pl(t,a)}}var ha={readContext:Mt,use:Uo,useCallback:mt,useContext:mt,useEffect:mt,useImperativeHandle:mt,useLayoutEffect:mt,useInsertionEffect:mt,useMemo:mt,useReducer:mt,useRef:mt,useState:mt,useDebugValue:mt,useDeferredValue:mt,useTransition:mt,useSyncExternalStore:mt,useId:mt,useHostTransitionStatus:mt,useFormState:mt,useActionState:mt,useOptimistic:mt,useMemoCache:mt,useCacheRefresh:mt};ha.useEffectEvent=mt;var Gm={readContext:Mt,use:Uo,useCallback:function(t,n){return Xt().memoizedState=[t,n===void 0?null:n],t},useContext:Mt,useEffect:jm,useImperativeHandle:function(t,n,a){a=a!=null?a.concat([t]):null,qo(4194308,4,Dm.bind(null,n,t),a)},useLayoutEffect:function(t,n){return qo(4194308,4,t,n)},useInsertionEffect:function(t,n){qo(4,2,t,n)},useMemo:function(t,n){var a=Xt();n=n===void 0?null:n;var s=t();if(Ai){Dt(!0);try{t()}finally{Dt(!1)}}return a.memoizedState=[s,n],s},useReducer:function(t,n,a){var s=Xt();if(a!==void 0){var d=a(n);if(Ai){Dt(!0);try{a(n)}finally{Dt(!1)}}}else d=n;return s.memoizedState=s.baseState=d,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:d},s.queue=t,t=t.dispatch=Xw.bind(null,Le,t),[s.memoizedState,t]},useRef:function(t){var n=Xt();return t={current:t},n.memoizedState=t},useState:function(t){t=Ic(t);var n=t.queue,a=Pm.bind(null,Le,n);return n.dispatch=a,[t.memoizedState,a]},useDebugValue:Hc,useDeferredValue:function(t,n){var a=Xt();return qc(a,t,n)},useTransition:function(){var t=Ic(!1);return t=Im.bind(null,Le,t.queue,!0,!1),Xt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,n,a){var s=Le,d=Xt();if($e){if(a===void 0)throw Error(l(407));a=a()}else{if(a=n(),ot===null)throw Error(l(349));(qe&127)!==0||hm(s,n,a)}d.memoizedState=a;var m={value:a,getSnapshot:n};return d.queue=m,jm(mm.bind(null,s,m,t),[t]),s.flags|=2048,dl(9,{destroy:void 0},pm.bind(null,s,m,a,n),null),a},useId:function(){var t=Xt(),n=ot.identifierPrefix;if($e){var a=Yn,s=Gn;a=(s&~(1<<32-We(s)-1)).toString(32)+a,n="_"+n+"R_"+a,a=Io++,0<a&&(n+="H"+a.toString(32)),n+="_"}else a=Hw++,n="_"+n+"r_"+a.toString(32)+"_";return t.memoizedState=n},useHostTransitionStatus:$c,useFormState:Em,useActionState:Em,useOptimistic:function(t){var n=Xt();n.memoizedState=n.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=Vc.bind(null,Le,!0,a),a.dispatch=n,[t,n]},useMemoCache:Mc,useCacheRefresh:function(){return Xt().memoizedState=Yw.bind(null,Le)},useEffectEvent:function(t){var n=Xt(),a={impl:t};return n.memoizedState=a,function(){if((Qe&2)!==0)throw Error(l(440));return a.impl.apply(void 0,arguments)}}},Gc={readContext:Mt,use:Uo,useCallback:Mm,useContext:Mt,useEffect:Uc,useImperativeHandle:Om,useInsertionEffect:_m,useLayoutEffect:Lm,useMemo:zm,useReducer:Ho,useRef:Tm,useState:function(){return Ho(hr)},useDebugValue:Hc,useDeferredValue:function(t,n){var a=xt();return Fm(a,nt.memoizedState,t,n)},useTransition:function(){var t=Ho(hr)[0],n=xt().memoizedState;return[typeof t=="boolean"?t:fa(t),n]},useSyncExternalStore:dm,useId:Hm,useHostTransitionStatus:$c,useFormState:Cm,useActionState:Cm,useOptimistic:function(t,n){var a=xt();return ym(a,nt,t,n)},useMemoCache:Mc,useCacheRefresh:qm};Gc.useEffectEvent=Rm;var Ym={readContext:Mt,use:Uo,useCallback:Mm,useContext:Mt,useEffect:Uc,useImperativeHandle:Om,useInsertionEffect:_m,useLayoutEffect:Lm,useMemo:zm,useReducer:Fc,useRef:Tm,useState:function(){return Fc(hr)},useDebugValue:Hc,useDeferredValue:function(t,n){var a=xt();return nt===null?qc(a,t,n):Fm(a,nt.memoizedState,t,n)},useTransition:function(){var t=Fc(hr)[0],n=xt().memoizedState;return[typeof t=="boolean"?t:fa(t),n]},useSyncExternalStore:dm,useId:Hm,useHostTransitionStatus:$c,useFormState:Am,useActionState:Am,useOptimistic:function(t,n){var a=xt();return nt!==null?ym(a,nt,t,n):(a.baseState=t,[t,a.queue.dispatch])},useMemoCache:Mc,useCacheRefresh:qm};Ym.useEffectEvent=Rm;function Yc(t,n,a,s){n=t.memoizedState,a=a(s,n),a=a==null?n:g({},n,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var Xc={enqueueSetState:function(t,n,a){t=t._reactInternals;var s=xn(),d=Br(s);d.payload=n,a!=null&&(d.callback=a),n=Ur(t,d,s),n!==null&&(an(n,t,s),oa(n,t,s))},enqueueReplaceState:function(t,n,a){t=t._reactInternals;var s=xn(),d=Br(s);d.tag=1,d.payload=n,a!=null&&(d.callback=a),n=Ur(t,d,s),n!==null&&(an(n,t,s),oa(n,t,s))},enqueueForceUpdate:function(t,n){t=t._reactInternals;var a=xn(),s=Br(a);s.tag=2,n!=null&&(s.callback=n),n=Ur(t,s,a),n!==null&&(an(n,t,a),oa(n,t,a))}};function Xm(t,n,a,s,d,m,k){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(s,m,k):n.prototype&&n.prototype.isPureReactComponent?!Wl(a,s)||!Wl(d,m):!0}function Zm(t,n,a,s){t=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,s),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,s),n.state!==t&&Xc.enqueueReplaceState(n,n.state,null)}function Ti(t,n){var a=n;if("ref"in n){a={};for(var s in n)s!=="ref"&&(a[s]=n[s])}if(t=t.defaultProps){a===n&&(a=g({},a));for(var d in t)a[d]===void 0&&(a[d]=t[d])}return a}function Km(t){So(t)}function Qm(t){console.error(t)}function Jm(t){So(t)}function Vo(t,n){try{var a=t.onUncaughtError;a(n.value,{componentStack:n.stack})}catch(s){setTimeout(function(){throw s})}}function Wm(t,n,a){try{var s=t.onCaughtError;s(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Zc(t,n,a){return a=Br(a),a.tag=3,a.payload={element:null},a.callback=function(){Vo(t,n)},a}function eg(t){return t=Br(t),t.tag=3,t}function tg(t,n,a,s){var d=a.type.getDerivedStateFromError;if(typeof d=="function"){var m=s.value;t.payload=function(){return d(m)},t.callback=function(){Wm(n,a,s)}}var k=a.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(t.callback=function(){Wm(n,a,s),typeof d!="function"&&(Gr===null?Gr=new Set([this]):Gr.add(this));var L=s.stack;this.componentDidCatch(s.value,{componentStack:L!==null?L:""})})}function Zw(t,n,a,s,d){if(a.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(n=a.alternate,n!==null&&il(n,a,d,!0),a=mn.current,a!==null){switch(a.tag){case 31:case 13:return Dn===null?rs():a.alternate===null&>===0&&(gt=3),a.flags&=-257,a.flags|=65536,a.lanes=d,s===Lo?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([s]):n.add(s),wf(t,s,d)),!1;case 22:return a.flags|=65536,s===Lo?a.flags|=16384:(n=a.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([s])},a.updateQueue=n):(a=n.retryQueue,a===null?n.retryQueue=new Set([s]):a.add(s)),wf(t,s,d)),!1}throw Error(l(435,a.tag))}return wf(t,s,d),rs(),!1}if($e)return n=mn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=d,s!==pc&&(t=Error(l(422),{cause:s}),na(jn(t,a)))):(s!==pc&&(n=Error(l(423),{cause:s}),na(jn(n,a))),t=t.current.alternate,t.flags|=65536,d&=-d,t.lanes|=d,s=jn(s,a),d=Zc(t.stateNode,s,d),Cc(t,d),gt!==4&&(gt=2)),!1;var m=Error(l(520),{cause:s});if(m=jn(m,a),wa===null?wa=[m]:wa.push(m),gt!==4&&(gt=2),n===null)return!0;s=jn(s,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,t=d&-d,a.lanes|=t,t=Zc(a.stateNode,s,t),Cc(a,t),!1;case 1:if(n=a.type,m=a.stateNode,(a.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Gr===null||!Gr.has(m))))return a.flags|=65536,d&=-d,a.lanes|=d,d=eg(d),tg(d,t,a,s),Cc(a,d),!1}a=a.return}while(a!==null);return!1}var Kc=Error(l(461)),St=!1;function zt(t,n,a,s){n.child=t===null?lm(n,null,a,s):Ni(n,t.child,a,s)}function ng(t,n,a,s,d){a=a.render;var m=n.ref;if("ref"in s){var k={};for(var L in s)L!=="ref"&&(k[L]=s[L])}else k=s;return Si(n),s=_c(t,n,a,k,m,d),L=Lc(),t!==null&&!St?(Dc(t,n,d),pr(t,n,d)):($e&&L&&dc(n),n.flags|=1,zt(t,n,s,d),n.child)}function rg(t,n,a,s,d){if(t===null){var m=a.type;return typeof m=="function"&&!uc(m)&&m.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=m,ig(t,n,m,s,d)):(t=No(a.type,null,s,n,n.mode,d),t.ref=n.ref,t.return=n,n.child=t)}if(m=t.child,!lf(t,d)){var k=m.memoizedProps;if(a=a.compare,a=a!==null?a:Wl,a(k,s)&&t.ref===n.ref)return pr(t,n,d)}return n.flags|=1,t=sr(m,s),t.ref=n.ref,t.return=n,n.child=t}function ig(t,n,a,s,d){if(t!==null){var m=t.memoizedProps;if(Wl(m,s)&&t.ref===n.ref)if(St=!1,n.pendingProps=s=m,lf(t,d))(t.flags&131072)!==0&&(St=!0);else return n.lanes=t.lanes,pr(t,n,d)}return Qc(t,n,a,s,d)}function lg(t,n,a,s){var d=s.children,m=t!==null?t.memoizedState:null;if(t===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((n.flags&128)!==0){if(m=m!==null?m.baseLanes|a:a,t!==null){for(s=n.child=t.child,d=0;s!==null;)d=d|s.lanes|s.childLanes,s=s.sibling;s=d&~m}else s=0,n.child=null;return ag(t,n,m,a,s)}if((a&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&Ro(n,m!==null?m.cachePool:null),m!==null?sm(n,m):Ac(),um(n);else return s=n.lanes=536870912,ag(t,n,m!==null?m.baseLanes|a:a,a,s)}else m!==null?(Ro(n,m.cachePool),sm(n,m),qr(),n.memoizedState=null):(t!==null&&Ro(n,null),Ac(),qr());return zt(t,n,d,a),n.child}function pa(t,n){return t!==null&&t.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function ag(t,n,a,s,d){var m=wc();return m=m===null?null:{parent:vt._currentValue,pool:m},n.memoizedState={baseLanes:a,cachePool:m},t!==null&&Ro(n,null),Ac(),um(n),t!==null&&il(t,n,s,!0),n.childLanes=d,null}function Go(t,n){return n=Xo({mode:n.mode,children:n.children},t.mode),n.ref=t.ref,t.child=n,n.return=t,n}function og(t,n,a){return Ni(n,t.child,null,a),t=Go(n,n.pendingProps),t.flags|=2,gn(n),n.memoizedState=null,t}function Kw(t,n,a){var s=n.pendingProps,d=(n.flags&128)!==0;if(n.flags&=-129,t===null){if($e){if(s.mode==="hidden")return t=Go(n,s),n.lanes=536870912,pa(null,t);if(jc(n),(t=ft)?(t=xb(t,Ln),t=t!==null&&t.data==="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:Or!==null?{id:Gn,overflow:Yn}:null,retryLane:536870912,hydrationErrors:null},a=$p(t),a.return=n,n.child=a,Ot=n,ft=null)):t=null,t===null)throw zr(n);return n.lanes=536870912,null}return Go(n,s)}var m=t.memoizedState;if(m!==null){var k=m.dehydrated;if(jc(n),d)if(n.flags&256)n.flags&=-257,n=og(t,n,a);else if(n.memoizedState!==null)n.child=t.child,n.flags|=128,n=null;else throw Error(l(558));else if(St||il(t,n,a,!1),d=(a&t.childLanes)!==0,St||d){if(s=ot,s!==null&&(k=Wt(s,a),k!==0&&k!==m.retryLane))throw m.retryLane=k,yi(t,k),an(s,t,k),Kc;rs(),n=og(t,n,a)}else t=m.treeContext,ft=On(k.nextSibling),Ot=n,$e=!0,Mr=null,Ln=!1,t!==null&&Yp(n,t),n=Go(n,s),n.flags|=4096;return n}return t=sr(t.child,{mode:s.mode,children:s.children}),t.ref=n.ref,n.child=t,t.return=n,t}function Yo(t,n){var a=n.ref;if(a===null)t!==null&&t.ref!==null&&(n.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(l(284));(t===null||t.ref!==a)&&(n.flags|=4194816)}}function Qc(t,n,a,s,d){return Si(n),a=_c(t,n,a,s,void 0,d),s=Lc(),t!==null&&!St?(Dc(t,n,d),pr(t,n,d)):($e&&s&&dc(n),n.flags|=1,zt(t,n,a,d),n.child)}function sg(t,n,a,s,d,m){return Si(n),n.updateQueue=null,a=fm(n,s,a,d),cm(t),s=Lc(),t!==null&&!St?(Dc(t,n,m),pr(t,n,m)):($e&&s&&dc(n),n.flags|=1,zt(t,n,a,m),n.child)}function ug(t,n,a,s,d){if(Si(n),n.stateNode===null){var m=el,k=a.contextType;typeof k=="object"&&k!==null&&(m=Mt(k)),m=new a(s,m),n.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Xc,n.stateNode=m,m._reactInternals=n,m=n.stateNode,m.props=s,m.state=n.memoizedState,m.refs={},kc(n),k=a.contextType,m.context=typeof k=="object"&&k!==null?Mt(k):el,m.state=n.memoizedState,k=a.getDerivedStateFromProps,typeof k=="function"&&(Yc(n,a,k,s),m.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(k=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),k!==m.state&&Xc.enqueueReplaceState(m,m.state,null),ua(n,s,m,d),sa(),m.state=n.memoizedState),typeof m.componentDidMount=="function"&&(n.flags|=4194308),s=!0}else if(t===null){m=n.stateNode;var L=n.memoizedProps,G=Ti(a,L);m.props=G;var ne=m.context,ae=a.contextType;k=el,typeof ae=="object"&&ae!==null&&(k=Mt(ae));var fe=a.getDerivedStateFromProps;ae=typeof fe=="function"||typeof m.getSnapshotBeforeUpdate=="function",L=n.pendingProps!==L,ae||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(L||ne!==k)&&Zm(n,m,s,k),Ir=!1;var re=n.memoizedState;m.state=re,ua(n,s,m,d),sa(),ne=n.memoizedState,L||re!==ne||Ir?(typeof fe=="function"&&(Yc(n,a,fe,s),ne=n.memoizedState),(G=Ir||Xm(n,a,G,s,re,ne,k))?(ae||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(n.flags|=4194308)):(typeof m.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=s,n.memoizedState=ne),m.props=s,m.state=ne,m.context=k,s=G):(typeof m.componentDidMount=="function"&&(n.flags|=4194308),s=!1)}else{m=n.stateNode,Ec(t,n),k=n.memoizedProps,ae=Ti(a,k),m.props=ae,fe=n.pendingProps,re=m.context,ne=a.contextType,G=el,typeof ne=="object"&&ne!==null&&(G=Mt(ne)),L=a.getDerivedStateFromProps,(ne=typeof L=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(k!==fe||re!==G)&&Zm(n,m,s,G),Ir=!1,re=n.memoizedState,m.state=re,ua(n,s,m,d),sa();var ie=n.memoizedState;k!==fe||re!==ie||Ir||t!==null&&t.dependencies!==null&&To(t.dependencies)?(typeof L=="function"&&(Yc(n,a,L,s),ie=n.memoizedState),(ae=Ir||Xm(n,a,ae,s,re,ie,G)||t!==null&&t.dependencies!==null&&To(t.dependencies))?(ne||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(s,ie,G),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(s,ie,G)),typeof m.componentDidUpdate=="function"&&(n.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof m.componentDidUpdate!="function"||k===t.memoizedProps&&re===t.memoizedState||(n.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||k===t.memoizedProps&&re===t.memoizedState||(n.flags|=1024),n.memoizedProps=s,n.memoizedState=ie),m.props=s,m.state=ie,m.context=G,s=ae):(typeof m.componentDidUpdate!="function"||k===t.memoizedProps&&re===t.memoizedState||(n.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||k===t.memoizedProps&&re===t.memoizedState||(n.flags|=1024),s=!1)}return m=s,Yo(t,n),s=(n.flags&128)!==0,m||s?(m=n.stateNode,a=s&&typeof a.getDerivedStateFromError!="function"?null:m.render(),n.flags|=1,t!==null&&s?(n.child=Ni(n,t.child,null,d),n.child=Ni(n,null,a,d)):zt(t,n,a,d),n.memoizedState=m.state,t=n.child):t=pr(t,n,d),t}function cg(t,n,a,s){return vi(),n.flags|=256,zt(t,n,a,s),n.child}var Jc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Wc(t){return{baseLanes:t,cachePool:Wp()}}function ef(t,n,a){return t=t!==null?t.childLanes&~a:0,n&&(t|=yn),t}function fg(t,n,a){var s=n.pendingProps,d=!1,m=(n.flags&128)!==0,k;if((k=m)||(k=t!==null&&t.memoizedState===null?!1:(yt.current&2)!==0),k&&(d=!0,n.flags&=-129),k=(n.flags&32)!==0,n.flags&=-33,t===null){if($e){if(d?Hr(n):qr(),(t=ft)?(t=xb(t,Ln),t=t!==null&&t.data!=="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:Or!==null?{id:Gn,overflow:Yn}:null,retryLane:536870912,hydrationErrors:null},a=$p(t),a.return=n,n.child=a,Ot=n,ft=null)):t=null,t===null)throw zr(n);return Ff(t)?n.lanes=32:n.lanes=536870912,null}var L=s.children;return s=s.fallback,d?(qr(),d=n.mode,L=Xo({mode:"hidden",children:L},d),s=xi(s,d,a,null),L.return=n,s.return=n,L.sibling=s,n.child=L,s=n.child,s.memoizedState=Wc(a),s.childLanes=ef(t,k,a),n.memoizedState=Jc,pa(null,s)):(Hr(n),tf(n,L))}var G=t.memoizedState;if(G!==null&&(L=G.dehydrated,L!==null)){if(m)n.flags&256?(Hr(n),n.flags&=-257,n=nf(t,n,a)):n.memoizedState!==null?(qr(),n.child=t.child,n.flags|=128,n=null):(qr(),L=s.fallback,d=n.mode,s=Xo({mode:"visible",children:s.children},d),L=xi(L,d,a,null),L.flags|=2,s.return=n,L.return=n,s.sibling=L,n.child=s,Ni(n,t.child,null,a),s=n.child,s.memoizedState=Wc(a),s.childLanes=ef(t,k,a),n.memoizedState=Jc,n=pa(null,s));else if(Hr(n),Ff(L)){if(k=L.nextSibling&&L.nextSibling.dataset,k)var ne=k.dgst;k=ne,s=Error(l(419)),s.stack="",s.digest=k,na({value:s,source:null,stack:null}),n=nf(t,n,a)}else if(St||il(t,n,a,!1),k=(a&t.childLanes)!==0,St||k){if(k=ot,k!==null&&(s=Wt(k,a),s!==0&&s!==G.retryLane))throw G.retryLane=s,yi(t,s),an(k,t,s),Kc;zf(L)||rs(),n=nf(t,n,a)}else zf(L)?(n.flags|=192,n.child=t.child,n=null):(t=G.treeContext,ft=On(L.nextSibling),Ot=n,$e=!0,Mr=null,Ln=!1,t!==null&&Yp(n,t),n=tf(n,s.children),n.flags|=4096);return n}return d?(qr(),L=s.fallback,d=n.mode,G=t.child,ne=G.sibling,s=sr(G,{mode:"hidden",children:s.children}),s.subtreeFlags=G.subtreeFlags&65011712,ne!==null?L=sr(ne,L):(L=xi(L,d,a,null),L.flags|=2),L.return=n,s.return=n,s.sibling=L,n.child=s,pa(null,s),s=n.child,L=t.child.memoizedState,L===null?L=Wc(a):(d=L.cachePool,d!==null?(G=vt._currentValue,d=d.parent!==G?{parent:G,pool:G}:d):d=Wp(),L={baseLanes:L.baseLanes|a,cachePool:d}),s.memoizedState=L,s.childLanes=ef(t,k,a),n.memoizedState=Jc,pa(t.child,s)):(Hr(n),a=t.child,t=a.sibling,a=sr(a,{mode:"visible",children:s.children}),a.return=n,a.sibling=null,t!==null&&(k=n.deletions,k===null?(n.deletions=[t],n.flags|=16):k.push(t)),n.child=a,n.memoizedState=null,a)}function tf(t,n){return n=Xo({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function Xo(t,n){return t=pn(22,t,null,n),t.lanes=0,t}function nf(t,n,a){return Ni(n,t.child,null,a),t=tf(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function dg(t,n,a){t.lanes|=n;var s=t.alternate;s!==null&&(s.lanes|=n),bc(t.return,n,a)}function rf(t,n,a,s,d,m){var k=t.memoizedState;k===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:s,tail:a,tailMode:d,treeForkCount:m}:(k.isBackwards=n,k.rendering=null,k.renderingStartTime=0,k.last=s,k.tail=a,k.tailMode=d,k.treeForkCount=m)}function hg(t,n,a){var s=n.pendingProps,d=s.revealOrder,m=s.tail;s=s.children;var k=yt.current,L=(k&2)!==0;if(L?(k=k&1|2,n.flags|=128):k&=1,T(yt,k),zt(t,n,s,a),s=$e?ta:0,!L&&t!==null&&(t.flags&128)!==0)e:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&dg(t,a,n);else if(t.tag===19)dg(t,a,n);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)break e;for(;t.sibling===null;){if(t.return===null||t.return===n)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(d){case"forwards":for(a=n.child,d=null;a!==null;)t=a.alternate,t!==null&&zo(t)===null&&(d=a),a=a.sibling;a=d,a===null?(d=n.child,n.child=null):(d=a.sibling,a.sibling=null),rf(n,!1,d,a,m,s);break;case"backwards":case"unstable_legacy-backwards":for(a=null,d=n.child,n.child=null;d!==null;){if(t=d.alternate,t!==null&&zo(t)===null){n.child=d;break}t=d.sibling,d.sibling=a,a=d,d=t}rf(n,!0,a,null,m,s);break;case"together":rf(n,!1,null,null,void 0,s);break;default:n.memoizedState=null}return n.child}function pr(t,n,a){if(t!==null&&(n.dependencies=t.dependencies),Vr|=n.lanes,(a&n.childLanes)===0)if(t!==null){if(il(t,n,a,!1),(a&n.childLanes)===0)return null}else return null;if(t!==null&&n.child!==t.child)throw Error(l(153));if(n.child!==null){for(t=n.child,a=sr(t,t.pendingProps),n.child=a,a.return=n;t.sibling!==null;)t=t.sibling,a=a.sibling=sr(t,t.pendingProps),a.return=n;a.sibling=null}return n.child}function lf(t,n){return(t.lanes&n)!==0?!0:(t=t.dependencies,!!(t!==null&&To(t)))}function Qw(t,n,a){switch(n.tag){case 3:xe(n,n.stateNode.containerInfo),Fr(n,vt,t.memoizedState.cache),vi();break;case 27:case 5:ve(n);break;case 4:xe(n,n.stateNode.containerInfo);break;case 10:Fr(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,jc(n),null;break;case 13:var s=n.memoizedState;if(s!==null)return s.dehydrated!==null?(Hr(n),n.flags|=128,null):(a&n.child.childLanes)!==0?fg(t,n,a):(Hr(n),t=pr(t,n,a),t!==null?t.sibling:null);Hr(n);break;case 19:var d=(t.flags&128)!==0;if(s=(a&n.childLanes)!==0,s||(il(t,n,a,!1),s=(a&n.childLanes)!==0),d){if(s)return hg(t,n,a);n.flags|=128}if(d=n.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),T(yt,yt.current),s)break;return null;case 22:return n.lanes=0,lg(t,n,a,n.pendingProps);case 24:Fr(n,vt,t.memoizedState.cache)}return pr(t,n,a)}function pg(t,n,a){if(t!==null)if(t.memoizedProps!==n.pendingProps)St=!0;else{if(!lf(t,a)&&(n.flags&128)===0)return St=!1,Qw(t,n,a);St=(t.flags&131072)!==0}else St=!1,$e&&(n.flags&1048576)!==0&&Gp(n,ta,n.index);switch(n.lanes=0,n.tag){case 16:e:{var s=n.pendingProps;if(t=Ei(n.elementType),n.type=t,typeof t=="function")uc(t)?(s=Ti(t,s),n.tag=1,n=ug(null,n,t,s,a)):(n.tag=0,n=Qc(null,n,t,s,a));else{if(t!=null){var d=t.$$typeof;if(d===O){n.tag=11,n=ng(null,n,t,s,a);break e}else if(d===F){n.tag=14,n=rg(null,n,t,s,a);break e}}throw n=I(t)||t,Error(l(306,n,""))}}return n;case 0:return Qc(t,n,n.type,n.pendingProps,a);case 1:return s=n.type,d=Ti(s,n.pendingProps),ug(t,n,s,d,a);case 3:e:{if(xe(n,n.stateNode.containerInfo),t===null)throw Error(l(387));s=n.pendingProps;var m=n.memoizedState;d=m.element,Ec(t,n),ua(n,s,null,a);var k=n.memoizedState;if(s=k.cache,Fr(n,vt,s),s!==m.cache&&yc(n,[vt],a,!0),sa(),s=k.element,m.isDehydrated)if(m={element:s,isDehydrated:!1,cache:k.cache},n.updateQueue.baseState=m,n.memoizedState=m,n.flags&256){n=cg(t,n,s,a);break e}else if(s!==d){d=jn(Error(l(424)),n),na(d),n=cg(t,n,s,a);break e}else for(t=n.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,ft=On(t.firstChild),Ot=n,$e=!0,Mr=null,Ln=!0,a=lm(n,null,s,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(vi(),s===d){n=pr(t,n,a);break e}zt(t,n,s,a)}n=n.child}return n;case 26:return Yo(t,n),t===null?(a=Cb(n.type,null,n.pendingProps,null))?n.memoizedState=a:$e||(a=n.type,t=n.pendingProps,s=cs(ce.current).createElement(a),s[Ct]=n,s[Ht]=t,Ft(s,a,t),be(s),n.stateNode=s):n.memoizedState=Cb(n.type,t.memoizedProps,n.pendingProps,t.memoizedState),null;case 27:return ve(n),t===null&&$e&&(s=n.stateNode=Sb(n.type,n.pendingProps,ce.current),Ot=n,Ln=!0,d=ft,Kr(n.type)?(If=d,ft=On(s.firstChild)):ft=d),zt(t,n,n.pendingProps.children,a),Yo(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&$e&&((d=s=ft)&&(s=AS(s,n.type,n.pendingProps,Ln),s!==null?(n.stateNode=s,Ot=n,ft=On(s.firstChild),Ln=!1,d=!0):d=!1),d||zr(n)),ve(n),d=n.type,m=n.pendingProps,k=t!==null?t.memoizedProps:null,s=m.children,Df(d,m)?s=null:k!==null&&Df(d,k)&&(n.flags|=32),n.memoizedState!==null&&(d=_c(t,n,qw,null,null,a),ja._currentValue=d),Yo(t,n),zt(t,n,s,a),n.child;case 6:return t===null&&$e&&((t=a=ft)&&(a=TS(a,n.pendingProps,Ln),a!==null?(n.stateNode=a,Ot=n,ft=null,t=!0):t=!1),t||zr(n)),null;case 13:return fg(t,n,a);case 4:return xe(n,n.stateNode.containerInfo),s=n.pendingProps,t===null?n.child=Ni(n,null,s,a):zt(t,n,s,a),n.child;case 11:return ng(t,n,n.type,n.pendingProps,a);case 7:return zt(t,n,n.pendingProps,a),n.child;case 8:return zt(t,n,n.pendingProps.children,a),n.child;case 12:return zt(t,n,n.pendingProps.children,a),n.child;case 10:return s=n.pendingProps,Fr(n,n.type,s.value),zt(t,n,s.children,a),n.child;case 9:return d=n.type._context,s=n.pendingProps.children,Si(n),d=Mt(d),s=s(d),n.flags|=1,zt(t,n,s,a),n.child;case 14:return rg(t,n,n.type,n.pendingProps,a);case 15:return ig(t,n,n.type,n.pendingProps,a);case 19:return hg(t,n,a);case 31:return Kw(t,n,a);case 22:return lg(t,n,a,n.pendingProps);case 24:return Si(n),s=Mt(vt),t===null?(d=wc(),d===null&&(d=ot,m=xc(),d.pooledCache=m,m.refCount++,m!==null&&(d.pooledCacheLanes|=a),d=m),n.memoizedState={parent:s,cache:d},kc(n),Fr(n,vt,d)):((t.lanes&a)!==0&&(Ec(t,n),ua(n,null,null,a),sa()),d=t.memoizedState,m=n.memoizedState,d.parent!==s?(d={parent:s,cache:s},n.memoizedState=d,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=d),Fr(n,vt,s)):(s=m.cache,Fr(n,vt,s),s!==d.cache&&yc(n,[vt],a,!0))),zt(t,n,n.pendingProps.children,a),n.child;case 29:throw n.pendingProps}throw Error(l(156,n.tag))}function mr(t){t.flags|=4}function af(t,n,a,s,d){if((n=(t.mode&32)!==0)&&(n=!1),n){if(t.flags|=16777216,(d&335544128)===d)if(t.stateNode.complete)t.flags|=8192;else if(Hg())t.flags|=8192;else throw Ci=Lo,Sc}else t.flags&=-16777217}function mg(t,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Rb(n))if(Hg())t.flags|=8192;else throw Ci=Lo,Sc}function Zo(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?so():536870912,t.lanes|=n,gl|=n)}function ma(t,n){if(!$e)switch(t.tailMode){case"hidden":n=t.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?n||t.tail===null?t.tail=null:t.tail.sibling=null:s.sibling=null}}function dt(t){var n=t.alternate!==null&&t.alternate.child===t.child,a=0,s=0;if(n)for(var d=t.child;d!==null;)a|=d.lanes|d.childLanes,s|=d.subtreeFlags&65011712,s|=d.flags&65011712,d.return=t,d=d.sibling;else for(d=t.child;d!==null;)a|=d.lanes|d.childLanes,s|=d.subtreeFlags,s|=d.flags,d.return=t,d=d.sibling;return t.subtreeFlags|=s,t.childLanes=a,n}function Jw(t,n,a){var s=n.pendingProps;switch(hc(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(n),null;case 1:return dt(n),null;case 3:return a=n.stateNode,s=null,t!==null&&(s=t.memoizedState.cache),n.memoizedState.cache!==s&&(n.flags|=2048),fr(vt),ge(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(rl(n)?mr(n):t===null||t.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,mc())),dt(n),null;case 26:var d=n.type,m=n.memoizedState;return t===null?(mr(n),m!==null?(dt(n),mg(n,m)):(dt(n),af(n,d,null,s,a))):m?m!==t.memoizedState?(mr(n),dt(n),mg(n,m)):(dt(n),n.flags&=-16777217):(t=t.memoizedProps,t!==s&&mr(n),dt(n),af(n,d,t,s,a)),null;case 27:if(Ee(n),a=ce.current,d=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==s&&mr(n);else{if(!s){if(n.stateNode===null)throw Error(l(166));return dt(n),null}t=W.current,rl(n)?Xp(n):(t=Sb(d,s,a),n.stateNode=t,mr(n))}return dt(n),null;case 5:if(Ee(n),d=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==s&&mr(n);else{if(!s){if(n.stateNode===null)throw Error(l(166));return dt(n),null}if(m=W.current,rl(n))Xp(n);else{var k=cs(ce.current);switch(m){case 1:m=k.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:m=k.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":m=k.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":m=k.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":m=k.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof s.is=="string"?k.createElement("select",{is:s.is}):k.createElement("select"),s.multiple?m.multiple=!0:s.size&&(m.size=s.size);break;default:m=typeof s.is=="string"?k.createElement(d,{is:s.is}):k.createElement(d)}}m[Ct]=n,m[Ht]=s;e:for(k=n.child;k!==null;){if(k.tag===5||k.tag===6)m.appendChild(k.stateNode);else if(k.tag!==4&&k.tag!==27&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===n)break e;for(;k.sibling===null;){if(k.return===null||k.return===n)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}n.stateNode=m;e:switch(Ft(m,d,s),d){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&mr(n)}}return dt(n),af(n,n.type,t===null?null:t.memoizedProps,n.pendingProps,a),null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==s&&mr(n);else{if(typeof s!="string"&&n.stateNode===null)throw Error(l(166));if(t=ce.current,rl(n)){if(t=n.stateNode,a=n.memoizedProps,s=null,d=Ot,d!==null)switch(d.tag){case 27:case 5:s=d.memoizedProps}t[Ct]=n,t=!!(t.nodeValue===a||s!==null&&s.suppressHydrationWarning===!0||fb(t.nodeValue,a)),t||zr(n,!0)}else t=cs(t).createTextNode(s),t[Ct]=n,n.stateNode=t}return dt(n),null;case 31:if(a=n.memoizedState,t===null||t.memoizedState!==null){if(s=rl(n),a!==null){if(t===null){if(!s)throw Error(l(318));if(t=n.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(557));t[Ct]=n}else vi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;dt(n),t=!1}else a=mc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),t=!0;if(!t)return n.flags&256?(gn(n),n):(gn(n),null);if((n.flags&128)!==0)throw Error(l(558))}return dt(n),null;case 13:if(s=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(d=rl(n),s!==null&&s.dehydrated!==null){if(t===null){if(!d)throw Error(l(318));if(d=n.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(l(317));d[Ct]=n}else vi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;dt(n),d=!1}else d=mc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=d),d=!0;if(!d)return n.flags&256?(gn(n),n):(gn(n),null)}return gn(n),(n.flags&128)!==0?(n.lanes=a,n):(a=s!==null,t=t!==null&&t.memoizedState!==null,a&&(s=n.child,d=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(d=s.alternate.memoizedState.cachePool.pool),m=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(m=s.memoizedState.cachePool.pool),m!==d&&(s.flags|=2048)),a!==t&&a&&(n.child.flags|=8192),Zo(n,n.updateQueue),dt(n),null);case 4:return ge(),t===null&&Tf(n.stateNode.containerInfo),dt(n),null;case 10:return fr(n.type),dt(n),null;case 19:if(P(yt),s=n.memoizedState,s===null)return dt(n),null;if(d=(n.flags&128)!==0,m=s.rendering,m===null)if(d)ma(s,!1);else{if(gt!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(m=zo(t),m!==null){for(n.flags|=128,ma(s,!1),t=m.updateQueue,n.updateQueue=t,Zo(n,t),n.subtreeFlags=0,t=a,a=n.child;a!==null;)Pp(a,t),a=a.sibling;return T(yt,yt.current&1|2),$e&&ur(n,s.treeForkCount),n.child}t=t.sibling}s.tail!==null&&Fe()>es&&(n.flags|=128,d=!0,ma(s,!1),n.lanes=4194304)}else{if(!d)if(t=zo(m),t!==null){if(n.flags|=128,d=!0,t=t.updateQueue,n.updateQueue=t,Zo(n,t),ma(s,!0),s.tail===null&&s.tailMode==="hidden"&&!m.alternate&&!$e)return dt(n),null}else 2*Fe()-s.renderingStartTime>es&&a!==536870912&&(n.flags|=128,d=!0,ma(s,!1),n.lanes=4194304);s.isBackwards?(m.sibling=n.child,n.child=m):(t=s.last,t!==null?t.sibling=m:n.child=m,s.last=m)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Fe(),t.sibling=null,a=yt.current,T(yt,d?a&1|2:a&1),$e&&ur(n,s.treeForkCount),t):(dt(n),null);case 22:case 23:return gn(n),Tc(),s=n.memoizedState!==null,t!==null?t.memoizedState!==null!==s&&(n.flags|=8192):s&&(n.flags|=8192),s?(a&536870912)!==0&&(n.flags&128)===0&&(dt(n),n.subtreeFlags&6&&(n.flags|=8192)):dt(n),a=n.updateQueue,a!==null&&Zo(n,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),s=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),s!==a&&(n.flags|=2048),t!==null&&P(ki),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),fr(vt),dt(n),null;case 25:return null;case 30:return null}throw Error(l(156,n.tag))}function Ww(t,n){switch(hc(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return fr(vt),ge(),t=n.flags,(t&65536)!==0&&(t&128)===0?(n.flags=t&-65537|128,n):null;case 26:case 27:case 5:return Ee(n),null;case 31:if(n.memoizedState!==null){if(gn(n),n.alternate===null)throw Error(l(340));vi()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 13:if(gn(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(l(340));vi()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return P(yt),null;case 4:return ge(),null;case 10:return fr(n.type),null;case 22:case 23:return gn(n),Tc(),t!==null&&P(ki),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 24:return fr(vt),null;case 25:return null;default:return null}}function gg(t,n){switch(hc(n),n.tag){case 3:fr(vt),ge();break;case 26:case 27:case 5:Ee(n);break;case 4:ge();break;case 31:n.memoizedState!==null&&gn(n);break;case 13:gn(n);break;case 19:P(yt);break;case 10:fr(n.type);break;case 22:case 23:gn(n),Tc(),t!==null&&P(ki);break;case 24:fr(vt)}}function ga(t,n){try{var a=n.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var d=s.next;a=d;do{if((a.tag&t)===t){s=void 0;var m=a.create,k=a.inst;s=m(),k.destroy=s}a=a.next}while(a!==d)}}catch(L){tt(n,n.return,L)}}function Pr(t,n,a){try{var s=n.updateQueue,d=s!==null?s.lastEffect:null;if(d!==null){var m=d.next;s=m;do{if((s.tag&t)===t){var k=s.inst,L=k.destroy;if(L!==void 0){k.destroy=void 0,d=n;var G=a,ne=L;try{ne()}catch(ae){tt(d,G,ae)}}}s=s.next}while(s!==m)}}catch(ae){tt(n,n.return,ae)}}function bg(t){var n=t.updateQueue;if(n!==null){var a=t.stateNode;try{om(n,a)}catch(s){tt(t,t.return,s)}}}function yg(t,n,a){a.props=Ti(t.type,t.memoizedProps),a.state=t.memoizedState;try{a.componentWillUnmount()}catch(s){tt(t,n,s)}}function ba(t,n){try{var a=t.ref;if(a!==null){switch(t.tag){case 26:case 27:case 5:var s=t.stateNode;break;case 30:s=t.stateNode;break;default:s=t.stateNode}typeof a=="function"?t.refCleanup=a(s):a.current=s}}catch(d){tt(t,n,d)}}function Xn(t,n){var a=t.ref,s=t.refCleanup;if(a!==null)if(typeof s=="function")try{s()}catch(d){tt(t,n,d)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(d){tt(t,n,d)}else a.current=null}function xg(t){var n=t.type,a=t.memoizedProps,s=t.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&s.focus();break e;case"img":a.src?s.src=a.src:a.srcSet&&(s.srcset=a.srcSet)}}catch(d){tt(t,t.return,d)}}function of(t,n,a){try{var s=t.stateNode;wS(s,t.type,a,n),s[Ht]=n}catch(d){tt(t,t.return,d)}}function vg(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Kr(t.type)||t.tag===4}function sf(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||vg(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Kr(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function uf(t,n,a){var s=t.tag;if(s===5||s===6)t=t.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(t,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(t),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=ar));else if(s!==4&&(s===27&&Kr(t.type)&&(a=t.stateNode,n=null),t=t.child,t!==null))for(uf(t,n,a),t=t.sibling;t!==null;)uf(t,n,a),t=t.sibling}function Ko(t,n,a){var s=t.tag;if(s===5||s===6)t=t.stateNode,n?a.insertBefore(t,n):a.appendChild(t);else if(s!==4&&(s===27&&Kr(t.type)&&(a=t.stateNode),t=t.child,t!==null))for(Ko(t,n,a),t=t.sibling;t!==null;)Ko(t,n,a),t=t.sibling}function wg(t){var n=t.stateNode,a=t.memoizedProps;try{for(var s=t.type,d=n.attributes;d.length;)n.removeAttributeNode(d[0]);Ft(n,s,a),n[Ct]=t,n[Ht]=a}catch(m){tt(t,t.return,m)}}var gr=!1,kt=!1,cf=!1,Sg=typeof WeakSet=="function"?WeakSet:Set,jt=null;function eS(t,n){if(t=t.containerInfo,_f=bs,t=Op(t),nc(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else e:{a=(a=t.ownerDocument)&&a.defaultView||window;var s=a.getSelection&&a.getSelection();if(s&&s.rangeCount!==0){a=s.anchorNode;var d=s.anchorOffset,m=s.focusNode;s=s.focusOffset;try{a.nodeType,m.nodeType}catch{a=null;break e}var k=0,L=-1,G=-1,ne=0,ae=0,fe=t,re=null;t:for(;;){for(var ie;fe!==a||d!==0&&fe.nodeType!==3||(L=k+d),fe!==m||s!==0&&fe.nodeType!==3||(G=k+s),fe.nodeType===3&&(k+=fe.nodeValue.length),(ie=fe.firstChild)!==null;)re=fe,fe=ie;for(;;){if(fe===t)break t;if(re===a&&++ne===d&&(L=k),re===m&&++ae===s&&(G=k),(ie=fe.nextSibling)!==null)break;fe=re,re=fe.parentNode}fe=ie}a=L===-1||G===-1?null:{start:L,end:G}}else a=null}a=a||{start:0,end:0}}else a=null;for(Lf={focusedElem:t,selectionRange:a},bs=!1,jt=n;jt!==null;)if(n=jt,t=n.child,(n.subtreeFlags&1028)!==0&&t!==null)t.return=n,jt=t;else for(;jt!==null;){switch(n=jt,m=n.alternate,t=n.flags,n.tag){case 0:if((t&4)!==0&&(t=n.updateQueue,t=t!==null?t.events:null,t!==null))for(a=0;a<t.length;a++)d=t[a],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&m!==null){t=void 0,a=n,d=m.memoizedProps,m=m.memoizedState,s=a.stateNode;try{var Se=Ti(a.type,d);t=s.getSnapshotBeforeUpdate(Se,m),s.__reactInternalSnapshotBeforeUpdate=t}catch(Ae){tt(a,a.return,Ae)}}break;case 3:if((t&1024)!==0){if(t=n.stateNode.containerInfo,a=t.nodeType,a===9)Mf(t);else if(a===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Mf(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(l(163))}if(t=n.sibling,t!==null){t.return=n.return,jt=t;break}jt=n.return}}function kg(t,n,a){var s=a.flags;switch(a.tag){case 0:case 11:case 15:yr(t,a),s&4&&ga(5,a);break;case 1:if(yr(t,a),s&4)if(t=a.stateNode,n===null)try{t.componentDidMount()}catch(k){tt(a,a.return,k)}else{var d=Ti(a.type,n.memoizedProps);n=n.memoizedState;try{t.componentDidUpdate(d,n,t.__reactInternalSnapshotBeforeUpdate)}catch(k){tt(a,a.return,k)}}s&64&&bg(a),s&512&&ba(a,a.return);break;case 3:if(yr(t,a),s&64&&(t=a.updateQueue,t!==null)){if(n=null,a.child!==null)switch(a.child.tag){case 27:case 5:n=a.child.stateNode;break;case 1:n=a.child.stateNode}try{om(t,n)}catch(k){tt(a,a.return,k)}}break;case 27:n===null&&s&4&&wg(a);case 26:case 5:yr(t,a),n===null&&s&4&&xg(a),s&512&&ba(a,a.return);break;case 12:yr(t,a);break;case 31:yr(t,a),s&4&&Ng(t,a);break;case 13:yr(t,a),s&4&&Ag(t,a),s&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=uS.bind(null,a),jS(t,a))));break;case 22:if(s=a.memoizedState!==null||gr,!s){n=n!==null&&n.memoizedState!==null||kt,d=gr;var m=kt;gr=s,(kt=n)&&!m?xr(t,a,(a.subtreeFlags&8772)!==0):yr(t,a),gr=d,kt=m}break;case 30:break;default:yr(t,a)}}function Eg(t){var n=t.alternate;n!==null&&(t.alternate=null,Eg(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&Vl(n)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var ht=null,tn=!1;function br(t,n,a){for(a=a.child;a!==null;)Cg(t,n,a),a=a.sibling}function Cg(t,n,a){if(bt&&typeof bt.onCommitFiberUnmount=="function")try{bt.onCommitFiberUnmount(Lt,a)}catch{}switch(a.tag){case 26:kt||Xn(a,n),br(t,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:kt||Xn(a,n);var s=ht,d=tn;Kr(a.type)&&(ht=a.stateNode,tn=!1),br(t,n,a),Na(a.stateNode),ht=s,tn=d;break;case 5:kt||Xn(a,n);case 6:if(s=ht,d=tn,ht=null,br(t,n,a),ht=s,tn=d,ht!==null)if(tn)try{(ht.nodeType===9?ht.body:ht.nodeName==="HTML"?ht.ownerDocument.body:ht).removeChild(a.stateNode)}catch(m){tt(a,n,m)}else try{ht.removeChild(a.stateNode)}catch(m){tt(a,n,m)}break;case 18:ht!==null&&(tn?(t=ht,bb(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),El(t)):bb(ht,a.stateNode));break;case 4:s=ht,d=tn,ht=a.stateNode.containerInfo,tn=!0,br(t,n,a),ht=s,tn=d;break;case 0:case 11:case 14:case 15:Pr(2,a,n),kt||Pr(4,a,n),br(t,n,a);break;case 1:kt||(Xn(a,n),s=a.stateNode,typeof s.componentWillUnmount=="function"&&yg(a,n,s)),br(t,n,a);break;case 21:br(t,n,a);break;case 22:kt=(s=kt)||a.memoizedState!==null,br(t,n,a),kt=s;break;default:br(t,n,a)}}function Ng(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{El(t)}catch(a){tt(n,n.return,a)}}}function Ag(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{El(t)}catch(a){tt(n,n.return,a)}}function tS(t){switch(t.tag){case 31:case 13:case 19:var n=t.stateNode;return n===null&&(n=t.stateNode=new Sg),n;case 22:return t=t.stateNode,n=t._retryCache,n===null&&(n=t._retryCache=new Sg),n;default:throw Error(l(435,t.tag))}}function Qo(t,n){var a=tS(t);n.forEach(function(s){if(!a.has(s)){a.add(s);var d=cS.bind(null,t,s);s.then(d,d)}})}function nn(t,n){var a=n.deletions;if(a!==null)for(var s=0;s<a.length;s++){var d=a[s],m=t,k=n,L=k;e:for(;L!==null;){switch(L.tag){case 27:if(Kr(L.type)){ht=L.stateNode,tn=!1;break e}break;case 5:ht=L.stateNode,tn=!1;break e;case 3:case 4:ht=L.stateNode.containerInfo,tn=!0;break e}L=L.return}if(ht===null)throw Error(l(160));Cg(m,k,d),ht=null,tn=!1,m=d.alternate,m!==null&&(m.return=null),d.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Tg(n,t),n=n.sibling}var Un=null;function Tg(t,n){var a=t.alternate,s=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:nn(n,t),rn(t),s&4&&(Pr(3,t,t.return),ga(3,t),Pr(5,t,t.return));break;case 1:nn(n,t),rn(t),s&512&&(kt||a===null||Xn(a,a.return)),s&64&&gr&&(t=t.updateQueue,t!==null&&(s=t.callbacks,s!==null&&(a=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=a===null?s:a.concat(s))));break;case 26:var d=Un;if(nn(n,t),rn(t),s&512&&(kt||a===null||Xn(a,a.return)),s&4){var m=a!==null?a.memoizedState:null;if(s=t.memoizedState,a===null)if(s===null)if(t.stateNode===null){e:{s=t.type,a=t.memoizedProps,d=d.ownerDocument||d;t:switch(s){case"title":m=d.getElementsByTagName("title")[0],(!m||m[hi]||m[Ct]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=d.createElement(s),d.head.insertBefore(m,d.querySelector("head > title"))),Ft(m,s,a),m[Ct]=t,be(m),s=m;break e;case"link":var k=Tb("link","href",d).get(s+(a.href||""));if(k){for(var L=0;L<k.length;L++)if(m=k[L],m.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&m.getAttribute("rel")===(a.rel==null?null:a.rel)&&m.getAttribute("title")===(a.title==null?null:a.title)&&m.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){k.splice(L,1);break t}}m=d.createElement(s),Ft(m,s,a),d.head.appendChild(m);break;case"meta":if(k=Tb("meta","content",d).get(s+(a.content||""))){for(L=0;L<k.length;L++)if(m=k[L],m.getAttribute("content")===(a.content==null?null:""+a.content)&&m.getAttribute("name")===(a.name==null?null:a.name)&&m.getAttribute("property")===(a.property==null?null:a.property)&&m.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&m.getAttribute("charset")===(a.charSet==null?null:a.charSet)){k.splice(L,1);break t}}m=d.createElement(s),Ft(m,s,a),d.head.appendChild(m);break;default:throw Error(l(468,s))}m[Ct]=t,be(m),s=m}t.stateNode=s}else jb(d,t.type,t.stateNode);else t.stateNode=Ab(d,s,t.memoizedProps);else m!==s?(m===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):m.count--,s===null?jb(d,t.type,t.stateNode):Ab(d,s,t.memoizedProps)):s===null&&t.stateNode!==null&&of(t,t.memoizedProps,a.memoizedProps)}break;case 27:nn(n,t),rn(t),s&512&&(kt||a===null||Xn(a,a.return)),a!==null&&s&4&&of(t,t.memoizedProps,a.memoizedProps);break;case 5:if(nn(n,t),rn(t),s&512&&(kt||a===null||Xn(a,a.return)),t.flags&32){d=t.stateNode;try{Yi(d,"")}catch(Se){tt(t,t.return,Se)}}s&4&&t.stateNode!=null&&(d=t.memoizedProps,of(t,d,a!==null?a.memoizedProps:d)),s&1024&&(cf=!0);break;case 6:if(nn(n,t),rn(t),s&4){if(t.stateNode===null)throw Error(l(162));s=t.memoizedProps,a=t.stateNode;try{a.nodeValue=s}catch(Se){tt(t,t.return,Se)}}break;case 3:if(hs=null,d=Un,Un=fs(n.containerInfo),nn(n,t),Un=d,rn(t),s&4&&a!==null&&a.memoizedState.isDehydrated)try{El(n.containerInfo)}catch(Se){tt(t,t.return,Se)}cf&&(cf=!1,jg(t));break;case 4:s=Un,Un=fs(t.stateNode.containerInfo),nn(n,t),rn(t),Un=s;break;case 12:nn(n,t),rn(t);break;case 31:nn(n,t),rn(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Qo(t,s)));break;case 13:nn(n,t),rn(t),t.child.flags&8192&&t.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Wo=Fe()),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Qo(t,s)));break;case 22:d=t.memoizedState!==null;var G=a!==null&&a.memoizedState!==null,ne=gr,ae=kt;if(gr=ne||d,kt=ae||G,nn(n,t),kt=ae,gr=ne,rn(t),s&8192)e:for(n=t.stateNode,n._visibility=d?n._visibility&-2:n._visibility|1,d&&(a===null||G||gr||kt||ji(t)),a=null,n=t;;){if(n.tag===5||n.tag===26){if(a===null){G=a=n;try{if(m=G.stateNode,d)k=m.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none";else{L=G.stateNode;var fe=G.memoizedProps.style,re=fe!=null&&fe.hasOwnProperty("display")?fe.display:null;L.style.display=re==null||typeof re=="boolean"?"":(""+re).trim()}}catch(Se){tt(G,G.return,Se)}}}else if(n.tag===6){if(a===null){G=n;try{G.stateNode.nodeValue=d?"":G.memoizedProps}catch(Se){tt(G,G.return,Se)}}}else if(n.tag===18){if(a===null){G=n;try{var ie=G.stateNode;d?yb(ie,!0):yb(G.stateNode,!1)}catch(Se){tt(G,G.return,Se)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===t)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break e;for(;n.sibling===null;){if(n.return===null||n.return===t)break e;a===n&&(a=null),n=n.return}a===n&&(a=null),n.sibling.return=n.return,n=n.sibling}s&4&&(s=t.updateQueue,s!==null&&(a=s.retryQueue,a!==null&&(s.retryQueue=null,Qo(t,a))));break;case 19:nn(n,t),rn(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Qo(t,s)));break;case 30:break;case 21:break;default:nn(n,t),rn(t)}}function rn(t){var n=t.flags;if(n&2){try{for(var a,s=t.return;s!==null;){if(vg(s)){a=s;break}s=s.return}if(a==null)throw Error(l(160));switch(a.tag){case 27:var d=a.stateNode,m=sf(t);Ko(t,m,d);break;case 5:var k=a.stateNode;a.flags&32&&(Yi(k,""),a.flags&=-33);var L=sf(t);Ko(t,L,k);break;case 3:case 4:var G=a.stateNode.containerInfo,ne=sf(t);uf(t,ne,G);break;default:throw Error(l(161))}}catch(ae){tt(t,t.return,ae)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function jg(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var n=t;jg(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),t=t.sibling}}function yr(t,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)kg(t,n.alternate,n),n=n.sibling}function ji(t){for(t=t.child;t!==null;){var n=t;switch(n.tag){case 0:case 11:case 14:case 15:Pr(4,n,n.return),ji(n);break;case 1:Xn(n,n.return);var a=n.stateNode;typeof a.componentWillUnmount=="function"&&yg(n,n.return,a),ji(n);break;case 27:Na(n.stateNode);case 26:case 5:Xn(n,n.return),ji(n);break;case 22:n.memoizedState===null&&ji(n);break;case 30:ji(n);break;default:ji(n)}t=t.sibling}}function xr(t,n,a){for(a=a&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var s=n.alternate,d=t,m=n,k=m.flags;switch(m.tag){case 0:case 11:case 15:xr(d,m,a),ga(4,m);break;case 1:if(xr(d,m,a),s=m,d=s.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(ne){tt(s,s.return,ne)}if(s=m,d=s.updateQueue,d!==null){var L=s.stateNode;try{var G=d.shared.hiddenCallbacks;if(G!==null)for(d.shared.hiddenCallbacks=null,d=0;d<G.length;d++)am(G[d],L)}catch(ne){tt(s,s.return,ne)}}a&&k&64&&bg(m),ba(m,m.return);break;case 27:wg(m);case 26:case 5:xr(d,m,a),a&&s===null&&k&4&&xg(m),ba(m,m.return);break;case 12:xr(d,m,a);break;case 31:xr(d,m,a),a&&k&4&&Ng(d,m);break;case 13:xr(d,m,a),a&&k&4&&Ag(d,m);break;case 22:m.memoizedState===null&&xr(d,m,a),ba(m,m.return);break;case 30:break;default:xr(d,m,a)}n=n.sibling}}function ff(t,n){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(t=n.memoizedState.cachePool.pool),t!==a&&(t!=null&&t.refCount++,a!=null&&ra(a))}function df(t,n){t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&ra(t))}function Hn(t,n,a,s){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Rg(t,n,a,s),n=n.sibling}function Rg(t,n,a,s){var d=n.flags;switch(n.tag){case 0:case 11:case 15:Hn(t,n,a,s),d&2048&&ga(9,n);break;case 1:Hn(t,n,a,s);break;case 3:Hn(t,n,a,s),d&2048&&(t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&ra(t)));break;case 12:if(d&2048){Hn(t,n,a,s),t=n.stateNode;try{var m=n.memoizedProps,k=m.id,L=m.onPostCommit;typeof L=="function"&&L(k,n.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(G){tt(n,n.return,G)}}else Hn(t,n,a,s);break;case 31:Hn(t,n,a,s);break;case 13:Hn(t,n,a,s);break;case 23:break;case 22:m=n.stateNode,k=n.alternate,n.memoizedState!==null?m._visibility&2?Hn(t,n,a,s):ya(t,n):m._visibility&2?Hn(t,n,a,s):(m._visibility|=2,hl(t,n,a,s,(n.subtreeFlags&10256)!==0||!1)),d&2048&&ff(k,n);break;case 24:Hn(t,n,a,s),d&2048&&df(n.alternate,n);break;default:Hn(t,n,a,s)}}function hl(t,n,a,s,d){for(d=d&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var m=t,k=n,L=a,G=s,ne=k.flags;switch(k.tag){case 0:case 11:case 15:hl(m,k,L,G,d),ga(8,k);break;case 23:break;case 22:var ae=k.stateNode;k.memoizedState!==null?ae._visibility&2?hl(m,k,L,G,d):ya(m,k):(ae._visibility|=2,hl(m,k,L,G,d)),d&&ne&2048&&ff(k.alternate,k);break;case 24:hl(m,k,L,G,d),d&&ne&2048&&df(k.alternate,k);break;default:hl(m,k,L,G,d)}n=n.sibling}}function ya(t,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=t,s=n,d=s.flags;switch(s.tag){case 22:ya(a,s),d&2048&&ff(s.alternate,s);break;case 24:ya(a,s),d&2048&&df(s.alternate,s);break;default:ya(a,s)}n=n.sibling}}var xa=8192;function pl(t,n,a){if(t.subtreeFlags&xa)for(t=t.child;t!==null;)_g(t,n,a),t=t.sibling}function _g(t,n,a){switch(t.tag){case 26:pl(t,n,a),t.flags&xa&&t.memoizedState!==null&&HS(a,Un,t.memoizedState,t.memoizedProps);break;case 5:pl(t,n,a);break;case 3:case 4:var s=Un;Un=fs(t.stateNode.containerInfo),pl(t,n,a),Un=s;break;case 22:t.memoizedState===null&&(s=t.alternate,s!==null&&s.memoizedState!==null?(s=xa,xa=16777216,pl(t,n,a),xa=s):pl(t,n,a));break;default:pl(t,n,a)}}function Lg(t){var n=t.alternate;if(n!==null&&(t=n.child,t!==null)){n.child=null;do n=t.sibling,t.sibling=null,t=n;while(t!==null)}}function va(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var s=n[a];jt=s,Og(s,t)}Lg(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Dg(t),t=t.sibling}function Dg(t){switch(t.tag){case 0:case 11:case 15:va(t),t.flags&2048&&Pr(9,t,t.return);break;case 3:va(t);break;case 12:va(t);break;case 22:var n=t.stateNode;t.memoizedState!==null&&n._visibility&2&&(t.return===null||t.return.tag!==13)?(n._visibility&=-3,Jo(t)):va(t);break;default:va(t)}}function Jo(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var s=n[a];jt=s,Og(s,t)}Lg(t)}for(t=t.child;t!==null;){switch(n=t,n.tag){case 0:case 11:case 15:Pr(8,n,n.return),Jo(n);break;case 22:a=n.stateNode,a._visibility&2&&(a._visibility&=-3,Jo(n));break;default:Jo(n)}t=t.sibling}}function Og(t,n){for(;jt!==null;){var a=jt;switch(a.tag){case 0:case 11:case 15:Pr(8,a,n);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var s=a.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:ra(a.memoizedState.cache)}if(s=a.child,s!==null)s.return=a,jt=s;else e:for(a=t;jt!==null;){s=jt;var d=s.sibling,m=s.return;if(Eg(s),s===a){jt=null;break e}if(d!==null){d.return=m,jt=d;break e}jt=m}}}var nS={getCacheForType:function(t){var n=Mt(vt),a=n.data.get(t);return a===void 0&&(a=t(),n.data.set(t,a)),a},cacheSignal:function(){return Mt(vt).controller.signal}},rS=typeof WeakMap=="function"?WeakMap:Map,Qe=0,ot=null,Be=null,qe=0,et=0,bn=null,$r=!1,ml=!1,hf=!1,vr=0,gt=0,Vr=0,Ri=0,pf=0,yn=0,gl=0,wa=null,ln=null,mf=!1,Wo=0,Mg=0,es=1/0,ts=null,Gr=null,At=0,Yr=null,bl=null,wr=0,gf=0,bf=null,zg=null,Sa=0,yf=null;function xn(){return(Qe&2)!==0&&qe!==0?qe&-qe:U.T!==null?Ef():ir()}function Fg(){if(yn===0)if((qe&536870912)===0||$e){var t=jr;jr<<=1,(jr&3932160)===0&&(jr=262144),yn=t}else yn=536870912;return t=mn.current,t!==null&&(t.flags|=32),yn}function an(t,n,a){(t===ot&&(et===2||et===9)||t.cancelPendingCommit!==null)&&(yl(t,0),Xr(t,qe,yn,!1)),rr(t,a),((Qe&2)===0||t!==ot)&&(t===ot&&((Qe&2)===0&&(Ri|=a),gt===4&&Xr(t,qe,yn,!1)),Zn(t))}function Ig(t,n,a){if((Qe&6)!==0)throw Error(l(327));var s=!a&&(n&127)===0&&(n&t.expiredLanes)===0||nr(t,n),d=s?aS(t,n):vf(t,n,!0),m=s;do{if(d===0){ml&&!s&&Xr(t,n,0,!1);break}else{if(a=t.current.alternate,m&&!iS(a)){d=vf(t,n,!1),m=!1;continue}if(d===2){if(m=n,t.errorRecoveryDisabledLanes&m)var k=0;else k=t.pendingLanes&-536870913,k=k!==0?k:k&536870912?536870912:0;if(k!==0){n=k;e:{var L=t;d=wa;var G=L.current.memoizedState.isDehydrated;if(G&&(yl(L,k).flags|=256),k=vf(L,k,!1),k!==2){if(hf&&!G){L.errorRecoveryDisabledLanes|=m,Ri|=m,d=4;break e}m=ln,ln=d,m!==null&&(ln===null?ln=m:ln.push.apply(ln,m))}d=k}if(m=!1,d!==2)continue}}if(d===1){yl(t,0),Xr(t,n,0,!0);break}e:{switch(s=t,m=d,m){case 0:case 1:throw Error(l(345));case 4:if((n&4194048)!==n)break;case 6:Xr(s,n,yn,!$r);break e;case 2:ln=null;break;case 3:case 5:break;default:throw Error(l(329))}if((n&62914560)===n&&(d=Wo+300-Fe(),10<d)){if(Xr(s,n,yn,!$r),Rr(s,0,!0)!==0)break e;wr=n,s.timeoutHandle=mb(Bg.bind(null,s,a,ln,ts,mf,n,yn,Ri,gl,$r,m,"Throttled",-0,0),d);break e}Bg(s,a,ln,ts,mf,n,yn,Ri,gl,$r,m,null,-0,0)}}break}while(!0);Zn(t)}function Bg(t,n,a,s,d,m,k,L,G,ne,ae,fe,re,ie){if(t.timeoutHandle=-1,fe=n.subtreeFlags,fe&8192||(fe&16785408)===16785408){fe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ar},_g(n,m,fe);var Se=(m&62914560)===m?Wo-Fe():(m&4194048)===m?Mg-Fe():0;if(Se=qS(fe,Se),Se!==null){wr=m,t.cancelPendingCommit=Se(Yg.bind(null,t,n,m,a,s,d,k,L,G,ae,fe,null,re,ie)),Xr(t,m,k,!ne);return}}Yg(t,n,m,a,s,d,k,L,G)}function iS(t){for(var n=t;;){var a=n.tag;if((a===0||a===11||a===15)&&n.flags&16384&&(a=n.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var s=0;s<a.length;s++){var d=a[s],m=d.getSnapshot;d=d.value;try{if(!hn(m(),d))return!1}catch{return!1}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;else{if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Xr(t,n,a,s){n&=~pf,n&=~Ri,t.suspendedLanes|=n,t.pingedLanes&=~n,s&&(t.warmLanes|=n),s=t.expirationTimes;for(var d=n;0<d;){var m=31-We(d),k=1<<m;s[m]=-1,d&=~k}a!==0&&ql(t,a,n)}function ns(){return(Qe&6)===0?(ka(0),!1):!0}function xf(){if(Be!==null){if(et===0)var t=Be.return;else t=Be,cr=wi=null,Oc(t),sl=null,la=0,t=Be;for(;t!==null;)gg(t.alternate,t),t=t.return;Be=null}}function yl(t,n){var a=t.timeoutHandle;a!==-1&&(t.timeoutHandle=-1,ES(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),wr=0,xf(),ot=t,Be=a=sr(t.current,null),qe=n,et=0,bn=null,$r=!1,ml=nr(t,n),hf=!1,gl=yn=pf=Ri=Vr=gt=0,ln=wa=null,mf=!1,(n&8)!==0&&(n|=n&32);var s=t.entangledLanes;if(s!==0)for(t=t.entanglements,s&=n;0<s;){var d=31-We(s),m=1<<d;n|=t[d],s&=~m}return vr=n,ko(),a}function Ug(t,n){Le=null,U.H=ha,n===ol||n===_o?(n=nm(),et=3):n===Sc?(n=nm(),et=4):et=n===Kc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,bn=n,Be===null&&(gt=1,Vo(t,jn(n,t.current)))}function Hg(){var t=mn.current;return t===null?!0:(qe&4194048)===qe?Dn===null:(qe&62914560)===qe||(qe&536870912)!==0?t===Dn:!1}function qg(){var t=U.H;return U.H=ha,t===null?ha:t}function Pg(){var t=U.A;return U.A=nS,t}function rs(){gt=4,$r||(qe&4194048)!==qe&&mn.current!==null||(ml=!0),(Vr&134217727)===0&&(Ri&134217727)===0||ot===null||Xr(ot,qe,yn,!1)}function vf(t,n,a){var s=Qe;Qe|=2;var d=qg(),m=Pg();(ot!==t||qe!==n)&&(ts=null,yl(t,n)),n=!1;var k=gt;e:do try{if(et!==0&&Be!==null){var L=Be,G=bn;switch(et){case 8:xf(),k=6;break e;case 3:case 2:case 9:case 6:mn.current===null&&(n=!0);var ne=et;if(et=0,bn=null,xl(t,L,G,ne),a&&ml){k=0;break e}break;default:ne=et,et=0,bn=null,xl(t,L,G,ne)}}lS(),k=gt;break}catch(ae){Ug(t,ae)}while(!0);return n&&t.shellSuspendCounter++,cr=wi=null,Qe=s,U.H=d,U.A=m,Be===null&&(ot=null,qe=0,ko()),k}function lS(){for(;Be!==null;)$g(Be)}function aS(t,n){var a=Qe;Qe|=2;var s=qg(),d=Pg();ot!==t||qe!==n?(ts=null,es=Fe()+500,yl(t,n)):ml=nr(t,n);e:do try{if(et!==0&&Be!==null){n=Be;var m=bn;t:switch(et){case 1:et=0,bn=null,xl(t,n,m,1);break;case 2:case 9:if(em(m)){et=0,bn=null,Vg(n);break}n=function(){et!==2&&et!==9||ot!==t||(et=7),Zn(t)},m.then(n,n);break e;case 3:et=7;break e;case 4:et=5;break e;case 7:em(m)?(et=0,bn=null,Vg(n)):(et=0,bn=null,xl(t,n,m,7));break;case 5:var k=null;switch(Be.tag){case 26:k=Be.memoizedState;case 5:case 27:var L=Be;if(k?Rb(k):L.stateNode.complete){et=0,bn=null;var G=L.sibling;if(G!==null)Be=G;else{var ne=L.return;ne!==null?(Be=ne,is(ne)):Be=null}break t}}et=0,bn=null,xl(t,n,m,5);break;case 6:et=0,bn=null,xl(t,n,m,6);break;case 8:xf(),gt=6;break e;default:throw Error(l(462))}}oS();break}catch(ae){Ug(t,ae)}while(!0);return cr=wi=null,U.H=s,U.A=d,Qe=a,Be!==null?0:(ot=null,qe=0,ko(),gt)}function oS(){for(;Be!==null&&!Jt();)$g(Be)}function $g(t){var n=pg(t.alternate,t,vr);t.memoizedProps=t.pendingProps,n===null?is(t):Be=n}function Vg(t){var n=t,a=n.alternate;switch(n.tag){case 15:case 0:n=sg(a,n,n.pendingProps,n.type,void 0,qe);break;case 11:n=sg(a,n,n.pendingProps,n.type.render,n.ref,qe);break;case 5:Oc(n);default:gg(a,n),n=Be=Pp(n,vr),n=pg(a,n,vr)}t.memoizedProps=t.pendingProps,n===null?is(t):Be=n}function xl(t,n,a,s){cr=wi=null,Oc(n),sl=null,la=0;var d=n.return;try{if(Zw(t,d,n,a,qe)){gt=1,Vo(t,jn(a,t.current)),Be=null;return}}catch(m){if(d!==null)throw Be=d,m;gt=1,Vo(t,jn(a,t.current)),Be=null;return}n.flags&32768?($e||s===1?t=!0:ml||(qe&536870912)!==0?t=!1:($r=t=!0,(s===2||s===9||s===3||s===6)&&(s=mn.current,s!==null&&s.tag===13&&(s.flags|=16384))),Gg(n,t)):is(n)}function is(t){var n=t;do{if((n.flags&32768)!==0){Gg(n,$r);return}t=n.return;var a=Jw(n.alternate,n,vr);if(a!==null){Be=a;return}if(n=n.sibling,n!==null){Be=n;return}Be=n=t}while(n!==null);gt===0&&(gt=5)}function Gg(t,n){do{var a=Ww(t.alternate,t);if(a!==null){a.flags&=32767,Be=a;return}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(t=t.sibling,t!==null)){Be=t;return}Be=t=a}while(t!==null);gt=6,Be=null}function Yg(t,n,a,s,d,m,k,L,G){t.cancelPendingCommit=null;do ls();while(At!==0);if((Qe&6)!==0)throw Error(l(327));if(n!==null){if(n===t.current)throw Error(l(177));if(m=n.lanes|n.childLanes,m|=oc,Iu(t,a,m,k,L,G),t===ot&&(Be=ot=null,qe=0),bl=n,Yr=t,wr=a,gf=m,bf=d,zg=s,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,fS(Te,function(){return Jg(),null})):(t.callbackNode=null,t.callbackPriority=0),s=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||s){s=U.T,U.T=null,d=Y.p,Y.p=2,k=Qe,Qe|=4;try{eS(t,n,a)}finally{Qe=k,Y.p=d,U.T=s}}At=1,Xg(),Zg(),Kg()}}function Xg(){if(At===1){At=0;var t=Yr,n=bl,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=U.T,U.T=null;var s=Y.p;Y.p=2;var d=Qe;Qe|=4;try{Tg(n,t);var m=Lf,k=Op(t.containerInfo),L=m.focusedElem,G=m.selectionRange;if(k!==L&&L&&L.ownerDocument&&Dp(L.ownerDocument.documentElement,L)){if(G!==null&&nc(L)){var ne=G.start,ae=G.end;if(ae===void 0&&(ae=ne),"selectionStart"in L)L.selectionStart=ne,L.selectionEnd=Math.min(ae,L.value.length);else{var fe=L.ownerDocument||document,re=fe&&fe.defaultView||window;if(re.getSelection){var ie=re.getSelection(),Se=L.textContent.length,Ae=Math.min(G.start,Se),it=G.end===void 0?Ae:Math.min(G.end,Se);!ie.extend&&Ae>it&&(k=it,it=Ae,Ae=k);var Q=Lp(L,Ae),K=Lp(L,it);if(Q&&K&&(ie.rangeCount!==1||ie.anchorNode!==Q.node||ie.anchorOffset!==Q.offset||ie.focusNode!==K.node||ie.focusOffset!==K.offset)){var ee=fe.createRange();ee.setStart(Q.node,Q.offset),ie.removeAllRanges(),Ae>it?(ie.addRange(ee),ie.extend(K.node,K.offset)):(ee.setEnd(K.node,K.offset),ie.addRange(ee))}}}}for(fe=[],ie=L;ie=ie.parentNode;)ie.nodeType===1&&fe.push({element:ie,left:ie.scrollLeft,top:ie.scrollTop});for(typeof L.focus=="function"&&L.focus(),L=0;L<fe.length;L++){var se=fe[L];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}bs=!!_f,Lf=_f=null}finally{Qe=d,Y.p=s,U.T=a}}t.current=n,At=2}}function Zg(){if(At===2){At=0;var t=Yr,n=bl,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=U.T,U.T=null;var s=Y.p;Y.p=2;var d=Qe;Qe|=4;try{kg(t,n.alternate,n)}finally{Qe=d,Y.p=s,U.T=a}}At=3}}function Kg(){if(At===4||At===3){At=0,Ut();var t=Yr,n=bl,a=wr,s=zg;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?At=5:(At=0,bl=Yr=null,Qg(t,t.pendingLanes));var d=t.pendingLanes;if(d===0&&(Gr=null),qi(a),n=n.stateNode,bt&&typeof bt.onCommitFiberRoot=="function")try{bt.onCommitFiberRoot(Lt,n,void 0,(n.current.flags&128)===128)}catch{}if(s!==null){n=U.T,d=Y.p,Y.p=2,U.T=null;try{for(var m=t.onRecoverableError,k=0;k<s.length;k++){var L=s[k];m(L.value,{componentStack:L.stack})}}finally{U.T=n,Y.p=d}}(wr&3)!==0&&ls(),Zn(t),d=t.pendingLanes,(a&261930)!==0&&(d&42)!==0?t===yf?Sa++:(Sa=0,yf=t):Sa=0,ka(0)}}function Qg(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,ra(n)))}function ls(){return Xg(),Zg(),Kg(),Jg()}function Jg(){if(At!==5)return!1;var t=Yr,n=gf;gf=0;var a=qi(wr),s=U.T,d=Y.p;try{Y.p=32>a?32:a,U.T=null,a=bf,bf=null;var m=Yr,k=wr;if(At=0,bl=Yr=null,wr=0,(Qe&6)!==0)throw Error(l(331));var L=Qe;if(Qe|=4,Dg(m.current),Rg(m,m.current,k,a),Qe=L,ka(0,!1),bt&&typeof bt.onPostCommitFiberRoot=="function")try{bt.onPostCommitFiberRoot(Lt,m)}catch{}return!0}finally{Y.p=d,U.T=s,Qg(t,n)}}function Wg(t,n,a){n=jn(a,n),n=Zc(t.stateNode,n,2),t=Ur(t,n,2),t!==null&&(rr(t,2),Zn(t))}function tt(t,n,a){if(t.tag===3)Wg(t,t,a);else for(;n!==null;){if(n.tag===3){Wg(n,t,a);break}else if(n.tag===1){var s=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Gr===null||!Gr.has(s))){t=jn(a,t),a=eg(2),s=Ur(n,a,2),s!==null&&(tg(a,s,n,t),rr(s,2),Zn(s));break}}n=n.return}}function wf(t,n,a){var s=t.pingCache;if(s===null){s=t.pingCache=new rS;var d=new Set;s.set(n,d)}else d=s.get(n),d===void 0&&(d=new Set,s.set(n,d));d.has(a)||(hf=!0,d.add(a),t=sS.bind(null,t,n,a),n.then(t,t))}function sS(t,n,a){var s=t.pingCache;s!==null&&s.delete(n),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,ot===t&&(qe&a)===a&&(gt===4||gt===3&&(qe&62914560)===qe&&300>Fe()-Wo?(Qe&2)===0&&yl(t,0):pf|=a,gl===qe&&(gl=0)),Zn(t)}function eb(t,n){n===0&&(n=so()),t=yi(t,n),t!==null&&(rr(t,n),Zn(t))}function uS(t){var n=t.memoizedState,a=0;n!==null&&(a=n.retryLane),eb(t,a)}function cS(t,n){var a=0;switch(t.tag){case 31:case 13:var s=t.stateNode,d=t.memoizedState;d!==null&&(a=d.retryLane);break;case 19:s=t.stateNode;break;case 22:s=t.stateNode._retryCache;break;default:throw Error(l(314))}s!==null&&s.delete(n),eb(t,a)}function fS(t,n){return pt(t,n)}var as=null,vl=null,Sf=!1,os=!1,kf=!1,Zr=0;function Zn(t){t!==vl&&t.next===null&&(vl===null?as=vl=t:vl=vl.next=t),os=!0,Sf||(Sf=!0,hS())}function ka(t,n){if(!kf&&os){kf=!0;do for(var a=!1,s=as;s!==null;){if(t!==0){var d=s.pendingLanes;if(d===0)var m=0;else{var k=s.suspendedLanes,L=s.pingedLanes;m=(1<<31-We(42|t)+1)-1,m&=d&~(k&~L),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(a=!0,ib(s,m))}else m=qe,m=Rr(s,s===ot?m:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(m&3)===0||nr(s,m)||(a=!0,ib(s,m));s=s.next}while(a);kf=!1}}function dS(){tb()}function tb(){os=Sf=!1;var t=0;Zr!==0&&kS()&&(t=Zr);for(var n=Fe(),a=null,s=as;s!==null;){var d=s.next,m=nb(s,n);m===0?(s.next=null,a===null?as=d:a.next=d,d===null&&(vl=a)):(a=s,(t!==0||(m&3)!==0)&&(os=!0)),s=d}At!==0&&At!==5||ka(t),Zr!==0&&(Zr=0)}function nb(t,n){for(var a=t.suspendedLanes,s=t.pingedLanes,d=t.expirationTimes,m=t.pendingLanes&-62914561;0<m;){var k=31-We(m),L=1<<k,G=d[k];G===-1?((L&a)===0||(L&s)!==0)&&(d[k]=Ui(L,n)):G<=n&&(t.expiredLanes|=L),m&=~L}if(n=ot,a=qe,a=Rr(t,t===n?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s=t.callbackNode,a===0||t===n&&(et===2||et===9)||t.cancelPendingCommit!==null)return s!==null&&s!==null&&Bt(s),t.callbackNode=null,t.callbackPriority=0;if((a&3)===0||nr(t,a)){if(n=a&-a,n===t.callbackPriority)return n;switch(s!==null&&Bt(s),qi(a)){case 2:case 8:a=pe;break;case 32:a=Te;break;case 268435456:a=Xe;break;default:a=Te}return s=rb.bind(null,t),a=pt(a,s),t.callbackPriority=n,t.callbackNode=a,n}return s!==null&&s!==null&&Bt(s),t.callbackPriority=2,t.callbackNode=null,2}function rb(t,n){if(At!==0&&At!==5)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(ls()&&t.callbackNode!==a)return null;var s=qe;return s=Rr(t,t===ot?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s===0?null:(Ig(t,s,n),nb(t,Fe()),t.callbackNode!=null&&t.callbackNode===a?rb.bind(null,t):null)}function ib(t,n){if(ls())return null;Ig(t,n,!0)}function hS(){CS(function(){(Qe&6)!==0?pt(oe,dS):tb()})}function Ef(){if(Zr===0){var t=ll;t===0&&(t=Tr,Tr<<=1,(Tr&261888)===0&&(Tr=256)),Zr=t}return Zr}function lb(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:mo(""+t)}function ab(t,n){var a=n.ownerDocument.createElement("input");return a.name=n.name,a.value=n.value,t.id&&a.setAttribute("form",t.id),n.parentNode.insertBefore(a,n),t=new FormData(t),a.parentNode.removeChild(a),t}function pS(t,n,a,s,d){if(n==="submit"&&a&&a.stateNode===d){var m=lb((d[Ht]||null).action),k=s.submitter;k&&(n=(n=k[Ht]||null)?lb(n.formAction):k.getAttribute("formAction"),n!==null&&(m=n,k=null));var L=new xo("action","action",null,s,d);t.push({event:L,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Zr!==0){var G=k?ab(d,k):new FormData(d);Pc(a,{pending:!0,data:G,method:d.method,action:m},null,G)}}else typeof m=="function"&&(L.preventDefault(),G=k?ab(d,k):new FormData(d),Pc(a,{pending:!0,data:G,method:d.method,action:m},m,G))},currentTarget:d}]})}}for(var Cf=0;Cf<ac.length;Cf++){var Nf=ac[Cf],mS=Nf.toLowerCase(),gS=Nf[0].toUpperCase()+Nf.slice(1);Bn(mS,"on"+gS)}Bn(Fp,"onAnimationEnd"),Bn(Ip,"onAnimationIteration"),Bn(Bp,"onAnimationStart"),Bn("dblclick","onDoubleClick"),Bn("focusin","onFocus"),Bn("focusout","onBlur"),Bn(Lw,"onTransitionRun"),Bn(Dw,"onTransitionStart"),Bn(Ow,"onTransitionCancel"),Bn(Up,"onTransitionEnd"),Nt("onMouseEnter",["mouseout","mouseover"]),Nt("onMouseLeave",["mouseout","mouseover"]),Nt("onPointerEnter",["pointerout","pointerover"]),Nt("onPointerLeave",["pointerout","pointerover"]),De("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),De("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),De("onBeforeInput",["compositionend","keypress","textInput","paste"]),De("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),De("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),De("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ea="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(" "),bS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ea));function ob(t,n){n=(n&4)!==0;for(var a=0;a<t.length;a++){var s=t[a],d=s.event;s=s.listeners;e:{var m=void 0;if(n)for(var k=s.length-1;0<=k;k--){var L=s[k],G=L.instance,ne=L.currentTarget;if(L=L.listener,G!==m&&d.isPropagationStopped())break e;m=L,d.currentTarget=ne;try{m(d)}catch(ae){So(ae)}d.currentTarget=null,m=G}else for(k=0;k<s.length;k++){if(L=s[k],G=L.instance,ne=L.currentTarget,L=L.listener,G!==m&&d.isPropagationStopped())break e;m=L,d.currentTarget=ne;try{m(d)}catch(ae){So(ae)}d.currentTarget=null,m=G}}}}function Ue(t,n){var a=n[Pi];a===void 0&&(a=n[Pi]=new Set);var s=t+"__bubble";a.has(s)||(sb(n,t,2,!1),a.add(s))}function Af(t,n,a){var s=0;n&&(s|=4),sb(a,t,s,n)}var ss="_reactListening"+Math.random().toString(36).slice(2);function Tf(t){if(!t[ss]){t[ss]=!0,je.forEach(function(a){a!=="selectionchange"&&(bS.has(a)||Af(a,!1,t),Af(a,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[ss]||(n[ss]=!0,Af("selectionchange",!1,n))}}function sb(t,n,a,s){switch(Fb(n)){case 2:var d=VS;break;case 8:d=GS;break;default:d=Pf}a=d.bind(null,n,a,t),d=void 0,!Yu||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(d=!0),s?d!==void 0?t.addEventListener(n,a,{capture:!0,passive:d}):t.addEventListener(n,a,!0):d!==void 0?t.addEventListener(n,a,{passive:d}):t.addEventListener(n,a,!1)}function jf(t,n,a,s,d){var m=s;if((n&1)===0&&(n&2)===0&&s!==null)e:for(;;){if(s===null)return;var k=s.tag;if(k===3||k===4){var L=s.stateNode.containerInfo;if(L===d)break;if(k===4)for(k=s.return;k!==null;){var G=k.tag;if((G===3||G===4)&&k.stateNode.containerInfo===d)return;k=k.return}for(;L!==null;){if(k=_r(L),k===null)return;if(G=k.tag,G===5||G===6||G===26||G===27){s=m=k;continue e}L=L.parentNode}}s=s.return}hp(function(){var ne=m,ae=Vu(a),fe=[];e:{var re=Hp.get(t);if(re!==void 0){var ie=xo,Se=t;switch(t){case"keypress":if(bo(a)===0)break e;case"keydown":case"keyup":ie=cw;break;case"focusin":Se="focus",ie=Qu;break;case"focusout":Se="blur",ie=Qu;break;case"beforeblur":case"afterblur":ie=Qu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ie=gp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ie=Jv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ie=hw;break;case Fp:case Ip:case Bp:ie=tw;break;case Up:ie=mw;break;case"scroll":case"scrollend":ie=Kv;break;case"wheel":ie=bw;break;case"copy":case"cut":case"paste":ie=rw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ie=yp;break;case"toggle":case"beforetoggle":ie=xw}var Ae=(n&4)!==0,it=!Ae&&(t==="scroll"||t==="scrollend"),Q=Ae?re!==null?re+"Capture":null:re;Ae=[];for(var K=ne,ee;K!==null;){var se=K;if(ee=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||ee===null||Q===null||(se=Gl(K,Q),se!=null&&Ae.push(Ca(K,se,ee))),it)break;K=K.return}0<Ae.length&&(re=new ie(re,Se,null,a,ae),fe.push({event:re,listeners:Ae}))}}if((n&7)===0){e:{if(re=t==="mouseover"||t==="pointerover",ie=t==="mouseout"||t==="pointerout",re&&a!==$u&&(Se=a.relatedTarget||a.fromElement)&&(_r(Se)||Se[Cn]))break e;if((ie||re)&&(re=ae.window===ae?ae:(re=ae.ownerDocument)?re.defaultView||re.parentWindow:window,ie?(Se=a.relatedTarget||a.toElement,ie=ne,Se=Se?_r(Se):null,Se!==null&&(it=u(Se),Ae=Se.tag,Se!==it||Ae!==5&&Ae!==27&&Ae!==6)&&(Se=null)):(ie=null,Se=ne),ie!==Se)){if(Ae=gp,se="onMouseLeave",Q="onMouseEnter",K="mouse",(t==="pointerout"||t==="pointerover")&&(Ae=yp,se="onPointerLeave",Q="onPointerEnter",K="pointer"),it=ie==null?re:pi(ie),ee=Se==null?re:pi(Se),re=new Ae(se,K+"leave",ie,a,ae),re.target=it,re.relatedTarget=ee,se=null,_r(ae)===ne&&(Ae=new Ae(Q,K+"enter",Se,a,ae),Ae.target=ee,Ae.relatedTarget=it,se=Ae),it=se,ie&&Se)t:{for(Ae=yS,Q=ie,K=Se,ee=0,se=Q;se;se=Ae(se))ee++;se=0;for(var Ce=K;Ce;Ce=Ae(Ce))se++;for(;0<ee-se;)Q=Ae(Q),ee--;for(;0<se-ee;)K=Ae(K),se--;for(;ee--;){if(Q===K||K!==null&&Q===K.alternate){Ae=Q;break t}Q=Ae(Q),K=Ae(K)}Ae=null}else Ae=null;ie!==null&&ub(fe,re,ie,Ae,!1),Se!==null&&it!==null&&ub(fe,it,Se,Ae,!0)}}e:{if(re=ne?pi(ne):window,ie=re.nodeName&&re.nodeName.toLowerCase(),ie==="select"||ie==="input"&&re.type==="file")var Ze=Np;else if(Ep(re))if(Ap)Ze=jw;else{Ze=Aw;var ke=Nw}else ie=re.nodeName,!ie||ie.toLowerCase()!=="input"||re.type!=="checkbox"&&re.type!=="radio"?ne&&Pu(ne.elementType)&&(Ze=Np):Ze=Tw;if(Ze&&(Ze=Ze(t,ne))){Cp(fe,Ze,a,ae);break e}ke&&ke(t,re,ne),t==="focusout"&&ne&&re.type==="number"&&ne.memoizedProps.value!=null&&qu(re,"number",re.value)}switch(ke=ne?pi(ne):window,t){case"focusin":(Ep(ke)||ke.contentEditable==="true")&&(Qi=ke,rc=ne,ea=null);break;case"focusout":ea=rc=Qi=null;break;case"mousedown":ic=!0;break;case"contextmenu":case"mouseup":case"dragend":ic=!1,Mp(fe,a,ae);break;case"selectionchange":if(_w)break;case"keydown":case"keyup":Mp(fe,a,ae)}var Oe;if(Wu)e:{switch(t){case"compositionstart":var Pe="onCompositionStart";break e;case"compositionend":Pe="onCompositionEnd";break e;case"compositionupdate":Pe="onCompositionUpdate";break e}Pe=void 0}else Ki?Sp(t,a)&&(Pe="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(Pe="onCompositionStart");Pe&&(xp&&a.locale!=="ko"&&(Ki||Pe!=="onCompositionStart"?Pe==="onCompositionEnd"&&Ki&&(Oe=pp()):(Dr=ae,Xu="value"in Dr?Dr.value:Dr.textContent,Ki=!0)),ke=us(ne,Pe),0<ke.length&&(Pe=new bp(Pe,t,null,a,ae),fe.push({event:Pe,listeners:ke}),Oe?Pe.data=Oe:(Oe=kp(a),Oe!==null&&(Pe.data=Oe)))),(Oe=ww?Sw(t,a):kw(t,a))&&(Pe=us(ne,"onBeforeInput"),0<Pe.length&&(ke=new bp("onBeforeInput","beforeinput",null,a,ae),fe.push({event:ke,listeners:Pe}),ke.data=Oe)),pS(fe,t,ne,a,ae)}ob(fe,n)})}function Ca(t,n,a){return{instance:t,listener:n,currentTarget:a}}function us(t,n){for(var a=n+"Capture",s=[];t!==null;){var d=t,m=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||m===null||(d=Gl(t,a),d!=null&&s.unshift(Ca(t,d,m)),d=Gl(t,n),d!=null&&s.push(Ca(t,d,m))),t.tag===3)return s;t=t.return}return[]}function yS(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function ub(t,n,a,s,d){for(var m=n._reactName,k=[];a!==null&&a!==s;){var L=a,G=L.alternate,ne=L.stateNode;if(L=L.tag,G!==null&&G===s)break;L!==5&&L!==26&&L!==27||ne===null||(G=ne,d?(ne=Gl(a,m),ne!=null&&k.unshift(Ca(a,ne,G))):d||(ne=Gl(a,m),ne!=null&&k.push(Ca(a,ne,G)))),a=a.return}k.length!==0&&t.push({event:n,listeners:k})}var xS=/\r\n?/g,vS=/\u0000|\uFFFD/g;function cb(t){return(typeof t=="string"?t:""+t).replace(xS,`
|
|
9
|
-
`).replace(vS,"")}function fb(t,n){return n=cb(n),cb(t)===n}function rt(t,n,a,s,d,m){switch(a){case"children":typeof s=="string"?n==="body"||n==="textarea"&&s===""||Yi(t,s):(typeof s=="number"||typeof s=="bigint")&&n!=="body"&&Yi(t,""+s);break;case"className":ho(t,"class",s);break;case"tabIndex":ho(t,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":ho(t,a,s);break;case"style":fp(t,s,m);break;case"data":if(n!=="object"){ho(t,"data",s);break}case"src":case"href":if(s===""&&(n!=="a"||a!=="href")){t.removeAttribute(a);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(a);break}s=mo(""+s),t.setAttribute(a,s);break;case"action":case"formAction":if(typeof s=="function"){t.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof m=="function"&&(a==="formAction"?(n!=="input"&&rt(t,n,"name",d.name,d,null),rt(t,n,"formEncType",d.formEncType,d,null),rt(t,n,"formMethod",d.formMethod,d,null),rt(t,n,"formTarget",d.formTarget,d,null)):(rt(t,n,"encType",d.encType,d,null),rt(t,n,"method",d.method,d,null),rt(t,n,"target",d.target,d,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(a);break}s=mo(""+s),t.setAttribute(a,s);break;case"onClick":s!=null&&(t.onclick=ar);break;case"onScroll":s!=null&&Ue("scroll",t);break;case"onScrollEnd":s!=null&&Ue("scrollend",t);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(a=s.__html,a!=null){if(d.children!=null)throw Error(l(60));t.innerHTML=a}}break;case"multiple":t.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":t.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){t.removeAttribute("xlink:href");break}a=mo(""+s),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(a,""+s):t.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":s===!0?t.setAttribute(a,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(a,s):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?t.setAttribute(a,s):t.removeAttribute(a);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?t.removeAttribute(a):t.setAttribute(a,s);break;case"popover":Ue("beforetoggle",t),Ue("toggle",t),fo(t,"popover",s);break;case"xlinkActuate":lr(t,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":lr(t,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":lr(t,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":lr(t,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":lr(t,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":lr(t,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":lr(t,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":lr(t,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":lr(t,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":fo(t,"is",s);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Xv.get(a)||a,fo(t,a,s))}}function Rf(t,n,a,s,d,m){switch(a){case"style":fp(t,s,m);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(a=s.__html,a!=null){if(d.children!=null)throw Error(l(60));t.innerHTML=a}}break;case"children":typeof s=="string"?Yi(t,s):(typeof s=="number"||typeof s=="bigint")&&Yi(t,""+s);break;case"onScroll":s!=null&&Ue("scroll",t);break;case"onScrollEnd":s!=null&&Ue("scrollend",t);break;case"onClick":s!=null&&(t.onclick=ar);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Je.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(d=a.endsWith("Capture"),n=a.slice(2,d?a.length-7:void 0),m=t[Ht]||null,m=m!=null?m[a]:null,typeof m=="function"&&t.removeEventListener(n,m,d),typeof s=="function")){typeof m!="function"&&m!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(n,s,d);break e}a in t?t[a]=s:s===!0?t.setAttribute(a,""):fo(t,a,s)}}}function Ft(t,n,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ue("error",t),Ue("load",t);var s=!1,d=!1,m;for(m in a)if(a.hasOwnProperty(m)){var k=a[m];if(k!=null)switch(m){case"src":s=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,n));default:rt(t,n,m,k,a,null)}}d&&rt(t,n,"srcSet",a.srcSet,a,null),s&&rt(t,n,"src",a.src,a,null);return;case"input":Ue("invalid",t);var L=m=k=d=null,G=null,ne=null;for(s in a)if(a.hasOwnProperty(s)){var ae=a[s];if(ae!=null)switch(s){case"name":d=ae;break;case"type":k=ae;break;case"checked":G=ae;break;case"defaultChecked":ne=ae;break;case"value":m=ae;break;case"defaultValue":L=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(l(137,n));break;default:rt(t,n,s,ae,a,null)}}op(t,m,L,G,ne,k,d,!1);return;case"select":Ue("invalid",t),s=k=m=null;for(d in a)if(a.hasOwnProperty(d)&&(L=a[d],L!=null))switch(d){case"value":m=L;break;case"defaultValue":k=L;break;case"multiple":s=L;default:rt(t,n,d,L,a,null)}n=m,a=k,t.multiple=!!s,n!=null?Gi(t,!!s,n,!1):a!=null&&Gi(t,!!s,a,!0);return;case"textarea":Ue("invalid",t),m=d=s=null;for(k in a)if(a.hasOwnProperty(k)&&(L=a[k],L!=null))switch(k){case"value":s=L;break;case"defaultValue":d=L;break;case"children":m=L;break;case"dangerouslySetInnerHTML":if(L!=null)throw Error(l(91));break;default:rt(t,n,k,L,a,null)}up(t,s,d,m);return;case"option":for(G in a)a.hasOwnProperty(G)&&(s=a[G],s!=null)&&(G==="selected"?t.selected=s&&typeof s!="function"&&typeof s!="symbol":rt(t,n,G,s,a,null));return;case"dialog":Ue("beforetoggle",t),Ue("toggle",t),Ue("cancel",t),Ue("close",t);break;case"iframe":case"object":Ue("load",t);break;case"video":case"audio":for(s=0;s<Ea.length;s++)Ue(Ea[s],t);break;case"image":Ue("error",t),Ue("load",t);break;case"details":Ue("toggle",t);break;case"embed":case"source":case"link":Ue("error",t),Ue("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ne in a)if(a.hasOwnProperty(ne)&&(s=a[ne],s!=null))switch(ne){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,n));default:rt(t,n,ne,s,a,null)}return;default:if(Pu(n)){for(ae in a)a.hasOwnProperty(ae)&&(s=a[ae],s!==void 0&&Rf(t,n,ae,s,a,void 0));return}}for(L in a)a.hasOwnProperty(L)&&(s=a[L],s!=null&&rt(t,n,L,s,a,null))}function wS(t,n,a,s){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,m=null,k=null,L=null,G=null,ne=null,ae=null;for(ie in a){var fe=a[ie];if(a.hasOwnProperty(ie)&&fe!=null)switch(ie){case"checked":break;case"value":break;case"defaultValue":G=fe;default:s.hasOwnProperty(ie)||rt(t,n,ie,null,s,fe)}}for(var re in s){var ie=s[re];if(fe=a[re],s.hasOwnProperty(re)&&(ie!=null||fe!=null))switch(re){case"type":m=ie;break;case"name":d=ie;break;case"checked":ne=ie;break;case"defaultChecked":ae=ie;break;case"value":k=ie;break;case"defaultValue":L=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(l(137,n));break;default:ie!==fe&&rt(t,n,re,ie,s,fe)}}Hu(t,k,L,G,ne,ae,m,d);return;case"select":ie=k=L=re=null;for(m in a)if(G=a[m],a.hasOwnProperty(m)&&G!=null)switch(m){case"value":break;case"multiple":ie=G;default:s.hasOwnProperty(m)||rt(t,n,m,null,s,G)}for(d in s)if(m=s[d],G=a[d],s.hasOwnProperty(d)&&(m!=null||G!=null))switch(d){case"value":re=m;break;case"defaultValue":L=m;break;case"multiple":k=m;default:m!==G&&rt(t,n,d,m,s,G)}n=L,a=k,s=ie,re!=null?Gi(t,!!a,re,!1):!!s!=!!a&&(n!=null?Gi(t,!!a,n,!0):Gi(t,!!a,a?[]:"",!1));return;case"textarea":ie=re=null;for(L in a)if(d=a[L],a.hasOwnProperty(L)&&d!=null&&!s.hasOwnProperty(L))switch(L){case"value":break;case"children":break;default:rt(t,n,L,null,s,d)}for(k in s)if(d=s[k],m=a[k],s.hasOwnProperty(k)&&(d!=null||m!=null))switch(k){case"value":re=d;break;case"defaultValue":ie=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(l(91));break;default:d!==m&&rt(t,n,k,d,s,m)}sp(t,re,ie);return;case"option":for(var Se in a)re=a[Se],a.hasOwnProperty(Se)&&re!=null&&!s.hasOwnProperty(Se)&&(Se==="selected"?t.selected=!1:rt(t,n,Se,null,s,re));for(G in s)re=s[G],ie=a[G],s.hasOwnProperty(G)&&re!==ie&&(re!=null||ie!=null)&&(G==="selected"?t.selected=re&&typeof re!="function"&&typeof re!="symbol":rt(t,n,G,re,s,ie));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ae in a)re=a[Ae],a.hasOwnProperty(Ae)&&re!=null&&!s.hasOwnProperty(Ae)&&rt(t,n,Ae,null,s,re);for(ne in s)if(re=s[ne],ie=a[ne],s.hasOwnProperty(ne)&&re!==ie&&(re!=null||ie!=null))switch(ne){case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(l(137,n));break;default:rt(t,n,ne,re,s,ie)}return;default:if(Pu(n)){for(var it in a)re=a[it],a.hasOwnProperty(it)&&re!==void 0&&!s.hasOwnProperty(it)&&Rf(t,n,it,void 0,s,re);for(ae in s)re=s[ae],ie=a[ae],!s.hasOwnProperty(ae)||re===ie||re===void 0&&ie===void 0||Rf(t,n,ae,re,s,ie);return}}for(var Q in a)re=a[Q],a.hasOwnProperty(Q)&&re!=null&&!s.hasOwnProperty(Q)&&rt(t,n,Q,null,s,re);for(fe in s)re=s[fe],ie=a[fe],!s.hasOwnProperty(fe)||re===ie||re==null&&ie==null||rt(t,n,fe,re,s,ie)}function db(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function SS(){if(typeof performance.getEntriesByType=="function"){for(var t=0,n=0,a=performance.getEntriesByType("resource"),s=0;s<a.length;s++){var d=a[s],m=d.transferSize,k=d.initiatorType,L=d.duration;if(m&&L&&db(k)){for(k=0,L=d.responseEnd,s+=1;s<a.length;s++){var G=a[s],ne=G.startTime;if(ne>L)break;var ae=G.transferSize,fe=G.initiatorType;ae&&db(fe)&&(G=G.responseEnd,k+=ae*(G<L?1:(L-ne)/(G-ne)))}if(--s,n+=8*(m+k)/(d.duration/1e3),t++,10<t)break}}if(0<t)return n/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var _f=null,Lf=null;function cs(t){return t.nodeType===9?t:t.ownerDocument}function hb(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function pb(t,n){if(t===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&n==="foreignObject"?0:t}function Df(t,n){return t==="textarea"||t==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Of=null;function kS(){var t=window.event;return t&&t.type==="popstate"?t===Of?!1:(Of=t,!0):(Of=null,!1)}var mb=typeof setTimeout=="function"?setTimeout:void 0,ES=typeof clearTimeout=="function"?clearTimeout:void 0,gb=typeof Promise=="function"?Promise:void 0,CS=typeof queueMicrotask=="function"?queueMicrotask:typeof gb<"u"?function(t){return gb.resolve(null).then(t).catch(NS)}:mb;function NS(t){setTimeout(function(){throw t})}function Kr(t){return t==="head"}function bb(t,n){var a=n,s=0;do{var d=a.nextSibling;if(t.removeChild(a),d&&d.nodeType===8)if(a=d.data,a==="/$"||a==="/&"){if(s===0){t.removeChild(d),El(n);return}s--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")s++;else if(a==="html")Na(t.ownerDocument.documentElement);else if(a==="head"){a=t.ownerDocument.head,Na(a);for(var m=a.firstChild;m;){var k=m.nextSibling,L=m.nodeName;m[hi]||L==="SCRIPT"||L==="STYLE"||L==="LINK"&&m.rel.toLowerCase()==="stylesheet"||a.removeChild(m),m=k}}else a==="body"&&Na(t.ownerDocument.body);a=d}while(a);El(n)}function yb(t,n){var a=t;t=0;do{var s=a.nextSibling;if(a.nodeType===1?n?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(n?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),s&&s.nodeType===8)if(a=s.data,a==="/$"){if(t===0)break;t--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||t++;a=s}while(a)}function Mf(t){var n=t.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var a=n;switch(n=n.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Mf(a),Vl(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function AS(t,n,a,s){for(;t.nodeType===1;){var d=a;if(t.nodeName.toLowerCase()!==n.toLowerCase()){if(!s&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(s){if(!t[hi])switch(n){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(m=t.getAttribute("rel"),m==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(m!==d.rel||t.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||t.getAttribute("title")!==(d.title==null?null:d.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(m=t.getAttribute("src"),(m!==(d.src==null?null:d.src)||t.getAttribute("type")!==(d.type==null?null:d.type)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&m&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(n==="input"&&t.type==="hidden"){var m=d.name==null?null:""+d.name;if(d.type==="hidden"&&t.getAttribute("name")===m)return t}else return t;if(t=On(t.nextSibling),t===null)break}return null}function TS(t,n,a){if(n==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=On(t.nextSibling),t===null))return null;return t}function xb(t,n){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=On(t.nextSibling),t===null))return null;return t}function zf(t){return t.data==="$?"||t.data==="$~"}function Ff(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function jS(t,n){var a=t.ownerDocument;if(t.data==="$~")t._reactRetry=n;else if(t.data!=="$?"||a.readyState!=="loading")n();else{var s=function(){n(),a.removeEventListener("DOMContentLoaded",s)};a.addEventListener("DOMContentLoaded",s),t._reactRetry=s}}function On(t){for(;t!=null;t=t.nextSibling){var n=t.nodeType;if(n===1||n===3)break;if(n===8){if(n=t.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return t}var If=null;function vb(t){t=t.nextSibling;for(var n=0;t;){if(t.nodeType===8){var a=t.data;if(a==="/$"||a==="/&"){if(n===0)return On(t.nextSibling);n--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||n++}t=t.nextSibling}return null}function wb(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(n===0)return t;n--}else a!=="/$"&&a!=="/&"||n++}t=t.previousSibling}return null}function Sb(t,n,a){switch(n=cs(a),t){case"html":if(t=n.documentElement,!t)throw Error(l(452));return t;case"head":if(t=n.head,!t)throw Error(l(453));return t;case"body":if(t=n.body,!t)throw Error(l(454));return t;default:throw Error(l(451))}}function Na(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Vl(t)}var Mn=new Map,kb=new Set;function fs(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Sr=Y.d;Y.d={f:RS,r:_S,D:LS,C:DS,L:OS,m:MS,X:FS,S:zS,M:IS};function RS(){var t=Sr.f(),n=ns();return t||n}function _S(t){var n=Lr(t);n!==null&&n.tag===5&&n.type==="form"?Um(n):Sr.r(t)}var wl=typeof document>"u"?null:document;function Eb(t,n,a){var s=wl;if(s&&typeof n=="string"&&n){var d=An(n);d='link[rel="'+t+'"][href="'+d+'"]',typeof a=="string"&&(d+='[crossorigin="'+a+'"]'),kb.has(d)||(kb.add(d),t={rel:t,crossOrigin:a,href:n},s.querySelector(d)===null&&(n=s.createElement("link"),Ft(n,"link",t),be(n),s.head.appendChild(n)))}}function LS(t){Sr.D(t),Eb("dns-prefetch",t,null)}function DS(t,n){Sr.C(t,n),Eb("preconnect",t,n)}function OS(t,n,a){Sr.L(t,n,a);var s=wl;if(s&&t&&n){var d='link[rel="preload"][as="'+An(n)+'"]';n==="image"&&a&&a.imageSrcSet?(d+='[imagesrcset="'+An(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(d+='[imagesizes="'+An(a.imageSizes)+'"]')):d+='[href="'+An(t)+'"]';var m=d;switch(n){case"style":m=Sl(t);break;case"script":m=kl(t)}Mn.has(m)||(t=g({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:t,as:n},a),Mn.set(m,t),s.querySelector(d)!==null||n==="style"&&s.querySelector(Aa(m))||n==="script"&&s.querySelector(Ta(m))||(n=s.createElement("link"),Ft(n,"link",t),be(n),s.head.appendChild(n)))}}function MS(t,n){Sr.m(t,n);var a=wl;if(a&&t){var s=n&&typeof n.as=="string"?n.as:"script",d='link[rel="modulepreload"][as="'+An(s)+'"][href="'+An(t)+'"]',m=d;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=kl(t)}if(!Mn.has(m)&&(t=g({rel:"modulepreload",href:t},n),Mn.set(m,t),a.querySelector(d)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Ta(m)))return}s=a.createElement("link"),Ft(s,"link",t),be(s),a.head.appendChild(s)}}}function zS(t,n,a){Sr.S(t,n,a);var s=wl;if(s&&t){var d=le(s).hoistableStyles,m=Sl(t);n=n||"default";var k=d.get(m);if(!k){var L={loading:0,preload:null};if(k=s.querySelector(Aa(m)))L.loading=5;else{t=g({rel:"stylesheet",href:t,"data-precedence":n},a),(a=Mn.get(m))&&Bf(t,a);var G=k=s.createElement("link");be(G),Ft(G,"link",t),G._p=new Promise(function(ne,ae){G.onload=ne,G.onerror=ae}),G.addEventListener("load",function(){L.loading|=1}),G.addEventListener("error",function(){L.loading|=2}),L.loading|=4,ds(k,n,s)}k={type:"stylesheet",instance:k,count:1,state:L},d.set(m,k)}}}function FS(t,n){Sr.X(t,n);var a=wl;if(a&&t){var s=le(a).hoistableScripts,d=kl(t),m=s.get(d);m||(m=a.querySelector(Ta(d)),m||(t=g({src:t,async:!0},n),(n=Mn.get(d))&&Uf(t,n),m=a.createElement("script"),be(m),Ft(m,"link",t),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},s.set(d,m))}}function IS(t,n){Sr.M(t,n);var a=wl;if(a&&t){var s=le(a).hoistableScripts,d=kl(t),m=s.get(d);m||(m=a.querySelector(Ta(d)),m||(t=g({src:t,async:!0,type:"module"},n),(n=Mn.get(d))&&Uf(t,n),m=a.createElement("script"),be(m),Ft(m,"link",t),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},s.set(d,m))}}function Cb(t,n,a,s){var d=(d=ce.current)?fs(d):null;if(!d)throw Error(l(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=Sl(a.href),a=le(d).hoistableStyles,s=a.get(n),s||(s={type:"style",instance:null,count:0,state:null},a.set(n,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=Sl(a.href);var m=le(d).hoistableStyles,k=m.get(t);if(k||(d=d.ownerDocument||d,k={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(t,k),(m=d.querySelector(Aa(t)))&&!m._p&&(k.instance=m,k.state.loading=5),Mn.has(t)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Mn.set(t,a),m||BS(d,t,a,k.state))),n&&s===null)throw Error(l(528,""));return k}if(n&&s!==null)throw Error(l(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=kl(a),a=le(d).hoistableScripts,s=a.get(n),s||(s={type:"script",instance:null,count:0,state:null},a.set(n,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,t))}}function Sl(t){return'href="'+An(t)+'"'}function Aa(t){return'link[rel="stylesheet"]['+t+"]"}function Nb(t){return g({},t,{"data-precedence":t.precedence,precedence:null})}function BS(t,n,a,s){t.querySelector('link[rel="preload"][as="style"]['+n+"]")?s.loading=1:(n=t.createElement("link"),s.preload=n,n.addEventListener("load",function(){return s.loading|=1}),n.addEventListener("error",function(){return s.loading|=2}),Ft(n,"link",a),be(n),t.head.appendChild(n))}function kl(t){return'[src="'+An(t)+'"]'}function Ta(t){return"script[async]"+t}function Ab(t,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var s=t.querySelector('style[data-href~="'+An(a.href)+'"]');if(s)return n.instance=s,be(s),s;var d=g({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return s=(t.ownerDocument||t).createElement("style"),be(s),Ft(s,"style",d),ds(s,a.precedence,t),n.instance=s;case"stylesheet":d=Sl(a.href);var m=t.querySelector(Aa(d));if(m)return n.state.loading|=4,n.instance=m,be(m),m;s=Nb(a),(d=Mn.get(d))&&Bf(s,d),m=(t.ownerDocument||t).createElement("link"),be(m);var k=m;return k._p=new Promise(function(L,G){k.onload=L,k.onerror=G}),Ft(m,"link",s),n.state.loading|=4,ds(m,a.precedence,t),n.instance=m;case"script":return m=kl(a.src),(d=t.querySelector(Ta(m)))?(n.instance=d,be(d),d):(s=a,(d=Mn.get(m))&&(s=g({},a),Uf(s,d)),t=t.ownerDocument||t,d=t.createElement("script"),be(d),Ft(d,"link",s),t.head.appendChild(d),n.instance=d);case"void":return null;default:throw Error(l(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(s=n.instance,n.state.loading|=4,ds(s,a.precedence,t));return n.instance}function ds(t,n,a){for(var s=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=s.length?s[s.length-1]:null,m=d,k=0;k<s.length;k++){var L=s[k];if(L.dataset.precedence===n)m=L;else if(m!==d)break}m?m.parentNode.insertBefore(t,m.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(t,n.firstChild))}function Bf(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function Uf(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}var hs=null;function Tb(t,n,a){if(hs===null){var s=new Map,d=hs=new Map;d.set(a,s)}else d=hs,s=d.get(a),s||(s=new Map,d.set(a,s));if(s.has(t))return s;for(s.set(t,null),a=a.getElementsByTagName(t),d=0;d<a.length;d++){var m=a[d];if(!(m[hi]||m[Ct]||t==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var k=m.getAttribute(n)||"";k=t+k;var L=s.get(k);L?L.push(m):s.set(k,[m])}}return s}function jb(t,n,a){t=t.ownerDocument||t,t.head.insertBefore(a,n==="title"?t.querySelector("head > title"):null)}function US(t,n,a){if(a===1||n.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(t=n.disabled,typeof n.precedence=="string"&&t==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function Rb(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function HS(t,n,a,s){if(a.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var d=Sl(s.href),m=n.querySelector(Aa(d));if(m){n=m._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(t.count++,t=ps.bind(t),n.then(t,t)),a.state.loading|=4,a.instance=m,be(m);return}m=n.ownerDocument||n,s=Nb(s),(d=Mn.get(d))&&Bf(s,d),m=m.createElement("link"),be(m);var k=m;k._p=new Promise(function(L,G){k.onload=L,k.onerror=G}),Ft(m,"link",s),a.instance=m}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(t.count++,a=ps.bind(t),n.addEventListener("load",a),n.addEventListener("error",a))}}var Hf=0;function qS(t,n){return t.stylesheets&&t.count===0&&gs(t,t.stylesheets),0<t.count||0<t.imgCount?function(a){var s=setTimeout(function(){if(t.stylesheets&&gs(t,t.stylesheets),t.unsuspend){var m=t.unsuspend;t.unsuspend=null,m()}},6e4+n);0<t.imgBytes&&Hf===0&&(Hf=62500*SS());var d=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&gs(t,t.stylesheets),t.unsuspend)){var m=t.unsuspend;t.unsuspend=null,m()}},(t.imgBytes>Hf?50:800)+n);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(s),clearTimeout(d)}}:null}function ps(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)gs(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var ms=null;function gs(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,ms=new Map,n.forEach(PS,t),ms=null,ps.call(t))}function PS(t,n){if(!(n.state.loading&4)){var a=ms.get(t);if(a)var s=a.get(null);else{a=new Map,ms.set(t,a);for(var d=t.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<d.length;m++){var k=d[m];(k.nodeName==="LINK"||k.getAttribute("media")!=="not all")&&(a.set(k.dataset.precedence,k),s=k)}s&&a.set(null,s)}d=n.instance,k=d.getAttribute("data-precedence"),m=a.get(k)||s,m===s&&a.set(null,d),a.set(k,d),this.count++,s=ps.bind(this),d.addEventListener("load",s),d.addEventListener("error",s),m?m.parentNode.insertBefore(d,m.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(d,t.firstChild)),n.state.loading|=4}}var ja={$$typeof:R,Provider:null,Consumer:null,_currentValue:X,_currentValue2:X,_threadCount:0};function $S(t,n,a,s,d,m,k,L,G){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Hi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hi(0),this.hiddenUpdates=Hi(null),this.identifierPrefix=s,this.onUncaughtError=d,this.onCaughtError=m,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=G,this.incompleteTransitions=new Map}function _b(t,n,a,s,d,m,k,L,G,ne,ae,fe){return t=new $S(t,n,a,k,G,ne,ae,fe,L),n=1,m===!0&&(n|=24),m=pn(3,null,null,n),t.current=m,m.stateNode=t,n=xc(),n.refCount++,t.pooledCache=n,n.refCount++,m.memoizedState={element:s,isDehydrated:a,cache:n},kc(m),t}function Lb(t){return t?(t=el,t):el}function Db(t,n,a,s,d,m){d=Lb(d),s.context===null?s.context=d:s.pendingContext=d,s=Br(n),s.payload={element:a},m=m===void 0?null:m,m!==null&&(s.callback=m),a=Ur(t,s,n),a!==null&&(an(a,t,n),oa(a,t,n))}function Ob(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<n?a:n}}function qf(t,n){Ob(t,n),(t=t.alternate)&&Ob(t,n)}function Mb(t){if(t.tag===13||t.tag===31){var n=yi(t,67108864);n!==null&&an(n,t,67108864),qf(t,67108864)}}function zb(t){if(t.tag===13||t.tag===31){var n=xn();n=$l(n);var a=yi(t,n);a!==null&&an(a,t,n),qf(t,n)}}var bs=!0;function VS(t,n,a,s){var d=U.T;U.T=null;var m=Y.p;try{Y.p=2,Pf(t,n,a,s)}finally{Y.p=m,U.T=d}}function GS(t,n,a,s){var d=U.T;U.T=null;var m=Y.p;try{Y.p=8,Pf(t,n,a,s)}finally{Y.p=m,U.T=d}}function Pf(t,n,a,s){if(bs){var d=$f(s);if(d===null)jf(t,n,s,ys,a),Ib(t,s);else if(XS(d,t,n,a,s))s.stopPropagation();else if(Ib(t,s),n&4&&-1<YS.indexOf(t)){for(;d!==null;){var m=Lr(d);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var k=In(m.pendingLanes);if(k!==0){var L=m;for(L.pendingLanes|=2,L.entangledLanes|=2;k;){var G=1<<31-We(k);L.entanglements[1]|=G,k&=~G}Zn(m),(Qe&6)===0&&(es=Fe()+500,ka(0))}}break;case 31:case 13:L=yi(m,2),L!==null&&an(L,m,2),ns(),qf(m,2)}if(m=$f(s),m===null&&jf(t,n,s,ys,a),m===d)break;d=m}d!==null&&s.stopPropagation()}else jf(t,n,s,null,a)}}function $f(t){return t=Vu(t),Vf(t)}var ys=null;function Vf(t){if(ys=null,t=_r(t),t!==null){var n=u(t);if(n===null)t=null;else{var a=n.tag;if(a===13){if(t=c(n),t!==null)return t;t=null}else if(a===31){if(t=f(n),t!==null)return t;t=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null)}}return ys=t,null}function Fb(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(tr()){case oe:return 2;case pe:return 8;case Te:case ze:return 32;case Xe:return 268435456;default:return 32}default:return 32}}var Gf=!1,Qr=null,Jr=null,Wr=null,Ra=new Map,_a=new Map,ei=[],YS="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Ib(t,n){switch(t){case"focusin":case"focusout":Qr=null;break;case"dragenter":case"dragleave":Jr=null;break;case"mouseover":case"mouseout":Wr=null;break;case"pointerover":case"pointerout":Ra.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":_a.delete(n.pointerId)}}function La(t,n,a,s,d,m){return t===null||t.nativeEvent!==m?(t={blockedOn:n,domEventName:a,eventSystemFlags:s,nativeEvent:m,targetContainers:[d]},n!==null&&(n=Lr(n),n!==null&&Mb(n)),t):(t.eventSystemFlags|=s,n=t.targetContainers,d!==null&&n.indexOf(d)===-1&&n.push(d),t)}function XS(t,n,a,s,d){switch(n){case"focusin":return Qr=La(Qr,t,n,a,s,d),!0;case"dragenter":return Jr=La(Jr,t,n,a,s,d),!0;case"mouseover":return Wr=La(Wr,t,n,a,s,d),!0;case"pointerover":var m=d.pointerId;return Ra.set(m,La(Ra.get(m)||null,t,n,a,s,d)),!0;case"gotpointercapture":return m=d.pointerId,_a.set(m,La(_a.get(m)||null,t,n,a,s,d)),!0}return!1}function Bb(t){var n=_r(t.target);if(n!==null){var a=u(n);if(a!==null){if(n=a.tag,n===13){if(n=c(a),n!==null){t.blockedOn=n,uo(t.priority,function(){zb(a)});return}}else if(n===31){if(n=f(a),n!==null){t.blockedOn=n,uo(t.priority,function(){zb(a)});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function xs(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var a=$f(t.nativeEvent);if(a===null){a=t.nativeEvent;var s=new a.constructor(a.type,a);$u=s,a.target.dispatchEvent(s),$u=null}else return n=Lr(a),n!==null&&Mb(n),t.blockedOn=a,!1;n.shift()}return!0}function Ub(t,n,a){xs(t)&&a.delete(n)}function ZS(){Gf=!1,Qr!==null&&xs(Qr)&&(Qr=null),Jr!==null&&xs(Jr)&&(Jr=null),Wr!==null&&xs(Wr)&&(Wr=null),Ra.forEach(Ub),_a.forEach(Ub)}function vs(t,n){t.blockedOn===n&&(t.blockedOn=null,Gf||(Gf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,ZS)))}var ws=null;function Hb(t){ws!==t&&(ws=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ws===t&&(ws=null);for(var n=0;n<t.length;n+=3){var a=t[n],s=t[n+1],d=t[n+2];if(typeof s!="function"){if(Vf(s||a)===null)continue;break}var m=Lr(a);m!==null&&(t.splice(n,3),n-=3,Pc(m,{pending:!0,data:d,method:a.method,action:s},s,d))}}))}function El(t){function n(G){return vs(G,t)}Qr!==null&&vs(Qr,t),Jr!==null&&vs(Jr,t),Wr!==null&&vs(Wr,t),Ra.forEach(n),_a.forEach(n);for(var a=0;a<ei.length;a++){var s=ei[a];s.blockedOn===t&&(s.blockedOn=null)}for(;0<ei.length&&(a=ei[0],a.blockedOn===null);)Bb(a),a.blockedOn===null&&ei.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(s=0;s<a.length;s+=3){var d=a[s],m=a[s+1],k=d[Ht]||null;if(typeof m=="function")k||Hb(a);else if(k){var L=null;if(m&&m.hasAttribute("formAction")){if(d=m,k=m[Ht]||null)L=k.formAction;else if(Vf(d)!==null)continue}else L=k.action;typeof L=="function"?a[s+1]=L:(a.splice(s,3),s-=3),Hb(a)}}}function qb(){function t(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(k){return d=k})},focusReset:"manual",scroll:"manual"})}function n(){d!==null&&(d(),d=null),s||setTimeout(a,20)}function a(){if(!s&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,d=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(a,100),function(){s=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),d!==null&&(d(),d=null)}}}function Yf(t){this._internalRoot=t}Ss.prototype.render=Yf.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error(l(409));var a=n.current,s=xn();Db(a,s,t,n,null,null)},Ss.prototype.unmount=Yf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var n=t.containerInfo;Db(t.current,2,null,t,null,null),ns(),n[Cn]=null}};function Ss(t){this._internalRoot=t}Ss.prototype.unstable_scheduleHydration=function(t){if(t){var n=ir();t={blockedOn:null,target:t,priority:n};for(var a=0;a<ei.length&&n!==0&&n<ei[a].priority;a++);ei.splice(a,0,t),a===0&&Bb(t)}};var Pb=r.version;if(Pb!=="19.2.4")throw Error(l(527,Pb,"19.2.4"));Y.findDOMNode=function(t){var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error(l(188)):(t=Object.keys(t).join(","),Error(l(268,t)));return t=h(n),t=t!==null?b(t):null,t=t===null?null:t.stateNode,t};var KS={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ks=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ks.isDisabled&&ks.supportsFiber)try{Lt=ks.inject(KS),bt=ks}catch{}}return Oa.createRoot=function(t,n){if(!o(t))throw Error(l(299));var a=!1,s="",d=Km,m=Qm,k=Jm;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onUncaughtError!==void 0&&(d=n.onUncaughtError),n.onCaughtError!==void 0&&(m=n.onCaughtError),n.onRecoverableError!==void 0&&(k=n.onRecoverableError)),n=_b(t,1,!1,null,null,a,s,null,d,m,k,qb),t[Cn]=n.current,Tf(t),new Yf(n)},Oa.hydrateRoot=function(t,n,a){if(!o(t))throw Error(l(299));var s=!1,d="",m=Km,k=Qm,L=Jm,G=null;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(d=a.identifierPrefix),a.onUncaughtError!==void 0&&(m=a.onUncaughtError),a.onCaughtError!==void 0&&(k=a.onCaughtError),a.onRecoverableError!==void 0&&(L=a.onRecoverableError),a.formState!==void 0&&(G=a.formState)),n=_b(t,1,!0,n,a??null,s,d,G,m,k,L,qb),n.context=Lb(null),a=n.current,s=xn(),s=$l(s),d=Br(s),d.callback=null,Ur(a,d,s),a=s,n.current.lanes=a,rr(n,a),Zn(n),t[Cn]=n.current,Tf(t),new Ss(n)},Oa.version="19.2.4",Oa}var ey;function g2(){if(ey)return Kf.exports;ey=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),Kf.exports=m2(),Kf.exports}var b2=g2();const y2=yu(b2),f1=["shift","alt","meta","mod","ctrl","control"],x2={esc:"escape",return:"enter",left:"arrowleft",right:"arrowright",up:"arrowup",down:"arrowdown",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function ui(e){return(x2[e.trim()]||e.trim()).toLowerCase().replace(/key|digit|numpad/,"")}function d1(e){return f1.includes(e)}function ed(e,r=","){return e.toLowerCase().split(r)}function td(e,r="+",i=">",l=!1,o,u){let c=[],f=!1;e=e.trim(),e.includes(i)?(f=!0,c=e.toLocaleLowerCase().split(i).map(b=>ui(b))):c=e.toLocaleLowerCase().split(r).map(b=>ui(b));const p={alt:c.includes("alt"),ctrl:c.includes("ctrl")||c.includes("control"),shift:c.includes("shift"),meta:c.includes("meta"),mod:c.includes("mod"),useKey:l},h=c.filter(b=>!f1.includes(b));return{...p,keys:h,description:o,isSequence:f,hotkey:e,metadata:u}}typeof document<"u"&&(document.addEventListener("keydown",e=>{e.code!==void 0&&h1([ui(e.code)])}),document.addEventListener("keyup",e=>{e.code!==void 0&&p1([ui(e.code)])})),typeof window<"u"&&(window.addEventListener("blur",()=>{Er.clear()}),window.addEventListener("contextmenu",()=>{setTimeout(()=>{Er.clear()},0)}));const Er=new Set;function wh(e){return Array.isArray(e)}function v2(e,r=","){return(wh(e)?e:e.split(r)).every(i=>Er.has(i.trim().toLowerCase()))}function h1(e){const r=Array.isArray(e)?e:[e];Er.has("meta")&&Er.forEach(i=>{d1(i)||Er.delete(i.toLowerCase())}),r.forEach(i=>{Er.add(i.toLowerCase())})}function p1(e){const r=Array.isArray(e)?e:[e];e==="meta"?Er.clear():r.forEach(i=>{Er.delete(i.toLowerCase())})}function w2(e,r,i){(typeof i=="function"&&i(e,r)||i===!0)&&e.preventDefault()}function S2(e,r,i){return typeof i=="function"?i(e,r):i===!0||i===void 0}const k2=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"];function E2(e){return m1(e,k2)}function m1(e,r=!1){const{target:i,composed:l}=e;let o,u;return C2(i)&&l?(o=e.composedPath()[0]&&e.composedPath()[0].tagName,u=e.composedPath()[0]&&e.composedPath()[0].role):(o=i&&i.tagName,u=i&&i.role),wh(r)?!!(o&&r&&r.some(c=>c.toLowerCase()===o.toLowerCase()||c===u)):!!(o&&r&&r)}function C2(e){return!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-")}function N2(e,r){return e.length===0&&r?!1:r?e.some(i=>r.includes(i))||e.includes("*"):!0}const A2=(e,r,i=!1)=>{const{alt:l,meta:o,mod:u,shift:c,ctrl:f,keys:p,useKey:h}=r,{code:b,key:g,ctrlKey:w,metaKey:x,shiftKey:v,altKey:S}=e,C=ui(b);if(h&&p?.length===1&&p.includes(g.toLowerCase()))return!0;if(!p?.includes(C)&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(C))return!1;if(!i){if(l!==S&&C!=="alt"||c!==v&&C!=="shift")return!1;if(u){if(!x&&!w)return!1}else if(o!==x&&C!=="meta"&&C!=="os"||f!==w&&C!=="ctrl"&&C!=="control")return!1}return p&&p.length===1&&p.includes(C)?!0:p&&p.length>0?p.includes(C)?v2(p):!1:!p||p.length===0},g1=A.createContext(void 0),T2=()=>A.useContext(g1);function j2({addHotkey:e,removeHotkey:r,children:i}){return y.jsx(g1.Provider,{value:{addHotkey:e,removeHotkey:r},children:i})}function Sh(e,r){return e&&r&&typeof e=="object"&&typeof r=="object"?Object.keys(e).length===Object.keys(r).length&&Object.keys(e).reduce((i,l)=>i&&Sh(e[l],r[l]),!0):e===r}const b1=A.createContext({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),eo=()=>A.useContext(b1),R2=({initiallyActiveScopes:e=["*"],children:r})=>{const[i,l]=A.useState(e),[o,u]=A.useState([]),c=A.useCallback(g=>{l(w=>w.includes("*")?[g]:Array.from(new Set([...w,g])))},[]),f=A.useCallback(g=>{l(w=>w.filter(x=>x!==g))},[]),p=A.useCallback(g=>{l(w=>w.includes(g)?w.filter(x=>x!==g):w.includes("*")?[g]:Array.from(new Set([...w,g])))},[]),h=A.useCallback(g=>{u(w=>[...w,g])},[]),b=A.useCallback(g=>{u(w=>w.filter(x=>!Sh(x,g)))},[]);return y.jsx(b1.Provider,{value:{activeScopes:i,hotkeys:o,enableScope:c,disableScope:f,toggleScope:p},children:y.jsx(j2,{addHotkey:h,removeHotkey:b,children:r})})};function _2(e){const r=A.useRef(void 0);return Sh(r.current,e)||(r.current=e),r.current}const ty=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},L2=typeof window<"u"?A.useLayoutEffect:A.useEffect;function lt(e,r,i,l){const o=A.useRef(null),u=A.useRef(!1),c=Array.isArray(i)?Array.isArray(l)?void 0:l:i,f=wh(e)?e.join(c?.delimiter):e,p=Array.isArray(i)?i:Array.isArray(l)?l:void 0,h=A.useCallback(r,p??[]),b=A.useRef(h);p?b.current=h:b.current=r;const g=_2(c),{activeScopes:w}=eo(),x=T2();return L2(()=>{if(g?.enabled===!1||!N2(w,g?.scopes))return;let v=[],S;const C=(O,H=!1)=>{if(!(E2(O)&&!m1(O,g?.enableOnFormTags))){if(o.current!==null){const _=o.current.getRootNode();if((_ instanceof Document||_ instanceof ShadowRoot)&&_.activeElement!==o.current&&!o.current.contains(_.activeElement)){ty(O);return}}O.target?.isContentEditable&&!g?.enableOnContentEditable||ed(f,g?.delimiter).forEach(_=>{if(_.includes(g?.splitKey??"+")&&_.includes(g?.sequenceSplitKey??">")){console.warn(`Hotkey ${_} contains both ${g?.splitKey??"+"} and ${g?.sequenceSplitKey??">"} which is not supported.`);return}const F=td(_,g?.splitKey,g?.sequenceSplitKey,g?.useKey,g?.description,g?.metadata);if(F.isSequence){S=setTimeout(()=>{v=[]},g?.sequenceTimeoutMs??1e3);const z=F.useKey?O.key:ui(O.code);if(d1(z.toLowerCase()))return;v.push(z);const B=F.keys?.[v.length-1];if(z!==B){v=[],S&&clearTimeout(S);return}v.length===F.keys?.length&&(b.current(O,F),S&&clearTimeout(S),v=[])}else if(A2(O,F,g?.ignoreModifiers)||F.keys?.includes("*")){if(g?.ignoreEventWhen?.(O)||H&&u.current)return;if(w2(O,F,g?.preventDefault),!S2(O,F,g?.enabled)){ty(O);return}b.current(O,F),H||(u.current=!0)}})}},N=O=>{O.code!==void 0&&(h1(ui(O.code)),(g?.keydown===void 0&&g?.keyup!==!0||g?.keydown)&&C(O))},E=O=>{O.code!==void 0&&(p1(ui(O.code)),u.current=!1,g?.keyup&&C(O,!0))},R=o.current||c?.document||document;return R.addEventListener("keyup",E,c?.eventListenerOptions),R.addEventListener("keydown",N,c?.eventListenerOptions),x&&ed(f,g?.delimiter).forEach(O=>{x.addHotkey(td(O,g?.splitKey,g?.sequenceSplitKey,g?.useKey,g?.description,g?.metadata))}),()=>{R.removeEventListener("keyup",E,c?.eventListenerOptions),R.removeEventListener("keydown",N,c?.eventListenerOptions),x&&ed(f,g?.delimiter).forEach(O=>{x.removeHotkey(td(O,g?.splitKey,g?.sequenceSplitKey,g?.useKey,g?.description,g?.metadata))}),v=[],S&&clearTimeout(S)}},[f,g,w]),o}const y1=(...e)=>e.filter((r,i,l)=>!!r&&r.trim()!==""&&l.indexOf(r)===i).join(" ").trim();const D2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const O2=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,i,l)=>l?l.toUpperCase():i.toLowerCase());const ny=e=>{const r=O2(e);return r.charAt(0).toUpperCase()+r.slice(1)};var M2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const z2=e=>{for(const r in e)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1};const F2=A.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:i=2,absoluteStrokeWidth:l,className:o="",children:u,iconNode:c,...f},p)=>A.createElement("svg",{ref:p,...M2,width:r,height:r,stroke:e,strokeWidth:l?Number(i)*24/Number(r):i,className:y1("lucide",o),...!u&&!z2(f)&&{"aria-hidden":"true"},...f},[...c.map(([h,b])=>A.createElement(h,b)),...Array.isArray(u)?u:[u]]));const Ve=(e,r)=>{const i=A.forwardRef(({className:l,...o},u)=>A.createElement(F2,{ref:u,iconNode:r,className:y1(`lucide-${D2(ny(e))}`,`lucide-${e}`,l),...o}));return i.displayName=ny(e),i};const I2=[["path",{d:"M19 3H5",key:"1236rx"}],["path",{d:"M12 21V7",key:"gj6g52"}],["path",{d:"m6 15 6 6 6-6",key:"h15q88"}]],B2=Ve("arrow-down-from-line",I2);const U2=[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]],H2=Ve("arrow-up-from-line",U2);const q2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Xa=Ve("check",q2);const P2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],zl=Ve("chevron-down",P2);const $2=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],V2=Ve("chevron-left",$2);const G2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],x1=Ve("chevron-right",G2);const Y2=[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]],X2=Ve("chevrons-down-up",Y2);const Z2=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],K2=Ve("chevrons-up-down",Z2);const Q2=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],J2=Ve("code",Q2);const W2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],ek=Ve("columns-2",W2);const tk=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],v1=Ve("copy",tk);const nk=[["path",{d:"M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21",key:"g5wo59"}],["path",{d:"m5.082 11.09 8.828 8.828",key:"1wx5vj"}]],rk=Ve("eraser",nk);const ik=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],lk=Ve("external-link",ik);const ak=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Bs=Ve("eye",ak);const ok=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]],xu=Ve("file-diff",ok);const sk=[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]],w1=Ve("file-pen",sk);const uk=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]],S1=Ve("file-plus",uk);const ck=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m14.5 12.5-5 5",key:"b62r18"}],["path",{d:"m9.5 12.5 5 5",key:"1rk7el"}]],k1=Ve("file-x",ck);const fk=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],dk=Ve("folder-open",fk);const hk=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],pk=Ve("folder",hk);const mk=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],gk=Ve("git-branch",mk);const bk=[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]],yk=Ve("keyboard",bk);const xk=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],vk=Ve("list",xk);const wk=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Sk=Ve("loader-circle",wk);const kk=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],E1=Ve("message-square",kk);const Ek=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],Ck=Ve("panel-left-close",Ek);const Nk=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],Ak=Ve("panel-left",Nk);const Tk=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],jk=Ve("pen",Tk);const Rk=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],_k=Ve("refresh-cw",Rk);const Lk=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Dk=Ve("search",Lk);const Ok=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],C1=Ve("settings",Ok);const Mk=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],zk=Ve("square",Mk);const Fk=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],Ik=Ve("text-align-start",Fk);const Bk=[["path",{d:"M12 22v-6",key:"6o8u61"}],["path",{d:"M12 8V2",key:"1wkif3"}],["path",{d:"M4 12H2",key:"rhcxmi"}],["path",{d:"M10 12H8",key:"s88cx1"}],["path",{d:"M16 12h-2",key:"10asgb"}],["path",{d:"M22 12h-2",key:"14jgyd"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m15 5-3-3-3 3",key:"itvq4r"}]],Uk=Ve("unfold-vertical",Bk);const Hk=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],vu=Ve("x",Hk),to="split";function qk(e){switch(e){case"split":case"side-by-side":return"split";case"unified":case"inline":return"unified";default:return to}}function N1({checked:e,onChange:r,label:i,className:l="",title:o}){const u=f=>{f.stopPropagation(),r(!e)},c=f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),f.stopPropagation(),r(!e))};return y.jsxs("div",{className:`flex items-center gap-2 text-xs text-github-text-primary cursor-pointer ${l}`,title:o,onClick:u,onKeyDown:c,role:"checkbox","aria-checked":e,tabIndex:0,children:[y.jsx("div",{className:`w-4 h-4 rounded border flex items-center justify-center transition-all duration-200 cursor-pointer ${e?"bg-github-accent border-github-accent":"bg-github-bg-tertiary border-github-text-muted hover:border-github-accent/50"}`,children:e&&y.jsx(Xa,{size:10,className:"text-white"})}),i&&y.jsx("span",{className:"select-none",children:i})]})}function ry({commentsCount:e,isCopiedAll:r,onCopyAll:i,onDeleteAll:l,onViewAll:o,direction:u="down",compact:c=!1}){const[f,p]=A.useState(!1),h=A.useRef(null),b=c,g=u==="up";A.useEffect(()=>{const C=N=>{h.current&&!h.current.contains(N.target)&&p(!1)};return document.addEventListener("mousedown",C),()=>document.removeEventListener("mousedown",C)},[]);const w=()=>{i(),p(!1)},x=()=>{l(),p(!1)},v=()=>{o?.(),p(!1)},S=b?r?"Copied":`Copy All (${e})`:r?"Copied All!":`Copy All Prompt (${e})`;return y.jsxs("div",{className:"relative",ref:h,children:[y.jsxs("div",{className:"flex",children:[y.jsxs("button",{onClick:w,className:`text-xs px-3 py-1.5 pr-2 rounded-l transition-all flex items-center gap-1.5 ${b?"whitespace-normal":"whitespace-nowrap"}`,style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",border:"1px solid var(--color-yellow-btn-border)",borderRight:"none"},onMouseEnter:C=>{C.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",C.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:C=>{C.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",C.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},title:`Copy all ${e} comments to AI coding agent`,children:[r?y.jsx(Xa,{size:12}):y.jsx(v1,{size:12}),S]}),y.jsx("button",{onClick:()=>p(!f),className:"text-xs px-2 py-1.5 rounded-r transition-all flex items-center border-l",style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",borderTop:"1px solid var(--color-yellow-btn-border)",borderRight:"1px solid var(--color-yellow-btn-border)",borderBottom:"1px solid var(--color-yellow-btn-border)",borderLeft:"1px solid var(--color-yellow-btn-border)"},onMouseEnter:C=>{C.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",C.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:C=>{C.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",C.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},title:"More options",children:y.jsx(zl,{size:12,className:`transition-transform duration-200 ${f?"rotate-180":""}`})})]}),f&&y.jsxs("div",{className:`absolute left-0 right-0 bg-github-bg-primary border border-github-border z-50 pb-px ${g?"bottom-full rounded-t":"top-full rounded-b"}`,style:{borderTop:g?void 0:"none",borderBottom:g?"none":void 0},children:[o&&y.jsxs("button",{onClick:v,className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 text-github-text-primary hover:bg-github-bg-tertiary transition-colors",disabled:e===0,children:[y.jsx(vk,{size:12}),"View All Comments"]}),y.jsxs("button",{onClick:x,className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 text-github-text-primary hover:bg-github-bg-tertiary transition-colors",children:[y.jsx(rk,{size:12}),"Cleanup All Prompt"]})]})]})}function A1(e){return/```suggestion\n([\s\S]*?)```/.test(e)}function T1(e){const r=[],i=/```suggestion\n([\s\S]*?)```/g;let l;for(;(l=i.exec(e))!==null;)r.push({suggestedCode:l[1].replace(/\n$/,""),startIndex:l.index,endIndex:l.index+l[0].length});return r}function Pk(e){return`\`\`\`suggestion
|
|
10
|
-
${e.endsWith(`
|
|
11
|
-
`)?e:e+`
|
|
12
|
-
`}\`\`\``}const $k=2,Vk=100;function Gk(e){return!(e.length<$k||e.length>Vk)}function iy(e){return e.toLowerCase()}function ly(e){const r=e.trim();return r?r.match(/^\w+$/)!==null&&Gk(r):!1}const Yk=200,j1=A.createContext(void 0);function Xk({children:e}){const[r,i]=A.useState(null),l=A.useRef(null),o=A.useCallback(()=>{l.current&&(clearTimeout(l.current),l.current=null)},[]),u=A.useCallback(h=>{const b=h.target;if(!b.classList.contains("word-token"))return;o();const g=b.getAttribute("data-word");g&&(l.current=setTimeout(()=>{i(g)},Yk))},[o]),c=A.useCallback(()=>{o(),i(null)},[o]),f=A.useCallback(h=>r?iy(h)===iy(r):!1,[r]);A.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]);const p=A.useMemo(()=>({highlightedWord:r,handleMouseOver:u,handleMouseOut:c,isWordHighlighted:f}),[r,u,c,f]);return y.jsx(j1.Provider,{value:p,children:e})}function Zk(){const e=A.useContext(j1);if(!e)throw new Error("useWordHighlight must be used within a WordHighlightProvider");return e}function R1(e){var r,i,l="";if(typeof e=="string"||typeof e=="number")l+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(r=0;r<o;r++)e[r]&&(i=R1(e[r]))&&(l&&(l+=" "),l+=i)}else for(i in e)e[i]&&(l&&(l+=" "),l+=i);return l}function _1(){for(var e,r,i=0,l="",o=arguments.length;i<o;i++)(e=arguments[i])&&(r=R1(e))&&(l&&(l+=" "),l+=r);return l}var Kk=Object.create,wu=Object.defineProperty,Qk=Object.defineProperties,Jk=Object.getOwnPropertyDescriptor,Wk=Object.getOwnPropertyDescriptors,L1=Object.getOwnPropertyNames,Us=Object.getOwnPropertySymbols,eE=Object.getPrototypeOf,kh=Object.prototype.hasOwnProperty,D1=Object.prototype.propertyIsEnumerable,ay=(e,r,i)=>r in e?wu(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,Qn=(e,r)=>{for(var i in r||(r={}))kh.call(r,i)&&ay(e,i,r[i]);if(Us)for(var i of Us(r))D1.call(r,i)&&ay(e,i,r[i]);return e},Su=(e,r)=>Qk(e,Wk(r)),O1=(e,r)=>{var i={};for(var l in e)kh.call(e,l)&&r.indexOf(l)<0&&(i[l]=e[l]);if(e!=null&&Us)for(var l of Us(e))r.indexOf(l)<0&&D1.call(e,l)&&(i[l]=e[l]);return i},tE=(e,r)=>function(){return r||(0,e[L1(e)[0]])((r={exports:{}}).exports,r),r.exports},nE=(e,r)=>{for(var i in r)wu(e,i,{get:r[i],enumerable:!0})},rE=(e,r,i,l)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of L1(r))!kh.call(e,o)&&o!==i&&wu(e,o,{get:()=>r[o],enumerable:!(l=Jk(r,o))||l.enumerable});return e},iE=(e,r,i)=>(i=e!=null?Kk(eE(e)):{},rE(!e||!e.__esModule?wu(i,"default",{value:e,enumerable:!0}):i,e)),lE=tE({"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,r){var i=(function(){var l=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,u={},c={util:{encode:function v(S){return S instanceof f?new f(S.type,v(S.content),S.alias):Array.isArray(S)?S.map(v):S.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(v){return Object.prototype.toString.call(v).slice(8,-1)},objId:function(v){return v.__id||Object.defineProperty(v,"__id",{value:++o}),v.__id},clone:function v(S,C){C=C||{};var N,E;switch(c.util.type(S)){case"Object":if(E=c.util.objId(S),C[E])return C[E];N={},C[E]=N;for(var R in S)S.hasOwnProperty(R)&&(N[R]=v(S[R],C));return N;case"Array":return E=c.util.objId(S),C[E]?C[E]:(N=[],C[E]=N,S.forEach(function(O,H){N[H]=v(O,C)}),N);default:return S}},getLanguage:function(v){for(;v;){var S=l.exec(v.className);if(S)return S[1].toLowerCase();v=v.parentElement}return"none"},setLanguage:function(v,S){v.className=v.className.replace(RegExp(l,"gi"),""),v.classList.add("language-"+S)},isActive:function(v,S,C){for(var N="no-"+S;v;){var E=v.classList;if(E.contains(S))return!0;if(E.contains(N))return!1;v=v.parentElement}return!!C}},languages:{plain:u,plaintext:u,text:u,txt:u,extend:function(v,S){var C=c.util.clone(c.languages[v]);for(var N in S)C[N]=S[N];return C},insertBefore:function(v,S,C,N){N=N||c.languages;var E=N[v],R={};for(var O in E)if(E.hasOwnProperty(O)){if(O==S)for(var H in C)C.hasOwnProperty(H)&&(R[H]=C[H]);C.hasOwnProperty(O)||(R[O]=E[O])}var _=N[v];return N[v]=R,c.languages.DFS(c.languages,function(F,z){z===_&&F!=v&&(this[F]=R)}),R},DFS:function v(S,C,N,E){E=E||{};var R=c.util.objId;for(var O in S)if(S.hasOwnProperty(O)){C.call(S,O,S[O],N||O);var H=S[O],_=c.util.type(H);_==="Object"&&!E[R(H)]?(E[R(H)]=!0,v(H,C,null,E)):_==="Array"&&!E[R(H)]&&(E[R(H)]=!0,v(H,C,O,E))}}},plugins:{},highlight:function(v,S,C){var N={code:v,grammar:S,language:C};if(c.hooks.run("before-tokenize",N),!N.grammar)throw new Error('The language "'+N.language+'" has no grammar.');return N.tokens=c.tokenize(N.code,N.grammar),c.hooks.run("after-tokenize",N),f.stringify(c.util.encode(N.tokens),N.language)},tokenize:function(v,S){var C=S.rest;if(C){for(var N in C)S[N]=C[N];delete S.rest}var E=new b;return g(E,E.head,v),h(v,E,S,E.head,0),x(E)},hooks:{all:{},add:function(v,S){var C=c.hooks.all;C[v]=C[v]||[],C[v].push(S)},run:function(v,S){var C=c.hooks.all[v];if(!(!C||!C.length))for(var N=0,E;E=C[N++];)E(S)}},Token:f};function f(v,S,C,N){this.type=v,this.content=S,this.alias=C,this.length=(N||"").length|0}f.stringify=function v(S,C){if(typeof S=="string")return S;if(Array.isArray(S)){var N="";return S.forEach(function(_){N+=v(_,C)}),N}var E={type:S.type,content:v(S.content,C),tag:"span",classes:["token",S.type],attributes:{},language:C},R=S.alias;R&&(Array.isArray(R)?Array.prototype.push.apply(E.classes,R):E.classes.push(R)),c.hooks.run("wrap",E);var O="";for(var H in E.attributes)O+=" "+H+'="'+(E.attributes[H]||"").replace(/"/g,""")+'"';return"<"+E.tag+' class="'+E.classes.join(" ")+'"'+O+">"+E.content+"</"+E.tag+">"};function p(v,S,C,N){v.lastIndex=S;var E=v.exec(C);if(E&&N&&E[1]){var R=E[1].length;E.index+=R,E[0]=E[0].slice(R)}return E}function h(v,S,C,N,E,R){for(var O in C)if(!(!C.hasOwnProperty(O)||!C[O])){var H=C[O];H=Array.isArray(H)?H:[H];for(var _=0;_<H.length;++_){if(R&&R.cause==O+","+_)return;var F=H[_],z=F.inside,B=!!F.lookbehind,M=!!F.greedy,$=F.alias;if(M&&!F.pattern.global){var V=F.pattern.toString().match(/[imsuy]*$/)[0];F.pattern=RegExp(F.pattern.source,V+"g")}for(var J=F.pattern||F,I=N.next,Z=E;I!==S.tail&&!(R&&Z>=R.reach);Z+=I.value.length,I=I.next){var U=I.value;if(S.length>v.length)return;if(!(U instanceof f)){var Y=1,X;if(M){if(X=p(J,Z,v,B),!X||X.index>=v.length)break;var P=X.index,q=X.index+X[0].length,j=Z;for(j+=I.value.length;P>=j;)I=I.next,j+=I.value.length;if(j-=I.value.length,Z=j,I.value instanceof f)continue;for(var D=I;D!==S.tail&&(j<q||typeof D.value=="string");D=D.next)Y++,j+=D.value.length;Y--,U=v.slice(Z,j),X.index-=Z}else if(X=p(J,0,U,B),!X)continue;var P=X.index,T=X[0],W=U.slice(0,P),te=U.slice(P+T.length),ce=Z+U.length;R&&ce>R.reach&&(R.reach=ce);var me=I.prev;W&&(me=g(S,me,W),Z+=W.length),w(S,me,Y);var xe=new f(O,z?c.tokenize(T,z):T,$,T);if(I=g(S,me,xe),te&&g(S,I,te),Y>1){var ge={cause:O+","+_,reach:ce};h(v,S,C,I.prev,Z,ge),R&&ge.reach>R.reach&&(R.reach=ge.reach)}}}}}}function b(){var v={value:null,prev:null,next:null},S={value:null,prev:v,next:null};v.next=S,this.head=v,this.tail=S,this.length=0}function g(v,S,C){var N=S.next,E={value:C,prev:S,next:N};return S.next=E,N.prev=E,v.length++,E}function w(v,S,C){for(var N=S.next,E=0;E<C&&N!==v.tail;E++)N=N.next;S.next=N,N.prev=S,v.length-=E}function x(v){for(var S=[],C=v.head.next;C!==v.tail;)S.push(C.value),C=C.next;return S}return c})();r.exports=i,i.default=i}}),ue=iE(lE());ue.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]},ue.languages.markup.tag.inside["attr-value"].inside.entity=ue.languages.markup.entity,ue.languages.markup.doctype.inside["internal-subset"].inside=ue.languages.markup,ue.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(ue.languages.markup.tag,"addInlined",{value:function(e,l){var i={},i=(i["language-"+l]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:ue.languages[l]},i.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:i}}),l=(i["language-"+l]={pattern:/[\s\S]+/,inside:ue.languages[l]},{});l[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:i},ue.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(ue.languages.markup.tag,"addAttribute",{value:function(e,r){ue.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\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:[r,"language-"+r],inside:ue.languages[r]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),ue.languages.html=ue.languages.markup,ue.languages.mathml=ue.languages.markup,ue.languages.svg=ue.languages.markup,ue.languages.xml=ue.languages.extend("markup",{}),ue.languages.ssml=ue.languages.xml,ue.languages.atom=ue.languages.xml,ue.languages.rss=ue.languages.xml,(function(e){var r={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},i=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,l="(?:[^\\\\-]|"+i.source+")",l=RegExp(l+"-"+l),o={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:l,inside:{escape:i,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":r,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:i}},"special-escape":r,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":o}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:i,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":o}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}})(ue),ue.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:/[{}[\];(),.:]/},ue.languages.javascript=ue.languages.extend("clike",{"class-name":[ue.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}|\?\?=?|\?\.?|[~:]/}),ue.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,ue.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:ue.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:ue.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:ue.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:ue.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:ue.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),ue.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:ue.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"}}),ue.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),ue.languages.markup&&(ue.languages.markup.tag.addInlined("script","javascript"),ue.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")),ue.languages.js=ue.languages.javascript,ue.languages.actionscript=ue.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),ue.languages.actionscript["class-name"].alias="function",delete ue.languages.actionscript.parameter,delete ue.languages.actionscript["literal-property"],ue.languages.markup&&ue.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:ue.languages.markup}}),(function(e){var r=/#(?!\{).+/,i={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:r,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:i}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:r,interpolation:i}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:i}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript})(ue),(function(e){var r=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(r,"addSupport",{value:function(i,l){(i=typeof i=="string"?[i]:i).forEach(function(o){var u=function(g){g.inside||(g.inside={}),g.inside.rest=l},c="doc-comment";if(f=e.languages[o]){var f,p=f[c];if((p=p||(f=e.languages.insertBefore(o,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[c])instanceof RegExp&&(p=f[c]={pattern:p}),Array.isArray(p))for(var h=0,b=p.length;h<b;h++)p[h]instanceof RegExp&&(p[h]={pattern:p[h]}),u(p[h]);else u(p)}})}}),r.addSupport(["java","javascript","php"],r)})(ue),(function(e){var r=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,r=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+r.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\\((?:"+r.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+r.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+r.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:r,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:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,e.languages.markup);r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(ue),(function(e){var r=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,r=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:r={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp(`\\[(?:[^[\\]"']|`+r.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[r,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=r,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),i={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:i,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:i})})(ue),(function(e){var r=/[*&][^\s[\]{},]+/,i=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,l="(?:"+i.source+"(?:[ ]+"+r.source+")?|"+r.source+"(?:[ ]+"+i.source+")?)",o=/(?:[^\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}),u=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function c(f,p){p=(p||"").replace(/m/g,"")+"m";var h=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return l}).replace(/<<value>>/g,function(){return f});return RegExp(h,p)}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 l})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return l}).replace(/<<key>>/g,function(){return"(?:"+o+"|"+u+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:c(/\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:c(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:c(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:c(u),lookbehind:!0,greedy:!0},number:{pattern:c(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:i,important:r,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml})(ue),(function(e){var r=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function i(h){return h=h.replace(/<inner>/g,function(){return r}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+h+")")}var l=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return l}),u=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,c=(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("^"+o+u+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+u+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(l),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+u+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(l),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:i(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:i(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:i(/(~~?)(?:(?!~)<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:i(/!?\[(?:(?!\])<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(h){["url","bold","italic","strike","code-snippet"].forEach(function(b){h!==b&&(e.languages.markdown[h].inside.content.inside[b]=e.languages.markdown[b])})}),e.hooks.add("after-tokenize",function(h){h.language!=="markdown"&&h.language!=="md"||(function b(g){if(g&&typeof g!="string")for(var w=0,x=g.length;w<x;w++){var v,S=g[w];S.type!=="code"?b(S.content):(v=S.content[1],S=S.content[3],v&&S&&v.type==="code-language"&&S.type==="code-block"&&typeof v.content=="string"&&(v=v.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),v="language-"+(v=(/[a-z][\w-]*/i.exec(v)||[""])[0].toLowerCase()),S.alias?typeof S.alias=="string"?S.alias=[S.alias,v]:S.alias.push(v):S.alias=[v]))}})(h.tokens)}),e.hooks.add("wrap",function(h){if(h.type==="code-block"){for(var b="",g=0,w=h.classes.length;g<w;g++){var x=h.classes[g],x=/language-(.+)/.exec(x);if(x){b=x[1];break}}var v,S=e.languages[b];S?h.content=e.highlight((function(C){return C=C.replace(c,""),C=C.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(N,E){var R;return(E=E.toLowerCase())[0]==="#"?(R=E[1]==="x"?parseInt(E.slice(2),16):Number(E.slice(1)),p(R)):f[E]||N})})(h.content),S,b):b&&b!=="none"&&e.plugins.autoloader&&(v="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random()),h.attributes.id=v,e.plugins.autoloader.loadLanguages(b,function(){var C=document.getElementById(v);C&&(C.innerHTML=e.highlight(C.textContent,e.languages[b],b))}))}}),RegExp(e.languages.markup.tag.pattern.source,"gi")),f={amp:"&",lt:"<",gt:">",quot:'"'},p=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown})(ue),ue.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:ue.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+/},ue.hooks.add("after-tokenize",function(e){if(e.language==="graphql")for(var r=e.tokens.filter(function(v){return typeof v!="string"&&v.type!=="comment"&&v.type!=="scalar"}),i=0;i<r.length;){var l=r[i++];if(l.type==="keyword"&&l.content==="mutation"){var o=[];if(g(["definition-mutation","punctuation"])&&b(1).content==="("){i+=2;var u=w(/^\($/,/^\)$/);if(u===-1)continue;for(;i<u;i++){var c=b(0);c.type==="variable"&&(x(c,"variable-input"),o.push(c.content))}i=u+1}if(g(["punctuation","property-query"])&&b(0).content==="{"&&(i++,x(b(0),"property-mutation"),0<o.length)){var f=w(/^\{$/,/^\}$/);if(f!==-1)for(var p=i;p<f;p++){var h=r[p];h.type==="variable"&&0<=o.indexOf(h.content)&&x(h,"variable-input")}}}}function b(v){return r[i+v]}function g(v,S){S=S||0;for(var C=0;C<v.length;C++){var N=b(C+S);if(!N||N.type!==v[C])return}return 1}function w(v,S){for(var C=1,N=i;N<r.length;N++){var E=r[N],R=E.content;if(E.type==="punctuation"&&typeof R=="string"){if(v.test(R))C++;else if(S.test(R)&&--C===0)return N}}return-1}function x(v,S){var C=v.alias;C?Array.isArray(C)||(v.alias=C=[C]):v.alias=C=[],C.push(S)}}),ue.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 r=e.languages.javascript["template-string"],i=r.pattern.source,l=r.inside.interpolation,o=l.inside["interpolation-punctuation"],u=l.pattern.source;function c(g,w){if(e.languages[g])return{pattern:RegExp("((?:"+w+")\\s*)"+i),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:g}}}}function f(g,w,x){return g={code:g,grammar:w,language:x},e.hooks.run("before-tokenize",g),g.tokens=e.tokenize(g.code,g.grammar),e.hooks.run("after-tokenize",g),g.tokens}function p(g,w,x){var C=e.tokenize(g,{interpolation:{pattern:RegExp(u),lookbehind:!0}}),v=0,S={},C=f(C.map(function(E){if(typeof E=="string")return E;for(var R,O,E=E.content;g.indexOf((O=v++,R="___"+x.toUpperCase()+"_"+O+"___"))!==-1;);return S[R]=E,R}).join(""),w,x),N=Object.keys(S);return v=0,(function E(R){for(var O=0;O<R.length;O++){if(v>=N.length)return;var H,_,F,z,B,M,$,V=R[O];typeof V=="string"||typeof V.content=="string"?(H=N[v],($=(M=typeof V=="string"?V:V.content).indexOf(H))!==-1&&(++v,_=M.substring(0,$),B=S[H],F=void 0,(z={})["interpolation-punctuation"]=o,(z=e.tokenize(B,z)).length===3&&((F=[1,1]).push.apply(F,f(z[1],e.languages.javascript,"javascript")),z.splice.apply(z,F)),F=new e.Token("interpolation",z,l.alias,B),z=M.substring($+H.length),B=[],_&&B.push(_),B.push(F),z&&(E(M=[z]),B.push.apply(B,M)),typeof V=="string"?(R.splice.apply(R,[O,1].concat(B)),O+=B.length-1):V.content=B)):($=V.content,Array.isArray($)?E($):E([$]))}})(C),new e.Token(x,C,"language-"+x,g)}e.languages.javascript["template-string"]=[c("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),c("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),c("svg",/\bsvg/.source),c("markdown",/\b(?:markdown|md)/.source),c("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),c("sql",/\bsql/.source),r].filter(Boolean);var h={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function b(g){return typeof g=="string"?g:Array.isArray(g)?g.map(b).join(""):b(g.content)}e.hooks.add("after-tokenize",function(g){g.language in h&&(function w(x){for(var v=0,S=x.length;v<S;v++){var C,N,E,R=x[v];typeof R!="string"&&(C=R.content,Array.isArray(C)?R.type==="template-string"?(R=C[1],C.length===3&&typeof R!="string"&&R.type==="embedded-code"&&(N=b(R),R=R.alias,R=Array.isArray(R)?R[0]:R,E=e.languages[R])&&(C[1]=p(N,E,R))):w(C):typeof C!="string"&&w([C]))}})(g.tokens)})})(ue),(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 r=e.languages.extend("typescript",{});delete r["class-name"],e.languages.typescript["class-name"].inside=r,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:r}}}}),e.languages.ts=e.languages.typescript})(ue),(function(e){var r=e.languages.javascript,i=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,l="(@(?:arg|argument|param|property)\\s+(?:"+i+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(l+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(l+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:r,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,function(){return i})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+i),lookbehind:!0,inside:{string:r.string,number:r.number,boolean:r.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:r,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)})(ue),(function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})})(ue),ue.languages.n4js=ue.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),ue.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),ue.languages.n4jsd=ue.languages.n4js,(function(e){function r(c,f){return RegExp(c.replace(/<ID>/g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),f)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:r(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:r(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:r(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var i=["function","function-variable","method","method-variable","property-access"],l=0;l<i.length;l++){var u=i[l],o=e.languages.javascript[u],u=(o=e.util.type(o)==="RegExp"?e.languages.javascript[u]={pattern:o}:o).inside||{};(o.inside=u)["maybe-class-name"]=/^[A-Z][\s\S]*/}})(ue),(function(e){var r=e.util.clone(e.languages.javascript),i=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,l=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function u(p,h){return p=p.replace(/<S>/g,function(){return i}).replace(/<BRACES>/g,function(){return l}).replace(/<SPREAD>/g,function(){return o}),RegExp(p,h)}o=u(o).source,e.languages.jsx=e.languages.extend("markup",r),e.languages.jsx.tag.pattern=u(/<\/?(?:[\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=r.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:u(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:u(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);function c(p){for(var h=[],b=0;b<p.length;b++){var g=p[b],w=!1;typeof g!="string"&&(g.type==="tag"&&g.content[0]&&g.content[0].type==="tag"?g.content[0].content[0].content==="</"?0<h.length&&h[h.length-1].tagName===f(g.content[0].content[1])&&h.pop():g.content[g.content.length-1].content!=="/>"&&h.push({tagName:f(g.content[0].content[1]),openedBraces:0}):0<h.length&&g.type==="punctuation"&&g.content==="{"?h[h.length-1].openedBraces++:0<h.length&&0<h[h.length-1].openedBraces&&g.type==="punctuation"&&g.content==="}"?h[h.length-1].openedBraces--:w=!0),(w||typeof g=="string")&&0<h.length&&h[h.length-1].openedBraces===0&&(w=f(g),b<p.length-1&&(typeof p[b+1]=="string"||p[b+1].type==="plain-text")&&(w+=f(p[b+1]),p.splice(b+1,1)),0<b&&(typeof p[b-1]=="string"||p[b-1].type==="plain-text")&&(w=f(p[b-1])+w,p.splice(b-1,1),b--),p[b]=new e.Token("plain-text",w,null,w)),g.content&&typeof g.content!="string"&&c(g.content)}}var f=function(p){return p?typeof p=="string"?p:typeof p.content=="string"?p.content:p.content.map(f).join(""):""};e.hooks.add("after-tokenize",function(p){p.language!=="jsx"&&p.language!=="tsx"||c(p.tokens)})})(ue),(function(e){var r=e.util.clone(e.languages.typescript),r=(e.languages.tsx=e.languages.extend("jsx",r),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag);r.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+r.pattern.source+")",r.pattern.flags),r.lookbehind=!0})(ue),ue.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:/[{}[\]();,.:\\]/},ue.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=ue.languages.swift}),(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 r={"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:r},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:r},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})(ue),ue.languages.c=ue.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|[?:~]|[-+*/%&|^!=<>]=?/}),ue.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),ue.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},ue.languages.c.string],char:ue.languages.c.char,comment:ue.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:ue.languages.c}}}}),ue.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 ue.languages.c.boolean,ue.languages.objectivec=ue.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete ue.languages.objectivec["class-name"],ue.languages.objc=ue.languages.objectivec,ue.languages.reason=ue.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),ue.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete ue.languages.reason.function,(function(e){for(var r=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,i=0;i<2;i++)r=r.replace(/<self>/g,function(){return r});r=r.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+r),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})(ue),ue.languages.go=ue.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/}),ue.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete ue.languages.go["class-name"],(function(e){var r=/\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/,i=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return r.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 r.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:r,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 i})+")"),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"])})(ue),ue.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://,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:/[{}[\];(),.:]/},ue.languages.python["string-interpolation"].inside.interpolation.inside.rest=ue.languages.python,ue.languages.py=ue.languages.python,ue.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"}},ue.languages.webmanifest=ue.languages.json;var wn={};nE(wn,{dracula:()=>oE,duotoneDark:()=>uE,duotoneLight:()=>fE,github:()=>hE,gruvboxMaterialDark:()=>qE,gruvboxMaterialLight:()=>$E,jettwaveDark:()=>OE,jettwaveLight:()=>zE,nightOwl:()=>mE,nightOwlLight:()=>bE,oceanicNext:()=>xE,okaidia:()=>wE,oneDark:()=>IE,oneLight:()=>UE,palenight:()=>kE,shadesOfPurple:()=>CE,synthwave84:()=>AE,ultramin:()=>jE,vsDark:()=>M1,vsLight:()=>LE});var aE={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},oE=aE,sE={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},uE=sE,cE={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},fE=cE,dE={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},hE=dE,pE={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},mE=pE,gE={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},bE=gE,vn={char:"#D8DEE9",comment:"#999999",keyword:"#c5a5c5",primitive:"#5a9bcf",string:"#8dc891",variable:"#d7deea",boolean:"#ff8b50",tag:"#fc929e",function:"#79b6f2",className:"#FAC863"},yE={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:vn.keyword}},{types:["attr-value"],style:{color:vn.string}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:vn.comment}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:vn.primitive}},{types:["boolean"],style:{color:vn.boolean}},{types:["tag"],style:{color:vn.tag}},{types:["string"],style:{color:vn.string}},{types:["punctuation"],style:{color:vn.string}},{types:["selector","char","builtin","inserted"],style:{color:vn.char}},{types:["function"],style:{color:vn.function}},{types:["operator","entity","url","variable"],style:{color:vn.variable}},{types:["keyword"],style:{color:vn.keyword}},{types:["atrule","class-name"],style:{color:vn.className}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},xE=yE,vE={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},wE=vE,SE={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},kE=SE,EE={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},CE=EE,NE={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},AE=NE,TE={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},jE=TE,RE={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},M1=RE,_E={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},LE=_E,DE={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},OE=DE,ME={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},zE=ME,FE={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},IE=FE,BE={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},UE=BE,HE={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},qE=HE,PE={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},$E=PE,VE=e=>A.useCallback(r=>{var i=r,{className:l,style:o,line:u}=i,c=O1(i,["className","style","line"]);const f=Su(Qn({},c),{className:_1("token-line",l)});return typeof e=="object"&&"plain"in e&&(f.style=e.plain),typeof o=="object"&&(f.style=Qn(Qn({},f.style||{}),o)),f},[e]),GE=e=>{const r=A.useCallback(({types:i,empty:l})=>{if(e!=null){{if(i.length===1&&i[0]==="plain")return l!=null?{display:"inline-block"}:void 0;if(i.length===1&&l!=null)return e[i[0]]}return Object.assign(l!=null?{display:"inline-block"}:{},...i.map(o=>e[o]))}},[e]);return A.useCallback(i=>{var l=i,{token:o,className:u,style:c}=l,f=O1(l,["token","className","style"]);const p=Su(Qn({},f),{className:_1("token",...o.types,u),children:o.content,style:r(o)});return c!=null&&(p.style=Qn(Qn({},p.style||{}),c)),p},[r])},YE=/\r\n|\r|\n/,oy=e=>{e.length===0?e.push({types:["plain"],content:`
|
|
13
|
-
`,empty:!0}):e.length===1&&e[0].content===""&&(e[0].content=`
|
|
14
|
-
`,e[0].empty=!0)},sy=(e,r)=>{const i=e.length;return i>0&&e[i-1]===r?e:e.concat(r)},XE=e=>{const r=[[]],i=[e],l=[0],o=[e.length];let u=0,c=0,f=[];const p=[f];for(;c>-1;){for(;(u=l[c]++)<o[c];){let h,b=r[c];const w=i[c][u];if(typeof w=="string"?(b=c>0?b:["plain"],h=w):(b=sy(b,w.type),w.alias&&(b=sy(b,w.alias)),h=w.content),typeof h!="string"){c++,r.push(b),i.push(h),l.push(0),o.push(h.length);continue}const x=h.split(YE),v=x.length;f.push({types:b,content:x[0]});for(let S=1;S<v;S++)oy(f),p.push(f=[]),f.push({types:b,content:x[S]})}c--,r.pop(),i.pop(),l.pop(),o.pop()}return oy(f),p},uy=XE,ZE=({prism:e,code:r,grammar:i,language:l})=>A.useMemo(()=>{if(i==null)return uy([r]);const o={code:r,grammar:i,language:l,tokens:[]};return e.hooks.run("before-tokenize",o),o.tokens=e.tokenize(r,i),e.hooks.run("after-tokenize",o),uy(o.tokens)},[r,i,l,e]),KE=(e,r)=>{const{plain:i}=e,l=e.styles.reduce((o,u)=>{const{languages:c,style:f}=u;return c&&!c.includes(r)||u.types.forEach(p=>{const h=Qn(Qn({},o[p]),f);o[p]=h}),o},{});return l.root=i,l.plain=Su(Qn({},i),{backgroundColor:void 0}),l},QE=KE,JE=({children:e,language:r,code:i,theme:l,prism:o})=>{const u=r.toLowerCase(),c=QE(l,u),f=VE(c),p=GE(c),h=o.languages[u],b=ZE({prism:o,language:u,code:i,grammar:h});return e({tokens:b,className:`prism-code language-${u}`,style:c!=null?c.root:{},getLineProps:f,getTokenProps:p})},WE=e=>A.createElement(JE,Su(Qn({},e),{prism:e.prism||ue,theme:e.theme||M1,code:e.code,language:e.language}));const eC="modulepreload",tC=function(e){return"/"+e},cy={},Rt=function(r,i,l){let o=Promise.resolve();if(i&&i.length>0){let p=function(h){return Promise.all(h.map(b=>Promise.resolve(b).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=c?.nonce||c?.getAttribute("nonce");o=p(i.map(h=>{if(h=tC(h),h in cy)return;cy[h]=!0;const b=h.endsWith(".css"),g=b?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const w=document.createElement("link");if(w.rel=b?"stylesheet":eC,b||(w.as="script"),w.crossOrigin="",w.href=h,f&&w.setAttribute("nonce",f),document.head.appendChild(w),b)return new Promise((x,v)=>{w.addEventListener("load",x),w.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${h}`)))})}))}function u(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return o.then(c=>{for(const f of c||[])f.status==="rejected"&&u(f.reason);return r().catch(u)})},Es={};function z1(e){if(!Es[e]){const i={bash:()=>Rt(()=>import("./prism-bash-DTkDXsAh.js"),[]),sh:()=>Rt(()=>import("./prism-bash-DTkDXsAh.js"),[]),shell:()=>Rt(()=>import("./prism-bash-DTkDXsAh.js"),[]),php:async()=>(await Rt(()=>import("./prism-markup-templating-Ct1xsyfA.js"),[]),Rt(()=>import("./prism-php-hBQuhE2A.js").then(l=>l.p),[])),sql:()=>Rt(()=>import("./prism-sql-AgAyy5H_.js"),[]),ruby:()=>Rt(()=>import("./prism-ruby-BKap8imy.js").then(l=>l.p),[]),java:()=>Rt(()=>import("./prism-java-DDUFERTh.js").then(l=>l.p),[]),scala:async()=>(await z1("java"),Rt(()=>import("./prism-scala-BjNo2HkN.js"),[])),solidity:()=>Rt(()=>import("./prism-solidity-DHc7LZHq.js").then(l=>l.p),[]),vim:()=>Rt(()=>import("./prism-vim-uciLQ2PQ.js"),[]),dart:()=>Rt(()=>import("./prism-dart-MjriiaMt.js"),[]),csharp:()=>Rt(()=>import("./prism-csharp-DqTrHqwJ.js").then(l=>l.p),[]),protobuf:()=>Rt(()=>import("./prism-protobuf-DiQ_z8B5.js"),[]),hcl:()=>Rt(()=>import("./prism-hcl-HvJ0aPiH.js").then(l=>l.p),[]),perl:()=>Rt(()=>import("./prism-perl-CNA3SNC9.js").then(l=>l.p),[]),elixir:()=>Rt(()=>import("./prism-elixir-DEJaM00V.js").then(l=>l.p),[])}[e];if(!i)return console.warn(`No loader available for language: ${e}`),Promise.reject(new Error(`Unsupported language: ${e}`));Es[e]=i().then(()=>{}).catch(l=>{throw delete Es[e],console.warn(`Failed to load language: ${e}`,l),l})}return Es[e]}typeof global<"u"?global.Prism=ue:typeof window<"u"&&(window.Prism=ue);const fy=["markup","html","xml","svg","javascript","js","typescript","ts","jsx","tsx","css","c","cpp","swift","kotlin","objectivec","reason","rust","go","graphql","yaml","yml","json","markdown","md","python","py"];function nC(e,r){const[i,l]=A.useState(()=>fy.includes(r)||!!ue.languages[r]);return A.useEffect(()=>{if(!i){if(fy.includes(r)){l(!0);return}z1(r).then(()=>{l(!0)}).catch(()=>{l(!1)})}},[r,i]),{ready:i,actualLang:i?r:"text"}}function no(e){return e&&e.split(".").pop()?.toLowerCase()||null}function rC(e){return e&&e.split("/").pop()||""}const iC={js:"javascript",mjs:"javascript",cjs:"javascript",jsx:"javascript",ts:"typescript",mts:"typescript",cts:"typescript",tsx:"typescript",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",cpp:"cpp",c:"c",cs:"csharp",php:"php",swift:"swift",kt:"kotlin",scala:"scala",r:"r",sql:"sql",sh:"bash",bash:"bash",zsh:"bash",fish:"bash",yml:"yaml",yaml:"yaml",json:"json",xml:"xml",html:"html",css:"css",scss:"scss",sass:"sass",less:"less",md:"markdown",markdown:"markdown",tex:"latex",vim:"vim",ex:"elixir",exs:"elixir",heex:"elixir"},lC={ts:"typescript",tsx:"tsx",mts:"typescript",cts:"typescript",js:"javascript",jsx:"jsx",mjs:"javascript",cjs:"javascript",json:"json",css:"css",scss:"css",html:"html",sh:"bash",bash:"bash",zsh:"bash",fish:"bash",yml:"yaml",yaml:"yaml",md:"markdown",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",cpp:"cpp",c:"c",php:"php",sql:"sql",xml:"xml",swift:"swift",kt:"kotlin",scala:"scala",svelte:"svelte",r:"r",lua:"lua",perl:"perl",pl:"perl",pm:"perl",dockerfile:"docker",makefile:"makefile",gitignore:"git",env:"bash",conf:"nginx",ini:"ini",toml:"toml",sol:"solidity",vim:"vim",dart:"dart",cs:"csharp",proto:"protobuf",tf:"hcl",tfvars:"hcl",hcl:"hcl",ex:"elixir",exs:"elixir",heex:"elixir"},aC={dockerfile:"docker",makefile:"makefile",".gitignore":"git",".env":"bash",".bashrc":"bash",".zshrc":"bash",".bash_profile":"bash",".profile":"bash"};function F1(e,r){if(e)return r[e.toLowerCase()]}function oC(e){return F1(no(e),iC)}function sC(e){const r=rC(e).toLowerCase(),i=aC[r];return i||F1(no(e),lC)||"text"}function uC(e){return{...e,styles:e.styles.map(r=>({...r,style:{...r.style,background:void 0,backgroundColor:void 0}}))}}function cC(e){let r;switch(e){case"github":r=wn.github;break;case"vsLight":r=wn.vsLight;break;case"oneLight":r=wn.oneLight;break;case"gruvboxMaterialLight":r=wn.gruvboxMaterialLight;break;case"nightOwlLight":r=wn.nightOwlLight;break;case"vsDark":r=wn.vsDark;break;case"oneDark":r=wn.oneDark;break;case"gruvboxMaterialDark":r=wn.gruvboxMaterialDark;break;case"nightOwl":r=wn.nightOwl;break;case"dracula":r=wn.dracula;break;case"okaidia":r=wn.okaidia;break;default:r=wn.vsDark}return uC(r)}const Eh=Qt.memo(function({code:r,language:i,className:l,syntaxTheme:o="vsDark",filename:u="",renderToken:c,onMouseOver:f,onMouseOut:p}){const h=i||(u?sC(u):"text"),{actualLang:b}=nC(r,h),g=cC(o),w=A.useCallback(({style:x,tokens:v,getLineProps:S,getTokenProps:C})=>y.jsx("span",{className:l,style:{...x,background:"transparent",backgroundColor:"transparent"},onMouseOver:f,onMouseOut:p,children:v.map((N,E)=>y.jsx("span",{...S({line:N}),children:N.map((R,O)=>c?c(R,O,C):y.jsx("span",{...C({token:R})},O))},E))}),[l,f,p,c]);return y.jsx(WE,{code:r,language:b,theme:g,prism:ue,children:w})}),Za=Qt.memo(function(r){const{handleMouseOver:i,handleMouseOut:l,isWordHighlighted:o}=Zk(),u=A.useCallback((c,f,p)=>{const h=p({token:c}),b=c.content.split(/( +)/);if(b.length===1&&b[0]&&!ly(b[0]))return y.jsx("span",{...h},f);const g=b.map((w,x)=>{if(!w)return null;if(ly(w)){const v=w.trim(),S=o(v);return y.jsx("span",{className:`word-token ${S?"word-highlight":""}`,"data-word":v,children:w},`${f}-${x}`)}return y.jsx("span",{children:w},`${f}-${x}`)});return y.jsx("span",{...h,children:g},f)},[o]);return y.jsx(Eh,{...r,renderToken:u,onMouseOver:i,onMouseOut:l})}),Hd=Qt.memo(function({segments:r,className:i=""}){const l=A.useMemo(()=>r.map((o,u)=>{const c=o.type==="added"?"word-diff-added":o.type==="removed"?"word-diff-removed":"";return y.jsx("span",{className:c,children:o.value},u)}),[r]);return y.jsx("span",{className:i,children:l})}),fC=e=>{switch(e){case"add":return"+";case"delete":return"-";default:return" "}},dC=e=>{switch(e){case"add":return"text-github-accent bg-diff-addition-bg";case"delete":return"text-github-danger bg-diff-deletion-bg";default:return"text-github-text-muted bg-github-bg-secondary"}};function I1({line:e,syntaxTheme:r,filename:i,diffSegments:l,showPrefixBorder:o=!0}){return y.jsxs("div",{className:"flex items-center relative min-h-[16px]",children:[y.jsx("span",{className:`w-5 text-center flex-shrink-0 ${o?"border-r border-github-border":""} ${dC(e.type)}`,children:fC(e.type)}),l?y.jsx(Hd,{segments:l,className:"flex-1 px-3 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text"}):y.jsx(Za,{code:e.content,className:"flex-1 px-3 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text [&_pre]:m-0 [&_pre]:p-0 [&_pre]:!bg-transparent [&_pre]:font-inherit [&_pre]:text-inherit [&_pre]:leading-inherit [&_code]:!bg-transparent [&_code]:font-inherit [&_code]:text-inherit [&_code]:leading-inherit",syntaxTheme:r,filename:i})]})}const hC=e=>e==="add"?"bg-diff-addition-bg":"bg-diff-deletion-bg",pC=(e,r)=>({type:e,content:r});function dy({code:e,type:r,filename:i,keyPrefix:l,syntaxTheme:o}){return y.jsx(y.Fragment,{children:e.split(`
|
|
15
|
-
`).map((u,c)=>y.jsx("div",{className:hC(r),children:y.jsx(I1,{line:pC(r,u),filename:i,syntaxTheme:o,showPrefixBorder:!1})},`${l}-${c}`))})}function B1(e){return A1(e)}function qd({body:e,originalCode:r,filename:i,syntaxTheme:l}){const o=A.useMemo(()=>{const u=T1(e);if(u.length===0)return[{type:"text",content:e}];const c=[];let f=0;for(const p of u)p.startIndex>f&&c.push({type:"text",content:e.slice(f,p.startIndex)}),c.push({type:"suggestion",code:p.suggestedCode,original:r||""}),f=p.endIndex;return f<e.length&&c.push({type:"text",content:e.slice(f)}),c},[e,r]);return y.jsx("div",{className:"text-github-text-primary text-sm leading-6",children:o.map((u,c)=>u.type==="text"?y.jsx("span",{className:"whitespace-pre-wrap",children:u.content},c):y.jsx("div",{className:"my-2 border border-github-border rounded-md overflow-hidden",children:y.jsxs("div",{className:"font-mono text-sm",children:[u.original&&y.jsx(dy,{code:u.original,type:"delete",filename:i,keyPrefix:`orig-${c}`,syntaxTheme:l}),y.jsx(dy,{code:u.code,type:"add",filename:i,keyPrefix:`sugg-${c}`,syntaxTheme:l})]})},c))})}const mC="text-xs px-3 py-1.5 bg-github-bg-tertiary text-github-text-primary border border-github-border rounded hover:opacity-80 transition-all flex items-center gap-1";function U1({selectedCode:e,value:r,onChange:i,textareaRef:l,className:o=mC}){if(!e)return null;const u=()=>{const c=Pk(e),f=l?.current;if(!f){i(`${r}${r?`
|
|
16
|
-
|
|
17
|
-
`:""}${c}
|
|
18
|
-
|
|
19
|
-
`);return}const p=f.selectionStart,h=f.selectionEnd,b=r.slice(0,p),g=r.slice(h),x=`${b?`
|
|
20
|
-
|
|
21
|
-
`:""}${c}
|
|
22
|
-
|
|
23
|
-
`,v=b+x+g;i(v);const S=b.length+x.length;requestAnimationFrame(()=>{f.focus(),f.setSelectionRange(S,S)})};return y.jsxs("button",{type:"button",onClick:u,className:o,title:"Add code suggestion",children:[y.jsx(J2,{size:12}),"Add suggestion"]})}function Ch({comment:e,showAuthorBadge:r=!1,onGeneratePrompt:i,onRemoveComment:l,onUpdateComment:o,onClick:u,syntaxTheme:c}){const[f,p]=A.useState(!1),[h,b]=A.useState(!1),[g,w]=A.useState(e.body),[x,v]=A.useState("edit"),S=A.useRef(null),C=B1(g),N=C?x:"edit",E=async z=>{z.stopPropagation();try{const B=i(e);await navigator.clipboard.writeText(B),p(!0),setTimeout(()=>p(!1),2e3)}catch(B){console.error("Failed to copy prompt:",B)}},R=z=>{z.stopPropagation(),b(!0),v("edit"),w(e.body)},O=()=>{b(!1),v("edit"),w(e.body)},H=z=>{z?.stopPropagation(),g.trim()!==e.body&&o(e.id,g.trim()),b(!1),v("edit")},_=z=>{z.stopPropagation(),l(e.id)},F=z=>{z.key==="Enter"&&(z.metaKey||z.ctrlKey)?(z.preventDefault(),H()):z.key==="Escape"&&(z.preventDefault(),O())};return lt("escape",()=>{h&&O()},{enableOnFormTags:["textarea"],enabled:h},[h]),lt("mod+enter",()=>{h&&H()},{enableOnFormTags:["textarea"],enabled:h},[h,g,e.body]),y.jsxs("div",{id:`comment-${e.id}`,className:`p-3 bg-github-bg-tertiary border border-yellow-600/50 rounded-md border-l-4 border-l-yellow-400 shadow-sm transition-all ${u?"hover:shadow-md cursor-pointer":""}`,onClick:u,children:[y.jsxs("div",{className:"flex items-center justify-between mb-2 gap-3",children:[y.jsxs("div",{className:"flex items-center gap-2 text-xs text-github-text-secondary flex-1 min-w-0",children:[y.jsxs("span",{className:"font-mono px-1 py-0.5 rounded overflow-hidden text-ellipsis whitespace-nowrap",style:{backgroundColor:"var(--color-yellow-path-bg)",color:"var(--color-yellow-path-text)"},children:[e.file,":",Array.isArray(e.line)?`${e.line[0]}-${e.line[1]}`:e.line]}),r&&e.author&&y.jsx("span",{className:"inline-flex items-center rounded-full border border-github-border bg-github-bg-secondary px-2 py-0.5 text-[11px] font-medium text-github-text-primary",children:e.author})]}),y.jsx("div",{className:"flex items-center gap-2",children:h?C?y.jsxs("div",{className:"flex items-center bg-github-bg-tertiary border border-github-border rounded p-0.5",onClick:z=>z.stopPropagation(),children:[y.jsx("button",{type:"button",onClick:()=>v("edit"),className:`px-3 py-1.5 text-xs font-medium rounded transition-all duration-200 flex items-center gap-1.5 cursor-pointer ${N==="edit"?"bg-github-bg-primary text-github-text-primary shadow-sm":"text-github-text-secondary hover:text-github-text-primary"}`,children:"Edit"}),y.jsx("button",{type:"button",onClick:()=>v("preview"),className:`px-3 py-1.5 text-xs font-medium rounded transition-all duration-200 flex items-center gap-1.5 cursor-pointer ${N==="preview"?"bg-github-bg-primary text-github-text-primary shadow-sm":"text-github-text-secondary hover:text-github-text-primary"}`,children:"Preview"})]}):y.jsx("div",{onClick:z=>z.stopPropagation(),children:y.jsx(U1,{selectedCode:e.codeContent,value:g,onChange:w,textareaRef:S})}):y.jsxs(y.Fragment,{children:[y.jsx("button",{onClick:E,className:"text-xs px-2 py-1 rounded transition-all whitespace-nowrap",style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",border:"1px solid var(--color-yellow-btn-border)"},onMouseEnter:z=>{z.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",z.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:z=>{z.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",z.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},title:"Copy prompt for AI coding agent",children:f?"Copied!":"Copy Prompt"}),y.jsx("button",{onClick:R,className:"text-xs p-1.5 bg-github-bg-tertiary text-github-text-secondary border border-github-border rounded hover:text-github-text-primary hover:bg-github-bg-primary transition-all",title:"Edit",children:y.jsx(jk,{size:12})}),y.jsx("button",{onClick:_,className:"text-xs p-1.5 bg-github-bg-tertiary text-green-600 border border-github-border rounded hover:bg-green-500/10 hover:border-green-600 transition-all",title:"Resolve",children:y.jsx(Xa,{size:12})})]})})]}),h?y.jsxs("div",{children:[C&&N==="preview"?y.jsx(qd,{body:g,originalCode:e.codeContent,filename:e.file,syntaxTheme:c}):y.jsx(y.Fragment,{children:y.jsx("textarea",{ref:S,value:g,onChange:z=>w(z.target.value),className:"w-full text-github-text-primary text-sm leading-6 bg-github-bg-secondary border border-github-border rounded px-2 py-1 resize-none focus:outline-none focus:border-blue-600 focus:ring-1 focus:ring-blue-600/30",rows:Math.max(2,g.split(`
|
|
24
|
-
`).length),placeholder:"Edit your comment...",autoFocus:!0,onClick:z=>z.stopPropagation(),onKeyDown:z=>{z.stopPropagation(),F(z)}})}),y.jsxs("div",{className:"flex gap-2 justify-end mt-2",children:[y.jsx("button",{type:"button",onClick:O,className:"text-xs px-3 py-1.5 bg-github-bg-tertiary text-github-text-primary border border-github-border rounded hover:opacity-80 transition-all",children:"Cancel"}),y.jsx("button",{type:"button",onClick:H,className:"text-xs px-3 py-1.5 rounded transition-all disabled:opacity-50",style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",border:"1px solid var(--color-yellow-btn-border)"},onMouseEnter:z=>{z.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",z.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:z=>{z.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",z.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},disabled:!g.trim(),children:"Submit"})]})]}):y.jsx(qd,{body:e.body,originalCode:e.codeContent,filename:e.file,syntaxTheme:c})]})}function gC({isOpen:e,onClose:r,onNavigate:i,comments:l,showAuthorBadges:o=!1,onRemoveComment:u,onGeneratePrompt:c,onUpdateComment:f,syntaxTheme:p}){const[h,b]=A.useState(0),g=A.useRef([]),{enableScope:w,disableScope:x}=eo(),v=[...l].sort((E,R)=>{const O=E.file.localeCompare(R.file);if(O!==0)return O;const H=Array.isArray(E.line)?E.line[0]:E.line,_=Array.isArray(R.line)?R.line[0]:R.line;return H-_}),S=A.useCallback(E=>{i(E),r()},[i,r]),C=A.useCallback(E=>{confirm(`Delete this comment?
|
|
25
|
-
|
|
26
|
-
"${E.body}"`)&&(u(E.id),h>=v.length-1&&h>0&&b(h-1))},[u,h,v.length]);A.useEffect(()=>(e?(w("comments-list"),x("navigation")):(w("navigation"),x("comments-list"),b(0)),()=>{w("navigation"),x("comments-list")}),[e,w,x]);const N={scopes:"comments-list",enableOnFormTags:!1};return lt("escape",()=>r(),N,[r]),lt("j, down",()=>b(E=>Math.min(E+1,v.length-1)),N,[v.length]),lt("k, up",()=>b(E=>Math.max(E-1,0)),N,[]),lt("enter",()=>{v[h]&&S(v[h])},N,[h,v,S]),lt("d",()=>{v[h]&&C(v[h])},N,[h,v,C]),A.useEffect(()=>{g.current[h]&&g.current[h]?.scrollIntoView({behavior:"smooth",block:"nearest"})},[h]),e?y.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[y.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:r}),y.jsxs("div",{className:"relative bg-github-bg-primary border border-github-border rounded-lg shadow-lg max-w-4xl w-full max-h-[80vh] overflow-hidden",children:[y.jsxs("div",{className:"sticky top-0 bg-github-bg-primary border-b border-github-border px-6 py-4",children:[y.jsxs("div",{className:"flex items-center justify-between mb-2",children:[y.jsx("h2",{className:"text-lg font-semibold text-github-text-primary",children:"All Comments"}),y.jsx("button",{onClick:r,className:"text-github-text-secondary hover:text-github-text-primary transition-colors","aria-label":"Close comments list",children:y.jsx(vu,{size:20})})]}),y.jsxs("div",{className:"text-xs text-github-text-secondary",children:[y.jsx("span",{className:"font-mono",children:"j/k"})," or ",y.jsx("span",{className:"font-mono",children:"↑/↓"})," to navigate • ",y.jsx("span",{className:"font-mono",children:"Enter"})," to jump •"," ",y.jsx("span",{className:"font-mono",children:"d"})," to delete • ",y.jsx("span",{className:"font-mono",children:"Esc"})," ","to close"]})]}),y.jsx("div",{className:"overflow-y-auto max-h-[calc(80vh-120px)]",children:y.jsx("div",{className:"p-6",children:v.length===0?y.jsx("p",{className:"text-github-text-secondary text-center",children:"No comments yet"}):y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"space-y-2",children:v.map((E,R)=>y.jsx("div",{ref:O=>{g.current[R]=O},className:`${h===R?"ring-2 ring-blue-500 rounded":""}`,children:y.jsx(Ch,{comment:E,showAuthorBadge:o,onGeneratePrompt:c,onRemoveComment:u,onUpdateComment:f,syntaxTheme:p,onClick:O=>{O.stopPropagation(),b(R),S(E)}})},E.id))}),v.length>0&&y.jsxs("div",{className:"mt-4 pt-4 border-t border-github-border text-xs text-github-text-secondary text-center",children:[h+1," of ",v.length," comments"]})]})})})]})]}):null}function ku(){return typeof window<"u"}function fi(e){return Nh(e)?(e.nodeName||"").toLowerCase():"#document"}function un(e){var r;return(e==null||(r=e.ownerDocument)==null?void 0:r.defaultView)||window}function Wn(e){var r;return(r=(Nh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:r.documentElement}function Nh(e){return ku()?e instanceof Node||e instanceof un(e).Node:!1}function ct(e){return ku()?e instanceof Element||e instanceof un(e).Element:!1}function Tt(e){return ku()?e instanceof HTMLElement||e instanceof un(e).HTMLElement:!1}function Ka(e){return!ku()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof un(e).ShadowRoot}function ro(e){const{overflow:r,overflowX:i,overflowY:l,display:o}=Fn(e);return/auto|scroll|overlay|hidden|clip/.test(r+l+i)&&o!=="inline"&&o!=="contents"}function bC(e){return/^(table|td|th)$/.test(fi(e))}function Eu(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const yC=/transform|translate|scale|rotate|perspective|filter/,xC=/paint|layout|strict|content/,_i=e=>!!e&&e!=="none";let nd;function Ah(e){const r=ct(e)?Fn(e):e;return _i(r.transform)||_i(r.translate)||_i(r.scale)||_i(r.rotate)||_i(r.perspective)||!Cu()&&(_i(r.backdropFilter)||_i(r.filter))||yC.test(r.willChange||"")||xC.test(r.contain||"")}function vC(e){let r=Nr(e);for(;Tt(r)&&!Cr(r);){if(Ah(r))return r;if(Eu(r))return null;r=Nr(r)}return null}function Cu(){return nd==null&&(nd=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),nd}function Cr(e){return/^(html|body|#document)$/.test(fi(e))}function Fn(e){return un(e).getComputedStyle(e)}function Nu(e){return ct(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Nr(e){if(fi(e)==="html")return e;const r=e.assignedSlot||e.parentNode||Ka(e)&&e.host||Wn(e);return Ka(r)?r.host:r}function H1(e){const r=Nr(e);return Cr(r)?e.ownerDocument?e.ownerDocument.body:e.body:Tt(r)&&ro(r)?r:H1(r)}function ci(e,r,i){var l;r===void 0&&(r=[]),i===void 0&&(i=!0);const o=H1(e),u=o===((l=e.ownerDocument)==null?void 0:l.body),c=un(o);if(u){const f=Pd(c);return r.concat(c,c.visualViewport||[],ro(o)?o:[],f&&i?ci(f):[])}else return r.concat(o,ci(o,[],i))}function Pd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Hs=Math.min,Di=Math.max,qs=Math.round,Cs=Math.floor,Jn=e=>({x:e,y:e}),wC={left:"right",right:"left",bottom:"top",top:"bottom"};function hy(e,r,i){return Di(e,Hs(r,i))}function Au(e,r){return typeof e=="function"?e(r):e}function Oi(e){return e.split("-")[0]}function Tu(e){return e.split("-")[1]}function q1(e){return e==="x"?"y":"x"}function P1(e){return e==="y"?"height":"width"}function oi(e){const r=e[0];return r==="t"||r==="b"?"y":"x"}function $1(e){return q1(oi(e))}function SC(e,r,i){i===void 0&&(i=!1);const l=Tu(e),o=$1(e),u=P1(o);let c=o==="x"?l===(i?"end":"start")?"right":"left":l==="start"?"bottom":"top";return r.reference[u]>r.floating[u]&&(c=Ps(c)),[c,Ps(c)]}function kC(e){const r=Ps(e);return[$d(e),r,$d(r)]}function $d(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const py=["left","right"],my=["right","left"],EC=["top","bottom"],CC=["bottom","top"];function NC(e,r,i){switch(e){case"top":case"bottom":return i?r?my:py:r?py:my;case"left":case"right":return r?EC:CC;default:return[]}}function AC(e,r,i,l){const o=Tu(e);let u=NC(Oi(e),i==="start",l);return o&&(u=u.map(c=>c+"-"+o),r&&(u=u.concat(u.map($d)))),u}function Ps(e){const r=Oi(e);return wC[r]+e.slice(r.length)}function TC(e){return{top:0,right:0,bottom:0,left:0,...e}}function jC(e){return typeof e!="number"?TC(e):{top:e,right:e,bottom:e,left:e}}function $s(e){const{x:r,y:i,width:l,height:o}=e;return{width:l,height:o,top:i,left:r,right:r+l,bottom:i+o,x:r,y:i}}var RC=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Vs=RC.join(","),V1=typeof Element>"u",Fl=V1?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Gs=!V1&&Element.prototype.getRootNode?function(e){var r;return e==null||(r=e.getRootNode)===null||r===void 0?void 0:r.call(e)}:function(e){return e?.ownerDocument},Ys=function(r,i){var l;i===void 0&&(i=!0);var o=r==null||(l=r.getAttribute)===null||l===void 0?void 0:l.call(r,"inert"),u=o===""||o==="true",c=u||i&&r&&(typeof r.closest=="function"?r.closest("[inert]"):Ys(r.parentNode));return c},_C=function(r){var i,l=r==null||(i=r.getAttribute)===null||i===void 0?void 0:i.call(r,"contenteditable");return l===""||l==="true"},G1=function(r,i,l){if(Ys(r))return[];var o=Array.prototype.slice.apply(r.querySelectorAll(Vs));return i&&Fl.call(r,Vs)&&o.unshift(r),o=o.filter(l),o},Xs=function(r,i,l){for(var o=[],u=Array.from(r);u.length;){var c=u.shift();if(!Ys(c,!1))if(c.tagName==="SLOT"){var f=c.assignedElements(),p=f.length?f:c.children,h=Xs(p,!0,l);l.flatten?o.push.apply(o,h):o.push({scopeParent:c,candidates:h})}else{var b=Fl.call(c,Vs);b&&l.filter(c)&&(i||!r.includes(c))&&o.push(c);var g=c.shadowRoot||typeof l.getShadowRoot=="function"&&l.getShadowRoot(c),w=!Ys(g,!1)&&(!l.shadowRootFilter||l.shadowRootFilter(c));if(g&&w){var x=Xs(g===!0?c.children:g.children,!0,l);l.flatten?o.push.apply(o,x):o.push({scopeParent:c,candidates:x})}else u.unshift.apply(u,c.children)}}return o},Y1=function(r){return!isNaN(parseInt(r.getAttribute("tabindex"),10))},X1=function(r){if(!r)throw new Error("No node provided");return r.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(r.tagName)||_C(r))&&!Y1(r)?0:r.tabIndex},LC=function(r,i){var l=X1(r);return l<0&&i&&!Y1(r)?0:l},DC=function(r,i){return r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex},Z1=function(r){return r.tagName==="INPUT"},OC=function(r){return Z1(r)&&r.type==="hidden"},MC=function(r){var i=r.tagName==="DETAILS"&&Array.prototype.slice.apply(r.children).some(function(l){return l.tagName==="SUMMARY"});return i},zC=function(r,i){for(var l=0;l<r.length;l++)if(r[l].checked&&r[l].form===i)return r[l]},FC=function(r){if(!r.name)return!0;var i=r.form||Gs(r),l=function(f){return i.querySelectorAll('input[type="radio"][name="'+f+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=l(window.CSS.escape(r.name));else try{o=l(r.name)}catch(c){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",c.message),!1}var u=zC(o,r.form);return!u||u===r},IC=function(r){return Z1(r)&&r.type==="radio"},BC=function(r){return IC(r)&&!FC(r)},UC=function(r){var i,l=r&&Gs(r),o=(i=l)===null||i===void 0?void 0:i.host,u=!1;if(l&&l!==r){var c,f,p;for(u=!!((c=o)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(o)||r!=null&&(p=r.ownerDocument)!==null&&p!==void 0&&p.contains(r));!u&&o;){var h,b,g;l=Gs(o),o=(h=l)===null||h===void 0?void 0:h.host,u=!!((b=o)!==null&&b!==void 0&&(g=b.ownerDocument)!==null&&g!==void 0&&g.contains(o))}}return u},gy=function(r){var i=r.getBoundingClientRect(),l=i.width,o=i.height;return l===0&&o===0},HC=function(r,i){var l=i.displayCheck,o=i.getShadowRoot;if(l==="full-native"&&"checkVisibility"in r){var u=r.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!u}if(getComputedStyle(r).visibility==="hidden")return!0;var c=Fl.call(r,"details>summary:first-of-type"),f=c?r.parentElement:r;if(Fl.call(f,"details:not([open]) *"))return!0;if(!l||l==="full"||l==="full-native"||l==="legacy-full"){if(typeof o=="function"){for(var p=r;r;){var h=r.parentElement,b=Gs(r);if(h&&!h.shadowRoot&&o(h)===!0)return gy(r);r.assignedSlot?r=r.assignedSlot:!h&&b!==r.ownerDocument?r=b.host:r=h}r=p}if(UC(r))return!r.getClientRects().length;if(l!=="legacy-full")return!0}else if(l==="non-zero-area")return gy(r);return!1},qC=function(r){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(r.tagName))for(var i=r.parentElement;i;){if(i.tagName==="FIELDSET"&&i.disabled){for(var l=0;l<i.children.length;l++){var o=i.children.item(l);if(o.tagName==="LEGEND")return Fl.call(i,"fieldset[disabled] *")?!0:!o.contains(r)}return!0}i=i.parentElement}return!1},Vd=function(r,i){return!(i.disabled||OC(i)||HC(i,r)||MC(i)||qC(i))},Gd=function(r,i){return!(BC(i)||X1(i)<0||!Vd(r,i))},PC=function(r){var i=parseInt(r.getAttribute("tabindex"),10);return!!(isNaN(i)||i>=0)},K1=function(r){var i=[],l=[];return r.forEach(function(o,u){var c=!!o.scopeParent,f=c?o.scopeParent:o,p=LC(f,c),h=c?K1(o.candidates):f;p===0?c?i.push.apply(i,h):i.push(f):l.push({documentOrder:u,tabIndex:p,item:o,isScope:c,content:h})}),l.sort(DC).reduce(function(o,u){return u.isScope?o.push.apply(o,u.content):o.push(u.content),o},[]).concat(i)},ju=function(r,i){i=i||{};var l;return i.getShadowRoot?l=Xs([r],i.includeContainer,{filter:Gd.bind(null,i),flatten:!1,getShadowRoot:i.getShadowRoot,shadowRootFilter:PC}):l=G1(r,i.includeContainer,Gd.bind(null,i)),K1(l)},$C=function(r,i){i=i||{};var l;return i.getShadowRoot?l=Xs([r],i.includeContainer,{filter:Vd.bind(null,i),flatten:!0,getShadowRoot:i.getShadowRoot}):l=G1(r,i.includeContainer,Vd.bind(null,i)),l},Q1=function(r,i){if(i=i||{},!r)throw new Error("No node provided");return Fl.call(r,Vs)===!1?!1:Gd(i,r)};function J1(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function W1(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(r=>{let{brand:i,version:l}=r;return i+"/"+l}).join(" "):navigator.userAgent}function e0(){return/apple/i.test(navigator.vendor)}function Yd(){const e=/android/i;return e.test(J1())||e.test(W1())}function VC(){return J1().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function t0(){return W1().includes("jsdom/")}const by="data-floating-ui-focusable",GC="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function ai(e){let r=e.activeElement;for(;((i=r)==null||(i=i.shadowRoot)==null?void 0:i.activeElement)!=null;){var i;r=r.shadowRoot.activeElement}return r}function Pt(e,r){if(!e||!r)return!1;const i=r.getRootNode==null?void 0:r.getRootNode();if(e.contains(r))return!0;if(i&&Ka(i)){let l=r;for(;l;){if(e===l)return!0;l=l.parentNode||l.host}}return!1}function kr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function rd(e,r){if(r==null)return!1;if("composedPath"in e)return e.composedPath().includes(r);const i=e;return i.target!=null&&r.contains(i.target)}function YC(e){return e.matches("html,body")}function $t(e){return e?.ownerDocument||document}function Th(e){return Tt(e)&&e.matches(GC)}function yy(e){return e?e.getAttribute("role")==="combobox"&&Th(e):!1}function XC(e){if(!e||t0())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Xd(e){return e?e.hasAttribute(by)?e:e.querySelector("["+by+"]")||e:null}function Ll(e,r,i){return i===void 0&&(i=!0),e.filter(o=>{var u;return o.parentId===r&&(!i||((u=o.context)==null?void 0:u.open))}).flatMap(o=>[o,...Ll(e,o.id,i)])}function xy(e,r){var i;let l=[],o=(i=e.find(u=>u.id===r))==null?void 0:i.parentId;for(;o;){const u=e.find(c=>c.id===o);o=u?.parentId,u&&(l=l.concat(u))}return l}function id(e){e.preventDefault(),e.stopPropagation()}function ZC(e){return"nativeEvent"in e}function KC(e){return e.mozInputSource===0&&e.isTrusted?!0:Yd()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function QC(e){return t0()?!1:!Yd()&&e.width===0&&e.height===0||Yd()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Qa(e,r){const i=["mouse","pen"];return r||i.push("",void 0),i.includes(e)}var JC=typeof document<"u",WC=function(){},Vt=JC?A.useLayoutEffect:WC;const e3={...u1};function qn(e){const r=A.useRef(e);return Vt(()=>{r.current=e}),r}const t3=e3.useInsertionEffect,n3=t3||(e=>e());function sn(e){const r=A.useRef(()=>{});return n3(()=>{r.current=e}),A.useCallback(function(){for(var i=arguments.length,l=new Array(i),o=0;o<i;o++)l[o]=arguments[o];return r.current==null?void 0:r.current(...l)},[])}const io=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function n0(e,r){const i=ju(e,io()),l=i.length;if(l===0)return;const o=ai($t(e)),u=i.indexOf(o),c=u===-1?r===1?0:l-1:u+r;return i[c]}function r0(e){return n0($t(e).body,1)||e}function i0(e){return n0($t(e).body,-1)||e}function qa(e,r){const i=r||e.currentTarget,l=e.relatedTarget;return!l||!Pt(i,l)}function r3(e){ju(e,io()).forEach(i=>{i.dataset.tabindex=i.getAttribute("tabindex")||"",i.setAttribute("tabindex","-1")})}function vy(e){e.querySelectorAll("[data-tabindex]").forEach(i=>{const l=i.dataset.tabindex;delete i.dataset.tabindex,l?i.setAttribute("tabindex",l):i.removeAttribute("tabindex")})}var jh=c1();function wy(e,r,i){let{reference:l,floating:o}=e;const u=oi(r),c=$1(r),f=P1(c),p=Oi(r),h=u==="y",b=l.x+l.width/2-o.width/2,g=l.y+l.height/2-o.height/2,w=l[f]/2-o[f]/2;let x;switch(p){case"top":x={x:b,y:l.y-o.height};break;case"bottom":x={x:b,y:l.y+l.height};break;case"right":x={x:l.x+l.width,y:g};break;case"left":x={x:l.x-o.width,y:g};break;default:x={x:l.x,y:l.y}}switch(Tu(r)){case"start":x[c]-=w*(i&&h?-1:1);break;case"end":x[c]+=w*(i&&h?-1:1);break}return x}async function i3(e,r){var i;r===void 0&&(r={});const{x:l,y:o,platform:u,rects:c,elements:f,strategy:p}=e,{boundary:h="clippingAncestors",rootBoundary:b="viewport",elementContext:g="floating",altBoundary:w=!1,padding:x=0}=Au(r,e),v=jC(x),C=f[w?g==="floating"?"reference":"floating":g],N=$s(await u.getClippingRect({element:(i=await(u.isElement==null?void 0:u.isElement(C)))==null||i?C:C.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(f.floating)),boundary:h,rootBoundary:b,strategy:p})),E=g==="floating"?{x:l,y:o,width:c.floating.width,height:c.floating.height}:c.reference,R=await(u.getOffsetParent==null?void 0:u.getOffsetParent(f.floating)),O=await(u.isElement==null?void 0:u.isElement(R))?await(u.getScale==null?void 0:u.getScale(R))||{x:1,y:1}:{x:1,y:1},H=$s(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:E,offsetParent:R,strategy:p}):E);return{top:(N.top-H.top+v.top)/O.y,bottom:(H.bottom-N.bottom+v.bottom)/O.y,left:(N.left-H.left+v.left)/O.x,right:(H.right-N.right+v.right)/O.x}}const l3=50,a3=async(e,r,i)=>{const{placement:l="bottom",strategy:o="absolute",middleware:u=[],platform:c}=i,f=c.detectOverflow?c:{...c,detectOverflow:i3},p=await(c.isRTL==null?void 0:c.isRTL(r));let h=await c.getElementRects({reference:e,floating:r,strategy:o}),{x:b,y:g}=wy(h,l,p),w=l,x=0;const v={};for(let S=0;S<u.length;S++){const C=u[S];if(!C)continue;const{name:N,fn:E}=C,{x:R,y:O,data:H,reset:_}=await E({x:b,y:g,initialPlacement:l,placement:w,strategy:o,middlewareData:v,rects:h,platform:f,elements:{reference:e,floating:r}});b=R??b,g=O??g,v[N]={...v[N],...H},_&&x<l3&&(x++,typeof _=="object"&&(_.placement&&(w=_.placement),_.rects&&(h=_.rects===!0?await c.getElementRects({reference:e,floating:r,strategy:o}):_.rects),{x:b,y:g}=wy(h,w,p)),S=-1)}return{x:b,y:g,placement:w,strategy:o,middlewareData:v}},o3=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(r){var i,l;const{placement:o,middlewareData:u,rects:c,initialPlacement:f,platform:p,elements:h}=r,{mainAxis:b=!0,crossAxis:g=!0,fallbackPlacements:w,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:S=!0,...C}=Au(e,r);if((i=u.arrow)!=null&&i.alignmentOffset)return{};const N=Oi(o),E=oi(f),R=Oi(f)===f,O=await(p.isRTL==null?void 0:p.isRTL(h.floating)),H=w||(R||!S?[Ps(f)]:kC(f)),_=v!=="none";!w&&_&&H.push(...AC(f,S,v,O));const F=[f,...H],z=await p.detectOverflow(r,C),B=[];let M=((l=u.flip)==null?void 0:l.overflows)||[];if(b&&B.push(z[N]),g){const I=SC(o,c,O);B.push(z[I[0]],z[I[1]])}if(M=[...M,{placement:o,overflows:B}],!B.every(I=>I<=0)){var $,V;const I=((($=u.flip)==null?void 0:$.index)||0)+1,Z=F[I];if(Z&&(!(g==="alignment"?E!==oi(Z):!1)||M.every(X=>oi(X.placement)===E?X.overflows[0]>0:!0)))return{data:{index:I,overflows:M},reset:{placement:Z}};let U=(V=M.filter(Y=>Y.overflows[0]<=0).sort((Y,X)=>Y.overflows[1]-X.overflows[1])[0])==null?void 0:V.placement;if(!U)switch(x){case"bestFit":{var J;const Y=(J=M.filter(X=>{if(_){const q=oi(X.placement);return q===E||q==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(q=>q>0).reduce((q,j)=>q+j,0)]).sort((X,q)=>X[1]-q[1])[0])==null?void 0:J[0];Y&&(U=Y);break}case"initialPlacement":U=f;break}if(o!==U)return{reset:{placement:U}}}return{}}}},s3=new Set(["left","top"]);async function u3(e,r){const{placement:i,platform:l,elements:o}=e,u=await(l.isRTL==null?void 0:l.isRTL(o.floating)),c=Oi(i),f=Tu(i),p=oi(i)==="y",h=s3.has(c)?-1:1,b=u&&p?-1:1,g=Au(r,e);let{mainAxis:w,crossAxis:x,alignmentAxis:v}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return f&&typeof v=="number"&&(x=f==="end"?v*-1:v),p?{x:x*b,y:w*h}:{x:w*h,y:x*b}}const c3=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(r){var i,l;const{x:o,y:u,placement:c,middlewareData:f}=r,p=await u3(r,e);return c===((i=f.offset)==null?void 0:i.placement)&&(l=f.arrow)!=null&&l.alignmentOffset?{}:{x:o+p.x,y:u+p.y,data:{...p,placement:c}}}}},f3=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(r){const{x:i,y:l,placement:o,platform:u}=r,{mainAxis:c=!0,crossAxis:f=!1,limiter:p={fn:N=>{let{x:E,y:R}=N;return{x:E,y:R}}},...h}=Au(e,r),b={x:i,y:l},g=await u.detectOverflow(r,h),w=oi(Oi(o)),x=q1(w);let v=b[x],S=b[w];if(c){const N=x==="y"?"top":"left",E=x==="y"?"bottom":"right",R=v+g[N],O=v-g[E];v=hy(R,v,O)}if(f){const N=w==="y"?"top":"left",E=w==="y"?"bottom":"right",R=S+g[N],O=S-g[E];S=hy(R,S,O)}const C=p.fn({...r,[x]:v,[w]:S});return{...C,data:{x:C.x-i,y:C.y-l,enabled:{[x]:c,[w]:f}}}}}};function l0(e){const r=Fn(e);let i=parseFloat(r.width)||0,l=parseFloat(r.height)||0;const o=Tt(e),u=o?e.offsetWidth:i,c=o?e.offsetHeight:l,f=qs(i)!==u||qs(l)!==c;return f&&(i=u,l=c),{width:i,height:l,$:f}}function Rh(e){return ct(e)?e:e.contextElement}function Dl(e){const r=Rh(e);if(!Tt(r))return Jn(1);const i=r.getBoundingClientRect(),{width:l,height:o,$:u}=l0(r);let c=(u?qs(i.width):i.width)/l,f=(u?qs(i.height):i.height)/o;return(!c||!Number.isFinite(c))&&(c=1),(!f||!Number.isFinite(f))&&(f=1),{x:c,y:f}}const d3=Jn(0);function a0(e){const r=un(e);return!Cu()||!r.visualViewport?d3:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function h3(e,r,i){return r===void 0&&(r=!1),!i||r&&i!==un(e)?!1:r}function Mi(e,r,i,l){r===void 0&&(r=!1),i===void 0&&(i=!1);const o=e.getBoundingClientRect(),u=Rh(e);let c=Jn(1);r&&(l?ct(l)&&(c=Dl(l)):c=Dl(e));const f=h3(u,i,l)?a0(u):Jn(0);let p=(o.left+f.x)/c.x,h=(o.top+f.y)/c.y,b=o.width/c.x,g=o.height/c.y;if(u){const w=un(u),x=l&&ct(l)?un(l):l;let v=w,S=Pd(v);for(;S&&l&&x!==v;){const C=Dl(S),N=S.getBoundingClientRect(),E=Fn(S),R=N.left+(S.clientLeft+parseFloat(E.paddingLeft))*C.x,O=N.top+(S.clientTop+parseFloat(E.paddingTop))*C.y;p*=C.x,h*=C.y,b*=C.x,g*=C.y,p+=R,h+=O,v=un(S),S=Pd(v)}}return $s({width:b,height:g,x:p,y:h})}function Ru(e,r){const i=Nu(e).scrollLeft;return r?r.left+i:Mi(Wn(e)).left+i}function o0(e,r){const i=e.getBoundingClientRect(),l=i.left+r.scrollLeft-Ru(e,i),o=i.top+r.scrollTop;return{x:l,y:o}}function p3(e){let{elements:r,rect:i,offsetParent:l,strategy:o}=e;const u=o==="fixed",c=Wn(l),f=r?Eu(r.floating):!1;if(l===c||f&&u)return i;let p={scrollLeft:0,scrollTop:0},h=Jn(1);const b=Jn(0),g=Tt(l);if((g||!g&&!u)&&((fi(l)!=="body"||ro(c))&&(p=Nu(l)),g)){const x=Mi(l);h=Dl(l),b.x=x.x+l.clientLeft,b.y=x.y+l.clientTop}const w=c&&!g&&!u?o0(c,p):Jn(0);return{width:i.width*h.x,height:i.height*h.y,x:i.x*h.x-p.scrollLeft*h.x+b.x+w.x,y:i.y*h.y-p.scrollTop*h.y+b.y+w.y}}function m3(e){return Array.from(e.getClientRects())}function g3(e){const r=Wn(e),i=Nu(e),l=e.ownerDocument.body,o=Di(r.scrollWidth,r.clientWidth,l.scrollWidth,l.clientWidth),u=Di(r.scrollHeight,r.clientHeight,l.scrollHeight,l.clientHeight);let c=-i.scrollLeft+Ru(e);const f=-i.scrollTop;return Fn(l).direction==="rtl"&&(c+=Di(r.clientWidth,l.clientWidth)-o),{width:o,height:u,x:c,y:f}}const Sy=25;function b3(e,r){const i=un(e),l=Wn(e),o=i.visualViewport;let u=l.clientWidth,c=l.clientHeight,f=0,p=0;if(o){u=o.width,c=o.height;const b=Cu();(!b||b&&r==="fixed")&&(f=o.offsetLeft,p=o.offsetTop)}const h=Ru(l);if(h<=0){const b=l.ownerDocument,g=b.body,w=getComputedStyle(g),x=b.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,v=Math.abs(l.clientWidth-g.clientWidth-x);v<=Sy&&(u-=v)}else h<=Sy&&(u+=h);return{width:u,height:c,x:f,y:p}}function y3(e,r){const i=Mi(e,!0,r==="fixed"),l=i.top+e.clientTop,o=i.left+e.clientLeft,u=Tt(e)?Dl(e):Jn(1),c=e.clientWidth*u.x,f=e.clientHeight*u.y,p=o*u.x,h=l*u.y;return{width:c,height:f,x:p,y:h}}function ky(e,r,i){let l;if(r==="viewport")l=b3(e,i);else if(r==="document")l=g3(Wn(e));else if(ct(r))l=y3(r,i);else{const o=a0(e);l={x:r.x-o.x,y:r.y-o.y,width:r.width,height:r.height}}return $s(l)}function s0(e,r){const i=Nr(e);return i===r||!ct(i)||Cr(i)?!1:Fn(i).position==="fixed"||s0(i,r)}function x3(e,r){const i=r.get(e);if(i)return i;let l=ci(e,[],!1).filter(f=>ct(f)&&fi(f)!=="body"),o=null;const u=Fn(e).position==="fixed";let c=u?Nr(e):e;for(;ct(c)&&!Cr(c);){const f=Fn(c),p=Ah(c);!p&&f.position==="fixed"&&(o=null),(u?!p&&!o:!p&&f.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||ro(c)&&!p&&s0(e,c))?l=l.filter(b=>b!==c):o=f,c=Nr(c)}return r.set(e,l),l}function v3(e){let{element:r,boundary:i,rootBoundary:l,strategy:o}=e;const c=[...i==="clippingAncestors"?Eu(r)?[]:x3(r,this._c):[].concat(i),l],f=ky(r,c[0],o);let p=f.top,h=f.right,b=f.bottom,g=f.left;for(let w=1;w<c.length;w++){const x=ky(r,c[w],o);p=Di(x.top,p),h=Hs(x.right,h),b=Hs(x.bottom,b),g=Di(x.left,g)}return{width:h-g,height:b-p,x:g,y:p}}function w3(e){const{width:r,height:i}=l0(e);return{width:r,height:i}}function S3(e,r,i){const l=Tt(r),o=Wn(r),u=i==="fixed",c=Mi(e,!0,u,r);let f={scrollLeft:0,scrollTop:0};const p=Jn(0);function h(){p.x=Ru(o)}if(l||!l&&!u)if((fi(r)!=="body"||ro(o))&&(f=Nu(r)),l){const x=Mi(r,!0,u,r);p.x=x.x+r.clientLeft,p.y=x.y+r.clientTop}else o&&h();u&&!l&&o&&h();const b=o&&!l&&!u?o0(o,f):Jn(0),g=c.left+f.scrollLeft-p.x-b.x,w=c.top+f.scrollTop-p.y-b.y;return{x:g,y:w,width:c.width,height:c.height}}function ld(e){return Fn(e).position==="static"}function Ey(e,r){if(!Tt(e)||Fn(e).position==="fixed")return null;if(r)return r(e);let i=e.offsetParent;return Wn(e)===i&&(i=i.ownerDocument.body),i}function u0(e,r){const i=un(e);if(Eu(e))return i;if(!Tt(e)){let o=Nr(e);for(;o&&!Cr(o);){if(ct(o)&&!ld(o))return o;o=Nr(o)}return i}let l=Ey(e,r);for(;l&&bC(l)&&ld(l);)l=Ey(l,r);return l&&Cr(l)&&ld(l)&&!Ah(l)?i:l||vC(e)||i}const k3=async function(e){const r=this.getOffsetParent||u0,i=this.getDimensions,l=await i(e.floating);return{reference:S3(e.reference,await r(e.floating),e.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}};function E3(e){return Fn(e).direction==="rtl"}const C3={convertOffsetParentRelativeRectToViewportRelativeRect:p3,getDocumentElement:Wn,getClippingRect:v3,getOffsetParent:u0,getElementRects:k3,getClientRects:m3,getDimensions:w3,getScale:Dl,isElement:ct,isRTL:E3};function c0(e,r){return e.x===r.x&&e.y===r.y&&e.width===r.width&&e.height===r.height}function N3(e,r){let i=null,l;const o=Wn(e);function u(){var f;clearTimeout(l),(f=i)==null||f.disconnect(),i=null}function c(f,p){f===void 0&&(f=!1),p===void 0&&(p=1),u();const h=e.getBoundingClientRect(),{left:b,top:g,width:w,height:x}=h;if(f||r(),!w||!x)return;const v=Cs(g),S=Cs(o.clientWidth-(b+w)),C=Cs(o.clientHeight-(g+x)),N=Cs(b),R={rootMargin:-v+"px "+-S+"px "+-C+"px "+-N+"px",threshold:Di(0,Hs(1,p))||1};let O=!0;function H(_){const F=_[0].intersectionRatio;if(F!==p){if(!O)return c();F?c(!1,F):l=setTimeout(()=>{c(!1,1e-7)},1e3)}F===1&&!c0(h,e.getBoundingClientRect())&&c(),O=!1}try{i=new IntersectionObserver(H,{...R,root:o.ownerDocument})}catch{i=new IntersectionObserver(H,R)}i.observe(e)}return c(!0),u}function Zs(e,r,i,l){l===void 0&&(l={});const{ancestorScroll:o=!0,ancestorResize:u=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:p=!1}=l,h=Rh(e),b=o||u?[...h?ci(h):[],...r?ci(r):[]]:[];b.forEach(N=>{o&&N.addEventListener("scroll",i,{passive:!0}),u&&N.addEventListener("resize",i)});const g=h&&f?N3(h,i):null;let w=-1,x=null;c&&(x=new ResizeObserver(N=>{let[E]=N;E&&E.target===h&&x&&r&&(x.unobserve(r),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var R;(R=x)==null||R.observe(r)})),i()}),h&&!p&&x.observe(h),r&&x.observe(r));let v,S=p?Mi(e):null;p&&C();function C(){const N=Mi(e);S&&!c0(S,N)&&i(),S=N,v=requestAnimationFrame(C)}return i(),()=>{var N;b.forEach(E=>{o&&E.removeEventListener("scroll",i),u&&E.removeEventListener("resize",i)}),g?.(),(N=x)==null||N.disconnect(),x=null,p&&cancelAnimationFrame(v)}}const A3=c3,T3=f3,j3=o3,R3=(e,r,i)=>{const l=new Map,o={platform:C3,...i},u={...o.platform,_c:l};return a3(e,r,{...o,platform:u})};var _3=typeof document<"u",L3=function(){},Ms=_3?A.useLayoutEffect:L3;function Ks(e,r){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(typeof e=="function"&&e.toString()===r.toString())return!0;let i,l,o;if(e&&r&&typeof e=="object"){if(Array.isArray(e)){if(i=e.length,i!==r.length)return!1;for(l=i;l--!==0;)if(!Ks(e[l],r[l]))return!1;return!0}if(o=Object.keys(e),i=o.length,i!==Object.keys(r).length)return!1;for(l=i;l--!==0;)if(!{}.hasOwnProperty.call(r,o[l]))return!1;for(l=i;l--!==0;){const u=o[l];if(!(u==="_owner"&&e.$$typeof)&&!Ks(e[u],r[u]))return!1}return!0}return e!==e&&r!==r}function f0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Cy(e,r){const i=f0(e);return Math.round(r*i)/i}function ad(e){const r=A.useRef(e);return Ms(()=>{r.current=e}),r}function D3(e){e===void 0&&(e={});const{placement:r="bottom",strategy:i="absolute",middleware:l=[],platform:o,elements:{reference:u,floating:c}={},transform:f=!0,whileElementsMounted:p,open:h}=e,[b,g]=A.useState({x:0,y:0,strategy:i,placement:r,middlewareData:{},isPositioned:!1}),[w,x]=A.useState(l);Ks(w,l)||x(l);const[v,S]=A.useState(null),[C,N]=A.useState(null),E=A.useCallback(X=>{X!==_.current&&(_.current=X,S(X))},[]),R=A.useCallback(X=>{X!==F.current&&(F.current=X,N(X))},[]),O=u||v,H=c||C,_=A.useRef(null),F=A.useRef(null),z=A.useRef(b),B=p!=null,M=ad(p),$=ad(o),V=ad(h),J=A.useCallback(()=>{if(!_.current||!F.current)return;const X={placement:r,strategy:i,middleware:w};$.current&&(X.platform=$.current),R3(_.current,F.current,X).then(q=>{const j={...q,isPositioned:V.current!==!1};I.current&&!Ks(z.current,j)&&(z.current=j,jh.flushSync(()=>{g(j)}))})},[w,r,i,$,V]);Ms(()=>{h===!1&&z.current.isPositioned&&(z.current.isPositioned=!1,g(X=>({...X,isPositioned:!1})))},[h]);const I=A.useRef(!1);Ms(()=>(I.current=!0,()=>{I.current=!1}),[]),Ms(()=>{if(O&&(_.current=O),H&&(F.current=H),O&&H){if(M.current)return M.current(O,H,J);J()}},[O,H,J,M,B]);const Z=A.useMemo(()=>({reference:_,floating:F,setReference:E,setFloating:R}),[E,R]),U=A.useMemo(()=>({reference:O,floating:H}),[O,H]),Y=A.useMemo(()=>{const X={position:i,left:0,top:0};if(!U.floating)return X;const q=Cy(U.floating,b.x),j=Cy(U.floating,b.y);return f?{...X,transform:"translate("+q+"px, "+j+"px)",...f0(U.floating)>=1.5&&{willChange:"transform"}}:{position:i,left:q,top:j}},[i,f,U.floating,b.x,b.y]);return A.useMemo(()=>({...b,update:J,refs:Z,elements:U,floatingStyles:Y}),[b,J,Z,U,Y])}const Qs=(e,r)=>{const i=A3(e);return{name:i.name,fn:i.fn,options:[e,r]}},Js=(e,r)=>{const i=T3(e);return{name:i.name,fn:i.fn,options:[e,r]}},Ws=(e,r)=>{const i=j3(e);return{name:i.name,fn:i.fn,options:[e,r]}},O3="data-floating-ui-focusable",Ny="active",Ay="selected",M3={...u1};let Ty=!1,z3=0;const jy=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+z3++;function F3(){const[e,r]=A.useState(()=>Ty?jy():void 0);return Vt(()=>{e==null&&r(jy())},[]),A.useEffect(()=>{Ty=!0},[]),e}const I3=M3.useId,_h=I3||F3;function B3(){const e=new Map;return{emit(r,i){var l;(l=e.get(r))==null||l.forEach(o=>o(i))},on(r,i){e.has(r)||e.set(r,new Set),e.get(r).add(i)},off(r,i){var l;(l=e.get(r))==null||l.delete(i)}}}const U3=A.createContext(null),H3=A.createContext(null),Lh=()=>{var e;return((e=A.useContext(U3))==null?void 0:e.id)||null},_u=()=>A.useContext(H3);function zi(e){return"data-floating-ui-"+e}function Zt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const Ry=zi("safe-polygon");function od(e,r,i){if(i&&!Qa(i))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const l=e();return typeof l=="number"?l:l?.[r]}return e?.[r]}function sd(e){return typeof e=="function"?e():e}function eu(e,r){r===void 0&&(r={});const{open:i,onOpenChange:l,dataRef:o,events:u,elements:c}=e,{enabled:f=!0,delay:p=0,handleClose:h=null,mouseOnly:b=!1,restMs:g=0,move:w=!0}=r,x=_u(),v=Lh(),S=qn(h),C=qn(p),N=qn(i),E=qn(g),R=A.useRef(),O=A.useRef(-1),H=A.useRef(),_=A.useRef(-1),F=A.useRef(!0),z=A.useRef(!1),B=A.useRef(()=>{}),M=A.useRef(!1),$=sn(()=>{var Y;const X=(Y=o.current.openEvent)==null?void 0:Y.type;return X?.includes("mouse")&&X!=="mousedown"});A.useEffect(()=>{if(!f)return;function Y(X){let{open:q}=X;q||(Zt(O),Zt(_),F.current=!0,M.current=!1)}return u.on("openchange",Y),()=>{u.off("openchange",Y)}},[f,u]),A.useEffect(()=>{if(!f||!S.current||!i)return;function Y(q){$()&&l(!1,q,"hover")}const X=$t(c.floating).documentElement;return X.addEventListener("mouseleave",Y),()=>{X.removeEventListener("mouseleave",Y)}},[c.floating,i,l,f,S,$]);const V=A.useCallback(function(Y,X,q){X===void 0&&(X=!0),q===void 0&&(q="hover");const j=od(C.current,"close",R.current);j&&!H.current?(Zt(O),O.current=window.setTimeout(()=>l(!1,Y,q),j)):X&&(Zt(O),l(!1,Y,q))},[C,l]),J=sn(()=>{B.current(),H.current=void 0}),I=sn(()=>{if(z.current){const Y=$t(c.floating).body;Y.style.pointerEvents="",Y.removeAttribute(Ry),z.current=!1}}),Z=sn(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);A.useEffect(()=>{if(!f)return;function Y(P){if(Zt(O),F.current=!1,b&&!Qa(R.current)||sd(E.current)>0&&!od(C.current,"open"))return;const T=od(C.current,"open",R.current);T?O.current=window.setTimeout(()=>{N.current||l(!0,P,"hover")},T):i||l(!0,P,"hover")}function X(P){if(Z()){I();return}B.current();const T=$t(c.floating);if(Zt(_),M.current=!1,S.current&&o.current.floatingContext){i||Zt(O),H.current=S.current({...o.current.floatingContext,tree:x,x:P.clientX,y:P.clientY,onClose(){I(),J(),Z()||V(P,!0,"safe-polygon")}});const te=H.current;T.addEventListener("mousemove",te),B.current=()=>{T.removeEventListener("mousemove",te)};return}(R.current!=="touch"||!Pt(c.floating,P.relatedTarget))&&V(P)}function q(P){Z()||o.current.floatingContext&&(S.current==null||S.current({...o.current.floatingContext,tree:x,x:P.clientX,y:P.clientY,onClose(){I(),J(),Z()||V(P)}})(P))}function j(){Zt(O)}function D(P){Z()||V(P,!1)}if(ct(c.domReference)){const P=c.domReference,T=c.floating;return i&&P.addEventListener("mouseleave",q),w&&P.addEventListener("mousemove",Y,{once:!0}),P.addEventListener("mouseenter",Y),P.addEventListener("mouseleave",X),T&&(T.addEventListener("mouseleave",q),T.addEventListener("mouseenter",j),T.addEventListener("mouseleave",D)),()=>{i&&P.removeEventListener("mouseleave",q),w&&P.removeEventListener("mousemove",Y),P.removeEventListener("mouseenter",Y),P.removeEventListener("mouseleave",X),T&&(T.removeEventListener("mouseleave",q),T.removeEventListener("mouseenter",j),T.removeEventListener("mouseleave",D))}}},[c,f,e,b,w,V,J,I,l,i,N,x,C,S,o,Z,E]),Vt(()=>{var Y;if(f&&i&&(Y=S.current)!=null&&(Y=Y.__options)!=null&&Y.blockPointerEvents&&$()){z.current=!0;const q=c.floating;if(ct(c.domReference)&&q){var X;const j=$t(c.floating).body;j.setAttribute(Ry,"");const D=c.domReference,P=x==null||(X=x.nodesRef.current.find(T=>T.id===v))==null||(X=X.context)==null?void 0:X.elements.floating;return P&&(P.style.pointerEvents=""),j.style.pointerEvents="none",D.style.pointerEvents="auto",q.style.pointerEvents="auto",()=>{j.style.pointerEvents="",D.style.pointerEvents="",q.style.pointerEvents=""}}}},[f,i,v,c,x,S,$]),Vt(()=>{i||(R.current=void 0,M.current=!1,J(),I())},[i,J,I]),A.useEffect(()=>()=>{J(),Zt(O),Zt(_),I()},[f,c.domReference,J,I]);const U=A.useMemo(()=>{function Y(X){R.current=X.pointerType}return{onPointerDown:Y,onPointerEnter:Y,onMouseMove(X){const{nativeEvent:q}=X;function j(){!F.current&&!N.current&&l(!0,q,"hover")}b&&!Qa(R.current)||i||sd(E.current)===0||M.current&&X.movementX**2+X.movementY**2<2||(Zt(_),R.current==="touch"?j():(M.current=!0,_.current=window.setTimeout(j,sd(E.current))))}}},[b,l,i,N,E]);return A.useMemo(()=>f?{reference:U}:{},[f,U])}let _y=0;function Cl(e,r){r===void 0&&(r={});const{preventScroll:i=!1,cancelPrevious:l=!0,sync:o=!1}=r;l&&cancelAnimationFrame(_y);const u=()=>e?.focus({preventScroll:i});o?u():_y=requestAnimationFrame(u)}function ud(e,r){if(!e||!r)return!1;const i=r.getRootNode==null?void 0:r.getRootNode();if(e.contains(r))return!0;if(i&&Ka(i)){let l=r;for(;l;){if(e===l)return!0;l=l.parentNode||l.host}}return!1}function q3(e){return"composedPath"in e?e.composedPath()[0]:e.target}function P3(e){return e?.ownerDocument||document}const Ol={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Ly(e){return e==="inert"?Ol.inert:e==="aria-hidden"?Ol["aria-hidden"]:Ol.none}let Ns=new WeakSet,As={},cd=0;const $3=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype;function d0(e){return e?Ka(e)?e.host:d0(e.parentNode):null}const V3=(e,r)=>r.map(i=>{if(e.contains(i))return i;const l=d0(i);return e.contains(l)?l:null}).filter(i=>i!=null);function G3(e,r,i,l){const o="data-floating-ui-inert",u=l?"inert":i?"aria-hidden":null,c=V3(r,e),f=new Set,p=new Set(c),h=[];As[o]||(As[o]=new WeakMap);const b=As[o];c.forEach(g),w(r),f.clear();function g(x){!x||f.has(x)||(f.add(x),x.parentNode&&g(x.parentNode))}function w(x){!x||p.has(x)||[].forEach.call(x.children,v=>{if(fi(v)!=="script")if(f.has(v))w(v);else{const S=u?v.getAttribute(u):null,C=S!==null&&S!=="false",N=Ly(u),E=(N.get(v)||0)+1,R=(b.get(v)||0)+1;N.set(v,E),b.set(v,R),h.push(v),E===1&&C&&Ns.add(v),R===1&&v.setAttribute(o,""),!C&&u&&v.setAttribute(u,u==="inert"?"":"true")}})}return cd++,()=>{h.forEach(x=>{const v=Ly(u),C=(v.get(x)||0)-1,N=(b.get(x)||0)-1;v.set(x,C),b.set(x,N),C||(!Ns.has(x)&&u&&x.removeAttribute(u),Ns.delete(x)),N||x.removeAttribute(o)}),cd--,cd||(Ol.inert=new WeakMap,Ol["aria-hidden"]=new WeakMap,Ol.none=new WeakMap,Ns=new WeakSet,As={})}}function Dy(e,r,i){r===void 0&&(r=!1),i===void 0&&(i=!1);const l=P3(e[0]).body;return G3(e.concat(Array.from(l.querySelectorAll('[aria-live],[role="status"],output'))),l,r,i)}const Dh={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},tu=A.forwardRef(function(r,i){const[l,o]=A.useState();Vt(()=>{e0()&&o("button")},[]);const u={ref:i,tabIndex:0,role:l,"aria-hidden":l?void 0:!0,[zi("focus-guard")]:"",style:Dh};return y.jsx("span",{...r,...u})}),Y3={clipPath:"inset(50%)",position:"fixed",top:0,left:0},h0=A.createContext(null),Oy=zi("portal");function X3(e){e===void 0&&(e={});const{id:r,root:i}=e,l=_h(),o=p0(),[u,c]=A.useState(null),f=A.useRef(null);return Vt(()=>()=>{u?.remove(),queueMicrotask(()=>{f.current=null})},[u]),Vt(()=>{if(!l||f.current)return;const p=r?document.getElementById(r):null;if(!p)return;const h=document.createElement("div");h.id=l,h.setAttribute(Oy,""),p.appendChild(h),f.current=h,c(h)},[r,l]),Vt(()=>{if(i===null||!l||f.current)return;let p=i||o?.portalNode;p&&!Nh(p)&&(p=p.current),p=p||document.body;let h=null;r&&(h=document.createElement("div"),h.id=r,p.appendChild(h));const b=document.createElement("div");b.id=l,b.setAttribute(Oy,""),p=h||p,p.appendChild(b),f.current=b,c(b)},[r,i,l,o]),u}function nu(e){const{children:r,id:i,root:l,preserveTabOrder:o=!0}=e,u=X3({id:i,root:l}),[c,f]=A.useState(null),p=A.useRef(null),h=A.useRef(null),b=A.useRef(null),g=A.useRef(null),w=c?.modal,x=c?.open,v=!!c&&!c.modal&&c.open&&o&&!!(l||u);return A.useEffect(()=>{if(!u||!o||w)return;function S(C){u&&qa(C)&&(C.type==="focusin"?vy:r3)(u)}return u.addEventListener("focusin",S,!0),u.addEventListener("focusout",S,!0),()=>{u.removeEventListener("focusin",S,!0),u.removeEventListener("focusout",S,!0)}},[u,o,w]),A.useEffect(()=>{u&&(x||vy(u))},[x,u]),y.jsxs(h0.Provider,{value:A.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:p,afterOutsideRef:h,beforeInsideRef:b,afterInsideRef:g,portalNode:u,setFocusManagerState:f}),[o,u]),children:[v&&u&&y.jsx(tu,{"data-type":"outside",ref:p,onFocus:S=>{if(qa(S,u)){var C;(C=b.current)==null||C.focus()}else{const N=c?c.domReference:null,E=i0(N);E?.focus()}}}),v&&u&&y.jsx("span",{"aria-owns":u.id,style:Y3}),u&&jh.createPortal(r,u),v&&u&&y.jsx(tu,{"data-type":"outside",ref:h,onFocus:S=>{if(qa(S,u)){var C;(C=g.current)==null||C.focus()}else{const N=c?c.domReference:null,E=r0(N);E?.focus(),c?.closeOnFocusOut&&c?.onOpenChange(!1,S.nativeEvent,"focus-out")}}})]})}const p0=()=>A.useContext(h0);function My(e){return A.useMemo(()=>r=>{e.forEach(i=>{i&&(i.current=r)})},e)}const zy=20;let si=[];function Oh(){si=si.filter(e=>{var r;return(r=e.deref())==null?void 0:r.isConnected})}function Z3(e){Oh(),e&&fi(e)!=="body"&&(si.push(new WeakRef(e)),si.length>zy&&(si=si.slice(-zy)))}function Fy(){Oh();const e=si[si.length-1];return e?.deref()}function K3(e){const r=io();return Q1(e,r)?e:ju(e,r)[0]||e}function Iy(e,r){var i;if(!r.current.includes("floating")&&!((i=e.getAttribute("role"))!=null&&i.includes("dialog")))return;const l=io(),u=$C(e,l).filter(f=>{const p=f.getAttribute("data-tabindex")||"";return Q1(f,l)||f.hasAttribute("data-tabindex")&&!p.startsWith("-")}),c=e.getAttribute("tabindex");r.current.includes("floating")||u.length===0?c!=="0"&&e.setAttribute("tabindex","0"):(c!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const Q3=A.forwardRef(function(r,i){return y.jsx("button",{...r,type:"button",ref:i,tabIndex:-1,style:Dh})});function J3(e){const{context:r,children:i,disabled:l=!1,order:o=["content"],guards:u=!0,initialFocus:c=0,returnFocus:f=!0,restoreFocus:p=!1,modal:h=!0,visuallyHiddenDismiss:b=!1,closeOnFocusOut:g=!0,outsideElementsInert:w=!1,getInsideElements:x=()=>[]}=e,{open:v,onOpenChange:S,events:C,dataRef:N,elements:{domReference:E,floating:R}}=r,O=sn(()=>{var de;return(de=N.current.floatingContext)==null?void 0:de.nodeId}),H=sn(x),_=typeof c=="number"&&c<0,F=yy(E)&&_,z=$3(),B=z?u:!0,M=!B||z&&w,$=qn(o),V=qn(c),J=qn(f),I=_u(),Z=p0(),U=A.useRef(null),Y=A.useRef(null),X=A.useRef(!1),q=A.useRef(!1),j=A.useRef(-1),D=A.useRef(-1),P=Z!=null,T=Xd(R),W=sn(function(de){return de===void 0&&(de=T),de?ju(de,io()):[]}),te=sn(de=>{const ye=W(de);return $.current.map(we=>E&&we==="reference"?E:T&&we==="floating"?T:ye).filter(Boolean).flat()});A.useEffect(()=>{if(l||!h)return;function de(we){if(we.key==="Tab"){Pt(T,ai($t(T)))&&W().length===0&&!F&&id(we);const Re=te(),Ye=kr(we);$.current[0]==="reference"&&Ye===E&&(id(we),we.shiftKey?Cl(Re[Re.length-1]):Cl(Re[1])),$.current[1]==="floating"&&Ye===T&&we.shiftKey&&(id(we),Cl(Re[0]))}}const ye=$t(T);return ye.addEventListener("keydown",de),()=>{ye.removeEventListener("keydown",de)}},[l,E,T,h,$,F,W,te]),A.useEffect(()=>{if(l||!R)return;function de(ye){const we=kr(ye),Ye=W().indexOf(we);Ye!==-1&&(j.current=Ye)}return R.addEventListener("focusin",de),()=>{R.removeEventListener("focusin",de)}},[l,R,W]),A.useEffect(()=>{if(l||!g)return;function de(){q.current=!0,setTimeout(()=>{q.current=!1})}function ye(Ye){const Ie=Ye.relatedTarget,It=Ye.currentTarget,at=kr(Ye);queueMicrotask(()=>{const pt=O(),Bt=!(Pt(E,Ie)||Pt(R,Ie)||Pt(Ie,R)||Pt(Z?.portalNode,Ie)||Ie!=null&&Ie.hasAttribute(zi("focus-guard"))||I&&(Ll(I.nodesRef.current,pt).find(Jt=>{var Ut,Fe;return Pt((Ut=Jt.context)==null?void 0:Ut.elements.floating,Ie)||Pt((Fe=Jt.context)==null?void 0:Fe.elements.domReference,Ie)})||xy(I.nodesRef.current,pt).find(Jt=>{var Ut,Fe,tr;return[(Ut=Jt.context)==null?void 0:Ut.elements.floating,Xd((Fe=Jt.context)==null?void 0:Fe.elements.floating)].includes(Ie)||((tr=Jt.context)==null?void 0:tr.elements.domReference)===Ie})));if(It===E&&T&&Iy(T,$),p&&It!==E&&!(at!=null&&at.isConnected)&&ai($t(T))===$t(T).body){Tt(T)&&T.focus();const Jt=j.current,Ut=W(),Fe=Ut[Jt]||Ut[Ut.length-1]||T;Tt(Fe)&&Fe.focus()}if(N.current.insideReactTree){N.current.insideReactTree=!1;return}(F||!h)&&Ie&&Bt&&!q.current&&Ie!==Fy()&&(X.current=!0,S(!1,Ye,"focus-out"))})}const we=!!(!I&&Z);function Re(){Zt(D),N.current.insideReactTree=!0,D.current=window.setTimeout(()=>{N.current.insideReactTree=!1})}if(R&&Tt(E))return E.addEventListener("focusout",ye),E.addEventListener("pointerdown",de),R.addEventListener("focusout",ye),we&&R.addEventListener("focusout",Re,!0),()=>{E.removeEventListener("focusout",ye),E.removeEventListener("pointerdown",de),R.removeEventListener("focusout",ye),we&&R.removeEventListener("focusout",Re,!0)}},[l,E,R,T,h,I,Z,S,g,p,W,F,O,$,N]);const ce=A.useRef(null),me=A.useRef(null),xe=My([ce,Z?.beforeInsideRef]),ge=My([me,Z?.afterInsideRef]);A.useEffect(()=>{var de,ye;if(l||!R)return;const we=Array.from((Z==null||(de=Z.portalNode)==null?void 0:de.querySelectorAll("["+zi("portal")+"]"))||[]),Ye=(ye=(I?xy(I.nodesRef.current,O()):[]).find(at=>{var pt;return yy(((pt=at.context)==null?void 0:pt.elements.domReference)||null)}))==null||(ye=ye.context)==null?void 0:ye.elements.domReference,Ie=[R,Ye,...we,...H(),U.current,Y.current,ce.current,me.current,Z?.beforeOutsideRef.current,Z?.afterOutsideRef.current,$.current.includes("reference")||F?E:null].filter(at=>at!=null),It=h||F?Dy(Ie,!M,M):Dy(Ie);return()=>{It()}},[l,E,R,h,$,Z,F,B,M,I,O,H]),Vt(()=>{if(l||!Tt(T))return;const de=$t(T),ye=ai(de);queueMicrotask(()=>{const we=te(T),Re=V.current,Ye=(typeof Re=="number"?we[Re]:Re.current)||T,Ie=Pt(T,ye);!_&&!Ie&&v&&Cl(Ye,{preventScroll:Ye===T})})},[l,v,T,_,te,V]),Vt(()=>{if(l||!T)return;const de=$t(T),ye=ai(de);Z3(ye);function we(Ie){let{reason:It,event:at,nested:pt}=Ie;if(["hover","safe-polygon"].includes(It)&&at.type==="mouseleave"&&(X.current=!0),It==="outside-press")if(pt)X.current=!1;else if(KC(at)||QC(at))X.current=!1;else{let Bt=!1;document.createElement("div").focus({get preventScroll(){return Bt=!0,!1}}),Bt?X.current=!1:X.current=!0}}C.on("openchange",we);const Re=de.createElement("span");Re.setAttribute("tabindex","-1"),Re.setAttribute("aria-hidden","true"),Object.assign(Re.style,Dh),P&&E&&E.insertAdjacentElement("afterend",Re);function Ye(){if(typeof J.current=="boolean"){const Ie=E||Fy();return Ie&&Ie.isConnected?Ie:Re}return J.current.current||Re}return()=>{C.off("openchange",we);const Ie=ai(de),It=Pt(R,Ie)||I&&Ll(I.nodesRef.current,O(),!1).some(pt=>{var Bt;return Pt((Bt=pt.context)==null?void 0:Bt.elements.floating,Ie)}),at=Ye();queueMicrotask(()=>{const pt=K3(at);J.current&&!X.current&&Tt(pt)&&(!(pt!==Ie&&Ie!==de.body)||It)&&pt.focus({preventScroll:!0}),Re.remove()})}},[l,R,T,J,N,C,I,P,E,O]),A.useEffect(()=>(queueMicrotask(()=>{X.current=!1}),()=>{queueMicrotask(Oh)}),[l]),Vt(()=>{if(!l&&Z)return Z.setFocusManagerState({modal:h,closeOnFocusOut:g,open:v,onOpenChange:S,domReference:E}),()=>{Z.setFocusManagerState(null)}},[l,Z,h,v,S,g,E]),Vt(()=>{l||T&&Iy(T,$)},[l,T,$]);function ve(de){return l||!b||!h?null:y.jsx(Q3,{ref:de==="start"?U:Y,onClick:ye=>S(!1,ye.nativeEvent),children:typeof b=="string"?b:"Dismiss"})}const Ee=!l&&B&&(h?!F:!0)&&(P||h);return y.jsxs(y.Fragment,{children:[Ee&&y.jsx(tu,{"data-type":"inside",ref:xe,onFocus:de=>{if(h){const we=te();Cl(o[0]==="reference"?we[0]:we[we.length-1])}else if(Z!=null&&Z.preserveTabOrder&&Z.portalNode)if(X.current=!1,qa(de,Z.portalNode)){const we=r0(E);we?.focus()}else{var ye;(ye=Z.beforeOutsideRef.current)==null||ye.focus()}}}),!F&&ve("start"),i,ve("end"),Ee&&y.jsx(tu,{"data-type":"inside",ref:ge,onFocus:de=>{if(h)Cl(te()[0]);else if(Z!=null&&Z.preserveTabOrder&&Z.portalNode)if(g&&(X.current=!0),qa(de,Z.portalNode)){const we=i0(E);we?.focus()}else{var ye;(ye=Z.afterOutsideRef.current)==null||ye.focus()}}})]})}function By(e){return Tt(e.target)&&e.target.tagName==="BUTTON"}function W3(e){return Tt(e.target)&&e.target.tagName==="A"}function Uy(e){return Th(e)}function Zd(e,r){r===void 0&&(r={});const{open:i,onOpenChange:l,dataRef:o,elements:{domReference:u}}=e,{enabled:c=!0,event:f="click",toggle:p=!0,ignoreMouse:h=!1,keyboardHandlers:b=!0,stickIfOpen:g=!0}=r,w=A.useRef(),x=A.useRef(!1),v=A.useMemo(()=>({onPointerDown(S){w.current=S.pointerType},onMouseDown(S){const C=w.current;S.button===0&&f!=="click"&&(Qa(C,!0)&&h||(i&&p&&(!(o.current.openEvent&&g)||o.current.openEvent.type==="mousedown")?l(!1,S.nativeEvent,"click"):(S.preventDefault(),l(!0,S.nativeEvent,"click"))))},onClick(S){const C=w.current;if(f==="mousedown"&&w.current){w.current=void 0;return}Qa(C,!0)&&h||(i&&p&&(!(o.current.openEvent&&g)||o.current.openEvent.type==="click")?l(!1,S.nativeEvent,"click"):l(!0,S.nativeEvent,"click"))},onKeyDown(S){w.current=void 0,!(S.defaultPrevented||!b||By(S))&&(S.key===" "&&!Uy(u)&&(S.preventDefault(),x.current=!0),!W3(S)&&S.key==="Enter"&&l(!(i&&p),S.nativeEvent,"click"))},onKeyUp(S){S.defaultPrevented||!b||By(S)||Uy(u)||S.key===" "&&x.current&&(x.current=!1,l(!(i&&p),S.nativeEvent,"click"))}}),[o,u,f,h,b,l,i,g,p]);return A.useMemo(()=>c?{reference:v}:{},[c,v])}const e4={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},t4={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Hy=e=>{var r,i;return{escapeKey:typeof e=="boolean"?e:(r=e?.escapeKey)!=null?r:!1,outsidePress:typeof e=="boolean"?e:(i=e?.outsidePress)!=null?i:!0}};function ru(e,r){r===void 0&&(r={});const{open:i,onOpenChange:l,elements:o,dataRef:u}=e,{enabled:c=!0,escapeKey:f=!0,outsidePress:p=!0,outsidePressEvent:h="pointerdown",referencePress:b=!1,referencePressEvent:g="pointerdown",ancestorScroll:w=!1,bubbles:x,capture:v}=r,S=_u(),C=sn(typeof p=="function"?p:()=>!1),N=typeof p=="function"?C:p,E=A.useRef(!1),{escapeKey:R,outsidePress:O}=Hy(x),{escapeKey:H,outsidePress:_}=Hy(v),F=A.useRef(!1),z=sn(I=>{var Z;if(!i||!c||!f||I.key!=="Escape"||F.current)return;const U=(Z=u.current.floatingContext)==null?void 0:Z.nodeId,Y=S?Ll(S.nodesRef.current,U):[];if(!R&&(I.stopPropagation(),Y.length>0)){let X=!0;if(Y.forEach(q=>{var j;if((j=q.context)!=null&&j.open&&!q.context.dataRef.current.__escapeKeyBubbles){X=!1;return}}),!X)return}l(!1,ZC(I)?I.nativeEvent:I,"escape-key")}),B=sn(I=>{var Z;const U=()=>{var Y;z(I),(Y=kr(I))==null||Y.removeEventListener("keydown",U)};(Z=kr(I))==null||Z.addEventListener("keydown",U)}),M=sn(I=>{var Z;const U=u.current.insideReactTree;u.current.insideReactTree=!1;const Y=E.current;if(E.current=!1,h==="click"&&Y||U||typeof N=="function"&&!N(I))return;const X=kr(I),q="["+zi("inert")+"]",j=$t(o.floating).querySelectorAll(q);let D=ct(X)?X:null;for(;D&&!Cr(D);){const te=Nr(D);if(Cr(te)||!ct(te))break;D=te}if(j.length&&ct(X)&&!YC(X)&&!Pt(X,o.floating)&&Array.from(j).every(te=>!Pt(D,te)))return;if(Tt(X)&&J){const te=Cr(X),ce=Fn(X),me=/auto|scroll/,xe=te||me.test(ce.overflowX),ge=te||me.test(ce.overflowY),ve=xe&&X.clientWidth>0&&X.scrollWidth>X.clientWidth,Ee=ge&&X.clientHeight>0&&X.scrollHeight>X.clientHeight,de=ce.direction==="rtl",ye=Ee&&(de?I.offsetX<=X.offsetWidth-X.clientWidth:I.offsetX>X.clientWidth),we=ve&&I.offsetY>X.clientHeight;if(ye||we)return}const P=(Z=u.current.floatingContext)==null?void 0:Z.nodeId,T=S&&Ll(S.nodesRef.current,P).some(te=>{var ce;return rd(I,(ce=te.context)==null?void 0:ce.elements.floating)});if(rd(I,o.floating)||rd(I,o.domReference)||T)return;const W=S?Ll(S.nodesRef.current,P):[];if(W.length>0){let te=!0;if(W.forEach(ce=>{var me;if((me=ce.context)!=null&&me.open&&!ce.context.dataRef.current.__outsidePressBubbles){te=!1;return}}),!te)return}l(!1,I,"outside-press")}),$=sn(I=>{var Z;const U=()=>{var Y;M(I),(Y=kr(I))==null||Y.removeEventListener(h,U)};(Z=kr(I))==null||Z.addEventListener(h,U)});A.useEffect(()=>{if(!i||!c)return;u.current.__escapeKeyBubbles=R,u.current.__outsidePressBubbles=O;let I=-1;function Z(j){l(!1,j,"ancestor-scroll")}function U(){window.clearTimeout(I),F.current=!0}function Y(){I=window.setTimeout(()=>{F.current=!1},Cu()?5:0)}const X=$t(o.floating);f&&(X.addEventListener("keydown",H?B:z,H),X.addEventListener("compositionstart",U),X.addEventListener("compositionend",Y)),N&&X.addEventListener(h,_?$:M,_);let q=[];return w&&(ct(o.domReference)&&(q=ci(o.domReference)),ct(o.floating)&&(q=q.concat(ci(o.floating))),!ct(o.reference)&&o.reference&&o.reference.contextElement&&(q=q.concat(ci(o.reference.contextElement)))),q=q.filter(j=>{var D;return j!==((D=X.defaultView)==null?void 0:D.visualViewport)}),q.forEach(j=>{j.addEventListener("scroll",Z,{passive:!0})}),()=>{f&&(X.removeEventListener("keydown",H?B:z,H),X.removeEventListener("compositionstart",U),X.removeEventListener("compositionend",Y)),N&&X.removeEventListener(h,_?$:M,_),q.forEach(j=>{j.removeEventListener("scroll",Z)}),window.clearTimeout(I)}},[u,o,f,N,h,i,l,w,c,R,O,z,H,B,M,_,$]),A.useEffect(()=>{u.current.insideReactTree=!1},[u,N,h]);const V=A.useMemo(()=>({onKeyDown:z,...b&&{[e4[g]]:I=>{l(!1,I.nativeEvent,"reference-press")},...g!=="click"&&{onClick(I){l(!1,I.nativeEvent,"reference-press")}}}}),[z,l,b,g]),J=A.useMemo(()=>{function I(Z){Z.button===0&&(E.current=!0)}return{onKeyDown:z,onMouseDown:I,onMouseUp:I,[t4[h]]:()=>{u.current.insideReactTree=!0}}},[z,h,u]);return A.useMemo(()=>c?{reference:V,floating:J}:{},[c,V,J])}function n4(e){const{open:r=!1,onOpenChange:i,elements:l}=e,o=_h(),u=A.useRef({}),[c]=A.useState(()=>B3()),f=Lh()!=null,[p,h]=A.useState(l.reference),b=sn((x,v,S)=>{u.current.openEvent=x?v:void 0,c.emit("openchange",{open:x,event:v,reason:S,nested:f}),i?.(x,v,S)}),g=A.useMemo(()=>({setPositionReference:h}),[]),w=A.useMemo(()=>({reference:p||l.reference||null,floating:l.floating||null,domReference:l.reference}),[p,l.reference,l.floating]);return A.useMemo(()=>({dataRef:u,open:r,onOpenChange:b,elements:w,events:c,floatingId:o,refs:g}),[r,b,w,c,o,g])}function iu(e){e===void 0&&(e={});const{nodeId:r}=e,i=n4({...e,elements:{reference:null,floating:null,...e.elements}}),l=e.rootContext||i,o=l.elements,[u,c]=A.useState(null),[f,p]=A.useState(null),b=o?.domReference||u,g=A.useRef(null),w=_u();Vt(()=>{b&&(g.current=b)},[b]);const x=D3({...e,elements:{...o,...f&&{reference:f}}}),v=A.useCallback(R=>{const O=ct(R)?{getBoundingClientRect:()=>R.getBoundingClientRect(),getClientRects:()=>R.getClientRects(),contextElement:R}:R;p(O),x.refs.setReference(O)},[x.refs]),S=A.useCallback(R=>{(ct(R)||R===null)&&(g.current=R,c(R)),(ct(x.refs.reference.current)||x.refs.reference.current===null||R!==null&&!ct(R))&&x.refs.setReference(R)},[x.refs]),C=A.useMemo(()=>({...x.refs,setReference:S,setPositionReference:v,domReference:g}),[x.refs,S,v]),N=A.useMemo(()=>({...x.elements,domReference:b}),[x.elements,b]),E=A.useMemo(()=>({...x,...l,refs:C,elements:N,nodeId:r}),[x,C,N,r,l]);return Vt(()=>{l.dataRef.current.floatingContext=E;const R=w?.nodesRef.current.find(O=>O.id===r);R&&(R.context=E)}),A.useMemo(()=>({...x,context:E,refs:C,elements:N}),[x,C,N,E])}function fd(){return VC()&&e0()}function m0(e,r){r===void 0&&(r={});const{open:i,onOpenChange:l,events:o,dataRef:u,elements:c}=e,{enabled:f=!0,visibleOnly:p=!0}=r,h=A.useRef(!1),b=A.useRef(-1),g=A.useRef(!0);A.useEffect(()=>{if(!f)return;const x=un(c.domReference);function v(){!i&&Tt(c.domReference)&&c.domReference===ai($t(c.domReference))&&(h.current=!0)}function S(){g.current=!0}function C(){g.current=!1}return x.addEventListener("blur",v),fd()&&(x.addEventListener("keydown",S,!0),x.addEventListener("pointerdown",C,!0)),()=>{x.removeEventListener("blur",v),fd()&&(x.removeEventListener("keydown",S,!0),x.removeEventListener("pointerdown",C,!0))}},[c.domReference,i,f]),A.useEffect(()=>{if(!f)return;function x(v){let{reason:S}=v;(S==="reference-press"||S==="escape-key")&&(h.current=!0)}return o.on("openchange",x),()=>{o.off("openchange",x)}},[o,f]),A.useEffect(()=>()=>{Zt(b)},[]);const w=A.useMemo(()=>({onMouseLeave(){h.current=!1},onFocus(x){if(h.current)return;const v=kr(x.nativeEvent);if(p&&ct(v)){if(fd()&&!x.relatedTarget){if(!g.current&&!Th(v))return}else if(!XC(v))return}l(!0,x.nativeEvent,"focus")},onBlur(x){h.current=!1;const v=x.relatedTarget,S=x.nativeEvent,C=ct(v)&&v.hasAttribute(zi("focus-guard"))&&v.getAttribute("data-type")==="outside";b.current=window.setTimeout(()=>{var N;const E=ai(c.domReference?c.domReference.ownerDocument:document);!v&&E===c.domReference||Pt((N=u.current.floatingContext)==null?void 0:N.refs.floating.current,E)||Pt(c.domReference,E)||C||l(!1,S,"focus")})}}),[u,c.domReference,l,p]);return A.useMemo(()=>f?{reference:w}:{},[f,w])}function dd(e,r,i){const l=new Map,o=i==="item";let u=e;if(o&&e){const{[Ny]:c,[Ay]:f,...p}=e;u=p}return{...i==="floating"&&{tabIndex:-1,[O3]:""},...u,...r.map(c=>{const f=c?c[i]:null;return typeof f=="function"?e?f(e):null:f}).concat(e).reduce((c,f)=>(f&&Object.entries(f).forEach(p=>{let[h,b]=p;if(!(o&&[Ny,Ay].includes(h)))if(h.indexOf("on")===0){if(l.has(h)||l.set(h,[]),typeof b=="function"){var g;(g=l.get(h))==null||g.push(b),c[h]=function(){for(var w,x=arguments.length,v=new Array(x),S=0;S<x;S++)v[S]=arguments[S];return(w=l.get(h))==null?void 0:w.map(C=>C(...v)).find(C=>C!==void 0)}}}else c[h]=b}),c),{})}}function lu(e){e===void 0&&(e=[]);const r=e.map(f=>f?.reference),i=e.map(f=>f?.floating),l=e.map(f=>f?.item),o=A.useCallback(f=>dd(f,e,"reference"),r),u=A.useCallback(f=>dd(f,e,"floating"),i),c=A.useCallback(f=>dd(f,e,"item"),l);return A.useMemo(()=>({getReferenceProps:o,getFloatingProps:u,getItemProps:c}),[o,u,c])}const r4=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function au(e,r){var i,l;r===void 0&&(r={});const{open:o,elements:u,floatingId:c}=e,{enabled:f=!0,role:p="dialog"}=r,h=_h(),b=((i=u.domReference)==null?void 0:i.id)||h,g=A.useMemo(()=>{var E;return((E=Xd(u.floating))==null?void 0:E.id)||c},[u.floating,c]),w=(l=r4.get(p))!=null?l:p,v=Lh()!=null,S=A.useMemo(()=>w==="tooltip"||p==="label"?{["aria-"+(p==="label"?"labelledby":"describedby")]:o?g:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":w==="alertdialog"?"dialog":w,"aria-controls":o?g:void 0,...w==="listbox"&&{role:"combobox"},...w==="menu"&&{id:b},...w==="menu"&&v&&{role:"menuitem"},...p==="select"&&{"aria-autocomplete":"none"},...p==="combobox"&&{"aria-autocomplete":"list"}},[w,g,v,o,b,p]),C=A.useMemo(()=>{const E={id:g,...w&&{role:w}};return w==="tooltip"||p==="label"?E:{...E,...w==="menu"&&{"aria-labelledby":b}}},[w,g,b,p]),N=A.useCallback(E=>{let{active:R,selected:O}=E;const H={role:"option",...R&&{id:g+"-fui-option"}};switch(p){case"select":case"combobox":return{...H,"aria-selected":O}}return{}},[g,p]);return A.useMemo(()=>f?{reference:S,floating:C,item:N}:{},[f,S,C,N])}const qy=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(r,i)=>(i?"-":"")+r.toLowerCase());function Nl(e,r){return typeof e=="function"?e(r):e}function i4(e,r){const[i,l]=A.useState(e);return e&&!i&&l(!0),A.useEffect(()=>{if(!e&&i){const o=setTimeout(()=>l(!1),r);return()=>clearTimeout(o)}},[e,i,r]),i}function l4(e,r){r===void 0&&(r={});const{open:i,elements:{floating:l}}=e,{duration:o=250}=r,c=(typeof o=="number"?o:o.close)||0,[f,p]=A.useState("unmounted"),h=i4(i,c);return!h&&f==="close"&&p("unmounted"),Vt(()=>{if(l){if(i){p("initial");const b=requestAnimationFrame(()=>{jh.flushSync(()=>{p("open")})});return()=>{cancelAnimationFrame(b)}}p("close")}},[i,l]),{isMounted:h,status:f}}function a4(e,r){r===void 0&&(r={});const{initial:i={opacity:0},open:l,close:o,common:u,duration:c=250}=r,f=e.placement,p=f.split("-")[0],h=A.useMemo(()=>({side:p,placement:f}),[p,f]),b=typeof c=="number",g=(b?c:c.open)||0,w=(b?c:c.close)||0,[x,v]=A.useState(()=>({...Nl(u,h),...Nl(i,h)})),{isMounted:S,status:C}=l4(e,{duration:c}),N=qn(i),E=qn(l),R=qn(o),O=qn(u);return Vt(()=>{const H=Nl(N.current,h),_=Nl(R.current,h),F=Nl(O.current,h),z=Nl(E.current,h)||Object.keys(H).reduce((B,M)=>(B[M]="",B),{});if(C==="initial"&&v(B=>({transitionProperty:B.transitionProperty,...F,...H})),C==="open"&&v({transitionProperty:Object.keys(z).map(qy).join(","),transitionDuration:g+"ms",...F,...z}),C==="close"){const B=_||H;v({transitionProperty:Object.keys(B).map(qy).join(","),transitionDuration:w+"ms",...F,...B})}},[w,R,N,E,O,g,C,h]),{isMounted:S,styles:x}}function g0(e,r,i){return i===void 0&&(i=!0),e.filter(o=>{var u;return o.parentId===r&&(!i||((u=o.context)==null?void 0:u.open))}).flatMap(o=>[o,...g0(e,o.id,i)])}function Py(e,r){const[i,l]=e;let o=!1;const u=r.length;for(let c=0,f=u-1;c<u;f=c++){const[p,h]=r[c]||[0,0],[b,g]=r[f]||[0,0];h>=l!=g>=l&&i<=(b-p)*(l-h)/(g-h)+p&&(o=!o)}return o}function o4(e,r){return e[0]>=r.x&&e[0]<=r.x+r.width&&e[1]>=r.y&&e[1]<=r.y+r.height}function Kd(e){e===void 0&&(e={});const{buffer:r=.5,blockPointerEvents:i=!1,requireIntent:l=!0}=e,o={current:-1};let u=!1,c=null,f=null,p=typeof performance<"u"?performance.now():0;function h(g,w){const x=performance.now(),v=x-p;if(c===null||f===null||v===0)return c=g,f=w,p=x,null;const S=g-c,C=w-f,E=Math.sqrt(S*S+C*C)/v;return c=g,f=w,p=x,E}const b=g=>{let{x:w,y:x,placement:v,elements:S,onClose:C,nodeId:N,tree:E}=g;return function(O){function H(){Zt(o),C()}if(Zt(o),!S.domReference||!S.floating||v==null||w==null||x==null)return;const{clientX:_,clientY:F}=O,z=[_,F],B=q3(O),M=O.type==="mouseleave",$=ud(S.floating,B),V=ud(S.domReference,B),J=S.domReference.getBoundingClientRect(),I=S.floating.getBoundingClientRect(),Z=v.split("-")[0],U=w>I.right-I.width/2,Y=x>I.bottom-I.height/2,X=o4(z,J),q=I.width>J.width,j=I.height>J.height,D=(q?J:I).left,P=(q?J:I).right,T=(j?J:I).top,W=(j?J:I).bottom;if($&&(u=!0,!M))return;if(V&&(u=!1),V&&!M){u=!0;return}if(M&&ct(O.relatedTarget)&&ud(S.floating,O.relatedTarget)||E&&g0(E.nodesRef.current,N).length)return;if(Z==="top"&&x>=J.bottom-1||Z==="bottom"&&x<=J.top+1||Z==="left"&&w>=J.right-1||Z==="right"&&w<=J.left+1)return H();let te=[];switch(Z){case"top":te=[[D,J.top+1],[D,I.bottom-1],[P,I.bottom-1],[P,J.top+1]];break;case"bottom":te=[[D,I.top+1],[D,J.bottom-1],[P,J.bottom-1],[P,I.top+1]];break;case"left":te=[[I.right-1,W],[I.right-1,T],[J.left+1,T],[J.left+1,W]];break;case"right":te=[[J.right-1,W],[J.right-1,T],[I.left+1,T],[I.left+1,W]];break}function ce(me){let[xe,ge]=me;switch(Z){case"top":{const ve=[q?xe+r/2:U?xe+r*4:xe-r*4,ge+r+1],Ee=[q?xe-r/2:U?xe+r*4:xe-r*4,ge+r+1],de=[[I.left,U||q?I.bottom-r:I.top],[I.right,U?q?I.bottom-r:I.top:I.bottom-r]];return[ve,Ee,...de]}case"bottom":{const ve=[q?xe+r/2:U?xe+r*4:xe-r*4,ge-r],Ee=[q?xe-r/2:U?xe+r*4:xe-r*4,ge-r],de=[[I.left,U||q?I.top+r:I.bottom],[I.right,U?q?I.top+r:I.bottom:I.top+r]];return[ve,Ee,...de]}case"left":{const ve=[xe+r+1,j?ge+r/2:Y?ge+r*4:ge-r*4],Ee=[xe+r+1,j?ge-r/2:Y?ge+r*4:ge-r*4];return[...[[Y||j?I.right-r:I.left,I.top],[Y?j?I.right-r:I.left:I.right-r,I.bottom]],ve,Ee]}case"right":{const ve=[xe-r,j?ge+r/2:Y?ge+r*4:ge-r*4],Ee=[xe-r,j?ge-r/2:Y?ge+r*4:ge-r*4],de=[[Y||j?I.left+r:I.right,I.top],[Y?j?I.left+r:I.right:I.left+r,I.bottom]];return[ve,Ee,...de]}}}if(!Py([_,F],te)){if(u&&!X)return H();if(!M&&l){const me=h(O.clientX,O.clientY);if(me!==null&&me<.1)return H()}Py([_,F],ce([w,x]))?!u&&l&&(o.current=window.setTimeout(H,40)):H()}}};return b.__options={blockPointerEvents:i},b}const s4={".":"Uncommitted Changes",staged:"Staging Area",working:"Working Directory"},u4=new Set([".","staged","working"]),c4=e=>{const r=!e||u4.has(e)?"HEAD":`${e}^`;return{base:`${r}^`,target:r}},$y=(e,r)=>!!r&&e===`${r}^`,Ts=(e,r)=>e?e===r.shortHash||e===r.hash:!1,Vy=(e,r)=>r?`${e.shortHash}^`:e.shortHash,Gy=(e,r,i)=>{if(!r)return"Select...";const l=r.endsWith("^"),o=l?r.slice(0,-1):r;if(o.startsWith("HEAD"))return r;const u=s4[r];if(u)return u;const c=e.specialOptions.find(h=>h.value===r);if(c)return c.label;const f=e.branches.find(h=>h.name===o);if(f)return l?`${f.name}^`:f.name;const p=e.commits.find(h=>h.shortHash===o||h.hash===o);if(p)return Vy(p,l);if(i){const h=e.commits.find(b=>b.shortHash===i||b.hash===i);if(h)return Vy(h,!1)}return r};function f4({options:e,baseRevision:r,targetRevision:i,resolvedBaseRevision:l,resolvedTargetRevision:o,onSelectDiff:u,onOpenAdvanced:c,compact:f=!1}){const[p,h]=A.useState(!1),[b,g]=A.useState(!1),w=f,{refs:x,floatingStyles:v,context:S}=iu({open:p||b,onOpenChange:te=>{!te&&b||h(te)},placement:"bottom-end",middleware:[Qs(6),Ws(),Js({padding:8})],whileElementsMounted:Zs}),C=eu(S,{handleClose:Kd()}),N=Zd(S),E=ru(S),R=au(S,{role:"menu"}),{getReferenceProps:O,getFloatingProps:H}=lu([C,N,E,R]),{refs:_,floatingStyles:F,context:z}=iu({open:b,onOpenChange:te=>{te&&h(!0),g(te)},placement:"left-start",middleware:[Qs(0),Ws(),Js({padding:8})],whileElementsMounted:Zs}),B=eu(z,{handleClose:Kd()}),M=Zd(z),$=ru(z),V=au(z,{role:"menu"}),{getReferenceProps:J,getFloatingProps:I}=lu([B,M,$,V]);A.useEffect(()=>{p||g(!1)},[p]);const Z=A.useMemo(()=>{const te=$y(r,i),ce=e.commits.find(ge=>te?Ts(i,ge)||Ts(o,ge):!1);if(ce)return`${ce.shortHash} ${ce.message}`;const me=Gy(e,r,l),xe=Gy(e,i,o);return`${me}...${xe}`},[e,r,i,l,o]),U=A.useMemo(()=>e.branches.find(te=>te.name==="main")||e.branches.find(te=>te.name==="master"),[e.branches]),Y=!!U,X=A.useMemo(()=>({base:"HEAD^",target:"HEAD"}),[]),q=A.useMemo(()=>c4(i),[i]),j=(te,ce)=>{u(te,ce),g(!1),h(!1)},D=()=>{g(!1),h(!1),c()},P=(te,ce)=>["w-full text-left px-3 py-2 text-xs focus:outline-none transition-colors",te?"hover:bg-diff-selected-bg focus:bg-diff-selected-bg":"hover:bg-github-bg-tertiary focus:bg-github-bg-tertiary",te?"bg-diff-selected-bg border-l-4 border-l-diff-selected-border font-semibold pl-2":"",ce?"opacity-50 cursor-not-allowed":"cursor-pointer"].join(" "),T=(te,ce)=>r===te&&i===ce,W=te=>$y(r,i)?Ts(i,te)||Ts(o,te):!1;return y.jsxs("div",{className:"relative",children:[y.jsx("button",{ref:x.setReference,type:"button",className:"flex items-center gap-1.5 cursor-pointer group","aria-haspopup":"menu","aria-expanded":p,"aria-label":`Revision menu: ${Z}`,title:Z,...O(),children:w?y.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1 bg-github-bg-tertiary border border-github-border rounded hover:border-github-text-secondary transition-colors",children:[y.jsx(gk,{size:14,className:"text-github-text-secondary"}),y.jsx(zl,{size:12,className:"text-github-text-secondary group-hover:text-github-text-primary transition-colors"})]}):y.jsxs("div",{className:"flex items-center gap-1 px-2 py-1 bg-github-bg-tertiary border border-github-border rounded hover:border-github-text-secondary transition-colors",children:[y.jsx("code",{className:"text-xs text-github-text-primary",children:Z}),y.jsx(zl,{size:12,className:"text-github-text-secondary group-hover:text-github-text-primary transition-colors"})]})}),p&&y.jsx(nu,{children:y.jsxs("div",{ref:x.setFloating,style:v,className:"bg-github-bg-secondary border border-github-border rounded shadow-lg z-50 w-[260px] max-h-[360px] overflow-y-auto",...H(),children:[y.jsxs("div",{className:"border-b border-github-border",children:[y.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary",children:"Quick Diffs"}),y.jsx("button",{onClick:()=>j("HEAD","."),className:P(T("HEAD","."),!1),children:"HEAD...Uncommitted"}),Y&&U&&y.jsx(y.Fragment,{children:y.jsxs("button",{onClick:()=>j(U.name,"."),className:P(T(U.name,"."),!1),children:[U.name,"...Uncommitted"]})}),y.jsx("button",{onClick:()=>j(X.base,X.target),className:P(T(X.base,X.target),!1),children:"HEAD"})]}),y.jsx("div",{className:"border-b border-github-border",children:y.jsx("button",{onClick:()=>j(q.base,q.target),className:P(T(q.base,q.target),!1),type:"button",children:"Previous commit"})}),y.jsx("div",{className:"border-b border-github-border",children:y.jsx("button",{ref:e.commits.length>0?_.setReference:void 0,className:P(!1,e.commits.length===0),...e.commits.length>0?J():{},disabled:e.commits.length===0,type:"button",children:y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(V2,{size:12,className:"text-github-text-secondary"}),y.jsx("span",{children:"Pick Commit..."})]})})}),y.jsx("div",{children:y.jsx("button",{onClick:D,className:P(!1,!1),type:"button",children:"Detailed..."})})]})}),b&&e.commits.length>0&&y.jsx(nu,{children:y.jsxs("div",{ref:_.setFloating,style:F,className:"bg-github-bg-secondary border border-github-border rounded shadow-lg z-50 w-[360px] max-h-[360px] overflow-y-auto",...I(),children:[y.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary",children:"Recent Commits"}),e.commits.map(te=>y.jsx("button",{onClick:()=>j(`${te.shortHash}^`,te.shortHash),className:P(W(te),!1),type:"button",children:y.jsxs("div",{className:"flex items-start gap-2",children:[y.jsx("code",{className:"text-xs text-github-text-primary font-mono whitespace-nowrap",children:te.shortHash}),y.jsx("span",{className:"text-xs text-github-text-secondary flex-1 break-words",children:te.message})]})},te.hash))]})})]})}const d4=["jpg","jpeg","png","gif","bmp","svg","webp","ico","tiff","tif","avif","heic","heif"];function h4(e){if(!e)return!1;const r=no(e);return r?d4.includes(r):!1}const p4=["md","markdown"];function m4(e){if(!e)return!1;const r=no(e);return r?p4.includes(r):!1}const g4=["ipynb"];function b4(e){if(!e)return!1;const r=no(e);return r?g4.includes(r):!1}function y4({file:e,diffMode:r,baseCommitish:i,targetCommitish:l}){const o=r??to,u=e.status==="deleted",c=e.status==="added",f=e.status==="modified"||e.status==="renamed",p=i||"HEAD~1",h=l||"HEAD",[b,g]=A.useState({}),[w,x]=A.useState({}),v=async(E,R)=>{try{const O=E.naturalWidth,H=E.naturalHeight,z=(await(await fetch(E.src)).blob()).size;R({width:O,height:H,size:z})}catch(O){console.error("Failed to get image info:",O)}},S=E=>E?E<1024?`${E} B`:E<1024*1024?`${(E/1024).toFixed(1)} KB`:`${(E/(1024*1024)).toFixed(1)} MB`:"",C=E=>!E.width||!E.height?"":`W: ${E.width}px | H: ${E.height}px`,N={backgroundImage:`
|
|
27
|
-
linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%),
|
|
28
|
-
linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%)
|
|
29
|
-
`,backgroundSize:"20px 20px",backgroundPosition:"0 0, 10px 10px",backgroundColor:"white"};return u?y.jsx("div",{className:"bg-github-bg-primary p-4",children:y.jsxs("div",{className:"text-center",children:[y.jsx("div",{className:"mb-2",children:y.jsx("span",{className:"text-github-danger font-medium",children:"Deleted Image"})}),y.jsxs("div",{className:"inline-block border border-github-border rounded-md p-4 bg-github-bg-secondary",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"Previous version:"}),y.jsx("img",{src:`/api/blob/${e.oldPath||e.path}?ref=${p}`,alt:`Previous version of ${e.oldPath||e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:N,onLoad:E=>v(E.currentTarget,g),onError:E=>{const R=E.target;R.style.display="none",R.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(b.width||b.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[C(b),C(b)&&S(b.size)&&" | ",S(b.size)]})]})]})}):c?y.jsx("div",{className:"bg-github-bg-primary p-4",children:y.jsxs("div",{className:"text-center",children:[y.jsx("div",{className:"mb-2",children:y.jsx("span",{className:"text-github-accent font-medium",children:"Added Image"})}),y.jsxs("div",{className:"inline-block border border-github-border rounded-md p-4 bg-github-bg-secondary",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"New file:"}),y.jsx("img",{src:`/api/blob/${e.path}?ref=${h}`,alt:`New image ${e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:N,onLoad:E=>v(E.currentTarget,x),onError:E=>{const R=E.target;R.style.display="none",R.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(w.width||w.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[C(w),C(w)&&S(w.size)&&" | ",S(w.size)]})]})]})}):f?o==="split"?y.jsxs("div",{className:"bg-github-bg-primary p-4",children:[y.jsx("div",{className:"text-center mb-4",children:y.jsx("span",{className:"text-github-text-primary font-medium",children:"Modified Image"})}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx("div",{className:"text-center",children:y.jsxs("div",{className:"border border-github-border rounded-md p-4 bg-github-bg-secondary",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"Previous version:"}),y.jsx("img",{src:`/api/blob/${e.oldPath||e.path}?ref=${p}`,alt:`Previous version of ${e.oldPath||e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:N,onLoad:E=>v(E.currentTarget,g),onError:E=>{const R=E.target;R.style.display="none",R.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(b.width||b.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[C(b),C(b)&&S(b.size)&&" | ",S(b.size)]})]})}),y.jsx("div",{className:"text-center",children:y.jsxs("div",{className:"border border-github-border rounded-md p-4 bg-github-bg-secondary",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"Current version:"}),y.jsx("img",{src:`/api/blob/${e.path}?ref=${h}`,alt:`Current version of ${e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:N,onLoad:E=>v(E.currentTarget,x),onError:E=>{const R=E.target;R.style.display="none",R.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(w.width||w.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[C(w),C(w)&&S(w.size)&&" | ",S(w.size)]})]})})]})]}):y.jsxs("div",{className:"bg-github-bg-primary p-4",children:[y.jsx("div",{className:"text-center mb-4",children:y.jsx("span",{className:"text-github-text-primary font-medium",children:"Modified Image"})}),y.jsxs("div",{className:"space-y-6",children:[y.jsx("div",{className:"text-center",children:y.jsxs("div",{className:"border border-github-border rounded-md p-4 bg-github-bg-secondary inline-block",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"Previous version:"}),y.jsx("img",{src:`/api/blob/${e.oldPath||e.path}?ref=${p}`,alt:`Previous version of ${e.oldPath||e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:N,onLoad:E=>v(E.currentTarget,g),onError:E=>{const R=E.target;R.style.display="none",R.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(b.width||b.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[C(b),C(b)&&S(b.size)&&" | ",S(b.size)]})]})}),y.jsx("div",{className:"text-center",children:y.jsxs("div",{className:"border border-github-border rounded-md p-4 bg-github-bg-secondary inline-block",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"Current version:"}),y.jsx("img",{src:`/api/blob/${e.path}?ref=${h}`,alt:`Current version of ${e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:N,onLoad:E=>v(E.currentTarget,x),onError:E=>{const R=E.target;R.style.display="none",R.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(w.width||w.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[C(w),C(w)&&S(w.size)&&" | ",S(w.size)]})]})})]})]}):null}function x4(e,r){const i={};return(e[e.length-1]===""?[...e,""]:e).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const v4=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,w4=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,S4={};function Yy(e,r){return(S4.jsx?w4:v4).test(e)}const k4=/[ \t\n\f\r]/g;function E4(e){return typeof e=="object"?e.type==="text"?Xy(e.value):!1:Xy(e)}function Xy(e){return e.replace(k4,"")===""}class lo{constructor(r,i,l){this.normal=i,this.property=r,l&&(this.space=l)}}lo.prototype.normal={};lo.prototype.property={};lo.prototype.space=void 0;function b0(e,r){const i={},l={};for(const o of e)Object.assign(i,o.property),Object.assign(l,o.normal);return new lo(i,l,r)}function Qd(e){return e.toLowerCase()}class cn{constructor(r,i){this.attribute=i,this.property=r}}cn.prototype.attribute="";cn.prototype.booleanish=!1;cn.prototype.boolean=!1;cn.prototype.commaOrSpaceSeparated=!1;cn.prototype.commaSeparated=!1;cn.prototype.defined=!1;cn.prototype.mustUseProperty=!1;cn.prototype.number=!1;cn.prototype.overloadedBoolean=!1;cn.prototype.property="";cn.prototype.spaceSeparated=!1;cn.prototype.space=void 0;let C4=0;const Me=Ii(),Et=Ii(),Jd=Ii(),he=Ii(),ut=Ii(),Ml=Ii(),Sn=Ii();function Ii(){return 2**++C4}const Wd=Object.freeze(Object.defineProperty({__proto__:null,boolean:Me,booleanish:Et,commaOrSpaceSeparated:Sn,commaSeparated:Ml,number:he,overloadedBoolean:Jd,spaceSeparated:ut},Symbol.toStringTag,{value:"Module"})),hd=Object.keys(Wd);class Mh extends cn{constructor(r,i,l,o){let u=-1;if(super(r,i),Zy(this,"space",o),typeof l=="number")for(;++u<hd.length;){const c=hd[u];Zy(this,hd[u],(l&Wd[c])===Wd[c])}}}Mh.prototype.defined=!0;function Zy(e,r,i){i&&(e[r]=i)}function Ul(e){const r={},i={};for(const[l,o]of Object.entries(e.properties)){const u=new Mh(l,e.transform(e.attributes||{},l),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(l)&&(u.mustUseProperty=!0),r[l]=u,i[Qd(l)]=l,i[Qd(u.attribute)]=l}return new lo(r,i,e.space)}const y0=Ul({properties:{ariaActiveDescendant:null,ariaAtomic:Et,ariaAutoComplete:null,ariaBusy:Et,ariaChecked:Et,ariaColCount:he,ariaColIndex:he,ariaColSpan:he,ariaControls:ut,ariaCurrent:null,ariaDescribedBy:ut,ariaDetails:null,ariaDisabled:Et,ariaDropEffect:ut,ariaErrorMessage:null,ariaExpanded:Et,ariaFlowTo:ut,ariaGrabbed:Et,ariaHasPopup:null,ariaHidden:Et,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ut,ariaLevel:he,ariaLive:null,ariaModal:Et,ariaMultiLine:Et,ariaMultiSelectable:Et,ariaOrientation:null,ariaOwns:ut,ariaPlaceholder:null,ariaPosInSet:he,ariaPressed:Et,ariaReadOnly:Et,ariaRelevant:null,ariaRequired:Et,ariaRoleDescription:ut,ariaRowCount:he,ariaRowIndex:he,ariaRowSpan:he,ariaSelected:Et,ariaSetSize:he,ariaSort:null,ariaValueMax:he,ariaValueMin:he,ariaValueNow:he,ariaValueText:null,role:null},transform(e,r){return r==="role"?r:"aria-"+r.slice(4).toLowerCase()}});function x0(e,r){return r in e?e[r]:r}function v0(e,r){return x0(e,r.toLowerCase())}const N4=Ul({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ml,acceptCharset:ut,accessKey:ut,action:null,allow:null,allowFullScreen:Me,allowPaymentRequest:Me,allowUserMedia:Me,alt:null,as:null,async:Me,autoCapitalize:null,autoComplete:ut,autoFocus:Me,autoPlay:Me,blocking:ut,capture:null,charSet:null,checked:Me,cite:null,className:ut,cols:he,colSpan:null,content:null,contentEditable:Et,controls:Me,controlsList:ut,coords:he|Ml,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Me,defer:Me,dir:null,dirName:null,disabled:Me,download:Jd,draggable:Et,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Me,formTarget:null,headers:ut,height:he,hidden:Jd,high:he,href:null,hrefLang:null,htmlFor:ut,httpEquiv:ut,id:null,imageSizes:null,imageSrcSet:null,inert:Me,inputMode:null,integrity:null,is:null,isMap:Me,itemId:null,itemProp:ut,itemRef:ut,itemScope:Me,itemType:ut,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Me,low:he,manifest:null,max:null,maxLength:he,media:null,method:null,min:null,minLength:he,multiple:Me,muted:Me,name:null,nonce:null,noModule:Me,noValidate:Me,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:Me,optimum:he,pattern:null,ping:ut,placeholder:null,playsInline:Me,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Me,referrerPolicy:null,rel:ut,required:Me,reversed:Me,rows:he,rowSpan:he,sandbox:ut,scope:null,scoped:Me,seamless:Me,selected:Me,shadowRootClonable:Me,shadowRootDelegatesFocus:Me,shadowRootMode:null,shape:null,size:he,sizes:null,slot:null,span:he,spellCheck:Et,src:null,srcDoc:null,srcLang:null,srcSet:null,start:he,step:null,style:null,tabIndex:he,target:null,title:null,translate:null,type:null,typeMustMatch:Me,useMap:null,value:Et,width:he,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ut,axis:null,background:null,bgColor:null,border:he,borderColor:null,bottomMargin:he,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Me,declare:Me,event:null,face:null,frame:null,frameBorder:null,hSpace:he,leftMargin:he,link:null,longDesc:null,lowSrc:null,marginHeight:he,marginWidth:he,noResize:Me,noHref:Me,noShade:Me,noWrap:Me,object:null,profile:null,prompt:null,rev:null,rightMargin:he,rules:null,scheme:null,scrolling:Et,standby:null,summary:null,text:null,topMargin:he,valueType:null,version:null,vAlign:null,vLink:null,vSpace:he,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Me,disableRemotePlayback:Me,prefix:null,property:null,results:he,security:null,unselectable:null},space:"html",transform:v0}),A4=Ul({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Sn,accentHeight:he,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:he,amplitude:he,arabicForm:null,ascent:he,attributeName:null,attributeType:null,azimuth:he,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:he,by:null,calcMode:null,capHeight:he,className:ut,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:he,diffuseConstant:he,direction:null,display:null,dur:null,divisor:he,dominantBaseline:null,download:Me,dx:null,dy:null,edgeMode:null,editable:null,elevation:he,enableBackground:null,end:null,event:null,exponent:he,externalResourcesRequired:null,fill:null,fillOpacity:he,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:Ml,g2:Ml,glyphName:Ml,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:he,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:he,horizOriginX:he,horizOriginY:he,id:null,ideographic:he,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:he,k:he,k1:he,k2:he,k3:he,k4:he,kernelMatrix:Sn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:he,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:he,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:he,overlineThickness:he,paintOrder:null,panose1:null,path:null,pathLength:he,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ut,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:he,pointsAtY:he,pointsAtZ:he,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Sn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Sn,rev:Sn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Sn,requiredFeatures:Sn,requiredFonts:Sn,requiredFormats:Sn,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:he,specularExponent:he,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:he,strikethroughThickness:he,string:null,stroke:null,strokeDashArray:Sn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:he,strokeOpacity:he,strokeWidth:null,style:null,surfaceScale:he,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Sn,tabIndex:he,tableValues:null,target:null,targetX:he,targetY:he,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Sn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:he,underlineThickness:he,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:he,values:null,vAlphabetic:he,vMathematical:he,vectorEffect:null,vHanging:he,vIdeographic:he,version:null,vertAdvY:he,vertOriginX:he,vertOriginY:he,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:he,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:x0}),w0=Ul({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,r){return"xlink:"+r.slice(5).toLowerCase()}}),S0=Ul({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:v0}),k0=Ul({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,r){return"xml:"+r.slice(3).toLowerCase()}}),T4={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"},j4=/[A-Z]/g,Ky=/-[a-z]/g,R4=/^data[-\w.:]+$/i;function _4(e,r){const i=Qd(r);let l=r,o=cn;if(i in e.normal)return e.property[e.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&R4.test(r)){if(r.charAt(4)==="-"){const u=r.slice(5).replace(Ky,D4);l="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=r.slice(4);if(!Ky.test(u)){let c=u.replace(j4,L4);c.charAt(0)!=="-"&&(c="-"+c),r="data"+c}}o=Mh}return new o(l,r)}function L4(e){return"-"+e.toLowerCase()}function D4(e){return e.charAt(1).toUpperCase()}const O4=b0([y0,N4,w0,S0,k0],"html"),zh=b0([y0,A4,w0,S0,k0],"svg");function M4(e){return e.join(" ").trim()}var Al={},pd,Qy;function z4(){if(Qy)return pd;Qy=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,p=`
|
|
30
|
-
`,h="/",b="*",g="",w="comment",x="declaration";function v(C,N){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];N=N||{};var E=1,R=1;function O(I){var Z=I.match(r);Z&&(E+=Z.length);var U=I.lastIndexOf(p);R=~U?I.length-U:R+I.length}function H(){var I={line:E,column:R};return function(Z){return Z.position=new _(I),B(),Z}}function _(I){this.start=I,this.end={line:E,column:R},this.source=N.source}_.prototype.content=C;function F(I){var Z=new Error(N.source+":"+E+":"+R+": "+I);if(Z.reason=I,Z.filename=N.source,Z.line=E,Z.column=R,Z.source=C,!N.silent)throw Z}function z(I){var Z=I.exec(C);if(Z){var U=Z[0];return O(U),C=C.slice(U.length),Z}}function B(){z(i)}function M(I){var Z;for(I=I||[];Z=$();)Z!==!1&&I.push(Z);return I}function $(){var I=H();if(!(h!=C.charAt(0)||b!=C.charAt(1))){for(var Z=2;g!=C.charAt(Z)&&(b!=C.charAt(Z)||h!=C.charAt(Z+1));)++Z;if(Z+=2,g===C.charAt(Z-1))return F("End of comment missing");var U=C.slice(2,Z-2);return R+=2,O(U),C=C.slice(Z),R+=2,I({type:w,comment:U})}}function V(){var I=H(),Z=z(l);if(Z){if($(),!z(o))return F("property missing ':'");var U=z(u),Y=I({type:x,property:S(Z[0].replace(e,g)),value:U?S(U[0].replace(e,g)):g});return z(c),Y}}function J(){var I=[];M(I);for(var Z;Z=V();)Z!==!1&&(I.push(Z),M(I));return I}return B(),J()}function S(C){return C?C.replace(f,g):g}return pd=v,pd}var Jy;function F4(){if(Jy)return Al;Jy=1;var e=Al&&Al.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(Al,"__esModule",{value:!0}),Al.default=i;const r=e(z4());function i(l,o){let u=null;if(!l||typeof l!="string")return u;const c=(0,r.default)(l),f=typeof o=="function";return c.forEach(p=>{if(p.type!=="declaration")return;const{property:h,value:b}=p;f?o(h,b,p):b&&(u=u||{},u[h]=b)}),u}return Al}var Ma={},Wy;function I4(){if(Wy)return Ma;Wy=1,Object.defineProperty(Ma,"__esModule",{value:!0}),Ma.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,i=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,u=function(h){return!h||i.test(h)||e.test(h)},c=function(h,b){return b.toUpperCase()},f=function(h,b){return"".concat(b,"-")},p=function(h,b){return b===void 0&&(b={}),u(h)?h:(h=h.toLowerCase(),b.reactCompat?h=h.replace(o,f):h=h.replace(l,f),h.replace(r,c))};return Ma.camelCase=p,Ma}var za,ex;function B4(){if(ex)return za;ex=1;var e=za&&za.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},r=e(F4()),i=I4();function l(o,u){var c={};return!o||typeof o!="string"||(0,r.default)(o,function(f,p){f&&p&&(c[(0,i.camelCase)(f,u)]=p)}),c}return l.default=l,za=l,za}var U4=B4();const H4=yu(U4),E0=C0("end"),Fh=C0("start");function C0(e){return r;function r(i){const l=i&&i.position&&i.position[e]||{};if(typeof l.line=="number"&&l.line>0&&typeof l.column=="number"&&l.column>0)return{line:l.line,column:l.column,offset:typeof l.offset=="number"&&l.offset>-1?l.offset:void 0}}}function q4(e){const r=Fh(e),i=E0(e);if(r&&i)return{start:r,end:i}}function Pa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?tx(e.position):"start"in e||"end"in e?tx(e):"line"in e||"column"in e?eh(e):""}function eh(e){return nx(e&&e.line)+":"+nx(e&&e.column)}function tx(e){return eh(e&&e.start)+"-"+eh(e&&e.end)}function nx(e){return e&&typeof e=="number"?e:1}class Yt extends Error{constructor(r,i,l){super(),typeof i=="string"&&(l=i,i=void 0);let o="",u={},c=!1;if(i&&("line"in i&&"column"in i?u={place:i}:"start"in i&&"end"in i?u={place:i}:"type"in i?u={ancestors:[i],place:i.position}:u={...i}),typeof r=="string"?o=r:!u.cause&&r&&(c=!0,o=r.message,u.cause=r),!u.ruleId&&!u.source&&typeof l=="string"){const p=l.indexOf(":");p===-1?u.ruleId=l:(u.source=l.slice(0,p),u.ruleId=l.slice(p+1))}if(!u.place&&u.ancestors&&u.ancestors){const p=u.ancestors[u.ancestors.length-1];p&&(u.place=p.position)}const f=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=f?f.line:void 0,this.name=Pa(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=c&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Yt.prototype.file="";Yt.prototype.name="";Yt.prototype.reason="";Yt.prototype.message="";Yt.prototype.stack="";Yt.prototype.column=void 0;Yt.prototype.line=void 0;Yt.prototype.ancestors=void 0;Yt.prototype.cause=void 0;Yt.prototype.fatal=void 0;Yt.prototype.place=void 0;Yt.prototype.ruleId=void 0;Yt.prototype.source=void 0;const Ih={}.hasOwnProperty,P4=new Map,$4=/[A-Z]/g,V4=new Set(["table","tbody","thead","tfoot","tr"]),G4=new Set(["td","th"]),N0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Y4(e,r){if(!r||r.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=r.filePath||void 0;let l;if(r.development){if(typeof r.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");l=tN(i,r.jsxDEV)}else{if(typeof r.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof r.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");l=eN(i,r.jsx,r.jsxs)}const o={Fragment:r.Fragment,ancestors:[],components:r.components||{},create:l,elementAttributeNameCase:r.elementAttributeNameCase||"react",evaluater:r.createEvaluater?r.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:r.ignoreInvalidStyle||!1,passKeys:r.passKeys!==!1,passNode:r.passNode||!1,schema:r.space==="svg"?zh:O4,stylePropertyNameCase:r.stylePropertyNameCase||"dom",tableCellAlignToStyle:r.tableCellAlignToStyle!==!1},u=A0(o,e,void 0);return u&&typeof u!="string"?u:o.create(e,o.Fragment,{children:u||void 0},void 0)}function A0(e,r,i){if(r.type==="element")return X4(e,r,i);if(r.type==="mdxFlowExpression"||r.type==="mdxTextExpression")return Z4(e,r);if(r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement")return Q4(e,r,i);if(r.type==="mdxjsEsm")return K4(e,r);if(r.type==="root")return J4(e,r,i);if(r.type==="text")return W4(e,r)}function X4(e,r,i){const l=e.schema;let o=l;r.tagName.toLowerCase()==="svg"&&l.space==="html"&&(o=zh,e.schema=o),e.ancestors.push(r);const u=j0(e,r.tagName,!1),c=nN(e,r);let f=Uh(e,r);return V4.has(r.tagName)&&(f=f.filter(function(p){return typeof p=="string"?!E4(p):!0})),T0(e,c,u,r),Bh(c,f),e.ancestors.pop(),e.schema=l,e.create(r,u,c,i)}function Z4(e,r){if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];return l.type,e.evaluater.evaluateExpression(l.expression)}Ja(e,r.position)}function K4(e,r){if(r.data&&r.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(r.data.estree);Ja(e,r.position)}function Q4(e,r,i){const l=e.schema;let o=l;r.name==="svg"&&l.space==="html"&&(o=zh,e.schema=o),e.ancestors.push(r);const u=r.name===null?e.Fragment:j0(e,r.name,!0),c=rN(e,r),f=Uh(e,r);return T0(e,c,u,r),Bh(c,f),e.ancestors.pop(),e.schema=l,e.create(r,u,c,i)}function J4(e,r,i){const l={};return Bh(l,Uh(e,r)),e.create(r,e.Fragment,l,i)}function W4(e,r){return r.value}function T0(e,r,i,l){typeof i!="string"&&i!==e.Fragment&&e.passNode&&(r.node=l)}function Bh(e,r){if(r.length>0){const i=r.length>1?r:r[0];i&&(e.children=i)}}function eN(e,r,i){return l;function l(o,u,c,f){const h=Array.isArray(c.children)?i:r;return f?h(u,c,f):h(u,c)}}function tN(e,r){return i;function i(l,o,u,c){const f=Array.isArray(u.children),p=Fh(l);return r(o,u,c,f,{columnNumber:p?p.column-1:void 0,fileName:e,lineNumber:p?p.line:void 0},void 0)}}function nN(e,r){const i={};let l,o;for(o in r.properties)if(o!=="children"&&Ih.call(r.properties,o)){const u=iN(e,o,r.properties[o]);if(u){const[c,f]=u;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&G4.has(r.tagName)?l=f:i[c]=f}}if(l){const u=i.style||(i.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=l}return i}function rN(e,r){const i={};for(const l of r.attributes)if(l.type==="mdxJsxExpressionAttribute")if(l.data&&l.data.estree&&e.evaluater){const u=l.data.estree.body[0];u.type;const c=u.expression;c.type;const f=c.properties[0];f.type,Object.assign(i,e.evaluater.evaluateExpression(f.argument))}else Ja(e,r.position);else{const o=l.name;let u;if(l.value&&typeof l.value=="object")if(l.value.data&&l.value.data.estree&&e.evaluater){const f=l.value.data.estree.body[0];f.type,u=e.evaluater.evaluateExpression(f.expression)}else Ja(e,r.position);else u=l.value===null?!0:l.value;i[o]=u}return i}function Uh(e,r){const i=[];let l=-1;const o=e.passKeys?new Map:P4;for(;++l<r.children.length;){const u=r.children[l];let c;if(e.passKeys){const p=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(p){const h=o.get(p)||0;c=p+"-"+h,o.set(p,h+1)}}const f=A0(e,u,c);f!==void 0&&i.push(f)}return i}function iN(e,r,i){const l=_4(e.schema,r);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=l.commaSeparated?x4(i):M4(i)),l.property==="style"){let o=typeof i=="object"?i:lN(e,String(i));return e.stylePropertyNameCase==="css"&&(o=aN(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&l.space?T4[l.property]||l.property:l.attribute,i]}}function lN(e,r){try{return H4(r,{reactCompat:!0})}catch(i){if(e.ignoreInvalidStyle)return{};const l=i,o=new Yt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:l,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=N0+"#cannot-parse-style-attribute",o}}function j0(e,r,i){let l;if(!i)l={type:"Literal",value:r};else if(r.includes(".")){const o=r.split(".");let u=-1,c;for(;++u<o.length;){const f=Yy(o[u])?{type:"Identifier",name:o[u]}:{type:"Literal",value:o[u]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(u&&f.type==="Literal"),optional:!1}:f}l=c}else l=Yy(r)&&!/^[a-z]/.test(r)?{type:"Identifier",name:r}:{type:"Literal",value:r};if(l.type==="Literal"){const o=l.value;return Ih.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(l);Ja(e)}function Ja(e,r){const i=new Yt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:r,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=N0+"#cannot-handle-mdx-estrees-without-createevaluater",i}function aN(e){const r={};let i;for(i in e)Ih.call(e,i)&&(r[oN(i)]=e[i]);return r}function oN(e){let r=e.replace($4,sN);return r.slice(0,3)==="ms-"&&(r="-"+r),r}function sN(e){return"-"+e.toLowerCase()}const md={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"]},uN={};function Hh(e,r){const i=uN,l=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,o=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return R0(e,l,o)}function R0(e,r,i){if(cN(e)){if("value"in e)return e.type==="html"&&!i?"":e.value;if(r&&"alt"in e&&e.alt)return e.alt;if("children"in e)return rx(e.children,r,i)}return Array.isArray(e)?rx(e,r,i):""}function rx(e,r,i){const l=[];let o=-1;for(;++o<e.length;)l[o]=R0(e[o],r,i);return l.join("")}function cN(e){return!!(e&&typeof e=="object")}const ix=document.createElement("i");function qh(e){const r="&"+e+";";ix.innerHTML=r;const i=ix.textContent;return i.charCodeAt(i.length-1)===59&&e!=="semi"||i===r?!1:i}function En(e,r,i,l){const o=e.length;let u=0,c;if(r<0?r=-r>o?0:o+r:r=r>o?o:r,i=i>0?i:0,l.length<1e4)c=Array.from(l),c.unshift(r,i),e.splice(...c);else for(i&&e.splice(r,i);u<l.length;)c=l.slice(u,u+1e4),c.unshift(r,0),e.splice(...c),u+=1e4,r+=1e4}function zn(e,r){return e.length>0?(En(e,e.length,0,r),e):r}const lx={}.hasOwnProperty;function _0(e){const r={};let i=-1;for(;++i<e.length;)fN(r,e[i]);return r}function fN(e,r){let i;for(i in r){const o=(lx.call(e,i)?e[i]:void 0)||(e[i]={}),u=r[i];let c;if(u)for(c in u){lx.call(o,c)||(o[c]=[]);const f=u[c];dN(o[c],Array.isArray(f)?f:f?[f]:[])}}}function dN(e,r){let i=-1;const l=[];for(;++i<r.length;)(r[i].add==="after"?e:l).push(r[i]);En(e,0,0,l)}function L0(e,r){const i=Number.parseInt(e,r);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function Pn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Kt=di(/[A-Za-z]/),Gt=di(/[\dA-Za-z]/),hN=di(/[#-'*+\--9=?A-Z^-~]/);function ou(e){return e!==null&&(e<32||e===127)}const th=di(/\d/),pN=di(/[\dA-Fa-f]/),mN=di(/[!-/:-@[-`{-~]/);function Ne(e){return e!==null&&e<-2}function st(e){return e!==null&&(e<0||e===32)}function He(e){return e===-2||e===-1||e===32}const Lu=di(new RegExp("\\p{P}|\\p{S}","u")),Fi=di(/\s/);function di(e){return r;function r(i){return i!==null&&i>-1&&e.test(String.fromCharCode(i))}}function Hl(e){const r=[];let i=-1,l=0,o=0;for(;++i<e.length;){const u=e.charCodeAt(i);let c="";if(u===37&&Gt(e.charCodeAt(i+1))&&Gt(e.charCodeAt(i+2)))o=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(c=String.fromCharCode(u));else if(u>55295&&u<57344){const f=e.charCodeAt(i+1);u<56320&&f>56319&&f<57344?(c=String.fromCharCode(u,f),o=1):c="�"}else c=String.fromCharCode(u);c&&(r.push(e.slice(l,i),encodeURIComponent(c)),l=i+o+1,c=""),o&&(i+=o,o=0)}return r.join("")+e.slice(l)}function Ge(e,r,i,l){const o=l?l-1:Number.POSITIVE_INFINITY;let u=0;return c;function c(p){return He(p)?(e.enter(i),f(p)):r(p)}function f(p){return He(p)&&u++<o?(e.consume(p),f):(e.exit(i),r(p))}}const gN={tokenize:bN};function bN(e){const r=e.attempt(this.parser.constructs.contentInitial,l,o);let i;return r;function l(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ge(e,r,"linePrefix")}function o(f){return e.enter("paragraph"),u(f)}function u(f){const p=e.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=p),i=p,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Ne(f)?(e.consume(f),e.exit("chunkText"),u):(e.consume(f),c)}}const yN={tokenize:xN},ax={tokenize:vN};function xN(e){const r=this,i=[];let l=0,o,u,c;return f;function f(R){if(l<i.length){const O=i[l];return r.containerState=O[1],e.attempt(O[0].continuation,p,h)(R)}return h(R)}function p(R){if(l++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,o&&E();const O=r.events.length;let H=O,_;for(;H--;)if(r.events[H][0]==="exit"&&r.events[H][1].type==="chunkFlow"){_=r.events[H][1].end;break}N(l);let F=O;for(;F<r.events.length;)r.events[F][1].end={..._},F++;return En(r.events,H+1,0,r.events.slice(O)),r.events.length=F,h(R)}return f(R)}function h(R){if(l===i.length){if(!o)return w(R);if(o.currentConstruct&&o.currentConstruct.concrete)return v(R);r.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return r.containerState={},e.check(ax,b,g)(R)}function b(R){return o&&E(),N(l),w(R)}function g(R){return r.parser.lazy[r.now().line]=l!==i.length,c=r.now().offset,v(R)}function w(R){return r.containerState={},e.attempt(ax,x,v)(R)}function x(R){return l++,i.push([r.currentConstruct,r.containerState]),w(R)}function v(R){if(R===null){o&&E(),N(0),e.consume(R);return}return o=o||r.parser.flow(r.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:u}),S(R)}function S(R){if(R===null){C(e.exit("chunkFlow"),!0),N(0),e.consume(R);return}return Ne(R)?(e.consume(R),C(e.exit("chunkFlow")),l=0,r.interrupt=void 0,f):(e.consume(R),S)}function C(R,O){const H=r.sliceStream(R);if(O&&H.push(null),R.previous=u,u&&(u.next=R),u=R,o.defineSkip(R.start),o.write(H),r.parser.lazy[R.start.line]){let _=o.events.length;for(;_--;)if(o.events[_][1].start.offset<c&&(!o.events[_][1].end||o.events[_][1].end.offset>c))return;const F=r.events.length;let z=F,B,M;for(;z--;)if(r.events[z][0]==="exit"&&r.events[z][1].type==="chunkFlow"){if(B){M=r.events[z][1].end;break}B=!0}for(N(l),_=F;_<r.events.length;)r.events[_][1].end={...M},_++;En(r.events,z+1,0,r.events.slice(F)),r.events.length=_}}function N(R){let O=i.length;for(;O-- >R;){const H=i[O];r.containerState=H[1],H[0].exit.call(r,e)}i.length=R}function E(){o.write([null]),u=void 0,o=void 0,r.containerState._closeFlow=void 0}}function vN(e,r,i){return Ge(e,e.attempt(this.parser.constructs.document,r,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Il(e){if(e===null||st(e)||Fi(e))return 1;if(Lu(e))return 2}function Du(e,r,i){const l=[];let o=-1;for(;++o<e.length;){const u=e[o].resolveAll;u&&!l.includes(u)&&(r=u(r,i),l.push(u))}return r}const nh={name:"attention",resolveAll:wN,tokenize:SN};function wN(e,r){let i=-1,l,o,u,c,f,p,h,b;for(;++i<e.length;)if(e[i][0]==="enter"&&e[i][1].type==="attentionSequence"&&e[i][1]._close){for(l=i;l--;)if(e[l][0]==="exit"&&e[l][1].type==="attentionSequence"&&e[l][1]._open&&r.sliceSerialize(e[l][1]).charCodeAt(0)===r.sliceSerialize(e[i][1]).charCodeAt(0)){if((e[l][1]._close||e[i][1]._open)&&(e[i][1].end.offset-e[i][1].start.offset)%3&&!((e[l][1].end.offset-e[l][1].start.offset+e[i][1].end.offset-e[i][1].start.offset)%3))continue;p=e[l][1].end.offset-e[l][1].start.offset>1&&e[i][1].end.offset-e[i][1].start.offset>1?2:1;const g={...e[l][1].end},w={...e[i][1].start};ox(g,-p),ox(w,p),c={type:p>1?"strongSequence":"emphasisSequence",start:g,end:{...e[l][1].end}},f={type:p>1?"strongSequence":"emphasisSequence",start:{...e[i][1].start},end:w},u={type:p>1?"strongText":"emphasisText",start:{...e[l][1].end},end:{...e[i][1].start}},o={type:p>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[l][1].end={...c.start},e[i][1].start={...f.end},h=[],e[l][1].end.offset-e[l][1].start.offset&&(h=zn(h,[["enter",e[l][1],r],["exit",e[l][1],r]])),h=zn(h,[["enter",o,r],["enter",c,r],["exit",c,r],["enter",u,r]]),h=zn(h,Du(r.parser.constructs.insideSpan.null,e.slice(l+1,i),r)),h=zn(h,[["exit",u,r],["enter",f,r],["exit",f,r],["exit",o,r]]),e[i][1].end.offset-e[i][1].start.offset?(b=2,h=zn(h,[["enter",e[i][1],r],["exit",e[i][1],r]])):b=0,En(e,l-1,i-l+3,h),i=l+h.length-b-2;break}}for(i=-1;++i<e.length;)e[i][1].type==="attentionSequence"&&(e[i][1].type="data");return e}function SN(e,r){const i=this.parser.constructs.attentionMarkers.null,l=this.previous,o=Il(l);let u;return c;function c(p){return u=p,e.enter("attentionSequence"),f(p)}function f(p){if(p===u)return e.consume(p),f;const h=e.exit("attentionSequence"),b=Il(p),g=!b||b===2&&o||i.includes(p),w=!o||o===2&&b||i.includes(l);return h._open=!!(u===42?g:g&&(o||!w)),h._close=!!(u===42?w:w&&(b||!g)),r(p)}}function ox(e,r){e.column+=r,e.offset+=r,e._bufferIndex+=r}const kN={name:"autolink",tokenize:EN};function EN(e,r,i){let l=0;return o;function o(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(x){return Kt(x)?(e.consume(x),c):x===64?i(x):h(x)}function c(x){return x===43||x===45||x===46||Gt(x)?(l=1,f(x)):h(x)}function f(x){return x===58?(e.consume(x),l=0,p):(x===43||x===45||x===46||Gt(x))&&l++<32?(e.consume(x),f):(l=0,h(x))}function p(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),r):x===null||x===32||x===60||ou(x)?i(x):(e.consume(x),p)}function h(x){return x===64?(e.consume(x),b):hN(x)?(e.consume(x),h):i(x)}function b(x){return Gt(x)?g(x):i(x)}function g(x){return x===46?(e.consume(x),l=0,b):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),r):w(x)}function w(x){if((x===45||Gt(x))&&l++<63){const v=x===45?w:g;return e.consume(x),v}return i(x)}}const ao={partial:!0,tokenize:CN};function CN(e,r,i){return l;function l(u){return He(u)?Ge(e,o,"linePrefix")(u):o(u)}function o(u){return u===null||Ne(u)?r(u):i(u)}}const D0={continuation:{tokenize:AN},exit:TN,name:"blockQuote",tokenize:NN};function NN(e,r,i){const l=this;return o;function o(c){if(c===62){const f=l.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),u}return i(c)}function u(c){return He(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),r):(e.exit("blockQuotePrefix"),r(c))}}function AN(e,r,i){const l=this;return o;function o(c){return He(c)?Ge(e,u,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):u(c)}function u(c){return e.attempt(D0,r,i)(c)}}function TN(e){e.exit("blockQuote")}const O0={name:"characterEscape",tokenize:jN};function jN(e,r,i){return l;function l(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),o}function o(u){return mN(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),r):i(u)}}const M0={name:"characterReference",tokenize:RN};function RN(e,r,i){const l=this;let o=0,u,c;return f;function f(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),p}function p(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),u=31,c=Gt,b(g))}function h(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,c=pN,b):(e.enter("characterReferenceValue"),u=7,c=th,b(g))}function b(g){if(g===59&&o){const w=e.exit("characterReferenceValue");return c===Gt&&!qh(l.sliceSerialize(w))?i(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),r)}return c(g)&&o++<u?(e.consume(g),b):i(g)}}const sx={partial:!0,tokenize:LN},ux={concrete:!0,name:"codeFenced",tokenize:_N};function _N(e,r,i){const l=this,o={partial:!0,tokenize:H};let u=0,c=0,f;return p;function p(_){return h(_)}function h(_){const F=l.events[l.events.length-1];return u=F&&F[1].type==="linePrefix"?F[2].sliceSerialize(F[1],!0).length:0,f=_,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),b(_)}function b(_){return _===f?(c++,e.consume(_),b):c<3?i(_):(e.exit("codeFencedFenceSequence"),He(_)?Ge(e,g,"whitespace")(_):g(_))}function g(_){return _===null||Ne(_)?(e.exit("codeFencedFence"),l.interrupt?r(_):e.check(sx,S,O)(_)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),w(_))}function w(_){return _===null||Ne(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(_)):He(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ge(e,x,"whitespace")(_)):_===96&&_===f?i(_):(e.consume(_),w)}function x(_){return _===null||Ne(_)?g(_):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),v(_))}function v(_){return _===null||Ne(_)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(_)):_===96&&_===f?i(_):(e.consume(_),v)}function S(_){return e.attempt(o,O,C)(_)}function C(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),N}function N(_){return u>0&&He(_)?Ge(e,E,"linePrefix",u+1)(_):E(_)}function E(_){return _===null||Ne(_)?e.check(sx,S,O)(_):(e.enter("codeFlowValue"),R(_))}function R(_){return _===null||Ne(_)?(e.exit("codeFlowValue"),E(_)):(e.consume(_),R)}function O(_){return e.exit("codeFenced"),r(_)}function H(_,F,z){let B=0;return M;function M(Z){return _.enter("lineEnding"),_.consume(Z),_.exit("lineEnding"),$}function $(Z){return _.enter("codeFencedFence"),He(Z)?Ge(_,V,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Z):V(Z)}function V(Z){return Z===f?(_.enter("codeFencedFenceSequence"),J(Z)):z(Z)}function J(Z){return Z===f?(B++,_.consume(Z),J):B>=c?(_.exit("codeFencedFenceSequence"),He(Z)?Ge(_,I,"whitespace")(Z):I(Z)):z(Z)}function I(Z){return Z===null||Ne(Z)?(_.exit("codeFencedFence"),F(Z)):z(Z)}}}function LN(e,r,i){const l=this;return o;function o(c){return c===null?i(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u)}function u(c){return l.parser.lazy[l.now().line]?i(c):r(c)}}const gd={name:"codeIndented",tokenize:ON},DN={partial:!0,tokenize:MN};function ON(e,r,i){const l=this;return o;function o(h){return e.enter("codeIndented"),Ge(e,u,"linePrefix",5)(h)}function u(h){const b=l.events[l.events.length-1];return b&&b[1].type==="linePrefix"&&b[2].sliceSerialize(b[1],!0).length>=4?c(h):i(h)}function c(h){return h===null?p(h):Ne(h)?e.attempt(DN,c,p)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||Ne(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),f)}function p(h){return e.exit("codeIndented"),r(h)}}function MN(e,r,i){const l=this;return o;function o(c){return l.parser.lazy[l.now().line]?i(c):Ne(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):Ge(e,u,"linePrefix",5)(c)}function u(c){const f=l.events[l.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?r(c):Ne(c)?o(c):i(c)}}const zN={name:"codeText",previous:IN,resolve:FN,tokenize:BN};function FN(e){let r=e.length-4,i=3,l,o;if((e[i][1].type==="lineEnding"||e[i][1].type==="space")&&(e[r][1].type==="lineEnding"||e[r][1].type==="space")){for(l=i;++l<r;)if(e[l][1].type==="codeTextData"){e[i][1].type="codeTextPadding",e[r][1].type="codeTextPadding",i+=2,r-=2;break}}for(l=i-1,r++;++l<=r;)o===void 0?l!==r&&e[l][1].type!=="lineEnding"&&(o=l):(l===r||e[l][1].type==="lineEnding")&&(e[o][1].type="codeTextData",l!==o+2&&(e[o][1].end=e[l-1][1].end,e.splice(o+2,l-o-2),r-=l-o-2,l=o+2),o=void 0);return e}function IN(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function BN(e,r,i){let l=0,o,u;return c;function c(g){return e.enter("codeText"),e.enter("codeTextSequence"),f(g)}function f(g){return g===96?(e.consume(g),l++,f):(e.exit("codeTextSequence"),p(g))}function p(g){return g===null?i(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),p):g===96?(u=e.enter("codeTextSequence"),o=0,b(g)):Ne(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),p):(e.enter("codeTextData"),h(g))}function h(g){return g===null||g===32||g===96||Ne(g)?(e.exit("codeTextData"),p(g)):(e.consume(g),h)}function b(g){return g===96?(e.consume(g),o++,b):o===l?(e.exit("codeTextSequence"),e.exit("codeText"),r(g)):(u.type="codeTextData",h(g))}}class UN{constructor(r){this.left=r?[...r]:[],this.right=[]}get(r){if(r<0||r>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return r<this.left.length?this.left[r]:this.right[this.right.length-r+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(r,i){const l=i??Number.POSITIVE_INFINITY;return l<this.left.length?this.left.slice(r,l):r>this.left.length?this.right.slice(this.right.length-l+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-l+this.left.length).reverse())}splice(r,i,l){const o=i||0;this.setCursor(Math.trunc(r));const u=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return l&&Fa(this.left,l),u.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),Fa(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),Fa(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r<this.left.length){const i=this.left.splice(r,Number.POSITIVE_INFINITY);Fa(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-r,Number.POSITIVE_INFINITY);Fa(this.left,i.reverse())}}}function Fa(e,r){let i=0;if(r.length<1e4)e.push(...r);else for(;i<r.length;)e.push(...r.slice(i,i+1e4)),i+=1e4}function z0(e){const r={};let i=-1,l,o,u,c,f,p,h;const b=new UN(e);for(;++i<b.length;){for(;i in r;)i=r[i];if(l=b.get(i),i&&l[1].type==="chunkFlow"&&b.get(i-1)[1].type==="listItemPrefix"&&(p=l[1]._tokenizer.events,u=0,u<p.length&&p[u][1].type==="lineEndingBlank"&&(u+=2),u<p.length&&p[u][1].type==="content"))for(;++u<p.length&&p[u][1].type!=="content";)p[u][1].type==="chunkText"&&(p[u][1]._isInFirstContentOfListItem=!0,u++);if(l[0]==="enter")l[1].contentType&&(Object.assign(r,HN(b,i)),i=r[i],h=!0);else if(l[1]._container){for(u=i,o=void 0;u--;)if(c=b.get(u),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(o&&(b.get(o)[1].type="lineEndingBlank"),c[1].type="lineEnding",o=u);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;o&&(l[1].end={...b.get(o)[1].start},f=b.slice(o,i),f.unshift(l),b.splice(o,i-o+1,f))}}return En(e,0,Number.POSITIVE_INFINITY,b.slice(0)),!h}function HN(e,r){const i=e.get(r)[1],l=e.get(r)[2];let o=r-1;const u=[];let c=i._tokenizer;c||(c=l.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,p=[],h={};let b,g,w=-1,x=i,v=0,S=0;const C=[S];for(;x;){for(;e.get(++o)[1]!==x;);u.push(o),x._tokenizer||(b=l.sliceStream(x),x.next||b.push(null),g&&c.defineSkip(x.start),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(b),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),g=x,x=x.next}for(x=i;++w<f.length;)f[w][0]==="exit"&&f[w-1][0]==="enter"&&f[w][1].type===f[w-1][1].type&&f[w][1].start.line!==f[w][1].end.line&&(S=w+1,C.push(S),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(c.events=[],x?(x._tokenizer=void 0,x.previous=void 0):C.pop(),w=C.length;w--;){const N=f.slice(C[w],C[w+1]),E=u.pop();p.push([E,E+N.length-1]),e.splice(E,2,N)}for(p.reverse(),w=-1;++w<p.length;)h[v+p[w][0]]=v+p[w][1],v+=p[w][1]-p[w][0]-1;return h}const qN={resolve:$N,tokenize:VN},PN={partial:!0,tokenize:GN};function $N(e){return z0(e),e}function VN(e,r){let i;return l;function l(f){return e.enter("content"),i=e.enter("chunkContent",{contentType:"content"}),o(f)}function o(f){return f===null?u(f):Ne(f)?e.check(PN,c,u)(f):(e.consume(f),o)}function u(f){return e.exit("chunkContent"),e.exit("content"),r(f)}function c(f){return e.consume(f),e.exit("chunkContent"),i.next=e.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,o}}function GN(e,r,i){const l=this;return o;function o(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Ge(e,u,"linePrefix")}function u(c){if(c===null||Ne(c))return i(c);const f=l.events[l.events.length-1];return!l.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?r(c):e.interrupt(l.parser.constructs.flow,i,r)(c)}}function F0(e,r,i,l,o,u,c,f,p){const h=p||Number.POSITIVE_INFINITY;let b=0;return g;function g(N){return N===60?(e.enter(l),e.enter(o),e.enter(u),e.consume(N),e.exit(u),w):N===null||N===32||N===41||ou(N)?i(N):(e.enter(l),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),S(N))}function w(N){return N===62?(e.enter(u),e.consume(N),e.exit(u),e.exit(o),e.exit(l),r):(e.enter(f),e.enter("chunkString",{contentType:"string"}),x(N))}function x(N){return N===62?(e.exit("chunkString"),e.exit(f),w(N)):N===null||N===60||Ne(N)?i(N):(e.consume(N),N===92?v:x)}function v(N){return N===60||N===62||N===92?(e.consume(N),x):x(N)}function S(N){return!b&&(N===null||N===41||st(N))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(l),r(N)):b<h&&N===40?(e.consume(N),b++,S):N===41?(e.consume(N),b--,S):N===null||N===32||N===40||ou(N)?i(N):(e.consume(N),N===92?C:S)}function C(N){return N===40||N===41||N===92?(e.consume(N),S):S(N)}}function I0(e,r,i,l,o,u){const c=this;let f=0,p;return h;function h(x){return e.enter(l),e.enter(o),e.consume(x),e.exit(o),e.enter(u),b}function b(x){return f>999||x===null||x===91||x===93&&!p||x===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?i(x):x===93?(e.exit(u),e.enter(o),e.consume(x),e.exit(o),e.exit(l),r):Ne(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),b):(e.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===null||x===91||x===93||Ne(x)||f++>999?(e.exit("chunkString"),b(x)):(e.consume(x),p||(p=!He(x)),x===92?w:g)}function w(x){return x===91||x===92||x===93?(e.consume(x),f++,g):g(x)}}function B0(e,r,i,l,o,u){let c;return f;function f(w){return w===34||w===39||w===40?(e.enter(l),e.enter(o),e.consume(w),e.exit(o),c=w===40?41:w,p):i(w)}function p(w){return w===c?(e.enter(o),e.consume(w),e.exit(o),e.exit(l),r):(e.enter(u),h(w))}function h(w){return w===c?(e.exit(u),p(c)):w===null?i(w):Ne(w)?(e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),Ge(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),b(w))}function b(w){return w===c||w===null||Ne(w)?(e.exit("chunkString"),h(w)):(e.consume(w),w===92?g:b)}function g(w){return w===c||w===92?(e.consume(w),b):b(w)}}function $a(e,r){let i;return l;function l(o){return Ne(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i=!0,l):He(o)?Ge(e,l,i?"linePrefix":"lineSuffix")(o):r(o)}}const YN={name:"definition",tokenize:ZN},XN={partial:!0,tokenize:KN};function ZN(e,r,i){const l=this;let o;return u;function u(x){return e.enter("definition"),c(x)}function c(x){return I0.call(l,e,f,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function f(x){return o=Pn(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),p):i(x)}function p(x){return st(x)?$a(e,h)(x):h(x)}function h(x){return F0(e,b,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function b(x){return e.attempt(XN,g,g)(x)}function g(x){return He(x)?Ge(e,w,"whitespace")(x):w(x)}function w(x){return x===null||Ne(x)?(e.exit("definition"),l.parser.defined.push(o),r(x)):i(x)}}function KN(e,r,i){return l;function l(f){return st(f)?$a(e,o)(f):i(f)}function o(f){return B0(e,u,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function u(f){return He(f)?Ge(e,c,"whitespace")(f):c(f)}function c(f){return f===null||Ne(f)?r(f):i(f)}}const QN={name:"hardBreakEscape",tokenize:JN};function JN(e,r,i){return l;function l(u){return e.enter("hardBreakEscape"),e.consume(u),o}function o(u){return Ne(u)?(e.exit("hardBreakEscape"),r(u)):i(u)}}const WN={name:"headingAtx",resolve:eA,tokenize:tA};function eA(e,r){let i=e.length-2,l=3,o,u;return e[l][1].type==="whitespace"&&(l+=2),i-2>l&&e[i][1].type==="whitespace"&&(i-=2),e[i][1].type==="atxHeadingSequence"&&(l===i-1||i-4>l&&e[i-2][1].type==="whitespace")&&(i-=l+1===i?2:4),i>l&&(o={type:"atxHeadingText",start:e[l][1].start,end:e[i][1].end},u={type:"chunkText",start:e[l][1].start,end:e[i][1].end,contentType:"text"},En(e,l,i-l+1,[["enter",o,r],["enter",u,r],["exit",u,r],["exit",o,r]])),e}function tA(e,r,i){let l=0;return o;function o(b){return e.enter("atxHeading"),u(b)}function u(b){return e.enter("atxHeadingSequence"),c(b)}function c(b){return b===35&&l++<6?(e.consume(b),c):b===null||st(b)?(e.exit("atxHeadingSequence"),f(b)):i(b)}function f(b){return b===35?(e.enter("atxHeadingSequence"),p(b)):b===null||Ne(b)?(e.exit("atxHeading"),r(b)):He(b)?Ge(e,f,"whitespace")(b):(e.enter("atxHeadingText"),h(b))}function p(b){return b===35?(e.consume(b),p):(e.exit("atxHeadingSequence"),f(b))}function h(b){return b===null||b===35||st(b)?(e.exit("atxHeadingText"),f(b)):(e.consume(b),h)}}const nA=["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"],cx=["pre","script","style","textarea"],rA={concrete:!0,name:"htmlFlow",resolveTo:aA,tokenize:oA},iA={partial:!0,tokenize:uA},lA={partial:!0,tokenize:sA};function aA(e){let r=e.length;for(;r--&&!(e[r][0]==="enter"&&e[r][1].type==="htmlFlow"););return r>1&&e[r-2][1].type==="linePrefix"&&(e[r][1].start=e[r-2][1].start,e[r+1][1].start=e[r-2][1].start,e.splice(r-2,2)),e}function oA(e,r,i){const l=this;let o,u,c,f,p;return h;function h(T){return b(T)}function b(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),g}function g(T){return T===33?(e.consume(T),w):T===47?(e.consume(T),u=!0,S):T===63?(e.consume(T),o=3,l.interrupt?r:j):Kt(T)?(e.consume(T),c=String.fromCharCode(T),C):i(T)}function w(T){return T===45?(e.consume(T),o=2,x):T===91?(e.consume(T),o=5,f=0,v):Kt(T)?(e.consume(T),o=4,l.interrupt?r:j):i(T)}function x(T){return T===45?(e.consume(T),l.interrupt?r:j):i(T)}function v(T){const W="CDATA[";return T===W.charCodeAt(f++)?(e.consume(T),f===W.length?l.interrupt?r:V:v):i(T)}function S(T){return Kt(T)?(e.consume(T),c=String.fromCharCode(T),C):i(T)}function C(T){if(T===null||T===47||T===62||st(T)){const W=T===47,te=c.toLowerCase();return!W&&!u&&cx.includes(te)?(o=1,l.interrupt?r(T):V(T)):nA.includes(c.toLowerCase())?(o=6,W?(e.consume(T),N):l.interrupt?r(T):V(T)):(o=7,l.interrupt&&!l.parser.lazy[l.now().line]?i(T):u?E(T):R(T))}return T===45||Gt(T)?(e.consume(T),c+=String.fromCharCode(T),C):i(T)}function N(T){return T===62?(e.consume(T),l.interrupt?r:V):i(T)}function E(T){return He(T)?(e.consume(T),E):M(T)}function R(T){return T===47?(e.consume(T),M):T===58||T===95||Kt(T)?(e.consume(T),O):He(T)?(e.consume(T),R):M(T)}function O(T){return T===45||T===46||T===58||T===95||Gt(T)?(e.consume(T),O):H(T)}function H(T){return T===61?(e.consume(T),_):He(T)?(e.consume(T),H):R(T)}function _(T){return T===null||T===60||T===61||T===62||T===96?i(T):T===34||T===39?(e.consume(T),p=T,F):He(T)?(e.consume(T),_):z(T)}function F(T){return T===p?(e.consume(T),p=null,B):T===null||Ne(T)?i(T):(e.consume(T),F)}function z(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||st(T)?H(T):(e.consume(T),z)}function B(T){return T===47||T===62||He(T)?R(T):i(T)}function M(T){return T===62?(e.consume(T),$):i(T)}function $(T){return T===null||Ne(T)?V(T):He(T)?(e.consume(T),$):i(T)}function V(T){return T===45&&o===2?(e.consume(T),U):T===60&&o===1?(e.consume(T),Y):T===62&&o===4?(e.consume(T),D):T===63&&o===3?(e.consume(T),j):T===93&&o===5?(e.consume(T),q):Ne(T)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(iA,P,J)(T)):T===null||Ne(T)?(e.exit("htmlFlowData"),J(T)):(e.consume(T),V)}function J(T){return e.check(lA,I,P)(T)}function I(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),Z}function Z(T){return T===null||Ne(T)?J(T):(e.enter("htmlFlowData"),V(T))}function U(T){return T===45?(e.consume(T),j):V(T)}function Y(T){return T===47?(e.consume(T),c="",X):V(T)}function X(T){if(T===62){const W=c.toLowerCase();return cx.includes(W)?(e.consume(T),D):V(T)}return Kt(T)&&c.length<8?(e.consume(T),c+=String.fromCharCode(T),X):V(T)}function q(T){return T===93?(e.consume(T),j):V(T)}function j(T){return T===62?(e.consume(T),D):T===45&&o===2?(e.consume(T),j):V(T)}function D(T){return T===null||Ne(T)?(e.exit("htmlFlowData"),P(T)):(e.consume(T),D)}function P(T){return e.exit("htmlFlow"),r(T)}}function sA(e,r,i){const l=this;return o;function o(c){return Ne(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):i(c)}function u(c){return l.parser.lazy[l.now().line]?i(c):r(c)}}function uA(e,r,i){return l;function l(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(ao,r,i)}}const cA={name:"htmlText",tokenize:fA};function fA(e,r,i){const l=this;let o,u,c;return f;function f(j){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(j),p}function p(j){return j===33?(e.consume(j),h):j===47?(e.consume(j),H):j===63?(e.consume(j),R):Kt(j)?(e.consume(j),z):i(j)}function h(j){return j===45?(e.consume(j),b):j===91?(e.consume(j),u=0,v):Kt(j)?(e.consume(j),E):i(j)}function b(j){return j===45?(e.consume(j),x):i(j)}function g(j){return j===null?i(j):j===45?(e.consume(j),w):Ne(j)?(c=g,Y(j)):(e.consume(j),g)}function w(j){return j===45?(e.consume(j),x):g(j)}function x(j){return j===62?U(j):j===45?w(j):g(j)}function v(j){const D="CDATA[";return j===D.charCodeAt(u++)?(e.consume(j),u===D.length?S:v):i(j)}function S(j){return j===null?i(j):j===93?(e.consume(j),C):Ne(j)?(c=S,Y(j)):(e.consume(j),S)}function C(j){return j===93?(e.consume(j),N):S(j)}function N(j){return j===62?U(j):j===93?(e.consume(j),N):S(j)}function E(j){return j===null||j===62?U(j):Ne(j)?(c=E,Y(j)):(e.consume(j),E)}function R(j){return j===null?i(j):j===63?(e.consume(j),O):Ne(j)?(c=R,Y(j)):(e.consume(j),R)}function O(j){return j===62?U(j):R(j)}function H(j){return Kt(j)?(e.consume(j),_):i(j)}function _(j){return j===45||Gt(j)?(e.consume(j),_):F(j)}function F(j){return Ne(j)?(c=F,Y(j)):He(j)?(e.consume(j),F):U(j)}function z(j){return j===45||Gt(j)?(e.consume(j),z):j===47||j===62||st(j)?B(j):i(j)}function B(j){return j===47?(e.consume(j),U):j===58||j===95||Kt(j)?(e.consume(j),M):Ne(j)?(c=B,Y(j)):He(j)?(e.consume(j),B):U(j)}function M(j){return j===45||j===46||j===58||j===95||Gt(j)?(e.consume(j),M):$(j)}function $(j){return j===61?(e.consume(j),V):Ne(j)?(c=$,Y(j)):He(j)?(e.consume(j),$):B(j)}function V(j){return j===null||j===60||j===61||j===62||j===96?i(j):j===34||j===39?(e.consume(j),o=j,J):Ne(j)?(c=V,Y(j)):He(j)?(e.consume(j),V):(e.consume(j),I)}function J(j){return j===o?(e.consume(j),o=void 0,Z):j===null?i(j):Ne(j)?(c=J,Y(j)):(e.consume(j),J)}function I(j){return j===null||j===34||j===39||j===60||j===61||j===96?i(j):j===47||j===62||st(j)?B(j):(e.consume(j),I)}function Z(j){return j===47||j===62||st(j)?B(j):i(j)}function U(j){return j===62?(e.consume(j),e.exit("htmlTextData"),e.exit("htmlText"),r):i(j)}function Y(j){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),X}function X(j){return He(j)?Ge(e,q,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):q(j)}function q(j){return e.enter("htmlTextData"),c(j)}}const Ph={name:"labelEnd",resolveAll:mA,resolveTo:gA,tokenize:bA},dA={tokenize:yA},hA={tokenize:xA},pA={tokenize:vA};function mA(e){let r=-1;const i=[];for(;++r<e.length;){const l=e[r][1];if(i.push(e[r]),l.type==="labelImage"||l.type==="labelLink"||l.type==="labelEnd"){const o=l.type==="labelImage"?4:2;l.type="data",r+=o}}return e.length!==i.length&&En(e,0,e.length,i),e}function gA(e,r){let i=e.length,l=0,o,u,c,f;for(;i--;)if(o=e[i][1],u){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[i][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(c){if(e[i][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(u=i,o.type!=="labelLink")){l=2;break}}else o.type==="labelEnd"&&(c=i);const p={type:e[u][1].type==="labelLink"?"link":"image",start:{...e[u][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[u][1].start},end:{...e[c][1].end}},b={type:"labelText",start:{...e[u+l+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",p,r],["enter",h,r]],f=zn(f,e.slice(u+1,u+l+3)),f=zn(f,[["enter",b,r]]),f=zn(f,Du(r.parser.constructs.insideSpan.null,e.slice(u+l+4,c-3),r)),f=zn(f,[["exit",b,r],e[c-2],e[c-1],["exit",h,r]]),f=zn(f,e.slice(c+1)),f=zn(f,[["exit",p,r]]),En(e,u,e.length,f),e}function bA(e,r,i){const l=this;let o=l.events.length,u,c;for(;o--;)if((l.events[o][1].type==="labelImage"||l.events[o][1].type==="labelLink")&&!l.events[o][1]._balanced){u=l.events[o][1];break}return f;function f(w){return u?u._inactive?g(w):(c=l.parser.defined.includes(Pn(l.sliceSerialize({start:u.end,end:l.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(w),e.exit("labelMarker"),e.exit("labelEnd"),p):i(w)}function p(w){return w===40?e.attempt(dA,b,c?b:g)(w):w===91?e.attempt(hA,b,c?h:g)(w):c?b(w):g(w)}function h(w){return e.attempt(pA,b,g)(w)}function b(w){return r(w)}function g(w){return u._balanced=!0,i(w)}}function yA(e,r,i){return l;function l(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),o}function o(g){return st(g)?$a(e,u)(g):u(g)}function u(g){return g===41?b(g):F0(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return st(g)?$a(e,p)(g):b(g)}function f(g){return i(g)}function p(g){return g===34||g===39||g===40?B0(e,h,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):b(g)}function h(g){return st(g)?$a(e,b)(g):b(g)}function b(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),r):i(g)}}function xA(e,r,i){const l=this;return o;function o(f){return I0.call(l,e,u,c,"reference","referenceMarker","referenceString")(f)}function u(f){return l.parser.defined.includes(Pn(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)))?r(f):i(f)}function c(f){return i(f)}}function vA(e,r,i){return l;function l(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),o}function o(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),r):i(u)}}const wA={name:"labelStartImage",resolveAll:Ph.resolveAll,tokenize:SA};function SA(e,r,i){const l=this;return o;function o(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),u}function u(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):i(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in l.parser.constructs?i(f):r(f)}}const kA={name:"labelStartLink",resolveAll:Ph.resolveAll,tokenize:EA};function EA(e,r,i){const l=this;return o;function o(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),u}function u(c){return c===94&&"_hiddenFootnoteSupport"in l.parser.constructs?i(c):r(c)}}const bd={name:"lineEnding",tokenize:CA};function CA(e,r){return i;function i(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Ge(e,r,"linePrefix")}}const zs={name:"thematicBreak",tokenize:NA};function NA(e,r,i){let l=0,o;return u;function u(h){return e.enter("thematicBreak"),c(h)}function c(h){return o=h,f(h)}function f(h){return h===o?(e.enter("thematicBreakSequence"),p(h)):l>=3&&(h===null||Ne(h))?(e.exit("thematicBreak"),r(h)):i(h)}function p(h){return h===o?(e.consume(h),l++,p):(e.exit("thematicBreakSequence"),He(h)?Ge(e,f,"whitespace")(h):f(h))}}const on={continuation:{tokenize:RA},exit:LA,name:"list",tokenize:jA},AA={partial:!0,tokenize:DA},TA={partial:!0,tokenize:_A};function jA(e,r,i){const l=this,o=l.events[l.events.length-1];let u=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,c=0;return f;function f(x){const v=l.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(v==="listUnordered"?!l.containerState.marker||x===l.containerState.marker:th(x)){if(l.containerState.type||(l.containerState.type=v,e.enter(v,{_container:!0})),v==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(zs,i,h)(x):h(x);if(!l.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),p(x)}return i(x)}function p(x){return th(x)&&++c<10?(e.consume(x),p):(!l.interrupt||c<2)&&(l.containerState.marker?x===l.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),h(x)):i(x)}function h(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),l.containerState.marker=l.containerState.marker||x,e.check(ao,l.interrupt?i:b,e.attempt(AA,w,g))}function b(x){return l.containerState.initialBlankLine=!0,u++,w(x)}function g(x){return He(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),w):i(x)}function w(x){return l.containerState.size=u+l.sliceSerialize(e.exit("listItemPrefix"),!0).length,r(x)}}function RA(e,r,i){const l=this;return l.containerState._closeFlow=void 0,e.check(ao,o,u);function o(f){return l.containerState.furtherBlankLines=l.containerState.furtherBlankLines||l.containerState.initialBlankLine,Ge(e,r,"listItemIndent",l.containerState.size+1)(f)}function u(f){return l.containerState.furtherBlankLines||!He(f)?(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,c(f)):(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,e.attempt(TA,r,c)(f))}function c(f){return l.containerState._closeFlow=!0,l.interrupt=void 0,Ge(e,e.attempt(on,r,i),"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function _A(e,r,i){const l=this;return Ge(e,o,"listItemIndent",l.containerState.size+1);function o(u){const c=l.events[l.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===l.containerState.size?r(u):i(u)}}function LA(e){e.exit(this.containerState.type)}function DA(e,r,i){const l=this;return Ge(e,o,"listItemPrefixWhitespace",l.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(u){const c=l.events[l.events.length-1];return!He(u)&&c&&c[1].type==="listItemPrefixWhitespace"?r(u):i(u)}}const fx={name:"setextUnderline",resolveTo:OA,tokenize:MA};function OA(e,r){let i=e.length,l,o,u;for(;i--;)if(e[i][0]==="enter"){if(e[i][1].type==="content"){l=i;break}e[i][1].type==="paragraph"&&(o=i)}else e[i][1].type==="content"&&e.splice(i,1),!u&&e[i][1].type==="definition"&&(u=i);const c={type:"setextHeading",start:{...e[l][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",u?(e.splice(o,0,["enter",c,r]),e.splice(u+1,0,["exit",e[l][1],r]),e[l][1].end={...e[u][1].end}):e[l][1]=c,e.push(["exit",c,r]),e}function MA(e,r,i){const l=this;let o;return u;function u(h){let b=l.events.length,g;for(;b--;)if(l.events[b][1].type!=="lineEnding"&&l.events[b][1].type!=="linePrefix"&&l.events[b][1].type!=="content"){g=l.events[b][1].type==="paragraph";break}return!l.parser.lazy[l.now().line]&&(l.interrupt||g)?(e.enter("setextHeadingLine"),o=h,c(h)):i(h)}function c(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===o?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),He(h)?Ge(e,p,"lineSuffix")(h):p(h))}function p(h){return h===null||Ne(h)?(e.exit("setextHeadingLine"),r(h)):i(h)}}const zA={tokenize:FA};function FA(e){const r=this,i=e.attempt(ao,l,e.attempt(this.parser.constructs.flowInitial,o,Ge(e,e.attempt(this.parser.constructs.flow,o,e.attempt(qN,o)),"linePrefix")));return i;function l(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),r.currentConstruct=void 0,i}function o(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),r.currentConstruct=void 0,i}}const IA={resolveAll:H0()},BA=U0("string"),UA=U0("text");function U0(e){return{resolveAll:H0(e==="text"?HA:void 0),tokenize:r};function r(i){const l=this,o=this.parser.constructs[e],u=i.attempt(o,c,f);return c;function c(b){return h(b)?u(b):f(b)}function f(b){if(b===null){i.consume(b);return}return i.enter("data"),i.consume(b),p}function p(b){return h(b)?(i.exit("data"),u(b)):(i.consume(b),p)}function h(b){if(b===null)return!0;const g=o[b];let w=-1;if(g)for(;++w<g.length;){const x=g[w];if(!x.previous||x.previous.call(l,l.previous))return!0}return!1}}}function H0(e){return r;function r(i,l){let o=-1,u;for(;++o<=i.length;)u===void 0?i[o]&&i[o][1].type==="data"&&(u=o,o++):(!i[o]||i[o][1].type!=="data")&&(o!==u+2&&(i[u][1].end=i[o-1][1].end,i.splice(u+2,o-u-2),o=u+2),u=void 0);return e?e(i,l):i}}function HA(e,r){let i=0;for(;++i<=e.length;)if((i===e.length||e[i][1].type==="lineEnding")&&e[i-1][1].type==="data"){const l=e[i-1][1],o=r.sliceStream(l);let u=o.length,c=-1,f=0,p;for(;u--;){const h=o[u];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(h===-2)p=!0,f++;else if(h!==-1){u++;break}}if(r._contentTypeTextTrailing&&i===e.length&&(f=0),f){const h={type:i===e.length||p||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?c:l.start._bufferIndex+c,_index:l.start._index+u,line:l.end.line,column:l.end.column-f,offset:l.end.offset-f},end:{...l.end}};l.end={...h.start},l.start.offset===l.end.offset?Object.assign(l,h):(e.splice(i,0,["enter",h,r],["exit",h,r]),i+=2)}i++}return e}const qA={42:on,43:on,45:on,48:on,49:on,50:on,51:on,52:on,53:on,54:on,55:on,56:on,57:on,62:D0},PA={91:YN},$A={[-2]:gd,[-1]:gd,32:gd},VA={35:WN,42:zs,45:[fx,zs],60:rA,61:fx,95:zs,96:ux,126:ux},GA={38:M0,92:O0},YA={[-5]:bd,[-4]:bd,[-3]:bd,33:wA,38:M0,42:nh,60:[kN,cA],91:kA,92:[QN,O0],93:Ph,95:nh,96:zN},XA={null:[nh,IA]},ZA={null:[42,95]},KA={null:[]},QA=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:ZA,contentInitial:PA,disable:KA,document:qA,flow:VA,flowInitial:$A,insideSpan:XA,string:GA,text:YA},Symbol.toStringTag,{value:"Module"}));function JA(e,r,i){let l={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const o={},u=[];let c=[],f=[];const p={attempt:F(H),check:F(_),consume:E,enter:R,exit:O,interrupt:F(_,{interrupt:!0})},h={code:null,containerState:{},defineSkip:S,events:[],now:v,parser:e,previous:null,sliceSerialize:w,sliceStream:x,write:g};let b=r.tokenize.call(h,p);return r.resolveAll&&u.push(r),h;function g($){return c=zn(c,$),C(),c[c.length-1]!==null?[]:(z(r,0),h.events=Du(u,h.events,h),h.events)}function w($,V){return eT(x($),V)}function x($){return WA(c,$)}function v(){const{_bufferIndex:$,_index:V,line:J,column:I,offset:Z}=l;return{_bufferIndex:$,_index:V,line:J,column:I,offset:Z}}function S($){o[$.line]=$.column,M()}function C(){let $;for(;l._index<c.length;){const V=c[l._index];if(typeof V=="string")for($=l._index,l._bufferIndex<0&&(l._bufferIndex=0);l._index===$&&l._bufferIndex<V.length;)N(V.charCodeAt(l._bufferIndex));else N(V)}}function N($){b=b($)}function E($){Ne($)?(l.line++,l.column=1,l.offset+=$===-3?2:1,M()):$!==-1&&(l.column++,l.offset++),l._bufferIndex<0?l._index++:(l._bufferIndex++,l._bufferIndex===c[l._index].length&&(l._bufferIndex=-1,l._index++)),h.previous=$}function R($,V){const J=V||{};return J.type=$,J.start=v(),h.events.push(["enter",J,h]),f.push(J),J}function O($){const V=f.pop();return V.end=v(),h.events.push(["exit",V,h]),V}function H($,V){z($,V.from)}function _($,V){V.restore()}function F($,V){return J;function J(I,Z,U){let Y,X,q,j;return Array.isArray(I)?P(I):"tokenize"in I?P([I]):D(I);function D(ce){return me;function me(xe){const ge=xe!==null&&ce[xe],ve=xe!==null&&ce.null,Ee=[...Array.isArray(ge)?ge:ge?[ge]:[],...Array.isArray(ve)?ve:ve?[ve]:[]];return P(Ee)(xe)}}function P(ce){return Y=ce,X=0,ce.length===0?U:T(ce[X])}function T(ce){return me;function me(xe){return j=B(),q=ce,ce.partial||(h.currentConstruct=ce),ce.name&&h.parser.constructs.disable.null.includes(ce.name)?te():ce.tokenize.call(V?Object.assign(Object.create(h),V):h,p,W,te)(xe)}}function W(ce){return $(q,j),Z}function te(ce){return j.restore(),++X<Y.length?T(Y[X]):U}}}function z($,V){$.resolveAll&&!u.includes($)&&u.push($),$.resolve&&En(h.events,V,h.events.length-V,$.resolve(h.events.slice(V),h)),$.resolveTo&&(h.events=$.resolveTo(h.events,h))}function B(){const $=v(),V=h.previous,J=h.currentConstruct,I=h.events.length,Z=Array.from(f);return{from:I,restore:U};function U(){l=$,h.previous=V,h.currentConstruct=J,h.events.length=I,f=Z,M()}}function M(){l.line in o&&l.column<2&&(l.column=o[l.line],l.offset+=o[l.line]-1)}}function WA(e,r){const i=r.start._index,l=r.start._bufferIndex,o=r.end._index,u=r.end._bufferIndex;let c;if(i===o)c=[e[i].slice(l,u)];else{if(c=e.slice(i,o),l>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(l):c.shift()}u>0&&c.push(e[o].slice(0,u))}return c}function eT(e,r){let i=-1;const l=[];let o;for(;++i<e.length;){const u=e[i];let c;if(typeof u=="string")c=u;else switch(u){case-5:{c="\r";break}case-4:{c=`
|
|
31
|
-
`;break}case-3:{c=`\r
|
|
32
|
-
`;break}case-2:{c=r?" ":" ";break}case-1:{if(!r&&o)continue;c=" ";break}default:c=String.fromCharCode(u)}o=u===-2,l.push(c)}return l.join("")}function tT(e){const l={constructs:_0([QA,...(e||{}).extensions||[]]),content:o(gN),defined:[],document:o(yN),flow:o(zA),lazy:{},string:o(BA),text:o(UA)};return l;function o(u){return c;function c(f){return JA(l,u,f)}}}function nT(e){for(;!z0(e););return e}const dx=/[\0\t\n\r]/g;function rT(){let e=1,r="",i=!0,l;return o;function o(u,c,f){const p=[];let h,b,g,w,x;for(u=r+(typeof u=="string"?u.toString():new TextDecoder(c||void 0).decode(u)),g=0,r="",i&&(u.charCodeAt(0)===65279&&g++,i=void 0);g<u.length;){if(dx.lastIndex=g,h=dx.exec(u),w=h&&h.index!==void 0?h.index:u.length,x=u.charCodeAt(w),!h){r=u.slice(g);break}if(x===10&&g===w&&l)p.push(-3),l=void 0;else switch(l&&(p.push(-5),l=void 0),g<w&&(p.push(u.slice(g,w)),e+=w-g),x){case 0:{p.push(65533),e++;break}case 9:{for(b=Math.ceil(e/4)*4,p.push(-2);e++<b;)p.push(-1);break}case 10:{p.push(-4),e=1;break}default:l=!0,e=1}g=w+1}return f&&(l&&p.push(-5),r&&p.push(r),p.push(null)),p}}const iT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function lT(e){return e.replace(iT,aT)}function aT(e,r,i){if(r)return r;if(i.charCodeAt(0)===35){const o=i.charCodeAt(1),u=o===120||o===88;return L0(i.slice(u?2:1),u?16:10)}return qh(i)||e}const q0={}.hasOwnProperty;function oT(e,r,i){return typeof r!="string"&&(i=r,r=void 0),sT(i)(nT(tT(i).document().write(rT()(e,r,!0))))}function sT(e){const r={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(at),autolinkProtocol:B,autolinkEmail:B,atxHeading:u(Re),blockQuote:u(ve),characterEscape:B,characterReference:B,codeFenced:u(Ee),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:u(Ee,c),codeText:u(de,c),codeTextData:B,data:B,codeFlowValue:B,definition:u(ye),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:u(we),hardBreakEscape:u(Ye),hardBreakTrailing:u(Ye),htmlFlow:u(Ie,c),htmlFlowData:B,htmlText:u(Ie,c),htmlTextData:B,image:u(It),label:c,link:u(at),listItem:u(Bt),listItemValue:w,listOrdered:u(pt,g),listUnordered:u(pt),paragraph:u(Jt),reference:T,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:u(Re),strong:u(Ut),thematicBreak:u(tr)},exit:{atxHeading:p(),atxHeadingSequence:H,autolink:p(),autolinkEmail:ge,autolinkProtocol:xe,blockQuote:p(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:te,characterReferenceMarkerNumeric:te,characterReferenceValue:ce,characterReference:me,codeFenced:p(C),codeFencedFence:S,codeFencedFenceInfo:x,codeFencedFenceMeta:v,codeFlowValue:M,codeIndented:p(N),codeText:p(Z),codeTextData:M,data:M,definition:p(),definitionDestinationString:O,definitionLabelString:E,definitionTitleString:R,emphasis:p(),hardBreakEscape:p(V),hardBreakTrailing:p(V),htmlFlow:p(J),htmlFlowData:M,htmlText:p(I),htmlTextData:M,image:p(Y),label:q,labelText:X,lineEnding:$,link:p(U),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:W,resourceDestinationString:j,resourceTitleString:D,resource:P,setextHeading:p(z),setextHeadingLineSequence:F,setextHeadingText:_,strong:p(),thematicBreak:p()}};P0(r,(e||{}).mdastExtensions||[]);const i={};return l;function l(oe){let pe={type:"root",children:[]};const Te={stack:[pe],tokenStack:[],config:r,enter:f,exit:h,buffer:c,resume:b,data:i},ze=[];let Xe=-1;for(;++Xe<oe.length;)if(oe[Xe][1].type==="listOrdered"||oe[Xe][1].type==="listUnordered")if(oe[Xe][0]==="enter")ze.push(Xe);else{const _t=ze.pop();Xe=o(oe,_t,Xe)}for(Xe=-1;++Xe<oe.length;){const _t=r[oe[Xe][0]];q0.call(_t,oe[Xe][1].type)&&_t[oe[Xe][1].type].call(Object.assign({sliceSerialize:oe[Xe][2].sliceSerialize},Te),oe[Xe][1])}if(Te.tokenStack.length>0){const _t=Te.tokenStack[Te.tokenStack.length-1];(_t[1]||hx).call(Te,void 0,_t[0])}for(pe.position={start:ni(oe.length>0?oe[0][1].start:{line:1,column:1,offset:0}),end:ni(oe.length>0?oe[oe.length-2][1].end:{line:1,column:1,offset:0})},Xe=-1;++Xe<r.transforms.length;)pe=r.transforms[Xe](pe)||pe;return pe}function o(oe,pe,Te){let ze=pe-1,Xe=-1,_t=!1,fn,Lt,bt,Dt;for(;++ze<=Te;){const We=oe[ze];switch(We[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{We[0]==="enter"?Xe++:Xe--,Dt=void 0;break}case"lineEndingBlank":{We[0]==="enter"&&(fn&&!Dt&&!Xe&&!bt&&(bt=ze),Dt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Dt=void 0}if(!Xe&&We[0]==="enter"&&We[1].type==="listItemPrefix"||Xe===-1&&We[0]==="exit"&&(We[1].type==="listUnordered"||We[1].type==="listOrdered")){if(fn){let $n=ze;for(Lt=void 0;$n--;){const dn=oe[$n];if(dn[1].type==="lineEnding"||dn[1].type==="lineEndingBlank"){if(dn[0]==="exit")continue;Lt&&(oe[Lt][1].type="lineEndingBlank",_t=!0),dn[1].type="lineEnding",Lt=$n}else if(!(dn[1].type==="linePrefix"||dn[1].type==="blockQuotePrefix"||dn[1].type==="blockQuotePrefixWhitespace"||dn[1].type==="blockQuoteMarker"||dn[1].type==="listItemIndent"))break}bt&&(!Lt||bt<Lt)&&(fn._spread=!0),fn.end=Object.assign({},Lt?oe[Lt][1].start:We[1].end),oe.splice(Lt||ze,0,["exit",fn,We[2]]),ze++,Te++}if(We[1].type==="listItemPrefix"){const $n={type:"listItem",_spread:!1,start:Object.assign({},We[1].start),end:void 0};fn=$n,oe.splice(ze,0,["enter",$n,We[2]]),ze++,Te++,bt=void 0,Dt=!0}}}return oe[pe][1]._spread=_t,Te}function u(oe,pe){return Te;function Te(ze){f.call(this,oe(ze),ze),pe&&pe.call(this,ze)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(oe,pe,Te){this.stack[this.stack.length-1].children.push(oe),this.stack.push(oe),this.tokenStack.push([pe,Te||void 0]),oe.position={start:ni(pe.start),end:void 0}}function p(oe){return pe;function pe(Te){oe&&oe.call(this,Te),h.call(this,Te)}}function h(oe,pe){const Te=this.stack.pop(),ze=this.tokenStack.pop();if(ze)ze[0].type!==oe.type&&(pe?pe.call(this,oe,ze[0]):(ze[1]||hx).call(this,oe,ze[0]));else throw new Error("Cannot close `"+oe.type+"` ("+Pa({start:oe.start,end:oe.end})+"): it’s not open");Te.position.end=ni(oe.end)}function b(){return Hh(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function w(oe){if(this.data.expectingFirstListItemValue){const pe=this.stack[this.stack.length-2];pe.start=Number.parseInt(this.sliceSerialize(oe),10),this.data.expectingFirstListItemValue=void 0}}function x(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.lang=oe}function v(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.meta=oe}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.value=oe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function N(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.value=oe.replace(/(\r?\n|\r)$/g,"")}function E(oe){const pe=this.resume(),Te=this.stack[this.stack.length-1];Te.label=pe,Te.identifier=Pn(this.sliceSerialize(oe)).toLowerCase()}function R(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.title=oe}function O(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.url=oe}function H(oe){const pe=this.stack[this.stack.length-1];if(!pe.depth){const Te=this.sliceSerialize(oe).length;pe.depth=Te}}function _(){this.data.setextHeadingSlurpLineEnding=!0}function F(oe){const pe=this.stack[this.stack.length-1];pe.depth=this.sliceSerialize(oe).codePointAt(0)===61?1:2}function z(){this.data.setextHeadingSlurpLineEnding=void 0}function B(oe){const Te=this.stack[this.stack.length-1].children;let ze=Te[Te.length-1];(!ze||ze.type!=="text")&&(ze=Fe(),ze.position={start:ni(oe.start),end:void 0},Te.push(ze)),this.stack.push(ze)}function M(oe){const pe=this.stack.pop();pe.value+=this.sliceSerialize(oe),pe.position.end=ni(oe.end)}function $(oe){const pe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Te=pe.children[pe.children.length-1];Te.position.end=ni(oe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&r.canContainEols.includes(pe.type)&&(B.call(this,oe),M.call(this,oe))}function V(){this.data.atHardBreak=!0}function J(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.value=oe}function I(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.value=oe}function Z(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.value=oe}function U(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const pe=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=pe,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function Y(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const pe=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=pe,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function X(oe){const pe=this.sliceSerialize(oe),Te=this.stack[this.stack.length-2];Te.label=lT(pe),Te.identifier=Pn(pe).toLowerCase()}function q(){const oe=this.stack[this.stack.length-1],pe=this.resume(),Te=this.stack[this.stack.length-1];if(this.data.inReference=!0,Te.type==="link"){const ze=oe.children;Te.children=ze}else Te.alt=pe}function j(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.url=oe}function D(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.title=oe}function P(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function W(oe){const pe=this.resume(),Te=this.stack[this.stack.length-1];Te.label=pe,Te.identifier=Pn(this.sliceSerialize(oe)).toLowerCase(),this.data.referenceType="full"}function te(oe){this.data.characterReferenceType=oe.type}function ce(oe){const pe=this.sliceSerialize(oe),Te=this.data.characterReferenceType;let ze;Te?(ze=L0(pe,Te==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ze=qh(pe);const Xe=this.stack[this.stack.length-1];Xe.value+=ze}function me(oe){const pe=this.stack.pop();pe.position.end=ni(oe.end)}function xe(oe){M.call(this,oe);const pe=this.stack[this.stack.length-1];pe.url=this.sliceSerialize(oe)}function ge(oe){M.call(this,oe);const pe=this.stack[this.stack.length-1];pe.url="mailto:"+this.sliceSerialize(oe)}function ve(){return{type:"blockquote",children:[]}}function Ee(){return{type:"code",lang:null,meta:null,value:""}}function de(){return{type:"inlineCode",value:""}}function ye(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function we(){return{type:"emphasis",children:[]}}function Re(){return{type:"heading",depth:0,children:[]}}function Ye(){return{type:"break"}}function Ie(){return{type:"html",value:""}}function It(){return{type:"image",title:null,url:"",alt:null}}function at(){return{type:"link",title:null,url:"",children:[]}}function pt(oe){return{type:"list",ordered:oe.type==="listOrdered",start:null,spread:oe._spread,children:[]}}function Bt(oe){return{type:"listItem",spread:oe._spread,checked:null,children:[]}}function Jt(){return{type:"paragraph",children:[]}}function Ut(){return{type:"strong",children:[]}}function Fe(){return{type:"text",value:""}}function tr(){return{type:"thematicBreak"}}}function ni(e){return{line:e.line,column:e.column,offset:e.offset}}function P0(e,r){let i=-1;for(;++i<r.length;){const l=r[i];Array.isArray(l)?P0(e,l):uT(e,l)}}function uT(e,r){let i;for(i in r)if(q0.call(r,i))switch(i){case"canContainEols":{const l=r[i];l&&e[i].push(...l);break}case"transforms":{const l=r[i];l&&e[i].push(...l);break}case"enter":case"exit":{const l=r[i];l&&Object.assign(e[i],l);break}}}function hx(e,r){throw e?new Error("Cannot close `"+e.type+"` ("+Pa({start:e.start,end:e.end})+"): a different token (`"+r.type+"`, "+Pa({start:r.start,end:r.end})+") is open"):new Error("Cannot close document, a token (`"+r.type+"`, "+Pa({start:r.start,end:r.end})+") is still open")}function cT(e){const r=this;r.parser=i;function i(l){return oT(l,{...r.data("settings"),...e,extensions:r.data("micromarkExtensions")||[],mdastExtensions:r.data("fromMarkdownExtensions")||[]})}}function fT(e,r){const i={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(r),!0)};return e.patch(r,i),e.applyData(r,i)}function dT(e,r){const i={type:"element",tagName:"br",properties:{},children:[]};return e.patch(r,i),[e.applyData(r,i),{type:"text",value:`
|
|
33
|
-
`}]}function hT(e,r){const i=r.value?r.value+`
|
|
34
|
-
`:"",l={},o=r.lang?r.lang.split(/\s+/):[];o.length>0&&(l.className=["language-"+o[0]]);let u={type:"element",tagName:"code",properties:l,children:[{type:"text",value:i}]};return r.meta&&(u.data={meta:r.meta}),e.patch(r,u),u=e.applyData(r,u),u={type:"element",tagName:"pre",properties:{},children:[u]},e.patch(r,u),u}function pT(e,r){const i={type:"element",tagName:"del",properties:{},children:e.all(r)};return e.patch(r,i),e.applyData(r,i)}function mT(e,r){const i={type:"element",tagName:"em",properties:{},children:e.all(r)};return e.patch(r,i),e.applyData(r,i)}function gT(e,r){const i=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",l=String(r.identifier).toUpperCase(),o=Hl(l.toLowerCase()),u=e.footnoteOrder.indexOf(l);let c,f=e.footnoteCounts.get(l);f===void 0?(f=0,e.footnoteOrder.push(l),c=e.footnoteOrder.length):c=u+1,f+=1,e.footnoteCounts.set(l,f);const p={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+o,id:i+"fnref-"+o+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(r,p);const h={type:"element",tagName:"sup",properties:{},children:[p]};return e.patch(r,h),e.applyData(r,h)}function bT(e,r){const i={type:"element",tagName:"h"+r.depth,properties:{},children:e.all(r)};return e.patch(r,i),e.applyData(r,i)}function yT(e,r){if(e.options.allowDangerousHtml){const i={type:"raw",value:r.value};return e.patch(r,i),e.applyData(r,i)}}function $0(e,r){const i=r.referenceType;let l="]";if(i==="collapsed"?l+="[]":i==="full"&&(l+="["+(r.label||r.identifier)+"]"),r.type==="imageReference")return[{type:"text",value:"!["+r.alt+l}];const o=e.all(r),u=o[0];u&&u.type==="text"?u.value="["+u.value:o.unshift({type:"text",value:"["});const c=o[o.length-1];return c&&c.type==="text"?c.value+=l:o.push({type:"text",value:l}),o}function xT(e,r){const i=String(r.identifier).toUpperCase(),l=e.definitionById.get(i);if(!l)return $0(e,r);const o={src:Hl(l.url||""),alt:r.alt};l.title!==null&&l.title!==void 0&&(o.title=l.title);const u={type:"element",tagName:"img",properties:o,children:[]};return e.patch(r,u),e.applyData(r,u)}function vT(e,r){const i={src:Hl(r.url)};r.alt!==null&&r.alt!==void 0&&(i.alt=r.alt),r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(r,l),e.applyData(r,l)}function wT(e,r){const i={type:"text",value:r.value.replace(/\r?\n|\r/g," ")};e.patch(r,i);const l={type:"element",tagName:"code",properties:{},children:[i]};return e.patch(r,l),e.applyData(r,l)}function ST(e,r){const i=String(r.identifier).toUpperCase(),l=e.definitionById.get(i);if(!l)return $0(e,r);const o={href:Hl(l.url||"")};l.title!==null&&l.title!==void 0&&(o.title=l.title);const u={type:"element",tagName:"a",properties:o,children:e.all(r)};return e.patch(r,u),e.applyData(r,u)}function kT(e,r){const i={href:Hl(r.url)};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:e.all(r)};return e.patch(r,l),e.applyData(r,l)}function ET(e,r,i){const l=e.all(r),o=i?CT(i):V0(r),u={},c=[];if(typeof r.checked=="boolean"){const b=l[0];let g;b&&b.type==="element"&&b.tagName==="p"?g=b:(g={type:"element",tagName:"p",properties:{},children:[]},l.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:r.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let f=-1;for(;++f<l.length;){const b=l[f];(o||f!==0||b.type!=="element"||b.tagName!=="p")&&c.push({type:"text",value:`
|
|
35
|
-
`}),b.type==="element"&&b.tagName==="p"&&!o?c.push(...b.children):c.push(b)}const p=l[l.length-1];p&&(o||p.type!=="element"||p.tagName!=="p")&&c.push({type:"text",value:`
|
|
36
|
-
`});const h={type:"element",tagName:"li",properties:u,children:c};return e.patch(r,h),e.applyData(r,h)}function CT(e){let r=!1;if(e.type==="list"){r=e.spread||!1;const i=e.children;let l=-1;for(;!r&&++l<i.length;)r=V0(i[l])}return r}function V0(e){const r=e.spread;return r??e.children.length>1}function NT(e,r){const i={},l=e.all(r);let o=-1;for(typeof r.start=="number"&&r.start!==1&&(i.start=r.start);++o<l.length;){const c=l[o];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const u={type:"element",tagName:r.ordered?"ol":"ul",properties:i,children:e.wrap(l,!0)};return e.patch(r,u),e.applyData(r,u)}function AT(e,r){const i={type:"element",tagName:"p",properties:{},children:e.all(r)};return e.patch(r,i),e.applyData(r,i)}function TT(e,r){const i={type:"root",children:e.wrap(e.all(r))};return e.patch(r,i),e.applyData(r,i)}function jT(e,r){const i={type:"element",tagName:"strong",properties:{},children:e.all(r)};return e.patch(r,i),e.applyData(r,i)}function RT(e,r){const i=e.all(r),l=i.shift(),o=[];if(l){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([l],!0)};e.patch(r.children[0],c),o.push(c)}if(i.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(i,!0)},f=Fh(r.children[1]),p=E0(r.children[r.children.length-1]);f&&p&&(c.position={start:f,end:p}),o.push(c)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(r,u),e.applyData(r,u)}function _T(e,r,i){const l=i?i.children:void 0,u=(l?l.indexOf(r):1)===0?"th":"td",c=i&&i.type==="table"?i.align:void 0,f=c?c.length:r.children.length;let p=-1;const h=[];for(;++p<f;){const g=r.children[p],w={},x=c?c[p]:void 0;x&&(w.align=x);let v={type:"element",tagName:u,properties:w,children:[]};g&&(v.children=e.all(g),e.patch(g,v),v=e.applyData(g,v)),h.push(v)}const b={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(r,b),e.applyData(r,b)}function LT(e,r){const i={type:"element",tagName:"td",properties:{},children:e.all(r)};return e.patch(r,i),e.applyData(r,i)}const px=9,mx=32;function DT(e){const r=String(e),i=/\r?\n|\r/g;let l=i.exec(r),o=0;const u=[];for(;l;)u.push(gx(r.slice(o,l.index),o>0,!0),l[0]),o=l.index+l[0].length,l=i.exec(r);return u.push(gx(r.slice(o),o>0,!1)),u.join("")}function gx(e,r,i){let l=0,o=e.length;if(r){let u=e.codePointAt(l);for(;u===px||u===mx;)l++,u=e.codePointAt(l)}if(i){let u=e.codePointAt(o-1);for(;u===px||u===mx;)o--,u=e.codePointAt(o-1)}return o>l?e.slice(l,o):""}function OT(e,r){const i={type:"text",value:DT(String(r.value))};return e.patch(r,i),e.applyData(r,i)}function MT(e,r){const i={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(r,i),e.applyData(r,i)}const zT={blockquote:fT,break:dT,code:hT,delete:pT,emphasis:mT,footnoteReference:gT,heading:bT,html:yT,imageReference:xT,image:vT,inlineCode:wT,linkReference:ST,link:kT,listItem:ET,list:NT,paragraph:AT,root:TT,strong:jT,table:RT,tableCell:LT,tableRow:_T,text:OT,thematicBreak:MT,toml:js,yaml:js,definition:js,footnoteDefinition:js};function js(){}const G0=-1,Ou=0,Va=1,su=2,$h=3,Vh=4,Gh=5,Yh=6,Y0=7,X0=8,bx=typeof self=="object"?self:globalThis,FT=(e,r)=>{const i=(o,u)=>(e.set(u,o),o),l=o=>{if(e.has(o))return e.get(o);const[u,c]=r[o];switch(u){case Ou:case G0:return i(c,o);case Va:{const f=i([],o);for(const p of c)f.push(l(p));return f}case su:{const f=i({},o);for(const[p,h]of c)f[l(p)]=l(h);return f}case $h:return i(new Date(c),o);case Vh:{const{source:f,flags:p}=c;return i(new RegExp(f,p),o)}case Gh:{const f=i(new Map,o);for(const[p,h]of c)f.set(l(p),l(h));return f}case Yh:{const f=i(new Set,o);for(const p of c)f.add(l(p));return f}case Y0:{const{name:f,message:p}=c;return i(new bx[f](p),o)}case X0:return i(BigInt(c),o);case"BigInt":return i(Object(BigInt(c)),o);case"ArrayBuffer":return i(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return i(new DataView(f),c)}}return i(new bx[u](c),o)};return l},yx=e=>FT(new Map,e)(0),Tl="",{toString:IT}={},{keys:BT}=Object,Ia=e=>{const r=typeof e;if(r!=="object"||!e)return[Ou,r];const i=IT.call(e).slice(8,-1);switch(i){case"Array":return[Va,Tl];case"Object":return[su,Tl];case"Date":return[$h,Tl];case"RegExp":return[Vh,Tl];case"Map":return[Gh,Tl];case"Set":return[Yh,Tl];case"DataView":return[Va,i]}return i.includes("Array")?[Va,i]:i.includes("Error")?[Y0,i]:[su,i]},Rs=([e,r])=>e===Ou&&(r==="function"||r==="symbol"),UT=(e,r,i,l)=>{const o=(c,f)=>{const p=l.push(c)-1;return i.set(f,p),p},u=c=>{if(i.has(c))return i.get(c);let[f,p]=Ia(c);switch(f){case Ou:{let b=c;switch(p){case"bigint":f=X0,b=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+p);b=null;break;case"undefined":return o([G0],c)}return o([f,b],c)}case Va:{if(p){let w=c;return p==="DataView"?w=new Uint8Array(c.buffer):p==="ArrayBuffer"&&(w=new Uint8Array(c)),o([p,[...w]],c)}const b=[],g=o([f,b],c);for(const w of c)b.push(u(w));return g}case su:{if(p)switch(p){case"BigInt":return o([p,c.toString()],c);case"Boolean":case"Number":case"String":return o([p,c.valueOf()],c)}if(r&&"toJSON"in c)return u(c.toJSON());const b=[],g=o([f,b],c);for(const w of BT(c))(e||!Rs(Ia(c[w])))&&b.push([u(w),u(c[w])]);return g}case $h:return o([f,c.toISOString()],c);case Vh:{const{source:b,flags:g}=c;return o([f,{source:b,flags:g}],c)}case Gh:{const b=[],g=o([f,b],c);for(const[w,x]of c)(e||!(Rs(Ia(w))||Rs(Ia(x))))&&b.push([u(w),u(x)]);return g}case Yh:{const b=[],g=o([f,b],c);for(const w of c)(e||!Rs(Ia(w)))&&b.push(u(w));return g}}const{message:h}=c;return o([f,{name:p,message:h}],c)};return u},xx=(e,{json:r,lossy:i}={})=>{const l=[];return UT(!(r||i),!!r,new Map,l)(e),l},uu=typeof structuredClone=="function"?(e,r)=>r&&("json"in r||"lossy"in r)?yx(xx(e,r)):structuredClone(e):(e,r)=>yx(xx(e,r));function HT(e,r){const i=[{type:"text",value:"↩"}];return r>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(r)}]}),i}function qT(e,r){return"Back to reference "+(e+1)+(r>1?"-"+r:"")}function PT(e){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=e.options.footnoteBackContent||HT,l=e.options.footnoteBackLabel||qT,o=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let p=-1;for(;++p<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[p]);if(!h)continue;const b=e.all(h),g=String(h.identifier).toUpperCase(),w=Hl(g.toLowerCase());let x=0;const v=[],S=e.footnoteCounts.get(g);for(;S!==void 0&&++x<=S;){v.length>0&&v.push({type:"text",value:" "});let E=typeof i=="string"?i:i(p,x);typeof E=="string"&&(E={type:"text",value:E}),v.push({type:"element",tagName:"a",properties:{href:"#"+r+"fnref-"+w+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof l=="string"?l:l(p,x),className:["data-footnote-backref"]},children:Array.isArray(E)?E:[E]})}const C=b[b.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const E=C.children[C.children.length-1];E&&E.type==="text"?E.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...v)}else b.push(...v);const N={type:"element",tagName:"li",properties:{id:r+"fn-"+w},children:e.wrap(b,!0)};e.patch(h,N),f.push(N)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...uu(c),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
37
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
38
|
-
`}]}}const Mu=(function(e){if(e==null)return YT;if(typeof e=="function")return zu(e);if(typeof e=="object")return Array.isArray(e)?$T(e):VT(e);if(typeof e=="string")return GT(e);throw new Error("Expected function, string, or object as test")});function $T(e){const r=[];let i=-1;for(;++i<e.length;)r[i]=Mu(e[i]);return zu(l);function l(...o){let u=-1;for(;++u<r.length;)if(r[u].apply(this,o))return!0;return!1}}function VT(e){const r=e;return zu(i);function i(l){const o=l;let u;for(u in e)if(o[u]!==r[u])return!1;return!0}}function GT(e){return zu(r);function r(i){return i&&i.type===e}}function zu(e){return r;function r(i,l,o){return!!(XT(i)&&e.call(this,i,typeof l=="number"?l:void 0,o||void 0))}}function YT(){return!0}function XT(e){return e!==null&&typeof e=="object"&&"type"in e}const Z0=[],ZT=!0,rh=!1,KT="skip";function K0(e,r,i,l){let o;typeof r=="function"&&typeof i!="function"?(l=i,i=r):o=r;const u=Mu(o),c=l?-1:1;f(e,void 0,[])();function f(p,h,b){const g=p&&typeof p=="object"?p:{};if(typeof g.type=="string"){const x=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(w,"name",{value:"node ("+(p.type+(x?"<"+x+">":""))+")"})}return w;function w(){let x=Z0,v,S,C;if((!r||u(p,h,b[b.length-1]||void 0))&&(x=QT(i(p,b)),x[0]===rh))return x;if("children"in p&&p.children){const N=p;if(N.children&&x[0]!==KT)for(S=(l?N.children.length:-1)+c,C=b.concat(N);S>-1&&S<N.children.length;){const E=N.children[S];if(v=f(E,S,C)(),v[0]===rh)return v;S=typeof v[1]=="number"?v[1]:S+c}}return x}}}function QT(e){return Array.isArray(e)?e:typeof e=="number"?[ZT,e]:e==null?Z0:[e]}function Xh(e,r,i,l){let o,u,c;typeof r=="function"&&typeof i!="function"?(u=void 0,c=r,o=i):(u=r,c=i,o=l),K0(e,u,f,o);function f(p,h){const b=h[h.length-1],g=b?b.children.indexOf(p):void 0;return c(p,g,b)}}const ih={}.hasOwnProperty,JT={};function WT(e,r){const i=r||JT,l=new Map,o=new Map,u=new Map,c={...zT,...i.handlers},f={all:h,applyData:t6,definitionById:l,footnoteById:o,footnoteCounts:u,footnoteOrder:[],handlers:c,one:p,options:i,patch:e6,wrap:r6};return Xh(e,function(b){if(b.type==="definition"||b.type==="footnoteDefinition"){const g=b.type==="definition"?l:o,w=String(b.identifier).toUpperCase();g.has(w)||g.set(w,b)}}),f;function p(b,g){const w=b.type,x=f.handlers[w];if(ih.call(f.handlers,w)&&x)return x(f,b,g);if(f.options.passThrough&&f.options.passThrough.includes(w)){if("children"in b){const{children:S,...C}=b,N=uu(C);return N.children=f.all(b),N}return uu(b)}return(f.options.unknownHandler||n6)(f,b,g)}function h(b){const g=[];if("children"in b){const w=b.children;let x=-1;for(;++x<w.length;){const v=f.one(w[x],b);if(v){if(x&&w[x-1].type==="break"&&(!Array.isArray(v)&&v.type==="text"&&(v.value=vx(v.value)),!Array.isArray(v)&&v.type==="element")){const S=v.children[0];S&&S.type==="text"&&(S.value=vx(S.value))}Array.isArray(v)?g.push(...v):g.push(v)}}}return g}}function e6(e,r){e.position&&(r.position=q4(e))}function t6(e,r){let i=r;if(e&&e.data){const l=e.data.hName,o=e.data.hChildren,u=e.data.hProperties;if(typeof l=="string")if(i.type==="element")i.tagName=l;else{const c="children"in i?i.children:[i];i={type:"element",tagName:l,properties:{},children:c}}i.type==="element"&&u&&Object.assign(i.properties,uu(u)),"children"in i&&i.children&&o!==null&&o!==void 0&&(i.children=o)}return i}function n6(e,r){const i=r.data||{},l="value"in r&&!(ih.call(i,"hProperties")||ih.call(i,"hChildren"))?{type:"text",value:r.value}:{type:"element",tagName:"div",properties:{},children:e.all(r)};return e.patch(r,l),e.applyData(r,l)}function r6(e,r){const i=[];let l=-1;for(r&&i.push({type:"text",value:`
|
|
39
|
-
`});++l<e.length;)l&&i.push({type:"text",value:`
|
|
40
|
-
`}),i.push(e[l]);return r&&e.length>0&&i.push({type:"text",value:`
|
|
41
|
-
`}),i}function vx(e){let r=0,i=e.charCodeAt(r);for(;i===9||i===32;)r++,i=e.charCodeAt(r);return e.slice(r)}function wx(e,r){const i=WT(e,r),l=i.one(e,void 0),o=PT(i),u=Array.isArray(l)?{type:"root",children:l}:l||{type:"root",children:[]};return o&&u.children.push({type:"text",value:`
|
|
42
|
-
`},o),u}function i6(e,r){return e&&"run"in e?async function(i,l){const o=wx(i,{file:l,...r});await e.run(o,l)}:function(i,l){return wx(i,{file:l,...e||r})}}function Sx(e){if(e)throw e}var yd,kx;function l6(){if(kx)return yd;kx=1;var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,l=Object.getOwnPropertyDescriptor,o=function(h){return typeof Array.isArray=="function"?Array.isArray(h):r.call(h)==="[object Array]"},u=function(h){if(!h||r.call(h)!=="[object Object]")return!1;var b=e.call(h,"constructor"),g=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!b&&!g)return!1;var w;for(w in h);return typeof w>"u"||e.call(h,w)},c=function(h,b){i&&b.name==="__proto__"?i(h,b.name,{enumerable:!0,configurable:!0,value:b.newValue,writable:!0}):h[b.name]=b.newValue},f=function(h,b){if(b==="__proto__")if(e.call(h,b)){if(l)return l(h,b).value}else return;return h[b]};return yd=function p(){var h,b,g,w,x,v,S=arguments[0],C=1,N=arguments.length,E=!1;for(typeof S=="boolean"&&(E=S,S=arguments[1]||{},C=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});C<N;++C)if(h=arguments[C],h!=null)for(b in h)g=f(S,b),w=f(h,b),S!==w&&(E&&w&&(u(w)||(x=o(w)))?(x?(x=!1,v=g&&o(g)?g:[]):v=g&&u(g)?g:{},c(S,{name:b,newValue:p(E,v,w)})):typeof w<"u"&&c(S,{name:b,newValue:w}));return S},yd}var a6=l6();const xd=yu(a6);function lh(e){if(typeof e!="object"||e===null)return!1;const r=Object.getPrototypeOf(e);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function o6(){const e=[],r={run:i,use:l};return r;function i(...o){let u=-1;const c=o.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...o);function f(p,...h){const b=e[++u];let g=-1;if(p){c(p);return}for(;++g<o.length;)(h[g]===null||h[g]===void 0)&&(h[g]=o[g]);o=h,b?s6(b,f)(...h):c(null,...h)}}function l(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),r}}function s6(e,r){let i;return l;function l(...c){const f=e.length>c.length;let p;f&&c.push(o);try{p=e.apply(this,c)}catch(h){const b=h;if(f&&i)throw b;return o(b)}f||(p&&p.then&&typeof p.then=="function"?p.then(u,o):p instanceof Error?o(p):u(p))}function o(c,...f){i||(i=!0,r(c,...f))}function u(c){o(null,c)}}const Kn={basename:u6,dirname:c6,extname:f6,join:d6,sep:"/"};function u6(e,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');oo(e);let i=0,l=-1,o=e.length,u;if(r===void 0||r.length===0||r.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(u){i=o+1;break}}else l<0&&(u=!0,l=o+1);return l<0?"":e.slice(i,l)}if(r===e)return"";let c=-1,f=r.length-1;for(;o--;)if(e.codePointAt(o)===47){if(u){i=o+1;break}}else c<0&&(u=!0,c=o+1),f>-1&&(e.codePointAt(o)===r.codePointAt(f--)?f<0&&(l=o):(f=-1,l=c));return i===l?l=c:l<0&&(l=e.length),e.slice(i,l)}function c6(e){if(oo(e),e.length===0)return".";let r=-1,i=e.length,l;for(;--i;)if(e.codePointAt(i)===47){if(l){r=i;break}}else l||(l=!0);return r<0?e.codePointAt(0)===47?"/":".":r===1&&e.codePointAt(0)===47?"//":e.slice(0,r)}function f6(e){oo(e);let r=e.length,i=-1,l=0,o=-1,u=0,c;for(;r--;){const f=e.codePointAt(r);if(f===47){if(c){l=r+1;break}continue}i<0&&(c=!0,i=r+1),f===46?o<0?o=r:u!==1&&(u=1):o>-1&&(u=-1)}return o<0||i<0||u===0||u===1&&o===i-1&&o===l+1?"":e.slice(o,i)}function d6(...e){let r=-1,i;for(;++r<e.length;)oo(e[r]),e[r]&&(i=i===void 0?e[r]:i+"/"+e[r]);return i===void 0?".":h6(i)}function h6(e){oo(e);const r=e.codePointAt(0)===47;let i=p6(e,!r);return i.length===0&&!r&&(i="."),i.length>0&&e.codePointAt(e.length-1)===47&&(i+="/"),r?"/"+i:i}function p6(e,r){let i="",l=0,o=-1,u=0,c=-1,f,p;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(o===c-1||u===1))if(o!==c-1&&u===2){if(i.length<2||l!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(p=i.lastIndexOf("/"),p!==i.length-1){p<0?(i="",l=0):(i=i.slice(0,p),l=i.length-1-i.lastIndexOf("/")),o=c,u=0;continue}}else if(i.length>0){i="",l=0,o=c,u=0;continue}}r&&(i=i.length>0?i+"/..":"..",l=2)}else i.length>0?i+="/"+e.slice(o+1,c):i=e.slice(o+1,c),l=c-o-1;o=c,u=0}else f===46&&u>-1?u++:u=-1}return i}function oo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const m6={cwd:g6};function g6(){return"/"}function ah(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function b6(e){if(typeof e=="string")e=new URL(e);else if(!ah(e)){const r=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw r.code="ERR_INVALID_ARG_TYPE",r}if(e.protocol!=="file:"){const r=new TypeError("The URL must be of scheme file");throw r.code="ERR_INVALID_URL_SCHEME",r}return y6(e)}function y6(e){if(e.hostname!==""){const l=new TypeError('File URL host must be "localhost" or empty on darwin');throw l.code="ERR_INVALID_FILE_URL_HOST",l}const r=e.pathname;let i=-1;for(;++i<r.length;)if(r.codePointAt(i)===37&&r.codePointAt(i+1)===50){const l=r.codePointAt(i+2);if(l===70||l===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(r)}const vd=["history","path","basename","stem","extname","dirname"];class Q0{constructor(r){let i;r?ah(r)?i={path:r}:typeof r=="string"||x6(r)?i={value:r}:i=r:i={},this.cwd="cwd"in i?"":m6.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let l=-1;for(;++l<vd.length;){const u=vd[l];u in i&&i[u]!==void 0&&i[u]!==null&&(this[u]=u==="history"?[...i[u]]:i[u])}let o;for(o in i)vd.includes(o)||(this[o]=i[o])}get basename(){return typeof this.path=="string"?Kn.basename(this.path):void 0}set basename(r){Sd(r,"basename"),wd(r,"basename"),this.path=Kn.join(this.dirname||"",r)}get dirname(){return typeof this.path=="string"?Kn.dirname(this.path):void 0}set dirname(r){Ex(this.basename,"dirname"),this.path=Kn.join(r||"",this.basename)}get extname(){return typeof this.path=="string"?Kn.extname(this.path):void 0}set extname(r){if(wd(r,"extname"),Ex(this.dirname,"extname"),r){if(r.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(r.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Kn.join(this.dirname,this.stem+(r||""))}get path(){return this.history[this.history.length-1]}set path(r){ah(r)&&(r=b6(r)),Sd(r,"path"),this.path!==r&&this.history.push(r)}get stem(){return typeof this.path=="string"?Kn.basename(this.path,this.extname):void 0}set stem(r){Sd(r,"stem"),wd(r,"stem"),this.path=Kn.join(this.dirname||"",r+(this.extname||""))}fail(r,i,l){const o=this.message(r,i,l);throw o.fatal=!0,o}info(r,i,l){const o=this.message(r,i,l);return o.fatal=void 0,o}message(r,i,l){const o=new Yt(r,i,l);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(r){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(r||void 0).decode(this.value)}}function wd(e,r){if(e&&e.includes(Kn.sep))throw new Error("`"+r+"` cannot be a path: did not expect `"+Kn.sep+"`")}function Sd(e,r){if(!e)throw new Error("`"+r+"` cannot be empty")}function Ex(e,r){if(!e)throw new Error("Setting `"+r+"` requires `path` to be set too")}function x6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const v6=(function(e){const l=this.constructor.prototype,o=l[e],u=function(){return o.apply(u,arguments)};return Object.setPrototypeOf(u,l),u}),w6={}.hasOwnProperty;class Zh extends v6{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=o6()}copy(){const r=new Zh;let i=-1;for(;++i<this.attachers.length;){const l=this.attachers[i];r.use(...l)}return r.data(xd(!0,{},this.namespace)),r}data(r,i){return typeof r=="string"?arguments.length===2?(Cd("data",this.frozen),this.namespace[r]=i,this):w6.call(this.namespace,r)&&this.namespace[r]||void 0:r?(Cd("data",this.frozen),this.namespace=r,this):this.namespace}freeze(){if(this.frozen)return this;const r=this;for(;++this.freezeIndex<this.attachers.length;){const[i,...l]=this.attachers[this.freezeIndex];if(l[0]===!1)continue;l[0]===!0&&(l[0]=void 0);const o=i.call(r,...l);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(r){this.freeze();const i=_s(r),l=this.parser||this.Parser;return kd("parse",l),l(String(i),i)}process(r,i){const l=this;return this.freeze(),kd("process",this.parser||this.Parser),Ed("process",this.compiler||this.Compiler),i?o(void 0,i):new Promise(o);function o(u,c){const f=_s(r),p=l.parse(f);l.run(p,f,function(b,g,w){if(b||!g||!w)return h(b);const x=g,v=l.stringify(x,w);E6(v)?w.value=v:w.result=v,h(b,w)});function h(b,g){b||!g?c(b):u?u(g):i(void 0,g)}}}processSync(r){let i=!1,l;return this.freeze(),kd("processSync",this.parser||this.Parser),Ed("processSync",this.compiler||this.Compiler),this.process(r,o),Nx("processSync","process",i),l;function o(u,c){i=!0,Sx(u),l=c}}run(r,i,l){Cx(r),this.freeze();const o=this.transformers;return!l&&typeof i=="function"&&(l=i,i=void 0),l?u(void 0,l):new Promise(u);function u(c,f){const p=_s(i);o.run(r,p,h);function h(b,g,w){const x=g||r;b?f(b):c?c(x):l(void 0,x,w)}}}runSync(r,i){let l=!1,o;return this.run(r,i,u),Nx("runSync","run",l),o;function u(c,f){Sx(c),o=f,l=!0}}stringify(r,i){this.freeze();const l=_s(i),o=this.compiler||this.Compiler;return Ed("stringify",o),Cx(r),o(r,l)}use(r,...i){const l=this.attachers,o=this.namespace;if(Cd("use",this.frozen),r!=null)if(typeof r=="function")p(r,i);else if(typeof r=="object")Array.isArray(r)?f(r):c(r);else throw new TypeError("Expected usable value, not `"+r+"`");return this;function u(h){if(typeof h=="function")p(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[b,...g]=h;p(b,g)}else c(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function c(h){if(!("plugins"in h)&&!("settings"in h))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");f(h.plugins),h.settings&&(o.settings=xd(!0,o.settings,h.settings))}function f(h){let b=-1;if(h!=null)if(Array.isArray(h))for(;++b<h.length;){const g=h[b];u(g)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function p(h,b){let g=-1,w=-1;for(;++g<l.length;)if(l[g][0]===h){w=g;break}if(w===-1)l.push([h,...b]);else if(b.length>0){let[x,...v]=b;const S=l[w][1];lh(S)&&lh(x)&&(x=xd(!0,S,x)),l[w]=[h,x,...v]}}}}const S6=new Zh().freeze();function kd(e,r){if(typeof r!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ed(e,r){if(typeof r!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Cd(e,r){if(r)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Cx(e){if(!lh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Nx(e,r,i){if(!i)throw new Error("`"+e+"` finished async. Use `"+r+"` instead")}function _s(e){return k6(e)?e:new Q0(e)}function k6(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function E6(e){return typeof e=="string"||C6(e)}function C6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const N6="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ax=[],Tx={allowDangerousHtml:!0},A6=/^(https?|ircs?|mailto|xmpp)$/i,T6=[{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:"className",id:"remove-classname"},{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 Kh(e){const r=j6(e),i=R6(e);return _6(r.runSync(r.parse(i),i),e)}function j6(e){const r=e.rehypePlugins||Ax,i=e.remarkPlugins||Ax,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Tx}:Tx;return S6().use(cT).use(i).use(i6,l).use(r)}function R6(e){const r=e.children||"",i=new Q0;return typeof r=="string"&&(i.value=r),i}function _6(e,r){const i=r.allowedElements,l=r.allowElement,o=r.components,u=r.disallowedElements,c=r.skipHtml,f=r.unwrapDisallowed,p=r.urlTransform||L6;for(const b of T6)Object.hasOwn(r,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+N6+b.id,void 0);return Xh(e,h),Y4(e,{Fragment:y.Fragment,components:o,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.jsxs,passKeys:!0,passNode:!0});function h(b,g,w){if(b.type==="raw"&&w&&typeof g=="number")return c?w.children.splice(g,1):w.children[g]={type:"text",value:b.value},g;if(b.type==="element"){let x;for(x in md)if(Object.hasOwn(md,x)&&Object.hasOwn(b.properties,x)){const v=b.properties[x],S=md[x];(S===null||S.includes(b.tagName))&&(b.properties[x]=p(String(v||""),x,b))}}if(b.type==="element"){let x=i?!i.includes(b.tagName):u?u.includes(b.tagName):!1;if(!x&&l&&typeof g=="number"&&(x=!l(b,g,w)),x&&w&&typeof g=="number")return f&&b.children?w.children.splice(g,1,...b.children):w.children.splice(g,1),g}}}function L6(e){const r=e.indexOf(":"),i=e.indexOf("?"),l=e.indexOf("#"),o=e.indexOf("/");return r===-1||o!==-1&&r>o||i!==-1&&r>i||l!==-1&&r>l||A6.test(e.slice(0,r))?e:""}function jx(e,r){const i=String(e);if(typeof r!="string")throw new TypeError("Expected character");let l=0,o=i.indexOf(r);for(;o!==-1;)l++,o=i.indexOf(r,o+r.length);return l}function D6(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function O6(e,r,i){const o=Mu((i||{}).ignore||[]),u=M6(r);let c=-1;for(;++c<u.length;)K0(e,"text",f);function f(h,b){let g=-1,w;for(;++g<b.length;){const x=b[g],v=w?w.children:void 0;if(o(x,v?v.indexOf(x):void 0,w))return;w=x}if(w)return p(h,b)}function p(h,b){const g=b[b.length-1],w=u[c][0],x=u[c][1];let v=0;const C=g.children.indexOf(h);let N=!1,E=[];w.lastIndex=0;let R=w.exec(h.value);for(;R;){const O=R.index,H={index:R.index,input:R.input,stack:[...b,h]};let _=x(...R,H);if(typeof _=="string"&&(_=_.length>0?{type:"text",value:_}:void 0),_===!1?w.lastIndex=O+1:(v!==O&&E.push({type:"text",value:h.value.slice(v,O)}),Array.isArray(_)?E.push(..._):_&&E.push(_),v=O+R[0].length,N=!0),!w.global)break;R=w.exec(h.value)}return N?(v<h.value.length&&E.push({type:"text",value:h.value.slice(v)}),g.children.splice(C,1,...E)):E=[h],C+E.length}}function M6(e){const r=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const i=!e[0]||Array.isArray(e[0])?e:[e];let l=-1;for(;++l<i.length;){const o=i[l];r.push([z6(o[0]),F6(o[1])])}return r}function z6(e){return typeof e=="string"?new RegExp(D6(e),"g"):e}function F6(e){return typeof e=="function"?e:function(){return e}}const Nd="phrasing",Ad=["autolink","link","image","label"];function I6(){return{transforms:[V6],enter:{literalAutolink:U6,literalAutolinkEmail:Td,literalAutolinkHttp:Td,literalAutolinkWww:Td},exit:{literalAutolink:$6,literalAutolinkEmail:P6,literalAutolinkHttp:H6,literalAutolinkWww:q6}}}function B6(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Nd,notInConstruct:Ad},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Nd,notInConstruct:Ad},{character:":",before:"[ps]",after:"\\/",inConstruct:Nd,notInConstruct:Ad}]}}function U6(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Td(e){this.config.enter.autolinkProtocol.call(this,e)}function H6(e){this.config.exit.autolinkProtocol.call(this,e)}function q6(e){this.config.exit.data.call(this,e);const r=this.stack[this.stack.length-1];r.type,r.url="http://"+this.sliceSerialize(e)}function P6(e){this.config.exit.autolinkEmail.call(this,e)}function $6(e){this.exit(e)}function V6(e){O6(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,G6],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Y6]],{ignore:["link","linkReference"]})}function G6(e,r,i,l,o){let u="";if(!J0(o)||(/^w/i.test(r)&&(i=r+i,r="",u="http://"),!X6(i)))return!1;const c=Z6(i+l);if(!c[0])return!1;const f={type:"link",title:null,url:u+r+c[0],children:[{type:"text",value:r+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function Y6(e,r,i,l){return!J0(l,!0)||/[-\d_]$/.test(i)?!1:{type:"link",title:null,url:"mailto:"+r+"@"+i,children:[{type:"text",value:r+"@"+i}]}}function X6(e){const r=e.split(".");return!(r.length<2||r[r.length-1]&&(/_/.test(r[r.length-1])||!/[a-zA-Z\d]/.test(r[r.length-1]))||r[r.length-2]&&(/_/.test(r[r.length-2])||!/[a-zA-Z\d]/.test(r[r.length-2])))}function Z6(e){const r=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!r)return[e,void 0];e=e.slice(0,r.index);let i=r[0],l=i.indexOf(")");const o=jx(e,"(");let u=jx(e,")");for(;l!==-1&&o>u;)e+=i.slice(0,l+1),i=i.slice(l+1),l=i.indexOf(")"),u++;return[e,i]}function J0(e,r){const i=e.input.charCodeAt(e.index-1);return(e.index===0||Fi(i)||Lu(i))&&(!r||i!==47)}W0.peek=i5;function K6(){this.buffer()}function Q6(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function J6(){this.buffer()}function W6(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function e5(e){const r=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=Pn(this.sliceSerialize(e)).toLowerCase(),i.label=r}function t5(e){this.exit(e)}function n5(e){const r=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=Pn(this.sliceSerialize(e)).toLowerCase(),i.label=r}function r5(e){this.exit(e)}function i5(){return"["}function W0(e,r,i,l){const o=i.createTracker(l);let u=o.move("[^");const c=i.enter("footnoteReference"),f=i.enter("reference");return u+=o.move(i.safe(i.associationId(e),{after:"]",before:u})),f(),c(),u+=o.move("]"),u}function l5(){return{enter:{gfmFootnoteCallString:K6,gfmFootnoteCall:Q6,gfmFootnoteDefinitionLabelString:J6,gfmFootnoteDefinition:W6},exit:{gfmFootnoteCallString:e5,gfmFootnoteCall:t5,gfmFootnoteDefinitionLabelString:n5,gfmFootnoteDefinition:r5}}}function a5(e){let r=!1;return e&&e.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:i,footnoteReference:W0},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function i(l,o,u,c){const f=u.createTracker(c);let p=f.move("[^");const h=u.enter("footnoteDefinition"),b=u.enter("label");return p+=f.move(u.safe(u.associationId(l),{before:p,after:"]"})),b(),p+=f.move("]:"),l.children&&l.children.length>0&&(f.shift(4),p+=f.move((r?`
|
|
43
|
-
`:" ")+u.indentLines(u.containerFlow(l,f.current()),r?ev:o5))),h(),p}}function o5(e,r,i){return r===0?e:ev(e,r,i)}function ev(e,r,i){return(i?"":" ")+e}const s5=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];tv.peek=h5;function u5(){return{canContainEols:["delete"],enter:{strikethrough:f5},exit:{strikethrough:d5}}}function c5(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:s5}],handlers:{delete:tv}}}function f5(e){this.enter({type:"delete",children:[]},e)}function d5(e){this.exit(e)}function tv(e,r,i,l){const o=i.createTracker(l),u=i.enter("strikethrough");let c=o.move("~~");return c+=i.containerPhrasing(e,{...o.current(),before:c,after:"~"}),c+=o.move("~~"),u(),c}function h5(){return"~"}function p5(e){return e.length}function m5(e,r){const i=r||{},l=(i.align||[]).concat(),o=i.stringLength||p5,u=[],c=[],f=[],p=[];let h=0,b=-1;for(;++b<e.length;){const S=[],C=[];let N=-1;for(e[b].length>h&&(h=e[b].length);++N<e[b].length;){const E=g5(e[b][N]);if(i.alignDelimiters!==!1){const R=o(E);C[N]=R,(p[N]===void 0||R>p[N])&&(p[N]=R)}S.push(E)}c[b]=S,f[b]=C}let g=-1;if(typeof l=="object"&&"length"in l)for(;++g<h;)u[g]=Rx(l[g]);else{const S=Rx(l);for(;++g<h;)u[g]=S}g=-1;const w=[],x=[];for(;++g<h;){const S=u[g];let C="",N="";S===99?(C=":",N=":"):S===108?C=":":S===114&&(N=":");let E=i.alignDelimiters===!1?1:Math.max(1,p[g]-C.length-N.length);const R=C+"-".repeat(E)+N;i.alignDelimiters!==!1&&(E=C.length+E+N.length,E>p[g]&&(p[g]=E),x[g]=E),w[g]=R}c.splice(1,0,w),f.splice(1,0,x),b=-1;const v=[];for(;++b<c.length;){const S=c[b],C=f[b];g=-1;const N=[];for(;++g<h;){const E=S[g]||"";let R="",O="";if(i.alignDelimiters!==!1){const H=p[g]-(C[g]||0),_=u[g];_===114?R=" ".repeat(H):_===99?H%2?(R=" ".repeat(H/2+.5),O=" ".repeat(H/2-.5)):(R=" ".repeat(H/2),O=R):O=" ".repeat(H)}i.delimiterStart!==!1&&!g&&N.push("|"),i.padding!==!1&&!(i.alignDelimiters===!1&&E==="")&&(i.delimiterStart!==!1||g)&&N.push(" "),i.alignDelimiters!==!1&&N.push(R),N.push(E),i.alignDelimiters!==!1&&N.push(O),i.padding!==!1&&N.push(" "),(i.delimiterEnd!==!1||g!==h-1)&&N.push("|")}v.push(i.delimiterEnd===!1?N.join("").replace(/ +$/,""):N.join(""))}return v.join(`
|
|
44
|
-
`)}function g5(e){return e==null?"":String(e)}function Rx(e){const r=typeof e=="string"?e.codePointAt(0):0;return r===67||r===99?99:r===76||r===108?108:r===82||r===114?114:0}function b5(e,r,i,l){const o=i.enter("blockquote"),u=i.createTracker(l);u.move("> "),u.shift(2);const c=i.indentLines(i.containerFlow(e,u.current()),y5);return o(),c}function y5(e,r,i){return">"+(i?"":" ")+e}function x5(e,r){return _x(e,r.inConstruct,!0)&&!_x(e,r.notInConstruct,!1)}function _x(e,r,i){if(typeof r=="string"&&(r=[r]),!r||r.length===0)return i;let l=-1;for(;++l<r.length;)if(e.includes(r[l]))return!0;return!1}function Lx(e,r,i,l){let o=-1;for(;++o<i.unsafe.length;)if(i.unsafe[o].character===`
|
|
45
|
-
`&&x5(i.stack,i.unsafe[o]))return/[ \t]/.test(l.before)?"":" ";return`\\
|
|
46
|
-
`}function v5(e,r){const i=String(e);let l=i.indexOf(r),o=l,u=0,c=0;if(typeof r!="string")throw new TypeError("Expected substring");for(;l!==-1;)l===o?++u>c&&(c=u):u=1,o=l+r.length,l=i.indexOf(r,o);return c}function w5(e,r){return!!(r.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function S5(e){const r=e.options.fence||"`";if(r!=="`"&&r!=="~")throw new Error("Cannot serialize code with `"+r+"` for `options.fence`, expected `` ` `` or `~`");return r}function k5(e,r,i,l){const o=S5(i),u=e.value||"",c=o==="`"?"GraveAccent":"Tilde";if(w5(e,i)){const g=i.enter("codeIndented"),w=i.indentLines(u,E5);return g(),w}const f=i.createTracker(l),p=o.repeat(Math.max(v5(u,o)+1,3)),h=i.enter("codeFenced");let b=f.move(p);if(e.lang){const g=i.enter(`codeFencedLang${c}`);b+=f.move(i.safe(e.lang,{before:b,after:" ",encode:["`"],...f.current()})),g()}if(e.lang&&e.meta){const g=i.enter(`codeFencedMeta${c}`);b+=f.move(" "),b+=f.move(i.safe(e.meta,{before:b,after:`
|
|
47
|
-
`,encode:["`"],...f.current()})),g()}return b+=f.move(`
|
|
48
|
-
`),u&&(b+=f.move(u+`
|
|
49
|
-
`)),b+=f.move(p),h(),b}function E5(e,r,i){return(i?"":" ")+e}function Qh(e){const r=e.options.quote||'"';if(r!=='"'&&r!=="'")throw new Error("Cannot serialize title with `"+r+"` for `options.quote`, expected `\"`, or `'`");return r}function C5(e,r,i,l){const o=Qh(i),u=o==='"'?"Quote":"Apostrophe",c=i.enter("definition");let f=i.enter("label");const p=i.createTracker(l);let h=p.move("[");return h+=p.move(i.safe(i.associationId(e),{before:h,after:"]",...p.current()})),h+=p.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=i.enter("destinationLiteral"),h+=p.move("<"),h+=p.move(i.safe(e.url,{before:h,after:">",...p.current()})),h+=p.move(">")):(f=i.enter("destinationRaw"),h+=p.move(i.safe(e.url,{before:h,after:e.title?" ":`
|
|
50
|
-
`,...p.current()}))),f(),e.title&&(f=i.enter(`title${u}`),h+=p.move(" "+o),h+=p.move(i.safe(e.title,{before:h,after:o,...p.current()})),h+=p.move(o),f()),c(),h}function N5(e){const r=e.options.emphasis||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize emphasis with `"+r+"` for `options.emphasis`, expected `*`, or `_`");return r}function Wa(e){return"&#x"+e.toString(16).toUpperCase()+";"}function cu(e,r,i){const l=Il(e),o=Il(r);return l===void 0?o===void 0?i==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:l===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}nv.peek=A5;function nv(e,r,i,l){const o=N5(i),u=i.enter("emphasis"),c=i.createTracker(l),f=c.move(o);let p=c.move(i.containerPhrasing(e,{after:o,before:f,...c.current()}));const h=p.charCodeAt(0),b=cu(l.before.charCodeAt(l.before.length-1),h,o);b.inside&&(p=Wa(h)+p.slice(1));const g=p.charCodeAt(p.length-1),w=cu(l.after.charCodeAt(0),g,o);w.inside&&(p=p.slice(0,-1)+Wa(g));const x=c.move(o);return u(),i.attentionEncodeSurroundingInfo={after:w.outside,before:b.outside},f+p+x}function A5(e,r,i){return i.options.emphasis||"*"}function T5(e,r){let i=!1;return Xh(e,function(l){if("value"in l&&/\r?\n|\r/.test(l.value)||l.type==="break")return i=!0,rh}),!!((!e.depth||e.depth<3)&&Hh(e)&&(r.options.setext||i))}function j5(e,r,i,l){const o=Math.max(Math.min(6,e.depth||1),1),u=i.createTracker(l);if(T5(e,i)){const b=i.enter("headingSetext"),g=i.enter("phrasing"),w=i.containerPhrasing(e,{...u.current(),before:`
|
|
51
|
-
`,after:`
|
|
52
|
-
`});return g(),b(),w+`
|
|
53
|
-
`+(o===1?"=":"-").repeat(w.length-(Math.max(w.lastIndexOf("\r"),w.lastIndexOf(`
|
|
54
|
-
`))+1))}const c="#".repeat(o),f=i.enter("headingAtx"),p=i.enter("phrasing");u.move(c+" ");let h=i.containerPhrasing(e,{before:"# ",after:`
|
|
55
|
-
`,...u.current()});return/^[\t ]/.test(h)&&(h=Wa(h.charCodeAt(0))+h.slice(1)),h=h?c+" "+h:c,i.options.closeAtx&&(h+=" "+c),p(),f(),h}rv.peek=R5;function rv(e){return e.value||""}function R5(){return"<"}iv.peek=_5;function iv(e,r,i,l){const o=Qh(i),u=o==='"'?"Quote":"Apostrophe",c=i.enter("image");let f=i.enter("label");const p=i.createTracker(l);let h=p.move("![");return h+=p.move(i.safe(e.alt,{before:h,after:"]",...p.current()})),h+=p.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=i.enter("destinationLiteral"),h+=p.move("<"),h+=p.move(i.safe(e.url,{before:h,after:">",...p.current()})),h+=p.move(">")):(f=i.enter("destinationRaw"),h+=p.move(i.safe(e.url,{before:h,after:e.title?" ":")",...p.current()}))),f(),e.title&&(f=i.enter(`title${u}`),h+=p.move(" "+o),h+=p.move(i.safe(e.title,{before:h,after:o,...p.current()})),h+=p.move(o),f()),h+=p.move(")"),c(),h}function _5(){return"!"}lv.peek=L5;function lv(e,r,i,l){const o=e.referenceType,u=i.enter("imageReference");let c=i.enter("label");const f=i.createTracker(l);let p=f.move("![");const h=i.safe(e.alt,{before:p,after:"]",...f.current()});p+=f.move(h+"]["),c();const b=i.stack;i.stack=[],c=i.enter("reference");const g=i.safe(i.associationId(e),{before:p,after:"]",...f.current()});return c(),i.stack=b,u(),o==="full"||!h||h!==g?p+=f.move(g+"]"):o==="shortcut"?p=p.slice(0,-1):p+=f.move("]"),p}function L5(){return"!"}av.peek=D5;function av(e,r,i){let l=e.value||"",o="`",u=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(l);)o+="`";for(/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^`|`$/.test(l))&&(l=" "+l+" ");++u<i.unsafe.length;){const c=i.unsafe[u],f=i.compilePattern(c);let p;if(c.atBreak)for(;p=f.exec(l);){let h=p.index;l.charCodeAt(h)===10&&l.charCodeAt(h-1)===13&&h--,l=l.slice(0,h)+" "+l.slice(p.index+1)}}return o+l+o}function D5(){return"`"}function ov(e,r){const i=Hh(e);return!!(!r.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(i===e.url||"mailto:"+i===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}sv.peek=O5;function sv(e,r,i,l){const o=Qh(i),u=o==='"'?"Quote":"Apostrophe",c=i.createTracker(l);let f,p;if(ov(e,i)){const b=i.stack;i.stack=[],f=i.enter("autolink");let g=c.move("<");return g+=c.move(i.containerPhrasing(e,{before:g,after:">",...c.current()})),g+=c.move(">"),f(),i.stack=b,g}f=i.enter("link"),p=i.enter("label");let h=c.move("[");return h+=c.move(i.containerPhrasing(e,{before:h,after:"](",...c.current()})),h+=c.move("]("),p(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(p=i.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(i.safe(e.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(p=i.enter("destinationRaw"),h+=c.move(i.safe(e.url,{before:h,after:e.title?" ":")",...c.current()}))),p(),e.title&&(p=i.enter(`title${u}`),h+=c.move(" "+o),h+=c.move(i.safe(e.title,{before:h,after:o,...c.current()})),h+=c.move(o),p()),h+=c.move(")"),f(),h}function O5(e,r,i){return ov(e,i)?"<":"["}uv.peek=M5;function uv(e,r,i,l){const o=e.referenceType,u=i.enter("linkReference");let c=i.enter("label");const f=i.createTracker(l);let p=f.move("[");const h=i.containerPhrasing(e,{before:p,after:"]",...f.current()});p+=f.move(h+"]["),c();const b=i.stack;i.stack=[],c=i.enter("reference");const g=i.safe(i.associationId(e),{before:p,after:"]",...f.current()});return c(),i.stack=b,u(),o==="full"||!h||h!==g?p+=f.move(g+"]"):o==="shortcut"?p=p.slice(0,-1):p+=f.move("]"),p}function M5(){return"["}function Jh(e){const r=e.options.bullet||"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bullet`, expected `*`, `+`, or `-`");return r}function z5(e){const r=Jh(e),i=e.options.bulletOther;if(!i)return r==="*"?"-":"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(i===r)throw new Error("Expected `bullet` (`"+r+"`) and `bulletOther` (`"+i+"`) to be different");return i}function F5(e){const r=e.options.bulletOrdered||".";if(r!=="."&&r!==")")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOrdered`, expected `.` or `)`");return r}function cv(e){const r=e.options.rule||"*";if(r!=="*"&&r!=="-"&&r!=="_")throw new Error("Cannot serialize rules with `"+r+"` for `options.rule`, expected `*`, `-`, or `_`");return r}function I5(e,r,i,l){const o=i.enter("list"),u=i.bulletCurrent;let c=e.ordered?F5(i):Jh(i);const f=e.ordered?c==="."?")":".":z5(i);let p=r&&i.bulletLastUsed?c===i.bulletLastUsed:!1;if(!e.ordered){const b=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&b&&(!b.children||!b.children[0])&&i.stack[i.stack.length-1]==="list"&&i.stack[i.stack.length-2]==="listItem"&&i.stack[i.stack.length-3]==="list"&&i.stack[i.stack.length-4]==="listItem"&&i.indexStack[i.indexStack.length-1]===0&&i.indexStack[i.indexStack.length-2]===0&&i.indexStack[i.indexStack.length-3]===0&&(p=!0),cv(i)===c&&b){let g=-1;for(;++g<e.children.length;){const w=e.children[g];if(w&&w.type==="listItem"&&w.children&&w.children[0]&&w.children[0].type==="thematicBreak"){p=!0;break}}}}p&&(c=f),i.bulletCurrent=c;const h=i.containerFlow(e,l);return i.bulletLastUsed=c,i.bulletCurrent=u,o(),h}function B5(e){const r=e.options.listItemIndent||"one";if(r!=="tab"&&r!=="one"&&r!=="mixed")throw new Error("Cannot serialize items with `"+r+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return r}function U5(e,r,i,l){const o=B5(i);let u=i.bulletCurrent||Jh(i);r&&r.type==="list"&&r.ordered&&(u=(typeof r.start=="number"&&r.start>-1?r.start:1)+(i.options.incrementListMarker===!1?0:r.children.indexOf(e))+u);let c=u.length+1;(o==="tab"||o==="mixed"&&(r&&r.type==="list"&&r.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=i.createTracker(l);f.move(u+" ".repeat(c-u.length)),f.shift(c);const p=i.enter("listItem"),h=i.indentLines(i.containerFlow(e,f.current()),b);return p(),h;function b(g,w,x){return w?(x?"":" ".repeat(c))+g:(x?u:u+" ".repeat(c-u.length))+g}}function H5(e,r,i,l){const o=i.enter("paragraph"),u=i.enter("phrasing"),c=i.containerPhrasing(e,l);return u(),o(),c}const q5=Mu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function P5(e,r,i,l){return(e.children.some(function(c){return q5(c)})?i.containerPhrasing:i.containerFlow).call(i,e,l)}function $5(e){const r=e.options.strong||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize strong with `"+r+"` for `options.strong`, expected `*`, or `_`");return r}fv.peek=V5;function fv(e,r,i,l){const o=$5(i),u=i.enter("strong"),c=i.createTracker(l),f=c.move(o+o);let p=c.move(i.containerPhrasing(e,{after:o,before:f,...c.current()}));const h=p.charCodeAt(0),b=cu(l.before.charCodeAt(l.before.length-1),h,o);b.inside&&(p=Wa(h)+p.slice(1));const g=p.charCodeAt(p.length-1),w=cu(l.after.charCodeAt(0),g,o);w.inside&&(p=p.slice(0,-1)+Wa(g));const x=c.move(o+o);return u(),i.attentionEncodeSurroundingInfo={after:w.outside,before:b.outside},f+p+x}function V5(e,r,i){return i.options.strong||"*"}function G5(e,r,i,l){return i.safe(e.value,l)}function Y5(e){const r=e.options.ruleRepetition||3;if(r<3)throw new Error("Cannot serialize rules with repetition `"+r+"` for `options.ruleRepetition`, expected `3` or more");return r}function X5(e,r,i){const l=(cv(i)+(i.options.ruleSpaces?" ":"")).repeat(Y5(i));return i.options.ruleSpaces?l.slice(0,-1):l}const dv={blockquote:b5,break:Lx,code:k5,definition:C5,emphasis:nv,hardBreak:Lx,heading:j5,html:rv,image:iv,imageReference:lv,inlineCode:av,link:sv,linkReference:uv,list:I5,listItem:U5,paragraph:H5,root:P5,strong:fv,text:G5,thematicBreak:X5};function Z5(){return{enter:{table:K5,tableData:Dx,tableHeader:Dx,tableRow:J5},exit:{codeText:W5,table:Q5,tableData:jd,tableHeader:jd,tableRow:jd}}}function K5(e){const r=e._align;this.enter({type:"table",align:r.map(function(i){return i==="none"?null:i}),children:[]},e),this.data.inTable=!0}function Q5(e){this.exit(e),this.data.inTable=void 0}function J5(e){this.enter({type:"tableRow",children:[]},e)}function jd(e){this.exit(e)}function Dx(e){this.enter({type:"tableCell",children:[]},e)}function W5(e){let r=this.resume();this.data.inTable&&(r=r.replace(/\\([\\|])/g,e8));const i=this.stack[this.stack.length-1];i.type,i.value=r,this.exit(e)}function e8(e,r){return r==="|"?r:e}function t8(e){const r=e||{},i=r.tableCellPadding,l=r.tablePipeAlign,o=r.stringLength,u=i?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
56
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:w,table:c,tableCell:p,tableRow:f}};function c(x,v,S,C){return h(b(x,S,C),x.align)}function f(x,v,S,C){const N=g(x,S,C),E=h([N]);return E.slice(0,E.indexOf(`
|
|
57
|
-
`))}function p(x,v,S,C){const N=S.enter("tableCell"),E=S.enter("phrasing"),R=S.containerPhrasing(x,{...C,before:u,after:u});return E(),N(),R}function h(x,v){return m5(x,{align:v,alignDelimiters:l,padding:i,stringLength:o})}function b(x,v,S){const C=x.children;let N=-1;const E=[],R=v.enter("table");for(;++N<C.length;)E[N]=g(C[N],v,S);return R(),E}function g(x,v,S){const C=x.children;let N=-1;const E=[],R=v.enter("tableRow");for(;++N<C.length;)E[N]=p(C[N],x,v,S);return R(),E}function w(x,v,S){let C=dv.inlineCode(x,v,S);return S.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function n8(){return{exit:{taskListCheckValueChecked:Ox,taskListCheckValueUnchecked:Ox,paragraph:i8}}}function r8(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:l8}}}function Ox(e){const r=this.stack[this.stack.length-2];r.type,r.checked=e.type==="taskListCheckValueChecked"}function i8(e){const r=this.stack[this.stack.length-2];if(r&&r.type==="listItem"&&typeof r.checked=="boolean"){const i=this.stack[this.stack.length-1];i.type;const l=i.children[0];if(l&&l.type==="text"){const o=r.children;let u=-1,c;for(;++u<o.length;){const f=o[u];if(f.type==="paragraph"){c=f;break}}c===i&&(l.value=l.value.slice(1),l.value.length===0?i.children.shift():i.position&&l.position&&typeof l.position.start.offset=="number"&&(l.position.start.column++,l.position.start.offset++,i.position.start=Object.assign({},l.position.start)))}}this.exit(e)}function l8(e,r,i,l){const o=e.children[0],u=typeof e.checked=="boolean"&&o&&o.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=i.createTracker(l);u&&f.move(c);let p=dv.listItem(e,r,i,{...l,...f.current()});return u&&(p=p.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),p;function h(b){return b+c}}function a8(){return[I6(),l5(),u5(),Z5(),n8()]}function o8(e){return{extensions:[B6(),a5(e),c5(),t8(e),r8()]}}const s8={tokenize:p8,partial:!0},hv={tokenize:m8,partial:!0},pv={tokenize:g8,partial:!0},mv={tokenize:b8,partial:!0},u8={tokenize:y8,partial:!0},gv={name:"wwwAutolink",tokenize:d8,previous:yv},bv={name:"protocolAutolink",tokenize:h8,previous:xv},Ar={name:"emailAutolink",tokenize:f8,previous:vv},er={};function c8(){return{text:er}}let Li=48;for(;Li<123;)er[Li]=Ar,Li++,Li===58?Li=65:Li===91&&(Li=97);er[43]=Ar;er[45]=Ar;er[46]=Ar;er[95]=Ar;er[72]=[Ar,bv];er[104]=[Ar,bv];er[87]=[Ar,gv];er[119]=[Ar,gv];function f8(e,r,i){const l=this;let o,u;return c;function c(g){return!oh(g)||!vv.call(l,l.previous)||Wh(l.events)?i(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(g))}function f(g){return oh(g)?(e.consume(g),f):g===64?(e.consume(g),p):i(g)}function p(g){return g===46?e.check(u8,b,h)(g):g===45||g===95||Gt(g)?(u=!0,e.consume(g),p):b(g)}function h(g){return e.consume(g),o=!0,p}function b(g){return u&&o&&Kt(l.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),r(g)):i(g)}}function d8(e,r,i){const l=this;return o;function o(c){return c!==87&&c!==119||!yv.call(l,l.previous)||Wh(l.events)?i(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(s8,e.attempt(hv,e.attempt(pv,u),i),i)(c))}function u(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),r(c)}}function h8(e,r,i){const l=this;let o="",u=!1;return c;function c(g){return(g===72||g===104)&&xv.call(l,l.previous)&&!Wh(l.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(g),e.consume(g),f):i(g)}function f(g){if(Kt(g)&&o.length<5)return o+=String.fromCodePoint(g),e.consume(g),f;if(g===58){const w=o.toLowerCase();if(w==="http"||w==="https")return e.consume(g),p}return i(g)}function p(g){return g===47?(e.consume(g),u?h:(u=!0,p)):i(g)}function h(g){return g===null||ou(g)||st(g)||Fi(g)||Lu(g)?i(g):e.attempt(hv,e.attempt(pv,b),i)(g)}function b(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),r(g)}}function p8(e,r,i){let l=0;return o;function o(c){return(c===87||c===119)&&l<3?(l++,e.consume(c),o):c===46&&l===3?(e.consume(c),u):i(c)}function u(c){return c===null?i(c):r(c)}}function m8(e,r,i){let l,o,u;return c;function c(h){return h===46||h===95?e.check(mv,p,f)(h):h===null||st(h)||Fi(h)||h!==45&&Lu(h)?p(h):(u=!0,e.consume(h),c)}function f(h){return h===95?l=!0:(o=l,l=void 0),e.consume(h),c}function p(h){return o||l||!u?i(h):r(h)}}function g8(e,r){let i=0,l=0;return o;function o(c){return c===40?(i++,e.consume(c),o):c===41&&l<i?u(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(mv,r,u)(c):c===null||st(c)||Fi(c)?r(c):(e.consume(c),o)}function u(c){return c===41&&l++,e.consume(c),o}}function b8(e,r,i){return l;function l(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),l):f===38?(e.consume(f),u):f===93?(e.consume(f),o):f===60||f===null||st(f)||Fi(f)?r(f):i(f)}function o(f){return f===null||f===40||f===91||st(f)||Fi(f)?r(f):l(f)}function u(f){return Kt(f)?c(f):i(f)}function c(f){return f===59?(e.consume(f),l):Kt(f)?(e.consume(f),c):i(f)}}function y8(e,r,i){return l;function l(u){return e.consume(u),o}function o(u){return Gt(u)?i(u):r(u)}}function yv(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||st(e)}function xv(e){return!Kt(e)}function vv(e){return!(e===47||oh(e))}function oh(e){return e===43||e===45||e===46||e===95||Gt(e)}function Wh(e){let r=e.length,i=!1;for(;r--;){const l=e[r][1];if((l.type==="labelLink"||l.type==="labelImage")&&!l._balanced){i=!0;break}if(l._gfmAutolinkLiteralWalkedInto){i=!1;break}}return e.length>0&&!i&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),i}const x8={tokenize:A8,partial:!0};function v8(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:E8,continuation:{tokenize:C8},exit:N8}},text:{91:{name:"gfmFootnoteCall",tokenize:k8},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:w8,resolveTo:S8}}}}function w8(e,r,i){const l=this;let o=l.events.length;const u=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let c;for(;o--;){const p=l.events[o][1];if(p.type==="labelImage"){c=p;break}if(p.type==="gfmFootnoteCall"||p.type==="labelLink"||p.type==="label"||p.type==="image"||p.type==="link")break}return f;function f(p){if(!c||!c._balanced)return i(p);const h=Pn(l.sliceSerialize({start:c.end,end:l.now()}));return h.codePointAt(0)!==94||!u.includes(h.slice(1))?i(p):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),r(p))}}function S8(e,r){let i=e.length;for(;i--;)if(e[i][1].type==="labelImage"&&e[i][0]==="enter"){e[i][1];break}e[i+1][1].type="data",e[i+3][1].type="gfmFootnoteCallLabelMarker";const l={type:"gfmFootnoteCall",start:Object.assign({},e[i+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[i+3][1].end),end:Object.assign({},e[i+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},f=[e[i+1],e[i+2],["enter",l,r],e[i+3],e[i+4],["enter",o,r],["exit",o,r],["enter",u,r],["enter",c,r],["exit",c,r],["exit",u,r],e[e.length-2],e[e.length-1],["exit",l,r]];return e.splice(i,e.length-i+1,...f),e}function k8(e,r,i){const l=this,o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let u=0,c;return f;function f(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),p}function p(g){return g!==94?i(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(g){if(u>999||g===93&&!c||g===null||g===91||st(g))return i(g);if(g===93){e.exit("chunkString");const w=e.exit("gfmFootnoteCallString");return o.includes(Pn(l.sliceSerialize(w)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),r):i(g)}return st(g)||(c=!0),u++,e.consume(g),g===92?b:h}function b(g){return g===91||g===92||g===93?(e.consume(g),u++,h):h(g)}}function E8(e,r,i){const l=this,o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let u,c=0,f;return p;function p(v){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(v){return v===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",b):i(v)}function b(v){if(c>999||v===93&&!f||v===null||v===91||st(v))return i(v);if(v===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return u=Pn(l.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),w}return st(v)||(f=!0),c++,e.consume(v),v===92?g:b}function g(v){return v===91||v===92||v===93?(e.consume(v),c++,b):b(v)}function w(v){return v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),o.includes(u)||o.push(u),Ge(e,x,"gfmFootnoteDefinitionWhitespace")):i(v)}function x(v){return r(v)}}function C8(e,r,i){return e.check(ao,r,e.attempt(x8,r,i))}function N8(e){e.exit("gfmFootnoteDefinition")}function A8(e,r,i){const l=this;return Ge(e,o,"gfmFootnoteDefinitionIndent",5);function o(u){const c=l.events[l.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?r(u):i(u)}}function T8(e){let i=(e||{}).singleTilde;const l={name:"strikethrough",tokenize:u,resolveAll:o};return i==null&&(i=!0),{text:{126:l},insideSpan:{null:[l]},attentionMarkers:{null:[126]}};function o(c,f){let p=-1;for(;++p<c.length;)if(c[p][0]==="enter"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._close){let h=p;for(;h--;)if(c[h][0]==="exit"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._open&&c[p][1].end.offset-c[p][1].start.offset===c[h][1].end.offset-c[h][1].start.offset){c[p][1].type="strikethroughSequence",c[h][1].type="strikethroughSequence";const b={type:"strikethrough",start:Object.assign({},c[h][1].start),end:Object.assign({},c[p][1].end)},g={type:"strikethroughText",start:Object.assign({},c[h][1].end),end:Object.assign({},c[p][1].start)},w=[["enter",b,f],["enter",c[h][1],f],["exit",c[h][1],f],["enter",g,f]],x=f.parser.constructs.insideSpan.null;x&&En(w,w.length,0,Du(x,c.slice(h+1,p),f)),En(w,w.length,0,[["exit",g,f],["enter",c[p][1],f],["exit",c[p][1],f],["exit",b,f]]),En(c,h-1,p-h+3,w),p=h+w.length-2;break}}for(p=-1;++p<c.length;)c[p][1].type==="strikethroughSequenceTemporary"&&(c[p][1].type="data");return c}function u(c,f,p){const h=this.previous,b=this.events;let g=0;return w;function w(v){return h===126&&b[b.length-1][1].type!=="characterEscape"?p(v):(c.enter("strikethroughSequenceTemporary"),x(v))}function x(v){const S=Il(h);if(v===126)return g>1?p(v):(c.consume(v),g++,x);if(g<2&&!i)return p(v);const C=c.exit("strikethroughSequenceTemporary"),N=Il(v);return C._open=!N||N===2&&!!S,C._close=!S||S===2&&!!N,f(v)}}}class j8{constructor(){this.map=[]}add(r,i,l){R8(this,r,i,l)}consume(r){if(this.map.sort(function(u,c){return u[0]-c[0]}),this.map.length===0)return;let i=this.map.length;const l=[];for(;i>0;)i-=1,l.push(r.slice(this.map[i][0]+this.map[i][1]),this.map[i][2]),r.length=this.map[i][0];l.push(r.slice()),r.length=0;let o=l.pop();for(;o;){for(const u of o)r.push(u);o=l.pop()}this.map.length=0}}function R8(e,r,i,l){let o=0;if(!(i===0&&l.length===0)){for(;o<e.map.length;){if(e.map[o][0]===r){e.map[o][1]+=i,e.map[o][2].push(...l);return}o+=1}e.map.push([r,i,l])}}function _8(e,r){let i=!1;const l=[];for(;r<e.length;){const o=e[r];if(i){if(o[0]==="enter")o[1].type==="tableContent"&&l.push(e[r+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[r-1][1].type==="tableDelimiterMarker"){const u=l.length-1;l[u]=l[u]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(i=!0);r+=1}return l}function L8(){return{flow:{null:{name:"table",tokenize:D8,resolveAll:O8}}}}function D8(e,r,i){const l=this;let o=0,u=0,c;return f;function f(M){let $=l.events.length-1;for(;$>-1;){const I=l.events[$][1].type;if(I==="lineEnding"||I==="linePrefix")$--;else break}const V=$>-1?l.events[$][1].type:null,J=V==="tableHead"||V==="tableRow"?_:p;return J===_&&l.parser.lazy[l.now().line]?i(M):J(M)}function p(M){return e.enter("tableHead"),e.enter("tableRow"),h(M)}function h(M){return M===124||(c=!0,u+=1),b(M)}function b(M){return M===null?i(M):Ne(M)?u>1?(u=0,l.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),x):i(M):He(M)?Ge(e,b,"whitespace")(M):(u+=1,c&&(c=!1,o+=1),M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),c=!0,b):(e.enter("data"),g(M)))}function g(M){return M===null||M===124||st(M)?(e.exit("data"),b(M)):(e.consume(M),M===92?w:g)}function w(M){return M===92||M===124?(e.consume(M),g):g(M)}function x(M){return l.interrupt=!1,l.parser.lazy[l.now().line]?i(M):(e.enter("tableDelimiterRow"),c=!1,He(M)?Ge(e,v,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):v(M))}function v(M){return M===45||M===58?C(M):M===124?(c=!0,e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),S):H(M)}function S(M){return He(M)?Ge(e,C,"whitespace")(M):C(M)}function C(M){return M===58?(u+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),N):M===45?(u+=1,N(M)):M===null||Ne(M)?O(M):H(M)}function N(M){return M===45?(e.enter("tableDelimiterFiller"),E(M)):H(M)}function E(M){return M===45?(e.consume(M),E):M===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),R):(e.exit("tableDelimiterFiller"),R(M))}function R(M){return He(M)?Ge(e,O,"whitespace")(M):O(M)}function O(M){return M===124?v(M):M===null||Ne(M)?!c||o!==u?H(M):(e.exit("tableDelimiterRow"),e.exit("tableHead"),r(M)):H(M)}function H(M){return i(M)}function _(M){return e.enter("tableRow"),F(M)}function F(M){return M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),F):M===null||Ne(M)?(e.exit("tableRow"),r(M)):He(M)?Ge(e,F,"whitespace")(M):(e.enter("data"),z(M))}function z(M){return M===null||M===124||st(M)?(e.exit("data"),F(M)):(e.consume(M),M===92?B:z)}function B(M){return M===92||M===124?(e.consume(M),z):z(M)}}function O8(e,r){let i=-1,l=!0,o=0,u=[0,0,0,0],c=[0,0,0,0],f=!1,p=0,h,b,g;const w=new j8;for(;++i<e.length;){const x=e[i],v=x[1];x[0]==="enter"?v.type==="tableHead"?(f=!1,p!==0&&(Mx(w,r,p,h,b),b=void 0,p=0),h={type:"table",start:Object.assign({},v.start),end:Object.assign({},v.end)},w.add(i,0,[["enter",h,r]])):v.type==="tableRow"||v.type==="tableDelimiterRow"?(l=!0,g=void 0,u=[0,0,0,0],c=[0,i+1,0,0],f&&(f=!1,b={type:"tableBody",start:Object.assign({},v.start),end:Object.assign({},v.end)},w.add(i,0,[["enter",b,r]])),o=v.type==="tableDelimiterRow"?2:b?3:1):o&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")?(l=!1,c[2]===0&&(u[1]!==0&&(c[0]=c[1],g=Ls(w,r,u,o,void 0,g),u=[0,0,0,0]),c[2]=i)):v.type==="tableCellDivider"&&(l?l=!1:(u[1]!==0&&(c[0]=c[1],g=Ls(w,r,u,o,void 0,g)),u=c,c=[u[1],i,0,0])):v.type==="tableHead"?(f=!0,p=i):v.type==="tableRow"||v.type==="tableDelimiterRow"?(p=i,u[1]!==0?(c[0]=c[1],g=Ls(w,r,u,o,i,g)):c[1]!==0&&(g=Ls(w,r,c,o,i,g)),o=0):o&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")&&(c[3]=i)}for(p!==0&&Mx(w,r,p,h,b),w.consume(r.events),i=-1;++i<r.events.length;){const x=r.events[i];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=_8(r.events,i))}return e}function Ls(e,r,i,l,o,u){const c=l===1?"tableHeader":l===2?"tableDelimiter":"tableData",f="tableContent";i[0]!==0&&(u.end=Object.assign({},_l(r.events,i[0])),e.add(i[0],0,[["exit",u,r]]));const p=_l(r.events,i[1]);if(u={type:c,start:Object.assign({},p),end:Object.assign({},p)},e.add(i[1],0,[["enter",u,r]]),i[2]!==0){const h=_l(r.events,i[2]),b=_l(r.events,i[3]),g={type:f,start:Object.assign({},h),end:Object.assign({},b)};if(e.add(i[2],0,[["enter",g,r]]),l!==2){const w=r.events[i[2]],x=r.events[i[3]];if(w[1].end=Object.assign({},x[1].end),w[1].type="chunkText",w[1].contentType="text",i[3]>i[2]+1){const v=i[2]+1,S=i[3]-i[2]-1;e.add(v,S,[])}}e.add(i[3]+1,0,[["exit",g,r]])}return o!==void 0&&(u.end=Object.assign({},_l(r.events,o)),e.add(o,0,[["exit",u,r]]),u=void 0),u}function Mx(e,r,i,l,o){const u=[],c=_l(r.events,i);o&&(o.end=Object.assign({},c),u.push(["exit",o,r])),l.end=Object.assign({},c),u.push(["exit",l,r]),e.add(i+1,0,u)}function _l(e,r){const i=e[r],l=i[0]==="enter"?"start":"end";return i[1][l]}const M8={name:"tasklistCheck",tokenize:F8};function z8(){return{text:{91:M8}}}function F8(e,r,i){const l=this;return o;function o(p){return l.previous!==null||!l._gfmTasklistFirstContentOfListItem?i(p):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(p),e.exit("taskListCheckMarker"),u)}function u(p){return st(p)?(e.enter("taskListCheckValueUnchecked"),e.consume(p),e.exit("taskListCheckValueUnchecked"),c):p===88||p===120?(e.enter("taskListCheckValueChecked"),e.consume(p),e.exit("taskListCheckValueChecked"),c):i(p)}function c(p){return p===93?(e.enter("taskListCheckMarker"),e.consume(p),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):i(p)}function f(p){return Ne(p)?r(p):He(p)?e.check({tokenize:I8},r,i)(p):i(p)}}function I8(e,r,i){return Ge(e,l,"whitespace");function l(o){return o===null?i(o):r(o)}}function B8(e){return _0([c8(),v8(),T8(e),L8(),z8()])}const U8={};function ep(e){const r=this,i=e||U8,l=r.data(),o=l.micromarkExtensions||(l.micromarkExtensions=[]),u=l.fromMarkdownExtensions||(l.fromMarkdownExtensions=[]),c=l.toMarkdownExtensions||(l.toMarkdownExtensions=[]);o.push(B8(i)),u.push(a8()),c.push(o8(i))}let zx=null;const H8=()=>(zx??=Rt(()=>import("./mermaid.core-DTPtVBG7.js").then(e=>e.bF),[]),zx),q8=e=>e==="light"?"default":"dark";function P8({chart:e}){const r=A.useRef(null),i=A.useId().replace(/:/g,"-"),[l,o]=A.useState(()=>$b()),[u,c]=A.useState(null),f=q8(l);return A.useEffect(()=>{const p=document.documentElement,h=()=>{const g=$b();o(w=>w===g?w:g)};h();const b=new MutationObserver(g=>{g.some(w=>w.attributeName==="data-theme")&&h()});return b.observe(p,{attributes:!0,attributeFilter:["data-theme"]}),()=>{b.disconnect()}},[]),A.useEffect(()=>{let p=!1;const h=r.current;return(async()=>{if(h){h.innerHTML="",c(null);try{const{default:g}=await H8();g.initialize({startOnLoad:!1,securityLevel:"strict",theme:f});const{svg:w,bindFunctions:x}=await g.render(`mermaid-diagram-${i}`,e);if(p)return;h.innerHTML=w,x?.(h)}catch(g){if(p)return;h.innerHTML="",c(g instanceof Error?g.message:"Failed to render Mermaid diagram")}}})(),()=>{p=!0,h&&(h.innerHTML="")}},[e,i,f]),u?y.jsxs("div",{className:"space-y-2",children:[y.jsx("div",{className:"text-sm text-github-danger",title:u,children:"Unable to render Mermaid diagram."}),y.jsx("pre",{className:"markdown-preview-code whitespace-pre-wrap border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-sm font-mono text-github-text-primary",children:e})]}):y.jsx("div",{ref:r,"aria-label":"Mermaid diagram",className:"mermaid-diagram overflow-x-auto rounded border border-github-border bg-github-bg-secondary p-3"})}class tp{diff(r,i,l={}){let o;typeof l=="function"?(o=l,l={}):"callback"in l&&(o=l.callback);const u=this.castInput(r,l),c=this.castInput(i,l),f=this.removeEmpty(this.tokenize(u,l)),p=this.removeEmpty(this.tokenize(c,l));return this.diffWithOptionsObj(f,p,l,o)}diffWithOptionsObj(r,i,l,o){var u;const c=E=>{if(E=this.postProcess(E,l),o){setTimeout(function(){o(E)},0);return}else return E},f=i.length,p=r.length;let h=1,b=f+p;l.maxEditLength!=null&&(b=Math.min(b,l.maxEditLength));const g=(u=l.timeout)!==null&&u!==void 0?u:1/0,w=Date.now()+g,x=[{oldPos:-1,lastComponent:void 0}];let v=this.extractCommon(x[0],i,r,0,l);if(x[0].oldPos+1>=p&&v+1>=f)return c(this.buildValues(x[0].lastComponent,i,r));let S=-1/0,C=1/0;const N=()=>{for(let E=Math.max(S,-h);E<=Math.min(C,h);E+=2){let R;const O=x[E-1],H=x[E+1];O&&(x[E-1]=void 0);let _=!1;if(H){const z=H.oldPos-E;_=H&&0<=z&&z<f}const F=O&&O.oldPos+1<p;if(!_&&!F){x[E]=void 0;continue}if(!F||_&&O.oldPos<H.oldPos?R=this.addToPath(H,!0,!1,0,l):R=this.addToPath(O,!1,!0,1,l),v=this.extractCommon(R,i,r,E,l),R.oldPos+1>=p&&v+1>=f)return c(this.buildValues(R.lastComponent,i,r))||!0;x[E]=R,R.oldPos+1>=p&&(C=Math.min(C,E-1)),v+1>=f&&(S=Math.max(S,E+1))}h++};if(o)(function E(){setTimeout(function(){if(h>b||Date.now()>w)return o(void 0);N()||E()},0)})();else for(;h<=b&&Date.now()<=w;){const E=N();if(E)return E}}addToPath(r,i,l,o,u){const c=r.lastComponent;return c&&!u.oneChangePerToken&&c.added===i&&c.removed===l?{oldPos:r.oldPos+o,lastComponent:{count:c.count+1,added:i,removed:l,previousComponent:c.previousComponent}}:{oldPos:r.oldPos+o,lastComponent:{count:1,added:i,removed:l,previousComponent:c}}}extractCommon(r,i,l,o,u){const c=i.length,f=l.length;let p=r.oldPos,h=p-o,b=0;for(;h+1<c&&p+1<f&&this.equals(l[p+1],i[h+1],u);)h++,p++,b++,u.oneChangePerToken&&(r.lastComponent={count:1,previousComponent:r.lastComponent,added:!1,removed:!1});return b&&!u.oneChangePerToken&&(r.lastComponent={count:b,previousComponent:r.lastComponent,added:!1,removed:!1}),r.oldPos=p,h}equals(r,i,l){return l.comparator?l.comparator(r,i):r===i||!!l.ignoreCase&&r.toLowerCase()===i.toLowerCase()}removeEmpty(r){const i=[];for(let l=0;l<r.length;l++)r[l]&&i.push(r[l]);return i}castInput(r,i){return r}tokenize(r,i){return Array.from(r)}join(r){return r.join("")}postProcess(r,i){return r}get useLongestToken(){return!1}buildValues(r,i,l){const o=[];let u;for(;r;)o.push(r),u=r.previousComponent,delete r.previousComponent,r=u;o.reverse();const c=o.length;let f=0,p=0,h=0;for(;f<c;f++){const b=o[f];if(b.removed)b.value=this.join(l.slice(h,h+b.count)),h+=b.count;else{if(!b.added&&this.useLongestToken){let g=i.slice(p,p+b.count);g=g.map(function(w,x){const v=l[h+x];return v.length>w.length?v:w}),b.value=this.join(g)}else b.value=this.join(i.slice(p,p+b.count));p+=b.count,b.added||(h+=b.count)}}return o}}function Fx(e,r){let i;for(i=0;i<e.length&&i<r.length;i++)if(e[i]!=r[i])return e.slice(0,i);return e.slice(0,i)}function Ix(e,r){let i;if(!e||!r||e[e.length-1]!=r[r.length-1])return"";for(i=0;i<e.length&&i<r.length;i++)if(e[e.length-(i+1)]!=r[r.length-(i+1)])return e.slice(-i);return e.slice(-i)}function sh(e,r,i){if(e.slice(0,r.length)!=r)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(r)}; this is a bug`);return i+e.slice(r.length)}function uh(e,r,i){if(!r)return e+i;if(e.slice(-r.length)!=r)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(r)}; this is a bug`);return e.slice(0,-r.length)+i}function Ba(e,r){return sh(e,r,"")}function Ds(e,r){return uh(e,r,"")}function Bx(e,r){return r.slice(0,$8(e,r))}function $8(e,r){let i=0;e.length>r.length&&(i=e.length-r.length);let l=r.length;e.length<r.length&&(l=e.length);const o=Array(l);let u=0;o[0]=0;for(let c=1;c<l;c++){for(r[c]==r[u]?o[c]=o[u]:o[c]=u;u>0&&r[c]!=r[u];)u=o[u];r[c]==r[u]&&u++}u=0;for(let c=i;c<e.length;c++){for(;u>0&&e[c]!=r[u];)u=o[u];e[c]==r[u]&&u++}return u}function Ua(e){let r;for(r=e.length-1;r>=0&&e[r].match(/\s/);r--);return e.substring(r+1)}function ri(e){const r=e.match(/^\s*/);return r?r[0]:""}const fu="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",V8=new RegExp(`[${fu}]+|\\s+|[^${fu}]`,"ug");class G8 extends tp{equals(r,i,l){return l.ignoreCase&&(r=r.toLowerCase(),i=i.toLowerCase()),r.trim()===i.trim()}tokenize(r,i={}){let l;if(i.intlSegmenter){const c=i.intlSegmenter;if(c.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');l=[];for(const f of Array.from(c.segment(r))){const p=f.segment;l.length&&/\s/.test(l[l.length-1])&&/\s/.test(p)?l[l.length-1]+=p:l.push(p)}}else l=r.match(V8)||[];const o=[];let u=null;return l.forEach(c=>{/\s/.test(c)?u==null?o.push(c):o.push(o.pop()+c):u!=null&&/\s/.test(u)?o[o.length-1]==u?o.push(o.pop()+c):o.push(u+c):o.push(c),u=c}),o}join(r){return r.map((i,l)=>l==0?i:i.replace(/^\s+/,"")).join("")}postProcess(r,i){if(!r||i.oneChangePerToken)return r;let l=null,o=null,u=null;return r.forEach(c=>{c.added?o=c:c.removed?u=c:((o||u)&&Ux(l,u,o,c),l=c,o=null,u=null)}),(o||u)&&Ux(l,u,o,null),r}}const Y8=new G8;function X8(e,r,i){return Y8.diff(e,r,i)}function Ux(e,r,i,l){if(r&&i){const o=ri(r.value),u=Ua(r.value),c=ri(i.value),f=Ua(i.value);if(e){const p=Fx(o,c);e.value=uh(e.value,c,p),r.value=Ba(r.value,p),i.value=Ba(i.value,p)}if(l){const p=Ix(u,f);l.value=sh(l.value,f,p),r.value=Ds(r.value,p),i.value=Ds(i.value,p)}}else if(i){if(e){const o=ri(i.value);i.value=i.value.substring(o.length)}if(l){const o=ri(l.value);l.value=l.value.substring(o.length)}}else if(e&&l){const o=ri(l.value),u=ri(r.value),c=Ua(r.value),f=Fx(o,u);r.value=Ba(r.value,f);const p=Ix(Ba(o,f),c);r.value=Ds(r.value,p),l.value=sh(l.value,o,p),e.value=uh(e.value,o,o.slice(0,o.length-p.length))}else if(l){const o=ri(l.value),u=Ua(r.value),c=Bx(u,o);r.value=Ds(r.value,c)}else if(e){const o=Ua(e.value),u=ri(r.value),c=Bx(o,u);r.value=Ba(r.value,c)}}class Z8 extends tp{tokenize(r){const i=new RegExp(`(\\r?\\n)|[${fu}]+|[^\\S\\n\\r]+|[^${fu}]`,"ug");return r.match(i)||[]}}const K8=new Z8;function Q8(e,r,i){return K8.diff(e,r,i)}class J8 extends tp{constructor(){super(...arguments),this.tokenize=tj}equals(r,i,l){return l.ignoreWhitespace?((!l.newlineIsToken||!r.includes(`
|
|
58
|
-
`))&&(r=r.trim()),(!l.newlineIsToken||!i.includes(`
|
|
59
|
-
`))&&(i=i.trim())):l.ignoreNewlineAtEof&&!l.newlineIsToken&&(r.endsWith(`
|
|
60
|
-
`)&&(r=r.slice(0,-1)),i.endsWith(`
|
|
61
|
-
`)&&(i=i.slice(0,-1))),super.equals(r,i,l)}}const W8=new J8;function ej(e,r,i){return W8.diff(e,r,i)}function tj(e,r){r.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
62
|
-
`));const i=[],l=e.split(/(\n|\r\n)/);l[l.length-1]||l.pop();for(let o=0;o<l.length;o++){const u=l[o];o%2&&!r.newlineIsToken?i[i.length-1]+=u:i.push(u)}return i}function wv(e,r){const i=Q8(e,r),l=[],o=[];for(const u of i)u.added?o.push({value:u.value,type:"added"}):u.removed?l.push({value:u.value,type:"removed"}):(l.push({value:u.value,type:"unchanged"}),o.push({value:u.value,type:"unchanged"}));return{oldSegments:l,newSegments:o}}function Sv(e,r){if(!e.trim()||!r.trim()||e===r)return!1;const i=X8(e,r);let l=0,o=0;for(const c of i)o+=c.value.length,!c.added&&!c.removed&&(l+=c.value.length);return l/o>=.2}function kv({onSubmit:e,onCancel:r,selectedCode:i,syntaxTheme:l,filename:o}){const[u,c]=A.useState(""),[f,p]=A.useState(!1),[h,b]=A.useState("edit"),g=A.useRef(null),w=B1(u),x=w?h:"edit",v=async C=>{if(C.preventDefault(),!!u.trim()){p(!0);try{await e(u.trim()),c(""),b("edit")}catch(N){console.error("Failed to submit comment:",N)}finally{p(!1)}}},S=C=>{C.key==="Enter"&&(C.metaKey||C.ctrlKey)?v(C):C.key==="Escape"&&r()};return y.jsxs("form",{className:"m-2 mx-3 p-3 bg-github-bg-tertiary border border-yellow-600/50 rounded-md border-l-4 border-l-yellow-400",onSubmit:v,"data-empty":!u.trim(),children:[y.jsxs("div",{className:"flex items-center justify-between mb-2",children:[y.jsx("span",{className:"text-sm font-medium",style:{color:"var(--color-yellow-path-text)"},children:"Add a comment"}),w?y.jsxs("div",{className:"flex items-center border border-github-border rounded-md overflow-hidden",children:[y.jsx("button",{type:"button",onClick:()=>b("edit"),className:`text-xs px-2.5 py-1.5 ${x==="edit"?"bg-github-bg-tertiary text-github-text-primary":"bg-github-bg-secondary text-github-text-secondary"} transition-colors`,children:"Edit"}),y.jsx("button",{type:"button",onClick:()=>b("preview"),className:`text-xs px-2.5 py-1.5 border-l border-github-border ${x==="preview"?"bg-github-bg-tertiary text-github-text-primary":"bg-github-bg-secondary text-github-text-secondary"} transition-colors`,children:"Preview"})]}):y.jsx(U1,{selectedCode:i,value:u,onChange:c,textareaRef:g})]}),w&&x==="preview"?y.jsx("div",{className:"min-h-[60px] mb-2 bg-github-bg-secondary border border-github-border rounded px-3 py-2",children:y.jsx(qd,{body:u,originalCode:i,filename:o,syntaxTheme:l})}):y.jsx("textarea",{ref:g,className:"w-full min-h-[60px] mb-2 resize-y bg-github-bg-secondary border border-github-border rounded px-3 py-2 text-github-text-primary text-sm leading-6 focus:outline-none focus:border-blue-600 focus:ring-2 focus:ring-blue-600/30 focus:min-h-[80px] disabled:opacity-50",value:u,onChange:C=>c(C.target.value),onKeyDown:S,placeholder:"Leave a comment...",rows:Math.max(3,u.split(`
|
|
63
|
-
`).length),autoFocus:!0,disabled:f}),y.jsxs("div",{className:"flex gap-2 justify-end",children:[y.jsx("button",{type:"button",onClick:r,className:"text-xs px-3 py-1.5 bg-github-bg-tertiary text-github-text-primary border border-github-border rounded hover:opacity-80 transition-all disabled:opacity-50",disabled:f,children:"Cancel"}),y.jsx("button",{type:"submit",className:"text-xs px-3 py-1.5 rounded transition-all disabled:opacity-50",style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",border:"1px solid var(--color-yellow-btn-border)"},onMouseEnter:C=>{C.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",C.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:C=>{C.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",C.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},disabled:!u.trim()||f,children:f?"Submitting...":"Submit"})]})]})}const du=Qt.memo(({onMouseDown:e,onMouseUp:r,title:i="Add a comment"})=>y.jsx("button",{className:"absolute -right-2 top-1/2 -translate-y-1/2 w-7 h-7 flex items-center justify-center rounded transition-all duration-150 hover:scale-110 z-10","data-comment-button":"true",style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",border:"1px solid var(--color-yellow-btn-border)"},onMouseEnter:l=>{l.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",l.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:l=>{l.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",l.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},onMouseDown:e,onMouseUp:r,title:i,children:y.jsx(E1,{className:"w-4 h-4"})}));du.displayName="CommentButton";const hu=Qt.memo(({onClick:e,title:r="Open in editor",className:i})=>y.jsx("button",{className:`absolute -right-10 top-1/2 -translate-y-1/2 w-7 h-7 flex items-center justify-center rounded transition-all duration-150 hover:scale-110 z-10 ${i||""}`,"data-open-in-editor-button":"true",style:{backgroundColor:"var(--color-editor-btn-bg)",color:"var(--color-editor-btn-text)",border:"1px solid var(--color-editor-btn-border)"},onMouseEnter:l=>{l.currentTarget.style.backgroundColor="var(--color-editor-btn-hover-bg)",l.currentTarget.style.borderColor="var(--color-editor-btn-hover-border)"},onMouseLeave:l=>{l.currentTarget.style.backgroundColor="var(--color-editor-btn-bg)",l.currentTarget.style.borderColor="var(--color-editor-btn-border)"},onMouseDown:l=>{l.stopPropagation()},onClick:l=>{l.stopPropagation(),e(l)},title:r,children:y.jsx(lk,{className:"w-4 h-4 opacity-80"})}));hu.displayName="OpenInEditorButton";const nj=e=>{if("isExpanded"in e&&e.isExpanded)return"bg-github-bg-tertiary/80";switch(e.type){case"add":return"bg-diff-addition-bg";case"delete":return"bg-diff-deletion-bg";default:return"bg-transparent"}},Ev=Qt.memo(({line:e,index:r,lineId:i,isCurrentLine:l=!1,hoveredLineIndex:o,selectedLineStyle:u,onMouseEnter:c,onMouseLeave:f,onMouseMove:p,onCommentButtonMouseDown:h,onCommentButtonMouseUp:b,onOpenInEditor:g,syntaxTheme:w,onClick:x,filename:v,diffSegments:S})=>{const C=e.newLineNumber||e.oldLineNumber,N=o===r&&C,E=l?"keyboard-cursor":"";return y.jsxs("tr",{id:i,className:`group ${nj(e)} relative ${u} ${E} cursor-pointer`,onMouseEnter:c,onMouseLeave:f,onMouseMove:p,onClick:x,children:[y.jsx("td",{className:"w-[var(--line-number-width)] min-w-[var(--line-number-width)] max-w-[var(--line-number-width)] px-2 text-right text-github-text-muted bg-github-bg-secondary border-r border-github-border select-none align-top relative",children:e.oldLineNumber||""}),y.jsxs("td",{className:"w-[var(--line-number-width)] min-w-[var(--line-number-width)] max-w-[var(--line-number-width)] px-2 text-right text-github-text-muted bg-github-bg-secondary border-r border-github-border select-none align-top relative overflow-visible",children:[y.jsx("span",{children:e.newLineNumber||""}),N&&y.jsxs(y.Fragment,{children:[g&&y.jsx(hu,{onClick:g}),y.jsx(du,{onMouseDown:h,onMouseUp:b})]})]}),y.jsx("td",{className:"p-0 w-full relative align-top",children:y.jsx(I1,{line:e,syntaxTheme:w,filename:v,diffSegments:S})})]})});Ev.displayName="DiffLineRow";const Hx=e=>e!==void 0&&"isExpanded"in e&&e.isExpanded===!0,qx=(e,r)=>r?"bg-github-bg-tertiary/80":e?.type==="delete"?"bg-diff-deletion-bg":e?.type==="add"?"bg-diff-addition-bg":e?.type==="normal"?"bg-transparent":"bg-github-bg-secondary";function rj({chunk:e,chunkIndex:r,comments:i,showAuthorBadges:l=!1,onAddComment:o,onGeneratePrompt:u,onRemoveComment:c,onUpdateComment:f,syntaxTheme:p,cursor:h=null,fileIndex:b=0,onLineClick:g,commentTrigger:w,onCommentTriggerHandled:x,filename:v,onOpenInEditor:S}){const[C,N]=A.useState(null),[E,R]=A.useState(null),[O,H]=A.useState(!1),[_,F]=A.useState(null),[z,B]=A.useState(null);A.useEffect(()=>{if(w?.lineIndex!==void 0){const q=e.lines[w.lineIndex];if(q&&q.type!=="delete"){const j=q.newLineNumber;j&&(F({side:"new",lineNumber:j}),x?.())}}},[w,e.lines,x]),A.useEffect(()=>{if(O){const q=()=>{H(!1),N(null),R(null)};return document.addEventListener("mouseup",q),()=>{document.removeEventListener("mouseup",q)}}},[O]);const M=A.useCallback((q,j)=>{_?.side===q&&_?.lineNumber===j?F(null):F({side:q,lineNumber:j})},[_]),$=A.useCallback(()=>{F(null)},[]),V=A.useCallback(()=>{if(!_)return"";const{side:q,lineNumber:j}=_,D=e.lines;if(typeof j=="number")return D.find(T=>q==="old"?T.oldLineNumber===j:T.newLineNumber===j)?.content?.replace(/^[+-]/,"")||"";{const[P,T]=j;return D.filter(te=>{const ce=q==="old"?te.oldLineNumber:te.newLineNumber;return ce!==void 0&&ce>=P&&ce<=T}).map(te=>te.content?.replace(/^[+-]/,"")||"").join(`
|
|
64
|
-
`)}},[_,e.lines]),J=A.useCallback(async q=>{if(_!==null){const j=V();await o(_.lineNumber,q,j||void 0,_.side),F(null)}},[_,o,V]),I=(q,j)=>i.filter(D=>{const P=Array.isArray(D.line)?D.line[1]===q:D.line===q,T=!D.side||D.side===j;return P&&T}),Z=q=>q.oldLine?.type==="delete"&&q.newLine?.type==="add"?q.newLineNumber?"right":"left":q.oldLine?.type==="delete"?"left":q.newLine?.type==="add"?"right":"full",U=(q,j)=>{const D=q==="old"?j.oldLineNumber:j.newLineNumber;if(!D)return"";if(O&&C&&E&&C.side===q&&E.side===q){const P=Math.min(C.lineNumber,E.lineNumber),T=Math.max(C.lineNumber,E.lineNumber);if(D>=P&&D<=T){let W="after:bg-blue-100 after:absolute after:inset-0 after:opacity-30 after:border-l-4 after:border-blue-500 after:pointer-events-none";return D===P&&(W+=" after:border-t-2"),D===T&&(W+=" after:border-b-2"),W}}if(_&&_.side===q){const P=Array.isArray(_.lineNumber)?_.lineNumber:[_.lineNumber,_.lineNumber],T=P[0],W=P[1];if(T!==void 0&&W!==void 0&&D>=T&&D<=W)return"after:bg-diff-selected-bg after:absolute after:inset-0 after:border-l-5 after:border-l-diff-selected-border after:pointer-events-none"}return""},Y=A.useCallback(q=>{const j=[];let D=e.oldStart,P=e.newStart,T=0;for(;T<q.length;){const W=q[T];if(!W){T++;continue}if(W.type==="normal")j.push({oldLine:W,newLine:{...W},oldLineNumber:W.oldLineNumber??D,newLineNumber:W.newLineNumber??P,oldLineOriginalIndex:T,newLineOriginalIndex:T}),D++,P++,T++;else if(W.type==="delete"){let te=T+1;for(;te<q.length&&q[te]?.type==="delete";)te++;const ce=q.slice(T,te),me=T,xe=[],ge=te;for(;te<q.length&&q[te]?.type==="add";){const Ee=q[te];Ee&&xe.push(Ee),te++}const ve=Math.max(ce.length,xe.length);for(let Ee=0;Ee<ve;Ee++){const de=ce[Ee],ye=xe[Ee];let we;de&&ye&&Sv(de.content,ye.content)&&(we=wv(de.content,ye.content)),j.push({oldLine:de,newLine:ye,oldLineNumber:de?de.oldLineNumber??D+Ee:void 0,newLineNumber:ye?ye.newLineNumber??P+Ee:void 0,oldLineOriginalIndex:de?me+Ee:void 0,newLineOriginalIndex:ye?ge+Ee:void 0,wordLevelDiff:we})}D+=ce.length,P+=xe.length,T=te}else W.type==="add"&&(j.push({newLine:W,newLineNumber:W.newLineNumber??P,newLineOriginalIndex:T}),P++,T++)}return j},[e.oldStart,e.newStart]),X=A.useMemo(()=>Y(e.lines),[e.lines,Y]);return y.jsx("div",{className:"bg-github-bg-primary overflow-hidden",children:y.jsx("table",{className:"w-full table-fixed border-collapse font-mono text-sm leading-5",children:y.jsx("tbody",{children:X.map((q,j)=>{const D=q.oldLineNumber?I(q.oldLineNumber,"old"):[],P=q.newLineNumber?I(q.newLineNumber,"new"):[],T=[...D,...P],W=q.oldLineOriginalIndex??-1,te=q.newLineOriginalIndex??-1,ce=h?h.side==="left"&&W>=0?h.chunkIndex===r&&h.lineIndex===W:h.side==="right"&&te>=0?h.chunkIndex===r&&h.lineIndex===te:!1:!1,me=W>=0?`file-${b}-chunk-${r}-line-${W}-left`:void 0,xe=te>=0?`file-${b}-chunk-${r}-line-${te}-right`:void 0,ge=ce&&h?.side==="left",ve=ce&&h?.side==="right",Ee="keyboard-cursor";return y.jsxs(Qt.Fragment,{children:[y.jsxs("tr",{className:"group cursor-pointer",onClick:de=>{if(!O){const ye=de.target;if(!(ye instanceof HTMLElement))return;const we=ye.closest("td:nth-child(1)")||ye.closest("td:nth-child(2)"),Re=ye.closest("td:nth-child(3)")||ye.closest("td:nth-child(4)");we&&W>=0?g?.(b,r,W,"left"):Re&&te>=0&&g?.(b,r,te,"right")}},onMouseEnter:de=>{const ye=de.target;if(!(ye instanceof HTMLElement))return;const we=ye.closest("td:nth-child(1)")||ye.closest("td:nth-child(2)"),Re=ye.closest("td:nth-child(3)")||ye.closest("td:nth-child(4)");we&&q.oldLineNumber?B({side:"old",lineNumber:q.oldLineNumber}):Re&&q.newLineNumber&&B({side:"new",lineNumber:q.newLineNumber})},onMouseMove:de=>{const ye=de.target;if(!(ye instanceof HTMLElement))return;const we=ye.closest("td:nth-child(1)")||ye.closest("td:nth-child(2)"),Re=ye.closest("td:nth-child(3)")||ye.closest("td:nth-child(4)");we&&q.oldLineNumber?(z?.side!=="old"||z?.lineNumber!==q.oldLineNumber)&&B({side:"old",lineNumber:q.oldLineNumber}):Re&&q.newLineNumber&&(z?.side!=="new"||z?.lineNumber!==q.newLineNumber)&&B({side:"new",lineNumber:q.newLineNumber}),O&&C&&(C.side==="old"&&q.oldLineNumber?R({side:"old",lineNumber:q.oldLineNumber}):C.side==="new"&&q.newLineNumber&&R({side:"new",lineNumber:q.newLineNumber}))},onMouseLeave:()=>B(null),children:[y.jsxs("td",{id:me,className:`w-[var(--line-number-width)] min-w-[var(--line-number-width)] max-w-[var(--line-number-width)] px-2 text-right text-github-text-muted bg-github-bg-secondary border-r border-github-border select-none align-top relative overflow-visible ${ge?Ee:""}`,children:[y.jsx("span",{children:q.oldLineNumber||""}),z?.side==="old"&&z?.lineNumber===q.oldLineNumber&&y.jsxs(y.Fragment,{children:[S&&v&&q.oldLine?.type!=="delete"&&q.newLineNumber!==void 0&&y.jsx(hu,{onClick:()=>{const de=q.newLineNumber;!v||de===void 0||S(v,de)}}),y.jsx(du,{onMouseDown:de=>{de.stopPropagation(),q.oldLineNumber&&(N({side:"old",lineNumber:q.oldLineNumber}),R({side:"old",lineNumber:q.oldLineNumber}),H(!0))},onMouseUp:de=>{if(de.stopPropagation(),!q.oldLineNumber||!C){H(!1),N(null),R(null);return}const ye=E&&E.side==="old"?E.lineNumber:q.oldLineNumber;if(C.side!=="old"||C.lineNumber===ye)M("old",q.oldLineNumber);else{const we=Math.min(C.lineNumber,ye),Re=Math.max(C.lineNumber,ye);M("old",[we,Re])}H(!1),N(null),R(null)}})]})]}),y.jsx("td",{className:`w-1/2 p-0 align-top border-r border-github-border relative ${qx(q.oldLine,Hx(q.oldLine))} ${U("old",q)} ${ge?Ee:""}`,children:q.oldLine&&y.jsx("div",{className:"flex items-center relative min-h-[20px] px-3",children:q.wordLevelDiff?y.jsx(Hd,{segments:q.wordLevelDiff.oldSegments,className:"flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text"}):y.jsx(Za,{code:q.oldLine.content,className:"flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text [&_pre]:m-0 [&_pre]:p-0 [&_pre]:!bg-transparent [&_pre]:font-inherit [&_pre]:text-inherit [&_pre]:leading-inherit [&_code]:!bg-transparent [&_code]:font-inherit [&_code]:text-inherit [&_code]:leading-inherit",syntaxTheme:p,filename:v})})}),y.jsxs("td",{id:xe,className:`w-[var(--line-number-width)] min-w-[var(--line-number-width)] max-w-[var(--line-number-width)] px-2 text-right text-github-text-muted bg-github-bg-secondary border-r border-github-border select-none align-top relative overflow-visible ${ve?Ee:""}`,children:[y.jsx("span",{children:q.newLineNumber||""}),z?.side==="new"&&z?.lineNumber===q.newLineNumber&&y.jsxs(y.Fragment,{children:[S&&v&&q.newLineNumber!==void 0&&y.jsx(hu,{onClick:()=>{const de=q.newLineNumber;!v||de===void 0||S(v,de)}}),y.jsx(du,{onMouseDown:de=>{de.stopPropagation(),q.newLineNumber&&(N({side:"new",lineNumber:q.newLineNumber}),R({side:"new",lineNumber:q.newLineNumber}),H(!0))},onMouseUp:de=>{if(de.stopPropagation(),!q.newLineNumber||!C){H(!1),N(null),R(null);return}const ye=E&&E.side==="new"?E.lineNumber:q.newLineNumber;if(C.side!=="new"||C.lineNumber===ye)M("new",q.newLineNumber);else{const we=Math.min(C.lineNumber,ye),Re=Math.max(C.lineNumber,ye);M("new",[we,Re])}H(!1),N(null),R(null)}})]})]}),y.jsx("td",{className:`w-1/2 p-0 align-top relative ${qx(q.newLine,Hx(q.newLine))} ${U("new",q)} ${ve?Ee:""}`,children:q.newLine&&y.jsx("div",{className:"flex items-center relative min-h-[20px] px-3",children:q.wordLevelDiff?y.jsx(Hd,{segments:q.wordLevelDiff.newSegments,className:"flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text"}):y.jsx(Za,{code:q.newLine.content,className:"flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text [&_pre]:m-0 [&_pre]:p-0 [&_pre]:!bg-transparent [&_pre]:font-inherit [&_pre]:text-inherit [&_pre]:leading-inherit [&_code]:!bg-transparent [&_code]:font-inherit [&_code]:text-inherit [&_code]:leading-inherit",syntaxTheme:p,filename:v})})})]}),T.length>0&&y.jsx("tr",{className:"bg-github-bg-secondary",children:y.jsx("td",{colSpan:4,className:"p-0 border-t border-github-border",children:T.map(de=>{const ye=de.side||"new";let we;return ye==="old"&&q.oldLineNumber?we="left":ye==="new"&&q.newLineNumber?we="right":we=Z(q),y.jsx("div",{className:`flex ${we==="left"?"justify-start":we==="right"?"justify-end":"justify-center"}`,children:y.jsx("div",{className:`${we==="full"?"w-full":"w-1/2"}`,children:y.jsx("div",{className:"m-2 mx-3",children:y.jsx(Ch,{comment:de,showAuthorBadge:l,onGeneratePrompt:u,onRemoveComment:c,onUpdateComment:f,syntaxTheme:p})})})},de.id)})})}),_&&(_.side==="old"&&_.lineNumber===q.oldLineNumber||_.side==="new"&&_.lineNumber===q.newLineNumber||Array.isArray(_.lineNumber)&&(_.side==="new"&&_.lineNumber[1]===q.newLineNumber||_.side==="old"&&_.lineNumber[1]===q.oldLineNumber))&&y.jsx("tr",{className:"bg-github-bg-secondary",children:y.jsx("td",{colSpan:4,className:"p-0",children:y.jsx("div",{className:`flex ${_.side==="old"?"justify-start":_.side==="new"?"justify-end":"justify-center"}`,children:y.jsx("div",{className:"w-1/2",children:y.jsx(kv,{onSubmit:J,onCancel:$,selectedCode:V(),syntaxTheme:p,filename:v})})})})})]},j)})})})})}const ij=A.memo(function({chunk:r,chunkIndex:i,comments:l,showAuthorBadges:o=!1,onAddComment:u,onGeneratePrompt:c,onRemoveComment:f,onUpdateComment:p,mode:h=to,syntaxTheme:b,cursor:g=null,fileIndex:w=0,onLineClick:x,commentTrigger:v,onCommentTriggerHandled:S,filename:C,onOpenInEditor:N}){const[E,R]=A.useState(null),[O,H]=A.useState(null),[_,F]=A.useState(!1),[z,B]=A.useState(null),[M,$]=A.useState(null);A.useEffect(()=>{if(v?.lineIndex!==void 0){const j=r.lines[v.lineIndex];if(j){const D=j.newLineNumber||j.oldLineNumber,P=j.type==="delete"?"old":"new";D&&(B({side:P,lineNumber:D}),S?.())}}},[v,r.lines,S]),A.useEffect(()=>{if(_){const j=()=>{F(!1),R(null),H(null)};return document.addEventListener("mouseup",j),()=>{document.removeEventListener("mouseup",j)}}},[_]);const V=A.useCallback((j,D)=>{z?.side===j&&z?.lineNumber===D?B(null):B({side:j,lineNumber:D})},[z]),J=A.useCallback(()=>{B(null)},[]),I=A.useCallback(()=>{if(!z)return"";const{side:j,lineNumber:D}=z,P=r.lines;if(typeof D=="number")return P.find(W=>j==="old"?W.oldLineNumber===D:W.newLineNumber===D)?.content?.replace(/^[+-]/,"")||"";{const[T,W]=D;return P.filter(ce=>{const me=j==="old"?ce.oldLineNumber:ce.newLineNumber;return me!==void 0&&me>=T&&me<=W}).map(ce=>ce.content?.replace(/^[+-]/,"")||"").join(`
|
|
65
|
-
`)}},[z,r.lines]),Z=A.useCallback(async j=>{if(z!==null){const D=I();await u(z.lineNumber,j,D||void 0,z.side),B(null)}},[z,u,I]),U=(j,D)=>l.filter(P=>{const T=Array.isArray(P.line)?P.line[1]===j:P.line===j,W=!P.side||P.side===D;return T&&W}),Y=j=>{if(h==="unified")return"full";switch(j.type){case"delete":return"left";case"add":return"right";default:return"full"}},X=(j,D)=>{if(!j)return"";if(_&&E&&O){const P=Math.min(E,O),T=Math.max(E,O);if(j>=P&&j<=T){let W="after:bg-blue-100 after:absolute after:inset-0 after:opacity-30 after:border-l-4 after:border-blue-500 after:pointer-events-none";return j===P&&(W+=" after:border-t-2"),j===T&&(W+=" after:border-b-2"),W}}if(z&&z.side===D){const P=Array.isArray(z.lineNumber)?z.lineNumber[0]:z.lineNumber,T=Array.isArray(z.lineNumber)?z.lineNumber[1]:z.lineNumber;if(j>=P&&j<=T)return"after:bg-diff-selected-bg after:absolute after:inset-0 after:border-l-5 after:border-l-diff-selected-border after:pointer-events-none"}return""},q=A.useMemo(()=>{const j=new Map,D=r.lines;let P=0;for(;P<D.length;){const T=D[P];if(!T){P++;continue}if(T.type==="delete"){let W=P+1;for(;W<D.length&&D[W]?.type==="delete";)W++;const te=D.slice(P,W),ce=P,me=[];for(;W<D.length&&D[W]?.type==="add";){const ge=D[W];ge&&me.push({line:ge,index:W}),W++}const xe=Math.max(te.length,me.length);for(let ge=0;ge<xe;ge++){const ve=te[ge],Ee=me[ge];if(ve&&Ee&&Sv(ve.content,Ee.line.content)){const de=wv(ve.content,Ee.line.content);j.set(ce+ge,de.oldSegments),j.set(Ee.index,de.newSegments)}}P=W}else P++}return j},[r.lines]);return h==="split"?y.jsx(rj,{chunk:r,chunkIndex:i,comments:l,showAuthorBadges:o,onAddComment:u,onGeneratePrompt:c,onRemoveComment:f,onUpdateComment:p,onOpenInEditor:N,syntaxTheme:b,cursor:g,fileIndex:w,onLineClick:x,filename:C,commentTrigger:v,onCommentTriggerHandled:S}):y.jsx("div",{className:"bg-github-bg-primary",children:y.jsx("table",{className:"w-full table-fixed border-collapse font-mono text-sm leading-5",children:y.jsx("tbody",{children:r.lines.map((j,D)=>{const P=j.newLineNumber||j.oldLineNumber||0,T=j.type==="delete"?"old":"new",W=z?Array.isArray(z.lineNumber)?z.lineNumber[1]:z.lineNumber:null,te=j.type==="delete"?j.oldLineNumber:j.newLineNumber,ce=j.type==="delete"?"old":"new",me=te?U(te,ce):[],xe=`file-${w}-chunk-${i}-line-${D}`,ge=g&&g.chunkIndex===i&&g.lineIndex===D;return y.jsxs(Qt.Fragment,{children:[y.jsx(Ev,{line:j,index:D,lineId:xe,isCurrentLine:ge||!1,hoveredLineIndex:M,selectedLineStyle:X(j.newLineNumber||j.oldLineNumber,j.type==="delete"?"old":"new"),onMouseEnter:()=>{$(D)},onMouseLeave:()=>$(null),onMouseMove:()=>{if(_&&E){const ve=j.newLineNumber||j.oldLineNumber;ve&&H(ve)}},onCommentButtonMouseDown:ve=>{ve.stopPropagation();const Ee=j.newLineNumber||j.oldLineNumber;Ee&&(R(Ee),H(Ee),F(!0))},onCommentButtonMouseUp:ve=>{ve.stopPropagation();const Ee=j.newLineNumber||j.oldLineNumber,de=j.type==="delete"?"old":"new";if(!Ee||!E){F(!1),R(null),H(null);return}const ye=O||Ee;if(E===ye)V(de,Ee);else{const we=Math.min(E,ye),Re=Math.max(E,ye);V(de,[we,Re])}F(!1),R(null),H(null)},onOpenInEditor:N&&C&&j.type!=="delete"&&(j.newLineNumber||j.oldLineNumber)?()=>{const ve=j.newLineNumber||j.oldLineNumber;ve&&C&&N(C,ve)}:void 0,syntaxTheme:b,filename:C,diffSegments:q.get(D),onClick:()=>{const ve=j.type==="delete"?"left":"right";x?.(w,i,D,ve)}}),me.map(ve=>{const Ee=Y(j);return y.jsx("tr",{className:"bg-github-bg-secondary",children:y.jsx("td",{colSpan:3,className:"p-0 border-t border-github-border",children:y.jsx("div",{className:`flex ${Ee==="left"?"justify-start":Ee==="right"?"justify-end":"justify-center"}`,children:y.jsx("div",{className:`${Ee==="full"?"w-full":"w-1/2"} m-2 mx-4`,children:y.jsx(Ch,{comment:ve,showAuthorBadge:o,onGeneratePrompt:c,onRemoveComment:f,onUpdateComment:p,syntaxTheme:b})})})})},ve.id)}),z&&z.side===T&&W===P&&y.jsx("tr",{className:"bg-[var(--bg-secondary)]",children:y.jsx("td",{colSpan:3,className:"p-0",children:y.jsx("div",{className:`flex ${Y(j)==="left"?"justify-start":Y(j)==="right"?"justify-end":"justify-center"}`,children:y.jsx("div",{className:`${Y(j)==="full"?"w-full":"w-1/2"}`,children:y.jsx(kv,{onSubmit:Z,onCancel:J,selectedCode:I(),syntaxTheme:b,filename:C})})})})})]},D)})})})})}),Rd=20,_d=A.memo(function({direction:r,hiddenLines:i,onExpandUp:l,onExpandDown:o,onExpandAll:u,isLoading:c=!1}){if(i<=0)return null;const f=`${i} ${i===1?"line":"lines"}`,p=i<=Rd,h="grid-cols-[var(--line-number-width)_1fr]",b="flex flex-1 w-full items-center justify-center py-1 text-github-text-primary hover:bg-github-bg-secondary hover:text-github-text-muted transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed",g=[];return p?g.push({key:"all",onClick:u,ariaLabel:`Expand all ${i} hidden lines`,icon:y.jsx(Uk,{size:16,"aria-hidden":"true"})}):((r==="up"||r==="both")&&g.push({key:"up",onClick:l,ariaLabel:`Expand ${Rd} hidden lines above`,icon:y.jsx(H2,{size:12,"aria-hidden":"true",className:"translate-y-0.5"})}),(r==="down"||r==="both")&&g.push({key:"down",onClick:o,ariaLabel:`Expand ${Rd} hidden lines below`,icon:y.jsx(B2,{size:12,"aria-hidden":"true",className:"-translate-y-0.5"})})),y.jsxs("div",{className:`grid w-full border-l border-r border-github-border bg-github-bg-tertiary text-sm ${h}`,children:[y.jsx("div",{className:"flex flex-col items-stretch justify-center gap-0.5 border-r border-github-border",children:c?y.jsx(Sk,{size:14,className:"animate-spin text-github-text-muted self-center","aria-hidden":"true"}):g.map(w=>y.jsx("button",{type:"button",onClick:w.onClick,disabled:c||!w.onClick,className:b,title:w.ariaLabel,"aria-label":w.ariaLabel,children:w.icon},w.key))}),y.jsx("div",{className:"flex items-center justify-start px-3 py-1.5 font-mono text-github-text-muted select-none",children:f})]})});function pu({file:e,comments:r,showAuthorBadges:i,diffMode:l,syntaxTheme:o,cursor:u,fileIndex:c,mergedChunks:f,isExpandLoading:p,expandHiddenLines:h,expandAllBetweenChunks:b,onAddComment:g,onGeneratePrompt:w,onRemoveComment:x,onUpdateComment:v,onLineClick:S,onOpenInEditor:C,commentTrigger:N,onCommentTriggerHandled:E}){const R=(O,H,_,F)=>O==="top"&&H.hiddenLinesBefore>0?y.jsx(_d,{direction:"down",hiddenLines:H.hiddenLinesBefore,onExpandDown:()=>h(e,_,"up"),onExpandAll:()=>b(e,_,H.hiddenLinesBefore),isLoading:p}):O==="middle"&&H.hiddenLinesBefore>0?y.jsx(_d,{direction:"both",hiddenLines:H.hiddenLinesBefore,onExpandUp:()=>h(e,_-1,"down"),onExpandDown:()=>h(e,_,"up"),onExpandAll:()=>b(e,_,H.hiddenLinesBefore),isLoading:p}):O==="bottom"&&H.hiddenLinesAfter>0?y.jsx(_d,{direction:"up",hiddenLines:H.hiddenLinesAfter,onExpandUp:()=>h(e,F,"down"),onExpandAll:()=>h(e,F,"down",H.hiddenLinesAfter),isLoading:p}):null;return y.jsx(y.Fragment,{children:f.map((O,H)=>{const _=H===0,F=H===f.length-1,z=O.originalIndices[0]??0,B=O.originalIndices[O.originalIndices.length-1]??0;return y.jsxs(Qt.Fragment,{children:[_&&R("top",O,z,B),!_&&R("middle",O,z,B),y.jsx("div",{id:`chunk-${e.path.replace(/[^a-zA-Z0-9]/g,"-")}-${H}`,children:y.jsx(ij,{chunk:O,chunkIndex:H,comments:r,showAuthorBadges:i,onAddComment:g,onGeneratePrompt:w,onRemoveComment:x,onUpdateComment:v,onOpenInEditor:C,mode:l,syntaxTheme:o,cursor:u&&u.chunkIndex===H?u:null,fileIndex:c,onLineClick:S,commentTrigger:N&&N.chunkIndex===H?N:null,onCommentTriggerHandled:E,filename:e.path})}),F&&R("bottom",O,z,B)]},H)})})}const lj=e=>!!(e&&e!=="stdin"),jl=["text-[26px] font-semibold","text-[22px] font-semibold","text-xl font-semibold","text-lg font-semibold","text-base font-semibold uppercase tracking-wide","text-base font-semibold"],aj=e=>e.type==="delete"||e.type==="remove",oj=e=>e.type==="normal"||e.type==="context",mu=e=>/^(https?:|mailto:|#|\.{0,2}\/|\/)/i.test(e.trim()),ch=(e,r,i)=>{const l=e[e.length-1];if(l&&l.type===r){l.lines.push(i);return}e.push({type:r,lines:[i]})},Ld=(e,r)=>{r.forEach(i=>ch(e,"delete",i)),r.length=0},sj=e=>{const r=[],i=[];let l=!1;return e.forEach(o=>{o.lines.forEach(u=>{if(!(u.type==="header"||u.type==="hunk")){if(aj(u)){i.push(u.content);return}if(u.type==="add"){i.length>0&&(Ld(r,i),l=!0),ch(r,l?"change":"add",u.content);return}oj(u)&&(Ld(r,i),l=!1,ch(r,"context",u.content))}}),Ld(r,i),l=!1}),r},uj=e=>Qt.isValidElement(e),cj=e=>Qt.isValidElement(e),fh=e=>e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(fh).join(""):uj(e)?fh(e.props.children):"",Cv=e=>({h1:({children:r})=>y.jsx("h1",{className:`${jl[0]} mt-6 mb-2 first:mt-0`,children:r}),h2:({children:r})=>y.jsx("h2",{className:`${jl[1]} mt-6 mb-2 first:mt-0`,children:r}),h3:({children:r})=>y.jsx("h3",{className:`${jl[2]} mt-6 mb-2 first:mt-0`,children:r}),h4:({children:r})=>y.jsx("h4",{className:`${jl[3]} mt-6 mb-2 first:mt-0`,children:r}),h5:({children:r})=>y.jsx("h5",{className:`${jl[4]} mt-6 mb-2 first:mt-0`,children:r}),h6:({children:r})=>y.jsx("h6",{className:`${jl[5]} mt-6 mb-2 first:mt-0`,children:r}),p:({children:r})=>y.jsx("p",{className:"text-base leading-7",children:r}),ul:({children:r})=>y.jsx("ul",{className:"list-disc pl-6 text-base space-y-1",children:r}),ol:({children:r})=>y.jsx("ol",{className:"list-decimal pl-6 text-base space-y-1",children:r}),li:({children:r})=>y.jsx("li",{children:r}),blockquote:({children:r})=>y.jsx("blockquote",{className:"border-l-4 border-github-border pl-4 text-github-text-muted italic",children:r}),hr:()=>y.jsx("hr",{className:"border-github-border"}),a:({href:r,children:i})=>{const l=r??"";if(!l||!mu(l))return y.jsx("span",{children:i});const o=l.startsWith("http");return y.jsx("a",{href:l,target:o?"_blank":void 0,rel:o?"noreferrer":void 0,className:"text-sky-400 hover:text-sky-300 underline underline-offset-4",children:i})},img:({src:r,alt:i})=>{const l=r??"";return!l||!mu(l)?null:y.jsx("img",{src:l,alt:i??"",loading:"lazy",className:"max-w-full rounded border border-github-border"})},pre:({children:r})=>{const l=(Array.isArray(r)?r:[r]).find(cj),o=fh(l??r),c=/language-(\S+)/.exec(l?.props.className??"")?.[1],f=o.replace(/\n$/,"");return c==="mermaid"&&f.trim()?y.jsx(P8,{chart:f}):o.trim()?y.jsx("pre",{className:"markdown-preview-code border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-sm",children:y.jsx(Eh,{code:f,language:c,syntaxTheme:e,className:"font-mono text-github-text-primary"})}):y.jsx("pre",{className:"markdown-preview-code border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-sm",children:r})},code:({className:r,children:i})=>r?y.jsx("code",{className:r,children:i}):y.jsx("code",{className:"px-1 py-0.5 rounded bg-github-bg-tertiary border border-github-border text-sm font-mono",children:i})}),fj=e=>{switch(e){case"add":return"border-l-4 border-diff-addition-border";case"delete":return"border-l-4 border-diff-deletion-border";case"change":return"border-l-4 border-diff-addition-border";default:return"border-l-4 border-transparent"}},dj=e=>/^\s*\[[^\]]+\]:\s+\S+/.test(e),hj=e=>/^\s*\[\^[^\]]+\]:\s+/.test(e),pj=e=>/^\s*<!--.*-->\s*$/.test(e),mj=e=>e.trim()===""||dj(e)||hj(e)||pj(e),gj=e=>e.every(mj),bj=({blocks:e,syntaxTheme:r})=>{const i=A.useMemo(()=>Cv(r),[r]);return y.jsx("div",{className:"space-y-4",children:e.map((l,o)=>{const c=l.lines.join(`
|
|
66
|
-
`).trim();if(!c)return null;const f=gj(l.lines);return y.jsx("div",{className:`px-4 ${fj(l.type)}`,children:f?y.jsx("pre",{className:"whitespace-pre-wrap text-sm text-github-text-primary font-mono",children:c}):y.jsx(Kh,{remarkPlugins:[ep],urlTransform:p=>mu(p)?p:"",components:i,children:c})},`preview-block-${o}`)})})},yj=({content:e,syntaxTheme:r})=>{const i=A.useMemo(()=>Cv(r),[r]);return y.jsx("div",{className:"space-y-4",children:y.jsx(Kh,{remarkPlugins:[ep],urlTransform:l=>mu(l)?l:"",components:i,children:e})})};function xj(e){const{file:r,baseCommitish:i,targetCommitish:l,mergedChunks:o,syntaxTheme:u}=e,[c,f]=A.useState("diff"),[p,h]=A.useState(null),[b,g]=A.useState(!1),[w,x]=A.useState(null),[v,S]=A.useState(null),C=A.useMemo(()=>sj(o),[o]),N=A.useMemo(()=>!i&&!l?null:r.status==="added"?l?{path:r.path,ref:l}:null:r.status==="deleted"?i?{path:r.oldPath||r.path,ref:i}:null:l?{path:r.path,ref:l}:i?{path:r.oldPath||r.path,ref:i}:null,[i,l,r.path,r.oldPath,r.status]),E=A.useMemo(()=>N?`${N.ref}:${N.path}`:null,[N]);A.useEffect(()=>{if(!N||!E||!lj(N.ref)){h(null),S(null),x(null),g(!1);return}let O=!1;return(E!==v||p===null)&&(async()=>{E!==v&&h(null),g(!0),x(null);try{const _=encodeURIComponent(N.path),F=await fetch(`/api/blob/${_}?ref=${encodeURIComponent(N.ref)}`);if(!F.ok)throw new Error(`Failed to fetch preview: ${F.statusText}`);const z=await F.text();O||(h(z),S(E))}catch(_){O||(h(null),S(null),x(_ instanceof Error?_.message:"Failed to load preview"))}finally{O||g(!1)}})(),()=>{O=!0}},[p,v,N,E]);const R=A.useMemo(()=>E===v&&p!==null,[p,v,E]);return A.useEffect(()=>{c==="full-preview"&&!R&&f("diff-preview")},[R,c]),y.jsxs("div",{className:"bg-github-bg-primary",children:[y.jsx("div",{className:"flex items-center justify-between border-b border-github-border px-4 py-2",children:y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsxs("button",{onClick:()=>f("diff"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${c==="diff"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Code Diff",children:[y.jsx(xu,{size:14}),"Diff"]}),y.jsxs("button",{onClick:()=>f("diff-preview"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${c==="diff-preview"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Diff Preview",children:[y.jsx(Bs,{size:14}),"Diff Preview"]}),R&&y.jsxs("button",{onClick:()=>f("full-preview"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${c==="full-preview"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Full Preview",children:[y.jsx(Bs,{size:14}),"Full Preview"]})]})}),c==="diff"&&y.jsx(pu,{...e}),c==="diff-preview"&&y.jsx("div",{className:"p-4",children:y.jsx(bj,{blocks:C,syntaxTheme:u})}),c==="full-preview"&&y.jsxs("div",{className:"p-4",children:[b&&y.jsx("div",{className:"text-sm text-github-text-muted mb-3",children:"Loading preview..."}),w&&y.jsx("div",{className:"text-sm text-github-danger mb-3",children:w}),!b&&!w&&p!==null&&y.jsx(yj,{content:p,syntaxTheme:u}),!b&&!w&&p===null&&y.jsx("div",{className:"text-sm text-github-text-muted",children:"Preview unavailable."})]})]})}const Rl=["text-2xl font-semibold","text-xl font-semibold","text-lg font-semibold","text-base font-semibold","text-sm font-semibold uppercase tracking-wide","text-sm font-semibold"],Nv={markdown:"Markdown",code:"Code",raw:"Raw",unknown:"Cell"},vj=/"cell_type"\s*:\s*"([^"]+)"/,Px=/"source"\s*:/,wj=/"execution_count"\s*:\s*(null|[0-9]+)/,Sj=/"id"\s*:\s*"([^"]+)"/,kj=e=>e.type==="delete"||e.type==="remove",Ej=e=>e.type==="normal"||e.type==="context",Av=e=>e.type==="add"?"add":kj(e)?"delete":Ej(e)?"context":null,Tv=e=>e==="markdown"||e==="code"||e==="raw"?e:"unknown",Cj=e=>{const r=e.trim();if(!r.startsWith('"'))return null;let i=r;i.endsWith(",")&&(i=i.slice(0,-1));try{const l=JSON.parse(i);return typeof l=="string"?l:null}catch{return i.replace(/^"/,"").replace(/"$/,"").replace(/\\n/g,`
|
|
67
|
-
`).replace(/\\t/g," ").replace(/\\"/g,'"').replace(/\\\\/g,"\\")}},Nj=e=>{const r=e.indexOf('"source"');if(r===-1)return null;const i=e.indexOf(":",r);if(i===-1)return null;let l=e.slice(i+1).trim();if(!l)return null;if(l.endsWith(",")&&(l=l.slice(0,-1).trim()),l.startsWith("[")){const o=l.lastIndexOf("]");if(o===-1)return null;const u=l.slice(0,o+1);try{const c=JSON.parse(u);if(Array.isArray(c))return c.filter(f=>typeof f=="string")}catch{return null}return[]}if(l.startsWith('"'))try{const o=JSON.parse(l);return typeof o=="string"?[o]:null}catch{return null}return null},Aj=e=>{const r=Tj(e);if(r)return r;const i=[];let l=null,o=!1,u=!1,c=!1;const f=()=>{l&&(l.status=o&&u?"change":o?"add":u?"delete":"context",i.push(l),l=null,o=!1,u=!1,c=!1)},p=h=>{f(),l={cellType:h,sourceLines:[],status:"context"}};return e.forEach(h=>{h.lines.forEach(b=>{const g=Av(b);if(!g)return;const w=b.content.match(vj);if(w?p(Tv(w[1]??"")):!l&&Px.test(b.content)&&p("unknown"),!l)return;if(g==="add"&&(o=!0),g==="delete"&&(u=!0),!l.id){const S=b.content.match(Sj);S&&(l.id=S[1])}if(l.executionCount===void 0){const S=b.content.match(wj);S&&(l.executionCount=S[1]==="null"?null:S[1])}if(Px.test(b.content)){const S=Nj(b.content);if(S){S.forEach(C=>{l?.sourceLines.push({type:g,content:C})}),c=!1;return}c=!0;return}if(!c)return;if(b.content.trim().startsWith("]")){c=!1;return}const v=Cj(b.content);v!==null&&l.sourceLines.push({type:g,content:v})})}),f(),{cells:i}},Tj=e=>{const r=$x(e,["add","context"]),i=$x(e,["delete","context"]),l=Ga(r),o=Ga(i);if(!l&&!o||l&&l.cells.length===0&&!o)return null;const u=l?.language??o?.language;return{cells:jv(o?.cells??[],l?.cells??[]),language:u}},$x=(e,r)=>e.flatMap(i=>i.lines).map(i=>{const l=Av(i);return!l||!r.includes(l)?null:i.content}).filter(i=>i!==null).join(`
|
|
68
|
-
`),Ga=e=>{if(!e.trim())return null;try{const r=JSON.parse(e);if(!r||typeof r!="object"||!("cells"in r))return null;const i=r.cells;if(!Array.isArray(i))return null;const l=r.metadata,o=jj(l);return{cells:i.map(u=>Rj(u)),language:o}}catch{return null}},jj=e=>{if(!e||typeof e!="object")return;const r=e,i=r.language_info;if(i&&typeof i=="object"){const o=i.name;if(typeof o=="string"&&o.trim())return o}const l=r.kernelspec;if(l&&typeof l=="object"){const o=l.language;if(typeof o=="string"&&o.trim())return o}},Rj=e=>{const r=typeof e=="object"&&e?e:{},i=typeof r.cell_type=="string"?r.cell_type:"",l=Tv(i),o=typeof r.id=="string"?r.id:void 0,u=r.execution_count,c=u===null?null:typeof u=="number"?String(u):typeof u=="string"?u:void 0,f=_j(r.source);return{cellType:l,sourceText:f,id:o,executionCount:c}},_j=e=>typeof e=="string"?e:Array.isArray(e)?e.filter(r=>typeof r=="string").join(""):"",jv=(e,r)=>{const i=[];if(e.some(u=>!!u.id)||r.some(u=>!!u.id)){const u=new Map;e.forEach((f,p)=>{f.id&&u.set(f.id,{cell:f,index:p})});const c=new Set;return r.forEach(f=>{const p=f.id?u.get(f.id):void 0;p&&c.add(p.index),i.push(Dd(p?.cell??null,f))}),e.forEach((f,p)=>{c.has(p)||i.push(Dd(f,null))}),i}const o=Math.max(e.length,r.length);for(let u=0;u<o;u+=1){const c=e[u]??null,f=r[u]??null;i.push(Dd(c,f))}return i},Dd=(e,r)=>{if(!r&&e)return{cellType:e.cellType,sourceLines:Ha(e.sourceText,"delete"),status:"delete",id:e.id,executionCount:e.executionCount};if(r&&!e)return{cellType:r.cellType,sourceLines:Ha(r.sourceText,"add"),status:"add",id:r.id,executionCount:r.executionCount};const i=e?.sourceText??"",l=r?.sourceText??"",o=r?.cellType??e?.cellType??"unknown",u=r?.id??e?.id,c=r?.executionCount??e?.executionCount;return i===l&&(e?.cellType??"")===(r?.cellType??"")?{cellType:o,sourceLines:Ha(l,"context"),status:"context",id:u,executionCount:c}:{cellType:o,sourceLines:[...Ha(i,"delete"),...Ha(l,"add")],status:"change",id:u,executionCount:c}},Ha=(e,r)=>e?[{type:r,content:e}]:[],Od=e=>!!(e&&e!=="stdin"),Md=async(e,r)=>{const i=encodeURIComponent(e),l=await fetch(`/api/blob/${i}?ref=${encodeURIComponent(r)}`);return l.ok?l.text():null},Bl=(e,r)=>e.filter(i=>r.includes(i.type)).map(i=>i.content).join(""),zd=e=>{if(!e)return[];const r=e.split(`
|
|
69
|
-
`);return r.length>0&&r[r.length-1]===""&&r.pop(),r},Rv=(e,r)=>!e&&!r?[]:e?r?ej(e,r).flatMap(i=>{const l=i.added?"add":i.removed?"delete":"context";return zd(i.value).map(o=>({type:l,content:o}))}):zd(e).map(i=>({type:"delete",content:i})):zd(r).map(i=>({type:"add",content:i})),Lj=e=>Qt.isValidElement(e),Dj=e=>Qt.isValidElement(e),dh=e=>e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(dh).join(""):Lj(e)?dh(e.props.children):"",Oj=e=>{switch(e){case"add":return"border-l-4 border-diff-addition-border";case"delete":return"border-l-4 border-diff-deletion-border";case"change":return"border-l-4 border-diff-addition-border";default:return"border-l-4 border-transparent"}},Vx=e=>{switch(e){case"before":return"border-l-4 border-diff-deletion-border";case"after":return"border-l-4 border-diff-addition-border";default:return"border-l-4 border-transparent"}},Mj=e=>{switch(e){case"add":return"bg-diff-addition-bg";case"delete":return"bg-diff-deletion-bg";default:return"bg-transparent"}},zj=e=>{switch(e){case"add":return"+";case"delete":return"-";default:return" "}},Fj=e=>{switch(e){case"add":return"text-github-accent";case"delete":return"text-github-danger";default:return"text-github-text-muted"}},hh=e=>/^(https?:|mailto:|#|\.{0,2}\/|\/)/i.test(e.trim()),Ij=e=>({h1:({children:r})=>y.jsx("h1",{className:`${Rl[0]} mb-2`,children:r}),h2:({children:r})=>y.jsx("h2",{className:`${Rl[1]} mb-2`,children:r}),h3:({children:r})=>y.jsx("h3",{className:`${Rl[2]} mb-2`,children:r}),h4:({children:r})=>y.jsx("h4",{className:`${Rl[3]} mb-2`,children:r}),h5:({children:r})=>y.jsx("h5",{className:`${Rl[4]} mb-2`,children:r}),h6:({children:r})=>y.jsx("h6",{className:`${Rl[5]} mb-2`,children:r}),p:({children:r})=>y.jsx("p",{className:"text-sm leading-7",children:r}),ul:({children:r})=>y.jsx("ul",{className:"list-disc pl-6 text-sm space-y-1",children:r}),ol:({children:r})=>y.jsx("ol",{className:"list-decimal pl-6 text-sm space-y-1",children:r}),li:({children:r})=>y.jsx("li",{children:r}),blockquote:({children:r})=>y.jsx("blockquote",{className:"border-l-4 border-github-border pl-4 text-github-text-muted italic",children:r}),hr:()=>y.jsx("hr",{className:"border-github-border"}),a:({href:r,children:i})=>{const l=r??"";if(!l||!hh(l))return y.jsx("span",{children:i});const o=l.startsWith("http");return y.jsx("a",{href:l,target:o?"_blank":void 0,rel:o?"noreferrer":void 0,className:"text-sky-400 hover:text-sky-300 underline underline-offset-4",children:i})},img:({src:r,alt:i})=>{const l=r??"";return!l||!hh(l)?null:y.jsx("img",{src:l,alt:i??"",loading:"lazy",className:"max-w-full rounded border border-github-border"})},pre:({children:r})=>{const l=(Array.isArray(r)?r:[r]).find(Dj),o=dh(l??r),c=/language-(\S+)/.exec(l?.props.className??"")?.[1];return o.trim()?y.jsx("pre",{className:"border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-xs",children:y.jsx(Eh,{code:o.replace(/\n$/,""),language:c,syntaxTheme:e,className:"font-mono text-github-text-primary [&_.token-line]:block [&_.token-line]:whitespace-pre"})}):y.jsx("pre",{className:"border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-xs",children:r})},code:({className:r,children:i})=>r?y.jsx("code",{className:r,children:i}):y.jsx("code",{className:"px-1 py-0.5 rounded bg-github-bg-tertiary border border-github-border text-xs font-mono",children:i}),table:({children:r})=>y.jsx("div",{className:"overflow-x-auto",children:y.jsx("table",{className:"min-w-full border border-github-border",children:r})}),th:({children:r})=>y.jsx("th",{className:"border border-github-border px-2 py-1 bg-github-bg-tertiary text-sm",children:r}),td:({children:r})=>y.jsx("td",{className:"border border-github-border px-2 py-1 text-sm",children:r})}),Bj=e=>{const r=Bl(e.sourceLines,["context","delete"]),i=Bl(e.sourceLines,["context","add"]),l=[];return e.status==="change"?(r.trim()&&l.push({label:"Before",content:r,tone:"before"}),i.trim()&&l.push({label:"After",content:i,tone:"after"}),l.length===0&&l.push({label:"After",content:i,tone:"after"}),l):e.status==="delete"?(l.push({label:"Before",content:r||i,tone:"before"}),l):(l.push({label:"After",content:i||r,tone:"after"}),l)},_v=(e,r,i,l)=>{if(!r.trim())return y.jsx("span",{className:"text-xs text-github-text-muted",children:"Empty cell"});if(e==="markdown"){const o=Ij(i);return y.jsx(Kh,{remarkPlugins:[ep],urlTransform:u=>hh(u)?u:"",components:o,children:r})}return e==="raw"?y.jsx("pre",{className:"whitespace-pre-wrap break-words text-xs font-mono text-github-text-primary",children:r}):y.jsx("pre",{className:"overflow-x-auto text-xs",children:y.jsx(Za,{code:r.replace(/\n$/,""),language:l||"python",syntaxTheme:i,className:"font-mono text-github-text-primary [&_.token-line]:block [&_.token-line]:whitespace-pre"})})},Uj=({lines:e,syntaxTheme:r,language:i})=>e.length===0?y.jsx("span",{className:"text-xs text-github-text-muted",children:"Empty cell"}):y.jsx("div",{className:"overflow-x-auto",children:y.jsx("div",{className:"font-mono text-xs",children:e.map((l,o)=>y.jsxs("div",{className:`flex items-start min-h-[16px] ${Mj(l.type)}`,children:[y.jsx("span",{className:`w-5 text-center flex-shrink-0 select-none ${Fj(l.type)}`,children:zj(l.type)}),y.jsx(Za,{code:l.content||" ",language:i||"python",syntaxTheme:r,className:"flex-1 px-3 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text [&_pre]:m-0 [&_pre]:p-0 [&_pre]:!bg-transparent [&_pre]:font-inherit [&_pre]:text-inherit [&_pre]:leading-inherit [&_code]:!bg-transparent [&_code]:font-inherit [&_code]:text-inherit [&_code]:leading-inherit"})]},`notebook-code-line-${o}`))})}),Hj=({cells:e,syntaxTheme:r,language:i})=>y.jsx("div",{className:"space-y-4",children:e.map((l,o)=>{const u=Bj(l),c=l.cellType==="code"&&l.executionCount!==void 0?`In[${l.executionCount??" "}]`:null,f=l.cellType==="code",p=f?Rv(Bl(l.sourceLines,["context","delete"]),Bl(l.sourceLines,["context","add"])).filter(h=>h.type!=="context"):[];return f&&p.length===0?null:y.jsxs("div",{className:`rounded border border-github-border bg-github-bg-secondary/40 p-4 ${Oj(l.status)}`,children:[y.jsx("div",{className:"flex flex-wrap items-center justify-between gap-2 mb-3",children:y.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[y.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-github-text-muted",children:Nv[l.cellType]}),c&&y.jsx("span",{className:"text-xs font-mono text-github-text-secondary",children:c}),l.id&&y.jsx("span",{className:"text-xs font-mono text-github-text-muted",children:l.id})]})}),y.jsx("div",{className:"space-y-3",children:f?y.jsx("div",{className:`px-4 py-3 ${Vx(l.status==="delete"?"before":"after")}`,children:y.jsx(Uj,{lines:p,syntaxTheme:r,language:i})}):u.map((h,b)=>y.jsx("div",{className:`px-4 py-3 ${Vx(h.tone)}`,children:y.jsx("div",{className:"text-sm text-github-text-primary",children:_v(l.cellType,h.content,r,i)})},`notebook-cell-${o}-section-${b}`))})]},`notebook-cell-${o}`)})}),qj=({cells:e,syntaxTheme:r,language:i})=>y.jsx("div",{className:"space-y-4",children:e.map((l,o)=>{const u=l.cellType==="code"&&l.executionCount!==void 0?`In[${l.executionCount??" "}]`:null;return y.jsxs("div",{className:"rounded border border-github-border bg-github-bg-secondary/40 p-4",children:[y.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-3",children:[y.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-github-text-muted",children:Nv[l.cellType]}),u&&y.jsx("span",{className:"text-xs font-mono text-github-text-secondary",children:u}),l.id&&y.jsx("span",{className:"text-xs font-mono text-github-text-muted",children:l.id})]}),y.jsx("div",{className:"text-sm text-github-text-primary",children:_v(l.cellType,l.sourceText,r,i)})]},`notebook-full-cell-${o}`)})});function Pj(e){const{file:r,baseCommitish:i,targetCommitish:l}=e,[o,u]=A.useState("diff"),c=A.useMemo(()=>Aj(e.mergedChunks),[e.mergedChunks]),[f,p]=A.useState({status:"idle",cells:c.cells,language:c.language}),h=A.useMemo(()=>f.cells.filter(_=>_.status==="context"?!1:_.cellType!=="code"?!0:Rv(Bl(_.sourceLines,["context","delete"]),Bl(_.sourceLines,["context","add"])).filter(z=>z.type!=="context").length>0),[f.cells]),[b,g]=A.useState(null),[w,x]=A.useState(c.language),[v,S]=A.useState(!1),[C,N]=A.useState(null),[E,R]=A.useState(null),O=A.useMemo(()=>!i&&!l?null:r.status==="added"?l?{path:r.path,ref:l}:null:r.status==="deleted"?i?{path:r.oldPath||r.path,ref:i}:null:l?{path:r.path,ref:l}:i?{path:r.oldPath||r.path,ref:i}:null,[i,l,r.oldPath,r.path,r.status]),H=A.useMemo(()=>O?`${O.ref}:${O.path}`:null,[O]);return A.useEffect(()=>{let _=!1;return(async()=>{const z=i||"HEAD~1",B=l||"HEAD",M=r.oldPath||r.path,$=r.status!=="added"&&Od(z),V=r.status!=="deleted"&&Od(B);if(!$&&!V){p({status:"ready",cells:c.cells,language:c.language,source:"diff",message:"Notebook content could not be loaded, falling back to diff preview."});return}p(J=>({...J,status:"loading"}));try{const[J,I]=await Promise.all([$?Md(M,z):Promise.resolve(null),V?Md(r.path,B):Promise.resolve(null)]),Z=J?Ga(J):null,U=I?Ga(I):null;if(!Z&&!U){_||p({status:"ready",cells:c.cells,language:c.language,source:"diff",message:"Notebook content could not be parsed, falling back to diff preview."});return}const Y=U?.language??Z?.language??c.language,X=jv(Z?.cells??[],U?.cells??[]);_||p({status:"ready",cells:X,source:"blob",language:Y})}catch(J){_||p({status:"error",cells:c.cells,language:c.language,source:"diff",message:J instanceof Error?J.message:"Failed to load notebook preview."})}})(),()=>{_=!0}},[i,r.oldPath,r.path,r.status,e.mergedChunks,l,c]),A.useEffect(()=>{if(o!=="full-preview")return;if(!O||!H||!Od(O.ref)){g(null),R(null),N(null),S(!1);return}let _=!1;return(H!==E||!b)&&(async()=>{H!==E&&g(null),S(!0),N(null);try{const z=await Md(O.path,O.ref);if(!z)throw new Error("Failed to load preview.");const B=Ga(z);if(!B)throw new Error("Notebook content could not be parsed.");_||(g(B.cells),x(B.language??c.language),R(H))}catch(z){_||(g(null),R(null),N(z instanceof Error?z.message:"Failed to load preview"))}finally{_||S(!1)}})(),()=>{_=!0}},[c.language,b,E,o,O,H]),y.jsxs("div",{className:"bg-github-bg-primary",children:[y.jsx("div",{className:"flex items-center justify-between border-b border-github-border px-4 py-2",children:y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsxs("button",{onClick:()=>u("diff"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${o==="diff"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Code Diff",children:[y.jsx(xu,{size:14}),"Diff"]}),y.jsxs("button",{onClick:()=>u("diff-preview"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${o==="diff-preview"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Diff Preview",children:[y.jsx(Bs,{size:14}),"Diff Preview"]}),y.jsxs("button",{onClick:()=>u("full-preview"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${o==="full-preview"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Full Preview",children:[y.jsx(Bs,{size:14}),"Full Preview"]})]})}),o==="diff"&&y.jsx(pu,{...e}),o==="diff-preview"&&y.jsxs("div",{className:"p-4",children:[f.status==="loading"&&y.jsx("div",{className:"text-xs text-github-text-muted mb-3",children:"Loading notebook preview…"}),f.message&&y.jsx("div",{className:"text-xs text-github-text-muted mb-3",children:f.message}),h.length===0?y.jsxs("div",{children:[y.jsx("div",{className:"text-xs text-github-text-muted mb-3",children:"No changed notebook cells were found. Showing raw diff instead."}),y.jsx(pu,{...e})]}):y.jsx(Hj,{cells:h,syntaxTheme:e.syntaxTheme,language:f.language})]}),o==="full-preview"&&y.jsxs("div",{className:"p-4",children:[v&&y.jsx("div",{className:"text-sm text-github-text-muted mb-3",children:"Loading preview..."}),C&&y.jsx("div",{className:"text-sm text-github-danger mb-3",children:C}),!v&&!C&&b&&y.jsx(qj,{cells:b,syntaxTheme:e.syntaxTheme,language:w??c.language}),!v&&!C&&!b&&y.jsx("div",{className:"text-sm text-github-text-muted",children:"Preview unavailable."})]})]})}const Fd=[{id:"image",match:e=>h4(e.path),Component:y4,canExpandHiddenLines:()=>!1},{id:"markdown",match:e=>m4(e.path),Component:xj,canExpandHiddenLines:e=>e.status!=="added"&&e.status!=="deleted"},{id:"notebook",match:e=>b4(e.path),Component:Pj,canExpandHiddenLines:e=>e.status!=="added"&&e.status!=="deleted"},{id:"default",match:()=>!0,Component:pu,canExpandHiddenLines:e=>e.status!=="added"&&e.status!=="deleted"}],$j=e=>{const r=Fd[Fd.length-1];if(!r)throw new Error("No diff viewers registered");return Fd.find(i=>i.match(e))??r},Vj=e=>{switch(e){case"added":return y.jsx(S1,{size:16,className:"text-github-accent"});case"deleted":return y.jsx(k1,{size:16,className:"text-github-danger"});case"renamed":return y.jsx(w1,{size:16,className:"text-github-warning"});default:return y.jsx(xu,{size:16,className:"text-github-text-secondary"})}},Gj=({file:e,isCollapsed:r,isReviewed:i,onToggleCollapsed:l,onToggleAllCollapsed:o,onToggleReviewed:u})=>{const[c,f]=A.useState(!1);return y.jsxs("div",{className:"bg-github-bg-secondary border-t-2 border-t-github-accent border-b border-github-border px-5 py-4 flex items-center justify-between flex-wrap gap-3 sticky top-0 z-10",children:[y.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[y.jsx("button",{onClick:p=>{p.altKey?o(!r):l(e.path)},className:"text-github-text-muted hover:text-github-text-primary transition-colors cursor-pointer",title:r?"Expand file (Alt+Click to expand all)":"Collapse file (Alt+Click to collapse all)",children:r?y.jsx(x1,{size:16}):y.jsx(zl,{size:16})}),Vj(e.status),y.jsx("h2",{className:"text-sm font-mono text-github-text-primary m-0 overflow-hidden text-ellipsis whitespace-nowrap",children:e.path}),y.jsx("button",{className:`bg-transparent border-none cursor-pointer px-1.5 py-1 rounded text-sm transition-all hover:bg-github-bg-tertiary ${c?"text-github-accent":"text-github-text-secondary hover:text-github-text-primary"}`,onClick:()=>{navigator.clipboard.writeText(e.path).then(()=>{console.log("File path copied to clipboard:",e.path),f(!0),setTimeout(()=>f(!1),2e3)}).catch(p=>{console.error("Failed to copy file path:",p)})},title:"Copy file path",children:c?y.jsx(Xa,{size:14}):y.jsx(v1,{size:14})}),e.oldPath&&e.oldPath!==e.path&&y.jsxs("span",{className:"text-xs text-github-text-muted italic",children:["(renamed from ",e.oldPath,")"]})]}),y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[y.jsxs("span",{className:"font-medium px-1 py-0.5 rounded text-github-accent bg-green-100/10",children:["+",e.additions]}),y.jsxs("span",{className:"font-medium px-1 py-0.5 rounded text-github-danger bg-red-100/10",children:["-",e.deletions]})]}),y.jsxs("button",{onClick:()=>u(e.path),className:`flex items-center gap-2 px-3 py-1.5 rounded-md text-sm font-medium transition-all duration-200 ${i?"bg-github-accent text-white":"dark:bg-slate-600 dark:text-white dark:border-slate-500 dark:hover:bg-slate-500 dark:hover:border-slate-400 bg-github-bg-secondary text-github-text-primary border border-github-border hover:bg-github-bg-tertiary hover:border-github-text-muted"}`,title:i?"Mark as not reviewed":"Mark as reviewed",children:[i?y.jsx(Xa,{size:14}):y.jsx(zk,{size:14}),"Viewed"]})]})]})},Yj=e=>{const r={old:[],new:[]};return e.forEach(i=>{const l=i.side??"new",[o,u]=Array.isArray(i.line)?[i.line[0],i.line[1]]:[i.line,i.line];o<=0||u<=0||r[l].push({start:Math.min(o,u),end:Math.max(o,u)})}),r},Xj=(e,r)=>e.chunks.map((i,l)=>{const o=r==="old"?i.oldStart:i.newStart,u=r==="old"?i.oldLines:i.newLines;return!o||u<=0?null:{start:o,end:o+u-1,index:l}}).filter(i=>!!i),Zj=e=>{const r=[],i=e[0];if(!i)return r;i.start>1&&r.push({type:"before",start:1,end:i.start-1,nextChunkIndex:i.index});for(let o=1;o<e.length;o+=1){const u=e[o-1],c=e[o];!u||!c||c.start>u.end+1&&r.push({type:"between",start:u.end+1,end:c.start-1,prevChunkIndex:u.index,nextChunkIndex:c.index})}const l=e[e.length-1];return l&&r.push({type:"after",start:l.end+1,end:Number.POSITIVE_INFINITY,prevChunkIndex:l.index}),r},Kj=e=>{const r=new Map;return e.forEach(i=>{const l=i.originalIndices[0];l!==void 0&&r.set(l,i)}),r},Qj=e=>{const r=e[e.length-1];return r?.originalIndices[r.originalIndices.length-1]??null},Jj=A.memo(function({file:r,comments:i,showAuthorBadges:l=!1,diffMode:o,reviewedFiles:u,onToggleReviewed:c,collapsedFiles:f,onToggleCollapsed:p,onToggleAllCollapsed:h,onAddComment:b,onGeneratePrompt:g,onRemoveComment:w,onUpdateComment:x,onOpenInEditor:v,syntaxTheme:S,baseCommitish:C,targetCommitish:N,cursor:E=null,fileIndex:R=0,onLineClick:O,commentTrigger:H,onCommentTriggerHandled:_,mergedChunks:F,expandLines:z,expandAllBetweenChunks:B,prefetchFileContent:M,isExpandLoading:$}){const V=f.has(r.path),J=A.useRef(null),[I,Z]=A.useState(!1),U=$j(r),Y=U.canExpandHiddenLines?.(r)??!1;A.useEffect(()=>{if(!Y)return;const P=J.current;if(!P)return;const T=new IntersectionObserver(([W])=>{W?.isIntersecting&&Z(!0)},{rootMargin:"200px"});return T.observe(P),()=>T.disconnect()},[Y]),A.useEffect(()=>{I&&!V&&Y&&M(r)},[I,V,Y,r,M]);const X=A.useCallback(async(P,T,W,te)=>{try{await b(r.path,P,T,W,te)}catch(ce){console.error("Failed to add comment:",ce)}},[r.path,b]);A.useEffect(()=>{if(V||$||!Y||i.length===0||r.chunks.length===0||F.length===0)return;const P=Yj(i),T=Kj(F),W=Qj(F),te=F[F.length-1],ce=new Set,me=(xe,ge)=>{ce.has(xe)||(ce.add(xe),ge())};["old","new"].forEach(xe=>{const ge=P[xe];if(ge.length===0)return;const ve=Xj(r,xe);Zj(ve).forEach(de=>{if(!ge.some(Ye=>Ye.start<=de.end&&Ye.end>=de.start))return;if(de.type==="after"&&te&&W!==null){te.hiddenLinesAfter>0&&me(`after-${W}`,()=>{z(r,W,"down",te.hiddenLinesAfter)});return}const we=de.nextChunkIndex;if(we===void 0)return;const Re=T.get(we);!Re||Re.hiddenLinesBefore<=0||(de.type==="before"?me(`before-${we}`,()=>{z(r,we,"up",Re.hiddenLinesBefore)}):de.type==="between"&&me(`between-${we}`,()=>{B(r,we,Re.hiddenLinesBefore)}))})})},[i,B,z,r,V,$,F,Y]);const q="4em",j=U.Component,D={file:r,comments:i,showAuthorBadges:l,diffMode:o,syntaxTheme:S,baseCommitish:C,targetCommitish:N,cursor:E,fileIndex:R,mergedChunks:F,isExpandLoading:$,expandHiddenLines:z,expandAllBetweenChunks:B,onAddComment:X,onGeneratePrompt:g,onRemoveComment:w,onUpdateComment:x,onOpenInEditor:v,onLineClick:O,commentTrigger:H,onCommentTriggerHandled:_};return y.jsxs("div",{ref:J,className:"bg-github-bg-primary",style:{"--line-number-width":q},children:[y.jsx(Gj,{file:r,isCollapsed:V,isReviewed:u.has(r.path),onToggleCollapsed:p,onToggleAllCollapsed:h,onToggleReviewed:c}),!V&&y.jsx("div",{className:"overflow-y-auto",children:y.jsx(j,{...D})})]})});function ph(e){if(!e.isDirectory||!e.children)return[];const r=[];return e.path&&r.push(e.path),e.children.forEach(i=>{r.push(...ph(i))}),r}function Wj(e){const r={name:"",path:"",isDirectory:!0,children:[]};e.forEach(l=>{const o=l.path.split("/");let u=r;for(let c=0;c<o.length;c++){const f=o[c];if(!f)continue;const p=c===o.length-1,h=o.slice(0,c+1).join("/");u.children||(u.children=[]);let b=u.children.find(g=>g.name===f);b||(b={name:f,path:h,isDirectory:!p,children:p?void 0:[],file:p?l:void 0},u.children.push(b)),u=b}});const i=l=>{if(!l.isDirectory||!l.children)return l;if(l.children=l.children.map(i),l.children.length===1&&l.children[0]?.isDirectory&&l.children[0]?.children){const o=l.children[0];if(o)return l.name?{...l,name:`${l.name}/${o.name}`,path:o.path,children:o.children}:l}return l};return i(r)}function eR({files:e,onScrollToFile:r,onFileSelected:i,comments:l,reviewedFiles:o,onToggleReviewed:u,selectedFileIndex:c}){const f=A.useMemo(()=>Wj(e),[e]),p=A.useRef(null),h=A.useRef(new Map),b={"--dir-row-height":"calc(var(--spacing, 0.25rem) * 9)"},[g,w]=A.useState(()=>new Set(ph(f))),[x,v]=A.useState(""),S=A.useMemo(()=>{const B=new Map;return l.forEach(M=>{B.set(M.file,(B.get(M.file)??0)+1)}),B},[l]),C=A.useMemo(()=>{const B=new Map;return e.forEach((M,$)=>{B.set(M.path,$)}),B},[e]),N=A.useMemo(()=>{const B=x.trim().toLowerCase(),M=$=>{if(!B)return $;if($.isDirectory&&$.children){const V=$.children.map(J=>M(J)).filter(J=>J!==null);return V.length>0?{...$,children:V}:null}else if($.file)return $.file.path.toLowerCase().includes(B)?$:null;return null};return M(f)||{...f,children:[]}},[f,x]),E=B=>{switch(B){case"added":return y.jsx(S1,{size:16,className:"text-github-accent"});case"deleted":return y.jsx(k1,{size:16,className:"text-github-danger"});case"renamed":return y.jsx(w1,{size:16,className:"text-github-warning"});default:return y.jsx(xu,{size:16,className:"text-github-text-secondary"})}},R=B=>{w(M=>{const $=new Set(M);return $.has(B)?$.delete(B):$.add(B),$})},O=A.useMemo(()=>ph(f),[f]),H=g.size===O.length&&O.length>0,_=()=>{w(H?new Set:new Set(O))},F=(B,M)=>{const $=p.current,V=B.currentTarget;if(!$){R(M);return}const J=$.getBoundingClientRect(),I=V.getBoundingClientRect(),Z=Number.parseFloat(getComputedStyle(V).top||"0");if(I.top-J.top<=Z+1){const q=h.current.get(M)?.querySelector('[data-tree-row="true"]:not([data-dir-header="true"])'),j=V.getBoundingClientRect().height||0,D=q??V,P=Number.parseInt(D.dataset.depth||V.dataset.depth||"0",10),T=j*P,W=Math.max(0,D.offsetTop-T);if(Math.abs($.scrollTop-W)<=1){R(M);return}$.scrollTo({top:W,behavior:"smooth"});return}R(M)},z=(B,M=0)=>{if(B.isDirectory&&B.children){const $=g.has(B.path);return y.jsxs("div",{"data-dir-container":B.path||void 0,ref:V=>{B.path&&(V?h.current.set(B.path,V):h.current.delete(B.path))},children:[B.name&&y.jsxs("div",{className:"sticky flex h-9 items-center gap-2 bg-github-bg-secondary px-4 hover:bg-github-bg-tertiary cursor-pointer","data-dir-header":"true","data-tree-row":"true","data-depth":M,style:{paddingLeft:`${M*16+16}px`,top:`calc(${M} * var(--dir-row-height))`,zIndex:1e3-M},onClick:V=>F(V,B.path),children:[$?y.jsx(zl,{size:16}):y.jsx(x1,{size:16}),$?y.jsx(dk,{size:16,className:"text-github-text-secondary"}):y.jsx(pk,{size:16,className:"text-github-text-secondary"}),y.jsx("span",{className:"text-sm text-github-text-primary font-medium flex-1 overflow-hidden text-ellipsis whitespace-nowrap",title:B.name,children:B.name})]}),($||!B.name)&&B.children.map(V=>z(V,B.name?M+1:M))]},B.path)}else if(B.file){const $=B.file,V=S.get($.path)??0,J=o.has($.path),I=C.get($.path)??-1,Z=c!==null&&c===I;return y.jsxs("div",{className:`flex items-center gap-2 px-4 py-2 hover:bg-github-bg-tertiary cursor-pointer transition-colors ${J?"opacity-70":""} ${Z?"bg-github-bg-tertiary":""}`,"data-file-row":"true","data-tree-row":"true","data-depth":M,style:{paddingLeft:`${M*16+16}px`},onClick:()=>{r($.path),i?.()},children:[y.jsx(N1,{checked:J,onChange:()=>{u($.path)},title:J?"Mark as not reviewed":"Mark as reviewed",className:"z-10"}),E(B.file.status),y.jsx("span",{className:`text-sm text-github-text-primary flex-1 overflow-hidden text-ellipsis whitespace-nowrap ${J?"line-through text-github-text-muted":""}`,title:B.file.path,children:B.name}),V>0&&y.jsxs("span",{className:"text-github-warning text-sm font-medium ml-auto flex items-center gap-1",children:[y.jsx(E1,{size:14}),V]})]},$.path)}return null};return y.jsxs("div",{className:"h-full flex flex-col",children:[y.jsxs("div",{className:"px-4 py-3 border-b border-github-border bg-github-bg-tertiary",children:[y.jsxs("div",{className:"flex items-center justify-between mb-3",children:[y.jsxs("h3",{className:"text-sm font-semibold text-github-text-primary m-0",children:["Files changed (",e.length,")"]}),y.jsx("button",{onClick:_,className:"p-1 hover:bg-github-bg-primary rounded transition-colors",title:H?"Collapse all":"Expand all",children:H?y.jsx(X2,{size:16,className:"text-github-text-secondary"}):y.jsx(K2,{size:16,className:"text-github-text-secondary"})})]}),y.jsxs("div",{className:"relative",children:[y.jsx(Dk,{size:16,className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-github-text-muted"}),y.jsx("input",{type:"text",placeholder:"Filter files...",value:x,onChange:B=>v(B.target.value),className:"w-full pl-9 pr-3 py-2 text-sm bg-github-bg-primary border border-github-border rounded-md focus:outline-none focus:border-github-accent text-github-text-primary placeholder-github-text-muted"})]})]}),y.jsx("div",{className:"flex-1 overflow-y-auto relative z-0",style:b,ref:p,children:N.children?.map(B=>z(B))})]})}function tR({style:e}){return y.jsx("svg",{width:"98",height:"96",viewBox:"0, 0, 98, 96",style:e,xmlns:"http://www.w3.org/2000/svg","aria-label":"GitHub",role:"img",children:y.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z",fill:"currentColor"})})}function nR({isOpen:e,onClose:r}){const{enableScope:i,disableScope:l}=eo();return lt("escape",()=>r(),{enabled:e},[r,e]),A.useEffect(()=>(e?l("navigation"):i("navigation"),()=>{i("navigation")}),[e,i,l]),e?y.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[y.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:r}),y.jsxs("div",{className:"relative bg-github-bg-primary border border-github-border rounded-lg shadow-lg max-w-4xl w-full mx-4 max-h-[80vh] overflow-y-auto",children:[y.jsxs("div",{className:"sticky top-0 bg-github-bg-primary border-b border-github-border px-6 py-4 flex items-center justify-between",children:[y.jsx("h2",{className:"text-lg font-semibold text-github-text-primary",children:"Keyboard Shortcuts"}),y.jsx("button",{onClick:r,className:"text-github-text-secondary hover:text-github-text-primary transition-colors","aria-label":"Close help modal",children:y.jsx(vu,{size:20})})]}),y.jsxs("div",{className:"px-6 py-4 grid grid-cols-1 lg:grid-cols-2 gap-6",children:[y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Line Navigation"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"j"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"↓"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Next line"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"k"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"↑"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Previous line"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"File Navigation"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"]"}),y.jsx("span",{className:"text-github-text-secondary",children:"Next file"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"["}),y.jsx("span",{className:"text-github-text-secondary",children:"Previous file"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"["})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Jump to first file"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"]"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Jump to last file"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Chunk Navigation"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"n"}),y.jsx("span",{className:"text-github-text-secondary",children:"Next change chunk (added/deleted lines)"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"p"}),y.jsx("span",{className:"text-github-text-secondary",children:"Previous change chunk (added/deleted lines)"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Comment Navigation"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"N"}),y.jsx("span",{className:"text-github-text-secondary",children:"Next comment"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"P"}),y.jsx("span",{className:"text-github-text-secondary",children:"Previous comment"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Side Navigation (Side-by-side mode)"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"h"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"←"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Focus left side"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"l"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"→"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Focus right side"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Comment Management"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"L"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"View all comments list"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"C"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Copy all comments prompt"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"D"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Delete all comments"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Actions"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"v"}),y.jsx("span",{className:"text-github-text-secondary",children:"Toggle viewed state of current file"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"R"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Refresh diff when changes detected"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"c"}),y.jsx("span",{className:"text-github-text-secondary",children:"Add comment at current line"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"."}),y.jsx("span",{className:"text-github-text-secondary",children:"Move cursor to center of viewport"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"?"}),y.jsx("span",{className:"text-github-text-secondary",children:"Show/hide this help"})]})]})]}),y.jsx("div",{className:"pt-4 border-t border-github-border lg:col-span-2",children:y.jsx("p",{className:"text-xs text-github-text-secondary",children:"Shortcuts are disabled when typing in input fields."})})]})]})]}):null}function rR({style:e}){return y.jsxs("svg",{style:e,viewBox:"0 0 720 190",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":"difit",role:"img",children:[y.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M440.487 5.90627C432.164 9.01695 427.318 16.2817 427.318 25.649C427.318 35.9474 433.206 43.6458 442.714 45.7819C451.336 47.7188 459.606 44.3893 464.84 36.8737C466.923 33.8843 467.35 32.4073 467.606 27.3105C467.773 23.9957 467.492 20.0154 466.983 18.4654C465.699 14.5629 460.869 9.13088 456.854 7.07513C452.57 4.88086 444.73 4.32102 440.487 5.90627ZM596.658 6.653C588.927 9.55794 584.572 15.4908 583.887 24.0465C583.17 33.0212 586.83 39.8868 594.382 43.7278C603.739 48.4877 615.574 44.5081 620.482 34.9515C625.35 25.4728 622.15 13.4916 613.37 8.32678C608.986 5.74808 601.154 4.96365 596.658 6.653ZM368.585 7.68006C367.464 8.80629 367.302 12.903 367.302 40.2286V71.4878L363.832 68.1329C353.432 58.0787 335.595 52.668 319.246 54.6082C310.542 55.641 299.81 59.1369 293.3 63.0607C278.56 71.9427 266.453 89.5576 263.139 106.945C261.765 114.155 261.602 129.431 262.825 136.365C265.723 152.796 274.795 168.36 286.716 177.355C298.275 186.077 310.237 190 325.274 190C340.687 190 353.943 185.273 362.869 176.594L367.302 172.284V178.215C367.302 186.902 366.946 186.724 384.303 186.709C392.243 186.702 399.29 186.347 399.964 185.919C401.04 185.236 401.189 174.47 401.189 97.1224C401.189 23.7236 401.003 8.87842 400.068 7.74809C398.433 5.77021 370.547 5.71037 368.585 7.68006ZM526.937 7.94153C519.783 10.0325 515.359 12.5834 510.029 17.6867C501.959 25.4129 498.766 34.4597 498.766 49.5975V58.8517H490.659C484.378 58.8517 482.263 59.1418 481.268 60.1394C480.214 61.1976 479.986 63.6558 479.986 73.91C479.986 82.5264 480.289 86.6977 480.966 87.3764C481.601 88.0141 484.903 88.36 490.356 88.36H498.766V136.692C498.766 183.638 498.811 185.048 500.345 185.873C502.433 186.994 529.394 186.994 531.482 185.873C533.016 185.048 533.061 183.638 533.061 136.692V88.36H549.334C563.038 88.36 565.809 88.1568 566.89 87.0723C568.782 85.1723 568.782 62.0394 566.89 60.1394C565.808 59.0541 563.029 58.8517 549.231 58.8517H532.856L533.216 51.9721C533.604 44.5499 534.721 41.9147 538.546 39.3958C540.377 38.1901 543.049 37.904 554.661 37.6737C562.626 37.5155 569.018 37.0343 569.602 36.5483C570.892 35.4761 571.046 10.3579 569.777 7.9776C568.978 6.47923 567.918 6.39562 550.384 6.45054C535.269 6.49808 530.93 6.77431 526.937 7.94153ZM654.931 26.4834C653.136 27.7662 653.094 28.1572 653.094 43.3245V58.8517H644.567C633.342 58.8517 633.497 58.6443 633.497 73.6059C633.497 88.5674 633.342 88.36 644.567 88.36H653.094V122.636C653.094 159.998 653.439 163.935 657.362 171.354C661.848 179.838 669.111 184.99 680.857 188.022C687.996 189.866 707.647 189.269 714.309 187.007C719.756 185.158 719.86 184.87 719.969 171.298C720.082 157.364 720.441 157.791 709.174 158.48C695.386 159.324 689.341 156.938 687.388 149.883C686.927 148.214 686.58 134.435 686.577 117.663L686.572 88.36H702.068H717.564L718.87 86.3592C719.946 84.7108 720.129 82.3461 719.91 72.9575C719.719 64.8279 719.321 61.1689 718.522 60.2041C717.553 59.0345 715.315 58.8517 701.987 58.8517H686.572L686.546 43.8926C686.526 31.8556 686.28 28.613 685.288 27.2941C684.156 25.7884 682.945 25.6351 670.412 25.4129C658.94 25.2088 656.476 25.3793 654.931 26.4834ZM431.459 60.1394C430.316 61.2877 430.178 68.0001 430.188 121.82C430.197 168.838 430.429 182.667 431.232 184.262L432.264 186.311L446.657 186.535C458.941 186.725 461.242 186.567 462.353 185.452C463.521 184.279 463.655 177.845 463.655 122.786C463.655 68.0985 463.515 61.2877 462.372 60.1394C460.469 58.2287 433.362 58.2287 431.459 60.1394ZM587.799 60.4369C587.238 61.4894 586.954 82.56 586.954 123.084C586.954 177.502 587.093 184.285 588.236 185.434C590.138 187.342 616.431 187.342 618.333 185.434C619.476 184.285 619.615 177.447 619.615 122.482C619.615 75.6149 619.38 60.5828 618.636 59.8353C617.947 59.1443 613.344 58.8517 603.15 58.8517C589.644 58.8517 588.586 58.9607 587.799 60.4369ZM347.956 87.3469C362.023 93.9543 369.138 107.306 367.775 124.535C366.623 139.097 359.678 149.866 347.83 155.463C337.073 160.544 325.541 160.523 315.049 155.403C293.381 144.83 288.765 112.315 306.417 94.5961C313.92 87.0641 322.021 84.1412 334.301 84.5354C341.49 84.7666 343.224 85.124 347.956 87.3469Z",fill:"currentColor"}),y.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.42299 0.744751C4.61699 2.15275 2.03999 5.66375 0.956994 12.2768C-0.369006 20.3728 -0.294006 170.791 1.03899 176.572C2.29699 182.031 4.81699 185.308 9.65399 187.774C13.265 189.615 16.865 189.684 108.63 189.684C163.129 189.684 204.095 189.304 204.41 188.795C206 188.5 206 188.795 207.5 188C211.167 187.079 216.779 180.138 218.005 175.584C218.682 173.068 218.939 143.952 218.756 90.4718C218.487 11.7478 218.417 9.10275 216.535 6.62675C215.466 5.22075 213.441 3.19575 212.035 2.12675C209.546 0.23575 206.839 0.17975 110.978 0.0167504C55.373 -0.0782496 11.148 0.239751 9.42299 0.744751ZM203.778 14.8838C205.558 16.6638 205.509 172.577 203.728 175.005C202.577 176.574 198.865 176.688 156.978 176.446L111.478 176.184L111.226 138.684L110.974 101.184H84.059C69.255 101.184 56.808 101.52 56.397 101.931C55.986 102.343 60.674 107.82 66.814 114.104C72.954 120.388 77.978 126.202 77.978 127.026C77.978 129.577 74.769 134.267 71.896 135.916C69.609 137.229 68.75 137.278 66.704 136.217C63.533 134.572 28.705 99.1448 27.757 96.5998C27.36 95.5348 27.491 93.4308 28.049 91.9238C28.955 89.4768 68.498 49.6838 70.024 49.6838C70.366 49.6838 72.356 51.1627 74.447 52.9697C77.589 55.6867 78.118 56.6658 77.498 58.6198C77.086 59.9198 72.075 65.8308 66.363 71.7568C60.651 77.6818 55.978 83.0148 55.978 83.6068C55.978 84.3488 64.068 84.6838 81.952 84.6838H107.927H110.666C111.144 82.5 110.978 73.4537 110.978 46.2337V13.6838H156.778C191.067 13.6838 202.88 13.9858 203.778 14.8838ZM148.803 52.7217C146.51 54.0597 144.845 59.5997 145.74 62.9107C146.146 64.4107 150.657 69.9308 155.764 75.1788C161.411 80.9788 164.547 84.8988 163.764 85.1788C163.057 85.4318 151.549 85.7608 138.19 85.9108C117.896 86.1388 113.747 86.4308 112.956 87.6838C112.435 88.5088 112.002 91.7228 111.993 94.8268C111.982 99.0598 112.373 100.622 113.56 101.077C114.43 101.411 126.13 101.684 139.56 101.684C156.121 101.684 163.978 102.026 163.978 102.746C163.978 103.33 160.187 107.607 155.554 112.251C146.244 121.582 144.276 125.371 146.069 130.514C147.321 134.107 149.576 135.684 153.463 135.684C155.522 135.684 159.843 131.902 173.778 117.904C191.699 99.9008 194.978 96.0678 194.978 93.1208C194.978 91.1338 157.422 53.8238 154.163 52.5728C151.322 51.4818 150.908 51.4937 148.803 52.7217Z",fill:"currentColor"})]})}function iR({shouldReload:e,isReloading:r,onReload:i,changeType:l,className:o="",compact:u=!1}){if(!e)return null;const c=()=>{switch(l){case"commit":return"New commits available";case"staging":return"Staging changes detected";case"file":return"File changes detected";default:return"Changes detected"}};return y.jsxs("button",{onClick:i,disabled:r,className:`
|
|
70
|
-
flex items-center gap-1.5 text-xs rounded-md border ${o} ${u?"px-2 py-2":"px-3 py-1.5"}
|
|
71
|
-
${r?"bg-github-text-primary text-github-bg-primary border-github-text-primary cursor-not-allowed":"bg-github-text-primary text-github-bg-primary border-github-text-primary"}
|
|
72
|
-
`,title:`${c()} - Click to refresh`,"aria-label":u?"Refresh":void 0,children:[y.jsx(_k,{size:12,className:`${r?"animate-spin":""}`}),u?y.jsx("span",{className:"sr-only",children:"Refresh"}):"Refresh"]})}function Gx({label:e,value:r,resolvedValue:i,onChange:l,options:o,disabledValues:u=[]}){const[c,f]=A.useState(!1),{refs:p,floatingStyles:h,context:b}=iu({open:c,onOpenChange:f,middleware:[Qs(4),Ws(),Js({padding:8})],whileElementsMounted:Zs}),g=eu(b,{handleClose:Kd()}),w=Zd(b),x=m0(b),v=ru(b),S=au(b),{getReferenceProps:C,getFloatingProps:N}=lu([g,w,x,v,S]),E=r==="working"&&u.includes("staged")||r==="staged"&&u.includes("working"),R=()=>{const B=o.specialOptions.find(V=>V.value===r);if(B)return B.label;const M=o.branches.find(V=>V.name===r);if(M)return`${M.name}${M.current?" (current)":""}`;const $=o.commits.find(V=>V.shortHash===r||V.hash===r);return $?`${$.shortHash} - ${$.message}`:r||"Select..."},O=B=>{l(B),f(!1)},H=B=>u.includes(B),_=(B,M)=>["w-full text-left px-3 py-2 text-xs focus:outline-none transition-colors",B?"hover:bg-diff-selected-bg focus:bg-diff-selected-bg":"hover:bg-github-bg-tertiary focus:bg-github-bg-tertiary",B?"bg-diff-selected-bg border-l-4 border-l-diff-selected-border font-semibold pl-2":"",M?"opacity-50 cursor-not-allowed":"cursor-pointer"].join(" "),F=(B,M)=>B===r||M===r?!0:i?B===i||M===i:!1,z=()=>{let B=0;const M=o.specialOptions.findIndex($=>$.value===r);if(M!==-1)return M;if(B+=o.specialOptions.length,!E){const $=o.commits.findIndex(J=>J.shortHash===r);if($!==-1)return B+$;B+=o.commits.length;const V=o.branches.findIndex(J=>J.name===r);if(V!==-1)return B+V}return 0};return y.jsxs(y.Fragment,{children:[y.jsxs("button",{ref:p.setReference,type:"button",className:"flex items-center gap-1.5 cursor-pointer group","aria-haspopup":"listbox","aria-expanded":c,...C(),children:[y.jsxs("span",{className:"text-xs text-github-text-secondary",children:[e,":"]}),y.jsxs("div",{className:"flex items-center gap-1 px-2 py-1 bg-github-bg-tertiary border border-github-border rounded hover:border-github-text-secondary transition-colors",children:[y.jsx("code",{className:"text-xs text-github-text-primary max-w-[150px] truncate",children:R()}),y.jsx(zl,{size:12,className:"text-github-text-secondary group-hover:text-github-text-primary transition-colors"})]})]}),c&&y.jsx(nu,{children:y.jsx(J3,{context:b,modal:!1,initialFocus:z(),children:y.jsxs("div",{ref:p.setFloating,style:h,className:"bg-github-bg-secondary border border-github-border rounded shadow-lg z-50 w-[360px] max-h-[400px] overflow-y-auto",...N(),children:[o.specialOptions.length>0&&y.jsxs("div",{className:"border-b border-github-border",children:[y.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary",children:"Special"}),o.specialOptions.map(B=>y.jsx("button",{onClick:()=>O(B.value),disabled:H(B.value),className:_(B.value===r,H(B.value)),children:B.label},B.value))]}),!E&&o.commits.length>0&&y.jsxs("div",{className:"border-b border-github-border",children:[y.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary",children:"Recent Commits"}),o.commits.map(B=>y.jsx("button",{onClick:()=>O(B.shortHash),disabled:H(B.shortHash),className:_(F(B.shortHash,B.hash),H(B.shortHash)),children:y.jsxs("div",{className:"flex items-start gap-2",children:[y.jsx("code",{className:"text-xs text-github-text-primary font-mono whitespace-nowrap",children:B.shortHash}),y.jsx("span",{className:"text-xs text-github-text-secondary flex-1 break-words",children:B.message})]})},B.hash))]}),!E&&o.branches.length>0&&y.jsxs("div",{children:[y.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary",children:"Branches"}),o.branches.map(B=>y.jsx("button",{onClick:()=>O(B.name),disabled:H(B.name),className:_(B.name===r,H(B.name)),children:y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"text-github-text-primary",children:B.name}),B.current&&y.jsx("span",{className:"text-xs text-github-text-muted",children:"(current)"})]})},B.name))]})]})})})]})}function lR({isOpen:e,onClose:r,options:i,baseRevision:l,targetRevision:o,resolvedBaseRevision:u,resolvedTargetRevision:c,onApply:f}){const[p,h]=A.useState(l),[b,g]=A.useState(o),{enableScope:w,disableScope:x}=eo();A.useEffect(()=>(e?x("navigation"):w("navigation"),()=>{w("navigation")}),[e,w,x]);const v=A.useMemo(()=>{const N=c||b,E=i.commits.findIndex(O=>O.shortHash===N||O.hash===N);if(E===-1)return b?[b]:[];const R=i.commits.slice(0,E+1).map(O=>O.shortHash);return b&&!R.includes(b)&&R.push(b),R.includes("working")||R.push("working"),R},[b,c,i.commits]),S=A.useMemo(()=>{const N=u||p,E=i.commits.findIndex(O=>O.shortHash===N||O.hash===N);if(E===-1)return p?[p]:[];const R=i.commits.slice(E).map(O=>O.shortHash);return p&&!R.includes(p)&&R.push(p),R},[p,u,i.commits]);if(!e)return null;const C=()=>{f(p,b),r()};return y.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[y.jsx("div",{className:"absolute inset-0 bg-black/40",onClick:r}),y.jsxs("div",{className:"relative bg-github-bg-secondary border border-github-border rounded-lg shadow-lg w-full max-w-lg mx-4",children:[y.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-github-border",children:[y.jsx("h2",{className:"text-lg font-semibold text-github-text-primary",children:"Detailed Diff"}),y.jsx("button",{onClick:r,className:"text-github-text-secondary hover:text-github-text-primary p-1","aria-label":"Close detailed diff",children:y.jsx(vu,{size:18})})]}),y.jsxs("div",{className:"p-4 space-y-4",children:[y.jsxs("div",{className:"flex items-center justify-center gap-3",children:[y.jsx(Gx,{label:"Base",value:p,resolvedValue:u,onChange:h,options:i,disabledValues:v}),y.jsx("span",{className:"text-github-text-muted",children:"..."}),y.jsx(Gx,{label:"Target",value:b,resolvedValue:c,onChange:g,options:i,disabledValues:S})]}),y.jsxs("div",{className:"flex justify-end gap-2",children:[y.jsx("button",{onClick:r,className:"px-3 py-1.5 text-xs font-medium rounded border border-github-border text-github-text-secondary hover:text-github-text-primary transition-colors",type:"button",children:"Cancel"}),y.jsx("button",{onClick:C,className:"px-3 py-1.5 text-xs font-medium rounded bg-github-accent text-white hover:bg-github-accent/90 transition-colors",type:"button",children:"Apply"})]})]})]})]})}const aR=[{id:"vscode",label:"VS Code",protocol:"vscode",cliCommand:"code",cliArgs:[],lineFormat:"goto-flag",aliases:["vscode","code"]},{id:"cursor",label:"Cursor",protocol:"cursor",cliCommand:"cursor",cliArgs:[],lineFormat:"goto-flag",aliases:["cursor"]},{id:"zed",label:"Zed",protocol:"zed",cliCommand:"zed",cliArgs:[],lineFormat:"path-suffix",aliases:["zed"]},{id:"none",label:"Hide “Open in editor” button",protocol:null,cliCommand:null,cliArgs:[],lineFormat:"goto-flag",aliases:["none","disabled","off"]}],Lv="vscode";function gu(e){return e.replaceAll("\\","/").replace(/^\.\/+/,"")}function oR(e){return e.replace(/[|\\{}()[\]^$+?.]/g,"\\$&")}function Dv(e){const r=new Set;return e.forEach(i=>{const l=i.trim();l&&r.add(gu(l))}),[...r]}function Yx(e){return gu(e).split("/").filter(r=>r.length>0)}function Ov(e,r){let i="^";for(const l of r){if(l==="*"){i+=".*";continue}if(l==="?"){i+=".";continue}i+=oR(l)}return i+="$",new RegExp(i).test(e)}function mh(e,r,i=0,l=0){if(l>=r.length)return i>=e.length;const o=r[l];if(!o)return i>=e.length;if(o==="**"){const c=l+1;if(c>=r.length)return!0;for(let f=i;f<=e.length;f+=1)if(mh(e,r,f,c))return!0;return!1}const u=e[i];return!u||!Ov(u,o)?!1:mh(e,r,i+1,l+1)}function np(e){return Array.isArray(e)?Dv(e.filter(r=>typeof r=="string")):[]}function sR(e){return Dv(e.split(/\r?\n/))}function Xx(e){return np(e).join(`
|
|
73
|
-
`)}function uR(e,r){const i=gu(r.trim());if(!i)return!1;const l=gu(e);if(!i.includes("/")){const o=l.split("/").pop()??l;return Ov(o,i)}return mh(Yx(l),Yx(i))}function cR(e,r){return np(r).some(i=>uR(e,i))}const Zx=[{id:"github",label:"GitHub Light"},{id:"vsLight",label:"VS Light"},{id:"oneLight",label:"One Light"},{id:"gruvboxMaterialLight",label:"Gruvbox Material Light"},{id:"nightOwlLight",label:"Night Owl Light"}],Kx=[{id:"vsDark",label:"VS Dark"},{id:"oneDark",label:"One Dark"},{id:"gruvboxMaterialDark",label:"Gruvbox Material Dark"},{id:"nightOwl",label:"Night Owl"},{id:"dracula",label:"Dracula"},{id:"okaidia",label:"Okaidia"}],Qx=e=>e==="top"?"translateY(4px)":e==="bottom"?"translateY(-4px)":e==="left"?"translateX(4px)":"translateX(-4px)",fR=(e,r)=>{if(typeof e=="function"){e(r);return}e&&"current"in e&&(e.current=r)};function dR({content:e,children:r,placement:i="top",className:l=""}){const[o,u]=A.useState(!1),c=A.useId(),{refs:f,floatingStyles:p,context:h}=iu({open:o,onOpenChange:u,placement:i,middleware:[Qs(8),Ws(),Js({padding:8})],whileElementsMounted:Zs}),b=eu(h,{move:!1}),g=m0(h),w=ru(h),x=au(h,{role:"tooltip"}),{isMounted:v,styles:S}=a4(h,{duration:{open:180,close:120},initial:({side:H})=>({opacity:0,transform:Qx(H)}),open:{opacity:1,transform:"translate(0, 0)"},close:({side:H})=>({opacity:0,transform:Qx(H)}),common:{willChange:"opacity, transform"}}),{getReferenceProps:C,getFloatingProps:N}=lu([b,g,w,x]),E=r.props,R=C({...E,"aria-describedby":o?c:void 0}),O=["w-64 rounded-md border border-github-border bg-github-bg-primary px-3 py-2 text-xs text-github-text-primary",l].filter(Boolean).join(" ");return y.jsxs(y.Fragment,{children:[A.cloneElement(r,{...R,ref:H=>{fR(E.ref,H),f.setReference(H)}}),v?y.jsx(nu,{children:y.jsx("div",{ref:f.setFloating,...N(),id:c,style:p,className:"z-[60]",children:y.jsx("div",{style:S,className:O,children:e})})}):null]})}const ii={fontSize:14,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif',theme:"dark",syntaxTheme:"vsDark",editor:Lv,colorVision:"normal",autoViewedPatterns:[]},hR=[{name:"System Font",value:'-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif'},{name:"Menlo",value:'Menlo, Monaco, "Courier New", monospace'},{name:"SF Mono",value:'SF Mono, Consolas, "Liberation Mono", monospace'},{name:"Fira Code",value:'"Fira Code", "Courier New", monospace'},{name:"JetBrains Mono",value:'"JetBrains Mono", "Courier New", monospace'}],pR=[{id:"normal",label:"Normal"},{id:"deuteranopia",label:"Deuteranopia",tooltip:"Deuteranopia mode uses blue/orange instead of green/red for diffs."}],mR=[{id:"appearance",label:"Appearance"},{id:"system",label:"System"}];function gR({isOpen:e,onClose:r,settings:i,onSettingsChange:l}){const[o,u]=A.useState(Xx(i.autoViewedPatterns)),[c,f]=A.useState("appearance"),{enableScope:p,disableScope:h}=eo();A.useEffect(()=>(e?h("navigation"):p("navigation"),()=>{p("navigation")}),[e,p,h]);const b=()=>i.theme==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":i.theme,g=()=>b()==="light"?Zx:Kx,w=v=>{const S={...i,theme:v},N=(v==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":v)==="light"?Zx:Kx;if(!N.some(R=>R.id===i.syntaxTheme)&&N.length>0){const R=N[0];R&&(S.syntaxTheme=R.id)}l(S)},x=()=>{if(c==="appearance"){l({...i,fontSize:ii.fontSize,fontFamily:ii.fontFamily,theme:ii.theme,syntaxTheme:ii.syntaxTheme,colorVision:ii.colorVision});return}l({...i,editor:ii.editor,autoViewedPatterns:ii.autoViewedPatterns}),u(Xx(ii.autoViewedPatterns))};return e?y.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-50 pointer-events-none",children:y.jsxs("div",{className:"bg-github-bg-secondary border border-github-border rounded-lg w-full max-w-3xl mx-4 pointer-events-auto overflow-hidden",children:[y.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-github-border",children:[y.jsxs("h2",{className:"text-lg font-semibold text-github-text-primary flex items-center gap-2",children:[y.jsx(C1,{size:20}),"Settings"]}),y.jsx("button",{onClick:r,className:"text-github-text-secondary hover:text-github-text-primary p-1",children:y.jsx(vu,{size:18})})]}),y.jsxs("div",{className:"flex flex-col sm:flex-row min-h-[420px]",children:[y.jsx("nav",{"aria-label":"Settings sections",className:"sm:w-40 border-b sm:border-b-0 sm:border-r border-github-border px-3 py-2",children:y.jsx("div",{className:"flex sm:flex-col gap-1",children:mR.map(v=>{const S=v.id===c;return y.jsx("button",{type:"button",onClick:()=>f(v.id),"aria-pressed":S,className:`flex-1 sm:flex-none text-left px-3 py-2 text-sm font-medium transition-colors border-b-2 sm:border-b-0 sm:border-l-2 ${S?"text-github-text-primary border-github-accent":"text-github-text-secondary border-transparent hover:text-github-text-primary"}`,children:v.label},v.id)})})}),y.jsxs("div",{className:"flex-1 p-4 sm:p-6 overflow-y-auto",children:[c==="appearance"&&y.jsxs("div",{className:"space-y-6",children:[y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Font Size"}),y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx("input",{type:"range",min:"10",max:"20",step:"1",value:i.fontSize,onChange:v=>l({...i,fontSize:Number.parseInt(v.target.value,10)}),className:"flex-1 accent-github-accent"}),y.jsxs("span",{className:"text-sm text-github-text-secondary w-8 text-right",children:[i.fontSize,"px"]})]})]}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Font Family"}),y.jsx("select",{value:i.fontFamily,onChange:v=>l({...i,fontFamily:v.target.value}),className:"w-full p-2 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm",children:hR.map(v=>y.jsx("option",{value:v.value,children:v.name},v.value))})]}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Theme"}),y.jsx("div",{className:"flex gap-2",children:["light","dark","auto"].map(v=>y.jsx("button",{type:"button",onClick:()=>w(v),className:`px-3 py-2 text-sm rounded border transition-colors ${i.theme===v?"bg-github-accent text-white border-github-accent":"bg-github-bg-tertiary text-github-text-secondary border-github-border hover:text-github-text-primary"}`,children:v.charAt(0).toUpperCase()+v.slice(1)},v))})]}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Color Vision"}),y.jsx("div",{className:"flex gap-2",children:pR.map(v=>{const S=(i.colorVision??"normal")===v.id,C=y.jsx("button",{type:"button",onClick:()=>l({...i,colorVision:v.id}),className:`px-3 py-2 text-sm rounded border transition-colors ${S?"bg-github-accent text-white border-github-accent":"bg-github-bg-tertiary text-github-text-secondary border-github-border hover:text-github-text-primary"}`,children:v.label},v.id);return"tooltip"in v?y.jsx(dR,{content:v.tooltip,children:C},v.id):C})})]}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Syntax Highlighting Theme"}),y.jsx("select",{value:i.syntaxTheme,onChange:v=>l({...i,syntaxTheme:v.target.value}),className:"w-full p-2 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm",children:g().map(v=>y.jsx("option",{value:v.id,children:v.label},v.id))})]})]}),c==="system"&&y.jsxs("div",{className:"space-y-6",children:[y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Open In Editor"}),y.jsx("select",{value:i.editor,onChange:v=>l({...i,editor:v.target.value}),className:"w-full p-2 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm",children:aR.map(v=>y.jsx("option",{value:v.id,children:v.label},v.id))})]}),y.jsxs("div",{children:[y.jsx("label",{htmlFor:"auto-viewed-patterns",className:"block text-sm font-medium text-github-text-primary mb-2",children:"Auto-Mark Viewed Patterns"}),y.jsx("p",{className:"text-sm text-github-text-secondary mb-2",children:"Files matching these glob patterns are marked as Viewed automatically. Enter one pattern per line."}),y.jsx("textarea",{id:"auto-viewed-patterns",value:o,onChange:v=>{u(v.target.value),l({...i,autoViewedPatterns:sR(v.target.value)})},rows:6,spellCheck:!1,placeholder:`*.test.ts
|
|
74
|
-
*.stories.tsx
|
|
75
|
-
src/generated/**`,className:"w-full p-3 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm font-mono"})]})]})]})]}),y.jsxs("div",{className:"flex items-center justify-between p-4 border-t border-github-border",children:[y.jsx("button",{onClick:x,className:"px-3 py-2 text-sm text-github-text-secondary hover:text-github-text-primary",children:c==="appearance"?"Reset Appearance Defaults":"Reset System Defaults"}),y.jsx("button",{onClick:r,className:"px-4 py-2 text-sm bg-github-accent text-white rounded hover:bg-green-600",children:"Close"})]})]})}):null}const Jx={position:"absolute",fontSize:"16px",pointerEvents:"none",zIndex:100,transform:"translateY(20px) scale(0.5)",opacity:0},bR=({isActive:e})=>e?y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"animate-sparkle-rise",style:{...Jx,left:"-12px",animationDelay:"0s"},children:"✨"}),y.jsx("div",{className:"animate-sparkle-rise",style:{...Jx,right:"-12px",animationDelay:"0.3s"},children:"✨"})]}):null,Wx={fontSize:14,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif',theme:"dark",syntaxTheme:"vsDark",editor:Lv,colorVision:"normal",autoViewedPatterns:[]};function yR(){const[e,r]=A.useState(()=>{try{const o=localStorage.getItem(Ud);if(o){const u=JSON.parse(o);return{...Wx,...u,autoViewedPatterns:np(u.autoViewedPatterns)}}}catch(o){console.warn("Failed to load appearance settings from localStorage:",o)}return Wx}),i=A.useCallback((o,u="normal")=>{s1(o,u)},[]);return A.useEffect(()=>{const o=document.documentElement;o.style.setProperty("--app-font-size",`${e.fontSize}px`),o.style.setProperty("--app-font-family",e.fontFamily);const u=e.colorVision??"normal";if(e.theme==="auto"){const c=window.matchMedia("(prefers-color-scheme: dark)");i(Is("auto",c.matches?"dark":"light"),u);const f=p=>{i(Is("auto",p.matches?"dark":"light"),u)};return c.addEventListener("change",f),()=>c.removeEventListener("change",f)}else{i(e.theme,u);return}},[e,i]),{settings:e,updateSettings:o=>{r(o);try{localStorage.setItem(Ud,JSON.stringify(o))}catch(u){console.warn("Failed to save appearance settings to localStorage:",u)}}}}function Mv(e,r,i,l){const o=typeof r=="number"?`L${r}`:Array.isArray(r)?`L${r[0]}-L${r[1]}`:"",u=e||"<unknown file>";if(A1(i)){const c=T1(i);if(c.length>0){let f=`${u}:${o}`,p=0;for(const b of c){const g=i.slice(p,b.startIndex).trim();g&&(f+=`
|
|
76
|
-
${g}`),l&&(f+=`
|
|
77
|
-
ORIGINAL:
|
|
78
|
-
\`\`\`
|
|
79
|
-
${l}
|
|
80
|
-
\`\`\``),f+=`
|
|
81
|
-
SUGGESTED:
|
|
82
|
-
\`\`\`
|
|
83
|
-
${b.suggestedCode}
|
|
84
|
-
\`\`\``,p=b.endIndex}const h=i.slice(p).trim();return h&&(f+=`
|
|
85
|
-
${h}`),f}}return`${u}:${o}
|
|
86
|
-
${i}`}function xR(e){return e.length===0?"":e.map(i=>Mv(i.file,i.line,i.body,i.codeContent)).join(`
|
|
87
|
-
=====
|
|
88
|
-
`)}const Os="difit-storage-v1";class vR{generateStorageKey(r,i){const l=o=>o.replace(/[^a-zA-Z0-9-_]/g,u=>`_${u.charCodeAt(0).toString(16)}_`);return`${l(r)}-${l(i)}`}normalizeCommitish(r,i,l){if(r==="."||r==="working")return"WORKING";if(r==="staged")return"STAGED";if((r==="HEAD"||r==="@")&&i)return i;if(l?.has(r)){const o=l.get(r);if(o)return o}return(r.startsWith("@")||r.includes("^")||r.includes("~")||r.includes("HEAD"))&&console.warn(`[StorageService] Cannot normalize symbolic ref '${r}' - may cause key collision. currentCommitHash=${i}`),r}getStorageKey(r,i,l,o,u){let c,f;i==="."||i==="working"?(c=l||r,f="WORKING"):i==="staged"?(c=l||r,f="STAGED"):(c=this.normalizeCommitish(r,l,o),f=this.normalizeCommitish(i,l,o));const p=this.generateStorageKey(c,f);return u?`${Os}/${u}/${p}`:`${Os}/${p}`}getDiffContextData(r,i,l,o,u){try{const c=this.getStorageKey(r,i,l,o,u),f=localStorage.getItem(c);if(!f)return null;const p=JSON.parse(f);return p.version!==1?(console.warn(`Unknown storage version: ${p.version}`),null):p}catch(c){return console.error("Error reading diff context data:",c),null}}saveDiffContextData(r,i,l,o,u,c){try{const f=this.getStorageKey(r,i,o,u,c),p={...l,baseCommitish:r,targetCommitish:i,lastModifiedAt:new Date().toISOString()};localStorage.setItem(f,JSON.stringify(p))}catch(f){f instanceof DOMException&&f.name==="QuotaExceededError"?console.error("localStorage quota exceeded"):console.error("Error saving diff context data:",f)}}getComments(r,i,l,o,u){return this.getDiffContextData(r,i,l,o,u)?.comments||[]}saveComments(r,i,l,o,u,c){const p=this.getDiffContextData(r,i,o,u,c)||{version:1,baseCommitish:r,targetCommitish:i,createdAt:new Date().toISOString(),lastModifiedAt:new Date().toISOString(),comments:[],viewedFiles:[]};p.comments=l,this.saveDiffContextData(r,i,p,o,u,c)}getViewedFiles(r,i,l,o,u){return this.getDiffContextData(r,i,l,o,u)?.viewedFiles||[]}saveViewedFiles(r,i,l,o,u,c){const p=this.getDiffContextData(r,i,o,u,c)||{version:1,baseCommitish:r,targetCommitish:i,createdAt:new Date().toISOString(),lastModifiedAt:new Date().toISOString(),comments:[],viewedFiles:[]};p.viewedFiles=l,this.saveDiffContextData(r,i,p,o,u,c)}cleanupOldData(r){const i=new Date;i.setDate(i.getDate()-r);const l=i.getTime(),o=[];for(let u=0;u<localStorage.length;u++){const c=localStorage.key(u);if(c?.startsWith(Os))try{const f=localStorage.getItem(c);if(!f)continue;const p=JSON.parse(f);new Date(p.lastModifiedAt).getTime()<l&&o.push(c)}catch{}}o.forEach(u=>localStorage.removeItem(u))}getStorageSize(){let r=0;for(let i=0;i<localStorage.length;i++){const l=localStorage.key(i);if(!l?.startsWith(Os))continue;const o=localStorage.getItem(l);o&&(r+=(l.length+o.length)*2)}return r}}const Ya=new vR;async function e1(e){try{const i=new TextEncoder().encode(e),l=await crypto.subtle.digest("SHA-256",i);return Array.from(new Uint8Array(l)).map(u=>u.toString(16).padStart(2,"0")).join("")}catch{return console.warn("Crypto API not available, using fallback hash"),wR(e)}}function wR(e){let r=0;for(let i=0;i<e.length;i++){const l=e.charCodeAt(i);r=(r<<5)-r+l,r=r&r}return Math.abs(r).toString(16)}function t1(e){const r=e.chunks.map(i=>{const l=i.lines.filter(o=>o.type!=="hunk"&&o.type!=="header").map(o=>`${o.type}:${o.content}`).join(`
|
|
89
|
-
`);return`${i.header}
|
|
90
|
-
${l}`}).join(`
|
|
91
|
-
|
|
92
|
-
`);return`${e.path}
|
|
93
|
-
${e.status}
|
|
94
|
-
${r}`}function SR(e,r,i,l,o){const[u,c]=A.useState([]);A.useEffect(()=>{if(!e||!r)return;const v=Ya.getComments(e,r,i,l,o);c(v)},[e,r,i,l,o]);const f=A.useCallback(v=>{!e||!r||(Ya.saveComments(e,r,v,i,l,o),c(v))},[e,r,i,l,o]),p=A.useCallback(v=>{const S={id:crypto.randomUUID(),filePath:v.filePath,body:v.body,author:"User",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),position:{side:v.side,line:v.line},codeSnapshot:v.codeSnapshot||{content:"",language:oC(v.filePath)}},C=[...u,S];return f(C),S},[u,f]),h=A.useCallback(v=>{const S=u.filter(C=>C.id!==v);f(S)},[u,f]),b=A.useCallback((v,S)=>{const C=u.map(N=>N.id===v?{...N,body:S,updatedAt:new Date().toISOString()}:N);f(C)},[u,f]),g=A.useCallback(()=>{f([])},[f]),w=A.useCallback(v=>{const S=u.find(N=>N.id===v);if(!S)return"";const C=typeof S.position.line=="number"?S.position.line:[S.position.line.start,S.position.line.end];return Mv(S.filePath,C,S.body,S.codeSnapshot?.content)},[u]),x=A.useCallback(()=>{const v=u.map(S=>({id:S.id,file:S.filePath,line:typeof S.position.line=="number"?S.position.line:[S.position.line.start,S.position.line.end],body:S.body,timestamp:S.createdAt,author:S.author,codeContent:S.codeSnapshot?.content}));return xR(v)},[u]);return{comments:u,addComment:p,removeComment:h,updateComment:b,clearAllComments:g,generatePrompt:w,generateAllCommentsPrompt:x}}const kR=20;async function n1(e,r){const i=encodeURIComponent(e),l=await fetch(`/api/blob/${i}?ref=${encodeURIComponent(r)}`);if(!l.ok)throw new Error(`Failed to fetch file content: ${l.statusText}`);const u=(await l.text()).split(`
|
|
95
|
-
`);return u.length>0&&u[u.length-1]===""&&u.pop(),{lines:u,totalLines:u.length}}async function ER(e,r,i,l){const o=encodeURIComponent(e),u=new URLSearchParams;r&&u.set("oldRef",r),i&&u.set("newRef",i),l&&l!==e&&u.set("oldPath",l);const c=await fetch(`/api/line-count/${o}?${u}`);if(!c.ok)throw new Error(`Failed to fetch line count: ${c.statusText}`);return c.json()}function CR({baseCommitish:e,targetCommitish:r}){const[i,l]=A.useState({}),[o,u]=A.useState(!1),[c,f]=A.useState(null),[p,h]=A.useState(0),b=A.useRef(new Map),g=A.useRef({});g.current=i;const w=A.useCallback(async _=>{const F=b.current.get(_.path);if(F)return F;const z=(async()=>{const B=g.current[_.path];if(B?.oldContent&&B?.newContent)return B;const M={...B,expandedRanges:B?.expandedRanges||[]};if(_.status!=="added"&&e){const $=_.oldPath||_.path;try{const{lines:V,totalLines:J}=await n1($,e);M.oldContent=V,M.oldTotalLines=J}catch(V){console.error("Failed to fetch old file content:",V),M.oldContent=[],M.oldTotalLines=0}}if(_.status!=="deleted"&&r)try{const{lines:$,totalLines:V}=await n1(_.path,r);M.newContent=$,M.newTotalLines=V}catch($){console.error("Failed to fetch new file content:",$),M.newContent=[],M.newTotalLines=0}return M})();b.current.set(_.path,z);try{return await z}finally{b.current.delete(_.path)}},[e,r]),x=A.useCallback(_=>{f(_),h(F=>F+1)},[]),v=A.useCallback(async(_,F,z,B=kR)=>{u(!0);try{const M=await w(_);l($=>{const V=$[_.path],J=V?.expandedRanges||M.expandedRanges||[],I=J.findIndex(U=>U.chunkIndex===F&&U.direction===z),Z=[...J];if(I>=0&&Z[I]){const U=Z[I];Z[I]={chunkIndex:U.chunkIndex,direction:U.direction,count:U.count+B}}else Z.push({chunkIndex:F,direction:z,count:B});return{...$,[_.path]:{oldContent:V?.oldContent??M.oldContent,newContent:V?.newContent??M.newContent,oldTotalLines:V?.oldTotalLines??M.oldTotalLines,newTotalLines:V?.newTotalLines??M.newTotalLines,expandedRanges:Z}}}),x(_.path)}finally{u(!1)}},[w,x]),S=A.useCallback(async(_,F,z)=>{u(!0);try{const B=await w(_);l(M=>{const $=M[_.path],J=[...$?.expandedRanges||B.expandedRanges||[]],I=J.findIndex(D=>D.chunkIndex===F&&D.direction==="up"),Z=J.findIndex(D=>D.chunkIndex===F-1&&D.direction==="down");let U=0,Y=0;I>=0&&J[I]&&(U=J[I].count),Z>=0&&J[Z]&&(Y=J[Z].count);const X=U+Y+z,q=J.filter(D=>!(D.chunkIndex===F-1&&D.direction==="down")),j=q.findIndex(D=>D.chunkIndex===F&&D.direction==="up");return j>=0&&q[j]?q[j]={chunkIndex:F,direction:"up",count:X}:q.push({chunkIndex:F,direction:"up",count:X}),{...M,[_.path]:{oldContent:$?.oldContent??B.oldContent,newContent:$?.newContent??B.newContent,oldTotalLines:$?.oldTotalLines??B.oldTotalLines,newTotalLines:$?.newTotalLines??B.newTotalLines,expandedRanges:q}}}),x(_.path)}finally{u(!1)}},[w,x]),C=A.useCallback(async _=>{const F=g.current[_.path];if(F?.oldTotalLines!==void 0||F?.newTotalLines!==void 0)return;const z=_.status!=="added"?e:void 0,B=_.status!=="deleted"?r:void 0;if(!(!z&&!B))try{const{oldLineCount:M,newLineCount:$}=await ER(_.path,z,B,_.oldPath);l(V=>{const J=V[_.path];return J?.oldTotalLines!==void 0||J?.newTotalLines!==void 0?V:{...V,[_.path]:{...J,expandedRanges:J?.expandedRanges||[],oldTotalLines:M,newTotalLines:$}}}),x(_.path)}catch(M){console.error("Failed to prefetch line count:",M)}},[e,r,x]),N=A.useCallback((_,F,z)=>{const B=i[_];return B&&B.expandedRanges.find($=>$.chunkIndex===F&&$.direction===z)?.count||0},[i]),E=A.useCallback((_,F,z)=>{if(_.status==="added"||_.status==="deleted")return 0;const B=_.chunks[z-1];let M;if(!B)M=F.oldStart-1;else{const J=B.oldStart+B.oldLines;M=F.oldStart-J}const $=N(_.path,z,"up"),V=z>0?N(_.path,z-1,"down"):0;return Math.max(0,M-$-V)},[N]),R=A.useCallback((_,F,z)=>{if(_.status==="added"||_.status==="deleted")return 0;const B=i[_.path],M=B?.oldTotalLines||B?.newTotalLines;if(M===void 0)return _.chunks[z+1]?0:-1;if(_.chunks[z+1])return 0;const V=F.oldStart+F.oldLines-1,J=M-V,I=N(_.path,z,"down");return Math.max(0,J-I)},[i,N]),O=A.useCallback((_,F,z)=>{const B=i[_.path];if(!B)return F;const M=N(_.path,z,"up"),$=N(_.path,z,"down");if(M===0&&$===0)return F;const V=B.oldContent||[],J=B.newContent||[],I=[];if(M>0){const Y=_.chunks[z-1];let X;Y?X=Y.oldStart+Y.oldLines-1:X=Math.max(0,F.oldStart-1-M);const q=F.oldStart-1,j=F.newStart-1,D=Math.min(M,q-X),P=q-D,T=j-D;for(let W=0;W<D;W++){const te=P+W+1,ce=T+W+1,me=V[te-1]??J[ce-1]??"";I.push({type:"normal",content:me,oldLineNumber:te,newLineNumber:ce,isExpanded:!0})}}if(I.push(...F.lines),$>0){const Y=F.oldStart+F.oldLines-1,X=F.newStart+F.newLines-1,q=_.chunks[z+1],j=q?q.oldStart-1:B.oldTotalLines||Y,D=Math.min($,j-Y);for(let P=0;P<D;P++){const T=Y+P+1,W=X+P+1,te=V[T-1]??J[W-1]??"";I.push({type:"normal",content:te,oldLineNumber:T,newLineNumber:W,isExpanded:!0})}}const Z=I[0],U=I[I.length-1];return{...F,lines:I,oldStart:Z?.oldLineNumber??F.oldStart,newStart:Z?.newLineNumber??F.newStart,oldLines:(U?.oldLineNumber??F.oldStart+F.oldLines-1)-(Z?.oldLineNumber??F.oldStart)+1,newLines:(U?.newLineNumber??F.newStart+F.newLines-1)-(Z?.newLineNumber??F.newStart)+1}},[i,N]),H=A.useCallback(_=>{const F=[];for(let z=0;z<_.chunks.length;z++){const B=_.chunks[z];if(!B)continue;const M=O(_,B,z),$=E(_,B,z),V=R(_,B,z),J=F[F.length-1];if(J&&$===0){J.lines=[...J.lines,...M.lines],J.originalIndices.push(z),J.hiddenLinesAfter=V;const I=J.lines[J.lines.length-1];J.oldLines=(I?.oldLineNumber??J.oldStart+J.oldLines-1)-J.oldStart+1,J.newLines=(I?.newLineNumber??J.newStart+J.newLines-1)-J.newStart+1}else F.push({...M,originalIndices:[z],hiddenLinesBefore:$,hiddenLinesAfter:V})}return F},[O,E,R]);return{expandedState:i,isLoading:o,lastUpdatedFilePath:c,lastUpdatedAt:p,expandLines:v,expandAllBetweenChunks:S,prefetchFileContent:C,getMergedChunks:H,getHiddenLinesBefore:E,getHiddenLinesAfter:R}}var zv=(e=>(e.DEFAULT="default",e.WORKING="working",e.STAGED="staged",e.DOT="dot",e.SPECIFIC="specific",e))(zv||{});function NR(e){const r=A.useRef(null),i=A.useRef(null),l=A.useRef(0),o=5,u=3e3,[c,f]=A.useState({isWatchEnabled:!1,diffMode:zv.DEFAULT,shouldReload:!1,isReloading:!1,lastChangeTime:null,lastChangeType:null,connectionStatus:"disconnected"}),[p,h]=A.useState(null),b=A.useCallback(()=>{if(!r.current)try{const x=new EventSource("/api/watch");r.current=x,x.onopen=()=>{console.log("Connected to file watch service"),f(v=>({...v,connectionStatus:"connected"})),l.current=0,h(null)},x.onmessage=v=>{try{const S=JSON.parse(v.data);switch(S.type){case"connected":f(C=>({...C,isWatchEnabled:!0,diffMode:S.diffMode,connectionStatus:"connected"}));break;case"reload":console.log("File changes detected, showing reload button:",S.changeType),f(C=>({...C,shouldReload:!0,lastChangeTime:new Date,lastChangeType:S.changeType}));break;case"error":console.error("File watch error:",S.message),h(S.message||"File watch error occurred");break}}catch(S){console.error("Error parsing watch event:",S)}},x.onerror=()=>{console.log("File watch connection lost"),f(v=>({...v,connectionStatus:"disconnected"})),r.current&&(r.current.close(),r.current=null),l.current<o?(f(v=>({...v,connectionStatus:"reconnecting"})),l.current+=1,i.current=setTimeout(()=>{console.log(`Attempting to reconnect to file watch service (${l.current}/${o})...`),b()},u)):(console.error("Max reconnection attempts reached"),h("Lost connection to file watch service"))}}catch(x){console.error("Failed to connect to file watch service:",x),h("Failed to connect to file watch service")}},[o,u]),g=A.useCallback(async()=>{if(!c.isReloading){f(x=>({...x,isReloading:!0}));try{e&&await e(),f(x=>({...x,shouldReload:!1,isReloading:!1,lastChangeTime:null,lastChangeType:null}))}catch(x){console.error("Reload failed:",x),h("Failed to reload diff data"),f(v=>({...v,isReloading:!1}))}}},[e,c.isReloading]),w=()=>{r.current&&(r.current.close(),r.current=null),i.current&&(clearTimeout(i.current),i.current=null)};return A.useEffect(()=>(b(),w),[b]),A.useEffect(()=>w,[]),{shouldReload:c.shouldReload,isConnected:c.connectionStatus==="connected",error:p,reload:g,watchState:c}}const gh={SCROLL_CONTAINER:"main.overflow-y-auto"};function li(e,r){const i=`file-${e.fileIndex}-chunk-${e.chunkIndex}-line-${e.lineIndex}`;return r==="split"?`${i}-${e.side}`:i}function Fv(e,r){return`${e}:${r}`}function AR(e,r){const i=r[e.fileIndex]?.chunks[e.chunkIndex]?.lines[e.lineIndex];return i&&(i.type==="add"||i.type==="delete"||i.type==="normal")?i.type:null}function kn(e,r){const i=AR(e,r);return i?i==="normal"?!0:i==="delete"?e.side==="left":i==="add"?e.side==="right":!1:!1}function Iv(e,r){return kn(e,r)?e:{...e,side:e.side==="left"?"right":"left"}}const r1={VIEWPORT_OFFSET_RATIO:1/3};function TR(e,r,i,l){return{line:o=>{const u=e[o.fileIndex];return!u||l?.has(u.path)?!1:i==="unified"||kn(o,e)},chunk:o=>{const u=e[o.fileIndex];if(!u||l?.has(u.path))return!1;const c=u.chunks[o.chunkIndex]?.lines[o.lineIndex];if(!c||c.type==="normal")return!1;if(o.lineIndex===0)return!0;const f=u.chunks[o.chunkIndex]?.lines[o.lineIndex-1];return!f||f.type==="normal"},comment:o=>{const u=e[o.fileIndex];if(!u||l?.has(u.path))return!1;const c=u.chunks[o.chunkIndex]?.lines[o.lineIndex];if(!c||c.type==="delete")return!1;const f=c.newLineNumber;if(!f)return!1;const p=Fv(u.path,f);return r.has(p)},file:o=>o.chunkIndex===0&&o.lineIndex===0}}function jR(){return e=>{const r=document.getElementById(e);if(!r)return;const i=document.querySelector(gh.SCROLL_CONTAINER);if(!i)throw new Error(`Scrollable container (${gh.SCROLL_CONTAINER}) not found`);const l=r.getBoundingClientRect(),o=i.getBoundingClientRect(),u=i.clientHeight,c=i.scrollTop,f=Math.max(o.top,0),p=Math.min(o.bottom,window.innerHeight);if(!(l.top>=f&&l.bottom<=p)){const S=RR(r,i)-u*r1.VIEWPORT_OFFSET_RATIO;i.scrollTop=Math.max(0,S);return}const b=l.bottom>Math.min(o.bottom,window.innerHeight),w=r.offsetTop-i.offsetTop-u*r1.VIEWPORT_OFFSET_RATIO,x=w>c;b&&x&&(i.scrollTop=Math.max(0,w))}}function RR(e,r){let i=e,l=0;for(;i&&i!==r&&i.offsetParent;)l+=i.offsetTop,i=i.offsetParent;return i&&i!==r&&(l+=i.offsetTop),l}function _R(e){return e||{fileIndex:0,chunkIndex:0,lineIndex:-1,side:"right"}}function LR(e,r,i){return i&&e.fileIndex===r.fileIndex&&e.chunkIndex===r.chunkIndex&&e.lineIndex===r.lineIndex}function DR(e,r,i){let{fileIndex:l,chunkIndex:o,lineIndex:u}=e;const c=i.length;let f=0;if(r==="next")for(u++;f<c;){if(i[l]?.chunks[o]?.lines[u])return{...e,fileIndex:l,chunkIndex:o,lineIndex:u};o++,u=0,i[l]?.chunks[o]||(l++,o=0,u=0,l>=c&&(l=0,f++))}else for(u--;f<c;){if(u<0)if(o--,o<0){l--,l<0&&(l=c-1,f++);const p=i[l];if(p&&p.chunks.length>0){o=p.chunks.length-1;const h=p.chunks[o];u=h&&h.lines.length>0?h.lines.length-1:-1}else o=-1,u=-1}else{const p=i[l]?.chunks[o];u=p&&p.lines.length>0?p.lines.length-1:-1}if(u>=0&&i[l]?.chunks[o]?.lines[u])return{...e,fileIndex:l,chunkIndex:o,lineIndex:u};u<0||u--}return null}function OR(e,r,i,l,o){let u=e,c=!1;for(;u;){const f=DR(u,r,l);if(!f||(u=f,LR(u,e,c)))break;if(c=!0,i(u,l)){const p=Iv(u,l);return{position:p,scrollTarget:li(p,o)}}}return{position:null,scrollTarget:null}}function MR({files:e,comments:r,viewMode:i=to,reviewedFiles:l,onToggleReviewed:o,onCreateComment:u,onCopyAllComments:c,onDeleteAllComments:f,onShowCommentsList:p,onRefresh:h}){const[b,g]=A.useState(null),[w,x]=A.useState(!1),v=A.useMemo(()=>jR(),[]),S=A.useMemo(()=>{const $=new Map;return r.forEach(V=>{const J=Array.isArray(V.line)?V.line[0]:V.line,I=Fv(V.file,J);$.has(I)||$.set(I,[]),$.get(I)?.push(V)}),$},[r]),C=A.useMemo(()=>TR(e,S,i,l),[e,S,i,l]),N=A.useCallback(($,V)=>{if(e.length===0)return{position:null,scrollTarget:null};const J=_R(b);return OR(J,$,V,e,i)},[b,e,i]),E=A.useCallback($=>V=>{const J=N(V,$);J.position&&(g(J.position),J.scrollTarget&&v(J.scrollTarget))},[N,v]),R=A.useMemo(()=>E(C.line),[E,C.line]),O=A.useMemo(()=>E(C.chunk),[E,C.chunk]),H=A.useMemo(()=>E(C.file),[E,C.file]),_=A.useMemo(()=>E(C.comment),[E,C.comment]),F=A.useCallback($=>{if(!b||i!=="split")return;let V={...b,side:$};const J=e[b.fileIndex]?.chunks[b.chunkIndex]?.lines[b.lineIndex];if(J){if($==="left"&&J.type==="add"&&b.lineIndex>0){if(e[b.fileIndex]?.chunks[b.chunkIndex]?.lines[b.lineIndex-1]?.type==="delete"){V={...V,lineIndex:b.lineIndex-1},g(V),v(li(V,i));return}}else if($==="right"&&J.type==="delete"&&e[b.fileIndex]?.chunks[b.chunkIndex]?.lines[b.lineIndex+1]?.type==="add"){V={...V,lineIndex:b.lineIndex+1},g(V),v(li(V,i));return}}if(!kn(V,e)){const I=e[b.fileIndex];if(!I)return;const Z=I.chunks[b.chunkIndex];if(Z){for(let U=b.lineIndex+1;U<Z.lines.length;U++){const Y={...V,lineIndex:U};if(kn(Y,e)){V=Y;break}}if(!kn(V,e))for(let U=b.lineIndex-1;U>=0;U--){const Y={...V,lineIndex:U};if(kn(Y,e)){V=Y;break}}}if(!kn(V,e)){for(let U=b.chunkIndex+1;U<I.chunks.length;U++){const Y=I.chunks[U];if(Y){for(let X=0;X<Y.lines.length;X++){const q={...V,chunkIndex:U,lineIndex:X};if(kn(q,e)){V=q;break}}if(kn(V,e))break}}if(!kn(V,e))for(let U=b.chunkIndex-1;U>=0;U--){const Y=I.chunks[U];if(Y){for(let X=Y.lines.length-1;X>=0;X--){const q={...V,chunkIndex:U,lineIndex:X};if(kn(q,e)){V=q;break}}if(kn(V,e))break}}}}g(V),v(li(V,i))},[b,i,v,e]),z=A.useCallback(()=>{const $=document.querySelector(gh.SCROLL_CONTAINER);if(!$)return;const V=$.getBoundingClientRect(),J=V.top+V.height/2;let I=1/0,Z=null;e.forEach((U,Y)=>{U.chunks.forEach((X,q)=>{X.lines.forEach((j,D)=>{const P=i==="split"?["left","right"]:["right"];for(const T of P){const W={fileIndex:Y,chunkIndex:q,lineIndex:D,side:T};if(i==="split"&&!kn(W,e))continue;const te=li(W,i),ce=document.getElementById(te);if(ce){const me=ce.getBoundingClientRect(),xe=me.top+me.height/2,ge=Math.abs(xe-J);me.top<V.bottom&&me.bottom>V.top&&ge<I&&(I=ge,Z=W)}}})})}),Z&&g(Z)},[e,i,g]),B=A.useCallback($=>{if(!$){g(null);return}const V=Iv($,e);g(V),v(li(V,i))},[e,i,v]),M={scopes:"navigation",enableOnFormTags:!1,preventDefault:!0};return lt("j, down",()=>R("next"),M,[R]),lt("k, up",()=>R("prev"),M,[R]),lt("n",()=>O("next"),M,[O]),lt("p",()=>O("prev"),M,[O]),lt("shift+n",()=>_("next"),M,[_]),lt("shift+p",()=>_("prev"),M,[_]),lt("]",()=>H("next"),{...M,useKey:!0},[H]),lt("[",()=>H("prev"),{...M,useKey:!0},[H]),lt("{",()=>{e.length>0&&(g({fileIndex:0,chunkIndex:0,lineIndex:0,side:i==="split"?"left":"right"}),v(li({fileIndex:0,chunkIndex:0,lineIndex:0,side:i==="split"?"left":"right"},i)))},{...M,useKey:!0},[e,i,v]),lt("}",()=>{if(e.length>0){const $=e.length-1,V=e[$];V&&V.chunks.length>0&&(g({fileIndex:$,chunkIndex:0,lineIndex:0,side:i==="split"?"left":"right"}),v(li({fileIndex:$,chunkIndex:0,lineIndex:0,side:i==="split"?"left":"right"},i)))}},{...M,useKey:!0},[e,i,v]),lt("h, left",()=>F("left"),{...M,enabled:i==="split"},[F,i]),lt("l, right",()=>F("right"),{...M,enabled:i==="split"},[F,i]),lt("v",()=>{if(b){const $=e[b.fileIndex];$&&o($.path)}},M,[b,e,o]),lt("shift+r",()=>{h&&h()},M,[h]),lt("c",()=>{if(b&&u){const $=e[b.fileIndex]?.chunks[b.chunkIndex]?.lines[b.lineIndex];$&&$.type!=="delete"&&u()}},M,[b,e,u]),lt("?",()=>x(!w),{...M,useKey:!0},[w]),lt(".",$=>{$.ctrlKey||$.altKey||$.shiftKey||$.metaKey||(z(),$.preventDefault())},{...M,useKey:!0,preventDefault:!1},[z]),lt("shift+c",()=>{c&&c()},{...M,scopes:["navigation","comments-list"]},[c]),lt("shift+d",()=>{f&&f()},{...M,scopes:["navigation","comments-list"]},[f]),lt("shift+l",()=>{p&&p()},M,[p]),{cursor:b,isHelpOpen:w,setIsHelpOpen:x,setCursorPosition:B}}const Id=new Map;let zR=0;function Fs(e){return Id.has(e)||Id.set(e,`file-${++zR}`),Id.get(e)??""}const FR=8,IR="1200px 0px",i1=60,BR=180;function UR({diffData:e,diffScrollContainerRef:r,setDiffData:i}){const[l,o]=A.useState(new Set),u=A.useRef(new Set),c=A.useRef(null),f=A.useRef(new Map),p=A.useRef(new Set),h=A.useRef(null),b=A.useRef(0);A.useEffect(()=>{if(!e){const E=new Set;u.current=E,o(E),p.current.clear(),h.current=null;return}const S=`${e.requestedBaseCommitish??""}:${e.requestedTargetCommitish??""}`;if(h.current===S)return;h.current=S;const C=e.files.slice(0,FR).map(E=>E.path),N=new Set(C);u.current=N,o(N),p.current.clear()},[e]);const g=A.useCallback(S=>{const C=f.current.get(S);C&&c.current&&c.current.unobserve(C),o(N=>{if(N.has(S))return N;const E=new Set(N);return E.add(S),u.current=E,E})},[]),w=A.useCallback((S,C)=>{const N=c.current,E=f.current.get(S);if(E&&N&&N.unobserve(E),!C){f.current.delete(S);return}f.current.set(S,C),!(u.current.has(S)||!N)&&N.observe(C)},[]);A.useEffect(()=>{if(c.current&&c.current.disconnect(),!e){c.current=null;return}const S=new IntersectionObserver(C=>{o(N=>{let E=!1;const R=new Set(N);return C.forEach(O=>{if(!O.isIntersecting)return;const H=O.target.dataset.filePath;!H||R.has(H)||(R.add(H),S.unobserve(O.target),E=!0)}),E&&(u.current=R),E?R:N})},{root:r.current,rootMargin:IR});return c.current=S,f.current.forEach((C,N)=>{u.current.has(N)||S.observe(C)}),()=>{S.disconnect(),c.current=null}},[e,r]);const x=A.useCallback(S=>{if(!e)return;const C=e.files.findIndex(E=>E.path===S);if(C<0)return;const N=c.current;o(E=>{let R=!1;const O=new Set(E);for(let H=0;H<=C;H++){const _=e.files[H]?.path;if(_&&!O.has(_)){O.add(_),R=!0;const F=f.current.get(_);F&&N&&N.unobserve(F)}}return R&&(u.current=O),R?O:E})},[e]),v=A.useCallback(S=>{x(S);const C=e?.files.findIndex(F=>F.path===S)??-1,N=e&&C>=0?e.files.slice(0,C+1).map(F=>Fs(F.path)):[Fs(S)],E=b.current+1;b.current=E;const R=()=>{for(const F of N){const z=document.getElementById(F);if(!z||z.dataset.rendered!=="true")return!1}return!0},O=F=>{const z=r.current,B=document.getElementById(Fs(S));if(!z||!B)return!1;const M=z.getBoundingClientRect(),$=B.getBoundingClientRect(),V=z.scrollTop+($.top-M.top);return z.scrollTo({top:Math.max(0,V),behavior:F}),!0};let H=0;const _=()=>{requestAnimationFrame(()=>{if(b.current===E){if(!R()){H<i1&&(H++,_());return}if(!O("smooth")){H<i1&&(H++,_());return}window.setTimeout(()=>{b.current===E&&O("smooth")},BR)}})};_()},[e,r,x]);return A.useEffect(()=>{if(!e||e.targetCommitish==="stdin")return;const S=e.targetCommitish||"HEAD",C=`${e.requestedBaseCommitish??""}...${e.requestedTargetCommitish??""}`;e.files.forEach(N=>{if(!l.has(N.path)||N.isGenerated!==!1||N.status==="deleted")return;const E=`${C}:${S}:${N.path}`;if(p.current.has(E))return;p.current.add(E);const R=encodeURIComponent(N.path);fetch(`/api/generated-status/${R}?ref=${encodeURIComponent(S)}`).then(O=>O.ok?O.json():null).then(O=>{!O||O.isGenerated!==!0||i(H=>{if(!H||H.requestedBaseCommitish!==e.requestedBaseCommitish||H.requestedTargetCommitish!==e.requestedTargetCommitish)return H;let _=!1;const F=H.files.map(z=>z.path!==N.path||z.isGenerated?z:(_=!0,{...z,isGenerated:!0}));return _?{...H,files:F}:H})}).catch(()=>{})})},[e,l,i]),{renderedFilePaths:l,ensureFileRendered:g,ensureFilesRenderedUpTo:x,registerLazyFileContainer:w,scrollFileIntoDiffContainer:v}}function HR(e,r,i,l,o,u,c=[]){const[f,p]=A.useState([]),[h,b]=A.useState(new Map);A.useEffect(()=>{if(!e||!r)return;const E=Ya.getViewedFiles(e,r,i,l,u);(async()=>{if(o&&o.length>0){const O=[],H=new Set(E.map(_=>_.filePath));for(const _ of o)if((_.isGenerated||_.status==="deleted"||cR(_.path,c))&&!H.has(_.path))try{const z=t1(_),B=await e1(z),M={filePath:_.path,viewedAt:new Date().toISOString(),diffContentHash:B};O.push(M)}catch(z){console.error("Failed to generate hash for auto-collapsed file:",z)}if(O.length>0){const _=[...E,...O];Ya.saveViewedFiles(e,r,_,i,l,u),p(_);return}}p(E)})()},[e,r,i,l,u]);const g=A.useCallback(E=>{!e||!r||(Ya.saveViewedFiles(e,r,E,i,l,u),p(E))},[e,r,i,l,u]),w=A.useMemo(()=>new Set(f.map(E=>E.filePath)),[f]),x=A.useCallback(E=>f.find(R=>R.filePath===E),[f]),v=A.useCallback(async E=>{const R=h.get(E.path);if(R)return R;const O=t1(E),H=await e1(O);return b(_=>new Map(_).set(E.path,H)),H},[h]),S=A.useCallback(async(E,R)=>{const O=x(E);if(!O)return!1;const H=await v(R);return O.diffContentHash!==H},[x,v]),C=A.useCallback(async(E,R)=>{if(x(E)){const H=f.filter(_=>_.filePath!==E);g(H)}else{const H=await v(R),_={filePath:E,viewedAt:new Date().toISOString(),diffContentHash:H},F=[...f,_];g(F)}},[f,x,v,g]),N=A.useCallback(()=>{g([]),b(new Map)},[g]);return{viewedFiles:w,toggleFileViewed:C,isFileContentChanged:S,getViewedFileRecord:x,clearViewedFiles:N}}const l1={mobileMax:767,desktopMin:1024},bu={mobile:`(max-width: ${l1.mobileMax}px)`,desktop:`(min-width: ${l1.desktopMin}px)`},qR=()=>typeof window>"u"?{isMobile:!1,isDesktop:!0}:{isMobile:window.matchMedia(bu.mobile).matches,isDesktop:window.matchMedia(bu.desktop).matches};function PR(){const[e,r]=A.useState(()=>qR());return A.useEffect(()=>{if(typeof window>"u")return;const i=window.matchMedia(bu.mobile),l=window.matchMedia(bu.desktop),o=()=>{r({isMobile:i.matches,isDesktop:l.matches})};return o(),i.addEventListener("change",o),l.addEventListener("change",o),()=>{i.removeEventListener("change",o),l.removeEventListener("change",o)}},[]),e}function $R(e){const r=new Set;return e.forEach(i=>{const l=i.author?.trim();l&&r.add(l)}),[...r]}function VR(e){return $R(e).length>=2}function GR(e,r,i){for(let l=0;l<e.chunks.length;l++){const o=e.chunks[l];if(o)for(let u=0;u<o.lines.length;u++){const c=o.lines[u];if(!c)continue;if((c.newLineNumber||c.oldLineNumber)===i)return{fileIndex:r,chunkIndex:l,lineIndex:u,side:c.newLineNumber?"right":"left"}}}return null}function YR(e,r){const i=r.findIndex(u=>u.path===e.file);if(i===-1)return null;const l=r[i];if(!l)return null;const o=Array.isArray(e.line)?e.line[1]:e.line;return GR(l,i,o)}const XR=[],ZR=[],Bv="difit.sidebarWidth",Uv="difit.sidebarOpen",Hv=200,qv=600,Bd=280,KR=()=>{if(typeof window>"u")return Bd;const e=window.localStorage.getItem(Bv);if(!e)return Bd;const r=Number.parseInt(e,10);return Number.isFinite(r)?Math.min(qv,Math.max(Hv,r)):Bd},QR=()=>{if(typeof window>"u")return!0;const e=window.localStorage.getItem(Uv);return e===null||e==="true"?!0:e!=="false"};function JR(){const[e,r]=A.useState(null),[i,l]=A.useState(to),o=A.useRef(!1),[u,c]=A.useState(!0),[f,p]=A.useState(!0),[h,b]=A.useState(null),[g,w]=A.useState(!1),[x,v]=A.useState(KR),[S,C]=A.useState(!1),[N,E]=A.useState(QR),[R,O]=A.useState(!1),[H,_]=A.useState(!1),[F,z]=A.useState(!1),[B,M]=A.useState(!1),[$,V]=A.useState(!1),[J,I]=A.useState(new Set),Z=A.useRef(!1),U=A.useRef(null),[Y,X]=A.useState(null),[q,j]=A.useState(""),[D,P]=A.useState(""),[T,W]=A.useState(""),[te,ce]=A.useState(""),me=A.useRef(!1),{settings:xe,updateSettings:ge}=yR(),{isMobile:ve,isDesktop:Ee}=PR(),{comments:de,addComment:ye,removeComment:we,updateComment:Re,clearAllComments:Ye,generatePrompt:Ie,generateAllCommentsPrompt:It}=SR(e?.baseCommitish,e?.targetCommitish,e?.commit,void 0,e?.repositoryId),at=A.useMemo(()=>de.map(le=>({id:le.id,file:le.filePath,line:typeof le.position.line=="number"?le.position.line:[le.position.line.start,le.position.line.end],body:le.body,timestamp:le.createdAt,author:le.author,codeContent:le.codeSnapshot?.content,side:le.position.side})),[de]),pt=A.useMemo(()=>de.map(le=>({id:le.id,file:le.filePath,line:typeof le.position.line=="number"?le.position.line:[le.position.line.start,le.position.line.end],body:le.body,timestamp:le.createdAt,author:le.author,side:le.position.side})),[de]),Bt=A.useMemo(()=>VR(at),[at]),Jt=A.useMemo(()=>{const le=new Map;return at.forEach(be=>{const je=le.get(be.file);je?je.push(be):le.set(be.file,[be])}),le},[at]),Ut=ve&&de.length>0,{viewedFiles:Fe,toggleFileViewed:tr,clearViewedFiles:oe}=HR(e?.baseCommitish,e?.targetCommitish,e?.commit,void 0,e?.files,e?.repositoryId,xe.autoViewedPatterns);A.useEffect(()=>{Z.current=!1},[e?.repositoryId,e?.commit]),A.useEffect(()=>{Z.current||(I(new Set(Fe)),Z.current=!0)},[Fe]);const{renderedFilePaths:pe,ensureFileRendered:Te,ensureFilesRenderedUpTo:ze,registerLazyFileContainer:Xe,scrollFileIntoDiffContainer:_t}=UR({diffData:e,diffScrollContainerRef:U,setDiffData:r}),fn=A.useCallback(async le=>{if(!e)return;const be=e.files.find(Je=>Je.path===le);if(!be)return;const je=Fe.has(le);await tr(le,be),I(Je=>{const De=new Set(Je);return je?De.delete(le):De.add(le),De}),je||setTimeout(()=>{_t(le)},100)},[e,_t,tr,Fe]),Lt=A.useCallback(le=>{I(be=>{const je=new Set(be);return je.has(le)?je.delete(le):je.add(le),je})},[]),bt=A.useCallback(le=>{e&&I(le?new Set(e.files.map(be=>be.path)):new Set)},[e]),Dt=A.useCallback(le=>{o.current=!0,l(le)},[]),{isLoading:We,expandLines:$n,expandAllBetweenChunks:dn,prefetchFileContent:Fu,getMergedChunks:Tr,lastUpdatedFilePath:jr,lastUpdatedAt:Bi}=CR({baseCommitish:e?.baseCommitish,targetCommitish:e?.targetCommitish}),In=A.useRef(Tr);A.useEffect(()=>{In.current=Tr},[Tr]);const[Rr,nr]=A.useState(new Map),Ui=A.useMemo(()=>{const le=new Map;return e?.files.forEach(be=>{le.set(be.path,be)}),le},[e]);A.useEffect(()=>{if(!e){nr(new Map);return}nr(le=>{let be=!1;const je=new Map(le),Je=new Set(e.files.map(De=>De.path));return je.forEach((De,Nt)=>{Je.has(Nt)||(je.delete(Nt),be=!0)}),pe.forEach(De=>{if(je.has(De))return;const Nt=Ui.get(De);Nt&&(je.set(De,In.current(Nt)),be=!0)}),be?je:le})},[e,Ui,pe]),A.useEffect(()=>{if(!e||!jr)return;const le=Ui.get(jr);le&&nr(be=>{if(!be.has(le.path))return be;const je=new Map(be);return je.set(le.path,In.current(le)),je})},[e,Ui,jr,Bi]);const so=A.useMemo(()=>e?e.files.map(le=>({...le,chunks:Rr.get(le.path)||le.chunks})):[],[e,Rr]),[Hi,rr]=A.useState(null),{shouldReload:Iu,reload:ql,watchState:Pl}=NR(async()=>{await Cn()}),{cursor:Wt,isHelpOpen:$l,setIsHelpOpen:qi,setCursorPosition:ir}=MR({files:so,comments:at,viewMode:i,reviewedFiles:Fe,onToggleReviewed:fn,onCreateComment:()=>{Wt&&rr({fileIndex:Wt.fileIndex,chunkIndex:Wt.chunkIndex,lineIndex:Wt.lineIndex})},onCopyAllComments:()=>{de.length>0&&$i()},onDeleteAllComments:()=>{de.length>0&&confirm("Delete all comments?")&&Ye()},onShowCommentsList:()=>{M(!0)},onRefresh:()=>{ql()}});A.useEffect(()=>{if(!e||!Wt)return;const le=e.files[Wt.fileIndex]?.path;!le||pe.has(le)||(ze(le),requestAnimationFrame(()=>{ir(Wt)}))},[Wt,e,ze,pe,ir]);const uo=A.useCallback((le,be,je,Je)=>{ir({fileIndex:le,chunkIndex:be,lineIndex:je,side:Je})},[ir]),Vn=A.useCallback(()=>{rr(null)},[rr]),Ct=A.useCallback(le=>Ie(le.id),[Ie]),Ht=le=>{le.preventDefault(),O(!0);const be=le.clientX,je=x,Je=Nt=>{const Vi=Math.max(Hv,Math.min(qv,je+(Nt.clientX-be)));v(Vi)},De=()=>{O(!1),document.removeEventListener("mousemove",Je),document.removeEventListener("mouseup",De)};document.addEventListener("mousemove",Je),document.addEventListener("mouseup",De)},Cn=A.useCallback(async(le,be)=>{try{const je=new URLSearchParams({ignoreWhitespace:String(u)});le&&je.set("base",le),be&&je.set("target",be);const Je=await fetch(`/api/diff?${je}`);if(!Je.ok)throw new Error("Failed to fetch diff data");const De=await Je.json();if(r(De),De.baseCommitish&&W(De.baseCommitish),De.targetCommitish&&ce(De.targetCommitish),!me.current){const Nt=De.requestedBaseCommitish??De.baseCommitish,Vi=De.requestedTargetCommitish??De.targetCommitish;Nt&&j(Nt),Vi&&P(Vi)}De.mode&&!o.current&&l(qk(De.mode))}catch(je){b(je instanceof Error?je.message:"Unknown error")}finally{p(!1)}},[u]);A.useEffect(()=>{Cn()},[Cn]),A.useEffect(()=>{ve&&i!=="unified"&&l("unified")},[i,ve]),A.useEffect(()=>{try{window.localStorage.setItem(Bv,String(x))}catch{}},[x]),A.useEffect(()=>{try{window.localStorage.setItem(Uv,String(N))}catch{}},[N]),A.useEffect(()=>{fetch("/api/revisions").then(le=>le.ok?le.json():null).then(le=>{X(le),le?.resolvedBase&&W(be=>be||le.resolvedBase||""),le?.resolvedTarget&&ce(be=>be||le.resolvedTarget||"")}).catch(()=>X(null))},[]);const Pi=A.useCallback(async(le,be)=>{le===q&&be===D||(me.current=!0,j(le),P(be),p(!0),b(null),await Cn(le,be))},[q,D,Cn]),co=A.useRef(!1);A.useEffect(()=>{e?.clearComments&&!co.current&&(co.current=!0,Ye(),oe(),console.log("✅ All existing comments and viewed files cleared as requested via --clean flag"))},[e?.clearComments,Ye,oe]),A.useEffect(()=>{e&&(Fe.size<e.files.length?z(!1):Fe.size===e.files.length&&!F&&(_(!0),z(!0),setTimeout(()=>{_(!1)},1e3)))},[Fe.size,e,F]),A.useEffect(()=>{const le=JSON.stringify({comments:pt});fetch("/api/comments",{method:"POST",headers:{"Content-Type":"application/json"},body:le}).catch(je=>{console.error("Failed to sync comments:",je)});const be=()=>{navigator.sendBeacon("/api/comments",le)};return window.addEventListener("beforeunload",be),()=>{window.removeEventListener("beforeunload",be)}},[pt]),A.useEffect(()=>{const le=new EventSource("/api/heartbeat");return le.onopen=()=>{console.log("Connected to server heartbeat")},le.onerror=()=>{console.log("Server connection lost"),le.close()},()=>{le.close()}},[]);const Bu=A.useCallback((le,be,je,Je,De)=>(ye({filePath:le,body:je,side:De||"new",line:typeof be=="number"?be:{start:be[0],end:be[1]},codeSnapshot:Je?{content:Je,language:void 0}:void 0}),Promise.resolve()),[ye]),$i=async()=>{try{const le=It();await navigator.clipboard.writeText(le),w(!0),setTimeout(()=>w(!1),2e3)}catch(le){console.error("Failed to copy all comments prompt:",le)}},hi=le=>{if(!e)return;const be=YR(le,e.files);be&&ir(be)},Vl=A.useCallback(async(le,be)=>{try{const je=await fetch("/api/open-in-editor",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filePath:le,line:be,editor:xe.editor})});if(!je.ok){const Je=await je.json().catch(()=>null);let De=je.statusText;Je&&typeof Je=="object"&&"error"in Je&&typeof Je.error=="string"&&(De=Je.error),console.error("Failed to open file in editor:",De)}}catch(je){console.error("Failed to open file in editor:",je)}},[xe.editor]),_r=le=>{ir(null);const be=le.target,je=be.closest('[data-comment-button="true"]'),Je=be.closest('[data-open-in-editor-button="true"]');!je&&!Je&&Lr(le)},Lr=le=>{document.querySelectorAll('form[data-empty="true"]').forEach(je=>{je.contains(le.target)||je.querySelector('button[type="button"]')?.click()})};if(f)return y.jsx("div",{className:"flex items-center justify-center h-screen bg-github-bg-primary",children:y.jsx("div",{className:"text-github-text-secondary text-base",children:"Loading diff..."})});if(h)return y.jsxs("div",{className:"flex flex-col items-center justify-center h-screen bg-github-bg-primary text-center gap-2",children:[y.jsx("h2",{className:"text-github-danger text-2xl mb-2",children:"Error"}),y.jsx("p",{className:"text-github-text-secondary text-base",children:h})]});if(!e)return y.jsxs("div",{className:"flex flex-col items-center justify-center h-screen bg-github-bg-primary text-center gap-2",children:[y.jsx("h2",{className:"text-github-danger text-2xl mb-2",children:"No data"}),y.jsx("p",{className:"text-github-text-secondary text-base",children:"No diff data available"})]});const pi=xe.editor!=="none"&&e.openInEditorAvailable!==!1;return y.jsx(Xk,{children:y.jsxs("div",{className:"h-screen flex flex-col",onClickCapture:_r,children:[y.jsxs("header",{className:`bg-github-bg-secondary border-b border-github-border flex ${ve?"flex-col":"flex-row items-center"}`,children:[y.jsxs("div",{className:`flex items-center justify-between w-full ${ve?"px-3 py-2 gap-3":"px-4 py-3 gap-4 w-auto"} ${R?"":"!transition-all !duration-300 !ease-in-out"}`,style:{width:ve?"100%":N?`${x}px`:"auto",minWidth:ve?"0px":N?"200px":"auto",maxWidth:ve?"none":N?"600px":"none"},children:[y.jsx("h1",{children:y.jsx(rR,{style:{height:"18px",color:"var(--color-github-text-secondary)"}})}),y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("button",{onClick:()=>E(!N),className:"p-2 text-github-text-secondary hover:text-github-text-primary hover:bg-github-bg-tertiary rounded transition-colors",title:N?"Collapse file tree":"Expand file tree","aria-expanded":N,"aria-controls":"file-tree-panel","aria-label":"Toggle file tree panel",children:N?y.jsx(Ck,{size:18}):y.jsx(Ak,{size:18})}),y.jsx("button",{onClick:()=>C(!0),className:"p-2 text-github-text-secondary hover:text-github-text-primary hover:bg-github-bg-tertiary rounded transition-colors",title:"Settings",children:y.jsx(C1,{size:18})})]})]}),!ve&&y.jsx("div",{className:`border-r border-github-border ${R?"":"!transition-all !duration-300 !ease-in-out"}`,style:{width:N?"4px":"0px",height:"calc(100% - 16px)",margin:"8px 0",transform:"translateX(-2px)"}}),y.jsxs("div",{className:`flex-1 flex flex-wrap items-center justify-between ${ve?"px-3 pb-2 gap-3":"px-4 py-3 gap-4"}`,children:[y.jsxs("div",{className:`flex flex-wrap items-center ${ve?"gap-2":"gap-3"}`,children:[!ve&&y.jsxs("div",{className:"flex bg-github-bg-tertiary border border-github-border rounded-md p-1",children:[y.jsxs("button",{onClick:()=>Dt("split"),className:`px-3 py-1.5 text-xs font-medium rounded transition-all duration-200 flex items-center gap-1.5 cursor-pointer ${i==="split"?"bg-github-bg-primary text-github-text-primary shadow-sm":"text-github-text-secondary hover:text-github-text-primary"}`,children:[y.jsx(ek,{size:14}),"Split"]}),y.jsxs("button",{onClick:()=>Dt("unified"),className:`px-3 py-1.5 text-xs font-medium rounded transition-all duration-200 flex items-center gap-1.5 cursor-pointer ${i==="unified"?"bg-github-bg-primary text-github-text-primary shadow-sm":"text-github-text-secondary hover:text-github-text-primary"}`,children:[y.jsx(Ik,{size:14}),"Unified"]})]}),y.jsx(N1,{checked:u,onChange:c,label:"Ignore Whitespace",title:u?"Show whitespace changes":"Ignore whitespace changes"}),y.jsx(iR,{shouldReload:Iu,isReloading:Pl.isReloading,onReload:ql,changeType:Pl.lastChangeType,compact:ve})]}),y.jsxs("div",{className:`flex flex-wrap items-center text-sm text-github-text-secondary ${ve?"gap-3":"gap-4"}`,children:[!ve&&de.length>0&&y.jsx(ry,{commentsCount:de.length,isCopiedAll:g,onCopyAll:$i,onDeleteAll:Ye,onViewAll:()=>M(!0)}),y.jsxs("div",{className:"flex flex-col gap-1 items-center",children:[y.jsxs("div",{className:"text-xs relative",children:[Fe.size===e.files.length?"All diffs difit-ed!":`${Fe.size} / ${e.files.length} files viewed`,y.jsx(bR,{isActive:H})]}),y.jsx("div",{className:"relative h-2 bg-github-bg-tertiary rounded-full overflow-hidden",style:{width:"90px",border:"1px solid var(--color-github-border)"},children:y.jsx("div",{className:"absolute top-0 right-0 h-full transition-all duration-300 ease-out",style:{width:`${(e.files.length-Fe.size)/e.files.length*100}%`,backgroundColor:(()=>{const le=(e.files.length-Fe.size)/e.files.length*100;return le>50?"var(--color-github-accent)":le>20?"var(--color-github-warning)":"var(--color-github-danger)"})()}})})]}),Y?y.jsx(f4,{options:Y,baseRevision:q,targetRevision:D,resolvedBaseRevision:T,resolvedTargetRevision:te,onSelectDiff:(le,be)=>{Pi(le,be)},onOpenAdvanced:()=>V(!0),compact:!Ee}):y.jsxs("span",{className:"text-xs",children:["Reviewing:"," ",y.jsx("code",{className:"bg-github-bg-tertiary px-1.5 py-0.5 rounded text-xs text-github-text-primary",children:e.commit.includes("...")?y.jsxs(y.Fragment,{children:[y.jsxs("span",{className:"text-github-text-secondary font-medium",children:[e.commit.split("...")[0],"..."]}),y.jsx("span",{className:"font-medium",children:e.commit.split("...")[1]})]}):e.commit})]})]})]})]}),Y&&y.jsx(lR,{isOpen:$,onClose:()=>V(!1),options:Y,baseRevision:q,targetRevision:D,resolvedBaseRevision:T,resolvedTargetRevision:te,onApply:(le,be)=>{Pi(le,be)}},$?`${q}:${D}`:"closed"),ve&&N&&y.jsx("button",{type:"button","aria-label":"Close file tree",className:"fixed inset-0 bg-black/40 z-30",onClick:()=>E(!1)}),y.jsxs("div",{className:"flex flex-1 overflow-hidden relative",children:[y.jsx("div",{className:`relative overflow-hidden ${R?"":"!transition-all !duration-300 !ease-in-out"}`,style:{width:ve?"0px":N?`${x}px`:"0px"},children:y.jsxs("aside",{id:"file-tree-panel",className:`bg-github-bg-secondary overflow-y-auto flex flex-col ${ve?"fixed inset-y-0 right-0 z-40 w-[min(85vw,360px)] border-l border-github-border transition-transform duration-300 ease-out":"relative border-r border-github-border"}`,style:{width:ve?"min(85vw, 360px)":`${x}px`,minWidth:ve?"0px":"200px",maxWidth:ve?"none":"600px",height:"100%",transform:ve?N?"translateX(0)":"translateX(100%)":void 0},children:[y.jsx("div",{className:"flex-1 overflow-y-auto",children:y.jsx(eR,{files:e.files,onScrollToFile:_t,onFileSelected:ve?()=>E(!1):void 0,comments:at,reviewedFiles:Fe,onToggleReviewed:fn,selectedFileIndex:Wt?.fileIndex??null})}),!ve&&y.jsxs("div",{className:"p-4 border-t border-github-border flex justify-between items-center",children:[y.jsxs("button",{onClick:()=>qi(!0),className:"flex items-center gap-1.5 text-github-text-secondary hover:text-github-text-primary transition-colors",title:"Keyboard shortcuts (Shift+?)",children:[y.jsx(yk,{size:16}),y.jsx("span",{className:"text-sm",children:"Shortcuts"})]}),y.jsxs("a",{href:"https://github.com/yoshiko-pg/difit",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-github-text-secondary hover:text-github-text-primary transition-colors",title:"View on GitHub",children:[y.jsx("span",{className:"text-sm",children:"Star on GitHub"}),y.jsx(tR,{style:{height:"18px",width:"18px"}})]})]})]})}),!ve&&y.jsx("div",{className:`bg-github-border hover:bg-github-text-muted cursor-col-resize ${R?"":"!transition-all !duration-300 !ease-in-out"}`,style:{width:N?"4px":"0px"},onMouseDown:Ht,title:"Drag to resize file list"}),y.jsx("main",{ref:U,className:`flex-1 overflow-y-auto ${Ut?"pb-16":""}`,children:e.files.map((le,be)=>{const je=Jt.get(le.path)??XR,Je=Rr.get(le.path)??ZR,De=pe.has(le.path);return y.jsx("div",{id:Fs(le.path),"data-file-path":le.path,"data-rendered":De?"true":"false",ref:Nt=>Xe(le.path,Nt),className:"mb-6",children:De?y.jsx(Jj,{file:le,comments:je,showAuthorBadges:Bt,diffMode:i,reviewedFiles:Fe,onToggleReviewed:fn,collapsedFiles:J,onToggleCollapsed:Lt,onToggleAllCollapsed:bt,onAddComment:Bu,onGeneratePrompt:Ct,onRemoveComment:we,onUpdateComment:Re,onOpenInEditor:pi?Vl:void 0,syntaxTheme:xe.syntaxTheme,baseCommitish:e.baseCommitish,targetCommitish:e.targetCommitish,cursor:Wt?.fileIndex===be?Wt:null,fileIndex:be,onLineClick:uo,commentTrigger:Hi?.fileIndex===be?Hi:null,onCommentTriggerHandled:Vn,mergedChunks:Je,expandLines:$n,expandAllBetweenChunks:dn,prefetchFileContent:Fu,isExpandLoading:We}):y.jsx("div",{className:"bg-github-bg-secondary border border-github-border rounded-md px-4 py-3",children:y.jsxs("div",{className:"flex items-center justify-between gap-3",children:[y.jsxs("div",{className:"min-w-0",children:[y.jsx("div",{className:"text-xs uppercase tracking-wide text-github-text-muted",children:"Deferred Rendering"}),y.jsx("div",{className:"text-sm font-mono text-github-text-primary truncate",children:le.path})]}),y.jsx("button",{type:"button",onClick:()=>Te(le.path),className:"px-3 py-1.5 text-xs rounded border border-github-border text-github-text-secondary hover:text-github-text-primary hover:bg-github-bg-tertiary",children:"Load now"})]})})},le.path)})})]}),Ut&&y.jsx("div",{className:"fixed bottom-0 left-0 right-0 z-20 bg-github-bg-secondary border-t border-github-border px-4 py-2 flex justify-end",children:y.jsx(ry,{commentsCount:de.length,isCopiedAll:g,onCopyAll:$i,onDeleteAll:Ye,onViewAll:()=>M(!0),direction:"up",compact:!0})}),S&&y.jsx(gR,{isOpen:S,onClose:()=>C(!1),settings:xe,onSettingsChange:ge}),y.jsx(nR,{isOpen:$l,onClose:()=>qi(!1)}),y.jsx(gC,{isOpen:B,onClose:()=>M(!1),onNavigate:hi,comments:at,showAuthorBadges:Bt,onRemoveComment:we,onGeneratePrompt:le=>Ie(le.id),onUpdateComment:Re,syntaxTheme:xe.syntaxTheme})]})})}const Pv=document.getElementById("root");if(!Pv)throw new Error("Root element not found");y2.createRoot(Pv).render(y.jsx(Qt.StrictMode,{children:y.jsx(R2,{initiallyActiveScopes:["navigation"],children:y.jsx(JR,{})})}));export{Rt as _,WR as a,yu as g};
|